| | |
| | | @clear="handleClear" |
| | | /> |
| | | </el-form-item> |
| | | <!-- <el-form-item label="所属部门:" v-if="isExpand"> |
| | | <el-select |
| | | :teleported="false" |
| | | <el-form-item label="所属部门:" v-if="isExpand"> |
| | | <el-tree-select |
| | | popper-class="custom-tree-select" |
| | | v-model="searchForm.create_dept" |
| | | placeholder="请选择" |
| | | :data="deptData" |
| | | :default-expanded-keys="[searchForm.create_dept]" |
| | | check-strictly |
| | | node-key="id" |
| | | :props="treeDeptProps" |
| | | clearable |
| | | > |
| | | <el-option |
| | | v-for="item in deptData" |
| | | :key="item.id" |
| | | :label="item.deptName" |
| | | :value="item.id" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> --> |
| | | @change="(id) => handleDeptNodeClick({id})" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="任务状态:" v-if="isExpand"> |
| | | <el-select |
| | | style="z-index: 1000" |
| | |
| | | import { pxToRem } from '@/utils/rem'; |
| | | import { ElMessage } from 'element-plus'; |
| | | import { deptsByAreaCode, getSFDictionaryTree } from '@/api/job/task'; |
| | | import { getDeptLazyTree } from '@/api/system/dept' |
| | | // import TaskAlgorithmBusiness from './TaskAlgorithmBusiness.vue'; |
| | | import dayjs from 'dayjs'; |
| | | import { useStore } from 'vuex'; |
| | |
| | | let deptData = ref([]); |
| | | // 所属部门信息 |
| | | const getDeptsByAreaCode = () => { |
| | | deptsByAreaCode(searchForm.area_code).then(res => { |
| | | if (res.code !== 0) { |
| | | deptData.value = res.data.data; |
| | | } |
| | | getDeptLazyTree({ parentId: 0, level: 0 }).then(res => { |
| | | deptData.value = res.data.data; |
| | | }); |
| | | }; |
| | | |
| | |
| | | // 机巢 |
| | | let machineData = ref([]); |
| | | |
| | | // 记录选中行政区划值 |
| | | let area_code_log = ref('') |
| | | // 记录选中部门 |
| | | let dept_id_log = ref('') |
| | | |
| | | // 部门下得机巢 |
| | | const requestDockInfo = () => { |
| | | getRegionTreeAll({ parentCode: userAreaCode.value }).then(res => { |
| | | deptTreeData.value = res.data.data ? [res.data.data] : []; |
| | | |
| | | handleNodeClick({ id: userAreaCode.value }); |
| | | area_code_log.value = userAreaCode.value |
| | | roadDroneList() |
| | | }); |
| | | }; |
| | | |
| | | function handleNodeClick(data) { |
| | | area_code_log.value = data?.id |
| | | roadDroneList() |
| | | } |
| | | |
| | | // 筛选部门管理 |
| | | function handleDeptNodeClick(data) { |
| | | dept_id_log.value = data.id |
| | | roadDroneList() |
| | | } |
| | | |
| | | // 算法 |
| | | const treePropsSF = { |
| | | label: 'dictValue', |
| | | value: 'id', |
| | | children: 'children', |
| | | } |
| | | // 部门 |
| | | const treeDeptProps = { |
| | | label: 'title', |
| | | value: 'id', |
| | | children: 'children', |
| | | } |
| | | const dictKey = ref('') |
| | | const dataList = ref([]) |
| | |
| | | handleSearch() |
| | | } |
| | | |
| | | const handleNodeClick = async data => { |
| | | async function roadDroneList() { |
| | | // 处理机巢数据 |
| | | searchForm.device_sn = ''; |
| | | machineData.value = ''; |
| | | searchForm.device_sn = '' |
| | | machineData.value = '' |
| | | const droneList = await getDeviceRegion({ area_code: area_code_log.value, dept_id: dept_id_log.value }) |
| | | |
| | | const droneList = await getDeviceRegion({ areaCode: data.id }); |
| | | |
| | | machineData.value = droneList?.data?.data; |
| | | machineData.value = droneList?.data?.data |
| | | // 默认选中值 |
| | | if (signDevice_sn.value) { |
| | | searchForm.device_sn = signDevice_sn.value; |
| | | searchForm.device_sn = signDevice_sn.value |
| | | } |
| | | // 所属部门重新请求值 |
| | | searchForm.create_dept = ''; |
| | | deptData.value = []; |
| | | getDeptsByAreaCode(); |
| | | handleSearch(); |
| | | }; |
| | | handleSearch() |
| | | } |
| | | |
| | | // 日期 和周期 |
| | | let timeList = ['today', 'week', 'month', 'year']; |
| | |
| | | // 清除算法 |
| | | dictKey.value = ''; |
| | | // algorithmRef.value?.clear() |
| | | handleNodeClick({ id: userAreaCode.value }); |
| | | handleSearch(); |
| | | area_code_log.value = userAreaCode.value |
| | | dept_id_log.value = '' |
| | | roadDroneList() |
| | | // handleSearch(); |
| | | }; |
| | | |
| | | // 新增任务 |
| | |
| | | |
| | | onMounted(() => { |
| | | requestDockInfo(); |
| | | getDeptsByAreaCode() |
| | | getAlgorithmList(); |
| | | // 日历传值 |
| | | const calendarday = ref(route.query.day); |