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

@ -180,3 +180,37 @@ export function getDetection(id) {
method: 'get' 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 }) { getDictType({ commit }) {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
const query = { 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) getDictList(query)
.then((res) => { .then((res) => {

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

@ -517,6 +517,7 @@ export default {
}, },
mounted() { mounted() {
this.changeBtn() // this.changeBtn() //
this.getSaftyscreenSupervise()
this.getSaftyscreenSafety() this.getSaftyscreenSafety()
this.getListDetection() this.getListDetection()
this.time = setInterval(() => { // this.time = setInterval(() => { //
@ -620,6 +621,14 @@ export default {
getSaftyscreenSupervise() { getSaftyscreenSupervise() {
saftyscreenSupervise().then(res => { saftyscreenSupervise().then(res => {
// this.superviseObject[4].num = res.data. // 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 this.queryParams.type = 4
} else if (this.dialogType === '硬探针') { } else if (this.dialogType === '硬探针') {
this.queryParams.type = 3 this.queryParams.type = 3
} else { } else if (this.dialogType === '监管单位') {
this.queryParams.type = 5 this.queryParams.type = 5
} else if (this.dialogType === '网站监测') {
this.queryParams.type = 6
} else {
this.queryParams.type = 7
} }
this.getJgUnit() this.getJgUnit()

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

Loading…
Cancel
Save