46 lines
1.1 KiB
TypeScript
46 lines
1.1 KiB
TypeScript
|
|
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 };
|