feat : 菜单与公司选择组件修改
This commit is contained in:
@@ -40,7 +40,7 @@ export const getMenuInfo = (menuId) => {
|
|||||||
|
|
||||||
export const getMenuOpt = (excludeId=0) => {
|
export const getMenuOpt = (excludeId=0) => {
|
||||||
return request({
|
return request({
|
||||||
url: '/admin/menu/option/role/'+excludeId,
|
url: '/admin/menu/option/'+excludeId,
|
||||||
method: 'get'
|
method: 'get'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -28,7 +28,8 @@
|
|||||||
<el-scrollbar style="height:87%;">
|
<el-scrollbar style="height:87%;">
|
||||||
<div class="tree">
|
<div class="tree">
|
||||||
<el-tree :data="dataList" ref="tree" :props="defaultProps" empty-text="" node-key="value"
|
<el-tree :data="dataList" ref="tree" :props="defaultProps" empty-text="" node-key="value"
|
||||||
default-expand-all :show-checkbox="showCheckbox" highlight-current :default-checked-keys="defaultChecked"
|
default-expand-all :show-checkbox="showCheckbox" highlight-current
|
||||||
|
:default-checked-keys="defaultChecked"
|
||||||
:check-strictly="true" @node-click="(node,check)=>handle(node,check)"
|
:check-strictly="true" @node-click="(node,check)=>handle(node,check)"
|
||||||
@check-change="handleChange" :filter-node-method="filterNode">
|
@check-change="handleChange" :filter-node-method="filterNode">
|
||||||
<template #default="{ node, data }">
|
<template #default="{ node, data }">
|
||||||
@@ -135,7 +136,13 @@ const chooseAll=()=>{
|
|||||||
}
|
}
|
||||||
const getList = () => {
|
const getList = () => {
|
||||||
getSubCompOpt().then(res => {
|
getSubCompOpt().then(res => {
|
||||||
dataList.value = res.data;
|
dataList.value = [
|
||||||
|
{
|
||||||
|
label: "全选",
|
||||||
|
value: -1,
|
||||||
|
children: res.data
|
||||||
|
}
|
||||||
|
]
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -212,11 +212,7 @@ const showCompany = () => {
|
|||||||
const selected = (select) => {
|
const selected = (select) => {
|
||||||
let companyInfoList = []
|
let companyInfoList = []
|
||||||
for (let val of select) {
|
for (let val of select) {
|
||||||
let companyInfo = {
|
companyInfoList.push(val)
|
||||||
value: val.value,
|
|
||||||
label: val.label
|
|
||||||
}
|
|
||||||
companyInfoList.push(companyInfo)
|
|
||||||
formData.value.companyIds.push(val.value)
|
formData.value.companyIds.push(val.value)
|
||||||
}
|
}
|
||||||
companyList.value = companyInfoList
|
companyList.value = companyInfoList
|
||||||
|
|||||||
@@ -143,7 +143,7 @@ const init = async () => {
|
|||||||
form.value.setValues({state: '1', template: false})
|
form.value.setValues({state: '1', template: false})
|
||||||
const res = await getTemRoleOption()
|
const res = await getTemRoleOption()
|
||||||
localData.tempRoleOpt = res.data
|
localData.tempRoleOpt = res.data
|
||||||
const { data } = await getMenuOptRole()
|
const { data } = await getMenuOptRole(0)
|
||||||
localData.menuData = data.menuOption
|
localData.menuData = data.menuOption
|
||||||
// localData.checked = data.checked
|
// localData.checked = data.checked
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -114,6 +114,12 @@ const tableConfig = reactive({
|
|||||||
label: '手机号码',
|
label: '手机号码',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
prop: 'accountType',
|
||||||
|
label: '主子账号',
|
||||||
|
align: 'center',
|
||||||
|
currentRender: ({row, index}) => (<Tag dictType={'account_type'} value={row.accountType} />)
|
||||||
|
},
|
||||||
{
|
{
|
||||||
prop: 'state',
|
prop: 'state',
|
||||||
label: '状态',
|
label: '状态',
|
||||||
|
|||||||
Reference in New Issue
Block a user