diff --git a/src/api/config.ts b/src/api/config.ts index 7e55504..b0ca9ef 100644 --- a/src/api/config.ts +++ b/src/api/config.ts @@ -10,6 +10,8 @@ export const financialMarketFind = async (): Promise => (await axios.post(' export const financialMarketSave = async (data: Record): Promise => (await axios.post('/product/financialMarket/saveOrUpdate', data)).data; export const delPass = async (data: number[]): Promise => (await axios.post('/nakadai/nakadai/customsPass/batchDeletion', data)).data; +export const updateIsOpen = async (checkpointId: number, isEnable: number): Promise => + (await axios.post(`/nakadai/nakadai/customsPass/updateIsOpen?checkpointId=${checkpointId}&isEnable=${isEnable}`)).data; export const listPass = async (data: Record): Promise => (await axios.post('/nakadai/nakadai/customsPass/checkpointList', data)).data; export const savePass = async (data: Record): Promise => (await axios.post('/nakadai/nakadai/customsPass/save', data)).data; export const updatePass = async (data: Record[]): Promise => (await axios.post(`/nakadai/nakadai/customsPass/update`, data)).data; diff --git a/src/api/judgment.ts b/src/api/judgment.ts index a5c00f4..da7b477 100644 --- a/src/api/judgment.ts +++ b/src/api/judgment.ts @@ -7,5 +7,9 @@ export const getProcessInformationBasedOnRoles = async (id: number): Promise): Promise => (await axios.post('/product/product/bank/operation/addOperation', data)).data; export const checkPointList = async (projectId: number, displayCollection?: number | string = ''): Promise => (await axios.post(`/judgment/judgment/stRecord/checkPointList?projectId=${projectId}&displayCollection=${displayCollection}`)).data; -export const deleteCache = async (projectId: number, checkpoint: number): Promise => - (await axios.get(`/product/product/bank/operation/deleteCache?projectId=${projectId}&checkpoint=${checkpoint}`)).data; +export const deleteCache = async (data: Record): Promise => + ( + await axios.get( + `/product/product/bank/operation/deleteCache?projectId=${data.projectId}&checkpoint=${data.checkpointId}&assessmentId=${data.assessmentId}&competitionId=${data.competitionId}`, + ) + ).data; diff --git a/src/components/Panel/index.vue b/src/components/Panel/index.vue index cd46e96..ea55021 100644 --- a/src/components/Panel/index.vue +++ b/src/components/Panel/index.vue @@ -238,6 +238,7 @@ import 'mavon-editor/dist/css/index.css'; import '@vueup/vue-quill/dist/vue-quill.snow.css'; import { useDraggable } from '@vueuse/core'; import { logout } from '@/store/useCurrentUser'; +import { getIds } from '@/utils/common'; const router = useRouter(); const route = useRoute(); @@ -478,7 +479,7 @@ const toReport = () => { }; // 重新开始 const reload = async () => { - await deleteCache(param.projectId, Cookies.get('sand-level') ?? ''); + await deleteCache(getIds()); reloadCount(); grade.value = '00'; setSubmit(false); diff --git a/src/views/Home.vue b/src/views/Home.vue index 0d5fe33..f793134 100644 --- a/src/views/Home.vue +++ b/src/views/Home.vue @@ -24,7 +24,7 @@ - 仅显示已收藏的项目 + 仅显示已收藏的关卡
diff --git a/src/views/config/level/Index.vue b/src/views/config/level/Index.vue index f677d9b..1d42bcc 100644 --- a/src/views/config/level/Index.vue +++ b/src/views/config/level/Index.vue @@ -123,11 +123,17 @@ width="140" align="center"> import { computed, onMounted, ref, reactive, watch, nextTick } from 'vue'; -import { ElMessage } from 'element-plus'; +import { ElMessage, ElMessageBox } from 'element-plus'; import { Delete, Edit, Check, MoreFilled, Close } from '@element-plus/icons-vue'; -import { listPass, savePass, updatePass, delPass } from '@/api/config'; +import { listPass, savePass, updatePass, delPass, updateIsOpen } from '@/api/config'; import Search from '@/components/Search.vue'; import { useRouter, useRoute } from 'vue-router'; import Cookies from 'js-cookie'; @@ -266,6 +272,14 @@ const toAdd = () => { hadChange.value = 1; }; +// 禁启用回调 +const enableChange = (row: Record) => { + row.isEnable = row.isEnable ? 0 : 1; +}; +const enableSubmit = async (row: Record) => { + row.isEnable = row.isEnable ? 0 : 1; + await updateIsOpen(row.checkpointId, row.isEnable); +}; // 编辑 const edit = async (row: Record) => { if (!row.editing) { diff --git a/src/views/product/afterLoan/1033.vue b/src/views/product/afterLoan/1033.vue index 5978883..a1079de 100644 --- a/src/views/product/afterLoan/1033.vue +++ b/src/views/product/afterLoan/1033.vue @@ -27,10 +27,12 @@ - + :value="item.itemId"> + {{ item.options }} + @@ -68,12 +70,13 @@ const getConfig = async () => { automaticOutboundCall: info.value.length ? !!cur.automaticOutboundCall : false, shortMessageCollection: info.value.length ? !!cur.shortMessageCollection : false, manualCollection: info.value.length ? !!cur.manualCollection : false, - verbalTrick: +(cur.verbalTrick || 750), + verbalTrick: cur.verbalTrick ? +cur.verbalTrick : '', id: cur.id || '', stRecordId: e.id, }); }); form.value = result; + console.log('🚀 ~ getConfig ~ result:', result); }; // 详情 const getDetail = async () => { diff --git a/src/views/product/bank/Add.vue b/src/views/product/bank/Add.vue index 1005562..f1b55ed 100644 --- a/src/views/product/bank/Add.vue +++ b/src/views/product/bank/Add.vue @@ -276,7 +276,7 @@ import type { TabsPaneContext, FormInstance, FormRules } from 'element-plus'; import { findById, save, update } from '@/api/bank'; import { getProcessInformationBasedOnRoles, addOperation } from '@/api/judgment'; import { useRouter, useRoute } from 'vue-router'; -import { handleId, isIllegalNum } from '@/utils/common'; +import { handleId, isIllegalNum, getIds } from '@/utils/common'; import { getStatus } from '@/store/useProduct'; import Info from './Info.vue'; import Cookies from 'js-cookie'; @@ -422,21 +422,20 @@ const submit = async (formEl: FormInstance | undefined) => { pid: e > 22 && e < 33 ? 110 : e > 32 && e < 38 ? 111 : e, }); }); + let res; if (id.value) { param.id = id.value; param.status = 295; await update(param); addRecord(param); } else { - await save(param); + res = await save(param); addRecord(param); } - router.push({ - path: '/product/bank/detail', - query: route.query, - }); + + router.push(`/product/bank/detail?type=${route.query.type || ''}&i=${route.query.i}&role=${route.query.role}&id=${res.message}`); ElMessage.success('提交成功!'); - emit('getList', 1); + emit('getList'); } finally { } } else { diff --git a/src/views/product/bank/Approve.vue b/src/views/product/bank/Approve.vue index de91d02..67afa82 100644 --- a/src/views/product/bank/Approve.vue +++ b/src/views/product/bank/Approve.vue @@ -73,6 +73,7 @@ interface RuleForm { } const router = useRouter(); const route = useRoute(); +const id = computed(() => +route.query.id); const projectId = +Cookies.get('sand-projectId'); const levelId = +Cookies.get('sand-level'); const curTab = ref('tab1'); @@ -127,9 +128,10 @@ const submit = async (formEl: FormInstance | undefined) => { param.approvalTime = dayjs(new Date()).format('YYYY-M-D'); await examineAndApprove(param.id, param.opinionDescription, param.status, param.approvalTime); + router.push(`/product/bank/detail?type=${route.query.type || ''}&i=${route.query.i}&role=${route.query.role}&id=${id.value}`); addRecord(param); ElMessage.success('提交成功!'); - emit('getList', 1); + emit('getList'); } finally { } } diff --git a/src/views/product/bank/Config.vue b/src/views/product/bank/Config.vue index 4312b83..88f83d1 100644 --- a/src/views/product/bank/Config.vue +++ b/src/views/product/bank/Config.vue @@ -523,9 +523,9 @@ const submit = async (formEl: FormInstance | undefined) => { await riskSave(param); addRecord(param); } - + router.push(`/product/bank/detail?type=${route.query.type || ''}&i=${route.query.i}&role=${route.query.role}&id=${id.value}`); ElMessage.success('提交成功!'); - emit('getList', 1); + emit('getList'); } finally { } } else { diff --git a/src/views/product/fund/Add.vue b/src/views/product/fund/Add.vue index 14fb520..bb6715f 100644 --- a/src/views/product/fund/Add.vue +++ b/src/views/product/fund/Add.vue @@ -317,7 +317,7 @@ import { Plus, Minus } from '@element-plus/icons-vue'; import { getAListOfAShares, saveFund } from '@/api/fund'; import { getProcessInformationBasedOnRoles, addOperation } from '@/api/judgment'; import { useRouter, useRoute } from 'vue-router'; -import { handleId, isIllegalNum } from '@/utils/common'; +import { handleId, isIllegalNum, getIds } from '@/utils/common'; import Cookies from 'js-cookie'; const emit = defineEmits(['getList']); @@ -553,10 +553,11 @@ const submit = async () => { const recordParam = JSON.parse(JSON.stringify(param)); delete param.buySellRatioList0; delete param.buySellRatioList1; - await saveFund(param); + const res = await saveFund(param); + router.push(`/product/fund/detail?id=` + res.message); addRecord(recordParam); ElMessage.success('提交成功!'); - emit('getList', 1); + emit('getList'); } finally { } }; diff --git a/src/views/product/insurance/Add.vue b/src/views/product/insurance/Add.vue index a6326cc..8092250 100644 --- a/src/views/product/insurance/Add.vue +++ b/src/views/product/insurance/Add.vue @@ -117,7 +117,7 @@ import { ElMessage } from 'element-plus'; import { insuranceProductDetails, addInsuranceProducts } from '@/api/insurance'; import { getProcessInformationBasedOnRoles, addOperation } from '@/api/judgment'; import { useRouter, useRoute } from 'vue-router'; -import { handleId, isIllegalNum } from '@/utils/common'; +import { handleId, isIllegalNum, getIds } from '@/utils/common'; import Cookies from 'js-cookie'; const emit = defineEmits(['getList']); @@ -248,7 +248,8 @@ const submit = async () => { if (!param.exemptionFromLiability.length) return ElMessage.error('请至少选择一项责任免除'); param.applicationMaterial = param.applicationMaterial.join(); param.exemptionFromLiability = param.exemptionFromLiability.join(); - await addInsuranceProducts(param); + const res = await addInsuranceProducts(param); + // router.push(`/product/insurance/detail?id=` + res.message); addRecord(param); ElMessage.success('提交成功!'); emit('getList', 1); diff --git a/src/views/product/interestRate/935.vue b/src/views/product/interestRate/935.vue index 2c8cf8d..f63a33c 100644 --- a/src/views/product/interestRate/935.vue +++ b/src/views/product/interestRate/935.vue @@ -145,9 +145,9 @@ const getConfig = async () => { len.value = result.length - 1; if (info.value.length) { result.forEach((e, i) => { - result[i].score = info.value[i].score; - result[i].id = info.value[i].id; - result[i].modelId = info.value[i].modelId; + result[i].score = info.value[i]?.score; + result[i].id = info.value[i]?.id; + result[i].modelId = info.value[i]?.modelId; }); } form.value.individualInterestRateModels = result; diff --git a/src/views/product/strategy/152.vue b/src/views/product/strategy/152.vue index 8e955fd..0b19865 100644 --- a/src/views/product/strategy/152.vue +++ b/src/views/product/strategy/152.vue @@ -156,7 +156,7 @@ import { accessStrategyBusinessBlacklistFind, accessStrategyBusinessBlacklistSav import { getProcessInformationBasedOnRoles, addOperation } from '@/api/judgment'; import type { TableColumnCtx } from 'element-plus'; import { useRouter, useRoute } from 'vue-router'; -import { handleId, getNum, getSymbol, getChinese } from '@/utils/common'; +import { handleId, getNum, getSymbol, getChinese, getIds } from '@/utils/common'; import Cookies from 'js-cookie'; const router = useRouter(); diff --git a/src/views/product/strategy/153.vue b/src/views/product/strategy/153.vue index 6a8592d..d0b2add 100644 --- a/src/views/product/strategy/153.vue +++ b/src/views/product/strategy/153.vue @@ -129,7 +129,7 @@ import { accessStrategyInlineBlacklistFind, accessStrategyInlineBlacklistSave } import { getProcessInformationBasedOnRoles, addOperation } from '@/api/judgment'; import type { TableColumnCtx } from 'element-plus'; import { useRoute } from 'vue-router'; -import { handleId, getNum, getChinese } from '@/utils/common'; +import { handleId, getNum, getChinese, getIds } from '@/utils/common'; import Cookies from 'js-cookie'; const route = useRoute(); diff --git a/src/views/product/strategy/154.vue b/src/views/product/strategy/154.vue index ec2ca7b..3cb3e08 100644 --- a/src/views/product/strategy/154.vue +++ b/src/views/product/strategy/154.vue @@ -266,7 +266,7 @@ import { ElMessage } from 'element-plus'; import { accessStrategyEnterpriseBlacklistFind, accessStrategyEnterpriseBlacklistSave } from '@/api/model'; import { getProcessInformationBasedOnRoles, addOperation } from '@/api/judgment'; import { useRouter, useRoute } from 'vue-router'; -import { handleId, getNum, getSymbol, getChinese } from '@/utils/common'; +import { handleId, getNum, getSymbol, getChinese, getIds } from '@/utils/common'; import Cookies from 'js-cookie'; const router = useRouter(); diff --git a/src/views/product/strategy/155.vue b/src/views/product/strategy/155.vue index 509a614..07a2358 100644 --- a/src/views/product/strategy/155.vue +++ b/src/views/product/strategy/155.vue @@ -125,7 +125,7 @@ import { accessStrategyAntiFraudStrategyFind, accessStrategyAntiFraudStrategySav import { getProcessInformationBasedOnRoles, addOperation } from '@/api/judgment'; import type { TableColumnCtx } from 'element-plus'; import { useRouter, useRoute } from 'vue-router'; -import { handleId, getNum, getSymbol, getChinese } from '@/utils/common'; +import { handleId, getNum, getSymbol, getChinese, getIds } from '@/utils/common'; import Cookies from 'js-cookie'; const router = useRouter();