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