ecinc-cloud-moadesktop 9.6.252 → 9.6.253

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.
@@ -241,13 +241,8 @@ module.exports = {
241
241
  __webpack_require__.r(__webpack_exports__);
242
242
  /* harmony import */ var js_cookie__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2215);
243
243
  /* harmony import */ var js_cookie__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(js_cookie__WEBPACK_IMPORTED_MODULE_0__);
244
- function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
245
- function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
246
- function asyncGeneratorStep(n, t, e, r, o, a, c) { try { var i = n[a](c), u = i.value; } catch (n) { return void e(n); } i.done ? t(u) : Promise.resolve(u).then(r, o); }
247
- function _asyncToGenerator(n) { return function () { var t = this, e = arguments; return new Promise(function (r, o) { var a = n.apply(t, e); function _next(n) { asyncGeneratorStep(a, r, o, _next, _throw, "next", n); } function _throw(n) { asyncGeneratorStep(a, r, o, _next, _throw, "throw", n); } _next(void 0); }); }; }
248
244
 
249
245
  var $parent = '';
250
- var curInterval = null; // 定时任务
251
246
  var timeSpanData = null; // 考勤时段
252
247
  var p1 = null; // 打卡位置经纬度
253
248
  var gpsScope = null;
@@ -315,72 +310,56 @@ function getCurAddress(lng, lat) {
315
310
  });
316
311
  }
317
312
 
318
- /**
319
- *地图定位 获取当前位置
320
- */
321
- function getCurLocation() {
322
- function h5Position(e) {
323
- if (this.getStatus() == 0) {
324
- getDis(e.lnglat.lng, e.lnglat.lat);
325
- getCurAddress(e.lnglat.lng, e.lnglat.lat);
326
- } else {
327
- console.log('Geolocation getCurrentPosition status', lo.getStatus());
328
- $parent.dakaType = dakaType[0];
329
- }
330
- }
331
- var lo = new T.Geolocation();
332
- lo.getCurrentPosition(h5Position);
333
- }
334
313
  // 定位
335
314
  function curLocationAndDis() {
336
315
  var device = js_cookie__WEBPACK_IMPORTED_MODULE_0___default().get('device');
337
- if (curInterval) {
338
- clearInterval(curInterval);
339
- }
340
- if (window.mappType === 'ecinc') {
341
- //APP定位
342
- $parent.$wv.getLocationInformation(function (res) {
343
- if (typeof res === 'string') res = JSON.parse(res);
344
- if (res && res.data) {
345
- getDis(Number(res.data.longitude), Number(res.data.latitude));
346
- getCurAddress(Number(res.data.longitude), Number(res.data.latitude));
347
- } else {
348
- console.log('$wv getCurrentPosition res =', res);
349
- $parent.dakaType = dakaType[0];
350
- }
351
- });
352
- curInterval = setInterval(function () {
316
+ return new Promise(function (resolve) {
317
+ if (window.mappType === 'ecinc') {
318
+ //APP定位
353
319
  $parent.$wv.getLocationInformation(function (res) {
354
320
  if (typeof res === 'string') res = JSON.parse(res);
355
321
  if (res && res.data) {
356
322
  getDis(Number(res.data.longitude), Number(res.data.latitude));
357
323
  getCurAddress(Number(res.data.longitude), Number(res.data.latitude));
324
+ resolve(true);
358
325
  } else {
359
326
  console.log('$wv getCurrentPosition res =', res);
327
+ resolve(false);
360
328
  $parent.dakaType = dakaType[0];
361
329
  }
362
330
  });
363
- }, 1000 * 30);
364
- } else if (window.isOpenMapLocation === 1) {
365
- // H5地图定位
366
- getCurLocation();
367
- curInterval = setInterval(getCurLocation, 1000 * 30); ////定时刷新定位信息
368
- } else if (device === 'qywx') {
369
- // 企业微信定位
370
- window.wx.getLocation({
371
- type: 'gcj02',
372
- // 默认为wgs84的gps坐标,如果要返回直接给openLocation用的火星坐标,可传入'gcj02'
373
- success: function success(resp) {
374
- getDis(resp.longitude, resp.latitude);
375
- getCurAddress(resp.longitude, resp.latitude);
376
-
377
- // var latitude = res.latitude; // 纬度,浮点数,范围为90 ~ -90
378
- // var longitude = res.longitude; // 经度,浮点数,范围为180 ~ -180。
379
- // var speed = res.speed; // 速度,以米/每秒计
380
- // var accuracy = res.accuracy; // 位置精度
381
- }
382
- });
383
- }
331
+ } else if (window.isOpenMapLocation === 1) {
332
+ //H5地图定位
333
+ var h5Position = function h5Position(e) {
334
+ if (this.getStatus() == 0) {
335
+ getDis(e.lnglat.lng, e.lnglat.lat);
336
+ getCurAddress(e.lnglat.lng, e.lnglat.lat);
337
+ resolve(true);
338
+ } else {
339
+ console.log('Geolocation getCurrentPosition status', lo.getStatus());
340
+ resolve(false);
341
+ $parent.dakaType = dakaType[0];
342
+ }
343
+ };
344
+ var lo = new T.Geolocation();
345
+ lo.getCurrentPosition(h5Position);
346
+ } else if (device === 'qywx') {
347
+ // 企业微信定位
348
+ window.wx.getLocation({
349
+ type: 'gcj02',
350
+ // 默认为wgs84的gps坐标,如果要返回直接给openLocation用的火星坐标,可传入'gcj02'
351
+ success: function success(resp) {
352
+ getDis(resp.longitude, resp.latitude);
353
+ getCurAddress(resp.longitude, resp.latitude);
354
+ resolve(true);
355
+ },
356
+ fail: function fail(error) {
357
+ resolve(false);
358
+ consloe.log('用户拒绝获取位置信息');
359
+ }
360
+ });
361
+ }
362
+ });
384
363
  }
385
364
  var defaultMethods = {
386
365
  /**
@@ -391,145 +370,126 @@ var defaultMethods = {
391
370
  $parent = $scope;
392
371
  loginUser = $scope.loginUser;
393
372
  }
394
- var today = new Date();
395
- var y = today.getFullYear();
396
- var m = today.getMonth();
397
- var d = today.getDate();
398
- var h = today.getHours();
399
- var mins = today.getMinutes();
400
- // const sec = today.getSeconds()
401
- occureDate = y + '-' + (m >= 9 ? m + 1 : '0' + (m + 1)) + '-' + (d > 9 ? d : '0' + d) + ' ' + (h > 9 ? h : '0' + h) + ':' + (mins > 9 ? mins : '0' + mins);
402
- tDate = y + '-' + (m >= 9 ? m + 1 : '0' + (m + 1)) + '-' + (d > 9 ? d : '0' + d);
403
- // 获取打卡时段
404
- $parent.$http({
405
- method: 'POST',
406
- url: 'ecykq/timeInterval/getDakaTime',
407
- headers: {
408
- 'Content-Type': 'application/x-www-form-urlencoded'
409
- },
410
- params: {
411
- account: loginUser.personAccount,
412
- occurredDate: tDate,
413
- orgCode: loginUser.orgCode
414
- }
415
- }).then(function (response) {
416
- if (response.code === 'success') {
417
- timeSpanData = JSON.parse(response.body.json);
418
- timeSpanData.dakaType = Number(timeSpanData.dakaType);
419
- // if (!this.isLoad) {
420
- // this.isLoad = true
421
- if (!timeSpanData.mobileSign || !timeSpanData.addressList || timeSpanData.addressList.length === 0) {
422
- $parent.dakaType = dakaType[0];
423
- return $parent.$toast.fail('移动打卡功能异常,请联系管理员开启或设置考勤位置信息!');
424
- }
425
- $parent.dakaType = dakaType[timeSpanData.dakaType];
426
- curLocationAndDis(); // 获取位置信息
427
-
428
- var nowtime = moment(new Date()).format('HH:mm');
429
- if (timeSpanData.timeInterval && (nowtime > timeSpanData.timeInterval.logonStart && nowtime < timeSpanData.timeInterval.logonEnd || nowtime === timeSpanData.timeInterval.logonStart || nowtime === timeSpanData.timeInterval.logonEnd)) {
430
- timeSpanData.timeInterval.showTime = timeSpanData.timeInterval.logonRecordTime ? timeSpanData.timeInterval.logonRecordTime : '未打卡';
431
- timeSpanData.timeInterval.showStatus = timeSpanData.timeInterval.logonRecordTime ? 1 : 3;
432
- } else if (timeSpanData.timeInterval && (nowtime > timeSpanData.timeInterval.logoffStart && nowtime < timeSpanData.timeInterval.logoffEnd || nowtime === timeSpanData.timeInterval.logoffStart || nowtime === timeSpanData.timeInterval.logoffEnd)) {
433
- timeSpanData.timeInterval.showTime = timeSpanData.timeInterval.logoffRecordTime ? timeSpanData.timeInterval.logoffRecordTime : '未打卡';
434
- timeSpanData.timeInterval.showStatus = timeSpanData.timeInterval.logoffRecordTime ? 1 : 3;
435
- } else if (timeSpanData.timeInterval && (nowtime > timeSpanData.timeInterval.logoffStart && nowtime > timeSpanData.timeInterval.logoffEnd || nowtime === timeSpanData.timeInterval.logoffStart || nowtime === timeSpanData.timeInterval.logoffEnd)) {
436
- timeSpanData.timeInterval.showTime = timeSpanData.timeInterval.logoffRecordTime ? timeSpanData.timeInterval.logoffRecordTime : '未打卡';
437
- timeSpanData.timeInterval.showStatus = timeSpanData.timeInterval.logoffRecordTime ? 1 : 3;
373
+ return new Promise(function (resolve) {
374
+ var today = new Date();
375
+ var y = today.getFullYear();
376
+ var m = today.getMonth();
377
+ var d = today.getDate();
378
+ var h = today.getHours();
379
+ var mins = today.getMinutes();
380
+ // const sec = today.getSeconds()
381
+ occureDate = y + '-' + (m >= 9 ? m + 1 : '0' + (m + 1)) + '-' + (d > 9 ? d : '0' + d) + ' ' + (h > 9 ? h : '0' + h) + ':' + (mins > 9 ? mins : '0' + mins);
382
+ tDate = y + '-' + (m >= 9 ? m + 1 : '0' + (m + 1)) + '-' + (d > 9 ? d : '0' + d);
383
+ // 获取打卡时段
384
+ $parent.$http({
385
+ method: 'POST',
386
+ url: 'ecykq/timeInterval/getDakaTime',
387
+ headers: {
388
+ 'Content-Type': 'application/x-www-form-urlencoded'
389
+ },
390
+ params: {
391
+ account: loginUser.personAccount,
392
+ occurredDate: tDate,
393
+ orgCode: loginUser.orgCode
394
+ }
395
+ }).then(function (response) {
396
+ if (response.code === 'success') {
397
+ timeSpanData = JSON.parse(response.body.json);
398
+ timeSpanData.dakaType = Number(timeSpanData.dakaType);
399
+ // if (!this.isLoad) {
400
+ // this.isLoad = true
401
+ if (!timeSpanData.mobileSign || !timeSpanData.addressList || timeSpanData.addressList.length === 0) {
402
+ $parent.dakaType = dakaType[0];
403
+ return $parent.$toast.fail('移动打卡功能异常,请联系管理员开启或设置考勤位置信息!');
404
+ }
405
+ $parent.dakaType = dakaType[timeSpanData.dakaType];
406
+ var nowtime = moment(new Date()).format('HH:mm');
407
+ if (timeSpanData.timeInterval && (nowtime > timeSpanData.timeInterval.logonStart && nowtime < timeSpanData.timeInterval.logonEnd || nowtime === timeSpanData.timeInterval.logonStart || nowtime === timeSpanData.timeInterval.logonEnd)) {
408
+ timeSpanData.timeInterval.showTime = timeSpanData.timeInterval.logonRecordTime ? timeSpanData.timeInterval.logonRecordTime : '未打卡';
409
+ timeSpanData.timeInterval.showStatus = timeSpanData.timeInterval.logonRecordTime ? 1 : 3;
410
+ } else if (timeSpanData.timeInterval && (nowtime > timeSpanData.timeInterval.logoffStart && nowtime < timeSpanData.timeInterval.logoffEnd || nowtime === timeSpanData.timeInterval.logoffStart || nowtime === timeSpanData.timeInterval.logoffEnd)) {
411
+ timeSpanData.timeInterval.showTime = timeSpanData.timeInterval.logoffRecordTime ? timeSpanData.timeInterval.logoffRecordTime : '未打卡';
412
+ timeSpanData.timeInterval.showStatus = timeSpanData.timeInterval.logoffRecordTime ? 1 : 3;
413
+ } else if (timeSpanData.timeInterval && (nowtime > timeSpanData.timeInterval.logoffStart && nowtime > timeSpanData.timeInterval.logoffEnd || nowtime === timeSpanData.timeInterval.logoffStart || nowtime === timeSpanData.timeInterval.logoffEnd)) {
414
+ timeSpanData.timeInterval.showTime = timeSpanData.timeInterval.logoffRecordTime ? timeSpanData.timeInterval.logoffRecordTime : '未打卡';
415
+ timeSpanData.timeInterval.showStatus = timeSpanData.timeInterval.logoffRecordTime ? 1 : 3;
416
+ } else {
417
+ timeSpanData.timeInterval = timeSpanData.timeInterval || {};
418
+ timeSpanData.timeInterval.showTime = nowtime;
419
+ timeSpanData.timeInterval.showStatus = 0;
420
+ }
421
+ $parent.timeInterval = timeSpanData.timeInterval;
422
+ $parent.$forceUpdate();
423
+
424
+ // 获取位置信息
425
+ curLocationAndDis().then(function (res) {
426
+ resolve(res);
427
+ });
438
428
  } else {
439
- timeSpanData.timeInterval = timeSpanData.timeInterval || {};
440
- timeSpanData.timeInterval.showTime = nowtime;
441
- timeSpanData.timeInterval.showStatus = 0;
429
+ $parent.$toast.fail(response.message);
442
430
  }
443
- $parent.timeInterval = timeSpanData.timeInterval;
444
- $parent.$forceUpdate();
445
- // }
446
- } else {
447
- $parent.$toast.fail(response.message);
448
- }
431
+ });
449
432
  });
450
433
  },
451
434
  // 打卡
452
435
  dkEvent: function dkEvent($scope) {
453
436
  var _this = this;
454
- return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
455
- var departmentId, departmentName;
456
- return _regeneratorRuntime().wrap(function _callee$(_context) {
457
- while (1) switch (_context.prev = _context.next) {
458
- case 0:
459
- $parent = $scope;
460
- _context.next = 3;
461
- return _this.freshData($scope);
462
- case 3:
463
- if (!(timeSpanData && timeSpanData.mobileSign !== 1)) {
464
- _context.next = 5;
465
- break;
466
- }
467
- return _context.abrupt("return");
468
- case 5:
469
- if (!(!dis || dis === 'undefined' || dis === null)) {
470
- _context.next = 7;
471
- break;
472
- }
473
- return _context.abrupt("return");
474
- case 7:
475
- if (!(dis && dis > gpsScope)) {
476
- _context.next = 9;
477
- break;
478
- }
479
- return _context.abrupt("return", $parent.$toast.fail('当前不在考勤范围内'));
480
- case 9:
481
- departmentId = loginUser.staffList[0].orgFullId.split('-');
482
- departmentName = loginUser.staffList[0].orgFullName.split('-');
483
- departmentId = departmentId[departmentId.length - 1];
484
- departmentName = departmentName[departmentName.length - 1];
485
- if (!canDk) {
486
- _context.next = 17;
487
- break;
488
- }
489
- canDk = false;
490
- _context.next = 18;
491
- break;
492
- case 17:
493
- return _context.abrupt("return");
494
- case 18:
495
- setTimeout(function () {
496
- canDk = true;
497
- }, 800);
498
- $parent.$http({
499
- url: 'ecykq/recordDetail/saveMobileDakaDetail',
500
- method: 'POST',
501
- data: {
502
- account: loginUser.personAccount,
503
- departmentId: departmentId,
504
- departmentName: departmentName,
505
- name: loginUser.personName,
506
- occureDate: occureDate,
507
- orgCode: loginUser.orgCode,
508
- orgName: loginUser.orgName,
509
- personSchId: timeSpanData.personSchId,
510
- timeId: timeSpanData.timeInterval.id,
511
- unitAddress: curAddress
512
- }
513
- }).then(function (response) {
514
- if (response.code === 'success') {
515
- _this.freshData();
516
- if (parseInt(timeSpanData.dakaType) === 1 || parseInt(timeSpanData.dakaType) === 2) {
517
- $parent.$toast('打卡成功!');
518
- } else if (parseInt(timeSpanData.dakaType) === 3) {
519
- $parent.$toast('更新打卡成功!');
520
- }
521
- } else {
522
- $parent.$toast.fail(response.message);
523
- }
524
- }, function (err) {
525
- $parent.$toast.fail(err);
526
- });
527
- case 20:
528
- case "end":
529
- return _context.stop();
437
+ $parent = $scope;
438
+
439
+ // 刷新一次数据
440
+ this.freshData($scope).then(function (res) {
441
+ if (timeSpanData && timeSpanData.mobileSign !== 1) {
442
+ return;
443
+ }
444
+ if (!dis || dis === 'undefined' || dis === null) {
445
+ return;
446
+ }
447
+ if (dis && dis > gpsScope) {
448
+ $parent.dakaType = dakaType[0];
449
+ return $parent.$toast.fail('当前地点不在考勤打卡范围内');
450
+ }
451
+ var departmentId = loginUser.staffList[0].orgFullId.split('-');
452
+ var departmentName = loginUser.staffList[0].orgFullName.split('-');
453
+ departmentId = departmentId[departmentId.length - 1];
454
+ departmentName = departmentName[departmentName.length - 1];
455
+ if (canDk) {
456
+ canDk = false;
457
+ } else {
458
+ return;
459
+ }
460
+ setTimeout(function () {
461
+ canDk = true;
462
+ }, 800);
463
+ $parent.$http({
464
+ url: 'ecykq/recordDetail/saveMobileDakaDetail',
465
+ method: 'POST',
466
+ data: {
467
+ account: loginUser.personAccount,
468
+ departmentId: departmentId,
469
+ departmentName: departmentName,
470
+ name: loginUser.personName,
471
+ occureDate: occureDate,
472
+ orgCode: loginUser.orgCode,
473
+ orgName: loginUser.orgName,
474
+ personSchId: timeSpanData.personSchId,
475
+ timeId: timeSpanData.timeInterval.id,
476
+ unitAddress: curAddress
530
477
  }
531
- }, _callee);
532
- }))();
478
+ }).then(function (response) {
479
+ if (response.code === 'success') {
480
+ _this.freshData();
481
+ if (parseInt(timeSpanData.dakaType) === 1 || parseInt(timeSpanData.dakaType) === 2) {
482
+ $parent.$toast('打卡成功!');
483
+ } else if (parseInt(timeSpanData.dakaType) === 3) {
484
+ $parent.$toast('更新打卡成功!');
485
+ }
486
+ } else {
487
+ $parent.$toast.fail(response.message);
488
+ }
489
+ }, function (err) {
490
+ $parent.$toast.fail(err);
491
+ });
492
+ });
533
493
  }
534
494
  };
535
495
  /* harmony default export */ __webpack_exports__["default"] = (defaultMethods);
@@ -620,7 +580,7 @@ ___CSS_LOADER_EXPORT___.push([module.id, ".no-data[data-v-ef203e2e]{display:-web
620
580
 
621
581
  /***/ }),
622
582
 
623
- /***/ 5470:
583
+ /***/ 9706:
624
584
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
625
585
 
626
586
  "use strict";
@@ -639,7 +599,7 @@ var ___CSS_LOADER_URL_IMPORT_0___ = new URL(/* asset import */ __webpack_require
639
599
  var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()((_node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default()));
640
600
  var ___CSS_LOADER_URL_REPLACEMENT_0___ = _node_modules_css_loader_dist_runtime_getUrl_js__WEBPACK_IMPORTED_MODULE_2___default()(___CSS_LOADER_URL_IMPORT_0___);
641
601
  // Module
642
- ___CSS_LOADER_EXPORT___.push([module.id, "[data-v-6c6c5bb3] .van-ellipsis{font-size:18px;color:#fff}[data-v-6c6c5bb3] .van-dropdown-menu__title{color:#fff!important;padding:0 8px 0 0!important}[data-v-6c6c5bb3] .van-dropdown-menu .van-dropdown-menu__bar .van-dropdown-menu__title--active{color:#fff!important}[data-v-6c6c5bb3] .van-dropdown-menu__title:after{border-color:transparent transparent #fff #fff!important;right:0}[data-v-6c6c5bb3] .van-dropdown-menu__bar{background-color:unset!important;-webkit-box-shadow:unset!important;box-shadow:unset!important}[data-v-6c6c5bb3] .van-dropdown-menu__item{-webkit-box-pack:left;-ms-flex-pack:left;justify-content:left}[data-v-6c6c5bb3] .chat_icon .van-info{top:5px!important;right:-4px!important}.work_pageHeader[data-v-6c6c5bb3]{background:url(" + ___CSS_LOADER_URL_REPLACEMENT_0___ + ");padding:0 16px;height:123px;font-size:16px;color:#fff;background-repeat:no-repeat;background-size:cover;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;overflow:hidden;-webkit-box-sizing:border-box;box-sizing:border-box;-webkit-transition:height .3s;transition:height .3s}.work_pageHeader[data-v-6c6c5bb3],.work_pageHeader .flex-horizon-bw[data-v-6c6c5bb3]{display:-webkit-box;display:-ms-flexbox;display:flex;width:100%}.work_pageHeader .flex-horizon-bw[data-v-6c6c5bb3]{-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}.work_pageHeader .pageHeader_compony[data-v-6c6c5bb3]{font-size:18px;font-weight:500;color:#fff;-webkit-box-flex:1;-ms-flex:1;flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin-right:10px;height:48px;line-height:48px}.work_pageHeader .pageHeader_name[data-v-6c6c5bb3]{font-size:14px;margin-left:8px}.work_pageHeader .pageHeader_check_work[data-v-6c6c5bb3]{width:122px;border-radius:15px;background:hsla(0,0%,100%,.8);padding:7px 10px;display:-webkit-box;display:-ms-flexbox;display:flex;color:#333;font-size:12px}.work_pageHeader .pageHeader_timer[data-v-6c6c5bb3]{-webkit-box-flex:1;-ms-flex:1;flex:1;text-align:right;color:#fff;font-size:14px;line-height:30px;margin-right:16px}.work_pageHeader .more_compony[data-v-6c6c5bb3]{position:relative;-webkit-transform:rotate(90deg);transform:rotate(90deg);font-size:10px;margin-left:6px}.check_time[data-v-6c6c5bb3]{-webkit-box-flex:1;-ms-flex:1;flex:1;border-right:1px solid #999;text-align:left;font-size:13px;color:#333;position:relative;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.check_time img[data-v-6c6c5bb3]{width:14px;height:14px}.check_time span[data-v-6c6c5bb3]{margin-left:5px}.check_button[data-v-6c6c5bb3]{-webkit-box-flex:1;-ms-flex:1;flex:1;text-align:right;line-height:18px}", ""]);
602
+ ___CSS_LOADER_EXPORT___.push([module.id, "[data-v-4100a0b0] .van-ellipsis{font-size:18px;color:#fff}[data-v-4100a0b0] .van-dropdown-menu__title{color:#fff!important;padding:0 8px 0 0!important}[data-v-4100a0b0] .van-dropdown-menu .van-dropdown-menu__bar .van-dropdown-menu__title--active{color:#fff!important}[data-v-4100a0b0] .van-dropdown-menu__title:after{border-color:transparent transparent #fff #fff!important;right:0}[data-v-4100a0b0] .van-dropdown-menu__bar{background-color:unset!important;-webkit-box-shadow:unset!important;box-shadow:unset!important}[data-v-4100a0b0] .van-dropdown-menu__item{-webkit-box-pack:left;-ms-flex-pack:left;justify-content:left}[data-v-4100a0b0] .chat_icon .van-info{top:5px!important;right:-4px!important}.work_pageHeader[data-v-4100a0b0]{background:url(" + ___CSS_LOADER_URL_REPLACEMENT_0___ + ");padding:0 16px;height:123px;font-size:16px;color:#fff;background-repeat:no-repeat;background-size:cover;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;overflow:hidden;-webkit-box-sizing:border-box;box-sizing:border-box;-webkit-transition:height .3s;transition:height .3s}.work_pageHeader[data-v-4100a0b0],.work_pageHeader .flex-horizon-bw[data-v-4100a0b0]{display:-webkit-box;display:-ms-flexbox;display:flex;width:100%}.work_pageHeader .flex-horizon-bw[data-v-4100a0b0]{-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}.work_pageHeader .pageHeader_compony[data-v-4100a0b0]{font-size:18px;font-weight:500;color:#fff;-webkit-box-flex:1;-ms-flex:1;flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin-right:10px;height:48px;line-height:48px}.work_pageHeader .pageHeader_name[data-v-4100a0b0]{font-size:14px;margin-left:8px}.work_pageHeader .pageHeader_check_work[data-v-4100a0b0]{width:122px;border-radius:15px;background:hsla(0,0%,100%,.8);padding:7px 10px;display:-webkit-box;display:-ms-flexbox;display:flex;color:#333;font-size:12px}.work_pageHeader .pageHeader_timer[data-v-4100a0b0]{-webkit-box-flex:1;-ms-flex:1;flex:1;text-align:right;color:#fff;font-size:14px;line-height:30px;margin-right:16px}.work_pageHeader .more_compony[data-v-4100a0b0]{position:relative;-webkit-transform:rotate(90deg);transform:rotate(90deg);font-size:10px;margin-left:6px}.check_time[data-v-4100a0b0]{-webkit-box-flex:1;-ms-flex:1;flex:1;border-right:1px solid #999;text-align:left;font-size:13px;color:#333;position:relative;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.check_time img[data-v-4100a0b0]{width:14px;height:14px}.check_time span[data-v-4100a0b0]{margin-left:5px}.check_button[data-v-4100a0b0]{-webkit-box-flex:1;-ms-flex:1;flex:1;text-align:right;line-height:18px}", ""]);
643
603
  // Exports
644
604
  /* harmony default export */ __webpack_exports__["default"] = (___CSS_LOADER_EXPORT___);
645
605
 
@@ -22667,19 +22627,19 @@ var update = add("b0496ae0", content, true, {"sourceMap":false,"shadowMode":fals
22667
22627
 
22668
22628
  /***/ }),
22669
22629
 
22670
- /***/ 6244:
22630
+ /***/ 8392:
22671
22631
  /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
22672
22632
 
22673
22633
  // style-loader: Adds some css to the DOM by adding a <style> tag
22674
22634
 
22675
22635
  // load the styles
22676
- var content = __webpack_require__(5470);
22636
+ var content = __webpack_require__(9706);
22677
22637
  if(content.__esModule) content = content.default;
22678
22638
  if(typeof content === 'string') content = [[module.id, content, '']];
22679
22639
  if(content.locals) module.exports = content.locals;
22680
22640
  // add the styles to the DOM
22681
22641
  var add = (__webpack_require__(9548)/* ["default"] */ .A)
22682
- var update = add("9a4c44b8", content, true, {"sourceMap":false,"shadowMode":false});
22642
+ var update = add("6d8dee66", content, true, {"sourceMap":false,"shadowMode":false});
22683
22643
 
22684
22644
  /***/ }),
22685
22645
 
@@ -27698,8 +27658,8 @@ var commonApps_component = normalizeComponent(
27698
27658
  )
27699
27659
 
27700
27660
  /* harmony default export */ var commonApps = (commonApps_component.exports);
27701
- ;// CONCATENATED MODULE: ./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[0]!./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./packages/ecmoa/desktop/src/components/workHead.vue?vue&type=template&id=6c6c5bb3&scoped=true
27702
- var workHeadvue_type_template_id_6c6c5bb3_scoped_true_render = function render() {
27661
+ ;// CONCATENATED MODULE: ./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[0]!./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./packages/ecmoa/desktop/src/components/workHead.vue?vue&type=template&id=4100a0b0&scoped=true
27662
+ var workHeadvue_type_template_id_4100a0b0_scoped_true_render = function render() {
27703
27663
  var _vm = this,
27704
27664
  _c = _vm._self._c;
27705
27665
  return _c('div', {
@@ -27823,7 +27783,7 @@ var workHeadvue_type_template_id_6c6c5bb3_scoped_true_render = function render()
27823
27783
  staticClass: "pageHeader_timer"
27824
27784
  }, [_c('span', [_vm._v(_vm._s(_vm.nowDay))])])])]);
27825
27785
  };
27826
- var workHeadvue_type_template_id_6c6c5bb3_scoped_true_staticRenderFns = [];
27786
+ var workHeadvue_type_template_id_4100a0b0_scoped_true_staticRenderFns = [];
27827
27787
 
27828
27788
  ;// CONCATENATED MODULE: ./node_modules/vuex/dist/vuex.esm.js
27829
27789
  /*!
@@ -29014,11 +28974,15 @@ var workClock = __webpack_require__(2396);
29014
28974
  organName: '',
29015
28975
  nowDay: '',
29016
28976
  orgCode: '',
29017
- dakaType: '',
28977
+ dakaType: '不可打卡',
29018
28978
  ecykqPath: '',
29019
28979
  canClockIn: false,
29020
28980
  boxHeight: 123,
29021
- timeInterval: {} // 签到校验信息
28981
+ timeInterval: {},
28982
+ // 签到校验信息
28983
+ timer: '',
28984
+ //时钟定时器
28985
+ curInterval: '' // 勤数据更新定时器
29022
28986
  };
29023
28987
  },
29024
28988
  computed: _objectSpread({}, mapGetters({
@@ -29044,6 +29008,8 @@ var workClock = __webpack_require__(2396);
29044
29008
  this.getBgImg();
29045
29009
  },
29046
29010
  beforeDestroy: function beforeDestroy() {
29011
+ if (this.timer) clearInterval(this.timer);
29012
+ if (this.curInterval) clearInterval(this.curInterval);
29047
29013
  this.$bus.off('reduceHeadHeight', this.reduceHeadHeight);
29048
29014
  },
29049
29015
  mounted: function mounted() {
@@ -29051,9 +29017,9 @@ var workClock = __webpack_require__(2396);
29051
29017
  this.loadH5apps();
29052
29018
  this.formatNowDay();
29053
29019
  this.getTime();
29054
- setInterval(function () {
29020
+ this.timer = setInterval(function () {
29055
29021
  _this2.getTime();
29056
- }, 1000 * 60);
29022
+ }, 1000 * 2);
29057
29023
  },
29058
29024
  methods: {
29059
29025
  scan: function scan() {
@@ -29120,7 +29086,7 @@ var workClock = __webpack_require__(2396);
29120
29086
  productCode = window.productCode;
29121
29087
  }
29122
29088
  url = "/apigw" + '/mpp/image/download?nameField=fileName&dataField=image&id=' + res.body.listdata[0].id + '&httpPort=' + location.port + '&productCode=' + productCode;
29123
- document.querySelector('.work_pageHeader').style.background = "url(".concat(url, ")");
29089
+ document.querySelector('.work_pageHeader').style.background = 'url(' + url + ')';
29124
29090
  document.querySelector('.work_pageHeader').style.backgroundSize = 'cover';
29125
29091
  document.querySelector('.work_pageHeader').style.backgroundRepeat = 'no-repeat';
29126
29092
  }
@@ -29203,6 +29169,13 @@ var workClock = __webpack_require__(2396);
29203
29169
  } else if (workClock.default) {
29204
29170
  workClock.default.freshData(_this5);
29205
29171
  }
29172
+ _this5.curInterval = setInterval(function () {
29173
+ if (workClock.freshData) {
29174
+ workClock.freshData(_this5);
29175
+ } else if (workClock.default) {
29176
+ workClock.default.freshData(_this5);
29177
+ }
29178
+ }, 1000 * 60);
29206
29179
  });
29207
29180
  }
29208
29181
  }
@@ -29294,9 +29267,9 @@ var workClock = __webpack_require__(2396);
29294
29267
  });
29295
29268
  ;// CONCATENATED MODULE: ./packages/ecmoa/desktop/src/components/workHead.vue?vue&type=script&lang=js
29296
29269
  /* harmony default export */ var components_workHeadvue_type_script_lang_js = (workHeadvue_type_script_lang_js);
29297
- // EXTERNAL MODULE: ./node_modules/vue-style-loader/index.js??clonedRuleSet-22.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-22.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-22.use[2]!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-22.use[3]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-22.use[4]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./packages/ecmoa/desktop/src/components/workHead.vue?vue&type=style&index=0&id=6c6c5bb3&prod&scoped=true&lang=scss
29298
- var workHeadvue_type_style_index_0_id_6c6c5bb3_prod_scoped_true_lang_scss = __webpack_require__(6244);
29299
- ;// CONCATENATED MODULE: ./packages/ecmoa/desktop/src/components/workHead.vue?vue&type=style&index=0&id=6c6c5bb3&prod&scoped=true&lang=scss
29270
+ // EXTERNAL MODULE: ./node_modules/vue-style-loader/index.js??clonedRuleSet-22.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-22.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-22.use[2]!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-22.use[3]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-22.use[4]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./packages/ecmoa/desktop/src/components/workHead.vue?vue&type=style&index=0&id=4100a0b0&prod&scoped=true&lang=scss
29271
+ var workHeadvue_type_style_index_0_id_4100a0b0_prod_scoped_true_lang_scss = __webpack_require__(8392);
29272
+ ;// CONCATENATED MODULE: ./packages/ecmoa/desktop/src/components/workHead.vue?vue&type=style&index=0&id=4100a0b0&prod&scoped=true&lang=scss
29300
29273
 
29301
29274
  ;// CONCATENATED MODULE: ./packages/ecmoa/desktop/src/components/workHead.vue
29302
29275
 
@@ -29309,11 +29282,11 @@ var workHeadvue_type_style_index_0_id_6c6c5bb3_prod_scoped_true_lang_scss = __we
29309
29282
 
29310
29283
  var workHead_component = normalizeComponent(
29311
29284
  components_workHeadvue_type_script_lang_js,
29312
- workHeadvue_type_template_id_6c6c5bb3_scoped_true_render,
29313
- workHeadvue_type_template_id_6c6c5bb3_scoped_true_staticRenderFns,
29285
+ workHeadvue_type_template_id_4100a0b0_scoped_true_render,
29286
+ workHeadvue_type_template_id_4100a0b0_scoped_true_staticRenderFns,
29314
29287
  false,
29315
29288
  null,
29316
- "6c6c5bb3",
29289
+ "4100a0b0",
29317
29290
  null
29318
29291
 
29319
29292
  )