{"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\\CmgtDutyWorkarrangeManage.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\bzzgj-fvue\\src\\views\\Manage\\duty\\CmgtDutyWorkarrangeManage.vue","mtime":1686644562585},{"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/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//\n//\n//\n//\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 CmgtDutyWorkarrangeFormDialog from '@/views/Manage/duty/components/CmgtDutyWorkarrangeFormDialog';\nimport dictContracts from '@/components/dict/DictSelectUtils.js';\nimport Iframe from '@/views/Manage/components/Iframe.vue';\nimport CommonApi from '@/views/Manage/CommonApi.js';\nimport SelectTree from '@/views/Manage/components/SelectTree';\nexport default {\n name: 'CmgtDutyWorkarrangeManage',\n components: {\n CmgtDutyWorkarrangeFormDialog: CmgtDutyWorkarrangeFormDialog,\n Iframe: Iframe,\n SelectTree: SelectTree\n },\n data: function data() {\n return {\n tableData: [],\n StshowFormDias: false,\n teams: [],\n classInfos: [],\n members: [],\n timeValue: new Date(),\n searchDate: null,\n loading: false,\n posts: [],\n orgArrangeList: [],\n org: {\n value: '',\n label: '',\n template: ''\n },\n orgId: '',\n orgName: '',\n templateName: '',\n activeName: '1',\n reportBaseUrl: 'http://183.230.176.125:37799/webroot/decision/view/report',\n src1: '',\n src2: '',\n orgList: []\n };\n },\n created: function created() {\n var _this = this;\n\n this.posts = dictContracts.getDictItemsFromCache('cmgt_post');\n this.$nextTick(function () {\n // 点击前一个月\n var prevBtn = document.querySelector('.el-calendar__button-group .el-button-group>button:nth-child(1)');\n prevBtn.addEventListener('click', function (e) {\n var d = new Date(_this.timeValue);\n\n var resDate = d.getFullYear() + '-' + _this.handleTime(d.getMonth() + 1); // 2020-08\n\n\n _this.searchDate = resDate;\n\n _this.loadData(resDate, _this.orgId);\n\n _this.reloadIframe();\n }); // 点击下一个月\n\n var nextBtn = document.querySelector('.el-calendar__button-group .el-button-group>button:nth-child(3)');\n nextBtn.addEventListener('click', function (e) {\n var d = new Date(_this.timeValue);\n\n var resDate = d.getFullYear() + '-' + _this.handleTime(d.getMonth() + 1); // 2020-10\n\n\n _this.searchDate = resDate;\n\n _this.loadData(resDate, _this.orgId);\n\n _this.reloadIframe();\n }); // 点击今天\n\n var todayBtn = document.querySelector('.el-calendar__button-group .el-button-group>button:nth-child(2)');\n todayBtn.addEventListener('click', function (e) {\n var d = new Date(_this.timeValue);\n\n var resDate = d.getFullYear() + '-' + _this.handleTime(d.getMonth() + 1); // 2020-09\n\n\n _this.searchDate = resDate;\n\n _this.loadData(resDate, _this.orgId);\n\n _this.reloadIframe();\n });\n });\n },\n mounted: function mounted() {\n var _this2 = this;\n\n // 获取所有部门排班信息\n // CmgtDutyWorkarrangeApi.findAllOrgArrange(res => {\n // console.log(\"=========findAllOrgArrange============\",res)\n // this.orgArrangeList = res.data\n // })\n CommonApi.loadSelectOptions({\n name: 'manageCommonService.findZGJOrg'\n }, function (res) {\n _this2.orgArrangeList = res;\n });\n CommonApi.getAllOrgTree(function (res) {\n _this2.setLeaf(res.data);\n\n _this2.orgList = res.data;\n });\n var d = new Date();\n this.searchDate = d.getFullYear() + '-' + (d.getMonth() + 1);\n },\n methods: {\n setLeaf: function setLeaf(orgs) {\n var count = orgs.length;\n\n for (var i = 0; i < count; i++) {\n var org = orgs[i];\n\n if (org.children && org.children.length > 0) {\n org.leaf = false;\n this.setLeaf(org.children);\n } else {\n org.leaf = true;\n org.children = null;\n }\n }\n },\n tabClick: function tabClick(t) {\n if (this.activeName === '2') {\n // __pi__=false 隐藏参数面板,直接获取排班的机构、时间参数赋值给参数面板中的组件\n this.src1 = this.reportBaseUrl + '?viewlet=dutyarrange_t1.cpt&op=view&__pi__=false&startDate=' + this.searchDate + '-01&endDate=' + this.searchDate + this.getMonthLastDay() + '&orgId=' + this.orgId;\n }\n\n if (this.activeName === '3') {\n // __pi__=false 隐藏参数面板,直接获取排班的机构、时间参数赋值给参数面板中的组件\n this.src2 = this.reportBaseUrl + '?viewlet=dutyarrange_t2.cpt&op=view&__pi__=false&startDate=' + this.searchDate + '-01&endDate=' + this.searchDate + this.getMonthLastDay() + '&orgId=' + this.orgId;\n }\n },\n // 修改\n updateArrange: function updateArrange(item) {\n this.$refs.formModal.Update(item);\n },\n closeStshowForm: function closeStshowForm() {\n this.StshowFormDias = false;\n },\n loadData: function loadData(date, orgId) {\n var _this3 = this;\n\n // 获取当月排班信息\n if (orgId == null || orgId == undefined) {\n orgId = 'null';\n }\n\n CmgtDutyWorkarrangeApi.findMonthArrangeInfo({\n date: date + '-01',\n orgId: orgId\n }, function (res) {\n _this3.tableData = res.value;\n });\n },\n selectChange: function selectChange(val) {\n var v = {\n value: val[val.length - 1]\n };\n console.log('vvvvvvvvvvvvvvv==========', v);\n this.loading = true; // this.org = v\n\n this.orgId = v.value; // this.orgName = v.label\n\n this.templateName = v.template;\n this.loadData(this.searchDate, v.value); // 选择部门排班表后,获取该部门的小组和队员信息\n\n var query = {\n querys: [{\n group: 'main',\n operation: 'EQUAL',\n parentGroup: '',\n property: 'org_id_',\n relation: 'AND',\n value: v.value\n }]\n };\n this.$refs.formModal.findTeam(_objectSpread(_objectSpread({}, query), {}, {\n sorter: [{\n direction: 'ASC',\n property: 'sn_'\n }]\n }));\n this.$refs.formModal.findClass(query);\n\n if (this.activeName !== '1') {\n this.tabClick({});\n } // this.reloadIframe()\n\n },\n addArrange: function addArrange(data) {\n // 增加排班信息\n this.$refs.formModal.add(data.day);\n },\n // 处理时间\n handleTime: function handleTime(s) {\n return s < 10 ? '0' + s : s;\n },\n handleTagClose: function handleTagClose(item) {\n var _this4 = this;\n\n var item_ = item;\n var ids = [item.arrId];\n this.$confirm('此操作将永久删除该信息, 是否继续?', '提示', {\n confirmButtonText: '确定',\n cancelButtonText: '取消',\n type: 'warning',\n center: true\n }).then(function () {\n CmgtDutyWorkarrangeApi.deleteCmgtDutyWorkarrange(ids, function (res) {\n _this4.tableData.splice(_this4.tableData.indexOf(item_), 1);\n\n _this4.$message({\n type: 'success',\n message: '删除成功!'\n });\n });\n }).catch(function () {\n _this4.$message({\n type: 'info',\n message: '已取消删除'\n });\n });\n },\n isCurrentMonth: function isCurrentMonth(day) {\n if (!this.orgId) {\n return false;\n }\n\n if (day.substring(0, 7) !== this.timeValue.format('yyyy-MM')) {\n return false;\n }\n\n return true;\n },\n dayNotExist: function dayNotExist(day) {\n var flag = true;\n this.tableData.forEach(function (item) {\n if (item.arrangeDate === day) {\n flag = false;\n }\n });\n return flag;\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 fastWorkArrange: function fastWorkArrange() {\n var _this5 = this;\n\n if (this.orgId == null || this.orgId === '') {\n this.$message({\n type: 'warning',\n message: '请选择部门信息!'\n });\n return;\n }\n\n if (this.searchDate == null || this.searchDate === '') {\n this.$message({\n type: 'warning',\n message: '请选择排班时间!'\n });\n return;\n } //var orgName = this.$refs.orgSelect.selected.label\n\n\n this.$confirm('确认一键排班' + this.searchDate + '月排班信息, 是否继续?', '提示', {\n confirmButtonText: '确定',\n cancelButtonText: '取消',\n type: 'warning',\n center: true\n }).then(function () {\n // var this_ = this\n _this5.loading = true;\n\n var loading = _this5.$loading({\n lock: true,\n text: '排班处理中...',\n spinner: 'el-icon-loading',\n background: 'rgba(0, 0, 0, 0.7)'\n });\n\n CmgtDutyWorkarrangeApi.fastWorkArrange({\n date: _this5.searchDate,\n orgId: _this5.orgId\n }, function (res) {\n loading.close();\n\n _this5.loadData(_this5.searchDate, _this5.orgId);\n\n _this5.loading = false;\n });\n }).catch(function () {\n _this5.$message({\n type: 'info',\n message: '已取消一键排班'\n });\n });\n },\n reloadIframe: function reloadIframe() {\n if (this.templateName == null || this.templateName == '') {\n this.src = '';\n } else {\n // __pi__=false 隐藏参数面板,直接获取排班的机构、时间参数赋值给参数面板中的组件\n this.src = this.reportBaseUrl + '?viewlet=' + this.templateName + '.cpt&op=view&__pi__=false&startdate=' + this.searchDate + '-01&enddate=' + this.searchDate + this.getMonthLastDay() + '&orgid=' + this.orgId;\n }\n },\n getMonthLastDay: function getMonthLastDay() {\n var month = this.timeValue.getMonth() + 1;\n\n if (month == 1 || month == 3 || month == 5 || month == 7 || month == 8 || month == 10 || month == 12) {\n return '-31';\n } else {\n return '-30';\n }\n }\n }\n};",null]}