From 93136c7295c75e59ea8c6a498046adb7f472e30e Mon Sep 17 00:00:00 2001 From: TimSpan Date: Fri, 1 Nov 2024 14:29:45 +0800 Subject: [PATCH 01/14] =?UTF-8?q?=E7=BA=A7=E8=81=94=E6=95=B0=E6=8D=AE=20?= =?UTF-8?q?=E7=BB=84=E4=BB=B6=E6=87=92=E5=8A=A0=E8=BD=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- policeManagement/components.d.ts | 1 + policeManagement/global.d.ts | 202 +++++++++--------- .../src/components/form/FormProMax.vue | 9 +- .../tree/AdministrativeDivisionTree.vue | 84 ++++++++ .../src/types/components/form/index.ts | 5 +- .../src/views/query/publicUnit.vue | 70 +++--- 6 files changed, 235 insertions(+), 136 deletions(-) create mode 100644 policeManagement/src/components/tree/AdministrativeDivisionTree.vue diff --git a/policeManagement/components.d.ts b/policeManagement/components.d.ts index 61c71f9..ee39eea 100644 --- a/policeManagement/components.d.ts +++ b/policeManagement/components.d.ts @@ -16,6 +16,7 @@ declare module 'vue' { AConfigProvider: typeof import('ant-design-vue/es')['ConfigProvider'] ADatePicker: typeof import('ant-design-vue/es')['DatePicker'] ADivider: typeof import('ant-design-vue/es')['Divider'] + AdministrativeDivisionTree: typeof import('./src/components/tree/AdministrativeDivisionTree.vue')['default'] ADropdown: typeof import('ant-design-vue/es')['Dropdown'] AForm: typeof import('ant-design-vue/es')['Form'] AFormItem: typeof import('ant-design-vue/es')['FormItem'] diff --git a/policeManagement/global.d.ts b/policeManagement/global.d.ts index 19b32ff..62be6a1 100644 --- a/policeManagement/global.d.ts +++ b/policeManagement/global.d.ts @@ -1,101 +1,107 @@ declare const __APP_ENV: ImportMetaEnv; - -declare global { - /** - * 全局返回 - */ - interface JsonResult { - code: number; - message: string; - data?: T; - } - - - - export interface SecurityUnitPagerQueryParams { - /** 名称 **/ - name?: string; - /** 社会编码 **/ - socialCode?: string; - /** 行政区划编码 **/ - administrativeDivisionCodes?: string[]; - /** 是否启用 **/ - isEnable?: number; - /** 审核状态 **/ - checkStatus?: number; - } - interface BaseEnum { - value: T; - label: string - } - class TreeNodeVo> { - value: T; - parentValue: T; - label: string; - orderIndex?: number; - children?: TreeNodeVo[] - extData?: E; - } - declare interface Grid { - //栅格占据的列数 - span?: number; - //栅格左侧的间隔格数 - offset?: number; - //栅格向右移动格数 - push?: number; - //栅格向左移动格数 - pull?: number; - //<768px 响应式栅格数或者栅格属性对象 - xs?: number; - //≥768px 响应式栅格数或者栅格属性对象 - sm?: number; - //≥992px 响应式栅格数或者栅格属性对象 - md?: number; - //≥1200px 响应式栅格数或者栅格属性对象 - lg?: number; - //≥1920px 响应式栅格数或者栅格属性对象 - xl?: number; - } - interface dataStatus { - account: string; - password: string; - remark: string; - checkStatus: { - extData: { - color: string; - }; - label: string; - value: number; - }; - } - class SelectNodeVo> { - value: T; - label: string; - options?: SelectNodeVo[] - orderIndex?: number; - disabled?: boolean; - extData?: E - } - - interface ExtData { - color?: string; - } - - interface Option { - label: string; - value: string | number; - extData?: ExtData | null; - } - - interface OptionsResponse { - IsEnable: Option[]; - IsOrNot: Option[]; - Sex: Option[]; - CheckStatus: Option[]; - ServiceProjectType: Option[]; - DeleteFlag: Option[]; - } - - +class TreeNodeVo> { + value: T; + parentValue: T; + label: string; + orderIndex?: number; + children?: TreeNodeVo[] + extData?: E; } +/** + * 全局返回 + */ +interface JsonResult { + code: number; + message: string; + data?: T; +} + + +export interface SecurityUnitPagerQueryParams { + /** 名称 **/ + name?: string; + /** 社会编码 **/ + socialCode?: string; + /** 行政区划编码 **/ + administrativeDivisionCodes?: string[]; + /** 是否启用 **/ + isEnable?: number; + /** 审核状态 **/ + checkStatus?: number; +} +interface BaseEnum { + value: T; + label: string +} +class TreeNodeVo> { + value: T; + parentValue: T; + label: string; + orderIndex?: number; + children?: TreeNodeVo[] + extData?: E; +} +interface Grid { + //栅格占据的列数 + span?: number; + //栅格左侧的间隔格数 + offset?: number; + //栅格向右移动格数 + push?: number; + //栅格向左移动格数 + pull?: number; + //<768px 响应式栅格数或者栅格属性对象 + xs?: number; + //≥768px 响应式栅格数或者栅格属性对象 + sm?: number; + //≥992px 响应式栅格数或者栅格属性对象 + md?: number; + //≥1200px 响应式栅格数或者栅格属性对象 + lg?: number; + //≥1920px 响应式栅格数或者栅格属性对象 + xl?: number; +} +interface dataStatus { + account: string; + password: string; + remark: string; + checkStatus: { + extData: { + color: string; + }; + label: string; + value: number; + }; +} +class SelectNodeVo> { + value: T; + label: string; + options?: SelectNodeVo[] + orderIndex?: number; + disabled?: boolean; + extData?: E +} + +interface ExtData { + color?: string; +} + +interface Option { + label: string; + value: string | number; + extData?: ExtData | null; +} + +interface OptionsResponse { + IsEnable: Option[]; + IsOrNot: Option[]; + Sex: Option[]; + CheckStatus: Option[]; + ServiceProjectType: Option[]; + DeleteFlag: Option[]; +} + + + + diff --git a/policeManagement/src/components/form/FormProMax.vue b/policeManagement/src/components/form/FormProMax.vue index 6bb72b9..63361fe 100644 --- a/policeManagement/src/components/form/FormProMax.vue +++ b/policeManagement/src/components/form/FormProMax.vue @@ -67,6 +67,7 @@ :allowClear="item.componentsProps?.allowClear ?? true" :options="item.options" /> + import { FormInstance } from 'ant-design-vue' -import { ref } from 'vue' +import { defineAsyncComponent, ref } from 'vue' import { FormExpose } from 'ant-design-vue/es/form/Form' import { QuestionCircleOutlined } from '@ant-design/icons-vue' import { FormProMaxItemOptions, FormProMaxItemProps, FormProMaxProps } from '@/types/components/form/index.ts' +import { ComponentProps } from 'vue-component-type-helpers' +import AdministrativeDivisionTree from '@/components/tree/AdministrativeDivisionTree.vue' + +const AdministrativeDivisionTreeComp: ComponentProps = defineAsyncComponent(() => import('@/components/tree/AdministrativeDivisionTree.vue')) const modelValue = defineModel('value', { default: {}, @@ -147,7 +152,7 @@ const props = withDefaults(defineProps>(), { scrollToFirstError: undefined, validateOnRuleChange: undefined, }) -console.log(props) + const formProMaxRef = ref(null!) const getResponsive = (item: FormProMaxItemProps): Grid => { diff --git a/policeManagement/src/components/tree/AdministrativeDivisionTree.vue b/policeManagement/src/components/tree/AdministrativeDivisionTree.vue new file mode 100644 index 0000000..c6a45f4 --- /dev/null +++ b/policeManagement/src/components/tree/AdministrativeDivisionTree.vue @@ -0,0 +1,84 @@ + + + + + diff --git a/policeManagement/src/types/components/form/index.ts b/policeManagement/src/types/components/form/index.ts index 32da75d..36927b9 100644 --- a/policeManagement/src/types/components/form/index.ts +++ b/policeManagement/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 AdministrativeDivisionTree from "@/components/tree/AdministrativeDivisionTree.vue"; type FormProMaxItemType = | 'custom' @@ -32,7 +33,8 @@ type FormProMaxItemType = | 'datePicker' | 'rangePicker' | 'timeRangePicker' - | 'timePicker'; + | 'timePicker' + | 'administrativeDivisionTree' interface FormProMaxItemCommonProps extends ComponentProps { label?: string, @@ -64,6 +66,7 @@ export type FormProMaxItemOptions = { | FormProMaxItemProps<'rangePicker', ComponentProps> | FormProMaxItemProps<'timeRangePicker', ComponentProps> | FormProMaxItemProps<'timePicker', ComponentProps> + | FormProMaxItemProps<'administrativeDivisionTree', ComponentProps> } export interface FormProMaxProps extends FormProps { diff --git a/policeManagement/src/views/query/publicUnit.vue b/policeManagement/src/views/query/publicUnit.vue index 6e28d56..73137b9 100644 --- a/policeManagement/src/views/query/publicUnit.vue +++ b/policeManagement/src/views/query/publicUnit.vue @@ -1,8 +1,7 @@ diff --git a/collect_information/src/pages/police/index/index.vue.bak b/collect_information/src/pages/police/index/index.vue.bak new file mode 100644 index 0000000..9c1ef37 --- /dev/null +++ b/collect_information/src/pages/police/index/index.vue.bak @@ -0,0 +1,57 @@ + + diff --git a/collect_information/types/pages/police/index.ts b/collect_information/types/pages/police/index.ts new file mode 100644 index 0000000..802c4de --- /dev/null +++ b/collect_information/types/pages/police/index.ts @@ -0,0 +1,13 @@ +export interface DataStatisticsRes { + /*企事业单位数量 */ + enterprisesUnitCount: number; + + /*服务项目数量 */ + serviceProjectCount: number; + + /*保安人员数量 */ + securityUserCount: number; + + /*无证保安人员数量 */ + noCardSecurityUserCount: number; +} From 36506f3ffb2cfb792c0e40ed1d8c076b3ed68c1c Mon Sep 17 00:00:00 2001 From: wangyilin <1454641981@qq.com> Date: Thu, 7 Nov 2024 17:12:19 +0800 Subject: [PATCH 14/14] =?UTF-8?q?police=20=E6=B7=BB=E5=8A=A0=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E7=BB=9F=E8=AE=A1=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- collect_information/src/config/index.ts | 2 +- collect_information/src/pages/police/index/index.scss | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/collect_information/src/config/index.ts b/collect_information/src/config/index.ts index 5648223..ba8500d 100644 --- a/collect_information/src/config/index.ts +++ b/collect_information/src/config/index.ts @@ -20,7 +20,7 @@ export const MINI_PROGRAM_USER_CONFIG: Record