API evaluation

This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2023-12-19 10:56:51 +07:00
parent fc7b933cc6
commit be33ef9186
7 changed files with 99 additions and 10 deletions

View 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 };