diff --git a/src/api/system/menu/index.js b/src/api/system/menu/index.js index e11607b..350e803 100644 --- a/src/api/system/menu/index.js +++ b/src/api/system/menu/index.js @@ -1,7 +1,7 @@ import { defAxios as request } from '@/utils/http' /** - * 获取菜单分页数据接口 - * @returns 菜单分页数据 + * 获取菜单管理数据接口 + * @returns 菜单数据 */ export function getMenuList(params) { return request({ diff --git a/src/components/DataTable/tools/useDataSource.js b/src/components/DataTable/tools/useDataSource.js index c0ed56a..1e792a8 100644 --- a/src/components/DataTable/tools/useDataSource.js +++ b/src/components/DataTable/tools/useDataSource.js @@ -44,7 +44,7 @@ export function useDataSource(propsRef, { getPaginationInfo, setPagination, setL } } // 处理数据结构 - const resultInfo = res[listField] ? res[listField] : [] + const resultInfo = res[listField] ? res[listField] : res dataSourceRef.value = dataType === 'tree' ? dealTree(resultInfo) : resultInfo setPagination({ [pageField]: currentPage, @@ -74,7 +74,7 @@ export function useDataSource(propsRef, { getPaginationInfo, setPagination, setL * @returns 返回树形结构数据 */ function dealTree(info) { - const tree = toTreeData(info.data, 'id', 'pid', 'children') + const tree = toTreeData(info, 'id', 'pid', 'children') return tree } @@ -106,7 +106,6 @@ export function useDataSource(propsRef, { getPaginationInfo, setPagination, setL } async function reFetch(opt) { - console.log('opt', opt) const { paginationSetting } = unref(propsRef) const pageField = paginationSetting.pageField const sizeField = paginationSetting.sizeField diff --git a/src/views/system/dept/index.vue b/src/views/system/dept/index.vue index 4a7968d..6be2d4a 100644 --- a/src/views/system/dept/index.vue +++ b/src/views/system/dept/index.vue @@ -1,10 +1,10 @@ diff --git a/src/views/system/dept/info.js b/src/views/system/dept/info.js new file mode 100644 index 0000000..42342d3 --- /dev/null +++ b/src/views/system/dept/info.js @@ -0,0 +1,30 @@ +const data = [ + { + label: '部门名称', + key: 'name', + props: { + placeholder: '请输入部门名称' + } + } + // { + // label: '角色类型', + // type: 'select', + // key: 'op', + // props: { + // options: [{ + // label: 11, value: 1 + // }] + // } + // }, + // { + // label: '角色类型', + // type: 'date', + // key: 'date', + // props: { + // type: 'date' + // } + // } +] + +export default data + diff --git a/src/views/system/menu/components/MenuModal.vue b/src/views/system/menu/components/MenuModal.vue index bf4296e..554a607 100644 --- a/src/views/system/menu/components/MenuModal.vue +++ b/src/views/system/menu/components/MenuModal.vue @@ -6,12 +6,12 @@ :on-negative-click="handleClose" > diff --git a/src/views/system/menu/info.js b/src/views/system/menu/info.js new file mode 100644 index 0000000..94939bf --- /dev/null +++ b/src/views/system/menu/info.js @@ -0,0 +1,12 @@ +const data = [ + { + label: '菜单名称', + key: 'title', + props: { + placeholder: '请输入菜单名称' + } + } +] + +export default data + diff --git a/src/views/system/role/info.js b/src/views/system/role/info.js index 211910b..d80fb79 100644 --- a/src/views/system/role/info.js +++ b/src/views/system/role/info.js @@ -6,24 +6,6 @@ const data = [ placeholder: '请输入角色名称' } } - // { - // label: '角色类型', - // type: 'select', - // key: 'op', - // props: { - // options: [{ - // label: 11, value: 1 - // }] - // } - // }, - // { - // label: '角色类型', - // type: 'date', - // key: 'date', - // props: { - // type: 'date' - // } - // } ] export default data diff --git a/src/views/system/user/components/UserModal.vue b/src/views/system/user/components/UserModal.vue index d610d81..2278a5b 100644 --- a/src/views/system/user/components/UserModal.vue +++ b/src/views/system/user/components/UserModal.vue @@ -239,6 +239,8 @@ export default defineComponent({ } }) } + } else { + $message.error('请完善必填信息') } }) } diff --git a/src/views/system/user/index.vue b/src/views/system/user/index.vue index 0af4106..ee1330d 100644 --- a/src/views/system/user/index.vue +++ b/src/views/system/user/index.vue @@ -268,7 +268,6 @@ export default { } return { - data, loadDataTable, handleModal, ...toRefs(data),