From 506c405003dc401ff57d25a556f96f276d3b5f6d Mon Sep 17 00:00:00 2001 From: shj <1790240199@qq.com> Date: 星期四, 19 五月 2022 18:28:58 +0800 Subject: [PATCH] 会议 --- src/views/troubleshooting/index.vue | 508 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/permission.js | 2 src/views/careabout/index.vue | 3 src/router/index.js | 8 4 files changed, 519 insertions(+), 2 deletions(-) diff --git a/src/permission.js b/src/permission.js index b396d11..2fd8899 100644 --- a/src/permission.js +++ b/src/permission.js @@ -16,7 +16,7 @@ if (!permissionRoles) return true return roles.some(role => permissionRoles.indexOf(role) >= 0) } -const whiteList = ['/login', '/auth-redirect','/agreement','/register','/productionEquipment','/instrumentData','/oneFromanother','/hiddenDangerTroubleshootingList','/preview','/inspectionNotExist','/send','/Issuedbysuperiors','/oneFromanotherN','/summaryPotentialSafetyHzards','/safetyHazardAccount','/superiorsSend','/accountSend','/existN','/exist','/hazardSource','/safetyedit','/Dualbase','/supervision','/inferOtherThings','/DualbaseLost','/summaryList','/summaryForm','/chartAnalysis','/careabout']// no redirect whitelist +const whiteList = ['/login', '/auth-redirect','/agreement','/register','/productionEquipment','/instrumentData','/oneFromanother','/hiddenDangerTroubleshootingList','/preview','/inspectionNotExist','/send','/Issuedbysuperiors','/oneFromanotherN','/summaryPotentialSafetyHzards','/safetyHazardAccount','/superiorsSend','/accountSend','/existN','/exist','/hazardSource','/safetyedit','/Dualbase','/supervision','/inferOtherThings','/DualbaseLost','/summaryList','/summaryForm','/chartAnalysis','/careabout','/troubleshooting']// no redirect whitelist router.beforeEach((to, from, next) => { NProgress.start() // start progress bar diff --git a/src/router/index.js b/src/router/index.js index 7ef57b6..eb457d4 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -494,6 +494,14 @@ component: () => import('@/views/careabout'), meta: { title: '您关注的隐患', icon: '' } }, + { + id: 14, + parentId: 0, + path: '/troubleshooting', + name: '隐患排查会议', + component: () => import('@/views/troubleshooting'), + meta: { title: '隐患排查会议', icon: '' } + }, ] } ] diff --git a/src/views/careabout/index.vue b/src/views/careabout/index.vue index 750e0e3..2cdb1e8 100644 --- a/src/views/careabout/index.vue +++ b/src/views/careabout/index.vue @@ -135,7 +135,8 @@ </el-form-item> <el-form-item style="text-align:center;padding:0 50px"> <el-button type="primary" class="btns" size="small" icon="el-icon-search" @click="getPageList()">查询</el-button> - <el-button type="primary" class="btns" size="small" @click="reset()">重置</el-button> + <el-button type="primary" class="btns" size="small" icon=" +el-icon-refresh-right" @click="reset()">重置</el-button> <el-button type="primary" class="btns" size="small" icon="el-icon-upload2">导出excel</el-button> </el-form-item> </el-form> diff --git a/src/views/troubleshooting/index.vue b/src/views/troubleshooting/index.vue new file mode 100644 index 0000000..8879d09 --- /dev/null +++ b/src/views/troubleshooting/index.vue @@ -0,0 +1,508 @@ +<template> + <div class="app-container"> + <el-form + ref="form" + :inline="true" + class="inquire" + :model="form" + label-width="100px" + > + <el-form-item label="地点"> + <el-input + v-model="listQuery.form.address" + style="width: 202px" + placeholder="请输入内容" + ></el-input> + </el-form-item> + <el-form-item label="主持人"> + <el-input + v-model="listQuery.form.ht_content" + style="width: 202px" + placeholder="请输入内容" + ></el-input> + </el-form-item> + <el-form-item label="召开时间"> + <el-col :span="11"> + <el-date-picker + type="date" + placeholder="选择日期" + v-model="listQuery.form.check_dateStart" + style="width: 100%" + value-format="yyyy-MM-dd" + ></el-date-picker> + </el-col> + <el-col style="text-align: center" :span="2">-</el-col> + <el-col :span="11"> + <el-date-picker + type="date" + placeholder="选择日期" + v-model="listQuery.form.check_dateEnd" + style="width: 100%" + value-format="yyyy-MM-dd" + ></el-date-picker> + </el-col> + </el-form-item> + <el-form-item style="text-align: center; padding: 0 50px"> + <el-button + type="primary" + class="btns" + size="small" + icon="el-icon-search" + @click="getPageList()" + >查询</el-button + > + <el-button + type="primary" + class="btns" + size="small" + icon="el-icon-refresh-right" + @click="reset()" + >重置</el-button + > + </el-form-item> + </el-form> + <el-row class="title-center"> + <el-col :span="10"> + <el-radio-group v-model="listQuery.type" @change="typeChange"> + <el-radio-button label="0">未上报</el-radio-button> + <el-radio-button label="1">已上报</el-radio-button> + <el-radio-button label="2">上级公司会议</el-radio-button> + </el-radio-group> + </el-col> + <div v-if="listQuery.type==0"> + <el-col :span="10"> + <el-row> + <el-col :span="7" :offset="7" style="text-align: right;" + ><span style="line-height: 36px; font-size: 14px; color: #606266;margin-right:10px;font-weight: bold;" + >请选择上报方式</span + ></el-col + > + <el-col :span="10"> + <el-select + v-model="listQuery.form.check_main_branch" + placeholder="请选择" + @change="changeJCDW" + > + <el-option + v-for="item in JCDWList" + :key="item.value" + :label="item.label" + :value="item.value" + > + </el-option> + </el-select> + <el-button type="primary" class="btns" size="small" + >上报</el-button + > + </el-col> + </el-row> + </el-col> + <el-col :span="4" style="text-align: right"> + <el-button + class="btns" + type="primary" + size="small" + icon="el-icon-plus" + >添加</el-button + > + <el-button + class="btns" + type="primary" + size="small" + icon="el-icon-close" + @click="sendBath()" + >批量删除</el-button + > + </el-col> + </div> + <div v-if="listQuery.type==1"> + <el-col :span="14" style="text-align: right"> + <el-button + class="btns" + type="primary" + size="small" + >撤销</el-button + > + </el-col> + </div> + </el-row> + <el-row class="title-center"> + <el-col :span="10"> + <el-radio-group v-model="radio1"> + <el-radio-button label="0">全部</el-radio-button> + <el-radio-button label="1">综合</el-radio-button> + <el-radio-button label="2">生产</el-radio-button> + <el-radio-button label="3">设备</el-radio-button> + <el-radio-button label="4">电器</el-radio-button> + <el-radio-button label="5">仪表</el-radio-button> + <el-radio-button label="6">消防</el-radio-button> + <el-radio-button label="7">安全管理</el-radio-button> + <el-radio-button label="8">其他</el-radio-button> + </el-radio-group> + </el-col> + </el-row> + <el-table + :data="tableData" + style="width: 100%" + @selection-change="changeBox" + > + <el-table-column + type="selection" + width="55" + align="center" + ></el-table-column> + <el-table-column + v-if="listQuery.type==2" + prop="number" + label="会议单位" + align="center" + width="120" + ></el-table-column> + <el-table-column + prop="number" + label="召开时间" + align="center" + width="120" + ></el-table-column> + <el-table-column + prop="check_branch" + label="地点" + align="center" + width="120" + ></el-table-column> + <el-table-column + prop="check_man" + label="主持人" + align="center" + width="120" + ></el-table-column> + <el-table-column + prop="checktype" + label="会议专业" + align="center" + ></el-table-column> + <el-table-column + prop="checktype" + label="会议摘要" + align="center" + ></el-table-column> + <el-table-column prop="DTRisk_level" label="会议纪要" align="center"> + </el-table-column> + <el-table-column prop="date" v-if="listQuery.type==0" label="基本操作" align="center"> + <template slot-scope="scope"> + <el-button @click="updateClick(scope.row)" type="text" size="small">编辑</el-button> + <el-button @click="updateClick(scope.row)" type="text" size="small">保存</el-button> + <el-button @click="deleteClick(scope.row)" type="text" size="small">删除</el-button> + </template> + </el-table-column> + </el-table> + <div style="text-align: right"> + <el-pagination + v-show="recordTotal > 0" + @size-change="handleSizeChange" + @current-change="handleCurrentChange" + :current-page="currentPage" + :page-sizes="[10, 20, 30, 50]" + :page-size="pageSize" + layout="total, sizes, prev, pager, next, jumper" + :total="recordTotal" + > + </el-pagination> + </div> + </div> +</template> +<script> +import { getPageList, analogy_export_do } from "@/api/sgyhpczl/oneFromanotherN"; +import { + initJCBM, + initYHLX, + initJCLB, + initYHJB, +} from "@/api/sgyhpczl/initSelect"; + +export default { + data() { + return { + listQuery: { + page: 1, + limit: 10, + type: 0, + form: {}, + }, + radio1: 0, + table1: true, + table2: false, + + currentPage: 1, + pageSize: 10, + recordTotal: 0, + XFDWList: [], + YHLBList: [], + YHJBList: [], + JCLBList: [], + tableData: [], + selectedList: [], + listLoading: false, + selfInspectVisible: false, + selfInspectForm: { + id: "", + markUserName: "", + markDate: "", + remark: "", + }, + selfInspectFormRules: { + markUserName: [ + { required: true, message: "自查人不能为空", trigger: "blur" }, + ], + markDate: [ + { required: true, message: "自查时间不能为空", trigger: "blur" }, + ], + }, + }; + }, + mounted() { + this.getPageList(); + this.initJCLB(); + this.initXFDW(); + this.initYHJB(); + this.initYHLB(); + }, + methods: { + sendBath() { + this.$router.push({ + path: "/existN", + }); + }, + handleClick(data, val) { + if (val == "存在") { + this.$router.push({ + path: "/exist", + }); + } + }, + handoff(index) { + if (index == 1) { + this.table1 = false; + this.table2 = true; + this.listQuery.type = 2; + console.log(this.listQuery.type); + this.getPageList(); + } else { + this.table1 = true; + this.table2 = false; + } + }, + initXFDW() { + initJCBM(1).then((res) => { + if (res.data.ok == 1) { + this.XFDWList = res.data.data; + } else { + this.$message({ + type: "error", + message: res.data.msg, + duration: 3000, + }); + } + }); + }, + initYHLB() { + initYHLX().then((res) => { + if (res.data.ok == 1) { + this.YHLBList = res.data.data; + } else { + this.$message({ + type: "error", + message: res.data.msg, + duration: 3000, + }); + } + }); + }, + initYHJB() { + initYHJB().then((res) => { + if (res.data.ok == 1) { + this.YHJBList = res.data.data; + } else { + this.$message({ + type: "error", + message: res.data.msg, + duration: 3000, + }); + } + }); + }, + initJCLB() { + initJCLB().then((res) => { + if (res.data.ok == 1) { + this.JCLBList = res.data.data; + } else { + this.$message({ + type: "error", + message: res.data.msg, + duration: 3000, + }); + } + }); + }, + checkTime() { + if ( + this.listQuery.form.check_dateStart != null && + this.listQuery.form.check_dateStart != "" + ) { + if ( + this.listQuery.form.check_dateEnd != null && + this.listQuery.form.check_dateEnd != "" + ) { + } else { + this.$message({ + type: "error", + message: "请选择检查结束时间", + duration: 3000, + }); + return; + } + } + if ( + this.listQuery.form.check_dateEnd != null && + this.listQuery.form.check_dateEnd != "" + ) { + if ( + this.listQuery.form.check_dateStart != null && + this.listQuery.form.check_dateStart != "" + ) { + } else { + this.$message({ + type: "error", + message: "请选择检查开始时间", + duration: 3000, + }); + return; + } + } + }, + //搜索 + getPageList() { + this.listQuery.page = 1; + this.checkTime(); + getPageList(this.listQuery).then((res) => { + if (res.data.ok == 1) { + this.tableData = res.data.data.items; + this.recordTotal = res.data.data.total; + } else { + this.$message({ + type: "error", + message: res.data.msg, + duration: 3000, + }); + } + }); + }, + //重置 + reset() { + this.listQuery.form = {}; + this.getPageList(); + }, + handleSizeChange(val) { + this.listQuery.limit = val; + this.getPageListForPagination(); + }, + handleCurrentChange(val) { + this.listQuery.page = val; + this.getPageListForPagination(); + }, + getPageListForPagination() { + this.checkTime(); + getPageList(this.listQuery).then((res) => { + if (res.data.ok == 1) { + this.tableData = res.data.data.items; + this.recordTotal = res.data.data.total; + } else { + this.$message({ + type: "error", + message: res.data.msg, + duration: 3000, + }); + } + }); + }, + typeChange(val) { + this.listQuery.type = val; + this.getPageList(); + }, + handleSelectionChange(val) { + this.selectedList = []; + val.forEach((item) => { + this.selectedList.push(item); + }); + }, + exportData() { + var requestData = this.listQuery; + //删除分页参数 + this.$delete(requestData, "page"); + this.$delete(requestData, "limit"); + analogy_export_do(requestData) + .then((res) => { + var blob = new Blob([res.data]); + var downloadElement = document.createElement("a"); + var href = window.URL.createObjectURL(blob); //创建下载的链接 + downloadElement.href = href; + downloadElement.download = "内部举一反三.xlsx"; //下载后文件名 + document.body.appendChild(downloadElement); + downloadElement.click(); //点击下载 + document.body.removeChild(downloadElement); //下载完成移除元素 + window.URL.revokeObjectURL(href); //释放掉blob对象 + }) + .catch((err) => { + console.log(err); + }); + }, + //日期格式转换 + formatColumnDate(row, column) { + // 获取单元格数据 + let data = row[column.property]; + if (data == null) { + return null; + } + let dt = new Date(data); + return ( + dt.getFullYear() + "-" + (dt.getMonth() + 1) + "-" + dt.getDate() + " " + ); + }, + }, +}; +</script> +<style scoped> +.inquire { + display: flex; + justify-content: left; + flex-wrap: wrap; +} +.inquire .el-form-item { + padding: 0 20px; +} +.title-center { + padding: 20px 0; +} + +.btns { + background-color: #034ea2; + border: 1px solid #034ea2; +} + +.title-center /deep/ .el-radio-button:first-child .el-radio-button__inner { + border: none; +} + +.title-center /deep/ .el-radio-button__inner { + border: none; + border-radius: 0px; +} + +.title-center + /deep/ + .el-radio-button__orig-radio:checked + + .el-radio-button__inner { + background-color: #034ea2; + background-color: #034ea2; +} +</style> -- Gitblit v1.9.2