更换组件
This commit is contained in:
parent
f20d1bff20
commit
b01a9b6574
@ -71,14 +71,19 @@
|
|||||||
<i class="el-icon-question"></i>
|
<i class="el-icon-question"></i>
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
</span>
|
</span>
|
||||||
<treeselect
|
<el-cascader
|
||||||
:append-to-body="true"
|
class="w100"
|
||||||
|
:options="menuOptions"
|
||||||
|
:props="{ checkStrictly: true, value: 'menuId', label: 'menuName', emitPath: false }"
|
||||||
|
placeholder="请选择上级菜单"
|
||||||
|
clearable
|
||||||
v-model="info.parentMenuId"
|
v-model="info.parentMenuId"
|
||||||
:options="menus"
|
>
|
||||||
:normalizer="normalizer"
|
<template #default="{ node, data }">
|
||||||
:show-count="true"
|
<span>{{ data.menuName }}</span>
|
||||||
placeholder="请选择系统菜单"
|
<span v-if="!node.isLeaf"> ({{ data.children.length }}) </span>
|
||||||
/>
|
</template>
|
||||||
|
</el-cascader>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :lg="12">
|
<el-col :lg="12">
|
||||||
@ -251,12 +256,10 @@
|
|||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { queryColumnInfo } from '@/api/tool/gen'
|
import { queryColumnInfo } from '@/api/tool/gen'
|
||||||
import Treeselect from '@riophae/vue-treeselect'
|
import { listMenu } from '@/api/system/menu'
|
||||||
import '@riophae/vue-treeselect/dist/vue-treeselect.css'
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'BasicInfoForm',
|
name: 'BasicInfoForm',
|
||||||
components: { Treeselect },
|
|
||||||
props: {
|
props: {
|
||||||
info: {
|
info: {
|
||||||
type: Object,
|
type: Object,
|
||||||
@ -279,6 +282,7 @@ export default {
|
|||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
menuOptions: [],
|
||||||
checkedBtn: [],
|
checkedBtn: [],
|
||||||
subColumns: [],
|
subColumns: [],
|
||||||
rules: {
|
rules: {
|
||||||
@ -359,6 +363,16 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
/** 查询菜单下拉树结构 */
|
||||||
|
getMenuTreeselect() {
|
||||||
|
/** 查询菜单下拉列表 */
|
||||||
|
listMenu({ menuTypeIds: 'M,C' }).then((response) => {
|
||||||
|
this.menuOptions = response.data
|
||||||
|
})
|
||||||
|
},
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
this.getMenuTreeselect()
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user