From 1f2fccc380d9177995182e84756607c89d464d0e Mon Sep 17 00:00:00 2001 From: yujialong <479214531@qq.com> Date: Fri, 5 Jan 2024 15:23:03 +0800 Subject: [PATCH] fix --- src/components/Panel/index.vue | 28 +++++++++++++++---------- src/views/product/strategy/CardList.vue | 1 + src/views/product/strategy/Credit.vue | 2 +- src/views/product/strategy/Risk1.vue | 6 +++--- src/views/product/strategy/Risk2.vue | 2 +- src/views/product/strategy/Risk3.vue | 2 +- 6 files changed, 24 insertions(+), 17 deletions(-) diff --git a/src/components/Panel/index.vue b/src/components/Panel/index.vue index 2234edb..97e9981 100644 --- a/src/components/Panel/index.vue +++ b/src/components/Panel/index.vue @@ -51,6 +51,7 @@ v-show="per == 0">重新开始 提交 @@ -263,6 +264,7 @@ const curReq = ref[]>([]); const taskList = ref[]>([]); const pannelTab = ref('first'); const statusTimer = ref(null); +const submiting = ref(false); const reportId = ref(''); const countVal = ref(''); const getLevel = ref(); @@ -464,6 +466,7 @@ const submit = async () => { type: 'warning', }) .then(async () => { + submiting.value = true; const date = new Date(); const timeSum = Math.ceil((date.getTime() - entryTime.value.getTime()) / 60000); // 计算实验用时(分钟),向上取整 const submitTime = dayjs(date).format('YYYY-MM-DD HH:mm:ss'); @@ -493,20 +496,21 @@ const submit = async () => { let score = 0; // 给判分列表添加分数和运行结果 - taskList.value.map((e) => { - const item = retMap?.scoreInfo.find((n) => n.lcId === e.judgmentId); - if (item) { - e.examScore = item.questionScore; - e.finishedResult = item.calculate; // 1:正确,2:错误 - score += item.questionScore; // 计算总分 - } else { - e.examScore = 0; - } - }); + taskList.value.map((e) => { + const item = retMap?.scoreInfo.find((n) => n.lcId === e.judgmentId); + if (item) { + e.examScore = item.questionScore; + e.finishedResult = item.calculate; // 1:正确,2:错误 + score += item.questionScore; // 计算总分 + } else { + e.examScore = 0; + } + }); grade.value = score < 10 ? '0' + score : score; reportId.value = retMap.reportId; Cookies.set('sand-reportId', retMap.reportId); localStorage.setItem('sand-taskList', JSON.stringify(taskList.value)); + submiting.value = false; // 如果是竞赛,并且勾选了公布成绩详情的选项,则弹框提示 param.competitionId && @@ -521,7 +525,9 @@ const submit = async () => { }, }); }) - .catch(() => {}); + .catch(() => { + submiting.value = false; + }); }; // 获取项目详情 diff --git a/src/views/product/strategy/CardList.vue b/src/views/product/strategy/CardList.vue index a225674..0668fb7 100644 --- a/src/views/product/strategy/CardList.vue +++ b/src/views/product/strategy/CardList.vue @@ -172,6 +172,7 @@ const getList = async (refresh?: number) => { res.data.length ? ((!route.query.add && !creditId.value) || refresh) && switchProductCredit(res.data[0].id) : toAdd(); list1.value = res.data; } else { + riskId.value = 702; const { process } = await getProcessInformationBasedOnRoles(149); list2.value = process; } diff --git a/src/views/product/strategy/Credit.vue b/src/views/product/strategy/Credit.vue index 231532d..af70de0 100644 --- a/src/views/product/strategy/Credit.vue +++ b/src/views/product/strategy/Credit.vue @@ -804,7 +804,7 @@ const submit = async () => { // 新增判分记录 const addRecord = async () => { const isEnterprise = form.scoringObject; - const preIds = `1,${Cookies.get('sand-level')},42,148,${form.scoringObject ? 513 : 512}`; // 1,关卡id,角色(这个页面是风控经理),个人/企业(512/513) + const preIds = `1,${Cookies.get('sand-level')},42,67,148,${form.scoringObject ? 513 : 512}`; // 1,关卡id,角色(这个页面是风控经理),个人/企业(512/513) const lcRule: Array> = [handleId(514, 190, form.scoreCardName, preIds + ',514', 3), handleId(515, 191, form.scoringObject ? 392 : 391, preIds + ',515', 1)]; form.description && lcRule.push(handleId(516, 192, '94,' + form.description, preIds + ',516', 3)); diff --git a/src/views/product/strategy/Risk1.vue b/src/views/product/strategy/Risk1.vue index 85ccf65..195ebcc 100644 --- a/src/views/product/strategy/Risk1.vue +++ b/src/views/product/strategy/Risk1.vue @@ -11,7 +11,7 @@
个人评分系数配置
企业评分系数配置 { }; // 新增判分记录 const addRecord = async () => { - const preIds = `1,${Cookies.get('sand-level')},42,149,702`; // 1,关卡id,角色(这个页面是风控经理策略) + const preIds = `1,${Cookies.get('sand-level')},42,67,149,702`; // 1,关卡id,角色(这个页面是风控经理策略) const rule: Array> = []; form.value.forEach((e, i) => { diff --git a/src/views/product/strategy/Risk2.vue b/src/views/product/strategy/Risk2.vue index 5dc57a9..fc2f10f 100644 --- a/src/views/product/strategy/Risk2.vue +++ b/src/views/product/strategy/Risk2.vue @@ -119,7 +119,7 @@ const submit = async () => { }; // 新增判分记录 const addRecord = async () => { - const preIds = `1,${Cookies.get('sand-level')},42,149,703,718`; // 1,关卡id,角色(这个页面是风控经理策略) + const preIds = `1,${Cookies.get('sand-level')},42,67,149,703,718`; // 1,关卡id,角色(这个页面是风控经理策略) const rule: Array> = [ handleId(719, 232, form.value[0].coefficient, `${preIds},719`, 3), handleId(723, 232, form.value[2].coefficient, `${preIds},720,723`, 3), diff --git a/src/views/product/strategy/Risk3.vue b/src/views/product/strategy/Risk3.vue index 4facf9d..8917f29 100644 --- a/src/views/product/strategy/Risk3.vue +++ b/src/views/product/strategy/Risk3.vue @@ -112,7 +112,7 @@ const submit = async () => { }; // 新增判分记录 const addRecord = async () => { - const preIds = `1,${Cookies.get('sand-level')},42,149,704,747`; // 1,关卡id,角色(这个页面是风控经理策略) + const preIds = `1,${Cookies.get('sand-level')},42,67,149,704,747`; // 1,关卡id,角色(这个页面是风控经理策略) const rule: Array> = [ handleId(750, 232, form.value[1].coefficient, `${preIds},748,750`, 3), handleId(751, 232, form.value[2].coefficient, `${preIds},748,751`, 3),