| | |
| | | > |
| | | <basic-main-content> |
| | | <!-- 查询条件筛选栏 --> |
| | | <div class="filter-bar"> |
| | | <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" |
| | | 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" |
| | | 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-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" @click="handleSearch">搜索</el-button> |
| | | <el-button icon="el-icon-refresh" @click="handleReset">清空</el-button> |
| | | </div> |
| | | <!-- 查询条件筛选栏 --> |
| | | <div class="ztzf-form-search"> |
| | | <el-form :model="filters" inline> |
| | | <el-row :gutter="24"> |
| | | <el-col :span="4"> |
| | | <el-form-item label="关键字:"> |
| | | <el-input |
| | | v-model="filters.keyword" |
| | | placeholder="请输入关键字" |
| | | class="filter-item" |
| | | clearable |
| | | @clear="handleKeyWords" |
| | | @keyup.enter="handleSearch" |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | |
| | | <!-- <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-col :span="5"> |
| | | <el-form-item label="选择日期:"> |
| | | <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-form-item> |
| | | </el-col> |
| | | <el-col :span="4"> |
| | | <el-form-item label="选择状态:"> |
| | | <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-form-item> |
| | | </el-col> |
| | | |
| | | <!-- <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-col :span="4"> |
| | | <el-form-item label="选择算法:"> |
| | | <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" |
| | | @clear="handleClear" |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="4"> |
| | | <el-form-item label="复核状态:"> |
| | | <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-form-item> |
| | | </el-col> |
| | | <el-col :span="3"> |
| | | <el-button type="primary" icon="el-icon-search" @click="handleSearch" |
| | | >搜索</el-button |
| | | > |
| | | <el-button icon="el-icon-refresh" @click="handleReset">清空</el-button> |
| | | </el-col> |
| | | </el-row> |
| | | </el-form> |
| | | </div> |
| | | <!-- 表格部分 --> |
| | | <avue-crud class="ztzf-public-general-avue-crud" ref="avueCrud" v-model="tableData" :option="option" |
| | | :data="tableData" v-model:page="page" @size-change="sizeChange" @current-change="handleCurrentChange" |
| | | @refresh-change="refreshChange" :table-loading="loading" @selection-change="handleSelectionChange" |
| | | :permission="permissionList" v-if="activeTab === tab.name"> |
| | | <avue-crud |
| | | class="ztzf-public-general-avue-crud" |
| | | ref="avueCrud" |
| | | v-model="tableData" |
| | | :option="option" |
| | | :data="tableData" |
| | | v-model:page="page" |
| | | @size-change="sizeChange" |
| | | @current-change="handleCurrentChange" |
| | | @refresh-change="refreshChange" |
| | | :table-loading="loading" |
| | | @selection-change="handleSelectionChange" |
| | | :permission="permissionList" |
| | | v-if="activeTab === tab.name" |
| | | > |
| | | <template #orderNumber="{ row }"> |
| | | <el-tooltip-copy :content="row.orderNumber" :showCopyText="true" textAlign="left"> |
| | | {{ row.orderNumber }} |
| | |
| | | type="primary" |
| | | icon="el-icon-plus" |
| | | @click="handleAdd" |
| | | >新建工单</el-button |
| | | > |
| | | >新建工单 |
| | | </el-button> |
| | | <el-button |
| | | v-if="activeTab === 'pending' && permissionList.reviewBtn" |
| | | type="success" |
| | | icon="el-icon-check" |
| | | @click="openReviewDialog" |
| | | >批量审核</el-button |
| | | > |
| | | >批量审核 |
| | | </el-button> |
| | | |
| | | <el-button |
| | | v-if="permissionList.exportBtn" |
| | | type="success" |
| | | plain |
| | | icon="el-icon-download" |
| | | @click="exportData" |
| | | >导出</el-button |
| | | > |
| | | >导出 |
| | | </el-button> |
| | | </template> |
| | | <template #menu="{ row }"> |
| | | <template v-if="row.status === -1"> |
| | |
| | | icon="el-icon-delete" |
| | | class="danger-button" |
| | | @click="handleDelete(row)" |
| | | >删除</el-button |
| | | > |
| | | >删除 |
| | | </el-button> |
| | | </template> |
| | | |
| | | <template v-else> |
| | | <el-button type="text" icon="el-icon-view" @click="handleViewDetail(row)" |
| | | >详情</el-button |
| | | > |
| | | >详情 |
| | | </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" |
| | | type="text" |
| | | icon="el-icon-check" |
| | | @click="reCheck(row)" |
| | | >复核</el-button |
| | | > |
| | | >复核 |
| | | </el-button> |
| | | </template> |
| | | </template> |
| | | <template #status="{ row }"> |
| | |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="工单类型" prop="type"> |
| | | |
| | | <el-select @change="handleTypeChange" v-model="form.type" placeholder="请选择工单类型" class="full-width" > |
| | | <el-select |
| | | @change="handleTypeChange" |
| | | v-model="form.type" |
| | | placeholder="请选择工单类型" |
| | | class="full-width" |
| | | > |
| | | <el-option |
| | | v-for="item in types" |
| | | :key="item.value" |
| | |
| | | |
| | | <el-row :gutter="16"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="所属部门" prop="department"> |
| | | <el-form-item label="处理部门" prop="department"> |
| | | <el-select |
| | | v-model="form.department" |
| | | placeholder="请选择所属部门" |
| | | placeholder="请选择处理部门" |
| | | @change="handleDepartmentChange" |
| | | class="full-width" |
| | | > |
| | |
| | | <el-form-item label="处理人员" prop="handler"> |
| | | <el-select |
| | | v-model="form.handler" |
| | | placeholder="请先选择所属部门" |
| | | placeholder="请先选择处理人员" |
| | | :disabled="!form.department" |
| | | class="full-width" |
| | | > |
| | |
| | | :disabled="!form.type" |
| | | > |
| | | <el-option |
| | | v-for="item in algorithms" |
| | | v-for="item in algorithms2" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value" |
| | |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="选择位置" prop="location"> |
| | | <el-form-item label="事件位置" prop="location"> |
| | | <div class="location-wrapper"> |
| | | <avue-input-map |
| | | v-model="form.location" |
| | |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="附件图片" prop="photos" required class="upload-wrapper"> |
| | | <el-form-item label="事件图片" prop="photos" required class="upload-wrapper"> |
| | | <el-upload |
| | | v-if="createoredit === 1" |
| | | ref="upload" |
| | |
| | | </div> |
| | | </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 |
| | | > |
| | | <div class="dialog-footer-new"> |
| | | <el-button |
| | | type="danger" |
| | | :loading="submitLoading" |
| | | @click="submitForm" |
| | | icon="el-icon-position" |
| | | >发布 |
| | | </el-button> |
| | | <el-button |
| | | type="infoprimary" |
| | | plain |
| | | :loading="draftLoading" |
| | | @click="saveDraft" |
| | | icon="el-icon-document-add" |
| | | >存草稿 |
| | | </el-button> |
| | | |
| | | |
| | | <el-button @click="handleCancel">取 消</el-button> |
| | | <el-button @click="handleCancel" icon="el-icon-circle-close">取 消</el-button> |
| | | </div> |
| | | </template> |
| | | </el-dialog> |
| | | |
| | | <!-- 工单详情对话框 --> |
| | | <el-dialog class="custom-dialog" align-center v-model="detailVisible" title="工单详情" width="80%" append-to-body> |
| | | <el-dialog |
| | | class="custom-dialog" |
| | | align-center |
| | | v-model="detailVisible" |
| | | title="工单详情" |
| | | width="80%" |
| | | append-to-body |
| | | > |
| | | <div class="detail-container"> |
| | | <div class="detail-top-title"> |
| | | <div class="event-title-center event-orderNumber"> |
| | |
| | | </el-steps> |
| | | </div> |
| | | |
| | | <div class="PopUpTableScrolls"> |
| | | <div class="PopUpTableScrolls"> |
| | | <!-- 基本信息表格 --> |
| | | <el-table :show-header="false" :data="formattedDetailFields" border class="tableCss"> |
| | | <el-table-column prop="label1" label="基本信息" width="150"> |
| | | <template #default="{ row }"> |
| | | <!-- 添加必填星号的标签 --> |
| | | <span |
| | | v-if="currentDetail.status === 0 &&(row.label1 === '关联算法' || row.label1 === '工单名称')" |
| | | class="required-label" |
| | | > |
| | | <span class="required-star">*</span>{{ row.label1 }} |
| | | </span> |
| | | <span v-else>{{ row.label1 }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column> |
| | | <template #default="{ row }"> |
| | | <template |
| | | v-if=" |
| | | currentDetail.status === 0 && |
| | | row.label1 === '工单名称' && |
| | | hasProcessingBtnPermission() |
| | | " |
| | | > |
| | | <el-input |
| | | v-model="currentDetail.orderName" |
| | | placeholder="请输入工单名称" |
| | | class="required-input" |
| | | /> |
| | | </template> |
| | | <template |
| | | v-else-if=" |
| | | currentDetail.status === 0 && |
| | | row.label1 === '关联算法' && |
| | | hasProcessingBtnPermission() |
| | | " |
| | | > |
| | | <el-select |
| | | v-model="currentDetail.aiType" |
| | | placeholder="请选择关联算法" |
| | | class="required-input" |
| | | <el-table :show-header="false" :data="formattedDetailFields" border class="tableCss"> |
| | | <el-table-column prop="label1" label="基本信息" width="150"> |
| | | <template #default="{ row }"> |
| | | <!-- 添加必填星号的标签 --> |
| | | <span |
| | | v-if=" |
| | | currentDetail.status === 0 && |
| | | (row.label1 === '关联算法' || row.label1 === '工单名称') |
| | | " |
| | | class="required-label" |
| | | > |
| | | <el-option |
| | | v-for="item in algorithms" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value" |
| | | <span class="required-star">*</span>{{ row.label1 }} |
| | | </span> |
| | | <span v-else>{{ row.label1 }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column> |
| | | <template #default="{ row }"> |
| | | <template |
| | | v-if=" |
| | | currentDetail.status === 0 && |
| | | row.label1 === '工单名称' && |
| | | hasProcessingBtnPermission() |
| | | " |
| | | > |
| | | <el-input |
| | | v-model="currentDetail.orderName" |
| | | placeholder="请输入工单名称" |
| | | class="required-input" |
| | | /> |
| | | </el-select> |
| | | </template> |
| | | <template v-else>{{ row.value1 }}</template> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="label2" label="基本信息" width="150"> |
| | | <template #default="{ row }"> |
| | | <!-- 添加必填星号的标签 --> |
| | | |
| | | <span |
| | | v-if=" |
| | | currentDetail.status === 0 && |
| | | row.label2 === '工单内容' |
| | | " |
| | | class="required-label" |
| | | > |
| | | <span class="required-star">*</span>{{ row.label2 }} |
| | | </span> |
| | | <span v-else>{{ row.label2 }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column> |
| | | <template #default="{ row }"> |
| | | <!-- 修改工单类型和工单内容的显示 --> |
| | | |
| | | |
| | | <template |
| | | v-if=" |
| | | currentDetail.status === 0 && |
| | | row.label2 === '工单内容' && |
| | | hasProcessingBtnPermission() |
| | | " |
| | | > |
| | | <el-input |
| | | type="textarea" |
| | | v-model="currentDetail.content" |
| | | placeholder="请输入工单内容" |
| | | class="required-input" |
| | | /> |
| | | </template> |
| | | <template v-else>{{ row.value2 }}</template> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | |
| | | <!-- 事件处理详情 --> |
| | | <div v-if="[3, 4].includes(currentDetail.status)" class="form-section"> |
| | | <div class="section-title"> |
| | | <!-- 处理中状态显示必填星号 --> |
| | | <template v-if="currentDetail.status === 3"> |
| | | <span class="required-label"> <span class="required-star">*</span>事件处理详情 </span> |
| | | </template> |
| | | <template v-else> 事件处理详情 </template> |
| | | </div> |
| | | <!-- 处理中状态显示输入框 --> |
| | | <template v-if="currentDetail.status === 3 && hasProcessedAndOverBtnPermission()"> |
| | | <el-input |
| | | type="textarea" |
| | | v-model="currentDetail.processingDetail" |
| | | placeholder="请输入事件处理详情" |
| | | :rows="4" |
| | | style="width: 100%; margin-bottom: 10px" |
| | | /> |
| | | </template> |
| | | <!-- 已完成和已完结状态显示只读文本 --> |
| | | <template v-else> |
| | | <div class="readonly-processing-detail"> |
| | | {{ currentDetail.processingDetail }} |
| | | </div> |
| | | </template> |
| | | </div> |
| | | |
| | | <!-- 上传图片 --> |
| | | <div v-if="[3].includes(currentDetail.status)" class="form-section uploadImg"> |
| | | <div class="section-title" v-if="hasProcessedAndOverBtnPermission()"> |
| | | <!-- 已完成状态显示必填星号 --> |
| | | <template v-if="currentDetail.status === 3"> |
| | | <span class="required-label"> <span class="required-star">*</span>上传图片 </span> |
| | | </template> |
| | | <template v-else> 上传图片 </template> |
| | | </div> |
| | | <el-upload |
| | | v-if="hasProcessedAndOverBtnPermission()" |
| | | ref="upload" |
| | | :action="'#'" |
| | | :auto-upload="false" |
| | | list-type="picture-card" |
| | | :on-change="handleFileChange" |
| | | :on-remove="handleUploadRemove" |
| | | :before-upload="beforeUpload" |
| | | :file-list="currentDetail.photos || []" |
| | | :limit="1" |
| | | accept="image/*" |
| | | class="detail-upload" |
| | | > |
| | | <template v-if="!currentDetail.photos || currentDetail.photos.length < 1"> |
| | | <!-- <i class="el-icon-plus">+</i> --> |
| | | <div class="el-icon-plus"> |
| | | <span>+</span> |
| | | </div> |
| | | </template> |
| | | </el-upload> |
| | | <div class="el-upload__tip" v-if="hasProcessedAndOverBtnPermission()"> |
| | | (上传照片即可完结工单,只能上传jpg、jpeg、png照片,且不超过5M) |
| | | </div> |
| | | </div> |
| | | |
| | | <!-- 图片和地图部分 --> |
| | | <div class="media-section"> |
| | | <el-row :gutter="20"> |
| | | |
| | | <el-col :span="12"> |
| | | <div class="media-box"> |
| | | <div class="media-title">事件图片</div> |
| | | <div class="media-content"> |
| | | <el-image |
| | | v-if="currentDetail.mediaUrl" |
| | | :src="getThumbUrl(currentDetail.mediaUrl)" |
| | | :preview-src-list="[getPreviewUrl(currentDetail.mediaUrl)]" |
| | | fit="contain" |
| | | style="width: 700px; height: 520px; cursor: pointer" |
| | | </template> |
| | | <template |
| | | v-else-if=" |
| | | currentDetail.status === 0 && |
| | | row.label1 === '关联算法' && |
| | | hasProcessingBtnPermission() |
| | | " |
| | | > |
| | | <el-select |
| | | v-model="currentDetail.aiType" |
| | | placeholder="请选择关联算法" |
| | | class="required-input" |
| | | > |
| | | <template #placeholder> |
| | | <div class="image-placeholder"> |
| | | <i class="el-icon-picture-outline"></i> |
| | | <span>加载中...</span> |
| | | </div> |
| | | </template> |
| | | <template #error> |
| | | <div class="image-error"> |
| | | <i class="el-icon-picture-outline"></i> |
| | | <span>加载失败</span> |
| | | </div> |
| | | </template> |
| | | </el-image> |
| | | <div v-else class="no-media">暂无图片/视频</div> |
| | | </div> |
| | | </div> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <div class="media-box"> |
| | | <!-- 根据状态显示不同的标题和内容 --> |
| | | <el-option |
| | | v-for="item in algorithms2" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value" |
| | | /> |
| | | </el-select> |
| | | </template> |
| | | <template v-else>{{ row.value1 }}</template> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="label2" label="基本信息" width="150"> |
| | | <template #default="{ row }"> |
| | | <!-- 添加必填星号的标签 --> |
| | | |
| | | <template v-if="currentDetail.status === 4"> |
| | | <div class="media-title">工单处理图片</div> |
| | | <span |
| | | v-if="currentDetail.status === 0 && row.label2 === '工单内容'" |
| | | class="required-label" |
| | | > |
| | | <span class="required-star">*</span>{{ row.label2 }} |
| | | </span> |
| | | <span v-else>{{ row.label2 }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column> |
| | | <template #default="{ row }"> |
| | | <!-- 修改工单类型和工单内容的显示 --> |
| | | |
| | | <template |
| | | v-if=" |
| | | currentDetail.status === 0 && |
| | | row.label2 === '工单内容' && |
| | | hasProcessingBtnPermission() |
| | | " |
| | | > |
| | | <el-input |
| | | type="textarea" |
| | | v-model="currentDetail.content" |
| | | placeholder="请输入工单内容" |
| | | class="required-input" |
| | | /> |
| | | </template> |
| | | <template v-else>{{ row.value2 }}</template> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | |
| | | <!-- 事件处理详情 --> |
| | | <div v-if="[3, 4].includes(currentDetail.status)" class="form-section"> |
| | | <div class="section-title"> |
| | | <!-- 处理中状态显示必填星号 --> |
| | | <template v-if="currentDetail.status === 3"> |
| | | <span class="required-label"> |
| | | <span class="required-star">*</span>事件处理详情 |
| | | </span> |
| | | </template> |
| | | <template v-else> 事件处理详情</template> |
| | | </div> |
| | | <!-- 处理中状态显示输入框 --> |
| | | <template v-if="currentDetail.status === 3 && hasProcessedAndOverBtnPermission()"> |
| | | <el-input |
| | | type="textarea" |
| | | v-model="currentDetail.processingDetail" |
| | | placeholder="请输入事件处理详情" |
| | | :rows="4" |
| | | style="width: 100%; margin-bottom: 10px" |
| | | /> |
| | | </template> |
| | | <!-- 已完成和已完结状态显示只读文本 --> |
| | | <template v-else> |
| | | <div class="readonly-processing-detail"> |
| | | {{ currentDetail.processingDetail }} |
| | | </div> |
| | | </template> |
| | | </div> |
| | | |
| | | <!-- 上传图片 --> |
| | | <div v-if="[3].includes(currentDetail.status)" class="form-section uploadImg"> |
| | | <div class="section-title" v-if="hasProcessedAndOverBtnPermission()"> |
| | | <!-- 已完成状态显示必填星号 --> |
| | | <template v-if="currentDetail.status === 3"> |
| | | <span class="required-label"> <span class="required-star">*</span>上传图片 </span> |
| | | </template> |
| | | <template v-else> 上传图片</template> |
| | | </div> |
| | | <el-upload |
| | | v-if="hasProcessedAndOverBtnPermission()" |
| | | ref="upload" |
| | | :action="'#'" |
| | | :auto-upload="false" |
| | | list-type="picture-card" |
| | | :on-change="handleFileChange" |
| | | :on-remove="handleUploadRemove" |
| | | :before-upload="beforeUpload" |
| | | :file-list="currentDetail.photos || []" |
| | | :limit="1" |
| | | accept="image/*" |
| | | class="detail-upload" |
| | | > |
| | | <template v-if="!currentDetail.photos || currentDetail.photos.length < 1"> |
| | | <!-- <i class="el-icon-plus">+</i> --> |
| | | <div class="el-icon-plus"> |
| | | <span>+</span> |
| | | </div> |
| | | </template> |
| | | </el-upload> |
| | | <div class="el-upload__tip" v-if="hasProcessedAndOverBtnPermission()"> |
| | | (上传照片即可完结工单,只能上传jpg、jpeg、png照片,且不超过5M) |
| | | </div> |
| | | </div> |
| | | |
| | | <!-- 图片和地图部分 --> |
| | | <div class="media-section"> |
| | | <el-row :gutter="20"> |
| | | <el-col :span="12"> |
| | | <div class="media-box"> |
| | | <div class="media-title">事件图片</div> |
| | | <div class="media-content"> |
| | | <el-image |
| | | v-if="currentDetail.updatePhotoUrl" |
| | | :src="getThumbUrl(currentDetail.updatePhotoUrl)" |
| | | :preview-src-list="[getPreviewUrl(currentDetail.updatePhotoUrl)]" |
| | | fit="fill" |
| | | v-if="currentDetail.mediaUrl" |
| | | :src="getThumbUrl(currentDetail.mediaUrl)" |
| | | :preview-src-list="[getPreviewUrl(currentDetail.mediaUrl)]" |
| | | fit="contain" |
| | | style=" cursor: pointer" |
| | | > |
| | | <template #placeholder> |
| | | <div class="image-placeholder"> |
| | |
| | | </div> |
| | | </template> |
| | | </el-image> |
| | | <div v-else class="no-media">暂无处理图片</div> |
| | | <div v-else class="no-media">暂无图片/视频</div> |
| | | </div> |
| | | </template> |
| | | <template v-else> |
| | | <div class="media-title">地图标记事件点 |
| | | <el-popover v-if="currentDetail.status === 3 || currentDetail.status === 0" |
| | | popper-class="custom-qrcode-popover" |
| | | :width="120" |
| | | :visible="currentDetail.showQR && detailVisible" |
| | | placement="top" |
| | | title="" |
| | | trigger="click" |
| | | |
| | | > |
| | | <template #reference> |
| | | <img @click.stop="handleQRCode(currentDetail)" class="QRCodeImg" src="@/assets/images/dataCenter/positionicon.png" alt="" title="事件导航" /> |
| | | </template> |
| | | <div class="qrcode-content"> |
| | | <CreateQRcode v-if="currentDetail.showQR && detailVisible" :latAndLon="currentDetail.location"></CreateQRcode> |
| | | </div> |
| | | </el-popover> |
| | | </div> |
| | | <div class="media-content"> |
| | | <map-container v-if="detailVisible" ref="MapContainer"></map-container> |
| | | </div> |
| | | </template> |
| | | </div> |
| | | </el-col> |
| | | |
| | | |
| | | </el-row> |
| | | </div> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <div class="media-box"> |
| | | <!-- 根据状态显示不同的标题和内容 --> |
| | | |
| | | <template v-if="currentDetail.status === 4"> |
| | | <div class="media-title">工单处理图片</div> |
| | | <div class="media-content"> |
| | | <el-image |
| | | v-if="currentDetail.updatePhotoUrl" |
| | | :src="getThumbUrl(currentDetail.updatePhotoUrl)" |
| | | :preview-src-list="[getPreviewUrl(currentDetail.updatePhotoUrl)]" |
| | | fit="fill" |
| | | > |
| | | <template #placeholder> |
| | | <div class="image-placeholder"> |
| | | <i class="el-icon-picture-outline"></i> |
| | | <span>加载中...</span> |
| | | </div> |
| | | </template> |
| | | <template #error> |
| | | <div class="image-error"> |
| | | <i class="el-icon-picture-outline"></i> |
| | | <span>加载失败</span> |
| | | </div> |
| | | </template> |
| | | </el-image> |
| | | <div v-else class="no-media">暂无处理图片</div> |
| | | </div> |
| | | </template> |
| | | <template v-else> |
| | | <div class="media-title"> |
| | | 地图标记事件点 |
| | | <el-popover |
| | | v-if="currentDetail.status === 3 || currentDetail.status === 0" |
| | | popper-class="custom-qrcode-popover" |
| | | :width="120" |
| | | :visible="currentDetail.showQR && detailVisible" |
| | | placement="top" |
| | | title="" |
| | | trigger="click" |
| | | > |
| | | <template #reference> |
| | | <img |
| | | @click.stop="handleQRCode(currentDetail)" |
| | | class="QRCodeImg" |
| | | src="@/assets/images/dataCenter/qrCode.svg" |
| | | alt="" |
| | | title="事件导航" |
| | | /> |
| | | </template> |
| | | <div class="qrcode-content"> |
| | | <div class="close-btn" @click.stop="currentDetail.showQR = false">×</div> |
| | | <CreateQRcode |
| | | v-if="currentDetail.showQR && detailVisible" |
| | | :latAndLon="currentDetail.location" |
| | | ></CreateQRcode> |
| | | </div> |
| | | </el-popover> |
| | | </div> |
| | | <div class="media-content"> |
| | | <map-container v-if="detailVisible" ref="MapContainer"></map-container> |
| | | </div> |
| | | </template> |
| | | </div> |
| | | </el-col> |
| | | </el-row> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | <!-- 操作按钮 --> |
| | | <div class="dialog-footer1"> |
| | | <div |
| | | class="leftBtn" |
| | | :class="currentIndex === 0 ? 'disableds' : ''" |
| | | @click="leftClick" |
| | | > |
| | | 上一页 |
| | | </div> |
| | | <div class="btngroups"> |
| | | <template v-if="currentDetail.status === 2"> |
| | | <!-- 待审核 --> |
| | | <el-button |
| | | v-if="hasReviewBtnPermission()" |
| | | type="primary" |
| | | :loading="approveLoading" |
| | | @click="approveTicket" |
| | | >通过</el-button |
| | | > |
| | | <el-button |
| | | v-if="hasReviewBtnPermission()" |
| | | type="danger" |
| | | :loading="rejectLoading" |
| | | @click="rejectTicket" |
| | | >不通过</el-button |
| | | > |
| | | <el-button @click="detailVisible = false">取消</el-button> |
| | | </template> |
| | | <template v-else-if="currentDetail.status === 0"> |
| | | <el-button |
| | | v-if="hasProcessingBtnPermission()" |
| | | type="primary" |
| | | :loading="dispatchLoading" |
| | | @click="approveAndDispatch" |
| | | >受理</el-button |
| | | > |
| | | <el-button |
| | | v-if="hasProcessingBtnPermission()" |
| | | type="danger" |
| | | :loading="rejectLoading" |
| | | @click="rejectTicket" |
| | | >不受理</el-button |
| | | > |
| | | <el-button @click="detailVisible = false">取消</el-button> |
| | | </template> |
| | | <template v-if="currentDetail.status === 3"> |
| | | <!-- 处理中 --> |
| | | <el-button |
| | | v-if="hasProcessedAndOverBtnPermission()" |
| | | type="primary" |
| | | :loading="completeLoading" |
| | | @click="completeTicket" |
| | | >完成工单</el-button |
| | | > |
| | | <el-button @click="detailVisible = false">取消</el-button> |
| | | </template> |
| | | <template v-else-if="currentDetail.status === 4"> |
| | | <!-- 已完成 --> |
| | | <!-- <el-button v-if="hasProcessedAndOverBtnPermission()" type="primary" :loading="finalizeLoading" |
| | | <div class="dialog-footer1-new"> |
| | | <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" |
| | | icon="el-icon-check" |
| | | >通过 |
| | | </el-button> |
| | | <el-button |
| | | v-if="hasReviewBtnPermission()" |
| | | type="danger" |
| | | :loading="rejectLoading" |
| | | @click="rejectTicket" |
| | | icon="el-icon-close" |
| | | >不通过 |
| | | </el-button> |
| | | <el-button @click="detailVisible = false" icon="el-icon-circle-close">取消</el-button> |
| | | </template> |
| | | <template v-else-if="currentDetail.status === 0"> |
| | | <el-button |
| | | v-if="hasProcessingBtnPermission()" |
| | | type="primary" |
| | | :loading="dispatchLoading" |
| | | @click="approveAndDispatch" |
| | | icon="el-icon-check" |
| | | >受理 |
| | | </el-button> |
| | | <el-button |
| | | v-if="hasProcessingBtnPermission()" |
| | | type="danger" |
| | | :loading="rejectLoading" |
| | | @click="rejectTicket" |
| | | icon="el-icon-close" |
| | | >不受理 |
| | | </el-button> |
| | | <el-button @click="detailVisible = false" icon="el-icon-circle-close">取消</el-button> |
| | | </template> |
| | | <template v-if="currentDetail.status === 3"> |
| | | <!-- 处理中 --> |
| | | <el-button |
| | | v-if="hasProcessedAndOverBtnPermission()" |
| | | type="primary" |
| | | :loading="completeLoading" |
| | | @click="completeTicket" |
| | | icon="el-icon-circle-check" |
| | | >完成工单 |
| | | </el-button> |
| | | <el-button @click="detailVisible = false" icon="el-icon-circle-close">取消</el-button> |
| | | </template> |
| | | <template v-else-if="currentDetail.status === 4"> |
| | | <!-- 已完成 --> |
| | | <!-- <el-button v-if="hasProcessedAndOverBtnPermission()" type="primary" :loading="finalizeLoading" |
| | | @click="finalizeTicket">完结工单</el-button> --> |
| | | <el-button @click="detailVisible = false">取消</el-button> |
| | | </template> |
| | | </div> |
| | | <div |
| | | :class="currentIndex === tableData.length - 1 ? 'disableds' : ''" |
| | | class="leftBtn" |
| | | @click="rightClick" |
| | | > |
| | | 下一页 |
| | | </div> |
| | | <el-button @click="detailVisible = false" icon="el-icon-circle-close">取消</el-button> |
| | | </template> |
| | | </div> |
| | | <div |
| | | :class="currentIndex === tableData.length - 1 ? 'disableds' : ''" |
| | | class="leftBtn" |
| | | @click="rightClick" |
| | | > |
| | | 下一页 |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </el-dialog> |
| | |
| | | <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-form-item> |
| | | <el-form-item label="选择处理人" prop="handler"> |
| | | <el-select |
| | | filterable |
| | | filterable |
| | | v-model="dispatchForm.handler" |
| | | placeholder="请选择处理人" |
| | | :disabled="!dispatchForm.department" |
| | |
| | | </el-form-item> |
| | | </el-form> |
| | | <template #footer> |
| | | <el-button @click="dispatchDialogVisible = false">取消</el-button> |
| | | <el-button @click="dispatchDialogVisible = false" icon="el-icon-circle-close" |
| | | >取消 |
| | | </el-button> |
| | | <el-button type="primary" :loading="dispatchLoading" @click="submitDispatch" |
| | | >确认派发</el-button |
| | | > |
| | | >确认派发 |
| | | </el-button> |
| | | </template> |
| | | </el-dialog> |
| | | |
| | |
| | | title="批量审核" |
| | | width="1100" |
| | | append-to-body |
| | | class="ztzf-dialog-mange" |
| | | custom-class="review-dialog" |
| | | @close="cancleBatchReject" |
| | | > |
| | | <div class="review-container"> |
| | | <div class="review-image-wrapper"> |
| | | <!-- 修改左右箭头的显示条件 --> |
| | | <div |
| | | <el-button |
| | | v-if="selections.length > 1 && currentReviewImage" |
| | | class="arrow-button left" |
| | | @click="handlePrevImage" |
| | | icon="el-icon-arrow-left" |
| | | > |
| | | <i class="el-icon-arrow-left"></i> |
| | | </div> |
| | | </el-button> |
| | | |
| | | <div class="review-image-container"> |
| | | <!-- <el-image v-if="currentReviewImage" :src="getThumbUrl(currentReviewImage)" fit="fill" |
| | |
| | | </div> |
| | | |
| | | <!-- 修改右箭头的显示条件 --> |
| | | <div |
| | | <el-button |
| | | v-if="selections.length > 1 && currentReviewImage" |
| | | class="arrow-button right" |
| | | @click="handleNextImage" |
| | | icon="el-icon-arrow-right" |
| | | > |
| | | <i class="el-icon-arrow-right"></i> |
| | | </div> |
| | | </el-button> |
| | | </div> |
| | | |
| | | <!-- 修改分页器的显示条件 --> |
| | |
| | | |
| | | <template #footer> |
| | | <div class="dialog-footer"> |
| | | <el-button type="primary" @click="handleBatchApprove">通过</el-button> |
| | | <el-button type="danger" @click="handleBatchReject">不通过</el-button> |
| | | <el-button @click="cancleBatchReject">取消</el-button> |
| | | <el-button type="primary" @click="handleBatchApprove" icon="el-icon-check" |
| | | >通过 |
| | | </el-button> |
| | | <el-button type="danger" @click="handleBatchReject" icon="el-icon-close" |
| | | >不通过 |
| | | </el-button> |
| | | <el-button @click="cancleBatchReject" icon="el-icon-circle-close">取消</el-button> |
| | | </div> |
| | | </template> |
| | | </el-dialog> |
| | |
| | | title="工单复核" |
| | | width="30%" |
| | | append-to-body |
| | | custom-class="re-check-dialog" |
| | | class="ztzf-dialog-mange" |
| | | @close="reCheckDialog = false" |
| | | > |
| | | <div class="dialog-footer"> |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import { pxToRem, pxToRemNum } from '@/utils/rem'; |
| | | import { getSmallImg, getShowImg } from '@/utils/util'; |
| | | import { ElMessageBox, ElLoading } from 'element-plus'; |
| | | import { calculateDefaultRange } from '@/utils/util'; |
| | |
| | | getStepInfo, |
| | | getReviewById, |
| | | getCreateEventJob, |
| | | } from '@/api/tickets/ticket' |
| | | 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] |
| | | exportTheTicket |
| | | } 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'; |
| | | import { CircleClose } from '@element-plus/icons-vue'; |
| | | |
| | | const { envName } = getBaseConfig(); |
| | | |
| | | function regExp(label, name) { |
| | | var reg = new RegExp(label + '=([^&]*)(&|$)', 'g'); |
| | | return name.match(reg)[0].split('=')[1]; |
| | | } |
| | | |
| | | export default { |
| | | components: { elTooltipCopy,CreateQRcode }, |
| | | components: { elTooltipCopy, CreateQRcode }, |
| | | name: 'TicketPage', |
| | | data() { |
| | | return { |
| | |
| | | ], |
| | | |
| | | algorithms: [], |
| | | algorithms2: [], |
| | | statuses: [ |
| | | { label: '待审核', value: '2' }, |
| | | { label: '待处理', value: '0' }, |
| | |
| | | tableData: [], |
| | | option: { |
| | | border: true, |
| | | stripe: true, |
| | | stripe: false, |
| | | selection: true, // 添加多选功能 |
| | | index: true, // 保留序号功能 |
| | | indexLabel: '序号', |
| | |
| | | // { label: "序号", prop: "id", width: 70 }, |
| | | { label: '工单编号', prop: 'orderNumber', width: 170 }, |
| | | { label: '工单名称', prop: 'orderName', width: 150, overHidden: true, tooltip: true }, |
| | | { label: '所属单位', prop: 'department',width: 150, overHidden: true, tooltip: true }, |
| | | { label: '发起时间', prop: 'startTime', width: 160 }, |
| | | { label: '关联算法', prop: 'aiType', width: 150, overHidden: true, tooltip: true }, |
| | | { label: '所属部门', prop: 'department', overHidden: true, tooltip: true }, |
| | | { label: '发起任务时间', prop: 'startTime', width: 160, overHidden: true }, |
| | | { label: '关联算法', prop: 'aiType', overHidden: true, tooltip: true }, |
| | | { |
| | | label: '工单类型', |
| | | prop: 'type', |
| | |
| | | width: 152, |
| | | overHidden: true, |
| | | }, |
| | | { label: '创建人', prop: 'creator', width: 70 }, |
| | | { label: '处理人', prop: 'handler', width: 70 }, |
| | | { label: '创建人', prop: 'creator', width: 120, overHidden: true }, |
| | | { label: '处理人', prop: 'handler', width: 120, overHidden: true }, |
| | | { |
| | | slot: true, |
| | | hide: envName === 'jiangwu'? true : false, |
| | | hide: envName === 'jiangwu' ? true : false, |
| | | label: '复核状态', |
| | | prop: 'isReview', |
| | | width: 90, |
| | |
| | | |
| | | // 复核弹窗 |
| | | reCheckDialog: false, |
| | | treePropsSF: { |
| | | label: 'dictValue', |
| | | value: 'id', |
| | | children: 'children', |
| | | }, |
| | | dictKey: '', |
| | | dataList: [], |
| | | checkedKeys: [], |
| | | }; |
| | | }, |
| | | created() { |
| | |
| | | |
| | | this.loadAMapScripts(); |
| | | this.fetchDropdownData(); |
| | | // 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 + ''; |
| | |
| | | } |
| | | |
| | | let curQueryParams = {}; |
| | | |
| | | let isTabProcessed = false; |
| | | if (href.indexOf('?') != -1 && href.split('?').length > 0) { |
| | | curQueryParams = href |
| | | .split('?')[1] |
| | |
| | | return pre; |
| | | }, {}); |
| | | |
| | | const { orderNumber = undefined, day = undefined } = curQueryParams; |
| | | const { orderNumber = undefined, day = undefined, tab = undefined } = curQueryParams; |
| | | |
| | | // 日历传值 |
| | | if (day) { |
| | |
| | | this.filters.keyword = orderNumber; |
| | | this.$nextTick(() => { |
| | | this.isShowInfo = true; |
| | | const find = this.$store.state.tags.bsTagList.find(i => i.path === '/tickets/ticket') |
| | | find && (find.query = {}) |
| | | const find = this.$store.state.tags.bsTagList.find(i => i.path === '/tickets/ticket'); |
| | | find && (find.query = {}); |
| | | }); |
| | | |
| | | } |
| | | if (tab) { |
| | | const isTabValid = this.filteredTabs.some(t => t.name === tab); |
| | | if (isTabValid) { |
| | | this.activeTab = tab; |
| | | this.handleTabChangeAfterJump(); |
| | | isTabProcessed = true; |
| | | const find = this.$store.state.tags.bsTagList.find(i => i.path === '/tickets/ticket'); |
| | | find && (find.query = {}); |
| | | } |
| | | } |
| | | } |
| | | |
| | |
| | | this.fetchTableData(); |
| | | }, |
| | | computed: { |
| | | CircleClose() { |
| | | return CircleClose; |
| | | }, |
| | | firstRowData() { |
| | | return this.tableData.length > 0 ? this.tableData[0] : null; |
| | | }, |
| | |
| | | editable: false, |
| | | }, |
| | | { |
| | | label: '任务发起人', |
| | | label: '工单创建人', |
| | | value: this.currentDetail.creator, |
| | | editable: false, |
| | | }, |
| | |
| | | type: 'input', |
| | | }, |
| | | { label: '关键任务', value: this.currentDetail.keyData, editable: false }, |
| | | { label: '任务发起人', value: this.currentDetail.creator, 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 }, |
| | | { |
| | |
| | | // 修改这里:使用 types 数组查找对应的 label |
| | | value: |
| | | this.types.find(t => t.value === this.currentDetail.type)?.label || |
| | | this.currentDetail.type || |
| | | '/', |
| | | this.currentDetail.type, |
| | | }, |
| | | { label: '关联任务', value: this.currentDetail.job_name || '/' }, |
| | | { label: '任务发起人', value: this.currentDetail.creator }, |
| | | { label: '工单创建人', value: this.currentDetail.creator }, |
| | | { label: '当前状态', value: this.mapStatus(this.currentDetail.status) }, |
| | | { label: '事件地址', value: this.currentDetail.address || this.currentDetail.latAndLon }, // 包含经纬度信息 |
| | | { label: '关联算法', |
| | | value: |
| | | { |
| | | label: '关联算法', |
| | | value: |
| | | this.algorithms.find(t => t.value === this.currentDetail.aiType)?.label || |
| | | this.currentDetail.aiType || |
| | | '/', |
| | | |
| | | this.currentDetail.aiType, |
| | | }, |
| | | { label: '发起单位', value: this.currentDetail.department }, |
| | | { label: '发起任务时间', value: this.currentDetail.startTime }, |
| | |
| | | value2: filteredFields[i + 1]?.value || (filteredFields[i + 1]?.label ? '暂无数据' : ''), |
| | | }); |
| | | } |
| | | |
| | | return formattedFields; |
| | | |
| | | return formattedFields; |
| | | }, |
| | | dynamicFixedStatuses() { |
| | | // 直接使用接口返回的 stepInfos |
| | |
| | | }, |
| | | |
| | | 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) { |
| | | 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) { |
| | |
| | | }); |
| | | } else if (column.no === 4) { |
| | | navigator.clipboard.writeText(row.department).then(() => { |
| | | this.$message.success('复制所属单位成功'); |
| | | this.$message.success('复制所属部门成功'); |
| | | }); |
| | | } |
| | | }, |
| | |
| | | this.currentDetail.processingDetail = this.currentDetail.content; |
| | | this.handleViewDetail(this.currentDetail); |
| | | |
| | | |
| | | // 如果使用地图组件,需要更新地图标记 |
| | | this.$nextTick(() => { |
| | | if (this.$refs.MapContainer && this.currentDetail.location) { |
| | |
| | | } |
| | | }); |
| | | }, |
| | | async handleQRCode (val){ |
| | | val.showQR = !val.showQR |
| | | async handleQRCode(val) { |
| | | val.showQR = !val.showQR; |
| | | }, |
| | | async loadAMapScripts() { |
| | | try { |
| | |
| | | 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; |
| | |
| | | try { |
| | | const response = await getTicketInfo(); |
| | | |
| | | const { dept_data, event_type, ai_type,info } = response.data.data; |
| | | const { dept_data, event_type, ai_type, info } = response.data.data; |
| | | |
| | | this.departments = dept_data.map(item => ({ |
| | | label: item.dept_name, |
| | |
| | | |
| | | const columnType = this.findObject(this.option.column, 'type'); |
| | | columnType.dicData = this.types; |
| | | this.allAlgorithms = info |
| | | this.allAlgorithms = info; |
| | | |
| | | console.log('工单类型',this.types); |
| | | console.log('关联算法',this.allAlgorithms ); |
| | | console.log('工单类型', this.types); |
| | | console.log('关联算法', this.allAlgorithms); |
| | | // 确保算法数据的映射一致 |
| | | // this.algorithms = |
| | | // ai_type?.map(item => ({ |
| | | // 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 = {}; |
| | |
| | | }, |
| | | // 工单类型变化时触发 |
| | | handleTypeChange(typeValue) { |
| | | this.form.algorithm = []; |
| | | if (!typeValue) { |
| | | // 未选择类型时清空算法列表 |
| | | this.algorithms = []; |
| | | this.algorithms2 = []; |
| | | return; |
| | | } |
| | | |
| | | const matchedCategory = this.allAlgorithms.find( |
| | | category => category.dict_key === typeValue |
| | | ); |
| | | const matchedCategory = this.allAlgorithms.find(category => category.dict_key === typeValue); |
| | | |
| | | if (!matchedCategory || !matchedCategory.algorithms || matchedCategory.algorithms.length === 0) { |
| | | if ( |
| | | !matchedCategory || |
| | | !matchedCategory.algorithms || |
| | | matchedCategory.algorithms.length === 0 |
| | | ) { |
| | | // 无匹配的算法时清空 |
| | | this.algorithms = []; |
| | | this.algorithms2 = []; |
| | | this.$message.info('该工单类型暂无关联算法'); |
| | | return; |
| | | } |
| | | // console.log('matchedCategory',matchedCategory); |
| | | |
| | | this.algorithms = matchedCategory.algorithms.map(algo => ({ |
| | | label: algo.dict_value, |
| | | this.algorithms2 = matchedCategory.algorithms.map(algo => ({ |
| | | label: algo.dict_value, |
| | | value: algo.dict_key, |
| | | dict_key: algo.dict_key, |
| | | dict_value: algo.dict_value |
| | | dict_value: algo.dict_value, |
| | | })); |
| | | |
| | | }, |
| | | |
| | | async fetchTableData() { |
| | |
| | | try { |
| | | const currentTab = this.tabs.find(tab => tab.name === this.activeTab); |
| | | const params = { |
| | | word_order_type: 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, // 添加复核状态字段映射 |
| | | |
| | | |
| | | }; |
| | | }); |
| | | |
| | |
| | | this.draftLoading = false; |
| | | } |
| | | }, |
| | | handleCancel (){ |
| | | handleCancel() { |
| | | this.resetForm(); |
| | | this.dialogVisible = false; |
| | | }, |
| | | this.dialogVisible = false; |
| | | }, |
| | | handleLocationChange(val) { |
| | | let locationValue = val.value; |
| | | if (locationValue && locationValue.length >= 2) { |
| | |
| | | |
| | | 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.fetchTableData(); |
| | | this.fetchTabCounts(); // 切换 tab 时重新获取数据 |
| | | }, |
| | | |
| | | //新增 跳转后触发的Tab切换 |
| | | handleTabChangeAfterJump() { |
| | | const isReview = this.findObject(this.option.column, 'isReview'); |
| | | isReview.hide = !['all', 'completed', 'myTickets'].includes(this.activeTab); |
| | | this.handleReset(); |
| | | this.page.currentPage = 1; |
| | | this.fetchTableData(); |
| | | this.fetchTabCounts(); |
| | | }, |
| | | handleSearch() { |
| | | this.page.currentPage = 1; |
| | | this.fetchTableData(); |
| | |
| | | }, |
| | | |
| | | handleReset() { |
| | | this.dictKey = ''; |
| | | this.filters = { |
| | | keyword: '', |
| | | department: '', |
| | |
| | | isReview: '', // 重置时清空复核状态 |
| | | }; |
| | | this.page.currentPage = 1; |
| | | this.$router.replace({}); //清除url参数 |
| | | this.$router.replace({}); //清除url参数 |
| | | this.fetchTableData(); |
| | | }, |
| | | handleKeyWords(){ |
| | | this.$router.replace({}); //清除url参数 |
| | | handleKeyWords() { |
| | | this.$router.replace({}); //清除url参数 |
| | | }, |
| | | |
| | | async handleCurrentChange(val) { |
| | |
| | | }; |
| | | |
| | | console.log('this.currentDetail', this.currentDetail); |
| | | |
| | | this.detailVisible = true; |
| | | this.handleTypeChange(this.currentDetail.type) |
| | | console.log('this.currentDetail.location',this.currentDetail.location); |
| | | |
| | | this.handleTypeChange(this.currentDetail.type); |
| | | |
| | | |
| | | this.$nextTick(() => { |
| | | if (this.$refs.MapContainer && this.$refs.MapContainer.initAddEntity) { |
| | | this.$refs.MapContainer.initAddEntity('point', this.currentDetail.location); |
| | |
| | | const headers = [ |
| | | '工单编号', |
| | | '工单名称', |
| | | '所属单位', |
| | | '所属部门', |
| | | '发起时间', |
| | | '关联算法', |
| | | '工单内容', |
| | |
| | | return { |
| | | 工单编号: item.orderNumber || item.event_num || '', |
| | | 工单名称: item.orderName || item.event_name || '', |
| | | 所属单位: item.department || item.dept_name || '', |
| | | 所属部门: item.department || item.dept_name || '', |
| | | 发起时间: item.startTime || item.create_time || '', |
| | | 关联算法: item.aiType || item.ai_types || '', |
| | | 工单内容: item.address || item.content || '', |
| | |
| | | // 通过验证后,打开派发对话框 |
| | | this.dispatchDialogVisible = true; |
| | | |
| | | console.log('受理',this.currentDetail); |
| | | |
| | | console.log('受理', this.currentDetail); |
| | | }, |
| | | hasProcessingBtnPermission() { |
| | | // undefined 或 false 都返回 false,只有 true 返回 true |
| | |
| | | // 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()) { |
| | |
| | | return; |
| | | } |
| | | this.dispatchLoading = true; |
| | | console.log('派发成功',this.currentDetail); |
| | | |
| | | 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); |
| | | console.log('派发', data); |
| | | |
| | | const file = this.currentDetail.file || null; // 如果没有文件,则为 null |
| | | |
| | |
| | | }); |
| | | } |
| | | }, |
| | | // 导出工单报表 |
| | | 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(); |
| | | }, |
| | | |
| | | }; |
| | | </script> |
| | | <style lang="scss"> |
| | | .custom-dialog { max-height: 96vh; } |
| | | .custom-dialog { |
| | | max-height: 96vh; |
| | | |
| | | .el-dialog__body { |
| | | border-top: 0.1rem solid #f0f0f0; |
| | | } |
| | | } |
| | | |
| | | .custom-qrcode-popover { |
| | | min-width: 120px !important; |
| | | min-width: 160px !important; |
| | | min-height: 140px !important; |
| | | position: relative; |
| | | |
| | | .qrcode-content { |
| | | margin-top: 8px; |
| | | |
| | | .close-btn { |
| | | position: absolute; |
| | | top: 2px; |
| | | right: 2px; |
| | | width: 16px; |
| | | height: 16px; |
| | | line-height: 16px; |
| | | text-align: center; |
| | | cursor: pointer; |
| | | color: #999; |
| | | font-size: 16px; |
| | | z-index: 10; |
| | | } |
| | | } |
| | | } |
| | | </style> |
| | | <style lang="scss" scoped> |
| | | |
| | | ::v-deep(.el-tabs) { |
| | | height: 100%; |
| | | display: flex; |
| | |
| | | gap: 8px; // 使用 gap 统一设置间距 |
| | | |
| | | .filter-item { |
| | | width: 160px; // 减小宽度 |
| | | width: 280px; // 减小宽度 |
| | | } |
| | | |
| | | .date-picker { |
| | | width: 240px; // 日期选择器宽度适当调整 |
| | | // width: 240px; // 日期选择器宽度适当调整 |
| | | } |
| | | |
| | | .el-button { |
| | |
| | | } |
| | | } |
| | | |
| | | .dialog-footer { |
| | | text-align: center; |
| | | :deep(.el-dialog__body) { |
| | | border-top: 0.1rem solid #f0f0f0; |
| | | } |
| | | |
| | | .dialog-footer-new { |
| | | text-align: right; |
| | | padding-top: 16px; |
| | | border-top: 1px solid #ebeef5; |
| | | |
| | |
| | | } |
| | | } |
| | | } |
| | | .dialog-footer1 { |
| | | |
| | | .dialog-footer1-new { |
| | | position: sticky; |
| | | bottom: 28px; |
| | | left: 0; |
| | | right: 0; |
| | | background: white; |
| | | z-index: 10; |
| | | padding: 16px 20px; |
| | | border-top: 1px solid #ebeef5; |
| | | display: flex; |
| | | justify-content: space-between; |
| | | align-items: center; |
| | | bottom: 28px; |
| | | left: 0; |
| | | right: 0; |
| | | background: white; |
| | | z-index: 10; |
| | | padding: 16px 20px; |
| | | border-top: 1px solid #ebeef5; |
| | | display: flex; |
| | | justify-content: space-between; |
| | | align-items: center; |
| | | |
| | | .el-button + .el-button { |
| | | margin-left: 12px; |
| | | } |
| | | .btngroups { |
| | | margin-left: 12px; |
| | | } |
| | | |
| | | .btngroups { |
| | | margin-left: 12px; |
| | | } |
| | | |
| | | .el-button { |
| | | padding: 9px 20px; |
| | | |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | .map-container { |
| | | width: 100%; |
| | | height: 400px; |
| | |
| | | } |
| | | |
| | | .detail-container { |
| | | padding:0 20px; |
| | | padding: 0 20px; |
| | | |
| | | .detail-top-title { |
| | | display: flex; |
| | |
| | | background-color: #999; |
| | | border-radius: 5px; |
| | | text-align: center; |
| | | line-height: 32px; |
| | | line-height: 32px; |
| | | color: #fff; |
| | | cursor: pointer; |
| | | opacity: 0.8; |
| | | |
| | | } |
| | | |
| | | .disableds { |
| | |
| | | pointer-events: none; |
| | | opacity: 0.3 !important; |
| | | } |
| | | .PopUpTableScrolls{ |
| | | height: 600px; |
| | | overflow-y: scroll; |
| | | overflow-x: hidden; |
| | | |
| | | .PopUpTableScrolls { |
| | | max-height: 600px; |
| | | overflow-y: scroll; |
| | | overflow-x: hidden; |
| | | } |
| | | |
| | | .media-box { |
| | | width: 100%; |
| | | border: 1px solid #dcdfe6; |
| | |
| | | margin-bottom: 5px; |
| | | display: flex; |
| | | align-items: center; |
| | | .QRCodeImg{ |
| | | width: 18px; |
| | | height: 18px; |
| | | cursor: pointer; |
| | | |
| | | .QRCodeImg { |
| | | width: 18px; |
| | | height: 18px; |
| | | cursor: pointer; |
| | | padding-bottom: 1px; |
| | | } |
| | | } |
| | | |
| | |
| | | line-height: 1.5; |
| | | display: block; |
| | | text-align: left; |
| | | margin-bottom: 5px; |
| | | margin-bottom: 5px; |
| | | |
| | | &:first-child { |
| | | font-weight: bold; |
| | | margin-bottom: 4px; |
| | |
| | | :deep(.el-dialog__body) { |
| | | padding: 0; |
| | | background-color: #f5f7fa; |
| | | border-top: 0.1rem solid #f0f0f0; |
| | | } |
| | | } |
| | | |
| | |
| | | :deep(.el-dialog__body) { |
| | | padding: 0; |
| | | background-color: #f5f7fa; |
| | | border-top: 0.1rem solid #f0f0f0; |
| | | } |
| | | } |
| | | |
| | |
| | | height: 44px; |
| | | background: rgba(0, 0, 0, 0.3); |
| | | border-radius: 50%; |
| | | border: none; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | |
| | | |
| | | &.left { |
| | | left: 20px; |
| | | color: #ffffff; |
| | | } |
| | | |
| | | &.right { |
| | | right: 20px; |
| | | color: #ffffff; |
| | | } |
| | | } |
| | | |