From 2249fc7dd9a0b09d6116004b416ca2a7d6290dd5 Mon Sep 17 00:00:00 2001
From: yujialong <479214531@qq.com>
Date: Thu, 10 Feb 2022 10:57:25 +0800
Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E7=BC=96=E8=BE=91=E9=98=B2?=
=?UTF-8?q?=E6=8A=96?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/setting.js | 4 ++--
src/views/course/AddCurriculum.vue | 7 ++++++-
src/views/course/Curriculum.vue | 2 +-
src/views/customer/AddCustomer.vue | 12 +++++++++---
src/views/order/Order.vue | 2 +-
src/views/serve/projectAdd.vue | 7 +++++--
6 files changed, 24 insertions(+), 10 deletions(-)
diff --git a/src/setting.js b/src/setting.js
index 4ec52bd..6df59c2 100644
--- a/src/setting.js
+++ b/src/setting.js
@@ -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'// 榕
diff --git a/src/views/course/AddCurriculum.vue b/src/views/course/AddCurriculum.vue
index 7965941..5fcc94f 100644
--- a/src/views/course/AddCurriculum.vue
+++ b/src/views/course/AddCurriculum.vue
@@ -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 {
diff --git a/src/views/course/Curriculum.vue b/src/views/course/Curriculum.vue
index d86e8a3..e9c736a 100644
--- a/src/views/course/Curriculum.vue
+++ b/src/views/course/Curriculum.vue
@@ -72,7 +72,7 @@
课程列表
- 新建课程
+ 新建课程
批量删除
diff --git a/src/views/customer/AddCustomer.vue b/src/views/customer/AddCustomer.vue
index 12e5852..59d355c 100644
--- a/src/views/customer/AddCustomer.vue
+++ b/src/views/customer/AddCustomer.vue
@@ -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('该客户已存在')
diff --git a/src/views/order/Order.vue b/src/views/order/Order.vue
index 9800e90..a17126e 100644
--- a/src/views/order/Order.vue
+++ b/src/views/order/Order.vue
@@ -65,7 +65,7 @@
订单列表
- 新建订单
+ 新建订单
批量删除
diff --git a/src/views/serve/projectAdd.vue b/src/views/serve/projectAdd.vue
index 8ee8b78..b943725 100644
--- a/src/views/serve/projectAdd.vue
+++ b/src/views/serve/projectAdd.vue
@@ -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() { //点击手动分配分值