diff --git a/package.json b/package.json index 74cb352..35d0449 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "eladmin-web", - "version": "2.6.0", + "version": "2.7.0", "description": "ELADMIN 前端源码", "author": "Zheng Jie", "license": "Apache-2.0", diff --git a/src/api/system/user.js b/src/api/system/user.js index 6cd91a5..c14df11 100644 --- a/src/api/system/user.js +++ b/src/api/system/user.js @@ -45,6 +45,14 @@ export function updatePass(user) { }) } +export function resetPwd(ids) { + return request({ + url: 'api/users/resetPwd', + method: 'put', + data: ids + }) +} + export function updateEmail(form) { const data = { password: encrypt(form.pass), @@ -57,5 +65,5 @@ export function updateEmail(form) { }) } -export default { add, edit, del } +export default { add, edit, del, resetPwd } diff --git a/src/components/WangEditor/index.vue b/src/components/WangEditor/index.vue index 994a7b5..9da6b8b 100644 --- a/src/components/WangEditor/index.vue +++ b/src/components/WangEditor/index.vue @@ -25,17 +25,17 @@ export default { name: 'WangEditor', components: { Toolbar, Editor }, props: { - value: [String], + value: { + type: String, + required: false, + default: '' + }, editorHeight: { - type: Number + type: Number, + required: false, + default: 420 } }, - computed: { - ...mapGetters([ - 'imagesUploadApi', - 'baseApi' - ]) - }, data() { const _this = this return { @@ -55,6 +55,12 @@ export default { } } }}, + computed: { + ...mapGetters([ + 'imagesUploadApi', + 'baseApi' + ]) + }, editMode: 'simple', editor: null, editValue: null diff --git a/src/views/mnt/app/index.vue b/src/views/mnt/app/index.vue index 62739b7..ddb8fb8 100644 --- a/src/views/mnt/app/index.vue +++ b/src/views/mnt/app/index.vue @@ -22,7 +22,7 @@ - + diff --git a/src/views/mnt/database/index.vue b/src/views/mnt/database/index.vue index 6301f3a..03d44a6 100644 --- a/src/views/mnt/database/index.vue +++ b/src/views/mnt/database/index.vue @@ -24,7 +24,7 @@ - + diff --git a/src/views/mnt/deploy/index.vue b/src/views/mnt/deploy/index.vue index 3e46a6a..e2ab8a7 100644 --- a/src/views/mnt/deploy/index.vue +++ b/src/views/mnt/deploy/index.vue @@ -64,7 +64,7 @@ - + diff --git a/src/views/mnt/server/index.vue b/src/views/mnt/server/index.vue index 62468d9..7cb6a95 100644 --- a/src/views/mnt/server/index.vue +++ b/src/views/mnt/server/index.vue @@ -11,7 +11,7 @@ - + diff --git a/src/views/system/dept/index.vue b/src/views/system/dept/index.vue index af27cec..d02b846 100644 --- a/src/views/system/dept/index.vue +++ b/src/views/system/dept/index.vue @@ -14,7 +14,7 @@ - + diff --git a/src/views/system/menu/index.vue b/src/views/system/menu/index.vue index c33ee9c..e4800e1 100644 --- a/src/views/system/menu/index.vue +++ b/src/views/system/menu/index.vue @@ -11,7 +11,7 @@ - + diff --git a/src/views/system/role/index.vue b/src/views/system/role/index.vue index f3ac81d..bea269d 100644 --- a/src/views/system/role/index.vue +++ b/src/views/system/role/index.vue @@ -11,7 +11,7 @@ - + diff --git a/src/views/system/timing/index.vue b/src/views/system/timing/index.vue index 17646c2..bb3bf77 100644 --- a/src/views/system/timing/index.vue +++ b/src/views/system/timing/index.vue @@ -22,7 +22,7 @@ - + diff --git a/src/views/system/user/index.vue b/src/views/system/user/index.vue index b180c39..60233d7 100644 --- a/src/views/system/user/index.vue +++ b/src/views/system/user/index.vue @@ -57,10 +57,22 @@ - + + 重置密码 + + - + @@ -471,6 +483,23 @@ export default { }, checkboxT(row, rowIndex) { return row.id !== this.user.id + }, + resetPwd(datas) { + this.$confirm(`你选中了 ${datas.length} 位用户,确认重置用户的密码吗?`, '提示', { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning' + }).then(() => { + const ids = [] + datas.forEach(val => { + ids.push(val.id) + }) + console.log(ids) + crudUser.resetPwd(ids).then(() => { + this.crud.notify('重置成功, 用户新密码:123456', CRUD.NOTIFICATION_TYPE.SUCCESS) + }).catch(() => {}) + }).catch(() => { + }) } } } diff --git a/src/views/tools/storage/local/index.vue b/src/views/tools/storage/local/index.vue index 779516c..2270924 100644 --- a/src/views/tools/storage/local/index.vue +++ b/src/views/tools/storage/local/index.vue @@ -23,7 +23,7 @@ - +