|
@@ -49,7 +49,7 @@
|
|
|
<el-form-item label="安全责任人:" prop="laboratoryId">
|
|
|
<!--<p style="line-height:40px;">{{name?name:'请选择实验室'}}</p>-->
|
|
|
<p style="line-height:40px;" v-if="!nameList[0]">请选择实验室</p>
|
|
|
- <p style="line-height:40px;" v-if="nameList[0]"><span v-for="(item,index) in nameList">{{index!=0?','+item.name:item.name}}</span></p>
|
|
|
+ <p style="line-height:40px;" v-if="nameList[0]"><span v-for="(item,index) in nameList">{{index!=0?','+item:item}}</span></p>
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
<div class="bottom-button-box">
|
|
@@ -61,7 +61,7 @@
|
|
|
|
|
|
<script>
|
|
|
import { subjectList,selectUserListByName } from "@/api/laboratory/approval";
|
|
|
-import { subjectInfo,openDoorApply } from "@/api/laboratory/subject";
|
|
|
+import { subjectVo,openDoorApply } from "@/api/laboratory/subject";
|
|
|
export default {
|
|
|
name: "addPage",
|
|
|
data(){
|
|
@@ -126,20 +126,11 @@ import { subjectInfo,openDoorApply } from "@/api/laboratory/subject";
|
|
|
//实验室选中
|
|
|
userChange(data){
|
|
|
let self = this;
|
|
|
- subjectInfo(data,0).then(response => {
|
|
|
- this.text = response.data.deptName + '-' + response.data.subAddrr.buildName + '-' + response.data.subAddrr.floorName +'-'+ response.data.subAddrr.room
|
|
|
- let list = response.data.safeUserNameAdminPhone.split(',');
|
|
|
- let listData = [];
|
|
|
- for(let i=0;i<list.length;i++){
|
|
|
- let newList = list[i].split('@');
|
|
|
- let obj = {
|
|
|
- id:newList[1],
|
|
|
- name:newList[0]
|
|
|
- };
|
|
|
- listData.push(obj);
|
|
|
- }
|
|
|
- this.$set(this,'nameList',listData);
|
|
|
- this.$set(this.newObj,'position',response.data.subAddrr.buildName + '-' + response.data.subAddrr.floorName +'-'+ response.data.subAddrr.room);
|
|
|
+ subjectVo(data,0).then(response => {
|
|
|
+ this.text = response.data.deptName + '-' + response.data.buildName + '-' + response.data.floorName +'-'+ response.data.roomName
|
|
|
+ let list = response.data.safeUserNames.split(',');
|
|
|
+ this.$set(this,'nameList',list);
|
|
|
+ this.$set(this.newObj,'position',response.data.buildName + '-' + response.data.floorName +'-'+ response.data.roomName);
|
|
|
this.$set(this.newObj,'college',response.data.deptName);
|
|
|
this.$set(this.newObj,'subjectName',response.data.name);
|
|
|
this.$set(this.newObj,'subjectId',response.data.id);
|