system-clients 3.2.6 → 3.2.7-aodeToV4

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 (98) hide show
  1. package/.eslintrc.js +16 -16
  2. package/.gradle/3.5/file-changes/last-build.bin +0 -0
  3. package/.gradle/3.5/taskHistory/taskHistory.lock +0 -0
  4. package/.gradle/7.1/dependencies-accessors/dependencies-accessors.lock +0 -0
  5. package/.gradle/7.1/dependencies-accessors/gc.properties +0 -0
  6. package/.gradle/7.1/executionHistory/executionHistory.bin +0 -0
  7. package/.gradle/7.1/executionHistory/executionHistory.lock +0 -0
  8. package/.gradle/7.1/fileChanges/last-build.bin +0 -0
  9. package/.gradle/7.1/fileHashes/fileHashes.bin +0 -0
  10. package/.gradle/7.1/fileHashes/fileHashes.lock +0 -0
  11. package/.gradle/7.1/gc.properties +0 -0
  12. package/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
  13. package/.gradle/buildOutputCleanup/cache.properties +2 -0
  14. package/.gradle/buildOutputCleanup/outputFiles.bin +0 -0
  15. package/.gradle/checksums/checksums.lock +0 -0
  16. package/.gradle/vcs-1/gc.properties +0 -0
  17. package/SystemClient.iml +5 -2
  18. package/build/webpack.base.conf.js +10 -17
  19. package/gradle/wrapper/gradle-wrapper.jar +0 -0
  20. package/gradle/wrapper/gradle-wrapper.properties +5 -0
  21. package/gradlew +185 -0
  22. package/gradlew.bat +89 -0
  23. package/package.json +102 -104
  24. package/src/App.vue +24 -24
  25. package/src/components/Main.vue +430 -686
  26. package/src/components/equipment/EquipmentManage.vue +4 -4
  27. package/src/components/equipment/PcAdd.vue +6 -6
  28. package/src/components/equipment/PcList.vue +9 -8
  29. package/src/components/equipment/PhoneAdd.vue +14 -27
  30. package/src/components/equipment/PhoneList.vue +23 -33
  31. package/src/components/equipment/PosAdd.vue +65 -232
  32. package/src/components/equipment/PosList.vue +71 -201
  33. package/src/components/equipment/PosManage.vue +10 -80
  34. package/src/components/materialManage/materialList.vue +1 -1
  35. package/src/components/parammanage/ParamManage.vue +2 -2
  36. package/src/components/parammanage/ParamPage.vue +14 -36
  37. package/src/components/parammanage/ParamPages.vue +5 -5
  38. package/src/components/parammanage/SinglePage.vue +7 -7
  39. package/src/components/parammanage/SinglePages.vue +3 -3
  40. package/src/components/server/AddChangeMsg.vue +1 -1
  41. package/src/components/server/ChangeDeclare.vue +1 -1
  42. package/src/components/server/LoadData.vue +2 -21
  43. package/src/components/server/Login.vue +132 -295
  44. package/src/components/server/ModifyPw.vue +17 -16
  45. package/src/components/server/NewResSelectGroup.vue +211 -0
  46. package/src/components/server/ResSelect.vue +3 -5
  47. package/src/components/server/ResSelectGroup.vue +124 -157
  48. package/src/components/server/RightTree.vue +257 -262
  49. package/src/components/server/RoleSelector.vue +4 -3
  50. package/src/components/server/TestResSelectGroup.vue +2 -2
  51. package/src/plugins/GetLoginInfoService.js +52 -74
  52. package/src/plugins/validation.js +0 -8
  53. package/src/project/State.js +1 -1
  54. package/src/stores/AppData.js +1 -1
  55. package/src/styles/less/aofeng/standard.less +60 -446
  56. package/src/styles/less/aofeng/themeOne/BinaryTemplate.less +13 -13
  57. package/src/styles/less/aofeng/themeOne/systemStyle.less +18 -18
  58. package/src/styles/less/fonts-list.less +4 -4
  59. package/src/styles/less/stand.less +1 -1
  60. package/src/styles/less/tables.less +0 -50
  61. package/src/styles/less/type.less +3 -16
  62. package/src/styles/less/variables.less +3 -6
  63. package/src/system.js +3 -27
  64. package/static/aodelogo.png +0 -0
  65. package/static/aodenewlogo.png +0 -0
  66. package/static/ewmlogo.png +0 -0
  67. package/src/components/TabButton.vue +0 -201
  68. package/src/components/Tabs.vue +0 -67
  69. package/src/components/addressManage/AddressCascadingMenu.vue +0 -145
  70. package/src/components/equipment/PosManageBoth.vue +0 -125
  71. package/src/components/equipment/PosParamAdd.vue +0 -236
  72. package/src/components/equipment/PosParamList.vue +0 -121
  73. package/src/components/equipment/PosParamManage.vue +0 -51
  74. package/src/components/server/ImageVieweTest.vue +0 -56
  75. package/src/components/server/ImageViewer.vue +0 -350
  76. package/src/components/server/PcdBuildingSelect.vue +0 -241
  77. package/src/filiale/dongguan/Main.vue +0 -715
  78. package/src/filiale/dongguan/system.js +0 -5
  79. package/src/filiale/konggang/Login.vue +0 -840
  80. package/src/filiale/konggang/system.js +0 -7
  81. package/src/filiale/qianneng/ModifyPw.vue +0 -107
  82. package/src/filiale/qianneng/system.js +0 -7
  83. package/src/filiale/rizhao/LeftTree.vue +0 -111
  84. package/src/filiale/rizhao/Login.vue +0 -791
  85. package/src/filiale/rizhao/Main.vue +0 -606
  86. package/src/filiale/rizhao/system.js +0 -14
  87. package/src/filiale/yuchuan/Login.vue +0 -889
  88. package/src/filiale/yuchuan/Main.vue +0 -773
  89. package/src/filiale/yuchuan/system.js +0 -10
  90. package/src/styles/less/manageStyle/manageStyle/manageChile.less +0 -180
  91. package/src/styles/less/manageStyle/manageStyle/manageStyle.less +0 -1102
  92. package/src/styles/less/manageStyle/manageStyle/safeStyle.less +0 -498
  93. package/src/util/Daiban.json +0 -12
  94. package/static/images/lefticon//345/220/210/345/220/214/347/256/241/347/220/206.png +0 -0
  95. package/static/logo.png +0 -0
  96. package/static/newStyle/about-us.png +0 -0
  97. package/static/rizhao.png +0 -0
  98. package/yarn-error.log +0 -6896
@@ -18,15 +18,14 @@
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.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}">
21
+ :class="{'has-warning':$v.newpassword.required,'has-error':$v.newpassword.strongpassword && !($v.newpassword.required),
22
+ 'has-success': !$v.newpassword.required && !$v.newpassword.strongpassword }">
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, 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>
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>
27
27
  <span v-if="$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>
28
+ <span v-if="$v.newpassword.strongpassword && !($v.newpassword.required)">密码必须包含英文大小写、阿拉伯数字、字符</span>
30
29
  </div>
31
30
  </div>
32
31
  <div class="has-feedback form-group"
@@ -62,17 +61,19 @@
62
61
  // let res = yield self.$post('rs/db/modifypassword', {data: self.deliver})
63
62
  // let res = yield self.$resetpost('/rs/db/modifypwd', {data: self.deliver})
64
63
  // Util.f.password = self.deliver.newpassword
65
- let res = yield self.$resetpost('/rs/user/modifypwd', {data: self.deliver }, {resolveMsg: null,rejectMsg: null})
64
+ let res = yield self.$resetpost('/rs/user/modifypwd', {data: self.deliver }, { resolveMsg: null, rejectMsg: '请求错误,修改密码失败!' })
66
65
  self.$login.f.password = self.deliver.newpassword
67
- console.log(res.data)
68
- if (res.data == true) {
69
- self.$showAlert('修改成功!', 'success', 2000)
70
- self.deliver.password = ''
71
- self.deliver.newpassword = ''
72
- self.deliver.affirmpassword = ''
73
- self.show = false
74
- } else {
75
- self.$showMessage(res.data)
66
+ if (res.data) {
67
+ console.log("修改密码返回:" , res.data)
68
+ if (res.data===true || res.data==='true') {
69
+ self.deliver.password = ''
70
+ self.deliver.newpassword = ''
71
+ self.deliver.affirmpassword = ''
72
+ self.show = false
73
+ self.$showAlert("修改密码成功", 'success', 2000)
74
+ } else {
75
+ self.$showAlert("修改密码失败,原因:" + res.data.msg, 'warning', 2000)
76
+ }
76
77
  }
77
78
  }
78
79
  export default {
@@ -0,0 +1,211 @@
1
+ <template>
2
+ <div :class="style" v-show="companyshow">
3
+ <label class="font_normal_body">公&emsp;&emsp;司</label>
4
+ <right-tree @re-res="getorg"
5
+ :mustselect="mustselect"
6
+ :initresid='initres.org'></right-tree>
7
+ </div>
8
+ <div :class="style" v-show="departmentshow">
9
+ <label class="font_normal_body">部&emsp;&emsp;门</label>
10
+ <res-select restype='department' v-ref:department
11
+ @res-select="getdep"
12
+ :parentresid="depresid"
13
+ :specialquery="specialquery"
14
+ :initresid='initres.dep'
15
+ :mustselect="mustselect"
16
+ :is-mul="mul">
17
+ </res-select>
18
+ </div>
19
+ <div :class="style" v-show="operatorshow && (!cascade)">
20
+ <label class="font_normal_body">人&emsp;&emsp;员</label>
21
+ <res-select restype='user'
22
+ @res-select="getuser"
23
+ :parentresid="depresid"
24
+ :initresid='initres.user'
25
+ :mustselect="mustselect"
26
+ :is-mul="mul">
27
+ </res-select>
28
+ </div>
29
+ <div :class="style" v-show="operatorshow && cascade">
30
+ <label class="font_normal_body">人&emsp;&emsp;员</label>
31
+ <res-select restype='user'
32
+ @res-select="getuser"
33
+ :parentresid="userresid"
34
+ :initresid='initres.user'
35
+ :mustselect="mustselect"
36
+ :is-mul="mul">
37
+ </res-select>
38
+ </div>
39
+ <div :class="style " v-if="sliceareashow" >
40
+ <label class="font_normal_body">片&emsp;&emsp;区</label>
41
+ <v-select :value.sync="slice_area" v-model="slice_area" @change='getarea'
42
+ :options='sliceArea' placeholder='片区/管理站' filer-key="name"
43
+ close-on-select v-ref:slice>
44
+ </v-select>
45
+ </div>
46
+ </template>
47
+ <script>
48
+ import plugin from '../../plugins/GetLoginInfoService'
49
+ import { HttpResetClass } from 'vue-client'
50
+ export default {
51
+ title: '资源选择测试',
52
+ props: {
53
+ style: {
54
+ type: String,
55
+ default: 'col-sm-2 form-group'
56
+ },
57
+ mul: {
58
+ type: Boolean,
59
+ default: true
60
+ },
61
+ //是否只查询营业厅
62
+ specialquery: {
63
+ type: Boolean,
64
+ default: false
65
+ },
66
+ //初始值
67
+ initres: {
68
+ type: Object,
69
+ default: null,
70
+ },
71
+ showComponent:{
72
+ default:['company','department','operator','slicearea']
73
+ },
74
+ //人员是否和部门关联
75
+ cascade: {
76
+ type: Boolean,
77
+ default: true
78
+ },
79
+ selectin: {
80
+ type: Boolean,
81
+ default: true
82
+ }
83
+ },
84
+ data () {
85
+ return {
86
+ orgresid:[this.$login.f.orgid],
87
+ depresid:[],
88
+ userresid:[],
89
+ operatorsid: [],
90
+ sliceArea: [],
91
+ slice_area:[],
92
+ companyshow:false,
93
+ departmentshow:false,
94
+ operatorshow:false,
95
+ sliceareashow:false,
96
+ mustselect:false,
97
+ obj:{
98
+ orgnames:[],
99
+ depnames:[],
100
+ operatornames:[]
101
+ }
102
+ }
103
+ },
104
+ ready () {
105
+ if(this.$login.r.includes('部门默认选中')&& this.selectin){
106
+ this.initres.dep = [this.$login.f.depids]
107
+ }
108
+ if(this.$login.r.includes('人员默认选中')&& this.selectin){
109
+ this.initres.user = [this.$login.f.id]
110
+ if(this.$login.r.includes('人员强制选中')){
111
+ this.mustselect = true
112
+ }
113
+ }
114
+ this.initComponent();
115
+ this.initAreas(this.$login.f.orgid)
116
+ },
117
+ methods:{
118
+ initComponent(){
119
+ let self=this;
120
+ this.showComponent.find((item)=>{
121
+ switch(item){
122
+ case 'company': self.companyshow=true; break;
123
+ case 'department': self.departmentshow=true; break;
124
+ case 'operator': self.operatorshow=true; break;
125
+ case 'slicearea': self.sliceareashow=true; break;
126
+ }
127
+ })
128
+ },
129
+ // 初始化片区
130
+ async initAreas (val) {
131
+ if (val) {
132
+ let http = new HttpResetClass()
133
+ let getAllArea = await http.load('POST', '/rs/search', {
134
+ source: 'this.getParentByType($organization$).getAllChildrens().where(row.getType() == $zone$)',
135
+ userid: this.$login.f.id
136
+ }, {resolveMsg: null, rejectMsg: '获取片区出错!!!'})
137
+ let arr = getAllArea.data.filter((res) => {
138
+ if(Array.isArray(val)){
139
+ for (let i = 0; i <val.length ; i++) {
140
+ if(res.parentid == val[i]){
141
+ return true
142
+ }
143
+ }
144
+ }
145
+ return res.parentid == val
146
+ })
147
+ this.sliceArea = []
148
+ this.slice_area = []
149
+ arr.forEach((res) => {
150
+ this.sliceArea.push({label: res.name, value: {name: res.name, code:res.number}})
151
+ })
152
+ }
153
+ },
154
+ returnOrg(ids){
155
+ let limit = this.$login.r.includes('数据授权限定')
156
+
157
+ let condition;
158
+ if(this.depresid.length > 0)
159
+ condition = plugin.convertToIn(this.depresid);
160
+ else
161
+ condition = this.$login.f.orgid;
162
+ if(this.userresid.length > 0){
163
+ condition += plugin.convertToIn(this.userresid);
164
+ } else {
165
+ if (limit) {
166
+ let depids = []
167
+ for (let row of this.$refs.department.resoptions) {
168
+ depids.push(row.value)
169
+ }
170
+ let depid = depids.length ? plugin.convertToIn(depids) : `('')`
171
+ condition += depid;
172
+ }
173
+ }
174
+ if(ids && ids.length > 0){
175
+ condition += plugin.convertToIn(ids);
176
+ }
177
+ if(this.slice_area.length>0){
178
+ condition += "'" + this.slice_area[0].name+"'"
179
+ }
180
+ this.$dispatch('re-res',condition,this.obj)
181
+ },
182
+ getorg (obj) {
183
+ this.depresid=obj.resids
184
+ this.obj.orgnames = obj.res
185
+ this.initAreas(obj.resids)
186
+ this.returnOrg();
187
+ },
188
+ getdep(obj,val) {
189
+ this.obj.depnames = val
190
+ this.userresid=obj
191
+ this.returnOrg();
192
+ },
193
+ getuser(obj,val) {
194
+ this.obj.operatornames = val
195
+ this.operatorsid = obj
196
+ this.returnOrg(obj);
197
+ },
198
+ getarea(val) {
199
+ this.slice_area=val
200
+ if(this.operatorsid){
201
+ this.returnOrg(this.operatorsid);
202
+ }else{
203
+ this.returnOrg();
204
+ }
205
+ }
206
+ },
207
+ watch: {
208
+
209
+ }
210
+ }
211
+ </script>
@@ -3,7 +3,6 @@
3
3
  :value.sync="selectres"
4
4
  :multiple="isMul"
5
5
  search="true"
6
- :disabled="mustselect"
7
6
  :close-on-select="!isMul"
8
7
  @change="resChange"
9
8
  >
@@ -34,10 +33,6 @@
34
33
  type: Array,
35
34
  default() { return [] },
36
35
  },
37
- mustselect: {
38
- type: Boolean,
39
- default: false
40
- },
41
36
  },
42
37
  data () {
43
38
  return {
@@ -75,6 +70,9 @@
75
70
  //找到跟节点
76
71
  ergodicList (val,parentname) {
77
72
  if(val.children.length > 0 ){
73
+ if (val.name !== '组织机构' && parentname !== '资源管理'){
74
+ this.resoptions.push({label: parentname === '组织机构' ? val.name : val.name+' - '+parentname, value: val.id})
75
+ }
78
76
  parentname=parentname+val.name
79
77
  this.treetoList(val,parentname)
80
78
  }else {
@@ -2,40 +2,27 @@
2
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"
6
5
  :initresid='initres.org'></right-tree>
7
6
  </div>
8
7
  <div :class="style" v-show="departmentshow">
9
8
  <label class="font_normal_body">部&emsp;&emsp;门</label>
10
- <res-select restype='department' v-ref:department
9
+ <res-select restype='department'
11
10
  @res-select="getdep"
12
11
  :parentresid="depresid"
13
12
  :initresid='initres.dep'
14
- :mustselect="mustselect"
15
13
  :is-mul="mul">
16
14
  </res-select>
17
15
  </div>
18
- <div :class="style" v-show="operatorshow && (!cascade)">
16
+ <div :class="style" v-show="operatorshow">
19
17
  <label class="font_normal_body">人&emsp;&emsp;员</label>
20
18
  <res-select restype='user'
21
19
  @res-select="getuser"
22
20
  :parentresid="depresid"
23
21
  :initresid='initres.user'
24
- :mustselect="mustselect"
25
22
  :is-mul="mul">
26
23
  </res-select>
27
24
  </div>
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" >
25
+ <div :class="style " v-show="sliceareashow" >
39
26
  <label class="font_normal_body">片&emsp;&emsp;区</label>
40
27
  <v-select :value.sync="slice_area" v-model="slice_area" @change='getarea'
41
28
  :options='sliceArea' placeholder='片区/管理站' filer-key="name"
@@ -44,155 +31,135 @@
44
31
  </div>
45
32
  </template>
46
33
  <script>
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'
55
- },
56
- mul: {
57
- type: Boolean,
58
- default: true
59
- },
60
- //初始值
61
- initres: {
62
- type: Object,
63
- default: null,
64
- },
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;
120
- }
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
- })
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 form-group'
42
+ },
43
+ mul: {
44
+ type: Boolean,
45
+ default: true
46
+ },
47
+ //初始值
48
+ initres: {
49
+ type: Object,
50
+ default: null,
51
+ },
52
+ showComponent:{
53
+ default:['company','department','operator','slicearea']
139
54
  }
140
55
  },
141
- returnOrg(ids){
142
- let limit = this.$login.r.includes('数据授权限定')
143
-
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;
56
+ data () {
57
+ return {
58
+ orgresid:[this.$login.f.orgid],
59
+ depresid:[],
60
+ userresid:[],
61
+ sliceArea: [],
62
+ slice_area:[],
63
+ companyshow:false,
64
+ departmentshow:false,
65
+ operatorshow:false,
66
+ sliceareashow:false,
67
+ obj:{
68
+ orgnames:[],
69
+ depnames:[],
70
+ operatornames:[],
71
+ orgids:[],
72
+ depids:[],
73
+ operatorids:[]
159
74
  }
160
75
  }
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)
168
- },
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
76
  },
180
- getuser(obj,val) {
181
- this.obj.operatornames = val
182
- this.operatorsid = obj
183
- this.returnOrg(obj);
77
+ ready () {
78
+ console.log('开始获取组织结构。。。')
79
+ this.initComponent();
80
+ this.initAreas(this.$login.f.orgid)
184
81
  },
185
- getarea(val) {
186
- this.slice_area=val
187
- if(this.operatorsid){
188
- this.returnOrg(this.operatorsid);
189
- }else{
82
+ methods:{
83
+ initComponent(){
84
+ let self=this;
85
+ this.showComponent.find((item)=>{
86
+ switch(item){
87
+ case 'company': self.companyshow=true; break;
88
+ case 'department': self.departmentshow=true; break;
89
+ case 'operator': self.operatorshow=true; break;
90
+ case 'slicearea': self.sliceareashow=true; break;
91
+ }
92
+ })
93
+ },
94
+ // 初始化片区
95
+ async initAreas (val) {
96
+ if (val) {
97
+ let http = new HttpResetClass()
98
+ let getAllArea = await http.load('POST', '/rs/search', {
99
+ source: 'this.getParentByType($organization$).getAllChildrens().where(row.getType() == $zone$)',
100
+ userid: this.$login.f.id
101
+ }, {resolveMsg: null, rejectMsg: '获取片区出错!!!'})
102
+ let arr = getAllArea.data.filter((res) => {
103
+ return res.parentid == val
104
+ })
105
+ console.log('过滤之后的片区', arr)
106
+ this.sliceArea = []
107
+ arr.forEach((res) => {
108
+ this.sliceArea.push({label: res.name, value: {name: res.name, code:res.number}})
109
+ })
110
+ }
111
+ },
112
+ returnOrg(ids){
113
+
114
+ let condition;
115
+ if(this.depresid.length > 0)
116
+ condition = " and f_orgid in " + plugin.convertToIn(this.depresid);
117
+ else
118
+ condition = " and f_orgid = " + this.$login.f.orgid;
119
+ if(this.userresid.length > 0){
120
+ condition += " and f_depid in " + plugin.convertToIn(this.userresid);
121
+ }
122
+ if(ids && ids.length > 0){
123
+ condition += " and f_operatorid in " + plugin.convertToIn(ids);
124
+ }
125
+ if(this.slice_area.length>0){
126
+ condition += " and f_zones = '" + this.slice_area[0].name+"'"
127
+ }
128
+ this.$dispatch('re-res',condition,this.obj)
129
+ },
130
+ getorg (obj) {
131
+ console.log("选中公司的数据11",obj.resids)
132
+ this.depresid=obj.resids
133
+ this.obj.orgids = this.depresid
134
+ this.obj.orgnames = obj.res
135
+ this.initAreas(obj.resids)
190
136
  this.returnOrg();
137
+ },
138
+ getdep(obj,val) {
139
+ console.log("选中部门的数据22",obj)
140
+ this.obj.depnames = val
141
+ this.obj.depids = val
142
+ this.userresid=obj
143
+ this.returnOrg();
144
+ },
145
+ getuser(obj) {
146
+ this.obj.operatornames = obj
147
+ this.obj.operatorids = obj
148
+ console.log("选中用户的数据33",obj)
149
+ this.returnOrg(obj);
150
+ },
151
+ getarea(val) {
152
+ this.slice_area=val
153
+ console.log("选中的大区",val)
154
+ if(this.obj.operatornames){
155
+ this.returnOrg(this.obj.operatornames);
156
+ }else{
157
+ this.returnOrg();
158
+ }
191
159
  }
192
- }
193
- },
194
- watch: {
160
+ },
161
+ watch: {
195
162
 
163
+ }
196
164
  }
197
- }
198
165
  </script>