address-client 1.6.74 → 1.6.77

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "address-client",
3
- "version": "1.6.74",
3
+ "version": "1.6.77",
4
4
  "description": "地址管理前台组件",
5
5
  "author": "wanbochao",
6
6
  "license": "ISC",
@@ -31,6 +31,14 @@
31
31
  close-on-select search="true" @change="streetChange">
32
32
  </v-select>
33
33
  </div>
34
+ <div class="col-sm-6 form-group form-input-group ">
35
+ <label class="font_normal_body _zoom4">所属街办</label>
36
+ <v-select
37
+ :value.sync="areamodel.f_block" :value-single="true"
38
+ :options='blockslist' placeholder='请选择'
39
+ close-on-select search="true">
40
+ </v-select>
41
+ </div>
34
42
  <div class="col-sm-6 form-group form-input-group "
35
43
  >
36
44
  <label class="font_normal_body _zoom4">片区</label>
@@ -47,6 +55,7 @@
47
55
  <label class="font_normal_body _zoom4">小区ID</label>
48
56
  <input type="text"
49
57
  style="width: 60%"
58
+ @blur="areaidCheck"
50
59
  v-model="areamodel.oldid" :disabled="operation=='modify'"
51
60
  class="form-control" placeholder="小区ID"
52
61
  v-validate:oldid='{required: true }'>
@@ -136,6 +145,7 @@
136
145
  <label class="font_normal_body _zoom4">单位ID</label>
137
146
  <input type="text"
138
147
  style="width: 60%"
148
+ @blur="areaidCheck"
139
149
  v-model="areamodel.oldid"
140
150
  class="form-control" placeholder="单位ID"
141
151
  v-validate:oldid='{required: true }'>
@@ -389,7 +399,7 @@
389
399
  :value.sync="areamodel.is_close_one"
390
400
  v-model="areamodel.is_close_one" placeholder='第一次关阀天数'
391
401
  v-validate:is_close_one='{required: true }'
392
- ></input>
402
+ />
393
403
  </div>
394
404
  <div class="col-sm-6 form-group form-input-group "
395
405
  :class="[$v.is_close_two.required ? 'has-error' : '']">
@@ -400,7 +410,7 @@
400
410
  :value.sync="areamodel.is_close_two"
401
411
  v-validate:is_close_two='{required: true }'
402
412
  v-model="areamodel.is_close_two" placeholder='第二次关阀天数'
403
- ></input>
413
+ />
404
414
  </div>
405
415
  <div class="col-sm-6 form-group form-input-group "
406
416
  :class="[$v.is_tablelimit.required ? 'has-error' : '']">
@@ -426,7 +436,7 @@
426
436
  :value.sync="areamodel.is_tablelimit_gas"
427
437
  v-validate:is_tablelimit_gas='{required: true }'
428
438
  v-model="areamodel.is_tablelimit_gas" placeholder='上限金额'
429
- ></input>
439
+ />
430
440
  </div>
431
441
  <div class="col-sm-6 form-group form-input-group "
432
442
  :class="[$v.price_type.required ? 'has-error' : '']">
@@ -450,7 +460,7 @@
450
460
  v-validate:anjianyear='{required: true }'
451
461
  style="width: 60%"
452
462
  v-model="areamodel.anjianyear" placeholder='安检年数'
453
- ></input>
463
+ />
454
464
  </div>
455
465
  <div class="col-sm-6 form-group form-input-group "
456
466
  :class="[$v.baofeiyear.required ? 'has-error' : '']">
@@ -459,7 +469,7 @@
459
469
  v-validate:baofeiyear='{required: true }'
460
470
  style="width: 60%"
461
471
  v-model="areamodel.baofeiyear" placeholder='报废年数'
462
- ></input>
472
+ />
463
473
  </div>
464
474
  <div class="col-sm-6 form-group form-input-group "
465
475
  :class="[$v.onealarm.required ? 'has-error' : '']">
@@ -470,7 +480,7 @@
470
480
  :value.sync="areamodel.onealarm"
471
481
  v-validate:onealarm='{required: true }'
472
482
  v-model="areamodel.onealarm" placeholder='第一档报警气量'
473
- ></input>
483
+ />
474
484
  </div>
475
485
  <div class="col-sm-6 form-group form-input-group "
476
486
  :class="[$v.twoalarm.required ? 'has-error' : '']">
@@ -481,7 +491,7 @@
481
491
  :value.sync="areamodel.twoalarm"
482
492
  v-validate:twoalarm='{required: true }'
483
493
  v-model="areamodel.twoalarm" placeholder='第二档报警气量'
484
- ></input>
494
+ />
485
495
  </div>
486
496
  </div>
487
497
  <div v-if="f_special" class="col-sm-6">
@@ -511,12 +521,14 @@ export default {
511
521
  devicetypes: this.$appdata.getParam('设备类型'),
512
522
  distinct: this.$appdata.getParam('行政区域'),
513
523
  opera_area: this.$appdata.getParam('运营区域'),
524
+ repair_point: this.$appdata.getParam('维修站点'),
514
525
  residential_properties: this.$appdata.getParam('小区性质'),
515
526
  heating_style: this.$appdata.getParam('供暖方式'),
516
- repair_point: [{label: '航天站', value: '航天站'},
517
- {label: '韦曲站', value: '韦曲站'}, {label: '郭杜站', value: '郭杜站'},
518
- {label: '沣东站', value: '沣东站'},
519
- {label: '中心站', value: '中心站'}],
527
+ blockslist: this.$appdata.getParam('所属街办'),
528
+ // repair_point: [{label: '航天站', value: '航天站'},
529
+ // {label: '韦曲站', value: '韦曲站'}, {label: '郭杜站', value: '郭杜站'},
530
+ // {label: '沣东站', value: '沣东站'},
531
+ // {label: '中心站', value: '中心站'}],
520
532
  is_order: [{label: '开户', value: '开户'},
521
533
  {label: '未开户', value: '未开户'}],
522
534
  //初始化省市区数据
@@ -740,7 +752,6 @@ export default {
740
752
  } else {
741
753
  this.areamodel.f_street = ''
742
754
  }
743
- console.log(JSON.stringify(this.areamodel))
744
755
  let result = this.$resetpost('rs/logic/address_updatearea', this.areamodel)
745
756
  },
746
757
  cleardara() {
@@ -748,6 +759,7 @@ export default {
748
759
  default_devices: [],
749
760
  f_pcd_id: '',
750
761
  oldid: '',
762
+ f_block: '',
751
763
  f_linkname: '',
752
764
  f_linkphone: '',
753
765
  f_street_id: '',
@@ -787,6 +799,22 @@ export default {
787
799
  card_size: null,
788
800
  }
789
801
  },
802
+ areaidCheck(){
803
+ let HttpReset = new HttpResetClass()
804
+ HttpReset.load('POST', 'rs/sql/address_singleTableOrderBy', {
805
+ data: {
806
+ items: 'id',
807
+ tablename: 't_area',
808
+ orderitem: 'id desc',
809
+ condition: ` oldid = '${this.areamodel.oldid}' `
810
+ }
811
+ }, {resolveMsg: null, rejectMsg: '获取地址失败!'}).then((req) => {
812
+ if (req.data.length > 0) {
813
+ this.areamodel.oldid = ''
814
+ this.$showAlert('ID重复,请检查ID是否正确!','warning',1000)
815
+ }
816
+ })
817
+ },
790
818
  cancel() {
791
819
  this.cleardara()
792
820
  this.$dispatch('cancel')
@@ -34,8 +34,11 @@ export default {
34
34
  this.$refs.addareamsg.cleardara()
35
35
  this.$refs.addareamsg.operation = 'modify'
36
36
  this.$refs.addareamsg.areatype = '小区'
37
- obj.val.default_devices = obj.val.default_devices ? obj.val.default_devices : []
38
- this.$refs.addareamsg.areamodel = Object.assign({}, obj.val)
37
+ try {
38
+ obj.val.default_devices = obj.val.default_devices ? JSON.parse(obj.val.default_devices) : []
39
+ }catch (e){
40
+ console.log("设备赋值错误")
41
+ } this.$refs.addareamsg.areamodel = Object.assign({}, obj.val)
39
42
  this.$refs.addareamsg.oldsize = obj.val.card_size
40
43
  this.$refs.addareamsg.initdata()
41
44
  }
@@ -1,110 +1,110 @@
1
- <template>
2
- <div class="flex">
3
- <criteria-paged :model="model" v-ref:paged>
4
- <criteria partial='criteria' @condition-changed='$parent.search' v-ref:cri>
5
- <div novalidate class="form-inline auto" partial>
6
- <div class="form-group form-input-group">
7
- <button class="btn btn-success width-80" @click="search()" >查询</button>
8
- <button class="btn btn-success width-80" @click="$parent.$parent.add('民用')">添加用气区域</button>
9
- <button class="btn btn-success width-80" @click="$parent.$parent.clear()">清空</button>
10
- </div>
11
- </div>
12
- </criteria>
13
- <data-grid :model="model" partial='list' v-ref:grid>
14
- <template partial='head'>
15
- <tr>
16
- <th><nobr>id</nobr></th>
17
- <th><nobr>区/县</nobr></th>
18
- <th><nobr>片区</nobr></th>
19
- <th><nobr>街道</nobr></th>
20
- <th><nobr>用气区域</nobr></th>
21
- <th><nobr>时间</nobr></th>
22
- <th><nobr>操作人</nobr></th>
23
- <th><nobr>操作</nobr></th>
24
- </tr>
25
- </template>
26
- <template partial='body'>
27
- <tr>
28
- <td style="text-align:center"><nobr>{{row.id}}</nobr></td>
29
- <td style="text-align:center"><nobr>{{row.f_pcd}}</nobr></td>
30
- <td style="text-align:center"><nobr>{{row.f_slice_area}}</nobr></td>
31
- <td style="text-align:center"><nobr>{{row.f_street}}</nobr></td>
32
- <td style="text-align:center"><nobr>{{row.f_usegas_area}}</nobr></td>
33
- <td style="text-align:center"><nobr>{{row.f_operator}}</nobr></td>
34
- <td style="text-align:center"><nobr>{{row.f_operate_date}}</nobr></td>
35
- <td style="text-align:center">
36
- <!-- <button type="button" name="button" class="btn btn-link"
37
- @click.stop="$parent.$parent.$parent.modify(row)">修改</button>-->
38
- <button type="button" name="button" class="btn btn-link"
39
- @click.stop="$parent.$parent.$parent.delete(row)">删除</button>
40
- </td>
41
- </tr>
42
- </template>
43
- <template partial='foot'></template>
44
- </data-grid>
45
- </criteria-paged>
46
- </div>
47
- </template>
48
-
49
- <script>
50
- import { PagedList } from 'vue-client'
51
-
52
- export default {
53
- data () {
54
- return {
55
- model: new PagedList('rs/sql/address_getusegasarealist',20), userid: this.$login.f.id,
56
- source:`tool.getFullTree(this.getRights().where(row.getType() == $organization$))`,
57
- }
58
- },
59
- title: '用气区域列表',
60
- props:{
61
- },
62
- ready(){
63
-
64
- },
65
- methods: {
66
- //添加方法
67
- add(val){
68
- this.$refs.paged.$refs.grid.selectStore.selected = null
69
- this.$dispatch('add',val)
70
- },
71
- //修改
72
- modify(val){
73
- this.$refs.paged.$refs.grid.selectStore.selected = null
74
- this.$dispatch('modify',val)
75
- },
76
- async delete(row){
77
- if(row.id){
78
- var id = row.id
79
- let useraredss = await this.$resetpost('rs/sql/address_singleTable',
80
- {data: {
81
- items: 'f_usegas_area_id',
82
- tablename: 't_user_address',
83
- condition: `f_usegas_area_id='${id}'`}
84
- },
85
- {resolveMsg: null, rejectMsg: null})
86
- if(useraredss.data.length>0){
87
- this.$showAlert('该用气区域下已有地址信息,无法删除!','warning',1000)
88
- }else{
89
- this.$resetdelete('rs/entity/t_usegas_area', {id: id}, {resolveMsg: '删除成功', rejectMsg: '删除失败'}).then((res) => {
90
- this.$dispatch('cancel')
91
- })
92
- }
93
- }
94
- },
95
- search (args) {
96
- this.model.search(args.condition, args.model)
97
- },
98
- //清空
99
- clear(){
100
- this.$refs.paged.$refs.cri.model = {}
101
- },
102
- },
103
- watch:{
104
-
105
- },
106
- events: {
107
- }
108
-
109
- }
110
- </script>
1
+ <template>
2
+ <div class="flex">
3
+ <criteria-paged :model="model" v-ref:paged>
4
+ <criteria partial='criteria' @condition-changed='$parent.search' v-ref:cri>
5
+ <div novalidate class="form-inline auto" partial>
6
+ <div class="form-group form-input-group">
7
+ <button class="btn btn-success width-80" @click="search()" >查询</button>
8
+ <button class="btn btn-success width-80" @click="$parent.$parent.add('民用')">添加用气区域</button>
9
+ <button class="btn btn-success width-80" @click="$parent.$parent.clear()">清空</button>
10
+ </div>
11
+ </div>
12
+ </criteria>
13
+ <data-grid :model="model" partial='list' v-ref:grid>
14
+ <template partial='head'>
15
+ <tr>
16
+ <th><nobr>id</nobr></th>
17
+ <th><nobr>区/县</nobr></th>
18
+ <th><nobr>片区</nobr></th>
19
+ <th><nobr>街道</nobr></th>
20
+ <th><nobr>用气区域</nobr></th>
21
+ <th><nobr>时间</nobr></th>
22
+ <th><nobr>操作人</nobr></th>
23
+ <th><nobr>操作</nobr></th>
24
+ </tr>
25
+ </template>
26
+ <template partial='body'>
27
+ <tr>
28
+ <td style="text-align:center"><nobr>{{row.id}}</nobr></td>
29
+ <td style="text-align:center"><nobr>{{row.f_pcd}}</nobr></td>
30
+ <td style="text-align:center"><nobr>{{row.f_slice_area}}</nobr></td>
31
+ <td style="text-align:center"><nobr>{{row.f_street}}</nobr></td>
32
+ <td style="text-align:center"><nobr>{{row.f_usegas_area}}</nobr></td>
33
+ <td style="text-align:center"><nobr>{{row.f_operator}}</nobr></td>
34
+ <td style="text-align:center"><nobr>{{row.f_operate_date}}</nobr></td>
35
+ <td style="text-align:center">
36
+ <!-- <button type="button" name="button" class="btn btn-link"
37
+ @click.stop="$parent.$parent.$parent.modify(row)">修改</button>-->
38
+ <button type="button" name="button" class="btn btn-link"
39
+ @click.stop="$parent.$parent.$parent.delete(row)">删除</button>
40
+ </td>
41
+ </tr>
42
+ </template>
43
+ <template partial='foot'></template>
44
+ </data-grid>
45
+ </criteria-paged>
46
+ </div>
47
+ </template>
48
+
49
+ <script>
50
+ import { PagedList } from 'vue-client'
51
+
52
+ export default {
53
+ data () {
54
+ return {
55
+ model: new PagedList('rs/sql/address_getusegasarealist',20), userid: this.$login.f.id,
56
+ source:`tool.getFullTree(this.getRights().where(row.getType() == $organization$))`,
57
+ }
58
+ },
59
+ title: '用气区域列表',
60
+ props:{
61
+ },
62
+ ready(){
63
+
64
+ },
65
+ methods: {
66
+ //添加方法
67
+ add(val){
68
+ this.$refs.paged.$refs.grid.selectStore.selected = null
69
+ this.$dispatch('add',val)
70
+ },
71
+ //修改
72
+ modify(val){
73
+ this.$refs.paged.$refs.grid.selectStore.selected = null
74
+ this.$dispatch('modify',val)
75
+ },
76
+ async delete(row){
77
+ if(row.id){
78
+ var id = row.id
79
+ let useraredss = await this.$resetpost('rs/sql/address_singleTable',
80
+ {data: {
81
+ items: 'f_usegas_area_id',
82
+ tablename: 't_user_address',
83
+ condition: `f_usegas_area_id='${id}'`}
84
+ },
85
+ {resolveMsg: null, rejectMsg: null})
86
+ if(useraredss.data.length>0){
87
+ ` this.$showAlert('该用气区域下已有地址信息,无法删除!','warning',1000)
88
+ ` }else{
89
+ this.$resetdelete('rs/entity/t_usegas_area', {id: id}, {resolveMsg: '删除成功', rejectMsg: '删除失败'}).then((res) => {
90
+ this.$dispatch('cancel')
91
+ })
92
+ }
93
+ }
94
+ },
95
+ search (args) {
96
+ this.model.search(args.condition, args.model)
97
+ },
98
+ //清空
99
+ clear(){
100
+ this.$refs.paged.$refs.cri.model = {}
101
+ },
102
+ },
103
+ watch:{
104
+
105
+ },
106
+ events: {
107
+ }
108
+
109
+ }
110
+ </script>