重大危险源

main
zhuxinpeng 1 year ago
parent 8e72a751a7
commit 87bc8fdd6d

@ -43,3 +43,10 @@ export function selectListByFilingId(filingId) {
method: 'get' method: 'get'
}) })
} }
export function getSourceAppTj(query) {
return request({
url: '/information/source/getSourceAppTj',
method: 'get',
params: query
})
}

@ -1,7 +1,7 @@
<template> <template>
<view :style="{ paddingTop: top + 'px' }"> <view>
<!-- // -->
<u-navbar bgColor="#ffffff" :placeholder="true" titleStyle="font-weight:600" title="重大危险源" :autoBack="true"> <u-navbar bgColor="#ffffff" :placeholder="true" titleStyle="font-weight:600" title="" :autoBack="true">
</u-navbar> </u-navbar>
<!-- <u-sticky bgColor="#fff"> <!-- <u-sticky bgColor="#fff">
@ -16,25 +16,26 @@
</u-sticky> --> </u-sticky> -->
<!-- <swiper :current="tabIndex" @change="tabChange" style="height: calc(100vh - 176rpx);margin-top: 10rpx;"> <!-- <swiper :current="tabIndex" @change="tabChange" style="height: calc(100vh - 176rpx);margin-top: 10rpx;">
<swiper-item> --> <swiper-item> -->
<view class="content"> <view class="content" style="height: 100%;overflow-y: scroll;">
<!-- 危险源统计 --> <!-- 危险源统计 -->
<view class="tongji" v-for="(item,index) in countList" :key="index"> <view class="tongji">
<view class="head"> <!-- <view class="head">-->
<image src="../../../static/images/zdwxy/dept.png" <!-- <image src="../../../static/images/zdwxy/dept.png"-->
style="width: 54rpx;height: 54rpx;margin-right: 28rpx;"></image> <!-- style="width: 54rpx;height: 54rpx;margin-right: 28rpx;"></image>-->
<view>{{item.deptName}}</view> <!-- <view>采气一厂</view>-->
</view> <!-- </view>-->
<view style="display: flex;justify-content: space-around; align-items: center;margin-top: 27rpx;"> <view
style="display: flex;justify-content: space-around; align-items: center;margin-top: 27rpx;">
<view class="bg"> <view class="bg">
<view> <view>
<image src="../../../static/images/zdwxy/weixianyuan.png" <image src="../../../static/images/zdwxy/weixianyuan.png"
style="width: 60rpx;height: 60rpx;margin-right: 24rpx;"></image> style="width: 60rpx;height: 60rpx;margin-right: 24rpx;"></image>
</view> </view>
<view class="title"> <view class="title">
<view style="font-size: 28rpx;color: #666666;">重大危险源场站</view> <view style="font-size: 28rpx;color: #666666;">重大危险源</view>
<view> <view>
<span style="font-weight: 400;font-size: 28rpx;color: #E65659;line-height: 38rpx;"> <span
{{item.czNum}}</span> style="font-weight: 400;font-size: 28rpx;color: #E65659;line-height: 38rpx;">{{ totalNum }}</span>
</view> </view>
</view> </view>
@ -45,67 +46,89 @@
style="width: 60rpx;height: 60rpx;margin-right: 24rpx;"></image> style="width: 60rpx;height: 60rpx;margin-right: 24rpx;"></image>
</view> </view>
<view class="title"> <view class="title">
<view style="font-size: 28rpx;color: #666666;">已备案重大危险源</view> <view style="font-size: 28rpx;color: #666666;">已备案危险源</view>
<view> <view>
<span <span
style="font-weight: 400;font-size: 30rpx;color: #2D6DFF;line-height: 38rpx;">{{item.dangerNum}}</span> style="font-weight: 400;font-size: 30rpx;color: #2D6DFF;line-height: 38rpx;">{{baNum}}</span>
</view> </view>
</view> </view>
</view> </view>
</view> </view>
</view> </view>
<!-- 危险源场站 --> <!-- 卡片 -->
<view> <view v-if="tableData.length === 0"
<view class="cardInfo" v-for="(item,index) in tableData" :key="index"> style="display: flex;flex-direction: column;align-items: center;justify-content: center;margin-top: 200rpx;">
<!-- <view class="head">
<image src="../../../static/images/zdwxy/dept.png" <image src="../../../static/images/none.png" style="width: 316rpx;height: 181rpx;"></image>
style="width: 54rpx;height: 54rpx;margin-right: 28rpx;"></image> <span style="color: #9f9f9f;margin-top: 30rpx;">该场站下暂无危险源信息~</span>
<view>{{ item.name }}</view>
</view> </view>
<view>到期时间:{{item.validityEnd}}</view> <view class="card" v-for="(item, index) in tableData" :key="index">
<view>归属单位{{item.plantName}}</view> <!-- 重大危险源头部 -->
<view class="gotodetail">查看危险源 <image src="../../../static/images/zdwxy/jiantou.png" <view class="head">
style="width: 36rpx;height: 23rpx;margin-left: 5rpx;"> <view style="font-weight: bold;font-size: 32rpx;color: #333333;">{{ item.name }}</view>
<view class="leavl">{{ setDict(item.level, levelList) }}</view>
</view>
<!-- 中间 -->
<view class="center" style="display: flex;">
<view style="width: 316rpx;height: 181rpx;overflow: hidden;" v-if="item.pics > 0">
<image :src="item.picList[0]" style="width: 100%;height: 100%;object-fit: cover;flex: 1;">
</image> </image>
</view> --> </view>
<view>
<view style="display: flex;">
<image src="../../../static/images/zdwxy/danger.png" <image src="../../../static/images/zdwxy/danger.png"
style="width: 178rpx;height: 131rpx;margin-right: 18rpx;"></image> style="width: 178rpx;height: 131rpx;margin-right: 18rpx;" v-else></image>
<view style="font-weight: normal;font-size: 28rpx;color: #333333;">
<!-- <view style="color: #333333;">负责人{{ item.directorName }}</view> -->
<view class="dept" style="margin: 5rpx 0;">{{ item.erDeptName }}/{{ item.deptName }}</view>
<view
style=" color: #333333;width:442rpx;overflow: hidden;white-space: nowrap;text-overflow: ellipsis;">
负责人{{ item.userName }}</view>
<view
style="color: #333333;width:442rpx;overflow: hidden;white-space: nowrap;text-overflow: ellipsis;">
位置{{ item.address }}</view>
</view>
</view>
<!-- 底部 -->
<view style="display: flex;padding: 14rpx 28rpx;justify-content: space-between;">
<view> <view>
<view class="drillName">{{item.name}}</view> <view>
<view class="address"> 备案状态
<image src="../../../static/images/drill/dept.png" <span style="color: #7D858E;">{{ setDict(item.baStatus, beianStatusList) }}</span>
style="width: 24rpx;height: 24rpx;" />
<span style="margin-left: 15rpx;">所属单位{{item.plantName}}</span>
</view> </view>
<view class="address"> <!-- <view>
<image src="../../../static/images/drill/time .png" alt="" srcset="" 危险源描述
style="width: 24rpx;height: 24rpx;" /> <span style="color: #7D858E;">{{ item.text1 }}</span>
<span style="margin-left: 15rpx;">到期时间{{item.validityEnd}}</span> </view> -->
<!-- <view
style="margin: 30rpx 0;width: 483rpx;overflow: hidden;white-space: nowrap;text-overflow: ellipsis;">
有效期
<span style="color: #7D858E;">{{ item.validityBegin }}
{{ item.validityEnd }}</span>
</view> -->
<view v-if="item.baStatus=='1'">{{item.baInfo}}</view>
<!-- <view v-if="item.fileList.length > 0">-->
<!-- <view>附件</view>-->
<!-- <view style="color: #3c9cff;font-weight: 400;margin-bottom: 20rpx;"-->
<!-- v-for="(item1,index1) in item.fileList" @click="goToPdfSee(item1.showUrl)"-->
<!-- v-if="item1.fileSuffix === 'pdf'">-->
<!-- {{item1.fileActualName}}-->
<!-- </view>-->
<!-- <view style="color: #3c9cff;font-weight: 400;margin-bottom: 20rpx;"-->
<!-- v-for="(item1,index1) in item.fileList" @click="prefile(item1.showUrl)" v-else>-->
<!-- {{item1.fileActualName}}-->
<!-- </view>-->
<!-- </view>-->
<!-- <view>查看危险源</view> -->
</view> </view>
</view> <view v-if="item.isBa == 'Y'">
</view> <image src="../../../static/images/zdwxy/success.png" style="width: 129rpx;height: 129rpx;">
<view>备案回执</view>
<view style="color: #3c9cff;font-weight: 400;margin-bottom: 20rpx;"
v-for="(item1,index1) in item.fileList" @click="goToPdfSee(item1.showUrl)"
v-if="item1.fileSuffix === 'pdf'">
{{item1.fileActualName}}
</view>
<view style="color: #3c9cff;font-weight: 400;margin-bottom: 20rpx;"
v-for="(item1,index1) in item.fileList" @click="prefile(item1.showUrl)" v-else>
{{item1.fileActualName}}
</view>
<view class="gotodetail" @click="gotoDetail(item.id)"> <image
src="../../../static/images/zdwxy/jiantou.png"
style="width: 36rpx;height: 23rpx;margin-left: 5rpx;">
</image> </image>
</view> </view>
</view> </view>
</view> </view>
</view> </view>
</view>
<!-- </swiper-item> <!-- </swiper-item>
<swiper-item>22</swiper-item> <swiper-item>22</swiper-item>
</swiper> --> </swiper> -->
@ -114,20 +137,22 @@
<script> <script>
import { import {
getDicts getDicts
} from '@/api/indexpage/user.js'; } from '@/api/indexpage/user.js'
// //
import { import {
listSource, listSource,
listSourceFiling, listSourceFiling,
getSource, getSource,
sourcePageInfo selectListByFilingId,
} from '@/api/indexpage/zdwxy/index.js'; getSourceAppTj
import { } from '@/api/indexpage/zdwxy/index.js'
getInfo
} from "@/api/login.js"
export default { export default {
onLoad(options) {
this.optionId = options.id
},
data() { data() {
return { return {
optionId: '', //id
// tabs // tabs
list1: [{ list1: [{
name: '危险源场站' name: '危险源场站'
@ -137,19 +162,20 @@
} }
], ],
totalNum: undefined,
baNum : undefined,
wbaNum: undefined,
tabIndex: 0, //tabs tabIndex: 0, //tabs
tableData: [], // tableData: [], //
levelList: [], // levelList: [], //
beianList: [], // beianList: [], //
beianStatusList: [], // beianStatusList: [] //
countList: [], // }
//
top: 0,
};
}, },
mounted() { mounted() {
this.getDict(); this.getDict()
this.top = uni.getSystemInfoSync().safeAreaInsets.top this.getList() //
}, },
methods: { methods: {
@ -174,86 +200,88 @@
goToPdfSee(url) { goToPdfSee(url) {
this.$tab.navigateTo(`/pages/pdf/filePreview?urlID=${url}`); this.$tab.navigateTo(`/pages/pdf/filePreview?urlID=${url}`);
}, },
getCount() {
sourcePageInfo().then(res => {
this.tableData = res.data.filingList; //
this.countList = res.data.sourceTjList; //
console.log(res, "数量统计");
})
},
// //
getDict() { getDict() {
getDicts('emergency_level').then(res => { getDicts('source_level').then(res => {
let dataInfo = res.data; let dataInfo = res.data
this.levelList = dataInfo.map(item => { this.levelList = dataInfo.map(item => {
return { return {
key: item.dictLabel, key: item.dictLabel,
value: item.dictValue value: item.dictValue
}; }
}); })
}); })
getDicts('filing_status').then(res => { getDicts('source_ba_status').then(res => {
let dataInfo = res.data; let dataInfo = res.data
this.beianStatusList = dataInfo.map(item => { this.beianStatusList = dataInfo.map(item => {
return { return {
key: item.dictLabel, key: item.dictLabel,
value: item.dictValue value: item.dictValue
}; }
}); })
}); })
this.getCount()
}, },
setDict(stauts, list) { setDict(stauts, list) {
for (let item of list) { for (let item of list) {
if (item.value === stauts) { if (item.value === stauts) {
return item.key; return item.key
} }
} }
}, },
gotoDetail(id) { //
this.$tab.navigateTo(`/pages/indexpage/zdwxy/dangerDetail/dangerDetail?id=${id}`) getList() {
// selectListByFilingId(this.optionId).then(res => {
// this.tableData = res.data
// console.log(this.tableData, '')
// })
getSourceAppTj().then(res => {
console.log(res.data,"sssssssssssssss")
this.totalNum = res.data.totalNum;
this.baNum = res.data.baNum;
this.wbaNum = res.data.wbaNum;
this.tableData = res.data.sourceVoList;
// console.log(this.tableData, '')
})
}, },
getBeiAnList() { getBeiAnList() {
listSourceFiling().then(res => { listSourceFiling().then(res => {
this.beianList = res.rows; this.beianList = res.rows
}); // console.log(res, "");
})
}, },
// tabs // tabs
clicktabs(e) { clicktabs(e) {
this.switchTab(e.index); this.switchTab(e.index)
}, },
// //
tabChange(e) { tabChange(e) {
let index = e.target.current || e.detail.current; // let index = e.target.current || e.detail.current //
this.switchTab(index); this.switchTab(index)
}, },
//---index //---index
switchTab(index) { switchTab(index) {
if (this.tabIndex == index) { if (this.tabIndex == index) {
return; return
} else { } else {
this.tabIndex = index; this.tabIndex = index
}
} }
} }
} }
};
</script> </script>
<style lang="scss"> <style lang="scss">
page { page {
box-sizing: border-box !important; box-sizing: border-box !important;
.content { .content {
height: 100%;
overflow-y: scroll;
padding: 30rpx; padding: 30rpx;
.tongji { .tongji {
width: 690rpx; width: 690rpx;
height: 298rpx; height: 150rpx;
background: #ffffff; background: #ffffff;
box-shadow: 0rpx 6rpx 8rpx 0rpx rgba(190, 207, 228, 0.4); box-shadow: 0rpx 6rpx 8rpx 0rpx rgba(190, 207, 228, 0.4);
border-radius: 20rpx; border-radius: 20rpx;
margin-bottom: 20rpx;
.head { .head {
display: flex; display: flex;
@ -273,40 +301,46 @@
} }
} }
.cardInfo { .card {
padding: 15rpx; width: 705rpx;
margin-top: 20rpx; height: 502rpx;
background: #FFFFFF; background: url('@/static/images/zdwxy/contentbg.png') no-repeat;
box-shadow: 0rpx 6rpx 8rpx 0rpx rgba(190, 207, 228, 0.4); background-size: 100% 100%;
border-radius: 10rpx; margin-top: 24rpx;
overflow: hidden;
.drillName { .head {
font-family: Noto Sans S Chinese; padding: 28rpx 32rpx;
display: flex;
justify-content: space-between;
border-bottom: 2rpx solid #eeeeee;
.leavl {
width: 97rpx;
height: 41rpx;
background: #ffb911;
border-radius: 17rpx 0rpx 17rpx 0rpx;
font-weight: 500; font-weight: 500;
font-size: 34rpx; font-size: 29rpx;
color: #212121; color: #ffffff;
} line-height: 41rpx;
.address {
font-weight: 500;
font-size: 28rpx;
color: #666666;
line-height: 40rpx;
}
.gotodetail {
width: 240rpx;
height: 60rpx;
line-height: 60rpx;
background: #4996FF;
border-radius: 10rpx;
font-family: Noto Sans S Chinese;
font-weight: normal;
font-size: 28rpx;
color: #FFFFFF;
text-align: center; text-align: center;
float: right; }
}
.center {
.dept {
background: #e9f2fd;
border-radius: 10rpx;
border: 1px solid #a5c6eb;
font-family: Noto Sans S Chinese;
font-weight: 400;
font-size: 26rpx;
color: #4c96dc;
padding: 8rpx 20rpx;
}
padding: 26rpx 27rpx;
border-bottom: 2rpx solid #eeeeee;
} }
} }
} }

@ -0,0 +1,314 @@
<template>
<view :style="{ paddingTop: top + 'px' }">
<!-- // -->
<u-navbar bgColor="#ffffff" :placeholder="true" titleStyle="font-weight:600" title="重大危险源" :autoBack="true">
</u-navbar>
<!-- <u-sticky bgColor="#fff">
<u-tabs lineWidth="37" gutter="25" :activeStyle="{
color: '#303133',
fontWeight: 'bold',
transform: 'scale(1.25)'
}" :inactiveStyle="{
color: '#999999',
transform: 'scale(1)'
}" :current="tabIndex" :scrollable="true" :list="list1" @click="clicktabs" style="padding-left: 20rpx;"></u-tabs>
</u-sticky> -->
<!-- <swiper :current="tabIndex" @change="tabChange" style="height: calc(100vh - 176rpx);margin-top: 10rpx;">
<swiper-item> -->
<view class="content">
<!-- 危险源统计 -->
<view class="tongji" v-for="(item,index) in countList" :key="index">
<view class="head">
<image src="../../../static/images/zdwxy/dept.png"
style="width: 54rpx;height: 54rpx;margin-right: 28rpx;"></image>
<view>{{item.deptName}}</view>
</view>
<view style="display: flex;justify-content: space-around; align-items: center;margin-top: 27rpx;">
<view class="bg">
<view>
<image src="../../../static/images/zdwxy/weixianyuan.png"
style="width: 60rpx;height: 60rpx;margin-right: 24rpx;"></image>
</view>
<view class="title">
<view style="font-size: 28rpx;color: #666666;">重大危险源场站</view>
<view>
<span style="font-weight: 400;font-size: 28rpx;color: #E65659;line-height: 38rpx;">
{{item.czNum}}</span>
</view>
</view>
</view>
<view class="bg">
<view>
<image src="../../../static/images/zdwxy/beian.png"
style="width: 60rpx;height: 60rpx;margin-right: 24rpx;"></image>
</view>
<view class="title">
<view style="font-size: 28rpx;color: #666666;">已备案重大危险源</view>
<view>
<span
style="font-weight: 400;font-size: 30rpx;color: #2D6DFF;line-height: 38rpx;">{{item.dangerNum}}</span>
</view>
</view>
</view>
</view>
</view>
<!-- 危险源场站 -->
<view>
<view class="cardInfo" v-for="(item,index) in tableData" :key="index">
<!-- <view class="head">
<image src="../../../static/images/zdwxy/dept.png"
style="width: 54rpx;height: 54rpx;margin-right: 28rpx;"></image>
<view>{{ item.name }}</view>
</view>
<view>到期时间:{{item.validityEnd}}</view>
<view>归属单位{{item.plantName}}</view>
<view class="gotodetail">查看危险源 <image src="../../../static/images/zdwxy/jiantou.png"
style="width: 36rpx;height: 23rpx;margin-left: 5rpx;">
</image>
</view> -->
<view>
<view style="display: flex;">
<image src="../../../static/images/zdwxy/danger.png"
style="width: 178rpx;height: 131rpx;margin-right: 18rpx;"></image>
<view>
<view class="drillName">{{item.name}}</view>
<view class="address">
<image src="../../../static/images/drill/dept.png"
style="width: 24rpx;height: 24rpx;" />
<span style="margin-left: 15rpx;">所属单位{{item.plantName}}</span>
</view>
<view class="address">
<image src="../../../static/images/drill/time .png" alt="" srcset=""
style="width: 24rpx;height: 24rpx;" />
<span style="margin-left: 15rpx;">到期时间{{item.validityEnd}}</span>
</view>
</view>
</view>
<view>备案回执</view>
<view style="color: #3c9cff;font-weight: 400;margin-bottom: 20rpx;"
v-for="(item1,index1) in item.fileList" @click="goToPdfSee(item1.showUrl)"
v-if="item1.fileSuffix === 'pdf'">
{{item1.fileActualName}}
</view>
<view style="color: #3c9cff;font-weight: 400;margin-bottom: 20rpx;"
v-for="(item1,index1) in item.fileList" @click="prefile(item1.showUrl)" v-else>
{{item1.fileActualName}}
</view>
<view class="gotodetail" @click="gotoDetail(item.id)"> <image
src="../../../static/images/zdwxy/jiantou.png"
style="width: 36rpx;height: 23rpx;margin-left: 5rpx;">
</image>
</view>
</view>
</view>
</view>
</view>
<!-- </swiper-item>
<swiper-item>22</swiper-item>
</swiper> -->
</view>
</template>
<script>
import {
getDicts
} from '@/api/indexpage/user.js';
//
import {
listSource,
listSourceFiling,
getSource,
sourcePageInfo
} from '@/api/indexpage/zdwxy/index.js';
import {
getInfo
} from "@/api/login.js"
export default {
data() {
return {
// tabs
list1: [{
name: '危险源场站'
},
{
name: '备案情况'
}
],
tabIndex: 0, //tabs
tableData: [], //
levelList: [], //
beianList: [], //
beianStatusList: [], //
countList: [], //
//
top: 0,
};
},
mounted() {
this.getDict();
this.top = uni.getSystemInfoSync().safeAreaInsets.top
},
methods: {
//
prefile(e) {
uni.downloadFile({
url: e,
success: function(res) {
var filePath = res.tempFilePath;
uni.openDocument({
filePath: filePath,
showMenu: true,
success: function(res) {
console.log('打开文档成功');
}
});
}
});
},
//pdf
goToPdfSee(url) {
this.$tab.navigateTo(`/pages/pdf/filePreview?urlID=${url}`);
},
getCount() {
sourcePageInfo().then(res => {
this.tableData = res.data.filingList; //
this.countList = res.data.sourceTjList; //
console.log(res, "数量统计");
})
},
//
getDict() {
getDicts('emergency_level').then(res => {
let dataInfo = res.data;
this.levelList = dataInfo.map(item => {
return {
key: item.dictLabel,
value: item.dictValue
};
});
});
getDicts('filing_status').then(res => {
let dataInfo = res.data;
this.beianStatusList = dataInfo.map(item => {
return {
key: item.dictLabel,
value: item.dictValue
};
});
});
this.getCount()
},
setDict(stauts, list) {
for (let item of list) {
if (item.value === stauts) {
return item.key;
}
}
},
gotoDetail(id) {
this.$tab.navigateTo(`/pages/indexpage/zdwxy/dangerDetail/dangerDetail?id=${id}`)
},
getBeiAnList() {
listSourceFiling().then(res => {
this.beianList = res.rows;
});
},
// tabs
clicktabs(e) {
this.switchTab(e.index);
},
//
tabChange(e) {
let index = e.target.current || e.detail.current; //
this.switchTab(index);
},
//---index
switchTab(index) {
if (this.tabIndex == index) {
return;
} else {
this.tabIndex = index;
}
}
}
};
</script>
<style lang="scss">
page {
box-sizing: border-box !important;
.content {
height: 100%;
overflow-y: scroll;
padding: 30rpx;
.tongji {
width: 690rpx;
height: 298rpx;
background: #ffffff;
box-shadow: 0rpx 6rpx 8rpx 0rpx rgba(190, 207, 228, 0.4);
border-radius: 20rpx;
margin-bottom: 20rpx;
.head {
display: flex;
align-items: center;
padding: 26rpx 45rpx;
border-bottom: 2rpx solid #eeeeee;
}
.bg {
width: 330rpx;
height: 143rpx;
background: url('@/static/images/zdwxy/bg.png') no-repeat;
background-size: 100% 100%;
display: flex;
align-items: center;
padding-left: 28rpx;
}
}
.cardInfo {
padding: 15rpx;
margin-top: 20rpx;
background: #FFFFFF;
box-shadow: 0rpx 6rpx 8rpx 0rpx rgba(190, 207, 228, 0.4);
border-radius: 10rpx;
overflow: hidden;
.drillName {
font-family: Noto Sans S Chinese;
font-weight: 500;
font-size: 34rpx;
color: #212121;
}
.address {
font-weight: 500;
font-size: 28rpx;
color: #666666;
line-height: 40rpx;
}
.gotodetail {
width: 240rpx;
height: 60rpx;
line-height: 60rpx;
background: #4996FF;
border-radius: 10rpx;
font-family: Noto Sans S Chinese;
font-weight: normal;
font-size: 28rpx;
color: #FFFFFF;
text-align: center;
float: right;
}
}
}
}
</style>
Loading…
Cancel
Save