system-phone 3.0.15 → 3.0.17
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/AttendManage.vue +461 -397
- package/src/components/OnlineManage.vue +47 -12
- package/src/components/RightTree.vue +217 -217
- package/src/components/ToolsPage.vue +175 -175
- package/.gradle/7.5.1/checksums/checksums.lock +0 -0
- package/.gradle/7.5.1/dependencies-accessors/dependencies-accessors.lock +0 -0
- package/.gradle/7.5.1/dependencies-accessors/gc.properties +0 -0
- package/.gradle/7.5.1/executionHistory/executionHistory.bin +0 -0
- package/.gradle/7.5.1/executionHistory/executionHistory.lock +0 -0
- package/.gradle/7.5.1/fileChanges/last-build.bin +0 -0
- package/.gradle/7.5.1/fileHashes/fileHashes.bin +0 -0
- package/.gradle/7.5.1/fileHashes/fileHashes.lock +0 -0
- package/.gradle/7.5.1/gc.properties +0 -0
- package/.gradle/buildOutputCleanup/outputFiles.bin +0 -0
|
@@ -6,7 +6,9 @@
|
|
|
6
6
|
<div class="badge" v-show="tab.name == '维修派发'">
|
|
7
7
|
<div class="badge-content">{{ pointNum?pointNum:0 }}</div>
|
|
8
8
|
</div>
|
|
9
|
-
|
|
9
|
+
<div class="badge" v-show="tab.name == '抄表待办'">
|
|
10
|
+
<div class="badge-content">{{ meterNum?meterNum:0 }}</div>
|
|
11
|
+
</div>
|
|
10
12
|
<div class="badge" v-show="tab.name == '信息公告'">
|
|
11
13
|
<div class="badge-content">{{ infoNum?infoNum:0 }}</div>
|
|
12
14
|
</div>
|
|
@@ -40,8 +42,8 @@
|
|
|
40
42
|
beforeName: '在线业务',
|
|
41
43
|
sourcet: '竖屏',
|
|
42
44
|
pointNum: null,
|
|
43
|
-
infoNum:null
|
|
44
|
-
|
|
45
|
+
infoNum:null,
|
|
46
|
+
meterNum:null
|
|
45
47
|
}
|
|
46
48
|
},
|
|
47
49
|
ready () {
|
|
@@ -117,19 +119,40 @@
|
|
|
117
119
|
},
|
|
118
120
|
getTabs(){
|
|
119
121
|
this.getRepairNum()
|
|
120
|
-
debugger
|
|
121
122
|
this.getInfoNum()
|
|
123
|
+
this.getmeterNum()
|
|
122
124
|
for(let funs in Vue.functions){
|
|
123
125
|
if(Vue.functions[funs].link == 'online-manage'){
|
|
124
126
|
return Vue.functions[funs].children
|
|
125
127
|
}
|
|
126
128
|
}
|
|
127
129
|
},
|
|
130
|
+
getmeterNum() {
|
|
131
|
+
if (!Vue.android || !Vue.come || !Vue.come == 'tongchuan') {
|
|
132
|
+
return
|
|
133
|
+
}
|
|
134
|
+
window.setInterval( ()=> {
|
|
135
|
+
let val = {
|
|
136
|
+
items:"*",
|
|
137
|
+
tablename:"t_handplan",
|
|
138
|
+
orderitem:"id desc",
|
|
139
|
+
condition:`1=1 and f_inputtor = '${Vue.user.name}' and f_hand_state = '有效' and f_meter_state = '未抄表'`,
|
|
140
|
+
f_orgid:`'${Vue.user.orgid}'`
|
|
141
|
+
}
|
|
142
|
+
let http = new HttpResetClass()
|
|
143
|
+
http.load('POST', `${this.$androidUtil.getProxyUrl()}/rs/sql/tel_singleTable_OrderBy`, {data: val}, {
|
|
144
|
+
resolveMsg: null,
|
|
145
|
+
rejectMsg: null
|
|
146
|
+
}).then((res) => {
|
|
147
|
+
this.meterNum = res.data.length
|
|
148
|
+
})
|
|
149
|
+
},100000)
|
|
150
|
+
this.timeOutGetmeterNum()
|
|
151
|
+
},
|
|
128
152
|
getInfoNum() {
|
|
129
153
|
if (!Vue.android || !Vue.come || !Vue.come == 'tongchuan') {
|
|
130
154
|
return
|
|
131
155
|
}
|
|
132
|
-
debugger
|
|
133
156
|
window.setInterval( ()=> {
|
|
134
157
|
let val = {
|
|
135
158
|
items:"*",
|
|
@@ -144,14 +167,11 @@
|
|
|
144
167
|
rejectMsg: null
|
|
145
168
|
}).then((res) => {
|
|
146
169
|
this.infoNum = res.data.length
|
|
147
|
-
debugger
|
|
148
|
-
console.log("this.infoNum的值是:",this.infoNum)
|
|
149
170
|
})
|
|
150
|
-
},
|
|
171
|
+
},100000)
|
|
151
172
|
this.timeOutGetInfoNum()
|
|
152
173
|
},
|
|
153
174
|
getRepairNum() {
|
|
154
|
-
debugger
|
|
155
175
|
if (!Vue.android || !Vue.come || !Vue.come == 'tongchuan') {
|
|
156
176
|
return
|
|
157
177
|
}
|
|
@@ -171,11 +191,11 @@
|
|
|
171
191
|
}).then((res) => {
|
|
172
192
|
this.pointNum = res.data.length
|
|
173
193
|
})
|
|
174
|
-
},
|
|
194
|
+
},100000)
|
|
175
195
|
this.timeOutGetRepairNum()
|
|
176
196
|
},
|
|
177
197
|
timeOutGetRepairNum(){
|
|
178
|
-
|
|
198
|
+
|
|
179
199
|
let condition = `1 = 1 and f_workorder_type = '报修单' and f_state = null `
|
|
180
200
|
let val = {
|
|
181
201
|
condition: {
|
|
@@ -193,7 +213,6 @@
|
|
|
193
213
|
})
|
|
194
214
|
},
|
|
195
215
|
timeOutGetInfoNum(){
|
|
196
|
-
debugger
|
|
197
216
|
let val = {
|
|
198
217
|
items:"*",
|
|
199
218
|
tablename:"T_STOPGAS",
|
|
@@ -209,6 +228,22 @@
|
|
|
209
228
|
this.infoNum = res.data.length
|
|
210
229
|
})
|
|
211
230
|
},
|
|
231
|
+
timeOutGetmeterNum(){
|
|
232
|
+
let val = {
|
|
233
|
+
items:"*",
|
|
234
|
+
tablename:"t_handplan",
|
|
235
|
+
orderitem:"id desc",
|
|
236
|
+
condition:`1=1 and f_inputtor = '${Vue.user.name}' and f_hand_state = '有效' and f_meter_state = '未抄表'`,
|
|
237
|
+
f_orgid:`'${Vue.user.orgid}'`
|
|
238
|
+
}
|
|
239
|
+
let http = new HttpResetClass()
|
|
240
|
+
http.load('POST', `${this.$androidUtil.getProxyUrl()}/rs/sql/tel_singleTable_OrderBy`, {data: val}, {
|
|
241
|
+
resolveMsg: null,
|
|
242
|
+
rejectMsg: null
|
|
243
|
+
}).then((res) => {
|
|
244
|
+
this.meterNum = res.data.length
|
|
245
|
+
})
|
|
246
|
+
},
|
|
212
247
|
imgback(val){
|
|
213
248
|
return require('../assets/'+val+'.png')
|
|
214
249
|
},
|
|
@@ -1,217 +1,217 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<dropdown :model='model' class="auto" id="res-tree" v-if="!islist" v-el:dropdown :style="{width:width}">
|
|
3
|
-
<button type="button" class="btn btn-default dropdown-toggle select-style" data-toggle="dropdown">
|
|
4
|
-
<span class='btn-content' :style="{textOverflow:'ellipsis',overflow: 'hidden'}">{{ resname }}</span>
|
|
5
|
-
<span class="caret"></span>
|
|
6
|
-
</button>
|
|
7
|
-
<tree :model='model' :is-click="false" slot="dropdown-menu" class="dropdown-menu auto" role="menu">
|
|
8
|
-
<span partial>
|
|
9
|
-
<span class="glyphicon glyphicon-chevron-down" v-show="row.open&&row.data.children.length>0" style="color:balck;"></span>
|
|
10
|
-
<span class="glyphicon glyphicon-chevron-right" v-show="!row.open&&row.data.children.length>0" style="color:balck;"></span>
|
|
11
|
-
<span class="RightTreeCanSelect" v-if="row.data.hasright" @click.stop="$parent.$parent.$parent.selectclick(row.data)">{{row.data.name}}</span>
|
|
12
|
-
<span class="RightTreeCanNotSelect" v-else>{{row.data.name}}</span>
|
|
13
|
-
<span class="glyphicon glyphicon-ok " v-if="$parent.$parent.$parent.isSelect(row.data.id)" style="color:balck;"></span>
|
|
14
|
-
</span>
|
|
15
|
-
</tree>
|
|
16
|
-
</dropdown>
|
|
17
|
-
<v-select v-if="islist"
|
|
18
|
-
placeholder='请选择'
|
|
19
|
-
:options='childrenOptions'
|
|
20
|
-
@change="selectclick"
|
|
21
|
-
:value-single="true"
|
|
22
|
-
close-on-select></v-select>
|
|
23
|
-
</template>
|
|
24
|
-
<script>
|
|
25
|
-
import * as ldapHelper from './../util/LdapHelper'
|
|
26
|
-
import Vue from 'vue'
|
|
27
|
-
export default {
|
|
28
|
-
title: '资源树',
|
|
29
|
-
props: {
|
|
30
|
-
source: {
|
|
31
|
-
type: String,
|
|
32
|
-
require: true,
|
|
33
|
-
default:`tool.getFullTree(this.getRights().where(row.getType() == $organization$))`
|
|
34
|
-
},
|
|
35
|
-
resid: {
|
|
36
|
-
},
|
|
37
|
-
islist: {
|
|
38
|
-
type: Boolean,
|
|
39
|
-
default: false
|
|
40
|
-
},
|
|
41
|
-
//是否有查看上级的权限
|
|
42
|
-
Url:{
|
|
43
|
-
type: String,
|
|
44
|
-
default:''
|
|
45
|
-
}
|
|
46
|
-
},
|
|
47
|
-
data () {
|
|
48
|
-
return {
|
|
49
|
-
width:'100%',
|
|
50
|
-
resobj:{res:Vue.user.orgs, resids:Vue.user.orgid},
|
|
51
|
-
userid: Vue.user.id,
|
|
52
|
-
resname:[Vue.user.orgs],
|
|
53
|
-
orgnames : [Vue.user.orgs],
|
|
54
|
-
orgids : [Vue.user.orgid],
|
|
55
|
-
orgobj:[],
|
|
56
|
-
model: [
|
|
57
|
-
|
|
58
|
-
],
|
|
59
|
-
childrenOptions: []
|
|
60
|
-
}
|
|
61
|
-
},
|
|
62
|
-
methods: {
|
|
63
|
-
selectRes () {
|
|
64
|
-
let newobj={
|
|
65
|
-
"res": [this.resname],
|
|
66
|
-
"resids": [this.orgids],
|
|
67
|
-
}
|
|
68
|
-
this.$emit('re-res', newobj)
|
|
69
|
-
},
|
|
70
|
-
//点击资源的方法
|
|
71
|
-
selectclick (row) {
|
|
72
|
-
if(this.orgids.includes(row.id)){
|
|
73
|
-
this.orgnames=[]
|
|
74
|
-
this.orgids=[]
|
|
75
|
-
this.removeResChild(row)
|
|
76
|
-
this.orgnames.push(row.name)
|
|
77
|
-
this.orgids.push(row.id)
|
|
78
|
-
this.orgobj.push(row)
|
|
79
|
-
}else{
|
|
80
|
-
this.orgnames=[]
|
|
81
|
-
this.orgids=[]
|
|
82
|
-
this.orgobj=[]
|
|
83
|
-
this.addResChild(row)
|
|
84
|
-
}
|
|
85
|
-
console.log(this.orgnames.join(','))
|
|
86
|
-
this.resname = this.orgnames.length > 0 ? this.orgnames.join(','):'请选择'
|
|
87
|
-
let newobj={
|
|
88
|
-
"res": this.orgnames,
|
|
89
|
-
"resids": this.orgids,
|
|
90
|
-
"orgobj": this.orgobj,
|
|
91
|
-
}
|
|
92
|
-
this.$emit('re-res', newobj)
|
|
93
|
-
},
|
|
94
|
-
addResChild(val){
|
|
95
|
-
// if(this.orgids.includes(val.id)){
|
|
96
|
-
// this.orgnames.splice(this.orgnames.indexOf(val.name),1)
|
|
97
|
-
// this.orgids.splice(this.orgids.indexOf(val.id),1)
|
|
98
|
-
// }
|
|
99
|
-
this.orgnames.push(val.name)
|
|
100
|
-
this.orgids.push(val.id)
|
|
101
|
-
this.orgobj.push(val)
|
|
102
|
-
if(val.children && val.children.length>0){
|
|
103
|
-
Object.keys(val.children).forEach((key) => {
|
|
104
|
-
this.addResChild(val.children[key])
|
|
105
|
-
})
|
|
106
|
-
}
|
|
107
|
-
},
|
|
108
|
-
removeResChild(val){
|
|
109
|
-
this.orgnames.splice(this.orgnames.indexOf(val.name),1)
|
|
110
|
-
this.orgids.splice(this.orgids.indexOf(val.id),1)
|
|
111
|
-
this.orgobj.splice(this.orgids.indexOf(val),1)
|
|
112
|
-
if(val.children && val.children.length>0){
|
|
113
|
-
Object.keys(val.children).forEach((key) => {
|
|
114
|
-
this.removeResChild(val.children[key])
|
|
115
|
-
})
|
|
116
|
-
}
|
|
117
|
-
},
|
|
118
|
-
//检查是否显示对勾
|
|
119
|
-
isSelect(val) {
|
|
120
|
-
if(this.orgids.includes(val)){
|
|
121
|
-
return true
|
|
122
|
-
}else{
|
|
123
|
-
return false
|
|
124
|
-
}
|
|
125
|
-
},
|
|
126
|
-
//树形结构变成list
|
|
127
|
-
treetoList(val) {
|
|
128
|
-
for (let value of val) {
|
|
129
|
-
this.ergodicList(value)
|
|
130
|
-
}
|
|
131
|
-
},
|
|
132
|
-
//找到跟节点
|
|
133
|
-
ergodicList (val) {
|
|
134
|
-
val.children.length > 0 ? this.treetoList(val.children) : this.childrenOptions.push({label: val.name, value: val})
|
|
135
|
-
},
|
|
136
|
-
//处理显示默认值
|
|
137
|
-
dealResObj (val) {
|
|
138
|
-
try{
|
|
139
|
-
var arr=val.res.split(".")
|
|
140
|
-
//截取最后一个分公司名字
|
|
141
|
-
this.resname=arr[arr.length-1].toString()
|
|
142
|
-
this.resid = val.resids
|
|
143
|
-
}catch (e){
|
|
144
|
-
this.resname='请选择组织'
|
|
145
|
-
}
|
|
146
|
-
},
|
|
147
|
-
judgBoundary(){
|
|
148
|
-
//判断是否超出边界,超出移动
|
|
149
|
-
if(document.documentElement.offsetWidth< this.$els.dropdown.getBoundingClientRect().right){
|
|
150
|
-
this.left = document.documentElement.offsetWidth - this.$els.dropdown.getBoundingClientRect().right - 25
|
|
151
|
-
}
|
|
152
|
-
}
|
|
153
|
-
},
|
|
154
|
-
events: {
|
|
155
|
-
|
|
156
|
-
},
|
|
157
|
-
ready () {
|
|
158
|
-
console.log('righttree ready')
|
|
159
|
-
if(this.$els.dropdown){
|
|
160
|
-
console.log('righttree1')
|
|
161
|
-
this.width = this.$els.dropdown.clientWidth * 0.7 +'px'
|
|
162
|
-
}
|
|
163
|
-
console.log('righttree2')
|
|
164
|
-
this.dealResObj (this.resobj)
|
|
165
|
-
console.log('righttree3')
|
|
166
|
-
var data = {
|
|
167
|
-
source: this.source,
|
|
168
|
-
userid: this.userid
|
|
169
|
-
}
|
|
170
|
-
console.log('向资源服务发送请求')
|
|
171
|
-
this.$resetpost(`${this.$androidUtil.getProxyUrl()}/rs/search`, data,{
|
|
172
|
-
resolveMsg : null ,
|
|
173
|
-
rejectMsg : null,
|
|
174
|
-
}).then((ret) => {
|
|
175
|
-
console.log('向资源服务请求结束')
|
|
176
|
-
// 去掉前面的两层节点
|
|
177
|
-
ret.data[0].children[0].children.forEach((item) => {
|
|
178
|
-
this.model.push(item)
|
|
179
|
-
})
|
|
180
|
-
// 给资源添加父关系
|
|
181
|
-
ldapHelper.procParent(this.model)
|
|
182
|
-
if (this.islist) {
|
|
183
|
-
this.treetoList(this.model)
|
|
184
|
-
}
|
|
185
|
-
this.selectRes()
|
|
186
|
-
})
|
|
187
|
-
},
|
|
188
|
-
watch: {
|
|
189
|
-
}
|
|
190
|
-
}
|
|
191
|
-
</script>
|
|
192
|
-
<style lang="less">
|
|
193
|
-
#res-tree {
|
|
194
|
-
.list-group-item {
|
|
195
|
-
background-color: #FFF;
|
|
196
|
-
color: #000;
|
|
197
|
-
padding: 5px 10px;
|
|
198
|
-
border:0px;
|
|
199
|
-
white-space: nowrap;
|
|
200
|
-
}
|
|
201
|
-
}
|
|
202
|
-
#res-tree .list-group {
|
|
203
|
-
width: auto;
|
|
204
|
-
min-width: 100%;
|
|
205
|
-
}
|
|
206
|
-
.hide-text-overflow{
|
|
207
|
-
overflow: hidden;
|
|
208
|
-
text-overflow: ellipsis
|
|
209
|
-
}
|
|
210
|
-
.select-style {
|
|
211
|
-
border: 0px;
|
|
212
|
-
/*border-bottom: 2px solid #C9CCCF;*/
|
|
213
|
-
border: 1px solid #93B2D3;
|
|
214
|
-
border-radius: 0px;
|
|
215
|
-
color: #555;
|
|
216
|
-
}
|
|
217
|
-
</style>
|
|
1
|
+
<template>
|
|
2
|
+
<dropdown :model='model' class="auto" id="res-tree" v-if="!islist" v-el:dropdown :style="{width:width}">
|
|
3
|
+
<button type="button" class="btn btn-default dropdown-toggle select-style" data-toggle="dropdown">
|
|
4
|
+
<span class='btn-content' :style="{textOverflow:'ellipsis',overflow: 'hidden'}">{{ resname }}</span>
|
|
5
|
+
<span class="caret"></span>
|
|
6
|
+
</button>
|
|
7
|
+
<tree :model='model' :is-click="false" slot="dropdown-menu" class="dropdown-menu auto" role="menu">
|
|
8
|
+
<span partial>
|
|
9
|
+
<span class="glyphicon glyphicon-chevron-down" v-show="row.open&&row.data.children.length>0" style="color:balck;"></span>
|
|
10
|
+
<span class="glyphicon glyphicon-chevron-right" v-show="!row.open&&row.data.children.length>0" style="color:balck;"></span>
|
|
11
|
+
<span class="RightTreeCanSelect" v-if="row.data.hasright" @click.stop="$parent.$parent.$parent.selectclick(row.data)">{{row.data.name}}</span>
|
|
12
|
+
<span class="RightTreeCanNotSelect" v-else>{{row.data.name}}</span>
|
|
13
|
+
<span class="glyphicon glyphicon-ok " v-if="$parent.$parent.$parent.isSelect(row.data.id)" style="color:balck;"></span>
|
|
14
|
+
</span>
|
|
15
|
+
</tree>
|
|
16
|
+
</dropdown>
|
|
17
|
+
<v-select v-if="islist"
|
|
18
|
+
placeholder='请选择'
|
|
19
|
+
:options='childrenOptions'
|
|
20
|
+
@change="selectclick"
|
|
21
|
+
:value-single="true"
|
|
22
|
+
close-on-select></v-select>
|
|
23
|
+
</template>
|
|
24
|
+
<script>
|
|
25
|
+
import * as ldapHelper from './../util/LdapHelper'
|
|
26
|
+
import Vue from 'vue'
|
|
27
|
+
export default {
|
|
28
|
+
title: '资源树',
|
|
29
|
+
props: {
|
|
30
|
+
source: {
|
|
31
|
+
type: String,
|
|
32
|
+
require: true,
|
|
33
|
+
default:`tool.getFullTree(this.getRights().where(row.getType() == $organization$))`
|
|
34
|
+
},
|
|
35
|
+
resid: {
|
|
36
|
+
},
|
|
37
|
+
islist: {
|
|
38
|
+
type: Boolean,
|
|
39
|
+
default: false
|
|
40
|
+
},
|
|
41
|
+
//是否有查看上级的权限
|
|
42
|
+
Url:{
|
|
43
|
+
type: String,
|
|
44
|
+
default:''
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
data () {
|
|
48
|
+
return {
|
|
49
|
+
width:'100%',
|
|
50
|
+
resobj:{res:Vue.user.orgs, resids:Vue.user.orgid},
|
|
51
|
+
userid: Vue.user.id,
|
|
52
|
+
resname:[Vue.user.orgs],
|
|
53
|
+
orgnames : [Vue.user.orgs],
|
|
54
|
+
orgids : [Vue.user.orgid],
|
|
55
|
+
orgobj:[],
|
|
56
|
+
model: [
|
|
57
|
+
|
|
58
|
+
],
|
|
59
|
+
childrenOptions: []
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
methods: {
|
|
63
|
+
selectRes () {
|
|
64
|
+
let newobj={
|
|
65
|
+
"res": [this.resname],
|
|
66
|
+
"resids": [this.orgids],
|
|
67
|
+
}
|
|
68
|
+
this.$emit('re-res', newobj)
|
|
69
|
+
},
|
|
70
|
+
//点击资源的方法
|
|
71
|
+
selectclick (row) {
|
|
72
|
+
if(this.orgids.includes(row.id)){
|
|
73
|
+
this.orgnames=[]
|
|
74
|
+
this.orgids=[]
|
|
75
|
+
this.removeResChild(row)
|
|
76
|
+
this.orgnames.push(row.name)
|
|
77
|
+
this.orgids.push(row.id)
|
|
78
|
+
this.orgobj.push(row)
|
|
79
|
+
}else{
|
|
80
|
+
this.orgnames=[]
|
|
81
|
+
this.orgids=[]
|
|
82
|
+
this.orgobj=[]
|
|
83
|
+
this.addResChild(row)
|
|
84
|
+
}
|
|
85
|
+
console.log(this.orgnames.join(','))
|
|
86
|
+
this.resname = this.orgnames.length > 0 ? this.orgnames.join(','):'请选择'
|
|
87
|
+
let newobj={
|
|
88
|
+
"res": this.orgnames,
|
|
89
|
+
"resids": this.orgids,
|
|
90
|
+
"orgobj": this.orgobj,
|
|
91
|
+
}
|
|
92
|
+
this.$emit('re-res', newobj)
|
|
93
|
+
},
|
|
94
|
+
addResChild(val){
|
|
95
|
+
// if(this.orgids.includes(val.id)){
|
|
96
|
+
// this.orgnames.splice(this.orgnames.indexOf(val.name),1)
|
|
97
|
+
// this.orgids.splice(this.orgids.indexOf(val.id),1)
|
|
98
|
+
// }
|
|
99
|
+
this.orgnames.push(val.name)
|
|
100
|
+
this.orgids.push(val.id)
|
|
101
|
+
this.orgobj.push(val)
|
|
102
|
+
if(val.children && val.children.length>0){
|
|
103
|
+
Object.keys(val.children).forEach((key) => {
|
|
104
|
+
this.addResChild(val.children[key])
|
|
105
|
+
})
|
|
106
|
+
}
|
|
107
|
+
},
|
|
108
|
+
removeResChild(val){
|
|
109
|
+
this.orgnames.splice(this.orgnames.indexOf(val.name),1)
|
|
110
|
+
this.orgids.splice(this.orgids.indexOf(val.id),1)
|
|
111
|
+
this.orgobj.splice(this.orgids.indexOf(val),1)
|
|
112
|
+
if(val.children && val.children.length>0){
|
|
113
|
+
Object.keys(val.children).forEach((key) => {
|
|
114
|
+
this.removeResChild(val.children[key])
|
|
115
|
+
})
|
|
116
|
+
}
|
|
117
|
+
},
|
|
118
|
+
//检查是否显示对勾
|
|
119
|
+
isSelect(val) {
|
|
120
|
+
if(this.orgids.includes(val)){
|
|
121
|
+
return true
|
|
122
|
+
}else{
|
|
123
|
+
return false
|
|
124
|
+
}
|
|
125
|
+
},
|
|
126
|
+
//树形结构变成list
|
|
127
|
+
treetoList(val) {
|
|
128
|
+
for (let value of val) {
|
|
129
|
+
this.ergodicList(value)
|
|
130
|
+
}
|
|
131
|
+
},
|
|
132
|
+
//找到跟节点
|
|
133
|
+
ergodicList (val) {
|
|
134
|
+
val.children.length > 0 ? this.treetoList(val.children) : this.childrenOptions.push({label: val.name, value: val})
|
|
135
|
+
},
|
|
136
|
+
//处理显示默认值
|
|
137
|
+
dealResObj (val) {
|
|
138
|
+
try{
|
|
139
|
+
var arr=val.res.split(".")
|
|
140
|
+
//截取最后一个分公司名字
|
|
141
|
+
this.resname=arr[arr.length-1].toString()
|
|
142
|
+
this.resid = val.resids
|
|
143
|
+
}catch (e){
|
|
144
|
+
this.resname='请选择组织'
|
|
145
|
+
}
|
|
146
|
+
},
|
|
147
|
+
judgBoundary(){
|
|
148
|
+
//判断是否超出边界,超出移动
|
|
149
|
+
if(document.documentElement.offsetWidth< this.$els.dropdown.getBoundingClientRect().right){
|
|
150
|
+
this.left = document.documentElement.offsetWidth - this.$els.dropdown.getBoundingClientRect().right - 25
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
},
|
|
154
|
+
events: {
|
|
155
|
+
|
|
156
|
+
},
|
|
157
|
+
ready () {
|
|
158
|
+
console.log('righttree ready')
|
|
159
|
+
if(this.$els.dropdown){
|
|
160
|
+
console.log('righttree1')
|
|
161
|
+
this.width = this.$els.dropdown.clientWidth * 0.7 +'px'
|
|
162
|
+
}
|
|
163
|
+
console.log('righttree2')
|
|
164
|
+
this.dealResObj (this.resobj)
|
|
165
|
+
console.log('righttree3')
|
|
166
|
+
var data = {
|
|
167
|
+
source: this.source,
|
|
168
|
+
userid: this.userid
|
|
169
|
+
}
|
|
170
|
+
console.log('向资源服务发送请求')
|
|
171
|
+
this.$resetpost(`${this.$androidUtil.getProxyUrl()}/rs/search`, data,{
|
|
172
|
+
resolveMsg : null ,
|
|
173
|
+
rejectMsg : null,
|
|
174
|
+
}).then((ret) => {
|
|
175
|
+
console.log('向资源服务请求结束')
|
|
176
|
+
// 去掉前面的两层节点
|
|
177
|
+
ret.data[0].children[0].children.forEach((item) => {
|
|
178
|
+
this.model.push(item)
|
|
179
|
+
})
|
|
180
|
+
// 给资源添加父关系
|
|
181
|
+
ldapHelper.procParent(this.model)
|
|
182
|
+
if (this.islist) {
|
|
183
|
+
this.treetoList(this.model)
|
|
184
|
+
}
|
|
185
|
+
this.selectRes()
|
|
186
|
+
})
|
|
187
|
+
},
|
|
188
|
+
watch: {
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
</script>
|
|
192
|
+
<style lang="less">
|
|
193
|
+
#res-tree {
|
|
194
|
+
.list-group-item {
|
|
195
|
+
background-color: #FFF;
|
|
196
|
+
color: #000;
|
|
197
|
+
padding: 5px 10px;
|
|
198
|
+
border:0px;
|
|
199
|
+
white-space: nowrap;
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
#res-tree .list-group {
|
|
203
|
+
width: auto;
|
|
204
|
+
min-width: 100%;
|
|
205
|
+
}
|
|
206
|
+
.hide-text-overflow{
|
|
207
|
+
overflow: hidden;
|
|
208
|
+
text-overflow: ellipsis
|
|
209
|
+
}
|
|
210
|
+
.select-style {
|
|
211
|
+
border: 0px;
|
|
212
|
+
/*border-bottom: 2px solid #C9CCCF;*/
|
|
213
|
+
border: 1px solid #93B2D3;
|
|
214
|
+
border-radius: 0px;
|
|
215
|
+
color: #555;
|
|
216
|
+
}
|
|
217
|
+
</style>
|