From 2ca94de8ede18ac07ccfd8dec7b6f6a707adde9b Mon Sep 17 00:00:00 2001
From: 张含笑 <zhx18749296735@163.com>
Date: Mon, 01 Sep 2025 11:20:24 +0800
Subject: [PATCH] Merge branch 'refs/heads/feature/v5.0/5.0.5' into patch_management
---
src/views/tickets/ticket.vue | 2238 ++++++++++++++++++++++++++++++++++++++++++---------------
1 files changed, 1,631 insertions(+), 607 deletions(-)
diff --git a/src/views/tickets/ticket.vue b/src/views/tickets/ticket.vue
index c3934b7..486563c 100644
--- a/src/views/tickets/ticket.vue
+++ b/src/views/tickets/ticket.vue
@@ -1,68 +1,243 @@
<template>
<basic-container>
<el-tabs v-model="activeTab" @tab-click="handleTabChange">
- <el-tab-pane v-for="tab in filteredTabs" :key="tab.name" :label="`${tab.label} (${tab.count})`" :name="tab.name">
- <div class="tab-content">
+ <el-tab-pane
+ v-for="tab in filteredTabs"
+ :key="tab.name"
+ :label="`${tab.label} (${tab.count})`"
+ :name="tab.name"
+ >
+ <basic-main-content>
<!-- 查询条件筛选栏 -->
<div class="filter-bar">
- <el-input v-model="filters.keyword" placeholder="请输入关键字" class="filter-item" size="small" clearable
- @keyup.enter="handleSearch" />
- <el-select v-model="filters.department" placeholder="请选择所属单位" class="filter-item" size="small" clearable>
- <el-option v-for="item in departments" :key="item.value" :label="item.label" :value="item.value" />
- </el-select>
- <el-select v-model="filters.type" placeholder="请选择工单类型" class="filter-item" size="small" clearable>
- <el-option v-for="item in types" :key="item.value" :label="item.label" :value="item.value" />
- </el-select>
- <el-date-picker v-model="filters.dateRange" type="daterange" class="filter-item" size="small"
- range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期">
+ <el-input
+ v-model="filters.keyword"
+ placeholder="请输入关键字"
+ class="filter-item"
+ clearable
+ @clear="handleKeyWords"
+ @keyup.enter="handleSearch"
+ />
+ <!-- <el-select
+ v-model="filters.department"
+ placeholder="请选择所属单位"
+ class="filter-item"
+ clearable
+ >
+ <el-option
+ v-for="item in departments"
+ :key="item.value"
+ :label="item.label"
+ :value="item.value"
+ />
+ </el-select> -->
+ <!-- <el-select
+ v-model="filters.type"
+ placeholder="请选择工单类型"
+ class="filter-item"
+ clearable
+ @change="handleSearch"
+ >
+ <el-option
+ v-for="item in types"
+ :key="item.value"
+ :label="item.label"
+ :value="item.value"
+ />
+ </el-select> -->
+ <el-date-picker
+ v-model="filters.dateRange"
+ type="daterange"
+ class="filter-item"
+ range-separator="至"
+ start-placeholder="开始日期"
+ end-placeholder="结束日期"
+ :default-value="datePickerDefaultVal"
+ >
</el-date-picker>
- <el-select v-model="filters.status" placeholder="请选择状态" class="filter-item" size="small" clearable>
- <el-option v-for="item in statuses" :key="item.value" :label="item.label" :value="item.value" />
+ <el-select
+ v-model="filters.status"
+ placeholder="请选择状态"
+ class="filter-item"
+ clearable
+ @change="handleSearch"
+ >
+ <el-option
+ v-for="item in statuses"
+ :key="item.value"
+ :label="item.label"
+ :value="item.value"
+ />
</el-select>
- <el-select v-model="filters.algorithm" placeholder="请选择关联算法" class="filter-item" size="small" clearable>
- <el-option v-for="item in algorithms" :key="item.dict_key" :label="item.dict_value"
- :value="item.dict_key" />
+ <!-- <el-select
+ v-model="filters.algorithm"
+ placeholder="请选择关联算法"
+ class="filter-item"
+ clearable
+ @change="handleSearch"
+ >
+ <el-option
+ v-for="item in algorithms"
+ :key="item.dict_key"
+ :label="item.dict_value"
+ :value="item.dict_key"
+ />
+ </el-select> -->
+ <!-- <el-tree-select
+ popper-class="custom-tree-select"
+ :style="{ width: pxToRem(186) }"
+ placeholder="请选择关联算法"
+ v-model="dictKey"
+ :data="dataList"
+ :default-expanded-keys="[dictKey]"
+ check-strictly
+ node-key="id"
+ :props="treePropsSF"
+ @node-click="handleSFNodeClick"
+ clearable
+ @clear="handleClear"
+ /> -->
+ <el-tree-select
+ style="z-index: 1000"
+ :teleported="false"
+ class="custom-tree-select"
+ :style="{ width: pxToRem(186) }"
+ v-model="dictKey"
+ :data="dataList"
+ :default-expanded-keys="[dictKey]"
+ :props="treePropsSF"
+ :render-after-expand="false"
+ :default-checked-keys="checkedKeys"
+ node-key="id"
+ multiple
+ show-checkbox
+ collapse-tags
+ collapse-tags-tooltip
+ clearable
+ @check="handleCheck"
+ @node-click="handleSFNodeClick"
+ @clear="handleClear"
+ />
+ <el-select
+ v-model="filters.isReview"
+ placeholder="请选择复核状态"
+ class="filter-item"
+ clearable
+ @change="handleSearch"
+ >
+ <el-option
+ v-for="item in reviewStatuses"
+ :key="item.value"
+ :label="item.label"
+ :value="item.value"
+ />
</el-select>
- <el-button type="primary" icon="el-icon-search" size="small" @click="handleSearch">查询</el-button>
- <el-button icon="el-icon-refresh" size="small" @click="handleReset">重置</el-button>
+ <el-button type="primary" icon="el-icon-search" @click="handleSearch">搜索</el-button>
+ <el-button icon="el-icon-refresh" @click="handleReset">清空</el-button>
</div>
<!-- 表格部分 -->
- <avue-crud ref="avueCrud" v-model="tableData" :option="option" :data="tableData" v-model:page="page"
- @size-change="sizeChange" @current-change="handleCurrentChange" :table-loading="loading"
- @selection-change="handleSelectionChange" :permission="permissionList">
+ <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 }}
+ </el-tooltip-copy>
+ </template>
+ <template #orderName="{ row }">
+ <el-tooltip-copy :content="row.orderName" :showCopyText="true" textAlign="left">
+ {{ row.orderName }}
+ </el-tooltip-copy>
+ </template>
<template #menu-left>
- <el-button v-if="(activeTab === 'all' || activeTab === 'myTickets') && permissionList.addBtn"
- type="primary" icon="el-icon-plus" @click="handleAdd">新建工单</el-button>
- <el-button v-if="activeTab === 'pending' && permissionList.reviewBtn" type="success" icon="el-icon-check"
- @click="openReviewDialog">批量审核</el-button>
- <el-button v-if="permissionList.exportBtn" type="success" plain icon="el-icon-download"
- @click="exportData">导出</el-button>
+ <el-button
+ v-if="(activeTab === 'all' || activeTab === 'myTickets') && permissionList.addBtn"
+ type="primary"
+ icon="el-icon-plus"
+ @click="handleAdd"
+ >新建工单</el-button
+ >
+ <el-button
+ v-if="activeTab === 'pending' && permissionList.reviewBtn"
+ type="success"
+ icon="el-icon-check"
+ @click="openReviewDialog"
+ >批量审核</el-button
+ >
+ <el-button
+ v-if="permissionList.exportBtn"
+ type="success"
+ plain
+ icon="el-icon-download"
+ @click="exportData"
+ >导出</el-button
+ >
</template>
<template #menu="{ row }">
<template v-if="row.status === -1">
<el-button type="text" icon="el-icon-edit" @click="handleEdit(row)">编辑</el-button>
- <el-button type="text" icon="el-icon-delete" class="danger-button"
- @click="handleDelete(row)">删除</el-button>
+ <el-button
+ type="text"
+ icon="el-icon-delete"
+ class="danger-button"
+ @click="handleDelete(row)"
+ >删除</el-button
+ >
</template>
+
<template v-else>
- <el-button type="text" icon="el-icon-view" @click="handleViewDetail(row)">详情</el-button>
+ <el-button type="text" icon="el-icon-view" @click="handleViewDetail(row)"
+ >详情</el-button
+ >
+ </template>
+
+ <template v-if="permission.tickets_repeat_review">
+ <el-button
+ v-if="row.status === 4 && row.isReview !== 1"
+ type="text"
+ icon="el-icon-check"
+ @click="reCheck(row)"
+ >复核</el-button
+ >
</template>
</template>
<template #status="{ row }">
- <el-tag :type="getStatusTagType(row.status)">{{ mapStatus(row.status) }}</el-tag>
+ <span
+ :style="getStatusTagType(row.status) ? 'color:' + getStatusTagType(row.status) : ''"
+ >
+ {{ mapStatus(row.status) }}
+ </span>
</template>
<template #keyData="{ row }">
<span>{{ row.address }}</span>
</template>
+
+ <template #isReview="{ row }">
+ <span>{{ showIsReviewText(row) }}</span>
+ </template>
</avue-crud>
- </div>
+ </basic-main-content>
</el-tab-pane>
</el-tabs>
<!-- 新建工单对话框 -->
- <el-dialog v-model="dialogVisible" title="新建工单" width="70%" :close-on-click-modal="false" @close="resetForm">
- <el-form :model="form" :rules="rules" ref="form" label-width="90px" class="create-ticket-form">
+ <el-dialog
+ v-model="dialogVisible"
+ v-if="dialogVisible"
+ title="新建工单"
+ width="70%"
+ :close-on-click-modal="false"
+ @close="resetForm"
+ >
+ <el-form
+ :model="form"
+ :rules="rules"
+ ref="form"
+ label-width="90px"
+ class="create-ticket-form"
+ >
<div class="form-section">
<el-row :gutter="16">
<el-col :span="12">
@@ -72,8 +247,14 @@
</el-col>
<el-col :span="12">
<el-form-item label="工单类型" prop="type">
- <el-select v-model="form.type" placeholder="请选择工单类型" class="full-width">
- <el-option v-for="item in types" :key="item.value" :label="item.label" :value="item.value" />
+
+ <el-select @change="handleTypeChange" v-model="form.type" placeholder="请选择工单类型" class="full-width" >
+ <el-option
+ v-for="item in types"
+ :key="item.value"
+ :label="item.label"
+ :value="item.value"
+ />
</el-select>
</el-form-item>
</el-col>
@@ -82,17 +263,35 @@
<el-row :gutter="16">
<el-col :span="12">
<el-form-item label="所属部门" prop="department">
- <el-select v-model="form.department" placeholder="请选择所属部门" @change="handleDepartmentChange"
- class="full-width">
- <el-option v-for="dept in departments" :key="dept.value" :label="dept.label" :value="dept.value" />
+ <el-select
+ v-model="form.department"
+ placeholder="请选择所属部门"
+ @change="handleDepartmentChange"
+ class="full-width"
+ >
+ <el-option
+ v-for="dept in departments"
+ :key="dept.value"
+ :label="dept.label"
+ :value="dept.value"
+ />
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="处理人员" prop="handler">
- <el-select v-model="form.handler" placeholder="请先选择所属部门" :disabled="!form.department"
- class="full-width">
- <el-option v-for="user in availableHandlers" :key="user.id" :label="user.name" :value="user.id" />
+ <el-select
+ v-model="form.handler"
+ placeholder="请先选择所属部门"
+ :disabled="!form.department"
+ class="full-width"
+ >
+ <el-option
+ v-for="user in availableHandlers"
+ :key="user.id"
+ :label="user.name"
+ :value="user.id"
+ />
</el-select>
</el-form-item>
</el-col>
@@ -101,23 +300,39 @@
<el-row :gutter="16">
<el-col :span="12">
<el-form-item label="关联算法" prop="algorithm">
- <el-select v-model="form.algorithm" multiple placeholder="请选择关联算法" class="full-width">
- <el-option v-for="item in algorithms" :key="item.value" :label="item.label" :value="item.value" />
+ <el-select
+ v-model="form.algorithm"
+ multiple
+ placeholder="请选择关联算法"
+ class="full-width"
+ :disabled="!form.type"
+ >
+ <el-option
+ v-for="item in algorithms2"
+ :key="item.value"
+ :label="item.label"
+ :value="item.value"
+ />
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
- <el-form-item label="选择位置" prop="location" required>
+ <el-form-item label="选择位置" prop="location">
<div class="location-wrapper">
- <avue-input-map v-model="form.location" :params="mapParams" @change="handleLocationChange"
- type="button">
+ <avue-input-map
+ v-model="form.location"
+ :clearable="false"
+ :params="mapParams"
+ @change="handleLocationChange"
+ type="button"
+ >
<el-button type="primary" plain class="map-button">
<i class="el-icon-map-location"></i> 地图选点
</el-button>
</avue-input-map>
<!-- <div v-if="form.location?.length >= 3">
- {{ form.location[2] || '获取地址中...' }}
-</div> -->
+ {{ form.location[2] || '获取地址中...' }}
+ </div> -->
</div>
</el-form-item>
</el-col>
@@ -126,24 +341,55 @@
<el-row :gutter="16">
<el-col :span="12">
<el-form-item label="工单内容" prop="content">
- <el-input type="textarea" v-model="form.content" :rows="4" placeholder="请输入工单内容描述"></el-input>
+ <el-input
+ type="textarea"
+ v-model="form.content"
+ :rows="4"
+ placeholder="请输入工单内容描述"
+ ></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="附件图片" prop="photos" required class="upload-wrapper">
- <el-upload ref="upload"
- :action="'#'"
- :auto-upload="false"
+ <el-upload
+ v-if="createoredit === 1"
+ ref="upload"
+ :action="'#'"
+ :auto-upload="false"
list-type="picture-card"
- :on-change="handleFileChange"
- :on-remove="handleUploadRemove"
+ :on-change="handleFileChange"
+ :on-remove="handleUploadRemove"
:before-upload="beforeUpload"
- :file-list="form.photos"
- :limit="1"
- accept="image/*"
- class="create-upload">
+ :file-list="form.photos"
+ :limit="1"
+ accept="image/*"
+ class="create-upload"
+ >
<template v-if="form.photos.length < 1">
- <i class="el-icon-plus">+</i>
+ <!-- <i class="el-icon-plus">+</i> -->
+ <div class="el-icon-plus">
+ <span>+</span>
+ </div>
+ </template>
+ </el-upload>
+ <el-upload
+ v-else
+ ref="upload"
+ :action="'#'"
+ :auto-upload="false"
+ list-type="picture-card"
+ :on-change="handleFileChange"
+ :on-remove="handleUploadRemove"
+ :before-upload="beforeUpload"
+ :file-list="popupShowImage(form.photos)"
+ :limit="1"
+ accept="image/*"
+ class="create-upload"
+ >
+ <template v-if="form.photos.length < 1">
+ <div class="el-icon-plus">
+ <span>+</span>
+ </div>
</template>
</el-upload>
<div class="upload-tip">需上传含有地址信息的照片(jpg、jpeg、png),且不超过5M</div>
@@ -154,63 +400,53 @@
</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="dialogVisible = false">取 消</el-button>
+ <el-button type="infoprimary" plain :loading="draftLoading" @click="saveDraft"
+ >存草稿</el-button
+ >
+
+
+ <el-button @click="handleCancel">取 消</el-button>
</div>
</template>
</el-dialog>
<!-- 工单详情对话框 -->
- <el-dialog 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="event-title-center">{{ currentDetail.orderName || '事件名称' }}</div>
- <div v-if="totalTime" class="event-total-time"
- style="text-align:center;color:#666;font-size:15px;margin-bottom:12px;">
- 总耗时:{{ totalTime }}
+ <div class="detail-top-title">
+ <div class="event-title-center event-orderNumber">
+ {{ currentDetail.orderNumber || '工单编号' }}
+ </div>
+ <div class="event-title-center">{{ currentDetail.orderName || '事件名称' }}</div>
</div>
+ <div v-if="totalTime" class="event-total-time">总耗时:{{ totalTime }}</div>
<!-- 工单状态流程 -->
<div class="custom-steps-container">
<!-- 标题行 -->
<div class="steps-titles">
- <div class="step-title active">
- {{ workType === 1 ? '发起工单' : '发起任务' }}
- </div>
- <div v-for="(status, index) in stepStatusList" :key="index" :class="{
- 'step-title': true,
- 'active': index <= stepStatusList.indexOf(String(currentDetail.status))
- }">
+ <div
+ v-for="(status, index) in stepStatusList"
+ :key="index"
+ :class="{
+ 'step-title': true,
+ active: index <= stepStatusList.indexOf(String(currentDetail.status)),
+ }"
+ >
{{ mapStatus(status) }}
</div>
</div>
<!-- Element Steps 组件 -->
- <el-steps :active="getActiveStep()" align-center class="custom-steps">
- <el-step>
- <template #description>
- <span class="step-description">
- {{ currentDetail.creator || '未知' }}
- </span>
- <div class="step-description">
- <template v-if="workType === 0">
- {{ currentDetail.job_create_time || currentDetail.startTime || '未知时间' }}
- </template>
- <template v-else>
- {{ currentDetail.startTime || '未知时间' }}
- </template>
- </div>
- </template>
- </el-step>
+ <el-steps :active="getActiveStep() - 1" align-center class="custom-steps">
<el-step v-for="(status, index) in stepStatusList" :key="index">
<template #description>
<span class="step-description">
{{ getStepHandler(status) }}
</span>
<div class="step-description" v-if="getStepTime(status)">
- <span
- style="position: absolute; right: 80%; top: 50%; transform: translateY(-50%); width: 100px; margin-left: 4px; color: #666; font-size: 12px;">
- 耗时:{{ getStepTime(status) }}
- </span>
+ <span class="step-timer"> 耗时:{{ getStepTime(status) }} </span>
</div>
<div class="step-description">
{{ getStepCreateTime(status) }}
@@ -220,12 +456,16 @@
</el-steps>
</div>
- <!-- 基本信息表格 -->
- <el-table :show-header="false" :data="formattedDetailFields" border style="width: 100%; margin-bottom: 20px;">
+ <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 === '工单名称'" class="required-label">
+ <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>
@@ -233,8 +473,38 @@
</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
+ 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-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>
@@ -242,7 +512,14 @@
<el-table-column prop="label2" label="基本信息" width="150">
<template #default="{ row }">
<!-- 添加必填星号的标签 -->
- <span v-if="currentDetail.status === 0 && (row.label2 === '工单类型' || row.label2 === '工单内容')" class="required-label">
+
+ <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>
@@ -251,13 +528,21 @@
<el-table-column>
<template #default="{ row }">
<!-- 修改工单类型和工单内容的显示 -->
- <template v-if="currentDetail.status === 0 && row.label2 === '工单类型' && hasProcessingBtnPermission()">
- <el-select v-model="currentDetail.type" placeholder="请选择工单类型" class="required-input">
- <el-option v-for="item in types" :key="item.value" :label="item.label" :value="item.value" />
- </el-select>
- </template>
- <template v-else-if="currentDetail.status === 0 && row.label2 === '工单内容' && hasProcessingBtnPermission()">
- <el-input type="textarea" v-model="currentDetail.content" placeholder="请输入工单内容" class="required-input" />
+
+
+ <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>
@@ -265,22 +550,23 @@
</el-table>
<!-- 事件处理详情 -->
- <div v-if="[3, 4, 5].includes(currentDetail.status)" class="form-section">
+ <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>
+ <span class="required-label"> <span class="required-star">*</span>事件处理详情 </span>
</template>
- <template v-else>
- 事件处理详情
- </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;" />
+ <el-input
+ type="textarea"
+ v-model="currentDetail.processingDetail"
+ placeholder="请输入事件处理详情"
+ :rows="4"
+ style="width: 100%; margin-bottom: 10px"
+ />
</template>
<!-- 已完成和已完结状态显示只读文本 -->
<template v-else>
@@ -291,35 +577,36 @@
</div>
<!-- 上传图片 -->
- <div v-if="[3, 4].includes(currentDetail.status)" class="form-section" style="margin-bottom: 32px;">
+ <div v-if="[3].includes(currentDetail.status)" class="form-section uploadImg">
<div class="section-title" v-if="hasProcessedAndOverBtnPermission()">
<!-- 已完成状态显示必填星号 -->
- <template v-if="currentDetail.status === 4">
- <span class="required-label">
- <span class="required-star">*</span>上传图片
- </span>
+ <template v-if="currentDetail.status === 3">
+ <span class="required-label"> <span class="required-star">*</span>上传图片 </span>
</template>
- <template v-else>
- 上传图片
- </template>
+ <template v-else> 上传图片 </template>
</div>
- <el-upload v-if="hasProcessedAndOverBtnPermission()"
- ref="upload"
- :action="'#'"
+ <el-upload
+ v-if="hasProcessedAndOverBtnPermission()"
+ ref="upload"
+ :action="'#'"
:auto-upload="false"
- list-type="picture-card"
- :on-change="handleFileChange"
+ list-type="picture-card"
+ :on-change="handleFileChange"
:on-remove="handleUploadRemove"
- :before-upload="beforeUpload"
- :file-list="currentDetail.photos || []"
+ :before-upload="beforeUpload"
+ :file-list="currentDetail.photos || []"
:limit="1"
accept="image/*"
- class="detail-upload">
+ class="detail-upload"
+ >
<template v-if="!currentDetail.photos || currentDetail.photos.length < 1">
- <i class="el-icon-plus">+</i>
+ <!-- <i class="el-icon-plus">+</i> -->
+ <div class="el-icon-plus">
+ <span>+</span>
+ </div>
</template>
</el-upload>
- <div class="el-upload__tip" style="margin-top: 12px;" v-if="hasProcessedAndOverBtnPermission()">
+ <div class="el-upload__tip" v-if="hasProcessedAndOverBtnPermission()">
(上传照片即可完结工单,只能上传jpg、jpeg、png照片,且不超过5M)
</div>
</div>
@@ -327,13 +614,18 @@
<!-- 图片和地图部分 -->
<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;">
+ <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 #placeholder>
<div class="image-placeholder">
<i class="el-icon-picture-outline"></i>
@@ -354,12 +646,16 @@
<el-col :span="12">
<div class="media-box">
<!-- 根据状态显示不同的标题和内容 -->
- <template v-if="currentDetail.status === 5">
+
+ <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"
- style="width: 700px; height: 520px; cursor: pointer;">
+ <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>
@@ -377,88 +673,189 @@
</div>
</template>
<template v-else>
- <div class="media-title">地图标记事件点</div>
+ <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"
+
+ >
+ <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">
- <div id="map-container" style="width: 700px; height: 520px; background: #f5f5f5;">
- <map-container v-if='detailVisible' ref="MapContainer"></map-container>
- </div>
+ <map-container v-if="detailVisible" ref="MapContainer"></map-container>
</div>
</template>
</div>
</el-col>
+
+
</el-row>
</div>
+ </div>
<!-- 操作按钮 -->
- <div class="dialog-footer">
- <template v-if="currentDetail.status === 2">
+ <div class="dialog-footer1">
+ <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>
- <el-button v-if="hasReviewBtnPermission()" type="danger" :loading="rejectLoading"
- @click="rejectTicket">不通过</el-button>
+ <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
+ 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
+ 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 v-if="hasProcessedAndOverBtnPermission()" type="primary" :loading="finalizeLoading"
+ @click="finalizeTicket">完结工单</el-button> -->
<el-button @click="detailVisible = false">取消</el-button>
</template>
- <template v-else-if="currentDetail.status === 5">
- <!-- 已完结 -->
- <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>
<!-- 派发工单对话框 -->
- <el-dialog v-model="dispatchDialogVisible" title="派发工单" width="40%" :close-on-click-modal="false">
+ <el-dialog
+ v-model="dispatchDialogVisible"
+ title="派发工单"
+ width="40%"
+ :close-on-click-modal="false"
+ >
<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">
- <el-option v-for="dept in departments" :key="dept.value" :label="dept.label" :value="dept.value" />
+ <el-select
+
+ v-model="dispatchForm.department"
+ placeholder="请选择部门"
+ @change="handleDispatchDepartmentChange"
+ >
+ <el-option
+ v-for="dept in departments"
+ :key="dept.value"
+ :label="dept.label"
+ :value="dept.value"
+ />
</el-select>
</el-form-item>
<el-form-item label="选择处理人" prop="handler">
- <el-select v-model="dispatchForm.handler" placeholder="请选择处理人" :disabled="!dispatchForm.department">
- <el-option v-for="user in availableDispatchHandlers" :key="user.id" :label="user.name" :value="user.id" />
+ <el-select
+ filterable
+ v-model="dispatchForm.handler"
+ placeholder="请选择处理人"
+ :disabled="!dispatchForm.department"
+ >
+ <el-option
+ v-for="user in availableDispatchHandlers"
+ :key="user.id"
+ :label="user.name"
+ :value="user.id"
+ />
</el-select>
</el-form-item>
</el-form>
<template #footer>
<el-button @click="dispatchDialogVisible = false">取消</el-button>
- <el-button type="primary" :loading="dispatchLoading" @click="submitDispatch">确认派发</el-button>
+ <el-button type="primary" :loading="dispatchLoading" @click="submitDispatch"
+ >确认派发</el-button
+ >
</template>
</el-dialog>
<!-- 添加在其他 dialog 组件之后 -->
- <el-dialog v-model="reviewDialogVisible" title="批量审核" width="70%" append-to-body custom-class="review-dialog" @close="cancleBatchReject">
+ <el-dialog
+ v-model="reviewDialogVisible"
+ title="批量审核"
+ width="1100"
+ append-to-body
+ custom-class="review-dialog"
+ @close="cancleBatchReject"
+ >
<div class="review-container">
<div class="review-image-wrapper">
<!-- 修改左右箭头的显示条件 -->
- <div v-if="selections.length > 1 && currentReviewImage" class="arrow-button left" @click="handlePrevImage">
+ <div
+ v-if="selections.length > 1 && currentReviewImage"
+ class="arrow-button left"
+ @click="handlePrevImage"
+ >
<i class="el-icon-arrow-left"></i>
</div>
<div class="review-image-container">
- <el-image v-if="currentReviewImage" :src="getThumbUrl(currentReviewImage)" fit="fill"
+ <!-- <el-image v-if="currentReviewImage" :src="getThumbUrl(currentReviewImage)" fit="fill"
:preview-src-list="getImageList()" :initial-index="currentImageIndex - 1" class="preview-image"
- style="cursor: pointer;">
+ style="cursor: pointer"> -->
+ <el-image
+ v-if="currentReviewImage"
+ :src="getPreviewUrl(currentReviewImage)"
+ fit="fill"
+ :initial-index="currentImageIndex - 1"
+ class="preview-image"
+ style="cursor: pointer"
+ >
<template #error>
<div class="image-error">
<i class="el-icon-picture-outline"></i>
@@ -470,15 +867,26 @@
</div>
<!-- 修改右箭头的显示条件 -->
- <div v-if="selections.length > 1 && currentReviewImage" class="arrow-button right" @click="handleNextImage">
+ <div
+ v-if="selections.length > 1 && currentReviewImage"
+ class="arrow-button right"
+ @click="handleNextImage"
+ >
<i class="el-icon-arrow-right"></i>
</div>
</div>
<!-- 修改分页器的显示条件 -->
<div class="review-pagination" v-if="selections.length > 1 && currentReviewImage">
- <el-pagination small layout="prev, pager, next" hide-on-single-page :total="selections.length"
- :current-page="currentImageIndex" :page-size="1" @current-change="handleImagePageChange">
+ <el-pagination
+ small
+ layout="prev, pager, next"
+ hide-on-single-page
+ :total="selections.length"
+ :current-page="currentImageIndex"
+ :page-size="1"
+ @current-change="handleImagePageChange"
+ >
</el-pagination>
</div>
</div>
@@ -491,20 +899,61 @@
</div>
</template>
</el-dialog>
+
+ <!-- 复核弹出层 -->
+
+ <el-dialog
+ v-model="reCheckDialog"
+ title="工单复核"
+ width="30%"
+ append-to-body
+ custom-class="re-check-dialog"
+ @close="reCheckDialog = false"
+ >
+ <div class="dialog-footer">
+ <el-button type="primary" @click="reCheckConfirm(1)">人工复核</el-button>
+ <el-button type="primary" @click="reCheckConfirm(2)">无人机复核</el-button>
+ </div>
+ </el-dialog>
</basic-container>
</template>
<script>
-import { getList, createTicket, getTicketInfo, flowEvent, getstatusCount, getStepInfo } from '@/api/tickets/ticket';
-import { export_json_to_excel } from '@/utils/exportExcel';
+import { getSmallImg, getShowImg } from '@/utils/util';
+import { ElMessageBox, ElLoading } from 'element-plus';
+import { calculateDefaultRange } from '@/utils/util';
+import { gcj02ToWgs84, wgs84ToGcj02 } from '@/utils/coordinateTransformation';
+import _ from 'lodash';
+import {
+ getList,
+ createTicket,
+ getTicketInfo,
+ flowEvent,
+ getstatusCount,
+ 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]
+}
+
export default {
- name: "TicketPage",
+ components: { elTooltipCopy,CreateQRcode },
+ name: 'TicketPage',
data() {
return {
+ currentIndex: null, // 当前显示的数据索引
submitLoading: false, // 新增loading状态
draftLoading: false,
approveLoading: false,
@@ -512,46 +961,53 @@
dispatchLoading: false,
completeLoading: false,
finalizeLoading: false,
- activeTab: "all",
+ createoredit: '',
+ activeTab: 'all',
// tabs 只保留静态结构,不做权限判断
tabs: [
- { label: "全部工单", name: "all", value: null, count: 0 },
- { label: "待审核", name: "pending", value: 2, count: 0 },
- { label: "待处理", name: "processing", value: 0, count: 0 },
- { label: "处理中", name: "inProgress", value: 3, count: 0 },
- { label: "已完成", name: "completed", value: 4, count: 0 },
- { label: "已完结", name: "closed", value: 5, count: 0 },
- { label: "我发起的工单", name: "myTickets", value: null, count: 0 },
+ { label: '全部工单', name: 'all', value: null, count: 0 },
+ { label: '待审核', name: 'pending', value: 2, count: 0 },
+ { label: '待处理', name: 'processing', value: 0, count: 0 },
+ { label: '处理中', name: 'inProgress', value: 3, count: 0 },
+ { label: '已完成', name: 'completed', value: 4, count: 0 },
+ // { label: "已完结", name: "closed", value: 5, count: 0 },
+ { label: '我发起的工单', name: 'myTickets', value: null, count: 0 },
],
filters: {
- keyword: "",
- department: "",
- type: "",
+ keyword: '',
+ department: '',
+ type: '',
dateRange: [],
- status: "",
- algorithm: "", // 新增算法筛选字段
+ status: '',
+ algorithm: '', // 新增算法筛选字段
+ isReview: '', // 添加复核状态筛选字段
},
departments: [],
types: [],
+ allAlgorithms: [],
handlers: [
- { label: "处理人A", value: "handlerA" },
- { label: "处理人B", value: "handlerB" },
+ { label: '处理人A', value: 'handlerA' },
+ { label: '处理人B', value: 'handlerB' },
],
algorithms: [],
+ algorithms2: [],
statuses: [
- { label: "待审核", value: "2" },
- { label: "待处理", value: "0" },
- { label: "处理中", value: "3" },
- { label: "已完成", value: "4" },
- { label: "已完结", value: "5" },
+ { label: '待审核', value: '2' },
+ { label: '待处理', value: '0' },
+ { label: '处理中', value: '3' },
+ { label: '已完成', value: '4' },
+ ],
+ reviewStatuses: [
+ { label: '否', value: 0 },
+ { label: '是', value: 1 },
],
tableData: [],
option: {
border: true,
stripe: true,
selection: true, // 添加多选功能
- index: true, // 保留序号功能
+ index: true, // 保留序号功能
indexLabel: '序号',
indexWidth: 60,
menuWidth: 150,
@@ -562,31 +1018,49 @@
addBtn: false,
menu: true,
page: true,
+
+ height: 'auto',
+ calcHeight: 196,
+
column: [
// { label: "序号", prop: "id", width: 70 },
- { label: "工单编号", prop: "orderNumber", width: 150 },
- { label: "工单名称", prop: "orderName", width: 170, overHidden: true, tooltip: true },
- { label: "所属单位", prop: "department", width: 100 },
- { label: "发起时间", prop: "startTime", width: 160 },
- { label: "关联算法", prop: "aiType", width: 160 },
- { label: "工单类型", prop: "type", width: 108 },
+ { label: '工单编号', prop: 'orderNumber', width: 170 },
+ { label: '工单名称', prop: 'orderName', width: 150, overHidden: true, tooltip: true },
+ { label: '所属单位', prop: 'department', overHidden: true, tooltip: true },
+ { label: '发起时间', prop: 'startTime', width: 160 },
+ { label: '关联算法', prop: 'aiType', overHidden: true, tooltip: true },
{
- label: "工单内容",
- prop: "content",
- slot: true,
- width: 212,
- overHidden: true
+ label: '工单类型',
+ prop: 'type',
+ width: 110,
+ overHidden: true,
+ tooltip: true,
+ type: 'select',
+ dicData: [],
},
- { label: "创建人", prop: "creator", width: 100 },
- { label: "处理人", prop: "handler", width: 100 },
- { label: "工单状态", prop: "status", slot: true, width: 100 }
+ {
+ label: '工单内容',
+ prop: 'content',
+ slot: true,
+ width: 152,
+ overHidden: true,
+ },
+ { label: '创建人', prop: 'creator', width: 70 },
+ { label: '处理人', prop: 'handler', width: 70 },
+ {
+ slot: true,
+ hide: envName === 'jiangwu'? true : false,
+ label: '复核状态',
+ prop: 'isReview',
+ width: 90,
+ },
+ { label: '工单状态', prop: 'status', slot: true, width: 90 },
],
},
page: {
- total: 0,
- currentPage: 1,
pageSize: 10,
- pageSizes: [10, 20, 30]
+ currentPage: 1,
+ total: 0,
},
dialogVisible: false,
detailVisible: false,
@@ -597,7 +1071,7 @@
department: '',
handler: '',
algorithm: [], // 关联算法改为数组
- location: [], // 将存储为[经度, 纬度, 地址]格式
+ location: [], // 将存储为[经度, 纬度, 地址]格式
address: '',
photos: [],
content: '', // 新增字段,用于存储后端返回的 content
@@ -609,26 +1083,33 @@
handler: [{ required: true, message: '请选择处理人员', trigger: 'change' }],
content: [{ required: true, message: '请输入工单内容', trigger: 'blur' }],
algorithm: [{ required: true, message: '请选择关联算法', trigger: 'change' }],
- location: [{
- validator: (rule, value, callback) => {
- if (!value || value.length < 2) {
- callback(new Error('请选择位置信息'));
- } else {
- callback();
- }
+ location: [
+ {
+ required: true,
+ validator: (rule, value, callback) => {
+ if (!value || value.length < 2) {
+ callback(new Error('请选择位置信息'));
+ } else if (!value[0] || !value[1]) {
+ callback(new Error('请选择位置信息'));
+ } else {
+ callback();
+ }
+ },
+ trigger: 'change',
},
- trigger: 'change'
- }],
- photos: [{
- validator: (rule, value, callback) => {
- if (!this.form.photos || this.form.photos.length === 0) {
- callback(new Error('请上传工单图片'));
- } else {
- callback();
- }
+ ],
+ photos: [
+ {
+ validator: (rule, value, callback) => {
+ if (!this.form.photos || this.form.photos.length === 0) {
+ callback(new Error('请上传工单图片'));
+ } else {
+ callback();
+ }
+ },
+ trigger: 'change',
},
- trigger: 'change'
- }],
+ ],
},
departmentUsers: {},
loading: false,
@@ -651,7 +1132,7 @@
handler: [{ required: true, message: '请选择处理人', trigger: 'change' }],
}, // 新增:派发表单验证规则
stepInfos: [], // 新增:存储步骤信息
- fixedStatuses: ["2", "0", "3", "4", "5"], // 固定的五个状态
+ fixedStatuses: ['2', '0', '3', '4'], // 固定的五个状态
userNameToIdMap: {}, // 新增用户名到ID的映射
workType: 0, // 新增:当前工单work_type
selections: [], // 添加选中行数据数组
@@ -660,21 +1141,88 @@
currentImageIndex: 1, // 新增:当前图片索引
totalTime: '',
isShowInfo: false,
+
+ // 配置时间选择器默认配置
+ datePickerDefaultVal: calculateDefaultRange(),
+
+ // 复核弹窗
+ reCheckDialog: false,
+ treePropsSF: {
+ label: 'dictValue',
+ value: 'id',
+ children: 'children',
+ },
+ dictKey: '',
+ dataList: [],
+ checkedKeys: [],
};
},
created() {
- let orderNumber = new URLSearchParams(window.location.search).get('orderNumber');
- if (orderNumber) {
- this.filters.keyword = orderNumber;
- this.isShowInfo = true;
- }
+ this.inputMapShowDefaultCenter = null;
+
this.loadAMapScripts();
this.fetchDropdownData();
- this.fetchTabCounts(); // 新增:初始化时获取 tab 数据
- console.log('permission.tickets_processing_btn', this.permission.tickets_processing_btn);
- console.log('permission', this.permission.tickets_tab_pending);
+ // console.log('permission.tickets_processing_btn', this.permission.tickets_processing_btn);
+ // console.log('permission', this.permission.tickets_tab_pending);
},
+
mounted() {
+
+ this.getAlgorithmList()
+
+ const href = this.$route.href;
+ if (this.$route?.query?.status !== undefined && this.$route?.query?.status !== null) {
+ this.filters.status = this.$route?.query?.status + '';
+ this.$router.replace({});
+ }
+
+ let curQueryParams = {};
+
+ if (href.indexOf('?') != -1 && href.split('?').length > 0) {
+ curQueryParams = href
+ .split('?')[1]
+ .split('&')
+ .reduce((pre, cur) => {
+ let newArr = cur.split('=');
+
+ pre[newArr[0]] = newArr[1];
+
+ return pre;
+ }, {});
+
+ const { orderNumber = undefined, day = undefined } = curQueryParams;
+
+ // 日历传值
+ if (day) {
+ const date = new Date(day + 'T00:00:00+08:00');
+ const dateArray = [date, date];
+ const handler = {
+ get(target, prop) {
+ if (typeof prop === 'string' && /^\d+$/.test(prop)) {
+ const index = parseInt(prop);
+ const dateObj = target[index];
+ return dateObj.toDateString() + ' 00:00:00 GMT+0800 (中国标准时间)';
+ }
+ return Reflect.get(target, prop);
+ },
+ };
+
+ const proxyArray = new Proxy(dateArray, handler);
+ this.filters.dateRange = proxyArray;
+ }
+
+ if (orderNumber) {
+ 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 = {})
+ });
+
+ }
+ }
+
+ this.fetchTabCounts(); // 新增:初始化时获取 tab 数据
this.fetchTableData();
},
computed: {
@@ -682,108 +1230,143 @@
return this.tableData.length > 0 ? this.tableData[0] : null;
},
availableHandlers() {
- return this.form.department ? (this.departmentUsers[this.form.department] || []) : [];
+ return this.form.department ? this.departmentUsers[this.form.department] || [] : [];
},
availableDispatchHandlers() {
- return this.dispatchForm.department ? (this.departmentUsers[this.dispatchForm.department] || []) : [];
+ return this.dispatchForm.department
+ ? this.departmentUsers[this.dispatchForm.department] || []
+ : [];
},
detailTableData() {
return [
{
- label: "工单名称",
+ label: '工单名称',
value: this.currentDetail.orderName,
editable: this.currentDetail.status === 0,
- type: "input",
+ type: 'input',
},
{
- label: "关键任务",
+ label: '关键任务',
value: this.currentDetail.keyData,
editable: false,
},
{
- label: "任务发起人",
+ label: '任务发起人',
value: this.currentDetail.creator,
editable: false,
},
{
- label: "当前状态",
+ label: '当前状态',
value: this.mapStatus(this.currentDetail.status),
editable: false,
},
{
- label: "事件地址",
+ label: '事件地址',
value: this.currentDetail.address,
editable: false,
},
{
- label: "工单类型",
+ label: '工单类型',
value: this.currentDetail.type,
editable: this.currentDetail.status === 0,
- type: "select",
+ type: 'select',
options: this.types,
},
{
- label: "关联算法",
+ label: '关联算法',
value: this.currentDetail.aiType,
editable: false,
},
{
- label: "发起单位",
+ label: '发起单位',
value: this.currentDetail.department,
editable: false,
},
{
- label: "发起任务时间",
+ label: '发起任务时间',
value: this.currentDetail.startTime,
editable: false,
},
{
- label: "工单内容",
+ label: '工单内容',
value: this.currentDetail.content,
editable: this.currentDetail.status === 0,
- type: "textarea",
+ type: 'textarea',
},
];
},
detailFields() {
return [
- { label: "工单名称", value: this.currentDetail.orderName, editable: this.currentDetail.status === 0, type: "input" },
- { label: "关键任务", value: this.currentDetail.keyData, editable: false },
- { label: "任务发起人", value: this.currentDetail.creator, editable: false },
- { label: "当前状态", value: this.mapStatus(this.currentDetail.status), editable: false },
- { label: "事件地址", value: this.currentDetail.address, editable: false },
- { label: "工单类型", value: this.currentDetail.type, editable: this.currentDetail.status === 0, type: "select", options: this.types },
- { label: "关联算法", value: this.currentDetail.aiType, editable: false },
- { label: "发起单位", value: this.currentDetail.department, editable: false },
- { label: "发起任务时间", value: this.currentDetail.startTime, editable: false },
- { label: "工单内容", value: this.currentDetail.content, editable: this.currentDetail.status === 0, type: "textarea" },
+ {
+ label: '工单名称',
+ value: this.currentDetail.orderName,
+ editable: this.currentDetail.status === 0,
+ type: 'input',
+ },
+ { label: '关键任务', value: this.currentDetail.keyData, editable: false },
+ { label: '任务发起人', value: this.currentDetail.creator, editable: false },
+ { label: '当前状态', value: this.mapStatus(this.currentDetail.status), editable: false },
+ { label: '事件地址', value: this.currentDetail.address, editable: false },
+ {
+ label: '工单类型',
+ value: this.currentDetail.type,
+ editable: this.currentDetail.status === 0,
+ type: 'select',
+ options: this.types,
+ },
+ { label: '关联算法', value: this.currentDetail.aiType, editable: false },
+ { label: '发起单位', value: this.currentDetail.department, editable: false },
+ { label: '发起任务时间', value: this.currentDetail.startTime, editable: false },
+ {
+ label: '工单内容',
+ value: this.currentDetail.content,
+ editable: this.currentDetail.status === 0,
+ type: 'textarea',
+ },
];
},
formattedDetailFields() {
const fields = [
- { label: "工单名称", value: this.currentDetail.orderName },
- { label: "工单类型", value: this.currentDetail.type },
- { label: "关联任务", value: this.currentDetail.job_name || '/' },
- { label: "任务发起人", value: this.currentDetail.creator },
- { label: "当前状态", value: this.mapStatus(this.currentDetail.status) },
- { label: "事件地址", value: this.currentDetail.address }, // 包含经纬度信息
- { label: "关联算法", value: this.currentDetail.aiType },
- { label: "发起单位", value: this.currentDetail.department },
- { label: "发起任务时间", value: this.currentDetail.startTime },
- { label: "工单内容", value: this.currentDetail.content },
+ { label: '工单名称', value: this.currentDetail.orderName },
+ {
+ label: '工单类型',
+ // 修改这里:使用 types 数组查找对应的 label
+ value:
+ this.types.find(t => t.value === this.currentDetail.type)?.label ||
+ this.currentDetail.type ||
+ '/',
+ },
+ { label: '关联任务', value: this.currentDetail.job_name || '/' },
+ { label: '任务发起人', value: this.currentDetail.creator },
+ { label: '当前状态', value: this.mapStatus(this.currentDetail.status) },
+ { label: '事件地址', value: this.currentDetail.address || this.currentDetail.latAndLon }, // 包含经纬度信息
+ { 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 },
+ { label: '工单内容', value: this.currentDetail.content },
];
+ // 过滤掉值为 '/' 的列
+ const filteredFields = fields.filter(field => field.value !== '/');
// 将字段分成两列
const formattedFields = [];
- for (let i = 0; i < fields.length; i += 2) {
+ for (let i = 0; i < filteredFields.length; i += 2) {
formattedFields.push({
- label1: fields[i]?.label || "",
- value1: fields[i]?.value || "暂无数据",
- label2: fields[i + 1]?.label || "",
- value2: fields[i + 1]?.value || "暂无数据",
+ label1: filteredFields[i]?.label || '',
+ value1: filteredFields[i]?.value || (filteredFields[i]?.label ? '暂无数据' : ''),
+ label2: filteredFields[i + 1]?.label || '',
+ value2: filteredFields[i + 1]?.value || (filteredFields[i + 1]?.label ? '暂无数据' : ''),
});
}
+
return formattedFields;
+
},
dynamicFixedStatuses() {
// 直接使用接口返回的 stepInfos
@@ -796,28 +1379,30 @@
const tabStatus = this.permission?.tickets_tab_status === true;
const tabPending = this.permission?.tickets_tab_pending === true;
const tabMyTickets = this.permission?.tickets_tab_mytickets === true;
- return this.tabs.map(tab => {
- if (tab.name === 'all') {
- return { ...tab, isShow: true };
- }
- if (tab.name === 'pending') {
- return { ...tab, isShow: tabPending };
- }
- if (['processing', 'inProgress', 'completed', 'closed'].includes(tab.name)) {
- return { ...tab, isShow: tabStatus };
- }
- if (tab.name === 'myTickets') {
- return { ...tab, isShow: tabMyTickets };
- }
- return { ...tab, isShow: false };
- }).filter(tab => tab.isShow);
+ return this.tabs
+ .map(tab => {
+ if (tab.name === 'all') {
+ return { ...tab, isShow: true };
+ }
+ if (tab.name === 'pending') {
+ return { ...tab, isShow: tabPending };
+ }
+ if (['processing', 'inProgress', 'completed', 'closed'].includes(tab.name)) {
+ return { ...tab, isShow: tabStatus };
+ }
+ if (tab.name === 'myTickets') {
+ return { ...tab, isShow: tabMyTickets };
+ }
+ return { ...tab, isShow: false };
+ })
+ .filter(tab => tab.isShow);
},
permissionList() {
// 可根据实际后端权限key调整
return {
addBtn: this.validData(this.permission.tickets_add, false),
delBtn: this.validData(this.permission.tickets_delete, false),
- exportBtn: this.validData(this.permission.tickets_export, false,),
+ exportBtn: this.validData(this.permission.tickets_export, false),
reviewBtn: this.validData(this.permission.tickets_review, false),
};
},
@@ -825,38 +1410,149 @@
// “我发起的工单”tab用默认流程,其它tab用接口返回的stepInfos
if (this.activeTab === 'myTickets') {
if (this.workType === 1) {
- return ["3", "4", "5"];
+ return ['3', '4'];
}
return this.fixedStatuses;
}
+
// 其它tab直接用接口返回的stepInfos
return this.stepInfos.map(step => String(step.status));
},
+
+ showIsReviewText() {
+ return row => {
+ if (['4'].includes(String(row.status))) return row.isReview === 1 ? '是' : '否';
+
+ return '/';
+ };
+ },
+
+ popupShowImage() {
+ return list => {
+ return list.map(item => ({
+ ...item,
+ url: getShowImg(item.url),
+ }));
+ };
+ },
},
+
methods: {
+ handleCheck(data, { checkedKeys, checkedNodes }) {
+ this.checkedKeys = checkedKeys
+ // 获取所有选中节点的 dictKey
+ 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
+ }
+ })
+ },
+
+ handleSFNodeClick(data) {
+ 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();
+ },
+ handleCellClick(row, column) {
+ console.log(row, column.no);
+ if (column.no === 2) {
+ navigator.clipboard.writeText(row.orderNumber).then(() => {
+ this.$message.success('复制工单编号成功');
+ });
+ } else if (column.no === 3) {
+ navigator.clipboard.writeText(row.orderName).then(() => {
+ this.$message.success('复制工单名称成功');
+ });
+ } else if (column.no === 4) {
+ navigator.clipboard.writeText(row.department).then(() => {
+ this.$message.success('复制所属单位成功');
+ });
+ }
+ },
+ // 左切换
+ leftClick() {
+ if (this.tableData.length === 0) return;
+ this.currentIndex = Math.max(0, this.currentIndex - 1);
+ this.updateCurrentDetail();
+ },
+ // 右切换
+ rightClick() {
+ if (this.tableData.length === 0) return;
+ this.currentIndex = Math.min(this.tableData.length - 1, this.currentIndex + 1);
+ this.updateCurrentDetail();
+ },
+ // 更新当前详情
+ updateCurrentDetail() {
+ this.currentDetail = this.tableData[this.currentIndex];
+ this.currentDetail.mediaUrl = this.currentDetail.photo_url;
+ this.currentDetail.updatePhotoUrl = this.currentDetail.update_photo_url;
+ this.currentDetail.processingDetail = this.currentDetail.content;
+ this.handleViewDetail(this.currentDetail);
+
+
+ // 如果使用地图组件,需要更新地图标记
+ this.$nextTick(() => {
+ if (this.$refs.MapContainer && this.currentDetail.location) {
+ this.$refs.MapContainer.initAddEntity('point', this.currentDetail.location);
+ }
+ });
+ },
+ async handleQRCode (val){
+ val.showQR = !val.showQR
+ },
async loadAMapScripts() {
try {
const areaCode = this.userInfo.detail.areaCode;
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;
+
if (Array.isArray(center) && center.length === 2) {
- this.mapParams.center = center;
+ this.inputMapShowDefaultCenter = center;
} else {
// 如果找不到中心点,尝试使用 bbox 的中心点
const bbox = adcodeObj?.payload?.bbox;
if (Array.isArray(bbox) && bbox.length === 4) {
const centerX = (bbox[0] + bbox[2]) / 2;
const centerY = (bbox[1] + bbox[3]) / 2;
- this.mapParams.center = [centerX, centerY];
+ this.inputMapShowDefaultCenter = [centerX, centerY];
} else {
- this.mapParams.center = [115.861365, 28.621311];
+ this.inputMapShowDefaultCenter = [115.861365, 28.621311];
}
}
+ this.mapParams.center = [...this.inputMapShowDefaultCenter];
this.mapLoaded = true;
} catch (error) {
@@ -879,7 +1575,7 @@
await this.$confirm('确认审核通过当前工单?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
- type: 'warning'
+ type: 'warning',
});
const data = {
@@ -924,7 +1620,8 @@
async fetchDropdownData() {
try {
const response = await getTicketInfo();
- const { dept_data, event_type, ai_type } = response.data.data;
+
+ const { dept_data, event_type, ai_type,info } = response.data.data;
this.departments = dept_data.map(item => ({
label: item.dept_name,
@@ -941,14 +1638,23 @@
value: key,
}));
+ const columnType = this.findObject(this.option.column, 'type');
+ columnType.dicData = this.types;
+ this.allAlgorithms = info
+
+ console.log('工单类型',this.types);
+ console.log('关联算法',this.allAlgorithms );
// 确保算法数据的映射一致
- this.algorithms = ai_type.map(item => ({
- dict_key: item.dict_key,
- dict_value: item.dict_value,
- // 同时添加 label 和 value 以兼容两处使用
- label: item.dict_value,
- value: item.dict_key
- }));
+ this.algorithms =
+ ai_type?.map(item => ({
+ dict_key: item.dict_key,
+ dict_value: item.dict_value,
+ // 同时添加 label 和 value 以兼容两处使用
+ label: item.dict_value,
+ value: item.dict_key,
+ })) || [];
+
+ this.algorithms2 = _.cloneDeep(this.algorithms)
// 构建用户ID和名称的映射关系
this.userNameToIdMap = {};
@@ -961,6 +1667,33 @@
this.$message.error('加载下拉框数据失败');
}
},
+ // 工单类型变化时触发
+ handleTypeChange(typeValue) {
+ this.form.algorithm = []
+ if (!typeValue) {
+ // 未选择类型时清空算法列表
+ this.algorithms2 = [];
+ return;
+ }
+
+ const matchedCategory = this.allAlgorithms.find(
+ category => category.dict_key === typeValue
+ );
+
+ if (!matchedCategory || !matchedCategory.algorithms || matchedCategory.algorithms.length === 0) {
+ // 无匹配的算法时清空
+ this.algorithms2 = [];
+ this.$message.info('该工单类型暂无关联算法');
+ return;
+ }
+ this.algorithms2 = matchedCategory.algorithms.map(algo => ({
+ label: algo.dict_value,
+ value: algo.dict_key,
+ dict_key: algo.dict_key,
+ dict_value: algo.dict_value
+ }));
+
+ },
async fetchTableData() {
if (this.isFetching) return;
@@ -969,21 +1702,29 @@
try {
const currentTab = this.tabs.find(tab => tab.name === this.activeTab);
const params = {
- word_order_type: this.filters.type || undefined,
- status: currentTab?.name === 'myTickets' ? undefined :
- this.filters.status !== "" ? Number(this.filters.status) :
- currentTab?.value,
+ word_order_types: this.filters.type || undefined,
+ status:
+ currentTab?.name === 'myTickets'
+ ? undefined
+ : this.filters.status !== ''
+ ? Number(this.filters.status)
+ : currentTab?.value,
event_name: this.filters.keyword || undefined,
dept_id: this.filters.department || undefined,
- start_date: this.filters.dateRange?.[0] ? this.formatDate(this.filters.dateRange[0]) : undefined,
- end_date: this.filters.dateRange?.[1] ? this.formatDate(this.filters.dateRange[1]).replace("00:00:00", "23:59:59") : undefined,
- current: Number(this.page.currentPage), // 使用当前页码
- size: Number(this.page.pageSize), // 使用每页条数
+ start_date: this.filters.dateRange?.[0]
+ ? this.formatDate(this.filters.dateRange[0])
+ : undefined,
+ end_date: this.filters.dateRange?.[1]
+ ? this.formatDate(this.filters.dateRange[1]).replace('00:00:00', '23:59:59')
+ : undefined,
+ current: Number(this.page.currentPage), // 使用当前页码
+ size: Number(this.page.pageSize), // 使用每页条数
ai_type: this.filters.algorithm || undefined, // 添加算法参数
// 添加 is_draft 参数,仅在"我发起的"标签页时设置为1
is_draft: currentTab?.name === 'myTickets' ? 1 : undefined,
user_id: currentTab?.name === 'myTickets' ? this.userInfo.user_id : undefined,
+ is_review: this.filters.isReview === '' ? undefined : this.filters.isReview, // 添加复核状态查询参数
};
const response = await getList(params);
@@ -1008,27 +1749,30 @@
id: item.id,
orderNumber: item.event_num, // 修改这里:优先使用 event_num
orderName: item.event_name,
- department: this.departments.find(d => d.value === item.dept_id)?.label || item.dept_name,
+ department:
+ this.departments.find(d => d.value === item.dept_id)?.label || item.dept_name,
startTime: item.create_time,
aiType: item.ai_types,
content: item.content, // 将后端返回的 content 映射为 content
- type: this.types.find(t => t.value === item.event_dict_key)?.label,
- keyData: (!isNaN(longitude) && !isNaN(latitude))
- ? `${longitude.toFixed(6)}, ${latitude.toFixed(6)}`
- : '未知位置',
+ type: item.work_order_type_dict_key,
+ keyData:
+ !isNaN(longitude) && !isNaN(latitude)
+ ? `${longitude.toFixed(6)}, ${latitude.toFixed(6)}`
+ : '未知位置',
address: item.address,
- creator: item.create_user,
+ creator: item.event_num?.slice(0, 2) === 'AI' ? 'AI 小飞' : item.create_user,
handler: item.update_user || '未分配',
status: Number(item.status || 0),
// 保存原始字段
- photo_url: item.photo_url || '', // 保存原始 photo_url
- video_url: item.video_url || '', // 保存原始 video_url
- location: (!isNaN(longitude) && !isNaN(latitude)) ? [longitude, latitude] : null,
+ photo_url: item.photo_url || '', // 保存原始 photo_url
+ video_url: item.video_url || '', // 保存原始 video_url
+ location: !isNaN(longitude) && !isNaN(latitude) ? [longitude, latitude] : null,
processing_details: item.processing_details || '', // 添加处理详情字段
update_photo_url: item.update_photo_url || '', // 添加处理图片字段
work_type: item.work_type !== undefined ? Number(item.work_type) : 0, // 保留work_type字段并转为数字
job_name: item.job_name || '',
job_create_time: item.job_create_time || '',
+ isReview: item.is_review, // 添加复核状态字段映射
};
});
@@ -1037,12 +1781,12 @@
// 是否弹出详情页
if (this.isShowInfo) {
- this.handleViewDetail(this.firstRowData)
+ this.handleViewDetail(this.firstRowData);
this.isShowInfo = false; // 生效一次
}
await this.fetchTabCounts();
} catch (error) {
- this.$message.error(error.message || "获取数据失败");
+ this.$message.error(error.message || '获取数据失败');
this.tableData = [];
this.page.total = 0;
} finally {
@@ -1064,33 +1808,43 @@
return;
}
- // 验证图片上传
+ // 修改图片验证逻辑
if (!this.form.photos || this.form.photos.length === 0) {
this.$message.warning('请上传工单图片');
return;
}
+ let [lng, lat] = this.disposeLocation(true, this.form);
+
const submitData = {
eventName: this.form.name,
content: this.form.content,
- workType: "1",
- longitude: String(this.form.location[0]),
- latitude: String(this.form.location[1]),
+ workType: '1',
+ longitude: lng,
+ latitude: lat,
address: this.form.address,
- eventDictKey: this.form.type,
+ workOrderTypeDictKey: this.form.type,
aiType: Array.isArray(this.form.algorithm) ? this.form.algorithm : [this.form.algorithm], // 传数组
updateUser: this.form.handler,
createDept: this.form.department,
- isDraft: 0
+ isDraft: 0,
};
if (this.form.id) {
submitData.id = this.form.id;
}
- // 获取文件对象
- const file = this.form.photos[0].raw;
- if (!file) {
+ // 修改获取文件的逻辑
+ let file = null;
+ const photoInfo = this.form.photos[0];
+
+ if (photoInfo.raw) {
+ // 如果有新上传的文件,使用新文件
+ file = photoInfo.raw;
+ } else if (photoInfo.existingUrl) {
+ // 如果是已存在的图片,将URL添加到提交数据中
+ submitData.photoUrl = photoInfo.existingUrl;
+ } else {
this.$message.warning('图片文件无效,请重新上传');
return;
}
@@ -1109,8 +1863,7 @@
} else {
this.$message.error(error.message || '工单创建失败,请稍后重试');
}
- }
- finally {
+ } finally {
this.submitLoading = false;
}
},
@@ -1123,30 +1876,45 @@
if (!handlerValue || handlerValue === '未分配') {
handlerValue = undefined;
}
+
+ // 验证位置信息
+ if (
+ !this.form.location ||
+ this.form.location.length < 2 ||
+ !this.form.location[0] ||
+ !this.form.location[1]
+ ) {
+ this.$message.warning('请在地图上选择位置');
+ return;
+ }
+
+ let [lng, lat] = this.disposeLocation(true, this.form);
+
const submitData = {
id: this.form.id,
eventName: this.form.name || undefined,
content: this.form.content || undefined,
- workType: "1",
- longitude: this.form.location?.[0] ? String(this.form.location[0]) : undefined,
- latitude: this.form.location?.[1] ? String(this.form.location[1]) : undefined,
+ workType: '1',
+ longitude: lng,
+ latitude: lat,
address: this.form.address || undefined,
- eventDictKey: this.form.type || undefined,
- aiType: Array.isArray(this.form.algorithm) ? this.form.algorithm : [this.form.algorithm], // 传数组
+ workOrderTypeDictKey: this.form.type || undefined,
+ aiType:
+ this.form.algorithm && this.form.algorithm.length > 0 ? this.form.algorithm : undefined, // 传数组
updateUser: handlerValue,
createDept: this.form.department || undefined,
- isDraft: 1
+ isDraft: 1,
};
// 草稿时也至少需要工单名称
if (!submitData.eventName) {
- this.$message.warning('请至少输入工单名称');
+ this.$message.warning('请输入工单名称');
return;
}
// 过滤掉所有 undefined 的字段
- Object.keys(submitData).forEach(key =>
- submitData[key] === undefined && delete submitData[key]
+ Object.keys(submitData).forEach(
+ key => submitData[key] === undefined && delete submitData[key]
);
let file = null;
@@ -1158,27 +1926,37 @@
if (response.data.code === 0) {
this.$message.success('草稿保存成功');
this.dialogVisible = false;
- this.fetchTableData();
+ (this.form = {
+ name: '',
+ type: '',
+ department: '',
+ handler: '',
+ algorithm: [], // 关联算法改为数组
+ location: [], // 将存储为[经度, 纬度, 地址]格式
+ address: '',
+ photos: [],
+ content: '', // 新增字段,用于存储后端返回的 content
+ }),
+ this.fetchTableData();
} else {
throw new Error(response.data.msg || '保存失败');
}
} catch (error) {
this.$message.error(error.message || '保存草稿失败,请稍后重试');
- }
- finally {
+ } finally {
this.draftLoading = false;
}
},
-
+ handleCancel (){
+ this.resetForm();
+ this.dialogVisible = false;
+},
handleLocationChange(val) {
let locationValue = val.value;
if (locationValue && locationValue.length >= 2) {
// 兼容第三项为地址
- this.form.location = [
- Number(locationValue[0]),
- Number(locationValue[1]),
- locationValue[2] || ''
- ];
+ const [lng, lat] = gcj02ToWgs84(locationValue[0], locationValue[1]);
+ this.form.location = [Number(lng), Number(lat), locationValue[2] || ''];
this.form.address = locationValue[2] || '';
} else {
this.form.location = [];
@@ -1189,31 +1967,33 @@
formatDate(date) {
if (!date) return undefined;
const d = new Date(date);
- return `${d.getFullYear()}-${String(d.getMonth() + 1).padStart(2, '0')}-${String(d.getDate()).padStart(2, '0')} 00:00:00`;
+ return `${d.getFullYear()}-${String(d.getMonth() + 1).padStart(2, '0')}-${String(
+ d.getDate()
+ ).padStart(2, '0')} 00:00:00`;
},
mapStatus(status) {
const statusTextMap = {
- "-1": "草稿", // 添加草稿状态
- "2": "待审核",
- "0": "待处理",
- "3": "处理中",
- "4": "已完成",
- "5": "已完结"
+ '-1': '草稿', // 添加草稿状态
+ 2: '待审核',
+ 0: '待处理',
+ 3: '处理中',
+ 4: '已完成',
};
- return statusTextMap[status] || "未知状态";
+ return statusTextMap[status] || '未知状态';
},
getStatusTagType(status) {
- const statusMap = {
- "-1": "info", // 为草稿状态添加样式
- "2": "warning",
- "0": "danger",
- "3": "primary",
- "4": "success",
- "5": "danger",
+ // 草稿不加颜色
+ if (status === -1 || status === '-1') return '';
+ // 状态颜色映射
+ const colorMap = {
+ 0: '#FF7411', // 待处理-淡红
+ 3: '#FFC300', // 处理中-更淡红
+ 2: '#FF472F', // 待审核-橙色
+ 4: '#0291A1', // 已完成-淡蓝
};
- return statusMap[status] || "info";
+ return colorMap[String(status)] || '';
},
async fetchTabCounts() {
@@ -1241,6 +2021,11 @@
handleTabChange(tab) {
this.activeTab = tab.props?.name || tab.name;
+
+ const isReview = this.findObject(this.option.column, 'isReview');
+ // 根据条件切换显隐
+ isReview.hide = !['all', 'completed', 'myTickets'].includes(this.activeTab);
+
this.handleReset();
this.page.currentPage = 1;
this.fetchTableData();
@@ -1254,16 +2039,22 @@
},
handleReset() {
+ this.dictKey = '';
this.filters = {
- keyword: "",
- department: "",
- type: "",
+ keyword: '',
+ department: '',
+ type: '',
dateRange: [],
- status: "",
- algorithm: "", // 重置时清空算法筛选
+ status: '',
+ algorithm: '', // 重置时清空算法筛选
+ isReview: '', // 重置时清空复核状态
};
this.page.currentPage = 1;
+ this.$router.replace({}); //清除url参数
this.fetchTableData();
+ },
+ handleKeyWords(){
+ this.$router.replace({}); //清除url参数
},
async handleCurrentChange(val) {
@@ -1282,7 +2073,10 @@
},
handleAdd() {
+ this.createoredit = 1;
this.dialogVisible = true;
+ this.mapParams.center = [...this.inputMapShowDefaultCenter];
+ this.form.location = [];
},
resetForm() {
@@ -1292,7 +2086,7 @@
department: '',
handler: '',
algorithm: [], // 关联算法改为数组
- location: [], // 将存储为[经度, 纬度, 地址]格式
+ location: [], // 将存储为[经度, 纬度, 地址]格式
address: '',
content: '',
photos: [],
@@ -1311,7 +2105,8 @@
},
async handleViewDetail(row) {
-
+ // 找到当前行在tableData中的索引
+ this.currentIndex = this.tableData.findIndex(item => item.id === row.id);
// 先设置workType,直接从row读取
this.workType = row.work_type !== undefined ? Number(row.work_type) : 0;
@@ -1337,7 +2132,7 @@
const steps = Array.isArray(stepResponse.data.data)
? stepResponse.data.data
: stepResponse.data.data?.steps || [];
- const finishedStep = steps.find(s => String(s.status) === '5');
+ const finishedStep = steps.find(s => String(s.status) === '4');
this.totalTime = finishedStep && finishedStep.total_time ? finishedStep.total_time : '';
if (this.activeTab !== 'myTickets') {
this.stepInfos = steps.map(step => ({
@@ -1347,7 +2142,7 @@
create_time: step.create_time,
}));
} else {
- const statusArr = this.workType === 1 ? ["3", "4", "5"] : this.fixedStatuses;
+ const statusArr = this.workType === 1 ? ['3', '4'] : this.fixedStatuses;
this.stepInfos = statusArr.map(status => {
const step = steps.find(s => String(s.status) === String(status));
return {
@@ -1361,7 +2156,7 @@
this.currentDetail.status = row.status;
} catch (error) {
if (this.activeTab === 'myTickets') {
- const statusArr = this.workType === 1 ? ["3", "4", "5"] : this.fixedStatuses;
+ const statusArr = this.workType === 1 ? ['3', '4'] : this.fixedStatuses;
this.stepInfos = statusArr.map(status => ({
status,
name: status === row.status ? row.handler || '未分配' : '未处理',
@@ -1371,9 +2166,19 @@
this.stepInfos = [];
}
}
+ console.log(detailData, 'detailDatadetailDatadetailData');
+ this.currentDetail = {
+ ...detailData,
+ // address: null,
+ showQR: false,
+ latAndLon: _.round(detailData.location[0], 6) + ',' + _.round(detailData.location[1], 6),
+ };
- this.currentDetail = detailData;
+ console.log('this.currentDetail', this.currentDetail);
this.detailVisible = true;
+ this.handleTypeChange(this.currentDetail.type)
+ console.log('this.currentDetail.location',this.currentDetail.location);
+
this.$nextTick(() => {
if (this.$refs.MapContainer && this.$refs.MapContainer.initAddEntity) {
this.$refs.MapContainer.initAddEntity('point', this.currentDetail.location);
@@ -1406,7 +2211,7 @@
const areaCode = this.userInfo.detail.areaCode;
const subAreaCode = areaCode ? areaCode.substring(0, 6) : '';
getAdcodeObj(geoJson, 'adcode', subAreaCode);
- this.$message.info("地图选址功能暂未实现");
+ this.$message.info('地图选址功能暂未实现');
},
handlePreview(file) {
@@ -1428,76 +2233,16 @@
},
async exportData() {
- // 修改导出方法,添加选中数据的处理
try {
this.loading = true;
-
- // 如果有选中的数据,则只导出选中的数据
let exportData = [];
+
+ // 如果有选中的数据,则导出选中的数据
if (this.selections.length > 0) {
- exportData = this.selections.map(item => ({
- 工单编号: item.orderNumber || '',
- 工单名称: item.orderName || '',
- 所属单位: item.department || '',
- 发起时间: item.startTime || '',
- 关联算法: item.aiType || '',
- 工单内容: item.address || '',
- 工单类型: item.type || '',
- 经纬度: item.location ? `${item.location[0].toFixed(6)}, ${item.location[1].toFixed(6)}` : '',
- 创建人: item.creator || '',
- 处理人: item.handler || '',
- 工单状态: this.mapStatus(item.status)
- }));
+ exportData = this.selections.map(item => this.formatExportItem(item));
} else {
- // 原有的导出全部数据的逻辑
- const currentTab = this.tabs.find(tab => tab.name === this.activeTab);
-
- // 使用与查询列表相同的参数构造逻辑
- const params = {
- word_order_type: this.filters.type || undefined,
- status: currentTab?.name === 'myTickets' ? undefined :
- this.filters.status !== "" ? Number(this.filters.status) :
- currentTab?.value, // 使用当前tab的状态值
- keyword: this.filters.keyword || undefined,
- dept_id: this.filters.department || undefined,
- start_date: this.filters.dateRange?.[0] ? this.formatDate(this.filters.dateRange[0]) : undefined,
- end_date: this.filters.dateRange?.[1] ? this.formatDate(this.filters.dateRange[1]) : undefined,
- current: 1,
- size: 10
- };
-
- const response = await getList(params);
- if (!response?.data?.data?.records) {
- throw new Error('接口返回数据格式不正确');
- }
-
- const { records } = response.data.data;
-
- // 使用与查询列表相同的过滤逻辑
- let filteredRecords = records;
- if (currentTab?.name === 'myTickets') {
- filteredRecords = records.filter(item =>
- String(item.create_user_id) === String(item.user_id)
- );
- }
-
- exportData = filteredRecords.map(item => {
- const longitude = Number(item.longitude) || 0;
- const latitude = Number(item.latitude) || 0;
- return {
- 工单编号: item.event_num || '',
- 工单名称: item.event_name || '',
- 所属单位: item.dept_name || '',
- 发起时间: item.create_time || '',
- 关联算法: item.ai_types || '',
- 工单内容: item.address || '',
- 工单类型: this.types.find(t => t.value === item.event_dict_key)?.label || '',
- 经纬度: (!isNaN(longitude) && !isNaN(latitude)) ? `${longitude.toFixed(6)}, ${latitude.toFixed(6)}` : '',
- 创建人: item.create_user || '',
- 处理人: item.update_user || '',
- 工单状态: this.mapStatus(Number(item.status || 0))
- };
- });
+ // 没有选中数据时,导出当前页面的数据
+ exportData = this.tableData.map(item => this.formatExportItem(item));
}
if (exportData.length === 0) {
@@ -1516,16 +2261,41 @@
'经纬度',
'创建人',
'处理人',
- '工单状态'
+ '工单状态',
];
export_json_to_excel(headers, exportData, '工单数据');
this.$message.success('数据导出成功');
} catch (error) {
+ // console.error('导出失败:', error);
this.$message.error(error.message || '导出失败,请稍后重试');
} finally {
this.loading = false;
}
+ },
+
+ formatExportItem(item) {
+ const longitude = Number(item.longitude) || Number(item.location?.[0]) || 0;
+ const latitude = Number(item.latitude) || Number(item.location?.[1]) || 0;
+
+ return {
+ 工单编号: item.orderNumber || item.event_num || '',
+ 工单名称: item.orderName || item.event_name || '',
+ 所属单位: item.department || item.dept_name || '',
+ 发起时间: item.startTime || item.create_time || '',
+ 关联算法: item.aiType || item.ai_types || '',
+ 工单内容: item.address || item.content || '',
+ 工单类型:
+ this.types.find(t => t.value === (item.type || item.work_order_type_dict_key))?.label ||
+ '',
+ 经纬度:
+ !isNaN(longitude) && !isNaN(latitude)
+ ? `${longitude.toFixed(6)}, ${latitude.toFixed(6)}`
+ : '',
+ 创建人: item.creator || item.create_user || '',
+ 处理人: item.handler || item.update_user || '',
+ 工单状态: this.mapStatus(Number(item.status || 0)),
+ };
},
handleDepartmentChange(deptId) {
@@ -1538,8 +2308,12 @@
// 文件改变时的钩子
handleFileChange(file, fileList) {
- this.form.photos = fileList;
- this.currentDetail.photos = fileList;
+ // 保持最新的文件列表
+ this.form.photos = fileList.map(item => ({
+ ...item,
+ existingUrl: item.url && !item.raw ? item.url : null, // 标记已存在的图片URL
+ }));
+ this.currentDetail.photos = this.form.photos;
},
// 文件移除时的钩子
@@ -1619,7 +2393,6 @@
if (this.currentDetail.status !== 3) {
this.$message.warning('只有处理中状态的工单可以提交处理详情');
return;
-
}
try {
@@ -1646,7 +2419,7 @@
}
},
markAsCompleted() {
- this.$message.success("工单已标记为完成");
+ this.$message.success('工单已标记为完成');
},
async completeTicket() {
if (this.completeLoading) return;
@@ -1656,12 +2429,18 @@
this.$message.warning('请先填写事件处理详情');
return;
}
+ // 检查图片上传
+ if (!this.currentDetail.photos || this.currentDetail.photos.length === 0) {
+ this.$message.warning('请选择上传图片');
+ this.completeLoading = false;
+ return;
+ }
const data = {
id: this.currentDetail.id,
status: this.currentDetail.status,
processingDetails: this.currentDetail.processingDetail,
- eventNum: this.currentDetail.orderNumber
+ eventNum: this.currentDetail.orderNumber,
};
// 如果有上传的图片,添加到请求中
@@ -1685,37 +2464,40 @@
},
async approveAndDispatch() {
if (this.dispatchLoading) return;
-
+
// 添加必填项检查
if (!this.currentDetail.orderName || !this.currentDetail.orderName.trim()) {
this.$message.warning('请填写工单名称');
return;
}
- if (!this.currentDetail.type) {
- this.$message.warning('请选择工单类型');
+ if (!this.currentDetail.aiType) {
+ this.$message.warning('请选择关联算法');
return;
}
if (!this.currentDetail.content || !this.currentDetail.content.trim()) {
this.$message.warning('请填写工单内容');
return;
}
-
+
// 通过验证后,打开派发对话框
this.dispatchDialogVisible = true;
+
+ console.log('受理',this.currentDetail);
+
},
hasProcessingBtnPermission() {
// undefined 或 false 都返回 false,只有 true 返回 true
- console.log('权限检查:', this.permission);
+ // console.log('权限检查:', this.permission.tickets_processing_btn)
return this.permission && this.permission.tickets_processing_btn === true;
},
hasProcessedAndOverBtnPermission() {
// undefined 或 false 都返回 false,只有 true 返回 true
- console.log('权限检查:', this.permission);
+ //console.log('权限检查:', this.permission)
return this.permission && this.permission.tickets_view_processedAndOver === true;
},
hasReviewBtnPermission() {
// undefined 或 false 都返回 false,只有 true 返回 true
- console.log('权限检查:', this.permission);
+ // console.log('权限检查:', this.permission)
return this.permission && this.permission.tickets_review_btn === true;
},
async submitDispatch() {
@@ -1741,7 +2523,9 @@
return;
}
this.dispatchLoading = true;
- this.$refs.dispatchForm.validate(async (valid) => {
+ console.log('派发成功',this.currentDetail);
+
+ this.$refs.dispatchForm.validate(async valid => {
if (valid) {
try {
const data = {
@@ -1750,11 +2534,13 @@
isPass: 0, // 0 表示通过
eventName: this.currentDetail.orderName, // 工单名称
eventNum: this.currentDetail.orderNumber,
- eventType: this.currentDetail.type, // 工单类型
+ workOrderTypeDictKey: this.currentDetail.type, // 直接使用原始的 dict_key
content: this.currentDetail.content, // 使用 content 替代原来的 remark
createDept: this.dispatchForm.department, // 派发部门 ID
updateUser: this.dispatchForm.handler, // 处理人 ID
+ aiType:this.currentDetail.aiType
};
+ console.log('派发',data);
const file = this.currentDetail.file || null; // 如果没有文件,则为 null
@@ -1815,10 +2601,11 @@
// 添加编辑方法
handleEdit(row) {
+ this.createoredit = 2;
console.log('编辑原始数据:', row);
// 尝试从row.dept_id或通过部门名称查找对应的部门ID
- let deptId = row.dept_id; // 优先使用原始数据中的dept_id
+ let deptId = row.dept_id; // 优先使用原始数据中的dept_id
// 如果没有dept_id,则通过部门名称查找
if (!deptId) {
@@ -1826,15 +2613,15 @@
console.log('可用部门列表:', this.departments);
console.log('当前部门名称:', row.department);
- const deptInfo = this.departments.find(dept =>
- dept.label && dept.label.trim() === row.department.trim()
+ const deptInfo = this.departments.find(
+ dept => dept.label && dept.label.trim() === row.department.trim()
);
deptId = deptInfo?.value;
}
// 获取工单类型值 - 从types中找到匹配的值
- const typeValue = this.types.find(t => t.label === row.type)?.value || row.event_dict_key;
-
+ const typeValue =
+ this.types.find(t => t.value === row.type)?.value || row.work_order_type_dict_key;
// 获取处理人ID - 使用userNameToIdMap映射
const handlerId = this.userNameToIdMap[row.handler] || row.handler;
@@ -1844,78 +2631,120 @@
原始处理人: row.handler,
处理人ID: handlerId,
原始工单类型: row.type,
- 映射后类型值: typeValue
+ 映射后类型值: typeValue,
});
+ // 修改算法数组的处理逻辑
let algorithmArr = [];
if (Array.isArray(row.aiType)) {
algorithmArr = row.aiType;
} else if (typeof row.aiType === 'string' && row.aiType) {
- algorithmArr = row.aiType.split(',').map(i => i.trim());
+ // 首先尝试将字符串按照逗号或顿号分割
+ algorithmArr = row.aiType.split(/[,、]/).map(item => item.trim());
}
+
+ // 确保算法值与选项匹配
+ algorithmArr = algorithmArr
+ .map(item => {
+ // 如果是字符串值,尝试找到对应的 dict_key
+ if (typeof item === 'string') {
+ const matchedAlgorithm = this.algorithms.find(
+ algo => algo.dict_value === item || algo.dict_key === item
+ );
+ return matchedAlgorithm ? matchedAlgorithm.dict_key : item;
+ }
+ return item;
+ })
+ .filter(Boolean); // 过滤掉无效值
+
+ console.log('算法处理:', {
+ 原始值: row.aiType,
+ 分割后: algorithmArr,
+ });
+
this.form = {
id: row.id,
name: row.orderName,
type: typeValue,
department: deptId,
- handler: handlerId, // 使用映射后的处理人ID
- algorithm: algorithmArr, // 回显为数组
- location: Array.isArray(row.location) && row.location.length >= 2
- ? [Number(row.location[0]), Number(row.location[1])]
- : [],
+ handler: handlerId,
+ algorithm: algorithmArr,
+ location:
+ Array.isArray(row.location) && row.location.length >= 2
+ ? [Number(row.location[0]), Number(row.location[1])]
+ : [],
address: row.address || '',
content: row.content,
photos: [],
};
- this.form.location = Array.isArray(row.location) && row.location.length >= 2
- ? [
- Number(row.location[0]),
- Number(row.location[1]),
- row.location[2] || row.address || ''
- ]
- : [];
+
+ let curLocation = [];
+
+ if (Array.isArray(row.location) && row.location.length >= 2) {
+ let [lng, lat] = this.disposeLocation(false, row);
+
+ curLocation = [lng, lat, row.location[2] || row.address || ''];
+ }
+
+ this.form.location = curLocation;
this.form.address = this.form.location[2] || '';
// 设置地图中心点
if (Array.isArray(this.form.location) && this.form.location.length >= 2) {
this.mapParams.center = [Number(this.form.location[0]), Number(this.form.location[1])];
} else {
- this.mapParams.center = null; // 没有经纬度时用默认
+ this.mapParams.center = [...this.inputMapShowDefaultCenter];
}
// 如果有图片,添加到表单中
if (row.photo_url) {
- this.form.photos = [{
- name: 'existing-photo',
- url: row.photo_url
- }];
+ // 创建一个带有必要信息的文件对象
+ this.form.photos = [
+ {
+ name: 'existing-photo.jpg', // 添加默认扩展名
+ url: row.photo_url, // 用于预览的URL
+ status: 'success', // 标记为已上传成功
+ raw: null, // 初始化为null
+ existingUrl: row.photo_url, // 保存原始URL,用于区分是否为已存在的图片
+ },
+ ];
}
+
+ // 调试输出
+ console.log('编辑表单数据:', {
+ 原始算法值: row.aiType,
+ 处理后算法值: algorithmArr,
+ 表单数据: this.form,
+ });
this.dialogVisible = true;
},
+
// 添加删除方法
handleDelete(row) {
this.$confirm('确认删除该工单?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
- type: 'warning'
- }).then(async () => {
- try {
- const response = await flowEvent({
- id: row.id,
- status: 0,
- isDelete: 1
- });
+ type: 'warning',
+ })
+ .then(async () => {
+ try {
+ const response = await flowEvent({
+ id: row.id,
+ status: 0,
+ isDelete: 1,
+ });
- if (response.data.code === 0) {
- this.$message.success('删除成功');
- this.fetchTableData();
- } else {
- throw new Error(response.data.msg || '删除失败');
+ if (response.data.code === 0) {
+ this.$message.success('删除成功');
+ this.fetchTableData();
+ } else {
+ throw new Error(response.data.msg || '删除失败');
+ }
+ } catch (error) {
+ console.error('删除失败:', error);
+ this.$message.error(error.message || '删除失败,请稍后重试');
}
- } catch (error) {
- console.error('删除失败:', error);
- this.$message.error(error.message || '删除失败,请稍后重试');
- }
- }).catch(() => { });
+ })
+ .catch(() => {});
},
// 添加选择变化处理方法
@@ -2008,7 +2837,7 @@
await this.$confirm('确认审核通过当前工单?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
- type: 'warning'
+ type: 'warning',
});
const data = {
@@ -2017,7 +2846,7 @@
isPass: 0,
eventNum: currentItem.orderNumber,
};
- console.log('删除前:', this.selections)
+ console.log('删除前:', this.selections);
const response = await flowEvent(data);
if (response.data.code === 0) {
this.$message.success('工单审核通过');
@@ -2042,7 +2871,6 @@
// 刷新表格数据
// this.fetchTableData();
this.selections = newSelections;
-
} else {
throw new Error(response.data.msg || '审核失败');
}
@@ -2054,10 +2882,10 @@
cancleBatchReject() {
this.reviewDialogVisible = false;
- this.selections = [];
- this.currentImageIndex = 1;
- this.currentReviewImage = '';
- this.fetchTableData();
+ this.selections = [];
+ this.currentImageIndex = 1;
+ this.currentReviewImage = '';
+ this.fetchTableData();
},
// 批量审核不通过
async handleBatchReject() {
@@ -2076,7 +2904,7 @@
await this.$confirm('确认该工单审核不通过?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
- type: 'warning'
+ type: 'warning',
});
const data = {
@@ -2122,9 +2950,7 @@
// 获取所有图片列表用于预览
getImageList() {
- return this.selections
- .map(item => this.getPreviewUrl(item.photo_url))
- .filter(url => url); // 过滤掉空值
+ return this.selections.map(item => this.getPreviewUrl(item.photo_url)).filter(url => url); // 过滤掉空值
},
// 处理图片点击
@@ -2167,13 +2993,130 @@
if (lastDot === -1) return url;
return url.slice(0, lastDot) + '_show' + url.slice(lastDot);
},
+
+ /**
+ * 坐标转换方法处理
+ * @param goWgs84 是否由国测转换到84,默认false----由84转换到国测
+ */
+ disposeLocation(goWgs84 = false, data) {
+ let lng = '',
+ lat = '';
+
+ if (Array.isArray(data.location) && data.location.length > 0) {
+ if (goWgs84) {
+ lng = data.location?.[0] ? String(data.location[0]) : undefined;
+ lat = data.location?.[1] ? String(data.location[1]) : undefined;
+
+ if (lng && lat) {
+ [lng, lat] = gcj02ToWgs84(Number(lng), Number(lat));
+ }
+ } else {
+ lng = Number(data.location[0]);
+ lat = Number(data.location[1]);
+
+ if (lng && lat) {
+ [lng, lat] = wgs84ToGcj02(Number(lng), Number(lat));
+ }
+ }
+ }
+
+ return [String(lng), String(lat)];
+ },
+
+ // 复核按钮
+ reCheck(row) {
+ this.reCheckData = row;
+ this.reCheckDialog = true;
+ },
+
+ // 复核确认框按钮事件
+ reCheckConfirm(key) {
+ const that = this;
+ if (key == 1) {
+ getReviewById(that.reCheckData.id).then(res => {
+ that.reCheckDialog = false;
+ that.page.currentPage = 1;
+ that.fetchTableData();
+ that.fetchTabCounts();
+ });
+ } else {
+ const loading = ElLoading.service({
+ lock: true,
+ text: '复核任务创建中……',
+ background: 'rgba(0, 0, 0, 0.7)',
+ });
+
+ function closeConfirm() {
+ that.reCheckDialog = false;
+ that.page.currentPage = 1;
+ that.fetchTableData();
+ that.fetchTabCounts();
+ loading.close();
+ }
+
+ // 获取时间的接口
+ getCreateEventJob(that.reCheckData.id)
+ .then(res => {
+ ElMessageBox.confirm(`预计复核执行时间为${res.data.data}`, '提示', {
+ confirmButtonText: '确定',
+ showCancelButton: false, // 关键配置
+ closeOnClickModal: false,
+ closeOnPressEscape: false,
+ type: 'warning',
+ })
+ .then(() => {
+ closeConfirm();
+ })
+ .catch(() => {
+ closeConfirm();
+ });
+ })
+ .catch(() => {
+ closeConfirm();
+ });
+ }
+ },
},
+ activated() {
+ this.handleReset();
+ },
+
};
</script>
-
+<style lang="scss">
+.custom-dialog { max-height: 96vh; }
+.custom-qrcode-popover {
+min-width: 120px !important;
+}
+</style>
<style lang="scss" scoped>
-.tab-content {
- padding: 10px;
+
+::v-deep(.el-tabs) {
+ height: 100%;
+ display: flex;
+ flex-direction: column;
+
+ .el-tabs__header {
+ order: 1;
+ }
+
+ .el-tabs__content {
+ order: 2;
+ }
+
+ .el-tabs__content {
+ height: 0;
+ flex: 1;
+ display: flex;
+ flex-direction: column;
+
+ .el-tab-pane {
+ height: 0;
+ flex: 1;
+ display: flex;
+ flex-direction: column;
+ }
+ }
}
.filter-bar {
@@ -2184,11 +3127,11 @@
gap: 8px; // 使用 gap 统一设置间距
.filter-item {
- width: 160px; // 减小宽度
+ width: 280px; // 减小宽度
}
.date-picker {
- width: 240px; // 日期选择器宽度适当调整
+ // width: 240px; // 日期选择器宽度适当调整
}
.el-button {
@@ -2196,33 +3139,35 @@
}
}
+.uploadImg {
+ margin-bottom: 32px;
+}
+
+.tableCss {
+ width: 100%;
+ margin-bottom: 10px;
+}
+
+.step-timer {
+ position: absolute;
+ right: 80%;
+ top: 50%;
+ transform: translateY(-50%);
+ width: 100px;
+ margin-left: 4px;
+ color: #666;
+ font-size: 12px;
+}
+
+.event-total-time {
+ text-align: center;
+ color: #666;
+ font-size: 15px;
+ margin-bottom: 12px;
+}
+
.action-bar {
margin-bottom: 16px;
-}
-
-.el-tabs {
- :deep(.el-tabs__content) {
- overflow: visible;
- }
-}
-
-.tab-content {
- min-height: 200px;
-}
-
-.detail-form {
- :deep(.el-form-item) {
- margin-bottom: 10px;
- }
-
- :deep(.el-form-item__label) {
- color: #606266;
- font-weight: normal;
- }
-
- :deep(.el-form-item__content) {
- color: #303133;
- }
}
.el-dialog {
@@ -2248,7 +3193,7 @@
.el-upload__tip {
font-size: 12px;
color: #909399;
- margin-top: 7px;
+ margin-top: 12px;
}
.create-ticket-form {
@@ -2329,20 +3274,20 @@
color: #606266;
}
- :deep(.el-input__inner) {
- height: 36px;
- line-height: 36px;
- }
+ // :deep(.el-input__inner) {
+ // height: 36px;
+ // line-height: 36px;
+ // }
:deep(.el-textarea__inner) {
padding: 8px 12px;
}
- :deep(.el-input__inner),
- :deep(.el-select),
- :deep(.el-select .el-input) {
- width: 100%; // 确保所有输入框和选择框宽度一致
- }
+ // :deep(.el-input__inner),
+ // :deep(.el-select),
+ // :deep(.el-select .el-input) {
+ // width: 100%; // 确保所有输入框和选择框宽度一致
+ // }
.full-width {
width: 100%;
@@ -2354,7 +3299,7 @@
padding-top: 16px;
border-top: 1px solid #ebeef5;
- .el-button+.el-button {
+ .el-button + .el-button {
margin-left: 12px;
}
@@ -2366,7 +3311,33 @@
}
}
}
+.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;
+ .el-button + .el-button {
+ margin-left: 12px;
+ }
+.btngroups {
+margin-left: 12px;
+}
+ .el-button {
+ padding: 9px 20px;
+ &:last-child {
+ margin-left: 12px;
+ margin-right: 12px;
+ }
+ }
+}
.map-container {
width: 100%;
height: 400px;
@@ -2441,7 +3412,17 @@
}
.detail-container {
- padding: 20px;
+ padding:0 20px;
+
+ .detail-top-title {
+ display: flex;
+ justify-content: center;
+ align-items: center;
+
+ .event-orderNumber {
+ margin-right: 10px;
+ }
+ }
}
.status-flow {
@@ -2509,24 +3490,75 @@
}
.media-section {
- margin-bottom: 20px;
+ // margin-bottom: 20px;
+
+ .el-row {
+ display: flex;
+ align-items: center;
+ }
}
+.leftBtn {
+ width: 70px;
+ height: 32px;
+ background-color: #999;
+ border-radius: 5px;
+ text-align: center;
+line-height: 32px;
+ color: #fff;
+ cursor: pointer;
+ opacity: 0.8;
+
+}
+
+.disableds {
+ background: #999 !important;
+ cursor: not-allowed !important;
+ pointer-events: none;
+ opacity: 0.3 !important;
+}
+.PopUpTableScrolls{
+height: 600px;
+overflow-y: scroll;
+overflow-x: hidden;
+}
.media-box {
+ width: 100%;
border: 1px solid #dcdfe6;
border-radius: 4px;
padding: 10px;
background: #fff;
-}
+ box-sizing: border-box;
-.media-title {
- font-weight: bold;
- margin-bottom: 10px;
-}
+ .media-title {
+ font-weight: bold;
+ margin-bottom: 5px;
+ display: flex;
+ align-items: center;
+ .QRCodeImg{
+ width: 18px;
+ height: 18px;
+ cursor: pointer;
+ padding-bottom: 1px;
+ }
+ }
-.media-content {
- position: relative;
- // height: 300px;
+ .media-content {
+ position: relative;
+ height: 500px;
+
+ :deep(.el-image) {
+ width: 100% !important;
+ max-width: 100%;
+ max-height: 100%;
+
+ .el-image__inner {
+ width: 100%;
+ height: 100%;
+ object-fit: cover !important;
+ }
+ }
+ }
}
.image-placeholder,
@@ -2576,12 +3608,12 @@
background-color: #f5f7fa;
padding: 12px;
border-radius: 4px;
- min-height: 40px;
+ min-height: 30px;
color: #606266;
line-height: 1.5;
display: block;
text-align: left;
-
+margin-bottom: 5px;
&:first-child {
font-weight: bold;
margin-bottom: 4px;
@@ -2590,7 +3622,7 @@
// 添加删除按钮样式
.danger-button {
- color: #F56C6C;
+ color: #f56c6c;
}
.danger-button:hover {
@@ -2599,23 +3631,23 @@
.custom-steps-container {
width: 100%;
- margin: 20px 0;
+ margin: 10px 0;
}
.steps-titles {
display: flex;
justify-content: space-between;
- margin-bottom: 16px;
+ margin-bottom: 14px;
position: relative;
}
.step-title {
text-align: center;
flex: 1;
- font-size: 16px;
+ font-size: 14px;
color: #999;
position: relative;
- padding-bottom: 10px;
+ padding-bottom: 5px;
}
.step-title.active {
@@ -2627,7 +3659,7 @@
text-align: center;
font-size: 20px;
font-weight: bold;
- margin-bottom: 12px;
+ margin-bottom: 5px;
color: #333;
}
@@ -2674,6 +3706,13 @@
// 添加新的样式
.review-dialog {
+ :deep(.el-dialog__body) {
+ padding: 0;
+ background-color: #f5f7fa;
+ }
+}
+
+.re-check-dialog {
:deep(.el-dialog__body) {
padding: 0;
background-color: #f5f7fa;
@@ -2759,7 +3798,6 @@
background-color: #fff;
:deep(.el-pagination) {
-
.btn-prev,
.btn-next {
display: none;
@@ -2800,12 +3838,12 @@
height: 100px;
line-height: 100px;
}
-
+
/* 隐藏额外的上传按钮 */
:deep(.el-upload.el-upload--picture-card) {
display: none;
}
-
+
/* 当没有图片时显示上传按钮 */
:deep(.el-upload.el-upload--picture-card:first-child) {
display: flex;
@@ -2815,20 +3853,6 @@
:deep(.el-upload-list--picture-card .el-upload-list__item) {
width: 120px;
height: 100px;
- }
-}
-
-/* 事件图片和处理图片的预览样式 */
-.media-content {
- :deep(.el-image) {
- width: 700px !important;
- height: 520px !important;
-
- .el-image__inner {
- width: 100%;
- height: 100%;
- object-fit: contain;
- }
}
}
@@ -2845,9 +3869,9 @@
.required-label {
position: relative;
display: inline-block;
-
+
.required-star {
- color: #F56C6C;
+ color: #f56c6c;
margin-right: 4px;
}
}
@@ -2855,12 +3879,12 @@
/* 必填输入框样式 */
.required-input {
width: 100%;
-
+
:deep(.el-input__inner),
:deep(.el-textarea__inner) {
&:focus {
- border-color: #409EFF;
+ border-color: #409eff;
}
}
}
-</style>
\ No newline at end of file
+</style>
--
Gitblit v1.9.3