离线数据补招文件夹层级展示

This commit is contained in:
zhujiyan
2024-08-26 14:21:46 +08:00
parent f879cdaf09
commit 829be66029
6 changed files with 147 additions and 28 deletions

View File

@@ -0,0 +1,17 @@
import createAxios from '@/utils/request'
// 获取设备补招页面数据
export function getMakeUpData(data: any) {
return createAxios({
url: '/cs-harmonic-boot/offlineDataUpload/makeUpData?lineId='+data,
method: 'POST'
})
}
//查询装置目录-文件
export function getAskDirOrFile(data: any) {
return createAxios({
url: `/cs-harmonic-boot/offlineDataUpload/askDirOrFile?fileType=${data.fileType}&nDid=${data.nDid}&path=${data.path}&prjName=${data.prjName}`,
method: 'POST'
})
}

View File

@@ -0,0 +1 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1724384468716" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="6792" width="24" height="24" xmlns:xlink="http://www.w3.org/1999/xlink"><path d="M834.6624 409.6a40.8576 40.8576 0 0 0-13.7728-30.63808l-254.32064-254.32064a40.87296 40.87296 0 0 0-31.1552-11.84768c-0.97792-0.07168-1.9456-0.1536-2.93376-0.1536H230.4a40.96 40.96 0 0 0-40.96 40.96v716.8a40.96 40.96 0 0 0 40.96 40.96h563.2a40.96 40.96 0 0 0 40.96-40.96V419.84c0-1.62304-0.11776-3.21536-0.3072-4.79232a40.6528 40.6528 0 0 0 0.4096-5.44768zM578.56 252.48256L694.71744 368.64H578.56V252.48256zM271.36 829.44V194.56h225.28v215.04a40.96 40.96 0 0 0 40.96 40.96h215.04v378.88H271.36z" p-id="6793" fill="#012B6A"></path><path d="M371.2 660.48h133.12a40.96 40.96 0 0 0 0-81.92h-133.12a40.96 40.96 0 0 0 0 81.92zM650.24 696.32H363.52a40.96 40.96 0 0 0 0 81.92h286.72a40.96 40.96 0 0 0 0-81.92z" p-id="6794" fill="#012B6A"></path></svg>

After

Width:  |  Height:  |  Size: 1.0 KiB

View File

@@ -0,0 +1 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1724374828868" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="14992" width="48" height="48" xmlns:xlink="http://www.w3.org/1999/xlink"><path d="M912 208H427.872l-50.368-94.176A63.936 63.936 0 0 0 321.056 80H112c-35.296 0-64 28.704-64 64v736c0 35.296 28.704 64 64 64h800c35.296 0 64-28.704 64-64v-608c0-35.296-28.704-64-64-64z m-800-64h209.056l68.448 128H912v97.984c-0.416 0-0.8-0.128-1.216-0.128H113.248c-0.416 0-0.8 0.128-1.248 0.128V144z m0 736v-96l1.248-350.144 798.752 1.216V784h0.064v96H112z" fill="#012B6A" p-id="14993"></path></svg>

After

Width:  |  Height:  |  Size: 727 B

View File

@@ -349,7 +349,8 @@ const handleaddDevice = () => {
push({
path: '/supplementaryRecruitment',
query: {
id: '1111'
id: lineId.value,
ndid:deviceData.value.ndid
}
})
}
@@ -521,17 +522,11 @@ const handleClick = async (tab?: any) => {
//模版下载
const handleDownLoadTemplate = () => {}
//解析列表
// const isAnalysisList = ref(false)
const analysisListRef = ref()
//打开解析列表
const handleAnalysisList = () => {
// isAnalysisList.value = true
analysisListRef.value && analysisListRef.value.open()
}
//返回
// const handleBackAnalysisList=()=>{
// isAnalysisList.value = false
// }
//离线数据导入
const offLineDataImportRef = ref()
const handleImport = () => {
@@ -586,18 +581,6 @@ const openGroup = () => {
})
})
}
watch(
() => dataSet.value,
(val: any, oldVal: any) => {
if (val) {
// handleClick()
}
}
)
watch(
() => tableData.value,
(val: any, oldVal: any) => {}
)
onMounted(() => {})
</script>

View File

@@ -2,7 +2,8 @@
<div class="default-main">
<el-tabs v-model="activeName" type="border-card">
<el-tab-pane label="当前设备补招" name="0">
<current v-if="activeName == '0'" />
<!-- <current v-if="activeName == '0'" /> -->
<currentDevice v-if="activeName == '0'" ref="currentDeviceRef"/>
</el-tab-pane>
<el-tab-pane label="历史设备补招" name="1">
<history v-if="activeName == '1'" />
@@ -10,14 +11,33 @@
</el-tabs>
</div>
</template>
<script lang='ts' setup>
import {ref,onMounted} from 'vue';
import current from './supplementaryRecruitment/current.vue'
<script lang="ts" setup>
import { ref, onMounted,watch ,nextTick} from 'vue'
// import current from './supplementaryRecruitment/current.vue'
import currentDevice from './supplementaryRecruitment/currentDevice.vue'
import history from './supplementaryRecruitment/history.vue'
const activeName=ref('0')
onMounted(()=>{
console.log()
import { useRoute } from 'vue-router'
const route = useRoute()
const activeName = ref('0')
const currentDeviceRef=ref()
watch(
()=>activeName.value,
(val,oldVal)=>{
if(val=='0'){
nextTick(()=>{
currentDeviceRef.value&&currentDeviceRef.value.getMakeUpDataList(route.query)
})
}
},
{
immediate:true,
deep:true
}
)
onMounted(() => {
console.log()
currentDeviceRef.value&&currentDeviceRef.value.getMakeUpDataList(route.query)
})
</script>
<style lang='scss' scoped>
</style>
<style lang="scss" scoped></style>

View File

@@ -0,0 +1,97 @@
<template>
<div class="default-main current_device" v-loading="loading">
<!-- <div class="file_path" v-if="dirCheckedList.value && dirCheckedList.value.length != 0">
<el-breadcrumb separator="/">
<el-breadcrumb-item v-for="(item, index) in dirCheckedList" :key="index">
{{ item.prjName }}
</el-breadcrumb-item>
</el-breadcrumb>
</div> -->
<div class="device_dir" v-for="(item, index) in dirList" :key="index">
<img v-if="item.type == 'dir'" src="@/assets/img/wenjianjia.svg" @click="handleIntoDir(item)" />
<img
class="device_dir_file"
v-if="item.type == 'file'"
src="@/assets/img/wenjian.svg"
@click="handleIntoDir(item)"
/>
<p>{{ item.prjName }}>{{ item.prjDataPath }}</p>
</div>
</div>
</template>
<script lang="ts" setup>
import { ref, onMounted, defineProps, defineExpose } from 'vue'
import { getMakeUpData, getAskDirOrFile } from '@/api/cs-harmonic-boot/recruitment.ts'
// const props = defineProps(['lineId'])
const loading = ref(false)
const dirList = ref([])
const route: any = ref({})
const getMakeUpDataList = (row: any) => {
route.value = row
loading.value = true
getMakeUpData(row.id).then(res => {
console.log(res, '????????????')
dirList.value = res.data
loading.value = false
})
}
// 进入文件夹
const dirCheckedList: any = ref([])
const handleIntoDir = (row: any) => {
if (dirCheckedList.value.indexOf(row) == -1) {
dirCheckedList.value.push(row)
}
console.log(row, 'hhhhh', dirCheckedList.value)
const obj = {
fileType: row.type,
nDid: route.value.ndid,
path: row.prjDataPath,
prjName: row.prjName
}
getAskDirOrFile(obj).then(res => {
console.log(res, '查询3333333333333333')
dirList.value = res.data
})
}
onMounted(() => {
console.log()
// getMakeUpDataList()
})
defineExpose({ getMakeUpDataList })
</script>
<style lang="scss" scoped>
.current_device {
width: 100%;
height: calc(100vh - 200px);
display: flex;
flex-wrap: wrap;
align-items: flex-start;
// justify-content: space-between;
overflow-y: auto;
.device_dir {
width: 24.1%;
height: 120px;
border: 1px solid #eee;
margin: 0 0.3%;
display: flex;
align-items: center;
flex-direction: column;
justify-content: center;
.device_dir_file {
width: 60px;
height: 60px;
}
img {
width: 50px;
height: 50px;
}
img:hover {
cursor: pointer;
}
p {
margin-top: 10px;
}
// margin:10px;
}
}
</style>