system-clients 3.2.85 → 3.2.87-fix
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,61 +1,67 @@
|
|
1
1
|
<template>
|
2
2
|
<div class='over'>
|
3
|
-
<tree :model='functions' :flagres="false" :is-click="false" v-ref:tree @toggle="toggled"
|
3
|
+
<tree :model='functions' :flagres="false" :is-click="false" v-ref:tree @toggle="toggled">
|
4
4
|
<span partial class="row" :class="{ 'tree-img': isFolder(row), 'tree-span': !isFolder(row) }">
|
5
|
-
<div class="col-sm-2"
|
5
|
+
<div class="col-sm-2">
|
6
6
|
<img v-if="isFolder(row)" :src="row.data.icon" alt="">
|
7
7
|
</div>
|
8
|
-
<div class="col-sm-8" style="padding-left:6%;text-align: left"
|
8
|
+
<div class="col-sm-8" style="padding-left:6%;text-align: left"
|
9
|
+
title="{{row.data.name}}">{{ row.data.name }}</div>
|
9
10
|
</span>
|
10
11
|
</tree>
|
11
12
|
</div>
|
12
13
|
</template>
|
13
14
|
<script>
|
14
|
-
|
15
|
+
import Vue from 'vue'
|
15
16
|
|
16
17
|
export default {
|
17
|
-
props: ['functions', 'userid','tabs'],
|
18
|
+
props: ['functions', 'userid', 'tabs'],
|
18
19
|
title: '左侧树菜单',
|
19
|
-
data
|
20
|
+
data() {
|
20
21
|
return {
|
21
22
|
index: -1,
|
22
23
|
name: null,
|
23
|
-
tbcg:[]
|
24
|
+
tbcg: []
|
24
25
|
}
|
25
26
|
},
|
26
27
|
methods: {
|
27
|
-
open
|
28
|
+
open(row) {
|
28
29
|
if (row.data.name === '资源管理') {
|
29
30
|
this.$parent.changeMain(row.data.id)
|
30
|
-
|
31
|
+
return
|
31
32
|
}
|
32
|
-
|
33
|
-
|
33
|
+
console.log(row.data.navigate)
|
34
|
+
if (row.data.navigate) {
|
34
35
|
|
35
|
-
|
36
|
+
let isExist = false
|
36
37
|
this.tbcg.forEach((tab) => {
|
37
|
-
|
38
|
+
if (tab.comp.props.compName === row.data.link) {
|
38
39
|
isExist = true
|
39
40
|
}
|
40
41
|
})
|
41
|
-
if (!isExist){
|
42
|
-
this.$goto('embbed-page', {
|
43
|
-
|
44
|
-
|
45
|
-
|
42
|
+
if (!isExist) {
|
43
|
+
this.$goto('embbed-page', {
|
44
|
+
domainName: row.data.navigate,
|
45
|
+
title: row.data.name,
|
46
|
+
compName: row.data.link,
|
47
|
+
login: Vue.$login,
|
48
|
+
param: Vue.$appdata
|
49
|
+
}, 'main')
|
50
|
+
} else {
|
51
|
+
this.$emit('isnodo', row.data.link)
|
46
52
|
}
|
47
53
|
} else if (row.data.link) {
|
48
54
|
let isExist = false
|
49
55
|
this.tbcg.forEach((tab) => {
|
50
|
-
if(tab.comp.name == row.data.link) {
|
56
|
+
if (tab.comp.name == row.data.link) {
|
51
57
|
isExist = true
|
52
58
|
}
|
53
59
|
})
|
54
|
-
if (!isExist){
|
60
|
+
if (!isExist) {
|
55
61
|
this.$goto(row.data.link, {f: this.functions}, 'main')
|
56
|
-
}else {
|
57
|
-
|
58
|
-
this.$emit('isnodo',row.data.link)
|
62
|
+
} else {
|
63
|
+
console.log(isExist, 'saaa')
|
64
|
+
this.$emit('isnodo', row.data.link)
|
59
65
|
}
|
60
66
|
}
|
61
67
|
},
|
@@ -70,22 +76,22 @@ export default {
|
|
70
76
|
// 当前激活页签有,index为-1,说明菜单收缩
|
71
77
|
this.changeSelected(index)
|
72
78
|
},
|
73
|
-
selfFindIndex
|
79
|
+
selfFindIndex(name) {
|
74
80
|
|
75
81
|
return this.$refs.tree.toNode.findIndex((item) => {
|
76
82
|
return item.data.link === name
|
77
83
|
})
|
78
84
|
},
|
79
|
-
changeSelected
|
85
|
+
changeSelected(index) {
|
80
86
|
|
81
87
|
if (index === -1) {
|
82
88
|
this.$refs.tree.selectStore.select(null)
|
83
|
-
}else {
|
89
|
+
} else {
|
84
90
|
this.$refs.tree.selectStore.select(this.$refs.tree.toNode[index])
|
85
91
|
}
|
86
92
|
|
87
93
|
},
|
88
|
-
toggled
|
94
|
+
toggled() {
|
89
95
|
|
90
96
|
if (this.name && this.index === -1) {
|
91
97
|
let index = this.selfFindIndex(this.name)
|
@@ -102,8 +108,8 @@ export default {
|
|
102
108
|
this.open(data.val)
|
103
109
|
}
|
104
110
|
},
|
105
|
-
watch:{
|
106
|
-
'tabs'(val){
|
111
|
+
watch: {
|
112
|
+
'tabs'(val) {
|
107
113
|
this.tbcg = val
|
108
114
|
}
|
109
115
|
}
|
@@ -1,204 +1,211 @@
|
|
1
|
-
<template>
|
2
|
-
<div :class="style" v-show="companyshow">
|
3
|
-
<label class="font_normal_body">公  司</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">部  门</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">人  员</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">人  员</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">片  区</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
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
this.
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
this.
|
184
|
-
this.
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
this.
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
1
|
+
<template>
|
2
|
+
<div :class="style" v-show="companyshow">
|
3
|
+
<label class="font_normal_body">公  司</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">部  门</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">人  员</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">人  员</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">片  区</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 = " and f_orgid in " + plugin.convertToIn(this.depresid);
|
160
|
+
else
|
161
|
+
condition = " and f_orgid = " + this.$login.f.orgid;
|
162
|
+
if(this.userresid.length > 0){
|
163
|
+
condition += " and f_depid in " + 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 += " and f_depid in " + depid;
|
172
|
+
}
|
173
|
+
}
|
174
|
+
if(ids && ids.length > 0){
|
175
|
+
condition += " and f_operatorid in " + plugin.convertToIn(ids);
|
176
|
+
}
|
177
|
+
if(this.slice_area.length>0){
|
178
|
+
condition += " and f_zones = '" + 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>
|