|
|
|
@ -27,10 +27,11 @@ |
|
|
|
|
<el-table-column prop="name" |
|
|
|
|
label="选用" |
|
|
|
|
width="100"> |
|
|
|
|
<template #default="{ row }"> |
|
|
|
|
<template #default="{ row, $index }"> |
|
|
|
|
<div class="items-center"> |
|
|
|
|
<el-checkbox class="mr-2" |
|
|
|
|
v-model="row.isChoose"></el-checkbox> |
|
|
|
|
v-model="row.isChoose" |
|
|
|
|
@change="checkAll(row, $index)"></el-checkbox> |
|
|
|
|
<span v-if="row.top">{{row.name}}</span> |
|
|
|
|
</div> |
|
|
|
|
</template> |
|
|
|
@ -42,7 +43,7 @@ |
|
|
|
|
label="计算公式"> |
|
|
|
|
<template #default="{ row }"> |
|
|
|
|
<span v-if="isSelect(row.answerId1)">{{ row.remark }}</span> |
|
|
|
|
<el-select v-else |
|
|
|
|
<el-select v-else-if="row.recordChildren" |
|
|
|
|
v-model="row.calculationFormula"> |
|
|
|
|
<el-option v-for="item in row?.recordChildren[1]?.subject?.itemList" |
|
|
|
|
:key="item" |
|
|
|
@ -55,13 +56,14 @@ |
|
|
|
|
width="110" |
|
|
|
|
align="center"> |
|
|
|
|
<template #default="{ row }"> |
|
|
|
|
<span>{{ isSelect(row.answerId1) ? row.index : row?.recordChildren[2]?.recordChildren[0]?.name }}</span> |
|
|
|
|
<span v-if="isSelect(row.answerId1)">{{ row.index }}</span> |
|
|
|
|
<span v-else-if="row.recordChildren">{{ row?.recordChildren[2]?.recordChildren[0]?.name }}</span> |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column label="分值" |
|
|
|
|
align="center"> |
|
|
|
|
<template #default="{ row }"> |
|
|
|
|
<el-select v-if="isSelect(row.answerId1)" |
|
|
|
|
<el-select v-if="isSelect(row.answerId1) && row.subject" |
|
|
|
|
v-model="row.score"> |
|
|
|
|
<el-option v-for="item in row?.subject?.itemList" |
|
|
|
|
:key="item" |
|
|
|
@ -71,17 +73,16 @@ |
|
|
|
|
:class="'flex items-center'"> |
|
|
|
|
<span v-if="row.answerId2 === 643" |
|
|
|
|
class="mr-2 whitespace-nowrap">全部为正常贷款满分,</span> |
|
|
|
|
<span class="whitespace-nowrap"> |
|
|
|
|
{{ row.answerId2 === 627 ? |
|
|
|
|
'每少1倍扣' : |
|
|
|
|
(row.answerId1 === 590 || row.answerId1 === 591 || row.answerId1 === 592) ? |
|
|
|
|
row?.recordChildren[2]?.recordChildren[0]?.recordChildren[0]?.name.replace('分','') : |
|
|
|
|
row.answerId1 === 595 ? |
|
|
|
|
'每降1%扣' : |
|
|
|
|
'' }} |
|
|
|
|
</span> |
|
|
|
|
<span v-if="row.answerId2 === 627" |
|
|
|
|
class="whitespace-nowrap">每少1倍扣</span> |
|
|
|
|
|
|
|
|
|
<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" |
|
|
|
|
class="whitespace-nowrap">每降1%扣</span> |
|
|
|
|
<div class="w-[100px] mx-2"> |
|
|
|
|
<el-select v-model="row.score"> |
|
|
|
|
<el-select v-if="row.recordChildren" |
|
|
|
|
v-model="row.score"> |
|
|
|
|
<el-option v-for="item in row?.recordChildren[2]?.recordChildren[0]?.recordChildren[0]?.subject?.itemList" |
|
|
|
|
:key="item" |
|
|
|
|
:value="item.options" /> |
|
|
|
@ -100,7 +101,8 @@ |
|
|
|
|
</span> |
|
|
|
|
<template v-if="row.answerId2 !== 627 && row.answerId2 !== 646 && row.answerId2 !== 667 && row.answerId2 !== 668 && row.answerId2 !== 670 && row.answerId2 !== 694 && row.answerId2 !== 695"> |
|
|
|
|
<div class="w-[120px] mx-2"> |
|
|
|
|
<el-select placeholder="" |
|
|
|
|
<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" |
|
|
|
|
:key="item" |
|
|
|
@ -140,7 +142,8 @@ |
|
|
|
|
min-width="150" |
|
|
|
|
align="center"> |
|
|
|
|
<template #default="{ row }"> |
|
|
|
|
<el-select v-model="row.score"> |
|
|
|
|
<el-select v-if="row.itemList" |
|
|
|
|
v-model="row.score"> |
|
|
|
|
<el-option v-for="item in row?.itemList" |
|
|
|
|
:key="item" |
|
|
|
|
:value="item.options" /> |
|
|
|
@ -646,6 +649,7 @@ watch( |
|
|
|
|
const isSelect = (rule: number): boolean => { |
|
|
|
|
return rule === 589 || rule === 594; |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
interface SpanMethodProps { |
|
|
|
|
row: Record<string, any>; |
|
|
|
|
column: TableColumnCtx<Record<string, any>>; |
|
|
|
@ -716,6 +720,51 @@ const span = ({ row, column, rowIndex, columnIndex }: SpanMethodProps) => { |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
// 选择框回调 |
|
|
|
|
const checkAll = (row: Record<string, any>, i: number) => { |
|
|
|
|
const c = row.isChoose; |
|
|
|
|
if (!i) { |
|
|
|
|
list1.value[1].isChoose = c; |
|
|
|
|
list1.value[4].isChoose = c; |
|
|
|
|
list1.value[7].isChoose = c; |
|
|
|
|
list1.value[10].isChoose = c; |
|
|
|
|
} else if (i === 13) { |
|
|
|
|
list1.value[14].isChoose = c; |
|
|
|
|
list1.value[15].isChoose = c; |
|
|
|
|
list1.value[16].isChoose = c; |
|
|
|
|
list1.value[17].isChoose = c; |
|
|
|
|
} else if (i === 18) { |
|
|
|
|
list1.value[19].isChoose = c; |
|
|
|
|
list1.value[20].isChoose = c; |
|
|
|
|
list1.value[21].isChoose = c; |
|
|
|
|
list1.value[22].isChoose = c; |
|
|
|
|
list1.value[23].isChoose = c; |
|
|
|
|
list1.value[24].isChoose = c; |
|
|
|
|
list1.value[25].isChoose = c; |
|
|
|
|
} else if (i === 26) { |
|
|
|
|
list1.value[27].isChoose = c; |
|
|
|
|
list1.value[28].isChoose = c; |
|
|
|
|
list1.value[29].isChoose = c; |
|
|
|
|
list1.value[30].isChoose = c; |
|
|
|
|
list1.value[31].isChoose = c; |
|
|
|
|
list1.value[32].isChoose = c; |
|
|
|
|
} else if (i === 33) { |
|
|
|
|
list1.value[34].isChoose = c; |
|
|
|
|
list1.value[35].isChoose = c; |
|
|
|
|
list1.value[36].isChoose = c; |
|
|
|
|
list1.value[37].isChoose = c; |
|
|
|
|
list1.value[38].isChoose = c; |
|
|
|
|
} else if (i === 39) { |
|
|
|
|
list1.value[40].isChoose = c; |
|
|
|
|
list1.value[43].isChoose = c; |
|
|
|
|
list1.value[46].isChoose = c; |
|
|
|
|
} else if (i === 49) { |
|
|
|
|
list1.value[50].isChoose = c; |
|
|
|
|
list1.value[51].isChoose = c; |
|
|
|
|
} |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
// 提交 |
|
|
|
|
const submit = async () => { |
|
|
|
|
if (!form.scoreCardName) return ElMessage.error('请输入评分卡名称'); |
|
|
|
|