| | |
| | | > |
| | | <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-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" @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" |
| | |
| | | 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-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" |
| | | > |
| | |
| | | </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> |
| | |
| | | <span class="required-star">*</span>事件处理详情 |
| | | </span> |
| | | </template> |
| | | <template v-else> 事件处理详情 </template> |
| | | <template v-else> 事件处理详情</template> |
| | | </div> |
| | | <!-- 处理中状态显示输入框 --> |
| | | <template v-if="currentDetail.status === 3 && hasProcessedAndOverBtnPermission()"> |
| | |
| | | <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()" |
| | |
| | | :src="getThumbUrl(currentDetail.mediaUrl)" |
| | | :preview-src-list="[getPreviewUrl(currentDetail.mediaUrl)]" |
| | | fit="contain" |
| | | style="width: 700px; height: 520px; cursor: pointer" |
| | | style=" cursor: pointer" |
| | | > |
| | | <template #placeholder> |
| | | <div class="image-placeholder"> |
| | |
| | | :visible="currentDetail.showQR && detailVisible" |
| | | placement="top" |
| | | title="" |
| | | trigger="hover" |
| | | trigger="click" |
| | | > |
| | | <template #reference> |
| | | <img |
| | | @mouseenter="currentDetail.showQR = true" |
| | | @mouseleave="currentDetail.showQR = false" |
| | | @click.stop="handleQRCode(currentDetail)" |
| | | class="QRCodeImg" |
| | | src="@/assets/images/dataCenter/qrCode.svg" |
| | | alt="" |
| | |
| | | /> |
| | | </template> |
| | | <div class="qrcode-content"> |
| | | <div class="close-btn" @click.stop="currentDetail.showQR = false">×</div> |
| | | <CreateQRcode |
| | | v-if="currentDetail.showQR && detailVisible" |
| | | :latAndLon="currentDetail.location" |
| | |
| | | </div> |
| | | |
| | | <!-- 操作按钮 --> |
| | | <div class="dialog-footer1"> |
| | | <div class="dialog-footer1-new"> |
| | | <div class="leftBtn" :class="currentIndex === 0 ? 'disableds' : ''" @click="leftClick"> |
| | | 上一页 |
| | | </div> |
| | |
| | | type="primary" |
| | | :loading="approveLoading" |
| | | @click="approveTicket" |
| | | >通过</el-button |
| | | > |
| | | icon="el-icon-check" |
| | | >通过 |
| | | </el-button> |
| | | <el-button |
| | | v-if="hasReviewBtnPermission()" |
| | | type="danger" |
| | | :loading="rejectLoading" |
| | | @click="rejectTicket" |
| | | >不通过</el-button |
| | | > |
| | | <el-button @click="detailVisible = false">取消</el-button> |
| | | 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 |
| | |
| | | type="primary" |
| | | :loading="dispatchLoading" |
| | | @click="approveAndDispatch" |
| | | >受理</el-button |
| | | > |
| | | icon="el-icon-check" |
| | | >受理 |
| | | </el-button> |
| | | <el-button |
| | | v-if="hasProcessingBtnPermission()" |
| | | type="danger" |
| | | :loading="rejectLoading" |
| | | @click="rejectTicket" |
| | | >不受理</el-button |
| | | > |
| | | <el-button @click="detailVisible = false">取消</el-button> |
| | | 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"> |
| | | <!-- 处理中 --> |
| | |
| | | type="primary" |
| | | :loading="completeLoading" |
| | | @click="completeTicket" |
| | | >完成工单</el-button |
| | | > |
| | | <el-button @click="detailVisible = false">取消</el-button> |
| | | 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> |
| | | <el-button @click="detailVisible = false" icon="el-icon-circle-close">取消</el-button> |
| | | </template> |
| | | </div> |
| | | <div |
| | |
| | | </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, |
| | | exportTheTicket |
| | | } from '@/api/tickets/ticket'; |
| | | import { getSFDictionaryTree } from '@/api/job/task'; |
| | | import { export_json_to_excel } from '@/utils/exportExcel'; |
| | |
| | | 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]; |
| | |
| | | // { label: "序号", prop: "id", width: 70 }, |
| | | { 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: 'department', overHidden: true, tooltip: true }, |
| | | { label: '发起任务时间', prop: 'startTime', width: 160, overHidden: true }, |
| | | { label: '关联算法', prop: 'aiType', overHidden: true, tooltip: true }, |
| | | { |
| | | label: '工单类型', |
| | |
| | | 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, |
| | |
| | | |
| | | this.loadAMapScripts(); |
| | | this.fetchDropdownData(); |
| | | // console.log('permission.tickets_processing_btn', this.permission.tickets_processing_btn); |
| | | // console.log('permission', this.permission.tickets_tab_pending); |
| | | }, |
| | | |
| | | mounted() { |
| | |
| | | } |
| | | |
| | | 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) { |
| | |
| | | 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.fetchTabCounts(); // 新增:初始化时获取 tab 数据 |
| | | 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: |
| | | 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 }, |
| | |
| | | }, |
| | | |
| | | handleSFNodeClick(data) { |
| | | console.log(data.dictKey, '666666666'); |
| | | this.filters.type = ''; |
| | | this.filters.algorithm = ''; |
| | | this.filters.type = data.dictKey; |
| | |
| | | }); |
| | | } else if (column.no === 4) { |
| | | navigator.clipboard.writeText(row.department).then(() => { |
| | | this.$message.success('复制所属单位成功'); |
| | | this.$message.success('复制所属部门成功'); |
| | | }); |
| | | } |
| | | }, |
| | |
| | | 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, // 添加复核状态字段映射 |
| | | |
| | | |
| | | }; |
| | | }); |
| | | |
| | |
| | | |
| | | 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(); |
| | |
| | | }; |
| | | |
| | | 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) { |
| | |
| | | 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 || '', |
| | |
| | | // 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(); |
| | |
| | | <style lang="scss"> |
| | | .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> |
| | |
| | | } |
| | | } |
| | | |
| | | .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; |
| | |
| | | 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; |
| | | |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | .map-container { |
| | | width: 100%; |
| | | height: 400px; |
| | |
| | | pointer-events: none; |
| | | opacity: 0.3 !important; |
| | | } |
| | | |
| | | .PopUpTableScrolls { |
| | | height: 600px; |
| | | 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; |
| | |
| | | display: block; |
| | | text-align: left; |
| | | 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; |
| | | } |
| | | } |
| | | |