Commit 96b8a361 by LJM

bug

parent 164efb85
<template>
<div id="app">
<keep-alive exclude="InquireDetail,ListDetail,orderTrackGoodsDetail,orderTrackPurAdd,enter,list,inquire,quote,orderTrackInvoice">
<keep-alive exclude="InquireDetail,ListDetail,orderTrackGoodsDetail,orderTrackPurAdd,enter,list,inquire,quote,orderTrackInvoice,subAccount,subAccountAdd,subAccountEdit">
<router-view class="router-view"></router-view>
</keep-alive>
</div>
......
......@@ -65,14 +65,6 @@ export default {
children: 'children',
label: 'name'
},
data: [{
name: '询报价管理',
children: [{
name: '询价管理',
}, {
name: '报价管理'
}]
}],
rules: {
mobile: [{
required: true,
......@@ -96,8 +88,8 @@ export default {
}],
},
menuData: [],//权限菜单
checkedNodes: [],//存储勾选的子账号权限配置
messageMenu: [],//消息权限菜单
checkedNodes: [],//存储勾选的子账号权限配置
checkedMessageNodes: [],//存储勾选的消息菜单
formParam: {
mobile: '',
......@@ -134,7 +126,7 @@ export default {
* 获取当前用户的消息权限菜单
*/
getMessageMenu() {
this.$http('GET', "/api/subAccount/getMessageMenu", {ynat_id: ''}).then(res => {
this.$http('GET', "/api/subAccount/getMessageMenu", {}).then(res => {
if (res.code === 0) {
let newMenuData = res.data.data.map(item => [item]);
this.messageMenu = newMenuData;
......@@ -146,6 +138,11 @@ export default {
}
})
},
/**
* 筛选子账号勾选的权限配置
* @param data
* @param checked
*/
handleCheckChange(data, checked) {
if (checked) {
if (!this.checkedNodes.includes(data.name)) {
......@@ -163,6 +160,11 @@ export default {
}
}
},
/**
* 筛选子账号勾选的消息推送配置
* @param data
* @param checked
*/
handleCheckMsgChange(data, checked) {
if (checked) {
if (!this.checkedMessageNodes.includes(data.name)) {
......@@ -180,12 +182,15 @@ export default {
}
}
},
/**
* 表单提交
* @param formName
*/
submitForm(formName) {
this.$refs[formName].validate((valid) => {
if (valid) {
this.formParam.user_message_rule = JSON.stringify(this.checkedMessageNodes);
this.formParam.user_rule = JSON.stringify(this.checkedNodes);
this.$http('POST', "/api/subAccount/create", this.formParam).then(res => {
if (res.code === 0) {
this.$message({
......
......@@ -58,21 +58,13 @@ Vue.use(Button).use(Form).use(Select).use(Tree).use(Option).use(Input).use(FormI
Vue.use(DatePicker).use(Dropdown).use(DropdownMenu).use(DropdownItem).use(TableColumn).use(Table).use(Pagination).use(Popover).use(Tag).use(Tooltip).use(Row);
export default {
name: "subAccountAdd",
name: "subAccountEdit",
data() {
return {
defaultProps: {
children: 'children',
label: 'name'
},
data: [{
name: '询报价管理',
children: [{
name: '询价管理',
}, {
name: '报价管理'
}]
}],
rules: {
mobile: [{
required: true,
......@@ -234,13 +226,6 @@ export default {
}
},
/**
* 获取需要勾选的数据
*/
getDefaultCheckedKeys(item) {
console.log(item)
return [3];
},
/**
* 表单提交
* @param formName
*/
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment