新增编辑防抖

dev_2022-05-11
yujialong 3 years ago
parent b4af3c5668
commit 1e956972db
  1. 9
      src/pages/assessment/add/index.vue
  2. 11
      src/pages/evaluation/list/index.vue
  3. 6
      src/pages/student/list/index.vue
  4. 4
      src/pages/system/list/staff.vue
  5. 4
      src/setting.js

@ -254,7 +254,8 @@ export default {
pageSize: 5, pageSize: 5,
total: 0, total: 0,
isToProject: false, isToProject: false,
systemList: [] systemList: [],
submiting: false //
}; };
}, },
computed: { computed: {
@ -424,6 +425,7 @@ export default {
this.getProjectData(); this.getProjectData();
}, },
upload() { // upload() { //
if (this.submiting) return false
if (!this.form.experimentalName) return util.warningMsg("请填写考核名称"); if (!this.form.experimentalName) return util.warningMsg("请填写考核名称");
if (this.expNameRepeat) return util.warningMsg("考核名称重复,请重新输入"); if (this.expNameRepeat) return util.warningMsg("考核名称重复,请重新输入");
if (this.form.type !== 1) { if (this.form.type !== 1) {
@ -461,19 +463,20 @@ export default {
this.form.classId = classId.toString(); this.form.classId = classId.toString();
this.form.stuInfo = stuInfo; this.form.stuInfo = stuInfo;
} }
this.submiting = true
if (this.form.id) { if (this.form.id) {
this.$post(this.api.modifyAssessment, this.form).then(res => { this.$post(this.api.modifyAssessment, this.form).then(res => {
util.successMsg("修改成功"); util.successMsg("修改成功");
this.$router.back(); this.$router.back();
}).catch(err => { }).catch(err => {
console.log(err); this.submiting = false
}); });
} else { } else {
this.$post(this.api.saveAssessment, this.form).then(res => { this.$post(this.api.saveAssessment, this.form).then(res => {
util.successMsg("创建成功"); util.successMsg("创建成功");
this.$router.back(); this.$router.back();
}).catch(err => { }).catch(err => {
console.log(err); this.submiting = false
}); });
} }
}, },

@ -300,7 +300,8 @@ export default {
uploadDataList: [], uploadDataList: [],
searchTimer: null, searchTimer: null,
uploadFaild: false, uploadFaild: false,
exportCode: "" exportCode: "",
submiting: false //
}; };
}, },
mounted() { mounted() {
@ -489,6 +490,7 @@ export default {
saveTopics() { // / saveTopics() { // /
this.$refs.topicForm.validate((valid) => { this.$refs.topicForm.validate((valid) => {
if (valid) { if (valid) {
if (this.submiting) return false
let topicForm = this.topicForm; let topicForm = this.topicForm;
let optionCount = 0; let optionCount = 0;
let answer = ""; let answer = "";
@ -510,13 +512,15 @@ export default {
this.topicForm.questionType = this.questionType.indexOf(this.topicForm.questionType); this.topicForm.questionType = this.questionType.indexOf(this.topicForm.questionType);
this.topicForm.answer = answer.toUpperCase(); this.topicForm.answer = answer.toUpperCase();
this.submiting = true
if (this.topicForm.id) { if (this.topicForm.id) {
this.$post(this.api.questionsUpdate, this.topicForm).then(res => { this.$post(this.api.questionsUpdate, this.topicForm).then(res => {
util.successMsg("编辑成功!"); util.successMsg("编辑成功!");
this.NewTopics = false; this.NewTopics = false;
this.submiting = false
this.getData(); this.getData();
}).catch(err => { }).catch(err => {
console.log(err); this.submiting = false
}); });
} else { } else {
this.$post(this.api.questionsSave, this.topicForm).then(res => { this.$post(this.api.questionsSave, this.topicForm).then(res => {
@ -524,9 +528,10 @@ export default {
this.NewTopics = false; this.NewTopics = false;
this.subject = ""; this.subject = "";
this.keyword = ""; this.keyword = "";
this.submiting = false
this.initData(); this.initData();
}).catch(err => { }).catch(err => {
console.log(err); this.submiting = false
}); });
} }
} else { } else {

@ -214,8 +214,8 @@
</el-row> </el-row>
</el-form> </el-form>
<span slot="footer" class="dialog-footer" v-if="!isDetail"> <span slot="footer" class="dialog-footer" v-if="!isDetail">
<el-button type="primary" :disabled='disableds' @click="saveData(0)">保存</el-button> <el-button type="primary" :disabled="disableds" @click="saveData(0)">保存</el-button>
<el-button v-if="isAdd" type="primary" :disabled='disableds' @click="saveData(1)">保存并继续添加</el-button> <el-button v-if="isAdd" type="primary" :disabled="disableds" @click="saveData(1)">保存并继续添加</el-button>
<el-button size="small" @click="closeStudent">取消</el-button> <el-button size="small" @click="closeStudent">取消</el-button>
</span> </span>
</el-dialog> </el-dialog>
@ -407,7 +407,7 @@ export default {
token: util.local.get(Setting.tokenKey) token: util.local.get(Setting.tokenKey)
}, },
disableds:false, disableds:false,
submiting: false // submiting: false //
}; };
}, },
mounted() { mounted() {

@ -77,10 +77,6 @@
style="width: 100%" style="width: 100%"
></el-cascader> ></el-cascader>
</el-form-item> </el-form-item>
<!-- <template v-for="item in teacherForm.roleAndDeptList">-->
<!-- -->
<!-- </template>-->
<el-form-item prop="phone" label="手机号"> <el-form-item prop="phone" label="手机号">
<el-input v-model.trim="teacherForm.phone" placeholder="请输入手机号" maxlength="11" @blur="phoneChange"></el-input> <el-input v-model.trim="teacherForm.phone" placeholder="请输入手机号" maxlength="11" @blur="phoneChange"></el-input>
</el-form-item> </el-form-item>

@ -36,8 +36,8 @@ if (isHh) {
} else if (isDev) { } else if (isDev) {
jumpPath = "http://192.168.31.154:8087/"; jumpPath = "http://192.168.31.154:8087/";
// host = "http://www.occupationlab.com:9000/";//线上 // host = "http://www.occupationlab.com:9000/";//线上
// host = "http://39.108.250.202:9000/"; // 中台测试服 host = "http://39.108.250.202:9000/"; // 中台测试服
host = "http://192.168.31.151:9000/"; // 榕 // host = "http://192.168.31.151:9000/"; // 榕
// host = "http://192.168.31.125:9000/"; // 坤 // host = "http://192.168.31.125:9000/"; // 坤
// host = 'http://192.168.31.137:9000/'; // 赓 // host = 'http://192.168.31.137:9000/'; // 赓
title = "职站服务端管理系统"; title = "职站服务端管理系统";

Loading…
Cancel
Save