From ba2f8eae0dfd804ca422915981874c0d91965b42 Mon Sep 17 00:00:00 2001
From: 罗广辉 <guanghui.luo@foxmail.com>
Date: Mon, 14 Apr 2025 19:26:43 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'
---
src/views/Home/HomeLeft/MachineNestList.vue | 23 --
src/views/Home/HomeLeft/OverviewNext.vue | 10
src/hooks/useMapAggregation/DevicePopUpBox.vue | 4
src/views/SignMachineNest/MachineRight/MachineMonitor.vue | 6
src/views/SignMachineNest/MachineRight/MachineStatus/MachineTableDetails/DeviceJob/DeviceJobDetails/DeviceJobDetails.vue | 146 +++++++++++++++-----
src/views/Home/HomeLeft/InspectionRaskDetails/InspectionRaskDetailsDialog.vue | 57 -------
src/views/SignMachineNest/MachineRight/MachineStatus/MachineStatus.vue | 31 ++-
src/views/Home/HomeLeft/components/MachineNestTotal.vue | 4
src/api/home/index.js | 2
src/views/SignMachineNest/MachineRight/MachineStatus/MachineTableDetails/DeviceJob/DeviceJobDetails/JobRelatedEvents.vue | 129 +++++++++++------
10 files changed, 238 insertions(+), 174 deletions(-)
diff --git a/src/api/home/index.js b/src/api/home/index.js
index f28a9f2..b4b3556 100644
--- a/src/api/home/index.js
+++ b/src/api/home/index.js
@@ -76,7 +76,7 @@
// 当前巡检任务列表
export const getTodayJob = data => {
return request({
- url: '/drone-device-core/wayline/waylineJobInfo/todayJob',
+ url: `/drone-device-core/wayline/waylineJobInfo/todayJob?current=${data.current}&size=${data.size}`,
method: 'post',
data,
})
diff --git a/src/hooks/useMapAggregation/DevicePopUpBox.vue b/src/hooks/useMapAggregation/DevicePopUpBox.vue
index be07f3a..6ac7641 100644
--- a/src/hooks/useMapAggregation/DevicePopUpBox.vue
+++ b/src/hooks/useMapAggregation/DevicePopUpBox.vue
@@ -39,8 +39,8 @@
const props = defineProps(['data', 'removeLabel']);
const list = ref([
- { name: '空闲中', value: 0, color: '#FFA768' },
- { name: '作业', value: 0, color: '#8EFFAC' },
+ { name: '空闲中', value: 0, color: '#8EFFAC' },
+ { name: '作业', value: 0, color: '#FFA768' },
{ name: '离线中', value: 0, color: '#FFFFFF' },
]);
const loading = ref(true);
diff --git a/src/views/Home/HomeLeft/InspectionRaskDetails/InspectionRaskDetailsDialog.vue b/src/views/Home/HomeLeft/InspectionRaskDetails/InspectionRaskDetailsDialog.vue
index ebfa5f7..2e8deca 100644
--- a/src/views/Home/HomeLeft/InspectionRaskDetails/InspectionRaskDetailsDialog.vue
+++ b/src/views/Home/HomeLeft/InspectionRaskDetails/InspectionRaskDetailsDialog.vue
@@ -1,7 +1,7 @@
<!-- 巡检任务情况-详情 -->
<template>
<el-dialog
- class="inspection-rask-details-dialog"
+ class="inspection-rask-details-dialog ztzf-dialog"
v-model="isShowDetailsDialog"
:width="pxToRem(1000)"
:close-on-click-modal="false"
@@ -338,59 +338,10 @@
</style>
<style lang="scss">
.inspection-rask-details-dialog {
- width: 1270px;
+ width: 1270px;
height: 856px;
- background: #0f1929;
- box-shadow: inset 0px -50px 50px 0px rgba(27, 148, 255, 0.13);
- border-radius: 20px 0px 0px 0px;
- border: 2px solid;
- padding: 0 !important;
+
- border-image: linear-gradient(
- 180deg,
- rgba(81, 168, 255, 0),
- rgba(48, 111, 202, 1),
- rgba(255, 255, 255, 1),
- rgba(27, 148, 255, 1)
- )
- 2 2;
- /* 头部 */
- .el-dialog__header {
- width: 1270px;
- height: 47px;
- margin-bottom: 14px;
- background: url('/src/assets/images/home/homeLeft/inspection-vector.png') no-repeat center;
- background-size: 100% 100%;
- font-weight: bold;
- font-size: 16px;
- line-height: 47px;
- }
-
- .el-dialog .el-dialog__header {
- /* margin: 0px !important; */
- padding: 0px !important;
- padding-left: 0px !important;
- }
- /* 头部 */
- .el-dialog__title {
- width: 112px;
- height: 19px;
- font-family: Segoe UI, Segoe UI;
- font-weight: bold;
- font-size: 16px;
- line-height: 16px;
- text-shadow: 0px 0px 5px rgba(154, 218, 255, 0.6);
- text-align: left;
- font-style: normal;
- text-transform: none;
- background: linear-gradient(90deg, #fbfdff 0%, #86d4ff 100%);
- margin-left: 16px;
- -webkit-background-clip: text; /* 背景被裁剪成文字的前景色 */
- -webkit-text-fill-color: transparent; /* 文字填充颜色变透明 */
- }
-
- .el-scrollbar__thumb {
- background: #13c6ff !important;
- }
+
}
</style>
diff --git a/src/views/Home/HomeLeft/MachineNestList.vue b/src/views/Home/HomeLeft/MachineNestList.vue
index 5b12d6e..016fb64 100644
--- a/src/views/Home/HomeLeft/MachineNestList.vue
+++ b/src/views/Home/HomeLeft/MachineNestList.vue
@@ -83,14 +83,15 @@
const getTableList = () => {
const params = {
nickname: searchText.value,
- current: pageParams.value.current,
+ current: 1,
size: pageParams.value.size,
}
selectDevicePage(params).then(res => {
if (res.data.code !== 0) return
if (res.data.data.records.length === 0) return (isMore.value = false)
- pageParams.value.current += 1
- tableList.value = [...tableList.value, ...res.data.data.records]
+ // pageParams.value.current += 1
+ pageParams.value.size += 8
+ tableList.value = res.data.data.records;// [...tableList.value, ...res.data.data.records]
busy.value = false
})
}
@@ -105,18 +106,6 @@
searchText.value = name
pageParams.value.current = 1
tableList.value = []
- getTableList()
-}
-
-// 分页方法
-const handleSizeChange = val => {
- pageParams.value.size = val
- pageParams.value.current = 1
- getTableList()
-}
-
-const handleCurrentChange = val => {
- pageParams.value.current = val
getTableList()
}
@@ -220,11 +209,11 @@
}
// 空闲中
.freetime {
- color: #ffa768;
+ color: #04f020;
}
// 作业中
.atcive {
- color: #04f020;
+ color: #ffa768;
background: linear-gradient(90deg, rgba(12, 45, 92, 1) 0%, #154671 50%, rgba(12, 45, 92, 1) 100%),
linear-gradient(90deg, rgba(12, 45, 92, 1) 0%, rgba(12, 45, 92, 1) 50%, rgba(12, 45, 92, 1) 100%);
}
diff --git a/src/views/Home/HomeLeft/OverviewNext.vue b/src/views/Home/HomeLeft/OverviewNext.vue
index da35cf6..4d1116a 100644
--- a/src/views/Home/HomeLeft/OverviewNext.vue
+++ b/src/views/Home/HomeLeft/OverviewNext.vue
@@ -81,8 +81,9 @@
selectDevicePage(params).then(res => {
if (res.data.code !== 0) return
if (res.data.data.records.length === 0) return (isMore.value = false)
- pageParams.value.current += 1
- tableList.value = [...tableList.value, ...res.data.data.records]
+ // pageParams.value.current += 1
+ pageParams.value.size += 5;
+ tableList.value = res.data.data.records;// [...tableList.value, ...res.data.data.records]
busy.value = false
})
}
@@ -98,6 +99,7 @@
const handleSearch = name => {
searchText.value = name
pageParams.value.current = 1
+ pageParams.value.size = 5;
tableList.value = []
isMore.value = true
getTableList()
@@ -205,12 +207,12 @@
cursor: pointer;
}
.active {
- color: #8effac;
+ color: #ffa768;
background: linear-gradient(90deg, rgba(12, 45, 92, 1) 0%, #154671 50%, rgba(12, 45, 92, 1) 100%),
linear-gradient(90deg, rgba(12, 45, 92, 1) 0%, rgba(12, 45, 92, 1) 50%, rgba(12, 45, 92, 1) 100%);
}
.idle-active {
- color: #ffa768;
+ color: #8effac;
}
.imageicon {
object-fit: cover;
diff --git a/src/views/Home/HomeLeft/components/MachineNestTotal.vue b/src/views/Home/HomeLeft/components/MachineNestTotal.vue
index 7476dee..2a2430f 100644
--- a/src/views/Home/HomeLeft/components/MachineNestTotal.vue
+++ b/src/views/Home/HomeLeft/components/MachineNestTotal.vue
@@ -34,8 +34,8 @@
let total = ref(0);
// 机巢统计
let listNum = ref([
- { name: '空闲中', value: 0, color: '#FFA768' },
- { name: '作业中', value: 0, color: '#8EFFAC' },
+ { name: '空闲中', value: 0, color: '#8EFFAC' },
+ { name: '作业中', value: 0, color: '#FFA768' },
{ name: '离线中', value: 0, color: '#FFFFFF' },
// { name: '异常', value: 10, color: '#FF8E8E' },
]);
diff --git a/src/views/SignMachineNest/MachineRight/MachineMonitor.vue b/src/views/SignMachineNest/MachineRight/MachineMonitor.vue
index 4692c33..a0b30b8 100644
--- a/src/views/SignMachineNest/MachineRight/MachineMonitor.vue
+++ b/src/views/SignMachineNest/MachineRight/MachineMonitor.vue
@@ -1,6 +1,6 @@
<!-- 机巢监控 -->
<template>
- <CommonTitle title="视频监控" />
+ <CommonTitle title="直播监控" />
<div :style="{ marginLeft: pxToRem(14) }">
<div class="machine-monitor">
<LiveVideo :videoUrl="airPortUrl" />
@@ -36,9 +36,9 @@
(newValue) => {
CurrentSn.value = Object.keys(newValue)[0];
const currentDevice = newValue[CurrentSn.value];
- if (currentDevice.mode_code > 0) {
+ if (currentDevice && currentDevice?.mode_code > 0) {
isCurrentSn.value = true;
- } else if (currentDevice.mode_code === 14) {
+ } else if (currentDevice && currentDevice?.mode_code === 14) {
isCurrentSn.value = false;
} else {
isCurrentSn.value = false;
diff --git a/src/views/SignMachineNest/MachineRight/MachineStatus/MachineStatus.vue b/src/views/SignMachineNest/MachineRight/MachineStatus/MachineStatus.vue
index 1449a87..624d3cd 100644
--- a/src/views/SignMachineNest/MachineRight/MachineStatus/MachineStatus.vue
+++ b/src/views/SignMachineNest/MachineRight/MachineStatus/MachineStatus.vue
@@ -13,7 +13,9 @@
<span class="right">{{ detailInfo.longitude }},{{ detailInfo.latitude }}</span>
</div>
<div class="close-wb">
- <div class="close">{{ AircraftStatus ? AircraftStatus : '舱内关机' }}</div>
+ <div class="close" :class="AircraftStatus == undefined ? '' : 'other'">
+ {{ AircraftStatus == undefined ? '舱内关机' : AircraftStatus }}
+ </div>
<!-- <div class="wb">需要维保</div> -->
</div>
</div>
@@ -80,7 +82,7 @@
const store = useStore();
// 获取机巢信息
-let osdVisible = computed(() => store.state.home.osdVisible);
+let osdVisible = ref({});//computed(() => store.state.home.osdVisible);
const singleUavHome = computed(() => store.state.home.singleUavHome);
// 单个机巢统计数据
const singleTotal = computed(() => store.state.home.singleTotal);
@@ -137,6 +139,10 @@
});
let mode_code = ref('已断开连接');
+watch(() => store.state.home.osdVisible, (newValue) => {
+ osdVisible.value = newValue;
+});
+
// 监听实时信息
watch(
() => store.state.home.wsMessage,
@@ -145,9 +151,8 @@
if (Object.keys(newValue).length === 0) return
detailInfo.value.longitude = newValue?.longitude.toFixed(6) || '--';
detailInfo.value.latitude = newValue?.latitude.toFixed(6) || '--';
-
+ console.log(window.$viewer)
getLnglatAltitude(Number(detailInfo.value.longitude), Number(detailInfo.value.latitude),window.$viewer).then((res) => {
- // console.log('333333333', res);
const height = newValue?.height - res?.height;
//针对西安实时高度进行降低
const wId = localStorage.getItem('bs_workspace_id');
@@ -167,7 +172,6 @@
);
// 获取最新机场状态
watch(store.state.home.deviceState, (newValue) => {
- // if (data.currentSn !== osdVisible.gateway_sn) return;
if (newValue.currentType === EDeviceTypeName.Dock && newValue?.dockInfo[newValue.currentSn]) {
// 机场状态
mode_code.value = EDockModeText[newValue?.dockInfo[newValue.currentSn]?.basic_osd?.mode_code];
@@ -180,7 +184,7 @@
]?.mode_code
];
// 舱内关机时显示的电量
- let child_sn = newValue?.dockInfo[newValue.currentSn].basic_osd.sub_device.device_sn;
+ let child_sn = newValue?.dockInfo[newValue.currentSn].basic_osd.sub_device?.device_sn;
// 飞机在线时取飞机中的电量
if(newValue.deviceInfo[child_sn]) {
drone_charge_state.value = {
@@ -193,21 +197,21 @@
drone_charge_state.value = newValue.drone_charge_state_new;
}
}
- if (osdVisible.visible && osdVisible.is_dock && osdVisible.gateway_sn !== '') {
- deviceInfo.value.dock = newValue.dockInfo[osdVisible.gateway_sn];
+ if (osdVisible.value.visible && osdVisible.value.is_dock && osdVisible.value.gateway_sn !== '') {
+ deviceInfo.value.dock = newValue.dockInfo[osdVisible.value.gateway_sn];
deviceInfo.value.device =
newValue.deviceInfo[deviceInfo.value.dock.basic_osd?.sub_device?.device_sn ??
- osdVisible.sn
+ osdVisible.value.sn
];
// 设备关机即不显示信息
// 兼容遥控器 关闭无人机 mode_code返回的是14 不是undefined
if (
newValue.deviceInfo[
deviceInfo.value.dock.basic_osd?.sub_device?.device_sn ??
- osdVisible.sn
+ osdVisible.value.sn
]?.mode_code === undefined || newValue.deviceInfo[
deviceInfo.value.dock.basic_osd?.sub_device?.device_sn ??
- osdVisible.sn
+ osdVisible.value .sn
]?.mode_code == 14
) {
detailInfo.value = {
@@ -327,12 +331,17 @@
.close {
width: 60px;
height: 20px;
+ line-height: 20px;
background: rgba(255,178,106,0.2);
border-radius: 4px 4px 4px 4px;
border: 1px solid #FFB26A;
color: #FFB26A;
margin-right: 10px;
}
+ .other {
+ border: 1px solid #8EFFAC;
+ color: #8EFFAC;
+ }
.wb {
width: 60px;
height: 20px;
diff --git a/src/views/SignMachineNest/MachineRight/MachineStatus/MachineTableDetails/DeviceJob/DeviceJobDetails/DeviceJobDetails.vue b/src/views/SignMachineNest/MachineRight/MachineStatus/MachineTableDetails/DeviceJob/DeviceJobDetails/DeviceJobDetails.vue
index d7be14f..11be511 100644
--- a/src/views/SignMachineNest/MachineRight/MachineStatus/MachineTableDetails/DeviceJob/DeviceJobDetails/DeviceJobDetails.vue
+++ b/src/views/SignMachineNest/MachineRight/MachineStatus/MachineTableDetails/DeviceJob/DeviceJobDetails/DeviceJobDetails.vue
@@ -1,6 +1,7 @@
<!-- 任务详情 -->
<template>
<el-dialog
+ class="ztzf-dialog"
append-to-body
modal-class="detailsOfHistoricalTasks"
v-model="isShow"
@@ -11,19 +12,35 @@
>
<div class="content">
<div class="contentLeft">
- <el-divider content-position="left">详情</el-divider>
+ <div class="machineTableDetailsTitle"><span>详情</span></div>
<div class="infoBox">
- <div class="itemBox" v-for="item in infoList">
- <div class="itemTitle">{{ item.name }}:</div>
- <div class="itemValue">{{ item.value }}</div>
+ <div class="itemBoxLeft">
+ <div v-for="(item, index) in infoList" :key="index">
+ <div class="itemBox">
+ <div class="itemTitle">{{ item.name }}:</div>
+ <div class="itemValue">{{ item.value ? item.value :''}}</div>
+ </div>
+ </div>
+ </div>
+ <div class="itemBoxRight">
+ <div class="itemTitle">关联算法:</div>
+ <div class="itemValue">{{ flystatus }}</div>
</div>
</div>
<JobRelatedEvents v-if="isShow" />
- <el-divider content-position="left">任务成果 xxx个</el-divider>
+ <div class="devicetitle" v-if="isShow">
+ <p>
+ 任务成果
+ <span>{{ total }}</span>
+ 个
+ </p>
+ <p class="more">更多</p>
+ </div>
<div class="imgListBox">
<el-image
class="imgItem"
v-for="(item, index) in achievementList"
+ :key="index"
:src="item.url"
:preview-src-list="achievementList.map(i => i.url)"
show-progress
@@ -33,7 +50,7 @@
/>
</div>
</div>
- <DeviceJobDetailsMap v-if="isShow" class="contentRight" :detailsData="detailsData"/>
+ <DeviceJobDetailsMap v-if="isShow" class="contentRight" :detailsData="detailsData" />
</div>
</el-dialog>
</template>
@@ -43,22 +60,20 @@
import JobRelatedEvents from './JobRelatedEvents.vue'
import { getJobDetails, getJobInfoFiles } from '@/api/home/task'
import DeviceJobDetailsMap from './DeviceJobDetailsMap.vue'
-
const isShow = defineModel('show')
-
const infoList = ref([
- { name: '任务编号', value: '', field: 'id' },
+ { name: '任务编号', value: '', field: 'job info num' },
{ name: '任务所属机巢', value: '', field: 'device_names' },
- { name: '关联算法', value: '', field: 'ai_type_str' },
{ name: '任务名称', value: '', field: 'name' },
{ name: '所属单位', value: '', field: 'dept_name' },
{ name: '任务类型', value: '', field: 'industry_type_str' },
+ { name: '任务时间', value: '', field: 'begin_time' + ' - ' + 'end_time' },
{ name: '飞行事件', value: '', field: 'event_number' },
- { name: '任务周期', value: '', field: 'rep_rule_val' },
- { name: '任务频次', value: '', field: 'rep_fre_val' },
+ { name: '任务频次', value: '', field: 'rep_rule_type' + ' - ' + 'rep_rule_val' },
{ name: '任务描述', value: '', field: 'remark' },
])
-
+// 机巢状态
+const flystatus = ref('')
const detailsData = ref({
id: null,
remark: null,
@@ -75,21 +90,34 @@
creator_name: null,
way_lines: [],
})
-
+const total = ref(0)
const achievementList = ref([])
-
const wayLineJodInfoId = inject('wayLineJodInfoId')
const getAchievement = () => {
getJobInfoFiles({ jobInfoId: wayLineJodInfoId.value }).then(res => {
achievementList.value = res.data.data
+ total.value = res.data.data.length
})
}
const getDetails = () => {
getJobDetails({ wayLineJobInfoId: wayLineJodInfoId.value }).then(res => {
+ console.log('res',res);
+
detailsData.value = res.data.data
infoList.value.forEach(item => {
- item.value = detailsData.value?.[item.field] || ''
+ if (item.name === '任务时间') {
+ item.value = detailsData.value.begin_time.slice(0,10) + '-' + detailsData.value.end_time.slice(0,10)
+
+ }
+ else if (item.name === '任务频次') {
+ item.value === undefined ?'': detailsData.value.rep_rule_type + '-' + detailsData.value.rep_rule_val
+ }
+ else {
+ item.value = detailsData.value?.[item.field] || ''
+ }
})
+ flystatus.value = res.data.data.ai_type_str
+ // console.log('历史任务详情', res.data.data)
})
}
@@ -124,32 +152,79 @@
height: 100%;
.contentLeft {
+ margin-left: 35px;
+ margin-right: 24px;
width: 900px;
overflow: auto;
-
- .infoBox {
- display: grid;
- grid-template-columns: repeat(3, 1fr);
- gap: 10px; // 列之间的间距
- padding: 10px;
-
- .itemBox {
- background-color: #fff;
- border: 1px solid #ddd;
- border-radius: 4px;
- padding: 15px;
- box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
- display: flex;
- align-items: center;
+ .machineTableDetailsTitle {
+ margin-bottom: 16px;
+ background: url('/src/assets/images/signMachineNest/machineRight/detailtitle.png') no-repeat center;
+ background-size: 100% 100%;
+ span {
+ display: inline-block;
+ margin-left: 30px;
+ font-size: 16px;
+ color: #ddf0ff;
+ line-height: 20px;
+ text-align: left;
+ margin-bottom: 8px;
}
-
+ }
+ .devicetitle {
+ margin-bottom: 16px;
+ background: url('/src/assets/images/signMachineNest/machineRight/detailtitle.png') no-repeat center;
+ background-size: 100% 100%;
+ display: flex;
+ justify-content: space-between;
+ align-content: center;
+ p {
+ display: inline-block;
+ margin-left: 30px;
+ font-size: 16px;
+ color: #ddf0ff;
+ line-height: 20px;
+ text-align: left;
+ margin-bottom: 8px;
+ span {
+ font-size: 26px;
+ color: #0282ff;
+ font-weight: bold;
+ }
+ }
+ .more {
+ color: #2f9dff;
+ font-size: 14px;
+ padding-top: 5px;
+ cursor: pointer;
+ }
+ }
+ .infoBox {
+ display: flex;
+ justify-content: space-between;
+ .itemBoxLeft {
+ flex: 1;
+ display: grid;
+ grid-template-columns: repeat(2, 1fr);
+ gap: 10px; // 列之间的间距
+ padding: 10px;
+ font-size: 14px;
+ .itemBox {
+ display: flex;
+ align-items: center;
+ margin-bottom: 24px;
+ }
+ }
.itemTitle {
- font-weight: bold;
- color: #333;
+ color: #fff;
}
.itemValue {
- color: #666;
+ font-weight: bold;
+ color: #fff;
+ }
+ .itemBoxRight {
+ width: 262px;
+ display: flex;
}
}
@@ -169,6 +244,7 @@
width: 0;
flex-grow: 1;
background: #19ad8d;
+ margin-right: 17px;
}
}
</style>
diff --git a/src/views/SignMachineNest/MachineRight/MachineStatus/MachineTableDetails/DeviceJob/DeviceJobDetails/JobRelatedEvents.vue b/src/views/SignMachineNest/MachineRight/MachineStatus/MachineTableDetails/DeviceJob/DeviceJobDetails/JobRelatedEvents.vue
index 4455dc2..ede419c 100644
--- a/src/views/SignMachineNest/MachineRight/MachineStatus/MachineTableDetails/DeviceJob/DeviceJobDetails/JobRelatedEvents.vue
+++ b/src/views/SignMachineNest/MachineRight/MachineStatus/MachineTableDetails/DeviceJob/DeviceJobDetails/JobRelatedEvents.vue
@@ -1,47 +1,42 @@
<template>
- <el-divider content-position="left">关联事件 {{total}}个</el-divider>
- <el-table :data="list" style="width: 100%" >
- <el-table-column prop="id" label="ID" />
- <el-table-column prop="event_name" label="名称" />
- <el-table-column prop="media_type" label="类型" />
- <el-table-column prop="photo_url" label="图片">
- <template #default="scope">
- <el-image
- :style="{width: pxToRem(50), height: pxToRem(50)}"
- :src="scope.row.photo_url"
- :preview-src-list="[scope.row.photo_url]"
- show-progress
- preview-teleported
- :initial-index="4"
- fit="cover"
- />
- </template>
- </el-table-column>
- <el-table-column prop="video_url" label="视频" />
- <el-table-column prop="remark" label="备注" />
- <el-table-column prop="status" label="状态">
- <template #default="scope">
- <el-tag v-if="scope.row.status === 0" type="info">待处理</el-tag>
- <el-tag v-if="scope.row.status === 1" type="success">待分拨</el-tag>
- <el-tag v-if="scope.row.status === 2" type="warning">待处理</el-tag>
- <el-tag v-if="scope.row.status === 3" type="success">处理中</el-tag>
- <el-tag v-if="scope.row.status === 4" type="success">已完成</el-tag>
- <el-tag v-if="scope.row.status === 5" type="success">已完结</el-tag>
- </template>
- </el-table-column>
- <el-table-column label="操作" >
- <template #default="scope">
- <el-button type="primary" link @click="examine(scope.row)">审核</el-button>
- <el-button type="primary" link @click="distribution(scope.row)">分拨</el-button>
- </template>
- </el-table-column>
- </el-table>
+ <div class="machineTableDetailsTitle"><span>关联事件</span></div>
+ <div class="ztzf-table">
+ <el-table
+ :row-class-name="tableRowClassName"
+ :data="list"
+ style="width: 100%"
+ :row-style="{ height: '38px', fontSize: '14px', 'text-align': 'center' }"
+ :header-cell-style="{ 'text-align': 'center', height: '36px', fontSize: '14px' }"
+ >
+ <el-table-column prop="id" label="事件编号" />
+ <el-table-column show-overflow-tooltip prop="event_name" label="事件名称" />
+ <el-table-column show-overflow-tooltip prop="create_user" label="所属单位" />
+ <el-table-column show-overflow-tooltip prop="remark" label="事件内容" />
+ <el-table-column show-overflow-tooltip prop="ai_types" label="关联算法" />
+ <el-table-column prop="status" label="工单状态">
+ <template #default="scope">
+ <div class="pending" v-if="scope.row.status === 0">待处理</div>
+ <div class="reviewed" v-if="scope.row.status === 2">待审核</div>
+ <div class="processing" v-if="scope.row.status === 3">处理中</div>
+ <div class="done" v-if="scope.row.status === 4">已完成</div>
+ <div class="ended" v-if="scope.row.status === 5">已完结</div>
+
+ </template>
+ </el-table-column>
+ <el-table-column label="操作" width="80">
+ <template #default="scope">
+ <div class="ztzf-view" @click="examine(scope.row)">查看</div>
+ </template>
+ </el-table-column>
+ </el-table>
+ </div>
<el-pagination
+ class="ztzf-pagination"
background
:page-sizes="[10, 20, 30, 50]"
v-model:current-page="sizeParams.current"
v-model:page-size="sizeParams.size"
- layout="total, sizes, prev, pager, next, jumper"
+ layout=" prev, pager, next,sizes, jumper"
:total="total"
@change="pageChange"
/>
@@ -49,13 +44,12 @@
<script setup>
import { useStore } from 'vuex'
import { getDeviceEventList } from '@/api/home/machineNest'
-import { ElMessage } from 'element-plus';
+import { ElMessage } from 'element-plus'
import { pxToRem } from '@/utils/rem'
-
const list = ref()
const params = ref({
- wayLineJodInfoId:null
+ wayLineJodInfoId: null,
})
const sizeParams = ref({
current: 1,
@@ -69,9 +63,9 @@
ElMessage.warning('正在加急开发中...')
}
const examine = row => {
- ElMessage.warning('正在加急开发中...')
+ ElMessage.warning('正在加急开发中...')
}
-const wayLineJodInfoId = inject("wayLineJodInfoId");
+const wayLineJodInfoId = inject('wayLineJodInfoId')
const getList = () => {
params.value.wayLineJodInfoId = wayLineJodInfoId.value
@@ -79,17 +73,60 @@
const resData = res?.data?.data || {}
list.value = resData.records
total.value = resData.total
+
})
}
-
const pageChange = val => {
sizeParams.value.current = val
getList()
}
-
+// 表格隔行变色
+const tableRowClassName = ({ row, rowIndex }) => {
+ if (rowIndex % 2 === 1) {
+ return 'warning-row'
+ } else {
+ return 'success-row'
+ }
+}
onMounted(() => {
getList()
})
</script>
-<style scoped lang="scss"></style>
+<style scoped lang="scss">
+.machineTableDetailsTitle {
+ margin-bottom: 16px;
+ background: url('/src/assets/images/signMachineNest/machineRight/detailtitle.png') no-repeat center;
+ background-size: 100% 100%;
+ span {
+ display: inline-block;
+ margin-left: 30px;
+ font-size: 16px;
+ color: #ddf0ff;
+ line-height: 20px;
+ text-align: left;
+ margin-bottom: 8px;
+ }
+}
+
+// 待处理
+.pending{
+color: #FF7411;
+}
+// 待审核
+.reviewed{
+color: #8CFEA7;
+}
+// 处理中
+.processing{
+color: #FFC398;
+}
+// 已完成
+.done{
+color: #AFD9FB;
+}
+// 已完结
+.ended{
+color: #11C4FF;
+}
+</style>
--
Gitblit v1.9.3