Browse Source

菜单管理修改

master
陈薪名 11 months ago
parent
commit
f30f0a48cd
  1. 31
      src/views/system/menu/index.vue

31
src/views/system/menu/index.vue

@ -46,8 +46,8 @@
:expand-column-key="expandColumnKey"
:columns="columns"
:data="list"
:width="1600"
:height="600"
:width="clientWidth-300"
:height="clientHeight-280"
@row-expand="onRowExpanded"
@expanded-rows-change="onExpandedRowsChange"
fixed
@ -93,15 +93,17 @@
</template>
<script lang="tsx" setup>
import { DICT_TYPE, getIntDictOptions } from '@/utils/dict'
import { handleTree, unflatten } from '@/utils/tree'
import { handleTree } from '@/utils/tree'
import * as MenuApi from '@/api/system/menu'
import MenuForm from './MenuForm.vue'
import { CACHE_KEY, useCache } from '@/hooks/web/useCache'
import { getInfo } from '@/api/login'
import Icon from '@/components/Icon/src/Icon.vue'
import { ElButton } from 'element-plus'
import { ElButton, TableV2FixedDir } from 'element-plus'
defineOptions({ name: 'SystemMenu' })
const clientWidth = window.document.documentElement.clientWidth
const clientHeight = window.document.documentElement.clientHeight
const { wsCache } = useCache()
const { t } = useI18n() //
@ -120,9 +122,6 @@ const refreshTable = ref(true) // 重新渲染表格状态
const expandedRowKeys = ref<string[]>([])
const expandColumnKey = ref('name')
/** 查询列表 */
const getList = async () => {
loading.value = true
@ -256,25 +255,17 @@ const generateColumns = [{
// v-hasPermi={['system:menu:update']}
// v-hasPermi={['system:menu:create']}
// v-hasPermi={['system:menu:delete']}
}]
}].map((column, columnIndex) => {
let fixed!: TableV2FixedDir
if (columnIndex == 7) fixed = TableV2FixedDir.RIGHT
return { ...column, fixed }
})
const onRowExpanded = () => {
}
const onExpandedRowsChange = () => {
}
// const generateColumns = (length = 10, prefix = 'column-', props?: any) =>
// Array.from({ length }).map((_, columnIndex) => ({
// ...props,
// key: `${prefix}${columnIndex}`,
// dataKey: `${prefix}${columnIndex}`,
// title: `Column ${columnIndex}`,
// width: 150,
// }))
/** 初始化 **/
onMounted(async () => {
await getList()

Loading…
Cancel
Save