| | |
| | | }) |
| | | } |
| | | |
| | | // 获取字典下拉 task_inspection_type |
| | | export const getDictListApi = (str) => { |
| | | return request({ |
| | | url: `/system/dict/data/type/${str}`, |
| | | method: 'get', |
| | | }) |
| | | } |
| | | |
| | | |
| | |
| | | @change="handleSearch" |
| | | > |
| | | <el-option |
| | | v-for="item in dictObj.workOrderType" |
| | | :key="item.dictKey" |
| | | :label="item.dictValue" |
| | | :value="item.dictKey" |
| | | v-for="item in workOrderTypeXT" |
| | | :key="item.dictValue" |
| | | :label="item.dictLabel" |
| | | :value="item.dictValue" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | |
| | | <el-table-column prop="taskNo" show-overflow-tooltip label="巡查任务编号" /> |
| | | <el-table-column prop="patrolTaskType" show-overflow-tooltip label="巡查任务类型"> |
| | | <template v-slot="{ row }"> |
| | | {{ getDictLabel(row.patrolTaskType, dictObj.workOrderType) }} |
| | | {{ getDictLabelXT(row.patrolTaskType, workOrderTypeXT) }} |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="taskStatus" show-overflow-tooltip label="巡查任务状态"> |
| | |
| | | import { Search, RefreshRight } from '@element-plus/icons-vue' |
| | | import { onMounted, ref } from 'vue' |
| | | import { getDictionaryByCode } from '@/api/system/dictbiz' |
| | | import { dateRangeFormat, getDictLabel } from '@ztzf/utils' |
| | | import { dateRangeFormat, getDictLabel, getDictLabelXT } from '@ztzf/utils' |
| | | import { getDictListApi } from '@/api/zkxt' |
| | | import { gdPatrolTaskPageApi } from '../inspectionRequest/inspectionRequestApi' |
| | | import { getDeptTree } from '@/api/system/dept' |
| | | import ViewDiaLog from './ViewDiaLog.vue' |
| | |
| | | workOrderType: [], // 巡查任务类型 |
| | | taskStatus: [], // 巡查任务状态 |
| | | }) |
| | | const workOrderTypeXT = ref([]) |
| | | |
| | | provide('dictObj', dictObj) |
| | | provide('workOrderTypeXT', workOrderTypeXT) |
| | | provide('deptTree', deptTree) |
| | | provide('treeProps', treeProps) |
| | | |
| | |
| | | getDictionaryByCode('workOrderType,taskStatus').then(res => { |
| | | dictObj.value = res.data.data |
| | | }) |
| | | getDictListApi('task_inspection_type').then(res => { |
| | | workOrderTypeXT.value = res.data.data || [] |
| | | }) |
| | | } |
| | | |
| | | // 获取部门树 |
| | |
| | | <div class="info-item"> |
| | | <span class="label">工单类型</span> |
| | | <span class="val" v-if="selectedWorkOrder"> |
| | | {{ getDictLabel(selectedWorkOrder.workOrderType, dictObj.workOrderType) }} |
| | | {{ getDictLabelXT(selectedWorkOrder.workOrderType, workOrderTypeXT) }} |
| | | </span> |
| | | <span class="val grayText" v-else>选择工单后自动带出</span> |
| | | </div> |
| | |
| | | @change="handlePatrolTaskTypeChange($index, $event)" |
| | | > |
| | | <el-option |
| | | v-for="item in dictObj.workOrderType" |
| | | :key="item.dictKey" |
| | | :label="item.dictValue" |
| | | :value="item.dictKey" |
| | | v-for="item in workOrderTypeXT" |
| | | :key="item.dictValue" |
| | | :label="item.dictLabel" |
| | | :value="item.dictValue" |
| | | /> |
| | | </el-select> |
| | | </template> |
| | |
| | | </template> |
| | | |
| | | <script setup> |
| | | import { computed, ref, onMounted } from 'vue' |
| | | import { computed, ref, onMounted, inject } from 'vue' |
| | | import { ElMessage } from 'element-plus' |
| | | import { Plus, Delete } from '@element-plus/icons-vue' |
| | | import { geomAnalysis, getDictLabel } from '@ztzf/utils' |
| | | import { geomAnalysis, getDictLabel, getDictLabelXT } from '@ztzf/utils' |
| | | |
| | | import { gdPatrolTaskSaveApi, gdFlyerPageApi, gdPatrolTaskAuditApi } from './inspectionRequestApi' |
| | | import { gdWorkOrderPageApi } from '../orderManage/orderManageApi' |
| | | import { gdManageDeviceListApi } from '../orderManage/gdManageDeviceApi' |
| | |
| | | const routeOptions = ref([]) // 航线选项(根据工单范围获取) |
| | | const routeLoading = ref(false) // 航线加载中 |
| | | const algorithmTreeData = ref([]) // 算法树形数据 |
| | | const workOrderTypeXT = inject('workOrderTypeXT', ref([])) |
| | | |
| | | // 获取算法分组数据 |
| | | async function getAlgorithmList() { |
| | |
| | | dialogMode.value = mode |
| | | await getWorkOrderList() |
| | | getAlgorithmList() |
| | | |
| | | if (dialogMode.value === 'add') { |
| | | selectedWorkOrderId.value = null |
| | | selectedWorkOrder.value = null |
| | |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <div class="label">巡查任务类型</div> |
| | | <div class="val">{{ getDictLabel(formData.patrolTaskType, dictObj.workOrderType) }}</div> |
| | | <div class="val">{{ getDictLabelXT(formData.patrolTaskType, workOrderTypeXT) }}</div> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <div class="label">任务执行时间</div> |
| | |
| | | clearable |
| | | > |
| | | <el-option |
| | | v-for="item in dictObj.workOrderType" |
| | | :key="item.dictKey" |
| | | :label="item.dictValue" |
| | | :value="item.dictKey" |
| | | v-for="item in workOrderTypeXT" |
| | | :key="item.dictValue" |
| | | :label="item.dictLabel" |
| | | :value="item.dictValue" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | |
| | | </template> |
| | | |
| | | <script setup> |
| | | import { computed, ref, onMounted } from 'vue' |
| | | import { computed, ref, onMounted, inject } from 'vue' |
| | | import { ElMessage } from 'element-plus' |
| | | import { fieldRules, flyVisual, getDictLabel, geomAnalysis } from '@ztzf/utils' |
| | | import { fieldRules, flyVisual, getDictLabel, getDictLabelXT, geomAnalysis } from '@ztzf/utils' |
| | | import { |
| | | gdPatrolTaskRepublish, |
| | | gdFlyerPageApi, |
| | |
| | | } |
| | | |
| | | const algorithmTreeData = ref([]) // 算法树形数据 |
| | | const workOrderTypeXT = inject('workOrderTypeXT', ref([])) |
| | | |
| | | // 获取算法分组数据 |
| | | async function getAlgorithmList() { |
| | |
| | | async function open({ mode = 'view', row } = {}) { |
| | | detailLoaded.value = false |
| | | dialogMode.value = mode |
| | | |
| | | const res = await gdPatrolTaskDetailApi({ id: row.id }) |
| | | formData.value = { ...initForm(), ...res.data.data } |
| | | // 确保 algorithmIds 是数组 |
| | |
| | | <el-form-item label="任务类型" prop="patrolTaskType"> |
| | | <el-select class="gd-select gray" popper-class="gd-select-popper" v-model="searchParams.patrolTaskType" |
| | | placeholder="请选择" clearable @change="handleSearch"> |
| | | <el-option v-for="item in dictObj.workOrderType" :key="item.dictKey" :label="item.dictValue" |
| | | :value="item.dictKey" /> |
| | | <el-option v-for="item in workOrderTypeXT" :key="item.dictValue" :label="item.dictLabel" |
| | | :value="item.dictValue" /> |
| | | </el-select> |
| | | </el-form-item> |
| | | |
| | |
| | | <el-table-column prop="taskNo" show-overflow-tooltip label="巡查任务编号" /> |
| | | <el-table-column prop="patrolTaskType" show-overflow-tooltip label="巡查任务类型"> |
| | | <template v-slot="{ row }"> |
| | | {{ getDictLabel(row.patrolTaskType, dictObj.workOrderType) }} |
| | | {{ getDictLabelXT(row.patrolTaskType, workOrderTypeXT) }} |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="taskStatus" show-overflow-tooltip label="巡查任务状态"> |
| | |
| | | import { onMounted, ref } from 'vue' |
| | | import { ElMessage, ElMessageBox } from 'element-plus' |
| | | import { getDictionaryByCode } from '@/api/system/dictbiz' |
| | | import { dateRangeFormat, getDictLabel } from '@ztzf/utils' |
| | | import { dateRangeFormat, getDictLabel, getDictLabelXT } from '@ztzf/utils' |
| | | import { getDictListApi } from '@/api/zkxt' |
| | | import FormDiaLog from './FormDiaLog.vue' |
| | | import { gdPatrolTaskPageApi, gdPatrolTaskRemoveApi } from './inspectionRequestApi' |
| | | import ViewDiaLog from '@/views/orderView/orderManage/inspectionRequest/ViewDiaLog.vue' |
| | |
| | | deviceLoadDemand: [], // 设备负载需求 |
| | | taskStatus: [], // 巡查任务状态 |
| | | }) |
| | | const workOrderTypeXT = ref([]) |
| | | const activeName = ref('all') |
| | | provide('dictObj', dictObj) |
| | | provide('workOrderTypeXT', workOrderTypeXT) |
| | | |
| | | const colors = { |
| | | 0: '#F6A000',//0待签收 |
| | |
| | | getDictionaryByCode('workOrderType,deviceLoadDemand,taskStatus').then(res => { |
| | | dictObj.value = res.data.data |
| | | }) |
| | | getDictListApi('task_inspection_type').then(res => { |
| | | workOrderTypeXT.value = res.data.data || [] |
| | | }) |
| | | } |
| | | |
| | | function refusalAccept (row) { |
| | |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <div class="label">工单类型</div> |
| | | <div class="val">{{ getDictLabel(formData.workOrderType, dictObj.workOrderType) }}</div> |
| | | <div class="val">{{ getDictLabelXT(formData.workOrderType, workOrderTypeXT) }}</div> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <div class="label">执行时间范围</div> |
| | |
| | | <el-table-column prop="patrolTaskName" show-overflow-tooltip label="巡查任务名称" /> |
| | | <el-table-column prop="patrolTaskType" show-overflow-tooltip label="巡查任务类型"> |
| | | <template v-slot="{ row }"> |
| | | {{ getDictLabel(row.patrolTaskType, dictObj.workOrderType) }} |
| | | {{ getDictLabelXT(row.patrolTaskType, workOrderTypeXT) }} |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="taskStatus" show-overflow-tooltip label="任务状态"> |
| | |
| | | clearable |
| | | > |
| | | <el-option |
| | | v-for="item in dictObj.workOrderType" |
| | | :key="item.dictKey" |
| | | :label="item.dictValue" |
| | | :value="item.dictKey" |
| | | v-for="item in workOrderTypeXT" |
| | | :key="item.dictValue" |
| | | :label="item.dictLabel" |
| | | :value="item.dictValue" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | |
| | | </template> |
| | | |
| | | <script setup> |
| | | import { computed, ref, nextTick } from 'vue' |
| | | import { computed, ref, nextTick, inject } from 'vue' |
| | | import { ElMessage } from 'element-plus' |
| | | import { dateRangeFormat, fieldRules, flyVisual, geomAnalysis, getDictLabel } from '@ztzf/utils' |
| | | import { dateRangeFormat, fieldRules, flyVisual, geomAnalysis, getDictLabel, getDictLabelXT } from '@ztzf/utils' |
| | | import { |
| | | gdWorkOrderDetailApi, |
| | | gdWorkOrderFlowListApi, |
| | |
| | | import { useStore } from 'vuex' |
| | | import OrderStepBar from '@/views/orderView/orderManage/orderManage/OrderStepBar.vue' |
| | | import OutcomeData from './outcomeData.vue' |
| | | import { getDictListApi } from '@/api/zkxt' |
| | | const store = useStore() |
| | | const permission = computed(() => store.state.user.permission) |
| | | const activeName = ref('basic') |
| | |
| | | const mapRef = ref(null) |
| | | const rejectVisible = ref(false) |
| | | const dictObj = inject('dictObj') |
| | | const workOrderTypeXT = inject('workOrderTypeXT', ref([])) |
| | | const dateRange = ref([]) |
| | | const patrolTaskList = ref([]) |
| | | const emit = defineEmits(['success']) |
| | |
| | | <el-form-item label="工单类型" prop="workOrderType"> |
| | | <el-select class="gd-select gray" popper-class="gd-select-popper" v-model="searchParams.workOrderType" |
| | | placeholder="请选择" clearable @change="handleSearch"> |
| | | <el-option v-for="item in dictObj.workOrderType" :key="item.dictKey" :label="item.dictValue" |
| | | :value="item.dictKey" /> |
| | | <el-option v-for="item in workOrderTypeXT" :key="item.dictValue" :label="item.dictLabel" |
| | | :value="item.dictValue" /> |
| | | </el-select> |
| | | </el-form-item> |
| | | |
| | |
| | | <el-table-column prop="workOrderCode" show-overflow-tooltip label="工单编号" /> |
| | | <el-table-column prop="workOrderType" show-overflow-tooltip label="工单类型"> |
| | | <template v-slot="{ row }"> |
| | | {{ getDictLabel(row.workOrderType, dictObj.workOrderType) }} |
| | | {{ getDictLabelXT(row.workOrderType, workOrderTypeXT) }} |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="status" show-overflow-tooltip label="阶段状态"> |
| | |
| | | import { onMounted, ref } from 'vue' |
| | | import { ElMessage, ElMessageBox } from 'element-plus' |
| | | import { getDictionaryByCode } from '@/api/system/dictbiz' |
| | | import { dateRangeFormat, getDictLabel } from '@ztzf/utils' |
| | | import { dateRangeFormat, getDictLabel, getDictLabelXT } from '@ztzf/utils' |
| | | import { getDictListApi } from '@/api/zkxt' |
| | | import FormDiaLog from './FormDiaLog.vue' |
| | | import { gdWorkOrderPageApi, gdWorkOrderRemoveApi } from './orderManageApi' |
| | | import dayjs from 'dayjs' |
| | |
| | | workOrderType: [], // 工单类型 |
| | | workOrderStatus: [], // 工单状态 |
| | | }) |
| | | const workOrderTypeXT = ref([]) |
| | | provide('dictObj', dictObj) |
| | | provide('workOrderTypeXT', workOrderTypeXT) |
| | | |
| | | // 获取列表 |
| | | async function getList () { |
| | |
| | | getDictionaryByCode('deviceLoadDemand,workOrderType,workOrderStatus,taskStatus').then(res => { |
| | | dictObj.value = res.data.data |
| | | }) |
| | | getDictListApi('task_inspection_type').then(res => { |
| | | workOrderTypeXT.value = res.data.data || [] |
| | | }) |
| | | } |
| | | |
| | | // 获取两个tab的总条数 |
| | |
| | | .join(','); |
| | | } |
| | | |
| | | // id转label xt |
| | | export function getDictLabelXT(value, dictList = []) { |
| | | if (value === null || value === undefined || value === '') return ''; |
| | | const values = String(value).split(','); |
| | | return dictList |
| | | .filter(item => values.includes(String(item.dictValue))) |
| | | .map(item => item.dictLabel) |
| | | .join(','); |
| | | } |
| | | |
| | | export function blobDownload(res) { |
| | | const disposition = res.headers?.['content-disposition'] || res.headers?.['Content-Disposition'] |
| | | const encodedName = disposition.split('filename=')[1] |