diff --git a/.env b/.env index 1afc474..37d5857 100644 --- a/.env +++ b/.env @@ -2,8 +2,8 @@ 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.217:9000 # VITE_BASE_API=http://121.37.12.51 -VITE_BASE_API=https://www.occupationlab.com +# VITE_BASE_API=https://www.occupationlab.com VITE_I18N_LOCALE=zh-cn VITE_I18N_FALLBACK_LOCALE=zh-cn diff --git a/src/components/Panel/index.vue b/src/components/Panel/index.vue index 613557d..e3a418f 100644 --- a/src/components/Panel/index.vue +++ b/src/components/Panel/index.vue @@ -490,6 +490,7 @@ const getCache = async (reloadPage?: number) => { cancelButtonText: '否', type: 'success', closeOnClickModal: false, + showClose: false, }) .then(async () => { // 如果返回了关卡id,则存起来 @@ -517,6 +518,13 @@ const getCache = async (reloadPage?: number) => { setNewProject(); } }; +const handleCache = () => { + // 没提交的情况下才需要查 + if (!isSubmit.value) { + param.cid && getEntryTime(); + visible.value && !Cookies.get('sand-loaded') && getCache(0); // 选择关卡页面才需要弹出是否恢复缓存的弹框 + } +}; // 查看实验报告 const toReport = () => { router.push('/report'); @@ -698,13 +706,6 @@ const initSocket = () => { // 监听socket消息 socket.onmessage = getMessage; }; -const handleCache = () => { - // 没提交的情况下才需要查 - if (!isSubmit.value) { - param.cid && getEntryTime(); - visible.value && !Cookies.get('sand-loaded') && getCache(0); // 选择关卡页面才需要弹出是否恢复缓存的弹框 - } -}; // 初始化 const init = async () => { getLevel.value = inject('getLevel'); // 关卡页面获取关卡方法 diff --git a/src/views/product/bank/CardList.vue b/src/views/product/bank/CardList.vue index 6ee78d1..e0ccdae 100644 --- a/src/views/product/bank/CardList.vue +++ b/src/views/product/bank/CardList.vue @@ -43,6 +43,7 @@ (''); +const action = ref(); // const modules: any = import.meta.glob('./*.vue'); // let currentSubApp = defineAsyncComponent(modules[`./${route.params.action}.vue`]); @@ -78,6 +79,7 @@ const loading = ref(false); const productType = computed(() => route.query.type); // 个人/企业 const role = computed(() => +route.query.role || 41); const id = computed(() => +route.query.id); +const configKey = ref(1); // 列表 const getList = async (refresh?: number) => { loading.value = true; @@ -115,8 +117,12 @@ watch( // 产品切换 const switchProduct = (row: any, refresh?: number) => { // 产品经理配置要素:add;风控经理:config;专家委员会:approve。这3个权限都没有的话,跳详情 - const path = `/product/bank/${refresh ? 'detail' : row.showElementsOrNot ? 'add' : row.showRiskControlOrNot ? 'config' : row.showApprovalOrNot ? 'approve' : 'detail'}`; - router.push(`${path}?type=${route.query.type || ''}&i=${route.query.i}&role=${route.query.role}&id=${row.id}&name=${name}`); + const toAction = refresh ? 'detail' : row.showElementsOrNot ? 'add' : row.showRiskControlOrNot ? 'config' : row.showApprovalOrNot ? 'approve' : 'detail'; + const curAction = action.value; + const path = `/product/bank/${toAction}`; + router.push(`${path}?type=${route.query.type || ''}&i=${route.query.i}&role=${route.query.role}&id=${row.id}&name=${route.query.name ?? ''}`); + console.log('🚀 ~ switchProduct ~ toAction:', toAction, curAction, (toAction === curAction) === 'config'); + if (toAction === 'config' && curAction === 'config') configKey.value += 1; }; // 新增 const toAdd = () => { diff --git a/src/views/product/bank/Config.vue b/src/views/product/bank/Config.vue index bd95865..2837c9d 100644 --- a/src/views/product/bank/Config.vue +++ b/src/views/product/bank/Config.vue @@ -60,6 +60,7 @@ prop="loanApplicationMethod">

选择申请方式(至少选一样)

) => { const rule: Array> = []; data.map((e) => { - e.enterBlacklist && rule.push(handleId(363, 324, e.enterBlacklist, preIds + ',' + e.stRecordId + ',363', '')); + e.enterBlacklist && rule.push(handleId(363, 324, e.enterBlacklist, preIds + ',' + e.stRecordId + ',363', 1)); rule.push(handleId(367, 166, e.enterRuleOne, preIds + ',' + e.stRecordId + ',364,367', 5), handleId(368, 167, e.enterRuleTwo, preIds + ',' + e.stRecordId + ',364,368', 5)); - e.outBlacklist && rule.push(handleId(365, 324, e.outBlacklist, preIds + ',' + e.stRecordId + ',365', '')); + e.outBlacklist && rule.push(handleId(365, 324, e.outBlacklist, preIds + ',' + e.stRecordId + ',365', 1)); rule.push(handleId(367, 166, e.outRuleOne, preIds + ',' + e.stRecordId + ',366,367', 5), handleId(368, 167, e.outRuleTwo, preIds + ',' + e.stRecordId + ',366,368', 5)); });