{"remainingRequest":"D:\\jenkins\\workspace\\bzzgj-fvue\\node_modules\\thread-loader\\dist\\cjs.js!D:\\jenkins\\workspace\\bzzgj-fvue\\node_modules\\babel-loader\\lib\\index.js!D:\\jenkins\\workspace\\bzzgj-fvue\\node_modules\\cache-loader\\dist\\cjs.js??ref--0-0!D:\\jenkins\\workspace\\bzzgj-fvue\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!D:\\jenkins\\workspace\\bzzgj-fvue\\src\\views\\Manage\\duty\\CMGTDutyAnalysisRelevancy\\components\\MonthScheduling.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\bzzgj-fvue\\src\\views\\Manage\\duty\\CMGTDutyAnalysisRelevancy\\components\\MonthScheduling.vue","mtime":1690541169595},{"path":"D:\\jenkins\\workspace\\bzzgj-fvue\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\bzzgj-fvue\\node_modules\\thread-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\bzzgj-fvue\\node_modules\\babel-loader\\lib\\index.js","mtime":315532800000},{"path":"D:\\jenkins\\workspace\\bzzgj-fvue\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\bzzgj-fvue\\node_modules\\vue-loader\\lib\\index.js","mtime":499162500000}],"contextDependencies":[],"result":["import \"core-js/modules/es6.array.find\";\nimport \"regenerator-runtime/runtime\";\nimport _asyncToGenerator from \"D:/jenkins/workspace/bzzgj-fvue/node_modules/@babel/runtime/helpers/esm/asyncToGenerator\";\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\nimport CMGTDutyAnalysisRelevancyApi from '@/api/CMGTDutyAnalysisRelevancyApi';\nimport moment from 'moment'; // 解构接口api对象\n\nvar MonthSchedulingData = CMGTDutyAnalysisRelevancyApi.MonthSchedulingData;\nexport default {\n name: 'MonthScheduling',\n // 本月排班信息\n props: {\n rowInfo: {\n default: function _default() {\n return {};\n },\n type: Object\n }\n },\n data: function data() {\n return {\n monthSchedulingData: [],\n // 排班信息数据\n calendarDate: '',\n // 显示月份\n calendarDateArr: [],\n // 记录加载工排班信息的月份\n calendarLoading: false // 日历加载loading\n\n };\n },\n created: function created() {\n this.calendarDate = this.rowInfo.yearMonth; // 初始化触发watch监听\n },\n watch: {\n /*\r\n * 当日历时间切换时:\r\n * 当年月不存在时,保存选中的年月,并加载切换年月的排班信息\r\n * */\n calendarDate: function calendarDate(date) {\n // 将时间格式化为 YYYY-MM格式\n var yearMonth = moment(date).format('YYYY-MM');\n if (this.calendarDateArr.some(function (i) {\n return moment(yearMonth).isSame(i);\n })) return;\n this.calendarDateArr.push(yearMonth);\n this.getMonthSchedulingData(moment(date).format('YYYY-MM-DD HH:mm:ss'));\n }\n },\n mounted: function mounted() {},\n methods: {\n /*\r\n * 处理模版内识别不到moment的问题:\r\n * moment函数浅拷贝到methods配置对象中\r\n * */\n moment: moment,\n // 获取排班信息\n getMonthSchedulingData: function () {\n var _getMonthSchedulingData = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee(date) {\n var _ref, teamMemberId, _yield$MonthSchedulin, value;\n\n return regeneratorRuntime.wrap(function _callee$(_context) {\n while (1) {\n switch (_context.prev = _context.next) {\n case 0:\n this.calendarLoading = true; // 打开loading\n\n _ref = this.rowInfo || {}, teamMemberId = _ref.id;\n _context.next = 4;\n return MonthSchedulingData({\n teamMemberId: teamMemberId,\n date: date\n });\n\n case 4:\n _yield$MonthSchedulin = _context.sent;\n value = _yield$MonthSchedulin.data.value;\n\n if (Array.isArray(value) && value.length) {\n _context.next = 8;\n break;\n }\n\n return _context.abrupt(\"return\", this.calendarLoading = false);\n\n case 8:\n // 合并新旧数据\n this.monthSchedulingData = this.monthSchedulingData.concat(value);\n this.calendarLoading = false; // 关闭loading\n\n case 10:\n case \"end\":\n return _context.stop();\n }\n }\n }, _callee, this);\n }));\n\n function getMonthSchedulingData(_x) {\n return _getMonthSchedulingData.apply(this, arguments);\n }\n\n return getMonthSchedulingData;\n }(),\n // 计算排班起始结束时间\n computingTime: function computingTime(date) {\n var item = this.monthSchedulingData.find(function (i) {\n return moment(i.arrangeDate).isSame(date);\n });\n if (!item.cmgtDutyWorkclass) return '';\n\n var _ref2 = item.cmgtDutyWorkclass || {},\n scheduleStart = _ref2.scheduleStart,\n duringTime = _ref2.duringTime;\n\n return \"\".concat(scheduleStart, \" - \").concat(duringTime);\n }\n }\n};",null]}