master
parent
4041a8c2cb
commit
dfcad17fb4
|
|
@ -4,11 +4,7 @@
|
|||
<head>
|
||||
<meta charset="UTF-8"/>
|
||||
<meta content="width=device-width, initial-scale=1.0" name="viewport"/>
|
||||
<script charset="utf-8"
|
||||
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>
|
||||
<script></script>
|
||||
<style>
|
||||
* {
|
||||
margin: 0;
|
||||
|
|
|
|||
|
|
@ -32,6 +32,7 @@
|
|||
"fflate": "^0.8.2",
|
||||
"filesize": "^11.0.2",
|
||||
"stylus": "^0.64.0",
|
||||
"tmap-gl-types": "^0.1.8",
|
||||
"typescript": "~5.8.3",
|
||||
"typescript-plugin-css-modules": "^5.2.0",
|
||||
"unplugin-auto-import": "^20.1.0",
|
||||
|
|
@ -81,6 +82,7 @@
|
|||
"integrity": "sha512-H3mcG6ZDLTlYfaSNi0iOKkigqMFvkTKlGUYlD8GW7nNOYRrevuA46iTypPyv+06V3fEmvvazfntkBU34L0azAw==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"@babel/code-frame": "^7.28.6",
|
||||
"@babel/generator": "^7.28.6",
|
||||
|
|
@ -1063,6 +1065,7 @@
|
|||
"integrity": "sha512-cD/0UU9RQmlnTbmyJTDyzN8f6CzpziDLv3tFQCnwl0Aoxt3KmFu4k/XA4Sogxqj7jJ/3cdX1kL+Lnsh34sxcQQ==",
|
||||
"devOptional": true,
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"c12": "^3.3.3",
|
||||
"consola": "^3.4.2",
|
||||
|
|
@ -1805,6 +1808,13 @@
|
|||
"devOptional": true,
|
||||
"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": {
|
||||
"version": "4.17.23",
|
||||
"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",
|
||||
"integrity": "sha512-0NgftHUcV4v34VhXm8QBSftKVXtbkBG3ViCjs6+eJ5a6y6Mi/jiFGPc1sC7QK+9BFhWrURE3EOggmWaSxL9OzQ==",
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"@types/lodash": "*"
|
||||
}
|
||||
|
|
@ -1827,12 +1838,23 @@
|
|||
"dev": true,
|
||||
"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": {
|
||||
"version": "24.10.9",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-24.10.9.tgz",
|
||||
"integrity": "sha512-ne4A0IpG3+2ETuREInjPNhUGis1SFjv1d5asp8MzEAGtOZeTeHVDOYqOgqfhvseqg/iXty2hjBf1zAOb7RNiNw==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"undici-types": "~7.16.0"
|
||||
}
|
||||
|
|
@ -2485,6 +2507,7 @@
|
|||
}
|
||||
],
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"baseline-browser-mapping": "^2.9.0",
|
||||
"caniuse-lite": "^1.0.30001759",
|
||||
|
|
@ -3828,13 +3851,15 @@
|
|||
"version": "4.17.23",
|
||||
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.23.tgz",
|
||||
"integrity": "sha512-LgVTMpQtIopCi79SJeDiP0TfWi5CNEc/L/aRdTh3yIvmZXTnheWpKjSZhnvMl8iXbC1tFg9gdHHDMLoV7CnG+w==",
|
||||
"license": "MIT"
|
||||
"license": "MIT",
|
||||
"peer": true
|
||||
},
|
||||
"node_modules/lodash-es": {
|
||||
"version": "4.17.23",
|
||||
"resolved": "https://registry.npmjs.org/lodash-es/-/lodash-es-4.17.23.tgz",
|
||||
"integrity": "sha512-kVI48u3PZr38HdYz98UmfPnXl2DXrpdctLrFLCd3kOx1xUkOmpFPx7gCWWM5MPkL/fD8zb+Ph0QzjGFs4+hHWg==",
|
||||
"license": "MIT"
|
||||
"license": "MIT",
|
||||
"peer": true
|
||||
},
|
||||
"node_modules/lodash-unified": {
|
||||
"version": "1.0.3",
|
||||
|
|
@ -4321,6 +4346,7 @@
|
|||
"resolved": "https://registry.npmjs.org/pinia/-/pinia-3.0.4.tgz",
|
||||
"integrity": "sha512-l7pqLUFTI/+ESXn6k3nu30ZIzW5E2WZF/LaHJEpoq6ElcLD+wduZoB2kBN19du6K/4FDpPMazY2wJr+IndBtQw==",
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"@vue/devtools-api": "^7.7.7"
|
||||
},
|
||||
|
|
@ -4393,6 +4419,7 @@
|
|||
}
|
||||
],
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"nanoid": "^3.3.11",
|
||||
"picocolors": "^1.1.1",
|
||||
|
|
@ -5033,6 +5060,7 @@
|
|||
"integrity": "sha512-ZIdT8eUv8tegmqy1tTIdJv9We2DumkNZFdCF5mz/Kpq3OcTaxSuCAYZge6HKK2CmNC02G1eJig2RV7XTw5hQrA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"@adobe/css-tools": "~4.3.3",
|
||||
"debug": "^4.3.2",
|
||||
|
|
@ -5089,6 +5117,34 @@
|
|||
"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": {
|
||||
"version": "5.0.1",
|
||||
"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==",
|
||||
"devOptional": true,
|
||||
"license": "Apache-2.0",
|
||||
"peer": true,
|
||||
"bin": {
|
||||
"tsc": "bin/tsc",
|
||||
"tsserver": "bin/tsserver"
|
||||
|
|
@ -5562,6 +5619,7 @@
|
|||
"integrity": "sha512-w+N7Hifpc3gRjZ63vYBXA56dvvRlNWRczTdmCBBa+CotUzAPf5b7YMdMR/8CQoeYE5LX3W4wj6RYTgonm1b9DA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"esbuild": "^0.27.0",
|
||||
"fdir": "^6.5.0",
|
||||
|
|
@ -5840,6 +5898,7 @@
|
|||
"resolved": "https://registry.npmjs.org/vue/-/vue-3.5.27.tgz",
|
||||
"integrity": "sha512-aJ/UtoEyFySPBGarREmN4z6qNKpbEguYHMmXSiOGk69czc+zhs0NF6tEFrY8TZKAl8N/LYAkd4JHVd5E/AsSmw==",
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"@vue/compiler-dom": "3.5.27",
|
||||
"@vue/compiler-sfc": "3.5.27",
|
||||
|
|
|
|||
|
|
@ -34,6 +34,7 @@
|
|||
"fflate": "^0.8.2",
|
||||
"filesize": "^11.0.2",
|
||||
"stylus": "^0.64.0",
|
||||
"tmap-gl-types": "^0.1.8",
|
||||
"typescript": "~5.8.3",
|
||||
"typescript-plugin-css-modules": "^5.2.0",
|
||||
"unplugin-auto-import": "^20.1.0",
|
||||
|
|
|
|||
|
|
@ -1,12 +1,15 @@
|
|||
import type { Plugin } from 'vite'
|
||||
|
||||
export default function processHtml(title: string): Plugin {
|
||||
export default function processHtml(title: string, script: string = ''): Plugin {
|
||||
return {
|
||||
name: 'vite-plugin-html-process',
|
||||
transformIndexHtml(html) {
|
||||
return html.replace(
|
||||
/<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 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> {
|
||||
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
|
||||
// Read more: https://github.com/vuejs/core/pull/3399
|
||||
import { GlobalComponents } from 'vue'
|
||||
|
||||
export {}
|
||||
|
||||
|
|
@ -55,6 +54,7 @@ declare module 'vue' {
|
|||
ElTabPane: typeof import('element-plus/es')['ElTabPane']
|
||||
ElTabs: typeof import('element-plus/es')['ElTabs']
|
||||
ElTag: typeof import('element-plus/es')['ElTag']
|
||||
ElText: typeof import('element-plus/es')['ElText']
|
||||
ElTooltip: typeof import('element-plus/es')['ElTooltip']
|
||||
ElTransfer: typeof import('element-plus/es')['ElTransfer']
|
||||
ElTreeSelect: typeof import('element-plus/es')['ElTreeSelect']
|
||||
|
|
@ -112,10 +112,11 @@ declare global {
|
|||
const ElTabPane: typeof import('element-plus/es')['ElTabPane']
|
||||
const ElTabs: typeof import('element-plus/es')['ElTabs']
|
||||
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 ElTransfer: typeof import('element-plus/es')['ElTransfer']
|
||||
const ElTreeSelect: typeof import('element-plus/es')['ElTreeSelect']
|
||||
const ElUpload: typeof import('element-plus/es')['ElUpload']
|
||||
const RouterLink: typeof import('vue-router')['RouterLink']
|
||||
const RouterView: typeof import('vue-router')['RouterView']
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,15 +11,12 @@
|
|||
</ElFormItem>
|
||||
</template>
|
||||
<template #columns>
|
||||
<ElTableColumn label="所属公司" prop="org.orgName"/>
|
||||
<ElTableColumn label="站点名称" prop="stationName"/>
|
||||
<ElTableColumn label="省" prop="provinceName"/>
|
||||
<ElTableColumn label="市" prop="cityName"/>
|
||||
<ElTableColumn label="区县" prop="areaName"/>
|
||||
<ElTableColumn label="乡镇街道" prop="townName"/>
|
||||
<ElTableColumn label="详细地址" prop="address" show-overflow-tooltip width="160px"/>
|
||||
<!-- <ElTableColumn label="经度" prop="lng" width="100px"/> -->
|
||||
<!-- <ElTableColumn label="纬度" prop="lat" width="100px"/> -->
|
||||
<ElTableColumn label="所属公司" prop="customer.orgName"/>
|
||||
<ElTableColumn label="管理员账号" prop="customer.username"/>
|
||||
<ElTableColumn label="管理员姓名" prop="customer.customerName"/>
|
||||
<ElTableColumn label="管理员电话" prop="customer.phone"/>
|
||||
<ElTableColumn label="详细地址" prop="address" show-overflow-tooltip width="200px"/>
|
||||
</template>
|
||||
<StationForm ref="stationForm" :research="research"/>
|
||||
</ATablePage>
|
||||
|
|
|
|||
|
|
@ -7,42 +7,25 @@
|
|||
<ElFormItem label="站点名称" prop="stationName">
|
||||
<ElInput v-model="formData.stationName" placeholder="站点名称"/>
|
||||
</ElFormItem>
|
||||
<!-- <ElFormItem label="省;代码" prop="province">
|
||||
<ElInput v-model="formData.province" placeholder="省;代码" />
|
||||
<ElFormItem label="管理员账号" prop="userId">
|
||||
<UserDropTable v-model="formData.userId"/>
|
||||
</ElFormItem>
|
||||
<ElFormItem label="市;代码" prop="city">
|
||||
<ElInput v-model="formData.city" placeholder="市;代码" />
|
||||
<ElFormItem label="企业名称" prop="orgName">
|
||||
<ElInput v-model="formData.orgInfo.orgName" placeholder="企业名称"/>
|
||||
</ElFormItem>
|
||||
<ElFormItem label="区县;代码" prop="area">
|
||||
<ElInput v-model="formData.area" placeholder="区县;代码" />
|
||||
<ElFormItem label="管理员姓名" prop="customerName">
|
||||
<ElInput v-model="formData.customerName" placeholder="管理员姓名"/>
|
||||
</ElFormItem>
|
||||
<ElFormItem label="乡镇街道;代码" prop="town">
|
||||
<ElInput v-model="formData.town" placeholder="乡镇街道;代码" />
|
||||
</ElFormItem> -->
|
||||
<ElFormItem label="详细地址" prop="address">
|
||||
<ElFormItem label="企业代码" prop="uscc">
|
||||
<ElInput v-model="formData.orgInfo.uscc" placeholder="统一社会信用代码"/>
|
||||
</ElFormItem>
|
||||
<ElFormItem label="管理员电话" prop="phone">
|
||||
<ElInput v-model="formData.phone" placeholder="管理员电话"/>
|
||||
</ElFormItem>
|
||||
<ElFormItem label="地址" prop="address">
|
||||
<ElInput v-model="formData.address" placeholder="详细地址"/>
|
||||
</ElFormItem>
|
||||
<ElFormItem label="省" prop="provinceName">
|
||||
<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>
|
||||
<AMap ref="amap" class="amap"/>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
|
@ -56,6 +39,8 @@ import AFormPanel, {
|
|||
type AFormPanelInstance,
|
||||
buildFormPanelProps,
|
||||
} 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<{
|
||||
research?: () => void
|
||||
|
|
@ -63,14 +48,20 @@ const props = withDefaults(defineProps<{
|
|||
research: () => {
|
||||
},
|
||||
})
|
||||
|
||||
const amapIns = useTemplateRef<AMapType>('amap')
|
||||
const formPanelIns = useTemplateRef<AFormPanelInstance>('formPanel')
|
||||
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' ? '新建站点' : '修改站点',
|
||||
labelWidth: '100px',
|
||||
detailsLoader(id?: string) {
|
||||
if (Strings.isBlank(id)) {
|
||||
status.value = 'add'
|
||||
return Promise.resolve()
|
||||
return Promise.resolve({
|
||||
orgInfo: {},
|
||||
} as T)
|
||||
} else {
|
||||
status.value = 'modify'
|
||||
return StationApi
|
||||
|
|
@ -88,25 +79,13 @@ const formPanelProps = buildFormPanelProps<ProjectTypes.SearchProjectResult>({
|
|||
}
|
||||
},
|
||||
rules: {
|
||||
id: [ {required: true, message: '请填写Id', trigger: 'blur'} ],
|
||||
orgId: [ {required: true, message: '请填写企业信息 Id', trigger: 'blur'} ],
|
||||
stationName: [ {required: true, message: '请填写站点名称', trigger: 'blur'} ],
|
||||
province: [ {required: true, message: '请填写省;代码', trigger: 'blur'} ],
|
||||
city: [ {required: true, message: '请填写市;代码', trigger: 'blur'} ],
|
||||
area: [ {required: true, message: '请填写区县;代码', trigger: 'blur'} ],
|
||||
town: [ {required: true, message: '请填写乡镇街道;代码', trigger: 'blur'} ],
|
||||
provinceName: [ {required: true, message: '请填写省', trigger: 'blur'} ],
|
||||
cityName: [ {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'} ],
|
||||
userId: [ {required: true, message: '请填选择管理员账号', trigger: 'blur'} ],
|
||||
customerName: [ {required: true, message: '请填写管理员姓名', trigger: 'blur'} ],
|
||||
phone: [ {required: true, message: '请填写管理员电话', trigger: 'blur'} ],
|
||||
orgName: [ {required: true, message: '请填写企业名称', trigger: 'blur'} ],
|
||||
uscc: [ {required: true, message: '请填写统一社会信用代码', trigger: 'blur'} ],
|
||||
address: [ {required: true, message: '请填选择地址', trigger: 'blur'} ],
|
||||
},
|
||||
})
|
||||
|
||||
|
|
@ -114,6 +93,9 @@ const formPanelProps = buildFormPanelProps<ProjectTypes.SearchProjectResult>({
|
|||
defineExpose({
|
||||
open(data?: ProjectTypes.SearchProjectResult) {
|
||||
formPanelIns.value?.open(data?.id)
|
||||
nextTick(() => {
|
||||
amapIns.value?.init()
|
||||
})
|
||||
},
|
||||
})
|
||||
</script>
|
||||
|
|
@ -121,5 +103,23 @@ defineExpose({
|
|||
<style lang="stylus" scoped>
|
||||
.form-items {
|
||||
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>
|
||||
|
|
|
|||
|
|
@ -3,44 +3,19 @@ export {}
|
|||
declare global {
|
||||
namespace StationTypes {
|
||||
interface SearchStationParam extends G.PageParam {
|
||||
// Id
|
||||
id?: string
|
||||
// 企业信息 Id
|
||||
orgId?: string
|
||||
// 站点名称
|
||||
stationName?: string
|
||||
// 省;代码
|
||||
province?: string
|
||||
// 市;代码
|
||||
city?: string
|
||||
// 区县;代码
|
||||
area?: string
|
||||
// 乡镇街道;代码
|
||||
town?: string
|
||||
// 省;名称
|
||||
provinceName?: 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 CustomerInfo {
|
||||
id?: string
|
||||
username?: string
|
||||
// 客户姓名
|
||||
customerName?: string
|
||||
// 客户联系电话
|
||||
phone?: string
|
||||
orgId?: string
|
||||
orgName?: string
|
||||
}
|
||||
|
||||
interface SearchStationResult {
|
||||
|
|
@ -72,23 +47,35 @@ declare global {
|
|||
lng?: number
|
||||
// 纬度
|
||||
lat?: number
|
||||
// 创建人 Id; sys_user.id
|
||||
creatorId?: string
|
||||
// 修改人 Id; sys_user.id
|
||||
modifierId?: string
|
||||
// 创建时间
|
||||
createTime?: string
|
||||
// 修改时间
|
||||
modifyTime?: string
|
||||
// 是否删除; 0-->未删除、1-->已删除
|
||||
deleted?: boolean
|
||||
customer: CustomerInfo
|
||||
}
|
||||
|
||||
interface OrgInfo {
|
||||
// 统一社会信用代码
|
||||
uscc?: string
|
||||
// 企业名称
|
||||
orgName?: string
|
||||
// 营业执照
|
||||
businessLicense?: string
|
||||
// 营业执照有效期
|
||||
licenseStartTime?: string
|
||||
// 营业执照有效期
|
||||
licenseEndTime?: string
|
||||
// 法人名称
|
||||
legalRepresentative?: string
|
||||
// 法人身份证号
|
||||
idcard?: string
|
||||
// 法人身份证有效期
|
||||
idcardStartTime?: string
|
||||
// 法人身份证有效期
|
||||
idcardEndTime?: string
|
||||
// 法人身份证正面
|
||||
idcardFront?: string
|
||||
// 法人身份证反面
|
||||
idcardBack?: string
|
||||
}
|
||||
|
||||
interface AddStationParam {
|
||||
// Id
|
||||
id?: string
|
||||
// 企业信息 Id
|
||||
orgId?: string
|
||||
// 站点名称
|
||||
stationName?: string
|
||||
// 省;代码
|
||||
|
|
@ -113,23 +100,16 @@ declare global {
|
|||
lng?: number
|
||||
// 纬度
|
||||
lat?: number
|
||||
// 创建人 Id; sys_user.id
|
||||
creatorId?: string
|
||||
// 修改人 Id; sys_user.id
|
||||
modifierId?: string
|
||||
// 创建时间
|
||||
createTime?: string
|
||||
// 修改时间
|
||||
modifyTime?: string
|
||||
// 是否删除; 0-->未删除、1-->已删除
|
||||
deleted?: boolean
|
||||
// 账号
|
||||
userId?: string
|
||||
customerName?: string
|
||||
phone?: string
|
||||
orgInfo?: OrgInfo
|
||||
}
|
||||
|
||||
interface ModifyStationParam {
|
||||
// Id
|
||||
id?: string
|
||||
// 企业信息 Id
|
||||
orgId?: string
|
||||
// 站点名称
|
||||
stationName?: string
|
||||
// 省;代码
|
||||
|
|
@ -154,16 +134,6 @@ declare global {
|
|||
lng?: 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' ],
|
||||
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),
|
||||
zipDist(),
|
||||
],
|
||||
|
|
|
|||
Loading…
Reference in New Issue