|
@@ -9,10 +9,7 @@
|
|
|
<div class="row1 flex">
|
|
|
<div class="col1">
|
|
|
<div class="card chart1-box">
|
|
|
- <!-- <div class="flex justify-between items-center"> -->
|
|
|
<div class="title">客户类型</div>
|
|
|
- <!-- <custom-date-picker v-model="curTimeRange"></custom-date-picker> -->
|
|
|
- <!-- </div> -->
|
|
|
<div class="chart-wrap"
|
|
|
><my-chart :options="options1"></my-chart
|
|
|
></div>
|
|
@@ -54,11 +51,98 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div class="col2 flex-1">
|
|
|
- <div class="card chart7-box"></div>
|
|
|
+ <div class="col2">
|
|
|
+ <div class="card chart7-box">
|
|
|
+ <div class="title m-b-8px">项目派单完成率</div>
|
|
|
+ <div class="chart-wrap overflow-auto service-box">
|
|
|
+ <div class="service-item">
|
|
|
+ <div class="head flex justify-between items-center">
|
|
|
+ <div>服务单元A</div>
|
|
|
+ <div>91%</div>
|
|
|
+ </div>
|
|
|
+ <div class="body flex items-center">
|
|
|
+ <div class="label">状态:</div>
|
|
|
+ <div class="status">已发布</div>
|
|
|
+ <div class="process-box">
|
|
|
+ <div class="process" :style="{ width: 91 + '%' }"></div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="service-item">
|
|
|
+ <div class="head flex justify-between items-center">
|
|
|
+ <div>服务单元B</div>
|
|
|
+ <div>100%</div>
|
|
|
+ </div>
|
|
|
+ <div class="body flex items-center">
|
|
|
+ <div class="label">状态:</div>
|
|
|
+ <div class="status finished">已完结</div>
|
|
|
+ <div class="process-box">
|
|
|
+ <div class="process" :style="{ width: 100 + '%' }"></div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="service-item">
|
|
|
+ <div class="head flex justify-between items-center">
|
|
|
+ <div>服务单元C</div>
|
|
|
+ <div>100%</div>
|
|
|
+ </div>
|
|
|
+ <div class="body flex items-center">
|
|
|
+ <div class="label">状态:</div>
|
|
|
+ <div class="status finished">已完结</div>
|
|
|
+ <div class="process-box">
|
|
|
+ <div class="process" :style="{ width: 100 + '%' }"></div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="service-item">
|
|
|
+ <div class="head flex justify-between items-center">
|
|
|
+ <div>服务单元D</div>
|
|
|
+ <div>100%</div>
|
|
|
+ </div>
|
|
|
+ <div class="body flex items-center">
|
|
|
+ <div class="label">状态:</div>
|
|
|
+ <div class="status finished">已完结</div>
|
|
|
+ <div class="process-box">
|
|
|
+ <div class="process" :style="{ width: 100 + '%' }"></div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="service-item">
|
|
|
+ <div class="head flex justify-between items-center">
|
|
|
+ <div>服务单元E</div>
|
|
|
+ <div>100%</div>
|
|
|
+ </div>
|
|
|
+ <div class="body flex items-center">
|
|
|
+ <div class="label">状态:</div>
|
|
|
+ <div class="status finished">已完结</div>
|
|
|
+ <div class="process-box">
|
|
|
+ <div class="process" :style="{ width: 100 + '%' }"></div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="service-item">
|
|
|
+ <div class="head flex justify-between items-center">
|
|
|
+ <div>服务单元F</div>
|
|
|
+ <div>100%</div>
|
|
|
+ </div>
|
|
|
+ <div class="body flex items-center">
|
|
|
+ <div class="label">状态:</div>
|
|
|
+ <div class="status finished">已完结</div>
|
|
|
+ <div class="process-box">
|
|
|
+ <div class="process" :style="{ width: 100 + '%' }"></div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
<div class="col3">
|
|
|
- <div class="card chart8-box"></div>
|
|
|
+ <div class="card chart8-box">
|
|
|
+ <div class="title">教务处城市在执行派单排名</div>
|
|
|
+ <div class="chart-wrap">
|
|
|
+ <table-loop></table-loop>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -70,154 +154,23 @@
|
|
|
import { ref, computed } from 'vue';
|
|
|
import ChinaPointChart from '@/components/common/china-point-chart/index.vue';
|
|
|
import TableLoop from '@/components/common/table-loop/index.vue';
|
|
|
+import {
|
|
|
+ createDoubleBarOption,
|
|
|
+ createRingPieOption,
|
|
|
+ createCakePieOption,
|
|
|
+} from '@/utils/chart';
|
|
|
const curTimeRange = ref([]);
|
|
|
-const colorList = [
|
|
|
- '#47A2FF ',
|
|
|
- '#53C8D1',
|
|
|
- '#59CB74',
|
|
|
- '#FBD444',
|
|
|
- '#7F6AAD',
|
|
|
- '#585247',
|
|
|
- '#ff0000',
|
|
|
-];
|
|
|
-const options1 = computed(() => ({
|
|
|
- tooltip: {
|
|
|
- trigger: 'item',
|
|
|
- },
|
|
|
- legend: {
|
|
|
- orient: 'vertical',
|
|
|
- right: '3%',
|
|
|
- top: 'center',
|
|
|
- icon: 'circle',
|
|
|
- data: ['教务处', '研究生'],
|
|
|
- textStyle: {
|
|
|
- color: '#595959',
|
|
|
- },
|
|
|
- },
|
|
|
- color: colorList,
|
|
|
- series: [
|
|
|
- {
|
|
|
- name: '客户类型',
|
|
|
- type: 'pie',
|
|
|
- radius: [40, 60],
|
|
|
- center: ['35%', '50%'],
|
|
|
- label: {
|
|
|
- position: 'center',
|
|
|
- formatter: () => {
|
|
|
- return '总数\n{total|300}';
|
|
|
- },
|
|
|
- rich: {
|
|
|
- total: {
|
|
|
- fontSize: 16,
|
|
|
- color: '#262626',
|
|
|
- },
|
|
|
- },
|
|
|
- color: '#8c8c8c',
|
|
|
- fontSize: 12,
|
|
|
- lineHeight: 24,
|
|
|
- },
|
|
|
- labelLine: {
|
|
|
- show: false,
|
|
|
- },
|
|
|
- itemStyle: {
|
|
|
- borderWidth: 2,
|
|
|
- borderColor: '#fff',
|
|
|
- },
|
|
|
- data: [
|
|
|
- { name: '教务处', value: 230 },
|
|
|
- { name: '研究生', value: 120 },
|
|
|
- ],
|
|
|
- },
|
|
|
+
|
|
|
+const options1 = createRingPieOption({
|
|
|
+ data: [
|
|
|
+ { name: '教务处', value: 230 },
|
|
|
+ { name: '研究生', value: 120 },
|
|
|
],
|
|
|
-}));
|
|
|
+ title: '总数',
|
|
|
+ center: ['30%', '50%'],
|
|
|
+ seriesName: '客户类型',
|
|
|
+});
|
|
|
|
|
|
-const createDoubleBarOption = ({ legendData, xData, yDatas }) => {
|
|
|
- return {
|
|
|
- tooltip: {
|
|
|
- trigger: 'axis',
|
|
|
- },
|
|
|
- legend: [
|
|
|
- {
|
|
|
- icon: 'react',
|
|
|
- right: '3%',
|
|
|
- top: '3%',
|
|
|
- textStyle: {
|
|
|
- color: '#595959',
|
|
|
- fontSize: 12,
|
|
|
- },
|
|
|
- itemWidth: 8,
|
|
|
- itemHeight: 8,
|
|
|
- data: legendData,
|
|
|
- },
|
|
|
- ],
|
|
|
- grid: {
|
|
|
- top: '22%',
|
|
|
- right: '3%',
|
|
|
- left: '16%',
|
|
|
- bottom: '10%',
|
|
|
- },
|
|
|
- xAxis: [
|
|
|
- {
|
|
|
- type: 'category',
|
|
|
- data: xData,
|
|
|
- axisLine: {
|
|
|
- show: false,
|
|
|
- },
|
|
|
- axisTick: {
|
|
|
- show: false,
|
|
|
- },
|
|
|
- axisLabel: {
|
|
|
- margin: 6,
|
|
|
- color: '#8c8c8c',
|
|
|
- textStyle: {
|
|
|
- fontSize: 12,
|
|
|
- },
|
|
|
- },
|
|
|
- },
|
|
|
- ],
|
|
|
- yAxis: [
|
|
|
- {
|
|
|
- axisLabel: {
|
|
|
- formatter: '{value}',
|
|
|
- color: '#8c8c8c',
|
|
|
- textStyle: {
|
|
|
- fontSize: 12,
|
|
|
- },
|
|
|
- },
|
|
|
- axisLine: {
|
|
|
- show: false,
|
|
|
- },
|
|
|
- axisTick: {
|
|
|
- show: false,
|
|
|
- },
|
|
|
- },
|
|
|
- ],
|
|
|
- series: [
|
|
|
- {
|
|
|
- name: '当期',
|
|
|
- type: 'bar',
|
|
|
- data: yDatas[0],
|
|
|
- barWidth: '12px',
|
|
|
- itemStyle: {
|
|
|
- normal: {
|
|
|
- color: '#4080FF',
|
|
|
- },
|
|
|
- },
|
|
|
- },
|
|
|
- {
|
|
|
- name: '同期',
|
|
|
- type: 'bar',
|
|
|
- data: yDatas[1],
|
|
|
- barWidth: '12px',
|
|
|
- itemStyle: {
|
|
|
- normal: {
|
|
|
- color: '#23C343',
|
|
|
- },
|
|
|
- },
|
|
|
- },
|
|
|
- ],
|
|
|
- };
|
|
|
-};
|
|
|
const options2 = createDoubleBarOption({
|
|
|
legendData: ['当期', '同期'],
|
|
|
xData: ['23-01', '23-02', '23-03', '23-04', '23-05'],
|
|
@@ -227,52 +180,14 @@ const options2 = createDoubleBarOption({
|
|
|
],
|
|
|
});
|
|
|
|
|
|
-const options4 = computed(() => ({
|
|
|
- color: [
|
|
|
- '#37a2da',
|
|
|
- '#32c5e9',
|
|
|
- '#9fe6b8',
|
|
|
- '#ffdb5c',
|
|
|
- '#ff9f7f',
|
|
|
- '#fb7293',
|
|
|
- '#e7bcf3',
|
|
|
- '#8378ea',
|
|
|
- ],
|
|
|
- tooltip: {
|
|
|
- trigger: 'item',
|
|
|
- formatter: '{a} <br/>{b} : {c} ({d}%)',
|
|
|
- },
|
|
|
- toolbox: {
|
|
|
- show: true,
|
|
|
- },
|
|
|
- legend: {
|
|
|
- type: 'scroll',
|
|
|
- orient: 'vertical',
|
|
|
- right: '3%',
|
|
|
- top: 'center',
|
|
|
- textStyle: {
|
|
|
- color: '#8C8C8C',
|
|
|
- },
|
|
|
- // height: 150,
|
|
|
- },
|
|
|
- series: [
|
|
|
- {
|
|
|
- name: '供应商派单分布',
|
|
|
- type: 'pie',
|
|
|
- radius: [0, 60],
|
|
|
- center: ['35%', '50%'],
|
|
|
- data: [
|
|
|
- { value: 20, name: '国宝' },
|
|
|
- { value: 30, name: '治安' },
|
|
|
- { value: 30, name: 'rose7' },
|
|
|
- { value: 40, name: 'rose8' },
|
|
|
- ],
|
|
|
- label: {
|
|
|
- show: false,
|
|
|
- },
|
|
|
- },
|
|
|
+const options4 = createCakePieOption({
|
|
|
+ data: [
|
|
|
+ { value: 20, name: '国宝' },
|
|
|
+ { value: 30, name: '治安' },
|
|
|
+ { value: 30, name: 'rose7' },
|
|
|
+ { value: 40, name: 'rose8' },
|
|
|
],
|
|
|
-}));
|
|
|
+});
|
|
|
</script>
|
|
|
|
|
|
<style lang="less" scoped>
|
|
@@ -283,7 +198,7 @@ const options4 = computed(() => ({
|
|
|
overflow: auto;
|
|
|
.scroll-content {
|
|
|
height: 100%;
|
|
|
- min-height: 450px;
|
|
|
+ min-height: 600px;
|
|
|
}
|
|
|
.row1 {
|
|
|
height: calc((100% - 30px) * 2 / 3 + 15px);
|
|
@@ -351,6 +266,50 @@ const options4 = computed(() => ({
|
|
|
}
|
|
|
.chart-wrap {
|
|
|
height: calc(100% - 20px);
|
|
|
+ &.service-box {
|
|
|
+ display: flex;
|
|
|
+ flex-wrap: wrap;
|
|
|
+ justify-content: space-between;
|
|
|
+ align-content: start;
|
|
|
+ }
|
|
|
+ .service-item {
|
|
|
+ height: 54px;
|
|
|
+ width: calc(50% - 8px);
|
|
|
+ margin-bottom: 8px;
|
|
|
+ padding: 6px 8px;
|
|
|
+ background-color: #f7f7f7;
|
|
|
+ border-radius: 2px;
|
|
|
+
|
|
|
+ .head {
|
|
|
+ font-size: 12px;
|
|
|
+ color: #262626;
|
|
|
+ }
|
|
|
+ .body {
|
|
|
+ font-size: 12px;
|
|
|
+ .label {
|
|
|
+ color: #8c8c8c;
|
|
|
+ }
|
|
|
+ .status {
|
|
|
+ color: #ff7d00;
|
|
|
+ &.finished {
|
|
|
+ color: #00b42a;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .process-box {
|
|
|
+ flex: 1;
|
|
|
+ margin-left: 30px;
|
|
|
+ background-color: #d9d9d9;
|
|
|
+ height: 6px;
|
|
|
+ border-radius: 3px;
|
|
|
+ width: 90%;
|
|
|
+ overflow: hidden;
|
|
|
+ .process {
|
|
|
+ background-color: #4080ff;
|
|
|
+ height: 100%;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|