system-clients 3.2.4 → 3.2.6

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/.eslintrc.js +16 -16
  2. package/SystemClient.iml +2 -5
  3. package/build/webpack.base.conf.js +21 -11
  4. package/package.json +6 -4
  5. package/src/App.vue +24 -24
  6. package/src/components/Main.vue +626 -476
  7. package/src/components/TabButton.vue +201 -0
  8. package/src/components/Tabs.vue +67 -0
  9. package/src/components/addressManage/AddressCascadingMenu.vue +145 -0
  10. package/src/components/equipment/EquipmentManage.vue +1 -1
  11. package/src/components/equipment/PcAdd.vue +5 -5
  12. package/src/components/equipment/PcList.vue +5 -5
  13. package/src/components/equipment/PhoneAdd.vue +26 -13
  14. package/src/components/equipment/PhoneList.vue +31 -21
  15. package/src/components/equipment/PosAdd.vue +231 -45
  16. package/src/components/equipment/PosList.vue +198 -68
  17. package/src/components/equipment/PosManage.vue +80 -9
  18. package/src/components/equipment/PosManageBoth.vue +125 -0
  19. package/src/components/equipment/PosParamAdd.vue +236 -0
  20. package/src/components/equipment/PosParamList.vue +121 -0
  21. package/src/components/equipment/PosParamManage.vue +51 -0
  22. package/src/components/parammanage/ParamManage.vue +2 -2
  23. package/src/components/parammanage/ParamPage.vue +30 -8
  24. package/src/components/parammanage/SinglePage.vue +4 -4
  25. package/src/components/server/ImageVieweTest.vue +56 -0
  26. package/src/components/server/ImageViewer.vue +350 -0
  27. package/src/components/server/LoadData.vue +21 -2
  28. package/src/components/server/Login.vue +889 -625
  29. package/src/components/server/ModifyPw.vue +12 -7
  30. package/src/components/server/PcdBuildingSelect.vue +241 -0
  31. package/src/components/server/ResSelect.vue +5 -0
  32. package/src/components/server/ResSelectGroup.vue +159 -103
  33. package/src/components/server/RightTree.vue +289 -204
  34. package/src/filiale/dongguan/Main.vue +715 -0
  35. package/src/filiale/dongguan/system.js +5 -0
  36. package/src/filiale/konggang/Login.vue +840 -0
  37. package/src/filiale/konggang/system.js +7 -0
  38. package/src/filiale/qianneng/ModifyPw.vue +107 -0
  39. package/src/filiale/qianneng/system.js +7 -0
  40. package/src/filiale/rizhao/LeftTree.vue +111 -0
  41. package/src/filiale/rizhao/Login.vue +791 -0
  42. package/src/filiale/rizhao/Main.vue +606 -0
  43. package/src/filiale/rizhao/system.js +14 -0
  44. package/src/filiale/yuchuan/Login.vue +889 -0
  45. package/src/filiale/yuchuan/Main.vue +773 -0
  46. package/src/filiale/yuchuan/system.js +10 -0
  47. package/src/plugins/EncryptUtil.js +53 -0
  48. package/src/plugins/GetLoginInfoService.js +76 -70
  49. package/src/plugins/HeatGetLoginInfoService.js +491 -0
  50. package/src/plugins/validation.js +9 -1
  51. package/src/stores/HeatAppData.js +38 -0
  52. package/src/styles/fonts/PINGFANG LIGHT.TTF +0 -0
  53. package/src/styles/fonts/PingFangSC-Regular.ttf +0 -0
  54. package/src/styles/fonts/glyphicons-halflings-regular.eot +0 -0
  55. package/src/styles/fonts/glyphicons-halflings-regular.svg +288 -0
  56. package/src/styles/fonts/glyphicons-halflings-regular.ttf +0 -0
  57. package/src/styles/fonts/glyphicons-halflings-regular.woff +0 -0
  58. package/src/styles/fonts/glyphicons-halflings-regular.woff2 +0 -0
  59. package/src/styles/fonts/pingfang-bold.ttf +0 -0
  60. package/src/styles/fonts/pingfang-medium.ttf +0 -0
  61. package/src/styles/fonts/pingfang-regular.ttf +0 -0
  62. package/src/styles/fonts/trendstrends.ttf +0 -0
  63. package/src/styles/fonts//346/261/211/344/273/252/350/217/261/345/277/203/344/275/223/347/256/200.ttf +0 -0
  64. package/src/styles/less/.csscomb.json +304 -0
  65. package/src/styles/less/.csslintrc +19 -0
  66. package/src/styles/less/alerts.less +73 -0
  67. package/src/styles/less/aofeng/animate.min.css +11 -0
  68. package/src/styles/less/aofeng/expandcss.less +569 -0
  69. package/src/styles/less/aofeng/standard.less +2507 -0
  70. package/src/styles/less/aofeng/themeOne/BinaryTemplate.less +686 -0
  71. package/src/styles/less/aofeng/themeOne/loginStyle.less +1586 -0
  72. package/src/styles/less/aofeng/themeOne/systemStyle.less +2650 -0
  73. package/src/styles/less/aofeng/themeOne.less +17 -0
  74. package/src/styles/less/aofeng/themeTwo/newStyle1.less +415 -0
  75. package/src/styles/less/aofeng/themeTwo.less +3 -0
  76. package/src/styles/less/badges.less +66 -0
  77. package/src/styles/less/bootstrap.less +66 -0
  78. package/src/styles/less/breadcrumbs.less +26 -0
  79. package/src/styles/less/button-groups.less +247 -0
  80. package/src/styles/less/buttons.less +172 -0
  81. package/src/styles/less/carousel.less +269 -0
  82. package/src/styles/less/close.less +34 -0
  83. package/src/styles/less/code.less +69 -0
  84. package/src/styles/less/component-animations.less +33 -0
  85. package/src/styles/less/dropdowns.less +216 -0
  86. package/src/styles/less/fonts-list.less +25 -0
  87. package/src/styles/less/forms.less +626 -0
  88. package/src/styles/less/glyphicons.less +305 -0
  89. package/src/styles/less/grid.less +84 -0
  90. package/src/styles/less/input-groups.less +167 -0
  91. package/src/styles/less/jumbotron.less +52 -0
  92. package/src/styles/less/labels.less +64 -0
  93. package/src/styles/less/list-group.less +141 -0
  94. package/src/styles/less/manageStyle/manageChile.less +180 -0
  95. package/src/styles/less/manageStyle/manageStyle/manageChile.less +180 -0
  96. package/src/styles/less/manageStyle/manageStyle/manageStyle.less +1102 -0
  97. package/src/styles/less/manageStyle/manageStyle/safeStyle.less +498 -0
  98. package/src/styles/less/manageStyle/manageStyle.less +1102 -0
  99. package/src/styles/less/manageStyle/safeStyle.less +498 -0
  100. package/src/styles/less/media.less +66 -0
  101. package/src/styles/less/mixins/alerts.less +14 -0
  102. package/src/styles/less/mixins/background-variant.less +9 -0
  103. package/src/styles/less/mixins/border-radius.less +18 -0
  104. package/src/styles/less/mixins/buttons.less +69 -0
  105. package/src/styles/less/mixins/center-block.less +7 -0
  106. package/src/styles/less/mixins/clearfix.less +22 -0
  107. package/src/styles/less/mixins/forms.less +90 -0
  108. package/src/styles/less/mixins/gradients.less +59 -0
  109. package/src/styles/less/mixins/grid-framework.less +92 -0
  110. package/src/styles/less/mixins/grid.less +122 -0
  111. package/src/styles/less/mixins/hide-text.less +21 -0
  112. package/src/styles/less/mixins/image.less +33 -0
  113. package/src/styles/less/mixins/labels.less +12 -0
  114. package/src/styles/less/mixins/list-group.less +30 -0
  115. package/src/styles/less/mixins/nav-divider.less +10 -0
  116. package/src/styles/less/mixins/nav-vertical-align.less +9 -0
  117. package/src/styles/less/mixins/opacity.less +8 -0
  118. package/src/styles/less/mixins/pagination.less +24 -0
  119. package/src/styles/less/mixins/panels.less +24 -0
  120. package/src/styles/less/mixins/progress-bar.less +10 -0
  121. package/src/styles/less/mixins/reset-filter.less +8 -0
  122. package/src/styles/less/mixins/reset-text.less +18 -0
  123. package/src/styles/less/mixins/resize.less +6 -0
  124. package/src/styles/less/mixins/responsive-visibility.less +15 -0
  125. package/src/styles/less/mixins/size.less +10 -0
  126. package/src/styles/less/mixins/tab-focus.less +9 -0
  127. package/src/styles/less/mixins/table-row.less +44 -0
  128. package/src/styles/less/mixins/text-emphasis.less +9 -0
  129. package/src/styles/less/mixins/text-overflow.less +8 -0
  130. package/src/styles/less/mixins/vendor-prefixes.less +227 -0
  131. package/src/styles/less/mixins.less +40 -0
  132. package/src/styles/less/modals.less +151 -0
  133. package/src/styles/less/navbar.less +660 -0
  134. package/src/styles/less/navs.less +285 -0
  135. package/src/styles/less/normalize.less +424 -0
  136. package/src/styles/less/pager.less +76 -0
  137. package/src/styles/less/pagination.less +89 -0
  138. package/src/styles/less/panels.less +275 -0
  139. package/src/styles/less/popovers.less +131 -0
  140. package/src/styles/less/print.less +101 -0
  141. package/src/styles/less/progress-bars.less +87 -0
  142. package/src/styles/less/responsive-embed.less +35 -0
  143. package/src/styles/less/responsive-utilities.less +194 -0
  144. package/src/styles/less/scaffolding.less +161 -0
  145. package/src/styles/less/stand.less +207 -0
  146. package/src/styles/less/tables.less +312 -0
  147. package/src/styles/less/theme.less +291 -0
  148. package/src/styles/less/thumbnails.less +36 -0
  149. package/src/styles/less/tooltip.less +102 -0
  150. package/src/styles/less/type.less +316 -0
  151. package/src/styles/less/utilities.less +55 -0
  152. package/src/styles/less/variables.less +899 -0
  153. package/src/styles/less/wells.less +29 -0
  154. package/src/system.js +34 -1
  155. package/src/util/Daiban.json +12 -0
  156. package/static/images/lefticon//345/220/210/345/220/214/347/256/241/347/220/206.png +0 -0
  157. package/static/logo.png +0 -0
  158. package/static/newStyle/about-us.png +0 -0
  159. package/static/rizhao.png +0 -0
  160. package/yarn-error.log +6896 -0
  161. package/.gradle/3.5/file-changes/last-build.bin +0 -0
  162. package/.gradle/3.5/taskHistory/taskHistory.lock +0 -0
  163. package/.gradle/3.5.1/file-changes/last-build.bin +0 -0
  164. package/.gradle/3.5.1/taskHistory/taskHistory.lock +0 -0
  165. package/.gradle/buildOutputCleanup/built.bin +0 -0
  166. package/.gradle/buildOutputCleanup/cache.properties +0 -2
  167. package/.gradle/buildOutputCleanup/cache.properties.lock +0 -1
@@ -18,14 +18,15 @@
18
18
  </div>
19
19
  </div>
20
20
  <div class="has-feedback form-group"
21
- :class="{'has-warning':$v.newpassword.required,'has-error':$v.newpassword.strongpassword && !($v.newpassword.required),
22
- 'has-success': !$v.newpassword.required && !$v.newpassword.strongpassword }">
21
+ :class="{'has-warning':$v.newpassword.required,'has-error':($v.newpassword.numbersAndLetter8to16 || $v.newpassword.minlength)&& !$v.newpassword.required && !$v.newpassword.chinesePassword,
22
+ 'has-success': !$v.newpassword.required && !$v.newpassword.numbersAndLetter8to16&&!$v.newpassword.minlength && !$v.newpassword.chinesePassword}">
23
23
  <label for="newpassword" class="col-sm-4 col-sm-offset-1 control-label">新的密码:&nbsp;&nbsp;</label>
24
24
  <div class="col-sm-4">
25
- <input type="password" v-model="deliver.newpassword" class="form-control" id="newpassword" v-validate:newpassword='{required:true, strongpassword: true}'>
26
- <span class="glyphicon glyphicon-ok form-control-feedback" v-if="!$v.newpassword.required && !($v.newpassword.strongpassword && !($v.newpassword.required))"></span>
25
+ <input type="password" v-model="deliver.newpassword" class="form-control" id="newpassword" v-validate:newpassword='{required:true, numbersAndLetter8to16: true, minlength: 6,chinesePassword: true}'>
26
+ <span class="glyphicon glyphicon-ok form-control-feedback" v-if="!$v.newpassword.required && !$v.newpassword.minlength && !($v.newpassword.numbersAndLetter8to16 && !($v.newpassword.required)) && !($v.newpassword.chinesePassword) "></span>
27
27
  <span v-if="$v.newpassword.required">不能为空</span>
28
- <span v-if="$v.newpassword.strongpassword && !($v.newpassword.required)">密码必须包含英文大小写、阿拉伯数字、字符</span>
28
+ <span v-if="($v.newpassword.numbersAndLetter8to16||$v.newpassword.minlength) && !($v.newpassword.required&&$v.newpassword.minlength)">密码必须是8~16位数字与字母组合</span>
29
+ <span v-if="$v.newpassword.chinesePassword">密码不能包含中文</span>
29
30
  </div>
30
31
  </div>
31
32
  <div class="has-feedback form-group"
@@ -61,13 +62,17 @@
61
62
  // let res = yield self.$post('rs/db/modifypassword', {data: self.deliver})
62
63
  // let res = yield self.$resetpost('/rs/db/modifypwd', {data: self.deliver})
63
64
  // Util.f.password = self.deliver.newpassword
64
- let res = yield self.$resetpost('/rs/user/modifypwd', {data: self.deliver })
65
+ let res = yield self.$resetpost('/rs/user/modifypwd', {data: self.deliver }, {resolveMsg: null,rejectMsg: null})
65
66
  self.$login.f.password = self.deliver.newpassword
66
- if (res.data) {
67
+ console.log(res.data)
68
+ if (res.data == true) {
69
+ self.$showAlert('修改成功!', 'success', 2000)
67
70
  self.deliver.password = ''
68
71
  self.deliver.newpassword = ''
69
72
  self.deliver.affirmpassword = ''
70
73
  self.show = false
74
+ } else {
75
+ self.$showMessage(res.data)
71
76
  }
72
77
  }
73
78
  export default {
@@ -0,0 +1,241 @@
1
+ <template>
2
+ <div :class="style" v-show="show.pcdShow">
3
+ <label class="font_normal_body">省&nbsp;市&nbsp;区&nbsp;</label>
4
+ <v-select :value.sync="model.f_pcd"
5
+ class="select_list select"
6
+ enter-push
7
+ v-model="model.f_pcd"
8
+ style="width: 60%"
9
+ :multiple="mul"
10
+ @change="pcdChange"
11
+ :options='arrays.pcd' placeholder='选择省市区'
12
+ close-on-select v-el:cc>
13
+ </v-select>
14
+ </div>
15
+ <div :class="style" v-show="show.streetShow">
16
+ <label class="font_normal_body">街&emsp;&emsp;道</label>
17
+ <v-select :value.sync="model.f_street"
18
+ class="select_list select"
19
+ enter-push
20
+ v-model="model.f_street"
21
+ @change="streetChange"
22
+ style="width: 60%"
23
+ :multiple="mul"
24
+ :options='arrays.street' placeholder='选择街道'
25
+ close-on-select v-el:cc>
26
+ </v-select>
27
+ </div>
28
+ <div :class="style" v-show="show.areaShow">
29
+ <label class="font_normal_body">小&ensp;&ensp;&ensp;&ensp;区</label>
30
+ <v-select :value.sync="model.f_residential_area"
31
+ class="select_list select"
32
+ enter-push
33
+ v-model="model.f_residential_area"
34
+ style="width: 60%"
35
+ :multiple="mul"
36
+ @change="areaChange()"
37
+ :options='arrays.area' placeholder='选择小区'
38
+ close-on-select v-el:cc>
39
+ </v-select>
40
+ </div>
41
+ <div :class="style" v-show="show.buildingShow">
42
+ <label class="font_normal_body">楼&emsp;&emsp;栋</label>
43
+ <v-select :value.sync="model.f_building"
44
+ class="select_list select"
45
+ enter-push
46
+ v-model="model.f_building"
47
+ style="width: 60%"
48
+ :multiple="mul"
49
+ :options='arrays.building' placeholder='选择楼栋'
50
+ close-on-select v-el:cc>
51
+ </v-select>
52
+ </div>
53
+ </template>
54
+ <script>
55
+ import plugin from '../../plugins/GetLoginInfoService'
56
+ import { HttpResetClass } from 'vue-client'
57
+ let readyGen = async function (self) {
58
+ self.showComponent.find((item)=>{
59
+ switch(item){
60
+ case 'pcd': self.show.pcdShow=true; break;
61
+ case 'street': self.show.streetShow=true; break;
62
+ case 'area': self.show.areaShow=true; break;
63
+ case 'building': self.show.buildingShow=true; break;
64
+ }
65
+ })
66
+ self.arrays.pcd=[{label:'全部',value:''}]
67
+ if(self.show.pcdShow){
68
+ let HttpReset = new HttpResetClass()
69
+ var pcd = await HttpReset.load('POST', 'rs/sql/singleTable_OrderBy', {
70
+ data: {
71
+ items: 'f_pcd',
72
+ tablename: 't_pcd',
73
+ condition: `f_pcd is not null group by f_pcd`,
74
+ orderitem: 'f_pcd'
75
+ }
76
+ }, {resolveMsg: null, rejectMsg: '获取省市区出错!'})
77
+ for(var i=0;i<pcd.data.length;i++){
78
+ self.arrays.pcd.push({label:pcd.data[i].f_pcd,value:pcd.data[i].f_pcd})
79
+ }
80
+ }else if(self.show.streetShow){
81
+ console.log("------------查街道")
82
+ let HttpReset = new HttpResetClass()
83
+ var street = await HttpReset.load('POST', 'rs/sql/singleTable_OrderBy', {
84
+ data: {
85
+ items: 'f_street',
86
+ tablename: 't_street',
87
+ condition: `f_filialeid = '${self.$login.f.orgid}' and f_street is not null group by f_street`,
88
+ orderitem: 'f_street'
89
+ }
90
+ }, {resolveMsg: null, rejectMsg: '获取街道出错!'})
91
+ for(var i=0;i<street.data.length;i++){
92
+ self.arrays.street.push({label:street.data[i].f_street,value:street.data[i].f_street})
93
+ }
94
+ }else if(self.show.areaShow){
95
+ let HttpReset = new HttpResetClass()
96
+ var area = await HttpReset.load('POST', 'rs/sql/singleTable_OrderBy', {
97
+ data: {
98
+ items: 'f_residential_area',
99
+ tablename: 't_area',
100
+ condition: `f_filialeid = '${self.$login.f.orgid}' and f_residential_area is not null group by f_residential_area`,
101
+ orderitem: 'f_residential_area'
102
+ }
103
+ }, {resolveMsg: null, rejectMsg: '获取小区出错!'})
104
+ for(var i=0;i<area.data.length;i++){
105
+ self.arrays.area.push({label:area.data[i].f_residential_area,value:area.data[i].f_residential_area})
106
+ }
107
+ }
108
+
109
+
110
+ }
111
+ export default {
112
+ title: '省市区级联选择',
113
+ props: {
114
+ style: {
115
+ type: String,
116
+ default: 'col-sm-2 form-group'
117
+ },
118
+ mul: {
119
+ type: Boolean,
120
+ default: false
121
+ },
122
+ showComponent:{
123
+ default:['pcd','street','area','building']
124
+ }
125
+
126
+ },
127
+ data () {
128
+ return {
129
+ condition:'',
130
+ show:{
131
+ pcdShow:false,
132
+ streetShow:false,
133
+ areaShow:false,
134
+ buildingShow:false
135
+ },
136
+ arrays:{
137
+ pcd:[{label: '全部', value: ''}],
138
+ street:[{label: '全部', value: ''}],
139
+ area:[{label: '全部', value: ''}],
140
+ building:[{label: '全部', value: ''}]
141
+ },
142
+ model:{
143
+ f_pcd:[],
144
+ f_street:[],
145
+ f_residential_area:[],
146
+ f_building:[]
147
+ }
148
+
149
+ }
150
+ },
151
+ ready () {
152
+ readyGen(this)
153
+ },
154
+ methods:{
155
+ async pcdChange(){
156
+ this.arrays.street=[{label:'全部',value:''}]
157
+ var condition = `f_filialeid = '${this.$login.f.orgid}' and f_street is not null group by f_street`
158
+ let street = await this.$resetpost('rs/sql/singleTable_OrderBy', {
159
+ data: {
160
+ items: 'f_street',
161
+ tablename: 't_street',
162
+ condition: condition,
163
+ orderitem: 'f_street'
164
+ }
165
+ }, {resolveMsg: null, rejectMsg: '获取街道出错'})
166
+ for(var i=0;i<street.data.length;i++){
167
+ this.arrays.street.push({label:street.data[i].f_street,value:street.data[i].f_street})
168
+ }
169
+ this.returnCondition()
170
+ },
171
+ async streetChange(){
172
+ this.arrays.area=[{label:'全部',value:''}]
173
+ var condition = `f_street = '${this.model.f_street?this.model.f_street:null}' and f_residential_area is not null group by f_residential_area`
174
+ let area = await this.$resetpost('rs/sql/singleTable_OrderBy', {
175
+ data: {
176
+ items: 'f_residential_area',
177
+ tablename: 't_area',
178
+ condition: condition,
179
+ orderitem: 'f_residential_area'
180
+ }
181
+ }, {resolveMsg: null, rejectMsg: '获取小区出错'})
182
+ for(var i=0;i<area.data.length;i++){
183
+ this.arrays.area.push({label:area.data[i].f_residential_area,value:area.data[i].f_residential_area})
184
+ }
185
+ this.returnCondition()
186
+ },
187
+ async areaChange(){
188
+ this.building = [{label:'全部',value:''}]
189
+ var condition=''
190
+ if(this.show.areaShow){
191
+ condition = `f_residential_area = '${this.model.f_residential_area?this.model.f_residential_area:null}' and f_building is not null group by f_building`
192
+ }else{
193
+ condition = `f_filialeid = '${this.$login.f.orgid}' and f_building is not null group by f_building`
194
+ }
195
+ let build = await this.$resetpost('rs/sql/singleTable_OrderBy', {
196
+ data: {
197
+ items: 'f_building',
198
+ tablename: 't_user_address',
199
+ condition: condition,
200
+ orderitem: 'f_building'
201
+ }
202
+ }, {resolveMsg: null, rejectMsg: '获取楼栋出错'})
203
+ for(var i=0;i<build.data.length;i++){
204
+ this.arrays.building.push({label:build.data[i].f_building,value:build.data[i].f_building})
205
+ }
206
+ this.returnCondition()
207
+ },
208
+
209
+ returnCondition(){
210
+ this.condition=''
211
+ if(this.model.f_pcd){
212
+ if(this.model.f_pcd.length>0){
213
+ this.condition+=` and f_pcd = '${this.model.f_pcd[0]}'`
214
+ }
215
+ }
216
+ if(this.model.f_street) {
217
+ if (this.model.f_street.length > 0) {
218
+ this.condition += ` and f_street = '${this.model.f_street[0]}'`
219
+ }
220
+ }
221
+ if(this.model.f_area) {
222
+ if (this.model.f_area.length > 0) {
223
+ this.condition += ` and f_area = '${this.model.f_area[0]}'`
224
+ }
225
+ }
226
+ if(this.model.f_building) {
227
+ if (this.model.f_building.length > 0) {
228
+ this.condition += ` and f_building = '${this.model.f_building[0]}'`
229
+ }
230
+ }
231
+ // this.$parent.setCon(this.condition)
232
+ this.$dispatch('setcon',this.condition)
233
+ }
234
+ },
235
+ watch: {
236
+ // 'condition'(val){
237
+ //
238
+ // }
239
+ }
240
+ }
241
+ </script>
@@ -3,6 +3,7 @@
3
3
  :value.sync="selectres"
4
4
  :multiple="isMul"
5
5
  search="true"
6
+ :disabled="mustselect"
6
7
  :close-on-select="!isMul"
7
8
  @change="resChange"
8
9
  >
@@ -33,6 +34,10 @@
33
34
  type: Array,
34
35
  default() { return [] },
35
36
  },
37
+ mustselect: {
38
+ type: Boolean,
39
+ default: false
40
+ },
36
41
  },
37
42
  data () {
38
43
  return {
@@ -1,28 +1,41 @@
1
1
  <template>
2
- <div :class="style">
2
+ <div :class="style" v-show="companyshow">
3
3
  <label class="font_normal_body">公&emsp;&emsp;司</label>
4
4
  <right-tree @re-res="getorg"
5
+ :mustselect="mustselect"
5
6
  :initresid='initres.org'></right-tree>
6
7
  </div>
7
- <div :class="style">
8
+ <div :class="style" v-show="departmentshow">
8
9
  <label class="font_normal_body">部&emsp;&emsp;门</label>
9
- <res-select restype='department'
10
+ <res-select restype='department' v-ref:department
10
11
  @res-select="getdep"
11
12
  :parentresid="depresid"
12
13
  :initresid='initres.dep'
14
+ :mustselect="mustselect"
13
15
  :is-mul="mul">
14
16
  </res-select>
15
17
  </div>
16
- <div :class="style">
18
+ <div :class="style" v-show="operatorshow && (!cascade)">
17
19
  <label class="font_normal_body">人&emsp;&emsp;员</label>
18
20
  <res-select restype='user'
19
21
  @res-select="getuser"
20
22
  :parentresid="depresid"
21
23
  :initresid='initres.user'
24
+ :mustselect="mustselect"
22
25
  :is-mul="mul">
23
26
  </res-select>
24
27
  </div>
25
- <div :class="style " >
28
+ <div :class="style" v-show="operatorshow && cascade">
29
+ <label class="font_normal_body">人&emsp;&emsp;员</label>
30
+ <res-select restype='user'
31
+ @res-select="getuser"
32
+ :parentresid="userresid"
33
+ :initresid='initres.user'
34
+ :mustselect="mustselect"
35
+ :is-mul="mul">
36
+ </res-select>
37
+ </div>
38
+ <div :class="style " v-if="sliceareashow" >
26
39
  <label class="font_normal_body">片&emsp;&emsp;区</label>
27
40
  <v-select :value.sync="slice_area" v-model="slice_area" @change='getarea'
28
41
  :options='sliceArea' placeholder='片区/管理站' filer-key="name"
@@ -31,112 +44,155 @@
31
44
  </div>
32
45
  </template>
33
46
  <script>
34
- import plugin from '../../plugins/GetLoginInfoService'
35
- import { HttpResetClass } from 'vue-client'
36
- export default {
37
- title: '资源选择测试',
38
- props: {
39
- style: {
40
- type: String,
41
- default: 'col-sm-2'
42
- },
43
- mul: {
44
- type: Boolean,
45
- default: true
46
- },
47
- //初始值
48
- initres: {
49
- type: Object,
50
- default: null,
51
- },
47
+ import plugin from '../../plugins/GetLoginInfoService'
48
+ import { HttpResetClass } from 'vue-client'
49
+ export default {
50
+ title: '资源选择测试',
51
+ props: {
52
+ style: {
53
+ type: String,
54
+ default: 'col-sm-2 form-group'
52
55
  },
53
- data () {
54
- return {
55
- orgresid:[this.$login.f.orgid],
56
- depresid:[],
57
- userresid:[],
58
- sliceArea: [],
59
- slice_area:[],
60
-
61
- obj:{
62
- orgnames:[],
63
- depnames:[],
64
- operatornames:[]
65
- }
66
- }
56
+ mul: {
57
+ type: Boolean,
58
+ default: true
67
59
  },
68
- ready () {
69
- console.log('开始获取组织结构。。。')
70
- this.initAreas(this.$login.f.orgid)
60
+ //初始值
61
+ initres: {
62
+ type: Object,
63
+ default: null,
71
64
  },
72
- methods:{
73
-
74
- // 初始化片区
75
- async initAreas (val) {
76
- if (val) {
77
- let http = new HttpResetClass()
78
- let getAllArea = await http.load('POST', '/rs/search', {
79
- source: 'this.getParentByType($organization$).getAllChildrens().where(row.getType() == $zone$)',
80
- userid: this.$login.f.id
81
- }, {resolveMsg: null, rejectMsg: '获取片区出错!!!'})
82
- let arr = getAllArea.data.filter((res) => {
83
- return res.parentid == val
84
- })
85
- console.log('过滤之后的片区', arr)
86
- this.sliceArea = []
87
- arr.forEach((res) => {
88
- this.sliceArea.push({label: res.name, value: {name: res.name, code:res.number}})
89
- })
65
+ showComponent:{
66
+ default:['company','department','operator','slicearea']
67
+ },
68
+ //人员是否和部门关联
69
+ cascade: {
70
+ type: Boolean,
71
+ default: true
72
+ },
73
+ selectin: {
74
+ type: Boolean,
75
+ default: false
76
+ }
77
+ },
78
+ data () {
79
+ return {
80
+ orgresid:[this.$login.f.orgid],
81
+ depresid:[],
82
+ userresid:[],
83
+ operatorsid: [],
84
+ sliceArea: [],
85
+ slice_area:[],
86
+ companyshow:false,
87
+ departmentshow:false,
88
+ operatorshow:false,
89
+ sliceareashow:false,
90
+ mustselect:false,
91
+ obj:{
92
+ orgnames:[],
93
+ depnames:[],
94
+ operatornames:[]
95
+ }
96
+ }
97
+ },
98
+ ready () {
99
+ if(this.$login.r.includes('部门默认选中')&& this.selectin){
100
+ this.initres.dep = [this.$login.f.depids]
101
+ }
102
+ if(this.$login.r.includes('人员默认选中')&& this.selectin){
103
+ this.initres.user = [this.$login.f.id]
104
+ if(this.$login.r.includes('人员强制选中')){
105
+ this.mustselect = true
106
+ }
107
+ }
108
+ this.initComponent();
109
+ this.initAreas(this.$login.f.orgid)
110
+ },
111
+ methods:{
112
+ initComponent(){
113
+ let self=this;
114
+ this.showComponent.find((item)=>{
115
+ switch(item){
116
+ case 'company': self.companyshow=true; break;
117
+ case 'department': self.departmentshow=true; break;
118
+ case 'operator': self.operatorshow=true; break;
119
+ case 'slicearea': self.sliceareashow=true; break;
90
120
  }
91
- },
92
- returnOrg(ids){
121
+ })
122
+ },
123
+ // 初始化片区
124
+ async initAreas (val) {
125
+ if (val) {
126
+ let http = new HttpResetClass()
127
+ let getAllArea = await http.load('POST', '/rs/search', {
128
+ source: 'this.getParentByType($organization$).getAllChildrens().where(row.getType() == $zone$)',
129
+ userid: this.$login.f.id
130
+ }, {resolveMsg: null, rejectMsg: '获取片区出错!!!'})
131
+ let arr = getAllArea.data.filter((res) => {
132
+ return res.parentid == val
133
+ })
134
+ this.sliceArea = []
135
+ this.slice_area = []
136
+ arr.forEach((res) => {
137
+ this.sliceArea.push({label: res.name, value: {name: res.name, code:res.number}})
138
+ })
139
+ }
140
+ },
141
+ returnOrg(ids){
142
+ let limit = this.$login.r.includes('数据授权限定')
93
143
 
94
- let condition;
95
- if(this.depresid.length > 0)
96
- condition = " and f_orgid in " + plugin.convertToIn(this.depresid);
97
- else
98
- condition = " and f_orgid = " + this.$login.f.orgid;
99
- if(this.userresid.length > 0){
100
- condition += " and f_depid in " + plugin.convertToIn(this.userresid);
101
- }
102
- if(ids && ids.length > 0){
103
- condition += " and f_operatorid in " + plugin.convertToIn(ids);
104
- }
105
- if(this.slice_area.length>0){
106
- condition += " and f_zones = '" + this.slice_area[0].name+"'"
107
- }
108
- this.$dispatch('re-res',condition,this.obj)
109
- },
110
- getorg (obj) {
111
- console.log("选中公司的数据11",obj.resids)
112
- this.depresid=obj.resids
113
- this.obj.orgnames = obj.res
114
- this.initAreas(obj.resids)
115
- this.returnOrg();
116
- },
117
- getdep(obj,val) {
118
- console.log("选中部门的数据22",obj)
119
- this.obj.depnames = val
120
- this.userresid=obj
121
- this.returnOrg();
122
- },
123
- getuser(obj) {
124
- this.obj.operatornames = obj
125
- console.log("选中用户的数据33",obj)
126
- this.returnOrg(obj);
127
- },
128
- getarea(val) {
129
- this.slice_area=val
130
- console.log("选中的大区",val)
131
- if(this.obj.operatornames){
132
- this.returnOrg(this.obj.operatornames);
133
- }else{
134
- this.returnOrg();
144
+ let condition;
145
+ if(this.depresid.length > 0)
146
+ condition = " and f_orgid in " + plugin.convertToIn(this.depresid);
147
+ else
148
+ condition = " and f_orgid = " + this.$login.f.orgid;
149
+ if(this.userresid.length > 0){
150
+ condition += " and f_depid in " + plugin.convertToIn(this.userresid);
151
+ } else {
152
+ if (limit) {
153
+ let depids = []
154
+ for (let row of this.$refs.department.resoptions) {
155
+ depids.push(row.value)
156
+ }
157
+ let depid = depids.length ? plugin.convertToIn(depids) : ('')
158
+ condition += " and f_depid in " + depid;
135
159
  }
136
160
  }
161
+ if(ids && ids.length > 0){
162
+ condition += " and f_operatorid in " + plugin.convertToIn(ids);
163
+ }
164
+ if(this.slice_area.length>0){
165
+ condition += " and f_zones = '" + this.slice_area[0].name+"'"
166
+ }
167
+ this.$dispatch('re-res',condition,this.obj)
137
168
  },
138
- watch: {
139
-
169
+ getorg (obj) {
170
+ this.depresid=obj.resids
171
+ this.obj.orgnames = obj.res
172
+ this.initAreas(obj.resids)
173
+ this.returnOrg();
174
+ },
175
+ getdep(obj,val) {
176
+ this.obj.depnames = val
177
+ this.userresid=obj
178
+ this.returnOrg();
179
+ },
180
+ getuser(obj,val) {
181
+ this.obj.operatornames = val
182
+ this.operatorsid = obj
183
+ this.returnOrg(obj);
184
+ },
185
+ getarea(val) {
186
+ this.slice_area=val
187
+ if(this.operatorsid){
188
+ this.returnOrg(this.operatorsid);
189
+ }else{
190
+ this.returnOrg();
191
+ }
140
192
  }
193
+ },
194
+ watch: {
195
+
141
196
  }
197
+ }
142
198
  </script>