修改bug

This commit is contained in:
‘937886381’
2024-03-26 09:42:51 +08:00
parent b593bcee5a
commit 7b0f03b76f
37 changed files with 234 additions and 3123 deletions

View File

@@ -1,127 +0,0 @@
<template>
<div>
<div :id="id" :class="className" :style="{ height: height, width:width}" />
</div>
</template>
<script>
import echarts from 'echarts'
import 'echarts/theme/macarons' // echarts theme
import resize from './mixins/resize'
export default {
name: 'OverviewBar',
mixins: [resize],
props: {
id: {
type: String,
default: 'OverviewLine'
},
className: {
type: String,
default: 'chart'
},
width: {
type: String,
default: '100%'
},
beilv: {
type: Number,
default: 1
},
height: {
type: String,
default: '300px'
},
showLegend: {
type: Boolean,
default: false
},
legendData: {
type: Array,
default: () => []
}
},
data() {
return {
chart: null
}
},
mounted() {
this.$nextTick(() => {
this.initChart()
})
},
beforeDestroy() {
if (!this.chart) {
return
}
this.chart.dispose()
this.chart = null
},
methods: {
initChart() {
this.chart = echarts.init(document.getElementById(this.id))
this.chart.setOption({
tooltip: {
trigger: 'axis',
axisPointer: { // 坐标轴指示器,坐标轴触发有效
type: 'shadow' // 默认为直线,可选为:'line' | 'shadow'
}
},
grid: {
top: 10,
left: '2%',
right: '2%',
bottom: '3%',
containLabel: true
},
xAxis: {
type: 'category',
axisLine: {
lineStyle: {
type: 'solid',
color: '#123341', // 左边线的颜色
width: '1'// 坐标线的宽度
}
},
axisLabel: {
textStyle: {
color: '#666a74' // 坐标值得具体的颜色
}
},
data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
},
yAxis: {
axisLine: {
lineStyle: {
type: 'solid',
color: '#123341', // 左边线的颜色
width: '1'// 坐标线的宽度
}
},
axisLabel: {
textStyle: {
color: '#666a74' // 坐标值得具体的颜色
}
},
type: 'value'
},
series: [
{
data: [120, 200, 150, 80, 70, 110, 130],
type: 'bar',
showBackground: true,
backgroundStyle: {
color: 'rgba(180, 180, 180, 0.2)'
}
}
]
})
}
}
}
</script>

View File

@@ -1,158 +0,0 @@
<!--
* @Author: zhp
* @Date: 2022-01-23 16:50:39
* @LastEditTime: 2022-01-25 15:43:52
* @LastEditors: zhp
* @Description:
-->
<template>
<div>
<div :id="id" :class="className" :style="{ height: height, width:width}" />
</div>
</template>
<script>
import echarts from 'echarts'
import 'echarts/theme/macarons' // echarts theme
import resize from '../mixins/resize'
export default {
name: 'OverviewBar',
mixins: [resize],
props: {
id: {
type: String,
default: 'OverviewLine'
},
className: {
type: String,
default: 'chart'
},
width: {
type: String,
default: '100%'
},
beilv: {
type: Number,
default: 1
},
height: {
type: String,
default: '300px'
},
showLegend: {
type: Boolean,
default: false
},
legendData: {
type: Array,
default: () => []
}
},
data() {
return {
chart: null
}
},
mounted() {
this.$nextTick(() => {
this.initChart()
})
},
beforeDestroy() {
if (!this.chart) {
return
}
this.chart.dispose()
this.chart = null
},
methods: {
initChart() {
this.chart = echarts.init(document.getElementById(this.id))
this.chart.setOption({
tooltip: {
trigger: 'axis',
axisPointer: { // 坐标轴指示器,坐标轴触发有效
type: 'shadow' // 默认为直线,可选为:'line' | 'shadow'
}
},
grid: {
top: '10%',
left: '2%',
right: '2%',
bottom: '3%',
containLabel: true
},
legend: {
itemHeight: 10,
x: 'right', // 可设定图例在左、右、居中
y: 'top', // 可设定图例在上、下、居中
itemWidth: 10,
show: this.showLegend,
data: this.legendData,
right: '1%',
textStyle: {
fontSize: 12,
color: '#ced1d5'
}
},
xAxis: {
type: 'category',
axisLine: {
lineStyle: {
type: 'solid',
color: '#123341', // 左边线的颜色
width: '1'// 坐标线的宽度
}
},
axisLabel: {
textStyle: {
color: '#666a74' // 坐标值得具体的颜色
}
},
data: ['钢一线', '钢二线', '钢三线', '钢四线', '钢五线', '钢六线']
},
yAxis: {
type: 'value',
scale: true,
max: 12,
min: 0,
splitNumber: 5,
splitLine: {
lineStyle: {
color: '#213259'
}
},
boundaryGap: [0.2, 0.2],
axisLabel: {
formatter: '{value} h',
textStyle: {
color: 'white'
}
}
},
series: [
{
name: this.legendData[0].name,
type: 'bar',
data: this.legendData[0].data,
markLine: {
data: [{ type: 'average', name: 'Avg' }]
},
barWidth: '10%',
itemStyle: this.legendData[0].itemStyle
},
{
name: this.legendData[1].name,
type: 'bar',
data: this.legendData[1].data,
barWidth: '10%',
itemStyle: this.legendData[1].itemStyle
}
]
})
}
}
}
</script>

View File

@@ -1,158 +0,0 @@
<!--
* @Author: zhp
* @Date: 2022-01-23 16:50:39
* @LastEditTime: 2022-01-25 15:44:26
* @LastEditors: zhp
* @Description:
-->
<template>
<div>
<div :id="id" :class="className" :style="{ height: height, width:width}" />
</div>
</template>
<script>
import echarts from 'echarts'
import 'echarts/theme/macarons' // echarts theme
import resize from '../mixins/resize'
export default {
name: 'OverviewBar',
mixins: [resize],
props: {
id: {
type: String,
default: 'OverviewLine'
},
className: {
type: String,
default: 'chart'
},
width: {
type: String,
default: '100%'
},
beilv: {
type: Number,
default: 1
},
height: {
type: String,
default: '300px'
},
showLegend: {
type: Boolean,
default: false
},
legendData: {
type: Array,
default: () => []
}
},
data() {
return {
chart: null
}
},
mounted() {
this.$nextTick(() => {
this.initChart()
})
},
beforeDestroy() {
if (!this.chart) {
return
}
this.chart.dispose()
this.chart = null
},
methods: {
initChart() {
this.chart = echarts.init(document.getElementById(this.id))
this.chart.setOption({
tooltip: {
trigger: 'axis',
axisPointer: { // 坐标轴指示器,坐标轴触发有效
type: 'shadow' // 默认为直线,可选为:'line' | 'shadow'
}
},
grid: {
top: '10%',
left: '2%',
right: '2%',
bottom: '3%',
containLabel: true
},
legend: {
itemHeight: 10,
x: 'right', // 可设定图例在左、右、居中
y: 'top', // 可设定图例在上、下、居中
itemWidth: 10,
show: this.showLegend,
data: this.legendData,
right: '1%',
textStyle: {
fontSize: 12,
color: '#ced1d5'
}
},
xAxis: {
type: 'category',
axisLine: {
lineStyle: {
type: 'solid',
color: '#123341', // 左边线的颜色
width: '1'// 坐标线的宽度
}
},
axisLabel: {
textStyle: {
color: '#666a74' // 坐标值得具体的颜色
}
},
data: ['钢一线', '钢二线', '钢三线', '钢四线', '钢五线', '钢六线']
},
yAxis: {
type: 'value',
scale: true,
max: 12,
min: 0,
splitNumber: 5,
splitLine: {
lineStyle: {
color: '#213259'
}
},
boundaryGap: [0.2, 0.2],
axisLabel: {
formatter: '{value} h',
textStyle: {
color: 'white'
}
}
},
series: [
{
name: this.legendData[0].name,
type: 'bar',
data: this.legendData[0].data,
markLine: {
data: [{ type: 'average', name: 'Avg' }]
},
barWidth: '10%',
itemStyle: this.legendData[0].itemStyle
},
{
name: this.legendData[1].name,
type: 'bar',
data: this.legendData[1].data,
barWidth: '10%',
itemStyle: this.legendData[1].itemStyle
}
]
})
}
}
}
</script>

View File

@@ -1,144 +0,0 @@
<!--
* @Author: gtz
* @Date: 2022-01-19 15:58:17
* @LastEditors: zhp
* @LastEditTime: 2022-01-24 09:01:07
* @Description: file content
* @FilePath: \mt-bus-fe\src\views\OperationalOverview\components\baseContainer\index.vue
-->
<template>
<div class="base-container" :style="{height: height + 'px', fontSize: 12 + 'px'}">
<div class="line" />
<div class="line line-vertical" />
<div class="line line-right" />
<div class="line line-right-vertical" />
<div class="line line-bottom" />
<div class="line line-bottom-vertical" />
<div class="line line-bottom-right" />
<div class="line line-bottom-right-vertical" />
<div class="bar-item">
<div v-if="title" class="bar-title">
<span>
<svg-icon :icon-class="titleIcon" style="font-size: 1.5em; position: relative; top: .08em" />
{{ title }}
</span>
</div>
<div class="bar-content">
<slot />
</div>
</div>
</div>
</template>
<script>
export default {
name: 'BaseContainer',
props: {
title: {
type: String,
default: ''
},
titleIcon: {
type: String,
default: ''
},
height: {
type: Number,
default: 200
},
baseSize: {
type: Number,
default: 12
},
beilv: {
type: Number,
default: 1
}
},
data() {
return {
curIndex: 0
}
},
mounted() {
},
methods: {
changeTab(num) {
this.curIndex = num
this.$emit('tabSelect', num)
}
}
}
</script>
<style lang="scss">
.base-container {
color: #fff;
width: 100%;
background-color: rgba($color: #061027, $alpha: 0.15);
position: relative;
padding: .5em;
border: 2px solid;
border-image: linear-gradient(90deg, rgba(82, 255, 241, 0.6), rgba(95, 190, 249, 0), rgba(82, 255, 241, 0.6)) 2 2;
.line {
position: absolute;
border-top: 4px solid #52FFF1;
width: 2em;
top: -.25em;
left: -.25em;
&-vertical {
top: calc(-5em / 12);
left: calc(-1em / 12);
transform: rotate(90deg);
transform-origin: left;
}
&-right {
top: -.25em;
right: -.25em;
left: inherit;
}
&-right-vertical {
top: calc(-5em / 12);
right: calc(-1em / 12);
left: inherit;
transform: rotate(-90deg);
transform-origin: right;
}
&-bottom {
top: inherit;
left: -.25em;
bottom: -.25em;
}
&-bottom-vertical {
top: inherit;
left: calc(-1em / 12);
bottom: calc(-5em / 12);
transform: rotate(-90deg);
transform-origin: left;
}
&-bottom-right {
top: inherit;
left: inherit;
right: -.25em;
bottom: -.25em;
}
&-bottom-right-vertical {
top: inherit;
left: inherit;
right: calc(-1em / 12);
bottom: calc(-5em / 12);
transform: rotate(90deg);
transform-origin: right;
}
}
.bar-title {
width: 100%;
color: #52FFF1;
font-size: 1.5em;
padding: .1em;
}
.bar-content{
padding: 1em;
}
}
</style>

View File

@@ -1,170 +0,0 @@
<!--
* @Date: 2020-12-14 09:07:03
* @LastEditors: zhp
* @LastEditTime: 2023-11-13 16:41:13
* @FilePath: \mt-bus-fe\src\views\OperationalOverview\components\ProductionAndOperationCenterCockpit\baseTable.vue
* @Description:
-->
<template>
<div class="visual-base-table-container">
<el-table
v-loading="isLoading"
:header-cell-style="{background:'rgba(79,114,136,0.29)',color:'#fff',height: 28 + 'px',padding: 0}"
:row-style="setRowStyle"
:data="renderData"
border
style="width: 100%; background: transparent"
>
<el-table-column
v-for="item in renderTableHeadList"
:key="item.prop"
:show-overflow-tooltip="showOverflow"
v-bind="item"
>
<template slot-scope="scope">
<component :is="item.subcomponent" v-if="item.subcomponent" :inject-data="{...scope.row, ...item}" @emitData="emitData" />
<span v-else>{{ scope.row[item.prop] | commonFilter(item.filter) }}</span>
</template>
</el-table-column>
<slot name="content" />
</el-table>
</div>
</template>
<script>
import { isObject, isString } from 'lodash'
export default {
name: 'BaseTable',
filters: {
commonFilter: (source, filterType = a => a) => {
return filterType(source)
}
},
props: {
tableData: {
type: Array,
required: true,
validator: val => val.filter(item => !isObject(item)).length === 0
},
tableConfig: {
type: Array,
required: true,
validator: val => val.filter(item => !isString(item.prop) || !isString(item.label)).length === 0
},
isLoading: {
type: Boolean,
required: false
},
page: {
type: Number,
required: false,
default: 1
},
limit: {
type: Number,
required: false,
default: 5
},
beilv: {
type: Number,
default: 1
},
showOverflow: {
type: Boolean,
default: true
}
},
data() {
return {
tableConfigBak: [],
selectedBox: new Array(20).fill(true)
}
},
computed: {
renderData() {
if (this.tableData && !this.tableData[0]._pageIndex) {
this.tableData.forEach((item, index) => {
item._pageIndex = (this.page - 1) * this.limit + index + 1
})
}
return this.tableData.slice((this.page - 1) * this.limit, this.page * this.limit)
},
renderTableHeadList() {
return this.tableConfig.filter((item, index) => {
return this.selectedBox[index]
})
}
},
beforeMount() {
this.selectedBox = new Array(20).fill(true)
},
// mounted() {
// this.tableConfigBak = cloneDeep(this.tableConfig).map(item => {
// return {
// ...item,
// selected: true
// }
// })
// },
methods: {
emitData(val) {
this.$emit('emitFun', val)
},
setRowStyle(v) {
if (v.rowIndex % 2 === 0) {
return {
background: 'rgba(76,97,123,0.2)',
color: '#fff',
height: 26 * this.beilv + 'px',
padding: 0
}
} else {
return {
background: 'rgba(79,114,136,0.29)',
color: '#fff',
height: 26 * this.beilv + 'px',
padding: 0
}
}
}
}
}
</script>
<style lang="scss">
@import "~@/styles/index.scss";
.visual-base-table-container {
.el-table {
border: 0;
}
.el-table::before,.el-table--border::after {
background-color: transparent;
}
.el-table th,td{
border-color: #0D1728 !important;
padding: 0;
}
.el-table tr {
background: transparent;
}
.el-table__row:hover > td {
background-color: rgba(79,114,136,0.29) !important;
}
.el-table__row--striped:hover > td {
background-color: rgba(79,114,136,0.29) !important;
}
}
// .setting {
// text-align: right;
// padding: 15px;
// .setting-box {
// width: 100px;
// }
// i {
// color: #aaa;
// @extend .pointer;
// }
// }
</style>

View File

@@ -1,31 +0,0 @@
<!--
* @Author: zhp
* @Date: 2022-01-23 21:02:57
* @LastEditTime: 2022-01-23 21:08:21
* @LastEditors: zhp
* @Description:
-->
<template>
<div
style=" width: 1em;
height: 1em;
border-radius: 50%;
margin:auto"
:style="{background:injectData.colour}"
/>
</template>
<script>
export default {
props: {
injectData: {
type: Object,
default: () => ({})
}
},
methods: {
emitClick() {
}
}
}
</script>

View File

@@ -1,60 +0,0 @@
<!--
* @Author: zhp
* @Date: 2022-01-22 18:05:45
* @LastEditTime: 2022-01-23 10:50:29
* @LastEditors: zhp
* @Description:
-->
<template>
<div style="width:100%,text-align:center">
<div style="text-align:center">
<el-radio-group v-model="dateType" size="mini">
<el-radio-button v-for="item in labelList" :key="item.index" :label="item.index">
{{ item.label }}
</el-radio-button>
</el-radio-group>
</div>
</div>
</template>
<script>
export default {
name: 'TopGroup',
props: {
dateType: {
type: String,
default: '0'
},
labelList: {
type: Array,
required: true
}
},
data() {
return {}
},
mounted() {},
methods: {}
}
</script>
<style lang="scss" scoped>
::v-deep .el-radio-button__inner {
width: 100%;
border: none;
background: #133648;
margin-bottom: 1em;
margin-top: -0.5em;
color: white;
line-height: 14px;
outline: none;
box-shadow: none;
}
::v-deep .el-radio-button__orig-radio:checked + .el-radio-button__inner {
background: #3eb0ae;
border: none;
color: white;
outline: none;
box-shadow: none;
}
</style>

View File

@@ -1,83 +0,0 @@
<!--
* @Author: gtz
* @Date: 2022-01-20 14:12:10
* @LastEditors: zhp
* @LastEditTime: 2022-01-25 16:57:00
* @Description: file content
* @FilePath: \mt-bus-fe\src\views\OperationalOverview\components\ProductionLineMonitoringCockpit\nowTeam.vue
-->
<template>
<div class="now-team">
<el-row style="margin-bottom: 3em">
<p class="now-team-title">- 开始时间 -</p>
<p class="now-team-content blue">2021.1.26 13:30:21</p>
</el-row>
<el-row style="margin-bottom: 1em">
<el-col :span="8">
<p class="now-team-title">- 班组名称 -</p>
<p style="font-size:2em" class="now-team-content blue">中班执行一组</p>
</el-col>
<el-col :span="8">
<p class="now-team-title">- 原片投入() -</p>
<p class="now-team-content blue">122</p>
</el-col>
<el-col :span="8">
<p class="now-team-title">- 投入面积() -</p>
<p class="now-team-content blue">12000</p>
</el-col>
</el-row>
<el-row>
<el-col :span="8">
<p class="now-team-title">- 产品规格 -</p>
<p class="now-team-content blue">110</p>
</el-col>
<el-col :span="8">
<p class="now-team-title">- 执行工单 -</p>
<p class="now-team-content blue">110</p>
</el-col>
<el-col :span="8">
<p class="now-team-title">- 成品率 -</p>
<p class="now-team-content blue">98.8%</p>
</el-col>
</el-row>
</div>
</template>
<script>
export default {
name: 'ProductionMonitoringCockpit',
data() {
return {}
},
computed: {},
mounted() {},
methods: {
}
}
</script>
<style lang="scss" scoped>
.now-team{
width: 100%;
.now-team-title{
font-size: 1em;
line-height: 2em;
text-align: center;
color: #fff;
}
p {
margin: 0;
}
.now-team-content{
font-size: 2.5em;
font-weight: 300;
line-height: 1em;
color: #fff;
text-align: center;
}
.blue {
color: #52FFF1;
}
}
</style>

View File

@@ -1,229 +0,0 @@
<!--
* @Author: lb
* @Date: 2022-01-21 14:43:06
* @LastEditors: zhp
* @LastEditTime: 2023-02-07 13:46:05
* @Description: 简单折线图
-->
<template>
<div ref="SimpleLineChart" :style="{ height: height ? height + 'px' : '100%', width: '100%' }" />
</template>
<script>
import echarts from 'echarts'
import 'echarts/theme/macarons' // echarts theme
import resize from './mixins/resize'
const AxisLine = {
lineStyle: {
type: 'solid',
color: '#123341',
width: '1'
}
}
const AxisLabel = {
textStyle: {
color: '#666a74'
}
}
/**
* 2022.8.23 TODO:
* 1.一份数据三张表
* 2.切换选项卡时只更新一张表的数据
* 3.注释掉成品率条形图,改为将“投入、产出”拆分图,与“成品率”合计三张
*/
class ChartOption {
constructor() {
this.color = [
'#3574a8',
'#9f3476',
'#30959d',
'#5255be',
'#8b4449',
'#a29848',
'#FF6600',
'#FFFF00',
'#91cc75',
'#fac858',
'#ee6666',
'#73c0de',
'#3ba272',
'#fc8452',
'#9a60b4',
'#ea7ccc'
]
this.tooltip = { trigger: 'axis' }
this.grid = {
left: '2%',
right: '2%',
bottom: '5%',
height: '80%',
containLabel: true
}
this.legend = {
itemHeight: 10,
itemWidth: 10,
y: 'top',
x: 'center',
top: 0,
// right: '1%',
data: [
/** dynamic */
],
// right: '1%',
textStyle: {
fontSize: 12,
color: '#ced1d5'
}
}
this.xAxis = {
type: 'category',
boundaryGap: false,
splitLine: { show: false },
axisLine: AxisLine,
axisLabel: { ...AxisLabel, rotate: 20 },
data: [
/** dynamic */
]
}
this.yAxis = {
type: 'value',
splitLine: { show: false },
axisLine: AxisLine,
axisLabel: AxisLabel
}
this.series = [
/** dynmaic */
]
}
/**
* @param {object} rawdata
*/
setLegend(rawdata) {
if (rawdata) {
const data = Object.keys(rawdata)
this.legend.data = data.map(item => ({ icon: 'roundRect', name: item }))
}
}
/**
* @param {object} rawdata
*/
setCategory(rawdata) {
if (rawdata) {
if (Object.keys(rawdata).length > 0) {
const first = rawdata[Object.keys(rawdata)[0]]
this.xAxis.data = Object.keys(first)
}
}
}
/**
* @param {object} rawdata
*/
setData(rawdata) {
if (rawdata) {
this.series = []
for (const key in rawdata) {
this.series.push({
name: key,
type: 'line',
data: Object.entries(rawdata[key]).map(([subkey, value]) => value)
})
}
}
}
clearOptions() {
this.legend.data.splice(0)
this.xAxis.data.splice(0)
this.series.splice(0)
}
// add more...
}
export default {
name: 'SimpleLineChart',
mixins: [resize],
props: {
beilv: {
type: Number,
default: 1
},
height: {
type: Number,
default: 1
},
legend: {
type: Array,
default: () => []
},
caty: {
type: Array,
default: () => []
},
dataList: {
type: Object,
default: () => ({})
}
},
data() {
return {
chart: null,
defaultOpts: new ChartOption()
}
},
computed: {
showLegend() {
return this.legend.length > 0
}
},
watch: {
dataList: {
handler: function(val) {
this.updateChartOptions()
}
}
},
mounted() {
this.$nextTick(() => {
this.initChart()
})
},
beforeDestroy() {
if (this.chart) {
this.chart.dispose()
this.chart = null
}
},
methods: {
initChart() {
if (!this.chart) {
this.chart = echarts.init(this.$refs.SimpleLineChart)
this.updateChartOptions()
}
},
updateChartOptions() {
if (!this.chart) return
this.defaultOpts.clearOptions()
/** set */
this.defaultOpts.setLegend(this.dataList)
this.defaultOpts.setCategory(this.dataList)
this.defaultOpts.setData(this.dataList)
/** log */
this.chart.setOption({ ...this.defaultOpts })
}
}
}
</script>
<style scoped>
.chart {
margin-top: -3em;
}
</style>

View File

@@ -1,51 +0,0 @@
<!--
* @Date: 2020-12-14 09:07:03
* @LastEditors: zwq
* @LastEditTime: 2022-01-23 00:14:53
* @FilePath: \mt-bus-fe\src\views\OperationalOverview\components\baseTable.vue
* @Description:
-->
<template>
<span class="alarm-level">
<span
style="display: inline-block; height: .6em;width: .6em; border-radius: .3em; position: relative;"
:style="{background: colorList[injectData.level].back, boxShadow: `0px 0px 2px 2px ${colorList[injectData.level].border}`}"
/>
{{ injectData.level }}
</span>
</template>
<script>
export default {
name: 'NextDay',
props: {
injectData: {
type: Object,
default: () => ({})
}
},
data() {
return {
colorList: {
1: {
back: 'rgba(255, 12, 12, 1)',
border: 'rgba(255, 12, 12, .5)'
},
2: {
back: 'rgba(255, 183, 12, 1)',
border: 'rgba(255, 183, 12, .5)'
},
3: {
back: 'rgba(39, 96, 255, 1)',
border: 'rgba(39, 96, 255, .5)'
},
4: {
back: 'rgba(12, 255, 30, 1)',
border: 'rgba(12, 255, 30, .5)'
}
}
}
},
methods: {
}
}
</script>

View File

@@ -1,187 +0,0 @@
<!--
* @Author: gtz
* @Date: 2022-01-19 15:58:17
* @LastEditors: zhp
* @LastEditTime: 2023-09-21 16:15:14
* @Description: file content
* @FilePath: \mt-bus-fe\src\views\OperationalOverview\components\baseContainer\index.vue
-->
<template>
<div
class="base-container"
:style="{ height: '100%', fontSize: 12 + 'px', padding: 12 + 'px' }"
:class="{ 'no-padding': noPadding, 'border-none': !showLine }"
>
<!-- <div class="base-container" :style="{height: height + 'px', fontSize: 12 + 'px', padding: 12 + 'px'}"> -->
<template v-if="showLine">
<div class="line" />
<div class="line line-vertical" />
<div class="line line-right" />
<div class="line line-right-vertical" />
<div class="line line-bottom" />
<div class="line line-bottom-vertical" />
<div class="line line-bottom-right" />
<div class="line line-bottom-right-vertical" />
</template>
<div class="bar-item">
<div v-if="title" class="bar-title">
<span>
<svg-icon :icon-class="titleIcon" style="font-size: 1.5em; position: relative; top: .08em" />
{{ title }}
</span>
</div>
<div class="bar-content" :class="{ 'p-0': noContentPadding }">
<slot />
</div>
</div>
</div>
</template>
<script>
export default {
name: 'BaseContainer',
props: {
showLine: {
type: Boolean,
default: true
},
noPadding: {
type: Boolean,
default: false
},
noContentPadding: {
type: Boolean,
default: false
},
title: {
type: String,
default: ''
},
titleIcon: {
type: String,
default: ''
},
height: {
type: Number,
default: 200
},
baseSize: {
type: Number,
default: 12
},
beilv: {
type: Number,
default: 1
}
},
data() {
return {
curIndex: 0
}
},
mounted() {},
methods: {
changeTab(num) {
this.curIndex = num
this.$emit('tabSelect', num)
}
}
}
</script>
<style lang="scss" scoped>
.base-container {
color: #fff;
width: 100%;
background-color: rgba($color: #061027, $alpha: 0.15);
position: relative;
// border: 2px solid;
background: url('../../../../assets/img/bg-bottom-item.png') no-repeat;
background-size: 100% 100%;
// border-radius: 40px 0px 40px 0px;
// border-image: linear-gradient(360deg, rgba(157, 246, 254, 0.05), rgba(100, 233, 252, 0.9)) 2 2;
// .line {
// position: absolute;
// border-top: 4px solid #52fff1;
// width: 2em;
// top: -0.25em;
// left: -0.25em;
// &-vertical {
// top: calc(-5em / 12);
// left: calc(-1em / 12);
// transform: rotate(90deg);
// transform-origin: left;
// }
// &-right {
// top: -0.25em;
// right: -0.25em;
// left: inherit;
// }
// &-right-vertical {
// top: calc(-5em / 12);
// right: calc(-1em / 12);
// left: inherit;
// transform: rotate(-90deg);
// transform-origin: right;
// }
// &-bottom {
// top: inherit;
// left: -0.25em;
// bottom: -0.25em;
// }
// &-bottom-vertical {
// top: inherit;
// left: calc(-1em / 12);
// bottom: calc(-5em / 12);
// transform: rotate(-90deg);
// transform-origin: left;
// }
// &-bottom-right {
// top: inherit;
// left: inherit;
// right: -0.25em;
// bottom: -0.25em;
// }
// &-bottom-right-vertical {
// top: inherit;
// left: inherit;
// right: calc(-1em / 12);
// bottom: calc(-5em / 12);
// transform: rotate(90deg);
// transform-origin: right;
// }
// }
.bar-item {
height: 100%;
display: flex;
flex-direction: column;
}
.bar-title {
width: 100%;
color: #52fff1;
font-size: 1.5em;
padding: 0.67em;
}
.bar-content {
padding: 1em;
flex: 1 auto;
}
.no-padding {
padding: 0;
}
.p-0 {
padding: 0;
}
&.border-none {
border: none;
}
}
</style>

View File

@@ -1,8 +1,8 @@
<!--
* @Date: 2020-12-14 09:07:03
* @Author: zhp
* @Date: 2024-03-26 09:20:18
* @LastEditTime: 2024-03-26 09:20:18
* @LastEditors: zhp
* @LastEditTime: 2024-01-12 14:30:46
* @FilePath: \mt-bus-fe\src\views\OperationalOverview\components\baseTable.vue
* @Description:
-->
<template>
@@ -158,7 +158,7 @@ export default {
}
</script>
<style lang="scss">
@import "../styles/index.scss";
// @import "../styles/index.scss";
.visual-base-table-container {
.el-table {
border: 0;

View File

@@ -1,40 +0,0 @@
<!--
* @Date: 2020-12-14 09:07:03
* @LastEditors: zhp
* @LastEditTime: 2023-11-13 16:41:28
* @FilePath: \mt-bus-fe\src\views\OperationalOverview\components\baseTable.vue
* @Description:
-->
<template>
<div class="base-video-container">
<!-- <video id="v1" :style="{height: videoHeight + 'px'}" :src="require('../../../assets/video/3d.mkv')" autoplay loop muted /> -->
</div>
</template>
<script>
export default {
name: 'BaseVideo',
props: {
videoHeight: {
type: Number,
default: () => 200
},
beilv: {
type: Number,
default: () => 1
}
},
data() {
return {}
},
methods: {
}
}
</script>
<style lang="scss" scoped>
.base-video-container{
width: 100%;
overflow: hidden;
display: flex;
justify-content: center;
}
</style>

View File

@@ -1,40 +0,0 @@
<!--
* @Date: 2020-12-14 09:07:03
* @LastEditors: zwq
* @LastEditTime: 2022-01-23 00:14:53
* @FilePath: \mt-bus-fe\src\views\OperationalOverview\components\baseTable.vue
* @Description:
-->
<template>
<div class="next-day" :style="{background: injectData.nextLong < 0 ? 'rgba(255, 84, 76, 0.6)' : injectData.nextLong < 10 ? 'rgba(251, 211, 80, 0.6)' : 'rgba(142, 254, 83, 0.6)'}">
{{ injectData.nextLong }}
</div>
</template>
<script>
export default {
name: 'NextDay',
props: {
injectData: {
type: Object,
default: () => ({})
}
},
data() {
return {}
},
methods: {
}
}
</script>
<style lang="scss" scoped>
.next-day{
position: absolute;
top: 0;
bottom: 0;
right: 0;
left: 0;
display: flex;
justify-content: center;
align-items: center;
}
</style>

View File

@@ -1,237 +0,0 @@
<template>
<div>
<div :id="id" :class="className" :style="{ height: height + 'px', width:width}" />
</div>
</template>
<script>
import echarts from 'echarts'
import 'echarts/theme/macarons' // echarts theme
import resize from './mixins/resize'
export default {
name: 'OverviewBar',
mixins: [resize],
props: {
id: {
type: String,
default: 'threeBarChart'
},
className: {
type: String,
default: 'chart'
},
width: {
type: String,
default: '100%'
},
beilv: {
type: Number,
default: 1
},
height: {
type: Number,
default: 200
},
showLegend: {
type: Boolean,
default: false
},
nameList: {
type: Array,
default: () => []
},
dataList: {
type: Array,
default: () => []
}
},
data() {
return {
chart: null,
series: []
}
},
mounted() {
if (this.dataList.length > 1) {
this.series = [
{ // 柱体
name: this.dataList[0].name,
type: 'bar',
barWidth: 30,
itemStyle: {
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
{ offset: 0, color: this.dataList[0].topColor },
{ offset: 1, color: this.dataList[0].bottomColor }
])
},
data: this.dataList[0].data
},
{ // 柱顶
name: this.dataList[0].name,
type: 'pictorialBar',
barWidth: 20,
symbol: 'diamond',
symbolPosition: 'end',
symbolOffset: [0, '-50%'],
symbolSize: [30, 12],
zlevel: 2,
itemStyle: { color: this.dataList[0].topColor },
data: this.dataList[0].data
},
{ // 柱底
name: this.dataList[0].name,
type: 'pictorialBar',
barWidth: 20,
symbol: 'diamond',
symbolOffset: [0, '50%'],
symbolSize: [30, 15],
itemStyle: { color: this.dataList[0].bottomColor },
data: this.dataList[0].data
},
{ // 柱体
name: this.dataList[1].name,
type: 'bar',
barWidth: 30,
itemStyle: {
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
{ offset: 0, color: this.dataList[1].topColor },
{ offset: 1, color: this.dataList[1].bottomColor }
])
},
data: this.dataList[1].data
},
{ // 柱顶
name: this.dataList[1].name,
type: 'pictorialBar',
barWidth: 20,
symbol: 'diamond',
symbolPosition: 'end',
symbolOffset: [0, '-50%'],
symbolSize: [30, 12],
zlevel: 2,
itemStyle: { color: this.dataList[1].topColor },
data: this.dataList[1].data
},
{ // 柱底
name: this.dataList[1].name,
type: 'pictorialBar',
barWidth: 20,
symbol: 'diamond',
symbolOffset: [0, '50%'],
symbolSize: [30, 15],
itemStyle: { color: this.dataList[1].topColor },
data: this.dataList[1].data
}
]
} else {
this.series = [
{ // 柱体
name: this.dataList[0].name,
type: 'bar',
barWidth: 12,
itemStyle: {
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
{ offset: 0, color: this.dataList[0].topColor },
{ offset: 1, color: this.dataList[0].bottomColor }
])
},
data: this.dataList[0].data
},
{ // 柱顶
name: this.dataList[0].name,
type: 'pictorialBar',
barWidth: 12,
symbol: 'diamond',
symbolPosition: 'end',
symbolOffset: [0, '-50%'],
symbolSize: [12, 6],
zlevel: 2,
itemStyle: { color: this.dataList[0].topColor },
data: this.dataList[0].data
},
{ // 柱底
name: this.dataList[0].name,
type: 'pictorialBar',
barWidth: 12,
symbol: 'diamond',
symbolOffset: [0, '50%'],
symbolSize: [12, 6],
itemStyle: { color: this.dataList[0].bottomColor },
data: this.dataList[0].data
}
]
}
this.$nextTick(() => {
console.log(this.series)
this.initChart()
})
},
beforeDestroy() {
if (!this.chart) {
return
}
this.chart.dispose()
this.chart = null
},
methods: {
initChart() {
this.chart = echarts.init(document.getElementById(this.id))
this.chart.setOption({
tooltip: {
trigger: 'axis',
axisPointer: { // 坐标轴指示器,坐标轴触发有效
type: 'shadow' // 默认为直线,可选为:'line' | 'shadow'
}
},
grid: {
top: 10,
left: '2%',
right: '2%',
bottom: '3%',
containLabel: true
},
xAxis: {
type: 'category',
axisLine: {
lineStyle: {
type: 'solid',
color: '#213259', // 左边线的颜色
width: '1'// 坐标线的宽度
}
},
axisLabel: {
textStyle: {
color: 'rgba(255,255,255,0.5)' // 坐标值得具体的颜色
}
},
data: this.nameList
},
yAxis: {
axisLine: {
lineStyle: {
type: 'solid',
color: '#213259', // 左边线的颜色
width: '1'// 坐标线的宽度
}
},
axisLabel: {
textStyle: {
color: 'rgba(255,255,255,0.5)' // 坐标值得具体的颜色
}
},
splitLine: {
lineStyle: {
color: '#213259'
}
},
type: 'value'
},
series: this.series
})
}
}
}
</script>

View File

@@ -1,86 +0,0 @@
<!--
* @Author: zwq
* @Date: 2022-01-21 14:27:34
* @LastEditors: zwq
* @LastEditTime: 2022-01-21 15:55:08
* @Description:
-->
<template>
<div class="top-radio-group" style="width:100%;text-align:center;">
<el-radio-group v-model="radioModel" size="mini" @change="handleChange">
<el-radio-button v-for="item in radioList" :key="item.value" :label="item.value">
{{ item.name }}
</el-radio-button>
</el-radio-group>
</div>
</template>
<script>
export default {
name: 'TopRadioGroup',
props: {
dateType: {
type: Number,
default: 0
},
radioList: {
type: Array,
default: () => {
return [{ value: '0', name: '当天' }, { value: '1', name: '本周' }, { value: '2', name: '本月' }]
}
}
},
data() {
return {
radioModel: 0
}
},
mounted() {
this.$nextTick(() => {
this.radioModel = this.dateType
})
},
methods: {
handleChange(v) {
this.$emit('change-time-range', v)
}
}
}
</script>
<style lang="scss" scoped>
.top-radio-group >>> .el-radio-group {
display: flex;
width: 100%;
}
.top-radio-group >>> .el-radio-button {
flex: 1 1;
}
.top-radio-group >>> .el-radio-button__inner {
padding: 4px 0;
text-align: center;
}
::v-deep .el-radio-button__inner {
width: 100%;
border: none;
background: #133648;
padding: 3px 2em;
margin-bottom: 1em;
margin-top: -0.5em;
color: white;
line-height: 14px;
outline: none;
box-shadow: none;
}
::v-deep .el-radio-button__orig-radio:checked + .el-radio-button__inner {
background: #3eb0ae;
border: none;
color: white;
outline: none;
box-shadow: none;
}
</style>

View File

@@ -1,67 +0,0 @@
<!--
* @Date: 2020-12-14 09:07:03
* @LastEditors: zwq
* @LastEditTime: 2022-01-23 00:14:53
* @FilePath: \mt-bus-fe\src\views\OperationalOverview\components\baseTable.vue
* @Description:
-->
<template>
<el-row class="util-chart">
<el-col :span="20" class="chart-main-box">
<div class="chart-main">
<div class="chart-cover" :style="{width: percent + '%', backgroundImage: `linear-gradient(to right, ${leftColor}, ${rightColor})`}" />
</div>
</el-col>
<el-col :span="3" :offset="1">
{{ percent }}%
</el-col>
</el-row>
</template>
<script>
export default {
name: 'UtilChart',
props: {
percent: {
type: Number,
default: () => 0
},
leftColor: {
type: String,
default: () => 'rgba(18, 149, 255, 1)'
},
rightColor: {
type: String,
default: () => 'rgba(157, 213, 255, 1)'
}
},
data() {
return {}
},
methods: {
}
}
</script>
<style lang="scss" scoped>
.util-chart{
width: 100%;
.chart-main-box {
position: relative;
height: 1em;
.chart-main {
position: absolute;
top: 0;
bottom: 0;
width: 100%;
background: rgba(30, 45, 69, 1);
border-radius: 1em;
.chart-cover {
position: absolute;
top: 0;
bottom: 0;
left: 0;
border-radius: 1em;
}
}
}
}
</style>

View File

@@ -1,66 +0,0 @@
<!--
* @Date: 2020-12-14 09:07:03
* @LastEditors: zwq
* @LastEditTime: 2022-01-23 00:14:53
* @FilePath: \mt-bus-fe\src\views\OperationalOverview\components\baseTable.vue
* @Description:
-->
<template>
<el-row class="base-footer-container" :style="{height: 36 + 'px'}">
<el-col v-for="item in footerList" :key="item" :span="4" class="base-footer-item" :style="{lineHeight: 36 + 'px', fontSize: 18 + 'px'}" :class="check === item ? 'isActive' : ''" @click.native="handleCheck(item)">
{{ item }}
</el-col>
</el-row>
</template>
<script>
export default {
name: 'BaseFooter',
props: {
beilv: {
type: Number,
default: () => 1
}
},
data() {
return {
footerList: ['钢1线', '钢2线', '钢3线', '钢4线', '钢5线', '钢6线'],
check: '钢1线'
}
},
methods: {
handleCheck(name) {
this.check = name
}
}
}
</script>
<style lang="scss" scoped>
.base-footer-container{
width: 100%;
position: absolute;
bottom: 0;
left: 0;
right: 0;
.base-footer-item {
text-align: center;
cursor: pointer;
background: rgba($color: #133648, $alpha: 0.29);
}
.isActive {
background: linear-gradient(to right, rgba($color: #4E8E9B, $alpha: 0.29), #2DA99F, rgba($color: #265562, $alpha: 0.29));
position: relative;
}
.isActive::before {
content: '';
position: absolute;
top: -10px;
left: 0;
height:0;
width: 100%;
height: 10px;
transform-origin: 50% 100% 0;
transform: perspective(40px) rotateX(45deg);
background-image: linear-gradient(to right, rgba($color: #4E8E9B, $alpha: 0.29), #2DA99F, rgba($color: #265562, $alpha: 0.29));
}
}
</style>