system-clients 4.0.7 → 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
CHANGED
@@ -1,211 +1,211 @@
|
|
1
|
-
<template>
|
2
|
-
<div :class="style" v-show="companyshow">
|
3
|
-
<label class="font_normal_body">公  司</label>
|
4
|
-
<right-tree @re-res="getorg"
|
5
|
-
:mustselect="mustselect"
|
6
|
-
:initresid='initres.org'></right-tree>
|
7
|
-
</div>
|
8
|
-
<div :class="style" v-show="departmentshow">
|
9
|
-
<label class="font_normal_body">部  门</label>
|
10
|
-
<res-select restype='department' v-ref:department
|
11
|
-
@res-select="getdep"
|
12
|
-
:parentresid="depresid"
|
13
|
-
:specialquery="specialquery"
|
14
|
-
:initresid='initres.dep'
|
15
|
-
:mustselect="mustselect"
|
16
|
-
:is-mul="mul">
|
17
|
-
</res-select>
|
18
|
-
</div>
|
19
|
-
<div :class="style" v-show="operatorshow && (!cascade)">
|
20
|
-
<label class="font_normal_body">人  员</label>
|
21
|
-
<res-select restype='user'
|
22
|
-
@res-select="getuser"
|
23
|
-
:parentresid="depresid"
|
24
|
-
:initresid='initres.user'
|
25
|
-
:mustselect="mustselect"
|
26
|
-
:is-mul="mul">
|
27
|
-
</res-select>
|
28
|
-
</div>
|
29
|
-
<div :class="style" v-show="operatorshow && cascade">
|
30
|
-
<label class="font_normal_body">人  员</label>
|
31
|
-
<res-select restype='user'
|
32
|
-
@res-select="getuser"
|
33
|
-
:parentresid="userresid"
|
34
|
-
:initresid='initres.user'
|
35
|
-
:mustselect="mustselect"
|
36
|
-
:is-mul="mul">
|
37
|
-
</res-select>
|
38
|
-
</div>
|
39
|
-
<div :class="style " v-if="sliceareashow" >
|
40
|
-
<label class="font_normal_body">片  区</label>
|
41
|
-
<v-select :value.sync="slice_area" v-model="slice_area" @change='getarea'
|
42
|
-
:options='sliceArea' placeholder='片区/管理站' filer-key="name"
|
43
|
-
close-on-select v-ref:slice>
|
44
|
-
</v-select>
|
45
|
-
</div>
|
46
|
-
</template>
|
47
|
-
<script>
|
48
|
-
import plugin from '../../plugins/GetLoginInfoService'
|
49
|
-
import { HttpResetClass } from 'vue-client'
|
50
|
-
export default {
|
51
|
-
title: '资源选择测试',
|
52
|
-
props: {
|
53
|
-
style: {
|
54
|
-
type: String,
|
55
|
-
default: 'col-sm-2 form-group'
|
56
|
-
},
|
57
|
-
mul: {
|
58
|
-
type: Boolean,
|
59
|
-
default: true
|
60
|
-
},
|
61
|
-
//是否只查询营业厅
|
62
|
-
specialquery: {
|
63
|
-
type: Boolean,
|
64
|
-
default: false
|
65
|
-
},
|
66
|
-
//初始值
|
67
|
-
initres: {
|
68
|
-
type: Object,
|
69
|
-
default: null,
|
70
|
-
},
|
71
|
-
showComponent:{
|
72
|
-
default:['company','department','operator','slicearea']
|
73
|
-
},
|
74
|
-
//人员是否和部门关联
|
75
|
-
cascade: {
|
76
|
-
type: Boolean,
|
77
|
-
default: true
|
78
|
-
},
|
79
|
-
selectin: {
|
80
|
-
type: Boolean,
|
81
|
-
default: true
|
82
|
-
}
|
83
|
-
},
|
84
|
-
data () {
|
85
|
-
return {
|
86
|
-
orgresid:[this.$login.f.orgid],
|
87
|
-
depresid:[],
|
88
|
-
userresid:[],
|
89
|
-
operatorsid: [],
|
90
|
-
sliceArea: [],
|
91
|
-
slice_area:[],
|
92
|
-
companyshow:false,
|
93
|
-
departmentshow:false,
|
94
|
-
operatorshow:false,
|
95
|
-
sliceareashow:false,
|
96
|
-
mustselect:false,
|
97
|
-
obj:{
|
98
|
-
orgnames:[],
|
99
|
-
depnames:[],
|
100
|
-
operatornames:[]
|
101
|
-
}
|
102
|
-
}
|
103
|
-
},
|
104
|
-
ready () {
|
105
|
-
if(this.$login.r.includes('部门默认选中')&& this.selectin){
|
106
|
-
this.initres.dep = [this.$login.f.depids]
|
107
|
-
}
|
108
|
-
if(this.$login.r.includes('人员默认选中')&& this.selectin){
|
109
|
-
this.initres.user = [this.$login.f.id]
|
110
|
-
if(this.$login.r.includes('人员强制选中')){
|
111
|
-
this.mustselect = true
|
112
|
-
}
|
113
|
-
}
|
114
|
-
this.initComponent();
|
115
|
-
this.initAreas(this.$login.f.orgid)
|
116
|
-
},
|
117
|
-
methods:{
|
118
|
-
initComponent(){
|
119
|
-
let self=this;
|
120
|
-
this.showComponent.find((item)=>{
|
121
|
-
switch(item){
|
122
|
-
case 'company': self.companyshow=true; break;
|
123
|
-
case 'department': self.departmentshow=true; break;
|
124
|
-
case 'operator': self.operatorshow=true; break;
|
125
|
-
case 'slicearea': self.sliceareashow=true; break;
|
126
|
-
}
|
127
|
-
})
|
128
|
-
},
|
129
|
-
// 初始化片区
|
130
|
-
async initAreas (val) {
|
131
|
-
if (val) {
|
132
|
-
let http = new HttpResetClass()
|
133
|
-
let getAllArea = await http.load('POST', '/rs/search', {
|
134
|
-
source: 'this.getParentByType($organization$).getAllChildrens().where(row.getType() == $zone$)',
|
135
|
-
userid: this.$login.f.id
|
136
|
-
}, {resolveMsg: null, rejectMsg: '获取片区出错!!!'})
|
137
|
-
let arr = getAllArea.data.filter((res) => {
|
138
|
-
if(Array.isArray(val)){
|
139
|
-
for (let i = 0; i <val.length ; i++) {
|
140
|
-
if(res.parentid == val[i]){
|
141
|
-
return true
|
142
|
-
}
|
143
|
-
}
|
144
|
-
}
|
145
|
-
return res.parentid == val
|
146
|
-
})
|
147
|
-
this.sliceArea = []
|
148
|
-
this.slice_area = []
|
149
|
-
arr.forEach((res) => {
|
150
|
-
this.sliceArea.push({label: res.name, value: {name: res.name, code:res.number}})
|
151
|
-
})
|
152
|
-
}
|
153
|
-
},
|
154
|
-
returnOrg(ids){
|
155
|
-
let limit = this.$login.r.includes('数据授权限定')
|
156
|
-
|
157
|
-
let condition;
|
158
|
-
if(this.depresid.length > 0)
|
159
|
-
condition = " and f_orgid in " + plugin.convertToIn(this.depresid);
|
160
|
-
else
|
161
|
-
condition = " and f_orgid = " + this.$login.f.orgid;
|
162
|
-
if(this.userresid.length > 0){
|
163
|
-
condition += " and f_depid in " + plugin.convertToIn(this.userresid);
|
164
|
-
} else {
|
165
|
-
if (limit) {
|
166
|
-
let depids = []
|
167
|
-
for (let row of this.$refs.department.resoptions) {
|
168
|
-
depids.push(row.value)
|
169
|
-
}
|
170
|
-
let depid = depids.length ? plugin.convertToIn(depids) : `('')`
|
171
|
-
condition += " and f_depid in " + depid;
|
172
|
-
}
|
173
|
-
}
|
174
|
-
if(ids && ids.length > 0){
|
175
|
-
condition += " and f_operatorid in " + plugin.convertToIn(ids);
|
176
|
-
}
|
177
|
-
if(this.slice_area.length>0){
|
178
|
-
condition += " and f_zones = '" + this.slice_area[0].name+"'"
|
179
|
-
}
|
180
|
-
this.$dispatch('re-res',condition,this.obj)
|
181
|
-
},
|
182
|
-
getorg (obj) {
|
183
|
-
this.depresid=obj.resids
|
184
|
-
this.obj.orgnames = obj.res
|
185
|
-
this.initAreas(obj.resids)
|
186
|
-
this.returnOrg();
|
187
|
-
},
|
188
|
-
getdep(obj,val) {
|
189
|
-
this.obj.depnames = val
|
190
|
-
this.userresid=obj
|
191
|
-
this.returnOrg();
|
192
|
-
},
|
193
|
-
getuser(obj,val) {
|
194
|
-
this.obj.operatornames = val
|
195
|
-
this.operatorsid = obj
|
196
|
-
this.returnOrg(obj);
|
197
|
-
},
|
198
|
-
getarea(val) {
|
199
|
-
this.slice_area=val
|
200
|
-
if(this.operatorsid){
|
201
|
-
this.returnOrg(this.operatorsid);
|
202
|
-
}else{
|
203
|
-
this.returnOrg();
|
204
|
-
}
|
205
|
-
}
|
206
|
-
},
|
207
|
-
watch: {
|
208
|
-
|
209
|
-
}
|
210
|
-
}
|
211
|
-
</script>
|
1
|
+
<template>
|
2
|
+
<div :class="style" v-show="companyshow">
|
3
|
+
<label class="font_normal_body">公  司</label>
|
4
|
+
<right-tree @re-res="getorg"
|
5
|
+
:mustselect="mustselect"
|
6
|
+
:initresid='initres.org'></right-tree>
|
7
|
+
</div>
|
8
|
+
<div :class="style" v-show="departmentshow">
|
9
|
+
<label class="font_normal_body">部  门</label>
|
10
|
+
<res-select restype='department' v-ref:department
|
11
|
+
@res-select="getdep"
|
12
|
+
:parentresid="depresid"
|
13
|
+
:specialquery="specialquery"
|
14
|
+
:initresid='initres.dep'
|
15
|
+
:mustselect="mustselect"
|
16
|
+
:is-mul="mul">
|
17
|
+
</res-select>
|
18
|
+
</div>
|
19
|
+
<div :class="style" v-show="operatorshow && (!cascade)">
|
20
|
+
<label class="font_normal_body">人  员</label>
|
21
|
+
<res-select restype='user'
|
22
|
+
@res-select="getuser"
|
23
|
+
:parentresid="depresid"
|
24
|
+
:initresid='initres.user'
|
25
|
+
:mustselect="mustselect"
|
26
|
+
:is-mul="mul">
|
27
|
+
</res-select>
|
28
|
+
</div>
|
29
|
+
<div :class="style" v-show="operatorshow && cascade">
|
30
|
+
<label class="font_normal_body">人  员</label>
|
31
|
+
<res-select restype='user'
|
32
|
+
@res-select="getuser"
|
33
|
+
:parentresid="userresid"
|
34
|
+
:initresid='initres.user'
|
35
|
+
:mustselect="mustselect"
|
36
|
+
:is-mul="mul">
|
37
|
+
</res-select>
|
38
|
+
</div>
|
39
|
+
<div :class="style " v-if="sliceareashow" >
|
40
|
+
<label class="font_normal_body">片  区</label>
|
41
|
+
<v-select :value.sync="slice_area" v-model="slice_area" @change='getarea'
|
42
|
+
:options='sliceArea' placeholder='片区/管理站' filer-key="name"
|
43
|
+
close-on-select v-ref:slice>
|
44
|
+
</v-select>
|
45
|
+
</div>
|
46
|
+
</template>
|
47
|
+
<script>
|
48
|
+
import plugin from '../../plugins/GetLoginInfoService'
|
49
|
+
import { HttpResetClass } from 'vue-client'
|
50
|
+
export default {
|
51
|
+
title: '资源选择测试',
|
52
|
+
props: {
|
53
|
+
style: {
|
54
|
+
type: String,
|
55
|
+
default: 'col-sm-2 form-group'
|
56
|
+
},
|
57
|
+
mul: {
|
58
|
+
type: Boolean,
|
59
|
+
default: true
|
60
|
+
},
|
61
|
+
//是否只查询营业厅
|
62
|
+
specialquery: {
|
63
|
+
type: Boolean,
|
64
|
+
default: false
|
65
|
+
},
|
66
|
+
//初始值
|
67
|
+
initres: {
|
68
|
+
type: Object,
|
69
|
+
default: null,
|
70
|
+
},
|
71
|
+
showComponent:{
|
72
|
+
default:['company','department','operator','slicearea']
|
73
|
+
},
|
74
|
+
//人员是否和部门关联
|
75
|
+
cascade: {
|
76
|
+
type: Boolean,
|
77
|
+
default: true
|
78
|
+
},
|
79
|
+
selectin: {
|
80
|
+
type: Boolean,
|
81
|
+
default: true
|
82
|
+
}
|
83
|
+
},
|
84
|
+
data () {
|
85
|
+
return {
|
86
|
+
orgresid:[this.$login.f.orgid],
|
87
|
+
depresid:[],
|
88
|
+
userresid:[],
|
89
|
+
operatorsid: [],
|
90
|
+
sliceArea: [],
|
91
|
+
slice_area:[],
|
92
|
+
companyshow:false,
|
93
|
+
departmentshow:false,
|
94
|
+
operatorshow:false,
|
95
|
+
sliceareashow:false,
|
96
|
+
mustselect:false,
|
97
|
+
obj:{
|
98
|
+
orgnames:[],
|
99
|
+
depnames:[],
|
100
|
+
operatornames:[]
|
101
|
+
}
|
102
|
+
}
|
103
|
+
},
|
104
|
+
ready () {
|
105
|
+
if(this.$login.r.includes('部门默认选中')&& this.selectin && this.showComponent.includes('department')){
|
106
|
+
this.initres.dep = [this.$login.f.depids]
|
107
|
+
}
|
108
|
+
if(this.$login.r.includes('人员默认选中')&& this.selectin && this.showComponent.includes('operator')){
|
109
|
+
this.initres.user = [this.$login.f.id]
|
110
|
+
if(this.$login.r.includes('人员强制选中')){
|
111
|
+
this.mustselect = true
|
112
|
+
}
|
113
|
+
}
|
114
|
+
this.initComponent();
|
115
|
+
this.initAreas(this.$login.f.orgid)
|
116
|
+
},
|
117
|
+
methods:{
|
118
|
+
initComponent(){
|
119
|
+
let self=this;
|
120
|
+
this.showComponent.find((item)=>{
|
121
|
+
switch(item){
|
122
|
+
case 'company': self.companyshow=true; break;
|
123
|
+
case 'department': self.departmentshow=true; break;
|
124
|
+
case 'operator': self.operatorshow=true; break;
|
125
|
+
case 'slicearea': self.sliceareashow=true; break;
|
126
|
+
}
|
127
|
+
})
|
128
|
+
},
|
129
|
+
// 初始化片区
|
130
|
+
async initAreas (val) {
|
131
|
+
if (val) {
|
132
|
+
let http = new HttpResetClass()
|
133
|
+
let getAllArea = await http.load('POST', '/rs/search', {
|
134
|
+
source: 'this.getParentByType($organization$).getAllChildrens().where(row.getType() == $zone$)',
|
135
|
+
userid: this.$login.f.id
|
136
|
+
}, {resolveMsg: null, rejectMsg: '获取片区出错!!!'})
|
137
|
+
let arr = getAllArea.data.filter((res) => {
|
138
|
+
if(Array.isArray(val)){
|
139
|
+
for (let i = 0; i <val.length ; i++) {
|
140
|
+
if(res.parentid == val[i]){
|
141
|
+
return true
|
142
|
+
}
|
143
|
+
}
|
144
|
+
}
|
145
|
+
return res.parentid == val
|
146
|
+
})
|
147
|
+
this.sliceArea = []
|
148
|
+
this.slice_area = []
|
149
|
+
arr.forEach((res) => {
|
150
|
+
this.sliceArea.push({label: res.name, value: {name: res.name, code:res.number}})
|
151
|
+
})
|
152
|
+
}
|
153
|
+
},
|
154
|
+
returnOrg(ids){
|
155
|
+
let limit = this.$login.r.includes('数据授权限定')
|
156
|
+
|
157
|
+
let condition;
|
158
|
+
if(this.depresid.length > 0)
|
159
|
+
condition = " and f_orgid in " + plugin.convertToIn(this.depresid);
|
160
|
+
else
|
161
|
+
condition = " and f_orgid = " + this.$login.f.orgid;
|
162
|
+
if(this.userresid.length > 0){
|
163
|
+
condition += " and f_depid in " + plugin.convertToIn(this.userresid);
|
164
|
+
} else {
|
165
|
+
if (limit && this.departmentshow && this.$refs.department) {
|
166
|
+
let depids = []
|
167
|
+
for (let row of this.$refs.department.resoptions) {
|
168
|
+
depids.push(row.value)
|
169
|
+
}
|
170
|
+
let depid = depids.length ? plugin.convertToIn(depids) : `('')`
|
171
|
+
condition += " and f_depid in " + depid;
|
172
|
+
}
|
173
|
+
}
|
174
|
+
if(ids && ids.length > 0 && this.operatorshow){
|
175
|
+
condition += " and f_operatorid in " + plugin.convertToIn(ids);
|
176
|
+
}
|
177
|
+
if(this.slice_area.length>0){
|
178
|
+
condition += " and f_zones = '" + this.slice_area[0].name+"'"
|
179
|
+
}
|
180
|
+
this.$dispatch('re-res',condition,this.obj)
|
181
|
+
},
|
182
|
+
getorg (obj) {
|
183
|
+
this.depresid=obj.resids
|
184
|
+
this.obj.orgnames = obj.res
|
185
|
+
this.initAreas(obj.resids)
|
186
|
+
this.returnOrg();
|
187
|
+
},
|
188
|
+
getdep(obj,val) {
|
189
|
+
this.obj.depnames = val
|
190
|
+
this.userresid=obj
|
191
|
+
this.returnOrg();
|
192
|
+
},
|
193
|
+
getuser(obj,val) {
|
194
|
+
this.obj.operatornames = val
|
195
|
+
this.operatorsid = obj
|
196
|
+
this.returnOrg(obj);
|
197
|
+
},
|
198
|
+
getarea(val) {
|
199
|
+
this.slice_area=val
|
200
|
+
if(this.operatorsid){
|
201
|
+
this.returnOrg(this.operatorsid);
|
202
|
+
}else{
|
203
|
+
this.returnOrg();
|
204
|
+
}
|
205
|
+
}
|
206
|
+
},
|
207
|
+
watch: {
|
208
|
+
|
209
|
+
}
|
210
|
+
}
|
211
|
+
</script>
|
@@ -15,15 +15,12 @@
|
|
15
15
|
<div class="system-left-chi" :class="{'system-left-icon': !treeOrIcon}">
|
16
16
|
<div class="span system-left-tree " style="height:85%">
|
17
17
|
<h3>{{ systemname }}</h3>
|
18
|
-
|
19
|
-
<left-tree :functions='functions.functions' :userid='userid' @isnodo="isnodo" v-show="treeOrIcon"
|
18
|
+
<left-tree :functions='functions.functions' :userid='userid' @isnodo="isnodo" v-show="treeOrIcon"
|
20
19
|
:tabs="tabs" v-ref:tree></left-tree>
|
21
|
-
|
22
|
-
</div>
|
20
|
+
</div>
|
23
21
|
|
24
22
|
<div class="tree-flex-footer">
|
25
|
-
|
26
|
-
<!-- <a><img src="../../../static/treeset.png" alt="">系统设置</a> -->
|
23
|
+
|
27
24
|
<dropdown class="auto">
|
28
25
|
<button type="button" data-toggle="dropdown">
|
29
26
|
<img :src="imgs.set" alt=""><span v-if="treeOrIcon">系统设置</span>
|
@@ -45,10 +42,7 @@
|
|
45
42
|
</div>
|
46
43
|
</div>
|
47
44
|
</div>
|
48
|
-
<!-- <div class="line" id="line" v-show="treeOrIcon" v-el:line></div> -->
|
49
|
-
|
50
45
|
<div class="flex right-bg system-right" id="bottom" v-el:bottom>
|
51
|
-
<!-- <operator-badge></operator-badge> -->
|
52
46
|
<div class="span">
|
53
47
|
<echarts-box v-if="$refs.mic.tabs.length === 0"></echarts-box>
|
54
48
|
<dynamic :comps='[]' name='main' :selecttab.sync="selecttab" :orgpathnames="orgpathnames"
|
@@ -83,7 +77,6 @@
|
|
83
77
|
<button class="button_search" @click="newTipContextShow = false">确认</button>
|
84
78
|
</footer>
|
85
79
|
</modal>
|
86
|
-
|
87
80
|
<modal v-show="showRemind" :show.sync="showRemind" :backdrop="false">
|
88
81
|
<header slot="modal-header" class="text-center"><h3>卡表动态库到期</h3></header>
|
89
82
|
<article slot="modal-body" class="modal-body">
|
@@ -133,7 +126,8 @@ let getwartermakr = async function (self) {
|
|
133
126
|
tablename: 't_singlevalue',
|
134
127
|
condition: " 1=1 and name=\'水印内容\'"
|
135
128
|
};
|
136
|
-
|
129
|
+
// todo v4
|
130
|
+
let result = await self.$resetpost('api/af-revenue/sql/saleSingleTable', {data: param}, {resolveMsg: null, rejectMsg: null});
|
137
131
|
if (result && result.data.length > 0) {
|
138
132
|
self.showwatermakeflag = true;
|
139
133
|
createWaterMark(`${result.data[0].value}${self.$login.f.ename}`);
|
@@ -170,12 +164,6 @@ let createWaterMark = function (userName) {
|
|
170
164
|
(document.head.append || document.head.appendChild).apply(document.head, [style]);
|
171
165
|
}
|
172
166
|
|
173
|
-
window.onunload = () => {
|
174
|
-
vue.http({url: `rs/user/update/${this.$login.f.ename}`, method: 'GET'})
|
175
|
-
}
|
176
|
-
window.onbeforeunload = () => {
|
177
|
-
vue.http({url: `rs/user/update/${this.$login.f.ename}`, method: 'GET'})
|
178
|
-
}
|
179
167
|
export default {
|
180
168
|
title: '主界面',
|
181
169
|
props: ['functions', 'userid', 'config'],
|
@@ -202,7 +190,6 @@ let createWaterMark = function (userName) {
|
|
202
190
|
qrCode:false,
|
203
191
|
isManger: false,
|
204
192
|
show: false,
|
205
|
-
orgpathnames: `${this.$login.f.orgs}-${this.$login.f.deps}-${this.$login.f.name}`,
|
206
193
|
systemname: '客服系统',
|
207
194
|
date: this.$login.toStandardDateString(),
|
208
195
|
tabs: [], //已初始化页签数组
|
@@ -214,17 +201,15 @@ let createWaterMark = function (userName) {
|
|
214
201
|
showRemind: false,
|
215
202
|
dataRemind: [],
|
216
203
|
connectNumber:10,
|
217
|
-
timeout:
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
// showsum: false
|
204
|
+
timeout: 1000,
|
205
|
+
timeoutObj: null,
|
206
|
+
serverTimeoutObj: null,
|
207
|
+
lockReconnect: false,
|
222
208
|
}
|
223
209
|
},
|
224
210
|
ready() {
|
225
|
-
|
226
|
-
|
227
|
-
// this.initWebSocket()
|
211
|
+
//查询是否有终止且未通知的报建
|
212
|
+
this.getApplyList()
|
228
213
|
getwartermakr(this);
|
229
214
|
let component = this.$login.getUrlCompileParames('component')
|
230
215
|
if (component) {
|
@@ -286,9 +271,37 @@ let createWaterMark = function (userName) {
|
|
286
271
|
}
|
287
272
|
// 获取卡表动态库到期时间
|
288
273
|
this.getExpireDate()
|
289
|
-
this.
|
274
|
+
vue.prototype.$connectNumber = this.connectNumber
|
275
|
+
this.initWebSocket()
|
276
|
+
|
290
277
|
},
|
291
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
|
+
},
|
292
305
|
// 清除
|
293
306
|
reset () {
|
294
307
|
clearTimeout(this.timeoutObj)
|
@@ -311,15 +324,6 @@ let createWaterMark = function (userName) {
|
|
311
324
|
// 重连
|
312
325
|
reconnect () {
|
313
326
|
if (this.lockReconnect) return
|
314
|
-
// if (this.$connectNumber <= 0) {
|
315
|
-
// vue.showMessage('连接已断开,将无法接收消息,请重新登录', ['confirm']).then((res) => {
|
316
|
-
// if (res === 'confirm') {
|
317
|
-
// location.reload()
|
318
|
-
// }
|
319
|
-
// })
|
320
|
-
// return
|
321
|
-
// }
|
322
|
-
// this.$connectNumber--
|
323
327
|
setTimeout(() => {
|
324
328
|
console.log('连接异常,尝试重新连接。。。。')
|
325
329
|
this.initWebSocket()
|
@@ -357,14 +361,24 @@ let createWaterMark = function (userName) {
|
|
357
361
|
},
|
358
362
|
// 收到消息时回调函数
|
359
363
|
onMessage (event) {
|
360
|
-
if (event.data === 'pong') {
|
361
|
-
this.reset()
|
362
|
-
this.start()
|
364
|
+
if (event.data === 'pong') {
|
365
|
+
this.reset()
|
366
|
+
this.start()
|
363
367
|
return
|
364
368
|
}
|
365
|
-
//不是pong消息,就是服务器返回的消息(提示消息)
|
366
369
|
let data = JSON.parse(event.data)
|
367
|
-
|
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
|
+
}
|
368
382
|
},
|
369
383
|
// 关闭连接时回调函数
|
370
384
|
onClose () {
|
@@ -430,7 +444,7 @@ let createWaterMark = function (userName) {
|
|
430
444
|
this.OrderDaiBan = ''
|
431
445
|
this.AppDaiBan = ''
|
432
446
|
let http = new HttpResetClass()
|
433
|
-
await http.load('POST', '/
|
447
|
+
await http.load('POST', '/api/af-system/sql/singleTable', {data: {
|
434
448
|
tablename:'t_order_center',
|
435
449
|
condition:` (f_orderstate != '预约成功' and f_orgstr ='${this.$login.f.orgid}' and f_orderstate != '预约失败' ) or f_orderstate is null`
|
436
450
|
}}, {
|
@@ -478,7 +492,7 @@ let createWaterMark = function (userName) {
|
|
478
492
|
async getExpireDate(){
|
479
493
|
// 获取分公司的表品牌id
|
480
494
|
let http = new HttpResetClass()
|
481
|
-
await http.load('POST', '/
|
495
|
+
await http.load('POST', '/api/af-system/sql/singleTable', {data: {
|
482
496
|
tablename:'t_gasbrand_orgid',
|
483
497
|
condition:`f_using_orgid ='${this.$login.f.orgid}'`
|
484
498
|
}}, {
|
@@ -492,7 +506,7 @@ let createWaterMark = function (userName) {
|
|
492
506
|
}
|
493
507
|
if (this.gasbrandIdData.length > 0) {
|
494
508
|
// 获取卡表到期时间
|
495
|
-
http.load('POST', '/
|
509
|
+
http.load('POST', '/api/af-system/sql/singleTable', {data: {
|
496
510
|
tablename:'t_gasbrand',
|
497
511
|
condition:`id in (${this.gasbrandIdData}) and f_meter_type like '%卡表%'`
|
498
512
|
}}, {
|
@@ -503,7 +517,6 @@ let createWaterMark = function (userName) {
|
|
503
517
|
res.data.forEach(itre => {
|
504
518
|
let band = null
|
505
519
|
if ('f_dynamic_expire' in itre) {
|
506
|
-
console.log(itre.f_dynamic_expire)
|
507
520
|
if (itre.f_dynamic_expire !== null && itre.f_dynamic_expire !== '') {
|
508
521
|
let todayold = new Date(itre.f_dynamic_expire)
|
509
522
|
todayold.setDate(todayold.getDate() - parseInt(this.$appdata.getSingleValue('动态库提醒天数设置')))
|
@@ -531,27 +544,6 @@ let createWaterMark = function (userName) {
|
|
531
544
|
this.newTipShow = false
|
532
545
|
this.newTipContextShow = true
|
533
546
|
},
|
534
|
-
getApplynum(){
|
535
|
-
const isRemind =this.$appdata.getSingleValue("报建代办提醒")
|
536
|
-
if(isRemind=='是'){
|
537
|
-
var data={
|
538
|
-
condition: " 1=1 ",
|
539
|
-
condValue: [],
|
540
|
-
data: {
|
541
|
-
id: this.$login.f.id,
|
542
|
-
orgid: this.$login.f.orgid
|
543
|
-
}
|
544
|
-
}
|
545
|
-
debugger
|
546
|
-
new HttpResetClass().load('POST','rs/sql/checkuser/n',
|
547
|
-
{data}, {resolveMsg: null, rejectMsg: null}).then(res=>{
|
548
|
-
if(res.data && res.data.n !== 0){
|
549
|
-
this.$showMessage('你有'+res.data.n+'个报建待处理,请尽快前往报建流程面进行处理')
|
550
|
-
}
|
551
|
-
})
|
552
|
-
|
553
|
-
}
|
554
|
-
},
|
555
547
|
gotoWorkOrderSite(){
|
556
548
|
const isRemind =this.$appdata.getSingleValue("站点工单提醒")
|
557
549
|
console.log('站点工单是否提醒',isRemind)
|
@@ -654,13 +646,32 @@ let createWaterMark = function (userName) {
|
|
654
646
|
username: this.$login.f.name,
|
655
647
|
usertelephone: this.$login.f.f_user_telephone
|
656
648
|
}
|
657
|
-
|
658
|
-
|
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
659
|
}
|
660
660
|
})
|
661
661
|
}
|
662
662
|
},
|
663
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
|
+
|
664
675
|
nowDate() {
|
665
676
|
return this.$login.getNowDate()
|
666
677
|
}
|