|
@@ -5,21 +5,21 @@
|
|
<el-form :model="queryParams" class="form-box" ref="queryForm" :inline="true" label-width="80px">
|
|
<el-form :model="queryParams" class="form-box" ref="queryForm" :inline="true" label-width="80px">
|
|
<div class="form-button-max-big-box">
|
|
<div class="form-button-max-big-box">
|
|
<div class="form-button-big-box" style="margin-left:10px;">
|
|
<div class="form-button-big-box" style="margin-left:10px;">
|
|
- <div :class="queryParams.buttonType==1?'checkDiv':''" @click="topLeftClickType(1)">
|
|
|
|
|
|
+ <div :class="queryParams.rectifyStatus===''?'checkDiv':''" @click="topLeftClickType('')">
|
|
<p class="text-p">全部</p>
|
|
<p class="text-p">全部</p>
|
|
- <p class="el-icon-check icon-p" v-if="queryParams.buttonType==1"></p>
|
|
|
|
|
|
+ <p class="el-icon-check icon-p" v-if="queryParams.rectifyStatus===''"></p>
|
|
</div>
|
|
</div>
|
|
- <div :class="queryParams.buttonType==2?'checkDiv':''" @click="topLeftClickType(2)">
|
|
|
|
|
|
+ <div :class="queryParams.rectifyStatus===0?'checkDiv':''" @click="topLeftClickType(0)">
|
|
<p class="text-p">待整改</p>
|
|
<p class="text-p">待整改</p>
|
|
- <p class="el-icon-check icon-p" v-if="queryParams.buttonType==2"></p>
|
|
|
|
|
|
+ <p class="el-icon-check icon-p" v-if="queryParams.rectifyStatus===0"></p>
|
|
</div>
|
|
</div>
|
|
- <div :class="queryParams.buttonType==3?'checkDiv':''" @click="topLeftClickType(3)">
|
|
|
|
|
|
+ <div :class="queryParams.rectifyStatus===1?'checkDiv':''" @click="topLeftClickType(1)">
|
|
<p class="text-p">已整改</p>
|
|
<p class="text-p">已整改</p>
|
|
- <p class="el-icon-check icon-p" v-if="queryParams.buttonType==3"></p>
|
|
|
|
|
|
+ <p class="el-icon-check icon-p" v-if="queryParams.rectifyStatus===1"></p>
|
|
</div>
|
|
</div>
|
|
- <div :class="queryParams.buttonType==4?'checkDiv':''" @click="topLeftClickType(4)">
|
|
|
|
|
|
+ <div :class="queryParams.rectifyStatus===2?'checkDiv':''" @click="topLeftClickType(2)">
|
|
<p class="text-p">暂无法整改</p>
|
|
<p class="text-p">暂无法整改</p>
|
|
- <p class="el-icon-check icon-p" v-if="queryParams.buttonType==4"></p>
|
|
|
|
|
|
+ <p class="el-icon-check icon-p" v-if="queryParams.rectifyStatus===2"></p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
@@ -29,16 +29,15 @@
|
|
v-model="queryParams.searchValue"
|
|
v-model="queryParams.searchValue"
|
|
placeholder="实验室/房间号/上报人"
|
|
placeholder="实验室/房间号/上报人"
|
|
clearable
|
|
clearable
|
|
- style="width: 180px"
|
|
|
|
- />
|
|
|
|
|
|
+ style="width: 180px"/>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<el-form-item label="学院" prop="deptId" label-width="50px">
|
|
<el-form-item label="学院" prop="deptId" label-width="50px">
|
|
<el-select v-model="queryParams.deptId" clearable placeholder="学院" style="width: 150px">
|
|
<el-select v-model="queryParams.deptId" clearable placeholder="学院" style="width: 150px">
|
|
<el-option
|
|
<el-option
|
|
v-for="item in deptSelectList"
|
|
v-for="item in deptSelectList"
|
|
- :key="item.key"
|
|
|
|
- :label="item.label"
|
|
|
|
- :value="item.key">
|
|
|
|
|
|
+ :key="item.deptId"
|
|
|
|
+ :label="item.deptName"
|
|
|
|
+ :value="item.deptId">
|
|
</el-option>
|
|
</el-option>
|
|
</el-select>
|
|
</el-select>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
@@ -62,7 +61,7 @@
|
|
<el-form-item style="float: right;">
|
|
<el-form-item style="float: right;">
|
|
<el-col :span="1.5">
|
|
<el-col :span="1.5">
|
|
<p class="inquire-button-one"
|
|
<p class="inquire-button-one"
|
|
- style="width:100px;"
|
|
|
|
|
|
+ style="width:100px;margin-right:0;"
|
|
@click="addButton"
|
|
@click="addButton"
|
|
><i class="el-icon-plus"></i> 随手拍</p>
|
|
><i class="el-icon-plus"></i> 随手拍</p>
|
|
</el-col>
|
|
</el-col>
|
|
@@ -81,14 +80,18 @@
|
|
<el-table border :data="tableList" ref="multipleTable" @sort-change="sortChange">
|
|
<el-table border :data="tableList" ref="multipleTable" @sort-change="sortChange">
|
|
<el-table-column label="序号" align="center" type="index" width="60" />
|
|
<el-table-column label="序号" align="center" type="index" width="60" />
|
|
<el-table-column label="学院" align="center" prop="deptName" show-overflow-tooltip/>
|
|
<el-table-column label="学院" align="center" prop="deptName" show-overflow-tooltip/>
|
|
- <el-table-column label="实验室" align="center" prop="deptName" show-overflow-tooltip width="220"/>
|
|
|
|
- <el-table-column label="安全责任人" align="center" prop="deptName" show-overflow-tooltip width="120"/>
|
|
|
|
- <el-table-column label="上报人" align="center" prop="deptName" show-overflow-tooltip width="90"/>
|
|
|
|
- <el-table-column label="上报时间" sortable align="center" prop="deptName" show-overflow-tooltip width="157"/>
|
|
|
|
- <el-table-column label="隐患描述" align="center" prop="deptName" show-overflow-tooltip width="280"/>
|
|
|
|
- <el-table-column label="整改人" align="center" prop="deptName" show-overflow-tooltip width="100"/>
|
|
|
|
- <el-table-column label="整改时间" sortable align="center" prop="deptName" show-overflow-tooltip width="157"/>
|
|
|
|
- <el-table-column label="整改状态" align="center" prop="deptName" show-overflow-tooltip width="120"/>
|
|
|
|
|
|
+ <el-table-column label="实验室" align="center" prop="subName" show-overflow-tooltip width="220"/>
|
|
|
|
+ <el-table-column label="安全责任人" align="center" prop="safetyPeople" show-overflow-tooltip width="120"/>
|
|
|
|
+ <el-table-column label="上报人" align="center" prop="createName" show-overflow-tooltip width="90"/>
|
|
|
|
+ <el-table-column label="上报时间" sortable="custom" align="center" prop="createTime" show-overflow-tooltip width="157"/>
|
|
|
|
+ <el-table-column label="隐患描述" align="center" prop="hazardDescribe" show-overflow-tooltip width="280"/>
|
|
|
|
+ <el-table-column label="整改人" align="center" prop="rectifyPeople" show-overflow-tooltip width="100"/>
|
|
|
|
+ <el-table-column label="整改时间" sortable="custom" align="center" prop="rectifyTime" show-overflow-tooltip width="157"/>
|
|
|
|
+ <el-table-column label="整改状态" align="center" prop="rectifyStatus" show-overflow-tooltip width="120">
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
+ {{scope.row.rectifyStatus==0?'待整改':(scope.row.rectifyStatus==1?'已整改':(scope.row.rectifyStatus==2?'暂无法整改':''))}}
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
<el-table-column label="操作" align="center" prop="deptName" width="70">
|
|
<el-table-column label="操作" align="center" prop="deptName" width="70">
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
<div class="table-button-box">
|
|
<div class="table-button-box">
|
|
@@ -102,38 +105,35 @@
|
|
:total="total"
|
|
:total="total"
|
|
:page.sync="queryParams.pageNum"
|
|
:page.sync="queryParams.pageNum"
|
|
:limit.sync="queryParams.pageSize"
|
|
:limit.sync="queryParams.pageSize"
|
|
- @pagination="getList"
|
|
|
|
- />
|
|
|
|
|
|
+ @pagination="getList"/>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<listPage v-if="pageType == 2"></listPage>
|
|
<listPage v-if="pageType == 2"></listPage>
|
|
- <infoPage v-if="pageType == 3"></infoPage>
|
|
|
|
|
|
+ <infoPage v-if="pageType == 3" :infoPropsData="infoPropsData"></infoPage>
|
|
<el-dialog class="safetyHazard-info-dialog-box" @close="outDialog"
|
|
<el-dialog class="safetyHazard-info-dialog-box" @close="outDialog"
|
|
title="随手拍上报" :visible.sync="addDialogType" v-if="addDialogType"
|
|
title="随手拍上报" :visible.sync="addDialogType" v-if="addDialogType"
|
|
width="787px" append-to-body>
|
|
width="787px" append-to-body>
|
|
<div>
|
|
<div>
|
|
- <el-form :model="addDialogForm" :rules="rules" label-width="140px">
|
|
|
|
|
|
+ <el-form ref="addDialogForm" :model="addDialogForm" :rules="rules" label-width="140px">
|
|
<el-form-item label="学院:" prop="deptId">
|
|
<el-form-item label="学院:" prop="deptId">
|
|
- <el-select v-model="addDialogForm.deptId" placeholder="请选择学院" style="width:548px;">
|
|
|
|
|
|
+ <el-select v-model="addDialogForm.deptId" @change="dialogDeptChange" placeholder="请选择学院" style="width:548px;">
|
|
<el-option
|
|
<el-option
|
|
- v-for="item in dialogDeptOptions"
|
|
|
|
- :key="item.value"
|
|
|
|
- :label="item.label"
|
|
|
|
- :value="item.value">
|
|
|
|
|
|
+ v-for="item in deptSelectList"
|
|
|
|
+ :key="item.deptId"
|
|
|
|
+ :label="item.deptName"
|
|
|
|
+ :value="item.deptId">
|
|
</el-option>
|
|
</el-option>
|
|
</el-select>
|
|
</el-select>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<el-form-item label="实验室:" prop="subId">
|
|
<el-form-item label="实验室:" prop="subId">
|
|
<el-select
|
|
<el-select
|
|
style="width:548px;"
|
|
style="width:548px;"
|
|
- v-model="addDialogForm.subjectId"
|
|
|
|
|
|
+ v-model="addDialogForm.subId"
|
|
filterable
|
|
filterable
|
|
remote
|
|
remote
|
|
- clearable
|
|
|
|
- @focus="selectFocus"
|
|
|
|
reserve-keyword
|
|
reserve-keyword
|
|
- @clear="clearClick"
|
|
|
|
placeholder="搜索选择实验室"
|
|
placeholder="搜索选择实验室"
|
|
|
|
+ @change="dialogSubChange"
|
|
:remote-method="getSelectList"
|
|
:remote-method="getSelectList"
|
|
:loading="dialogLoading">
|
|
:loading="dialogLoading">
|
|
<el-option
|
|
<el-option
|
|
@@ -144,21 +144,21 @@
|
|
</el-option>
|
|
</el-option>
|
|
</el-select>
|
|
</el-select>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
- <el-form-item label="隐患描述:" prop="text">
|
|
|
|
|
|
+ <el-form-item label="隐患描述:" prop="hazardDescribe">
|
|
<el-input
|
|
<el-input
|
|
type="textarea"
|
|
type="textarea"
|
|
:autosize="{ minRows: 4, maxRows: 4}"
|
|
:autosize="{ minRows: 4, maxRows: 4}"
|
|
placeholder="请输入隐患描述"
|
|
placeholder="请输入隐患描述"
|
|
- v-model="addDialogForm.text"
|
|
|
|
|
|
+ v-model="addDialogForm.hazardDescribe"
|
|
maxlength="100"
|
|
maxlength="100"
|
|
resize="none"
|
|
resize="none"
|
|
show-word-limit
|
|
show-word-limit
|
|
style="width:548px;">
|
|
style="width:548px;">
|
|
</el-input>
|
|
</el-input>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
- <el-form-item label="隐患照片:" prop="imgList">
|
|
|
|
- <div class="snapshotManagement-for-img-box" v-for="(img,imgIndex) in addDialogForm.imgList" :key="imgIndex">
|
|
|
|
- <img class="for-img" :src="img.url">
|
|
|
|
|
|
+ <el-form-item label="隐患照片:" prop="imgDtoList">
|
|
|
|
+ <div class="snapshotManagement-for-img-box" v-for="(img,imgIndex) in addDialogForm.imgDtoList" :key="imgIndex">
|
|
|
|
+ <img class="for-img" :src="img.fileUrl">
|
|
<p class="for-del-button el-icon-circle-close" @click="delImg(imgIndex)"></p>
|
|
<p class="for-del-button el-icon-circle-close" @click="delImg(imgIndex)"></p>
|
|
</div>
|
|
</div>
|
|
<el-upload
|
|
<el-upload
|
|
@@ -178,7 +178,7 @@
|
|
<div slot="footer" class="dialog-footer dialog-footer-box" style="display: flex">
|
|
<div slot="footer" class="dialog-footer dialog-footer-box" style="display: flex">
|
|
<p class="dialog-footer-button-null"></p>
|
|
<p class="dialog-footer-button-null"></p>
|
|
<p class="dialog-footer-button-info" @click="outDialog">取消</p>
|
|
<p class="dialog-footer-button-info" @click="outDialog">取消</p>
|
|
- <p class="dialog-footer-button-primary">确定</p>
|
|
|
|
|
|
+ <p class="dialog-footer-button-primary" @click="upDialogButton">确定</p>
|
|
<p class="dialog-footer-button-null"></p>
|
|
<p class="dialog-footer-button-null"></p>
|
|
</div>
|
|
</div>
|
|
</el-dialog>
|
|
</el-dialog>
|
|
@@ -186,6 +186,9 @@
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script>
|
|
<script>
|
|
|
|
+ import { securityCheckClapList,checkClapAdd } from '@/api/safetyCheck/index'
|
|
|
|
+ import { getNoAdminSubjectListNopage } from "@/api/laboratory/subject";
|
|
|
|
+ import { listDepartments } from "@/api/system/dept";
|
|
import listPage from './listPage.vue'
|
|
import listPage from './listPage.vue'
|
|
import infoPage from './infoPage.vue'
|
|
import infoPage from './infoPage.vue'
|
|
import { getToken } from "@/utils/auth";
|
|
import { getToken } from "@/utils/auth";
|
|
@@ -206,10 +209,11 @@
|
|
queryParams:{
|
|
queryParams:{
|
|
pageNum:1,
|
|
pageNum:1,
|
|
pageSize:20,
|
|
pageSize:20,
|
|
- buttonType:1,
|
|
|
|
- timeType:0,
|
|
|
|
- searchValue:"",
|
|
|
|
- data1:""
|
|
|
|
|
|
+ deptId:'',
|
|
|
|
+ searchValue:'',
|
|
|
|
+ rectifyStatus:'',
|
|
|
|
+ upTimeOrder:"",
|
|
|
|
+ zgTimeOrder:"",
|
|
},
|
|
},
|
|
dateRange:[],
|
|
dateRange:[],
|
|
tableList:[{}],
|
|
tableList:[{}],
|
|
@@ -218,9 +222,11 @@
|
|
addDialogType:false,
|
|
addDialogType:false,
|
|
addDialogForm:{
|
|
addDialogForm:{
|
|
deptId:"",
|
|
deptId:"",
|
|
|
|
+ deptName:"",
|
|
subId:"",
|
|
subId:"",
|
|
- text:"",
|
|
|
|
- imgList:[],
|
|
|
|
|
|
+ subName:"",
|
|
|
|
+ hazardDescribe:"",
|
|
|
|
+ imgDtoList:[],
|
|
},
|
|
},
|
|
rules:{
|
|
rules:{
|
|
deptId: [
|
|
deptId: [
|
|
@@ -229,7 +235,7 @@
|
|
subId: [
|
|
subId: [
|
|
{ required: true, message: "请选择实验室", trigger: "change" },
|
|
{ required: true, message: "请选择实验室", trigger: "change" },
|
|
],
|
|
],
|
|
- imgList: [
|
|
|
|
|
|
+ imgDtoList: [
|
|
{ required: true, message: "请上传隐患照片", trigger: "change" },
|
|
{ required: true, message: "请上传隐患照片", trigger: "change" },
|
|
],
|
|
],
|
|
},
|
|
},
|
|
@@ -238,13 +244,16 @@
|
|
dialogSubList:[],
|
|
dialogSubList:[],
|
|
dialogSubListData:[],
|
|
dialogSubListData:[],
|
|
suffixName:"",
|
|
suffixName:"",
|
|
|
|
+ //详情
|
|
|
|
+ infoPropsData:{}
|
|
}
|
|
}
|
|
},
|
|
},
|
|
created(){
|
|
created(){
|
|
|
|
|
|
},
|
|
},
|
|
mounted(){
|
|
mounted(){
|
|
-
|
|
|
|
|
|
+ this.listDepartments();
|
|
|
|
+ this.getList();
|
|
},
|
|
},
|
|
methods:{
|
|
methods:{
|
|
goPage(type,data){
|
|
goPage(type,data){
|
|
@@ -254,33 +263,50 @@
|
|
} else if(type==2){
|
|
} else if(type==2){
|
|
this.$set(this,'pageType',type);
|
|
this.$set(this,'pageType',type);
|
|
} else if(type==3){
|
|
} else if(type==3){
|
|
|
|
+ this.$set(this,'infoPropsData',data);
|
|
this.$set(this,'pageType',type);
|
|
this.$set(this,'pageType',type);
|
|
} else if(type==4){
|
|
} else if(type==4){
|
|
- this.$set(this,'pageType',type);
|
|
|
|
|
|
+ this.$set(this,'pageType',1);
|
|
|
|
+ this.getList();
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
},
|
|
//范围选择
|
|
//范围选择
|
|
topLeftClickType(type){
|
|
topLeftClickType(type){
|
|
- if(this.queryParams.buttonType != type){
|
|
|
|
- this.$set(this.queryParams,'buttonType',type);
|
|
|
|
|
|
+ if(this.queryParams.rectifyStatus !== type){
|
|
|
|
+ this.$set(this.queryParams,'rectifyStatus',type);
|
|
this.getList();
|
|
this.getList();
|
|
}
|
|
}
|
|
},
|
|
},
|
|
//时间排序方法
|
|
//时间排序方法
|
|
sortChange(val){
|
|
sortChange(val){
|
|
- //ascending 上 descending 下 null 无
|
|
|
|
- console.log('val',val.order)
|
|
|
|
- this.$set(this.queryParams,'timeType',val.order=='ascending'?1:(val.order=='descending'?2:''));
|
|
|
|
|
|
+ if(val.prop == 'rectifyTime'){
|
|
|
|
+ this.$set(this.queryParams,'zgTimeOrder',val.order=='ascending'?'1':(val.order=='descending'?'2':''));
|
|
|
|
+ this.$set(this.queryParams,'upTimeOrder','');
|
|
|
|
+ this.getList();
|
|
|
|
+ }else if(val.prop == 'createTime'){
|
|
|
|
+ this.$set(this.queryParams,'upTimeOrder',val.order=='ascending'?'1':(val.order=='descending'?'2':''));
|
|
|
|
+ this.$set(this.queryParams,'zgTimeOrder','');
|
|
|
|
+ this.getList();
|
|
|
|
+ }
|
|
},
|
|
},
|
|
//获取数据列表
|
|
//获取数据列表
|
|
getList(){
|
|
getList(){
|
|
- // this.queryParamsData = JSON.parse(JSON.stringify(this.queryParams));
|
|
|
|
- // this.queryParamsData.type = 'RFID_RECOGNIZER';
|
|
|
|
- // listHardware(this.queryParamsData).then(response => {
|
|
|
|
- // this.total = response.total;
|
|
|
|
- // this.tableList = response.rows;
|
|
|
|
- // });
|
|
|
|
|
|
+ let obj = JSON.parse(JSON.stringify(this.queryParams))
|
|
|
|
+ if(this.dateRange[0]){
|
|
|
|
+ obj.beginTime = this.dateRange[0]
|
|
|
|
+ }else{
|
|
|
|
+ obj.beginTime = ""
|
|
|
|
+ }
|
|
|
|
+ if(this.dateRange[1]){
|
|
|
|
+ obj.endTime = this.dateRange[1]
|
|
|
|
+ }else{
|
|
|
|
+ obj.endTime = ""
|
|
|
|
+ }
|
|
|
|
+ securityCheckClapList(obj).then(response => {
|
|
|
|
+ this.total = response.total;
|
|
|
|
+ this.tableList = response.rows;
|
|
|
|
+ });
|
|
},
|
|
},
|
|
/** 搜索按钮操作 */
|
|
/** 搜索按钮操作 */
|
|
handleQuery() {
|
|
handleQuery() {
|
|
@@ -293,16 +319,17 @@
|
|
this.$set(this,'queryParams',{
|
|
this.$set(this,'queryParams',{
|
|
pageNum:1,
|
|
pageNum:1,
|
|
pageSize:20,
|
|
pageSize:20,
|
|
- buttonType:1,
|
|
|
|
- timeType:0,
|
|
|
|
- searchValue:"",
|
|
|
|
- data1:""
|
|
|
|
|
|
+ deptId:'',
|
|
|
|
+ searchValue:'',
|
|
|
|
+ rectifyStatus:'',
|
|
|
|
+ upTimeOrder:"",
|
|
|
|
+ zgTimeOrder:"",
|
|
});
|
|
});
|
|
this.handleQuery();
|
|
this.handleQuery();
|
|
},
|
|
},
|
|
/*==========上传相关==========*/
|
|
/*==========上传相关==========*/
|
|
handleAvatarSuccess(res) {
|
|
handleAvatarSuccess(res) {
|
|
- if(this.addDialogForm.imgList.length>4){
|
|
|
|
|
|
+ if(this.addDialogForm.imgDtoList.length>4){
|
|
this.msgError('最多只可上传5张')
|
|
this.msgError('最多只可上传5张')
|
|
return
|
|
return
|
|
}
|
|
}
|
|
@@ -314,14 +341,14 @@
|
|
return
|
|
return
|
|
}
|
|
}
|
|
let obj ={
|
|
let obj ={
|
|
- name:this.upDataName,
|
|
|
|
- url:res.data.url,
|
|
|
|
|
|
+ fileName:this.upDataName,
|
|
|
|
+ fileUrl:res.data.url,
|
|
};
|
|
};
|
|
- this.addDialogForm.imgList.push(obj);
|
|
|
|
|
|
+ this.addDialogForm.imgDtoList.push(obj);
|
|
this.$forceUpdate()
|
|
this.$forceUpdate()
|
|
},
|
|
},
|
|
beforeAvatarUpload(file) {
|
|
beforeAvatarUpload(file) {
|
|
- if(this.addDialogForm.imgList.length>4){
|
|
|
|
|
|
+ if(this.addDialogForm.imgDtoList.length>4){
|
|
this.msgError('最多只可上传5张')
|
|
this.msgError('最多只可上传5张')
|
|
return false
|
|
return false
|
|
}
|
|
}
|
|
@@ -341,30 +368,61 @@
|
|
},
|
|
},
|
|
//删除照片
|
|
//删除照片
|
|
delImg(imgIndex){
|
|
delImg(imgIndex){
|
|
- this.addDialogForm.imgList.splice(imgIndex,1);
|
|
|
|
|
|
+ this.addDialogForm.imgDtoList.splice(imgIndex,1);
|
|
},
|
|
},
|
|
/**************** 新增窗口 ******************/
|
|
/**************** 新增窗口 ******************/
|
|
|
|
+ //提交
|
|
|
|
+ upDialogButton(){
|
|
|
|
+ this.$refs["addDialogForm"].validate(valid => {
|
|
|
|
+ if (valid) {
|
|
|
|
+ checkClapAdd(this.addDialogForm).then(response => {
|
|
|
|
+ this.msgSuccess(response.msg);
|
|
|
|
+ this.outDialog();
|
|
|
|
+ this.getList();
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ },
|
|
addButton(){
|
|
addButton(){
|
|
this.$set(this,'addDialogForm',{
|
|
this.$set(this,'addDialogForm',{
|
|
deptId:"",
|
|
deptId:"",
|
|
|
|
+ deptName:"",
|
|
subId:"",
|
|
subId:"",
|
|
- text:"",
|
|
|
|
- imgList:[],
|
|
|
|
|
|
+ subName:"",
|
|
|
|
+ hazardDescribe:"",
|
|
|
|
+ imgDtoList:[],
|
|
});
|
|
});
|
|
this.$set(this,'addDialogType',true);
|
|
this.$set(this,'addDialogType',true);
|
|
},
|
|
},
|
|
outDialog(){
|
|
outDialog(){
|
|
this.$set(this,'addDialogType',false);
|
|
this.$set(this,'addDialogType',false);
|
|
},
|
|
},
|
|
- //搜索实验室相关
|
|
|
|
- selectFocus(){
|
|
|
|
- if(!this.dialogSubList[0]){
|
|
|
|
-
|
|
|
|
|
|
+ //选中院系
|
|
|
|
+ dialogDeptChange(val){
|
|
|
|
+ let self = this;
|
|
|
|
+ let obj = {
|
|
|
|
+ deptId:val,
|
|
}
|
|
}
|
|
|
|
+ getNoAdminSubjectListNopage(obj).then(response => {
|
|
|
|
+ this.$set(this,'dialogSubListData',response.data);
|
|
|
|
+ this.$set(this,'dialogSubList',response.data);
|
|
|
|
+ for(let i=0;i<self.deptSelectList.length;i++){
|
|
|
|
+ if(val == self.deptSelectList[i].deptId){
|
|
|
|
+ self.$set(self.addDialogForm,'deptName',self.deptSelectList[i].deptName);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ this.$set(this.addDialogForm,'subId','');
|
|
|
|
+ this.$set(this.addDialogForm,'subName','');
|
|
|
|
+ });
|
|
},
|
|
},
|
|
- //实验室选中清除
|
|
|
|
- clearClick(){
|
|
|
|
- this.dialogSubList = JSON.parse(JSON.stringify(this.dialogSubListData))
|
|
|
|
|
|
+ //实验室选中
|
|
|
|
+ dialogSubChange(val){
|
|
|
|
+ let self = this;
|
|
|
|
+ for(let i=0;i<self.dialogSubList.length;i++){
|
|
|
|
+ if(val == self.dialogSubList[i].id){
|
|
|
|
+ self.$set(self.addDialogForm,'subName',self.dialogSubList[i].name);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
},
|
|
},
|
|
/** 实验室-本地懒加载 */
|
|
/** 实验室-本地懒加载 */
|
|
getSelectList(val) {
|
|
getSelectList(val) {
|
|
@@ -377,6 +435,12 @@
|
|
}
|
|
}
|
|
this.dialogSubList = JSON.parse(JSON.stringify(list))
|
|
this.dialogSubList = JSON.parse(JSON.stringify(list))
|
|
},
|
|
},
|
|
|
|
+ //获取学院列表
|
|
|
|
+ listDepartments(){
|
|
|
|
+ listDepartments().then(response => {
|
|
|
|
+ this.deptSelectList = response.data;
|
|
|
|
+ });
|
|
|
|
+ },
|
|
}
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
</script>
|