| | |
| | | :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> |
| | | <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 |
| | |
| | | class="required-input" |
| | | > |
| | | <el-option |
| | | v-for="item in algorithms" |
| | | v-for="item in algorithms2" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value" |
| | |
| | | <el-table-column prop="label2" label="基本信息" width="150"> |
| | | <template #default="{ row }"> |
| | | <!-- 添加必填星号的标签 --> |
| | | |
| | | |
| | | <span |
| | | v-if=" |
| | | currentDetail.status === 0 && |
| | |
| | | <el-table-column> |
| | | <template #default="{ row }"> |
| | | <!-- 修改工单类型和工单内容的显示 --> |
| | | |
| | | |
| | | |
| | | |
| | | <template |
| | | v-if=" |
| | | currentDetail.status === 0 && |
| | |
| | | <!-- 图片和地图部分 --> |
| | | <div class="media-section"> |
| | | <el-row :gutter="20"> |
| | | |
| | | |
| | | <el-col :span="12"> |
| | | <div class="media-box"> |
| | | <div class="media-title">事件图片</div> |
| | |
| | | placement="top" |
| | | title="" |
| | | trigger="click" |
| | | |
| | | |
| | | > |
| | | <template #reference> |
| | | <img @click.stop="handleQRCode(currentDetail)" class="QRCodeImg" src="@/assets/images/dataCenter/positionicon.png" alt="" title="事件导航" /> |
| | |
| | | </template> |
| | | </div> |
| | | </el-col> |
| | | |
| | | |
| | | |
| | | |
| | | </el-row> |
| | | </div> |
| | | </div> |
| | |
| | | <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" |
| | |
| | | ], |
| | | |
| | | algorithms: [], |
| | | algorithms2: [], |
| | | statuses: [ |
| | | { label: '待审核', value: '2' }, |
| | | { label: '待处理', value: '0' }, |
| | |
| | | }, |
| | | |
| | | mounted() { |
| | | |
| | | |
| | | const href = this.$route.href; |
| | | if (this.$route?.query?.status !== undefined && this.$route?.query?.status !== null) { |
| | | this.filters.status = this.$route?.query?.status + ''; |
| | |
| | | value2: filteredFields[i + 1]?.value || (filteredFields[i + 1]?.label ? '暂无数据' : ''), |
| | | }); |
| | | } |
| | | |
| | | |
| | | return formattedFields; |
| | | |
| | | }, |
| | |
| | | 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 |
| | | category => category.dict_key === typeValue |
| | | ); |
| | | |
| | | 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 |
| | |
| | | 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) { |
| | | this.$refs.MapContainer.initAddEntity('point', this.currentDetail.location); |
| | |
| | | this.dispatchDialogVisible = true; |
| | | |
| | | console.log('受理',this.currentDetail); |
| | | |
| | | |
| | | }, |
| | | hasProcessingBtnPermission() { |
| | | // undefined 或 false 都返回 false,只有 true 返回 true |
| | |
| | | } |
| | | this.dispatchLoading = true; |
| | | console.log('派发成功',this.currentDetail); |
| | | |
| | | |
| | | this.$refs.dispatchForm.validate(async valid => { |
| | | if (valid) { |
| | | try { |