Compare commits

...

3 Commits

Author SHA1 Message Date
kami 417f45a3b5 灵敏感知大屏 1 year ago
kami 2638f095a8 Merge remote-tracking branch 'origin/master' 1 year ago
kami c296f2bf59 灵敏感知大屏 1 year ago
  1. 3
      src/components/datav/chart-bar.vue
  2. 4
      src/components/model-risk-tree.vue
  3. 2
      src/views/datav/CaseVerif.vue
  4. 4
      src/views/sensitivePerception/DictContent.vue
  5. 59
      src/views/sensitivePerception/RiskClue.vue
  6. 48
      src/views/sensitivePerception/RiskPersonnel.vue
  7. 12
      src/views/sensitivePerception/RiskScoreRule.vue
  8. 25
      vite.config.ts

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

@ -5,6 +5,7 @@
</div> </div>
<div> <div>
<div <div
class="flex v-center bar-item wrap between" class="flex v-center bar-item wrap between"
v-for="item in data" v-for="item in data"
:size="size" :size="size"
@ -190,4 +191,4 @@ function getColor(val) {
} }
} }
} }
</style> </style>

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

@ -75,7 +75,7 @@ function renderContent(
h( h(
"span", "span",
{ {
title: node.label, title: node.label + '('+node.ruleDesc+')',
}, },
node.label node.label
) )
@ -131,4 +131,4 @@ function getModelId(arr, node) {
.tree-container { .tree-container {
height: calc(100% - 42px); height: calc(100% - 42px);
} }
</style> </style>

2
src/views/datav/CaseVerif.vue

@ -659,4 +659,4 @@ const colors = [
<!-- :option="jjjgPieOption"--> <!-- :option="jjjgPieOption"-->
<!-- autoresize--> <!-- autoresize-->
<!--/>--> <!--/>-->
<!--</datav-tab-item>--> <!--</datav-tab-item>-->

4
src/views/sensitivePerception/DictContent.vue

@ -43,7 +43,7 @@
</div> </div>
</header> </header>
<div class="table-container"> <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 <el-table-column
label="问题条目" label="问题条目"
prop="name" prop="name"
@ -312,4 +312,4 @@ async function handleCalculate() {
background-color: #eee; background-color: #eee;
} }
} }
</style> </style>

59
src/views/sensitivePerception/RiskClue.vue

@ -61,39 +61,43 @@
<el-table-column <el-table-column
label="发生时间" label="发生时间"
prop="eventTime" prop="eventTime"
width="180" width="160"
/> />
<el-table-column <el-table-column
label="姓名" label="姓名"
prop="name" prop="name"
width="150" width="120"
/> />
<el-table-column <el-table-column
label="身份证号码" label="身份证号码"
prop="idCode" prop="idCode"
width="180" width="170"
show-overflow-tooltip show-overflow-tooltip
/> />
<el-table-column <el-table-column
label="风险因素" label="风险因素"
prop="riskReason" prop="riskReason"
width="100"
show-overflow-tooltip show-overflow-tooltip
/> />
<el-table-column <el-table-column
label="风险内容" label="风险内容"
prop="thingDesc"
show-overflow-tooltip show-overflow-tooltip
/> >
<el-table-column label="操作" width="180"> <template #default="{ row }">
<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 <!-- <el-button
type="primary" type="primary"
link link
@click="handleShowDetail(row)" @click="handleShowDetail(row)"
>查看详情</el-button >查看详情</el-button
> --> > -->
</template> <!-- </template>-->
</el-table-column> <!-- </el-table-column>-->
</el-table> </el-table>
</div> </div>
<div class="flex end mt-8"> <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() { function reset() {
query.value = {}; query.value = {};
getList(); getList();
@ -153,4 +192,4 @@ function reset() {
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
</style> </style>

48
src/views/sensitivePerception/RiskPersonnel.vue

@ -167,23 +167,27 @@
<div> <div>
<span class="text-primary">{{ item.riskName }}</span> <span class="text-primary">{{ item.riskName }}</span>
</div> </div>
<el-table :data="item.clues"> <el-table :data="item.clues" max-height="300">
<el-table-column <el-table-column
label="发生时间" label="发生时间"
prop="eventTime" prop="eventTime"
width="180" width="160"
/> />
<el-table-column <el-table-column
label="风险因素" label="风险因素"
prop="riskReason" prop="riskReason"
width="160"
show-overflow-tooltip show-overflow-tooltip
/> />
<el-table-column <el-table-column
label="风险内容" label="风险内容"
prop="thingDesc"
show-overflow-tooltip 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> </el-table>
</div> </div>
</div> </div>
@ -227,6 +231,40 @@ async function handleShowDesc(row) {
personal.value = data; 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) { function getGender(val) {
if (val == 1) { if (val == 1) {
return "男"; return "男";

12
src/views/sensitivePerception/RiskScoreRule.vue

@ -12,7 +12,7 @@
</div> </div>
<div style="width: 50%"> <div style="width: 50%">
<el-row> <el-row>
</el-row> </el-row>
</div> </div>
</div> </div>
@ -31,7 +31,7 @@
</div> </div>
</header> </header>
<div class="table-container"> <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 <el-table-column
label="问题条目" label="问题条目"
prop="riskName" prop="riskName"
@ -202,7 +202,11 @@ function getList() {
treeOptions.value[0].children = data; treeOptions.value[0].children = data;
}); });
} }
getList();
onMounted(() => {
getList();
})
const show = ref(false); const show = ref(false);
const formData = ref({ const formData = ref({
@ -293,4 +297,4 @@ async function handleCalculate() {
background-color: #eee; background-color: #eee;
} }
} }
</style> </style>

25
vite.config.ts

@ -79,7 +79,30 @@ export default ({ mode }) => {
}, },
build: { build: {
outDir: 'v2', 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