Compare commits

...

4 Commits

Author SHA1 Message Date
‘937886381’
33c00785df 大屏 2025-11-18 17:00:40 +08:00
‘937886381’
d8acff21e3 Merge branch 'projects/ssdl-test' into projects/ssdl-zhp 2025-11-18 09:32:16 +08:00
‘937886381’
c0a38c568f 大屏 2025-11-18 09:31:39 +08:00
6a8a9ed28d Merge pull request '更新' (#449) from projects/ssdl-zwq into projects/ssdl-test
Reviewed-on: #449
2025-11-17 09:24:30 +08:00
69 changed files with 6757 additions and 220 deletions

View File

@@ -12,8 +12,8 @@ ENV = 'development'
VUE_APP_TITLE = 智能监控分析系统
# 芋道管理系统/开发环境
# VUE_APP_BASE_API = 'http://192.168.8.22:48080'
VUE_APP_BASE_API = 'http://172.16.33.65:48082'
VUE_APP_BASE_API = 'http://172.16.32.76:48080'
# VUE_APP_BASE_API = 'http://line.kszny.picaiba.com'
# 路由懒加载
VUE_CLI_BABEL_TRANSPILE_MODULES = true

View File

@@ -0,0 +1,9 @@
import request from '@/utils/request'
export function getLineEdgeLibraryList(data) {
return request({
url: '/wms/line-edge-library/list',
method: 'get',
params: data,
});
}

BIN
src/assets/img/ABN.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 461 B

BIN
src/assets/img/ABNScale.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 321 B

BIN
src/assets/img/DIS.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 312 B

BIN
src/assets/img/DISScale.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 244 B

BIN
src/assets/img/EP.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 137 B

BIN
src/assets/img/EPScale.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 165 B

BIN
src/assets/img/FP.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 139 B

BIN
src/assets/img/FPScale.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 170 B

BIN
src/assets/img/IDL.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 929 B

BIN
src/assets/img/IDLScale.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 321 B

BIN
src/assets/img/IT.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 320 B

BIN
src/assets/img/ITScale.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 261 B

BIN
src/assets/img/LCK.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 416 B

BIN
src/assets/img/LCKScale.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 305 B

BIN
src/assets/img/OCC.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 325 B

BIN
src/assets/img/OCCScale.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 259 B

BIN
src/assets/img/RES.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 420 B

BIN
src/assets/img/RESScale.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 321 B

BIN
src/assets/img/Top1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.5 KiB

BIN
src/assets/img/Top2.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 KiB

BIN
src/assets/img/Top3.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 KiB

BIN
src/assets/img/Top4.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.5 KiB

BIN
src/assets/img/Top5.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 KiB

BIN
src/assets/img/agvCar.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

BIN
src/assets/img/chargeBg.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 326 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 622 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 220 B

BIN
src/assets/img/recycle.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 379 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 355 B

BIN
src/assets/img/runBg.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 325 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 562 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 611 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 MiB

View File

@@ -9,7 +9,7 @@ import { isRelogin } from '@/utils/request'
NProgress.configure({ showSpinner: false })
// 增加三方登陆 update by 芋艿
const whiteList = ['/login', '/social-login', '/auth-redirect', '/bind', '/register', '/oauthLogin/gitee']
const whiteList = ['/login', '/social-login','screenbg', '/auth-redirect', '/bind', '/register', '/oauthLogin/gitee']
router.beforeEach((to, from, next) => {
NProgress.start()

View File

@@ -28,223 +28,277 @@ Vue.use(Router)
// 公共路由
export const constantRoutes = [
{
path: '/redirect',
component: Layout,
hidden: true,
children: [
{
path: '/redirect/:path(.*)',
component: (resolve) => require(['@/views/redirect'], resolve)
}
]
},
{
path: '/login',
component: (resolve) => require(['@/views/login'], resolve),
hidden: true
},
{
path: '/sso',
component: (resolve) => require(['@/views/sso'], resolve),
hidden: true
},
{
path: '/social-login',
component: (resolve) => require(['@/views/socialLogin'], resolve),
hidden: true
},
{
path: '/404',
component: (resolve) => require(['@/views/error/404'], resolve),
hidden: true
},
{
path: '/401',
component: (resolve) => require(['@/views/error/401'], resolve),
hidden: true
},
{
path: '/print-design',
component: (resolve) => require(['@/views/print/design'], resolve),
hidden: true
},
{
path: "",
component: Layout,
redirect: "index",
children: [
{
path: "index",
component: (resolve) => require(["@/views/home/index"], resolve),
name: "首页",
meta: { title: "首页", icon: "dashboard", affix: true },
hidden: true
},
],
},
{
path: '/user',
component: Layout,
hidden: true,
redirect: 'noredirect',
children: [{
path: 'profile',
component: (resolve) => require(['@/views/system/user/profile/index'], resolve),
name: 'Profile',
meta: { title: '个人中心', icon: 'user' }
}, {
path: 'notify-message',
component: (resolve) => require(['@/views/system/notify/my/index'], resolve),
name: 'MyNotifyMessage',
meta: { title: '我的站内信', icon: 'message' },
}]
},
{
path: '/dict',
component: Layout,
hidden: true,
children: [{
path: 'type/data/:dictId(\\d+)',
component: (resolve) => require(['@/views/system/dict/data'], resolve),
name: 'SystemDictData',
meta: { title: '字典数据', icon: '', activeMenu: '/system/dict' }
}
]
},
{
path: '/job',
component: Layout,
hidden: true,
children: [{
path: 'log',
component: (resolve) => require(['@/views/infra/job/log'], resolve),
name: 'InfraJobLog',
meta: { title: '调度日志', activeMenu: '/infra/job' }
}
]
}, {
path: '/codegen',
component: Layout,
hidden: true,
children: [{
path: 'edit/:tableId(\\d+)',
component: (resolve) => require(['@/views/infra/codegen/editTable'], resolve),
name: 'InfraCodegenEditTable',
meta: { title: '修改生成配置', activeMenu: '/infra/codegen' }
}
]
},
{
path: '/bpm',
component: Layout,
hidden: true,
redirect: 'noredirect',
children: [{
path: 'oa/leave/create',
component: (resolve) => require(['@/views/bpm/oa/leave/create'], resolve),
name: 'BpmOALeaveCreate',
meta: { title: '发起 OA 请假', icon: 'form', activeMenu: '/bpm/oa/leave' }
}, {
path: 'oa/leave/detail',
component: (resolve) => require(['@/views/bpm/oa/leave/detail'], resolve),
name: 'BpmOALeaveDetail',
meta: { title: '查看 OA 请假', icon: 'view', activeMenu: '/bpm/oa/leave' }
}
]
},
{
path: '/bpm',
component: Layout,
hidden: true,
children: [{
path: 'manager/form/edit',
component: (resolve) => require(['@/views/bpm/form/formEditor'], resolve),
name: 'BpmFormEditor',
meta: { title: '流程表单-编辑', activeMenu: '/bpm/manager/form' }
}, {
path: 'manager/definition',
component: (resolve) => require(['@/views/bpm/definition/index'], resolve),
name: 'BpmProcessDefinition',
meta: { title: '流程定义', activeMenu: '/bpm/manager/model' }
}, {
path: 'manager/model/design',
component: (resolve) => require(['@/views/bpm/model/modelEditor'], resolve),
name: 'BpmModelEditor',
meta: { title: '设计流程', activeMenu: '/bpm/manager/model' }
}, {
path: 'process-instance/create',
component: (resolve) => require(['@/views/bpm/processInstance/create'], resolve),
name: 'BpmProcessInstanceCreate',
meta: { title: '发起流程', activeMenu: '/bpm/task/my' }
}, {
path: 'process-instance/detail',
component: (resolve) => require(['@/views/bpm/processInstance/detail'], resolve),
name: 'BpmProcessInstanceDetail',
meta: { title: '流程详情', activeMenu: '/bpm/task/my' }
}
]
},
{
path: '/property',
component: Layout,
hidden: true,
children: [{
path: 'value/:propertyId(\\d+)',
component: (resolve) => require(['@/views/mall/product/property/value'], resolve),
name: 'ProductPropertyValue',
meta: { title: '商品属性值', icon: '', activeMenu: '/product/property' }
}
]
},
{
path: '/spu',
component: Layout,
hidden: true,
children: [{
path: 'edit/:spuId(\\d+)',
component: (resolve) => require(['@/views/mall/product/spu/save'], resolve),
name: 'ProductSpuUpdate',
meta: { title: '修改商品', activeMenu: '/product/spu' }
},
{
path: 'add',
component: (resolve) => require(['@/views/mall/product/spu/save'], resolve),
name: 'ProductSpuCreate',
meta: { title: '添加商品', activeMenu: '/product/spu' }
}
]
},
{
path: '/trade/order',
component: Layout,
hidden: true,
children: [
{
path: 'detail',
name: 'TradeOrderDetail',
hidden: true,
meta: { title: '订单详情' },
component: (resolve) => require(['@/views/mall/trade/order/detail'], resolve)
}
]
},
{
path: '/pay',
component: Layout,
hidden: true,
children: [{
path: 'order/submit',
name: 'PayOrderSubmit',
hidden: true,
meta: {
title: '收银台',
noCache: true
},
component: (resolve) => require(['@/views/pay/order/submit'], resolve)
}]
}
]
{
path: '/redirect',
component: Layout,
hidden: true,
children: [
{
path: '/redirect/:path(.*)',
component: (resolve) => require(['@/views/redirect'], resolve),
},
],
},
{
path: '/login',
component: (resolve) => require(['@/views/login'], resolve),
// hidden: true,
},
{
path: '/sso',
component: (resolve) => require(['@/views/sso'], resolve),
hidden: true,
},
{
path: '/social-login',
component: (resolve) => require(['@/views/socialLogin'], resolve),
hidden: true,
},
{
path: '/404',
component: (resolve) => require(['@/views/error/404'], resolve),
hidden: true,
},
{
path: '/401',
component: (resolve) => require(['@/views/error/401'], resolve),
hidden: true,
},
{
path: '/print-design',
component: (resolve) => require(['@/views/print/design'], resolve),
hidden: true,
},
{
path: '',
component: Layout,
redirect: 'index',
children: [
{
path: 'index',
component: (resolve) => require(['@/views/home/index'], resolve),
name: '首页',
meta: { title: '首页', icon: 'dashboard', affix: true },
hidden: true,
},
],
},
{
path: '/screenbg',
component: () =>
import(
/* webpackChunkName: "about" */ '@/views/productionVisualization/equipmentBoard'
),
name: 'screenbg',
meta: { title: '大屏', icon: 'chart' },
},
{
path: '/user',
component: Layout,
hidden: true,
redirect: 'noredirect',
children: [
{
path: 'profile',
component: (resolve) =>
require(['@/views/system/user/profile/index'], resolve),
name: 'Profile',
meta: { title: '个人中心', icon: 'user' },
},
{
path: 'notify-message',
component: (resolve) =>
require(['@/views/system/notify/my/index'], resolve),
name: 'MyNotifyMessage',
meta: { title: '我的站内信', icon: 'message' },
},
],
},
{
path: '/dict',
component: Layout,
hidden: true,
children: [
{
path: 'type/data/:dictId(\\d+)',
component: (resolve) => require(['@/views/system/dict/data'], resolve),
name: 'SystemDictData',
meta: { title: '字典数据', icon: '', activeMenu: '/system/dict' },
},
],
},
{
path: '/job',
component: Layout,
hidden: true,
children: [
{
path: 'log',
component: (resolve) => require(['@/views/infra/job/log'], resolve),
name: 'InfraJobLog',
meta: { title: '调度日志', activeMenu: '/infra/job' },
},
],
},
{
path: '/codegen',
component: Layout,
hidden: true,
children: [
{
path: 'edit/:tableId(\\d+)',
component: (resolve) =>
require(['@/views/infra/codegen/editTable'], resolve),
name: 'InfraCodegenEditTable',
meta: { title: '修改生成配置', activeMenu: '/infra/codegen' },
},
],
},
{
path: '/bpm',
component: Layout,
hidden: true,
redirect: 'noredirect',
children: [
{
path: 'oa/leave/create',
component: (resolve) =>
require(['@/views/bpm/oa/leave/create'], resolve),
name: 'BpmOALeaveCreate',
meta: {
title: '发起 OA 请假',
icon: 'form',
activeMenu: '/bpm/oa/leave',
},
},
{
path: 'oa/leave/detail',
component: (resolve) =>
require(['@/views/bpm/oa/leave/detail'], resolve),
name: 'BpmOALeaveDetail',
meta: {
title: '查看 OA 请假',
icon: 'view',
activeMenu: '/bpm/oa/leave',
},
},
],
},
{
path: '/bpm',
component: Layout,
hidden: true,
children: [
{
path: 'manager/form/edit',
component: (resolve) =>
require(['@/views/bpm/form/formEditor'], resolve),
name: 'BpmFormEditor',
meta: { title: '流程表单-编辑', activeMenu: '/bpm/manager/form' },
},
{
path: 'manager/definition',
component: (resolve) =>
require(['@/views/bpm/definition/index'], resolve),
name: 'BpmProcessDefinition',
meta: { title: '流程定义', activeMenu: '/bpm/manager/model' },
},
{
path: 'manager/model/design',
component: (resolve) =>
require(['@/views/bpm/model/modelEditor'], resolve),
name: 'BpmModelEditor',
meta: { title: '设计流程', activeMenu: '/bpm/manager/model' },
},
{
path: 'process-instance/create',
component: (resolve) =>
require(['@/views/bpm/processInstance/create'], resolve),
name: 'BpmProcessInstanceCreate',
meta: { title: '发起流程', activeMenu: '/bpm/task/my' },
},
{
path: 'process-instance/detail',
component: (resolve) =>
require(['@/views/bpm/processInstance/detail'], resolve),
name: 'BpmProcessInstanceDetail',
meta: { title: '流程详情', activeMenu: '/bpm/task/my' },
},
],
},
{
path: '/property',
component: Layout,
hidden: true,
children: [
{
path: 'value/:propertyId(\\d+)',
component: (resolve) =>
require(['@/views/mall/product/property/value'], resolve),
name: 'ProductPropertyValue',
meta: {
title: '商品属性值',
icon: '',
activeMenu: '/product/property',
},
},
],
},
{
path: '/spu',
component: Layout,
hidden: true,
children: [
{
path: 'edit/:spuId(\\d+)',
component: (resolve) =>
require(['@/views/mall/product/spu/save'], resolve),
name: 'ProductSpuUpdate',
meta: { title: '修改商品', activeMenu: '/product/spu' },
},
{
path: 'add',
component: (resolve) =>
require(['@/views/mall/product/spu/save'], resolve),
name: 'ProductSpuCreate',
meta: { title: '添加商品', activeMenu: '/product/spu' },
},
],
},
{
path: '/trade/order',
component: Layout,
hidden: true,
children: [
{
path: 'detail',
name: 'TradeOrderDetail',
hidden: true,
meta: { title: '订单详情' },
component: (resolve) =>
require(['@/views/mall/trade/order/detail'], resolve),
},
],
},
{
path: '/pay',
component: Layout,
hidden: true,
children: [
{
path: 'order/submit',
name: 'PayOrderSubmit',
hidden: true,
meta: {
title: '收银台',
noCache: true,
},
component: (resolve) => require(['@/views/pay/order/submit'], resolve),
},
],
},
];
// 防止连续点击多次路由报错
let routerPush = Router.prototype.push;

View File

@@ -0,0 +1,38 @@
/*
* @Author: zhp
* @Date: 2022-06-14 14:28:55
* @LastEditTime: 2023-08-15 15:48:39
* @LastEditors: zhp
* @Description:
*/
const EventListener = {
/**
* Listen to DOM events during the bubble phase.
*
* @param {DOMEventTarget} target DOM element to register listener on.
* @param {string} eventType Event type, e.g. 'click' or 'mouseover'.
* @param {function} callback Callback function.
* @return {object} Object with a `remove` method.
*/
listen(target, eventType, callback) {
if (target.addEventListener) {
// console.log(1111)
target.addEventListener(eventType, callback, false)
return {
remove() {
target.removeEventListener(eventType, callback, false)
}
}
} else if (target.attachEvent) {
// console.log(222)
target.attachEvent('on' + eventType, callback)
return {
remove() {
target.detachEvent('on' + eventType, callback)
}
}
}
}
}
export default EventListener

View File

@@ -0,0 +1,170 @@
<template>
<header class="report-header">
<!-- logo 放在最左侧 -->
<!-- <img style="width: 221px;height: 31px;" src="" alt="benmaLogo" class="logo"> -->
<!-- 标题居中显示 -->
<!-- <h1>{{ topTitle }}</h1> -->
<!-- 实时时间显示 -->
<div class="header-right">
<img style="width: 426px;height: 44px;" src="../../../../assets/img/ssdlLeftTitle.png" alt="">
<!-- <div class="current-time">
<div class="YMD">{{ YMD }}</div>
<div class="time">{{ time }}</div>
</div> -->
</div>
<div class="header-right">
<img style="width: 426px;height: 44px;" src="../../../../assets/img/ssdlTitle.png" alt="">
<div class="current-time">
<div class="YMD">{{ YMD }}</div>
<div class="time">{{ time }}</div>
</div>
</div>
<!-- 全屏按钮保持在右侧 -->
<el-button type="text" class="screen-btn" :title="isFullScreen ? '退出全屏' : '全屏'" @click="changeFullScreen">
<svg-icon v-if="isFullScreen" icon-class="unFullScreenView" />
<svg-icon v-else icon-class="fullScreenView" />
</el-button>
</header>
</template>
<script>
export default {
name: 'Header',
props: {
isFullScreen: {
type: Boolean,
default: false
},
topTitle: {
type: String,
default: ''
}
},
data() {
return {
time: '',
YMD:'',
timeTimer: null // 用于存储定时器
}
},
methods: {
changeFullScreen() {
this.$emit('screenfullChange')
},
exportPDF() {
this.$emit('exportPDF')
},
// 更新当前时间
updateTime() {
const now = new Date()
const hours = this.padZero(now.getHours())
const minutes = this.padZero(now.getMinutes())
// 新增:获取并格式化秒数
const seconds = this.padZero(now.getSeconds())
const year = now.getFullYear()
const month = this.padZero(now.getMonth() + 1) // 补充月份补零避免单数字月份如3月显示为"3"
const day = this.padZero(now.getDate()) // 补充日期补零
// 时间格式更新为:时:分:秒
this.time = `${hours}${minutes}${seconds}`
// 日期格式优化月份和日期补零如2025.3.5 → 2025.03.05
this.YMD = `${year}.${month}.${day}`
},
// 补零函数保持不变(确保时分秒都是两位数)
padZero(num) {
return num < 10 ? '0' + num : num
}
},
mounted() {
// 初始化时间
this.updateTime()
// 设置定时器,每秒更新一次时间
this.timeTimer = setInterval(this.updateTime, 1000)
},
beforeDestroy() {
// 组件销毁前清除定时器,防止内存泄漏
if (this.timeTimer) {
clearInterval(this.timeTimer)
}
}
}
</script>
<style scoped lang="scss">
.report-header {
width: 1920px;
height: 72px;
background: #FFFFFF;
box-shadow: 0px 1px 4px 0px rgba(0, 21, 41, 0.12);
display: flex;
justify-content:space-between;
align-items: center;
position: relative;
padding: 0 20px;
// .logo {
// position: absolute;
// left: 40px;
// top: 15px;
// height: auto;
// object-fit: contain;
// }
.header-right{
display: flex;
gap: 15px;
}
h1 {
font-family: PingFangSC, PingFang SC;
font-weight: 400;
font-size: 48px;
color: #FFFFFF;
letter-spacing: 28px;
text-shadow: 1px 7px 2px #002144;
text-align: center;
margin: 0;
}
// 实时时间样式
.current-time {
// position: absolute;
// right: 100px; // 位于全屏按钮左侧
// top: 20px;
color: rgba(0, 0, 0, 0.85); // 假设使用白色文字,可根据实际设计调整
// font-size: 22px; // 可根据需要调整大小
font-weight: 600;
font-family: PingFangSC, PingFang SC;
font-weight: 500;
font-size: 16px;
line-height: 24px;
letter-spacing: 1px;
display: flex;
flex-direction: column;
.YMD{
font-weight: 600;
}
.time{
// width: 87px;
// height: 14px;
font-family: PingFangSC, PingFang SC;
font-weight: 600;
font-size: 16px;
color:rgba(0, 0, 0, 0.85);;
// line-height: 14px;
letter-spacing: 1px;
text-align: left;
font-style: normal;
}
}
.screen-btn {
color: #00fff0;
font-size: 26px;
position: absolute;
right: 21px;
top: 85px;
transform: translateY(-50%);
padding: 0;
}
}
</style>

View File

@@ -0,0 +1,299 @@
<template>
<div style="flex: 1">
<div class="agvStatusContent">
<div class="title">AGV状态</div>
<div class="agvDetailData">
<div class="item" v-for="(agv, index) in agvList" :key="agv.id">
<img class="car" src="../../../../assets/img/agvCar.png" alt="AGV小车">
<div class="eqInfo">
<div class="eqCode">
<div class="num">{{ index + 1 }}</div>
<div class="code">{{ agv.code }}</div>
</div>
<div class="eqStatusData">
<!-- 状态图标 -->
<img style="width: 16px; height: 16px; margin-right: 4px;" :src="require(`@/assets/img/${agv.statusImg}`)"
:alt="agv.status">
<!-- 状态文字固定宽度 -->
<div class="runningState" :style="getStatusColor(agv.status)">
{{ agv.status }}
</div>
<!-- 动态栅格容器 -->
<div class="charge" :class="{
'charge--run': agv.status !== '充电中', // 运行中/待命用run背景
'charge--charge': agv.status === '充电中' // 充电中用charge背景
}">
<div class="grid-item" :style="{ backgroundColor: getGridColor(agv.status) }"
v-for="(grid, idx) in generateGridArray(getGridCount(agv.progress))" :key="idx"
></div>
</div>
</div>
</div>
<div class="qty">
<div class="num">{{ agv.completed }}</div>
<div class="qtyTitle">今日完成</div>
</div>
</div>
</div>
</div>
</div>
</template>
<script>
export default {
name: 'AGVStatus',
components: {},
props: {
energyObj: {
type: Object,
default: () => ({
electricComu: 0,
steamComu: 0
})
}
},
data() {
return {
agvList: [
{
id: 1,
code: '设备编号1212121',
status: '运行中',
statusImg: 'runCircle.png',
completed: 47,
progress: 80 // 进度80% → 显示4个栅格
},
{
id: 2,
code: '设备编号3434343',
status: '待命',
statusImg: 'standbyCircle.png',
completed: 23,
progress: 40 // 进度40% → 显示2个栅格
},
{
id: 3,
code: '设备编号5656565',
status: '充电中',
statusImg: 'chargeCircle.png',
completed: 15,
progress: 100 // 进度100% → 显示5个栅格
},
{
id: 4,
code: '设备编号7878787',
status: '充电中',
statusImg: 'chargeCircle.png',
completed: 31,
progress: 60 // 进度60% → 显示3个栅格
}
]
}
},
methods: {
// 获取状态文字颜色
getStatusColor(status) {
const baseStyle = {
color: '', // 默认颜色
letterSpacing: '0px' // 默认字间距
};
switch (status) {
case '运行中':
baseStyle.color = '#0A4BFF';
break;
case '待命':
baseStyle.color = 'rgba(245, 154, 36, 1)';
baseStyle.letterSpacing = '8px'; // 待命状态单独加字间距(可调整数值)
break;
case '充电中':
baseStyle.color = 'rgba(0, 225, 37, 1)';
break;
default:
baseStyle.color = '';
}
return baseStyle;
},
// 根据状态获取背景图
getBgImage(status) {
return status === '充电中' ? 'chargeBg.png' : 'run.png';
},
// 根据状态获取栅格颜色
getGridColor(status) {
return status === '充电中'
? 'rgba(0, 225, 37, 1)'
: 'rgba(120, 138, 221, 1)';
},
getGridCount(progress) {
// 总栅格位置为5个进度0%→0个100%→5个按比例取整
const totalGrids = 5;
return Math.ceil((progress / 100) * totalGrids);
},
// 生成栅格数组用于v-for遍历
generateGridArray(count) {
// 生成 [1,2,...,count] 的数组长度为count
return Array.from({ length: count }, (_, i) => i + 1);
}
}
}
</script>
<style lang='scss' scoped>
.agvStatusContent {
width: 367px;
height: 512px;
background: #FFFFFF;
border-radius: 8px;
padding: 16px 18px 26px;
.title {
font-family: PingFangSC, PingFang SC;
font-weight: 400;
font-size: 16px;
color: rgba(0, 0, 0, 0.85);
line-height: 16px;
letter-spacing: 1px;
text-align: left;
font-style: normal;
position: relative;
padding-left: 12px;
&::before {
content: '';
width: 4px;
height: 16px;
background: #0A4BFF;
border-radius: 1px;
position: absolute;
left: 0;
top: 2px;
}
}
.agvDetailData {
margin-top: 15px;
display: flex;
flex-direction: column;
gap: 12px;
.item {
width: 332px;
height: 101px;
padding: 22px 0 0 10px;
display: flex;
background: url('../../../../assets/img/agvItemBg.png') no-repeat;
background-size: cover;
.car {
width: 66px;
height: 57px;
}
.eqInfo {
margin-left: 6px;
display: flex;
flex-direction: column;
gap: 8px;
.eqCode {
display: flex;
align-items: center;
.num {
width: 21px;
height: 24px;
background: #0065FF;
backdrop-filter: blur(1.5px);
font-family: PingFangSC, PingFang SC;
font-weight: 400;
font-size: 16px;
color: #FFFFFF;
line-height: 18px;
text-align: center;
}
.code {
margin-left: 4px;
font-family: PingFangSC, PingFang SC;
font-weight: 400;
font-size: 16px;
color: #020203;
line-height: 18px;
}
}
.eqStatusData {
display: flex;
align-items: center;
// 状态文字固定宽度(确保三种状态宽度一致)
.runningState {
font-family: PingFangSC, PingFang SC;
font-weight: 400;
font-size: 16px;
line-height: 20px;
width: 48px; // 固定宽度,适配三种状态文字
text-align: left; // 左对齐,避免空格填充
}
// 栅格容器样式
.charge {
width: 73px;
height: 27px;
margin-left: 5px;
background-size: 100% 100% !important;
background-repeat: no-repeat !important;
display: flex;
justify-content: flex-start;
gap: 1px;
padding: 5px 0px 4px 3px;
// 运行中/待命状态的背景图
&.charge--run {
background-image: url('../../../../assets/img/runBg.png');
}
// 充电中状态的背景图
&.charge--charge {
background-image: url('../../../../assets/img/chargeBg.png');
}
.grid-item {
width: 12px;
height: 18px;
border-radius: 2px;
}
}
}
}
.qty {
display: flex;
flex-direction: column;
margin-left: 24px;
gap: 12px;
.num {
font-family: PingFangSC, PingFang SC;
font-weight: 400;
font-size: 31px;
color: #000000;
line-height: 18px;
text-align: center;
}
.qtyTitle {
font-family: PingFangSC, PingFang SC;
font-weight: 400;
font-size: 14px;
color: rgba(2, 2, 3, 0.6);
line-height: 18px;
text-align: center;
}
}
}
}
}
</style>

View File

@@ -0,0 +1,97 @@
<template>
<div style="flex: 1">
<div class="agvStatusContent">
<div class="title">异常报警</div>
<div class="alarm-item" style="margin-top: 13px;">
<div class="item">
9:05:21|FMS|AGV-03顶升失败任务TSK25-1004中断
</div>
<div class="item">
9:05:21|FMS|AGV-03顶升失败任务TSK25-1004中断
</div>
</div>
</div>
</div>
</template>
<script>
// import baseTable from './baseTable.vue'
// import baseStatus from './baseStatus.vue'
// import handingObject from './handingObject.vue'
export default {
name: 'AGVStatus',
components: {},
props: {
// energyObj: {
// type: Object,
// default: () => ({
// electricComu: 0,
// steamComu: 0
// })
// }
},
data() {
return {
}
},
methods: {
},
}
</script>
<style lang='scss' scoped>
.agvStatusContent {
width: 930px;
height: 92px;
background: #FFFFFF;
border-radius: 8px;
padding: 16px 18px 0 18px;
.title {
font-family: PingFangSC, PingFang SC;
font-weight: 400;
font-size: 16px;
color: rgba(0, 0, 0, 0.85);
line-height: 16px;
letter-spacing: 1px;
text-align: left;
font-style: normal;
position: relative;
padding-left: 12px;
&::before {
content: '';
width: 4px;
height: 16px;
background: #0A4BFF;
border-radius: 1px;
position: absolute;
left: 0;
top: 2px;
}
}
.alarm-item {
display: flex;
gap: 10px;
.item {
width: 436px;
height: 32px;
border: 1px rgba(0, 0, 0, 0.3) dashed;
background: url('../../../../assets/img/alarmItemBg.png') no-repeat;
background-size: 100% 100%;
font-family: PingFangSC, PingFang SC;
font-weight: 400;
font-size: 14px;
padding: 0 16px;
color: #000000;
line-height: 32px;
letter-spacing: 1px;
text-align: left;
font-style: normal;
}
}
}
</style>

View File

@@ -0,0 +1,232 @@
<template>
<div style="flex: 1">
<div class="agvStatusContent">
<div class="title">异常原因Top5</div>
<div class="alarm-item" style="margin-top: 14px;">
<div class="item top1">
<dov class="item-data">
<div class="data-unit">
单位/
</div>
<div class="data-detail">
<div class="data-title">
放货有货
</div>
<div class="data-num">
261,938,984
</div>
</div>
</dov>
</div>
<div class="item top2">
<dov class="item-data">
<div class="data-unit">
单位/
</div>
<div class="data-detail">
<div class="data-title">
车辆故障
</div>
<div class="data-num">
261,938,984
</div>
</div>
</dov>
</div>
<div class="item top3">
<dov class="item-data">
<div class="data-unit">
单位/
</div>
<div class="data-detail">
<div class="data-title">
下发失败
</div>
<div class="data-num">
261,938,984
</div>
</div>
</dov>
</div>
<div class="item top4">
<dov class="item-data">
<div class="data-unit">
单位/
</div>
<div class="data-detail">
<div class="data-title">
取货无货
</div>
<div class="data-num">
261,938,984
</div>
</div>
</dov>
</div>
<div class="item top5">
<dov class="item-data">
<div class="data-unit">
单位/
</div>
<div class="data-detail">
<div class="data-title">
通信中断
</div>
<div class="data-num">
261,938,984
</div>
</div>
</dov>
</div>
</div>
</div>
</div>
</template>
<script>
// import baseTable from './baseTable.vue'
// import baseStatus from './baseStatus.vue'
// import handingObject from './handingObject.vue'
export default {
name: 'AGVStatus',
components: {},
props: {
// energyObj: {
// type: Object,
// default: () => ({
// electricComu: 0,
// steamComu: 0
// })
// }
},
data() {
return {
}
},
methods: {
},
}
</script>
<style lang='scss' scoped>
.agvStatusContent {
width: 402px;
height: 442px;
background: #FFFFFF;
border-radius: 8px;
padding: 16px 24px;
.title {
font-family: PingFangSC, PingFang SC;
font-weight: 400;
font-size: 16px;
color: rgba(0, 0, 0, 0.85);
line-height: 16px;
letter-spacing: 1px;
text-align: left;
font-style: normal;
position: relative;
padding-left: 12px;
&::before {
content: '';
width: 4px;
height: 16px;
background: #0A4BFF;
border-radius: 1px;
position: absolute;
left: 0;
top: 2px;
}
}
.alarm-item {
display: flex;
gap: 8px;
flex-direction: column;
.item {
width: 354px;
height: 70px;
background: url('../../../../assets/img/alarmItemBg.png') no-repeat;
background-size: 100% 100%;
.item-data {
margin-left: 95px;
margin-top: 14px;
display: flex;
gap: 2px;
flex-direction: column;
.data-unit {
// width: 58px;
// height: 17px;
font-family: PingFangSC, PingFang SC;
font-weight: 400;
font-size: 14px;
color:rgba(0, 0, 0, 0.7);
line-height: 17px;
letter-spacing: 2px;
text-align: left;
font-style: normal;
}
.data-detail {
display: flex;
gap: 12px;
.data-title {
// width: 80px;
// height: 17px;
font-family: PingFangSC, PingFang SC;
font-weight: 400;
font-size: 18px;
color: rgba(0, 0, 0, 0.7);
line-height: 17px;
letter-spacing: 1px;
text-align: left;
font-style: normal;
}
.data-num{
// width: 138px;
// height: 17px;
font-family: PingFangSC, PingFang SC;
font-weight: 400;
font-size: 24px;
color: #000000;
line-height: 12px;
text-align: left;
font-style: normal;
}
}
}
}
.top1 {
background: url('../../../../assets/img/Top1.png') no-repeat;
background-size: 100% 100%;
}
.top2 {
background: url('../../../../assets/img/Top2.png') no-repeat;
background-size: 100% 100%;
}
.top3 {
background: url('../../../../assets/img/Top3.png') no-repeat;
background-size: 100% 100%;
}
.top4 {
background: url('../../../../assets/img/Top4.png') no-repeat;
background-size: 100% 100%;
}
.top5 {
background: url('../../../../assets/img/Top5.png') no-repeat;
background-size: 100% 100%;
}
}
}
</style>

View File

@@ -0,0 +1,294 @@
<!--
* @Author: gtz
* @Date: 2022-01-19 15:58:17
* @LastEditors: zhp
* @LastEditTime: 2023-09-16 18:52:57
* @Description: file content
* @FilePath: \mt-bus-fe\src\views\OperationalOverview\components\baseContainer\index.vue
-->
<template>
<div
class="base-container"
:style="{ height: '100%', fontSize: 12 * beilv + 'px', padding: 12 * beilv + 'px' }"
:class="{ 'no-padding': noPadding, 'border-none': !showLine }"
>
<!-- <div class="base-container" :style="{height: height * beilv + 'px', fontSize: 12 * beilv + 'px', padding: 12 * beilv + '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">
<div class="line line-bottom" />
<div class="line line-bottom-vertical" />
<div class="line line-bottom-right" />
<div class="line line-bottom-right-vertical" />
<span class="title">
<!-- <svg-icon :icon-class="titleIcon" style="font-size: 1.5em; position: relative; top: .08em" /> -->
{{ title }}
</span>
<span class="colorBlock One" />
<span class="colorBlock Two" />
<span class="colorBlock Three" />
<span class="colorBlock Four" />
</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;
// opacity: 0.65;
border-bottom: 2px solid;
border-image: linear-gradient(90deg, rgba(195, 255, 251, 0), rgba(0, 255, 236, 1), rgba(144, 255, 246, 0)) 2 2;
filter: blur(0px);
filter: blur(0px);
.line {
position: absolute;
border-top: 1px solid #52fff1;
width: .8em;
top: -0.1em;
left: -0.1em;
&-vertical {
// top: calc(-5em / 12);
left: calc(-1em / 12);
transform: rotate(90deg);
transform-origin: left;
}
&-right {
top: -0.1em;
right: .01em;
left: inherit;
}
&-right-vertical {
top: calc(-2em / 12);
right: calc(-1em / 12);
left: inherit;
transform: rotate(-90deg);
transform-origin: right;
}
&-bottom {
top: inherit;
bottom: 0.01em;
left: -0.1em;
}
&-bottom-vertical {
top: inherit;
left: calc(-1em / 12);
bottom: calc(1em / 12);
transform: rotate(-90deg);
transform-origin: left;
}
&-bottom-right {
top: inherit;
left: inherit;
bottom: 0.01em;
right: 0.01em;
}
&-bottom-right-vertical {
top: inherit;
left: inherit;
right: calc(-1em / 12);
bottom: calc(-1em / 12);
transform: rotate(90deg);
transform-origin: right;
}
}
.bar-item {
height: 100%;
display: flex;
flex-direction: column;
}
.bar-title {
width: 100%;
background: linear-gradient(90deg, rgba(75, 239, 255, 0.28) 0%, rgba(0, 169, 205, 0) 20%,), linear-gradient(180deg, rgba(75, 239, 255, 0.28) 0%,
rgba(0, 169, 205, 0) 20%);
backdrop-filter: blur(1.5px);
color: #52fff1;
.colorBlock{
display: inline-block;
width: 4px;
height: 16px;
background: #31A6AE;
opacity: 0.84;
backdrop-filter: blur(1.5px);
margin-left: 39em;
// margin-top: 1.2em;
}
.Two{
opacity: 0.55;
margin-left: 0.375em;
}
.Three {
opacity: 0.29;
margin-left: 0.375em;
}
.Four {
opacity: 0.16;
margin-left: 0.375em;
}
font-size: 1.5em;
height: 3em;
position: relative;
.line {
position: absolute;
border-top: 1px solid #52fff1;
width: .5em;
// top: -0.1em;
// left: -0.1em;
// &-vertical {
// // top: calc(-5em / 12);
// left: calc(-1em / 12);
// transform: rotate(90deg);
// transform-origin: left;
// }
// &-right {
// top: -0.1em;
// right: .01em;
// left: inherit;
// }
// &-right-vertical {
// top: calc(-2em / 12);
// right: calc(-1em / 12);
// left: inherit;
// transform: rotate(-90deg);
// transform-origin: right;
// }
&-bottom {
top: inherit;
bottom: 0.01em;
left: -0.1em;
}
&-bottom-vertical {
top: inherit;
left: calc(-1em / 12);
bottom: calc(1em / 12);
transform: rotate(-90deg);
transform-origin: left;
}
&-bottom-right {
top: inherit;
left: inherit;
bottom: 0.01em;
right: 0.01em;
}
&-bottom-right-vertical {
top: inherit;
left: inherit;
right: calc(-0.1em / 12);
bottom: calc(.1em / 12);
transform: rotate(90deg);
transform-origin: right;
}
}
.title{
margin-left: 1.75em;
margin-top: 1em;
width: 7em;
// height: 100%;
display: inline-block;
}
// 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

@@ -0,0 +1,294 @@
<!--
* @Author: gtz
* @Date: 2022-01-19 15:58:17
* @LastEditors: zhp
* @LastEditTime: 2023-09-16 10:04:49
* @Description: file content
* @FilePath: \mt-bus-fe\src\views\OperationalOverview\components\baseContainer\index.vue
-->
<template>
<div
class="base-container"
:style="{ height: '100%', fontSize: 12 * beilv + 'px', padding: 12 * beilv + 'px' }"
:class="{ 'no-padding': noPadding, 'border-none': !showLine }"
>
<!-- <div class="base-container" :style="{height: height * beilv + 'px', fontSize: 12 * beilv + 'px', padding: 12 * beilv + '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">
<div class="line line-bottom" />
<div class="line line-bottom-vertical" />
<div class="line line-bottom-right" />
<div class="line line-bottom-right-vertical" />
<span class="title">
<!-- <svg-icon :icon-class="titleIcon" style="font-size: 1.5em; position: relative; top: .08em" /> -->
{{ title }}
</span>
<span class="colorBlock One" />
<span class="colorBlock Two" />
<span class="colorBlock Three" />
<span class="colorBlock Four" />
</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;
// opacity: 0.65;
border-bottom: 2px solid;
border-image: linear-gradient(90deg, rgba(195, 255, 251, 0), rgba(0, 255, 236, 1), rgba(144, 255, 246, 0)) 2 2;
filter: blur(0px);
filter: blur(0px);
.line {
position: absolute;
border-top: 1px solid #52fff1;
width: .8em;
top: -0.1em;
left: -0.1em;
&-vertical {
// top: calc(-5em / 12);
left: calc(-1em / 12);
transform: rotate(90deg);
transform-origin: left;
}
&-right {
top: -0.1em;
right: .01em;
left: inherit;
}
&-right-vertical {
top: calc(-2em / 12);
right: calc(-1em / 12);
left: inherit;
transform: rotate(-90deg);
transform-origin: right;
}
&-bottom {
top: inherit;
bottom: 0.01em;
left: -0.1em;
}
&-bottom-vertical {
top: inherit;
left: calc(-1em / 12);
bottom: calc(1em / 12);
transform: rotate(-90deg);
transform-origin: left;
}
&-bottom-right {
top: inherit;
left: inherit;
bottom: 0.01em;
right: 0.01em;
}
&-bottom-right-vertical {
top: inherit;
left: inherit;
right: calc(-1em / 12);
bottom: calc(-1em / 12);
transform: rotate(90deg);
transform-origin: right;
}
}
.bar-item {
height: 100%;
display: flex;
flex-direction: column;
}
.bar-title {
width: 100%;
background: linear-gradient(90deg, rgba(75, 239, 255, 0.28) 0%, rgba(0, 169, 205, 0) 20%,), linear-gradient(180deg, rgba(75, 239, 255, 0.28) 0%,
rgba(0, 169, 205, 0) 20%);
backdrop-filter: blur(1.5px);
color: #52fff1;
.colorBlock{
display: inline-block;
width: 4px;
height: 16px;
background: #31A6AE;
opacity: 0.84;
backdrop-filter: blur(1.5px);
margin-left: 14em;
// margin-top: 1.2em;
}
.Two{
opacity: 0.55;
margin-left: 0.375em;
}
.Three {
opacity: 0.29;
margin-left: 0.375em;
}
.Four {
opacity: 0.16;
margin-left: 0.375em;
}
font-size: 1.5em;
height: 3em;
position: relative;
.line {
position: absolute;
border-top: 1px solid #52fff1;
width: .5em;
// top: -0.1em;
// left: -0.1em;
// &-vertical {
// // top: calc(-5em / 12);
// left: calc(-1em / 12);
// transform: rotate(90deg);
// transform-origin: left;
// }
// &-right {
// top: -0.1em;
// right: .01em;
// left: inherit;
// }
// &-right-vertical {
// top: calc(-2em / 12);
// right: calc(-1em / 12);
// left: inherit;
// transform: rotate(-90deg);
// transform-origin: right;
// }
&-bottom {
top: inherit;
bottom: 0.01em;
left: -0.1em;
}
&-bottom-vertical {
top: inherit;
left: calc(-1em / 12);
bottom: calc(1em / 12);
transform: rotate(-90deg);
transform-origin: left;
}
&-bottom-right {
top: inherit;
left: inherit;
bottom: 0.01em;
right: 0.01em;
}
&-bottom-right-vertical {
top: inherit;
left: inherit;
right: calc(-0.1em / 12);
bottom: calc(.1em / 12);
transform: rotate(90deg);
transform-origin: right;
}
}
.title{
margin-left: 1.75em;
margin-top: 1em;
width: 6em;
// height: 100%;
display: inline-block;
}
// 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

@@ -0,0 +1,348 @@
<!--
* @Author: gtz
* @Date: 2022-01-19 15:58:17
* @LastEditors: DY
* @LastEditTime: 2023-12-12 14:37:29
* @Description: file content
* @FilePath: \mt-bus-fe\src\views\OperationalOverview\components\baseContainer\index.vue
-->
<template>
<div
class="base-container"
:style="{ height: '100%', fontSize: 12 * beilv + 'px', padding: 12 * beilv + 'px' }"
:class="{ 'no-padding': noPadding, 'border-none': !showLine }"
>
<!-- <div class="base-container" :style="{height: height * beilv + 'px', fontSize: 12 * beilv + 'px', padding: 12 * beilv + '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">
<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>
<div class="title">
<!-- <svg-icon :icon-class="titleIcon" style="font-size: 1.5em; position: relative; top: .08em" /> -->
{{ title }}
</div>
<span :class="curIndex === 1 ? 'num' : 'numTwo'" @click="changeTab(1)">
芯片数量
<!-- <top-radio-group :data-type="0" @change-time-range="handleChangeOptions('产出数量图', $event)" /> -->
</span>
<span :class="curIndex === 2 ? 'num' : 'numTwo'" @click="changeTab(2)">
组件数量
<!-- <top-radio-group :data-type="0" @change-time-range="handleChangeOptions('产出数量图', $event)" /> -->
</span>
</div>
</div>
<div class="bar-content" :class="{ 'p-0': noContentPadding }">
<slot />
</div>
</div>
</div>
</template>
<script>
// import TopRadioGroup from '../topRadioGroup'
export default {
name: 'BaseContainer',
// components: {
// TopRadioGroup
// },
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: 1
}
},
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;
// opacity: 0.65;
border-bottom: 2px solid;
border-image: linear-gradient(90deg, rgba(195, 255, 251, 0), rgba(0, 255, 236, 1), rgba(144, 255, 246, 0)) 2 2;
filter: blur(0px);
filter: blur(0px);
.line {
position: absolute;
border-top: 1px solid #52fff1;
width: .8em;
top: -0.1em;
left: -0.1em;
&-vertical {
// top: calc(-5em / 12);
left: calc(-1em / 12);
transform: rotate(90deg);
transform-origin: left;
}
&-right {
top: -0.1em;
right: .01em;
left: inherit;
}
&-right-vertical {
top: calc(-2em / 12);
right: calc(-1em / 12);
left: inherit;
transform: rotate(-90deg);
transform-origin: right;
}
&-bottom {
top: inherit;
bottom: 0.01em;
left: -0.1em;
}
&-bottom-vertical {
top: inherit;
left: calc(-1em / 12);
bottom: calc(1em / 12);
transform: rotate(-90deg);
transform-origin: left;
}
&-bottom-right {
top: inherit;
left: inherit;
bottom: 0.01em;
right: 0.01em;
}
&-bottom-right-vertical {
top: inherit;
left: inherit;
right: calc(-1em / 12);
bottom: calc(-1em / 12);
transform: rotate(90deg);
transform-origin: right;
}
}
.bar-item {
height: 100%;
display: flex;
flex-direction: column;
}
.bar-title {
width: 100%;
background: linear-gradient(90deg, rgba(75, 239, 255, 0.28) 0%, rgba(0, 169, 205, 0) 20%,), linear-gradient(180deg, rgba(75, 239, 255, 0.28) 0%,
rgba(0, 169, 205, 0) 20%);
backdrop-filter: blur(1.5px);
color: #52fff1;
.colorBlock{
display: inline-block;
width: 4px;
height: 16px;
background: #31A6AE;
opacity: 0.84;
backdrop-filter: blur(1.5px);
margin-left: 14em;
// margin-top: 1.2em;
}
.Two{
opacity: 0.55;
margin-left: 0.375em;
}
.Three {
opacity: 0.29;
margin-left: 0.375em;
}
.Four {
opacity: 0.16;
margin-left: 0.375em;
}
font-size: 1.5em;
height: 3em;
position: relative;
.line {
position: absolute;
border-top: 1px solid #52fff1;
width: .5em;
// top: -0.1em;
// left: -0.1em;
// &-vertical {
// // top: calc(-5em / 12);
// left: calc(-1em / 12);
// transform: rotate(90deg);
// transform-origin: left;
// }
// &-right {
// top: -0.1em;
// right: .01em;
// left: inherit;
// }
// &-right-vertical {
// top: calc(-2em / 12);
// right: calc(-1em / 12);
// left: inherit;
// transform: rotate(-90deg);
// transform-origin: right;
// }
&-bottom {
top: inherit;
bottom: 0.01em;
left: -0.1em;
}
&-bottom-vertical {
top: inherit;
left: calc(-1em / 12);
bottom: calc(1em / 12);
transform: rotate(-90deg);
transform-origin: left;
}
&-bottom-right {
top: inherit;
left: inherit;
bottom: 0.01em;
right: 0.01em;
}
&-bottom-right-vertical {
top: inherit;
left: inherit;
right: calc(-0.1em / 12);
bottom: calc(.1em / 12);
transform: rotate(90deg);
transform-origin: right;
}
}
.title{
margin-left: 1.75em;
margin-top: 1em;
width: 6em;
float: left;
// height: 100%;
// display: inline-block;
}
// padding: 0.67em;
}
.bar-content {
// padding: 1em;
flex: 1 auto;
}
.no-padding {
padding: 0;
}
.p-0 {
padding: 0;
}
&.border-none {
border: none;
}
}
.num{
font-size: 12px;
display: inline-block;
margin-top: 14px;
margin-left: 0.5em;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #FFFFFF;
line-height: 18px;
}
.num:after {
content: '';
// bottom: 20%;
width: 100%;
height: 1px;
border-bottom: 1px solid #ccc;
display: inline-block;
// margin-left: 24px;
margin-bottom: 4px;
box-shadow: 0px 0px 2px 0px rgba(82, 255, 241, 0.34);
border: 1px solid;
border-image: linear-gradient(90deg, rgba(138, 255, 249, 0), rgba(112, 255, 245, 1), rgba(82, 255, 241, 0)) 2 2;
}
.numTwo{
font-size: 14px;
display: inline-block;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #FFFFFF;
line-height: 18px;
opacity: .39;
margin-left: .5em;
}
.numTwo:after {
content: '';
// bottom: 20%;
width: 100%;
// height: 1px;
// border-bottom: 1px solid #ccc;
display: inline-block;
// margin-left: 24px;
margin-bottom: 10px;
}
</style>

View File

@@ -0,0 +1,111 @@
<template>
<div class="status-text" :class="getStatusClass()">
{{ injectData.status }}
</div>
</template>
<script>
export default {
name: 'StatusLabel',
props: {
injectData: {
type: Object,
default: () => ({}),
required: true
}
},
methods: {
// 将中文状态转换为英文
getStatusText() {
const statusMap = {
'暂停中': 'Paused',
'已终止': 'Terminated',
'已终止-回收': 'Terminated-Recycled',
'已终止-待回收': 'Terminated-PendingRecycling',
'异常': 'Abnormal',
'执行中': 'InProgress',
'已完成': 'Done',
'未完成': 'Pending'
};
return statusMap[this.injectData.status] || this.injectData.status;
},
// 判断是否为含"已终止"的状态(用于绑定样式)
getStatusClass() {
const chineseStatus = this.injectData.status || '';
// 包含"已终止"的中文状态统一归类为terminated类
if (chineseStatus.includes('已终止')) {
return 'terminated';
}
// 其他状态直接返回英文类名
return this.getStatusText();
}
}
};
</script>
<style scoped>
.status-text {
font-size: 14px;
padding: 2px 8px 2px 24px;
border-radius: 4px;
display: inline-flex;
align-items: center;
position: relative;
}
/* 所有含"已终止"的状态共用样式 */
.status-text.terminated::before {
content: '';
position: absolute;
left: 8px;
width: 14px;
height: 14px;
/* border-radius: 2px; */
background: url('../../../../assets/img/recycle.png') no-repeat;
background-size: cover;
/* 已终止系列统一色块 */
}
.status-text.terminated {
color: rgba(89, 89, 89, 1);
/* 已终止系列统一文字色 */
}
/* 暂停中样式 */
.status-text.Paused::before {
content: '';
position: absolute;
left: 8px;
width: 14px;
height: 14px;
/* border-radius: 2px; */
background: url('../../../../assets/img/recycle.png') no-repeat;
background-size: cover;
}
.status-text.Paused {
color: rgba(245, 154, 36, 1);
}
/* 其他状态样式 */
.status-text.Abnormal {
color: rgba(255, 0, 0, 1);
padding: 2px 8px;
/* 无左侧色块 */
}
.status-text.InProgress {
color: rgba(0, 101, 255, 1);
padding: 2px 8px;
}
.status-text.Done {
color: #4CAF50;
padding: 2px 8px;
}
.status-text.Pending {
color: #FF9800;
padding: 2px 8px;
}
</style>

View File

@@ -0,0 +1,250 @@
<!--
* @Date: 2020-12-14 09:07:03
* @LastEditors: zhp
* @LastEditTime: 2024-09-05 09:50:14
* @FilePath: \mt-bus-fe\src\views\OperationalOverview\components\baseTable.vue
* @Description:
-->
<template>
<div class="visual-base-table-container">
<el-table :max-height="maxHeight" ref="scroll_Table" @mouseenter.native="autoScroll(true)"
@mouseleave.native="autoScroll(false)" v-loading="isLoading"
:header-cell-style="{ background: 'rgba(250, 250, 250, 1)', color: 'rgba(0, 0, 0, 0.85)',padding:'3px 2px'}" :row-style="setRowStyle"
:data="renderData" border style="width: 100%; background: transparent">
<el-table-column v-if="page && limit && showIndex" prop="_pageIndex" label="序号" :width="70" align="center" />
<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: {
maxHeight: {
type: [Number, String], // 支持数字如300或字符串如'300px'
required: false,
default: 280 // 原固定值,作为默认 fallback
},
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
},
showIndex: {
type: Boolean,
default: true
}
},
data() {
return {
tableConfigBak: [],
selectedBox: new Array(100).fill(true)
}
},
computed: {
renderData() {
if (this.tableData.length && !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(100).fill(true)
},
mounted() {
this.autoScroll()
},
beforeDestroy() {
this.autoScroll(true)
},
methods: {
autoScroll(stop) {
const table = this.$refs.scroll_Table
if (!table) return; // 防止table未加载时出错
const divData = table.$refs.bodyWrapper
if (stop) {
window.clearInterval(this.scrolltimer)
} else {
// 先清除已有计时器,避免重复创建
if (this.scrolltimer) {
window.clearInterval(this.scrolltimer)
}
this.scrolltimer = window.setInterval(() => {
// 每次滚动1像素
divData.scrollTop += 1
// 关键修改:使用>=判断,允许微小像素偏差
if (divData.scrollTop + divData.clientHeight >= divData.scrollHeight - 1) {
// 滚动到底部后,重置到顶部(延迟一点更自然)
// setTimeout(() => {
divData.scrollTop = 0
// }, 2000); // 停顿500ms后再从头滚动
}
}, 200) // 滚动速度(数值越小越快)
}
},
emitData(val) {
this.$emit('emitFun', val)
},
setRowStyle(v) {
if (v.rowIndex % 2 === 0) {
return {
background: '#ffff',
color: 'rgba(89, 89, 89, 1)',
height: 33 + 'px',
lineHeight: 26 + 'px',
padding: 0,
fontSize: 12 + 'px'
}
} else {
return {
background: '#ffff',
color: 'rgba(89, 89, 89, 1)',
height: 33 + 'px',
lineHeight: 26 + 'px',
padding: 0,
fontSize: 12 + 'px'
}
}
},
setCellStyle() {
return {
// lineHeight: 23 + 'px'
}
}
}
}
</script>
<style lang="scss" scoped>
// @import "./styles/index.scss";
.visual-base-table-container {
.el-table {
border: 0;
// 关键修改:隐藏滚动条但保留滚动功能
&::-webkit-scrollbar {
width: 0;
height: 0;
background: transparent;
}
// 隐藏表头的gutter
.el-table__header .el-table__cell.gutter {
display: none !important;
}
// 表格主体内容区滚动条处理
.el-table__body-wrapper {
&::-webkit-scrollbar {
width: 0;
height: 0;
}
&::-webkit-scrollbar-thumb {
background: transparent;
}
&::-webkit-scrollbar-track {
background: transparent;
}
overflow-y: auto !important; // 确保垂直滚动可用
overflow-x: auto !important; // 确保水平滚动可用
}
// 固定列滚动条处理
.el-table__fixed,
.el-table__fixed-right {
.el-table__fixed-body-wrapper {
&::-webkit-scrollbar {
width: 0;
height: 0;
}
overflow-y: auto !important;
overflow-x: auto !important;
}
}
}
.el-table::before,.el-table--border::after {
background-color: transparent;
}
.el-table th,td{
border-color: rgba(232, 232, 232, 1) !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

@@ -0,0 +1,77 @@
<template>
<div class="handling-object">
<!-- 左侧内容L:名称+规格 -->
<div class="handling-item left">
<div class="table-icon left-icon"></div>
<span style="margin-left: 4px;">{{ leftContent }}</span>
</div>
<!-- 右侧内容R:名称+规格 -->
<div class="handling-item right">
<div class="table-icon right-icon"></div>
<span style="margin-left: 4px;">{{ rightContent }}</span>
</div>
</div>
</template>
<script>
export default {
name: 'HandlingObjectLabel',
props: {
injectData: {
type: Object,
default: () => ({}),
required: true
}
},
computed: {
// 拆分左侧内容L:xxx
leftContent() {
const handlingStr = this.injectData.handingObject || '';
const leftPart = handlingStr.split(',')[0] || ''; // 取第一个逗号前的部分
return leftPart.replace('L:', ''); // 移除前缀"L:"
},
// 拆分右侧内容R:xxx
rightContent() {
const handlingStr = this.injectData.handingObject || '';
const rightPart = handlingStr.split(',')[1] || ''; // 取第一个逗号后的部分
return rightPart.replace('R:', ''); // 移除前缀"R:"
}
}
};
</script>
<style scoped>
.handling-object {
display: flex;
flex-direction: column;
gap: 4px;
font-size: 14px;
padding: 4px 8px;
}
.handling-item {
display: flex;
align-items: center;
gap: 2px;
/* 防止子元素被压缩 */
flex-shrink: 0;
}
.table-icon {
width: 12px;
height: 12px;
background-size: cover;
background-repeat: no-repeat;
/* 固定图标尺寸,不被挤压 */
flex-shrink: 0;
}
/* 左侧图标 */
.left-icon {
background-image: url('../../../../assets/img/leftTable.png');
}
/* 右侧图标 */
.right-icon {
background-image: url('../../../../assets/img/rightTable.png');
}
</style>

View File

@@ -0,0 +1,62 @@
/*
* @Author: zhp
* @Date: 2023-08-16 08:43:53
* @LastEditTime: 2023-09-15 16:12:57
* @LastEditors: zhp
* @Description:
*/
import { debounce } from '@/utils'
export default {
data() {
return {
$_sidebarElm: null,
$_resizeHandler: null
}
},
mounted() {
this.$_resizeHandler = debounce(() => {
if (this.chart) {
this.chart.resize()
}
}, 100)
this.$_initResizeEvent()
this.$_initSidebarResizeEvent()
},
beforeDestroy() {
this.$_destroyResizeEvent()
this.$_destroySidebarResizeEvent()
},
// to fixed bug when cached by keep-alive
// https://github.com/PanJiaChen/vue-element-admin/issues/2116
activated() {
this.$_initResizeEvent()
this.$_initSidebarResizeEvent()
},
deactivated() {
this.$_destroyResizeEvent()
this.$_destroySidebarResizeEvent()
},
methods: {
// use $_ for mixins properties
// https://vuejs.org/v2/style-guide/index.html#Private-property-names-essential
$_initResizeEvent() {
window.addEventListener('resize', this.$_resizeHandler)
},
$_destroyResizeEvent() {
window.removeEventListener('resize', this.$_resizeHandler)
},
$_sidebarResizeHandler(e) {
if (e.propertyName === 'width') {
this.$_resizeHandler()
}
},
$_initSidebarResizeEvent() {
this.$_sidebarElm = document.getElementsByClassName('sidebar-container')[0]
this.$_sidebarElm && this.$_sidebarElm.addEventListener('transitionend', this.$_sidebarResizeHandler)
},
$_destroySidebarResizeEvent() {
this.$_sidebarElm && this.$_sidebarElm.removeEventListener('transitionend', this.$_sidebarResizeHandler)
}
}
}

View File

@@ -0,0 +1,273 @@
<template>
<!-- 动态绑定 ref使用 props 中的 chartRef而非硬编码 -->
<div :ref="chartRef" id="coreLineChart" style="height: 170px; width: 100%;"></div>
</template>
<script>
import * as echarts from 'echarts';
export default {
name: 'Container',
props: {
// 1. 重命名 propsref → chartRef避免关键字冲突同时定义类型和默认值
chartRef: {
type: String,
required: true, // 强制父组件传值,避免获取不到 DOM
// validator: (value) => {
// // 验证ref 名不能为空,确保有效
// return value.trim() !== '';
// }
}
},
components: {},
data() {
return {};
},
computed: {},
mounted() {
this.$nextTick(() => {
this.initData();
});
},
methods: {
initData() {
// 2. 动态获取 DOM通过 props 中的 chartRef 拿到对应的 ref 元素
const chartDom = this.$refs[this.chartRef];
if (!chartDom) {
console.error(`图表容器未找到!请确认父组件传递的 chartRef 为 "${this.chartRef}"`);
return;
}
const myChart = echarts.init(chartDom);
// 自定义颜色数组(与系列一一对应)
const customColors = [
'rgba(113, 100, 255, 1)',
'rgba(40, 138, 255, 1)',
'rgba(118, 218, 190, 1)',
'rgba(255, 206, 106, 1)',
];
const option = {
// 标题配置(主标题+副标题)
// title: [
// {
// text: '月度',
// left: 'center',
// top: '35%',
// textStyle: {
// fontSize: 24,
// letterSpacing: 5,
// color: 'rgba(0, 0, 0, 0.85)',
// fontFamily: 'PingFangSC, PingFang SC'
// }
// },
// {
// text: '单位:万m²',
// left: 'center',
// top: '50%',
// textStyle: {
// fontSize: 16,
// color: 'rgba(0, 0, 0, 0.55)',
// fontFamily: 'PingFangSC, PingFang SC'
// }
// }
// ],
series: [
{
// name: '销量',
type: 'pie',
radius: ['60%', '90%'],
center: ['50%', '50%'],
avoidLabelOverlap: false,
label: {
show: true,
position: 'outside',
distance: 10,
formatter: '{c}万m²\n{b}',
textStyle: {
fontSize: 14,
color: 'rgba(0, 0, 0, 0.7)',
fontFamily: 'PingFangSC, PingFang SC',
lineHeight: 1.5
}
},
labelLine: {
show: true,
length: 0,
length2: 30,
lineStyle: {
color: (params) => customColors[params.dataIndex]
}
},
itemStyle: {
color: (params) => customColors[params.dataIndex]
},
data: [
{
value: 348, name: '临时搬运',
label: {
normal: {
align: 'left',
distanceToLabelLine: 2,
formatter: (params) => [
`{b|${params.name.toLocaleString()}}`,
`{c|${params.percent.toFixed(1)}% ${params.value}}`
].join('\n'),
rich: {
b: {
color: 'rgba(140, 140, 140, 1)',
fontSize: 14,
padding: [0, 0, 0, 0]
},
c: {
color: 'rgba(0, 0, 0, 0.65)',
fontSize: 14,
padding: [30, 0, 0, 0]
}
}
}
},
labelLine: {
lineStyle: { color: 'rgba(80, 181, 255, 1)' }
},
itemStyle: { color: 'rgba(80, 181, 255, 1)' }
},
{
value: 435, name: '满盘搬运',
label: {
normal: {
align: 'left',
distanceToLabelLine: 2,
formatter: (params) => [
`{b|${params.name.toLocaleString()}}`,
`{c|${params.percent.toFixed(1)}% ${params.value}}`
].join('\n'),
rich: {
b: {
color: 'rgba(140, 140, 140, 1)',
fontSize: 14,
padding: [0, 0, 0, 0]
},
c: {
color: 'rgba(0, 0, 0, 0.65)',
fontSize: 14,
padding: [30, 0, 0, 0]
}
}
}
},
labelLine: {
length: 10,
length2: 20,
lineStyle: { color: 'rgba(40, 138, 255, 1)' }
},
itemStyle: { color: 'rgba(40, 138, 255, 1)' }
},
{
value: 580, name: '备料搬运',
label: {
normal: {
align: 'left',
distanceToLabelLine: 2,
formatter: (params) => [
`{b|${params.name.toLocaleString()}}`,
`{c| ${params.value} ${params.percent.toFixed(1)}%}`
].join('\n'),
rich: {
b: {
color: 'rgba(140, 140, 140, 1)',
fontSize: 14,
padding: [0, 0, 0, 0]
},
c: {
color: 'rgba(0, 0, 0, 0.65)',
fontSize: 14,
padding: [30, 0, 0, 0]
}
}
}
},
labelLine: {
lineStyle: { color: 'rgba(143, 146, 255, 1)' }
},
itemStyle: { color: 'rgba(143, 146, 255, 1)' }
},
{
value: 484, name: '空盘搬运',
label: {
normal: {
align: 'left',
distanceToLabelLine: 2,
formatter: (params) => [
`{b|${params.name.toLocaleString()}}`,
`{c| ${params.value} ${params.percent.toFixed(1)}%}`
].join('\n'),
rich: {
b: {
color: 'rgba(140, 140, 140, 1)',
fontSize: 14,
padding: [0, 0, 0, 0]
},
c: {
color: 'rgba(0, 0, 0, 0.65)',
fontSize: 14,
padding: [30, 0, 0, 0]
}
}
}
},
// label: {
// normal: {
// align: 'left',
// distanceToLabelLine: 2,
// formatter: (params) => [
// `{b|${params.value.toLocaleString()}}`,
// `{c|${params.name}}`
// ].join('\n'),
// rich: {
// // hr: {
// // color: 'rgba(168, 233, 255, 1)',
// // fontSize: 20,
// // padding: [26, 8, 0, 0]
// // },
// b: {
// color: 'rgba(0, 0, 0, 0.65)',
// fontSize: 18,
// padding: [0, 0, 0, 0]
// },
// c: {
// color: 'rgba(0, 0, 0, 0.65)',
// fontSize: 14,
// padding: [30, 0, 0, -5]
// }
// }
// }
// },
labelLine: {
lineStyle: { color: 'rgba(168, 233, 255, 1)' }
},
itemStyle: { color: 'rgba(168, 233, 255, 1)' }
}
]
}
]
};
option && myChart.setOption(option);
// 窗口缩放监听
window.addEventListener('resize', () => {
myChart.resize();
});
// 组件销毁清理
this.$once('hook:destroyed', () => {
window.removeEventListener('resize', () => {
myChart.resize();
});
myChart.dispose();
});
}
},
};
</script>

View File

@@ -0,0 +1,259 @@
<template>
<!-- 外层容器图表 + 自定义图例 -->
<div class="chart-legend-wrapper">
<!-- 图表容器 -->
<div :ref="chartRef" id="coreLineChart" class="chart-container"></div>
<!-- 自定义图例三排三列 + 带数值 -->
<div class="custom-legend">
<div class="legend-item" v-for="(item, index) in chartData" :key="index"
>
<!-- 左侧颜色块 + 名称垂直居中对齐 -->
<div class="legend-left">
<div class="legend-color" :style="{ backgroundColor: customColors[index] }"></div>
<span class="legend-name">{{ item.name }}</span>
</div>
<!-- 右侧数值与左侧垂直居中对齐 -->
<span class="legend-value">{{ item.value }}</span>
</div>
</div>
</div>
</template>
<script>
import * as echarts from 'echarts';
export default {
name: 'Container',
props: {
chartRef: {
type: String,
required: true
}
},
data() {
return {
myChart: null,
selectedStatus: [],
customColors: [
'rgba(255, 235, 106, 1)',
'rgba(255, 206, 106, 1)',
'rgba(255, 151, 71, 1)',
'rgba(152, 92, 255, 1)',
'rgba(113, 100, 255, 1)',
'rgba(143, 146, 255, 1)',
'rgba(40, 138, 255, 1)',
'rgba(80, 181, 255, 1)',
'rgba(168, 233, 255, 1)',
],
chartData: [
{ value: 348, name: '暂停中' },
{ value: 435, name: '已终止-回收' },
{ value: 580, name: '已终止-待回收' },
{ value: 484, name: '已终止' },
{ value: 484, name: '已完成' },
{ value: 484, name: '执行中' },
{ value: 484, name: '异常' },
{ value: 484, name: '待执行' },
{ value: 484, name: '待下发' },
]
};
},
mounted() {
this.$nextTick(() => {
this.initData();
});
},
methods: {
initData() {
const chartDom = this.$refs[this.chartRef];
if (!chartDom) {
console.error(`图表容器未找到!请确认父组件传递的 chartRef 为 "${this.chartRef}"`);
return;
}
this.myChart = echarts.init(chartDom);
this.selectedStatus = this.chartData.map(() => true);
const total = this.chartData.reduce((sum, item) => sum + item.value, 0);
const option = {
legend: { show: false },
tooltip: {
show: true,
trigger: 'item',
backgroundColor: '#FFFFFF',
boxShadow: '0px 4px 8px 0px rgba(0, 0, 0, 0.16)',
borderRadius: '4px',
width: 153,
height: 42,
borderWidth: 0,
textStyle: {
color: 'rgba(0, 0, 0, 0.85)',
fontSize: 14,
lineHeight: 1.5
},
formatter: (params) => {
const color = this.customColors[params.dataIndex];
const percent = ((params.value / total) * 100).toFixed(1);
return `
<div style="display: flex; align-items: center; gap: 8px;">
<div style="width: 12px; height: 12px; background: ${color};"></div>
<div style="display: flex; align-items: center; gap: 20px;">
<span>${params.name}</span>
<span>${params.value}</span>
</div>
</div>
`;
}
},
title: [
{
text: total.toString(),
left: 'center',
top: '35%',
textStyle: {
fontSize: 23,
letterSpacing: 5,
color: 'rgba(0, 0, 0, 0.65)',
fontFamily: 'PingFangSC, PingFang SC'
}
},
{
text: '总数',
left: 'center',
top: '50%',
textStyle: {
fontSize: 16,
color: 'rgba(0, 0, 0, 0.65)',
fontFamily: 'PingFangSC, PingFang SC'
}
}
],
series: [
{
type: 'pie',
radius: ['70%', '100%'],
center: ['50%', '50%'],
avoidLabelOverlap: false,
label: { show: false },
labelLine: { show: false },
itemStyle: {
color: (params) => this.customColors[params.dataIndex],
borderWidth: 2,
borderColor: '#fff'
},
data: this.chartData.map((item, index) => ({
...item,
itemStyle: { color: this.customColors[index] }
})),
selected: this.selectedStatus.reduce((obj, selected, index) => {
obj[this.chartData[index].name] = selected;
return obj;
}, {})
}
]
};
option && this.myChart.setOption(option);
window.addEventListener('resize', () => this.myChart?.resize());
this.$once('hook:destroyed', () => {
window.removeEventListener('resize', () => this.myChart?.resize());
this.myChart?.dispose();
});
},
handleLegendClick(index) {
this.selectedStatus[index] = !this.selectedStatus[index];
this.myChart.setOption({
series: [{
selected: this.selectedStatus.reduce((obj, selected, i) => {
obj[this.chartData[i].name] = selected;
return obj;
}, {})
}]
});
}
}
};
</script>
<style scoped lang="scss">
// 外层容器:横向排列,垂直居中
.chart-legend-wrapper {
width: 100%;
height: 170px;
display: flex;
align-items: center; // 整体垂直居中
}
// 图表容器
.chart-container {
height: 180px;
width: 30%;
}
// 图例容器:三列网格布局,垂直居中
.custom-legend {
margin-left: 10px;
box-sizing: border-box;
display: grid;
grid-template-columns: repeat(3, 1fr); // 三列
grid-template-rows: repeat(3, 1fr); // 两行6个item刚好2行3列
// gap: 15px 10px; // 行列间距
align-items: center; // 网格内垂直居中
}
// 单个图例项:横向排列,垂直居中
.legend-item {
display: flex;
align-items: left; // 内部元素垂直居中
flex-direction: column;
width: 100%;
cursor: pointer;
// gap: 10px; // 左右两部分间距
}
// 左侧:颜色块 + 名称(垂直居中)
.legend-left {
display: flex;
align-items: center; // 颜色块与名称垂直居中
gap: 8px; // 颜色块与名称间距
flex: 1; // 占满剩余空间,确保右侧数值靠右
}
// 颜色块
.legend-color {
width: 8px;
height: 8px;
border-radius: 2px;
flex-shrink: 0; // 防止被压缩
}
// 名称
.legend-name {
font-size: 14px;
color: rgba(140, 140, 140, 1);
font-family: 'PingFangSC, PingFang SC';
white-space: nowrap; // 防止换行
}
// 数值
.legend-value {
font-size: 14px;
margin-left: 16px;
color: rgba(0, 0, 0, 0.65);
font-weight: 500;
white-space: nowrap; // 防止换行
}
// 未选中状态
// .legend-item.unselected {
// .legend-name,
// .legend-value {
// color: rgba(0, 0, 0, 0.3);
// }
// .legend-color {
// opacity: 0.5;
// }
// }
</style>

View File

@@ -0,0 +1,86 @@
<template>
<div style="flex: 1">
<div class="agvStatusContent">
<div class="title">实时任务</div>
<base-table style="width: 100%;margin-top: 6px;height: 300px;" :page="1" :limit="10" :show-index="true" :beilv="1"
:tableConfig="tableProps" :table-data="maintenanceTasks" />
</div>
</div>
</template>
<script>
import baseTable from './baseTable.vue'
import baseStatus from './baseStatus.vue'
import handingObject from './handingObject.vue'
export default {
name: 'AGVStatus',
components: { baseTable },
props: {
// energyObj: {
// type: Object,
// default: () => ({
// electricComu: 0,
// steamComu: 0
// })
// }
},
data() {
return {
maintenanceTasks: [
{ id: 1, taskNum: 'ZD20250911000001', type: '空盘搬运', status: '暂停中', handingObject: 'L:名称+规格,R:名称+规格,', start: 'CK-01-A01-L/R', end: 'CK-01-A01-L/R', car: 'AGV-01',},
{ id: 1, taskNum: 'ZD20250911000001', type: '空盘搬运', status: '已终止-待回收', handingObject: '1313,252', start: 'CK-01-A01-L/R', end: 'CK-01-A01-L/R', car: 'AGV-02', },
{ id: 1, taskNum: 'ZD20250911000001', type: '满盘搬运', status: '异常', handingObject: '1313,252', start: 'CK-01-A01-L/R', end: 'CK-01-A01-L/R', car: 'AGV-03', },
{ id: 1, taskNum: 'ZD20250911000001', type: '备料搬运', status: '执行中', handingObject: '1313,252', start: 'CK-01-A01-L/R', end: 'CK-01-A01-L/R', car: 'AGV-04', },
{ id: 1, taskNum: 'ZD20250911000001', type: '满盘搬运', status: '执行中', handingObject: '1313,252', start: 'CK-01-A01-L/R', end: 'CK-01-A01-L/R', car: 'AGV-05', },
],
tableProps: [
{ prop: 'taskNum', label: '任务编号', align: 'left' },
{ prop: 'type', label: '类型', align: 'left' },
{ prop: 'status', label: '状态', align: 'left', subcomponent: baseStatus },
{ prop: 'handingObject', label: '搬运对象', align: 'left', subcomponent: handingObject },
{ prop: 'start', label: '起点', align: 'left' },
{ prop: 'end', label: '终点', align: 'left' },
{ prop: 'car', label: '执行车辆', align: 'left' },
]
}
},
methods: {
},
}
</script>
<style lang='scss' scoped>
.agvStatusContent {
width: 930px;
height: 330px;
background: #FFFFFF;
border-radius: 8px;
padding: 16px 18px 26px;
.title {
font-family: PingFangSC, PingFang SC;
font-weight: 400;
font-size: 16px;
color: rgba(0, 0, 0, 0.85);
line-height: 16px;
letter-spacing: 1px;
text-align: left;
font-style: normal;
position: relative;
padding-left: 12px;
&::before {
content: '';
width: 4px;
height: 16px;
background: #0A4BFF;
border-radius: 1px;
position: absolute;
left: 0;
top: 2px;
}
}
}
</style>

View File

@@ -0,0 +1,99 @@
@import './variables.scss';
@mixin colorBtn($color) {
background: $color;
&:hover {
color: $color;
&:before,
&:after {
background: $color;
}
}
}
.blue-btn {
@include colorBtn($blue)
}
.light-blue-btn {
@include colorBtn($light-blue)
}
.red-btn {
@include colorBtn($red)
}
.pink-btn {
@include colorBtn($pink)
}
.green-btn {
@include colorBtn($green)
}
.tiffany-btn {
@include colorBtn($tiffany)
}
.yellow-btn {
@include colorBtn($yellow)
}
.pan-btn {
font-size: 14px;
color: #fff;
padding: 14px 36px;
border-radius: 8px;
border: none;
outline: none;
transition: 600ms ease all;
position: relative;
display: inline-block;
&:hover {
background: #fff;
&:before,
&:after {
width: 100%;
transition: 600ms ease all;
}
}
&:before,
&:after {
content: '';
position: absolute;
top: 0;
right: 0;
height: 2px;
width: 0;
transition: 400ms ease all;
}
&::after {
right: inherit;
top: inherit;
left: 0;
bottom: 0;
}
}
.custom-button {
display: inline-block;
line-height: 1;
white-space: nowrap;
cursor: pointer;
background: #fff;
color: #fff;
-webkit-appearance: none;
text-align: center;
box-sizing: border-box;
outline: 0;
margin: 0;
padding: 10px 15px;
font-size: 14px;
border-radius: 4px;
}

View File

@@ -0,0 +1,173 @@
// cover some element-ui styles
.el-breadcrumb__inner,
.el-breadcrumb__inner a {
font-weight: 400 !important;
}
.el-upload {
input[type="file"] {
display: none !important;
}
}
.el-upload__input {
display: none;
}
.cell {
.el-tag {
margin-right: 0px;
}
}
.visual-container {
.el-table {
.cell {
line-height: 1.2em !important;
}
}
}
.app-container {
.el-table th>.cell {
color: rgb(0, 0, 0,0.85);
}
.el-table__body tr.current-row>td {
background-color: #EAF1FC;
}
}
.el-table--medium th, .el-table--medium td {
padding: 5px 0;
}
::v-deep .el-table__fixed-right {
right: 0 !important;
height: 100% !important;
}
.el-button--mini {
padding: 4px 0;
}
.small-padding {
.cell {
padding-left: 5px;
padding-right: 5px;
}
}
.fixed-width {
.el-button--mini {
padding: 7px 10px;
min-width: 60px;
}
}
.status-col {
.cell {
padding: 0 10px;
text-align: center;
.el-tag {
margin-right: 0px;
}
}
}
.el-button--primary {
background-color: #0B58FF !important;
border-color: #0B58FF !important;
}
// to fixed https://github.com/ElemeFE/element/issues/2461
.el-dialog {
transform: none;
left: 0;
position: relative;
margin: 0 auto;
border-radius: 4px;
}
.el-dialog__header {
padding: 12px 24px 8px;
border-bottom: 1px solid #E9E9E9;
text-align: left;
}
.el-dialog__title {
font-size: 16px;
font-weight: 700;
color: rgba(0, 0, 0, 0.85);
}
.el-form-item__label {
font-size: 14px;
font-weight: 400;
color: rgba(0, 0, 0, 0.65);
padding-right: 8px;
}
.el-dialog__headerbtn {
top: 16px;
right: 24px;
}
.el-form-item--medium .el-form-item__label {
line-height: 32px;
}
.el-button--medium {
padding: 8px 16px;
}
.el-select {
width: 100%;
}
.el-switch.is-checked .el-switch__core {
background-color: #0B58FF;
border-color: #0B58FF;
}
.el-radio__input.is-checked .el-radio__inner {
background-color: #0B58FF;
border-color: #0B58FF;
}
.el-button--text{
color:#0B58FF;
}
.el-tabs__item.is-active {
color: #0b58ff;
}
.el-tooltip__popper.is-dark {
max-width: 1100px;
}
// refine element ui upload
.upload-container {
.el-upload {
width: 100%;
.el-upload-dragger {
width: 100%;
height: 200px;
}
}
}
// dropdown
.el-dropdown-menu {
a {
display: block
}
}
// fix date-picker ui bug in filter-item
.el-range-editor.el-input__inner {
display: inline-flex !important;
}
// to fix el-date-picker css style
.el-range-separator {
box-sizing: content-box;
}

View File

@@ -0,0 +1,31 @@
/**
* I think element-ui's default theme color is too light for long-term use.
* So I modified the default color and you can modify it to your liking.
**/
/* theme color */
$--color-primary: #1890ff;
$--color-success: #13ce66;
$--color-warning: #ffba00;
$--color-danger: #ff4949;
// $--color-info: #1E1E1E;
$--button-font-weight: 400;
// $--color-text-regular: #1f2d3d;
$--border-color-light: #dfe4ed;
$--border-color-lighter: #e6ebf5;
$--table-border: 1px solid #dfe6ec;
/* icon font path, required */
$--font-path: "~element-ui/lib/theme-chalk/fonts";
@import "~element-ui/packages/theme-chalk/src/index";
// the :export directive is the magic sauce for webpack
// https://www.bluematador.com/blog/how-to-share-variables-between-js-and-sass
:export {
theme: $--color-primary;
}

View File

@@ -0,0 +1,319 @@
@import './variables.scss';
@import './mixin.scss';
@import './transition.scss';
@import './element-ui.scss';
@import './sidebar.scss';
@import './btn.scss';
body {
height: 100%;
-moz-osx-font-smoothing: grayscale;
-webkit-font-smoothing: antialiased;
text-rendering: optimizeLegibility;
font-family: Helvetica Neue, Helvetica, PingFang SC, Hiragino Sans GB, Microsoft YaHei, Arial, sans-serif;
}
label {
font-weight: 700;
}
html {
height: 100%;
box-sizing: border-box;
}
#app {
height: 100%;
}
*,
*:before,
*:after {
box-sizing: inherit;
}
.no-padding {
padding: 0px !important;
}
.padding-content {
padding: 4px 0;
}
a:focus,
a:active {
outline: none;
}
a,
a:focus,
a:hover {
cursor: pointer;
color: inherit;
text-decoration: none;
}
div:focus {
outline: none;
}
.fr {
float: right;
}
.fl {
float: left;
}
.pr-5 {
padding-right: 5px;
}
.pl-5 {
padding-left: 5px;
}
.block {
display: block;
}
.pointer {
cursor: pointer;
}
.inlineBlock {
display: block;
}
.clearfix {
&:after {
visibility: hidden;
display: block;
font-size: 0;
content: " ";
clear: both;
height: 0;
}
}
aside {
background: #eef1f6;
padding: 8px 24px;
margin-bottom: 20px;
border-radius: 2px;
display: block;
line-height: 32px;
font-size: 16px;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
color: #2c3e50;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
a {
color: #337ab7;
cursor: pointer;
&:hover {
color: rgb(32, 160, 255);
}
}
}
//main-container全局样式
.app-container {
margin:0 16px 0;
background-color: #fff;
border-radius: 4px;
padding: 16px 16px 0;
height: calc(100vh - 134px);
overflow: auto;
}
.components-container {
margin: 30px 50px;
position: relative;
}
// 覆盖原有的分页样式-start
.el-pagination {
position: relative;
}
.el-pagination.is-background .btn-prev,.el-pagination.is-background .btn-next,.el-pagination.is-background .el-pager li {
background-color: #fff;
}
.el-pagination__jump {
margin-left: 125px;
}
.el-pagination__sizes {
position: absolute;
right: 100px;
}
.el-pagination.is-background .el-pager li:not(.disabled).active {
background-color: #0B58FF;
}
.el-pagination .el-select .el-input .el-input__inner {
height: 22px;
}
.el-badge__content {
border: none;
}
// 覆盖原有的分页样式-end
.text-center {
text-align: center
}
.sub-navbar {
height: 50px;
line-height: 50px;
position: relative;
width: 100%;
text-align: right;
padding-right: 20px;
transition: 600ms ease position;
background: linear-gradient(90deg, rgba(32, 182, 249, 1) 0%, rgba(32, 182, 249, 1) 0%, rgba(33, 120, 241, 1) 100%, rgba(33, 120, 241, 1) 100%);
.subtitle {
font-size: 20px;
color: #fff;
}
&.draft {
background: #d0d0d0;
}
&.deleted {
background: #d0d0d0;
}
}
.link-type,
.link-type:focus {
color: #337ab7;
cursor: pointer;
&:hover {
color: rgb(32, 160, 255);
}
}
.filter-container {
padding-bottom: 10px;
.filter-item {
display: inline-block;
vertical-align: middle;
margin-bottom: 10px;
}
}
//refine vue-multiselect plugin
.multiselect {
line-height: 16px;
}
.multiselect--active {
z-index: 1000 !important;
}
// 业务代码中
.content-row {
padding: 10px 0;
}
.el-dialog {
width: 1000px;
}
.el-dialog__body {
padding: 30px 40px;
}
.el-dialog__wrapper {
backdrop-filter: blur(5px);
}
::-webkit-scrollbar {
width: 8px;
height: 8px;
background-color: transparent;
}
::-webkit-scrollbar-track-piece {
background-color:rgba(144,147,153,0);
}
::-webkit-scrollbar-corner {
background-color:rgba(144,147,153,0);
}
::-webkit-scrollbar-track {
width: 6px;
background: rgba(144,147,153,0);
-webkit-border-radius: 2em;
-moz-border-radius: 2em;
border-radius: 2em;
}
::-webkit-scrollbar-thumb {
background-color: rgba(144,147,153,.5);
background-clip: padding-box;
min-height: 28px;
-webkit-border-radius: 2em;
-moz-border-radius: 2em;
border-radius: 2em;
transition: background-color .3s;
cursor: pointer;
}
::-webkit-scrollbar-thumb:hover {
background-color: rgba(144,147,153,.3);
}
// 数据分析单选框样式覆盖
.app-container{
.data-analysis-radio{
.el-radio-button__inner {
border: 0;
padding: 7px 0;
margin: 0 15px;
}
.el-radio-button__orig-radio:checked+.el-radio-button__inner{
background-color: transparent;
color: #606266;
box-shadow: 0 0 0 0 transparent;
border-bottom: 2px solid #0B58FF;
}
.el-radio-button:first-child .el-radio-button__inner,
.el-radio-button:last-child .el-radio-button__inner {
border-radius: 0;
}
}
}
.el-table--group, .el-table--border {
border: none;
}
// 全局loading样式覆盖
.el-loading-mask{
z-index: 99999;
}
input::-webkit-input-placeholder {
/* WebKit browsers */
font-size:12px;
}
input::-moz-placeholder {
/* Mozilla Firefox 19+ */
font-size:12px;
}
input:-ms-input-placeholder {
font-size:12px;
}

View File

@@ -0,0 +1,66 @@
@mixin clearfix {
&:after {
content: "";
display: table;
clear: both;
}
}
@mixin scrollBar {
&::-webkit-scrollbar-track-piece {
background: #d3dce6;
}
&::-webkit-scrollbar {
width: 6px;
}
&::-webkit-scrollbar-thumb {
background: #99a9bf;
border-radius: 20px;
}
}
@mixin relative {
position: relative;
width: 100%;
height: 100%;
}
@mixin pct($pct) {
width: #{$pct};
position: relative;
margin: 0 auto;
}
@mixin triangle($width, $height, $color, $direction) {
$width: $width/2;
$color-border-style: $height solid $color;
$transparent-border-style: $width solid transparent;
height: 0;
width: 0;
@if $direction==up {
border-bottom: $color-border-style;
border-left: $transparent-border-style;
border-right: $transparent-border-style;
}
@else if $direction==right {
border-left: $color-border-style;
border-top: $transparent-border-style;
border-bottom: $transparent-border-style;
}
@else if $direction==down {
border-top: $color-border-style;
border-left: $transparent-border-style;
border-right: $transparent-border-style;
}
@else if $direction==left {
border-right: $color-border-style;
border-top: $transparent-border-style;
border-bottom: $transparent-border-style;
}
}

View File

@@ -0,0 +1,209 @@
#app {
.main-container {
min-height: 100%;
transition: margin-left .28s;
// margin-left: $sideBarWidth;
position: relative;
}
.sidebar-container {
transition: width 0.28s;
// width: $sideBarWidth !important;
// background-color: $menuBg;
height: 100%;
position: fixed;
font-size: 0px;
top: 0;
bottom: 0;
left: 0;
z-index: 1001;
overflow: hidden;
// reset element-ui css
.horizontal-collapse-transition {
transition: 0s width ease-in-out, 0s padding-left ease-in-out, 0s padding-right ease-in-out;
}
.scrollbar-wrapper {
overflow-x: hidden !important;
}
.el-scrollbar__bar.is-vertical {
right: 0px;
}
.el-scrollbar {
height: 100%;
}
&.has-logo {
.el-scrollbar {
height: calc(100% - 50px);
}
}
.is-horizontal {
display: none;
}
a {
display: inline-block;
width: 100%;
overflow: hidden;
}
.svg-icon {
margin-right: 16px;
}
.el-menu {
border: none;
height: 100%;
width: 100% !important;
}
// menu hover
.submenu-title-noDropdown,
.el-submenu__title {
&:hover {
// background-color: $menuHover !important;
}
}
.is-active>.el-submenu__title {
// color: $subMenuActiveText !important;
}
& .nest-menu .el-submenu>.el-submenu__title,
& .el-submenu .el-menu-item {
// min-width: $sideBarWidth !important;
// background-color: $subMenuBg !important;
&:hover {
// background-color: $subMenuHover !important;
}
}
}
.hideSidebar {
.sidebar-container {
width: 54px !important;
}
.main-container {
margin-left: 54px;
}
.submenu-title-noDropdown {
padding: 0 !important;
position: relative;
.el-tooltip {
padding: 0 !important;
.svg-icon {
margin-left: 20px;
}
}
}
.el-submenu {
overflow: hidden;
&>.el-submenu__title {
padding: 0 !important;
.svg-icon {
margin-left: 20px;
}
.el-submenu__icon-arrow {
display: none;
}
}
}
.el-menu--collapse {
.el-submenu {
&>.el-submenu__title {
&>span {
height: 0;
width: 0;
overflow: hidden;
visibility: hidden;
display: inline-block;
}
}
}
}
}
.el-menu--collapse .el-menu .el-submenu {
// min-width: $sideBarWidth !important;
}
// mobile responsive
.mobile {
.main-container {
margin-left: 0px;
}
.sidebar-container {
transition: transform .28s;
// width: $sideBarWidth !important;
}
&.hideSidebar {
.sidebar-container {
pointer-events: none;
transition-duration: 0.3s;
// transform: translate3d(-$sideBarWidth, 0, 0);
}
}
}
.withoutAnimation {
.main-container,
.sidebar-container {
transition: none;
}
}
}
// when menu collapsed
.el-menu--vertical {
&>.el-menu {
.svg-icon {
margin-right: 16px;
}
}
.nest-menu .el-submenu>.el-submenu__title,
.el-menu-item {
&:hover {
// you can use $subMenuHover
// background-color: $menuHover !important;
}
}
// the scroll bar appears when the subMenu is too long
>.el-menu--popup {
max-height: 100vh;
overflow-y: auto;
&::-webkit-scrollbar-track-piece {
background: #d3dce6;
}
&::-webkit-scrollbar {
width: 6px;
}
&::-webkit-scrollbar-thumb {
background: #99a9bf;
border-radius: 20px;
}
}
}

View File

@@ -0,0 +1,48 @@
// global transition css
/* fade */
.fade-enter-active,
.fade-leave-active {
transition: opacity 0.28s;
}
.fade-enter,
.fade-leave-active {
opacity: 0;
}
/* fade-transform */
.fade-transform-leave-active,
.fade-transform-enter-active {
transition: all .5s;
}
.fade-transform-enter {
opacity: 0;
transform: translateX(-30px);
}
.fade-transform-leave-to {
opacity: 0;
transform: translateX(30px);
}
/* breadcrumb transition */
.breadcrumb-enter-active,
.breadcrumb-leave-active {
transition: all .5s;
}
.breadcrumb-enter,
.breadcrumb-leave-active {
opacity: 0;
transform: translateX(20px);
}
.breadcrumb-move {
transition: all .5s;
}
.breadcrumb-leave-active {
position: absolute;
}

View File

@@ -0,0 +1,35 @@
// base color
$blue:#324157;
$light-blue:#3A71A8;
$red:#C03639;
$pink: #E65D6E;
$green: #30B08F;
$tiffany: #4AB7BD;
$yellow:#FEC171;
$panGreen: #30B08F;
// sidebar
$menuText:#bfcbd9;
$menuActiveText:#409EFF;
$subMenuActiveText:#f4f4f5; // https://github.com/ElemeFE/element/issues/12951
$menuBg:#304156;
$menuHover:#263445;
$subMenuBg:#0B253F;
$subMenuHover:#001528;
$sideBarWidth: 248px;
// the :export directive is the magic sauce for webpack
// https://www.bluematador.com/blog/how-to-share-variables-between-js-and-sass
:export {
menuText: $menuText;
menuActiveText: $menuActiveText;
subMenuActiveText: $subMenuActiveText;
// menuBg: $menuBg;
menuHover: $menuHover;
subMenuBg: $subMenuBg;
subMenuHover: $subMenuHover;
sideBarWidth: $sideBarWidth;
}

View File

@@ -0,0 +1,66 @@
<template>
<div style="flex: 1">
<div class="agvStatusContent">
<div class="title">任务状态占比 ·今日</div>
<pieChart :chartRef=" 'taskStatusRef' " />
</div>
</div>
</template>
<script>
import pieChart from './pieChartStatus.vue'
export default {
name: 'AGVStatus',
components: { pieChart },
props: {
energyObj: {
type: Object,
default: () => ({
electricComu: 0,
steamComu: 0
})
}
},
data() {
return {
}
},
methods: {
},
}
</script>
<style lang='scss' scoped>
.agvStatusContent {
width: 513px;
height: 213px;
background: #FFFFFF;
border-radius: 8px;
padding: 16px 18px 26px;
.title {
font-family: PingFangSC, PingFang SC;
font-weight: 400;
font-size: 16px;
color: rgba(0, 0, 0, 0.85);
line-height: 16px;
letter-spacing: 1px;
text-align: left;
font-style: normal;
position: relative;
padding-left: 12px;
&::before {
content: '';
width: 4px;
height: 16px;
background: #0A4BFF;
border-radius: 1px;
position: absolute;
left: 0;
top: 2px;
}
}
}
</style>

View File

@@ -0,0 +1,66 @@
<template>
<div style="flex: 1">
<div class="agvStatusContent">
<div class="title">任务类型占比 ·今日</div>
<pieChart :chartRef=" 'taskTypeRef' " />
</div>
</div>
</template>
<script>
import pieChart from './pieChart.vue'
export default {
name: 'AGVStatus',
components: { pieChart },
props: {
energyObj: {
type: Object,
default: () => ({
electricComu: 0,
steamComu: 0
})
}
},
data() {
return {
}
},
methods: {
},
}
</script>
<style lang='scss' scoped>
.agvStatusContent {
width: 513px;
height: 213px;
background: #FFFFFF;
border-radius: 8px;
padding: 16px 18px 26px;
.title {
font-family: PingFangSC, PingFang SC;
font-weight: 400;
font-size: 16px;
color: rgba(0, 0, 0, 0.85);
line-height: 16px;
letter-spacing: 1px;
text-align: left;
font-style: normal;
position: relative;
padding-left: 12px;
&::before {
content: '';
width: 4px;
height: 16px;
background: #0A4BFF;
border-radius: 1px;
position: absolute;
left: 0;
top: 2px;
}
}
}
</style>

View File

@@ -0,0 +1,214 @@
<template>
<div id="dayReport" class="dayReport" :style="styles">
<ReportHeader top-title="车间生产看板" />
<div class="main-body" style=" flex: 1; display: flex;padding: 16px 20px 22px 24px;flex-direction: column;">
<div class="top" style="display: flex;gap: 16px;">
<div class="top-three" style="
display: grid;
gap: 12px;
grid-template-columns: 367px 1493px;
">
<agvStatus />
<threeDimensionalChart :dataList="dataList" />
</div>
</div>
<div class="top" style="display: flex;gap: 16px;margin-top: 6px;">
<div class="bottom-three" style="
display: grid;
gap: 12px;
grid-template-columns: 512px 930px 402px;
">
<div class="left-three" style="
display: grid;
gap: 16px;
grid-template-rows: 213px 213px;
">
<taskType />
<taskStatus />
</div>
<div class="center-three" style="
display: grid;
gap: 16px;
grid-template-rows: 330px 92px;
">
<realTask />
<alarm />
<!-- <taskStatus /> -->
</div>
<alarmTop />
</div>
</div>
</div>
</div>
</template>
<script>
import ReportHeader from './components/Header.vue'
// import screenfull from 'screenfull'
import agvStatus from './components/agvStatus.vue'
import taskType from './components/taskType.vue'
import realTask from './components/realTask.vue'
import alarm from './components/alarm.vue'
import alarmTop from './components/alarmTop.vue'
import taskStatus from './components/taskStatus.vue'
import threeDimensionalChart from './components/threeDimensionalChart.vue'
import { getLineEdgeLibraryList } from '../../../api/visualization/visualization'
// import financeCosts from './components/financeCosts.vue'
// import keyProductionIndicators from './components/keyProductionIndicators.vue'
// import coreBottomLeft from './components/coreBottomLeft.vue'
// import orderProgress from './components/orderProgress.vue'
// import keyWork from './components/keyWork.vue'
// import moment from 'moment'
export default {
name: 'DayReport',
components: { ReportHeader, agvStatus, threeDimensionalChart, taskType, taskStatus, realTask, alarm, alarmTop },
data() {
return {
// isFullScreen: false,
timer: null,
beilv: 1,
value: 100,
dataList:[]
}
},
created() {
// this.init()
this.windowWidth(document.documentElement.clientWidth)
},
computed: {
// ...mapGetters(['sidebar']),
styles() {
const v = Math.floor(this.value * this.beilv * 100) / 10000
return {
transform: `scale(${v})`,
transformOrigin: 'left top'
// overflow: hidden;
}
}
},
watch: {
clientWidth(val) {
if (!this.timer) {
this.clientWidth = val
this.beilv2 = this.clientWidth / 1920
this.timer = true
let _this = this
setTimeout(function () {
_this.timer = false
}, 500)
}
// 这里可以添加修改时的方法
this.windowWidth(val);
}
},
// beforeDestroy() {
// clearInterval(this.timer)
// this.destroy()
// },
mounted() {
const _this = this;
_this.beilv = document.documentElement.clientWidth / 1920
window.onresize = () => {
return (() => {
_this.clientWidth = `${document.documentElement.clientWidth}`
this.beilv = _this.clientWidth / 1920
})()
}
this.getData()
},
methods: {
getData(data) {
console.log(data);
getLineEdgeLibraryList().then((res) => {
console.log('res', res);
this.dataList =res.data
})
},
windowWidth(value) {
this.clientWidth = value
this.beilv2 = this.clientWidth / 1920
},
// change() {
// this.isFullScreen = screenfull.isFullscreen
// },
// init() {
// if (!screenfull.isEnabled) {
// this.$message({
// message: 'you browser can not work',
// type: 'warning'
// })
// return false
// }
// screenfull.on('change', this.change)
// },
// destroy() {
// if (!screenfull.isEnabled) {
// this.$message({
// message: 'you browser can not work',
// type: 'warning'
// })
// return false
// }
// screenfull.off('change', this.change)
// },
// // 全屏
// screenfullChange() {
// console.log('screenfull.enabled', screenfull.isEnabled);
// if (!screenfull.isEnabled) {
// this.$message({
// message: 'you browser can not work',
// type: 'warning'
// })
// return false
// }
// screenfull.toggle(this.$refs.dayReportB)
// },
// changeDate(val) {
// this.date = val
// // this.weekDay = this.weekArr[moment(this.date).format('e')]
// // this.getData()
// if (this.date === moment().format('yyyy-MM-DD')) {
// this.loopTime()
// } else {
// clearInterval(this.timer)
// }
// },
// 导出
// exportPDF() {
// this.$message.success('正在导出,请稍等!')
// const element = document.getElementById('dayRepDom')
// element.style.display = 'block'
// const fileName = '株洲碲化镉生产日报' + moment().format('yyMMDD') + '.pdf'
// html2canvas(element, {
// dpi: 300, // Set to 300 DPI
// scale: 3 // Adjusts your resolution
// }).then(function(canvas) {
// const imgWidth = 595.28
// const imgHeight = 841.89
// const pageData = canvas.toDataURL('image/jpeg', 1.0)
// const PDF = new JsPDF('', 'pt', [imgWidth, imgHeight])
// PDF.addImage(pageData, 'JPEG', 0, 0, imgWidth, imgHeight)
// setTimeout(() => {
// PDF.save(fileName) // 导出文件名
// }, 1000)
// })
// element.style.display = 'none'
// }
}
}
</script>
<style scoped lang="scss">
.dayReport {
width: 1920px;
height: 1080px;
background: #F2F4F9;
// background-size: cover;
}
</style>

View File

@@ -3157,6 +3157,11 @@
"resolved" "https://registry.npmmirror.com/check-types/-/check-types-8.0.3.tgz"
"version" "8.0.3"
"chinese-lunar@^0.1.4":
"integrity" "sha512-E4seb9UZkSJtkm65Ry2ZLWTw5Z87DOyGcCePdg3ft7da342hnEliMtcDAPSn+YSo/o0xl1Egmhh671kxEJgY+g=="
"resolved" "https://registry.npmmirror.com/chinese-lunar/-/chinese-lunar-0.1.4.tgz"
"version" "0.1.4"
"chokidar@^2.1.8":
"integrity" "sha512-ZmZUazfOzf0Nve7duiCKD23PFSCs4JPoYyccjUFF3aQkQadqBhfzhjkwBH2mNOG9cTBwhamM37EIsIkZw3nRgg=="
"resolved" "https://registry.npmmirror.com/chokidar/-/chokidar-2.1.8.tgz"