{"remainingRequest":"/data/jenkins/workspace/test-v5in-source-front-01/src/badp-bcxin-5.x/obpm-designer-web/node_modules/thread-loader/dist/cjs.js!/data/jenkins/workspace/test-v5in-source-front-01/src/badp-bcxin-5.x/obpm-designer-web/node_modules/babel-loader/lib/index.js!/data/jenkins/workspace/test-v5in-source-front-01/src/badp-bcxin-5.x/obpm-designer-web/node_modules/cache-loader/dist/cjs.js??ref--0-0!/data/jenkins/workspace/test-v5in-source-front-01/src/badp-bcxin-5.x/obpm-designer-web/node_modules/vue-loader/lib/index.js??vue-loader-options!/data/jenkins/workspace/test-v5in-source-front-01/src/badp-bcxin-5.x/obpm-designer-web/src/components/AdvancedTool/APIInterfaceList.vue?vue&type=script&lang=js&","dependencies":[{"path":"/data/jenkins/workspace/test-v5in-source-front-01/src/badp-bcxin-5.x/obpm-designer-web/src/components/AdvancedTool/APIInterfaceList.vue","mtime":1701674859497},{"path":"/data/jenkins/workspace/test-v5in-source-front-01/src/badp-bcxin-5.x/obpm-designer-web/node_modules/cache-loader/dist/cjs.js","mtime":1701674874584},{"path":"/data/jenkins/workspace/test-v5in-source-front-01/src/badp-bcxin-5.x/obpm-designer-web/node_modules/thread-loader/dist/cjs.js","mtime":1701674873947},{"path":"/data/jenkins/workspace/test-v5in-source-front-01/src/badp-bcxin-5.x/obpm-designer-web/node_modules/babel-loader/lib/index.js","mtime":1701674874357},{"path":"/data/jenkins/workspace/test-v5in-source-front-01/src/badp-bcxin-5.x/obpm-designer-web/node_modules/cache-loader/dist/cjs.js","mtime":1701674874584},{"path":"/data/jenkins/workspace/test-v5in-source-front-01/src/badp-bcxin-5.x/obpm-designer-web/node_modules/vue-loader/lib/index.js","mtime":1701674874903}],"contextDependencies":[],"result":["import \"core-js/modules/es7.object.get-own-property-descriptors\";\nimport \"core-js/modules/web.dom.iterable\";\nimport \"core-js/modules/es6.object.keys\";\nimport \"core-js/modules/es6.function.name\";\nimport _defineProperty from \"/data/jenkins/workspace/test-v5in-source-front-01/src/badp-bcxin-5.x/obpm-designer-web/node_modules/@babel/runtime-corejs2/helpers/esm/defineProperty\";\nimport \"regenerator-runtime/runtime\";\nimport _asyncToGenerator from \"/data/jenkins/workspace/test-v5in-source-front-01/src/badp-bcxin-5.x/obpm-designer-web/node_modules/@babel/runtime-corejs2/helpers/esm/asyncToGenerator\";\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//\nimport { delMsg } from '@/utils/elementui';\nimport editInput from '@/components/Common/edit_input';\nimport { getAPISList as _getAPISList, deleteApiList, getAPISGroup, createApiGroup, updateApiGroup, deleteApiGroup } from '@/service/AdvancedToolAPI.js';\nexport default {\n name: 'apiInterfaceList',\n data: function data() {\n return {\n tableHeight: 300,\n multipleSelection: [],\n //将获取选中的数组放进去\n tableData: {},\n params: {\n requestType: '',\n name: '',\n status: '',\n tags: '',\n pageNo: 1,\n linesPerPage: 10\n },\n groupData: [],\n showAddInput: false,\n addInputValue: '',\n searchGroup: '' //搜索分组绑定的值\n\n };\n },\n mounted: function mounted() {\n this.getScollerHeight();\n this.getAPISList();\n this.getApiGroup();\n },\n methods: {\n handleCommand: function handleCommand(val) {\n console.log('点击了什么', val);\n },\n\n /**\n * 动态计算页面table高度\n */\n getScollerHeight: function getScollerHeight() {\n var _this = this;\n\n setTimeout(function () {\n var clientHeight = document.documentElement.clientHeight || document.body.clientHeight; //60 头部, 32 面包屑, 41 第一层页签, 40 第二层页签, 50 列表标题, 71 查询, 20 父组件外边距, 32分页\n\n _this.tableHeight = clientHeight - 60 - 32 - 41 - 40 - 50 - 71 - 20 - 40 + 'px';\n }, 100);\n },\n //填充方法\n onRowClick: function onRowClick(row) {\n this.$router.push({\n path: \"/home/softwaresdetails/advancedTool/apiInterface?edit=true&apiId=\".concat(row.id)\n });\n },\n //更新参数\n updataParams: function updataParams(obj) {\n Object.assign(this.params, obj);\n },\n addNew: function addNew() {\n this.$router.push({\n path: '/home/softwaresdetails/advancedTool/apiInterface?edit=false'\n });\n },\n\n /**\n * 获取Excel列表的数据\n */\n getAPISList: function () {\n var _getAPISList2 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {\n var response;\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 _getAPISList(this.params, sessionStorage.getItem('appId'));\n\n case 2:\n response = _context.sent;\n\n if (response.data.errcode == 0) {\n this.tableData = response.data.data;\n }\n\n case 4:\n case \"end\":\n return _context.stop();\n }\n }\n }, _callee, this);\n }));\n\n function getAPISList() {\n return _getAPISList2.apply(this, arguments);\n }\n\n return getAPISList;\n }(),\n\n /**\n * 当前页\n */\n handleCurrentChange: function handleCurrentChange(val) {\n var params = _objectSpread(_objectSpread({}, this.params), {}, {\n pageNo: val\n });\n\n this.params = params;\n this.getAPISList();\n },\n\n /**\n * 切换分页,每页显示多少条\n */\n handleSizeChange: function handleSizeChange(val) {\n var params = _objectSpread(_objectSpread({}, this.params), {}, {\n linesPerPage: val\n });\n\n this.params = params;\n this.getAPISList();\n },\n\n /**\n * selectInputName\n * 名称查询\n */\n selectInputName: function selectInputName() {\n this.getAPISList();\n },\n\n /**\n * 获取选中的表格数据\n */\n handleSelectionChange: function handleSelectionChange(val) {\n this.multipleSelection = val;\n },\n\n /**\n * 移除\n */\n remove: function () {\n var _remove = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee2() {\n var selectData, data, i, response;\n return regeneratorRuntime.wrap(function _callee2$(_context2) {\n while (1) {\n switch (_context2.prev = _context2.next) {\n case 0:\n selectData = this.multipleSelection;\n data = [];\n\n for (i = 0; i < selectData.length; i++) {\n data.push(selectData[i].id);\n }\n\n if (!(data.length > 0)) {\n _context2.next = 18;\n break;\n }\n\n _context2.prev = 4;\n _context2.next = 7;\n return delMsg(this.$t('msg.delConfirm'), this.$t('msg.tip'));\n\n case 7:\n _context2.next = 9;\n return deleteApiList(data);\n\n case 9:\n response = _context2.sent;\n\n if (response.data.errcode == 0) {\n this.$message.success(this.$t('msg.remove_ss'));\n this.getAPISList();\n }\n\n _context2.next = 16;\n break;\n\n case 13:\n _context2.prev = 13;\n _context2.t0 = _context2[\"catch\"](4);\n console.log(_context2.t0);\n\n case 16:\n _context2.next = 19;\n break;\n\n case 18:\n this.$message.error(this.$t('msg.check_data'));\n\n case 19:\n case \"end\":\n return _context2.stop();\n }\n }\n }, _callee2, this, [[4, 13]]);\n }));\n\n function remove() {\n return _remove.apply(this, arguments);\n }\n\n return remove;\n }(),\n\n /**\n * 重置\n */\n reset: function reset() {\n this.params = {\n name: '',\n requestType: '',\n status: '',\n tags: '',\n pageNo: 1,\n linesPerPage: 10\n };\n },\n\n /**\n * 更新编辑\n */\n updateEdit: function () {\n var _updateEdit = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee3(val, flag) {\n var response;\n return regeneratorRuntime.wrap(function _callee3$(_context3) {\n while (1) {\n switch (_context3.prev = _context3.next) {\n case 0:\n if (!flag) {\n _context3.next = 7;\n break;\n }\n\n _context3.next = 3;\n return updateApiGroup({\n name: val.name\n }, val.id, sessionStorage.getItem('appId'));\n\n case 3:\n response = _context3.sent;\n\n if (response.data.errcode == 0) {\n this.$message.success('更新分组成功');\n this.getApiGroup();\n }\n\n _context3.next = 8;\n break;\n\n case 7:\n val.name = val.bakName;\n\n case 8:\n case \"end\":\n return _context3.stop();\n }\n }\n }, _callee3, this);\n }));\n\n function updateEdit(_x, _x2) {\n return _updateEdit.apply(this, arguments);\n }\n\n return updateEdit;\n }(),\n delGroup: function () {\n var _delGroup = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee4(val) {\n var response;\n return regeneratorRuntime.wrap(function _callee4$(_context4) {\n while (1) {\n switch (_context4.prev = _context4.next) {\n case 0:\n _context4.next = 2;\n return deleteApiGroup([val.id]);\n\n case 2:\n response = _context4.sent;\n\n if (response.data.errcode == 0) {\n this.$message.success('删除成功');\n this.getApiGroup();\n }\n\n case 4:\n case \"end\":\n return _context4.stop();\n }\n }\n }, _callee4, this);\n }));\n\n function delGroup(_x3) {\n return _delGroup.apply(this, arguments);\n }\n\n return delGroup;\n }(),\n confirm: function () {\n var _confirm = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee5() {\n var response;\n return regeneratorRuntime.wrap(function _callee5$(_context5) {\n while (1) {\n switch (_context5.prev = _context5.next) {\n case 0:\n this.showAddInput = false;\n _context5.next = 3;\n return createApiGroup({\n name: this.addInputValue\n }, sessionStorage.getItem('appId'));\n\n case 3:\n response = _context5.sent;\n\n if (response.data.errcode == 0) {\n this.$message.success('添加分组成功');\n this.getApiGroup();\n }\n\n case 5:\n case \"end\":\n return _context5.stop();\n }\n }\n }, _callee5, this);\n }));\n\n function confirm() {\n return _confirm.apply(this, arguments);\n }\n\n return confirm;\n }(),\n cancel: function cancel() {\n this.showAddInput = false;\n this.addInputValue = '';\n },\n getApiGroup: function () {\n var _getApiGroup = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee6() {\n var params, response, data;\n return regeneratorRuntime.wrap(function _callee6$(_context6) {\n while (1) {\n switch (_context6.prev = _context6.next) {\n case 0:\n params = {\n name: this.searchGroup,\n pageNo: 1,\n linesPerPage: 10000\n };\n _context6.next = 3;\n return getAPISGroup(params, sessionStorage.getItem('appId'));\n\n case 3:\n response = _context6.sent;\n data = response.data.data.datas.map(function (item) {\n item.bakName = item.name, item.isEdit = false;\n return _objectSpread({}, item);\n }); // 将值塞进数组中\n\n this.groupData = data;\n\n case 6:\n case \"end\":\n return _context6.stop();\n }\n }\n }, _callee6, this);\n }));\n\n function getApiGroup() {\n return _getApiGroup.apply(this, arguments);\n }\n\n return getApiGroup;\n }()\n },\n components: {\n editInput: editInput\n }\n};",null]}