Commit ada47077 by 莫晓莉

22

parent 9285e036
......@@ -10,7 +10,7 @@
@click="showAll()"
></i>
</div>
<el-button class="btn-brush" icon="el-icon-plus"  @click="addModal" >新增数据库资源库</el-button>
<el-button class="btn-brush" icon="el-icon-plus"  @click="closeModal" >新增数据库资源库</el-button>
<div>
<el-table
v-loading="loading"
......@@ -127,8 +127,8 @@
<span slot="footer" class="dialog-footer">
<el-button class="btn-brush" type="success" icon="el-icon-check" @click="closeModal">测试链接</el-button>
<el-button v-if="curId" class="btn-brush" type="success" icon="el-icon-check" @click="update()">保存</el-button>
<el-button v-else class="btn-brush" type="success" icon="el-icon-check" @click="submitForm()">修改</el-button>
<el-button v-if="curId" class="btn-brush" type="success" icon="el-icon-check" @click="update()">修改</el-button>
<el-button v-else class="btn-brush" type="success" icon="el-icon-check" @click="submitForm()">保存</el-button>
<el-button v-if="curId" class="btn-brush" type="success" icon="el-icon-check" @click="centerDialogVisible = false">重置</el-button>
<el-button class="btn-brush" type="success" icon="el-icon-plus" @click="centerDialogVisible = false">取消</el-button>
</span>
......@@ -271,8 +271,9 @@ export default {
console.log('提交新增数据:',res);
if (res.success) {
this.$message.success('新增成功!');
this.centerDialogVisible=false;//关闭弹窗
this.form={};
// this.centerDialogVisible=false;//关闭弹窗
// this.form={};
this.closeModal();//关闭弹窗
this.getKettleRepositoryList();//刷新列表
}else {
this.$message.error(res.errMsg)
......@@ -314,8 +315,9 @@ export default {
// 关闭时的操作
this.row = {}
this.form = {}
this.$refs['formName'].resetFields();
this.$refs['formName'].resetFields();//对该表单项进行重置,将其值重置为初始值并移除校验结果
this.curId=null;
this.$refs['formName'].clearValidate();//移除该表单项的校验结果
}
},
......@@ -332,12 +334,11 @@ export default {
},
// 新增数据库资源库
addModal() {
      console.log('新增时候id为null');
this.centerDialogVisible=true;
this.$refs['formName'].resetFields();
      
    },
// addModal() {
//       console.log('新增时候id为null');
// this.centerDialogVisible=true;
//       
//     },
//编辑数据库资源库
editModal(row) {
this.curId=row.id;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment