Files
ZERO_CODE/ZeroCodeProject/main/client/node_modules/.cache/babel-loader/cda885e8b1a6d3db81ba5d964fd61191f95c0a185480806fbde2a770e0642802.json

1 line
12 KiB
JSON
Raw Normal View History

2026-01-11 00:11:34 +08:00
{"ast":null,"code":"import Axios from 'axios';\nimport { codemirror } from \"vue-codemirror\";\nimport { ZeroCodeAxios } from \"@/request/request\";\nconst components = {\n codemirror\n};\nconst props = ['form_data'];\nconst data = function () {\n return {\n file_update_api: false,\n code_update_api: false,\n textarea: 'for i in range(1,10):\\n' + ' import os\\n' + ' i = i + 1\\n' + ' if i == 1:\\n' + ' pass\\n' + ' else:\\n' + ' path = os.path.join(\"sss\", \"change_template\",\"sssssssssssssssssssssssssssssssssss\", \"public\",\\n' + ' \"static\",\\n' + ' \"basedata\")',\n fileList: [],\n code_string: \"\",\n submit_data_dict: {},\n submit_data_source_dict: {},\n options: {\n line: true,\n theme: \"rubyblue\",\n // 主题\n tabSize: 4,\n // 制表符的宽度\n indentUnit: 4,\n // 一个块应该缩进多少个空格(无论这在编辑语言中意味着什么)。默认值为 2。\n firstLineNumber: 1,\n // 从哪个数字开始计算行数。默认值为 1。\n readOnly: false,\n // 只读\n autorefresh: true,\n smartIndent: true,\n // 上下文缩进\n lineNumbers: true,\n // 是否显示行号\n styleActiveLine: true,\n // 高亮选中行\n viewportMargin: Infinity,\n //处理高度自适应时搭配使用\n showCursorWhenSelecting: true,\n // 当选择处于活动状态时是否应绘制游标\n mode: \"python\"\n }\n };\n};\nfunction mounted() {\n this.get_select_data(this.form_data);\n}\nconst methods = {\n get_select_data(form_data) {\n form_data.forEach(item => {\n if (item.type === 'ManyToManyField') {\n ZeroCodeAxios({\n method: \"POST\",\n url: \"/zero_code_base/zero_code_main/record/related/\",\n data: item\n }).then(res => {\n this.submit_data_source_dict[item.name] = res.data.data;\n });\n }\n });\n },\n submitUpload() {\n let form_data = new FormData();\n form_data.append(\"file_path\", this.fileList[0].raw);\n form_data.append(\"name\", this.fileList[0].name);\n Axios({\n method: \"POST\",\n url: \"http://47.116.15.186:10105/ApiClass/base_api_control/api_url/\",\n data: form_data,\n headers: {\n \"Content-Type\": \"multipart/form-data\"\n },\n onUploadProgress: progressEvent => {\n this.progressupdate = Math.round(progressEvent.loaded * 100 / progressEvent.total);\n },\n onDownloadProgress: progressEvent => {\n this.progressend = Math.round(progressEvent.loaded * 100 / progressEvent.total);\n if (this.progressend == 100) {\n this.dispalyprogress = false;\n }\n }\n }).then(res => {\n this.textarea = res.data.return_data.data.data;\n if (res.data.return_data.data.status == 200) {\n this.$message({\n message: res.data.return_data.data.msg,\n type: 'success'\n });\n } else {\n this.$message({\n message: res.data.return_data.data.msg,\n type: 'warning'\n });\n }\n });\n },\n handleRemove(file, fileList) {\n console.log(file, fileList);\n },\n handleChange(file, fileList) {\n this.fileList = fileList;\n },\n submit() {\n ZeroCodeAxios({\n method: \"POST\",\n url: \"\",\n data: {}\n }).then(res => {});\n },\n above() {\n this.$emit('father_above');\n }\n};\nexport default {\n data: data,\n methods: methods,\n mounted: mounted,\n components: components,\n props: props\n};","map":{"version":3,"names":["Axios","codemirror","ZeroCodeAxios","components","props","data","file_update_api","code_update_api","textarea","fileList","code_string","submit_data_dict","submit_data_source_dict","options","line","theme","tabSize","indentUnit","firstLineNumber","readOnly","autorefresh","smartIndent","lineNumbers","styleActiveLine","viewportMargin","Infinity","showCursorWhenSelecting","mode"