|
@@ -712,30 +712,58 @@ export default {
|
|
|
}).catch((e) => {
|
|
|
})
|
|
|
} else {
|
|
|
- let sysTime
|
|
|
- let lk
|
|
|
- await this.$axios.get('/sysPolicyController/getLicenseKey').then((res) => {
|
|
|
- sysTime = res.data.sysTime
|
|
|
- lk = res.data.lk
|
|
|
- }).catch((error) => {
|
|
|
- })
|
|
|
-
|
|
|
- this.form.sysTime = sysTime
|
|
|
- this.form.lk = lk
|
|
|
- await this.$axios.post('/sysUserController/addUser', this.form).then((res) => {
|
|
|
- if (res.code == 0) {
|
|
|
- this.$message.success(res.data)
|
|
|
- this.open = false;
|
|
|
- this.reset();
|
|
|
- this.getList();
|
|
|
- }
|
|
|
- if (res.code == 1) {
|
|
|
- this.$message.error(res.data)
|
|
|
+ this.$prompt('请输入登录密码', '鉴别操作', {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ inputType: 'text',
|
|
|
+ customClass:'no-autofill-pwd',
|
|
|
+ inputValidator: (val) => {
|
|
|
+ if (val === null || val.length < 1 || val.length > 20) {
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ },
|
|
|
+ inputErrorMessage: '不能为空,最多可录入20个字符',
|
|
|
+ beforeClose(action, instance, done) {
|
|
|
+ if (action === "confirm") {
|
|
|
+ instance.$refs["confirm"].$el.onclick = (function (e) {
|
|
|
+ e = e || window.event;
|
|
|
+ if (e.detail != 0) {
|
|
|
+ done();
|
|
|
+ }
|
|
|
+ })();
|
|
|
+ } else {
|
|
|
+ done();
|
|
|
+ }
|
|
|
}
|
|
|
- this.loading = false
|
|
|
- }).catch((error) => {
|
|
|
- // this.$message.error(error)
|
|
|
- this.loading = false
|
|
|
+ }).then(async ({value}) => {
|
|
|
+ let sysTime
|
|
|
+ let lk
|
|
|
+ await this.$axios.get('/sysPolicyController/getLicenseKey').then((res) => {
|
|
|
+ sysTime = res.data.sysTime
|
|
|
+ lk = res.data.lk
|
|
|
+ }).catch((error) => {
|
|
|
+ })
|
|
|
+ this.form.sysTime = sysTime
|
|
|
+ this.form.lk = lk
|
|
|
+ this.form.againPwd = value
|
|
|
+
|
|
|
+ // 更新操作
|
|
|
+ await this.$axios.post('/sysUserController/addUser', this.form).then((res) => {
|
|
|
+ if (res.code == 0) {
|
|
|
+ this.$message.success(res.data)
|
|
|
+ this.open = false;
|
|
|
+ this.reset();
|
|
|
+ this.getList();
|
|
|
+ }
|
|
|
+ if (res.code == 1) {
|
|
|
+ this.$message.error(res.data)
|
|
|
+ }
|
|
|
+ this.loading = false
|
|
|
+ }).catch((error) => {
|
|
|
+ // this.$message.error(error)
|
|
|
+ this.loading = false
|
|
|
+ })
|
|
|
+ }).catch((e) => {
|
|
|
})
|
|
|
}
|
|
|
}
|
|
@@ -1256,42 +1284,68 @@ export default {
|
|
|
|
|
|
/** 角色分配提交按钮 */
|
|
|
jssubmitForm: debounce(async function () {
|
|
|
+ this.$prompt('请输入登录密码', '鉴别操作', {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ inputType: 'text',
|
|
|
+ customClass:'no-autofill-pwd',
|
|
|
+ inputValidator: (val) => {
|
|
|
+ if (val === null || val.length < 1 || val.length > 20) {
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ },
|
|
|
+ inputErrorMessage: '不能为空,最多可录入20个字符',
|
|
|
+ beforeClose(action, instance, done) {
|
|
|
+ if (action === "confirm") {
|
|
|
+ instance.$refs["confirm"].$el.onclick = (function (e) {
|
|
|
+ e = e || window.event;
|
|
|
+ if (e.detail != 0) {
|
|
|
+ done();
|
|
|
+ }
|
|
|
+ })();
|
|
|
+ } else {
|
|
|
+ done();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }).then(async ({value}) => {
|
|
|
+ let sysTime
|
|
|
+ let lk
|
|
|
+ await this.$axios.get('/sysPolicyController/getLicenseKey').then((res) => {
|
|
|
+ sysTime = res.data.sysTime
|
|
|
+ lk = res.data.lk
|
|
|
+ }).catch((error) => {
|
|
|
+ })
|
|
|
|
|
|
- let sysTime
|
|
|
- let lk
|
|
|
- await this.$axios.get('/sysPolicyController/getLicenseKey').then((res) => {
|
|
|
- sysTime = res.data.sysTime
|
|
|
- lk = res.data.lk
|
|
|
- }).catch((error) => {
|
|
|
- })
|
|
|
-
|
|
|
- // 提交后台角色分配
|
|
|
- const param = {
|
|
|
- userId: this.jsuserid,
|
|
|
- roleId: this.userRoleId,
|
|
|
- sysTime: sysTime,
|
|
|
- lk: lk
|
|
|
- }
|
|
|
- await this.$axios.post('/sysUserController/authRole', param).then((res) => {
|
|
|
- if (res.code == 0) {
|
|
|
- this.$message({
|
|
|
- type: 'success',
|
|
|
- message: res.data
|
|
|
- });
|
|
|
- this.jscancel()
|
|
|
- this.getList()
|
|
|
- } else {
|
|
|
+ // 提交后台角色分配
|
|
|
+ const param = {
|
|
|
+ userId: this.jsuserid,
|
|
|
+ roleId: this.userRoleId,
|
|
|
+ sysTime: sysTime,
|
|
|
+ lk: lk,
|
|
|
+ againPwd: value
|
|
|
+ }
|
|
|
+ await this.$axios.post('/sysUserController/authRole', param).then((res) => {
|
|
|
+ if (res.code == 0) {
|
|
|
+ this.$message({
|
|
|
+ type: 'success',
|
|
|
+ message: res.data
|
|
|
+ });
|
|
|
+ this.jscancel()
|
|
|
+ this.getList()
|
|
|
+ } else {
|
|
|
+ this.$message({
|
|
|
+ type: 'error',
|
|
|
+ message: res.data
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }).catch((error) => {
|
|
|
this.$message({
|
|
|
type: 'error',
|
|
|
- message: res.data
|
|
|
+ message: '角色分配失败!'
|
|
|
});
|
|
|
- }
|
|
|
- }).catch((error) => {
|
|
|
- this.$message({
|
|
|
- type: 'error',
|
|
|
- message: '角色分配失败!'
|
|
|
- });
|
|
|
- this.loading = false
|
|
|
+ this.loading = false
|
|
|
+ })
|
|
|
+ }).catch((e) => {
|
|
|
})
|
|
|
}, 1000)
|
|
|
}
|