lsc 1 year ago
parent
commit
6a01258985

+ 1 - 1
dist/index.html

@@ -18,7 +18,7 @@
       border-radius: 10px;
       -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, .3);
       background-color: rgba(0, 0, 0, 0.1);
-    }</style><link href=./static/css/app.370bb99c7a27f580430749fddf34a140.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=./static/js/manifest.3ad1d5771e9b13dbdad2.js></script><script type=text/javascript src=./static/js/vendor.b9b15ae4f82d2f85be9d.js></script><script type=text/javascript src=./static/js/app.f1f0fe7b1cf541e4866e.js></script></body></html><script>function stopSafari() {
+    }</style><link href=./static/css/app.b406dc9be5474381fb6624dad616d8bd.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=./static/js/manifest.3ad1d5771e9b13dbdad2.js></script><script type=text/javascript src=./static/js/vendor.8d7171b1fe858bda1433.js></script><script type=text/javascript src=./static/js/app.c7b5f5a687fe2fda7b19.js></script></body></html><script>function stopSafari() {
     //阻止safari浏览器双击放大功能
     let lastTouchEnd = 0  //更新手指弹起的时间
     document.documentElement.addEventListener("touchstart", function (event) {

File diff suppressed because it is too large
+ 0 - 0
dist/static/css/app.b406dc9be5474381fb6624dad616d8bd.css


File diff suppressed because it is too large
+ 0 - 0
dist/static/css/app.b406dc9be5474381fb6624dad616d8bd.css.map


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/app.c7b5f5a687fe2fda7b19.js


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/app.c7b5f5a687fe2fda7b19.js.map


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/app.f1f0fe7b1cf541e4866e.js


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/manifest.3ad1d5771e9b13dbdad2.js.map


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/vendor.8d7171b1fe858bda1433.js


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/vendor.8d7171b1fe858bda1433.js.map


+ 50 - 6
package-lock.json

@@ -9,6 +9,7 @@
       "version": "1.0.0",
       "dependencies": {
         "axios": "^0.21.3",
+        "big.js": "^6.2.1",
         "echarts": "^5.2.2",
         "element-ui": "^2.15.6",
         "file-saver": "^2.0.5",
@@ -3243,6 +3244,16 @@
         "autoprefixer": "bin/autoprefixer"
       }
     },
+    "node_modules/@vue/cli-service/node_modules/big.js": {
+      "version": "5.2.2",
+      "resolved": "https://registry.npmmirror.com/big.js/-/big.js-5.2.2.tgz",
+      "integrity": "sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ==",
+      "optional": true,
+      "peer": true,
+      "engines": {
+        "node": "*"
+      }
+    },
     "node_modules/@vue/cli-service/node_modules/binary-extensions": {
       "version": "1.13.1",
       "resolved": "https://registry.npmmirror.com/binary-extensions/-/binary-extensions-1.13.1.tgz",
@@ -7460,9 +7471,9 @@
       "peer": true
     },
     "node_modules/big.js": {
-      "version": "5.2.2",
-      "resolved": "https://registry.nlark.com/big.js/download/big.js-5.2.2.tgz",
-      "integrity": "sha1-ZfCvOC9Xi83HQr2cKB6cstd2gyg=",
+      "version": "6.2.1",
+      "resolved": "https://registry.npmmirror.com/big.js/-/big.js-6.2.1.tgz",
+      "integrity": "sha512-bCtHMwL9LeDIozFn+oNhhFoq+yQ3BNdnsLSASUxLciOb1vgvpHsIO1dsENiGMgbb4SkP5TrzWzRiLddn8ahVOQ==",
       "engines": {
         "node": "*"
       }
@@ -13930,6 +13941,14 @@
         "node": ">=4.0.0"
       }
     },
+    "node_modules/loader-utils/node_modules/big.js": {
+      "version": "5.2.2",
+      "resolved": "https://registry.npmmirror.com/big.js/-/big.js-5.2.2.tgz",
+      "integrity": "sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ==",
+      "engines": {
+        "node": "*"
+      }
+    },
     "node_modules/loader-utils/node_modules/json5": {
       "version": "1.0.1",
       "resolved": "https://registry.npm.taobao.org/json5/download/json5-1.0.1.tgz",
@@ -22294,6 +22313,14 @@
         "acorn": "^8"
       }
     },
+    "node_modules/vue-pdf/node_modules/big.js": {
+      "version": "5.2.2",
+      "resolved": "https://registry.npmmirror.com/big.js/-/big.js-5.2.2.tgz",
+      "integrity": "sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ==",
+      "engines": {
+        "node": "*"
+      }
+    },
     "node_modules/vue-pdf/node_modules/browserslist": {
       "version": "4.21.4",
       "resolved": "https://registry.npmmirror.com/browserslist/-/browserslist-4.21.4.tgz",
@@ -26532,6 +26559,13 @@
             "postcss-value-parser": "^4.1.0"
           }
         },
+        "big.js": {
+          "version": "5.2.2",
+          "resolved": "https://registry.npmmirror.com/big.js/-/big.js-5.2.2.tgz",
+          "integrity": "sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ==",
+          "optional": true,
+          "peer": true
+        },
         "binary-extensions": {
           "version": "1.13.1",
           "resolved": "https://registry.npmmirror.com/binary-extensions/-/binary-extensions-1.13.1.tgz",
@@ -30096,9 +30130,9 @@
       }
     },
     "big.js": {
-      "version": "5.2.2",
-      "resolved": "https://registry.nlark.com/big.js/download/big.js-5.2.2.tgz",
-      "integrity": "sha1-ZfCvOC9Xi83HQr2cKB6cstd2gyg="
+      "version": "6.2.1",
+      "resolved": "https://registry.npmmirror.com/big.js/-/big.js-6.2.1.tgz",
+      "integrity": "sha512-bCtHMwL9LeDIozFn+oNhhFoq+yQ3BNdnsLSASUxLciOb1vgvpHsIO1dsENiGMgbb4SkP5TrzWzRiLddn8ahVOQ=="
     },
     "binary-extensions": {
       "version": "2.2.0",
@@ -35451,6 +35485,11 @@
         "json5": "^1.0.1"
       },
       "dependencies": {
+        "big.js": {
+          "version": "5.2.2",
+          "resolved": "https://registry.npmmirror.com/big.js/-/big.js-5.2.2.tgz",
+          "integrity": "sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ=="
+        },
         "json5": {
           "version": "1.0.1",
           "resolved": "https://registry.npm.taobao.org/json5/download/json5-1.0.1.tgz",
@@ -42408,6 +42447,11 @@
           "peer": true,
           "requires": {}
         },
+        "big.js": {
+          "version": "5.2.2",
+          "resolved": "https://registry.npmmirror.com/big.js/-/big.js-5.2.2.tgz",
+          "integrity": "sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ=="
+        },
         "browserslist": {
           "version": "4.21.4",
           "resolved": "https://registry.npmmirror.com/browserslist/-/browserslist-4.21.4.tgz",

+ 1 - 0
package.json

@@ -13,6 +13,7 @@
   },
   "dependencies": {
     "axios": "^0.21.3",
+    "big.js": "^6.2.1",
     "echarts": "^5.2.2",
     "element-ui": "^2.15.6",
     "file-saver": "^2.0.5",

+ 9 - 1
src/components/components/answerData2.vue

@@ -19,7 +19,7 @@
       </div>
       <div class="correct">
         <span>正确率为<span>{{
-        people.length > 0 ? Math.round(count / people.length * 10000) / 10000 * 100 + "%" : 0
+        people.length > 0 ? countA(count,people) : 0
         }}</span></span>
       </div>
     </div>
@@ -46,6 +46,7 @@
 </template>
 
 <script>
+import Big from 'big.js'
 
 export default {
   props: ["problemJson", "answer", "people"],
@@ -106,6 +107,13 @@ export default {
       },
     };
   },
+  computed: {
+    countA: function() {
+      return function(count,people)  {
+        return (Math.round(new Big(count) / new Big(people.length) * 10000) / 10000 * 100).toFixed(2) + "%";
+      }
+    }
+  },
   directives: {  // 使用局部注册指令的方式
     resize: { // 指令的名称
       bind(el, binding) { // el为绑定的元素,binding为绑定给指令的对象

Some files were not shown because too many files changed in this diff