浏览代码

学情首页年级下标修改&&答题卡考号调整

OnePsycho 4 年之前
父节点
当前提交
6a92c4c196

+ 0 - 1
TEAMModelOS/ClientApp/src/view/answersheet/BaseEditor.vue

@@ -1,7 +1,6 @@
 <template>
 	<div class="base-editor-wrap">
 		<div :id="ids + 'btn'" class="base-editor-tools" v-show="isShowTools">
-<!-- 		<div :id="ids + 'btn'" class="base-editor-tools" v-show="isShowTools" @mouseenter="isShowTools = true" @mouseleave="isShowTools = false"> -->
 			<span class="select-model" @click="onSelectModal" v-if="type !== '0'">编辑</span>
 			<span class="select-model btn-delete" @click="onDeleteBlock" v-if="!isAutoCreate">删除</span>
 		</div>

+ 8 - 4
TEAMModelOS/ClientApp/src/view/answersheet/SheetBaseInfo.vue

@@ -73,6 +73,7 @@ export default {
       let snap = this.snap;
       this.infoLeftBox = snap.paper.g();
       let gap = INFO_H / (this.showInfoList.length + 1);
+	  let lineWidth = INFO_W - this.idLength * 30
       this.showInfoList.forEach((item, index) => {
         // 考号、座号、姓名等
         let leftInfo1 = snap.text(
@@ -85,7 +86,7 @@ export default {
           .line(
             CONTENT_START_X + 80,
             CONTENT_START_Y + INFO_ITEM_MARGIN + gap * index,
-            CONTENT_START_X + 250,
+            CONTENT_START_X + lineWidth - 40,
             CONTENT_START_Y + INFO_ITEM_MARGIN + gap * index
           )
           .attr({ fill: "none", stroke: "#000", strokeWidth: 1 });
@@ -100,13 +101,16 @@ export default {
       let snap = this.snap;
       this.idNumberBox.remove();
       this.idNumberBox = snap.paper.g();
+	  
+	  const CELL_WIDTH = 30
 
-      const INFO_LEFT_W = 275; // 左侧的宽度
+      const INFO_LEFT_W = INFO_W - CELL_WIDTH * idLength; // 左侧的宽度
       const INFO_LEFT_X =
         INFO_LEFT_W + CONTENT_ML + ANCHORPROP.width + ANCHORPROP.gapX; // 左侧的x坐标
 
       var numbers = new Array(idLength).fill("0");
-      var cellWidth = (INFO_W - INFO_LEFT_W) / idLength; // 计算每个号码的宽度
+      // var cellWidth = (INFO_W - INFO_LEFT_W) / idLength; // 计算每个号码的宽度
+      var cellWidth = CELL_WIDTH; // 计算每个号码的宽度
       const NUMBER_ITEM_MLR =
         ((INFO_W - INFO_LEFT_W) / idLength - NUMBER_ITEM_W) / 2; // 计算号码左右间距
 
@@ -136,7 +140,7 @@ export default {
       // 准考证号
       this.idNumberBox.add(
         snap.text(
-          INFO_LEFT_X + (INFO_LEFT_W - 20) / 2,
+          INFO_LEFT_X + (idLength * CELL_WIDTH - 69) / 2,
           CONTENT_MT + 75,
           "准 考 证 号"
         )

+ 14 - 2
TEAMModelOS/ClientApp/src/view/student-analysis/total-analysis/EvaluationList/TotalIndex.vue

@@ -78,7 +78,7 @@
 								<span class="el-filter-title">{{ $t("totalAnalysis.condition2") }}:</span>
 								<RadioGroup v-model="filterGrade" type="button" @on-change="filterGradeChange">
 									<Radio :label="$t('totalAnalysis.all')">{{ $t('totalAnalysis.all') }}</Radio>
-									<Radio v-for="(item, index) in filterGradeList" :label="item.name" :key="index">{{ item.name }}</Radio>
+									<Radio v-for="(item, index) in filterGradeList" :label="index" :key="index">{{ item }}</Radio>
 								</RadioGroup>
 							</div>
 							<div class="el-filter-item">
@@ -542,7 +542,7 @@
 					return (
 						JSON.stringify(item.period.name).indexOf(this.filterConditions.period || "") >
 						-1 &&
-						JSON.stringify(item.grades).indexOf(this.filterConditions.grade || "") >
+						JSON.stringify(item.grades.map(i => i.id)).indexOf(this.filterConditions.grade || "") >
 						-1 &&
 						JSON.stringify(item.subjects).indexOf(this.filterConditions.subject || "") >
 						-1 &&
@@ -611,6 +611,13 @@
 						});
 						continue
 					}
+					if (key == 'grade') {
+						arr.push({
+							keyName: key,
+							val: this.getGradeName(this.filterGrade),
+						});
+						continue
+					}
 					arr.push({
 						keyName: key,
 						val: obj[key],
@@ -681,6 +688,11 @@
 						2) * 100 + "%";
 				};
 			},
+			getGradeName(){
+				return index => {
+					return this.filterGradeList[index]
+				}
+			},
 			filterGradeList() {
 				let res = this.schoolData.period.find(item => {
 					return item.name == this.filterConditions.period