@@ -168,6 +170,7 @@ export default {
pageNum: 1,
pageSize: 20,
storeType: 1,
+ fileId: undefined,
},
// 弹出层标题
title: "",
@@ -256,13 +259,13 @@ export default {
// 重置数据表单
reset() {
this.form = {
- fileName: undefined,
- fileUrl: undefined,
+ fileName: "",
+ fileUrl: "",
storePath: "uploads",
- fileSize: undefined,
- fileExt: undefined,
+ fileSize: 0,
+ fileExt: "",
storeType: 1,
- accessUrl: undefined,
+ accessUrl: "",
};
this.resetForm("form");
},
@@ -317,9 +320,9 @@ export default {
});
},
//上传成功方法
- handleUploadSuccess(columnName, filelist) {
+ handleUploadSuccess(columnName, filelist, data) {
this.form[columnName] = filelist;
-
+ this.queryParams.fileId = data.fileId;
this.open = false;
this.getList();
},
@@ -328,6 +331,7 @@ export default {
return this.selectDictLabel(this.storeTypeOptions, row.storeType);
},
handleSelectStore(val) {
+ this.queryParams.storeType = val;
if (val == 1) {
this.uploadUrl = "/common/uploadFile";
} else if (val == 2) {
diff --git a/ZR.Vue/src/views/tool/gen/index.vue b/ZR.Vue/src/views/tool/gen/index.vue
index 3fa444e..f88d6d2 100644
--- a/ZR.Vue/src/views/tool/gen/index.vue
+++ b/ZR.Vue/src/views/tool/gen/index.vue
@@ -2,11 +2,12 @@
-
+
查询
+ 重置
@@ -76,7 +77,7 @@ import hljs from "highlight.js";
import "highlight.js/styles/idea.css"; //这里有多个样式,自己可以根据需要切换
export default {
- name: "code_generator",
+ name: "gen",
components: { importTable, hljs },
data() {
return {
@@ -133,6 +134,9 @@ export default {
* 编辑表格
*/
handleEditTable(row) {
+ this.queryParams.tableName = row.tableName;
+ this.handleSearch();
+
this.$router.push({
path: "/gen/editTable",
query: { tableId: row.tableId },
@@ -158,7 +162,6 @@ export default {
* 点击生成服务端代码
*/
handleGenTable(row) {
- console.log(JSON.stringify(this.currentSelected));
this.currentSelected = row;
if (!this.currentSelected) {
this.msgError("请先选择要生成代码的数据表");
@@ -179,7 +182,6 @@ export default {
tableName: this.currentSelected.name,
// queryColumn: this.checkedQueryColumn,
};
- console.log(JSON.stringify(seachdata));
codeGenerator(seachdata)
.then((res) => {
@@ -205,6 +207,11 @@ export default {
this.showGenerate = false;
this.currentSelected = {};
},
+ /** 重置按钮操作 */
+ resetQuery() {
+ this.resetForm("queryParams");
+ this.handleSearch();
+ },
/** 打开导入表弹窗 */
openImportTable() {
this.$refs.import.show();