From 73cfa34796b82143fed89ce35f57afca75ecc285 Mon Sep 17 00:00:00 2001 From: AN <1983933789@qq.com> Date: Fri, 4 Apr 2025 17:32:27 +0800 Subject: [PATCH] =?UTF-8?q?feat:=E5=AF=B9=E6=8E=A5=E5=B2=97=E4=BD=8D?= =?UTF-8?q?=E7=AE=A1=E7=90=86=EF=BC=8C=E4=BF=AE=E5=A4=8D=E6=A8=A1=E6=9D=BF?= =?UTF-8?q?=E7=94=9F=E6=88=90bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/soy.operate-drawer.vue.vm | 2 +- docs/template/modules/soy.search.vue.vm | 2 +- src/router/elegant/imports.ts | 1 + src/router/elegant/routes.ts | 9 + src/router/elegant/transform.ts | 1 + src/service/api/system/post.ts | 2 +- src/typings/api/system.api.d.ts | 8 +- src/typings/components.d.ts | 2 + src/typings/elegant-router.d.ts | 2 + src/views/system/post/index.vue | 349 ++++++++++++++++++ .../post/modules/post-operate-drawer.vue | 174 +++++++++ src/views/system/post/modules/post-search.vue | 77 ++++ 12 files changed, 622 insertions(+), 7 deletions(-) create mode 100644 src/views/system/post/index.vue create mode 100644 src/views/system/post/modules/post-operate-drawer.vue create mode 100644 src/views/system/post/modules/post-search.vue diff --git a/docs/template/modules/soy.operate-drawer.vue.vm b/docs/template/modules/soy.operate-drawer.vue.vm index 1808ab69..2f720a53 100644 --- a/docs/template/modules/soy.operate-drawer.vue.vm +++ b/docs/template/modules/soy.operate-drawer.vue.vm @@ -30,7 +30,7 @@ const visible = defineModel('visible', { #if($dictList && $dictList.size() > 0) #foreach($dict in $dictList) -const { options: ${dict.name}Options } = useDict(${dict.type}#if($dict.immediate), false#end); +const { options: ${dict.name}Options } = useDict('${dict.type}'#if($dict.immediate), false#end); #end#end const { formRef, validate, restoreValidation } = useNaiveForm(); diff --git a/docs/template/modules/soy.search.vue.vm b/docs/template/modules/soy.search.vue.vm index 20e586d8..3b8d1c82 100644 --- a/docs/template/modules/soy.search.vue.vm +++ b/docs/template/modules/soy.search.vue.vm @@ -27,7 +27,7 @@ const model = defineModel('model', #if($dictList && $dictList.size() > 0) #foreach($dict in $dictList) -const { options: ${dict.name}Options } = useDict('${dict.type}#if($dict.immediate)', false#end); +const { options: ${dict.name}Options } = useDict('${dict.type}'#if($dict.immediate), false#end); #end#end async function reset() { diff --git a/src/router/elegant/imports.ts b/src/router/elegant/imports.ts index 887738f3..748638c5 100644 --- a/src/router/elegant/imports.ts +++ b/src/router/elegant/imports.ts @@ -26,6 +26,7 @@ export const views: Record Promise import("@/views/system/dict/index.vue"), system_dict_type: () => import("@/views/system/dict/type/index.vue"), system_menu: () => import("@/views/system/menu/index.vue"), + system_post: () => import("@/views/system/post/index.vue"), system_tenant: () => import("@/views/system/tenant/index.vue"), system_user: () => import("@/views/system/user/index.vue"), tool_gen: () => import("@/views/tool/gen/index.vue"), diff --git a/src/router/elegant/routes.ts b/src/router/elegant/routes.ts index 91e62cc9..0639fce7 100644 --- a/src/router/elegant/routes.ts +++ b/src/router/elegant/routes.ts @@ -135,6 +135,15 @@ export const generatedRoutes: GeneratedRoute[] = [ order: 3 } }, + { + name: 'system_post', + path: '/system/post', + component: 'view.system_post', + meta: { + title: 'system_post', + i18nKey: 'route.system_post' + } + }, { name: 'system_tenant', path: '/system/tenant', diff --git a/src/router/elegant/transform.ts b/src/router/elegant/transform.ts index 88d09d60..072fb6c7 100644 --- a/src/router/elegant/transform.ts +++ b/src/router/elegant/transform.ts @@ -175,6 +175,7 @@ const routeMap: RouteMap = { "system_dict_data": "/system/dict/data", "system_dict_type": "/system/dict/type", "system_menu": "/system/menu", + "system_post": "/system/post", "system_tenant": "/system/tenant", "system_user": "/system/user", "tool": "/tool", diff --git a/src/service/api/system/post.ts b/src/service/api/system/post.ts index ff9d3b70..87815f2e 100644 --- a/src/service/api/system/post.ts +++ b/src/service/api/system/post.ts @@ -28,7 +28,7 @@ export function fetchUpdatePost(data: Api.System.PostOperateParams) { } /** 批量删除岗位信息 */ -export function fetchDeletePost(postIds: CommonType.IdType[]) { +export function fetchBatchDeletePost(postIds: CommonType.IdType[]) { return request({ url: `/system/post/${postIds.join(',')}`, method: 'delete' diff --git a/src/typings/api/system.api.d.ts b/src/typings/api/system.api.d.ts index d591eeb2..9f296ab4 100644 --- a/src/typings/api/system.api.d.ts +++ b/src/typings/api/system.api.d.ts @@ -358,8 +358,8 @@ declare namespace Api { /** post search params */ type PostSearchParams = CommonType.RecordNullable< - Pick & - Api.Common.CommonSearchParams + Pick + & { belongDeptId: CommonType.IdType } & Api.Common.CommonSearchParams >; /** post operate params */ @@ -441,7 +441,7 @@ declare namespace Api { /** tenant search params */ type TenantSearchParams = CommonType.RecordNullable< Pick & - Api.Common.CommonSearchParams + Api.Common.CommonSearchParams >; /** tenant operate params */ @@ -492,7 +492,7 @@ declare namespace Api { /** tenant package search params */ type TenantPackageSearchParams = CommonType.RecordNullable< Pick & - Api.Common.CommonSearchParams + Api.Common.CommonSearchParams >; /** tenant package operate params */ diff --git a/src/typings/components.d.ts b/src/typings/components.d.ts index fdc6d6f3..3bfd0138 100644 --- a/src/typings/components.d.ts +++ b/src/typings/components.d.ts @@ -100,7 +100,9 @@ declare module 'vue' { NRadio: typeof import('naive-ui')['NRadio'] NRadioButton: typeof import('naive-ui')['NRadioButton'] NRadioGroup: typeof import('naive-ui')['NRadioGroup'] + NS: typeof import('naive-ui')['NS'] NScrollbar: typeof import('naive-ui')['NScrollbar'] + NSe: typeof import('naive-ui')['NSe'] NSelect: typeof import('naive-ui')['NSelect'] NSpace: typeof import('naive-ui')['NSpace'] NSpin: typeof import('naive-ui')['NSpin'] diff --git a/src/typings/elegant-router.d.ts b/src/typings/elegant-router.d.ts index 18cb4f75..ca03cef7 100644 --- a/src/typings/elegant-router.d.ts +++ b/src/typings/elegant-router.d.ts @@ -29,6 +29,7 @@ declare module "@elegant-router/types" { "system_dict_data": "/system/dict/data"; "system_dict_type": "/system/dict/type"; "system_menu": "/system/menu"; + "system_post": "/system/post"; "system_tenant": "/system/tenant"; "system_user": "/system/user"; "tool": "/tool"; @@ -99,6 +100,7 @@ declare module "@elegant-router/types" { | "system_dict" | "system_dict_type" | "system_menu" + | "system_post" | "system_tenant" | "system_user" | "tool_gen" diff --git a/src/views/system/post/index.vue b/src/views/system/post/index.vue new file mode 100644 index 00000000..369ebcd5 --- /dev/null +++ b/src/views/system/post/index.vue @@ -0,0 +1,349 @@ + + + + + + \ No newline at end of file diff --git a/src/views/system/post/modules/post-operate-drawer.vue b/src/views/system/post/modules/post-operate-drawer.vue new file mode 100644 index 00000000..2e41f031 --- /dev/null +++ b/src/views/system/post/modules/post-operate-drawer.vue @@ -0,0 +1,174 @@ + + + + + diff --git a/src/views/system/post/modules/post-search.vue b/src/views/system/post/modules/post-search.vue new file mode 100644 index 00000000..96b25c8a --- /dev/null +++ b/src/views/system/post/modules/post-search.vue @@ -0,0 +1,77 @@ + + + + +