index==>yinhuan_index

main
MY-SH\lenovo 11 months ago
parent d2c41810c4
commit 92875bed71

@ -5,7 +5,7 @@ VUE_APP_TITLE = 唐河县安全隐患及应急救援管理平台
ENV = 'development' ENV = 'development'
# 若依管理系统/开发环境 # 若依管理系统/开发环境
VUE_APP_BASE_API = http://221.176.140.236:8082/ehs VUE_APP_BASE_API = http://221.176.140.236:8082/ehsTanghe
# 路由懒加载 # 路由懒加载
VUE_CLI_BABEL_TRANSPILE_MODULES = true VUE_CLI_BABEL_TRANSPILE_MODULES = true

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 257 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 62 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.9 KiB

@ -3,6 +3,7 @@
:default-active="activeMenu" :default-active="activeMenu"
mode="horizontal" mode="horizontal"
@select="handleSelect" @select="handleSelect"
class="hide_menu"
> >
<template v-for="(item, index) in topMenus"> <template v-for="(item, index) in topMenus">
<el-menu-item :style="{'--theme': theme}" :index="item.path" :key="index" v-if="index < visibleNumber"> <el-menu-item :style="{'--theme': theme}" :index="item.path" :key="index" v-if="index < visibleNumber">
@ -193,4 +194,7 @@ export default {
padding: 0 5px !important; padding: 0 5px !important;
margin: 0 10px !important; margin: 0 10px !important;
} }
.hide_menu{
display: none;
}
</style> </style>

@ -1,425 +1,224 @@
<template> <template>
<div class="app-container home"> <el-menu
<el-row :gutter="20"> :default-active="activeMenu"
<el-col :sm="24" :lg="24"> mode="horizontal"
<blockquote style="font-size: 14px"> @select="handleSelect"
本年度共有 >
<el-button type="text" >{{ <template v-for="(item, index) in topMenus">
yearData.unitNum <el-menu-item
}}</el-button> :style="{ '--theme': theme } "
家单位开展安全生产事故隐患排查治理排查出隐患 :index="item.path"
<el-button type="text" @click="haddenClick(1,'')">{{ :key="index"
yearData.hiddenDangerNum
}}</el-button>
已整改
<el-button type="text" @click="haddenClick(2,'')">{{
yearData.haveRectifiedNum
}}</el-button>
( 整改率为
<el-button type="text" >{{
yearData.rectifyRate
}}</el-button>
未整改
<el-button type="text" @click="haddenClick(3,'')">{{
yearData.notRectifiedNum
}}</el-button>
超期未整改
<el-button type="text" @click="haddenClick(4,'')">{{
yearData.exceedNotRectifiedNum
}}</el-button>
累计落实整改治理资金
<el-button type="text" >{{
yearData.rectifyMoneySum
}}</el-button>
万元
<br />
<br />
<div v-for="(item, i) in hiddenList" :key="i">
累计排查出{{ item.name }}
<el-button type="text" @click="haddenClick(1,item.hiddenDangerGrade)">{{
item.hiddenDangerNum
}}</el-button>
已整改
<el-button type="text" @click="haddenClick(2,item.hiddenDangerGrade)">{{
item.haveRectifiedNum
}}</el-button>
(整改率为
<el-button type="text" >{{
item.rectifyRate
}}</el-button>
)未整改
<el-button type="text" @click="haddenClick(3,item.hiddenDangerGrade)">{{
item.notRectifiedNum
}}</el-button>
超期未整改
<el-button type="text" @click="haddenClick(4,item.hiddenDangerGrade)">{{
item.exceedNotRectifiedNum
}}</el-button>
<br />
<br />
</div>
其中列入督办隐患治理项目
<el-button type="text" @click="haddenClick(5,'')">{{
collectData.hiddenDangerNum
}}</el-button>
已整改
<el-button type="text" @click="haddenClick(6,'')">{{
collectData.haveRectifiedNum
}}</el-button>
(整改率为
<el-button type="text" >{{
collectData.rectifyRate
}}</el-button>
未整改
<el-button type="text" @click="haddenClick(7,'')">{{
collectData.notRectifiedNum
}}</el-button>
超期未整改
<el-button type="text" @click="haddenClick(8,'')">{{
collectData.exceedNotRectifiedNum
}}</el-button>
)
<br />
</blockquote>
<el-divider />
<el-table :data="hiddenList" style="width: 100%">
<el-table-column prop="name" align="center" label="隐患级别" />
<el-table-column
prop="hiddenDangerNum"
align="center"
label="隐患事故"
/>
<el-table-column
prop="haveRectifiedNum"
align="center"
label="已整改"
/>
<el-table-column prop="rectifyRate" align="center" label="整改率" />
<el-table-column
prop="notRectifiedNum"
align="center"
label="未整改"
/>
<el-table-column
prop="exceedNotRectifiedNum"
align="center"
label="整改超期"
/>
</el-table>
</el-col>
</el-row>
<!--公文借出会话框-->
<el-dialog
title="隐患查询"
:visible.sync="open"
width="1200px"
append-to-body
>
<el-form
:model="queryParams"
ref="queryForm"
size="small"
:inline="true"
v-show="showSearch"
label-width="68px"
> >
<!-- <svg-icon
</el-form> v-if="item.meta && item.meta.icon && item.meta.icon !== '#'"
:icon-class="item.meta.icon"
<el-table v-loading="loading" border :data="detailsList"> /> -->
<!--<el-table-column label="主键" align="center" prop="id" />--> <img :src="item.meta.img" style="height: 40px; width:auto;" alt="">
<el-table-column label="序号" align="center"> {{ item.meta.title }}
<template slot-scope="scope"> </el-menu-item>
<span>{{ Number(scope.$index) + 1 }}</span> </template>
</template>
</el-table-column> <!-- 顶部菜单超出数量折叠 -->
<el-table-column <!-- <el-submenu :style="{'--theme': theme}" index="more" v-if="topMenus.length > visibleNumber">
label="隐患内容" <template slot="title">更多菜单</template>
align="center" <template v-for="(item, index) in topMenus">
prop="hiddenDangerDesc" <el-menu-item
/> :index="item.path"
<el-table-column :key="index"
label="单位名称" v-if="index >= visibleNumber">
align="center" <svg-icon
prop="enterpriseName" v-if="item.meta && item.meta.icon && item.meta.icon !== '#'"
/> :icon-class="item.meta.icon"/>
<el-table-column label="隐患级别" align="center" prop="hiddenDangerGrade"> {{ item.meta.title }}
<template slot-scope="scope"> </el-menu-item>
<dict-tag :options="dict.type.hidden_danger_grade" :value="scope.row.hiddenDangerGrade"/> </template>
</template> </el-submenu> -->
</el-table-column> </el-menu>
<el-table-column label="隐患类型" align="center" prop="hiddenDangerType">
<template slot-scope="scope">
<dict-tag :options="dict.type.hidden_danger_type" :value="scope.row.hiddenDangerType"/>
</template>
</el-table-column>
<el-table-column label="排查出隐患日期" align="center" prop="checkTime">
<template slot-scope="scope">
<span>{{
parseTime(scope.row.checkTime, "{y}-{m}-{d} {h}:{i}:{s}")
}}</span>
</template>
</el-table-column>
<el-table-column label="整改期限" align="center" prop="rectifyTermTime">
<template slot-scope="scope">
<span>{{
parseTime(scope.row.rectifyTermTime, "{y}-{m}-{d} {h}:{i}:{s}")
}}</span>
</template>
</el-table-column>
<el-table-column
label="整改责任人"
align="center"
prop="principalName"
/>
<el-table-column label="整改情况" align="center" prop="status" >
<template slot-scope="scope">
<dict-tag :options="dict.type.hidden_danger_status" :value="scope.row.status"/>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total > 0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<div slot="footer" class="dialog-footer">
<el-button @click="cancel"> </el-button>
</div>
</el-dialog>
</div>
</template> </template>
<script> <script>
import { import { constantRoutes } from "@/router";
getEhsIndexStatistics,
getSuperviseAndHandle, //
getEhsIndexStatisticsList, const hideList = ["/index", "/user/profile"];
detailslist,
} from "@/api/ehs/IndexStatistics"; export default {
import { parseTime } from "@/utils/ruoyi"; data() {
return {
export default { //
name: "Index", visibleNumber: 50,
dicts: ["hidden_danger_grade", "hidden_danger_status","hidden_danger_type" ], // index
data() { currentIndex: undefined,
return { img1:require('../assets/images/menu (1).png'),
showSearch: true, img2:require('../assets/images/menu (2).png'),
// img3:require('../assets/images/menu (3).png'),
loading: true, img4:require('../assets/images/menu (4).png'),
// img5:require('../assets/images/menu (5).png'),
total: 0, img6:require('../assets/images/menu (6).png'),
// img7:require('../assets/images/menu (6).png'),
queryParams: { img8:require('../assets/images/menu (6).png'),
pageNum: 1, img9:require('../assets/images/menu (6).png'),
pageSize: 10, img10:require('../assets/images/menu (6).png'),
isOverTime:null, img11:require('../assets/images/menu (6).png'),
params: { img12:require('../assets/images/menu (6).png'),
qxStartTime: null, };
qxEndTime: null, },
pcStartTime: null, computed: {
pcEndTime: null, theme() {
wcStartTime: null, return this.$store.state.settings.theme;
wcEndTime: null,
},
},
open: false,
yearData: {
unitNum: "",
hiddenDangerNum: "",
haveRectifiedNum: "",
notRectifiedNum: "",
exceedNotRectifiedNum: "",
rectifyMoneySum: "",
rectifyRate: "",
},
collectData: {
hiddenDangerNum: "",
haveRectifiedNum: "",
notRectifiedNum: "",
exceedNotRectifiedNum: "",
rectifyMoneySum: "",
rectifyRate: "",
},
hiddenList: [],
detailsList: [],
//
dateRange: [],
};
}, },
created() { //
this.getIndexDetails(); topMenus() {
this.$alert('这是一段内容', '标题名称', { let topMenus = [];
confirmButtonText: '确定', let imgArr= [this.img1,this.img2,this.img3,this.img4,this.img5,this.img6,this.img7,this.img8,this.img9,this.img10,this.img11,this.img12]
callback: action => { this.routers.map((menu,index) => {
//this.$router.push({ path: "ehs/ehsHiddenDanger/index" }); if (menu.hidden !== true) {
//
if (menu.path === "/") {
topMenus.push(menu.children[0]);
} else {
menu.meta.img = imgArr[index]
topMenus.push(menu);
}
} }
}); });
return topMenus;
}, },
methods: { //
parseTime, routers() {
/** 获取拟稿部门下拉列表 */ return this.$store.state.permission.topbarRouters;
getIndexDetails() { },
getEhsIndexStatistics().then((res) => { //
this.yearData.unitNum = res.data.unitNum; childrenMenus() {
this.yearData.hiddenDangerNum = res.data.hiddenDangerNum; var childrenMenus = [];
this.yearData.haveRectifiedNum = res.data.haveRectifiedNum; this.routers.map((router) => {
this.yearData.notRectifiedNum = res.data.notRectifiedNum; for (var item in router.children) {
this.yearData.exceedNotRectifiedNum = res.data.exceedNotRectifiedNum; if (router.children[item].parentPath === undefined) {
this.yearData.rectifyMoneySum = res.data.rectifyMoneySum; if (router.path === "/") {
this.yearData.rectifyRate = res.data.rectifyRate; router.children[item].path = "/" + router.children[item].path;
}); } else {
getSuperviseAndHandle().then((res) => { if (!this.ishttp(router.children[item].path)) {
this.collectData.hiddenDangerNum = res.data.hiddenDangerNum; router.children[item].path =
this.collectData.haveRectifiedNum = res.data.haveRectifiedNum; router.path + "/" + router.children[item].path;
this.collectData.notRectifiedNum = res.data.notRectifiedNum; }
this.collectData.exceedNotRectifiedNum = res.data.exceedNotRectifiedNum; }
this.collectData.rectifyRate = res.data.rectifyRate; router.children[item].parentPath = router.path;
}); }
getEhsIndexStatisticsList().then((res) => { childrenMenus.push(router.children[item]);
console.log(res);
this.hiddenList = res.data;
});
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
haddenClick(type,hiddenDangerGrade) {
this.open = true;
this.resetForm("queryForm");
this.queryParams.isOverTime = null;
this.queryParams.status = null;
this.queryParams.hiddenDangerGrade = null;
this.queryParams.isSupervise = null;
if(hiddenDangerGrade != ""){
this.queryParams.hiddenDangerGrade = hiddenDangerGrade;
} }
if(type == 2){// });
this.queryParams.status = "10"; return constantRoutes.concat(childrenMenus);
}else if(type == 3){//isOverTime },
this.queryParams.status = "0"; //
}else if(type == 4){// activeMenu() {
this.queryParams.isOverTime = "1"; const path = this.$route.path;
}else if(type == 5){// let activePath = path;
this.queryParams.isSupervise = 1; if (
}else if(type == 6){// path !== undefined &&
this.queryParams.isSupervise = 1; path.lastIndexOf("/") > 0 &&
this.queryParams.status = "10"; hideList.indexOf(path) === -1
}else if(type == 7){// ) {
this.queryParams.isSupervise = 1; const tmpPath = path.substring(1, path.length);
this.queryParams.status = "0"; activePath = "/" + tmpPath.substring(0, tmpPath.indexOf("/"));
}else if(type == 8){// if (!this.$route.meta.link) {
this.queryParams.isSupervise = 1; this.$store.dispatch("app/toggleSideBarHide", false);
this.queryParams.isOverTime = "1"; }
} else if (!this.$route.children) {
activePath = path;
this.$store.dispatch("app/toggleSideBarHide", true);
}
this.activeRoutes(activePath);
return activePath;
},
},
// beforeMount() {
// window.addEventListener('resize', this.setVisibleNumber)
// },
// beforeDestroy() {
// window.removeEventListener('resize', this.setVisibleNumber)
// },
// mounted() {
// this.setVisibleNumber();
// },
methods: {
//
// setVisibleNumber() {
// const width = document.body.getBoundingClientRect().width / 3;
// this.visibleNumber = parseInt(width / 85);
// },
//
handleSelect(key, keyPath) {
this.currentIndex = key;
const route = this.routers.find((item) => item.path === key);
if (this.ishttp(key)) {
// http(s)://
window.open(key, "_blank");
} else if (!route || !route.children) {
//
const routeMenu = this.childrenMenus.find((item) => item.path === key);
if (routeMenu && routeMenu.query) {
let query = JSON.parse(routeMenu.query);
this.$router.push({ path: key, query: query });
} else {
this.$router.push({ path: key });
} }
this.handleQuery(); this.$store.dispatch("app/toggleSideBarHide", true);
}, } else {
getList() { //
this.loading = true; this.activeRoutes(key);
console.log(this.queryParams); this.$store.dispatch("app/toggleSideBarHide", false);
detailslist(this.queryParams).then((response) => { }
this.detailsList = response.rows; },
this.total = response.total; //
this.loading = false; activeRoutes(key) {
var routes = [];
if (this.childrenMenus && this.childrenMenus.length > 0) {
this.childrenMenus.map((item) => {
if (key == item.parentPath || (key == "index" && "" == item.path)) {
routes.push(item);
}
}); });
}, }
/** 重置按钮操作 */ if (routes.length > 0) {
resetQuery() { this.$store.commit("SET_SIDEBAR_ROUTERS", routes);
this.queryParams.params.qxStartTime = null; } else {
this.queryParams.params.qxEndTime = null; this.$store.dispatch("app/toggleSideBarHide", true);
this.queryParams.params.pcStartTime = null; }
this.queryParams.params.pcEndTime = null; },
this.queryParams.params.wcStartTime = null; ishttp(url) {
this.queryParams.params.wcEndTime = null; return url.indexOf("http://") !== -1 || url.indexOf("https://") !== -1;
this.resetForm("queryForm");
this.handleQuery();
},
//
cancel() {
this.open = false;
},
/*statusToStr(value) {
if(value=="0")
return "未整改"
else if(value=="10")
return "已整改"
else
return "未知"
},*/
}, },
}; },
};
</script> </script>
<style scoped lang="scss"> <style lang="scss" scoped>
.home { .el-menu-item {
blockquote { display: block;
padding: 10px 20px; text-align: center;
margin: 0 0 20px; width: 16.6%;
font-size: 17.5px; line-height: 100px;
border-left: 5px solid #eee; height: auto;
} border: 1px solid #c1c1c1 !important;
hr {
margin-top: 20px; color: #494848;
margin-bottom: 20px; font-weight: 600;
border: 0; font-size: 17px;
border-top: 1px solid #eee; letter-spacing: 1px;
} }
.col-item {
margin-bottom: 20px; .el-menu.el-menu--horizontal {
} border-bottom: transparent;
// margin-left: 45px;
ul { // margin-top: 40px;
padding: 0; width: 95%;
margin: 0; margin: 30px auto;
} }
font-family: "open sans", "Helvetica Neue", Helvetica, Arial, sans-serif; .el-menu-item.is-active {
font-size: 13px; border: 1px solid #{'var(--theme)'} !important;
color: #676a6c; color: #3b3d41;
overflow-x: hidden; }
</style>
ul {
list-style-type: none;
}
h4 {
margin-top: 0px;
}
h2 {
margin-top: 10px;
font-size: 26px;
font-weight: 100;
}
p {
margin-top: 10px;
b {
font-weight: 700;
}
}
.update-log {
ol {
display: block;
list-style-type: decimal;
margin-block-start: 1em;
margin-block-end: 1em;
margin-inline-start: 0;
margin-inline-end: 0;
padding-inline-start: 40px;
}
}
}
</style>

@ -9,11 +9,14 @@
<!--<p class="pEnglish">Ministry of Emergency Management of the People's Republic of China</p>--> <!--<p class="pEnglish">Ministry of Emergency Management of the People's Republic of China</p>-->
</span> </span>
<span class="slogan"> <span class="slogan">
<p>对党忠诚 纪律严明</p> <!-- <p>对党忠诚 纪律严明</p>
<p>赴汤蹈火 竭诚为民</p> <p>赴汤蹈火 竭诚为民</p> -->
<img class="ft" src="../assets/images/ftdh.png" alt="">
<img class="ft" src="../assets/images/ddzc.png" alt="">
</span> </span>
</div> </div>
<div class="rightBox"> <div class="rightBox">
<img src="../assets/images/hui.png" alt="">
<span class="time">{{ currentTime }}</span> <span class="time">{{ currentTime }}</span>
<span class="day"> <span class="day">
<p>{{ currentDayOfWeek }}</p> <p>{{ currentDayOfWeek }}</p>
@ -24,7 +27,7 @@
</div> </div>
<div class="login"> <div class="login">
<el-form ref="loginForm" :model="loginForm" :rules="loginRules" class="login-form"> <el-form ref="loginForm" :model="loginForm" :rules="loginRules" class="login-form">
<h3 class="title">唐河县应急管理平台</h3> <h3 class="title">唐河县应急管理综合业务平台</h3>
<el-form-item prop="username"> <el-form-item prop="username">
<el-input <el-input
v-model="loginForm.username" v-model="loginForm.username"
@ -305,7 +308,11 @@ export default {
display: flex; display: flex;
align-items: center; align-items: center;
img{
width: 80px;
height: auto;
margin-right: 30px;
}
} }
} }
} }
@ -327,6 +334,12 @@ export default {
line-height: 10px; line-height: 10px;
font-weight: 500; font-weight: 500;
margin-left: 30px; margin-left: 30px;
display: flex;
flex-direction: column;
.ft{
object-fit: contain;
width: 222px !important;
}
} }
} }
.rightBox{ .rightBox{

@ -0,0 +1,419 @@
<template>
<div class="app-container home">
<el-row :gutter="20">
<el-col :sm="24" :lg="24">
<blockquote style="font-size: 14px">
本年度共有
<el-button type="text" >{{
yearData.unitNum
}}</el-button>
家单位开展安全生产事故隐患排查治理排查出隐患
<el-button type="text" @click="haddenClick(1,'')">{{
yearData.hiddenDangerNum
}}</el-button>
已整改
<el-button type="text" @click="haddenClick(2,'')">{{
yearData.haveRectifiedNum
}}</el-button>
( 整改率为
<el-button type="text" >{{
yearData.rectifyRate
}}</el-button>
未整改
<el-button type="text" @click="haddenClick(3,'')">{{
yearData.notRectifiedNum
}}</el-button>
超期未整改
<el-button type="text" @click="haddenClick(4,'')">{{
yearData.exceedNotRectifiedNum
}}</el-button>
累计落实整改治理资金
<el-button type="text" >{{
yearData.rectifyMoneySum
}}</el-button>
万元
<br />
<br />
<div v-for="(item, i) in hiddenList" :key="i">
累计排查出{{ item.name }}
<el-button type="text" @click="haddenClick(1,item.hiddenDangerGrade)">{{
item.hiddenDangerNum
}}</el-button>
已整改
<el-button type="text" @click="haddenClick(2,item.hiddenDangerGrade)">{{
item.haveRectifiedNum
}}</el-button>
(整改率为
<el-button type="text" >{{
item.rectifyRate
}}</el-button>
)未整改
<el-button type="text" @click="haddenClick(3,item.hiddenDangerGrade)">{{
item.notRectifiedNum
}}</el-button>
超期未整改
<el-button type="text" @click="haddenClick(4,item.hiddenDangerGrade)">{{
item.exceedNotRectifiedNum
}}</el-button>
<br />
<br />
</div>
其中列入督办隐患治理项目
<el-button type="text" @click="haddenClick(5,'')">{{
collectData.hiddenDangerNum
}}</el-button>
已整改
<el-button type="text" @click="haddenClick(6,'')">{{
collectData.haveRectifiedNum
}}</el-button>
(整改率为
<el-button type="text" >{{
collectData.rectifyRate
}}</el-button>
未整改
<el-button type="text" @click="haddenClick(7,'')">{{
collectData.notRectifiedNum
}}</el-button>
超期未整改
<el-button type="text" @click="haddenClick(8,'')">{{
collectData.exceedNotRectifiedNum
}}</el-button>
)
<br />
</blockquote>
<el-divider />
<el-table :data="hiddenList" style="width: 100%">
<el-table-column prop="name" align="center" label="隐患级别" />
<el-table-column
prop="hiddenDangerNum"
align="center"
label="隐患事故"
/>
<el-table-column
prop="haveRectifiedNum"
align="center"
label="已整改"
/>
<el-table-column prop="rectifyRate" align="center" label="整改率" />
<el-table-column
prop="notRectifiedNum"
align="center"
label="未整改"
/>
<el-table-column
prop="exceedNotRectifiedNum"
align="center"
label="整改超期"
/>
</el-table>
</el-col>
</el-row>
<!--公文借出会话框-->
<el-dialog
title="隐患查询"
:visible.sync="open"
width="1200px"
append-to-body
>
<el-form
:model="queryParams"
ref="queryForm"
size="small"
:inline="true"
v-show="showSearch"
label-width="68px"
>
</el-form>
<el-table v-loading="loading" border :data="detailsList">
<!--<el-table-column label="主键" align="center" prop="id" />-->
<el-table-column label="序号" align="center">
<template slot-scope="scope">
<span>{{ Number(scope.$index) + 1 }}</span>
</template>
</el-table-column>
<el-table-column
label="隐患内容"
align="center"
prop="hiddenDangerDesc"
/>
<el-table-column
label="单位名称"
align="center"
prop="enterpriseName"
/>
<el-table-column label="隐患级别" align="center" prop="hiddenDangerGrade">
<template slot-scope="scope">
<dict-tag :options="dict.type.hidden_danger_grade" :value="scope.row.hiddenDangerGrade"/>
</template>
</el-table-column>
<el-table-column label="隐患类型" align="center" prop="hiddenDangerType">
<template slot-scope="scope">
<dict-tag :options="dict.type.hidden_danger_type" :value="scope.row.hiddenDangerType"/>
</template>
</el-table-column>
<el-table-column label="排查出隐患日期" align="center" prop="checkTime">
<template slot-scope="scope">
<span>{{
parseTime(scope.row.checkTime, "{y}-{m}-{d} {h}:{i}:{s}")
}}</span>
</template>
</el-table-column>
<el-table-column label="整改期限" align="center" prop="rectifyTermTime">
<template slot-scope="scope">
<span>{{
parseTime(scope.row.rectifyTermTime, "{y}-{m}-{d} {h}:{i}:{s}")
}}</span>
</template>
</el-table-column>
<el-table-column
label="整改责任人"
align="center"
prop="principalName"
/>
<el-table-column label="整改情况" align="center" prop="status" >
<template slot-scope="scope">
<dict-tag :options="dict.type.hidden_danger_status" :value="scope.row.status"/>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total > 0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<div slot="footer" class="dialog-footer">
<el-button @click="cancel"> </el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import {
getEhsIndexStatistics,
getSuperviseAndHandle,
getEhsIndexStatisticsList,
detailslist,
} from "@/api/ehs/IndexStatistics";
import { parseTime } from "@/utils/ruoyi";
export default {
name: "Index",
dicts: ["hidden_danger_grade", "hidden_danger_status","hidden_danger_type" ],
data() {
return {
showSearch: true,
//
loading: true,
//
total: 0,
//
queryParams: {
pageNum: 1,
pageSize: 10,
isOverTime:null,
params: {
qxStartTime: null,
qxEndTime: null,
pcStartTime: null,
pcEndTime: null,
wcStartTime: null,
wcEndTime: null,
},
},
open: false,
yearData: {
unitNum: "",
hiddenDangerNum: "",
haveRectifiedNum: "",
notRectifiedNum: "",
exceedNotRectifiedNum: "",
rectifyMoneySum: "",
rectifyRate: "",
},
collectData: {
hiddenDangerNum: "",
haveRectifiedNum: "",
notRectifiedNum: "",
exceedNotRectifiedNum: "",
rectifyMoneySum: "",
rectifyRate: "",
},
hiddenList: [],
detailsList: [],
//
dateRange: [],
};
},
created() {
this.getIndexDetails();
},
methods: {
parseTime,
/** 获取拟稿部门下拉列表 */
getIndexDetails() {
getEhsIndexStatistics().then((res) => {
this.yearData.unitNum = res.data.unitNum;
this.yearData.hiddenDangerNum = res.data.hiddenDangerNum;
this.yearData.haveRectifiedNum = res.data.haveRectifiedNum;
this.yearData.notRectifiedNum = res.data.notRectifiedNum;
this.yearData.exceedNotRectifiedNum = res.data.exceedNotRectifiedNum;
this.yearData.rectifyMoneySum = res.data.rectifyMoneySum;
this.yearData.rectifyRate = res.data.rectifyRate;
});
getSuperviseAndHandle().then((res) => {
this.collectData.hiddenDangerNum = res.data.hiddenDangerNum;
this.collectData.haveRectifiedNum = res.data.haveRectifiedNum;
this.collectData.notRectifiedNum = res.data.notRectifiedNum;
this.collectData.exceedNotRectifiedNum = res.data.exceedNotRectifiedNum;
this.collectData.rectifyRate = res.data.rectifyRate;
});
getEhsIndexStatisticsList().then((res) => {
console.log(res);
this.hiddenList = res.data;
});
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
haddenClick(type,hiddenDangerGrade) {
this.open = true;
this.resetForm("queryForm");
this.queryParams.isOverTime = null;
this.queryParams.status = null;
this.queryParams.hiddenDangerGrade = null;
this.queryParams.isSupervise = null;
if(hiddenDangerGrade != ""){
this.queryParams.hiddenDangerGrade = hiddenDangerGrade;
}
if(type == 2){//
this.queryParams.status = "10";
}else if(type == 3){//isOverTime
this.queryParams.status = "0";
}else if(type == 4){//
this.queryParams.isOverTime = "1";
}else if(type == 5){//
this.queryParams.isSupervise = 1;
}else if(type == 6){//
this.queryParams.isSupervise = 1;
this.queryParams.status = "10";
}else if(type == 7){//
this.queryParams.isSupervise = 1;
this.queryParams.status = "0";
}else if(type == 8){//
this.queryParams.isSupervise = 1;
this.queryParams.isOverTime = "1";
}
this.handleQuery();
},
getList() {
this.loading = true;
console.log(this.queryParams);
detailslist(this.queryParams).then((response) => {
this.detailsList = response.rows;
this.total = response.total;
this.loading = false;
});
},
/** 重置按钮操作 */
resetQuery() {
this.queryParams.params.qxStartTime = null;
this.queryParams.params.qxEndTime = null;
this.queryParams.params.pcStartTime = null;
this.queryParams.params.pcEndTime = null;
this.queryParams.params.wcStartTime = null;
this.queryParams.params.wcEndTime = null;
this.resetForm("queryForm");
this.handleQuery();
},
//
cancel() {
this.open = false;
},
/*statusToStr(value) {
if(value=="0")
return "未整改"
else if(value=="10")
return "已整改"
else
return "未知"
},*/
},
};
</script>
<style scoped lang="scss">
.home {
blockquote {
padding: 10px 20px;
margin: 0 0 20px;
font-size: 17.5px;
border-left: 5px solid #eee;
}
hr {
margin-top: 20px;
margin-bottom: 20px;
border: 0;
border-top: 1px solid #eee;
}
.col-item {
margin-bottom: 20px;
}
ul {
padding: 0;
margin: 0;
}
font-family: "open sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
font-size: 13px;
color: #676a6c;
overflow-x: hidden;
ul {
list-style-type: none;
}
h4 {
margin-top: 0px;
}
h2 {
margin-top: 10px;
font-size: 26px;
font-weight: 100;
}
p {
margin-top: 10px;
b {
font-weight: 700;
}
}
.update-log {
ol {
display: block;
list-style-type: decimal;
margin-block-start: 1em;
margin-block-end: 1em;
margin-inline-start: 0;
margin-inline-end: 0;
padding-inline-start: 40px;
}
}
}
</style>
Loading…
Cancel
Save