提交接口改动
This commit is contained in:
parent
6e77054dde
commit
7673523937
|
@ -74,7 +74,7 @@ export default {
|
||||||
loading: false,
|
loading: false,
|
||||||
// 查询条件
|
// 查询条件
|
||||||
queryParam: {
|
queryParam: {
|
||||||
sourceType: 1,
|
sourceType: 2,
|
||||||
schemaMass: null,
|
schemaMass: null,
|
||||||
massKey: null
|
massKey: null
|
||||||
},
|
},
|
||||||
|
@ -159,18 +159,14 @@ export default {
|
||||||
this.$message.warning("请先选择表信息");
|
this.$message.warning("请先选择表信息");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
this.$refs.modalForm.add();
|
this.$refs.modalForm.add(this.tableParams.schemaMass,this.tableParams.tableName);
|
||||||
this.$refs.modalForm.schemaMass = this.tableParams.schemaMass;
|
|
||||||
this.$refs.modalForm.tableName= this.tableParams.tableName;
|
|
||||||
},
|
},
|
||||||
handleEdit(record){
|
handleEdit(record){
|
||||||
if(this.tableParams.schemaMass == null || this.tableParams.tableName == null){
|
if(this.tableParams.schemaMass == null || this.tableParams.tableName == null){
|
||||||
this.$message.warning("请先选择表信息");
|
this.$message.warning("请先选择表信息");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
this.$refs.modalForm.edit(record);
|
this.$refs.modalForm.edit(this.tableParams.schemaMass,this.tableParams.tableName,record);
|
||||||
this.$refs.modalForm.schemaMass = this.tableParams.schemaMass;
|
|
||||||
this.$refs.modalForm.tableName= this.tableParams.tableName;
|
|
||||||
},
|
},
|
||||||
Delete(item) {
|
Delete(item) {
|
||||||
var that = this
|
var that = this
|
||||||
|
|
|
@ -21,19 +21,19 @@
|
||||||
}]" ></a-input>
|
}]" ></a-input>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
<a-form-item label="索引类型" >
|
<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: [
|
rules: [
|
||||||
{ required: true, message: '选择索引类型' },
|
{ required: true, message: '选择索引类型' },
|
||||||
],
|
],
|
||||||
validateTrigger: 'change'
|
validateTrigger: 'change'
|
||||||
}]">
|
}]">
|
||||||
<a-select-option key="0">
|
<a-select-option key="0" value="0">
|
||||||
普通索引
|
普通索引
|
||||||
</a-select-option>
|
</a-select-option>
|
||||||
<a-select-option key="1">
|
<a-select-option key="1" value="1">
|
||||||
唯一索引
|
唯一索引
|
||||||
</a-select-option>
|
</a-select-option>
|
||||||
<a-select-option key="2">
|
<a-select-option key="2" value="2">
|
||||||
全文索引
|
全文索引
|
||||||
</a-select-option>
|
</a-select-option>
|
||||||
</a-select>
|
</a-select>
|
||||||
|
@ -41,7 +41,7 @@
|
||||||
<a-form-item label="字段" :labelCol="labelCol" >
|
<a-form-item label="字段" :labelCol="labelCol" >
|
||||||
<a-tree-select style="width: 100%"
|
<a-tree-select style="width: 100%"
|
||||||
:tree-data="treeData" multiple search-placeholder="请选项"
|
: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-item>
|
||||||
</a-form>
|
</a-form>
|
||||||
</a-spin>
|
</a-spin>
|
||||||
|
@ -106,17 +106,21 @@ import pick from 'lodash.pick'
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
add () {
|
add (schemaMass,tableName) {
|
||||||
this.edit({});
|
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.getQuerytableColumns()
|
||||||
this.visible =true;
|
this.visible =true;
|
||||||
let that = this;
|
let that = this;
|
||||||
that.form.resetFields();
|
that.form.resetFields();
|
||||||
this.model = Object.assign({},record);
|
this.model = Object.assign({},record);
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.form.setFieldsValue(pick(this.model,'indexName','columns','indexTypeCode'));
|
this.form.setFieldsValue(pick(this.model,'indexName','columnName','indexTypeId'));
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
close () {
|
close () {
|
||||||
|
@ -130,8 +134,8 @@ import pick from 'lodash.pick'
|
||||||
if (!err) {
|
if (!err) {
|
||||||
that.confirmLoading = true;
|
that.confirmLoading = true;
|
||||||
this.model.indexName = values.indexName;
|
this.model.indexName = values.indexName;
|
||||||
this.model.columns = values.columns;
|
this.model.columns = values.columnName;
|
||||||
this.model.indexTypeCode = values.indexTypeCode;
|
this.model.indexTypeCode = values.indexTypeId;
|
||||||
console.log(this.model);
|
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 => {
|
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) {
|
if (res.success) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user