master
parent
4041a8c2cb
commit
dfcad17fb4
|
|
@ -4,11 +4,7 @@
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8"/>
|
<meta charset="UTF-8"/>
|
||||||
<meta content="width=device-width, initial-scale=1.0" name="viewport"/>
|
<meta content="width=device-width, initial-scale=1.0" name="viewport"/>
|
||||||
<script charset="utf-8"
|
<script></script>
|
||||||
src="https://map.qq.com/api/gljs?v=1.exp&key=3TGBZ-ZK7K5-CMNIK-ICIGZ-K6TYQ-HTBTZ&libraries=service"></script>
|
|
||||||
|
|
||||||
<script charset="utf-8"
|
|
||||||
src="https://map.qq.com/api/gljs?libraries=tools&v=1.exp&key=3TGBZ-ZK7K5-CMNIK-ICIGZ-K6TYQ-HTBTZ"></script>
|
|
||||||
<style>
|
<style>
|
||||||
* {
|
* {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
|
|
|
||||||
|
|
@ -32,6 +32,7 @@
|
||||||
"fflate": "^0.8.2",
|
"fflate": "^0.8.2",
|
||||||
"filesize": "^11.0.2",
|
"filesize": "^11.0.2",
|
||||||
"stylus": "^0.64.0",
|
"stylus": "^0.64.0",
|
||||||
|
"tmap-gl-types": "^0.1.8",
|
||||||
"typescript": "~5.8.3",
|
"typescript": "~5.8.3",
|
||||||
"typescript-plugin-css-modules": "^5.2.0",
|
"typescript-plugin-css-modules": "^5.2.0",
|
||||||
"unplugin-auto-import": "^20.1.0",
|
"unplugin-auto-import": "^20.1.0",
|
||||||
|
|
@ -81,6 +82,7 @@
|
||||||
"integrity": "sha512-H3mcG6ZDLTlYfaSNi0iOKkigqMFvkTKlGUYlD8GW7nNOYRrevuA46iTypPyv+06V3fEmvvazfntkBU34L0azAw==",
|
"integrity": "sha512-H3mcG6ZDLTlYfaSNi0iOKkigqMFvkTKlGUYlD8GW7nNOYRrevuA46iTypPyv+06V3fEmvvazfntkBU34L0azAw==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
|
"peer": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@babel/code-frame": "^7.28.6",
|
"@babel/code-frame": "^7.28.6",
|
||||||
"@babel/generator": "^7.28.6",
|
"@babel/generator": "^7.28.6",
|
||||||
|
|
@ -1063,6 +1065,7 @@
|
||||||
"integrity": "sha512-cD/0UU9RQmlnTbmyJTDyzN8f6CzpziDLv3tFQCnwl0Aoxt3KmFu4k/XA4Sogxqj7jJ/3cdX1kL+Lnsh34sxcQQ==",
|
"integrity": "sha512-cD/0UU9RQmlnTbmyJTDyzN8f6CzpziDLv3tFQCnwl0Aoxt3KmFu4k/XA4Sogxqj7jJ/3cdX1kL+Lnsh34sxcQQ==",
|
||||||
"devOptional": true,
|
"devOptional": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
|
"peer": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"c12": "^3.3.3",
|
"c12": "^3.3.3",
|
||||||
"consola": "^3.4.2",
|
"consola": "^3.4.2",
|
||||||
|
|
@ -1805,6 +1808,13 @@
|
||||||
"devOptional": true,
|
"devOptional": true,
|
||||||
"license": "MIT"
|
"license": "MIT"
|
||||||
},
|
},
|
||||||
|
"node_modules/@types/geojson": {
|
||||||
|
"version": "7946.0.16",
|
||||||
|
"resolved": "https://registry.npmjs.org/@types/geojson/-/geojson-7946.0.16.tgz",
|
||||||
|
"integrity": "sha512-6C8nqWur3j98U6+lXDfTUWIfgvZU+EumvpHKcYjujKH7woYyLj2sUmff0tRhrqM7BohUw7Pz3ZB1jj2gW9Fvmg==",
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT"
|
||||||
|
},
|
||||||
"node_modules/@types/lodash": {
|
"node_modules/@types/lodash": {
|
||||||
"version": "4.17.23",
|
"version": "4.17.23",
|
||||||
"resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.17.23.tgz",
|
"resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.17.23.tgz",
|
||||||
|
|
@ -1816,6 +1826,7 @@
|
||||||
"resolved": "https://registry.npmjs.org/@types/lodash-es/-/lodash-es-4.17.12.tgz",
|
"resolved": "https://registry.npmjs.org/@types/lodash-es/-/lodash-es-4.17.12.tgz",
|
||||||
"integrity": "sha512-0NgftHUcV4v34VhXm8QBSftKVXtbkBG3ViCjs6+eJ5a6y6Mi/jiFGPc1sC7QK+9BFhWrURE3EOggmWaSxL9OzQ==",
|
"integrity": "sha512-0NgftHUcV4v34VhXm8QBSftKVXtbkBG3ViCjs6+eJ5a6y6Mi/jiFGPc1sC7QK+9BFhWrURE3EOggmWaSxL9OzQ==",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
|
"peer": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@types/lodash": "*"
|
"@types/lodash": "*"
|
||||||
}
|
}
|
||||||
|
|
@ -1827,12 +1838,23 @@
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT"
|
"license": "MIT"
|
||||||
},
|
},
|
||||||
|
"node_modules/@types/mapbox-gl": {
|
||||||
|
"version": "3.4.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/@types/mapbox-gl/-/mapbox-gl-3.4.1.tgz",
|
||||||
|
"integrity": "sha512-NsGKKtgW93B+UaLPti6B7NwlxYlES5DpV5Gzj9F75rK5ALKsqSk15CiEHbOnTr09RGbr6ZYiCdI+59NNNcAImg==",
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
|
"dependencies": {
|
||||||
|
"@types/geojson": "*"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/@types/node": {
|
"node_modules/@types/node": {
|
||||||
"version": "24.10.9",
|
"version": "24.10.9",
|
||||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-24.10.9.tgz",
|
"resolved": "https://registry.npmjs.org/@types/node/-/node-24.10.9.tgz",
|
||||||
"integrity": "sha512-ne4A0IpG3+2ETuREInjPNhUGis1SFjv1d5asp8MzEAGtOZeTeHVDOYqOgqfhvseqg/iXty2hjBf1zAOb7RNiNw==",
|
"integrity": "sha512-ne4A0IpG3+2ETuREInjPNhUGis1SFjv1d5asp8MzEAGtOZeTeHVDOYqOgqfhvseqg/iXty2hjBf1zAOb7RNiNw==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
|
"peer": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"undici-types": "~7.16.0"
|
"undici-types": "~7.16.0"
|
||||||
}
|
}
|
||||||
|
|
@ -2485,6 +2507,7 @@
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
|
"peer": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"baseline-browser-mapping": "^2.9.0",
|
"baseline-browser-mapping": "^2.9.0",
|
||||||
"caniuse-lite": "^1.0.30001759",
|
"caniuse-lite": "^1.0.30001759",
|
||||||
|
|
@ -3828,13 +3851,15 @@
|
||||||
"version": "4.17.23",
|
"version": "4.17.23",
|
||||||
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.23.tgz",
|
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.23.tgz",
|
||||||
"integrity": "sha512-LgVTMpQtIopCi79SJeDiP0TfWi5CNEc/L/aRdTh3yIvmZXTnheWpKjSZhnvMl8iXbC1tFg9gdHHDMLoV7CnG+w==",
|
"integrity": "sha512-LgVTMpQtIopCi79SJeDiP0TfWi5CNEc/L/aRdTh3yIvmZXTnheWpKjSZhnvMl8iXbC1tFg9gdHHDMLoV7CnG+w==",
|
||||||
"license": "MIT"
|
"license": "MIT",
|
||||||
|
"peer": true
|
||||||
},
|
},
|
||||||
"node_modules/lodash-es": {
|
"node_modules/lodash-es": {
|
||||||
"version": "4.17.23",
|
"version": "4.17.23",
|
||||||
"resolved": "https://registry.npmjs.org/lodash-es/-/lodash-es-4.17.23.tgz",
|
"resolved": "https://registry.npmjs.org/lodash-es/-/lodash-es-4.17.23.tgz",
|
||||||
"integrity": "sha512-kVI48u3PZr38HdYz98UmfPnXl2DXrpdctLrFLCd3kOx1xUkOmpFPx7gCWWM5MPkL/fD8zb+Ph0QzjGFs4+hHWg==",
|
"integrity": "sha512-kVI48u3PZr38HdYz98UmfPnXl2DXrpdctLrFLCd3kOx1xUkOmpFPx7gCWWM5MPkL/fD8zb+Ph0QzjGFs4+hHWg==",
|
||||||
"license": "MIT"
|
"license": "MIT",
|
||||||
|
"peer": true
|
||||||
},
|
},
|
||||||
"node_modules/lodash-unified": {
|
"node_modules/lodash-unified": {
|
||||||
"version": "1.0.3",
|
"version": "1.0.3",
|
||||||
|
|
@ -4321,6 +4346,7 @@
|
||||||
"resolved": "https://registry.npmjs.org/pinia/-/pinia-3.0.4.tgz",
|
"resolved": "https://registry.npmjs.org/pinia/-/pinia-3.0.4.tgz",
|
||||||
"integrity": "sha512-l7pqLUFTI/+ESXn6k3nu30ZIzW5E2WZF/LaHJEpoq6ElcLD+wduZoB2kBN19du6K/4FDpPMazY2wJr+IndBtQw==",
|
"integrity": "sha512-l7pqLUFTI/+ESXn6k3nu30ZIzW5E2WZF/LaHJEpoq6ElcLD+wduZoB2kBN19du6K/4FDpPMazY2wJr+IndBtQw==",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
|
"peer": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@vue/devtools-api": "^7.7.7"
|
"@vue/devtools-api": "^7.7.7"
|
||||||
},
|
},
|
||||||
|
|
@ -4393,6 +4419,7 @@
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
|
"peer": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"nanoid": "^3.3.11",
|
"nanoid": "^3.3.11",
|
||||||
"picocolors": "^1.1.1",
|
"picocolors": "^1.1.1",
|
||||||
|
|
@ -5033,6 +5060,7 @@
|
||||||
"integrity": "sha512-ZIdT8eUv8tegmqy1tTIdJv9We2DumkNZFdCF5mz/Kpq3OcTaxSuCAYZge6HKK2CmNC02G1eJig2RV7XTw5hQrA==",
|
"integrity": "sha512-ZIdT8eUv8tegmqy1tTIdJv9We2DumkNZFdCF5mz/Kpq3OcTaxSuCAYZge6HKK2CmNC02G1eJig2RV7XTw5hQrA==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
|
"peer": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@adobe/css-tools": "~4.3.3",
|
"@adobe/css-tools": "~4.3.3",
|
||||||
"debug": "^4.3.2",
|
"debug": "^4.3.2",
|
||||||
|
|
@ -5089,6 +5117,34 @@
|
||||||
"url": "https://github.com/sponsors/SuperchupuDev"
|
"url": "https://github.com/sponsors/SuperchupuDev"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/tmap-gl-types": {
|
||||||
|
"version": "0.1.8",
|
||||||
|
"resolved": "https://registry.npmjs.org/tmap-gl-types/-/tmap-gl-types-0.1.8.tgz",
|
||||||
|
"integrity": "sha512-3yPIQ8dldolrS0FrbppNz1mXfwIY8SwHJM1nlfuHvhFBFy5kHX5UQcsyfvM70xIBP6g29UqbMoxyWk/gyg7flw==",
|
||||||
|
"dev": true,
|
||||||
|
"license": "ISC",
|
||||||
|
"dependencies": {
|
||||||
|
"@types/mapbox-gl": "^3.1.0",
|
||||||
|
"@types/node": "^20.12.7"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/tmap-gl-types/node_modules/@types/node": {
|
||||||
|
"version": "20.19.31",
|
||||||
|
"resolved": "https://registry.npmjs.org/@types/node/-/node-20.19.31.tgz",
|
||||||
|
"integrity": "sha512-5jsi0wpncvTD33Sh1UCgacK37FFwDn+EG7wCmEvs62fCvBL+n8/76cAYDok21NF6+jaVWIqKwCZyX7Vbu8eB3A==",
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
|
"dependencies": {
|
||||||
|
"undici-types": "~6.21.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/tmap-gl-types/node_modules/undici-types": {
|
||||||
|
"version": "6.21.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.21.0.tgz",
|
||||||
|
"integrity": "sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==",
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT"
|
||||||
|
},
|
||||||
"node_modules/to-regex-range": {
|
"node_modules/to-regex-range": {
|
||||||
"version": "5.0.1",
|
"version": "5.0.1",
|
||||||
"resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz",
|
||||||
|
|
@ -5139,6 +5195,7 @@
|
||||||
"integrity": "sha512-p1diW6TqL9L07nNxvRMM7hMMw4c5XOo/1ibL4aAIGmSAt9slTE1Xgw5KWuof2uTOvCg9BY7ZRi+GaF+7sfgPeQ==",
|
"integrity": "sha512-p1diW6TqL9L07nNxvRMM7hMMw4c5XOo/1ibL4aAIGmSAt9slTE1Xgw5KWuof2uTOvCg9BY7ZRi+GaF+7sfgPeQ==",
|
||||||
"devOptional": true,
|
"devOptional": true,
|
||||||
"license": "Apache-2.0",
|
"license": "Apache-2.0",
|
||||||
|
"peer": true,
|
||||||
"bin": {
|
"bin": {
|
||||||
"tsc": "bin/tsc",
|
"tsc": "bin/tsc",
|
||||||
"tsserver": "bin/tsserver"
|
"tsserver": "bin/tsserver"
|
||||||
|
|
@ -5562,6 +5619,7 @@
|
||||||
"integrity": "sha512-w+N7Hifpc3gRjZ63vYBXA56dvvRlNWRczTdmCBBa+CotUzAPf5b7YMdMR/8CQoeYE5LX3W4wj6RYTgonm1b9DA==",
|
"integrity": "sha512-w+N7Hifpc3gRjZ63vYBXA56dvvRlNWRczTdmCBBa+CotUzAPf5b7YMdMR/8CQoeYE5LX3W4wj6RYTgonm1b9DA==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
|
"peer": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"esbuild": "^0.27.0",
|
"esbuild": "^0.27.0",
|
||||||
"fdir": "^6.5.0",
|
"fdir": "^6.5.0",
|
||||||
|
|
@ -5840,6 +5898,7 @@
|
||||||
"resolved": "https://registry.npmjs.org/vue/-/vue-3.5.27.tgz",
|
"resolved": "https://registry.npmjs.org/vue/-/vue-3.5.27.tgz",
|
||||||
"integrity": "sha512-aJ/UtoEyFySPBGarREmN4z6qNKpbEguYHMmXSiOGk69czc+zhs0NF6tEFrY8TZKAl8N/LYAkd4JHVd5E/AsSmw==",
|
"integrity": "sha512-aJ/UtoEyFySPBGarREmN4z6qNKpbEguYHMmXSiOGk69czc+zhs0NF6tEFrY8TZKAl8N/LYAkd4JHVd5E/AsSmw==",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
|
"peer": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@vue/compiler-dom": "3.5.27",
|
"@vue/compiler-dom": "3.5.27",
|
||||||
"@vue/compiler-sfc": "3.5.27",
|
"@vue/compiler-sfc": "3.5.27",
|
||||||
|
|
|
||||||
|
|
@ -34,6 +34,7 @@
|
||||||
"fflate": "^0.8.2",
|
"fflate": "^0.8.2",
|
||||||
"filesize": "^11.0.2",
|
"filesize": "^11.0.2",
|
||||||
"stylus": "^0.64.0",
|
"stylus": "^0.64.0",
|
||||||
|
"tmap-gl-types": "^0.1.8",
|
||||||
"typescript": "~5.8.3",
|
"typescript": "~5.8.3",
|
||||||
"typescript-plugin-css-modules": "^5.2.0",
|
"typescript-plugin-css-modules": "^5.2.0",
|
||||||
"unplugin-auto-import": "^20.1.0",
|
"unplugin-auto-import": "^20.1.0",
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,15 @@
|
||||||
import type { Plugin } from 'vite'
|
import type { Plugin } from 'vite'
|
||||||
|
|
||||||
export default function processHtml(title: string): Plugin {
|
export default function processHtml(title: string, script: string = ''): Plugin {
|
||||||
return {
|
return {
|
||||||
name: 'vite-plugin-html-process',
|
name: 'vite-plugin-html-process',
|
||||||
transformIndexHtml(html) {
|
transformIndexHtml(html) {
|
||||||
return html.replace(
|
return html.replace(
|
||||||
/<title>(.*?)<\/title>/,
|
/<title>(.*?)<\/title>/,
|
||||||
`<title>${title}</title>`,
|
`<title>${title}</title>`,
|
||||||
|
).replace(
|
||||||
|
/<script><\/script>/,
|
||||||
|
script,
|
||||||
)
|
)
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,7 @@ import Utils from '@/common/utils'
|
||||||
import FormUtil from '@/common/utils/formUtil.ts'
|
import FormUtil from '@/common/utils/formUtil.ts'
|
||||||
import styles from '@/components/a-form-panel/a-form-panel.module.styl'
|
import styles from '@/components/a-form-panel/a-form-panel.module.styl'
|
||||||
|
|
||||||
type RuleType<T extends object> = Partial<Record<keyof T, Arrayable<FormItemRule>>>
|
type RuleType<T extends object> = Partial<Record<keyof T | string, Arrayable<FormItemRule>>>
|
||||||
|
|
||||||
export interface FormPanelType<T extends object> {
|
export interface FormPanelType<T extends object> {
|
||||||
title: string
|
title: string
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,92 @@
|
||||||
|
import { defineComponent } from 'vue'
|
||||||
|
import Types from '@/common/utils/types.ts'
|
||||||
|
|
||||||
|
const key = '3TGBZ-ZK7K5-CMNIK-ICIGZ-K6TYQ-HTBTZ'
|
||||||
|
|
||||||
|
// 32.087182, 118.797109
|
||||||
|
interface InitOption {
|
||||||
|
/**
|
||||||
|
* 容器
|
||||||
|
*/
|
||||||
|
el: string | HTMLDivElement
|
||||||
|
/**
|
||||||
|
* 中心点
|
||||||
|
*/
|
||||||
|
center?: {
|
||||||
|
/**
|
||||||
|
* 经度
|
||||||
|
*/
|
||||||
|
lat: number
|
||||||
|
/**
|
||||||
|
* 纬度
|
||||||
|
*/
|
||||||
|
lng: number
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 缩放级别
|
||||||
|
*/
|
||||||
|
zoom?: number
|
||||||
|
/**
|
||||||
|
* 俯仰角
|
||||||
|
*/
|
||||||
|
pitch?: number
|
||||||
|
/**
|
||||||
|
* 旋转角度
|
||||||
|
*/
|
||||||
|
rotation?: number
|
||||||
|
}
|
||||||
|
|
||||||
|
function initMap({
|
||||||
|
el,
|
||||||
|
center,
|
||||||
|
zoom = 15,
|
||||||
|
pitch = 0,
|
||||||
|
rotation = 0,
|
||||||
|
}: InitOption) {
|
||||||
|
let centerLatLng: TMap.LatLng | undefined = undefined
|
||||||
|
if (center != null) {
|
||||||
|
centerLatLng = new TMap.LatLng(center.lat, center.lng)
|
||||||
|
}
|
||||||
|
if (Types.isString(el)) {
|
||||||
|
const htmlNode = document.getElementById(el as string)
|
||||||
|
if (htmlNode == null) {
|
||||||
|
throw new Error('地图容器不存在')
|
||||||
|
}
|
||||||
|
el = htmlNode as HTMLDivElement
|
||||||
|
}
|
||||||
|
|
||||||
|
return new TMap.Map(el, {
|
||||||
|
center: centerLatLng,
|
||||||
|
zoom,
|
||||||
|
pitch,
|
||||||
|
rotation,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface AMapType {
|
||||||
|
init: () => void
|
||||||
|
}
|
||||||
|
|
||||||
|
const component = defineComponent(
|
||||||
|
(_, ctx) => {
|
||||||
|
const el = ref<HTMLDivElement | undefined>(undefined)
|
||||||
|
const init = () => {
|
||||||
|
initMap({
|
||||||
|
el: el.value as HTMLDivElement,
|
||||||
|
center: {
|
||||||
|
lat: 32.087182,
|
||||||
|
lng: 118.797109,
|
||||||
|
},
|
||||||
|
})
|
||||||
|
}
|
||||||
|
ctx.expose({init})
|
||||||
|
return () => {
|
||||||
|
return (
|
||||||
|
<div ref={el}>
|
||||||
|
</div>)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
export default component
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
// https://apis.map.qq.com/ws/place/v1/search?boundary=nearby(40.040589,116.273543,1000)&keyword=公园&page_size=10&page_index=1&key=OB4BZ-D4W3U-*****
|
||||||
|
|
@ -0,0 +1,7 @@
|
||||||
|
import MapTypes from 'tmap-gl-types'
|
||||||
|
|
||||||
|
declare global {
|
||||||
|
interface Window {
|
||||||
|
TMap: MapTypes;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -5,7 +5,6 @@
|
||||||
// ------
|
// ------
|
||||||
// Generated by unplugin-vue-components
|
// Generated by unplugin-vue-components
|
||||||
// Read more: https://github.com/vuejs/core/pull/3399
|
// Read more: https://github.com/vuejs/core/pull/3399
|
||||||
import { GlobalComponents } from 'vue'
|
|
||||||
|
|
||||||
export {}
|
export {}
|
||||||
|
|
||||||
|
|
@ -55,6 +54,7 @@ declare module 'vue' {
|
||||||
ElTabPane: typeof import('element-plus/es')['ElTabPane']
|
ElTabPane: typeof import('element-plus/es')['ElTabPane']
|
||||||
ElTabs: typeof import('element-plus/es')['ElTabs']
|
ElTabs: typeof import('element-plus/es')['ElTabs']
|
||||||
ElTag: typeof import('element-plus/es')['ElTag']
|
ElTag: typeof import('element-plus/es')['ElTag']
|
||||||
|
ElText: typeof import('element-plus/es')['ElText']
|
||||||
ElTooltip: typeof import('element-plus/es')['ElTooltip']
|
ElTooltip: typeof import('element-plus/es')['ElTooltip']
|
||||||
ElTransfer: typeof import('element-plus/es')['ElTransfer']
|
ElTransfer: typeof import('element-plus/es')['ElTransfer']
|
||||||
ElTreeSelect: typeof import('element-plus/es')['ElTreeSelect']
|
ElTreeSelect: typeof import('element-plus/es')['ElTreeSelect']
|
||||||
|
|
@ -112,10 +112,11 @@ declare global {
|
||||||
const ElTabPane: typeof import('element-plus/es')['ElTabPane']
|
const ElTabPane: typeof import('element-plus/es')['ElTabPane']
|
||||||
const ElTabs: typeof import('element-plus/es')['ElTabs']
|
const ElTabs: typeof import('element-plus/es')['ElTabs']
|
||||||
const ElTag: typeof import('element-plus/es')['ElTag']
|
const ElTag: typeof import('element-plus/es')['ElTag']
|
||||||
|
const ElText: typeof import('element-plus/es')['ElText']
|
||||||
const ElTooltip: typeof import('element-plus/es')['ElTooltip']
|
const ElTooltip: typeof import('element-plus/es')['ElTooltip']
|
||||||
const ElTransfer: typeof import('element-plus/es')['ElTransfer']
|
const ElTransfer: typeof import('element-plus/es')['ElTransfer']
|
||||||
const ElTreeSelect: typeof import('element-plus/es')['ElTreeSelect']
|
const ElTreeSelect: typeof import('element-plus/es')['ElTreeSelect']
|
||||||
const ElUpload: typeof import('element-plus/es')['ElUpload']
|
const ElUpload: typeof import('element-plus/es')['ElUpload']
|
||||||
const RouterLink: typeof import('vue-router')['RouterLink']
|
const RouterLink: typeof import('vue-router')['RouterLink']
|
||||||
const RouterView: typeof import('vue-router')['RouterView']
|
const RouterView: typeof import('vue-router')['RouterView']
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -11,15 +11,12 @@
|
||||||
</ElFormItem>
|
</ElFormItem>
|
||||||
</template>
|
</template>
|
||||||
<template #columns>
|
<template #columns>
|
||||||
<ElTableColumn label="所属公司" prop="org.orgName"/>
|
|
||||||
<ElTableColumn label="站点名称" prop="stationName"/>
|
<ElTableColumn label="站点名称" prop="stationName"/>
|
||||||
<ElTableColumn label="省" prop="provinceName"/>
|
<ElTableColumn label="所属公司" prop="customer.orgName"/>
|
||||||
<ElTableColumn label="市" prop="cityName"/>
|
<ElTableColumn label="管理员账号" prop="customer.username"/>
|
||||||
<ElTableColumn label="区县" prop="areaName"/>
|
<ElTableColumn label="管理员姓名" prop="customer.customerName"/>
|
||||||
<ElTableColumn label="乡镇街道" prop="townName"/>
|
<ElTableColumn label="管理员电话" prop="customer.phone"/>
|
||||||
<ElTableColumn label="详细地址" prop="address" show-overflow-tooltip width="160px"/>
|
<ElTableColumn label="详细地址" prop="address" show-overflow-tooltip width="200px"/>
|
||||||
<!-- <ElTableColumn label="经度" prop="lng" width="100px"/> -->
|
|
||||||
<!-- <ElTableColumn label="纬度" prop="lat" width="100px"/> -->
|
|
||||||
</template>
|
</template>
|
||||||
<StationForm ref="stationForm" :research="research"/>
|
<StationForm ref="stationForm" :research="research"/>
|
||||||
</ATablePage>
|
</ATablePage>
|
||||||
|
|
|
||||||
|
|
@ -7,42 +7,25 @@
|
||||||
<ElFormItem label="站点名称" prop="stationName">
|
<ElFormItem label="站点名称" prop="stationName">
|
||||||
<ElInput v-model="formData.stationName" placeholder="站点名称"/>
|
<ElInput v-model="formData.stationName" placeholder="站点名称"/>
|
||||||
</ElFormItem>
|
</ElFormItem>
|
||||||
<!-- <ElFormItem label="省;代码" prop="province">
|
<ElFormItem label="管理员账号" prop="userId">
|
||||||
<ElInput v-model="formData.province" placeholder="省;代码" />
|
<UserDropTable v-model="formData.userId"/>
|
||||||
</ElFormItem>
|
</ElFormItem>
|
||||||
<ElFormItem label="市;代码" prop="city">
|
<ElFormItem label="企业名称" prop="orgName">
|
||||||
<ElInput v-model="formData.city" placeholder="市;代码" />
|
<ElInput v-model="formData.orgInfo.orgName" placeholder="企业名称"/>
|
||||||
</ElFormItem>
|
</ElFormItem>
|
||||||
<ElFormItem label="区县;代码" prop="area">
|
<ElFormItem label="管理员姓名" prop="customerName">
|
||||||
<ElInput v-model="formData.area" placeholder="区县;代码" />
|
<ElInput v-model="formData.customerName" placeholder="管理员姓名"/>
|
||||||
</ElFormItem>
|
</ElFormItem>
|
||||||
<ElFormItem label="乡镇街道;代码" prop="town">
|
<ElFormItem label="企业代码" prop="uscc">
|
||||||
<ElInput v-model="formData.town" placeholder="乡镇街道;代码" />
|
<ElInput v-model="formData.orgInfo.uscc" placeholder="统一社会信用代码"/>
|
||||||
</ElFormItem> -->
|
</ElFormItem>
|
||||||
<ElFormItem label="详细地址" prop="address">
|
<ElFormItem label="管理员电话" prop="phone">
|
||||||
|
<ElInput v-model="formData.phone" placeholder="管理员电话"/>
|
||||||
|
</ElFormItem>
|
||||||
|
<ElFormItem label="地址" prop="address">
|
||||||
<ElInput v-model="formData.address" placeholder="详细地址"/>
|
<ElInput v-model="formData.address" placeholder="详细地址"/>
|
||||||
</ElFormItem>
|
</ElFormItem>
|
||||||
<ElFormItem label="省" prop="provinceName">
|
<AMap ref="amap" class="amap"/>
|
||||||
<ElInput v-model="formData.provinceName" placeholder="省"/>
|
|
||||||
</ElFormItem>
|
|
||||||
<ElFormItem label="市" prop="cityName">
|
|
||||||
<ElInput v-model="formData.cityName" placeholder="市"/>
|
|
||||||
</ElFormItem>
|
|
||||||
<ElFormItem label="区县" prop="areaName">
|
|
||||||
<ElInput v-model="formData.areaName" placeholder="区县"/>
|
|
||||||
</ElFormItem>
|
|
||||||
<ElFormItem label="乡镇街道" prop="townName">
|
|
||||||
<ElInput v-model="formData.townName" placeholder="乡镇街道"/>
|
|
||||||
</ElFormItem>
|
|
||||||
|
|
||||||
<ElFormItem label="经度" prop="lng">
|
|
||||||
<ElInput v-model="formData.lng" placeholder="经度"/>
|
|
||||||
</ElFormItem>
|
|
||||||
<ElFormItem label="纬度" prop="lat">
|
|
||||||
<ElInput v-model="formData.lat" placeholder="纬度"/>
|
|
||||||
</ElFormItem>
|
|
||||||
|
|
||||||
<div id="container"></div>
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
@ -56,6 +39,8 @@ import AFormPanel, {
|
||||||
type AFormPanelInstance,
|
type AFormPanelInstance,
|
||||||
buildFormPanelProps,
|
buildFormPanelProps,
|
||||||
} from '@/components/a-form-panel/AFormPanel.tsx'
|
} from '@/components/a-form-panel/AFormPanel.tsx'
|
||||||
|
import UserDropTable from '@/pages/sys/user/UserDropTable.vue'
|
||||||
|
import AMap, { type AMapType } from '@/components/a-map/AMap.tsx'
|
||||||
|
|
||||||
const props = withDefaults(defineProps<{
|
const props = withDefaults(defineProps<{
|
||||||
research?: () => void
|
research?: () => void
|
||||||
|
|
@ -63,14 +48,20 @@ const props = withDefaults(defineProps<{
|
||||||
research: () => {
|
research: () => {
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
|
const amapIns = useTemplateRef<AMapType>('amap')
|
||||||
const formPanelIns = useTemplateRef<AFormPanelInstance>('formPanel')
|
const formPanelIns = useTemplateRef<AFormPanelInstance>('formPanel')
|
||||||
const status = ref<'add' | 'modify'>('add')
|
const status = ref<'add' | 'modify'>('add')
|
||||||
const formPanelProps = buildFormPanelProps<ProjectTypes.SearchProjectResult>({
|
type T = StationTypes.SearchStationResult & StationTypes.AddStationParam
|
||||||
|
const formPanelProps = buildFormPanelProps<T>({
|
||||||
title: status.value === 'add' ? '新建站点' : '修改站点',
|
title: status.value === 'add' ? '新建站点' : '修改站点',
|
||||||
|
labelWidth: '100px',
|
||||||
detailsLoader(id?: string) {
|
detailsLoader(id?: string) {
|
||||||
if (Strings.isBlank(id)) {
|
if (Strings.isBlank(id)) {
|
||||||
status.value = 'add'
|
status.value = 'add'
|
||||||
return Promise.resolve()
|
return Promise.resolve({
|
||||||
|
orgInfo: {},
|
||||||
|
} as T)
|
||||||
} else {
|
} else {
|
||||||
status.value = 'modify'
|
status.value = 'modify'
|
||||||
return StationApi
|
return StationApi
|
||||||
|
|
@ -88,25 +79,13 @@ const formPanelProps = buildFormPanelProps<ProjectTypes.SearchProjectResult>({
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
rules: {
|
rules: {
|
||||||
id: [ {required: true, message: '请填写Id', trigger: 'blur'} ],
|
|
||||||
orgId: [ {required: true, message: '请填写企业信息 Id', trigger: 'blur'} ],
|
|
||||||
stationName: [ {required: true, message: '请填写站点名称', trigger: 'blur'} ],
|
stationName: [ {required: true, message: '请填写站点名称', trigger: 'blur'} ],
|
||||||
province: [ {required: true, message: '请填写省;代码', trigger: 'blur'} ],
|
userId: [ {required: true, message: '请填选择管理员账号', trigger: 'blur'} ],
|
||||||
city: [ {required: true, message: '请填写市;代码', trigger: 'blur'} ],
|
customerName: [ {required: true, message: '请填写管理员姓名', trigger: 'blur'} ],
|
||||||
area: [ {required: true, message: '请填写区县;代码', trigger: 'blur'} ],
|
phone: [ {required: true, message: '请填写管理员电话', trigger: 'blur'} ],
|
||||||
town: [ {required: true, message: '请填写乡镇街道;代码', trigger: 'blur'} ],
|
orgName: [ {required: true, message: '请填写企业名称', trigger: 'blur'} ],
|
||||||
provinceName: [ {required: true, message: '请填写省', trigger: 'blur'} ],
|
uscc: [ {required: true, message: '请填写统一社会信用代码', trigger: 'blur'} ],
|
||||||
cityName: [ {required: true, message: '请填写市', trigger: 'blur'} ],
|
address: [ {required: true, message: '请填选择地址', trigger: 'blur'} ],
|
||||||
areaName: [ {required: true, message: '请填写区县', trigger: 'blur'} ],
|
|
||||||
townName: [ {required: true, message: '请填写乡镇街道', trigger: 'blur'} ],
|
|
||||||
address: [ {required: true, message: '请填写详细地址', trigger: 'blur'} ],
|
|
||||||
lng: [ {required: true, message: '请填写经度', trigger: 'blur'} ],
|
|
||||||
lat: [ {required: true, message: '请填写纬度', trigger: 'blur'} ],
|
|
||||||
creatorId: [ {required: true, message: '请填写创建人', trigger: 'blur'} ],
|
|
||||||
modifierId: [ {required: true, message: '请填写修改人', trigger: 'blur'} ],
|
|
||||||
createTime: [ {required: true, message: '请填写创建时间', trigger: 'blur'} ],
|
|
||||||
modifyTime: [ {required: true, message: '请填写修改时间', trigger: 'blur'} ],
|
|
||||||
deleted: [ {required: true, message: '请填写是否删除', trigger: 'blur'} ],
|
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
@ -114,6 +93,9 @@ const formPanelProps = buildFormPanelProps<ProjectTypes.SearchProjectResult>({
|
||||||
defineExpose({
|
defineExpose({
|
||||||
open(data?: ProjectTypes.SearchProjectResult) {
|
open(data?: ProjectTypes.SearchProjectResult) {
|
||||||
formPanelIns.value?.open(data?.id)
|
formPanelIns.value?.open(data?.id)
|
||||||
|
nextTick(() => {
|
||||||
|
amapIns.value?.init()
|
||||||
|
})
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
@ -121,5 +103,23 @@ defineExpose({
|
||||||
<style lang="stylus" scoped>
|
<style lang="stylus" scoped>
|
||||||
.form-items {
|
.form-items {
|
||||||
grid-template-columns: 1fr 1fr;
|
grid-template-columns: 1fr 1fr;
|
||||||
|
grid-template-areas ". address" \
|
||||||
|
". map" \
|
||||||
|
". map" \
|
||||||
|
". map" \
|
||||||
|
". map" \
|
||||||
|
". map" \
|
||||||
|
". map";
|
||||||
|
gap 10px
|
||||||
|
|
||||||
|
:deep(.el-form-item):nth-child(7) {
|
||||||
|
grid-area address
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.amap {
|
||||||
|
width 500px
|
||||||
|
height 232px
|
||||||
|
grid-area map
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
||||||
|
|
@ -3,44 +3,19 @@ export {}
|
||||||
declare global {
|
declare global {
|
||||||
namespace StationTypes {
|
namespace StationTypes {
|
||||||
interface SearchStationParam extends G.PageParam {
|
interface SearchStationParam extends G.PageParam {
|
||||||
// Id
|
|
||||||
id?: string
|
|
||||||
// 企业信息 Id
|
|
||||||
orgId?: string
|
|
||||||
// 站点名称
|
// 站点名称
|
||||||
stationName?: string
|
stationName?: string
|
||||||
// 省;代码
|
}
|
||||||
province?: string
|
|
||||||
// 市;代码
|
interface CustomerInfo {
|
||||||
city?: string
|
id?: string
|
||||||
// 区县;代码
|
username?: string
|
||||||
area?: string
|
// 客户姓名
|
||||||
// 乡镇街道;代码
|
customerName?: string
|
||||||
town?: string
|
// 客户联系电话
|
||||||
// 省;名称
|
phone?: string
|
||||||
provinceName?: string
|
orgId?: string
|
||||||
// 市;名称
|
orgName?: string
|
||||||
cityName?: string
|
|
||||||
// 区县;名称
|
|
||||||
areaName?: string
|
|
||||||
// 乡镇街道;名称
|
|
||||||
townName?: string
|
|
||||||
// 详细地址
|
|
||||||
address?: string
|
|
||||||
// 经度
|
|
||||||
lng?: number
|
|
||||||
// 纬度
|
|
||||||
lat?: number
|
|
||||||
// 创建人 Id; sys_user.id
|
|
||||||
creatorId?: string
|
|
||||||
// 修改人 Id; sys_user.id
|
|
||||||
modifierId?: string
|
|
||||||
// 创建时间
|
|
||||||
createTime?: string
|
|
||||||
// 修改时间
|
|
||||||
modifyTime?: string
|
|
||||||
// 是否删除; 0-->未删除、1-->已删除
|
|
||||||
deleted?: boolean
|
|
||||||
}
|
}
|
||||||
|
|
||||||
interface SearchStationResult {
|
interface SearchStationResult {
|
||||||
|
|
@ -72,23 +47,35 @@ declare global {
|
||||||
lng?: number
|
lng?: number
|
||||||
// 纬度
|
// 纬度
|
||||||
lat?: number
|
lat?: number
|
||||||
// 创建人 Id; sys_user.id
|
customer: CustomerInfo
|
||||||
creatorId?: string
|
}
|
||||||
// 修改人 Id; sys_user.id
|
|
||||||
modifierId?: string
|
interface OrgInfo {
|
||||||
// 创建时间
|
// 统一社会信用代码
|
||||||
createTime?: string
|
uscc?: string
|
||||||
// 修改时间
|
// 企业名称
|
||||||
modifyTime?: string
|
orgName?: string
|
||||||
// 是否删除; 0-->未删除、1-->已删除
|
// 营业执照
|
||||||
deleted?: boolean
|
businessLicense?: string
|
||||||
|
// 营业执照有效期
|
||||||
|
licenseStartTime?: string
|
||||||
|
// 营业执照有效期
|
||||||
|
licenseEndTime?: string
|
||||||
|
// 法人名称
|
||||||
|
legalRepresentative?: string
|
||||||
|
// 法人身份证号
|
||||||
|
idcard?: string
|
||||||
|
// 法人身份证有效期
|
||||||
|
idcardStartTime?: string
|
||||||
|
// 法人身份证有效期
|
||||||
|
idcardEndTime?: string
|
||||||
|
// 法人身份证正面
|
||||||
|
idcardFront?: string
|
||||||
|
// 法人身份证反面
|
||||||
|
idcardBack?: string
|
||||||
}
|
}
|
||||||
|
|
||||||
interface AddStationParam {
|
interface AddStationParam {
|
||||||
// Id
|
|
||||||
id?: string
|
|
||||||
// 企业信息 Id
|
|
||||||
orgId?: string
|
|
||||||
// 站点名称
|
// 站点名称
|
||||||
stationName?: string
|
stationName?: string
|
||||||
// 省;代码
|
// 省;代码
|
||||||
|
|
@ -113,23 +100,16 @@ declare global {
|
||||||
lng?: number
|
lng?: number
|
||||||
// 纬度
|
// 纬度
|
||||||
lat?: number
|
lat?: number
|
||||||
// 创建人 Id; sys_user.id
|
// 账号
|
||||||
creatorId?: string
|
userId?: string
|
||||||
// 修改人 Id; sys_user.id
|
customerName?: string
|
||||||
modifierId?: string
|
phone?: string
|
||||||
// 创建时间
|
orgInfo?: OrgInfo
|
||||||
createTime?: string
|
|
||||||
// 修改时间
|
|
||||||
modifyTime?: string
|
|
||||||
// 是否删除; 0-->未删除、1-->已删除
|
|
||||||
deleted?: boolean
|
|
||||||
}
|
}
|
||||||
|
|
||||||
interface ModifyStationParam {
|
interface ModifyStationParam {
|
||||||
// Id
|
// Id
|
||||||
id?: string
|
id?: string
|
||||||
// 企业信息 Id
|
|
||||||
orgId?: string
|
|
||||||
// 站点名称
|
// 站点名称
|
||||||
stationName?: string
|
stationName?: string
|
||||||
// 省;代码
|
// 省;代码
|
||||||
|
|
@ -154,16 +134,6 @@ declare global {
|
||||||
lng?: number
|
lng?: number
|
||||||
// 纬度
|
// 纬度
|
||||||
lat?: number
|
lat?: number
|
||||||
// 创建人 Id; sys_user.id
|
|
||||||
creatorId?: string
|
|
||||||
// 修改人 Id; sys_user.id
|
|
||||||
modifierId?: string
|
|
||||||
// 创建时间
|
|
||||||
createTime?: string
|
|
||||||
// 修改时间
|
|
||||||
modifyTime?: string
|
|
||||||
// 是否删除; 0-->未删除、1-->已删除
|
|
||||||
deleted?: boolean
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,27 @@
|
||||||
|
<script lang="ts" setup>
|
||||||
|
import ADropTable from '@/components/a-drop-table/ADropTable.vue'
|
||||||
|
import UserApi from '@/pages/sys/user/user-api.ts'
|
||||||
|
|
||||||
|
const model = defineModel<string | undefined | null>()
|
||||||
|
const dropTableColumns = [
|
||||||
|
{
|
||||||
|
label: '账号',
|
||||||
|
prop: 'username',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '创建时间',
|
||||||
|
prop: 'createTime',
|
||||||
|
},
|
||||||
|
]
|
||||||
|
const dropTableLoader = (param: UserTypes.SearchUserParam) => {
|
||||||
|
return UserApi.paging(param).then(res => res.data)
|
||||||
|
}
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<ADropTable v-model="model"
|
||||||
|
:columns="dropTableColumns"
|
||||||
|
:loader="dropTableLoader"
|
||||||
|
display-field="username"/>
|
||||||
|
</template>
|
||||||
|
|
@ -47,7 +47,7 @@ export default defineConfig((configEnv) => {
|
||||||
dirs: [ './src/widgets' ],
|
dirs: [ './src/widgets' ],
|
||||||
resolvers: [ ElementPlusResolver() ],
|
resolvers: [ ElementPlusResolver() ],
|
||||||
}),
|
}),
|
||||||
processHtml(env.VITE_APP_NAME),
|
processHtml(env.VITE_APP_NAME, '<script src="https://map.qq.com/api/gljs?v=1.exp&key=3TGBZ-ZK7K5-CMNIK-ICIGZ-K6TYQ-HTBTZ"></script>'),
|
||||||
fileWatcher(IconfontProcess, ColorProcess),
|
fileWatcher(IconfontProcess, ColorProcess),
|
||||||
zipDist(),
|
zipDist(),
|
||||||
],
|
],
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue