diff --git a/.env b/.env
index 783e5c0..97571e0 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.217: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/system.ts b/src/api/system.ts
index 210dba4..d8b0ff3 100644
--- a/src/api/system.ts
+++ b/src/api/system.ts
@@ -14,3 +14,5 @@ export const exportBankExperimentReport = async (data: Record): Pro
export const updateReport = async (data: Record): Promise => (await axios.post('/occupationlab/occupationlab/achievement/updateReport', data)).data;
export const editExperimentalData = async (data: Record): Promise =>
(await axios.post('/occupationlab/occupationlab/experimentalReport/editExperimentalData', data)).data;
+export const getStartTime = async (params: Record): Promise => (await axios.get('/python/python/getStartTime', { params })).data;
+export const getCurrentTime = async (params: Record): Promise => (await axios.get('/competition/competition/management/getCurrentTime', { params })).data;
diff --git a/src/components/Panel/index.vue b/src/components/Panel/index.vue
index 6ea0e58..a0c1963 100644
--- a/src/components/Panel/index.vue
+++ b/src/components/Panel/index.vue
@@ -225,7 +225,7 @@
import { ref, reactive, onMounted, inject, computed, watch } from 'vue';
import { submitOpe } from '@/api/bank';
import { deleteCache } from '@/api/judgment';
-import { pageStuAssessment, getProjectBySystemId, getProjectDetail, getDetailById, getCompetition } from '@/api/system';
+import { pageStuAssessment, getProjectBySystemId, getProjectDetail, getDetailById, getCompetition, getStartTime, getCurrentTime } from '@/api/system';
import Settings from '@/settings';
import { useRouter, useRoute } from 'vue-router';
import type { Action } from 'element-plus';
@@ -237,6 +237,7 @@ import { mavonEditor } from 'mavon-editor';
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';
const router = useRouter();
const route = useRoute();
@@ -263,7 +264,6 @@ const judgmentId = ref('');
const curReq = ref[]>([]);
const taskList = ref[]>([]);
const pannelTab = ref('first');
-const statusTimer = ref(null);
const submiting = ref(false);
const reportId = ref('');
const countVal = ref('');
@@ -293,12 +293,13 @@ if (param.token) {
Cookies.set('sand-stageId', param.stageId ?? '');
Cookies.set('sand-teamId', param.teamId ?? '');
Cookies.set('sand-mallId', param.mallId ?? '');
- Cookies.set('sand-endTime', param.endTime ?? '');
Cookies.set('sand-referrer', param.referrer ?? '');
Cookies.set('sand-className', param.className ?? '');
Cookies.set('sand-startTime', param.startTime ?? '');
Cookies.set('sand-resultsDetails', param.resultsDetails ?? '');
Cookies.set('sand-resultAnnouncementTime', param.resultAnnouncementTime ?? '');
+ Cookies.set('sand-curriculumName', param.curriculumName ?? '');
+ Cookies.set('sand-stopTime', param.stopTime ?? '');
Cookies.set('sand-admin', param.admin ?? ''); // 从中台进来的标识
Cookies.remove('sand-submit');
router.replace(route.path);
@@ -312,11 +313,12 @@ if (param.token) {
param.stageId = Cookies.get('sand-stageId');
param.teamId = Cookies.get('sand-teamId');
param.mallId = Cookies.get('sand-mallId');
- param.endTime = Cookies.get('sand-endTime');
param.className = Cookies.get('sand-className');
param.startTime = Cookies.get('sand-startTime');
param.resultsDetails = Cookies.get('sand-resultsDetails');
param.resultAnnouncementTime = Cookies.get('sand-resultAnnouncementTime');
+ param.curriculumName = Cookies.get('sand-curriculumName');
+ param.stopTime = Cookies.get('sand-stopTime');
isSubmit.value = Cookies.get('sand-submit') === 'true';
}
if (param.projectId) param.projectId = +param.projectId;
@@ -332,6 +334,23 @@ watch(
},
);
+// 获取上次实验的时间
+const getSumTime = () => {
+ return new Promise(async (resolve, reject) => {
+ const res = await getStartTime({
+ permissions: per.value,
+ projectId: param.projectId,
+ });
+ resolve(res.startTime ? new Date(res.startTime) : '');
+ });
+};
+// 获取当前时间
+const getNow = () => {
+ return new Promise(async (resolve, reject) => {
+ const res = await getCurrentTime();
+ resolve(new Date(res.currentTime));
+ });
+};
// 倒计时
const timeFormat = (num: number): string | number => {
return num < 10 ? `0${num}` : num;
@@ -370,23 +389,22 @@ const setSubmit = (val: boolean) => {
};
// 获取考核列表来查询该考核是否已经考过
const getAssList = async () => {
- const { list } = await pageStuAssessment({
- pageNum: 1,
- pageSize: 10000,
- });
- let done = false;
- // 匹配到该考核,并且已经提交过(有reportId则说明有实验记录),并且classId跟当前用户的classId相同,就提示提交了考核然后返回上一页
- if (list.find((e) => e.assessmentId == param.assessmentId && e.reportId && e.classId == param.classId)) {
- done = true;
- setSubmit(true);
- ElMessage.error('你已经提交过该考核!');
- setTimeout((_) => {
- window.history.back(); // 直接返回上一页面
- }, 1500);
- }
- statusTimer.value = setInterval((_) => {
- getAssStatus();
- }, 1000);
+ // const { list } = await pageStuAssessment({
+ // pageNum: 1,
+ // pageSize: 10000,
+ // });
+ // let done = false;
+ // // 匹配到该考核,并且已经提交过(有reportId则说明有实验记录),并且classId跟当前用户的classId相同,就提示提交了考核然后返回上一页
+ // if (list.find((e) => e.assessmentId == param.assessmentId && e.reportId && e.classId == param.classId)) {
+ // done = true;
+ // setSubmit(true);
+ // ElMessage.error('你已经提交过该考核!');
+ // setTimeout((_) => {
+ // window.history.back(); // 直接返回上一页面
+ // }, 1500);
+ // }
+ getProDetail();
+ getAssStatus();
};
// 定时查询考核状态(查到考核如果结束后,直接提交考核)
const getAssStatus = async () => {
@@ -396,7 +414,6 @@ const getAssStatus = async () => {
const done = data ? data.status === 2 : false; // 状态(0、待开始 1、进行中 2、已结束)
// 如果考核已结束,则清除查询考核状态的定时器,并且自动提交
if (done) {
- clearInterval(statusTimer.value);
// this.$alert('考核时间已到,系统已自动交卷', '提示', {
// confirmButtonText: '确定',
// });
@@ -413,18 +430,18 @@ const getCompetitionStatus = async () => {
const stages = competition.competitionStage;
if (stages) {
const stage = stages.find((e) => e.stageId == param.stageId);
- const endTime = new Date(stage.endTime).getTime();
- const now = Date.now();
+ const endTime = new Date(stage.endTime);
+ const now = await getNow();
// 如果已经结束
- if (now >= new Date(stage.endTime)) {
- clearInterval(statusTimer.value);
+ if (now >= endTime) {
// this.$alert('竞赛时间已到,系统已自动交卷', '提示', {
// confirmButtonText: '确定',
// });
submit();
} else {
- // 没结束,则显示倒计时(竞赛才需要通过定时调接口来显示倒计时,因为中台可以修改结束时间,所以需要时刻获取最新的结束时间)
- counter((endTime - now) / 1000);
+ // 没结束,则显示倒计时
+ countVal.value = (endTime - now) / 1000;
+ startCount();
}
}
}
@@ -476,8 +493,8 @@ const submit = async () => {
classId: param.classId ? param.classId : '',
className: param.className ? param.className : '',
curriculumId: param.cid,
- startTime: per.value ? param.startTime : dayjs(entryTime.value).format('YYYY-MM-DD HH:mm:ss'), // 开始时间(考核:直接从职站取考核的开始时间;练习:取页面进入的时间)
- endTime: per.value ? param.endTime : submitTime, // 结束时间(考核:直接从职站取考核的结束时间;练习:取提交时间)
+ startTime: dayjs(entryTime.value).format('YYYY-MM-DD HH:mm:ss'), // 取页面进入的时间
+ endTime: per.value ? param.stopTime : submitTime, // 结束时间(考核:直接从职站取考核的结束时间;练习:取提交时间)
submitTime, // 提交时间,即当前时间(这3个时间都是传完整的日期时间格式)
timeSum,
checkpointId: Cookies.get('sand-level') ?? '',
@@ -493,13 +510,11 @@ const submit = async () => {
mallId: param.mallId,
});
setSubmit(true);
- clearInterval(statusTimer.value);
let score = 0;
// 给判分列表添加分数和运行结果
taskList.value.map((e) => {
const item = retMap?.scoreInfo.find((n) => n.lcId === e.judgmentId);
- console.log('🚀 ~ taskList.value.map ~ item:', item);
try {
if (item) {
e.examScore = item.questionScore;
@@ -516,16 +531,12 @@ const submit = async () => {
localStorage.setItem('sand-taskList', JSON.stringify(taskList.value));
submiting.value = false;
- // 如果是竞赛,并且勾选了公布成绩详情的选项,则弹框提示
- param.competitionId &&
- param.resultsDetails == 0 &&
- ElMessageBox.alert(`提交成功${param.resultAnnouncementTime != 0 ? ',成绩将在' + param.resultAnnouncementTime + '小时后发布,请去参赛信息模块查看' : ''}`, '提示', {
+ // 非练习
+ per.value &&
+ ElMessageBox.alert(`提交成功${param.resultsDetails == 0 && param.resultAnnouncementTime != 0 ? ',成绩将在' + param.resultAnnouncementTime + '小时后发布,请去参赛信息模块查看' : ''}`, '提示', {
confirmButtonText: '确定',
callback: (action: Action) => {
- ElMessage({
- type: 'info',
- message: `action: ${action}`,
- });
+ logout();
},
});
})
@@ -563,7 +574,8 @@ const getProDetail = async () => {
text.value = isPrac ? '已用' : '剩余';
// 竞赛不需要
if (!param.competitionId && !isSubmit.value) {
- countVal.value = isPrac ? 0 : (new Date(param.endTime).getTime() - Date.now()) / 1000; // 如果是考核,取考核的结束时间减去当前时间去做倒计时,练习则直接给0做计时
+ const now = await getNow();
+ countVal.value = (isPrac ? now - entryTime.value : new Date(param.stopTime).getTime() - now) / 1000; // 如果是考核,取考核的结束时间减去当前时间去做倒计时,练习则直接取当前时间减去上次进来的时间做计时
startCount();
}
};
@@ -580,18 +592,24 @@ const getList = async () => {
if (!per.value && !param.projectId) param.projectId = projects[0]?.projectId ?? 0; // 默认取第一个项目
getProDetail();
};
+// 获取进入时间
+const getEntryTime = async () => {
+ let now = await getSumTime(); // 获取上次进入实验的时间,如果没有,说明是第一次进入,然后直接从服务器获取当前时间
+ if (!now) now = await getNow();
+ entryTime.value = now;
+};
onMounted(() => {
getLevel.value = inject('getLevel'); // 关卡页面获取关卡方法
per.value = param.assessmentId ? 1 : param.competitionId ? 2 : 0;
+
+ param.cid && getEntryTime();
+
if (param.assessmentId) {
getAssList();
} else {
param.cid && getList();
if (param.competitionId) {
- clearInterval(statusTimer);
- statusTimer.value = setInterval((_) => {
- getCompetitionStatus();
- }, 1000);
+ getCompetitionStatus();
}
}
});
diff --git a/src/layout/components/AppSidebar/index.vue b/src/layout/components/AppSidebar/index.vue
index 8802e8a..8f2f56c 100644
--- a/src/layout/components/AppSidebar/index.vue
+++ b/src/layout/components/AppSidebar/index.vue
@@ -25,6 +25,8 @@
center>
@@ -63,9 +65,10 @@ const roleName = computed(() => {
return Settings.roleIds[+route.query.role];
} else if (route.path.includes('insurance')) {
return '保险产品经理';
+ } else if (route.path.includes('fund')) {
+ return '基金产品经理';
}
});
-console.log('🚀 ~ roleName ~ roleName:', isConfig.value);
// 获取操作日期
const getDate = async () => {
if (levelId && projectId) {
@@ -78,7 +81,8 @@ const getDate = async () => {
};
// 日期提交
const submitDate = async () => {
- await saveOperationTime(levelId, projectId, dayjs(new Date(diaDate.value)).format('YYYY-M-D'));
+ await saveOperationTime(levelId, projectId, dayjs(new Date(diaDate.value)).format('YYYY-MM-DD'));
+ location.reload();
getDate();
dateVisible.value = false;
};
diff --git a/src/views/Home.vue b/src/views/Home.vue
index 87d8d57..0d5fe33 100644
--- a/src/views/Home.vue
+++ b/src/views/Home.vue
@@ -1,6 +1,6 @@
-
金融产品设计及数字化营销沙盘系统{{ projectId }}
+
金融产品设计及数字化营销沙盘系统
{
};
// 日期提交
const submitDate = async () => {
- await saveOperationTime(levelId, projectId, dayjs(new Date(diaDate.value)).format('YYYY-M-D'));
+ await saveOperationTime(levelId, projectId, dayjs(new Date(diaDate.value)).format('YYYY-MM-DD'));
getDate();
dateVisible.value = false;
};
diff --git a/src/views/config/level/Index.vue b/src/views/config/level/Index.vue
index 5d08d32..748b7de 100644
--- a/src/views/config/level/Index.vue
+++ b/src/views/config/level/Index.vue
@@ -159,7 +159,7 @@
import { computed, onMounted, ref, reactive, watch, nextTick } from 'vue';
import { ElMessage } from 'element-plus';
import { Delete, Edit, Check, MoreFilled, Close } from '@element-plus/icons-vue';
-import { listPass, savePass, updatePass } from '@/api/config';
+import { listPass, savePass, updatePass, delPass } from '@/api/config';
import Search from '@/components/Search.vue';
import { useRouter, useRoute } from 'vue-router';
import Cookies from 'js-cookie';
@@ -289,7 +289,7 @@ const handleDelete = async (rows: Record[]) => {
customsPassName: e.customsPassName,
};
});
- await updatePass(param);
+ await delPass(rows.map((e) => e.checkpointId));
getList();
ElMessage.success('删除成功!');
} catch (e) {}
diff --git a/src/views/product/afterLoan/1030.vue b/src/views/product/afterLoan/1030.vue
index 6ecd95e..5279436 100644
--- a/src/views/product/afterLoan/1030.vue
+++ b/src/views/product/afterLoan/1030.vue
@@ -150,8 +150,11 @@ const addRecord = async (data: Record) => {
rule.push(handleId(1052, '', '', preIds + ',' + e.stRecordId + ',1052', ''), handleId(1053, 282, e.checkObject, preIds + ',' + e.stRecordId + ',1053', 1));
i !== 4 && rule.push(handleId(1054, 283, e.checkTimeType, preIds + ',' + e.stRecordId + ',1054,1056', 1));
e.timeDays && rule.push(handleId(1057, 284, e.timeDays, preIds + ',' + e.stRecordId + ',1054,1057', 3));
- e.governmentData && rule.push(handleId(1058, '', '', preIds + ',' + e.stRecordId + ',1055,1058', ''));
- e.creditData && rule.push(handleId(1059, '', '', preIds + ',' + e.stRecordId + ',1055,1059', ''));
+
+ const ids = [];
+ e.governmentData && ids.push(778);
+ e.creditData && ids.push(793);
+ e.governmentData && rule.push(handleId(1055, 323, ids.join(), preIds + ',' + e.stRecordId + ',1055', 1));
});
await addOperation({
diff --git a/src/views/product/afterLoan/1033.vue b/src/views/product/afterLoan/1033.vue
index d962558..114d67a 100644
--- a/src/views/product/afterLoan/1033.vue
+++ b/src/views/product/afterLoan/1033.vue
@@ -27,7 +27,7 @@
-
@@ -85,18 +85,20 @@ const getDetail = async () => {
}
};
-const fieldKeys = ['shortMessageCollection', 'appCollection', 'automaticOutboundCall', '', 'manualCollection'];
// 新增判分记录
const addRecord = async (data: Record) => {
- console.log('🚀 ~ addRecord ~ data:', data);
const preIds = `1,${levelId},42,69,1033,1149`; // 1,关卡id,角色(这个页面是风控经理策略)
const rule = [];
data.map((e) => {
e.recordChildren.forEach((n, i) => {
- if (i !== 3) {
- console.log('🚀 ~ e.recordChildren.forEach ~ n.id:', e[fieldKeys[i]], n.id);
- e[fieldKeys[i]] && rule.push(handleId(n.id, '', '', `${preIds},${e.stRecordId},${n.id}`, ''));
+ if (i) {
+ const ids = [];
+ e.shortMessageCollection && ids.push(774);
+ e.appCollection && ids.push(775);
+ e.automaticOutboundCall && ids.push(776);
+ e.manualCollection && ids.push(777);
+ ids.length && rule.push(handleId(n.id, n.subjectId, ids.join(), `${preIds},${e.stRecordId},${n.id}`, 1));
} else {
rule.push(handleId(n.id, n.subjectId, e.verbalTrick, `${preIds},${e.stRecordId},${n.id}`, 1));
}
diff --git a/src/views/product/bank/CardList.vue b/src/views/product/bank/CardList.vue
index ff88e1d..23d897d 100644
--- a/src/views/product/bank/CardList.vue
+++ b/src/views/product/bank/CardList.vue
@@ -35,7 +35,7 @@
{{ item.productName }}
{{ item.productNumber + ' ' + item.guarantyStyle }}
{{ getStatus(item.status) }}
- 创建日期:{{ item.createTime.split(' ')[0] }}
+ 创建日期:{{ item.operationTime }}
diff --git a/src/views/product/bank/List.vue b/src/views/product/bank/List.vue
index 3f107b9..bcb3848 100644
--- a/src/views/product/bank/List.vue
+++ b/src/views/product/bank/List.vue
@@ -81,7 +81,7 @@
{{ row.loanCeiling + '万元/' + row.maximumAnnualInterestRate + '%/' + row.maximumTermOfLoan + '个月' }}
-
diff --git a/src/views/product/fund/CardList.vue b/src/views/product/fund/CardList.vue
index b42d356..3b43407 100644
--- a/src/views/product/fund/CardList.vue
+++ b/src/views/product/fund/CardList.vue
@@ -33,7 +33,7 @@
{{ item.fundName }}
{{ item.fundraisingScale }}万募集规模
买入费率{{ item.buying }},赎回费率{{ item.sale }}
-
创建日期:{{ item.createTime.split(' ')[0] }}
+
创建日期:{{ item.operationTime }}
diff --git a/src/views/product/fund/List.vue b/src/views/product/fund/List.vue
index 0336c3d..8959b38 100644
--- a/src/views/product/fund/List.vue
+++ b/src/views/product/fund/List.vue
@@ -42,7 +42,7 @@
-
diff --git a/src/views/product/insurance/CardList.vue b/src/views/product/insurance/CardList.vue
index 3d7712b..63899e9 100644
--- a/src/views/product/insurance/CardList.vue
+++ b/src/views/product/insurance/CardList.vue
@@ -35,7 +35,7 @@
class="type">{{ item.minimumAge + '-' + item.maximumAge + '周岁' }}
{{ item.insuranceCoverageConfig }}万保额
- 创建日期:{{ item.createTime.split(' ')[0] }}
+ 创建日期:{{ item.operationTime }}
diff --git a/src/views/product/insurance/List.vue b/src/views/product/insurance/List.vue
index d880237..63e1794 100644
--- a/src/views/product/insurance/List.vue
+++ b/src/views/product/insurance/List.vue
@@ -69,7 +69,7 @@
{{ row.premiumAmount?.toFixed(2) || '-' }}
-
diff --git a/src/views/product/interestRate/936.vue b/src/views/product/interestRate/936.vue
index d92c825..bd48981 100644
--- a/src/views/product/interestRate/936.vue
+++ b/src/views/product/interestRate/936.vue
@@ -16,7 +16,7 @@
-
+
@@ -24,7 +24,7 @@
:key="item"
:value="item.options" />
- {{ row.formula }}
+ =起始浮动比例+增减分值 且 不超过最高浮动比例
--
@@ -35,8 +35,8 @@
- 以上分值合计
- 以上分值合计
+
{
const list = process[0]?.recordChildren;
const result = [];
list?.forEach((e, i) => {
- const children = e.recordChildren.length > 2 ? e.recordChildren : e.recordChildren[1]?.recordChildren;
- let cur = info.value.length ? info.value[i] : {};
- let temp = {
- indexId: cur?.indexId || '',
- modelId: cur?.modelId || '',
- computationalFormula: cur?.computationalFormula || '',
- indexName: e.name,
- recordChildren: e.recordChildren || [],
- stRecordId: e.id,
- ruleId: children[0]?.id,
- standard: children[0]?.name,
- subject: children[0]?.subject,
- floatingCoefficient: cur?.corporateInterestRateModels ? (cur?.corporateInterestRateModels[0].floatingCoefficient ?? '') + '' : '',
- id: cur?.corporateInterestRateModels ? cur?.corporateInterestRateModels[0].id : '',
- };
+ if (e.recordChildren) {
+ const children = e?.recordChildren?.length > 2 ? e?.recordChildren : e?.recordChildren[1]?.recordChildren;
+ let cur = info.value.length ? info.value[i] : {};
+ let temp = {
+ indexId: cur?.indexId || '',
+ modelId: cur?.modelId || '',
+ computationalFormula: cur?.computationalFormula || '',
+ indexName: e.name,
+ recordChildren: e.recordChildren || [],
+ stRecordId: e.id,
+ ruleId: children[0]?.id,
+ standard: children[0]?.name,
+ subject: children[0]?.subject,
+ floatingCoefficient: cur?.corporateInterestRateModels ? (cur?.corporateInterestRateModels[0].floatingCoefficient ?? '') + '' : '',
+ id: cur?.corporateInterestRateModels ? cur?.corporateInterestRateModels[0].id : '',
+ };
- result.push(temp);
- children.forEach((n, j) => {
- if (j) {
- cur = info.value.length ? info.value[i].corporateInterestRateModels[j] : {};
- temp = JSON.parse(JSON.stringify(temp));
- temp.standard = n.name;
- temp.subject = n.subject;
- temp.ruleId = n.id;
- temp.floatingCoefficient = (cur?.floatingCoefficient ?? '') + '';
- temp.id = cur?.id ?? '';
- temp.rule = 1;
- result.push(temp);
- }
- });
+ result.push(temp);
+ children.forEach((n, j) => {
+ if (j) {
+ cur = info.value.length ? info.value[i].corporateInterestRateModels[j] : {};
+ temp = JSON.parse(JSON.stringify(temp));
+ temp.standard = n.name;
+ temp.subject = n.subject;
+ temp.ruleId = n.id;
+ temp.floatingCoefficient = (cur?.floatingCoefficient ?? '') + '';
+ temp.id = cur?.id ?? '';
+ temp.rule = 1;
+ result.push(temp);
+ }
+ });
+ } else {
+ result.push({
+ stRecordId: e.id,
+ subject: e.subject,
+ indexId: info.value[i]?.indexId || '',
+ modelId: info.value[i]?.modelId || '',
+ indexName: e.name,
+ floatingCoefficient: '',
+ id: info.value[i]?.corporateInterestRateModels[info.value[i]?.corporateInterestRateModels?.length - 1]?.id || '',
+ floatingCoefficient: info.value[i]?.corporateInterestRateModels[info.value[i]?.corporateInterestRateModels?.length - 1]?.floatingCoefficient ?? '',
+ });
+ }
});
- result.push(
- {
- indexId: info.value[10]?.indexId || '',
- modelId: info.value[10]?.modelId || '',
- indexName: '建议浮动比例',
- formula: ' =起始浮动比例+增减分值 且 不超过最高浮动比例',
- floatingCoefficient: '',
- },
- {
- indexId: info.value[11]?.indexId || '',
- modelId: info.value[11]?.modelId || '',
- indexName: '最低浮动比例',
- formula: '--',
- id: info.value[11]?.corporateInterestRateModels[info.value[11]?.corporateInterestRateModels?.length - 1]?.id || '',
- floatingCoefficient: info.value[11]?.corporateInterestRateModels[info.value[11]?.corporateInterestRateModels?.length - 1]?.floatingCoefficient ?? '',
- },
- {
- indexId: info.value[12]?.indexId || '',
- modelId: info.value[12]?.modelId || '',
- indexName: '最高浮动比例',
- formula: '--',
- id: info.value[12]?.corporateInterestRateModels[info.value[12]?.corporateInterestRateModels?.length - 1]?.id || '',
- floatingCoefficient: info.value[12]?.corporateInterestRateModels[info.value[12]?.corporateInterestRateModels?.length - 1]?.floatingCoefficient ?? '',
- },
- );
+ // result.push(
+ // {
+ // indexId: info.value[10]?.indexId || '',
+ // modelId: info.value[10]?.modelId || '',
+ // indexName: '建议浮动比例',
+ // formula: ' =起始浮动比例+增减分值 且 不超过最高浮动比例',
+ // floatingCoefficient: '',
+ // },
+ // {
+ // indexId: info.value[11]?.indexId || '',
+ // modelId: info.value[11]?.modelId || '',
+ // indexName: '最低浮动比例',
+ // formula: '--',
+ // id: info.value[11]?.corporateInterestRateModels[info.value[11]?.corporateInterestRateModels?.length - 1]?.id || '',
+ // floatingCoefficient: info.value[11]?.corporateInterestRateModels[info.value[11]?.corporateInterestRateModels?.length - 1]?.floatingCoefficient ?? '',
+ // },
+ // {
+ // indexId: info.value[12]?.indexId || '',
+ // modelId: info.value[12]?.modelId || '',
+ // indexName: '最高浮动比例',
+ // formula: '--',
+ // id: info.value[12]?.corporateInterestRateModels[info.value[12]?.corporateInterestRateModels?.length - 1]?.id || '',
+ // floatingCoefficient: info.value[12]?.corporateInterestRateModels[info.value[12]?.corporateInterestRateModels?.length - 1]?.floatingCoefficient ?? '',
+ // },
+ // );
form.value.corporateInterestRateModelIndicators = result;
+ console.log('🚀 ~ getConfig ~ result:', result);
loading.close();
};
// 详情
@@ -211,9 +225,9 @@ interface SpanMethodProps {
rowIndex: number;
columnIndex: number;
}
-const rowMerge1 = [0, 16];
-const rowMerge2 = [11, 20, 25, 30, 35, 40];
-const rowMerge3 = [51, 52, 53];
+const rowMerge1 = [0, 15];
+const rowMerge2 = [10, 19, 24, 29, 34, 39];
+const rowMerge3 = [50, 51, 52];
// 表格合并
const span = ({ row, column, rowIndex, columnIndex }: SpanMethodProps) => {
if (!columnIndex || columnIndex === 1) {
@@ -241,10 +255,10 @@ const span = ({ row, column, rowIndex, columnIndex }: SpanMethodProps) => {
}
} else if (rowIndex === 4) {
return {
- rowspan: 7,
+ rowspan: 6,
colspan: 1,
};
- } else if (rowIndex === 45) {
+ } else if (rowIndex === 44) {
return {
rowspan: 6,
colspan: 1,
@@ -300,6 +314,11 @@ const addRecord = async (data: Record) => {
1,
),
);
+
+ // 最后两行另外处理
+ if (i === 51 || i === 52) {
+ rule.push(handleId(e.stRecordId, e.subject.subjectId, e.floatingCoefficient, `${listIds},${e.stRecordId}`, 3));
+ }
});
data.finalFloatingRatioEqual && rule.push(handleId(1024, 279, getItemId(data.finalFloatingRatioEqual), preIds + ',1023,1024', 1));
diff --git a/src/views/product/strategy/150.vue b/src/views/product/strategy/150.vue
index 0bfe480..9663fb6 100644
--- a/src/views/product/strategy/150.vue
+++ b/src/views/product/strategy/150.vue
@@ -8,13 +8,12 @@
:span-method="span"
border>
@@ -75,42 +74,47 @@
-
+ checkRow(e, row)">
-
+ checkRow(e, row)">
-
+ checkRow(e, row)">
-
+ checkRow(e, row)">
-
+ checkRow(e, row)">
{
}
}
};
+const checkRow = (e: boolean, row: Record) => {
+ if (e) row.hitAccess = false;
+};
const checkNone = (row: Record) => {
if (row.hitAccess) {
row.corporateMajorityHitRejected = false;
diff --git a/src/views/product/strategy/151.vue b/src/views/product/strategy/151.vue
index 53e5b8b..65939b4 100644
--- a/src/views/product/strategy/151.vue
+++ b/src/views/product/strategy/151.vue
@@ -216,7 +216,6 @@ const addRecord = async (data: Record) => {
if (e.stRecordId != 204 && e.stRecordId != 230 && e.stRecordId != 231) {
const len = e?.recordChildren?.length - 1;
e?.recordChildren.map((n, j) => {
- console.log('🚀 ~ e?.recordChildren.map ~ n:', n);
j !== len && rule.push(handleId(n.id, n.subjectId, j ? e.ruleTwo : e.ruleOne, preIds + ',' + e.stRecordId + ',' + n.id, 5));
});
}
diff --git a/src/views/product/strategy/Credit.vue b/src/views/product/strategy/Credit.vue
index 540fe4c..e152c26 100644
--- a/src/views/product/strategy/Credit.vue
+++ b/src/views/product/strategy/Credit.vue
@@ -43,6 +43,7 @@
label="计算公式">
{{ row.remark }}
+ 年末正常类贷款,占全部贷款余额比重
{{ row?.recordChildren[2]?.recordChildren[0]?.recordChildren[0]?.name.replace('分', '') }}
- 每降1%扣
-
@@ -248,6 +249,7 @@ const getConfig = async () => {
let temp = {
answerId1: e.id,
answerId2: n.id,
+ innerId: n?.recordChildren[1]?.id,
id: '',
dimensionId: '',
name: e.name,
@@ -268,6 +270,7 @@ const getConfig = async () => {
n?.recordChildren.forEach((m, o) => {
if (o > 1) {
temp = JSON.parse(JSON.stringify(temp));
+ temp.innerId = m.id;
temp.parent = i;
temp.index = m.name;
temp.subject = m.subject;
@@ -607,6 +610,7 @@ const getConfig = async () => {
result1[51].score = detail.value[37]?.dimensionIndexList[0]?.score;
}
list1.value = result1;
+ console.log('🚀 ~ getConfig ~ result1:', result1);
loading.close();
};
// 详情
@@ -838,7 +842,7 @@ const submit = async () => {
}
});
}
-
+ console.log(333, list1.value);
// debugger;
await saveCredit({
...form,
@@ -866,9 +870,16 @@ const addRecord = async () => {
}
// 分值(同上)
if (isSelect(e.answerId1)) {
+ console.log('🚀 ~ list1.value.forEach ~ answerId1:', e.score, e);
e.score &&
lcRule.push(
- handleId(e.answerId2, e?.subject?.subjectId, e?.subject?.itemList?.find((n) => n.options == e.score)?.itemId || '', `${preIds},${e.answerId1},${e.answerId2}`, 1),
+ handleId(
+ e.answerId2,
+ e?.subject?.subjectId,
+ e?.subject?.itemList?.find((n) => n.options == e.score)?.itemId || '',
+ `${preIds},${e.answerId1},${e.answerId2},${e.innerId}`,
+ 1,
+ ),
);
} else if (e.recordChildren) {
// 计算公式