system-phone 3.0.7 → 3.0.9
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/assets/R-C.png +0 -0
- package/src/components/OnlineManage.vue +268 -268
- package/src/components/RightTree.vue +217 -214
- package/src/components/ToolsPage.vue +173 -165
- package/.gradle/buildOutputCleanup/outputFiles.bin +0 -0
package/package.json
CHANGED
|
Binary file
|
|
@@ -1,268 +1,268 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="nav-bgcolor">
|
|
3
|
-
<div class="auto">
|
|
4
|
-
<div class="row nav-bgcolor" >
|
|
5
|
-
<div class="col-xs-6 manbiankuang" v-for="tab in tabs" @click="gotopage(tab.link,tab.name,tab.navigate)">
|
|
6
|
-
<div class="badge" v-show="tab.name == '维修派发'">
|
|
7
|
-
<div class="badge-content">{{ pointNum?pointNum:0 }}</div>
|
|
8
|
-
</div>
|
|
9
|
-
<img class="imgs" :src="imgback(tab.name)" alt="">
|
|
10
|
-
<p></p>
|
|
11
|
-
<p class="pagesfoot">{{tab.name}}</p>
|
|
12
|
-
<!--<p class="pagesfoot">{{tab.name}} {{tab.icon}}</p>-->
|
|
13
|
-
<p></p>
|
|
14
|
-
</div>
|
|
15
|
-
</div>
|
|
16
|
-
<!--<div class="row" style="overflow:auto;">-->
|
|
17
|
-
<!--<repair-first v-show="componentName == 'repair-first'" worktype="报修单" :sourcet="sourcet" tabname="维修待办" v-on:changesum="changesum"></repair-first>-->
|
|
18
|
-
<!--<zhihuan-first v-show="componentName == 'zhihuan-first'" worktype="置换通气单" :sourcet="sourcet" tabname="置换待办" v-on:changesum="changesum"></zhihuan-first>-->
|
|
19
|
-
<!--</div>-->
|
|
20
|
-
</div>
|
|
21
|
-
</div>
|
|
22
|
-
</template>
|
|
23
|
-
|
|
24
|
-
<script scoped>
|
|
25
|
-
import Vue from 'vue'
|
|
26
|
-
import {HttpResetClass} from "vue-client";
|
|
27
|
-
|
|
28
|
-
export default {
|
|
29
|
-
title: '在线业务导航',
|
|
30
|
-
data () {
|
|
31
|
-
return {
|
|
32
|
-
titleName:'在线业务',
|
|
33
|
-
isMenu:true,
|
|
34
|
-
tabs: this.getTabs(),
|
|
35
|
-
text: '导航组件this',
|
|
36
|
-
beforeName: '在线业务',
|
|
37
|
-
sourcet: '竖屏',
|
|
38
|
-
pointNum: null
|
|
39
|
-
|
|
40
|
-
}
|
|
41
|
-
},
|
|
42
|
-
ready () {
|
|
43
|
-
// this.getModelSum()
|
|
44
|
-
},
|
|
45
|
-
|
|
46
|
-
methods: {
|
|
47
|
-
//看去哪个页面
|
|
48
|
-
getModelSum(){
|
|
49
|
-
for(var i = 0;i<this.tabs.length;i++){
|
|
50
|
-
if(this.tabs[i].link == 'readmeter-home' ){
|
|
51
|
-
this.getZhihuan()
|
|
52
|
-
}
|
|
53
|
-
if(this.tabs[i].link == 'weiup-load' ){
|
|
54
|
-
this.getRepair()
|
|
55
|
-
}
|
|
56
|
-
if(this.tabs[i].link == 'upload-page' ){
|
|
57
|
-
this.getSafeCheck()
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
},
|
|
62
|
-
getRepair(){
|
|
63
|
-
var _this = this;
|
|
64
|
-
this.timeoutRepair = window.setInterval(function() {
|
|
65
|
-
let result = _this.$androidUtil.path({'alias':'notUpload','data': {f_workorder_type: '报修单'}})
|
|
66
|
-
if (result.code === 200) {
|
|
67
|
-
console.log('查询得到的代办2' + JSON.stringify(result))
|
|
68
|
-
var crv = {
|
|
69
|
-
title: '维修上传',
|
|
70
|
-
sum: result.data.length
|
|
71
|
-
}
|
|
72
|
-
_this.changesum(crv)
|
|
73
|
-
}
|
|
74
|
-
}, 6000)
|
|
75
|
-
},
|
|
76
|
-
getSafeCheck(){
|
|
77
|
-
var _this = this;
|
|
78
|
-
this.timeoutRepair = window.setInterval(function() {
|
|
79
|
-
let result = _this.$androidUtil.path({'alias':'safecheckNotUpload','data': {}})
|
|
80
|
-
if (result.code === 200) {
|
|
81
|
-
console.log('查询得到的安检上传' + JSON.stringify(result))
|
|
82
|
-
var crv = {
|
|
83
|
-
title: '安检上传',
|
|
84
|
-
sum: result.data.length
|
|
85
|
-
}
|
|
86
|
-
_this.changesum(crv)
|
|
87
|
-
}
|
|
88
|
-
}, 6000)
|
|
89
|
-
},
|
|
90
|
-
getZhihuan(){
|
|
91
|
-
var _this = this;
|
|
92
|
-
this.timeoutZhihuan = window.setInterval(function() {
|
|
93
|
-
let result = {code:200}
|
|
94
|
-
if (result.code === 200) {
|
|
95
|
-
console.log('查询得到的代办2' + JSON.stringify(result))
|
|
96
|
-
var crv = {
|
|
97
|
-
title: '置换上传',
|
|
98
|
-
sum: result.data.length
|
|
99
|
-
}
|
|
100
|
-
_this.changesum(crv)
|
|
101
|
-
}
|
|
102
|
-
}, 6000)
|
|
103
|
-
},
|
|
104
|
-
changesum(titdata){
|
|
105
|
-
for(var i = 0;i<this.tabs.length;i++){
|
|
106
|
-
if(this.tabs[i].name == titdata.title){
|
|
107
|
-
this.tabs[i].icon = titdata.sum + '单'
|
|
108
|
-
console.log(JSON.stringify(this.tabs[i].icon))
|
|
109
|
-
return
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
},
|
|
113
|
-
getTabs(){
|
|
114
|
-
this.getRepairNum()
|
|
115
|
-
for(let funs in Vue.functions){
|
|
116
|
-
if(Vue.functions[funs].link == 'online-manage'){
|
|
117
|
-
return Vue.functions[funs].children
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
},
|
|
121
|
-
getRepairNum() {
|
|
122
|
-
if (!Vue.android || !Vue.come || !Vue.come == 'tongchuan') {
|
|
123
|
-
return
|
|
124
|
-
}
|
|
125
|
-
window.setInterval(function () {
|
|
126
|
-
let condition = `1 = 1 and f_workorder_type = '报修单' and f_state = null `
|
|
127
|
-
let val = {
|
|
128
|
-
condition: {
|
|
129
|
-
condition: condition,
|
|
130
|
-
sign: '1 = 1'
|
|
131
|
-
},
|
|
132
|
-
userid: Vue.user.name
|
|
133
|
-
}
|
|
134
|
-
let http = new HttpResetClass()
|
|
135
|
-
http.load('POST', `${this.$androidUtil.getProxyUrl()}/rs/path/operatorServiceAndroid`, {data: val}, {
|
|
136
|
-
resolveMsg: null,
|
|
137
|
-
rejectMsg: null
|
|
138
|
-
}).then((res) => {
|
|
139
|
-
this.pointNum = res.data.length
|
|
140
|
-
})
|
|
141
|
-
},10000)
|
|
142
|
-
this.timeOutGetRepairNum()
|
|
143
|
-
},
|
|
144
|
-
timeOutGetRepairNum(){
|
|
145
|
-
let condition = `1 = 1 and f_workorder_type = '报修单' and f_state = null `
|
|
146
|
-
let val = {
|
|
147
|
-
condition: {
|
|
148
|
-
condition: condition,
|
|
149
|
-
sign: '1 = 1'
|
|
150
|
-
},
|
|
151
|
-
userid: Vue.user.name
|
|
152
|
-
}
|
|
153
|
-
let http = new HttpResetClass()
|
|
154
|
-
http.load('POST', `${this.$androidUtil.getProxyUrl()}/rs/path/operatorServiceAndroid`, {data: val}, {
|
|
155
|
-
resolveMsg: null,
|
|
156
|
-
rejectMsg: null
|
|
157
|
-
}).then((res) => {
|
|
158
|
-
this.pointNum = res.data.length
|
|
159
|
-
})
|
|
160
|
-
},
|
|
161
|
-
imgback(val){
|
|
162
|
-
return require('../assets/'+val+'.png')
|
|
163
|
-
},
|
|
164
|
-
// 返回主界面
|
|
165
|
-
back(){
|
|
166
|
-
this.titleName = '主界面'
|
|
167
|
-
this.isMenu = true
|
|
168
|
-
|
|
169
|
-
},
|
|
170
|
-
gotopage(param,title,navigate) {
|
|
171
|
-
console.log('进入子组件')
|
|
172
|
-
var prpdata = {
|
|
173
|
-
_this:this,
|
|
174
|
-
title:title,
|
|
175
|
-
safe:false
|
|
176
|
-
}
|
|
177
|
-
this.$dispatch('gotoson',prpdata)
|
|
178
|
-
if(navigate){
|
|
179
|
-
this.$goto('embbed-page', {domainName: navigate, title: title, compName: param, login: Vue.user})
|
|
180
|
-
}else{
|
|
181
|
-
this.$goto(param,{sourcet:'竖屏',tabname:title})
|
|
182
|
-
}
|
|
183
|
-
},
|
|
184
|
-
mute () {
|
|
185
|
-
HostApp.mute()
|
|
186
|
-
}
|
|
187
|
-
},
|
|
188
|
-
}
|
|
189
|
-
</script>
|
|
190
|
-
<style lang="less">
|
|
191
|
-
.badge-content {
|
|
192
|
-
color: #fff;
|
|
193
|
-
box-sizing: border-box;
|
|
194
|
-
min-width: 8px;
|
|
195
|
-
font-size: 9px;
|
|
196
|
-
line-height: 12px;
|
|
197
|
-
white-space: nowrap;
|
|
198
|
-
font-weight: 400;
|
|
199
|
-
text-align: center;
|
|
200
|
-
}
|
|
201
|
-
|
|
202
|
-
.badge {
|
|
203
|
-
top: 6px;
|
|
204
|
-
position: absolute;
|
|
205
|
-
max-height: 13px;
|
|
206
|
-
min-height: 8px;
|
|
207
|
-
right: 0;
|
|
208
|
-
display: inline-flex;
|
|
209
|
-
vertical-align: middle;
|
|
210
|
-
box-sizing: content-box;
|
|
211
|
-
border-radius: 100px;
|
|
212
|
-
background-color: red;
|
|
213
|
-
}
|
|
214
|
-
|
|
215
|
-
.tab-befor-img {
|
|
216
|
-
content: '';
|
|
217
|
-
background-size: 30px;
|
|
218
|
-
display: inline-block;
|
|
219
|
-
margin-right: 8px;
|
|
220
|
-
height: 30px;
|
|
221
|
-
width: 30px;
|
|
222
|
-
vertical-align: -35%;
|
|
223
|
-
}
|
|
224
|
-
.pageskuang{
|
|
225
|
-
vertical-align:middle;
|
|
226
|
-
display:table-cell;
|
|
227
|
-
width: 32%;
|
|
228
|
-
top:-50%;
|
|
229
|
-
margin-top: 1%;
|
|
230
|
-
margin-left: 1%;
|
|
231
|
-
border:1px solid #e3e3e3;
|
|
232
|
-
text-align: center;
|
|
233
|
-
background-color: #ffffff;
|
|
234
|
-
}
|
|
235
|
-
.pgesfoot{
|
|
236
|
-
font-size: 14px;
|
|
237
|
-
color: #666666;
|
|
238
|
-
/* font-family: "Pingfhs";*/
|
|
239
|
-
}
|
|
240
|
-
.imgs{
|
|
241
|
-
width: 35px;
|
|
242
|
-
margin-top: 15px;
|
|
243
|
-
}
|
|
244
|
-
.pages-bgcolor{
|
|
245
|
-
text-align: center;
|
|
246
|
-
background-color: #f0f0ef;
|
|
247
|
-
}
|
|
248
|
-
img[src=""],img:not([src]){
|
|
249
|
-
opacity: 0;
|
|
250
|
-
border:none;
|
|
251
|
-
visibility: hidden;
|
|
252
|
-
max-width: none;
|
|
253
|
-
}
|
|
254
|
-
|
|
255
|
-
.manbiankuang {
|
|
256
|
-
width: 44%;
|
|
257
|
-
margin-top: 15px;
|
|
258
|
-
margin-left: 4%;
|
|
259
|
-
border: 1px solid #e3e3e3;
|
|
260
|
-
border-radius: 10px 10px 10px 10px;
|
|
261
|
-
text-align: center;
|
|
262
|
-
background-color: #ffffff;
|
|
263
|
-
}
|
|
264
|
-
|
|
265
|
-
.nav-bgcolor {
|
|
266
|
-
background-color: #ffffff;
|
|
267
|
-
}
|
|
268
|
-
</style>
|
|
1
|
+
<template>
|
|
2
|
+
<div class="nav-bgcolor">
|
|
3
|
+
<div class="auto">
|
|
4
|
+
<div class="row nav-bgcolor" >
|
|
5
|
+
<div class="col-xs-6 manbiankuang" v-for="tab in tabs" @click="gotopage(tab.link,tab.name,tab.navigate)">
|
|
6
|
+
<div class="badge" v-show="tab.name == '维修派发'">
|
|
7
|
+
<div class="badge-content">{{ pointNum?pointNum:0 }}</div>
|
|
8
|
+
</div>
|
|
9
|
+
<img class="imgs" :src="imgback(tab.name)" alt="">
|
|
10
|
+
<p></p>
|
|
11
|
+
<p class="pagesfoot">{{tab.name}}</p>
|
|
12
|
+
<!--<p class="pagesfoot">{{tab.name}} {{tab.icon}}</p>-->
|
|
13
|
+
<p></p>
|
|
14
|
+
</div>
|
|
15
|
+
</div>
|
|
16
|
+
<!--<div class="row" style="overflow:auto;">-->
|
|
17
|
+
<!--<repair-first v-show="componentName == 'repair-first'" worktype="报修单" :sourcet="sourcet" tabname="维修待办" v-on:changesum="changesum"></repair-first>-->
|
|
18
|
+
<!--<zhihuan-first v-show="componentName == 'zhihuan-first'" worktype="置换通气单" :sourcet="sourcet" tabname="置换待办" v-on:changesum="changesum"></zhihuan-first>-->
|
|
19
|
+
<!--</div>-->
|
|
20
|
+
</div>
|
|
21
|
+
</div>
|
|
22
|
+
</template>
|
|
23
|
+
|
|
24
|
+
<script scoped>
|
|
25
|
+
import Vue from 'vue'
|
|
26
|
+
import {HttpResetClass} from "vue-client";
|
|
27
|
+
|
|
28
|
+
export default {
|
|
29
|
+
title: '在线业务导航',
|
|
30
|
+
data () {
|
|
31
|
+
return {
|
|
32
|
+
titleName:'在线业务',
|
|
33
|
+
isMenu:true,
|
|
34
|
+
tabs: this.getTabs(),
|
|
35
|
+
text: '导航组件this',
|
|
36
|
+
beforeName: '在线业务',
|
|
37
|
+
sourcet: '竖屏',
|
|
38
|
+
pointNum: null
|
|
39
|
+
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
ready () {
|
|
43
|
+
// this.getModelSum()
|
|
44
|
+
},
|
|
45
|
+
|
|
46
|
+
methods: {
|
|
47
|
+
//看去哪个页面
|
|
48
|
+
getModelSum(){
|
|
49
|
+
for(var i = 0;i<this.tabs.length;i++){
|
|
50
|
+
if(this.tabs[i].link == 'readmeter-home' ){
|
|
51
|
+
this.getZhihuan()
|
|
52
|
+
}
|
|
53
|
+
if(this.tabs[i].link == 'weiup-load' ){
|
|
54
|
+
this.getRepair()
|
|
55
|
+
}
|
|
56
|
+
if(this.tabs[i].link == 'upload-page' ){
|
|
57
|
+
this.getSafeCheck()
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
},
|
|
62
|
+
getRepair(){
|
|
63
|
+
var _this = this;
|
|
64
|
+
this.timeoutRepair = window.setInterval(function() {
|
|
65
|
+
let result = _this.$androidUtil.path({'alias':'notUpload','data': {f_workorder_type: '报修单'}})
|
|
66
|
+
if (result.code === 200) {
|
|
67
|
+
console.log('查询得到的代办2' + JSON.stringify(result))
|
|
68
|
+
var crv = {
|
|
69
|
+
title: '维修上传',
|
|
70
|
+
sum: result.data.length
|
|
71
|
+
}
|
|
72
|
+
_this.changesum(crv)
|
|
73
|
+
}
|
|
74
|
+
}, 6000)
|
|
75
|
+
},
|
|
76
|
+
getSafeCheck(){
|
|
77
|
+
var _this = this;
|
|
78
|
+
this.timeoutRepair = window.setInterval(function() {
|
|
79
|
+
let result = _this.$androidUtil.path({'alias':'safecheckNotUpload','data': {}})
|
|
80
|
+
if (result.code === 200) {
|
|
81
|
+
console.log('查询得到的安检上传' + JSON.stringify(result))
|
|
82
|
+
var crv = {
|
|
83
|
+
title: '安检上传',
|
|
84
|
+
sum: result.data.length
|
|
85
|
+
}
|
|
86
|
+
_this.changesum(crv)
|
|
87
|
+
}
|
|
88
|
+
}, 6000)
|
|
89
|
+
},
|
|
90
|
+
getZhihuan(){
|
|
91
|
+
var _this = this;
|
|
92
|
+
this.timeoutZhihuan = window.setInterval(function() {
|
|
93
|
+
let result = {code:200}
|
|
94
|
+
if (result.code === 200) {
|
|
95
|
+
console.log('查询得到的代办2' + JSON.stringify(result))
|
|
96
|
+
var crv = {
|
|
97
|
+
title: '置换上传',
|
|
98
|
+
sum: result.data.length
|
|
99
|
+
}
|
|
100
|
+
_this.changesum(crv)
|
|
101
|
+
}
|
|
102
|
+
}, 6000)
|
|
103
|
+
},
|
|
104
|
+
changesum(titdata){
|
|
105
|
+
for(var i = 0;i<this.tabs.length;i++){
|
|
106
|
+
if(this.tabs[i].name == titdata.title){
|
|
107
|
+
this.tabs[i].icon = titdata.sum + '单'
|
|
108
|
+
console.log(JSON.stringify(this.tabs[i].icon))
|
|
109
|
+
return
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
},
|
|
113
|
+
getTabs(){
|
|
114
|
+
this.getRepairNum()
|
|
115
|
+
for(let funs in Vue.functions){
|
|
116
|
+
if(Vue.functions[funs].link == 'online-manage'){
|
|
117
|
+
return Vue.functions[funs].children
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
},
|
|
121
|
+
getRepairNum() {
|
|
122
|
+
if (!Vue.android || !Vue.come || !Vue.come == 'tongchuan') {
|
|
123
|
+
return
|
|
124
|
+
}
|
|
125
|
+
window.setInterval(function () {
|
|
126
|
+
let condition = `1 = 1 and f_workorder_type = '报修单' and f_state = null `
|
|
127
|
+
let val = {
|
|
128
|
+
condition: {
|
|
129
|
+
condition: condition,
|
|
130
|
+
sign: '1 = 1'
|
|
131
|
+
},
|
|
132
|
+
userid: Vue.user.name
|
|
133
|
+
}
|
|
134
|
+
let http = new HttpResetClass()
|
|
135
|
+
http.load('POST', `${this.$androidUtil.getProxyUrl()}/rs/path/operatorServiceAndroid`, {data: val}, {
|
|
136
|
+
resolveMsg: null,
|
|
137
|
+
rejectMsg: null
|
|
138
|
+
}).then((res) => {
|
|
139
|
+
this.pointNum = res.data.length
|
|
140
|
+
})
|
|
141
|
+
},10000)
|
|
142
|
+
this.timeOutGetRepairNum()
|
|
143
|
+
},
|
|
144
|
+
timeOutGetRepairNum(){
|
|
145
|
+
let condition = `1 = 1 and f_workorder_type = '报修单' and f_state = null `
|
|
146
|
+
let val = {
|
|
147
|
+
condition: {
|
|
148
|
+
condition: condition,
|
|
149
|
+
sign: '1 = 1'
|
|
150
|
+
},
|
|
151
|
+
userid: Vue.user.name
|
|
152
|
+
}
|
|
153
|
+
let http = new HttpResetClass()
|
|
154
|
+
http.load('POST', `${this.$androidUtil.getProxyUrl()}/rs/path/operatorServiceAndroid`, {data: val}, {
|
|
155
|
+
resolveMsg: null,
|
|
156
|
+
rejectMsg: null
|
|
157
|
+
}).then((res) => {
|
|
158
|
+
this.pointNum = res.data.length
|
|
159
|
+
})
|
|
160
|
+
},
|
|
161
|
+
imgback(val){
|
|
162
|
+
return require('../assets/'+val+'.png')
|
|
163
|
+
},
|
|
164
|
+
// 返回主界面
|
|
165
|
+
back(){
|
|
166
|
+
this.titleName = '主界面'
|
|
167
|
+
this.isMenu = true
|
|
168
|
+
|
|
169
|
+
},
|
|
170
|
+
gotopage(param,title,navigate) {
|
|
171
|
+
console.log('进入子组件')
|
|
172
|
+
var prpdata = {
|
|
173
|
+
_this:this,
|
|
174
|
+
title:title,
|
|
175
|
+
safe:false
|
|
176
|
+
}
|
|
177
|
+
this.$dispatch('gotoson',prpdata)
|
|
178
|
+
if(navigate){
|
|
179
|
+
this.$goto('embbed-page', {domainName: navigate, title: title, compName: param, login: Vue.user})
|
|
180
|
+
}else{
|
|
181
|
+
this.$goto(param,{sourcet:'竖屏',tabname:title})
|
|
182
|
+
}
|
|
183
|
+
},
|
|
184
|
+
mute () {
|
|
185
|
+
HostApp.mute()
|
|
186
|
+
}
|
|
187
|
+
},
|
|
188
|
+
}
|
|
189
|
+
</script>
|
|
190
|
+
<style lang="less">
|
|
191
|
+
.badge-content {
|
|
192
|
+
color: #fff;
|
|
193
|
+
box-sizing: border-box;
|
|
194
|
+
min-width: 8px;
|
|
195
|
+
font-size: 9px;
|
|
196
|
+
line-height: 12px;
|
|
197
|
+
white-space: nowrap;
|
|
198
|
+
font-weight: 400;
|
|
199
|
+
text-align: center;
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
.badge {
|
|
203
|
+
top: 6px;
|
|
204
|
+
position: absolute;
|
|
205
|
+
max-height: 13px;
|
|
206
|
+
min-height: 8px;
|
|
207
|
+
right: 0;
|
|
208
|
+
display: inline-flex;
|
|
209
|
+
vertical-align: middle;
|
|
210
|
+
box-sizing: content-box;
|
|
211
|
+
border-radius: 100px;
|
|
212
|
+
background-color: red;
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
.tab-befor-img {
|
|
216
|
+
content: '';
|
|
217
|
+
background-size: 30px;
|
|
218
|
+
display: inline-block;
|
|
219
|
+
margin-right: 8px;
|
|
220
|
+
height: 30px;
|
|
221
|
+
width: 30px;
|
|
222
|
+
vertical-align: -35%;
|
|
223
|
+
}
|
|
224
|
+
.pageskuang{
|
|
225
|
+
vertical-align:middle;
|
|
226
|
+
display:table-cell;
|
|
227
|
+
width: 32%;
|
|
228
|
+
top:-50%;
|
|
229
|
+
margin-top: 1%;
|
|
230
|
+
margin-left: 1%;
|
|
231
|
+
border:1px solid #e3e3e3;
|
|
232
|
+
text-align: center;
|
|
233
|
+
background-color: #ffffff;
|
|
234
|
+
}
|
|
235
|
+
.pgesfoot{
|
|
236
|
+
font-size: 14px;
|
|
237
|
+
color: #666666;
|
|
238
|
+
/* font-family: "Pingfhs";*/
|
|
239
|
+
}
|
|
240
|
+
.imgs{
|
|
241
|
+
width: 35px;
|
|
242
|
+
margin-top: 15px;
|
|
243
|
+
}
|
|
244
|
+
.pages-bgcolor{
|
|
245
|
+
text-align: center;
|
|
246
|
+
background-color: #f0f0ef;
|
|
247
|
+
}
|
|
248
|
+
img[src=""],img:not([src]){
|
|
249
|
+
opacity: 0;
|
|
250
|
+
border:none;
|
|
251
|
+
visibility: hidden;
|
|
252
|
+
max-width: none;
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
.manbiankuang {
|
|
256
|
+
width: 44%;
|
|
257
|
+
margin-top: 15px;
|
|
258
|
+
margin-left: 4%;
|
|
259
|
+
border: 1px solid #e3e3e3;
|
|
260
|
+
border-radius: 10px 10px 10px 10px;
|
|
261
|
+
text-align: center;
|
|
262
|
+
background-color: #ffffff;
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
.nav-bgcolor {
|
|
266
|
+
background-color: #ffffff;
|
|
267
|
+
}
|
|
268
|
+
</style>
|
|
@@ -1,214 +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
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
this.
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
border
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
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,165 +1,173 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="page-header app-header auto">
|
|
3
|
-
<span style="margin-left:33px">{{title}}</span>
|
|
4
|
-
<div class="app-header-back" @click='back()' v-show="needBack">
|
|
5
|
-
<img src="../assets/返回.png" style="height: 20px;margin-right:-10px"/>
|
|
6
|
-
</div>
|
|
7
|
-
<div class="app-header-back" style="height: auto" v-show="!needBack">
|
|
8
|
-
<img src="../assets/denglu.png" style="height: 20px;margin-right:-10px;margin-top:-10px"/>
|
|
9
|
-
<span style="margin-left:5px;color: #ffffff;font-size: 1.0em;">{{loginname}}</span>
|
|
10
|
-
</div>
|
|
11
|
-
<div class="app-header-list" v-if="showList">
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
<div class="app-header-guanbishengyin" style="line-height: 25px" @click='mute()'>
|
|
38
|
-
<img src="../assets/jingyin3.png" style="height: 20px;"/>
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
</
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
//
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
}
|
|
156
|
-
.dropdown-menu
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
1
|
+
<template>
|
|
2
|
+
<div class="page-header app-header auto">
|
|
3
|
+
<span style="margin-left:33px">{{title}}</span>
|
|
4
|
+
<div class="app-header-back" @click='back()' v-show="needBack">
|
|
5
|
+
<img src="../assets/返回.png" style="height: 20px;margin-right:-10px"/>
|
|
6
|
+
</div>
|
|
7
|
+
<div class="app-header-back" style="height: auto" v-show="!needBack">
|
|
8
|
+
<img src="../assets/denglu.png" style="height: 20px;margin-right:-10px;margin-top:-10px"/>
|
|
9
|
+
<span style="margin-left:5px;color: #ffffff;font-size: 1.0em;">{{loginname}}</span>
|
|
10
|
+
</div>
|
|
11
|
+
<div class="app-header-list" v-if="showList">
|
|
12
|
+
<dropdown>
|
|
13
|
+
<a href="#" data-toggle="dropdown" class="dropdown-toggle" style="color: white;font-size:19px">
|
|
14
|
+
<div class="app-header-newaddserver" style="line-height: 1px;margin-top: -5px">
|
|
15
|
+
<img src="../assets/newadd3.png" style="height: 20px;margin-right:-10px"/>
|
|
16
|
+
</div>
|
|
17
|
+
</a>
|
|
18
|
+
<ul slot="dropdown-menu" class="dropdown-menu dropdown-menu-right">
|
|
19
|
+
<li >
|
|
20
|
+
<a href="#" @click="gotopage('sell-info',{user:user})">
|
|
21
|
+
<img src="../assets/待办工单竖屏3.png"> 报修工单
|
|
22
|
+
</a>
|
|
23
|
+
<hr>
|
|
24
|
+
<a href="#" @click="gotopage('repair-message',{user:user})">
|
|
25
|
+
<img src="../assets/安检导航竖屏3.png"/> 安检计划
|
|
26
|
+
</a>
|
|
27
|
+
<hr>
|
|
28
|
+
<a href="#" @click="gotopage('changemeter-info',{user:user})">
|
|
29
|
+
<img src="../assets/手机抄表竖屏3.png"/> 抄表计划
|
|
30
|
+
</a>
|
|
31
|
+
<hr>
|
|
32
|
+
<hr>
|
|
33
|
+
</li>
|
|
34
|
+
</ul>
|
|
35
|
+
</dropdown>
|
|
36
|
+
</div>
|
|
37
|
+
<div class="app-header-guanbishengyin" style="line-height: 25px" @click='mute()'>
|
|
38
|
+
<img v-if="f_voiceSwitch" src="../assets/jingyin3.png" style="height: 20px; "/>
|
|
39
|
+
<img v-if="!f_voiceSwitch" src="../assets/R-C.png" style="height: 20px; "/>
|
|
40
|
+
</div>
|
|
41
|
+
</div>
|
|
42
|
+
</template>
|
|
43
|
+
|
|
44
|
+
<script>
|
|
45
|
+
import Vue from 'vue'
|
|
46
|
+
export default {
|
|
47
|
+
title: '通用头部组件',
|
|
48
|
+
data () {
|
|
49
|
+
return {
|
|
50
|
+
loginname: Vue.user.name,
|
|
51
|
+
f_voiceSwitch:HostApp.getPreference('f_voiceSwitch').data
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
props: {
|
|
55
|
+
user:{
|
|
56
|
+
type:Object
|
|
57
|
+
},
|
|
58
|
+
userinfo:{
|
|
59
|
+
type:Object
|
|
60
|
+
},
|
|
61
|
+
// 是否显示列表控件
|
|
62
|
+
showList: {
|
|
63
|
+
type: Boolean,
|
|
64
|
+
default: false
|
|
65
|
+
},
|
|
66
|
+
title: {
|
|
67
|
+
type: String,
|
|
68
|
+
default: '燃气应用'
|
|
69
|
+
},
|
|
70
|
+
needBack: {
|
|
71
|
+
type: Boolean,
|
|
72
|
+
default: true
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
methods: {
|
|
76
|
+
// 新增工单
|
|
77
|
+
newadd(){
|
|
78
|
+
// 事件
|
|
79
|
+
},
|
|
80
|
+
// 跳转页面
|
|
81
|
+
gotopage(param,props) {
|
|
82
|
+
this.$goto(param,props)
|
|
83
|
+
},
|
|
84
|
+
back () {
|
|
85
|
+
// console.log('发送返回事件')
|
|
86
|
+
this.$emit('back')
|
|
87
|
+
},
|
|
88
|
+
// 关闭新消息响铃(静音)
|
|
89
|
+
mute () {
|
|
90
|
+
if(navigator.userAgent.match('iPad') || navigator.userAgent.match('iPhone')){
|
|
91
|
+
window.prompt("mute","")
|
|
92
|
+
}else{
|
|
93
|
+
switch (HostApp.getPreference('f_voiceSwitch').data){
|
|
94
|
+
case 'true' : HostApp.setPreference('f_voiceSwitch','false')
|
|
95
|
+
break
|
|
96
|
+
case 'false' : HostApp.setPreference('f_voiceSwitch','true')
|
|
97
|
+
break
|
|
98
|
+
default : HostApp.setPreference('f_voiceSwitch','true')
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
},
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
</script>
|
|
105
|
+
<style scoped>
|
|
106
|
+
.app-header {
|
|
107
|
+
position: fixed;
|
|
108
|
+
top:0px;
|
|
109
|
+
width: 100%;
|
|
110
|
+
margin: 0px;
|
|
111
|
+
background: #499edf;
|
|
112
|
+
color: #FFF;
|
|
113
|
+
padding: 10px;
|
|
114
|
+
text-align: center;
|
|
115
|
+
font-size: 15px;
|
|
116
|
+
height: 7%;
|
|
117
|
+
|
|
118
|
+
/*margin-bottom: 20px;*/
|
|
119
|
+
}
|
|
120
|
+
.app-header-back {
|
|
121
|
+
position: absolute;
|
|
122
|
+
top: 12px;
|
|
123
|
+
color: #D8DCE5;
|
|
124
|
+
}
|
|
125
|
+
.app-header-list {
|
|
126
|
+
height: 40px;
|
|
127
|
+
float: right;
|
|
128
|
+
color: #D8DCE5;
|
|
129
|
+
}
|
|
130
|
+
.app-header-guanbishengyin {
|
|
131
|
+
margin-right: 10px;
|
|
132
|
+
float: right;
|
|
133
|
+
color: #D8DCE5;
|
|
134
|
+
}
|
|
135
|
+
.app-header-newaddserver {
|
|
136
|
+
margin-right: 10px;
|
|
137
|
+
float: right;
|
|
138
|
+
color: #D8DCE5;
|
|
139
|
+
}
|
|
140
|
+
.app-header-volume {
|
|
141
|
+
position: absolute;
|
|
142
|
+
top: 0;
|
|
143
|
+
display: flex;
|
|
144
|
+
flex-direction: column;
|
|
145
|
+
justify-content: center;
|
|
146
|
+
right: 20px;
|
|
147
|
+
color: #D8DCE5;
|
|
148
|
+
font-size: 1.5em;
|
|
149
|
+
}
|
|
150
|
+
.dropdown-menu {
|
|
151
|
+
background-color: #212a35;
|
|
152
|
+
}
|
|
153
|
+
.dropdown-menu a{
|
|
154
|
+
color: white;
|
|
155
|
+
}
|
|
156
|
+
.dropdown-menu a:hover{
|
|
157
|
+
color: white;
|
|
158
|
+
background-color: #6b85a3;
|
|
159
|
+
}
|
|
160
|
+
.dropdown-menu img{
|
|
161
|
+
width: 22%;
|
|
162
|
+
margin-top: -5px;
|
|
163
|
+
}
|
|
164
|
+
.dropdown-menu hr{
|
|
165
|
+
margin-top: 0px;
|
|
166
|
+
margin-bottom: 0px;
|
|
167
|
+
margin-right:0px;
|
|
168
|
+
width: 80%;
|
|
169
|
+
}
|
|
170
|
+
.glyphicon-menu-left{
|
|
171
|
+
color:#fff;
|
|
172
|
+
}
|
|
173
|
+
</style>
|
|
Binary file
|