{"remainingRequest":"D:\\jenkins\\workspace\\cssc-fvue\\node_modules\\thread-loader\\dist\\cjs.js!D:\\jenkins\\workspace\\cssc-fvue\\node_modules\\babel-loader\\lib\\index.js!D:\\jenkins\\workspace\\cssc-fvue\\node_modules\\cache-loader\\dist\\cjs.js??ref--0-0!D:\\jenkins\\workspace\\cssc-fvue\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!D:\\jenkins\\workspace\\cssc-fvue\\src\\components\\common\\HtSubmitButton.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\cssc-fvue\\src\\components\\common\\HtSubmitButton.vue","mtime":1667804638680},{"path":"D:\\jenkins\\workspace\\cssc-fvue\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\cssc-fvue\\node_modules\\thread-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\cssc-fvue\\node_modules\\babel-loader\\lib\\index.js","mtime":315532800000},{"path":"D:\\jenkins\\workspace\\cssc-fvue\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\cssc-fvue\\node_modules\\vue-loader\\lib\\index.js","mtime":499162500000}],"contextDependencies":[],"result":["import \"regenerator-runtime/runtime\";\nimport _asyncToGenerator from \"D:/jenkins/workspace/cssc-fvue/node_modules/@babel/runtime/helpers/esm/asyncToGenerator\";\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\nimport req from \"@/request.js\";\nexport default {\n name: \"ht-submit-button\",\n props: {\n url: {\n type: String,\n required: true\n },\n requestMethod: {\n type: String,\n default: \"POST\"\n },\n model: {\n type: [Object, Array],\n default: function _default() {\n return {};\n }\n },\n isSubmit: {\n type: Boolean,\n default: true\n },\n type: {\n type: String,\n default: \"primary\"\n },\n scopeName: {\n type: String,\n required: true\n },\n context: {\n type: String\n }\n },\n data: function data() {\n return {\n fullscreenLoading: false\n };\n },\n computed: {\n calUrl: function calUrl() {\n if (this.context) {\n return window.context[this.context] + this.url;\n }\n\n return this.url;\n }\n },\n mounted: function mounted() {},\n methods: {\n beforeSaveData: function () {\n var _beforeSaveData = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {\n return regeneratorRuntime.wrap(function _callee$(_context) {\n while (1) {\n switch (_context.prev = _context.next) {\n case 0:\n _context.next = 2;\n return this.$emit(\"before-save-data\");\n\n case 2:\n case \"end\":\n return _context.stop();\n }\n }\n }, _callee, this);\n }));\n\n function beforeSaveData() {\n return _beforeSaveData.apply(this, arguments);\n }\n\n return beforeSaveData;\n }(),\n requestSaveData: function () {\n var _requestSaveData = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee2() {\n var _this = this;\n\n var response;\n return regeneratorRuntime.wrap(function _callee2$(_context2) {\n while (1) {\n switch (_context2.prev = _context2.next) {\n case 0:\n this.fullscreenLoading = true;\n _context2.next = 3;\n return req.request({\n data: this.model,\n url: this.calUrl,\n method: this.requestMethod\n }).finally(function () {\n _this.fullscreenLoading = false;\n });\n\n case 3:\n response = _context2.sent;\n\n if (response.data && response.data.state) {\n this.$emit(\"after-save-data\");\n this.$message.success(response.data.message || \"操作成功\");\n }\n\n case 5:\n case \"end\":\n return _context2.stop();\n }\n }\n }, _callee2, this);\n }));\n\n function requestSaveData() {\n return _requestSaveData.apply(this, arguments);\n }\n\n return requestSaveData;\n }()\n }\n};",null]}