@@ -756,6 +757,7 @@ export default {
let firstRoom = firstFloor.details.find(item => item.deptName == this.activeRoom)
this.tableData = firstRoom.details
this.dialogVisible = true
+ this.addForm.appointTime = res.data.data.reservationTime
this.addForm = {
...res.data.data,
inspectionData: res.data.data.details,
diff --git a/src/views/device/deviceSystem.vue b/src/views/device/deviceSystem.vue
index 8e27244..0315e34 100644
--- a/src/views/device/deviceSystem.vue
+++ b/src/views/device/deviceSystem.vue
@@ -130,8 +130,8 @@
v-model="addForm.description">
-
+
@@ -614,9 +614,9 @@ export default {
}
},
treeData: [],//实验室组织树
- typeProps:{
- value:'id',
- label:'title',
+ typeProps: {
+ value: 'id',
+ label: 'title',
}
}
},
@@ -625,13 +625,13 @@ export default {
},
mounted() {
this.dataTypes = this.userInfo.dataType
- if(this.dataTypes==1){
+ if (this.dataTypes == 1) {
// 客户查看 供应商和品牌
- this.option.column.forEach(item => {
+ this.option.column.forEach(item => {
if (item.prop == 'supplier') {
item.hide = false
}
- if (item.prop == 'brand' ){
+ if (item.prop == 'brand') {
item.hide = false
}
})
@@ -672,7 +672,7 @@ export default {
},
methods: {
// 实验室名称搜索
- nodeClick(data){
+ nodeClick(data) {
// this.treeDeptId = data.id;
this.searchForm.limsName = data.title
this.page.currentPage = 1;
@@ -1045,8 +1045,9 @@ export default {
})
})
// 设备类型处理
- let typeNameList = this.$refs.typeRef.getCheckedNodes()[0].pathNodes
- let typeName_ = typeNameList.map(item=>item.label)
+
+ let typeNameList = this.$refs.typeRef.getCheckedNodes()[0] != null ? this.$refs.typeRef.getCheckedNodes()[0].pathNodes : []
+ let typeName_ = typeNameList.map(item => item.label)
// 关联实验室处理
let query = {
@@ -1054,7 +1055,7 @@ export default {
name: this.addForm.name ? this.addForm.name : null,
model: this.addForm.model ? this.addForm.model : null,
type: this.addForm.type ? this.addForm.type.join(',') : null,
- typeName:typeName_.join('/'),
+ typeName: typeName_.join('/'),
position: this.addForm.position.node ? this.addForm.position.node : null,
supplier: this.addForm.supplier ? this.addForm.supplier : null,
produceTime: this.addForm.produceTime ? this.addForm.produceTime.length <= 10 ? this.addForm.produceTime + ' 00:00:00' : this.addForm.produceTime : null,
@@ -1072,14 +1073,17 @@ export default {
description: this.addForm.description
}
if (this.addForm.lab && this.addForm.lab.length > 0) {
- let labNameList = this.$refs.labRef.getCheckedNodes()[0].pathNodes
+ // let labNameList = this.$refs.labRef.getCheckedNodes()[0].pathNodes
+ let labNameList = this.$refs.labRef.getCheckedNodes()[0] != null ? this.$refs.labRef.getCheckedNodes()[0].pathNodes : []
+ if (labNameList.length > 0) {
+ query.limsId = this.addForm.lab[0]
+ query.floorId = this.addForm.lab[1]
+ query.roomId = this.addForm.lab[2]
+ query.limsNmae = labNameList[0].label
+ query.floorName = labNameList[1].label
+ query.roomName = labNameList[2].label
+ }
- query.limsId = this.addForm.lab[0]
- query.floorId = this.addForm.lab[1]
- query.roomId = this.addForm.lab[2]
- query.limsNmae = labNameList[0].label
- query.floorName = labNameList[1].label
- query.roomName = labNameList[2].label
}
if (this.viewType == 'add') {
@@ -1136,7 +1140,7 @@ export default {
supplier: this.searchForm.supplier ? this.searchForm.supplier : '',//供应商
brand: this.searchForm.brand ? this.searchForm.brand : '',//品牌
size: this.page.pageSize,
- limsName:this.searchForm.limsName
+ limsName: this.searchForm.limsName
}
if (this.role_id == '1846419477876510721') {