| | |
| | | collapse-tags-tooltip |
| | | clearable |
| | | @check="handleCheck" |
| | | @node-click="handleSFNodeClick" |
| | | @clear="handleClear" |
| | | /> |
| | | </el-form-item> |
| | |
| | | @click="openReviewDialog" |
| | | >批量审核 |
| | | </el-button> |
| | | |
| | | <el-button |
| | | v-if="permissionList.exportBtn" |
| | | type="success" |
| | |
| | | >详情 |
| | | </el-button> |
| | | </template> |
| | | |
| | | |
| | | <template v-if="row.status === 4 && activeTab === 'completed'"> |
| | | <el-button type="text" icon="el-icon-download" @click="exportTheTick(row)" |
| | | >导出 |
| | | </el-button> |
| | | </template> |
| | | <template v-if="permission.tickets_repeat_review"> |
| | | <el-button |
| | | v-if="row.status === 4 && row.isReview !== 1" |
| | |
| | | :src="getThumbUrl(currentDetail.mediaUrl)" |
| | | :preview-src-list="[getPreviewUrl(currentDetail.mediaUrl)]" |
| | | fit="contain" |
| | | style="pxToRemNum(width: 700px); pxToRemNum(height: 520px); cursor: pointer" |
| | | style=" cursor: pointer" |
| | | > |
| | | <template #placeholder> |
| | | <div class="image-placeholder"> |
| | |
| | | getStepInfo, |
| | | getReviewById, |
| | | getCreateEventJob, |
| | | exportTheTicket |
| | | } from '@/api/tickets/ticket'; |
| | | import { getSFDictionaryTree } from '@/api/job/task'; |
| | | import { export_json_to_excel } from '@/utils/exportExcel'; |
| | |
| | | { 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, overHidden: true }, |
| | | { label: '发起任务时间', prop: 'startTime', width: 160, overHidden: true }, |
| | | { label: '关联算法', prop: 'aiType', overHidden: true, tooltip: true }, |
| | | { |
| | | label: '工单类型', |
| | |
| | | try { |
| | | const currentTab = this.tabs.find(tab => tab.name === this.activeTab); |
| | | const params = { |
| | | word_order_types: this.filters.type || undefined, |
| | | // word_order_types: this.filters.type || undefined, |
| | | ai_types: this.filters.type || undefined, // 算法使用该字段筛选 |
| | | status: |
| | | currentTab?.name === 'myTickets' |
| | | ? undefined |
| | |
| | | |
| | | user_id: currentTab?.name === 'myTickets' ? this.userInfo.user_id : undefined, |
| | | is_review: this.filters.isReview === '' ? undefined : this.filters.isReview, // 添加复核状态查询参数 |
| | | }; |
| | | source:1 ,//数据来源 |
| | | }; |
| | | |
| | | const response = await getList(params); |
| | | if (!response?.data?.data?.records) { |
| | |
| | | orderName: item.event_name, |
| | | department: |
| | | this.departments.find(d => d.value === item.dept_id)?.label || item.dept_name, |
| | | startTime: item.create_time, |
| | | startTime: item.job_create_time || '/', |
| | | aiType: item.ai_types, |
| | | content: item.content, // 将后端返回的 content 映射为 content |
| | | type: item.work_order_type_dict_key, |
| | |
| | | ? `${longitude.toFixed(6)}, ${latitude.toFixed(6)}` |
| | | : '未知位置', |
| | | address: item.address, |
| | | creator: item.event_num?.slice(0, 2) === 'AI' ? 'AI 小飞' : item.create_user, |
| | | creator: item.event_num?.slice(0, 2) === 'AI' ? '智飞agent' : item.create_user, |
| | | handler: item.update_user || '未分配', |
| | | status: Number(item.status || 0), |
| | | // 保存原始字段 |
| | |
| | | job_name: item.job_name || '', |
| | | job_create_time: item.job_create_time || '', |
| | | isReview: item.is_review, // 添加复核状态字段映射 |
| | | |
| | | |
| | | }; |
| | | }); |
| | | |
| | |
| | | }; |
| | | |
| | | 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) { |
| | |
| | | // console.log('权限检查:', this.permission) |
| | | return this.permission && this.permission.tickets_review_btn === true; |
| | | }, |
| | | |
| | | async submitDispatch() { |
| | | if (this.dispatchLoading) return; |
| | | if (!this.currentDetail.orderName || !this.currentDetail.orderName.trim()) { |
| | |
| | | } |
| | | this.dispatchLoading = true; |
| | | console.log('派发成功', this.currentDetail); |
| | | const isValue = this.algorithms.some(item => item.value === this.currentDetail.aiType); |
| | | let resultValue; |
| | | |
| | | if (isValue) { |
| | | // 如果已经是value,直接使用 |
| | | resultValue = this.currentDetail.aiType; |
| | | } else { |
| | | // 否则查找对应的value |
| | | const matched = this.algorithms.find( |
| | | item => item.dict_value === this.currentDetail.aiType || |
| | | item.label === this.currentDetail.aiType |
| | | ); |
| | | resultValue = matched ? matched.value : null; |
| | | } |
| | | |
| | | // console.log('resultValue',resultValue); |
| | | this.$refs.dispatchForm.validate(async valid => { |
| | | if (valid) { |
| | | try { |
| | |
| | | content: this.currentDetail.content, // 使用 content 替代原来的 remark |
| | | createDept: this.dispatchForm.department, // 派发部门 ID |
| | | updateUser: this.dispatchForm.handler, // 处理人 ID |
| | | aiType: this.currentDetail.aiType, |
| | | aiType:resultValue, |
| | | }; |
| | | console.log('派发', data); |
| | | |
| | |
| | | }); |
| | | } |
| | | }, |
| | | // 导出工单报表 |
| | | exportTheTick(row){ |
| | | const params = { |
| | | num:row.orderNumber |
| | | } |
| | | exportTheTicket(params).then(res=>{ |
| | | const elink = document.createElement('a') |
| | | elink.download = row.orderName + '.docx' |
| | | elink.style.display = 'none' |
| | | const blob = new Blob([res.data]) |
| | | elink.href = URL.createObjectURL(blob) |
| | | document.body.appendChild(elink) |
| | | elink.click() |
| | | document.body.removeChild(elink) |
| | | }) |
| | | this.$message.success('数据导出成功'); |
| | | } |
| | | }, |
| | | activated() { |
| | | this.handleReset(); |