tangning 1 рік тому
батько
коміт
ea0b66320f

+ 2 - 2
src/layouts/default/header/components/user-dropdown/index.vue

@@ -11,12 +11,12 @@
 
     <template #overlay>
       <Menu @click="handleMenuClick">
-        <MenuItem
+        <!-- <MenuItem
           key="doc"
           :text="t('layout.header.dropdownItemDoc')"
           icon="ion:document-text-outline"
           v-if="getShowDoc"
-        />
+        /> -->
         <!-- <MenuDivider v-if="getShowDoc" /> -->
         <MenuItem
           v-if="getUseLockPage"

+ 1 - 1
src/layouts/default/header/components/user-dropdown/setpaswordModal.vue

@@ -139,7 +139,7 @@
          });
         createMessage.success(t('common.optSuccess'));
         resetFields();
-        userStore.confirmLoginOut();
+        userStore.logout(true);
       }
       function handleVisibleChange(v) {
         v && props.userData && nextTick(() => onDataReceive(props.userData));

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

@@ -14,7 +14,7 @@
               {
                 label: '删除',
                 color: 'error',
-                ifShow: getCheckPerm('device-delete') && !(Boolean(record.outType) || Boolean(record.userName)),
+                ifShow: getCheckPerm('device-delete'),
                 onClick: handleDelete.bind(null, record),
               },{
                 label: '出库',
@@ -151,14 +151,14 @@
         //   dataIndex: 'companyName',
         //   width: 80,
         // },
-        {
-          title: '绑定账号',
-          dataIndex: 'userName',
-          width: 180,
-          customRender({ record }) {
-            return record.userName?record.userName:'未绑定'
-          },
-        },
+        // {
+        //   title: '绑定账号',
+        //   dataIndex: 'userName',
+        //   width: 180,
+        //   customRender({ record }) {
+        //     return record.userName?record.userName:'未绑定'
+        //   },
+        // },
 
         {
           title: '操作',

+ 51 - 63
src/views/lanUser/list.vue

@@ -114,7 +114,7 @@
           width: 120,
         },
         {
-          title: t('routes.staff.userId'),
+          title: '人员编号',
           dataIndex: 'userName',
           width: 150,
         },
@@ -129,68 +129,57 @@
         //   width: 100,
         // },
 
-        {
-          title: '创建人',
-          dataIndex: 'sysUserName',
-          width: 80,
-        },
+        // {
+        //   title: '创建人',
+        //   dataIndex: 'sysUserName',
+        //   width: 80,
+        // },
 
         {
-          title: t('routes.staff.createTime'),
+          title: '注册时间',
           dataIndex: 'createTime',
           slots: { customRender: 'createTime' },
           width: 130,
         },
-      //   {
-      //   title: '状态',
-      //   dataIndex: 'status',
-      //   ifShow:getCheckPerm('sysuser-enable'),
-      //   width: 80,
-      //   customRender: ({ record }) => {
-      //     if (!Reflect.has(record, 'status')) {
-      //       record.pendingStatus = false;
-      //     }
-      //     return h(Switch, {
-      //       checked: record.status == 1 ? true : false,
-      //       checkedChildren: '启用',
-      //       unCheckedChildren: '禁用',
-      //       loading: false,
-      //       onChange: async (checked: boolean) => {
-      //         record.pendingStatus = true;
-      //         const newStatus = checked?1:0;
-      //         await updateApi({...record,status:newStatus});
-      //         Reflect.set(record, 'status', checked);
-      //         createMessage.success(t('common.optSuccess'));
-      //         reload()
-      //       },
-      //     });
-      //   },
-      // },
         {
-          title: '操作',
-          dataIndex: '',
-          // ifShow: !getCheckRole('tourist'),
-          slots: { customRender: 'action' },
-          fixed: 'right',
-          width: 100,
+          title: '状态',
+          dataIndex: 'status',
+          ifShow:getCheckPerm('sysuser-enable'),
+          width: 80,
+          customRender: ({ record }) => {
+            return record.status == 1 ? '正常' : '冻结';
+            // if (!Reflect.has(record, 'status')) {
+            //   record.pendingStatus = false;
+            // }
+            // return h(Switch, {
+            //   checked: record.status == 1 ? true : false,
+            //   checkedChildren: '启用',
+            //   unCheckedChildren: '禁用',
+            //   loading: false,
+            //   onChange: async (checked: boolean) => {
+            //     record.pendingStatus = true;
+            //     const newStatus = checked?1:0;
+            //     await updateApi({...record,status:newStatus});
+            //     Reflect.set(record, 'status', checked);
+            //     createMessage.success(t('common.optSuccess'));
+            //     reload()
+            //   },
+            // });
+          },
         },
+        // {
+        //   title: '操作',
+        //   dataIndex: '',
+        //   // ifShow: !getCheckRole('tourist'),
+        //   slots: { customRender: 'action' },
+        //   fixed: 'right',
+        //   width: 100,
+        // },
       ];
 
       const searchForm: Partial<FormProps> = {
         labelWidth: 100,
         schemas: [
-          // {
-          //   field: 'nickName',
-          //   label: t('routes.staff.userName'),
-          //   component: 'Input',
-          //   componentProps: {
-          //     maxLength: 15,
-          //   },
-          //   colProps: {
-          //     xl: 6,
-          //     xxl: 6,
-          //   },
-          // },
           {
             field: 'userName',
             label: '账号',
@@ -202,19 +191,18 @@
               xl: 6,
               xxl: 6,
             },
-          // },{
-          //   field: 'roleId',
-          //   label: '角色',
-          //   component: 'ApiSelect',
-          //   componentProps: {
-          //     api: getRoleListByParam,
-          //     labelField: 'roleName',
-          //     valueField: 'id',
-          //   },
-          //   colProps: {
-          //     xl: 6,
-          //     xxl: 6,
-          //   },
+          },
+          {
+            field: 'userName',
+            label: '人员编号',
+            component: 'Input',
+            componentProps: {
+              maxLength: 15,
+            },
+            colProps: {
+              xl: 6,
+              xxl: 6,
+            },
           },
         ],
       };