|
@@ -8,6 +8,7 @@ const state = {
|
|
stmms: 0,
|
|
stmms: 0,
|
|
analysis: 0,
|
|
analysis: 0,
|
|
},
|
|
},
|
|
|
|
+ waitTypes: [],
|
|
// createExamAndPrintTask
|
|
// createExamAndPrintTask
|
|
infoExamTask: {},
|
|
infoExamTask: {},
|
|
infoExamTaskDetail: {},
|
|
infoExamTaskDetail: {},
|
|
@@ -22,6 +23,9 @@ const mutations = {
|
|
setWaitTask(state, waitTask) {
|
|
setWaitTask(state, waitTask) {
|
|
state.waitTask = waitTask;
|
|
state.waitTask = waitTask;
|
|
},
|
|
},
|
|
|
|
+ setWaitTypes(state, waitTypes) {
|
|
|
|
+ state.waitTypes = waitTypes;
|
|
|
|
+ },
|
|
updateWaitTask(state, data) {
|
|
updateWaitTask(state, data) {
|
|
const waitTask = Object.assign({}, state.waitTask, data);
|
|
const waitTask = Object.assign({}, state.waitTask, data);
|
|
state.waitTask = waitTask;
|
|
state.waitTask = waitTask;
|
|
@@ -43,7 +47,7 @@ const mutations = {
|
|
};
|
|
};
|
|
|
|
|
|
const actions = {
|
|
const actions = {
|
|
- async updateWaitTaskCount({ commit }) {
|
|
|
|
|
|
+ async updateWaitTaskCount({ state, commit }) {
|
|
const task = [
|
|
const task = [
|
|
{
|
|
{
|
|
type: "flow",
|
|
type: "flow",
|
|
@@ -58,7 +62,9 @@ const actions = {
|
|
func: analysisTaskCount,
|
|
func: analysisTaskCount,
|
|
},
|
|
},
|
|
];
|
|
];
|
|
- let countAll = task.map((item) => item.func());
|
|
|
|
|
|
+ let countAll = task
|
|
|
|
+ .filter((item) => state.waitTypes.includes(item.type))
|
|
|
|
+ .map((item) => item.func());
|
|
const counts = await Promise.all(countAll).catch(() => {});
|
|
const counts = await Promise.all(countAll).catch(() => {});
|
|
|
|
|
|
if (!counts) return;
|
|
if (!counts) return;
|