|
@@ -9,15 +9,34 @@
|
|
|
position: relative;
|
|
|
"
|
|
|
>
|
|
|
- <div
|
|
|
- id="echarts5"
|
|
|
- style="width: 100%; height: 100%"
|
|
|
- class="echarts5div"
|
|
|
- ></div>
|
|
|
+ <div class="table-container">
|
|
|
+ <div class="th row">
|
|
|
+ <div>订单类型</div>
|
|
|
+ <div>累计订单数</div>
|
|
|
+ <div>累计订单金额</div>
|
|
|
+ </div>
|
|
|
+ <div class="td row">
|
|
|
+ <div>销售订单</div>
|
|
|
+ <div>12345</div>
|
|
|
+ <div>12345</div>
|
|
|
+ </div>
|
|
|
+ <div class="td row">
|
|
|
+ <div>辅材订单</div>
|
|
|
+ <div>12345</div>
|
|
|
+ <div>12345</div>
|
|
|
+ </div>
|
|
|
+ <div class="td row">
|
|
|
+ <div>配件订单</div>
|
|
|
+ <div>12345</div>
|
|
|
+ <div>12345</div>
|
|
|
+ </div>
|
|
|
+ <div class="td row">
|
|
|
+ <div>增值订单</div>
|
|
|
+ <div>12345</div>
|
|
|
+ <div>12345</div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
- <Teleport to="body">
|
|
|
- <div class="niiono" v-if="aaaaa"></div>
|
|
|
- </Teleport>
|
|
|
</moduleEnclosure>
|
|
|
</template>
|
|
|
|
|
@@ -31,198 +50,42 @@ export default {
|
|
|
components: { moduleEnclosure },
|
|
|
data() {
|
|
|
return {
|
|
|
- myChart: null,
|
|
|
list: [],
|
|
|
- aaaaa: false,
|
|
|
};
|
|
|
},
|
|
|
watch: {
|
|
|
- aaaaa() {
|
|
|
- if (this.aaaaa) {
|
|
|
- bus.emit('autoplay', false);
|
|
|
- } else {
|
|
|
- bus.emit('autoplay', true);
|
|
|
- }
|
|
|
- },
|
|
|
+
|
|
|
},
|
|
|
mounted() {
|
|
|
- this.timeId = getQuery8((res) => {
|
|
|
- this.echarts_5(res.data);
|
|
|
- }, 50000);
|
|
|
+
|
|
|
},
|
|
|
beforeUnmount() {
|
|
|
- this.timeId();
|
|
|
+
|
|
|
},
|
|
|
methods: {
|
|
|
- echarts_5(value = []) {
|
|
|
- this.list = value.sort((a, b) => {
|
|
|
- return b.cut - a.cut;
|
|
|
- });
|
|
|
- if (this.myChart) {
|
|
|
- this.myChart.dispose();
|
|
|
- }
|
|
|
- this.myChart = new echarts.init(document.getElementById('echarts5'));
|
|
|
- this.myChart.setOption({
|
|
|
- tooltip: {
|
|
|
- formatter: function (params) {
|
|
|
- return `<div style="color:#fff;">${params.seriesName}: ${params.name} (${params.percent}%)</div>`;
|
|
|
- },
|
|
|
- trigger: 'item',
|
|
|
- transitionDuration: 0,
|
|
|
- backgroundColor: '#092a66',
|
|
|
- borderColor: '#0462b5',
|
|
|
- borderRadius: 8,
|
|
|
- borderWidth: 2,
|
|
|
- padding: [0, 0],
|
|
|
- axisPointer: {
|
|
|
- type: 'line',
|
|
|
- lineStyle: {
|
|
|
- type: 'dashed',
|
|
|
- color: '#8AB1DC',
|
|
|
- },
|
|
|
- },
|
|
|
- },
|
|
|
- // visualMap: {
|
|
|
- // show: false,
|
|
|
- // min: 400,
|
|
|
- // max: 500,
|
|
|
- // inRange: {},
|
|
|
- // },
|
|
|
- series: [
|
|
|
- {
|
|
|
- name: '类型',
|
|
|
- type: 'pie',
|
|
|
- radius: ['50%', '70%'],
|
|
|
- center: ['50%', '50%'],
|
|
|
- color: ['#21c8fb', '#ffc737', '#ea539b', '#59cfe6', '#8061ff'],
|
|
|
- data: this.list
|
|
|
- .slice(0, 8)
|
|
|
- .map((item) => {
|
|
|
- return {
|
|
|
- name: item.btype,
|
|
|
- value: item.cut,
|
|
|
- };
|
|
|
- })
|
|
|
- .filter((item) => item.value > 0),
|
|
|
- roseType: 'radius',
|
|
|
- label: {
|
|
|
- normal: {
|
|
|
- formatter: ['{b|{b}:{d}%}', '{c|{c}单}'].join('\n'),
|
|
|
- rich: {
|
|
|
- b: {
|
|
|
- color: '#fff',
|
|
|
- fontSize: csize(11),
|
|
|
- lineHeight: csize(11),
|
|
|
- },
|
|
|
- c: {
|
|
|
- color: 'rgb(98,137,169)',
|
|
|
- fontSize: csize(11),
|
|
|
- lineHeight: csize(11),
|
|
|
- height: csize(11),
|
|
|
- },
|
|
|
- },
|
|
|
- },
|
|
|
- },
|
|
|
- labelLine: {
|
|
|
- normal: {
|
|
|
- lineStyle: {
|
|
|
- color: 'rgb(98,137,169)',
|
|
|
- },
|
|
|
- smooth: 0.2,
|
|
|
- length: 10,
|
|
|
- length2: 20,
|
|
|
- },
|
|
|
- },
|
|
|
- },
|
|
|
- ],
|
|
|
- });
|
|
|
- },
|
|
|
+
|
|
|
},
|
|
|
};
|
|
|
</script>
|
|
|
<style scoped lang="scss">
|
|
|
-.niiono {
|
|
|
- position: fixed;
|
|
|
- top: 0;
|
|
|
- left: 0;
|
|
|
- right: 0;
|
|
|
- bottom: 0;
|
|
|
- z-index: 1999;
|
|
|
-}
|
|
|
-.biuhoij {
|
|
|
- display: inline-block;
|
|
|
- position: absolute !important;
|
|
|
- top: -8px;
|
|
|
- right: -18px;
|
|
|
-}
|
|
|
-.minwiuhdu {
|
|
|
- width: 150px;
|
|
|
- text-align: right;
|
|
|
-}
|
|
|
-.setwidth {
|
|
|
- width: 200px;
|
|
|
- text-align: center;
|
|
|
-}
|
|
|
-table {
|
|
|
- width: 100%;
|
|
|
- border-collapse: collapse;
|
|
|
-}
|
|
|
-
|
|
|
-table caption {
|
|
|
- font-size: 2em;
|
|
|
- font-weight: bold;
|
|
|
- margin: 1em 0;
|
|
|
-}
|
|
|
-
|
|
|
-th,
|
|
|
-td {
|
|
|
- border: 1px solid #ddd;
|
|
|
- text-align: center;
|
|
|
- padding: 6px 6px;
|
|
|
-}
|
|
|
-
|
|
|
-table thead tr {
|
|
|
- background-color: #008c8c;
|
|
|
- color: #fff;
|
|
|
-}
|
|
|
-
|
|
|
-table tbody tr:nth-child(odd) {
|
|
|
- background-color: #eee;
|
|
|
-}
|
|
|
-
|
|
|
-table tbody tr:hover {
|
|
|
- background-color: #ccc;
|
|
|
-}
|
|
|
-table tfoot tr td {
|
|
|
- padding-right: 20px;
|
|
|
-}
|
|
|
-.echarts5div {
|
|
|
- position: absolute;
|
|
|
- left: 0;
|
|
|
- bottom: -14px;
|
|
|
-}
|
|
|
-.classbtns {
|
|
|
- width: 80px;
|
|
|
- height: 28px;
|
|
|
+.table-container {
|
|
|
+ height: 100%;
|
|
|
display: flex;
|
|
|
- flex-direction: row;
|
|
|
- align-items: center;
|
|
|
- border: 2px solid #0e72e6;
|
|
|
- cursor: pointer;
|
|
|
- transform: translatex(-10px);
|
|
|
- div {
|
|
|
- width: 100%;
|
|
|
- height: 100%;
|
|
|
- text-align: center;
|
|
|
- line-height: 28px;
|
|
|
- }
|
|
|
-
|
|
|
- div:nth-child(1) {
|
|
|
- border-right: 2px solid #0e72e6;
|
|
|
- }
|
|
|
- .select {
|
|
|
- background: #0e72e6;
|
|
|
- color: #bbd4ff;
|
|
|
+ flex-direction: column;
|
|
|
+ justify-content: space-between;
|
|
|
+ .row {
|
|
|
+ display: flex;
|
|
|
+ &.th {
|
|
|
+ font-weight: bold;
|
|
|
+ color: #26A3CE;
|
|
|
+ }
|
|
|
+ &.td {
|
|
|
+ color: #ffffff;
|
|
|
+ }
|
|
|
+ div {
|
|
|
+ flex: 1;
|
|
|
+ font-size: 14px;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
</style>
|