Browse Source

注释授权码

木星 2 months ago
parent
commit
526d411992
2 changed files with 76 additions and 76 deletions
  1. 55 55
      src/views/Authority/User.vue
  2. 21 21
      src/views/Login/components/LoginForm.vue

+ 55 - 55
src/views/Authority/User.vue

@@ -130,23 +130,23 @@ let schema = reactive<FormSchema[]>([
130
     },
130
     },
131
     formItemProps: {}
131
     formItemProps: {}
132
   },
132
   },
133
-  {
134
-    field: 'authorizationCode',
135
-    label: '授权码',
136
-    component: 'Input',
137
-    colProps: {
138
-      span: 24
139
-    },
140
-    componentProps: {
141
-      style: {
142
-        width: '100%'
143
-      },
144
-      placeholder: '请输入授权码'
145
-    },
146
-    formItemProps: {
147
-      rules: [required()]
148
-    }
149
-  },
133
+  // {
134
+  //   field: 'authorizationCode',
135
+  //   label: '授权码',
136
+  //   component: 'Input',
137
+  //   colProps: {
138
+  //     span: 24
139
+  //   },
140
+  //   componentProps: {
141
+  //     style: {
142
+  //       width: '100%'
143
+  //     },
144
+  //     placeholder: '请输入授权码'
145
+  //   },
146
+  //   formItemProps: {
147
+  //     rules: [required()]
148
+  //   }
149
+  // },
150
   {
150
   {
151
     field: 'hasManage',
151
     field: 'hasManage',
152
     label: '是否进入后台',
152
     label: '是否进入后台',
@@ -213,7 +213,7 @@ const signIn = async () => {
213
       }
213
       }
214
 
214
 
215
       nweformData.userCode = encryptedData(res2.data, formData.userCode)
215
       nweformData.userCode = encryptedData(res2.data, formData.userCode)
216
-      nweformData.authorizationCode = encryptedData(res2.data, formData.authorizationCode)
216
+      // nweformData.authorizationCode = encryptedData(res2.data, formData.authorizationCode)
217
       let res = await saveUser(nweformData)
217
       let res = await saveUser(nweformData)
218
       if (res) {
218
       if (res) {
219
         dialogVisible.value = false
219
         dialogVisible.value = false
@@ -360,23 +360,23 @@ const editUser = async (data) => {
360
       },
360
       },
361
       formItemProps: {}
361
       formItemProps: {}
362
     },
362
     },
363
-    {
364
-      field: 'authorizationCode',
365
-      label: '授权码',
366
-      component: 'Input',
367
-      colProps: {
368
-        span: 24
369
-      },
370
-      componentProps: {
371
-        style: {
372
-          width: '100%'
373
-        },
374
-        placeholder: '请输入授权码'
375
-      },
376
-      formItemProps: {
377
-        rules: [required()]
378
-      }
379
-    },
363
+    // {
364
+    //   field: 'authorizationCode',
365
+    //   label: '授权码',
366
+    //   component: 'Input',
367
+    //   colProps: {
368
+    //     span: 24
369
+    //   },
370
+    //   componentProps: {
371
+    //     style: {
372
+    //       width: '100%'
373
+    //     },
374
+    //     placeholder: '请输入授权码'
375
+    //   },
376
+    //   formItemProps: {
377
+    //     rules: [required()]
378
+    //   }
379
+    // },
380
     {
380
     {
381
       field: 'hasManage',
381
       field: 'hasManage',
382
       label: '是否进入后台',
382
       label: '是否进入后台',
@@ -431,7 +431,7 @@ const editUser = async (data) => {
431
 
431
 
432
   let res = await getUserDetail(arr)
432
   let res = await getUserDetail(arr)
433
   res.data.userCode = decrypt(res.data.userCode, key2)
433
   res.data.userCode = decrypt(res.data.userCode, key2)
434
-  res.data.authorizationCode = decrypt(res.data.authorizationCode, key2)
434
+  // res.data.authorizationCode = decrypt(res.data.authorizationCode, key2)
435
   if (res) {
435
   if (res) {
436
     dialogVisible.value = true
436
     dialogVisible.value = true
437
     const formRef = await getElFormExpose()
437
     const formRef = await getElFormExpose()
@@ -441,7 +441,7 @@ const editUser = async (data) => {
441
     formData.userCode = res.data.userCode
441
     formData.userCode = res.data.userCode
442
     formData.displayName = res.data.displayName
442
     formData.displayName = res.data.displayName
443
     formData.hasManage = res.data.hasManage
443
     formData.hasManage = res.data.hasManage
444
-    formData.authorizationCode = res.data.authorizationCode
444
+    // formData.authorizationCode = res.data.authorizationCode
445
     formData.roleIds = res.data.roleInfoList[0].roleName
445
     formData.roleIds = res.data.roleInfoList[0].roleName
446
     formData.userId = res.data.userId
446
     formData.userId = res.data.userId
447
   }
447
   }
@@ -562,23 +562,23 @@ const tianjia = async () => {
562
         rules: [required()]
562
         rules: [required()]
563
       }
563
       }
564
     },
564
     },
565
-    {
566
-      field: 'authorizationCode',
567
-      label: '授权码',
568
-      component: 'Input',
569
-      colProps: {
570
-        span: 24
571
-      },
572
-      componentProps: {
573
-        style: {
574
-          width: '100%'
575
-        },
576
-        placeholder: '请输入授权码'
577
-      },
578
-      formItemProps: {
579
-        rules: [required()]
580
-      }
581
-    },
565
+    // {
566
+    //   field: 'authorizationCode',
567
+    //   label: '授权码',
568
+    //   component: 'Input',
569
+    //   colProps: {
570
+    //     span: 24
571
+    //   },
572
+    //   componentProps: {
573
+    //     style: {
574
+    //       width: '100%'
575
+    //     },
576
+    //     placeholder: '请输入授权码'
577
+    //   },
578
+    //   formItemProps: {
579
+    //     rules: [required()]
580
+    //   }
581
+    // },
582
     {
582
     {
583
       field: 'hasManage',
583
       field: 'hasManage',
584
       label: '是否进入后台',
584
       label: '是否进入后台',
@@ -664,7 +664,7 @@ const tianjia = async () => {
664
     />
664
     />
665
   </ContentWrap>
665
   </ContentWrap>
666
 
666
 
667
-  <Dialog v-model="dialogVisible" maxHeight="380px" width="35rem" :title="isedit">
667
+  <Dialog v-model="dialogVisible" maxHeight="250px" width="35rem" :title="isedit">
668
     <Form label-position="left" :rules="rules" :schema="schema" @register="formRegister" />
668
     <Form label-position="left" :rules="rules" :schema="schema" @register="formRegister" />
669
 
669
 
670
     <template #footer>
670
     <template #footer>

+ 21 - 21
src/views/Login/components/LoginForm.vue

@@ -47,8 +47,8 @@ const { t } = useI18n()
47
 
47
 
48
 const rules = {
48
 const rules = {
49
   username: [required()],
49
   username: [required()],
50
-  password: [required()],
51
-  authCode: [required()]
50
+  password: [required()]
51
+  // authCode: [required()]
52
 }
52
 }
53
 
53
 
54
 const schema = reactive<FormSchema[]>([
54
 const schema = reactive<FormSchema[]>([
@@ -96,21 +96,21 @@ const schema = reactive<FormSchema[]>([
96
       prefixIcon: <Icon icon="mdi:password-outline" />
96
       prefixIcon: <Icon icon="mdi:password-outline" />
97
     }
97
     }
98
   },
98
   },
99
-  {
100
-    field: 'authCode',
101
-    // value: 'admin',
102
-    component: 'InputPassword',
103
-    colProps: {
104
-      span: 24
105
-    },
106
-    componentProps: {
107
-      style: {
108
-        width: '100%'
109
-      },
110
-      placeholder: '请输入授权码',
111
-      prefixIcon: <Icon icon="tdesign:secured" />
112
-    }
113
-  },
99
+  // {
100
+  //   field: 'authCode',
101
+  //   // value: 'admin',
102
+  //   component: 'InputPassword',
103
+  //   colProps: {
104
+  //     span: 24
105
+  //   },
106
+  //   // componentProps: {
107
+  //   //   style: {
108
+  //   //     width: '100%'
109
+  //   //   },
110
+  //   //   placeholder: '请输入授权码',
111
+  //   //   prefixIcon: <Icon icon="tdesign:secured" />
112
+  //   // }
113
+  // },
114
   {
114
   {
115
     field: 'login',
115
     field: 'login',
116
     colProps: {
116
     colProps: {
@@ -121,7 +121,7 @@ const schema = reactive<FormSchema[]>([
121
         default: () => {
121
         default: () => {
122
           return (
122
           return (
123
             <>
123
             <>
124
-              <div class="w-[100%]">
124
+              <div style="    margin-top: 50px;" class="w-[100%]">
125
                 <BaseButton
125
                 <BaseButton
126
                   style="font-size: 1.3rem; height: 2.5rem; "
126
                   style="font-size: 1.3rem; height: 2.5rem; "
127
                   loading={loading.value}
127
                   loading={loading.value}
@@ -193,8 +193,8 @@ const signIn = async () => {
193
 
193
 
194
         nweformData.password = encryptedData(res2.data, formData.password)
194
         nweformData.password = encryptedData(res2.data, formData.password)
195
         nweformData.username = encryptedData(res2.data, formData.username)
195
         nweformData.username = encryptedData(res2.data, formData.username)
196
-        nweformData.authCode = encryptedData(res2.data, formData.authCode)
197
-        nweformData.loginType = '1'
196
+        // nweformData.authCode = encryptedData(res2.data, formData.authCode)
197
+
198
         const res = await loginApi(nweformData)
198
         const res = await loginApi(nweformData)
199
 
199
 
200
         if (res) {
200
         if (res) {
@@ -292,7 +292,7 @@ const getRole = async () => {
292
       userStore.setRoleRouters([])
292
       userStore.setRoleRouters([])
293
       formData.username = ''
293
       formData.username = ''
294
       formData.password = ''
294
       formData.password = ''
295
-      formData.authCode = ''
295
+      // formData.authCode = ''
296
       ElMessage.error('暂无权限,请联系管理员')
296
       ElMessage.error('暂无权限,请联系管理员')
297
     }
297
     }
298
   }
298
   }