浏览代码

Merge branch 'develop' into Jeff/develop

jeff 3 年之前
父节点
当前提交
011f95f364

+ 1 - 1
TEAMModelBI/Controllers/BIHome/OnLineController.cs

@@ -68,7 +68,7 @@ namespace TEAMModelBI.Controllers.BIHome
             tchCnt = await CommonFind.GetSqlValueCount(cosmosClient, "Teacher", currentSql, "Base");
             stuCnt = await CommonFind.GetSqlValueCount(cosmosClient, "Student", "select value(count(c.id)) from c where c.pk='Base'");
 
-            string addSql = $"select value(count(c.id)) from c where c.pk='Base' and c.createTime >={daySf} and c.createTime <= {dayEf}";
+            string addSql = $"select value(count(c.id)) from c where c.createTime >={daySt} and c.createTime <= {dayEt}";
             todayScCnt = await CommonFind.GetSqlValueCount(cosmosClient, "School", addSql, "Base");
             todayTchCnt = await CommonFind.GetSqlValueCount(cosmosClient, "Teacher", addSql, "Base");
             todayStuCnt = await CommonFind.GetSqlValueCount(cosmosClient, "Student", addSql, "Base");

+ 8 - 7
TEAMModelBI/Controllers/BISchool/BatchSchoolController.cs

@@ -201,7 +201,8 @@ namespace TEAMModelBI.Controllers.BISchool
                                 areaId = string.IsNullOrEmpty(bischool.areaId) ? "" : bischool.areaId,
                                 schoolCode = createSchoolInfo.id,
                                 period = PresetSchoolPeriod(bischool.period, foundSchools.lang, campusId),
-                                scale = bischool.size >= 300 ? 500 : 0
+                                scale = bischool.size >= 300 ? 500 : 0,
+                                createTime = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds()                                
                             };
 
                             stringBuilder.Append($"创建学校:{upSchool.name}【{upSchool.id}】");
@@ -230,11 +231,10 @@ namespace TEAMModelBI.Controllers.BISchool
                                     name = teacher.name,
                                     picture = teacher.picture,
                                     status = "join",
-                                    createTime = DateTimeOffset.UtcNow.ToUnixTimeSeconds(),
+                                    createTime = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds(),
                                     pk = "Teacher",
                                     ttl = -1
                                 };
-
                                 stringBuilder.Append($"教师信息:{schoolTeacher.name}【{schoolTeacher.id}】,教师权限:{string.Join(",", schoolTeacher.roles)}");
                                 await cosmosClient.GetContainer(Constant.TEAMModelOS, "Teacher").ReplaceItemAsync<Teacher>(teacher, teacher.id, new PartitionKey(teacher.code));
                                 await cosmosClient.GetContainer(Constant.TEAMModelOS, "School").CreateItemAsync<SchoolTeacher>(schoolTeacher, new PartitionKey(schoolTeacher.code));
@@ -252,6 +252,7 @@ namespace TEAMModelBI.Controllers.BISchool
                                     //创建账号并第一次登录IES5则默认赠送1G
                                     size = 1,
                                     defaultSchool = createSchoolInfo.id,
+                                    createTime = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds(),
                                     schools = new List<Teacher.TeacherSchool>() { new Teacher.TeacherSchool { schoolId = createSchoolInfo.id, name = bischool.name, status = "join", time = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds() } }
                                 };
 
@@ -266,7 +267,7 @@ namespace TEAMModelBI.Controllers.BISchool
                                     name = $"{tmdId}-管理员",
                                     picture = "",
                                     status = "join",
-                                    createTime = DateTimeOffset.UtcNow.ToUnixTimeSeconds(),
+                                    createTime = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds(),
                                     pk = "Teacher",
                                     ttl = -1
                                 };
@@ -672,7 +673,7 @@ namespace TEAMModelBI.Controllers.BISchool
                                             name = tempTeacher.name,
                                             job = $"{tempShool.name}-顾问",
                                             size = 0,
-                                            createTime = DateTimeOffset.UtcNow.ToUnixTimeSeconds()
+                                            createTime = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds()
                                         };
                                         //添加学校顾问
                                         await cosmosClient.GetContainer(Constant.TEAMModelOS, "School").CreateItemAsync<SchoolTeacher>(addSchoolTeacher, new PartitionKey($"Teacher-{tempShool.id}"));
@@ -685,7 +686,7 @@ namespace TEAMModelBI.Controllers.BISchool
                                         schoolId = tempShool.id,
                                         name = tempShool.name,
                                         status = "join",
-                                        time = DateTimeOffset.UtcNow.ToUnixTimeSeconds(),
+                                        time = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds(),
                                         picture = tempShool.picture,
                                         areaId = tempShool.areaId
                                     };
@@ -704,7 +705,7 @@ namespace TEAMModelBI.Controllers.BISchool
                                         name = tempTeacher.name,
                                         job = $"{tempShool.name}-顾问",
                                         size = 0,
-                                        createTime = DateTimeOffset.UtcNow.ToUnixTimeSeconds()
+                                        createTime = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds()
                                     };
                                     //添加学校学校顾问
                                     await cosmosClient.GetContainer(Constant.TEAMModelOS, "School").CreateItemAsync<SchoolTeacher>(addSchoolTeacher, new PartitionKey($"Teacher-{tempShool.id}"));

+ 1 - 1
TEAMModelOS.FunctionV4/CosmosDB/TriggerExam.cs

@@ -572,7 +572,7 @@ namespace TEAMModelOS.FunctionV4
                 List<string> losStu = new List<string>();
 
                 //当前完成考试得人数
-                int total = examResults[0].studentIds.Count;
+                int total = examResults[0].studentIds.Distinct().Count();
                 //先与第一个值取并集
                 losStu = losStu.Union(examResults[0].lostStus).ToList();
                 foreach (ExamResult examResult in examResults)

+ 4 - 0
TEAMModelOS/ClientApp/public/lang/en-US.js

@@ -1106,6 +1106,9 @@ const LANG_EN_US = {
         paperTagPlace: 'Manual input to create new tabs',
         useTip: 'Please keep at least one use of the test question',
         editor: {
+            canvasTip:'空白畫闆',
+            canvasStemTip:'帶題幹畫闆',
+            addTextDot:'添加著重號',
             imagePasteTip: 'You can open the TM Teaching Assistant to get a better picture/text paste experience.',
             uploadVideo: 'Upload Local Video',
             uploadAudio: 'Upload Local Audio',
@@ -4246,6 +4249,7 @@ const LANG_EN_US = {
                 correction: 'Correct Answer',
                 queNo: 'Question:',
                 myAns: 'My Answer:',
+                reAns:'New Answer:',
                 noExam: "No question yet",
                 wrongSub: "Incorrect",
                 rightSub: "Correct",

+ 4 - 0
TEAMModelOS/ClientApp/public/lang/zh-CN.js

@@ -1106,6 +1106,9 @@ const LANG_ZH_CN = {
         paperTagPlace: '选择标签或者手动输入后回车创建新标签',
         useTip: '请至少保留一种试题用途',
         editor: {
+            canvasTip:'空白画板',
+            canvasStemTip:'带题干画板',
+            addTextDot:'添加着重号',
             imagePasteTip: '检测到您粘贴的内容包含图片信息,为了更好的使用体验,建议您开启醍摩豆阅卷助手',
             uploadVideo: '上传本地视频',
             uploadAudio: '上传本地音频',
@@ -4246,6 +4249,7 @@ const LANG_ZH_CN = {
                 correction: '正解',
                 queNo: '题目:',
                 myAns: '我的作答:',
+                reAns:'重新作答:',
                 noExam: "暂没有试题",
                 wrongSub: "错题",
                 rightSub: "正确题目",

+ 4 - 0
TEAMModelOS/ClientApp/public/lang/zh-TW.js

@@ -1106,6 +1106,9 @@ const LANG_ZH_TW = {
         paperTagPlace: '選擇標籤或者手動輸入後新增新標簽',
         useTip: '請至少保留一種試題用途',
         editor: {
+            canvasTip:'空白畫闆',
+            canvasStemTip:'帶題幹畫闆',
+            addTextDot:'添加著重號',
             imagePasteTip: '檢測到您粘貼的內容包含圖片信息,為了更好的使用體驗,建議您開啟醍摩豆閱卷助手',
             uploadVideo: '上傳本機影片',
             uploadAudio: '上傳本機音訊',
@@ -4246,6 +4249,7 @@ const LANG_ZH_TW = {
                 correction: '正解',
                 queNo: '題目:',
                 myAns: '我的作答:',
+                reAns:'重新作答:',
                 noExam: "暫沒有試題",
                 wrongSub: "錯題",
                 rightSub: "正確題目",

+ 228 - 183
TEAMModelOS/ClientApp/src/components/student-web/EventView/EventContentTypeTemplate/composePaper.vue

@@ -1,192 +1,237 @@
 <template>
-    <div class="content">
-        <div id="textArea"> </div>
-        <Modal v-model="markStatus" fullscreen :title="$t('studentWeb.exam.answer')" footer-hide  ref="compose">
-                <!-- <BaseMyCanvas v-if="markStatus" :bgImg="markBg" @onCloseModal="closeModal" :isStudent="markStatus" @onSaveCanvas="saveMark"></BaseMyCanvas> -->
-                <BaseCanvas v-if="markStatus" :vm="vm" :bgImg="markBg" @onCloseModal="closeModal" :isStudent="markStatus" @onSaveCanvas="saveMark"></BaseCanvas>
-        </Modal>
-        <iframe class="frame" id="answerIframe" :srcdoc="itemInfo.question"></iframe>
+  <div class="content">
+    <div class="editor-wrap" v-show="!isConnector">
+      <div id="textArea"></div>
     </div>
+    <div class="connector-wrap" v-if="isConnector">
+      <div v-if="answerImg">
+        <img :src="answerImg" alt="">
+      </div>
+      <p v-if="answerImg" style="font-weight: bold;margin-bottom:20px">{{ $t("studentWeb.exam.testpop.reAns") }}</p>
+      <BaseCanvas :vm="vm" :bgImg="markBg" @onCloseModal="closeModal" :isStudent="markStatus" @onSaveCanvas="saveMark"></BaseCanvas>
+    </div>
+    <Modal v-model="markStatus" fullscreen :title="$t('studentWeb.exam.answer')" footer-hide ref="compose">
+      <BaseCanvas v-if="markStatus" :vm="vm" :bgImg="markBg" @onCloseModal="closeModal" :isStudent="markStatus" @onSaveCanvas="saveMark"></BaseCanvas>
+    </Modal>
+    <iframe class="frame" id="answerIframe" :srcdoc="itemInfo.question"></iframe>
+  </div>
 </template>
 <script>
-    import html2canvas from 'html2canvas';
-    import E from 'wangeditor';
-    import {editor_tw_config} from '@/utils/editorLangTw.js';
-    import {editor_en_config} from '@/utils/editorLangEn.js';
-    import i18next from 'i18next';
-    export default {
-        components: {
+import html2canvas from 'html2canvas';
+import E from 'wangeditor';
+import { editor_tw_config } from '@/utils/editorLangTw.js';
+import { editor_en_config } from '@/utils/editorLangEn.js';
+import i18next from 'i18next';
+export default {
+  components: {
 
-        },
-        props: {
-            index: {
-                type: Number,
-                default: -1
-            },
-            textData: {
-                type: Array,
-                default: () => {
-                    return []
-                }
-            },
-            itemInfo: {
-                type: Object,
-                default: () => {
-                    return {}
-                }
-            },     
-            close: {
-                type: Boolean,
-                default: false
-            }
-        },
-        data(vm) {
-            return {
-                vm:vm,
-                tabName: 'exercise',
-                editorContent: "",
-                examInfo: [],
-                editor: null,
-                markStatus: false,
-                markBg:""
-            }
-        },
-        methods: {
-            async getInfo() {
-                this.examInfo = []
-                this.initEditor()
-                if (this.textData.length > 0) {
-                    this.examInfo = [...this.textData]
-                    this.editor.txt.html(this.examInfo[0])
-                }
-            },
-            closeModal() {
-                this.markStatus = false
-                this.markBg = ""
-            },
-            saveMark(data) {
-                if (data) {
-                    data.height = 400
-                    data.width = 400
-                    let img = document.createElement('img')
-                    img.src = data.base64
-                    console.log(img)
-                    this.editor.txt.html(img.outerHTML)
-                    this.markStatus = false
-                }
-            },
-            initEditor() {
-                this.editorContent = ""
-                this.editor = new E("#textArea");
-                this.editor.config.onchange = (html) => {
-                    this.editorContent = html;
-                };
-                this.editor.config.showFullScreen = false
-                this.editor.config.menus = [
-                    "link", // 插入链接
-                    "justify", // 对齐方式
-                    "image", // 插入图片
-                ]
-                this.editor.config.zIndex = 1
-                this.editor.config.placeholder = this.$t('studentWeb.exam.inputAnswers')
-                this.editor.config.height = 300
-                this.editor.config.showLinkImg = false;
-                this.editor.config.uploadImgShowBase64 = true; // 使用 base64 保存图片不建议使用这种,我只是图个方便
-                if (this.itemInfo.type == 'correct' || this.itemInfo.type == 'connector') {
-                    this.editor.config.menus.push('connector')
-                    this.$editorTools.addStuBgBtn(this, this.editor)
-                } else {
-                    this.$editorTools.addCanvas(this, this.editor)
-                }
-                let curLang = localStorage.getItem('local') || 'zh-cn'
-                if (curLang === 'zh-tw') {
-                    // 自定义语言
-                    this.editor.config.languages['tw'] = editor_tw_config
-                    // 选择语言
-                    this.editor.config.lang = 'tw'
-                    // 引入 i18next 插件
-                    this.editor.i18next = i18next
-                }
-                if (curLang === 'en-us') {
-                    // 自定义语言
-                    this.editor.config.languages['en'] = editor_en_config
-                    // 选择语言
-                    this.editor.config.lang = 'en'
-                    // 引入 i18next 插件
-                    this.editor.i18next = i18next
-                }
-                this.editor.create();
-                if (this.close) {
-                    this.editor.disable()
-                }
-                this.editor.txt.clear()
-                if (this.examInfo.length > 0) {
-                    this.editor.txt.html(this.examInfo[0])
-                } 
-            },
-            markStuAnswer() {
-                let answerIframe = ''
-                answerIframe = document.getElementById('answerIframe')
-                answerIframe.contentWindow.document.body.style.width = 'fit-content'
-                answerIframe.contentWindow.document.body.style.minWidth = '600px'
-                answerIframe.contentWindow.document.body.style.backgroundColor = '#f5f5f5'
-                console.log(document.getElementById('answerIframe').contentWindow.document)
-                let iframe = document.getElementById('answerIframe').contentWindow.document.getElementsByTagName('p')
-                if (iframe.length > 0) {
-                    for (let i = 0; i < iframe.length -1; i++) {
-                        iframe[i].style.lineHeight = '50px'
-                        iframe[i].style.paddingBottom = '30px'
-                    }
-                    iframe[iframe.length -1].style.paddingBottom = '100px'
-                    iframe[iframe.length - 1].style.lineHeight = '50px'
-                }
-                html2canvas(answerIframe.contentWindow.document.body).then(canvas => {
-                    this.markStatus = true
-                    this.markBg = canvas.toDataURL("image/png");
-                })
-            },
-        },
-        mounted() {
-            this.initEditor()
-            this.getInfo()
-            // 监听富文本画板功能
-            this.$EventBus.$off('onStuCanvas')
-            this.$EventBus.$on('onStuCanvas', editor => {
-                this.markBg = ""
-                this.markStuAnswer()
-            })
-        },
-        watch: {
-            index() {
-                this.getInfo()
-                deep: true
-                immediate:true
-            },
-            editorContent() {
-                this.$emit("dataGet", this.editorContent, this.index)
-            }
-        }
-	}
-</script>
-<style scoped>
-	.content{
-		width:100%;
-		height:100%;
-	}
-    .textArea {
-        width: 100%;
-        height: 100%;
+  },
+  props: {
+    index: {
+      type: Number,
+      default: -1
+    },
+    textData: {
+      type: Array,
+      default: () => {
+        return []
+      }
+    },
+    itemInfo: {
+      type: Object,
+      default: () => {
+        return {}
+      }
+    },
+    close: {
+      type: Boolean,
+      default: false
     }
-    .frame {
-        /*height: 100px;*/
-        border: none;
-        position:fixed;
-        height:0.1px;
-        width: 50%;
-        /*margin-left:10px;*/
-        /*line-height: 50px;*/
+  },
+  data(vm) {
+    return {
+      answerImg: null,
+      vm: vm,
+      tabName: 'exercise',
+      editorContent: "",
+      examInfo: [],
+      editor: null,
+      markStatus: false,
+      markBg: ""
     }
-    .canvas-tools {
-        bottom: -50px;
+  },
+  methods: {
+    async getInfo() {
+      this.examInfo = []
+      this.initEditor()
+      console.error(this.textData)
+      this.answerImg = null
+      if (this.textData.length > 0) {
+        this.examInfo = [...this.textData]
+        if (this.isConnector) {
+          this.answerImg = this.textData[0]
+        } else {
+          this.answerImg = null
+          this.editor.txt.html(this.examInfo[0])
+        }
+      }
+      setTimeout(() => {
+        if (this.isConnector) {
+          this.markBg = ""
+          this.markStuAnswer()
+        }
+      }, 100)
+    },
+    closeModal() {
+      this.markStatus = false
+      this.markBg = ""
+    },
+    saveMark(data) {
+      if (data) {
+        data.height = 400
+        data.width = 400
+        let img = document.createElement('img')
+        img.src = data.base64
+        if (this.isConnector) {
+          this.answerImg = data.base64
+          this.markBg = ''
+          setTimeout(() => {
+            this.markStuAnswer()
+          }, 100)
+          this.$emit("dataGet", data.base64, this.index)
+          this.$Message.success(this.$t('settings.submitSucTips'))
+        } else {
+          this.editor.txt.html(img.outerHTML)
+        }
+        this.markStatus = false
+      }
+    },
+    initEditor() {
+      this.editorContent = ""
+      this.editor = new E("#textArea");
+      this.editor.config.onchange = (html) => {
+        this.editorContent = html;
+      };
+      this.editor.config.showFullScreen = false
+      this.editor.config.menus = [
+        "link", // 插入链接
+        "justify", // 对齐方式
+        "image", // 插入图片
+      ]
+      this.editor.config.zIndex = 1
+      this.editor.config.placeholder = this.$t('studentWeb.exam.inputAnswers')
+      this.editor.config.height = 300
+      this.editor.config.showLinkImg = false;
+      this.editor.config.uploadImgShowBase64 = true; // 使用 base64 保存图片不建议使用这种,我只是图个方便
+      this.$editorTools.addCanvas(this, this.editor)
+      this.editor.config.menus.push('connector')
+      this.$editorTools.addStuBgBtn(this, this.editor)
+      // if (this.itemInfo.type == 'correct' || this.itemInfo.type == 'connector') {
+      //     this.editor.config.menus.push('connector')
+      //     this.$editorTools.addStuBgBtn(this, this.editor)
+      // } else {
+      //     this.$editorTools.addCanvas(this, this.editor)
+      // }
+      let curLang = localStorage.getItem('local') || 'zh-cn'
+      if (curLang === 'zh-tw') {
+        // 自定义语言
+        this.editor.config.languages['tw'] = editor_tw_config
+        // 选择语言
+        this.editor.config.lang = 'tw'
+        // 引入 i18next 插件
+        this.editor.i18next = i18next
+      }
+      if (curLang === 'en-us') {
+        // 自定义语言
+        this.editor.config.languages['en'] = editor_en_config
+        // 选择语言
+        this.editor.config.lang = 'en'
+        // 引入 i18next 插件
+        this.editor.i18next = i18next
+      }
+      this.editor.create();
+      if (this.close) {
+        this.editor.disable()
+      }
+      this.editor.txt.clear()
+      if (this.examInfo.length > 0) {
+        this.editor.txt.html(this.examInfo[0])
+      }
+    },
+    markStuAnswer() {
+      let answerIframe = ''
+      answerIframe = document.getElementById('answerIframe')
+      answerIframe.contentWindow.document.body.style.width = 'fit-content'
+      answerIframe.contentWindow.document.body.style.minWidth = '600px'
+      answerIframe.contentWindow.document.body.style.backgroundColor = '#f5f5f5'
+      console.log(document.getElementById('answerIframe').contentWindow.document)
+      let iframe = document.getElementById('answerIframe').contentWindow.document.getElementsByTagName('p')
+
+      if (iframe.length > 0) {
+        for (let i = 0; i < iframe.length - 1; i++) {
+          iframe[i].style.lineHeight = '50px'
+          iframe[i].style.paddingBottom = '30px'
+        }
+        iframe[iframe.length - 1].style.paddingBottom = '100px'
+        iframe[iframe.length - 1].style.lineHeight = '50px'
+      }
+      html2canvas(answerIframe.contentWindow.document.body).then(canvas => {
+        if(!this.isConnector){
+            this.markStatus = true
+        }
+        this.markBg = canvas.toDataURL("image/png");
+      })
+    },
+  },
+  mounted() {
+    this.initEditor()
+    this.getInfo()
+    // 监听富文本画板功能
+    this.$EventBus.$off('onStuCanvas')
+    this.$EventBus.$on('onStuCanvas', editor => {
+      this.markBg = ""
+      this.markStuAnswer()
+    })
+  },
+  computed: {
+    isConnector() {
+      return this.itemInfo.type == 'connector' || this.itemInfo.type == 'correct'
     }
+  },
+  watch: {
+    index() {
+      this.getInfo()
+      deep: true
+      immediate: true
+    },
+    editorContent() {
+      this.$emit("dataGet", this.editorContent, this.index)
+    }
+  }
+}
+</script>
+<style scoped>
+.content {
+  width: 100%;
+  height: 100%;
+}
+.connector-wrap /deep/ .demo {
+  justify-content: flex-start !important;
+}
+.textArea {
+  width: 100%;
+  height: 100%;
+}
+.frame {
+  /*height: 100px;*/
+  border: none;
+  position: fixed;
+  height: 0.1px;
+  width: 50%;
+  /*margin-left:10px;*/
+  /*line-height: 50px;*/
+}
+.canvas-tools {
+  bottom: -50px;
+}
 </style>

+ 6 - 6
TEAMModelOS/ClientApp/src/utils/editorTools.js

@@ -527,7 +527,7 @@ export default {
 				// 菜单栏中,标题菜单的 DOM 元素
 				// 注意,这里的 $ 不是 jQuery ,是 E.$ (wangEditor 自带的 DOM 操作工具,类似于 jQuery)
 				const $elem = $(
-					'<div class="w-e-menu" style="color:red"><i class="ivu-icon ivu-icon-md-color-palette" style="font-size: 20px;"></i></div>'
+					`<div class="w-e-menu" title="${app.$t('evaluation.editor.canvasTip')}" style="color:red"><i class="ivu-icon ivu-icon-md-color-palette" style="font-size: 20px;"></i></div>`
 				);
 				super($elem, editor);
 			}
@@ -691,7 +691,7 @@ export default {
 		class TextDot extends BtnMenu{
 			constructor(editor) {
 				const $elem = $(
-					'<div class="w-e-menu" style="color:red" title="添加着重号"><i class="icon iconfont icon-heavy" style="font-size: 20px;display: inline-block;margin-top: 3px;"></i></div>'
+					`<div class="w-e-menu" style="color:red" :title="${app.$t('evaluation.editor.addTextDot')}"><i class="icon iconfont icon-heavy" style="font-size: 20px;display: inline-block;margin-top: 3px;"></i></div>`
 				)
 				super($elem, editor)
 			}
@@ -788,7 +788,7 @@ export default {
 		// 也可以通过配置 menus 调整菜单的顺序,参考【配置菜单】部分的文档
 		editor.config.menus = editor.config.menus.concat(videoUpload);
 	},
-	/* 添加学生端画板自定义功能 */
+	/* 添加学生端画板自定义功能(含题干图片元素) */
 	addStuBgBtn(vm, editor) {
 		// 获取必要的变量,这些在下文中都会用到
 		const {
@@ -797,11 +797,11 @@ export default {
 			Panel
 		} = E;
 
-		class Kityformula extends PanelMenu {
+		class StuBgCanvas extends PanelMenu {
 			// 公式输入插件
 			constructor(editors) {
 				const $elem = $(
-					'<div class="w-e-menu" style="color:red"><i class="ivu-icon ivu-icon-logo-tumblr" style="font-size: 20px;"></i></div>'
+					`<div class="w-e-menu" title="${ app.$t('evaluation.editor.canvasStemTip') }" style="color:red"><i class="icon iconfont icon-brush" style="font-size: 20px;"></i></div>`
 				);
 				super($elem, editors);
 			}
@@ -815,7 +815,7 @@ export default {
 
 		// 注册菜单
 		const videoUpload = "connector"; // 菜单 key ,各个菜单不能重复
-		editor.menus.extend("connector", Kityformula);
+		editor.menus.extend("connector", StuBgCanvas);
 
 		// 将菜单加入到 editor.config.menus 中
 		// 也可以通过配置 menus 调整菜单的顺序,参考【配置菜单】部分的文档

文件差异内容过多而无法显示
+ 592 - 603
TEAMModelOS/ClientApp/src/view/ability/Review.vue


+ 15 - 2
TEAMModelOS/ClientApp/src/view/jyzx/application.vue

@@ -96,7 +96,7 @@
         </template>
       </Table>
     </div>
-    <Review v-if="isReview" :mode="curReviewMode" :reviewData="reviewData" @goBack="goBack"></Review>
+    <Review ref="reviewRef" v-if="isReview" :mode="curReviewMode" :reviewData="reviewData" @goBack="goBack"></Review>
     <TestPaper v-if="isShowPaper" :abilityData="curData" @goBack="goBack"></TestPaper>
   </div>
 </template>
@@ -473,7 +473,20 @@ export default {
         return (row.uploads.length && row.schoolAppraise === -1) || row.schoolAppraise === 0
       }
     }
-  }
+  },
+  beforeRouteLeave(to, from, next) {
+      let reviewRef = this.$refs.reviewRef
+			// 如果在提交材料页面并且有提交变更 则离开的时候 需要询问用户
+      if(this.isReview && reviewRef.hasModify){
+        this.$Modal.confirm({
+					title: '温馨提示',
+					content: '您存在未提交保存的修改内容,是否确认离开?',
+					onOk: () => {
+						next();
+					}
+				});
+      }
+	}
 }
 </script>
 

+ 15 - 11
TEAMModelOS/Controllers/Analysis/AnalysisController.cs

@@ -229,6 +229,7 @@ namespace TEAMModelOS.Controllers.Analysis
                 List<KeyValuePair<string, Dictionary<string, List<double>>>> gscores = new List<KeyValuePair<string, Dictionary<string, List<double>>>>();
                 //声明全科总分
                 double totalAll = 0;
+                List<string> stuIds = new();
                 foreach (ExamResult examResult in examResults)
                 {
                     (KeyValuePair<string, List<List<string>>> subjectData, KeyValuePair<string, List<KeyValuePair<string, List<double>>>> classSubjectData, Dictionary<string, List<double>> gscore) = DoExerciseScatteres(examResult, paperKey);
@@ -266,6 +267,10 @@ namespace TEAMModelOS.Controllers.Analysis
                     //处理个人
                     foreach (var stuid in examResult.studentIds)
                     {
+                        if (!stuIds.Contains(stuid))
+                        {
+                            stuIds.Add(stuid);
+                        }
                         StudentAys student = null;
                         int index = examResult.studentIds.IndexOf(stuid);
                         if (students.Select(x => x.id).Contains(stuid))
@@ -340,19 +345,18 @@ namespace TEAMModelOS.Controllers.Analysis
                     }*/
                     //处理班级
                     var classRes = classReses.Where(x => x.id == rGroup.id).FirstOrDefault();
-                    var stuCount = classRes.range[1] - classRes.range[0] + 1;
-                    var classStudents = students.GetRange(classRes.range[0], classRes.range[1] - classRes.range[0] + 1);
+                    var stuCount = classRes.range[1] - classRes.range[0] + 1;                 
+                    List<StudentAys> classStudents = new();
+                    foreach (string sid in stuIds) {
+                        foreach (var stu in students) {
+                            if (stu.id == sid) {
+                                classStudents.Add(stu);
+                            }
+                        }
+                    } ;
+                    //var classStudents = students.GetRange(classRes.range[0], classRes.range[1] - classRes.range[0] + 1);
                     List<double> stuTotals = classStudents.Select(x => x.total).ToList();
                     stuTotals.Sort((s1, s2) => { return s2.CompareTo(s1); });
-
-                    /*                    foreach (KeyValuePair<string, double> key1 in keys)
-                                        {
-                                            if (classroom.gradeId.Equals(key1.Key))
-                                            {
-                                                ipoint = key1.Value;
-                                            }
-                                        }*/
-                    //double ipoint = stuTotals[personCount];
                     //初始化进线人数
                     int lineCount = 0;
                     //初始化班级总分