From 02409bfbe15f22fc3b5dccadabfd860a660a49d9 Mon Sep 17 00:00:00 2001
From: 罗广辉 <guanghui.luo@foxmail.com>
Date: Sat, 11 Oct 2025 10:37:14 +0800
Subject: [PATCH] feat: 名称修改

---
 src/views/job/components/JobRelatedEvents.vue |   65 +++++++++++++++++++++++---------
 1 files changed, 46 insertions(+), 19 deletions(-)

diff --git a/src/views/job/components/JobRelatedEvents.vue b/src/views/job/components/JobRelatedEvents.vue
index c8e4291..2dd0b4a 100644
--- a/src/views/job/components/JobRelatedEvents.vue
+++ b/src/views/job/components/JobRelatedEvents.vue
@@ -1,5 +1,6 @@
 <template>
-	<div class="machineTableDetailsTitle">
+	<div class="JobRelatedEvents">
+		<div class="machineTableDetailsTitle">
 		<p>
 			关联事件
 			<span>{{ total }}</span>
@@ -12,7 +13,7 @@
 				<div class="itemchild">模糊查询:</div>
 				<el-input v-model="params.event_name" placeholder="请输入事件名称" clearable></el-input>
 			</div>
-			<div class="item">
+			<!-- <div class="item">
 				<div class="itemchild">任务执行日期:</div>
 				<el-date-picker
 					popper-class="custom-date-picker"
@@ -24,10 +25,10 @@
 					:disabled-date="disabledDate"
 					@change="changeselect"
 				/>
-			</div>
+			</div> -->
 			<div class="item">
 				<div class="itemchild">关联算法:</div>
-				<TaskAlgorithmBusiness :setWidth="186 +'px'" :showAlgorithm="true" @algorithmChange="algorithmChange" />
+				<TaskAlgorithmBusiness :setWidth="186" :showAlgorithm="true" @algorithmChange="algorithmChange" />
 			</div>
 		</div>
 		<div class="search-btn">
@@ -45,17 +46,17 @@
 			:row-style="{ height: '38px', fontSize: '14px', 'text-align': 'center' }"
 			:header-cell-style="{ 'text-align': 'center', height: '36px', fontSize: '14px' }"
 		>
-			<el-table-column label="序号" type="index" width="60">
+			<el-table-column label="序号" type="index" width="60" align="center">
 				<template #default="{ $index }">
 					{{ ($index + 1 + (sizeParams.current - 1) * sizeParams.size).toString().padStart(2, '0') }}
 				</template>
 			</el-table-column>
-			<el-table-column prop="event_num" label="事件编号" />
-			<el-table-column show-overflow-tooltip prop="event_name" label="事件名称" />
-			<el-table-column show-overflow-tooltip prop="remark" label="事件地址" />
-			<el-table-column show-overflow-tooltip prop="ai_types" label="关联算法" />
-			<el-table-column show-overflow-tooltip prop="job_create_time" label="事件时间" />
-			<el-table-column prop="status" label="事件状态">
+			<el-table-column prop="event_num" label="事件编号"  align="center"/>
+			<el-table-column show-overflow-tooltip prop="event_name" label="事件名称"  align="center"/>
+			<el-table-column show-overflow-tooltip prop="remark" label="事件地址"  align="center"/>
+			<el-table-column show-overflow-tooltip prop="ai_types" label="关联算法"  align="center"/>
+			<el-table-column show-overflow-tooltip prop="job_create_time" label="事件时间"  align="center"/>
+			<el-table-column prop="status" label="事件状态" align="center">
 				<template #default="scope">
 					<div class="pending" v-if="scope.row.status === 0">待处理</div>
 					<div class="reviewed" v-if="scope.row.status === 2">待审核</div>
@@ -64,9 +65,9 @@
 					<div class="ended" v-if="scope.row.status === 5">已完结</div>
 				</template>
 			</el-table-column>
-			<el-table-column label="操作" width="80">
+			<el-table-column label="操作" width="90" align="center">
 				<template #default="scope">
-					<div class="ztzf-view" @click="examine(scope.row)">查看</div>
+					<div class="ztzf-view btnItem" @click="examine(scope.row)">查看</div>
 				</template>
 			</el-table-column>
 		</el-table>
@@ -82,13 +83,16 @@
 		:total="total"
 		@change="pageChange"
 	/>
+	</div>
 </template>
 <script setup>
 import { useStore } from 'vuex'
 import { getDeviceEventList } from '@/api/job/task'
 import { dayjs, ElMessage } from 'element-plus'
-// import { pxToRem } from '@/utils/rem'
+import { useRouter } from 'vue-router';
+import { pxToRem } from '@/utils/rem'
 import TaskAlgorithmBusiness from './TaskAlgorithmBusiness.vue'
+const router = useRouter();
 const emit = defineEmits(['refresh'])
 const props = defineProps({
 	jobTimes: Array,
@@ -121,9 +125,12 @@
 const total = ref(0)
 const examine = row => {
 	const orderNumber = row.event_num
-	const adminUrl = import.meta.env.VITE_APP_ADMIN_URL
-	const targetPath = `/tickets/ticket?orderNumber=${orderNumber}`
-	window.open(`${adminUrl}?redirect=${encodeURIComponent(targetPath)}`, '_blank')
+	router.push({
+      path: `/tickets/ticket`,
+      query: {
+        orderNumber,
+      },
+    });
 }
 const wayLineJodInfoId = inject('wayLineJodInfoId')
 
@@ -184,7 +191,8 @@
 // }
 </style>
 <style scoped lang="scss">
-.machineTableDetailsTitle {
+.JobRelatedEvents {
+	.machineTableDetailsTitle {
 	margin-bottom: 16px;
 	background: url('/src/assets/images/task/detailtitle.png') no-repeat center;
 	background-size: 100% 100%;
@@ -214,7 +222,7 @@
 }
 // 处理中
 .processing {
-	color: #ffff61;
+	color: #FFC300;
 }
 // 已完成
 .done {
@@ -264,6 +272,7 @@
 				display: flex;
 				justify-content: center;
 				align-items: center;
+				
 				img {
 					width: 14px;
 					height: 14px;
@@ -273,15 +282,33 @@
 				background: #409EFF;
 				color: #fff;
 				margin-right: 10px;
+				cursor: pointer;
 			}
 			.clear {
 				border: 1px solid #D2D1D1;
 				color: #676767;
 				margin-right: 10px;
+				cursor: pointer;
 			}
 			.add {
 				background: #FF9243;
 				color: #fff;
 			}
 		}
+		.btnItem {
+			height: 27px;
+			line-height: 27px;
+			border-radius: 0px 0px 0px 0px;
+			border: 1px solid #51a8ff;
+			font-family: Segoe UI, Segoe UI;
+			font-weight: 400;
+			font-size: 14px;
+			color: #1C5CFF;
+			padding: 0 10px;
+			display: inline-block;
+			margin-right: 10px;
+			cursor: pointer;
+	}
+}
+
 </style>

--
Gitblit v1.9.3