API evaluation
This commit is contained in:
parent
fc7b933cc6
commit
be33ef9186
7 changed files with 99 additions and 10 deletions
45
src/modules/06_evaluate/stores/evaluationFunction.ts
Normal file
45
src/modules/06_evaluate/stores/evaluationFunction.ts
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
import http from "@/plugins/http";
|
||||
import config from "@/app.config";
|
||||
import { useQuasar } from "quasar";
|
||||
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
import { useEvaluateStore } from "@/modules/06_evaluate/store";
|
||||
|
||||
const stroe = useEvaluateStore();
|
||||
const mixin = useCounterMixin();
|
||||
const $q = useQuasar();
|
||||
|
||||
const { showLoader, hideLoader, messageError } = mixin;
|
||||
|
||||
async function fetchCheckStatus() {
|
||||
console.log(stroe.tabMenu);
|
||||
showLoader();
|
||||
await http
|
||||
.get(config.API.evaluationCheckStatus())
|
||||
.then((res) => {
|
||||
console.log(res);
|
||||
// stroe.tabMenu === 1 ? stroe.evaluateId = 1 : stroe.evaluateId = 2
|
||||
})
|
||||
.catch((err) => {
|
||||
messageError($q, err);
|
||||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
});
|
||||
}
|
||||
|
||||
async function saveEvaluation(body: any) {
|
||||
console.log(body);
|
||||
|
||||
// try {
|
||||
// showLoader();
|
||||
// const res = await http.post(config.API.evaluationCheckspec(), body);
|
||||
// return res;
|
||||
// } catch (err) {
|
||||
// messageError($q, err);
|
||||
// } finally {
|
||||
// hideLoader();
|
||||
// }
|
||||
}
|
||||
|
||||
export default { fetchCheckStatus, saveEvaluation };
|
||||
Loading…
Add table
Add a link
Reference in a new issue