Parcourir la source

feat(correct): 整理

gemercheung il y a 3 ans
Parent
commit
9a6d88b4eb

+ 1 - 1
src/api/sys/model/userModel.ts

@@ -8,7 +8,7 @@ export interface LoginParams {
 }
 
 export interface RoleInfo {
-  userID: string;
+  userID?: string;
   roleName: string;
   value: string;
   brandList: string[] | any;

+ 6 - 0
src/locales/lang/zh-CN/routes/system.ts

@@ -1,3 +1,9 @@
+const account = {
+  userName: '用户名',
+  accountList: '账户列表',
+};
+
 export default {
+  ...account,
   buttonMenuWaring: '上级菜单只能为菜单类型',
 };

+ 3 - 2
src/views/corporation/SubaccountModal.vue

@@ -2,8 +2,9 @@
   <BasicModal
     v-bind="$attrs"
     @register="register"
-    title="设备"
+    title="子账号"
     @ok="saveTable"
+    width="600px"
     @visible-change="handleVisibleChange"
   >
     <div class="pt-3px pr-3px">
@@ -137,7 +138,7 @@
           title: '操作',
           dataIndex: '',
           slots: { customRender: 'action' },
-          width: 120,
+          width: 100,
         },
       ];
       const schemas: FormSchema[] = [

+ 1 - 0
src/views/corporation/deviceModal.vue

@@ -30,6 +30,7 @@
     props: {
       userData: { type: Object },
     },
+    emits: ['register'],
     setup(props) {
       const modelRef = ref({});
       const num = ref(0);

+ 8 - 5
src/views/corporation/verify.vue

@@ -3,8 +3,8 @@
     <BasicTable @register="registerTable">
       <template #toolbar> </template>
       <template #no="{ record }">
-        <Tag :color="rederTag(record.state, 'color')">
-          {{ rederTag(record.state, 'text') || '审核中' }}
+        <Tag :color="renderTag(record.state, 'color')">
+          {{ renderTag(record.state, 'text') || '审核中' }}
         </Tag>
       </template>
       <template #time="{ record }">
@@ -93,7 +93,7 @@
             },
             componentProps: {
               options: ['', 1, 0, 2].map((ele) => {
-                return { value: ele, key: ele, label: rederTag(ele, 'text') };
+                return { value: ele, key: ele, label: renderTag(ele, 'text') };
               }),
             },
           },
@@ -128,7 +128,10 @@
           if (searchData.fieldTime) {
             searchData.startTime = searchData.fieldTime[0];
             searchData.endTime = searchData.fieldTime[1];
+            delete searchData.fieldTime;
           }
+          console.log('searchData', searchData);
+
           return searchData;
         },
         showIndexColumn: false,
@@ -144,7 +147,7 @@
       function infoText(record) {
         openDeviceModal(true, { record });
       }
-      function rederTag(state, type) {
+      function renderTag(state, type) {
         let obj = {
           1: { color: 'success', text: t('routes.corporation.stateName.1') },
           2: { color: 'warning', text: t('routes.corporation.stateName.2') },
@@ -164,7 +167,7 @@
         uploadApi: uploadApi as any,
         registerDeviceModal,
         infoText,
-        rederTag,
+        renderTag,
         t,
       };
     },

+ 2 - 2
src/views/system/account/account.data.ts

@@ -36,7 +36,7 @@ export const columns: BasicColumn[] = [
   },
   {
     title: '角色',
-    dataIndex: 'role',
+    dataIndex: 'roleName',
     width: 200,
   },
   {
@@ -116,13 +116,13 @@ export const accountFormSchema: FormSchema[] = [
   //   },
   //   required: true,
   // },
+
   {
     field: 'nickName',
     label: '昵称',
     component: 'Input',
     required: true,
   },
-
   {
     field: 'phone',
     label: '手机号',

+ 5 - 1
src/views/system/account/index.vue

@@ -51,16 +51,19 @@
 
   import { columns, searchFormSchema } from './account.data';
   import { useGo } from '/@/hooks/web/usePage';
+  import { useI18n } from '/@/hooks/web/useI18n';
+
   // DeptTree
   export default defineComponent({
     name: 'AccountManagement',
     components: { BasicTable, PageWrapper, AccountModal, TableAction },
     setup() {
       const go = useGo();
+      const { t } = useI18n();
       const [registerModal, { openModal }] = useModal();
       const searchInfo = reactive<Recordable>({});
       const [registerTable, { reload }] = useTable({
-        title: '账号列表',
+        title: t('routes.system.accountList'),
         api: getAccountList,
         rowKey: 'id',
         columns,
@@ -133,6 +136,7 @@
         handleSelect,
         handleView,
         searchInfo,
+        t,
       };
     },
   });