{"remainingRequest":"D:\\jenkins\\workspace\\examine-fvue\\node_modules\\thread-loader\\dist\\cjs.js!D:\\jenkins\\workspace\\examine-fvue\\node_modules\\babel-loader\\lib\\index.js!D:\\jenkins\\workspace\\examine-fvue\\node_modules\\cache-loader\\dist\\cjs.js??ref--0-0!D:\\jenkins\\workspace\\examine-fvue\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!D:\\jenkins\\workspace\\examine-fvue\\src\\views\\bbtjMenu\\sjfx.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\examine-fvue\\src\\views\\bbtjMenu\\sjfx.vue","mtime":1672039207383},{"path":"D:\\jenkins\\workspace\\examine-fvue\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\examine-fvue\\node_modules\\thread-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\examine-fvue\\node_modules\\babel-loader\\lib\\index.js","mtime":315532800000},{"path":"D:\\jenkins\\workspace\\examine-fvue\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\examine-fvue\\node_modules\\vue-loader\\lib\\index.js","mtime":499162500000}],"contextDependencies":[],"result":["import \"core-js/modules/es6.function.name\";\nimport \"core-js/modules/web.dom.iterable\";\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\nimport * as echarts from 'echarts';\nimport { TableMixin } from '@/mixins/tableMixin';\nimport dictUtils from '@/components/dict/DictSelectUtils.js';\nimport bbtjMenu from '@/api/examination/bbtjMenu.js';\nexport default {\n  name: 'kstongjiMenu',\n  components: {},\n  mixins: [TableMixin],\n  data: function data() {\n    return {\n      tableData: {},\n      sttxList: [],\n      //试题类型\n      stndList: [] //试题难度\n\n    };\n  },\n  created: function created() {\n    this.sttxList = dictUtils.getDictItemsFromCache('sttx');\n    this.stndList = dictUtils.getDictItemsFromCache('stnd');\n  },\n  mounted: function mounted() {},\n  methods: {\n    // 获取list\n    loadData: function loadData() {\n      var _this = this;\n\n      this.loading = true;\n      this.tableData = [];\n      bbtjMenu.paperAnalysis({}, function (res) {\n        if (res) {\n          _this.tableData = res;\n\n          _this.tableData.questionTypeList.forEach(function (q) {\n            _this.sttxList.forEach(function (s) {\n              if (q.type == s.value) {\n                q.typeName = s.name;\n              }\n            });\n          });\n\n          _this.tableData.difficulty.forEach(function (d) {\n            _this.stndList.forEach(function (t) {\n              if (d.difficulty == t.value) {\n                d.difficultyName = t.name;\n              }\n            });\n          });\n\n          _this.$nextTick(function () {\n            _this.fifficulty();\n\n            _this.paperType();\n          });\n\n          _this.$set(_this.tableData);\n\n          _this.loading = false;\n        }\n\n        console.log(_this.tableData);\n      });\n    },\n    paperType: function paperType() {\n      var typeName = [];\n      var counts = [];\n      this.tableData.questionTypeList.forEach(function (q) {\n        typeName.push(q.typeName);\n        counts.push(q.count);\n      });\n      var chartDom = document.getElementById('paperTypes');\n      var myChart = echarts.init(chartDom);\n      var option = {\n        tooltip: {\n          trigger: 'axis',\n          axisPointer: {\n            type: 'shadow'\n          }\n        },\n        grid: {\n          left: '3%',\n          right: '4%',\n          bottom: '3%',\n          containLabel: true\n        },\n        xAxis: [{\n          type: 'category',\n          data: typeName,\n          axisTick: {\n            alignWithLabel: true\n          }\n        }],\n        yAxis: [{\n          type: 'value'\n        }],\n        series: [{\n          type: 'bar',\n          barWidth: '60%',\n          data: counts\n        }]\n      };\n      option && myChart.setOption(option);\n      window.addEventListener('resize', function () {\n        myChart.resize();\n      });\n    },\n    fifficulty: function fifficulty() {\n      var arr = [];\n      this.tableData.difficulty.forEach(function (d) {\n        arr.push({\n          name: d.difficultyName,\n          value: d.count\n        });\n      });\n      var chartDom = document.getElementById('itemFifficulty');\n      var myChart = echarts.init(chartDom);\n      var option = {\n        tooltip: {\n          trigger: 'item'\n        },\n        legend: {\n          orient: 'vertical',\n          // bottom: '0',\n          left: '0',\n          top: '40%'\n        },\n        series: [{\n          type: 'pie',\n          // center: ['50%', '50%'],\n          radius: ['20%', '30%'],\n          data: arr,\n          label: {\n            normal: {\n              formatter: '{b}：{d}%'\n            }\n          },\n          itemStyle: {\n            borderColor: '#fff'\n          },\n          emphasis: {\n            itemStyle: {\n              shadowBlur: 10,\n              shadowOffsetX: 0,\n              shadowColor: 'rgba(0, 0, 0, 0.5)'\n            }\n          }\n        }]\n      };\n      option && myChart.setOption(option);\n      window.addEventListener('resize', function () {\n        myChart.resize();\n      });\n    }\n  }\n};",null]}