{"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\\components\\CmgtDutyWorkarrangeFormDialog.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\bzzgj-fvue\\src\\views\\Manage\\duty\\components\\CmgtDutyWorkarrangeFormDialog.vue","mtime":1690541169611},{"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/es7.object.get-own-property-descriptors\";\nimport \"core-js/modules/es6.object.keys\";\nimport \"core-js/modules/es6.function.name\";\nimport \"core-js/modules/es6.string.iterator\";\nimport \"core-js/modules/es6.set\";\nimport \"core-js/modules/web.dom.iterable\";\nimport _defineProperty from \"D:/jenkins/workspace/bzzgj-fvue/node_modules/@babel/runtime/helpers/esm/defineProperty\";\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\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 CmgtDutyWorkarrangeApi from '@/views/Manage/duty/api/CmgtDutyWorkarrangeApi';\nimport dictContracts from '@/components/dict/DictSelectUtils.js';\nimport CommonApi from '@/views/Manage/CommonApi.js';\nexport default {\n name: 'CmgtDutyWorkarrangeFormDialog',\n components: {},\n data: function data() {\n return {\n title: '新增',\n showFormDia: false,\n mdays: [],\n teams: [],\n classInfos: [],\n members: [],\n weeks: '',\n selectTeamId: '',\n selectMembers: [],\n params: {\n id: null,\n arrangeDate: null,\n workclassId: null,\n dataType: '1',\n teammemberId: null,\n selectMembers: [],\n teamId: null,\n status: '1',\n attendance: null,\n sn: null,\n memo: null,\n isDele: '0',\n isCover: false\n },\n rules: {\n arrangeDate: [{\n required: true,\n message: '排班日期不能为空',\n trigger: 'blur'\n }],\n workclassId: [{\n required: true,\n message: '班种不能为空',\n trigger: 'blur'\n }]\n },\n posts: [],\n loading: false,\n submiting: false\n };\n },\n created: function created() {\n this.posts = dictContracts.getDictItemsFromCache('cmgt_post');\n },\n mounted: function mounted() {},\n methods: {\n add: function add(params) {\n var _this = this;\n\n CommonApi.loadDutyDays(params.arrangeDate, function (res) {\n _this.mdays = res;\n }); // 合并表单项\n\n this.params = _objectSpread(_objectSpread({}, this.params), {}, {\n selectDays: [params.arrangeDate]\n }, params);\n this.showFormDia = true;\n },\n Update: function Update(item) {\n var _this2 = this;\n\n CommonApi.loadDutyDays(item.arrangeDate, function (res) {\n _this2.mdays = res;\n });\n this.params.id = item.arrId;\n this.params.arrangeDate = item.arrangeDate;\n this.params.workclassId = item.classId;\n\n if (item.tid) {\n this.params.teamId = item.tid;\n this.selectedTeam(item.tid);\n } else {\n item.members.forEach(function (t) {\n _this2.params.selectMembers.push(t.mid);\n });\n }\n\n this.showFormDia = true;\n },\n handleClose: function handleClose() {\n this.params = {\n id: null,\n arrangeDate: null,\n workclassId: null,\n dataType: '1',\n teammemberId: null,\n selectMembers: [],\n teamId: null,\n status: '1',\n attendance: null,\n sn: null,\n memo: null,\n isDele: '0',\n orgId: null,\n isCover: false\n }; // this.members = []\n\n this.title = '新增';\n this.showFormDia = false;\n },\n handleSave: function handleSave() {\n var _this3 = this;\n\n console.log(this.params);\n\n if (!this.params.orgId) {\n this.$message.warning('系统异常,所属部门为空!');\n return;\n }\n\n this.$refs.formInfo.validate(function (valid) {\n if (valid) {\n var method;\n\n if (!_this3.params.id) {\n // 新增\n method = CmgtDutyWorkarrangeApi.addCmgtDutyWorkarrange;\n }\n\n if (_this3.params.id) {\n // 修改\n _this3.title = '修改';\n method = CmgtDutyWorkarrangeApi.editCmgtDutyWorkarrange;\n }\n\n _this3.params.teammemberId = _this3.params.selectMembers.join(',');\n _this3.submiting = true;\n method(_this3.params, function (res) {\n if (res.state) {\n _this3.$notify({\n type: 'success',\n message: _this3.title + '成功',\n duration: 2000\n });\n\n _this3.$parent.loadData(_this3.$parent.searchDate, _this3.$parent.orgId);\n\n _this3.handleClose();\n } else {// console.log('=====res======', res)\n // this.$message.warning(res)\n }\n\n _this3.submiting = false;\n });\n }\n });\n },\n selectedTeam: function selectedTeam(value) {\n var _this4 = this;\n\n var this_ = this;\n this.params.selectMembers = [];\n this.members = [];\n this.loading = true;\n CmgtDutyWorkarrangeApi.findMembersBy(value, this.params.orgId, function (res) {\n if (res.state) {\n // this.members = res.value\n _this4.membersgroup(res.value);\n\n res.value.forEach(function (item) {\n if (item.teamId === value) {\n this_.params.selectMembers.push(item.id);\n }\n });\n }\n\n this_.loading = false;\n });\n },\n membersgroup: function membersgroup(data) {\n var _this5 = this;\n\n var groupName = new Set();\n data.forEach(function (item) {\n groupName.add(item.teamName);\n });\n groupName.forEach(function (item) {\n var options = [];\n data.forEach(function (m) {\n if (item === m.teamName) {\n var o = {\n mname: m.mname,\n id: m.id,\n post: m.post\n };\n options.push(o);\n }\n });\n\n _this5.members.push({\n label: item,\n options: options\n });\n\n console.log(_this5.members);\n });\n },\n postformatter: function postformatter(value) {\n var name = '';\n this.posts.forEach(function (item) {\n if (item.value === value) {\n name = item.name;\n }\n });\n return name;\n }\n }\n};",null]}