system-clients 3.1.79-xianyang → 3.1.81-xianyang
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 +1 -1
- package/src/components/Main.vue +547 -547
- package/src/components/equipment/EquipmentManage.vue +68 -65
- package/src/components/equipment/QCAdd.vue +320 -0
- package/src/components/equipment/QCList.vue +227 -0
- package/src/components/equipment/QCManage.vue +150 -0
- package/src/components/server/Login.vue +642 -626
- package/src/components/server/ResSelect.vue +154 -154
- package/src/components/server/ResSelectGroup.vue +159 -159
- package/src/components/server/RightTree.vue +314 -314
- package/src/system.js +2 -0
@@ -1,154 +1,154 @@
|
|
1
|
-
<template>
|
2
|
-
<v-select :options='resoptions' placeholder='请选择'
|
3
|
-
:value.sync="selectres"
|
4
|
-
:multiple="isMul"
|
5
|
-
:search="search"
|
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
|
-
search:{
|
27
|
-
type: Boolean,
|
28
|
-
default: true
|
29
|
-
},
|
30
|
-
//资源初始化数据
|
31
|
-
initresid: {
|
32
|
-
type: Array,
|
33
|
-
default() { return [] },
|
34
|
-
},
|
35
|
-
//父层id
|
36
|
-
parentresid: {
|
37
|
-
type: Array,
|
38
|
-
default() { return [] },
|
39
|
-
},
|
40
|
-
},
|
41
|
-
data () {
|
42
|
-
return {
|
43
|
-
//资源数据
|
44
|
-
resObj:{},
|
45
|
-
//资源数据列表
|
46
|
-
resoptions:[],
|
47
|
-
//选中资源数据
|
48
|
-
selectres: [],
|
49
|
-
}
|
50
|
-
},
|
51
|
-
ready () {
|
52
|
-
//获取资源列表
|
53
|
-
this.getResList()
|
54
|
-
},
|
55
|
-
methods:{
|
56
|
-
//树形结构变成list
|
57
|
-
findById(val) {
|
58
|
-
if(val){
|
59
|
-
if(this.checkidres(val)){
|
60
|
-
this.treetoList(val,'')
|
61
|
-
}else if(val.children.length>0){
|
62
|
-
for (let value of val.children) {
|
63
|
-
this.findById(value)
|
64
|
-
}
|
65
|
-
}
|
66
|
-
}
|
67
|
-
},
|
68
|
-
//树形结构变成list
|
69
|
-
treetoList(val,parentname) {
|
70
|
-
for (let value of val.children) {
|
71
|
-
this.ergodicList(value,parentname)
|
72
|
-
}
|
73
|
-
},
|
74
|
-
//找到跟节点
|
75
|
-
ergodicList (val,parentname) {
|
76
|
-
if(val.children.length > 0 ){
|
77
|
-
parentname=parentname+val.name
|
78
|
-
this.treetoList(val,parentname)
|
79
|
-
}else {
|
80
|
-
//截取组织机构【组织机构】
|
81
|
-
if(this.restype=='organization'){
|
82
|
-
parentname=parentname.replace("组织机构","")
|
83
|
-
this.resoptions.push({label: val.name+' - '+parentname, value: val.id})
|
84
|
-
}else{
|
85
|
-
this.resoptions.push({label: val.name, value: val.id})
|
86
|
-
}
|
87
|
-
}
|
88
|
-
},
|
89
|
-
//检查id是否存在
|
90
|
-
checkidres(val){
|
91
|
-
let flag=false
|
92
|
-
//如果没传值得话 不过滤
|
93
|
-
if(this.parentresid.length==0&&this.restype=='organization'){
|
94
|
-
flag=true
|
95
|
-
}
|
96
|
-
this.parentresid.forEach((item) => {
|
97
|
-
if(item==val.id){
|
98
|
-
flag=true
|
99
|
-
}
|
100
|
-
})
|
101
|
-
return flag;
|
102
|
-
},
|
103
|
-
//资源改变
|
104
|
-
resChange(val){
|
105
|
-
let orgnames=[]
|
106
|
-
Object.keys(this.resoptions).forEach((key) => {
|
107
|
-
if(this.selectres.includes(this.resoptions[key].value))
|
108
|
-
orgnames.push(this.resoptions[key].label)
|
109
|
-
})
|
110
|
-
console.log('资源改变。。', val, orgnames)
|
111
|
-
this.$dispatch('res-select', this.selectres, orgnames)
|
112
|
-
},
|
113
|
-
//获取资源数据
|
114
|
-
async getResList() {
|
115
|
-
|
116
|
-
let http = new HttpResetClass()
|
117
|
-
|
118
|
-
let req = await http.load('POST', '/rs/search', {data: {
|
119
|
-
source: `tool.getFullTree(this.getRights().where(row.getType()==$${this.restype}$))`,
|
120
|
-
userid: this.$login.f.id
|
121
|
-
}}, {resolveMsg: null, rejectMsg: '获取组织结构数据出错'})
|
122
|
-
this.resObj=req.data[0]
|
123
|
-
this.dealdata()
|
124
|
-
},
|
125
|
-
dealdata(){
|
126
|
-
this.resoptions=[]
|
127
|
-
this.findById(this.resObj);
|
128
|
-
//赋值资源数据
|
129
|
-
let arryselect=[]
|
130
|
-
this.resoptions.forEach((item) => {
|
131
|
-
if(this.initresid.length>0){
|
132
|
-
this.initresid.forEach((init) => {
|
133
|
-
if(item.value==init){
|
134
|
-
arryselect.push(item.value)
|
135
|
-
}
|
136
|
-
})
|
137
|
-
}
|
138
|
-
})
|
139
|
-
//赋值资源选中初始值
|
140
|
-
this.selectres=arryselect
|
141
|
-
}
|
142
|
-
},
|
143
|
-
watch: {
|
144
|
-
//监听初始化资源id
|
145
|
-
'initresid.length'(){
|
146
|
-
this.dealdata()
|
147
|
-
},
|
148
|
-
//监听初始化资源id
|
149
|
-
'parentresid'(){
|
150
|
-
this.dealdata()
|
151
|
-
},
|
152
|
-
},
|
153
|
-
}
|
154
|
-
</script>
|
1
|
+
<template>
|
2
|
+
<v-select :options='resoptions' placeholder='请选择'
|
3
|
+
:value.sync="selectres"
|
4
|
+
:multiple="isMul"
|
5
|
+
:search="search"
|
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
|
+
search:{
|
27
|
+
type: Boolean,
|
28
|
+
default: true
|
29
|
+
},
|
30
|
+
//资源初始化数据
|
31
|
+
initresid: {
|
32
|
+
type: Array,
|
33
|
+
default() { return [] },
|
34
|
+
},
|
35
|
+
//父层id
|
36
|
+
parentresid: {
|
37
|
+
type: Array,
|
38
|
+
default() { return [] },
|
39
|
+
},
|
40
|
+
},
|
41
|
+
data () {
|
42
|
+
return {
|
43
|
+
//资源数据
|
44
|
+
resObj:{},
|
45
|
+
//资源数据列表
|
46
|
+
resoptions:[],
|
47
|
+
//选中资源数据
|
48
|
+
selectres: [],
|
49
|
+
}
|
50
|
+
},
|
51
|
+
ready () {
|
52
|
+
//获取资源列表
|
53
|
+
this.getResList()
|
54
|
+
},
|
55
|
+
methods:{
|
56
|
+
//树形结构变成list
|
57
|
+
findById(val) {
|
58
|
+
if(val){
|
59
|
+
if(this.checkidres(val)){
|
60
|
+
this.treetoList(val,'')
|
61
|
+
}else if(val.children.length>0){
|
62
|
+
for (let value of val.children) {
|
63
|
+
this.findById(value)
|
64
|
+
}
|
65
|
+
}
|
66
|
+
}
|
67
|
+
},
|
68
|
+
//树形结构变成list
|
69
|
+
treetoList(val,parentname) {
|
70
|
+
for (let value of val.children) {
|
71
|
+
this.ergodicList(value,parentname)
|
72
|
+
}
|
73
|
+
},
|
74
|
+
//找到跟节点
|
75
|
+
ergodicList (val,parentname) {
|
76
|
+
if(val.children.length > 0 ){
|
77
|
+
parentname=parentname+val.name
|
78
|
+
this.treetoList(val,parentname)
|
79
|
+
}else {
|
80
|
+
//截取组织机构【组织机构】
|
81
|
+
if(this.restype=='organization'){
|
82
|
+
parentname=parentname.replace("组织机构","")
|
83
|
+
this.resoptions.push({label: val.name+' - '+parentname, value: val.id})
|
84
|
+
}else{
|
85
|
+
this.resoptions.push({label: val.name, value: val.id})
|
86
|
+
}
|
87
|
+
}
|
88
|
+
},
|
89
|
+
//检查id是否存在
|
90
|
+
checkidres(val){
|
91
|
+
let flag=false
|
92
|
+
//如果没传值得话 不过滤
|
93
|
+
if(this.parentresid.length==0&&this.restype=='organization'){
|
94
|
+
flag=true
|
95
|
+
}
|
96
|
+
this.parentresid.forEach((item) => {
|
97
|
+
if(item==val.id){
|
98
|
+
flag=true
|
99
|
+
}
|
100
|
+
})
|
101
|
+
return flag;
|
102
|
+
},
|
103
|
+
//资源改变
|
104
|
+
resChange(val){
|
105
|
+
let orgnames=[]
|
106
|
+
Object.keys(this.resoptions).forEach((key) => {
|
107
|
+
if(this.selectres.includes(this.resoptions[key].value))
|
108
|
+
orgnames.push(this.resoptions[key].label)
|
109
|
+
})
|
110
|
+
console.log('资源改变。。', val, orgnames)
|
111
|
+
this.$dispatch('res-select', this.selectres, orgnames)
|
112
|
+
},
|
113
|
+
//获取资源数据
|
114
|
+
async getResList() {
|
115
|
+
|
116
|
+
let http = new HttpResetClass()
|
117
|
+
|
118
|
+
let req = await http.load('POST', '/rs/search', {data: {
|
119
|
+
source: `tool.getFullTree(this.getRights().where(row.getType()==$${this.restype}$))`,
|
120
|
+
userid: this.$login.f.id
|
121
|
+
}}, {resolveMsg: null, rejectMsg: '获取组织结构数据出错'})
|
122
|
+
this.resObj=req.data[0]
|
123
|
+
this.dealdata()
|
124
|
+
},
|
125
|
+
dealdata(){
|
126
|
+
this.resoptions=[]
|
127
|
+
this.findById(this.resObj);
|
128
|
+
//赋值资源数据
|
129
|
+
let arryselect=[]
|
130
|
+
this.resoptions.forEach((item) => {
|
131
|
+
if(this.initresid.length>0){
|
132
|
+
this.initresid.forEach((init) => {
|
133
|
+
if(item.value==init){
|
134
|
+
arryselect.push(item.value)
|
135
|
+
}
|
136
|
+
})
|
137
|
+
}
|
138
|
+
})
|
139
|
+
//赋值资源选中初始值
|
140
|
+
this.selectres=arryselect
|
141
|
+
}
|
142
|
+
},
|
143
|
+
watch: {
|
144
|
+
//监听初始化资源id
|
145
|
+
'initresid.length'(){
|
146
|
+
this.dealdata()
|
147
|
+
},
|
148
|
+
//监听初始化资源id
|
149
|
+
'parentresid'(){
|
150
|
+
this.dealdata()
|
151
|
+
},
|
152
|
+
},
|
153
|
+
}
|
154
|
+
</script>
|
@@ -1,159 +1,159 @@
|
|
1
|
-
<template>
|
2
|
-
<div :class="style" v-show="companyshow">
|
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" v-show="departmentshow">
|
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" v-show="operatorshow">
|
17
|
-
<label class="font_normal_body">人  员</label>
|
18
|
-
<res-select restype='user'
|
19
|
-
@res-select="getuser"
|
20
|
-
:parentresid="depresid"
|
21
|
-
:initresid='initres.user'
|
22
|
-
:is-mul="mul">
|
23
|
-
</res-select>
|
24
|
-
</div>
|
25
|
-
<div :class="style " v-show="sliceareashow" >
|
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
|
-
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']
|
54
|
-
}
|
55
|
-
},
|
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
|
-
}
|
72
|
-
}
|
73
|
-
},
|
74
|
-
ready () {
|
75
|
-
console.log('开始获取组织结构。。。')
|
76
|
-
this.initComponent();
|
77
|
-
this.initAreas(this.$login.f.orgid)
|
78
|
-
},
|
79
|
-
methods:{
|
80
|
-
initComponent(){
|
81
|
-
let self=this;
|
82
|
-
this.showComponent.find((item)=>{
|
83
|
-
switch(item){
|
84
|
-
case 'company': self.companyshow=true; break;
|
85
|
-
case 'department': self.departmentshow=true; break;
|
86
|
-
case 'operator': self.operatorshow=true; break;
|
87
|
-
case 'slicearea': self.sliceareashow=true; break;
|
88
|
-
}
|
89
|
-
})
|
90
|
-
},
|
91
|
-
// 初始化片区
|
92
|
-
async initAreas (val) {
|
93
|
-
if (val) {
|
94
|
-
let http = new HttpResetClass()
|
95
|
-
let getAllArea = await http.load('POST', '/rs/search', {
|
96
|
-
source: 'this.getParentByType($organization$).getAllChildrens().where(row.getType() == $zone$)',
|
97
|
-
userid: this.$login.f.id
|
98
|
-
}, {resolveMsg: null, rejectMsg: '获取片区出错!!!'})
|
99
|
-
let arr = getAllArea.data.filter((res) => {
|
100
|
-
return res.parentid == val
|
101
|
-
})
|
102
|
-
console.log('过滤之后的片区', arr)
|
103
|
-
this.sliceArea = []
|
104
|
-
arr.forEach((res) => {
|
105
|
-
this.sliceArea.push({label: res.name, value: {name: res.name, code:res.number}})
|
106
|
-
})
|
107
|
-
}
|
108
|
-
},
|
109
|
-
returnOrg(ids){
|
110
|
-
|
111
|
-
let condition;
|
112
|
-
if(this.depresid.length > 0)
|
113
|
-
condition = " and f_orgid in " + plugin.convertToIn(this.depresid);
|
114
|
-
else
|
115
|
-
condition = " and f_orgid = " + this.$login.f.orgid;
|
116
|
-
if(this.userresid.length > 0){
|
117
|
-
condition += " and f_depname in " + plugin.convertToIn(this.obj.depnames);
|
118
|
-
}
|
119
|
-
if(ids && ids.length > 0){
|
120
|
-
condition += " and f_operatorid in " + plugin.convertToIn(ids);
|
121
|
-
}
|
122
|
-
if(this.slice_area.length>0){
|
123
|
-
condition += " and f_zones = '" + this.slice_area[0].name+"'"
|
124
|
-
}
|
125
|
-
this.$dispatch('re-res',condition,this.obj)
|
126
|
-
},
|
127
|
-
getorg (obj) {
|
128
|
-
console.log("选中公司的数据11",obj.resids)
|
129
|
-
this.depresid=obj.resids
|
130
|
-
this.obj.orgnames = obj.res
|
131
|
-
this.initAreas(obj.resids)
|
132
|
-
this.returnOrg();
|
133
|
-
},
|
134
|
-
getdep(obj,val) {
|
135
|
-
console.log("选中部门的数据22",obj)
|
136
|
-
this.obj.depnames = val
|
137
|
-
this.userresid=obj
|
138
|
-
this.returnOrg();
|
139
|
-
},
|
140
|
-
getuser(obj) {
|
141
|
-
this.obj.operatornames = obj
|
142
|
-
console.log("选中用户的数据33",obj)
|
143
|
-
this.returnOrg(obj);
|
144
|
-
},
|
145
|
-
getarea(val) {
|
146
|
-
this.slice_area=val
|
147
|
-
console.log("选中的大区",val)
|
148
|
-
if(this.obj.operatornames){
|
149
|
-
this.returnOrg(this.obj.operatornames);
|
150
|
-
}else{
|
151
|
-
this.returnOrg();
|
152
|
-
}
|
153
|
-
}
|
154
|
-
},
|
155
|
-
watch: {
|
156
|
-
|
157
|
-
}
|
158
|
-
}
|
159
|
-
</script>
|
1
|
+
<template>
|
2
|
+
<div :class="style" v-show="companyshow">
|
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" v-show="departmentshow">
|
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" v-show="operatorshow">
|
17
|
+
<label class="font_normal_body">人  员</label>
|
18
|
+
<res-select restype='user'
|
19
|
+
@res-select="getuser"
|
20
|
+
:parentresid="depresid"
|
21
|
+
:initresid='initres.user'
|
22
|
+
:is-mul="mul">
|
23
|
+
</res-select>
|
24
|
+
</div>
|
25
|
+
<div :class="style " v-show="sliceareashow" >
|
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
|
+
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']
|
54
|
+
}
|
55
|
+
},
|
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
|
+
}
|
72
|
+
}
|
73
|
+
},
|
74
|
+
ready () {
|
75
|
+
console.log('开始获取组织结构。。。')
|
76
|
+
this.initComponent();
|
77
|
+
this.initAreas(this.$login.f.orgid)
|
78
|
+
},
|
79
|
+
methods:{
|
80
|
+
initComponent(){
|
81
|
+
let self=this;
|
82
|
+
this.showComponent.find((item)=>{
|
83
|
+
switch(item){
|
84
|
+
case 'company': self.companyshow=true; break;
|
85
|
+
case 'department': self.departmentshow=true; break;
|
86
|
+
case 'operator': self.operatorshow=true; break;
|
87
|
+
case 'slicearea': self.sliceareashow=true; break;
|
88
|
+
}
|
89
|
+
})
|
90
|
+
},
|
91
|
+
// 初始化片区
|
92
|
+
async initAreas (val) {
|
93
|
+
if (val) {
|
94
|
+
let http = new HttpResetClass()
|
95
|
+
let getAllArea = await http.load('POST', '/rs/search', {
|
96
|
+
source: 'this.getParentByType($organization$).getAllChildrens().where(row.getType() == $zone$)',
|
97
|
+
userid: this.$login.f.id
|
98
|
+
}, {resolveMsg: null, rejectMsg: '获取片区出错!!!'})
|
99
|
+
let arr = getAllArea.data.filter((res) => {
|
100
|
+
return res.parentid == val
|
101
|
+
})
|
102
|
+
console.log('过滤之后的片区', arr)
|
103
|
+
this.sliceArea = []
|
104
|
+
arr.forEach((res) => {
|
105
|
+
this.sliceArea.push({label: res.name, value: {name: res.name, code:res.number}})
|
106
|
+
})
|
107
|
+
}
|
108
|
+
},
|
109
|
+
returnOrg(ids){
|
110
|
+
|
111
|
+
let condition;
|
112
|
+
if(this.depresid.length > 0)
|
113
|
+
condition = " and f_orgid in " + plugin.convertToIn(this.depresid);
|
114
|
+
else
|
115
|
+
condition = " and f_orgid = " + this.$login.f.orgid;
|
116
|
+
if(this.userresid.length > 0){
|
117
|
+
condition += " and f_depname in " + plugin.convertToIn(this.obj.depnames);
|
118
|
+
}
|
119
|
+
if(ids && ids.length > 0){
|
120
|
+
condition += " and f_operatorid in " + plugin.convertToIn(ids);
|
121
|
+
}
|
122
|
+
if(this.slice_area.length>0){
|
123
|
+
condition += " and f_zones = '" + this.slice_area[0].name+"'"
|
124
|
+
}
|
125
|
+
this.$dispatch('re-res',condition,this.obj)
|
126
|
+
},
|
127
|
+
getorg (obj) {
|
128
|
+
console.log("选中公司的数据11",obj.resids)
|
129
|
+
this.depresid=obj.resids
|
130
|
+
this.obj.orgnames = obj.res
|
131
|
+
this.initAreas(obj.resids)
|
132
|
+
this.returnOrg();
|
133
|
+
},
|
134
|
+
getdep(obj,val) {
|
135
|
+
console.log("选中部门的数据22",obj)
|
136
|
+
this.obj.depnames = val
|
137
|
+
this.userresid=obj
|
138
|
+
this.returnOrg();
|
139
|
+
},
|
140
|
+
getuser(obj) {
|
141
|
+
this.obj.operatornames = obj
|
142
|
+
console.log("选中用户的数据33",obj)
|
143
|
+
this.returnOrg(obj);
|
144
|
+
},
|
145
|
+
getarea(val) {
|
146
|
+
this.slice_area=val
|
147
|
+
console.log("选中的大区",val)
|
148
|
+
if(this.obj.operatornames){
|
149
|
+
this.returnOrg(this.obj.operatornames);
|
150
|
+
}else{
|
151
|
+
this.returnOrg();
|
152
|
+
}
|
153
|
+
}
|
154
|
+
},
|
155
|
+
watch: {
|
156
|
+
|
157
|
+
}
|
158
|
+
}
|
159
|
+
</script>
|