1 line
2.7 KiB
JSON
1 line
2.7 KiB
JSON
{"remainingRequest":"D:\\data\\hanguodoushan\\acs2\\nladmin-ui\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!D:\\data\\hanguodoushan\\acs2\\nladmin-ui\\src\\views\\generator\\index.vue?vue&type=script&lang=js","dependencies":[{"path":"D:\\data\\hanguodoushan\\acs2\\nladmin-ui\\src\\views\\generator\\index.vue","mtime":1732871026694},{"path":"D:\\data\\hanguodoushan\\acs2\\nladmin-ui\\node_modules\\cache-loader\\dist\\cjs.js","mtime":1732872824662},{"path":"D:\\data\\hanguodoushan\\acs2\\nladmin-ui\\node_modules\\babel-loader\\lib\\index.js","mtime":1732872825017},{"path":"D:\\data\\hanguodoushan\\acs2\\nladmin-ui\\node_modules\\cache-loader\\dist\\cjs.js","mtime":1732872824662},{"path":"D:\\data\\hanguodoushan\\acs2\\nladmin-ui\\node_modules\\vue-loader\\lib\\index.js","mtime":1732872825835}],"contextDependencies":[],"result":["//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\r\n\r\nimport { generator, sync } from '@/api/generator/generator'\r\nimport { downloadFile } from '@/utils/index'\r\nimport CRUD, { presenter, header } from '@crud/crud'\r\nimport rrOperation from '@crud/RR.operation'\r\nimport crudOperation from '@crud/CRUD.operation'\r\nimport pagination from '@crud/Pagination'\r\n\r\nexport default {\r\n name: 'GeneratorIndex',\r\n components: { pagination, crudOperation, rrOperation },\r\n cruds() {\r\n return CRUD({ url: 'api/generator/tables' })\r\n },\r\n mixins: [presenter(), header()],\r\n data() {\r\n return {\r\n syncLoading: false\r\n }\r\n },\r\n created() {\r\n this.crud.optShow = { add: false, edit: false, del: false, download: false }\r\n },\r\n methods: {\r\n toGen(table_name) {\r\n // 生成代码\r\n generator(table_name, 0).then(data => {\r\n this.$notify({\r\n title: '生成成功',\r\n type: 'success',\r\n duration: 2500\r\n })\r\n })\r\n },\r\n toDownload(table_name) {\r\n // 打包下载\r\n generator(table_name, 2).then(data => {\r\n downloadFile(data, table_name, 'zip')\r\n })\r\n },\r\n sync() {\r\n const tables = []\r\n this.crud.selections.forEach(val => {\r\n tables.push(val.table_name)\r\n })\r\n this.syncLoading = true\r\n sync(tables).then(() => {\r\n this.crud.refresh()\r\n this.crud.notify('同步成功', CRUD.NOTIFICATION_TYPE.SUCCESS)\r\n this.syncLoading = false\r\n }).then(() => {\r\n this.syncLoading = false\r\n })\r\n }\r\n }\r\n}\r\n",null]} |