mirror of
https://gitee.com/java110/MicroCommunityWeb.git
synced 2026-02-24 05:46:03 +08:00
优化代码
This commit is contained in:
parent
68a26e1cb7
commit
8046d3b553
@ -12,6 +12,7 @@
|
||||
resource: '',
|
||||
domain: '',
|
||||
description: '',
|
||||
mId:''
|
||||
|
||||
}
|
||||
},
|
||||
@ -19,7 +20,8 @@
|
||||
|
||||
},
|
||||
_initEvent: function () {
|
||||
vc.on('addBasePrivilege', 'openAddBasePrivilegeModal', function () {
|
||||
vc.on('addBasePrivilege', 'openAddBasePrivilegeModal', function (_item) {
|
||||
$that.addBasePrivilegeInfo.mId = _item.mId;
|
||||
$('#addBasePrivilegeModel').modal('show');
|
||||
});
|
||||
},
|
||||
@ -71,6 +73,13 @@
|
||||
errInfo: "备注内容不能超过200"
|
||||
},
|
||||
],
|
||||
'addBasePrivilegeInfo.mId': [
|
||||
{
|
||||
limit: "required",
|
||||
param: "",
|
||||
errInfo: "非法操作,菜单为空"
|
||||
}
|
||||
],
|
||||
|
||||
|
||||
});
|
||||
|
||||
@ -8,6 +8,7 @@
|
||||
resource: '',
|
||||
domain: '',
|
||||
description: '',
|
||||
mId:''
|
||||
|
||||
}
|
||||
},
|
||||
@ -76,7 +77,6 @@
|
||||
param: "",
|
||||
errInfo: "权限ID不能为空"
|
||||
}]
|
||||
|
||||
});
|
||||
},
|
||||
editBasePrivilege: function () {
|
||||
|
||||
@ -20,14 +20,7 @@
|
||||
<input type="text" placeholder="请输入权限编码" v-model="basePrivilegeManageInfo.conditions.pId" class=" form-control">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-3">
|
||||
<select class="custom-select" v-model="basePrivilegeManageInfo.conditions.domain">
|
||||
<option selected value="">请选择商户类型</option>
|
||||
<option value="800900000001">运营团队</option>
|
||||
<option value="800900000002">代理商</option>
|
||||
<option value="800900000003">物业</option>
|
||||
<option value="800900000000">开发团队</option>
|
||||
</select></div>
|
||||
|
||||
<div class="col-sm-1">
|
||||
<button type="button" class="btn btn-primary btn-sm" v-on:click="_queryBasePrivilegeMethod()">
|
||||
<i class="fa fa-search"></i> 查询
|
||||
|
||||
@ -12,15 +12,17 @@
|
||||
records: 1,
|
||||
moreCondition: false,
|
||||
name: '',
|
||||
mId:'',
|
||||
conditions: {
|
||||
name: '',
|
||||
pId: '',
|
||||
domain: '',
|
||||
domain: ''
|
||||
|
||||
}
|
||||
}
|
||||
},
|
||||
_initMethod: function () {
|
||||
$that.basePrivilegeManageInfo.mId = vc.getParam('mId');
|
||||
vc.component._listBasePrivileges(DEFAULT_PAGE, DEFAULT_ROWS);
|
||||
},
|
||||
_initEvent: function () {
|
||||
@ -37,6 +39,7 @@
|
||||
|
||||
vc.component.basePrivilegeManageInfo.conditions.page = _page;
|
||||
vc.component.basePrivilegeManageInfo.conditions.row = _rows;
|
||||
vc.component.basePrivilegeManageInfo.conditions.mId = $that.basePrivilegeManageInfo.mId;
|
||||
var param = {
|
||||
params: vc.component.basePrivilegeManageInfo.conditions
|
||||
};
|
||||
@ -60,7 +63,9 @@
|
||||
);
|
||||
},
|
||||
_openAddBasePrivilegeModal: function () {
|
||||
vc.emit('addBasePrivilege', 'openAddBasePrivilegeModal', {});
|
||||
vc.emit('addBasePrivilege', 'openAddBasePrivilegeModal', {
|
||||
mId:$that.basePrivilegeManageInfo.mId
|
||||
});
|
||||
},
|
||||
_openEditBasePrivilegeModel: function (_basePrivilege) {
|
||||
vc.emit('editBasePrivilege', 'openEditBasePrivilegeModal', _basePrivilege);
|
||||
|
||||
@ -104,9 +104,9 @@
|
||||
<th class="text-center">菜单地址</th>
|
||||
<th class="text-center">序列</th>
|
||||
<th class="text-center">菜单显示</th>
|
||||
<td class="text-center">权限ID</td>
|
||||
<td class="text-center">权限名称</td>
|
||||
<th class="text-center">操作</th>
|
||||
<!-- <td class="text-center">权限ID</td>
|
||||
<td class="text-center">权限名称</td> -->
|
||||
<th class="text-right">操作</th>
|
||||
|
||||
|
||||
</tr>
|
||||
@ -118,9 +118,13 @@
|
||||
<td class="text-center">{{menu.url}}</td>
|
||||
<td class="text-center">{{menu.seq}}</td>
|
||||
<td class="text-center">{{menu.isShowName}}</td>
|
||||
<td class="text-center">{{menu.pId}}</td>
|
||||
<td class="text-center">{{menu.pName}}</td>
|
||||
<td class="text-center">
|
||||
<!-- <td class="text-center">{{menu.pId}}</td>
|
||||
<td class="text-center">{{menu.pName}}</td> -->
|
||||
<td class="text-right">
|
||||
<div class="btn-group">
|
||||
<button class="btn-white btn btn-xs" v-on:click="_openPrivilegeModel(menu)">权限
|
||||
</button>
|
||||
</div>
|
||||
<div class="btn-group">
|
||||
<button class="btn-white btn btn-xs" v-on:click="_openEditMenuModel(menu)">修改
|
||||
</button>
|
||||
|
||||
@ -91,6 +91,9 @@
|
||||
}else{
|
||||
vc.component.menuManageInfo.moreCondition = true;
|
||||
}
|
||||
},
|
||||
_openPrivilegeModel:function(_menu){
|
||||
vc.jumpToPage("/admin.html#/pages/dev/basePrivilegeManage?mId="+_menu.mId);
|
||||
}
|
||||
|
||||
,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user