From ae5899a97753e7ea3d6e329d7c5278c5c463313b Mon Sep 17 00:00:00 2001 From: yujialong <479214531@qq.com> Date: Tue, 23 Apr 2024 13:56:14 +0800 Subject: [PATCH] fix --- .env | 2 +- src/components/Panel/index.vue | 34 ++++++++++-------- src/views/product/afterLoan/1031.vue | 44 ++++++++++++++--------- src/views/product/bank/Approve.vue | 2 +- src/views/product/strategy/150/Detail.vue | 1 + 5 files changed, 50 insertions(+), 33 deletions(-) diff --git a/.env b/.env index e2a3828..214a3f1 100644 --- a/.env +++ b/.env @@ -2,7 +2,7 @@ VITE_APP_TITLE=金融产品设计及数字化营销沙盘 VITE_PORT=9520 # VITE_PROXY=http://192.168.31.125:8080 VITE_PUBLIC_PATH=./ -# VITE_BASE_API=http://192.168.31.217:9000 +# VITE_BASE_API=http://192.168.31.51:9000 VITE_BASE_API=http://121.37.12.51 # VITE_BASE_API=https://www.occupationlab.com VITE_I18N_LOCALE=zh-cn diff --git a/src/components/Panel/index.vue b/src/components/Panel/index.vue index dd18358..1f99ef4 100644 --- a/src/components/Panel/index.vue +++ b/src/components/Panel/index.vue @@ -561,22 +561,26 @@ let reload = async () => { }; // 重新开始询问框 let reloadConfirm = async () => { - ElMessageBox.confirm('

点击重新开始,之前操作会清空。

确定重新开始吗?

', '提示', { - confirmButtonText: '确定', - cancelButtonText: '取消', - type: 'warning', - closeOnClickModal: false, - dangerouslyUseHTMLString: true, - }) - .then(async () => { - getEntryTime(1); - await delCache(); // 点了重新开始才需要删除缓存,切换了项目不需要删除缓存 - Cookies.remove('sand-level'); - reload(); + if (isSubmit.value) { + reload(); + } else { + ElMessageBox.confirm('

点击重新开始,之前操作会清空。

确定重新开始吗?

', '提示', { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning', + closeOnClickModal: false, + dangerouslyUseHTMLString: true, }) - .catch(() => { - submiting.value = false; - }); + .then(async () => { + getEntryTime(1); + await delCache(); // 点了重新开始才需要删除缓存,切换了项目不需要删除缓存 + Cookies.remove('sand-level'); + reload(); + }) + .catch(() => { + submiting.value = false; + }); + } }; // 提交 let submit = async () => { diff --git a/src/views/product/afterLoan/1031.vue b/src/views/product/afterLoan/1031.vue index d0ea00e..bc2c975 100644 --- a/src/views/product/afterLoan/1031.vue +++ b/src/views/product/afterLoan/1031.vue @@ -21,7 +21,8 @@ + v-model="row.formulaOne" + disabled> + v-model="row.formulaTwo" + disabled> + v-model="row.formulaOne" + disabled> + v-model="row.formulaTwo" + disabled> + v-model="row.formulaOne" + disabled> + v-model="row.formulaTwo" + disabled> + v-model="row.formulaOne" + disabled> + v-model="row.formulaOne" + disabled> + v-model="row.formulaTwo" + disabled> + v-model="row.formulaOne" + disabled> + v-model="row.formulaTwo" + disabled> []>([]); const info = ref[]>([]); +// 公式的默认答案 +const answer = [[697, 697], [697, 697], [1, 707], [714], [], [697, 697], [697, 697]]; // 配置项 const getConfig = async () => { const { process } = await getProcessInformationBasedOnRoles(1031); + console.log('🚀 ~ getConfig ~ process:', process); const result = [ { recordName: '基准分', }, ]; process.map((e, i) => { + console.log('🚀 ~ process.map ~ i:', i); let temp = { ...getIds(), recordName: e.name, recordChildren: e.recordChildren, - formulaOne: '', - formulaTwo: '', + formulaOne: i < 7 ? answer[i][0] || '' : '', + formulaTwo: i < 7 ? answer[i][1] || '' : '', score: '', id: '', stRecordId: e.id, @@ -220,15 +235,12 @@ const getConfig = async () => { if (info.value.length) { result.forEach((e, i) => { if (i) { - e.formulaOne = info.value[i - 1].formulaOne ? +info.value[i - 1].formulaOne : ''; e.indexId = info.value[i - 1].indexId; - e.formulaTwo = info.value[i - 1].formulaTwo ? +info.value[i - 1].formulaTwo : ''; e.score = info.value[i - 1].score ? +info.value[i - 1].score : ''; } }); } form.value = result; - console.log('🚀 ~ file: 1031.vue:83 ~ getConfig ~ result:', result); }; // 详情 const getDetail = async () => { diff --git a/src/views/product/bank/Approve.vue b/src/views/product/bank/Approve.vue index c9ba791..90c1bbc 100644 --- a/src/views/product/bank/Approve.vue +++ b/src/views/product/bank/Approve.vue @@ -98,7 +98,7 @@ const signed = ref(); // 处理审批意见下拉选项 const updateAudits = (count: number) => { - if (count >= 2) { + if (count >= 10) { autids.value.pop(); } }; diff --git a/src/views/product/strategy/150/Detail.vue b/src/views/product/strategy/150/Detail.vue index 1705efc..73f9b94 100644 --- a/src/views/product/strategy/150/Detail.vue +++ b/src/views/product/strategy/150/Detail.vue @@ -157,6 +157,7 @@ import { getProcessInformationBasedOnRoles, addOperation } from '@/api/judgment' import type { TableColumnCtx } from 'element-plus'; import { handleId, getIds } from '@/utils/common'; import Cookies from 'js-cookie'; + const Confirm = defineAsyncComponent(() => import('@/components/StrategyConfirm.vue')); const props = defineProps({