From 43db18b67b729e2053700fe7cf868914895e93c6 Mon Sep 17 00:00:00 2001
From: wangyilin <1454641981@qq.com>
Date: Mon, 4 Nov 2024 11:20:08 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=A1=8C=E6=94=BF=E5=8C=BA?=
=?UTF-8?q?=E5=88=92?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
securityManagement/.env.development | 2 +-
.../src/components/form/FormProMax.vue | 7 +++
.../tree/AdministrativeDivisionsTree.vue | 63 +++++++++++++++++++
.../src/types/components/form/index.ts | 5 +-
.../src/views/serviceManagement/index.vue | 15 +++--
securityManagement/src/views/test.vue | 52 ++-------------
6 files changed, 86 insertions(+), 58 deletions(-)
create mode 100644 securityManagement/src/components/tree/AdministrativeDivisionsTree.vue
diff --git a/securityManagement/.env.development b/securityManagement/.env.development
index 754e989..91e16ee 100644
--- a/securityManagement/.env.development
+++ b/securityManagement/.env.development
@@ -8,7 +8,7 @@ VITE_APP_BASE_API=/api
VITE_APP_PROXY_URL=http://172.10.10.93:8765
# rsa 公钥
-VITE_APP_RSA_PUBLIC_KEY=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCpu1C3JHZ+Ng/eVVCZtwKsOZv9RktpAL13pKy4FoRHyNv2t8TPV2AMzLzfEzlWx001nBxyVxEMR2N9jAcqFLHv7r16ciOzbtzB9dky2G+bc9jIs4/EdVK5bAZcPRh5Jrb78sC9PHyR4AeceDyCIKHLUbWBJB4NTZE0s1Wh5kMynQIDAQAB
+VITE_APP_RSA_PUBLIC_KEY=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDJps/EXxxSpEM1Ix4R0NWIOBciHCr7P7coDT8tNKfelgR7txcJOqHCO/MIWe7T04aHQTcpQxqx9hMca7dbqz8TZpz9jvLzE/6ZonVKxHsoFnNlHMp1/CPAJ9f6D9wYicum2KltJkmQ0g//D9W2zPCYoGOmSRFcZx/KEBa4EM53jQIDAQAB
# minio
VITE_APP_MINIO_URL=http://118.253.177.137:9000
VITE_APP_MINIO_BUCKET=police-security-dev
diff --git a/securityManagement/src/components/form/FormProMax.vue b/securityManagement/src/components/form/FormProMax.vue
index 185a4ca..c4fb2c3 100644
--- a/securityManagement/src/components/form/FormProMax.vue
+++ b/securityManagement/src/components/form/FormProMax.vue
@@ -97,6 +97,12 @@
:allowClear="item.componentsProps?.allowClear ?? true"
:options="item.options"
/>
+
('value', {
diff --git a/securityManagement/src/components/tree/AdministrativeDivisionsTree.vue b/securityManagement/src/components/tree/AdministrativeDivisionsTree.vue
new file mode 100644
index 0000000..d160a58
--- /dev/null
+++ b/securityManagement/src/components/tree/AdministrativeDivisionsTree.vue
@@ -0,0 +1,63 @@
+
+
+
+
+
diff --git a/securityManagement/src/types/components/form/index.ts b/securityManagement/src/types/components/form/index.ts
index 0477415..7e5e3de 100644
--- a/securityManagement/src/types/components/form/index.ts
+++ b/securityManagement/src/types/components/form/index.ts
@@ -15,6 +15,7 @@ import {
} from "ant-design-vue";
import {Ref, UnwrapRef, VNode} from "vue";
import {ComponentProps} from "vue-component-type-helpers";
+import AdministrativeDivisionsTree from "@/components/tree/AdministrativeDivisionsTree.vue";
type FormProMaxItemType =
| 'custom'
@@ -32,7 +33,8 @@ type FormProMaxItemType =
| 'datePicker'
| 'rangePicker'
| 'timeRangePicker'
- | 'timePicker';
+ | 'timePicker'
+ | 'administrativeDivisionsTree';
interface FormProMaxItemCommonProps extends ComponentProps {
label?: string,
@@ -64,6 +66,7 @@ export type FormProMaxItemOptions = {
| FormProMaxItemProps<'rangePicker', ComponentProps>
| FormProMaxItemProps<'timeRangePicker', ComponentProps>
| FormProMaxItemProps<'timePicker', ComponentProps>
+ | FormProMaxItemProps<'administrativeDivisionsTree', ComponentProps>
}
export interface FormProMaxProps extends FormProps {
diff --git a/securityManagement/src/views/serviceManagement/index.vue b/securityManagement/src/views/serviceManagement/index.vue
index bb325e2..42a1c83 100644
--- a/securityManagement/src/views/serviceManagement/index.vue
+++ b/securityManagement/src/views/serviceManagement/index.vue
@@ -193,7 +193,7 @@ const columns: TableProps['columns'] = [
删除
{
- // console.log(record)
+ console.log(record,'9999999')
visible.value = true
serviceTitle.value = '编辑服务项目'
if(record.isRecruitSecurity === null ){
@@ -221,6 +221,7 @@ const columns: TableProps['columns'] = [
formParams.value. securityUserTotal = record.securityUserTotal
formParams.value.enterprisesUnitId = record.enterprisesUnitName
formParams.value.administrativeDivisionCodes = record.enterprisesUnitAdministrativeDivisionCodes
+
}}>编辑
}
@@ -231,7 +232,7 @@ const x: number = columns.reduce((a, b) => a + (b.width as number), 0)
const administrativeDivisionTree = ref[]>([]) //行政区划
const getAdministrativeDivisionTree = async ()=>{
- const resp = await api.get[]>('/common/administrativeDivisionTree')
+ const resp = await api.get[]>('/common/administrativeDivisionByParentCode',{parentCode:'0'})
administrativeDivisionTree.value = resp.data as TreeNodeVo[]
}
@@ -260,15 +261,13 @@ const formItemOptions = ref{
- const resp = await api.post[]>('/enterprisesUnit/queryListByAdministrativeDivisionCodes',values)
- enterprisesUnitIdList.value = resp.data
+ const resp = await api.post[]>('/enterprisesUnit/queryListByAdministrativeDivisionCodes',values)
+ enterprisesUnitIdList.value = resp.data
}
}
},
@@ -420,7 +419,7 @@ const closeModal = async()=>{
securityUserTotal:null,
remark:''
}
- // await formRef.value.resetFields()
+ await formRef.value.resetFields()
enterprisesUnitId.value = ''
serviceTitle.value = '新增服务项目'
isRecruitSecurityHidden.value = false
diff --git a/securityManagement/src/views/test.vue b/securityManagement/src/views/test.vue
index 502b590..4243016 100644
--- a/securityManagement/src/views/test.vue
+++ b/securityManagement/src/views/test.vue
@@ -1,55 +1,11 @@