|
@@ -343,10 +343,44 @@ export default {
|
|
loading: false,
|
|
loading: false,
|
|
pretreatmentInfo: {},
|
|
pretreatmentInfo: {},
|
|
lockedInfo: [],
|
|
lockedInfo: [],
|
|
- lockedDialog: false
|
|
|
|
|
|
+ lockedDialog: false,
|
|
|
|
+ checkNodeId: ''
|
|
};
|
|
};
|
|
},
|
|
},
|
|
async created() {
|
|
async created() {
|
|
|
|
+ let nodeId = '';
|
|
|
|
+ const roles = this.userInfo.roles;
|
|
|
|
+
|
|
|
|
+ switch (true) {
|
|
|
|
+ // 43 地市管理员
|
|
|
|
+ case roles.includes(43):
|
|
|
|
+ nodeId = 2;
|
|
|
|
+ break;
|
|
|
|
+ // 4 区域管理员
|
|
|
|
+ case roles.includes(4):
|
|
|
|
+ nodeId = 3;
|
|
|
|
+ break;
|
|
|
|
+ // 42 市场管理员
|
|
|
|
+ case roles.includes(42):
|
|
|
|
+ nodeId = 8;
|
|
|
|
+ break;
|
|
|
|
+ // 40 商务管理员
|
|
|
|
+ case roles.includes(40):
|
|
|
|
+ nodeId = 9;
|
|
|
|
+ break;
|
|
|
|
+ // 39 事业部总经理
|
|
|
|
+ case roles.includes(39):
|
|
|
|
+ nodeId = 6;
|
|
|
|
+ break;
|
|
|
|
+ // 41 事业部分管领导
|
|
|
|
+ case roles.includes(41):
|
|
|
|
+ nodeId = 5;
|
|
|
|
+ break;
|
|
|
|
+ default:
|
|
|
|
+ nodeId = 1;
|
|
|
|
+ }
|
|
|
|
+ this.checkNodeId = nodeId;
|
|
|
|
+
|
|
await this.getDict();
|
|
await this.getDict();
|
|
},
|
|
},
|
|
computed: {
|
|
computed: {
|
|
@@ -543,7 +577,7 @@ export default {
|
|
this.getPretreatment();
|
|
this.getPretreatment();
|
|
},
|
|
},
|
|
async getPretreatment() {
|
|
async getPretreatment() {
|
|
- const res = await getPretreatmentApi({ taskIds: this.checkIds });
|
|
|
|
|
|
+ const res = await getPretreatmentApi({ taskIds: this.checkIds, nodeId: this.checkNodeId });
|
|
if (res.data.code === 0) {
|
|
if (res.data.code === 0) {
|
|
this.pretreatmentInfo = res.data.data;
|
|
this.pretreatmentInfo = res.data.data;
|
|
this.lockedInfo = res.data.data.locked;
|
|
this.lockedInfo = res.data.data.locked;
|
|
@@ -564,6 +598,7 @@ export default {
|
|
this.checkAllTaskScore;
|
|
this.checkAllTaskScore;
|
|
item.reviewInfo.checked = false;
|
|
item.reviewInfo.checked = false;
|
|
item.reviewInfo.show = false;
|
|
item.reviewInfo.show = false;
|
|
|
|
+ this.checkIds = [];
|
|
}
|
|
}
|
|
});
|
|
});
|
|
this.lockedDialogClose();
|
|
this.lockedDialogClose();
|
|
@@ -574,7 +609,8 @@ export default {
|
|
if (this.pretreatmentInfo?.token?.token) {
|
|
if (this.pretreatmentInfo?.token?.token) {
|
|
const obj = {
|
|
const obj = {
|
|
taskIds: taskIds,
|
|
taskIds: taskIds,
|
|
- token: this.pretreatmentInfo.token.token
|
|
|
|
|
|
+ token: this.pretreatmentInfo.token.token,
|
|
|
|
+ nodeId: this.checkNodeId
|
|
};
|
|
};
|
|
await pretreatmentClearApi(obj);
|
|
await pretreatmentClearApi(obj);
|
|
}
|
|
}
|
|
@@ -743,12 +779,16 @@ export default {
|
|
};
|
|
};
|
|
try {
|
|
try {
|
|
const res = await checkSingleApi(obj);
|
|
const res = await checkSingleApi(obj);
|
|
- // 无论审核成功不成功都将该条任务隐藏
|
|
|
|
|
|
+ if (res.data.code === 0) {
|
|
|
|
+ item.reviewInfo.checked = flag;
|
|
|
|
+ item.reviewInfo.show = false;
|
|
|
|
+ this.$forceUpdate();
|
|
|
|
+ }
|
|
|
|
+ } catch (err) {
|
|
|
|
+ // this.$message.error(err);
|
|
item.reviewInfo.checked = flag;
|
|
item.reviewInfo.checked = flag;
|
|
item.reviewInfo.show = false;
|
|
item.reviewInfo.show = false;
|
|
this.$forceUpdate();
|
|
this.$forceUpdate();
|
|
- } catch (err) {
|
|
|
|
- console.log('err', err);
|
|
|
|
}
|
|
}
|
|
},
|
|
},
|
|
|
|
|
|
@@ -783,11 +823,13 @@ export default {
|
|
default:
|
|
default:
|
|
nodeId = 1;
|
|
nodeId = 1;
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ const taskIds = this.pretreatmentInfo.available.map((item) => item.taskId);
|
|
this.$refs.taskForm.validate(async (valid) => {
|
|
this.$refs.taskForm.validate(async (valid) => {
|
|
if (valid) {
|
|
if (valid) {
|
|
let obj = {
|
|
let obj = {
|
|
- token: this.reviewToken,
|
|
|
|
- taskIds: this.checkIds,
|
|
|
|
|
|
+ token: this.pretreatmentInfo.token.token,
|
|
|
|
+ taskIds: taskIds,
|
|
checkResult: this.taskForm.checkResult,
|
|
checkResult: this.taskForm.checkResult,
|
|
checkMessage: this.taskForm.checkMessage,
|
|
checkMessage: this.taskForm.checkMessage,
|
|
nodeId: nodeId
|
|
nodeId: nodeId
|