fix:修改菜单管理兼容多系统

This commit is contained in:
zhangzhiqiang
2022-12-09 17:33:51 +08:00
parent db05e18cae
commit 79cf1955e5
8 changed files with 74 additions and 19 deletions

View File

@@ -13,6 +13,18 @@
class="filter-item"
@keyup.enter.native="crud.toQuery"
/>
<el-select
v-model="query.system_type"
style="width: 150px"
placeholder="请选择系统"
@change="crud.toQuery"
>
<el-option
v-for="item in dict.system_type"
:label="item.label"
:value="item.value"
/>
</el-select>
<rrOperation />
</div>
<crudOperation :permission="permission" />
@@ -204,6 +216,7 @@ import rrOperation from '@crud/RR.operation'
import crudOperation from '@crud/CRUD.operation'
import udOperation from '@crud/UD.operation'
import DateRangePicker from '@/components/DateRangePicker'
import crudDictDetail from '@/api/system/dictDetail'
// crud交由presenter持有
const defaultForm = {
@@ -234,6 +247,8 @@ export default {
dicts: ['system_type'],
data() {
return {
typeList: [],
defaultType: '',
menus: [],
permission: {
add: ['admin', 'menu:add'],
@@ -257,7 +272,22 @@ export default {
}
}
},
beforeMount() {
// const _this=this
// crudDictDetail.get('system_type').then(data => {
// if (data.content.length > 0) {
// const shift = data.content.shift()
// _this.defaultType = shift.para1
// }
// })
},
methods: {
[CRUD.HOOK.beforeRefresh]() {
if (this.crud.query.system_type == null) {
this.crud.query.system_type = '1'
}
return true
},
// 新增与编辑前做的操作
[CRUD.HOOK.afterToCU](crud, form) {
console.log(this.dict)