diff --git a/.env b/.env index 783e5c0..0c43f01 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://121.37.12.51 +VITE_BASE_API=http://192.168.31.51:9000 +# VITE_BASE_API=http://121.37.12.51 VITE_I18N_LOCALE=zh-cn VITE_I18N_FALLBACK_LOCALE=zh-cn diff --git a/src/api/model.ts b/src/api/model.ts index 8f25ead..bba6cb6 100644 --- a/src/api/model.ts +++ b/src/api/model.ts @@ -45,12 +45,12 @@ export const detailRick = async (data: Record): Promise => (await axios.post(`/product/riskDegreeStrategy/details?checkpointId=${data.checkpointId}&projectId=${data.projectId}&type=${data.type}`)).data; export const saveRick = async (data: Record): Promise => (await axios.post(`/product/riskDegreeStrategy/saveOrUpdate`, data)).data; -export const businessInterestRateDetails = async (data: Record): Promise => - (await axios.post(`/product/interestRateModel/businessInterestRateDetails?checkpointId=${data.checkpointId}&projectId=${data.projectId}`)).data; +export const businessInterestRateDetails = async (checkpointId: number, projectId: number): Promise => + (await axios.post(`/product/interestRateModel/businessInterestRateDetails?checkpointId=${checkpointId}&projectId=${projectId}`)).data; export const businessInterestRateSaveOrUpdate = async (data: Record): Promise => (await axios.post(`/product/interestRateModel/businessInterestRateSaveOrUpdate`, data)).data; -export const personalInterestRateDetails = async (data: Record): Promise => - (await axios.post(`/product/interestRateModel/personalInterestRateDetails?checkpointId=${data.checkpointId}&projectId=${data.projectId}`)).data; +export const personalInterestRateDetails = async (checkpointId: number, projectId: number): Promise => + (await axios.post(`/product/interestRateModel/personalInterestRateDetails?checkpointId=${checkpointId}&projectId=${projectId}`)).data; export const personalInterestRateSaveOrUpdate = async (data: Record): Promise => (await axios.post(`/product/interestRateModel/personalInterestRateSaveOrUpdate`, data)).data; diff --git a/src/styles/index.scss b/src/styles/index.scss index cc47c08..aab7a16 100644 --- a/src/styles/index.scss +++ b/src/styles/index.scss @@ -101,5 +101,9 @@ body { .icon { @apply mr-[8px]; } + &.not-allow { + background: none; + @apply cursor-not-allowed bg-[#b1b1b1]; + } } } diff --git a/src/views/config/level/Index.vue b/src/views/config/level/Index.vue index e6565cb..16b5945 100644 --- a/src/views/config/level/Index.vue +++ b/src/views/config/level/Index.vue @@ -19,9 +19,10 @@ class="icon" />
-
保存 @@ -163,7 +165,7 @@ const router = useRouter(); const route = useRoute(); const projectId = +Cookies.get('sand-projectId'); const levelId = +Cookies.get('sand-level'); -const height = window.innerHeight - 270; +const hadChange = ref(0); const delTitle: string = '删除关卡后,这个关卡的数据将被删除,确定删除吗?'; const params = reactive({ platformId: 3, @@ -221,11 +223,12 @@ const save = async () => { }); await updatePass(param); // 新增 - const addList = list.value.filter((e) => !e.checkpointId); + const addList = list.value.filter((e) => !e.checkpointId && e.customsPassName); await savePass(addList); getList(); ElMessage.success('保存成功!'); saveLoading.value = false; + hadChange.value = 0; }; // 输入序号排序 const submitSerial = (row: Record, oldIndex: number, newIndex: number) => { @@ -233,6 +236,7 @@ const submitSerial = (row: Record, oldIndex: number, newIndex: numb const temp = list.value.splice(oldIndex, 1); row.serialNumber = newIndex; list.value.splice(newIndex - 1, 0, temp[0]); + hadChange.value = 1; } }; // 多选 diff --git a/src/views/product/interestRate/772.vue b/src/views/product/interestRate/772.vue index 89167e0..f137ddf 100644 --- a/src/views/product/interestRate/772.vue +++ b/src/views/product/interestRate/772.vue @@ -240,18 +240,7 @@ const span = ({ row, column, rowIndex, columnIndex }: SpanMethodProps) => { } } }; -// 提交 -const submit = async () => { - let param = JSON.parse(JSON.stringify(form.value)); - param?.individualCreditModels.forEach((e, i) => { - delete e.recordChildren; - delete e.subject; - }); - await personalCreditModelSaveOrUpdate(param); - addRecord(param); - getDetail(); - ElMessage.success('提交成功!'); -}; + const getItemId = (name: string): number | string => { if (!name) return ''; return formProcess.value[0]?.recordChildren[0]?.subject?.itemList.find((e) => e.options === name)?.itemId; @@ -289,6 +278,18 @@ const addRecord = async (data: Record) => { projectId, }); }; +// 提交 +const submit = async () => { + const param = JSON.parse(JSON.stringify(form.value)); + param?.individualCreditModels.forEach((e, i) => { + delete e.recordChildren; + delete e.subject; + }); + await personalCreditModelSaveOrUpdate(param); + addRecord(param); + getDetail(); + ElMessage.success('提交成功!'); +}; diff --git a/src/views/product/interestRate/936.vue b/src/views/product/interestRate/936.vue new file mode 100644 index 0000000..7aa3efa --- /dev/null +++ b/src/views/product/interestRate/936.vue @@ -0,0 +1,306 @@ + + + + + diff --git a/src/views/product/interestRate/CardList.vue b/src/views/product/interestRate/CardList.vue index 51886b4..25884b5 100644 --- a/src/views/product/interestRate/CardList.vue +++ b/src/views/product/interestRate/CardList.vue @@ -25,24 +25,23 @@ - +
@@ -52,26 +51,24 @@ import { computed, onMounted, ref } from 'vue'; import type { TabsPaneContext } from 'element-plus'; import { getProcessInformationBasedOnRoles } from '@/api/judgment'; -import { delCredit, listCredit } from '@/api/model'; import { useRouter, useRoute } from 'vue-router'; -import { ElMessage } from 'element-plus'; import Cookies from 'js-cookie'; import Com1 from './772.vue'; import Com2 from './773.vue'; +import Com3 from './935.vue'; +import Com4 from './936.vue'; const router = useRouter(); const route = useRoute(); const projectId = +Cookies.get('sand-projectId'); const levelId = +Cookies.get('sand-level'); -const curTab = computed(() => route.params.action); +const curTab = ref(route.params.action); const list = ref>>([]); -const list1 = ref>>([]); const id = computed(() => +route.query.id); -const creditId = computed(() => +route.query.creditId); // 切换 -const switchProduct = (id: number) => { - router.push(`/product/interestRate/${route.params.action}?&i=3&role=42&id=${id}`); +const switchProduct = (productId: number | string) => { + router.push(`/product/interestRate/${route.params.action}?i=3&role=42&id=${productId}`); }; // 列表 const getList = async (refresh?: number) => { @@ -86,6 +83,7 @@ onMounted(() => { // tab切换回调 const tabChange = (tab: TabsPaneContext, event: Event) => { + router.push(`/product/interestRate/${curTab.value}?i=3&role=42`); getList(); };