Merge branch 'master' into deploy

This commit is contained in:
Zheng Jie
2023-07-06 14:30:41 +08:00
13 changed files with 64 additions and 21 deletions

View File

@@ -1,6 +1,6 @@
{
"name": "eladmin-web",
"version": "2.6.0",
"version": "2.7.0",
"description": "ELADMIN 前端源码",
"author": "Zheng Jie",
"license": "Apache-2.0",

View File

@@ -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 }

View File

@@ -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

View File

@@ -22,7 +22,7 @@
</crudOperation>
</div>
<!--表单组件-->
<el-dialog append-to-body :close-on-click-modal="false" :before-close="crud.cancelCU" :visible="crud.status.cu" :title="crud.status.title" width="800px">
<el-dialog append-to-body :close-on-click-modal="false" :before-close="crud.cancelCU" :visible.sync="crud.status.cu > 0" :title="crud.status.title" width="800px">
<el-form ref="form" :model="form" :rules="rules" size="small" label-width="100px">
<el-form-item label="应用名称" prop="name">
<el-input v-model="form.name" style="width: 670px" placeholder="部署后的文件或者目录名称用于备份" />

View File

@@ -24,7 +24,7 @@
</div>
<!--表单组件-->
<eForm ref="execute" :database-info="currentRow" />
<el-dialog append-to-body :close-on-click-modal="false" :before-close="crud.cancelCU" :visible="crud.status.cu" :title="crud.status.title" width="530px">
<el-dialog append-to-body :close-on-click-modal="false" :before-close="crud.cancelCU" :visible.sync="crud.status.cu > 0" :title="crud.status.title" width="530px">
<el-form ref="form" :model="form" :rules="rules" size="small" label-width="100px">
<el-form-item label="连接名称" prop="name">
<el-input v-model="form.name" style="width: 370px" />

View File

@@ -64,7 +64,7 @@
</crudOperation>
</div>
<!--表单组件-->
<el-dialog append-to-body :close-on-click-modal="false" :before-close="crud.cancelCU" :visible="crud.status.cu" :title="crud.status.title" width="500px">
<el-dialog append-to-body :close-on-click-modal="false" :before-close="crud.cancelCU" :visible.sync="crud.status.cu > 0" :title="crud.status.title" width="500px">
<el-form ref="form" :model="form" :rules="rules" size="small" label-width="80px">
<el-form-item label="应用" prop="app.id">
<el-select v-model.number="form.app.id" placeholder="请选择" style="width: 370px">

View File

@@ -11,7 +11,7 @@
<crudOperation :permission="permission" />
</div>
<!--表单组件-->
<el-dialog append-to-body :close-on-click-modal="false" :before-close="crud.cancelCU" :visible="crud.status.cu" :title="crud.status.title" width="470px">
<el-dialog append-to-body :close-on-click-modal="false" :before-close="crud.cancelCU" :visible.sync="crud.status.cu > 0" :title="crud.status.title" width="470px">
<el-form ref="form" :model="form" :rules="rules" size="small" label-width="55px">
<el-form-item label="名称" prop="name">
<el-input v-model="form.name" style="width: 370px" />

View File

@@ -14,7 +14,7 @@
<crudOperation :permission="permission" />
</div>
<!--表单组件-->
<el-dialog append-to-body :close-on-click-modal="false" :before-close="crud.cancelCU" :visible="crud.status.cu" :title="crud.status.title" width="500px">
<el-dialog append-to-body :close-on-click-modal="false" :before-close="crud.cancelCU" :visible.sync="crud.status.cu > 0" :title="crud.status.title" width="500px">
<el-form ref="form" inline :model="form" :rules="rules" size="small" label-width="80px">
<el-form-item label="部门名称" prop="name">
<el-input v-model="form.name" style="width: 370px;" />

View File

@@ -11,7 +11,7 @@
<crudOperation :permission="permission" />
</div>
<!--表单渲染-->
<el-dialog append-to-body :close-on-click-modal="false" :before-close="crud.cancelCU" :visible="crud.status.cu" :title="crud.status.title" width="580px">
<el-dialog append-to-body :close-on-click-modal="false" :before-close="crud.cancelCU" :visible.sync="crud.status.cu > 0" :title="crud.status.title" width="580px">
<el-form ref="form" :inline="true" :model="form" :rules="rules" size="small" label-width="80px">
<el-form-item label="菜单类型" prop="type">
<el-radio-group v-model="form.type" size="mini" style="width: 178px">

View File

@@ -11,7 +11,7 @@
<crudOperation :permission="permission" />
</div>
<!-- 表单渲染 -->
<el-dialog append-to-body :close-on-click-modal="false" :before-close="crud.cancelCU" :visible="crud.status.cu" :title="crud.status.title" width="520px">
<el-dialog append-to-body :close-on-click-modal="false" :before-close="crud.cancelCU" :visible.sync="crud.status.cu > 0" :title="crud.status.title" width="520px">
<el-form ref="form" :inline="true" :model="form" :rules="rules" size="small" label-width="80px">
<el-form-item label="角色名称" prop="name">
<el-input v-model="form.name" style="width: 380px;" />

View File

@@ -22,7 +22,7 @@
<Log ref="log" />
</div>
<!--Form表单-->
<el-dialog :close-on-click-modal="false" :before-close="crud.cancelCU" :visible="crud.status.cu" :title="crud.status.title" append-to-body width="730px">
<el-dialog :close-on-click-modal="false" :before-close="crud.cancelCU" :visible.sync="crud.status.cu > 0" :title="crud.status.title" append-to-body width="730px">
<el-form ref="form" :inline="true" :model="form" :rules="rules" size="small" label-width="100px">
<el-form-item label="任务名称" prop="jobName">
<el-input v-model="form.jobName" style="width: 220px;" />

View File

@@ -57,10 +57,22 @@
</el-select>
<rrOperation />
</div>
<crudOperation show="" :permission="permission" />
<crudOperation show="" :permission="permission">
<el-button
slot="right"
v-permission="['admin','user:add']"
:disabled="crud.selections.length === 0"
class="filter-item"
size="mini"
type="primary"
icon="el-icon-refresh-left"
@click="resetPwd(crud.selections)"
>重置密码
</el-button>
</crudOperation>
</div>
<!--表单渲染-->
<el-dialog append-to-body :close-on-click-modal="false" :before-close="crud.cancelCU" :visible="crud.status.cu" :title="crud.status.title" width="570px">
<el-dialog append-to-body :close-on-click-modal="false" :before-close="crud.cancelCU" :visible.sync="crud.status.cu > 0" :title="crud.status.title" width="570px">
<el-form ref="form" :inline="true" :model="form" :rules="rules" size="small" label-width="66px">
<el-form-item label="用户名" prop="username">
<el-input v-model="form.username" @keydown.native="keydown($event)" />
@@ -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(() => {
})
}
}
}

View File

@@ -23,7 +23,7 @@
</crudOperation>
</div>
<!--表单组件-->
<el-dialog append-to-body :close-on-click-modal="false" :before-close="crud.cancelCU" :visible="crud.status.cu" :title="crud.status.add ? '文件上传' : '编辑文件'" width="500px">
<el-dialog append-to-body :close-on-click-modal="false" :before-close="crud.cancelCU" :visible.sync="crud.status.cu > 0" :title="crud.status.add ? '文件上传' : '编辑文件'" width="500px">
<el-form ref="form" :model="form" size="small" label-width="80px">
<el-form-item label="文件名">
<el-input v-model="form.name" style="width: 370px;" />