1 |
- {"remainingRequest":"D:\\jiayue\\cemp-ui\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!D:\\jiayue\\cemp-ui\\src\\views\\gen\\datasource.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jiayue\\cemp-ui\\src\\views\\gen\\datasource.vue","mtime":1619070292892},{"path":"D:\\jiayue\\cemp-ui\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jiayue\\cemp-ui\\node_modules\\babel-loader\\lib\\index.js","mtime":315532800000},{"path":"D:\\jiayue\\cemp-ui\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jiayue\\cemp-ui\\node_modules\\vue-loader\\lib\\index.js","mtime":499162500000}],"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\nimport {addObj, delObj, fetchDsList, putObj} from '@/api/gen/gen'\nimport {formOption, tableDsOption, tableOption} from '@/const/crud/gen/gen'\n\nexport default {\n name: 'CodeGenerator',\n data() {\n return {\n dataSourceList: [],\n tableDsData: [],\n box: false,\n dsPage: {\n total: 0, // 总页数\n currentPage: 1, // 当前页数\n pageSize: 20 // 每页显示多少条\n },\n dsForm: {},\n tableLoading: false,\n tableOption: tableOption,\n tableDsOption: tableDsOption,\n formOption: formOption\n }\n },\n created() {\n },\n methods: {\n rowDel: function (row, index) {\n this.$confirm('是否确认删除ID为' + row.id, '提示', {\n confirmButtonText: '确定',\n cancelButtonText: '取消',\n type: 'warning'\n }).then(function () {\n return delObj(row.id)\n }).then(() => {\n this.$message.success('删除成功')\n this.getDsList(this.dsPage)\n })\n },\n handleOpenBefore: function (show) {\n this.dsForm.password = undefined\n show()\n },\n handleUpdate: function (row, index, done,loading) {\n putObj(row).then(res => {\n if (res.data.data){\n done()\n this.$message.success('修改成功')\n }else {\n loading()\n this.$message.error('修改失败,数据源不可访问')\n }\n this.getDsList(this.dsPage)\n })\n },\n handleSave: function (row, done,loading) {\n addObj(row).then(res => {\n if (res.data.data){\n done()\n this.$message.success('添加成功')\n }else {\n loading()\n this.$message.error('添加失败,数据源不可访问')\n }\n this.getDsList(this.dsPage)\n })\n },\n getDsList(page, params) {\n fetchDsList(Object.assign({\n current: page.currentPage,\n size: page.pageSize\n }, params)).then(response => {\n this.tableDsData = response.data.data.records\n this.dsPage.total = response.data.data.total\n })\n },\n sizeChange(pageSize) {\n this.page.pageSize = pageSize\n },\n currentChange(current) {\n this.page.currentPage = current\n },\n refreshDsChange() {\n this.getDsList(this.dsPage)\n }\n }\n}\n",{"version":3,"sources":["datasource.vue"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuCA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","file":"datasource.vue","sourceRoot":"src/views/gen","sourcesContent":["<!--\r\n - Copyright (c) 2018-2025, test All rights reserved.\r\n -\r\n - Redistribution and use in source and binary forms, with or without\r\n - modification, are permitted provided that the following conditions are met:\r\n -\r\n - Redistributions of source code must retain the above copyright notice,\r\n - this list of conditions and the following disclaimer.\r\n - Redistributions in binary form must reproduce the above copyright\r\n - notice, this list of conditions and the following disclaimer in the\r\n - documentation and/or other materials provided with the distribution.\r\n - Neither the name of the pig4cloud.com developer nor the names of its\r\n - contributors may be used to endorse or promote products derived from\r\n - this software without specific prior written permission.\r\n - Author: test\r\n -->\r\n\r\n<template>\r\n <div class=\"execution\">\r\n <basic-container>\r\n <avue-crud\r\n ref=\"data-source-settings-crud\"\r\n v-model=\"dsForm\"\r\n :page.sync=\"dsPage\"\r\n :data=\"tableDsData\"\r\n :option=\"tableDsOption\"\r\n :before-open=\"handleOpenBefore\"\r\n @row-update=\"handleUpdate\"\r\n @row-save=\"handleSave\"\r\n @row-del=\"rowDel\"\r\n @size-change=\"sizeChange\"\r\n @current-change=\"currentChange\"\r\n @refresh-change=\"refreshDsChange\"\r\n @on-load=\"getDsList\"/>\r\n </basic-container>\r\n </div>\r\n</template>\r\n\r\n<script>\r\n import {addObj, delObj, fetchDsList, putObj} from '@/api/gen/gen'\r\n import {formOption, tableDsOption, tableOption} from '@/const/crud/gen/gen'\r\n\r\n export default {\r\n name: 'CodeGenerator',\r\n data() {\r\n return {\r\n dataSourceList: [],\r\n tableDsData: [],\r\n box: false,\r\n dsPage: {\r\n total: 0, // 总页数\r\n currentPage: 1, // 当前页数\r\n pageSize: 20 // 每页显示多少条\r\n },\r\n dsForm: {},\r\n tableLoading: false,\r\n tableOption: tableOption,\r\n tableDsOption: tableDsOption,\r\n formOption: formOption\r\n }\r\n },\r\n created() {\r\n },\r\n methods: {\r\n rowDel: function (row, index) {\r\n this.$confirm('是否确认删除ID为' + row.id, '提示', {\r\n confirmButtonText: '确定',\r\n cancelButtonText: '取消',\r\n type: 'warning'\r\n }).then(function () {\r\n return delObj(row.id)\r\n }).then(() => {\r\n this.$message.success('删除成功')\r\n this.getDsList(this.dsPage)\r\n })\r\n },\r\n handleOpenBefore: function (show) {\r\n this.dsForm.password = undefined\r\n show()\r\n },\r\n handleUpdate: function (row, index, done,loading) {\r\n putObj(row).then(res => {\r\n if (res.data.data){\r\n done()\r\n this.$message.success('修改成功')\r\n }else {\r\n loading()\r\n this.$message.error('修改失败,数据源不可访问')\r\n }\r\n this.getDsList(this.dsPage)\r\n })\r\n },\r\n handleSave: function (row, done,loading) {\r\n addObj(row).then(res => {\r\n if (res.data.data){\r\n done()\r\n this.$message.success('添加成功')\r\n }else {\r\n loading()\r\n this.$message.error('添加失败,数据源不可访问')\r\n }\r\n this.getDsList(this.dsPage)\r\n })\r\n },\r\n getDsList(page, params) {\r\n fetchDsList(Object.assign({\r\n current: page.currentPage,\r\n size: page.pageSize\r\n }, params)).then(response => {\r\n this.tableDsData = response.data.data.records\r\n this.dsPage.total = response.data.data.total\r\n })\r\n },\r\n sizeChange(pageSize) {\r\n this.page.pageSize = pageSize\r\n },\r\n currentChange(current) {\r\n this.page.currentPage = current\r\n },\r\n refreshDsChange() {\r\n this.getDsList(this.dsPage)\r\n }\r\n }\r\n }\r\n</script>\r\n\r\n<style lang=\"scss\" scoped>\r\n</style>\r\n\r\n"]}]}
|