Browse Source

Merge remote-tracking branch 'origin/master'

main
sjh 1 year ago
parent
commit
2b738c4f15
  1. 1
      src/components/datav/chart-bar.vue
  2. 2
      src/components/model-risk-tree.vue
  3. 2
      src/views/sensitivePerception/DictContent.vue
  4. 55
      src/views/sensitivePerception/RiskClue.vue
  5. 48
      src/views/sensitivePerception/RiskPersonnel.vue
  6. 6
      src/views/sensitivePerception/RiskScoreRule.vue
  7. 25
      vite.config.ts

1
src/components/datav/chart-bar.vue

@ -5,6 +5,7 @@
</div>
<div>
<div
class="flex v-center bar-item wrap between"
v-for="item in data"
:size="size"

2
src/components/model-risk-tree.vue

@ -75,7 +75,7 @@ function renderContent(
h(
"span",
{
title: node.label,
title: node.label + '('+node.ruleDesc+')',
},
node.label
)

2
src/views/sensitivePerception/DictContent.vue

@ -43,7 +43,7 @@
</div>
</header>
<div class="table-container">
<el-table :data="dictContents" row-key="id">
<el-table :data="dictContents" row-key="id" :default-expand-all="false">
<el-table-column
label="问题条目"
prop="name"

55
src/views/sensitivePerception/RiskClue.vue

@ -61,39 +61,43 @@
<el-table-column
label="发生时间"
prop="eventTime"
width="180"
width="160"
/>
<el-table-column
label="姓名"
prop="name"
width="150"
width="120"
/>
<el-table-column
label="身份证号码"
prop="idCode"
width="180"
width="170"
show-overflow-tooltip
/>
<el-table-column
label="风险因素"
prop="riskReason"
width="100"
show-overflow-tooltip
/>
<el-table-column
label="风险内容"
prop="thingDesc"
show-overflow-tooltip
/>
<el-table-column label="操作" width="180">
>
<template #default="{ row }">
<span style="white-space: pre-wrap;">{{row.data}}</span>
</template>
</el-table-column>
<!-- <el-table-column label="操作" width="180">-->
<!-- <template #default="{ row }">-->
<!-- <el-button
type="primary"
link
@click="handleShowDetail(row)"
>查看详情</el-button
> -->
</template>
</el-table-column>
<!-- </template>-->
<!-- </el-table-column>-->
</el-table>
</div>
<div class="flex end mt-8">
@ -146,6 +150,41 @@ function getList() {
});
}
const filterJsonData = (row) => {
if(row.data == undefined) {
return ''
}
let j = JSON.parse(row.data)
let str = ''
if(j instanceof Array) {
j.forEach(item => {
str += JSON.stringify(item)+"\n";
})
}
if(j.sourceData != undefined) {
j = JSON.parse(row.sourceData)
}
for(let key in j) {
if(key == 'eventTime') {
continue
}
if(key == 'idCode') {
continue
}
if(key == 'departId') {
continue
}
if(key == 'personId') {
continue
}
if(key == 'name') {
continue
}
str += j[key]+'\n'
}
}
function reset() {
query.value = {};
getList();

48
src/views/sensitivePerception/RiskPersonnel.vue

@ -167,23 +167,27 @@
<div>
<span class="text-primary">{{ item.riskName }}</span>
</div>
<el-table :data="item.clues">
<el-table :data="item.clues" max-height="300">
<el-table-column
label="发生时间"
prop="eventTime"
width="180"
width="160"
/>
<el-table-column
label="风险因素"
prop="riskReason"
width="160"
show-overflow-tooltip
/>
<el-table-column
label="风险内容"
prop="thingDesc"
show-overflow-tooltip
/>
<el-table-column label="分值" prop="score" />
>
<template #default="{ row }">
<span style="white-space: pre-wrap;">{{row.data}}</span>
</template>
</el-table-column>
<el-table-column width="80" label="分值" prop="score" />
</el-table>
</div>
</div>
@ -227,6 +231,40 @@ async function handleShowDesc(row) {
personal.value = data;
}
const filterJsonData = (row) => {
if(row.data == undefined) {
return ''
}
try {
let j = JSON.parse(row.data)
if(j.sourceData != undefined) {
j = JSON.parse(row.sourceData)
}
let str = ''
for(let key in j) {
if(key == 'eventTime') {
continue
}
if(key == 'idCode') {
continue
}
if(key == 'departId') {
continue
}
if(key == 'personId') {
continue
}
if(key == 'name') {
continue
}
str += j[key]+'\n'
}
return str
} catch (e) {
return row.data
}
}
function getGender(val) {
if (val == 1) {
return "男";

6
src/views/sensitivePerception/RiskScoreRule.vue

@ -31,7 +31,7 @@
</div>
</header>
<div class="table-container">
<el-table :data="scoreRules" row-key="id">
<el-table ref="tableRef" :default-expand-all="false" :data="scoreRules" :expand-row-keys="[]" :tree-props="{children: 'children',hasChildren: 'hasChildren'}" row-key="id">
<el-table-column
label="问题条目"
prop="riskName"
@ -202,7 +202,11 @@ function getList() {
treeOptions.value[0].children = data;
});
}
onMounted(() => {
getList();
})
const show = ref(false);
const formData = ref({

25
vite.config.ts

@ -79,7 +79,30 @@ export default ({ mode }) => {
},
build: {
outDir: 'v2',
// target: "es2015"
sourcemap: false,
chunkSizeWarningLimit: 1500,
rollupOptions: {
output: {
entryFileNames: `assets/[name].${new Date().getTime()}.js`,
chunkFileNames: `assets/[name].${new Date().getTime()}.js`,
assetFileNames: `assets/[name].${new Date().getTime()}.[ext]`,
compact: true,
manualChunks: {
vue: ['vue', 'vue-router'],
echarts: ['echarts'],
},
},
},
terserOptions: {
compress: {
drop_console: true,
drop_debugger: true,
},
ie8: true,
output: {
comments: true,
},
},
}
})
}

Loading…
Cancel
Save