|
@@ -200,6 +200,18 @@
|
|
|
<el-radio :label=0>否</el-radio>
|
|
|
<el-radio :label=1>是</el-radio>
|
|
|
</el-radio-group>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="是否可以查看完整地址" v-if="isAdmin == 1">
|
|
|
+ <span slot="label">
|
|
|
+ <el-tooltip content="是否可以查看完整地址" placement="top">
|
|
|
+ <i class="el-icon-question"></i>
|
|
|
+ </el-tooltip>
|
|
|
+ 地址权限
|
|
|
+ </span>
|
|
|
+ <el-radio-group v-model="form.isCheckAddress">
|
|
|
+ <el-radio :label=0>否</el-radio>
|
|
|
+ <el-radio :label=1>是</el-radio>
|
|
|
+ </el-radio-group>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="菜单权限">
|
|
|
<el-checkbox v-model="menuExpand" @change="handleCheckedTreeExpand($event, 'menu')">展开/折叠</el-checkbox>
|
|
@@ -473,6 +485,7 @@ export default {
|
|
|
roleSort: 0,
|
|
|
status: "0",
|
|
|
isCheckPhone:0,
|
|
|
+ isCheckAddress:0,
|
|
|
menuIds: [],
|
|
|
deptIds: [],
|
|
|
menuCheckStrictly: true,
|
|
@@ -555,6 +568,22 @@ export default {
|
|
|
const roleMenu = this.getRoleMenuTreeselect(roleId);
|
|
|
getRole(roleId).then(response => {
|
|
|
this.form = response.data;
|
|
|
+
|
|
|
+ // 确保数值类型正确
|
|
|
+ if (this.form.isCheckAddress === undefined || this.form.isCheckAddress === null) {
|
|
|
+ this.form.isCheckAddress = 0;
|
|
|
+ } else {
|
|
|
+ this.form.isCheckAddress = Number(this.form.isCheckAddress);
|
|
|
+ }
|
|
|
+
|
|
|
+ if (this.form.isCheckPhone === undefined || this.form.isCheckPhone === null) {
|
|
|
+ this.form.isCheckPhone = 0;
|
|
|
+ } else {
|
|
|
+ this.form.isCheckPhone = Number(this.form.isCheckPhone);
|
|
|
+ }
|
|
|
+
|
|
|
+ console.log('从后端获取的数据:', this.form); // 调试信息
|
|
|
+
|
|
|
this.open = true;
|
|
|
this.$nextTick(() => {
|
|
|
roleMenu.then(res => {
|
|
@@ -599,6 +628,16 @@ export default {
|
|
|
submitForm: function() {
|
|
|
this.$refs["form"].validate(valid => {
|
|
|
if (valid) {
|
|
|
+ // 确保地址权限字段类型正确
|
|
|
+ if (this.form.isCheckAddress !== undefined) {
|
|
|
+ this.form.isCheckAddress = Number(this.form.isCheckAddress);
|
|
|
+ }
|
|
|
+ if (this.form.isCheckPhone !== undefined) {
|
|
|
+ this.form.isCheckPhone = Number(this.form.isCheckPhone);
|
|
|
+ }
|
|
|
+
|
|
|
+ console.log('提交的表单数据:', this.form); // 调试信息
|
|
|
+
|
|
|
if (this.form.roleId != undefined) {
|
|
|
this.form.menuIds = this.getMenuAllCheckedKeys();
|
|
|
updateRole(this.form).then(response => {
|