质量管理
This commit is contained in:
@@ -0,0 +1,279 @@
|
||||
<!--
|
||||
filename: pieChart.vue
|
||||
author: liubin
|
||||
date: 2023-09-06 15:02:49
|
||||
description: 饼图
|
||||
-->
|
||||
|
||||
<template>
|
||||
<div class="chart-grid-item" style="overflow: inherit">
|
||||
<div
|
||||
class="pie-chart"
|
||||
ref="pieChart"
|
||||
style="overflow: inherit;"
|
||||
:data-eqname="value.equipmentName || 'Default'"></div>
|
||||
<div class="data-view">
|
||||
<div class="data-view__item">
|
||||
<!-- <div class="data-view__item__value">111</div> -->
|
||||
<div class="data-view__item__value">{{ textData.workTime }}</div>
|
||||
<div class="data-view__item__title blue">工作时长</div>
|
||||
</div>
|
||||
<div class="data-view__item">
|
||||
<!-- <div class="data-view__item__value">22</div> -->
|
||||
<div class="data-view__item__value">{{ textData.stopTime }}</div>
|
||||
<div class="data-view__item__title green">停机时长</div>
|
||||
</div>
|
||||
<div class="data-view__item">
|
||||
<!-- <div class="data-view__item__value">10</div> -->
|
||||
<div class="data-view__item__value">{{ textData.downTime }}</div>
|
||||
<div class="data-view__item__title purple">故障时长</div>
|
||||
</div>
|
||||
<div class="data-view__item">
|
||||
<!-- <div class="data-view__item__value">100%</div> -->
|
||||
<div class="data-view__item__value">{{ textData.peEfficiency }}</div>
|
||||
<div class="data-view__item__title yellow">速度开动率</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import * as echarts from 'echarts';
|
||||
|
||||
export default {
|
||||
name: 'pieChart',
|
||||
components: {},
|
||||
props: ['value'],
|
||||
data() {
|
||||
return {
|
||||
chart: null,
|
||||
textData: {
|
||||
workTime: '',
|
||||
downTime: '',
|
||||
stopTime: '',
|
||||
peEfficiency: '',
|
||||
},
|
||||
config: {
|
||||
title: {
|
||||
text: '产线1', //<=========
|
||||
top: '35%',
|
||||
left: '49%',
|
||||
textAlign: 'center',
|
||||
textStyle: {
|
||||
fontSize: 18,
|
||||
},
|
||||
subtext: '设备', //<=========
|
||||
subtextStyle: {
|
||||
fontSize: 14,
|
||||
},
|
||||
},
|
||||
color: ['#3da8fd', '#8ef0ab', '#6b5cfd', '#FFC72A', 'transparent'],
|
||||
grid: {
|
||||
top: 0,
|
||||
left: 0,
|
||||
right: 0,
|
||||
bottom: 0,
|
||||
},
|
||||
tooltip: {
|
||||
trigger: 'item',
|
||||
},
|
||||
legend: {
|
||||
show: false,
|
||||
top: '0%',
|
||||
left: 'center',
|
||||
textStyle: {
|
||||
fontSize: 10,
|
||||
},
|
||||
itemWidth: 10,
|
||||
itemHeight: 10,
|
||||
},
|
||||
series: [
|
||||
// 嵌套环形图
|
||||
{
|
||||
// 外环
|
||||
name: '',
|
||||
type: 'pie',
|
||||
radius: ['75%', '90%'],
|
||||
center: ['50%', '48%'],
|
||||
label: {
|
||||
show: false,
|
||||
},
|
||||
data: [
|
||||
//<=========
|
||||
{ name: '工作时长', value: 1048 },
|
||||
{ name: '停机时长', value: 735 },
|
||||
{ name: '故障时长', value: 580 },
|
||||
],
|
||||
},
|
||||
{
|
||||
// 内环
|
||||
name: '',
|
||||
type: 'pie',
|
||||
center: ['50%', '48%'],
|
||||
radius: ['60%', '75%'],
|
||||
itemStyle: {
|
||||
borderRadius: 10,
|
||||
},
|
||||
label: {
|
||||
show: false,
|
||||
},
|
||||
data: [
|
||||
//<=========
|
||||
{ name: '总', value: 3000 },
|
||||
{ name: '', value: 1400 },
|
||||
],
|
||||
},
|
||||
// {
|
||||
// name: this.value.equipmentName || 'Default',
|
||||
// type: 'pie',
|
||||
// radius: ['40%', '75%'],
|
||||
// avoidLabelOverlap: false,
|
||||
// label: {
|
||||
// show: false,
|
||||
// position: 'center',
|
||||
// },
|
||||
// data: ['workTime', 'stopTime', 'downTime'].map((v, index) => ({
|
||||
// name: ['工作时长', '停机时长', '故障时长'][index],
|
||||
// value: this.value[v],
|
||||
// })),
|
||||
// // data: [
|
||||
// // { value: 1048, name: 'Search Engine' },
|
||||
// // { value: 735, name: 'Direct' },
|
||||
// // { value: 580, name: 'Email' },
|
||||
// // { value: 484, name: 'Union Ads' },
|
||||
// // { value: 300, name: 'Video Ads' },
|
||||
// // ],
|
||||
// },
|
||||
],
|
||||
},
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
console.log('value', this.value);
|
||||
if (!this.chart) {
|
||||
this.chart = echarts.init(this.$refs.pieChart);
|
||||
this.$nextTick(() => {
|
||||
this.chart.setOption(this.config);
|
||||
});
|
||||
}
|
||||
},
|
||||
beforeDestroy() {
|
||||
if (this.chart) this.chart.dispose();
|
||||
},
|
||||
watch: {
|
||||
value: {
|
||||
handler(val) {
|
||||
this.updateConfig(val);
|
||||
if (this.chart) this.chart.setOption(this.config);
|
||||
},
|
||||
deep: true,
|
||||
immediate: true,
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
updateConfig(item) {
|
||||
const {
|
||||
lineName, // 产线
|
||||
equipmentName, // 设备
|
||||
downTime, // 故障时长(h)
|
||||
stopTime, // 停机时长(h)
|
||||
workTime, // 工作时长(h)
|
||||
peEfficiency, // 速度开动率
|
||||
timeEfficiency, // 时间开动率
|
||||
//===============//
|
||||
sectionName,
|
||||
workRate,
|
||||
stopRate,
|
||||
downRate,
|
||||
realProcSpeed,
|
||||
designProcSpeed,
|
||||
oee,
|
||||
teep,
|
||||
downCount,
|
||||
mtbf,
|
||||
mttr,
|
||||
} = item;
|
||||
this.config.title.text = lineName;
|
||||
this.config.title.subtext = equipmentName;
|
||||
this.config.series[0].data = [
|
||||
{ name: '工作时长', value: workTime },
|
||||
{ name: '停机时长', value: stopTime },
|
||||
{ name: '故障时长', value: downTime },
|
||||
];
|
||||
this.config.series[1].data = [
|
||||
{ name: '速度开动率', value: peEfficiency },
|
||||
{ name: '', value: Math.ceil(peEfficiency) - peEfficiency },
|
||||
];
|
||||
//
|
||||
this.textData = {
|
||||
workTime: +workTime.toFixed(2),
|
||||
stopTime: +stopTime.toFixed(2),
|
||||
downTime: +downTime.toFixed(2),
|
||||
peEfficiency: +peEfficiency.toFixed(2),
|
||||
};
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.chart-grid-item {
|
||||
padding: 12px;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.pie-chart {
|
||||
height: 1px;
|
||||
width: 100%;
|
||||
flex: 1;
|
||||
padding: 12px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.data-view {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.data-view__item {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
text-align: center;
|
||||
align-items: center;
|
||||
user-select: none;
|
||||
padding: 0 6px;
|
||||
}
|
||||
|
||||
.data-view__item:not(:last-child) {
|
||||
border-right: 1px solid #f1f1f1;
|
||||
}
|
||||
|
||||
.data-view__item__value {
|
||||
font-size: 16px;
|
||||
line-height: 24px;
|
||||
}
|
||||
|
||||
.data-view__item__title {
|
||||
font-size: 8px;
|
||||
line-height: 14px;
|
||||
}
|
||||
|
||||
.blue {
|
||||
color: #3da8fd;
|
||||
}
|
||||
|
||||
.green {
|
||||
color: #8ef0ab;
|
||||
}
|
||||
|
||||
.purple {
|
||||
color: #6b5cfd;
|
||||
}
|
||||
|
||||
.yellow {
|
||||
color: #ffc72a;
|
||||
}
|
||||
</style>
|
||||
576
src/views/quality/monitoring/equipmentTraceability/index.vue
Normal file
576
src/views/quality/monitoring/equipmentTraceability/index.vue
Normal file
@@ -0,0 +1,576 @@
|
||||
<!--
|
||||
filename: index.vue
|
||||
author: liubin
|
||||
date: 2023-09-04 09:34:52
|
||||
description: 设备效率分析
|
||||
-->
|
||||
|
||||
<template>
|
||||
<div class="app-container allow-overflow">
|
||||
<!-- 搜索工作栏 -->
|
||||
<SearchBar
|
||||
:formConfigs="searchBarFormConfig"
|
||||
ref="search-bar"
|
||||
@headBtnClick="handleSearchBarBtnClick" />
|
||||
|
||||
<el-row>
|
||||
<el-col class="custom-tabs">
|
||||
<el-tabs
|
||||
v-model="activeName"
|
||||
:stretch="true"
|
||||
@tab-click="handleTabClick">
|
||||
<el-tab-pane :label="'\u2002数据列表\u2002'" name="table">
|
||||
<!-- 列表 -->
|
||||
<base-table
|
||||
class="base-table__margin"
|
||||
:table-props="tableProps"
|
||||
:page="1"
|
||||
:limit="10"
|
||||
:table-data="list"
|
||||
@emitFun="handleEmitFun"></base-table>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane
|
||||
:label="'\u3000可视化\u3000'"
|
||||
name="graph"
|
||||
style="overflow: inherit">
|
||||
<div
|
||||
v-if="activeName == 'graph'"
|
||||
class="graph"
|
||||
style="
|
||||
overflow: inherit;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
position: relative;
|
||||
">
|
||||
<div class="blue-title">各设备加工数量</div>
|
||||
<div class="legend">
|
||||
<div class="legend-item">
|
||||
<span class="icon blue"></span>
|
||||
<span class="text">工作时长</span>
|
||||
</div>
|
||||
<div class="legend-item">
|
||||
<span class="icon green"></span>
|
||||
<span class="text">停机时长</span>
|
||||
</div>
|
||||
<div class="legend-item">
|
||||
<span class="icon purple"></span>
|
||||
<span class="text">故障时长</span>
|
||||
</div>
|
||||
<div class="legend-item">
|
||||
<span class="icon yellow"></span>
|
||||
<span class="text">速度开动率</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="graph-grid">
|
||||
<div class="bg-grid grid-line">
|
||||
<div
|
||||
class="grid-item"
|
||||
v-for="item in list.length"
|
||||
:key="item"></div>
|
||||
</div>
|
||||
|
||||
<div class="bg-grid grid-charts">
|
||||
<pie-chart
|
||||
v-for="item in list"
|
||||
:key="item.id"
|
||||
:value="item" />
|
||||
<!-- <pie-chart v-for="item in 5" :key="item" :value="item" /> -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
// import moment from 'moment';
|
||||
import basicPageMixin from '@/mixins/lb/basicPageMixin';
|
||||
import PieChart from './components/pieChart.vue';
|
||||
|
||||
export default {
|
||||
name: 'EfficiencyAnalysis',
|
||||
mixins: [basicPageMixin],
|
||||
components: { PieChart },
|
||||
props: {},
|
||||
data() {
|
||||
return {
|
||||
activeName: 'table',
|
||||
open: false,
|
||||
visualizationOpen: false,
|
||||
trendOpen: false,
|
||||
// tableBtn: [
|
||||
// this.$auth.hasPermi('base:equipment-group:update')
|
||||
// ? {
|
||||
// type: 'edit',
|
||||
// btnName: '修改',
|
||||
// }
|
||||
// : undefined,
|
||||
// this.$auth.hasPermi('base:equipment-group:delete')
|
||||
// ? {
|
||||
// type: 'delete',
|
||||
// btnName: '删除',
|
||||
// }
|
||||
// : undefined,
|
||||
// ].filter((v) => v),
|
||||
tableProps: [
|
||||
{ prop: 'factoryName', label: '工厂' },
|
||||
{ prop: 'lineName', label: '产线' },
|
||||
{ prop: 'sectionName', label: '工段' },
|
||||
{ prop: 'equipmentName', label: '设备' },
|
||||
{
|
||||
label: '有效时间',
|
||||
children: [
|
||||
{
|
||||
width: 128,
|
||||
prop: 'workTime',
|
||||
label: '工作时长[h]',
|
||||
},
|
||||
{
|
||||
width: 128,
|
||||
prop: 'workRate',
|
||||
label: '百分比[%]',
|
||||
filter: (val) => (val != null ? +val.toFixed(3) : '-'),
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
label: '关机时间',
|
||||
children: [
|
||||
{
|
||||
width: 128,
|
||||
prop: 'stopTime',
|
||||
label: '停机时长[h]',
|
||||
},
|
||||
{ width: 128, prop: 'stopRate', label: '百分比[%]' },
|
||||
],
|
||||
},
|
||||
{
|
||||
label: '中断损失',
|
||||
children: [
|
||||
{
|
||||
width: 128,
|
||||
prop: 'downTime',
|
||||
label: '故障时长[h]',
|
||||
filter: (val) => (val != null ? +val.toFixed(3) : '-'),
|
||||
},
|
||||
{ width: 128, prop: 'downRate', label: '百分比[%]' },
|
||||
{
|
||||
width: 128,
|
||||
prop: 'timeEfficiency',
|
||||
label: '时间开动率',
|
||||
filter: (val) => (val != null ? +val.toFixed(3) : '-'),
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
label: '速度损失',
|
||||
children: [
|
||||
{
|
||||
width: 128,
|
||||
prop: 'realProcSpeed',
|
||||
label: '实际加工速度',
|
||||
},
|
||||
{
|
||||
width: 128,
|
||||
prop: 'designProcSpeed',
|
||||
label: '理论加工速度',
|
||||
},
|
||||
{
|
||||
width: 128,
|
||||
prop: 'peEfficiency',
|
||||
label: '速度开动率',
|
||||
filter: (val) => (val != null ? +val.toFixed(3) : '-'),
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
prop: 'oee',
|
||||
label: 'OEE',
|
||||
filter: (val) => (val != null ? +val.toFixed(3) : '-'),
|
||||
},
|
||||
{
|
||||
prop: 'teep',
|
||||
label: 'TEEP',
|
||||
filter: (val) => (val != null ? +val.toFixed(3) : '-'),
|
||||
},
|
||||
// {
|
||||
// _action: 'view-trend',
|
||||
// label: '趋势',
|
||||
// ,
|
||||
// subcomponent: {
|
||||
// props: ['injectData'],
|
||||
// render: function (h) {
|
||||
// const _this = this;
|
||||
// return h(
|
||||
// 'el-button',
|
||||
// {
|
||||
// props: { type: 'text' },
|
||||
// on: {
|
||||
// click: function () {
|
||||
// console.log('inejctdata', _this.injectData);
|
||||
// _this.$emit('emitData', {
|
||||
// action: _this.injectData._action,
|
||||
// // value: _this.injectData.id,
|
||||
// value: _this.injectData,
|
||||
// });
|
||||
// },
|
||||
// },
|
||||
// },
|
||||
// '查看趋势'
|
||||
// );
|
||||
// },
|
||||
// },
|
||||
// },
|
||||
],
|
||||
searchBarFormConfig: [
|
||||
{
|
||||
type: 'select',
|
||||
label: '工单',
|
||||
placeholder: '请选择工单',
|
||||
param: 'workOrderId',
|
||||
selectOptions: [],
|
||||
},
|
||||
// {
|
||||
// type: 'select',
|
||||
// label: '产线',
|
||||
// placeholder: '请选择产线',
|
||||
// param: 'lineId',
|
||||
// selectOptions: [],
|
||||
// },
|
||||
// 选项切换
|
||||
// {
|
||||
// type: 'select',
|
||||
// label: '时间类型',
|
||||
// param: 'dateFilterType',
|
||||
// defaultSelect: 0,
|
||||
// selectOptions: [
|
||||
// { id: 0, name: '按时间段' },
|
||||
// { id: 1, name: '按日期' },
|
||||
// ],
|
||||
// index: 2,
|
||||
// extraOptions: [
|
||||
{
|
||||
// parent: 'dateFilterType',
|
||||
// 时间段选择
|
||||
type: 'datePicker',
|
||||
// label: '时间段',
|
||||
dateType: 'daterange',
|
||||
format: 'yyyy-MM-dd',
|
||||
valueFormat: 'yyyy-MM-dd HH:mm:ss',
|
||||
defaultTime: ['00:00:00', '00:00:00'],
|
||||
rangeSeparator: '-',
|
||||
startPlaceholder: '开始时间',
|
||||
endPlaceholder: '结束时间',
|
||||
param: 'timerange',
|
||||
},
|
||||
// {
|
||||
// parent: 'dateFilterType',
|
||||
// // 日期选择
|
||||
// type: 'datePicker',
|
||||
// // label: '日期',
|
||||
// dateType: 'date',
|
||||
// placeholder: '选择日期',
|
||||
// format: 'yyyy-MM-dd',
|
||||
// valueFormat: 'yyyy-MM-dd',
|
||||
// param: 'timeday',
|
||||
// },
|
||||
// ],
|
||||
// },
|
||||
{
|
||||
type: 'button',
|
||||
btnName: '查询',
|
||||
name: 'search',
|
||||
color: 'primary',
|
||||
},
|
||||
// {
|
||||
// type: 'separate',
|
||||
// },
|
||||
// {
|
||||
// type: 'button',
|
||||
// btnName: '设备可视化',
|
||||
// name: 'visualization',
|
||||
// plain: true,
|
||||
// color: 'success',
|
||||
// },
|
||||
// {
|
||||
// type: 'button',
|
||||
// btnName: 'OEE',
|
||||
// name: 'add',
|
||||
// plain: true,
|
||||
// color: 'success',
|
||||
// },
|
||||
// {
|
||||
// type: 'button',
|
||||
// btnName: 'TEEP',
|
||||
// name: 'add',
|
||||
// plain: true,
|
||||
// color: 'warning',
|
||||
// },
|
||||
],
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
// lineId: null,
|
||||
workOrderId: null,
|
||||
recordTime: [],
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
list: [],
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getWorkOrder()
|
||||
// this.getLine();
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
/** 准备工厂数据 */
|
||||
async getWorkOrder() {
|
||||
console.log(1111);
|
||||
const { code, data } = await this.$axios({
|
||||
url: '/base/core-work-order/listbyfilter',
|
||||
method: 'get',
|
||||
});
|
||||
if (code == 0) {
|
||||
console.log('1111', data);
|
||||
this.searchBarFormConfig[0].selectOptions = data.map((item) => {
|
||||
return {
|
||||
name: item.name,
|
||||
id: item.id,
|
||||
};
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
// /** 准备产线数据 */
|
||||
// async getLine() {
|
||||
// const { code, data } = await this.$axios({
|
||||
// url: '/base/production-line/listAll',
|
||||
// method: 'get',
|
||||
// });
|
||||
// if (code == 0) {
|
||||
// this.searchBarFormConfig[1].selectOptions = data.map((item) => {
|
||||
// return {
|
||||
// name: item.name,
|
||||
// id: item.id,
|
||||
// };
|
||||
// });
|
||||
// }
|
||||
// },
|
||||
|
||||
/** 覆盖 handleEmitFun 的默认实现 */
|
||||
handleEmitFun({ action, value }) {
|
||||
switch (action) {
|
||||
case 'view-trend':
|
||||
const { id } = value;
|
||||
this.open = true;
|
||||
this.trendOpen = true;
|
||||
break;
|
||||
}
|
||||
},
|
||||
/** 查询列表 */
|
||||
async getList() {
|
||||
this.loading = true;
|
||||
const { code, data } = await this.$axios({
|
||||
url: '/analysis/equipment-analysis/efficiency',
|
||||
method: 'get',
|
||||
params: this.queryParams,
|
||||
});
|
||||
if (code == 0) {
|
||||
this.list = data;
|
||||
}
|
||||
},
|
||||
|
||||
handleSearchBarBtnClick({ btnName, ...payload }) {
|
||||
console.log('handleSearchBarBtnClick', btnName, payload);
|
||||
if (btnName == 'visualization') {
|
||||
// 可视化
|
||||
this.visualizationOpen = true;
|
||||
this.open = true;
|
||||
}
|
||||
if (btnName == 'search') {
|
||||
this.queryParams.workOrderId = payload.workOrderId || null;
|
||||
// this.queryParams.lineId = payload.lineId || null;
|
||||
if (0 == payload.dateFilterType) {
|
||||
this.queryParams.recordTime = payload.timerange;
|
||||
} else if (1 == payload.dateFilterType) {
|
||||
this.queryParams.recordTime = [
|
||||
`${payload.timeday} 00:00:00`,
|
||||
`${payload.timeday} 23:59:59`,
|
||||
];
|
||||
}
|
||||
} else {
|
||||
this.queryParams.recordTime = null;
|
||||
}
|
||||
this.getList();
|
||||
},
|
||||
|
||||
cancel() {
|
||||
this.open = false;
|
||||
},
|
||||
|
||||
closed() {
|
||||
this.visualizationOpen = false;
|
||||
this.trendOpen = false;
|
||||
},
|
||||
|
||||
submitForm() {},
|
||||
|
||||
handleTabClick() {},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.visualization {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(3, minmax(240px, 1fr));
|
||||
}
|
||||
|
||||
:deep(.custom-tabs) {
|
||||
.el-tabs__header {
|
||||
margin-bottom: 8px;
|
||||
display: inline-block;
|
||||
transform: translateY(-12px);
|
||||
}
|
||||
|
||||
.el-tabs__content {
|
||||
overflow: visible;
|
||||
}
|
||||
|
||||
.el-tabs__item {
|
||||
padding-left: 0 !important;
|
||||
padding-right: 0 !important;
|
||||
line-height: 36px !important;
|
||||
height: 36px;
|
||||
}
|
||||
}
|
||||
|
||||
.blue-title {
|
||||
position: relative;
|
||||
padding: 4px 0;
|
||||
padding-left: 12px;
|
||||
font-size: 14px;
|
||||
|
||||
&::before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 6px;
|
||||
height: 16px;
|
||||
width: 4px;
|
||||
border-radius: 1px;
|
||||
background: #0b58ff;
|
||||
}
|
||||
}
|
||||
|
||||
.graph-grid {
|
||||
margin-top: 8px;
|
||||
padding: 12px;
|
||||
position: relative;
|
||||
border-radius: 12px;
|
||||
border: 1px solid #ccc;
|
||||
// background: #0003;
|
||||
overflow: inherit;
|
||||
}
|
||||
.bg-grid {
|
||||
display: grid;
|
||||
place-content: center;
|
||||
grid-template-columns: repeat(4, minmax(280px, 1fr));
|
||||
grid-auto-columns: 280px;
|
||||
grid-auto-rows: 290px;
|
||||
overflow: inherit;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.grid-line::after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
top: -1px;
|
||||
left: -1px;
|
||||
width: calc(100% + 2px);
|
||||
height: calc(100% + 2px);
|
||||
display: inline-block;
|
||||
border: 8px solid #fff;
|
||||
}
|
||||
|
||||
.grid-charts {
|
||||
position: absolute;
|
||||
width: calc(100% - 24px);
|
||||
top: 12px;
|
||||
left: 12px;
|
||||
}
|
||||
|
||||
.grid-item {
|
||||
border: 1px solid #ccc;
|
||||
}
|
||||
|
||||
.grid-item:not(:first-child) {
|
||||
border-left: 0;
|
||||
border-top: 0;
|
||||
}
|
||||
|
||||
.legend {
|
||||
position: absolute;
|
||||
top: 8px;
|
||||
right: 12px;
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.legend .legend-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-left: 12px;
|
||||
}
|
||||
|
||||
.legend .legend-item .icon {
|
||||
width: 10px;
|
||||
height: 10px;
|
||||
border-radius: 1px;
|
||||
margin-right: 4px;
|
||||
margin-top: 1px;
|
||||
}
|
||||
|
||||
.legend .legend-item .text {
|
||||
color: #8c8c8c;
|
||||
}
|
||||
|
||||
.blue {
|
||||
background-color: #3da8fd;
|
||||
}
|
||||
|
||||
.green {
|
||||
background-color: #8ef0ab;
|
||||
}
|
||||
|
||||
.purple {
|
||||
background-color: #6b5cfd;
|
||||
}
|
||||
|
||||
.yellow {
|
||||
background-color: #ffc72a;
|
||||
}
|
||||
|
||||
@media screen and (max-width: 1390px) {
|
||||
.bg-grid {
|
||||
grid-template-columns: repeat(3, minmax(280px, 1fr));
|
||||
}
|
||||
}
|
||||
|
||||
@media screen and (max-width: 1190px) {
|
||||
.bg-grid {
|
||||
grid-template-columns: repeat(2, minmax(280px, 1fr));
|
||||
}
|
||||
}
|
||||
|
||||
@media screen and (max-width: 640px) {
|
||||
.bg-grid {
|
||||
grid-template-columns: repeat(1, minmax(280px, 1fr));
|
||||
}
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user