{"remainingRequest":"D:\\jenkins\\workspace\\reform-fvue\\node_modules\\thread-loader\\dist\\cjs.js!D:\\jenkins\\workspace\\reform-fvue\\node_modules\\babel-loader\\lib\\index.js!D:\\jenkins\\workspace\\reform-fvue\\node_modules\\cache-loader\\dist\\cjs.js??ref--0-0!D:\\jenkins\\workspace\\reform-fvue\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!D:\\jenkins\\workspace\\reform-fvue\\src\\views\\specialGroupAiring\\components\\indexManageDialog.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\reform-fvue\\src\\views\\specialGroupAiring\\components\\indexManageDialog.vue","mtime":1716798100136},{"path":"D:\\jenkins\\workspace\\reform-fvue\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\reform-fvue\\node_modules\\thread-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\reform-fvue\\node_modules\\babel-loader\\lib\\index.js","mtime":315532800000},{"path":"D:\\jenkins\\workspace\\reform-fvue\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\reform-fvue\\node_modules\\vue-loader\\lib\\index.js","mtime":499162500000}],"contextDependencies":[],"result":["import \"core-js/modules/web.dom.iterable\";\nimport \"regenerator-runtime/runtime\";\nimport _asyncToGenerator from \"D:/jenkins/workspace/reform-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//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\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 utils from '@/utils.js';\nimport req from '@/request.js';\nvar portal = window.context.portal;\nexport default {\n name: 'indexManageDialog',\n data: function data() {\n return {\n reqLoading: false,\n dislogVisible: false,\n type: '新增',\n reportData: null,\n form: {\n name: '',\n key: '',\n unit: '分',\n fillDate: [],\n remarks: ''\n },\n rules: {\n name: [{\n required: true,\n message: '请输入指标名称',\n trigger: 'change'\n }],\n key: [{\n required: true,\n message: '请输入指标值',\n trigger: 'change'\n }],\n unit: [{\n required: true,\n message: '请选择指标单位',\n trigger: 'change'\n }],\n fillDate: [{\n required: true,\n message: '请选择指标所属时间',\n trigger: 'change'\n }]\n },\n options: [],\n unitOptions: [{\n value: '分',\n label: '分'\n }, {\n value: '%',\n label: '%'\n }]\n };\n },\n created: function created() {},\n methods: {\n init: function init() {\n var children = [];\n\n for (var i = 1; i <= 12; i++) {\n children.push({\n label: i + '月',\n value: i\n });\n }\n\n this.options = [];\n\n for (var year = 2024; year < 2034; year++) {\n this.options.push({\n label: year + '年',\n value: year,\n children: children\n });\n }\n },\n open: function () {\n var _open = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee(type, data) {\n return regeneratorRuntime.wrap(function _callee$(_context) {\n while (1) {\n switch (_context.prev = _context.next) {\n case 0:\n this.dislogVisible = true;\n this.reqLoading = true;\n this.type = type;\n\n if (!(data && data.id)) {\n _context.next = 7;\n break;\n }\n\n this.reportData = data;\n _context.next = 7;\n return this.getDataById();\n\n case 7:\n this.init();\n this.formarDataShow();\n this.reqLoading = false;\n\n case 10:\n case \"end\":\n return _context.stop();\n }\n }\n }, _callee, this);\n }));\n\n function open(_x, _x2) {\n return _open.apply(this, arguments);\n }\n\n return open;\n }(),\n getDataById: function getDataById() {\n var _this = this;\n\n return new Promise(function (resolve) {\n req.get(\"\".concat(portal, \"/majorProjects/bizSpecialGroupWork/v1/\").concat(_this.reportData.id)).then(function (res) {\n console.log(res.data);\n\n if (res && res.data) {\n _this.form = res.data;\n resolve();\n }\n });\n });\n },\n formarDataShow: function formarDataShow() {\n var _this2 = this;\n\n if (this.form.details && this.form.details.length) {\n this.row.forEach(function (item) {\n _this2.form.details.forEach(function (indexField) {\n if (indexField.groupCode == item.value) {\n item[\"\".concat(item.keyMap[indexField.indexCode], \"_score\")] = indexField.indexScore;\n item[\"\".concat(item.keyMap[indexField.indexCode], \"_star\")] = indexField.indexStar;\n }\n });\n });\n }\n },\n handleClose: function handleClose() {\n this.dislogVisible = false;\n this.form = {\n name: '',\n key: '',\n unit: '分',\n fillDate: [],\n remarks: ''\n };\n },\n handleSubmit: function handleSubmit() {\n var _this3 = this;\n\n this.$refs.form.validate(function (valid) {\n if (valid) {\n _this3.reqLoading = true;\n\n _this3.formatDataSubmit();\n\n console.log(_this3.form, 'submitData');\n return;\n req.post(\"\".concat(portal, \"/majorProjects/bizSpecialGroupWork/v1/\"), _this3.form).then(function (res) {\n console.log(res);\n _this3.reqLoading = false;\n\n if (res.data && res.data.state) {\n _this3.$message.success('提交成功!');\n\n _this3.$emit('refreshData');\n\n _this3.handleClose();\n }\n });\n }\n });\n },\n formatDataSubmit: function formatDataSubmit() {\n this.form.dataTime = this.form.fillDate.map(function (item) {\n return {\n year: item[0],\n month: item[1]\n };\n });\n this.form.unit == '分' ? this.form.unit = '' : null;\n }\n }\n};",null]}