ソースを参照

Merge branch 'develop' of http://52.130.252.100:10000/TEAMMODEL/TEAMModelOS into develop

Li 2 年 前
コミット
93960bc17c

+ 2 - 2
TEAMModelOS/ClientApp/src/utils/evTools.js

@@ -286,7 +286,7 @@ export default {
 	},
 	/* 给富文本添加 cntr是防止读取的是其他用户的BLOB */
 	doAddHost(exerciseItem, paperItem, cntr, nodeId) {
-		// console.log(exerciseItem, paperItem, cntr, nodeId)
+		console.log(exerciseItem, paperItem, cntr, nodeId)
 		if (exerciseItem.source && exerciseItem.source === 3) {
 			return exerciseItem
 		}
@@ -620,7 +620,7 @@ export default {
 							itemJson.exercise.score = item.scoring ? item.scoring.score : 0
 							// jsonData.item.push(itemJson.exercise)
 							try {
-								itemJson.exercise = await this.doAddHost(itemJson.exercise, paper)
+								itemJson.exercise = await this.doAddHost(itemJson.exercise, paper, paper.code)
 								resolve(itemJson.exercise)
 							} catch (e) {
 								reject(e)

+ 287 - 287
TEAMModelOS/ClientApp/src/view/artexam/ExamSetting.vue

@@ -1,29 +1,29 @@
 <template>
-    <div class="subject-content">
-        <!-- 评测试卷 -->
-        <div class="attr-item">
-            <span>{{$t('ae.ae16')}}</span>
-            <Tag v-if="subjectSetting.paper" color="blue">
-                {{ subjectSetting.paper.name }}
-            </Tag>
-            <span class="choose-paper" @click="selectPaper()">
-                {{ subjectSetting.paper ? $t('ae.ae17') : $t('ae.ae18') }}
-            </span>
-        </div>
-        <!-- 作答方式 -->
-        <div class="attr-item">
-            <span>{{$t('ae.ae19')}}</span>
-            <RadioGroup v-model="subjectSetting.unorder">
-                <Radio :label="0">
-                    <span>{{$t('ae.ae20')}}</span>
-                </Radio>
-                <Radio :label="1">
-                    <span>{{$t('ae.ae21')}}</span>
-                </Radio>
-            </RadioGroup>
-        </div>
-        <!-- 评测时间 -->
-        <!-- <div class="attr-item">
+  <div class="subject-content">
+    <!-- 评测试卷 -->
+    <div class="attr-item">
+      <span>{{$t('ae.ae16')}}</span>
+      <Tag v-if="subjectSetting.paper" color="blue">
+        {{ subjectSetting.paper.name }}
+      </Tag>
+      <span class="choose-paper" @click="selectPaper()">
+        {{ subjectSetting.paper ? $t('ae.ae17') : $t('ae.ae18') }}
+      </span>
+    </div>
+    <!-- 作答方式 -->
+    <div class="attr-item">
+      <span>{{$t('ae.ae19')}}</span>
+      <RadioGroup v-model="subjectSetting.unorder">
+        <Radio :label="0">
+          <span>{{$t('ae.ae20')}}</span>
+        </Radio>
+        <Radio :label="1">
+          <span>{{$t('ae.ae21')}}</span>
+        </Radio>
+      </RadioGroup>
+    </div>
+    <!-- 评测时间 -->
+    <!-- <div class="attr-item">
 			<span>评测时间:</span>
 			<DatePicker
                 transfer
@@ -34,311 +34,311 @@
                 style="width:400px"
 			></DatePicker>
 		</div> -->
-        <!-- 挑选试卷 -->
-        <Modal v-model="sltPaperStatus" :title="$t('ae.ae22')" :width="1000" footer-hide>
-            <template v-if="!isPreview">
-                <p v-if="$store.state.userInfo.schoolCode != 'hbcn' || isArea">
-                    <span style="vertical-align: bottom;">
-                        {{$t('ae.ae23')}}
-                    </span>
-                    <RadioGroup v-model="paperResource">
-                        <Radio label="hbcn">
-                            {{$t('ae.ae24')}}
-                        </Radio>
-                        <Radio :label="$store.state.userInfo.schoolCode" v-show="!isArea">
-                            {{$t('ae.ae25')}}
-                        </Radio>
-                    </RadioGroup>
-                </p>
-                <div class="papaer-list-wrap">
-                    <vuescroll>
-                        <div class="paper-item" v-for="(item,index) in paperListShow" :key="index">
-                            <div class="paper-item-name">
-                                <span>{{(index + 1) + '.  ' + item.name}}</span>
-                            </div>
-                            <div class="paper-item-info">
-                                <span class="info-item">
-                                    {{$t('learnActivity.manual.fitSubject')}}
-                                    <span class="info-bold">{{item.subjectName}}</span>
-                                </span>
-                                <span class="info-item">
-                                    {{$t('learnActivity.manual.quCount')}}
-                                    <span class="info-bold">{{ item.count }}</span>
-                                </span>
-                                <span class="info-item">
-                                    <Icon type="md-time" style="margin-right:8px" size="14" />
-                                    <span class="info-bold">{{$jsFn.dateFormat(item.createTime)}}</span>
-                                </span>
-                                <span class="info-item">{{$t('evaluation.paperList.sortType')}}:
-                                    <span class="info-bold">
-                                        {{ item.itemSort === 1 ? $t('evaluation.paperList.sortByOrder') : $t('evaluation.paperList.sortByType') }}
-                                    </span>
-                                </span>
-                            </div>
-                            <span v-if="item.id == selectedId" style="margin-left:20px;display:block;" class="paper-item-tools">
-                                <Icon custom="iconfont icon-choose" style="margin-right:5px;" :title="$t('learnActivity.manual.stdPaper')" />
-                            </span>
-                            <div v-else class="paper-item-tools">
-                                <span @click.stop="choosePaper(index)">
-                                    <Icon custom="iconfont icon-choose" style="margin-right:5px;" />
-                                    {{$t('learnActivity.manual.stPaper')}}
-                                </span>
-                                <span @click.stop="previewTestPaper(index)" style="margin-left:20px;">
-                                    <Icon type="md-eye" style="margin-right:5px;" />
-                                    {{$t('learnActivity.manual.previewPaper')}}
-                                </span>
-                            </div>
-                        </div>
-                        <EmptyData v-show="!paperListShow.length"></EmptyData>
-                    </vuescroll>
-                </div>
-            </template>
-            <template v-else>
-                <p class="back-to-list" @click="isPreview = false">
-                    <Icon type="md-arrow-back" />{{$t('ae.ae26')}}
-                </p>
-                <TestPaper :paper="previewPaper" isExamPaper hideSheet></TestPaper>
-            </template>
-        </Modal>
-    </div>
+    <!-- 挑选试卷 -->
+    <Modal v-model="sltPaperStatus" :title="$t('ae.ae22')" :width="1000" footer-hide>
+      <template v-if="!isPreview">
+        <p v-if="$store.state.userInfo.schoolCode != 'hbcn' || isArea">
+          <span style="vertical-align: bottom;">
+            {{$t('ae.ae23')}}
+          </span>
+          <RadioGroup v-model="paperResource" @on-change="findPaperList">
+            <Radio label="hbcn">
+              {{$t('ae.ae24')}}
+            </Radio>
+            <Radio :label="$store.state.userInfo.schoolCode" v-show="!isArea">
+              {{$t('ae.ae25')}}
+            </Radio>
+          </RadioGroup>
+        </p>
+        <div class="papaer-list-wrap">
+          <vuescroll>
+            <div class="paper-item" v-for="(item,index) in paperListShow" :key="index">
+              <div class="paper-item-name">
+                <span>{{(index + 1) + '.  ' + item.name}}</span>
+              </div>
+              <div class="paper-item-info">
+                <span class="info-item">
+                  {{$t('learnActivity.manual.fitSubject')}}
+                  <span class="info-bold">{{item.subjectName}}</span>
+                </span>
+                <span class="info-item">
+                  {{$t('learnActivity.manual.quCount')}}
+                  <span class="info-bold">{{ item.count }}</span>
+                </span>
+                <span class="info-item">
+                  <Icon type="md-time" style="margin-right:8px" size="14" />
+                  <span class="info-bold">{{$jsFn.dateFormat(item.createTime)}}</span>
+                </span>
+                <span class="info-item">{{$t('evaluation.paperList.sortType')}}:
+                  <span class="info-bold">
+                    {{ item.itemSort === 1 ? $t('evaluation.paperList.sortByOrder') : $t('evaluation.paperList.sortByType') }}
+                  </span>
+                </span>
+              </div>
+              <span v-if="item.id == selectedId" style="margin-left:20px;display:block;" class="paper-item-tools">
+                <Icon custom="iconfont icon-choose" style="margin-right:5px;" :title="$t('learnActivity.manual.stdPaper')" />
+              </span>
+              <div v-else class="paper-item-tools">
+                <span @click.stop="choosePaper(index)">
+                  <Icon custom="iconfont icon-choose" style="margin-right:5px;" />
+                  {{$t('learnActivity.manual.stPaper')}}
+                </span>
+                <span @click.stop="previewTestPaper(index)" style="margin-left:20px;">
+                  <Icon type="md-eye" style="margin-right:5px;" />
+                  {{$t('learnActivity.manual.previewPaper')}}
+                </span>
+              </div>
+            </div>
+            <EmptyData v-show="!paperListShow.length"></EmptyData>
+          </vuescroll>
+        </div>
+      </template>
+      <template v-else>
+        <p class="back-to-list" @click="isPreview = false">
+          <Icon type="md-arrow-back" />{{$t('ae.ae26')}}
+        </p>
+        <TestPaper :paper="previewPaper" isExamPaper hideSheet></TestPaper>
+      </template>
+    </Modal>
+  </div>
 </template>
 
 <script>
 import TestPaper from '@/view/evaluation/index/TestPaper.vue'
 export default {
-    components: {
-        TestPaper
+  components: {
+    TestPaper
+  },
+  props: {
+    subject: {
+      type: String,
+      default: '',
+      required: true
+    }
+  },
+  data() {
+    return {
+      isArea: false,
+      subjectSetting: {
+        paper: undefined,
+        unorder: 0,
+        startTime: 0,
+        endTime: 0
+      },
+      isPreview: false,
+      sltPaperStatus: false,
+      paperResource: 'hbcn',
+      previewPaper: undefined,
+      selectedId: '',
+      paperListShow: [],
+      paperList: {
+        tmd: [],
+        school: []
+      },
+    }
+  },
+  methods: {
+    handleSetTime(value) {
+      let start = value[0]
+      let end = value[1]
+      this.subjectSetting.startTime = start ? new Date(start).getTime() : 0
+      this.subjectSetting.endTime = end ? new Date(end).getTime() : 0
+      console.log(value, this.subjectSetting)
     },
-    props: {
-        subject: {
-            type: String,
-            default: '',
-            required: true
-        }
+    async previewTestPaper(index) {
+      this.previewPaper = {}
+      try {
+        this.paperListShow[index].scope = 'school'
+        this.paperListShow[index].code = this.paperListShow[index].schoolId
+        this.previewPaper = await this.$evTools.getStuPaper(this.paperListShow[index])
+        setTimeout(() => {
+          this.isPreview = true
+        }, 400)
+      } catch (e) {
+      }
     },
-    data() {
-        return {
-            isArea: false,
-            subjectSetting: {
-                paper: undefined,
-                unorder: 0,
-                startTime: 0,
-                endTime: 0
-            },
-            isPreview: false,
-            sltPaperStatus: false,
-            paperResource: 'hbcn',
-            previewPaper: undefined,
-            selectedId: '',
-            paperListShow: [],
-            paperList: {
-                tmd: [],
-                school: []
-            },
+    async choosePaper(index) {
+      try {
+        let sasInfo
+        if (this.isArea) {
+          sasInfo = await this.$tools.getBlobSas("hbcn")
+          sasInfo.sas = "?" + sasInfo.sas
+        } else if (this.paperResource == this.$store.state.userInfo.schoolCode) {
+          sasInfo = {
+            sas:
+              "?" +
+              this.$store.state.user.schoolProfile.blob_sas,
+            url: this.$store.state.user.schoolProfile.blob_uri.slice(
+              0,
+              this.$store.state.user.schoolProfile.blob_uri.lastIndexOf(
+                '/'
+              )
+            ),
+            name: this.$store.state.userInfo.schoolCode
+          }
+        } else {
+          sasInfo = await this.$tools.getBlobSas("hbcn")
+          sasInfo.sas = "?" + sasInfo.sas
+        }
+        let indexData = await this.$tools.getFile(`${sasInfo.url}/${sasInfo.name}${this.paperListShow[index].blob}/index.json${sasInfo.sas}`)
+        if (indexData) {
+          let paperIndex = JSON.parse(indexData)
+          let quTyep = ['single', 'multiple', 'judge']
+          if (paperIndex.slides.some(s => !quTyep.includes(s.type))) {
+            this.$Modal.info({
+              title: this.$t('ae.ae42'),
+              content: this.$t('ae.ae43')
+            })
+          } else {
+            this.subjectSetting.paper = this.paperListShow[index]
+            this.sltPaperStatus = false
+          }
         }
+      } catch (e) {
+        console.log(e)
+        this.$Message.error(this.$t('ae.ae44'))
+      }
     },
-    methods: {
-        handleSetTime(value) {
-            let start = value[0]
-            let end = value[1]
-            this.subjectSetting.startTime = start ? new Date(start).getTime() : 0
-            this.subjectSetting.endTime = end ? new Date(end).getTime() : 0
-            console.log(value, this.subjectSetting)
-        },
-        async previewTestPaper(index) {
-            this.previewPaper = {}
-            try {
-                this.paperListShow[index].scope = 'school'
-                this.paperListShow[index].code = this.paperListShow[index].schoolId
-                this.previewPaper = await this.$evTools.getStuPaper(this.paperListShow[index])
-                setTimeout(() => {
-                    this.isPreview = true
-                }, 400)
-            } catch (e) {
-            }
-        },
-        async choosePaper(index) {
-            try {
-                let sasInfo
-                if (this.isArea) {
-                    sasInfo = await this.$tools.getBlobSas("hbcn")
-                    sasInfo.sas = "?"+sasInfo.sas
-                } else if (this.paperResource == this.$store.state.userInfo.schoolCode) {
-                    sasInfo = {
-                        sas:
-                            "?" +
-                            this.$store.state.user.schoolProfile.blob_sas,
-                        url: this.$store.state.user.schoolProfile.blob_uri.slice(
-                            0,
-                            this.$store.state.user.schoolProfile.blob_uri.lastIndexOf(
-                                '/'
-                            )
-                        ),
-                        name: this.$store.state.userInfo.schoolCode
-                    }
-                } else {
-                    sasInfo = await this.$tools.getBlobSas("hbcn")
-                    sasInfo.sas = "?"+sasInfo.sas
-                }
-                let indexData = await this.$tools.getFile(`${sasInfo.url}/${sasInfo.name}${this.paperListShow[index].blob}/index.json${sasInfo.sas}`)
-                if (indexData) {
-                    let paperIndex = JSON.parse(indexData)
-                    let quTyep = ['single', 'multiple', 'judge']
-                    if (paperIndex.slides.some(s => !quTyep.includes(s.type))) {
-                        this.$Modal.info({
-                            title: this.$t('ae.ae42'),
-                            content: this.$t('ae.ae43')
-                        })
-                    } else {
-                        this.subjectSetting.paper = this.paperListShow[index]
-                        this.sltPaperStatus = false
-                    }
-                }
-            } catch (e) {
-                console.log(e)
-                this.$Message.error(this.$t('ae.ae44'))
-            }
-        },
-        selectPaper() {
-            this.sltPaperStatus = true
-            this.findPaperList()
-        },
-        findPaperList() {
-            if (!this.paperResource) {
-                this.$Message.error(this.$t('ae.ae27'))
-            }
-            if (this.paperResource == 'hbcn' && this.paperList.tmd.length) {
-                return this.paperListShow = this.paperList.tmd.filter(item => item.subjectBindId === this.subject)
-            }
-            if (this.paperList.school.length) {
-                return this.paperListShow = this.paperList.school.filter(item => item.subjectBindId === this.subject)
-            }
-            let params = {
-                schoolCode: this.paperResource
-            }
-            this.$api.areaArt.findArtPaperList(params).then(
-                res => {
-                    if (this.paperResource === 'hbcn') {
-                        this.paperList.tmd = res.papers
-                    } else {
-                        this.paperList.school = res.papers
-                    }
-                    this.paperListShow = res.papers.filter(item => item.subjectBindId === this.subject)
-                }
-            )
-        },
+    selectPaper() {
+      this.sltPaperStatus = true
+      this.findPaperList()
     },
-    watch: {
-        subjectSetting: {
-            deep: true,
-            handler(n, o) {
-                this.$emit('on-exam-change', {
-                    data: this.subjectSetting,
-                    subject: this.subject
-                })
-            }
+    findPaperList() {
+      if (!this.paperResource) {
+        this.$Message.error(this.$t('ae.ae27'))
+      }
+      if (this.paperResource == 'hbcn' && this.paperList.tmd.length) {
+        return this.paperListShow = this.paperList.tmd.filter(item => item.subjectBindId === this.subject)
+      }
+      if (this.paperList.school.length) {
+        return this.paperListShow = this.paperList.school.filter(item => item.subjectBindId === this.subject)
+      }
+      let params = {
+        schoolCode: this.paperResource
+      }
+      this.$api.areaArt.findArtPaperList(params).then(
+        res => {
+          if (this.paperResource === 'hbcn') {
+            this.paperList.tmd = res.papers
+          } else {
+            this.paperList.school = res.papers
+          }
+          this.paperListShow = res.papers.filter(item => item.subjectBindId === this.subject)
         }
+      )
     },
-    created() {
-        // 判断是否为区级发布
-        this.isArea = this.$route.name === 'areaCreateArtMgt'
+  },
+  watch: {
+    subjectSetting: {
+      deep: true,
+      handler(n, o) {
+        this.$emit('on-exam-change', {
+          data: this.subjectSetting,
+          subject: this.subject
+        })
+      }
     }
+  },
+  created() {
+    // 判断是否为区级发布
+    this.isArea = this.$route.name === 'areaCreateArtMgt'
+  }
 
 }
 </script>
 
 <style lang="less" scoped>
 .attr-item {
-    margin-bottom: 10px;
+  margin-bottom: 10px;
 }
 .subject-content {
-    display: inline-block;
-    width: calc(100% - 80px);
-    vertical-align: top;
+  display: inline-block;
+  width: calc(100% - 80px);
+  vertical-align: top;
 }
 .back-to-list {
-    color: #2d8cf0;
-    cursor: pointer;
-    user-select: none;
+  color: #2d8cf0;
+  cursor: pointer;
+  user-select: none;
 }
 .paper-item {
-    padding: 10px 15px;
-    position: relative;
-    // margin-left: 15px;
-    margin-right: 15px;
-    margin-bottom: 5px;
-    // background: #505050;
-    align-items: start;
-    border-radius: 2px;
-    position: relative;
+  padding: 10px 15px;
+  position: relative;
+  // margin-left: 15px;
+  margin-right: 15px;
+  margin-bottom: 5px;
+  // background: #505050;
+  align-items: start;
+  border-radius: 2px;
+  position: relative;
 
-    &:hover {
-        background: #e1eff6;
-        // box-shadow: 0px 4px 5px #191919;
-    }
+  &:hover {
+    background: #e1eff6;
+    // box-shadow: 0px 4px 5px #191919;
+  }
 
-    &-name {
-        font-size: 20px;
-        font-weight: bold;
-    }
+  &-name {
+    font-size: 20px;
+    font-weight: bold;
+  }
 
-    &-tag {
-        font-size: 12px;
-        padding: 1px 10px;
-        border-radius: 5px;
-        color: #fff;
-        background: #15a06c;
-        margin: 0 10px;
-    }
+  &-tag {
+    font-size: 12px;
+    padding: 1px 10px;
+    border-radius: 5px;
+    color: #fff;
+    background: #15a06c;
+    margin: 0 10px;
+  }
 
-    &-info {
-        margin-top: 15px;
+  &-info {
+    margin-top: 15px;
 
-        .info-item {
-            font-size: 12px;
-            padding: 0 10px;
-            color: #757575;
+    .info-item {
+      font-size: 12px;
+      padding: 0 10px;
+      color: #757575;
 
-            .info-bold {
-                font-weight: bold;
-                color: #70b1e7;
-            }
-        }
+      .info-bold {
+        font-weight: bold;
+        color: #70b1e7;
+      }
+    }
 
-        .info-item:not(:last-child) {
-            border-right: 2px solid #f3f3f3;
-        }
+    .info-item:not(:last-child) {
+      border-right: 2px solid #f3f3f3;
     }
+  }
 
-    &-tools {
-        position: absolute;
-        height: 100%;
-        right: 50px;
-        top: 35px;
-        font-size: 14px;
-        display: none;
+  &-tools {
+    position: absolute;
+    height: 100%;
+    right: 50px;
+    top: 35px;
+    font-size: 14px;
+    display: none;
 
-        span {
-            cursor: pointer;
-            font-weight: bold;
-            color: #1cc0f3;
-            /*  &:hover{
+    span {
+      cursor: pointer;
+      font-weight: bold;
+      color: #1cc0f3;
+      /*  &:hover{
                 color:#2d8cf0;
             }*/
-        }
     }
+  }
 
-    &:hover {
-        .paper-item-tools {
-            display: flex;
-        }
+  &:hover {
+    .paper-item-tools {
+      display: flex;
     }
+  }
 }
 .papaer-list-wrap {
-    height: 600px;
+  height: 600px;
 }
 .choose-paper {
-    color: #2d8cf0;
-    cursor: pointer;
+  color: #2d8cf0;
+  cursor: pointer;
 }
 </style>

+ 10 - 1
TEAMModelOS/ClientApp/src/view/assessment/BaseArtInputNum.vue

@@ -15,7 +15,7 @@
     </div>
     <div v-if="quota.id === 'quota_22'">
       <span>{{ row.flatScoreArr.find(i => i.id === quota.id).score }} 分</span>
-      <span style="text-decoration: underline;margin:0 5px;cursor: pointer;" @click.stop="musicModal = true">修改分数</span>
+      <span style="text-decoration: underline;margin:0 5px;cursor: pointer;" @click.stop="editScore">修改分数</span>
     </div>
 
     <Modal v-model="musicModal" width="75%" footer-hide>
@@ -47,9 +47,18 @@ export default {
     }
   },
   created() {
+    console.error(this.quota)
     console.error(this.row)
   },
   methods: {
+    editScore() {
+      console.error('演唱题分数', this.row.flatScoreArr.find(i => i.id === this.quota.id).score)
+      if (this.row.flatScoreArr.find(i => i.id === this.quota.id).score <= 0) {
+        this.$Message.warning('该学生暂未作答,无法评分!')
+      } else {
+        this.musicModal = true
+      }
+    },
     handleZYData(data) {
       console.error(data)
       this.$emit('onConfirmEdit', {