diff --git a/src/api/school/setting/area.js b/src/api/school/setting/area.js new file mode 100644 index 0000000..c30e01c --- /dev/null +++ b/src/api/school/setting/area.js @@ -0,0 +1,33 @@ +import request from '@/config/axios' +// 查询列表 +export const getAreaPage = async (params) => { + return await request.get({ url: '/admin-api/crm/area/page', params }) +} + +export const getAreaSimpleList = async (params) => { + return await request.get({ url: '/admin-api/crm/area/simple-list', params }) +} + +// 查询详情 +export const getArea = async (id) => { + return await request.get({ url: '/admin-api/crm/area/get?id=' + id }) +} + +// 新增 +export const createArea = async (data) => { + return await request.post({ + url: '/admin-api/crm/area/create', + data: data, + isSubmitForm: true + }) +} + +// 修改 +export const updateArea = async (params) => { + return await request.put({ url: '/admin-api/crm/area/update', data: params }) +} + +// 删除 +export const deleteArea = async (id) => { + return await request.delete({ url: '/admin-api/crm/area/delete?id=' + id }) +} diff --git a/src/api/system/user/index.ts b/src/api/system/user/index.ts index bbfa0e8..a7b75ba 100644 --- a/src/api/system/user/index.ts +++ b/src/api/system/user/index.ts @@ -74,3 +74,8 @@ export const updateUserStatus = (id: number, status: number) => { export const getSimpleUserList = (): Promise => { return request.get({ url: '/admin-api/system/user/list-all-simple' }) } + +// 获取所有用户列表-无权限限制 +export const getAllUserList = (): Promise => { + return request.get({ url: '/admin-api/system/user/no/permission/list-all-simple' }) +} diff --git a/src/components/Dialog/src/Dialog.vue b/src/components/Dialog/src/Dialog.vue index 34b7a32..47d2073 100644 --- a/src/components/Dialog/src/Dialog.vue +++ b/src/components/Dialog/src/Dialog.vue @@ -75,13 +75,16 @@ const emit = defineEmits(['close']) {{ title }} - +
+ + +
diff --git a/src/directives/permission/hasPermi.ts b/src/directives/permission/hasPermi.ts index d86d2f5..1207464 100644 --- a/src/directives/permission/hasPermi.ts +++ b/src/directives/permission/hasPermi.ts @@ -8,7 +8,7 @@ export function hasPermi(app: App) { const { wsCache } = useCache() const { value } = binding const all_permission = '*:*:*' - const permissions = wsCache.get(CACHE_KEY.USER).permissions + const permissions = wsCache.get(CACHE_KEY.USER)?.permissions || [] if (value && value instanceof Array && value.length > 0) { const permissionFlag = value diff --git a/src/router/modules/remaining.ts b/src/router/modules/remaining.ts index 326aad7..3508257 100644 --- a/src/router/modules/remaining.ts +++ b/src/router/modules/remaining.ts @@ -130,7 +130,27 @@ const remainingRouter: AppRouteRecordRaw[] = [ // } // ] // }, - + // { + // path: '/Basic', + // component: Layout, + // name: 'Basic', + // meta: {}, + // redirect: '/Basic/menu', + // children: [ + // { + // path: 'menu', + // component: () => import('@/views/Basic/Menu/index.vue'), + // name: 'Menu', + // meta: { + // canTo: true, + // hidden: true, + // noTagsView: false, + // icon: 'ep:user', + // title: '菜单管理' + // } + // } + // ] + // }, { path: '/login', component: () => import('@/views/Login/Login.vue'), diff --git a/src/utils/index.ts b/src/utils/index.ts index d1d5f79..a8696e1 100644 --- a/src/utils/index.ts +++ b/src/utils/index.ts @@ -213,7 +213,7 @@ export const fenToYuan = (amount: string | number): number => { export const removeNullField = (obj: Object) => { for (const key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { - if (obj[key] === '') { + if (obj[key] === '' || obj[key] === null || obj[key] == undefined) { delete obj[key] } } diff --git a/src/views/Basic/Menu/MenuForm.vue b/src/views/Basic/Menu/MenuForm.vue index 3fa39ea..5bdbd6a 100644 --- a/src/views/Basic/Menu/MenuForm.vue +++ b/src/views/Basic/Menu/MenuForm.vue @@ -10,7 +10,7 @@ { dialogTitle.value = t('action.' + type) formType.value = type resetForm() - getOptions() if (parentId) { formData.value.parentId = parentId } @@ -177,13 +180,6 @@ const open = async (type: string, id?: number, parentId?: number) => { } defineExpose({ open }) // 提供 open 方法,用于打开弹窗 -const appList = ref([]) -const getOptions = () => { - MenuApi.getServiceAppList().then((data) => { - appList.value = data - }) -} - /** 提交表单 */ const emit = defineEmits(['success']) // 定义 success 事件,用于操作成功后的回调 const submitForm = async () => { diff --git a/src/views/Basic/Menu/index.vue b/src/views/Basic/Menu/index.vue index ad4f5d6..7720244 100644 --- a/src/views/Basic/Menu/index.vue +++ b/src/views/Basic/Menu/index.vue @@ -62,6 +62,11 @@ + + + diff --git a/src/views/Clue/Order/Comp/AfterSales.vue b/src/views/Clue/Order/Comp/AfterSales.vue index 2fc3371..007c852 100644 --- a/src/views/Clue/Order/Comp/AfterSales.vue +++ b/src/views/Clue/Order/Comp/AfterSales.vue @@ -142,6 +142,7 @@ import DialogAfterSaleAudit from './DialogAfterSaleAudit.vue' import DialogAfterSaleDetail from './DialogAfterSaleDetail.vue' import DialogBatchAudit from './DialogBatchAudit.vue' +import { removeNullField } from '@/utils' import { dateFormatter } from '@/utils/formatTime' const afterSaleAuditDialog = ref() @@ -191,7 +192,7 @@ const loading = ref(false) async function getList() { loading.value = true try { - const data = await AfterSaleApi.getAfterSalePage(searchForm.value) + const data = await AfterSaleApi.getAfterSalePage(removeNullField(searchForm.value)) tableList.value = data.list total.value = data.total } finally { diff --git a/src/views/Clue/Order/Comp/Delivery.vue b/src/views/Clue/Order/Comp/Delivery.vue index 25c24da..d27893f 100644 --- a/src/views/Clue/Order/Comp/Delivery.vue +++ b/src/views/Clue/Order/Comp/Delivery.vue @@ -113,6 +113,7 @@ import { getSimpleUserList as getUserOption } from '@/api/system/user' import { getSimpleProductList } from '@/api/mall/product' import * as DeliveryApi from '@/api/clue/delivery' +import { removeNullField } from '@/utils' import { dateFormatter } from '@/utils/formatTime' // const message = useMessage() // 消息弹窗 @@ -155,7 +156,7 @@ const loading = ref(false) async function getList() { loading.value = true try { - const data = await DeliveryApi.getDeliveryPage(searchForm.value) + const data = await DeliveryApi.getDeliveryPage(removeNullField(searchForm.value)) tableList.value = data.list total.value = data.total } finally { diff --git a/src/views/Clue/Order/Comp/DialogFeebackAudit.vue b/src/views/Clue/Order/Comp/DialogFeebackAudit.vue index 5e42600..815cfbd 100644 --- a/src/views/Clue/Order/Comp/DialogFeebackAudit.vue +++ b/src/views/Clue/Order/Comp/DialogFeebackAudit.vue @@ -1,6 +1,11 @@ diff --git a/src/views/Clue/Order/Comp/DialogFeebackDetail.vue b/src/views/Clue/Order/Comp/DialogFeebackDetail.vue index bd7db44..8d3f435 100644 --- a/src/views/Clue/Order/Comp/DialogFeebackDetail.vue +++ b/src/views/Clue/Order/Comp/DialogFeebackDetail.vue @@ -7,6 +7,11 @@ :columns="2" labelWidth="130px" /> + + + + + diff --git a/src/views/Clue/Order/Comp/MallOrderList.vue b/src/views/Clue/Order/Comp/MallOrderList.vue index c2fc013..f0b2cc3 100644 --- a/src/views/Clue/Order/Comp/MallOrderList.vue +++ b/src/views/Clue/Order/Comp/MallOrderList.vue @@ -200,7 +200,7 @@ diff --git a/src/views/Clue/Order/Comp/Reback.vue b/src/views/Clue/Order/Comp/Reback.vue index 5c7b605..405d03c 100644 --- a/src/views/Clue/Order/Comp/Reback.vue +++ b/src/views/Clue/Order/Comp/Reback.vue @@ -15,6 +15,26 @@ + + + + + + + + + + - - - + + + - + + +