cloud-web-corejs 1.0.54-dev.358 → 1.0.54-dev.359

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/src/index.js CHANGED
@@ -24,19 +24,20 @@ Vue.component('BaseKeepAlive', BaseKeepAlive)
24
24
  import VXETable from 'vxe-table';
25
25
  import 'vxe-table/lib/style.css';
26
26
 
27
- /* // 引入扩展插件
27
+ // 引入扩展插件
28
28
  import '@/components/table/plugins/extend-cell-area/vxe-table-extend-cell-area.es6.min.js'
29
29
  import '@/components/table/plugins/extend-cell-area/vxe-table-extend-cell-area.min.css'
30
30
 
31
31
  // 设置授权信息
32
32
  VXETable.setup({
33
33
  // showAuthLog: true, // 是否在控制台显示授权信息,专业版支持关闭
34
- authId: 'gbeumewkoyt2rhf9', // 获取授权后在官网登录后进入“用户中心”查看
34
+ // authId: 'gbeumewkoyt2rhf9', // 获取授权后在官网登录后进入“用户中心”查看
35
+ authId: 'gbeumewkoyt2rhft', // 获取授权后在官网登录后进入“用户中心”查看
35
36
  // onAuth (e) {
36
37
  // // 打印授权状态
37
38
  // console.log(e)
38
39
  // }
39
- }) */
40
+ })
40
41
 
41
42
 
42
43
 
@@ -40,51 +40,58 @@
40
40
  clearable
41
41
  />
42
42
  </el-form-item>
43
+ <el-form-item label-width="0" style="padding: 5px">
44
+ <div class="tips_1" style="white-space: pre-wrap; line-height: 20px">
45
+ {{ $t1(tip) }}
46
+ </div>
47
+ </el-form-item>
43
48
  </el-form>
44
49
  </div>
45
50
  <span slot="footer" class="dialog-footer">
46
- <el-button type="primary" plain class="button-sty" @click="dialogClose" v-if="!modifyMust">
47
- <i class="el-icon-close el-icon"></i>
48
- {{ $t1('取 消') }}
49
- </el-button>
50
- <el-button type="primary" @click="saveData" class="button-sty">
51
- <i class="el-icon-check el-icon"></i>
52
- {{ $t1('确 定') }}
53
- </el-button>
54
- </span>
51
+ <el-button
52
+ type="primary"
53
+ plain
54
+ class="button-sty"
55
+ @click="dialogClose"
56
+ v-if="!modifyMust"
57
+ >
58
+ <i class="el-icon-close el-icon"></i>
59
+ {{ $t1("取 消") }}
60
+ </el-button>
61
+ <el-button type="primary" @click="saveData" class="button-sty">
62
+ <i class="el-icon-check el-icon"></i>
63
+ {{ $t1("确 定") }}
64
+ </el-button>
65
+ </span>
55
66
  </el-dialog>
56
67
  </template>
57
68
 
58
69
  <script>
59
- import {getParameterVauleByCode} from "@base/api/user";
70
+ import { getParameterVauleByCode } from "@base/api/user";
60
71
 
61
72
  export default {
62
73
  components: {},
63
- created() {
64
-
65
- },
66
- mounted() {
67
-
68
- },
74
+ created() {},
75
+ mounted() {},
69
76
  data() {
70
77
  var validatePass = (rule, value, callback) => {
71
78
  const isPassRequired = true;
72
- if (isPassRequired && (value == '' || value == undefined)) {
73
- callback(new Error(this.$t1('密码不能为空')));
79
+ if (isPassRequired && (value == "" || value == undefined)) {
80
+ callback(new Error(this.$t1("密码不能为空")));
74
81
  } else {
75
82
  callback();
76
83
  }
77
- this.$refs.editForm.validateField('rePassword');
84
+ this.$refs.editForm.validateField("rePassword");
78
85
  };
79
86
  var validatePass2 = (rule, value, callback) => {
80
87
  const isPassRequired = true;
81
- const rePassword = value != undefined ? value : '';
82
- const password = this.formData.password != undefined ? this.formData.password : '';
88
+ const rePassword = value != undefined ? value : "";
89
+ const password = this.formData.password != undefined ? this.formData.password : "";
83
90
 
84
- if (isPassRequired && rePassword == '') {
85
- callback(new Error(this.$t1('确认密码不能为空')));
91
+ if (isPassRequired && rePassword == "") {
92
+ callback(new Error(this.$t1("确认密码不能为空")));
86
93
  } else if (rePassword != password) {
87
- callback(new Error(this.$t1('两次输入密码不一致!')));
94
+ callback(new Error(this.$t1("两次输入密码不一致!")));
88
95
  } else {
89
96
  callback();
90
97
  }
@@ -94,9 +101,13 @@ export default {
94
101
  falseValue: false,
95
102
  modifyMust: false,
96
103
  user: {},
97
- formData: {password: null, rePassword: null},
98
- passRules: [{validator: validatePass, trigger: 'blur', required: true}],
99
- pass2Rules: [{validator: validatePass2, trigger: 'blur', required: true}]
104
+ formData: { password: null, rePassword: null },
105
+ passRules: [{ validator: validatePass, trigger: "blur", required: true }],
106
+ pass2Rules: [{ validator: validatePass2, trigger: "blur", required: true }],
107
+ tip: `密码规则:
108
+ 1、密码必须是8~20位,包含英文大写、英文小写、数字、特殊字符中的3种组合,字符例如:!@#$%^&0,不能包含空格和中文字符;
109
+ 2、密码有效期为90天,且不允许与前3次的密码相同
110
+ 3、密码不允许包含登录账号、hisense、admin、连续字母、连续键盘键等弱密码信息,例如:qwer1234!@、admin1234@#等`,
100
111
  };
101
112
  },
102
113
  methods: {
@@ -105,33 +116,33 @@ export default {
105
116
  url: USER_PREFIX + `/user/currentUser`,
106
117
  method: `post`,
107
118
  data: {
108
- id: this.dataId
119
+ id: this.dataId,
109
120
  },
110
- success: res => {
121
+ success: (res) => {
111
122
  var user = res.objx || {};
112
123
  this.user = res.objx || {};
113
- }
124
+ },
114
125
  });
115
126
  },
116
127
  saveData() {
117
- this.$refs.editForm.validate(valid => {
128
+ this.$refs.editForm.validate((valid) => {
118
129
  if (valid) {
119
- this.$baseConfirm(this.$t1('您确定要修改密码吗?')).then(() => {
120
- let resData = {...this.user, ...this.formData}
121
- var url = USER_PREFIX + '/user/updateUserInfo';
130
+ this.$baseConfirm(this.$t1("您确定要修改密码吗?")).then(() => {
131
+ let resData = { ...this.user, ...this.formData };
132
+ var url = USER_PREFIX + "/user/updateUserInfo";
122
133
  this.$http({
123
134
  url: url,
124
135
  method: `post`,
125
136
  data: resData,
126
137
  isLoading: true,
127
- success: res => {
138
+ success: (res) => {
128
139
  this.$message({
129
140
  message: res.content,
130
- type: 'success',
131
- duration: 2000
141
+ type: "success",
142
+ duration: 2000,
132
143
  });
133
144
  this.dialogClose();
134
- }
145
+ },
135
146
  });
136
147
  });
137
148
  } else {
@@ -139,17 +150,17 @@ export default {
139
150
  let rePassword = this.formData.rePassword;
140
151
  if (!password || !rePassword) {
141
152
  this.$message({
142
- message: this.$t1('密码/确认密码不能为空'),
143
- type: 'error',
144
- duration: 2000
153
+ message: this.$t1("密码/确认密码不能为空"),
154
+ type: "error",
155
+ duration: 2000,
145
156
  });
146
- return
157
+ return;
147
158
  }
148
159
  if (password !== rePassword) {
149
160
  this.$message({
150
- message: this.$t1('两次输入密码不一致'),
151
- type: 'error',
152
- duration: 2000
161
+ message: this.$t1("两次输入密码不一致"),
162
+ type: "error",
163
+ duration: 2000,
153
164
  });
154
165
  }
155
166
  }
@@ -164,15 +175,15 @@ export default {
164
175
  },
165
176
  init() {
166
177
  getParameterVauleByCode({
167
- data: {code: "checkPasswordModify"},
178
+ data: { code: "checkPasswordModify" },
168
179
  success: (res0) => {
169
180
  if (res0.objx && res0.objx.value) {
170
181
  this.$http({
171
182
  url: USER_PREFIX + `/user/checkPasswordModifyDate`,
172
183
  method: `post`,
173
184
  data: {},
174
- success: res => {
175
- let flag = 0;//0 不提示;1 提示但不强制修改,即弹框它可以点x关掉;2 提示且强制修改,即他不能关掉这个弹框,要输入密码,点确定才能关掉
185
+ success: (res) => {
186
+ let flag = 0; //0 不提示;1 提示但不强制修改,即弹框它可以点x关掉;2 提示且强制修改,即他不能关掉这个弹框,要输入密码,点确定才能关掉
176
187
  if (res.objx) {
177
188
  flag = res.objx.flag || 0;
178
189
  }
@@ -182,12 +193,12 @@ export default {
182
193
  this.modifyMust = flag == 2;
183
194
  this.showDialog = true;
184
195
  }
185
- }
196
+ },
186
197
  });
187
198
  }
188
- }
189
- })
190
- }
191
- }
199
+ },
200
+ });
201
+ },
202
+ },
192
203
  };
193
204
  </script>