diff --git a/src/router/index.js b/src/router/index.js index a4b6b7ef6..b510bd9d7 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -135,7 +135,7 @@ const SimulationPlatform = () => import('@/views/trainingPlatform/simulation'); const PublishMap = () => import('@/views/publish/publishMap/index'); const SubsystemManage = () => import('@/views/publish/publishMap/subsystem'); -const IscsDataManage = () => import('@/views/publish/publishMap/iscsDataManage'); +const IscsDataManage = () => import('@/views/publish/publishMap/iscsDataManage/index'); const PublishMapDetail = () => import('@/views/publish/publishMap/list'); // 发布历史 const PublishLesson = () => import('@/views/publish/publishLesson/index'); const RunPlanTemplate = () => import('@/views/publish/runPlanTemplate/index'); diff --git a/src/views/publish/publishMap/addIscsDevice.vue b/src/views/publish/publishMap/iscsDataManage/addIscsDevice.vue similarity index 100% rename from src/views/publish/publishMap/addIscsDevice.vue rename to src/views/publish/publishMap/iscsDataManage/addIscsDevice.vue diff --git a/src/views/publish/publishMap/addIscsResources.vue b/src/views/publish/publishMap/iscsDataManage/addIscsResources.vue similarity index 100% rename from src/views/publish/publishMap/addIscsResources.vue rename to src/views/publish/publishMap/iscsDataManage/addIscsResources.vue diff --git a/src/views/publish/publishMap/addVoice.vue b/src/views/publish/publishMap/iscsDataManage/addVoice.vue similarity index 100% rename from src/views/publish/publishMap/addVoice.vue rename to src/views/publish/publishMap/iscsDataManage/addVoice.vue diff --git a/src/views/publish/publishMap/batchAddIscsDevice.vue b/src/views/publish/publishMap/iscsDataManage/batchAddIscsDevice.vue similarity index 100% rename from src/views/publish/publishMap/batchAddIscsDevice.vue rename to src/views/publish/publishMap/iscsDataManage/batchAddIscsDevice.vue diff --git a/src/views/publish/publishMap/generateVoice.vue b/src/views/publish/publishMap/iscsDataManage/generateVoice.vue similarity index 100% rename from src/views/publish/publishMap/generateVoice.vue rename to src/views/publish/publishMap/iscsDataManage/generateVoice.vue diff --git a/src/views/publish/publishMap/iscsDataManage.vue b/src/views/publish/publishMap/iscsDataManage/index.vue similarity index 95% rename from src/views/publish/publishMap/iscsDataManage.vue rename to src/views/publish/publishMap/iscsDataManage/index.vue index 82e4a32a0..d8d750644 100644 --- a/src/views/publish/publishMap/iscsDataManage.vue +++ b/src/views/publish/publishMap/iscsDataManage/index.vue @@ -74,13 +74,6 @@ export default { labelWidth: '120px', reset: true, queryObject: { - mapId: { - type: 'select', - label: '地图', - config: { - data: [] - } - }, code: { type: 'text', label: 'code' @@ -109,7 +102,7 @@ export default { } }, deviceQueryList: { - query: pagedIscsDevice, + query: this.queryDeviceFunction, selectCheckShow: false, indexShow: true, columns: [ @@ -171,13 +164,6 @@ export default { labelWidth: '120px', reset: true, queryObject: { - mapId: { - type: 'select', - label: '地图', - config: { - data: [] - } - }, system: { type: 'select', label: '系统', @@ -196,7 +182,7 @@ export default { }, resourceQueryList: { - query: pagedIscsResources, + query: this.queryResourcesFunction, selectCheckShow: false, indexShow: true, columns: [ @@ -264,7 +250,7 @@ export default { } }, voiceQueryList: { - query: pagedAudioResources, + query: pagedAudioResources, selectCheckShow: false, indexShow: true, columns: [ @@ -311,6 +297,11 @@ export default { } }; }, + computed: { + mapId() { + return this.$route.query.mapId; + } + }, mounted() { getPublishMapListOnline().then(resp => { this.mapList = resp.data; @@ -318,12 +309,20 @@ export default { this.mapList.forEach(elem => { list.push({ label: elem.name, value: elem.id }); }); - this.deviceQueryForm.queryObject.mapId.config.data = list; + // this.deviceQueryForm.queryObject.mapId.config.data = list; }).catch(() => { this.$message.error('获取地图列表失败!'); }); }, methods: { + queryDeviceFunction(params) { + params.mapId = this.mapId; + return pagedIscsDevice(params); + }, + queryResourcesFunction(params) { + params.mapId = this.mapId; + return pagedIscsResources(params); + }, // 删除 handleDeleteDevice(index, row) { this.$confirm('此操作将删除该ISCS设备数据!', this.$t('global.tips'), {