|
@@ -14,71 +14,68 @@
|
|
:singleWaitTime="state.defaultOption.singleWaitTime"
|
|
:singleWaitTime="state.defaultOption.singleWaitTime"
|
|
:wheel="state.defaultOption.wheel"
|
|
:wheel="state.defaultOption.wheel"
|
|
>
|
|
>
|
|
- <ul class="right_bottom">
|
|
|
|
|
|
+ <ul class="right_bottom" v-if="state.list.length">
|
|
<li class="right_center_item" v-for="(item, i) in state.list" :key="i">
|
|
<li class="right_center_item" v-for="(item, i) in state.list" :key="i">
|
|
<span class="orderNum">{{ i + 1 }}</span>
|
|
<span class="orderNum">{{ i + 1 }}</span>
|
|
<div class="inner_right">
|
|
<div class="inner_right">
|
|
<div class="dibu"></div>
|
|
<div class="dibu"></div>
|
|
<div class="flex">
|
|
<div class="flex">
|
|
- <div class="info">
|
|
|
|
- <span class="labels">设备ID:</span>
|
|
|
|
- <span class="text-content zhuyao"> {{ item.gatewayno }}</span>
|
|
|
|
- </div>
|
|
|
|
- <div class="info">
|
|
|
|
- <span class="labels">型号:</span>
|
|
|
|
- <span class="text-content"> {{ item.terminalno }}</span>
|
|
|
|
|
|
+ <div class="info flex-1">
|
|
|
|
+ <span class="labels">工单标题:</span>
|
|
|
|
+ <span class="text-content zhuyao text-no-wrap"> {{ item.title }}</span>
|
|
</div>
|
|
</div>
|
|
<div class="info">
|
|
<div class="info">
|
|
- <span class="labels">告警值:</span>
|
|
|
|
- <span class="text-content warning">
|
|
|
|
- {{ montionFilter(item.alertvalue) }}</span
|
|
|
|
|
|
+ <span class="labels">手里类型:</span>
|
|
|
|
+ <span class="text-content warning text-no-wrap">
|
|
|
|
+ {{ item.acceptType }}</span
|
|
>
|
|
>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<div class="flex">
|
|
<div class="flex">
|
|
- <div class="info">
|
|
|
|
- <span class="labels shrink-0"> 地址:</span>
|
|
|
|
- <span
|
|
|
|
- class="ciyao truncate"
|
|
|
|
- style="font-size: 12px; width: 220px"
|
|
|
|
- :title="handleAddress(item)"
|
|
|
|
- >
|
|
|
|
- {{ handleAddress(item) }}</span
|
|
|
|
- >
|
|
|
|
|
|
+ <div class="flex">
|
|
|
|
+ <div class="info">
|
|
|
|
+ <span class="labels">工单编号:</span>
|
|
|
|
+ <span
|
|
|
|
+ class="text-content ciyao"
|
|
|
|
+ :class="{ warning: item.alertdetail }"
|
|
|
|
+ >
|
|
|
|
+ {{item.no}}</span
|
|
|
|
+ >
|
|
|
|
+ </div>
|
|
</div>
|
|
</div>
|
|
<div class="info time shrink-0">
|
|
<div class="info time shrink-0">
|
|
<span class="labels">时间:</span>
|
|
<span class="labels">时间:</span>
|
|
<span class="text-content" style="font-size: 12px">
|
|
<span class="text-content" style="font-size: 12px">
|
|
- {{ item.createtime }}</span
|
|
|
|
|
|
+ {{ formatDate(item.creationTime, 'YYYY-mm-dd HH:MM:SS') }}</span
|
|
>
|
|
>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
- <div class="flex">
|
|
|
|
- <div class="info">
|
|
|
|
- <span class="labels">报警内容:</span>
|
|
|
|
- <span
|
|
|
|
- class="text-content ciyao"
|
|
|
|
- :class="{ warning: item.alertdetail }"
|
|
|
|
- >
|
|
|
|
- {{ item.alertdetail || "无" }}</span
|
|
|
|
- >
|
|
|
|
- </div>
|
|
|
|
|
|
+ <div class="info">
|
|
|
|
+ <span class="labels shrink-0"> 地址:</span>
|
|
|
|
+ <span
|
|
|
|
+ class="ciyao truncate"
|
|
|
|
+ style="font-size: 12px; width: 220px"
|
|
|
|
+ :title="item.address"
|
|
|
|
+ >
|
|
|
|
+ {{ item.address }}</span
|
|
|
|
+ >
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</li>
|
|
</li>
|
|
</ul>
|
|
</ul>
|
|
</component>
|
|
</component>
|
|
|
|
+ <EmptyCom>暂无数据</EmptyCom>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
<script setup lang="ts">
|
|
<script setup lang="ts">
|
|
-import { currentGET } from "@/api";
|
|
|
|
import SeamlessScroll from "@/components/seamless-scroll";
|
|
import SeamlessScroll from "@/components/seamless-scroll";
|
|
import { computed, onMounted, reactive } from "vue";
|
|
import { computed, onMounted, reactive } from "vue";
|
|
import { useSettingStore } from "@/stores/setting";
|
|
import { useSettingStore } from "@/stores/setting";
|
|
import { storeToRefs } from "pinia";
|
|
import { storeToRefs } from "pinia";
|
|
import EmptyCom from "@/components/empty-com";
|
|
import EmptyCom from "@/components/empty-com";
|
|
import signalR from "@/utils/signalR";
|
|
import signalR from "@/utils/signalR";
|
|
|
|
+import {formatDuration,formatDate} from "@/utils/formatTime";
|
|
const settingStore = useSettingStore();
|
|
const settingStore = useSettingStore();
|
|
const { defaultOption, indexConfig } = storeToRefs(settingStore);
|
|
const { defaultOption, indexConfig } = storeToRefs(settingStore);
|
|
const state = reactive<any>({
|
|
const state = reactive<any>({
|
|
@@ -92,19 +89,6 @@ const state = reactive<any>({
|
|
scroll: true,
|
|
scroll: true,
|
|
});
|
|
});
|
|
|
|
|
|
-const getData = () => {
|
|
|
|
- currentGET("rightBottom", { limitNum: 20 }).then((res) => {
|
|
|
|
- console.log("工单概览", res);
|
|
|
|
- if (res.success) {
|
|
|
|
- state.list = res.data.list;
|
|
|
|
- } else {
|
|
|
|
- window.$message({
|
|
|
|
- text: res.msg,
|
|
|
|
- type: "warning",
|
|
|
|
- });
|
|
|
|
- }
|
|
|
|
- });
|
|
|
|
-};
|
|
|
|
|
|
|
|
const comName = computed(() => {
|
|
const comName = computed(() => {
|
|
if (indexConfig.value.rightBottomSwiper) {
|
|
if (indexConfig.value.rightBottomSwiper) {
|
|
@@ -113,15 +97,11 @@ const comName = computed(() => {
|
|
return EmptyCom;
|
|
return EmptyCom;
|
|
}
|
|
}
|
|
});
|
|
});
|
|
-function montionFilter(val: any) {
|
|
|
|
- return val ? Number(val).toFixed(2) : "--";
|
|
|
|
-}
|
|
|
|
-const handleAddress = (item: any) => {
|
|
|
|
- return `${item.provinceName}/${item.cityName}/${item.countyName}`;
|
|
|
|
-};
|
|
|
|
onMounted(() => {
|
|
onMounted(() => {
|
|
- getData();
|
|
|
|
- signalR.joinGroup("BsDataShowArea8");
|
|
|
|
|
|
+ signalR.SR.on("BsDataShowArea8", (res: any) => {
|
|
|
|
+ console.log('工单概览',res)
|
|
|
|
+ state.list = res;
|
|
|
|
+ });
|
|
});
|
|
});
|
|
</script>
|
|
</script>
|
|
|
|
|