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.
@@ -251,13 +251,8 @@ module.exports = {
251
251
  __webpack_require__.r(__webpack_exports__);
252
252
  /* harmony import */ var js_cookie__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2215);
253
253
  /* harmony import */ var js_cookie__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(js_cookie__WEBPACK_IMPORTED_MODULE_0__);
254
- 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); }
255
- 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; }
256
- 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); }
257
- 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); }); }; }
258
254
 
259
255
  var $parent = '';
260
- var curInterval = null; // 定时任务
261
256
  var timeSpanData = null; // 考勤时段
262
257
  var p1 = null; // 打卡位置经纬度
263
258
  var gpsScope = null;
@@ -325,72 +320,56 @@ function getCurAddress(lng, lat) {
325
320
  });
326
321
  }
327
322
 
328
- /**
329
- *地图定位 获取当前位置
330
- */
331
- function getCurLocation() {
332
- function h5Position(e) {
333
- if (this.getStatus() == 0) {
334
- getDis(e.lnglat.lng, e.lnglat.lat);
335
- getCurAddress(e.lnglat.lng, e.lnglat.lat);
336
- } else {
337
- console.log('Geolocation getCurrentPosition status', lo.getStatus());
338
- $parent.dakaType = dakaType[0];
339
- }
340
- }
341
- var lo = new T.Geolocation();
342
- lo.getCurrentPosition(h5Position);
343
- }
344
323
  // 定位
345
324
  function curLocationAndDis() {
346
325
  var device = js_cookie__WEBPACK_IMPORTED_MODULE_0___default().get('device');
347
- if (curInterval) {
348
- clearInterval(curInterval);
349
- }
350
- if (window.mappType === 'ecinc') {
351
- //APP定位
352
- $parent.$wv.getLocationInformation(function (res) {
353
- if (typeof res === 'string') res = JSON.parse(res);
354
- if (res && res.data) {
355
- getDis(Number(res.data.longitude), Number(res.data.latitude));
356
- getCurAddress(Number(res.data.longitude), Number(res.data.latitude));
357
- } else {
358
- console.log('$wv getCurrentPosition res =', res);
359
- $parent.dakaType = dakaType[0];
360
- }
361
- });
362
- curInterval = setInterval(function () {
326
+ return new Promise(function (resolve) {
327
+ if (window.mappType === 'ecinc') {
328
+ //APP定位
363
329
  $parent.$wv.getLocationInformation(function (res) {
364
330
  if (typeof res === 'string') res = JSON.parse(res);
365
331
  if (res && res.data) {
366
332
  getDis(Number(res.data.longitude), Number(res.data.latitude));
367
333
  getCurAddress(Number(res.data.longitude), Number(res.data.latitude));
334
+ resolve(true);
368
335
  } else {
369
336
  console.log('$wv getCurrentPosition res =', res);
337
+ resolve(false);
370
338
  $parent.dakaType = dakaType[0];
371
339
  }
372
340
  });
373
- }, 1000 * 30);
374
- } else if (window.isOpenMapLocation === 1) {
375
- // H5地图定位
376
- getCurLocation();
377
- curInterval = setInterval(getCurLocation, 1000 * 30); ////定时刷新定位信息
378
- } else if (device === 'qywx') {
379
- // 企业微信定位
380
- window.wx.getLocation({
381
- type: 'gcj02',
382
- // 默认为wgs84的gps坐标,如果要返回直接给openLocation用的火星坐标,可传入'gcj02'
383
- success: function success(resp) {
384
- getDis(resp.longitude, resp.latitude);
385
- getCurAddress(resp.longitude, resp.latitude);
386
-
387
- // var latitude = res.latitude; // 纬度,浮点数,范围为90 ~ -90
388
- // var longitude = res.longitude; // 经度,浮点数,范围为180 ~ -180。
389
- // var speed = res.speed; // 速度,以米/每秒计
390
- // var accuracy = res.accuracy; // 位置精度
391
- }
392
- });
393
- }
341
+ } else if (window.isOpenMapLocation === 1) {
342
+ //H5地图定位
343
+ var h5Position = function h5Position(e) {
344
+ if (this.getStatus() == 0) {
345
+ getDis(e.lnglat.lng, e.lnglat.lat);
346
+ getCurAddress(e.lnglat.lng, e.lnglat.lat);
347
+ resolve(true);
348
+ } else {
349
+ console.log('Geolocation getCurrentPosition status', lo.getStatus());
350
+ resolve(false);
351
+ $parent.dakaType = dakaType[0];
352
+ }
353
+ };
354
+ var lo = new T.Geolocation();
355
+ lo.getCurrentPosition(h5Position);
356
+ } else if (device === 'qywx') {
357
+ // 企业微信定位
358
+ window.wx.getLocation({
359
+ type: 'gcj02',
360
+ // 默认为wgs84的gps坐标,如果要返回直接给openLocation用的火星坐标,可传入'gcj02'
361
+ success: function success(resp) {
362
+ getDis(resp.longitude, resp.latitude);
363
+ getCurAddress(resp.longitude, resp.latitude);
364
+ resolve(true);
365
+ },
366
+ fail: function fail(error) {
367
+ resolve(false);
368
+ consloe.log('用户拒绝获取位置信息');
369
+ }
370
+ });
371
+ }
372
+ });
394
373
  }
395
374
  var defaultMethods = {
396
375
  /**
@@ -401,145 +380,126 @@ var defaultMethods = {
401
380
  $parent = $scope;
402
381
  loginUser = $scope.loginUser;
403
382
  }
404
- var today = new Date();
405
- var y = today.getFullYear();
406
- var m = today.getMonth();
407
- var d = today.getDate();
408
- var h = today.getHours();
409
- var mins = today.getMinutes();
410
- // const sec = today.getSeconds()
411
- occureDate = y + '-' + (m >= 9 ? m + 1 : '0' + (m + 1)) + '-' + (d > 9 ? d : '0' + d) + ' ' + (h > 9 ? h : '0' + h) + ':' + (mins > 9 ? mins : '0' + mins);
412
- tDate = y + '-' + (m >= 9 ? m + 1 : '0' + (m + 1)) + '-' + (d > 9 ? d : '0' + d);
413
- // 获取打卡时段
414
- $parent.$http({
415
- method: 'POST',
416
- url: 'ecykq/timeInterval/getDakaTime',
417
- headers: {
418
- 'Content-Type': 'application/x-www-form-urlencoded'
419
- },
420
- params: {
421
- account: loginUser.personAccount,
422
- occurredDate: tDate,
423
- orgCode: loginUser.orgCode
424
- }
425
- }).then(function (response) {
426
- if (response.code === 'success') {
427
- timeSpanData = JSON.parse(response.body.json);
428
- timeSpanData.dakaType = Number(timeSpanData.dakaType);
429
- // if (!this.isLoad) {
430
- // this.isLoad = true
431
- if (!timeSpanData.mobileSign || !timeSpanData.addressList || timeSpanData.addressList.length === 0) {
432
- $parent.dakaType = dakaType[0];
433
- return $parent.$toast.fail('移动打卡功能异常,请联系管理员开启或设置考勤位置信息!');
434
- }
435
- $parent.dakaType = dakaType[timeSpanData.dakaType];
436
- curLocationAndDis(); // 获取位置信息
437
-
438
- var nowtime = moment(new Date()).format('HH:mm');
439
- if (timeSpanData.timeInterval && (nowtime > timeSpanData.timeInterval.logonStart && nowtime < timeSpanData.timeInterval.logonEnd || nowtime === timeSpanData.timeInterval.logonStart || nowtime === timeSpanData.timeInterval.logonEnd)) {
440
- timeSpanData.timeInterval.showTime = timeSpanData.timeInterval.logonRecordTime ? timeSpanData.timeInterval.logonRecordTime : '未打卡';
441
- timeSpanData.timeInterval.showStatus = timeSpanData.timeInterval.logonRecordTime ? 1 : 3;
442
- } else if (timeSpanData.timeInterval && (nowtime > timeSpanData.timeInterval.logoffStart && nowtime < timeSpanData.timeInterval.logoffEnd || nowtime === timeSpanData.timeInterval.logoffStart || nowtime === timeSpanData.timeInterval.logoffEnd)) {
443
- timeSpanData.timeInterval.showTime = timeSpanData.timeInterval.logoffRecordTime ? timeSpanData.timeInterval.logoffRecordTime : '未打卡';
444
- timeSpanData.timeInterval.showStatus = timeSpanData.timeInterval.logoffRecordTime ? 1 : 3;
445
- } else if (timeSpanData.timeInterval && (nowtime > timeSpanData.timeInterval.logoffStart && nowtime > timeSpanData.timeInterval.logoffEnd || nowtime === timeSpanData.timeInterval.logoffStart || nowtime === timeSpanData.timeInterval.logoffEnd)) {
446
- timeSpanData.timeInterval.showTime = timeSpanData.timeInterval.logoffRecordTime ? timeSpanData.timeInterval.logoffRecordTime : '未打卡';
447
- timeSpanData.timeInterval.showStatus = timeSpanData.timeInterval.logoffRecordTime ? 1 : 3;
383
+ return new Promise(function (resolve) {
384
+ var today = new Date();
385
+ var y = today.getFullYear();
386
+ var m = today.getMonth();
387
+ var d = today.getDate();
388
+ var h = today.getHours();
389
+ var mins = today.getMinutes();
390
+ // const sec = today.getSeconds()
391
+ occureDate = y + '-' + (m >= 9 ? m + 1 : '0' + (m + 1)) + '-' + (d > 9 ? d : '0' + d) + ' ' + (h > 9 ? h : '0' + h) + ':' + (mins > 9 ? mins : '0' + mins);
392
+ tDate = y + '-' + (m >= 9 ? m + 1 : '0' + (m + 1)) + '-' + (d > 9 ? d : '0' + d);
393
+ // 获取打卡时段
394
+ $parent.$http({
395
+ method: 'POST',
396
+ url: 'ecykq/timeInterval/getDakaTime',
397
+ headers: {
398
+ 'Content-Type': 'application/x-www-form-urlencoded'
399
+ },
400
+ params: {
401
+ account: loginUser.personAccount,
402
+ occurredDate: tDate,
403
+ orgCode: loginUser.orgCode
404
+ }
405
+ }).then(function (response) {
406
+ if (response.code === 'success') {
407
+ timeSpanData = JSON.parse(response.body.json);
408
+ timeSpanData.dakaType = Number(timeSpanData.dakaType);
409
+ // if (!this.isLoad) {
410
+ // this.isLoad = true
411
+ if (!timeSpanData.mobileSign || !timeSpanData.addressList || timeSpanData.addressList.length === 0) {
412
+ $parent.dakaType = dakaType[0];
413
+ return $parent.$toast.fail('移动打卡功能异常,请联系管理员开启或设置考勤位置信息!');
414
+ }
415
+ $parent.dakaType = dakaType[timeSpanData.dakaType];
416
+ var nowtime = moment(new Date()).format('HH:mm');
417
+ if (timeSpanData.timeInterval && (nowtime > timeSpanData.timeInterval.logonStart && nowtime < timeSpanData.timeInterval.logonEnd || nowtime === timeSpanData.timeInterval.logonStart || nowtime === timeSpanData.timeInterval.logonEnd)) {
418
+ timeSpanData.timeInterval.showTime = timeSpanData.timeInterval.logonRecordTime ? timeSpanData.timeInterval.logonRecordTime : '未打卡';
419
+ timeSpanData.timeInterval.showStatus = timeSpanData.timeInterval.logonRecordTime ? 1 : 3;
420
+ } else if (timeSpanData.timeInterval && (nowtime > timeSpanData.timeInterval.logoffStart && nowtime < timeSpanData.timeInterval.logoffEnd || nowtime === timeSpanData.timeInterval.logoffStart || nowtime === timeSpanData.timeInterval.logoffEnd)) {
421
+ timeSpanData.timeInterval.showTime = timeSpanData.timeInterval.logoffRecordTime ? timeSpanData.timeInterval.logoffRecordTime : '未打卡';
422
+ timeSpanData.timeInterval.showStatus = timeSpanData.timeInterval.logoffRecordTime ? 1 : 3;
423
+ } else if (timeSpanData.timeInterval && (nowtime > timeSpanData.timeInterval.logoffStart && nowtime > timeSpanData.timeInterval.logoffEnd || nowtime === timeSpanData.timeInterval.logoffStart || nowtime === timeSpanData.timeInterval.logoffEnd)) {
424
+ timeSpanData.timeInterval.showTime = timeSpanData.timeInterval.logoffRecordTime ? timeSpanData.timeInterval.logoffRecordTime : '未打卡';
425
+ timeSpanData.timeInterval.showStatus = timeSpanData.timeInterval.logoffRecordTime ? 1 : 3;
426
+ } else {
427
+ timeSpanData.timeInterval = timeSpanData.timeInterval || {};
428
+ timeSpanData.timeInterval.showTime = nowtime;
429
+ timeSpanData.timeInterval.showStatus = 0;
430
+ }
431
+ $parent.timeInterval = timeSpanData.timeInterval;
432
+ $parent.$forceUpdate();
433
+
434
+ // 获取位置信息
435
+ curLocationAndDis().then(function (res) {
436
+ resolve(res);
437
+ });
448
438
  } else {
449
- timeSpanData.timeInterval = timeSpanData.timeInterval || {};
450
- timeSpanData.timeInterval.showTime = nowtime;
451
- timeSpanData.timeInterval.showStatus = 0;
439
+ $parent.$toast.fail(response.message);
452
440
  }
453
- $parent.timeInterval = timeSpanData.timeInterval;
454
- $parent.$forceUpdate();
455
- // }
456
- } else {
457
- $parent.$toast.fail(response.message);
458
- }
441
+ });
459
442
  });
460
443
  },
461
444
  // 打卡
462
445
  dkEvent: function dkEvent($scope) {
463
446
  var _this = this;
464
- return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
465
- var departmentId, departmentName;
466
- return _regeneratorRuntime().wrap(function _callee$(_context) {
467
- while (1) switch (_context.prev = _context.next) {
468
- case 0:
469
- $parent = $scope;
470
- _context.next = 3;
471
- return _this.freshData($scope);
472
- case 3:
473
- if (!(timeSpanData && timeSpanData.mobileSign !== 1)) {
474
- _context.next = 5;
475
- break;
476
- }
477
- return _context.abrupt("return");
478
- case 5:
479
- if (!(!dis || dis === 'undefined' || dis === null)) {
480
- _context.next = 7;
481
- break;
482
- }
483
- return _context.abrupt("return");
484
- case 7:
485
- if (!(dis && dis > gpsScope)) {
486
- _context.next = 9;
487
- break;
488
- }
489
- return _context.abrupt("return", $parent.$toast.fail('当前不在考勤范围内'));
490
- case 9:
491
- departmentId = loginUser.staffList[0].orgFullId.split('-');
492
- departmentName = loginUser.staffList[0].orgFullName.split('-');
493
- departmentId = departmentId[departmentId.length - 1];
494
- departmentName = departmentName[departmentName.length - 1];
495
- if (!canDk) {
496
- _context.next = 17;
497
- break;
498
- }
499
- canDk = false;
500
- _context.next = 18;
501
- break;
502
- case 17:
503
- return _context.abrupt("return");
504
- case 18:
505
- setTimeout(function () {
506
- canDk = true;
507
- }, 800);
508
- $parent.$http({
509
- url: 'ecykq/recordDetail/saveMobileDakaDetail',
510
- method: 'POST',
511
- data: {
512
- account: loginUser.personAccount,
513
- departmentId: departmentId,
514
- departmentName: departmentName,
515
- name: loginUser.personName,
516
- occureDate: occureDate,
517
- orgCode: loginUser.orgCode,
518
- orgName: loginUser.orgName,
519
- personSchId: timeSpanData.personSchId,
520
- timeId: timeSpanData.timeInterval.id,
521
- unitAddress: curAddress
522
- }
523
- }).then(function (response) {
524
- if (response.code === 'success') {
525
- _this.freshData();
526
- if (parseInt(timeSpanData.dakaType) === 1 || parseInt(timeSpanData.dakaType) === 2) {
527
- $parent.$toast('打卡成功!');
528
- } else if (parseInt(timeSpanData.dakaType) === 3) {
529
- $parent.$toast('更新打卡成功!');
530
- }
531
- } else {
532
- $parent.$toast.fail(response.message);
533
- }
534
- }, function (err) {
535
- $parent.$toast.fail(err);
536
- });
537
- case 20:
538
- case "end":
539
- return _context.stop();
447
+ $parent = $scope;
448
+
449
+ // 刷新一次数据
450
+ this.freshData($scope).then(function (res) {
451
+ if (timeSpanData && timeSpanData.mobileSign !== 1) {
452
+ return;
453
+ }
454
+ if (!dis || dis === 'undefined' || dis === null) {
455
+ return;
456
+ }
457
+ if (dis && dis > gpsScope) {
458
+ $parent.dakaType = dakaType[0];
459
+ return $parent.$toast.fail('当前地点不在考勤打卡范围内');
460
+ }
461
+ var departmentId = loginUser.staffList[0].orgFullId.split('-');
462
+ var departmentName = loginUser.staffList[0].orgFullName.split('-');
463
+ departmentId = departmentId[departmentId.length - 1];
464
+ departmentName = departmentName[departmentName.length - 1];
465
+ if (canDk) {
466
+ canDk = false;
467
+ } else {
468
+ return;
469
+ }
470
+ setTimeout(function () {
471
+ canDk = true;
472
+ }, 800);
473
+ $parent.$http({
474
+ url: 'ecykq/recordDetail/saveMobileDakaDetail',
475
+ method: 'POST',
476
+ data: {
477
+ account: loginUser.personAccount,
478
+ departmentId: departmentId,
479
+ departmentName: departmentName,
480
+ name: loginUser.personName,
481
+ occureDate: occureDate,
482
+ orgCode: loginUser.orgCode,
483
+ orgName: loginUser.orgName,
484
+ personSchId: timeSpanData.personSchId,
485
+ timeId: timeSpanData.timeInterval.id,
486
+ unitAddress: curAddress
540
487
  }
541
- }, _callee);
542
- }))();
488
+ }).then(function (response) {
489
+ if (response.code === 'success') {
490
+ _this.freshData();
491
+ if (parseInt(timeSpanData.dakaType) === 1 || parseInt(timeSpanData.dakaType) === 2) {
492
+ $parent.$toast('打卡成功!');
493
+ } else if (parseInt(timeSpanData.dakaType) === 3) {
494
+ $parent.$toast('更新打卡成功!');
495
+ }
496
+ } else {
497
+ $parent.$toast.fail(response.message);
498
+ }
499
+ }, function (err) {
500
+ $parent.$toast.fail(err);
501
+ });
502
+ });
543
503
  }
544
504
  };
545
505
  /* harmony default export */ __webpack_exports__["default"] = (defaultMethods);
@@ -630,7 +590,7 @@ ___CSS_LOADER_EXPORT___.push([module.id, ".no-data[data-v-ef203e2e]{display:-web
630
590
 
631
591
  /***/ }),
632
592
 
633
- /***/ 4542:
593
+ /***/ 2426:
634
594
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
635
595
 
636
596
  "use strict";
@@ -649,7 +609,7 @@ var ___CSS_LOADER_URL_IMPORT_0___ = new URL(/* asset import */ __webpack_require
649
609
  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()));
650
610
  var ___CSS_LOADER_URL_REPLACEMENT_0___ = _node_modules_css_loader_dist_runtime_getUrl_js__WEBPACK_IMPORTED_MODULE_2___default()(___CSS_LOADER_URL_IMPORT_0___);
651
611
  // Module
652
- ___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}", ""]);
612
+ ___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}", ""]);
653
613
  // Exports
654
614
  /* harmony default export */ __webpack_exports__["default"] = (___CSS_LOADER_EXPORT___);
655
615
 
@@ -22677,19 +22637,19 @@ var update = add("300ba1e0", content, true, {"sourceMap":false,"shadowMode":fals
22677
22637
 
22678
22638
  /***/ }),
22679
22639
 
22680
- /***/ 9914:
22640
+ /***/ 6694:
22681
22641
  /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
22682
22642
 
22683
22643
  // style-loader: Adds some css to the DOM by adding a <style> tag
22684
22644
 
22685
22645
  // load the styles
22686
- var content = __webpack_require__(4542);
22646
+ var content = __webpack_require__(2426);
22687
22647
  if(content.__esModule) content = content.default;
22688
22648
  if(typeof content === 'string') content = [[module.id, content, '']];
22689
22649
  if(content.locals) module.exports = content.locals;
22690
22650
  // add the styles to the DOM
22691
22651
  var add = (__webpack_require__(9548)/* ["default"] */ .A)
22692
- var update = add("1a0e7bb8", content, true, {"sourceMap":false,"shadowMode":false});
22652
+ var update = add("a4a65a34", content, true, {"sourceMap":false,"shadowMode":false});
22693
22653
 
22694
22654
  /***/ }),
22695
22655
 
@@ -27708,8 +27668,8 @@ var commonApps_component = normalizeComponent(
27708
27668
  )
27709
27669
 
27710
27670
  /* harmony default export */ var commonApps = (commonApps_component.exports);
27711
- ;// CONCATENATED MODULE: ./node_modules/babel-loader/lib/index.js??clonedRuleSet-82.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
27712
- var workHeadvue_type_template_id_6c6c5bb3_scoped_true_render = function render() {
27671
+ ;// CONCATENATED MODULE: ./node_modules/babel-loader/lib/index.js??clonedRuleSet-82.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
27672
+ var workHeadvue_type_template_id_4100a0b0_scoped_true_render = function render() {
27713
27673
  var _vm = this,
27714
27674
  _c = _vm._self._c;
27715
27675
  return _c('div', {
@@ -27833,7 +27793,7 @@ var workHeadvue_type_template_id_6c6c5bb3_scoped_true_render = function render()
27833
27793
  staticClass: "pageHeader_timer"
27834
27794
  }, [_c('span', [_vm._v(_vm._s(_vm.nowDay))])])])]);
27835
27795
  };
27836
- var workHeadvue_type_template_id_6c6c5bb3_scoped_true_staticRenderFns = [];
27796
+ var workHeadvue_type_template_id_4100a0b0_scoped_true_staticRenderFns = [];
27837
27797
 
27838
27798
  ;// CONCATENATED MODULE: ./node_modules/vuex/dist/vuex.esm.js
27839
27799
  /*!
@@ -29024,11 +28984,15 @@ var workClock = __webpack_require__(2554);
29024
28984
  organName: '',
29025
28985
  nowDay: '',
29026
28986
  orgCode: '',
29027
- dakaType: '',
28987
+ dakaType: '不可打卡',
29028
28988
  ecykqPath: '',
29029
28989
  canClockIn: false,
29030
28990
  boxHeight: 123,
29031
- timeInterval: {} // 签到校验信息
28991
+ timeInterval: {},
28992
+ // 签到校验信息
28993
+ timer: '',
28994
+ //时钟定时器
28995
+ curInterval: '' // 勤数据更新定时器
29032
28996
  };
29033
28997
  },
29034
28998
  computed: _objectSpread({}, mapGetters({
@@ -29054,6 +29018,8 @@ var workClock = __webpack_require__(2554);
29054
29018
  this.getBgImg();
29055
29019
  },
29056
29020
  beforeDestroy: function beforeDestroy() {
29021
+ if (this.timer) clearInterval(this.timer);
29022
+ if (this.curInterval) clearInterval(this.curInterval);
29057
29023
  this.$bus.off('reduceHeadHeight', this.reduceHeadHeight);
29058
29024
  },
29059
29025
  mounted: function mounted() {
@@ -29061,9 +29027,9 @@ var workClock = __webpack_require__(2554);
29061
29027
  this.loadH5apps();
29062
29028
  this.formatNowDay();
29063
29029
  this.getTime();
29064
- setInterval(function () {
29030
+ this.timer = setInterval(function () {
29065
29031
  _this2.getTime();
29066
- }, 1000 * 60);
29032
+ }, 1000 * 2);
29067
29033
  },
29068
29034
  methods: {
29069
29035
  scan: function scan() {
@@ -29130,7 +29096,7 @@ var workClock = __webpack_require__(2554);
29130
29096
  productCode = window.productCode;
29131
29097
  }
29132
29098
  url = "/apigw" + '/mpp/image/download?nameField=fileName&dataField=image&id=' + res.body.listdata[0].id + '&httpPort=' + location.port + '&productCode=' + productCode;
29133
- document.querySelector('.work_pageHeader').style.background = "url(".concat(url, ")");
29099
+ document.querySelector('.work_pageHeader').style.background = 'url(' + url + ')';
29134
29100
  document.querySelector('.work_pageHeader').style.backgroundSize = 'cover';
29135
29101
  document.querySelector('.work_pageHeader').style.backgroundRepeat = 'no-repeat';
29136
29102
  }
@@ -29213,6 +29179,13 @@ var workClock = __webpack_require__(2554);
29213
29179
  } else if (workClock.default) {
29214
29180
  workClock.default.freshData(_this5);
29215
29181
  }
29182
+ _this5.curInterval = setInterval(function () {
29183
+ if (workClock.freshData) {
29184
+ workClock.freshData(_this5);
29185
+ } else if (workClock.default) {
29186
+ workClock.default.freshData(_this5);
29187
+ }
29188
+ }, 1000 * 60);
29216
29189
  });
29217
29190
  }
29218
29191
  }
@@ -29304,9 +29277,9 @@ var workClock = __webpack_require__(2554);
29304
29277
  });
29305
29278
  ;// CONCATENATED MODULE: ./packages/ecmoa/desktop/src/components/workHead.vue?vue&type=script&lang=js
29306
29279
  /* harmony default export */ var components_workHeadvue_type_script_lang_js = (workHeadvue_type_script_lang_js);
29307
- // EXTERNAL MODULE: ./node_modules/vue-style-loader/index.js??clonedRuleSet-64.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-64.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-64.use[2]!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-64.use[3]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-64.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
29308
- var workHeadvue_type_style_index_0_id_6c6c5bb3_prod_scoped_true_lang_scss = __webpack_require__(9914);
29309
- ;// CONCATENATED MODULE: ./packages/ecmoa/desktop/src/components/workHead.vue?vue&type=style&index=0&id=6c6c5bb3&prod&scoped=true&lang=scss
29280
+ // EXTERNAL MODULE: ./node_modules/vue-style-loader/index.js??clonedRuleSet-64.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-64.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-64.use[2]!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-64.use[3]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-64.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
29281
+ var workHeadvue_type_style_index_0_id_4100a0b0_prod_scoped_true_lang_scss = __webpack_require__(6694);
29282
+ ;// CONCATENATED MODULE: ./packages/ecmoa/desktop/src/components/workHead.vue?vue&type=style&index=0&id=4100a0b0&prod&scoped=true&lang=scss
29310
29283
 
29311
29284
  ;// CONCATENATED MODULE: ./packages/ecmoa/desktop/src/components/workHead.vue
29312
29285
 
@@ -29319,11 +29292,11 @@ var workHeadvue_type_style_index_0_id_6c6c5bb3_prod_scoped_true_lang_scss = __we
29319
29292
 
29320
29293
  var workHead_component = normalizeComponent(
29321
29294
  components_workHeadvue_type_script_lang_js,
29322
- workHeadvue_type_template_id_6c6c5bb3_scoped_true_render,
29323
- workHeadvue_type_template_id_6c6c5bb3_scoped_true_staticRenderFns,
29295
+ workHeadvue_type_template_id_4100a0b0_scoped_true_render,
29296
+ workHeadvue_type_template_id_4100a0b0_scoped_true_staticRenderFns,
29324
29297
  false,
29325
29298
  null,
29326
- "6c6c5bb3",
29299
+ "4100a0b0",
29327
29300
  null
29328
29301
 
29329
29302
  )