From 833fadee976f732099ea27f69c7c079cfdfe2f5e Mon Sep 17 00:00:00 2001
From: 张含笑 <zhx18749296735@163.com>
Date: Sat, 30 Aug 2025 10:28:39 +0800
Subject: [PATCH] feat:界面优化
---
src/views/tickets/ticket.vue | 845 ++++++++++++++++++++++++++++---------------------------
src/views/tickets/orderLog.vue | 2
src/assets/images/dataCenter/qrCode.svg | 12
src/assets/images/dataCenter/qrCode1.svg | 17 +
4 files changed, 456 insertions(+), 420 deletions(-)
diff --git a/src/assets/images/dataCenter/qrCode.svg b/src/assets/images/dataCenter/qrCode.svg
index 0ec5174..2e78833 100644
--- a/src/assets/images/dataCenter/qrCode.svg
+++ b/src/assets/images/dataCenter/qrCode.svg
@@ -1,16 +1,16 @@
<svg width="14" height="15" viewBox="0 0 14 15" fill="none" xmlns="http://www.w3.org/2000/svg">
-<g id="Group 1321315688">
-<g id="Frame" clip-path="url(#clip0_1238_1817)">
-<g id="Frame_2" clip-path="url(#clip1_1238_1817)">
-<path id="Vector" d="M4.83697 10.163H3.10692V8.43298H1.37593V11.029H3.10692V11.894H4.83697V11.029H6.56795V8.43298H4.83697V10.163ZM12.625 8.43298H7.43298V13.625H12.625V8.43298ZM10.894 10.164V11.8949H9.16303V10.163L10.894 10.164ZM12.625 2.375H7.43298V7.56982H12.625V2.375ZM10.894 4.10598V5.83697H9.16303V4.10598H10.894ZM6.56702 2.375H1.375V7.56982H6.56795L6.56702 2.375ZM4.83604 4.10598V5.83697H3.10692V4.10598H4.83604ZM3.10692 11.894H1.37593V13.625H3.10692V11.894ZM6.56795 11.894H4.83697V13.625H6.56795V11.894Z" fill="#212121"/>
+<g id="Group 1321316147">
+<g id="Frame" clip-path="url(#clip0_1360_1927)">
+<g id="Frame_2" clip-path="url(#clip1_1360_1927)">
+<path id="Vector" d="M4.83697 10.163H3.10692V8.43298H1.37593V11.029H3.10692V11.894H4.83697V11.029H6.56795V8.43298H4.83697V10.163ZM12.625 8.43298H7.43298V13.625H12.625V8.43298ZM10.894 10.164V11.8949H9.16303V10.163L10.894 10.164ZM12.625 2.375H7.43298V7.56982H12.625V2.375ZM10.894 4.10598V5.83697H9.16303V4.10598H10.894ZM6.56702 2.375H1.375V7.56982H6.56795L6.56702 2.375ZM4.83604 4.10598V5.83697H3.10692V4.10598H4.83604ZM3.10692 11.894H1.37593V13.625H3.10692V11.894ZM6.56795 11.894H4.83697V13.625H6.56795V11.894Z" fill="#1B94FF"/>
</g>
</g>
</g>
<defs>
-<clipPath id="clip0_1238_1817">
+<clipPath id="clip0_1360_1927">
<rect width="11" height="11" fill="white" transform="translate(1.5 2.13086)"/>
</clipPath>
-<clipPath id="clip1_1238_1817">
+<clipPath id="clip1_1360_1927">
<rect width="12" height="12" fill="white" transform="matrix(-1 0 0 1 13 2)"/>
</clipPath>
</defs>
diff --git a/src/assets/images/dataCenter/qrCode1.svg b/src/assets/images/dataCenter/qrCode1.svg
new file mode 100644
index 0000000..0ec5174
--- /dev/null
+++ b/src/assets/images/dataCenter/qrCode1.svg
@@ -0,0 +1,17 @@
+<svg width="14" height="15" viewBox="0 0 14 15" fill="none" xmlns="http://www.w3.org/2000/svg">
+<g id="Group 1321315688">
+<g id="Frame" clip-path="url(#clip0_1238_1817)">
+<g id="Frame_2" clip-path="url(#clip1_1238_1817)">
+<path id="Vector" d="M4.83697 10.163H3.10692V8.43298H1.37593V11.029H3.10692V11.894H4.83697V11.029H6.56795V8.43298H4.83697V10.163ZM12.625 8.43298H7.43298V13.625H12.625V8.43298ZM10.894 10.164V11.8949H9.16303V10.163L10.894 10.164ZM12.625 2.375H7.43298V7.56982H12.625V2.375ZM10.894 4.10598V5.83697H9.16303V4.10598H10.894ZM6.56702 2.375H1.375V7.56982H6.56795L6.56702 2.375ZM4.83604 4.10598V5.83697H3.10692V4.10598H4.83604ZM3.10692 11.894H1.37593V13.625H3.10692V11.894ZM6.56795 11.894H4.83697V13.625H6.56795V11.894Z" fill="#212121"/>
+</g>
+</g>
+</g>
+<defs>
+<clipPath id="clip0_1238_1817">
+<rect width="11" height="11" fill="white" transform="translate(1.5 2.13086)"/>
+</clipPath>
+<clipPath id="clip1_1238_1817">
+<rect width="12" height="12" fill="white" transform="matrix(-1 0 0 1 13 2)"/>
+</clipPath>
+</defs>
+</svg>
diff --git a/src/views/tickets/orderLog.vue b/src/views/tickets/orderLog.vue
index 3c030c9..0e4c724 100644
--- a/src/views/tickets/orderLog.vue
+++ b/src/views/tickets/orderLog.vue
@@ -566,7 +566,7 @@
align: 'center',
border: true,
- stripe: true,
+ stripe: false,
searchShow: true,
searchBtnText: '搜索',
searchMenuSpan: 6,
diff --git a/src/views/tickets/ticket.vue b/src/views/tickets/ticket.vue
index 486563c..1071185 100644
--- a/src/views/tickets/ticket.vue
+++ b/src/views/tickets/ticket.vue
@@ -137,10 +137,21 @@
</div>
<!-- 表格部分 -->
- <avue-crud class="ztzf-public-general-avue-crud" ref="avueCrud" v-model="tableData" :option="option"
- :data="tableData" v-model:page="page" @size-change="sizeChange" @current-change="handleCurrentChange"
- @refresh-change="refreshChange" :table-loading="loading" @selection-change="handleSelectionChange"
- :permission="permissionList" v-if="activeTab === tab.name">
+ <avue-crud
+ class="ztzf-public-general-avue-crud"
+ ref="avueCrud"
+ v-model="tableData"
+ :option="option"
+ :data="tableData"
+ v-model:page="page"
+ @size-change="sizeChange"
+ @current-change="handleCurrentChange"
+ @refresh-change="refreshChange"
+ :table-loading="loading"
+ @selection-change="handleSelectionChange"
+ :permission="permissionList"
+ v-if="activeTab === tab.name"
+ >
<template #orderNumber="{ row }">
<el-tooltip-copy :content="row.orderNumber" :showCopyText="true" textAlign="left">
{{ row.orderNumber }}
@@ -247,8 +258,12 @@
</el-col>
<el-col :span="12">
<el-form-item label="工单类型" prop="type">
-
- <el-select @change="handleTypeChange" v-model="form.type" placeholder="请选择工单类型" class="full-width" >
+ <el-select
+ @change="handleTypeChange"
+ v-model="form.type"
+ placeholder="请选择工单类型"
+ class="full-width"
+ >
<el-option
v-for="item in types"
:key="item.value"
@@ -400,20 +415,25 @@
</el-form>
<template #footer>
<div class="dialog-footer">
-
<el-button type="danger" :loading="submitLoading" @click="submitForm">发布</el-button>
<el-button type="infoprimary" plain :loading="draftLoading" @click="saveDraft"
>存草稿</el-button
>
-
- <el-button @click="handleCancel">取 消</el-button>
+ <el-button @click="handleCancel">取 消</el-button>
</div>
</template>
</el-dialog>
<!-- 工单详情对话框 -->
- <el-dialog class="custom-dialog" align-center v-model="detailVisible" title="工单详情" width="80%" append-to-body>
+ <el-dialog
+ class="custom-dialog"
+ align-center
+ v-model="detailVisible"
+ title="工单详情"
+ width="80%"
+ append-to-body
+ >
<div class="detail-container">
<div class="detail-top-title">
<div class="event-title-center event-orderNumber">
@@ -456,205 +476,175 @@
</el-steps>
</div>
- <div class="PopUpTableScrolls">
+ <div class="PopUpTableScrolls">
<!-- 基本信息表格 -->
- <el-table :show-header="false" :data="formattedDetailFields" border class="tableCss">
- <el-table-column prop="label1" label="基本信息" width="150">
- <template #default="{ row }">
- <!-- 添加必填星号的标签 -->
- <span
- v-if="currentDetail.status === 0 &&(row.label1 === '关联算法' || row.label1 === '工单名称')"
- class="required-label"
- >
- <span class="required-star">*</span>{{ row.label1 }}
- </span>
- <span v-else>{{ row.label1 }}</span>
- </template>
- </el-table-column>
- <el-table-column>
- <template #default="{ row }">
- <template
- v-if="
- currentDetail.status === 0 &&
- row.label1 === '工单名称' &&
- hasProcessingBtnPermission()
- "
- >
- <el-input
- v-model="currentDetail.orderName"
- placeholder="请输入工单名称"
- class="required-input"
- />
- </template>
- <template
- v-else-if="
- currentDetail.status === 0 &&
- row.label1 === '关联算法' &&
- hasProcessingBtnPermission()
- "
- >
- <el-select
- v-model="currentDetail.aiType"
- placeholder="请选择关联算法"
- class="required-input"
+ <el-table :show-header="false" :data="formattedDetailFields" border class="tableCss">
+ <el-table-column prop="label1" label="基本信息" width="150">
+ <template #default="{ row }">
+ <!-- 添加必填星号的标签 -->
+ <span
+ v-if="
+ currentDetail.status === 0 &&
+ (row.label1 === '关联算法' || row.label1 === '工单名称')
+ "
+ class="required-label"
>
- <el-option
- v-for="item in algorithms2"
- :key="item.value"
- :label="item.label"
- :value="item.value"
+ <span class="required-star">*</span>{{ row.label1 }}
+ </span>
+ <span v-else>{{ row.label1 }}</span>
+ </template>
+ </el-table-column>
+ <el-table-column>
+ <template #default="{ row }">
+ <template
+ v-if="
+ currentDetail.status === 0 &&
+ row.label1 === '工单名称' &&
+ hasProcessingBtnPermission()
+ "
+ >
+ <el-input
+ v-model="currentDetail.orderName"
+ placeholder="请输入工单名称"
+ class="required-input"
/>
- </el-select>
- </template>
- <template v-else>{{ row.value1 }}</template>
- </template>
- </el-table-column>
- <el-table-column prop="label2" label="基本信息" width="150">
- <template #default="{ row }">
- <!-- 添加必填星号的标签 -->
-
- <span
- v-if="
- currentDetail.status === 0 &&
- row.label2 === '工单内容'
- "
- class="required-label"
- >
- <span class="required-star">*</span>{{ row.label2 }}
- </span>
- <span v-else>{{ row.label2 }}</span>
- </template>
- </el-table-column>
- <el-table-column>
- <template #default="{ row }">
- <!-- 修改工单类型和工单内容的显示 -->
-
-
- <template
- v-if="
- currentDetail.status === 0 &&
- row.label2 === '工单内容' &&
- hasProcessingBtnPermission()
- "
- >
- <el-input
- type="textarea"
- v-model="currentDetail.content"
- placeholder="请输入工单内容"
- class="required-input"
- />
- </template>
- <template v-else>{{ row.value2 }}</template>
- </template>
- </el-table-column>
- </el-table>
-
- <!-- 事件处理详情 -->
- <div v-if="[3, 4].includes(currentDetail.status)" class="form-section">
- <div class="section-title">
- <!-- 处理中状态显示必填星号 -->
- <template v-if="currentDetail.status === 3">
- <span class="required-label"> <span class="required-star">*</span>事件处理详情 </span>
- </template>
- <template v-else> 事件处理详情 </template>
- </div>
- <!-- 处理中状态显示输入框 -->
- <template v-if="currentDetail.status === 3 && hasProcessedAndOverBtnPermission()">
- <el-input
- type="textarea"
- v-model="currentDetail.processingDetail"
- placeholder="请输入事件处理详情"
- :rows="4"
- style="width: 100%; margin-bottom: 10px"
- />
- </template>
- <!-- 已完成和已完结状态显示只读文本 -->
- <template v-else>
- <div class="readonly-processing-detail">
- {{ currentDetail.processingDetail }}
- </div>
- </template>
- </div>
-
- <!-- 上传图片 -->
- <div v-if="[3].includes(currentDetail.status)" class="form-section uploadImg">
- <div class="section-title" v-if="hasProcessedAndOverBtnPermission()">
- <!-- 已完成状态显示必填星号 -->
- <template v-if="currentDetail.status === 3">
- <span class="required-label"> <span class="required-star">*</span>上传图片 </span>
- </template>
- <template v-else> 上传图片 </template>
- </div>
- <el-upload
- v-if="hasProcessedAndOverBtnPermission()"
- ref="upload"
- :action="'#'"
- :auto-upload="false"
- list-type="picture-card"
- :on-change="handleFileChange"
- :on-remove="handleUploadRemove"
- :before-upload="beforeUpload"
- :file-list="currentDetail.photos || []"
- :limit="1"
- accept="image/*"
- class="detail-upload"
- >
- <template v-if="!currentDetail.photos || currentDetail.photos.length < 1">
- <!-- <i class="el-icon-plus">+</i> -->
- <div class="el-icon-plus">
- <span>+</span>
- </div>
- </template>
- </el-upload>
- <div class="el-upload__tip" v-if="hasProcessedAndOverBtnPermission()">
- (上传照片即可完结工单,只能上传jpg、jpeg、png照片,且不超过5M)
- </div>
- </div>
-
- <!-- 图片和地图部分 -->
- <div class="media-section">
- <el-row :gutter="20">
-
- <el-col :span="12">
- <div class="media-box">
- <div class="media-title">事件图片</div>
- <div class="media-content">
- <el-image
- v-if="currentDetail.mediaUrl"
- :src="getThumbUrl(currentDetail.mediaUrl)"
- :preview-src-list="[getPreviewUrl(currentDetail.mediaUrl)]"
- fit="contain"
- style="width: 700px; height: 520px; cursor: pointer"
+ </template>
+ <template
+ v-else-if="
+ currentDetail.status === 0 &&
+ row.label1 === '关联算法' &&
+ hasProcessingBtnPermission()
+ "
+ >
+ <el-select
+ v-model="currentDetail.aiType"
+ placeholder="请选择关联算法"
+ class="required-input"
>
- <template #placeholder>
- <div class="image-placeholder">
- <i class="el-icon-picture-outline"></i>
- <span>加载中...</span>
- </div>
- </template>
- <template #error>
- <div class="image-error">
- <i class="el-icon-picture-outline"></i>
- <span>加载失败</span>
- </div>
- </template>
- </el-image>
- <div v-else class="no-media">暂无图片/视频</div>
- </div>
- </div>
- </el-col>
- <el-col :span="12">
- <div class="media-box">
- <!-- 根据状态显示不同的标题和内容 -->
+ <el-option
+ v-for="item in algorithms2"
+ :key="item.value"
+ :label="item.label"
+ :value="item.value"
+ />
+ </el-select>
+ </template>
+ <template v-else>{{ row.value1 }}</template>
+ </template>
+ </el-table-column>
+ <el-table-column prop="label2" label="基本信息" width="150">
+ <template #default="{ row }">
+ <!-- 添加必填星号的标签 -->
- <template v-if="currentDetail.status === 4">
- <div class="media-title">工单处理图片</div>
+ <span
+ v-if="currentDetail.status === 0 && row.label2 === '工单内容'"
+ class="required-label"
+ >
+ <span class="required-star">*</span>{{ row.label2 }}
+ </span>
+ <span v-else>{{ row.label2 }}</span>
+ </template>
+ </el-table-column>
+ <el-table-column>
+ <template #default="{ row }">
+ <!-- 修改工单类型和工单内容的显示 -->
+
+ <template
+ v-if="
+ currentDetail.status === 0 &&
+ row.label2 === '工单内容' &&
+ hasProcessingBtnPermission()
+ "
+ >
+ <el-input
+ type="textarea"
+ v-model="currentDetail.content"
+ placeholder="请输入工单内容"
+ class="required-input"
+ />
+ </template>
+ <template v-else>{{ row.value2 }}</template>
+ </template>
+ </el-table-column>
+ </el-table>
+
+ <!-- 事件处理详情 -->
+ <div v-if="[3, 4].includes(currentDetail.status)" class="form-section">
+ <div class="section-title">
+ <!-- 处理中状态显示必填星号 -->
+ <template v-if="currentDetail.status === 3">
+ <span class="required-label">
+ <span class="required-star">*</span>事件处理详情
+ </span>
+ </template>
+ <template v-else> 事件处理详情 </template>
+ </div>
+ <!-- 处理中状态显示输入框 -->
+ <template v-if="currentDetail.status === 3 && hasProcessedAndOverBtnPermission()">
+ <el-input
+ type="textarea"
+ v-model="currentDetail.processingDetail"
+ placeholder="请输入事件处理详情"
+ :rows="4"
+ style="width: 100%; margin-bottom: 10px"
+ />
+ </template>
+ <!-- 已完成和已完结状态显示只读文本 -->
+ <template v-else>
+ <div class="readonly-processing-detail">
+ {{ currentDetail.processingDetail }}
+ </div>
+ </template>
+ </div>
+
+ <!-- 上传图片 -->
+ <div v-if="[3].includes(currentDetail.status)" class="form-section uploadImg">
+ <div class="section-title" v-if="hasProcessedAndOverBtnPermission()">
+ <!-- 已完成状态显示必填星号 -->
+ <template v-if="currentDetail.status === 3">
+ <span class="required-label"> <span class="required-star">*</span>上传图片 </span>
+ </template>
+ <template v-else> 上传图片 </template>
+ </div>
+ <el-upload
+ v-if="hasProcessedAndOverBtnPermission()"
+ ref="upload"
+ :action="'#'"
+ :auto-upload="false"
+ list-type="picture-card"
+ :on-change="handleFileChange"
+ :on-remove="handleUploadRemove"
+ :before-upload="beforeUpload"
+ :file-list="currentDetail.photos || []"
+ :limit="1"
+ accept="image/*"
+ class="detail-upload"
+ >
+ <template v-if="!currentDetail.photos || currentDetail.photos.length < 1">
+ <!-- <i class="el-icon-plus">+</i> -->
+ <div class="el-icon-plus">
+ <span>+</span>
+ </div>
+ </template>
+ </el-upload>
+ <div class="el-upload__tip" v-if="hasProcessedAndOverBtnPermission()">
+ (上传照片即可完结工单,只能上传jpg、jpeg、png照片,且不超过5M)
+ </div>
+ </div>
+
+ <!-- 图片和地图部分 -->
+ <div class="media-section">
+ <el-row :gutter="20">
+ <el-col :span="12">
+ <div class="media-box">
+ <div class="media-title">事件图片</div>
<div class="media-content">
<el-image
- v-if="currentDetail.updatePhotoUrl"
- :src="getThumbUrl(currentDetail.updatePhotoUrl)"
- :preview-src-list="[getPreviewUrl(currentDetail.updatePhotoUrl)]"
- fit="fill"
+ v-if="currentDetail.mediaUrl"
+ :src="getThumbUrl(currentDetail.mediaUrl)"
+ :preview-src-list="[getPreviewUrl(currentDetail.mediaUrl)]"
+ fit="contain"
+ style="width: 700px; height: 520px; cursor: pointer"
>
<template #placeholder>
<div class="image-placeholder">
@@ -669,110 +659,145 @@
</div>
</template>
</el-image>
- <div v-else class="no-media">暂无处理图片</div>
+ <div v-else class="no-media">暂无图片/视频</div>
</div>
- </template>
- <template v-else>
- <div class="media-title">地图标记事件点
- <el-popover v-if="currentDetail.status === 3 || currentDetail.status === 0"
- popper-class="custom-qrcode-popover"
- :width="120"
- :visible="currentDetail.showQR && detailVisible"
- placement="top"
- title=""
- trigger="click"
+ </div>
+ </el-col>
+ <el-col :span="12">
+ <div class="media-box">
+ <!-- 根据状态显示不同的标题和内容 -->
- >
- <template #reference>
- <img @click.stop="handleQRCode(currentDetail)" class="QRCodeImg" src="@/assets/images/dataCenter/qrCode.svg" alt="" title="事件导航" />
- </template>
- <div class="qrcode-content">
- <CreateQRcode v-if="currentDetail.showQR && detailVisible" :latAndLon="currentDetail.location"></CreateQRcode>
- </div>
- </el-popover>
- </div>
- <div class="media-content">
- <map-container v-if="detailVisible" ref="MapContainer"></map-container>
- </div>
- </template>
- </div>
- </el-col>
-
-
- </el-row>
+ <template v-if="currentDetail.status === 4">
+ <div class="media-title">工单处理图片</div>
+ <div class="media-content">
+ <el-image
+ v-if="currentDetail.updatePhotoUrl"
+ :src="getThumbUrl(currentDetail.updatePhotoUrl)"
+ :preview-src-list="[getPreviewUrl(currentDetail.updatePhotoUrl)]"
+ fit="fill"
+ >
+ <template #placeholder>
+ <div class="image-placeholder">
+ <i class="el-icon-picture-outline"></i>
+ <span>加载中...</span>
+ </div>
+ </template>
+ <template #error>
+ <div class="image-error">
+ <i class="el-icon-picture-outline"></i>
+ <span>加载失败</span>
+ </div>
+ </template>
+ </el-image>
+ <div v-else class="no-media">暂无处理图片</div>
+ </div>
+ </template>
+ <template v-else>
+ <div class="media-title">
+ 地图标记事件点
+ <el-popover
+ v-if="currentDetail.status === 3 || currentDetail.status === 0"
+ popper-class="custom-qrcode-popover"
+ :width="120"
+ :visible="currentDetail.showQR && detailVisible"
+ placement="top"
+ title=""
+ trigger="hover"
+ >
+ <template #reference>
+ <img
+ @mouseenter="currentDetail.showQR = true"
+ @mouseleave="currentDetail.showQR = false"
+ class="QRCodeImg"
+ src="@/assets/images/dataCenter/qrCode.svg"
+ alt=""
+ title="事件导航"
+ />
+ </template>
+ <div class="qrcode-content">
+ <CreateQRcode
+ v-if="currentDetail.showQR && detailVisible"
+ :latAndLon="currentDetail.location"
+ ></CreateQRcode>
+ </div>
+ </el-popover>
+ </div>
+ <div class="media-content">
+ <map-container v-if="detailVisible" ref="MapContainer"></map-container>
+ </div>
+ </template>
+ </div>
+ </el-col>
+ </el-row>
+ </div>
</div>
- </div>
<!-- 操作按钮 -->
<div class="dialog-footer1">
- <div
- class="leftBtn"
- :class="currentIndex === 0 ? 'disableds' : ''"
- @click="leftClick"
+ <div class="leftBtn" :class="currentIndex === 0 ? 'disableds' : ''" @click="leftClick">
+ 上一页
+ </div>
+ <div class="btngroups">
+ <template v-if="currentDetail.status === 2">
+ <!-- 待审核 -->
+ <el-button
+ v-if="hasReviewBtnPermission()"
+ type="primary"
+ :loading="approveLoading"
+ @click="approveTicket"
+ >通过</el-button
>
- 上一页
- </div>
- <div class="btngroups">
- <template v-if="currentDetail.status === 2">
- <!-- 待审核 -->
- <el-button
- v-if="hasReviewBtnPermission()"
- type="primary"
- :loading="approveLoading"
- @click="approveTicket"
- >通过</el-button
- >
- <el-button
- v-if="hasReviewBtnPermission()"
- type="danger"
- :loading="rejectLoading"
- @click="rejectTicket"
- >不通过</el-button
- >
- <el-button @click="detailVisible = false">取消</el-button>
- </template>
- <template v-else-if="currentDetail.status === 0">
- <el-button
- v-if="hasProcessingBtnPermission()"
- type="primary"
- :loading="dispatchLoading"
- @click="approveAndDispatch"
- >受理</el-button
- >
- <el-button
- v-if="hasProcessingBtnPermission()"
- type="danger"
- :loading="rejectLoading"
- @click="rejectTicket"
- >不受理</el-button
- >
- <el-button @click="detailVisible = false">取消</el-button>
- </template>
- <template v-if="currentDetail.status === 3">
- <!-- 处理中 -->
- <el-button
- v-if="hasProcessedAndOverBtnPermission()"
- type="primary"
- :loading="completeLoading"
- @click="completeTicket"
- >完成工单</el-button
- >
- <el-button @click="detailVisible = false">取消</el-button>
- </template>
- <template v-else-if="currentDetail.status === 4">
- <!-- 已完成 -->
- <!-- <el-button v-if="hasProcessedAndOverBtnPermission()" type="primary" :loading="finalizeLoading"
+ <el-button
+ v-if="hasReviewBtnPermission()"
+ type="danger"
+ :loading="rejectLoading"
+ @click="rejectTicket"
+ >不通过</el-button
+ >
+ <el-button @click="detailVisible = false">取消</el-button>
+ </template>
+ <template v-else-if="currentDetail.status === 0">
+ <el-button
+ v-if="hasProcessingBtnPermission()"
+ type="primary"
+ :loading="dispatchLoading"
+ @click="approveAndDispatch"
+ >受理</el-button
+ >
+ <el-button
+ v-if="hasProcessingBtnPermission()"
+ type="danger"
+ :loading="rejectLoading"
+ @click="rejectTicket"
+ >不受理</el-button
+ >
+ <el-button @click="detailVisible = false">取消</el-button>
+ </template>
+ <template v-if="currentDetail.status === 3">
+ <!-- 处理中 -->
+ <el-button
+ v-if="hasProcessedAndOverBtnPermission()"
+ type="primary"
+ :loading="completeLoading"
+ @click="completeTicket"
+ >完成工单</el-button
+ >
+ <el-button @click="detailVisible = false">取消</el-button>
+ </template>
+ <template v-else-if="currentDetail.status === 4">
+ <!-- 已完成 -->
+ <!-- <el-button v-if="hasProcessedAndOverBtnPermission()" type="primary" :loading="finalizeLoading"
@click="finalizeTicket">完结工单</el-button> -->
- <el-button @click="detailVisible = false">取消</el-button>
- </template>
- </div>
- <div
- :class="currentIndex === tableData.length - 1 ? 'disableds' : ''"
- class="leftBtn"
- @click="rightClick"
- >
- 下一页
- </div>
+ <el-button @click="detailVisible = false">取消</el-button>
+ </template>
+ </div>
+ <div
+ :class="currentIndex === tableData.length - 1 ? 'disableds' : ''"
+ class="leftBtn"
+ @click="rightClick"
+ >
+ 下一页
+ </div>
</div>
</div>
</el-dialog>
@@ -787,7 +812,6 @@
<el-form :model="dispatchForm" :rules="dispatchRules" ref="dispatchForm" label-width="100px">
<el-form-item label="选择部门" prop="department">
<el-select
-
v-model="dispatchForm.department"
placeholder="请选择部门"
@change="handleDispatchDepartmentChange"
@@ -802,7 +826,7 @@
</el-form-item>
<el-form-item label="选择处理人" prop="handler">
<el-select
- filterable
+ filterable
v-model="dispatchForm.handler"
placeholder="请选择处理人"
:disabled="!dispatchForm.department"
@@ -933,23 +957,23 @@
getStepInfo,
getReviewById,
getCreateEventJob,
-} from '@/api/tickets/ticket'
-import { getSFDictionaryTree } from '@/api/job/task';
-import { export_json_to_excel } from '@/utils/exportExcel'
-import geoJson from '@/assets/geoJson.json'
-import { mapGetters } from 'vuex'
-import { getAdcodeObj } from '@/utils/disposeData'
-import elTooltipCopy from '@/components/ElTooltipCopy.vue'
-import getBaseConfig from '@/buildConfig/config'
-import CreateQRcode from '@/components/CreateQRcode/CreateQRcode.vue'
-const { envName } = getBaseConfig()
-function regExp (label, name) {
- var reg = new RegExp(label + '=([^&]*)(&|$)', 'g')
- return name.match(reg)[0].split('=')[1]
+} from '@/api/tickets/ticket';
+import { getSFDictionaryTree } from '@/api/job/task';
+import { export_json_to_excel } from '@/utils/exportExcel';
+import geoJson from '@/assets/geoJson.json';
+import { mapGetters } from 'vuex';
+import { getAdcodeObj } from '@/utils/disposeData';
+import elTooltipCopy from '@/components/ElTooltipCopy.vue';
+import getBaseConfig from '@/buildConfig/config';
+import CreateQRcode from '@/components/CreateQRcode/CreateQRcode.vue';
+const { envName } = getBaseConfig();
+function regExp(label, name) {
+ var reg = new RegExp(label + '=([^&]*)(&|$)', 'g');
+ return name.match(reg)[0].split('=')[1];
}
export default {
- components: { elTooltipCopy,CreateQRcode },
+ components: { elTooltipCopy, CreateQRcode },
name: 'TicketPage',
data() {
return {
@@ -1005,7 +1029,7 @@
tableData: [],
option: {
border: true,
- stripe: true,
+ stripe: false,
selection: true, // 添加多选功能
index: true, // 保留序号功能
indexLabel: '序号',
@@ -1049,7 +1073,7 @@
{ label: '处理人', prop: 'handler', width: 70 },
{
slot: true,
- hide: envName === 'jiangwu'? true : false,
+ hide: envName === 'jiangwu' ? true : false,
label: '复核状态',
prop: 'isReview',
width: 90,
@@ -1167,8 +1191,7 @@
},
mounted() {
-
- this.getAlgorithmList()
+ this.getAlgorithmList();
const href = this.$route.href;
if (this.$route?.query?.status !== undefined && this.$route?.query?.status !== null) {
@@ -1215,10 +1238,9 @@
this.filters.keyword = orderNumber;
this.$nextTick(() => {
this.isShowInfo = true;
- const find = this.$store.state.tags.bsTagList.find(i => i.path === '/tickets/ticket')
- find && (find.query = {})
+ const find = this.$store.state.tags.bsTagList.find(i => i.path === '/tickets/ticket');
+ find && (find.query = {});
});
-
}
}
@@ -1340,12 +1362,12 @@
{ label: '任务发起人', value: this.currentDetail.creator },
{ label: '当前状态', value: this.mapStatus(this.currentDetail.status) },
{ label: '事件地址', value: this.currentDetail.address || this.currentDetail.latAndLon }, // 包含经纬度信息
- { label: '关联算法',
- value:
+ {
+ label: '关联算法',
+ value:
this.algorithms.find(t => t.value === this.currentDetail.aiType)?.label ||
this.currentDetail.aiType ||
'/',
-
},
{ label: '发起单位', value: this.currentDetail.department },
{ label: '发起任务时间', value: this.currentDetail.startTime },
@@ -1366,7 +1388,6 @@
}
return formattedFields;
-
},
dynamicFixedStatuses() {
// 直接使用接口返回的 stepInfos
@@ -1439,47 +1460,47 @@
methods: {
handleCheck(data, { checkedKeys, checkedNodes }) {
- this.checkedKeys = checkedKeys
+ this.checkedKeys = checkedKeys;
// 获取所有选中节点的 dictKey
- const selectedDictKeys = checkedNodes.map(node => node.dictKey).filter(Boolean)
- this.filters.type = selectedDictKeys
+ const selectedDictKeys = checkedNodes.map(node => node.dictKey).filter(Boolean);
+ this.filters.type = selectedDictKeys;
this.fetchTableData();
},
// 算法
getAlgorithmList() {
- getSFDictionaryTree({code:'SF'}).then((res) => {
- if (res.data.code === 200) {
- const result = res.data.data[0].children
- // 过滤第一层数据
- const filteredData = result.map(item => {
- // 过滤第二层数据
- const children = item.children?.map(child => ({
- ...child,
- children: [] // 清空第三层数据
- }))
- return {
- ...item,
- children: children || []
- }
- })
- this.dataList = filteredData
- }
- })
+ getSFDictionaryTree({ code: 'SF' }).then(res => {
+ if (res.data.code === 200) {
+ const result = res.data.data[0].children;
+ // 过滤第一层数据
+ const filteredData = result.map(item => {
+ // 过滤第二层数据
+ const children = item.children?.map(child => ({
+ ...child,
+ children: [], // 清空第三层数据
+ }));
+ return {
+ ...item,
+ children: children || [],
+ };
+ });
+ this.dataList = filteredData;
+ }
+ });
},
handleSFNodeClick(data) {
- console.log(data.dictKey, '666666666')
- this.filters.type = ''
- this.filters.algorithm = ''
- this.filters.type = data.dictKey
+ console.log(data.dictKey, '666666666');
+ this.filters.type = '';
+ this.filters.algorithm = '';
+ this.filters.type = data.dictKey;
// 更新列表请求
this.fetchTableData();
},
handleClear() {
- this.dictKey = ''
- this.filters.algorithm = ''
- this.filters.type = ''
- this.fetchTableData();
+ this.dictKey = '';
+ this.filters.algorithm = '';
+ this.filters.type = '';
+ this.fetchTableData();
},
handleCellClick(row, column) {
console.log(row, column.no);
@@ -1517,7 +1538,6 @@
this.currentDetail.processingDetail = this.currentDetail.content;
this.handleViewDetail(this.currentDetail);
-
// 如果使用地图组件,需要更新地图标记
this.$nextTick(() => {
if (this.$refs.MapContainer && this.currentDetail.location) {
@@ -1525,8 +1545,8 @@
}
});
},
- async handleQRCode (val){
- val.showQR = !val.showQR
+ async handleQRCode(val) {
+ val.showQR = !val.showQR;
},
async loadAMapScripts() {
try {
@@ -1534,7 +1554,7 @@
const subAreaCode = areaCode ? areaCode.substring(0, 6) : '';
const adcodeObj = getAdcodeObj(geoJson, 'adcode', subAreaCode);
- // console.log('区域代码:', subAreaCode);
+ // console.log('区域代码:', subAreaCode);
// 直接从返回对象中获取正确的路径
const center = adcodeObj?.payload?.objects?.collection?.geometries?.[0]?.properties?.center;
@@ -1621,7 +1641,7 @@
try {
const response = await getTicketInfo();
- const { dept_data, event_type, ai_type,info } = response.data.data;
+ const { dept_data, event_type, ai_type, info } = response.data.data;
this.departments = dept_data.map(item => ({
label: item.dept_name,
@@ -1640,10 +1660,10 @@
const columnType = this.findObject(this.option.column, 'type');
columnType.dicData = this.types;
- this.allAlgorithms = info
+ this.allAlgorithms = info;
- console.log('工单类型',this.types);
- console.log('关联算法',this.allAlgorithms );
+ console.log('工单类型', this.types);
+ console.log('关联算法', this.allAlgorithms);
// 确保算法数据的映射一致
this.algorithms =
ai_type?.map(item => ({
@@ -1654,7 +1674,7 @@
value: item.dict_key,
})) || [];
- this.algorithms2 = _.cloneDeep(this.algorithms)
+ this.algorithms2 = _.cloneDeep(this.algorithms);
// 构建用户ID和名称的映射关系
this.userNameToIdMap = {};
@@ -1669,18 +1689,20 @@
},
// 工单类型变化时触发
handleTypeChange(typeValue) {
- this.form.algorithm = []
+ this.form.algorithm = [];
if (!typeValue) {
// 未选择类型时清空算法列表
this.algorithms2 = [];
return;
}
- const matchedCategory = this.allAlgorithms.find(
- category => category.dict_key === typeValue
- );
+ const matchedCategory = this.allAlgorithms.find(category => category.dict_key === typeValue);
- if (!matchedCategory || !matchedCategory.algorithms || matchedCategory.algorithms.length === 0) {
+ if (
+ !matchedCategory ||
+ !matchedCategory.algorithms ||
+ matchedCategory.algorithms.length === 0
+ ) {
// 无匹配的算法时清空
this.algorithms2 = [];
this.$message.info('该工单类型暂无关联算法');
@@ -1690,9 +1712,8 @@
label: algo.dict_value,
value: algo.dict_key,
dict_key: algo.dict_key,
- dict_value: algo.dict_value
+ dict_value: algo.dict_value,
}));
-
},
async fetchTableData() {
@@ -1947,10 +1968,10 @@
this.draftLoading = false;
}
},
- handleCancel (){
+ handleCancel() {
this.resetForm();
- this.dialogVisible = false;
-},
+ this.dialogVisible = false;
+ },
handleLocationChange(val) {
let locationValue = val.value;
if (locationValue && locationValue.length >= 2) {
@@ -2050,11 +2071,11 @@
isReview: '', // 重置时清空复核状态
};
this.page.currentPage = 1;
- this.$router.replace({}); //清除url参数
+ this.$router.replace({}); //清除url参数
this.fetchTableData();
},
- handleKeyWords(){
- this.$router.replace({}); //清除url参数
+ handleKeyWords() {
+ this.$router.replace({}); //清除url参数
},
async handleCurrentChange(val) {
@@ -2176,8 +2197,8 @@
console.log('this.currentDetail', this.currentDetail);
this.detailVisible = true;
- this.handleTypeChange(this.currentDetail.type)
- console.log('this.currentDetail.location',this.currentDetail.location);
+ this.handleTypeChange(this.currentDetail.type);
+ console.log('this.currentDetail.location', this.currentDetail.location);
this.$nextTick(() => {
if (this.$refs.MapContainer && this.$refs.MapContainer.initAddEntity) {
@@ -2482,8 +2503,7 @@
// 通过验证后,打开派发对话框
this.dispatchDialogVisible = true;
- console.log('受理',this.currentDetail);
-
+ console.log('受理', this.currentDetail);
},
hasProcessingBtnPermission() {
// undefined 或 false 都返回 false,只有 true 返回 true
@@ -2523,7 +2543,7 @@
return;
}
this.dispatchLoading = true;
- console.log('派发成功',this.currentDetail);
+ console.log('派发成功', this.currentDetail);
this.$refs.dispatchForm.validate(async valid => {
if (valid) {
@@ -2538,9 +2558,9 @@
content: this.currentDetail.content, // 使用 content 替代原来的 remark
createDept: this.dispatchForm.department, // 派发部门 ID
updateUser: this.dispatchForm.handler, // 处理人 ID
- aiType:this.currentDetail.aiType
+ aiType: this.currentDetail.aiType,
};
- console.log('派发',data);
+ console.log('派发', data);
const file = this.currentDetail.file || null; // 如果没有文件,则为 null
@@ -3080,17 +3100,17 @@
activated() {
this.handleReset();
},
-
};
</script>
<style lang="scss">
-.custom-dialog { max-height: 96vh; }
+.custom-dialog {
+ max-height: 96vh;
+}
.custom-qrcode-popover {
-min-width: 120px !important;
+ min-width: 120px !important;
}
</style>
<style lang="scss" scoped>
-
::v-deep(.el-tabs) {
height: 100%;
display: flex;
@@ -3313,22 +3333,22 @@
}
.dialog-footer1 {
position: sticky;
- bottom: 28px;
- left: 0;
- right: 0;
- background: white;
- z-index: 10;
- padding: 16px 20px;
- border-top: 1px solid #ebeef5;
- display: flex;
- justify-content: space-between;
- align-items: center;
+ bottom: 28px;
+ left: 0;
+ right: 0;
+ background: white;
+ z-index: 10;
+ padding: 16px 20px;
+ border-top: 1px solid #ebeef5;
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
.el-button + .el-button {
margin-left: 12px;
}
-.btngroups {
-margin-left: 12px;
-}
+ .btngroups {
+ margin-left: 12px;
+ }
.el-button {
padding: 9px 20px;
@@ -3412,7 +3432,7 @@
}
.detail-container {
- padding:0 20px;
+ padding: 0 20px;
.detail-top-title {
display: flex;
@@ -3504,11 +3524,10 @@
background-color: #999;
border-radius: 5px;
text-align: center;
-line-height: 32px;
+ line-height: 32px;
color: #fff;
cursor: pointer;
opacity: 0.8;
-
}
.disableds {
@@ -3517,10 +3536,10 @@
pointer-events: none;
opacity: 0.3 !important;
}
-.PopUpTableScrolls{
-height: 600px;
-overflow-y: scroll;
-overflow-x: hidden;
+.PopUpTableScrolls {
+ height: 600px;
+ overflow-y: scroll;
+ overflow-x: hidden;
}
.media-box {
width: 100%;
@@ -3535,11 +3554,11 @@
margin-bottom: 5px;
display: flex;
align-items: center;
- .QRCodeImg{
- width: 18px;
- height: 18px;
- cursor: pointer;
- padding-bottom: 1px;
+ .QRCodeImg {
+ width: 18px;
+ height: 18px;
+ cursor: pointer;
+ padding-bottom: 1px;
}
}
@@ -3613,7 +3632,7 @@
line-height: 1.5;
display: block;
text-align: left;
-margin-bottom: 5px;
+ margin-bottom: 5px;
&:first-child {
font-weight: bold;
margin-bottom: 4px;
--
Gitblit v1.9.3