浏览代码

feat: save

gemercheung 1 年之前
父节点
当前提交
77deed5727

+ 14 - 0
src/api/mapOpt/list.ts

@@ -14,6 +14,7 @@ enum Api {
   delScene = '/service/manage_jp/project/delScene',
   createshare = '/service/manage_jp/projectScene/createSceneShare',
   shareGpsScene = '/service/manage_jp/projectScene/getSceneMap',
+  listAllGps = '/service/manage_jp/projectScene/listSceneGps',
 }
 
 type listType = {};
@@ -88,6 +89,19 @@ export const AllGpsApi = (params: MapSearchType) =>
     },
   });
 
+export const ListAllGpsApi = (params: MapSearchType) =>
+  defHttp.post<any>({
+    url: Api.listAllGps,
+    data: {
+      ...params,
+      type: Number(params.type),
+    },
+    headers: {
+      // @ts-ignore
+      ignoreCancelToken: true,
+    },
+  });
+
 export const GetSceneListApi = (
   params: PageParams<{
     projectId: number;

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

@@ -630,5 +630,7 @@
   "layout.map.projectScene": "项目场景",
   "layout.map.mapSelect": "地图选择",
   "layout.map.mapSearch": "地图搜索",
-  "layout.map.mapOfflineService": "地图服务访问超时,请检查网络"
+  "layout.map.mapOfflineService": "地图服务访问超时,请检查网络",
+  "layout.map.remove": "移除",
+  "layout.map.removeConfirm": "是否确认移除"
 }

+ 8 - 2
src/views/map/addProjectModal.vue

@@ -27,7 +27,7 @@
   import { BasicModal, useModalInner } from '/@/components/Modal';
   import { BasicForm, FormSchema, useForm } from '/@/components/Form/index';
   import { useI18n } from '/@/hooks/web/useI18n';
-  import { AddOptOrUpdateApi, AllGpsApi } from '/@/api/mapOpt/list';
+  import { AddOptOrUpdateApi, ListAllGpsApi } from '/@/api/mapOpt/list';
 
   const { t } = useI18n();
 
@@ -64,6 +64,9 @@
           label: t('layout.map.projectName'),
           component: 'Input',
           required: true,
+          componentProps: {
+            maxLength: 100,
+          },
           colProps: {
             span: 24,
           },
@@ -73,6 +76,9 @@
           label: t('layout.map.projectSn'),
           required: true,
           component: 'Input',
+          componentProps: {
+            maxLength: 100,
+          },
           colProps: {
             span: 24,
           },
@@ -92,7 +98,7 @@
           label: t('layout.map.selectScene'),
           component: 'ApiSelect',
           componentProps: {
-            api: AllGpsApi,
+            api: ListAllGpsApi,
             resultField: 'list',
             labelField: 'title',
             valueField: 'num',

+ 4 - 4
src/views/map/mapSelectModal.vue

@@ -64,7 +64,7 @@
   const schemas: FormSchema[] = [
     {
       field: 'projectName',
-      label: '项目名称',
+      label: t('layout.map.projectName'),
       component: 'Input',
       colProps: {
         span: 24,
@@ -72,7 +72,7 @@
     },
     {
       field: 'projectSn',
-      label: '项目编号',
+      label: t('layout.map.projectSn'),
       component: 'Input',
       colProps: {
         span: 24,
@@ -80,7 +80,7 @@
     },
     {
       field: 'location',
-      label: '位置',
+      label: t('layout.map.location'),
       component: 'Input',
       slot: 'location',
       colProps: {
@@ -89,7 +89,7 @@
     },
     {
       field: 'isShow',
-      label: '是否展示',
+      label: t('layout.map.isShow'),
       component: 'Switch',
       colProps: {
         span: 24,

+ 3 - 3
src/views/map/sceneModal.vue

@@ -36,10 +36,10 @@
             {
               color: 'error',
               // icon: 'mage:edit-fill',
-              label: t('common.delText'),
-              tooltip: t('common.delText'),
+              label: t('layout.map.remove'),
+              tooltip: t('layout.map.remove'),
               popConfirm: {
-                title: t('common.delConfirm'),
+                title: t('layout.map.removeConfirm'),
                 confirm: () => handleSceneDel(record),
               },
             },

+ 1 - 1
src/views/map/share.vue

@@ -197,7 +197,7 @@
     watchEffect(async () => {
       if (lang.value) {
         if (lang.value === 'ja') {
-          document.title = '地图分享-(日文)';
+          document.title = 'マップを共有';
         } else {
           document.title = '地图分享';
         }