ui ประเมินผล
This commit is contained in:
parent
b2f5d6b122
commit
a3787f976a
13 changed files with 717 additions and 93 deletions
|
|
@ -23,9 +23,7 @@ async function fetchCheckStatus() {
|
|||
store.tabMenu === "1"
|
||||
? (store.evaluateId = data.expertId)
|
||||
: (store.evaluateId = data.specialExpertId);
|
||||
store.evaluateId && fetchCheckStep();
|
||||
|
||||
store.showLoadStatus = true;
|
||||
fetchCheckStep(store?.evaluateId);
|
||||
})
|
||||
.catch((err) => {
|
||||
messageError($q, err);
|
||||
|
|
@ -35,38 +33,43 @@ async function fetchCheckStatus() {
|
|||
});
|
||||
}
|
||||
|
||||
async function fetchCheckStep() {
|
||||
await http
|
||||
.get(config.API.evaluationCheckStep(store.evaluateId))
|
||||
.then((res) => {
|
||||
const data = res.data.result;
|
||||
let step =
|
||||
data.Step === "CHECK_SPEC"
|
||||
? 1
|
||||
: data.Step === "PREPARE_DOC_V1"
|
||||
? 2
|
||||
: data.Step === "CHECK_DOC_V1"
|
||||
? 3
|
||||
: data.Step === "WAIT_CHECK_DOC_V1"
|
||||
? 4
|
||||
: data.Step === "ANNOUNCE_WEB"
|
||||
? 5
|
||||
: data.Step === "PREPARE_DOC_V2"
|
||||
? 6
|
||||
: data.Step === "CHECK_DOC_V2"
|
||||
? 7
|
||||
: data.Step === "WAIT_CHECK_DOC_V2"
|
||||
? 8
|
||||
: data.Step === "DONE"
|
||||
? 9
|
||||
: 0;
|
||||
async function fetchCheckStep(id: string) {
|
||||
if (id) {
|
||||
await http
|
||||
.get(config.API.evaluationCheckStep(id))
|
||||
.then((res) => {
|
||||
const data = res.data.result;
|
||||
|
||||
store.currentStep = step;
|
||||
store.step = step;
|
||||
})
|
||||
.catch((err) => {
|
||||
messageError($q, err);
|
||||
});
|
||||
let step =
|
||||
data.Step === "CHECK_SPEC"
|
||||
? 1
|
||||
: data.Step === "PREPARE_DOC_V1"
|
||||
? 2
|
||||
: data.Step === "CHECK_DOC_V1"
|
||||
? 3
|
||||
: data.Step === "WAIT_CHECK_DOC_V1"
|
||||
? 4
|
||||
: data.Step === "ANNOUNCE_WEB"
|
||||
? 5
|
||||
: data.Step === "PREPARE_DOC_V2"
|
||||
? 6
|
||||
: data.Step === "CHECK_DOC_V2"
|
||||
? 7
|
||||
: data.Step === "WAIT_CHECK_DOC_V2"
|
||||
? 8
|
||||
: data.Step === "DONE"
|
||||
? 9
|
||||
: 1;
|
||||
store.currentStep = step;
|
||||
store.step = step;
|
||||
})
|
||||
.catch((err) => {
|
||||
messageError($q, err);
|
||||
})
|
||||
.finally(() => {
|
||||
store.showLoadStatus = true;
|
||||
});
|
||||
} else (store.step = 1), (store.showLoadStatus = true);
|
||||
}
|
||||
|
||||
async function saveEvaluation(body: any) {
|
||||
|
|
@ -176,7 +179,7 @@ async function saveEvaluation(body: any) {
|
|||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
fetchCheckStep();
|
||||
fetchCheckStep(store?.evaluateId);
|
||||
});
|
||||
}
|
||||
|
||||
|
|
@ -192,7 +195,7 @@ async function nextPrapare(type: string, body: any) {
|
|||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
fetchCheckStep();
|
||||
fetchCheckStep(store?.evaluateId);
|
||||
});
|
||||
}
|
||||
|
||||
|
|
@ -223,7 +226,7 @@ async function nextCheckDoc(type: string) {
|
|||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
fetchCheckStep();
|
||||
fetchCheckStep(store?.evaluateId);
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue