修改:JRZQ6F2A
This commit is contained in:
@@ -515,7 +515,7 @@ const featureMap = {
|
|||||||
JRZQ6F2A: {
|
JRZQ6F2A: {
|
||||||
name: "借贷申请",
|
name: "借贷申请",
|
||||||
component: defineAsyncComponent(() => import("@/ui/JRZQ6F2A/index.vue")),
|
component: defineAsyncComponent(() => import("@/ui/JRZQ6F2A/index.vue")),
|
||||||
remark: '借贷申请提供全面的借贷申请行为分析,包括申请次数、申请总次数(银行+非银)和申请机构总数(银行+非银)等多维度数据。通过不同时间段的统计分析,全面展示申请人的借贷申请行为。'
|
remark: '【非银行类贷款】:主要有持牌网络小贷、持牌小贷、持牌消费金融、持牌融资租赁、持牌汽车金融、其他。\n【持牌网络小贷】:小额贷款公司拥有相关牌照和许可证,可以通过互联网为用户提供贷款服务。贷款服务包括抵押贷款、消费贷款等。\n【持牌小贷机构】:是指经国家金融管理部门批准设立并颁发许可证,具备合法资质,可依法在注册地所在省市开展小额贷款业务的非银行类金融机构。\n【持牌消费金融】:是指经银监会批准,在中华人民共和国境内设立的,不吸收公众存款,以小额、分散为原则,为中国境内居民个人提供以消费为目的的贷款的非银行金融机构。\n【持牌融资租赁】:是指持有金融牌照和许可证进行的融资租赁业务的融资租赁机构。\n【持牌汽车金融机构】:是经过国家金融监督管理总局批准设立的、专门提供汽车金融服务的非银行金融机构。主要职责是为中国境内的汽车购买者及销售者提供金融服务,包括但不限于购车贷款、经销商贷款、汽车融资租赁等。\n【其他】:指除以上分类的其他非银行类贷款机构。'
|
||||||
},
|
},
|
||||||
FLXGDEA9: {
|
FLXGDEA9: {
|
||||||
name: "本人不良",
|
name: "本人不良",
|
||||||
@@ -566,11 +566,11 @@ const featureMap = {
|
|||||||
remark: '手机在网时长查询用于检测用户手机号码的在网使用时长。在网时长越长,通常表示用户身份越稳定,信用风险越低。需要注意的是,如果手机号码存在携号转网的情况,那么在网时长会从转网的时候重新计算,转网前的在网时长不计入当前在网时长。建议结合手机携号转网查询结果进行综合评估。'
|
remark: '手机在网时长查询用于检测用户手机号码的在网使用时长。在网时长越长,通常表示用户身份越稳定,信用风险越低。需要注意的是,如果手机号码存在携号转网的情况,那么在网时长会从转网的时候重新计算,转网前的在网时长不计入当前在网时长。建议结合手机携号转网查询结果进行综合评估。'
|
||||||
},
|
},
|
||||||
|
|
||||||
// 支付行为指数
|
// 支付表现
|
||||||
JRZQ3C9R: {
|
JRZQ3C9R: {
|
||||||
name: "支付行为指数",
|
name: "支付表现",
|
||||||
component: defineAsyncComponent(() => import("@/ui/JRZQ3C9R/index.vue")),
|
component: defineAsyncComponent(() => import("@/ui/JRZQ3C9R/index.vue")),
|
||||||
remark: '支付行为指数基于近两年的查验记录、还款成功与失败表现以及余额不足情况,对用户支付与还款习惯进行量化评分,用于评估其支付稳定性与违约风险。'
|
remark: '支付表现是指数基于近两年的查验记录、还款成功与失败表现以及余额不足情况,对用户支付与还款习惯进行量化评分,用于评估其支付稳定性与违约风险。'
|
||||||
},
|
},
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|||||||
71
src/ui/JRZQ6F2A/components/ApplyRemarkSection.vue
Normal file
71
src/ui/JRZQ6F2A/components/ApplyRemarkSection.vue
Normal file
@@ -0,0 +1,71 @@
|
|||||||
|
<template>
|
||||||
|
<div class="card rounded-lg border border-gray-200 pb-2 mb-2">
|
||||||
|
<div class="px-4 pt-4">
|
||||||
|
<LTitle title="借贷意向申请情况与建议" />
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="px-2 pb-4">
|
||||||
|
<!-- 银行类机构申请情况 -->
|
||||||
|
<Remark
|
||||||
|
v-if="remarks.bankSituation"
|
||||||
|
:title="'银行类机构申请情况'"
|
||||||
|
:content="remarks.bankSituation"
|
||||||
|
:default-expanded="true"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<!-- 银行类机构申请建议 -->
|
||||||
|
<Remark
|
||||||
|
:title="'银行类机构申请建议'"
|
||||||
|
:content="remarks.bankAdvice"
|
||||||
|
:default-expanded="false"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<!-- 非银行类机构申请情况 -->
|
||||||
|
<Remark
|
||||||
|
v-if="remarks.nbankSituation"
|
||||||
|
:title="'非银行类机构申请情况'"
|
||||||
|
:content="remarks.nbankSituation"
|
||||||
|
:default-expanded="true"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<!-- 非银行类机构申请建议 -->
|
||||||
|
<Remark
|
||||||
|
:title="'非银行类机构申请建议'"
|
||||||
|
:content="remarks.nbankAdvice"
|
||||||
|
:default-expanded="false"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import { computed } from 'vue'
|
||||||
|
import LTitle from '@/components/LTitle.vue'
|
||||||
|
import Remark from '@/components/Remark.vue'
|
||||||
|
import { getApplyRemarks } from '../utils/dataParser'
|
||||||
|
|
||||||
|
const props = defineProps({
|
||||||
|
data: {
|
||||||
|
type: Object,
|
||||||
|
required: true,
|
||||||
|
default: () => ({}),
|
||||||
|
},
|
||||||
|
// 维度:id(身份证) / cell(手机号)
|
||||||
|
dimension: {
|
||||||
|
type: String,
|
||||||
|
default: 'id',
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
const remarks = computed(() => {
|
||||||
|
return getApplyRemarks(props.data || {}, props.dimension)
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.card {
|
||||||
|
background: #ffffff;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
|
|
||||||
@@ -8,7 +8,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- 详细列表:在图表下方,展示所有项并带颜色标识 -->
|
<!-- 详细列表:在图表下方,展示所有项并带颜色标识 -->
|
||||||
<div class="space-y-2">
|
<div class="space-y-2 mb-2">
|
||||||
<div v-for="(item, index) in detailList" :key="index" class="flex justify-between items-center text-sm">
|
<div v-for="(item, index) in detailList" :key="index" class="flex justify-between items-center text-sm">
|
||||||
<div class="flex items-center">
|
<div class="flex items-center">
|
||||||
<span class="w-2 h-2 rounded-full mr-2" :style="{ backgroundColor: item.color }" />
|
<span class="w-2 h-2 rounded-full mr-2" :style="{ backgroundColor: item.color }" />
|
||||||
@@ -17,8 +17,13 @@
|
|||||||
<span class="text-[#333333] font-bold">{{ item.value }}次</span>
|
<span class="text-[#333333] font-bold">{{ item.value }}次</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<!-- 银行类机构申请情况(近1年 / 近3个月,仅在12个月tab下展示) -->
|
||||||
|
<Remark v-if="period === 'm12' && applyRemarks.bankSituation" :title="'银行类机构申请情况'"
|
||||||
|
:content="applyRemarks.bankSituation" :default-expanded="true" />
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
@@ -33,7 +38,8 @@ import {
|
|||||||
LegendComponent
|
LegendComponent
|
||||||
} from 'echarts/components'
|
} from 'echarts/components'
|
||||||
import LTitle from '@/components/LTitle.vue'
|
import LTitle from '@/components/LTitle.vue'
|
||||||
import { getBankApplicationDetails, FIELD_LABELS } from '../utils/dataParser'
|
import Remark from '@/components/Remark.vue'
|
||||||
|
import { getBankApplicationDetails, FIELD_LABELS, getApplyRemarks } from '../utils/dataParser'
|
||||||
|
|
||||||
// 注册ECharts组件
|
// 注册ECharts组件
|
||||||
use([
|
use([
|
||||||
@@ -78,6 +84,11 @@ const bankDetails = computed(() =>
|
|||||||
getBankApplicationDetails(props.data, props.period, props.dimension)
|
getBankApplicationDetails(props.data, props.period, props.dimension)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
// 申请情况与建议(使用整体数据 + 当前维度)
|
||||||
|
const applyRemarks = computed(() => {
|
||||||
|
return getApplyRemarks(props.data || {}, props.dimension)
|
||||||
|
})
|
||||||
|
|
||||||
// 计算银行机构总次数
|
// 计算银行机构总次数
|
||||||
const bankTotal = computed(() => {
|
const bankTotal = computed(() => {
|
||||||
const details = bankDetails.value
|
const details = bankDetails.value
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- 详细列表:在图表下方,展示所有项并带颜色标识 -->
|
<!-- 详细列表:在图表下方,展示所有项并带颜色标识 -->
|
||||||
<div class="space-y-2">
|
<div class="space-y-2 mb-2">
|
||||||
<div v-for="(item, index) in detailList" :key="index" class="flex justify-between items-center text-sm">
|
<div v-for="(item, index) in detailList" :key="index" class="flex justify-between items-center text-sm">
|
||||||
<div class="flex items-center">
|
<div class="flex items-center">
|
||||||
<span class="w-2 h-2 rounded-full mr-2" :style="{ backgroundColor: item.color }" />
|
<span class="w-2 h-2 rounded-full mr-2" :style="{ backgroundColor: item.color }" />
|
||||||
@@ -17,8 +17,13 @@
|
|||||||
<span class="text-[#333333] font-bold">{{ item.value }}家</span>
|
<span class="text-[#333333] font-bold">{{ item.value }}家</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<!-- 银行类机构申请建议(仅在12个月tab下展示) -->
|
||||||
|
<Remark v-if="period === 'm12' && applyRemarks.bankAdvice" :title="'银行类机构申请建议'" :content="applyRemarks.bankAdvice"
|
||||||
|
:default-expanded="false" />
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
@@ -33,7 +38,8 @@ import {
|
|||||||
LegendComponent
|
LegendComponent
|
||||||
} from 'echarts/components'
|
} from 'echarts/components'
|
||||||
import LTitle from '@/components/LTitle.vue'
|
import LTitle from '@/components/LTitle.vue'
|
||||||
import { getBankOrgDetails, FIELD_LABELS } from '../utils/dataParser'
|
import Remark from '@/components/Remark.vue'
|
||||||
|
import { getBankOrgDetails, FIELD_LABELS, getApplyRemarks } from '../utils/dataParser'
|
||||||
|
|
||||||
// 注册ECharts组件
|
// 注册ECharts组件
|
||||||
use([
|
use([
|
||||||
@@ -78,6 +84,11 @@ const bankOrgs = computed(() =>
|
|||||||
getBankOrgDetails(props.data, props.period, props.dimension)
|
getBankOrgDetails(props.data, props.period, props.dimension)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
// 申请情况与建议(使用整体数据 + 当前维度)
|
||||||
|
const applyRemarks = computed(() => {
|
||||||
|
return getApplyRemarks(props.data || {}, props.dimension)
|
||||||
|
})
|
||||||
|
|
||||||
// 计算银行机构总数
|
// 计算银行机构总数
|
||||||
const bankTotal = computed(() => {
|
const bankTotal = computed(() => {
|
||||||
const orgs = bankOrgs.value
|
const orgs = bankOrgs.value
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- 详细列表:在图表下方,展示所有项并带颜色标识 -->
|
<!-- 详细列表:在图表下方,展示所有项并带颜色标识 -->
|
||||||
<div class="space-y-2">
|
<div class="space-y-2 mb-2">
|
||||||
<div v-for="(item, index) in detailList" :key="index" class="flex justify-between items-center text-sm">
|
<div v-for="(item, index) in detailList" :key="index" class="flex justify-between items-center text-sm">
|
||||||
<div class="flex items-center">
|
<div class="flex items-center">
|
||||||
<span class="w-2 h-2 rounded-full mr-2" :style="{ backgroundColor: item.color }" />
|
<span class="w-2 h-2 rounded-full mr-2" :style="{ backgroundColor: item.color }" />
|
||||||
@@ -17,8 +17,13 @@
|
|||||||
<span class="text-[#333333] font-bold">{{ item.value }}次</span>
|
<span class="text-[#333333] font-bold">{{ item.value }}次</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<!-- 非银行类机构申请情况(近1年 / 近3个月,仅在12个月tab下展示) -->
|
||||||
|
<Remark v-if="period === 'm12' && applyRemarks.nbankSituation" :title="'非银行类机构申请情况'"
|
||||||
|
:content="applyRemarks.nbankSituation" :default-expanded="true" />
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
@@ -33,7 +38,8 @@ import {
|
|||||||
LegendComponent
|
LegendComponent
|
||||||
} from 'echarts/components'
|
} from 'echarts/components'
|
||||||
import LTitle from '@/components/LTitle.vue'
|
import LTitle from '@/components/LTitle.vue'
|
||||||
import { getNBankApplicationDetails, FIELD_LABELS } from '../utils/dataParser'
|
import Remark from '@/components/Remark.vue'
|
||||||
|
import { getNBankApplicationDetails, FIELD_LABELS, getApplyRemarks } from '../utils/dataParser'
|
||||||
|
|
||||||
// 注册ECharts组件
|
// 注册ECharts组件
|
||||||
use([
|
use([
|
||||||
@@ -78,6 +84,11 @@ const nbankDetails = computed(() =>
|
|||||||
getNBankApplicationDetails(props.data, props.period, props.dimension)
|
getNBankApplicationDetails(props.data, props.period, props.dimension)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
// 申请情况与建议(使用整体数据 + 当前维度)
|
||||||
|
const applyRemarks = computed(() => {
|
||||||
|
return getApplyRemarks(props.data || {}, props.dimension)
|
||||||
|
})
|
||||||
|
|
||||||
// 计算非银机构总次数
|
// 计算非银机构总次数
|
||||||
const nbankTotal = computed(() => {
|
const nbankTotal = computed(() => {
|
||||||
const details = nbankDetails.value
|
const details = nbankDetails.value
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- 详细列表:在图表下方,展示所有项并带颜色标识 -->
|
<!-- 详细列表:在图表下方,展示所有项并带颜色标识 -->
|
||||||
<div class="space-y-2">
|
<div class="space-y-2 mb-2">
|
||||||
<div v-for="(item, index) in detailList" :key="index" class="flex justify-between items-center text-sm">
|
<div v-for="(item, index) in detailList" :key="index" class="flex justify-between items-center text-sm">
|
||||||
<div class="flex items-center">
|
<div class="flex items-center">
|
||||||
<span class="w-2 h-2 rounded-full mr-2" :style="{ backgroundColor: item.color }" />
|
<span class="w-2 h-2 rounded-full mr-2" :style="{ backgroundColor: item.color }" />
|
||||||
@@ -17,8 +17,14 @@
|
|||||||
<span class="text-[#333333] font-bold">{{ item.value }}家</span>
|
<span class="text-[#333333] font-bold">{{ item.value }}家</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<!-- 非银行类机构申请建议(仅在12个月tab下展示) -->
|
||||||
|
<Remark v-if="period === 'm12' && applyRemarks.nbankAdvice" :title="'非银行类机构申请建议'" :content="applyRemarks.nbankAdvice"
|
||||||
|
:default-expanded="false" />
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
@@ -33,7 +39,8 @@ import {
|
|||||||
LegendComponent
|
LegendComponent
|
||||||
} from 'echarts/components'
|
} from 'echarts/components'
|
||||||
import LTitle from '@/components/LTitle.vue'
|
import LTitle from '@/components/LTitle.vue'
|
||||||
import { getNBankOrgDetails, FIELD_LABELS } from '../utils/dataParser'
|
import Remark from '@/components/Remark.vue'
|
||||||
|
import { getNBankOrgDetails, FIELD_LABELS, getApplyRemarks } from '../utils/dataParser'
|
||||||
|
|
||||||
// 注册ECharts组件
|
// 注册ECharts组件
|
||||||
use([
|
use([
|
||||||
@@ -78,6 +85,11 @@ const nbankOrgs = computed(() =>
|
|||||||
getNBankOrgDetails(props.data, props.period, props.dimension)
|
getNBankOrgDetails(props.data, props.period, props.dimension)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
// 申请情况与建议(使用整体数据 + 当前维度)
|
||||||
|
const applyRemarks = computed(() => {
|
||||||
|
return getApplyRemarks(props.data || {}, props.dimension)
|
||||||
|
})
|
||||||
|
|
||||||
// 计算非银机构总数
|
// 计算非银机构总数
|
||||||
const nbankTotal = computed(() => {
|
const nbankTotal = computed(() => {
|
||||||
const orgs = nbankOrgs.value
|
const orgs = nbankOrgs.value
|
||||||
|
|||||||
@@ -28,12 +28,29 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<!-- 风险汇总 -->
|
||||||
|
<div class="px-4 pb-4 mt-4">
|
||||||
|
<LTitle title="风险汇总" />
|
||||||
|
<div class="space-y-2 mt-3">
|
||||||
|
<div v-for="risk in riskSummary" :key="risk.label" class="flex justify-between items-center text-sm">
|
||||||
|
<span class="text-gray-600">{{ risk.label }}</span>
|
||||||
|
<span class="font-semibold" :class="getRiskClass(risk.value)">{{ risk.value }}</span>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- 风险汇总解读 -->
|
||||||
|
<Remark :content="riskRemark" title="风险解读" :default-expanded="true" />
|
||||||
|
</div>
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { computed } from 'vue'
|
import { computed } from 'vue'
|
||||||
import { getApplicationCounts, getBankOrgDetails, getNBankOrgDetails } from '../utils/dataParser'
|
import LTitle from '@/components/LTitle.vue'
|
||||||
|
import Remark from '@/components/Remark.vue'
|
||||||
|
import { getApplicationCounts, getBankOrgDetails, getNBankOrgDetails, getRiskSummary, generateRiskRemark } from '../utils/dataParser'
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
data: {
|
data: {
|
||||||
@@ -79,6 +96,32 @@ const items = computed(() => {
|
|||||||
{ label: '周末申请次数', value: weekendTotal || 0, unit: '次' },
|
{ label: '周末申请次数', value: weekendTotal || 0, unit: '次' },
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
|
|
||||||
|
// 风险汇总
|
||||||
|
const riskSummary = computed(() => {
|
||||||
|
return getRiskSummary(props.data || {}, props.dimension)
|
||||||
|
})
|
||||||
|
|
||||||
|
// 风险汇总解读文本
|
||||||
|
const riskRemark = computed(() => {
|
||||||
|
return generateRiskRemark(riskSummary.value)
|
||||||
|
})
|
||||||
|
|
||||||
|
// 根据风险等级返回对应的样式类
|
||||||
|
const getRiskClass = (level) => {
|
||||||
|
switch (level) {
|
||||||
|
case '无风险':
|
||||||
|
return 'text-green-600'
|
||||||
|
case '低风险':
|
||||||
|
return 'text-blue-600'
|
||||||
|
case '中风险':
|
||||||
|
return 'text-amber-600'
|
||||||
|
case '高风险':
|
||||||
|
return 'text-red-600'
|
||||||
|
default:
|
||||||
|
return 'text-gray-600'
|
||||||
|
}
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
|||||||
@@ -164,11 +164,19 @@ export function getNBankApplicationDetails(
|
|||||||
cf: getValue(variableValue[`${prefix}_${dimKey}_nbank_cf_allnum`]), // 消费类分期机构
|
cf: getValue(variableValue[`${prefix}_${dimKey}_nbank_cf_allnum`]), // 消费类分期机构
|
||||||
com: getValue(variableValue[`${prefix}_${dimKey}_nbank_com_allnum`]), // 代偿类分期机构
|
com: getValue(variableValue[`${prefix}_${dimKey}_nbank_com_allnum`]), // 代偿类分期机构
|
||||||
oth: getValue(variableValue[`${prefix}_${dimKey}_nbank_oth_allnum`]), // 其他申请
|
oth: getValue(variableValue[`${prefix}_${dimKey}_nbank_oth_allnum`]), // 其他申请
|
||||||
nsloan: getValue(variableValue[`${prefix}_${dimKey}_nbank_nsloan_allnum`]), // 持牌网络小贷机构
|
nsloan: getValue(
|
||||||
autofin: getValue(variableValue[`${prefix}_${dimKey}_nbank_autofin_allnum`]), // 持牌汽车金融机构
|
variableValue[`${prefix}_${dimKey}_nbank_nsloan_allnum`]
|
||||||
sloan: getValue(variableValue[`${prefix}_${dimKey}_nbank_sloan_allnum`]), // 持牌小贷机构
|
), // 持牌网络小贷机构
|
||||||
|
autofin: getValue(
|
||||||
|
variableValue[`${prefix}_${dimKey}_nbank_autofin_allnum`]
|
||||||
|
), // 持牌汽车金融机构
|
||||||
|
sloan: getValue(
|
||||||
|
variableValue[`${prefix}_${dimKey}_nbank_sloan_allnum`]
|
||||||
|
), // 持牌小贷机构
|
||||||
cons: getValue(variableValue[`${prefix}_${dimKey}_nbank_cons_allnum`]), // 持牌消费金融机构
|
cons: getValue(variableValue[`${prefix}_${dimKey}_nbank_cons_allnum`]), // 持牌消费金融机构
|
||||||
finlea: getValue(variableValue[`${prefix}_${dimKey}_nbank_finlea_allnum`]), // 持牌融资租赁机构
|
finlea: getValue(
|
||||||
|
variableValue[`${prefix}_${dimKey}_nbank_finlea_allnum`]
|
||||||
|
), // 持牌融资租赁机构
|
||||||
else: getValue(variableValue[`${prefix}_${dimKey}_nbank_else_allnum`]), // 其他申请
|
else: getValue(variableValue[`${prefix}_${dimKey}_nbank_else_allnum`]), // 其他申请
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@@ -210,11 +218,19 @@ export function getNBankOrgDetails(variableValue, period, dimension = "id") {
|
|||||||
cf: getValue(variableValue[`${prefix}_${dimKey}_nbank_cf_orgnum`]),
|
cf: getValue(variableValue[`${prefix}_${dimKey}_nbank_cf_orgnum`]),
|
||||||
com: getValue(variableValue[`${prefix}_${dimKey}_nbank_com_orgnum`]),
|
com: getValue(variableValue[`${prefix}_${dimKey}_nbank_com_orgnum`]),
|
||||||
oth: getValue(variableValue[`${prefix}_${dimKey}_nbank_oth_orgnum`]),
|
oth: getValue(variableValue[`${prefix}_${dimKey}_nbank_oth_orgnum`]),
|
||||||
nsloan: getValue(variableValue[`${prefix}_${dimKey}_nbank_nsloan_orgnum`]),
|
nsloan: getValue(
|
||||||
autofin: getValue(variableValue[`${prefix}_${dimKey}_nbank_autofin_orgnum`]),
|
variableValue[`${prefix}_${dimKey}_nbank_nsloan_orgnum`]
|
||||||
sloan: getValue(variableValue[`${prefix}_${dimKey}_nbank_sloan_orgnum`]),
|
),
|
||||||
|
autofin: getValue(
|
||||||
|
variableValue[`${prefix}_${dimKey}_nbank_autofin_orgnum`]
|
||||||
|
),
|
||||||
|
sloan: getValue(
|
||||||
|
variableValue[`${prefix}_${dimKey}_nbank_sloan_orgnum`]
|
||||||
|
),
|
||||||
cons: getValue(variableValue[`${prefix}_${dimKey}_nbank_cons_orgnum`]),
|
cons: getValue(variableValue[`${prefix}_${dimKey}_nbank_cons_orgnum`]),
|
||||||
finlea: getValue(variableValue[`${prefix}_${dimKey}_nbank_finlea_orgnum`]),
|
finlea: getValue(
|
||||||
|
variableValue[`${prefix}_${dimKey}_nbank_finlea_orgnum`]
|
||||||
|
),
|
||||||
else: getValue(variableValue[`${prefix}_${dimKey}_nbank_else_orgnum`]),
|
else: getValue(variableValue[`${prefix}_${dimKey}_nbank_else_orgnum`]),
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@@ -254,3 +270,249 @@ export const FIELD_LABELS = {
|
|||||||
else: "其他申请",
|
else: "其他申请",
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据申请次数计算风险等级
|
||||||
|
* @param {number} count 申请次数
|
||||||
|
* @returns {string} 风险等级:无风险、低风险、中风险、高风险
|
||||||
|
*/
|
||||||
|
export function calculateRiskLevel(count) {
|
||||||
|
const num = Number(count) || 0;
|
||||||
|
if (num === 0) {
|
||||||
|
return "无风险";
|
||||||
|
} else if (num >= 1 && num <= 3) {
|
||||||
|
return "低风险";
|
||||||
|
} else if (num >= 4 && num <= 8) {
|
||||||
|
return "中风险";
|
||||||
|
} else {
|
||||||
|
return "高风险";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取各机构类型的风险汇总(近12个月)
|
||||||
|
* @param {Object} variableValue 数据对象
|
||||||
|
* @param {string} dimension 维度:id(身份证) / cell(手机号)
|
||||||
|
* @returns {Array} 风险汇总列表,格式:[{label: '机构类型风险等级', value: '风险等级'}]
|
||||||
|
*/
|
||||||
|
export function getRiskSummary(variableValue, dimension = "id") {
|
||||||
|
const dimKey = dimension === "cell" ? "cell" : "id";
|
||||||
|
const prefix = "als_m12"; // 近12个月
|
||||||
|
|
||||||
|
// 银行类机构申请次数
|
||||||
|
const bankCount =
|
||||||
|
getValue(variableValue[`${prefix}_${dimKey}_bank_allnum`]) || 0;
|
||||||
|
|
||||||
|
// 非银行类机构申请次数
|
||||||
|
const nbankCount =
|
||||||
|
getValue(variableValue[`${prefix}_${dimKey}_nbank_allnum`]) || 0;
|
||||||
|
|
||||||
|
// 持牌网络小贷机构申请次数
|
||||||
|
const nsloanCount =
|
||||||
|
getValue(variableValue[`${prefix}_${dimKey}_nbank_nsloan_allnum`]) || 0;
|
||||||
|
|
||||||
|
// 持牌小贷机构申请次数
|
||||||
|
const sloanCount =
|
||||||
|
getValue(variableValue[`${prefix}_${dimKey}_nbank_sloan_allnum`]) || 0;
|
||||||
|
|
||||||
|
// 持牌消费金融机构申请次数
|
||||||
|
const consCount =
|
||||||
|
getValue(variableValue[`${prefix}_${dimKey}_nbank_cons_allnum`]) || 0;
|
||||||
|
|
||||||
|
// 持牌融资租赁机构申请次数
|
||||||
|
const finleaCount =
|
||||||
|
getValue(variableValue[`${prefix}_${dimKey}_nbank_finlea_allnum`]) || 0;
|
||||||
|
|
||||||
|
// 持牌汽车金融机构申请次数
|
||||||
|
const autofinCount =
|
||||||
|
getValue(variableValue[`${prefix}_${dimKey}_nbank_autofin_allnum`]) ||
|
||||||
|
0;
|
||||||
|
|
||||||
|
// 其他非银机构申请次数(包括 p2p, mc, ca, cf, com, oth, else)
|
||||||
|
const p2pCount =
|
||||||
|
getValue(variableValue[`${prefix}_${dimKey}_nbank_p2p_allnum`]) || 0;
|
||||||
|
const mcCount =
|
||||||
|
getValue(variableValue[`${prefix}_${dimKey}_nbank_mc_allnum`]) || 0;
|
||||||
|
const caCount =
|
||||||
|
getValue(variableValue[`${prefix}_${dimKey}_nbank_ca_allnum`]) || 0;
|
||||||
|
const cfCount =
|
||||||
|
getValue(variableValue[`${prefix}_${dimKey}_nbank_cf_allnum`]) || 0;
|
||||||
|
const comCount =
|
||||||
|
getValue(variableValue[`${prefix}_${dimKey}_nbank_com_allnum`]) || 0;
|
||||||
|
const othCount =
|
||||||
|
getValue(variableValue[`${prefix}_${dimKey}_nbank_oth_allnum`]) || 0;
|
||||||
|
const elseCount =
|
||||||
|
getValue(variableValue[`${prefix}_${dimKey}_nbank_else_allnum`]) || 0;
|
||||||
|
const otherNbankCount =
|
||||||
|
p2pCount +
|
||||||
|
mcCount +
|
||||||
|
caCount +
|
||||||
|
cfCount +
|
||||||
|
comCount +
|
||||||
|
othCount +
|
||||||
|
elseCount;
|
||||||
|
|
||||||
|
return [
|
||||||
|
{
|
||||||
|
label: "银行类机构风险等级",
|
||||||
|
value: calculateRiskLevel(bankCount),
|
||||||
|
count: bankCount,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "非银行类机构风险等级",
|
||||||
|
value: calculateRiskLevel(nbankCount),
|
||||||
|
count: nbankCount,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "持牌网络小贷机构风险等级",
|
||||||
|
value: calculateRiskLevel(nsloanCount),
|
||||||
|
count: nsloanCount,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "持牌小贷机构风险等级",
|
||||||
|
value: calculateRiskLevel(sloanCount),
|
||||||
|
count: sloanCount,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "持牌消费金融机构风险等级",
|
||||||
|
value: calculateRiskLevel(consCount),
|
||||||
|
count: consCount,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "持牌融资租赁机构风险等级",
|
||||||
|
value: calculateRiskLevel(finleaCount),
|
||||||
|
count: finleaCount,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "持牌汽车金融机构风险等级",
|
||||||
|
value: calculateRiskLevel(autofinCount),
|
||||||
|
count: autofinCount,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "其他非银机构风险等级",
|
||||||
|
value: calculateRiskLevel(otherNbankCount),
|
||||||
|
count: otherNbankCount,
|
||||||
|
},
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 生成风险汇总解读文本
|
||||||
|
* @param {Array} riskSummary 风险汇总列表
|
||||||
|
* @returns {string} 解读文本
|
||||||
|
*/
|
||||||
|
export function generateRiskRemark(riskSummary) {
|
||||||
|
if (!riskSummary || riskSummary.length === 0) {
|
||||||
|
return "暂无风险数据。";
|
||||||
|
}
|
||||||
|
|
||||||
|
// 按风险等级优先级排序:高风险 > 中风险 > 低风险 > 无风险
|
||||||
|
const riskPriority = { 高风险: 4, 中风险: 3, 低风险: 2, 无风险: 1 };
|
||||||
|
const sortedRisks = riskSummary
|
||||||
|
.filter((r) => r.value !== "无风险")
|
||||||
|
.sort(
|
||||||
|
(a, b) =>
|
||||||
|
(riskPriority[b.value] || 0) - (riskPriority[a.value] || 0)
|
||||||
|
);
|
||||||
|
|
||||||
|
if (sortedRisks.length === 0) {
|
||||||
|
return "经大数据分析,您在各机构类型的风险等级均为无风险,信用状况良好。请您继续保持良好的借还款履约行为,维护个人信用。";
|
||||||
|
}
|
||||||
|
|
||||||
|
// 取最高风险的机构类型
|
||||||
|
const highestRisk = sortedRisks[0];
|
||||||
|
const orgType = highestRisk.label.replace("风险等级", ""); // 去掉"风险等级"后缀
|
||||||
|
const riskLevel = highestRisk.value;
|
||||||
|
const count = highestRisk.count || 0;
|
||||||
|
|
||||||
|
// 生成解读文本
|
||||||
|
let remark = `经大数据分析,您命中${orgType}风险等级的${riskLevel}名单`;
|
||||||
|
|
||||||
|
if (count > 0) {
|
||||||
|
remark += `,历史命中 ${count} 次`;
|
||||||
|
}
|
||||||
|
|
||||||
|
remark += `,最近一次进入${orgType}风险等级的${riskLevel}名单在近 1 年内。请您注意对应机构的正常借还款履约行为,提高信用评价。`;
|
||||||
|
|
||||||
|
return remark;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 将风险等级映射为“贷款申请需求”文本
|
||||||
|
*/
|
||||||
|
function mapRiskToDemandText(level) {
|
||||||
|
switch (level) {
|
||||||
|
case "高风险":
|
||||||
|
return "贷款申请需求较高";
|
||||||
|
case "中风险":
|
||||||
|
return "贷款申请需求适中";
|
||||||
|
case "低风险":
|
||||||
|
case "无风险":
|
||||||
|
default:
|
||||||
|
return "贷款申请需求较低";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 将风险等级映射为“贷款申请频率”文本
|
||||||
|
*/
|
||||||
|
function mapRiskToFrequencyText(level) {
|
||||||
|
switch (level) {
|
||||||
|
case "高风险":
|
||||||
|
return "贷款申请频率较高";
|
||||||
|
case "中风险":
|
||||||
|
return "贷款申请频率适中";
|
||||||
|
case "低风险":
|
||||||
|
case "无风险":
|
||||||
|
default:
|
||||||
|
return "贷款申请频率较低";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 生成银行 / 非银申请情况解读(近1年 / 近3个月)
|
||||||
|
* @param {Object} variableValue
|
||||||
|
* @param {string} dimension
|
||||||
|
* @returns {{ bankSituation: string, bankAdvice: string, nbankSituation: string, nbankAdvice: string }}
|
||||||
|
*/
|
||||||
|
export function getApplyRemarks(variableValue, dimension = "id") {
|
||||||
|
const v = variableValue || {};
|
||||||
|
|
||||||
|
// 近12个月 & 近3个月 申请次数
|
||||||
|
const m12 = getApplicationCounts(v, "m12", dimension);
|
||||||
|
const m3 = getApplicationCounts(v, "m3", dimension);
|
||||||
|
|
||||||
|
const bankYearCount = m12.bank || 0;
|
||||||
|
const bank3mCount = m3.bank || 0;
|
||||||
|
const nbankYearCount = m12.nbank || 0;
|
||||||
|
const nbank3mCount = m3.nbank || 0;
|
||||||
|
|
||||||
|
// 使用风险等级来映射需求 / 频率文本
|
||||||
|
const bankYearRisk = calculateRiskLevel(bankYearCount);
|
||||||
|
const bank3mRisk = calculateRiskLevel(bank3mCount);
|
||||||
|
const nbankYearRisk = calculateRiskLevel(nbankYearCount);
|
||||||
|
const nbank3mRisk = calculateRiskLevel(nbank3mCount);
|
||||||
|
|
||||||
|
const bankDemandText = mapRiskToDemandText(bankYearRisk);
|
||||||
|
const bankFreqText = mapRiskToFrequencyText(bank3mRisk);
|
||||||
|
const nbankDemandText = mapRiskToDemandText(nbankYearRisk);
|
||||||
|
const nbankFreqText = mapRiskToFrequencyText(nbank3mRisk);
|
||||||
|
|
||||||
|
const advice =
|
||||||
|
"报告检测的是近12个月内的申请数据,含同一机构。如果申请过于频繁会对评审有影响,请保持良好的借贷习惯,切勿频繁申请,拒绝不明平台的审核邀请。";
|
||||||
|
|
||||||
|
const bankSituation =
|
||||||
|
`近一年申请次数:${bankYearCount}次,${bankDemandText}\n` +
|
||||||
|
`近3个月申请次数:${bank3mCount}次,${bankFreqText}`;
|
||||||
|
|
||||||
|
const nbankSituation =
|
||||||
|
`近一年申请次数:${nbankYearCount}次,${nbankDemandText}\n` +
|
||||||
|
`近3个月申请次数:${nbank3mCount}次,${nbankFreqText}`;
|
||||||
|
|
||||||
|
return {
|
||||||
|
bankSituation,
|
||||||
|
bankAdvice: advice,
|
||||||
|
nbankSituation,
|
||||||
|
nbankAdvice: advice,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user