parent
3e8ccd8529
commit
ecec0c7dd6
5 changed files with 474 additions and 3 deletions
@ -0,0 +1,140 @@ |
||||
<template> |
||||
<!-- 风险度策略-信用评分基础系数 --> |
||||
<div class="mb-3 text-sm font-semibold"> |
||||
单笔贷款风险度公式: |
||||
<span class="text-[#0034ad]">单笔贷款风险度=</span> |
||||
<span class="text-[#8f24ff]">信用评分基础系数</span> |
||||
<span class="text-[#0034ad]"> * </span> |
||||
<span class="text-[#5cc12b]">担保方式基础系数</span> |
||||
<span class="text-[#0034ad]"> * </span> |
||||
<span class="text-[#ed8269]">贷款期限基础系数</span> |
||||
</div> |
||||
<h6 class="mb-3 text-sm text-[#006BFF] font-semibold">个人评分系数配置</h6> |
||||
<el-table class="c-table" |
||||
:data="form.slice(0,10)" |
||||
border> |
||||
<el-table-column prop="recordName" |
||||
label="信用等级" |
||||
min-width="150" |
||||
align="center"> |
||||
</el-table-column> |
||||
<el-table-column label="系数" |
||||
min-width="150" |
||||
align="center"> |
||||
<template #default="{ row }"> |
||||
<el-input v-model="row.coefficient"></el-input> |
||||
</template> |
||||
</el-table-column> |
||||
</el-table> |
||||
|
||||
<h6 class="mt-5 mb-3 text-sm text-[#006BFF] font-semibold">企业评分系数配置</h6> |
||||
<el-table class="c-table" |
||||
:data="form.slice(10)" |
||||
border> |
||||
<el-table-column prop="recordName" |
||||
label="信用等级" |
||||
min-width="150" |
||||
align="center"> |
||||
</el-table-column> |
||||
<el-table-column label="系数" |
||||
min-width="150" |
||||
align="center"> |
||||
<template #default="{ row }"> |
||||
<el-input placeholder="输入系数" |
||||
v-model="row.coefficient"></el-input> |
||||
</template> |
||||
</el-table-column> |
||||
</el-table> |
||||
|
||||
<div class="flex justify-end"> |
||||
<div class="submit" |
||||
@click="submit">完成配置</div> |
||||
</div> |
||||
</template> |
||||
|
||||
<script setup lang="ts"> |
||||
import { ref, onMounted } from 'vue'; |
||||
import { ElMessage } from 'element-plus'; |
||||
import { detailRick, saveRick } from '@/api/model'; |
||||
import { getProcessInformationBasedOnRoles, addOperation } from '@/api/judgment'; |
||||
import { useRouter, useRoute } from 'vue-router'; |
||||
import { handleId } from '@/utils/common'; |
||||
import Cookies from 'js-cookie'; |
||||
|
||||
const router = useRouter(); |
||||
const route = useRoute(); |
||||
const projectId = +Cookies.get('sand-projectId'); |
||||
const levelId = +Cookies.get('sand-level'); |
||||
const form = ref<Record<string, any>[]>([]); |
||||
const info = ref<Record<string, any>[]>([]); |
||||
// 配置项 |
||||
const getConfig = async () => { |
||||
const { process } = await getProcessInformationBasedOnRoles(702); |
||||
const result = []; |
||||
process.forEach((e, i) => { |
||||
e.recordChildren[0]?.recordChildren?.forEach((n, j) => { |
||||
const cur = info.value.length ? info.value[i ? 10 + j : j] : {}; |
||||
result.push({ |
||||
checkpointId: levelId, |
||||
projectId, |
||||
coefficient: cur?.coefficient || '', |
||||
id: cur?.id || '', |
||||
answerId: n.id, |
||||
subjectId: n.subjectId, |
||||
recordName: n.name, |
||||
type: 1, |
||||
}); |
||||
}); |
||||
}); |
||||
form.value = result; |
||||
}; |
||||
// 详情 |
||||
const getDetail = async () => { |
||||
try { |
||||
const { data } = await detailRick({ |
||||
checkpointId: levelId, |
||||
projectId, |
||||
type: 1, |
||||
}); |
||||
info.value = data; |
||||
getConfig(); |
||||
} finally { |
||||
} |
||||
}; |
||||
onMounted(() => { |
||||
getDetail(); |
||||
}); |
||||
|
||||
// 提交 |
||||
const submit = async () => { |
||||
await saveRick({ riskDegreeStrategyList: form.value }); |
||||
addRecord(); |
||||
getDetail(); |
||||
ElMessage.success('配置成功!'); |
||||
}; |
||||
// 新增判分记录 |
||||
const addRecord = async () => { |
||||
const preIds = `1,${Cookies.get('sand-level')},42,149,702`; // 1,关卡id,角色(这个页面是风控经理策略) |
||||
const rule: Array<Record<string, any>> = []; |
||||
|
||||
form.value.forEach((e, i) => { |
||||
e.coefficient && rule.push(handleId(e.answerId, e.subjectId, e.coefficient, `${preIds},${i > 9 ? '706,707' : '705,707'},${e.answerId}`, 3)); |
||||
}); |
||||
|
||||
await addOperation({ |
||||
checkpointId: levelId, |
||||
parentId: preIds, |
||||
lcJudgmentRuleReq: rule, |
||||
projectId, |
||||
}); |
||||
}; |
||||
</script> |
||||
|
||||
<style lang="scss" scoped> |
||||
@import url(../../../styles/form.scss); |
||||
.c-table { |
||||
:deep(.el-input__inner) { |
||||
@apply px-2; |
||||
} |
||||
} |
||||
</style> |
@ -0,0 +1,162 @@ |
||||
<template> |
||||
<!-- 风险度策略-担保方式基础系数 --> |
||||
<div class="mb-3 text-sm font-semibold"> |
||||
单笔贷款风险度公式: |
||||
<span class="text-[#0034ad]">单笔贷款风险度=</span> |
||||
<span class="text-[#8f24ff]">信用等级基础系数</span> |
||||
<span class="text-[#0034ad]"> * </span> |
||||
<span class="text-[#5cc12b]">担保方式基础系数</span> |
||||
<span class="text-[#0034ad]"> * </span> |
||||
<span class="text-[#ed8269]">贷款期限基础系数</span> |
||||
</div> |
||||
<el-table class="c-table" |
||||
:data="form" |
||||
border> |
||||
<el-table-column prop="recordName" |
||||
label="信用等级" |
||||
min-width="150"> |
||||
<template #default="{ row, $index }"> |
||||
<p :class="$index === 5 || $index === 6 || $index === 7 ? 'pl-20' : !$index || $index === 1 || $index === 10 || $index === 23 ? '' : 'pl-10'">{{ row.recordName }}</p> |
||||
</template> |
||||
</el-table-column> |
||||
<el-table-column label="系数" |
||||
min-width="150" |
||||
align="center"> |
||||
<template #default="{ row, $index }"> |
||||
<p v-if="$index === 1 || $index === 4 || $index === 10 || $index === 23">--</p> |
||||
<el-input v-else |
||||
placeholder="输入系数" |
||||
v-model="row.coefficient"></el-input> |
||||
</template> |
||||
</el-table-column> |
||||
</el-table> |
||||
|
||||
<div class="flex justify-end"> |
||||
<div class="submit" |
||||
@click="submit">完成配置</div> |
||||
</div> |
||||
</template> |
||||
|
||||
<script setup lang="ts"> |
||||
import { ref, onMounted } from 'vue'; |
||||
import { ElMessage } from 'element-plus'; |
||||
import { detailRick, saveRick } from '@/api/model'; |
||||
import { getProcessInformationBasedOnRoles, addOperation } from '@/api/judgment'; |
||||
import { useRouter, useRoute } from 'vue-router'; |
||||
import { handleId } from '@/utils/common'; |
||||
import Cookies from 'js-cookie'; |
||||
|
||||
const router = useRouter(); |
||||
const route = useRoute(); |
||||
const projectId = +Cookies.get('sand-projectId'); |
||||
const levelId = +Cookies.get('sand-level'); |
||||
const form = ref<Record<string, any>[]>([]); |
||||
const info = ref<Record<string, any>[]>([]); |
||||
// 配置项 |
||||
const getConfig = async () => { |
||||
const { process } = await getProcessInformationBasedOnRoles(703); |
||||
const result = []; |
||||
process[0]?.recordChildren?.forEach((e, i) => { |
||||
const cur = {}; |
||||
let temp = { |
||||
checkpointId: levelId, |
||||
projectId, |
||||
coefficient: cur?.coefficient || '', |
||||
id: cur?.id || '', |
||||
recordName: e.name, |
||||
type: 2, |
||||
}; |
||||
result.push(temp); |
||||
|
||||
e?.recordChildren?.forEach((n, j) => { |
||||
temp = JSON.parse(JSON.stringify(temp)); |
||||
temp.recordName = n.name; |
||||
temp.coefficient = n.coefficient || ''; |
||||
result.push(temp); |
||||
|
||||
n?.recordChildren?.forEach((m, o) => { |
||||
temp = JSON.parse(JSON.stringify(temp)); |
||||
temp.recordName = m.name; |
||||
temp.coefficient = m.coefficient || ''; |
||||
result.push(temp); |
||||
}); |
||||
}); |
||||
}); |
||||
form.value = result; |
||||
}; |
||||
// 详情 |
||||
const getDetail = async () => { |
||||
try { |
||||
const { data } = await detailRick({ |
||||
checkpointId: levelId, |
||||
projectId, |
||||
type: 2, |
||||
}); |
||||
info.value = data; |
||||
if (data.length) { |
||||
form.value = data; |
||||
} else { |
||||
getConfig(); |
||||
} |
||||
} finally { |
||||
} |
||||
}; |
||||
onMounted(() => { |
||||
getDetail(); |
||||
}); |
||||
|
||||
// 提交 |
||||
const submit = async () => { |
||||
await saveRick({ riskDegreeStrategyList: form.value }); |
||||
addRecord(); |
||||
getDetail(); |
||||
ElMessage.success('配置成功!'); |
||||
}; |
||||
// 新增判分记录 |
||||
const addRecord = async () => { |
||||
const preIds = `1,${Cookies.get('sand-level')},42,149,703,718`; // 1,关卡id,角色(这个页面是风控经理策略) |
||||
const rule: Array<Record<string, any>> = [ |
||||
handleId(719, 232, form.value[0].coefficient, `${preIds},719`, 3), |
||||
handleId(723, 232, form.value[2].coefficient, `${preIds},720,723`, 3), |
||||
handleId(724, 232, form.value[3].coefficient, `${preIds},720,724`, 3), |
||||
handleId(728, 232, form.value[5].coefficient, `${preIds},720,725,728`, 3), |
||||
handleId(729, 232, form.value[6].coefficient, `${preIds},720,725,729`, 3), |
||||
handleId(730, 232, form.value[7].coefficient, `${preIds},720,725,730`, 3), |
||||
handleId(726, 232, form.value[8].coefficient, `${preIds},720,726`, 3), |
||||
handleId(727, 232, form.value[9].coefficient, `${preIds},720,727`, 3), |
||||
handleId(731, 232, form.value[11].coefficient, `${preIds},721,731`, 3), |
||||
handleId(732, 232, form.value[12].coefficient, `${preIds},721,732`, 3), |
||||
handleId(733, 232, form.value[13].coefficient, `${preIds},721,733`, 3), |
||||
handleId(734, 232, form.value[14].coefficient, `${preIds},721,734`, 3), |
||||
handleId(735, 232, form.value[15].coefficient, `${preIds},721,735`, 3), |
||||
handleId(736, 232, form.value[16].coefficient, `${preIds},721,736`, 3), |
||||
handleId(737, 232, form.value[17].coefficient, `${preIds},721,737`, 3), |
||||
handleId(738, 232, form.value[18].coefficient, `${preIds},721,738`, 3), |
||||
handleId(739, 232, form.value[19].coefficient, `${preIds},721,739`, 3), |
||||
handleId(740, 232, form.value[20].coefficient, `${preIds},721,740`, 3), |
||||
handleId(741, 232, form.value[21].coefficient, `${preIds},721,741`, 3), |
||||
handleId(742, 232, form.value[22].coefficient, `${preIds},721,742`, 3), |
||||
|
||||
handleId(743, 232, form.value[24].coefficient, `${preIds},722,743`, 3), |
||||
handleId(744, 232, form.value[25].coefficient, `${preIds},722,744`, 3), |
||||
handleId(745, 232, form.value[26].coefficient, `${preIds},722,745`, 3), |
||||
handleId(746, 232, form.value[27].coefficient, `${preIds},722,746`, 3), |
||||
]; |
||||
|
||||
await addOperation({ |
||||
checkpointId: levelId, |
||||
parentId: preIds, |
||||
lcJudgmentRuleReq: rule, |
||||
projectId, |
||||
}); |
||||
}; |
||||
</script> |
||||
|
||||
<style lang="scss" scoped> |
||||
@import url(../../../styles/form.scss); |
||||
.c-table { |
||||
:deep(.el-input__inner) { |
||||
@apply px-2; |
||||
} |
||||
} |
||||
</style> |
@ -0,0 +1,137 @@ |
||||
<template> |
||||
<!-- 风险度策略-担保方式基础系数 --> |
||||
<div class="mb-3 text-sm font-semibold"> |
||||
单笔贷款风险度公式: |
||||
<span class="text-[#0034ad]">单笔贷款风险度=</span> |
||||
<span class="text-[#8f24ff]">信用等级基础系数</span> |
||||
<span class="text-[#0034ad]"> * </span> |
||||
<span class="text-[#5cc12b]">担保方式基础系数</span> |
||||
<span class="text-[#0034ad]"> * </span> |
||||
<span class="text-[#ed8269]">贷款期限基础系数</span> |
||||
</div> |
||||
<el-table class="c-table" |
||||
:data="form" |
||||
border> |
||||
<el-table-column prop="recordName" |
||||
label="贷款期限" |
||||
min-width="150"> |
||||
<template #default="{ row, $index }"> |
||||
<p :class="!$index || $index === 3 ? '' : 'pl-10'">{{ row.recordName }}</p> |
||||
</template> |
||||
</el-table-column> |
||||
<el-table-column label="系数" |
||||
min-width="150" |
||||
align="center"> |
||||
<template #default="{ row, $index }"> |
||||
<p v-if="!$index || $index === 3">--</p> |
||||
<el-input v-else |
||||
placeholder="输入系数" |
||||
v-model="row.coefficient"></el-input> |
||||
</template> |
||||
</el-table-column> |
||||
</el-table> |
||||
|
||||
<div class="flex justify-end"> |
||||
<div class="submit" |
||||
@click="submit">完成配置</div> |
||||
</div> |
||||
</template> |
||||
|
||||
<script setup lang="ts"> |
||||
import { ref, onMounted } from 'vue'; |
||||
import { ElMessage } from 'element-plus'; |
||||
import { detailRick, saveRick } from '@/api/model'; |
||||
import { getProcessInformationBasedOnRoles, addOperation } from '@/api/judgment'; |
||||
import { useRouter, useRoute } from 'vue-router'; |
||||
import { handleId } from '@/utils/common'; |
||||
import Cookies from 'js-cookie'; |
||||
|
||||
const router = useRouter(); |
||||
const route = useRoute(); |
||||
const projectId = +Cookies.get('sand-projectId'); |
||||
const levelId = +Cookies.get('sand-level'); |
||||
const form = ref<Record<string, any>[]>([]); |
||||
const info = ref<Record<string, any>[]>([]); |
||||
// 配置项 |
||||
const getConfig = async () => { |
||||
const { process } = await getProcessInformationBasedOnRoles(704); |
||||
const result = []; |
||||
process[0]?.recordChildren?.forEach((e, i) => { |
||||
const cur = {}; |
||||
let temp = { |
||||
checkpointId: levelId, |
||||
projectId, |
||||
coefficient: cur?.coefficient || '', |
||||
id: cur?.id || '', |
||||
recordName: e.name, |
||||
type: 3, |
||||
}; |
||||
result.push(temp); |
||||
|
||||
e?.recordChildren?.forEach((n, j) => { |
||||
temp = JSON.parse(JSON.stringify(temp)); |
||||
temp.recordName = n.name; |
||||
temp.coefficient = n.coefficient || ''; |
||||
result.push(temp); |
||||
}); |
||||
}); |
||||
form.value = result; |
||||
}; |
||||
// 详情 |
||||
const getDetail = async () => { |
||||
try { |
||||
const { data } = await detailRick({ |
||||
checkpointId: levelId, |
||||
projectId, |
||||
type: 3, |
||||
}); |
||||
info.value = data; |
||||
if (data.length) { |
||||
form.value = data; |
||||
} else { |
||||
getConfig(); |
||||
} |
||||
} finally { |
||||
} |
||||
}; |
||||
onMounted(() => { |
||||
getDetail(); |
||||
}); |
||||
|
||||
// 提交 |
||||
const submit = async () => { |
||||
await saveRick({ riskDegreeStrategyList: form.value }); |
||||
addRecord(); |
||||
getDetail(); |
||||
ElMessage.success('配置成功!'); |
||||
}; |
||||
// 新增判分记录 |
||||
const addRecord = async () => { |
||||
const preIds = `1,${Cookies.get('sand-level')},42,149,704,747`; // 1,关卡id,角色(这个页面是风控经理策略) |
||||
const rule: Array<Record<string, any>> = [ |
||||
handleId(750, 232, form.value[1].coefficient, `${preIds},748,750`, 3), |
||||
handleId(751, 232, form.value[2].coefficient, `${preIds},748,751`, 3), |
||||
|
||||
handleId(752, 232, form.value[4].coefficient, `${preIds},749,752`, 3), |
||||
handleId(753, 232, form.value[5].coefficient, `${preIds},749,753`, 3), |
||||
handleId(754, 232, form.value[6].coefficient, `${preIds},749,754`, 3), |
||||
handleId(755, 232, form.value[7].coefficient, `${preIds},749,755`, 3), |
||||
]; |
||||
|
||||
await addOperation({ |
||||
checkpointId: levelId, |
||||
parentId: preIds, |
||||
lcJudgmentRuleReq: rule, |
||||
projectId, |
||||
}); |
||||
}; |
||||
</script> |
||||
|
||||
<style lang="scss" scoped> |
||||
@import url(../../../styles/form.scss); |
||||
.c-table { |
||||
:deep(.el-input__inner) { |
||||
@apply px-2; |
||||
} |
||||
} |
||||
</style> |
Loading…
Reference in new issue