|
@@ -48,127 +48,128 @@
|
|
|
</div>
|
|
|
|
|
|
<div class="bottom-tabs-box" @mousedown="setDivHeight($event, 230, scroll)" id="monitorBox">
|
|
|
- <dv-border-box8 :dur="5" :style="`padding: 5px; height: ${scroll.y + 100}px`" >
|
|
|
-
|
|
|
- <div class="to-small" @click="toHome"></div>
|
|
|
- <div class="device-button-group" v-if="deviceList.length > 0">
|
|
|
- <div class="device-button" :class="{ 'device-active': deviceActive == device.deviceType }"
|
|
|
- v-for="(device, index) in deviceList" :key="index" @click="monitorChange(index)">{{ device.deviceName }}</div>
|
|
|
- <div class="enter-detail" @click="goDetail()">
|
|
|
- <send-outlined />
|
|
|
- {{ treeNodeTitle }}详情
|
|
|
+ <!-- <dv-border-box8 :dur="5" :style="`padding: 5px; height: ${scroll.y + 100}px`" > -->
|
|
|
+ <div :style="`padding: 5px; height: ${scroll.y + 100}px`">
|
|
|
+ <div class="to-small" @click="toHome"></div>
|
|
|
+ <div class="device-button-group" v-if="deviceList.length > 0">
|
|
|
+ <div class="device-button" :class="{ 'device-active': deviceActive == device.deviceType }"
|
|
|
+ v-for="(device, index) in deviceList" :key="index" @click="monitorChange(index)">{{ device.deviceName }}</div>
|
|
|
+ <div class="enter-detail" @click="goDetail()">
|
|
|
+ <send-outlined />
|
|
|
+ {{ treeNodeTitle }}详情
|
|
|
+ </div>
|
|
|
</div>
|
|
|
- </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 == 'fan' && activeKey == '1'">
|
|
|
- <GroupMonitorTable :dataSource="dataSource" :columnsType="`${deviceType}_monitor`" />
|
|
|
- </template>
|
|
|
- <template v-else-if="activeKey == '1'">
|
|
|
- <MonitorTable ref="monitorTable" :columnsType="`${deviceType}_monitor`" :dataSource="dataSource"
|
|
|
- design-scope="device_monitor" :isShowPagination="false" :isShowActionColumn="true" title="设备监测"
|
|
|
- :scroll="scroll">
|
|
|
- <template #action="{ record }">
|
|
|
- <TableAction :actions="[
|
|
|
- {
|
|
|
- label: '详情',
|
|
|
- onClick: goDetail.bind(null, record),
|
|
|
- },
|
|
|
- {
|
|
|
- label: '定位',
|
|
|
- onClick: goLocation.bind(null, record),
|
|
|
- },
|
|
|
- ]" />
|
|
|
- </template>
|
|
|
- <template #filterCell="{ column, record }">
|
|
|
- <template v-if="deviceType.startsWith('gate')">
|
|
|
- <template v-if="record.frontGateOpenCtrl">
|
|
|
- <a-tag
|
|
|
- v-if="column.dataIndex === 'frontGateOpen' && record.frontGateOpen == 0 && record.frontGateClose == 0"
|
|
|
- color="red">正在打开</a-tag>
|
|
|
- <a-tag v-else-if="column.dataIndex === 'frontGateOpen'" color="processing">打开</a-tag>
|
|
|
- </template>
|
|
|
- <template v-else>
|
|
|
- <a-tag
|
|
|
- v-if="column.dataIndex === 'frontGateOpen' && record.frontGateOpen == 0 && record.frontGateClose == 0"
|
|
|
- color="red">正在关闭</a-tag>
|
|
|
- <a-tag
|
|
|
- v-else-if="column.dataIndex === 'frontGateOpen' && record.frontGateOpen == 0 && record.frontGateClose == 1"
|
|
|
- color="default">关闭</a-tag>
|
|
|
- <a-tag
|
|
|
- v-else-if="column.dataIndex === 'frontGateOpen' && record.frontGateOpen == 1 && record.frontGateClose == 0"
|
|
|
- color="default">打开</a-tag>
|
|
|
- </template>
|
|
|
- <template v-if="record.rearGateOpenCtrl">
|
|
|
- <a-tag
|
|
|
- v-if="column.dataIndex === 'rearGateOpen' && record.rearGateOpen == 0 && record.rearGateClose == 0"
|
|
|
- color="red">正在打开</a-tag>
|
|
|
- <a-tag v-else-if="column.dataIndex === 'rearGateOpen'" color="processing">打开</a-tag>
|
|
|
- </template>
|
|
|
- <template v-else>
|
|
|
- <a-tag
|
|
|
- v-if="column.dataIndex === 'rearGateOpen' && record.rearGateOpen == 0 && record.rearGateClose == 0"
|
|
|
- color="red">正在关闭</a-tag>
|
|
|
- <a-tag
|
|
|
- v-else-if="column.dataIndex === 'rearGateOpen' && record.rearGateOpen == 0 && record.rearGateClose == 1"
|
|
|
- color="default">关闭</a-tag>
|
|
|
- <a-tag
|
|
|
- v-else-if="column.dataIndex === 'rearGateOpen' && record.rearGateOpen == 1 && record.rearGateClose == 0"
|
|
|
- color="default">打开</a-tag>
|
|
|
- </template>
|
|
|
+ <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 == 'fan' && activeKey == '1'">
|
|
|
+ <GroupMonitorTable :dataSource="dataSource" :columnsType="`${deviceType}_monitor`" />
|
|
|
+ </template>
|
|
|
+ <template v-else-if="activeKey == '1'">
|
|
|
+ <MonitorTable ref="monitorTable" :columnsType="`${deviceType}_monitor`" :dataSource="dataSource"
|
|
|
+ design-scope="device_monitor" :isShowPagination="false" :isShowActionColumn="true" title="设备监测"
|
|
|
+ :scroll="scroll">
|
|
|
+ <template #action="{ record }">
|
|
|
+ <TableAction :actions="[
|
|
|
+ {
|
|
|
+ label: '详情',
|
|
|
+ onClick: goDetail.bind(null, record),
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '定位',
|
|
|
+ onClick: goLocation.bind(null, record),
|
|
|
+ },
|
|
|
+ ]" />
|
|
|
</template>
|
|
|
- <template v-if="deviceType.startsWith('windrect')">
|
|
|
- <a-tag v-if="column.dataIndex === 'sign'"
|
|
|
- :color="record.sign == 0 ? '#95CF65' : record.sign == 1 ? '#4590EA' : '#9876AA'"> {{
|
|
|
- record.sign == 0 ? '高位' : record.sign == 1 ? '中位' : '低位'
|
|
|
- }}</a-tag>
|
|
|
- <template v-if="record && column && column.dataIndex === 'isRun' && record.isRun">
|
|
|
- <a-tag v-if="record.isRun == -2 || record.isRun == -1"
|
|
|
- :color="record.isRun == -2 ? '#95CF65' : '#ED5700'">{{
|
|
|
- record.isRun == -2 ? '空闲' : '等待'
|
|
|
+ <template #filterCell="{ column, record }">
|
|
|
+ <template v-if="deviceType.startsWith('gate')">
|
|
|
+ <template v-if="record.frontGateOpenCtrl">
|
|
|
+ <a-tag
|
|
|
+ v-if="column.dataIndex === 'frontGateOpen' && record.frontGateOpen == 0 && record.frontGateClose == 0"
|
|
|
+ color="red">正在打开</a-tag>
|
|
|
+ <a-tag v-else-if="column.dataIndex === 'frontGateOpen'" color="processing">打开</a-tag>
|
|
|
+ </template>
|
|
|
+ <template v-else>
|
|
|
+ <a-tag
|
|
|
+ v-if="column.dataIndex === 'frontGateOpen' && record.frontGateOpen == 0 && record.frontGateClose == 0"
|
|
|
+ color="red">正在关闭</a-tag>
|
|
|
+ <a-tag
|
|
|
+ v-else-if="column.dataIndex === 'frontGateOpen' && record.frontGateOpen == 0 && record.frontGateClose == 1"
|
|
|
+ color="default">关闭</a-tag>
|
|
|
+ <a-tag
|
|
|
+ v-else-if="column.dataIndex === 'frontGateOpen' && record.frontGateOpen == 1 && record.frontGateClose == 0"
|
|
|
+ color="default">打开</a-tag>
|
|
|
+ </template>
|
|
|
+ <template v-if="record.rearGateOpenCtrl">
|
|
|
+ <a-tag
|
|
|
+ v-if="column.dataIndex === 'rearGateOpen' && record.rearGateOpen == 0 && record.rearGateClose == 0"
|
|
|
+ color="red">正在打开</a-tag>
|
|
|
+ <a-tag v-else-if="column.dataIndex === 'rearGateOpen'" color="processing">打开</a-tag>
|
|
|
+ </template>
|
|
|
+ <template v-else>
|
|
|
+ <a-tag
|
|
|
+ v-if="column.dataIndex === 'rearGateOpen' && record.rearGateOpen == 0 && record.rearGateClose == 0"
|
|
|
+ color="red">正在关闭</a-tag>
|
|
|
+ <a-tag
|
|
|
+ v-else-if="column.dataIndex === 'rearGateOpen' && record.rearGateOpen == 0 && record.rearGateClose == 1"
|
|
|
+ color="default">关闭</a-tag>
|
|
|
+ <a-tag
|
|
|
+ v-else-if="column.dataIndex === 'rearGateOpen' && record.rearGateOpen == 1 && record.rearGateClose == 0"
|
|
|
+ color="default">打开</a-tag>
|
|
|
+ </template>
|
|
|
+ </template>
|
|
|
+ <template v-if="deviceType.startsWith('windrect')">
|
|
|
+ <a-tag v-if="column.dataIndex === 'sign'"
|
|
|
+ :color="record.sign == 0 ? '#95CF65' : record.sign == 1 ? '#4590EA' : '#9876AA'"> {{
|
|
|
+ record.sign == 0 ? '高位' : record.sign == 1 ? '中位' : '低位'
|
|
|
}}</a-tag>
|
|
|
- <a-tag v-else-if="record.isRun == 100" color="#4693FF">完成</a-tag>
|
|
|
- <Progress v-else :percent="Number(record.isRun)" size="small" status="active" />
|
|
|
+ <template v-if="record && column && column.dataIndex === 'isRun' && record.isRun">
|
|
|
+ <a-tag v-if="record.isRun == -2 || record.isRun == -1"
|
|
|
+ :color="record.isRun == -2 ? '#95CF65' : '#ED5700'">{{
|
|
|
+ record.isRun == -2 ? '空闲' : '等待'
|
|
|
+ }}</a-tag>
|
|
|
+ <a-tag v-else-if="record.isRun == 100" color="#4693FF">完成</a-tag>
|
|
|
+ <Progress v-else :percent="Number(record.isRun)" size="small" status="active" />
|
|
|
+ </template>
|
|
|
</template>
|
|
|
- </template>
|
|
|
- <a-tag v-if="column.dataIndex === 'warnFlag'"
|
|
|
- :color="record.warnFlag == 0 ? 'green' : record.warnFlag == 1 ? '#FF5812' : 'gray'"> {{
|
|
|
- record.warnFlag == 0 ? '正常' : record.warnFlag == 1 ? '报警' : record.warnFlag == 2 ? '断开' : '未监测'
|
|
|
+ <a-tag v-if="column.dataIndex === 'warnFlag'"
|
|
|
+ :color="record.warnFlag == 0 ? 'green' : record.warnFlag == 1 ? '#FF5812' : 'gray'"> {{
|
|
|
+ record.warnFlag == 0 ? '正常' : record.warnFlag == 1 ? '报警' : record.warnFlag == 2 ? '断开' : '未监测'
|
|
|
+ }}</a-tag>
|
|
|
+ <a-tag v-if="column.dataIndex === 'netStatus'" :color="record.netStatus == 0 ? 'default' : 'green'">{{
|
|
|
+ record.netStatus == 0 ? '断开' : '连接'
|
|
|
}}</a-tag>
|
|
|
- <a-tag v-if="column.dataIndex === 'netStatus'" :color="record.netStatus == 0 ? 'default' : 'green'">{{
|
|
|
- record.netStatus == 0 ? '断开' : '连接'
|
|
|
- }}</a-tag>
|
|
|
- </template>
|
|
|
- </MonitorTable>
|
|
|
- </template>
|
|
|
- </a-tab-pane>
|
|
|
- <a-tab-pane key="2" tab="历史数据">
|
|
|
- <div class="tab-item">
|
|
|
- <HistoryTable ref="historyTable" v-if="activeKey == '2'" :sysId="systemID"
|
|
|
- :columns-type="`${deviceType}`" :device-type="deviceType"
|
|
|
- :device-list-api="getDeviceList.bind(null, { devicekind: deviceType, sysId: systemID })"
|
|
|
- designScope="device-history" :scroll="scroll" />
|
|
|
- </div>
|
|
|
- </a-tab-pane>
|
|
|
- <a-tab-pane key="3" tab="报警历史">
|
|
|
- <div class="tab-item">
|
|
|
- <AlarmHistoryTable ref="alarmHistoryTable" v-if="activeKey == '3'" :sysId="systemID"
|
|
|
- columns-type="alarm" :device-type="deviceType"
|
|
|
- :device-list-api="getDeviceList.bind(null, { devicekind: deviceType, sysId: systemID })" :scroll="scroll"
|
|
|
- designScope="alarm-history" />
|
|
|
- </div>
|
|
|
- </a-tab-pane>
|
|
|
- <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"
|
|
|
- :device-list-api="getDeviceList.bind(null, { devicekind: deviceType, sysId: systemID })" :scroll="scroll"
|
|
|
- designScope="operator-history" />
|
|
|
- </div>
|
|
|
- </a-tab-pane>
|
|
|
- </a-tabs>
|
|
|
- </dv-border-box8>
|
|
|
+ </template>
|
|
|
+ </MonitorTable>
|
|
|
+ </template>
|
|
|
+ </a-tab-pane>
|
|
|
+ <a-tab-pane key="2" tab="历史数据">
|
|
|
+ <div class="tab-item">
|
|
|
+ <HistoryTable ref="historyTable" v-if="activeKey == '2'" :sysId="systemID"
|
|
|
+ :columns-type="`${deviceType}`" :device-type="deviceType"
|
|
|
+ :device-list-api="getDeviceList.bind(null, { devicekind: deviceType, sysId: systemID })"
|
|
|
+ designScope="device-history" :scroll="scroll" />
|
|
|
+ </div>
|
|
|
+ </a-tab-pane>
|
|
|
+ <a-tab-pane key="3" tab="报警历史">
|
|
|
+ <div class="tab-item">
|
|
|
+ <AlarmHistoryTable ref="alarmHistoryTable" v-if="activeKey == '3'" :sysId="systemID"
|
|
|
+ columns-type="alarm" :device-type="deviceType"
|
|
|
+ :device-list-api="getDeviceList.bind(null, { devicekind: deviceType, sysId: systemID })" :scroll="scroll"
|
|
|
+ designScope="alarm-history" />
|
|
|
+ </div>
|
|
|
+ </a-tab-pane>
|
|
|
+ <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"
|
|
|
+ :device-list-api="getDeviceList.bind(null, { devicekind: deviceType, sysId: systemID })" :scroll="scroll"
|
|
|
+ designScope="operator-history" />
|
|
|
+ </div>
|
|
|
+ </a-tab-pane>
|
|
|
+ </a-tabs>
|
|
|
+ <!-- </dv-border-box8> -->
|
|
|
+ </div>
|
|
|
</div>
|
|
|
|
|
|
<component v-if="modalVisible" :is="currentModal" v-model:visible="modalVisible" :dataSource="dataSource"
|
|
@@ -194,7 +195,7 @@ import { SvgIcon } from '/@/components/Icon';
|
|
|
import { getActions } from '/@/qiankun/state';
|
|
|
import { useRouter } from 'vue-router';
|
|
|
import { setDivHeight } from '/@/utils/event';
|
|
|
-import { BorderBox8 as DvBorderBox8 } from '@kjgl77/datav-vue3';
|
|
|
+// import { BorderBox8 as DvBorderBox8 } from '@kjgl77/datav-vue3';
|
|
|
|
|
|
|
|
|
type DeviceType = { deviceType: string, deviceName: string, datalist: any[] };
|
|
@@ -368,44 +369,42 @@ function goLocation(record) {
|
|
|
function goDetail(record?) {
|
|
|
|
|
|
if (record) {
|
|
|
- if (deviceType.value.startsWith('fiber')) {
|
|
|
- activeID.value = record.deviceID
|
|
|
+ activeID.value = record.deviceID
|
|
|
+ if (deviceType.value.startsWith('fiber')) {
|
|
|
currentModal.value = FiberModal
|
|
|
modalVisible.value = true;
|
|
|
} else if (deviceType.value.startsWith('dusting')) { //bundletube
|
|
|
- activeID.value = record.deviceID
|
|
|
currentModal.value = DustModal
|
|
|
modalVisible.value = true;
|
|
|
} else if (deviceType.value.startsWith('bundletube')) {
|
|
|
- activeID.value = record.deviceID
|
|
|
currentModal.value = BundleModal
|
|
|
modalVisible.value = true;
|
|
|
} else if (deviceType.value.indexOf("gate") != -1) {
|
|
|
- const newPage = router.resolve({ path: '/monitorChannel/monitor-gate' })
|
|
|
+ const newPage = router.resolve({ path: '/monitorChannel/monitor-gate', query: { id: activeID.value } })
|
|
|
window.open(newPage.href, '_blank')
|
|
|
} else if (deviceType.value.indexOf("window") != -1) {
|
|
|
- const newPage = router.resolve({ path: '/monitorChannel/monitor-window' })
|
|
|
+ const newPage = router.resolve({ path: '/monitorChannel/monitor-window', query: { id: activeID.value } })
|
|
|
window.open(newPage.href, '_blank')
|
|
|
} else if (deviceType.value.indexOf("windrect") != -1) {
|
|
|
- const newPage = router.resolve({ path: '/monitorChannel/monitor-windrect' })
|
|
|
+ const newPage = router.resolve({ path: '/monitorChannel/monitor-windrect', query: { id: activeID.value } })
|
|
|
window.open(newPage.href, '_blank')
|
|
|
} else if (deviceType.value.indexOf("fanmain") != -1) {
|
|
|
- const newPage = router.resolve({ path: '/monitorChannel/monitor-fan-main' })
|
|
|
+ const newPage = router.resolve({ path: '/monitorChannel/monitor-fan-main', query: { id: activeID.value } })
|
|
|
window.open(newPage.href, '_blank')
|
|
|
} else if (deviceType.value.indexOf("fanlocal") != -1) {
|
|
|
- const newPage = router.resolve({ path: '/monitorChannel/monitor-fan-local' })
|
|
|
+ const newPage = router.resolve({ path: '/monitorChannel/monitor-fan-local', query: { id: activeID.value } })
|
|
|
window.open(newPage.href, '_blank')
|
|
|
} else if (deviceType.value.indexOf("nitrogen") != -1) {
|
|
|
- const newPage = router.resolve({ path: '/compressor-home' })
|
|
|
+ const newPage = router.resolve({ path: '/compressor-home', query: { id: activeID.value } })
|
|
|
window.open(newPage.href, '_blank')
|
|
|
} else if (deviceType.value.indexOf("pulping") != -1) {
|
|
|
- const newPage = router.resolve({ path: '/grout-home' })
|
|
|
+ const newPage = router.resolve({ path: '/grout-home', query: { id: activeID.value } })
|
|
|
window.open(newPage.href, '_blank')
|
|
|
} else if (deviceType.value.indexOf("pressurefan") != -1) {
|
|
|
- const newPage = router.resolve({ path: '/nitrogen/home' })
|
|
|
+ const newPage = router.resolve({ path: '/nitrogen/home', query: { id: activeID.value } })
|
|
|
window.open(newPage.href, '_blank')
|
|
|
} else if (deviceType.value.indexOf("chamber") != -1) {
|
|
|
- const newPage = router.resolve({ path: '/chamber-home' })
|
|
|
+ const newPage = router.resolve({ path: '/chamber-home', query: { id: activeID.value } })
|
|
|
window.open(newPage.href, '_blank')
|
|
|
} else {
|
|
|
message.info('待开发。。。')
|
|
@@ -414,6 +413,21 @@ function goDetail(record?) {
|
|
|
if (systemType.value.indexOf("sys_dongshi") != -1) {
|
|
|
const newPage = router.resolve({ path: '/chamber-home', query: { id: systemID.value } })
|
|
|
window.open(newPage.href, '_blank')
|
|
|
+ }else if (systemType.value.indexOf("sys_obfurage") != -1) {
|
|
|
+ const newPage = router.resolve({ path: '/monitorChannel/obfurage-home', query: { id: systemID.value } })
|
|
|
+ window.open(newPage.href, '_blank')
|
|
|
+ } else if (systemType.value.indexOf("sys_surface_caimei") != -1) {
|
|
|
+ const newPage = router.resolve({ path: '/monitorChannel/wokerFace-home', query: { id: systemID.value } })
|
|
|
+ window.open(newPage.href, '_blank')
|
|
|
+ } else if (systemType.value.indexOf("sys_surface_juejin") != -1) {
|
|
|
+ const newPage = router.resolve({ path: '/monitorChannel/tunFace-home', query: { id: systemID.value } })
|
|
|
+ window.open(newPage.href, '_blank')
|
|
|
+ } else if (systemType.value.indexOf("sys_maintunnel_leather") != -1) {
|
|
|
+ const newPage = router.resolve({ path: '/monitorChannel/beltTun-home', query: { id: systemID.value } })
|
|
|
+ window.open(newPage.href, '_blank')
|
|
|
+ } else if (systemType.value.indexOf("sys_surface_junya") != -1) {
|
|
|
+ const newPage = router.resolve({ path: '/monitorChannel/balancePress-home', query: { id: systemID.value } })
|
|
|
+ window.open(newPage.href, '_blank')
|
|
|
} else {
|
|
|
message.info('待开发。。。')
|
|
|
}
|