|
@@ -66,11 +66,29 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
-
|
|
|
+ <div style="color: #fff;">{{ deviceType }}</div>
|
|
|
<a-tabs class="tabs-box" v-model:activeKey="activeKey" @change="tabChange" id="tabsBox" v-if="isRefresh">
|
|
|
<a-tab-pane key="1" tab="实时监测">
|
|
|
<template v-if="(deviceType.startsWith('fanlocal') || deviceType.startsWith('fanmain')) && activeKey == '1'">
|
|
|
- <GroupMonitorTable ref="MonitorDataTable" :dataSource="dataSource" :columnsType="`${deviceType}_monitor`" :scroll="scroll1"/>
|
|
|
+ <GroupMonitorTable ref="MonitorDataTable" :dataSource="dataSource" :columnsType="`${deviceType}_monitor`" :scroll="scroll" :isAction="true">
|
|
|
+ <template #action="{ record }">
|
|
|
+ <TableAction :actions="haveDetailArr.find((item) => deviceType.startsWith(item)) ? [
|
|
|
+ {
|
|
|
+ label: '详情',
|
|
|
+ onClick: goDetail.bind(null, record),
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '定位',
|
|
|
+ onClick: goLocation.bind(null, record),
|
|
|
+ },
|
|
|
+ ] : [
|
|
|
+ {
|
|
|
+ label: '定位',
|
|
|
+ onClick: goLocation.bind(null, record),
|
|
|
+ },
|
|
|
+ ]" />
|
|
|
+ </template>
|
|
|
+ </GroupMonitorTable>
|
|
|
</template>
|
|
|
<template v-else-if="deviceType == 'majorpath' && activeKey == '1'">
|
|
|
<a-table :columns="majorColumns" :data-source="dataSource" bordered :scroll="scroll" :pagination="false">
|
|
@@ -90,7 +108,7 @@
|
|
|
design-scope="device_monitor" :isShowPagination="false" :isShowActionColumn="true" title="设备监测"
|
|
|
:scroll="scroll">
|
|
|
<template #action="{ record }">
|
|
|
- <TableAction :actions="!deviceType.startsWith('nitrogen') ?[
|
|
|
+ <TableAction :actions="haveDetailArr.find((item) => deviceType.startsWith(item)) ? [
|
|
|
{
|
|
|
label: '详情',
|
|
|
onClick: goDetail.bind(null, record),
|
|
@@ -161,6 +179,16 @@
|
|
|
:color="record.warnFlag == 0 ? 'green' : record.warnFlag == 1 ? '#FF5812' : 'gray'"> {{
|
|
|
record.warnFlag == 0 ? '正常' : record.warnFlag == 1 ? '报警' : record.warnFlag == 2 ? '断开' : '未监测'
|
|
|
}}</a-tag>
|
|
|
+ <template v-if="column.dataIndex === 'warnLevel'">
|
|
|
+ <a-tag v-if="record.warnLevel == '101'" color="green">蓝色预警</a-tag>
|
|
|
+ <a-tag v-else-if="record.warnLevel == '102'" color="#FF5812">黄色预警</a-tag>
|
|
|
+ <a-tag v-else-if="record.warnLevel == '103'" color="#FF5812">橙色预警</a-tag>
|
|
|
+ <a-tag v-else-if="record.warnLevel == '104'" color="#FF5812">红色预警</a-tag>
|
|
|
+ <a-tag v-else-if="record.warnLevel == '201'" color="#FF0000">报警</a-tag>
|
|
|
+ <a-tag v-else-if="record.warnLevel == '10000'" color="#FF5812">数据超限</a-tag>
|
|
|
+ <a-tag v-else-if="record.warnLevel == '1001'" color="default">网络中断</a-tag>
|
|
|
+ <a-tag v-else="record.warnLevel == '1001'" color="green">正常</a-tag>
|
|
|
+ </template>
|
|
|
<a-tag v-if="column.dataIndex === 'netStatus'" :color="record.netStatus == 0 ? 'default' : 'green'">{{
|
|
|
record.netStatus == 0 ? '断开' : '连接'
|
|
|
}}</a-tag>
|
|
@@ -187,7 +215,7 @@
|
|
|
<a-tab-pane key="4" tab="操作历史">
|
|
|
<div class="tab-item">
|
|
|
<HandlerHistoryTable ref="handlerHistoryTable" v-if="activeKey == '4'" :sysId="systemID"
|
|
|
- columns-type="operatorhistory" :device-type="deviceType"
|
|
|
+ columns-type="operator_history" :device-type="deviceType"
|
|
|
:device-list-api="getDeviceList.bind(null, { devicekind: deviceType, sysId: systemID })" :scroll="scroll"
|
|
|
designScope="operator-history" />
|
|
|
</div>
|
|
@@ -220,7 +248,7 @@ import { SvgIcon } from '/@/components/Icon';
|
|
|
import { getActions } from '/@/qiankun/state';
|
|
|
import { useRouter } from 'vue-router';
|
|
|
import { setDivHeight } from '/@/utils/event';
|
|
|
-import { majorColumns } from './device.data'
|
|
|
+import { majorColumns, noDetailArr, haveDetailArr } from './device.data'
|
|
|
import mainPath from './modal/mainPath.vue'
|
|
|
// import { BorderBox8 as DvBorderBox8 } from '@kjgl77/datav-vue3';
|
|
|
|
|
@@ -269,9 +297,6 @@ const expandedKeys = ref<string[]>(['0-0-0-1']);
|
|
|
const scroll = reactive({
|
|
|
y: 210
|
|
|
})
|
|
|
-const scroll1 = reactive({
|
|
|
- y: 210
|
|
|
-})
|
|
|
const treeData = ref<TreeProps['treeData']>([]);
|
|
|
|
|
|
//树形菜单选择事件
|
|
@@ -293,7 +318,7 @@ const onSelect: TreeProps['onSelect'] = (keys, e) => {
|
|
|
}
|
|
|
selectedKeys.value = keys
|
|
|
treeNodeTitle.value = e.node.title
|
|
|
-
|
|
|
+ debugger
|
|
|
dataSource.value = []
|
|
|
};
|
|
|
|
|
@@ -391,31 +416,39 @@ async function getDataSource() {
|
|
|
let res = null
|
|
|
if(systemID.value){
|
|
|
res = await list({ devicetype: 'sys', types: deviceType.value, systemID: systemID.value })
|
|
|
+ if (res && res.msgTxt) {
|
|
|
+ const result = res.msgTxt;
|
|
|
+ result.forEach(item => {
|
|
|
+ const data = item['datalist'].filter((data: any) => {
|
|
|
+ const readData = data.readData;
|
|
|
+ return Object.assign(data, readData);
|
|
|
+ })
|
|
|
+ if (item.type != 'sys') {
|
|
|
+ if (item.type.startsWith('majorpath') && item.type == deviceType.value) {
|
|
|
+ dataSource.value = item['datalist'][0]['paths']
|
|
|
+ return
|
|
|
+ } else if(item.type == deviceType.value) {
|
|
|
+ dataSource.value = data
|
|
|
+ console.log('关联设备数据--------------->', data)
|
|
|
+ return
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
}else{
|
|
|
res = await list({ devicetype: deviceType.value, pagetype: 'normal' })
|
|
|
- }
|
|
|
- if (res && res.msgTxt) {
|
|
|
- const result = res.msgTxt;
|
|
|
- result.forEach(item => {
|
|
|
- const data = item['datalist'].filter((data: any) => {
|
|
|
- const readData = data.readData;
|
|
|
- return Object.assign(data, readData);
|
|
|
- })
|
|
|
- if (item.type != 'sys') {
|
|
|
- if (item.type === 'majorpath') {
|
|
|
- // deviceArr.unshift({ deviceType: item.type, deviceName: item['typeName'], datalist: item['datalist'][0]['paths'] })
|
|
|
- dataSource.value = item['datalist'][0]['paths']
|
|
|
- } else {
|
|
|
- dataSource.value = data
|
|
|
- }
|
|
|
+ if (res && res.msgTxt) {
|
|
|
+ const result = res.msgTxt[0];
|
|
|
+ if(result){
|
|
|
+ const data = result['datalist'].filter((data: any) => {
|
|
|
+ const readData = data.readData;
|
|
|
+ return Object.assign(data, readData);
|
|
|
+ })
|
|
|
+ dataSource.value = data
|
|
|
}
|
|
|
- })
|
|
|
- // dataSource.value = res.msgTxt[0].datalist || [];
|
|
|
- // dataSource.value.filter((data: any) => {
|
|
|
- // const readData = data.readData;
|
|
|
- // return Object.assign(data, readData);
|
|
|
- // });
|
|
|
+ }
|
|
|
}
|
|
|
+
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -488,7 +521,10 @@ function goDetail(record?) {
|
|
|
const newPage = router.resolve({ path: '/monitorChannel/balancePress-home', query: { id: systemID.value } })
|
|
|
window.open(newPage.href, '_blank')
|
|
|
} else if (systemType.value.indexOf("sys_nitrogen") != -1) {
|
|
|
- const newPage = router.resolve({ path: '/compressor-home', query: { id: systemID.value } })
|
|
|
+ const newPage = router.resolve({ path: '/nitrogen-home', query: { id: systemID.value } })
|
|
|
+ window.open(newPage.href, '_blank')
|
|
|
+ } else if (deviceType.value.indexOf("forcFan") != -1) {
|
|
|
+ const newPage = router.resolve({ path: '/forcFan/home', query: { id: activeID.value } })
|
|
|
window.open(newPage.href, '_blank')
|
|
|
} else {
|
|
|
message.info('待开发。。。')
|
|
@@ -1036,6 +1072,10 @@ onUnmounted(() => {
|
|
|
&:nth-child(15) {
|
|
|
left: calc(-6px * 15);
|
|
|
}
|
|
|
+
|
|
|
+ &:nth-child(16) {
|
|
|
+ left: calc(-6px * 16);
|
|
|
+ }
|
|
|
|
|
|
&:first-child {
|
|
|
clip-path: polygon(0 0,
|
|
@@ -1062,8 +1102,8 @@ onUnmounted(() => {
|
|
|
color: #fff;
|
|
|
cursor: pointer;
|
|
|
position: absolute;
|
|
|
- right: 100px;
|
|
|
- top: -6px;
|
|
|
+ right: 20px;
|
|
|
+ top: 35px;
|
|
|
padding: 5px;
|
|
|
border-radius: 5px;
|
|
|
margin-left: 8px;
|
|
@@ -1075,6 +1115,7 @@ onUnmounted(() => {
|
|
|
justify-content: center;
|
|
|
color: #fff;
|
|
|
padding: 5px 15px 5px 15px;
|
|
|
+ z-index: 999;
|
|
|
cursor: pointer;
|
|
|
|
|
|
&:hover {
|