system-clients 3.0.40 → 3.0.42-fanxian

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.
@@ -1,136 +1,140 @@
1
- <template>
2
- <div :class="style">
3
- <label class="font_normal_body">&nbsp;&nbsp;&nbsp;公司&nbsp;&nbsp;&nbsp;</label>
4
- <right-tree @re-res="getorg"
5
- :initresid='initres.org'></right-tree>
6
- </div>
7
- <div :class="style">
8
- <label class="font_normal_body">&nbsp;&nbsp;&nbsp;部门&nbsp;&nbsp;&nbsp;</label>
9
- <res-select restype='department'
10
- @res-select="getdep"
11
- :parentresid="depresid"
12
- :initresid='initres.dep'
13
- :is-mul="mul">
14
- </res-select>
15
- </div>
16
- <div :class="style">
17
- <label class="font_normal_body">&nbsp;&nbsp;&nbsp;人员&nbsp;&nbsp;&nbsp;</label>
18
- <res-select restype='user'
19
- @res-select="getuser"
20
- :parentresid="userresid"
21
- :initresid='initres.user'
22
- :is-mul="mul">
23
- </res-select>
24
- </div>
25
- <div :class="style " >
26
- <label class="font_normal_body">&nbsp;&nbsp;&nbsp;片区&nbsp;&nbsp;&nbsp;</label>
27
- <v-select :value.sync="slice_area" v-model="slice_area" @change='getarea'
28
- :options='sliceArea' placeholder='片区/管理站' filer-key="name"
29
- close-on-select v-ref:slice>
30
- </v-select>
31
- </div>
32
- </template>
33
- <script>
34
- import plugin from '../../plugins/GetLoginInfoService'
35
- export default {
36
- title: '资源选择测试',
37
- props: {
38
- style: {
39
- type: String,
40
- default: 'col-sm-2'
41
- },
42
- mul: {
43
- type: Boolean,
44
- default: true
45
- },
46
- //初始值
47
- initres: {
48
- type: Object,
49
- default: null,
50
- },
51
- },
52
- data () {
53
- return {
54
- orgresid:[this.$login.f.orgid],
55
- depresid:[],
56
- userresid:[],
57
- sliceArea: [],
58
- slice_area:[],
59
-
60
- obj:{
61
- orgnames:[],
62
- depnames:[],
63
- operatornames:[]
64
- }
65
- }
66
- },
67
- ready () {
68
- console.log('开始获取组织结构。。。')
69
- this.initAreas(this.$login.f.orgid)
70
- },
71
- methods:{
72
-
73
- // 初始化片区
74
- async initAreas (val) {
75
- if (val) {
76
- let getAllArea = await this.$resetpost('/rs/search', {
77
- source: 'this.getParentByType($organization$).getAllChildrens().where(row.getType() == $zone$)',
78
- userid: this.$login.f.id
79
- }, {resolveMsg: null, rejectMsg: '获取片区出错!!!'})
80
- let arr = getAllArea.data.filter((res) => {
81
- return res.parentid == val
82
- })
83
- console.log('过滤之后的片区', arr)
84
- this.sliceArea = []
85
- arr.forEach((res) => {
86
- this.sliceArea.push({label: res.name, value: {name: res.name, code:res.number}})
87
- })
88
- }
89
- },
90
- returnOrg(ids){
91
-
92
- let condition;
93
- if(this.depresid.length > 0)
94
- condition = " and f_orgid in " + plugin.convertToIn(this.depresid);
95
- else
96
- condition = " and f_orgid = " + this.$login.f.orgid;
97
- if(this.userresid.length > 0){
98
- condition += " and f_depid in " + plugin.convertToIn(this.userresid);
99
- }
100
- if(ids && ids.length > 0){
101
- condition += " and f_operatorid in " + plugin.convertToIn(ids);
102
- }
103
- if(this.slice_area.length>0){
104
- condition += " and f_zones = '" + this.slice_area[0].name+"'"
105
- }
106
- this.$dispatch('re-res',condition,this.obj)
107
- },
108
- getorg (obj) {
109
- console.log("选中公司的数据11",obj.resids)
110
- this.depresid=obj.resids
111
- this.obj.orgnames = obj.res
112
- this.initAreas(obj.resids)
113
- this.returnOrg();
114
- },
115
- getdep(obj,val) {
116
- console.log("选中部门的数据22",obj)
117
- this.obj.depnames = val
118
- this.userresid=obj
119
- this.returnOrg();
120
- },
121
- getuser(obj) {
122
- this.obj.operatornames = obj
123
- console.log("选中用户的数据33",obj)
124
- this.returnOrg(obj);
125
- },
126
- getarea(val) {
127
- this.slice_area=val
128
- console.log("选中的大区",val)
129
- this.returnOrg();
130
- }
131
- },
132
- watch: {
133
-
134
- }
135
- }
136
- </script>
1
+ <template>
2
+ <div :class="style">
3
+ <label class="font_normal_body">&nbsp;&nbsp;&nbsp;公司&nbsp;&nbsp;&nbsp;</label>
4
+ <right-tree @re-res="getorg"
5
+ :initresid='initres.org'></right-tree>
6
+ </div>
7
+ <div :class="style">
8
+ <label class="font_normal_body">&nbsp;&nbsp;&nbsp;部门&nbsp;&nbsp;&nbsp;</label>
9
+ <res-select restype='department'
10
+ @res-select="getdep"
11
+ :parentresid="depresid"
12
+ :initresid='initres.dep'
13
+ :is-mul="mul">
14
+ </res-select>
15
+ </div>
16
+ <div :class="style">
17
+ <label class="font_normal_body">&nbsp;&nbsp;&nbsp;人员&nbsp;&nbsp;&nbsp;</label>
18
+ <res-select restype='user'
19
+ @res-select="getuser"
20
+ :parentresid="userresid"
21
+ :initresid='initres.user'
22
+ :is-mul="mul">
23
+ </res-select>
24
+ </div>
25
+ <div :class="style " >
26
+ <label class="font_normal_body">&nbsp;&nbsp;&nbsp;片区&nbsp;&nbsp;&nbsp;</label>
27
+ <v-select :value.sync="slice_area" v-model="slice_area" @change='getarea'
28
+ :options='sliceArea' placeholder='片区/管理站' filer-key="name"
29
+ close-on-select v-ref:slice>
30
+ </v-select>
31
+ </div>
32
+ </template>
33
+ <script>
34
+ import plugin from '../../plugins/GetLoginInfoService'
35
+ export default {
36
+ title: '资源选择测试',
37
+ props: {
38
+ style: {
39
+ type: String,
40
+ default: 'col-sm-2'
41
+ },
42
+ mul: {
43
+ type: Boolean,
44
+ default: true
45
+ },
46
+ //初始值
47
+ initres: {
48
+ type: Object,
49
+ default: null,
50
+ },
51
+ },
52
+ data () {
53
+ return {
54
+ orgresid:[this.$login.f.orgid],
55
+ depresid:[],
56
+ userresid:[],
57
+ sliceArea: [],
58
+ slice_area:[],
59
+
60
+ obj:{
61
+ orgnames:[],
62
+ depnames:[],
63
+ operatornames:[]
64
+ }
65
+ }
66
+ },
67
+ ready () {
68
+ console.log('开始获取组织结构。。。')
69
+ this.initAreas(this.$login.f.orgid)
70
+ },
71
+ methods:{
72
+
73
+ // 初始化片区
74
+ async initAreas (val) {
75
+ if (val) {
76
+ let getAllArea = await this.$resetpost('/rs/search', {
77
+ source: 'this.getParentByType($organization$).getAllChildrens().where(row.getType() == $zone$)',
78
+ userid: this.$login.f.id
79
+ }, {resolveMsg: null, rejectMsg: '获取片区出错!!!'})
80
+ let arr = getAllArea.data.filter((res) => {
81
+ return res.parentid == val
82
+ })
83
+ console.log('过滤之后的片区', arr)
84
+ this.sliceArea = []
85
+ arr.forEach((res) => {
86
+ this.sliceArea.push({label: res.name, value: {name: res.name, code:res.number}})
87
+ })
88
+ }
89
+ },
90
+ returnOrg(ids){
91
+
92
+ let condition;
93
+ if(this.depresid.length > 0)
94
+ condition = " and f_orgid in " + plugin.convertToIn(this.depresid);
95
+ else
96
+ condition = " and f_orgid = " + this.$login.f.orgid;
97
+ if(this.userresid.length > 0){
98
+ condition += " and f_depid in " + plugin.convertToIn(this.userresid);
99
+ }
100
+ if(ids && ids.length > 0){
101
+ condition += " and f_operatorid in " + plugin.convertToIn(ids);
102
+ }
103
+ if(this.slice_area.length>0){
104
+ condition += " and f_zones = '" + this.slice_area[0].name+"'"
105
+ }
106
+ this.$dispatch('re-res',condition,this.obj)
107
+ },
108
+ getorg (obj) {
109
+ console.log("选中公司的数据11",obj.resids)
110
+ this.depresid=obj.resids
111
+ this.obj.orgnames = obj.res
112
+ this.initAreas(obj.resids)
113
+ this.returnOrg();
114
+ },
115
+ getdep(obj,val) {
116
+ console.log("选中部门的数据22",obj)
117
+ this.obj.depnames = val
118
+ this.userresid=obj
119
+ this.returnOrg();
120
+ },
121
+ getuser(obj) {
122
+ this.obj.operatornames = obj
123
+ console.log("选中用户的数据33",obj)
124
+ this.returnOrg(obj);
125
+ },
126
+ getarea(val) {
127
+ this.slice_area=val
128
+ console.log("选中的大区",val)
129
+ if(this.obj.operatornames){
130
+ this.returnOrg(this.obj.operatornames);
131
+ }else{
132
+ this.returnOrg();
133
+ }
134
+ }
135
+ },
136
+ watch: {
137
+
138
+ }
139
+ }
140
+ </script>