{"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 all_apps: [],\n add_model: false,\n add_model_form: {\n name: \"\",\n name_cn: \"\",\n app_id: 1\n },\n field_type_options: [{\n label: \"CharField\",\n value: \"CharField\"\n }, {\n label: \"IntegerField\",\n value: \"IntegerField\"\n }, {\n label: \"DateTimeField\",\n value: \"DateTimeField\"\n }, {\n label: \"\",\n value: \"\"\n }]\n };\n};\nfunction mounted() {\n this.get_all_table();\n this.get_all_apps();\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_all_apps() {\n ZeroCodeAxios({\n method: 'GET',\n url: '/zero_code_base/zero_code_main/apps/'\n }).then(res => {\n this.all_apps = res.data.data;\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 submit_model_create() {\n ZeroCodeAxios({\n method: 'POST',\n url: '/zero_code_base/zero_code_main/model/',\n data: this.add_model_form\n }).then(res => {\n this.get_all_table();\n this.add_model = 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","all_apps","add_model","add_model_form","name","name_cn","app_id","field_type_options","label","value","mounted","get_all_table","get_all_apps","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","del_setting","submit_fields","submit_fields_settings","submit_model_create"],"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 all_apps: [],\n add_model: false,\n add_model_form: {\n name: \"\",\n name_cn: \"\",\n app_id: 1\n },\n field_type_options: [\n {\n label: \"CharField\",\n value: \"CharField\",\n },\n {\n label: \"IntegerField\",\n value: \"IntegerField\",\n },\n {\n label: \"DateTimeField\",\n value: \"DateTimeField\",\n },\n {\n label: \"\",\n value: \"\",\n }\n ]\n }\n}\n\nfunction mounted() {\n this.get_all_table()\n this.get_all_apps()\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_all_apps() {\n ZeroCodeAxios({\n method: 'GET',\n url: '/zero_code_base/zero_code_main/apps/',\n }).then((res) => {\n this.all_apps = res.data.data;\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 submit_model_create() {\n ZeroCodeAxios({\n method: 'POST',\n url: '/zero_code_base/zero_code_main/model/',\n data: this.add_model_form\n }).then((res) => {\n this.get_all_table()\n this.add_model = 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,EAAE,EAAE;IACpBC,QAAQ,EAAE,EAAE;IACZC,SAAS,EAAE,KAAK;IAChBC,cAAc,EAAE;MACZC,IAAI,EAAE,EAAE;MACRC,OAAO,EAAE,EAAE;MACXC,MAAM,EAAE;IACZ,CAAC;IACDC,kBAAkB,EAAE,CAChB;MACIC,KAAK,EAAE,WAAW;MAClBC,KAAK,EAAE;IACX,CAAC,EACD;MACID,KAAK,EAAE,cAAc;MACrBC,KAAK,EAAE;IACX,CAAC,EACD;MACID,KAAK,EAAE,eAAe;MACtBC,KAAK,EAAE;IACX,CAAC,EACD;MACID,KAAK,EAAE,EAAE;MACTC,KAAK,EAAE;IACX,CAAC;EAET,CAAC;AACL,CAAC;AAED,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