Commit 54e8889ea5b3198df86c40513661b25387c76685

Authored by 刘鸿
2 parents 34aad61a 7f6131ad

Merge branch 'ezTeach-2.0.0.0.release' of http://120.78.57.84/baoman/Ezquiz_Plat…

…form into ezTeach-2.0.0.0.release
src/App.vue
1 1 <template>
2   - <div id="app" ref="app">
3   - <transition name="fade" mode="out-in">
4   - <router-view></router-view>
5   - </transition>
6   - </div>
  2 + <div id="app" ref="app">
  3 + <transition name="fade" mode="out-in">
  4 + <router-view></router-view>
  5 + </transition>
  6 + </div>
7 7 </template>
8 8  
9 9 <script>
10 10 import _ from "lodash";
11 11 export default {
12   - name: "app",
13   - mounted() {
  12 + name: "app",
  13 + mounted() {},
  14 + methods: {
  15 + _reSize() {
  16 + const $app = this.$refs.app;
14 17  
15   - },
16   - methods: {
17   - _reSize() {
  18 + const standardScale = "100%" / "100%";
18 19  
19   - const $app = this.$refs.app;
  20 + const docHeight = document.body.clientHeight;
20 21  
21   - const standardScale = "100%" / "100%";
  22 + const docWidth = document.body.clientWidth;
22 23  
23   - const docHeight = document.body.clientHeight;
  24 + if (docWidth < 1700) {
  25 + const currentScale = docHeight / docWidth;
24 26  
25   - const docWidth = document.body.clientWidth;
  27 + let [scale, translate] = [0, 0];
  28 + if (currentScale < standardScale) {
  29 + // 以高度计算
  30 + scale = docHeight / 1080;
26 31  
27   - if (docWidth < 1700) {
  32 + const shouleWidth = 1920 * scale;
28 33  
29   - const currentScale = docHeight / docWidth;
  34 + const offsetWidth = docWidth - shouleWidth;
30 35  
31   - let [scale, translate] = [0, 0];
32   - if (currentScale < standardScale) {
33   - // 以高度计算
34   - scale = docHeight / 1080;
  36 + translate =
  37 + offsetWidth > 0 ? `translate(${offsetWidth / 2}px, 0)` : "";
  38 + } else {
  39 + // 以宽度计算
  40 + scale = docWidth / 1920;
35 41  
36   - const shouleWidth = 1920 * scale;
  42 + const shouleHeight = 1080 * scale;
37 43  
38   - const offsetWidth = docWidth - shouleWidth;
  44 + const offsetHeight = docHeight - shouleHeight;
39 45  
40   - translate =
41   - offsetWidth > 0 ? `translate(${offsetWidth / 2}px, 0)` : "";
  46 + translate =
  47 + offsetHeight > 0 ? `translate(0, ${offsetHeight / 2}px)` : "";
  48 + }
42 49  
43   - } else {
44   - // 以宽度计算
45   - scale = docWidth / 1920;
46   -
47   - const shouleHeight = 1080 * scale;
48   -
49   - const offsetHeight = docHeight - shouleHeight;
50   -
51   - translate =
52   - offsetHeight > 0 ? `translate(0, ${offsetHeight / 2}px)` : "";
53   - }
54   -
55   - if (docHeight <= 600) {
56   -
57   - $app.style.cssText = `
  50 + if (docHeight <= 600) {
  51 + $app.style.cssText = `
58 52 transform: scale(${scale}) ${translate};
59 53 transform-origin: top left;
60 54 min-width: 1920px;
61 55 min-height:830px;
62 56 `;
63   - }
64   - else if (docHeight == 610) {
65   - $app.style.cssText = `
  57 + } else if (docHeight == 610) {
  58 + $app.style.cssText = `
66 59 transform: scale(${scale}) ${translate};
67 60 transform-origin: top left;
68 61 min-width: 1920px;
69 62 min-height:885px;
70   - `;
71   - }
72   - else if (docHeight <= 606) {
73   - $app.style.cssText = `
  63 + `;
  64 + } else if (docHeight <= 606) {
  65 + $app.style.cssText = `
74 66 transform: scale(${scale}) ${translate};
75 67 transform-origin: top left;
76 68 min-width: 1920px;
77 69 min-height:850px;
78 70 `;
79   - }
80   - else if (docHeight <= 650) {
81   -
82   - $app.style.cssText = `
  71 + } else if (docHeight <= 650) {
  72 + $app.style.cssText = `
83 73 transform: scale(${scale}) ${translate};
84 74 transform-origin: top left;
85 75 min-width: 1920px;
86 76 min-height:850px;
87 77 `;
88   - }
89   - else if (docHeight <= 700) {
90   -
91   - $app.style.cssText = `
  78 + } else if (docHeight <= 700) {
  79 + $app.style.cssText = `
92 80 transform: scale(${scale}) ${translate};
93 81 transform-origin: top left;
94 82 min-width: 1920px;
95 83 min-height: 890px;
96 84 `;
97   - }
98   - else if (docHeight <= 750) {
99   -
100   - $app.style.cssText = `
  85 + } else if (docHeight <= 750) {
  86 + $app.style.cssText = `
101 87 transform: scale(${scale}) ${translate};
102 88 transform-origin: top left;
103 89 min-width: 1920px;
104 90 min-height: 910px;
105 91 `;
106   - }
107   - else {
108   - $app.style.cssText = `
109   - transform: scale(${scale}) ${translate};
110   - transform-origin: top left;
111   - min-width: 1920px;
112   - min-height:1045px;
  92 + }
  93 + // else {
  94 + // $app.style.cssText = `
  95 + // transform: scale(${scale}) ${translate};
  96 + // transform-origin: top left;
  97 + // min-width: 1920px;
  98 + // min-height:1045px;
  99 + // `;
  100 + // }
  101 + else {
  102 + $app.style.cssText = `
  103 + transform: scale(${scale}) ${translate};
  104 + transform-origin: top left;
  105 + min-width: 1920px;
  106 + min-height:989px;
113 107 `;
114   - }
115   -
116   - } else {
117   - $app.style.cssText = '';
118   - }
119   - },
120   - },
121   - created() {
122   - let that = this;
123   -
124   - this.$nextTick(() => {
125   - if (document.createEvent) {
126   - that._reSize();
127   - } else if (document.createEventObject) {
128   - that._reSize();
129   - }
130   - });
131   - }
132   -}
133   -
  108 + }
  109 + } else {
  110 + $app.style.cssText = "";
  111 + }
  112 + },
  113 + },
  114 + created() {
  115 + let that = this;
  116 +
  117 + this.$nextTick(() => {
  118 + if (document.createEvent) {
  119 + that._reSize();
  120 + } else if (document.createEventObject) {
  121 + that._reSize();
  122 + }
  123 + });
  124 + },
  125 +};
134 126 </script>
135 127  
136 128 <style lang="scss">
137 129 body {
138   - margin: 0px;
139   - padding: 0px;
140   - font-family: Microsoft YaHei, Helvetica Neue, Helvetica, PingFang SC, Hiragino Sans GB, SimSun, sans-serif;
141   - -webkit-font-smoothing: antialiased;
  130 + margin: 0px;
  131 + padding: 0px;
  132 + font-family: Microsoft YaHei, Helvetica Neue, Helvetica, PingFang SC,
  133 + Hiragino Sans GB, SimSun, sans-serif;
  134 + -webkit-font-smoothing: antialiased;
142 135 }
143 136  
144 137 #app {
145   - position: absolute;
146   - top: 0px;
147   - bottom: 0px;
148   - width: 100%;
  138 + position: absolute;
  139 + top: 0px;
  140 + bottom: 0px;
  141 + width: 100%;
149 142 }
150 143  
151 144 a {
152   - color: #56a9ff;
  145 + color: #56a9ff;
153 146 }
154 147  
155 148 .fade-enter-active,
156 149 .fade-leave-active {
157   - transition: all .2s ease;
  150 + transition: all 0.2s ease;
158 151 }
159 152  
160 153 .fade-enter,
161 154 .fade-leave-active {
162   - opacity: 0;
  155 + opacity: 0;
163 156 }
164 157  
165 158 #nprogress .bar {
166   - height: 3px !important;
167   - background: #56a9ff !important; //自定义颜色
  159 + height: 3px !important;
  160 + background: #56a9ff !important; //自定义颜色
168 161 }
169 162 </style>
... ...
src/api/urls/apis.js
... ... @@ -506,7 +506,7 @@ export default {
506 506 // 获取年级信息
507 507 teacherClassList: "api_html/teaching/classList",
508 508 // 获取班级信息
509   - teacherGradeList: "api_html/teaching/grade",
  509 + teacherGradeList: "api_html/teaching/gradeByTeacher",
510 510 // 保存接口
511 511 getWrongQuestionSave: "api_html/teaching/wrongQuestion/save",
512 512 };
... ...
src/assets/images/aside/wrong-question-default.png 0 → 100644

6.1 KB

src/assets/images/aside/wrong-question.png 0 → 100644

5.88 KB

src/router/index.js
... ... @@ -346,8 +346,8 @@ let addrouters = [
346 346 },
347 347 {
348 348 path: "/wrongQuestion",
349   - iconImage: require("@/assets/images/aside/suitangwen-baobiao-default.png"),
350   - selectedIconImage: require("@/assets/images/aside/suitangwen-baobiao-selected.png"),
  349 + iconImage: require("@/assets/images/aside/wrong-question-default.png"),
  350 + selectedIconImage: require("@/assets/images/aside/wrong-question.png"),
351 351 name: "错题组卷",
352 352 demoRoles: ["ROLE_JIAOSHI"],
353 353 component: wrongQuestion,
... ...
src/views/basic/askTestQuestion/components/wrongQuestionDialog.vue
... ... @@ -37,6 +37,11 @@
37 37 style="padding: 0 200px"
38 38 />
39 39 </div>
  40 + <div class="binding">
  41 + <div class="size color">班级:_____________</div>
  42 + <div class="size color">姓名:_____________</div>
  43 + <div class="size color">学号:_____________</div>
  44 + </div>
40 45 <div class="test-group">
41 46 <div
42 47 class="outer-item"
... ... @@ -59,7 +64,7 @@
59 64 <div
60 65 class="test-group-title"
61 66 :class="{
62   - border: selectedIndex == group.questionType,
  67 + borderTitle: selectedIndex == group.questionType,
63 68 }"
64 69 @mouseenter="handleGroupMouseEnter(group.questionType, 'all')"
65 70 >
... ... @@ -95,7 +100,7 @@
95 100 left: tooltipPosition.x + 'px',
96 101 }"
97 102 >
98   - 单击设置试卷标题
  103 + 单击修改大题名称
99 104 </div>
100 105  
101 106 <span
... ... @@ -144,6 +149,7 @@
144 149 width: 100%;
145 150 pointer-events: none;
146 151 border: none; /* 启用点击穿透 */
  152 + padding: 0 0 0 10px;
147 153 "
148 154 ></iframe>
149 155 </div>
... ... @@ -158,10 +164,18 @@
158 164 >分
159 165 </div>
160 166 <div class="edit-button">
161   - <el-button class="button-width" type="primary" @click="handleSava"
  167 + <el-button
  168 + :disabled="dataYesNo(groups)"
  169 + class="button-width"
  170 + type="primary"
  171 + @click="handleSava"
162 172 >保存试卷</el-button
163 173 >
164   - <el-button class="button-width" plain @click="handleSava('print')"
  174 + <el-button
  175 + :disabled="dataYesNo(groups)"
  176 + class="button-width"
  177 + plain
  178 + @click="handleSava('print')"
165 179 >保存并打印</el-button
166 180 >
167 181 <el-button
... ... @@ -177,10 +191,10 @@
177 191 </div>
178 192 </div>
179 193 <div class="edit-info">
180   - <div class="title size color" style="padding: 15px 0 0 10px">
  194 + <div class="title size color" style="padding: 10px 0 5px 10px">
181 195 题目排序
182   - <span class="title size" style="color: #999999"
183   - >(拖拽题号可拖拽排序)</span
  196 + <span class="title size font-weight" style="color: #999999"
  197 + >(拖拽题号可排序)</span
184 198 >
185 199 </div>
186 200 <!-- 外层容器,允许拖拽整个组 -->
... ... @@ -202,9 +216,10 @@
202 216 v-model="group.questionScore"
203 217 :min="1"
204 218 :max="30"
205   - style="width: 100px"
206   - :step="1"
207   - :precision="0"
  219 + style="width: 120px"
  220 + :precision="1"
  221 + :step="0.5"
  222 + @change="handleInput"
208 223 ></el-input-number>
209 224 </div>
210 225 </div>
... ... @@ -274,6 +289,13 @@ export default {
274 289 return null;
275 290 },
276 291 },
  292 + userId: {
  293 + // uid
  294 + type: [String, Number],
  295 + default() {
  296 + return null;
  297 + },
  298 + },
277 299 },
278 300 data() {
279 301 return {
... ... @@ -302,24 +324,32 @@ export default {
302 324 visible(val) {
303 325 if (val) {
304 326 // 上面数据测试
305   - this.testData = JSON.parse(localStorage.getItem("testData")) || [];
306   - this.groups = JSON.parse(localStorage.getItem("question")) || [];
  327 + this.testData =
  328 + JSON.parse(localStorage.getItem(this.userId + "testData")) || [];
  329 + this.groups =
  330 + JSON.parse(localStorage.getItem(this.userId + "question")) || [];
307 331 // 如果都没有直接return 执行初始化
308 332 if (this.groups.length == 0) {
309 333 this.init();
310   - localStorage.setItem("testData", JSON.stringify(this.list));
  334 + localStorage.setItem(
  335 + this.userId + "testData",
  336 + JSON.stringify(this.list)
  337 + );
311 338 return;
312 339 }
313 340 // 如果一致 就直接赋值
314 341 if (
315 342 this.arraysHaveSameIds(this.testData, this.list) &&
316   - JSON.parse(localStorage.getItem("question"))
  343 + JSON.parse(localStorage.getItem(this.userId + "question"))
317 344 ) {
318 345 return;
319 346 } else {
320 347 let data = this.findMissingIds(this.testData, this.list);
321 348 this.testData = this.list;
322   - localStorage.setItem("testData", JSON.stringify(this.testData));
  349 + localStorage.setItem(
  350 + this.userId + "testData",
  351 + JSON.stringify(this.testData)
  352 + );
323 353 this.testAddDel(this.groups, data.addArr, data.delArr);
324 354 }
325 355 } else {
... ... @@ -346,7 +376,10 @@ export default {
346 376 this.groups.reduce((accumulator, current) => {
347 377 return accumulator.concat(current.subQuestionIds);
348 378 }, []) || [];
349   - localStorage.setItem("testData", JSON.stringify(this.testData));
  379 + localStorage.setItem(
  380 + this.userId + "testData",
  381 + JSON.stringify(this.testData)
  382 + );
350 383 },
351 384 /** 按钮 - 取消 */
352 385 handleClose() {
... ... @@ -370,7 +403,10 @@ export default {
370 403 allItems.forEach((item, index) => {
371 404 item.globalIndex = index + 1;
372 405 });
373   - localStorage.setItem("question", JSON.stringify(this.groups));
  406 + localStorage.setItem(
  407 + this.userId + "question",
  408 + JSON.stringify(this.groups)
  409 + );
374 410 },
375 411 classifyByType(arr) {
376 412 const result = {};
... ... @@ -397,7 +433,9 @@ export default {
397 433 const doc = iframeRef.contentDocument || iframeRef.contentWindow.document;
398 434 const body = iframeRef.contentWindow.document.body;
399 435 body.style.overflowX = "hidden"; // 不允许出现横向滚动条
400   - const height = body.scrollHeight; // 获取内容的高度
  436 + const height = body.offsetHeight; // 获取内容的高度
  437 + console.log(height, "height");
  438 + console.log(body, "body");
401 439 iframeRef.style.height = `${height + 20}px`; // 设置 iframe 的高度
402 440 // 获取第一个P标签
403 441 const firstP = doc.getElementsByTagName("p")[0];
... ... @@ -421,7 +459,10 @@ export default {
421 459 // 保存修改后的内容,回车或失去焦点时触发
422 460 save() {
423 461 this.isEditing = false;
424   - localStorage.setItem("question", JSON.stringify(this.groups));
  462 + localStorage.setItem(
  463 + this.userId + "question",
  464 + JSON.stringify(this.groups)
  465 + );
425 466 },
426 467  
427 468 // 单题title修改
... ... @@ -438,7 +479,10 @@ export default {
438 479 // 单体title保存
439 480 groupSave(index) {
440 481 this.$set(this.groups[index], "input", false);
441   - localStorage.setItem("question", JSON.stringify(this.groups));
  482 + localStorage.setItem(
  483 + this.userId + "question",
  484 + JSON.stringify(this.groups)
  485 + );
442 486 },
443 487 // 高亮
444 488 selectItem(id, type) {
... ... @@ -456,10 +500,16 @@ export default {
456 500 let _index = this.groups.findIndex((item) => item.questionType == id);
457 501 if (_index != -1) {
458 502 this.groups.splice(_index, 1);
459   - localStorage.setItem("question", JSON.stringify(this.groups));
  503 + localStorage.setItem(
  504 + this.userId + "question",
  505 + JSON.stringify(this.groups)
  506 + );
460 507 this.updateGlobalIndexes();
461 508 this.testDataFun();
462   - localStorage.setItem("testlist", JSON.stringify(this.testData));
  509 + localStorage.setItem(
  510 + this.userId + "testlist",
  511 + JSON.stringify(this.testData)
  512 + );
463 513 this.$emit("setQuestions");
464 514 }
465 515 } else {
... ... @@ -470,10 +520,16 @@ export default {
470 520 );
471 521 }
472 522 });
473   - localStorage.setItem("question", JSON.stringify(this.groups));
  523 + localStorage.setItem(
  524 + this.userId + "question",
  525 + JSON.stringify(this.groups)
  526 + );
474 527 this.updateGlobalIndexes();
475 528 this.testDataFun();
476   - localStorage.setItem("testlist", JSON.stringify(this.testData));
  529 + localStorage.setItem(
  530 + this.userId + "testlist",
  531 + JSON.stringify(this.testData)
  532 + );
477 533 this.$emit("setQuestions");
478 534 }
479 535 },
... ... @@ -547,19 +603,32 @@ export default {
547 603 return false;
548 604 },
549 605 processString(input) {
550   - // 正则表达式:匹配最多三位数字
551   - const regex = /^(\d{1,3})/;
552   -
553   - // 测试字符串是否以数字开头
554   - const match = input.match(regex);
  606 + // 正则表达式:
  607 + // const regexs = [/[0-9]+[.)]/, /(\d+分)/, /^(\d{1,3})/];
555 608  
  609 + // // 使用正则表达式匹配并处理输入字符串
  610 + // for (const regex of regexs) {
  611 + // const match = input.match(regex);
  612 + // if (match) {
  613 + // if (regex === regexs[2]) {
  614 + // // 如果匹配第三条规则,使用substring截取返回结果的长度加1
  615 + // const matchLength = match[0].length;
  616 + // return input.substring(matchLength + 1).trim();
  617 + // } else {
  618 + // // 如果匹配第一条或第二条规则,替换匹配的部分
  619 + // input = input.replace(regex, "");
  620 + // }
  621 + // }
  622 + // }
  623 + const match = input.match(/^(\d{1,3})/);
556 624 if (match) {
557   - // 如果匹配,去掉开头的数字并返回剩余部分
558   - return input.substring(match[0].length + 1).trim();
  625 + const matchLength = match[0].length;
  626 + input = input.substring(matchLength + 1).trim();
559 627 }
560   -
561   - // 如果没有匹配,直接返回原字符串
562   - return input;
  628 + // 使用正则表达式匹配并处理输入字符串
  629 + input = input.replace(/[0-9]+[.).]/, "");
  630 + input = input.replace(/(\d+(\.\d+)?分)/g, "");
  631 + return input.trim();
563 632 },
564 633  
565 634 // 接受两个参数,返回需要删除的数据以及需要添加的数据
... ... @@ -608,16 +677,14 @@ export default {
608 677 // 删除数据
609 678 arr3.forEach((item3) => {
610 679 // 在 array1 中找到匹配的 type
611   - let matchedArray1Item = arr1.find(
612   - (item1) => item1.questionType == item3.questionType
  680 + let matchedArray1Item = arr1.find((item1) =>
  681 + item1.subQuestionIds.filter((item) => item.id == item3.id)
613 682 );
614 683 if (matchedArray1Item) {
615 684 // 如果找到了匹配的 type,遍历 matchedArray1Item 的 items
616 685 let _index = matchedArray1Item.subQuestionIds.findIndex(
617 686 (item) => item.id === item3.id
618 687 );
619   - console.log("_index");
620   -
621 688 if (_index != -1) {
622 689 matchedArray1Item.subQuestionIds.splice(_index, 1);
623 690 }
... ... @@ -673,10 +740,21 @@ export default {
673 740 if (res.status == 0) {
674 741 this.groups = [];
675 742 this.testData = [];
676   - localStorage.setItem("testlist", JSON.stringify(this.testData));
677   - localStorage.setItem("question", JSON.stringify(this.groups));
  743 + localStorage.setItem(
  744 + this.userId + "testlist",
  745 + JSON.stringify(this.testData)
  746 + );
  747 + localStorage.setItem(
  748 + this.userId + "question",
  749 + JSON.stringify(this.groups)
  750 + );
678 751 this.$emit("setQuestions");
679 752 this.handleClose();
  753 + this.$message({
  754 + message: "已保存到“即时测-组卷-我自编的”",
  755 + type: "success",
  756 + });
  757 +
680 758 if (type == "print") {
681 759 this.$request
682 760 .tPaperDetail({
... ... @@ -693,7 +771,7 @@ export default {
693 771 // 清空
694 772 handleClear() {
695 773 this.$confirm("确定要清空试题篮内的全部题目吗?", "提示", {
696   - confirmButtonText: "确定",
  774 + confirmButtonText: "清空",
697 775 cancelButtonText: "取消",
698 776 confirmButtonClass: "el-button--danger1",
699 777 cancelButtonClass: "el-button--primary",
... ... @@ -705,8 +783,15 @@ export default {
705 783 .then(() => {
706 784 this.groups = [];
707 785 this.testDataFun();
708   - localStorage.setItem("question", JSON.stringify(this.groups));
709   - localStorage.setItem("testlist", JSON.stringify(this.testData));
  786 + localStorage.setItem(
  787 + this.userId + "question",
  788 + JSON.stringify(this.groups)
  789 + );
  790 + localStorage.setItem(
  791 + this.userId + "testlist",
  792 + JSON.stringify(this.testData)
  793 + );
  794 +
710 795 this.$emit("setQuestions");
711 796 })
712 797 .catch(() => {
... ... @@ -724,6 +809,30 @@ export default {
724 809 return sum + Number(item.questionScore) * item.subQuestionIds.length;
725 810 }, 0);
726 811 },
  812 +
  813 + // 当分数发生变化的时候
  814 + handleInput() {
  815 + localStorage.setItem(
  816 + this.userId + "question",
  817 + JSON.stringify(this.groups)
  818 + );
  819 + },
  820 + dataYesNo(data) {
  821 + if (data.length < 1) {
  822 + return true;
  823 + }
  824 + let list = [];
  825 + data.forEach((item) => {
  826 + list.push(...item.subQuestionIds);
  827 + });
  828 + console.log(list, "list");
  829 +
  830 + if (list.length < 1) {
  831 + return true;
  832 + } else {
  833 + return false;
  834 + }
  835 + },
727 836 },
728 837 };
729 838 </script>
... ... @@ -739,9 +848,9 @@ export default {
739 848 .test {
740 849 flex: 1;
741 850 height: fit-content;
742   - max-height: 742px;
  851 + height: 742px;
743 852 overflow-y: auto;
744   - box-shadow: 0 0 10px 0 #999999;
  853 + box-shadow: 0 0 10px 0 #cfcfcf;
745 854 margin-right: 20px;
746 855 box-sizing: border-box;
747 856 padding: 0 20px;
... ... @@ -763,13 +872,17 @@ export default {
763 872 justify-content: space-around;
764 873 align-items: center;
765 874 }
766   -
  875 + .binding {
  876 + display: flex;
  877 + padding: 20px 80px;
  878 + justify-content: space-around;
  879 + }
767 880 .test-group {
768 881 .test-group-title {
769 882 position: relative;
770 883 height: 40px;
771   - line-height: 30px;
772   - padding: 10px 0 0 0;
  884 + line-height: 40px;
  885 + padding: 0;
773 886 }
774 887 }
775 888 }
... ... @@ -782,7 +895,8 @@ export default {
782 895 .edit-title {
783 896 width: 100%;
784 897 height: 200px;
785   - border: 1px solid #999999;
  898 + border: 1px solid #cfcfcf;
  899 + border-radius: 5px;
786 900  
787 901 .edit-title-info {
788 902 height: 60px;
... ... @@ -814,11 +928,12 @@ export default {
814 928  
815 929 .edit-info {
816 930 flex: 1;
817   - border: 1px solid #999999;
  931 + border: 1px solid #cfcfcf;
818 932 margin-top: 20px;
819 933 max-height: 500px;
820 934 padding: 10px;
821 935 overflow: auto;
  936 + border-radius: 5px;
822 937  
823 938 .group-item {
824 939 margin: 10px;
... ... @@ -838,14 +953,14 @@ export default {
838 953 .questions {
839 954 display: flex;
840 955 flex-wrap: wrap;
841   -
  956 + padding: 10px 0;
842 957 .question-item {
843 958 width: 35px;
844 959 height: 35px;
845 960 border: 1px solid rgb(172, 188, 249);
846 961 border-radius: 4px;
847 962 cursor: grab;
848   - margin: 5px 8px;
  963 + margin: 0 10px 10px 10px;
849 964 line-height: 35px;
850 965 text-align: center;
851 966 font-size: 16px !important;
... ... @@ -882,6 +997,7 @@ export default {
882 997 .border {
883 998 border: 1px solid rgb(173, 190, 250);
884 999 position: relative;
  1000 + border-radius: 3px;
885 1001  
886 1002 .border-del {
887 1003 position: absolute;
... ... @@ -894,7 +1010,7 @@ export default {
894 1010 color: rgb(67, 141, 255);
895 1011 font-size: 14px !important;
896 1012 line-height: 28px;
897   - font-weight: 600;
  1013 +
898 1014 cursor: pointer;
899 1015 }
900 1016 }
... ... @@ -919,9 +1035,16 @@ export default {
919 1035 background: rgb(233, 237, 253);
920 1036 width: fit-content;
921 1037 }
  1038 +.borderTitle {
  1039 + background: rgba(102, 127, 253, 0.1);
  1040 + padding: 0;
  1041 +}
922 1042  
923 1043 .title-bg {
924 1044 background: rgb(115, 142, 246);
925 1045 border-bottom: 1px solid rgb(115, 142, 246);
926 1046 }
  1047 +.font-weight {
  1048 + font-weight: 400;
  1049 +}
927 1050 </style>
... ...
src/views/basic/askTestQuestion/update.vue
... ... @@ -80,7 +80,7 @@
80 80 </div>
81 81 <div class="qs-partScore">
82 82 <p v-if="subQuestion.questionType != 3">------</p>
83   - <el-input-number class="number-ipt" v-else size="medium" :min="0" :precision="2"
  83 + <el-input-number :disabled="isViewer && !isWrong" class="number-ipt" v-else size="medium" :min="0" :precision="2"
84 84 :max="subQuestion.score" :step="0.5" v-model="subQuestion.partScore" label="漏选得分" />
85 85 </div>
86 86 <div class="qs-options">
... ... @@ -162,7 +162,7 @@
162 162 </div>
163 163 <div class="qs-partScore">
164 164 <p v-if="question.questionType != 3">------</p>
165   - <el-input-number class="number-ipt" v-else size="medium" :min="0" :precision="2"
  165 + <el-input-number :disabled="isViewer && !isWrong" class="number-ipt" v-else size="medium" :min="0" :precision="2"
166 166 :max="question.score" :step="0.5" v-model="question.partScore" label="漏选得分" />
167 167 </div>
168 168 <div class="qs-options">
... ... @@ -331,7 +331,7 @@
331 331 </div>
332 332 <div class="content-fi">
333 333 <el-button type="info" @click="linkBack">取消</el-button>
334   - <el-button class="green-el-button" @click="save">保存</el-button>
  334 + <el-button v-if="!isViewer || isWrong" class="green-el-button" @click="save">保存</el-button>
335 335 </div>
336 336 </el-main>
337 337 </el-container>
... ...
src/views/basic/askTestQuestion/wrongQuestion.vue
1 1 <template>
2 2 <div class="page-content" v-loading="queryLoading">
3 3 <div class="page-title">
4   - <span class="default-title">错题组卷</span>
  4 + <span class="default-title"
  5 + >错题组卷
  6 + <span class="font-weight size" style="color: #666666"
  7 + >(暂仅包含即时测内使用"导入的试卷"测验后产生的错题,不包含授课端截屏保存的错题)</span
  8 + ></span
  9 + >
  10 +
5 11 <div>
6 12 <el-select
7 13 v-model="formData.grade"
... ... @@ -21,7 +27,7 @@
21 27 @change="changeSubject"
22 28 v-model="formData.subjectName"
23 29 placeholder=""
24   - style="width: 100px; margin-left: 10px"
  30 + style="width: 120px; margin-left: 10px"
25 31 >
26 32 <el-option
27 33 v-for="(item, index) in subjectList"
... ... @@ -49,7 +55,7 @@
49 55 </div>
50 56 </el-col>
51 57 <el-col class="col-margin" :span="12">
52   - <span style="font-weight: 600">时间:</span>
  58 + <span style="font-weight: 600; white-space: nowrap">时间:</span>
53 59 <el-date-picker
54 60 :clearable="false"
55 61 value-format="yyyy-MM-dd"
... ... @@ -71,7 +77,7 @@
71 77 </el-col>
72 78 <el-col class="col-margin" :span="8">
73 79 <span style="font-weight: 600">得分率:</span>
74   - <div>
  80 + <div style="font-size: 16px !important">
75 81 <el-input
76 82 v-model="formData.startScoreRate"
77 83 type="number"
... ... @@ -95,10 +101,7 @@
95 101 </div>
96 102 </el-col>
97 103 <el-col class="col-margin" :span="7"
98   - ><span
99   - style="font-weight: 600; width: fit-content; white-space: nowrap"
100   - >题型:</span
101   - >
  104 + ><span style="font-weight: 600; white-space: nowrap">题型:</span>
102 105 <div
103 106 @click="handleQuestion(item.value)"
104 107 class="select-box"
... ... @@ -114,7 +117,6 @@
114 117 @click="handleSearch"
115 118 style="background: #6b73f5"
116 119 type="primary"
117   - y
118 120 >筛选错题</el-button
119 121 ></el-col
120 122 >
... ... @@ -130,13 +132,21 @@
130 132 >道题)</span
131 133 >
132 134 </div>
  135 + <div
  136 + style="text-align: center; line-height: 400px"
  137 + v-if="topicList.length < 1"
  138 + >
  139 + 筛选条件下,暂无题目
  140 + </div>
133 141 <div class="topic" v-for="(item, index) in topicList" :key="index">
134 142 <div class="topic-title">
135 143 <div style="display: flex">
136 144 <div style="display: flex; align-items: center">
137   - <span class="size"> 第 {{ item.questionIndex }} 题 </span>
  145 + <span class="size font-weight">
  146 + 第 {{ item.questionIndex }} 题
  147 + </span>
138 148 <div
139   - class="select-box Selected size"
  149 + class="select-box Selected size font-weight"
140 150 style="padding: 3px 5px; margin-right: 20px"
141 151 >
142 152 {{
... ... @@ -148,39 +158,46 @@
148 158 </div>
149 159 <div>
150 160 <span class="color size"> 得分率: </span>
151   - <span class="score-color size">{{ item.scoreRate }}%</span>
152   - <span class="size">({{ item.joinClassNames }})</span>
  161 + <span class="score-color size"
  162 + >{{ formatNumber(item.scoreRate) }}%</span
  163 + >
  164 + <span class="size font-weight"
  165 + >({{ item.joinClassNames }})</span
  166 + >
153 167 </div>
154 168 </div>
155 169 <div>
156   - <span class="color size">来自试卷:</span
157   - ><span class="size">{{ item.paperName }}</span>
158   - <span class="color size" style="margin-left: 20px"
  170 + <span class="color size font-weight">来自试卷:</span
  171 + ><span class="size font-weight">{{ item.paperName }}</span>
  172 + <span class="color size font-weight" style="margin-left: 20px"
159 173 >测试时间:</span
160   - ><span class="size">{{ item.testTime }}</span>
  174 + ><span class="size font-weight">{{ item.testTime }}</span>
161 175 </div>
162 176 </div>
163 177  
164 178 <iframe
165   - class="topic-info"
166 179 :src="item.screenshot"
167 180 :ref="'iframe' + index"
168   - style="width: 100%"
  181 + style="width: 100%; border: none; padding: 0 0 0 10px"
169 182 @load="onIFrameLoad(index)"
170 183 />
171 184 <!-- <div class="topic-info" v-html="item.modifiedHtml"></div> -->
172 185 <div class="topic-bottom">
173   - <div>
  186 + <div style="padding-left: 20px">
174 187 <span
175 188 v-if="item.answerScreenshot"
176   - class="knowledge size"
  189 + class="knowledge size font-weight"
177 190 @click="handleAnalysis(item.answerScreenshot)"
178 191 ><i class="el-icon-key"></i>查看解析</span
179 192 >
180   - <span class="color size">知识点:</span>
181   - <span class="size">{{ item.knowledge }}</span>
  193 + <span class="color size font-weight">知识点:</span>
  194 + <span v-if="item.knowledge" class="size">{{
  195 + item.knowledge
  196 + }}</span>
  197 + <span v-else class="size color font-weight">未标注</span>
182 198 </div>
183 199 <el-button
  200 + style="margin-right: 20px"
184 201 v-if="!questions.some((obj) => item.id === obj.id)"
185 202 class="button"
186 203 type="primary"
... ... @@ -190,9 +207,9 @@
190 207 <el-button
191 208 v-else
192 209 plain
193   - style="padding: 5px 10px"
  210 + style="padding: 5px 10px; margin-right: 20px"
194 211 @click="handleDel(item)"
195   - >移试卷</el-button
  212 + >移试卷</el-button
196 213 >
197 214 </div>
198 215 </div>
... ... @@ -219,6 +236,7 @@
219 236 questions.map((item) => item.id)
220 237 )
221 238 "
  239 + style="margin-right: 20px"
222 240 @click="handleAllTest()"
223 241 >全选本页</el-button
224 242 >
... ... @@ -227,8 +245,8 @@
227 245 class="button-size"
228 246 v-else
229 247 plain
230   - style="padding: 5px 10px"
231   - >移除本页</el-button
  248 + style="padding: 5px 10px; margin-right: 20px"
  249 + >移出本页</el-button
232 250 >
233 251 </div>
234 252 <div class="shopping" @click="handleShop">
... ... @@ -247,6 +265,7 @@
247 265 :sectionId="formData.sectionId"
248 266 :gradeId="formData.grade"
249 267 @setQuestions="setQuestions"
  268 + :userId="userId"
250 269 />
251 270 <analysisDialog
252 271 :visible.sync="analysisVisible"
... ... @@ -289,8 +308,8 @@ export default {
289 308 classList: [],
290 309 // 时间选择
291 310 dateList: [
292   - { type: "onDay", name: "今天" },
293 311 { type: "onWeek", name: "本周" },
  312 + { type: "onMonth", name: "本月" },
294 313 { type: "term", name: "本学期" },
295 314 ],
296 315 // 题型选择
... ... @@ -307,27 +326,34 @@ export default {
307 326 formData: {
308 327 classId: 1, // 班级选中
309 328 // type: "onDay", // 时间类型
310   - type: "onDay", // 时间类型
  329 + type: "onWeek", // 时间类型
311 330 dateRange: ["2022-03-01", "2023-05-01"], // 开始结束时间
312 331 startScoreRate: 0, // 开始区间
313   - endScoreRate: 100, // 结束区间
  332 + endScoreRate: 60, // 结束区间
314 333 questionType: null, // 题型
315 334 subjectName: null, // 科目
316 335 grade: null, // 年级
317 336 gradeName: null, // 年级名称
318 337 },
  338 + userId: "",
319 339 questions: [],
320 340 };
321 341 },
322 342 created() {
  343 + let user = JSON.parse(localStorage.getItem("info"));
  344 + this.userId = user.uid;
323 345 this.handleDate(this.formData.type);
324 346 this.queryLoading = true;
325 347 this.getGradeList();
326   - if (!localStorage.getItem("testlist")) {
327   - localStorage.setItem("testlist", JSON.stringify(this.questions));
  348 + if (!localStorage.getItem(this.userId + "testlist")) {
  349 + localStorage.setItem(
  350 + this.userId + "testlist",
  351 + JSON.stringify(this.questions)
  352 + );
328 353 } else {
329   - this.questions = JSON.parse(localStorage.getItem("testlist"));
330   - console.log(this.questions, "===");
  354 + this.questions = JSON.parse(
  355 + localStorage.getItem(this.userId + "testlist")
  356 + );
331 357 }
332 358 },
333 359 methods: {
... ... @@ -370,7 +396,10 @@ export default {
370 396 return list;
371 397 },
372 398 // 获取列表
373   - async getList() {
  399 + async getList(type) {
  400 + if (type) {
  401 + this.listPage.page = 1;
  402 + }
374 403 let param = {
375 404 ...this.listPage,
376 405 ...this.formData,
... ... @@ -389,7 +418,7 @@ export default {
389 418 },
390 419 pageSizeChange(value) {
391 420 this.listPage.page = value;
392   - this.handleSearch();
  421 + this.getList();
393 422 },
394 423  
395 424 // 全选按钮
... ... @@ -419,12 +448,10 @@ export default {
419 448 if (value < this.minValue) {
420 449 this.formData.startScoreRate = this.minValue; // 修正值
421 450 }
422   - if (value > this.maxValue) {
423   - this.formData.startScoreRate = this.maxValue; // 修正值
424   - }
425 451 if (value > this.formData.endScoreRate) {
426 452 this.formData.startScoreRate = this.formData.endScoreRate;
427 453 }
  454 +
428 455 if (!value) {
429 456 this.formData.startScoreRate = 0;
430 457 }
... ... @@ -434,12 +461,13 @@ export default {
434 461 if (value < this.minValue) {
435 462 this.formData.endScoreRate = this.minValue; // 修正值
436 463 }
437   - if (value > this.maxValue) {
438   - this.formData.endScoreRate = this.maxValue; // 修正值
439   - }
  464 +
440 465 if (value < this.formData.startScoreRate) {
441 466 this.formData.endScoreRate = this.formData.startScoreRate;
442 467 }
  468 + if (value > this.maxValue) {
  469 + this.formData.endScoreRate = this.maxValue; // 修正值
  470 + }
443 471 if (!value) {
444 472 this.formData.endScoreRate = 0;
445 473 }
... ... @@ -448,50 +476,63 @@ export default {
448 476 // 搜索按钮
449 477 handleSearch() {
450 478 this.queryLoading = true;
451   - this.getList();
  479 + this.getList("type");
452 480 },
453 481  
454 482 // 加入试卷
455 483 handleAddTest(item) {
456 484 // if (this.questions.includes(item.id)) return;
457 485 if (this.questions.some((obj) => obj.id === item.id)) return;
458   - this.questions = JSON.parse(localStorage.getItem("testlist")) || [];
  486 + this.questions =
  487 + JSON.parse(localStorage.getItem(this.userId + "testlist")) || [];
459 488 this.questions.push(item);
460   - localStorage.setItem("testlist", JSON.stringify(this.questions));
  489 + localStorage.setItem(
  490 + this.userId + "testlist",
  491 + JSON.stringify(this.questions)
  492 + );
461 493 },
462 494 // 移除试卷
463 495 handleDel(item) {
464 496 let _index = this.questions.findIndex((obj) => obj.id === item.id);
465 497 if (_index !== -1) {
466 498 this.questions.splice(_index, 1); // 从索引位置删除一个元素
467   - localStorage.setItem("testlist", JSON.stringify(this.questions));
  499 + localStorage.setItem(
  500 + this.userId + "testlist",
  501 + JSON.stringify(this.questions)
  502 + );
468 503 }
469 504 },
470 505 // 全部选中
471 506 handleAllTest() {
472 507 // 获取原来的localStorage
473   - let list = JSON.parse(localStorage.getItem("testlist")) || [];
  508 + let list =
  509 + JSON.parse(localStorage.getItem(this.userId + "testlist")) || [];
474 510  
475 511 let ids = this.topicList.map((item) => {
476 512 return item;
477 513 });
478   - console.log(list, "-=-11-=");
479   -
480 514 this.questions = this.removeDuplicates([...ids, ...list]);
481   - localStorage.setItem("testlist", JSON.stringify(this.questions));
  515 + localStorage.setItem(
  516 + this.userId + "testlist",
  517 + JSON.stringify(this.questions)
  518 + );
482 519 },
483 520 // 全部删除
484 521 handleDelTest() {
485 522 let list = this.removeMatchingValues(this.topicList, this.questions);
486 523 this.questions = list;
487   - console.log("移除本业", this.questions);
488   -
489   - localStorage.setItem("testlist", JSON.stringify(this.questions));
  524 + localStorage.setItem(
  525 + this.userId + "testlist",
  526 + JSON.stringify(this.questions)
  527 + );
490 528 },
491 529 // 重置 去除locastorage 以及 questions
492 530 handleRest() {
493 531 this.questions = [];
494   - localStorage.setItem("testlist", JSON.stringify(this.questions));
  532 + localStorage.setItem(
  533 + this.userId + "testlist",
  534 + JSON.stringify(this.questions)
  535 + );
495 536 },
496 537 // 去重
497 538 removeDuplicates(arr) {
... ... @@ -529,27 +570,17 @@ export default {
529 570  
530 571 // 获取科目列表
531 572 async getSubject(params) {
532   - console.log(params, "params");
533   -
534 573 let data = await this.$request.getSubjectList(params);
535   - console.log(data, "--------");
536   -
537 574 this.subjectList = data.data.subjectNames;
538   - console.log(this.subjectList, "我被打印了");
539   -
540 575 this.formData.subjectName = this.subjectList[0];
541 576 this.getClassList();
542 577 },
543 578 // 获取年级列表
544 579 async getGradeList() {
545 580 let data = await this.$request.getClassList();
546   - console.log(data, "----------data");
547   -
548 581 this.gradeList = Array.from(
549 582 new Map(data.data.list.map((item) => [item.grade, item])).values()
550 583 );
551   - console.log(this.gradeList, "gradeList");
552   -
553 584 this.formData.grade = this.gradeList[0].grade;
554 585 this.formData.sectionId = this.gradeList[0].section;
555 586 this.formData.gradeName = this.gradeList.find(
... ... @@ -559,8 +590,6 @@ export default {
559 590 },
560 591 // 获取班级信息
561 592 async getClassList() {
562   - console.log(this.formData, "this.formDate");
563   -
564 593 let data = await this.$request.getGradeList({
565 594 grade: this.formData.grade,
566 595 subjectName: this.formData.subjectName,
... ... @@ -572,7 +601,7 @@ export default {
572 601 }),
573 602 ];
574 603 this.formData.classId = null;
575   - this.getList();
  604 + this.getList("type");
576 605 },
577 606  
578 607 // 年级改变
... ... @@ -589,29 +618,42 @@ export default {
589 618 this.getClassList();
590 619 },
591 620 processString(input) {
592   - // 正则表达式:匹配最多三位数字
593   - const regex = /^(\d{1,3})/;
594   -
595   - // 测试字符串是否以数字开头
596   - const match = input.match(regex);
597   -
  621 + const match = input.match(/^(\d{1,3})/);
598 622 if (match) {
599   - // 如果匹配,去掉开头的数字并返回剩余部分
600   - return input.substring(match[0].length + 1).trim();
  623 + const matchLength = match[0].length;
  624 + input = input.substring(matchLength + 1).trim();
601 625 }
602   -
603   - // 如果没有匹配,直接返回原字符串
604   - return input;
  626 + // 使用正则表达式匹配并处理输入字符串
  627 + input = input.replace(/[0-9]+[.).]/, "");
  628 + input = input.replace(/(\d+(\.\d+)?分)/g, "");
  629 + return input.trim();
605 630 },
606 631  
607 632 // 获取ref
608 633 onIFrameLoad(index) {
609 634 const iframeRef = this.$refs["iframe" + index][0]; // 获取对应的 iframe
  635 + // const doc = iframeRef.contentDocument || iframeRef.contentWindow.document;
  636 + // const body = iframeRef.contentWindow.document.body;
  637 + // body.style.overflowX = "hidden"; // 不允许出现横向滚动条
  638 + // const height = body.scrollHeight; // 获取内容的高度
  639 + // iframeRef.style.height = `${height}px`; // 设置 iframe 的高度
  640 + // // 获取第一个P标签
  641 + // const firstP = doc.getElementsByTagName("p")[0];
  642 + // // 或者修改第一个 < p > 标签的内容;
  643 + // if (firstP) {
  644 + // let a = this.processString(firstP.innerHTML);
  645 + // firstP.innerHTML = a;
  646 + // }
610 647 const doc = iframeRef.contentDocument || iframeRef.contentWindow.document;
611 648 const body = iframeRef.contentWindow.document.body;
612 649 body.style.overflowX = "hidden"; // 不允许出现横向滚动条
613   - const height = body.scrollHeight; // 获取内容的高度
614   - iframeRef.style.height = `${height}px`; // 设置 iframe 的高度
  650 + const height = body.offsetHeight; // 获取内容的高度
  651 + console.log(height, "height");
  652 + // console.log("body.offsetHeight:", body.offsetHeight);
  653 + // console.log("body.clientHeight:", body.clientHeight);
  654 + // console.log("body.scrollHeight:", body.scrollHeight);
  655 +
  656 + iframeRef.style.height = `${height + 20}px`; // 设置 iframe 的高度
615 657 // 获取第一个P标签
616 658 const firstP = doc.getElementsByTagName("p")[0];
617 659 // 或者修改第一个 < p > 标签的内容;
... ... @@ -623,7 +665,8 @@ export default {
623 665  
624 666 // 子集删除后 父级需要更新
625 667 setQuestions() {
626   - this.questions = JSON.parse(localStorage.getItem("testlist")) || [];
  668 + this.questions =
  669 + JSON.parse(localStorage.getItem(this.userId + "testlist")) || [];
627 670 },
628 671  
629 672 // 查看解析
... ... @@ -631,6 +674,24 @@ export default {
631 674 this.analysisUrl = url;
632 675 this.analysisVisible = true;
633 676 },
  677 +
  678 + // 保留两位小数
  679 + formatNumber(num) {
  680 + // 检查是否是数字
  681 + if (typeof num !== "number") {
  682 + throw new Error("输入必须是数字");
  683 + }
  684 +
  685 + // 检查小数位数
  686 + const parts = num.toString().split(".");
  687 + if (parts.length === 2 && parts[1].length > 2) {
  688 + // 如果小数部分超过两位,保留两位小数
  689 + return Math.round(num * 100) / 100;
  690 + } else {
  691 + // 否则返回原数据
  692 + return num;
  693 + }
  694 + },
634 695 },
635 696 };
636 697 </script>
... ... @@ -675,12 +736,10 @@ export default {
675 736 }
676 737 }
677 738 .topic {
678   - height: fit-content;
679   - max-height: 500px;
680 739 margin-top: 15px;
681 740 display: flex;
682 741 flex-direction: column;
683   - box-shadow: 0px 0px 9px 0px #999999;
  742 + box-shadow: 0px 0px 9px 0px #cfcfcf;
684 743 border-radius: 5px;
685 744 .topic-title {
686 745 height: 45px;
... ... @@ -692,19 +751,14 @@ export default {
692 751 padding: 0 20px;
693 752 border-radius: 5px 5px 0 0;
694 753 }
695   - .topic-info {
696   - overflow-y: auto;
697   - max-height: 300px;
698   - }
699 754 .topic-bottom {
700 755 height: 45px;
701 756 display: flex;
702 757 align-items: center;
703 758 justify-content: space-between;
704   - margin: 0 20px;
705 759 font-weight: 600;
706 760 box-sizing: border-box;
707   - border-top: 1px solid #d2cdcd;
  761 + border-top: 1px dashed #e0dbdb;
708 762 .knowledge {
709 763 color: rgb(105, 134, 205);
710 764 margin-right: 30px;
... ... @@ -718,15 +772,14 @@ export default {
718 772 display: flex;
719 773 justify-content: space-between;
720 774 align-items: center;
721   - border-top: 1px solid #666666;
  775 + border-top: 1px solid #cfcfcf;
722 776 background: #ffffff;
723   - box-shadow: 0 0 3px 0 #666666;
724 777 padding: 5px 20px 0 20px;
725 778 }
726 779  
727 780 .shopping {
728   - width: 40px;
729   - height: 120px;
  781 + width: 50px;
  782 + height: 135px;
730 783 position: fixed;
731 784 top: 30%;
732 785 right: 0;
... ... @@ -744,13 +797,13 @@ export default {
744 797 text-align: center;
745 798 cursor: pointer;
746 799 .shopping-select {
747   - width: 20px;
748   - height: 20px;
  800 + width: 25px;
  801 + height: 25px;
749 802 border-radius: 50%;
750   - background: yellow;
751   - color: red;
752   - line-height: 20px;
  803 + background: #eb5151;
  804 + color: #ffffff;
753 805 font-size: 12px !important;
  806 + line-height: 25px;
754 807 }
755 808 .size {
756 809 font-size: 14px !important;
... ... @@ -766,6 +819,7 @@ export default {
766 819 margin: 10px 0;
767 820 display: flex;
768 821 align-items: center;
  822 + font-size: 16px !important;
769 823 }
770 824 .button {
771 825 background: #6b73f5;
... ... @@ -775,6 +829,7 @@ export default {
775 829 padding: 5px 10px;
776 830 border-radius: 5px;
777 831 margin: 0 8px;
  832 + font-size: 16px !important;
778 833 cursor: pointer;
779 834 white-space: nowrap;
780 835 width: fit-content;
... ... @@ -795,4 +850,15 @@ export default {
795 850 .size {
796 851 font-size: 14px !important;
797 852 }
  853 +.font-weight {
  854 + font-weight: 400;
  855 +}
  856 +.filter-datePicker {
  857 + font-size: 16px !important;
  858 +}
  859 +::v-deep .el-button {
  860 + span {
  861 + font-size: 16px !important;
  862 + }
  863 +}
798 864 </style>
... ...
src/views/basic/dataSync/index.vue
... ... @@ -57,12 +57,12 @@
57 57  
58 58 <script>
59 59 import { formatDate } from "@/utils";
  60 +import conf from "@/config/index";
60 61 export default {
61 62 data() {
62 63 return {
63 64 role: "",
64   - downLoading: false,
65   - url: "/api_html/teaching/importData",
  65 + downLoading: false,
66 66 file: {},
67 67 dialogVisible: false,
68 68 tipData: {
... ... @@ -82,6 +82,21 @@ export default {
82 82 this.url = "/api_html/personal/importData"
83 83 }
84 84 },
  85 + computed: {
  86 + url: function () {
  87 + var requestUrl = '';
  88 + var ogrinUrl = "/api_html/teaching/importData";
  89 + var baseUrl = conf.baseURL;
  90 + if (baseUrl == '/' && ogrinUrl.indexOf('/') == 0) {
  91 + requestUrl = ogrinUrl;
  92 + }
  93 + else {
  94 + requestUrl = baseUrl + ogrinUrl
  95 + }
  96 + console.log(requestUrl);
  97 + return requestUrl;
  98 + }
  99 + },
85 100 methods: {
86 101 async downloadFile() {
87 102 if (this.downLoading) return;
... ...
src/views/personal/dataSync/index.vue
... ... @@ -58,11 +58,11 @@
58 58  
59 59 <script>
60 60 import { formatDate } from "@/utils";
  61 +import conf from "@/config/index";
61 62 export default {
62 63 data() {
63 64 return {
64   - downLoading: false,
65   - url: "/api_html/personal/importData",
  65 + downLoading: false,
66 66 file: {},
67 67 dialogVisible: false,
68 68 tipData: {
... ... @@ -72,6 +72,21 @@ export default {
72 72 },
73 73 };
74 74 },
  75 + computed: {
  76 + url: function () {
  77 + var requestUrl = '';
  78 + var ogrinUrl = "/api_html/personal/importData";
  79 + var baseUrl = conf.baseURL;
  80 + if (baseUrl == '/' && ogrinUrl.indexOf('/') == 0) {
  81 + requestUrl = ogrinUrl;
  82 + }
  83 + else {
  84 + requestUrl = baseUrl + ogrinUrl
  85 + }
  86 + console.log(requestUrl);
  87 + return requestUrl;
  88 + }
  89 + },
75 90 methods: {
76 91 async downloadFile() {
77 92 if (this.downLoading) return;
... ...