|
|
@@ -0,0 +1,369 @@
|
|
|
+<template>
|
|
|
+ <div class="ele-body">
|
|
|
+ <el-row :gutter="5">
|
|
|
+ <el-col :span="8" style="height: 300px">
|
|
|
+ <el-card class="box-card">
|
|
|
+ <div slot="header" class="clearfix">
|
|
|
+ <span>概览</span>
|
|
|
+ </div>
|
|
|
+ </el-card>
|
|
|
+ </el-col>
|
|
|
+
|
|
|
+ <el-col :span="7" style="height: 300px">
|
|
|
+ <el-card class="box-card" style="height: 100%">
|
|
|
+ <div slot="header" class="clearfix">
|
|
|
+ <span>任务总体进展</span>
|
|
|
+ </div>
|
|
|
+ <v-chart ref="pieRef" style="height: 100%" :option="pieOption" />
|
|
|
+ </el-card>
|
|
|
+ </el-col>
|
|
|
+
|
|
|
+ <el-col :span="9" style="height: 300px">
|
|
|
+ <el-card class="box-card" style="height: 100%">
|
|
|
+ <div slot="header" class="clearfix">
|
|
|
+ <span>里程碑任务进展</span>
|
|
|
+ </div>
|
|
|
+ <ele-pro-table
|
|
|
+ ref="table"
|
|
|
+ :columns="columns"
|
|
|
+ :datasource="datasource"
|
|
|
+ :needPage="false"
|
|
|
+ :toolbar="false"
|
|
|
+ >
|
|
|
+ </ele-pro-table>
|
|
|
+ </el-card>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="12" style="height: 340px; margin-top: 5px">
|
|
|
+ <el-card class="box-card" style="height: 100%">
|
|
|
+ <div slot="header" class="clearfix">
|
|
|
+ <span>本周任务</span>
|
|
|
+ </div>
|
|
|
+ <ele-pro-table
|
|
|
+ ref="table"
|
|
|
+ :columns="columns1"
|
|
|
+ :datasource="datasource"
|
|
|
+ :needPage="false"
|
|
|
+ :toolbar="false"
|
|
|
+ >
|
|
|
+ </ele-pro-table>
|
|
|
+ </el-card>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="12" style="height: 340px; margin-top: 5px">
|
|
|
+ <el-card class="box-card" style="height: 100%">
|
|
|
+ <div slot="header" class="clearfix">
|
|
|
+ <span>下周任务</span>
|
|
|
+ </div>
|
|
|
+ <ele-pro-table
|
|
|
+ ref="table"
|
|
|
+ :columns="columns2"
|
|
|
+ :datasource="datasource"
|
|
|
+ :needPage="false"
|
|
|
+ :toolbar="false"
|
|
|
+ >
|
|
|
+ </ele-pro-table>
|
|
|
+ </el-card>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="12" style="height: 340px; margin-top: 5px">
|
|
|
+ <el-card class="box-card" style="height: 100%">
|
|
|
+ <div slot="header" class="clearfix">
|
|
|
+ <span>团队成员工时</span>
|
|
|
+ </div>
|
|
|
+ </el-card>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="12" style="height: 340px; margin-top: 5px">
|
|
|
+ <el-card class="box-card" style="height: 100%">
|
|
|
+ <div slot="header" class="clearfix">
|
|
|
+ <span>团队成员执行情况</span>
|
|
|
+ </div>
|
|
|
+ <ele-pro-table
|
|
|
+ ref="table"
|
|
|
+ :columns="columns3"
|
|
|
+ :datasource="datasource"
|
|
|
+ :needPage="false"
|
|
|
+ :toolbar="false"
|
|
|
+ >
|
|
|
+ </ele-pro-table>
|
|
|
+ </el-card>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+<script>
|
|
|
+ // import {
|
|
|
+ // queryHomePage,
|
|
|
+ // queryFactory,
|
|
|
+ // queryTeam,
|
|
|
+ // queryProductionLine
|
|
|
+ // } from '@/api/qms';
|
|
|
+ import {
|
|
|
+ pieOption,
|
|
|
+ barOption,
|
|
|
+ lineOption,
|
|
|
+ columns,
|
|
|
+ columns1,
|
|
|
+ columns2,
|
|
|
+ columns3
|
|
|
+ } from './data';
|
|
|
+ import { use } from 'echarts/core';
|
|
|
+ import { CanvasRenderer } from 'echarts/renderers';
|
|
|
+ import { BarChart, PieChart, LineChart } from 'echarts/charts';
|
|
|
+ import {
|
|
|
+ GridComponent,
|
|
|
+ TooltipComponent,
|
|
|
+ LegendComponent
|
|
|
+ } from 'echarts/components';
|
|
|
+
|
|
|
+ import VChart from 'vue-echarts';
|
|
|
+ import { echartsMixin } from '@/utils/echarts-mixin';
|
|
|
+ // 按需加载 echarts
|
|
|
+ use([
|
|
|
+ CanvasRenderer,
|
|
|
+ BarChart,
|
|
|
+ PieChart,
|
|
|
+ GridComponent,
|
|
|
+ TooltipComponent,
|
|
|
+ LegendComponent,
|
|
|
+ LineChart
|
|
|
+ ]);
|
|
|
+ export default {
|
|
|
+ mixins: [echartsMixin(['pieRef', 'barRef1', 'lineRef', 'barRef3'])],
|
|
|
+
|
|
|
+ components: { VChart },
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ columns,
|
|
|
+ columns1,
|
|
|
+ columns2,
|
|
|
+ arr: [
|
|
|
+ {
|
|
|
+ name: '在制工单数',
|
|
|
+ num: '188',
|
|
|
+ // imgUrl: require('../../assets/Group1.png'),
|
|
|
+ unit: '个'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: '在制工单计划生产数',
|
|
|
+ num: '188',
|
|
|
+ // imgUrl: require('../../assets/Group2.png'),
|
|
|
+ unit: 'pcs'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: '在制工单已入库数',
|
|
|
+ num: '188',
|
|
|
+ // imgUrl: require('../../assets/Group3.png'),
|
|
|
+ unit: 'pcs'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: '在制工单延期生产数',
|
|
|
+ num: '188',
|
|
|
+ // imgUrl: require('../../assets/Group4.png'),
|
|
|
+ unit: 'pcs',
|
|
|
+ color: '#f97876'
|
|
|
+ }
|
|
|
+ ],
|
|
|
+
|
|
|
+ pieOption: {},
|
|
|
+ barOption: {},
|
|
|
+ barOption1: {},
|
|
|
+ lineOption: {},
|
|
|
+ form: {
|
|
|
+ finishTime: '',
|
|
|
+ timeType: '1'
|
|
|
+ }
|
|
|
+ };
|
|
|
+ },
|
|
|
+
|
|
|
+ created() {},
|
|
|
+ mounted() {
|
|
|
+ this.pieOption = pieOption([
|
|
|
+ { value: 60, name: '延期' },
|
|
|
+ { value: 60, name: '正常' }
|
|
|
+ ]);
|
|
|
+ this.barOption = barOption(
|
|
|
+ [
|
|
|
+ '一月',
|
|
|
+ '二月',
|
|
|
+ '三月',
|
|
|
+ '四月',
|
|
|
+ '五月',
|
|
|
+ '六月',
|
|
|
+ '七月',
|
|
|
+ '八月',
|
|
|
+ '九月',
|
|
|
+ '十月',
|
|
|
+ '十一月',
|
|
|
+ '十二月'
|
|
|
+ ],
|
|
|
+ [
|
|
|
+ {
|
|
|
+ name: '任务量',
|
|
|
+ barWidth: '25%',
|
|
|
+ data: [50, 78, 88, 76, 75, 91, 50, 78, 88, 76, 75, 91],
|
|
|
+ type: 'bar',
|
|
|
+ yAxisIndex: 0, // 使用第一个Y轴
|
|
|
+ itemStyle: {
|
|
|
+ color: '#f9cd5d'
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: '完成量',
|
|
|
+ barWidth: '25%',
|
|
|
+ data: [50, 78, 88, 76, 75, 91, 50, 78, 88, 76, 75, 91],
|
|
|
+ type: 'bar',
|
|
|
+ yAxisIndex: 0, // 使用第一个Y轴
|
|
|
+ itemStyle: {
|
|
|
+ color: '#5893eb'
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: '达成率',
|
|
|
+ symbolSize: 10,
|
|
|
+ data: [50, 78, 88, 76, 75, 91, 50, 78, 88, 76, 75, 91],
|
|
|
+ type: 'line',
|
|
|
+ smooth: true,
|
|
|
+ yAxisIndex: 1, // 使用第一个Y轴
|
|
|
+ itemStyle: {
|
|
|
+ color: '#59b9fe'
|
|
|
+ }
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ );
|
|
|
+ this.barOption1 = barOption(
|
|
|
+ [
|
|
|
+ '一月',
|
|
|
+ '二月',
|
|
|
+ '三月',
|
|
|
+ '四月',
|
|
|
+ '五月',
|
|
|
+ '六月',
|
|
|
+ '七月',
|
|
|
+ '八月',
|
|
|
+ '九月',
|
|
|
+ '十月',
|
|
|
+ '十一月',
|
|
|
+ '十二月'
|
|
|
+ ],
|
|
|
+ [
|
|
|
+ {
|
|
|
+ name: '应完成订单',
|
|
|
+ barWidth: '25%',
|
|
|
+ data: [50, 78, 88, 76, 75, 91, 78, 87, 81, 67, 95, 73],
|
|
|
+ type: 'bar',
|
|
|
+ yAxisIndex: 0 // 使用第一个Y轴
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: '实际完成订单',
|
|
|
+ barWidth: '25%',
|
|
|
+ data: [50, 78, 88, 76, 75, 91, 78, 87, 81, 67, 95, 73],
|
|
|
+ type: 'bar',
|
|
|
+ yAxisIndex: 0 // 使用第一个Y轴
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: '准时交付率',
|
|
|
+ symbolSize: 10,
|
|
|
+ data: [50, 78, 88, 76, 75, 91, 78, 87, 81, 67, 95, 73],
|
|
|
+ type: 'line',
|
|
|
+ smooth: true,
|
|
|
+ yAxisIndex: 1, // 使用第一个Y轴
|
|
|
+ itemStyle: {
|
|
|
+ color: '#ff8856'
|
|
|
+ }
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ );
|
|
|
+ this.lineOption = lineOption([
|
|
|
+ [30, 58, 68, 36, 55, 41, 73],
|
|
|
+ [55, 81, 90, 80, 78, 95, 80]
|
|
|
+ ]);
|
|
|
+ setTimeout(() => {
|
|
|
+ this.$refs.pieRef.resize();
|
|
|
+ // this.$refs.barRef1.resize();
|
|
|
+ // this.$refs.lineRef.resize();
|
|
|
+ // this.$refs.barRef3.resize();
|
|
|
+ }, 300);
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ datasource({ page, where, limit }) {
|
|
|
+ return [];
|
|
|
+ return getList({
|
|
|
+ ...where,
|
|
|
+ pageNum: page,
|
|
|
+ size: limit
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }
|
|
|
+ };
|
|
|
+</script>
|
|
|
+<style lang="scss" scoped>
|
|
|
+ .clearfix {
|
|
|
+ font-size: 0.7vw;
|
|
|
+
|
|
|
+ > span {
|
|
|
+ font-weight: bold;
|
|
|
+ }
|
|
|
+ :deep(.el-radio-button__inner) {
|
|
|
+ font-size: 0.7vw;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .ele-body {
|
|
|
+ height: calc(100vh - 136px);
|
|
|
+ overflow: auto;
|
|
|
+
|
|
|
+ > .el-row {
|
|
|
+ height: 100%;
|
|
|
+ }
|
|
|
+ .el-card {
|
|
|
+ height: 100%;
|
|
|
+ :deep(.el-card__body) {
|
|
|
+ padding: 0.3vw;
|
|
|
+ }
|
|
|
+ :deep(.el-card__header) {
|
|
|
+ padding: 0.6vw;
|
|
|
+ }
|
|
|
+ :deep(.el-card__body) {
|
|
|
+ height: calc(100% - 2.3vw);
|
|
|
+ }
|
|
|
+ :deep(.ele-pro-table) {
|
|
|
+ height: 99%;
|
|
|
+ }
|
|
|
+ :deep(.el-table) {
|
|
|
+ // font-size: 0.65vw;
|
|
|
+ }
|
|
|
+ };
|
|
|
+ }
|
|
|
+
|
|
|
+ .item {
|
|
|
+ width: 100%;
|
|
|
+ height: 100%;
|
|
|
+ // background: url(../../assets/main_item.png);
|
|
|
+ background-size: cover;
|
|
|
+ border-radius: 6px;
|
|
|
+ padding: 1vw;
|
|
|
+ color: #333;
|
|
|
+ > .header {
|
|
|
+ font-size: 0.85vw;
|
|
|
+ font-weight: 600;
|
|
|
+ width: 100%;
|
|
|
+ padding-bottom: 0.7vw;
|
|
|
+ border-bottom: 1px solid #f3f3f3;
|
|
|
+ text-align: center;
|
|
|
+ color: #3a92edd1;
|
|
|
+ }
|
|
|
+ > .content {
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: center;
|
|
|
+ flex-direction: column;
|
|
|
+ font-size: 0.85vw;
|
|
|
+ font-weight: 500;
|
|
|
+ height: calc(100% - 1.5vw);
|
|
|
+ p {
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: space-between;
|
|
|
+ width: 100%;
|
|
|
+ height: 33%;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+</style>
|