vue2-client 1.2.37-1 → 1.2.38

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,6 +1,11 @@
1
1
  # Change Log
2
2
  > 所有关于本项目的变化都在该文档里。
3
3
 
4
+ **##1.2.38 -2022-04-22 @朱子峰**
5
+ - 功能修改:
6
+ - [工单提交] 要求联系方式必须明确填写,不再从vuex中获取
7
+ - [工单提交] 添加远程链接使用说明
8
+
4
9
  **##1.2.37 -2022-04-21 @张振宇**
5
10
  - `CreateQuery.vue` 还原不小心删除的内容
6
11
  - `CreateQuery.vue` 调整v_if的位置
package/package.json CHANGED
@@ -1,90 +1,90 @@
1
- {
2
- "name": "vue2-client",
3
- "version": "1.2.37-1",
4
- "private": false,
5
- "scripts": {
6
- "serve": "vue-cli-service serve",
7
- "build": "vue-cli-service build",
8
- "test:unit": "vue-cli-service test:unit",
9
- "lint": "vue-cli-service lint"
10
- },
11
- "dependencies": {
12
- "@antv/data-set": "^0.11.4",
13
- "@antv/f2": "^3.6.4",
14
- "@antv/g2plot": "^2.3.33",
15
- "@logicflow/core": "^1.1.7",
16
- "@logicflow/extension": "^1.1.7",
17
- "@vue/babel-helper-vue-jsx-merge-props": "^1.2.1",
18
- "@vue/babel-preset-jsx": "^1.2.4",
19
- "animate.css": "^4.1.0",
20
- "ant-design-vue": "1.7.8",
21
- "axios": "^0.19.2",
22
- "clipboard": "^2.0.6",
23
- "core-js": "^3.6.5",
24
- "date-fns": "^2.14.0",
25
- "default-passive-events": "^2.0.0",
26
- "enquire.js": "^2.1.6",
27
- "file-saver": "^2.0.5",
28
- "highlight.js": "^10.2.1",
29
- "js-cookie": "^2.2.1",
30
- "jsencrypt": "^3.0.0-rc.1",
31
- "lodash.get": "^4.4.2",
32
- "mockjs": "^1.1.0",
33
- "nprogress": "^0.2.0",
34
- "viser-vue": "^2.4.8",
35
- "vue": "^2.6.11",
36
- "vue-i18n": "^8.18.2",
37
- "vue-json-viewer": "^2.2.15",
38
- "vue-infinite-scroll": "^2.0.2",
39
- "vue-router": "^3.3.4",
40
- "vuedraggable": "^2.23.2",
41
- "vuex": "^3.4.0",
42
- "xlsx": "0.17.5"
43
- },
44
- "devDependencies": {
45
- "@ant-design/colors": "^4.0.1",
46
- "@vue/cli-plugin-babel": "^4.4.0",
47
- "@vue/cli-plugin-eslint": "^4.4.0",
48
- "@vue/cli-plugin-router": "^4.4.0",
49
- "@vue/cli-plugin-unit-jest": "~5.0.0",
50
- "@vue/cli-plugin-vuex": "^4.4.0",
51
- "@vue/cli-service": "^4.4.0",
52
- "@vue/eslint-config-standard": "^4.0.0",
53
- "@vue/test-utils": "^1.1.3",
54
- "@vue/vue2-jest": "^27.0.0-alpha.2",
55
- "@vuepress/plugin-back-to-top": "^1.5.2",
56
- "babel-eslint": "^10.1.0",
57
- "babel-jest": "^27.0.6",
58
- "babel-plugin-transform-remove-console": "^6.9.4",
59
- "babel-polyfill": "^6.26.0",
60
- "compression-webpack-plugin": "^2.0.0",
61
- "deepmerge": "^4.2.2",
62
- "echarts": "^4.9.0",
63
- "eslint": "^6.7.2",
64
- "eslint-plugin-import": "^2.25.3",
65
- "eslint-plugin-node": "^11.1.0",
66
- "eslint-plugin-standard": "^5.0.0",
67
- "eslint-plugin-vue": "^6.2.2",
68
- "fast-deep-equal": "^3.1.3",
69
- "gh-pages": "^3.1.0",
70
- "jest": "^27.0.5",
71
- "less-loader": "^6.1.1",
72
- "react-bmap": "^1.0.121",
73
- "script-loader": "^0.7.2",
74
- "style-resources-loader": "^1.3.2",
75
- "vue-amap": "^0.5.10",
76
- "vue-baidu-map": "^0.21.22",
77
- "vue-bmap-gl": "0.0.29",
78
- "vue-cli-plugin-style-resources-loader": "^0.1.4",
79
- "vue-mapvgl": "0.0.28",
80
- "vue-template-compiler": "^2.6.11",
81
- "vuepress": "^1.5.2",
82
- "webpack-theme-color-replacer": "1.3.18",
83
- "whatwg-fetch": "^3.0.0"
84
- },
85
- "browserslist": [
86
- "> 1%",
87
- "last 2 versions",
88
- "not ie <= 10"
89
- ]
90
- }
1
+ {
2
+ "name": "vue2-client",
3
+ "version": "1.2.38",
4
+ "private": false,
5
+ "scripts": {
6
+ "serve": "vue-cli-service serve",
7
+ "build": "vue-cli-service build",
8
+ "test:unit": "vue-cli-service test:unit",
9
+ "lint": "vue-cli-service lint"
10
+ },
11
+ "dependencies": {
12
+ "@antv/data-set": "^0.11.4",
13
+ "@antv/f2": "^3.6.4",
14
+ "@antv/g2plot": "^2.3.33",
15
+ "@logicflow/core": "^1.1.7",
16
+ "@logicflow/extension": "^1.1.7",
17
+ "@vue/babel-helper-vue-jsx-merge-props": "^1.2.1",
18
+ "@vue/babel-preset-jsx": "^1.2.4",
19
+ "animate.css": "^4.1.0",
20
+ "ant-design-vue": "1.7.8",
21
+ "axios": "^0.19.2",
22
+ "clipboard": "^2.0.6",
23
+ "core-js": "^3.6.5",
24
+ "date-fns": "^2.14.0",
25
+ "default-passive-events": "^2.0.0",
26
+ "enquire.js": "^2.1.6",
27
+ "file-saver": "^2.0.5",
28
+ "highlight.js": "^10.2.1",
29
+ "js-cookie": "^2.2.1",
30
+ "jsencrypt": "^3.0.0-rc.1",
31
+ "lodash.get": "^4.4.2",
32
+ "mockjs": "^1.1.0",
33
+ "nprogress": "^0.2.0",
34
+ "viser-vue": "^2.4.8",
35
+ "vue": "^2.6.11",
36
+ "vue-i18n": "^8.18.2",
37
+ "vue-json-viewer": "^2.2.15",
38
+ "vue-infinite-scroll": "^2.0.2",
39
+ "vue-router": "^3.3.4",
40
+ "vuedraggable": "^2.23.2",
41
+ "vuex": "^3.4.0",
42
+ "xlsx": "0.17.5"
43
+ },
44
+ "devDependencies": {
45
+ "@ant-design/colors": "^4.0.1",
46
+ "@vue/cli-plugin-babel": "^4.4.0",
47
+ "@vue/cli-plugin-eslint": "^4.4.0",
48
+ "@vue/cli-plugin-router": "^4.4.0",
49
+ "@vue/cli-plugin-unit-jest": "~5.0.0",
50
+ "@vue/cli-plugin-vuex": "^4.4.0",
51
+ "@vue/cli-service": "^4.4.0",
52
+ "@vue/eslint-config-standard": "^4.0.0",
53
+ "@vue/test-utils": "^1.1.3",
54
+ "@vue/vue2-jest": "^27.0.0-alpha.2",
55
+ "@vuepress/plugin-back-to-top": "^1.5.2",
56
+ "babel-eslint": "^10.1.0",
57
+ "babel-jest": "^27.0.6",
58
+ "babel-plugin-transform-remove-console": "^6.9.4",
59
+ "babel-polyfill": "^6.26.0",
60
+ "compression-webpack-plugin": "^2.0.0",
61
+ "deepmerge": "^4.2.2",
62
+ "echarts": "^4.9.0",
63
+ "eslint": "^6.7.2",
64
+ "eslint-plugin-import": "^2.25.3",
65
+ "eslint-plugin-node": "^11.1.0",
66
+ "eslint-plugin-standard": "^5.0.0",
67
+ "eslint-plugin-vue": "^6.2.2",
68
+ "fast-deep-equal": "^3.1.3",
69
+ "gh-pages": "^3.1.0",
70
+ "jest": "^27.0.5",
71
+ "less-loader": "^6.1.1",
72
+ "react-bmap": "^1.0.121",
73
+ "script-loader": "^0.7.2",
74
+ "style-resources-loader": "^1.3.2",
75
+ "vue-amap": "^0.5.10",
76
+ "vue-baidu-map": "^0.21.22",
77
+ "vue-bmap-gl": "0.0.29",
78
+ "vue-cli-plugin-style-resources-loader": "^0.1.4",
79
+ "vue-mapvgl": "0.0.28",
80
+ "vue-template-compiler": "^2.6.11",
81
+ "vuepress": "^1.5.2",
82
+ "webpack-theme-color-replacer": "1.3.18",
83
+ "whatwg-fetch": "^3.0.0"
84
+ },
85
+ "browserslist": [
86
+ "> 1%",
87
+ "last 2 versions",
88
+ "not ie <= 10"
89
+ ]
90
+ }
@@ -1,61 +1,61 @@
1
- import Vue from 'vue'
2
-
3
- import CustomColumnsDrawer from '@vue2-client/base-client/components/common/CustomColumnsDrawer'
4
- import InstructDetailsView from '@vue2-client/base-client/components/iot/InstructDetailsView'
5
- import MeterDetailsView from '@vue2-client/base-client/components/iot/MeterDetailsView'
6
- import CustomerDetailsView from '@vue2-client/base-client/components/iot/CustomerDetailsView'
7
- import LogDetailsView from '@vue2-client/base-client/components/iot/LogDetailsView'
8
- import WebmeterAnalysisView from '@vue2-client/base-client/components/iot/WebmeterAnalysisView'
9
- import XCard from '@vue2-client/base-client/components/common/XCard/XCard'
10
- import XFormCol from '@vue2-client/base-client/components/common/XFormCol'
11
- import XBadge from '@vue2-client/base-client/components/common/XBadge'
12
- import DataAnalysisView from '@vue2-client/base-client/components/iot/DataAnalysisView'
13
- import DataAnalysisUser from '@vue2-client/base-client/components/iot/DataAnalysisUser'
14
- import SrcollList from '@vue2-client/base-client/components/common/ScrollList'
15
- import AmapPointRendering from '@vue2-client/base-client/components/common/AmapPointRendering'
16
- import DeviceTypeDetailsView from '@vue2-client/base-client/components/iot/DeviceTypeDetailsView'
17
- import DeviceBrandDetailsView from '@vue2-client/base-client/components/iot/DeviceBrandDetailsView'
18
- import DictionaryDetailsView from '@vue2-client/base-client/components/system/DictionaryDetailsView'
19
- import QueryParamsDetailsView from '@vue2-client/base-client/components/system/QueryParamsDetailsView'
20
- import DeviceDetailsView from '@vue2-client/base-client/components/iot/DeviceDetailsView'
21
- import TicketDetailsView from '@vue2-client/base-client/components/ticket/TicketDetailsView'
22
- import EmployeeDetailsView from '@vue2-client/base-client/components/ticket/EmployeeDetailsView'
23
- import submitTicketSuccess from '@vue2-client/base-client/components/ticket/TicketSubmitSuccessView'
24
- import CreateQuery from '@vue2-client/base-client/components/common/CreateQuery'
25
- import CreateSimpleFormQuery from '@vue2-client/base-client/components/common/CreateSimpleFormQuery'
26
- import FormGroupQuery from '@vue2-client/base-client/components/common/FormGroupQuery'
27
- import FormGroupEdit from '@vue2-client/base-client/components/common/FormGroupEdit'
28
- import JSONToTree from '@vue2-client/base-client/components/common/JSONToTree'
29
- import Upload from '@vue2-client/base-client/components/common/Upload'
30
-
31
- // 插件
32
- import Plugins from '@vue2-client/base-client/plugins'
33
- Vue.use(Plugins)
34
-
35
- Vue.component('custom-columns-drawer', CustomColumnsDrawer)
36
- Vue.component('InstructDetailsView', InstructDetailsView)
37
- Vue.component('MeterDetailsView', MeterDetailsView)
38
- Vue.component('CustomerDetailsView', CustomerDetailsView)
39
- Vue.component('LogDetailsView', LogDetailsView)
40
- Vue.component('WebmeterAnalysisView', WebmeterAnalysisView)
41
- Vue.component('XCard', XCard)
42
- Vue.component('XBadge', XBadge)
43
- Vue.component('XFormCol', XFormCol)
44
- Vue.component('DataAnalysisView', DataAnalysisView)
45
- Vue.component('DataAnalysisUser', DataAnalysisUser)
46
- Vue.component('SrcollList', SrcollList)
47
- Vue.component('DeviceTypeDetailsView', DeviceTypeDetailsView)
48
- Vue.component('DeviceBrandDetailsView', DeviceBrandDetailsView)
49
- Vue.component('DeviceDetailsView', DeviceDetailsView)
50
- Vue.component('DictionaryDetailsView', DictionaryDetailsView)
51
- Vue.component('QueryParamsDetailsView', QueryParamsDetailsView)
52
- Vue.component('TicketDetailsView', TicketDetailsView)
53
- Vue.component('EmployeeDetailsView', EmployeeDetailsView)
54
- Vue.component('submitTicketSuccess', submitTicketSuccess)
55
- Vue.component('CreateQuery', CreateQuery)
56
- Vue.component('CreateSimpleFormQuery', CreateSimpleFormQuery)
57
- Vue.component('FormGroupQuery', FormGroupQuery)
58
- Vue.component('FormGroupEdit', FormGroupEdit)
59
- Vue.component('JSONToTree', JSONToTree)
60
- Vue.component('Upload', Upload)
61
- Vue.component('AmapPointRendering', AmapPointRendering)
1
+ import Vue from 'vue'
2
+
3
+ import CustomColumnsDrawer from '@vue2-client/base-client/components/common/CustomColumnsDrawer'
4
+ import InstructDetailsView from '@vue2-client/base-client/components/iot/InstructDetailsView'
5
+ import MeterDetailsView from '@vue2-client/base-client/components/iot/MeterDetailsView'
6
+ import CustomerDetailsView from '@vue2-client/base-client/components/iot/CustomerDetailsView'
7
+ import LogDetailsView from '@vue2-client/base-client/components/iot/LogDetailsView'
8
+ import WebmeterAnalysisView from '@vue2-client/base-client/components/iot/WebmeterAnalysisView'
9
+ import XCard from '@vue2-client/base-client/components/common/XCard/XCard'
10
+ import XFormCol from '@vue2-client/base-client/components/common/XFormCol'
11
+ import XBadge from '@vue2-client/base-client/components/common/XBadge'
12
+ import DataAnalysisView from '@vue2-client/base-client/components/iot/DataAnalysisView'
13
+ import DataAnalysisUser from '@vue2-client/base-client/components/iot/DataAnalysisUser'
14
+ import SrcollList from '@vue2-client/base-client/components/common/ScrollList'
15
+ import AmapPointRendering from '@vue2-client/base-client/components/common/AmapMarker'
16
+ import DeviceTypeDetailsView from '@vue2-client/base-client/components/iot/DeviceTypeDetailsView'
17
+ import DeviceBrandDetailsView from '@vue2-client/base-client/components/iot/DeviceBrandDetailsView'
18
+ import DictionaryDetailsView from '@vue2-client/base-client/components/system/DictionaryDetailsView'
19
+ import QueryParamsDetailsView from '@vue2-client/base-client/components/system/QueryParamsDetailsView'
20
+ import DeviceDetailsView from '@vue2-client/base-client/components/iot/DeviceDetailsView'
21
+ import TicketDetailsView from '@vue2-client/base-client/components/ticket/TicketDetailsView'
22
+ import EmployeeDetailsView from '@vue2-client/base-client/components/ticket/EmployeeDetailsView'
23
+ import submitTicketSuccess from '@vue2-client/base-client/components/ticket/TicketSubmitSuccessView'
24
+ import CreateQuery from '@vue2-client/base-client/components/common/CreateQuery'
25
+ import CreateSimpleFormQuery from '@vue2-client/base-client/components/common/CreateSimpleFormQuery'
26
+ import FormGroupQuery from '@vue2-client/base-client/components/common/FormGroupQuery'
27
+ import FormGroupEdit from '@vue2-client/base-client/components/common/FormGroupEdit'
28
+ import JSONToTree from '@vue2-client/base-client/components/common/JSONToTree'
29
+ import Upload from '@vue2-client/base-client/components/common/Upload'
30
+
31
+ // 插件
32
+ import Plugins from '@vue2-client/base-client/plugins'
33
+ Vue.use(Plugins)
34
+
35
+ Vue.component('custom-columns-drawer', CustomColumnsDrawer)
36
+ Vue.component('InstructDetailsView', InstructDetailsView)
37
+ Vue.component('MeterDetailsView', MeterDetailsView)
38
+ Vue.component('CustomerDetailsView', CustomerDetailsView)
39
+ Vue.component('LogDetailsView', LogDetailsView)
40
+ Vue.component('WebmeterAnalysisView', WebmeterAnalysisView)
41
+ Vue.component('XCard', XCard)
42
+ Vue.component('XBadge', XBadge)
43
+ Vue.component('XFormCol', XFormCol)
44
+ Vue.component('DataAnalysisView', DataAnalysisView)
45
+ Vue.component('DataAnalysisUser', DataAnalysisUser)
46
+ Vue.component('SrcollList', SrcollList)
47
+ Vue.component('DeviceTypeDetailsView', DeviceTypeDetailsView)
48
+ Vue.component('DeviceBrandDetailsView', DeviceBrandDetailsView)
49
+ Vue.component('DeviceDetailsView', DeviceDetailsView)
50
+ Vue.component('DictionaryDetailsView', DictionaryDetailsView)
51
+ Vue.component('QueryParamsDetailsView', QueryParamsDetailsView)
52
+ Vue.component('TicketDetailsView', TicketDetailsView)
53
+ Vue.component('EmployeeDetailsView', EmployeeDetailsView)
54
+ Vue.component('submitTicketSuccess', submitTicketSuccess)
55
+ Vue.component('CreateQuery', CreateQuery)
56
+ Vue.component('CreateSimpleFormQuery', CreateSimpleFormQuery)
57
+ Vue.component('FormGroupQuery', FormGroupQuery)
58
+ Vue.component('FormGroupEdit', FormGroupEdit)
59
+ Vue.component('JSONToTree', JSONToTree)
60
+ Vue.component('Upload', Upload)
61
+ Vue.component('AmapPointRendering', AmapPointRendering)
@@ -1,106 +1,104 @@
1
- <template >
2
- <div id="amap_point_rendering_map" :style="mapStyle">
3
- <div v-show="false">
4
- <div id="amap_point_rendering_template">
5
- <a-descriptions>
6
- <a-descriptions-item span="3" v-for="(des, index) in describeList" :key="index" :label="des.describe" >{{ selectrow[des.field] }}</a-descriptions-item>
7
- </a-descriptions>
8
- </div>
9
- </div>
10
- </div>
11
- </template>
12
- <script>
13
- export default {
14
- name: 'AmapPointRendering',
15
- props: {
16
- // 选中点位后需要展示的信息描述
17
- describeList: {
18
- type: Array,
19
- // eslint-disable-next-line vue/require-valid-default-prop
20
- default: () => { return [ ] } // lng:描述信息 lat:描述信息对应的值的字段名 { describe: '用户名称', field: 'name' }
21
- },
22
- // 需要渲染的点位数据
23
- markers: {
24
- type: Object,
25
- default: null // lng:精度值 lat:纬度值
26
- },
27
- // 渲染点位的图片
28
- imgurl: {
29
- type: String,
30
- default: '/image/success1.png'
31
- },
32
- mapStyle: {
33
- type: Object,
34
- default: () => {
35
- return {
36
- width: '100%',
37
- height: '85vh',
38
- border: '2px solid lightgray',
39
- 'border-radius': '5px'
40
- }
41
- }
42
- }
43
- },
44
- data () {
45
- return {
46
- map: null,
47
- geocoder: null, // 逆地理编码
48
- infoWindow: null,
49
- selectrow: {}
50
- }
51
- },
52
- created () {
53
- },
54
- mounted () {
55
- this.initMap()
56
- this.initData()
57
- },
58
- methods: {
59
- initData () {
60
- // 创建一个 Marker 实例:
61
- if (this.markers && this.markers.lng && this.markers.lat) {
62
- const that = this
63
- const marker = new this.$AMap.Marker({
64
- position: new this.$AMap.LngLat(this.markers.lng, this.markers.lat), // 经纬度对象,也可以是经纬度构成的一维数组[116.39, 39.9]
65
- title: '北京',
66
- icon: new this.$AMap.Icon({
67
- size: new this.$AMap.Size(26, 28), // 图标大小
68
- url: this.imgurl, // 报警图标URL
69
- anchor: new this.$AMap.Pixel(0, 0), // 图标偏移位置
70
- }),
71
- extData: this.markers
72
- })
73
- marker.on('click', function (e) {
74
- console.log(e.target.getExtData())
75
- that.selectrow = e.target.getExtData()
76
- that.infoWindow.setContent(document.getElementById('amap_point_rendering_template'))
77
- that.infoWindow.open(that.map, [e.target.getExtData().lng, e.target.getExtData().lat])
78
- })
79
- // 将创建的点标记添加到已有的地图实例:
80
- this.map.add(marker)
81
- this.map.setFitView()
82
- }
83
- },
84
- initMap () {
85
- this.map = new this.$AMap.Map('amap_point_rendering_map', { // 设置地图容器id
86
- resizeEnable: true, // 是否监控地图容器尺寸变化
87
- zoom: 17, // 初始化地图层级
88
- center: [108.943784, 34.265] // 初始化地图中心点
89
- })
90
- this.geocoder = new this.$AMap.Geocoder({
91
- radius: 500 // 范围,默认:500
92
- })
93
- this.map.addControl(new this.$AMap.ToolBar()) // 初始化工具插件
94
- // 初始化窗体
95
- this.infoWindow = new this.$AMap.InfoWindow({
96
- anchor: 'bottom-center',
97
- isCustom: false, // 使用自定义窗体
98
- autoMove: true,
99
- content: '',
100
- showShadow: true,
101
- offset: new this.$AMap.Pixel(0, -25)
102
- })
103
- }
104
- }
105
- }
106
- </script>
1
+ <template >
2
+ <div id="amap_point_rendering_map" :style="mapStyle">
3
+ <div v-show="false">
4
+ <div id="amap_point_rendering_template">
5
+ <a-descriptions :column="1">
6
+ <a-descriptions-item v-for="(des, index) in describeList" :key="index" :label="des.describe" >{{ markers[des.field] }}</a-descriptions-item>
7
+ </a-descriptions>
8
+ </div>
9
+ </div>
10
+ </div>
11
+ </template>
12
+ <script>
13
+ export default {
14
+ name: 'AmapPointRendering',
15
+ props: {
16
+ // 选中点位后需要展示的信息描述
17
+ describeList: {
18
+ type: Array,
19
+ // eslint-disable-next-line vue/require-valid-default-prop
20
+ default: () => { return [ ] } // lng:描述信息 lat:描述信息对应的值的字段名 { describe: '用户名称', field: 'name' }
21
+ },
22
+ // 需要渲染的点位数据
23
+ markers: {
24
+ type: Object,
25
+ default: null // lng:精度值 lat:纬度值
26
+ },
27
+ // 渲染点位的图片
28
+ imgurl: {
29
+ type: String,
30
+ default: '/image/success1.png'
31
+ },
32
+ mapStyle: {
33
+ type: Object,
34
+ default: () => {
35
+ return {
36
+ width: '100%',
37
+ height: '85vh',
38
+ border: '2px solid lightgray',
39
+ 'border-radius': '5px'
40
+ }
41
+ }
42
+ }
43
+ },
44
+ data () {
45
+ return {
46
+ map: null,
47
+ geocoder: null, // 逆地理编码
48
+ infoWindow: null,
49
+ selectrow: {}
50
+ }
51
+ },
52
+ created () {
53
+ },
54
+ mounted () {
55
+ this.initMap()
56
+ this.initData()
57
+ },
58
+ methods: {
59
+ initData () {
60
+ // 创建一个 Marker 实例:
61
+ if (this.markers && this.markers.lng && this.markers.lat) {
62
+ const that = this
63
+ const marker = new this.$AMap.Marker({
64
+ position: new this.$AMap.LngLat(this.markers.lng, this.markers.lat), // 经纬度对象,也可以是经纬度构成的一维数组[116.39, 39.9]
65
+ title: '北京',
66
+ icon: new this.$AMap.Icon({
67
+ size: new this.$AMap.Size(26, 28), // 图标大小
68
+ url: this.imgurl, // 报警图标URL
69
+ anchor: new this.$AMap.Pixel(0, 0), // 图标偏移位置
70
+ }),
71
+ extData: this.markers
72
+ })
73
+ marker.on('click', function (e) {
74
+ that.infoWindow.setContent(document.getElementById('amap_point_rendering_template'))
75
+ that.infoWindow.open(that.map, [e.target.getExtData().lng, e.target.getExtData().lat])
76
+ })
77
+ // 将创建的点标记添加到已有的地图实例:
78
+ this.map.add(marker)
79
+ this.map.setFitView()
80
+ }
81
+ },
82
+ initMap () {
83
+ this.map = new this.$AMap.Map('amap_point_rendering_map', { // 设置地图容器id
84
+ resizeEnable: true, // 是否监控地图容器尺寸变化
85
+ zoom: 17, // 初始化地图层级
86
+ center: [108.943784, 34.265] // 初始化地图中心点
87
+ })
88
+ this.geocoder = new this.$AMap.Geocoder({
89
+ radius: 500 // 范围,默认:500
90
+ })
91
+ this.map.addControl(new this.$AMap.ToolBar()) // 初始化工具插件
92
+ // 初始化窗体
93
+ this.infoWindow = new this.$AMap.InfoWindow({
94
+ anchor: 'bottom-center',
95
+ isCustom: false, // 使用自定义窗体
96
+ autoMove: true,
97
+ content: '',
98
+ showShadow: true,
99
+ offset: new this.$AMap.Pixel(0, -25)
100
+ })
101
+ }
102
+ }
103
+ }
104
+ </script>
@@ -1,3 +1,3 @@
1
- import AmapPointRendering from './AmapPointRendering'
2
-
3
- export default AmapPointRendering
1
+ import AmapPointRendering from './AmapPointRendering'
2
+
3
+ export default AmapPointRendering