vue2-client 1.6.37 → 1.6.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,9 @@
1
1
  # Change Log
2
2
  > 所有关于本项目的变化都在该文档里。
3
3
 
4
+ **1.6.38 -2023-05-30 @江超**
5
+ - V3登录加密
6
+
4
7
  **1.6.37 -2023-05-25 @江超**
5
8
  - 地址搜索框允许自己设置坐标字段名
6
9
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vue2-client",
3
- "version": "1.6.37",
3
+ "version": "1.6.38",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "serve": "vue-cli-service serve",
@@ -12,38 +12,38 @@
12
12
  },
13
13
  "dependencies": {
14
14
  "@amap/amap-jsapi-loader": "^1.0.1",
15
+ "@antv/data-set": "^0.11.8",
15
16
  "@antv/g2plot": "^2.4.29",
16
- "lodash.get": "^4.4.2",
17
- "js-base64": "^3.7.5",
18
- "jsencrypt": "^3.3.2",
19
- "vue-json-viewer": "^2.2.22",
20
- "xlsx": "0.18.5",
21
- "file-saver": "^2.0.5",
22
17
  "@vue/babel-preset-jsx": "^1.4.0",
23
- "@antv/data-set": "^0.11.8",
24
18
  "animate.css": "^4.1.1",
25
19
  "ant-design-vue": "^1.7.8",
26
20
  "axios": "^0.27.2",
27
21
  "clipboard": "^2.0.11",
28
22
  "core-js": "^3.30.1",
23
+ "crypto-js": "^4.1.1",
29
24
  "date-fns": "^2.29.3",
30
25
  "default-passive-events": "^2.0.0",
31
26
  "enquire.js": "^2.1.6",
27
+ "file-saver": "^2.0.5",
32
28
  "highlight.js": "^11.7.0",
29
+ "js-base64": "^3.7.5",
33
30
  "js-cookie": "^2.2.1",
31
+ "jsencrypt": "^3.3.2",
32
+ "lodash.get": "^4.4.2",
34
33
  "mockjs": "^1.1.0",
35
34
  "nprogress": "^0.2.0",
35
+ "videojs-contrib-hls": "^5.15.0",
36
36
  "viser-vue": "^2.4.8",
37
37
  "vue": "2.6.14",
38
38
  "vue-i18n": "^8.28.2",
39
+ "vue-json-viewer": "^2.2.22",
39
40
  "vue-router": "^3.6.5",
41
+ "vue-video-player": "^5.0.2",
40
42
  "vuedraggable": "^2.24.3",
41
43
  "vuex": "^3.6.2",
42
- "vue-video-player": "^5.0.2",
43
- "videojs-contrib-hls": "^5.15.0"
44
+ "xlsx": "0.18.5"
44
45
  },
45
46
  "devDependencies": {
46
- "script-loader": "^0.7.2",
47
47
  "@ant-design/colors": "^7.0.0",
48
48
  "@babel/core": "^7.21.4",
49
49
  "@vue/cli-plugin-babel": "^4.5.19",
@@ -59,11 +59,12 @@
59
59
  "eslint": "^6.8.0",
60
60
  "eslint-plugin-import": "^2.26.0",
61
61
  "eslint-plugin-node": "^11.1.0",
62
- "eslint-plugin-vue": "^6.2.2",
63
62
  "eslint-plugin-promise": "^4.3.1",
64
63
  "eslint-plugin-standard": "^4.1.0",
64
+ "eslint-plugin-vue": "^6.2.2",
65
65
  "fast-deep-equal": "^3.1.3",
66
66
  "less-loader": "^6.2.0",
67
+ "script-loader": "^0.7.2",
67
68
  "style-resources-loader": "^1.5.0",
68
69
  "vue-cli-plugin-style-resources-loader": "^0.1.5",
69
70
  "vue-template-compiler": "2.6.14",
@@ -1,317 +1,316 @@
1
- <template>
2
- <div id="addressSearchCombobox">
3
- <div>
4
- <a-input style="width: 88%" v-model="addressInput" @change="change"/>
5
- <a-button style="width: 10%;padding: 0px" type="link" @click="visible=true"><img style="width: 100%" src="@vue2-client/assets/img/location.png"/></a-button>
6
- </div>
7
- <a-modal :visible="visible" title="地址选择" @ok="selected" @cancel="visible=false" :zIndex='m_index'>
8
- <div id="addressSearchCombobox_map">
9
- <div class="certain-category-search-wrapper">
10
- <a-auto-complete
11
- style="right: 0px;width: 90%;z-index:2;margin-top:2%;"
12
- :disabled="!mapAutocomplete"
13
- class="certain-category-search"
14
- dropdown-class-name="certain-category-search-dropdown"
15
- option-label-prop="value"
16
- placeholder="输入地址关键字搜索"
17
- @search="fetchFunction"
18
- @select="onSelect"
19
- >
20
- <a-spin v-if="searching" slot="notFoundContent" size="small" />
21
- <template slot="dataSource">
22
- <a-select-opt-group v-for="group in option" :key="group.title">
23
- <span
24
- slot="label">
25
- <a-icon type="bank" /> {{ group.title }}
26
- </span>
27
- <a-select-option v-for="address in group.children" :key="address.label + ' <' + address.value + '>'">
28
- <p class="addressName"><a-icon type="environment" /> <span v-html="highLight(address.label, address.word)">{{ address.label }}</span></p>
29
- <p v-if="address.address !== '[]'" class="addressRemark">
30
- {{ address.address }}
31
- </p>
32
- </a-select-option>
33
- </a-select-opt-group>
34
- </template>
35
- <a-input>
36
- <a-icon slot="suffix" class="certain-category-icon" type="search"/>
37
- </a-input>
38
- </a-auto-complete>
39
- </div>
40
- </div>
41
- <a-descriptions
42
- bordered
43
- class="asc_descriptions"
44
- :column="{ xxl: 2, xl: 2, lg: 2, md: 2, sm: 1, xs: 1 }"
45
- >
46
- <a-descriptions-item label="坐标" span=2><span>{{addressObj.lng_lat}}</span></a-descriptions-item>
47
- <a-descriptions-item label="地址" span=2><span>{{addressObj.address}}</span></a-descriptions-item>
48
- </a-descriptions>
49
- </a-modal>
50
- <!-- -->
51
- </div>
52
- </template>
53
- <script>
54
-
55
- import { post } from '@vue2-client/services/api'
56
- import { GetGDMap } from '@vue2-client/utils/map-utils'
57
- import { debounce } from 'ant-design-vue/lib/vc-table/src/utils'
58
- import { mapState } from 'vuex'
59
-
60
- export default {
61
- name: 'AddressSearchCombobox',
62
- data () {
63
- // 检索去抖
64
- this.fetchFunction = debounce(this.fetchFunction, 300)
65
- return {
66
- // 地址搜索联想
67
- mapAutocomplete: undefined,
68
- // 检索结果
69
- option: [],
70
- // 最后检索版本
71
- lastFetchId: 0,
72
- // 检索中
73
- searching: false,
74
- addressObj: {
75
- lng_lat: '',
76
- address: '',
77
- },
78
- visible: false,
79
- map: null,
80
- m_index: 1002,
81
- positionPicker: null,
82
- addressInput: this.searchResult
83
- }
84
- },
85
- computed: {
86
- ...mapState('setting', ['isMobile', 'gaode_key', 'gaode_secret_key'])
87
- },
88
- props: {
89
- searchResult: {
90
- type: String,
91
- default: undefined
92
- },
93
- // 返回数据格式
94
- searchResultType: {
95
- type: String,
96
- default: 'Default'
97
- // default: 'Array'
98
- // default: 'Object'
99
- },
100
- // Object 返回格式时 可以自定义key
101
- resultKeys: {
102
- type: Object,
103
- default: () => { return { address: 'address', coords: 'coords' } }
104
- }
105
- },
106
- created () {
107
- },
108
- mounted () {
109
- },
110
- methods: {
111
- change (value) {
112
- this.$emit('update:searchResult', this.addressInput)
113
- },
114
- initMap (aMap) {
115
- this.map = new (aMap).Map('addressSearchCombobox_map', { // 设置地图容器id
116
- resizeEnable: true, // 是否监控地图容器尺寸变化
117
- zoom: 10, // 初始化地图层级
118
- })
119
- this.geocoder = new (aMap).Geocoder({
120
- radius: 500 // 范围,默认:500
121
- })
122
- this.map.addControl(new (aMap).ToolBar()) // 初始化工具插件
123
- // 初始化窗体
124
- /*this.infoWindow = new (aMap).InfoWindow({
125
- anchor: 'bottom-center',
126
- isCustom: false, // 使用自定义窗体
127
- autoMove: true,
128
- content: '',
129
- showShadow: true,
130
- offset: new (aMap).Pixel(0, -25)
131
- })*/
132
- },
133
- onSelect (value) {
134
- let result
135
- console.log(' value--- ', this.searchResult)
136
- const _arr = value.replace('>', '').split('<')
137
- this.addressObj.address=_arr[0]
138
- this.addressObj.lng_lat=_arr[1]
139
- this.map.setCenter(this.addressObj.lng_lat.split(','))
140
- },
141
- selected () {
142
- let result
143
- if (this.searchResultType !== 'Default') {
144
- if (this.searchResultType === 'Array') {
145
- result = [this.addressObj.address, this.addressObj.lng_lat]
146
- } else {
147
- result = {}
148
- result[this.resultKeys.address] = this.addressObj.address
149
- result[this.resultKeys.coords] = this.addressObj.lng_lat
150
- }
151
- }
152
- this.addressInput=this.addressObj.address
153
- console.log(' result--- ', result)
154
- this.visible=false
155
- this.$emit('onSelect', JSON.stringify(result))
156
- // this.$emit('onClick', result || value)
157
- },
158
- // 懒加载检索方法
159
- fetchFunction (value) {
160
- if (value && this.mapAutocomplete) {
161
- this.searching = true
162
- this.lastFetchId += 1
163
- const fetchId = this.lastFetchId
164
- this.mapAutocomplete.search(value, (status, result) => {
165
- if (fetchId !== this.lastFetchId) {
166
- return
167
- }
168
- if (status === 'complete') {
169
- this.option = []
170
- const addressMap = {}
171
- result.tips.forEach((res) => {
172
- if (res.location) {
173
- if (!addressMap.hasOwnProperty(res.district)) {
174
- addressMap[res.district] = []
175
- }
176
- addressMap[res.district].push({
177
- label: res.name,
178
- value: res.location.lng + ',' + res.location.lat,
179
- address: res.address + '',
180
- word: value
181
- })
182
- }
183
- })
184
- for (const key of Object.keys(addressMap)) {
185
- this.option.push({
186
- title: key,
187
- children: addressMap[key]
188
- })
189
- }
190
- }
191
- this.searching = false
192
- })
193
- }
194
- },
195
- // 获取数据
196
- getData (value, callback) {
197
- if (value !== '') {
198
- const logicName = this.attr.keyName
199
- const logic = logicName.substring(6)
200
- post('/api/af-system/logic/' + logic, value).then(res => {
201
- callback(res)
202
- })
203
- }
204
- },
205
- // 关键字高亮
206
- highLight (value, word) {
207
- // 如果标题中包含,关键字就替换一下
208
- if (value.includes(word)) {
209
- value = value.replace(word,
210
- // 这里是替换成html格式的数据,最好再加一个样式权重,保险一点
211
- '<span style="color:red!important;">' + word + '</span>'
212
- )
213
- return value
214
- // eslint-disable-next-line brace-style
215
- }
216
- // 不包含的话还用这个
217
- else {
218
- return value
219
- }
220
- }
221
- },
222
- watch: {
223
- 'visible' (val){
224
- console.log('val', val)
225
- if(val){
226
- GetGDMap(this.gaode_secret_key, this.gaode_key).then(aMap => {
227
- this.initMap(aMap)
228
- this.mapAutocomplete = new (aMap).AutoComplete({
229
- // city 限定城市,默认全国
230
- city: '全国',
231
- dragEnable: true,
232
- animateEnable: false
233
- })
234
- console.log(aMap)
235
- console.log(window)
236
- this.positionPicker = new window.AMapUI.PositionPicker({
237
- mode: 'dragMap',
238
- map: this.map
239
- })
240
- this.positionPicker.on('success', (positionResult) => {
241
- console.log(positionResult)
242
- console.log(positionResult.position)
243
- this.addressObj.address=positionResult.address
244
- this.addressObj.lng_lat=`${positionResult.position.lng},${positionResult.position.lat}`
245
- })
246
- this.positionPicker.on('fail', function(positionResult) {
247
- })
248
- this.positionPicker.start()
249
- })
250
- }
251
- }
252
- }
253
- }
254
- </script>
255
- <style>
256
- .asc_descriptions .ant-descriptions-item-content{
257
- width: 80%;
258
- }
259
- </style>
260
- <style lang="less">
261
- #addressSearchCombobox_map{
262
- margin:1% 0;
263
- width:100%;
264
- height:400px;
265
- text-align:center
266
- }
267
- #addressSearchCombobox{
268
-
269
- .certain-category-search-dropdown .ant-select-dropdown-menu-item-group-title {
270
- color: #666;
271
- font-weight: bold;
272
- font-size: 14px;
273
- }
274
-
275
- .certain-category-search-dropdown .ant-select-dropdown-menu-item-group {
276
- border-bottom: 1px solid #f6f6f6;
277
- }
278
-
279
- .certain-category-search-dropdown .ant-select-dropdown-menu-item {
280
- padding-left: 16px;
281
- }
282
-
283
- .certain-category-search-dropdown .ant-select-dropdown-menu-item.show-all {
284
- text-align: center;
285
- cursor: default;
286
- }
287
-
288
- .certain-category-search-dropdown .ant-select-dropdown-menu {
289
- max-height: 300px;
290
- }
291
- .certain-category-search-wrapper .certain-search-item-count {
292
- position: absolute;
293
- color: #999;
294
- right: 16px;
295
- }
296
- .certain-category-search-wrapper .certain-category-search.ant-select-focused,
297
- .certain-category-icon {
298
- color: #108ee9;
299
- }
300
- .certain-category-search-wrapper .certain-category-icon {
301
- color: #6e6e6e;
302
- transition: all 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);
303
- font-size: 16px;
304
- }
305
-
306
- .addressName {
307
- margin-bottom: 0;
308
- font-size: 14px;
309
- font-weight: bold;
310
- }
311
-
312
- .addressRemark {
313
- margin-bottom: 0;
314
- font-size: 12px;
315
- }
316
- }
317
- </style>
1
+ <template>
2
+ <div id="addressSearchCombobox">
3
+ <div>
4
+ <a-input style="width: 88%" v-model="addressInput" @change="change"/>
5
+ <a-button style="width: 10%;padding: 0px" type="link" @click="visible=true"><img style="width: 100%" src="@vue2-client/assets/img/location.png"/></a-button>
6
+ </div>
7
+ <a-modal :visible="visible" title="地址选择" @ok="selected" @cancel="visible=false" :zIndex="m_index">
8
+ <div id="addressSearchCombobox_map">
9
+ <div class="certain-category-search-wrapper">
10
+ <a-auto-complete
11
+ style="right: 0px;width: 90%;z-index:2;margin-top:2%;"
12
+ :disabled="!mapAutocomplete"
13
+ class="certain-category-search"
14
+ dropdown-class-name="certain-category-search-dropdown"
15
+ option-label-prop="value"
16
+ placeholder="输入地址关键字搜索"
17
+ @search="fetchFunction"
18
+ @select="onSelect"
19
+ >
20
+ <a-spin v-if="searching" slot="notFoundContent" size="small" />
21
+ <template slot="dataSource">
22
+ <a-select-opt-group v-for="group in option" :key="group.title">
23
+ <span
24
+ slot="label">
25
+ <a-icon type="bank" /> {{ group.title }}
26
+ </span>
27
+ <a-select-option v-for="address in group.children" :key="address.label + ' <' + address.value + '>'">
28
+ <p class="addressName"><a-icon type="environment" /> <span v-html="highLight(address.label, address.word)">{{ address.label }}</span></p>
29
+ <p v-if="address.address !== '[]'" class="addressRemark">
30
+ {{ address.address }}
31
+ </p>
32
+ </a-select-option>
33
+ </a-select-opt-group>
34
+ </template>
35
+ <a-input>
36
+ <a-icon slot="suffix" class="certain-category-icon" type="search"/>
37
+ </a-input>
38
+ </a-auto-complete>
39
+ </div>
40
+ </div>
41
+ <a-descriptions
42
+ bordered
43
+ class="asc_descriptions"
44
+ :column="{ xxl: 2, xl: 2, lg: 2, md: 2, sm: 1, xs: 1 }"
45
+ >
46
+ <a-descriptions-item label="坐标" span="2"><span>{{ addressObj.lng_lat }}</span></a-descriptions-item>
47
+ <a-descriptions-item label="地址" span="2"><span>{{ addressObj.address }}</span></a-descriptions-item>
48
+ </a-descriptions>
49
+ </a-modal>
50
+ <!-- -->
51
+ </div>
52
+ </template>
53
+ <script>
54
+
55
+ import { post } from '@vue2-client/services/api'
56
+ import { GetGDMap } from '@vue2-client/utils/map-utils'
57
+ import { debounce } from 'ant-design-vue/lib/vc-table/src/utils'
58
+ import { mapState } from 'vuex'
59
+
60
+ export default {
61
+ name: 'AddressSearchCombobox',
62
+ data () {
63
+ // 检索去抖
64
+ this.fetchFunction = debounce(this.fetchFunction, 300)
65
+ return {
66
+ // 地址搜索联想
67
+ mapAutocomplete: undefined,
68
+ // 检索结果
69
+ option: [],
70
+ // 最后检索版本
71
+ lastFetchId: 0,
72
+ // 检索中
73
+ searching: false,
74
+ addressObj: {
75
+ lng_lat: '',
76
+ address: '',
77
+ },
78
+ visible: false,
79
+ map: null,
80
+ m_index: 1002,
81
+ positionPicker: null,
82
+ addressInput: this.searchResult
83
+ }
84
+ },
85
+ computed: {
86
+ ...mapState('setting', ['isMobile', 'gaode_key', 'gaode_secret_key'])
87
+ },
88
+ props: {
89
+ searchResult: {
90
+ type: String,
91
+ default: undefined
92
+ },
93
+ // 返回数据格式
94
+ searchResultType: {
95
+ type: String,
96
+ default: 'Default'
97
+ // default: 'Array'
98
+ // default: 'Object'
99
+ },
100
+ // Object 返回格式时 可以自定义key
101
+ resultKeys: {
102
+ type: Object,
103
+ default: () => { return { address: 'address', coords: 'coords' } }
104
+ }
105
+ },
106
+ created () {
107
+ },
108
+ mounted () {
109
+ },
110
+ methods: {
111
+ change (value) {
112
+ this.$emit('update:searchResult', this.addressInput)
113
+ },
114
+ initMap (aMap) {
115
+ this.map = new (aMap).Map('addressSearchCombobox_map', { // 设置地图容器id
116
+ resizeEnable: true, // 是否监控地图容器尺寸变化
117
+ zoom: 10, // 初始化地图层级
118
+ })
119
+ this.geocoder = new (aMap).Geocoder({
120
+ radius: 500 // 范围,默认:500
121
+ })
122
+ this.map.addControl(new (aMap).ToolBar()) // 初始化工具插件
123
+ // 初始化窗体
124
+ /* this.infoWindow = new (aMap).InfoWindow({
125
+ anchor: 'bottom-center',
126
+ isCustom: false, // 使用自定义窗体
127
+ autoMove: true,
128
+ content: '',
129
+ showShadow: true,
130
+ offset: new (aMap).Pixel(0, -25)
131
+ }) */
132
+ },
133
+ onSelect (value) {
134
+ console.log(' value--- ', this.searchResult)
135
+ const _arr = value.replace('>', '').split('<')
136
+ this.addressObj.address = _arr[0]
137
+ this.addressObj.lng_lat = _arr[1]
138
+ this.map.setCenter(this.addressObj.lng_lat.split(','))
139
+ },
140
+ selected () {
141
+ let result
142
+ if (this.searchResultType !== 'Default') {
143
+ if (this.searchResultType === 'Array') {
144
+ result = [this.addressObj.address, this.addressObj.lng_lat]
145
+ } else {
146
+ result = {}
147
+ result[this.resultKeys.address] = this.addressObj.address
148
+ result[this.resultKeys.coords] = this.addressObj.lng_lat
149
+ }
150
+ }
151
+ this.addressInput = this.addressObj.address
152
+ console.log(' result--- ', result)
153
+ this.visible = false
154
+ this.$emit('onSelect', JSON.stringify(result))
155
+ // this.$emit('onClick', result || value)
156
+ },
157
+ // 懒加载检索方法
158
+ fetchFunction (value) {
159
+ if (value && this.mapAutocomplete) {
160
+ this.searching = true
161
+ this.lastFetchId += 1
162
+ const fetchId = this.lastFetchId
163
+ this.mapAutocomplete.search(value, (status, result) => {
164
+ if (fetchId !== this.lastFetchId) {
165
+ return
166
+ }
167
+ if (status === 'complete') {
168
+ this.option = []
169
+ const addressMap = {}
170
+ result.tips.forEach((res) => {
171
+ if (res.location) {
172
+ if (!addressMap.hasOwnProperty(res.district)) {
173
+ addressMap[res.district] = []
174
+ }
175
+ addressMap[res.district].push({
176
+ label: res.name,
177
+ value: res.location.lng + ',' + res.location.lat,
178
+ address: res.address + '',
179
+ word: value
180
+ })
181
+ }
182
+ })
183
+ for (const key of Object.keys(addressMap)) {
184
+ this.option.push({
185
+ title: key,
186
+ children: addressMap[key]
187
+ })
188
+ }
189
+ }
190
+ this.searching = false
191
+ })
192
+ }
193
+ },
194
+ // 获取数据
195
+ getData (value, callback) {
196
+ if (value !== '') {
197
+ const logicName = this.attr.keyName
198
+ const logic = logicName.substring(6)
199
+ post('/api/af-system/logic/' + logic, value).then(res => {
200
+ callback(res)
201
+ })
202
+ }
203
+ },
204
+ // 关键字高亮
205
+ highLight (value, word) {
206
+ // 如果标题中包含,关键字就替换一下
207
+ if (value.includes(word)) {
208
+ value = value.replace(word,
209
+ // 这里是替换成html格式的数据,最好再加一个样式权重,保险一点
210
+ '<span style="color:red!important;">' + word + '</span>'
211
+ )
212
+ return value
213
+ // eslint-disable-next-line brace-style
214
+ }
215
+ // 不包含的话还用这个
216
+ else {
217
+ return value
218
+ }
219
+ }
220
+ },
221
+ watch: {
222
+ 'visible' (val) {
223
+ console.log('val', val)
224
+ if (val) {
225
+ GetGDMap(this.gaode_secret_key, this.gaode_key).then(aMap => {
226
+ this.initMap(aMap)
227
+ this.mapAutocomplete = new (aMap).AutoComplete({
228
+ // city 限定城市,默认全国
229
+ city: '全国',
230
+ dragEnable: true,
231
+ animateEnable: false
232
+ })
233
+ console.log(aMap)
234
+ console.log(window)
235
+ this.positionPicker = new window.AMapUI.PositionPicker({
236
+ mode: 'dragMap',
237
+ map: this.map
238
+ })
239
+ this.positionPicker.on('success', (positionResult) => {
240
+ console.log(positionResult)
241
+ console.log(positionResult.position)
242
+ this.addressObj.address = positionResult.address
243
+ this.addressObj.lng_lat = `${positionResult.position.lng},${positionResult.position.lat}`
244
+ })
245
+ this.positionPicker.on('fail', function (positionResult) {
246
+ })
247
+ this.positionPicker.start()
248
+ })
249
+ }
250
+ }
251
+ }
252
+ }
253
+ </script>
254
+ <style>
255
+ .asc_descriptions .ant-descriptions-item-content{
256
+ width: 80%;
257
+ }
258
+ </style>
259
+ <style lang="less">
260
+ #addressSearchCombobox_map{
261
+ margin:1% 0;
262
+ width:100%;
263
+ height:400px;
264
+ text-align:center
265
+ }
266
+ #addressSearchCombobox{
267
+
268
+ .certain-category-search-dropdown .ant-select-dropdown-menu-item-group-title {
269
+ color: #666;
270
+ font-weight: bold;
271
+ font-size: 14px;
272
+ }
273
+
274
+ .certain-category-search-dropdown .ant-select-dropdown-menu-item-group {
275
+ border-bottom: 1px solid #f6f6f6;
276
+ }
277
+
278
+ .certain-category-search-dropdown .ant-select-dropdown-menu-item {
279
+ padding-left: 16px;
280
+ }
281
+
282
+ .certain-category-search-dropdown .ant-select-dropdown-menu-item.show-all {
283
+ text-align: center;
284
+ cursor: default;
285
+ }
286
+
287
+ .certain-category-search-dropdown .ant-select-dropdown-menu {
288
+ max-height: 300px;
289
+ }
290
+ .certain-category-search-wrapper .certain-search-item-count {
291
+ position: absolute;
292
+ color: #999;
293
+ right: 16px;
294
+ }
295
+ .certain-category-search-wrapper .certain-category-search.ant-select-focused,
296
+ .certain-category-icon {
297
+ color: #108ee9;
298
+ }
299
+ .certain-category-search-wrapper .certain-category-icon {
300
+ color: #6e6e6e;
301
+ transition: all 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);
302
+ font-size: 16px;
303
+ }
304
+
305
+ .addressName {
306
+ margin-bottom: 0;
307
+ font-size: 14px;
308
+ font-weight: bold;
309
+ }
310
+
311
+ .addressRemark {
312
+ margin-bottom: 0;
313
+ font-size: 12px;
314
+ }
315
+ }
316
+ </style>
@@ -48,7 +48,7 @@
48
48
  <a-form-model-item
49
49
  v-if="item.formType ==='addressSearch'"
50
50
  label="坐标字段名">
51
- <a-input :value="`${item.key}_lng_lat`">
51
+ <a-input :disabled="true" :value="`${item.key}_lng_lat`">
52
52
  <a-popover slot="suffix" placement="bottom" title="坐标字段名">
53
53
  <template slot="content">
54
54
  <p>表单类型为地点搜索框时:</p>
@@ -1,5 +1,6 @@
1
1
  import { LOGIN, MODIFY_PASSWORD, ROUTES, V4_GET_INFO, V4_LOGIN, V4_LOGOUT } from '@vue2-client/services/apiService'
2
2
  import { request, METHOD, removeAuthorization } from '@vue2-client/utils/request'
3
+ import EncryptUtil from '@vue2-client/utils/EncryptUtil'
3
4
 
4
5
  /**
5
6
  * 登录服务
@@ -8,10 +9,12 @@ import { request, METHOD, removeAuthorization } from '@vue2-client/utils/request
8
9
  * @returns {Promise<AxiosResponse<T>>}
9
10
  */
10
11
  export async function login (name, password) {
11
- return request(LOGIN, METHOD.POST, {
12
+ let data = {
12
13
  name: name,
13
14
  password: password
14
- })
15
+ }
16
+ data = '$' + EncryptUtil.RSAEncrypt(JSON.stringify(data))
17
+ return request(LOGIN, METHOD.POST, data)
15
18
  }
16
19
 
17
20
  export async function modifyPassword (name, password, newPassword) {
@@ -0,0 +1,53 @@
1
+ import AesEncryptJS from 'crypto-js'
2
+ import RsaEncryptJS from 'jsencrypt'
3
+
4
+ export default {
5
+ /**
6
+ * AES加密
7
+ * @param word
8
+ * @returns {*}
9
+ */
10
+ AESEncrypt (word, encryKey) {
11
+ const key = AesEncryptJS.enc.Utf8.parse(encryKey)
12
+ const srcs = AesEncryptJS.enc.Utf8.parse(word)
13
+ const encrypted = AesEncryptJS.AES.encrypt(srcs, key, { mode: AesEncryptJS.mode.ECB, padding: AesEncryptJS.pad.Pkcs7 })
14
+ return encrypted.toString()
15
+ },
16
+ /**
17
+ * AES解密
18
+ * @param word
19
+ * @returns {*}
20
+ */
21
+ AESDecrypt (word, encryKey) {
22
+ const key = AesEncryptJS.enc.Utf8.parse(encryKey)
23
+ const decrypt = AesEncryptJS.AES.decrypt(word, key, { mode: AesEncryptJS.mode.ECB, padding: AesEncryptJS.pad.Pkcs7 })
24
+ const ret = AesEncryptJS.enc.Utf8.stringify(decrypt).toString()
25
+ try {
26
+ return JSON.parse(ret)
27
+ } catch (e) {
28
+ return ret
29
+ }
30
+ },
31
+ /**
32
+ * RSA加密
33
+ * @param word
34
+ * @returns {*}
35
+ */
36
+ RSAEncrypt (word) {
37
+ const encrypt = new RsaEncryptJS()
38
+ encrypt.setPublicKey('MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCqPvovSfXcwBbW8cKMCgwqNpsYuzF8RPAPFb7LGsnVo44JhM/xxzDyzoYtdfNmtbIuKVi9PzIsyp6rg+09gbuI6UGwBZ5DWBDBMqv5MPdOF5dCQkB2Bbr5yPfURPENypUz+pBFBg41d+BC+rwRiXELwKy7Y9caD/MtJyHydj8OUwIDAQAB')
39
+ const resdata = encrypt.encrypt(word)
40
+ return resdata.toString()
41
+ },
42
+ /**
43
+ * RSA解密
44
+ * @param word
45
+ * @returns {*}
46
+ */
47
+ RSADecrypt (word) {
48
+ const encrypt = new RsaEncryptJS()
49
+ encrypt.setPrivateKey('MIICdwIBADANBgkqhkiG9w0BAQEFAASCAmEwggJdAgEAAoGBAKo++i9J9dzAFtbxwowKDCo2mxi7MXxE8A8VvssaydWjjgmEz/HHMPLOhi1182a1si4pWL0/MizKnquD7T2Bu4jpQbAFnkNYEMEyq/kw904Xl0JCQHYFuvnI99RE8Q3KlTP6kEUGDjV34EL6vBGJcQvArLtj1xoP8y0nIfJ2Pw5TAgMBAAECgYAGGB8IllMwxceLhjf6n1l0IWRH7FuHIUieoZ6k0p6rASHSgWiYNRMxfecbtX8zDAoG0QAWNi7rn40ygpR5gS1fWDAKhmnhKgQIT6wW0VmD4hraaeyP78iy8BLhlvblri2nCPIhDH5+l96v7D47ZZi3ZSOzcj89s1eS/k7/N4peEQJBAPEtGGJY+lBoCxQMhGyzuzDmgcS1Un1ZE2pt+XNCVl2b+T8fxWJH3tRRR8wOY5uvtPiK1HM/IjT0T5qwQeH8Yk0CQQC0tcv3d/bDb7bOe9QzUFDQkUSpTdPWAgMX2OVPxjdq3Sls9oA5+fGNYEy0OgyqTjde0b4iRzlD1O0OhLqPSUMfAkEAh5FIvqezdRU2/PsYSR4yoAdCdLdT+h/jGRVefhqQ/6eYUJJkWp15tTFHQX3pIe9/s6IeT/XyHYAjaxmevxAmlQJBAKSdhvQjf9KAjZKDEsa7vyJ/coCXuQUWSCMNHbcR5aGfXgE4e45UtUoIE1eKGcd6AM6LWhx3rR6xdFDpb9je8BkCQB0SpevGfOQkMk5i8xkEt9eeYP0fi8nv6eOUcK96EXbzs4jV2SAoQJ9oJegPtPROHbhIvVUmNQTbuP10Yjg59+8=')
50
+ const resdata = encrypt.decrypt(word)
51
+ return JSON.parse(resdata.toString())
52
+ },
53
+ }
@@ -1,37 +1,37 @@
1
- import AMapLoader from '@amap/amap-jsapi-loader'
2
- let Amap
3
- async function GetGDMap (secret_key,key) {
4
- if (!Amap) {
5
- window._AMapSecurityConfig = {
6
- securityJsCode: secret_key
7
- }
8
- Amap = await AMapLoader.load({
9
- key: key, // 申请好的Web端开发者Key,首次调用 load 时必填
10
- version: '2.0', // 指定要加载的 JSAPI 的版本,缺省时默认为 1.4.15
11
- plugins: ['AMap.IndexCluster', 'AMP.MarkerCluster', 'AMap.InfoWindow', 'AMap.HeatMap', 'AMap.HawkEye', 'AMap.DistrictSearch',
12
- 'AMap.ToolBar', 'AMap.Geolocation',
13
- 'AMap.Geocoder', 'AMap.MarkerClusterer', 'AMap.AutoComplete'], // 需要使用的的插件列表,如比例尺'AMap.Scale'等
14
- AMapUI: {
15
- version: '1.1', // AMapUI 缺省 1.1
16
- plugins: ['misc/PositionPicker'] // 需要加载的 AMapUI ui插件
17
- }
18
- })
19
- }
20
- return Amap
21
- }
22
- async function GetLocation (address) {
23
- return new Promise(async (resolve, reject) => {
24
- new (await GetGDMap()).Geocoder({
25
- radius: 500 // 范围,默认:500
26
- }).getLocation(address, function (status, result) {
27
- console.log(result)
28
- if (status === 'complete' && result.geocodes.length) {
29
- resolve({ lng: result.geocodes[0].location.lng, lat: result.geocodes[0].location.lat })
30
- } else {
31
- // eslint-disable-next-line prefer-promise-reject-errors
32
- reject('根据经纬度查询地址失败')
33
- }
34
- })
35
- })
36
- }
37
- export { GetGDMap, GetLocation }
1
+ import AMapLoader from '@amap/amap-jsapi-loader'
2
+ let Amap
3
+ async function GetGDMap (secretKey, key) {
4
+ if (!Amap) {
5
+ window._AMapSecurityConfig = {
6
+ securityJsCode: secretKey
7
+ }
8
+ Amap = await AMapLoader.load({
9
+ key: key, // 申请好的Web端开发者Key,首次调用 load 时必填
10
+ version: '2.0', // 指定要加载的 JSAPI 的版本,缺省时默认为 1.4.15
11
+ plugins: ['AMap.IndexCluster', 'AMP.MarkerCluster', 'AMap.InfoWindow', 'AMap.HeatMap', 'AMap.HawkEye', 'AMap.DistrictSearch',
12
+ 'AMap.ToolBar', 'AMap.Geolocation',
13
+ 'AMap.Geocoder', 'AMap.MarkerClusterer', 'AMap.AutoComplete'], // 需要使用的的插件列表,如比例尺'AMap.Scale'等
14
+ AMapUI: {
15
+ version: '1.1', // AMapUI 缺省 1.1
16
+ plugins: ['misc/PositionPicker'] // 需要加载的 AMapUI ui插件
17
+ }
18
+ })
19
+ }
20
+ return Amap
21
+ }
22
+ async function GetLocation (address) {
23
+ return new Promise(async (resolve, reject) => {
24
+ new (await GetGDMap()).Geocoder({
25
+ radius: 500 // 范围,默认:500
26
+ }).getLocation(address, function (status, result) {
27
+ console.log(result)
28
+ if (status === 'complete' && result.geocodes.length) {
29
+ resolve({ lng: result.geocodes[0].location.lng, lat: result.geocodes[0].location.lat })
30
+ } else {
31
+ // eslint-disable-next-line prefer-promise-reject-errors
32
+ reject('根据经纬度查询地址失败')
33
+ }
34
+ })
35
+ })
36
+ }
37
+ export { GetGDMap, GetLocation }