telephone-clients 3.0.104-64 → 3.0.104-65
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
CHANGED
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 获得给定资源的名称全路径
|
|
3
|
+
* @param res: 资源
|
|
4
|
+
* @param name: 全路径字段
|
|
5
|
+
*/
|
|
6
|
+
export function getFullName (res, name) {
|
|
7
|
+
let result = ''
|
|
8
|
+
while (res != null) {
|
|
9
|
+
if (result === '') {
|
|
10
|
+
result = res[name]
|
|
11
|
+
} else {
|
|
12
|
+
result = res[name] + '.' + result
|
|
13
|
+
}
|
|
14
|
+
res = res.parent
|
|
15
|
+
}
|
|
16
|
+
return result
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* 给拿到的资源添加父关系
|
|
21
|
+
* @param res
|
|
22
|
+
*/
|
|
23
|
+
export function procParent (reses) {
|
|
24
|
+
for (let value of reses) {
|
|
25
|
+
procInnerParent(value)
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
// 给资源res的所有子,添加父关系
|
|
30
|
+
function procInnerParent (res) {
|
|
31
|
+
for (let value of res.children) {
|
|
32
|
+
value.parent = res
|
|
33
|
+
procInnerParent(value)
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* 从给定一批资源中,递归找到给定号码的资源
|
|
39
|
+
* @param model:给定的一批资源
|
|
40
|
+
* @param id:要查找的资源id串
|
|
41
|
+
*/
|
|
42
|
+
export function find (model, id) {
|
|
43
|
+
// 返回最后一个id信息
|
|
44
|
+
let index = id.lastIndexOf('.')
|
|
45
|
+
if (index !== -1) {
|
|
46
|
+
id = id.substr(index + 1)
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
// 子中有,返回子里的
|
|
50
|
+
for (let value of model) {
|
|
51
|
+
let ret = getInnerResourceById(value, id)
|
|
52
|
+
if (ret) {
|
|
53
|
+
return ret
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
return null
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
// 根据id号取资源,自己不是,递归从子中找
|
|
61
|
+
function getInnerResourceById (res, id) {
|
|
62
|
+
if (res.id === id) {
|
|
63
|
+
return res
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
// 子中有,返回子里的
|
|
67
|
+
for (let value of res.children) {
|
|
68
|
+
let ret = getInnerResourceById(value, id)
|
|
69
|
+
if (ret) {
|
|
70
|
+
return ret
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
return null
|
|
75
|
+
}
|
|
@@ -0,0 +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 './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) : ((val.name == '永济客服部' || val.name == '话务中心') ? 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>
|
|
@@ -0,0 +1,524 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div style="height: auto;width: 100%">
|
|
3
|
+
<div class="row app-row">
|
|
4
|
+
<div class="col-xs-4">
|
|
5
|
+
<label>用户姓名</label>
|
|
6
|
+
</div>
|
|
7
|
+
<div class="col-xs-8">
|
|
8
|
+
<input class="inputText4" v-model=model.f_user_name style="width: 100%"></input>
|
|
9
|
+
</div>
|
|
10
|
+
|
|
11
|
+
</div>
|
|
12
|
+
<div class="row app-row">
|
|
13
|
+
<div class="col-xs-4">
|
|
14
|
+
<label>联系电话</label>
|
|
15
|
+
</div>
|
|
16
|
+
<div class="col-xs-8">
|
|
17
|
+
<input class="input-font inputText4 " v-model=model.f_contact_phone style="width: 100%"></input>
|
|
18
|
+
</div>
|
|
19
|
+
|
|
20
|
+
</div>
|
|
21
|
+
<div class="row app-row">
|
|
22
|
+
<div class="col-xs-4">
|
|
23
|
+
<label>详细地址</label>
|
|
24
|
+
</div>
|
|
25
|
+
<div class="col-xs-8">
|
|
26
|
+
<input class="input-font inputText4 " v-model=model.f_address style="width: 100%"></input>
|
|
27
|
+
</div>
|
|
28
|
+
|
|
29
|
+
</div>
|
|
30
|
+
<div class="row app-row">
|
|
31
|
+
<div class="col-xs-4">
|
|
32
|
+
<label>用户类型</label>
|
|
33
|
+
</div>
|
|
34
|
+
<div class="col-xs-8">
|
|
35
|
+
<v-select id="f_user_type" :value.sync="model.f_user_type" class="input-font"
|
|
36
|
+
:options='user_types' placeholder='请选择用户类型'
|
|
37
|
+
class="inputText4"
|
|
38
|
+
:width="'100%'"
|
|
39
|
+
:value-single="true"
|
|
40
|
+
v-model="model.f_user_type" close-on-select clear-button></v-select>
|
|
41
|
+
|
|
42
|
+
</div>
|
|
43
|
+
|
|
44
|
+
</div>
|
|
45
|
+
|
|
46
|
+
<div class="row app-row">
|
|
47
|
+
<div class="col-xs-4">
|
|
48
|
+
<label>是否上报</label>
|
|
49
|
+
</div>
|
|
50
|
+
<div class="col-xs-8">
|
|
51
|
+
<v-select id="f_user_paidan" :value.sync="model.f_handlingtype" class="input-font"
|
|
52
|
+
:options='handling_types' placeholder='请选择是否上报'
|
|
53
|
+
class="inputText4"
|
|
54
|
+
:width="'100%'"
|
|
55
|
+
:value-single="true"
|
|
56
|
+
v-model="model.f_handlingtype" close-on-select clear-button></v-select>
|
|
57
|
+
</div>
|
|
58
|
+
|
|
59
|
+
</div>
|
|
60
|
+
<div class="row app-row" v-if="model.f_handlingtype=='转站点'">
|
|
61
|
+
<div class="col-xs-4">
|
|
62
|
+
<label>选择站点</label>
|
|
63
|
+
</div>
|
|
64
|
+
<div class="col-xs-8">
|
|
65
|
+
<right-tree-yuncheng islist :userid="userid" :source="source" v-on:re-res="reres" v-ref:f_reciever width="100%"
|
|
66
|
+
style="width: 100%">
|
|
67
|
+
|
|
68
|
+
</right-tree-yuncheng>
|
|
69
|
+
</div>
|
|
70
|
+
|
|
71
|
+
</div>
|
|
72
|
+
<div class="row app-row">
|
|
73
|
+
<div class="col-xs-4">
|
|
74
|
+
<label>报修类型</label>
|
|
75
|
+
</div>
|
|
76
|
+
<div class="col-xs-8">
|
|
77
|
+
<v-select id="f_qiangxiu" :value.sync="model.f_repairtype" class="input-font"
|
|
78
|
+
:options='repairstypes' placeholder='请选择报修类型'
|
|
79
|
+
class="inputText4"
|
|
80
|
+
:width="'100%'"
|
|
81
|
+
:value-single="true"
|
|
82
|
+
v-model="model.f_repairtype" close-on-select clear-button></v-select>
|
|
83
|
+
</div>
|
|
84
|
+
|
|
85
|
+
</div>
|
|
86
|
+
<div class="row app-row">
|
|
87
|
+
<div class="col-xs-4">
|
|
88
|
+
<label>故障类型</label>
|
|
89
|
+
</div>
|
|
90
|
+
<div class="col-xs-8">
|
|
91
|
+
<v-select id="f_guzhang" :value.sync="failure" class="input-font"
|
|
92
|
+
:options='failuretypes' placeholder='请选择故障类型'
|
|
93
|
+
class="inputText4"
|
|
94
|
+
:width="'100%'"
|
|
95
|
+
multiple
|
|
96
|
+
v-model="failure" clear-button></v-select>
|
|
97
|
+
</div>
|
|
98
|
+
|
|
99
|
+
</div>
|
|
100
|
+
<div class="row app-row">
|
|
101
|
+
<div class="col-xs-4">
|
|
102
|
+
<label>备注</label>
|
|
103
|
+
</div>
|
|
104
|
+
<div class="col-xs-8">
|
|
105
|
+
<textarea class="input-font " v-model=model.f_remarks style="width: 100%"></textarea>
|
|
106
|
+
</div>
|
|
107
|
+
|
|
108
|
+
</div>
|
|
109
|
+
<div class="form-group col-sm-12">
|
|
110
|
+
|
|
111
|
+
<div class="panel" style="padding: 10px 10px 5px 10px;">
|
|
112
|
+
<div class="panel-body panel-self"
|
|
113
|
+
style="background-color: #F8F8F8;width: 90%;margin-left:5%;height: 220px;position: relative">
|
|
114
|
+
<div class="row" style="height: 180px;overflow: scroll;top: 1px">
|
|
115
|
+
<div class="col-sm-4">
|
|
116
|
+
<img-self :src="model.f_single_path" alt="抢修照片" :width="140" :height="170" capture="camera" type="file"
|
|
117
|
+
@change="upload"></img-self>
|
|
118
|
+
</div>
|
|
119
|
+
</div>
|
|
120
|
+
|
|
121
|
+
<div class="row text-right div-photo" style="height: 50px">
|
|
122
|
+
<img src="../../../assets/remove.png" @click="delfile('f_single_path', model.f_single_path)"/>
|
|
123
|
+
<button type="button" name="button" class="btn btn-primary btn-photo"
|
|
124
|
+
@click="takePic('f_single_path','抢修照片')">拍照
|
|
125
|
+
</button>
|
|
126
|
+
|
|
127
|
+
</div>
|
|
128
|
+
</div>
|
|
129
|
+
</div>
|
|
130
|
+
|
|
131
|
+
</div>
|
|
132
|
+
<div class="form-group col-sm-12">
|
|
133
|
+
|
|
134
|
+
<div class="panel" style="padding: 10px 10px 5px 10px;">
|
|
135
|
+
<div class="panel-body panel-self"
|
|
136
|
+
style="background-color: #F8F8F8;width: 90%;margin-left:5%;height: 220px;position: relative">
|
|
137
|
+
<div class="row" style="height: 180px;overflow: scroll;top: 1px">
|
|
138
|
+
<div class="col-sm-4">
|
|
139
|
+
<img-self :src="model.f_singlea_path" alt="抢修照片" :width="140" :height="170" capture="camera" type="file"
|
|
140
|
+
@change="upload"></img-self>
|
|
141
|
+
</div>
|
|
142
|
+
</div>
|
|
143
|
+
|
|
144
|
+
<div class="row text-right div-photo" style="height: 50px">
|
|
145
|
+
<img src="../../../assets/remove.png" @click="delfile('f_singlea_path', model.f_singlea_path)"/>
|
|
146
|
+
<button type="button" name="button" class="btn btn-primary btn-photo"
|
|
147
|
+
@click="takePic1('f_singlea_path','抢修照片')">拍照
|
|
148
|
+
</button>
|
|
149
|
+
|
|
150
|
+
</div>
|
|
151
|
+
</div>
|
|
152
|
+
</div>
|
|
153
|
+
|
|
154
|
+
</div>
|
|
155
|
+
<div class="form-group col-sm-12">
|
|
156
|
+
|
|
157
|
+
<div class="panel" style="padding: 10px 10px 5px 10px;">
|
|
158
|
+
<div class="panel-body panel-self"
|
|
159
|
+
style="background-color: #F8F8F8;width: 90%;margin-left:5%;height: 220px;position: relative">
|
|
160
|
+
<div class="row" style="height: 180px;overflow: scroll;top: 1px">
|
|
161
|
+
<div class="col-sm-4">
|
|
162
|
+
<img-self :src="model.f_singleb_path" alt="抢修照片" :width="140" :height="170" capture="camera" type="file"
|
|
163
|
+
@change="upload"></img-self>
|
|
164
|
+
</div>
|
|
165
|
+
</div>
|
|
166
|
+
|
|
167
|
+
<div class="row text-right div-photo" style="height: 50px">
|
|
168
|
+
<img src="../../../assets/remove.png" @click="delfile('f_singleb_path', model.f_singleb_path)"/>
|
|
169
|
+
<button type="button" name="button" class="btn btn-primary btn-photo"
|
|
170
|
+
@click="takePic2('f_singleb_path','抢修照片')">拍照
|
|
171
|
+
</button>
|
|
172
|
+
|
|
173
|
+
</div>
|
|
174
|
+
</div>
|
|
175
|
+
</div>
|
|
176
|
+
|
|
177
|
+
</div>
|
|
178
|
+
<div class="row app-row text-center" style="margin-top: 20px;">
|
|
179
|
+
<button type="button" class="btn btn-lg btn-font btn-color" style="width: 25%;" @click="save">保存</button>
|
|
180
|
+
</div>
|
|
181
|
+
|
|
182
|
+
</div>
|
|
183
|
+
</template>
|
|
184
|
+
|
|
185
|
+
<script>
|
|
186
|
+
import Vue from 'vue'
|
|
187
|
+
import * as Util from '../../../components/Util'
|
|
188
|
+
import {HttpResetClass} from "vue-client";
|
|
189
|
+
|
|
190
|
+
export default {
|
|
191
|
+
title: '在线维修处理',
|
|
192
|
+
props: {
|
|
193
|
+
userinfo: {
|
|
194
|
+
type: Object,
|
|
195
|
+
default: null
|
|
196
|
+
},
|
|
197
|
+
f_userinfo_id: {
|
|
198
|
+
type: String,
|
|
199
|
+
default: ''
|
|
200
|
+
}
|
|
201
|
+
},
|
|
202
|
+
data() {
|
|
203
|
+
return {
|
|
204
|
+
source:
|
|
205
|
+
'dep=this.getParentByType($organization$).getSpecialResByType($department$),' +
|
|
206
|
+
'tool.getFullTree(dep.where(row.hasSpecialRole($派单员$)))',
|
|
207
|
+
userid: Vue.user.id,
|
|
208
|
+
is_has_jingweidu: this.$appdata.getSingleValue('照片水印加经纬度') || 'false',
|
|
209
|
+
failure: ['更换不锈钢波纹管'],
|
|
210
|
+
model: {
|
|
211
|
+
f_userinfo_id: '',
|
|
212
|
+
f_userinfo_code: '',
|
|
213
|
+
aState: null,
|
|
214
|
+
f_address: '',
|
|
215
|
+
f_area: "",
|
|
216
|
+
f_attendant: Vue.user.name,
|
|
217
|
+
f_building: "",
|
|
218
|
+
f_card_id: "",
|
|
219
|
+
f_contact_phone: "",
|
|
220
|
+
f_depid: Vue.user.depids,
|
|
221
|
+
f_filiale_id: "",
|
|
222
|
+
f_floor: "",
|
|
223
|
+
f_handlingtype: "转维修员",
|
|
224
|
+
f_enter_number: '',
|
|
225
|
+
f_meetunit: "",
|
|
226
|
+
f_operator: Vue.user.name,
|
|
227
|
+
f_operatorid: Vue.user.id,
|
|
228
|
+
f_orgid: Vue.user.orgid,
|
|
229
|
+
f_orgname: Vue.user.orgs,
|
|
230
|
+
f_outlets: "",
|
|
231
|
+
f_phone: "",
|
|
232
|
+
f_reciever: "",
|
|
233
|
+
f_remarks: "",
|
|
234
|
+
f_repair_date: Util.getNowDate(),
|
|
235
|
+
f_repairman_phone: "",
|
|
236
|
+
f_repairtype: "整改",
|
|
237
|
+
f_residential_area: "",
|
|
238
|
+
f_room: "",
|
|
239
|
+
f_service_id: "",
|
|
240
|
+
f_source: "临时派单",
|
|
241
|
+
f_street: "",
|
|
242
|
+
f_unit: "",
|
|
243
|
+
f_unit_name: "",
|
|
244
|
+
f_user_name: "",
|
|
245
|
+
f_user_type: "",
|
|
246
|
+
failure: "",
|
|
247
|
+
f_single_path: '',
|
|
248
|
+
f_singlea_path: '',
|
|
249
|
+
f_singleb_path: '',
|
|
250
|
+
serviceacitivity: [{
|
|
251
|
+
f_service_acitivity_type: "派单",
|
|
252
|
+
f_reciever: Vue.user.name
|
|
253
|
+
}]
|
|
254
|
+
},
|
|
255
|
+
repairstypes: this.$appdata.getParam('报修类型'),
|
|
256
|
+
failuretypes: this.$appdata.getParam('在线维修故障类型'),
|
|
257
|
+
user_types: [{label: "民用", value: "民用"},
|
|
258
|
+
{label: "非民用", value: "非民用"}],
|
|
259
|
+
repair_types: [{label: "民用", value: "民用"},
|
|
260
|
+
{label: "非民用", value: "非民用"}],
|
|
261
|
+
handling_types: [{label: "是", value: "转站点"},
|
|
262
|
+
{label: "否", value: "转维修员"}]
|
|
263
|
+
}
|
|
264
|
+
},
|
|
265
|
+
methods: {
|
|
266
|
+
delfile(prop, fileName) {
|
|
267
|
+
if (fileName == Vue.nopic)
|
|
268
|
+
return
|
|
269
|
+
else {
|
|
270
|
+
HostApp.delfile(fileName)
|
|
271
|
+
this.model[prop] = Vue.nopic
|
|
272
|
+
}
|
|
273
|
+
},
|
|
274
|
+
cameraCallBack(prop, fileName) {
|
|
275
|
+
HostApp.__this__.model.f_single_path = fileName + '?' + Math.random()
|
|
276
|
+
HostApp.__callback__ = null
|
|
277
|
+
HostApp.__this__ = null
|
|
278
|
+
},
|
|
279
|
+
cameraCallBack1(prop, fileName) {
|
|
280
|
+
HostApp.__this__.model.f_singlea_path = fileName + '?' + Math.random()
|
|
281
|
+
HostApp.__callback__ = null
|
|
282
|
+
HostApp.__this__ = null
|
|
283
|
+
},
|
|
284
|
+
cameraCallBack2(prop, fileName) {
|
|
285
|
+
HostApp.__this__.model.f_singleb_path = fileName + '?' + Math.random()
|
|
286
|
+
HostApp.__callback__ = null
|
|
287
|
+
HostApp.__this__ = null
|
|
288
|
+
},
|
|
289
|
+
|
|
290
|
+
takePic(prop, title) {
|
|
291
|
+
const obj = HostApp.getGpsDetailAddress()
|
|
292
|
+
HostApp.__callback__ = this.cameraCallBack
|
|
293
|
+
HostApp.__this__ = this
|
|
294
|
+
let fileName
|
|
295
|
+
if (!this.model.f_single_path || this.model.f_single_path.includes("nopic.png")) {
|
|
296
|
+
fileName = Util.guid() + '-' + prop + '.jpg'
|
|
297
|
+
} else {
|
|
298
|
+
fileName = Util.getFileName(this.model.f_single_path)
|
|
299
|
+
}
|
|
300
|
+
let jingweidu = ''
|
|
301
|
+
if (this.is_has_jingweidu == 'true') {
|
|
302
|
+
jingweidu = '\t经度:' + obj.longitude + '\t纬度:' + obj.latitude
|
|
303
|
+
}
|
|
304
|
+
//tag
|
|
305
|
+
//tag
|
|
306
|
+
HostApp._open_a_page({
|
|
307
|
+
type: 'boomerang',
|
|
308
|
+
page: 'com.aofeng.hybrid.android.peripheral.CameraActivity',
|
|
309
|
+
param: {
|
|
310
|
+
file: fileName,
|
|
311
|
+
requestCode: 111,
|
|
312
|
+
callback: 'javascript:HostApp.__callback__("' + prop + '", "%s");',
|
|
313
|
+
watermark: title + '\t时间:' + Util.toStandardTimeString() + '\t' + Vue.user.name + jingweidu
|
|
314
|
+
}
|
|
315
|
+
})
|
|
316
|
+
},
|
|
317
|
+
takePic1(prop, title) {
|
|
318
|
+
HostApp.__callback__ = this.cameraCallBack1
|
|
319
|
+
HostApp.__this__ = this
|
|
320
|
+
let fileName
|
|
321
|
+
if (!this.model.f_singlea_path || this.model.f_singlea_path.includes("nopic.png")) {
|
|
322
|
+
fileName = Util.guid() + '-' + prop + '.jpg'
|
|
323
|
+
} else {
|
|
324
|
+
fileName = Util.getFileName(this.model.f_singlea_path)
|
|
325
|
+
}
|
|
326
|
+
//tag
|
|
327
|
+
//tag
|
|
328
|
+
HostApp._open_a_page({
|
|
329
|
+
type: 'boomerang',
|
|
330
|
+
page: 'com.aofeng.hybrid.android.peripheral.CameraActivity',
|
|
331
|
+
param: {
|
|
332
|
+
file: fileName,
|
|
333
|
+
requestCode: 111,
|
|
334
|
+
callback: 'javascript:HostApp.__callback__("' + prop + '", "%s");',
|
|
335
|
+
watermark: title + '\t时间:' + Util.toStandardTimeString() + '\t' + Vue.user.name
|
|
336
|
+
}
|
|
337
|
+
})
|
|
338
|
+
},
|
|
339
|
+
takePic2(prop, title) {
|
|
340
|
+
HostApp.__callback__ = this.cameraCallBack2
|
|
341
|
+
HostApp.__this__ = this
|
|
342
|
+
let fileName
|
|
343
|
+
if (!this.model.f_singleb_path || this.model.f_singleb_path.includes("nopic.png")) {
|
|
344
|
+
fileName = Util.guid() + '-' + prop + '.jpg'
|
|
345
|
+
} else {
|
|
346
|
+
fileName = Util.getFileName(this.model.f_singleb_path)
|
|
347
|
+
}
|
|
348
|
+
//tag
|
|
349
|
+
//tag
|
|
350
|
+
HostApp._open_a_page({
|
|
351
|
+
type: 'boomerang',
|
|
352
|
+
page: 'com.aofeng.hybrid.android.peripheral.CameraActivity',
|
|
353
|
+
param: {
|
|
354
|
+
file: fileName,
|
|
355
|
+
requestCode: 111,
|
|
356
|
+
callback: 'javascript:HostApp.__callback__("' + prop + '", "%s");',
|
|
357
|
+
watermark: title + '\t时间:' + Util.toStandardTimeString() + '\t' + Vue.user.name
|
|
358
|
+
}
|
|
359
|
+
})
|
|
360
|
+
},
|
|
361
|
+
|
|
362
|
+
save() {
|
|
363
|
+
if (!this.model.f_address) {
|
|
364
|
+
this.$showMessage('请填写地址信息')
|
|
365
|
+
return
|
|
366
|
+
}
|
|
367
|
+
//tag)
|
|
368
|
+
let data = {
|
|
369
|
+
model: this.model, loginUser: {
|
|
370
|
+
name: Vue.user.name,
|
|
371
|
+
ename: Vue.user.ename
|
|
372
|
+
}, user: null, callObj: null
|
|
373
|
+
}
|
|
374
|
+
if (this.model.f_handlingtype == '转维修员') {
|
|
375
|
+
data.toRepair = '一级派单'
|
|
376
|
+
this.model.f_meetunit = Vue.user.deps
|
|
377
|
+
this.model.f_orgid = Vue.user.orgid
|
|
378
|
+
this.model.f_filiale = Vue.user.org
|
|
379
|
+
this.model.f_outlets = Vue.user.deps
|
|
380
|
+
this.model.f_filiale_id = Vue.user.orgid
|
|
381
|
+
}
|
|
382
|
+
//tag
|
|
383
|
+
HostApp.__this__ = this
|
|
384
|
+
HostApp.logicWithHint({
|
|
385
|
+
'logic': 'callerSendPhone', 'callback': 'javascript: HostApp.__this__.commitCallBack()',
|
|
386
|
+
'data': data, 'backresult': 1
|
|
387
|
+
})
|
|
388
|
+
},
|
|
389
|
+
commitCallBack(jo) {
|
|
390
|
+
if (jo.state == "ok" && this.model.f_handlingtype == '转站点') {
|
|
391
|
+
this.$showMessage('抢修上报成功', ['confirm']).then((req) => {
|
|
392
|
+
if (req === 'confirm') {
|
|
393
|
+
this.$dispatch('confirm')
|
|
394
|
+
}
|
|
395
|
+
})
|
|
396
|
+
} else if (jo.state == "ok" && this.model.f_handlingtype == '转维修员') {
|
|
397
|
+
this.$showMessage('抢修上报成功,请前往待办工单页面查看', ['confirm']).then((req) => {
|
|
398
|
+
if (req === 'confirm') {
|
|
399
|
+
this.$dispatch('confirm')
|
|
400
|
+
}
|
|
401
|
+
})
|
|
402
|
+
} else {
|
|
403
|
+
this.$showMessage('服务器内部错误')
|
|
404
|
+
}
|
|
405
|
+
},
|
|
406
|
+
reres(val) {
|
|
407
|
+
if (val.res == undefined || val.res[0] == undefined || val.res[0] == '') {
|
|
408
|
+
return
|
|
409
|
+
}
|
|
410
|
+
this.model.serviceacitivity[0].f_meetunit = val.res[0]
|
|
411
|
+
this.model.f_meetunit = val.res[0]
|
|
412
|
+
this.model.f_filiale_id = val.orgobj[0].parentid
|
|
413
|
+
this.model.f_filiale = val.orgobj[0].parentname
|
|
414
|
+
this.model.f_outlets = val.res[0]
|
|
415
|
+
this.model.serviceacitivity[0].f_reciever = val.resids[0]
|
|
416
|
+
},
|
|
417
|
+
changeFailure(val) {
|
|
418
|
+
let failure = []
|
|
419
|
+
for (let i = 0; i < val.length; i++) {
|
|
420
|
+
failure.push({"f_failure_type": val[i], "failurecase": []})
|
|
421
|
+
}
|
|
422
|
+
this.model.failure = JSON.stringify(failure)
|
|
423
|
+
}
|
|
424
|
+
},
|
|
425
|
+
ready() {
|
|
426
|
+
this.changeFailure(this.failure)
|
|
427
|
+
// let gen = select(this)
|
|
428
|
+
// co(gen)
|
|
429
|
+
if (this.f_userinfo_id) {
|
|
430
|
+
new HttpResetClass().load('POST', 'rs/sql/tel_getUserInfoAdress', {
|
|
431
|
+
data: {
|
|
432
|
+
condition: `ti.f_userinfo_id = '${this.f_userinfo_id}'`
|
|
433
|
+
}
|
|
434
|
+
}, {resolveMsg: null, rejectMsg: null}).then((res) => {
|
|
435
|
+
this.userinfo = res.data[0]
|
|
436
|
+
})
|
|
437
|
+
}
|
|
438
|
+
},
|
|
439
|
+
watch: {
|
|
440
|
+
'failure'(val) {
|
|
441
|
+
this.changeFailure(val)
|
|
442
|
+
},
|
|
443
|
+
'userinfo'(val) {
|
|
444
|
+
if (val) {
|
|
445
|
+
this.model.f_user_name = val.f_user_name
|
|
446
|
+
this.model.f_contact_phone = val.f_user_phone
|
|
447
|
+
this.model.f_userinfo_id = val.f_userinfo_id
|
|
448
|
+
this.model.f_userinfo_code = val.f_userinfo_code
|
|
449
|
+
this.model.f_address = val.f_address
|
|
450
|
+
this.model.f_user_type = val.f_user_type
|
|
451
|
+
this.model.f_enter_number = val.f_enter_number
|
|
452
|
+
}
|
|
453
|
+
}
|
|
454
|
+
}
|
|
455
|
+
}
|
|
456
|
+
</script>
|
|
457
|
+
|
|
458
|
+
<style scoped>
|
|
459
|
+
.inputText4 {
|
|
460
|
+
font-family: Arial, Helvetica, sans-serif;
|
|
461
|
+
background: none repeat scroll 0 0 #F5F7FD;
|
|
462
|
+
border: 1px solid #B8BFE9;
|
|
463
|
+
padding: 5px 7px;
|
|
464
|
+
width: 100px;
|
|
465
|
+
vertical-align: middle;
|
|
466
|
+
height: 30px;
|
|
467
|
+
font-size: 12px;
|
|
468
|
+
margin: 0;
|
|
469
|
+
list-style: none outside none;
|
|
470
|
+
}
|
|
471
|
+
|
|
472
|
+
.input-font {
|
|
473
|
+
font: 15px PingFang-SC-Medium;
|
|
474
|
+
color: #333333;
|
|
475
|
+
}
|
|
476
|
+
|
|
477
|
+
.app-row {
|
|
478
|
+
background-color: white;
|
|
479
|
+
padding: 10px 10px 0 10px;
|
|
480
|
+
border-bottom: 1px solid rgba(235, 235, 235, 0.5);
|
|
481
|
+
}
|
|
482
|
+
|
|
483
|
+
.bg {
|
|
484
|
+
background-color: blue;
|
|
485
|
+
height: 1px;
|
|
486
|
+
border: 0;
|
|
487
|
+
}
|
|
488
|
+
|
|
489
|
+
.app-row {
|
|
490
|
+
background-color: white;
|
|
491
|
+
padding: 10px 10px 0 10px;
|
|
492
|
+
border-bottom: 1px solid rgba(235, 235, 235, 0.5);
|
|
493
|
+
}
|
|
494
|
+
|
|
495
|
+
.search_input {
|
|
496
|
+
border: 0;
|
|
497
|
+
outline: none;
|
|
498
|
+
}
|
|
499
|
+
|
|
500
|
+
.font {
|
|
501
|
+
font: 15px PingFang-SC-Medium;
|
|
502
|
+
color: #666666;
|
|
503
|
+
}
|
|
504
|
+
|
|
505
|
+
.input-font {
|
|
506
|
+
font: 15px PingFang-SC-Medium;
|
|
507
|
+
color: #333333;
|
|
508
|
+
}
|
|
509
|
+
|
|
510
|
+
.btn-font {
|
|
511
|
+
font: 600 16px PingFang-SC-Bold;
|
|
512
|
+
color: #499EDF;
|
|
513
|
+
}
|
|
514
|
+
|
|
515
|
+
.btn-color {
|
|
516
|
+
background-color: #FFFFFF;
|
|
517
|
+
border-radius: 10px;
|
|
518
|
+
border: 1px solid #499EDF;
|
|
519
|
+
}
|
|
520
|
+
|
|
521
|
+
.app-text {
|
|
522
|
+
font-size: 12px;
|
|
523
|
+
}
|
|
524
|
+
</style>
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
// 分公司特殊组件页面注册
|
|
2
|
+
import Vue from "vue";
|
|
3
|
+
|
|
4
|
+
//pc和手机端重写组件较多的话 建议将cp和android分到两个文件中 蓉城较少,所以我就合并到一起
|
|
5
|
+
let specialComp = {
|
|
6
|
+
// 手机处理维修
|
|
7
|
+
'right-tree-yuncheng': (resolve) => { require(['./android/RightTree'], resolve) },
|
|
8
|
+
'temporary-single': (resolve) => { require(['./android/TemporarySingle'], resolve) },
|
|
9
|
+
}
|
|
10
|
+
exports.specialComp = specialComp
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|