system-clients 3.0.46-fanxian → 3.0.47-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.
- package/.babelrc +5 -5
- package/.editorconfig +9 -9
- package/.eslintrc.js +16 -16
- package/.gradle/buildOutputCleanup/cache.properties +2 -2
- package/CHANGELOG.md +51 -51
- package/README.md +36 -36
- package/SystemClient.iml +11 -11
- package/build/css-loaders.js +34 -34
- package/build/dev-client.js +8 -8
- package/build/example-server.js +80 -80
- package/build/release.sh +28 -28
- package/build/utils.js +71 -71
- package/build/webpack.dev.conf.js +31 -31
- package/build/webpack.example.conf.js +49 -49
- package/build/webpack.prod.conf.js +60 -60
- package/build/webpack.test.conf.js +31 -31
- package/build.gradle +6 -6
- package/config/dev.env.js +6 -6
- package/config/index.js +38 -38
- package/config/prod.env.js +3 -3
- package/config/test.env.js +6 -6
- package/doc/Login.md +7 -7
- package/examples/ReadCard/App.vue +23 -23
- package/examples/ReadCard/index.html +11 -11
- package/examples/ReadCard/main.js +12 -12
- package/index.html +21 -21
- package/package.json +1 -1
- package/release.bat +5 -5
- package/src/App.vue +24 -24
- package/src/LodopFuncs.js +123 -123
- package/src/assets/binding.svg +1 -1
- package/src/assets/unbind.svg +1 -1
- package/src/assets//345/205/254/345/221/212.svg +1 -1
- package/src/assets//347/207/203/346/260/224/347/274/264/350/264/271.eps +116 -116
- package/src/assets//350/201/224/347/263/273/346/210/221/344/273/254.svg +1 -1
- package/src/components/List.vue +51 -51
- package/src/components/Table.js +74 -74
- package/src/components/Util.js +343 -343
- package/src/components/equipment/EquipmentManage.vue +65 -65
- package/src/components/equipment/PcAdd.vue +105 -105
- package/src/components/equipment/PcList.vue +119 -119
- package/src/components/equipment/PcManage.vue +60 -60
- package/src/components/equipment/PhoneAdd.vue +94 -94
- package/src/components/equipment/PhoneList.vue +102 -102
- package/src/components/equipment/PhoneManage.vue +60 -60
- package/src/components/equipment/PosAdd.vue +137 -137
- package/src/components/equipment/PosList.vue +156 -156
- package/src/components/equipment/PosManage.vue +67 -67
- package/src/components/materialManage/materialData.vue +44 -44
- package/src/components/materialManage/materialList.vue +255 -255
- package/src/components/parammanage/ParamManage.vue +42 -42
- package/src/components/parammanage/ParamManages.vue +43 -43
- package/src/components/parammanage/ParamPage.vue +314 -314
- package/src/components/parammanage/ParamPages.vue +214 -214
- package/src/components/parammanage/SinglePage.vue +237 -237
- package/src/components/parammanage/SinglePages.vue +161 -161
- package/src/components/server/AddChangeMsg.vue +66 -66
- package/src/components/server/ChangeDeclare.vue +45 -45
- package/src/components/server/IconTree.vue +26 -26
- package/src/components/server/LeftTree.vue +111 -111
- package/src/components/server/LoadData.vue +36 -36
- package/src/components/server/Login.vue +625 -623
- package/src/components/server/Menu.vue +188 -188
- package/src/components/server/ModifyPw.vue +125 -106
- package/src/components/server/ResSelect.vue +150 -150
- package/src/components/server/ResSelectGroup.vue +140 -140
- package/src/components/server/RightTree.vue +263 -263
- package/src/components/server/RoleSelector.vue +88 -88
- package/src/components/server/TestResSelect.vue +58 -58
- package/src/components/server/TestResSelectGroup.vue +388 -388
- package/src/components/server/TestRightTree.vue +42 -42
- package/src/index.js +7 -7
- package/src/plugins/GetLoginInfoService.js +509 -498
- package/src/plugins/validation.js +7 -7
- package/src/project/ProjectPage.vue +24 -24
- package/src/project/State.js +17 -17
- package/src/stores/AppData.js +38 -38
- package/src/systemphone.js +11 -11
- package/src/util/LdapHelper.js +75 -75
- package/test/e2e/custom-assertions/elementCount.js +26 -26
- package/test/e2e/nightwatch.conf.js +40 -40
- package/test/e2e/runner.js +30 -30
- package/test/e2e/specs/test.js +14 -14
- package/test/unit/.eslintrc +5 -5
- package/test/unit/index.js +13 -13
- package/test/unit/init.js +10 -10
- package/test/unit/karma.conf.js +49 -49
- package/test/unit/specs/base64.spec.js +5 -5
- package/test/unit/specs/components/parammanage/ParamPage.spec.js +20 -20
- package/test/unit/specs/components/parammanage/SinglePage.spec.js +20 -20
- package/test/unit/specs/components/server/LeftTree/App.vue +18 -18
- package/test/unit/specs/components/server/LeftTree/LeftTree.spec.js +22 -22
- package/test/unit/specs/components/server/LoadData.spec.js +24 -24
- package/test/unit/specs/components/server/Login.spec.js +61 -61
- package/test/unit/specs/components/server/RightTree.spec.js +50 -50
- package/test/unit/specs/plugins/GetLoginInfoService.spec.js +55 -55
- package/test/unit/test.html +76 -76
@@ -1,150 +1,150 @@
|
|
1
|
-
<template>
|
2
|
-
<v-select :options='resoptions' placeholder='请选择'
|
3
|
-
:value.sync="selectres"
|
4
|
-
:multiple="isMul"
|
5
|
-
search="true"
|
6
|
-
:close-on-select="!isMul"
|
7
|
-
@change="resChange"
|
8
|
-
>
|
9
|
-
</v-select>
|
10
|
-
</template>
|
11
|
-
<script>
|
12
|
-
import {HttpResetClass} from 'vue-client'
|
13
|
-
|
14
|
-
export default {
|
15
|
-
title: '资源选择',
|
16
|
-
props: {
|
17
|
-
|
18
|
-
//资源类型
|
19
|
-
restype:'',
|
20
|
-
//资源数据
|
21
|
-
resObj:{},
|
22
|
-
isMul: {
|
23
|
-
type: Boolean,
|
24
|
-
default: true
|
25
|
-
},
|
26
|
-
//资源初始化数据
|
27
|
-
initresid: {
|
28
|
-
type: Array,
|
29
|
-
default() { return [] },
|
30
|
-
},
|
31
|
-
//父层id
|
32
|
-
parentresid: {
|
33
|
-
type: Array,
|
34
|
-
default() { return [] },
|
35
|
-
},
|
36
|
-
},
|
37
|
-
data () {
|
38
|
-
return {
|
39
|
-
//资源数据
|
40
|
-
resObj:{},
|
41
|
-
//资源数据列表
|
42
|
-
resoptions:[],
|
43
|
-
//选中资源数据
|
44
|
-
selectres: [],
|
45
|
-
}
|
46
|
-
},
|
47
|
-
ready () {
|
48
|
-
//获取资源列表
|
49
|
-
this.getResList()
|
50
|
-
},
|
51
|
-
methods:{
|
52
|
-
//树形结构变成list
|
53
|
-
findById(val) {
|
54
|
-
if(val){
|
55
|
-
if(this.checkidres(val)){
|
56
|
-
this.treetoList(val,'')
|
57
|
-
}else if(val.children.length>0){
|
58
|
-
for (let value of val.children) {
|
59
|
-
this.findById(value)
|
60
|
-
}
|
61
|
-
}
|
62
|
-
}
|
63
|
-
},
|
64
|
-
//树形结构变成list
|
65
|
-
treetoList(val,parentname) {
|
66
|
-
for (let value of val.children) {
|
67
|
-
this.ergodicList(value,parentname)
|
68
|
-
}
|
69
|
-
},
|
70
|
-
//找到跟节点
|
71
|
-
ergodicList (val,parentname) {
|
72
|
-
if(val.children.length > 0 ){
|
73
|
-
parentname=parentname+val.name
|
74
|
-
this.treetoList(val,parentname)
|
75
|
-
}else {
|
76
|
-
//截取组织机构【组织机构】
|
77
|
-
if(this.restype=='organization'){
|
78
|
-
parentname=parentname.replace("组织机构","")
|
79
|
-
this.resoptions.push({label: val.name+' - '+parentname, value: val.id})
|
80
|
-
}else{
|
81
|
-
this.resoptions.push({label: val.name, value: val.id})
|
82
|
-
}
|
83
|
-
}
|
84
|
-
},
|
85
|
-
//检查id是否存在
|
86
|
-
checkidres(val){
|
87
|
-
let flag=false
|
88
|
-
//如果没传值得话 不过滤
|
89
|
-
if(this.parentresid.length==0&&this.restype=='organization'){
|
90
|
-
flag=true
|
91
|
-
}
|
92
|
-
this.parentresid.forEach((item) => {
|
93
|
-
if(item==val.id){
|
94
|
-
flag=true
|
95
|
-
}
|
96
|
-
})
|
97
|
-
return flag;
|
98
|
-
},
|
99
|
-
//资源改变
|
100
|
-
resChange(val){
|
101
|
-
let orgnames=[]
|
102
|
-
Object.keys(this.resoptions).forEach((key) => {
|
103
|
-
if(this.selectres.includes(this.resoptions[key].value))
|
104
|
-
orgnames.push(this.resoptions[key].label)
|
105
|
-
})
|
106
|
-
console.log('资源改变。。', val, orgnames)
|
107
|
-
this.$dispatch('res-select', this.selectres, orgnames)
|
108
|
-
},
|
109
|
-
//获取资源数据
|
110
|
-
async getResList() {
|
111
|
-
|
112
|
-
let http = new HttpResetClass()
|
113
|
-
|
114
|
-
let req = await http.load('POST', '/rs/search', {data: {
|
115
|
-
source: `tool.getFullTree(this.getRights().where(row.getType()==$${this.restype}$))`,
|
116
|
-
userid: this.$login.f.id
|
117
|
-
}}, {resolveMsg: null, rejectMsg: '获取组织结构数据出错'})
|
118
|
-
this.resObj=req.data[0]
|
119
|
-
this.dealdata()
|
120
|
-
},
|
121
|
-
dealdata(){
|
122
|
-
this.resoptions=[]
|
123
|
-
this.findById(this.resObj);
|
124
|
-
//赋值资源数据
|
125
|
-
let arryselect=[]
|
126
|
-
this.resoptions.forEach((item) => {
|
127
|
-
if(this.initresid.length>0){
|
128
|
-
this.initresid.forEach((init) => {
|
129
|
-
if(item.value==init){
|
130
|
-
arryselect.push(item.value)
|
131
|
-
}
|
132
|
-
})
|
133
|
-
}
|
134
|
-
})
|
135
|
-
//赋值资源选中初始值
|
136
|
-
this.selectres=arryselect
|
137
|
-
}
|
138
|
-
},
|
139
|
-
watch: {
|
140
|
-
//监听初始化资源id
|
141
|
-
'initresid.length'(){
|
142
|
-
this.dealdata()
|
143
|
-
},
|
144
|
-
//监听初始化资源id
|
145
|
-
'parentresid'(){
|
146
|
-
this.dealdata()
|
147
|
-
},
|
148
|
-
},
|
149
|
-
}
|
150
|
-
</script>
|
1
|
+
<template>
|
2
|
+
<v-select :options='resoptions' placeholder='请选择'
|
3
|
+
:value.sync="selectres"
|
4
|
+
:multiple="isMul"
|
5
|
+
search="true"
|
6
|
+
:close-on-select="!isMul"
|
7
|
+
@change="resChange"
|
8
|
+
>
|
9
|
+
</v-select>
|
10
|
+
</template>
|
11
|
+
<script>
|
12
|
+
import {HttpResetClass} from 'vue-client'
|
13
|
+
|
14
|
+
export default {
|
15
|
+
title: '资源选择',
|
16
|
+
props: {
|
17
|
+
|
18
|
+
//资源类型
|
19
|
+
restype:'',
|
20
|
+
//资源数据
|
21
|
+
resObj:{},
|
22
|
+
isMul: {
|
23
|
+
type: Boolean,
|
24
|
+
default: true
|
25
|
+
},
|
26
|
+
//资源初始化数据
|
27
|
+
initresid: {
|
28
|
+
type: Array,
|
29
|
+
default() { return [] },
|
30
|
+
},
|
31
|
+
//父层id
|
32
|
+
parentresid: {
|
33
|
+
type: Array,
|
34
|
+
default() { return [] },
|
35
|
+
},
|
36
|
+
},
|
37
|
+
data () {
|
38
|
+
return {
|
39
|
+
//资源数据
|
40
|
+
resObj:{},
|
41
|
+
//资源数据列表
|
42
|
+
resoptions:[],
|
43
|
+
//选中资源数据
|
44
|
+
selectres: [],
|
45
|
+
}
|
46
|
+
},
|
47
|
+
ready () {
|
48
|
+
//获取资源列表
|
49
|
+
this.getResList()
|
50
|
+
},
|
51
|
+
methods:{
|
52
|
+
//树形结构变成list
|
53
|
+
findById(val) {
|
54
|
+
if(val){
|
55
|
+
if(this.checkidres(val)){
|
56
|
+
this.treetoList(val,'')
|
57
|
+
}else if(val.children.length>0){
|
58
|
+
for (let value of val.children) {
|
59
|
+
this.findById(value)
|
60
|
+
}
|
61
|
+
}
|
62
|
+
}
|
63
|
+
},
|
64
|
+
//树形结构变成list
|
65
|
+
treetoList(val,parentname) {
|
66
|
+
for (let value of val.children) {
|
67
|
+
this.ergodicList(value,parentname)
|
68
|
+
}
|
69
|
+
},
|
70
|
+
//找到跟节点
|
71
|
+
ergodicList (val,parentname) {
|
72
|
+
if(val.children.length > 0 ){
|
73
|
+
parentname=parentname+val.name
|
74
|
+
this.treetoList(val,parentname)
|
75
|
+
}else {
|
76
|
+
//截取组织机构【组织机构】
|
77
|
+
if(this.restype=='organization'){
|
78
|
+
parentname=parentname.replace("组织机构","")
|
79
|
+
this.resoptions.push({label: val.name+' - '+parentname, value: val.id})
|
80
|
+
}else{
|
81
|
+
this.resoptions.push({label: val.name, value: val.id})
|
82
|
+
}
|
83
|
+
}
|
84
|
+
},
|
85
|
+
//检查id是否存在
|
86
|
+
checkidres(val){
|
87
|
+
let flag=false
|
88
|
+
//如果没传值得话 不过滤
|
89
|
+
if(this.parentresid.length==0&&this.restype=='organization'){
|
90
|
+
flag=true
|
91
|
+
}
|
92
|
+
this.parentresid.forEach((item) => {
|
93
|
+
if(item==val.id){
|
94
|
+
flag=true
|
95
|
+
}
|
96
|
+
})
|
97
|
+
return flag;
|
98
|
+
},
|
99
|
+
//资源改变
|
100
|
+
resChange(val){
|
101
|
+
let orgnames=[]
|
102
|
+
Object.keys(this.resoptions).forEach((key) => {
|
103
|
+
if(this.selectres.includes(this.resoptions[key].value))
|
104
|
+
orgnames.push(this.resoptions[key].label)
|
105
|
+
})
|
106
|
+
console.log('资源改变。。', val, orgnames)
|
107
|
+
this.$dispatch('res-select', this.selectres, orgnames)
|
108
|
+
},
|
109
|
+
//获取资源数据
|
110
|
+
async getResList() {
|
111
|
+
|
112
|
+
let http = new HttpResetClass()
|
113
|
+
|
114
|
+
let req = await http.load('POST', '/rs/search', {data: {
|
115
|
+
source: `tool.getFullTree(this.getRights().where(row.getType()==$${this.restype}$))`,
|
116
|
+
userid: this.$login.f.id
|
117
|
+
}}, {resolveMsg: null, rejectMsg: '获取组织结构数据出错'})
|
118
|
+
this.resObj=req.data[0]
|
119
|
+
this.dealdata()
|
120
|
+
},
|
121
|
+
dealdata(){
|
122
|
+
this.resoptions=[]
|
123
|
+
this.findById(this.resObj);
|
124
|
+
//赋值资源数据
|
125
|
+
let arryselect=[]
|
126
|
+
this.resoptions.forEach((item) => {
|
127
|
+
if(this.initresid.length>0){
|
128
|
+
this.initresid.forEach((init) => {
|
129
|
+
if(item.value==init){
|
130
|
+
arryselect.push(item.value)
|
131
|
+
}
|
132
|
+
})
|
133
|
+
}
|
134
|
+
})
|
135
|
+
//赋值资源选中初始值
|
136
|
+
this.selectres=arryselect
|
137
|
+
}
|
138
|
+
},
|
139
|
+
watch: {
|
140
|
+
//监听初始化资源id
|
141
|
+
'initresid.length'(){
|
142
|
+
this.dealdata()
|
143
|
+
},
|
144
|
+
//监听初始化资源id
|
145
|
+
'parentresid'(){
|
146
|
+
this.dealdata()
|
147
|
+
},
|
148
|
+
},
|
149
|
+
}
|
150
|
+
</script>
|
@@ -1,140 +1,140 @@
|
|
1
|
-
<template>
|
2
|
-
<div :class="style">
|
3
|
-
<label class="font_normal_body"> 公司 </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"> 部门 </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"> 人员 </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"> 片区 </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>
|
1
|
+
<template>
|
2
|
+
<div :class="style">
|
3
|
+
<label class="font_normal_body"> 公司 </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"> 部门 </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"> 人员 </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"> 片区 </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>
|