| | |
| | | </el-form-item> |
| | | |
| | | <el-form-item label="巡查任务类型" prop="patrolTaskType"> |
| | | <el-select |
| | | <el-cascader |
| | | class="gd-select gray" |
| | | popper-class="gd-select-popper" |
| | | v-model="searchParams.patrolTaskType" |
| | | :options="workOrderTypeXT" |
| | | :props="taskTypeCascaderProps" |
| | | placeholder="请选择" |
| | | clearable |
| | | @change="handleSearch" |
| | | > |
| | | <el-option |
| | | v-for="item in dictObj.patrolTaskType" |
| | | :key="item.dictKey" |
| | | :label="item.dictValue" |
| | | :value="item.dictKey" |
| | | /> |
| | | </el-select> |
| | | /> |
| | | </el-form-item> |
| | | |
| | | <!-- <el-form-item label="任务状态" prop="taskStatus"> |
| | |
| | | <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.patrolTaskType) }} |
| | | {{ getTaskTypeLabel(row.patrolTaskType, workOrderTypeXT) }} |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="taskStatus" show-overflow-tooltip label="巡查任务状态"> |
| | |
| | | <el-table-column prop="resultCount" show-overflow-tooltip label="线索数量" /> |
| | | <el-table-column prop="issueEventCount" show-overflow-tooltip label="转为问题" /> |
| | | <el-table-column prop="taskDesc" show-overflow-tooltip label="巡查任务描述" /> |
| | | <el-table-column label="操作" class-name="operation-btns"> |
| | | <el-table-column label="操作" class-name="operation-btns" fixed="right"> |
| | | <template v-slot="{ row }"> |
| | | <el-link type="primary" @click="viewDiaLogView(row)">查看线索</el-link> |
| | | <el-link type="primary" @click="viewDiaLogView(row)">查看线索</el-link> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | |
| | | </div> |
| | | </div> |
| | | |
| | | <ViewDiaLog ref="viewDiaLogRef" v-if="viewDiaLogVisible" v-model="viewDiaLogVisible" /> |
| | | <ViewDiaLog ref="viewDiaLogRef" v-if="viewDiaLogVisible" v-model="viewDiaLogVisible" @success="getList" /> |
| | | </basic-container> |
| | | </template> |
| | | <script setup> |
| | | import { Search, RefreshRight } from '@element-plus/icons-vue' |
| | | import { onMounted, ref } from 'vue' |
| | | import { computed, onMounted, ref } from 'vue' |
| | | import { getDictionaryByCode } from '@/api/system/dictbiz' |
| | | import { dateRangeFormat, getDictLabel } from '@ztzf/utils' |
| | | import { getDictListApi } from '@/api/zkxt' |
| | | import { gdPatrolTaskPageApi } from '../inspectionRequest/inspectionRequestApi' |
| | | import { getDeptTree } from '@/api/system/dept' |
| | | import ViewDiaLog from './ViewDiaLog.vue' |
| | | import { useStore } from 'vuex' |
| | | import { getTaskTypeLabel, normalizeTaskTypeOptions, taskTypeCascaderProps } from '../taskTypeOptions' |
| | | |
| | | // 初始化查询参数 |
| | | const initSearchParams = () => ({ |
| | |
| | | children: 'children', |
| | | } |
| | | const dictObj = ref({ |
| | | patrolTaskType: [], // 巡查任务类型 |
| | | workOrderType: [], // 巡查任务类型 |
| | | taskStatus: [], // 巡查任务状态 |
| | | }) |
| | | const workOrderTypeXT = ref([]) |
| | | |
| | | provide('dictObj', dictObj) |
| | | provide('workOrderTypeXT', workOrderTypeXT) |
| | | provide('deptTree', deptTree) |
| | | provide('treeProps', treeProps) |
| | | |
| | |
| | | const range = dateRangeFormat(dateRange.value) |
| | | loading.value = true |
| | | try { |
| | | const res = await gdPatrolTaskPageApi({ ...searchParams.value, startTime: range[0], endTime: range[1] }) |
| | | const res = await gdPatrolTaskPageApi({ |
| | | ...searchParams.value, |
| | | startTime: range[0], |
| | | endTime: range[1], |
| | | taskStatus: 8, |
| | | patrolTaskType: searchParams?.value?.patrolTaskType?.join?.(','), |
| | | }) |
| | | list.value = res?.data?.data?.records ?? [] |
| | | total.value = res?.data?.data?.total ?? 0 |
| | | } finally { |
| | |
| | | |
| | | // 获取字典 |
| | | function getDictList() { |
| | | getDictionaryByCode('patrolTaskType,taskStatus').then(res => { |
| | | getDictionaryByCode('workOrderType,taskStatus').then(res => { |
| | | dictObj.value = res.data.data |
| | | }) |
| | | getDictListApi('task_inspection_type').then(res => { |
| | | workOrderTypeXT.value = normalizeTaskTypeOptions(res.data.data || []) |
| | | }) |
| | | } |
| | | |
| | | const store = useStore() |
| | | const userInfo = computed(() => store.state.user.userInfo) |
| | | |
| | | // 获取部门树 |
| | | function getDeptTreeFun() { |
| | | getDeptTree().then(res => { |
| | | getDeptTree(userInfo.value.dept_id).then(res => { |
| | | deptTree.value = res.data.data |
| | | }) |
| | | } |