{"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\\dialog.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\reform-fvue\\src\\views\\specialGroupAiring\\components\\dialog.vue","mtime":1716260780894},{"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/es7.object.get-own-property-descriptors\";\nimport \"core-js/modules/es6.object.keys\";\nimport \"core-js/modules/es6.regexp.replace\";\nimport \"regenerator-runtime/runtime\";\nimport _asyncToGenerator from \"D:/jenkins/workspace/reform-fvue/node_modules/@babel/runtime/helpers/esm/asyncToGenerator\";\nimport \"core-js/modules/es6.function.name\";\nimport _defineProperty from \"D:/jenkins/workspace/reform-fvue/node_modules/@babel/runtime/helpers/esm/defineProperty\";\nimport \"core-js/modules/es6.regexp.split\";\nimport \"core-js/modules/web.dom.iterable\";\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//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\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: 'specialGroupAiringDialog',\n data: function data() {\n return {\n markLoading: true,\n reqLoading: false,\n dislogVisible: false,\n type: '新增',\n reportData: null,\n form: {\n title: '',\n fillDate: '',\n remarks: '',\n details: []\n },\n rules: {\n title: [{\n required: true,\n message: '请输入标题',\n trigger: 'change'\n }],\n fillDate: [{\n required: true,\n message: '请选择日期',\n trigger: 'change'\n }]\n },\n tableData: [],\n column: [{\n name: '专项小组',\n key: 'nameShort',\n fixed: true\n }],\n row: [],\n col: [],\n colors: ['#99A9BF', '#F7BA2A', '#FF9900']\n };\n },\n created: function created() {},\n methods: {\n init: function init() {\n var _this = this;\n\n this.row = utils.getDictItemsFromCache('zxxz_ls');\n this.col = utils.getDictItemsFromCache('zxxzlszb');\n this.col.forEach(function (col) {\n var nameArr = col.value.split('_');\n col.unit = nameArr.length > 1 ? nameArr[1] : '';\n col.keyUnique = nameArr[0];\n\n _this.row.forEach(function (row) {\n if (row.keyMap) {\n row.keyMap = _objectSpread(_defineProperty({}, nameArr[0], nameArr[0]), row.keyMap);\n } else {\n row.keyMap = _defineProperty({}, nameArr[0], nameArr[0]);\n }\n\n row.nameShort = row.name.slice(0, 4);\n row[\"\".concat(nameArr[0], \"_score\")] = null;\n row[\"\".concat(nameArr[0], \"_star\")] = null;\n row[\"\".concat(nameArr[0], \"_scoreInput\")] = _this.type == '详情' ? false : true;\n }); // value === \"1\"是综合评价\n\n\n if (col.value === '1') {\n _this.column.push({\n name: col.name,\n key: col.keyUnique,\n width: 160\n });\n } else {\n _this.column.push({\n type: 'merge',\n name: col.name,\n key: nameArr[0],\n props1: \"\".concat(nameArr[0], \"_score\"),\n props2: \"\".concat(nameArr[0], \"_star\"),\n unit: col.unit\n });\n }\n });\n console.log(this.row, 'this.row');\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.tableData = this.row;\n this.reqLoading = false;\n\n case 11:\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 _this2 = this;\n\n return new Promise(function (resolve) {\n req.get(\"\".concat(portal, \"/majorProjects/bizSpecialGroupWork/v1/\").concat(_this2.reportData.id)).then(function (res) {\n console.log(res.data);\n\n if (res && res.data) {\n _this2.form = res.data;\n resolve();\n }\n });\n });\n },\n formarDataShow: function formarDataShow() {\n var _this3 = this;\n\n if (this.form.details && this.form.details.length) {\n this.row.forEach(function (item) {\n _this3.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 title: '',\n fillDate: '',\n remarks: '',\n details: []\n };\n this.tableData = [];\n this.row = [];\n this.col = [];\n this.column = [{\n name: '专项小组',\n key: 'nameShort',\n fixed: true\n }];\n },\n handleSubmit: function handleSubmit() {\n var _this4 = this;\n\n this.$refs.form.validate(function (valid) {\n if (valid) {\n _this4.reqLoading = true;\n\n var submitData = _this4.formatDataSubmit();\n\n _this4.form.details = submitData;\n console.log(_this4.form, submitData);\n req.post(\"\".concat(portal, \"/majorProjects/bizSpecialGroupWork/v1/\"), _this4.form).then(function (res) {\n console.log(res);\n _this4.reqLoading = false;\n\n if (res.data && res.data.state) {\n _this4.$message.success('提交成功!');\n\n _this4.$emit('refreshData');\n\n _this4.handleClose();\n }\n });\n }\n });\n },\n formatDataSubmit: function formatDataSubmit() {\n var _this5 = this;\n\n var tempData = [];\n this.tableData.forEach(function (item) {\n _this5.col.forEach(function (colTagert) {\n if (item[\"\".concat(colTagert.keyUnique, \"_score\")] || item[\"\".concat(colTagert.keyUnique, \"_star\")]) {\n tempData.push({\n groupCode: item.value,\n // 专项小组编码\n groupName: item.name,\n // 专项小组名称\n indexCode: colTagert.keyUnique,\n // 指标编码\n indexName: colTagert.name,\n // 指标名称\n indexScore: item[\"\".concat(colTagert.keyUnique, \"_score\")],\n // 得分\n indexStar: item[\"\".concat(colTagert.keyUnique, \"_star\")] // 评价\n\n });\n }\n });\n });\n return tempData;\n },\n handleNumChange: function handleNumChange(index, row, value, col) {\n // 数量最小值为0\n if (value < 0) {\n value = '0';\n } // 单位为百分比的数,最大值为100\n\n\n if (col.unit == '%' && value > 100) {\n this.$message.warning('该指标需小于等于100%');\n value = '100';\n }\n\n if (value == '0') {\n row[\"\".concat(col.key, \"_score\")] = '0';\n } else {\n row[\"\".concat(col.key, \"_score\")] = value.replace(/^0+/, '');\n }\n\n this.tableData.splice(index, 1, row);\n },\n handleStarChange: function handleStarChange(index, row, value, col) {\n row[\"\".concat(col.key, \"_star\")] = value;\n this.tableData.splice(index, 1, row);\n },\n handleInput: function handleInput(index, row, value, col) {\n var _this6 = this;\n\n // 不启用编辑隐藏功能\n return;\n if (this.type == '新增') return; // 输入框的显示与隐藏\n\n row[\"\".concat(col.key, \"_scoreInput\")] = value;\n this.tableData.splice(index, 1, row);\n\n if (value) {\n this.$nextTick(function () {\n _this6.$refs[\"\".concat(col.key, \"_scoreInput_\").concat(index)][0].focus();\n });\n }\n },\n handleResetRate: function handleResetRate(index, row, value, col) {\n row[\"\".concat(col.key, \"_star\")] = 0;\n this.tableData.splice(index, 1, row);\n }\n }\n};",null]}