1 line
6.6 KiB
JSON
1 line
6.6 KiB
JSON
{"remainingRequest":"D:\\data\\hanguodoushan\\acs2\\nladmin-ui\\node_modules\\babel-loader\\lib\\index.js!D:\\data\\hanguodoushan\\acs2\\nladmin-ui\\node_modules\\cache-loader\\dist\\cjs.js??ref--0-0!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\\config.vue?vue&type=script&lang=js","dependencies":[{"path":"D:\\data\\hanguodoushan\\acs2\\nladmin-ui\\src\\views\\generator\\config.vue","mtime":1732871026694},{"path":"D:\\data\\hanguodoushan\\acs2\\nladmin-ui\\babel.config.js","mtime":1732871025888},{"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":["\"use strict\";\n\nvar _interopRequireDefault = require(\"D:/data/hanguodoushan/acs2/nladmin-ui/node_modules/@babel/runtime/helpers/interopRequireDefault.js\");\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nrequire(\"core-js/modules/es6.regexp.to-string\");\nvar _crud = _interopRequireDefault(require(\"@/mixins/crud\"));\nvar _genConfig = require(\"@/api/generator/genConfig\");\nvar _generator = require(\"@/api/generator/generator\");\nvar _dict = require(\"@/views/system/dict/dict\");\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//\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//\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//\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//\nvar _default = exports.default = {\n name: 'GeneratorConfig',\n components: {},\n mixins: [_crud.default],\n data: function data() {\n return {\n activeName: 'first',\n table_name: '',\n tableHeight: 550,\n columnLoading: false,\n configLoading: false,\n dicts: [],\n syncLoading: false,\n genLoading: false,\n form: {\n id: null,\n table_name: '',\n author: '',\n pack: '',\n path: '',\n module_name: '',\n cover: 'false',\n apiPath: '',\n prefix: '',\n api_alias: null\n },\n rules: {\n author: [{\n required: true,\n message: '作者不能为空',\n trigger: 'blur'\n }],\n pack: [{\n required: true,\n message: '包路径不能为空',\n trigger: 'blur'\n }],\n module_name: [{\n required: true,\n message: '包路径不能为空',\n trigger: 'blur'\n }],\n path: [{\n required: true,\n message: '前端路径不能为空',\n trigger: 'blur'\n }],\n api_alias: [{\n required: true,\n message: '接口名称不能为空',\n trigger: 'blur'\n }],\n cover: [{\n required: true,\n message: '不能为空',\n trigger: 'blur'\n }]\n }\n };\n },\n created: function created() {\n var _this = this;\n this.tableHeight = document.documentElement.clientHeight - 385;\n this.table_name = this.$route.params.tableName;\n this.$nextTick(function () {\n _this.init();\n (0, _genConfig.get)(_this.table_name).then(function (data) {\n // 获取作者等信息\n _this.form = data;\n _this.form.cover = _this.form.cover.toString();\n });\n (0, _dict.getDicts)().then(function (data) {\n _this.dicts = data;\n });\n });\n },\n methods: {\n beforeInit: function beforeInit() {\n this.url = 'api/generator/columns';\n var tableName = this.table_name;\n this.params = {\n tableName: tableName\n };\n return true;\n },\n saveColumnConfig: function saveColumnConfig() {\n var _this2 = this;\n this.columnLoading = true;\n (0, _generator.save)(this.data).then(function (res) {\n _this2.notify('保存成功', 'success');\n _this2.columnLoading = false;\n }).catch(function (err) {\n _this2.columnLoading = false;\n console.log(err.response.data.message);\n });\n },\n doSubmit: function doSubmit() {\n var _this3 = this;\n this.$refs['form'].validate(function (valid) {\n if (valid) {\n _this3.configLoading = true;\n (0, _genConfig.update)(_this3.form).then(function (res) {\n _this3.notify('保存成功', 'success');\n _this3.form = res;\n _this3.form.cover = _this3.form.cover.toString();\n _this3.configLoading = false;\n }).catch(function (err) {\n _this3.configLoading = false;\n console.log(err.response.data.message);\n });\n }\n });\n },\n sync: function sync() {\n var _this4 = this;\n this.syncLoading = true;\n (0, _generator.sync)([this.table_name]).then(function () {\n _this4.init();\n _this4.notify('同步成功', 'success');\n _this4.syncLoading = false;\n }).then(function () {\n _this4.syncLoading = false;\n });\n },\n toGen: function toGen() {\n var _this5 = this;\n this.genLoading = true;\n (0, _generator.save)(this.data).then(function (res) {\n _this5.notify('保存成功', 'success');\n // 生成代码\n (0, _generator.generator)(_this5.table_name, 0).then(function (data) {\n _this5.genLoading = false;\n _this5.notify('生成成功', 'success');\n }).catch(function (err) {\n _this5.genLoading = false;\n console.log(err.response.data.message);\n });\n }).catch(function (err) {\n _this5.genLoading = false;\n console.log(err.response.data.message);\n });\n }\n }\n};",null]} |