Преглед изворни кода

✨ feat: 修改重设密码UI

WanGxC пре 1 година
родитељ
комит
651938327e
3 измењених фајлова са 28 додато и 20 уклоњено
  1. 3 2
      src/views/efTools/automation/crud.tsx
  2. 22 15
      src/views/system/user/crud.tsx
  3. 3 3
      src/views/system/user/index.vue

+ 3 - 2
src/views/efTools/automation/crud.tsx

@@ -27,8 +27,9 @@ export const createCrudOptions = function ({ crudExpose, context }: CreateCrudOp
   return {
     crudOptions: {
       table: {
-        height: 800,
-        size: 'small',
+        height: 900,
+        size: 'default',
+        border: false,
       },
       container: {
         fixedHeight: false,

+ 22 - 15
src/views/system/user/crud.tsx

@@ -47,6 +47,7 @@ export const createCrudOptions = function ({ crudExpose }: CreateCrudOptionsProp
         remove: {
           confirmMessage: '是否删除该用户?',
         },
+        border: false,
       },
       request: {
         pageRequest,
@@ -190,6 +191,23 @@ export const createCrudOptions = function ({ crudExpose }: CreateCrudOptionsProp
             },
           },
         },
+        gender: {
+          title: '性别',
+          type: 'dict-select',
+          dict: dict({
+            data: dictionary('gender'),
+          }),
+          column: {
+            minWidth: 50, //最小列宽
+          },
+          form: {
+            value: 1,
+            component: {
+              span: 12,
+            },
+          },
+          component: { props: { color: 'auto' } }, // 自动染色
+        },
         dept: {
           title: '部门',
           search: {
@@ -210,7 +228,7 @@ export const createCrudOptions = function ({ crudExpose }: CreateCrudOptionsProp
             },
           }),
           column: {
-            minWidth: 150, //最小列宽
+            minWidth: 100, //最小列宽
           },
           form: {
             rules: [
@@ -317,20 +335,6 @@ export const createCrudOptions = function ({ crudExpose }: CreateCrudOptionsProp
             },
           },
         },
-        gender: {
-          title: '性别',
-          type: 'dict-select',
-          dict: dict({
-            data: dictionary('gender'),
-          }),
-          form: {
-            value: 1,
-            component: {
-              span: 12,
-            },
-          },
-          component: { props: { color: 'auto' } }, // 自动染色
-        },
         user_type: {
           title: '用户类型',
           search: {
@@ -379,6 +383,9 @@ export const createCrudOptions = function ({ crudExpose }: CreateCrudOptionsProp
         avatar: {
           title: '头像',
           type: 'avatar-cropper',
+          column: {
+            show: false,
+          },
           form: {
             show: false,
           },

+ 3 - 3
src/views/system/user/index.vue

@@ -144,7 +144,7 @@ async function submitPwd() {
     const response = await api.postResetPassword(body, id);
     if (response.code === 2000) {
       dialogVisible.value = false;
-      empty();
+      emptyForm();
       ElMessage.success(response.msg);
     } else {
       ElMessage.error(response.msg);
@@ -161,14 +161,14 @@ async function submitPwd() {
  * @param done
  */
 function handleBeforeClose(done: Function) {
-  empty();
+  emptyForm();
   done();
 }
 
 /**
  * 清空表单
  */
-function empty() {
+function emptyForm() {
   if (ruleFormRef.value) ruleFormRef.value.resetFields();
 }
 </script>