|
@@ -6,7 +6,7 @@
|
|
<p class="page-top-title-submit-p" @click="upData">提交</p>
|
|
<p class="page-top-title-submit-p" @click="upData">提交</p>
|
|
</div>
|
|
</div>
|
|
<div class="content-box scrollbar-box">
|
|
<div class="content-box scrollbar-box">
|
|
- <el-form ref="form" :model="form" label-width="120px" :rules="rules" >
|
|
|
|
|
|
+ <el-form ref="form" :model="form" label-width="120px" :rules="form.dynamicLeveling?rulesOne:rules" >
|
|
<div class="title-box">
|
|
<div class="title-box">
|
|
<p class="left-title">基本信息</p>
|
|
<p class="left-title">基本信息</p>
|
|
</div>
|
|
</div>
|
|
@@ -66,21 +66,11 @@
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<p class="page-reset-common-style-button" @click="classifyClick()" style="margin-left:12px;margin-bottom:20px;width:90px;">分类配置</p>
|
|
<p class="page-reset-common-style-button" @click="classifyClick()" style="margin-left:12px;margin-bottom:20px;width:90px;">分类配置</p>
|
|
</div>
|
|
</div>
|
|
- <el-form-item label="实验室面积" prop="subArea" class="form-item">
|
|
|
|
- <el-input
|
|
|
|
- style="width:320px;"
|
|
|
|
- v-model="form.subArea"
|
|
|
|
- placeholder="请输入面积"
|
|
|
|
- oninput="value=value.replace(/[^0-9.]/g,'')"
|
|
|
|
- maxlength="4"
|
|
|
|
- size="small">
|
|
|
|
- <template slot="append">M²</template>
|
|
|
|
- </el-input>
|
|
|
|
- </el-form-item>
|
|
|
|
-<!-- <el-form-item label="动态评级" class="form-item" style="width:440px;">
|
|
|
|
|
|
+ <el-form-item label="动态评级" class="form-item" style="width:440px;">
|
|
<div class="tableListPaginationSwitch">
|
|
<div class="tableListPaginationSwitch">
|
|
<el-switch
|
|
<el-switch
|
|
class="switch captcha-img"
|
|
class="switch captcha-img"
|
|
|
|
+ @change="switchChange"
|
|
v-model="form.dynamicLeveling"
|
|
v-model="form.dynamicLeveling"
|
|
:active-value="true"
|
|
:active-value="true"
|
|
:inactive-value="false"
|
|
:inactive-value="false"
|
|
@@ -90,7 +80,18 @@
|
|
<i class="el-icon-warning tip-img"></i>
|
|
<i class="el-icon-warning tip-img"></i>
|
|
<i class="tip-content">如需人工评定,请关闭动态评级</i>
|
|
<i class="tip-content">如需人工评定,请关闭动态评级</i>
|
|
</div>
|
|
</div>
|
|
- </el-form-item>-->
|
|
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <el-form-item label="实验室面积" prop="subArea" class="form-item">
|
|
|
|
+ <el-input
|
|
|
|
+ style="width:320px;"
|
|
|
|
+ v-model="form.subArea"
|
|
|
|
+ placeholder="请输入面积"
|
|
|
|
+ oninput="value=value.replace(/[^0-9.]/g,'')"
|
|
|
|
+ maxlength="4"
|
|
|
|
+ size="small">
|
|
|
|
+ <template slot="append">M²</template>
|
|
|
|
+ </el-input>
|
|
|
|
+ </el-form-item>
|
|
<el-form-item label="楼栋" prop="buildId" class="form-item">
|
|
<el-form-item label="楼栋" prop="buildId" class="form-item">
|
|
<el-select v-model="form.buildId" placeholder="请选择楼栋"
|
|
<el-select v-model="form.buildId" placeholder="请选择楼栋"
|
|
@change="changeBuild" style="width:320px;">
|
|
@change="changeBuild" style="width:320px;">
|
|
@@ -353,6 +354,35 @@ import { chemicalMsdsEdit } from '@/api/chemicalManage'
|
|
{required: true, message: '请选择详细位置', trigger: 'blur'}
|
|
{required: true, message: '请选择详细位置', trigger: 'blur'}
|
|
],
|
|
],
|
|
|
|
|
|
|
|
+ },
|
|
|
|
+ rulesOne: {
|
|
|
|
+ subName:[
|
|
|
|
+ {required: true, message: '请输实验室名称', trigger: 'blur'},
|
|
|
|
+ { required: true, message: "请输实验室名称", validator: this.spaceJudgment, trigger: "blur" }
|
|
|
|
+ ],
|
|
|
|
+ moldId:[
|
|
|
|
+ {required: true, message: '请选择类型', trigger: 'blur'}
|
|
|
|
+ ],
|
|
|
|
+ deptId:[
|
|
|
|
+ {required: true, message: '请选择学院', trigger: 'blur'}
|
|
|
|
+ ],
|
|
|
|
+ buildId:[
|
|
|
|
+ {required: true, message: '请选择楼栋', trigger: 'blur'}
|
|
|
|
+ ],
|
|
|
|
+ adminId:[
|
|
|
|
+ {required: true, message: '请选择实验室负责人', trigger: 'blur'}
|
|
|
|
+ ],
|
|
|
|
+
|
|
|
|
+ floorId:[
|
|
|
|
+ {required: true, message: '请选择层数', trigger: 'blur'}
|
|
|
|
+ ],
|
|
|
|
+ // roomId:[
|
|
|
|
+ // {required: true, message: '请输入房间号', trigger: 'blur'}
|
|
|
|
+ // ],
|
|
|
|
+ layoutId:[
|
|
|
|
+ {required: true, message: '请选择详细位置', trigger: 'blur'}
|
|
|
|
+ ],
|
|
|
|
+
|
|
},
|
|
},
|
|
labMoldList:[],
|
|
labMoldList:[],
|
|
//一体机/电子信息牌状态切换
|
|
//一体机/电子信息牌状态切换
|
|
@@ -364,7 +394,8 @@ import { chemicalMsdsEdit } from '@/api/chemicalManage'
|
|
levelBasisList:[],
|
|
levelBasisList:[],
|
|
levelEvaluateList:[],
|
|
levelEvaluateList:[],
|
|
classifyList:[],
|
|
classifyList:[],
|
|
-
|
|
|
|
|
|
+ //选中分级分类零时存储
|
|
|
|
+ checkLevelTypeData:{},
|
|
}
|
|
}
|
|
},
|
|
},
|
|
created() {
|
|
created() {
|
|
@@ -383,6 +414,7 @@ import { chemicalMsdsEdit } from '@/api/chemicalManage'
|
|
this.$set(this.form,'subType',this.subjectData.typeName)
|
|
this.$set(this.form,'subType',this.subjectData.typeName)
|
|
this.$set(this.form,'levelId',this.subjectData.levelId)
|
|
this.$set(this.form,'levelId',this.subjectData.levelId)
|
|
this.$set(this.form,'titleName',this.subjectData.levelName)
|
|
this.$set(this.form,'titleName',this.subjectData.levelName)
|
|
|
|
+ this.$set(this.form,'dynamicLeveling',this.subjectData.dynamicLeveling?this.subjectData.dynamicLeveling:false)
|
|
this.$set(this.form,'deptId',this.subjectData.deptId)
|
|
this.$set(this.form,'deptId',this.subjectData.deptId)
|
|
this.$set(this.form,'buildId',this.subjectData.buildId)
|
|
this.$set(this.form,'buildId',this.subjectData.buildId)
|
|
this.$set(this.form,'floorId',this.subjectData.floorId)
|
|
this.$set(this.form,'floorId',this.subjectData.floorId)
|
|
@@ -454,10 +486,18 @@ import { chemicalMsdsEdit } from '@/api/chemicalManage'
|
|
},
|
|
},
|
|
methods:{
|
|
methods:{
|
|
LevelClick(){
|
|
LevelClick(){
|
|
- this.$set(this,'dialogLevelVisible',true);
|
|
|
|
|
|
+ if(!this.form.dynamicLeveling){
|
|
|
|
+ this.$set(this,'dialogLevelVisible',true);
|
|
|
|
+ }else{
|
|
|
|
+ this.msgError('如需人工评定,请关闭动态评级')
|
|
|
|
+ }
|
|
},
|
|
},
|
|
classifyClick(){
|
|
classifyClick(){
|
|
- this.$set(this,'dialogClassifyVisible',true);
|
|
|
|
|
|
+ if(!this.form.dynamicLeveling){
|
|
|
|
+ this.$set(this,'dialogClassifyVisible',true);
|
|
|
|
+ }else{
|
|
|
|
+ this.msgError('如需人工评定,请关闭动态评级')
|
|
|
|
+ }
|
|
},
|
|
},
|
|
tabsClick(index){
|
|
tabsClick(index){
|
|
this.tabsIndex=index;
|
|
this.tabsIndex=index;
|
|
@@ -553,6 +593,7 @@ import { chemicalMsdsEdit } from '@/api/chemicalManage'
|
|
cancelButtonText: "取消",
|
|
cancelButtonText: "取消",
|
|
type: "warning"
|
|
type: "warning"
|
|
}).then(function() {
|
|
}).then(function() {
|
|
|
|
+ self.form.dynamicLeveling = self.form.dynamicLeveling?self.form.dynamicLeveling:false;
|
|
if(self.form.hazardCategory) {
|
|
if(self.form.hazardCategory) {
|
|
self.form.hazardCategory = self.form.hazardCategory.join() ;
|
|
self.form.hazardCategory = self.form.hazardCategory.join() ;
|
|
}
|
|
}
|
|
@@ -672,21 +713,22 @@ import { chemicalMsdsEdit } from '@/api/chemicalManage'
|
|
laboratoryTypeConfigGetList(){
|
|
laboratoryTypeConfigGetList(){
|
|
let self=this;
|
|
let self=this;
|
|
laboratoryTypeConfigGetList().then(response => {
|
|
laboratoryTypeConfigGetList().then(response => {
|
|
- if (this.subjectData.typeId){
|
|
|
|
- response.data.forEach(function(item) {
|
|
|
|
- item.selected=false;
|
|
|
|
- })
|
|
|
|
- response.data.forEach(function(item) {
|
|
|
|
- if (item.typeId==self.subjectData.typeId){
|
|
|
|
- item.selected=true;
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
- }else{
|
|
|
|
- response.data.forEach(function(item) {
|
|
|
|
- item.selected=false;
|
|
|
|
- })
|
|
|
|
|
|
+ if (!this.form.dynamicLeveling){
|
|
|
|
+ if (this.subjectData.typeId){
|
|
|
|
+ response.data.forEach(function(item) {
|
|
|
|
+ item.selected=false;
|
|
|
|
+ })
|
|
|
|
+ response.data.forEach(function(item) {
|
|
|
|
+ if (item.typeId==self.subjectData.typeId){
|
|
|
|
+ item.selected=true;
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ }else{
|
|
|
|
+ response.data.forEach(function(item) {
|
|
|
|
+ item.selected=false;
|
|
|
|
+ })
|
|
|
|
+ }
|
|
}
|
|
}
|
|
-
|
|
|
|
this.$set(this, 'classifyList',response.data)
|
|
this.$set(this, 'classifyList',response.data)
|
|
});
|
|
});
|
|
},
|
|
},
|
|
@@ -801,6 +843,37 @@ import { chemicalMsdsEdit } from '@/api/chemicalManage'
|
|
self.msgError("请选择实验室分类!");
|
|
self.msgError("请选择实验室分类!");
|
|
}
|
|
}
|
|
},
|
|
},
|
|
|
|
+ //switch开关
|
|
|
|
+ switchChange(val){
|
|
|
|
+ if(!val){
|
|
|
|
+ let obj = {};
|
|
|
|
+ if(this.form.typeId){
|
|
|
|
+ obj.typeId = this.form.typeId
|
|
|
|
+ obj.subType = this.form.subType
|
|
|
|
+ }
|
|
|
|
+ if(this.form.levelId){
|
|
|
|
+ obj.titleName = this.form.titleName
|
|
|
|
+ obj.levelId = this.form.levelId
|
|
|
|
+ }
|
|
|
|
+ if (obj.typeId || obj.levelId){
|
|
|
|
+ this.$set(this,'checkLevelTypeData',JSON.parse(JSON.stringify(obj)));
|
|
|
|
+ }
|
|
|
|
+ this.$set(this.form,'subType',null);
|
|
|
|
+ this.$set(this.form,'typeId',null);
|
|
|
|
+ this.$set(this.form,'titleName',null);
|
|
|
|
+ this.$set(this.form,'levelId',null);
|
|
|
|
+ }else{
|
|
|
|
+ if(this.checkLevelTypeData.typeId){
|
|
|
|
+ this.$set(this.form,'subType',this.checkLevelTypeData.subType);
|
|
|
|
+ this.$set(this.form,'typeId',this.checkLevelTypeData.typeId);
|
|
|
|
+ }
|
|
|
|
+ if(this.checkLevelTypeData.levelId){
|
|
|
|
+ this.$set(this.form,'titleName',this.checkLevelTypeData.titleName);
|
|
|
|
+ this.$set(this.form,'levelId',this.checkLevelTypeData.levelId);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ this.$refs['form'].clearValidate();
|
|
|
|
+ },
|
|
}
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
</script>
|