Compare commits
No commits in common. "52d8f2874ff4f835de55848365683b214ef41fdc" and "d13add7f3a0b1f475bca4f6a62dc6809e923da7b" have entirely different histories.
52d8f2874f
...
d13add7f3a
@ -24,7 +24,7 @@ const route = useRoute()
|
|||||||
|
|
||||||
// 获取通知数据
|
// 获取通知数据
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
// getGlobalNotify()
|
getGlobalNotify()
|
||||||
})
|
})
|
||||||
|
|
||||||
// 获取通知数据
|
// 获取通知数据
|
||||||
|
@ -1,87 +0,0 @@
|
|||||||
<script setup>
|
|
||||||
import LTitle from "@/components/LTitle.vue";
|
|
||||||
|
|
||||||
const props = defineProps({
|
|
||||||
data: {
|
|
||||||
type: Object,
|
|
||||||
required: true,
|
|
||||||
},
|
|
||||||
});
|
|
||||||
const { data } = props;
|
|
||||||
|
|
||||||
// 状态映射,包括显示的文字和样式
|
|
||||||
const statusMap = {
|
|
||||||
0: {
|
|
||||||
text: "未婚或尚未登记结婚",
|
|
||||||
bgClass: "bg-yellow-100",
|
|
||||||
textClass: "text-yellow-700",
|
|
||||||
description: "未进行民政登记婚姻",
|
|
||||||
},
|
|
||||||
1: {
|
|
||||||
text: "已婚",
|
|
||||||
bgClass: "bg-green-100",
|
|
||||||
textClass: "text-green-700",
|
|
||||||
description: "已登记婚姻,家庭幸福美满",
|
|
||||||
},
|
|
||||||
2: {
|
|
||||||
text: "离异",
|
|
||||||
bgClass: "bg-red-100",
|
|
||||||
textClass: "text-red-700",
|
|
||||||
description: "离异状态,未来生活可期",
|
|
||||||
},
|
|
||||||
3: {
|
|
||||||
text: "离婚冷静期",
|
|
||||||
bgClass: "bg-blue-100",
|
|
||||||
textClass: "text-blue-700",
|
|
||||||
description: "目前处于离婚冷静期,请谨慎决策",
|
|
||||||
},
|
|
||||||
};
|
|
||||||
|
|
||||||
// 根据 `data.status` 确定当前状态,默认值为 “无相关记录”
|
|
||||||
const currentStatus =
|
|
||||||
data.status !== undefined
|
|
||||||
? statusMap[data.status] || statusMap["0"]
|
|
||||||
: {
|
|
||||||
text: "无相关记录",
|
|
||||||
bgClass: "bg-gray-200",
|
|
||||||
textClass: "text-gray-500",
|
|
||||||
description: "暂无婚姻相关记录",
|
|
||||||
};
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<template>
|
|
||||||
<div class="card">
|
|
||||||
<div class="status-info flex flex-col items-center ">
|
|
||||||
<div
|
|
||||||
:class="`status-label rounded-full px-6 py-3 text-center font-bold shadow-md ${currentStatus.bgClass} ${currentStatus.textClass}`">
|
|
||||||
{{ currentStatus.text }}
|
|
||||||
</div>
|
|
||||||
<p class="status-description mt-3 text-sm text-gray-600">
|
|
||||||
{{ currentStatus.description }}
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
|
||||||
.status-info {
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
.status-label {
|
|
||||||
font-size: 1.25rem;
|
|
||||||
padding: 0.75rem 1.5rem;
|
|
||||||
border-radius: 9999px;
|
|
||||||
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
|
|
||||||
}
|
|
||||||
|
|
||||||
.status-description {
|
|
||||||
color: #4a5568;
|
|
||||||
margin-top: 0.5rem;
|
|
||||||
font-weight: 500;
|
|
||||||
}
|
|
||||||
|
|
||||||
.additional-info p {
|
|
||||||
margin-top: 0.5rem;
|
|
||||||
}
|
|
||||||
</style>
|
|
@ -50,9 +50,7 @@ const currentStatus =
|
|||||||
text: "暂无相关婚姻记录",
|
text: "暂无相关婚姻记录",
|
||||||
bgClass: "bg-gray-200",
|
bgClass: "bg-gray-200",
|
||||||
textClass: "text-gray-500",
|
textClass: "text-gray-500",
|
||||||
// description: "由于民政部门系统正在升级,当前查询功能暂未恢复。<br />1. 当系统恢复查询功能时,我们将第一时间更新报告(您可以在我的历史查询记录中查看),并通过短信通知您。<br />2. 如果30个工作日内未能查询到相关信息,我们承诺将为您退款26.8元的婚姻状态查询费用。",
|
description: "由于民政部门系统正在升级,当前查询功能暂未恢复。<br />1. 当系统恢复查询功能时,我们将第一时间更新报告(您可以在我的历史查询记录中查看),并通过短信通知您。<br />2. 如果30个工作日内未能查询到相关信息,我们承诺将为您退款26.8元的婚姻状态查询费用。",
|
||||||
description: "暂无婚姻相关记录",
|
|
||||||
|
|
||||||
} : {
|
} : {
|
||||||
text: "无相关记录",
|
text: "无相关记录",
|
||||||
bgClass: "bg-gray-200",
|
bgClass: "bg-gray-200",
|
||||||
|
@ -43,10 +43,6 @@ const featureMap = {
|
|||||||
name: '企业涉诉',
|
name: '企业涉诉',
|
||||||
component: defineAsyncComponent(() => import('@/ui/CLawsuit.vue')),
|
component: defineAsyncComponent(() => import('@/ui/CLawsuit.vue')),
|
||||||
},
|
},
|
||||||
G22SC01: {
|
|
||||||
name: '司法涉诉',
|
|
||||||
component: defineAsyncComponent(() => import('@/ui/CLawsuitPP.vue')),
|
|
||||||
},
|
|
||||||
G15BJ02: {
|
G15BJ02: {
|
||||||
name: '手机三要素',
|
name: '手机三要素',
|
||||||
component: defineAsyncComponent(() => import('@/ui/CPhoneThreeElements.vue')),
|
component: defineAsyncComponent(() => import('@/ui/CPhoneThreeElements.vue')),
|
||||||
@ -90,12 +86,7 @@ const featureMap = {
|
|||||||
CAR061: {
|
CAR061: {
|
||||||
name: '名下车辆',
|
name: '名下车辆',
|
||||||
component: defineAsyncComponent(() => import('@/ui/CCAR061.vue')),
|
component: defineAsyncComponent(() => import('@/ui/CCAR061.vue')),
|
||||||
},
|
}
|
||||||
IDV044: {
|
|
||||||
name: '婚姻状态',
|
|
||||||
component: defineAsyncComponent(() => import('@/ui/CIDV044.vue')),
|
|
||||||
remark: '查询结果为"未婚或尚未登记结婚"时,表示婚姻登记处暂无相关的登记记录。婚姻状态信息由婚姻登记处逐级上报,可能存在数据遗漏或更新滞后。当前可查询的婚姻状态包括:未婚或尚未登记结婚、已婚、离异、离异冷静期。如您对查询结果有疑问,请联系客服反馈。'
|
|
||||||
},
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@ -104,7 +95,7 @@ import LRemark from "@/components/LRemark.vue";
|
|||||||
|
|
||||||
|
|
||||||
const productId = ref(null);
|
const productId = ref(null);
|
||||||
const isDone = ref(false);
|
const isDone = ref(true);
|
||||||
const active = ref(null)
|
const active = ref(null)
|
||||||
|
|
||||||
const reportData = ref([])
|
const reportData = ref([])
|
||||||
@ -113,9 +104,9 @@ const reportName = ref("")
|
|||||||
const reportDateTime = ref(null)
|
const reportDateTime = ref(null)
|
||||||
const feature = ref("")
|
const feature = ref("")
|
||||||
const isEmpty = ref(false)
|
const isEmpty = ref(false)
|
||||||
const reportScore = ref(0); // 默认分数
|
const reportScore = ref(75); // 默认分数
|
||||||
|
|
||||||
onBeforeMount(() => {
|
onMounted(() => {
|
||||||
const query = new URLSearchParams(window.location.search);
|
const query = new URLSearchParams(window.location.search);
|
||||||
feature.value = query.get("feature");
|
feature.value = query.get("feature");
|
||||||
console.log("feature", feature.value)
|
console.log("feature", feature.value)
|
||||||
@ -146,7 +137,6 @@ const getReport = async () => {
|
|||||||
} else if (data.value.code === 200003) {
|
} else if (data.value.code === 200003) {
|
||||||
isEmpty.value = true
|
isEmpty.value = true
|
||||||
}
|
}
|
||||||
isDone.value = true
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
const maskValue = computed(() => {
|
const maskValue = computed(() => {
|
||||||
@ -201,12 +191,12 @@ const maskValue = computed(() => {
|
|||||||
|
|
||||||
// 计算综合评分的函数
|
// 计算综合评分的函数
|
||||||
const calculateScore = (reportData) => {
|
const calculateScore = (reportData) => {
|
||||||
// 从0分开始(0分表示无风险)
|
// 从0分开始
|
||||||
let score = 0;
|
let score = 0;
|
||||||
// 最高分为90分(90分表示最高风险)
|
// 最高分为90分
|
||||||
const maxScore = 90;
|
const maxScore = 90;
|
||||||
|
|
||||||
// 定义各接口的相对风险权重比例
|
// 定义各接口的相对权重比例(而非固定分值)
|
||||||
const relativeWeights = {
|
const relativeWeights = {
|
||||||
// 关键风险指标(高优先级)
|
// 关键风险指标(高优先级)
|
||||||
'G34BJ03': 250, // 不良记录
|
'G34BJ03': 250, // 不良记录
|
||||||
@ -237,7 +227,7 @@ const calculateScore = (reportData) => {
|
|||||||
const availableAPIs = reportData.map(item => item.data.apiID).filter(id => relativeWeights[id]);
|
const availableAPIs = reportData.map(item => item.data.apiID).filter(id => relativeWeights[id]);
|
||||||
|
|
||||||
// 如果没有可评分的接口,返回默认分数
|
// 如果没有可评分的接口,返回默认分数
|
||||||
if (availableAPIs.length === 0) return 30; // 默认30分(中等风险)
|
if (availableAPIs.length === 0) return 60; // 默认60分
|
||||||
|
|
||||||
// 计算当前报告中所有接口的相对权重总和
|
// 计算当前报告中所有接口的相对权重总和
|
||||||
let totalWeight = 0;
|
let totalWeight = 0;
|
||||||
@ -255,7 +245,7 @@ const calculateScore = (reportData) => {
|
|||||||
actualWeights[apiID] = relativeWeights[apiID] * pointValue;
|
actualWeights[apiID] = relativeWeights[apiID] * pointValue;
|
||||||
});
|
});
|
||||||
|
|
||||||
// 遍历报告数据进行评分 - 风险越高分数越高
|
// 遍历报告数据进行评分
|
||||||
reportData.forEach(item => {
|
reportData.forEach(item => {
|
||||||
const apiID = item.data.apiID;
|
const apiID = item.data.apiID;
|
||||||
const data = item.data.data;
|
const data = item.data.data;
|
||||||
@ -263,7 +253,7 @@ const calculateScore = (reportData) => {
|
|||||||
// 如果没有定义权重,跳过
|
// 如果没有定义权重,跳过
|
||||||
if (!actualWeights[apiID]) return;
|
if (!actualWeights[apiID]) return;
|
||||||
|
|
||||||
// 根据不同的API ID计算分数(有风险时加分)
|
// 根据不同的API ID计算分数(只有没有风险或风险低时加分)
|
||||||
switch (apiID) {
|
switch (apiID) {
|
||||||
case 'G09SC02': // 婚姻状态
|
case 'G09SC02': // 婚姻状态
|
||||||
// 不计入风险
|
// 不计入风险
|
||||||
@ -271,58 +261,61 @@ const calculateScore = (reportData) => {
|
|||||||
|
|
||||||
case 'G27BJ05': // 借贷申请记录
|
case 'G27BJ05': // 借贷申请记录
|
||||||
if (data) {
|
if (data) {
|
||||||
// 检查是否有申请记录(有则表示风险)
|
// 检查所有字段是否都为0(没有风险)
|
||||||
let hasRisk = false;
|
let noRisk = true;
|
||||||
for (const key in data) {
|
for (const key in data) {
|
||||||
if (data[key] !== 0 && data[key] !== '0' &&
|
if (data[key] !== 0 && data[key] !== '0') {
|
||||||
key.indexOf('allnum') > -1 &&
|
noRisk = false;
|
||||||
!isNaN(parseInt(data[key])) &&
|
|
||||||
parseInt(data[key]) > 0) {
|
|
||||||
hasRisk = true;
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (hasRisk) {
|
if (noRisk || !Object.keys(data).length) {
|
||||||
score += actualWeights[apiID];
|
score += actualWeights[apiID];
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
// 无数据视为无风险
|
||||||
|
score += actualWeights[apiID];
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'G28BJ05': // 借贷行为记录
|
case 'G28BJ05': // 借贷行为记录
|
||||||
if (data) {
|
if (data) {
|
||||||
// 检查是否有借贷记录(有则表示风险)
|
// 检查所有字段是否都为0(没有风险)
|
||||||
let hasRisk = false;
|
let noRisk = true;
|
||||||
for (const key in data) {
|
for (const key in data) {
|
||||||
if (data[key] !== 0 && data[key] !== '0' &&
|
if (data[key] !== 0 && data[key] !== '0') {
|
||||||
(key.indexOf('lendamt') > -1 || key.indexOf('num') > -1) &&
|
noRisk = false;
|
||||||
!isNaN(parseInt(data[key])) &&
|
|
||||||
parseInt(data[key]) > 0) {
|
|
||||||
hasRisk = true;
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (hasRisk) {
|
if (noRisk || !Object.keys(data).length) {
|
||||||
score += actualWeights[apiID];
|
score += actualWeights[apiID];
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
// 无数据视为无风险
|
||||||
|
score += actualWeights[apiID];
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'G26BJ05': // 违约异常
|
case 'G26BJ05': // 违约异常
|
||||||
if (data) {
|
if (data) {
|
||||||
// 检查除特定字段外的其他字段是否有异常值(有异常则表示风险)
|
// 检查除特定字段外的其他字段是否都为0(没有风险)
|
||||||
const excludeFields = ['swift_number', 'code', 'flag_specialList_c'];
|
const excludeFields = ['swift_number', 'code', 'flag_specialList_c'];
|
||||||
let hasRisk = false;
|
let noRisk = true;
|
||||||
|
|
||||||
for (const key in data) {
|
for (const key in data) {
|
||||||
if (!excludeFields.includes(key) && data[key] !== 0 && data[key] !== '0') {
|
if (!excludeFields.includes(key) && data[key] !== 0 && data[key] !== '0') {
|
||||||
hasRisk = true;
|
noRisk = false;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (hasRisk) {
|
if (noRisk || !Object.keys(data).length) {
|
||||||
score += actualWeights[apiID];
|
score += actualWeights[apiID];
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
// 无数据视为无风险
|
||||||
|
score += actualWeights[apiID];
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@ -331,20 +324,23 @@ const calculateScore = (reportData) => {
|
|||||||
// 根据风险等级加分
|
// 根据风险等级加分
|
||||||
switch (data.risk_level) {
|
switch (data.risk_level) {
|
||||||
case 'A': // 无风险
|
case 'A': // 无风险
|
||||||
// 不加分
|
score += actualWeights[apiID];
|
||||||
break;
|
break;
|
||||||
case 'F': // 低风险
|
case 'F': // 低风险
|
||||||
score += actualWeights[apiID] * 0.3;
|
score += actualWeights[apiID] * 0.7;
|
||||||
break;
|
break;
|
||||||
case 'C': // 中风险
|
case 'C': // 中风险
|
||||||
case 'D': // 中风险
|
case 'D': // 中风险
|
||||||
score += actualWeights[apiID] * 0.7;
|
score += actualWeights[apiID] * 0.3;
|
||||||
break;
|
break;
|
||||||
case 'B': // 高风险
|
case 'B': // 高风险
|
||||||
case 'E': // 高风险
|
case 'E': // 高风险
|
||||||
score += actualWeights[apiID];
|
// 不加分
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
// 无数据视为无风险
|
||||||
|
score += actualWeights[apiID];
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@ -379,9 +375,12 @@ const calculateScore = (reportData) => {
|
|||||||
hasRisk = true;
|
hasRisk = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (hasRisk) {
|
if (!hasRisk) {
|
||||||
score += actualWeights[apiID];
|
score += actualWeights[apiID];
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
// 无数据视为无风险
|
||||||
|
score += actualWeights[apiID];
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@ -390,29 +389,38 @@ const calculateScore = (reportData) => {
|
|||||||
// 根据filterType判断风险等级
|
// 根据filterType判断风险等级
|
||||||
switch (data.filterType) {
|
switch (data.filterType) {
|
||||||
case '0': // 安全
|
case '0': // 安全
|
||||||
// 不加分
|
|
||||||
break;
|
|
||||||
case '3': // 低危
|
|
||||||
score += actualWeights[apiID] * 0.3;
|
|
||||||
break;
|
|
||||||
case '2': // 中危
|
|
||||||
score += actualWeights[apiID] * 0.7;
|
|
||||||
break;
|
|
||||||
case '1': // 高危
|
|
||||||
score += actualWeights[apiID];
|
score += actualWeights[apiID];
|
||||||
break;
|
break;
|
||||||
|
case '3': // 低危
|
||||||
|
score += actualWeights[apiID] * 0.7;
|
||||||
|
break;
|
||||||
|
case '2': // 中危
|
||||||
|
score += actualWeights[apiID] * 0.3;
|
||||||
|
break;
|
||||||
|
case '1': // 高危
|
||||||
|
// 不加分
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
// 无数据视为无风险
|
||||||
|
score += actualWeights[apiID];
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'G19BJ02': // 手机二次卡
|
case 'G19BJ02': // 手机二次卡
|
||||||
if (data && data.is_second_card === true) {
|
if (data && data.is_second_card === false) {
|
||||||
|
score += actualWeights[apiID];
|
||||||
|
} else if (!data) {
|
||||||
|
// 无数据视为无风险
|
||||||
score += actualWeights[apiID];
|
score += actualWeights[apiID];
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'G02BJ02': // 手机在网时长
|
case 'G02BJ02': // 手机在网时长
|
||||||
if (data && data.online_months < 6) {
|
if (data && data.online_months >= 6) {
|
||||||
|
score += actualWeights[apiID];
|
||||||
|
} else if (!data) {
|
||||||
|
// 无数据视为无风险
|
||||||
score += actualWeights[apiID];
|
score += actualWeights[apiID];
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@ -421,13 +429,19 @@ const calculateScore = (reportData) => {
|
|||||||
case 'G17BJ02': // 手机号二要素
|
case 'G17BJ02': // 手机号二要素
|
||||||
case 'KZEYS': // 身份证二要素
|
case 'KZEYS': // 身份证二要素
|
||||||
case 'G20GZ01': // 银行卡四要素核验
|
case 'G20GZ01': // 银行卡四要素核验
|
||||||
if (data && data.is_consistent === false) {
|
if (data && data.is_consistent) {
|
||||||
|
score += actualWeights[apiID];
|
||||||
|
} else if (!data) {
|
||||||
|
// 无数据视为无风险
|
||||||
score += actualWeights[apiID];
|
score += actualWeights[apiID];
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'FIN019': // 银行卡黑名单
|
case 'FIN019': // 银行卡黑名单
|
||||||
if (data && data.is_blacklisted === true) {
|
if (data && data.is_blacklisted === false) {
|
||||||
|
score += actualWeights[apiID];
|
||||||
|
} else if (!data) {
|
||||||
|
// 无数据视为无风险
|
||||||
score += actualWeights[apiID];
|
score += actualWeights[apiID];
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@ -581,14 +595,13 @@ const calculateScore = (reportData) => {
|
|||||||
</div>
|
</div>
|
||||||
<LRemark content="如查询的姓名/身份证与运营商提供的不一致,可能会存在报告内容不匹配的情况" />
|
<LRemark content="如查询的姓名/身份证与运营商提供的不一致,可能会存在报告内容不匹配的情况" />
|
||||||
</van-tab>
|
</van-tab>
|
||||||
<van-tab v-for="(item, index) in reportData" :key="index"
|
<van-tab v-for="(item, index) in reportData" :key="index" :title="featureMap[item.data.apiID].name">
|
||||||
:title="featureMap[item.data.apiID]?.name">
|
<div id="lawsuit" class="title mb-4">{{ featureMap[item.data.apiID].name }}</div>
|
||||||
<div id="lawsuit" class="title mb-4">{{ featureMap[item.data.apiID]?.name }}</div>
|
<component :is="featureMap[item.data.apiID].component" :data="item.data.data"
|
||||||
<component :is="featureMap[item.data.apiID]?.component" :data="item.data.data"
|
|
||||||
:params="reportParams">
|
:params="reportParams">
|
||||||
</component>
|
</component>
|
||||||
<LRemark v-if="featureMap[item.data.apiID]?.remark"
|
<LRemark v-if="featureMap[item.data.apiID].remark"
|
||||||
:content="featureMap[item.data.apiID]?.remark" />
|
:content="featureMap[item.data.apiID].remark" />
|
||||||
</van-tab>
|
</van-tab>
|
||||||
<div class="card">
|
<div class="card">
|
||||||
<div>
|
<div>
|
||||||
|
@ -86,12 +86,7 @@ const featureMap = {
|
|||||||
CAR061: {
|
CAR061: {
|
||||||
name: '名下车辆',
|
name: '名下车辆',
|
||||||
component: defineAsyncComponent(() => import('@/ui/CCAR061.vue')),
|
component: defineAsyncComponent(() => import('@/ui/CCAR061.vue')),
|
||||||
},
|
}
|
||||||
IDV044: {
|
|
||||||
name: '婚姻状态',
|
|
||||||
component: defineAsyncComponent(() => import('@/ui/CIDV044.vue')),
|
|
||||||
remark: '查询结果为"未婚或尚未登记结婚"时,表示婚姻登记处暂无相关的登记记录。婚姻状态信息由婚姻登记处逐级上报,可能存在数据遗漏或更新滞后。当前可查询的婚姻状态包括:未婚或尚未登记结婚、已婚、离异、离异冷静期。如您对查询结果有疑问,请联系客服反馈。'
|
|
||||||
},
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@ -101,7 +96,7 @@ import LTitle from "@/components/LTitle.vue";
|
|||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
|
|
||||||
const productId = ref(null);
|
const productId = ref(null);
|
||||||
const isDone = ref(false);
|
const isDone = ref(true);
|
||||||
const active = ref(null)
|
const active = ref(null)
|
||||||
const reportData = ref([])
|
const reportData = ref([])
|
||||||
const reportParams = ref({})
|
const reportParams = ref({})
|
||||||
@ -111,8 +106,7 @@ const orderId = ref(null);
|
|||||||
const orderNo = ref("")
|
const orderNo = ref("")
|
||||||
const isEmpty = ref(false)
|
const isEmpty = ref(false)
|
||||||
const isPending = ref(false)
|
const isPending = ref(false)
|
||||||
const reportScore = ref(0)
|
onMounted(() => {
|
||||||
onBeforeMount(() => {
|
|
||||||
const query = new URLSearchParams(window.location.search);
|
const query = new URLSearchParams(window.location.search);
|
||||||
orderNo.value = query.get("out_trade_no");
|
orderNo.value = query.get("out_trade_no");
|
||||||
orderId.value = query.get("order_id");
|
orderId.value = query.get("order_id");
|
||||||
@ -127,12 +121,12 @@ onBeforeMount(() => {
|
|||||||
|
|
||||||
// 计算综合评分的函数
|
// 计算综合评分的函数
|
||||||
const calculateScore = (reportData) => {
|
const calculateScore = (reportData) => {
|
||||||
// 从0分开始(0分表示无风险)
|
// 从0分开始
|
||||||
let score = 0;
|
let score = 0;
|
||||||
// 最高分为90分(90分表示最高风险)
|
// 最高分为90分
|
||||||
const maxScore = 90;
|
const maxScore = 90;
|
||||||
|
|
||||||
// 定义各接口的相对风险权重比例
|
// 定义各接口的相对权重比例(而非固定分值)
|
||||||
const relativeWeights = {
|
const relativeWeights = {
|
||||||
// 关键风险指标(高优先级)
|
// 关键风险指标(高优先级)
|
||||||
'G34BJ03': 250, // 不良记录
|
'G34BJ03': 250, // 不良记录
|
||||||
@ -163,7 +157,7 @@ const calculateScore = (reportData) => {
|
|||||||
const availableAPIs = reportData.map(item => item.data.apiID).filter(id => relativeWeights[id]);
|
const availableAPIs = reportData.map(item => item.data.apiID).filter(id => relativeWeights[id]);
|
||||||
|
|
||||||
// 如果没有可评分的接口,返回默认分数
|
// 如果没有可评分的接口,返回默认分数
|
||||||
if (availableAPIs.length === 0) return 30; // 默认30分(中等风险)
|
if (availableAPIs.length === 0) return 60; // 默认60分
|
||||||
|
|
||||||
// 计算当前报告中所有接口的相对权重总和
|
// 计算当前报告中所有接口的相对权重总和
|
||||||
let totalWeight = 0;
|
let totalWeight = 0;
|
||||||
@ -181,7 +175,7 @@ const calculateScore = (reportData) => {
|
|||||||
actualWeights[apiID] = relativeWeights[apiID] * pointValue;
|
actualWeights[apiID] = relativeWeights[apiID] * pointValue;
|
||||||
});
|
});
|
||||||
|
|
||||||
// 遍历报告数据进行评分 - 风险越高分数越高
|
// 遍历报告数据进行评分
|
||||||
reportData.forEach(item => {
|
reportData.forEach(item => {
|
||||||
const apiID = item.data.apiID;
|
const apiID = item.data.apiID;
|
||||||
const data = item.data.data;
|
const data = item.data.data;
|
||||||
@ -189,7 +183,7 @@ const calculateScore = (reportData) => {
|
|||||||
// 如果没有定义权重,跳过
|
// 如果没有定义权重,跳过
|
||||||
if (!actualWeights[apiID]) return;
|
if (!actualWeights[apiID]) return;
|
||||||
|
|
||||||
// 根据不同的API ID计算分数(有风险时加分)
|
// 根据不同的API ID计算分数(只有没有风险或风险低时加分)
|
||||||
switch (apiID) {
|
switch (apiID) {
|
||||||
case 'G09SC02': // 婚姻状态
|
case 'G09SC02': // 婚姻状态
|
||||||
// 不计入风险
|
// 不计入风险
|
||||||
@ -197,58 +191,61 @@ const calculateScore = (reportData) => {
|
|||||||
|
|
||||||
case 'G27BJ05': // 借贷申请记录
|
case 'G27BJ05': // 借贷申请记录
|
||||||
if (data) {
|
if (data) {
|
||||||
// 检查是否有申请记录(有则表示风险)
|
// 检查所有字段是否都为0(没有风险)
|
||||||
let hasRisk = false;
|
let noRisk = true;
|
||||||
for (const key in data) {
|
for (const key in data) {
|
||||||
if (data[key] !== 0 && data[key] !== '0' &&
|
if (data[key] !== 0 && data[key] !== '0') {
|
||||||
key.indexOf('allnum') > -1 &&
|
noRisk = false;
|
||||||
!isNaN(parseInt(data[key])) &&
|
|
||||||
parseInt(data[key]) > 0) {
|
|
||||||
hasRisk = true;
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (hasRisk) {
|
if (noRisk || !Object.keys(data).length) {
|
||||||
score += actualWeights[apiID];
|
score += actualWeights[apiID];
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
// 无数据视为无风险
|
||||||
|
score += actualWeights[apiID];
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'G28BJ05': // 借贷行为记录
|
case 'G28BJ05': // 借贷行为记录
|
||||||
if (data) {
|
if (data) {
|
||||||
// 检查是否有借贷记录(有则表示风险)
|
// 检查所有字段是否都为0(没有风险)
|
||||||
let hasRisk = false;
|
let noRisk = true;
|
||||||
for (const key in data) {
|
for (const key in data) {
|
||||||
if (data[key] !== 0 && data[key] !== '0' &&
|
if (data[key] !== 0 && data[key] !== '0') {
|
||||||
(key.indexOf('lendamt') > -1 || key.indexOf('num') > -1) &&
|
noRisk = false;
|
||||||
!isNaN(parseInt(data[key])) &&
|
|
||||||
parseInt(data[key]) > 0) {
|
|
||||||
hasRisk = true;
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (hasRisk) {
|
if (noRisk || !Object.keys(data).length) {
|
||||||
score += actualWeights[apiID];
|
score += actualWeights[apiID];
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
// 无数据视为无风险
|
||||||
|
score += actualWeights[apiID];
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'G26BJ05': // 违约异常
|
case 'G26BJ05': // 违约异常
|
||||||
if (data) {
|
if (data) {
|
||||||
// 检查除特定字段外的其他字段是否有异常值(有异常则表示风险)
|
// 检查除特定字段外的其他字段是否都为0(没有风险)
|
||||||
const excludeFields = ['swift_number', 'code', 'flag_specialList_c'];
|
const excludeFields = ['swift_number', 'code', 'flag_specialList_c'];
|
||||||
let hasRisk = false;
|
let noRisk = true;
|
||||||
|
|
||||||
for (const key in data) {
|
for (const key in data) {
|
||||||
if (!excludeFields.includes(key) && data[key] !== 0 && data[key] !== '0') {
|
if (!excludeFields.includes(key) && data[key] !== 0 && data[key] !== '0') {
|
||||||
hasRisk = true;
|
noRisk = false;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (hasRisk) {
|
if (noRisk || !Object.keys(data).length) {
|
||||||
score += actualWeights[apiID];
|
score += actualWeights[apiID];
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
// 无数据视为无风险
|
||||||
|
score += actualWeights[apiID];
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@ -257,20 +254,23 @@ const calculateScore = (reportData) => {
|
|||||||
// 根据风险等级加分
|
// 根据风险等级加分
|
||||||
switch (data.risk_level) {
|
switch (data.risk_level) {
|
||||||
case 'A': // 无风险
|
case 'A': // 无风险
|
||||||
// 不加分
|
score += actualWeights[apiID];
|
||||||
break;
|
break;
|
||||||
case 'F': // 低风险
|
case 'F': // 低风险
|
||||||
score += actualWeights[apiID] * 0.3;
|
score += actualWeights[apiID] * 0.7;
|
||||||
break;
|
break;
|
||||||
case 'C': // 中风险
|
case 'C': // 中风险
|
||||||
case 'D': // 中风险
|
case 'D': // 中风险
|
||||||
score += actualWeights[apiID] * 0.7;
|
score += actualWeights[apiID] * 0.3;
|
||||||
break;
|
break;
|
||||||
case 'B': // 高风险
|
case 'B': // 高风险
|
||||||
case 'E': // 高风险
|
case 'E': // 高风险
|
||||||
score += actualWeights[apiID];
|
// 不加分
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
// 无数据视为无风险
|
||||||
|
score += actualWeights[apiID];
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@ -305,9 +305,12 @@ const calculateScore = (reportData) => {
|
|||||||
hasRisk = true;
|
hasRisk = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (hasRisk) {
|
if (!hasRisk) {
|
||||||
score += actualWeights[apiID];
|
score += actualWeights[apiID];
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
// 无数据视为无风险
|
||||||
|
score += actualWeights[apiID];
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@ -316,29 +319,38 @@ const calculateScore = (reportData) => {
|
|||||||
// 根据filterType判断风险等级
|
// 根据filterType判断风险等级
|
||||||
switch (data.filterType) {
|
switch (data.filterType) {
|
||||||
case '0': // 安全
|
case '0': // 安全
|
||||||
// 不加分
|
|
||||||
break;
|
|
||||||
case '3': // 低危
|
|
||||||
score += actualWeights[apiID] * 0.3;
|
|
||||||
break;
|
|
||||||
case '2': // 中危
|
|
||||||
score += actualWeights[apiID] * 0.7;
|
|
||||||
break;
|
|
||||||
case '1': // 高危
|
|
||||||
score += actualWeights[apiID];
|
score += actualWeights[apiID];
|
||||||
break;
|
break;
|
||||||
|
case '3': // 低危
|
||||||
|
score += actualWeights[apiID] * 0.7;
|
||||||
|
break;
|
||||||
|
case '2': // 中危
|
||||||
|
score += actualWeights[apiID] * 0.3;
|
||||||
|
break;
|
||||||
|
case '1': // 高危
|
||||||
|
// 不加分
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
// 无数据视为无风险
|
||||||
|
score += actualWeights[apiID];
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'G19BJ02': // 手机二次卡
|
case 'G19BJ02': // 手机二次卡
|
||||||
if (data && data.is_second_card === true) {
|
if (data && data.is_second_card === false) {
|
||||||
|
score += actualWeights[apiID];
|
||||||
|
} else if (!data) {
|
||||||
|
// 无数据视为无风险
|
||||||
score += actualWeights[apiID];
|
score += actualWeights[apiID];
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'G02BJ02': // 手机在网时长
|
case 'G02BJ02': // 手机在网时长
|
||||||
if (data && data.online_months < 6) {
|
if (data && data.online_months >= 6) {
|
||||||
|
score += actualWeights[apiID];
|
||||||
|
} else if (!data) {
|
||||||
|
// 无数据视为无风险
|
||||||
score += actualWeights[apiID];
|
score += actualWeights[apiID];
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@ -347,13 +359,19 @@ const calculateScore = (reportData) => {
|
|||||||
case 'G17BJ02': // 手机号二要素
|
case 'G17BJ02': // 手机号二要素
|
||||||
case 'KZEYS': // 身份证二要素
|
case 'KZEYS': // 身份证二要素
|
||||||
case 'G20GZ01': // 银行卡四要素核验
|
case 'G20GZ01': // 银行卡四要素核验
|
||||||
if (data && data.is_consistent === false) {
|
if (data && data.is_consistent) {
|
||||||
|
score += actualWeights[apiID];
|
||||||
|
} else if (!data) {
|
||||||
|
// 无数据视为无风险
|
||||||
score += actualWeights[apiID];
|
score += actualWeights[apiID];
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'FIN019': // 银行卡黑名单
|
case 'FIN019': // 银行卡黑名单
|
||||||
if (data && data.is_blacklisted === true) {
|
if (data && data.is_blacklisted === false) {
|
||||||
|
score += actualWeights[apiID];
|
||||||
|
} else if (!data) {
|
||||||
|
// 无数据视为无风险
|
||||||
score += actualWeights[apiID];
|
score += actualWeights[apiID];
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@ -399,8 +417,6 @@ const getReport = async () => {
|
|||||||
} else if (data.value.code === 200002) {
|
} else if (data.value.code === 200002) {
|
||||||
isPending.value = true
|
isPending.value = true
|
||||||
}
|
}
|
||||||
isDone.value = true
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// 对请求参数进行脱敏处理
|
// 对请求参数进行脱敏处理
|
||||||
@ -605,14 +621,13 @@ const maskValue = computed(() => {
|
|||||||
</van-tab>
|
</van-tab>
|
||||||
</template>
|
</template>
|
||||||
<LPendding v-if="isPending" />
|
<LPendding v-if="isPending" />
|
||||||
<van-tab v-for="(item, index) in reportData" :key="index"
|
<van-tab v-for="(item, index) in reportData" :key="index" :title="featureMap[item.data.apiID].name">
|
||||||
:title="featureMap[item.data.apiID]?.name">
|
<div id="lawsuit" class="title mb-4">{{ featureMap[item.data.apiID].name }}</div>
|
||||||
<div id="lawsuit" class="title mb-4">{{ featureMap[item.data.apiID]?.name }}</div>
|
<component :is="featureMap[item.data.apiID].component" :data="item.data.data"
|
||||||
<component :is="featureMap[item.data.apiID]?.component" :data="item.data.data"
|
|
||||||
:params="reportParams" :isMerriageProduct="item.data.apiID === 'G09SC02'">
|
:params="reportParams" :isMerriageProduct="item.data.apiID === 'G09SC02'">
|
||||||
</component>
|
</component>
|
||||||
<LRemark v-if="featureMap[item.data.apiID]?.remark"
|
<LRemark v-if="featureMap[item.data.apiID].remark"
|
||||||
:content="featureMap[item.data.apiID]?.remark" />
|
:content="featureMap[item.data.apiID].remark" />
|
||||||
</van-tab>
|
</van-tab>
|
||||||
<div class="card">
|
<div class="card">
|
||||||
<div>
|
<div>
|
||||||
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user