system-phone 3.0.10 → 3.0.11
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/OnlineManage.vue +1 -1
- package/src/components/PhoneUserFind.vue +138 -138
- package/src/components/RightTree.vue +217 -217
- package/src/components/ToolsPage.vue +175 -175
package/package.json
CHANGED
|
@@ -122,7 +122,7 @@
|
|
|
122
122
|
if (!Vue.android || !Vue.come || !Vue.come == 'tongchuan') {
|
|
123
123
|
return
|
|
124
124
|
}
|
|
125
|
-
window.setInterval(
|
|
125
|
+
window.setInterval( ()=> {
|
|
126
126
|
let condition = `1 = 1 and f_workorder_type = '报修单' and f_state = null `
|
|
127
127
|
let val = {
|
|
128
128
|
condition: {
|
|
@@ -1,138 +1,138 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="app-botton" @click="back()" v-if="show">
|
|
3
|
-
<span class="glyphicon glyphicon-menu-left">返回</span>
|
|
4
|
-
</div>
|
|
5
|
-
<div class="select-overspread auto" style="padding-bottom:5px;" v-show="!show">
|
|
6
|
-
<div class="auto repair-info-content compatible">
|
|
7
|
-
<div class="row">
|
|
8
|
-
<div class="col-xs-12 col-sm-12 col-md-12 form-input-group mg8">
|
|
9
|
-
<input type="text" class="form-control" v-model="model.f_userid" placeholder='用户编号'>
|
|
10
|
-
</div>
|
|
11
|
-
<div class="col-xs-12 col-sm-12 col-md-12 form-input-group mg8">
|
|
12
|
-
<input type="text" class="form-control" v-model="model.f_username" placeholder='姓名'>
|
|
13
|
-
</div>
|
|
14
|
-
<div class="col-xs-12 col-sm-12 col-md-12 form-input-group mg8">
|
|
15
|
-
<input type="text" class="form-control" v-model="model.f_address" placeholder='地址'>
|
|
16
|
-
</div>
|
|
17
|
-
</div>
|
|
18
|
-
<div class="row">
|
|
19
|
-
<button type="button" name="button" class="btn btn-primary pull-right" @click="search()">查询</button>
|
|
20
|
-
<!-- <button type="button" name="button" class="btn btn-primary pull-right" @click="read()">读卡</button>-->
|
|
21
|
-
</div>
|
|
22
|
-
</div>
|
|
23
|
-
<div partial class="panel panel-default well" style="padding: 0px;background-color:#ffffff;" v-for="row in users">
|
|
24
|
-
<div class="panel-body inbg" @click="selectUser(row)">
|
|
25
|
-
<div class="row auto" >
|
|
26
|
-
<div class="col-sm-4">
|
|
27
|
-
用户编号: {{row.f_userinfo_code}}
|
|
28
|
-
</div>
|
|
29
|
-
<div class="col-sm-4">
|
|
30
|
-
用户姓名: {{row.f_user_name}}
|
|
31
|
-
</div>
|
|
32
|
-
<div class="col-sm-4">
|
|
33
|
-
用户电话: {{row.f_user_phone}}
|
|
34
|
-
</div>
|
|
35
|
-
<div class="col-sm-3">
|
|
36
|
-
用户类别: {{row.f_user_type}}
|
|
37
|
-
</div>
|
|
38
|
-
<div class="col-sm-9">
|
|
39
|
-
地址信息: {{row.f_address}}
|
|
40
|
-
</div>
|
|
41
|
-
<div class="col-sm-6">
|
|
42
|
-
表底数: {{row.f_meter_base}}
|
|
43
|
-
</div>
|
|
44
|
-
<div class="col-sm-6">
|
|
45
|
-
表上余额: {{row.f_balance_amount}}
|
|
46
|
-
</div>
|
|
47
|
-
</div>
|
|
48
|
-
</div>
|
|
49
|
-
</div>
|
|
50
|
-
</div>
|
|
51
|
-
<phone-info-table :user="user" :is-need-condition="false" :is-group="false" v-if="show"></phone-info-table>
|
|
52
|
-
</template>
|
|
53
|
-
|
|
54
|
-
<script>
|
|
55
|
-
import Vue from 'vue'
|
|
56
|
-
import { HttpResetClass } from 'vue-client'
|
|
57
|
-
export default {
|
|
58
|
-
title: '移动端用户信息查询',
|
|
59
|
-
props: {
|
|
60
|
-
|
|
61
|
-
},
|
|
62
|
-
data () {
|
|
63
|
-
return {
|
|
64
|
-
users:[],
|
|
65
|
-
model:{
|
|
66
|
-
f_userid:'',
|
|
67
|
-
f_username:'',
|
|
68
|
-
f_address:''
|
|
69
|
-
},
|
|
70
|
-
user:'',
|
|
71
|
-
show:false
|
|
72
|
-
}
|
|
73
|
-
},
|
|
74
|
-
methods: {
|
|
75
|
-
search() {
|
|
76
|
-
// console.log("Vue.user",Vue.user)
|
|
77
|
-
this.model.f_userid ? this.model.f_userid : '1=1'
|
|
78
|
-
let condition = `ti.f_orgid = '${Vue.user.orgid}'`
|
|
79
|
-
condition += this.model.f_userid ? ` and ti.f_userinfo_code = '${this.model.f_userid}'` : ' and 1=1'
|
|
80
|
-
condition += this.model.f_username ? ` and ti.f_user_name like '%${this.model.f_username}%'` : ' and 1=1'
|
|
81
|
-
condition += this.model.f_address ? ` and tua.f_address like '%${this.model.f_address}%'` : ' and 1=1'
|
|
82
|
-
console.log(condition)
|
|
83
|
-
this.$resetpost(`${this.$androidUtil.getProxyUrl()}/rs/sql/tel_UserInfo`, {
|
|
84
|
-
data: {
|
|
85
|
-
condition:condition
|
|
86
|
-
}
|
|
87
|
-
}).then((res) => {
|
|
88
|
-
console.log("查找用户返回的结果")
|
|
89
|
-
console.log(res.data)
|
|
90
|
-
this.users = res.data
|
|
91
|
-
})
|
|
92
|
-
},
|
|
93
|
-
selectUser(row){
|
|
94
|
-
this.user = row
|
|
95
|
-
this.show = true
|
|
96
|
-
},
|
|
97
|
-
back(){
|
|
98
|
-
this.show = false
|
|
99
|
-
},
|
|
100
|
-
read(){
|
|
101
|
-
// 读卡
|
|
102
|
-
let res = HostApp.read()
|
|
103
|
-
if(res.code == 200){
|
|
104
|
-
let cardid = res.msg.CardID
|
|
105
|
-
let condition1 = `tf.f_card_id = '${cardid}'`
|
|
106
|
-
this.$resetpost(`${this.$androidUtil.getProxyUrl()}/rs/sql/tel_UserInfo`, {
|
|
107
|
-
data: {
|
|
108
|
-
condition:condition1
|
|
109
|
-
}
|
|
110
|
-
}).then((res) => {
|
|
111
|
-
console.log("查找用户返回的结果")
|
|
112
|
-
console.log(res.data)
|
|
113
|
-
this.users = res.data
|
|
114
|
-
})
|
|
115
|
-
}else{
|
|
116
|
-
HostApp.alert('读卡异常,请检查读卡设备!')
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
},
|
|
120
|
-
ready(){
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
</script>
|
|
124
|
-
<style>
|
|
125
|
-
.app-botton {
|
|
126
|
-
position:fixed;
|
|
127
|
-
background: #87b2dd;
|
|
128
|
-
color: #FFF;
|
|
129
|
-
padding: 8px;
|
|
130
|
-
text-align: center;
|
|
131
|
-
font-size: 1.2em;
|
|
132
|
-
z-index: 10;
|
|
133
|
-
opacity:0.5;
|
|
134
|
-
bottom: 50px;
|
|
135
|
-
margin-top: -10px;
|
|
136
|
-
height: 40px;
|
|
137
|
-
}
|
|
138
|
-
</style>
|
|
1
|
+
<template>
|
|
2
|
+
<div class="app-botton" @click="back()" v-if="show">
|
|
3
|
+
<span class="glyphicon glyphicon-menu-left">返回</span>
|
|
4
|
+
</div>
|
|
5
|
+
<div class="select-overspread auto" style="padding-bottom:5px;" v-show="!show">
|
|
6
|
+
<div class="auto repair-info-content compatible">
|
|
7
|
+
<div class="row">
|
|
8
|
+
<div class="col-xs-12 col-sm-12 col-md-12 form-input-group mg8">
|
|
9
|
+
<input type="text" class="form-control" v-model="model.f_userid" placeholder='用户编号'>
|
|
10
|
+
</div>
|
|
11
|
+
<div class="col-xs-12 col-sm-12 col-md-12 form-input-group mg8">
|
|
12
|
+
<input type="text" class="form-control" v-model="model.f_username" placeholder='姓名'>
|
|
13
|
+
</div>
|
|
14
|
+
<div class="col-xs-12 col-sm-12 col-md-12 form-input-group mg8">
|
|
15
|
+
<input type="text" class="form-control" v-model="model.f_address" placeholder='地址'>
|
|
16
|
+
</div>
|
|
17
|
+
</div>
|
|
18
|
+
<div class="row">
|
|
19
|
+
<button type="button" name="button" class="btn btn-primary pull-right" @click="search()">查询</button>
|
|
20
|
+
<!-- <button type="button" name="button" class="btn btn-primary pull-right" @click="read()">读卡</button>-->
|
|
21
|
+
</div>
|
|
22
|
+
</div>
|
|
23
|
+
<div partial class="panel panel-default well" style="padding: 0px;background-color:#ffffff;" v-for="row in users">
|
|
24
|
+
<div class="panel-body inbg" @click="selectUser(row)">
|
|
25
|
+
<div class="row auto" >
|
|
26
|
+
<div class="col-sm-4">
|
|
27
|
+
用户编号: {{row.f_userinfo_code}}
|
|
28
|
+
</div>
|
|
29
|
+
<div class="col-sm-4">
|
|
30
|
+
用户姓名: {{row.f_user_name}}
|
|
31
|
+
</div>
|
|
32
|
+
<div class="col-sm-4">
|
|
33
|
+
用户电话: {{row.f_user_phone}}
|
|
34
|
+
</div>
|
|
35
|
+
<div class="col-sm-3">
|
|
36
|
+
用户类别: {{row.f_user_type}}
|
|
37
|
+
</div>
|
|
38
|
+
<div class="col-sm-9">
|
|
39
|
+
地址信息: {{row.f_address}}
|
|
40
|
+
</div>
|
|
41
|
+
<div class="col-sm-6">
|
|
42
|
+
表底数: {{row.f_meter_base}}
|
|
43
|
+
</div>
|
|
44
|
+
<div class="col-sm-6">
|
|
45
|
+
表上余额: {{row.f_balance_amount}}
|
|
46
|
+
</div>
|
|
47
|
+
</div>
|
|
48
|
+
</div>
|
|
49
|
+
</div>
|
|
50
|
+
</div>
|
|
51
|
+
<phone-info-table :user="user" :is-need-condition="false" :is-group="false" v-if="show"></phone-info-table>
|
|
52
|
+
</template>
|
|
53
|
+
|
|
54
|
+
<script>
|
|
55
|
+
import Vue from 'vue'
|
|
56
|
+
import { HttpResetClass } from 'vue-client'
|
|
57
|
+
export default {
|
|
58
|
+
title: '移动端用户信息查询',
|
|
59
|
+
props: {
|
|
60
|
+
|
|
61
|
+
},
|
|
62
|
+
data () {
|
|
63
|
+
return {
|
|
64
|
+
users:[],
|
|
65
|
+
model:{
|
|
66
|
+
f_userid:'',
|
|
67
|
+
f_username:'',
|
|
68
|
+
f_address:''
|
|
69
|
+
},
|
|
70
|
+
user:'',
|
|
71
|
+
show:false
|
|
72
|
+
}
|
|
73
|
+
},
|
|
74
|
+
methods: {
|
|
75
|
+
search() {
|
|
76
|
+
// console.log("Vue.user",Vue.user)
|
|
77
|
+
this.model.f_userid ? this.model.f_userid : '1=1'
|
|
78
|
+
let condition = `ti.f_orgid = '${Vue.user.orgid}'`
|
|
79
|
+
condition += this.model.f_userid ? ` and ti.f_userinfo_code = '${this.model.f_userid}'` : ' and 1=1'
|
|
80
|
+
condition += this.model.f_username ? ` and ti.f_user_name like '%${this.model.f_username}%'` : ' and 1=1'
|
|
81
|
+
condition += this.model.f_address ? ` and tua.f_address like '%${this.model.f_address}%'` : ' and 1=1'
|
|
82
|
+
console.log(condition)
|
|
83
|
+
this.$resetpost(`${this.$androidUtil.getProxyUrl()}/rs/sql/tel_UserInfo`, {
|
|
84
|
+
data: {
|
|
85
|
+
condition:condition
|
|
86
|
+
}
|
|
87
|
+
}).then((res) => {
|
|
88
|
+
console.log("查找用户返回的结果")
|
|
89
|
+
console.log(res.data)
|
|
90
|
+
this.users = res.data
|
|
91
|
+
})
|
|
92
|
+
},
|
|
93
|
+
selectUser(row){
|
|
94
|
+
this.user = row
|
|
95
|
+
this.show = true
|
|
96
|
+
},
|
|
97
|
+
back(){
|
|
98
|
+
this.show = false
|
|
99
|
+
},
|
|
100
|
+
read(){
|
|
101
|
+
// 读卡
|
|
102
|
+
let res = HostApp.read()
|
|
103
|
+
if(res.code == 200){
|
|
104
|
+
let cardid = res.msg.CardID
|
|
105
|
+
let condition1 = `tf.f_card_id = '${cardid}'`
|
|
106
|
+
this.$resetpost(`${this.$androidUtil.getProxyUrl()}/rs/sql/tel_UserInfo`, {
|
|
107
|
+
data: {
|
|
108
|
+
condition:condition1
|
|
109
|
+
}
|
|
110
|
+
}).then((res) => {
|
|
111
|
+
console.log("查找用户返回的结果")
|
|
112
|
+
console.log(res.data)
|
|
113
|
+
this.users = res.data
|
|
114
|
+
})
|
|
115
|
+
}else{
|
|
116
|
+
HostApp.alert('读卡异常,请检查读卡设备!')
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
},
|
|
120
|
+
ready(){
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
</script>
|
|
124
|
+
<style>
|
|
125
|
+
.app-botton {
|
|
126
|
+
position:fixed;
|
|
127
|
+
background: #87b2dd;
|
|
128
|
+
color: #FFF;
|
|
129
|
+
padding: 8px;
|
|
130
|
+
text-align: center;
|
|
131
|
+
font-size: 1.2em;
|
|
132
|
+
z-index: 10;
|
|
133
|
+
opacity:0.5;
|
|
134
|
+
bottom: 50px;
|
|
135
|
+
margin-top: -10px;
|
|
136
|
+
height: 40px;
|
|
137
|
+
}
|
|
138
|
+
</style>
|
|
@@ -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>
|
|
@@ -1,175 +1,175 @@
|
|
|
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:true
|
|
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
|
-
this.f_voiceSwitch= true
|
|
96
|
-
break
|
|
97
|
-
case 'false' : HostApp.setPreference('f_voiceSwitch','true')
|
|
98
|
-
this.f_voiceSwitch= false
|
|
99
|
-
break
|
|
100
|
-
default : HostApp.setPreference('f_voiceSwitch','true')
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
},
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
</script>
|
|
107
|
-
<style scoped>
|
|
108
|
-
.app-header {
|
|
109
|
-
position: fixed;
|
|
110
|
-
top:0px;
|
|
111
|
-
width: 100%;
|
|
112
|
-
margin: 0px;
|
|
113
|
-
background: #499edf;
|
|
114
|
-
color: #FFF;
|
|
115
|
-
padding: 10px;
|
|
116
|
-
text-align: center;
|
|
117
|
-
font-size: 15px;
|
|
118
|
-
height: 7%;
|
|
119
|
-
|
|
120
|
-
/*margin-bottom: 20px;*/
|
|
121
|
-
}
|
|
122
|
-
.app-header-back {
|
|
123
|
-
position: absolute;
|
|
124
|
-
top: 12px;
|
|
125
|
-
color: #D8DCE5;
|
|
126
|
-
}
|
|
127
|
-
.app-header-list {
|
|
128
|
-
height: 40px;
|
|
129
|
-
float: right;
|
|
130
|
-
color: #D8DCE5;
|
|
131
|
-
}
|
|
132
|
-
.app-header-guanbishengyin {
|
|
133
|
-
margin-right: 10px;
|
|
134
|
-
float: right;
|
|
135
|
-
color: #D8DCE5;
|
|
136
|
-
}
|
|
137
|
-
.app-header-newaddserver {
|
|
138
|
-
margin-right: 10px;
|
|
139
|
-
float: right;
|
|
140
|
-
color: #D8DCE5;
|
|
141
|
-
}
|
|
142
|
-
.app-header-volume {
|
|
143
|
-
position: absolute;
|
|
144
|
-
top: 0;
|
|
145
|
-
display: flex;
|
|
146
|
-
flex-direction: column;
|
|
147
|
-
justify-content: center;
|
|
148
|
-
right: 20px;
|
|
149
|
-
color: #D8DCE5;
|
|
150
|
-
font-size: 1.5em;
|
|
151
|
-
}
|
|
152
|
-
.dropdown-menu {
|
|
153
|
-
background-color: #212a35;
|
|
154
|
-
}
|
|
155
|
-
.dropdown-menu a{
|
|
156
|
-
color: white;
|
|
157
|
-
}
|
|
158
|
-
.dropdown-menu a:hover{
|
|
159
|
-
color: white;
|
|
160
|
-
background-color: #6b85a3;
|
|
161
|
-
}
|
|
162
|
-
.dropdown-menu img{
|
|
163
|
-
width: 22%;
|
|
164
|
-
margin-top: -5px;
|
|
165
|
-
}
|
|
166
|
-
.dropdown-menu hr{
|
|
167
|
-
margin-top: 0px;
|
|
168
|
-
margin-bottom: 0px;
|
|
169
|
-
margin-right:0px;
|
|
170
|
-
width: 80%;
|
|
171
|
-
}
|
|
172
|
-
.glyphicon-menu-left{
|
|
173
|
-
color:#fff;
|
|
174
|
-
}
|
|
175
|
-
</style>
|
|
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:true
|
|
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
|
+
this.f_voiceSwitch= true
|
|
96
|
+
break
|
|
97
|
+
case 'false' : HostApp.setPreference('f_voiceSwitch','true')
|
|
98
|
+
this.f_voiceSwitch= false
|
|
99
|
+
break
|
|
100
|
+
default : HostApp.setPreference('f_voiceSwitch','true')
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
},
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
</script>
|
|
107
|
+
<style scoped>
|
|
108
|
+
.app-header {
|
|
109
|
+
position: fixed;
|
|
110
|
+
top:0px;
|
|
111
|
+
width: 100%;
|
|
112
|
+
margin: 0px;
|
|
113
|
+
background: #499edf;
|
|
114
|
+
color: #FFF;
|
|
115
|
+
padding: 10px;
|
|
116
|
+
text-align: center;
|
|
117
|
+
font-size: 15px;
|
|
118
|
+
height: 7%;
|
|
119
|
+
|
|
120
|
+
/*margin-bottom: 20px;*/
|
|
121
|
+
}
|
|
122
|
+
.app-header-back {
|
|
123
|
+
position: absolute;
|
|
124
|
+
top: 12px;
|
|
125
|
+
color: #D8DCE5;
|
|
126
|
+
}
|
|
127
|
+
.app-header-list {
|
|
128
|
+
height: 40px;
|
|
129
|
+
float: right;
|
|
130
|
+
color: #D8DCE5;
|
|
131
|
+
}
|
|
132
|
+
.app-header-guanbishengyin {
|
|
133
|
+
margin-right: 10px;
|
|
134
|
+
float: right;
|
|
135
|
+
color: #D8DCE5;
|
|
136
|
+
}
|
|
137
|
+
.app-header-newaddserver {
|
|
138
|
+
margin-right: 10px;
|
|
139
|
+
float: right;
|
|
140
|
+
color: #D8DCE5;
|
|
141
|
+
}
|
|
142
|
+
.app-header-volume {
|
|
143
|
+
position: absolute;
|
|
144
|
+
top: 0;
|
|
145
|
+
display: flex;
|
|
146
|
+
flex-direction: column;
|
|
147
|
+
justify-content: center;
|
|
148
|
+
right: 20px;
|
|
149
|
+
color: #D8DCE5;
|
|
150
|
+
font-size: 1.5em;
|
|
151
|
+
}
|
|
152
|
+
.dropdown-menu {
|
|
153
|
+
background-color: #212a35;
|
|
154
|
+
}
|
|
155
|
+
.dropdown-menu a{
|
|
156
|
+
color: white;
|
|
157
|
+
}
|
|
158
|
+
.dropdown-menu a:hover{
|
|
159
|
+
color: white;
|
|
160
|
+
background-color: #6b85a3;
|
|
161
|
+
}
|
|
162
|
+
.dropdown-menu img{
|
|
163
|
+
width: 22%;
|
|
164
|
+
margin-top: -5px;
|
|
165
|
+
}
|
|
166
|
+
.dropdown-menu hr{
|
|
167
|
+
margin-top: 0px;
|
|
168
|
+
margin-bottom: 0px;
|
|
169
|
+
margin-right:0px;
|
|
170
|
+
width: 80%;
|
|
171
|
+
}
|
|
172
|
+
.glyphicon-menu-left{
|
|
173
|
+
color:#fff;
|
|
174
|
+
}
|
|
175
|
+
</style>
|