1 line
10 KiB
JSON
1 line
10 KiB
JSON
{"ast":null,"code":"import \"core-js/modules/es.array.push.js\";\nimport { ZeroCodeAxios } from \"@/request/request\";\nconst components = {};\nconst data = function () {\n return {\n rows: [],\n de_rows: [],\n settings_rows: [],\n select_Rows: [],\n edit_table_dialog: false,\n edit_field_dialog: false,\n search: \"\",\n de_search: \"\",\n settings_search: \"\",\n now_select_table: \"\",\n add_model: \"\",\n add_model_form: {\n name: \"\",\n name_cn: \"\",\n app_id: 1\n }\n };\n};\nfunction mounted() {\n this.get_all_table();\n}\nconst methods = {\n get_all_table() {\n ZeroCodeAxios({\n method: 'GET',\n url: '/zero_code_base/zero_code_main/api/'\n }).then(res => {\n this.rows = res.data.datas;\n });\n },\n get_field_list(row) {\n this.now_select_table = row.id;\n ZeroCodeAxios({\n method: 'GET',\n url: '/zero_code_base/zero_code_main/detail/',\n params: {\n id: row.id\n }\n }).then(res => {\n this.de_rows = res.data.datas;\n this.select_Rows = res.data.datas;\n });\n },\n get_setting_list(row) {\n ZeroCodeAxios({\n method: 'GET',\n url: '/zero_code_base/zero_code_main/settings_detail/',\n params: {\n id: row.id\n }\n }).then(res => {\n this.settings_rows = res.data.datas;\n });\n },\n handleEditField(row) {\n this.get_field_list(row);\n this.edit_table_dialog = true;\n },\n handleEditFieldSettings(row) {\n this.get_field_list(row);\n this.get_setting_list(row);\n this.edit_field_dialog = true;\n },\n handleDelete(row) {},\n add_field() {\n this.de_rows.push({\n model: this.now_select_table,\n name: \"\",\n name_cn: \"\",\n type: \"\"\n });\n },\n del_field(index) {\n this.de_rows.splice(index, 1);\n },\n add_setting() {\n this.settings_rows.push({\n field: {\n id: \"\"\n },\n name: \"\",\n name_cn: \"\",\n value: \"\"\n });\n },\n del_setting(index) {\n this.settings_rows.splice(index, 1);\n },\n submit_fields() {\n ZeroCodeAxios({\n method: 'POST',\n url: '/zero_code_base/zero_code_main/detail/',\n data: this.de_rows\n }).then(res => {\n this.get_field_list({\n id: this.now_select_table\n });\n this.get_setting_list({\n id: this.now_select_table\n });\n this.edit_table_dialog = false;\n });\n },\n submit_fields_settings() {\n ZeroCodeAxios({\n method: 'POST',\n url: '/zero_code_base/zero_code_main/settings_detail/',\n data: this.settings_rows\n }).then(res => {\n this.get_field_list({\n id: this.now_select_table\n });\n this.get_setting_list({\n id: this.now_select_table\n });\n this.edit_field_dialog = false;\n });\n }\n};\nexport default {\n data: data,\n methods: methods,\n mounted: mounted,\n components: components\n};","map":{"version":3,"names":["ZeroCodeAxios","components","data","rows","de_rows","settings_rows","select_Rows","edit_table_dialog","edit_field_dialog","search","de_search","settings_search","now_select_table","add_model","add_model_form","name","name_cn","app_id","mounted","get_all_table","methods","method","url","then","res","datas","get_field_list","row","id","params","get_setting_list","handleEditField","handleEditFieldSettings","handleDelete","add_field","push","model","type","del_field","index","splice","add_setting","field","value","del_setting","submit_fields","submit_fields_settings"],"sources":["/Users/xubincheng/Desktop/job/zero_code_all/zero_project/Project1/main/client/src/components/data_manage/DatabaseManagement/NewTableManage/NewTableManage.js"],"sourcesContent":["import {ZeroCodeAxios} from \"@/request/request\";\n\nconst components = {}\n\nconst data = function () {\n return {\n rows: [],\n de_rows: [],\n settings_rows: [],\n select_Rows: [],\n edit_table_dialog: false,\n edit_field_dialog: false,\n search: \"\",\n de_search: \"\",\n settings_search: \"\",\n now_select_table: \"\",\n add_model: \"\",\n add_model_form: {\n name: \"\",\n name_cn: \"\",\n app_id: 1\n }\n }\n}\n\nfunction mounted() {\n this.get_all_table()\n}\n\nconst methods = {\n get_all_table() {\n ZeroCodeAxios({\n method: 'GET',\n url: '/zero_code_base/zero_code_main/api/',\n }).then((res) => {\n this.rows = res.data.datas;\n })\n },\n get_field_list(row) {\n this.now_select_table = row.id\n ZeroCodeAxios({\n method: 'GET',\n url: '/zero_code_base/zero_code_main/detail/',\n params: {\n id: row.id\n }\n }).then((res) => {\n this.de_rows = res.data.datas;\n this.select_Rows = res.data.datas;\n })\n },\n get_setting_list(row) {\n ZeroCodeAxios({\n method: 'GET',\n url: '/zero_code_base/zero_code_main/settings_detail/',\n params: {\n id: row.id\n }\n }).then((res) => {\n this.settings_rows = res.data.datas;\n })\n },\n handleEditField(row) {\n this.get_field_list(row)\n this.edit_table_dialog = true\n },\n handleEditFieldSettings(row) {\n this.get_field_list(row)\n this.get_setting_list(row)\n this.edit_field_dialog = true\n },\n handleDelete(row) {\n },\n add_field() {\n this.de_rows.push({\n model: this.now_select_table,\n name: \"\",\n name_cn: \"\",\n type: \"\",\n })\n },\n del_field(index) {\n this.de_rows.splice(index, 1)\n },\n add_setting() {\n this.settings_rows.push({\n field: {id: \"\"},\n name: \"\",\n name_cn: \"\",\n value: \"\",\n })\n },\n del_setting(index) {\n this.settings_rows.splice(index, 1)\n },\n submit_fields() {\n ZeroCodeAxios({\n method: 'POST',\n url: '/zero_code_base/zero_code_main/detail/',\n data: this.de_rows,\n }).then((res) => {\n this.get_field_list({id: this.now_select_table})\n this.get_setting_list({id: this.now_select_table})\n this.edit_table_dialog = false\n })\n },\n submit_fields_settings() {\n ZeroCodeAxios({\n method: 'POST',\n url: '/zero_code_base/zero_code_main/settings_detail/',\n data: this.settings_rows\n }).then((res) => {\n this.get_field_list({id: this.now_select_table})\n this.get_setting_list({id: this.now_select_table})\n this.edit_field_dialog = false\n })\n }\n}\n\nexport default {\n data: data,\n methods: methods,\n mounted: mounted,\n components: components,\n}"],"mappings":";AAAA,SAAQA,aAAa,QAAO,mBAAmB;AAE/C,MAAMC,UAAU,GAAG,CAAC,CAAC;AAErB,MAAMC,IAAI,GAAG,SAAAA,CAAA,EAAY;EACrB,OAAO;IACHC,IAAI,EAAE,EAAE;IACRC,OAAO,EAAE,EAAE;IACXC,aAAa,EAAE,EAAE;IACjBC,WAAW,EAAE,EAAE;IACfC,iBAAiB,EAAE,KAAK;IACxBC,iBAAiB,EAAE,KAAK;IACxBC,MAAM,EAAE,EAAE;IACVC,SAAS,EAAE,EAAE;IACbC,eAAe,EAAE,EAAE;IACnBC,gBAAgB,E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