| | |
| | | v-for="item in YHBMList" |
| | | :key="item.branch_id" |
| | | :label="item.branch_name" |
| | | :value="item.branch_id"> |
| | | :value="item.branch_name"> |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | |
| | | <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-button type="primary" class="btns" size="small" @click='deleteBatch'>删除</el-button> |
| | | </el-col> |
| | | </el-row> |
| | | <el-table :data="tableData" ref="pageTable" style="width: 100%" @selection-change="changeBox"> |
| | | <el-table :data="tableData" ref="pageTable" style="width: 100%" @selection-change="changeBox" v-loading="loading"> |
| | | <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> |
| | |
| | | <script> |
| | | import {getPageList, inspect_do, draw_inferences_do} from "@/api/sgyhpczl/safetyHazardAccount"; |
| | | import {delDanger} from "@/api/sgyhpczl/hiddenDangerRegistration"; |
| | | import {danger_export_do} from "@/api/sgyhpczl/hiddenDangerRectification"; |
| | | |
| | | |
| | | import {initJCBM, initYHLX, initBC, initJCLB, initYHBM, initYHJB, initLlr} from "@/api/sgyhpczl/initSelect"; |
| | | |
| | |
| | | tableData: [], |
| | | requestData: {}, |
| | | levelList:[{id:1,name:'低风险'},{id:2,name:'一般风险'},{id:3,name:'较大风险'},{id:4,name:'重大风险'}], |
| | | loading:false, |
| | | listQuery: { |
| | | page: 1, |
| | | limit: 10, |
| | |
| | | getPageList() { |
| | | this.listQuery.page = 1 |
| | | this.checkTime() |
| | | this.loading = true; |
| | | getPageList(this.listQuery).then(res => { |
| | | this.loading = false; |
| | | if (res.data.ok == 1) { |
| | | this.tableData = res.data.data.items |
| | | this.recordTotal = res.data.data.total |
| | |
| | | } |
| | | }) |
| | | } |
| | | } |
| | | }, |
| | | showDetails(row){ |
| | | this.$router.push({ |
| | | path: "/dangerDetails", |
| | | query:{"id":row.id,"route":"/safetyHazardAccount"} |
| | | }) |
| | | }, |
| | | exportData() { |
| | | this.listLoading = true |
| | | var requestData = JSON.parse(JSON.stringify(this.listQuery)); |
| | | requestData.export_type = 6; |
| | | //删除分页参数 |
| | | this.$delete(requestData, 'page') |
| | | this.$delete(requestData, 'limit') |
| | | danger_export_do(requestData).then(res => { |
| | | this.listLoading = false |
| | | 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) |
| | | }) |
| | | }, |
| | | } |
| | | }; |
| | | </script> |
| | |
| | | background-color: #034ea2; |
| | | background-color: #034ea2; |
| | | } |
| | | |
| | | .blue-font-color:hover{ |
| | | cursor: pointer; |
| | | color: blue; |
| | | } |
| | | </style> |
| | | |