diff --git a/src/views/dataSearch.vue b/src/views/dataSearch.vue index b354189..ded2b33 100644 --- a/src/views/dataSearch.vue +++ b/src/views/dataSearch.vue @@ -26,13 +26,13 @@
-
+
-

{{ item.dataset_name }} {{ item.file_total }}

+

{{ item.dataset_name }} {{ item.file_total }}

{{ item.create_time }}
-
    -
  • +
  • {{ sample.sample_name }}
@@ -75,7 +75,7 @@
-
+

{{ item.voyage_name }} {{ item.voyage_mileage }}海里

@@ -256,6 +256,7 @@ export default { chooseStation: null, chooseLine: null, currentVoyage: null, // 当前选中的航次 + currentSample: null, // 当前选中的数据样品集合 // 地图图层基础地址 CesiumHostAddr: '', // 保存自定义底图 @@ -560,6 +561,21 @@ export default { if (type === '航次航线') { this.currentVoyage = pickedObject.id._id } + if (type === '数据样品集航线') { + this.currentSample = pickedObject.id._id + } + if (type === '样品航线' || type === 'point') { + // 循环匹配数据样品集,展开对应数据样品 + this.dataList.forEach(item => { + item.sampleArray.forEach(i => { + if (pickedObject.id._id == i.tsy_id) { + this.openList(item, 'map') + } + }) + }) + } else { + this.scrollTo(pickedObject.id._id) + } }, Cesium.ScreenSpaceEventType.LEFT_CLICK); // 叠加叠加影像服务 @@ -665,15 +681,25 @@ export default { this.show = false }, // 展开数据样品列表 - openList(item) { - if (this.currenId == item.tsy_id) { - this.fold = !this.fold + openList(item, type) { + if (type === 'list') { + if (this.currenId == item.tsy_id) { + this.fold = !this.fold + } else { + this.fold = true + if (item.file_total) { + this.currenId = item.tsy_id + this.job = item.job_type + } + } } else { this.fold = true - if (item.file_total) { - this.currenId = item.tsy_id - this.job = item.job_type - } + this.currenId = item.tsy_id + this.job = item.job_type + // this.scrollTo(item.tsy_id) + setTimeout(() => { + this.scrollTo(this.currenSample) + }, 500) } }, // 选中样品列表数据 @@ -710,6 +736,13 @@ export default { }, goHome() { this.$router.push({ name: 'home' }) + }, + scrollTo(sectionId) { + const element = document.getElementById(sectionId); + console.log(element) + if (element) { + element.scrollIntoView({ behavior: 'smooth' }); + } } } } diff --git a/src/views/dataTransfer/sampleDataset.vue b/src/views/dataTransfer/sampleDataset.vue index 06d25a7..08a1521 100644 --- a/src/views/dataTransfer/sampleDataset.vue +++ b/src/views/dataTransfer/sampleDataset.vue @@ -39,7 +39,7 @@ :disabled="disabledUpload" :auto-upload="false" :on-change="changeFile" - :on-error='fileErr' + :on-error="fileErr" :on-exceed="handleExceed" :file-list="fileList1" :data="fileData" @@ -254,7 +254,7 @@ export default { this.dialogVisible = true }, 1500) }, - fnBegin () { + fnBegin() { console.log('此时change了所有文件 开始上传', this.upFileList) this.submitUpload2() },