vue2-client 1.6.63-single → 1.6.64-single

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 (102) hide show
  1. package/.env +15 -15
  2. package/CHANGELOG.md +3 -0
  3. package/index.js +30 -30
  4. package/package.json +1 -1
  5. package/src/base-client/components/common/CitySelect/CitySelect.vue +247 -247
  6. package/src/base-client/components/common/CreateQuery/CreateQuery.vue +669 -669
  7. package/src/base-client/components/common/CreateQuery/CreateQueryItem.vue +735 -735
  8. package/src/base-client/components/common/CreateSimpleFormQuery/CreateSimpleFormQuery.vue +460 -460
  9. package/src/base-client/components/common/CreateSimpleFormQuery/CreateSimpleFormQueryItem.vue +510 -510
  10. package/src/base-client/components/common/FormGroupEdit/FormGroupEdit.vue +138 -138
  11. package/src/base-client/components/common/FormGroupQuery/FormGroupQuery.vue +165 -165
  12. package/src/base-client/components/common/JSONToTree/jsontotree.vue +275 -275
  13. package/src/base-client/components/common/XAddForm/XAddForm.vue +72 -72
  14. package/src/base-client/components/common/XAddNativeForm/XAddNativeForm.vue +365 -365
  15. package/src/base-client/components/common/XCard/XCard.vue +64 -64
  16. package/src/base-client/components/common/XDataDrawer/XDataDrawer.vue +180 -0
  17. package/src/base-client/components/common/XDataDrawer/index.js +3 -0
  18. package/src/base-client/components/common/XDataDrawer/index.md +41 -0
  19. package/src/base-client/components/common/XForm/XForm.vue +178 -178
  20. package/src/base-client/components/common/XForm/XFormItem.vue +521 -521
  21. package/src/base-client/components/common/XForm/XTreeSelect.vue +184 -184
  22. package/src/base-client/components/common/XFormCol/XFormCol.vue +38 -38
  23. package/src/base-client/components/common/XFormTable/XFormTable.vue +348 -348
  24. package/src/base-client/components/common/XFormTable/index.md +97 -97
  25. package/src/base-client/components/common/XTable/XTable.vue +519 -519
  26. package/src/base-client/components/common/XTreeOne/XTreeOne.vue +111 -111
  27. package/src/base-client/components/index.js +41 -0
  28. package/src/base-client/components/ticket/TicketDetailsView/index.md +29 -29
  29. package/src/base-client/components/ticket/TicketDetailsView/part/TicketDetailsFlow.vue +260 -260
  30. package/src/base-client/components/ticket/TicketSubmitSuccessView/index.md +29 -29
  31. package/src/base-client/plugins/AppData.js +76 -76
  32. package/src/base-client/plugins/GetLoginInfoService.js +179 -179
  33. package/src/base-client/plugins/PagedList.js +177 -177
  34. package/src/base-client/plugins/compatible/LoginServiceOA.js +20 -20
  35. package/src/base-client/plugins/i18n-extend.js +32 -32
  36. package/src/components/Ellipsis/Ellipsis.vue +65 -65
  37. package/src/components/Ellipsis/index.md +38 -38
  38. package/src/components/NumberInfo/index.md +43 -43
  39. package/src/components/STable/README.md +341 -341
  40. package/src/components/STable/index.js +318 -318
  41. package/src/components/Trend/index.md +45 -45
  42. package/src/components/checkbox/ColorCheckbox.vue +157 -157
  43. package/src/components/checkbox/ImgCheckbox.vue +163 -163
  44. package/src/components/exception/ExceptionPage.vue +70 -70
  45. package/src/components/form/FormRow.vue +52 -52
  46. package/src/components/index.js +36 -36
  47. package/src/components/menu/SideMenu.vue +15 -4
  48. package/src/components/menu/menu.js +273 -273
  49. package/src/components/page/header/index.less +40 -40
  50. package/src/components/setting/Setting.vue +235 -235
  51. package/src/components/table/StandardTable.vue +141 -141
  52. package/src/components/table/advance/ActionColumns.vue +158 -158
  53. package/src/components/table/advance/SearchArea.vue +355 -355
  54. package/src/components/tool/AStepItem.vue +60 -60
  55. package/src/components/tool/AvatarList.vue +68 -68
  56. package/src/components/tool/Drawer.vue +142 -142
  57. package/src/components/tool/TagSelect.vue +83 -83
  58. package/src/components/transition/PageToggleTransition.vue +97 -97
  59. package/src/config/CreateQueryConfig.js +307 -307
  60. package/src/config/default/admin.config.js +18 -18
  61. package/src/config/default/setting.config.js +48 -48
  62. package/src/config/replacer/resolve.config.js +67 -67
  63. package/src/layouts/CommonLayout.vue +42 -42
  64. package/src/layouts/ComponentLayoutOne.vue +47 -47
  65. package/src/layouts/PageLayout.vue +151 -151
  66. package/src/layouts/SinglePageView.vue +116 -116
  67. package/src/layouts/footer/PageFooter.vue +49 -49
  68. package/src/layouts/header/AdminHeader.vue +134 -134
  69. package/src/layouts/header/HeaderAvatar.vue +64 -64
  70. package/src/layouts/header/HeaderSearch.vue +67 -67
  71. package/src/layouts/header/index.less +92 -92
  72. package/src/layouts/tabs/TabsHead.vue +190 -190
  73. package/src/layouts/tabs/TabsView.vue +379 -379
  74. package/src/mock/goods/index.js +108 -108
  75. package/src/pages/login/Login.vue +369 -369
  76. package/src/pages/report/ReportTable.js +124 -124
  77. package/src/pages/resourceManage/orgListManage.vue +98 -98
  78. package/src/pages/system/settings/index.vue +126 -126
  79. package/src/pages/system/settings/modifyPassword.vue +109 -109
  80. package/src/router/async/config.async.js +28 -28
  81. package/src/router/async/router.map.js +74 -74
  82. package/src/router/guards.js +153 -153
  83. package/src/router/index.js +27 -27
  84. package/src/services/api/cas.js +79 -79
  85. package/src/services/api/index.js +17 -17
  86. package/src/services/apiService.js +14 -14
  87. package/src/services/user.js +67 -67
  88. package/src/store/modules/index.js +4 -4
  89. package/src/theme/default/nprogress.less +76 -76
  90. package/src/theme/default/style.less +58 -58
  91. package/src/utils/EncryptUtil.js +53 -53
  92. package/src/utils/colors.js +107 -107
  93. package/src/utils/excel/Blob.js +180 -180
  94. package/src/utils/excel/Export2Excel.js +141 -141
  95. package/src/utils/formatter.js +68 -68
  96. package/src/utils/i18n.js +80 -80
  97. package/src/utils/login.js +138 -138
  98. package/src/utils/map-utils.js +37 -37
  99. package/src/utils/theme-color-replacer-extend.js +91 -91
  100. package/src/utils/themeUtil.js +100 -100
  101. package/src/utils/util.js +230 -230
  102. package/vue.config.js +106 -106
package/.env CHANGED
@@ -1,15 +1,15 @@
1
- VUE_APP_PUBLIC_PATH=/
2
- VUE_APP_NAME=Admin
3
- VUE_APP_ROUTES_KEY=admin.routes
4
- VUE_APP_PERMISSIONS_KEY=admin.permissions
5
- VUE_APP_ROLES_KEY=admin.roles
6
- VUE_APP_USER_KEY=admin.user
7
- VUE_APP_LOGIN_KEY=admin.login
8
- VUE_APP_SETTING_KEY=admin.setting
9
- VUE_APP_TBAS_KEY=admin.tabs
10
- VUE_APP_TBAS_TITLES_KEY=admin.tabs.titles
11
- VUE_APP_DICTIONARY_KEY=admin.dictionary
12
- VUE_APP_BADGE_KEY=admin.badge
13
- VUE_APP_SINGLEVALUE_KEY=admin.singlevalue
14
- VUE_APP_DIVISIONSOHCHINA=admin.divisionsohchina
15
- VUE_APP_API_BASE_URL=http://123.60.214.109:8405
1
+ VUE_APP_PUBLIC_PATH=/
2
+ VUE_APP_NAME=Admin
3
+ VUE_APP_ROUTES_KEY=admin.routes
4
+ VUE_APP_PERMISSIONS_KEY=admin.permissions
5
+ VUE_APP_ROLES_KEY=admin.roles
6
+ VUE_APP_USER_KEY=admin.user
7
+ VUE_APP_LOGIN_KEY=admin.login
8
+ VUE_APP_SETTING_KEY=admin.setting
9
+ VUE_APP_TBAS_KEY=admin.tabs
10
+ VUE_APP_TBAS_TITLES_KEY=admin.tabs.titles
11
+ VUE_APP_DICTIONARY_KEY=admin.dictionary
12
+ VUE_APP_BADGE_KEY=admin.badge
13
+ VUE_APP_SINGLEVALUE_KEY=admin.singlevalue
14
+ VUE_APP_DIVISIONSOHCHINA=admin.divisionsohchina
15
+ VUE_APP_API_BASE_URL=http://123.60.214.109:8405
package/CHANGELOG.md CHANGED
@@ -1,6 +1,9 @@
1
1
  # Change Log
2
2
  > 所有关于本项目的变化都在该文档里。
3
3
 
4
+ **1.6.64 -2023-08-29 @江超**
5
+ - 修复长标题导致的显示问题
6
+
4
7
  **1.6.62 - 1.6.63 -2023-08-09 @江超**
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.63-single",
3
+ "version": "1.6.64-single",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "serve": "SET NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service serve",
@@ -1,247 +1,247 @@
1
- <template>
2
- <div>
3
- <a-cascader
4
- v-if="type === 'cascader'"
5
- :options="tagData.divisionsForTree"
6
- :placeholder="placeholder"
7
- style="width: 100%;"
8
- :size="size"
9
- />
10
- <a-select
11
- ref="select"
12
- :size="size"
13
- v-model="valueView"
14
- style="width: 100%;"
15
- :dropdownMatchSelectWidth="false"
16
- :dropdownStyle="dropdownStyle"
17
- :placeholder="placeholder"
18
- @blur="selectBlurHandle"
19
- allow-clear
20
- :getPopupContainer=" triggerNode => { return triggerNode.parentNode } "
21
- :style="inputStyle">
22
- <div slot="dropdownRender" @mousedown.prevent>
23
- <a-tabs v-model="activeKey" :size="size">
24
- <a-tab-pane
25
- :tab="view.key"
26
- v-for="(view,index) in viewArr"
27
- :key="view.key"
28
- v-if="contexts > index"
29
- :disabled="tagData[view.value].length === 0">
30
-
31
- <a-checkable-tag
32
- :style="tagStyle"
33
- v-for="item of tagData[view.value]"
34
- :key="item.code"
35
- @change="tagClick(view.key,item)">
36
- <a-tooltip
37
- placement="top"
38
- :mouseEnterDelay="0.5"
39
- :title="item.name"
40
- :getPopupContainer=" triggerNode => { return triggerNode.parentElement } "
41
- >
42
- {{ item.name.length > 8 ?`${item.name.slice(0, 8)}...`:item.name }}
43
- </a-tooltip>
44
- </a-checkable-tag>
45
- </a-tab-pane>
46
- </a-tabs>
47
- </div>
48
- </a-select>
49
- </div>
50
- </template>
51
-
52
- <script>
53
- const viewArr = [
54
- {
55
- key: '省/直辖市',
56
- value: 'divisionsForTree',
57
- }, {
58
- key: '市',
59
- value: 'cityData',
60
- }, {
61
- key: '区',
62
- value: 'areaData',
63
- }, {
64
- key: '街道',
65
- value: 'streetData',
66
- }
67
- ]
68
- export default {
69
- name: 'CitySelect',
70
- data () {
71
- return {
72
- open: false,
73
- tagData: {
74
- divisionsForTree: [],
75
- // 市
76
- cityData: [],
77
- // 区
78
- areaData: [],
79
- // 街道
80
- streetData: [],
81
- },
82
- // model: {
83
- // provinceModel: { name: '', code: '' },
84
- // cityModel: { name: '', code: '' },
85
- // areaModel: { name: '', code: '' },
86
- // streetModel: { name: '', code: '' }
87
- // },
88
- model: [
89
- { name: '', code: '' },
90
- { name: '', code: '' },
91
- { name: '', code: '' },
92
- { name: '', code: '' }
93
- ],
94
- // 控制标签
95
- activeKey: '省/直辖市',
96
- // 遍历以渲染页面
97
- viewArr,
98
- // 框内显示值 valueView
99
- valueView: undefined
100
- }
101
- },
102
- mounted () {
103
- this.$appdata.getDivisionsOhChinaForTree().then(res => {
104
- this.tagData.divisionsForTree = res
105
- })
106
- },
107
- model: {
108
- prop: 'value',
109
- event: 'onChange'
110
- },
111
- computed: {},
112
- props: {
113
- // 页面渲染内容 默认 省市区街道 四个 所以是4
114
- contexts: {
115
- type: Number,
116
- default: 3
117
- },
118
- placeholder: {
119
- type: String,
120
- default: '请选择省市区'
121
- },
122
- // small lage 输入框大小
123
- size: {
124
- type: String,
125
- default: undefined
126
- },
127
- // 类型 simple / undefined
128
- // simple 就是用的 cascader 不穿就是用的 自己封装的
129
- type: {
130
- type: String,
131
- default: undefined
132
- },
133
- // 框的样式
134
- inputStyle: {
135
- type: Object,
136
- default: () => {
137
- }
138
- },
139
- // 下拉框的样式
140
- dropdownStyle: {
141
- type: Object,
142
- default: () => {
143
- return {
144
- width: '35rem',
145
- padding: '1%'
146
- }
147
- }
148
- },
149
- // 标签的样式
150
- tagStyle: {
151
- type: Object,
152
- default: () => {
153
- return {
154
- fontSize: '0.88rem',
155
- width: '23%',
156
- textAlign: 'left',
157
- margin: '0.5%',
158
- cursor: 'pointer'
159
- }
160
- }
161
- },
162
- // 用于v-model 绑定
163
- value: {
164
- type: String,
165
- default: undefined
166
- },
167
- // 用于v-model 绑定 code :最后一级的code address: 所有级拼接的地址
168
- valueType: {
169
- type: String,
170
- default: 'address'
171
- }
172
- },
173
- watch: {},
174
- methods: {
175
- tagClick (e, item) {
176
- if (e === '省/直辖市') {
177
- // 如果是同一个标签
178
- if (this.model[0].name !== item.name) {
179
- this.tagData.cityData = item.children
180
- this.tagData.areaData = []
181
- this.tagData.streetData = []
182
- this.model[0].name = item.name
183
- this.model[0].code = item.code
184
- this.model[1] = { name: '', code: '' }
185
- this.model[2] = { name: '', code: '' }
186
- this.model[3] = { name: '', code: '' }
187
- }
188
- if (this.contexts !== 1) {
189
- this.activeKey = '市'
190
- }
191
- this.getResultText(1)
192
- } else if (e === '市') {
193
- if (this.model[1].name !== item.name) {
194
- this.tagData.areaData = item.children
195
- this.tagData.streetData = []
196
- this.model[1].name = item.name
197
- this.model[1].code = item.code
198
- this.model[2] = { name: '', code: '' }
199
- this.model[3] = { name: '', code: '' }
200
- }
201
- if (this.contexts !== 2) {
202
- this.activeKey = '区'
203
- }
204
- this.getResultText(2)
205
- } else if (e === '区') {
206
- if (this.model[2].name !== item.name) {
207
- this.tagData.streetData = item.children
208
- this.model[2].name = item.name
209
- this.model[2].code = item.code
210
- this.model[3] = { name: '', code: '' }
211
- }
212
- if (this.contexts !== 3) {
213
- this.activeKey = '街道'
214
- }
215
- this.getResultText(3)
216
- } else if (e === '街道') {
217
- if (this.model[3].name !== item.name) {
218
- this.model[3].name = item.name
219
- this.model[3].code = item.code
220
- }
221
- this.getResultText(4)
222
- }
223
- },
224
- getResultText (tag) {
225
- const address = []
226
- let code = ''
227
- for (let i = 0; i < this.contexts; i++) {
228
- if (this.model[i].name && this.model[i].name !== '') {
229
- address.push(this.model[i].name)
230
- }
231
- code = this.model[i].code ?? ''
232
- }
233
- this.valueView = this.valueType === 'address' ? address.join('/') : code
234
- if (tag === this.contexts) {
235
- this.$refs.select.blur()
236
- this.$emit('onChange', this.valueType === 'address' ? address.join('') : code)
237
- }
238
- },
239
- // 失去焦点回调
240
- selectBlurHandle () {
241
- if (!this.model[this.contexts - 1].code || this.model[this.contexts - 1].code === '') {
242
- this.valueView = undefined
243
- }
244
- }
245
- }
246
- }
247
- </script>
1
+ <template>
2
+ <div>
3
+ <a-cascader
4
+ v-if="type === 'cascader'"
5
+ :options="tagData.divisionsForTree"
6
+ :placeholder="placeholder"
7
+ style="width: 100%;"
8
+ :size="size"
9
+ />
10
+ <a-select
11
+ ref="select"
12
+ :size="size"
13
+ v-model="valueView"
14
+ style="width: 100%;"
15
+ :dropdownMatchSelectWidth="false"
16
+ :dropdownStyle="dropdownStyle"
17
+ :placeholder="placeholder"
18
+ @blur="selectBlurHandle"
19
+ allow-clear
20
+ :getPopupContainer=" triggerNode => { return triggerNode.parentNode } "
21
+ :style="inputStyle">
22
+ <div slot="dropdownRender" @mousedown.prevent>
23
+ <a-tabs v-model="activeKey" :size="size">
24
+ <a-tab-pane
25
+ :tab="view.key"
26
+ v-for="(view,index) in viewArr"
27
+ :key="view.key"
28
+ v-if="contexts > index"
29
+ :disabled="tagData[view.value].length === 0">
30
+
31
+ <a-checkable-tag
32
+ :style="tagStyle"
33
+ v-for="item of tagData[view.value]"
34
+ :key="item.code"
35
+ @change="tagClick(view.key,item)">
36
+ <a-tooltip
37
+ placement="top"
38
+ :mouseEnterDelay="0.5"
39
+ :title="item.name"
40
+ :getPopupContainer=" triggerNode => { return triggerNode.parentElement } "
41
+ >
42
+ {{ item.name.length > 8 ?`${item.name.slice(0, 8)}...`:item.name }}
43
+ </a-tooltip>
44
+ </a-checkable-tag>
45
+ </a-tab-pane>
46
+ </a-tabs>
47
+ </div>
48
+ </a-select>
49
+ </div>
50
+ </template>
51
+
52
+ <script>
53
+ const viewArr = [
54
+ {
55
+ key: '省/直辖市',
56
+ value: 'divisionsForTree',
57
+ }, {
58
+ key: '市',
59
+ value: 'cityData',
60
+ }, {
61
+ key: '区',
62
+ value: 'areaData',
63
+ }, {
64
+ key: '街道',
65
+ value: 'streetData',
66
+ }
67
+ ]
68
+ export default {
69
+ name: 'CitySelect',
70
+ data () {
71
+ return {
72
+ open: false,
73
+ tagData: {
74
+ divisionsForTree: [],
75
+ // 市
76
+ cityData: [],
77
+ // 区
78
+ areaData: [],
79
+ // 街道
80
+ streetData: [],
81
+ },
82
+ // model: {
83
+ // provinceModel: { name: '', code: '' },
84
+ // cityModel: { name: '', code: '' },
85
+ // areaModel: { name: '', code: '' },
86
+ // streetModel: { name: '', code: '' }
87
+ // },
88
+ model: [
89
+ { name: '', code: '' },
90
+ { name: '', code: '' },
91
+ { name: '', code: '' },
92
+ { name: '', code: '' }
93
+ ],
94
+ // 控制标签
95
+ activeKey: '省/直辖市',
96
+ // 遍历以渲染页面
97
+ viewArr,
98
+ // 框内显示值 valueView
99
+ valueView: undefined
100
+ }
101
+ },
102
+ mounted () {
103
+ this.$appdata.getDivisionsOhChinaForTree().then(res => {
104
+ this.tagData.divisionsForTree = res
105
+ })
106
+ },
107
+ model: {
108
+ prop: 'value',
109
+ event: 'onChange'
110
+ },
111
+ computed: {},
112
+ props: {
113
+ // 页面渲染内容 默认 省市区街道 四个 所以是4
114
+ contexts: {
115
+ type: Number,
116
+ default: 3
117
+ },
118
+ placeholder: {
119
+ type: String,
120
+ default: '请选择省市区'
121
+ },
122
+ // small lage 输入框大小
123
+ size: {
124
+ type: String,
125
+ default: undefined
126
+ },
127
+ // 类型 simple / undefined
128
+ // simple 就是用的 cascader 不穿就是用的 自己封装的
129
+ type: {
130
+ type: String,
131
+ default: undefined
132
+ },
133
+ // 框的样式
134
+ inputStyle: {
135
+ type: Object,
136
+ default: () => {
137
+ }
138
+ },
139
+ // 下拉框的样式
140
+ dropdownStyle: {
141
+ type: Object,
142
+ default: () => {
143
+ return {
144
+ width: '35rem',
145
+ padding: '1%'
146
+ }
147
+ }
148
+ },
149
+ // 标签的样式
150
+ tagStyle: {
151
+ type: Object,
152
+ default: () => {
153
+ return {
154
+ fontSize: '0.88rem',
155
+ width: '23%',
156
+ textAlign: 'left',
157
+ margin: '0.5%',
158
+ cursor: 'pointer'
159
+ }
160
+ }
161
+ },
162
+ // 用于v-model 绑定
163
+ value: {
164
+ type: String,
165
+ default: undefined
166
+ },
167
+ // 用于v-model 绑定 code :最后一级的code address: 所有级拼接的地址
168
+ valueType: {
169
+ type: String,
170
+ default: 'address'
171
+ }
172
+ },
173
+ watch: {},
174
+ methods: {
175
+ tagClick (e, item) {
176
+ if (e === '省/直辖市') {
177
+ // 如果是同一个标签
178
+ if (this.model[0].name !== item.name) {
179
+ this.tagData.cityData = item.children
180
+ this.tagData.areaData = []
181
+ this.tagData.streetData = []
182
+ this.model[0].name = item.name
183
+ this.model[0].code = item.code
184
+ this.model[1] = { name: '', code: '' }
185
+ this.model[2] = { name: '', code: '' }
186
+ this.model[3] = { name: '', code: '' }
187
+ }
188
+ if (this.contexts !== 1) {
189
+ this.activeKey = '市'
190
+ }
191
+ this.getResultText(1)
192
+ } else if (e === '市') {
193
+ if (this.model[1].name !== item.name) {
194
+ this.tagData.areaData = item.children
195
+ this.tagData.streetData = []
196
+ this.model[1].name = item.name
197
+ this.model[1].code = item.code
198
+ this.model[2] = { name: '', code: '' }
199
+ this.model[3] = { name: '', code: '' }
200
+ }
201
+ if (this.contexts !== 2) {
202
+ this.activeKey = '区'
203
+ }
204
+ this.getResultText(2)
205
+ } else if (e === '区') {
206
+ if (this.model[2].name !== item.name) {
207
+ this.tagData.streetData = item.children
208
+ this.model[2].name = item.name
209
+ this.model[2].code = item.code
210
+ this.model[3] = { name: '', code: '' }
211
+ }
212
+ if (this.contexts !== 3) {
213
+ this.activeKey = '街道'
214
+ }
215
+ this.getResultText(3)
216
+ } else if (e === '街道') {
217
+ if (this.model[3].name !== item.name) {
218
+ this.model[3].name = item.name
219
+ this.model[3].code = item.code
220
+ }
221
+ this.getResultText(4)
222
+ }
223
+ },
224
+ getResultText (tag) {
225
+ const address = []
226
+ let code = ''
227
+ for (let i = 0; i < this.contexts; i++) {
228
+ if (this.model[i].name && this.model[i].name !== '') {
229
+ address.push(this.model[i].name)
230
+ }
231
+ code = this.model[i].code ?? ''
232
+ }
233
+ this.valueView = this.valueType === 'address' ? address.join('/') : code
234
+ if (tag === this.contexts) {
235
+ this.$refs.select.blur()
236
+ this.$emit('onChange', this.valueType === 'address' ? address.join('') : code)
237
+ }
238
+ },
239
+ // 失去焦点回调
240
+ selectBlurHandle () {
241
+ if (!this.model[this.contexts - 1].code || this.model[this.contexts - 1].code === '') {
242
+ this.valueView = undefined
243
+ }
244
+ }
245
+ }
246
+ }
247
+ </script>