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

1 line
66 KiB
JSON
Raw Normal View History

2026-01-11 00:11:34 +08:00
{"ast":null,"code":"import \"core-js/modules/es.array.push.js\";\nimport Axios from \"axios\";\nconst components = {};\nconst watch = {\n edit_select(newVal, oldVal) {\n if (newVal === false) {\n this.now_edit_table = {};\n }\n }\n};\nconst data = function () {\n return {\n create_table_form: {\n table_name: \"\",\n table_cn_name: \"\",\n sets: \"\",\n collate: \"\",\n database: \"\",\n host: \"127.0.0.1\",\n user: \"root\",\n password: \"Qq20030722\",\n auto_list: [],\n model_type: \"base\"\n },\n active: 0,\n activeNames: \"1\",\n edit_table_column: false,\n table_data: [],\n database_list: [],\n add_table: false,\n all_model: [],\n table_info: \"\",\n check_info: false,\n edit_select: false,\n table_change_name_dialog: false,\n now_edit_table: {},\n is_edit: false,\n edit_table_name_form: {\n new_name: \"\",\n host: \"127.0.0.1\",\n user: \"root\",\n password: \"Qq20030722\"\n },\n now_fields: [],\n create_relation_table_form: {\n table_list: []\n },\n add_relation_table: false,\n relation_table_list: [],\n table_data_column: [],\n edit_relation_table_form: {\n table_list: []\n },\n edit_relation_table: false,\n now_edit_relation: {},\n edit_table_fields_infos: [],\n open_edit_table_fields_infos: false,\n now_create_relation_table_sign: \"\",\n all_relation_select_fields: [],\n create_columns_uuid: \"\",\n now_create_relation_table_name: \"\"\n };\n};\nfunction mounted() {\n if (this.table_data.length === 0) {\n this.table_data = [{\n attr_name: \"sign\",\n attr_cn_name: \"标识\",\n is_primary: \"no\",\n attr_type: \"VARCHAR\",\n max_length: \"255\",\n is_null: \"no\",\n is_blank: \"no\",\n default: \"default\",\n is_editable: \"yes\",\n is_visible: \"yes\",\n form_type: \"input\",\n to: \"\",\n data_show_fields: [],\n data_show_fields_index: [],\n through: \"\",\n unique: \"no\"\n }];\n }\n this.fetch_data();\n}\nconst methods = {\n checkSelectable(row, index) {\n return row.name !== 'sign';\n },\n async save_relation_table_fields_frontend_set() {\n let data_temp = [];\n this.all_relation_select_fields.forEach(item => {\n data_temp.push({\n field_name: item[\"name\"],\n field_cn_name: item[\"cn_name\"],\n table_name: item.additional.show_data_source,\n additional: item.additional\n });\n });\n let columns_uuid = \"\";\n await Axios({\n method: \"post\",\n url: \"/api/database_table_control/table_record_create/\",\n data: {\n \"table_name\": \"frontend_show\",\n \"relation_table_list\": [],\n \"return_type\": \"False\",\n \"filter_context\": {},\n \"add_data\": {\n \"show_name\": \"default_re_name\",\n \"show_items\": data_temp\n }\n }\n }).then(res => {\n columns_uuid = res.data.data.sign;\n });\n console.log(this.create_columns_uuid);\n Axios({\n method: \"post\",\n url: \"http://47.116.15.186:10003/ApiClass/base_api_control/api_url/\",\n //数据记录编辑\n data: {\n \"table_name\": \"relation_columns\",\n \"relation_table_list\": [],\n \"return_type\": \"False\",\n \"filter_context\": {\n \"sign\": this.create_columns_uuid\n },\n \"edit_data\": {\n \"sign\": this.create_columns_uuid,\n \"frontend_show\": columns_uuid\n }\n }\n }).then(res => {});\n },\n async save_relation_table_fields_select() {\n let all_selection = [];\n this.create_relation_table_form.table_list.forEach(item => {\n all_selection.push(...this.$refs[item.model_name][0].selection);\n });\n this.all_relation_select_fields = all_selection;\n if (this.now_create_relation_table_sign === {}) {\n this.$message({\n message: '',\n type: 'warning'\n }