8个策略添加是跟否单选

master
yujialong 7 months ago
parent 9a0868d8c9
commit 058dbd96f6
  1. 29
      src/layout/components/AppSidebar/Menu.vue
  2. 24
      src/store/useProduct.ts
  3. 11
      src/utils/common.ts
  4. 15
      src/views/product/afterLoan/1030/Detail.vue
  5. 45
      src/views/product/afterLoan/1031/Detail.vue
  6. 24
      src/views/product/afterLoan/1032/Detail.vue
  7. 40
      src/views/product/afterLoan/1033/Detail.vue
  8. 1
      src/views/product/bank/Add.vue
  9. 99
      src/views/product/strategy/150/Detail.vue
  10. 83
      src/views/product/strategy/156/Detail.vue
  11. 19
      src/views/product/strategy/512/Detail.vue
  12. 158
      src/views/product/strategy/513/Detail.vue

@ -2,7 +2,7 @@
<ul class="switch px-7 lg:px-2">
<!-- 产品经理 -->
<template v-if="role == 41">
<el-badge :value="num1">
<el-badge :value="productState.stat1">
<li :class="{ active: active == 1 }"
@click="toPage('/product/bank?type=0&i=1&role=41')">
<img class="icon"
@ -14,7 +14,7 @@
<p class="text">个人产品</p>
</li>
</el-badge>
<el-badge :value="num2">
<el-badge :value="productState.stat2">
<li :class="{ active: active == 2 }"
@click="toPage('/product/bank?type=1&i=2&role=41')">
<img class="icon"
@ -29,7 +29,7 @@
</template>
<!-- 风控经理 -->
<template v-else-if="role == 42">
<el-badge :value="num1">
<el-badge :value="productState.stat1">
<li :class="{ active: active == 1 }"
@click="toPage('/product/bank?type=&i=1&role=42')">
<img class="icon"
@ -74,7 +74,7 @@
</template>
<!-- 专家委员会 -->
<el-badge v-else-if="role == 43"
:value="num1">
:value="productState.stat1">
<li class="active">
<img class="icon-1"
src="@/assets/images/icon7-1.png"
@ -130,37 +130,18 @@
import { onMounted, computed, ref } from 'vue';
import { useRouter, useRoute } from 'vue-router';
import Cookies from 'js-cookie';
import { statistics } from '@/api/bank';
import { productState, getStat } from '@/store/useProduct';
const router = useRouter();
const route = useRoute();
const active = computed(() => route.query.i);
const role = computed(() => route.query.role);
const projectId = +Cookies.get('sand-projectId');
const levelId = +Cookies.get('sand-level');
const isAdmin = ref<number | string>(route.query.admin ?? Cookies.get('sand-admin')); //
const num1 = ref<number | string>('');
const num2 = ref<number>(0);
//
const toPage = (path: string) => {
router.push(path);
};
//
const getStat = async (status?: number, type?: number) => {
const { data } = await statistics({
checkpointId: levelId,
projectId,
status,
productType: type,
});
if (type === 1) {
// -
num2.value = data || '';
} else {
num1.value = data || '';
}
};
onMounted(() => {
const status = role.value === '41' ? 299 : role.value === '42' ? 295 : role.value === '43' ? 296 : ''; // (1- 2-3-4-5-

@ -1,7 +1,11 @@
import { reactive, readonly } from 'vue';
import { statistics } from '@/api/bank';
import Cookies from 'js-cookie';
export interface Product {
status?: Record<string, any>;
stat1?: number | string;
stat2?: number | string;
}
const state = reactive<Product>({
@ -32,9 +36,12 @@ const state = reactive<Product>({
name: '审批打回',
},
],
// 左侧菜单项的右上角badge统计
stat1: '',
stat2: '',
});
export const productState = readonly(state);
export const productState = state;
// 专家委员会产品进度(去除配置风控)
export const getExpertStatus = (): Record<string, any>[] => {
const newStatus = JSON.parse(JSON.stringify(state.status));
@ -45,3 +52,18 @@ export const getExpertStatus = (): Record<string, any>[] => {
export const getStatus = (id: number | string): string => {
return state.status.find((e) => e.id === id)?.name;
};
// 获取产品数量
export const getStat = async (status?: number, type?: number): Promise<void> => {
const { data } = await statistics({
checkpointId: Cookies.get('sand-level'),
projectId: Cookies.get('sand-projectId'),
status,
productType: type,
});
if (type === 1) {
// 产品经理-企业
state.stat2 = data || '';
} else {
state.stat1 = data || '';
}
};

@ -273,3 +273,14 @@ export const whethers = [
name: '不启用',
},
];
export const opt1 = [
{
id: 345,
name: '是',
},
{
id: 346,
name: '否',
},
];

@ -19,10 +19,14 @@
border>
<el-table-column prop="name"
label="选用"
width="100"
width="130"
align="center">
<template #default="{ row }">
<el-checkbox v-model="row.isChoose"></el-checkbox>
<el-radio-group v-model="row.isChoose">
<el-radio v-for="(item, i) in opt1"
:key="i"
:label="item.id">{{ item.name }}</el-radio>
</el-radio-group>
</template>
</el-table-column>
<el-table-column prop="recordName"
@ -93,7 +97,7 @@ import { ElMessage } from 'element-plus';
import { postLoanInspectionDetails, postLoanInspectionSave, isTheStrategyRelatedToTheProduct } from '@/api/model';
import { getProcessInformationBasedOnRoles, addOperation } from '@/api/judgment';
import type { TableColumnCtx } from 'element-plus';
import { handleId, getIds } from '@/utils/common';
import { handleId, getIds, opt1 } from '@/utils/common';
import Cookies from 'js-cookie';
const Confirm = defineAsyncComponent(() => import('@/components/StrategyConfirm.vue'));
@ -124,7 +128,7 @@ const getConfig = async () => {
checkTimeType: +cur.checkTimeType || '',
creditData: info.value.length ? !!cur.creditData : false,
governmentData: info.value.length ? !!cur.governmentData : false,
isChoose: info.value.length ? !!cur.isChoose : false,
isChoose: info.value.length ? cur.isChoose : '',
timeDays: cur.timeDays || '',
id: cur.id || '',
stRecordId: e.id,
@ -178,7 +182,7 @@ const addRecord = async (data: Record<string, any>) => {
const rule = [];
data.forEach((e, i) => {
e.isChoose && rule.push(handleId(1052, '', '', preIds + ',' + e.stRecordId + ',1052', ''));
e.isChoose && rule.push(handleId(1052, 140, e.isChoose, `${preIds},${e.stRecordId},1052`, 1));
e.checkObject && rule.push(handleId(1053, 282, e.checkObject, preIds + ',' + e.stRecordId + ',1053', 1));
i !== 4 && e.checkTimeType && 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));
@ -207,7 +211,6 @@ const submit = async (synchronizeUpdate?: number) => {
param.map((e, i) => {
e.creditData = +e.creditData;
e.governmentData = +e.governmentData;
e.isChoose = +e.isChoose;
});
const recordParam = JSON.parse(JSON.stringify(param));
param.map((e) => {

@ -18,6 +18,20 @@
:span-method="span"
:cell-style="{background:'#fff'}"
border>
<el-table-column prop="name"
label="选用"
width="130"
align="center">
<template #default="{ row, $index }">
<el-radio-group v-if="$index"
v-model="row.isChoose">
<el-radio v-for="(item, i) in opt1"
:key="i"
:label="item.id">{{ item.name }}</el-radio>
</el-radio-group>
<span v-else>基准分</span>
</template>
</el-table-column>
<el-table-column prop="recordName"
label="指标"
min-width="80"
@ -36,7 +50,7 @@
clearable
v-model="row.formulaOne"
disabled>
<el-option v-for="item in row?.recordChildren[0].subject.itemList"
<el-option v-for="item in row?.recordChildren[1].subject.itemList"
:key="item"
:label="item.options"
:value="item.itemId" />
@ -47,7 +61,7 @@
clearable
v-model="row.formulaTwo"
disabled>
<el-option v-for="item in row?.recordChildren[1].subject.itemList"
<el-option v-for="item in row?.recordChildren[2].subject.itemList"
:key="item"
:label="item.options"
:value="item.itemId" />
@ -62,7 +76,7 @@
clearable
v-model="row.formulaOne"
disabled>
<el-option v-for="item in row?.recordChildren[0].subject.itemList"
<el-option v-for="item in row?.recordChildren[1].subject.itemList"
:key="item"
:label="item.options"
:value="item.itemId" />
@ -73,7 +87,7 @@
clearable
v-model="row.formulaTwo"
disabled>
<el-option v-for="item in row?.recordChildren[1].subject.itemList"
<el-option v-for="item in row?.recordChildren[2].subject.itemList"
:key="item"
:label="item.options"
:value="item.itemId" />
@ -90,7 +104,7 @@
clearable
v-model="row.formulaTwo"
disabled>
<el-option v-for="item in row?.recordChildren[1].subject.itemList"
<el-option v-for="item in row?.recordChildren[2].subject.itemList"
:key="item"
:label="item.options"
:value="item.itemId" />
@ -104,7 +118,7 @@
clearable
v-model="row.formulaOne"
disabled>
<el-option v-for="item in row?.recordChildren[0].subject.itemList"
<el-option v-for="item in row?.recordChildren[1].subject.itemList"
:key="item"
:label="item.options"
:value="item.itemId" />
@ -120,7 +134,7 @@
clearable
v-model="row.formulaOne"
disabled>
<el-option v-for="item in row?.recordChildren[0].subject.itemList"
<el-option v-for="item in row?.recordChildren[1].subject.itemList"
:key="item"
:label="item.options"
:value="item.itemId" />
@ -131,7 +145,7 @@
clearable
v-model="row.formulaTwo"
disabled>
<el-option v-for="item in row?.recordChildren[1].subject.itemList"
<el-option v-for="item in row?.recordChildren[2].subject.itemList"
:key="item"
:label="item.options"
:value="item.itemId" />
@ -147,7 +161,7 @@
clearable
v-model="row.formulaOne"
disabled>
<el-option v-for="item in row?.recordChildren[0].subject.itemList"
<el-option v-for="item in row?.recordChildren[1].subject.itemList"
:key="item"
:label="item.options"
:value="item.itemId" />
@ -158,7 +172,7 @@
clearable
v-model="row.formulaTwo"
disabled>
<el-option v-for="item in row?.recordChildren[1].subject.itemList"
<el-option v-for="item in row?.recordChildren[2].subject.itemList"
:key="item"
:label="item.options"
:value="item.itemId" />
@ -213,7 +227,7 @@ import { ElMessage } from 'element-plus';
import { postCreditScoreDetails, postCreditScoreSave, isTheStrategyRelatedToTheProduct } from '@/api/model';
import { getProcessInformationBasedOnRoles, addOperation } from '@/api/judgment';
import type { TableColumnCtx } from 'element-plus';
import { handleId, getIds } from '@/utils/common';
import { handleId, getIds, opt1 } from '@/utils/common';
import Cookies from 'js-cookie';
const Confirm = defineAsyncComponent(() => import('@/components/StrategyConfirm.vue'));
@ -259,6 +273,7 @@ const getConfig = async () => {
temp.ruleName = n.name;
temp.subject = n.subject;
temp.ruleId = n.id;
temp.isChoose = '';
result.push(temp);
});
});
@ -266,6 +281,7 @@ const getConfig = async () => {
result.forEach((e, i) => {
if (i) {
e.indexId = info.value[i - 1].indexId;
e.isChoose = info.value[i - 1].isChoose;
e.score = info.value[i - 1].score ? +info.value[i - 1].score : '';
}
});
@ -305,9 +321,9 @@ const span = ({ row, column, rowIndex, columnIndex }: SpanMethodProps) => {
if (!columnIndex) {
return {
rowspan: 1,
colspan: 3,
colspan: 4,
};
} else if (columnIndex === 3) {
} else if (columnIndex === 4) {
return {
rowspan: 1,
colspan: 1,
@ -320,7 +336,7 @@ const span = ({ row, column, rowIndex, columnIndex }: SpanMethodProps) => {
}
}
if (columnIndex < 2) {
if (columnIndex < 3) {
if (rowMerge1.includes(rowIndex)) {
return {
rowspan: 5,
@ -355,6 +371,7 @@ const addRecord = async (data: Record<string, any>) => {
const rule = [];
data.forEach((e, i) => {
e.isChoose && rule.push(handleId(1052, 140, e.isChoose, `${preIds},${e.stRecordId},1052`, 1));
e.score && rule.push(handleId(e.ruleId, e.subject.subjectId, e.score, `${preIds},${e.stRecordId},${e.middleId},${e.ruleId}`, 1));
if (i === 1 || i === 6 || i === 18 || i === 22) {
e.formulaOne && rule.push(handleId(1061, 285, e.formulaOne, `${preIds},${e.stRecordId},1061`, 1));

@ -18,10 +18,14 @@
:cell-style="{background:'#fff'}"
border>
<el-table-column label="选用"
width="80"
width="130"
align="center">
<template #default="{ row }">
<el-checkbox v-model="row.isChoose"></el-checkbox>
<el-radio-group v-model="row.isChoose">
<el-radio v-for="(item, i) in opt1"
:key="i"
:label="item.id">{{ item.name }}</el-radio>
</el-radio-group>
</template>
</el-table-column>
<el-table-column prop="recordName"
@ -71,7 +75,7 @@ import { ref, defineAsyncComponent, onMounted, toRefs } from 'vue';
import { ElMessage } from 'element-plus';
import { postLoanWarningDetails, postLoanWarningSave, isTheStrategyRelatedToTheProduct } from '@/api/model';
import { getProcessInformationBasedOnRoles, addOperation } from '@/api/judgment';
import { handleId, getIds } from '@/utils/common';
import { handleId, getIds, opt1 } from '@/utils/common';
import Cookies from 'js-cookie';
const Confirm = defineAsyncComponent(() => import('@/components/StrategyConfirm.vue'));
@ -100,7 +104,7 @@ const getConfig = async () => {
recordChildren: e.recordChildren,
riskGrade: +cur.riskGrade || '',
riskGradeType: +cur.riskGradeType || '',
isChoose: info.value.length ? !!cur.isChoose : false,
isChoose: info.value.length ? cur.isChoose : '',
id: cur.id || '',
stRecordId: e.id,
});
@ -130,7 +134,8 @@ const addRecord = async (data: Record<string, any>) => {
const rule = [];
data.map((e) => {
e.isChoose && rule.push(handleId(1052, '', '', `${preIds},${e.stRecordId},1052`, ''));
e.isChoose && rule.push(handleId(1052, 140, e.isChoose, `${preIds},${e.stRecordId},1052`, 1));
e.riskGradeType && rule.push(handleId(1147, 299, e.riskGradeType, `${preIds},${e.stRecordId},1146,1147`, 1));
e.riskGrade && rule.push(handleId(1148, 300, e.riskGrade, `${preIds},${e.stRecordId},1146,1148`, 1));
});
@ -149,12 +154,7 @@ const addRecord = async (data: Record<string, any>) => {
const submit = async (synchronizeUpdate?: number) => {
loading.value = true;
try {
let param = JSON.parse(JSON.stringify(form.value));
param.forEach((e) => {
e.isChoose = +e.isChoose;
});
const recordParam = JSON.parse(JSON.stringify(param));
const param = JSON.parse(JSON.stringify(form.value));
param.forEach((e) => {
delete e.recordChildren;
});
@ -166,7 +166,7 @@ const submit = async (synchronizeUpdate?: number) => {
postLoanWarningList: param,
bankIds: bankIds.value,
});
addRecord(recordParam);
addRecord(param);
} catch (e) {
loading.value = false;
}

@ -17,6 +17,18 @@
:span-method="span"
:cell-style="{background:'#fff'}"
border>
<el-table-column prop="name"
label="选用"
width="130"
align="center">
<template #default="{ row }">
<el-radio-group v-model="row.isChoose">
<el-radio v-for="(item, i) in opt1"
:key="i"
:label="item.id">{{ item.name }}</el-radio>
</el-radio-group>
</template>
</el-table-column>
<el-table-column prop="recordName"
label="逾期时长"
width="150"
@ -36,21 +48,10 @@
min-width="310"
align="center">
<template #default="{ row }">
<p v-if="row.recordChildren && row.verbalTrick">{{ row?.recordChildren[0]?.subject?.itemList.find(e => e.itemId === row.verbalTrick)?.options }}</p>
<p v-if="row.recordChildren && row.verbalTrick">{{ row?.recordChildren[1]?.subject?.itemList.find(e => e.itemId === row.verbalTrick)?.options }}</p>
<el-button type="primary"
:icon="Plus"
@click="showDia(row)">选择</el-button>
<!-- <el-select v-if="row.recordChildren"
class="w-full type-select"
v-model="row.verbalTrick">
<el-option v-for="item in row?.recordChildren[0]?.subject?.itemList"
:key="item"
:label="item.options"
:value="item.itemId">
<span>{{ item.options }}</span>
</el-option>
</el-select> -->
</template></el-table-column>
</el-table>
</el-form-item>
@ -71,7 +72,7 @@
<div class="selects"
v-if="curRow.recordChildren">
<div v-for="item in
curRow?.recordChildren[0]?.subject?.itemList"
curRow?.recordChildren[1]?.subject?.itemList"
:key="item"
class="line"
@click="curRow.verbalTrick = item.itemId">
@ -95,7 +96,7 @@ import { Plus } from '@element-plus/icons-vue';
import { ElMessage } from 'element-plus';
import { collectionAfterLoanDetails, collectionAfterLoanSave, isTheStrategyRelatedToTheProduct } from '@/api/model';
import { getProcessInformationBasedOnRoles, addOperation } from '@/api/judgment';
import { handleId, getIds } from '@/utils/common';
import { handleId, getIds, opt1 } from '@/utils/common';
import Cookies from 'js-cookie';
const Confirm = defineAsyncComponent(() => import('@/components/StrategyConfirm.vue'));
@ -123,6 +124,7 @@ const getConfig = async () => {
...getIds(),
recordName: e.name,
recordChildren: e.recordChildren,
isChoose: info.value.length ? cur.isChoose : '',
appCollection: info.value.length ? !!cur.appCollection : false,
automaticOutboundCall: info.value.length ? !!cur.automaticOutboundCall : false,
shortMessageCollection: info.value.length ? !!cur.shortMessageCollection : false,
@ -133,7 +135,6 @@ const getConfig = async () => {
});
});
form.value = result;
console.log('🚀 ~ getConfig ~ result:', result);
};
//
const getDetail = async () => {
@ -161,15 +162,20 @@ const addRecord = async (data: Record<string, any>) => {
data.map((e) => {
e.recordChildren.forEach((n, i) => {
if (i) {
if (i === 1) {
//
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 {
} else if (i === 2) {
//
e.verbalTrick && rule.push(handleId(n.id, n.subjectId, e.verbalTrick, `${preIds},${e.stRecordId},${n.id}`, 1));
} else {
//
e.isChoose && rule.push(handleId(1052, 140, e.isChoose, `${preIds},${e.stRecordId},1052`, 1));
}
});
});

@ -331,7 +331,6 @@ import { findById, save, update, elementDetail } from '@/api/bank';
import { getProcessInformationBasedOnRoles, addOperation } from '@/api/judgment';
import { useRouter, useRoute } from 'vue-router';
import { handleId, isIllegalNum, getIds, whethers, getUsername } from '@/utils/common';
import { getStatus } from '@/store/useProduct';
import Info from './Info.vue';
import Cookies from 'js-cookie';

@ -91,48 +91,55 @@
min-width="100"
align="center">
<template #default="{ row }">
<el-checkbox v-model="row.personalHitBlacklist"
@change="e => checkRow(e, row)"></el-checkbox>
<el-radio-group v-model="row.personalHitBlacklist">
<el-radio v-for="(item, i) in opt1"
:key="i"
:label="item.id">{{ item.name }}</el-radio>
</el-radio-group>
</template>
</el-table-column>
<el-table-column label="配偶命中拒入"
min-width="100"
align="center">
<template #default="{ row }">
<el-checkbox v-model="row.mateHitRejected"
@change="e => checkRow(e, row)"></el-checkbox>
<el-radio-group v-model="row.mateHitRejected">
<el-radio v-for="(item, i) in opt1"
:key="i"
:label="item.id">{{ item.name }}</el-radio>
</el-radio-group>
</template>
</el-table-column>
<el-table-column label="父母/子女命中拒入"
min-width="100"
align="center">
<template #default="{ row }">
<el-checkbox v-model="row.parentsHitRejected"
@change="e => checkRow(e, row)"></el-checkbox>
<el-radio-group v-model="row.parentsHitRejected">
<el-radio v-for="(item, i) in opt1"
:key="i"
:label="item.id">{{ item.name }}</el-radio>
</el-radio-group>
</template>
</el-table-column>
<el-table-column label="其他家庭成员命中拒入"
min-width="100"
align="center">
<template #default="{ row }">
<el-checkbox v-model="row.otherFamilyMembersHitRejected"
@change="e => checkRow(e, row)"></el-checkbox>
<el-radio-group v-model="row.otherFamilyMembersHitRejected">
<el-radio v-for="(item, i) in opt1"
:key="i"
:label="item.id">{{ item.name }}</el-radio>
</el-radio-group>
</template>
</el-table-column>
<el-table-column label="企业大股东命中拒入"
min-width="100"
align="center">
<template #default="{ row }">
<el-checkbox v-model="row.corporateMajorityHitRejected"
@change="e => checkRow(e, row)"></el-checkbox>
</template>
</el-table-column>
<el-table-column label="本人及亲属企业命中准入"
min-width="120"
align="center">
<template #default="{ row }">
<el-checkbox v-model="row.hitAccess"
@change="checkNone(row)"></el-checkbox>
<el-radio-group v-model="row.corporateMajorityHitRejected">
<el-radio v-for="(item, i) in opt1"
:key="i"
:label="item.id">{{ item.name }}</el-radio>
</el-radio-group>
</template>
</el-table-column>
</el-table>
@ -156,8 +163,9 @@ import { ElMessage } from 'element-plus';
import { accessStrategyGovernmentBlacklistFind, accessStrategyGovernmentBlacklistSave, isTheStrategyRelatedToTheProduct } from '@/api/model';
import { getProcessInformationBasedOnRoles, addOperation } from '@/api/judgment';
import type { TableColumnCtx } from 'element-plus';
import { handleId, getIds } from '@/utils/common';
import { handleId, getIds, opt1 } from '@/utils/common';
import Cookies from 'js-cookie';
import { getStat } from '@/store/useProduct';
const Confirm = defineAsyncComponent(() => import('@/components/StrategyConfirm.vue'));
@ -204,12 +212,11 @@ const getConfig = async () => {
name: e.name,
recordChildren: e.recordChildren,
isRule: isRule(e.id) ? 1 : 0,
corporateMajorityHitRejected: !!cur?.corporateMajorityHitRejected,
hitAccess: !!cur?.hitAccess,
mateHitRejected: !!cur?.mateHitRejected,
otherFamilyMembersHitRejected: !!cur?.otherFamilyMembersHitRejected,
parentsHitRejected: !!cur?.parentsHitRejected,
personalHitBlacklist: !!cur?.personalHitBlacklist,
corporateMajorityHitRejected: cur?.corporateMajorityHitRejected,
mateHitRejected: cur?.mateHitRejected,
otherFamilyMembersHitRejected: cur?.otherFamilyMembersHitRejected,
parentsHitRejected: cur?.parentsHitRejected,
personalHitBlacklist: cur?.personalHitBlacklist,
symbol: isRule(e.id) && symbol?.length ? symbol[0] : '',
had: e.id === 167 && had?.length ? had[0] : '',
num: isRule(e.id) && num?.length ? num[0] : '',
@ -277,31 +284,12 @@ 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;
row.mateHitRejected = false;
row.otherFamilyMembersHitRejected = false;
row.parentsHitRejected = false;
row.personalHitBlacklist = false;
}
};
//
const addRecord = async (data: Record<string, any>) => {
const preIds = `1,${Cookies.get('sand-level')},42,67,147,150`; // 1id
const rule = [];
data.map((e, i) => {
const temp = [];
e.personalHitBlacklist && temp.push(300);
e.mateHitRejected && temp.push(301);
e.parentsHitRejected && temp.push(302);
e.otherFamilyMembersHitRejected && temp.push(303);
e.corporateMajorityHitRejected && temp.push(304);
e.hitAccess && temp.push(757);
if (isRule(e.stRecordId)) {
const len = e?.recordChildren?.length - 1;
e?.recordChildren.map((n, j) => {
@ -317,12 +305,19 @@ const addRecord = async (data: Record<string, any>) => {
const val = j ? (n.id === 168 ? e.symbol + e.num : e.ruleTwo) : e.ruleOne;
val && rule.push(handleId(n.id, n.subjectId, val, preIds + ',' + e.stRecordId + ',' + n.id, 5));
}
} else if (temp.length) {
rule.push(handleId(n.id, 71, temp.join(), preIds + ',' + e.stRecordId + ',' + n.id, 1));
}
});
e.personalHitBlacklist && rule.push(handleId(281, 140, e.personalHitBlacklist, `${preIds},${e.stRecordId},281`, 1));
e.mateHitRejected && rule.push(handleId(283, 140, e.mateHitRejected, `${preIds},${e.stRecordId},283`, 1));
e.parentsHitRejected && rule.push(handleId(284, 140, e.parentsHitRejected, `${preIds},${e.stRecordId},284`, 1));
e.otherFamilyMembersHitRejected && rule.push(handleId(285, 140, e.otherFamilyMembersHitRejected, `${preIds},${e.stRecordId},285`, 1));
e.corporateMajorityHitRejected && rule.push(handleId(286, 140, e.corporateMajorityHitRejected, `${preIds},${e.stRecordId},286`, 1));
} else {
temp.length && rule.push(handleId(e.stRecordId, 71, temp.join(), preIds + ',' + e.stRecordId, 1));
e.personalHitBlacklist && rule.push(handleId(281, 140, e.personalHitBlacklist, `${preIds},${e.stRecordId},281`, 1));
e.mateHitRejected && rule.push(handleId(283, 140, e.mateHitRejected, `${preIds},${e.stRecordId},283`, 1));
e.parentsHitRejected && rule.push(handleId(284, 140, e.parentsHitRejected, `${preIds},${e.stRecordId},284`, 1));
e.otherFamilyMembersHitRejected && rule.push(handleId(285, 140, e.otherFamilyMembersHitRejected, `${preIds},${e.stRecordId},285`, 1));
e.corporateMajorityHitRejected && rule.push(handleId(286, 140, e.corporateMajorityHitRejected, `${preIds},${e.stRecordId},286`, 1));
}
});
@ -343,12 +338,6 @@ const submit = async (synchronizeUpdate?: number) => {
let param = JSON.parse(JSON.stringify(form.value));
param.map((e, i) => {
if (info.value.length) e.id = info.value.find((n) => n.stRecordId === e.stRecordId)?.id;
e.corporateMajorityHitRejected = +e.corporateMajorityHitRejected;
e.hitAccess = +e.hitAccess;
e.mateHitRejected = +e.mateHitRejected;
e.otherFamilyMembersHitRejected = +e.otherFamilyMembersHitRejected;
e.parentsHitRejected = +e.parentsHitRejected;
e.personalHitBlacklist = +e.personalHitBlacklist;
if (e.stRecordId == 161 || e.stRecordId == 164) {
if (e.span) {
//
@ -382,7 +371,7 @@ const submit = async (synchronizeUpdate?: number) => {
governmentBlacklistList: param,
bankIds: bankIds.value,
});
getStat(295);
addRecord(recordParam);
} catch (e) {
loading.value = false;

@ -37,40 +37,44 @@
min-width="150"
align="center">
<template #default="{ row }">
<el-checkbox v-model="row.myselfWorkplace"
@change="e => checkRow(e, row)"></el-checkbox>
<el-radio-group v-model="row.myselfWorkplace">
<el-radio v-for="(item, i) in opt1"
:key="i"
:label="item.id">{{ item.name }}</el-radio>
</el-radio-group>
</template>
</el-table-column>
<el-table-column label="配偶工作单位命中拒入"
min-width="150"
align="center">
<template #default="{ row }">
<el-checkbox v-model="row.spouseWorkplace"
@change="e => checkRow(e, row)"></el-checkbox>
<el-radio-group v-model="row.spouseWorkplace">
<el-radio v-for="(item, i) in opt1"
:key="i"
:label="item.id">{{ item.name }}</el-radio>
</el-radio-group>
</template>
</el-table-column>
<el-table-column label="本人名下企业命中进黑名单"
min-width="150"
align="center">
<template #default="{ row }">
<el-checkbox v-model="row.myselfEnterprise"
@change="e => checkRow(e, row)"></el-checkbox>
<el-radio-group v-model="row.myselfEnterprise">
<el-radio v-for="(item, i) in opt1"
:key="i"
:label="item.id">{{ item.name }}</el-radio>
</el-radio-group>
</template>
</el-table-column>
<el-table-column label="配偶名下企业命中拒入"
min-width="150"
align="center">
<template #default="{ row }">
<el-checkbox v-model="row.spouseEnterprise"
@change="e => checkRow(e, row)"></el-checkbox>
</template>
</el-table-column>
<el-table-column label="可以准入"
min-width="150"
align="center">
<template #default="{ row }">
<el-checkbox v-model="row.admittance"
@change="checkNone(row)"></el-checkbox>
<el-radio-group v-model="row.spouseEnterprise">
<el-radio v-for="(item, i) in opt1"
:key="i"
:label="item.id">{{ item.name }}</el-radio>
</el-radio-group>
</template>
</el-table-column>
</el-table>
@ -94,8 +98,7 @@ import { ElMessage } from 'element-plus';
import { accessStrategyNegativeIndustryStrategyFind, accessStrategyNegativeIndustryStrategySave, isTheStrategyRelatedToTheProduct } from '@/api/model';
import { getProcessInformationBasedOnRoles, addOperation } from '@/api/judgment';
import type { TableColumnCtx } from 'element-plus';
import { useRouter, useRoute } from 'vue-router';
import { handleId, getIds } from '@/utils/common';
import { handleId, getIds, opt1 } from '@/utils/common';
import Cookies from 'js-cookie';
const Confirm = defineAsyncComponent(() => import('@/components/StrategyConfirm.vue'));
@ -131,11 +134,10 @@ const getConfig = async () => {
temp.parentId = e.id;
temp.name = n.name;
temp.index = index;
temp.myselfEnterprise = !!cur?.myselfEnterprise;
temp.myselfWorkplace = !!cur?.myselfWorkplace;
temp.spouseEnterprise = !!cur?.spouseEnterprise;
temp.spouseWorkplace = !!cur?.spouseWorkplace;
temp.admittance = !!cur?.admittance;
temp.myselfEnterprise = cur?.myselfEnterprise;
temp.myselfWorkplace = cur?.myselfWorkplace;
temp.spouseEnterprise = cur?.spouseEnterprise;
temp.spouseWorkplace = cur?.spouseWorkplace;
result.push(temp);
});
});
@ -184,31 +186,17 @@ const span = ({ row, column, rowIndex, columnIndex }: SpanMethodProps) => {
}
}
};
const checkRow = (e: boolean, row: Record<string, any>) => {
if (e) row.admittance = false;
};
const checkNone = (row: Record<string, any>) => {
if (row.admittance) {
row.myselfEnterprise = false;
row.myselfWorkplace = false;
row.spouseEnterprise = false;
row.spouseWorkplace = false;
}
};
//
const addRecord = async (data: Record<string, any>) => {
const addRecord = async () => {
const preIds = `1,${Cookies.get('sand-level')},42,67,147,156`; // 1id
const rule: Array<Record<string, any>> = [];
form.value.map((e) => {
if (e.index) {
const temp = [];
e.myselfWorkplace && temp.push(383);
e.spouseWorkplace && temp.push(384);
e.myselfEnterprise && temp.push(385);
e.spouseEnterprise && temp.push(386);
e.admittance && temp.push(758);
temp.length && rule.push(handleId(e.stRecordId, e.subjectId, temp.join(), preIds + ',' + e.parentId + ',' + e.stRecordId, 1));
e.myselfWorkplace && rule.push(handleId(302, 140, e.myselfWorkplace, `${preIds},${e.parentId},${e.stRecordId},302`, 1));
e.spouseWorkplace && rule.push(handleId(303, 140, e.spouseWorkplace, `${preIds},${e.parentId},${e.stRecordId},303`, 1));
e.myselfEnterprise && rule.push(handleId(304, 140, e.myselfEnterprise, `${preIds},${e.parentId},${e.stRecordId},304`, 1));
e.spouseEnterprise && rule.push(handleId(305, 140, e.spouseEnterprise, `${preIds},${e.parentId},${e.stRecordId},305`, 1));
}
});
@ -233,11 +221,10 @@ const submit = async (synchronizeUpdate?: number) => {
...getIds(),
stRecordId: e.stRecordId,
id: info.value.find((j) => j.stRecordId === e.stRecordId)?.id ?? '',
myselfEnterprise: e.myselfEnterprise ? 1 : 0,
myselfWorkplace: e.myselfWorkplace ? 1 : 0,
spouseEnterprise: e.spouseEnterprise ? 1 : 0,
spouseWorkplace: e.spouseWorkplace ? 1 : 0,
admittance: e.admittance ? 1 : 0,
myselfEnterprise: e.myselfEnterprise,
myselfWorkplace: e.myselfWorkplace,
spouseEnterprise: e.spouseEnterprise,
spouseWorkplace: e.spouseWorkplace,
});
}
});
@ -248,7 +235,7 @@ const submit = async (synchronizeUpdate?: number) => {
synchronizeUpdate,
negativeIndustryStrategyList: param,
});
addRecord(param);
addRecord();
} catch (e) {
loading.value = false;
}

@ -20,10 +20,14 @@
border>
<el-table-column prop="name"
label="选用"
width="100"
width="130"
align="center">
<template #default="{ row }">
<el-checkbox v-model="row.isChoose"></el-checkbox>
<el-radio-group v-model="row.isChoose">
<el-radio v-for="(item, i) in opt1"
:key="i"
:label="item.id">{{ item.name }}</el-radio>
</el-radio-group>
</template>
</el-table-column>
<el-table-column prop="name"
@ -71,12 +75,11 @@
<script setup lang="ts">
import { ref, defineAsyncComponent, onMounted, toRefs, reactive } from 'vue';
import { ElLoading, ElMessage } from 'element-plus';
import { ElMessage } from 'element-plus';
import { saveCredit, findCredit, isTheStrategyRelatedToTheProduct } from '@/api/model';
import { getProcessInformationBasedOnRoles, addOperation } from '@/api/judgment';
import { useRouter, useRoute } from 'vue-router';
import type { TableColumnCtx } from 'element-plus';
import { handleId, getIds } from '@/utils/common';
import { handleId, getIds, opt1 } from '@/utils/common';
import Cookies from 'js-cookie';
const Confirm = defineAsyncComponent(() => import('@/components/StrategyConfirm.vue'));
@ -119,7 +122,7 @@ const getConfig = async () => {
strategyId: cur ? cur?.strategyId : '',
name: e.name,
sub: n.name,
isChoose: cur ? !!cur?.isChoose : false,
isChoose: cur?.isChoose || '',
score: cur ? cur?.dimensionIndexList[i - 1]?.score + '' : '',
span: i === 1 ? 1 : 0,
parent: i === 1 ? '' : j,
@ -202,7 +205,7 @@ const addRecord = async () => {
form.description && lcRule.push(handleId(516, 192, form.description, preIds + ',516', 3));
list.value.forEach((e) => {
e.span && e.isChoose && lcRule.push(handleId(518, '', '', preIds + ',' + e.answerId1 + ',518', ''));
e.span && e.isChoose && lcRule.push(handleId(518, 140, e.isChoose, `${preIds},${e.answerId1},${e.answerId2},518`, 1));
e.score && lcRule.push(handleId(e.answerId2, e.subjectId, e?.itemList?.find((n) => n.options == e.score)?.itemId || '', preIds + ',' + e.answerId1 + ',' + e.answerId2, 1));
});
await addOperation({
@ -234,7 +237,7 @@ const submit = async (synchronizeUpdate?: number) => {
dimensionId: e.dimensionId,
strategyId: e.strategyId,
recordName: e.name,
isChoose: +e.isChoose,
isChoose: e.isChoose,
dimensionIndexList: [child],
};
if (e.span) {

@ -20,15 +20,15 @@
border>
<el-table-column prop="name"
label="选用"
width="100">
<template #default="{ row, $index }">
<div class="items-center">
<el-checkbox v-if="!row.top"
class="mr-2"
v-model="row.isChoose"
@change="checkAll(row, $index)"></el-checkbox>
width="130">
<template #default="{ row }">
<el-radio-group v-if="!row.top"
v-model="row.isChoose">
<el-radio v-for="(item, i) in opt1"
:key="i"
:label="item.id">{{ item.name }}</el-radio>
</el-radio-group>
<span v-else>{{row.name}}</span>
</div>
</template>
</el-table-column>
<el-table-column prop="sub"
@ -135,13 +135,12 @@
</template>
<script setup lang="ts">
import { ref, defineAsyncComponent, onMounted, toRefs, reactive, isTheStrategyRelatedToTheProduct } from 'vue';
import { ElLoading, ElMessage } from 'element-plus';
import { saveCredit, findCredit } from '@/api/model';
import { ref, defineAsyncComponent, onMounted, toRefs, reactive } from 'vue';
import { ElMessage } from 'element-plus';
import { saveCredit, findCredit, isTheStrategyRelatedToTheProduct } from '@/api/model';
import { getProcessInformationBasedOnRoles, addOperation } from '@/api/judgment';
import { useRouter, useRoute } from 'vue-router';
import type { TableColumnCtx } from 'element-plus';
import { handleId, getIds } from '@/utils/common';
import { handleId, getIds, opt1 } from '@/utils/common';
import Cookies from 'js-cookie';
const Confirm = defineAsyncComponent(() => import('@/components/StrategyConfirm.vue'));
@ -176,7 +175,7 @@ const getConfig = async () => {
answerId1: e.id,
dimensionId: '',
name: e.name,
isChoose: false,
isChoose: '',
top: 1,
});
e?.recordChildren.forEach((n, i) => {
@ -192,7 +191,7 @@ const getConfig = async () => {
index: n?.recordChildren[1]?.name,
subject: n?.recordChildren[1]?.subject,
remark: n.remark,
isChoose: false,
isChoose: '',
calculationFormula: '',
score: '',
percentage: '',
@ -220,11 +219,11 @@ const getConfig = async () => {
if (detail.value.length) {
result[0].dimensionId = detail.value[0]?.dimensionId;
result[0].isChoose = !!detail.value[0]?.isChoose;
result[0].isChoose = detail.value[0]?.isChoose;
// 4
result[1].dimensionId = detail.value[1]?.dimensionId;
result[1].isChoose = !!detail.value[1]?.isChoose;
result[1].isChoose = detail.value[1]?.isChoose;
result[1].id = detail.value[1].dimensionIndexList[0]?.id;
result[1].dimensionId = detail.value[1].dimensionIndexList[0]?.dimensionId;
@ -239,7 +238,7 @@ const getConfig = async () => {
result[3].score = detail.value[1].dimensionIndexList[2]?.score;
result[4].dimensionId = detail.value[2]?.dimensionId;
result[4].isChoose = !!detail.value[2]?.isChoose;
result[4].isChoose = detail.value[2]?.isChoose;
result[4].id = detail.value[2].dimensionIndexList[0]?.id;
result[4].dimensionId = detail.value[2].dimensionIndexList[0]?.dimensionId;
@ -254,7 +253,7 @@ const getConfig = async () => {
result[6].score = detail.value[2].dimensionIndexList[2]?.score;
result[7].dimensionId = detail.value[3]?.dimensionId;
result[7].isChoose = !!detail.value[3]?.isChoose;
result[7].isChoose = detail.value[3]?.isChoose;
result[7].id = detail.value[3].dimensionIndexList[0]?.id;
result[7].dimensionId = detail.value[3].dimensionIndexList[0]?.dimensionId;
@ -269,7 +268,7 @@ const getConfig = async () => {
result[9].score = detail.value[3].dimensionIndexList[2]?.score;
result[10].dimensionId = detail.value[4]?.dimensionId;
result[10].isChoose = !!detail.value[4]?.isChoose;
result[10].isChoose = detail.value[4]?.isChoose;
result[10].id = detail.value[4].dimensionIndexList[0]?.id;
result[10].dimensionId = detail.value[4].dimensionIndexList[0]?.dimensionId;
@ -285,10 +284,10 @@ const getConfig = async () => {
// <>4
result[13].dimensionId = detail.value[5]?.dimensionId;
result[13].isChoose = !!detail.value[5]?.isChoose;
result[13].isChoose = detail.value[5]?.isChoose;
result[14].dimensionId = detail.value[6]?.dimensionId;
result[14].isChoose = !!detail.value[6]?.isChoose;
result[14].isChoose = detail.value[6]?.isChoose;
result[14].calculationFormula = detail.value[6]?.calculationFormula;
result[14].dimensionId = detail.value[6]?.dimensionIndexList[0]?.dimensionId;
result[14].id = detail.value[6]?.dimensionIndexList[0]?.id;
@ -296,7 +295,7 @@ const getConfig = async () => {
result[14].score = detail.value[6]?.dimensionIndexList[0]?.score;
result[15].dimensionId = detail.value[7]?.dimensionId;
result[15].isChoose = !!detail.value[7]?.isChoose;
result[15].isChoose = detail.value[7]?.isChoose;
result[15].calculationFormula = detail.value[7]?.calculationFormula;
result[15].dimensionId = detail.value[7]?.dimensionIndexList[0]?.dimensionId;
result[15].id = detail.value[7]?.dimensionIndexList[0]?.id;
@ -304,7 +303,7 @@ const getConfig = async () => {
result[15].score = detail.value[7]?.dimensionIndexList[0]?.score;
result[16].dimensionId = detail.value[8]?.dimensionId;
result[16].isChoose = !!detail.value[8]?.isChoose;
result[16].isChoose = detail.value[8]?.isChoose;
result[16].calculationFormula = detail.value[8]?.calculationFormula;
result[16].dimensionId = detail.value[8]?.dimensionIndexList[0]?.dimensionId;
result[16].id = detail.value[8]?.dimensionIndexList[0]?.id;
@ -312,7 +311,7 @@ const getConfig = async () => {
result[16].score = detail.value[8]?.dimensionIndexList[0]?.score;
result[17].dimensionId = detail.value[9]?.dimensionId;
result[17].isChoose = !!detail.value[9]?.isChoose;
result[17].isChoose = detail.value[9]?.isChoose;
result[17].calculationFormula = detail.value[9]?.calculationFormula;
result[17].dimensionId = detail.value[9]?.dimensionIndexList[0]?.dimensionId;
result[17].id = detail.value[9]?.dimensionIndexList[0]?.id;
@ -321,10 +320,10 @@ const getConfig = async () => {
// <>7
result[18].dimensionId = detail.value[10]?.dimensionId;
result[18].isChoose = !!detail.value[10]?.isChoose;
result[18].isChoose = detail.value[10]?.isChoose;
result[19].dimensionId = detail.value[11]?.dimensionId;
result[19].isChoose = !!detail.value[11]?.isChoose;
result[19].isChoose = detail.value[11]?.isChoose;
result[19].calculationFormula = detail.value[11]?.calculationFormula;
result[19].dimensionId = detail.value[11]?.dimensionIndexList[0]?.dimensionId;
result[19].id = detail.value[11]?.dimensionIndexList[0]?.id;
@ -332,7 +331,7 @@ const getConfig = async () => {
result[19].score = detail.value[11]?.dimensionIndexList[0]?.score;
result[20].dimensionId = detail.value[12]?.dimensionId;
result[20].isChoose = !!detail.value[12]?.isChoose;
result[20].isChoose = detail.value[12]?.isChoose;
result[20].calculationFormula = detail.value[12]?.calculationFormula;
result[20].dimensionId = detail.value[12]?.dimensionIndexList[0]?.dimensionId;
result[20].id = detail.value[12]?.dimensionIndexList[0]?.id;
@ -340,7 +339,7 @@ const getConfig = async () => {
result[20].score = detail.value[12]?.dimensionIndexList[0]?.score;
result[21].dimensionId = detail.value[13]?.dimensionId;
result[21].isChoose = !!detail.value[13]?.isChoose;
result[21].isChoose = detail.value[13]?.isChoose;
result[21].calculationFormula = detail.value[13]?.calculationFormula;
result[21].dimensionId = detail.value[13]?.dimensionIndexList[0]?.dimensionId;
result[21].id = detail.value[13]?.dimensionIndexList[0]?.id;
@ -348,7 +347,7 @@ const getConfig = async () => {
result[21].score = detail.value[13]?.dimensionIndexList[0]?.score;
result[22].dimensionId = detail.value[14]?.dimensionId;
result[22].isChoose = !!detail.value[14]?.isChoose;
result[22].isChoose = detail.value[14]?.isChoose;
result[22].calculationFormula = detail.value[14]?.calculationFormula;
result[22].dimensionId = detail.value[14]?.dimensionIndexList[0]?.dimensionId;
result[22].id = detail.value[14]?.dimensionIndexList[0]?.id;
@ -356,7 +355,7 @@ const getConfig = async () => {
result[22].score = detail.value[14]?.dimensionIndexList[0]?.score;
result[23].dimensionId = detail.value[15]?.dimensionId;
result[23].isChoose = !!detail.value[15]?.isChoose;
result[23].isChoose = detail.value[15]?.isChoose;
result[23].calculationFormula = detail.value[15]?.calculationFormula;
result[23].dimensionId = detail.value[15]?.dimensionIndexList[0]?.dimensionId;
result[23].id = detail.value[15]?.dimensionIndexList[0]?.id;
@ -364,7 +363,7 @@ const getConfig = async () => {
result[23].score = detail.value[15]?.dimensionIndexList[0]?.score;
result[24].dimensionId = detail.value[16]?.dimensionId;
result[24].isChoose = !!detail.value[16]?.isChoose;
result[24].isChoose = detail.value[16]?.isChoose;
result[24].calculationFormula = detail.value[16]?.calculationFormula;
result[24].dimensionId = detail.value[16]?.dimensionIndexList[0]?.dimensionId;
result[24].id = detail.value[16]?.dimensionIndexList[0]?.id;
@ -372,7 +371,7 @@ const getConfig = async () => {
result[24].score = detail.value[16]?.dimensionIndexList[0]?.score;
result[25].dimensionId = detail.value[17]?.dimensionId;
result[25].isChoose = !!detail.value[17]?.isChoose;
result[25].isChoose = detail.value[17]?.isChoose;
result[25].calculationFormula = detail.value[17]?.calculationFormula;
result[25].dimensionId = detail.value[17]?.dimensionIndexList[0]?.dimensionId;
result[25].id = detail.value[17]?.dimensionIndexList[0]?.id;
@ -381,10 +380,10 @@ const getConfig = async () => {
// <>6
result[26].dimensionId = detail.value[18]?.dimensionId;
result[26].isChoose = !!detail.value[18]?.isChoose;
result[26].isChoose = detail.value[18]?.isChoose;
result[27].dimensionId = detail.value[19]?.dimensionId;
result[27].isChoose = !!detail.value[19]?.isChoose;
result[27].isChoose = detail.value[19]?.isChoose;
result[27].calculationFormula = detail.value[19]?.calculationFormula;
result[27].dimensionId = detail.value[19]?.dimensionIndexList[0]?.dimensionId;
result[27].id = detail.value[19]?.dimensionIndexList[0]?.id;
@ -392,7 +391,7 @@ const getConfig = async () => {
result[27].score = detail.value[19]?.dimensionIndexList[0]?.score;
result[28].dimensionId = detail.value[20]?.dimensionId;
result[28].isChoose = !!detail.value[20]?.isChoose;
result[28].isChoose = detail.value[20]?.isChoose;
result[28].calculationFormula = detail.value[20]?.calculationFormula;
result[28].dimensionId = detail.value[20]?.dimensionIndexList[0]?.dimensionId;
result[28].id = detail.value[20]?.dimensionIndexList[0]?.id;
@ -400,7 +399,7 @@ const getConfig = async () => {
result[28].score = detail.value[20]?.dimensionIndexList[0]?.score;
result[29].dimensionId = detail.value[21]?.dimensionId;
result[29].isChoose = !!detail.value[21]?.isChoose;
result[29].isChoose = detail.value[21]?.isChoose;
result[29].calculationFormula = detail.value[21]?.calculationFormula;
result[29].dimensionId = detail.value[21]?.dimensionIndexList[0]?.dimensionId;
result[29].id = detail.value[21]?.dimensionIndexList[0]?.id;
@ -408,7 +407,7 @@ const getConfig = async () => {
result[29].score = detail.value[21]?.dimensionIndexList[0]?.score;
result[30].dimensionId = detail.value[22]?.dimensionId;
result[30].isChoose = !!detail.value[22]?.isChoose;
result[30].isChoose = detail.value[22]?.isChoose;
result[30].calculationFormula = detail.value[22]?.calculationFormula;
result[30].dimensionId = detail.value[22]?.dimensionIndexList[0]?.dimensionId;
result[30].id = detail.value[22]?.dimensionIndexList[0]?.id;
@ -416,7 +415,7 @@ const getConfig = async () => {
result[30].score = detail.value[22]?.dimensionIndexList[0]?.score;
result[31].dimensionId = detail.value[23]?.dimensionId;
result[31].isChoose = !!detail.value[23]?.isChoose;
result[31].isChoose = detail.value[23]?.isChoose;
result[31].calculationFormula = detail.value[23]?.calculationFormula;
result[31].dimensionId = detail.value[23]?.dimensionIndexList[0]?.dimensionId;
result[31].id = detail.value[23]?.dimensionIndexList[0]?.id;
@ -424,7 +423,7 @@ const getConfig = async () => {
result[31].score = detail.value[23]?.dimensionIndexList[0]?.score;
result[32].dimensionId = detail.value[24]?.dimensionId;
result[32].isChoose = !!detail.value[24]?.isChoose;
result[32].isChoose = detail.value[24]?.isChoose;
result[32].calculationFormula = detail.value[24]?.calculationFormula;
result[32].dimensionId = detail.value[24]?.dimensionIndexList[0]?.dimensionId;
result[32].id = detail.value[24]?.dimensionIndexList[0]?.id;
@ -433,10 +432,10 @@ const getConfig = async () => {
// <>5
result[33].dimensionId = detail.value[25]?.dimensionId;
result[33].isChoose = !!detail.value[25]?.isChoose;
result[33].isChoose = detail.value[25]?.isChoose;
result[34].dimensionId = detail.value[26]?.dimensionId;
result[34].isChoose = !!detail.value[26]?.isChoose;
result[34].isChoose = detail.value[26]?.isChoose;
result[34].calculationFormula = detail.value[26]?.calculationFormula;
result[34].dimensionId = detail.value[26]?.dimensionIndexList[0]?.dimensionId;
result[34].id = detail.value[26]?.dimensionIndexList[0]?.id;
@ -444,7 +443,7 @@ const getConfig = async () => {
result[34].score = detail.value[26]?.dimensionIndexList[0]?.score;
result[35].dimensionId = detail.value[27]?.dimensionId;
result[35].isChoose = !!detail.value[27]?.isChoose;
result[35].isChoose = detail.value[27]?.isChoose;
result[35].calculationFormula = detail.value[27]?.calculationFormula;
result[35].dimensionId = detail.value[27]?.dimensionIndexList[0]?.dimensionId;
result[35].id = detail.value[27]?.dimensionIndexList[0]?.id;
@ -452,7 +451,7 @@ const getConfig = async () => {
result[35].score = detail.value[27]?.dimensionIndexList[0]?.score;
result[36].dimensionId = detail.value[28]?.dimensionId;
result[36].isChoose = !!detail.value[28]?.isChoose;
result[36].isChoose = detail.value[28]?.isChoose;
result[36].calculationFormula = detail.value[28]?.calculationFormula;
result[36].dimensionId = detail.value[28]?.dimensionIndexList[0]?.dimensionId;
result[36].id = detail.value[28]?.dimensionIndexList[0]?.id;
@ -460,7 +459,7 @@ const getConfig = async () => {
result[36].score = detail.value[28]?.dimensionIndexList[0]?.score;
result[37].dimensionId = detail.value[29]?.dimensionId;
result[37].isChoose = !!detail.value[29]?.isChoose;
result[37].isChoose = detail.value[29]?.isChoose;
result[37].calculationFormula = detail.value[29]?.calculationFormula;
result[37].dimensionId = detail.value[29]?.dimensionIndexList[0]?.dimensionId;
result[37].id = detail.value[29]?.dimensionIndexList[0]?.id;
@ -468,7 +467,7 @@ const getConfig = async () => {
result[37].score = detail.value[29]?.dimensionIndexList[0]?.score;
result[38].dimensionId = detail.value[30]?.dimensionId;
result[38].isChoose = !!detail.value[30]?.isChoose;
result[38].isChoose = detail.value[30]?.isChoose;
result[38].calculationFormula = detail.value[30]?.calculationFormula;
result[38].dimensionId = detail.value[30]?.dimensionIndexList[0]?.dimensionId;
result[38].id = detail.value[30]?.dimensionIndexList[0]?.id;
@ -477,10 +476,10 @@ const getConfig = async () => {
// <>3
result[39].dimensionId = detail.value[31]?.dimensionId;
result[39].isChoose = !!detail.value[31]?.isChoose;
result[39].isChoose = detail.value[31]?.isChoose;
result[40].dimensionId = detail.value[32]?.dimensionId;
result[40].isChoose = !!detail.value[32]?.isChoose;
result[40].isChoose = detail.value[32]?.isChoose;
result[40].id = detail.value[32].dimensionIndexList[0]?.id;
result[40].dimensionId = detail.value[32].dimensionIndexList[0]?.dimensionId;
@ -495,7 +494,7 @@ const getConfig = async () => {
result[42].score = detail.value[32].dimensionIndexList[2]?.score;
result[43].dimensionId = detail.value[33]?.dimensionId;
result[43].isChoose = !!detail.value[33]?.isChoose;
result[43].isChoose = detail.value[33]?.isChoose;
result[43].id = detail.value[33].dimensionIndexList[0]?.id;
result[43].dimensionId = detail.value[33].dimensionIndexList[0]?.dimensionId;
@ -510,7 +509,7 @@ const getConfig = async () => {
result[45].score = detail.value[33].dimensionIndexList[2]?.score;
result[46].dimensionId = detail.value[34]?.dimensionId;
result[46].isChoose = !!detail.value[34]?.isChoose;
result[46].isChoose = detail.value[34]?.isChoose;
result[46].id = detail.value[34].dimensionIndexList[0]?.id;
result[46].dimensionId = detail.value[34].dimensionIndexList[0]?.dimensionId;
@ -526,10 +525,10 @@ const getConfig = async () => {
// <>2
result[49].dimensionId = detail.value[35]?.dimensionId;
result[49].isChoose = !!detail.value[35]?.isChoose;
result[49].isChoose = detail.value[35]?.isChoose;
result[50].dimensionId = detail.value[36]?.dimensionId;
result[50].isChoose = !!detail.value[36]?.isChoose;
result[50].isChoose = detail.value[36]?.isChoose;
result[50].calculationFormula = detail.value[36]?.calculationFormula;
result[50].dimensionId = detail.value[36]?.dimensionIndexList[0]?.dimensionId;
result[50].id = detail.value[36]?.dimensionIndexList[0]?.id;
@ -537,7 +536,7 @@ const getConfig = async () => {
result[50].score = detail.value[36]?.dimensionIndexList[0]?.score;
result[51].dimensionId = detail.value[37]?.dimensionId;
result[51].isChoose = !!detail.value[37]?.isChoose;
result[51].isChoose = detail.value[37]?.isChoose;
result[51].calculationFormula = detail.value[37]?.calculationFormula;
result[51].dimensionId = detail.value[37]?.dimensionIndexList[0]?.dimensionId;
result[51].id = detail.value[37]?.dimensionIndexList[0]?.id;
@ -616,50 +615,6 @@ const span = ({ row, column, rowIndex, columnIndex }: SpanMethodProps) => {
}
};
//
const checkAll = (row: Record<string, any>, i: number) => {
const c = row.isChoose;
if (!i) {
list.value[1].isChoose = c;
list.value[4].isChoose = c;
list.value[7].isChoose = c;
list.value[10].isChoose = c;
} else if (i === 13) {
list.value[14].isChoose = c;
list.value[15].isChoose = c;
list.value[16].isChoose = c;
list.value[17].isChoose = c;
} else if (i === 18) {
list.value[19].isChoose = c;
list.value[20].isChoose = c;
list.value[21].isChoose = c;
list.value[22].isChoose = c;
list.value[23].isChoose = c;
list.value[24].isChoose = c;
list.value[25].isChoose = c;
} else if (i === 26) {
list.value[27].isChoose = c;
list.value[28].isChoose = c;
list.value[29].isChoose = c;
list.value[30].isChoose = c;
list.value[31].isChoose = c;
list.value[32].isChoose = c;
} else if (i === 33) {
list.value[34].isChoose = c;
list.value[35].isChoose = c;
list.value[36].isChoose = c;
list.value[37].isChoose = c;
list.value[38].isChoose = c;
} else if (i === 39) {
list.value[40].isChoose = c;
list.value[43].isChoose = c;
list.value[46].isChoose = c;
} else if (i === 49) {
list.value[50].isChoose = c;
list.value[51].isChoose = c;
}
};
//
const addRecord = async () => {
const preIds = `1,${Cookies.get('sand-level')},42,67,148,${form.scoringObject ? 513 : 512}`; // 1id/512/513
@ -667,10 +622,9 @@ const addRecord = async () => {
form.description && lcRule.push(handleId(516, 192, form.description, preIds + ',516', 3));
list.value.forEach((e) => {
//
if (e.isChoose) {
e.middle ? lcRule.push(handleId(518, '', '', `${preIds},${e.answerId1},${e.answerId2},518`, '')) : lcRule.push(handleId(518, '', '', `${preIds},${e.answerId1},518`, ''));
}
//
e.isChoose && lcRule.push(handleId(518, 140, e.isChoose, `${preIds},${e.answerId1},${e.answerId2},518`, 1));
//
if (isSelect(e.answerId1)) {
e.score &&
@ -750,7 +704,7 @@ const submit = async (synchronizeUpdate?: number) => {
dimensionId: e.dimensionId ?? '',
strategyId: id.value || '',
recordName: e.name,
isChoose: +e.isChoose,
isChoose: e.isChoose,
};
if (e.middle) {
temp.dimensionIndexList = [child];

Loading…
Cancel
Save