Browse Source

大屏展示

pull/89/head
liwei 3 years ago
parent
commit
62ade16a80
13 changed files with 95323 additions and 88 deletions
  1. +94980
    -0
      public/echarts.js
  2. +1
    -0
      public/index.html
  3. +9
    -0
      src/api/dataL.js
  4. BIN
      src/assets/imgs/data-v/content-bg.png
  5. BIN
      src/assets/imgs/data-v/echarts-bg.png
  6. BIN
      src/assets/imgs/data-v/highest-img.png
  7. BIN
      src/assets/imgs/data-v/left-img.png
  8. BIN
      src/assets/imgs/data-v/lowest-img.png
  9. BIN
      src/assets/imgs/data-v/right-img.png
  10. BIN
      src/assets/imgs/data-v/title-img.png
  11. +95
    -87
      src/router/index.js
  12. +237
    -0
      src/views/DataV/index.vue
  13. +1
    -1
      src/views/productplan/workbench/schedule.vue

+ 94980
- 0
public/echarts.js
File diff suppressed because it is too large
View File


+ 1
- 0
public/index.html View File

@ -231,4 +231,5 @@
</div> </div>
</body> </body>
<script src="./version.log.js"></script> <script src="./version.log.js"></script>
<script src="./echarts.js"></script>
</html> </html>

+ 9
- 0
src/api/dataL.js View File

@ -0,0 +1,9 @@
import request from '@/utils/request'
export function filterdatainfo(params) {
return request({
url: '/admin/report/filterdatainfo/display',
method: 'get',
params
})
}

BIN
src/assets/imgs/data-v/content-bg.png View File

Before After
Width: 1820  |  Height: 1890  |  Size: 75 KiB

BIN
src/assets/imgs/data-v/echarts-bg.png View File

Before After
Width: 1752  |  Height: 898  |  Size: 130 KiB

BIN
src/assets/imgs/data-v/highest-img.png View File

Before After
Width: 98  |  Height: 118  |  Size: 4.9 KiB

BIN
src/assets/imgs/data-v/left-img.png View File

Before After
Width: 36  |  Height: 20  |  Size: 1.5 KiB

BIN
src/assets/imgs/data-v/lowest-img.png View File

Before After
Width: 98  |  Height: 118  |  Size: 5.2 KiB

BIN
src/assets/imgs/data-v/right-img.png View File

Before After
Width: 36  |  Height: 20  |  Size: 1.5 KiB

BIN
src/assets/imgs/data-v/title-img.png View File

Before After
Width: 3840  |  Height: 136  |  Size: 422 KiB

+ 95
- 87
src/router/index.js View File

@ -39,84 +39,90 @@ import Layout1 from '@/layout/layout'
* a base page that does not have permission requirements * a base page that does not have permission requirements
* all roles can be accessed * all roles can be accessed
*/ */
export const constantRoutes = [
{
path: '/redirect',
component: Layout,
hidden: true,
children: [
{
path: '/redirect/:path*',
component: () => import('@/views/redirect/index')
}
]
},
{
path: '/login',
component: () => import('@/views/login/index'),
hidden: true
},
{
path: '/auth-redirect',
component: () => import('@/views/login/auth-redirect'),
hidden: true
},
{
path: '/404',
component: () => import('@/views/error-page/404'),
hidden: true
},
{
path: '/401',
component: () => import('@/views/error-page/401'),
hidden: true
},
{
path: '/',
component: Layout,
redirect: '/dashboard',
children: [
{
path: 'dashboard',
component: () => import('@/views/dashboard/index'),
name: '首页',
meta: { title: '首页', icon: 'home', affix: true }
}
]
},
// {
// path: '/screwdown',
// component: () => import('/plant/eods/index'),
// hidden: true
// },
{
path: '/profile',
component: Layout,
redirect: '/profile/index',
hidden: true,
children: [
{
path: 'index',
component: () => import('@/views/profile/index'),
name: '个人中心',
meta: { title: '个人中心', icon: 'user', noCache: true }
}
]
},
// {
// path: '/supplier',
// component: Layout1,
// redirect: '/supplier/login',
// hidden: true,
// children: [
// {
// path: 'login',
// component: () => import('@/views/supplier/login'),
// name: '供应商登录',
// meta: { title: '供应商登录', icon: 'user', noCache: true }
// }
// ]
// }
export const constantRoutes = [{
path: '/redirect',
component: Layout,
hidden: true,
children: [{
path: '/redirect/:path*',
component: () => import('@/views/redirect/index')
}]
},
{
path: '/login',
component: () => import('@/views/login/index'),
hidden: true
},
{
path: '/auth-redirect',
component: () => import('@/views/login/auth-redirect'),
hidden: true
},
{
path: '/404',
component: () => import('@/views/error-page/404'),
hidden: true
},
{
path: '/401',
component: () => import('@/views/error-page/401'),
hidden: true
},
{
path: '/dataL',
component: () => import('@/views/DataV/index'),
hidden: false
},
{
path: '/',
component: Layout,
redirect: '/dashboard',
children: [{
path: 'dashboard',
component: () => import('@/views/dashboard/index'),
name: '首页',
meta: {
title: '首页',
icon: 'home',
affix: true
}
}]
},
// {
// path: '/screwdown',
// component: () => import('/plant/eods/index'),
// hidden: true
// },
{
path: '/profile',
component: Layout,
redirect: '/profile/index',
hidden: true,
children: [{
path: 'index',
component: () => import('@/views/profile/index'),
name: '个人中心',
meta: {
title: '个人中心',
icon: 'user',
noCache: true
}
}]
}
// {
// path: '/supplier',
// component: Layout1,
// redirect: '/supplier/login',
// hidden: true,
// children: [
// {
// path: 'login',
// component: () => import('@/views/supplier/login'),
// name: '供应商登录',
// meta: { title: '供应商登录', icon: 'user', noCache: true }
// }
// ]
// }
] ]
/** /**
@ -126,20 +132,22 @@ export const constantRoutes = [
export var asyncRoutes = [] export var asyncRoutes = []
const createRouter = () => new Router({ const createRouter = () => new Router({
mode: 'history', // require service support
scrollBehavior: () => ({ y: 0 }),
routes: constantRoutes
mode: 'history', // require service support
scrollBehavior: () => ({
y: 0
}),
routes: constantRoutes
}) })
const router = createRouter() const router = createRouter()
// prevent add routes repeatedly // prevent add routes repeatedly
router.selfaddRoutes = function (params) {
router.matcher = createRouter().matcher
router.addRoutes(params)
router.selfaddRoutes = function(params) {
router.matcher = createRouter().matcher
router.addRoutes(params)
} }
export function resetRouter () {
const newRouter = createRouter()
router.matcher = newRouter.matcher // reset router
export function resetRouter() {
const newRouter = createRouter()
router.matcher = newRouter.matcher // reset router
} }
export default router export default router

+ 237
- 0
src/views/DataV/index.vue View File

@ -0,0 +1,237 @@
<template>
<div class="data-v-wrap">
<header class="title-wrap">4# 弧焊机</header>
<div class="content-wrap">
<div class="content-style content-left-wrap">
<p class="content-title">
<span class="left-img" />A工位 实时数据展示<span class="right-img" />
</p>
<div class="echarts-wrap">
<div class="echarts-title">
<span class="left-img" />{{(allData[0] && allData[0].title) || '工时统计数据'}}<span class="right-img" />
</div>
<p class="user-time">平均工时{{(allData[0] && allData[0].avg) || 0}}{{(allData[0] && allData[0].uom) || 's'}}</p>
<div id="float-line-echarts" class="float-line-echarts" />
</div>
<div class="echarts-wrap">
<div class="echarts-title">
<span class="left-img" />{{(allData[2] && allData[2].title) || '设备数据统计'}}<span class="right-img" />
</div>
<div id="float-line-echarts-left2" class="float-line-echarts" />
</div>
</div>
<div class="content-style content-right-wrap">
<p class="content-title">
<span class="left-img" />B工位 实时数据展示<span class="right-img" />
</p>
<div class="echarts-wrap">
<div class="echarts-title">
<span class="left-img" />{{(allData[1] && allData[1].title) || '工时统计数据'}}<span class="right-img" />
</div>
<p class="user-time">平均工时{{(allData[1] && allData[1].avg) || 0}}{{(allData[1] && allData[1].uom) || 's'}}</p>
<div id="float-line-echartsB" class="float-line-echarts" />
</div>
<div class="echarts-wrap">
<div class="echarts-title">
<span class="left-img" />{{(allData[3] && allData[3].title) || '设备数据统计'}}<span class="right-img" />
</div>
<div id="float-line-echarts-right2" class="float-line-echarts" />
</div>
</div>
</div>
</div>
</template>
<script>
import {
filterdatainfo
} from '../../api/dataL.js'
export default {
data() {
return {
allData: []
}
},
methods: {
getData() {
const _this = this;
filterdatainfo('/admin/report/filterdatainfo/display', {}).then(({
code,
data
}) => {
if (code === 200 && data.length) {
_this.allData = data;
_this.lineMarkAreaChart && _this.lineMarkAreaChart.setOption(data[0])
_this.lineMarkAreaChartLeft2 && _this.lineMarkAreaChartLeft2.setOption(data[2]);
_this.lineMarkAreaChartB && _this.lineMarkAreaChartB.setOption(data[1])
_this.lineMarkAreaChartRight2 && _this.lineMarkAreaChartRight2.setOption(data[3]);
}
})
setTimeout(() => {
_this.getData();
}, 1000)
}
},
mounted() {
// 线
// 1
var lineMarkArea = document.getElementById('float-line-echarts');
this.lineMarkAreaChart = new window.echarts.lineMarkArea(lineMarkArea);
this.lineMarkAreaChart.setOption({});
// 2
var lineMarkLeft2 = document.getElementById('float-line-echarts-left2');
this.lineMarkAreaChartLeft2 = new window.echarts.lineMark(lineMarkLeft2);
this.lineMarkAreaChartLeft2.setOption({});
// 1
var lineMarkAreaB = document.getElementById('float-line-echartsB');
this.lineMarkAreaChartB = new window.echarts.lineMarkArea(lineMarkAreaB);
this.lineMarkAreaChartB.setOption({});
// 2
var lineMarkRight2 = document.getElementById('float-line-echarts-right2');
this.lineMarkAreaChartRight2 = new window.echarts.lineMark(lineMarkRight2);
this.lineMarkAreaChartRight2.setOption({});
this.getData();
}
}
</script>
<style scoped>
.data-v-wrap {
position: relative;
min-width: 1920px;
min-height: 1080px;
width: 100%;
height: 100%;
box-sizing: border-box;
padding-top: 96px;
background: #01082e;
}
.title-wrap {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 68px;
font-size: 24px;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: #ffffff;
line-height: 68px;
text-align: center;
text-shadow: 0px 1px 0px rgba(7, 18, 58, 0.24);
background: url(../../assets/imgs/data-v/title-img.png) no-repeat;
background-size: 100% 100%;
}
.content-wrap {
width: 100%;
height: 100%;
box-sizing: border-box;
padding: 0 39px 39px 39px;
overflow: hidden;
clear: both;
}
.echarts-wrap {
position: relative;
width: 100%;
height: 450px;
background: url(../../assets/imgs/data-v/echarts-bg.png) no-repeat;
background-size: 100% 100%;
box-sizing: border-box;
margin-bottom: 14px;
padding-top: 40px;
}
.echarts-title {
position: absolute;
top: 0;
left: 0;
width: 324px;
text-align: center;
font-size: 16px;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: #ffffff;
line-height: 40px;
}
.left-img {
display: inline-block;
width: 16px;
height: 8px;
background: url(../../assets/imgs/data-v/right-img.png) no-repeat;
background-size: 100% 100%;
margin-right: 10px;
}
.right-img {
display: inline-block;
width: 16px;
height: 8px;
background: url(../../assets/imgs/data-v/left-img.png) no-repeat;
background-size: 100% 100%;
margin-left: 10px;
}
.user-time {
position: absolute;
top: 38px;
right: 16px;
width: 170px;
height: 40px;
line-height: 40px;
font-size: 16px;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: #FFFFFF;
background: #091954;
border: 1px solid #0036C3;
text-align: center;
}
.float-line-echarts {
width: 100%;
height: 100%;
}
.content-style {
position: relative;
width: 910px;
height: 945px;
background: url(../../assets/imgs/data-v/content-bg.png) no-repeat;
background-size: 100% 100%;
box-sizing: border-box;
padding: 14px 17px;
}
.content-title {
position: absolute;
top: -22px;
left: 0;
width: 100%;
height: 26px;
line-height: 26px;
text-align: center;
font-size: 18px;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: #FFFFFF;
}
.content-left-wrap {
float: left;
}
.content-right-wrap {
float: right;
}
</style>

+ 1
- 1
src/views/productplan/workbench/schedule.vue View File

@ -806,7 +806,7 @@
title: WorklineDict[this.parms['WorkLine-WorkLineid']].WorklineTab['WorkLine-Descr'], title: WorklineDict[this.parms['WorkLine-WorkLineid']].WorklineTab['WorkLine-Descr'],
workLoadArray: WorklineDict[this.parms['WorkLine-WorkLineid']].WorkLoadArray, workLoadArray: WorklineDict[this.parms['WorkLine-WorkLineid']].WorkLoadArray,
}, ] }, ]
this.disabledDate = WorklineDict[this.parms['WorkLine-WorkLineid']].TimeCurve.TimeLineArray || []
this.disabledDate = WorklineDict[this.parms['WorkLine-WorkLineid']].UnTimeCurve.TimeLineArray || []
this.wiewPlanList(UnPlannedTaskArray || []) this.wiewPlanList(UnPlannedTaskArray || [])
} }
// gantt.templates.timeline_cell_class // gantt.templates.timeline_cell_class


Loading…
Cancel
Save