gemercheung 1 год назад
Родитель
Сommit
f371276ebd

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

@@ -607,5 +607,19 @@
   "sys.login.signUpFormTitle": "注册",
   "sys.login.smsCode": "短信验证码",
   "sys.login.smsPlaceholder": "请输入验证码",
-  "sys.login.userName": "企业邮箱"
+  "sys.login.userName": "企业邮箱",
+  "layout.map.addPro": "新增项目",
+  "layout.map.projectInfo": "项目信息",
+  "layout.map.mapMode": "地图模式",
+  "layout.map.projectName": "项目名称",
+  "layout.map.projectSn": "项目编号",
+  "layout.map.homeShow": "首页显示",
+  "layout.map.isShow": "首页显示",
+  "layout.map.lat": "纬度",
+  "layout.map.lng": "经度",
+  "layout.map.selectScene": "选择场景",
+  "layout.map.scanShare": "扫码分享",
+  "layout.map.share": "分享",
+   "layout.map.copy": "复制链接",
+      "layout.map.location": "位置"
 }

+ 6 - 6
src/views/map/addProjectModal.vue

@@ -2,7 +2,7 @@
   <BasicModal
     v-bind="$attrs"
     @register="register"
-    :title="isEditMode ? '项目信息' : '新增项目'"
+    :title="isEditMode ? t('layout.map.projectInfo') : t('layout.map.addPro')"
     :minHeight="380"
     @ok="handleSubmit"
     @cancel="handleCancel"
@@ -59,7 +59,7 @@
         },
         {
           field: 'projectName',
-          label: '项目名称',
+          label: t('layout.map.projectName'),
           component: 'Input',
           required: true,
           colProps: {
@@ -68,7 +68,7 @@
         },
         {
           field: 'projectSn',
-          label: '项目编号',
+          label: t('layout.map.projectSn'),
           required: true,
           component: 'Input',
           colProps: {
@@ -77,7 +77,7 @@
         },
         {
           field: 'location',
-          label: '位置',
+          label: t('layout.map.location'),
           component: 'Input',
           required: false,
           slot: 'location',
@@ -87,7 +87,7 @@
         },
         {
           field: 'gpsNum',
-          label: '选择场景',
+          label: t('layout.map.selectScene'),
           component: 'ApiSelect',
           componentProps: {
             api: AllGpsApi,
@@ -123,7 +123,7 @@
         },
         {
           field: 'isShow',
-          label: '是否展示',
+          label: t('layout.map.homeShow'),
           component: 'Switch',
           defaultValue: true,
           colProps: {

+ 5 - 3
src/views/map/index.vue

@@ -109,15 +109,17 @@
         <Popover trigger="click" v-model:open="shareOpen" class="pop">
           <template #content>
             <div class="share-content">
-              <p>扫码分享</p>
+              <p>{{ t('layout.map.scanShare') }}</p>
               <QrCode :value="qrCodeShareUrl" :width="250" :height="250" />
-              <a-button type="link" class="btn" @click="handleCopy">复制链接</a-button>
+              <a-button type="link" class="btn" @click="handleCopy">{{
+                t('layout.map.copy')
+              }}</a-button>
             </div>
           </template>
           <!-- <a-button type="primary">Hover me</a-button> -->
           <div class="custom-btn" @click="handleShare">
             <img :src="shareImage" />
-            <span>分享</span>
+            <span>{{ t('layout.map.share') }}</span>
           </div>
         </Popover>
       </div>

+ 14 - 14
src/views/map/list.vue

@@ -2,7 +2,7 @@
   <div class="p-4">
     <BasicTable @register="registerTable">
       <template #toolbar>
-        <a-button type="primary" @click="handleCreate">新增项目</a-button>
+        <a-button type="primary" @click="handleCreate">{{ t('layout.map.addPro') }}</a-button>
       </template>
       <template #isShow="{ record }">
         <Switch
@@ -23,29 +23,29 @@
             {
               // color: 'warning',
               // icon: 'mage:edit-fill',
-              label: '项目信息',
-              tooltip: '项目信息',
+              label: t('layout.map.projectInfo'),
+              tooltip: t('layout.map.projectInfo'),
               onClick: () => handleOpenInfo(record),
             },
             {
               // color: 'warning',
               // icon: 'mage:edit-fill',
-              label: '场景管理',
-              tooltip: '场景管理',
+              label: t('routes.dashboard.scenes'),
+              tooltip: t('routes.dashboard.scenes'),
               onClick: () => handleOpenScene(record),
             },
             {
               // color: 'warning',
               // icon: 'mage:edit-fill',
-              label: '地图模式',
-              tooltip: '地图模式',
+              label: t('layout.map.mapMode'),
+              tooltip: t('layout.map.mapMode'),
               onClick: () => handleOpenMap(record),
             },
             {
               color: 'error',
               // icon: 'mage:edit-fill',
-              label: '删除',
-              tooltip: '删除',
+              label: t('common.delText'),
+              tooltip: t('common.delText'),
               popConfirm: {
                 title: t('common.delConfirm'),
                 confirm: handleDelete.bind(null, record),
@@ -120,12 +120,12 @@
           width: 60,
         },
         {
-          title: '项目名称',
+          title: t('layout.map.projectName'),
           dataIndex: 'projectName',
           width: 100,
         },
         {
-          title: '项目编号',
+          title: t('layout.map.projectSn'),
           dataIndex: 'projectSn',
           width: 100,
         },
@@ -136,7 +136,7 @@
           width: 200,
         },
         {
-          title: '首页显示',
+          title: t('layout.map.isShow'),
           dataIndex: 'isShow',
           slots: { customRender: 'isShow' },
           width: 100,
@@ -156,8 +156,8 @@
         labelWidth: 100,
         schemas: [
           {
-            field: 'projectName',
-            label: '项目名称',
+            field: t('layout.map.projectName'),
+            label: t('layout.map.projectName'),
             component: 'Input',
             colProps: {
               xl: 5,

+ 2 - 1
src/views/map/mapSelectModal.vue

@@ -37,7 +37,8 @@
       </CustomControl>
     </GoogleMap>
     <div v-if="searchMarker.lng || searchMarker.lat">
-      纬度 {{ searchMarker.lat }}, 经度 {{ searchMarker.lng }}</div
+      {{ t('layout.map.lat') }} {{ searchMarker.lat }}, {{ t('layout.map.lng') }}
+      {{ searchMarker.lng }}</div
     >
 
     <template #centerFooter> </template>

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

@@ -133,7 +133,7 @@
         },
       ];
       const [registerTable, { reload }] = useTable({
-        title: '场景列表',
+        title: t('routes.dashboard.scenesList'),
         api: ListApi,
         columns: columns,
         resizeHeightOffset: 300,
@@ -152,7 +152,7 @@
       });
 
       const [registerEditTable, { getSelectRowKeys }] = useTable({
-        title: '选择场景',
+        title: t('layout.map.selectScene'),
         api: ListApi,
         columns: columns.filter((item) => item.title !== t('common.operating')),
         formConfig: searchForm,