| | |
| | | <!-- <el-button type="primary" icon="el-icon-download" @click="allDownloadFun"--> |
| | | <!-- >全部下载</el-button--> |
| | | <!-- >--> |
| | | <el-button type="primary" @click="handleswitchFolders" >切换文件夹</el-button> |
| | | |
| | | <el-button type="primary" plain @click="handleswitchFolders" ><el-icon><FolderOpened /></el-icon></el-button> |
| | | <div class="downloadBtn" @click="htsjzx === 100 && downloadFun()"> |
| | | <el-progress v-if="htsjzx !== 100" :percentage="htsjzx" :show-text="false" striped striped-flow :duration="1" /> |
| | | <div class="downloadBtnText"> |
| | |
| | | const userAreaCode = computed(() => store.getters.userInfo.detail.areaCode); |
| | | const selectedAreaCode = computed(() => store.state.user.selectedAreaCode); |
| | | const htsjzx = computed(() => store.state.common.downloadProgress?.htsjzx || 100) |
| | | |
| | | const emit = defineEmits(['search', 'downFun', 'allDownFun','handleswitchFolders']); |
| | | const startTime = dayjs().subtract(6, 'day').startOf('day'); |
| | | const endTime = dayjs().endOf('day'); |
| | | const timeRange = [startTime.format('YYYY-MM-DD HH:mm:ss'), endTime.format('YYYY-MM-DD HH:mm:ss')]; |
| | | const dateRange = ref(timeRange); |
| | | const timeFormat = 'YYYY-MM-DD HH:mm:ss'; |
| | | const props = defineProps(['jobName','switchFolders']) |
| | | const props = defineProps(['searchjobId','switchFolders']) |
| | | const searchForm = reactive({ |
| | | jobName: '', //任务名称 |
| | | name: '', //文件名称 |
| | |
| | | deviceSn: '', // 所属机巢 |
| | | resultType: '', //文件格式 |
| | | photoType: '', //文件类别 |
| | | wayLineJobId:'' |
| | | }); |
| | | const disabled = ref(false); |
| | | const treeProps = { |
| | |
| | | }, |
| | | { deep: true } |
| | | ); |
| | | watch(() => props.jobName, (newVal) => { |
| | | searchForm.jobName = newVal; |
| | | watch(() => props.searchjobId, (newVal) => { |
| | | searchForm.wayLineJobId = newVal; |
| | | handleSearch() |
| | | }); |
| | | const foldersDisabled = ref(false) |
| | |
| | | searchForm.endTime = end.format(timeFormat); |
| | | handleSearch() |
| | | } |
| | | |
| | | }; |
| | | // 部门下得机巢 |
| | | const requestDockInfo = () => { |
| | | getRegionTreeAll({ parentCode: userAreaCode.value }).then(res => { |
| | | deptTreeData.value = res.data.data ? [res.data.data] : []; |
| | | |
| | | handleNodeClick({ id: userAreaCode.value }); |
| | | }); |
| | | }; |
| | |
| | | // 处理机巢数据 |
| | | searchForm.deviceSn = ''; |
| | | machineData.value = ''; |
| | | |
| | | const droneList = await getDeviceRegion({ areaCode: data.id }); |
| | | |
| | | machineData.value = droneList?.data?.data; |
| | | |
| | | // 默认选中值 |
| | | if (signDevice_sn.value) { |
| | | searchForm.deviceSn = signDevice_sn.value; |
| | | } |
| | | // 所属部门重新请求值 |
| | | |
| | | deptData.value = []; |
| | | getDeptsByAreaCode(); |
| | | handleSearch(); |
| | | |
| | | }; |
| | | // 所属部门信息 |
| | | const getDeptsByAreaCode = () => { |
| | |
| | | searchForm.deviceSn = ''; |
| | | searchForm.resultType = ''; |
| | | searchForm.photoType = ''; |
| | | searchForm.wayLineJobId='' |
| | | handleNodeClick({ id: userAreaCode.value }); |
| | | handleSearch(); |
| | | }; |
| | |
| | | } |
| | | // 切换文件夹 |
| | | const handleswitchFolders =()=>{ |
| | | emit('handleswitchFolders'); |
| | | emit('handleswitchFolders'); |
| | | } |
| | | |
| | | onMounted(() => { |
| | | requestDockInfo(); |
| | | getDownloadStatusApi({type: 'htsjzx'}).then(res =>{ |
| | |
| | | } |
| | | }) |
| | | }); |
| | | |
| | | |
| | | </script> |
| | | |
| | | <style scoped lang="scss"> |