| | |
| | | entity: { |
| | | deviceStatus: null, |
| | | deviceName: null, |
| | | largeCategory: null, |
| | | }, |
| | | options: [], |
| | | list: [], |
| | |
| | | loading: true, // 组件loading的展示,默认为true |
| | | finishLoding: false, // 加载完成,显示已经没有更多了 |
| | | keyMap: {}, |
| | | laboratoryNameIsNull: false, |
| | | importVisible: false, |
| | | importing: false, |
| | | importFiles: [], |
| | |
| | | this.finishLoding = false; |
| | | } |
| | | selectDeviceParameter({ |
| | | laboratoryNameIsNull: this.laboratoryNameIsNull, |
| | | current: this.currentPage, |
| | | size: this.pageSize, |
| | | ...this.entity |
| | |
| | | this.entity = { |
| | | deviceStatus: null, |
| | | deviceName: null, |
| | | largeCategory: null, |
| | | }; |
| | | this.refreshTable() |
| | | }, |
| | |
| | | }, |
| | | // 点击侧边栏刷新 |
| | | clickSidebar(clickNodeVal) { |
| | | this.laboratoryNameIsNull = false |
| | | // 是否存在value,存在value代表为三级 |
| | | // 存在value代表选中了设备,由设备详情展示处理 |
| | | if (!clickNodeVal.value) { |
| | | this.finishLoding = false; |
| | | this.keyMap = {}; |
| | | this.currentPage = 1; |
| | | this.list = []; |
| | | this.entity.laboratoryName = null |
| | | this.entity.storagePoint = null |
| | | // 等于1代表为树的一级,label为部门 |
| | | if (clickNodeVal.label == '其他') { |
| | | this.laboratoryNameIsNull = true |
| | | this.refreshTable(); |
| | | return |
| | | } |
| | | if (clickNodeVal.level == 1) { |
| | | this.entity.laboratoryName = clickNodeVal.label |
| | | // 等于二级。label为存储地点 |
| | | } else if (clickNodeVal.level == 2) { |
| | | // 其他表示没有配置实验室,只配置了地点 |
| | | if (clickNodeVal.parent.label == '其他') { |
| | | this.laboratoryNameIsNull = true |
| | | } else { |
| | | this.entity.laboratoryName = clickNodeVal.parent.label |
| | | } |
| | | this.entity.storagePoint = clickNodeVal.label |
| | | } |
| | | // 树的一级为分类:全部/设备/计量器具 |
| | | this.entity.largeCategory = clickNodeVal.label === '全部' ? null : clickNodeVal.label; |
| | | this.refreshTable(); |
| | | } |
| | | } |