Commit 96b8a361 by LJM

bug

parent 164efb85
<template> <template>
<div id="app"> <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> <router-view class="router-view"></router-view>
</keep-alive> </keep-alive>
</div> </div>
......
...@@ -65,14 +65,6 @@ export default { ...@@ -65,14 +65,6 @@ export default {
children: 'children', children: 'children',
label: 'name' label: 'name'
}, },
data: [{
name: '询报价管理',
children: [{
name: '询价管理',
}, {
name: '报价管理'
}]
}],
rules: { rules: {
mobile: [{ mobile: [{
required: true, required: true,
...@@ -96,8 +88,8 @@ export default { ...@@ -96,8 +88,8 @@ export default {
}], }],
}, },
menuData: [],//权限菜单 menuData: [],//权限菜单
checkedNodes: [],//存储勾选的子账号权限配置
messageMenu: [],//消息权限菜单 messageMenu: [],//消息权限菜单
checkedNodes: [],//存储勾选的子账号权限配置
checkedMessageNodes: [],//存储勾选的消息菜单 checkedMessageNodes: [],//存储勾选的消息菜单
formParam: { formParam: {
mobile: '', mobile: '',
...@@ -134,7 +126,7 @@ export default { ...@@ -134,7 +126,7 @@ export default {
* 获取当前用户的消息权限菜单 * 获取当前用户的消息权限菜单
*/ */
getMessageMenu() { getMessageMenu() {
this.$http('GET', "/api/subAccount/getMessageMenu", {ynat_id: ''}).then(res => { this.$http('GET', "/api/subAccount/getMessageMenu", {}).then(res => {
if (res.code === 0) { if (res.code === 0) {
let newMenuData = res.data.data.map(item => [item]); let newMenuData = res.data.data.map(item => [item]);
this.messageMenu = newMenuData; this.messageMenu = newMenuData;
...@@ -146,6 +138,11 @@ export default { ...@@ -146,6 +138,11 @@ export default {
} }
}) })
}, },
/**
* 筛选子账号勾选的权限配置
* @param data
* @param checked
*/
handleCheckChange(data, checked) { handleCheckChange(data, checked) {
if (checked) { if (checked) {
if (!this.checkedNodes.includes(data.name)) { if (!this.checkedNodes.includes(data.name)) {
...@@ -163,6 +160,11 @@ export default { ...@@ -163,6 +160,11 @@ export default {
} }
} }
}, },
/**
* 筛选子账号勾选的消息推送配置
* @param data
* @param checked
*/
handleCheckMsgChange(data, checked) { handleCheckMsgChange(data, checked) {
if (checked) { if (checked) {
if (!this.checkedMessageNodes.includes(data.name)) { if (!this.checkedMessageNodes.includes(data.name)) {
...@@ -180,12 +182,15 @@ export default { ...@@ -180,12 +182,15 @@ export default {
} }
} }
}, },
/**
* 表单提交
* @param formName
*/
submitForm(formName) { submitForm(formName) {
this.$refs[formName].validate((valid) => { this.$refs[formName].validate((valid) => {
if (valid) { if (valid) {
this.formParam.user_message_rule = JSON.stringify(this.checkedMessageNodes); this.formParam.user_message_rule = JSON.stringify(this.checkedMessageNodes);
this.formParam.user_rule = JSON.stringify(this.checkedNodes); this.formParam.user_rule = JSON.stringify(this.checkedNodes);
this.$http('POST', "/api/subAccount/create", this.formParam).then(res => { this.$http('POST', "/api/subAccount/create", this.formParam).then(res => {
if (res.code === 0) { if (res.code === 0) {
this.$message({ this.$message({
......
...@@ -58,21 +58,13 @@ Vue.use(Button).use(Form).use(Select).use(Tree).use(Option).use(Input).use(FormI ...@@ -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); 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 { export default {
name: "subAccountAdd", name: "subAccountEdit",
data() { data() {
return { return {
defaultProps: { defaultProps: {
children: 'children', children: 'children',
label: 'name' label: 'name'
}, },
data: [{
name: '询报价管理',
children: [{
name: '询价管理',
}, {
name: '报价管理'
}]
}],
rules: { rules: {
mobile: [{ mobile: [{
required: true, required: true,
...@@ -234,13 +226,6 @@ export default { ...@@ -234,13 +226,6 @@ export default {
} }
}, },
/** /**
* 获取需要勾选的数据
*/
getDefaultCheckedKeys(item) {
console.log(item)
return [3];
},
/**
* 表单提交 * 表单提交
* @param formName * @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