| | |
| | | </template> |
| | | <template #mode_code="{ row }"> |
| | | <span class="text" v-if="row.domain == 3" :style="row.mode_code != '-1' ? 'color: #00ee8b' : 'color: #de5e5e'"> |
| | | {{ getDockModeText(row.mode_code) }} |
| | | {{ getModelText(row.mode_code) }} |
| | | </span> |
| | | </template> |
| | | <template #menu="scope"> |
| | |
| | | search: true, |
| | | type: 'select', |
| | | dicData: [ |
| | | { label: '在线', value: 4 }, |
| | | { label: '离线', value: 0 }, |
| | | { label: '在线', value: 0 }, |
| | | { label: '离线', value: -1 }, |
| | | { label: '远程调试', value: 2 }, |
| | | { label: '现场调试', value: 1 }, |
| | | { label: '固件升级中', value: 3 } |
| | | ], |
| | | slot: true, |
| | | width: 110, |
| | |
| | | }) |
| | | }, |
| | | mounted() { |
| | | document.addEventListener("click", this.handleClickOutside); |
| | | }, |
| | | beforeDestroy() { |
| | | document.removeEventListener("click", this.handleClickOutside); |
| | | |
| | | }, |
| | | methods: { |
| | | getDockModeText (value) { |
| | | return EDockModeText[value] || '' |
| | | }, |
| | | getModelText (value) { |
| | | let txt = '离线' |
| | | if (value === 0 || value === 4) { |
| | | txt = '在线' |
| | | } else if(value === 1) { |
| | | txt = '现场调试' |
| | | } else if(value === 2) { |
| | | txt = '远程调试' |
| | | } else if(value === 3) { |
| | | txt = '固件升级中' |
| | | } |
| | | return txt |
| | | }, |
| | | // 关闭所有的webscoket |
| | | closeAllWebsoket () { |
| | |
| | | }) |
| | | }) |
| | | .catch(() => { }) |
| | | }, |
| | | |
| | | handleClickOutside(event) { |
| | | // 检查点击是否发生在 .more-container 内 |
| | | const moreContainer = document.querySelector('.more-container'); |
| | | if (moreContainer && moreContainer.contains(event.target)) { |
| | | return; // 如果点击在容器内,什么都不做 |
| | | } |
| | | }, |
| | | |
| | | // 打开存储对象配置页面 |