Browse Source

Merge remote-tracking branch 'origin/gzb' into wzl

gzb
wangzhonglu 9 months ago
parent
commit
1e2f8b6991

+ 12
- 1
src/utils/index.js View File

@@ -2,6 +2,17 @@
2 2
 let _timezone = 8; //目标时区时间,东八区   东时区正数 西时区负数
3 3
 let _offset_GMT = new Date().getTimezoneOffset(); // 本地时间和格林威治的时间差,单位为分钟
4 4
 let diffTime = _offset_GMT * 60 * 1000 + _timezone * 60 * 60 * 1000; //0
5
+
6
+export const reg = /^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)[a-zA-Z\d]{6,16}$/;
7
+// 密码验证
8
+export const pwdCheck = (rule, value, callback) => {
9
+  const reg = /^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)[a-zA-Z\d]{6,16}$/;
10
+  if (!reg.test(value)) {
11
+    return callback(new Error("密码格式不正确!"));
12
+  } else {
13
+    callback();
14
+  }
15
+};
5 16
 export const weekDay = [
6 17
   {
7 18
     label: "周日",
@@ -342,7 +353,7 @@ export function hexToRgba(hex, opacity) {
342 353
   return rgbaColor;
343 354
 }
344 355
 // 包含大小写字母和数字的随机组合
345
-export const generateRandomString = (n = 8) => {
356
+export const generateRandomString = (n = 6) => {
346 357
   let chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
347 358
   let result = "";
348 359
   let hasUpperCase = false;

+ 2
- 10
src/views/layout.vue View File

@@ -85,7 +85,7 @@
85 85
         "
86 86
       >
87 87
         <div style="color: #b50000">
88
-          注:密码必须包含大小写字母和数字的组合,长度在8-32之间
88
+          注:密码必须是6-16位的大小写英文字母、数字组合
89 89
         </div>
90 90
         <div>
91 91
           <Button @click="pwInfo.show = false">取消</Button>
@@ -161,17 +161,9 @@
161 161
 import { admin_detail, admin_edit_phone, admin_edit_pwd } from "@/api/admin";
162 162
 import { login_msg_code } from "@/api/login";
163 163
 import { logdoperatemsg_get_nrn } from "@/api/log";
164
-
164
+import { pwdCheck, reg } from "@/utils";
165 165
 export default {
166 166
   data() {
167
-    const reg = /^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)[a-zA-Z\d]{8,32}$/;
168
-    // 密码验证
169
-    const pwdCheck = (rule, value, callback) => {
170
-      if (!reg.test(value)) {
171
-        return callback(new Error("密码格式不正确!"));
172
-      }
173
-      callback();
174
-    };
175 167
     // 重复密码验证
176 168
     const pwdAgainCheck = async (rule, value, callback) => {
177 169
       if (!reg.test(value)) {

+ 1
- 0
src/views/login/login.vue View File

@@ -317,6 +317,7 @@ export default {
317 317
     transform: translateY(-50%);
318 318
     right: 16%;
319 319
     .welcome {
320
+      margin-bottom: 20px;
320 321
       height: 30px;
321 322
       color: #000000;
322 323
       font-size: 24px;

+ 3
- 12
src/views/platformSection/regionManage/adminManage.vue View File

@@ -198,7 +198,7 @@
198 198
         "
199 199
       >
200 200
         <div style="color: #b50000">
201
-          注:密码必须包含大小写字母和数字的组合,长度在8-32之间
201
+          注:密码必须是6-16位的大小写英文字母、数字组合
202 202
         </div>
203 203
         <div>
204 204
           <Button @click="adminInfo.show = false">取消</Button>
@@ -259,18 +259,9 @@ import {
259 259
 } from "@/api/admin";
260 260
 import { region_list_sel_pt } from "@/api/region";
261 261
 import { login_msg_code } from "@/api/login";
262
-import { generateRandomString } from "@/utils";
262
+import { generateRandomString, pwdCheck, reg } from "@/utils";
263 263
 export default {
264 264
   data() {
265
-    const reg = /^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)[a-zA-Z\d]{8,32}$/;
266
-    // 密码验证
267
-    const pwdCheck = (rule, value, callback) => {
268
-      if (!reg.test(this.adminInfo.loginpwd)) {
269
-        return callback(new Error("密码格式不正确。"));
270
-      } else {
271
-        callback();
272
-      }
273
-    };
274 265
     // 重复密码验证
275 266
     const pwdAgainCheck = async (rule, value, callback) => {
276 267
       if (!reg.test(this.adminInfo.loginpwd1)) {
@@ -501,7 +492,7 @@ export default {
501 492
         adminid: null,
502 493
         aname: "",
503 494
         loginname: "",
504
-        loginpwd: generateRandomString(8),
495
+        loginpwd: generateRandomString(),
505 496
         loginpwd1: "",
506 497
         phone: "",
507 498
         msgcode: "",

+ 3
- 12
src/views/platformSection/regionManage/regionManage.vue View File

@@ -142,7 +142,7 @@
142 142
         "
143 143
       >
144 144
         <div style="color: #b50000">
145
-          注:密码必须包含大小写字母和数字的组合,长度在8-32之间
145
+          注:密码必须是6-16位的大小写英文字母、数字组合
146 146
         </div>
147 147
         <div>
148 148
           <Button @click="regionInfo.show = false">取消</Button>
@@ -230,7 +230,7 @@
230 230
 </template>
231 231
 
232 232
 <script>
233
-import { generateRandomString } from "@/utils";
233
+import { generateRandomString, pwdCheck, reg } from "@/utils";
234 234
 import {
235 235
   region_list_pt,
236 236
   region_list_admin,
@@ -241,15 +241,6 @@ import {
241 241
 import { login_msg_code } from "@/api/login";
242 242
 export default {
243 243
   data() {
244
-    const reg = /^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)[a-zA-Z\d]{8,32}$/;
245
-    // 密码验证
246
-    const pwdCheck = (rule, value, callback) => {
247
-      if (!reg.test(this.regionInfo.admin.loginpwd)) {
248
-        return callback(new Error("密码格式不正确。"));
249
-      } else {
250
-        callback();
251
-      }
252
-    };
253 244
     // 重复密码验证
254 245
     const pwdAgainCheck = async (rule, value, callback) => {
255 246
       if (!reg.test(this.regionInfo.admin.loginpwd1)) {
@@ -522,7 +513,7 @@ export default {
522 513
         admin: {
523 514
           aname: "",
524 515
           loginname: "",
525
-          loginpwd: generateRandomString(8),
516
+          loginpwd: generateRandomString(),
526 517
           loginpwd1: "",
527 518
           phone: "",
528 519
           msgcode: "",

+ 107
- 60
src/views/regionSection/regionManage/adminManage.vue View File

@@ -178,45 +178,49 @@
178 178
             placeholder="请输入描述信息"
179 179
           ></Input>
180 180
         </FormItem>
181
-        <FormItem label="账号类型" style="width: 100%">
182
-          <RadioGroup v-model="adminInfo.userType">
183
-            <Radio :label="1">区域管理员</Radio>
184
-            <Radio :label="2">学校管理员</Radio>
185
-          </RadioGroup>
186
-        </FormItem>
187
-        <FormItem label="所属区域" prop="regionid" style="width: 100%">
188
-          <Select
189
-            :transfer="true"
190
-            v-model="adminInfo.regionid"
191
-            style="width: calc(50% - 65px)"
192
-          >
193
-            <Option
194
-              v-for="item in searchForm.dropList"
195
-              :value="item.regionid"
196
-              :key="item.regionid"
197
-              >{{ item.regionName }}</Option
181
+        <div v-if="!adminInfo.adminid">
182
+          <FormItem label="账号类型" style="width: 100%">
183
+            <RadioGroup v-model="adminInfo.atype">
184
+              <Radio :label="2">区域管理员</Radio>
185
+              <Radio :label="3">学校管理员</Radio>
186
+            </RadioGroup>
187
+          </FormItem>
188
+          <FormItem label="所属区域" prop="regionid" style="width: 100%">
189
+            <Select
190
+              :transfer="true"
191
+              v-model="adminInfo.regionid"
192
+              @on-change="regionidChange"
193
+              style="width: calc(50% - 65px)"
198 194
             >
199
-          </Select>
200
-        </FormItem>
201
-        <FormItem
202
-          v-if="adminInfo.userType === 2"
203
-          label="选择学校"
204
-          prop="schoolid"
205
-          style="width: 100%"
206
-        >
207
-          <Select
208
-            :transfer="true"
209
-            v-model="adminInfo.schoolid"
210
-            style="width: calc(50% - 65px)"
195
+              <Option
196
+                v-for="item in searchForm.dropList"
197
+                :value="item.regionid"
198
+                :key="item.regionid"
199
+                >{{ item.regionName }}</Option
200
+              >
201
+            </Select>
202
+          </FormItem>
203
+          <FormItem
204
+            v-if="adminInfo.atype === 3"
205
+            label="选择学校"
206
+            prop="schoolid"
207
+            style="width: 100%"
211 208
           >
212
-            <Option
213
-              v-for="item in searchForm.schoolList"
214
-              :value="item.schoolid"
215
-              :key="item.schoolid"
216
-              >{{ item.schoolName }}</Option
209
+            <Select
210
+              :transfer="true"
211
+              v-model="adminInfo.schoolid"
212
+              @on-open-change="openSchoolList"
213
+              style="width: calc(50% - 65px)"
217 214
             >
218
-          </Select>
219
-        </FormItem>
215
+              <Option
216
+                v-for="item in searchForm.schoolList"
217
+                :value="item.schoolid"
218
+                :key="item.schoolid"
219
+                >{{ item.schoolName }}</Option
220
+              >
221
+            </Select>
222
+          </FormItem>
223
+        </div>
220 224
       </Form>
221 225
       <div
222 226
         slot="footer"
@@ -227,7 +231,7 @@
227 231
         "
228 232
       >
229 233
         <div style="color: #b50000">
230
-          注:密码必须包含大小写字母和数字的组合,长度在8-32之间
234
+          注:密码必须是6-16位的大小写英文字母、数字组合
231 235
         </div>
232 236
         <div>
233 237
           <Button @click="adminInfo.show = false">取消</Button>
@@ -261,6 +265,14 @@
261 265
         <FormItem label="所属区域" style="margin-bottom: 0; width: 100%">{{
262 266
           viewInfo.regionName
263 267
         }}</FormItem>
268
+        <FormItem
269
+          label="地址"
270
+          style="margin-bottom: 0; width: calc(50% - 10px)"
271
+          >{{ viewInfo.address }}</FormItem
272
+        >
273
+        <FormItem label="描述信息" style="margin-bottom: 0; width: 100%">{{
274
+          viewInfo.comm
275
+        }}</FormItem>
264 276
       </Form>
265 277
       <div slot="footer" style="text-align: center">
266 278
         <Button @click="viewInfo.show = false">关闭</Button>
@@ -285,18 +297,10 @@ import {
285 297
 } from "@/api/admin";
286 298
 import { region_list_sel_qy } from "@/api/region";
287 299
 import { login_msg_code } from "@/api/login";
288
-import { generateRandomString } from "@/utils";
300
+import { generateRandomString, pwdCheck, reg } from "@/utils";
301
+import { school_list_rs } from "@/api/school";
289 302
 export default {
290 303
   data() {
291
-    const reg = /^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)[a-zA-Z\d]{8,32}$/;
292
-    // 密码验证
293
-    const pwdCheck = (rule, value, callback) => {
294
-      if (!reg.test(this.adminInfo.loginpwd)) {
295
-        return callback(new Error("密码格式不正确!"));
296
-      } else {
297
-        callback();
298
-      }
299
-    };
300 304
     // 重复密码验证
301 305
     const pwdAgainCheck = async (rule, value, callback) => {
302 306
       if (!reg.test(this.adminInfo.loginpwd1)) {
@@ -395,8 +399,9 @@ export default {
395 399
         msgcode: "",
396 400
         address: "",
397 401
         comm: "",
398
-        userType: 1,
402
+        atype: 2,
399 403
         enabled: 1,
404
+        schoolid: null,
400 405
         regionid: null
401 406
       },
402 407
       // 查看
@@ -406,7 +411,9 @@ export default {
406 411
         aname: "",
407 412
         loginname: "",
408 413
         phone: "",
409
-        regionName: ""
414
+        regionName: "",
415
+        address: "",
416
+        comm: ""
410 417
       },
411 418
       columns: [
412 419
         {
@@ -490,6 +497,25 @@ export default {
490 497
     this.searchList();
491 498
   },
492 499
   methods: {
500
+    regionidChange() {
501
+      this.showLoading = true;
502
+      school_list_rs({ regionid: this.adminInfo.regionid }).then((res) => {
503
+        this.showLoading = false;
504
+        if (res.code === 0) {
505
+          this.searchForm.schoolList = res.obj;
506
+        } else {
507
+          this.$Message.error(res.msg);
508
+        }
509
+      });
510
+    },
511
+    openSchoolList(val) {
512
+      //展开
513
+      if (val) {
514
+        if (!this.adminInfo.regionid) {
515
+          this.$Message.error("请选择区域!");
516
+        }
517
+      }
518
+    },
493 519
     // 获取搜索区域列表
494 520
     getSearchRegionList() {
495 521
       this.showLoading = true;
@@ -552,14 +578,15 @@ export default {
552 578
         adminid: null,
553 579
         aname: "",
554 580
         loginname: "",
555
-        loginpwd: generateRandomString(8),
581
+        loginpwd: generateRandomString(),
556 582
         loginpwd1: "",
557 583
         phone: "",
558 584
         msgcode: "",
559 585
         enabled: 1,
560 586
         address: "",
561 587
         comm: "",
562
-        userType: 1,
588
+        atype: 2,
589
+        schoolid: null,
563 590
         regionid: null
564 591
       };
565 592
     },
@@ -644,6 +671,8 @@ export default {
644 671
             phone: this.adminInfo.phone,
645 672
             msgcode: this.adminInfo.msgcode,
646 673
             enabled: this.adminInfo.enabled,
674
+            atype: this.adminInfo.atype,
675
+            schoolid: this.adminInfo.schoolid || null,
647 676
             regionid: this.adminInfo.regionid,
648 677
             address: this.adminInfo.address,
649 678
             comm: this.adminInfo.comm
@@ -653,6 +682,7 @@ export default {
653 682
             form.adminid = this.adminInfo.adminid;
654 683
             form.rversion = this.adminInfo.rversion;
655 684
           }
685
+          console.log(form);
656 686
           this.showLoading = true;
657 687
           api(form).then((data) => {
658 688
             this.showLoading = false;
@@ -668,14 +698,28 @@ export default {
668 698
     },
669 699
     // 查看
670 700
     toView(row) {
671
-      this.viewInfo = {
672
-        show: true,
673
-        enabled: row.enabled,
674
-        aname: row.aname,
675
-        loginname: row.loginname,
676
-        phone: row.phone,
677
-        regionName: row.regionName
678
-      };
701
+      this.showLoading = true;
702
+      admin_detail({
703
+        rtype: this.powerParams.rtype,
704
+        objectid: this.powerParams.objectid,
705
+        adminid: row.adminid
706
+      }).then((res) => {
707
+        this.showLoading = false;
708
+        if (res.code === 0) {
709
+          this.viewInfo = {
710
+            show: true,
711
+            enabled: res.obj.enabled,
712
+            aname: res.obj.aname,
713
+            loginname: res.obj.loginname,
714
+            phone: res.obj.phone,
715
+            regionName: res.obj.regionName,
716
+            address: res.obj.address,
717
+            comm: res.obj.comm
718
+          };
719
+        } else {
720
+          this.$Message.error(res.msg);
721
+        }
722
+      });
679 723
     },
680 724
     // 编辑
681 725
     toEdit(row) {
@@ -699,8 +743,11 @@ export default {
699 743
             phone: res.obj.phone,
700 744
             msgcode: "",
701 745
             enabled: res.obj.enabled,
746
+            atype: res.obj.atype,
702 747
             regionid: res.obj.regionid,
703
-            rversion: row.rversion
748
+            rversion: row.rversion,
749
+            address: res.obj.address,
750
+            comm: res.obj.comm
704 751
           };
705 752
         } else {
706 753
           this.$Message.error(res.msg);

+ 14
- 17
src/views/regionSection/regionManage/regionManage.vue View File

@@ -14,7 +14,12 @@
14 14
       <Table :columns="columns" :data="searchForm.list">
15 15
         <template slot-scope="{ row }" slot="actionSlot">
16 16
           <div class="action_list">
17
-            <div v-if="row.regionid != powerParams.objectid" @click="toEnter(row)">进入</div>
17
+            <div
18
+              v-if="row.regionid != powerParams.objectid"
19
+              @click="toEnter(row)"
20
+            >
21
+              进入
22
+            </div>
18 23
             <div @click="toView(row)">查看</div>
19 24
             <div @click="toEdit(row)">编辑</div>
20 25
             <div class="action_del" @click="toDel(row)">删除</div>
@@ -127,15 +132,15 @@
127 132
         </FormItem>
128 133
         <FormItem label="地址" style="width: 100%">
129 134
           <Input
130
-              v-model="regionInfo.admin.address"
131
-              placeholder="请输入地址"
135
+            v-model="regionInfo.admin.address"
136
+            placeholder="请输入地址"
132 137
           ></Input>
133 138
         </FormItem>
134 139
         <FormItem label="描述信息" style="width: 100%">
135 140
           <Input
136
-              type="textarea"
137
-              v-model="regionInfo.admin.comm"
138
-              placeholder="请输入描述信息"
141
+            type="textarea"
142
+            v-model="regionInfo.admin.comm"
143
+            placeholder="请输入描述信息"
139 144
           ></Input>
140 145
         </FormItem>
141 146
       </Form>
@@ -148,7 +153,7 @@
148 153
         "
149 154
       >
150 155
         <div style="color: #b50000">
151
-          注:密码必须包含大小写字母和数字的组合,长度在8-32之间
156
+          注:密码必须是6-16位的大小写英文字母、数字组合
152 157
         </div>
153 158
         <div>
154 159
           <Button @click="regionInfo.show = false">取消</Button>
@@ -285,7 +290,7 @@
285 290
 </template>
286 291
 
287 292
 <script>
288
-import { generateRandomString } from "@/utils";
293
+import { generateRandomString, pwdCheck, reg } from "@/utils";
289 294
 import {
290 295
   region_list_admin,
291 296
   region_delete,
@@ -298,14 +303,6 @@ import {
298 303
 import { login_msg_code } from "@/api/login";
299 304
 export default {
300 305
   data() {
301
-    const reg = /^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)[a-zA-Z\d]{8,32}$/;
302
-    // 密码验证
303
-    const pwdCheck = (rule, value, callback) => {
304
-      if (!reg.test(value)) {
305
-        return callback(new Error("密码格式不正确!"));
306
-      }
307
-      callback();
308
-    };
309 306
     // 重复密码验证
310 307
     const pwdAgainCheck = async (rule, value, callback) => {
311 308
       if (!reg.test(value)) {
@@ -731,7 +728,7 @@ export default {
731 728
         admin: {
732 729
           aname: "",
733 730
           loginname: "",
734
-          loginpwd: generateRandomString(8),
731
+          loginpwd: generateRandomString(),
735 732
           loginpwd1: "",
736 733
           phone: "",
737 734
           msgcode: "",

+ 27
- 55
src/views/regionSection/regionManage/schoolManage.vue View File

@@ -261,6 +261,19 @@
261 261
               }}
262 262
             </div>
263 263
           </FormItem>
264
+          <FormItem label="地址" style="width: 100%">
265
+            <Input
266
+              v-model="adminInfo.admin.address"
267
+              placeholder="请输入地址"
268
+            ></Input>
269
+          </FormItem>
270
+          <FormItem label="描述信息" style="width: 100%">
271
+            <Input
272
+              type="textarea"
273
+              v-model="adminInfo.admin.comm"
274
+              placeholder="请输入描述信息"
275
+            ></Input>
276
+          </FormItem>
264 277
         </div>
265 278
       </Form>
266 279
       <div
@@ -272,7 +285,9 @@
272 285
         "
273 286
       >
274 287
         <div style="color: #b50000">
275
-          注:密码必须包含大小写字母和数字的组合,长度在8-32之间。
288
+          <span v-if="adminInfo.createAdmin"
289
+            >注:密码必须是6-16位的大小写英文字母、数字组合。</span
290
+          >
276 291
         </div>
277 292
         <div>
278 293
           <Button @click="adminInfo.show = false">取消</Button>
@@ -280,37 +295,6 @@
280 295
         </div>
281 296
       </div>
282 297
     </Modal>
283
-    <!-- 查看 -->
284
-    <Modal
285
-      class="modal1"
286
-      :mask-closable="false"
287
-      v-model="viewInfo.show"
288
-      title="查看"
289
-    >
290
-      <div class="view_title">
291
-        <div>{{ viewInfo.aname }}</div>
292
-        <div v-if="viewInfo.enabled === 1" class="enabled_1">启用</div>
293
-        <div v-if="viewInfo.enabled === 2" class="enabled_2">禁用</div>
294
-      </div>
295
-      <Form :label-width="80" inline>
296
-        <FormItem
297
-          label="登录账号"
298
-          style="margin-bottom: 0; width: calc(50% - 10px)"
299
-          >{{ viewInfo.loginname }}</FormItem
300
-        >
301
-        <FormItem
302
-          label="手机号码"
303
-          style="margin-bottom: 0; width: calc(50% - 10px)"
304
-          >{{ viewInfo.phone }}</FormItem
305
-        >
306
-        <FormItem label="所属区域" style="margin-bottom: 0; width: 100%">{{
307
-          viewInfo.regionName
308
-        }}</FormItem>
309
-      </Form>
310
-      <div slot="footer" style="text-align: center">
311
-        <Button @click="viewInfo.show = false">关闭</Button>
312
-      </div>
313
-    </Modal>
314 298
     <Spin fix v-if="showLoading" style="background-color: transparent">
315 299
       <Icon type="ios-loading" size="18" class="demo-spin-icon-load"></Icon>
316 300
       <div>加载中</div>
@@ -321,7 +305,7 @@
321 305
 <script>
322 306
 import { region_list_sel_qy } from "@/api/region";
323 307
 import { login_msg_code } from "@/api/login";
324
-import { generateRandomString } from "@/utils";
308
+import { generateRandomString, pwdCheck, reg } from "@/utils";
325 309
 import {
326 310
   area_list_sel,
327 311
   school_add,
@@ -334,15 +318,6 @@ import {
334 318
 } from "@/api/school";
335 319
 export default {
336 320
   data() {
337
-    const reg = /^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)[a-zA-Z\d]{8,32}$/;
338
-    // 密码验证
339
-    const pwdCheck = (rule, value, callback) => {
340
-      if (!reg.test(this.adminInfo.admin.loginpwd)) {
341
-        return callback(new Error("密码格式不正确!"));
342
-      } else {
343
-        callback();
344
-      }
345
-    };
346 321
     // 重复密码验证
347 322
     const pwdAgainCheck = async (rule, value, callback) => {
348 323
       if (!reg.test(this.adminInfo.admin.loginpwd1)) {
@@ -389,7 +364,9 @@ export default {
389 364
           loginname: "",
390 365
           loginpwd: "",
391 366
           phone: "",
392
-          msgcode: ""
367
+          msgcode: "",
368
+          address: "",
369
+          comm: ""
393 370
         }
394 371
       },
395 372
       rules: {
@@ -429,15 +406,6 @@ export default {
429 406
           }
430 407
         ]
431 408
       },
432
-      // 查看
433
-      viewInfo: {
434
-        show: false,
435
-        enabled: "",
436
-        aname: "",
437
-        loginname: "",
438
-        phone: "",
439
-        regionName: ""
440
-      },
441 409
       columns: [
442 410
         {
443 411
           title: "序号",
@@ -647,10 +615,12 @@ export default {
647 615
         admin: {
648 616
           aname: "",
649 617
           loginname: "",
650
-          loginpwd: generateRandomString(8),
618
+          loginpwd: generateRandomString(),
651 619
           loginpwd1: "",
652 620
           phone: "",
653
-          msgcode: ""
621
+          msgcode: "",
622
+          address: "",
623
+          cpmm: ""
654 624
         }
655 625
       };
656 626
     },
@@ -749,7 +719,9 @@ export default {
749 719
               loginname: this.adminInfo.admin.loginname,
750 720
               loginpwd: this.adminInfo.admin.loginpwd,
751 721
               phone: this.adminInfo.admin.phone,
752
-              msgcode: this.adminInfo.admin.msgcode
722
+              msgcode: this.adminInfo.admin.msgcode,
723
+              address: this.adminInfo.admin.address,
724
+              comm: this.adminInfo.admin.comm
753 725
             };
754 726
           }
755 727
           this.showLoading = true;

+ 5
- 14
src/views/schoolSection/userManage/userManage.vue View File

@@ -302,7 +302,7 @@
302 302
         "
303 303
       >
304 304
         <div style="color: #b50000">
305
-          注:密码必须包含大小写字母和数字的组合,长度在8-32之间
305
+          注:密码必须是6-16位的大小写英文字母、数字组合
306 306
         </div>
307 307
         <div>
308 308
           <Button @click="addInfo.show = false">取消</Button>
@@ -333,22 +333,11 @@ import {
333 333
 } from "@/api/school";
334 334
 import { user_add, user_edit } from "@/api/school";
335 335
 import { exportToExcel } from "@/utils/exportToExcel";
336
-
336
+import { generateRandomString, pwdCheck, reg} from "@/utils";
337 337
 export default {
338 338
   data() {
339
-    const reg = /^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)[a-zA-Z\d]{8,32}$/;
340
-    // 密码验证
341
-    const pwdCheck = (rule, value, callback) => {
342
-      if (!reg.test(value)) {
343
-        return callback(new Error("密码格式不正确!"));
344
-      }
345
-      callback();
346
-    };
347 339
     // 重复密码验证
348 340
     const pwdAgainCheck = async (rule, value, callback) => {
349
-      if (!value) {
350
-        return callback(new Error("确认密码不能为空!"));
351
-      }
352 341
       if (!reg.test(value)) {
353 342
         return callback(new Error("密码格式不正确!"));
354 343
       }
@@ -417,6 +406,7 @@ export default {
417 406
         username: "",
418 407
         loginname: "",
419 408
         loginpwd: "",
409
+        loginpwd1: "",
420 410
         classid: "",
421 411
         classname: "",
422 412
         schoolid: null,
@@ -654,7 +644,8 @@ export default {
654 644
         usersex: 1,
655 645
         username: "",
656 646
         loginname: "",
657
-        loginpwd: "",
647
+        loginpwd: generateRandomString(),
648
+        loginpwd1: "",
658 649
         classid: "",
659 650
         classname: "",
660 651
         schoolid: null,

Loading…
Cancel
Save