system-clients 4.0.9 → 4.0.10
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/server/ResSelect.vue +186 -186
- package/src/components/server/ResSelectGroup.vue +211 -211
- package/src/filiale/ruihua/Main.vue +988 -988
- package/src/filiale/ruihua/system.js +6 -6
@@ -1,988 +1,988 @@
|
|
1
|
-
<template>
|
2
|
-
<div @click="hindsetting1()" :class="{'with-watermark':showwatermakeflag}">
|
3
|
-
<span class="newTip" transition="newTip" @click="tipClick" v-if="newTipShow">
|
4
|
-
<span>您有一条新提醒</span>
|
5
|
-
</span>
|
6
|
-
<div class='flex-row system-main' id="box" v-el:box v-if="!isManger">
|
7
|
-
<div class="auto login-operator1" v-if="$refs.mic.tabs.length === 0">
|
8
|
-
<span>
|
9
|
-
<img
|
10
|
-
src="../../assets/people.png" height="15" width="15">
|
11
|
-
登录人:</span>
|
12
|
-
<label>{{ orgpathnames }}</label>
|
13
|
-
</div>
|
14
|
-
<div class="system-left tree-flex" :class="{'tree-flex-icon': !treeOrIcon}" id="top" v-el:top>
|
15
|
-
<div class="system-left-chi" :class="{'system-left-icon': !treeOrIcon}">
|
16
|
-
<div class="span system-left-tree " style="height:85%">
|
17
|
-
<h3>{{ systemname }}</h3>
|
18
|
-
<left-tree :functions='functions.functions' :userid='userid' @isnodo="isnodo" v-show="treeOrIcon"
|
19
|
-
:tabs="tabs" v-ref:tree></left-tree>
|
20
|
-
</div>
|
21
|
-
|
22
|
-
<div class="tree-flex-footer">
|
23
|
-
|
24
|
-
<dropdown class="auto">
|
25
|
-
<button type="button" data-toggle="dropdown">
|
26
|
-
<img :src="imgs.set" alt=""><span v-if="treeOrIcon">系统设置</span>
|
27
|
-
</button>
|
28
|
-
<ul slot="dropdown-menu" class="dropdown-menu dropdown-menu-up">
|
29
|
-
<li>系统信息及设置</li>
|
30
|
-
<!-- <li>{{name}}</li> -->
|
31
|
-
<li>{{ date }}</li>
|
32
|
-
<li @click="openUrl()">售后服务</li>
|
33
|
-
<li @click="qrCode=true">APP二维码</li>
|
34
|
-
<li @click="show=true">修改密码</li>
|
35
|
-
<li @click="AddChangeMsgShow=true">系统版本:V3.0</li>
|
36
|
-
</ul>
|
37
|
-
|
38
|
-
</dropdown>
|
39
|
-
<a href="index.html" @click.prevent="logOut">
|
40
|
-
<img :src="imgs.out" alt=""><span v-if="treeOrIcon">退出系统</span>
|
41
|
-
</a>
|
42
|
-
</div>
|
43
|
-
</div>
|
44
|
-
</div>
|
45
|
-
<div class="flex right-bg system-right" id="bottom" v-el:bottom>
|
46
|
-
<div class="span">
|
47
|
-
<echarts-box v-if="$refs.mic.tabs.length === 0"></echarts-box>
|
48
|
-
<dynamic :comps='[]' name='main' :selecttab.sync="selecttab" :orgpathnames="orgpathnames"
|
49
|
-
@tab-changed="tabChange" @tabscg="tabcg" v-ref:mic v-show="!($refs.mic.tabs.length === 0)"></dynamic>
|
50
|
-
</div>
|
51
|
-
</div>
|
52
|
-
</div>
|
53
|
-
<div v-show="isManger">
|
54
|
-
<route v-ref:route></route>
|
55
|
-
</div>
|
56
|
-
<modal v-if="newTipContextShow" :show.sync="newTipContextShow" :backdrop="false">
|
57
|
-
<header slot="modal-header" style="display:none"> </header>
|
58
|
-
<article slot="modal-body" class="modal-body">
|
59
|
-
<form class="form-horizontal">
|
60
|
-
<div class="row">
|
61
|
-
<div class="col-sm-12 " v-if="AppDaiBan !==''">
|
62
|
-
<label class="col-sm-2">报装待办:</label>
|
63
|
-
<span style="font-weight:normal">{{AppDaiBan}}</span>
|
64
|
-
</div>
|
65
|
-
<div class="col-sm-12 " v-if="OrderDaiBan !==''">
|
66
|
-
<label class="col-sm-2">预约待办:</label>
|
67
|
-
<span style="font-weight:normal">{{OrderDaiBan}}</span>
|
68
|
-
</div>
|
69
|
-
<div class="col-sm-12 " v-if="flowDaiBan !==''">
|
70
|
-
<label class="col-sm-2">流程审核待办:</label>
|
71
|
-
<span style="font-weight:normal">{{flowDaiBan}}</span>
|
72
|
-
</div>
|
73
|
-
</div>
|
74
|
-
</form>
|
75
|
-
</article>
|
76
|
-
<footer slot="modal-footer" style="height: 8vh" class="modal-footer">
|
77
|
-
<button class="button_search" @click="newTipContextShow = false">确认</button>
|
78
|
-
</footer>
|
79
|
-
</modal>
|
80
|
-
<modal v-show="showRemind" :show.sync="showRemind" :backdrop="false">
|
81
|
-
<header slot="modal-header" class="text-center"><h3>卡表动态库到期</h3></header>
|
82
|
-
<article slot="modal-body" class="modal-body">
|
83
|
-
<form class="form-horizontal">
|
84
|
-
<div class="row">
|
85
|
-
<div class="col-sm-3 " v-for="item in dataRemind">
|
86
|
-
<label class="col-sm-3">{{ item.type }}:</label>
|
87
|
-
<span style="font-weight:normal">{{item.brand}}</span>
|
88
|
-
</div>
|
89
|
-
<div class="col-sm-12 text-right">
|
90
|
-
<span style="font-weight:normal">卡表动态库到期,请联系售后尽快注册!</span>
|
91
|
-
</div>
|
92
|
-
</div>
|
93
|
-
</form>
|
94
|
-
</article>
|
95
|
-
<footer slot="modal-footer" style="height: 8vh" class="modal-footer">
|
96
|
-
<button class="button_search" @click="showRemind = false">确认</button>
|
97
|
-
</footer>
|
98
|
-
</modal>
|
99
|
-
|
100
|
-
<!-- 变更录入 模态框 -->
|
101
|
-
<add-changemsg :show="AddChangeMsgShow" v-on:toggle="AddChangeMsgShow = false"></add-changemsg>
|
102
|
-
<!-- 修改密码组件 -->
|
103
|
-
<modify-pw :show.sync="show" v-if="show"></modify-pw>
|
104
|
-
<!-- 手机扫描二维码 -->
|
105
|
-
<modal :show.sync="qrCode" v-if="qrCode" v-ref:qrmodal backdrop="false">
|
106
|
-
<header slot="modal-header" class="modal-header">
|
107
|
-
请打开手机扫一扫功能进行扫描下载App
|
108
|
-
</header>
|
109
|
-
<article slot="modal-body" class="modal-body">
|
110
|
-
<img style="width: 300px;height: 300px;display: block;margin: auto" src="/images/DownLoadQRCode.png"/>
|
111
|
-
</article>
|
112
|
-
<footer slot="modal-footer" class="modal-footer">
|
113
|
-
<button type="button" class="btn btn-success" @click='qrCode=false'>关闭</button>
|
114
|
-
</footer>
|
115
|
-
</modal>
|
116
|
-
</div>
|
117
|
-
</template>
|
118
|
-
|
119
|
-
<script>
|
120
|
-
import vue from 'vue'
|
121
|
-
import co from 'co'
|
122
|
-
import {HttpResetClass} from "vue-client";
|
123
|
-
|
124
|
-
let getwartermakr = async function (self) {
|
125
|
-
let param = {
|
126
|
-
tablename: 't_singlevalue',
|
127
|
-
condition: " 1=1 and name=\'水印内容\'"
|
128
|
-
};
|
129
|
-
// todo v4
|
130
|
-
let result = await self.$resetpost('api/af-revenue/sql/saleSingleTable', {data: param}, {resolveMsg: null, rejectMsg: null});
|
131
|
-
if (result && result.data.length > 0) {
|
132
|
-
self.showwatermakeflag = true;
|
133
|
-
createWaterMark(`${result.data[0].value}${self.$login.f.ename}`);
|
134
|
-
} else {
|
135
|
-
self.showwatermakeflag = false;
|
136
|
-
}
|
137
|
-
}
|
138
|
-
|
139
|
-
let createWaterMark = function (userName) {
|
140
|
-
let style;
|
141
|
-
if (style) style.remove();
|
142
|
-
let width = window.parseInt(document.body.clientWidth);
|
143
|
-
let canvasWidth = width / window.parseInt(width / 320);
|
144
|
-
let fontFamily = window.getComputedStyle(document.body)["font-family"];
|
145
|
-
let canvas = document.createElement("canvas");
|
146
|
-
canvas.width = canvasWidth;
|
147
|
-
canvas.height = 200;
|
148
|
-
let ctx = canvas.getContext("2d");
|
149
|
-
ctx.rotate((-20 * Math.PI) / 180);
|
150
|
-
ctx.font = `20px ${fontFamily}`;
|
151
|
-
ctx.fillStyle = "rgba(8,8,8,.1)";
|
152
|
-
ctx.fillText(userName, 50, 200);
|
153
|
-
let imgSrc = canvas.toDataURL("image/png");
|
154
|
-
style = document.createElement("style");
|
155
|
-
style.innerHTML = `.with-watermark:before{
|
156
|
-
pointer-events: none;
|
157
|
-
content: "";
|
158
|
-
width: 100%;
|
159
|
-
height: 100%;
|
160
|
-
display: block;
|
161
|
-
position: absolute;
|
162
|
-
background-image: url("${imgSrc}");
|
163
|
-
}`;
|
164
|
-
(document.head.append || document.head.appendChild).apply(document.head, [style]);
|
165
|
-
}
|
166
|
-
|
167
|
-
export default {
|
168
|
-
title: '主界面',
|
169
|
-
props: ['functions', 'userid', 'config'],
|
170
|
-
data() {
|
171
|
-
return {
|
172
|
-
// 页面提示信息定时器
|
173
|
-
interval: null,
|
174
|
-
intervaltx: null,
|
175
|
-
newTipShow: false,
|
176
|
-
newTipContextShow: false,
|
177
|
-
AppDaiBan: '',
|
178
|
-
OrderDaiBan: '',
|
179
|
-
flowDaiBan: '',
|
180
|
-
// 左侧树下部三个小图标
|
181
|
-
imgs: {
|
182
|
-
open: '/images/lefticon/菜单伸缩.png',
|
183
|
-
set: '/images/lefticon/系统设置.png',
|
184
|
-
out: '/images/lefticon/退出系统.png',
|
185
|
-
img1: '/images/newStyle/login-user.png',
|
186
|
-
logoimg: '/static/newStyle/fife.png'
|
187
|
-
// img2: '/images/lefticon/退出系统.png',
|
188
|
-
},
|
189
|
-
treeOrIcon: false,
|
190
|
-
qrCode:false,
|
191
|
-
isManger: false,
|
192
|
-
show: false,
|
193
|
-
systemname: '客服系统',
|
194
|
-
date: this.$login.toStandardDateString(),
|
195
|
-
tabs: [], //已初始化页签数组
|
196
|
-
selecttab: '',
|
197
|
-
setting: true,
|
198
|
-
srcsetting: '../../static/newStyle/setting.png',
|
199
|
-
showwatermakeflag: false,
|
200
|
-
gasbrandIdData: [],
|
201
|
-
showRemind: false,
|
202
|
-
dataRemind: [],
|
203
|
-
connectNumber:10,
|
204
|
-
timeout: 1000,
|
205
|
-
timeoutObj: null,
|
206
|
-
serverTimeoutObj: null,
|
207
|
-
lockReconnect: false,
|
208
|
-
}
|
209
|
-
},
|
210
|
-
ready() {
|
211
|
-
//查询是否有终止且未通知的报建
|
212
|
-
this.getApplyList()
|
213
|
-
getwartermakr(this);
|
214
|
-
let component = this.$login.getUrlCompileParames('component')
|
215
|
-
if (component) {
|
216
|
-
this.isManger = true
|
217
|
-
this.$refs.route.init(component, {data: this.functions.functions})
|
218
|
-
}
|
219
|
-
if (this.$login.f.password == '1') {
|
220
|
-
this.$showMessage('本地登录系统为此账户的初始密码,请确认修改密码!!!', ['confirm', 'cancel']).then((res) => {
|
221
|
-
if (res == 'confirm')
|
222
|
-
this.show = true
|
223
|
-
})
|
224
|
-
}
|
225
|
-
console.log("系统名称", this.$appdata.getSingleValue("系统名称"))
|
226
|
-
this.systemname = this.$appdata.getSingleValue("系统名称") ? this.$appdata.getSingleValue("系统名称") : '客服系统'
|
227
|
-
// let oBox = this.getElement("box")
|
228
|
-
// let oTop = this.getElement("top")
|
229
|
-
// let oBottom = this.getElement("bottom")
|
230
|
-
// let oLine = this.getElement("line")
|
231
|
-
// let that = this
|
232
|
-
// oLine.onmousedown = function(e) {
|
233
|
-
// let disX = (e || event).clientX
|
234
|
-
// oLine.left = oLine.offsetLeft
|
235
|
-
// document.onmousemove = function(e) {
|
236
|
-
// let iT = oLine.left + ((e || event).clientX - disX)
|
237
|
-
// var e = e || window.event
|
238
|
-
// let tarnameb = e.target || e.srcElement
|
239
|
-
// let maxT = oBox.clientWight - oLine.offsetWidth
|
240
|
-
// oLine.style.margin = 0
|
241
|
-
// iT < 0 && (iT = 0)
|
242
|
-
// iT > maxT && (iT = maxT)
|
243
|
-
// oLine.style.left = oTop.style.width = iT + "px"
|
244
|
-
// oBottom.style.width = oBox.clientWidth - iT + "px"
|
245
|
-
// that.$set('treeWidth', iT)
|
246
|
-
// return false
|
247
|
-
// }
|
248
|
-
// document.onmouseup = function() {
|
249
|
-
// document.onmousemove = null
|
250
|
-
// document.onmouseup = null
|
251
|
-
// oLine.releaseCapture && oLine.releaseCapture()
|
252
|
-
// }
|
253
|
-
// oLine.setCapture && oLine.setCapture()
|
254
|
-
// return false
|
255
|
-
// }
|
256
|
-
this.changeShow()
|
257
|
-
const istelRemindTimes =this.$appdata.getSingleValue("是否开启工单提醒定时器")
|
258
|
-
if(istelRemindTimes=='是'){
|
259
|
-
this.getTimesgotoWorkOrderSite()
|
260
|
-
}
|
261
|
-
const isapplyRemind =this.$appdata.getSingleValue("是否开启提醒")
|
262
|
-
const times =this.$appdata.getSingleValue("提示间隔分钟")
|
263
|
-
if(isapplyRemind=='是'){
|
264
|
-
this.config.isTip = true
|
265
|
-
this.config.times = times
|
266
|
-
}
|
267
|
-
// 获取预约列表
|
268
|
-
this.functions.f_role_name && this.functions.f_role_name.includes(this.config.msgRole) && this.config.isTip && this.getOrderList()
|
269
|
-
if (this.config.approve) {
|
270
|
-
this.getFlowList()
|
271
|
-
}
|
272
|
-
// 获取卡表动态库到期时间
|
273
|
-
this.getExpireDate()
|
274
|
-
vue.prototype.$connectNumber = this.connectNumber
|
275
|
-
this.initWebSocket()
|
276
|
-
|
277
|
-
},
|
278
|
-
methods: {
|
279
|
-
async getApplyList() {
|
280
|
-
let http = new HttpResetClass()
|
281
|
-
await http.load('POST', '/api/af-system/sql/singleTable', {
|
282
|
-
data: {
|
283
|
-
tablename: 't_stopapply ts left join t_apply ta on ts.processid=ta.f_process_id',
|
284
|
-
condition: ` ta.f_operator_id='${this.$login.f.id}' and ts.f_notice is null `
|
285
|
-
}
|
286
|
-
}, {
|
287
|
-
resolveMsg: null,
|
288
|
-
rejectMsg: null
|
289
|
-
}).then((res) => {
|
290
|
-
if (res.data.length > 0) {
|
291
|
-
for (let i = 0; i <res.data.length ; i++) {
|
292
|
-
let http11 = new HttpResetClass()
|
293
|
-
http11.load('POST',`${this.$androidUtil.getProxyUrl()}/rs/logic/changestop`, {data:res.data[i]}, {resolveMsg: null, rejectMsg: null})
|
294
|
-
}
|
295
|
-
this.$showMessage(`您有${res.data.length}个报建被终止,请及时处理!`, ['confirm', 'cancel']).then((res) => {
|
296
|
-
if (res == 'confirm') {
|
297
|
-
this.$goto('exploration-user', {}, 'main')
|
298
|
-
|
299
|
-
}
|
300
|
-
})
|
301
|
-
}
|
302
|
-
|
303
|
-
})
|
304
|
-
},
|
305
|
-
// 清除
|
306
|
-
reset () {
|
307
|
-
clearTimeout(this.timeoutObj)
|
308
|
-
clearTimeout(this.serverTimeoutObj)
|
309
|
-
},
|
310
|
-
//每隔几分钟发送一个固定信息给服务端,服务端收到后回复一个固定信息
|
311
|
-
//如果服务端在一定时间内没有收到信息,就认为客户端断开了,服务端就会断开连接
|
312
|
-
// 发送心跳--确保连接有效
|
313
|
-
start () {
|
314
|
-
// 重置
|
315
|
-
vue.prototype.$connectNumber = this.connectNumber // 重置重连次数
|
316
|
-
this.timeoutObj = setTimeout(() => {
|
317
|
-
this.$socket.send('ping')
|
318
|
-
console.log('ping!')
|
319
|
-
this.serverTimeoutObj = setTimeout(() => {
|
320
|
-
this.$socket.close()
|
321
|
-
}, this.timeout)
|
322
|
-
}, this.timeout)
|
323
|
-
},
|
324
|
-
// 重连
|
325
|
-
reconnect () {
|
326
|
-
if (this.lockReconnect) return
|
327
|
-
setTimeout(() => {
|
328
|
-
console.log('连接异常,尝试重新连接。。。。')
|
329
|
-
this.initWebSocket()
|
330
|
-
this.lockReconnect = false
|
331
|
-
}, 1000 * 60)
|
332
|
-
},
|
333
|
-
// 初始化
|
334
|
-
initWebSocket () {
|
335
|
-
let path = `ws://${location.host}/ws?token=${this.$login.f.id}`
|
336
|
-
try {
|
337
|
-
if ('WebSocket' in window) {
|
338
|
-
// 创建对象
|
339
|
-
vue.prototype.$socket = new WebSocket(path)
|
340
|
-
} else {
|
341
|
-
this.$showMessage('您的浏览器不支持websocket的协议,建议使用新版谷歌浏览器,请勿使用IE浏览器,360浏览器请使用极速模式,不要使用兼容模式!"')
|
342
|
-
}
|
343
|
-
} catch (e) {
|
344
|
-
this.reconnect()
|
345
|
-
}
|
346
|
-
|
347
|
-
this.$socket.onopen = this.onOpen // 连接成功
|
348
|
-
this.$socket.onmessage = this.onMessage // 收到消息时回调
|
349
|
-
this.$socket.onclose = this.onClose // 连接关闭时回调
|
350
|
-
this.$socket.onerror = this.onError // 通讯异常
|
351
|
-
},
|
352
|
-
// 通讯异常
|
353
|
-
onError () {
|
354
|
-
console.log('通讯异常')
|
355
|
-
this.reconnect()
|
356
|
-
},
|
357
|
-
// 连接成功
|
358
|
-
onOpen () {
|
359
|
-
console.log('webSocket连接成功')
|
360
|
-
this.start()//每十秒发送心跳包,确保连接状态有效
|
361
|
-
},
|
362
|
-
// 收到消息时回调函数
|
363
|
-
onMessage (event) {
|
364
|
-
if (event.data === 'pong') {
|
365
|
-
this.reset()
|
366
|
-
this.start()
|
367
|
-
return
|
368
|
-
}
|
369
|
-
let data = JSON.parse(event.data)
|
370
|
-
console.log('收到消息', data)
|
371
|
-
this.$broadcast('onMessage', data)
|
372
|
-
if(data.type=="notice"){
|
373
|
-
this.$showMessage(`${data.message}`, ['confirm', 'cancel']).then((res) => {
|
374
|
-
if (res === 'confirm') {
|
375
|
-
//打开报建流程页面
|
376
|
-
this.$goto('exploration-user', {}, 'main')
|
377
|
-
}
|
378
|
-
})
|
379
|
-
} else {
|
380
|
-
this.$showMessage(data.message)
|
381
|
-
}
|
382
|
-
},
|
383
|
-
// 关闭连接时回调函数
|
384
|
-
onClose () {
|
385
|
-
console.log('webSocket连接断开')
|
386
|
-
this.reset()
|
387
|
-
this.reconnect() // 重连
|
388
|
-
},
|
389
|
-
getOrderList(){
|
390
|
-
let times = this.config.times * 60 * 1000
|
391
|
-
console.log("=定时提示间隔=", times)
|
392
|
-
try {
|
393
|
-
this.interval = setInterval(() => {
|
394
|
-
this.getDaiBan()
|
395
|
-
}, times)
|
396
|
-
} catch (error) {
|
397
|
-
console.log('捕获到异常', error)
|
398
|
-
}
|
399
|
-
},
|
400
|
-
getFlowList(){
|
401
|
-
console.log('======获取流程审核待办=====')
|
402
|
-
let times = this.config.approveTimes * 60 * 1000
|
403
|
-
console.log("=定时提示间隔=", times)
|
404
|
-
try {
|
405
|
-
this.interval = setInterval(() => {
|
406
|
-
this.getFlowDaiBan()
|
407
|
-
}, times)
|
408
|
-
} catch (error) {
|
409
|
-
console.log('捕获到异常', error)
|
410
|
-
}
|
411
|
-
},
|
412
|
-
async getFlowDaiBan(){
|
413
|
-
this.flowDaiBan = ''
|
414
|
-
let http = new HttpResetClass()
|
415
|
-
let data = {
|
416
|
-
condition: `f_handler = '${this.$login.f.name}'`
|
417
|
-
}
|
418
|
-
await http.load('POST', 'rs/sql/future_getMyWorkFlowList', {data: data}, {
|
419
|
-
resolveMsg: null,
|
420
|
-
rejectMsg: null
|
421
|
-
}).then((res) => {
|
422
|
-
if (res.data.length > 0){
|
423
|
-
this.flowDaiBan = `您有${res.data.length}条需要处理的审核流程业务!`
|
424
|
-
}
|
425
|
-
}).catch((e)=>{
|
426
|
-
console.log('报错了!!')
|
427
|
-
console.error(e)
|
428
|
-
})
|
429
|
-
if(this.flowDaiBan){
|
430
|
-
this.newTipShow = true
|
431
|
-
}
|
432
|
-
},
|
433
|
-
getTimesgotoWorkOrderSite(){
|
434
|
-
let teltimes = 2*60*1000 // 两分钟
|
435
|
-
try {
|
436
|
-
this.intervaltx =setInterval(()=>{
|
437
|
-
this.gotoWorkOrderSite()
|
438
|
-
},teltimes)
|
439
|
-
}catch (e) {
|
440
|
-
console.log('捕获到异常', e)
|
441
|
-
}
|
442
|
-
},
|
443
|
-
async getDaiBan(){
|
444
|
-
this.OrderDaiBan = ''
|
445
|
-
this.AppDaiBan = ''
|
446
|
-
let http = new HttpResetClass()
|
447
|
-
await http.load('POST', '/api/af-system/sql/singleTable', {data: {
|
448
|
-
tablename:'t_order_center',
|
449
|
-
condition:` (f_orderstate != '预约成功' and f_orgstr ='${this.$login.f.orgid}' and f_orderstate != '预约失败' ) or f_orderstate is null`
|
450
|
-
}}, {
|
451
|
-
resolveMsg: null,
|
452
|
-
rejectMsg: null
|
453
|
-
}).then((res) => {
|
454
|
-
let OrderDaiBan = {}
|
455
|
-
res.data.forEach(item=>{
|
456
|
-
OrderDaiBan[item.f_ordertype] = OrderDaiBan[item.f_ordertype] || []
|
457
|
-
OrderDaiBan[item.f_ordertype].push(item)
|
458
|
-
})
|
459
|
-
if (res.data.length> 0){
|
460
|
-
this.OrderDaiBan = `您有${res.data.length}条需要处理的微信预约业务!`
|
461
|
-
this.OrderDaiBan += `其中 ${Object.keys(OrderDaiBan).map(key=>`${key}:${OrderDaiBan[key].length}条`).join(', ')}`
|
462
|
-
}
|
463
|
-
})
|
464
|
-
let data = {
|
465
|
-
condition: '1 = 1',
|
466
|
-
data: {
|
467
|
-
orgid: this.$login.f.orgid,
|
468
|
-
id: this.$login.f.id
|
469
|
-
}
|
470
|
-
}
|
471
|
-
await http.load('POST', '/rs/sql/checkuser', {data: data}, {
|
472
|
-
resolveMsg: null,
|
473
|
-
rejectMsg: null
|
474
|
-
}).then((res) => {
|
475
|
-
let AppDaiBan = {}
|
476
|
-
res.data.forEach(item=>{
|
477
|
-
AppDaiBan[item.defname] = AppDaiBan[item.defname] || []
|
478
|
-
AppDaiBan[item.defname].push(item)
|
479
|
-
})
|
480
|
-
if (res.data.length> 0){
|
481
|
-
this.AppDaiBan = `您有${res.data.length}条需要处理的报建待办业务!`
|
482
|
-
this.AppDaiBan += `其中 ${Object.keys(AppDaiBan).map(key=>`${key}:${AppDaiBan[key].length}条`).join(', ')}`
|
483
|
-
}
|
484
|
-
}).catch((e)=>{
|
485
|
-
console.error(e)
|
486
|
-
})
|
487
|
-
if(this.AppDaiBan || this.OrderDaiBan){
|
488
|
-
this.newTipShow = true
|
489
|
-
}
|
490
|
-
},
|
491
|
-
// 获取动态库卡表到期日
|
492
|
-
async getExpireDate(){
|
493
|
-
// 获取分公司的表品牌id
|
494
|
-
let http = new HttpResetClass()
|
495
|
-
await http.load('POST', '/api/af-system/sql/singleTable', {data: {
|
496
|
-
tablename:'t_gasbrand_orgid',
|
497
|
-
condition:`f_using_orgid ='${this.$login.f.orgid}'`
|
498
|
-
}}, {
|
499
|
-
resolveMsg: null,
|
500
|
-
rejectMsg: null
|
501
|
-
}).then((res) => {
|
502
|
-
if (res.data.length > 0) {
|
503
|
-
res.data.forEach(item => {
|
504
|
-
this.gasbrandIdData.push(item.f_gasbrand_id)
|
505
|
-
})
|
506
|
-
}
|
507
|
-
if (this.gasbrandIdData.length > 0) {
|
508
|
-
// 获取卡表到期时间
|
509
|
-
http.load('POST', '/api/af-system/sql/singleTable', {data: {
|
510
|
-
tablename:'t_gasbrand',
|
511
|
-
condition:`id in (${this.gasbrandIdData}) and f_meter_type like '%卡表%'`
|
512
|
-
}}, {
|
513
|
-
resolveMsg: null,
|
514
|
-
rejectMsg: null
|
515
|
-
}).then((res) => {
|
516
|
-
if (res.data.length > 0) {
|
517
|
-
res.data.forEach(itre => {
|
518
|
-
let band = null
|
519
|
-
if ('f_dynamic_expire' in itre) {
|
520
|
-
if (itre.f_dynamic_expire !== null && itre.f_dynamic_expire !== '') {
|
521
|
-
let todayold = new Date(itre.f_dynamic_expire)
|
522
|
-
todayold.setDate(todayold.getDate() - parseInt(this.$appdata.getSingleValue('动态库提醒天数设置')))
|
523
|
-
let today = new Date()
|
524
|
-
if (today > todayold) {
|
525
|
-
band = {type:'卡表',brand:itre.f_meter_brand}
|
526
|
-
this.dataRemind.push(band)
|
527
|
-
}
|
528
|
-
}
|
529
|
-
}
|
530
|
-
})
|
531
|
-
|
532
|
-
}
|
533
|
-
if (this.dataRemind.length > 0) {
|
534
|
-
this.showRemind = true
|
535
|
-
// this.$showMessage(band + '。' +
|
536
|
-
// '卡表动态库到期,请联系售后尽快注册!')
|
537
|
-
}
|
538
|
-
})
|
539
|
-
}
|
540
|
-
})
|
541
|
-
},
|
542
|
-
// 提醒框被点击
|
543
|
-
tipClick(){
|
544
|
-
this.newTipShow = false
|
545
|
-
this.newTipContextShow = true
|
546
|
-
},
|
547
|
-
gotoWorkOrderSite(){
|
548
|
-
const isRemind =this.$appdata.getSingleValue("站点工单提醒")
|
549
|
-
console.log('站点工单是否提醒',isRemind)
|
550
|
-
if(isRemind && isRemind !== '是'){
|
551
|
-
return
|
552
|
-
}
|
553
|
-
if(this.functions && this.functions.f_role_name && this.functions.f_role_name.indexOf('派单员') !== -1){
|
554
|
-
const data = {
|
555
|
-
"condition":
|
556
|
-
{
|
557
|
-
"condition":" 1=1 and processins.activities[ state='开始活动' and (defname in('站点接单'))].count(*) > 0 ",
|
558
|
-
"sign":"1=1"
|
559
|
-
},
|
560
|
-
"userid":this.functions.name
|
561
|
-
}
|
562
|
-
new HttpResetClass().load('POST','rs/path/operatorService/n', {data}, {resolveMsg: null, rejectMsg: null}).then(res=>{
|
563
|
-
if(res.data && res.data.n !== 0){
|
564
|
-
this.$showMessage('你有'+res.data.n+'个工单待处理,请尽快前往站点工单页面进行处理')
|
565
|
-
}
|
566
|
-
})
|
567
|
-
}
|
568
|
-
},
|
569
|
-
openUrl() {
|
570
|
-
var url = `http://123.60.214.109:8406/submitTicket?contact=${this.$login.f.name}&orgName=${this.$login.f.orgs}&phone=${this.$login.f.f_user_telephone}`
|
571
|
-
window.open(url, '_blank')
|
572
|
-
},
|
573
|
-
hindsetting() {
|
574
|
-
this.setting = !this.setting
|
575
|
-
if (this.setting) {
|
576
|
-
this.srcsetting = '../../static/newStyle/setting.png'
|
577
|
-
} else {
|
578
|
-
this.srcsetting = '../../static/newStyle/setting1.png'
|
579
|
-
}
|
580
|
-
|
581
|
-
},
|
582
|
-
hindsetting1() {
|
583
|
-
|
584
|
-
if (!this.setting) {
|
585
|
-
this.srcsetting = '../../static/newStyle/setting.png'
|
586
|
-
this.setting = true
|
587
|
-
}
|
588
|
-
|
589
|
-
},
|
590
|
-
isnodo(val) {
|
591
|
-
console.log(val, 'ss')
|
592
|
-
this.selecttab = val
|
593
|
-
},
|
594
|
-
unfurl() {
|
595
|
-
if (this.showsum) {
|
596
|
-
this.showsum = false
|
597
|
-
} else {
|
598
|
-
this.showsum = true
|
599
|
-
}
|
600
|
-
},
|
601
|
-
// getElement(id) {
|
602
|
-
// return document.getElementById(id)
|
603
|
-
// },
|
604
|
-
changeShow() {
|
605
|
-
// this.treeOrIcon = !this.treeOrIcon
|
606
|
-
// let oBox = this.getElement("box")
|
607
|
-
// let oTop = this.getElement("top")
|
608
|
-
// let oBottom = this.getElement("bottom")
|
609
|
-
// let oLine = this.getElement("line")
|
610
|
-
// if (this.treeOrIcon) {
|
611
|
-
// // oLine.style.left = oTop.style.width = 300 + "px"
|
612
|
-
// oTop.style.width = 150 + "px"
|
613
|
-
// oBottom.style.width = oBox.clientWidth - 150 + "px"
|
614
|
-
// }else {
|
615
|
-
// oLine.style.left = oTop.style.width = 50 + "px"
|
616
|
-
// oBottom.style.width = oBox.clientWidth - 50 + "px"
|
617
|
-
// }
|
618
|
-
// }
|
619
|
-
this.treeOrIcon = !this.treeOrIcon
|
620
|
-
// if (this.treeOrIcon) {
|
621
|
-
// this.$els.top.style.width = 14 + "%"
|
622
|
-
// this.$els.bottom.style.width = this.$els.box.clientWidth - 14 + "%"
|
623
|
-
// }else {
|
624
|
-
// this.$els.top.style.width = 8 + "%"
|
625
|
-
// this.$els.bottom.style.width = this.$els.box.clientWidth - 8 + "%"
|
626
|
-
// }
|
627
|
-
},
|
628
|
-
changeMain(userid) {
|
629
|
-
this.$goto('res-main', {userid: this.userid}, 'self')
|
630
|
-
},
|
631
|
-
tabChange(name) {
|
632
|
-
console.log(name, 'tabchanage')
|
633
|
-
this.selecttab = name
|
634
|
-
this.$refs.tree.changeSelect(name)
|
635
|
-
},
|
636
|
-
tabcg(val) {
|
637
|
-
console.log(val)
|
638
|
-
this.tabs = val
|
639
|
-
},
|
640
|
-
logOut() {
|
641
|
-
console.log(this.$login.f)
|
642
|
-
this.$showMessage('您确定要退出系统吗?', ['confirm', 'cancel']).then(async (res) => {
|
643
|
-
if (res == 'confirm') {
|
644
|
-
let data = {
|
645
|
-
userid: this.$login.f.id,
|
646
|
-
username: this.$login.f.name,
|
647
|
-
usertelephone: this.$login.f.f_user_telephone
|
648
|
-
}
|
649
|
-
// todo v4
|
650
|
-
try {
|
651
|
-
await this.$resetget('api/af-system/user/logout', {resolveMsg: '退出成功', rejectMsg: null})
|
652
|
-
}catch(e){
|
653
|
-
}
|
654
|
-
if (window.parent && window.parent !== window) {
|
655
|
-
window.parent.postMessage('reload', '*')
|
656
|
-
} else {
|
657
|
-
window.location.reload()
|
658
|
-
}
|
659
|
-
}
|
660
|
-
})
|
661
|
-
}
|
662
|
-
},
|
663
|
-
computed: {
|
664
|
-
orgpathnames(){
|
665
|
-
let names = this.$login.f.name
|
666
|
-
if(this.$login.f.deps){
|
667
|
-
names = `${this.$login.f.deps}-${names}`
|
668
|
-
}
|
669
|
-
if(this.$login.f.orgs){
|
670
|
-
names = `${this.$login.f.orgs}-${names}`
|
671
|
-
}
|
672
|
-
return names
|
673
|
-
},
|
674
|
-
|
675
|
-
nowDate() {
|
676
|
-
return this.$login.getNowDate()
|
677
|
-
}
|
678
|
-
}
|
679
|
-
}
|
680
|
-
</script>
|
681
|
-
<style lang="less">
|
682
|
-
.newTip-transition {
|
683
|
-
transition: all .4s ease;
|
684
|
-
}
|
685
|
-
.newTip-enter, .newTip-leave {
|
686
|
-
height: 0;
|
687
|
-
padding: 0 10px;
|
688
|
-
opacity: 0;
|
689
|
-
}
|
690
|
-
.newTip a {
|
691
|
-
color: #333;
|
692
|
-
}
|
693
|
-
.newTip {
|
694
|
-
cursor: pointer;
|
695
|
-
text-align: center;
|
696
|
-
position: absolute;
|
697
|
-
top: 3em;
|
698
|
-
margin: 0 auto;
|
699
|
-
width: 200px;
|
700
|
-
left: 48%;
|
701
|
-
line-height: 2;
|
702
|
-
z-index: 10010;
|
703
|
-
box-shadow: 0 4px 12px rgba(0,0,0,0.38);
|
704
|
-
pointer-events: all;
|
705
|
-
border-radius: 4px;
|
706
|
-
background-color: whitesmoke;
|
707
|
-
}
|
708
|
-
/* 组件内通用样式 */
|
709
|
-
.select-error {
|
710
|
-
button {
|
711
|
-
border-bottom: 1px solid #a94442 !important;
|
712
|
-
}
|
713
|
-
}
|
714
|
-
|
715
|
-
// input::-webkit-outer-spin-button,input::-webkit-inner-spin-button{
|
716
|
-
// -webkit-appearance:textfield;
|
717
|
-
// }
|
718
|
-
/* 表单输入框组 */
|
719
|
-
.form-input-group {
|
720
|
-
display: flex;
|
721
|
-
|
722
|
-
label {
|
723
|
-
width: 100px;
|
724
|
-
text-align: right;
|
725
|
-
|
726
|
-
+ * {
|
727
|
-
flex: 1;
|
728
|
-
}
|
729
|
-
}
|
730
|
-
}
|
731
|
-
|
732
|
-
// 日期组件在表单中沾满
|
733
|
-
.form-horizontal .datepicker {
|
734
|
-
width: 100%;
|
735
|
-
}
|
736
|
-
|
737
|
-
// 下拉选择框占据剩余全部空间
|
738
|
-
.select-overspread {
|
739
|
-
.form-group {
|
740
|
-
// margin: 0px 5px 10px 0px;
|
741
|
-
.form-control {
|
742
|
-
margin-right: 0px;
|
743
|
-
}
|
744
|
-
}
|
745
|
-
|
746
|
-
.btn-group, .btn-group-vertical {
|
747
|
-
width: 100%;
|
748
|
-
// padding-right: 5px;
|
749
|
-
button {
|
750
|
-
width: 100%;
|
751
|
-
display: flex;
|
752
|
-
justify-content: space-between;
|
753
|
-
align-items: center;
|
754
|
-
}
|
755
|
-
}
|
756
|
-
|
757
|
-
.dropdown-menu {
|
758
|
-
width: 100%
|
759
|
-
}
|
760
|
-
}
|
761
|
-
|
762
|
-
// 需要特定宽度的的样式
|
763
|
-
.width-60 {
|
764
|
-
width: 60px;
|
765
|
-
}
|
766
|
-
|
767
|
-
.userpanel {
|
768
|
-
font-weight: 300;
|
769
|
-
color: #333;
|
770
|
-
position: fixed;
|
771
|
-
right: 30px;
|
772
|
-
top: 45px;
|
773
|
-
background-color: white;
|
774
|
-
box-shadow: darkgrey 0.5px 0.5px 0.5px 0.5px;
|
775
|
-
padding: 4px 10px 4px 10px;
|
776
|
-
border-radius: 2px;
|
777
|
-
}
|
778
|
-
|
779
|
-
.width-80 {
|
780
|
-
width: 80px;
|
781
|
-
}
|
782
|
-
|
783
|
-
.width-100 {
|
784
|
-
width: 100px;
|
785
|
-
}
|
786
|
-
|
787
|
-
|
788
|
-
/*右侧区域的背景*/
|
789
|
-
.right-bg {
|
790
|
-
width: 100%;
|
791
|
-
flex: 1;
|
792
|
-
color: #304A66;
|
793
|
-
}
|
794
|
-
|
795
|
-
.tree-flex {
|
796
|
-
height: 100%;
|
797
|
-
// width: 150px;
|
798
|
-
/*width: 60px;*/
|
799
|
-
background: #4a7cae;
|
800
|
-
color: #fff;
|
801
|
-
|
802
|
-
}
|
803
|
-
|
804
|
-
.tree-flex-icon {
|
805
|
-
width: 50px;
|
806
|
-
/*transition: 0.5s;*/
|
807
|
-
|
808
|
-
> .span {
|
809
|
-
overflow-x: visible;
|
810
|
-
}
|
811
|
-
}
|
812
|
-
|
813
|
-
.tree-flex h3 {
|
814
|
-
text-align: center;
|
815
|
-
margin: 1em 0;
|
816
|
-
}
|
817
|
-
|
818
|
-
.tree-flex-footer {
|
819
|
-
height: 50px;
|
820
|
-
display: flex;
|
821
|
-
flex-direction: column;
|
822
|
-
color: #fff;
|
823
|
-
}
|
824
|
-
|
825
|
-
.tree-flex-footer a, .tree-flex-footer button {
|
826
|
-
flex: 1;
|
827
|
-
padding: 8px 5px;
|
828
|
-
font-size: 1.2em;
|
829
|
-
// border-top: 1px solid #697D93;
|
830
|
-
border-top: 1px solid #4a7cae;
|
831
|
-
text-decoration: none;
|
832
|
-
color: #fff;
|
833
|
-
cursor: pointer;
|
834
|
-
}
|
835
|
-
|
836
|
-
.tree-flex-footer button {
|
837
|
-
height: auto;
|
838
|
-
width: 100%;
|
839
|
-
border-radius: 0px;
|
840
|
-
background-color: rgba(255, 255, 255, 0);
|
841
|
-
border: none;
|
842
|
-
border-top: 1px solid #4a7cae;
|
843
|
-
// border-top: 1px solid #697D93;
|
844
|
-
text-align: left;
|
845
|
-
}
|
846
|
-
|
847
|
-
.tree-flex-footer button:hover {
|
848
|
-
outline: none;
|
849
|
-
background-color: rgba(255, 255, 255, 0.2);
|
850
|
-
}
|
851
|
-
|
852
|
-
.tree-flex-footer button:focus {
|
853
|
-
outline: none;
|
854
|
-
background-color: rgba(255, 255, 255, 0.5);
|
855
|
-
}
|
856
|
-
|
857
|
-
.tree-flex-footer a:hover {
|
858
|
-
color: #FFF;
|
859
|
-
background-color: rgba(255, 255, 255, 0.2);
|
860
|
-
}
|
861
|
-
|
862
|
-
.tree-flex .btn-group {
|
863
|
-
height: 50px !important;
|
864
|
-
}
|
865
|
-
|
866
|
-
.tree-flex .dropdown-menu {
|
867
|
-
/* 控制显示列表的样式 */
|
868
|
-
background: #4a7cae;
|
869
|
-
border-radius: 0px;
|
870
|
-
color: #fff;
|
871
|
-
width: auto;
|
872
|
-
margin: 0px;
|
873
|
-
padding: 0px;
|
874
|
-
}
|
875
|
-
|
876
|
-
.tree-flex .dropdown-menu-up {
|
877
|
-
/* bottom,top控制上下,left和right控制左右*/
|
878
|
-
left: 100% !important;
|
879
|
-
top: auto !important;
|
880
|
-
bottom: 0;
|
881
|
-
}
|
882
|
-
|
883
|
-
.tree-flex .dropdown-menu-down {
|
884
|
-
/* bottom,top控制上下,left和right控制左右*/
|
885
|
-
left: 100% !important;
|
886
|
-
top: 0 !important;
|
887
|
-
}
|
888
|
-
|
889
|
-
.tree-flex .dropdown-menu li {
|
890
|
-
text-align: center;
|
891
|
-
line-height: 50px;
|
892
|
-
border-bottom: 1px solid #697D93;
|
893
|
-
font-size: 1.2em;
|
894
|
-
width: auto;
|
895
|
-
white-space: nowrap;
|
896
|
-
cursor: default;
|
897
|
-
|
898
|
-
}
|
899
|
-
|
900
|
-
.tree-flex .dropdown-menu li + li {
|
901
|
-
text-align: left;
|
902
|
-
border: 0;
|
903
|
-
line-height: 40px;
|
904
|
-
padding-left: 15px;
|
905
|
-
padding-right: 15px;
|
906
|
-
font-size: 1em;
|
907
|
-
cursor: pointer;
|
908
|
-
}
|
909
|
-
|
910
|
-
.tree-flex .dropdown-menu li + li:hover {
|
911
|
-
background-color: rgba(255, 255, 255, 0.2);
|
912
|
-
}
|
913
|
-
|
914
|
-
.tree-flex .dropdown-menu li a {
|
915
|
-
border: none;
|
916
|
-
color: #fff;
|
917
|
-
height: 40px;
|
918
|
-
line-height: 40px;
|
919
|
-
font-size: 1em;
|
920
|
-
padding: 0px;
|
921
|
-
}
|
922
|
-
|
923
|
-
.tree-flex .dropdown-menu li a:hover {
|
924
|
-
color: #fff;
|
925
|
-
background-color: rgba(255, 255, 255, 0);
|
926
|
-
}
|
927
|
-
|
928
|
-
.tree-flex img {
|
929
|
-
height: 1.2em;
|
930
|
-
width: 1.2em;
|
931
|
-
margin-right: 15px;
|
932
|
-
margin-left: 5px;
|
933
|
-
}
|
934
|
-
|
935
|
-
.line {
|
936
|
-
height: 100%;
|
937
|
-
width: 5px;
|
938
|
-
background: #4C637B;
|
939
|
-
cursor: e-resize;
|
940
|
-
}
|
941
|
-
|
942
|
-
/*为树(tree)组件写的样式*/
|
943
|
-
.tree-img {
|
944
|
-
font-size: 1.2em;
|
945
|
-
}
|
946
|
-
|
947
|
-
/*将较长信息截断显示,鼠标悬停显示全部信息*/
|
948
|
-
.cutout50 {
|
949
|
-
max-width: 50px;
|
950
|
-
overflow: hidden;
|
951
|
-
text-overflow: ellipsis;
|
952
|
-
white-space: nowrap;
|
953
|
-
}
|
954
|
-
|
955
|
-
/* 滚动条样式 */
|
956
|
-
/*---滚动条默认显示样式--*/
|
957
|
-
::-webkit-scrollbar-thumb {
|
958
|
-
// display: none;
|
959
|
-
background-color: rgba(0, 0, 0, 0.4);
|
960
|
-
/*background-color:red;*/
|
961
|
-
height: 50px;
|
962
|
-
outline-offset: -2px;
|
963
|
-
/*outline:2px solid #fff;*/
|
964
|
-
-webkit-border-radius: 4px;
|
965
|
-
/*border: 2px solid #fff;*/
|
966
|
-
}
|
967
|
-
|
968
|
-
/*---鼠标点击滚动条显示样式--*/
|
969
|
-
::-webkit-scrollbar-thumb:hover {
|
970
|
-
// display: inherit;
|
971
|
-
background-color: rgba(0, 0, 0, 0.4);
|
972
|
-
height: 50px;
|
973
|
-
-webkit-border-radius: 4px;
|
974
|
-
}
|
975
|
-
|
976
|
-
/*---滚动条大小--*/
|
977
|
-
::-webkit-scrollbar {
|
978
|
-
width: 8px;
|
979
|
-
height: 8px;
|
980
|
-
}
|
981
|
-
|
982
|
-
/*---滚动框背景样式--*/
|
983
|
-
::-webkit-scrollbar-track-piece {
|
984
|
-
/* 全透明,不显示 */
|
985
|
-
background-color: rgba(255, 255, 255, 0);
|
986
|
-
-webkit-border-radius: 0;
|
987
|
-
}
|
988
|
-
</style>
|
1
|
+
<template>
|
2
|
+
<div @click="hindsetting1()" :class="{'with-watermark':showwatermakeflag}">
|
3
|
+
<span class="newTip" transition="newTip" @click="tipClick" v-if="newTipShow">
|
4
|
+
<span>您有一条新提醒</span>
|
5
|
+
</span>
|
6
|
+
<div class='flex-row system-main' id="box" v-el:box v-if="!isManger">
|
7
|
+
<div class="auto login-operator1" v-if="$refs.mic.tabs.length === 0">
|
8
|
+
<span>
|
9
|
+
<img
|
10
|
+
src="../../assets/people.png" height="15" width="15">
|
11
|
+
登录人:</span>
|
12
|
+
<label>{{ orgpathnames }}</label>
|
13
|
+
</div>
|
14
|
+
<div class="system-left tree-flex" :class="{'tree-flex-icon': !treeOrIcon}" id="top" v-el:top>
|
15
|
+
<div class="system-left-chi" :class="{'system-left-icon': !treeOrIcon}">
|
16
|
+
<div class="span system-left-tree " style="height:85%">
|
17
|
+
<h3>{{ systemname }}</h3>
|
18
|
+
<left-tree :functions='functions.functions' :userid='userid' @isnodo="isnodo" v-show="treeOrIcon"
|
19
|
+
:tabs="tabs" v-ref:tree></left-tree>
|
20
|
+
</div>
|
21
|
+
|
22
|
+
<div class="tree-flex-footer">
|
23
|
+
|
24
|
+
<dropdown class="auto">
|
25
|
+
<button type="button" data-toggle="dropdown">
|
26
|
+
<img :src="imgs.set" alt=""><span v-if="treeOrIcon">系统设置</span>
|
27
|
+
</button>
|
28
|
+
<ul slot="dropdown-menu" class="dropdown-menu dropdown-menu-up">
|
29
|
+
<li>系统信息及设置</li>
|
30
|
+
<!-- <li>{{name}}</li> -->
|
31
|
+
<li>{{ date }}</li>
|
32
|
+
<li @click="openUrl()">售后服务</li>
|
33
|
+
<li @click="qrCode=true">APP二维码</li>
|
34
|
+
<li @click="show=true">修改密码</li>
|
35
|
+
<li @click="AddChangeMsgShow=true">系统版本:V3.0</li>
|
36
|
+
</ul>
|
37
|
+
|
38
|
+
</dropdown>
|
39
|
+
<a href="index.html" @click.prevent="logOut">
|
40
|
+
<img :src="imgs.out" alt=""><span v-if="treeOrIcon">退出系统</span>
|
41
|
+
</a>
|
42
|
+
</div>
|
43
|
+
</div>
|
44
|
+
</div>
|
45
|
+
<div class="flex right-bg system-right" id="bottom" v-el:bottom>
|
46
|
+
<div class="span">
|
47
|
+
<echarts-box v-if="$refs.mic.tabs.length === 0"></echarts-box>
|
48
|
+
<dynamic :comps='[]' name='main' :selecttab.sync="selecttab" :orgpathnames="orgpathnames"
|
49
|
+
@tab-changed="tabChange" @tabscg="tabcg" v-ref:mic v-show="!($refs.mic.tabs.length === 0)"></dynamic>
|
50
|
+
</div>
|
51
|
+
</div>
|
52
|
+
</div>
|
53
|
+
<div v-show="isManger">
|
54
|
+
<route v-ref:route></route>
|
55
|
+
</div>
|
56
|
+
<modal v-if="newTipContextShow" :show.sync="newTipContextShow" :backdrop="false">
|
57
|
+
<header slot="modal-header" style="display:none"> </header>
|
58
|
+
<article slot="modal-body" class="modal-body">
|
59
|
+
<form class="form-horizontal">
|
60
|
+
<div class="row">
|
61
|
+
<div class="col-sm-12 " v-if="AppDaiBan !==''">
|
62
|
+
<label class="col-sm-2">报装待办:</label>
|
63
|
+
<span style="font-weight:normal">{{AppDaiBan}}</span>
|
64
|
+
</div>
|
65
|
+
<div class="col-sm-12 " v-if="OrderDaiBan !==''">
|
66
|
+
<label class="col-sm-2">预约待办:</label>
|
67
|
+
<span style="font-weight:normal">{{OrderDaiBan}}</span>
|
68
|
+
</div>
|
69
|
+
<div class="col-sm-12 " v-if="flowDaiBan !==''">
|
70
|
+
<label class="col-sm-2">流程审核待办:</label>
|
71
|
+
<span style="font-weight:normal">{{flowDaiBan}}</span>
|
72
|
+
</div>
|
73
|
+
</div>
|
74
|
+
</form>
|
75
|
+
</article>
|
76
|
+
<footer slot="modal-footer" style="height: 8vh" class="modal-footer">
|
77
|
+
<button class="button_search" @click="newTipContextShow = false">确认</button>
|
78
|
+
</footer>
|
79
|
+
</modal>
|
80
|
+
<modal v-show="showRemind" :show.sync="showRemind" :backdrop="false">
|
81
|
+
<header slot="modal-header" class="text-center"><h3>卡表动态库到期</h3></header>
|
82
|
+
<article slot="modal-body" class="modal-body">
|
83
|
+
<form class="form-horizontal">
|
84
|
+
<div class="row">
|
85
|
+
<div class="col-sm-3 " v-for="item in dataRemind">
|
86
|
+
<label class="col-sm-3">{{ item.type }}:</label>
|
87
|
+
<span style="font-weight:normal">{{item.brand}}</span>
|
88
|
+
</div>
|
89
|
+
<div class="col-sm-12 text-right">
|
90
|
+
<span style="font-weight:normal">卡表动态库到期,请联系售后尽快注册!</span>
|
91
|
+
</div>
|
92
|
+
</div>
|
93
|
+
</form>
|
94
|
+
</article>
|
95
|
+
<footer slot="modal-footer" style="height: 8vh" class="modal-footer">
|
96
|
+
<button class="button_search" @click="showRemind = false">确认</button>
|
97
|
+
</footer>
|
98
|
+
</modal>
|
99
|
+
|
100
|
+
<!-- 变更录入 模态框 -->
|
101
|
+
<add-changemsg :show="AddChangeMsgShow" v-on:toggle="AddChangeMsgShow = false"></add-changemsg>
|
102
|
+
<!-- 修改密码组件 -->
|
103
|
+
<modify-pw :show.sync="show" v-if="show"></modify-pw>
|
104
|
+
<!-- 手机扫描二维码 -->
|
105
|
+
<modal :show.sync="qrCode" v-if="qrCode" v-ref:qrmodal backdrop="false">
|
106
|
+
<header slot="modal-header" class="modal-header">
|
107
|
+
请打开手机扫一扫功能进行扫描下载App
|
108
|
+
</header>
|
109
|
+
<article slot="modal-body" class="modal-body">
|
110
|
+
<img style="width: 300px;height: 300px;display: block;margin: auto" src="/images/DownLoadQRCode.png"/>
|
111
|
+
</article>
|
112
|
+
<footer slot="modal-footer" class="modal-footer">
|
113
|
+
<button type="button" class="btn btn-success" @click='qrCode=false'>关闭</button>
|
114
|
+
</footer>
|
115
|
+
</modal>
|
116
|
+
</div>
|
117
|
+
</template>
|
118
|
+
|
119
|
+
<script>
|
120
|
+
import vue from 'vue'
|
121
|
+
import co from 'co'
|
122
|
+
import {HttpResetClass} from "vue-client";
|
123
|
+
|
124
|
+
let getwartermakr = async function (self) {
|
125
|
+
let param = {
|
126
|
+
tablename: 't_singlevalue',
|
127
|
+
condition: " 1=1 and name=\'水印内容\'"
|
128
|
+
};
|
129
|
+
// todo v4
|
130
|
+
let result = await self.$resetpost('api/af-revenue/sql/saleSingleTable', {data: param}, {resolveMsg: null, rejectMsg: null});
|
131
|
+
if (result && result.data.length > 0) {
|
132
|
+
self.showwatermakeflag = true;
|
133
|
+
createWaterMark(`${result.data[0].value}${self.$login.f.ename}`);
|
134
|
+
} else {
|
135
|
+
self.showwatermakeflag = false;
|
136
|
+
}
|
137
|
+
}
|
138
|
+
|
139
|
+
let createWaterMark = function (userName) {
|
140
|
+
let style;
|
141
|
+
if (style) style.remove();
|
142
|
+
let width = window.parseInt(document.body.clientWidth);
|
143
|
+
let canvasWidth = width / window.parseInt(width / 320);
|
144
|
+
let fontFamily = window.getComputedStyle(document.body)["font-family"];
|
145
|
+
let canvas = document.createElement("canvas");
|
146
|
+
canvas.width = canvasWidth;
|
147
|
+
canvas.height = 200;
|
148
|
+
let ctx = canvas.getContext("2d");
|
149
|
+
ctx.rotate((-20 * Math.PI) / 180);
|
150
|
+
ctx.font = `20px ${fontFamily}`;
|
151
|
+
ctx.fillStyle = "rgba(8,8,8,.1)";
|
152
|
+
ctx.fillText(userName, 50, 200);
|
153
|
+
let imgSrc = canvas.toDataURL("image/png");
|
154
|
+
style = document.createElement("style");
|
155
|
+
style.innerHTML = `.with-watermark:before{
|
156
|
+
pointer-events: none;
|
157
|
+
content: "";
|
158
|
+
width: 100%;
|
159
|
+
height: 100%;
|
160
|
+
display: block;
|
161
|
+
position: absolute;
|
162
|
+
background-image: url("${imgSrc}");
|
163
|
+
}`;
|
164
|
+
(document.head.append || document.head.appendChild).apply(document.head, [style]);
|
165
|
+
}
|
166
|
+
|
167
|
+
export default {
|
168
|
+
title: '主界面',
|
169
|
+
props: ['functions', 'userid', 'config'],
|
170
|
+
data() {
|
171
|
+
return {
|
172
|
+
// 页面提示信息定时器
|
173
|
+
interval: null,
|
174
|
+
intervaltx: null,
|
175
|
+
newTipShow: false,
|
176
|
+
newTipContextShow: false,
|
177
|
+
AppDaiBan: '',
|
178
|
+
OrderDaiBan: '',
|
179
|
+
flowDaiBan: '',
|
180
|
+
// 左侧树下部三个小图标
|
181
|
+
imgs: {
|
182
|
+
open: '/images/lefticon/菜单伸缩.png',
|
183
|
+
set: '/images/lefticon/系统设置.png',
|
184
|
+
out: '/images/lefticon/退出系统.png',
|
185
|
+
img1: '/images/newStyle/login-user.png',
|
186
|
+
logoimg: '/static/newStyle/fife.png'
|
187
|
+
// img2: '/images/lefticon/退出系统.png',
|
188
|
+
},
|
189
|
+
treeOrIcon: false,
|
190
|
+
qrCode:false,
|
191
|
+
isManger: false,
|
192
|
+
show: false,
|
193
|
+
systemname: '客服系统',
|
194
|
+
date: this.$login.toStandardDateString(),
|
195
|
+
tabs: [], //已初始化页签数组
|
196
|
+
selecttab: '',
|
197
|
+
setting: true,
|
198
|
+
srcsetting: '../../static/newStyle/setting.png',
|
199
|
+
showwatermakeflag: false,
|
200
|
+
gasbrandIdData: [],
|
201
|
+
showRemind: false,
|
202
|
+
dataRemind: [],
|
203
|
+
connectNumber:10,
|
204
|
+
timeout: 1000,
|
205
|
+
timeoutObj: null,
|
206
|
+
serverTimeoutObj: null,
|
207
|
+
lockReconnect: false,
|
208
|
+
}
|
209
|
+
},
|
210
|
+
ready() {
|
211
|
+
//查询是否有终止且未通知的报建
|
212
|
+
this.getApplyList()
|
213
|
+
getwartermakr(this);
|
214
|
+
let component = this.$login.getUrlCompileParames('component')
|
215
|
+
if (component) {
|
216
|
+
this.isManger = true
|
217
|
+
this.$refs.route.init(component, {data: this.functions.functions})
|
218
|
+
}
|
219
|
+
if (this.$login.f.password == '1') {
|
220
|
+
this.$showMessage('本地登录系统为此账户的初始密码,请确认修改密码!!!', ['confirm', 'cancel']).then((res) => {
|
221
|
+
if (res == 'confirm')
|
222
|
+
this.show = true
|
223
|
+
})
|
224
|
+
}
|
225
|
+
console.log("系统名称", this.$appdata.getSingleValue("系统名称"))
|
226
|
+
this.systemname = this.$appdata.getSingleValue("系统名称") ? this.$appdata.getSingleValue("系统名称") : '客服系统'
|
227
|
+
// let oBox = this.getElement("box")
|
228
|
+
// let oTop = this.getElement("top")
|
229
|
+
// let oBottom = this.getElement("bottom")
|
230
|
+
// let oLine = this.getElement("line")
|
231
|
+
// let that = this
|
232
|
+
// oLine.onmousedown = function(e) {
|
233
|
+
// let disX = (e || event).clientX
|
234
|
+
// oLine.left = oLine.offsetLeft
|
235
|
+
// document.onmousemove = function(e) {
|
236
|
+
// let iT = oLine.left + ((e || event).clientX - disX)
|
237
|
+
// var e = e || window.event
|
238
|
+
// let tarnameb = e.target || e.srcElement
|
239
|
+
// let maxT = oBox.clientWight - oLine.offsetWidth
|
240
|
+
// oLine.style.margin = 0
|
241
|
+
// iT < 0 && (iT = 0)
|
242
|
+
// iT > maxT && (iT = maxT)
|
243
|
+
// oLine.style.left = oTop.style.width = iT + "px"
|
244
|
+
// oBottom.style.width = oBox.clientWidth - iT + "px"
|
245
|
+
// that.$set('treeWidth', iT)
|
246
|
+
// return false
|
247
|
+
// }
|
248
|
+
// document.onmouseup = function() {
|
249
|
+
// document.onmousemove = null
|
250
|
+
// document.onmouseup = null
|
251
|
+
// oLine.releaseCapture && oLine.releaseCapture()
|
252
|
+
// }
|
253
|
+
// oLine.setCapture && oLine.setCapture()
|
254
|
+
// return false
|
255
|
+
// }
|
256
|
+
this.changeShow()
|
257
|
+
const istelRemindTimes =this.$appdata.getSingleValue("是否开启工单提醒定时器")
|
258
|
+
if(istelRemindTimes=='是'){
|
259
|
+
this.getTimesgotoWorkOrderSite()
|
260
|
+
}
|
261
|
+
const isapplyRemind =this.$appdata.getSingleValue("是否开启提醒")
|
262
|
+
const times =this.$appdata.getSingleValue("提示间隔分钟")
|
263
|
+
if(isapplyRemind=='是'){
|
264
|
+
this.config.isTip = true
|
265
|
+
this.config.times = times
|
266
|
+
}
|
267
|
+
// 获取预约列表
|
268
|
+
this.functions.f_role_name && this.functions.f_role_name.includes(this.config.msgRole) && this.config.isTip && this.getOrderList()
|
269
|
+
if (this.config.approve) {
|
270
|
+
this.getFlowList()
|
271
|
+
}
|
272
|
+
// 获取卡表动态库到期时间
|
273
|
+
this.getExpireDate()
|
274
|
+
vue.prototype.$connectNumber = this.connectNumber
|
275
|
+
this.initWebSocket()
|
276
|
+
|
277
|
+
},
|
278
|
+
methods: {
|
279
|
+
async getApplyList() {
|
280
|
+
let http = new HttpResetClass()
|
281
|
+
await http.load('POST', '/api/af-system/sql/singleTable', {
|
282
|
+
data: {
|
283
|
+
tablename: 't_stopapply ts left join t_apply ta on ts.processid=ta.f_process_id',
|
284
|
+
condition: ` ta.f_operator_id='${this.$login.f.id}' and ts.f_notice is null `
|
285
|
+
}
|
286
|
+
}, {
|
287
|
+
resolveMsg: null,
|
288
|
+
rejectMsg: null
|
289
|
+
}).then((res) => {
|
290
|
+
if (res.data.length > 0) {
|
291
|
+
for (let i = 0; i <res.data.length ; i++) {
|
292
|
+
let http11 = new HttpResetClass()
|
293
|
+
http11.load('POST',`${this.$androidUtil.getProxyUrl()}/rs/logic/changestop`, {data:res.data[i]}, {resolveMsg: null, rejectMsg: null})
|
294
|
+
}
|
295
|
+
this.$showMessage(`您有${res.data.length}个报建被终止,请及时处理!`, ['confirm', 'cancel']).then((res) => {
|
296
|
+
if (res == 'confirm') {
|
297
|
+
this.$goto('exploration-user', {}, 'main')
|
298
|
+
|
299
|
+
}
|
300
|
+
})
|
301
|
+
}
|
302
|
+
|
303
|
+
})
|
304
|
+
},
|
305
|
+
// 清除
|
306
|
+
reset () {
|
307
|
+
clearTimeout(this.timeoutObj)
|
308
|
+
clearTimeout(this.serverTimeoutObj)
|
309
|
+
},
|
310
|
+
//每隔几分钟发送一个固定信息给服务端,服务端收到后回复一个固定信息
|
311
|
+
//如果服务端在一定时间内没有收到信息,就认为客户端断开了,服务端就会断开连接
|
312
|
+
// 发送心跳--确保连接有效
|
313
|
+
start () {
|
314
|
+
// 重置
|
315
|
+
vue.prototype.$connectNumber = this.connectNumber // 重置重连次数
|
316
|
+
this.timeoutObj = setTimeout(() => {
|
317
|
+
this.$socket.send('ping')
|
318
|
+
console.log('ping!')
|
319
|
+
this.serverTimeoutObj = setTimeout(() => {
|
320
|
+
this.$socket.close()
|
321
|
+
}, this.timeout)
|
322
|
+
}, this.timeout)
|
323
|
+
},
|
324
|
+
// 重连
|
325
|
+
reconnect () {
|
326
|
+
if (this.lockReconnect) return
|
327
|
+
setTimeout(() => {
|
328
|
+
console.log('连接异常,尝试重新连接。。。。')
|
329
|
+
this.initWebSocket()
|
330
|
+
this.lockReconnect = false
|
331
|
+
}, 1000 * 60)
|
332
|
+
},
|
333
|
+
// 初始化
|
334
|
+
initWebSocket () {
|
335
|
+
let path = `ws://${location.host}/ws?token=${this.$login.f.id}`
|
336
|
+
try {
|
337
|
+
if ('WebSocket' in window) {
|
338
|
+
// 创建对象
|
339
|
+
vue.prototype.$socket = new WebSocket(path)
|
340
|
+
} else {
|
341
|
+
this.$showMessage('您的浏览器不支持websocket的协议,建议使用新版谷歌浏览器,请勿使用IE浏览器,360浏览器请使用极速模式,不要使用兼容模式!"')
|
342
|
+
}
|
343
|
+
} catch (e) {
|
344
|
+
this.reconnect()
|
345
|
+
}
|
346
|
+
|
347
|
+
this.$socket.onopen = this.onOpen // 连接成功
|
348
|
+
this.$socket.onmessage = this.onMessage // 收到消息时回调
|
349
|
+
this.$socket.onclose = this.onClose // 连接关闭时回调
|
350
|
+
this.$socket.onerror = this.onError // 通讯异常
|
351
|
+
},
|
352
|
+
// 通讯异常
|
353
|
+
onError () {
|
354
|
+
console.log('通讯异常')
|
355
|
+
this.reconnect()
|
356
|
+
},
|
357
|
+
// 连接成功
|
358
|
+
onOpen () {
|
359
|
+
console.log('webSocket连接成功')
|
360
|
+
this.start()//每十秒发送心跳包,确保连接状态有效
|
361
|
+
},
|
362
|
+
// 收到消息时回调函数
|
363
|
+
onMessage (event) {
|
364
|
+
if (event.data === 'pong') {
|
365
|
+
this.reset()
|
366
|
+
this.start()
|
367
|
+
return
|
368
|
+
}
|
369
|
+
let data = JSON.parse(event.data)
|
370
|
+
console.log('收到消息', data)
|
371
|
+
this.$broadcast('onMessage', data)
|
372
|
+
if(data.type=="notice"){
|
373
|
+
this.$showMessage(`${data.message}`, ['confirm', 'cancel']).then((res) => {
|
374
|
+
if (res === 'confirm') {
|
375
|
+
//打开报建流程页面
|
376
|
+
this.$goto('exploration-user', {}, 'main')
|
377
|
+
}
|
378
|
+
})
|
379
|
+
} else {
|
380
|
+
this.$showMessage(data.message)
|
381
|
+
}
|
382
|
+
},
|
383
|
+
// 关闭连接时回调函数
|
384
|
+
onClose () {
|
385
|
+
console.log('webSocket连接断开')
|
386
|
+
this.reset()
|
387
|
+
this.reconnect() // 重连
|
388
|
+
},
|
389
|
+
getOrderList(){
|
390
|
+
let times = this.config.times * 60 * 1000
|
391
|
+
console.log("=定时提示间隔=", times)
|
392
|
+
try {
|
393
|
+
this.interval = setInterval(() => {
|
394
|
+
this.getDaiBan()
|
395
|
+
}, times)
|
396
|
+
} catch (error) {
|
397
|
+
console.log('捕获到异常', error)
|
398
|
+
}
|
399
|
+
},
|
400
|
+
getFlowList(){
|
401
|
+
console.log('======获取流程审核待办=====')
|
402
|
+
let times = this.config.approveTimes * 60 * 1000
|
403
|
+
console.log("=定时提示间隔=", times)
|
404
|
+
try {
|
405
|
+
this.interval = setInterval(() => {
|
406
|
+
this.getFlowDaiBan()
|
407
|
+
}, times)
|
408
|
+
} catch (error) {
|
409
|
+
console.log('捕获到异常', error)
|
410
|
+
}
|
411
|
+
},
|
412
|
+
async getFlowDaiBan(){
|
413
|
+
this.flowDaiBan = ''
|
414
|
+
let http = new HttpResetClass()
|
415
|
+
let data = {
|
416
|
+
condition: `f_handler = '${this.$login.f.name}'`
|
417
|
+
}
|
418
|
+
await http.load('POST', 'rs/sql/future_getMyWorkFlowList', {data: data}, {
|
419
|
+
resolveMsg: null,
|
420
|
+
rejectMsg: null
|
421
|
+
}).then((res) => {
|
422
|
+
if (res.data.length > 0){
|
423
|
+
this.flowDaiBan = `您有${res.data.length}条需要处理的审核流程业务!`
|
424
|
+
}
|
425
|
+
}).catch((e)=>{
|
426
|
+
console.log('报错了!!')
|
427
|
+
console.error(e)
|
428
|
+
})
|
429
|
+
if(this.flowDaiBan){
|
430
|
+
this.newTipShow = true
|
431
|
+
}
|
432
|
+
},
|
433
|
+
getTimesgotoWorkOrderSite(){
|
434
|
+
let teltimes = 2*60*1000 // 两分钟
|
435
|
+
try {
|
436
|
+
this.intervaltx =setInterval(()=>{
|
437
|
+
this.gotoWorkOrderSite()
|
438
|
+
},teltimes)
|
439
|
+
}catch (e) {
|
440
|
+
console.log('捕获到异常', e)
|
441
|
+
}
|
442
|
+
},
|
443
|
+
async getDaiBan(){
|
444
|
+
this.OrderDaiBan = ''
|
445
|
+
this.AppDaiBan = ''
|
446
|
+
let http = new HttpResetClass()
|
447
|
+
await http.load('POST', '/api/af-system/sql/singleTable', {data: {
|
448
|
+
tablename:'t_order_center',
|
449
|
+
condition:` (f_orderstate != '预约成功' and f_orgstr ='${this.$login.f.orgid}' and f_orderstate != '预约失败' ) or f_orderstate is null`
|
450
|
+
}}, {
|
451
|
+
resolveMsg: null,
|
452
|
+
rejectMsg: null
|
453
|
+
}).then((res) => {
|
454
|
+
let OrderDaiBan = {}
|
455
|
+
res.data.forEach(item=>{
|
456
|
+
OrderDaiBan[item.f_ordertype] = OrderDaiBan[item.f_ordertype] || []
|
457
|
+
OrderDaiBan[item.f_ordertype].push(item)
|
458
|
+
})
|
459
|
+
if (res.data.length> 0){
|
460
|
+
this.OrderDaiBan = `您有${res.data.length}条需要处理的微信预约业务!`
|
461
|
+
this.OrderDaiBan += `其中 ${Object.keys(OrderDaiBan).map(key=>`${key}:${OrderDaiBan[key].length}条`).join(', ')}`
|
462
|
+
}
|
463
|
+
})
|
464
|
+
let data = {
|
465
|
+
condition: '1 = 1',
|
466
|
+
data: {
|
467
|
+
orgid: this.$login.f.orgid,
|
468
|
+
id: this.$login.f.id
|
469
|
+
}
|
470
|
+
}
|
471
|
+
await http.load('POST', '/rs/sql/checkuser', {data: data}, {
|
472
|
+
resolveMsg: null,
|
473
|
+
rejectMsg: null
|
474
|
+
}).then((res) => {
|
475
|
+
let AppDaiBan = {}
|
476
|
+
res.data.forEach(item=>{
|
477
|
+
AppDaiBan[item.defname] = AppDaiBan[item.defname] || []
|
478
|
+
AppDaiBan[item.defname].push(item)
|
479
|
+
})
|
480
|
+
if (res.data.length> 0){
|
481
|
+
this.AppDaiBan = `您有${res.data.length}条需要处理的报建待办业务!`
|
482
|
+
this.AppDaiBan += `其中 ${Object.keys(AppDaiBan).map(key=>`${key}:${AppDaiBan[key].length}条`).join(', ')}`
|
483
|
+
}
|
484
|
+
}).catch((e)=>{
|
485
|
+
console.error(e)
|
486
|
+
})
|
487
|
+
if(this.AppDaiBan || this.OrderDaiBan){
|
488
|
+
this.newTipShow = true
|
489
|
+
}
|
490
|
+
},
|
491
|
+
// 获取动态库卡表到期日
|
492
|
+
async getExpireDate(){
|
493
|
+
// 获取分公司的表品牌id
|
494
|
+
let http = new HttpResetClass()
|
495
|
+
await http.load('POST', '/api/af-system/sql/singleTable', {data: {
|
496
|
+
tablename:'t_gasbrand_orgid',
|
497
|
+
condition:`f_using_orgid ='${this.$login.f.orgid}'`
|
498
|
+
}}, {
|
499
|
+
resolveMsg: null,
|
500
|
+
rejectMsg: null
|
501
|
+
}).then((res) => {
|
502
|
+
if (res.data.length > 0) {
|
503
|
+
res.data.forEach(item => {
|
504
|
+
this.gasbrandIdData.push(item.f_gasbrand_id)
|
505
|
+
})
|
506
|
+
}
|
507
|
+
if (this.gasbrandIdData.length > 0) {
|
508
|
+
// 获取卡表到期时间
|
509
|
+
http.load('POST', '/api/af-system/sql/singleTable', {data: {
|
510
|
+
tablename:'t_gasbrand',
|
511
|
+
condition:`id in (${this.gasbrandIdData}) and f_meter_type like '%卡表%'`
|
512
|
+
}}, {
|
513
|
+
resolveMsg: null,
|
514
|
+
rejectMsg: null
|
515
|
+
}).then((res) => {
|
516
|
+
if (res.data.length > 0) {
|
517
|
+
res.data.forEach(itre => {
|
518
|
+
let band = null
|
519
|
+
if ('f_dynamic_expire' in itre) {
|
520
|
+
if (itre.f_dynamic_expire !== null && itre.f_dynamic_expire !== '') {
|
521
|
+
let todayold = new Date(itre.f_dynamic_expire)
|
522
|
+
todayold.setDate(todayold.getDate() - parseInt(this.$appdata.getSingleValue('动态库提醒天数设置')))
|
523
|
+
let today = new Date()
|
524
|
+
if (today > todayold) {
|
525
|
+
band = {type:'卡表',brand:itre.f_meter_brand}
|
526
|
+
this.dataRemind.push(band)
|
527
|
+
}
|
528
|
+
}
|
529
|
+
}
|
530
|
+
})
|
531
|
+
|
532
|
+
}
|
533
|
+
if (this.dataRemind.length > 0) {
|
534
|
+
this.showRemind = true
|
535
|
+
// this.$showMessage(band + '。' +
|
536
|
+
// '卡表动态库到期,请联系售后尽快注册!')
|
537
|
+
}
|
538
|
+
})
|
539
|
+
}
|
540
|
+
})
|
541
|
+
},
|
542
|
+
// 提醒框被点击
|
543
|
+
tipClick(){
|
544
|
+
this.newTipShow = false
|
545
|
+
this.newTipContextShow = true
|
546
|
+
},
|
547
|
+
gotoWorkOrderSite(){
|
548
|
+
const isRemind =this.$appdata.getSingleValue("站点工单提醒")
|
549
|
+
console.log('站点工单是否提醒',isRemind)
|
550
|
+
if(isRemind && isRemind !== '是'){
|
551
|
+
return
|
552
|
+
}
|
553
|
+
if(this.functions && this.functions.f_role_name && this.functions.f_role_name.indexOf('派单员') !== -1){
|
554
|
+
const data = {
|
555
|
+
"condition":
|
556
|
+
{
|
557
|
+
"condition":" 1=1 and processins.activities[ state='开始活动' and (defname in('站点接单'))].count(*) > 0 ",
|
558
|
+
"sign":"1=1"
|
559
|
+
},
|
560
|
+
"userid":this.functions.name
|
561
|
+
}
|
562
|
+
new HttpResetClass().load('POST','rs/path/operatorService/n', {data}, {resolveMsg: null, rejectMsg: null}).then(res=>{
|
563
|
+
if(res.data && res.data.n !== 0){
|
564
|
+
this.$showMessage('你有'+res.data.n+'个工单待处理,请尽快前往站点工单页面进行处理')
|
565
|
+
}
|
566
|
+
})
|
567
|
+
}
|
568
|
+
},
|
569
|
+
openUrl() {
|
570
|
+
var url = `http://123.60.214.109:8406/submitTicket?contact=${this.$login.f.name}&orgName=${this.$login.f.orgs}&phone=${this.$login.f.f_user_telephone}`
|
571
|
+
window.open(url, '_blank')
|
572
|
+
},
|
573
|
+
hindsetting() {
|
574
|
+
this.setting = !this.setting
|
575
|
+
if (this.setting) {
|
576
|
+
this.srcsetting = '../../static/newStyle/setting.png'
|
577
|
+
} else {
|
578
|
+
this.srcsetting = '../../static/newStyle/setting1.png'
|
579
|
+
}
|
580
|
+
|
581
|
+
},
|
582
|
+
hindsetting1() {
|
583
|
+
|
584
|
+
if (!this.setting) {
|
585
|
+
this.srcsetting = '../../static/newStyle/setting.png'
|
586
|
+
this.setting = true
|
587
|
+
}
|
588
|
+
|
589
|
+
},
|
590
|
+
isnodo(val) {
|
591
|
+
console.log(val, 'ss')
|
592
|
+
this.selecttab = val
|
593
|
+
},
|
594
|
+
unfurl() {
|
595
|
+
if (this.showsum) {
|
596
|
+
this.showsum = false
|
597
|
+
} else {
|
598
|
+
this.showsum = true
|
599
|
+
}
|
600
|
+
},
|
601
|
+
// getElement(id) {
|
602
|
+
// return document.getElementById(id)
|
603
|
+
// },
|
604
|
+
changeShow() {
|
605
|
+
// this.treeOrIcon = !this.treeOrIcon
|
606
|
+
// let oBox = this.getElement("box")
|
607
|
+
// let oTop = this.getElement("top")
|
608
|
+
// let oBottom = this.getElement("bottom")
|
609
|
+
// let oLine = this.getElement("line")
|
610
|
+
// if (this.treeOrIcon) {
|
611
|
+
// // oLine.style.left = oTop.style.width = 300 + "px"
|
612
|
+
// oTop.style.width = 150 + "px"
|
613
|
+
// oBottom.style.width = oBox.clientWidth - 150 + "px"
|
614
|
+
// }else {
|
615
|
+
// oLine.style.left = oTop.style.width = 50 + "px"
|
616
|
+
// oBottom.style.width = oBox.clientWidth - 50 + "px"
|
617
|
+
// }
|
618
|
+
// }
|
619
|
+
this.treeOrIcon = !this.treeOrIcon
|
620
|
+
// if (this.treeOrIcon) {
|
621
|
+
// this.$els.top.style.width = 14 + "%"
|
622
|
+
// this.$els.bottom.style.width = this.$els.box.clientWidth - 14 + "%"
|
623
|
+
// }else {
|
624
|
+
// this.$els.top.style.width = 8 + "%"
|
625
|
+
// this.$els.bottom.style.width = this.$els.box.clientWidth - 8 + "%"
|
626
|
+
// }
|
627
|
+
},
|
628
|
+
changeMain(userid) {
|
629
|
+
this.$goto('res-main', {userid: this.userid}, 'self')
|
630
|
+
},
|
631
|
+
tabChange(name) {
|
632
|
+
console.log(name, 'tabchanage')
|
633
|
+
this.selecttab = name
|
634
|
+
this.$refs.tree.changeSelect(name)
|
635
|
+
},
|
636
|
+
tabcg(val) {
|
637
|
+
console.log(val)
|
638
|
+
this.tabs = val
|
639
|
+
},
|
640
|
+
logOut() {
|
641
|
+
console.log(this.$login.f)
|
642
|
+
this.$showMessage('您确定要退出系统吗?', ['confirm', 'cancel']).then(async (res) => {
|
643
|
+
if (res == 'confirm') {
|
644
|
+
let data = {
|
645
|
+
userid: this.$login.f.id,
|
646
|
+
username: this.$login.f.name,
|
647
|
+
usertelephone: this.$login.f.f_user_telephone
|
648
|
+
}
|
649
|
+
// todo v4
|
650
|
+
try {
|
651
|
+
await this.$resetget('api/af-system/user/logout', {resolveMsg: '退出成功', rejectMsg: null})
|
652
|
+
}catch(e){
|
653
|
+
}
|
654
|
+
if (window.parent && window.parent !== window) {
|
655
|
+
window.parent.postMessage('reload', '*')
|
656
|
+
} else {
|
657
|
+
window.location.reload()
|
658
|
+
}
|
659
|
+
}
|
660
|
+
})
|
661
|
+
}
|
662
|
+
},
|
663
|
+
computed: {
|
664
|
+
orgpathnames(){
|
665
|
+
let names = this.$login.f.name
|
666
|
+
if(this.$login.f.deps){
|
667
|
+
names = `${this.$login.f.deps}-${names}`
|
668
|
+
}
|
669
|
+
if(this.$login.f.orgs){
|
670
|
+
names = `${this.$login.f.orgs}-${names}`
|
671
|
+
}
|
672
|
+
return names
|
673
|
+
},
|
674
|
+
|
675
|
+
nowDate() {
|
676
|
+
return this.$login.getNowDate()
|
677
|
+
}
|
678
|
+
}
|
679
|
+
}
|
680
|
+
</script>
|
681
|
+
<style lang="less">
|
682
|
+
.newTip-transition {
|
683
|
+
transition: all .4s ease;
|
684
|
+
}
|
685
|
+
.newTip-enter, .newTip-leave {
|
686
|
+
height: 0;
|
687
|
+
padding: 0 10px;
|
688
|
+
opacity: 0;
|
689
|
+
}
|
690
|
+
.newTip a {
|
691
|
+
color: #333;
|
692
|
+
}
|
693
|
+
.newTip {
|
694
|
+
cursor: pointer;
|
695
|
+
text-align: center;
|
696
|
+
position: absolute;
|
697
|
+
top: 3em;
|
698
|
+
margin: 0 auto;
|
699
|
+
width: 200px;
|
700
|
+
left: 48%;
|
701
|
+
line-height: 2;
|
702
|
+
z-index: 10010;
|
703
|
+
box-shadow: 0 4px 12px rgba(0,0,0,0.38);
|
704
|
+
pointer-events: all;
|
705
|
+
border-radius: 4px;
|
706
|
+
background-color: whitesmoke;
|
707
|
+
}
|
708
|
+
/* 组件内通用样式 */
|
709
|
+
.select-error {
|
710
|
+
button {
|
711
|
+
border-bottom: 1px solid #a94442 !important;
|
712
|
+
}
|
713
|
+
}
|
714
|
+
|
715
|
+
// input::-webkit-outer-spin-button,input::-webkit-inner-spin-button{
|
716
|
+
// -webkit-appearance:textfield;
|
717
|
+
// }
|
718
|
+
/* 表单输入框组 */
|
719
|
+
.form-input-group {
|
720
|
+
display: flex;
|
721
|
+
|
722
|
+
label {
|
723
|
+
width: 100px;
|
724
|
+
text-align: right;
|
725
|
+
|
726
|
+
+ * {
|
727
|
+
flex: 1;
|
728
|
+
}
|
729
|
+
}
|
730
|
+
}
|
731
|
+
|
732
|
+
// 日期组件在表单中沾满
|
733
|
+
.form-horizontal .datepicker {
|
734
|
+
width: 100%;
|
735
|
+
}
|
736
|
+
|
737
|
+
// 下拉选择框占据剩余全部空间
|
738
|
+
.select-overspread {
|
739
|
+
.form-group {
|
740
|
+
// margin: 0px 5px 10px 0px;
|
741
|
+
.form-control {
|
742
|
+
margin-right: 0px;
|
743
|
+
}
|
744
|
+
}
|
745
|
+
|
746
|
+
.btn-group, .btn-group-vertical {
|
747
|
+
width: 100%;
|
748
|
+
// padding-right: 5px;
|
749
|
+
button {
|
750
|
+
width: 100%;
|
751
|
+
display: flex;
|
752
|
+
justify-content: space-between;
|
753
|
+
align-items: center;
|
754
|
+
}
|
755
|
+
}
|
756
|
+
|
757
|
+
.dropdown-menu {
|
758
|
+
width: 100%
|
759
|
+
}
|
760
|
+
}
|
761
|
+
|
762
|
+
// 需要特定宽度的的样式
|
763
|
+
.width-60 {
|
764
|
+
width: 60px;
|
765
|
+
}
|
766
|
+
|
767
|
+
.userpanel {
|
768
|
+
font-weight: 300;
|
769
|
+
color: #333;
|
770
|
+
position: fixed;
|
771
|
+
right: 30px;
|
772
|
+
top: 45px;
|
773
|
+
background-color: white;
|
774
|
+
box-shadow: darkgrey 0.5px 0.5px 0.5px 0.5px;
|
775
|
+
padding: 4px 10px 4px 10px;
|
776
|
+
border-radius: 2px;
|
777
|
+
}
|
778
|
+
|
779
|
+
.width-80 {
|
780
|
+
width: 80px;
|
781
|
+
}
|
782
|
+
|
783
|
+
.width-100 {
|
784
|
+
width: 100px;
|
785
|
+
}
|
786
|
+
|
787
|
+
|
788
|
+
/*右侧区域的背景*/
|
789
|
+
.right-bg {
|
790
|
+
width: 100%;
|
791
|
+
flex: 1;
|
792
|
+
color: #304A66;
|
793
|
+
}
|
794
|
+
|
795
|
+
.tree-flex {
|
796
|
+
height: 100%;
|
797
|
+
// width: 150px;
|
798
|
+
/*width: 60px;*/
|
799
|
+
background: #4a7cae;
|
800
|
+
color: #fff;
|
801
|
+
|
802
|
+
}
|
803
|
+
|
804
|
+
.tree-flex-icon {
|
805
|
+
width: 50px;
|
806
|
+
/*transition: 0.5s;*/
|
807
|
+
|
808
|
+
> .span {
|
809
|
+
overflow-x: visible;
|
810
|
+
}
|
811
|
+
}
|
812
|
+
|
813
|
+
.tree-flex h3 {
|
814
|
+
text-align: center;
|
815
|
+
margin: 1em 0;
|
816
|
+
}
|
817
|
+
|
818
|
+
.tree-flex-footer {
|
819
|
+
height: 50px;
|
820
|
+
display: flex;
|
821
|
+
flex-direction: column;
|
822
|
+
color: #fff;
|
823
|
+
}
|
824
|
+
|
825
|
+
.tree-flex-footer a, .tree-flex-footer button {
|
826
|
+
flex: 1;
|
827
|
+
padding: 8px 5px;
|
828
|
+
font-size: 1.2em;
|
829
|
+
// border-top: 1px solid #697D93;
|
830
|
+
border-top: 1px solid #4a7cae;
|
831
|
+
text-decoration: none;
|
832
|
+
color: #fff;
|
833
|
+
cursor: pointer;
|
834
|
+
}
|
835
|
+
|
836
|
+
.tree-flex-footer button {
|
837
|
+
height: auto;
|
838
|
+
width: 100%;
|
839
|
+
border-radius: 0px;
|
840
|
+
background-color: rgba(255, 255, 255, 0);
|
841
|
+
border: none;
|
842
|
+
border-top: 1px solid #4a7cae;
|
843
|
+
// border-top: 1px solid #697D93;
|
844
|
+
text-align: left;
|
845
|
+
}
|
846
|
+
|
847
|
+
.tree-flex-footer button:hover {
|
848
|
+
outline: none;
|
849
|
+
background-color: rgba(255, 255, 255, 0.2);
|
850
|
+
}
|
851
|
+
|
852
|
+
.tree-flex-footer button:focus {
|
853
|
+
outline: none;
|
854
|
+
background-color: rgba(255, 255, 255, 0.5);
|
855
|
+
}
|
856
|
+
|
857
|
+
.tree-flex-footer a:hover {
|
858
|
+
color: #FFF;
|
859
|
+
background-color: rgba(255, 255, 255, 0.2);
|
860
|
+
}
|
861
|
+
|
862
|
+
.tree-flex .btn-group {
|
863
|
+
height: 50px !important;
|
864
|
+
}
|
865
|
+
|
866
|
+
.tree-flex .dropdown-menu {
|
867
|
+
/* 控制显示列表的样式 */
|
868
|
+
background: #4a7cae;
|
869
|
+
border-radius: 0px;
|
870
|
+
color: #fff;
|
871
|
+
width: auto;
|
872
|
+
margin: 0px;
|
873
|
+
padding: 0px;
|
874
|
+
}
|
875
|
+
|
876
|
+
.tree-flex .dropdown-menu-up {
|
877
|
+
/* bottom,top控制上下,left和right控制左右*/
|
878
|
+
left: 100% !important;
|
879
|
+
top: auto !important;
|
880
|
+
bottom: 0;
|
881
|
+
}
|
882
|
+
|
883
|
+
.tree-flex .dropdown-menu-down {
|
884
|
+
/* bottom,top控制上下,left和right控制左右*/
|
885
|
+
left: 100% !important;
|
886
|
+
top: 0 !important;
|
887
|
+
}
|
888
|
+
|
889
|
+
.tree-flex .dropdown-menu li {
|
890
|
+
text-align: center;
|
891
|
+
line-height: 50px;
|
892
|
+
border-bottom: 1px solid #697D93;
|
893
|
+
font-size: 1.2em;
|
894
|
+
width: auto;
|
895
|
+
white-space: nowrap;
|
896
|
+
cursor: default;
|
897
|
+
|
898
|
+
}
|
899
|
+
|
900
|
+
.tree-flex .dropdown-menu li + li {
|
901
|
+
text-align: left;
|
902
|
+
border: 0;
|
903
|
+
line-height: 40px;
|
904
|
+
padding-left: 15px;
|
905
|
+
padding-right: 15px;
|
906
|
+
font-size: 1em;
|
907
|
+
cursor: pointer;
|
908
|
+
}
|
909
|
+
|
910
|
+
.tree-flex .dropdown-menu li + li:hover {
|
911
|
+
background-color: rgba(255, 255, 255, 0.2);
|
912
|
+
}
|
913
|
+
|
914
|
+
.tree-flex .dropdown-menu li a {
|
915
|
+
border: none;
|
916
|
+
color: #fff;
|
917
|
+
height: 40px;
|
918
|
+
line-height: 40px;
|
919
|
+
font-size: 1em;
|
920
|
+
padding: 0px;
|
921
|
+
}
|
922
|
+
|
923
|
+
.tree-flex .dropdown-menu li a:hover {
|
924
|
+
color: #fff;
|
925
|
+
background-color: rgba(255, 255, 255, 0);
|
926
|
+
}
|
927
|
+
|
928
|
+
.tree-flex img {
|
929
|
+
height: 1.2em;
|
930
|
+
width: 1.2em;
|
931
|
+
margin-right: 15px;
|
932
|
+
margin-left: 5px;
|
933
|
+
}
|
934
|
+
|
935
|
+
.line {
|
936
|
+
height: 100%;
|
937
|
+
width: 5px;
|
938
|
+
background: #4C637B;
|
939
|
+
cursor: e-resize;
|
940
|
+
}
|
941
|
+
|
942
|
+
/*为树(tree)组件写的样式*/
|
943
|
+
.tree-img {
|
944
|
+
font-size: 1.2em;
|
945
|
+
}
|
946
|
+
|
947
|
+
/*将较长信息截断显示,鼠标悬停显示全部信息*/
|
948
|
+
.cutout50 {
|
949
|
+
max-width: 50px;
|
950
|
+
overflow: hidden;
|
951
|
+
text-overflow: ellipsis;
|
952
|
+
white-space: nowrap;
|
953
|
+
}
|
954
|
+
|
955
|
+
/* 滚动条样式 */
|
956
|
+
/*---滚动条默认显示样式--*/
|
957
|
+
::-webkit-scrollbar-thumb {
|
958
|
+
// display: none;
|
959
|
+
background-color: rgba(0, 0, 0, 0.4);
|
960
|
+
/*background-color:red;*/
|
961
|
+
height: 50px;
|
962
|
+
outline-offset: -2px;
|
963
|
+
/*outline:2px solid #fff;*/
|
964
|
+
-webkit-border-radius: 4px;
|
965
|
+
/*border: 2px solid #fff;*/
|
966
|
+
}
|
967
|
+
|
968
|
+
/*---鼠标点击滚动条显示样式--*/
|
969
|
+
::-webkit-scrollbar-thumb:hover {
|
970
|
+
// display: inherit;
|
971
|
+
background-color: rgba(0, 0, 0, 0.4);
|
972
|
+
height: 50px;
|
973
|
+
-webkit-border-radius: 4px;
|
974
|
+
}
|
975
|
+
|
976
|
+
/*---滚动条大小--*/
|
977
|
+
::-webkit-scrollbar {
|
978
|
+
width: 8px;
|
979
|
+
height: 8px;
|
980
|
+
}
|
981
|
+
|
982
|
+
/*---滚动框背景样式--*/
|
983
|
+
::-webkit-scrollbar-track-piece {
|
984
|
+
/* 全透明,不显示 */
|
985
|
+
background-color: rgba(255, 255, 255, 0);
|
986
|
+
-webkit-border-radius: 0;
|
987
|
+
}
|
988
|
+
</style>
|