Explorar o código

elective test - report display

hare8999@163.com %!s(int64=2) %!d(string=hai) anos
pai
achega
f13a29d424
Modificáronse 1 ficheiros con 2 adicións e 2 borrados
  1. 2 2
      src/views/elective/test/components/test-report-mixin.js

+ 2 - 2
src/views/elective/test/components/test-report-mixin.js

@@ -65,13 +65,13 @@ export default {
       result.sort((left, right) => {
         const lWeight = this.reportConfig.matchedKeys.includes(left.key) ? 100 : 1
         const rWeight = this.reportConfig.matchedKeys.includes(right.key) ? 100 : 1
-        return  right.value * rWeight - left.value * lWeight
+        return right.value * rWeight - left.value * lWeight
       })
       return result
     },
     topOfMergedData() {
       const topThree = this.sortedMergedData.filter(i => this.reportConfig.matchedKeys.includes(i.key))
-      this.defaultActives = topThree.map(i => i.key)
+      this.defaultActives = this.readonly ? this.sortedMergedData.map(i => i.key) : topThree.map(i => i.key)
       return topThree
     },
     chartOptions() {