{"remainingRequest":"D:\\jenkins\\workspace\\xq-web-bpm\\node_modules\\thread-loader\\dist\\cjs.js!D:\\jenkins\\workspace\\xq-web-bpm\\node_modules\\babel-loader\\lib\\index.js!D:\\jenkins\\workspace\\xq-web-bpm\\node_modules\\cache-loader\\dist\\cjs.js??ref--0-0!D:\\jenkins\\workspace\\xq-web-bpm\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!D:\\jenkins\\workspace\\xq-web-bpm\\src\\views\\uc\\Scheduling\\HolidayManager.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\xq-web-bpm\\src\\views\\uc\\Scheduling\\HolidayManager.vue","mtime":1675071993381},{"path":"D:\\jenkins\\workspace\\xq-web-bpm\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\xq-web-bpm\\node_modules\\thread-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\xq-web-bpm\\node_modules\\babel-loader\\lib\\index.js","mtime":315532800000},{"path":"D:\\jenkins\\workspace\\xq-web-bpm\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\xq-web-bpm\\node_modules\\vue-loader\\lib\\index.js","mtime":499162500000}],"contextDependencies":[],"result":["import _toConsumableArray from \"D:/jenkins/workspace/xq-web-bpm/node_modules/@babel/runtime/helpers/esm/toConsumableArray\";\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//\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//\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 uc from \"@/api/uc.js\";\nexport default {\n  name: \"holiday-manager\",\n  data: function data() {\n    return {\n      data: [],\n      pageResult: {\n        page: 1,\n        pageSize: 10,\n        total: 0\n      },\n      saveUrl: window.context.uc + \"/uc/holiday/v1/save\",\n      deleteUrl: window.context.uc + \"/uc/holiday/v1/remove\",\n      title: \"添加节假日\",\n      dialogVisible: false,\n      holiday: {\n        name: \"\",\n        key: \"\",\n        desc: \"\",\n        time: []\n      },\n      disabled: true,\n      holidayTime: [],\n      makeUpTime: []\n    };\n  },\n  methods: {\n    rowClick: function rowClick(row, column, event) {\n      this.$refs.htTable.$refs.htTable.toggleRowSelection(row);\n    },\n    loadData: function loadData(param, cb) {\n      var _this = this;\n\n      uc.holidayList(param).then(function (data) {\n        _this.data = data.rows;\n        _this.pageResult = {\n          page: data.page,\n          pageSize: data.pageSize,\n          total: data.total\n        };\n      }).finally(function () {\n        cb && cb();\n      });\n    },\n    edit: function edit(row) {\n      var _this2 = this;\n\n      this.dialogVisible = true;\n\n      if (row) {\n        this.title = \"编辑节假日\";\n        this.disabled = true;\n        uc.getHoliday(row.id).then(function (data) {\n          _this2.holiday = data;\n          _this2.holidayTime = data.time.filter(function (item) {\n            return !item.type || item.type === 0;\n          });\n          _this2.makeUpTime = data.time.filter(function (item) {\n            return item.type === 1;\n          });\n        });\n      } else {\n        this.title = \"新增节假日\";\n        this.disabled = false;\n        this.holiday = {\n          name: \"\",\n          key: \"\",\n          desc: \"\",\n          time: []\n        };\n      }\n    },\n    handleClose: function handleClose() {\n      this.dialogVisible = false;\n    },\n    beforeSaveData: function beforeSaveData() {\n      this.holiday.time = [].concat(_toConsumableArray(this.holidayTime), _toConsumableArray(this.makeUpTime));\n    },\n    afterSaveData: function afterSaveData() {\n      this.dialogVisible = false;\n      this.$refs.htTable.load();\n    },\n    add: function add(type) {\n      if (type === 0) {\n        this.holidayTime.push({\n          startTime: \"\",\n          endTime: \"\",\n          type: type\n        });\n      } else if (type === 1) {\n        this.makeUpTime.push({\n          startTime: \"\",\n          endTime: \"\",\n          type: type\n        });\n      }\n    },\n    remove: function remove(index, type) {\n      if (type === 0) {\n        this.holidayTime.splice(index, 1);\n      } else if (type === 1) {\n        this.makeUpTime.splice(index, 1);\n      }\n    },\n    change: function change(row, type) {\n      var startTime = new Date(row.startTime);\n      var endTime = new Date(row.endTime);\n\n      if (startTime > endTime) {\n        if (type === 'small') {\n          this.$set(row, \"startTime\", row.endTime);\n        } else {\n          this.$set(row, \"endTime\", row.startTime);\n        }\n\n        this.$message.error(\"开始时间大于结束时间\");\n      }\n    }\n  }\n};",null]}