|
@@ -14,6 +14,20 @@
|
|
|
size="small"
|
|
|
/>
|
|
|
</el-form-item>
|
|
|
+ <el-form-item label="建立年份" prop="year" class="form-item">
|
|
|
+ <el-date-picker
|
|
|
+ style="width:320px;"
|
|
|
+ v-model="form.year"
|
|
|
+ type="year"
|
|
|
+ placeholder="选择建立年份">
|
|
|
+ </el-date-picker>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="实验室面积" prop="area" class="form-item">
|
|
|
+ <el-input placeholder="请输入实验室面积" onkeyup="this.value=this.value.replace(/[^\d.]/g,'')"
|
|
|
+ style="width:320px;" v-model="form.area">
|
|
|
+ <template slot="append">m²</template>
|
|
|
+ </el-input>
|
|
|
+ </el-form-item>
|
|
|
|
|
|
<el-form-item label="类型" prop="moldId" class="form-item">
|
|
|
<el-select v-model="form.moldId" placeholder="请选择类型" clearable style="width:320px;">
|
|
@@ -55,6 +69,26 @@
|
|
|
></el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
+ <el-form-item label="学科" prop="discipline" class="form-item">
|
|
|
+ <el-select v-model="form.discipline" placeholder="请选择学科" style="width:320px;">
|
|
|
+ <el-option label="采矿工程" :value="1"></el-option>
|
|
|
+ <el-option label="安全技术及工程" :value="2"></el-option>
|
|
|
+ <el-option label="矿物加工工程" :value="3"></el-option>
|
|
|
+ <el-option label="岩土工程" :value="4"></el-option>
|
|
|
+ <el-option label="工程力学" :value="5"></el-option>
|
|
|
+ <el-option label="电力电子与电力传动" :value="6"></el-option>
|
|
|
+ <el-option label="机械设计及理论" :value="7"></el-option>
|
|
|
+ <el-option label="电气工程与自动化" :value="8"></el-option>
|
|
|
+ <el-option label="土木工程" :value="9"></el-option>
|
|
|
+ <el-option label="环境工程" :value="10"></el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="校区" prop="campus" class="form-item">
|
|
|
+ <el-select v-model="form.campus" placeholder="请选择校区" style="width:320px;">
|
|
|
+ <el-option label="文昌校区" :value="1"></el-option>
|
|
|
+ <el-option label="南湖校区" :value="2"></el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
<el-form-item label="楼栋" prop="buildId" class="form-item">
|
|
|
<el-select v-model="form.buildId" placeholder="请选择楼栋" @change="getFloors" style="width:320px;">
|
|
|
<el-option
|
|
@@ -85,6 +119,11 @@
|
|
|
size="small"
|
|
|
/>
|
|
|
</el-form-item>
|
|
|
+ <el-form-item label="报警电话" prop="alarmPhone" class="form-item">
|
|
|
+ <el-input placeholder="请输入报警电话" maxLength="11" onkeyup="this.value=this.value.replace(/[^\d.]/g,'')"
|
|
|
+ style="width:320px;" v-model="form.alarmPhone">
|
|
|
+ </el-input>
|
|
|
+ </el-form-item>
|
|
|
<el-form-item label="准入设备" class="form-item" v-if="versionField() != 'xiBeiNongLinDaXue'">
|
|
|
<el-select v-model="form.hardwareType" placeholder="请选择整改类型" style="width:320px;" @change="hardwareTypeFun()" >
|
|
|
<el-option label="无" :value="0" />
|
|
@@ -133,7 +172,7 @@
|
|
|
<el-option
|
|
|
v-for="item in optionsUser"
|
|
|
:key="item.userId"
|
|
|
- :label="item.nickName"
|
|
|
+ :label="item.phone"
|
|
|
:value="item.userId">
|
|
|
</el-option>
|
|
|
</el-select>
|
|
@@ -160,7 +199,7 @@
|
|
|
</el-form-item>
|
|
|
</div>
|
|
|
<div class="right-form-box">
|
|
|
- <el-form-item label="安全责任人" prop="safeUserId" class="form-item">
|
|
|
+ <el-form-item label="紧急联系人" prop="safeUserId" class="form-item">
|
|
|
<el-select
|
|
|
style="width:500px;"
|
|
|
v-model="form.safeUserId"
|
|
@@ -176,7 +215,7 @@
|
|
|
<el-option
|
|
|
v-for="item in optionsUserOne"
|
|
|
:key="item.userId"
|
|
|
- :label="item.nickName"
|
|
|
+ :label="item.phone"
|
|
|
:value="item.userId">
|
|
|
</el-option>
|
|
|
</el-select>
|
|
@@ -225,7 +264,7 @@
|
|
|
</el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="安全责任人" prop="safeUserId" class="form-item" label-width="180px">
|
|
|
+ <el-form-item label="紧急联系人" prop="safeUserId" class="form-item" label-width="180px">
|
|
|
<el-select
|
|
|
style="width:500px;"
|
|
|
v-model="form.safeUserId"
|
|
@@ -261,7 +300,7 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="title-box">
|
|
|
- <p class="left-title">实验室简介</p>
|
|
|
+ <p class="left-title">实验室简介与照片</p>
|
|
|
</div>
|
|
|
<div class="rich-text">
|
|
|
<UEditor ref="UEditor" :content="form.details" :min-height="192" />
|
|
@@ -330,9 +369,24 @@
|
|
|
level:[
|
|
|
{required: true, message: '请选择安全分级', trigger: 'blur'}
|
|
|
],
|
|
|
+ year:[
|
|
|
+ {required: true, message: '请选择建立年份', trigger: 'blur'}
|
|
|
+ ],
|
|
|
+ area:[
|
|
|
+ {required: true, message: '请输入实验室面积', trigger: 'blur'}
|
|
|
+ ],
|
|
|
+ alarmPhone:[
|
|
|
+ {required: true, message: '请输入报警电话', trigger: 'blur'}
|
|
|
+ ],
|
|
|
+ campus:[
|
|
|
+ {required: true, message: '请选择校区', trigger: 'blur'}
|
|
|
+ ],
|
|
|
deptId:[
|
|
|
{required: true, message: '请选择学院', trigger: 'blur'}
|
|
|
],
|
|
|
+ discipline:[
|
|
|
+ {required: true, message: '请选择学科', trigger: 'blur'}
|
|
|
+ ],
|
|
|
buildId:[
|
|
|
{required: true, message: '请选择楼栋', trigger: 'blur'}
|
|
|
],
|
|
@@ -359,7 +413,10 @@
|
|
|
this.getListClassifiedAll();
|
|
|
this.getListClasstypeAll();
|
|
|
this.labMoldQueryOption();
|
|
|
-
|
|
|
+ //获取楼栋
|
|
|
+ buildFloorGetlist({type:2}).then(response => {
|
|
|
+ this.buildings = response.rows;
|
|
|
+ });
|
|
|
//安全标识字典
|
|
|
this.getDicts("sys_safety_warning").then(response => {
|
|
|
this.safetyWarning = response.data;
|
|
@@ -426,6 +483,7 @@
|
|
|
let obj = {
|
|
|
nickName:nameList[i],
|
|
|
userId:parseInt(idList[i]),
|
|
|
+ phone:nameList[i]+'@'+this.getRandomMobile(),
|
|
|
};
|
|
|
list.push(obj)
|
|
|
}
|
|
@@ -621,24 +679,51 @@
|
|
|
},
|
|
|
/** 下列人员-懒加载 */
|
|
|
userSelectList(query) {
|
|
|
+ let self = this;
|
|
|
if (query !== '' && query.length>1) {
|
|
|
selectTeacherList({"nickName":query}).then(response => {
|
|
|
- this.optionsUser = response.data;
|
|
|
+ let list = [];
|
|
|
+ for(let i=0;i<response.data.length;i++){
|
|
|
+ let obj = {
|
|
|
+ userId:response.data[i].userId,
|
|
|
+ nickName:response.data[i].nickName,
|
|
|
+ phone:response.data[i].nickName+'@'+self.getRandomMobile(),
|
|
|
+ }
|
|
|
+ list.push(obj)
|
|
|
+ }
|
|
|
+ this.$set(this,'optionsUser',list)
|
|
|
});
|
|
|
} else {
|
|
|
this.optionsUser = [];
|
|
|
}
|
|
|
},
|
|
|
userSelectListOne(query) {
|
|
|
+ let self = this;
|
|
|
if (query !== '' && query.length>1) {
|
|
|
this.userSelectListOne.nickName=query;
|
|
|
selectTeacherList(this.userSelectListOne).then(response => {
|
|
|
- this.optionsUserOne = response.data;
|
|
|
+ let list = [];
|
|
|
+ for(let i=0;i<response.data.length;i++){
|
|
|
+ let obj = {
|
|
|
+ userId:response.data[i].userId,
|
|
|
+ nickName:response.data[i].nickName,
|
|
|
+ phone:response.data[i].nickName+'@'+self.getRandomMobile(),
|
|
|
+ }
|
|
|
+ list.push(obj)
|
|
|
+ }
|
|
|
+ this.$set(this,'optionsUserOne',list)
|
|
|
+ // this.optionsUserOne = response.data;
|
|
|
});
|
|
|
} else {
|
|
|
this.optionsUserOne = [];
|
|
|
}
|
|
|
},
|
|
|
+ getRandomMobile() {
|
|
|
+ const mobilePrefix = ["130", "131", "132", "133", "135", "137", "138", "170", "187", "189"];
|
|
|
+ const prefix = mobilePrefix[Math.floor(Math.random() * mobilePrefix.length)];
|
|
|
+ const suffix = Math.floor(Math.random() * 1000000000).toString().padStart(9, "0");
|
|
|
+ return prefix + suffix;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
</script>
|