| | |
| | | </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-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-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 label="限改时间"> |
| | | <el-col :span="11"> |
| | | <el-date-picker type="date" placeholder="选择日期" v-model="listQuery.form.alter_timeStart" value-format="yyyy-MM-dd" style="width: 100%;"></el-date-picker> |
| | | <el-date-picker type="date" placeholder="选择日期" v-model="listQuery.form.alter_timeStart" |
| | | value-format="yyyy-MM-dd" style="width: 100%;"></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.alter_timeEnd" value-format="yyyy-MM-dd" style="width: 100%;"></el-date-picker> |
| | | <el-date-picker type="date" placeholder="选择日期" v-model="listQuery.form.alter_timeEnd" |
| | | value-format="yyyy-MM-dd" style="width: 100%;"></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-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-col> |
| | | <el-col :span="10"> |
| | | <el-form ref="form" :inline="true" :model="form" label-width="100px"> |
| | | <el-form-item label="EXCEL导入"> |
| | | <el-input v-model="form.name" placeholder="未选择文件"></el-input> |
| | | </el-form-item> |
| | | <!-- <el-form-item label="EXCEL导入">--> |
| | | <!-- <el-input v-model="form.name" placeholder="未选择文件"></el-input>--> |
| | | <!-- </el-form-item>--> |
| | | <el-form-item> |
| | | <el-button type="primary" size="small" class="btns" |
| | | >选择文件</el-button |
| | | <!-- <el-button type="primary" size="small" class="btns"--> |
| | | <!-- >选择文件--> |
| | | <!-- </el-button--> |
| | | <!-- >--> |
| | | |
| | | |
| | | <el-upload action="" :auto-upload="false" :multiple="false" :show-file-list="false" |
| | | :on-change="uploadByJsqd" style="display: inline;" :file-list="fileList" |
| | | > |
| | | <el-button |
| | | type="primary" |
| | | class="btns" |
| | | size="small" |
| | | icon="el-icon-bottom" |
| | | >导入</el-button |
| | | >导入 |
| | | </el-button |
| | | > |
| | | </el-upload> |
| | | |
| | | <el-button |
| | | type="primary" |
| | | class="btns" |
| | | size="small" |
| | | icon="el-icon-download" |
| | | >下载模板</el-button |
| | | >下载模板 |
| | | </el-button |
| | | > |
| | | </el-form-item> |
| | | </el-form> |
| | |
| | | type="primary" |
| | | size="small" |
| | | @click="fillRectification()" |
| | | >填写整改</el-button |
| | | >填写整改 |
| | | </el-button |
| | | > |
| | | <el-button |
| | | class="btns" |
| | | type="primary" |
| | | size="small" |
| | | @click="fillInspector()" |
| | | >填写督查</el-button |
| | | >填写督查 |
| | | </el-button |
| | | > |
| | | <el-button class="btns" type="primary" icon="el-icon-plus" @click="jump" size="small" |
| | | >添加</el-button |
| | | >添加 |
| | | </el-button |
| | | > |
| | | <el-button size="small" |
| | | >批量删除</el-button |
| | | <el-button size="small" @click="deleteBath" |
| | | >批量删除 |
| | | </el-button |
| | | > |
| | | |
| | | </el-col> |
| | | </el-row> |
| | | <el-table :data="tableData" style="width: 100%"> |
| | | <el-table :data="tableData" ref="dataTable" style="width: 100%"> |
| | | <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="ht_branch" label="隐患单位" align="center" width="120"></el-table-column> |
| | |
| | | <!-- <el-table-column label="隐患处理状态" align="center"> </el-table-column> --> |
| | | <el-table-column prop="DTRisk_bankId" label="是否关联" align="center"> |
| | | <template slot-scope="scope"> |
| | | <span v-if="scope.row.DTRisk_bankId==0 || scope.row.DTRisk_bankId=='' || scope.row.DTRisk_bankId==null">未关联</span> |
| | | <span |
| | | v-if="scope.row.DTRisk_bankId==0 || scope.row.DTRisk_bankId=='' || scope.row.DTRisk_bankId==null">未关联</span> |
| | | <span v-else>已关联</span> |
| | | </template> |
| | | </el-table-column> |
| | |
| | | </div> |
| | | </template> |
| | | <script> |
| | | import {getPageList} from "@/api/sgyhpczl/hiddenDangerManagement"; |
| | | import {getPageList, self_export_do, self_import_do, self_del_do} from "@/api/sgyhpczl/hiddenDangerManagement"; |
| | | import {initJCBM ,initYHLX, initBC ,initJCLB ,initYHBM ,initYHJB,initReformStatus} from "@/api/sgyhpczl/initSelect"; |
| | | |
| | | export default { |
| | | data() { |
| | | return { |
| | | fileList: [], |
| | | statusList:[], |
| | | options: [], |
| | | form:{}, |
| | |
| | | }) |
| | | }, |
| | | fillRectification(){ |
| | | var checkData = this.$refs.dataTable.selection; |
| | | if(checkData.length < 1){ |
| | | this.$message({type: 'warn', message: "请选择勾选需要填写的数据!", duration: 3000}) |
| | | return; |
| | | } |
| | | this.$router.push({ |
| | | path:"/fillRectification" |
| | | path: "/fillRectification", |
| | | query:{"checkData":checkData} |
| | | }) |
| | | }, |
| | | fillInspector(){ |
| | | var checkData = this.$refs.dataTable.selection; |
| | | if(checkData.length < 1){ |
| | | this.$message({type: 'warn', message: "请选择勾选需要填写的数据!", duration: 3000}) |
| | | return; |
| | | } |
| | | this.$router.push({ |
| | | path:"/fillInspector" |
| | | path: "/fillInspector", |
| | | query:{"checkData":checkData} |
| | | }) |
| | | window.open(href, '_blank'); |
| | | }, |
| | | exportData() { |
| | | var requestData = this.listQuery; |
| | | //删除分页参数 |
| | | this.$delete(requestData, 'page') |
| | | this.$delete(requestData, 'limit') |
| | | self_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) |
| | | }) |
| | | }, |
| | | //文件发生改变就会触发的事件 导入 |
| | | uploadByJsqd(file) { |
| | | //判断是否符合beforeAvatarUpload方法中的条件 |
| | | if (this.beforeAvatarUpload(file)) { |
| | | this.fileList.name = file.name |
| | | this.fileList.url = '' |
| | | var formdata = new FormData() |
| | | formdata.append('file', file.raw) |
| | | //importDevice:请求接口 formdata:传递参数 |
| | | self_import_do(formdata).then((res) => { |
| | | if (res.data.ok) { |
| | | this.$message({type: 'success', message: res.data.msg, duration: 3000}) |
| | | this.getPageList()//调用表格方法,刷新页面 |
| | | } else { |
| | | this.$message({type: 'error', message: res.data.msg, duration: 3000}) |
| | | } |
| | | }) |
| | | } |
| | | }, |
| | | //文件校验方法 |
| | | beforeAvatarUpload(file) { |
| | | // 通过split方法和fileArr方法获取到文件的后缀名 |
| | | let fileArr = file.name.split('.') |
| | | let suffix = fileArr[fileArr.length - 1] |
| | | //只能导入.xls和.xlsx文件 |
| | | if (!/(xls|xlsx)/i.test(suffix)) { |
| | | this.$message({type: 'error', message: "文件格式不正确", duration: 3000}) |
| | | |
| | | return false |
| | | } |
| | | return true |
| | | }, |
| | | deleteBath() { |
| | | var checkData = this.$refs.dataTable.selection; |
| | | if (checkData.length < 1) { |
| | | this.$message({type: 'warn', message: "请选择勾选需要删除的数据!", duration: 3000}) |
| | | return; |
| | | } |
| | | var deleteIds = ""; |
| | | checkData.forEach(n => { |
| | | deleteIds += n.id + ","; |
| | | }) |
| | | deleteIds = deleteIds.substring(0, deleteIds.length - 1); |
| | | console.log(deleteIds) |
| | | this.$confirm('确认删除吗', '提示', { |
| | | confirmButtonText: '确认', |
| | | cancelButtonText: '取消', |
| | | type: 'warning' |
| | | }).then((res) => { |
| | | console.log(res); |
| | | self_del_do(deleteIds).then(res=>{ |
| | | if (res.data.ok) { |
| | | this.$message({type: 'success', message: res.data.msg, duration: 3000}) |
| | | this.getPageList()//调用表格方法,刷新页面 |
| | | } else { |
| | | this.$message({type: 'error', message: res.data.msg, duration: 3000}) |
| | | } |
| | | }) |
| | | }) |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | |
| | | justify-content: left; |
| | | flex-wrap: wrap; |
| | | } |
| | | |
| | | .inquire .el-form-item { |
| | | padding: 0 46px; |
| | | } |
| | | |
| | | .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; |
| | | background-color: #034ea2; |
| | | background-color: #034ea2; |
| | | } |
| | | </style> |
| | | |