| | |
| | | <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-upload2">导出excel</el-button> |
| | | <el-button type="primary" class="btns" size="small" icon="el-icon-upload2" @click="exportData">导出excel |
| | | </el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | | <el-row class="title-center"> |
| | |
| | | </el-row> |
| | | <el-table ref="dataTable" :data="tableData" style="width: 100%" @selection-change="handleSelectionChange"> |
| | | <el-table-column type="selection" width="55" align="center"></el-table-column> |
| | | <el-table-column prop="number" label="编号" align="center" width="120"></el-table-column> |
| | | <el-table-column prop="number" label="编号" align="center" width="120"> |
| | | <template slot-scope="scope"> |
| | | <div class="blue-font-color" @click="showDetails(scope.row)">{{ scope.row.number }}</div> |
| | | </template> |
| | | </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 label="隐患项目" align="center"> |
| | | <el-table-column prop="check_date" label="检查时间" width="120" align="center"></el-table-column> |
| | | <el-table-column prop="check_date" label="检查时间" width="120" align="center"> |
| | | <template slot-scope="scope"> |
| | | <label>{{ formatDate(scope.row.check_date)}}</label><br/> |
| | | <label>{{ scope.row.check_class}}</label> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="address" label="地点" align="center"></el-table-column> |
| | | <el-table-column prop="ht_content" label="内容" align="center"></el-table-column> |
| | | <el-table-column prop="ht_content" label="内容" width="150" align="center"> |
| | | <template slot-scope="scope"> |
| | | <el-popover trigger="hover" placement="top"> |
| | | <p>{{ scope.row.ht_content }}</p> |
| | | <div slot="reference" class="name-wrapper">{{ |
| | | scope.row.ht_content != null && scope.row.ht_content.length > 10 ? scope.row.ht_content.substring(0, 8) + "...." : scope.row.ht_content |
| | | }} |
| | | </div> |
| | | </el-popover> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="ht_typesub" label="类别" align="center"></el-table-column> |
| | | <el-table-column prop="ht_level" label="级别" align="center"></el-table-column> |
| | | </el-table-column> |
| | | <el-table-column label="整改计划" align="center"> |
| | | <el-table-column prop="measure" label="整改措施" align="center"></el-table-column> |
| | | <el-table-column prop="measure" label="整改措施" width="150" align="center"> |
| | | <template slot-scope="scope"> |
| | | <el-popover trigger="hover" placement="top"> |
| | | <p>{{ scope.row.measure }}</p> |
| | | <div slot="reference" class="name-wrapper">{{ |
| | | scope.row.measure != null && scope.row.measure.length > 10 ? scope.row.measure.substring(0, 8) + "...." : scope.row.measure |
| | | }} |
| | | </div> |
| | | </el-popover> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="ht_branch" label="隐患部门" align="center"></el-table-column> |
| | | <el-table-column prop="duty_officer" label="责任人" align="center"></el-table-column> |
| | | <el-table-column prop="alter_time" label="限改时间" width="120" align="center"></el-table-column> |
| | | <el-table-column prop="alter_time" label="限改时间" :formatter="formatColumnDate" width="120" align="center"></el-table-column> |
| | | </el-table-column> |
| | | <el-table-column label="整改情况" align="center"> |
| | | <el-table-column prop="ACCOMPLISHTIME" label="完成时间" width="120" align="center"></el-table-column> |
| | | <el-table-column prop="ACCOMPLISHTIME" label="完成时间" :formatter="formatColumnDate" width="120" align="center"></el-table-column> |
| | | <el-table-column prop="CALLBACKRESULT" label="复查结果" align="center"></el-table-column> |
| | | <el-table-column prop="CALLBACKPERSON" label="复查人" align="center"></el-table-column> |
| | | <el-table-column prop="CALLBACKTIME" label="复查时间" width="120" align="center"></el-table-column> |
| | | <el-table-column prop="CALLBACKTIME" label="复查时间" :formatter="formatColumnDate" width="120" align="center"></el-table-column> |
| | | </el-table-column> |
| | | <el-table-column label="隐患处理状态" align="center"> |
| | | <template slot-scope="scope"> |
| | |
| | | </template> |
| | | <script> |
| | | import {getPageList, next_step_do} from "@/api/sgyhpczl/delayHiddenDangerRectification"; |
| | | import {danger_export_do} from "@/api/sgyhpczl/hiddenDangerRectification"; |
| | | import {initJCBM, initYHLX, initBC, initJCLB, initYHBM, initYHJB, initLlr} from "@/api/sgyhpczl/initSelect"; |
| | | |
| | | export default { |
| | |
| | | this.multipleSelection = val; |
| | | }, |
| | | // 发送隐患单跳转 |
| | | handleClick() { |
| | | handleClick(row) { |
| | | this.$router.push({ |
| | | path: "/rectificationDelayHiddenDanger" |
| | | path: "/rectificationDelayHiddenDanger", |
| | | query:{"id":row.id} |
| | | }) |
| | | }, |
| | | sendBath() { |
| | | |
| | | var selectData = this.$refs.dataTable.selection; |
| | | if (selectData.length < 1) { |
| | | this.$message({type: 'warn', message: "请选择需要发送的数据!", duration: 3000}) |
| | |
| | | "alter_time": now.toLocaleDateString().replaceAll("/", "-"), |
| | | "dealContent": "同意延期申请" //备注 |
| | | } |
| | | |
| | | this.$confirm('确认要发送吗?', '提示', { |
| | | confirmButtonText: '确定', |
| | | cancelButtonText: '取消', |
| | |
| | | } |
| | | }) |
| | | }) |
| | | |
| | | } |
| | | }, |
| | | exportData() { |
| | | var requestData = this.listQuery; |
| | | requestData.export_type = 4; |
| | | //删除分页参数 |
| | | this.$delete(requestData, 'page') |
| | | this.$delete(requestData, 'limit') |
| | | danger_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) |
| | | }) |
| | | }, |
| | | //方法区 |
| | | formatDate(data) { |
| | | // 获取单元格数据 |
| | | if(data == null) { |
| | | return null |
| | | } |
| | | let dt = new Date(data) |
| | | return dt.getFullYear() + '-' + (dt.getMonth() + 1) + '-' + dt.getDate() |
| | | }, |
| | | showDetails(row){ |
| | | this.$router.push({ |
| | | path: "/dangerDetails", |
| | | query:{"id":row.id} |
| | | }) |
| | | }, |
| | | //方法区 |
| | | 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> |
| | |
| | | background-color: #034ea2; |
| | | border: 1px solid #034ea2; |
| | | } |
| | | .blue-font-color:hover{ |
| | | cursor: pointer; |
| | | color: blue; |
| | | } |
| | | </style> |