From 5758791a82dcbece39f27e60aab163d723e0207e Mon Sep 17 00:00:00 2001
From: chenyao <1219716595@qq.com>
Date: Wed, 16 Jul 2025 08:59:45 +0800
Subject: [PATCH] Merge branch 'test' of http://139.196.74.78:10010/r/drone/drone-web-manage into test
---
src/views/tickets/ticket.vue | 33 ++++++++++++++++++++++++++-------
1 files changed, 26 insertions(+), 7 deletions(-)
diff --git a/src/views/tickets/ticket.vue b/src/views/tickets/ticket.vue
index 8f0b377..0a36838 100644
--- a/src/views/tickets/ticket.vue
+++ b/src/views/tickets/ticket.vue
@@ -148,9 +148,9 @@
</el-col>
<el-col :span="12">
<el-form-item label="附件图片" prop="photos" required class="upload-wrapper">
- <el-upload ref="upload" :action="'#'" :auto-upload="false" list-type="picture-card"
+ <el-upload v-if="createoredit === 1" 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">
+ :file-list="form.photos" :limit="1" accept="image/*" class="create-upload">
<template v-if="form.photos.length < 1">
<!-- <i class="el-icon-plus">+</i> -->
<div class="el-icon-plus">
@@ -158,7 +158,16 @@
</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>
</el-form-item>
</el-col>
@@ -512,6 +521,7 @@
import { ElMessageBox, ElLoading } from 'element-plus'
import { calculateDefaultRange } from '@/utils/util'
import { gcj02ToWgs84, wgs84ToGcj02 } from '@/utils/coordinateTransformation'
+import _ from 'lodash'
import {
getList,
createTicket,
@@ -543,6 +553,7 @@
dispatchLoading: false,
completeLoading: false,
finalizeLoading: false,
+ createoredit:'',
activeTab: 'all',
// tabs 只保留静态结构,不做权限判断
tabs: [
@@ -900,7 +911,7 @@
{ 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.address || this.currentDetail.latAndLon }, // 包含经纬度信息
{ label: '关联算法', value: this.currentDetail.aiType },
{ label: '发起单位', value: this.currentDetail.department },
{ label: '发起任务时间', value: this.currentDetail.startTime },
@@ -1508,6 +1519,8 @@
},
handleAdd () {
+
+ this.createoredit =1
this.dialogVisible = true
this.mapParams.center = null
this.form.location = []
@@ -1589,8 +1602,8 @@
})
}
this.currentDetail.status = row.status
-
-
+
+
} catch (error) {
if (this.activeTab === 'myTickets') {
const statusArr = this.workType === 1 ? ['3', '4'] : this.fixedStatuses
@@ -1603,8 +1616,13 @@
this.stepInfos = []
}
}
+ console.log(detailData,'detailDatadetailDatadetailData');
+ this.currentDetail = {
+ ...detailData,
+ address:null,
+ latAndLon: _.round(detailData.location[0],6) + ',' + _.round(detailData.location[1],6)
+ }
- this.currentDetail = detailData
console.log('this.currentDetail',this.currentDetail);
this.detailVisible = true
this.$nextTick(() => {
@@ -2019,6 +2037,7 @@
// 添加编辑方法
handleEdit (row) {
+ this.createoredit = 2
console.log('编辑原始数据:', row)
// 尝试从row.dept_id或通过部门名称查找对应的部门ID
--
Gitblit v1.9.3