tangning 3 роки тому
батько
коміт
62ee0fb73a

+ 2 - 0
src/locales/lang/zh-CN/common.ts

@@ -29,8 +29,10 @@ export default {
   normal: '正常',
   unNormal: '非正常',
   state: '状态',
+  type: '类型',
   fullName: '姓名',
   print: '打印',
+  all: '全部',
   optSuccess: '操作成功',
   optFail: '操作失败',
   notConnect: '暂未接入',

+ 31 - 0
src/locales/lang/zh-CN/routes/scenes.ts

@@ -0,0 +1,31 @@
+export default {
+  sceneName: '场景名称',
+  webSite: '场景链接',
+  childName: '拍摄设备ID',
+  viewCount: '场景访问量',
+  createTime: '拍摄时间',
+  num: '场景码',
+  process: '下载进度',
+  sceneList: '场景列表',
+  bindAnchor: '绑定主播',
+  anchorRoom: '直播间名称',
+  appListPicUrl: '直播间封面',
+  sortOrder: '排序',
+  bindShowerNameList: '已绑定主播',
+  livestreamStatus: '是否开播',
+  liveBroadcast: '直播列表',
+  downloadScene: '下载场景',
+  downloadSceneConfirm: '是否确认下载场景',
+  editor: '打开编辑器',
+  roleType: {
+    0: '公司管理员',
+    1: '公司员工',
+  },
+  houseType: {
+    0: '新房',
+    1: '二手房',
+    2: '公寓',
+    3: '民宿',
+    9: '全部',
+  },
+};

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

@@ -10,18 +10,18 @@
           :actions="[
             {
               // icon: 'mdi:briefcase-download',
-              label: '下载场景',
+              label: t('routes.scenes.downloadScene'),
               popConfirm: {
-                title: '是否确认下载场景',
+                title: t('routes.scenes.downloadSceneConfirm'),
                 confirm: () => {
-                  createMessage.info(`暂未接入`);
+                  createMessage.info(t('common.notConnect'));
                 },
               },
             },
             {
               // icon: 'dashicons:editor-kitchensink',
               color: 'error',
-              label: '打开编辑器',
+              label: t('routes.scenes.editor'),
               onClick: openSceneEditor.bind(null, record),
             },
           ]"
@@ -61,45 +61,45 @@
         //   width: 80,
         // },
         {
-          title: '场景名称',
+          title: t('routes.scenes.sceneName'),
           dataIndex: 'sceneName',
           width: 120,
         },
         {
-          title: '企业名称',
+          title: t('routes.corporation.enterpriseName'),
           dataIndex: 'companyName',
           width: 120,
         },
         {
-          title: '场景链接',
+          title: t('routes.scenes.webSite'),
           dataIndex: 'webSite',
           slots: { customRender: 'link' },
           width: 180,
         },
         {
-          title: '拍摄设备ID',
+          title: t('routes.scenes.childName'),
           dataIndex: 'childName',
           width: 120,
         },
         {
-          title: '场景访问量',
+          title: t('routes.scenes.viewCount'),
           dataIndex: 'viewCount',
           width: 180,
         },
         {
-          title: '拍摄时间',
+          title: t('routes.scenes.createTime'),
           dataIndex: 'createTime',
           width: 180,
         },
 
         {
-          title: '场景码',
+          title: t('routes.scenes.num'),
           dataIndex: 'num',
           width: 180,
         },
 
         {
-          title: '下载进度',
+          title: t('routes.scenes.process'),
           dataIndex: '',
           width: 180,
           slots: { customRender: 'process' },
@@ -107,7 +107,7 @@
         },
 
         {
-          title: '操作',
+          title: t('common.operation'),
           dataIndex: '',
           slots: { customRender: 'action' },
           width: 180,
@@ -120,7 +120,7 @@
         schemas: [
           {
             field: 'companyName',
-            label: '企业名称',
+            label: t('routes.corporation.enterpriseName'),
             component: 'Input',
             colProps: {
               lg: 6,
@@ -132,7 +132,7 @@
           },
           {
             field: 'sceneName',
-            label: '场景名称',
+            label: t('routes.scenes.sceneName'),
             component: 'Input',
             colProps: {
               lg: 6,
@@ -144,7 +144,7 @@
           },
           {
             field: 'childName',
-            label: '拍摄设备ID',
+            label: t('routes.scenes.childName'),
             component: 'Input',
             colProps: {
               lg: 6,
@@ -158,7 +158,7 @@
       };
       // { getForm }
       const [registerTable] = useTable({
-        title: '场景列表',
+        title: t('routes.scenes.sceneList'),
         api: ListApi,
         columns: columns,
         useSearchForm: true,

+ 22 - 53
src/views/scenes/live.vue

@@ -1,34 +1,3 @@
-<!-- address: "浙江省,杭州市,萧山区 山阴路688号恒隆广场B座1217"
-adminId: null
-appListPicUrl: null
-bindShowerId: null
-bindShowerName: null
-bindShowerNameList: null
-city: null
-contractPhone: "18819272208"
-createTime: null
-createUserDeptId: 208
-createUserId: 367
-deleted: 0
-id: 1046543
-introduceVideo: null
-introduceVideoCover: null
-latitude: 30.178317
-liveRoomUrl: "https://test.4dkankan.com/shop.html?m=t-CUsa1i2"
-livestreamStatus: 0
-longitude: 120.262421
-name: "自动hdr室外"
-picList: null
-sceneName: "自动hdr室外"
-sceneNum: "t-CUsa1i2"
-sceneUrl: "https://test.4dkankan.com/smobile.html?m=t-CUsa1i2"
-shareWxQrCode: "https://houseoss.4dkankan.com/domain/shop/image/t-CUsa1i21637049206783_QRCode.png"
-simpleDesc: "自动hdr室外"
-sortOrder: 100
-token: null
-type: 0
-updateTime: null
-updateUserId: null -->
 <template>
   <div class="p-4">
     <BasicTable @register="registerTable">
@@ -49,7 +18,7 @@ updateUserId: null -->
           :actions="[
             {
               icon: 'eos-icons:role-binding',
-              label: '绑定主播',
+              label: t('routes.scenes.bindAnchor'),
               color: 'warning',
               onClick: handleBindAnchor.bind(null, record),
             },
@@ -107,48 +76,48 @@ updateUserId: null -->
           width: 100,
         },
         {
-          title: '直播间名称',
+          title: t('routes.scenes.anchorRoom'),
           dataIndex: 'name',
           width: 130,
         },
         {
-          title: '类型',
+          title: t('common.type'),
           dataIndex: 'houseType',
           slots: { customRender: 'houseType' },
           width: 100,
         },
         {
-          title: '直播间封面',
+          title: t('routes.scenes.appListPicUrl'),
           dataIndex: 'appListPicUrl',
           slots: { customRender: 'cover' },
           width: 150,
         },
         {
-          title: '排序',
+          title: t('routes.scenes.sortOrder'),
           dataIndex: 'sortOrder',
           width: 150,
           sorter: true,
         },
         {
-          title: '场景链接',
+          title: t('routes.scenes.webSite'),
           dataIndex: 'liveRoomUrl',
           slots: { customRender: 'link' },
           width: 180,
         },
         {
-          title: '已绑定主播',
+          title: t('routes.scenes.bindShowerNameList'),
           dataIndex: 'bindShowerNameList',
           width: 180,
         },
 
         {
-          title: '是否开播',
+          title: t('routes.scenes.livestreamStatus'),
           dataIndex: 'livestreamStatus',
           width: 180,
           customRender: ({ record }) => {
             const enable = record.livestreamStatus === 0;
             const color = enable ? 'green' : 'red';
-            const text = enable ? '是' : '否';
+            const text = enable ? t('common.yes') : t('common.no');
             return h(Tag, { color: color }, () => text);
           },
         },
@@ -176,7 +145,7 @@ updateUserId: null -->
         // },
 
         {
-          title: '操作',
+          title: t('common.operation'),
           dataIndex: '',
           slots: { customRender: 'action' },
           width: 120,
@@ -189,7 +158,7 @@ updateUserId: null -->
         schemas: [
           {
             field: 'sceneName',
-            label: '直播间名称',
+            label: t('routes.scenes.bindShowerNameList'),
             component: 'Input',
             colProps: {
               xl: 5,
@@ -198,7 +167,7 @@ updateUserId: null -->
           },
           {
             field: 'type',
-            label: '类型',
+            label: t('common.type'),
             component: 'ApiSelect',
             colProps: {
               xl: 5,
@@ -217,7 +186,7 @@ updateUserId: null -->
           },
           {
             field: 'livestreamStatus',
-            label: '是否开播',
+            label: t('routes.scenes.livestreamStatus'),
             component: 'Select',
             colProps: {
               xl: 5,
@@ -226,17 +195,17 @@ updateUserId: null -->
             componentProps: {
               options: [
                 {
-                  label: '全部',
+                  label: t('common.all'),
                   value: '',
                   key: '1',
                 },
                 {
-                  label: '是',
+                  label: t('common.yes'),
                   value: '',
                   key: '2',
                 },
                 {
-                  label: '否',
+                  label: t('common.no'),
                   value: '0',
                   key: '2',
                 },
@@ -248,20 +217,20 @@ updateUserId: null -->
       function renderHouseType(type: number): string {
         switch (type) {
           case 0:
-            return '新房';
+            return t(`routes.scenes.houseType.0`);
           case 1:
-            return '二手房';
+            return t(`routes.scenes.houseType.1`);
           case 2:
-            return '公寓';
+            return t(`routes.scenes.houseType.2`);
           case 3:
-            return '民宿';
+            return t(`routes.scenes.houseType.3`);
           default:
-            return '全部';
+            return t(`routes.scenes.houseType.9`);
         }
       }
 
       const [registerTable] = useTable({
-        title: '直播列表',
+        title: t(`routes.scenes.liveBroadcast`),
         api: ListApi,
         columns: columns,
         useSearchForm: true,