From 5dbc5bd252eba2eebdf38fbce50168da1cfccb01 Mon Sep 17 00:00:00 2001 From: wangyilin <1454641981@qq.com> Date: Fri, 6 Sep 2024 17:38:13 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9C=8D=E5=8A=A1=E9=A1=B9=E7=9B=AE=E7=AE=A1?= =?UTF-8?q?=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/components/form/FormProMax.vue | 2 +- .../src/components/iconfont/IconFont.vue | 2 +- .../src/components/table/TableProMax.vue | 2 +- securityManagement/src/config/dict.ts | 2 + securityManagement/src/config/index.ts | 16 +- securityManagement/src/global.d.ts | 5 +- .../src/types/views/serviceManagement.ts | 25 ++ securityManagement/src/views/enterprise.vue | 1 + .../src/views/serviceManagement/index.vue | 418 +++++++++++++++++- .../userManagement/bgManagement/index.vue | 44 +- 10 files changed, 482 insertions(+), 35 deletions(-) create mode 100644 securityManagement/src/types/views/serviceManagement.ts diff --git a/securityManagement/src/components/form/FormProMax.vue b/securityManagement/src/components/form/FormProMax.vue index 8fd21b6..185a4ca 100644 --- a/securityManagement/src/components/form/FormProMax.vue +++ b/securityManagement/src/components/form/FormProMax.vue @@ -161,7 +161,7 @@ const props = withDefaults(defineProps>(), { labelCol: () => { return { style: { - width: '100px' + width: '120px' } } }, diff --git a/securityManagement/src/components/iconfont/IconFont.vue b/securityManagement/src/components/iconfont/IconFont.vue index fc208f1..12dbb31 100644 --- a/securityManagement/src/components/iconfont/IconFont.vue +++ b/securityManagement/src/components/iconfont/IconFont.vue @@ -9,7 +9,7 @@ import {IconFontProps} from "@/types/components/iconfont/IconFont"; withDefaults(defineProps(), { - size: 25, + size: 20, type: "svg" }); diff --git a/securityManagement/src/components/table/TableProMax.vue b/securityManagement/src/components/table/TableProMax.vue index c98ef55..75e0e94 100644 --- a/securityManagement/src/components/table/TableProMax.vue +++ b/securityManagement/src/components/table/TableProMax.vue @@ -154,7 +154,7 @@ const tableColumns = computed(() => { if (!(cols?.[0].dataIndex === 'index')) { cols?.unshift({ dataIndex: 'index', - width: 60, + width: 80, title: '序号', customRender: ({index}) => index + 1 }) diff --git a/securityManagement/src/config/dict.ts b/securityManagement/src/config/dict.ts index e27fe55..01bd579 100644 --- a/securityManagement/src/config/dict.ts +++ b/securityManagement/src/config/dict.ts @@ -6,6 +6,8 @@ type DictType = | 'IsEnable' | 'IsOrNot' | 'Sex' + | 'ServiceProjectType' + | 'MiniProgramUserIdentity' export const initEnums = () => { api.get[]>>('/common/enums').then(resp => { diff --git a/securityManagement/src/config/index.ts b/securityManagement/src/config/index.ts index f5c4938..2ab04cc 100644 --- a/securityManagement/src/config/index.ts +++ b/securityManagement/src/config/index.ts @@ -1,7 +1,7 @@ import {SystemMenu} from "@/types/config"; -export const ROUTER_WHITE_LIST: string[] = ['/login', '/test','/enterprise']; -export const CLIENT_TYPE:string = "MANAGEMENT_SECURITY"; +export const ROUTER_WHITE_LIST: string[] = ['/login', '/test', '/enterprise']; +export const CLIENT_TYPE: string = "MANAGEMENT_SECURITY"; export const UNIT_TYPE = { security: 'SECURITY_UNIT', @@ -12,27 +12,39 @@ export const SYSTEM_MENUS: SystemMenu[] = [ title: '首页', name: 'index', path: '/index', + icon: 'icon-shouye', type: "menu", component: () => import('@/views/index.vue') }, { title: '用户管理', name: 'userManagement', path: '/userManagement', + icon: 'icon-yonghuguanli_huaban', type: 'dir', children: [ { title: '后台管理', name: 'bgManagement', path: '/bgManagement', + icon:'icon-guanlianbaoan', type: 'menu', component: () => import('@/views/userManagement/bgManagement/index.vue') }, { title: '小程序管理', name: 'uniManagement', path: '/uniManagement', + icon:'icon-guanlianbaoan', type: 'menu', component: () => import('@/views/userManagement/uniManagement/index.vue') } ] + }, + { + title: '服务项目管理', + name: 'serviceManagement', + path: '/serviceManagement', + icon:'icon-xiangmuguanli-', + type: 'menu', + component: () => import('@/views/serviceManagement/index.vue') } ] diff --git a/securityManagement/src/global.d.ts b/securityManagement/src/global.d.ts index aac772f..49d4b5b 100644 --- a/securityManagement/src/global.d.ts +++ b/securityManagement/src/global.d.ts @@ -62,7 +62,10 @@ interface BaseEnum { label: string } - +interface TypeEnum { + value: string; + label: string +} interface dataStatus { account: string; password: string; diff --git a/securityManagement/src/types/views/serviceManagement.ts b/securityManagement/src/types/views/serviceManagement.ts new file mode 100644 index 0000000..285a344 --- /dev/null +++ b/securityManagement/src/types/views/serviceManagement.ts @@ -0,0 +1,25 @@ +import {BaseTableRowRecord} from "@/types/components/table"; + +export interface serviceProjectSaveOrUpdateParams extends BaseTableRowRecord { + snowFlakeId: string + enterprisesUnitId: string, + enterprisesUnitName: string, + projectManagerMiniProgramUserId: string, + projectManagerMiniProgramUserName: string, + name: string, + type: TypeEnum, + isRecruitSecurity: BaseEnum, + idNumber: string, + serviceArea: number, + buildingTotal: number, + houseTotal: number, + staffTotal: number, + securityUserTotal: number, + remark: string, + createUserName: string, + createTime: string, + enterprisesUnitAdministrativeDivisionCodes:Record +} + + + diff --git a/securityManagement/src/views/enterprise.vue b/securityManagement/src/views/enterprise.vue index b9bdb03..8c86b33 100644 --- a/securityManagement/src/views/enterprise.vue +++ b/securityManagement/src/views/enterprise.vue @@ -138,6 +138,7 @@ const rules: Record = { const DivisionTree = async ()=>{ const resp = await api.get[]>('/common/administrativeDivisionTree') administrativeDivisionTree.value = resp.data as TreeNodeVo[] + } // 可以进行搜索行政区划 2 diff --git a/securityManagement/src/views/serviceManagement/index.vue b/securityManagement/src/views/serviceManagement/index.vue index 84db465..d28a2e0 100644 --- a/securityManagement/src/views/serviceManagement/index.vue +++ b/securityManagement/src/views/serviceManagement/index.vue @@ -1,12 +1,420 @@ - - \ No newline at end of file + diff --git a/securityManagement/src/views/userManagement/bgManagement/index.vue b/securityManagement/src/views/userManagement/bgManagement/index.vue index 1e3030d..76f7b2e 100644 --- a/securityManagement/src/views/userManagement/bgManagement/index.vue +++ b/securityManagement/src/views/userManagement/bgManagement/index.vue @@ -91,19 +91,18 @@ const columns: TableProps['columns'] = [ return ( record.isAdmin.value === 1? - - { - const resp = await api.delete('/managementSecurityUnitUser/deleteById', { - managementSecurityUnitUserId: record.snowFlakeId, - }) - message.success(resp.message) - await tableRef.value?.requestGetTableData() - }}> - 删除 - - + { + const resp = await api.delete('/managementSecurityUnitUser/deleteById', { + managementSecurityUnitUserId: record.snowFlakeId, + }) + message.success(resp.message) + await tableRef.value?.requestGetTableData() + }}> + 删除 + { visible.value = true title.value = "编辑用户" @@ -118,7 +117,7 @@ const columns: TableProps['columns'] = [ : - +
超级管理员不能编辑
) } }, @@ -218,27 +217,24 @@ const submit = async () => { } const resp = await api.post('/managementSecurityUnitUser/saveOrUpdate', managementSecurityUnitUserSaveOrUpdateParams) message.success(resp.message) - close() -} -const close = () => { tableRef.value?.requestGetTableData() - visible.value = false closeModal() + } const closeModal = () => { formParams.value = { - name: '', - sex: 0, - telephone: '', - isEnable: 0, - remark: '' + name:'', + sex:0, + telephone:'', + isEnable:0, + remark:'' } visible.value = false + title.value = '新增用户' } //Form const addUserManagement = () => { visible.value = true - title.value = '' }