From 7202707f6be6a8f8b7bc99b249c89a7392c8eac7 Mon Sep 17 00:00:00 2001 From: herenshan112 Date: Wed, 23 Aug 2023 11:28:33 +0800 Subject: [PATCH] =?UTF-8?q?=E8=87=AA=E5=AE=9A=E4=B9=89=E8=A1=A8=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 1 + src/api/dict/index.ts | 2 +- src/api/hr/org/index.ts | 13 +- src/api/hr/org/type.ts | 31 ++ src/components/DesignForm/index.ts | 8 + .../DesignForm/public/expand/diy-iconfont.vue | 113 ++++++ .../DesignForm/public/expand/userDialog.vue | 325 ++++++++++++++++++ src/main.ts | 3 +- 8 files changed, 493 insertions(+), 3 deletions(-) create mode 100644 src/components/DesignForm/index.ts create mode 100644 src/components/DesignForm/public/expand/diy-iconfont.vue create mode 100644 src/components/DesignForm/public/expand/userDialog.vue diff --git a/.gitignore b/.gitignore index 3e5c49325..3da573b54 100644 --- a/.gitignore +++ b/.gitignore @@ -19,3 +19,4 @@ components.d.ts package-lock.json pnpm-lock.yaml + diff --git a/src/api/dict/index.ts b/src/api/dict/index.ts index 7a7c3a0bd..5c9c61afb 100644 --- a/src/api/dict/index.ts +++ b/src/api/dict/index.ts @@ -199,7 +199,7 @@ export function updateDict(data: DictForm) { } /** * 删除字典 - * + * 李旭敏 * @param ids 字典项ID,多个以英文逗号(,)分割 */ export function deleteDictOld(ids: string) { diff --git a/src/api/hr/org/index.ts b/src/api/hr/org/index.ts index a8233d657..81db9e2e6 100644 --- a/src/api/hr/org/index.ts +++ b/src/api/hr/org/index.ts @@ -1,6 +1,6 @@ import request from '@/utils/request'; import { AxiosPromise } from 'axios'; -import { searchFormTitle,orgClassListCont,addOrgTypesCont,orgClassCont,editOrgTypeEditOrDel,searchOrgCont,orgInfo,addOrgInfo,editOrgDel,searchTeamList,orgTeamListCont } from './type'; +import { searchFormTitle,orgClassListCont,addOrgTypesCont,orgClassCont,editOrgTypeEditOrDel,searchOrgCont,orgInfo,addOrgInfo,editOrgDel,searchTeamList,orgTeamListCont,orgFormTree } from './type'; /** * 获取组织类别 */ @@ -101,3 +101,14 @@ export function getTeamListCont(data: searchTeamList): AxiosPromise{ + return request({ + url: '/hrapi/org/orgtreelist', + method: 'post', + data: data + }); +} diff --git a/src/api/hr/org/type.ts b/src/api/hr/org/type.ts index 68d3bacc9..6ef906152 100644 --- a/src/api/hr/org/type.ts +++ b/src/api/hr/org/type.ts @@ -128,3 +128,34 @@ export interface addOrgInfo{ time?:number; state?:number; } +/** + * 自定义表单行政组织列表 + */ +export interface orgform{ + id: number; + parentId: number; + name: string; + sort: number; + status: number; + remark: string; +} +export interface orgFormTree{ + dict:any; + list:orgform[]; + pageInfo:any; +} +/** + * 自定义表单搜索用户 + */ +export interface orgFormSeachUsers{ + page:number; + pagesize:number; + +} + +export interface searchCriteriaForPeople extends PageQuery{ + total:number; + current:number; + orgid?:number; + usercont?:string; +} diff --git a/src/components/DesignForm/index.ts b/src/components/DesignForm/index.ts new file mode 100644 index 000000000..2b869dbfb --- /dev/null +++ b/src/components/DesignForm/index.ts @@ -0,0 +1,8 @@ +import diyIconfont from '@/components/DesignForm/public/expand/diy-iconfont.vue' +import userDialog from '@/components/DesignForm/public/expand/userDialog.vue' + + +export default (app: any) => { + app.component('DiyIconfont', diyIconfont) + app.component('UserDialog', userDialog) +} diff --git a/src/components/DesignForm/public/expand/diy-iconfont.vue b/src/components/DesignForm/public/expand/diy-iconfont.vue new file mode 100644 index 000000000..91f18cb0a --- /dev/null +++ b/src/components/DesignForm/public/expand/diy-iconfont.vue @@ -0,0 +1,113 @@ + + + + diff --git a/src/components/DesignForm/public/expand/userDialog.vue b/src/components/DesignForm/public/expand/userDialog.vue new file mode 100644 index 000000000..4fa8405a6 --- /dev/null +++ b/src/components/DesignForm/public/expand/userDialog.vue @@ -0,0 +1,325 @@ + + + + diff --git a/src/main.ts b/src/main.ts index 4a914f399..97686d157 100644 --- a/src/main.ts +++ b/src/main.ts @@ -20,6 +20,7 @@ import 'element-plus/theme-chalk/dark/css-vars.css'; import '@/styles/index.scss'; import 'uno.css'; +import ComComponents from '@/components/DesignForm/index' const app = createApp(App); @@ -35,7 +36,7 @@ for (const [key, component] of Object.entries(ElementPlusIconsVue)) { app.component(key, component) } -app.use(router).use(i18n).use(ElementPlus, { +app.use(router).use(i18n).use(ComComponents).use(ElementPlus, { locale: zhCn }).use(AKDesign).mount('#app');