{"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\\ShiftRuleManager.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\xq-web-bpm\\src\\views\\uc\\ShiftRuleManager.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":["//\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\";\nimport ShiftUserManager from \"./ShiftUserManager\";\nexport default {\n  name: \"shift-rule-manager\",\n  components: {\n    ShiftUserManager: ShiftUserManager\n  },\n  data: function data() {\n    return {\n      data: [],\n      pageResult: {\n        page: 1,\n        pageSize: 10,\n        total: 0\n      },\n      deleteUrl: window.context.uc + \"/uc/shiftRule/v1/remove\",\n      saveUrl: window.context.uc + \"/uc/shiftRule/v1/save\",\n      title: \"编辑轮班规则\",\n      dialogVisible: false,\n      shiftRule: {\n        name: \"\",\n        key: \"\",\n        desc: \"\",\n        holidayId: \"\"\n      },\n      rules: [],\n      weeks: [\"日\", \"一\", \"二\", \"三\", \"四\", \"五\", \"六\"],\n      selectId: \"\",\n      userId: \"\",\n      holidays: [],\n      disabled: false\n    };\n  },\n  mounted: function mounted() {\n    this.getHolidays();\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.ruleList(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(id) {\n      var _this2 = this;\n\n      this.dialogVisible = true;\n\n      if (id) {\n        this.title = \"编辑轮班规则\";\n        this.disabled = true;\n        uc.getRule(id).then(function (data) {\n          _this2.shiftRule = data;\n          _this2.rules = JSON.parse(data.rule);\n        });\n      } else {\n        this.title = \"新增轮班规则\";\n        this.disabled = false;\n        this.shiftRule = {\n          name: \"\",\n          key: \"\",\n          desc: \"\",\n          holidayId: \"\"\n        };\n        this.rules = [];\n\n        for (var i = 0; i < 7; i++) {\n          this.rules.push({\n            date: i,\n            type: 1,\n            startTime: \"\",\n            endTime: \"\"\n          });\n        }\n      }\n    },\n    handleClose: function handleClose() {\n      this.dialogVisible = false;\n    },\n    beforeSaveData: function beforeSaveData() {\n      this.shiftRule.rule = JSON.stringify(this.rules);\n    },\n    afterSaveData: function afterSaveData() {\n      this.dialogVisible = false;\n      this.$refs.htTable.load();\n    },\n    weekFormat: function weekFormat(row) {\n      return \"星期\" + this.weeks[row.date];\n    },\n    setUser: function setUser(id) {\n      this.$refs.shiftUserManager.openDialog(id);\n    },\n    getHolidays: function getHolidays() {\n      var _this3 = this;\n\n      uc.holidayList({}).then(function (data) {\n        _this3.holidays = data.rows;\n      });\n    },\n    change: function change(row) {\n      if (row.type === 0) {\n        this.$set(row, \"startTime\", \"00:00:00\");\n        this.$set(row, \"endTime\", \"00:00:00\");\n      }\n    }\n  }\n};",null]}