yujialong 10 months ago
parent 7d810cb052
commit 600a26894f
  1. 4
      .env
  2. 2
      src/api/system.ts
  3. 108
      src/components/Panel/index.vue
  4. 8
      src/layout/components/AppSidebar/index.vue
  5. 2
      src/views/Home.vue
  6. 2
      src/views/Role.vue
  7. 4
      src/views/config/level/Index.vue
  8. 7
      src/views/product/afterLoan/1030.vue
  9. 14
      src/views/product/afterLoan/1033.vue
  10. 2
      src/views/product/bank/CardList.vue
  11. 2
      src/views/product/bank/List.vue
  12. 2
      src/views/product/fund/CardList.vue
  13. 2
      src/views/product/fund/List.vue
  14. 2
      src/views/product/insurance/CardList.vue
  15. 2
      src/views/product/insurance/List.vue
  16. 145
      src/views/product/interestRate/936.vue
  17. 35
      src/views/product/strategy/150.vue
  18. 1
      src/views/product/strategy/151.vue
  19. 19
      src/views/product/strategy/Credit.vue

@ -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

@ -14,3 +14,5 @@ export const exportBankExperimentReport = async (data: Record<string, any>): Pro
export const updateReport = async (data: Record<string, any>): Promise<any> => (await axios.post('/occupationlab/occupationlab/achievement/updateReport', data)).data;
export const editExperimentalData = async (data: Record<string, any>): Promise<any> =>
(await axios.post('/occupationlab/occupationlab/experimentalReport/editExperimentalData', data)).data;
export const getStartTime = async (params: Record<string, any>): Promise<any> => (await axios.get('/python/python/getStartTime', { params })).data;
export const getCurrentTime = async (params: Record<string, any>): Promise<any> => (await axios.get('/competition/competition/management/getCurrentTime', { params })).data;

@ -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<string | number>('');
const curReq = ref<Record<string, any>[]>([]);
const taskList = ref<Record<string, any>[]>([]);
const pannelTab = ref<string>('first');
const statusTimer = ref<any>(null);
const submiting = ref<boolean>(false);
const reportId = ref<string | number>('');
const countVal = ref<any>('');
@ -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;
// reportIdclassIdclassId
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;
// // reportIdclassIdclassId
// 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();
}
}
});

@ -25,6 +25,8 @@
center>
<div class="text-center">
<el-date-picker v-model="diaDate"
format="YYYY/MM/DD"
value-format="YYYY-MM-DD"
type="date" />
</div>
<template #footer>
@ -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;
};

@ -1,6 +1,6 @@
<template>
<div class="flex justify-between items-center h-[64px] px-5 bg-white">
<h1>金融产品设计及数字化营销沙盘系统{{ projectId }}</h1>
<h1>金融产品设计及数字化营销沙盘系统</h1>
<div class="inline-flex items-center">
<el-tooltip effect="light"
content="退出实训"

@ -245,7 +245,7 @@ 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'));
getDate();
dateVisible.value = false;
};

@ -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<string, any>[]) => {
customsPassName: e.customsPassName,
};
});
await updatePass(param);
await delPass(rows.map((e) => e.checkpointId));
getList();
ElMessage.success('删除成功!');
} catch (e) {}

@ -150,8 +150,11 @@ const addRecord = async (data: Record<string, any>) => {
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({

@ -27,7 +27,7 @@
<el-select v-if="row.recordChildren"
class="w-full"
v-model="row.verbalTrick">
<el-option v-for="item in row?.recordChildren[3].subject.itemList"
<el-option v-for="item in row?.recordChildren[0].subject.itemList"
:key="item"
:label="item.options"
:value="item.itemId" />
@ -85,18 +85,20 @@ const getDetail = async () => {
}
};
const fieldKeys = ['shortMessageCollection', 'appCollection', 'automaticOutboundCall', '', 'manualCollection'];
//
const addRecord = async (data: Record<string, any>) => {
console.log('🚀 ~ addRecord ~ data:', data);
const preIds = `1,${levelId},42,69,1033,1149`; // 1id
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));
}

@ -35,7 +35,7 @@
<h6>{{ item.productName }}</h6>
<p class="type">{{ item.productNumber + ' ' + item.guarantyStyle }}</p>
<p class="status">{{ getStatus(item.status) }}</p>
<p class="meta">创建日期{{ item.createTime.split(' ')[0] }}</p>
<p class="meta">创建日期{{ item.operationTime }}</p>
</li>
</ul>
</div>

@ -81,7 +81,7 @@
{{ row.loanCeiling + '万元/' + row.maximumAnnualInterestRate + '%/' + row.maximumTermOfLoan + '个月' }}
</template>
</el-table-column>
<el-table-column prop="createTime"
<el-table-column prop="operationTime"
label="创建日期"
sortable="custom"
min-width="80"></el-table-column>

@ -33,7 +33,7 @@
<h6>{{ item.fundName }}</h6>
<p class="type">{{ item.fundraisingScale }}万募集规模</p>
<p class="type">买入费率{{ item.buying }}赎回费率{{ item.sale }}</p>
<p class="meta">创建日期{{ item.createTime.split(' ')[0] }}</p>
<p class="meta">创建日期{{ item.operationTime }}</p>
</li>
</ul>
</div>

@ -42,7 +42,7 @@
<el-table-column prop="sale"
label="赎回费率"
min-width="120"></el-table-column>
<el-table-column prop="createTime"
<el-table-column prop="operationTime"
label="创建日期"
width="180"
sortable="custom"></el-table-column>

@ -35,7 +35,7 @@
class="type">{{ item.minimumAge + '-' + item.maximumAge + '周岁' }}</p>
<p v-if="item.insuranceCoverageConfig"
class="type">{{ item.insuranceCoverageConfig }}万保额</p>
<p class="meta">创建日期{{ item.createTime.split(' ')[0] }}</p>
<p class="meta">创建日期{{ item.operationTime }}</p>
</li>
</ul>
</div>

@ -69,7 +69,7 @@
{{ row.premiumAmount?.toFixed(2) || '-' }}
</template>
</el-table-column>
<el-table-column prop="createTime"
<el-table-column prop="operationTime"
label="创建日期"
width="180"
sortable="custom"></el-table-column>

@ -16,7 +16,7 @@
<el-table-column label="计算公式"
min-width="100"
align="center">
<template #default="{ row }">
<template #default="{ row, $index }">
<el-select v-if="row.recordChildren && row?.recordChildren?.length < 3"
class="w-full"
v-model="row.computationalFormula">
@ -24,7 +24,7 @@
:key="item"
:value="item.options" />
</el-select>
<span v-else-if="!row.stRecordId">{{ row.formula }}</span>
<span v-else-if="$index === 50"> =起始浮动比例+增减分值 不超过最高浮动比例</span>
<span v-else>--</span>
</template>
</el-table-column>
@ -35,8 +35,8 @@
<el-table-column label="浮动系数"
min-width="150">
<template #default="{ row, $index }">
<span v-if="$index === 51">以上分值合计</span>
<el-input v-else-if="$index === 52 || $index === 53"
<span v-if="$index === 50">以上分值合计</span>
<el-input v-else-if="$index === 51 || $index === 52"
placeholder="请输入"
v-model="row.floatingCoefficient"></el-input>
<el-select v-else-if="row.subject"
@ -129,63 +129,77 @@ const getConfig = async () => {
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<string, any>) => {
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));

@ -8,13 +8,12 @@
:span-method="span"
border>
<el-table-column prop="name"
fixed
label="指标"
width="150"
min-width="100"
align="center">
</el-table-column>
<el-table-column label="规则"
width="350"
min-width="350"
align="center">
<template #default="{ row }">
<!-- 大病报销 || 贫困户 -->
@ -75,42 +74,47 @@
</template>
</el-table-column>
<el-table-column label="本人命中进黑名单"
width="150"
min-width="120"
align="center">
<template #default="{ row }">
<el-checkbox v-model="row.personalHitBlacklist"></el-checkbox>
<el-checkbox v-model="row.personalHitBlacklist"
@change="e => checkRow(e, row)"></el-checkbox>
</template>
</el-table-column>
<el-table-column label="配偶命中拒入"
width="150"
min-width="120"
align="center">
<template #default="{ row }">
<el-checkbox v-model="row.mateHitRejected"></el-checkbox>
<el-checkbox v-model="row.mateHitRejected"
@change="e => checkRow(e, row)"></el-checkbox>
</template>
</el-table-column>
<el-table-column label="父母/子女命中拒入"
width="150"
min-width="120"
align="center">
<template #default="{ row }">
<el-checkbox v-model="row.parentsHitRejected"></el-checkbox>
<el-checkbox v-model="row.parentsHitRejected"
@change="e => checkRow(e, row)"></el-checkbox>
</template>
</el-table-column>
<el-table-column label="其他家庭成员命中拒入"
width="170"
min-width="120"
align="center">
<template #default="{ row }">
<el-checkbox v-model="row.otherFamilyMembersHitRejected"></el-checkbox>
<el-checkbox v-model="row.otherFamilyMembersHitRejected"
@change="e => checkRow(e, row)"></el-checkbox>
</template>
</el-table-column>
<el-table-column label="企业大股东命中拒入"
width="160"
min-width="120"
align="center">
<template #default="{ row }">
<el-checkbox v-model="row.corporateMajorityHitRejected"></el-checkbox>
<el-checkbox v-model="row.corporateMajorityHitRejected"
@change="e => checkRow(e, row)"></el-checkbox>
</template>
</el-table-column>
<el-table-column label="本人及亲属企业命中准入"
width="180"
min-width="120"
align="center">
<template #default="{ row }">
<el-checkbox v-model="row.hitAccess"
@ -249,6 +253,9 @@ const span = ({ row, column, rowIndex, columnIndex }: SpanMethodProps) => {
}
}
};
const checkRow = (e: boolean, row: Record<string, any>) => {
if (e) row.hitAccess = false;
};
const checkNone = (row: Record<string, any>) => {
if (row.hitAccess) {
row.corporateMajorityHitRejected = false;

@ -216,7 +216,6 @@ const addRecord = async (data: Record<string, any>) => {
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));
});
}

@ -43,6 +43,7 @@
label="计算公式">
<template #default="{ row }">
<span v-if="isSelect(row.answerId1)">{{ row.remark }}</span>
<span v-else-if="row.answerId2 === 643">年末正常类贷款占全部贷款余额比重</span>
<el-select v-else-if="row.recordChildren"
v-model="row.calculationFormula">
<el-option v-for="item in row?.recordChildren[1]?.subject?.itemList"
@ -78,7 +79,7 @@
<span v-else-if="(row.answerId1 === 590 || row.answerId1 === 591 || row.answerId1 === 592) && row.recordChildren"
class="whitespace-nowrap">{{ row?.recordChildren[2]?.recordChildren[0]?.recordChildren[0]?.name.replace('分', '') }}</span>
<span v-else-if="row.answerId1 === 595"
<span v-else-if="row.answerId1 === 595 || row.answerId1 === 593"
class="whitespace-nowrap">每降1%</span>
<div class="w-[100px] mx-2">
<el-select v-if="row.recordChildren"
@ -104,7 +105,7 @@
<el-select v-if="row.recordChildren"
placeholder=""
v-model="row.percentage">
<el-option v-for="item in row.answerId2 === 669 || row.answerId2 === 671 ? row?.recordChildren[2]?.recordChildren[0]?.recordChildren[0]?.subject?.itemList : row?.recordChildren[2]?.recordChildren[0]?.recordChildren[1]?.subject?.itemList"
<el-option v-for="item in row.answerId2 === 669 || row.answerId2 === 671 ? row?.recordChildren[2]?.recordChildren[0]?.recordChildren[1]?.subject?.itemList : row?.recordChildren[2]?.recordChildren[0]?.recordChildren[1]?.subject?.itemList"
:key="item"
:value="item.options" />
</el-select>
@ -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) {
//

Loading…
Cancel
Save