Commit ada47077 by 莫晓莉

22

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