system-clients 4.0.10 → 4.0.12

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.
@@ -0,0 +1,1202 @@
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
+ <!-- <div class="span" style="margin-bottom:10px;padding-bottom:5px;padding-top:5px;flex: 1;border-top: 1px solid #e5e5e5;border-bottom: 1px solid #e5e5e5;">-->
19
+ <left-tree :functions='functions.functions' :userid='userid' @isnodo="isnodo" v-show="treeOrIcon"
20
+ :tabs="tabs" v-ref:tree></left-tree>
21
+ <!--&lt;!&ndash; <icon-tree :functions='functions.functions' :userid='userid' v-show="!treeOrIcon"></icon-tree>&ndash;&gt;-->
22
+ </div>
23
+
24
+ <div class="tree-flex-footer">
25
+ <!-- <a @click="changeShow()"><img :src="imgs.open" alt=""><span v-if="treeOrIcon">菜单伸缩</span></a>-->
26
+ <!-- <a><img src="../../../static/treeset.png" alt="">系统设置</a> -->
27
+ <dropdown class="auto">
28
+ <button type="button" data-toggle="dropdown">
29
+ <img :src="imgs.set" alt=""><span v-if="treeOrIcon">系统设置</span>
30
+ </button>
31
+ <ul slot="dropdown-menu" class="dropdown-menu dropdown-menu-up">
32
+ <li>系统信息及设置</li>
33
+ <!-- <li>{{name}}</li> -->
34
+ <li>{{ date }}</li>
35
+ <li @click="openUrl()">售后服务</li>
36
+ <li @click="qrCode=true">APP二维码</li>
37
+ <li @click="show=true">修改密码</li>
38
+ <li @click="AddChangeMsgShow=true">系统版本:V3.0</li>
39
+ </ul>
40
+
41
+ </dropdown>
42
+ <a href="index.html" @click.prevent="logOut">
43
+ <img :src="imgs.out" alt=""><span v-if="treeOrIcon">退出系统</span>
44
+ </a>
45
+ </div>
46
+ </div>
47
+ </div>
48
+ <!-- <div class="line" id="line" v-show="treeOrIcon" v-el:line></div> -->
49
+
50
+ <div class="flex right-bg system-right" id="bottom" v-el:bottom>
51
+ <!-- <operator-badge></operator-badge> -->
52
+ <div class="span">
53
+ <echarts-box v-if="$refs.mic.tabs.length === 0"></echarts-box>
54
+ <dynamic :comps='[]' name='main' :selecttab.sync="selecttab" :orgpathnames="orgpathnames"
55
+ @tab-changed="tabChange" @tabscg="tabcg" v-ref:mic v-show="!($refs.mic.tabs.length === 0)"></dynamic>
56
+ </div>
57
+ </div>
58
+ </div>
59
+ <div v-show="isManger">
60
+ <route v-ref:route></route>
61
+ </div>
62
+ <modal v-if="newTipContextShow" :show.sync="newTipContextShow" :backdrop="false">
63
+ <header slot="modal-header" style="display:none"></header>
64
+ <article slot="modal-body" class="modal-body">
65
+ <form class="form-horizontal">
66
+ <div class="row">
67
+ <div class="col-sm-12 " v-if="AppDaiBan !==''">
68
+ <label class="col-sm-2">报装待办:</label>
69
+ <span style="font-weight:normal">{{ AppDaiBan }}</span>
70
+ </div>
71
+ <div class="col-sm-12 " v-if="OrderDaiBan !==''">
72
+ <label class="col-sm-2">预约待办:</label>
73
+ <span style="font-weight:normal">{{ OrderDaiBan }}</span>
74
+ </div>
75
+ <div class="col-sm-12 " v-if="flowDaiBan !==''">
76
+ <label class="col-sm-2">流程审核待办:</label>
77
+ <span style="font-weight:normal">{{ flowDaiBan }}</span>
78
+ </div>
79
+ </div>
80
+ </form>
81
+ </article>
82
+ <footer slot="modal-footer" style="height: 8vh" class="modal-footer">
83
+ <button class="button_search" @click="newTipContextShow = false">确认</button>
84
+ </footer>
85
+ </modal>
86
+
87
+ <modal v-show="showRemind" :show.sync="showRemind" :backdrop="false">
88
+ <header slot="modal-header" class="text-center"><h3>卡表动态库到期</h3></header>
89
+ <article slot="modal-body" class="modal-body">
90
+ <form class="form-horizontal">
91
+ <div class="row">
92
+ <div class="col-sm-3 " v-for="item in dataRemind">
93
+ <label class="col-sm-3">{{ item.type }}:</label>
94
+ <span style="font-weight:normal">{{ item.brand }}</span>
95
+ </div>
96
+ <div class="col-sm-12 text-right">
97
+ <span style="font-weight:normal">卡表动态库到期,请联系售后尽快注册!</span>
98
+ </div>
99
+ </div>
100
+ </form>
101
+ </article>
102
+ <footer slot="modal-footer" style="height: 8vh" class="modal-footer">
103
+ <button class="button_search" @click="showRemind = false">确认</button>
104
+ </footer>
105
+ </modal>
106
+
107
+ <!-- 变更录入 模态框 -->
108
+ <add-changemsg :show="AddChangeMsgShow" v-on:toggle="AddChangeMsgShow = false"></add-changemsg>
109
+ <!-- 修改密码组件 -->
110
+ <modify-pw :show.sync="show" v-if="show"></modify-pw>
111
+ <!-- 手机扫描二维码 -->
112
+ <modal :show.sync="qrCode" v-if="qrCode" v-ref:qrmodal backdrop="false">
113
+ <header slot="modal-header" class="modal-header">
114
+ 请打开手机扫一扫功能进行扫描下载App
115
+ </header>
116
+ <article slot="modal-body" class="modal-body">
117
+ <img style="width: 300px;height: 300px;display: block;margin: auto" src="/images/DownLoadQRCode.png"/>
118
+ </article>
119
+ <footer slot="modal-footer" class="modal-footer">
120
+ <button type="button" class="btn btn-success" @click='qrCode=false'>关闭</button>
121
+ </footer>
122
+ </modal>
123
+
124
+ <!-- 退出系统时选择移交人模态框 -->
125
+ <modal v-if="transferShow" :show.sync="transferShow" backdrop="false">
126
+ <header slot="modal-header" class="modal-header">
127
+ <h4 class="modal-title">退出系统</h4>
128
+ </header>
129
+ <article slot="modal-body" class="modal-body">
130
+ <div class="row">
131
+ <div class="col-sm-12">
132
+ <label class="col-sm-4 font_normal_body">是否移交票据:</label>
133
+ <div class="col-sm-8">
134
+ <label style="padding-top: 7px">
135
+ <input type="radio" name="transferType" v-model="transferType" value="transfer"> 选择移交人后退出
136
+ </label>
137
+ <label style="margin-left: 20px;">
138
+ <input type="radio" name="transferType" v-model="transferType" value="direct"> 直接退出系统
139
+ </label>
140
+ </div>
141
+ </div>
142
+ <div class="col-sm-12 form-group" v-if="transferType === 'transfer'" style="margin-top: 15px;">
143
+ <label class="col-sm-4 font_normal_body">选择移交人:</label>
144
+ <div class="col-sm-8">
145
+ <v-select :options="filterBillUsers" v-model="selectedTransferUser" :value.sync="selectedTransferUser" placeholder="请选择移交人"></v-select>
146
+ <span v-if="filterBillUsers.length === 0" style="color:#a94442;font-size:12px;margin-top:5px;display:block;">
147
+ 没有可用的移交人,所有人员已分配票据或不具备票据使用权限
148
+ </span>
149
+ </div>
150
+ </div>
151
+ </div>
152
+ </article>
153
+ <footer slot="modal-footer" class="modal-footer">
154
+ <button type="button" class="button_search button_spacing" @click="confirmTransfer">确定</button>
155
+ <button type="button" class="button_clear button_spacing" @click="transferShow = false">取消</button>
156
+ </footer>
157
+ </modal>
158
+ </div>
159
+ </template>
160
+
161
+ <script>
162
+ import vue from 'vue'
163
+ import co from 'co'
164
+ import {HttpResetClass} from "vue-client";
165
+
166
+ let getwartermakr = async function (self) {
167
+ let param = {
168
+ tablename: 't_singlevalue',
169
+ condition: " 1=1 and name=\'水印内容\'"
170
+ };
171
+ // todo v4
172
+ let result = await self.$resetpost('api/af-revenue/sql/saleSingleTable', {data: param}, {
173
+ resolveMsg: null,
174
+ rejectMsg: null
175
+ });
176
+ if (result && result.data.length > 0) {
177
+ self.showwatermakeflag = true;
178
+ createWaterMark(`${result.data[0].value}${self.$login.f.ename}`);
179
+ } else {
180
+ self.showwatermakeflag = false;
181
+ }
182
+ }
183
+
184
+ let createWaterMark = function (userName) {
185
+ let style;
186
+ if (style) style.remove();
187
+ let width = window.parseInt(document.body.clientWidth);
188
+ let canvasWidth = width / window.parseInt(width / 320);
189
+ let fontFamily = window.getComputedStyle(document.body)["font-family"];
190
+ let canvas = document.createElement("canvas");
191
+ canvas.width = canvasWidth;
192
+ canvas.height = 200;
193
+ let ctx = canvas.getContext("2d");
194
+ ctx.rotate((-20 * Math.PI) / 180);
195
+ ctx.font = `20px ${fontFamily}`;
196
+ ctx.fillStyle = "rgba(8,8,8,.1)";
197
+ ctx.fillText(userName, 50, 200);
198
+ let imgSrc = canvas.toDataURL("image/png");
199
+ style = document.createElement("style");
200
+ style.innerHTML = `.with-watermark:before{
201
+ pointer-events: none;
202
+ content: "";
203
+ width: 100%;
204
+ height: 100%;
205
+ display: block;
206
+ position: absolute;
207
+ background-image: url("${imgSrc}");
208
+ }`;
209
+ (document.head.append || document.head.appendChild).apply(document.head, [style]);
210
+ }
211
+
212
+ export default {
213
+ title: '主界面',
214
+ props: ['functions', 'userid', 'config'],
215
+ data() {
216
+ return {
217
+ // 页面提示信息定时器
218
+ interval: null,
219
+ intervaltx: null,
220
+ newTipShow: false,
221
+ newTipContextShow: false,
222
+ AppDaiBan: '',
223
+ OrderDaiBan: '',
224
+ flowDaiBan: '',
225
+ // 左侧树下部三个小图标
226
+ imgs: {
227
+ open: '/images/lefticon/菜单伸缩.png',
228
+ set: '/images/lefticon/系统设置.png',
229
+ out: '/images/lefticon/退出系统.png',
230
+ img1: '/images/newStyle/login-user.png',
231
+ logoimg: '/static/newStyle/fife.png'
232
+ // img2: '/images/lefticon/退出系统.png',
233
+ },
234
+ treeOrIcon: false,
235
+ qrCode: false,
236
+ isManger: false,
237
+ show: false,
238
+ systemname: '客服系统',
239
+ date: this.$login.toStandardDateString(),
240
+ tabs: [], //已初始化页签数组
241
+ selecttab: '',
242
+ setting: true,
243
+ srcsetting: '../../static/newStyle/setting.png',
244
+ showwatermakeflag: false,
245
+ gasbrandIdData: [],
246
+ showRemind: false,
247
+ dataRemind: [],
248
+ // 退出系统相关
249
+ transferShow: false,
250
+ transferType: 'direct',
251
+ selectedTransferUser: [],
252
+ filterBillUsers: [], // 过滤后的可选票据使用人
253
+ // headerHint: true, // 右侧顶部提示信息
254
+ // value: 25645.26,
255
+ // AddChangeMsgShow: false,
256
+ // showsum: false
257
+ }
258
+ },
259
+ ready() {
260
+ getwartermakr(this);
261
+ let component = this.$login.getUrlCompileParames('component')
262
+ if (component) {
263
+ this.isManger = true
264
+ this.$refs.route.init(component, {data: this.functions.functions})
265
+ }
266
+ if (this.$login.f.password == '1') {
267
+ this.$showMessage('本地登录系统为此账户的初始密码,请确认修改密码!!!', ['confirm', 'cancel']).then((res) => {
268
+ if (res == 'confirm')
269
+ this.show = true
270
+ })
271
+ }
272
+ console.log("系统名称", this.$appdata.getSingleValue("系统名称"))
273
+ this.systemname = this.$appdata.getSingleValue("系统名称") ? this.$appdata.getSingleValue("系统名称") : '客服系统'
274
+ // let oBox = this.getElement("box")
275
+ // let oTop = this.getElement("top")
276
+ // let oBottom = this.getElement("bottom")
277
+ // let oLine = this.getElement("line")
278
+ // let that = this
279
+ // oLine.onmousedown = function(e) {
280
+ // let disX = (e || event).clientX
281
+ // oLine.left = oLine.offsetLeft
282
+ // document.onmousemove = function(e) {
283
+ // let iT = oLine.left + ((e || event).clientX - disX)
284
+ // var e = e || window.event
285
+ // let tarnameb = e.target || e.srcElement
286
+ // let maxT = oBox.clientWight - oLine.offsetWidth
287
+ // oLine.style.margin = 0
288
+ // iT < 0 && (iT = 0)
289
+ // iT > maxT && (iT = maxT)
290
+ // oLine.style.left = oTop.style.width = iT + "px"
291
+ // oBottom.style.width = oBox.clientWidth - iT + "px"
292
+ // that.$set('treeWidth', iT)
293
+ // return false
294
+ // }
295
+ // document.onmouseup = function() {
296
+ // document.onmousemove = null
297
+ // document.onmouseup = null
298
+ // oLine.releaseCapture && oLine.releaseCapture()
299
+ // }
300
+ // oLine.setCapture && oLine.setCapture()
301
+ // return false
302
+ // }
303
+ this.changeShow()
304
+ const istelRemindTimes = this.$appdata.getSingleValue("是否开启工单提醒定时器")
305
+ if (istelRemindTimes == '是') {
306
+ this.getTimesgotoWorkOrderSite()
307
+ }
308
+ const isapplyRemind = this.$appdata.getSingleValue("是否开启提醒")
309
+ const times = this.$appdata.getSingleValue("提示间隔分钟")
310
+ if (isapplyRemind == '是') {
311
+ this.config.isTip = true
312
+ this.config.times = times
313
+ }
314
+ // 获取预约列表
315
+ this.functions.f_role_name && this.functions.f_role_name.includes(this.config.msgRole) && this.config.isTip && this.getOrderList()
316
+ if (this.config.approve) {
317
+ this.getFlowList()
318
+ }
319
+ // 获取卡表动态库到期时间
320
+ this.getExpireDate()
321
+ },
322
+ methods: {
323
+ getOrderList() {
324
+ let times = this.config.times * 60 * 1000
325
+ console.log("=定时提示间隔=", times)
326
+ try {
327
+ this.interval = setInterval(() => {
328
+ this.getDaiBan()
329
+ }, times)
330
+ } catch (error) {
331
+ console.log('捕获到异常', error)
332
+ }
333
+ },
334
+ getFlowList() {
335
+ console.log('======获取流程审核待办=====')
336
+ let times = this.config.approveTimes * 60 * 1000
337
+ console.log("=定时提示间隔=", times)
338
+ try {
339
+ this.interval = setInterval(() => {
340
+ this.getFlowDaiBan()
341
+ }, times)
342
+ } catch (error) {
343
+ console.log('捕获到异常', error)
344
+ }
345
+ },
346
+ async getFlowDaiBan() {
347
+ this.flowDaiBan = ''
348
+ let http = new HttpResetClass()
349
+ let data = {
350
+ condition: `f_handler = '${this.$login.f.name}'`
351
+ }
352
+ await http.load('POST', 'rs/sql/future_getMyWorkFlowList', {data: data}, {
353
+ resolveMsg: null,
354
+ rejectMsg: null
355
+ }).then((res) => {
356
+ if (res.data.length > 0) {
357
+ this.flowDaiBan = `您有${res.data.length}条需要处理的审核流程业务!`
358
+ }
359
+ }).catch((e) => {
360
+ console.log('报错了!!')
361
+ console.error(e)
362
+ })
363
+ if (this.flowDaiBan) {
364
+ this.newTipShow = true
365
+ }
366
+ },
367
+ getTimesgotoWorkOrderSite() {
368
+ let teltimes = 2 * 60 * 1000 // 两分钟
369
+ try {
370
+ this.intervaltx = setInterval(() => {
371
+ this.gotoWorkOrderSite()
372
+ }, teltimes)
373
+ } catch (e) {
374
+ console.log('捕获到异常', e)
375
+ }
376
+ },
377
+ async getDaiBan() {
378
+ this.OrderDaiBan = ''
379
+ this.AppDaiBan = ''
380
+ let http = new HttpResetClass()
381
+ await http.load('POST', '/api/af-system/sql/singleTable', {
382
+ data: {
383
+ tablename: 't_order_center',
384
+ condition: ` (f_orderstate != '预约成功' and f_orgstr ='${this.$login.f.orgid}' and f_orderstate != '预约失败' ) or f_orderstate is null`
385
+ }
386
+ }, {
387
+ resolveMsg: null,
388
+ rejectMsg: null
389
+ }).then((res) => {
390
+ let OrderDaiBan = {}
391
+ res.data.forEach(item => {
392
+ OrderDaiBan[item.f_ordertype] = OrderDaiBan[item.f_ordertype] || []
393
+ OrderDaiBan[item.f_ordertype].push(item)
394
+ })
395
+ if (res.data.length > 0) {
396
+ this.OrderDaiBan = `您有${res.data.length}条需要处理的微信预约业务!`
397
+ this.OrderDaiBan += `其中 ${Object.keys(OrderDaiBan).map(key => `${key}:${OrderDaiBan[key].length}条`).join(', ')}`
398
+ }
399
+ })
400
+ let data = {
401
+ condition: '1 = 1',
402
+ data: {
403
+ orgid: this.$login.f.orgid,
404
+ id: this.$login.f.id
405
+ }
406
+ }
407
+ await http.load('POST', '/rs/sql/checkuser', {data: data}, {
408
+ resolveMsg: null,
409
+ rejectMsg: null
410
+ }).then((res) => {
411
+ let AppDaiBan = {}
412
+ res.data.forEach(item => {
413
+ AppDaiBan[item.defname] = AppDaiBan[item.defname] || []
414
+ AppDaiBan[item.defname].push(item)
415
+ })
416
+ if (res.data.length > 0) {
417
+ this.AppDaiBan = `您有${res.data.length}条需要处理的报建待办业务!`
418
+ this.AppDaiBan += `其中 ${Object.keys(AppDaiBan).map(key => `${key}:${AppDaiBan[key].length}条`).join(', ')}`
419
+ }
420
+ }).catch((e) => {
421
+ console.error(e)
422
+ })
423
+ if (this.AppDaiBan || this.OrderDaiBan) {
424
+ this.newTipShow = true
425
+ }
426
+ },
427
+ // 获取动态库卡表到期日
428
+ async getExpireDate() {
429
+ // 获取分公司的表品牌id
430
+ let http = new HttpResetClass()
431
+ await http.load('POST', '/api/af-system/sql/singleTable', {
432
+ data: {
433
+ tablename: 't_gasbrand_orgid',
434
+ condition: `f_using_orgid ='${this.$login.f.orgid}'`
435
+ }
436
+ }, {
437
+ resolveMsg: null,
438
+ rejectMsg: null
439
+ }).then((res) => {
440
+ if (res.data.length > 0) {
441
+ res.data.forEach(item => {
442
+ this.gasbrandIdData.push(item.f_gasbrand_id)
443
+ })
444
+ }
445
+ if (this.gasbrandIdData.length > 0) {
446
+ // 获取卡表到期时间
447
+ http.load('POST', '/api/af-system/sql/singleTable', {
448
+ data: {
449
+ tablename: 't_gasbrand',
450
+ condition: `id in (${this.gasbrandIdData}) and f_meter_type like '%卡表%'`
451
+ }
452
+ }, {
453
+ resolveMsg: null,
454
+ rejectMsg: null
455
+ }).then((res) => {
456
+ if (res.data.length > 0) {
457
+ res.data.forEach(itre => {
458
+ let band = null
459
+ if ('f_dynamic_expire' in itre) {
460
+ if (itre.f_dynamic_expire !== null && itre.f_dynamic_expire !== '') {
461
+ let todayold = new Date(itre.f_dynamic_expire)
462
+ todayold.setDate(todayold.getDate() - parseInt(this.$appdata.getSingleValue('动态库提醒天数设置')))
463
+ let today = new Date()
464
+ if (today > todayold) {
465
+ band = {type: '卡表', brand: itre.f_meter_brand}
466
+ this.dataRemind.push(band)
467
+ }
468
+ }
469
+ }
470
+ })
471
+
472
+ }
473
+ if (this.dataRemind.length > 0) {
474
+ this.showRemind = true
475
+ // this.$showMessage(band + '。' +
476
+ // '卡表动态库到期,请联系售后尽快注册!')
477
+ }
478
+ })
479
+ }
480
+ })
481
+ },
482
+ // 获取当前已分配票据的票据使用人
483
+ async getBillUsers() {
484
+ try {
485
+ let http = new HttpResetClass()
486
+ const result = await http.load('POST', '/api/af-revenue/sql/getBillInfo', {data: {condition: `1=1 and f_bill_state != '停用'` }}, {
487
+ resolveMsg: null,
488
+ rejectMsg: null
489
+ })
490
+ // 记录已经分配票据的用户名
491
+ const assignedUsers = []
492
+ if (result && result.data && result.data.length > 0) {
493
+ // 遍历查询结果,获取所有已经有票据使用权限的用户
494
+ result.data.forEach(item => {
495
+ if (item.f_bill_user) {
496
+ if (!assignedUsers.includes(item.f_bill_user)) {
497
+ assignedUsers.push(item.f_bill_user)
498
+ }
499
+ }
500
+ })
501
+ }
502
+ // 将当前用户添加到已分配用户列表中,确保不会将票据移交给自己
503
+ if (!assignedUsers.includes(this.$login.f.name)) {
504
+ assignedUsers.push(this.$login.f.name)
505
+ }
506
+ console.log('已分配票据使用权限的用户:', assignedUsers)
507
+ // 从可选的票据使用人中过滤掉已经有权限的用户
508
+ this.filterBillUsers = this.billUsers.filter(user => {
509
+ // 如果用户名不在已分配列表中,则可以选择移交
510
+ return !assignedUsers.includes(user.label)
511
+ })
512
+
513
+ console.log('可移交的票据使用人:', this.filterBillUsers)
514
+
515
+ // 如果没有可用的移交人,默认选择直接退出
516
+ if (this.filterBillUsers.length === 0) {
517
+ this.transferType = 'direct'
518
+ }
519
+ } catch (error) {
520
+ console.error('获取票据使用人失败', error)
521
+ // 发生错误时,默认选择直接退出
522
+ this.transferType = 'direct'
523
+ }
524
+ },
525
+ // 提醒框被点击
526
+ tipClick() {
527
+ this.newTipShow = false
528
+ this.newTipContextShow = true
529
+ },
530
+ gotoWorkOrderSite() {
531
+ const isRemind = this.$appdata.getSingleValue("站点工单提醒")
532
+ console.log('站点工单是否提醒', isRemind)
533
+ if (isRemind && isRemind !== '是') {
534
+ return
535
+ }
536
+ if (this.functions && this.functions.f_role_name && this.functions.f_role_name.indexOf('派单员') !== -1) {
537
+ const data = {
538
+ "condition":
539
+ {
540
+ "condition": " 1=1 and processins.activities[ state='开始活动' and (defname in('站点接单'))].count(*) > 0 ",
541
+ "sign": "1=1"
542
+ },
543
+ "userid": this.functions.name
544
+ }
545
+ new HttpResetClass().load('POST', 'rs/path/operatorService/n', {data}, {
546
+ resolveMsg: null,
547
+ rejectMsg: null
548
+ }).then(res => {
549
+ if (res.data && res.data.n !== 0) {
550
+ this.$showMessage('你有' + res.data.n + '个工单待处理,请尽快前往站点工单页面进行处理')
551
+ }
552
+ })
553
+ }
554
+ },
555
+ openUrl() {
556
+ var url = `http://aote-office.8866.org:8406/submitTicket?contact=${this.$login.f.name}&orgName=${this.$login.f.orgs}&phone=${this.$login.f.f_user_telephone}`
557
+ window.open(url, '_blank')
558
+ },
559
+ hindsetting() {
560
+ this.setting = !this.setting
561
+ if (this.setting) {
562
+ this.srcsetting = '../../static/newStyle/setting.png'
563
+ } else {
564
+ this.srcsetting = '../../static/newStyle/setting1.png'
565
+ }
566
+
567
+ },
568
+ hindsetting1() {
569
+
570
+ if (!this.setting) {
571
+ this.srcsetting = '../../static/newStyle/setting.png'
572
+ this.setting = true
573
+ }
574
+
575
+ },
576
+ isnodo(val) {
577
+ console.log(val, 'ss')
578
+ this.selecttab = val
579
+ },
580
+ unfurl() {
581
+ if (this.showsum) {
582
+ this.showsum = false
583
+ } else {
584
+ this.showsum = true
585
+ }
586
+ },
587
+ // getElement(id) {
588
+ // return document.getElementById(id)
589
+ // },
590
+ changeShow() {
591
+ // this.treeOrIcon = !this.treeOrIcon
592
+ // let oBox = this.getElement("box")
593
+ // let oTop = this.getElement("top")
594
+ // let oBottom = this.getElement("bottom")
595
+ // let oLine = this.getElement("line")
596
+ // if (this.treeOrIcon) {
597
+ // // oLine.style.left = oTop.style.width = 300 + "px"
598
+ // oTop.style.width = 150 + "px"
599
+ // oBottom.style.width = oBox.clientWidth - 150 + "px"
600
+ // }else {
601
+ // oLine.style.left = oTop.style.width = 50 + "px"
602
+ // oBottom.style.width = oBox.clientWidth - 50 + "px"
603
+ // }
604
+ // }
605
+ this.treeOrIcon = !this.treeOrIcon
606
+ // if (this.treeOrIcon) {
607
+ // this.$els.top.style.width = 14 + "%"
608
+ // this.$els.bottom.style.width = this.$els.box.clientWidth - 14 + "%"
609
+ // }else {
610
+ // this.$els.top.style.width = 8 + "%"
611
+ // this.$els.bottom.style.width = this.$els.box.clientWidth - 8 + "%"
612
+ // }
613
+ },
614
+ changeMain(userid) {
615
+ this.$goto('res-main', {userid: this.userid}, 'self')
616
+ },
617
+ tabChange(name) {
618
+ console.log(name, 'tabchanage')
619
+ this.selecttab = name
620
+ this.$refs.tree.changeSelect(name)
621
+ },
622
+ tabcg(val) {
623
+ console.log(val)
624
+ this.tabs = val
625
+ },
626
+ // 退出系统
627
+ async logOut() {
628
+ try {
629
+ // 先检查当前登录人是否在票据使用人列表中
630
+ const isBillUser = this.billUsers.some(user => user.label === this.$login.f.name)
631
+
632
+ if (!isBillUser) {
633
+ // 如果当前登录人不是票据使用人,显示确认提示框
634
+ this.$showMessage('您确定要退出系统吗?', ['confirm', 'cancel']).then(async (res) => {
635
+ if (res === 'confirm') {
636
+ await this.doLogout()
637
+ }
638
+ })
639
+ return
640
+ }
641
+
642
+ let http = new HttpResetClass()
643
+
644
+ // 检查当前用户是否有票据
645
+ const myBillsResult = await http.load('POST', '/api/af-revenue/sql/getBillInfo', {
646
+ data: {
647
+ condition: `f_bill_user='${this.$login.f.name}' and f_bill_state != '停用'`
648
+ }
649
+ }, {
650
+ resolveMsg: null,
651
+ rejectMsg: null
652
+ })
653
+
654
+ // 如果当前用户没有票据,显示确认提示框
655
+ if (!myBillsResult || !myBillsResult.data || myBillsResult.data.length === 0) {
656
+ this.$showMessage('您确定要退出系统吗?', ['confirm', 'cancel']).then(async (res) => {
657
+ if (res === 'confirm') {
658
+ await this.doLogout()
659
+ }
660
+ })
661
+ return
662
+ }
663
+
664
+ // 如果有票据,显示移交选择框
665
+ this.transferShow = true
666
+ this.getBillUsers()
667
+ } catch (error) {
668
+ console.error('检查票据失败', error)
669
+ // 发生错误时显示确认提示框
670
+ this.$showMessage('您确定要退出系统吗?', ['confirm', 'cancel']).then(async (res) => {
671
+ if (res === 'confirm') {
672
+ await this.doLogout()
673
+ }
674
+ })
675
+ }
676
+ },
677
+ // 确认退出系统
678
+ async confirmTransfer() {
679
+ console.log('this.selectedTransferUser', this.selectedTransferUser)
680
+ console.log('this.filterBillUsers', this.filterBillUsers)
681
+ // 如果选择移交且选择了移交人
682
+ if (this.transferType === 'transfer' && this.selectedTransferUser) {
683
+ try {
684
+ let http = new HttpResetClass()
685
+
686
+ // 获取当前用户的票据信息
687
+ const myBillsResult = await http.load('POST', '/api/af-revenue/sql/getBillInfo', {
688
+ data: {
689
+ condition: `f_bill_user='${this.$login.f.name}' and f_bill_state != '停用'`
690
+ }
691
+ }, {
692
+ resolveMsg: null,
693
+ rejectMsg: null
694
+ })
695
+ console.log('myBillsResult', myBillsResult)
696
+ console.log('myBillsResult', myBillsResult.data.length)
697
+ console.log('myBillsResult', myBillsResult.data)
698
+
699
+ if (myBillsResult && myBillsResult.data.length > 0) {
700
+ // 调用票据移交接口
701
+ await http.load('POST', '/api/af-revenue/logic/billTransfer', {
702
+ data: {
703
+ id: myBillsResult.data[0].id,
704
+ f_bill_user: this.selectedTransferUser[0],
705
+ f_operator: this.$login.f.name,
706
+ f_operatorid: this.$login.f.id,
707
+ f_depid: this.$login.f.depids,
708
+ f_depname: this.$login.f.deps,
709
+ f_orgid: this.$login.f.orgid,
710
+ f_orgname: this.$login.f.orgs
711
+ }
712
+ }, {
713
+ resolveMsg: null,
714
+ rejectMsg: null
715
+ })
716
+ // 移交完成后退出系统
717
+ this.$showMessage(`已成功将票据移交给${this.selectedTransferUser[0]}!您确定要直接退出系统吗?`, ['confirm', 'cancel']).then(async (res) => {
718
+ if (res === 'confirm') {
719
+ await this.doLogout()
720
+ }
721
+ })
722
+ } else {
723
+ this.$showMessage('您没有需要移交的票据!您确定要直接退出系统吗?', ['confirm', 'cancel']).then(async (res) => {
724
+ if (res === 'confirm') {
725
+ await this.doLogout()
726
+ }
727
+ })
728
+ }
729
+
730
+ } catch (error) {
731
+ console.error('移交票据失败', error)
732
+ this.$showMessage('移交票据失败,请重试')
733
+ }
734
+ } else {
735
+ // 确认是否直接退出
736
+ this.$showMessage('您确定要直接退出系统吗?', ['confirm', 'cancel']).then(async (res) => {
737
+ if (res === 'confirm') {
738
+ await this.doLogout()
739
+ }
740
+ })
741
+ }
742
+ },
743
+ // 执行退出操作
744
+ async doLogout() {
745
+ let data = {
746
+ userid: this.$login.f.id,
747
+ username: this.$login.f.name,
748
+ usertelephone: this.$login.f.f_user_telephone
749
+ }
750
+
751
+ try {
752
+ await this.$resetget('api/af-system/user/logout', {resolveMsg: '退出成功', rejectMsg: null})
753
+
754
+ if (window.parent && window.parent !== window) {
755
+ window.parent.postMessage('reload', '*')
756
+ } else {
757
+ window.location.reload()
758
+ }
759
+ } catch (e) {
760
+ console.error('退出系统失败', e)
761
+ if (window.parent && window.parent !== window) {
762
+ window.parent.postMessage('reload', '*')
763
+ } else {
764
+ window.location.reload()
765
+ }
766
+ }
767
+
768
+ this.transferShow = false
769
+ }
770
+ },
771
+ computed: {
772
+ orgpathnames() {
773
+ let names = this.$login.f.name
774
+ if (this.$login.f.deps) {
775
+ names = `${this.$login.f.deps}-${names}`
776
+ }
777
+ if (this.$login.f.orgs) {
778
+ names = `${this.$login.f.orgs}-${names}`
779
+ }
780
+ return names
781
+ },
782
+
783
+ nowDate() {
784
+ return this.$login.getNowDate()
785
+ },
786
+ billUsers () {
787
+ return this.$appdata.getParam('票据使用人')
788
+ }
789
+ }
790
+ }
791
+ </script>
792
+ <style lang="less">
793
+ .newTip-transition {
794
+ transition: all .4s ease;
795
+ }
796
+
797
+ .newTip-enter, .newTip-leave {
798
+ height: 0;
799
+ padding: 0 10px;
800
+ opacity: 0;
801
+ }
802
+
803
+ .newTip a {
804
+ color: #333;
805
+ }
806
+
807
+ .newTip {
808
+ cursor: pointer;
809
+ text-align: center;
810
+ position: absolute;
811
+ top: 3em;
812
+ margin: 0 auto;
813
+ width: 200px;
814
+ left: 48%;
815
+ line-height: 2;
816
+ z-index: 10010;
817
+ box-shadow: 0 4px 12px rgba(0, 0, 0, 0.38);
818
+ pointer-events: all;
819
+ border-radius: 4px;
820
+ background-color: whitesmoke;
821
+ }
822
+
823
+ /* 组件内通用样式 */
824
+ .select-error {
825
+ button {
826
+ border-bottom: 1px solid #a94442 !important;
827
+ }
828
+ }
829
+
830
+ // input::-webkit-outer-spin-button,input::-webkit-inner-spin-button{
831
+ // -webkit-appearance:textfield;
832
+ // }
833
+ /* 表单输入框组 */
834
+ .form-input-group {
835
+ display: flex;
836
+
837
+ label {
838
+ width: 100px;
839
+ text-align: right;
840
+
841
+ + * {
842
+ flex: 1;
843
+ }
844
+ }
845
+ }
846
+
847
+ // 日期组件在表单中沾满
848
+ .form-horizontal .datepicker {
849
+ width: 100%;
850
+ }
851
+
852
+ /* 退出系统移交人模态框样式 */
853
+ .transfer-modal-header {
854
+ background-color: #4a7cae;
855
+ color: #fff;
856
+ border-top-left-radius: 4px;
857
+ border-top-right-radius: 4px;
858
+ padding: 10px 15px;
859
+ border-bottom: 2px solid #3a618e;
860
+ }
861
+
862
+ .transfer-modal-body {
863
+ padding: 20px;
864
+ background-color: #f8f8f8;
865
+ }
866
+
867
+ .transfer-modal-content {
868
+ margin: 0;
869
+ padding: 10px;
870
+ background-color: #fff;
871
+ border-radius: 4px;
872
+ box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
873
+ }
874
+
875
+ .transfer-option {
876
+ margin-bottom: 15px;
877
+ padding: 10px;
878
+ border-bottom: 1px solid #eee;
879
+ }
880
+
881
+ .transfer-label {
882
+ font-weight: 600;
883
+ color: #333;
884
+ text-align: right;
885
+ line-height: 34px;
886
+ }
887
+
888
+ .transfer-radio-group {
889
+ padding-top: 5px;
890
+ }
891
+
892
+ .transfer-radio {
893
+ margin-right: 20px;
894
+ cursor: pointer;
895
+ display: inline-block;
896
+ }
897
+
898
+ .radio-text {
899
+ font-weight: normal;
900
+ margin-left: 5px;
901
+ }
902
+
903
+ .transfer-select {
904
+ padding: 10px;
905
+ animation: fadeIn 0.3s ease-in-out;
906
+ }
907
+
908
+ .transfer-user-select {
909
+ width: 100%;
910
+ }
911
+
912
+ .transfer-modal-footer {
913
+ background-color: #f8f8f8;
914
+ border-top: 1px solid #e5e5e5;
915
+ padding: 15px;
916
+ text-align: right;
917
+ border-bottom-left-radius: 4px;
918
+ border-bottom-right-radius: 4px;
919
+ }
920
+
921
+ @keyframes fadeIn {
922
+ from {
923
+ opacity: 0;
924
+ transform: translateY(-10px);
925
+ }
926
+ to {
927
+ opacity: 1;
928
+ transform: translateY(0);
929
+ }
930
+ }
931
+
932
+ /* 表单输入框组 */
933
+ .form-input-group {
934
+ display: flex;
935
+
936
+ label {
937
+ width: 100px;
938
+ text-align: right;
939
+
940
+ + * {
941
+ flex: 1;
942
+ }
943
+ }
944
+ }
945
+
946
+ // 日期组件在表单中沾满
947
+ .form-horizontal .datepicker {
948
+ width: 100%;
949
+ }
950
+
951
+ // 下拉选择框占据剩余全部空间
952
+ .select-overspread {
953
+ .form-group {
954
+ // margin: 0px 5px 10px 0px;
955
+ .form-control {
956
+ margin-right: 0px;
957
+ }
958
+ }
959
+
960
+ .btn-group, .btn-group-vertical {
961
+ width: 100%;
962
+ // padding-right: 5px;
963
+ button {
964
+ width: 100%;
965
+ display: flex;
966
+ justify-content: space-between;
967
+ align-items: center;
968
+ }
969
+ }
970
+
971
+ .dropdown-menu {
972
+ width: 100%
973
+ }
974
+ }
975
+
976
+ // 需要特定宽度的的样式
977
+ .width-60 {
978
+ width: 60px;
979
+ }
980
+
981
+ .userpanel {
982
+ font-weight: 300;
983
+ color: #333;
984
+ position: fixed;
985
+ right: 30px;
986
+ top: 45px;
987
+ background-color: white;
988
+ box-shadow: darkgrey 0.5px 0.5px 0.5px 0.5px;
989
+ padding: 4px 10px 4px 10px;
990
+ border-radius: 2px;
991
+ }
992
+
993
+ .width-80 {
994
+ width: 80px;
995
+ }
996
+
997
+ .width-100 {
998
+ width: 100px;
999
+ }
1000
+
1001
+
1002
+ /*右侧区域的背景*/
1003
+ .right-bg {
1004
+ width: 100%;
1005
+ flex: 1;
1006
+ color: #304A66;
1007
+ }
1008
+
1009
+ .tree-flex {
1010
+ height: 100%;
1011
+ // width: 150px;
1012
+ /*width: 60px;*/
1013
+ background: #4a7cae;
1014
+ color: #fff;
1015
+
1016
+ }
1017
+
1018
+ .tree-flex-icon {
1019
+ width: 50px;
1020
+ /*transition: 0.5s;*/
1021
+
1022
+ > .span {
1023
+ overflow-x: visible;
1024
+ }
1025
+ }
1026
+
1027
+ .tree-flex h3 {
1028
+ text-align: center;
1029
+ margin: 1em 0;
1030
+ }
1031
+
1032
+ .tree-flex-footer {
1033
+ height: 50px;
1034
+ display: flex;
1035
+ flex-direction: column;
1036
+ color: #fff;
1037
+ }
1038
+
1039
+ .tree-flex-footer a, .tree-flex-footer button {
1040
+ flex: 1;
1041
+ padding: 8px 5px;
1042
+ font-size: 1.2em;
1043
+ // border-top: 1px solid #697D93;
1044
+ border-top: 1px solid #4a7cae;
1045
+ text-decoration: none;
1046
+ color: #fff;
1047
+ cursor: pointer;
1048
+ }
1049
+
1050
+ .tree-flex-footer button {
1051
+ height: auto;
1052
+ width: 100%;
1053
+ border-radius: 0px;
1054
+ background-color: rgba(255, 255, 255, 0);
1055
+ border: none;
1056
+ border-top: 1px solid #4a7cae;
1057
+ // border-top: 1px solid #697D93;
1058
+ text-align: left;
1059
+ }
1060
+
1061
+ .tree-flex-footer button:hover {
1062
+ outline: none;
1063
+ background-color: rgba(255, 255, 255, 0.2);
1064
+ }
1065
+
1066
+ .tree-flex-footer button:focus {
1067
+ outline: none;
1068
+ background-color: rgba(255, 255, 255, 0.5);
1069
+ }
1070
+
1071
+ .tree-flex-footer a:hover {
1072
+ color: #FFF;
1073
+ background-color: rgba(255, 255, 255, 0.2);
1074
+ }
1075
+
1076
+ .tree-flex .btn-group {
1077
+ height: 50px !important;
1078
+ }
1079
+
1080
+ .tree-flex .dropdown-menu {
1081
+ /* 控制显示列表的样式 */
1082
+ background: #4a7cae;
1083
+ border-radius: 0px;
1084
+ color: #fff;
1085
+ width: auto;
1086
+ margin: 0px;
1087
+ padding: 0px;
1088
+ }
1089
+
1090
+ .tree-flex .dropdown-menu-up {
1091
+ /* bottom,top控制上下,left和right控制左右*/
1092
+ left: 100% !important;
1093
+ top: auto !important;
1094
+ bottom: 0;
1095
+ }
1096
+
1097
+ .tree-flex .dropdown-menu-down {
1098
+ /* bottom,top控制上下,left和right控制左右*/
1099
+ left: 100% !important;
1100
+ top: 0 !important;
1101
+ }
1102
+
1103
+ .tree-flex .dropdown-menu li {
1104
+ text-align: center;
1105
+ line-height: 50px;
1106
+ border-bottom: 1px solid #697D93;
1107
+ font-size: 1.2em;
1108
+ width: auto;
1109
+ white-space: nowrap;
1110
+ cursor: default;
1111
+
1112
+ }
1113
+
1114
+ .tree-flex .dropdown-menu li + li {
1115
+ text-align: left;
1116
+ border: 0;
1117
+ line-height: 40px;
1118
+ padding-left: 15px;
1119
+ padding-right: 15px;
1120
+ font-size: 1em;
1121
+ cursor: pointer;
1122
+ }
1123
+
1124
+ .tree-flex .dropdown-menu li + li:hover {
1125
+ background-color: rgba(255, 255, 255, 0.2);
1126
+ }
1127
+
1128
+ .tree-flex .dropdown-menu li a {
1129
+ border: none;
1130
+ color: #fff;
1131
+ height: 40px;
1132
+ line-height: 40px;
1133
+ font-size: 1em;
1134
+ padding: 0px;
1135
+ }
1136
+
1137
+ .tree-flex .dropdown-menu li a:hover {
1138
+ color: #fff;
1139
+ background-color: rgba(255, 255, 255, 0);
1140
+ }
1141
+
1142
+ .tree-flex img {
1143
+ height: 1.2em;
1144
+ width: 1.2em;
1145
+ margin-right: 15px;
1146
+ margin-left: 5px;
1147
+ }
1148
+
1149
+ .line {
1150
+ height: 100%;
1151
+ width: 5px;
1152
+ background: #4C637B;
1153
+ cursor: e-resize;
1154
+ }
1155
+
1156
+ /*为树(tree)组件写的样式*/
1157
+ .tree-img {
1158
+ font-size: 1.2em;
1159
+ }
1160
+
1161
+ /*将较长信息截断显示,鼠标悬停显示全部信息*/
1162
+ .cutout50 {
1163
+ max-width: 50px;
1164
+ overflow: hidden;
1165
+ text-overflow: ellipsis;
1166
+ white-space: nowrap;
1167
+ }
1168
+
1169
+ /* 滚动条样式 */
1170
+ /*---滚动条默认显示样式--*/
1171
+ ::-webkit-scrollbar-thumb {
1172
+ // display: none;
1173
+ background-color: rgba(0, 0, 0, 0.4);
1174
+ /*background-color:red;*/
1175
+ height: 50px;
1176
+ outline-offset: -2px;
1177
+ /*outline:2px solid #fff;*/
1178
+ -webkit-border-radius: 4px;
1179
+ /*border: 2px solid #fff;*/
1180
+ }
1181
+
1182
+ /*---鼠标点击滚动条显示样式--*/
1183
+ ::-webkit-scrollbar-thumb:hover {
1184
+ // display: inherit;
1185
+ background-color: rgba(0, 0, 0, 0.4);
1186
+ height: 50px;
1187
+ -webkit-border-radius: 4px;
1188
+ }
1189
+
1190
+ /*---滚动条大小--*/
1191
+ ::-webkit-scrollbar {
1192
+ width: 8px;
1193
+ height: 8px;
1194
+ }
1195
+
1196
+ /*---滚动框背景样式--*/
1197
+ ::-webkit-scrollbar-track-piece {
1198
+ /* 全透明,不显示 */
1199
+ background-color: rgba(255, 255, 255, 0);
1200
+ -webkit-border-radius: 0;
1201
+ }
1202
+ </style>