|
@@ -86,7 +86,7 @@
|
|
@queryTable="getList"
|
|
@queryTable="getList"
|
|
></right-toolbar>
|
|
></right-toolbar>
|
|
</el-row>
|
|
</el-row>
|
|
-
|
|
|
|
|
|
+
|
|
<el-table
|
|
<el-table
|
|
v-loading="loading"
|
|
v-loading="loading"
|
|
:data="tableList"
|
|
:data="tableList"
|
|
@@ -107,7 +107,8 @@
|
|
class-name="small-padding fixed-width"
|
|
class-name="small-padding fixed-width"
|
|
>
|
|
>
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
- <el-button
|
|
|
|
|
|
+ <!-- 修改样式 -->
|
|
|
|
+ <!-- <el-button
|
|
size="mini"
|
|
size="mini"
|
|
type="text"
|
|
type="text"
|
|
icon="el-icon-edit"
|
|
icon="el-icon-edit"
|
|
@@ -120,7 +121,34 @@
|
|
icon="el-icon-delete"
|
|
icon="el-icon-delete"
|
|
@click="handleDelete(scope.row)"
|
|
@click="handleDelete(scope.row)"
|
|
>删除</el-button
|
|
>删除</el-button
|
|
- >
|
|
|
|
|
|
+ > -->
|
|
|
|
+
|
|
|
|
+ <el-dropdown>
|
|
|
|
+ <el-button type="warning" plain size="small">
|
|
|
|
+ 处理<i class="el-icon-arrow-down el-icon--right"></i>
|
|
|
|
+ </el-button>
|
|
|
|
+ <el-dropdown-menu slot="dropdown">
|
|
|
|
+ <el-dropdown-item>
|
|
|
|
+ <el-button
|
|
|
|
+ size="mini"
|
|
|
|
+ type="text"
|
|
|
|
+ icon="el-icon-edit"
|
|
|
|
+ @click="handleUpdate(scope.row)"
|
|
|
|
+ >修改
|
|
|
|
+ </el-button>
|
|
|
|
+ </el-dropdown-item>
|
|
|
|
+ <el-dropdown-item>
|
|
|
|
+ <el-button
|
|
|
|
+ size="mini"
|
|
|
|
+ type="text"
|
|
|
|
+ icon="el-icon-delete"
|
|
|
|
+ @click="handleDelete(scope.row)"
|
|
|
|
+ >删除
|
|
|
|
+ </el-button>
|
|
|
|
+ </el-dropdown-item>
|
|
|
|
+
|
|
|
|
+ </el-dropdown-menu>
|
|
|
|
+ </el-dropdown>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
</el-table>
|
|
</el-table>
|
|
@@ -195,7 +223,8 @@
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
<script>
|
|
<script>
|
|
-import { listTable } from "@/api/dragform/tableList";
|
|
|
|
|
|
+import { listTable, removeTableList } from "@/api/dragform/tableList";
|
|
|
|
+import DictData from "@/components/DictData";
|
|
|
|
|
|
export default {
|
|
export default {
|
|
name: "Table",
|
|
name: "Table",
|
|
@@ -205,6 +234,7 @@ export default {
|
|
loading: true,
|
|
loading: true,
|
|
// 选中数组
|
|
// 选中数组
|
|
ids: [],
|
|
ids: [],
|
|
|
|
+ Keys: [],
|
|
// 非单个禁用
|
|
// 非单个禁用
|
|
single: true,
|
|
single: true,
|
|
// 非多个禁用
|
|
// 非多个禁用
|
|
@@ -295,6 +325,7 @@ export default {
|
|
// 多选框选中数据
|
|
// 多选框选中数据
|
|
handleSelectionChange(selection) {
|
|
handleSelectionChange(selection) {
|
|
this.ids = selection.map((item) => item.tId);
|
|
this.ids = selection.map((item) => item.tId);
|
|
|
|
+ this.Keys = selection.map((item) => item.sqlKey);
|
|
this.single = selection.length !== 1;
|
|
this.single = selection.length !== 1;
|
|
this.multiple = !selection.length;
|
|
this.multiple = !selection.length;
|
|
},
|
|
},
|
|
@@ -347,11 +378,19 @@ export default {
|
|
},
|
|
},
|
|
/** 删除按钮操作 */
|
|
/** 删除按钮操作 */
|
|
handleDelete(row) {
|
|
handleDelete(row) {
|
|
- const tIds = row.tId || this.ids;
|
|
|
|
- this.$modal
|
|
|
|
- .confirm('是否确认删除动态格编号为"' + tIds + '"的数据项?')
|
|
|
|
- .then(function () {
|
|
|
|
- return delTable(tIds);
|
|
|
|
|
|
+ let data = {};
|
|
|
|
+ if (row.tId && row.sqlKey) {
|
|
|
|
+ data.tIds = [row.tId];
|
|
|
|
+ data.sqlKeys = [row.sqlKey];
|
|
|
|
+ } else {
|
|
|
|
+ data.tIds = this.ids;
|
|
|
|
+ data.sqlKeys = this.Keys;
|
|
|
|
+ }
|
|
|
|
+ // console.log(data);
|
|
|
|
+ this.$modal.confirm('是否确认删除动态格编号为"' + data.tIds.join(',') + '"的数据项?')
|
|
|
|
+ .then(async function () {
|
|
|
|
+ const res = await removeTableList(data)
|
|
|
|
+ // console.log(res);
|
|
})
|
|
})
|
|
.then(() => {
|
|
.then(() => {
|
|
this.getList();
|
|
this.getList();
|