1 line
6.1 KiB
JSON
1 line
6.1 KiB
JSON
|
|
{"ast":null,"code":"import vueJsonEditor from 'vue-json-editor';\nconst components = {\n vueJsonEditor\n};\nconst data = function () {\n return {\n func_data: {\n function_name: \"basicApiAdd2\",\n function_type: \"基础函数\",\n function_status: \"\",\n function_url: \"basicApiAdd2\",\n function_dec: \"\",\n status: \"\",\n function_code: {}\n },\n project_info: {\n api_name: \"\",\n api_cn_name: \"\",\n api_url: \"\",\n status: 0,\n api_type: \"composite\",\n api_status_one: 100728834,\n api_status_two: 2,\n input_data_format: \"\",\n api_out: \"\"\n }\n };\n};\nfunction mounted() {}\nconst methods = {\n next() {\n this.project_info.api_name = this.func_data.function_name;\n // console.log(\"func_data: \", this.func_data);\n // console.log(\"project_info: \", this.project_info);\n this.$emit('father_next', {\n \"func_data\": this.func_data,\n \"project_info\": this.project_info\n });\n },\n above() {\n this.$emit('father_above');\n },\n onJsonChange(value) {\n //实时保存\n this.onJsonSave(value);\n },\n onJsonSave(value) {\n this.resultInfo = value;\n this.hasJsonFlag = true;\n },\n onError(value) {\n this.hasJsonFlag = false;\n },\n //检查json\n checkJson() {\n if (this.hasJsonFlag == false) {\n this.$message.error(\"json验证失败\");\n returnfalse;\n } else {\n this.$message.success(\"json验证成功\");\n return true;\n }\n },\n //同步函数名\n SyncFunctionName() {\n this.func_data.function_url = this.func_data.function_name;\n }\n};\nexport default {\n data: data,\n methods: methods,\n mounted: mounted,\n components: components\n};","map":{"version":3,"names":["vueJsonEditor","components","data","func_data","function_name","function_type","function_status","function_url","function_dec","status","function_code","project_info","api_name","api_cn_name","api_url","api_type","api_status_one","api_status_two","input_data_format","api_out","mounted","methods","next","$emit","above","onJsonChange","value","onJsonSave","resultInfo","hasJsonFlag","onError","checkJson","$message","error","returnfalse","success","SyncFunctionName"],"sources":["/Users/xubincheng/Desktop/job/zero_code_all/zero_project/ZeroCodeProject/main/client/src/components/data_manage/APIManagement/combination_api_components/page_one/page_one.js"],"sourcesContent":["import vueJsonEditor from 'vue-json-editor'\r\nconst components = {vueJsonEditor}\r\n\r\nconst data = function () {\r\n return {\r\n func_data: {\r\n function_name: \"basicApiAdd2\",\r\n function_type: \"基础函数\",\r\n function_status: \"\",\r\n function_url: \"basicApiAdd2\",\r\n function_dec: \"\",\r\n status: \"\",\r\n function_code: {}\r\n },\r\n project_info: {\r\n api_name: \"\",\r\n api_cn_name: \"\",\r\n api_url: \"\",\r\n status: 0,\r\n api_type: \"composite\",\r\n api_status_one: 100728834,\r\n api_status_two: 2,\r\n input_data_format: \"\",\r\n api_out: \"\"\r\n }\r\n }\r\n}\r\n\r\nfunction mounted() {\r\n\r\n}\r\n\r\nconst methods = {\r\n next() {\r\n this.project_info.api_name = this.func_data.function_name;\r\n // console.log(\"func_data: \", this.func_data);\r\n // console.log(\"project_info: \", this.project_info);\r\n this.$emit('father_next', { \"func_data\": this.func_data, \"project_info\": this.project_info });\r\n },\r\n above() {\r\n this.$emit('father_above');\r\n },\r\n onJsonChange(value) {\r\n //实时保存\r\n this.onJsonSave(value)\r\n },\r\n onJsonSave(value) {\r\n this.resultInfo = value\r\n this.hasJsonFlag = true\r\n },\r\n onError(value) {\r\n this.hasJsonFlag = false\r\n },\r\n //检查json\r\n checkJson() {\r\n if (this.hasJsonFlag ==
|