Compare commits

...

8 Commits

Author SHA1 Message Date
‘937886381’
4ade2dfcdc Merge branch 'projects/ssdl-test' into projects/ssdl-zhp 2025-11-20 13:23:31 +08:00
‘937886381’
852a3f17a0 修改 2025-11-20 13:22:19 +08:00
cba14b1f61 Merge pull request 'projects/ssdl-zhp' (#450) from projects/ssdl-zhp into projects/ssdl-test
Reviewed-on: #450
2025-11-18 17:02:28 +08:00
‘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
zwq
a2213f4f7e 更新 2025-11-17 09:23:55 +08:00
86 changed files with 9063 additions and 240 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()
@@ -25,9 +25,9 @@ router.beforeEach((to, from, next) => {
// 获取字典数据 add by 芋艿
store.dispatch('dict/loadDictDatas')
// 判断当前用户是否已拉取完 user_info 信息
store.dispatch('GetInfo').then(() => {
store.dispatch('GetInfo').then(userInfo => {
isRelogin.show = false
store.dispatch('GenerateRoutes').then(accessRoutes => {
store.dispatch('GenerateRoutes', userInfo.menus).then(accessRoutes => {
// 根据 roles 权限生成可访问的路由表
router.addRoutes(accessRoutes) // 动态添加可访问路由表
next({ ...to, replace: true }) // hack方法 确保addRoutes已完成

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

@@ -1,5 +1,4 @@
import {constantRoutes} from '@/router'
import {getRouters} from '@/api/menu'
import Layout from '@/layout/index'
import ParentView from '@/components/ParentView';
import {toCamelCase} from "@/utils";
@@ -27,22 +26,25 @@ const permission = {
},
},
actions: {
// 生成路由
GenerateRoutes({commit}) {
/**
* 生成路由
*
* @param commit commit 函数
* @param menus 路由参数
*/
GenerateRoutes({commit}, menus) {
return new Promise(resolve => {
// 向后端请求路由数据(菜单)
getRouters().then(res => {
const sdata = JSON.parse(JSON.stringify(res.data)) // 【重要】用于菜单中的数据
const rdata = JSON.parse(JSON.stringify(res.data)) // 用于最后添加到 Router 中的数据
const sidebarRoutes = filterAsyncRouter(sdata)
const rewriteRoutes = filterAsyncRouter(rdata, false, true)
rewriteRoutes.push({path: '*', redirect: '/404', hidden: true})
commit('SET_ROUTES', rewriteRoutes)
commit('SET_SIDEBAR_ROUTERS', constantRoutes.concat(sidebarRoutes))
commit('SET_DEFAULT_ROUTES', sidebarRoutes)
commit('SET_TOPBAR_ROUTES', sidebarRoutes)
resolve(rewriteRoutes)
})
// 将 menus 菜单,转换为 route 路由数组
const sdata = JSON.parse(JSON.stringify(menus)) // 【重要】用于菜单中的数据
const rdata = JSON.parse(JSON.stringify(menus)) // 用于最后添加到 Router 中的数据
const sidebarRoutes = filterAsyncRouter(sdata)
const rewriteRoutes = filterAsyncRouter(rdata, false, true)
rewriteRoutes.push({path: '*', redirect: '/404', hidden: true})
commit('SET_ROUTES', rewriteRoutes)
commit('SET_SIDEBAR_ROUTERS', constantRoutes.concat(sidebarRoutes))
commit('SET_DEFAULT_ROUTES', sidebarRoutes)
commit('SET_TOPBAR_ROUTES', sidebarRoutes)
resolve(rewriteRoutes)
})
}
}

View File

@@ -44,7 +44,7 @@
border-radius: 100%;
background: #26b9de;
"></span>
智能监控分析系统
上上电缆
</p>
</div>
<video
@@ -103,7 +103,7 @@
line-height: 54px;
letter-spacing: 2px;
">
智能监控分析系统
上上电缆
</h3>
</h2>

View File

@@ -0,0 +1,114 @@
<!--
* @Author: zwq
* @Date: 2021-11-18 14:16:25
* @LastEditors: zwq
* @LastEditTime: 2025-11-12 15:35:21
* @Description:
-->
<template>
<el-form
:model="dataForm"
:rules="dataRule"
ref="dataForm"
@keyup.enter.native="dataFormSubmit()"
label-width="80px">
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="产品编码" prop="code">
<el-input
v-model="dataForm.code"
clearable
placeholder="请输入产品编码" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="产品名称" prop="name">
<el-input
v-model="dataForm.name"
clearable
placeholder="请输入产品名称" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="产品规格" prop="address">
<el-input
v-model="dataForm.address"
clearable
placeholder="请输入产品规格" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="产品类型" prop="name">
<el-select
v-model="dataForm.name"
disabled
:style="{ width: '100%' }"
placeholder="请选择产品类型">
<el-option
v-for="item in typeArr"
:key="item.name"
:label="item.label"
:value="item.name"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="启用状态" prop="enabled">
<el-select
:style="{ width: '100%' }" v-model="dataForm.enabled" placeholder="请选择启用状态">
<el-option
v-for="dict in this.getDictDatas(DICT_TYPE.INFRA_BOOLEAN_STRING)"
:key="dict.value"
:label="dict.label"
:value="dict.value" />
</el-select>
</el-form-item>
</el-col>
</el-row>
</el-form>
</template>
<script>
import basicAdd from '@/mixins/basic-add';
import {
createFactory,
updateFactory,
getFactory,
getCode,
} from '@/api/core/base/factory';
export default {
mixins: [basicAdd],
data() {
return {
urlOptions: {
isGetCode: true,
codeURL: getCode,
createURL: createFactory,
updateURL: updateFactory,
infoURL: getFactory,
},
dataForm: {
id: undefined,
code: undefined,
name: undefined,
address: undefined,
enabled:'1',
remark: undefined,
},
typeArr: [],
dataRule: {
code: [
{ required: true, message: '产品编码不能为空', trigger: 'blur' },
],
name: [
{ required: true, message: '产品名称不能为空', trigger: 'blur' },
],
},
};
},
methods: {},
};
</script>

View File

@@ -0,0 +1,35 @@
<template>
<el-switch
@change="changeStatus"
size="small"
v-model="list.enabled"
:active-value="1"
:inactive-value="0"></el-switch>
</template>
<script>
import { updateGroup } from '@/api/group/groupSetting';
export default {
props: {
injectData: {
type: Object,
default: () => ({}),
},
},
data() {
return {
list: this.injectData,
};
},
created() {},
methods: {
changeStatus(val) {
const data = { ...this.injectData, enabled: val };
updateGroup(data).then((res) => {
this.$modal.msgSuccess('修改成功');
this.$emit('emitData');
});
},
},
};
</script>

View File

@@ -0,0 +1,209 @@
<template>
<div class="app-container">
<search-bar
:formConfigs="formConfig"
ref="searchBarForm"
@headBtnClick="buttonClick" />
<base-table
v-loading="dataListLoading"
:table-props="tableProps"
:page="listQuery.pageNo"
:limit="listQuery.pageSize"
:table-data="tableData"
@emitFun="getDataList">
<method-btn
v-if="tableBtn.length"
slot="handleBtn"
:width="90"
label="操作"
:method-list="tableBtn"
@clickBtn="handleClick" />
</base-table>
<pagination
:limit.sync="listQuery.pageSize"
:page.sync="listQuery.pageNo"
:total="listQuery.total"
@pagination="getDataList" />
<base-dialog
:dialogTitle="addOrEditTitle"
:dialogVisible="addOrUpdateVisible"
@cancel="handleCancel"
@confirm="handleConfirm"
:before-close="handleCancel"
width="50%">
<add-or-update
ref="addOrUpdate"
@refreshDataList="successSubmit"></add-or-update>
</base-dialog>
</div>
</template>
<script>
import AddOrUpdate from './add-or-updata';
import basicPage from '@/mixins/basic-page';
import changeStatus from './changeStatus.vue';
import { parseTime } from '@/filter/code-filter';
import {
deleteFactory,
getFactoryPage,
exportFactoryExcel,
} from '@/api/core/base/factory';
const tableProps = [
{
prop: 'code',
label: '产品编码',
},
{
prop: 'name',
label: '产品名称',
},
{
prop: 'address',
label: '规格型号',
},
{
prop: 'remark',
label: '产品分类',
},
{
prop: 'remark1',
label: '创建人',
width: 90,
},
{
prop: 'createTime',
label: '时间',
filter: parseTime,
width: 150,
},
{
prop: 'enabled',
label: '状态',
subcomponent: changeStatus,
width: 80,
},
];
export default {
mixins: [basicPage],
data() {
return {
urlOptions: {
getDataListURL: getFactoryPage,
deleteURL: deleteFactory,
exportURL: exportFactoryExcel,
},
tableProps,
tableBtn: [
this.$auth.hasPermi(`base:factory:update`)
? {
type: 'edit',
btnName: '编辑',
}
: undefined,
this.$auth.hasPermi(`base:factory:delete`)
? {
type: 'delete',
btnName: '删除',
}
: undefined,
].filter((v) => v),
tableData: [],
formConfig: [
{
type: 'select',
label: '分类',
selectOptions: [],
param: 'val1',
},
{
type: 'select',
label: '状态',
selectOptions: [
{ id: 1, name: '正常' },
{ id: 2, name: '停用' },
],
param: 'val2',
},
{
type: 'input',
label: '产品编码',
placeholder: '产品编码',
param: 'name',
},
{
type: 'button',
btnName: '搜索',
name: 'search',
color: 'primary',
},
// {
// type: 'separate',
// },
// {
// type: 'button',
// btnName: '重置',
// name: 'reset',
// },
{
type: 'separate',
},
{
type: this.$auth.hasPermi('base:factory:create') ? 'button' : '',
btnName: '新增',
name: 'add',
color: 'success',
plain: true,
},
// {
// type: this.$auth.hasPermi('base:factory:create') ? 'separate' : '',
// },
// {
// type: this.$auth.hasPermi('base:factory:export') ? 'button' : '',
// btnName: '导出',
// name: 'export',
// color: 'warning',
// },
],
};
},
components: {
AddOrUpdate,
},
created() {},
methods: {
buttonClick(val) {
switch (val.btnName) {
case 'search':
this.listQuery.pageNo = 1;
this.listQuery.pageSize = 10;
this.listQuery.name = val.name;
this.listQuery.val1 = val.val1;
this.listQuery.val2 = val.val2;
this.getDataList();
break;
case 'reset':
this.$refs.searchBarForm.resetForm();
this.listQuery = {
pageSize: 10,
pageNo: 1,
total: 1,
};
this.getDataList();
break;
case 'add':
this.addOrEditTitle = '新增';
this.addOrUpdateVisible = true;
this.addOrUpdateHandle();
break;
case 'export':
this.handleExport();
break;
default:
console.log(val);
}
},
},
};
</script>

View File

@@ -0,0 +1,114 @@
<!--
* @Author: zwq
* @Date: 2021-11-18 14:16:25
* @LastEditors: zwq
* @LastEditTime: 2025-11-12 15:35:21
* @Description:
-->
<template>
<el-form
:model="dataForm"
:rules="dataRule"
ref="dataForm"
@keyup.enter.native="dataFormSubmit()"
label-width="80px">
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="产品编码" prop="code">
<el-input
v-model="dataForm.code"
clearable
placeholder="请输入产品编码" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="产品名称" prop="name">
<el-input
v-model="dataForm.name"
clearable
placeholder="请输入产品名称" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="产品规格" prop="address">
<el-input
v-model="dataForm.address"
clearable
placeholder="请输入产品规格" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="产品类型" prop="name">
<el-select
v-model="dataForm.name"
disabled
:style="{ width: '100%' }"
placeholder="请选择产品类型">
<el-option
v-for="item in typeArr"
:key="item.name"
:label="item.label"
:value="item.name"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="启用状态" prop="enabled">
<el-select
:style="{ width: '100%' }" v-model="dataForm.enabled" placeholder="请选择启用状态">
<el-option
v-for="dict in this.getDictDatas(DICT_TYPE.INFRA_BOOLEAN_STRING)"
:key="dict.value"
:label="dict.label"
:value="dict.value" />
</el-select>
</el-form-item>
</el-col>
</el-row>
</el-form>
</template>
<script>
import basicAdd from '@/mixins/basic-add';
import {
createFactory,
updateFactory,
getFactory,
getCode,
} from '@/api/core/base/factory';
export default {
mixins: [basicAdd],
data() {
return {
urlOptions: {
isGetCode: true,
codeURL: getCode,
createURL: createFactory,
updateURL: updateFactory,
infoURL: getFactory,
},
dataForm: {
id: undefined,
code: undefined,
name: undefined,
address: undefined,
enabled:'1',
remark: undefined,
},
typeArr: [],
dataRule: {
code: [
{ required: true, message: '产品编码不能为空', trigger: 'blur' },
],
name: [
{ required: true, message: '产品名称不能为空', trigger: 'blur' },
],
},
};
},
methods: {},
};
</script>

View File

@@ -0,0 +1,35 @@
<template>
<el-switch
@change="changeStatus"
size="small"
v-model="list.enabled"
:active-value="1"
:inactive-value="0"></el-switch>
</template>
<script>
import { updateGroup } from '@/api/group/groupSetting';
export default {
props: {
injectData: {
type: Object,
default: () => ({}),
},
},
data() {
return {
list: this.injectData,
};
},
created() {},
methods: {
changeStatus(val) {
const data = { ...this.injectData, enabled: val };
updateGroup(data).then((res) => {
this.$modal.msgSuccess('修改成功');
this.$emit('emitData');
});
},
},
};
</script>

View File

@@ -0,0 +1,229 @@
<template>
<div class="app-container">
<search-bar
:formConfigs="formConfig"
ref="searchBarForm"
@headBtnClick="buttonClick" />
<base-table
v-loading="dataListLoading"
:table-props="tableProps"
:page="listQuery.pageNo"
:limit="listQuery.pageSize"
:table-data="tableData"
@emitFun="getDataList">
<method-btn
v-if="tableBtn.length"
slot="handleBtn"
:width="90"
label="操作"
:method-list="tableBtn"
@clickBtn="handleClick" />
</base-table>
<pagination
:limit.sync="listQuery.pageSize"
:page.sync="listQuery.pageNo"
:total="listQuery.total"
@pagination="getDataList" />
<base-dialog
:dialogTitle="addOrEditTitle"
:dialogVisible="addOrUpdateVisible"
@cancel="handleCancel"
@confirm="handleConfirm"
:before-close="handleCancel"
width="50%">
<add-or-update
ref="addOrUpdate"
@refreshDataList="successSubmit"></add-or-update>
</base-dialog>
</div>
</template>
<script>
import AddOrUpdate from './add-or-updata';
import basicPage from '@/mixins/basic-page';
import changeStatus from './changeStatus.vue';
import { parseTime } from '@/filter/code-filter';
import {
deleteFactory,
getFactoryPage,
exportFactoryExcel,
} from '@/api/core/base/factory';
const tableProps = [
{
prop: 'code',
label: '产品编码',
},
{
prop: 'name',
label: '产品名称',
},
{
prop: 'address',
label: '规格型号',
},
{
prop: 'remark',
label: '产品分类',
},
{
prop: 'remark1',
label: '创建人',
width: 90,
},
{
prop: 'createTime',
label: '时间',
filter: parseTime,
width: 150,
},
{
prop: 'enabled',
label: '状态',
subcomponent: changeStatus,
width: 80,
},
];
export default {
mixins: [basicPage],
data() {
return {
urlOptions: {
getDataListURL: getFactoryPage,
deleteURL: deleteFactory,
exportURL: exportFactoryExcel,
},
tableProps,
tableBtn: [
this.$auth.hasPermi(`base:factory:update`)
? {
type: 'edit',
btnName: '编辑',
}
: undefined,
this.$auth.hasPermi(`base:factory:delete`)
? {
type: 'delete',
btnName: '删除',
}
: undefined,
].filter((v) => v),
tableData: [],
formConfig: [
{
type: 'select',
label: '适用框绞线',
selectOptions: [],
param: 'val1',
},
{
type: 'select',
label: '修改人',
selectOptions: [],
param: 'val2',
},
{
type: 'select',
label: '状态',
selectOptions: [
{ id: 1, name: '正常' },
{ id: 2, name: '停用' },
],
param: 'val3',
},
{
type: 'datePicker',
label: '最后修改时间',
dateType: 'daterange',
format: 'yyyy-MM-dd',
valueFormat: 'yyyy-MM-dd HH:mm:ss',
rangeSeparator: '-',
startPlaceholder: '开始时间',
endPlaceholder: '结束时间',
param: 'searchTime',
},
{
type: 'input',
label: '产品编码',
placeholder: '产品编码',
param: 'name',
},
{
type: 'button',
btnName: '搜索',
name: 'search',
color: 'primary',
},
// {
// type: 'separate',
// },
// {
// type: 'button',
// btnName: '重置',
// name: 'reset',
// },
{
type: 'separate',
},
{
type: this.$auth.hasPermi('base:factory:create') ? 'button' : '',
btnName: '新增',
name: 'add',
color: 'success',
plain: true,
},
{
type: 'separate',
},
{
type: 'button',
btnName: '导出',
name: 'export',
color: 'warning',
},
],
};
},
components: {
AddOrUpdate,
},
created() {},
methods: {
buttonClick(val) {
switch (val.btnName) {
case 'search':
this.listQuery.pageNo = 1;
this.listQuery.pageSize = 10;
this.listQuery.name = val.name;
this.listQuery.val1 = val.val1;
this.listQuery.val2 = val.val2;
this.listQuery.val3 = val.val3;
this.listQuery.startTime = val.searchTime ? val.searchTime[0] : null;
this.listQuery.endTime = val.searchTime ? val.searchTime[1] : null;
this.getDataList();
break;
case 'reset':
this.$refs.searchBarForm.resetForm();
this.listQuery = {
pageSize: 10,
pageNo: 1,
total: 1,
};
this.getDataList();
break;
case 'add':
this.addOrEditTitle = '新增';
this.addOrUpdateVisible = true;
this.addOrUpdateHandle();
break;
case 'export':
this.handleExport();
break;
default:
console.log(val);
}
},
},
};
</script>

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

@@ -0,0 +1,65 @@
<!--
* @Author: zwq
* @Date: 2023-08-01 15:27:31
* @LastEditors: zwq
* @LastEditTime: 2023-08-01 16:25:54
* @Description:
-->
<template>
<div :class="[className, { 'p-0': noPadding }]">
<slot />
</div>
</template>
<script>
export default {
props: {
size: {
// 取值范围: xl lg md sm
type: String,
default: 'de',
validator: function (val) {
return ['xl', 'lg', 'de', 'md', 'sm'].indexOf(val) !== -1;
},
},
noPadding: {
type: Boolean,
default: false,
},
},
computed: {
className: function () {
return `${this.size}-title`;
},
},
};
</script>
<style lang="scss" scoped>
$pxls: (xl, 28px) (lg, 24px) (de, 20px) (md, 18px) (sm, 16px);
$mgr: 8px;
@each $size, $height in $pxls {
.#{$size}-title {
font-size: $height;
line-height: $height;
color: #000;
font-weight: 500;
font-family: '微软雅黑', 'Microsoft YaHei', Arial, Helvetica, sans-serif;
&::before {
content: '';
display: inline-block;
vertical-align: top;
width: 4px;
height: $height + 2px;
border-radius: 1px;
margin-right: $mgr;
background-color: #0b58ff;
}
}
}
.p-0 {
padding: 0;
}
</style>

View File

@@ -0,0 +1,442 @@
<!--
* @Author: zwq
* @Date: 2025-10-13 15:07:24
* @LastEditors: zwq
* @LastEditTime: 2025-11-07 15:35:14
* @Description:
-->
<template>
<div>
<div class="circle-container">
<div v-for="(item, index) in dotArr" :key="index" class="circle-wrapper">
<div
class="circle"
:style="{
background: stepNum == index + 1 ? '#0B58FF' : '',
}">
{{ index + 1 }}
</div>
<div
class="circle-text"
:style="{
color: stepNum == index + 1 ? '#0B58FF' : '',
}">
{{ item.name }}
</div>
<!-- 圆点后面的虚线 -->
<div v-if="index < 2" class="connector" />
</div>
</div>
<div v-if="stepNum == 1">
<div class="topTip">
1.可选择库区巷道同批次创建任务搬运仅支持同一产品型号
<br />
2.须在本页下方填写搬运数量搬运数量仅支持双数且数量当前可用库存总量
</div>
<small-title style="margin: 16px 0" size="sm" :no-padding="true">
步骤一选择产品及起点
</small-title>
<el-form
:model="dataForm"
:rules="dataRule"
ref="dataForm"
@keyup.enter.native="dataFormSubmit()"
label-position="top"
label-width="80px">
<el-row :gutter="10">
<el-col :span="6">
<el-form-item label="搬运对象" prop="val1">
<el-select
style="width: 100%"
v-model="dataForm.val1"
placeholder="请选择搬运对象">
<el-option
v-for="item in options1"
:key="item.value"
:label="item.label"
:value="item.value"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="6" v-if="dataForm.val1 == 1">
<el-form-item label="产品名称" prop="val1">
<el-select
style="width: 100%"
v-model="dataForm.val2"
placeholder="请选择产品名称">
<el-option
v-for="item in options1"
:key="item.value"
:label="item.label"
:value="item.value"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="6" v-if="dataForm.val1 == 1">
<el-form-item label="规格型号" prop="val1">
<el-select
style="width: 100%"
v-model="dataForm.val2"
placeholder="请选择规格型号">
<el-option
v-for="item in options1"
:key="item.value"
:label="item.label"
:value="item.value"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="搬运数量" prop="val4">
<el-input
v-model="dataForm.val4"
oninput="value=value.replace(/^(0+)|[^\d]+/g,'')">
<template slot="append"></template>
</el-input>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="10">
<el-col :span="12">
<el-form-item label="起点信息" prop="val5">
<el-radio-group v-model="dataForm.val5">
<el-radio :label="1">按策略自动选择</el-radio>
<el-radio :label="2">指定起点</el-radio>
</el-radio-group>
</el-form-item>
</el-col>
</el-row>
</el-form>
<div v-if="dataForm.val5 == 2" class="potBG-div">
<div>
<el-row :gutter="10">
<el-col :span="10">
起点库区:
<el-select
style="width: 200px; margin-left: 10px"
v-model="startPot"
size="small"
placeholder="请选择起点库区">
<el-option
v-for="item in options1"
:key="item.value"
:label="item.label"
:value="item.value"></el-option>
</el-select>
</el-col>
<el-col :span="13" style="text-align: right; line-height: 36px">
<span
class="num1-startPot-status"
style="background-color: #5ab45a" />
可选
<span class="num1-startPot-status" />
不可选
<span
class="num1-startPot-status"
style="background-color: #e9b100" />
已选
</el-col>
</el-row>
<div class="potTitleBG">
<div v-for="item in Object.keys(startPotList)" :key="item">
<div class="potTitle">
{{ item }}
</div>
<div class="potList">
<div
class="pot"
v-for="sitem in startPotList[item]"
:key="sitem.id"
:style="{
backgroundColor: potBGcolor[sitem.status],
cursor: sitem.status > 0 ? 'pointer' : '',
}"
@click="sitem.status > 0 && setStartPot(sitem)"
:title="sitem.name">
{{ sitem.name }}
</div>
</div>
</div>
</div>
<el-divider></el-divider>
<div style="text-align: right">可用库存总量 <span style="color:#409EFF;font-size:16px">12</span> </div>
</div>
</div>
</div>
<div v-if="stepNum == 2">
<div class="topTip">
1.指定终点库位下发后会锁定所属巷道仅本批次任务进入
<br />
2.指定终点库位选位规则仅可从巷道最里空对位选位
<br />
3.只选择库区或巷道时该方式下当前终点为候选位置系统将根据策略与现场实际情况自动确定最终终点库位
</div>
<small-title style="margin: 16px 0" size="sm" :no-padding="true">
步骤二选择终点
</small-title>
</div>
<div v-if="stepNum == 3">
<small-title style="margin: 16px 0" size="sm" :no-padding="true">
步骤三预览与下发
</small-title>
</div>
</div>
</template>
<script>
import SmallTitle from './SmallTitle';
export default {
components: {
SmallTitle,
},
data() {
return {
dotArr: [
{
name: '选择起点',
},
{
name: '选择终点',
},
{
name: '预览下发',
},
],
potBGcolor: ['', '#dafadc', '#f8f0c4'],
stepNum: 1, // 当前第几步
//第一步参数
dataForm: {
id: undefined,
val1: undefined,
val2: undefined,
val3: undefined,
val4: undefined,
val5: 1,
},
options1: [
{
label: '产品',
value: 1,
},
{
label: '空盘',
value: 2,
},
],
dataRule: {},
startPot: undefined, //起点库区选择的类型
startPotList: {
//起点库区List
G01: [
{
id: '001',
name: 'L001',
status: 1,
},
{
id: '002',
name: 'R002',
status: 1,
},
{
id: '003',
name: 'L003',
status: 0,
},
{
id: '004',
name: 'R004',
status: 0,
},
],
G02: [
{
id: '005',
name: 'L005',
},
{
id: '006',
name: 'R006',
},
{
id: '007',
name: 'L007',
},
{
id: '008',
name: 'R008',
},
],
},
};
},
methods: {
init(id) {
this.dataForm.id = id || undefined;
this.$nextTick(() => {
if (this.dataForm.id) {
} else {
}
});
},
//上一步
upSubmit() {
if (this.stepNum == 2) {
this.stepNum -= 1;
this.$emit('setSN', this.stepNum);
} else if (this.stepNum == 3) {
this.stepNum -= 1;
this.$emit('setSN', this.stepNum);
}
},
//下一步
nextSubmit() {
if (this.stepNum == 1) {
this.stepNum += 1;
this.$emit('setSN', this.stepNum);
return;
}
if (this.stepNum == 2) {
this.stepNum += 1;
this.$emit('setSN', this.stepNum);
return;
}
if (this.stepNum == 3) {
this.stepNum = 1;
this.$emit('setSN', this.stepNum);
return;
}
},
cancelStep() {},
// 第一步方法
setStartPot(data) {
data.status = data.status == 1 ? 2 : 1;
},
},
};
</script>
<style scoped>
.topTip {
background-color: #ebebeb;
padding: 10px 20px;
border-radius: 5px;
line-height: 25px;
}
</style>
<!-- //库位点的样式 -->
<style scoped>
.potBG-div {
width: 100%;
margin: 10px;
border: 1px solid gainsboro;
box-shadow: 2px 2px 2px gainsboro, -1px -1px 3px gainsboro;
padding: 15px;
}
.num1-startPot-status {
margin-left: 5px;
display: inline-block;
width: 14px;
height: 14px;
border: 1px solid gainsboro;
}
.potTitleBG {
margin-top: 10px;
overflow-x: auto;
display: flex;
}
.potTitle {
width: 82px;
background-color: rgb(169, 235, 249);
border-radius: 3px;
margin-right: 5px;
text-align: center;
color: #000000;
letter-spacing: 1px;
margin-bottom: 10px;
}
.potList {
width: 82px;
display: grid;
grid-template-columns: 40px 40px;
gap: 2px;
}
.pot {
width: 40px;
text-align: center;
border: 1px solid gainsboro;
border-radius: 3px;
padding: 5px 0;
margin-bottom: 5px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
</style>
<!-- //序号圆点 -->
<style scoped>
.circle-container {
height: 110px;
display: flex;
align-items: center;
justify-content: center;
padding: 20px;
width: 90%;
overflow-x: auto;
margin: auto;
}
.circle-wrapper {
position: relative;
display: flex;
align-items: center;
}
.circle {
width: 52px;
height: 52px;
border-radius: 50%;
background: #8db1ff;
font-weight: 500;
font-size: 31px;
color: #ffffff;
display: flex;
justify-content: center;
align-items: center;
position: relative;
z-index: 2;
cursor: pointer;
}
.circle-text {
position: absolute;
top: 60px;
left: -15px;
color: #8db1ff;
width: 82px;
text-align: center;
}
/* 下半圆虚线边框 */
.circle::after {
content: '';
position: absolute;
bottom: -6px; /* 2px边框 + 2px间隙 */
left: -4px;
right: -4px;
height: 30px; /* 半圆高度 */
border-radius: 0 0 60px 60px;
border: 1px dashed #0b58ff;
border-top: none;
z-index: 1;
}
.connector {
width: 160px; /* 计算连接线长度 */
height: 2px;
border-bottom: 1px dashed rgb(11, 88, 255, 1);
margin: 0 5px;
z-index: 1;
}
</style>

View File

@@ -0,0 +1,273 @@
<!--
* @Author: zwq
* @Date: 2025-11-07 17:01:51
* @LastEditors: zwq
* @LastEditTime: 2025-11-07 22:31:17
* @Description:
-->
<template>
<el-drawer
:visible.sync="visible"
:with-header="false"
size="50%"
@close="closeD"
:show-close="false">
<div class="bgDiv1">
<el-row :gutter="20" style="margin-bottom: 15px">
<el-col :span="8" style="font-size: 20px; font-weight: 600">
TSK202510230001
</el-col>
<el-col :span="8">满盘搬运自动</el-col>
<el-col :span="8">
上次刷新{{ parseTime(Date.now()) }}
<el-button type="text" @click="refresh">刷新</el-button>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="8">任务状态</el-col>
<el-col :span="8">优先级</el-col>
<el-col :span="8">执行车辆</el-col>
</el-row>
<el-row :gutter="20" style="margin-bottom: 15px">
<el-col :span="8">
<span
:style="{ backgroundColor: statusColor[1].color }"
class="taskStatus">
{{ statusColor[1].label }}
</span>
</el-col>
<el-col :span="8"></el-col>
<el-col :span="8">--</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="8">执行时长</el-col>
<el-col :span="8">创建人</el-col>
<el-col :span="8">创建时间</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="8">--</el-col>
<el-col :span="8">系统/张三</el-col>
<el-col :span="8">{{ parseTime(Date.now()) }}</el-col>
</el-row>
</div>
<div class="bgDiv2">
<el-steps
:active="stepNum"
finish-status="success"
:process-status="stepStatus"
align-center>
<el-step title="待下发"></el-step>
<el-step title="待执行"></el-step>
<el-step title="执行中"></el-step>
<el-step title="已完成"></el-step>
</el-steps>
<div class="abnormal">任务异常无效路径</div>
</div>
<div class="bgDiv3">
<small-title style="margin: 0 0 8px 0" size="sm" :no-padding="true">
搬运对象
</small-title>
<el-row :gutter="20">
<el-col :span="12">
<div class="pan-info">
<div class="pan-title">L盘</div>
</div>
</el-col>
<el-col :span="12">
<div class="pan-info">
<div class="pan-title">R盘</div>
</div>
</el-col>
</el-row>
</div>
<div class="bgDiv4">
<small-title style="margin: 0 0 8px 0" size="sm" :no-padding="true">
回收信息
</small-title>
<el-descriptions :column="2" size="medium" border>
<el-descriptions-item label="回收方式">他车回收</el-descriptions-item>
<el-descriptions-item label="回收任务编号">
18100000000
</el-descriptions-item>
<el-descriptions-item label="回收库位">
CK-01-A05-L / R
</el-descriptions-item>
<el-descriptions-item label="执行车辆">AGV-06</el-descriptions-item>
</el-descriptions>
</div>
<div class="bgDiv5">
<small-title style="margin: 0 0 8px 0" size="sm" :no-padding="true">
任务明细
</small-title>
<el-descriptions :column="2" size="medium" border>
<el-descriptions-item label="起点库位(L/R)">
CK-01-A05-L / R
</el-descriptions-item>
<el-descriptions-item label="终点库位(L/R)">
CC-02-B03-L/R (候选 )
</el-descriptions-item>
<el-descriptions-item label="起点策略">--</el-descriptions-item>
<el-descriptions-item label="终点策略">入库策略</el-descriptions-item>
<el-descriptions-item label="FMS任务号">--</el-descriptions-item>
<el-descriptions-item label="车辆位置">--</el-descriptions-item>
<el-descriptions-item label="电量">--</el-descriptions-item>
<el-descriptions-item label="是否载货">--</el-descriptions-item>
<el-descriptions-item label="创建方式">自动/人工</el-descriptions-item>
<el-descriptions-item label="任务来源">
PDA/PC/系统
</el-descriptions-item>
<el-descriptions-item label="关联叫料单">--</el-descriptions-item>
<el-descriptions-item label=""></el-descriptions-item>
</el-descriptions>
</div>
<div class="bgDiv6">
<small-title style="margin: 0 0 8px 0" size="sm" :no-padding="true">
任务日志
</small-title>
<el-timeline style="padding: 0">
<el-timeline-item
v-for="(activity, index) in activities"
:key="index"
:type="activity.type"
:color="activity.color"
size="large"
hide-timestamp>
<span>{{ activity.content }}</span>
<span style="float: right">{{ activity.timestamp }}</span>
</el-timeline-item>
</el-timeline>
</div>
<el-divider></el-divider>
<!-- 底部按钮 -->
<div class="drawer-body__footer">
<el-button @click="closeD"> </el-button>
</div>
</el-drawer>
</template>
<script>
import SmallTitle from './SmallTitle';
export default {
name: '',
data() {
return {
visible: false,
title: '',
statusColor: [
//bgDiv1的任务状态
{ label: '待下发', color: '#fa8c16' },
{ label: '待执行', color: '#1890ff' },
{ label: '执行中', color: '#1890ff' },
{ label: '已完成', color: '#52c41a' },
{ label: '暂停中', color: '#8c8c8c' },
{ label: '已终止', color: '#faad14' },
{ label: '异常', color: '#ff4d4f' },
{ label: '禁用', color: '#d9d9d9' },
],
//bgDiv2的步骤条
stepNum: 2,
stepStatus: 'finish',
//bgDiv6的时间线
activities: [
{
content: 'FMS | 卸货完成,任务完成',
timestamp: '2018-04-12 20:46',
type: 'primary',
},
{
content: 'FMS | 取货完成',
timestamp: '2018-04-03 20:46',
},
{
content: 'FMS | 派车AGV-03前往起点取货',
timestamp: '2018-04-03 20:46',
},
{
content: '张三 | 任务扫码配对完成,进入待下发',
timestamp: '2018-04-03 20:46',
},
],
};
},
components: {
SmallTitle,
},
created() {},
methods: {
init(val) {
this.visible = true;
},
//刷新
refresh() {},
closeD() {
this.visible = false
this.$emit('closeDrawer');
},
},
};
</script>
<style lang="scss" scoped>
.bgDiv1 {
background-color: rgba(242, 242, 242, 0.5);
padding: 20px;
line-height: 25px;
font-size: 15px;
border-bottom: 1px solid rgba(121, 121, 121, 0.5);
.taskStatus {
text-align: center;
border-radius: 3px;
padding: 2px 5px;
color: #fff;
}
}
.bgDiv2 {
border-bottom: 1px solid rgba(121, 121, 121, 0.5);
padding: 18px 0;
.abnormal {
width: 80%;
margin: auto;
border-radius: 5px;
height: 40px;
font-size: 22px;
line-height: 40px;
text-align: center;
background-color: rgba(217, 0, 27, 0.1);
color: rgba(217, 0, 27, 1);
border: 1px solid rgba(217, 0, 27, 1);
}
}
.bgDiv3 {
padding: 20px 20px 0;
.pan-info {
height: 350px;
border: 1px solid rgba(121, 121, 121, 0.8);
border-radius: 5px;
.pan-title {
background-color: rgba(242, 242, 242, 0.5);
height: 35px;
font-size: 20px;
line-height: 35px;
padding: 0 20px;
border-bottom: 1px solid rgba(121, 121, 121, 0.5);
letter-spacing: 2px;
}
}
}
.bgDiv4 {
padding: 20px 20px 0;
}
.bgDiv5 {
padding: 20px 20px 0;
}
.bgDiv6 {
padding: 20px 20px 0;
}
.drawer-body__footer {
display: flex;
justify-content: flex-end;
padding: 0 18px 10px;
}
</style>

View File

@@ -0,0 +1,65 @@
<!--
* @Author: zwq
* @Date: 2025-11-08 17:44:05
* @LastEditors: zwq
* @LastEditTime: 2025-11-08 18:13:25
* @Description:
-->
<template>
<div>
<div>请选择要执行的终止方式系统会根据选择进行处理</div>
<el-radio-group v-model="radio" class="stockRadioDiv">
<el-radio :label="1" border style="margin: 10px 0">
仅终止稍后回收
<div style="font-weight: 400">
任务立即终止车辆保持暂停稍后可在任务列表中手动回收
</div>
</el-radio>
<el-radio :label="2" border style="margin: 10px 0">
终止并立即回收
<div style="font-weight: 400">
任务立即终止立即选择货物回收方式生成任务或更新卸货点
</div>
</el-radio>
</el-radio-group>
<div>
终止原因
<el-input
type="textarea"
:rows="3"
style="margin: 10px 0"
placeholder="请输入终止原因"
v-model="textarea" />
</div>
</div>
</template>
<script>
export default {
data() {
return {
radio: 1,
textarea: '',
};
},
methods: {
init(val) {},
submit() {
if(this.textarea){
}else{
this.$message('请输入终止原因');
}
},
},
};
</script>
<style scoped>
.stockRadioDiv >>> .el-radio--medium.is-bordered {
display: flex;
align-items: center;
height: 70px;
line-height: 20px;
}
</style>

View File

@@ -0,0 +1,32 @@
<!--
* @Author: zwq
* @Date: 2025-10-13 16:18:41
* @LastEditors: zwq
* @LastEditTime: 2025-11-06 15:19:24
* @Description:
-->
<template>
<span>
{{
(injectData.val2
? ['满盘搬运', '空盘搬运', '备料搬运', '临时搬运'][injectData.val2]
: '-')
}}
</span>
</template>
<script>
export default {
props: {
injectData: {
type: Object,
default: () => ({}),
},
},
data() {
return {};
},
created() {},
methods: {},
};
</script>

View File

@@ -0,0 +1,32 @@
<!--
* @Author: zwq
* @Date: 2025-10-13 16:18:41
* @LastEditors: zwq
* @LastEditTime: 2025-11-06 15:20:43
* @Description:
-->
<template>
<span>
{{
(injectData.val3
? ['待下发', '待执行', '执行中', '已完成', '暂停中', '已终止', '异常'][injectData.val3]
: '-')
}}
</span>
</template>
<script>
export default {
props: {
injectData: {
type: Object,
default: () => ({}),
},
},
data() {
return {};
},
created() {},
methods: {},
};
</script>

View File

@@ -0,0 +1,57 @@
<!--
* @Author: zwq
* @Date: 2025-10-13 16:18:41
* @LastEditors: zwq
* @LastEditTime: 2025-11-06 15:37:02
* @Description:
-->
<template>
<div>
<div style="display: flex; align-items: center">
<div
style="
width: 16px;
height: 16px;
border-radius: 5px;
background-color: #e89b24;
color: #fff;
text-align:center;
line-height:16px
">
L
</div>
产品名称+产品规格
</div>
<div style="display: flex; align-items: center">
<div
style="
width: 16px;
height: 16px;
border-radius: 5px;
background-color: #6a96ec;
color: #fff;
text-align:center;
line-height:16px
">
R
</div>
产品名称+产品规格
</div>
</div>
</template>
<script>
export default {
props: {
injectData: {
type: Object,
default: () => ({}),
},
},
data() {
return {};
},
created() {},
methods: {},
};
</script>

View File

@@ -0,0 +1,32 @@
<!--
* @Author: zwq
* @Date: 2025-10-13 16:18:41
* @LastEditors: zwq
* @LastEditTime: 2025-11-06 15:19:24
* @Description:
-->
<template>
<span>
{{
(injectData.val2
? ['满盘搬运', '空盘搬运', '备料搬运', '临时搬运'][injectData.val2]
: '-')
}}
</span>
</template>
<script>
export default {
props: {
injectData: {
type: Object,
default: () => ({}),
},
},
data() {
return {};
},
created() {},
methods: {},
};
</script>

View File

@@ -0,0 +1,550 @@
<template>
<div class="app-container">
<div>
<search-bar
:formConfigs="formConfig"
ref="searchBarForm"
:isFold="true"
@headBtnClick="buttonClick" />
<div style="font-size: 14px">
自动刷新(5s)
<el-switch v-model="autoRefresh"></el-switch>
</div>
</div>
<base-table
v-loading="dataListLoading"
:table-props="tableProps"
:page="listQuery.pageNo"
:limit="listQuery.pageSize"
:max-height="tableH"
:table-data="tableData">
<method-btn
v-if="tableBtn.length"
slot="handleBtn"
:width="260"
label="操作"
:method-list="tableBtn"
@clickBtn="handleClick" />
</base-table>
<pagination
:limit.sync="listQuery.pageSize"
:page.sync="listQuery.pageNo"
:total="listQuery.total"
@pagination="getDataList" />
<!-- //新增 -->
<base-dialog
:dialogTitle="'新建人工任务'"
:dialogVisible="addOrUpdateVisible"
@cancel="handleCancel"
@confirm="handleConfirm"
:before-close="handleCancel"
:destroy-on-close="true"
width="70%">
<add-or-update
ref="addOrUpdate"
@setSN="setStepNum"
@refreshDataList="successSubmit"></add-or-update>
<template #footer>
<slot name="footer">
<el-row slot="footer" type="flex" justify="end">
<el-col :span="24">
<el-button
v-if="stepNum > 1"
size="small"
class="btnTextStyle"
@click="handleConfirm('up')">
上一步
</el-button>
<el-button
size="small"
class="btnTextStyle"
@click="handleCancel">
取消
</el-button>
<el-button
v-if="stepNum == 3"
type="primary"
class="btnTextStyle"
size="small"
plain
@click="successSubmit">
创建任务
</el-button>
<el-button
type="primary"
class="btnTextStyle"
size="small"
@click="handleConfirm">
{{ stepNum < 3 ? '下一步' : '创建并下发' }}
</el-button>
</el-col>
</el-row>
</slot>
</template>
</base-dialog>
<!-- //详情 -->
<detail-drawer
ref="detailDrawer"
@closeDrawer="closeDrawer"></detail-drawer>
<!-- //有货终止 -->
<base-dialog
:dialogTitle="'终止任务'"
:dialogVisible="stopStockVisible"
@cancel="handleCancelStopStock"
@confirm="handleConfirmStopStock"
:before-close="handleCancelStopStock"
:destroy-on-close="true"
width="50%">
<stop-in-stock ref="StopStockRef"></stop-in-stock>
</base-dialog>
</div>
</template>
<script>
import AddOrUpdate from './components/add-or-updata.vue';
import subSpan1 from './components/subSpan1.vue';
import subSpan2 from './components/subSpan2.vue';
import subSpan3 from './components/subSpan3.vue';
import subSpan4 from './components/subSpan4.vue';
import detailDrawer from './components/detailDrawer.vue';
import stopInStock from './components/stopInStock.vue'
import tableHeightMixin from '@/mixins/lb/tableHeightMixin';
import { parseTime } from '@/filter/code-filter';
const tableProps = [
{
prop: 'code',
label: '任务编号',
width: 140,
},
{
prop: 'val1',
label: '创建方式',
filter: (val) => (val ? ['自动', '人工'][val] : '-'),
},
{
prop: 'val2',
label: '任务类型',
subcomponent: subSpan1,
},
{
prop: 'val3',
label: '状态',
subcomponent: subSpan2,
},
{
prop: 'val4',
label: '搬运对象(L/R)',
subcomponent: subSpan3,
width: 160,
},
{
prop: 'val5',
label: '起点(L/R)',
subcomponent: subSpan3,
width: 160,
},
{
prop: 'val6',
label: '终点(L/R)',
subcomponent: subSpan3,
width: 160,
},
{
prop: 'val7',
label: '执行车辆',
subcomponent: subSpan4,
},
{
prop: 'creatTime',
label: '创建时间',
filter: parseTime,
width: 150,
},
{
prop: 'Time',
label: '执行时长',
filter: (val) => parseTime(val, '{HH}:{mm}:{ss}'),
width: 100,
},
];
export default {
mixins: [tableHeightMixin],
data() {
return {
tableProps,
tableBtn: [
{
type: 'detail',
btnName: '详情',
},
{
type: 'issue',
btnName: '下发',
showParam: {
type: '&',
data: [
{
type: 'equal',
name: 'status',
value: 1,
},
],
},
},
{
type: 'pause',
btnName: '暂停',
showParam: {
type: '&',
data: [
{
type: 'unequal',
name: 'status',
value: 1,
},
],
},
},
{
type: 'reassign',
btnName: '改派',
},
{
type: 'stop',
btnName: '终止',
},
{
type: 'recycle',
btnName: '回收',
},
].filter((v) => v),
tableData: [],
listQuery: {
//分页
pageSize: 10,
pageNo: 1,
total: 1,
},
formConfig: [
{
type: 'select',
label: '任务类型',
selectOptions: [
{
id: 1,
name: '满盘搬运',
},
{
id: 2,
name: '备料搬运',
},
{
id: 3,
name: '临时搬运',
},
{
id: 4,
name: '空盘搬运',
},
],
param: 'val1',
filterable: true,
},
{
type: 'select',
label: '业务类型',
selectOptions: [
{
id: 1,
name: '满盘搬运',
},
{
id: 2,
name: '空盘搬运',
},
{
id: 3,
name: '备料搬运',
},
{
id: 4,
name: '临时搬运',
},
],
param: 'val2',
filterable: true,
},
{
type: 'select',
label: '状态',
selectOptions: [
{
id: 1,
name: '待下发',
},
{
id: 2,
name: '待执行',
},
{
id: 3,
name: '执行中',
},
{
id: 4,
name: '已完成',
},
{
id: 5,
name: '暂停中',
},
{
id: 6,
name: '已终止',
},
{
id: 7,
name: '异常',
},
],
param: 'val3',
filterable: true,
},
{
type: 'select',
label: '执行车辆',
selectOptions: [],
param: 'val4',
labelField: 'label',
valueField: 'name',
filterable: true,
},
{
type: 'datePicker',
label: '创建日期',
dateType: 'daterange',
format: 'yyyy-MM-dd',
valueFormat: 'yyyy-MM-dd HH:mm:ss',
rangeSeparator: '-',
startPlaceholder: '开始时间',
endPlaceholder: '结束时间',
param: 'searchTime',
},
{
type: 'select',
label: '回收任务',
selectOptions: [
{
id: 1,
name: '是',
},
{
id: 0,
name: '否',
},
],
param: 'val5',
filterable: true,
},
{
type: 'input',
label: '编号',
placeholder: '编号',
param: 'code',
},
{
type: 'button',
btnName: '搜索',
name: 'search',
color: 'primary',
},
{
type: 'separate',
},
{
type: 'button',
btnName: '重置',
name: 'reset',
},
{
type: 'separate',
},
{
type: this.$auth.hasPermi('monitoring:cost-othercost-log:create')
? 'button'
: '',
btnName: '新增',
name: 'add',
color: 'success',
plain: true,
},
],
addOrUpdateVisible: false, //dialog状态
dataListLoading: false,
autoRefresh: false,
refreshTimer: null,
stepNum: 1,
stopStockVisible: false, //有货终止任务的dialog
};
},
watch: {
autoRefresh(newVal) {
if (newVal) {
// 开启时立即执行一次然后每5秒执行
this.getDataList();
this.refreshTimer = setInterval(() => {
this.getDataList();
}, 5000);
} else {
// 关闭时清除定时器
if (this.refreshTimer) {
clearInterval(this.refreshTimer);
this.refreshTimer = null;
}
}
},
},
beforeDestroy() {
// 组件销毁前清除定时器
if (this.refreshTimer) {
clearInterval(this.refreshTimer);
}
},
components: {
AddOrUpdate,
detailDrawer,
stopInStock,
},
created() {},
mounted() {
this.autoRefresh = true;
},
methods: {
buttonClick(val) {
switch (val.btnName) {
case 'search':
this.listQuery.pageNo = 1;
this.listQuery.pageSize = 20;
this.listQuery.name = val.name || null;
this.listQuery.startTime = val.searchTime ? val.searchTime[0] : null;
this.listQuery.endTime = val.searchTime
? val.searchTime[1].substr(0, 10) + ' 23:59:59'
: null;
this.getDataList();
break;
case 'add':
this.addOrUpdateHandle();
break;
case 'reset':
this.listQuery.code = null;
this.listQuery = {
pageSize: 10,
pageNo: 1,
total: 1,
};
this.getDataList();
break;
default:
console.log(val);
}
},
// 获取数据列表
getDataList() {
this.tableData = [
{
code: 1,
},
];
// this.dataListLoading = true
// this.urlOptions.getDataListURL(this.listQuery).then(response => {
// this.tableData = response.data.list;
// this.listQuery.total = response.data.total;
// this.dataListLoading = false
// });
},
// 每页数
sizeChangeHandle(val) {
this.listQuery.pageSize = val;
this.listQuery.pageNo = 1;
this.getDataList();
},
// 当前页
currentChangeHandle(val) {
this.listQuery.pageNo = val;
this.getDataList();
},
// 新增
addOrUpdateHandle() {
this.addOrUpdateVisible = true;
this.$nextTick(() => {
this.$refs.addOrUpdate.init();
});
},
successSubmit() {
this.addOrUpdateVisible = false;
this.stepNum = 1;
this.getDataList();
},
//tableBtn点击
handleClick(val) {
if (val.type === 'stop') {
if (val.data === '无货') {
this.stopFun(val.data);
} else {
this.stopStockVisible = true;
this.$nextTick(() => {
this.$refs.stopStockRef.init();
});
}
} else if (val.type === 'detail') {
this.$nextTick(() => {
this.$refs.detailDrawer.init(val.data, 'detail');
});
} else {
this.otherMethods(val);
}
},
stopFun(val) {
this.$prompt('确认终止空载该任务?此操作不可恢复', '终止任务', {
confirmButtonText: '确定',
cancelButtonText: '取消',
inputType: 'textarea',
inputPlaceholder: '请输入终止原因',
})
.then(({ value }) => {
console.log('终止原因' + value);
})
.catch(() => {
this.$message({
type: 'info',
message: '取消终止',
});
});
},
setStepNum(val) {
this.stepNum = val;
},
// 新增dialog取消
handleCancel() {
this.addOrUpdateVisible = false;
},
handleConfirm(val) {
if (val == 'up') {
this.$refs.addOrUpdate.upSubmit();
} else {
this.$refs.addOrUpdate.nextSubmit();
}
},
// 有货任务终止dialog取消
handleCancelStopStock() {
this.stopStockVisible = false;
},
handleConfirmStopStock() {
this.$refs.stopStockRef.submit();
},
closeDrawer() {},
},
};
</script>

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"