| | |
| | | </template> |
| | | </template> |
| | | <template #status="{ row }"> |
| | | <span :style="getStatusTagType(row.status) ? 'color:' + getStatusTagType(row.status) : ''"> |
| | | {{ mapStatus(row.status) }} |
| | | </span> |
| | | </template> |
| | | <span :style="getStatusTagType(row.status) ? 'color:' + getStatusTagType(row.status) : ''"> |
| | | {{ mapStatus(row.status) }} |
| | | </span> |
| | | </template> |
| | | <template #keyData="{ row }"> |
| | | <span>{{ row.address }}</span> |
| | | </template> |
| | |
| | | </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" |
| | | :on-change="handleFileChange" |
| | | :on-remove="handleUploadRemove" |
| | | :before-upload="beforeUpload" |
| | | :file-list="form.photos" |
| | | :limit="1" |
| | | accept="image/*" |
| | | class="create-upload"> |
| | | <el-upload ref="upload" :action="'#'" :auto-upload="false" list-type="picture-card" |
| | | :on-change="handleFileChange" :on-remove="handleUploadRemove" :before-upload="beforeUpload" |
| | | :file-list="form.photos" :limit="1" accept="image/*" class="create-upload"> |
| | | <template v-if="form.photos.length < 1"> |
| | | <i class="el-icon-plus">+</i> |
| | | </template> |
| | |
| | | <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> |
| | | |
| | | <!-- 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"> |
| | |
| | | <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 === '工单类型' || row.label2 === '工单内容')" |
| | | class="required-label"> |
| | | <span class="required-star">*</span>{{ row.label2 }} |
| | | </span> |
| | | <span v-else>{{ row.label2 }}</span> |
| | |
| | | </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" /> |
| | | <el-input type="textarea" v-model="currentDetail.content" placeholder="请输入工单内容" |
| | | class="required-input" /> |
| | | </template> |
| | | <template v-else>{{ row.value2 }}</template> |
| | | </template> |
| | |
| | | 上传图片 |
| | | </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/*" |
| | | <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> |
| | |
| | | </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="70%" append-to-body custom-class="review-dialog" |
| | | @close="cancleBatchReject"> |
| | | <div class="review-container"> |
| | | <div class="review-image-wrapper"> |
| | | <!-- 修改左右箭头的显示条件 --> |
| | |
| | | page: true, |
| | | column: [ |
| | | // { label: "序号", prop: "id", width: 70 }, |
| | | { label: "工单编号", prop: "orderNumber", width: 150 }, |
| | | { label: "工单编号", prop: "orderNumber", width: 150 ,overHidden: true, tooltip: true}, |
| | | { label: "工单名称", prop: "orderName", width: 170, overHidden: true, tooltip: true }, |
| | | { label: "所属单位", prop: "department", width: 100 }, |
| | | { label: "所属单位", prop: "department", width: 100 ,overHidden: true, tooltip: true}, |
| | | { label: "发起时间", prop: "startTime", width: 160 }, |
| | | { label: "关联算法", prop: "aiType", width: 160 }, |
| | | { label: "工单类型", prop: "type", width: 108 }, |
| | | { label: "关联算法", prop: "aiType", width: 160 ,overHidden: true, tooltip: true}, |
| | | { label: "工单类型", prop: "type", width: 120 ,overHidden: true, tooltip: true}, |
| | | { |
| | | label: "工单内容", |
| | | prop: "content", |
| | | slot: true, |
| | | width: 212, |
| | | width: 190, |
| | | overHidden: true |
| | | }, |
| | | { label: "创建人", prop: "creator", width: 100 }, |
| | |
| | | startTime: item.create_time, |
| | | aiType: item.ai_types, |
| | | content: item.content, // 将后端返回的 content 映射为 content |
| | | type: this.types.find(t => t.value === item.work_order_type_dict_key)?.label, |
| | | type: this.types.find(t => t.value === item.event_dict_key)?.label, |
| | | keyData: (!isNaN(longitude) && !isNaN(latitude)) |
| | | ? `${longitude.toFixed(6)}, ${latitude.toFixed(6)}` |
| | | : '未知位置', |
| | |
| | | longitude: String(this.form.location[0]), |
| | | latitude: String(this.form.location[1]), |
| | | address: this.form.address, |
| | | workOrderTypeDictKey: this.form.type, |
| | | eventDictKey: this.form.type, |
| | | aiType: Array.isArray(this.form.algorithm) ? this.form.algorithm : [this.form.algorithm], // 传数组 |
| | | updateUser: this.form.handler, |
| | | createDept: this.form.department, |
| | |
| | | longitude: this.form.location?.[0] ? String(this.form.location[0]) : undefined, |
| | | latitude: this.form.location?.[1] ? String(this.form.location[1]) : undefined, |
| | | address: this.form.address || undefined, |
| | | workOrderTypeDictKey: this.form.type || undefined, |
| | | eventDictKey: this.form.type || undefined, |
| | | aiType: Array.isArray(this.form.algorithm) ? this.form.algorithm : [this.form.algorithm], // 传数组 |
| | | updateUser: handlerValue, |
| | | createDept: this.form.department || undefined, |
| | |
| | | }, |
| | | |
| | | getStatusTagType(status) { |
| | | // 草稿不加颜色 |
| | | if (status === -1 || status === "-1") return ''; |
| | | // 状态颜色映射 |
| | | const colorMap = { |
| | | "0": "#ffb6b6", // 待处理-淡红 |
| | | "3": "#e57373", // 处理中-更淡红 |
| | | "2": "#faad14", // 待审核-橙色 |
| | | "4": "#a0cfff", // 已完成-淡蓝 |
| | | "5": "#67c23a", // 已完结-绿色 |
| | | }; |
| | | return colorMap[String(status)] || ''; |
| | | }, |
| | | // 草稿不加颜色 |
| | | if (status === -1 || status === "-1") return ''; |
| | | // 状态颜色映射 |
| | | const colorMap = { |
| | | "0": "#ffb6b6", // 待处理-淡红 |
| | | "3": "#e57373", // 处理中-更淡红 |
| | | "2": "#faad14", // 待审核-橙色 |
| | | "4": "#a0cfff", // 已完成-淡蓝 |
| | | "5": "#67c23a", // 已完结-绿色 |
| | | }; |
| | | return colorMap[String(status)] || ''; |
| | | }, |
| | | |
| | | async fetchTabCounts() { |
| | | try { |
| | |
| | | 发起时间: item.create_time || '', |
| | | 关联算法: item.ai_types || '', |
| | | 工单内容: item.address || '', |
| | | 工单类型: this.types.find(t => t.value === item.work_order_type_dict_key)?.label || '', |
| | | 工单类型: 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 || '', |
| | |
| | | }, |
| | | async approveAndDispatch() { |
| | | if (this.dispatchLoading) return; |
| | | |
| | | |
| | | // 添加必填项检查 |
| | | if (!this.currentDetail.orderName || !this.currentDetail.orderName.trim()) { |
| | | this.$message.warning('请填写工单名称'); |
| | |
| | | this.$message.warning('请填写工单内容'); |
| | | return; |
| | | } |
| | | |
| | | |
| | | // 通过验证后,打开派发对话框 |
| | | this.dispatchDialogVisible = true; |
| | | }, |
| | |
| | | } |
| | | |
| | | // 获取工单类型值 - 从types中找到匹配的值 |
| | | const typeValue = this.types.find(t => t.label === row.type)?.value || row.work_order_type_dict_key; |
| | | const typeValue = this.types.find(t => t.label === row.type)?.value || row.event_dict_key; |
| | | |
| | | // 获取处理人ID - 使用userNameToIdMap映射 |
| | | const handlerId = this.userNameToIdMap[row.handler] || row.handler; |
| | |
| | | |
| | | cancleBatchReject() { |
| | | this.reviewDialogVisible = false; |
| | | this.selections = []; |
| | | this.currentImageIndex = 1; |
| | | this.currentReviewImage = ''; |
| | | this.fetchTableData(); |
| | | this.selections = []; |
| | | this.currentImageIndex = 1; |
| | | this.currentReviewImage = ''; |
| | | this.fetchTableData(); |
| | | }, |
| | | // 批量审核不通过 |
| | | async handleBatchReject() { |
| | |
| | | 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; |
| | |
| | | :deep(.el-image) { |
| | | width: 700px !important; |
| | | height: 520px !important; |
| | | |
| | | |
| | | .el-image__inner { |
| | | width: 100%; |
| | | height: 100%; |
| | |
| | | .required-label { |
| | | position: relative; |
| | | display: inline-block; |
| | | |
| | | |
| | | .required-star { |
| | | color: #F56C6C; |
| | | margin-right: 4px; |
| | |
| | | /* 必填输入框样式 */ |
| | | .required-input { |
| | | width: 100%; |
| | | |
| | | |
| | | :deep(.el-input__inner), |
| | | :deep(.el-textarea__inner) { |
| | | &:focus { |