Commit 293c3025 authored by zhangdong's avatar zhangdong

按钮时间

parent ddd3b645
......@@ -29,7 +29,7 @@
</div>
<div class="centerButton ">
<el-button @click="noedit">取消</el-button>
<el-button @click="edit">提交</el-button>
<el-button @click="edit" :disabled="isDisabled">提交</el-button>
</div>
</div>
</template>
......@@ -51,6 +51,8 @@ export default {
},
data() {
return {
isDisabled:false,
time:"",
activeIdx: 0,
allForm: {},
detail: {
......@@ -70,6 +72,10 @@ export default {
await this.$refs.message.next();
await this.$refs.timeSet.next();
await this.$refs.fileUpload.next();
this.isDisabled=true
this.time=setTimeout(() => {
this.isDisabled=false
}, 5000);
console.log('通过');
console.log(this.detail)
const { msg, code } = await editProject(this.detail);
......
......@@ -27,7 +27,7 @@
</div>
<div class="button">
<el-button @click="upper">上一步</el-button>
<el-button type="primary" @click="next">发布</el-button>
<el-button type="primary" @click="next" :disabled="isDisabled">发布</el-button>
</div>
</div>
</div>
......@@ -58,6 +58,8 @@ export default {
}
};
return {
time:"",
isDisabled:false,
ruleForm: {
bidBookPO: [],
bidBookAccessoryPOList: []
......@@ -83,8 +85,11 @@ export default {
},
async next() {
const valid = await this.$refs['ruleForm'].validate();
console.log(valid);
if (valid) {
this.isDisabled=true
this.time=setTimeout(() => {
this.isDisabled=false
}, 5000);
Object.assign(this.allForm, this.ruleForm);
let allForm = this.allForm;
allForm.companyId = localStorage.getItem('companyId');
......@@ -106,6 +111,7 @@ export default {
upper() {
this.$parent.upper();
clearTimeout(this.time)
}
// changeType(val) {
......
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