新增编辑防抖

dev_2022-03-03
yujialong 3 years ago
parent 517c26d5a0
commit 2249fc7dd9
  1. 4
      src/setting.js
  2. 7
      src/views/course/AddCurriculum.vue
  3. 2
      src/views/course/Curriculum.vue
  4. 12
      src/views/customer/AddCustomer.vue
  5. 2
      src/views/order/Order.vue
  6. 7
      src/views/serve/projectAdd.vue

@ -10,8 +10,8 @@ let jumpPath = "";
let host = "";
if (isDev) {
// jumpPath = "http://www.huorantech.cn/judgmentPoint/";
jumpPath = "http://39.108.250.202/judgmentPoint/";
// jumpPath = "http://192.168.31.254:8087/"; // 本地调试-需要启动本地判分点系统
// jumpPath = "http://39.108.250.202/judgmentPoint/";
jumpPath = "http://192.168.31.125:8087/"; // 本地调试-需要启动本地判分点系统
// host = "http://www.huorantech.cn:9000";//线上
host = "http://39.108.250.202:9000";//测试
// host = 'http://192.168.31.151:9000'// 榕

@ -340,7 +340,8 @@ export default {
assessmentData: [],
assessmentTotal: 0,
multipleAssessment: []
multipleAssessment: [],
submiting: false //
};
},
watch: {
@ -594,6 +595,7 @@ export default {
saveAdd(form) {
this.$refs[form].validate((valid) => {
if (valid) {
if (this.submiting) return false
if (!this.form.coverUrl) {
this.$message.warning("请上传课程封面");
return;
@ -626,11 +628,13 @@ export default {
return obj;
});
}
this.submiting = true
if (this.form.cid) {
this.$post(this.api.modifyCourse, this.form).then((res) => {
this.$message.success("编辑成功");
this.$router.back();
}).catch((res) => {
this.submiting = false
});
} else {
this.$post(this.api.createCurriculum, this.form).then((res) => {
@ -644,6 +648,7 @@ export default {
this.$router.back();
});
}).catch((res) => {
this.submiting = false
});
}
} else {

@ -72,7 +72,7 @@
<span>课程列表</span>
</div>
<div>
<el-button type="primary" round class="mag" @click="addcourse">新建课程</el-button>
<el-button type="primary" round @click="addcourse">新建课程</el-button>
<el-button type="primary" round @click="delAllSelection">批量删除</el-button>
</div>
</div>

@ -397,6 +397,7 @@ export default {
NoAdd: true,
phoneRepeat: false,
emailRepeat: false,
submiting: false //
};
},
mounted() {
@ -552,7 +553,7 @@ export default {
saveAdd(formName){
this.$refs[formName].validate((valid) => {
if (valid) {
console.log(this.phoneRepeat);
if (this.submiting) return false
if (this.phoneRepeat) {
this.$message.warning("该手机号已存在");
return;
@ -561,6 +562,7 @@ export default {
this.$message.warning("该邮箱已存在");
return;
}
this.submiting = true
if(this.NoAdd){
let obj = {};
obj = this.schoolList.find((item)=>{
@ -591,7 +593,9 @@ export default {
this.$post(this.api.updateCustomer,data).then((res) => {
this.$message.success('编辑成功')
this.goback()
}).catch((res) => {})
}).catch((res) => {
this.submiting = false
})
}else{
this.$post(this.api.addCustomer,data).then((res) => {
let customerId = res.customerId
@ -615,7 +619,9 @@ export default {
this.$message.success('添加成功')
this.goback()
}).catch((res) => {})
}).catch((res) => {
this.submiting = false
})
}
}else{
this.$message.warning('该客户已存在')

@ -65,7 +65,7 @@
<span>订单列表</span>
</div>
<div>
<el-button type="primary" round class="mag" @click="addOrder()">新建订单</el-button>
<el-button type="primary" round @click="addOrder()">新建订单</el-button>
<el-button type="primary" round @click="delAllSelection">批量删除</el-button>
</div>
</div>

@ -265,6 +265,7 @@ export default {
isToPoint: false, //
visibleLoading: false, //
listLoading:false,//
submiting: false //
};
},
computed: {
@ -438,9 +439,11 @@ export default {
return true;
},
handleSubmit(state) { //
if (this.submiting) return false
if (!this.judgmentRelease()) { //
return;
}
this.submiting = true
this.$store.dispatch("setSystemId", this.projectManage.systemId);
this.projectManage.state = state;
let { systemId } = this.projectManage;
@ -488,7 +491,7 @@ export default {
this.$router.back();
}
}).catch(err => {
console.log(err);
this.submiting = false
});
},
addProject(params) { //
@ -498,7 +501,7 @@ export default {
this.$router.back();
}
}).catch(err => {
console.log(err);
this.submiting = false
});
},
manualDistributionScore() { //

Loading…
Cancel
Save