address-client 4.0.1 → 4.0.3

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 (167) hide show
  1. package/.gradle/8.5/checksums/checksums.lock +0 -0
  2. package/.gradle/8.5/dependencies-accessors/dependencies-accessors.lock +0 -0
  3. package/.gradle/8.5/dependencies-accessors/gc.properties +0 -0
  4. package/.gradle/8.5/executionHistory/executionHistory.bin +0 -0
  5. package/.gradle/8.5/executionHistory/executionHistory.lock +0 -0
  6. package/.gradle/8.5/fileChanges/last-build.bin +0 -0
  7. package/.gradle/8.5/fileHashes/fileHashes.bin +0 -0
  8. package/.gradle/8.5/fileHashes/fileHashes.lock +0 -0
  9. package/.gradle/8.5/gc.properties +0 -0
  10. package/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
  11. package/.gradle/buildOutputCleanup/cache.properties +2 -2
  12. package/.gradle/file-system.probe +0 -0
  13. package/.gradle/vcs-1/gc.properties +0 -0
  14. package/CHANGELOG.md +15 -15
  15. package/build/dev-server.js +185 -185
  16. package/build/versionCheck.js +31 -31
  17. package/build/webpack.base.conf.js +82 -82
  18. package/examples/showAdd/App.vue +40 -40
  19. package/gradle/wrapper/gradle-wrapper.jar +0 -0
  20. package/gradle/wrapper/gradle-wrapper.properties +7 -0
  21. package/gradlew +249 -0
  22. package/gradlew.bat +92 -0
  23. package/index.html +44 -44
  24. package/package.json +101 -101
  25. package/src/address.js +74 -74
  26. package/src/components/AddAreaMsg.vue +757 -757
  27. package/src/components/AddCommunityManageMsg.vue +220 -220
  28. package/src/components/AddStreetManageMsg.vue +204 -204
  29. package/src/components/AddStreetOrPcd.vue +316 -316
  30. package/src/components/AddressAddAddress.vue +479 -479
  31. package/src/components/AddressFiles.vue +156 -156
  32. package/src/components/AddressList.vue +637 -637
  33. package/src/components/AddressListLiuLi.vue +17 -17
  34. package/src/components/AddressManage.vue +117 -117
  35. package/src/components/AddressTree.vue +501 -501
  36. package/src/components/AreaFiles.vue +73 -73
  37. package/src/components/AreaList.vue +410 -410
  38. package/src/components/AreaManage.vue +104 -104
  39. package/src/components/AreaTree.vue +508 -508
  40. package/src/components/Basch.vue +72 -72
  41. package/src/components/BatchOrders.vue +328 -328
  42. package/src/components/BuildingList.vue +129 -129
  43. package/src/components/CityList.vue +134 -134
  44. package/src/components/CityManage.vue +76 -76
  45. package/src/components/CommunityAreaList.vue +87 -87
  46. package/src/components/CommunityManage.vue +78 -78
  47. package/src/components/CommunityManageList.vue +244 -244
  48. package/src/components/NewAddressInfo.vue +432 -432
  49. package/src/components/StreetList.vue +241 -241
  50. package/src/components/StreetManage.vue +68 -68
  51. package/src/components/StreetManageList.vue +225 -225
  52. package/src/components/UserAddress.vue +911 -907
  53. package/src/components/UserAddressChange.vue +58 -58
  54. package/src/components/selectAddress/BatchList.vue +326 -326
  55. package/src/components/selectAddress/BatchOrders.vue +37 -36
  56. package/src/filiale/WEINAN/AddAreaMsg.vue +745 -745
  57. package/src/filiale/WEINAN/AddressList.vue +588 -588
  58. package/src/filiale/WEINAN/AddressManage.vue +122 -122
  59. package/src/filiale/WEINAN/AreaList.vue +435 -435
  60. package/src/filiale/WEINAN/AreaManage.vue +109 -109
  61. package/src/filiale/WEINAN/AreaUserList.vue +226 -226
  62. package/src/filiale/WEINAN/UserAddress.vue +783 -783
  63. package/src/filiale/WEINAN/sale.js +18 -18
  64. package/src/filiale/chengtou/UserAddress.vue +894 -894
  65. package/src/filiale/chengtou/sale.js +7 -7
  66. package/src/filiale/dongguan/AddStreetOrPcd.vue +422 -422
  67. package/src/filiale/dongguan/sale.js +7 -7
  68. package/src/filiale/gaomi/AddressList.vue +430 -430
  69. package/src/filiale/gaomi/UserAddress.vue +832 -832
  70. package/src/filiale/gaomi/sale.js +14 -14
  71. package/src/filiale/gongyi/AddAreaMsg.vue +651 -651
  72. package/src/filiale/gongyi/AreaManage.vue +100 -100
  73. package/src/filiale/gongyi/UserAddress.vue +751 -751
  74. package/src/filiale/gongyi/sale.js +14 -14
  75. package/src/filiale/haile/AddressList.vue +615 -615
  76. package/src/filiale/haile/sale.js +8 -8
  77. package/src/filiale/huaran/components/AddAreaMsg.vue +765 -0
  78. package/src/filiale/huaran/components/AddStreetOrPcd.vue +324 -0
  79. package/src/filiale/huaran/components/AddressList.vue +637 -0
  80. package/src/filiale/huaran/components/AreaList.vue +410 -0
  81. package/src/filiale/huaran/components/StreetList.vue +241 -0
  82. package/src/filiale/huaran/components/UserAddress.vue +919 -0
  83. package/src/filiale/huaran/sale.js +22 -0
  84. package/src/filiale/jingwei/UserAddress.vue +764 -764
  85. package/src/filiale/jingwei/sale.js +12 -12
  86. package/src/filiale/lixianV3/AreaList.vue +416 -416
  87. package/src/filiale/lixianV3/sale.js +12 -12
  88. package/src/filiale/macheng/AddAreaMsg.vue +635 -635
  89. package/src/filiale/macheng/AddStreetOrPcd.vue +231 -231
  90. package/src/filiale/macheng/AddressList.vue +613 -613
  91. package/src/filiale/macheng/AreaList.vue +318 -318
  92. package/src/filiale/macheng/CityManage.vue +76 -76
  93. package/src/filiale/macheng/StreetList.vue +186 -186
  94. package/src/filiale/macheng/UserAddress.vue +743 -743
  95. package/src/filiale/macheng/sale.js +17 -17
  96. package/src/filiale/meihekou/UserAddress.vue +898 -898
  97. package/src/filiale/meihekou/sale.js +8 -8
  98. package/src/filiale/qianneng/AddAreaMsg.vue +755 -755
  99. package/src/filiale/qianneng/AddStreetOrPcd.vue +328 -328
  100. package/src/filiale/qianneng/AddressList.vue +638 -638
  101. package/src/filiale/qianneng/AreaList.vue +431 -431
  102. package/src/filiale/qianneng/CityManage.vue +81 -81
  103. package/src/filiale/qianneng/UserAddress.vue +1125 -1125
  104. package/src/filiale/qianneng/sale.js +20 -20
  105. package/src/filiale/qinhua/AddAreaMsg.vue +743 -743
  106. package/src/filiale/qinhua/AddressList.vue +627 -627
  107. package/src/filiale/qinhua/AddressManage.vue +117 -117
  108. package/src/filiale/qinhua/AreaList.vue +425 -425
  109. package/src/filiale/qinhua/AreaManage.vue +100 -100
  110. package/src/filiale/qinhua/CityManage.vue +76 -76
  111. package/src/filiale/qinhua/StreetList.vue +241 -241
  112. package/src/filiale/qinhua/UserAddress.vue +894 -894
  113. package/src/filiale/qinhua/sale.js +20 -20
  114. package/src/filiale/rizhao/UserAddress.vue +897 -897
  115. package/src/filiale/rizhao/sale.js +8 -8
  116. package/src/filiale/rongcheng/AddressList.vue +363 -363
  117. package/src/filiale/rongcheng/UserAddress.vue +799 -799
  118. package/src/filiale/rongcheng/sale.js +11 -11
  119. package/src/filiale/shanggao/AddAreaMsg.vue +752 -752
  120. package/src/filiale/shanggao/AddStreetOrPcd.vue +312 -312
  121. package/src/filiale/shanggao/AddressList.vue +613 -613
  122. package/src/filiale/shanggao/AreaList.vue +436 -436
  123. package/src/filiale/shanggao/BuildingList.vue +129 -129
  124. package/src/filiale/shanggao/StreetList.vue +240 -240
  125. package/src/filiale/shanggao/UserAddress.vue +953 -953
  126. package/src/filiale/shanggao/sale.js +16 -16
  127. package/src/filiale/shanxian/AddAreaMsg.vue +766 -766
  128. package/src/filiale/shanxian/AddressList.vue +658 -658
  129. package/src/filiale/shanxian/AreaList.vue +458 -458
  130. package/src/filiale/shanxian/AreaManage.vue +107 -107
  131. package/src/filiale/shanxian/UserAddress.vue +900 -900
  132. package/src/filiale/shanxian/sale.js +15 -15
  133. package/src/filiale/shaoguan/AddAreaMsg.vue +629 -629
  134. package/src/filiale/shaoguan/UserAddress.vue +762 -762
  135. package/src/filiale/shaoguan/sale.js +11 -11
  136. package/src/filiale/tongchuan/AddAreaMsg.vue +635 -635
  137. package/src/filiale/tongchuan/AddStreetOrPcd.vue +351 -351
  138. package/src/filiale/tongchuan/AddressList.vue +379 -379
  139. package/src/filiale/tongchuan/AreaList.vue +315 -315
  140. package/src/filiale/tongchuan/AreaManage.vue +100 -100
  141. package/src/filiale/tongchuan/CityList.vue +133 -133
  142. package/src/filiale/tongchuan/StreetList.vue +215 -215
  143. package/src/filiale/tongchuan/UserAddress.vue +822 -822
  144. package/src/filiale/tongchuan/sale.js +19 -19
  145. package/src/filiale/wuhai/UserAddress.vue +795 -795
  146. package/src/filiale/wuhai/sale.js +12 -12
  147. package/src/filiale/xihu/AreaList.vue +409 -409
  148. package/src/filiale/xihu/StreetList.vue +238 -238
  149. package/src/filiale/xihu/sale.js +14 -14
  150. package/src/filiale/xinkang/AddAreaMsg.vue +780 -780
  151. package/src/filiale/xinkang/AreaList.vue +413 -413
  152. package/src/filiale/xinkang/sale.js +9 -9
  153. package/src/filiale/yangchun/AddAreaMsg.vue +764 -764
  154. package/src/filiale/yangchun/sale.js +7 -7
  155. package/src/filiale/zhongsheng/AddressList.vue +671 -671
  156. package/src/filiale/zhongsheng/AreaList.vue +500 -500
  157. package/src/filiale/zhongsheng/sale.js +12 -12
  158. package/src/filiale/zhongyi/AddAreaMsg.vue +757 -757
  159. package/src/filiale/zhongyi/sale.js +12 -12
  160. package/src/filiale/zhoukou/AddAreaMsg.vue +673 -673
  161. package/src/filiale/zhoukou/AddressList.vue +391 -391
  162. package/src/filiale/zhoukou/AddressManage.vue +115 -115
  163. package/src/filiale/zhoukou/AreaList.vue +319 -319
  164. package/src/filiale/zhoukou/AreaManage.vue +100 -100
  165. package/src/filiale/zhoukou/UserAddress.vue +925 -925
  166. package/src/filiale/zhoukou/sale.js +23 -23
  167. package/src/main.js +23 -23
@@ -1,508 +1,508 @@
1
- <template>
2
- <div>
3
- <div class="border">
4
- <div v-if="!isquery" class="form-group" style="height: auto;position: relative;">
5
- <div class="col-sm-2">
6
- <input type="text" class="form-control col-sm-2" v-model="f_name" condition="f_name='{}'" placeholder='地址名称' >
7
- </div>
8
- <v-select class="col-sm-2" style="margin-left: 5px" :value.sync="f_type" :options='address_type' placeholder='地址类型'
9
- close-on-select v-model='f_type' v-ref:f_adjustable></v-select>
10
- <right-tree :userid.sync='userid' :source.sync='source' @re-res="getRes" > </right-tree>
11
- <button class="btn btn-info" @click="query">查询</button>
12
- <button class="btn btn-info" @click="addRoot">添加区(县)</button>
13
- <!--<button class="btn btn-success" @click="importAddress">导入地址</button>-->
14
- </div>
15
- <div v-if="isquery" class="form-group row" style="height: auto;position: relative;">
16
- <div class="col-sm-2 paddingLeft">
17
- <right-tree :userid.sync='userid' :source.sync='source' @re-res="getRes" > </right-tree>
18
- </div>
19
- <div class="col-sm-2 paddingLeft">
20
- <input type="text" class="form-control" v-model="name_x"
21
- condition="f_name='{}'" :placeholder='config.querys[0]'>
22
- </div>
23
- <div class="col-sm-2 paddingLeft">
24
- <input type="text" class="form-control" v-model="name_l"
25
- condition="f_name='{}'" :placeholder='config.querys[1]'>
26
- </div>
27
- <div class="col-sm-2 paddingLeft">
28
- <input type="text" class="form-control" v-model="name_d"
29
- condition="f_name='{}'" :placeholder='config.querys[2]'>
30
- </div>
31
- <!--<div class="col-sm-2 paddingLeft">-->
32
- <!--<input type="text" class="form-control" v-model="name_c" @keyup.enter="search(name_c, config.querys[3])"-->
33
- <!--condition="f_name='{}'" :placeholder='config.querys[3]'>-->
34
- <!--</div>-->
35
- <!--<div class="col-sm-2 paddingLeft">-->
36
- <!--<input type="text" class="form-control" v-model="name_m" @keyup.enter="search(name_m, config.querys[4])"-->
37
- <!--condition="f_name='{}'" :placeholder='config.querys[4]'>-->
38
- <!--</div>-->
39
- <button class="btn btn-info" @click="search">查询</button>
40
- <button class="btn btn-info" @click="clear">清空</button>
41
- <button class="btn btn-info" @click="addRoot">添加区(县)</button>
42
- <!--<button v-if="isbasch" class="btn btn-success" @click="importAddress">导入地址</button>-->
43
- </div>
44
- <tree-grid class="treeList" :model="model" v-ref:tree :is-Click="true" isEdit="true" @select-changed='selectclick' url='rs/path/address_getChild' id="vc-chooser">
45
- <template partial='head'>
46
- <tr>
47
- <th>类型</th>
48
- <th>内容</th>
49
- </tr>
50
- </template>
51
- <template partial='body'>
52
- <td>{{row.data.f_type=='区'?'区/县':row.data.f_type}}</td>
53
- <td>
54
- <tree-grid-item :row="row" iconsize="18px">
55
- <span partial>
56
- <!--<span v-if="$parent.$parent.isinspect">-->
57
- <!--<span v-if="row.data.f_type=='门牌号' && (!row.data.idstr || row.data.idstr<=0)" style="color: green">{{row.data.f_name}}</span>-->
58
- <!--<span v-else>{{row.data.f_type=='门牌号'?row.data.f_name+'(此地址已有档案)':row.data.f_name}}</span>-->
59
- <!--</span>-->
60
- <!--<span v-if="!$parent.$parent.isinspect">-->
61
- <!--<span>{{row.data.f_name}}</span>-->
62
- <!--</span>-->
63
- <span v-if="$parent.$parent.according(row.data.f_type)?1:row.size=0">{{row.data.f_name}}</span>
64
- <span v-if="row.data.f_type=='小区'">{{row.data.f_name}}</span>
65
-
66
- <span>({{row.size>0?row.size:0}})</span>
67
- <span v-if="$parent.isSelected(row)">
68
- <!--添加地址-->
69
- <button class="btn btn-info btn-sm" v-for="type in $parent.$parent.config.types[row.data.f_type]" @click="$parent.$parent.$parent.addType(row, type)">
70
- <span class="glyphicon glyphicon-plus-sign">{{type}}</span>
71
- </button>
72
- <!--修改地址-->
73
- <button class="btn btn-success btn-sm" @click="$parent.$parent.updateType(row, 1)">修改名称</button>
74
- <!--修改默认表具-->
75
- <button v-if="row.data.f_type=='小区'" class="btn btn-success btn-sm"
76
- @click="$parent.$parent.updateType(row, 2)">修改默认表具</button>
77
- <!--删除地址-->
78
- <button v-if="row.size<=0" class="btn btn-success btn-sm" @click="$parent.$parent.deleteType(row)">删除</button>
79
- </span>
80
- </span>
81
- </tree-grid-item>
82
- </td>
83
- </template>
84
- </tree-grid>
85
- </div>
86
- <div class="rightDiv" v-show="showAddress" >
87
- <address-add style="flex: 1.5;width: 85%" :isbasch="isbasch" :row="item" :f_parentid="parentid" :type="type" :f_location="location" :isarea="isarea"
88
- @add-child-node="addChildNode" @updata-child-node="updataChildNode" v-ref:addressadd ></address-add>
89
- </div>
90
- <modal :show.sync="showFile" v-ref:modal backdrop="true">
91
- <header slot="modal-header" class="modal-header">
92
- <button type="button" class="close" @click="closeFile"><span>&times;</span></button>
93
- <h4 class="modal-title">文件导入</h4>
94
- </header>
95
- <article slot="modal-body" class="modal-body">
96
- <div class="form-group">
97
- <file-upload class="my-file-uploader" name="addressUploadFile" action="rs/file/uploadFile" tagname="文件导入" :headers="headers" multiple v-ref:file></file-upload>
98
- </div>
99
- </article>
100
- <footer slot="modal-footer" class="modal-footer"></footer>
101
- </modal>
102
- </div>
103
- </template>
104
-
105
- <script>
106
- import addressAdd from '../components/AddressAddAddress'
107
- import * as ldapHelper from '../util/LdapHelper'
108
- import Vue from 'vue'
109
-
110
- export default {
111
- name: "AddressTreeManage",
112
- components: {
113
- addressAdd,
114
- },
115
- title: '小区管理',
116
- props: {
117
- //位置
118
- f_location: {
119
- default: {
120
- f_locationId: '1535',
121
- f_locationType: 't_organization',
122
- },
123
- type: Object,
124
- },
125
- // 查询格式
126
- isquery: {
127
- type: Boolean,
128
- default : false,
129
- },
130
- // 是否显示小区信息
131
- isarea: {
132
- type: Boolean,
133
- default: false,
134
- },
135
- // 是否显示批量添加
136
- isbasch: {
137
- type: Boolean,
138
- default: true,
139
- },
140
- // 是否检查用户建档
141
- isinspect: {
142
- type: Boolean,
143
- default: false,
144
- }
145
- },
146
-
147
- data () {
148
- return {
149
- config: {
150
- // 类型定义
151
- types: {
152
- '区': ['街道'],
153
- '街道': ['小区']
154
- },
155
- // 查询类型
156
- querys: ['小区', '楼号', '单元', '楼层', '门牌号'],
157
- },
158
- model: [],
159
- showAddress: false,
160
- //当前更改
161
- item: null,
162
- parentid: null,
163
- location: null,
164
- showFile: false,
165
- headers: {'username': '', 'blodid': '','f_usetype':'','f_remarks':''},
166
- login: {id: '1535',type: 't_organization'},
167
- type: '',
168
- // 参数类, 用于修改tree组件的类
169
- category: {
170
- child: {
171
- add: [], // ''
172
- remove: []
173
- },
174
- span: {
175
- add: ['glyphicon glyphicon-minus-sign','glyphicon glyphicon-plus-sign'],
176
- remove: ['glyphicon glyphicon-chevron-down','glyphicon glyphicon-chevron-right']
177
- }
178
- },
179
- // 选中的节点
180
- treeRow: null,
181
- selectItem: null, // 选择的参数
182
- userid: this.$login.f.id,
183
- source:`tool.getFullTree(this.getRights().where(row.getType() == $organization$))`,
184
- f_type: ['小区'],
185
- f_name: '',
186
- name_x: '',
187
- name_l: '',
188
- name_d: '',
189
- name_c: '',
190
- name_m: '',
191
- }
192
- },
193
- ready() {
194
- if(Vue.$login.f.parent && Vue.$login.f.parent.parentid) {
195
- this.f_location.f_locationId = Vue.$login.f.parent.parentid
196
- this.login.id = Vue.$login.f.parent.parentid+""
197
- }
198
- if(this.f_location.f_locationId && this.f_location.f_locationType) {
199
- this.init()
200
- }
201
- },
202
- watch: {
203
- 'f_location' (val) {
204
- this.showAddress = false
205
- if(val.f_locationId && val.f_locationType) {
206
- this.init()
207
- }
208
- },
209
- 'f_location.f_locationId' () {
210
- this.showAddress = false
211
- if(this.f_location.f_locationId && this.f_location.f_locationType) {
212
- this.init()
213
- }
214
- }
215
- },
216
- computed : {
217
- address_type() {
218
- return this.$appdata.getParam('地址类型')
219
- }
220
- },
221
- methods: {
222
- // 参数初始化
223
- init() {
224
- return asyncGetRoot(this).then(() => {
225
- this.$emit('ready')
226
- }).catch((error) => {
227
- this.$emit('error', error)
228
- })
229
- },
230
- //只显示区/县,街道
231
- according(type){
232
- if(type == '区' || type == '街道'){
233
- return true
234
- }
235
- return false
236
- },
237
- //添加根地址
238
- addRoot() {
239
- this.type = '区'
240
- this.item = null
241
- this.location = Object.assign({}, this.location, this.f_location)
242
- this.parentid = null
243
- this.treeRow = null
244
- this.isarea = false
245
- this.showAddress = true
246
- },
247
- //添加子地址
248
- addType(row, type) {
249
- this.type = type
250
- this.item = null
251
- this.location = Object.assign({}, this.location, this.f_location)
252
- this.parentid = row.data.id
253
- this.treeRow = row
254
- this.isarea = false
255
- this.showAddress = true
256
- },
257
- //修改地址
258
- updateType(row, type) {
259
- console.log('xiugai ......', row, type)
260
- if(type == 1){
261
- this.isarea = false
262
- } else {
263
- this.isarea = true
264
- }
265
- this.type = row.data.f_type
266
- this.parentid = null
267
- this.location = null
268
- this.item = Object.assign({}, this.item, row.data)
269
- this.treeRow = row
270
- this.showAddress = true
271
- },
272
- //删除地址
273
- deleteType(row) {
274
- console.log(row)
275
- let self = this
276
- let id = row.data.id
277
- return asyncDelete(this, row, row.data.f_type).then((res) => {
278
- console.log(res.data.status + " " + res.data.msg)
279
- if(res.data.status == 200) {
280
- console.log(row.parent)
281
- if(row.parent) {
282
- // 父节点刷新
283
- this.$refs.tree.refreshChild(row.parent)
284
- } else {
285
- this.init()
286
- }
287
- } else {
288
- alert(res.data.msg)
289
- }
290
- this.showAddress = false
291
- })
292
- },
293
- //导入地址
294
- importAddress() {
295
- this.showFile = true
296
- },
297
- // 关闭文件上传对话框
298
- closeFile() {
299
- this.showFile = false
300
- // 将选的文件清空
301
- // this.$showMessage(this.$refs.file.$el.querySelector('input').value)
302
- this.$refs.file.$el.querySelector('input').value = ''
303
- },
304
- // 父组件更新子组件属性 , 传入登陆信息
305
- updateData(val) {
306
- if(val.headers){
307
- this.headers = val.headers
308
- }
309
- if(val.login){
310
- this.login = val.login
311
- }
312
- },
313
- // 添加子节点
314
- addChildNode(data) {
315
- if(this.treeRow) {
316
- // 刷新当前节点
317
- this.$refs.tree.refreshChild(this.treeRow)
318
- } else {
319
- this.init()
320
- }
321
- },
322
- // 修改
323
- updataChildNode(data) {
324
- if(this.treeRow.parent){
325
- this.$refs.tree.refreshChild(this.treeRow.parent)
326
- } else {
327
- this.init()
328
- }
329
- },
330
- filterParams (param,filialeCodeStr) {
331
- this.selectItem = null
332
- if(param){
333
- this.model.rows = this.allParams.filter((item) => {
334
- return filialeCodeStr==(item.f_orgstr) && item.name.includes(param)
335
- })
336
- }else{
337
- this.model.rows = this.allParams.filter((item) => {
338
- return filialeCodeStr==(item.f_orgstr)
339
- })
340
- }
341
- },
342
- async query() {
343
- if(this.f_name==="") {
344
- await this.init()
345
- } else if(this.f_type.length <= 0) {
346
- alert("请输入地址类型");
347
- } else {
348
- let condition ={
349
- name: this.f_name,
350
- type: this.f_type[0]
351
- }
352
- let login = {
353
- id: this.f_location.f_locationId+"",
354
- type: this.f_location.f_locationType
355
- }
356
- let res = await asyncQuery(this, condition, login)
357
- this.model = res.data
358
- await new Promise(resolve => {
359
- this.$nextTick(() => {
360
- resolve()
361
- })
362
- })
363
- // 展开所有子
364
- this.$refs.tree.openAll()
365
- this.$emit('ready')
366
- }
367
- },
368
- // 地址搜索
369
- async search() {
370
- let condition ={
371
- f_area: this.name_x,
372
- f_building: this.name_l,
373
- f_unit: this.name_d
374
- }
375
- let login = {
376
- id: this.f_location.f_locationId+"",
377
- type: this.f_location.f_locationType
378
- }
379
- let res = await this.$resetpost(`api/af-revenue/logic/address_search`, {data: {condition: condition, login: login}},{resolveMsg: null})
380
- this.model = res.data
381
- //刷新dom
382
- await new Promise(resolve => {
383
- this.$nextTick(() => {
384
- resolve()
385
- })
386
- })
387
- // 展开所有子
388
- this.$refs.tree.openAll()
389
- },
390
- // 清空
391
- clear() {
392
- this.name_x = ''
393
- this.name_l = ''
394
- this.name_d = ''
395
- this.name_c = ''
396
- this.name_m = ''
397
- this.init()
398
- },
399
- selectclick (obj) {
400
- let row = obj.val
401
- if(this.isinspect){
402
- //如果选择地址已有档案则不返回事件,并把选中状态改为未选中
403
- if(row.data.idstr > 0) {
404
- this.$refs.tree.selectStore.selected = null
405
- return
406
- }
407
- }
408
- console.log('看看row',row)
409
- let newobj={
410
- "rows": ldapHelper.getFullNameType(row, 'f_name', 'f_type'),
411
- "id": ldapHelper.getFullName(row, 'id')+''
412
- }
413
- let address = ''
414
- newobj.rows.forEach((item)=>{
415
- address += item.name
416
- })
417
- this.textContent = address
418
- this.contentId = row.id
419
- this.treeRow = row
420
- //返回, 需要修改
421
- console.log('返回数据',newobj,address)
422
- this.$dispatch('re-ref', newobj,address)
423
- },
424
- getRes (obj) {
425
- let loc = obj.resids.split('.');
426
- this.f_location.f_locationId = loc[loc.length-2];
427
- }
428
- },
429
- events: {
430
- onFileUpload: function (file, res) {
431
- console.log("上传完毕"+JSON.stringify(res))
432
- let data = {
433
- filepath: res.f_downloadpath,
434
- login: this.login
435
- }
436
- console.log("filepath="+JSON.stringify(data))
437
- return asyncImport(this, data).then(() => {
438
- this.closeFile()
439
- this.init()
440
- }).catch((error) => {
441
- this.$emit('error', error)
442
- })
443
- },
444
- 'onFileError'(error) {
445
- this.$showAlert(error, 'warning', 2000)
446
- }
447
- },
448
- }
449
- // 导入地址
450
- let asyncImport = async function (self, data) {
451
- let result = await self.$resetpost(`api/af-revenue/logic/address_import`,data, {resolveMsg: '导入成功', rejectMsg: '导入失败', silent: true}, 0)
452
- return result
453
- }
454
- // 获取根地址
455
- let asyncGetRoot = async function(self) {
456
- let condition = ""
457
- if(self.f_location) {
458
- condition = `f_locationId=${self.f_location.f_locationId} and f_locationType='${self.f_location.f_locationType}'`
459
- } else {
460
- condition = " 1=1 "
461
- }
462
- let that = self
463
- // console.log(`condition=${condition}`)
464
- let result = await self.$resetpost('rs/path/address_getRoot',{data: {f_parentId: null, condition: condition}},{resolveMsg: null})
465
- // console.log(JSON.stringify(result.data))
466
- self.model = result.data
467
- return result
468
- }
469
- // 删除地址
470
- let asyncDelete = async function(self, row, type) {
471
- let result = await self.$resetpost(`api/af-revenue/logic/address_deleteAddress`, {childId: `${row.data.id}`}, {resolveMsg: null})
472
- if(type == '小区') {
473
- await self.$resetpost(`api/af-revenue/logic/address_deleteArea`,{areaId: `${row.data.id}`}, {resolveMsg: null})
474
- }
475
- return result
476
- }
477
- //查询地址
478
- let asyncQuery = async function(self, condition, login) {
479
- let result = await self.$resetpost(`api/af-revenue/logic/address_query`, {data: {condition: condition, login: login}},{resolveMsg: null})
480
- return result
481
- }
482
-
483
- </script>
484
-
485
- <style lang="less" scoped>
486
- .btn{
487
- margin-left: 7px;
488
- border-radius: 4px;
489
- }
490
- .border{
491
- max-width: 50%;
492
- /*overflow-y: auto;*/
493
- float: left;
494
- }
495
- .rightDiv{
496
- width: 50%;
497
- /*margin-left: 200px;*/
498
- float: left;
499
- }
500
- .treeList {
501
- overflow-y: auto;
502
- max-height: 90%;
503
- }
504
- .paddingLeft {
505
- padding-left: 10px;
506
- width: 15%;
507
- }
508
- </style>
1
+ <template>
2
+ <div>
3
+ <div class="border">
4
+ <div v-if="!isquery" class="form-group" style="height: auto;position: relative;">
5
+ <div class="col-sm-2">
6
+ <input type="text" class="form-control col-sm-2" v-model="f_name" condition="f_name='{}'" placeholder='地址名称' >
7
+ </div>
8
+ <v-select class="col-sm-2" style="margin-left: 5px" :value.sync="f_type" :options='address_type' placeholder='地址类型'
9
+ close-on-select v-model='f_type' v-ref:f_adjustable></v-select>
10
+ <right-tree :userid.sync='userid' :source.sync='source' @re-res="getRes" > </right-tree>
11
+ <button class="btn btn-info" @click="query">查询</button>
12
+ <button class="btn btn-info" @click="addRoot">添加区(县)</button>
13
+ <!--<button class="btn btn-success" @click="importAddress">导入地址</button>-->
14
+ </div>
15
+ <div v-if="isquery" class="form-group row" style="height: auto;position: relative;">
16
+ <div class="col-sm-2 paddingLeft">
17
+ <right-tree :userid.sync='userid' :source.sync='source' @re-res="getRes" > </right-tree>
18
+ </div>
19
+ <div class="col-sm-2 paddingLeft">
20
+ <input type="text" class="form-control" v-model="name_x"
21
+ condition="f_name='{}'" :placeholder='config.querys[0]'>
22
+ </div>
23
+ <div class="col-sm-2 paddingLeft">
24
+ <input type="text" class="form-control" v-model="name_l"
25
+ condition="f_name='{}'" :placeholder='config.querys[1]'>
26
+ </div>
27
+ <div class="col-sm-2 paddingLeft">
28
+ <input type="text" class="form-control" v-model="name_d"
29
+ condition="f_name='{}'" :placeholder='config.querys[2]'>
30
+ </div>
31
+ <!--<div class="col-sm-2 paddingLeft">-->
32
+ <!--<input type="text" class="form-control" v-model="name_c" @keyup.enter="search(name_c, config.querys[3])"-->
33
+ <!--condition="f_name='{}'" :placeholder='config.querys[3]'>-->
34
+ <!--</div>-->
35
+ <!--<div class="col-sm-2 paddingLeft">-->
36
+ <!--<input type="text" class="form-control" v-model="name_m" @keyup.enter="search(name_m, config.querys[4])"-->
37
+ <!--condition="f_name='{}'" :placeholder='config.querys[4]'>-->
38
+ <!--</div>-->
39
+ <button class="btn btn-info" @click="search">查询</button>
40
+ <button class="btn btn-info" @click="clear">清空</button>
41
+ <button class="btn btn-info" @click="addRoot">添加区(县)</button>
42
+ <!--<button v-if="isbasch" class="btn btn-success" @click="importAddress">导入地址</button>-->
43
+ </div>
44
+ <tree-grid class="treeList" :model="model" v-ref:tree :is-Click="true" isEdit="true" @select-changed='selectclick' url='rs/path/address_getChild' id="vc-chooser">
45
+ <template partial='head'>
46
+ <tr>
47
+ <th>类型</th>
48
+ <th>内容</th>
49
+ </tr>
50
+ </template>
51
+ <template partial='body'>
52
+ <td>{{row.data.f_type=='区'?'区/县':row.data.f_type}}</td>
53
+ <td>
54
+ <tree-grid-item :row="row" iconsize="18px">
55
+ <span partial>
56
+ <!--<span v-if="$parent.$parent.isinspect">-->
57
+ <!--<span v-if="row.data.f_type=='门牌号' && (!row.data.idstr || row.data.idstr<=0)" style="color: green">{{row.data.f_name}}</span>-->
58
+ <!--<span v-else>{{row.data.f_type=='门牌号'?row.data.f_name+'(此地址已有档案)':row.data.f_name}}</span>-->
59
+ <!--</span>-->
60
+ <!--<span v-if="!$parent.$parent.isinspect">-->
61
+ <!--<span>{{row.data.f_name}}</span>-->
62
+ <!--</span>-->
63
+ <span v-if="$parent.$parent.according(row.data.f_type)?1:row.size=0">{{row.data.f_name}}</span>
64
+ <span v-if="row.data.f_type=='小区'">{{row.data.f_name}}</span>
65
+
66
+ <span>({{row.size>0?row.size:0}})</span>
67
+ <span v-if="$parent.isSelected(row)">
68
+ <!--添加地址-->
69
+ <button class="btn btn-info btn-sm" v-for="type in $parent.$parent.config.types[row.data.f_type]" @click="$parent.$parent.$parent.addType(row, type)">
70
+ <span class="glyphicon glyphicon-plus-sign">{{type}}</span>
71
+ </button>
72
+ <!--修改地址-->
73
+ <button class="btn btn-success btn-sm" @click="$parent.$parent.updateType(row, 1)">修改名称</button>
74
+ <!--修改默认表具-->
75
+ <button v-if="row.data.f_type=='小区'" class="btn btn-success btn-sm"
76
+ @click="$parent.$parent.updateType(row, 2)">修改默认表具</button>
77
+ <!--删除地址-->
78
+ <button v-if="row.size<=0" class="btn btn-success btn-sm" @click="$parent.$parent.deleteType(row)">删除</button>
79
+ </span>
80
+ </span>
81
+ </tree-grid-item>
82
+ </td>
83
+ </template>
84
+ </tree-grid>
85
+ </div>
86
+ <div class="rightDiv" v-show="showAddress" >
87
+ <address-add style="flex: 1.5;width: 85%" :isbasch="isbasch" :row="item" :f_parentid="parentid" :type="type" :f_location="location" :isarea="isarea"
88
+ @add-child-node="addChildNode" @updata-child-node="updataChildNode" v-ref:addressadd ></address-add>
89
+ </div>
90
+ <modal :show.sync="showFile" v-ref:modal backdrop="true">
91
+ <header slot="modal-header" class="modal-header">
92
+ <button type="button" class="close" @click="closeFile"><span>&times;</span></button>
93
+ <h4 class="modal-title">文件导入</h4>
94
+ </header>
95
+ <article slot="modal-body" class="modal-body">
96
+ <div class="form-group">
97
+ <file-upload class="my-file-uploader" name="addressUploadFile" action="rs/file/uploadFile" tagname="文件导入" :headers="headers" multiple v-ref:file></file-upload>
98
+ </div>
99
+ </article>
100
+ <footer slot="modal-footer" class="modal-footer"></footer>
101
+ </modal>
102
+ </div>
103
+ </template>
104
+
105
+ <script>
106
+ import addressAdd from '../components/AddressAddAddress'
107
+ import * as ldapHelper from '../util/LdapHelper'
108
+ import Vue from 'vue'
109
+
110
+ export default {
111
+ name: "AddressTreeManage",
112
+ components: {
113
+ addressAdd,
114
+ },
115
+ title: '小区管理',
116
+ props: {
117
+ //位置
118
+ f_location: {
119
+ default: {
120
+ f_locationId: '1535',
121
+ f_locationType: 't_organization',
122
+ },
123
+ type: Object,
124
+ },
125
+ // 查询格式
126
+ isquery: {
127
+ type: Boolean,
128
+ default : false,
129
+ },
130
+ // 是否显示小区信息
131
+ isarea: {
132
+ type: Boolean,
133
+ default: false,
134
+ },
135
+ // 是否显示批量添加
136
+ isbasch: {
137
+ type: Boolean,
138
+ default: true,
139
+ },
140
+ // 是否检查用户建档
141
+ isinspect: {
142
+ type: Boolean,
143
+ default: false,
144
+ }
145
+ },
146
+
147
+ data () {
148
+ return {
149
+ config: {
150
+ // 类型定义
151
+ types: {
152
+ '区': ['街道'],
153
+ '街道': ['小区']
154
+ },
155
+ // 查询类型
156
+ querys: ['小区', '楼号', '单元', '楼层', '门牌号'],
157
+ },
158
+ model: [],
159
+ showAddress: false,
160
+ //当前更改
161
+ item: null,
162
+ parentid: null,
163
+ location: null,
164
+ showFile: false,
165
+ headers: {'username': '', 'blodid': '','f_usetype':'','f_remarks':''},
166
+ login: {id: '1535',type: 't_organization'},
167
+ type: '',
168
+ // 参数类, 用于修改tree组件的类
169
+ category: {
170
+ child: {
171
+ add: [], // ''
172
+ remove: []
173
+ },
174
+ span: {
175
+ add: ['glyphicon glyphicon-minus-sign','glyphicon glyphicon-plus-sign'],
176
+ remove: ['glyphicon glyphicon-chevron-down','glyphicon glyphicon-chevron-right']
177
+ }
178
+ },
179
+ // 选中的节点
180
+ treeRow: null,
181
+ selectItem: null, // 选择的参数
182
+ userid: this.$login.f.id,
183
+ source:`tool.getFullTree(this.getRights().where(row.getType() == $organization$))`,
184
+ f_type: ['小区'],
185
+ f_name: '',
186
+ name_x: '',
187
+ name_l: '',
188
+ name_d: '',
189
+ name_c: '',
190
+ name_m: '',
191
+ }
192
+ },
193
+ ready() {
194
+ if(Vue.$login.f.parent && Vue.$login.f.parent.parentid) {
195
+ this.f_location.f_locationId = Vue.$login.f.parent.parentid
196
+ this.login.id = Vue.$login.f.parent.parentid+""
197
+ }
198
+ if(this.f_location.f_locationId && this.f_location.f_locationType) {
199
+ this.init()
200
+ }
201
+ },
202
+ watch: {
203
+ 'f_location' (val) {
204
+ this.showAddress = false
205
+ if(val.f_locationId && val.f_locationType) {
206
+ this.init()
207
+ }
208
+ },
209
+ 'f_location.f_locationId' () {
210
+ this.showAddress = false
211
+ if(this.f_location.f_locationId && this.f_location.f_locationType) {
212
+ this.init()
213
+ }
214
+ }
215
+ },
216
+ computed : {
217
+ address_type() {
218
+ return this.$appdata.getParam('地址类型')
219
+ }
220
+ },
221
+ methods: {
222
+ // 参数初始化
223
+ init() {
224
+ return asyncGetRoot(this).then(() => {
225
+ this.$emit('ready')
226
+ }).catch((error) => {
227
+ this.$emit('error', error)
228
+ })
229
+ },
230
+ //只显示区/县,街道
231
+ according(type){
232
+ if(type == '区' || type == '街道'){
233
+ return true
234
+ }
235
+ return false
236
+ },
237
+ //添加根地址
238
+ addRoot() {
239
+ this.type = '区'
240
+ this.item = null
241
+ this.location = Object.assign({}, this.location, this.f_location)
242
+ this.parentid = null
243
+ this.treeRow = null
244
+ this.isarea = false
245
+ this.showAddress = true
246
+ },
247
+ //添加子地址
248
+ addType(row, type) {
249
+ this.type = type
250
+ this.item = null
251
+ this.location = Object.assign({}, this.location, this.f_location)
252
+ this.parentid = row.data.id
253
+ this.treeRow = row
254
+ this.isarea = false
255
+ this.showAddress = true
256
+ },
257
+ //修改地址
258
+ updateType(row, type) {
259
+ console.log('xiugai ......', row, type)
260
+ if(type == 1){
261
+ this.isarea = false
262
+ } else {
263
+ this.isarea = true
264
+ }
265
+ this.type = row.data.f_type
266
+ this.parentid = null
267
+ this.location = null
268
+ this.item = Object.assign({}, this.item, row.data)
269
+ this.treeRow = row
270
+ this.showAddress = true
271
+ },
272
+ //删除地址
273
+ deleteType(row) {
274
+ console.log(row)
275
+ let self = this
276
+ let id = row.data.id
277
+ return asyncDelete(this, row, row.data.f_type).then((res) => {
278
+ console.log(res.data.status + " " + res.data.msg)
279
+ if(res.data.status == 200) {
280
+ console.log(row.parent)
281
+ if(row.parent) {
282
+ // 父节点刷新
283
+ this.$refs.tree.refreshChild(row.parent)
284
+ } else {
285
+ this.init()
286
+ }
287
+ } else {
288
+ alert(res.data.msg)
289
+ }
290
+ this.showAddress = false
291
+ })
292
+ },
293
+ //导入地址
294
+ importAddress() {
295
+ this.showFile = true
296
+ },
297
+ // 关闭文件上传对话框
298
+ closeFile() {
299
+ this.showFile = false
300
+ // 将选的文件清空
301
+ // this.$showMessage(this.$refs.file.$el.querySelector('input').value)
302
+ this.$refs.file.$el.querySelector('input').value = ''
303
+ },
304
+ // 父组件更新子组件属性 , 传入登陆信息
305
+ updateData(val) {
306
+ if(val.headers){
307
+ this.headers = val.headers
308
+ }
309
+ if(val.login){
310
+ this.login = val.login
311
+ }
312
+ },
313
+ // 添加子节点
314
+ addChildNode(data) {
315
+ if(this.treeRow) {
316
+ // 刷新当前节点
317
+ this.$refs.tree.refreshChild(this.treeRow)
318
+ } else {
319
+ this.init()
320
+ }
321
+ },
322
+ // 修改
323
+ updataChildNode(data) {
324
+ if(this.treeRow.parent){
325
+ this.$refs.tree.refreshChild(this.treeRow.parent)
326
+ } else {
327
+ this.init()
328
+ }
329
+ },
330
+ filterParams (param,filialeCodeStr) {
331
+ this.selectItem = null
332
+ if(param){
333
+ this.model.rows = this.allParams.filter((item) => {
334
+ return filialeCodeStr==(item.f_orgstr) && item.name.includes(param)
335
+ })
336
+ }else{
337
+ this.model.rows = this.allParams.filter((item) => {
338
+ return filialeCodeStr==(item.f_orgstr)
339
+ })
340
+ }
341
+ },
342
+ async query() {
343
+ if(this.f_name==="") {
344
+ await this.init()
345
+ } else if(this.f_type.length <= 0) {
346
+ alert("请输入地址类型");
347
+ } else {
348
+ let condition ={
349
+ name: this.f_name,
350
+ type: this.f_type[0]
351
+ }
352
+ let login = {
353
+ id: this.f_location.f_locationId+"",
354
+ type: this.f_location.f_locationType
355
+ }
356
+ let res = await asyncQuery(this, condition, login)
357
+ this.model = res.data
358
+ await new Promise(resolve => {
359
+ this.$nextTick(() => {
360
+ resolve()
361
+ })
362
+ })
363
+ // 展开所有子
364
+ this.$refs.tree.openAll()
365
+ this.$emit('ready')
366
+ }
367
+ },
368
+ // 地址搜索
369
+ async search() {
370
+ let condition ={
371
+ f_area: this.name_x,
372
+ f_building: this.name_l,
373
+ f_unit: this.name_d
374
+ }
375
+ let login = {
376
+ id: this.f_location.f_locationId+"",
377
+ type: this.f_location.f_locationType
378
+ }
379
+ let res = await this.$resetpost(`api/af-revenue/logic/address_search`, {data: {condition: condition, login: login}},{resolveMsg: null})
380
+ this.model = res.data
381
+ //刷新dom
382
+ await new Promise(resolve => {
383
+ this.$nextTick(() => {
384
+ resolve()
385
+ })
386
+ })
387
+ // 展开所有子
388
+ this.$refs.tree.openAll()
389
+ },
390
+ // 清空
391
+ clear() {
392
+ this.name_x = ''
393
+ this.name_l = ''
394
+ this.name_d = ''
395
+ this.name_c = ''
396
+ this.name_m = ''
397
+ this.init()
398
+ },
399
+ selectclick (obj) {
400
+ let row = obj.val
401
+ if(this.isinspect){
402
+ //如果选择地址已有档案则不返回事件,并把选中状态改为未选中
403
+ if(row.data.idstr > 0) {
404
+ this.$refs.tree.selectStore.selected = null
405
+ return
406
+ }
407
+ }
408
+ console.log('看看row',row)
409
+ let newobj={
410
+ "rows": ldapHelper.getFullNameType(row, 'f_name', 'f_type'),
411
+ "id": ldapHelper.getFullName(row, 'id')+''
412
+ }
413
+ let address = ''
414
+ newobj.rows.forEach((item)=>{
415
+ address += item.name
416
+ })
417
+ this.textContent = address
418
+ this.contentId = row.id
419
+ this.treeRow = row
420
+ //返回, 需要修改
421
+ console.log('返回数据',newobj,address)
422
+ this.$dispatch('re-ref', newobj,address)
423
+ },
424
+ getRes (obj) {
425
+ let loc = obj.resids.split('.');
426
+ this.f_location.f_locationId = loc[loc.length-2];
427
+ }
428
+ },
429
+ events: {
430
+ onFileUpload: function (file, res) {
431
+ console.log("上传完毕"+JSON.stringify(res))
432
+ let data = {
433
+ filepath: res.f_downloadpath,
434
+ login: this.login
435
+ }
436
+ console.log("filepath="+JSON.stringify(data))
437
+ return asyncImport(this, data).then(() => {
438
+ this.closeFile()
439
+ this.init()
440
+ }).catch((error) => {
441
+ this.$emit('error', error)
442
+ })
443
+ },
444
+ 'onFileError'(error) {
445
+ this.$showAlert(error, 'warning', 2000)
446
+ }
447
+ },
448
+ }
449
+ // 导入地址
450
+ let asyncImport = async function (self, data) {
451
+ let result = await self.$resetpost(`api/af-revenue/logic/address_import`,data, {resolveMsg: '导入成功', rejectMsg: '导入失败', silent: true}, 0)
452
+ return result
453
+ }
454
+ // 获取根地址
455
+ let asyncGetRoot = async function(self) {
456
+ let condition = ""
457
+ if(self.f_location) {
458
+ condition = `f_locationId=${self.f_location.f_locationId} and f_locationType='${self.f_location.f_locationType}'`
459
+ } else {
460
+ condition = " 1=1 "
461
+ }
462
+ let that = self
463
+ // console.log(`condition=${condition}`)
464
+ let result = await self.$resetpost('rs/path/address_getRoot',{data: {f_parentId: null, condition: condition}},{resolveMsg: null})
465
+ // console.log(JSON.stringify(result.data))
466
+ self.model = result.data
467
+ return result
468
+ }
469
+ // 删除地址
470
+ let asyncDelete = async function(self, row, type) {
471
+ let result = await self.$resetpost(`api/af-revenue/logic/address_deleteAddress`, {childId: `${row.data.id}`}, {resolveMsg: null})
472
+ if(type == '小区') {
473
+ await self.$resetpost(`api/af-revenue/logic/address_deleteArea`,{areaId: `${row.data.id}`}, {resolveMsg: null})
474
+ }
475
+ return result
476
+ }
477
+ //查询地址
478
+ let asyncQuery = async function(self, condition, login) {
479
+ let result = await self.$resetpost(`api/af-revenue/logic/address_query`, {data: {condition: condition, login: login}},{resolveMsg: null})
480
+ return result
481
+ }
482
+
483
+ </script>
484
+
485
+ <style lang="less" scoped>
486
+ .btn{
487
+ margin-left: 7px;
488
+ border-radius: 4px;
489
+ }
490
+ .border{
491
+ max-width: 50%;
492
+ /*overflow-y: auto;*/
493
+ float: left;
494
+ }
495
+ .rightDiv{
496
+ width: 50%;
497
+ /*margin-left: 200px;*/
498
+ float: left;
499
+ }
500
+ .treeList {
501
+ overflow-y: auto;
502
+ max-height: 90%;
503
+ }
504
+ .paddingLeft {
505
+ padding-left: 10px;
506
+ width: 15%;
507
+ }
508
+ </style>