| | |
| | | </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 }} |
| | |
| | | </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-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 |
| | | > |
| | | |
| | | |
| | | <el-button @click="handleCancel">取 消</el-button> |
| | | <el-button @click="handleCancel">取 消</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 algorithms2" |
| | | :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="width: 700px; height: 520px; 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" |
| | | </div> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <div class="media-box"> |
| | | <!-- 根据状态显示不同的标题和内容 --> |
| | | |
| | | > |
| | | <template #reference> |
| | | <img @click.stop="handleQRCode(currentDetail)" class="QRCodeImg" src="@/assets/images/dataCenter/qrCode.svg" 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> |
| | | <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="hover" |
| | | > |
| | | <template #reference> |
| | | <img |
| | | @mouseenter="currentDetail.showQR = true" |
| | | @mouseleave="currentDetail.showQR = false" |
| | | class="QRCodeImg" |
| | | src="@/assets/images/dataCenter/qrCode.svg" |
| | | 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> |
| | | </div> |
| | | </div> |
| | | |
| | | <!-- 操作按钮 --> |
| | | <div class="dialog-footer1"> |
| | | <div |
| | | class="leftBtn" |
| | | :class="currentIndex === 0 ? 'disableds' : ''" |
| | | @click="leftClick" |
| | | <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 |
| | | > |
| | | 上一页 |
| | | </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" |
| | | <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" |
| | | @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">取消</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" |
| | |
| | | getStepInfo, |
| | | getReviewById, |
| | | getCreateEventJob, |
| | | } 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' |
| | | const { envName } = getBaseConfig() |
| | | function regExp (label, name) { |
| | | var reg = new RegExp(label + '=([^&]*)(&|$)', 'g') |
| | | return name.match(reg)[0].split('=')[1] |
| | | } 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'; |
| | | 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 { |
| | |
| | | tableData: [], |
| | | option: { |
| | | border: true, |
| | | stripe: true, |
| | | stripe: false, |
| | | selection: true, // 添加多选功能 |
| | | index: true, // 保留序号功能 |
| | | indexLabel: '序号', |
| | |
| | | { label: '处理人', prop: 'handler', width: 70 }, |
| | | { |
| | | slot: true, |
| | | hide: envName === 'jiangwu'? true : false, |
| | | hide: envName === 'jiangwu' ? true : false, |
| | | label: '复核状态', |
| | | prop: 'isReview', |
| | | width: 90, |
| | |
| | | }, |
| | | |
| | | mounted() { |
| | | |
| | | this.getAlgorithmList() |
| | | this.getAlgorithmList(); |
| | | |
| | | const href = this.$route.href; |
| | | if (this.$route?.query?.status !== undefined && this.$route?.query?.status !== null) { |
| | |
| | | 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 = {}); |
| | | }); |
| | | |
| | | } |
| | | } |
| | | |
| | |
| | | { 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 || |
| | | '/', |
| | | |
| | | }, |
| | | { label: '发起单位', value: this.currentDetail.department }, |
| | | { label: '发起任务时间', value: this.currentDetail.startTime }, |
| | |
| | | } |
| | | |
| | | return formattedFields; |
| | | |
| | | }, |
| | | dynamicFixedStatuses() { |
| | | // 直接使用接口返回的 stepInfos |
| | |
| | | |
| | | methods: { |
| | | handleCheck(data, { checkedKeys, checkedNodes }) { |
| | | this.checkedKeys = checkedKeys |
| | | this.checkedKeys = checkedKeys; |
| | | // 获取所有选中节点的 dictKey |
| | | const selectedDictKeys = checkedNodes.map(node => node.dictKey).filter(Boolean) |
| | | this.filters.type = selectedDictKeys |
| | | 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 |
| | | } |
| | | }) |
| | | 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) { |
| | | console.log(data.dictKey, '666666666') |
| | | this.filters.type = '' |
| | | this.filters.algorithm = '' |
| | | this.filters.type = data.dictKey |
| | | console.log(data.dictKey, '666666666'); |
| | | this.filters.type = ''; |
| | | this.filters.algorithm = ''; |
| | | this.filters.type = data.dictKey; |
| | | // 更新列表请求 |
| | | this.fetchTableData(); |
| | | }, |
| | | handleClear() { |
| | | this.dictKey = '' |
| | | this.filters.algorithm = '' |
| | | this.filters.type = '' |
| | | this.fetchTableData(); |
| | | this.dictKey = ''; |
| | | this.filters.algorithm = ''; |
| | | this.filters.type = ''; |
| | | this.fetchTableData(); |
| | | }, |
| | | handleCellClick(row, column) { |
| | | console.log(row, column.no); |
| | |
| | | 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 => ({ |
| | |
| | | value: item.dict_key, |
| | | })) || []; |
| | | |
| | | this.algorithms2 = _.cloneDeep(this.algorithms) |
| | | this.algorithms2 = _.cloneDeep(this.algorithms); |
| | | |
| | | // 构建用户ID和名称的映射关系 |
| | | this.userNameToIdMap = {}; |
| | |
| | | }, |
| | | // 工单类型变化时触发 |
| | | handleTypeChange(typeValue) { |
| | | this.form.algorithm = [] |
| | | this.form.algorithm = []; |
| | | if (!typeValue) { |
| | | // 未选择类型时清空算法列表 |
| | | 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.algorithms2 = []; |
| | | this.$message.info('该工单类型暂无关联算法'); |
| | |
| | | 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() { |
| | |
| | | this.draftLoading = false; |
| | | } |
| | | }, |
| | | handleCancel (){ |
| | | handleCancel() { |
| | | this.resetForm(); |
| | | this.dialogVisible = false; |
| | | }, |
| | | this.dialogVisible = false; |
| | | }, |
| | | handleLocationChange(val) { |
| | | let locationValue = val.value; |
| | | if (locationValue && locationValue.length >= 2) { |
| | |
| | | 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); |
| | | console.log('this.currentDetail.location', this.currentDetail.location); |
| | | |
| | | this.$nextTick(() => { |
| | | if (this.$refs.MapContainer && this.$refs.MapContainer.initAddEntity) { |
| | |
| | | // 通过验证后,打开派发对话框 |
| | | this.dispatchDialogVisible = true; |
| | | |
| | | console.log('受理',this.currentDetail); |
| | | |
| | | console.log('受理', this.currentDetail); |
| | | }, |
| | | hasProcessingBtnPermission() { |
| | | // undefined 或 false 都返回 false,只有 true 返回 true |
| | |
| | | return; |
| | | } |
| | | this.dispatchLoading = true; |
| | | console.log('派发成功',this.currentDetail); |
| | | console.log('派发成功', this.currentDetail); |
| | | |
| | | this.$refs.dispatchForm.validate(async valid => { |
| | | if (valid) { |
| | |
| | | content: this.currentDetail.content, // 使用 content 替代原来的 remark |
| | | createDept: this.dispatchForm.department, // 派发部门 ID |
| | | updateUser: this.dispatchForm.handler, // 处理人 ID |
| | | aiType:this.currentDetail.aiType |
| | | aiType: this.currentDetail.aiType, |
| | | }; |
| | | console.log('派发',data); |
| | | console.log('派发', data); |
| | | |
| | | const file = this.currentDetail.file || null; // 如果没有文件,则为 null |
| | | |
| | |
| | | activated() { |
| | | this.handleReset(); |
| | | }, |
| | | |
| | | }; |
| | | </script> |
| | | <style lang="scss"> |
| | | .custom-dialog { max-height: 96vh; } |
| | | .custom-dialog { |
| | | max-height: 96vh; |
| | | } |
| | | .custom-qrcode-popover { |
| | | min-width: 120px !important; |
| | | min-width: 120px !important; |
| | | } |
| | | </style> |
| | | <style lang="scss" scoped> |
| | | |
| | | ::v-deep(.el-tabs) { |
| | | height: 100%; |
| | | display: flex; |
| | |
| | | } |
| | | .dialog-footer1 { |
| | | 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; |
| | | |
| | |
| | | } |
| | | |
| | | .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 { |
| | | height: 600px; |
| | | overflow-y: scroll; |
| | | overflow-x: hidden; |
| | | } |
| | | .media-box { |
| | | width: 100%; |
| | |
| | | margin-bottom: 5px; |
| | | display: flex; |
| | | align-items: center; |
| | | .QRCodeImg{ |
| | | width: 18px; |
| | | height: 18px; |
| | | cursor: pointer; |
| | | padding-bottom: 1px; |
| | | .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; |