|
@@ -0,0 +1,98 @@
|
|
|
+<template>
|
|
|
+ <div id="one">
|
|
|
+ <el-row>
|
|
|
+ <el-col :span="24" class="main">
|
|
|
+ <el-col :span="24" class="one">
|
|
|
+ <el-col :span="12" class="left">
|
|
|
+ <div id="oneChart" style="height: 420px"></div>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="12" class="left"> 第一通过一家 </el-col>
|
|
|
+ </el-col>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script>
|
|
|
+import * as echarts from 'echarts';
|
|
|
+import { mapState, createNamespacedHelpers } from 'vuex';
|
|
|
+const { mapActions: ticket } = createNamespacedHelpers('ticket');
|
|
|
+export default {
|
|
|
+ name: 'one',
|
|
|
+ props: {},
|
|
|
+ components: {},
|
|
|
+ data: function () {
|
|
|
+ return {};
|
|
|
+ },
|
|
|
+ created() {},
|
|
|
+ mounted() {
|
|
|
+ this.init();
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ ...ticket(['staQuery']),
|
|
|
+ async init() {
|
|
|
+ let res = await this.staQuery();
|
|
|
+ if (this.$checkRes(res)) {
|
|
|
+ var chartDom = document.getElementById('oneChart');
|
|
|
+ var myChart = echarts.init(chartDom);
|
|
|
+ var option;
|
|
|
+ option = {
|
|
|
+ legend: {
|
|
|
+ top: 'bottom',
|
|
|
+ },
|
|
|
+ tooltip: {
|
|
|
+ trigger: 'item',
|
|
|
+ },
|
|
|
+ series: [
|
|
|
+ {
|
|
|
+ name: '创新券流程数据统计',
|
|
|
+ type: 'pie',
|
|
|
+ radius: '60%',
|
|
|
+ center: ['50%', '40%'],
|
|
|
+ itemStyle: {
|
|
|
+ borderRadius: 8,
|
|
|
+ borderColor: '#fff',
|
|
|
+ borderWidth: 2,
|
|
|
+ },
|
|
|
+ data: res.data,
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ };
|
|
|
+ option && myChart.setOption(option);
|
|
|
+ }
|
|
|
+ },
|
|
|
+ },
|
|
|
+ computed: {
|
|
|
+ ...mapState(['user']),
|
|
|
+ },
|
|
|
+ metaInfo() {
|
|
|
+ return { title: this.$route.meta.title };
|
|
|
+ },
|
|
|
+ watch: {
|
|
|
+ test: {
|
|
|
+ deep: true,
|
|
|
+ immediate: true,
|
|
|
+ handler(val) {},
|
|
|
+ },
|
|
|
+ },
|
|
|
+};
|
|
|
+</script>
|
|
|
+
|
|
|
+<style lang="less" scoped>
|
|
|
+.main {
|
|
|
+ .one {
|
|
|
+ .left {
|
|
|
+ width: 48.5%;
|
|
|
+ height: 500px;
|
|
|
+ overflow: hidden;
|
|
|
+ padding: 10px;
|
|
|
+ border-radius: 10px;
|
|
|
+ margin: 0 40px 0 0;
|
|
|
+ box-shadow: 0 0 5px #242f42;
|
|
|
+ }
|
|
|
+ .left:nth-child(2n) {
|
|
|
+ margin: 0;
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+</style>
|