|
@@ -1,17 +1,17 @@
|
|
|
<!--整改情况-->
|
|
|
<template>
|
|
|
<div class="page-container rectificationNotice-listPage">
|
|
|
- <div class="page-container checkItem">
|
|
|
+ <div class="page-container checkItem" v-if="pageType == 1">
|
|
|
<div class="page-top-title-box">
|
|
|
<p class="page-top-title-name-p">整改情况</p>
|
|
|
<p class="page-top-title-out-p" @click="backPage">返回</p>
|
|
|
</div>
|
|
|
<div class="content-box scrollbar-box">
|
|
|
- <div class="page-form-title-box" style="border:none;" :class="advancedType?'page-advanced-form-title-box':''">
|
|
|
+ <div class="page-form-title-box" style="border:none;">
|
|
|
<el-form :model="queryParams" class="form-box" ref="queryForm"
|
|
|
:inline="true" style="width:100%;">
|
|
|
- <el-form-item label="" prop="queryParamsData2">
|
|
|
- <el-select v-model="queryParams.queryParamsData2" placeholder="检查状态" style="width: 180px">
|
|
|
+ <el-form-item label="" prop="rectifyStatus">
|
|
|
+ <el-select v-model="queryParams.rectifyStatus" placeholder="全部" style="width: 130px">
|
|
|
<el-option
|
|
|
v-for="dict in optionList"
|
|
|
:key="dict.value"
|
|
@@ -20,76 +20,75 @@
|
|
|
/>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="" prop="queryParamsData2">
|
|
|
- <el-select v-model="queryParams.queryParamsData2" placeholder="检查类型" style="width: 180px">
|
|
|
- <el-option
|
|
|
- v-for="dict in optionList"
|
|
|
- :key="dict.value"
|
|
|
- :label="dict.label"
|
|
|
- :value="dict.value"
|
|
|
- />
|
|
|
- </el-select>
|
|
|
+ <el-form-item label="" prop="planTitle">
|
|
|
+ <el-input
|
|
|
+ maxLength="30"
|
|
|
+ v-model="queryParams.planTitle"
|
|
|
+ placeholder="计划标题"
|
|
|
+ style="width: 130px"
|
|
|
+ />
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="" prop="queryParamsData2">
|
|
|
- <el-select v-model="queryParams.queryParamsData2" placeholder="一级指标" style="width: 180px">
|
|
|
- <el-option
|
|
|
- v-for="dict in optionList"
|
|
|
- :key="dict.value"
|
|
|
- :label="dict.label"
|
|
|
- :value="dict.value"
|
|
|
- />
|
|
|
- </el-select>
|
|
|
+ <el-form-item label="" prop="hazardCheckPro">
|
|
|
+ <el-cascader
|
|
|
+ style="width: 130px"
|
|
|
+ placeholder="检查指标"
|
|
|
+ v-model="queryParams.hazardCheckPro"
|
|
|
+ filterable
|
|
|
+ :show-all-levels="false"
|
|
|
+ :options="cascaderData"
|
|
|
+ :props="{ value: 'id', label: 'labelName',emitPath:false }"
|
|
|
+ ></el-cascader>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="" prop="hazardCheckName">
|
|
|
+ <el-input
|
|
|
+ maxLength="30"
|
|
|
+ v-model="queryParams.hazardCheckName"
|
|
|
+ placeholder="模糊搜索检查指标项"
|
|
|
+ style="width: 160px"
|
|
|
+ />
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="" prop="queryParamsData2">
|
|
|
- <el-select v-model="queryParams.queryParamsData2" placeholder="学院单位" style="width: 180px">
|
|
|
+ <el-form-item label="" prop="deptId">
|
|
|
+ <el-select v-model="queryParams.deptId" placeholder="学院单位" style="width: 130px">
|
|
|
<el-option
|
|
|
- v-for="dict in optionList"
|
|
|
- :key="dict.value"
|
|
|
- :label="dict.label"
|
|
|
- :value="dict.value"
|
|
|
+ v-for="dict in deptOption"
|
|
|
+ :key="dict.deptId"
|
|
|
+ :label="dict.deptName"
|
|
|
+ :value="dict.deptId"
|
|
|
/>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="" prop="queryParamsData2">
|
|
|
- <el-select v-model="queryParams.queryParamsData2" placeholder="楼栋" style="width: 180px">
|
|
|
+ <el-form-item label="" prop="levelId">
|
|
|
+ <el-select v-model="queryParams.levelId" placeholder="安全分级" style="width: 130px">
|
|
|
<el-option
|
|
|
- v-for="dict in optionList"
|
|
|
- :key="dict.value"
|
|
|
- :label="dict.label"
|
|
|
- :value="dict.value"
|
|
|
+ v-for="dict in levelOption"
|
|
|
+ :key="dict.levelId"
|
|
|
+ :label="dict.levelName"
|
|
|
+ :value="dict.levelId"
|
|
|
/>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="" prop="queryParamsData1" v-if="advancedType">
|
|
|
+ <el-form-item label="" prop="searchValue">
|
|
|
<el-input
|
|
|
maxLength="30"
|
|
|
- v-model="queryParams.queryParamsData1"
|
|
|
+ v-model="queryParams.searchValue"
|
|
|
placeholder="实验室/房间号"
|
|
|
- style="width: 190px"
|
|
|
+ style="width: 140px"
|
|
|
/>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="" prop="queryParamsData1" v-if="advancedType">
|
|
|
+ <el-form-item label="" prop="rectifyName">
|
|
|
<el-input
|
|
|
maxLength="30"
|
|
|
- v-model="queryParams.queryParamsData1"
|
|
|
- placeholder="计划标题"
|
|
|
- style="width: 190px"
|
|
|
- />
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="" prop="queryParamsData1" v-if="advancedType">
|
|
|
- <el-input
|
|
|
- maxLength="30"
|
|
|
- v-model="queryParams.queryParamsData1"
|
|
|
+ v-model="queryParams.rectifyName"
|
|
|
placeholder="整改人"
|
|
|
- style="width: 190px"
|
|
|
+ style="width: 130px"
|
|
|
/>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="" prop="state" v-if="advancedType">
|
|
|
+ <el-form-item label="" prop="state">
|
|
|
<el-date-picker
|
|
|
:clearable="false"
|
|
|
v-model="dateRange"
|
|
|
size="small"
|
|
|
- style="width: 330px"
|
|
|
+ style="width: 220px"
|
|
|
value-format="yyyy-MM-dd"
|
|
|
type="daterange"
|
|
|
range-separator="-"
|
|
@@ -97,50 +96,43 @@
|
|
|
end-placeholder="结束日期"
|
|
|
></el-date-picker>
|
|
|
</el-form-item>
|
|
|
- <!--与我相关-->
|
|
|
- <div class="form-button-max-big-box-me">
|
|
|
- <div class="form-button-big-box-me">
|
|
|
- <div :class="queryParams.myRelated==1?'checkDiv-me':''" @click="topRightClickType">
|
|
|
- <p class="text-p-me">与我相关</p>
|
|
|
- <p class="el-icon-check icon-p-me" v-if="queryParams.myRelated==1"></p>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
<p class="page-inquire-common-style-button" @click="handleQuery">查询</p>
|
|
|
<p class="page-reset-common-style-button" @click="resetQuery">重置</p>
|
|
|
- <p class="page-save-common-style-button" style="display: inline-block;margin-left:10px;" @click="searchToggle">{{advancedType?'普通搜索':'高级搜索'}}</p>
|
|
|
</el-form>
|
|
|
</div>
|
|
|
<div class="page-content-box" style="padding-top:0;">
|
|
|
<el-table class="table-box" v-loading="loading" border :data="dataList">
|
|
|
<el-table-column label="序号" type="index" width="60"/>
|
|
|
- <el-table-column label="计划标题" prop="name" show-overflow-tooltip/>
|
|
|
- <el-table-column label="不符合项" prop="content" width="260" show-overflow-tooltip/>
|
|
|
- <el-table-column label="实验室" prop="content" width="200" show-overflow-tooltip/>
|
|
|
- <el-table-column label="整改期限" prop="createTime" width="130" show-overflow-tooltip>
|
|
|
+ <el-table-column label="计划标题" prop="planTitle" show-overflow-tooltip/>
|
|
|
+ <el-table-column label="不符合项" prop="content" width="260" show-overflow-tooltip>
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <span>{{scope.row.hazardCheckName}} {{scope.row.hazardCheckName}}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="实验室" prop="subName" width="200" show-overflow-tooltip/>
|
|
|
+ <el-table-column label="整改期限" prop="rectifyDeadline" width="130" show-overflow-tooltip/>
|
|
|
+ <el-table-column label="整改状态" prop="rectifyStatus" width="100" show-overflow-tooltip>
|
|
|
<template slot-scope="scope">
|
|
|
- <span>{{ parseTime(scope.row.createTime,"{y}-{m}-{d} {h}:{i}") }}</span>
|
|
|
+ <span>{{scope.row.rectifyStatus == 1?'已完成':(scope.row.rectifyStatus == 2?'待整改':(scope.row.rectifyStatus == 3?'待复核':(scope.row.rectifyStatus == 4?'暂无法整改':'')))}}</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column label="整改状态" prop="content" width="100" show-overflow-tooltip/>
|
|
|
- <el-table-column label="整改人" prop="content" width="100" show-overflow-tooltip/>
|
|
|
- <el-table-column label="整改时间" prop="createTime" width="150" show-overflow-tooltip>
|
|
|
+ <el-table-column label="整改人" prop="rectifyName" width="100" show-overflow-tooltip/>
|
|
|
+ <el-table-column label="整改时间" prop="rectifyTime" width="150" show-overflow-tooltip>
|
|
|
<template slot-scope="scope">
|
|
|
- <span>{{ parseTime(scope.row.createTime,"{y}-{m}-{d} {h}:{i}") }}</span>
|
|
|
+ <span>{{ parseTime(scope.row.rectifyTime,"{y}-{m}-{d} {h}:{i}") }}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="复查结果" prop="reviewStatus" width="100" show-overflow-tooltip>
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <span>{{ scope.row.reviewStatus ==1 ?'已复查':(scope.row.reviewStatus ==0 ?'未复查':'') }}</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column label="复查结果" prop="content" width="100" show-overflow-tooltip/>
|
|
|
<el-table-column label="操作" width="100" show-overflow-tooltip >
|
|
|
<template slot-scope="scope">
|
|
|
<div class="table-button-box">
|
|
|
<p class="table-button-null"></p>
|
|
|
<p class="table-button-p"
|
|
|
- @click="tableButton(2,scope.row)"
|
|
|
-
|
|
|
- >整改</p>
|
|
|
- <p class="table-button-p"
|
|
|
- @click="tableButton(2,scope.row)"
|
|
|
-
|
|
|
+ @click="tableButton(1,scope.row)"
|
|
|
>详情</p>
|
|
|
<p class="table-button-null"></p>
|
|
|
</div>
|
|
@@ -157,15 +149,25 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
+ <initiateInspect v-if="pageType == 2" :initiateInspectData="initiateInspectData"></initiateInspect>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
- //import { getDicts } from "@/api/commonality/noPermission";
|
|
|
- //import { systemUserSelect } from "@/api/commonality/permission";
|
|
|
- //import { getInfo } from "@/api/basicsModules/index";
|
|
|
+ import {
|
|
|
+ getDeptDropList,
|
|
|
+ laboratoryClassLevelGetList,
|
|
|
+ } from '@/api/commonality/permission'
|
|
|
+ import {
|
|
|
+ securityCheckOptionList,
|
|
|
+ securityCheckDangerNoPermissList,
|
|
|
+ } from "@/api/safetyCheck/indexDemoOne";
|
|
|
+ import initiateInspect from "@/views/safetyCheck/components/initiateInspect/initiateInspect.vue";
|
|
|
export default {
|
|
|
name: 'listPage',
|
|
|
+ components: {
|
|
|
+ initiateInspect
|
|
|
+ },
|
|
|
props:{
|
|
|
propsData:{},
|
|
|
},
|
|
@@ -176,41 +178,43 @@
|
|
|
pageType:1,
|
|
|
//页面遮罩
|
|
|
loading:false,
|
|
|
- //下拉列表数据
|
|
|
- optionList:[{value:true,label:'启用'},{value:false,label:'停用'}],
|
|
|
+ optionList:[{value:null,label:'全部'},{value:2,label:'待整改'},{value:1,label:'已整改'},{value:4,label:'暂无法整改'},{value:5,label:'多次整改未完成'},],
|
|
|
+ //学院列表
|
|
|
+ deptOption:[],
|
|
|
+ //分级下拉列表
|
|
|
+ levelOption:[],
|
|
|
+ //检查项下拉列表
|
|
|
+ cascaderData:[],
|
|
|
//查询条件
|
|
|
queryParams:{
|
|
|
page:1,
|
|
|
pageSize:20,
|
|
|
- myRelated:1,
|
|
|
- queryParamsData1:"",
|
|
|
- queryParamsData2 :null,
|
|
|
+ rectifyStatus:null,
|
|
|
+ planTitle:"",
|
|
|
+ hazardCheckPro :null,
|
|
|
+ hazardCheckName :"",
|
|
|
+ deptId :null,
|
|
|
+ levelId :null,
|
|
|
+ searchValue :"",
|
|
|
},
|
|
|
//时间数据
|
|
|
dateRange:[],
|
|
|
- advancedType:false,
|
|
|
//列表数据
|
|
|
dataList:[],
|
|
|
//数据数量
|
|
|
total:0,
|
|
|
+ initiateInspectData:{},
|
|
|
}
|
|
|
},
|
|
|
created(){
|
|
|
-
|
|
|
+ this.getDeptDropList();
|
|
|
+ this.laboratoryClassLevelGetList();
|
|
|
+ this.securityCheckOptionList();
|
|
|
},
|
|
|
mounted(){
|
|
|
-
|
|
|
+ this.getList();
|
|
|
},
|
|
|
methods:{
|
|
|
- //搜索模式切换
|
|
|
- searchToggle(){
|
|
|
- this.$set(this,'advancedType',!this.advancedType);
|
|
|
- },
|
|
|
- //与我相关按钮
|
|
|
- topRightClickType(){
|
|
|
- this.$set(this.queryParams,'myRelated',this.queryParams.myRelated==1?0:1);
|
|
|
- this.handleQuery();
|
|
|
- },
|
|
|
// 返回按钮
|
|
|
backPage(){
|
|
|
this.$parent.tableButton(6);
|
|
@@ -226,9 +230,13 @@
|
|
|
this.$set(this,'queryParams',{
|
|
|
page:1,
|
|
|
pageSize:20,
|
|
|
- myRelated:1,
|
|
|
- queryParamsData1:"",
|
|
|
- queryParamsData2 :null,
|
|
|
+ rectifyStatus:null,
|
|
|
+ planTitle:"",
|
|
|
+ hazardCheckPro :null,
|
|
|
+ hazardCheckName :"",
|
|
|
+ deptId :null,
|
|
|
+ levelId :null,
|
|
|
+ searchValue :"",
|
|
|
});
|
|
|
this.getList();
|
|
|
},
|
|
@@ -243,7 +251,8 @@
|
|
|
obj.startTime = "";
|
|
|
obj.endTime = "";
|
|
|
}
|
|
|
- getListFunction(obj).then(response => {
|
|
|
+ obj.noticeId = this.propsData.noticeId
|
|
|
+ securityCheckDangerNoPermissList(obj).then(response => {
|
|
|
this.$set(this,'loading',false);
|
|
|
this.$set(this,'dataList',response.data.records);
|
|
|
this.$set(this,'total',response.data.total);
|
|
@@ -253,54 +262,92 @@
|
|
|
tableButton(type,row){
|
|
|
let self = this;
|
|
|
if(type == 1){
|
|
|
- //新增
|
|
|
- this.$set(this,'pageType',2);
|
|
|
- this.$set(this,'propsData',{});
|
|
|
- }else if(type == 2){
|
|
|
- //详情
|
|
|
this.$set(this,'pageType',2);
|
|
|
let obj = JSON.parse(JSON.stringify(row))
|
|
|
obj.showType = true;
|
|
|
- this.$set(this,'propsData',obj);
|
|
|
- }else if(type == 3){
|
|
|
- //编辑
|
|
|
- this.$set(this,'pageType',2);
|
|
|
- let obj = JSON.parse(JSON.stringify(row))
|
|
|
- obj.showType = false;
|
|
|
- this.$set(this,'propsData',obj);
|
|
|
- }else if(type == 4){
|
|
|
- //删除
|
|
|
- this.$confirm('是否确认删除?', "警告", {
|
|
|
- confirmButtonText: "确定",
|
|
|
- cancelButtonText: "取消",
|
|
|
- type: "warning"
|
|
|
- }).then(function() {
|
|
|
- }).then(() => {
|
|
|
- deleteFunction({id:row.id}).then(response => {
|
|
|
- self.msgSuccess(response.message)
|
|
|
- self.getList();
|
|
|
- });
|
|
|
- }).catch(() => {});
|
|
|
- }else if(type == 5){
|
|
|
- //启用&停用
|
|
|
- let text = row.state ? "停用" : "启用";
|
|
|
- this.$confirm('是否确认' + text + '?', "警告", {
|
|
|
- confirmButtonText: "确定",
|
|
|
- cancelButtonText: "取消",
|
|
|
- type: "warning"
|
|
|
- }).then(function() {
|
|
|
- }).then(() => {
|
|
|
- stateFunction({id:row.id,state:!row.state,}).then(response => {
|
|
|
- self.msgSuccess(response.message)
|
|
|
- self.getList();
|
|
|
- });
|
|
|
- }).catch(() => {});
|
|
|
+ obj.orderTitle = '检查详情';
|
|
|
+ obj.orderType = '2';
|
|
|
+ this.$set(this,'initiateInspectData',obj);
|
|
|
}else if(type == 6){
|
|
|
//返回并刷新
|
|
|
this.$set(this,'pageType',1);
|
|
|
this.getList();
|
|
|
}
|
|
|
},
|
|
|
+ //学院列表
|
|
|
+ getDeptDropList() {
|
|
|
+ getDeptDropList({ deptName: '', level: 2, deptType: 1 }).then(response => {
|
|
|
+ this.$set(this, 'deptOption', response.data)
|
|
|
+ })
|
|
|
+ },
|
|
|
+ //分级下拉列表
|
|
|
+ laboratoryClassLevelGetList(){
|
|
|
+ laboratoryClassLevelGetList({}).then(response => {
|
|
|
+ this.$set(this,'levelOption',response.data);
|
|
|
+ });
|
|
|
+ },
|
|
|
+ //检查项列表
|
|
|
+ securityCheckOptionList() {
|
|
|
+ securityCheckOptionList({}).then(response => {
|
|
|
+ let list = this.getCascaderData(JSON.parse(JSON.stringify(response.data)),3)
|
|
|
+ this.$nextTick(()=>{
|
|
|
+ this.$set(this, 'cascaderData', list)
|
|
|
+ })
|
|
|
+ })
|
|
|
+ },
|
|
|
+ //检查项格式处理
|
|
|
+ getCascaderData(list,type) {
|
|
|
+ let self = this
|
|
|
+ for (let i = 0; i < list.length; i++) {
|
|
|
+ list[i].labelName = list[i].code ? list[i].code + ' ' + list[i].name : list[i].name
|
|
|
+ if(list[i].level == type){
|
|
|
+ delete list[i].children
|
|
|
+ }else if (list[i].children) {
|
|
|
+ if (list[i].children[0]) {
|
|
|
+ list[i].children = self.getCascaderData(list[i].children,type)
|
|
|
+ } else {
|
|
|
+ list.splice(i, 1)
|
|
|
+ i--
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ list.splice(i, 1)
|
|
|
+ i--
|
|
|
+ }
|
|
|
+ }
|
|
|
+ for (let i = 0; i < list.length; i++) {
|
|
|
+ list[i].labelName = list[i].code ? list[i].code + ' ' + list[i].name : list[i].name
|
|
|
+ if(list[i].level == type){
|
|
|
+ delete list[i].children
|
|
|
+ }else if (list[i].children) {
|
|
|
+ if (list[i].children[0]) {
|
|
|
+ list[i].children = self.getCascaderData(list[i].children,type)
|
|
|
+ } else {
|
|
|
+ list.splice(i, 1)
|
|
|
+ i--
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ list.splice(i, 1)
|
|
|
+ i--
|
|
|
+ }
|
|
|
+ }
|
|
|
+ for (let i = 0; i < list.length; i++) {
|
|
|
+ list[i].labelName = list[i].code ? list[i].code + ' ' + list[i].name : list[i].name
|
|
|
+ if(list[i].level == type){
|
|
|
+ delete list[i].children
|
|
|
+ }else if (list[i].children) {
|
|
|
+ if (list[i].children[0]) {
|
|
|
+ list[i].children = self.getCascaderData(list[i].children,type)
|
|
|
+ } else {
|
|
|
+ list.splice(i, 1)
|
|
|
+ i--
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ list.splice(i, 1)
|
|
|
+ i--
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return list
|
|
|
+ },
|
|
|
},
|
|
|
}
|
|
|
</script>
|