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