vue2-client 1.6.32 → 1.6.34-1

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.
Files changed (109) hide show
  1. package/CHANGELOG.md +3 -0
  2. package/index.js +30 -30
  3. package/package.json +1 -1
  4. package/src/assets/img/location.png +0 -0
  5. package/src/base-client/components/common/AddressSearchCombobox/AddressSearchCombobox.vue +317 -233
  6. package/src/base-client/components/common/AmapMarker/AmapPointRendering.vue +120 -120
  7. package/src/base-client/components/common/AmapMarker/index.js +3 -3
  8. package/src/base-client/components/common/CitySelect/CitySelect.vue +247 -247
  9. package/src/base-client/components/common/CreateQuery/CreateQueryItem.vue +733 -733
  10. package/src/base-client/components/common/CreateSimpleFormQuery/CreateSimpleFormQueryItem.vue +508 -508
  11. package/src/base-client/components/common/FormGroupEdit/FormGroupEdit.vue +140 -140
  12. package/src/base-client/components/common/FormGroupQuery/FormGroupQuery.vue +165 -165
  13. package/src/base-client/components/common/JSONToTree/jsontotree.vue +275 -275
  14. package/src/base-client/components/common/Upload/Upload.vue +168 -168
  15. package/src/base-client/components/common/XAddForm/XAddForm.vue +326 -326
  16. package/src/base-client/components/common/XCard/XCard.vue +64 -64
  17. package/src/base-client/components/common/XForm/XForm.vue +180 -180
  18. package/src/base-client/components/common/XForm/XFormItem.vue +591 -591
  19. package/src/base-client/components/common/XFormTable/XFormTable.vue +336 -336
  20. package/src/base-client/components/common/XFormTable/index.md +97 -97
  21. package/src/base-client/components/common/XTreeOne/XTreeOne.vue +111 -111
  22. package/src/base-client/components/system/QueryParamsDetailsView/QueryParamsDetailsView.vue +281 -281
  23. package/src/base-client/components/ticket/TicketDetailsView/TicketDetailsView.vue +807 -807
  24. package/src/base-client/components/ticket/TicketDetailsView/index.md +29 -29
  25. package/src/base-client/components/ticket/TicketDetailsView/part/TicketDetailsFlow.vue +260 -260
  26. package/src/base-client/components/ticket/TicketSubmitSuccessView/TicketSubmitSuccessView.vue +532 -532
  27. package/src/base-client/components/ticket/TicketSubmitSuccessView/index.md +29 -29
  28. package/src/base-client/plugins/AppData.js +76 -76
  29. package/src/base-client/plugins/GetLoginInfoService.js +179 -179
  30. package/src/base-client/plugins/PagedList.js +177 -177
  31. package/src/base-client/plugins/compatible/LoginServiceOA.js +20 -20
  32. package/src/base-client/plugins/i18n-extend.js +32 -32
  33. package/src/components/Ellipsis/Ellipsis.vue +65 -65
  34. package/src/components/Ellipsis/index.md +38 -38
  35. package/src/components/NumberInfo/index.md +43 -43
  36. package/src/components/STable/README.md +341 -341
  37. package/src/components/STable/index.js +318 -318
  38. package/src/components/Trend/index.md +45 -45
  39. package/src/components/checkbox/ColorCheckbox.vue +157 -157
  40. package/src/components/checkbox/ImgCheckbox.vue +163 -163
  41. package/src/components/exception/ExceptionPage.vue +70 -70
  42. package/src/components/form/FormRow.vue +52 -52
  43. package/src/components/index.js +36 -36
  44. package/src/components/menu/SideMenu.vue +62 -62
  45. package/src/components/menu/menu.js +273 -273
  46. package/src/components/page/header/index.less +40 -40
  47. package/src/components/setting/Setting.vue +235 -235
  48. package/src/components/table/StandardTable.vue +141 -141
  49. package/src/components/table/advance/ActionColumns.vue +158 -158
  50. package/src/components/table/advance/SearchArea.vue +355 -355
  51. package/src/components/tool/AStepItem.vue +60 -60
  52. package/src/components/tool/AvatarList.vue +68 -68
  53. package/src/components/tool/Drawer.vue +142 -142
  54. package/src/components/tool/TagSelect.vue +83 -83
  55. package/src/components/transition/PageToggleTransition.vue +97 -97
  56. package/src/config/default/admin.config.js +18 -18
  57. package/src/config/default/setting.config.js +46 -46
  58. package/src/config/replacer/resolve.config.js +67 -67
  59. package/src/layouts/CommonLayout.vue +42 -42
  60. package/src/layouts/ComponentLayoutOne.vue +47 -47
  61. package/src/layouts/PageLayout.vue +151 -151
  62. package/src/layouts/SinglePageView.vue +116 -116
  63. package/src/layouts/footer/PageFooter.vue +49 -49
  64. package/src/layouts/header/AdminHeader.vue +134 -134
  65. package/src/layouts/header/HeaderAvatar.vue +64 -64
  66. package/src/layouts/header/HeaderNotice.vue +176 -176
  67. package/src/layouts/header/HeaderSearch.vue +67 -67
  68. package/src/layouts/header/InstitutionDetail.vue +181 -181
  69. package/src/layouts/header/index.less +92 -92
  70. package/src/layouts/tabs/TabsHead.vue +190 -190
  71. package/src/layouts/tabs/TabsView.vue +379 -379
  72. package/src/mock/goods/index.js +108 -108
  73. package/src/pages/exception/404.vue +24 -25
  74. package/src/pages/login/Login.vue +365 -365
  75. package/src/pages/report/ReportTable.js +124 -124
  76. package/src/pages/report/ReportTableHome.vue +28 -28
  77. package/src/pages/resourceManage/orgListManage.vue +98 -98
  78. package/src/pages/system/file/index.vue +317 -317
  79. package/src/pages/system/settings/index.vue +126 -126
  80. package/src/pages/system/settings/modifyPassword.vue +109 -109
  81. package/src/router/async/config.async.js +28 -28
  82. package/src/router/async/router.map.js +68 -68
  83. package/src/router/index.js +27 -27
  84. package/src/services/api/DictionaryDetailsViewApi.js +6 -6
  85. package/src/services/api/LogDetailsViewApi.js +10 -10
  86. package/src/services/api/QueryParamsDetailsViewApi.js +6 -6
  87. package/src/services/api/TicketDetailsViewApi.js +34 -34
  88. package/src/services/api/cas.js +79 -79
  89. package/src/services/api/commonTempTable.js +10 -10
  90. package/src/services/api/index.js +17 -17
  91. package/src/services/api/logininfor/index.js +6 -6
  92. package/src/services/api/manage.js +8 -8
  93. package/src/services/apiService.js +14 -14
  94. package/src/services/user.js +64 -64
  95. package/src/store/modules/index.js +4 -4
  96. package/src/theme/default/nprogress.less +76 -76
  97. package/src/theme/default/style.less +58 -58
  98. package/src/utils/colors.js +107 -107
  99. package/src/utils/excel/Blob.js +180 -180
  100. package/src/utils/excel/Export2Excel.js +141 -141
  101. package/src/utils/formatter.js +68 -68
  102. package/src/utils/i18n.js +80 -80
  103. package/src/utils/map-utils.js +37 -37
  104. package/src/utils/request.js +311 -311
  105. package/src/utils/routerUtil.js +2 -0
  106. package/src/utils/theme-color-replacer-extend.js +91 -91
  107. package/src/utils/themeUtil.js +100 -100
  108. package/src/utils/util.js +230 -230
  109. package/vue.config.js +106 -106
package/CHANGELOG.md CHANGED
@@ -1,6 +1,9 @@
1
1
  # Change Log
2
2
  > 所有关于本项目的变化都在该文档里。
3
3
 
4
+ **1.6.33 -2023-05-05 @何文强**
5
+ - 高德jsapi升级后地图组件默认图片修复
6
+
4
7
  **1.6.32 -2023-05-05 @江超**
5
8
  - 修改滚动条样式以及树列表样式
6
9
 
package/index.js CHANGED
@@ -1,30 +1,30 @@
1
- import Vue from 'vue'
2
- import { initRouter } from '@vue2-client/router'
3
- import { initI18n } from '@vue2-client/utils/i18n'
4
- import bootstrap from '@vue2-client/bootstrap'
5
- import { modules } from '@vue2-client/store'
6
- import '@vue2-client/theme/index.less'
7
- import '@vue2-client/utils/filter'
8
- import 'animate.css/source/animate.css'
9
- import 'moment/locale/zh-cn'
10
- import Antd from 'ant-design-vue'
11
- import Viser from 'viser-vue'
12
- // 插件
13
- import Plugins from '@vue2-client/base-client/plugins'
14
-
15
- const routerOptions = initRouter()
16
- const i18n = initI18n('CN', 'US')
17
-
18
- Vue.use(Antd)
19
- Vue.use(Viser)
20
- Vue.use(Plugins)
21
- Vue.config.productionTip = false
22
- const message = Vue.prototype.$message
23
-
24
- export {
25
- routerOptions,
26
- modules,
27
- i18n,
28
- message,
29
- bootstrap
30
- }
1
+ import Vue from 'vue'
2
+ import { initRouter } from '@vue2-client/router'
3
+ import { initI18n } from '@vue2-client/utils/i18n'
4
+ import bootstrap from '@vue2-client/bootstrap'
5
+ import { modules } from '@vue2-client/store'
6
+ import '@vue2-client/theme/index.less'
7
+ import '@vue2-client/utils/filter'
8
+ import 'animate.css/source/animate.css'
9
+ import 'moment/locale/zh-cn'
10
+ import Antd from 'ant-design-vue'
11
+ import Viser from 'viser-vue'
12
+ // 插件
13
+ import Plugins from '@vue2-client/base-client/plugins'
14
+
15
+ const routerOptions = initRouter()
16
+ const i18n = initI18n('CN', 'US')
17
+
18
+ Vue.use(Antd)
19
+ Vue.use(Viser)
20
+ Vue.use(Plugins)
21
+ Vue.config.productionTip = false
22
+ const message = Vue.prototype.$message
23
+
24
+ export {
25
+ routerOptions,
26
+ modules,
27
+ i18n,
28
+ message,
29
+ bootstrap
30
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vue2-client",
3
- "version": "1.6.32",
3
+ "version": "1.6.34-1",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "serve": "vue-cli-service serve",
Binary file
@@ -1,233 +1,317 @@
1
- <template>
2
- <div class="certain-category-search-wrapper">
3
- <a-auto-complete
4
- style="right: -12px"
5
- :disabled="!mapAutocomplete"
6
- :dropdown-match-select-width="false"
7
- :dropdown-style="{ width: '400px' }"
8
- class="certain-category-search"
9
- dropdown-class-name="certain-category-search-dropdown"
10
- option-label-prop="value"
11
- placeholder="输入地址关键字搜索"
12
- @search="fetchFunction"
13
- @select="onSelect"
14
- >
15
- <a-spin v-if="searching" slot="notFoundContent" size="small" />
16
- <template slot="dataSource">
17
- <a-select-opt-group v-for="group in option" :key="group.title">
18
- <span
19
- slot="label">
20
- <a-icon type="bank" /> {{ group.title }}
21
- </span>
22
- <a-select-option v-for="address in group.children" :key="address.label + ' <' + address.value + '>'">
23
- <p class="addressName"><a-icon type="environment" /> <span v-html="highLight(address.label, address.word)">{{ address.label }}</span></p>
24
- <p v-if="address.address !== '[]'" class="addressRemark">
25
- {{ address.address }}
26
- </p>
27
- </a-select-option>
28
- </a-select-opt-group>
29
- </template>
30
- <a-input>
31
- <a-icon slot="suffix" class="certain-category-icon" type="search"/>
32
- </a-input>
33
- </a-auto-complete>
34
- </div>
35
- </template>
36
- <script>
37
-
38
- import { post } from '@vue2-client/services/api'
39
- import { GetGDMap } from '@vue2-client/utils/map-utils'
40
- import { debounce } from 'ant-design-vue/lib/vc-table/src/utils'
41
- import { mapState } from 'vuex'
42
-
43
- export default {
44
- name: 'AddressSearchCombobox',
45
- data () {
46
- // 检索去抖
47
- this.fetchFunction = debounce(this.fetchFunction, 300)
48
- return {
49
- // 地址搜索联想
50
- mapAutocomplete: undefined,
51
- // 检索结果
52
- option: [],
53
- // 最后检索版本
54
- lastFetchId: 0,
55
- // 检索中
56
- searching: false
57
- }
58
- },
59
- model: {
60
- prop: 'searchResult',
61
- event: 'onSelect'
62
- },
63
- computed: {
64
- ...mapState('setting', ['isMobile', 'gaode_key', 'gaode_secret_key'])
65
- },
66
- props: {
67
- searchResult: {
68
- type: String,
69
- default: undefined
70
- },
71
- // 返回数据格式
72
- searchResultType: {
73
- type: String,
74
- default: 'Default'
75
- // default: 'Array'
76
- // default: 'Object'
77
- },
78
- // Object 返回格式时 可以自定义key
79
- resultKeys: {
80
- type: Object,
81
- default: () => { return { address: 'address', coords: 'coords' } }
82
- }
83
- },
84
- created () {
85
- },
86
- mounted () {
87
- GetGDMap(this.gaode_secret_key, this.gaode_key).then(aMap => {
88
- this.mapAutocomplete = new (aMap).AutoComplete({
89
- // city 限定城市,默认全国
90
- city: '全国'
91
- })
92
- })
93
- },
94
- methods: {
95
- onSelect (value) {
96
- let result
97
- if (this.searchResultType !== 'Default') {
98
- const _arr = value.replace('>', '').split('<')
99
- if (this.searchResultType === 'Array') {
100
- result = _arr
101
- } else {
102
- result = {}
103
- result[this.resultKeys.address] = _arr[0]
104
- result[this.resultKeys.coords] = _arr[1]
105
- }
106
- }
107
- this.$emit('onSelect', JSON.stringify(result) || value)
108
- // this.$emit('onClick', result || value)
109
- },
110
- // 懒加载检索方法
111
- fetchFunction (value) {
112
- if (value && this.mapAutocomplete) {
113
- this.searching = true
114
- this.lastFetchId += 1
115
- const fetchId = this.lastFetchId
116
- this.mapAutocomplete.search(value, (status, result) => {
117
- if (fetchId !== this.lastFetchId) {
118
- return
119
- }
120
- if (status === 'complete') {
121
- this.option = []
122
- const addressMap = {}
123
- result.tips.forEach((res) => {
124
- if (res.location) {
125
- if (!addressMap.hasOwnProperty(res.district)) {
126
- addressMap[res.district] = []
127
- }
128
- addressMap[res.district].push({
129
- label: res.name,
130
- value: res.location.lng + ',' + res.location.lat,
131
- address: res.address + '',
132
- word: value
133
- })
134
- }
135
- })
136
- for (const key of Object.keys(addressMap)) {
137
- this.option.push({
138
- title: key,
139
- children: addressMap[key]
140
- })
141
- }
142
- }
143
- this.searching = false
144
- })
145
- }
146
- },
147
- // 获取数据
148
- getData (value, callback) {
149
- if (value !== '') {
150
- const logicName = this.attr.keyName
151
- const logic = logicName.substring(6)
152
- post('/api/af-system/logic/' + logic, value).then(res => {
153
- callback(res)
154
- })
155
- }
156
- },
157
- // 关键字高亮
158
- highLight (value, word) {
159
- // 如果标题中包含,关键字就替换一下
160
- if (value.includes(word)) {
161
- value = value.replace(word,
162
- // 这里是替换成html格式的数据,最好再加一个样式权重,保险一点
163
- '<span style="color:red!important;">' + word + '</span>'
164
- )
165
- return value
166
- // eslint-disable-next-line brace-style
167
- }
168
- // 不包含的话还用这个
169
- else {
170
- return value
171
- }
172
- }
173
- }
174
- }
175
- </script>
176
-
177
- <style>
178
- .certain-category-search-dropdown .ant-select-dropdown-menu-item-group-title {
179
- color: #666;
180
- font-weight: bold;
181
- font-size: 14px;
182
- }
183
-
184
- .certain-category-search-dropdown .ant-select-dropdown-menu-item-group {
185
- border-bottom: 1px solid #f6f6f6;
186
- }
187
-
188
- .certain-category-search-dropdown .ant-select-dropdown-menu-item {
189
- padding-left: 16px;
190
- }
191
-
192
- .certain-category-search-dropdown .ant-select-dropdown-menu-item.show-all {
193
- text-align: center;
194
- cursor: default;
195
- }
196
-
197
- .certain-category-search-dropdown .ant-select-dropdown-menu {
198
- max-height: 300px;
199
- }
200
- </style>
201
- <style scoped>
202
- .certain-category-search-wrapper,
203
- >>> .certain-category-search.ant-select-auto-complete,
204
- .ant-input-affix-wrapper,
205
- .ant-input-suffix {
206
- right: 12px;
207
- }
208
- .certain-category-search-wrapper >>> .certain-search-item-count {
209
- position: absolute;
210
- color: #999;
211
- right: 16px;
212
- }
213
- .certain-category-search-wrapper >>> .certain-category-search.ant-select-focused,
214
- .certain-category-icon {
215
- color: #108ee9;
216
- }
217
- .certain-category-search-wrapper >>> .certain-category-icon {
218
- color: #6e6e6e;
219
- transition: all 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);
220
- font-size: 16px;
221
- }
222
-
223
- .addressName {
224
- margin-bottom: 0;
225
- font-size: 14px;
226
- font-weight: bold;
227
- }
228
-
229
- .addressRemark {
230
- margin-bottom: 0;
231
- font-size: 12px;
232
- }
233
- </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
+ 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>