浏览代码

锁定站地图编辑回显问题修复

wyn 2 月之前
父节点
当前提交
42da45c964

+ 2 - 2
src/api/basic/mapconfig/index.ts

@@ -21,8 +21,8 @@ export interface PageParam {
 export const getIsMapPage = async (params: PageParam) => {
   return await request.get({ url: '/iscs/map/getMapPage', params })
 }
-export const getNotUsedMap = async () => {
-  return await request.get({ url: '/iscs/map/getNotUsedMap' })
+export const getNotUsedMap = async (mapId:number) => {
+  return await request.get({ url: '/iscs/map/getNotUsedMap',params: { mapId } })
 }
 // 查询地图参数详细
 export const selectIsMapById = async (id: number) => {

+ 3 - 3
src/views/dv/lotoStation/LotoStationForm.vue

@@ -73,7 +73,7 @@ import * as MapconfigApi from '@/api/basic/mapconfig/index'
 import * as  HardwareApi from '@/api/hw/hardware/information/index'
 import * as  MarsDeptApi from '@/api/system/marsdept'
 import {  handleTree } from '@/utils/tree'
-import {getNotUsedMap} from "@/api/basic/mapconfig/index";
+
 defineOptions({ name: 'LotoStationForm' })
 
 const { t } = useI18n() // 国际化
@@ -107,7 +107,7 @@ const mapOptions = ref([]) // 地图选项
 const hardWareList = ref([]) // 硬件列表
 
 /** 打开弹窗 */
-const open = async (type: string, id?: number) => {
+const open = async (type: string, id?: number,mapId?:number) => {
   dialogVisible.value = true
   dialogTitle.value = t('action.' + type)
   formType.value = type
@@ -126,7 +126,7 @@ const open = async (type: string, id?: number) => {
   marsOptions.value = handleTree(deptRes.list)
 
   // 获取地图数据 (getNotUsedMap这个接口可以筛选已经被使用的就不再出现 未被使用的才出现)
-  const mapRes = await MapconfigApi.getNotUsedMap()
+  const mapRes = await MapconfigApi.getNotUsedMap(mapId)
   mapOptions.value = mapRes
 
   // 获取硬件数据

+ 3 - 3
src/views/dv/lotoStation/index.vue

@@ -85,7 +85,7 @@
           <el-button
             link
             type="primary"
-            @click="openForm('update', scope.row.id)"
+            @click="openForm('update', scope.row.id,scope.row.mapId)"
             v-hasPermi="['iscs:station:update']"
           >
             修改
@@ -173,8 +173,8 @@ const resetQuery = () => {
 
 /** 添加/修改操作 */
 const formRef = ref()
-const openForm = (type: string, id?: number) => {
-  formRef.value.open(type, id)
+const openForm = (type: string, id?: number,mapId?:number) => {
+  formRef.value.open(type, id,mapId)
 }
 
 /** 删除按钮操作 */