|
@@ -66,7 +66,7 @@
|
66
|
66
|
<span>{{ incidentCount.incidentDone || 0 }}</span>
|
67
|
67
|
</div>
|
68
|
68
|
</div>
|
69
|
|
- <div class="status" @click="toIncidentList('create')">
|
|
69
|
+ <!-- <div class="status" @click="toIncidentList('create')">
|
70
|
70
|
<div>
|
71
|
71
|
<svg class="icon" aria-hidden="true">
|
72
|
72
|
<use xlink:href="#icon-daipingjia"></use>
|
|
@@ -76,7 +76,7 @@
|
76
|
76
|
<span>我创建</span>
|
77
|
77
|
<span>{{ incidentCount.incidentCreate || 0 }}</span>
|
78
|
78
|
</div>
|
79
|
|
- </div>
|
|
79
|
+ </div> -->
|
80
|
80
|
</div>
|
81
|
81
|
</div>
|
82
|
82
|
<div class="myRapir">
|
|
@@ -149,9 +149,6 @@ export default {
|
149
|
149
|
}).show()
|
150
|
150
|
return;
|
151
|
151
|
}
|
152
|
|
- // 本地测试
|
153
|
|
- // this.goToWork(online, '123');
|
154
|
|
- // return;
|
155
|
152
|
let _this = this;
|
156
|
153
|
this.toast = this.$createToast({
|
157
|
154
|
time: 0,
|
|
@@ -159,6 +156,9 @@ export default {
|
159
|
156
|
txt: "正在加载中"
|
160
|
157
|
});
|
161
|
158
|
this.toast.show();
|
|
159
|
+ // 本地测试
|
|
160
|
+ // this.goToWork(online, '123');
|
|
161
|
+ // return;
|
162
|
162
|
//第二个参数 默认为wgs84的gps坐标,如果要返回直接给openLocation用的火星坐标,可传入'gcj02'
|
163
|
163
|
sdk.getLocation(res => {
|
164
|
164
|
// alert(JSON.stringify(res));
|
|
@@ -186,18 +186,18 @@ export default {
|
186
|
186
|
this.$http
|
187
|
187
|
.post("service/auth/online", { online, address })
|
188
|
188
|
.then(res => {
|
189
|
|
- this.toast.hide();//本地测试
|
190
|
189
|
if (res.data.status == 200) {
|
191
|
|
- this.online = online;
|
192
|
|
- const t = this.$createToast({
|
193
|
|
- type: "txt",
|
194
|
|
- txt: online == 1 ? "上班成功" : "下班成功"
|
195
|
|
- });
|
196
|
|
- t.show();
|
197
|
|
- setTimeout(() => {
|
198
|
|
- t.hide();
|
199
|
|
- }, 1000);
|
|
190
|
+ this.$http
|
|
191
|
+ .post("service/auth/showOnlineBtn", {})
|
|
192
|
+ .then((res) => {
|
|
193
|
+ this.toast.hide();
|
|
194
|
+ if(res.data.status == 200){
|
|
195
|
+ this.online = res.data.online;
|
|
196
|
+ this.showToast(online, '成功');
|
|
197
|
+ }
|
|
198
|
+ });
|
200
|
199
|
} else {
|
|
200
|
+ this.toast.hide();
|
201
|
201
|
this.$createDialog({
|
202
|
202
|
type: 'confirm',
|
203
|
203
|
icon: 'cubeic-alert',
|
|
@@ -225,26 +225,19 @@ export default {
|
225
|
225
|
this.$http
|
226
|
226
|
.post("service/auth/online", { online, address, confirm:'ok' })
|
227
|
227
|
.then(res => {
|
228
|
|
- this.toast.hide();
|
229
|
228
|
if (res.data.status == 200) {
|
230
|
|
- this.online = online;
|
231
|
|
- const t = this.$createToast({
|
232
|
|
- type: "txt",
|
233
|
|
- txt: online == 1 ? "上班成功" : "下班成功"
|
|
229
|
+ this.$http
|
|
230
|
+ .post("service/auth/showOnlineBtn", {})
|
|
231
|
+ .then((res) => {
|
|
232
|
+ this.toast.hide();
|
|
233
|
+ if(res.data.status == 200){
|
|
234
|
+ this.online = res.data.online;
|
|
235
|
+ this.showToast(online, '成功')
|
|
236
|
+ }
|
234
|
237
|
});
|
235
|
|
- t.show();
|
236
|
|
- setTimeout(() => {
|
237
|
|
- t.hide();
|
238
|
|
- }, 1000);
|
239
|
238
|
}else{
|
240
|
|
- const t = this.$createToast({
|
241
|
|
- type: "txt",
|
242
|
|
- txt: online == 1 ? "上班失败" : "下班失败"
|
243
|
|
- });
|
244
|
|
- t.show();
|
245
|
|
- setTimeout(() => {
|
246
|
|
- t.hide();
|
247
|
|
- }, 1000);
|
|
239
|
+ this.toast.hide();
|
|
240
|
+ this.showToast(online, '失败')
|
248
|
241
|
}
|
249
|
242
|
})
|
250
|
243
|
},
|
|
@@ -252,6 +245,17 @@ export default {
|
252
|
245
|
}
|
253
|
246
|
});
|
254
|
247
|
},
|
|
248
|
+ // 展示信息
|
|
249
|
+ showToast(online, msg){
|
|
250
|
+ const t = this.$createToast({
|
|
251
|
+ type: "txt",
|
|
252
|
+ txt: online == 1 ? "上班"+msg : "下班"+msg
|
|
253
|
+ });
|
|
254
|
+ t.show();
|
|
255
|
+ setTimeout(() => {
|
|
256
|
+ t.hide();
|
|
257
|
+ }, 1000);
|
|
258
|
+ },
|
255
|
259
|
// 工作组
|
256
|
260
|
getGroups() {
|
257
|
261
|
var that = this;
|
|
@@ -309,6 +313,8 @@ export default {
|
309
|
313
|
this.online = res.data.online;
|
310
|
314
|
}
|
311
|
315
|
});
|
|
316
|
+ }else{
|
|
317
|
+ this.isWorkLoading = false;
|
312
|
318
|
}
|
313
|
319
|
}
|
314
|
320
|
});
|