From cae41a8da2611109ff6fb01ec1c2c38c687e79c4 Mon Sep 17 00:00:00 2001
From: RuoYi <yzz_ivy@163.com>
Date: Thu, 23 Sep 2021 09:35:59 +0800
Subject: [PATCH] 新增通用方法简化模态/缓存使用
---
ruoyi-ui/src/views/tool/gen/editTable.vue | 16 ++++++++++------
1 files changed, 10 insertions(+), 6 deletions(-)
diff --git a/ruoyi-ui/src/views/tool/gen/editTable.vue b/ruoyi-ui/src/views/tool/gen/editTable.vue
index fea958e..622de0f 100644
--- a/ruoyi-ui/src/views/tool/gen/editTable.vue
+++ b/ruoyi-ui/src/views/tool/gen/editTable.vue
@@ -90,7 +90,8 @@
<el-option label="单选框" value="radio" />
<el-option label="复选框" value="checkbox" />
<el-option label="日期控件" value="datetime" />
- <el-option label="上传控件" value="uploadImage" />
+ <el-option label="图片上传" value="imageUpload" />
+ <el-option label="文件上传" value="fileUpload" />
<el-option label="富文本控件" value="editor" />
</el-select>
</template>
@@ -112,7 +113,7 @@
</el-table>
</el-tab-pane>
<el-tab-pane label="生成信息" name="genInfo">
- <gen-info-form ref="genInfo" :info="info" :menus="menus"/>
+ <gen-info-form ref="genInfo" :info="info" :tables="tables" :menus="menus"/>
</el-tab-pane>
</el-tabs>
<el-form label-width="100px">
@@ -143,6 +144,8 @@
activeName: "cloum",
// 表格的高度
tableHeight: document.documentElement.scrollHeight - 245 + "px",
+ // 表信息
+ tables: [],
// 表列信息
cloumns: [],
// 字典信息
@@ -154,12 +157,13 @@
};
},
created() {
- const tableId = this.$route.params && this.$route.params.tableId;
+ const tableId = this.$route.query && this.$route.query.tableId;
if (tableId) {
// 获取表详细信息
getGenTable(tableId).then(res => {
this.cloumns = res.data.rows;
this.info = res.data.info;
+ this.tables = res.data.tables;
});
/** 查询字典下拉列表 */
getDictOptionselect().then(response => {
@@ -188,13 +192,13 @@
parentMenuId: genTable.parentMenuId
};
updateGenTable(genTable).then(res => {
- this.msgSuccess(res.msg);
+ this.$modal.msgSuccess(res.msg);
if (res.code === 200) {
this.close();
}
});
} else {
- this.msgError("表单校验未通过,请重新检查提交内容");
+ this.$modal.msgError("表单校验未通过,请重新检查提交内容");
}
});
},
@@ -208,7 +212,7 @@
/** 关闭按钮 */
close() {
this.$store.dispatch("tagsView/delView", this.$route);
- this.$router.push({ path: "/tool/gen", query: { t: Date.now()}})
+ this.$router.push({ path: "/tool/gen", query: { t: Date.now(), pageNum: this.$route.query.pageNum } })
}
},
mounted() {
--
Gitblit v1.9.3