|
|
@ -252,10 +252,10 @@ |
|
|
|
width="700px" |
|
|
|
> |
|
|
|
<el-form ref="form" :inline="true" :model="dataDialog" :rules="rules" size="mini" label-width="100px"> |
|
|
|
<el-form-item label="用户名" prop="username"> |
|
|
|
<el-form-item :label="$t('User.table.user_name')" prop="username"> |
|
|
|
<el-input v-model="dataDialog.username" disabled style="width: 200px;" /> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="姓名" prop="person_name"> |
|
|
|
<el-form-item :label="$t('User.table.person_name')" prop="person_name"> |
|
|
|
<el-input v-model="dataDialog.person_name" disabled style="width: 200px;" /> |
|
|
|
</el-form-item> |
|
|
|
<el-table |
|
|
@ -265,12 +265,12 @@ |
|
|
|
@selection-change="getRows" |
|
|
|
> |
|
|
|
<el-table-column :selectable="checkboxT" type="selection" width="55" /> |
|
|
|
<el-table-column prop="label" label="权限范围" /> |
|
|
|
<el-table-column label="数据权限"> |
|
|
|
<el-table-column prop="label" :label="$t('User.table.permission_scope_type')" /> |
|
|
|
<el-table-column :label="$t('User.table.permissionName')"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<el-select |
|
|
|
v-model="scope.row.permission_id" |
|
|
|
placeholder="请选择" |
|
|
|
:placeholder="$t('common.Please_select')" |
|
|
|
@change="openRelevance(scope.row, scope.$index)" |
|
|
|
> |
|
|
|
<el-option |
|
|
@ -283,20 +283,20 @@ |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column |
|
|
|
label="操作" |
|
|
|
:label="$t('common.Operate')" |
|
|
|
fixed="right" |
|
|
|
align="center" |
|
|
|
width="100" |
|
|
|
> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<el-button type="text" @click="showDatas(scope.row)">查看明细</el-button> |
|
|
|
<el-button type="text" @click="showDatas(scope.row)">{{ $t('User.table.see') }}</el-button> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</el-table> |
|
|
|
</el-form> |
|
|
|
<div slot="footer" class="dialog-footer"> |
|
|
|
<el-button @click="cancelDataPerm">取消</el-button> |
|
|
|
<el-button type="primary" @click="savePermise()">确认</el-button> |
|
|
|
<el-button @click="cancelDataPerm">{{ $t('common.Cancel') }}</el-button> |
|
|
|
<el-button type="primary" @click="savePermise()">{{ $t('common.Confirm') }}</el-button> |
|
|
|
</div> |
|
|
|
</el-dialog> |
|
|
|
<el-dialog |
|
|
@ -382,12 +382,12 @@ export default { |
|
|
|
], |
|
|
|
rules: { |
|
|
|
username: [ |
|
|
|
{ required: true, message: '请输入用户名', trigger: 'blur' }, |
|
|
|
{ min: 2, max: 20, message: '长度在 2 到 20 个字符', trigger: 'blur' } |
|
|
|
{ required: true, message: i18n.t('User.rules.r2'), trigger: 'blur' }, |
|
|
|
{ min: 2, max: 20, message: i18n.t('common.Tip12', { min: 2, max: 10 }), trigger: 'blur' } |
|
|
|
], |
|
|
|
person_name: [ |
|
|
|
{ required: true, message: '请输入用户姓名', trigger: 'blur' }, |
|
|
|
{ min: 2, max: 20, message: '长度在 2 到 20 个字符', trigger: 'blur' } |
|
|
|
{ required: true, message: i18n.t('User.rules.r3'), trigger: 'blur' }, |
|
|
|
{ min: 2, max: 20, message: i18n.t('common.Tip12', { min: 2, max: 10 }), trigger: 'blur' } |
|
|
|
] |
|
|
|
}, |
|
|
|
syncDrawer: false, |
|
|
@ -409,7 +409,7 @@ export default { |
|
|
|
userIds: [], |
|
|
|
showData: false, |
|
|
|
dataPermissions: [], |
|
|
|
dataPermissionTitle: '数据权限' |
|
|
|
dataPermissionTitle: i18n.t('User.table.data_reg') |
|
|
|
} |
|
|
|
}, |
|
|
|
computed: { |
|
|
@ -435,7 +435,7 @@ export default { |
|
|
|
this.deptTree() |
|
|
|
}, |
|
|
|
created() { |
|
|
|
this.crud.msg.add = '新增成功' |
|
|
|
this.crud.msg.add = i18n.t('common.add') |
|
|
|
}, |
|
|
|
mounted: function() { |
|
|
|
const that = this |
|
|
@ -465,9 +465,9 @@ export default { |
|
|
|
return '#F56C6C' |
|
|
|
}, |
|
|
|
handdeleted(datas) { |
|
|
|
this.$confirm(`确认删除选中的1条数据?`, '提示', { |
|
|
|
confirmButtonText: '确定', |
|
|
|
cancelButtonText: '取消', |
|
|
|
this.$confirm(i18n.t('common.Tip1', { count: 1 }), i18n.t('common.Tips'), { |
|
|
|
confirmButtonText: i18n.t('common.Confirm'), |
|
|
|
cancelButtonText: i18n.t('common.Cancel'), |
|
|
|
type: 'warning' |
|
|
|
}).then(() => { |
|
|
|
this.crud.delAllLoading = true |
|
|
@ -509,13 +509,13 @@ export default { |
|
|
|
[CRUD.HOOK.afterValidateCU](crud) { |
|
|
|
if (!crud.form.depts) { |
|
|
|
this.$message({ |
|
|
|
message: '部门不能为空', |
|
|
|
message: i18n.t('User.rules.r4'), |
|
|
|
type: 'warning' |
|
|
|
}) |
|
|
|
return false |
|
|
|
} else if (this.roleDatas.length === 0) { |
|
|
|
this.$message({ |
|
|
|
message: '角色不能为空', |
|
|
|
message: i18n.t('User.rules.r5'), |
|
|
|
type: 'warning' |
|
|
|
}) |
|
|
|
return false |
|
|
@ -708,7 +708,7 @@ export default { |
|
|
|
this.dataDialog.person_name = row.person_name |
|
|
|
this.dataDialog.username = row.username |
|
|
|
this.dataDialog.user_id = row.user_id |
|
|
|
this.dataPermissionTitle = '[' + row.person_name + '] 数据权限' |
|
|
|
this.dataPermissionTitle = '[' + row.person_name + '] ' + i18n.t('User.table.data_reg') |
|
|
|
this.dataPerm = true |
|
|
|
// 回显数据 |
|
|
|
crudDataPermission.getDataShow(row.user_id).then(res => { |
|
|
@ -798,7 +798,7 @@ export default { |
|
|
|
} |
|
|
|
crudDataPermission.saveDataPermission(param).then(res => { |
|
|
|
this.dataPerm = false |
|
|
|
this.crud.notify('添加数据权限成功', CRUD.NOTIFICATION_TYPE.SUCCESS) |
|
|
|
this.crud.notify(i18n.t('User.msg.m5'), CRUD.NOTIFICATION_TYPE.SUCCESS) |
|
|
|
this.crud.toQuery() |
|
|
|
}) |
|
|
|
}, |
|
|
@ -814,7 +814,7 @@ export default { |
|
|
|
if (this.flag) this.$refs.deptUser.setCheckedKeys([]) |
|
|
|
}, |
|
|
|
handleClose(done) { |
|
|
|
this.$confirm('确认关闭?') |
|
|
|
this.$confirm(i18n.t('common.close')) |
|
|
|
.then(_ => { |
|
|
|
done() |
|
|
|
}) |
|
|
@ -835,7 +835,7 @@ export default { |
|
|
|
} |
|
|
|
crudUser.edit(user).then(res => { |
|
|
|
this.cancelForm() |
|
|
|
this.crud.notify('保存成功', CRUD.NOTIFICATION_TYPE.SUCCESS) |
|
|
|
this.crud.notify(i18n.t('common.save'), CRUD.NOTIFICATION_TYPE.SUCCESS) |
|
|
|
this.crud.toQuery() |
|
|
|
}) |
|
|
|
}, |
|
|
|