ecinc-cloud-moadesktop 9.6.251 → 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 getCurInterval = null; // 定时任务
261
256
  var timeSpanData = null; // 考勤时段
262
257
  var p1 = null; // 打卡位置经纬度
263
258
  var gpsScope = null;
@@ -325,66 +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 (window.mappType === 'ecinc') {
348
- //APP定位
349
- debugger;
350
- try {
326
+ return new Promise(function (resolve) {
327
+ if (window.mappType === 'ecinc') {
328
+ //APP定位
351
329
  $parent.$wv.getLocationInformation(function (res) {
352
330
  if (typeof res === 'string') res = JSON.parse(res);
353
331
  if (res && res.data) {
354
332
  getDis(Number(res.data.longitude), Number(res.data.latitude));
355
333
  getCurAddress(Number(res.data.longitude), Number(res.data.latitude));
334
+ resolve(true);
356
335
  } else {
357
336
  console.log('$wv getCurrentPosition res =', res);
337
+ resolve(false);
358
338
  $parent.dakaType = dakaType[0];
359
339
  }
360
340
  });
361
- } catch (e) {
362
- console.log('$wv getCurrentPosition:', e);
363
- $parent.dakaType = dakaType[0];
364
- }
365
- } else if (window.isOpenMapLocation === 1) {
366
- // H5地图定位
367
- getCurLocation();
368
- if (getCurInterval) {
369
- clearInterval(getCurInterval);
370
- }
371
- getCurInterval = setInterval(getCurLocation(), 1000 * 30); ////定时刷新定位信息
372
- } else if (device === 'qywx') {
373
- // 企业微信定位
374
- window.wx.getLocation({
375
- type: 'gcj02',
376
- // 默认为wgs84的gps坐标,如果要返回直接给openLocation用的火星坐标,可传入'gcj02'
377
- success: function success(resp) {
378
- getDis(resp.longitude, resp.latitude);
379
- getCurAddress(resp.longitude, resp.latitude);
380
-
381
- // var latitude = res.latitude; // 纬度,浮点数,范围为90 ~ -90
382
- // var longitude = res.longitude; // 经度,浮点数,范围为180 ~ -180。
383
- // var speed = res.speed; // 速度,以米/每秒计
384
- // var accuracy = res.accuracy; // 位置精度
385
- }
386
- });
387
- }
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
+ });
388
373
  }
389
374
  var defaultMethods = {
390
375
  /**
@@ -395,145 +380,126 @@ var defaultMethods = {
395
380
  $parent = $scope;
396
381
  loginUser = $scope.loginUser;
397
382
  }
398
- var today = new Date();
399
- var y = today.getFullYear();
400
- var m = today.getMonth();
401
- var d = today.getDate();
402
- var h = today.getHours();
403
- var mins = today.getMinutes();
404
- // const sec = today.getSeconds()
405
- occureDate = y + '-' + (m >= 9 ? m + 1 : '0' + (m + 1)) + '-' + (d > 9 ? d : '0' + d) + ' ' + (h > 9 ? h : '0' + h) + ':' + (mins > 9 ? mins : '0' + mins);
406
- tDate = y + '-' + (m >= 9 ? m + 1 : '0' + (m + 1)) + '-' + (d > 9 ? d : '0' + d);
407
- // 获取打卡时段
408
- $parent.$http({
409
- method: 'POST',
410
- url: 'ecykq/timeInterval/getDakaTime',
411
- headers: {
412
- 'Content-Type': 'application/x-www-form-urlencoded'
413
- },
414
- params: {
415
- account: loginUser.personAccount,
416
- occurredDate: tDate,
417
- orgCode: loginUser.orgCode
418
- }
419
- }).then(function (response) {
420
- if (response.code === 'success') {
421
- timeSpanData = JSON.parse(response.body.json);
422
- timeSpanData.dakaType = Number(timeSpanData.dakaType);
423
- // if (!this.isLoad) {
424
- // this.isLoad = true
425
- if (!timeSpanData.mobileSign || !timeSpanData.addressList || timeSpanData.addressList.length === 0) {
426
- $parent.dakaType = dakaType[0];
427
- return $parent.$toast.fail('移动打卡功能异常,请联系管理员开启或设置考勤位置信息!');
428
- }
429
- $parent.dakaType = dakaType[timeSpanData.dakaType];
430
- curLocationAndDis(); // 获取位置信息
431
-
432
- var nowtime = moment(new Date()).format('HH:mm');
433
- if (timeSpanData.timeInterval && (nowtime > timeSpanData.timeInterval.logonStart && nowtime < timeSpanData.timeInterval.logonEnd || nowtime === timeSpanData.timeInterval.logonStart || nowtime === timeSpanData.timeInterval.logonEnd)) {
434
- timeSpanData.timeInterval.showTime = timeSpanData.timeInterval.logonRecordTime ? timeSpanData.timeInterval.logonRecordTime : '未打卡';
435
- timeSpanData.timeInterval.showStatus = timeSpanData.timeInterval.logonRecordTime ? 1 : 3;
436
- } else if (timeSpanData.timeInterval && (nowtime > timeSpanData.timeInterval.logoffStart && nowtime < timeSpanData.timeInterval.logoffEnd || nowtime === timeSpanData.timeInterval.logoffStart || nowtime === timeSpanData.timeInterval.logoffEnd)) {
437
- timeSpanData.timeInterval.showTime = timeSpanData.timeInterval.logoffRecordTime ? timeSpanData.timeInterval.logoffRecordTime : '未打卡';
438
- timeSpanData.timeInterval.showStatus = timeSpanData.timeInterval.logoffRecordTime ? 1 : 3;
439
- } else if (timeSpanData.timeInterval && (nowtime > timeSpanData.timeInterval.logoffStart && nowtime > timeSpanData.timeInterval.logoffEnd || nowtime === timeSpanData.timeInterval.logoffStart || nowtime === timeSpanData.timeInterval.logoffEnd)) {
440
- timeSpanData.timeInterval.showTime = timeSpanData.timeInterval.logoffRecordTime ? timeSpanData.timeInterval.logoffRecordTime : '未打卡';
441
- 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
+ });
442
438
  } else {
443
- timeSpanData.timeInterval = timeSpanData.timeInterval || {};
444
- timeSpanData.timeInterval.showTime = nowtime;
445
- timeSpanData.timeInterval.showStatus = 0;
439
+ $parent.$toast.fail(response.message);
446
440
  }
447
- $parent.timeInterval = timeSpanData.timeInterval;
448
- $parent.$forceUpdate();
449
- // }
450
- } else {
451
- $parent.$toast.fail(response.message);
452
- }
441
+ });
453
442
  });
454
443
  },
455
444
  // 打卡
456
445
  dkEvent: function dkEvent($scope) {
457
446
  var _this = this;
458
- return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
459
- var departmentId, departmentName;
460
- return _regeneratorRuntime().wrap(function _callee$(_context) {
461
- while (1) switch (_context.prev = _context.next) {
462
- case 0:
463
- $parent = $scope;
464
- _context.next = 3;
465
- return _this.freshData($scope);
466
- case 3:
467
- if (!(timeSpanData && timeSpanData.mobileSign !== 1)) {
468
- _context.next = 5;
469
- break;
470
- }
471
- return _context.abrupt("return");
472
- case 5:
473
- if (!(!dis || dis === 'undefined' || dis === null)) {
474
- _context.next = 7;
475
- break;
476
- }
477
- return _context.abrupt("return");
478
- case 7:
479
- if (!(dis && dis > gpsScope)) {
480
- _context.next = 9;
481
- break;
482
- }
483
- return _context.abrupt("return", $parent.$toast.fail('当前不在考勤范围内'));
484
- case 9:
485
- departmentId = loginUser.staffList[0].orgFullId.split('-');
486
- departmentName = loginUser.staffList[0].orgFullName.split('-');
487
- departmentId = departmentId[departmentId.length - 1];
488
- departmentName = departmentName[departmentName.length - 1];
489
- if (!canDk) {
490
- _context.next = 17;
491
- break;
492
- }
493
- canDk = false;
494
- _context.next = 18;
495
- break;
496
- case 17:
497
- return _context.abrupt("return");
498
- case 18:
499
- setTimeout(function () {
500
- canDk = true;
501
- }, 800);
502
- $parent.$http({
503
- url: 'ecykq/recordDetail/saveMobileDakaDetail',
504
- method: 'POST',
505
- data: {
506
- account: loginUser.personAccount,
507
- departmentId: departmentId,
508
- departmentName: departmentName,
509
- name: loginUser.personName,
510
- occureDate: occureDate,
511
- orgCode: loginUser.orgCode,
512
- orgName: loginUser.orgName,
513
- personSchId: timeSpanData.personSchId,
514
- timeId: timeSpanData.timeInterval.id,
515
- unitAddress: curAddress
516
- }
517
- }).then(function (response) {
518
- if (response.code === 'success') {
519
- _this.freshData();
520
- if (parseInt(timeSpanData.dakaType) === 1 || parseInt(timeSpanData.dakaType) === 2) {
521
- $parent.$toast('打卡成功!');
522
- } else if (parseInt(timeSpanData.dakaType) === 3) {
523
- $parent.$toast('更新打卡成功!');
524
- }
525
- } else {
526
- $parent.$toast.fail(response.message);
527
- }
528
- }, function (err) {
529
- $parent.$toast.fail(err);
530
- });
531
- case 20:
532
- case "end":
533
- 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
487
+ }
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);
534
498
  }
535
- }, _callee);
536
- }))();
499
+ }, function (err) {
500
+ $parent.$toast.fail(err);
501
+ });
502
+ });
537
503
  }
538
504
  };
539
505
  /* harmony default export */ __webpack_exports__["default"] = (defaultMethods);
@@ -624,7 +590,7 @@ ___CSS_LOADER_EXPORT___.push([module.id, ".no-data[data-v-ef203e2e]{display:-web
624
590
 
625
591
  /***/ }),
626
592
 
627
- /***/ 4542:
593
+ /***/ 2426:
628
594
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
629
595
 
630
596
  "use strict";
@@ -643,7 +609,7 @@ var ___CSS_LOADER_URL_IMPORT_0___ = new URL(/* asset import */ __webpack_require
643
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()));
644
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___);
645
611
  // Module
646
- ___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}", ""]);
647
613
  // Exports
648
614
  /* harmony default export */ __webpack_exports__["default"] = (___CSS_LOADER_EXPORT___);
649
615
 
@@ -22671,19 +22637,19 @@ var update = add("300ba1e0", content, true, {"sourceMap":false,"shadowMode":fals
22671
22637
 
22672
22638
  /***/ }),
22673
22639
 
22674
- /***/ 9914:
22640
+ /***/ 6694:
22675
22641
  /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
22676
22642
 
22677
22643
  // style-loader: Adds some css to the DOM by adding a <style> tag
22678
22644
 
22679
22645
  // load the styles
22680
- var content = __webpack_require__(4542);
22646
+ var content = __webpack_require__(2426);
22681
22647
  if(content.__esModule) content = content.default;
22682
22648
  if(typeof content === 'string') content = [[module.id, content, '']];
22683
22649
  if(content.locals) module.exports = content.locals;
22684
22650
  // add the styles to the DOM
22685
22651
  var add = (__webpack_require__(9548)/* ["default"] */ .A)
22686
- var update = add("1a0e7bb8", content, true, {"sourceMap":false,"shadowMode":false});
22652
+ var update = add("a4a65a34", content, true, {"sourceMap":false,"shadowMode":false});
22687
22653
 
22688
22654
  /***/ }),
22689
22655
 
@@ -27702,8 +27668,8 @@ var commonApps_component = normalizeComponent(
27702
27668
  )
27703
27669
 
27704
27670
  /* harmony default export */ var commonApps = (commonApps_component.exports);
27705
- ;// 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
27706
- 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() {
27707
27673
  var _vm = this,
27708
27674
  _c = _vm._self._c;
27709
27675
  return _c('div', {
@@ -27827,7 +27793,7 @@ var workHeadvue_type_template_id_6c6c5bb3_scoped_true_render = function render()
27827
27793
  staticClass: "pageHeader_timer"
27828
27794
  }, [_c('span', [_vm._v(_vm._s(_vm.nowDay))])])])]);
27829
27795
  };
27830
- var workHeadvue_type_template_id_6c6c5bb3_scoped_true_staticRenderFns = [];
27796
+ var workHeadvue_type_template_id_4100a0b0_scoped_true_staticRenderFns = [];
27831
27797
 
27832
27798
  ;// CONCATENATED MODULE: ./node_modules/vuex/dist/vuex.esm.js
27833
27799
  /*!
@@ -29018,11 +28984,15 @@ var workClock = __webpack_require__(2554);
29018
28984
  organName: '',
29019
28985
  nowDay: '',
29020
28986
  orgCode: '',
29021
- dakaType: '',
28987
+ dakaType: '不可打卡',
29022
28988
  ecykqPath: '',
29023
28989
  canClockIn: false,
29024
28990
  boxHeight: 123,
29025
- timeInterval: {} // 签到校验信息
28991
+ timeInterval: {},
28992
+ // 签到校验信息
28993
+ timer: '',
28994
+ //时钟定时器
28995
+ curInterval: '' // 勤数据更新定时器
29026
28996
  };
29027
28997
  },
29028
28998
  computed: _objectSpread({}, mapGetters({
@@ -29048,6 +29018,8 @@ var workClock = __webpack_require__(2554);
29048
29018
  this.getBgImg();
29049
29019
  },
29050
29020
  beforeDestroy: function beforeDestroy() {
29021
+ if (this.timer) clearInterval(this.timer);
29022
+ if (this.curInterval) clearInterval(this.curInterval);
29051
29023
  this.$bus.off('reduceHeadHeight', this.reduceHeadHeight);
29052
29024
  },
29053
29025
  mounted: function mounted() {
@@ -29055,9 +29027,9 @@ var workClock = __webpack_require__(2554);
29055
29027
  this.loadH5apps();
29056
29028
  this.formatNowDay();
29057
29029
  this.getTime();
29058
- setInterval(function () {
29030
+ this.timer = setInterval(function () {
29059
29031
  _this2.getTime();
29060
- }, 1000 * 60);
29032
+ }, 1000 * 2);
29061
29033
  },
29062
29034
  methods: {
29063
29035
  scan: function scan() {
@@ -29124,7 +29096,7 @@ var workClock = __webpack_require__(2554);
29124
29096
  productCode = window.productCode;
29125
29097
  }
29126
29098
  url = "/apigw" + '/mpp/image/download?nameField=fileName&dataField=image&id=' + res.body.listdata[0].id + '&httpPort=' + location.port + '&productCode=' + productCode;
29127
- document.querySelector('.work_pageHeader').style.background = "url(".concat(url, ")");
29099
+ document.querySelector('.work_pageHeader').style.background = 'url(' + url + ')';
29128
29100
  document.querySelector('.work_pageHeader').style.backgroundSize = 'cover';
29129
29101
  document.querySelector('.work_pageHeader').style.backgroundRepeat = 'no-repeat';
29130
29102
  }
@@ -29207,6 +29179,13 @@ var workClock = __webpack_require__(2554);
29207
29179
  } else if (workClock.default) {
29208
29180
  workClock.default.freshData(_this5);
29209
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);
29210
29189
  });
29211
29190
  }
29212
29191
  }
@@ -29298,9 +29277,9 @@ var workClock = __webpack_require__(2554);
29298
29277
  });
29299
29278
  ;// CONCATENATED MODULE: ./packages/ecmoa/desktop/src/components/workHead.vue?vue&type=script&lang=js
29300
29279
  /* harmony default export */ var components_workHeadvue_type_script_lang_js = (workHeadvue_type_script_lang_js);
29301
- // 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
29302
- var workHeadvue_type_style_index_0_id_6c6c5bb3_prod_scoped_true_lang_scss = __webpack_require__(9914);
29303
- ;// 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
29304
29283
 
29305
29284
  ;// CONCATENATED MODULE: ./packages/ecmoa/desktop/src/components/workHead.vue
29306
29285
 
@@ -29313,11 +29292,11 @@ var workHeadvue_type_style_index_0_id_6c6c5bb3_prod_scoped_true_lang_scss = __we
29313
29292
 
29314
29293
  var workHead_component = normalizeComponent(
29315
29294
  components_workHeadvue_type_script_lang_js,
29316
- workHeadvue_type_template_id_6c6c5bb3_scoped_true_render,
29317
- 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,
29318
29297
  false,
29319
29298
  null,
29320
- "6c6c5bb3",
29299
+ "4100a0b0",
29321
29300
  null
29322
29301
 
29323
29302
  )