From 7673523937331bebe083b9cb76976b9a779086f7 Mon Sep 17 00:00:00 2001 From: RenCheng Date: Thu, 8 May 2025 21:27:12 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E6=8E=A5=E5=8F=A3=E6=94=B9?= =?UTF-8?q?=E5=8A=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/data/dataIndexing.vue | 10 +++----- src/views/data/modules/dataIndexingModal.vue | 26 +++++++++++--------- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/src/views/data/dataIndexing.vue b/src/views/data/dataIndexing.vue index f63467d..eeec3e0 100644 --- a/src/views/data/dataIndexing.vue +++ b/src/views/data/dataIndexing.vue @@ -74,7 +74,7 @@ export default { loading: false, // 查询条件 queryParam: { - sourceType: 1, + sourceType: 2, schemaMass: null, massKey: null }, @@ -159,18 +159,14 @@ export default { this.$message.warning("请先选择表信息"); return; } - this.$refs.modalForm.add(); - this.$refs.modalForm.schemaMass = this.tableParams.schemaMass; - this.$refs.modalForm.tableName= this.tableParams.tableName; + this.$refs.modalForm.add(this.tableParams.schemaMass,this.tableParams.tableName); }, handleEdit(record){ if(this.tableParams.schemaMass == null || this.tableParams.tableName == null){ this.$message.warning("请先选择表信息"); return; } - this.$refs.modalForm.edit(record); - this.$refs.modalForm.schemaMass = this.tableParams.schemaMass; - this.$refs.modalForm.tableName= this.tableParams.tableName; + this.$refs.modalForm.edit(this.tableParams.schemaMass,this.tableParams.tableName,record); }, Delete(item) { var that = this diff --git a/src/views/data/modules/dataIndexingModal.vue b/src/views/data/modules/dataIndexingModal.vue index d239517..8c0d3fa 100644 --- a/src/views/data/modules/dataIndexingModal.vue +++ b/src/views/data/modules/dataIndexingModal.vue @@ -21,19 +21,19 @@ }]" > - - + 普通索引 - + 唯一索引 - + 全文索引 @@ -41,7 +41,7 @@ + :dropdownStyle="{ maxHeight: '400px', overflowY: 'auto'}" v-decorator="['columnName',{}]"/> @@ -106,17 +106,21 @@ import pick from 'lodash.pick' } }); }, - add () { - this.edit({}); + add (schemaMass,tableName) { + console.log(schemaMass,tableName); + this.edit(schemaMass,tableName,{}); }, - edit (record) { + edit (schemaMass,tableName,record) { + console.log(schemaMass,tableName); + this.schemaMass = schemaMass; + this.tableName = tableName; this.getQuerytableColumns() this.visible =true; let that = this; that.form.resetFields(); this.model = Object.assign({},record); this.$nextTick(() => { - this.form.setFieldsValue(pick(this.model,'indexName','columns','indexTypeCode')); + this.form.setFieldsValue(pick(this.model,'indexName','columnName','indexTypeId')); }); }, close () { @@ -130,8 +134,8 @@ import pick from 'lodash.pick' if (!err) { that.confirmLoading = true; this.model.indexName = values.indexName; - this.model.columns = values.columns; - this.model.indexTypeCode = values.indexTypeCode; + this.model.columns = values.columnName; + this.model.indexTypeCode = values.indexTypeId; console.log(this.model); postAction("/tableIndex/updateIndexSafe?schemaMass="+this.schemaMass+"&tableName="+this.tableName+"&indexName="+this.model.indexName+"&columns="+this.model.columns+"&indexTypeCode="+this.model.indexTypeCode,{}).then(res => { if (res.success) {