|
@@ -40,7 +40,7 @@
|
|
:underline="false"
|
|
:underline="false"
|
|
style="font-size: 12px; vertical-align: baseline"
|
|
style="font-size: 12px; vertical-align: baseline"
|
|
@click="importTemplate"
|
|
@click="importTemplate"
|
|
- >下载模板
|
|
|
|
|
|
+ >下载模板
|
|
</el-link>
|
|
</el-link>
|
|
</div>
|
|
</div>
|
|
</el-upload>
|
|
</el-upload>
|
|
@@ -62,7 +62,7 @@
|
|
icon="el-icon-plus"
|
|
icon="el-icon-plus"
|
|
size="mini"
|
|
size="mini"
|
|
@click="handleAdd"
|
|
@click="handleAdd"
|
|
- >新增
|
|
|
|
|
|
+ >新增
|
|
</el-button>
|
|
</el-button>
|
|
</el-col>
|
|
</el-col>
|
|
<el-col :span="1.5">
|
|
<el-col :span="1.5">
|
|
@@ -73,7 +73,7 @@
|
|
size="mini"
|
|
size="mini"
|
|
:disabled="single"
|
|
:disabled="single"
|
|
@click="handleUpdate"
|
|
@click="handleUpdate"
|
|
- >修改
|
|
|
|
|
|
+ >修改
|
|
</el-button>
|
|
</el-button>
|
|
</el-col>
|
|
</el-col>
|
|
<el-col :span="1.5">
|
|
<el-col :span="1.5">
|
|
@@ -84,7 +84,7 @@
|
|
size="mini"
|
|
size="mini"
|
|
:disabled="multiple"
|
|
:disabled="multiple"
|
|
@click="handleDelete"
|
|
@click="handleDelete"
|
|
- >删除
|
|
|
|
|
|
+ >删除
|
|
</el-button>
|
|
</el-button>
|
|
</el-col>
|
|
</el-col>
|
|
<el-col :span="1.5">
|
|
<el-col :span="1.5">
|
|
@@ -93,7 +93,7 @@
|
|
icon="el-icon-upload2"
|
|
icon="el-icon-upload2"
|
|
size="mini"
|
|
size="mini"
|
|
@click="upload.open = true"
|
|
@click="upload.open = true"
|
|
- >导入
|
|
|
|
|
|
+ >导入
|
|
</el-button>
|
|
</el-button>
|
|
</el-col>
|
|
</el-col>
|
|
<el-col :span="1.5">
|
|
<el-col :span="1.5">
|
|
@@ -103,7 +103,7 @@
|
|
icon="el-icon-download"
|
|
icon="el-icon-download"
|
|
size="mini"
|
|
size="mini"
|
|
@click="handleExport"
|
|
@click="handleExport"
|
|
- >导出
|
|
|
|
|
|
+ >导出
|
|
</el-button>
|
|
</el-button>
|
|
</el-col>
|
|
</el-col>
|
|
<right-toolbar
|
|
<right-toolbar
|
|
@@ -116,7 +116,7 @@
|
|
:data="tableList"
|
|
:data="tableList"
|
|
@selection-change="handleSelectionChange"
|
|
@selection-change="handleSelectionChange"
|
|
>
|
|
>
|
|
- <el-table-column type="selection" width="55" align="center"/>
|
|
|
|
|
|
+ <el-table-column type="selection" width="55" align="center" />
|
|
<!-- <span v-for="(key, val) in columns" :key="key">
|
|
<!-- <span v-for="(key, val) in columns" :key="key">
|
|
<el-table-column :label="key" align="center" :prop="val" />
|
|
<el-table-column :label="key" align="center" :prop="val" />
|
|
</span> -->
|
|
</span> -->
|
|
@@ -138,27 +138,23 @@
|
|
处理<i class="el-icon-arrow-down el-icon--right"></i>
|
|
处理<i class="el-icon-arrow-down el-icon--right"></i>
|
|
</el-button>
|
|
</el-button>
|
|
<el-dropdown-menu slot="dropdown">
|
|
<el-dropdown-menu slot="dropdown">
|
|
- <el-dropdown-item
|
|
|
|
- >
|
|
|
|
|
|
+ <el-dropdown-item>
|
|
<el-button
|
|
<el-button
|
|
size="mini"
|
|
size="mini"
|
|
type="text"
|
|
type="text"
|
|
icon="el-icon-edit"
|
|
icon="el-icon-edit"
|
|
@click="handleUpdate(scope.row)"
|
|
@click="handleUpdate(scope.row)"
|
|
- >修改
|
|
|
|
- </el-button
|
|
|
|
- >
|
|
|
|
|
|
+ >修改
|
|
|
|
+ </el-button>
|
|
</el-dropdown-item>
|
|
</el-dropdown-item>
|
|
- <el-dropdown-item
|
|
|
|
- >
|
|
|
|
|
|
+ <el-dropdown-item>
|
|
<el-button
|
|
<el-button
|
|
size="mini"
|
|
size="mini"
|
|
type="text"
|
|
type="text"
|
|
icon="el-icon-delete"
|
|
icon="el-icon-delete"
|
|
@click="handleDelete(scope.row)"
|
|
@click="handleDelete(scope.row)"
|
|
- >删除
|
|
|
|
- </el-button
|
|
|
|
- >
|
|
|
|
|
|
+ >删除
|
|
|
|
+ </el-button>
|
|
</el-dropdown-item>
|
|
</el-dropdown-item>
|
|
</el-dropdown-menu>
|
|
</el-dropdown-menu>
|
|
</el-dropdown>
|
|
</el-dropdown>
|
|
@@ -206,13 +202,13 @@ import {
|
|
addTableData,
|
|
addTableData,
|
|
batchEdit,
|
|
batchEdit,
|
|
} from "@/api/tablelist/commonTable";
|
|
} from "@/api/tablelist/commonTable";
|
|
-import {getToken} from "@/utils/auth";
|
|
|
|
|
|
+import { getToken } from "@/utils/auth";
|
|
import Queryfrom from "@/views/tablelist/commonTable/queryfrom.vue";
|
|
import Queryfrom from "@/views/tablelist/commonTable/queryfrom.vue";
|
|
-import {camelCase} from "@/utils";
|
|
|
|
|
|
+import { camelCase } from "@/utils";
|
|
|
|
|
|
export default {
|
|
export default {
|
|
name: "listInfo",
|
|
name: "listInfo",
|
|
- components: {Queryfrom},
|
|
|
|
|
|
+ components: { Queryfrom },
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
// 遮罩层
|
|
// 遮罩层
|
|
@@ -249,7 +245,7 @@ export default {
|
|
// 是否更新已经存在的数据
|
|
// 是否更新已经存在的数据
|
|
updateSupport: 0,
|
|
updateSupport: 0,
|
|
// 设置上传的请求头部
|
|
// 设置上传的请求头部
|
|
- headers: {Authorization: "Bearer " + getToken()},
|
|
|
|
|
|
+ headers: { Authorization: "Bearer " + getToken() },
|
|
// 上传的地址
|
|
// 上传的地址
|
|
url: process.env.VUE_APP_BASE_API3 + "common/uploadData",
|
|
url: process.env.VUE_APP_BASE_API3 + "common/uploadData",
|
|
},
|
|
},
|
|
@@ -359,7 +355,7 @@ export default {
|
|
// 序列化当前查询参数列表
|
|
// 序列化当前查询参数列表
|
|
queryParams && (this.queryParams.queryMap = queryParams.queryMap);
|
|
queryParams && (this.queryParams.queryMap = queryParams.queryMap);
|
|
// 获取当前表单结构信息
|
|
// 获取当前表单结构信息
|
|
- dragTableInfo({queryMap: {sqlkey: this.sqlkey}})
|
|
|
|
|
|
+ dragTableInfo({ queryMap: { sqlkey: this.sqlkey } })
|
|
.then((res) => {
|
|
.then((res) => {
|
|
// 得到当前模版信息 --- sql columns queryWhere
|
|
// 得到当前模版信息 --- sql columns queryWhere
|
|
this.templateInfo = res.data.resultMap;
|
|
this.templateInfo = res.data.resultMap;
|
|
@@ -370,7 +366,9 @@ export default {
|
|
// 得到查询条件
|
|
// 得到查询条件
|
|
this.queryFromWhere = res.data.resultMap.where;
|
|
this.queryFromWhere = res.data.resultMap.where;
|
|
// 得到当前列表信息
|
|
// 得到当前列表信息
|
|
- this.columns = this.columnsHandler(JSON.parse(this.templateInfo.template.dtColumnName));
|
|
|
|
|
|
+ this.columns = this.columnsHandler(
|
|
|
|
+ JSON.parse(this.templateInfo.template.dtColumnName)
|
|
|
|
+ );
|
|
})
|
|
})
|
|
.finally((fes) => {
|
|
.finally((fes) => {
|
|
if (this.templateInfo == {}) return;
|
|
if (this.templateInfo == {}) return;
|
|
@@ -410,9 +408,9 @@ export default {
|
|
this.$refs.mychild.pageList(
|
|
this.$refs.mychild.pageList(
|
|
row == undefined
|
|
row == undefined
|
|
? {
|
|
? {
|
|
- limit: this.queryParams.pageSize,
|
|
|
|
- page: this.queryParams.pageNum,
|
|
|
|
- }
|
|
|
|
|
|
+ limit: this.queryParams.pageSize,
|
|
|
|
+ page: this.queryParams.pageNum,
|
|
|
|
+ }
|
|
: row
|
|
: row
|
|
);
|
|
);
|
|
},
|
|
},
|
|
@@ -442,7 +440,7 @@ export default {
|
|
handleAdd(row) {
|
|
handleAdd(row) {
|
|
// this.reset();
|
|
// this.reset();
|
|
this.defaultValue = {};
|
|
this.defaultValue = {};
|
|
- getInfoBySqlKey(this.sqlkey).then(({data}) => {
|
|
|
|
|
|
+ getInfoBySqlKey(this.sqlkey).then(({ data }) => {
|
|
// const htmlCode = data.dfHtmlTemplate;
|
|
// const htmlCode = data.dfHtmlTemplate;
|
|
// this.iframeUrl = "data:text/html;charset=utf-8," + encodeURI(htmlCode);
|
|
// this.iframeUrl = "data:text/html;charset=utf-8," + encodeURI(htmlCode);
|
|
if (!data || !data.dfVueTemplate) {
|
|
if (!data || !data.dfVueTemplate) {
|
|
@@ -460,7 +458,7 @@ export default {
|
|
},
|
|
},
|
|
/** 修改按钮操作 */
|
|
/** 修改按钮操作 */
|
|
handleUpdate(row) {
|
|
handleUpdate(row) {
|
|
- getInfoBySqlKey(this.sqlkey).then(({data}) => {
|
|
|
|
|
|
+ getInfoBySqlKey(this.sqlkey).then(({ data }) => {
|
|
// const htmlCode = data.dfHtmlTemplate;
|
|
// const htmlCode = data.dfHtmlTemplate;
|
|
// this.iframeUrl = "data:text/html;charset=utf-8," + encodeURI(htmlCode);
|
|
// this.iframeUrl = "data:text/html;charset=utf-8," + encodeURI(htmlCode);
|
|
if (!data || !data.dfVueTemplate) {
|
|
if (!data || !data.dfVueTemplate) {
|
|
@@ -542,8 +540,7 @@ export default {
|
|
this.$refs.mychild.pageList();
|
|
this.$refs.mychild.pageList();
|
|
this.$modal.msgSuccess("删除成功");
|
|
this.$modal.msgSuccess("删除成功");
|
|
})
|
|
})
|
|
- .catch(() => {
|
|
|
|
- });
|
|
|
|
|
|
+ .catch(() => {});
|
|
},
|
|
},
|
|
/** 导出按钮操作 */
|
|
/** 导出按钮操作 */
|
|
handleExport() {
|
|
handleExport() {
|
|
@@ -576,7 +573,7 @@ export default {
|
|
importTemplate() {
|
|
importTemplate() {
|
|
this.download(
|
|
this.download(
|
|
process.env.VUE_APP_BASE_API3 +
|
|
process.env.VUE_APP_BASE_API3 +
|
|
- `dragform/common/exportTemplate?tableName=${this.tableName}&sqlkey=${this.sqlkey}`,
|
|
|
|
|
|
+ `dragform/common/exportTemplate?tableName=${this.tableName}&sqlkey=${this.sqlkey}`,
|
|
{},
|
|
{},
|
|
`下载模版名称${new Date().getTime()}.xlsx`
|
|
`下载模版名称${new Date().getTime()}.xlsx`
|
|
);
|
|
);
|
|
@@ -592,10 +589,10 @@ export default {
|
|
this.$refs.upload.clearFiles();
|
|
this.$refs.upload.clearFiles();
|
|
this.$alert(
|
|
this.$alert(
|
|
"<div style='overflow: auto;overflow-x: hidden;max-height: 70vh;padding: 10px 20px 0;'>" +
|
|
"<div style='overflow: auto;overflow-x: hidden;max-height: 70vh;padding: 10px 20px 0;'>" +
|
|
- response.msg +
|
|
|
|
- "</div>",
|
|
|
|
|
|
+ response.msg +
|
|
|
|
+ "</div>",
|
|
"导入结果",
|
|
"导入结果",
|
|
- {dangerouslyUseHTMLString: true}
|
|
|
|
|
|
+ { dangerouslyUseHTMLString: true }
|
|
);
|
|
);
|
|
this.$refs.mychild.pageList({
|
|
this.$refs.mychild.pageList({
|
|
limit: this.queryParams.pageSize,
|
|
limit: this.queryParams.pageSize,
|
|
@@ -643,7 +640,7 @@ export default {
|
|
updateData.conditionMap[this.templateInfo.template?.primaryKey] =
|
|
updateData.conditionMap[this.templateInfo.template?.primaryKey] =
|
|
this.defaultValue[
|
|
this.defaultValue[
|
|
camelCase(this.templateInfo.template?.primaryKey)
|
|
camelCase(this.templateInfo.template?.primaryKey)
|
|
- ];
|
|
|
|
|
|
+ ];
|
|
Object.keys(values).map((k) => {
|
|
Object.keys(values).map((k) => {
|
|
updateData.commMap[k] = values[k];
|
|
updateData.commMap[k] = values[k];
|
|
});
|
|
});
|
|
@@ -677,6 +674,4 @@ export default {
|
|
};
|
|
};
|
|
</script>
|
|
</script>
|
|
|
|
|
|
-<style scoped lang="scss">
|
|
|
|
-
|
|
|
|
-</style>
|
|
|
|
|
|
+<style scoped lang="scss"></style>
|