diff --git a/collect_information/src/assets/images/project.png b/collect_information/src/assets/images/project.png index 8de6ed4..9aef305 100644 Binary files a/collect_information/src/assets/images/project.png and b/collect_information/src/assets/images/project.png differ diff --git a/collect_information/src/assets/images/回单.jpg b/collect_information/src/assets/images/回单.jpg new file mode 100644 index 0000000..20479b9 Binary files /dev/null and b/collect_information/src/assets/images/回单.jpg differ diff --git a/collect_information/src/assets/images/工单.jpg b/collect_information/src/assets/images/工单.jpg new file mode 100644 index 0000000..da046c5 Binary files /dev/null and b/collect_information/src/assets/images/工单.jpg differ diff --git a/collect_information/src/assets/images/排名.jpg b/collect_information/src/assets/images/排名.jpg new file mode 100644 index 0000000..96e4510 Binary files /dev/null and b/collect_information/src/assets/images/排名.jpg differ diff --git a/collect_information/src/assets/images/法制宣传.jpg b/collect_information/src/assets/images/法制宣传.jpg new file mode 100644 index 0000000..21d0e0d Binary files /dev/null and b/collect_information/src/assets/images/法制宣传.jpg differ diff --git a/collect_information/src/assets/images/考核监督.jpg b/collect_information/src/assets/images/考核监督.jpg new file mode 100644 index 0000000..0f9f7cc Binary files /dev/null and b/collect_information/src/assets/images/考核监督.jpg differ diff --git a/collect_information/src/assets/images/警保风采.jpg b/collect_information/src/assets/images/警保风采.jpg new file mode 100644 index 0000000..8de01b4 Binary files /dev/null and b/collect_information/src/assets/images/警保风采.jpg differ diff --git a/collect_information/src/config/index.ts b/collect_information/src/config/index.ts index f9bd5c6..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 - + + + + 单位数量 + {{ numberStatistics.enterprisesUnitCount }} + + + 服务项目 + + {{ numberStatistics.serviceProjectCount }} + + + + 有保安证人员 + {{ numberStatistics.securityUserCount }} + + + 无保安证人员 + {{ numberStatistics.noCardSecurityUserCount }} + + 请选择 - + - {{ item.name }} + {{ item.name }} + 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/src/pages/projectManager/index/index.scss b/collect_information/src/pages/projectManager/index/index.scss index b802829..5308805 100644 --- a/collect_information/src/pages/projectManager/index/index.scss +++ b/collect_information/src/pages/projectManager/index/index.scss @@ -1,48 +1,73 @@ +.nameTitle { + position: absolute; + top: 277rpx; + left: 55px; + height: 125rpx; + background-color: #fff; + width: 650rpx; + border-radius: 12rpx; + box-shadow: 0px 10px 10px -4px #e3e3e3; + display: flex; + justify-content: space-between; + align-items: center; + + .itemSchool { + border-right: solid 1.5rpx #dadada; + display: flex; + flex-direction: column; + align-items: center; + width: 25%; + font-size: 24px + } + + .itemSchool text:nth-child(1) { + margin-bottom: 10rpx; + color: #898a8a; + margin-left: -8px; + } +} .swiperDemoItem { color: #3886d0; display: flex; padding: 20px 0 0 50px; overflow: hidden; height: 70rpx; + margin-top: 70px; .swiperDemoIndex { width: 15px; height: 45px; background-image: linear-gradient(to bottom, #5d9cf9, #317ad9); - //background: rgb(); border-radius: 20px; margin-right: 15px; } } - -.subModule { - display: flex; - align-items: center; - flex-wrap: wrap; - margin-right: -3px; - margin-left: -1px; - - .subModuleItem { - width: 33%; - height: 180rpx; +.Module { + background-color: #fff; + overflow: hidden; + .subModule { display: flex; - flex-direction: column; align-items: center; - justify-content: center; - padding-bottom: 10rpx; - border: 1px solid #ccc; - border-left: 0; - margin-top: -1px; - - .subModuleIndex { - width: 65rpx; - height: 65rpx; - - image { - width: 100%; - height: 100%; + flex-wrap: wrap; + .subModuleItem { + width: 246rpx; + height: 140rpx; + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; + padding-bottom: 10rpx; + .subModuleIndex { + width: 45rpx; + height: 45rpx; + image { + width: 100%; + height: 100%; + } } } } + } + diff --git a/collect_information/src/pages/projectManager/index/index.vue b/collect_information/src/pages/projectManager/index/index.vue index e8827e9..fb842a5 100644 --- a/collect_information/src/pages/projectManager/index/index.vue +++ b/collect_information/src/pages/projectManager/index/index.vue @@ -2,53 +2,101 @@ - + 1123 + + + 单位数量 + 51 + + + 服务项目 + + 13123 + + + + 有保安证人员 + 1000 + + + 无保安证人员 + 140 + + 请选择 - - - + + + - {{ item.name }} + {{item.name}} + + + + diff --git a/superManagement/src/components/layout/MenuItem.vue b/superManagement/src/components/layout/MenuItem.vue index feb26ca..6323222 100644 --- a/superManagement/src/components/layout/MenuItem.vue +++ b/superManagement/src/components/layout/MenuItem.vue @@ -19,7 +19,6 @@ > {{ item.title }} diff --git a/superManagement/src/components/tree/AdministrativeDivisionTree.vue b/superManagement/src/components/tree/AdministrativeDivisionTree.vue index c6a45f4..3822dfd 100644 --- a/superManagement/src/components/tree/AdministrativeDivisionTree.vue +++ b/superManagement/src/components/tree/AdministrativeDivisionTree.vue @@ -1,11 +1,9 @@ @@ -14,18 +12,14 @@ import api from "@/axios"; import {onMounted, ref} from "vue"; import {CascaderProps} from "ant-design-vue"; import {isEmpty} from "lodash-es"; +import {AdministrativeDivisionTreeProps} from "@/types/components/tree"; -withDefaults(defineProps<{ - placeholder?: string, - changeOnSelect?: boolean - allowClear?: boolean -}>(), { +const props = withDefaults(defineProps(), { placeholder: '请选择行政区划', changeOnSelect: true, - allowClear: true + allowClear: true, }) - const modelValue = defineModel('value', { default: [] }) diff --git a/superManagement/src/config/dict.ts b/superManagement/src/config/dict.ts index 7175c25..ed69da7 100644 --- a/superManagement/src/config/dict.ts +++ b/superManagement/src/config/dict.ts @@ -8,6 +8,8 @@ type DictType = | 'Sex' | 'ServiceProjectType' | 'MiniProgramUserIdentity' + | 'EnterprisesUnitType' + | 'SelectType' export const initDict = () => { api.get[]>>('/common/enums').then(resp => { diff --git a/superManagement/src/config/index.ts b/superManagement/src/config/index.ts index 3494115..93fcb7f 100644 --- a/superManagement/src/config/index.ts +++ b/superManagement/src/config/index.ts @@ -21,13 +21,23 @@ export const SYSTEM_MENUS: SystemMenu[] = [ type: 'dir', children: [ { - title: '公安单位', - name: 'policeUnit', - path: '/policeUnit', - type: 'menu', - // icon: 'icon-policeman-full', - // size: '16', - component: () => import('@/views/unitManage/policeUnit/index.vue') + title: '公安', + name: 'police', + path: '/police', + type: 'dir', + children: [{ + title: '单位管理', + name: 'policeUnitManage', + path: '/police/unitManage', + type: 'menu', + component: () => import('@/views/unitManage/police/unitManage/index.vue') + }, { + title: '考核标准', + name: 'policeAssessmentCriteria', + path: '/police/assessmentCriteria', + type: 'menu', + component: () => import('@/views/unitManage/police/assessmentCriteria/index.vue') + }] }, { title: '保安单位', name: 'securityUnit', @@ -36,5 +46,12 @@ export const SYSTEM_MENUS: SystemMenu[] = [ component: () => import('@/views/unitManage/securityUnit/index.vue') } ] + }, { + title: '数据总览', + name: 'dataOverview', + path: '/dataOverview', + type: 'menu', + isFull: true, + component: () => import('@/views/data/dataOverview.vue') } ] diff --git a/superManagement/src/main.ts b/superManagement/src/main.ts index fc498ba..27927ba 100644 --- a/superManagement/src/main.ts +++ b/superManagement/src/main.ts @@ -13,6 +13,8 @@ import router from "@/router"; // pinia stores import pinia from "@/stores"; import {initDict} from "@/config/dict.ts"; +//高德类型声明文件 +import "@amap/amap-jsapi-types"; initDict(); diff --git a/superManagement/src/router/staticRouters.ts b/superManagement/src/router/staticRouters.ts index 70c4ab1..a4e2afe 100644 --- a/superManagement/src/router/staticRouters.ts +++ b/superManagement/src/router/staticRouters.ts @@ -2,33 +2,47 @@ import {RouteRecordRaw} from "vue-router"; import {SYSTEM_MENUS} from "@/config"; import {SystemMenu} from "@/types/config"; +const routerClassify: Record<'layout' | 'full', RouteRecordRaw[]> = { + layout: [], + full: [] +} + /** * 提取菜单路由 */ -const extractMenuToRouter = (): RouteRecordRaw[] => { - const result: RouteRecordRaw[] = [] +const extractMenuToRouter = () => { const traverse = (data: SystemMenu[]) => { data.forEach(item => { if (item.type === 'dir' && item.children && item.children.length > 0) { traverse(item.children) } else { - result.push({ - path: item.path, - name: item.name, - meta: { - title: item.title - }, - component: item.component - } as RouteRecordRaw) + if (!item.isFull) { + routerClassify.layout.push({ + path: item.path, + name: item.name, + meta: { + title: item.title + }, + component: item.component + } as RouteRecordRaw) + } else { + routerClassify.full.push({ + path: item.path, + name: item.name, + meta: { + title: item.title + }, + component: item.component + } as RouteRecordRaw) + } } }) } - traverse(SYSTEM_MENUS) - - return result; } +extractMenuToRouter() + export const staticRouter: RouteRecordRaw[] = [ { path: '/login', @@ -45,8 +59,10 @@ export const staticRouter: RouteRecordRaw[] = [ name: 'layout', redirect: '/index', component: () => import("@/components/layout/Layout.vue"), - children: extractMenuToRouter() - }, { + children: routerClassify.layout + }, + ...routerClassify.full, + { path: '/test', name: 'test', component: () => import("@/views/test.vue"), diff --git a/superManagement/src/types/components/tree/index.ts b/superManagement/src/types/components/tree/index.ts new file mode 100644 index 0000000..8b14928 --- /dev/null +++ b/superManagement/src/types/components/tree/index.ts @@ -0,0 +1,7 @@ +export interface AdministrativeDivisionTreeProps { + placeholder?: string, + changeOnSelect?: boolean + allowClear?: boolean + onChange?: (value: (string | number[]), selectedOptions: TreeNodeVo[]) => void + displayRender?: (opt: { labels: string[], selectedOptions: TreeNodeVo[] }) => string +} diff --git a/superManagement/src/types/config/index.ts b/superManagement/src/types/config/index.ts index f81e2db..f9c23a8 100644 --- a/superManagement/src/types/config/index.ts +++ b/superManagement/src/types/config/index.ts @@ -4,6 +4,7 @@ export interface SystemMenu { type: 'dir' | 'menu'; title: string; path: string; + isFull?: boolean; name: string; icon?: string; diff --git a/superManagement/src/types/views/unitManage/police/assessmentCriteria.ts b/superManagement/src/types/views/unitManage/police/assessmentCriteria.ts new file mode 100644 index 0000000..206ea15 --- /dev/null +++ b/superManagement/src/types/views/unitManage/police/assessmentCriteria.ts @@ -0,0 +1,90 @@ +import {BaseTableRowRecord} from "@/types/components/table"; + +export interface CkProjectPagerVo extends BaseTableRowRecord { + name: string; + type: BaseEnum + totalScore: number + remark: string; +} + +export interface CkProjectPagerQueryParams { + name: string; + type: string +} + +export interface SaveOrUpdateCkProjectParams { + /*考核项目id */ + snowFlakeId?: string; + /*考核项目名称 */ + name: string; + /*对应企事业单位类型,可用值:school,hospital,community,bank */ + type: string; + /*考核总分 */ + totalScore: number; + /*备注 */ + remark?: string; +} + +export interface SaveOrUpdateCkGroupParams { + /*考核分组id */ + snowFlakeId?: string; + /*考核项目id */ + ckProjectId?: string; + /*考核组名称 */ + name: string; + /*考核组总分 */ + totalScore: number; + /*备注 */ + remark?: string; +} + +export interface SaveOrUpdateCkItemParams { + /*id */ + snowFlakeId?: string; + /*考核组id */ + ckGroupId: string; + /*考核项名称 */ + name: string; + /*组件类型,可用值:RADIO,MULTIPLE */ + type: string; + /*备注 */ + remark?: string; +} + +export interface SaveOrUpdateCkStandardParams { + /*考核标准id */ + snowFlakeId?: string; + /*考核项id */ + ckItemId: string; + /*标准名 */ + name: string; + /*扣分值 */ + deductionPoints: number; +} + +export interface CkProjectDetailRes { + /*考核分组id */ + ckGroupId: string; + groupRowSpan: number; + /*考核分组名字 */ + groupName: string; + /*考核分组总分 */ + groupTotalScore: number; + /*考核分组备注 */ + groupRemark: string; + /*考核项id */ + ckItemId: string; + itemRowSpan: number; + /*考核项名字 */ + itemName: string; + /*考核项备注 */ + itemRemark: string; + /*考核标准id */ + ckStandardId: string; + /*考核标准条件 */ + standardName: string; + /*扣分数 */ + deductionPoints: number; + /*选择类型,可用值:RADIO,MULTIPLE */ + type: BaseEnum; +} diff --git a/superManagement/src/types/views/unitManage/policeUnit.ts b/superManagement/src/types/views/unitManage/police/policeUnit.ts similarity index 95% rename from superManagement/src/types/views/unitManage/policeUnit.ts rename to superManagement/src/types/views/unitManage/police/policeUnit.ts index ce0e7ec..7c38d1b 100644 --- a/superManagement/src/types/views/unitManage/policeUnit.ts +++ b/superManagement/src/types/views/unitManage/police/policeUnit.ts @@ -55,6 +55,7 @@ export interface EnterprisesUnitPagerQueryParams { export interface EnterprisesUnitPagerVo extends BaseTableRowRecord { /** 名字 **/ name?: string; + type: BaseEnum /** 公安单位id **/ policeUnitId: string; /** 省编码 **/ @@ -75,6 +76,7 @@ export interface EnterprisesUnitPagerVo extends BaseTableRowRecord { streetName?: string; /** 地址 **/ address?: string; + point: [number, number] /** 联系方式 **/ contactPersonInfo?: { name: string; @@ -91,10 +93,13 @@ export interface EnterprisesUnitSaveOrUpdateParams { policeUnitId: string; /** 名称 **/ name: string; + /** 类型 **/ + type: string; /** 行政区划编码 **/ administrativeDivisionCodes: string[]; /** 详细地址 **/ address?: string; + point?: [number, number] /** 联系人 **/ contactPersonInfo?: { name: string; diff --git a/superManagement/src/utils/aMapUtil.ts b/superManagement/src/utils/aMapUtil.ts new file mode 100644 index 0000000..5d90620 --- /dev/null +++ b/superManagement/src/utils/aMapUtil.ts @@ -0,0 +1,18 @@ +import AMapLoader from "@amap/amap-jsapi-loader"; + +type Amap = typeof AMap; +export const initMap = (plugins?: string[]): Promise => new Promise((resolve, reject) => { + //@ts-ignore + window._AMapSecurityConfig = { + securityJsCode: __APP_ENV.VITE_APP_SECURITY_JS_CODE + } + AMapLoader.load({ + key: __APP_ENV.VITE_APP_GAODE_KEY, + version: __APP_ENV.VITE_APP_GAODE_VERSION, + plugins + }).then((AMap: Amap) => { + resolve(AMap) + }).catch(err => { + reject(err) + }) +}) diff --git a/superManagement/src/views/data/dataOverview.vue b/superManagement/src/views/data/dataOverview.vue new file mode 100644 index 0000000..2383d4d --- /dev/null +++ b/superManagement/src/views/data/dataOverview.vue @@ -0,0 +1,13 @@ + + + + + diff --git a/superManagement/src/views/test.vue b/superManagement/src/views/test.vue index 0ada657..63c312f 100644 --- a/superManagement/src/views/test.vue +++ b/superManagement/src/views/test.vue @@ -1,13 +1,4 @@ - - - - diff --git a/superManagement/src/views/unitManage/police/assessmentCriteria/index.ts b/superManagement/src/views/unitManage/police/assessmentCriteria/index.ts new file mode 100644 index 0000000..beb5e85 --- /dev/null +++ b/superManagement/src/views/unitManage/police/assessmentCriteria/index.ts @@ -0,0 +1,188 @@ +import { + CkProjectDetailRes, + SaveOrUpdateCkGroupParams, + SaveOrUpdateCkItemParams, SaveOrUpdateCkProjectParams, SaveOrUpdateCkStandardParams +} from "@/types/views/unitManage/police/assessmentCriteria.ts"; +import {deleteDataModal, submitSimpleFormModal} from "@/components/tsx/ModalPro.tsx"; +import api from "@/axios"; +import {message} from "ant-design-vue"; +import {dictSelectNodes} from "@/config/dict.ts"; + +export const saveOrUpdateCkProject = (params: SaveOrUpdateCkProjectParams = { + name: '', + totalScore: 100, + remark: '', + type: 'school' +}, callback: Function) => { + submitSimpleFormModal({ + title: params.snowFlakeId ? `编辑【${params.name}】` : '添加考核项目', + formParams: params, + formOptions: { + name: { + type: 'input', + label: '考核项目名称', + required: true + }, + type: { + type: 'select', + label: '考核类型', + required: true, + options: dictSelectNodes('EnterprisesUnitType') + }, + totalScore: { + type: 'inputNumber', + label: '总分', + required: true, + componentsProps: { + precision: 0 + } + }, + remark: { + type: 'inputTextArea', + label: '备注' + } + }, + submit: async (params) => { + const resp = await api.post('/assessmentCriteria/saveOrUpdateCkProject', params) + message.success(resp.message) + callback && callback() + } + }) +} + +export const deleteCkProjectById = (name: string, ckProjectId: string, callback: Function) => { + deleteDataModal(name, async () => { + const resp = await api.delete('/assessmentCriteria/deleteCkProjectById', { + ckProjectId + }) + message.success(resp.message) + callback && callback(); + }) +} + +export const ckProjectDetail = async (ckProjectId: string): Promise => { + const {data} = await api.get('/assessmentCriteria/ckProjectDetail', {ckProjectId}) + + const groupRowSpan: Record = {} + const itemRowSpan: Record = {} + + data.forEach((item, index) => { + //如果第一次没有值 + if (item.ckGroupId) { + if (!groupRowSpan[item.ckGroupId]) { + groupRowSpan[item.ckGroupId] = {count: 1, firstIndex: index} + } else { + groupRowSpan[item.ckGroupId].count++; + data[index].groupRowSpan = 0 + } + } + + if (item.ckItemId) { + if (!itemRowSpan[item.ckItemId]) { + itemRowSpan[item.ckItemId] = {count: 1, firstIndex: index} + } else { + itemRowSpan[item.ckItemId].count++; + data[index].itemRowSpan = 0 + } + } + }) + + Object.values(groupRowSpan).forEach(({count, firstIndex}) => { + data[firstIndex].groupRowSpan = count; + }) + + Object.values(itemRowSpan).forEach(({count, firstIndex}) => { + data[firstIndex].itemRowSpan = count; + }) + + return data +} + +export const saveOrUpdateCkGroup = (params: SaveOrUpdateCkGroupParams, callback: Function) => { + submitSimpleFormModal({ + title: params.snowFlakeId ? `编辑【${params.name}】` : '添加考核分组', + formParams: params, + formOptions: { + name: { + type: 'input', + label: '分组名字', + required: true + }, + totalScore: { + type: 'inputNumber', + label: '分组总分', + required: true, + componentsProps: { + precision: 0 + } + }, + remark: { + type: 'inputTextArea', + label: '备注' + } + }, + submit: async (params) => { + const resp = await api.post('/assessmentCriteria/saveOrUpdateCkGroup', params) + message.success(resp.message) + callback && callback() + } + }) +} + +export const saveOrUpdateCkItem = (params: SaveOrUpdateCkItemParams, callback: Function) => { + submitSimpleFormModal({ + title: params.snowFlakeId ? `编辑【${params.name}】` : '添加考核项', + formParams: params, + formOptions: { + name: { + type: 'input', + label: '考核项', + required: true + }, + type: { + type: 'radioGroup', + label: '控件类型', + required: true, + options: dictSelectNodes('SelectType') + }, + remark: { + type: 'inputTextArea', + label: '备注' + } + }, + submit: async (params) => { + const resp = await api.post('/assessmentCriteria/saveOrUpdateCkItem', params) + message.success(resp.message) + callback && callback() + } + }) +} + +export const saveOrUpdateCkStandard = (params: SaveOrUpdateCkStandardParams, callback: Function) => { + submitSimpleFormModal({ + title: params.snowFlakeId ? `编辑【${params.name}】` : '添加考核标准', + formParams: params, + formOptions: { + name: { + type: 'input', + label: '标准', + required: true + }, + deductionPoints: { + type: 'inputNumber', + label: '扣分值', + required: true, + componentsProps: { + precision: 1 + } + } + }, + submit: async (params) => { + const resp = await api.post('/assessmentCriteria/saveOrUpdateCkStandard', params) + message.success(resp.message) + callback && callback() + } + }) +} + + diff --git a/superManagement/src/views/unitManage/police/assessmentCriteria/index.vue b/superManagement/src/views/unitManage/police/assessmentCriteria/index.vue new file mode 100644 index 0000000..12f2aef --- /dev/null +++ b/superManagement/src/views/unitManage/police/assessmentCriteria/index.vue @@ -0,0 +1,284 @@ + + + + + diff --git a/superManagement/src/views/unitManage/police/unitManage/index.tsx b/superManagement/src/views/unitManage/police/unitManage/index.tsx new file mode 100644 index 0000000..e4ef716 --- /dev/null +++ b/superManagement/src/views/unitManage/police/unitManage/index.tsx @@ -0,0 +1,236 @@ +import {TableProMaxProps, TableProMaxSlots} from "@/types/components/table"; +import { + EnterprisesUnitPagerQueryParams, + EnterprisesUnitPagerVo, EnterprisesUnitSaveOrUpdateParams, + PoliceUnitPagerVo +} from "@/types/views/unitManage/police/policeUnit.ts"; +import {ref} from "vue"; +import {FormExpose} from "ant-design-vue/es/form/Form"; +import {ComponentExposed} from "vue-component-type-helpers"; +import MapContainer from "@/components/aMap/MapContainer.vue"; +import {FormProMaxItemOptions} from "@/types/components/form"; +import {dictSelectNodes} from "@/config/dict.ts"; +import {Button, message, Modal, Space} from "ant-design-vue"; +import api from "@/axios"; +import TableProMax from "@/components/table/TableProMax.vue"; +import {deleteDataModal} from "@/components/tsx/ModalPro.tsx"; +import {PageParams} from "@/types/hooks/useTableProMax.ts"; +import FormProMax from "@/components/form/FormProMax.vue"; + +type _TableProps = TableProMaxProps; +type _FormType = EnterprisesUnitSaveOrUpdateParams & { + contactPersonInfoName?: string; + contactPersonInfoTelephone?: string +} +const saveOrUpdateEnterprisesUnit = (params: _FormType, callback: Function) => { + const _formRef = ref(null) + const _mapRef = ref>(null) + const _formParams = ref<_FormType>({...params}) + + let city = ''; + + const initMarker = (map: AMap.Map) => { + //添加maker点 设置point + const maker = new AMap.Marker({ + position: _formParams.value.point, + draggable: true + }) + maker.on("dragend", ({lnglat}) => { + _formParams.value.point = lnglat + }) + map.clearMap() + map.add(maker) + map.setFitView() + console.log(123); + } + + const _formOptions = ref>({ + name: { + type: 'input', + label: '单位名称', + required: true, + }, + type: { + type: 'select', + label: '单位类型', + required: true, + options: dictSelectNodes('EnterprisesUnitType') + }, + administrativeDivisionCodes: { + type: 'administrativeDivisionTree', + label: '行政区划', + required: true, + componentsProps: { + displayRender: ({labels}): string => { + city = labels[0] + return labels.join(' / '); + } + } + }, + address: { + type: 'inputTextArea', + label: '详细地址', + }, + map: { + type: 'custom', + label: '经纬度', + customRender: () => { + AMap.plugin(['AMap.AutoComplete'], () => { + //@ts-ignore + const auto = new AMap.AutoComplete({ + city, + input: "tipinput" + }); + //注册监听,当选中某条记录时会触发 + auto.on("select", (e) => { + //有些点位可能没有经纬度信息 + if (!e.poi.location) { + message.error('所选点位没有经纬度信息 建议选则附近的手动移动!'); + return + } + _formParams.value.point = e.poi.location + initMarker(map) + }); + }) + if (_formParams.value.point) { + initMarker(map) + } + }} + > +
+ +
+
+ }, + contactPersonInfoName: { + type: 'input', + label: '联系人名称' + }, + contactPersonInfoTelephone: { + type: 'input', + label: '联系人电话' + }, + remark: { + type: 'inputTextArea', + label: '备注' + } + }) + Modal.confirm({ + title: params.snowFlakeId ? `【${params.name}】 信息编辑` : '新增企事业单位', + width: 600, + icon: ' ', + centered: true, + content: () => , + onOk: async () => { + await _formRef.value?.validate() + const resp = await api.post('/enterprisesUnit/saveOrUpdate', { + ..._formParams.value, + contactPersonInfo: { + name: _formParams.value.contactPersonInfoName, + telephone: _formParams.value.contactPersonInfoTelephone + } + }) + message.success(resp.message) + callback && callback() + } + }) +} + +export const showEnterprisesUnit = (policeUnitPagerVo: PoliceUnitPagerVo) => { + const _tableRef = ref>(null) + const _columns: _TableProps['columns'] = [ + { + dataIndex: 'name', + title: '名称' + }, { + dataIndex: 'type', + title: '类型', + customRender: ({text}) => text?.label + }, { + dataIndex: 'contactPersonInfo', + title: '联系人', + customRender: ({text}) => text?.name + "/" + text.telephone + }, { + dataIndex: 'province', + title: '行政区划', + customRender: ({record}) => [record.provinceName, record.cityName, record.districtsName, record.streetName].filter(Boolean).join("/") + }, { + dataIndex: 'address', + title: '详细地址' + }, { + dataIndex: 'remark', + title: '备注' + }, { + dataIndex: 'createTime', + title: '创建时间' + }, { + dataIndex: 'opt', + title: '操作', + customRender: ({record}) => + + + + } + ] + const _reqApi: _TableProps["requestApi"] = (params) => { + (params as PageParams).params.policeUnitId = policeUnitPagerVo.snowFlakeId + return api.post('/enterprisesUnit/pager', params) + } + Modal.info({ + title: `【${policeUnitPagerVo.name}】 管辖企事业单位`, + width: '80%', + content: () => { + return + + + + } + } as TableProMaxSlots} + /> + }) +} diff --git a/superManagement/src/views/unitManage/police/unitManage/index.vue b/superManagement/src/views/unitManage/police/unitManage/index.vue new file mode 100644 index 0000000..3c3975d --- /dev/null +++ b/superManagement/src/views/unitManage/police/unitManage/index.vue @@ -0,0 +1,159 @@ + + + + + diff --git a/superManagement/src/views/unitManage/policeUnit/index.vue b/superManagement/src/views/unitManage/police/unitManage/index.vue.bak similarity index 100% rename from superManagement/src/views/unitManage/policeUnit/index.vue rename to superManagement/src/views/unitManage/police/unitManage/index.vue.bak diff --git a/superManagement/src/views/unitManage/test.vue b/superManagement/src/views/unitManage/test.vue deleted file mode 100644 index 5871ec4..0000000 --- a/superManagement/src/views/unitManage/test.vue +++ /dev/null @@ -1,11 +0,0 @@ - - - - - diff --git a/superManagement/src/vite-env.d.ts b/superManagement/src/vite-env.d.ts index c49a709..c061ab6 100644 --- a/superManagement/src/vite-env.d.ts +++ b/superManagement/src/vite-env.d.ts @@ -19,6 +19,11 @@ interface ImportMetaEnv { // RSA公钥 readonly VITE_APP_RSA_PUBLIC_KEY: string; + + // 高德 + VITE_APP_GAODE_KEY: string + VITE_APP_GAODE_VERSION: string + VITE_APP_SECURITY_JS_CODE: string } declare module '*.vue' {