新增编辑防抖

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

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

@ -214,8 +214,8 @@
</el-row>
</el-form>
<span slot="footer" class="dialog-footer" v-if="!isDetail">
<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 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 size="small" @click="closeStudent">取消</el-button>
</span>
</el-dialog>
@ -407,7 +407,7 @@ export default {
token: util.local.get(Setting.tokenKey)
},
disableds:false,
submiting: false //
submiting: false //
};
},
mounted() {

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

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

Loading…
Cancel
Save