提交接口改动

This commit is contained in:
RenCheng 2025-05-08 21:27:12 +08:00
parent 6e77054dde
commit 7673523937
2 changed files with 18 additions and 18 deletions

View File

@ -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

View File

@ -21,19 +21,19 @@
}]" ></a-input>
</a-form-item>
<a-form-item label="索引类型" >
<a-select placeholder="选择索引类型" option-filter-prop="children" size="large" v-decorator="['indexTypeCode', {
<a-select placeholder="选择索引类型" option-filter-prop="children" size="large" v-decorator="['indexTypeId', {
rules: [
{ required: true, message: '选择索引类型' },
],
validateTrigger: 'change'
}]">
<a-select-option key="0">
<a-select-option key="0" value="0">
普通索引
</a-select-option>
<a-select-option key="1">
<a-select-option key="1" value="1">
唯一索引
</a-select-option>
<a-select-option key="2">
<a-select-option key="2" value="2">
全文索引
</a-select-option>
</a-select>
@ -41,7 +41,7 @@
<a-form-item label="字段" :labelCol="labelCol" >
<a-tree-select style="width: 100%"
:tree-data="treeData" multiple search-placeholder="请选项"
:dropdownStyle="{ maxHeight: '400px', overflowY: 'auto'}" v-decorator="['columns',{}]"/>
:dropdownStyle="{ maxHeight: '400px', overflowY: 'auto'}" v-decorator="['columnName',{}]"/>
</a-form-item>
</a-form>
</a-spin>
@ -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) {