From c832bf2e80ac465e71b7a1c1f7a59d4252030989 Mon Sep 17 00:00:00 2001
From: 张含笑 <zhx18749296735@163.com>
Date: Tue, 05 Aug 2025 17:33:08 +0800
Subject: [PATCH] feat:事件工单滚动条

---
 src/views/job/components/JobRelatedEvents.vue |   59 +++++++++++++++++++++++++++++++++++++++++++----------------
 1 files changed, 43 insertions(+), 16 deletions(-)

diff --git a/src/views/job/components/JobRelatedEvents.vue b/src/views/job/components/JobRelatedEvents.vue
index c8e4291..6826bef 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>
@@ -27,7 +28,7 @@
 			</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%;
@@ -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