😎1、修改数据库表描述逻辑 2、升级npm依赖
This commit is contained in:
parent
6b9c952889
commit
413a14061f
@ -163,11 +163,7 @@ public class SysDatabaseService : IDynamicApiController, ITransient
|
||||
public void DeleteColumn(DeleteDbColumnInput input)
|
||||
{
|
||||
var db = _db.AsTenant().GetConnectionScope(input.ConfigId);
|
||||
// 当只有1列时,直接删除表
|
||||
if (db.DbMaintenance.GetColumnInfosByTableName(input.TableName, false).Count == 1)
|
||||
db.DbMaintenance.DropTable(input.TableName);
|
||||
else
|
||||
db.DbMaintenance.DropColumn(input.TableName, input.DbColumnName);
|
||||
db.DbMaintenance.DropColumn(input.TableName, input.DbColumnName);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -258,7 +254,8 @@ public class SysDatabaseService : IDynamicApiController, ITransient
|
||||
{
|
||||
if (db.DbMaintenance.IsAnyTableRemark(input.TableName))
|
||||
db.DbMaintenance.DeleteTableRemark(input.TableName);
|
||||
else
|
||||
|
||||
if (!string.IsNullOrWhiteSpace(input.Description))
|
||||
db.DbMaintenance.AddTableRemark(input.TableName, input.Description);
|
||||
}
|
||||
catch (NotSupportedException ex)
|
||||
|
||||
@ -31,7 +31,7 @@
|
||||
"echarts": "^5.5.0",
|
||||
"echarts-gl": "^2.0.9",
|
||||
"echarts-wordcloud": "^2.1.0",
|
||||
"element-plus": "^2.7.5",
|
||||
"element-plus": "^2.7.6",
|
||||
"gcoord": "^1.0.6",
|
||||
"js-cookie": "^3.0.5",
|
||||
"js-table2excel": "^1.1.2",
|
||||
@ -60,7 +60,7 @@
|
||||
"vue-i18n": "^9.13.1",
|
||||
"vue-json-pretty": "^2.4.0",
|
||||
"vue-plugin-hiprint": "0.0.57-beta20",
|
||||
"vue-router": "^4.3.3",
|
||||
"vue-router": "^4.4.0",
|
||||
"vue-signature-pad": "^3.0.2",
|
||||
"vue3-tree-org": "^4.2.2",
|
||||
"vuedraggable": "4.0.3",
|
||||
@ -69,11 +69,11 @@
|
||||
"devDependencies": {
|
||||
"@plugin-web-update-notification/vite": "^1.7.1",
|
||||
"@types/lodash-es": "^4.17.12",
|
||||
"@types/node": "^20.14.2",
|
||||
"@types/node": "^20.14.7",
|
||||
"@types/nprogress": "^0.2.3",
|
||||
"@types/sortablejs": "^1.15.8",
|
||||
"@typescript-eslint/eslint-plugin": "^7.13.0",
|
||||
"@typescript-eslint/parser": "^7.13.0",
|
||||
"@typescript-eslint/eslint-plugin": "^7.13.1",
|
||||
"@typescript-eslint/parser": "^7.13.1",
|
||||
"@vitejs/plugin-vue": "^5.0.5",
|
||||
"@vitejs/plugin-vue-jsx": "^4.0.0",
|
||||
"@vue/compiler-sfc": "^3.4.29",
|
||||
@ -83,9 +83,9 @@
|
||||
"less": "^4.2.0",
|
||||
"prettier": "^3.3.2",
|
||||
"rollup-plugin-visualizer": "^5.12.0",
|
||||
"sass": "^1.77.5",
|
||||
"sass": "^1.77.6",
|
||||
"terser": "^5.31.1",
|
||||
"typescript": "^5.4.5",
|
||||
"typescript": "^5.5.2",
|
||||
"vite": "^5.3.1",
|
||||
"vite-plugin-cdn-import": "^1.0.1",
|
||||
"vite-plugin-compression2": "^1.1.1",
|
||||
|
||||
@ -16,7 +16,7 @@
|
||||
<el-button-group>
|
||||
<el-button icon="ele-Plus" type="primary" @click="openAddTable"> 增加表 </el-button>
|
||||
<el-button icon="ele-Edit" @click="openEditTable"> 编辑表 </el-button>
|
||||
<el-button icon="ele-Delete" type="danger" @click="delTable"> 删除表 </el-button>
|
||||
<el-button icon="ele-Delete" type="danger" @click="delTable" disabled> 删除表 </el-button>
|
||||
<el-button icon="ele-View" @click="visualTable"> 可视化 </el-button>
|
||||
</el-button-group>
|
||||
<el-button-group style="padding-left: 10px">
|
||||
@ -136,7 +136,7 @@ const handleQueryTable = async () => {
|
||||
var res = await getAPI(SysDatabaseApi).apiSysDatabaseTableListConfigIdGet(state.configId);
|
||||
let tableData = res.data.result ?? [];
|
||||
tableData.forEach((element: any) => {
|
||||
// 排除 zero_ 开头的表
|
||||
//排除zero_开头的表
|
||||
if (!element.name.startsWith('zero_')) {
|
||||
state.tableData.push(element);
|
||||
}
|
||||
@ -147,9 +147,10 @@ const handleQueryTable = async () => {
|
||||
// 列查询操作
|
||||
const handleQueryColumn = async () => {
|
||||
state.columnData = [];
|
||||
if (state.tableName == '') return;
|
||||
if (state.tableName == '' || typeof state.tableName == 'undefined') return;
|
||||
|
||||
state.loading1 = true;
|
||||
state.tableData = [];
|
||||
var res = await getAPI(SysDatabaseApi).apiSysDatabaseColumnListTableNameConfigIdGet(state.tableName, state.configId);
|
||||
state.columnData = res.data.result ?? [];
|
||||
state.loading1 = false;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user