tangning 4 месяцев назад
Родитель
Сommit
d2a09b2f1b

+ 5 - 0
src/locales/lang/en/common.ts

@@ -24,4 +24,9 @@ export default {
   operating: 'Operation',
   operating: 'Operation',
   uploadMessge: 'Please select the upload file',
   uploadMessge: 'Please select the upload file',
   optSuccess: 'The operation was successful.',
   optSuccess: 'The operation was successful.',
+  unit: {
+    1: 'Tai',
+    2: 'One',
+    3: 'Times',
+  },
 };
 };

+ 29 - 0
src/locales/lang/en/routes/account.ts

@@ -0,0 +1,29 @@
+export default {
+  name: 'User List',
+  type: {
+    1: 'Privilege Order',
+    2: 'Download Order',
+    3: 'Purchase Order',
+  },
+  detail: 'Details',
+  email: 'User Email',
+  id: 'User ID',
+  vip: '4DKanKan Member',
+  yhgl: 'User Overview',
+  jbxx: 'Basic Information',
+  createTime: 'Registration Time',
+  yjcp: 'Hardware Products',
+  xjsl: 'Number of Cameras',
+  cjsl: 'Number of Scenes',
+  rjfw: 'Software Services',
+  zyhy: 'Pro Membership',
+  xzcs: 'Download Count',
+  xzxz: 'New Downloads',
+  xzqy: 'New Privileges',
+  xjxq: 'Camera Details',
+  ckxq: 'View Details',
+  qyxq: 'Privilege Details',
+  xjlist: 'View Camera List',
+  jhshijian: 'Activation Time',
+  unbindTips: 'Are you sure to unbind this camera!',
+};

+ 1 - 0
src/locales/lang/en/routes/dashboard.ts

@@ -9,5 +9,6 @@ export default {
   finance: 'Sales Statistics',
   finance: 'Sales Statistics',
   cameraScene: 'Scene',
   cameraScene: 'Scene',
   loglist: 'Operation Log',
   loglist: 'Operation Log',
+  account: 'User',
   retailer: 'Reseller',
   retailer: 'Reseller',
 };
 };

+ 20 - 0
src/locales/lang/en/routes/empower.ts

@@ -0,0 +1,20 @@
+export default {
+  name: 'Local Version License',
+  sq: 'License',
+  customerName: 'Customer Account',
+  endCustomer: 'End Customer',
+  useTypeStr: 'Usage Type',
+  authorizeKey: 'Algorithm License Key',
+  authorize: 'License Code',
+  authorizeTime: 'License Duration',
+  remark: 'License Description',
+  agentName: 'Distributor Name',
+  authorizeStartTime: 'Start Date',
+  authorizeEndTime: 'End Date',
+  agentId: 'Affiliated Distributor',
+  addName: 'Local Algorithm License',
+  list: 'Algorithm License List',
+  deltTips: 'Are you sure you want to delete this license?',
+  addtTips: 'Are you sure you want to add this license?',
+  editTips: 'Are you sure you want to edit this license?',
+};

+ 1 - 0
src/locales/lang/en/routes/retailer.ts

@@ -23,6 +23,7 @@ export default {
   createTime: 'Create Time',
   createTime: 'Create Time',
   addjxs: 'Add Dealer',
   addjxs: 'Add Dealer',
   editjxs: 'Edit Dealer',
   editjxs: 'Edit Dealer',
+  activatedTime: 'Equipment activation time',
   form: {
   form: {
     name: ' Reseller Name',
     name: ' Reseller Name',
     nickName: 'Contact',
     nickName: 'Contact',

+ 6 - 1
src/locales/lang/zh-CN/common.ts

@@ -52,5 +52,10 @@ export default {
   userNick: '请输入员工名称',
   userNick: '请输入员工名称',
   userCorrectNameNick: '请输入正确的员工名称',
   userCorrectNameNick: '请输入正确的员工名称',
   warning: '警告',
   warning: '警告',
-  reminder:'温馨提示',
+  reminder: '温馨提示',
+  unit: {
+    1: '台',
+    2: '个',
+    3: '次',
+  },
 };
 };

+ 28 - 6
src/locales/lang/zh-CN/routes/account.ts

@@ -1,7 +1,29 @@
 export default {
 export default {
-  type:{
-    1:'权益订单',
-    2:'下载订单',
-    3:'消费订单',
-  }
-};
+  name: '用户列表',
+  type: {
+    1: '权益订单',
+    2: '下载订单',
+    3: '消费订单',
+  },
+  detail: '详情',
+  email: '用户邮箱',
+  id: '用户ID',
+  vip: '四维看看会员',
+  yhgl: '用户概览',
+  jbxx: '基本信息',
+  createTime: '注册时间',
+  yjcp: '硬件产品',
+  xjsl: '相机数量',
+  cjsl: '场景数量',
+  rjfw: '软件服务',
+  zyhy: '专业会员',
+  xzcs: '下载次数',
+  xzxz: '新增下载',
+  xzqy: '新增权益',
+  xjxq: '相机详情',
+  ckxq: '查看详情',
+  qyxq: '权益详情',
+  xjlist: '查看相机列表',
+  jhshijian: '激活时间',
+  unbindTips: '您确定解绑该相机!',
+};

+ 20 - 0
src/locales/lang/zh-CN/routes/empower.ts

@@ -0,0 +1,20 @@
+export default {
+  name: '本地版授权管理',
+  sq: '授权',
+  customerName: '客户账号',
+  endCustomer: '终端客户',
+  useTypeStr: '使用类型',
+  authorizeKey: '算法授权Key',
+  authorize: '授权码',
+  authorizeTime: '授权期限',
+  remark: '授权说明',
+  agentName: '经销商名称',
+  authorizeStartTime: '生效日期',
+  authorizeEndTime: '到期日期',
+  agentId: '所属经销商',
+  addName: '本地版算法授权',
+  list: '算法授权列表',
+  deltTips: '确定要删除授权吗?',
+  addtTips: '确定要新增授权吗?',
+  editTips: '确定要编辑授权吗?',
+};

+ 1 - 0
src/locales/lang/zh-CN/routes/retailer.ts

@@ -23,6 +23,7 @@ export default {
   createTime: '创建时间',
   createTime: '创建时间',
   addjxs: '新增经销商',
   addjxs: '新增经销商',
   editjxs: '编辑经销商',
   editjxs: '编辑经销商',
+  activatedTime: '设备激活时间',
   form: {
   form: {
     name: '分销商名称',
     name: '分销商名称',
     nickName: '联系人',
     nickName: '联系人',

+ 3 - 3
src/router/routes/modules/account.ts

@@ -8,7 +8,7 @@ export const Device: AppRouteRecordRaw = {
   redirect: '/account/list',
   redirect: '/account/list',
   component: LAYOUT,
   component: LAYOUT,
   meta: {
   meta: {
-    title: '用户管理',
+    title: t('routes.dashboard.account'),
     icon: 'uil:user-md',
     icon: 'uil:user-md',
     orderNo: 6,
     orderNo: 6,
     hideChildrenInMenu: true,
     hideChildrenInMenu: true,
@@ -19,7 +19,7 @@ export const Device: AppRouteRecordRaw = {
       name: 'AccountDetails',
       name: 'AccountDetails',
       component: () => import('/@/views/account/details/index.vue'),
       component: () => import('/@/views/account/details/index.vue'),
       meta: {
       meta: {
-        title: '用户管理',
+        title: t('routes.dashboard.account'),
         hideBreadcrumb: true,
         hideBreadcrumb: true,
         // icon: 'codicon:device-camera',
         // icon: 'codicon:device-camera',
       },
       },
@@ -29,7 +29,7 @@ export const Device: AppRouteRecordRaw = {
       name: 'AccountList',
       name: 'AccountList',
       component: () => import('/@/views/account/lists.vue'),
       component: () => import('/@/views/account/lists.vue'),
       meta: {
       meta: {
-        title: '用户管理',
+        title: t('routes.dashboard.account'),
         hideBreadcrumb: true,
         hideBreadcrumb: true,
         // icon: 'codicon:device-camera',
         // icon: 'codicon:device-camera',
       },
       },

+ 2 - 2
src/router/routes/modules/empower.ts

@@ -8,7 +8,7 @@ export const Device: AppRouteRecordRaw = {
   redirect: '/empower/index',
   redirect: '/empower/index',
   component: LAYOUT,
   component: LAYOUT,
   meta: {
   meta: {
-    title: '本地版授权管理',
+    title: t('routes.empower.name'),
     icon: 'material-symbols:motion-sensor-active-rounded',
     icon: 'material-symbols:motion-sensor-active-rounded',
     orderNo: 20,
     orderNo: 20,
     hideChildrenInMenu: true,
     hideChildrenInMenu: true,
@@ -19,7 +19,7 @@ export const Device: AppRouteRecordRaw = {
       name: 'EmpowerIndex',
       name: 'EmpowerIndex',
       component: () => import('/@/views/empower/index.vue'),
       component: () => import('/@/views/empower/index.vue'),
       meta: {
       meta: {
-        title: '本地版授权管理',
+        title: t('routes.empower.name'),
         hideBreadcrumb: true,
         hideBreadcrumb: true,
         // icon: 'codicon:device-camera',
         // icon: 'codicon:device-camera',
       },
       },

+ 30 - 19
src/views/account/data.ts

@@ -1,6 +1,8 @@
 import { FormSchema } from '/@/components/Form/index';
 import { FormSchema } from '/@/components/Form/index';
 import { BasicColumn } from '/@/components/Table/src/types/table';
 import { BasicColumn } from '/@/components/Table/src/types/table';
+import { useI18n } from '/@/hooks/web/useI18n';
 import { Time } from '/@/components/Time';
 import { Time } from '/@/components/Time';
+const { t } = useI18n();
 import { h } from 'vue';
 import { h } from 'vue';
 const isDev = window.location.hostname.includes('eur');
 const isDev = window.location.hostname.includes('eur');
 export interface ListItem {
 export interface ListItem {
@@ -55,7 +57,7 @@ export const baseSetschemas: FormSchema[] = [
     component: 'InputTextArea',
     component: 'InputTextArea',
     label: '个人简介',
     label: '个人简介',
     componentProps: {
     componentProps: {
-      rows:4,
+      rows: 4,
     },
     },
     colProps: { span: 18 },
     colProps: { span: 18 },
   },
   },
@@ -167,7 +169,8 @@ export const refundTimeTableSchema: BasicColumn[] = [
         })
         })
       );
       );
     },
     },
-  },{
+  },
+  {
     title: '订单号',
     title: '订单号',
     width: 150,
     width: 150,
     dataIndex: 'version',
     dataIndex: 'version',
@@ -181,19 +184,23 @@ export const refundTimeTableSchema: BasicColumn[] = [
     title: '数量',
     title: '数量',
     width: 150,
     width: 150,
     dataIndex: 'minVersion',
     dataIndex: 'minVersion',
-  },{
+  },
+  {
     title: '订单金额(元)',
     title: '订单金额(元)',
     width: 150,
     width: 150,
     dataIndex: 'minVersion',
     dataIndex: 'minVersion',
-  },{
+  },
+  {
     title: '支付方式',
     title: '支付方式',
     width: 150,
     width: 150,
     dataIndex: 'recStatus',
     dataIndex: 'recStatus',
-  },{
+  },
+  {
     title: '交易号',
     title: '交易号',
     width: 150,
     width: 150,
     dataIndex: 'minVersion',
     dataIndex: 'minVersion',
-  },{
+  },
+  {
     title: '订单状态',
     title: '订单状态',
     width: 150,
     width: 150,
     dataIndex: 'recStatus',
     dataIndex: 'recStatus',
@@ -202,24 +209,28 @@ export const refundTimeTableSchema: BasicColumn[] = [
 
 
 export const userListSchema: BasicColumn[] = [
 export const userListSchema: BasicColumn[] = [
   {
   {
-    title: '用户ID',
+    title: t('routes.account.id'),
     width: 150,
     width: 150,
     dataIndex: 'id',
     dataIndex: 'id',
-  },{
-    title: '昵称',
+  },
+  {
+    title: t('routes.equity.nickName'),
     width: 150,
     width: 150,
     dataIndex: 'nickName',
     dataIndex: 'nickName',
-  },{
-    title: '账号',
+  },
+  {
+    title: t('routes.equity.userName1'),
     width: 150,
     width: 150,
     dataIndex: 'userName',
     dataIndex: 'userName',
-  },{
-    title: '邮箱',
+  },
+  {
+    title: t('routes.equity.email'),
     width: 150,
     width: 150,
     ifShow: !isDev,
     ifShow: !isDev,
     dataIndex: 'email',
     dataIndex: 'email',
-  },{
-    title: '注册时间',
+  },
+  {
+    title: t('routes.equity.userCreateTime'),
     width: 150,
     width: 150,
     dataIndex: 'createTime',
     dataIndex: 'createTime',
     customRender: ({ record }) => {
     customRender: ({ record }) => {
@@ -233,11 +244,11 @@ export const userListSchema: BasicColumn[] = [
     },
     },
   },
   },
   {
   {
-    title: '四维看看会员',
+    title: t('routes.account.vip'),
     width: 150,
     width: 150,
     dataIndex: 'vip',
     dataIndex: 'vip',
     customRender: ({ record }) => {
     customRender: ({ record }) => {
-      return record.vip == 0?'否':'是'
-    }
-    }
+      return record.vip == 0 ? t('common.no') : t('common.yes');
+    },
+  },
 ];
 ];

+ 108 - 117
src/views/account/lists.vue

@@ -4,130 +4,121 @@
       <TableAction
       <TableAction
         :actions="[
         :actions="[
           {
           {
-            label: '详情',
+            label: t('routes.account.detail'),
             onClick: handleEdit.bind(null, record),
             onClick: handleEdit.bind(null, record),
-          }
+          },
         ]"
         ]"
       />
       />
     </template>
     </template>
   </BasicTable>
   </BasicTable>
 </template>
 </template>
 <script lang="ts">
 <script lang="ts">
-import { defineComponent, computed } from 'vue';
-import { BasicTable, useTable, FormProps, TableAction } from '/@/components/Table';
-import { PageWrapper } from '/@/components/Page';
-import { Divider, Card, Empty, Descriptions, Steps, Tabs } from 'ant-design-vue';
-import { ListApi } from '/@/api/account';
-import { userListSchema } from './data';
-import { useI18n } from '/@/hooks/web/useI18n';
-import { useRouter } from 'vue-router'
-import { otherInfoStore } from '/@/store/modules/other'
-import { usePermissionStore } from '/@/store/modules/permission';
-import { useUserStore } from '/@/store/modules/user';
-export default defineComponent({
-components: {
-BasicTable,
-TableAction,
-PageWrapper,
-[Divider.name]: Divider,
-[Card.name]: Card,
-Empty,
-[Descriptions.name]: Descriptions,
-[Descriptions.Item.name]: Descriptions.Item,
-[Steps.name]: Steps,
-[Steps.Step.name]: Steps.Step,
-[Tabs.name]: Tabs,
-[Tabs.TabPane.name]: Tabs.TabPane,
-},
-setup() {
-const { t } = useI18n();
-const { setOverviewInfo } = otherInfoStore();
-const router = useRouter()
-const userStore = useUserStore();
-const isDev = computed(() => userStore.getSystemEnv);
-const permissionStore = usePermissionStore();
-const { getCheckPerm } = permissionStore;
-const searchForm: Partial<FormProps> = {
-  labelWidth: 100,
-  schemas: [
-    {
-      field: 'userName',
-      label: '用户账号',
-      component: 'Input',
-      componentProps: {
-        maxLength: 100,
-      },
-      colProps: {
-        xl: 6,
-        xxl: 6,
-      },
-    },{
-      field: 'email',
-      label: '用户邮箱',
-      component: 'Input',
-      ifShow: !isDev.value,
-      componentProps: {
-        maxLength: 100,
-      },
-      colProps: {
-        xl: 8,
-        xxl: 8,
-      },
-    }
-  ],
-};
-const [registerTimeTable, { reload }] = useTable({
-  api: ListApi,
-  title: '用户列表',
-  columns: userListSchema,
-  useSearchForm: true,
-  formConfig: searchForm,
-  showTableSetting: true,
-  showIndexColumn:false,
-  rowKey: 'id',
-  fetchSetting: {
-    pageField: 'pageNum',
-    sizeField: 'pageSize',
-    listField: 'list',
-    totalField: 'total',
-  },
-  actionColumn: {
-    width: 100,
-    title: '操作',
-    dataIndex: 'action',
-    slots: { customRender: 'action' },
-  },
-  canResize:true,
-});
-function tabChange(val: string) {
-  console.log('tabChange', val);
-  reload();
-}
-function handleOpen(record: Recordable) {
-  console.log('点击了启用', record);
-}
-function handleEdit(record: Recordable) {
-  console.log('record', record);
-  setOverviewInfo(record)
-  router.push({path:'details'})
-}
-return {
-  registerTimeTable,
-  handleOpen,
-  tabChange,
-  reload,
-  handleEdit,
-  getCheckPerm,
-  t,
-};
-},
-});
+  import { defineComponent, computed } from 'vue';
+  import { BasicTable, useTable, FormProps, TableAction } from '/@/components/Table';
+  import { Steps } from 'ant-design-vue';
+  import { ListApi } from '/@/api/account';
+  import { userListSchema } from './data';
+  import { useI18n } from '/@/hooks/web/useI18n';
+  import { useRouter } from 'vue-router';
+  import { otherInfoStore } from '/@/store/modules/other';
+  import { usePermissionStore } from '/@/store/modules/permission';
+  import { useUserStore } from '/@/store/modules/user';
+  export default defineComponent({
+    components: {
+      BasicTable,
+      TableAction,
+      [Steps.Step.name]: Steps.Step,
+    },
+    setup() {
+      const { t } = useI18n();
+      const { setOverviewInfo } = otherInfoStore();
+      const router = useRouter();
+      const userStore = useUserStore();
+      const isDev = computed(() => userStore.getSystemEnv);
+      const permissionStore = usePermissionStore();
+      const { getCheckPerm } = permissionStore;
+      const searchForm: Partial<FormProps> = {
+        labelWidth: 100,
+        schemas: [
+          {
+            field: 'userName',
+            label: t('routes.equity.count'),
+            component: 'Input',
+            componentProps: {
+              maxLength: 100,
+            },
+            colProps: {
+              xl: 6,
+              xxl: 6,
+            },
+          },
+          {
+            field: 'email',
+            label: t('routes.account.email'),
+            component: 'Input',
+            ifShow: !isDev.value,
+            componentProps: {
+              maxLength: 100,
+            },
+            colProps: {
+              xl: 8,
+              xxl: 8,
+            },
+          },
+        ],
+      };
+      const [registerTimeTable, { reload }] = useTable({
+        api: ListApi,
+        title: t('routes.account.name'),
+        columns: userListSchema,
+        useSearchForm: true,
+        formConfig: searchForm,
+        showTableSetting: true,
+        showIndexColumn: false,
+        rowKey: 'id',
+        fetchSetting: {
+          pageField: 'pageNum',
+          sizeField: 'pageSize',
+          listField: 'list',
+          totalField: 'total',
+        },
+        actionColumn: {
+          width: 100,
+          title: t('common.operating'),
+          dataIndex: 'action',
+          slots: { customRender: 'action' },
+        },
+        canResize: true,
+      });
+      function tabChange(val: string) {
+        console.log('tabChange', val);
+        reload();
+      }
+      function handleOpen(record: Recordable) {
+        console.log('点击了启用', record);
+      }
+      function handleEdit(record: Recordable) {
+        console.log('record', record);
+        setOverviewInfo(record);
+        router.push({ path: 'details' });
+      }
+      return {
+        registerTimeTable,
+        handleOpen,
+        tabChange,
+        reload,
+        handleEdit,
+        getCheckPerm,
+        t,
+      };
+    },
+  });
 </script>
 </script>
 <style lang="less" scoped>
 <style lang="less" scoped>
-.desc-wrap-BasicTable {
-background-color: #f0f2f5;
-.vben-basic-table-form-container {
-padding: 0;
-}
-}
+  .desc-wrap-BasicTable {
+    background-color: #f0f2f5;
+    .vben-basic-table-form-container {
+      padding: 0;
+    }
+  }
 </style>
 </style>

+ 9 - 9
src/views/account/overview/caremModal.vue

@@ -2,7 +2,7 @@
   <BasicModal
   <BasicModal
     v-bind="$attrs"
     v-bind="$attrs"
     @register="register"
     @register="register"
-    title="相机详情"
+    :title="t('routes.account.xjlist')"
     :width="800"
     :width="800"
     @visible-change="handleVisibleChange"
     @visible-change="handleVisibleChange"
     @ok="handleSubmit"
     @ok="handleSubmit"
@@ -14,7 +14,7 @@
             <TableAction
             <TableAction
               :actions="[
               :actions="[
                  {
                  {
-                   label: '解绑',
+                   label: t('common.unbind'),
                    color: 'error',
                    color: 'error',
                    onClick: handleDelete.bind(null, record, 'edit'),
                    onClick: handleDelete.bind(null, record, 'edit'),
                  },
                  },
@@ -61,12 +61,12 @@
       })
       })
       const columns: BasicColumn[] = [
       const columns: BasicColumn[] = [
         {
         {
-          title: 'SN码',
+          title: t('routes.scene.snCode'),
           dataIndex: 'snCode',
           dataIndex: 'snCode',
           width: 120,
           width: 120,
         },
         },
         {
         {
-          title: '设备类型',
+          title: t('routes.device.deviceType'),
           dataIndex: 'type',
           dataIndex: 'type',
           width: 150,
           width: 150,
           customRender: ({ record }) => {
           customRender: ({ record }) => {
@@ -74,7 +74,7 @@
           },
           },
         },
         },
         {
         {
-          title: '激活时间',
+          title: t('routes.account.jhshijian'),
           dataIndex: 'activatedTime',
           dataIndex: 'activatedTime',
           width: 150,
           width: 150,
           customRender: ({ record }) => {
           customRender: ({ record }) => {
@@ -87,7 +87,7 @@
           },
           },
         },
         },
         {
         {
-          title: '出库时间',
+          title: t('routes.device.activatedTime'),
           dataIndex: 'outTime',
           dataIndex: 'outTime',
           width: 150,
           width: 150,
           customRender: ({ record }) => {
           customRender: ({ record }) => {
@@ -114,7 +114,7 @@
           reload,
           reload,
         },
         },
       ] = useTable({
       ] = useTable({
-        title: `查看相机列表`,
+        title: t('routes.account.xjlist'),
         rowKey: 'phone',
         rowKey: 'phone',
         searchInfo:{
         searchInfo:{
           userId:overviewInfo.value?.id
           userId:overviewInfo.value?.id
@@ -145,8 +145,8 @@
       async function handleDelete (record: Recordable) {
       async function handleDelete (record: Recordable) {
         createConfirm({
         createConfirm({
           iconType: 'warning',
           iconType: 'warning',
-          title: () => h('span', '温馨提示'),
-          content: () => h('span', `您确定解绑该相机!`),
+          title: () => h('span', t('common.reminder')),
+          content: () => h('span', t('routes.account.unbindTips')),
           onOk: async () => {
           onOk: async () => {
             await await UnbindCameraApi({cameraId:record.id})
             await await UnbindCameraApi({cameraId:record.id})
             otherInfo.updateOverviewInfo();
             otherInfo.updateOverviewInfo();

+ 6 - 4
src/views/account/overview/data.tsx

@@ -5,6 +5,8 @@ import { FormSchema } from '/@/components/Form/index';
 import { incrementUseTypeList } from '/@/api/account';
 import { incrementUseTypeList } from '/@/api/account';
 import { Badge } from 'ant-design-vue';
 import { Badge } from 'ant-design-vue';
 import moment from 'moment';
 import moment from 'moment';
+import { useI18n } from '/@/hooks/web/useI18n';
+const { t } = useI18n();
 
 
 export const refundData = {
 export const refundData = {
   a1: '1000000000',
   a1: '1000000000',
@@ -29,19 +31,19 @@ export const personData = {
 export const refundSchema: DescItem[] = [
 export const refundSchema: DescItem[] = [
   {
   {
     field: 'nickName',
     field: 'nickName',
-    label: '昵称',
+    label: t('routes.equity.nickName'),
   },
   },
   {
   {
     field: 'userName',
     field: 'userName',
-    label: '账号',
+    label: t('routes.equity.userName1'),
   },
   },
   {
   {
     field: 'email',
     field: 'email',
-    label: '邮箱',
+    label: t('routes.equity.email'),
   },
   },
   {
   {
     field: 'createTime',
     field: 'createTime',
-    label: '注册时间',
+    label: t('routes.account.createTime'),
   },
   },
   // {
   // {
   //   field: 'vip',
   //   field: 'vip',

+ 16 - 13
src/views/account/overview/index.vue

@@ -1,7 +1,7 @@
 <template>
 <template>
   <div class="info">
   <div class="info">
     <div class="infodetail">
     <div class="infodetail">
-      <div class="title">基本信息</div>
+      <div class="title">{{t('routes.account.jbxx')}}</div>
       <div class="list" v-if="overviewInfo">
       <div class="list" v-if="overviewInfo">
           <div class="list_item" v-for="item in refundSchema" :key="item.field">
           <div class="list_item" v-for="item in refundSchema" :key="item.field">
             <div class="lable">{{item.label}}</div>
             <div class="lable">{{item.label}}</div>
@@ -14,17 +14,17 @@
     </div>
     </div>
     <a-divider />
     <a-divider />
     <div class="infodetail">
     <div class="infodetail">
-      <div class="title">硬件产品</div>
+      <div class="title">{{t('routes.account.yjcp')}}</div>
       <div class="list">
       <div class="list">
           <div class="list_item">
           <div class="list_item">
-            <div class="lable">相机数量</div>
+            <div class="lable">{{t('routes.account.xjsl')}}</div>
             <div class="value">
             <div class="value">
-              <div class="text">{{overviewInfo.cameraCount}}</div>              
-              <Button type="primary" size="small" @click="openCaremModal(true)"> 查看详情 </Button>
+              <div class="text">{{overviewInfo.cameraCount}}{{t('common.unit.1')}}</div>              
+              <Button type="primary" size="small" @click="openCaremModal(true)"> {{t('routes.account.ckxq')}} </Button>
             </div>
             </div>
           </div>
           </div>
           <div class="list_item">
           <div class="list_item">
-            <div class="lable">场景数量</div>
+            <div class="lable">{{t('routes.account.cjsl')}}</div>
             <div class="value">
             <div class="value">
               <div class="text">{{overviewInfo.sceneNum}}个</div>              
               <div class="text">{{overviewInfo.sceneNum}}个</div>              
             </div>
             </div>
@@ -33,21 +33,21 @@
     </div>
     </div>
     <a-divider />
     <a-divider />
     <div class="infodetail">
     <div class="infodetail">
-      <div class="title">软件服务</div>
+      <div class="title">{{t('routes.account.rjfw')}}</div>
       <div class="list" v-if="overviewInfo">
       <div class="list" v-if="overviewInfo">
           <div class="list_item">
           <div class="list_item">
-            <div class="lable">四维看看</div>
+            <div class="lable">{{t('routes.device.type.1')}}</div>
             <div class="value">
             <div class="value">
-              <div class="text">专业会员 {{overviewInfo.incrementCount}}个</div>              
-              <Button type="primary" v-if="getCheckPerm('account-equityDetails')" size="small" @click="openInteresModal(true,{})"> 权益详情 </Button>
-              <Button type="primary" v-if="getCheckPerm('increment-add')" size="small" @click="handleAddEquity('equity')"> 新增权益 </Button>
+              <div class="text">{{t('routes.account.zyhy')}} {{overviewInfo.incrementCount}}{{t('common.unit.2')}}</div>              
+              <Button type="primary" v-if="getCheckPerm('account-equityDetails')" size="small" @click="openInteresModal(true,{})"> {{t('routes.account.qyxq')}} </Button>
+              <Button type="primary" v-if="getCheckPerm('increment-add')" size="small" @click="handleAddEquity('equity')"> {{t('routes.account.xzqy')}} </Button>
             </div>
             </div>
           </div>
           </div>
           <div class="list_item">
           <div class="list_item">
             <div class="lable"></div>
             <div class="lable"></div>
             <div class="value">
             <div class="value">
-              <div class="text">下载次数 {{overviewInfo.surDownNum}}次</div>              
-              <Button type="primary" size="small" v-if="getCheckPerm('download-add')" @click="handleaddDown('0')"> 新增下载 </Button>
+              <div class="text">{{t('routes.account.xzcs')}} {{overviewInfo.surDownNum}}{{t('common.unit.3')}}</div>              
+              <Button type="primary" size="small" v-if="getCheckPerm('download-add')" @click="handleaddDown('0')"> {{t('routes.account.xzxz')}} </Button>
             </div>
             </div>
           </div>
           </div>
           <!-- <div class="list_item">
           <!-- <div class="list_item">
@@ -80,6 +80,7 @@
   import interesModal from './interesModal.vue';
   import interesModal from './interesModal.vue';
   import { useModal } from '/@/components/Modal';
   import { useModal } from '/@/components/Modal';
   import { usePermissionStore } from '/@/store/modules/permission';
   import { usePermissionStore } from '/@/store/modules/permission';
+  import { useI18n } from '/@/hooks/web/useI18n';
 
 
   import {
   import {
     refundSchema,
     refundSchema,
@@ -97,6 +98,7 @@
       const [registerCarem, { openModal: openCaremModal }] = useModal();
       const [registerCarem, { openModal: openCaremModal }] = useModal();
       const overviewInfo = computed(() => otherInfo.getOverviewInfo);
       const overviewInfo = computed(() => otherInfo.getOverviewInfo);
       const permissionStore = usePermissionStore();
       const permissionStore = usePermissionStore();
+      const { t } = useI18n();
       const { getCheckPerm } = permissionStore;
       const { getCheckPerm } = permissionStore;
       function handleaddDown(type: string) {
       function handleaddDown(type: string) {
         openAddDowmModal(true, {
         openAddDowmModal(true, {
@@ -140,6 +142,7 @@
         handleaddDown,
         handleaddDown,
         handleSetEquity,
         handleSetEquity,
         getCheckPerm,
         getCheckPerm,
+        t,
       };
       };
     },
     },
   });
   });

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

@@ -127,7 +127,7 @@
           }
           }
         },
         },
         {
         {
-          title: '设备激活时间',
+          title: t('routes.retailer.activatedTime'),
           dataIndex: 'activatedTime',
           dataIndex: 'activatedTime',
           width: 180,
           width: 180,
         },
         },

+ 29 - 29
src/views/empower/AddModal.vue

@@ -2,7 +2,7 @@
   <BasicModal
   <BasicModal
     v-bind="$attrs"
     v-bind="$attrs"
     @register="register"
     @register="register"
-    title="本地版算法授权"
+    :title="t('routes.empower.addName')"
     @visible-change="handleVisibleChange"
     @visible-change="handleVisibleChange"
     @cancel="resetFields"
     @cancel="resetFields"
     @ok="handleConfirm"
     @ok="handleConfirm"
@@ -52,30 +52,30 @@
           show: false,
           show: false,
           label: 'id',
           label: 'id',
         },
         },
-        {
-          field: 'useType',
-          component: 'ApiSelect',
-          required: true,
-          label: '使用类型',
-          componentProps: {
-            // filterOption: onFilterOption,
-            // showSearch: true,
-            api: incrementUseTypeList,
-            labelField: 'name',
-            valueField: 'id',
-            immediate: true,
-          },
-          itemProps: {
-            autoLink: false,
-          },
-          colProps: {
-            span: 20,
-          },
-        },
+        // {
+        //   field: 'useType',
+        //   component: 'ApiSelect',
+        //   required: true,
+        //   label: '使用类型',
+        //   componentProps: {
+        //     // filterOption: onFilterOption,
+        //     // showSearch: true,
+        //     api: incrementUseTypeList,
+        //     labelField: 'name',
+        //     valueField: 'id',
+        //     immediate: true,
+        //   },
+        //   itemProps: {
+        //     autoLink: false,
+        //   },
+        //   colProps: {
+        //     span: 20,
+        //   },
+        // },
         {
         {
           field: 'customerName',
           field: 'customerName',
           component: 'Input',
           component: 'Input',
-          label: '客户账号',
+          label: t('routes.empower.customerName'),
           required: true,
           required: true,
           colProps: { span: 20 },
           colProps: { span: 20 },
         },
         },
@@ -106,7 +106,7 @@
         {
         {
           field: 'endCustomer',
           field: 'endCustomer',
           component: 'Input',
           component: 'Input',
-          label: '终端客户',
+          label: t('routes.empower.endCustomer'),
           required: true,
           required: true,
           colProps: { span: 20 },
           colProps: { span: 20 },
         },
         },
@@ -121,12 +121,12 @@
           field: 'authorizeKey',
           field: 'authorizeKey',
           component: 'Input',
           component: 'Input',
           required: true,
           required: true,
-          label: '授权码',
+          label: t('routes.empower.authorize'),
           colProps: { span: 20 },
           colProps: { span: 20 },
         },
         },
         {
         {
           field: 'authorizeStartTime',
           field: 'authorizeStartTime',
-          label: '生效日期',
+          label: t('routes.empower.authorizeStartTime'),
           required: true,
           required: true,
           component: 'DatePicker',
           component: 'DatePicker',
           componentProps: {
           componentProps: {
@@ -142,7 +142,7 @@
         },
         },
         {
         {
           field: 'authorizeEndTime',
           field: 'authorizeEndTime',
-          label: '到期日期',
+          label: t('routes.empower.authorizeEndTime'),
           component: 'DatePicker',
           component: 'DatePicker',
           required: true,
           required: true,
           componentProps: {
           componentProps: {
@@ -159,7 +159,7 @@
         {
         {
           field: 'agentId',
           field: 'agentId',
           component: 'ApiSelect',
           component: 'ApiSelect',
-          label: '所属经销商',
+          label: t('routes.empower.agentId'),
           required: true,
           required: true,
           componentProps: {
           componentProps: {
             maxLength: 50,
             maxLength: 50,
@@ -266,8 +266,8 @@
         const { id } = await validate();
         const { id } = await validate();
         createConfirm({
         createConfirm({
           iconType: 'warning',
           iconType: 'warning',
-          title: () => h('span', '温馨提示'),
-          content: () => h('span', `确定要${id ? '编辑' : '新增'}授权吗?`),
+          title: () => h('span', t('common.reminder')),
+          content: () => h('span',  id ? t('routes.empower.editTips') : t('routes.empower.addtTips'),),
           onOk: async () => {
           onOk: async () => {
             handleSubmit();
             handleSubmit();
           },
           },

+ 20 - 20
src/views/empower/data.ts

@@ -15,26 +15,26 @@ export const remarkschemas: FormSchema[] = [
   },
   },
 ];
 ];
 export const newAddschemas: FormSchema[] = [
 export const newAddschemas: FormSchema[] = [
-  {
-    field: 'useType',
-    component: 'ApiSelect',
-    required: true,
-    label: '使用类型',
-    componentProps: {
-      // filterOption: onFilterOption,
-      // showSearch: true,
-      api: incrementUseTypeList,
-      labelField: 'name',
-      valueField: 'id',
-      immediate: true,
-    },
-    itemProps: {
-      autoLink: false,
-    },
-    colProps: {
-      span: 20,
-    },
-  },
+  // {
+  //   field: 'useType',
+  //   component: 'ApiSelect',
+  //   required: true,
+  //   label: '使用类型',
+  //   componentProps: {
+  //     // filterOption: onFilterOption,
+  //     // showSearch: true,
+  //     api: incrementUseTypeList,
+  //     labelField: 'name',
+  //     valueField: 'id',
+  //     immediate: true,
+  //   },
+  //   itemProps: {
+  //     autoLink: false,
+  //   },
+  //   colProps: {
+  //     span: 20,
+  //   },
+  // },
   {
   {
     field: 'companyName',
     field: 'companyName',
     component: 'Select',
     component: 'Select',

+ 42 - 41
src/views/empower/index.vue

@@ -2,7 +2,7 @@
   <div>
   <div>
     <BasicTable @register="registerTable">
     <BasicTable @register="registerTable">
       <template #toolbar>
       <template #toolbar>
-        <a-button type="primary" @click="handleEdit">授权</a-button>
+        <a-button type="primary" @click="handleEdit">{{t('routes.empower.sq')}}</a-button>
       </template>
       </template>
       <template #copy="{ record }">
       <template #copy="{ record }">
         <a @click="handleCopy(record.authorizeKey)">
         <a @click="handleCopy(record.authorizeKey)">
@@ -13,12 +13,12 @@
         <TableAction
         <TableAction
           :actions="[
           :actions="[
             {
             {
-              label: '编辑',
+              label: t('common.edit'),
               //ifShow: getCheckPerm('algorithm-updata'),
               //ifShow: getCheckPerm('algorithm-updata'),
               onClick: handleEdit.bind(null, record),
               onClick: handleEdit.bind(null, record),
             },
             },
             {
             {
-              label: '删除',
+              label: t('common.delText'),
               color: 'error',
               color: 'error',
               //ifShow: getCheckPerm('algorithm-delete'),
               //ifShow: getCheckPerm('algorithm-delete'),
               onClick: handleDelete.bind(null, record),
               onClick: handleDelete.bind(null, record),
@@ -42,12 +42,12 @@
   } from '/@/components/Table';
   } from '/@/components/Table';
   import { authorizeModelingList, authorizeModelingdelete } from '/@/api/authorizeModeling';
   import { authorizeModelingList, authorizeModelingdelete } from '/@/api/authorizeModeling';
   import { useModal } from '/@/components/Modal';
   import { useModal } from '/@/components/Modal';
-  import { useI18n } from '/@/hooks/web/useI18n';
   import { copyTextToClipboard } from '/@/hooks/web/useCopyToClipboard';
   import { copyTextToClipboard } from '/@/hooks/web/useCopyToClipboard';
   import { Time } from '/@/components/Time';
   import { Time } from '/@/components/Time';
   import AddModal from './AddModal.vue';
   import AddModal from './AddModal.vue';
   import { useMessage } from '/@/hooks/web/useMessage';
   import { useMessage } from '/@/hooks/web/useMessage';
   // import { usePermissionStore } from '/@/store/modules/permission';
   // import { usePermissionStore } from '/@/store/modules/permission';
+  import { useI18n } from '/@/hooks/web/useI18n';
   import { incrementUseTypeList } from '/@/api/account';
   import { incrementUseTypeList } from '/@/api/account';
   export default defineComponent({
   export default defineComponent({
     components: {
     components: {
@@ -57,14 +57,14 @@
       Time,
       Time,
     },
     },
     setup() {
     setup() {
-      const { t } = useI18n();
       const { createMessage, createConfirm } = useMessage();
       const { createMessage, createConfirm } = useMessage();
       // const permissionStore = usePermissionStore();
       // const permissionStore = usePermissionStore();
       // const { getCheckPerm } = permissionStore;
       // const { getCheckPerm } = permissionStore;
+      const { t } = useI18n();
       const [register, { openModal }] = useModal();
       const [register, { openModal }] = useModal();
       const columns: BasicColumn[] = [
       const columns: BasicColumn[] = [
         {
         {
-          title: '客户账号',
+          title: t('routes.empower.customerName'),
           dataIndex: 'customerName',
           dataIndex: 'customerName',
           ellipsis: true,
           ellipsis: true,
           width: 250,
           width: 250,
@@ -79,17 +79,17 @@
         //   },
         //   },
         // },
         // },
         {
         {
-          title: '终端客户',
+          title: t('routes.empower.endCustomer'),
           ellipsis: true,
           ellipsis: true,
           dataIndex: 'endCustomer',
           dataIndex: 'endCustomer',
           width: 120,
           width: 120,
         },
         },
-        {
-          title: '使用类型',
-          ellipsis: true,
-          dataIndex: 'useTypeStr',
-          width: 120,
-        },
+        // {
+        //   title: t('routes.empower.useTypeStr'),
+        //   ellipsis: true,
+        //   dataIndex: 'useTypeStr',
+        //   width: 120,
+        // },
         // {
         // {
         //   title: '项目号',
         //   title: '项目号',
         //   ellipsis: true,
         //   ellipsis: true,
@@ -97,14 +97,14 @@
         //   width: 120,
         //   width: 120,
         // },
         // },
         {
         {
-          title: '算法授权Key',
+          title: t('routes.empower.authorizeKey'),
           ellipsis: true,
           ellipsis: true,
           slots: { customRender: 'copy' },
           slots: { customRender: 'copy' },
           dataIndex: 'authorizeKey',
           dataIndex: 'authorizeKey',
           width: 120,
           width: 120,
         },
         },
         {
         {
-          title: '授权期限',
+          title: t('routes.empower.authorizeTime'),
           ellipsis: true,
           ellipsis: true,
           dataIndex: 'authorizeTime',
           dataIndex: 'authorizeTime',
           width: 220,
           width: 220,
@@ -116,25 +116,25 @@
           },
           },
         },
         },
         {
         {
-          title: '授权说明',
+          title: t('routes.empower.remark'),
           ellipsis: true,
           ellipsis: true,
           dataIndex: 'remark',
           dataIndex: 'remark',
           width: 120,
           width: 120,
         },
         },
         {
         {
-          title: '经销商名称',
+          title: t('routes.empower.agentName'),
           ellipsis: true,
           ellipsis: true,
           dataIndex: 'agentName',
           dataIndex: 'agentName',
           width: 120,
           width: 120,
         },
         },
         {
         {
-          title: '创建人',
+          title: t('routes.retailer.createName'),
           ellipsis: true,
           ellipsis: true,
           dataIndex: 'createAgentName',
           dataIndex: 'createAgentName',
           width: 120,
           width: 120,
         },
         },
         {
         {
-          title: '创建时间',
+          title: t('routes.retailer.createTime'),
           ellipsis: true,
           ellipsis: true,
           dataIndex: 'createTime',
           dataIndex: 'createTime',
           width: 160,
           width: 160,
@@ -155,7 +155,7 @@
         schemas: [
         schemas: [
           {
           {
             field: 'customerName',
             field: 'customerName',
-            label: '客户账号',
+            label: t('routes.empower.customerName'),
             component: 'Input',
             component: 'Input',
             colProps: {
             colProps: {
               xl: 8,
               xl: 8,
@@ -185,24 +185,24 @@
           //     xxl: 8,
           //     xxl: 8,
           //   },
           //   },
           // },
           // },
-          {
-            field: 'useType',
-            label: '使用类型',
-            component: 'ApiSelect',
-            componentProps: {
-              api: incrementUseTypeList,
-              labelField: 'name',
-              valueField: 'id',
-              immediate: true,
-            },
-            colProps: {
-              xl: 8,
-              xxl: 8,
-            },
-          },
+          // {
+          //   field: 'useType',
+          //   label: t('routes.empower.useTypeStr'),
+          //   component: 'ApiSelect',
+          //   componentProps: {
+          //     api: incrementUseTypeList,
+          //     labelField: 'name',
+          //     valueField: 'id',
+          //     immediate: true,
+          //   },
+          //   colProps: {
+          //     xl: 8,
+          //     xxl: 8,
+          //   },
+          // },
           {
           {
             field: 'authorizeKey',
             field: 'authorizeKey',
-            label: '算法授权Key',
+            label: t('routes.empower.authorizeKey'),
             component: 'Input',
             component: 'Input',
             colProps: {
             colProps: {
               xl: 8,
               xl: 8,
@@ -213,7 +213,7 @@
       };
       };
       const [registerTable, { reload }] = useTable({
       const [registerTable, { reload }] = useTable({
         api: authorizeModelingList,
         api: authorizeModelingList,
-        title: '算法授权列表',
+        title: t('routes.empower.list'),
         columns: columns,
         columns: columns,
         useSearchForm: true,
         useSearchForm: true,
         formConfig: searchForm,
         formConfig: searchForm,
@@ -227,7 +227,7 @@
         },
         },
         actionColumn: {
         actionColumn: {
           width: 100,
           width: 100,
-          title: '操作',
+          title: t('common.operating'),
           dataIndex: 'action',
           dataIndex: 'action',
           slots: { customRender: 'action' },
           slots: { customRender: 'action' },
         },
         },
@@ -237,8 +237,8 @@
       async function handleDelete(record) {
       async function handleDelete(record) {
         createConfirm({
         createConfirm({
           iconType: 'warning',
           iconType: 'warning',
-          title: () => h('span', '温馨提示'),
-          content: () => h('span', '确定要删除授权吗?'),
+          title: () => h('span', t('common.reminder')),
+          content: () => h('span', t('routes.empower.deltTips')),
           onOk: async () => {
           onOk: async () => {
             await authorizeModelingdelete({ id: record.id });
             await authorizeModelingdelete({ id: record.id });
             reload();
             reload();
@@ -248,7 +248,7 @@
       }
       }
       function handleCopy(str: string) {
       function handleCopy(str: string) {
         copyTextToClipboard(str);
         copyTextToClipboard(str);
-        createMessage.success('复制成功');
+        createMessage.success(t('routes.scene.copySccuse'));
       }
       }
       function handleEdit(record = {}) {
       function handleEdit(record = {}) {
         openModal(true, {
         openModal(true, {
@@ -262,6 +262,7 @@
         handleDelete,
         handleDelete,
         reload,
         reload,
         register,
         register,
+        t,
         // getCheckPerm,
         // getCheckPerm,
         handleEdit,
         handleEdit,
       };
       };