lrf 11 місяців тому
батько
коміт
6660893582
2 змінених файлів з 3 додано та 1 видалено
  1. 2 0
      src/views/baoanexam/exam/config/index.vue
  2. 1 1
      src/views/login.vue

+ 2 - 0
src/views/baoanexam/exam/config/index.vue

@@ -71,6 +71,8 @@ export default {
       let dup = _.cloneDeep(this.form);
       // 判断,将最小占比转换为分数,再看加和是不是小于等于总分数,如果大于总分数,那就GG了:按照最小比例出题也会超分,这么分没有意义
       const pMinScore = dup.proportion.reduce((p, n) => p + _.multiply(_.get(n, 'number_min', 0), _.get(n, 'score', 0)), 0);
+      console.log(pMinScore);
+      console.log(dup.score);
       if (pMinScore > dup.score) {
         this.$message.error('练习题型分配:按最小比例进行分配的总分数 超出规定的 总分数,请重新分配!');
         return;

+ 1 - 1
src/views/login.vue

@@ -55,7 +55,7 @@ export default {
       this.$refs.login.validate(async (valid) => {
         if (valid) {
           // this.$router.push('/adminCenter/homeIndex');
-          let res = await this.login({ table: 'exam_account', ...this.form });
+          let res = await this.login({ table: 'exam_account', ...this.form, type: 'Admin' });
           if (this.$checkRes(res)) {
             this.$message.success('登录成功');
             this.$router.push('/adminCenter/homeIndex');