tangning 2 месяцев назад
Родитель
Сommit
331d321d4a

+ 1 - 1
src/components/Cropper/src/CopperModal.vue

@@ -222,7 +222,7 @@
           try {
             setModalProps({ confirmLoading: true });
             const result = await uploadApi({ name: 'file', file: blob, filename });
-            emit('uploadSuccess', { source: previewSource.value, data: result.data });
+            emit('uploadSuccess', { source: previewSource.value, data: result.data || result });
             closeModal();
           } finally {
             setModalProps({ confirmLoading: false });

+ 45 - 25
src/locales/lang/json/ja.json

@@ -242,9 +242,11 @@
       "allScene": "シーン",
       "copy": "コピー",
       "createName": "作成者",
-      "geoLocation": "ポジション",
-      "geoLocation.opt1": "ポジションを設置",
-      "geoLocation.opt2": "シーンリストから選択",
+      "geoLocation": {
+        "name": "ポジション",
+        "opt1": "ポジションを設置",
+        "opt2": "シーンリストから選択"
+      },
       "homeShow": "ホームページで表示",
       "isShow": "表示",
       "keywords": "キーワード",
@@ -396,7 +398,9 @@
       "addCorporation": "会社を追加",
       "addError": "アカウントはバインドされています。再入力してください",
       "addSubId": "追加",
-      "address": "住所",
+      "address": {
+        "name": "住所"
+      },
       "allow": "許可",
       "approveState": "認証状況",
       "area": "エリア",
@@ -491,9 +495,11 @@
       "addDevice": "デバイスの追加",
       "addSubAccount": "追加",
       "addeduser": "追加されたアカウントの数",
-      "address": "アカウント",
-      "address.placeholder": "メールアドレスを入力してください。",
-      "address.required": "メールアドレスを入力してください。",
+      "address": {
+        "name": "アカウント",
+        "placeholder": "メールアドレスを入力してください。",
+        "required": "メールアドレスを入力してください。"
+      },
       "balance": "初期点",
       "bindErr": "アカウントは会社に紐付けされています。",
       "browserDevice": "ブラウザデバイス",
@@ -506,12 +512,16 @@
         "7": "三脚セット",
         "9": "4DKK_Minion"
       },
-      "cameraType": "カメラ",
-      "cameraType.placeholder": "使用するカメラを選択してください。",
-      "cameraType.required": "使用するカメラを選択してください。",
-      "childName": "デバイスID",
-      "childName.placeholder": "デバイスIDを入力してください。",
-      "childName.required": "カメラSNの下9ケタを入力してください。",
+      "cameraType": {
+        "name": "カメラ",
+        "placeholder": "使用するカメラを選択してください。",
+        "required": "使用するカメラを選択してください。"
+      },
+      "childName": {
+        "name": "デバイスID",
+        "placeholder": "デバイスIDを入力してください。",
+        "required": "カメラSNの下9ケタを入力してください。"
+      },
       "companyId": "クライアントの名前",
       "device": "デバイス",
       "deviceCode": "デバイスIDが重複しています。再入力してください",
@@ -527,9 +537,11 @@
       "num": "デバイス数",
       "orderSn": "注文番号",
       "other": "その他",
-      "own": "出荷",
-      "own.placeholder": "選択してください。",
-      "own.required": "どれか1つ選択してください。",
+      "own": {
+        "name": "出荷",
+        "placeholder": "選択してください。",
+        "required": "どれか1つ選択してください。"
+      },
       "ownName": {
         "0": "購入",
         "1": "その他",
@@ -541,16 +553,20 @@
       "searchNamePlaceholder": "デバイスID、アカウント、SNコード",
       "selfUse": "従業員自身の使用",
       "shipmentType": "出荷",
-      "snCode": "SNコ一ド",
-      "snCode.placeholder": "カメラSNの下9ケタを入力してください。",
-      "snCode.required": "SNコードを入力してください。",
+      "snCode": {
+        "name": "SNコ一ド",
+        "placeholder": "カメラSNの下9ケタを入力してください。",
+        "required": "SNコードを入力してください。"
+      },
       "subNum": "機器の数量",
       "title": "担当者",
       "type": "機器タイプ",
       "unbindWarning": "アカウントを解除しますか?",
-      "wifiName": "WIFI",
-      "wifiName.placeholder": "カメラWi-Fiを入力してください。",
-      "wifiName.required": "カメラWi-Fiを入力してください。※例4DKKPRO_111111111"
+      "wifiName": {
+        "name": "WIFI",
+        "placeholder": "カメラWi-Fiを入力してください。",
+        "required": "カメラWi-Fiを入力してください。※例4DKKPRO_111111111"
+      }
     },
     "personalSetting": {
       "account": "個人設定",
@@ -578,7 +594,9 @@
       "bindTime": "バインディング時間",
       "canShow": "一緒に訪れるために同時に開くかどうか",
       "cancelDownload": "ダウンロードをキャンセル",
-      "childName": "カメラSN",
+      "childName": {
+        "name": "カメラSN"
+      },
       "copy": "コピー",
       "copyInfi": {
         "content": "シーンをコピーしますか?\n※編集内容や設定は、そのままコピーされます。",
@@ -609,8 +627,10 @@
       "livestreamStatus": "放送を始めますか?",
       "makeLiveCover": "ライブルームカバーを生成",
       "migrate": "移動",
-      "migrateAccount": "アカウント",
-      "migrateAccount.required": "企業アカウントを入力してください。",
+      "migrateAccount": {
+        "name": "アカウント",
+        "required": "企業アカウントを入力してください。"
+      },
       "migrateDevice": "カメラ",
       "migrateDevice.required": "カメラSNを選択してください。",
       "moveScene": "モバイルシーン",

+ 45 - 25
src/locales/lang/json/zh-CN.json

@@ -242,9 +242,11 @@
       "allScene": "全部场景",
       "copy": "复制链接",
       "createName": "创建人",
-      "geoLocation": "地理位置",
-      "geoLocation.opt1": "设置地理位置",
-      "geoLocation.opt2": "从场景列表选择",
+      "geoLocation": {
+        "name": "地理位置",
+        "opt1": "设置地理位置",
+        "opt2": "从场景列表选择"
+      },
       "homeShow": "首页显示",
       "isShow": "是否显示",
       "keywords": "关键字",
@@ -396,7 +398,9 @@
       "addCorporation": "新增企业",
       "addError": "账号已被绑定,请重新输入",
       "addSubId": "新增员工",
-      "address": "详细地址",
+      "address": {
+        "name": "详细地址"
+      },
       "allow": "同意",
       "approveState": "审核状态",
       "area": "所属区域",
@@ -490,9 +494,11 @@
       "addDevice": "新增设备",
       "addSubAccount": "新增员工",
       "addeduser": "已添加员工数",
-      "address": "物理地址",
-      "address.placeholder": "请输入物理地址",
-      "address.required": "请输入物理地址",
+      "address": {
+        "name": "物理地址",
+        "placeholder": "请输入物理地址",
+        "required": "请输入物理地址"
+      },
       "balance": "初始点数",
       "bindErr": "账号已被该企业绑定",
       "browserDevice": "查看设备",
@@ -505,12 +511,16 @@
         "7": "四维看看 三脚架套装",
         "9": "四维看看双目转台相机"
       },
-      "cameraType": "设备类型",
-      "cameraType.placeholder": "请选择设备类型",
-      "cameraType.required": "请选择设备类型",
-      "childName": "设备ID",
-      "childName.placeholder": "请输入设备ID",
-      "childName.required": "请输入设备ID",
+      "cameraType": {
+        "name": "设备类型",
+        "placeholder": "请选择设备类型",
+        "required": "请选择设备类型"
+      },
+      "childName": {
+        "name": "设备ID",
+        "placeholder": "请输入设备ID",
+        "required": "请输入设备ID"
+      },
       "companyId": "客户名称",
       "device": "设备",
       "deviceCode": "设备ID重复,请重新输入",
@@ -526,9 +536,11 @@
       "num": "设备数量",
       "orderSn": "订单号",
       "other": "其它",
-      "own": "出库类型",
-      "own.placeholder": "请选择出库类型",
-      "own.required": "请选择出库类型",
+      "own": {
+        "name": "出库类型",
+        "placeholder": "请选择出库类型",
+        "required": "请选择出库类型"
+      },
       "ownName": {
         "0": "正常销售",
         "1": "其它",
@@ -540,16 +552,20 @@
       "searchNamePlaceholder": "设备ID,邮箱,SN码",
       "selfUse": "员工自用",
       "shipmentType": "出货类型",
-      "snCode": "sn码",
-      "snCode.placeholder": "请输入sn码",
-      "snCode.required": "请输入sn码",
+      "snCode": {
+        "name": "sn码",
+        "placeholder": "请输入sn码",
+        "required": "请输入sn码"
+      },
       "subNum": "可添加员工数",
       "title": "员工账号",
       "type": "设备类型",
       "unbindWarning": "确定要解绑该账号?",
-      "wifiName": "wifi名称",
-      "wifiName.placeholder": "请输入wifi名称",
-      "wifiName.required": "请输入wifi名称"
+      "wifiName": {
+        "name": "wifi名称",
+        "placeholder": "请输入wifi名称",
+        "required": "请输入wifi名称"
+      }
     },
     "personalSetting": {
       "account": "个人设置",
@@ -577,7 +593,9 @@
       "bindTime": "绑定时间",
       "canShow": "是否同时开通一起逛",
       "cancelDownload": "取消下载",
-      "childName": "拍摄设备ID",
+      "childName": {
+        "name": "拍摄设备ID"
+      },
       "copy": "复制",
       "copyInfi": {
         "content": "复制场景,场景归属在原账号下,确定要复制场景吗?",
@@ -608,8 +626,10 @@
       "livestreamStatus": "是否开播",
       "makeLiveCover": "生成直播间封面",
       "migrate": "迁移",
-      "migrateAccount": "迁移账号",
-      "migrateAccount.required": "请输入迁移账号",
+      "migrateAccount": {
+        "name": "迁移账号",
+        "required": "请输入迁移账号"
+      },
       "migrateDevice": "迁移相机",
       "migrateDevice.required": "请选择迁移相机",
       "moveScene": "移动场景",

+ 1 - 1
src/locales/setupI18n.ts

@@ -15,7 +15,7 @@ async function createI18nOptions(): Promise<I18nOptions> {
   const locale = localeStore.getLocale;
   const defaultLocal = await import(`./lang/${locale}.ts`);
   const message = defaultLocal.default?.message ?? {};
-
+  console.log(message, 'message');
   setHtmlPageLang(locale);
   setLoadLocalePool((loadLocalePool) => {
     loadLocalePool.push(locale);

+ 1 - 1
src/views/archive/list.vue

@@ -129,7 +129,7 @@
           width: 150,
         },
         {
-          title: t('routes.scenes.childName'),
+          title: t('routes.scenes.childName.name'),
           dataIndex: 'snCode',
           width: 120,
         },

+ 1 - 1
src/views/corporation/AddCorporationModal.vue

@@ -89,7 +89,7 @@
         {
           field: 'address',
           component: 'Input',
-          label: t('routes.corporation.address'),
+          label: t('routes.corporation.address.name'),
           required: true,
           colProps: {
             span: 22,

+ 1 - 1
src/views/corporation/detailsModal.vue

@@ -116,7 +116,7 @@
         },
         {
           field: 'address',
-          label: `${t('routes.corporation.address')} :`,
+          label: `${t('routes.corporation.address.name')} :`,
           slot: 'text',
           component: 'Input',
         },

+ 1 - 1
src/views/corporation/index.vue

@@ -286,7 +286,7 @@
         nextTick(reload);
       }
       async function updateSceneLogo(record: Recordable, data: Result) {
-        console.log('src', data.data);
+        console.log('src', data);
         await updateCompnayApi({
           id: record.id,
           topLogo: data.data,

+ 6 - 6
src/views/devices/AddModal.vue

@@ -44,7 +44,7 @@
         {
           field: 'own',
           component: 'Select',
-          label: t('routes.devices.own'),
+          label: t('routes.devices.own.name'),
           colProps: {
             span: 24,
           },
@@ -71,7 +71,7 @@
         {
           field: 'cameraType',
           component: 'Select',
-          label: t('routes.devices.cameraType'),
+          label: t('routes.devices.cameraType.name'),
           rules: [
             {
               required: true,
@@ -98,7 +98,7 @@
         {
           field: 'childName',
           component: 'Input',
-          label: t('routes.devices.childName'),
+          label: t('routes.devices.childName.name'),
           rules: [
             {
               required: true,
@@ -115,7 +115,7 @@
         {
           field: 'wifiName',
           component: 'Input',
-          label: t('routes.devices.wifiName'),
+          label: t('routes.devices.wifiName.name'),
           rules: [
             {
               required: true,
@@ -134,7 +134,7 @@
           field: 'address',
           component: 'Input',
           // required: true,
-          label: t('routes.devices.address'),
+          label: t('routes.devices.address.name'),
           rules: [
             {
               required: true,
@@ -152,7 +152,7 @@
         {
           field: 'snCode',
           component: 'Input',
-          label: t('routes.devices.snCode'),
+          label: t('routes.devices.snCode.name'),
           rules: [
             {
               required: true,

+ 7 - 7
src/views/devices/EditModal.vue

@@ -50,7 +50,7 @@
         {
           field: 'own',
           component: 'Select',
-          label: t('routes.devices.own'),
+          label: t('routes.devices.own.name'),
           colProps: {
             span: 24,
           },
@@ -78,7 +78,7 @@
         {
           field: 'cameraType',
           component: 'Select',
-          label: t('routes.devices.cameraType'),
+          label: t('routes.devices.cameraType.name'),
           required: true,
           colProps: {
             span: 24,
@@ -95,7 +95,7 @@
             //       {
             //         field: 'snCode',
             //         component: 'Input',
-            //         label: t('routes.devices.snCode'),
+            //         label: t('routes.devices.snCode.name'),
             //         required: true,
             //         colProps: {
             //           span: 24,
@@ -113,7 +113,7 @@
         {
           field: 'childName',
           component: 'Input',
-          label: t('routes.devices.childName'),
+          label: t('routes.devices.childName.name'),
           required: true,
           colProps: {
             span: 24,
@@ -125,7 +125,7 @@
         {
           field: 'wifiName',
           component: 'Input',
-          label: t('routes.devices.wifiName'),
+          label: t('routes.devices.wifiName.name'),
           required: true,
           componentProps: {
             disabled: true,
@@ -138,7 +138,7 @@
           field: 'address',
           component: 'Input',
           required: true,
-          label: t('routes.devices.address'),
+          label: t('routes.devices.address.name'),
           componentProps: {
             disabled: true,
           },
@@ -149,7 +149,7 @@
         {
           field: 'snCode',
           component: 'Input',
-          label: t('routes.devices.snCode'),
+          label: t('routes.devices.snCode.name'),
           required: true,
           componentProps: {
             disabled: true,

+ 5 - 5
src/views/devices/list.vue

@@ -65,7 +65,7 @@
       const [registerEditModal, { openModal: openEditModal }] = useModal();
       const columns: BasicColumn[] = [
         {
-          title: t('routes.devices.childName'),
+          title: t('routes.devices.childName.name'),
           dataIndex: 'childName',
           fixed: 'left',
           width: 100,
@@ -81,24 +81,24 @@
         //   width: 120,
         // },
         // {
-        //   title: t('routes.devices.cameraType'),
+        //   title: t('routes.devices.cameraType.name'),
         //   dataIndex: 'cameraType',
         //   width: 230,
         //   slots: { customRender: 'cameraType' },
         // },
         {
-          title: t('routes.devices.cameraType'),
+          title: t('routes.devices.cameraType.name'),
           dataIndex: 'goodsName',
           slots: { customRender: 'cameraType' },
           width: 230,
         },
         {
-          title: t('routes.devices.snCode'),
+          title: t('routes.devices.snCode.name'),
           dataIndex: 'snCode',
           width: 120,
         },
         {
-          title: t('routes.devices.wifiName'),
+          title: t('routes.devices.wifiName.name'),
           dataIndex: 'wifiName',
           width: 180,
         },

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

@@ -112,7 +112,7 @@
         // },
         {
           field: 'tempSlect',
-          label: t('layout.map.geoLocation'),
+          label: t('layout.map.geoLocation.name'),
           component: 'Select',
           defaultValue: 1,
           componentProps: {

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

@@ -148,7 +148,7 @@
           width: 100,
         },
         {
-          title: t('routes.devices.cameraType'),
+          title: t('routes.devices.cameraType.name'),
           dataIndex: 'sceneSource',
           slots: { customRender: 'sceneSource' },
           width: 100,

+ 2 - 2
src/views/scenes/E57List.vue

@@ -288,7 +288,7 @@
           width: 150,
         },
         // {
-        //   title: t('routes.scenes.childName'),
+        //   title: t('routes.scenes.childName.name'),
         //   dataIndex: 'childName',
         //   width: 120,
         // },
@@ -373,7 +373,7 @@
           },
           // {
           //   field: 'childName',
-          //   label: t('routes.scenes.childName'),
+          //   label: t('routes.scenes.childName.name'),
           //   component: 'Input',
           //   colProps: {
           //     lg: 6,

+ 2 - 2
src/views/scenes/list.vue

@@ -338,7 +338,7 @@
           width: 150,
         },
         {
-          title: t('routes.scenes.childName'),
+          title: t('routes.scenes.childName.name'),
           dataIndex: 'childName',
           width: 120,
         },
@@ -436,7 +436,7 @@
           },
           {
             field: 'childName',
-            label: t('routes.scenes.childName'),
+            label: t('routes.scenes.childName.name'),
             component: 'Input',
             colProps: {
               lg: 6,

+ 1 - 1
src/views/scenes/migrateE57Modal.vue

@@ -50,7 +50,7 @@
       const schemas_e57: FormSchema[] = [
         {
           field: 'userName',
-          label: t('routes.scenes.migrateAccount'),
+          label: t('routes.scenes.migrateAccount.name'),
           component: 'Input',
           required: true,
           rules: [

+ 1 - 1
src/views/scenes/migrateModal.vue

@@ -47,7 +47,7 @@
       const schemas: FormSchema[] = [
         {
           field: 'userName',
-          label: t('routes.scenes.migrateAccount'),
+          label: t('routes.scenes.migrateAccount.name'),
           component: 'Input',
           required: true,
           rules: [