vue2-client 1.2.109 → 1.2.112
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/.env +15 -15
- package/.eslintrc.js +82 -82
- package/CHANGELOG.md +6 -0
- package/package.json +13 -32
- package/src/base-client/all.js +0 -4
- package/src/base-client/components/common/AmapMarker/AmapPointRendering.vue +113 -113
- package/src/base-client/components/common/CitySelect/CitySelect.vue +244 -244
- package/src/base-client/components/common/CitySelect/index.js +3 -3
- package/src/base-client/components/common/CitySelect/index.md +109 -109
- package/src/base-client/components/common/CreateQuery/CreateQuery.vue +547 -547
- package/src/base-client/components/common/CreateQuery/CreateQueryItem.vue +777 -777
- package/src/base-client/components/common/CreateSimpleFormQuery/CreateSimpleFormQuery.vue +310 -310
- package/src/base-client/components/common/PersonSetting/PersonSetting.vue +210 -210
- package/src/base-client/components/common/PersonSetting/index.js +3 -3
- package/src/base-client/components/common/Upload/index.js +3 -3
- package/src/base-client/components/common/XAddForm/XAddForm.vue +349 -349
- package/src/base-client/components/common/XAddNativeForm/XAddNativeForm.vue +322 -322
- package/src/base-client/components/common/XCard/XCard.vue +64 -64
- package/src/base-client/components/common/XForm/XForm.vue +268 -268
- package/src/base-client/components/common/XFormTable/XFormTable.vue +514 -514
- package/src/base-client/components/common/XFormTable/index.md +96 -96
- package/src/base-client/components/iot/DeviceDetailsView/DeviceDetailsView.vue +232 -232
- package/src/base-client/components/iot/DeviceDetailsView/part/DeviceDetailsCount.vue +678 -678
- package/src/base-client/components/iot/DeviceDetailsView/part/DeviceDetailsException.vue +57 -57
- package/src/base-client/components/iot/DeviceDetailsView/part/DeviceDetailsRead.vue +131 -131
- package/src/base-client/components/iot/DeviceTypeDetailsView/DeviceTypeDetailsView.vue +300 -300
- package/src/base-client/components/iot/WebmeterAnalysisView/WebmeterAnalysisView.vue +960 -960
- package/src/base-client/components/ticket/TicketSubmitSuccessView/TicketSubmitSuccessView.vue +532 -532
- package/src/base-client/plugins/AppData.js +71 -79
- package/src/base-client/plugins/compatible/LoginServiceOA.js +20 -20
- package/src/config/CreateQueryConfig.js +307 -307
- package/src/layouts/header/HeaderNotice.vue +199 -199
- package/src/layouts/header/InstitutionDetail.vue +182 -182
- package/src/pages/resourceManage/orgListManage.vue +98 -98
- package/src/pages/system/ticket/index.vue +111 -130
- package/src/pages/system/ticket/submitTicketSuccess.vue +11 -76
- package/src/router/async/config.async.js +26 -26
- package/src/router/async/router.map.js +60 -60
- package/src/router/index.js +27 -27
- package/src/services/api/TicketDetailsViewApi.js +3 -1
- package/src/services/api/WebmeterAnalysisViewApi.js +24 -24
- package/src/services/api/index.js +39 -39
- package/src/services/api/iot/DeviceDetailsView/DeviceDetailsCountApi.js +18 -18
- package/src/services/api/manage.js +16 -16
- package/src/services/api/restTools.js +24 -24
- package/src/theme/default/style.less +47 -47
- package/src/utils/request.js +7 -3
- package/src/utils/util.js +230 -230
- package/vue.config.js +163 -163
- package/src/base-client/components/common/ScrollList/SrcollList.vue +0 -113
- package/src/base-client/components/common/ScrollList/index.js +0 -3
- package/src/base-client/components/iot/DataAnalysisView/DataAnalysisView.vue +0 -244
- package/src/base-client/components/iot/DataAnalysisView/index.js +0 -3
- package/src/components/dataAnalysisView/UserData.vue +0 -61
package/vue.config.js
CHANGED
|
@@ -1,163 +1,163 @@
|
|
|
1
|
-
const path = require('path')
|
|
2
|
-
const webpack = require('webpack')
|
|
3
|
-
const ThemeColorReplacer = require('webpack-theme-color-replacer')
|
|
4
|
-
const { getThemeColors, modifyVars } = require('./src/utils/themeUtil')
|
|
5
|
-
const { resolveCss } = require('./src/utils/theme-color-replacer-extend')
|
|
6
|
-
const CompressionWebpackPlugin = require('compression-webpack-plugin')
|
|
7
|
-
|
|
8
|
-
const productionGzipExtensions = ['js', 'css']
|
|
9
|
-
const isProd = process.env.NODE_ENV === 'production'
|
|
10
|
-
|
|
11
|
-
// const assetsCDN = {
|
|
12
|
-
// // webpack build externals
|
|
13
|
-
// externals: {
|
|
14
|
-
// vue: 'Vue',
|
|
15
|
-
// 'vue-router': 'VueRouter',
|
|
16
|
-
// vuex: 'Vuex',
|
|
17
|
-
// axios: 'axios',
|
|
18
|
-
// nprogress: 'NProgress',
|
|
19
|
-
// clipboard: 'ClipboardJS',
|
|
20
|
-
// '@antv/data-set': 'DataSet',
|
|
21
|
-
// 'js-cookie': 'Cookies'
|
|
22
|
-
// },
|
|
23
|
-
// css: [
|
|
24
|
-
// ],
|
|
25
|
-
// js: [
|
|
26
|
-
// '//cdn.jsdelivr.net/npm/vue@2.6.11/dist/vue.min.js',
|
|
27
|
-
// '//cdn.jsdelivr.net/npm/vue-router@3.3.4/dist/vue-router.min.js',
|
|
28
|
-
// '//cdn.jsdelivr.net/npm/vuex@3.4.0/dist/vuex.min.js',
|
|
29
|
-
// '//cdn.jsdelivr.net/npm/axios@0.19.2/dist/axios.min.js',
|
|
30
|
-
// '//cdn.jsdelivr.net/npm/nprogress@0.2.0/nprogress.min.js',
|
|
31
|
-
// '//cdn.jsdelivr.net/npm/clipboard@2.0.6/dist/clipboard.min.js',
|
|
32
|
-
// '//cdn.jsdelivr.net/npm/@antv/data-set@0.11.4/build/data-set.min.js',
|
|
33
|
-
// '//cdn.jsdelivr.net/npm/js-cookie@2.2.1/src/js.cookie.min.js'
|
|
34
|
-
// ]
|
|
35
|
-
// }
|
|
36
|
-
|
|
37
|
-
const server = 'http://121.36.106.17:8400'
|
|
38
|
-
const local = 'http://localhost:8445/webmeter'
|
|
39
|
-
// const local = 'http://123.60.214.109:8405/webmeter'
|
|
40
|
-
|
|
41
|
-
module.exports = {
|
|
42
|
-
devServer: {
|
|
43
|
-
// development server port 8000
|
|
44
|
-
port: 8001,
|
|
45
|
-
// If you want to turn on the proxy, please remove the mockjs /src/main.jsL11
|
|
46
|
-
proxy: {
|
|
47
|
-
'/rs': {
|
|
48
|
-
target: server,
|
|
49
|
-
ws: false,
|
|
50
|
-
changeOrigin: true
|
|
51
|
-
},
|
|
52
|
-
'/image': {
|
|
53
|
-
target: server,
|
|
54
|
-
ws: false,
|
|
55
|
-
changeOrigin: true
|
|
56
|
-
},
|
|
57
|
-
'/webapps': {
|
|
58
|
-
target: server,
|
|
59
|
-
ws: false,
|
|
60
|
-
changeOrigin: true
|
|
61
|
-
},
|
|
62
|
-
'/webmeterapi/foreignaidUseGasSumCountData': {
|
|
63
|
-
// pathRewrite: { '^/webmeterapi': '/rs/logic' },
|
|
64
|
-
target: 'http://61.134.55.234:8405/',
|
|
65
|
-
changeOrigin: true
|
|
66
|
-
},
|
|
67
|
-
'/webmeterapi/getEmpTree': {
|
|
68
|
-
// pathRewrite: { '^/webmeterapi': '/rs/logic' },
|
|
69
|
-
target: 'http://123.60.214.109:8406/',
|
|
70
|
-
changeOrigin: true
|
|
71
|
-
},
|
|
72
|
-
'/webmeterapi': {
|
|
73
|
-
pathRewrite: { '^/webmeterapi': '/rs/logic' },
|
|
74
|
-
target: local,
|
|
75
|
-
changeOrigin: true
|
|
76
|
-
},
|
|
77
|
-
'/webmeteruploadapi': {
|
|
78
|
-
pathRewrite: { '^/webmeteruploadapi': '/rs/file' },
|
|
79
|
-
target: local,
|
|
80
|
-
changeOrigin: true
|
|
81
|
-
},
|
|
82
|
-
'/webmeterresourceapi': {
|
|
83
|
-
pathRewrite: { '^/webmeterresourceapi': '/rs/resource' },
|
|
84
|
-
target: local,
|
|
85
|
-
changeOrigin: true
|
|
86
|
-
},
|
|
87
|
-
'/resource': {
|
|
88
|
-
pathRewrite: { '^/resource': '/' },
|
|
89
|
-
target: 'http://127.0.0.1:4789',
|
|
90
|
-
changeOrigin: true
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
},
|
|
94
|
-
pluginOptions: {
|
|
95
|
-
'style-resources-loader': {
|
|
96
|
-
preProcessor: 'less',
|
|
97
|
-
patterns: [path.resolve(__dirname, './src/theme/theme.less')]
|
|
98
|
-
}
|
|
99
|
-
},
|
|
100
|
-
configureWebpack: config => {
|
|
101
|
-
config.entry.app = ['babel-polyfill', 'whatwg-fetch', './src/main.js']
|
|
102
|
-
config.performance = {
|
|
103
|
-
hints: false
|
|
104
|
-
}
|
|
105
|
-
config.plugins.push(
|
|
106
|
-
new ThemeColorReplacer({
|
|
107
|
-
fileName: 'css/theme-colors-[contenthash:8].css',
|
|
108
|
-
matchColors: getThemeColors(),
|
|
109
|
-
injectCss: true,
|
|
110
|
-
resolveCss
|
|
111
|
-
})
|
|
112
|
-
)
|
|
113
|
-
// Ignore all locale files of moment.js
|
|
114
|
-
config.plugins.push(new webpack.IgnorePlugin(/^\.\/locale$/, /moment$/))
|
|
115
|
-
// 生产环境下将资源压缩成gzip格式
|
|
116
|
-
if (isProd) {
|
|
117
|
-
// add `CompressionWebpack` plugin to webpack plugins
|
|
118
|
-
config.plugins.push(new CompressionWebpackPlugin({
|
|
119
|
-
algorithm: 'gzip',
|
|
120
|
-
test: new RegExp('\\.(' + productionGzipExtensions.join('|') + ')$'),
|
|
121
|
-
threshold: 10240,
|
|
122
|
-
minRatio: 0.8
|
|
123
|
-
}))
|
|
124
|
-
}
|
|
125
|
-
// if prod, add externals
|
|
126
|
-
// if (isProd) {
|
|
127
|
-
// config.externals = assetsCDN.externals
|
|
128
|
-
// }
|
|
129
|
-
},
|
|
130
|
-
chainWebpack: config => {
|
|
131
|
-
// 生产环境下关闭css压缩的 colormin 项,因为此项优化与主题色替换功能冲突
|
|
132
|
-
if (isProd) {
|
|
133
|
-
config.plugin('optimize-css')
|
|
134
|
-
.tap(args => {
|
|
135
|
-
args[0].cssnanoOptions.preset[1].colormin = false
|
|
136
|
-
return args
|
|
137
|
-
})
|
|
138
|
-
}
|
|
139
|
-
// 生产环境下使用CDN
|
|
140
|
-
// if (isProd) {
|
|
141
|
-
// config.plugin('html')
|
|
142
|
-
// .tap(args => {
|
|
143
|
-
// args[0].cdn = assetsCDN
|
|
144
|
-
// return args
|
|
145
|
-
// })
|
|
146
|
-
// }
|
|
147
|
-
config.resolve.alias.set('@vue2-client', path.resolve(__dirname, 'src'))
|
|
148
|
-
},
|
|
149
|
-
css: {
|
|
150
|
-
loaderOptions: {
|
|
151
|
-
less: {
|
|
152
|
-
lessOptions: {
|
|
153
|
-
modifyVars: modifyVars(),
|
|
154
|
-
javascriptEnabled: true
|
|
155
|
-
}
|
|
156
|
-
}
|
|
157
|
-
}
|
|
158
|
-
},
|
|
159
|
-
publicPath: process.env.VUE_APP_PUBLIC_PATH,
|
|
160
|
-
outputDir: 'dist',
|
|
161
|
-
assetsDir: 'static',
|
|
162
|
-
productionSourceMap: false
|
|
163
|
-
}
|
|
1
|
+
const path = require('path')
|
|
2
|
+
const webpack = require('webpack')
|
|
3
|
+
const ThemeColorReplacer = require('webpack-theme-color-replacer')
|
|
4
|
+
const { getThemeColors, modifyVars } = require('./src/utils/themeUtil')
|
|
5
|
+
const { resolveCss } = require('./src/utils/theme-color-replacer-extend')
|
|
6
|
+
const CompressionWebpackPlugin = require('compression-webpack-plugin')
|
|
7
|
+
|
|
8
|
+
const productionGzipExtensions = ['js', 'css']
|
|
9
|
+
const isProd = process.env.NODE_ENV === 'production'
|
|
10
|
+
|
|
11
|
+
// const assetsCDN = {
|
|
12
|
+
// // webpack build externals
|
|
13
|
+
// externals: {
|
|
14
|
+
// vue: 'Vue',
|
|
15
|
+
// 'vue-router': 'VueRouter',
|
|
16
|
+
// vuex: 'Vuex',
|
|
17
|
+
// axios: 'axios',
|
|
18
|
+
// nprogress: 'NProgress',
|
|
19
|
+
// clipboard: 'ClipboardJS',
|
|
20
|
+
// '@antv/data-set': 'DataSet',
|
|
21
|
+
// 'js-cookie': 'Cookies'
|
|
22
|
+
// },
|
|
23
|
+
// css: [
|
|
24
|
+
// ],
|
|
25
|
+
// js: [
|
|
26
|
+
// '//cdn.jsdelivr.net/npm/vue@2.6.11/dist/vue.min.js',
|
|
27
|
+
// '//cdn.jsdelivr.net/npm/vue-router@3.3.4/dist/vue-router.min.js',
|
|
28
|
+
// '//cdn.jsdelivr.net/npm/vuex@3.4.0/dist/vuex.min.js',
|
|
29
|
+
// '//cdn.jsdelivr.net/npm/axios@0.19.2/dist/axios.min.js',
|
|
30
|
+
// '//cdn.jsdelivr.net/npm/nprogress@0.2.0/nprogress.min.js',
|
|
31
|
+
// '//cdn.jsdelivr.net/npm/clipboard@2.0.6/dist/clipboard.min.js',
|
|
32
|
+
// '//cdn.jsdelivr.net/npm/@antv/data-set@0.11.4/build/data-set.min.js',
|
|
33
|
+
// '//cdn.jsdelivr.net/npm/js-cookie@2.2.1/src/js.cookie.min.js'
|
|
34
|
+
// ]
|
|
35
|
+
// }
|
|
36
|
+
|
|
37
|
+
const server = 'http://121.36.106.17:8400'
|
|
38
|
+
const local = 'http://localhost:8445/webmeter'
|
|
39
|
+
// const local = 'http://123.60.214.109:8405/webmeter'
|
|
40
|
+
|
|
41
|
+
module.exports = {
|
|
42
|
+
devServer: {
|
|
43
|
+
// development server port 8000
|
|
44
|
+
port: 8001,
|
|
45
|
+
// If you want to turn on the proxy, please remove the mockjs /src/main.jsL11
|
|
46
|
+
proxy: {
|
|
47
|
+
'/rs': {
|
|
48
|
+
target: server,
|
|
49
|
+
ws: false,
|
|
50
|
+
changeOrigin: true
|
|
51
|
+
},
|
|
52
|
+
'/image': {
|
|
53
|
+
target: server,
|
|
54
|
+
ws: false,
|
|
55
|
+
changeOrigin: true
|
|
56
|
+
},
|
|
57
|
+
'/webapps': {
|
|
58
|
+
target: server,
|
|
59
|
+
ws: false,
|
|
60
|
+
changeOrigin: true
|
|
61
|
+
},
|
|
62
|
+
'/webmeterapi/foreignaidUseGasSumCountData': {
|
|
63
|
+
// pathRewrite: { '^/webmeterapi': '/rs/logic' },
|
|
64
|
+
target: 'http://61.134.55.234:8405/',
|
|
65
|
+
changeOrigin: true
|
|
66
|
+
},
|
|
67
|
+
'/webmeterapi/getEmpTree': {
|
|
68
|
+
// pathRewrite: { '^/webmeterapi': '/rs/logic' },
|
|
69
|
+
target: 'http://123.60.214.109:8406/',
|
|
70
|
+
changeOrigin: true
|
|
71
|
+
},
|
|
72
|
+
'/webmeterapi': {
|
|
73
|
+
pathRewrite: { '^/webmeterapi': '/rs/logic' },
|
|
74
|
+
target: local,
|
|
75
|
+
changeOrigin: true
|
|
76
|
+
},
|
|
77
|
+
'/webmeteruploadapi': {
|
|
78
|
+
pathRewrite: { '^/webmeteruploadapi': '/rs/file' },
|
|
79
|
+
target: local,
|
|
80
|
+
changeOrigin: true
|
|
81
|
+
},
|
|
82
|
+
'/webmeterresourceapi': {
|
|
83
|
+
pathRewrite: { '^/webmeterresourceapi': '/rs/resource' },
|
|
84
|
+
target: local,
|
|
85
|
+
changeOrigin: true
|
|
86
|
+
},
|
|
87
|
+
'/resource': {
|
|
88
|
+
pathRewrite: { '^/resource': '/' },
|
|
89
|
+
target: 'http://127.0.0.1:4789',
|
|
90
|
+
changeOrigin: true
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
},
|
|
94
|
+
pluginOptions: {
|
|
95
|
+
'style-resources-loader': {
|
|
96
|
+
preProcessor: 'less',
|
|
97
|
+
patterns: [path.resolve(__dirname, './src/theme/theme.less')]
|
|
98
|
+
}
|
|
99
|
+
},
|
|
100
|
+
configureWebpack: config => {
|
|
101
|
+
config.entry.app = ['babel-polyfill', 'whatwg-fetch', './src/main.js']
|
|
102
|
+
config.performance = {
|
|
103
|
+
hints: false
|
|
104
|
+
}
|
|
105
|
+
config.plugins.push(
|
|
106
|
+
new ThemeColorReplacer({
|
|
107
|
+
fileName: 'css/theme-colors-[contenthash:8].css',
|
|
108
|
+
matchColors: getThemeColors(),
|
|
109
|
+
injectCss: true,
|
|
110
|
+
resolveCss
|
|
111
|
+
})
|
|
112
|
+
)
|
|
113
|
+
// Ignore all locale files of moment.js
|
|
114
|
+
config.plugins.push(new webpack.IgnorePlugin(/^\.\/locale$/, /moment$/))
|
|
115
|
+
// 生产环境下将资源压缩成gzip格式
|
|
116
|
+
if (isProd) {
|
|
117
|
+
// add `CompressionWebpack` plugin to webpack plugins
|
|
118
|
+
config.plugins.push(new CompressionWebpackPlugin({
|
|
119
|
+
algorithm: 'gzip',
|
|
120
|
+
test: new RegExp('\\.(' + productionGzipExtensions.join('|') + ')$'),
|
|
121
|
+
threshold: 10240,
|
|
122
|
+
minRatio: 0.8
|
|
123
|
+
}))
|
|
124
|
+
}
|
|
125
|
+
// if prod, add externals
|
|
126
|
+
// if (isProd) {
|
|
127
|
+
// config.externals = assetsCDN.externals
|
|
128
|
+
// }
|
|
129
|
+
},
|
|
130
|
+
chainWebpack: config => {
|
|
131
|
+
// 生产环境下关闭css压缩的 colormin 项,因为此项优化与主题色替换功能冲突
|
|
132
|
+
if (isProd) {
|
|
133
|
+
config.plugin('optimize-css')
|
|
134
|
+
.tap(args => {
|
|
135
|
+
args[0].cssnanoOptions.preset[1].colormin = false
|
|
136
|
+
return args
|
|
137
|
+
})
|
|
138
|
+
}
|
|
139
|
+
// 生产环境下使用CDN
|
|
140
|
+
// if (isProd) {
|
|
141
|
+
// config.plugin('html')
|
|
142
|
+
// .tap(args => {
|
|
143
|
+
// args[0].cdn = assetsCDN
|
|
144
|
+
// return args
|
|
145
|
+
// })
|
|
146
|
+
// }
|
|
147
|
+
config.resolve.alias.set('@vue2-client', path.resolve(__dirname, 'src'))
|
|
148
|
+
},
|
|
149
|
+
css: {
|
|
150
|
+
loaderOptions: {
|
|
151
|
+
less: {
|
|
152
|
+
lessOptions: {
|
|
153
|
+
modifyVars: modifyVars(),
|
|
154
|
+
javascriptEnabled: true
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
},
|
|
159
|
+
publicPath: process.env.VUE_APP_PUBLIC_PATH,
|
|
160
|
+
outputDir: 'dist',
|
|
161
|
+
assetsDir: 'static',
|
|
162
|
+
productionSourceMap: false
|
|
163
|
+
}
|
|
@@ -1,113 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<a-list
|
|
3
|
-
:data-source="model.rows"
|
|
4
|
-
:bordered="bordered"
|
|
5
|
-
v-infinite-scroll="handleInfiniteOnLoad"
|
|
6
|
-
class="srcoll-list-infinite-container"
|
|
7
|
-
:infinite-scroll-disabled="busy"
|
|
8
|
-
:infinite-scroll-distance="distance"
|
|
9
|
-
>
|
|
10
|
-
<a-list-item slot="renderItem" class="srcoll_list_li" slot-scope="item,index" @click="selectItem(index,item)">
|
|
11
|
-
<slot :item="item" :index="index" >
|
|
12
|
-
</slot>
|
|
13
|
-
</a-list-item>
|
|
14
|
-
<div v-if="loading && !busy" class="srcoll-list-loading-container">
|
|
15
|
-
<a-spin />
|
|
16
|
-
</div>
|
|
17
|
-
</a-list>
|
|
18
|
-
</template>
|
|
19
|
-
|
|
20
|
-
<script>
|
|
21
|
-
import infiniteScroll from 'vue-infinite-scroll'
|
|
22
|
-
import { post } from '@vue2-client/services/api/restTools'
|
|
23
|
-
|
|
24
|
-
export default {
|
|
25
|
-
name: 'SrcollList1',
|
|
26
|
-
directives: { infiniteScroll },
|
|
27
|
-
props: {
|
|
28
|
-
'busy': { // 是否执行回调
|
|
29
|
-
type: Boolean,
|
|
30
|
-
default: false
|
|
31
|
-
},
|
|
32
|
-
'distance': { // 距底部多少像素触发回调
|
|
33
|
-
type: Number,
|
|
34
|
-
default: 1
|
|
35
|
-
},
|
|
36
|
-
'bordered': { // 是否显示列表边框
|
|
37
|
-
type: Boolean,
|
|
38
|
-
default: true
|
|
39
|
-
},
|
|
40
|
-
'model': {
|
|
41
|
-
type: Object,
|
|
42
|
-
default: () => {
|
|
43
|
-
return {}
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
},
|
|
47
|
-
data () {
|
|
48
|
-
return {
|
|
49
|
-
selectRow: {},
|
|
50
|
-
loading: false
|
|
51
|
-
}
|
|
52
|
-
},
|
|
53
|
-
mounted () {
|
|
54
|
-
},
|
|
55
|
-
methods: {
|
|
56
|
-
selectItem (index, item) {
|
|
57
|
-
this.$emit('selectItem', index, item)
|
|
58
|
-
},
|
|
59
|
-
handleInfiniteOnLoad () {
|
|
60
|
-
this.loading = true
|
|
61
|
-
if (this.model.pageNo < this.model.totalPage || this.model.pageNo == 0) {
|
|
62
|
-
this.model.pageNo = this.model.pageNo + 1
|
|
63
|
-
post(this.model.url, { data: this.model }).then((res) => {
|
|
64
|
-
this.model.rows = this.model.rows.concat(res.data).map((item, index) => ({ ...item, index }))
|
|
65
|
-
this.loading = false
|
|
66
|
-
this.model.totalPage = res.totalPage
|
|
67
|
-
this.model.totalCount = res.totalCount
|
|
68
|
-
})
|
|
69
|
-
} else {
|
|
70
|
-
this.loading = false
|
|
71
|
-
}
|
|
72
|
-
},
|
|
73
|
-
search () {
|
|
74
|
-
this.model.pageNo = 0
|
|
75
|
-
this.model.rows = []
|
|
76
|
-
this.handleInfiniteOnLoad()
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
</script>
|
|
81
|
-
|
|
82
|
-
<style scoped>
|
|
83
|
-
.srcoll-list-infinite-container {
|
|
84
|
-
border-radius: 4px;
|
|
85
|
-
height: 100%;
|
|
86
|
-
overflow-y: scroll;
|
|
87
|
-
}
|
|
88
|
-
/*滚动条样式*/
|
|
89
|
-
.srcoll-list-infinite-container::-webkit-scrollbar {
|
|
90
|
-
width: 4px;
|
|
91
|
-
/*height: 4px;*/
|
|
92
|
-
}
|
|
93
|
-
.srcoll-list-infinite-container::-webkit-scrollbar-thumb {
|
|
94
|
-
border-radius: 10px;
|
|
95
|
-
-webkit-box-shadow: inset 0 0 5px rgba(0,0,0,0.2);
|
|
96
|
-
background: rgba(0,0,0,0.2);
|
|
97
|
-
}
|
|
98
|
-
.srcoll-list-infinite-container::-webkit-scrollbar-track {
|
|
99
|
-
-webkit-box-shadow: inset 0 0 5px rgba(0,0,0,0.2);
|
|
100
|
-
border-radius: 0;
|
|
101
|
-
background: rgba(0,0,0,0.1);
|
|
102
|
-
|
|
103
|
-
}
|
|
104
|
-
.srcoll-list-loading-container {
|
|
105
|
-
position: absolute;
|
|
106
|
-
bottom: 10%;
|
|
107
|
-
width: 100%;
|
|
108
|
-
text-align: center;
|
|
109
|
-
}
|
|
110
|
-
.srcoll_list_li:hover{
|
|
111
|
-
background-color: rgb(203,234,241);
|
|
112
|
-
}
|
|
113
|
-
</style>
|
|
@@ -1,244 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<a-row type="flex">
|
|
3
|
-
<baidu-map
|
|
4
|
-
:mapStyle="mapStyle"
|
|
5
|
-
class="bm-view"
|
|
6
|
-
:center="'西安'"
|
|
7
|
-
:scroll-wheel-zoom="true"
|
|
8
|
-
:zoom="zoom"
|
|
9
|
-
@ready="handler"
|
|
10
|
-
@click="searchClick"
|
|
11
|
-
ak="YOUR_APP_KEY">
|
|
12
|
-
<bm-view style="width: 100%; height:100%; flex: 1"></bm-view>
|
|
13
|
-
<bm-control :offset="{width: '10px', height: '10px'}">
|
|
14
|
-
<bm-auto-complete :sugStyle="{zIndex: 1}">
|
|
15
|
-
<a-input v-model="keyword" type="text" placeholder="地区信息搜索" style="width: 150px;height: 50px" /> <!-- 这里指代一个自定义搜索框组件 -->
|
|
16
|
-
</bm-auto-complete>
|
|
17
|
-
</bm-control>
|
|
18
|
-
<bm-navigation anchor="BMAP_ANCHOR_TOP_RIGHT"></bm-navigation>
|
|
19
|
-
<bm-geolocation anchor="BMAP_ANCHOR_BOTTOM_RIGHT" :showAddressBar="true" :autoLocation="true"></bm-geolocation>
|
|
20
|
-
<bm-local-search :keyword="keyword" :panel="false" :auto-viewport="true" zoom="12.8" style="display: none" ></bm-local-search>
|
|
21
|
-
</baidu-map>
|
|
22
|
-
</a-row>
|
|
23
|
-
</template>
|
|
24
|
-
|
|
25
|
-
<script>
|
|
26
|
-
import { BaiduMap, BmView, BmNavigation, BMCityList, BmGeolocation, BmControl, BmLocalSearch } from 'vue-baidu-map'
|
|
27
|
-
export default {
|
|
28
|
-
components: {
|
|
29
|
-
BaiduMap,
|
|
30
|
-
BmNavigation,
|
|
31
|
-
BmView,
|
|
32
|
-
BMCityList,
|
|
33
|
-
BmGeolocation,
|
|
34
|
-
BmControl,
|
|
35
|
-
BmLocalSearch
|
|
36
|
-
},
|
|
37
|
-
data () {
|
|
38
|
-
return {
|
|
39
|
-
keyword: '',
|
|
40
|
-
center: {
|
|
41
|
-
lng: 12131693.03,
|
|
42
|
-
lat: 4063684.53
|
|
43
|
-
},
|
|
44
|
-
zoom: 17,
|
|
45
|
-
address: {
|
|
46
|
-
propprovince: '', // 省
|
|
47
|
-
propcity: '', // 市
|
|
48
|
-
propcounty: '', // 县
|
|
49
|
-
propaddress: '' // 详细地址
|
|
50
|
-
},
|
|
51
|
-
mapStyle: {
|
|
52
|
-
styleJson: [
|
|
53
|
-
{
|
|
54
|
-
featureType: 'water',
|
|
55
|
-
elementType: 'all',
|
|
56
|
-
stylers: {
|
|
57
|
-
color: '#021019'
|
|
58
|
-
}
|
|
59
|
-
},
|
|
60
|
-
{
|
|
61
|
-
featureType: 'highway',
|
|
62
|
-
elementType: 'geometry.fill',
|
|
63
|
-
stylers: {
|
|
64
|
-
color: '#000000'
|
|
65
|
-
}
|
|
66
|
-
},
|
|
67
|
-
{
|
|
68
|
-
featureType: 'highway',
|
|
69
|
-
elementType: 'geometry.stroke',
|
|
70
|
-
stylers: {
|
|
71
|
-
color: '#147a92'
|
|
72
|
-
}
|
|
73
|
-
},
|
|
74
|
-
{
|
|
75
|
-
featureType: 'arterial',
|
|
76
|
-
elementType: 'geometry.fill',
|
|
77
|
-
stylers: {
|
|
78
|
-
color: '#000000'
|
|
79
|
-
}
|
|
80
|
-
},
|
|
81
|
-
{
|
|
82
|
-
featureType: 'arterial',
|
|
83
|
-
elementType: 'geometry.stroke',
|
|
84
|
-
stylers: {
|
|
85
|
-
color: '#0b3d51'
|
|
86
|
-
}
|
|
87
|
-
},
|
|
88
|
-
{
|
|
89
|
-
featureType: 'local',
|
|
90
|
-
elementType: 'geometry',
|
|
91
|
-
stylers: {
|
|
92
|
-
color: '#000000'
|
|
93
|
-
}
|
|
94
|
-
},
|
|
95
|
-
{
|
|
96
|
-
featureType: 'land',
|
|
97
|
-
elementType: 'all',
|
|
98
|
-
stylers: {
|
|
99
|
-
color: '#08304b'
|
|
100
|
-
}
|
|
101
|
-
},
|
|
102
|
-
{
|
|
103
|
-
featureType: 'railway',
|
|
104
|
-
elementType: 'geometry.fill',
|
|
105
|
-
stylers: {
|
|
106
|
-
color: '#000000'
|
|
107
|
-
}
|
|
108
|
-
},
|
|
109
|
-
{
|
|
110
|
-
featureType: 'railway',
|
|
111
|
-
elementType: 'geometry.stroke',
|
|
112
|
-
stylers: {
|
|
113
|
-
color: '#08304b'
|
|
114
|
-
}
|
|
115
|
-
},
|
|
116
|
-
{
|
|
117
|
-
featureType: 'subway',
|
|
118
|
-
elementType: 'geometry',
|
|
119
|
-
stylers: {
|
|
120
|
-
lightness: -70
|
|
121
|
-
}
|
|
122
|
-
},
|
|
123
|
-
{
|
|
124
|
-
featureType: 'building',
|
|
125
|
-
elementType: 'geometry.fill',
|
|
126
|
-
stylers: {
|
|
127
|
-
color: '#000000'
|
|
128
|
-
}
|
|
129
|
-
},
|
|
130
|
-
{
|
|
131
|
-
featureType: 'all',
|
|
132
|
-
elementType: 'labels.text.fill',
|
|
133
|
-
stylers: {
|
|
134
|
-
color: '#857f7f'
|
|
135
|
-
}
|
|
136
|
-
},
|
|
137
|
-
{
|
|
138
|
-
featureType: 'all',
|
|
139
|
-
elementType: 'labels.text.stroke',
|
|
140
|
-
stylers: {
|
|
141
|
-
color: '#000000'
|
|
142
|
-
}
|
|
143
|
-
},
|
|
144
|
-
{
|
|
145
|
-
featureType: 'building',
|
|
146
|
-
elementType: 'geometry',
|
|
147
|
-
stylers: {
|
|
148
|
-
color: '#022338'
|
|
149
|
-
}
|
|
150
|
-
},
|
|
151
|
-
{
|
|
152
|
-
featureType: 'green',
|
|
153
|
-
elementType: 'geometry',
|
|
154
|
-
stylers: {
|
|
155
|
-
color: '#062032'
|
|
156
|
-
}
|
|
157
|
-
},
|
|
158
|
-
{
|
|
159
|
-
featureType: 'boundary',
|
|
160
|
-
elementType: 'all',
|
|
161
|
-
stylers: {
|
|
162
|
-
color: '#1e1c1c'
|
|
163
|
-
}
|
|
164
|
-
},
|
|
165
|
-
{
|
|
166
|
-
featureType: 'manmade',
|
|
167
|
-
elementType: 'geometry',
|
|
168
|
-
stylers: {
|
|
169
|
-
color: '#022338'
|
|
170
|
-
}
|
|
171
|
-
},
|
|
172
|
-
{
|
|
173
|
-
featureType: 'poi',
|
|
174
|
-
elementType: 'all',
|
|
175
|
-
stylers: {
|
|
176
|
-
visibility: 'off'
|
|
177
|
-
}
|
|
178
|
-
},
|
|
179
|
-
{
|
|
180
|
-
featureType: 'all',
|
|
181
|
-
elementType: 'labels.icon',
|
|
182
|
-
stylers: {
|
|
183
|
-
visibility: 'off'
|
|
184
|
-
}
|
|
185
|
-
},
|
|
186
|
-
{
|
|
187
|
-
featureType: 'all',
|
|
188
|
-
elementType: 'labels.text.fill',
|
|
189
|
-
stylers: {
|
|
190
|
-
color: '#2da0c6',
|
|
191
|
-
visibility: 'on'
|
|
192
|
-
}
|
|
193
|
-
}
|
|
194
|
-
]
|
|
195
|
-
}
|
|
196
|
-
}
|
|
197
|
-
},
|
|
198
|
-
methods: {
|
|
199
|
-
searchClick (e) {
|
|
200
|
-
const _this = this
|
|
201
|
-
this.longitude = e.point.lng// 经度
|
|
202
|
-
this.latitude = e.point.lat// 维度
|
|
203
|
-
this.center.lng = _this.longitude // 中心点
|
|
204
|
-
this.center.lat = _this.latitude// 中心点
|
|
205
|
-
// eslint-disable-next-line no-undef
|
|
206
|
-
const geocoder = new BMap.Geocoder() // 创建地址解析器的实例
|
|
207
|
-
geocoder.getLocation(e.point, function (rs) {
|
|
208
|
-
console.log(rs)
|
|
209
|
-
_this.address.propprovince = rs.addressComponents.province // 省
|
|
210
|
-
_this.address.propcity = rs.addressComponents.city // 市
|
|
211
|
-
_this.address.propcounty = rs.addressComponents.district // 县
|
|
212
|
-
_this.address.propaddress = rs.address// 详细地址
|
|
213
|
-
})
|
|
214
|
-
console.log('geocoder', _this.address)
|
|
215
|
-
this.$emit('togShow', _this.address)
|
|
216
|
-
},
|
|
217
|
-
|
|
218
|
-
handler ({ BMap, map }) {
|
|
219
|
-
console.log(BMap, map)
|
|
220
|
-
this.center.lng = 116.404
|
|
221
|
-
this.center.lat = 39.915
|
|
222
|
-
this.zoom = 15
|
|
223
|
-
}
|
|
224
|
-
},
|
|
225
|
-
watch: {
|
|
226
|
-
'keyword' (val) {
|
|
227
|
-
console.log(val)
|
|
228
|
-
}
|
|
229
|
-
}
|
|
230
|
-
}
|
|
231
|
-
</script>
|
|
232
|
-
|
|
233
|
-
<style>
|
|
234
|
-
.bm-view {
|
|
235
|
-
width: 100%;
|
|
236
|
-
height:500px;
|
|
237
|
-
}
|
|
238
|
-
.BMap_cpyCtrl {
|
|
239
|
-
display: none;
|
|
240
|
-
}
|
|
241
|
-
.anchorBL {
|
|
242
|
-
display: none;
|
|
243
|
-
}
|
|
244
|
-
</style>
|