version temp2

This commit is contained in:
2025-10-24 17:08:42 +08:00
parent c1dd5551f0
commit 1a919d57ba
193 changed files with 15044 additions and 15687 deletions

View File

@@ -12,12 +12,25 @@
</template>
<script setup>
import { defineProps } from 'vue';
import { defineProps, watch, computed } from 'vue';
import { useRiskNotifier } from '@/composables/useRiskNotifier';
// 接收父组件传入的 props
const props = defineProps({
data: Object,
params: Object,
apiId: {
type: String,
default: '',
},
index: {
type: Number,
default: 0,
},
notifyRiskStatus: {
type: Function,
default: () => { },
},
});
// 脱敏函数:姓名脱敏(保留首位)
@@ -31,6 +44,20 @@ const maskIdCard = (idCard) => {
if (!idCard) return '';
return idCard.replace(/^(.{6})(?:\d+)(.{4})$/, "$1****$2");
};
// 计算风险评分0-100分分数越高越安全
const riskScore = computed(() => {
// 名下车辆不算风险始终返回100分最安全
return 100;
});
// 使用 composable 通知父组件风险评分
useRiskNotifier(props, riskScore);
// 暴露给父组件
defineExpose({
riskScore
});
</script>
<style scoped>