|
@@ -116,18 +116,18 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
- </div>
|
|
|
- <div class="student_page">
|
|
|
- <el-pagination
|
|
|
- background
|
|
|
- layout="prev, pager, next"
|
|
|
- :page-size="10"
|
|
|
- :total="total"
|
|
|
- v-if="page && tableData.length"
|
|
|
- style="padding-bottom: 20px"
|
|
|
- @current-change="handleCurrentChange"
|
|
|
- >
|
|
|
- </el-pagination>
|
|
|
+ <div class="student_page">
|
|
|
+ <el-pagination
|
|
|
+ background
|
|
|
+ layout="prev, pager, next"
|
|
|
+ :page-size="10"
|
|
|
+ :total="total"
|
|
|
+ v-if="page && tableData.length"
|
|
|
+ style="padding-bottom: 20px"
|
|
|
+ @current-change="handleCurrentChange"
|
|
|
+ >
|
|
|
+ </el-pagination>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
<el-dialog
|
|
|
title="分配案例"
|
|
@@ -449,26 +449,51 @@ export default {
|
|
|
this.$router.push(path);
|
|
|
},
|
|
|
isNumber(e, t) {
|
|
|
- let value = /^\d+$/.test(e);
|
|
|
- // let value = e.replace(/[^d]/g, ""); // 只能输入数字
|
|
|
- if (value == true) {
|
|
|
- if (e < 0) {
|
|
|
- this.$message.error("请输入大于0的数值");
|
|
|
- if (t == 1) {
|
|
|
- this.scoreDetail[0].scoreAll.first = "";
|
|
|
- } else if (t == 2) {
|
|
|
- this.scoreDetail[0].scoreAll.second = "";
|
|
|
- } else {
|
|
|
- this.scoreDetail[0].scoreAll.third = "";
|
|
|
+ if (e.includes(".")) {
|
|
|
+ this.$message.error("暂时不支持小数点评分");
|
|
|
+ if (t == 1) {
|
|
|
+ this.scoreDetail[0].scoreAll.first = "";
|
|
|
+ } else if (t == 2) {
|
|
|
+ this.scoreDetail[0].scoreAll.second = "";
|
|
|
+ } else {
|
|
|
+ this.scoreDetail[0].scoreAll.third = "";
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ let value = /^\d+$/.test(e);
|
|
|
+ // let value = e.replace(/[^d]/g, ""); // 只能输入数字
|
|
|
+ if (value == true) {
|
|
|
+ if (e < 0) {
|
|
|
+ this.$message.error("请输入大于0的数值");
|
|
|
+ if (t == 1) {
|
|
|
+ this.scoreDetail[0].scoreAll.first = "";
|
|
|
+ } else if (t == 2) {
|
|
|
+ this.scoreDetail[0].scoreAll.second = "";
|
|
|
+ } else {
|
|
|
+ this.scoreDetail[0].scoreAll.third = "";
|
|
|
+ }
|
|
|
+ // else if (t == 4) {
|
|
|
+ // this.scoreDetail[0].scoreAll.fourth = "";
|
|
|
+ // } else {
|
|
|
+ // this.scoreDetail[0].scoreAll.fivth = "";
|
|
|
+ // }
|
|
|
+ return;
|
|
|
+ } else if (e > 100) {
|
|
|
+ this.$message.error("数值不能大于100");
|
|
|
+ if (t == 1) {
|
|
|
+ this.scoreDetail[0].scoreAll.first = "";
|
|
|
+ } else if (t == 2) {
|
|
|
+ this.scoreDetail[0].scoreAll.second = "";
|
|
|
+ } else {
|
|
|
+ this.scoreDetail[0].scoreAll.third = "";
|
|
|
+ }
|
|
|
+ // else if (t == 4) {
|
|
|
+ // this.scoreDetail[0].scoreAll.fourth = "";
|
|
|
+ // } else {
|
|
|
+ // this.scoreDetail[0].scoreAll.fivth = "";
|
|
|
+ // }
|
|
|
+ return;
|
|
|
}
|
|
|
- // else if (t == 4) {
|
|
|
- // this.scoreDetail[0].scoreAll.fourth = "";
|
|
|
- // } else {
|
|
|
- // this.scoreDetail[0].scoreAll.fivth = "";
|
|
|
- // }
|
|
|
- return;
|
|
|
- } else if (e > 100) {
|
|
|
- this.$message.error("数值不能大于100");
|
|
|
+ } else {
|
|
|
if (t == 1) {
|
|
|
this.scoreDetail[0].scoreAll.first = "";
|
|
|
} else if (t == 2) {
|
|
@@ -481,25 +506,10 @@ export default {
|
|
|
// } else {
|
|
|
// this.scoreDetail[0].scoreAll.fivth = "";
|
|
|
// }
|
|
|
+ this.$message.error("请输入数字");
|
|
|
return;
|
|
|
}
|
|
|
- } else {
|
|
|
- if (t == 1) {
|
|
|
- this.scoreDetail[0].scoreAll.first = "";
|
|
|
- } else if (t == 2) {
|
|
|
- this.scoreDetail[0].scoreAll.second = "";
|
|
|
- } else {
|
|
|
- this.scoreDetail[0].scoreAll.third = "";
|
|
|
- }
|
|
|
- // else if (t == 4) {
|
|
|
- // this.scoreDetail[0].scoreAll.fourth = "";
|
|
|
- // } else {
|
|
|
- // this.scoreDetail[0].scoreAll.fivth = "";
|
|
|
- // }
|
|
|
- this.$message.error("请输入数字");
|
|
|
- return;
|
|
|
}
|
|
|
-
|
|
|
// value = value.replace(/^0+(d)/, "$1"); // 第一位0开头,0后面为数字,则过滤掉,取后面的数字
|
|
|
// value = value.replace(/(d{15})d*/, "$1"); // 最多保留15位整数
|
|
|
// this.height = value;
|