vue2-client 1.2.46 → 1.2.47
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/docs/notice.md +22 -22
- package/package.json +1 -1
- package/src/App.vue +99 -99
- package/src/base-client/all.js +61 -61
- package/src/base-client/components/common/AmapMarker/AmapPointRendering.vue +104 -104
- package/src/base-client/components/common/AmapMarker/index.js +3 -3
- package/src/base-client/components/common/FormGroupEdit/FormGroupEdit.vue +149 -149
- package/src/base-client/components/common/ScrollList/SrcollList.vue +113 -113
- package/src/base-client/components/common/ScrollList/index.js +3 -3
- package/src/base-client/components/common/XForm/XForm.vue +275 -275
- package/src/base-client/components/iot/CustomerDetailsView/CustomerDetailsView.vue +225 -225
- package/src/base-client/components/iot/DataAnalysisView/DataAnalysisView.vue +244 -244
- package/src/base-client/components/iot/DeviceBrandDetailsView/DeviceBrandDetailsView.vue +452 -452
- package/src/base-client/components/iot/DeviceDetailsView/DeviceDetailsView.vue +236 -236
- package/src/base-client/components/iot/DeviceDetailsView/part/DeviceDetailsCount.vue +330 -330
- package/src/base-client/components/iot/DeviceDetailsView/part/DeviceDetailsInstructOperate.vue +121 -121
- package/src/base-client/components/iot/DeviceTypeDetailsView/DeviceTypeDetailsView.vue +276 -276
- package/src/base-client/components/iot/InstructDetailsView/InstructDetailsView.vue +469 -469
- package/src/base-client/components/iot/LogDetailsView/LogDetailsView.vue +379 -379
- package/src/base-client/components/iot/MeterDetailsView/MeterDetailsView.vue +359 -359
- package/src/base-client/components/iot/MeterDetailsView/part/MeterDetailsCount.vue +335 -335
- package/src/base-client/components/iot/MeterDetailsView/part/MeterDetailsException.vue +184 -184
- package/src/base-client/components/iot/MeterDetailsView/part/MeterDetailsHandPlan.vue +291 -291
- package/src/base-client/components/iot/MeterDetailsView/part/MeterDetailsInstruct.vue +236 -236
- package/src/base-client/components/iot/MeterDetailsView/part/MeterDetailsMain.vue +256 -256
- package/src/base-client/components/iot/MeterDetailsView/part/MeterDetailsSellGas.vue +189 -189
- package/src/base-client/components/iot/WebmeterAnalysisView/WebmeterAnalysisView.vue +722 -722
- package/src/base-client/components/system/DictionaryDetailsView/DictionaryDetailsView.vue +231 -231
- package/src/base-client/components/system/QueryParamsDetailsView/QueryParamsDetailsView.vue +247 -247
- package/src/base-client/components/ticket/EmployeeDetailsView/EmployeeDetailsView.vue +370 -370
- package/src/base-client/components/ticket/TicketDetailsView/part/TicketDetailsFlow.vue +260 -260
- package/src/base-client/plugins/AppData.js +67 -67
- package/src/base-client/plugins/GetLoginInfoService.js +252 -252
- package/src/components/exception/ExceptionPage.vue +70 -70
- package/src/components/setting/Setting.vue +235 -235
- package/src/config/index.js +3 -3
- package/src/layouts/SinglePageView.vue +78 -78
- package/src/layouts/header/HeaderNotice.vue +97 -97
- package/src/pages/exception/403.vue +21 -21
- package/src/pages/exception/404.vue +21 -21
- package/src/pages/exception/500.vue +21 -21
- package/src/pages/report/ReportTableHome.vue +28 -28
- package/src/pages/resourceManage/depListManage.vue +23 -23
- package/src/pages/resourceManage/funListManage.vue +23 -23
- package/src/pages/resourceManage/index.js +15 -15
- package/src/pages/resourceManage/orgListManage.vue +98 -98
- package/src/pages/resourceManage/roleListManage.vue +23 -23
- package/src/pages/resourceManage/staffListManage.vue +23 -23
- package/src/pages/system/ticket/submitTicketSuccess.vue +248 -248
- package/src/services/api/common.js +47 -47
- package/src/services/api/index.js +39 -39
- package/src/services/user.js +34 -34
- package/src/utils/indexedDB.js +146 -146
- package/src/utils/map-utils.js +17 -0
- package/src/utils/routerUtil.js +359 -359
package/docs/notice.md
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
# 开发规范(持续跟新)
|
|
2
|
-
## 引入各种文件时,必须写绝对路径, 不允许写相对路径
|
|
3
|
-
```js
|
|
4
|
-
// 引自己项目时文件时, @ 表示自己项目的src目录
|
|
5
|
-
import('@vue2-client/pages/system/queryParams')
|
|
6
|
-
```
|
|
7
|
-
## 编写vue文件的样式时, 必须使用less, 样式必须在最外层添加当前页面html的id, id与vue文件名相同
|
|
8
|
-
```vue
|
|
9
|
-
helloWorld.vue
|
|
10
|
-
<template>
|
|
11
|
-
<div id="helloWorld">
|
|
12
|
-
|
|
13
|
-
</div>
|
|
14
|
-
</template>
|
|
15
|
-
|
|
16
|
-
<style lang="less">
|
|
17
|
-
#helloWorld{
|
|
18
|
-
/*写自己的样式*/
|
|
19
|
-
}
|
|
20
|
-
</style>
|
|
21
|
-
```
|
|
22
|
-
|
|
1
|
+
# 开发规范(持续跟新)
|
|
2
|
+
## 引入各种文件时,必须写绝对路径, 不允许写相对路径
|
|
3
|
+
```js
|
|
4
|
+
// 引自己项目时文件时, @ 表示自己项目的src目录
|
|
5
|
+
import('@vue2-client/pages/system/queryParams')
|
|
6
|
+
```
|
|
7
|
+
## 编写vue文件的样式时, 必须使用less, 样式必须在最外层添加当前页面html的id, id与vue文件名相同
|
|
8
|
+
```vue
|
|
9
|
+
helloWorld.vue
|
|
10
|
+
<template>
|
|
11
|
+
<div id="helloWorld">
|
|
12
|
+
|
|
13
|
+
</div>
|
|
14
|
+
</template>
|
|
15
|
+
|
|
16
|
+
<style lang="less">
|
|
17
|
+
#helloWorld{
|
|
18
|
+
/*写自己的样式*/
|
|
19
|
+
}
|
|
20
|
+
</style>
|
|
21
|
+
```
|
|
22
|
+
|
package/package.json
CHANGED
package/src/App.vue
CHANGED
|
@@ -1,99 +1,99 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<a-config-provider :locale="locale" :get-popup-container="popContainer">
|
|
3
|
-
<router-view/>
|
|
4
|
-
</a-config-provider>
|
|
5
|
-
</template>
|
|
6
|
-
|
|
7
|
-
<script>
|
|
8
|
-
import { enquireScreen } from '@vue2-client/utils/util'
|
|
9
|
-
import { mapState, mapMutations } from 'vuex'
|
|
10
|
-
import themeUtil from '@vue2-client/utils/themeUtil'
|
|
11
|
-
import { getI18nKey } from '@vue2-client/utils/routerUtil'
|
|
12
|
-
|
|
13
|
-
export default {
|
|
14
|
-
name: 'App',
|
|
15
|
-
data () {
|
|
16
|
-
return {
|
|
17
|
-
locale: {}
|
|
18
|
-
}
|
|
19
|
-
},
|
|
20
|
-
created () {
|
|
21
|
-
this.setHtmlTitle()
|
|
22
|
-
this.setLanguage(this.lang)
|
|
23
|
-
enquireScreen(isMobile => this.setDevice(isMobile))
|
|
24
|
-
},
|
|
25
|
-
mounted () {
|
|
26
|
-
this.setWeekModeTheme(this.weekMode)
|
|
27
|
-
},
|
|
28
|
-
watch: {
|
|
29
|
-
weekMode (val) {
|
|
30
|
-
this.setWeekModeTheme(val)
|
|
31
|
-
},
|
|
32
|
-
lang (val) {
|
|
33
|
-
this.setLanguage(val)
|
|
34
|
-
this.setHtmlTitle()
|
|
35
|
-
},
|
|
36
|
-
$route () {
|
|
37
|
-
this.setHtmlTitle()
|
|
38
|
-
},
|
|
39
|
-
'theme.mode': {
|
|
40
|
-
immediate: true,
|
|
41
|
-
handler: function (val) {
|
|
42
|
-
const closeMessage = this.$message.loading(`您选择了主题模式 ${val}, 正在切换...`)
|
|
43
|
-
themeUtil.changeThemeColor(this.theme.color, val).then(closeMessage)
|
|
44
|
-
}
|
|
45
|
-
},
|
|
46
|
-
'theme.color': {
|
|
47
|
-
immediate: true,
|
|
48
|
-
handler: function (val) {
|
|
49
|
-
const closeMessage = this.$message.loading(`您选择了主题色 ${val}, 正在切换...`)
|
|
50
|
-
themeUtil.changeThemeColor(val, this.theme.mode).then(closeMessage)
|
|
51
|
-
}
|
|
52
|
-
},
|
|
53
|
-
'layout': function () {
|
|
54
|
-
window.dispatchEvent(new Event('resize'))
|
|
55
|
-
}
|
|
56
|
-
},
|
|
57
|
-
computed: {
|
|
58
|
-
...mapState('setting', ['layout', 'theme', 'weekMode', 'lang'])
|
|
59
|
-
},
|
|
60
|
-
methods: {
|
|
61
|
-
...mapMutations('setting', ['setDevice']),
|
|
62
|
-
setWeekModeTheme (weekMode) {
|
|
63
|
-
if (weekMode) {
|
|
64
|
-
document.body.classList.add('week-mode')
|
|
65
|
-
} else {
|
|
66
|
-
document.body.classList.remove('week-mode')
|
|
67
|
-
}
|
|
68
|
-
},
|
|
69
|
-
setLanguage (lang) {
|
|
70
|
-
this.$i18n.locale = lang
|
|
71
|
-
switch (lang) {
|
|
72
|
-
case 'CN':
|
|
73
|
-
this.locale = require('ant-design-vue/es/locale-provider/zh_CN').default
|
|
74
|
-
break
|
|
75
|
-
case 'HK':
|
|
76
|
-
this.locale = require('ant-design-vue/es/locale-provider/zh_TW').default
|
|
77
|
-
break
|
|
78
|
-
case 'US':
|
|
79
|
-
default:
|
|
80
|
-
this.locale = require('ant-design-vue/es/locale-provider/en_US').default
|
|
81
|
-
break
|
|
82
|
-
}
|
|
83
|
-
},
|
|
84
|
-
setHtmlTitle () {
|
|
85
|
-
const route = this.$route
|
|
86
|
-
const key = route.path === '/' ? 'home.name' : getI18nKey(route.matched[route.matched.length - 1].path)
|
|
87
|
-
document.title = process.env.VUE_APP_NAME + ' | ' + this.$t(key)
|
|
88
|
-
},
|
|
89
|
-
popContainer () {
|
|
90
|
-
return document.getElementById('popContainer')
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
</script>
|
|
95
|
-
|
|
96
|
-
<style lang="less" scoped>
|
|
97
|
-
#id{
|
|
98
|
-
}
|
|
99
|
-
</style>
|
|
1
|
+
<template>
|
|
2
|
+
<a-config-provider :locale="locale" :get-popup-container="popContainer">
|
|
3
|
+
<router-view/>
|
|
4
|
+
</a-config-provider>
|
|
5
|
+
</template>
|
|
6
|
+
|
|
7
|
+
<script>
|
|
8
|
+
import { enquireScreen } from '@vue2-client/utils/util'
|
|
9
|
+
import { mapState, mapMutations } from 'vuex'
|
|
10
|
+
import themeUtil from '@vue2-client/utils/themeUtil'
|
|
11
|
+
import { getI18nKey } from '@vue2-client/utils/routerUtil'
|
|
12
|
+
|
|
13
|
+
export default {
|
|
14
|
+
name: 'App',
|
|
15
|
+
data () {
|
|
16
|
+
return {
|
|
17
|
+
locale: {}
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
created () {
|
|
21
|
+
this.setHtmlTitle()
|
|
22
|
+
this.setLanguage(this.lang)
|
|
23
|
+
enquireScreen(isMobile => this.setDevice(isMobile))
|
|
24
|
+
},
|
|
25
|
+
mounted () {
|
|
26
|
+
this.setWeekModeTheme(this.weekMode)
|
|
27
|
+
},
|
|
28
|
+
watch: {
|
|
29
|
+
weekMode (val) {
|
|
30
|
+
this.setWeekModeTheme(val)
|
|
31
|
+
},
|
|
32
|
+
lang (val) {
|
|
33
|
+
this.setLanguage(val)
|
|
34
|
+
this.setHtmlTitle()
|
|
35
|
+
},
|
|
36
|
+
$route () {
|
|
37
|
+
this.setHtmlTitle()
|
|
38
|
+
},
|
|
39
|
+
'theme.mode': {
|
|
40
|
+
immediate: true,
|
|
41
|
+
handler: function (val) {
|
|
42
|
+
const closeMessage = this.$message.loading(`您选择了主题模式 ${val}, 正在切换...`)
|
|
43
|
+
themeUtil.changeThemeColor(this.theme.color, val).then(closeMessage)
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
'theme.color': {
|
|
47
|
+
immediate: true,
|
|
48
|
+
handler: function (val) {
|
|
49
|
+
const closeMessage = this.$message.loading(`您选择了主题色 ${val}, 正在切换...`)
|
|
50
|
+
themeUtil.changeThemeColor(val, this.theme.mode).then(closeMessage)
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
'layout': function () {
|
|
54
|
+
window.dispatchEvent(new Event('resize'))
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
computed: {
|
|
58
|
+
...mapState('setting', ['layout', 'theme', 'weekMode', 'lang'])
|
|
59
|
+
},
|
|
60
|
+
methods: {
|
|
61
|
+
...mapMutations('setting', ['setDevice']),
|
|
62
|
+
setWeekModeTheme (weekMode) {
|
|
63
|
+
if (weekMode) {
|
|
64
|
+
document.body.classList.add('week-mode')
|
|
65
|
+
} else {
|
|
66
|
+
document.body.classList.remove('week-mode')
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
setLanguage (lang) {
|
|
70
|
+
this.$i18n.locale = lang
|
|
71
|
+
switch (lang) {
|
|
72
|
+
case 'CN':
|
|
73
|
+
this.locale = require('ant-design-vue/es/locale-provider/zh_CN').default
|
|
74
|
+
break
|
|
75
|
+
case 'HK':
|
|
76
|
+
this.locale = require('ant-design-vue/es/locale-provider/zh_TW').default
|
|
77
|
+
break
|
|
78
|
+
case 'US':
|
|
79
|
+
default:
|
|
80
|
+
this.locale = require('ant-design-vue/es/locale-provider/en_US').default
|
|
81
|
+
break
|
|
82
|
+
}
|
|
83
|
+
},
|
|
84
|
+
setHtmlTitle () {
|
|
85
|
+
const route = this.$route
|
|
86
|
+
const key = route.path === '/' ? 'home.name' : getI18nKey(route.matched[route.matched.length - 1].path)
|
|
87
|
+
document.title = process.env.VUE_APP_NAME + ' | ' + this.$t(key)
|
|
88
|
+
},
|
|
89
|
+
popContainer () {
|
|
90
|
+
return document.getElementById('popContainer')
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
</script>
|
|
95
|
+
|
|
96
|
+
<style lang="less" scoped>
|
|
97
|
+
#id{
|
|
98
|
+
}
|
|
99
|
+
</style>
|
package/src/base-client/all.js
CHANGED
|
@@ -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/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
|
+
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,104 +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 :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
|
|
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
|
+
<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
|