Files
ZERO_CODE/ZeroCodeProject/main/client/node_modules/.cache/babel-loader/8ddca061b65519f09c62ae2b5b291ba3f556ac755844426b0cc02bfaf42a4476.json
vermouth789 fe39320977 123
123
2026-01-11 00:11:34 +08:00

1 line
7.9 KiB
JSON

{"ast":null,"code":"import { ZeroCodeAxios } from \"@/request/request.js\";\nconst components = {};\nconst props = [\"above_page_data\"];\nconst data = function () {\n return {\n form: {\n name: \"\",\n host: \"\",\n port: \"\",\n user: \"\",\n password: \"\"\n },\n page_settings: {},\n loading: false,\n options: \"\",\n activeName: \"\",\n project_config_info: {},\n activeName_page: \"\"\n };\n};\nfunction mounted() {\n this.fetch_data();\n}\nconst methods = {\n fetch_data() {\n ZeroCodeAxios({\n method: \"POST\",\n url: \"/zero_code_base/zero_code_main/use_api/\",\n data: {\n api_name: \"read_project_config\",\n model: \"api_infos\",\n process_data: {\n project_info: this.above_page_data\n }\n }\n }).then(res => {\n this.project_config_info = JSON.parse(res.data.data);\n JSON.parse(res.data.data).pages.map(item => {\n console.log(item);\n this.page_settings[item.name] = {\n footer: \"\",\n left: \"\",\n middle: \"\",\n top: \"\",\n right: \"\"\n };\n });\n });\n },\n export_project() {\n console.log(this.page_settings);\n // this.loading = true\n // ZeroCodeAxios({\n // url: \":10098/ApiClass/base_api_control/api_url/\",\n // method: \"POST\",\n // responseType: 'blob', // 设置为 blob\n // data: {\n // \"submit_data\": {\n // \"data\": {\n // project_sign: this.above_page_data.sign,\n // project_out_path: this.form.path,\n // ip: this.form.ip,\n // db_name: this.form.db_name,\n // user: this.form.user,\n // pwd: this.form.pwd,\n // }\n // }\n // }\n // }).then(res => {\n // this.loading = false\n // const url = window.URL.createObjectURL(new Blob([res.data], {'type': 'application/zip'}));\n // const a = document.createElement('a');\n // a.style.display = 'none';\n // a.href = url;\n // a.download = 'output.zip'; // 你可以根据需要更改下载文件的名称\n // document.body.appendChild(a);\n // a.click();\n // window.URL.revokeObjectURL(url);\n // document.body.removeChild(a);\n // }).catch(error => {\n // this.loading = false\n // })\n }\n};\nexport default {\n data: data,\n methods: methods,\n mounted: mounted,\n components: components,\n props: props\n};","map":{"version":3,"names":["ZeroCodeAxios","components","props","data","form","name","host","port","user","password","page_settings","loading","options","activeName","project_config_info","activeName_page","mounted","fetch_data","methods","method","url","api_name","model","process_data","project_info","above_page_data","then","res","JSON","parse","pages","map","item","console","log","footer","left","middle","top","right","export_project"],"sources":["/Users/xubincheng/Desktop/job/zero_code_all/zero_project/ZeroCodeProject/main/client/src/components/App_creator/app_creator_components/export_project/export_project.js"],"sourcesContent":["import {ZeroCodeAxios} from \"@/request/request.js\"\r\n\r\nconst components = {}\r\n\r\nconst props = [\"above_page_data\"]\r\n\r\nconst data = function () {\r\n return {\r\n form: {\r\n name: \"\",\r\n host: \"\",\r\n port: \"\",\r\n user: \"\",\r\n password: \"\"\r\n },\r\n page_settings: {},\r\n loading: false,\r\n options: \"\",\r\n activeName: \"\",\r\n project_config_info: {},\r\n activeName_page: \"\"\r\n }\r\n}\r\n\r\nfunction mounted() {\r\n this.fetch_data()\r\n}\r\n\r\nconst methods = {\r\n fetch_data() {\r\n ZeroCodeAxios({\r\n method: \"POST\",\r\n url: \"/zero_code_base/zero_code_main/use_api/\",\r\n data: {\r\n api_name: \"read_project_config\",\r\n model: \"api_infos\",\r\n process_data: {\r\n project_info: this.above_page_data\r\n }\r\n }\r\n }).then(res => {\r\n this.project_config_info = JSON.parse(res.data.data)\r\n JSON.parse(res.data.data).pages.map(item => {\r\n console.log(item)\r\n this.page_settings[item.name] = {\r\n footer: \"\",\r\n left: \"\",\r\n middle: \"\",\r\n top: \"\",\r\n right: \"\",\r\n }\r\n })\r\n })\r\n },\r\n export_project() {\r\n console.log(this.page_settings)\r\n // this.loading = true\r\n // ZeroCodeAxios({\r\n // url: \":10098/ApiClass/base_api_control/api_url/\",\r\n // method: \"POST\",\r\n // responseType: 'blob', // 设置为 blob\r\n // data: {\r\n // \"submit_data\": {\r\n // \"data\": {\r\n // project_sign: this.above_page_data.sign,\r\n // project_out_path: this.form.path,\r\n // ip: this.form.ip,\r\n // db_name: this.form.db_name,\r\n // user: this.form.user,\r\n // pwd: this.form.pwd,\r\n // }\r\n // }\r\n // }\r\n // }).then(res => {\r\n // this.loading = false\r\n // const url = window.URL.createObjectURL(new Blob([res.data], {'type': 'application/zip'}));\r\n // const a = document.createElement('a');\r\n // a.style.display = 'none';\r\n // a.href = url;\r\n // a.download = 'output.zip'; // 你可以根据需要更改下载文件的名称\r\n // document.body.appendChild(a);\r\n // a.click();\r\n // window.URL.revokeObjectURL(url);\r\n // document.body.removeChild(a);\r\n // }).catch(error => {\r\n // this.loading = false\r\n // })\r\n }\r\n}\r\n\r\nexport default {\r\n data: data,\r\n methods: methods,\r\n mounted: mounted,\r\n components: components,\r\n props: props\r\n}"],"mappings":"AAAA,SAAQA,aAAa,QAAO,sBAAsB;AAElD,MAAMC,UAAU,GAAG,CAAC,CAAC;AAErB,MAAMC,KAAK,GAAG,CAAC,iBAAiB,CAAC;AAEjC,MAAMC,IAAI,GAAG,SAAAA,CAAA,EAAY;EACrB,OAAO;IACHC,IAAI,EAAE;MACFC,IAAI,EAAE,EAAE;MACRC,IAAI,EAAE,EAAE;MACRC,IAAI,EAAE,EAAE;MACRC,IAAI,EAAE,EAAE;MACRC,QAAQ,EAAE;IACd,CAAC;IACDC,aAAa,EAAE,CAAC,CAAC;IACjBC,OAAO,EAAE,KAAK;IACdC,OAAO,EAAE,EAAE;IACXC,UAAU,EAAE,EAAE;IACdC,mBAAmB,EAAE,CAAC,CAAC;IACvBC,eAAe,EAAE;EACrB,CAAC;AACL,CAAC;AAED,SAASC,OAAOA,CAAA,EAAG;EACf,IAAI,CAACC,UAAU,CAAC,CAAC;AACrB;AAEA,MAAMC,OAAO,GAAG;EACZD,UAAUA,CAAA,EAAG;IACTjB,aAAa,CAAC;MACVmB,MAAM,EAAE,MAAM;MACdC,GAAG,EAAE,yCAAyC;MAC9CjB,IAAI,EAAE;QACFkB,QAAQ,EAAE,qBAAqB;QAC/BC,KAAK,EAAE,WAAW;QAClBC,YAAY,EAAE;UACVC,YAAY,EAAE,IAAI,CAACC;QACvB;MACJ;IACJ,CAAC,CAAC,CAACC,IAAI,CAACC,GAAG,IAAI;MACX,IAAI,CAACb,mBAAmB,GAAGc,IAAI,CAACC,KAAK,CAACF,GAAG,CAACxB,IAAI,CAACA,IAAI,CAAC;MACpDyB,IAAI,CAACC,KAAK,CAACF,GAAG,CAACxB,IAAI,CAACA,IAAI,CAAC,CAAC2B,KAAK,CAACC,GAAG,CAACC,IAAI,IAAI;QACxCC,OAAO,CAACC,GAAG,CAACF,IAAI,CAAC;QACjB,IAAI,CAACtB,aAAa,CAACsB,IAAI,CAAC3B,IAAI,CAAC,GAAG;UAC5B8B,MAAM,EAAE,EAAE;UACVC,IAAI,EAAE,EAAE;UACRC,MAAM,EAAE,EAAE;UACVC,GAAG,EAAE,EAAE;UACPC,KAAK,EAAE;QACX,CAAC;MACL,CAAC,CAAC;IACN,CAAC,CAAC;EACN,CAAC;EACDC,cAAcA,CAAA,EAAG;IACbP,OAAO,CAACC,GAAG,CAAC,IAAI,CAACxB,aAAa,CAAC;IAC/B;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;EACJ;AACJ,CAAC;AAED,eAAe;EACXP,IAAI,EAAEA,IAAI;EACVe,OAAO,EAAEA,OAAO;EAChBF,OAAO,EAAEA,OAAO;EAChBf,UAAU,EAAEA,UAAU;EACtBC,KAAK,EAAEA;AACX,CAAC","ignoreList":[]},"metadata":{},"sourceType":"module","externalDependencies":[]}