gemercheung 1 rok temu
rodzic
commit
90aa009f70

+ 4 - 1
src/locales/lang/json/zh-CN.json

@@ -636,5 +636,8 @@
     "layout.map.sceneSource.4": "四维深时OBJ",
     "layout.map.sceneSource.5": "四维深时点云",
     "layout.map.createName": "创建人",
-    "layout.map.keywords": "关键字"
+    "layout.map.keywords": "关键字",
+    "layout.map.geoLocation": "地理位置",
+    "layout.map.geoLocation.opt1": "设置地理位置",
+    "layout.map.geoLocation.opt2": "从场景列表选择"
 }

+ 35 - 7
src/views/map/addProjectModal.vue

@@ -46,6 +46,7 @@
       // const { createMessage } = useMessage();
       const isEditMode = ref(false);
       const locationEdit = ref('');
+      const isDefaultSelect = ref(1);
 
       // const customEditSelect: FormSchema = {
       //   field: 'sceneID',
@@ -71,13 +72,37 @@
             span: 24,
           },
         },
+        // {
+        //   field: 'projectSn',
+        //   label: t('layout.map.projectSn'),
+        //   required: true,
+        //   component: 'Input',
+        //   componentProps: {
+        //     maxLength: 100,
+        //   },
+        //   colProps: {
+        //     span: 24,
+        //   },
+        // },
         {
-          field: 'projectSn',
-          label: t('layout.map.projectSn'),
-          required: true,
-          component: 'Input',
+          field: 'tempSlect',
+          label: t('layout.map.geoLocation'),
+          component: 'Select',
           componentProps: {
-            maxLength: 100,
+            onChange: function (value: number) {
+              isDefaultSelect.value = value;
+            },
+            defaultValue: 1,
+            options: [
+              {
+                label: t('layout.map.geoLocation.opt1'),
+                value: 1,
+              },
+              {
+                label: t('layout.map.geoLocation.opt2'),
+                value: 2,
+              },
+            ],
           },
           colProps: {
             span: 24,
@@ -92,6 +117,9 @@
           colProps: {
             span: 24,
           },
+          ifShow: () => {
+            return isDefaultSelect.value === 1;
+          },
         },
         {
           field: 'gpsNum',
@@ -125,8 +153,8 @@
               pageSize: 5000,
             },
           },
-          ifShow: ({ values }) => {
-            return values?.id;
+          ifShow: () => {
+            return isDefaultSelect.value === 2;
           },
         },
         {