lijinlong
许宏杰 1 year ago
parent c200de2021
commit 35d7321806

@ -180,3 +180,37 @@ export function getDetection(id) {
method: 'get'
})
}
// 查询安全隐患列表
export function listDanger(query) {
return request({
url: '/zongzhi/danger/list',
method: 'get',
params: query
})
}
// 查询安全隐患详细
export function getDanger(id) {
return request({
url: '/zongzhi/danger/' + id,
method: 'get'
})
}
// 查询通报列表
export function listTb(query) {
return request({
url: '/zongzhi/tb/list',
method: 'get',
params: query
})
}
// 查询通报详细
export function getTb(id) {
return request({
url: '/zongzhi/tb/' + id,
method: 'get'
})
}

@ -17,7 +17,7 @@ const dict = {
getDictType({ commit }) {
return new Promise((resolve, reject) => {
const query = {
list: 'sys_user_sex,tc_net_sx,tc_yq_media,tc_enter_type,tc_inlet_yewu,tc_item_type,tc_net_safety_level,tc_yes_no,tc_unit_type,tc_tmt_type,tc_net_safety_level,tc_db_steam_state,tc_attack_type'
list: 'sys_user_sex,tc_net_sx,tc_yq_media,tc_enter_type,tc_inlet_yewu,tc_item_type,tc_net_safety_level,tc_yes_no,tc_unit_type,tc_tmt_type,tc_net_safety_level,tc_db_steam_state,tc_attack_type,tc_yh_level,tc_yh_source'
}
getDictList(query)
.then((res) => {

@ -1,6 +1,7 @@
import store from '@/store'
export function filterDict(type, value, isTown = false) {
if (!value) return
if (isTown) {
return filterTown(value)
} else {

@ -517,6 +517,7 @@ export default {
},
mounted() {
this.changeBtn() //
this.getSaftyscreenSupervise()
this.getSaftyscreenSafety()
this.getListDetection()
this.time = setInterval(() => { //
@ -620,6 +621,14 @@ export default {
getSaftyscreenSupervise() {
saftyscreenSupervise().then(res => {
// this.superviseObject[4].num = res.data.
res.data.forEach(item => {
this.superviseObject.forEach(it => {
if (item.name == it.title) {
it.num = item.count
}
})
})
console.log(res, 'aaa')
})
},
/**
@ -714,8 +723,12 @@ export default {
this.queryParams.type = 4
} else if (this.dialogType === '硬探针') {
this.queryParams.type = 3
} else {
} else if (this.dialogType === '监管单位') {
this.queryParams.type = 5
} else if (this.dialogType === '网站监测') {
this.queryParams.type = 6
} else {
this.queryParams.type = 7
}
this.getJgUnit()

@ -101,7 +101,7 @@
</div>
</module-title>
<!-- 最新隐患 -->
<div v-show="dangerCurrentIndex === 0" @click="rowDetails($event)">
<div v-show="dangerCurrentIndex === 0">
<div class="dangerTitle">
<span>单位名称</span>
<span>隐患名称</span>
@ -117,18 +117,17 @@
v-for="(item, idx) in dangerList"
:key="idx"
class="dangerText"
:data-obj="JSON.stringify(item)"
@click="rowDetails(item)"
>
<span :data-obj="JSON.stringify(item)" :title="item.systemName">{{
item.systemName
<span>{{
item.unitName
}}</span>
<span :data-obj="JSON.stringify(item)" :title="item.dangerNmae">{{
item.dangerNmae
}}</span>
<span :data-obj="JSON.stringify(item)">{{ item.grade }}</span>
<span :data-obj="JSON.stringify(item)" :title="item.source">{{
item.source
<span>{{
item.riskName
}}</span>
<span>{{ $filterDict('tc_yh_level',item.level) }}</span>
<span>
{{ $filterDict('tc_yh_source',item.riskSource) }}</span>
</div>
</vue-seamless-scroll>
</div>
@ -149,23 +148,19 @@
v-for="(item, index) in informList"
:key="index"
class="ctn_item"
:data-obj="JSON.stringify(item)"
>
<div
:data-obj="JSON.stringify(item)"
class="item_name"
:title="item.name"
>
{{ item.name }}
{{ item.depName }}
</div>
<div
:data-obj="JSON.stringify(item)"
class="item_ip"
:title="item.domainName"
>
{{ item.domainName }}
</div>
<span :data-obj="JSON.stringify(item)" class="item_num">{{
<span class="item_num">{{
item.status
}}</span>
</div>
@ -242,6 +237,7 @@
</template>
<script>
import { listDanger, getDanger, listTb, getTb } from '@/api/zongzhi/st.js'
import vueSeamlessScroll from 'vue-seamless-scroll'
import ModuleTitle from '../../common/ModuleTitle.vue'
import ReportingStatistics from './ReportingStatistics.vue'
@ -274,6 +270,16 @@ export default {
},
data() {
return {
total: 0,
queryParams: {
pageNum: 1,
pageSize: 10
},
total2: 0,
queryParams2: {
pageNum: 1,
pageSize: 10
},
loading: true,
//
announceCurrentIndex: 0,
@ -347,11 +353,11 @@ export default {
animate: true,
positionTimer: null,
//
dangerList: dangerList,
dangerList: [],
animate2: false,
positionTimer2: null,
//
informList: informList,
informList: [],
dialogStatus: false,
rowDta: {},
dialogDetails: false,
@ -391,10 +397,31 @@ export default {
destroyed() {
clearInterval(this.announceTime)
clearInterval(this.dangerTime)
clearInterval(this.dangerListTime)
clearInterval(this.tbTime)
},
mounted() {
this.dangerChange()
this.getListDanger()
this.dangerListTime = setInterval(() => { //
if (this.dangerList.length >= this.total) {
clearInterval(this.dangerListTime)
} else {
this.queryParams.pageNum = this.queryParams.pageNum + 1
this.getListDanger()
}
}, 6000)
this.getlistTb()
this.tbTime = setInterval(() => { //
if (this.informList.length >= this.total2) {
clearInterval(this.tbTime)
} else {
this.queryParams2.pageNum = this.queryParams2.pageNum + 1
this.getlistTb()
}
}, 6000)
// this.announceChange()
// this.dangerChange()
// getSafeHazardSatistic().then((res) => {
// if (res['T_HAZARD_SATISTIC[]']) {
// this.safetyList = []
@ -414,6 +441,25 @@ export default {
// })
},
methods: {
/**
* 最新隐患
*/
getListDanger() {
listDanger(this.queryParams).then(res => {
this.dangerList = [...this.dangerList, ...res.rows]
this.total = res.total
})
},
/**
* 通报处置
*/
getlistTb() {
listTb(this.queryParams2).then(res => {
console.log(res, 'www')
this.informList = [...this.informList, ...res.rows]
this.total2 = res.total
})
},
//
mouseOver(status) {
if (status === 'danger') {

Loading…
Cancel
Save