add
This commit is contained in:
@ -68,9 +68,9 @@ export function genCode(tableName) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 同步数据库
|
// 同步数据库
|
||||||
export function synchDb(tableName) {
|
export function syncTable(tableId) {
|
||||||
return request({
|
return request({
|
||||||
url: "/tool/gen/synchDb/" + tableName,
|
url: "/tool/gen/syncTable/" + tableId,
|
||||||
method: "get",
|
method: "get",
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -33,16 +33,6 @@
|
|||||||
</el-form>
|
</el-form>
|
||||||
|
|
||||||
<el-row :gutter="10" class="mb8">
|
<el-row :gutter="10" class="mb8">
|
||||||
<el-col :span="1.5">
|
|
||||||
<el-button
|
|
||||||
type="primary"
|
|
||||||
plain
|
|
||||||
icon="Download"
|
|
||||||
@click="handleGenTable"
|
|
||||||
v-hasPermi="['tool:gen:code']"
|
|
||||||
>生成
|
|
||||||
</el-button>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-button
|
<el-button
|
||||||
type="info"
|
type="info"
|
||||||
@ -167,7 +157,7 @@
|
|||||||
link
|
link
|
||||||
type="primary"
|
type="primary"
|
||||||
icon="Refresh"
|
icon="Refresh"
|
||||||
@click="handleSynchDb(scope.row)"
|
@click="handlesyncTable(scope.row)"
|
||||||
v-hasPermi="['tool:gen:edit']"
|
v-hasPermi="['tool:gen:edit']"
|
||||||
></el-button>
|
></el-button>
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
@ -223,7 +213,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup name="Gen" lang="jsx">
|
<script setup name="Gen" lang="jsx">
|
||||||
import { delTable, listTable, previewTable, synchDb } from "@/api/tool/gen";
|
import { delTable, listTable, previewTable, syncTable } from "@/api/tool/gen";
|
||||||
import router from "@/router";
|
import router from "@/router";
|
||||||
import importTable from "./importTable";
|
import importTable from "./importTable";
|
||||||
import { ElMessageBox } from "element-plus";
|
import { ElMessageBox } from "element-plus";
|
||||||
@ -318,12 +308,12 @@ function handleGenTable(row) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/** 同步数据库操作 */
|
/** 同步数据库操作 */
|
||||||
function handleSynchDb(row) {
|
function handlesyncTable(row) {
|
||||||
const tableName = row.tableName;
|
const tableName = row.tableName;
|
||||||
proxy.$modal
|
proxy.$modal
|
||||||
.confirm('确认要强制同步"' + tableName + '"表结构吗?')
|
.confirm('确认要强制同步"' + tableName + '"表结构吗?')
|
||||||
.then(function () {
|
.then(function () {
|
||||||
return synchDb(tableName);
|
return syncTable(row.tableId);
|
||||||
})
|
})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
proxy.$modal.msgSuccess("同步成功");
|
proxy.$modal.msgSuccess("同步成功");
|
||||||
|
Reference in New Issue
Block a user