master
parent
e687cc3006
commit
c77bc605b0
|
@ -36,11 +36,14 @@ export function updateGenTable(data) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// 导入表
|
// 导入表
|
||||||
export function importTable(data) {
|
export function importTable(tables, dbName) {
|
||||||
return request({
|
return request({
|
||||||
url: '/code/gen/importTable',
|
url: '/code/gen/importTable',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
params: data
|
params: {
|
||||||
|
tables: tables,
|
||||||
|
dbName: dbName
|
||||||
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -53,7 +53,7 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import {importTable, listDbTable, selDbNameAll} from "@/api/tool/gen";
|
import {importTable, listDbTable, selDbNameAll} from "../../../api/tool/gen";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
|
@ -115,7 +115,7 @@ export default {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const dbName = this.queryParams.dbName;
|
const dbName = this.queryParams.dbName;
|
||||||
importTable({tables: tableNames, dbName: dbName}).then(res => {
|
importTable(tableNames, dbName).then(res => {
|
||||||
this.$modal.msgSuccess(res.data.msg);
|
this.$modal.msgSuccess(res.data.msg);
|
||||||
this.visible = false;
|
this.visible = false;
|
||||||
this.$emit("ok");
|
this.$emit("ok");
|
||||||
|
|
|
@ -263,7 +263,9 @@ export default {
|
||||||
/** 查询表集合 */
|
/** 查询表集合 */
|
||||||
getList() {
|
getList() {
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
|
console.log(this.loading)
|
||||||
listTable(this.addDateRange(this.queryParams, this.dateRange)).then(response => {
|
listTable(this.addDateRange(this.queryParams, this.dateRange)).then(response => {
|
||||||
|
console.log(response)
|
||||||
this.tableList = response.data.rows;
|
this.tableList = response.data.rows;
|
||||||
this.total = response.data.total;
|
this.total = response.data.total;
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
|
|
Loading…
Reference in New Issue