{"remainingRequest":"D:\\jiayue\\pig-ui\\node_modules\\babel-loader\\lib\\index.js!D:\\jiayue\\pig-ui\\src\\api\\gen\\gen.js","dependencies":[{"path":"D:\\jiayue\\pig-ui\\src\\api\\gen\\gen.js","mtime":1619070292865},{"path":"D:\\jiayue\\pig-ui\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jiayue\\pig-ui\\node_modules\\babel-loader\\lib\\index.js","mtime":315532800000}],"contextDependencies":[],"result":["/*\r\n * Copyright (c) 2018-2025, test All rights reserved.\r\n *\r\n * Redistribution and use in source and binary forms, with or without\r\n * modification, are permitted provided that the following conditions are met:\r\n *\r\n * Redistributions of source code must retain the above copyright notice,\r\n * this list of conditions and the following disclaimer.\r\n * Redistributions in binary form must reproduce the above copyright\r\n * notice, this list of conditions and the following disclaimer in the\r\n * documentation and/or other materials provided with the distribution.\r\n * Neither the name of the pig4cloud.com developer nor the names of its\r\n * contributors may be used to endorse or promote products derived from\r\n * this software without specific prior written permission.\r\n * Author: lengleng\r\n */\nimport request from '@/router/axios';\nexport function fetchList(query) {\n return request({\n url: '/gen/generator/page',\n method: 'get',\n params: query\n });\n}\nexport function preview(table) {\n return request({\n url: '/gen/generator/preview',\n method: 'get',\n params: table\n });\n}\nexport function fetchDsList(query) {\n return request({\n url: '/gen/dsconf/page',\n method: 'get',\n params: query\n });\n}\nexport function fetchSelectDsList() {\n return request({\n url: '/gen/dsconf/list',\n method: 'get'\n });\n}\nexport function addObj(obj) {\n return request({\n url: '/gen/dsconf/',\n method: 'post',\n data: obj\n });\n}\nexport function getObj(id) {\n return request({\n url: '/gen/dsconf/' + id,\n method: 'get'\n });\n}\nexport function delObj(id) {\n return request({\n url: '/gen/dsconf/' + id,\n method: 'delete'\n });\n}\nexport function putObj(obj) {\n return request({\n url: '/gen/dsconf/',\n method: 'put',\n data: obj\n });\n}\nexport function handleDown(table) {\n return request({\n url: '/gen/generator/code',\n method: 'post',\n data: table,\n responseType: 'arraybuffer'\n }).then(function (response) {\n // 处理返回的文件流\n var blob = new Blob([response.data], {\n type: 'application/zip'\n });\n var filename = table.tableName + '.zip';\n var link = document.createElement('a');\n link.href = URL.createObjectURL(blob);\n link.download = filename;\n document.body.appendChild(link);\n link.click();\n window.setTimeout(function () {\n URL.revokeObjectURL(blob);\n document.body.removeChild(link);\n }, 0);\n });\n}\nexport function getForm(tableName, dsName) {\n return request({\n url: '/gen/form/info',\n params: {\n tableName: tableName,\n dsName: dsName\n },\n method: 'get'\n });\n}\nexport function postForm(formInfo, tableName, dsId) {\n return request({\n url: '/gen/form/',\n method: 'post',\n data: Object.assign({\n formInfo: formInfo,\n tableName: tableName,\n dsId: dsId\n })\n });\n}",{"version":3,"sources":["D:/jiayue/pig-ui/src/api/gen/gen.js"],"names":["request","fetchList","query","url","method","params","preview","table","fetchDsList","fetchSelectDsList","addObj","obj","data","getObj","id","delObj","putObj","handleDown","responseType","then","response","blob","Blob","type","filename","tableName","link","document","createElement","href","URL","createObjectURL","download","body","appendChild","click","window","setTimeout","revokeObjectURL","removeChild","getForm","dsName","postForm","formInfo","dsId","Object","assign"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA,OAAOA,OAAP,MAAoB,gBAApB;AAEA,OAAO,SAASC,SAAT,CAAmBC,KAAnB,EAA0B;AAC/B,SAAOF,OAAO,CAAC;AACbG,IAAAA,GAAG,EAAE,qBADQ;AAEbC,IAAAA,MAAM,EAAE,KAFK;AAGbC,IAAAA,MAAM,EAAEH;AAHK,GAAD,CAAd;AAKD;AAED,OAAO,SAASI,OAAT,CAAiBC,KAAjB,EAAwB;AAC7B,SAAOP,OAAO,CAAC;AACbG,IAAAA,GAAG,EAAE,wBADQ;AAEbC,IAAAA,MAAM,EAAE,KAFK;AAGbC,IAAAA,MAAM,EAAEE;AAHK,GAAD,CAAd;AAKD;AAED,OAAO,SAASC,WAAT,CAAqBN,KAArB,EAA4B;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AA,SAAS,EAATA,SAAZ;AAAuBmB,MAAAA,IAAI,EAAJA;AAAvB,KAAd;AAHO,GAAD,CAAd;AAKD","sourcesContent":["/*\r\n * Copyright (c) 2018-2025, test All rights reserved.\r\n *\r\n * Redistribution and use in source and binary forms, with or without\r\n * modification, are permitted provided that the following conditions are met:\r\n *\r\n * Redistributions of source code must retain the above copyright notice,\r\n * this list of conditions and the following disclaimer.\r\n * Redistributions in binary form must reproduce the above copyright\r\n * notice, this list of conditions and the following disclaimer in the\r\n * documentation and/or other materials provided with the distribution.\r\n * Neither the name of the pig4cloud.com developer nor the names of its\r\n * contributors may be used to endorse or promote products derived from\r\n * this software without specific prior written permission.\r\n * Author: lengleng\r\n */\r\n\r\nimport request from '@/router/axios'\r\n\r\nexport function fetchList(query) {\r\n return request({\r\n url: '/gen/generator/page',\r\n method: 'get',\r\n params: query\r\n })\r\n}\r\n\r\nexport function preview(table) {\r\n return request({\r\n url: '/gen/generator/preview',\r\n method: 'get',\r\n params: table\r\n })\r\n}\r\n\r\nexport function fetchDsList(query) {\r\n return request({\r\n url: '/gen/dsconf/page',\r\n method: 'get',\r\n params: query\r\n })\r\n}\r\n\r\nexport function fetchSelectDsList() {\r\n return request({\r\n url: '/gen/dsconf/list',\r\n method: 'get'\r\n })\r\n}\r\n\r\nexport function addObj(obj) {\r\n return request({\r\n url: '/gen/dsconf/',\r\n method: 'post',\r\n data: obj\r\n })\r\n}\r\n\r\nexport function getObj(id) {\r\n return request({\r\n url: '/gen/dsconf/' + id,\r\n method: 'get'\r\n })\r\n}\r\n\r\nexport function delObj(id) {\r\n return request({\r\n url: '/gen/dsconf/' + id,\r\n method: 'delete'\r\n })\r\n}\r\n\r\nexport function putObj(obj) {\r\n return request({\r\n url: '/gen/dsconf/',\r\n method: 'put',\r\n data: obj\r\n })\r\n}\r\n\r\nexport function handleDown(table) {\r\n return request({\r\n url: '/gen/generator/code',\r\n method: 'post',\r\n data: table,\r\n responseType: 'arraybuffer'\r\n }).then((response) => { // 处理返回的文件流\r\n const blob = new Blob([response.data], { type: 'application/zip' })\r\n const filename = table.tableName + '.zip'\r\n const link = document.createElement('a')\r\n link.href = URL.createObjectURL(blob)\r\n link.download = filename\r\n document.body.appendChild(link)\r\n link.click()\r\n window.setTimeout(function () {\r\n URL.revokeObjectURL(blob)\r\n document.body.removeChild(link)\r\n }, 0)\r\n })\r\n}\r\n\r\n\r\nexport function getForm(tableName, dsName) {\r\n return request({\r\n url: '/gen/form/info',\r\n params: { tableName: tableName, dsName: dsName },\r\n method: 'get'\r\n })\r\n}\r\n\r\nexport function postForm(formInfo, tableName, dsId) {\r\n return request({\r\n url: '/gen/form/',\r\n method: 'post',\r\n data: Object.assign({ formInfo, tableName, dsId })\r\n })\r\n}\r\n\r\n"]}]}