。。。

This commit is contained in:
TimSpan 2024-11-15 17:06:59 +08:00
parent 60dd0a5b21
commit c228add1b3
12 changed files with 370 additions and 15 deletions

View File

@ -11,3 +11,12 @@ VITE_APP_PROXY_URL=http://172.10.10.93:8765
# rsa 公钥
VITE_APP_RSA_PUBLIC_KEY=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDJps/EXxxSpEM1Ix4R0NWIOBciHCr7P7coDT8tNKfelgR7txcJOqHCO/MIWe7T04aHQTcpQxqx9hMca7dbqz8TZpz9jvLzE/6ZonVKxHsoFnNlHMp1/CPAJ9f6D9wYicum2KltJkmQ0g//D9W2zPCYoGOmSRFcZx/KEBa4EM53jQIDAQAB
# 高德
VITE_APP_GAODE_KEY=ca549d915cb38803582ca7e85c5f972c
VITE_APP_GAODE_VERSION=2.0
VITE_APP_SECURITY_JS_CODE=432125a0f8d8cad2dac38b77d6f6728f
# VITE_APP_GAODE_KEY=f379a3f860a68d7438526275d6a94b05
# VITE_APP_GAODE_VERSION=2.0
# VITE_APP_SECURITY_JS_CODE=432125a0f8d8cad2dac38b77d6f6728f

View File

@ -8,3 +8,8 @@ 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_GAODE_KEY=f379a3f860a68d7438526275d6a94b05
VITE_APP_GAODE_VERSION=2.0
VITE_APP_SECURITY_JS_CODE=432125a0f8d8cad2dac38b77d6f6728f

View File

@ -23,6 +23,7 @@
"vue-uuid": "^3.0.0"
},
"devDependencies": {
"@amap/amap-jsapi-types": "^0.0.15",
"@types/lodash-es": "^4.17.12",
"@types/node": "^22.5.1",
"@vitejs/plugin-vue": "^5.1.2",
@ -55,6 +56,13 @@
"integrity": "sha512-nPyLKt7Ow/ThHLkSvn2etQlUzqxmTVgK7bIgwdBRTg2HK5668oN7xVxkaiRe3YZEzGzfV2XgH5Jmu2T73ljejw==",
"license": "MIT"
},
"node_modules/@amap/amap-jsapi-types": {
"version": "0.0.15",
"resolved": "https://registry.npmmirror.com/@amap/amap-jsapi-types/-/amap-jsapi-types-0.0.15.tgz",
"integrity": "sha512-oqyRqHpVDZh5bUe2mAJh41ZsziSj0eUzwcfIbiaBNB0eiTJnZNhKsTdk77VOklOjwuwNfsblpKW9LjmWNpeQ7A==",
"dev": true,
"license": "MIT"
},
"node_modules/@ampproject/remapping": {
"version": "2.3.0",
"resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.3.0.tgz",

View File

@ -25,6 +25,7 @@
"vue-uuid": "^3.0.0"
},
"devDependencies": {
"@amap/amap-jsapi-types": "^0.0.15",
"@types/lodash-es": "^4.17.12",
"@types/node": "^22.5.1",
"@vitejs/plugin-vue": "^5.1.2",

View File

@ -0,0 +1,178 @@
/* 扩展ant design pro按钮组件颜色 */
$--my-antd-important: !important;
.btn-danger {
color: #ffffff;
background-color: #F5222D;
border-color: #F5222D;
&:hover,
&:focus {
color: #ffffff $--my-antd-important;
background-color: #ff4d4f $--my-antd-important;
border-color: #ff4d4f $--my-antd-important;
}
&:active,
&.active {
color: #ffffff $--my-antd-important;
background-color: #cf1322 $--my-antd-important;
border-color: #cf1322 $--my-antd-important;
}
}
.btn-volcano {
color: #ffffff;
background-color: #FA541C;
border-color: #FA541C;
&:hover,
&:focus {
color: #ffffff $--my-antd-important;
background-color: #ff7a45 $--my-antd-important;
border-color: #ff7a45 $--my-antd-important;
}
&:active,
&.active {
color: #ffffff $--my-antd-important;
background-color: #d4380d $--my-antd-important;
border-color: #d4380d $--my-antd-important;
}
}
.btn-warn {
color: #ffffff;
background-color: #FAAD14;
border-color: #FAAD14;
&:hover,
&:focus {
color: #ffffff $--my-antd-important;
background-color: #ffc53d $--my-antd-important;
border-color: #ffc53d $--my-antd-important;
}
&:active,
&.active {
color: #ffffff $--my-antd-important;
background-color: #d48806 $--my-antd-important;
border-color: #d48806 $--my-antd-important;
}
}
.btn-success {
color: #ffffff;
background-color: #52C41A;
border-color: #52C41A;
&:hover,
&:focus {
color: #ffffff $--my-antd-important;
background-color: #73d13d $--my-antd-important;
border-color: #73d13d $--my-antd-important;
}
&:active,
&.active {
color: #ffffff $--my-antd-important;
background-color: #389e0d $--my-antd-important;
border-color: #389e0d $--my-antd-important;
}
}
.button-color-cyan {
color: #ffffff;
background-color: #13C2C2;
border-color: #13C2C2;
&:hover,
&:focus {
color: #ffffff $--my-antd-important;
background-color: #36cfc9 $--my-antd-important;
border-color: #36cfc9 $--my-antd-important;
}
&:active,
&.active {
color: #ffffff $--my-antd-important;
background-color: #08979c $--my-antd-important;
border-color: #08979c $--my-antd-important;
}
}
.btn-daybreak {
color: #ffffff;
background-color: #1890FF;
border-color: #1890FF;
&:hover,
&:focus {
color: #ffffff $--my-antd-important;
background-color: #096dd9 $--my-antd-important;
border-color: #096dd9 $--my-antd-important;
}
&:active,
&.active {
color: #ffffff $--my-antd-important;
background-color: #40a9ff $--my-antd-important;
border-color: #40a9ff $--my-antd-important;
}
}
.button-color-geekblue {
color: #ffffff;
background-color: #2F54EB;
border-color: #2F54EB;
&:hover,
&:focus {
color: #ffffff $--my-antd-important;
background-color: #1d39c4 $--my-antd-important;
border-color: #1d39c4 $--my-antd-important;
}
&:active,
&.active {
color: #ffffff $--my-antd-important;
background-color: #597ef7 $--my-antd-important;
border-color: #597ef7 $--my-antd-important;
}
}
.btn-purple {
color: #ffffff;
background-color: #722ED1;
border-color: #722ED1;
&:hover,
&:focus {
color: #ffffff $--my-antd-important;
background-color: #9254de $--my-antd-important;
border-color: #9254de $--my-antd-important;
}
&:active,
&.active {
color: #ffffff $--my-antd-important;
background-color: #531dab $--my-antd-important;
border-color: #531dab $--my-antd-important;
}
}
.table-row-warn td {
background-color: #fefca6;
}
.table-row-danger td {
background-color: #f79988;
}
.table-row-success td {
background-color: #b6fcbe;
}
.ant-table-summary td {
background: #edeff6;
}

View File

@ -7,7 +7,7 @@
<script setup lang="ts">
import { onMounted, onUnmounted, shallowRef } from 'vue'
import { initMap } from '@/utils/aMapUtil'
import { MapContainerProps, MapPlugins } from '@/types/components/map'
import { MapContainerProps, MapPlugins } from '@/types/components/map/index.ts'
const props = withDefaults(defineProps<MapContainerProps>(), {
plugins: (): MapPlugins[] => {

View File

@ -1,19 +1,16 @@
import {createApp} from 'vue'
import { createApp } from 'vue'
import App from '@/App.vue'
import '@/reset.css'
import './index.css'
// 公共样式
import '@/assets/scss/common.scss'
// iconfont css
import '@/assets/scss/myAntD.scss'
import "@/assets/iconfont/iconfont.css";
// vue Router
import router from "@/router";
// pinia stores
import pinia from "@/stores";
const vueApp = createApp(App);
import {initEnums} from "@/config/dict.ts";
import { initEnums } from "@/config/dict.ts";
//高德类型声明文件
import "@amap/amap-jsapi-types";
initEnums()
vueApp
.use(router)

View File

@ -0,0 +1,44 @@
/**
*
* @link https://lbs.amap.com/api/javascript-api-v2/guide/abc/plugins-list
*/
export type MapPlugins =
'AMap.ElasticMarker'
| 'AMap.ToolBar'
| 'AMap.Scale'
| 'AMap.HawkEye'
| 'AMap.ControlBar'
| 'AMap.MapType'
| 'AMap.Geolocation'
| 'AMap.AutoComplete'
| 'AMap.PlaceSearch'
| 'AMap.DistrictSearch'
| 'AMap.LineSearch'
| 'AMap.StationSearch'
| 'AMap.Driving'
| 'AMap.TruckDriving'
| 'AMap.Transfer'
| 'AMap.Walking'
| 'AMap.Riding'
| 'AMap.DragRoute'
| 'AMap.Geocoder'
| 'AMap.CitySearch'
| 'AMap.IndoorMap'
| 'AMap.MouseTool'
| 'AMap.CircleEditor'
| 'AMap.PolygonEditor'
| 'AMap.PolylineEditor'
| 'AMap.RectangleEditor'
| 'AMap.EllipseEditor'
| 'AMap.BezierCurveEditor'
| 'AMap.MarkerCluster'
| 'AMap.RangingTool'
| 'AMap.CloudDataSearch'
| 'AMap.Weather'
| 'AMap.HeatMap'
export interface MapContainerProps {
plugins?: MapPlugins[],
initCallback?: (map: AMap.Map) => void,
mapOptions?: AMap.MapOptions
}

View File

@ -0,0 +1,110 @@
import { BaseTableRowRecord } from "@/types/components/table";
export interface PoliceUnitPagerQueryParams {
/** 名称 **/
name?: string;
/** 代码 **/
code?: string;
/** 行政区划 **/
administrativeDivisionCodes?: string[];
/** 是否启用 **/
isEnable?: BaseEnum<number>;
/** 审核状态 **/
checkStatus?: BaseEnum<number>;
}
export interface PoliceUnitPagerVo extends BaseTableRowRecord {
/** 名称 **/
name?: string;
/** 代码 **/
code?: string;
/** 省编码 **/
province?: string;
/** 省名字 **/
provinceName?: string;
/** 市编码 **/
city?: string;
/** 市名字 **/
cityName?: string;
/** 区/县编码 **/
districts?: string;
/** 区/县名字 **/
districtsName?: string;
/** 街道编码 **/
street?: string;
/** 街道编码 **/
streetName?: string;
/** 详细地址 **/
address?: string;
/** 联系人 **/
contactPersonInfo?: {
name: string;
telephone: string;
};
/** 是否启用 **/
isEnable?: BaseEnum<number>;
/** 审核状态 **/
checkStatus?: BaseEnum<number>;
}
export interface EnterprisesUnitPagerQueryParams {
/** 公安单位id **/
policeUnitId: string;
}
export interface EnterprisesUnitPagerVo extends BaseTableRowRecord {
/** 名字 **/
name?: string;
type: BaseEnum<string>
/** 公安单位id **/
policeUnitId: string;
/** 省编码 **/
province?: string;
/** 省名称 **/
provinceName?: string;
/** 市编码 **/
city?: string;
/** 市名称 **/
cityName?: string;
/** 区编码 **/
districts?: string;
/** 区名称 **/
districtsName?: string;
/** 街编码 **/
street?: string;
/** 街名称 **/
streetName?: string;
/** 地址 **/
address?: string;
point: [number, number]
/** 联系方式 **/
contactPersonInfo?: {
name: string;
telephone: string;
};
/** 备注 **/
remark?: string;
}
export interface EnterprisesUnitSaveOrUpdateParams {
/** id **/
snowFlakeId?: string;
/** 公安单位id **/
policeUnitId: string;
/** 名称 **/
name: string;
/** 类型 **/
type: string;
/** 行政区划编码 **/
administrativeDivisionCodes: string[];
/** 详细地址 **/
address?: string;
point?: [number, number]
/** 联系人 **/
contactPersonInfo?: {
name: string;
telephone: string;
};
/** 备注 **/
remark?: string;
}

View File

@ -1,5 +1,5 @@
import AMapLoader from "@amap/amap-jsapi-loader";
import { MapPlugins } from "@/types/components/map";
import { MapPlugins } from "@/types/components/map/index";
export const initMap = (plugins?: MapPlugins[]): Promise<typeof AMap> => new Promise((resolve, reject) => {
//@ts-ignore

View File

@ -47,6 +47,7 @@ const saveOrUpdateEnterprisesUnit = (params: _FormType, callback: Function) => {
required: true,
customRender: () => {
return (
// AutoComplete 自动完成 组件
<AutoComplete
v-model:value={_formParams.value.name}
options={autoAddress.value}
@ -56,6 +57,8 @@ const saveOrUpdateEnterprisesUnit = (params: _FormType, callback: Function) => {
initMarker(_mapRef.value?.mapInstance)
}}
onSearch={debounce((val: string) => {
console.log('onSearch___________________', val)
//@ts-ignore
const auto = new AMap.AutoComplete({
city: city,
@ -125,7 +128,7 @@ const saveOrUpdateEnterprisesUnit = (params: _FormType, callback: Function) => {
customRender: () => (
<MapContainer
ref={_mapRef}
plugins={['AMap.AutoComplete']}
plugins={['AMap.AutoComplete', 'AMap.PlaceSearch']}
style={{ width: '100%', height: '300px', position: 'relative' }}
initCallback={(map) => {
const contextMenu = new AMap.ContextMenu()

View File

@ -54,9 +54,9 @@ interface ImportMetaEnv {
readonly VITE_APP_RSA_PUBLIC_KEY: string;
// 高德
readonly VITE_APP_GAODE_KEY: string
readonly VITE_APP_GAODE_VERSION: string
readonly VITE_APP_SECURITY_JS_CODE: string
VITE_APP_GAODE_KEY: string
VITE_APP_GAODE_VERSION: string
VITE_APP_SECURITY_JS_CODE: string
}
declare module '*.vue' {