Commit e16534b4 by 史敦盼

功能重复风险审查

1 parent 26131f1d
......@@ -622,3 +622,8 @@ export function editBatchPlan(params) {
export function exportRiskReport(params) {
return download('/network/prel-des-rvw/exportRiskReport', params)
}
// 获取检查结果重复数
export function getByKeword(params) {
return post('/network/prel-des-rvw/getByKeword', params)
}
......@@ -4,7 +4,7 @@
* @Autor: pan
* @Date: 2024-03-12 15:11:47
* @LastEditors: pan
* @LastEditTime: 2024-03-18 09:58:11
* @LastEditTime: 2024-03-19 11:23:05
-->
<template>
<div class="form-item">
......@@ -205,7 +205,7 @@ export default {
} else {
const params = { key }
const res = await getDianXingAnLiSelectData(params)
console.log(typeof res)
if (res.code !== 200) return
dictTypeOptions = res.data
const jsonStr = JSON.stringify(res.data)
localStorage.setItem('dic_' + key, jsonStr)
......
......@@ -12,12 +12,15 @@
element-loading-text="加载中"
>
<!-- <img :src="leftSrc" alt="" /> -->
<template v-if="tab !== '8' && tab !== '9'">
<img
v-for="(item, idx) in leftBaseOptions"
:key="idx"
:src="item"
alt=""
/>
</template>
<Tab8Left v-else :tab="tab" @toRemark="toRemark" />
</div>
</div>
<div class="right_container flex-column">
......@@ -87,10 +90,13 @@
</template>
<script>
import Tab8Left from '@/views/conceptualReview/Tab8Left'
import { getReviewNorm, saveExamine, exportRiskReport } from '@/api'
export default {
name: 'conceptualExamine',
components: {},
components: {
Tab8Left,
},
data() {
return {
resultContent: '',
......@@ -108,10 +114,20 @@ export default {
this.tab = this.$route.query.tab
this.examinName = this.$route.query.examinName
this.row = JSON.parse(this.$route.query.row)
this.resultContent = this.row.reviewSuggestion
this.resultContent = this.row.reviewSuggestion || ''
if (this.tab === '8') {
this.leftLoading = false
} else {
this.getReviewNorm()
}
},
methods: {
// 带入到备注
toRemark(str) {
this.resultContent = this.resultContent
? this.resultContent + '\n' + str
: str
},
getReviewNorm() {
const { needId } = this.row
const params = {
......
<template>
<div class="Tab8Left p-10">
<el-card class="box-card m-b-20" shadow="never">
<div slot="header" class="clearfix">
<span>检测范围</span>
</div>
<div class="item" v-for="item in checkList" :key="item.value">
<span>- {{ item.label }}</span>
</div>
</el-card>
<el-input
v-debounce:input="getByKeword"
v-model="keyWord"
class="m-b-10"
placeholder="在相关台账搜索关键字,出结果"
></el-input>
<el-card
class="box-card"
shadow="never"
v-loading="keyWordLoading"
element-loading-text="加载中"
>
<div slot="header" class="clearfix">
<span>检测结果</span>
</div>
<div class="item" v-show="showResult">
<el-alert :closable="false" :title="resultTitle" type="warning" />
<div>其中:</div>
<div v-for="(item, index) in checkList" :key="item.value">
{{ item.label + ':【' + repeatList[index + 1] + '】' }}
</div>
<el-button class="m-t-10" type="primary" @click="toRemark()"
>带入到备注</el-button
>
</div>
</el-card>
</div>
</template>
<script>
import { getDianXingAnLiSelectData, getByKeword } from '@/api/index.js'
export default {
prop: {
tab: {
type: String,
default: '',
},
},
data() {
return {
checkList: [],
repeatList: {
// 0: 50,
// 1: 1,
// 2: 2,
// 3: 3,
},
// once: false,
keyWord: '',
keyWordLoading: false,
}
},
components: {},
computed: {
showResult() {
if (Object.keys(this.repeatList).length) {
return true
}
return false
},
tipsText() {
if (this.tab === '8') {
return `经检测,关键字:${this.keyWord},在系统历史功能、组件台账,功能类别中,总计重复数`
} else {
return `经检测,关键字:${this.keyWord},在数据中台数据台账、主数据台账,数据实体类别中,总计重复数`
}
},
resultTitle() {
let num = 0
for (const key in this.repeatList) {
if (Object.hasOwnProperty.call(this.repeatList, key)) {
const val = this.repeatList[key]
num += val
}
}
return `${this.tipsText}:【${num}】`
},
strCancat() {
let str = ''
this.checkList.forEach((v, i) => {
str += `${v.label}:【${v.num}${
i != this.checkList.length ? '\n' : ''
}`
})
return str
},
},
async mounted() {
this.getDictTypeOptions('check_range', (list) => {
this.checkList = list
})
},
methods: {
getByKeword() {
this.keyWordLoading = true
const checkRange = this.checkList.map((v) => v.value).join(',')
const params = {
keyWord: this.keyWord,
checkRange,
}
getByKeword(params).then((res) => {
this.keyWordLoading = false
if (res.code === 200) {
this.repeatList = res.data
this.checkList = this.checkList.map((v, i) => {
return { ...v, num: res.data[i + 1] }
})
}
})
},
toRemark() {
// if (this.once) {
// return this.$message.warning('已带入到备注,请勿重复操作')
// }
// this.once = true
this.$emit('toRemark', this.strCancat)
},
async getDictTypeOptions(key, callback) {
var dictTypeOptions = []
var storedDic = localStorage.getItem('dic_' + key)
if (storedDic) {
dictTypeOptions = JSON.parse(storedDic)
} else {
const params = { key }
const res = await getDianXingAnLiSelectData(params)
dictTypeOptions = res.data
const jsonStr = JSON.stringify(res.data)
if (jsonStr) {
localStorage.setItem('dic_' + key, jsonStr)
}
}
callback(dictTypeOptions)
},
},
}
</script>
<style scoped lang="scss">
@import '@/styles/common.scss';
.clearfix {
text-align: left;
}
.item {
display: flex;
align-items: flex-start;
flex-direction: column;
}
</style>
......@@ -11,7 +11,7 @@
height: 38px;
display: flex;
align-items: center;
font-size: 13px;
font-size: 14px;
background: #dbf4f3;
}
&_content {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!