From aa67548b76148b22046076318b361133d391fde2 Mon Sep 17 00:00:00 2001
From: 张含笑 <zhx18749296735@163.com>
Date: Thu, 17 Apr 2025 17:40:44 +0800
Subject: [PATCH] feat: 修改bug
---
src/components/CommonDateTime.vue | 12 +++++-
src/views/SignMachineNest/MachineRight/InspectionRaskList.vue | 1
src/views/Home/HomeLeft/InspectionRaskDetails/InspectionRaskDetails.vue | 2
src/views/Home/HomeLeft/InspectionRaskDetails/InspectionRaskDetailsDialog.vue | 38 +++++++++---------
src/hooks/components/DevicePopUpBox.vue | 15 ++++---
5 files changed, 40 insertions(+), 28 deletions(-)
diff --git a/src/components/CommonDateTime.vue b/src/components/CommonDateTime.vue
index 3876c6c..2c6b9b8 100644
--- a/src/components/CommonDateTime.vue
+++ b/src/components/CommonDateTime.vue
@@ -9,12 +9,13 @@
end-placeholder="结束日期"
@change="change"
disabled
+ :clearable="false"
/>
<div class="time-card">
<div
class="card-item"
:class="item === checked ? 'active' : ''"
- v-for="(item, index) in timeList"
+ v-for="(item, index) in timeList" :key="index"
@click="timeClick(item,index)"
>
{{ timeListStr[index] }}
@@ -81,12 +82,19 @@
position: relative;
display: flex;
justify-content: space-between;
+:deep(.el-date-editor .el-range__close-icon--hidden){
+ width: 0 !important;
+}
+:deep(.el-date-editor .el-range-input){
+width: 48% !important;
+font-size: 13px !important;
+}
:deep(.el-date-editor) {
box-shadow: none;
width: 0;
flex: 1;
- margin-right: 4px;
+ // margin-right: 4px;
background: rgba(0, 15, 34, 0.5);
border-radius: 0px 0px 0px 0px;
diff --git a/src/hooks/components/DevicePopUpBox.vue b/src/hooks/components/DevicePopUpBox.vue
index 6ac7641..d3b769f 100644
--- a/src/hooks/components/DevicePopUpBox.vue
+++ b/src/hooks/components/DevicePopUpBox.vue
@@ -17,7 +17,7 @@
<div class="num">{{ dataObj.device_num }}</div>
</div>
<div class="info-item">
- 任务数:
+ 任务次数:
<div class="num">{{ dataObj.jobNum }}</div>
</div>
</div>
@@ -55,6 +55,8 @@
const areaCode = props.data.region_code;
dataObj.value.region_name = props.data.region_name;
const res = await getDeviceInfoNum({ areaCode });
+ console.log('首页地图弹框',res);
+
const resJob = await getTotalJobNum({ areaCode });
dataObj.value.jobNum = resJob.data.data;
dataObj.value.device_num = res.data.data.device_num;
@@ -126,7 +128,9 @@
cursor: pointer;
}
}
-
+.content {
+padding: 0px 23px 25px 15px;
+}
.info {
height: 34px;
font-family: Source Han Sans CN, Source Han Sans CN, serif;
@@ -136,9 +140,8 @@
line-height: 19px;
display: flex;
align-items: center;
- padding-left: 15px;
- gap: 0 20px;
margin: 18px 0;
+ justify-content: space-between;
.info-item {
display: flex;
@@ -161,13 +164,13 @@
color: #ffffff;
line-height: 23px;
text-shadow: 0px 0px 12px rgba(68, 105, 255, 0.67);
- padding-left: 15px;
+
margin-bottom: 14px;
}
.status-list {
display: flex;
- justify-content: space-evenly;
+ justify-content: space-between;
align-items: center;
.status-item {
diff --git a/src/views/Home/HomeLeft/InspectionRaskDetails/InspectionRaskDetails.vue b/src/views/Home/HomeLeft/InspectionRaskDetails/InspectionRaskDetails.vue
index ebeca63..78115f9 100644
--- a/src/views/Home/HomeLeft/InspectionRaskDetails/InspectionRaskDetails.vue
+++ b/src/views/Home/HomeLeft/InspectionRaskDetails/InspectionRaskDetails.vue
@@ -8,7 +8,7 @@
<div class="name">总任务数</div>
</div>
<div class="status">
- <div class="item" v-for="(item, index) in list">
+ <div class="item" v-for="(item, index) in list" :key="index">
<div>
<div :style="{ color: item.color }" class="value">
{{ jobStatistics[item.field] }}
diff --git a/src/views/Home/HomeLeft/InspectionRaskDetails/InspectionRaskDetailsDialog.vue b/src/views/Home/HomeLeft/InspectionRaskDetails/InspectionRaskDetailsDialog.vue
index b5e7ed4..c74eacf 100644
--- a/src/views/Home/HomeLeft/InspectionRaskDetails/InspectionRaskDetailsDialog.vue
+++ b/src/views/Home/HomeLeft/InspectionRaskDetails/InspectionRaskDetailsDialog.vue
@@ -86,11 +86,9 @@
? 'distributed'
: scope.row.status === 3
? 'finish '
-
-
- : 'fail '
- "
- >
+ : scope.row.status === 5
+ ? 'fail '
+ : ' '">
{{
scope.row.status === 1
? '待执行'
@@ -98,8 +96,9 @@
? '执行中'
: scope.row.status === 3
? '已执行'
-
- : '执行失败'
+ : scope.row.status === 5
+ ? '执行失败'
+ : ''
}}
</span>
</template>
@@ -115,7 +114,7 @@
</el-table>
</div>
<!-- 分页 -->
- <div style="display: flex; justify-content: center;margin:15px 0;">
+ <div style="display: flex; justify-content: center; margin: 15px 0">
<el-pagination
class="ztzf-pagination"
v-model:current-page="pageParams.current"
@@ -150,8 +149,8 @@
{ label: '待执行', value: 1 },
{ label: '执行中', value: 2 },
{ label: '已完成', value: 3 },
-
- { label: '执行失败', value: 4 },
+
+ { label: '执行失败', value: 5 },
]
// 设备页面参数
const devicePageParams = ref({
@@ -216,12 +215,11 @@
}
// 获取任务列表
const getJobList = () => {
-// 事件状态:0 =待处理,1=待分拨,2=待处理,3=处理中,4=已完成 5=已完结
+ // 事件状态:0 =待处理,1=待分拨,2=待处理,3=处理中,4=已完成 5=已完结
jobList(taskDetailParams).then(res => {
if (res.data.code !== 0) return
taskDetailData.value = res.data.data.records
total.value = res.data.data.total
-
})
}
// 机巢列表数据
@@ -327,20 +325,22 @@
}
// 任务状态颜色
+// 待执行
.pending {
- color: #e36913;
+ color: #ffe17e;
}
+// 执行中
.distributed {
- color: #ffc398;
+ color: #FFA768;
}
+// 已执行
.finish {
- color: #afd9fb;
+ color: #8effac;
}
-.cancel {
- color: #11c4ff;
-}
+
+// 执行失败
.fail {
- color: #8cfea7;
+ color: #ff8e8e;
}
</style>
diff --git a/src/views/SignMachineNest/MachineRight/InspectionRaskList.vue b/src/views/SignMachineNest/MachineRight/InspectionRaskList.vue
index 14b2c12..4df6e24 100644
--- a/src/views/SignMachineNest/MachineRight/InspectionRaskList.vue
+++ b/src/views/SignMachineNest/MachineRight/InspectionRaskList.vue
@@ -252,6 +252,7 @@
color: #fff;
display: flex;
justify-content: space-between;
+background: linear-gradient( 90deg, rgba(71,157,255,0) 0%, rgba(71, 157, 255, 0.12) 50%, rgba(71,157,255,0) 100%);
.left {
.left-t {
height: 24px;
--
Gitblit v1.9.3