|
@@ -139,35 +139,7 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div class="device-wrapper" v-load-directive="deviceLoad">
|
|
|
- <div class="device-list" v-if="data.deviceList.length">
|
|
|
- <ContentBox v-for="(item,index) in data.deviceList" :key="index" bgColor="rgb(255,255,255,0.25)" color="#16FFF6" @click="deviceClick(item)">
|
|
|
- <div style="height: 30rem;"></div>
|
|
|
- <div class="siteinfo">
|
|
|
- <div class="siteinfo-wrapper">
|
|
|
- <EnvironmentOutlined />
|
|
|
- <span>{{ item.sitename || '暂无站点' }}</span>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <div class="device-title" :style="[{'--bg':item.eventstatus ? 'red' : 'rgba(255, 164, 6)'},{'--icon':item.status == '离线' ? '#cccccc' : '#27AD00'}]">
|
|
|
- <i class="used"></i>
|
|
|
- <a-tooltip>
|
|
|
- <template #title>
|
|
|
- <span>{{ item.devicename }}</span>
|
|
|
- </template>
|
|
|
- <span>{{ item.devicename }}</span>
|
|
|
- </a-tooltip>
|
|
|
- </div>
|
|
|
- <img style="width: 100%;" :src="item.attinfos[0].url" alt="">
|
|
|
- <!-- <span class="status">运行状态:<span class="text" :style="item.eventstatus ? 'color:red' : 'color:rgba(255, 164, 6)'">{{ item.eventstatus ? '告警中' : '正常' }}</span></span> -->
|
|
|
- </ContentBox>
|
|
|
- </div>
|
|
|
- <a-empty :image="simpleImage" v-else>
|
|
|
- <template #description>
|
|
|
- <span style="color:#ffffff">暂无数据</span>
|
|
|
- </template>
|
|
|
- </a-empty>
|
|
|
- </div>
|
|
|
+ <devices />
|
|
|
</ContentBox>
|
|
|
</div>
|
|
|
<div class="control_content-right">
|
|
@@ -248,6 +220,8 @@
|
|
|
|
|
|
<script setup>
|
|
|
import weather from '@/components/weather/index.vue'
|
|
|
+import devices from "../pressureControl/modules/devices.vue"
|
|
|
+
|
|
|
import { Empty, Modal } from 'ant-design-vue';
|
|
|
import { EnvironmentOutlined,DownOutlined,ExclamationCircleOutlined } from '@ant-design/icons-vue'
|
|
|
const simpleImage = Empty.PRESENTED_IMAGE_SIMPLE;
|
|
@@ -392,15 +366,6 @@ let warningParam = ref({
|
|
|
},
|
|
|
})
|
|
|
|
|
|
-let deviceParam = ref({
|
|
|
- "id": 20230914133302,
|
|
|
- "content": {
|
|
|
- systemname:'valvesystem',
|
|
|
- "pageNumber": 1,
|
|
|
- "pageSize": 15
|
|
|
- },
|
|
|
-})
|
|
|
-
|
|
|
let cmdParam = ref({
|
|
|
"id": 20230914133402,
|
|
|
"content": {
|
|
@@ -464,26 +429,6 @@ let getwarningData = async () => {
|
|
|
console.log(data.value.warningHistory,'告警记录')
|
|
|
}
|
|
|
|
|
|
-let DeviceTotalPage = ref(0)
|
|
|
-let deviceLoad = () => {
|
|
|
- if (deviceParam.value.content.pageNumber == DeviceTotalPage.value || loading.value == true) return
|
|
|
- deviceParam.value.content.pageNumber += 1
|
|
|
- console.log(deviceParam.value);
|
|
|
- getDeviceData()
|
|
|
-}
|
|
|
-
|
|
|
-let getDeviceData = async () => {
|
|
|
- loading.value = true
|
|
|
- let res = await Api.requested(deviceParam.value)
|
|
|
- data.value.deviceList = deviceParam.value.content.pageNumber == 1 ? res.data : data.value.deviceList.concat(res.data)
|
|
|
- DeviceTotalPage.value = res.pageTotal
|
|
|
- setTimeout(() => {
|
|
|
- loading.value = false
|
|
|
- },1500)
|
|
|
- console.log(data.value.deviceList,'设备列表')
|
|
|
-}
|
|
|
-
|
|
|
-
|
|
|
let cmdTotalPage = ref(0)
|
|
|
let cmdLoad = () => {
|
|
|
if (cmdParam.value.content.pageNumber == cmdTotalPage.value || loading.value == true) return
|