From a7e6761ba0cfccdf33ed552eb2d3b783c8e4ab4a Mon Sep 17 00:00:00 2001
From: shuishen <1109946754@qq.com>
Date: Wed, 16 Apr 2025 20:49:12 +0800
Subject: [PATCH] feat:事件弹窗显示调整

---
 src/views/Home/HomeLeft/InspectionRaskDetails/InspectionRaskDetailsDialog.vue |  325 ++++++++++-------------------------------------------
 1 files changed, 62 insertions(+), 263 deletions(-)

diff --git a/src/views/Home/HomeLeft/InspectionRaskDetails/InspectionRaskDetailsDialog.vue b/src/views/Home/HomeLeft/InspectionRaskDetails/InspectionRaskDetailsDialog.vue
index bd4d5ea..b5e7ed4 100644
--- a/src/views/Home/HomeLeft/InspectionRaskDetails/InspectionRaskDetailsDialog.vue
+++ b/src/views/Home/HomeLeft/InspectionRaskDetails/InspectionRaskDetailsDialog.vue
@@ -1,9 +1,9 @@
  <!--  巡检任务情况-详情 -->
 <template>
 	<el-dialog
-		class="inspection-rask-details-dialog"
+		class="inspection-rask-details-dialog ztzf-dialog"
 		v-model="isShowDetailsDialog"
-		:width="pxToRem(1000)"
+		:width="pxToRem(1500)"
 		:close-on-click-modal="false"
 		:destroy-on-close="true"
 	>
@@ -17,22 +17,22 @@
 		<el-form :model="searchForm" inline>
 			<div class="search-row">
 				<el-form-item>
-					<el-input v-model="searchForm.key_word" placeholder="请输入任务/机巢名称" clearable />
+					<el-input class="ztzf-input" v-model="searchForm.key_word" placeholder="请输入任务/机巢名称" clearable />
 				</el-form-item>
 				<el-form-item label="关联算法">
-					<el-select v-model="searchForm.ai_types" placeholder="请选择">
+					<el-select class="ztzf-select" v-model="searchForm.ai_types" placeholder="请选择">
 						<el-option v-for="item in taskAlgorithm" :key="item.id" :label="item.dictValue" :value="item.dictKey" />
 					</el-select>
 				</el-form-item>
 				<el-form-item label="任务状态">
-					<el-select v-model="searchForm.status" placeholder="请选择" clearable>
+					<el-select class="ztzf-select" v-model="searchForm.status" placeholder="请选择" clearable>
 						<el-option v-for="item in statusOptions" :key="item.value" :label="item.label" :value="item.value" />
 					</el-select>
 				</el-form-item>
 			</div>
 			<div class="search-row">
 				<el-form-item label="选择机巢">
-					<el-select v-model="searchForm.device_sn" placeholder="请选择">
+					<el-select class="ztzf-select" v-model="searchForm.device_sn" placeholder="请选择">
 						<el-option
 							v-for="item in deviceList"
 							:label="item.nickname"
@@ -43,6 +43,7 @@
 				</el-form-item>
 				<el-form-item>
 					<el-date-picker
+						class="ztzf-date-picker"
 						v-model="dateRange"
 						type="daterange"
 						range-separator="至"
@@ -53,17 +54,17 @@
 					/>
 				</el-form-item>
 				<el-form-item>
-					<div class="reset" @click="handleReset"></div>
-					<div class="searchs" @click="handleSearch"></div>
+					<div class="reset" @click="handleReset">重置</div>
+					<div class="searchs" @click="handleSearch">搜索</div>
 				</el-form-item>
 			</div>
 		</el-form>
 		<!-- 表格 -->
-		<div class="tabledata">
+		<div class="tabledata ztzf-table">
 			<el-table
 				:data="taskDetailData"
 				:row-class-name="tableRowClassName"
-				:row-style="{ height: '58px', fontSize: '14px', 'text-align': 'center' }"
+				:row-style="{ height: '45px', fontSize: '14px', 'text-align': 'center' }"
 				:header-cell-style="{ 'text-align': 'center', height: '36px', fontSize: '14px' }"
 			>
 				<el-table-column label="序号" type="index" width="60">
@@ -71,54 +72,54 @@
 						{{ ($index + 1).toString().padStart(2, '0') }}
 					</template>
 				</el-table-column>
-				<!-- 事件状态:0 =待处理,1=待分拨,2=待处理,3=处理中,4=已完成 5=已完结 -->
-				<el-table-column prop="job_info_num" label="任务编号" />
-				<el-table-column prop="name" label="任务名称" />
-				<el-table-column prop="device_names" label="所属机巢" />
-				<el-table-column prop="ai_type_str" label="关联算法" />
+				<el-table-column show-overflow-tooltip prop="job_info_num" label="任务编号" />
+				<el-table-column prop="name" show-overflow-tooltip label="任务名称" />
+				<el-table-column prop="device_names" show-overflow-tooltip label="所属机巢" />
+				<el-table-column show-overflow-tooltip prop="ai_type_str" label="关联算法" />
 				<el-table-column prop="status" label="任务状态">
 					<template #default="scope">
 						<span
 							:class="
-								scope.row.status == 1
+								scope.row.status === 1
 									? 'pending '
-									: scope.row.status == 2
+									: scope.row.status === 2
 									? 'distributed'
-									: scope.row.status == 3
+									: scope.row.status === 3
 									? 'finish '
-									: scope.row.status == 4
-									? 'cancel '
+								
+								
 									: 'fail '
 							"
-							>{{
-								scope.row.status == 1
-									? '待执行'
-									: scope.row.status == 2
-									? '执行中'
-									: scope.row.status == 3
-									? '完成'
-									: scope.row.status == 4
-									? '取消'
-									: '失败'
-							}}</span
 						>
+							{{
+								scope.row.status === 1
+									? '待执行'
+									: scope.row.status === 2
+									? '执行中'
+									: scope.row.status === 3
+									? '已执行'
+							
+									: '执行失败'
+							}}
+						</span>
 					</template>
 				</el-table-column>
-				<el-table-column prop="industry_type_str" label="任务类型" />
-				<el-table-column prop="begin_time" label="任务时间" />
+				<el-table-column show-overflow-tooltip prop="industry_type_str" label="任务类型" />
+				<el-table-column prop="begin_time" label="任务时间" width="150" />
 				<el-table-column prop="event_number" label="关联事件">
 					<template #default="scope">
 						<span>{{ scope.row.event_number ? scope.row.event_number : '/' }}</span>
 					</template>
 				</el-table-column>
-				<el-table-column label="操作" width="80"> <div class="view">查看</div></el-table-column>
+				<el-table-column label="操作" width="80"><div class="ztzf-view">查看</div></el-table-column>
 			</el-table>
 		</div>
 		<!-- 分页 -->
-		<div class="pagination">
+		<div style="display: flex; justify-content: center;margin:15px 0;">
 			<el-pagination
-				v-model:current-page="pageParams.page"
-				v-model:page-size="pageParams.limit"
+				class="ztzf-pagination"
+				v-model:current-page="pageParams.current"
+				v-model:page-size="pageParams.size"
 				:page-sizes="[10, 20, 30, 50]"
 				background
 				layout=" prev, pager, next, jumper"
@@ -149,8 +150,8 @@
 	{ label: '待执行', value: 1 },
 	{ label: '执行中', value: 2 },
 	{ label: '已完成', value: 3 },
-	{ label: '已取消', value: 4 },
-	{ label: '执行失败', value: 5 },
+	
+	{ label: '执行失败', value: 4 },
 ]
 // 设备页面参数
 const devicePageParams = ref({
@@ -172,8 +173,8 @@
 const total = ref(0)
 // 分页参数
 let pageParams = reactive({
-	page: 1,
-	limit: 10,
+	current: 1,
+	size: 10,
 })
 // 日期选择
 const changeselect = () => {
@@ -185,9 +186,9 @@
 const handleReset = () => {
 	dateRange.value = null
 	Object.keys(searchForm).forEach(key => {
-		if (key == 'start_date' || key == 'end_date') {
+		if (key === 'start_date' || key === 'end_date') {
 			searchForm[key] = null
-		} else if (key == 'ai_types') {
+		} else if (key === 'ai_types') {
 			searchForm[key] = []
 		} else {
 			searchForm[key] = ''
@@ -198,27 +199,29 @@
 }
 // 查询
 const handleSearch = () => {
-	taskDetailParams.page = 1
-	taskDetailParams.limit = 10
+	taskDetailParams.current = 1
+	taskDetailParams.size = 10
 	taskDetailParams.searchParams = searchForm
 	getJobList()
 }
 // 分页大小改变
 const handleSizeChange = val => {
-	pageParams.limit = val
+	taskDetailParams.size = val
 	getJobList()
 }
 // 页码改变
 const handleCurrentChange = val => {
-	pageParams.page = val
+	taskDetailParams.current = val
 	getJobList()
 }
 // 获取任务列表
 const getJobList = () => {
+// 事件状态: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
+		
 	})
 }
 // 机巢列表数据
@@ -272,128 +275,22 @@
 		.el-form-item__label {
 			color: #fff;
 		}
-
-		.el-input,
-		.el-select,
-		.el-date-editor {
-			width: 200px;
-			--el-input-bg-color: transparent;
-			--el-input-border-color: rgba(255, 255, 255, 0.3);
-			--el-input-text-color: #fff;
-			--el-input-placeholder-color: rgba(255, 255, 255, 0.5);
-		}
 	}
 }
 
 :deep() {
-	.el-table .el-table__cell {
-		padding: 0 !important;
-	}
-	.el-table thead {
-		border-bottom: 1px solid;
-		border: 1px solid;
-		border-image: linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 1), rgba(255, 255, 255, 0)) 1 1;
-		color: var(--el-table-header-text-color);
-		background: #102441;
-	}
-	.el-date-editor.el-input,
-	.el-date-editor.el-input__wrapper {
-		height: var(--el-input-height, var(--el-component-size));
-		width: 0 !important;
-	}
-	.el-select__wrapper {
-		background: #012a50;
-		height: 100%;
-		padding-left: 20px;
-		border: 1px solid #51a8ff;
-		box-shadow: none !important;
-	}
-
-	.el-select__selected-item {
-		font-family: Source Han Sans CN, Source Han Sans CN, serif;
-
-		line-height: 18px;
-		font-weight: 400;
-		font-size: 16px;
-		color: #296aca;
-	}
-	.el-input__wrapper {
-		background: #012a50 !important;
-		box-shadow: none !important;
-		border: 1px solid #178bff;
-	}
-	.el-input__inner::placeholder {
-		color: #296aca;
-	}
 	.el-form-item__label {
 		font-family: Segoe UI, Segoe UI;
 		font-weight: 400;
 		font-size: 16px;
 		color: #ffffff;
 	}
-	.el-date-editor .el-range-separator {
-		color: #ffffff !important;
-	}
 }
-:deep(.el-pagination) {
-	position: absolute;
-	left: 50%;
-	transform: translateX(-50%);
-	border-radius: 4px;
-	bottom: 5px;
-}
-:deep(.el-pagination button) {
-	background: center center no-repeat none !important;
-	color: #8eb8ea !important;
-}
-:deep(.el-pager li) {
-	background: none !important;
-	color: #8eb8ea !important;
-}
-:deep(.el-pager li.is-active) {
-	background: #021022 !important;
-	border-radius: 0px 0px 0px 0px;
-	border: 1px solid #1479ef;
-	color: #c7e1ff !important;
-}
-:deep(.el-pagination__goto) {
-	color: #c7e1ff !important;
-}
-:deep(.el-pagination__classifier) {
-	color: #c7e1ff !important;
-}
-:deep(.el-pager .el-input__wrapper) {
-	background: #021022 !important;
-	color: #c7e1ff !important;
-	border: 1px solid #1479ef !important;
-	z-index: 1;
-}
-.el-table {
-	color: #fff;
-	--el-table-border-color: var(--el-border-color-lighter);
-	--el-table-border: none !important;
-	--el-table-text-color: #fff !important;
-	--el-table-header-text-color: #fff !important;
-	--el-table-row-hover-bg-color: none !important;
-	--el-table-current-row-bg-color: none !important;
-	--el-table-header-bg-color: none !important;
-	--el-table-fixed-box-shadow: none !important;
-	--el-table-bg-color: none !important;
-	--el-table-tr-bg-color: none !important;
-	--el-table-expanded-cell-bg-color: none !important;
-	--el-table-fixed-left-column: inset 10px 0 10px -10px rgba(0, 0, 0, 0.15);
-	--el-table-fixed-right-column: inset -10px 0 10px -10px rgba(0, 0, 0, 0.15);
-}
-.el-table__header {
-	width: 0 !important;
-}
+
 .el-table__body {
 	border-collapse: collapse;
 }
-:deep(.el-table .el-table__cell) {
-	padding: 0 !important;
-	text-align: center !important;
-}
+
 .my-header {
 	display: inline-block;
 	vertical-align: middle;
@@ -405,6 +302,10 @@
 	cursor: pointer;
 	background: url('/src/assets/images/home/homeLeft/‌inspection-reset.png') no-repeat center;
 	background-size: 100% 100%;
+	color: #fff;
+	font-weight: bold;
+	font-size: 14px;
+	text-align: center;
 }
 .searchs {
 	margin-left: 23px;
@@ -413,25 +314,18 @@
 	height: 32px;
 	background: url('/src/assets/images/home/homeLeft/in‌spection-select.png') no-repeat center;
 	background-size: 100% 100%;
+	color: #fff;
+	font-weight: bold;
+	font-size: 14px;
+	text-align: center;
 }
 .tabledata {
 	padding: 0 16px;
 	overflow: hidden;
-	height: 640px;
+	// height: 640px;
 	overflow-y: scroll !important;
 }
-.view {
-	width: 53px;
-	height: 27px;
-	background: #001f4e;
-	border-radius: 0px 0px 0px 0px;
-	border: 1px solid #51a8ff;
-	font-size: 14px;
-	color: #ffffff;
-	text-align: center;
-	line-height: 27px;
-	cursor: pointer;
-}
+
 // 任务状态颜色
 .pending {
 	color: #e36913;
@@ -449,99 +343,4 @@
 	color: #8cfea7;
 }
 </style>
-<style lang="scss">
-.inspection-rask-details-dialog {
-	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-table__inner-wrapper:before {
-		height: 0 !important;
-	}
-	.el-table .warning-row {
-		--el-table-tr-bg-color: rgba(22, 43, 74, 0.79);
-	}
-	.el-table .warning-row::after {
-		position: absolute;
-		content: '';
-		left: 0;
-		width: 100%;
-		border-bottom: 1px solid;
-
-		border-image: linear-gradient(
-				90deg,
-				rgba(25, 162, 255, 0) 10%,
-				rgba(20, 125, 202, 1) 50%,
-				rgba(25, 162, 255, 0) 90%
-			)
-			2 2 2 2;
-	}
-	.el-table .success-row {
-		--el-table-tr-bg-color: #0b1d38;
-	}
-	.el-table .success-row::after {
-		position: absolute;
-		content: '';
-		left: 0;
-		width: 100%;
-		border-bottom: 1px solid;
-
-		border-image: linear-gradient(
-				90deg,
-				rgba(25, 162, 255, 0) 10%,
-				rgba(20, 125, 202, 1) 79%,
-				rgba(25, 162, 255, 0) 90%
-			)
-			2 2 2 2;
-	}
-	.el-scrollbar__thumb {
-		background: #13c6ff !important;
-	}
-}
-</style>
\ No newline at end of file

--
Gitblit v1.9.3