|
@@ -2,8 +2,8 @@
|
|
|
<div class="app-container startInspection" v-loading.fullscreen.lock="loading">
|
|
|
<div class="page-top-title-box">
|
|
|
<p class="page-top-title-name-p">开展检查</p>
|
|
|
- <p class="page-top-title-button-p" v-hasPermi="['safety:checkManage_4:edit']" @click="upDataButton(1)">保存</p>
|
|
|
- <p class="page-top-title-submit-p" v-hasPermi="['safety:checkManage_4:edit']" @click="upDataButton(2)">提交</p>
|
|
|
+ <p class="page-top-title-button-p" v-hasPermiRouter="['safety:checkManage_4:edit']" @click="upDataButton(1)">保存</p>
|
|
|
+ <p class="page-top-title-submit-p" v-hasPermiRouter="['safety:checkManage_4:edit']" @click="upDataButton(2)">提交</p>
|
|
|
</div>
|
|
|
<div class="content-max-box scrollbar-box">
|
|
|
<el-form ref="addForm" :model="addForm" :rules="rules" label-width="82px">
|
|
@@ -14,9 +14,9 @@
|
|
|
v-model="addForm.subId" @change="subChange" :remote-method="getSubList">
|
|
|
<el-option
|
|
|
v-for="item in subSelectList"
|
|
|
- :key="item.id"
|
|
|
- :label="item.name"
|
|
|
- :value="item.id">
|
|
|
+ :key="item.subId"
|
|
|
+ :label="item.subName"
|
|
|
+ :value="item.subId">
|
|
|
</el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
@@ -354,10 +354,7 @@
|
|
|
<script>
|
|
|
import { getToken } from "@/utils/auth";
|
|
|
import lookImgDialog from '@/components/lookImgDialog/lookImgDialog.vue'
|
|
|
- import { listDepartments } from "@/apiDemo/system/dept";
|
|
|
- import { buildFloorGetlist } from "@/apiDemo/laboratory/building";
|
|
|
import {
|
|
|
- buildBySubList,
|
|
|
getCheckPlanBySubId,
|
|
|
findCheckManage,
|
|
|
checkOptionList,
|
|
@@ -368,6 +365,14 @@
|
|
|
getHazardInfoBySubId,
|
|
|
getHazardInfo, getHazardInfoByJoinIds
|
|
|
} from '@/apiDemo/safetyCheck/index'
|
|
|
+ // V3
|
|
|
+ import {
|
|
|
+ getDeptDropList,
|
|
|
+ systemBuildingGetOptList
|
|
|
+ } from '@/api/commonality/permission'
|
|
|
+ import {
|
|
|
+ laboratorySubRelInfoGetRelList
|
|
|
+ } from '@/api/commonality/noPermission'
|
|
|
export default {
|
|
|
name: 'index',
|
|
|
components: {
|
|
@@ -378,7 +383,7 @@
|
|
|
loading:false,
|
|
|
uploadImgUrl: this.uploadUrl(), // 上传的图片服务器地址
|
|
|
headers: {
|
|
|
- Authorization: "Bearer " + getToken(),
|
|
|
+ Authorization: getToken(),
|
|
|
},
|
|
|
//期限时间
|
|
|
pickerOptions: {
|
|
@@ -491,10 +496,10 @@
|
|
|
|
|
|
},
|
|
|
mounted(){
|
|
|
+ this.getDeptDropList();
|
|
|
+ this.systemBuildingGetOptList();
|
|
|
this.checkOptionList();
|
|
|
- this.listDepartments();
|
|
|
this.getGentle();
|
|
|
- this.buildFloorGetlist();
|
|
|
},
|
|
|
methods:{
|
|
|
getRowKeys(row) {
|
|
@@ -624,7 +629,7 @@
|
|
|
obj.checkHazardDtoList=list;
|
|
|
}
|
|
|
checkManageAdd(obj).then(response => {
|
|
|
- this.msgSuccess(response.msg);
|
|
|
+ this.msgSuccess(response.message);
|
|
|
this.initializationAddData();
|
|
|
});
|
|
|
}if(this.planType == 2){
|
|
@@ -695,7 +700,7 @@
|
|
|
obj.checkHazardDtoList=list;
|
|
|
}
|
|
|
checkManageUpdate(obj).then(response => {
|
|
|
- this.msgSuccess(response.msg);
|
|
|
+ this.msgSuccess(response.message);
|
|
|
this.initializationAddData();
|
|
|
});
|
|
|
}
|
|
@@ -908,21 +913,22 @@
|
|
|
|
|
|
},
|
|
|
//获取学院列表
|
|
|
- listDepartments(){
|
|
|
- listDepartments().then(response => {
|
|
|
- this.deptSelectList = response.data;
|
|
|
- });
|
|
|
+ getDeptDropList(){
|
|
|
+ //获取学院列表
|
|
|
+ getDeptDropList({ deptName: '', level: 2, deptType: 1 }).then(response => {
|
|
|
+ this.$set(this, 'deptSelectList', response.data)
|
|
|
+ })
|
|
|
},
|
|
|
//根据学院id查询楼栋列表
|
|
|
- buildFloorGetlist(){
|
|
|
- buildFloorGetlist({type:2}).then(response => {
|
|
|
- this.buildingsSelectList = response.rows;
|
|
|
+ systemBuildingGetOptList(){
|
|
|
+ systemBuildingGetOptList({type:2}).then(response => {
|
|
|
+ this.buildingsSelectList = response.data;
|
|
|
});
|
|
|
},
|
|
|
//根据楼栋id查询实验室列表
|
|
|
- buildBySubList(data,type){
|
|
|
+ laboratorySubRelInfoGetRelList(data,type){
|
|
|
let obj = type == 1?{buildId:data}:{searchValue:data}
|
|
|
- buildBySubList(obj).then(response => {
|
|
|
+ laboratorySubRelInfoGetRelList(obj).then(response => {
|
|
|
this.subSelectList = response.data;
|
|
|
});
|
|
|
},
|
|
@@ -942,13 +948,13 @@
|
|
|
this.initializationAddFormData();
|
|
|
this.$set(this,'planType',1);
|
|
|
this.$set(this,'planList',[]);
|
|
|
- this.buildBySubList(val,1);
|
|
|
+ this.laboratorySubRelInfoGetRelList(val,1);
|
|
|
},
|
|
|
//选择实验室触发
|
|
|
subChange(val){
|
|
|
let self = this;
|
|
|
for(let i=0;i<self.subSelectList.length;i++){
|
|
|
- if(self.subSelectList[i].id == val){
|
|
|
+ if(self.subSelectList[i].subId == val){
|
|
|
this.$set(this.addForm,'deptId',self.subSelectList[i].deptId);
|
|
|
this.$set(this.addForm,'buildId',self.subSelectList[i].buildId);
|
|
|
this.getCheckPlanBySubId(val);
|
|
@@ -966,7 +972,7 @@
|
|
|
this.initializationAddFormData();
|
|
|
this.$set(this,'planType',1);
|
|
|
this.$set(this,'planList',[]);
|
|
|
- this.buildBySubList(val,2);
|
|
|
+ this.laboratorySubRelInfoGetRelList(val,2);
|
|
|
},
|
|
|
//根据实验室ID查询计划任务
|
|
|
getCheckPlanBySubId(id){
|
|
@@ -1079,7 +1085,7 @@
|
|
|
}
|
|
|
this.pageType=2
|
|
|
}
|
|
|
- this.buildBySubList(response.data.buildId,1);
|
|
|
+ this.laboratorySubRelInfoGetRelList(response.data.buildId,1);
|
|
|
this.$set(this,'addForm',{
|
|
|
id:response.data.id,
|
|
|
checkPlanId:response.data.checkPlanId,
|