Browse Source

密码验证优化;应用策略时间可不选;隐藏设置”启用截屏“

gzb
wangzhonglu 9 months ago
parent
commit
e3d035403c

+ 6
- 3
src/utils/index.js View File

2
 let _timezone = 8; //目标时区时间,东八区   东时区正数 西时区负数
2
 let _timezone = 8; //目标时区时间,东八区   东时区正数 西时区负数
3
 let _offset_GMT = new Date().getTimezoneOffset(); // 本地时间和格林威治的时间差,单位为分钟
3
 let _offset_GMT = new Date().getTimezoneOffset(); // 本地时间和格林威治的时间差,单位为分钟
4
 let diffTime = _offset_GMT * 60 * 1000 + _timezone * 60 * 60 * 1000; //0
4
 let diffTime = _offset_GMT * 60 * 1000 + _timezone * 60 * 60 * 1000; //0
5
-
5
+/**
6
+ * 字符串是6-16位的大小写英文字母、数字组合。
7
+ */
6
 export const reg = /^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)[a-zA-Z\d]{6,16}$/;
8
 export const reg = /^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)[a-zA-Z\d]{6,16}$/;
7
-// 密码验证
9
+/**
10
+ * 字符串是6-16位的大小写英文字母、数字组合。
11
+ */
8
 export const pwdCheck = (rule, value, callback) => {
12
 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)) {
13
   if (!reg.test(value)) {
11
     return callback(new Error("密码格式不正确!"));
14
     return callback(new Error("密码格式不正确!"));
12
   } else {
15
   } else {

+ 1
- 4
src/views/platformSection/regionManage/adminManage.vue View File

547
             this.adminInfo.adminid &&
547
             this.adminInfo.adminid &&
548
             (this.adminInfo.loginpwd || this.adminInfo.loginpwd1)
548
             (this.adminInfo.loginpwd || this.adminInfo.loginpwd1)
549
           ) {
549
           ) {
550
-            const reg = /^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)[a-zA-Z\d]{8,32}$/;
551
             if (!reg.test(this.adminInfo.loginpwd)) {
550
             if (!reg.test(this.adminInfo.loginpwd)) {
552
-              this.$Message.error(
553
-                "密码必须包含大小写字母和数字的组合,长度在8-32之间。"
554
-              );
551
+              this.$Message.error("密码格式不正确。");
555
               return;
552
               return;
556
             }
553
             }
557
             if (this.adminInfo.loginpwd != this.adminInfo.loginpwd1) {
554
             if (this.adminInfo.loginpwd != this.adminInfo.loginpwd1) {

+ 14
- 6
src/views/platformSection/regionManage/regionManage.vue View File

82
             placeholder="请输入登录账号"
82
             placeholder="请输入登录账号"
83
           ></Input>
83
           ></Input>
84
         </FormItem>
84
         </FormItem>
85
-        <FormItem label="密码" prop="loginpwd" style="width: calc(50% - 10px)">
85
+        <FormItem
86
+          label="密码"
87
+          prop="admin.loginpwd"
88
+          style="width: calc(50% - 10px)"
89
+        >
86
           <Input
90
           <Input
87
             v-model="regionInfo.admin.loginpwd"
91
             v-model="regionInfo.admin.loginpwd"
88
             placeholder="请输入密码"
92
             placeholder="请输入密码"
90
         </FormItem>
94
         </FormItem>
91
         <FormItem
95
         <FormItem
92
           label="确认密码"
96
           label="确认密码"
93
-          prop="loginpwd1"
97
+          prop="admin.loginpwd1"
94
           style="width: calc(50% - 10px)"
98
           style="width: calc(50% - 10px)"
95
         >
99
         >
96
           <Input
100
           <Input
98
             placeholder="请输入确认密码"
102
             placeholder="请输入确认密码"
99
           ></Input>
103
           ></Input>
100
         </FormItem>
104
         </FormItem>
101
-        <FormItem label="手机号码" prop="phone" style="width: calc(50% - 10px)">
105
+        <FormItem
106
+          label="手机号码"
107
+          prop="admin.phone"
108
+          style="width: calc(50% - 10px)"
109
+        >
102
           <Input
110
           <Input
103
             v-model="regionInfo.admin.phone"
111
             v-model="regionInfo.admin.phone"
104
             placeholder="请输入手机号码"
112
             placeholder="请输入手机号码"
119
             }}
127
             }}
120
           </div>
128
           </div>
121
         </FormItem>
129
         </FormItem>
122
-        <FormItem label="地址" prop="address" style="width: 100%">
130
+        <FormItem label="地址" prop="admin.address" style="width: 100%">
123
           <Input
131
           <Input
124
             v-model="regionInfo.admin.address"
132
             v-model="regionInfo.admin.address"
125
             placeholder="请输入地址"
133
             placeholder="请输入地址"
126
           ></Input>
134
           ></Input>
127
         </FormItem>
135
         </FormItem>
128
-        <FormItem label="描述信息" prop="comm" style="width: 100%">
136
+        <FormItem label="描述信息" prop="admin.comm" style="width: 100%">
129
           <Input
137
           <Input
130
             type="textarea"
138
             type="textarea"
131
             v-model="regionInfo.admin.comm"
139
             v-model="regionInfo.admin.comm"
351
             trigger: "blur"
359
             trigger: "blur"
352
           }
360
           }
353
         ],
361
         ],
354
-        loginpwd: [
362
+        "admin.loginpwd": [
355
           {
363
           {
356
             required: true,
364
             required: true,
357
             validator: pwdCheck,
365
             validator: pwdCheck,

+ 0
- 1
src/views/regionSection/regionManage/adminManage.vue View File

637
             this.adminInfo.adminid &&
637
             this.adminInfo.adminid &&
638
             (this.adminInfo.loginpwd || this.adminInfo.loginpwd1)
638
             (this.adminInfo.loginpwd || this.adminInfo.loginpwd1)
639
           ) {
639
           ) {
640
-            const reg = /^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)[a-zA-Z\d]{8,32}$/;
641
             if (!reg.test(this.adminInfo.loginpwd)) {
640
             if (!reg.test(this.adminInfo.loginpwd)) {
642
               this.$Message.error("密码格式不正确!");
641
               this.$Message.error("密码格式不正确!");
643
               return;
642
               return;

+ 4
- 4
src/views/schoolSection/applicationStrategy/appStrategyManageEdit.vue View File

319
     },
319
     },
320
     toAddStrategySet() {
320
     toAddStrategySet() {
321
       let _tempStrategyInfo = JSON.parse(JSON.stringify(this.tempStrategyInfo));
321
       let _tempStrategyInfo = JSON.parse(JSON.stringify(this.tempStrategyInfo));
322
-      if (_tempStrategyInfo.times.length === 0) {
323
-        this.$Message.error("请选择时间范围");
324
-        return;
325
-      }
322
+      // if (_tempStrategyInfo.times.length === 0) {
323
+      //   this.$Message.error("请选择时间范围");
324
+      //   return;
325
+      // }
326
       if (_tempStrategyInfo.apps.length === 0) {
326
       if (_tempStrategyInfo.apps.length === 0) {
327
         this.$Message.error("请选择应用");
327
         this.$Message.error("请选择应用");
328
         return;
328
         return;

+ 4
- 4
src/views/schoolSection/applicationStrategy/appStrategyTemplateAdd.vue View File

297
     },
297
     },
298
     toAddStrategySet() {
298
     toAddStrategySet() {
299
       let _tempStrategyInfo = JSON.parse(JSON.stringify(this.tempStrategyInfo));
299
       let _tempStrategyInfo = JSON.parse(JSON.stringify(this.tempStrategyInfo));
300
-      if (_tempStrategyInfo.times.length === 0) {
301
-        this.$Message.error("请选择时间范围");
302
-        return;
303
-      }
300
+      // if (_tempStrategyInfo.times.length === 0) {
301
+      //   this.$Message.error("请选择时间范围");
302
+      //   return;
303
+      // }
304
       if (_tempStrategyInfo.apps.length === 0) {
304
       if (_tempStrategyInfo.apps.length === 0) {
305
         this.$Message.error("请选择应用");
305
         this.$Message.error("请选择应用");
306
         return;
306
         return;

+ 4
- 4
src/views/schoolSection/applicationStrategy/appStrategyTemplateEdit.vue View File

320
     },
320
     },
321
     toAddStrategySet() {
321
     toAddStrategySet() {
322
       let _tempStrategyInfo = JSON.parse(JSON.stringify(this.tempStrategyInfo));
322
       let _tempStrategyInfo = JSON.parse(JSON.stringify(this.tempStrategyInfo));
323
-      if (_tempStrategyInfo.times.length === 0) {
324
-        this.$Message.error("请选择时间范围");
325
-        return;
326
-      }
323
+      // if (_tempStrategyInfo.times.length === 0) {
324
+      //   this.$Message.error("请选择时间范围");
325
+      //   return;
326
+      // }
327
       if (_tempStrategyInfo.apps.length === 0) {
327
       if (_tempStrategyInfo.apps.length === 0) {
328
         this.$Message.error("请选择应用");
328
         this.$Message.error("请选择应用");
329
         return;
329
         return;

+ 5
- 5
src/views/schoolSection/setting/deviceSetting.vue View File

115
             <Radio :label="0">否</Radio>
115
             <Radio :label="0">否</Radio>
116
           </RadioGroup>
116
           </RadioGroup>
117
         </FormItem> -->
117
         </FormItem> -->
118
-        <FormItem label="启用截屏">
118
+        <!-- <FormItem label="启用截屏">
119
           <RadioGroup v-model="menuInfo.setDetail.screenshots">
119
           <RadioGroup v-model="menuInfo.setDetail.screenshots">
120
             <Radio :label="1">是</Radio>
120
             <Radio :label="1">是</Radio>
121
             <Radio :label="0">否</Radio>
121
             <Radio :label="0">否</Radio>
122
           </RadioGroup>
122
           </RadioGroup>
123
-        </FormItem>
123
+        </FormItem> -->
124
         <!-- <FormItem label="启用客户端管理员">
124
         <!-- <FormItem label="启用客户端管理员">
125
           <RadioGroup v-model="menuInfo.setDetail.clientAdmin">
125
           <RadioGroup v-model="menuInfo.setDetail.clientAdmin">
126
             <Radio :label="1">是</Radio>
126
             <Radio :label="1">是</Radio>
267
           accelerate: 0,
267
           accelerate: 0,
268
           // gesturePwd: 0,
268
           // gesturePwd: 0,
269
           // wifiAdvanced: 0,
269
           // wifiAdvanced: 0,
270
-          screenshots: 0,
270
+          // screenshots: 0,
271
           // clientAdmin: 0,
271
           // clientAdmin: 0,
272
           rotateSetting: 0,
272
           rotateSetting: 0,
273
           gallery: 0,
273
           gallery: 0,
385
               accelerate: 0,
385
               accelerate: 0,
386
               // gesturePwd: 0,
386
               // gesturePwd: 0,
387
               // wifiAdvanced: 0,
387
               // wifiAdvanced: 0,
388
-              screenshots: 0,
388
+              // screenshots: 0,
389
               // clientAdmin: 0,
389
               // clientAdmin: 0,
390
               rotateSetting: 0,
390
               rotateSetting: 0,
391
               gallery: 0,
391
               gallery: 0,
460
         accelerate: this.menuInfo.setDetail.accelerate,
460
         accelerate: this.menuInfo.setDetail.accelerate,
461
         // gesturePwd: this.menuInfo.setDetail.gesturePwd,
461
         // gesturePwd: this.menuInfo.setDetail.gesturePwd,
462
         // wifiAdvanced: this.menuInfo.setDetail.wifiAdvanced,
462
         // wifiAdvanced: this.menuInfo.setDetail.wifiAdvanced,
463
-        screenshots: this.menuInfo.setDetail.screenshots,
463
+        // screenshots: this.menuInfo.setDetail.screenshots,
464
         // clientAdmin: this.menuInfo.setDetail.clientAdmin,
464
         // clientAdmin: this.menuInfo.setDetail.clientAdmin,
465
         rotateSetting: this.menuInfo.setDetail.rotateSetting,
465
         rotateSetting: this.menuInfo.setDetail.rotateSetting,
466
         gallery: this.menuInfo.setDetail.gallery,
466
         gallery: this.menuInfo.setDetail.gallery,

Loading…
Cancel
Save