|
@@ -82,10 +82,11 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div class="sumbitBox">
|
|
|
+ <div class="btn">
|
|
|
<!-- <span class="sumbit" @click="submitForm">建立关联</span> -->
|
|
|
<el-button
|
|
|
type="primary"
|
|
|
+ :disabled = 'saveDisable'
|
|
|
@click="submitForm"
|
|
|
>建立关联</el-button>
|
|
|
</div>
|
|
@@ -110,7 +111,8 @@ export default {
|
|
|
mealName: '', //大项名称
|
|
|
itemName: '', //小项名称
|
|
|
uniqueName: '', //公表名称,必填
|
|
|
- }
|
|
|
+ },
|
|
|
+ saveDisable: false //保存按钮禁止点击
|
|
|
|
|
|
}
|
|
|
},
|
|
@@ -226,7 +228,6 @@ export default {
|
|
|
"mealName": mealName,
|
|
|
"uniqueName": uniqueName
|
|
|
}
|
|
|
- console.log(param);
|
|
|
this.showSaveDialog(param);
|
|
|
},
|
|
|
saveLisMapping(param, msg, type) {
|
|
@@ -238,6 +239,7 @@ export default {
|
|
|
} else {
|
|
|
this.warning(res.data.msg)
|
|
|
}
|
|
|
+ this.saveDisable = false
|
|
|
})
|
|
|
},
|
|
|
showSaveDialog(param) {
|
|
@@ -245,6 +247,7 @@ export default {
|
|
|
// if(this.isEdit) {
|
|
|
// this.saveLisMapping(param)
|
|
|
// } else {
|
|
|
+ this.saveDisable = true //提交保存按钮不可点击,返回结果时才可点击,防止频繁发送请求
|
|
|
api.hasLisMapping(param).then((res) => {
|
|
|
if (!res.data.data) {
|
|
|
this.saveLisMapping(param, '关联建立成功', 'success' )
|
|
@@ -269,6 +272,7 @@ export default {
|
|
|
}).then(() => {
|
|
|
resolve();
|
|
|
}).catch(() => {
|
|
|
+ this.saveDisable = false
|
|
|
this.warning('建立失败','error')
|
|
|
});
|
|
|
},
|
|
@@ -398,7 +402,7 @@ export default {
|
|
|
display: inline-block;
|
|
|
width: calc(100% - 160px);
|
|
|
}
|
|
|
- .sumbitBox {
|
|
|
+ .btn {
|
|
|
position: relative;
|
|
|
background-color: #fff;
|
|
|
margin: 0px 20px;
|