Compare commits

...

19 Commits

Author SHA1 Message Date
471245d5b6 Merge pull request 'projects/ssdl-gtz' (#459) from projects/ssdl-gtz into projects/ssdl-test
Reviewed-on: #459
2025-12-10 15:22:44 +08:00
gtz
8226b45a03 merge 2025-12-10 15:21:00 +08:00
gtz
dde04cf93f 1 2025-12-10 15:11:28 +08:00
63a67e58de Merge pull request '更新' (#454) from projects/ssdl-zwq into projects/ssdl-test
Reviewed-on: #454
2025-11-28 16:28:10 +08:00
zwq
48e9f70625 更新 2025-11-28 16:27:50 +08:00
f5f250cb16 Merge pull request '更新' (#453) from projects/ssdl-zwq into projects/ssdl-test
Reviewed-on: #453
2025-11-20 14:48:36 +08:00
zwq
b6241fe7c4 更新 2025-11-20 14:48:07 +08:00
94edd04a08 Merge pull request '更新' (#452) from projects/ssdl-zwq into projects/ssdl-test
Reviewed-on: #452
2025-11-20 14:45:08 +08:00
zwq
b926559a7d 更新 2025-11-20 14:44:10 +08:00
b2984ed4cf Merge pull request 'projects/ssdl-zhp' (#451) from projects/ssdl-zhp into projects/ssdl-test
Reviewed-on: #451
2025-11-20 13:24:50 +08:00
‘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
gtz
be86cbd9b3 1 2025-11-17 10:58:44 +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
108 changed files with 13697 additions and 1714 deletions

View File

@@ -12,8 +12,10 @@ 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://192.168.0.31:48080'
# 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,72 @@
import request from '@/utils/request'
// 获取区域列表
export function getAreaList(params) {
return request({
url: '/wms/region/page',
method: 'get',
params
})
}
// 获取区域空满数量
export function postAllAreaInfo(data) {
return request({
url: '/wms/region/lsit/count',
method: 'post',
data
})
}
// 获取指定库区库位信息
export function postAreaInfo(data) {
return request({
url: '/wms/line-edge-library/list/region',
method: 'post',
data
})
}
// 获取区域总览
export function postAllAreaOverview(data) {
return request({
url: '/wms/line-edge-library/line/count',
method: 'post',
data
})
}
// 删除能源实时数据库plc相关
export function deleteEnergyPlc(id) {
return request({
url: '/base/energy-plc/delete?id=' + id,
method: 'delete'
})
}
// 获取关联表编码
export function getCode() {
return request({
url: '/base/energy-plc/getCode',
method: 'get'
})
}
// 获得能源实时数据库plc相关分页
export function getEnergyPlcPage(data) {
return request({
url: '/base/energy-plc/page',
method: 'post',
data: data
})
}
// 导出能源实时数据库plc相关 Excel
export function exportEnergyPlcExcel(query) {
return request({
url: '/base/energy-plc/export-excel',
method: 'get',
params: query,
responseType: 'blob'
})
}

View File

@@ -0,0 +1,63 @@
import request from '@/utils/request'
// 获取出入库历史任务分页
export function getRecordPage(params) {
return request({
url: '/wms/job-main-task-history/page',
method: 'get',
params
})
}
// 获取巷道列表
export function getLaneList(params) {
return request({
url: '/wms/lane/page',
method: 'get',
params
})
}
// 更新能源实时数据库plc相关
export function updateEnergyPlc(data) {
return request({
url: '/base/energy-plc/update',
method: 'put',
data: data
})
}
// 删除能源实时数据库plc相关
export function deleteEnergyPlc(id) {
return request({
url: '/base/energy-plc/delete?id=' + id,
method: 'delete'
})
}
// 获取关联表编码
export function getCode() {
return request({
url: '/base/energy-plc/getCode',
method: 'get'
})
}
// 获得能源实时数据库plc相关分页
export function getEnergyPlcPage(data) {
return request({
url: '/base/energy-plc/page',
method: 'post',
data: data
})
}
// 导出能源实时数据库plc相关 Excel
export function exportEnergyPlcExcel(query) {
return request({
url: '/base/energy-plc/export-excel',
method: 'get',
params: query,
responseType: 'blob'
})
}

View File

@@ -0,0 +1,154 @@
/*
* @Author: zwq
* @Date: 2025-11-17 09:25:12
* @LastEditors: zwq
* @LastEditTime: 2025-11-28 09:29:14
* @Description:
*/
import request from '@/utils/request'
// 获得原料分页
export function getProductPage(query) {
return request({
url: '/wms/material/page',
method: 'get',
params: query
})
}
// 获得原料
export function getProduct(id) {
return request({
url: '/wms/material/get?id=' + id,
method: 'get'
})
}
// 删除原料
export function deleteProduct(id) {
return request({
url: '/wms/material/delete?id=' + id,
method: 'delete'
})
}
// 更新
export function updateProduct(data) {
return request({
url: '/wms/material/update',
method: 'put',
data: data
})
}
// 创建
export function createProduct(data) {
return request({
url: '/wms/material/create',
method: 'post',
data: data
})
}
// 获得工艺分页
export function getProcessPage(query) {
return request({
url: '/wms/process/page/group/by',
method: 'get',
params: query
})
}
// 获得工艺点击展开表格
export function getProcessDetailPage(query) {
return request({
url: '/wms/process/page/group/by/detail',
method: 'get',
params: query
})
}
// 删除工艺
export function deleteProcess(id) {
return request({
url: '/wms/process/delete?id=' + id,
method: 'delete'
})
}
// 批量删除工艺
export function deleteProcessList(ids) {
return request({
url: '/wms/process/delete-list?ids=' + ids,
method: 'delete'
})
}
// 更新
export function updateProcess(data) {
return request({
url: '/wms/process/update',
method: 'put',
data: data
})
}
// 创建
export function createProcess(data) {
return request({
url: '/wms/process/create',
method: 'post',
data: data
})
}
// 获得工艺
export function getProcess(id) {
return request({
url: '/wms/process/get?id=' + id,
method: 'get'
})
}
// 工艺设备原料分页
export function getProcessMaterialPage(query) {
return request({
url: '/wms/process-equipment-material/page',
method: 'get',
params: query
})
}
// 删除工艺设备原料
export function deleteProcessMaterial(id) {
return request({
url: '/wms/process-equipment-material/delete?id=' + id,
method: 'delete'
})
}
// 更新
export function updateProcessMaterial(data) {
return request({
url: '/wms/process-equipment-material/update',
method: 'put',
data: data
})
}
// 创建
export function createProcessMaterial(data) {
return request({
url: '/wms/process-equipment-material/create',
method: 'post',
data: data
})
}
// 获得工艺
export function getProcessMaterial(id) {
return request({
url: '/wms/process-equipment-material/get?id=' + id,
method: 'get'
})
}
// 获得设备分页
export function getEquipmentPage(query) {
return request({
url: '/wms/equipment/page',
method: 'get',
params: query
})
}

60
src/api/ssdl/taskList.js Normal file
View File

@@ -0,0 +1,60 @@
/*
* @Author: zwq
* @Date: 2025-11-17 09:25:12
* @LastEditors: zwq
* @LastEditTime: 2025-11-18 15:42:19
* @Description:
*/
import request from '@/utils/request'
// 获得任务分页
export function getTaskPage(query) {
return request({
url: '/wms/job-main-task/page',
method: 'get',
params: query
})
}
// 获得任务
export function getTask(id) {
return request({
url: '/wms/job-main-task/get?id=' + id,
method: 'get'
})
}
// 获得任务日志分页
export function getTaskLogPage(query) {
return request({
url: '/wms/job-main-task-log/page',
method: 'get',
params: query
})
}
// 更新
export function updateTask(data) {
return request({
url: '/wms/job-main-task/update',
method: 'put',
data: data
})
}
// 根据区域id获取该区域下的库位信息
export function getRegion(id) {
return request({
url: '/wms/line-edge-library/get-by-region-id?regionId=' + id,
method: 'get'
})
}
// 创建
export function createPCTask(data) {
return request({
url: '/wms/job-main-task/pc-create-task',
method: 'post',
data: data
})
}

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

@@ -2,7 +2,7 @@
* @Author: zwq
* @Date: 2022-08-24 11:19:43
* @LastEditors: zwq
* @LastEditTime: 2024-04-02 09:33:29
* @LastEditTime: 2025-11-28 09:35:03
* @Description:
*/
export default {
@@ -16,7 +16,7 @@ export default {
},
tableData: [], //table数据
listQuery: { //分页
pageSize: 10,
pageSize: 20,
pageNo: 1,
total: 1,
},
@@ -69,7 +69,7 @@ export default {
this.$refs.addOrUpdate.init(val.data.id);
});
} else if (val.type === "delete") {
this.deleteHandle(val.data.id, val.data.name, val.data._pageIndex)
this.deleteHandle(val.data.id, val.data.name, val.data._pageIndex,val.data)
} else {
this.otherMethods(val)
}

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

@@ -0,0 +1,125 @@
<template>
<div
:class="className"
:style="{ height: height, width: width, marginLeft: '10px' }" />
</template>
<script>
import * as echarts from 'echarts';
require('echarts/theme/macarons'); // echarts theme
import resize from '@/utils/chartMixins/resize';
const animationDuration = 1000;
export default {
mixins: [resize],
props: {
className: {
type: String,
default: 'chart',
},
title: {
type: String,
default: '',
},
width: {
type: String,
default: '100%',
},
height: {
type: String,
default: '300px',
},
ringData: {
type: Object,
default: () => {},
},
},
data() {
return {
chart: null,
targetId: '',
};
},
beforeDestroy() {
if (!this.chart) {
return;
}
this.chart.dispose();
this.chart = null;
},
methods: {
initChart() {
this.chart = echarts.init(this.$el, 'macarons');
const _this = this;
this.chart.setOption({
title: {
text: this.title
? '{space|}{tip|}{space|}{value|' + this.title + '}'
: '',
textStyle: {
rich: {
tip: {
width: 6,
height: 6,
borderRadius: 50,
backgroundColor: '#288AFF',
},
space: {
width: 8,
},
value: {
fontSize: 14,
color: 'black',
},
},
},
},
color: ['#33B36B', '#3A8DFF', '#F59A23'],
tooltip: {
trigger: 'axis',
axisPointer: {
type: 'cross',
crossStyle: {
color: '#999',
},
},
},
legend: {
data: ['当前满位', '当前空位', '在途'],
},
grid: {
containLabel: true,
},
series: [
{
// name: '投入',
type: 'pie',
radius: '50%',
data: [
{
name: '当前满位',
value: this.ringData.occupiedQuantity
},
{
name: '当前空位',
value: this.ringData.idleQuantity
},
{
name: '在途',
value: this.ringData.transitQuantity
},
],
emphasis: {
itemStyle: {
shadowBlur: 10,
shadowOffsetX: 0,
shadowColor: 'rgba(0, 0, 0, 0.5)'
}
}
}
],
});
},
},
};
</script>

View File

@@ -0,0 +1,262 @@
<template>
<div class="app-container">
<el-row class="overview-container">
<el-col :span="4" class="overview-container-left">
<el-row style="font-size: 18px; font-weight: bold; line-height: 36px">库区选择</el-row>
<el-input
v-model="areaSearchForm.regionName"
placeholder="库区名称"
@blur="getArea"
clearable
/>
<el-tree
:data="areaList"
:node-key="'id'"
:props="{label: 'regionName'}"
@node-click="nodeClick"
/>
</el-col>
<el-col :span="16" v-if="changeType === 0" class="overview-container-main">
<el-row>
<el-col :span="8" class="allarea-box" v-for="item in allAreaList" :key="item.id">
<div class="areainfo-box">
<div class="areainfo-box-header">
{{ item.regionName }}
</div>
<div class="areainfo-box-line">
<div class="areainfo-box-line-item" :style="{width: `${(item.occupiedQuantity / (item.totalInventory + item.transitQuantity) * 100).toFixed(2)}%`, backgroundColor: '#33B36B'}"></div>
<div class="areainfo-box-line-item" :style="{width: `${(item.idleQuantity / (item.totalInventory + item.transitQuantity) * 100).toFixed(2)}%`, backgroundColor: '#3A8DFF'}"></div>
<div class="areainfo-box-line-item" :style="{width: `${(item.transitQuantity / (item.totalInventory + item.transitQuantity) * 100).toFixed(2)}%`, backgroundColor: '#F59A23'}"></div>
</div>
<el-row class="areainfo-box-info">
<el-col class="areainfo-box-info-item" :span="6">
<p class="areainfo-box-info-item-count">{{item.totalInventory}}</p>
<p class="areainfo-box-info-item-title">库位总数</p>
</el-col>
<el-col class="areainfo-box-info-item" :span="6">
<p class="areainfo-box-info-item-count" style="color: #33B36B">{{item.occupiedQuantity}}</p>
<p class="areainfo-box-info-item-title"></p>
</el-col>
<el-col class="areainfo-box-info-item" :span="6">
<p class="areainfo-box-info-item-count" style="color: #3A8DFF">{{item.idleQuantity}}</p>
<p class="areainfo-box-info-item-title"></p>
</el-col>
<el-col class="areainfo-box-info-item" :span="6">
<p class="areainfo-box-info-item-count" style="color: #F59A23">{{item.transitQuantity}}</p>
<p class="areainfo-box-info-item-title">在途</p>
</el-col>
</el-row>
</div>
</el-col>
</el-row>
</el-col>
<el-col :span="4" v-if="changeType === 0" class="overview-container-right">
<el-tabs v-model="activeName" @tab-click="handleClickRight">
<el-tab-pane label="概览" name="first">
<el-row class="overview-container-right-alloverview">
<el-col class="overview-container-right-alloverview-item" :span="8">
<p class="overview-container-right-alloverview-item-count">{{allAreaInfo.totalInventory}}</p>
<p class="overview-container-right-alloverview-item-title">库位总数</p>
</el-col>
<el-col class="overview-container-right-alloverview-item" :span="8">
<p class="overview-container-right-alloverview-item-count">{{allAreaInfo.occupiedQuantity}}</p>
<p class="overview-container-right-alloverview-item-title">当前满位</p>
</el-col>
<el-col class="overview-container-right-alloverview-item" :span="8">
<p class="overview-container-right-alloverview-item-count">{{allAreaInfo.idleQuantity}}</p>
<p class="overview-container-right-alloverview-item-title">当前空位</p>
</el-col>
<el-col class="overview-container-right-alloverview-item" :span="8">
<p class="overview-container-right-alloverview-item-count">{{allAreaInfo.transitQuantity}}</p>
<p class="overview-container-right-alloverview-item-title">在途</p>
</el-col>
</el-row>
<ringChart :ring-data="allAreaInfo" ref="ringChart" />
</el-tab-pane>
<el-tab-pane label="在途任务" name="second">在途任务</el-tab-pane>
</el-tabs>
</el-col>
<el-col :span="20" v-if="changeType === 1" class="overview-container-main"></el-col>
</el-row>
</div>
</template>
<script>
// import basicPage from '@/mixins/basic-page';
import ringChart from './components/ringChart.vue';
import { getAreaList, postAllAreaInfo, postAllAreaOverview, postAreaInfo } from '@/api/areavisual/overview';
export default {
name: 'overview',
// mixins: [basicPage],
data() {
return {
areaList: [
{
id: 0,
regionName: "全部库区"
}
],
areaSearchForm: {
pageNo: 1,
pageSize: 100,
regionName: ''
},
changeType: 0,
allAreaList: [],
allAreaInfo: {
totalInventory: 0,
occupiedQuantity: 0,
idleQuantity: 0,
transitQuantity: 0
},
areaInfo: [],
activeName: 'first'
};
},
components: {
ringChart
},
async created() {
this.getArea()
this.getAllAreaInfo()
this.getAllAreaOverview()
},
watch: {
activeName: (val) => {
if (val === 'first') {
this.getAllAreaOverview()
} else if (val === 'second') {
this.getNowTaskList()
}
}
},
methods: {
// 获取库区列表
async getArea() {
const res = await getAreaList(this.areaSearchForm)
if (res.code === 0 && res.data) {
this.areaList = [
{
id: 0,
regionName: "全部库区"
}
],
this.areaList.push(...(res.data.list))
}
},
// 库区选择
nodeClick(data, node, components) {
if (data.id === 0) {
this.changeType = 0
this.activeName = 'first'
this.getAllAreaInfo()
} else {
this.changeType = 1
this.getAreaInfo(data.id)
}
},
// 获取全部库区概览信息
async getAllAreaInfo() {
const res = await postAllAreaInfo([])
console.log(res)
if (res.code === 0 && res.data) {
this.allAreaList = res.data
}
},
// 获取库区概览
async getAllAreaOverview() {
const res = await postAllAreaOverview([])
console.log(res)
if (res.code === 0 && res.data) {
this.allAreaInfo = res.data
this.$refs.ringChart.initChart();
}
},
// 获取在途任务
async getNowTaskList() {},
// 获取单库区信息
async getAreaInfo (id) {
const res = await postAreaInfo({id})
console.log(res)
if (res.code === 0 && res.data) {
this.areaInfo = res.data
}
},
// 全部库区右侧分页点击
handleClickRight (tab, event) {
console.log(tab, event)
}
},
};
</script>
<style lang="scss" scoped>
.overview-container {
max-height: calc(100vh - 120px - 8px);
overflow: scroll;
.overview-container-left {
padding-right: 12px;
}
.overview-container-main {
.allarea-box {
padding: 10px;
.areainfo-box {
border: 1px solid #bbb;
border-radius: 5px;
padding: 10px;
.areainfo-box-header {
font-size: 16px;
font-weight: bold;
white-space: nowrap; /* 禁止换行 */
overflow: hidden; /* 隐藏溢出内容 */
text-overflow: ellipsis; /* 溢出部分显示省略号 */
}
.areainfo-box-line {
width: 100%;
.areainfo-box-line-item {
height: 5px;
display: inline-block;
}
}
.areainfo-box-info {
.areainfo-box-info-item {
text-align: center;
font-size: 12px;
.areainfo-box-info-item-count {
font-weight: bold;
font-size: 14px;
}
}
}
}
}
}
.overview-container-right {
.overview-container-right-alloverview {
.overview-container-right-alloverview-item {
text-align: center;
.overview-container-right-alloverview-item-count {
font-size: 14px;
font-weight: bold;
}
}
}
}
}
</style>
<style lang="scss">
.el-tree-node__content {
height: 40px;
line-height: 40px;
}
.el-tree-node__label {
display: block;
width: calc(100% - 24px);
text-align: center;
white-space: nowrap; /* 禁止换行 */
overflow: hidden; /* 隐藏溢出内容 */
text-overflow: ellipsis; /* 溢出部分显示省略号 */
}
</style>

View File

@@ -0,0 +1,519 @@
<!--
filename: EquipmentDrawer.vue
author: liubin
date: 2023-08-22 14:38:56
description:
-->
<template>
<el-drawer
:visible="visible"
:show-close="false"
:wrapper-closable="false"
class="drawer"
custom-class="mes-drawer"
size="60%"
@closed="$emit('destroy')">
<SmallTitle slot="title">
{{
mode.includes('detail')
? '详情'
: mode.includes('edit')
? '编辑'
: '新增'
}}
</SmallTitle>
<div class="drawer-body flex">
<div class="drawer-body__content">
<section v-for="(section, index) in sections" :key="section.key">
<SmallTitle v-if="index != 0">{{ section.name }}</SmallTitle>
<div
class="form-part"
v-if="section.key == 'base'"
style="margin-bottom: 32px">
<el-skeleton v-if="!showForm" animated />
<!-- <EquipmentInfoForm
key="drawer-dialog-form"
v-if="showForm"
:disabled="mode.includes('detail')"
:sync-filelist="syncFileListFlag"
v-model="form" /> -->
</div>
<div v-if="section.key == 'attrs'" style="margin-top: 12px">
<base-table
v-loading="attrListLoading"
:table-props="section.props"
:page="attrQuery?.params.pageNo || 1"
:limit="attrQuery?.params.pageSize || 10"
:table-data="list"
:add-button-show="mode.includes('detail') ? null : '添加属性'"
@emitButtonClick="handleAddAttr"
@emitFun="handleEmitFun">
<method-btn
v-if="section.tableBtn"
slot="handleBtn"
label="操作"
:method-list="tableBtn"
@clickBtn="handleTableBtnClick" />
</base-table>
<!-- 分页组件 -->
<pagination
v-show="total > 0"
:total="total"
:page.sync="attrQuery.params.pageNo"
:limit.sync="attrQuery.params.pageSize"
@pagination="getAttrList" />
</div>
</section>
</div>
<div class="drawer-body__footer">
<el-button style="" @click="handleCancel">取消</el-button>
<el-button v-if="mode == 'detail'" type="primary" @click="toggleEdit">
编辑
</el-button>
<el-button v-else type="primary" @click="handleConfirm">确定</el-button>
<!-- sections的第二项必须是 属性列表 -->
<!-- <el-button
v-if="sections[1].allowAdd"
type="primary"
@click="handleAddAttr">
添加属性
</el-button> -->
</div>
</div>
</el-drawer>
</template>
<script>
const SmallTitle = {
name: 'SmallTitle',
props: ['size'],
components: {},
data() {
return {};
},
methods: {},
render: function (h) {
return h(
'span',
{
class: 'small-title',
style: {
fontSize: '18px',
lineHeight:
this.size == 'lg' ? '24px' : this.size == 'sm' ? '18px' : '20px',
fontWeight: 500,
fontFamily: '微软雅黑, Microsoft YaHei, Arial, Helvetica, sans-serif',
},
},
this.$slots.default
);
},
};
export default {
components: { SmallTitle },
props: ['sections', 'mode', 'dataId'], // dataId 作为一个通用的存放id的字段
data() {
return {
visible: false,
showForm: false,
btnLoading: false,
total: 0,
form: {},
list: [],
attrTitle: '',
attrForm: {
id: null,
equipmentId: null,
name: '',
value: '',
},
attrFormVisible: false,
attrRows: [
[
{
input: true,
label: '属性名称',
prop: 'name',
rules: [{ required: true, message: '不能为空', trigger: 'blur' }],
},
],
[
{
input: true,
label: '属性值',
prop: 'value',
},
],
],
attrQuery: {
params: {
pageNo: 1,
pageSize: 10,
},
}, // 属性列表的请求
infoQuery: null, // 基本信息的请求
attrFormSubmitting: false,
attrListLoading: false,
syncFileListFlag: null,
};
},
computed: {
formRows() {
return this.sections[0].rows.map((row) => {
return row.map((col) => {
if (col.key == 'eq-pics') {
// 重置图片的位置
return {
...col,
bind: {
...col.bind,
},
style: {
left: 0,
right: 'unset',
},
};
}
return {
...col,
bind: {
...col.bind,
// 详情 模式下,禁用各种输入
disabled: this.mode == 'detail',
},
};
});
});
},
tableBtn() {
return this.mode == 'detail' ? [] : this.sections[1].tableBtn;
},
},
mounted() {
for (const section of this.sections) {
// 请求具体信息
if ('url' in section) {
const query = {
url: section.url,
method: section.method || 'get',
params: section.queryParams || null,
data: section.data || null,
};
this.$axios(query).then(({ data }) => {
if (section.key == 'base') {
this.form = data;
// this.form = {
// code: 'gj',
// name: '下片机',
// enName: 'unload',
// abbr: '',
// equipmentTypeId: 21084,
// remark: '备注',
// id: '1712367395052384257',
// createTime: 1697095176000,
// enterTime: 0,
// productionTime: 0,
// files: [
// {
// fileName: '测试.xlsx',
// fileUrl: 'https://nimg.ws.126.net/?url=http%3A%2F%2Fdingyue.ws.126.net%2F2022%2F0108%2F0f0c6f30j00r5cle9000sc000hs00gtc.jpg&thumbnail=660x2147483647&quality=80&type=jpg',
// fileType: 1
// },
// {
// fileName: '测试2.xlsx',
// fileUrl: 'https://nimg.ws.126.net/?url=http%3A%2F%2Fdingyue.ws.126.net%2F2022%2F0415%2F2cd23619j00racb96000kc000hs00hsc.jpg&thumbnail=660x2147483647&quality=80&type=jpg',
// fileType: 1
// },
// {
// fileName: '测试3.xlsx',
// fileUrl: 'https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fsafe-img.xhscdn.com%2Fbw1%2F1fea91a0-d088-409e-b145-e0e61254b28b%3FimageView2%2F2%2Fw%2F1080%2Fformat%2Fjpg&refer=http%3A%2F%2Fsafe-img.xhscdn.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=auto?sec=1700031689&t=2e0fe7d1de7f54adff3007efe133d67c',
// fileType: 1
// },
// {
// fileName: '测试4.xlsx',
// fileUrl: 'https://pics5.baidu.com/feed/b7003af33a87e950cdfb4b4546eed044faf2b40d.jpeg?token=1d7484cfe4b014dd201f8c8725cab945',
// fileType: 2
// },
// {
// fileName: '测试5.xlsx',
// fileUrl: 'https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fsafe-img.xhscdn.com%2Fbw1%2Fe3500876-9c46-4b70-8d37-4799520cdd13%3FimageView2%2F2%2Fw%2F1080%2Fformat%2Fjpg&refer=http%3A%2F%2Fsafe-img.xhscdn.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=auto?sec=1700031689&t=4abc1df930e62730e5361a7d3765e0f2',
// fileType: 2
// },
// ],
// tvalue: 0,
// processingTime: 0,
// manufacturer: '',
// spec: '',
// description: '描述',
// };
this.showForm = true;
this.infoQuery = query;
} else if (section.key == 'attrs') {
this.attrQuery = query;
this.list = data.list;
this.total = data.total;
}
});
}
}
},
methods: {
handleTableBtnClick({ type, data }) {
switch (type) {
case 'edit':
this.handleEditAttr(data.id);
break;
case 'delete':
this.handleDeleteAttr(data.id);
break;
}
},
async handleConfirm() {
this.btnLoading = true;
this.syncFileListFlag = Math.random();
this.$nextTick(async () => {
const { code, data } = await this.$axios({
url: this.sections[0].urlUpdate,
method: 'put',
data: this.form,
});
if (code == 0) {
this.$modal.msgSuccess('更新成功');
this.$emit('refreshDataList');
}
this.btnLoading = false;
this.handleCancel();
});
},
handleEmitFun(val) {
console.log('handleEmitFun', val);
},
init() {
this.visible = true;
},
async getAttrList() {
this.attrListLoading = true;
const res = await this.$axios(this.attrQuery);
if (res.code == 0) {
this.list = res.data.list;
this.total = res.data.total;
}
this.attrListLoading = false;
},
// 保存表单
handleSave() {
this.$refs['form'][0].validate(async (valid) => {
if (valid) {
const isEdit = this.mode == 'edit';
await this.$axios({
url: this.sections[0][isEdit ? 'urlUpdate' : 'urlCreate'],
method: isEdit ? 'put' : 'post',
data: this.form,
});
this.$modal.msgSuccess(`${isEdit ? '更新' : '创建'}成功`);
this.visible = false;
this.$emit('refreshDataList');
}
});
},
handleCancel() {
this.visible = false;
},
// 开启编辑
toggleEdit() {
this.$emit('update-mode', 'edit');
},
// 新增属性
handleAddAttr() {
if (!this.dataId) return this.$message.warning('请先创建设备信息');
this.attrForm = {
id: null,
equipmentId: this.dataId,
name: '',
value: '',
};
this.attrTitle = '添加设备属性';
this.attrFormVisible = true;
},
// 编辑属性
async handleEditAttr(attrId) {
const res = await this.$axios({
url: this.sections[1].urlDetail,
method: 'get',
params: { id: attrId },
});
if (res.code == 0) {
this.attrForm = res.data;
this.attrTitle = '编辑设备属性';
this.attrFormVisible = true;
}
},
// 删除属性
handleDeleteAttr(attrId) {
this.$confirm('确定删除该属性?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
})
.then(async () => {
const res = await this.$axios({
url: this.sections[1].urlDelete,
method: 'delete',
params: { id: attrId },
});
if (res.code == 0) {
this.$message({
message: '删除成功',
type: 'success',
duration: 1500,
onClose: () => {
this.getAttrList();
},
});
}
})
.catch(() => {});
},
// 提交属性表
submitAttrForm() {
this.$refs['attrForm'].validate(async (valid) => {
if (!valid) {
return;
}
try {
const isEdit = this.attrForm.id != null;
this.attrFormSubmitting = true;
const res = await this.$axios({
url: isEdit
? this.sections[1].urlUpdate
: this.sections[1].urlCreate,
method: isEdit ? 'put' : 'post',
data: this.attrForm,
});
if (res.code == 0) {
this.closeAttrForm();
this.$message({
message: `${isEdit ? '更新' : '创建'}成功`,
type: 'success',
duration: 1500,
onClose: () => {
this.getAttrList();
},
});
}
this.attrFormSubmitting = false;
} catch (err) {
this.$message({
message: err,
type: 'error',
duration: 1500,
});
this.attrFormSubmitting = false;
}
});
},
closeAttrForm() {
this.attrFormVisible = false;
},
handleClick(raw) {
if (raw.type === 'delete') {
this.$confirm(
`确定对${
raw.data.name
? '[名称=' + raw.data.name + ']'
: '[序号=' + raw.data._pageIndex + ']'
}进行删除操作?`,
'提示',
{
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
}
)
.then(() => {
deleteProductAttr(raw.data.id).then(({ data }) => {
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {
this.getList();
},
});
});
})
.catch(() => {});
} else {
this.addNew(raw.data.id);
}
},
},
};
</script>
<style scoped>
.drawer >>> .el-drawer {
border-radius: 8px 0 0 8px;
}
.drawer >>> .el-drawer__header {
margin: 0;
padding: 32px 32px 24px;
border-bottom: 1px solid #dcdfe6;
margin-bottom: 0px;
}
.small-title::before {
content: '';
display: inline-block;
vertical-align: top;
width: 4px;
height: 22px;
border-radius: 1px;
margin-right: 8px;
background-color: #0b58ff;
}
.drawer-body {
display: flex;
flex-direction: column;
height: 100%;
}
.drawer-body__content {
flex: 1;
/* background: #eee; */
padding: 20px 30px;
overflow-y: auto;
}
.drawer-body__footer {
display: flex;
justify-content: flex-end;
padding: 18px;
}
</style>

View File

@@ -0,0 +1,277 @@
<template>
<div class="app-container">
<!-- 搜索工作栏 -->
<SearchBar
:formConfigs="searchBarFormConfig"
ref="search-bar"
isFold
@headBtnClick="handleSearchBarBtnClick" />
<!-- 列表 -->
<base-table
:table-props="tableProps"
:page="queryParams.pageNo"
:limit="queryParams.pageSize"
:table-data="list"
@emitFun="handleEmitFun">
<method-btn
v-if="tableBtn.length"
slot="handleBtn"
:width="120"
label="操作"
:method-list="tableBtn"
@clickBtn="handleTableBtnClick" />
</base-table>
<!-- 分页组件 -->
<pagination
v-show="total > 0"
:total="total"
:page.sync="queryParams.pageNo"
:limit.sync="queryParams.pageSize"
@pagination="getList" />
<!-- 设备 详情 - 编辑 -->
<RecordDrawer
v-if="open"
ref="drawer"
:mode="editMode"
@update-mode="editMode = $event"
:data-id="form.id"
@refreshDataList="getList"
@cancel="cancelEdit"
@destroy="cancelEdit" />
</div>
</template>
<script>
import moment from 'moment';
import basicPageMixin from '@/mixins/lb/basicPageMixin';
import RecordDrawer from './components/RecordDrawer';
import { getRecordPage, getLaneList } from '@/api/areavisual/record';
export default {
name: 'Equipment',
components: {
RecordDrawer,
},
mixins: [basicPageMixin],
data() {
return {
searchBarKeys: ['name', 'code'],
// this.$auth.hasPermi(`base:equipment:update`)
tableBtn: [
{
type: 'detail',
btnName: '详情'
}
].filter((v) => v),
tableProps: [
{
prop: 'recordCode',
label: '出/入库单编号',
fixed: true,
width: 180,
// filter: (val) => moment(val).format('yyyy-MM-DD HH:mm:ss'),
// showOverflowtooltip: true,
},
{
prop: 'type',
label: '业务类型',
filter: (val) => val === 1 ? '出库' : '入库',
},
{
width: 180,
prop: 'recordTime',
label: '出/入库时间',
filter: (val) => moment(val).format('yyyy-MM-DD HH:mm:ss')
},
{ prop: 'recordArea', label: '出/入库库区' },
{ prop: 'recordLane', label: '出/入库巷道' },
{ prop: 'recordRegion', label: '出/入库库位号' },
{ prop: 'target', label: '搬运对象' },
{ prop: 'productName', label: '产品名称' },
{ prop: 'specification', label: '型号规格' },
{ prop: 'recordMan', label: '出/入库人' },
{ prop: 'remark', label: '备注' }
],
searchBarFormConfig: [
{
type: 'input',
label: '关键字',
placeholder: '请输入出/入库编码、产品名称、规格型号、库位号',
param: 'query',
width: 350
},
{
type: 'select',
label: '业务类型',
selectOptions: [
{
id: '1',
name:'出库'
},
{
id: '2',
name:'入库'
},
],
placeholder: '请选择业务类型',
param: 'type',
},
{
type: 'select',
label: '出/入库巷道',
selectOptions: [],
placeholder: '请选择出/入库巷道',
param: 'recordLane',
},
{
type: 'select',
label: '来源',
selectOptions: [
{
id: '1',
name:'WMS'
},
{
id: '2',
name:'MES'
},
],
placeholder: '请选择来源',
param: 'source',
},
{
type: 'select',
label: '出/入库人',
selectOptions: [],
placeholder: '请选择出/入库人',
param: 'recordMan',
},
{
type: 'datePicker',
label: '出/入库时间',
placeholder: '请选择出/入库时间',
param: 'recordTime',
dateType: 'datetimerange',
rangeSeparator: '至'
},
{
type: 'select',
label: '载具类型',
selectOptions: [
{
id: '1',
name:'AGV'
},
{
id: '2',
name:'人工叉车'
},
],
placeholder: '请选择载具类型',
param: 'vehicleType',
},
{
type: 'button',
btnName: '查询',
name: 'search',
color: 'primary',
},
{
type: 'button',
btnName: '重置',
name: 'reset',
color: 'info',
}
],
editVisible: false,
editMode: 'detail', // 'edit', 'detail'
// 是否显示弹出层
open: false,
// 查询参数
queryParams: {
pageNo: 1,
pageSize: 20,
query: '',
type: '',
source: '',
recordLane: '',
recordMan: '',
recordTime: '',
vehicleType: ''
},
form: {}
};
},
created() {
this.getLane()
this.getList();
},
computed: {},
methods: {
/** 查询列表 */
getList() {
this.loading = true;
// 执行查询
getRecordPage(this.queryParams).then((response) => {
console.log(response)
this.list = response.data.list;
this.total = response.data.total;
this.loading = false;
});
},
async getLane() {
const res = await getLaneList({
pageNo: 1,
pageSize: 100
})
if (res.code === 0 && res.data) {
console.log(res.data)
this.searchBarFormConfig[2].selectOptions = res.data.list.map(item => {
return { id: item.id, name: item.lane }
})
console.log(this.searchBarFormConfig)
}
},
/** 取消按钮 */
cancel() {
this.open = false;
},
// /** 导出按钮操作 */
// handleExport() {
// // 处理查询参数
// let params = { ...this.queryParams };
// params.pageNo = undefined;
// params.pageSize = undefined;
// this.$modal
// .confirm('是否确认导出所有设备数据项?')
// .then(() => {
// this.exportLoading = true;
// return exportEquipmentExcel(params);
// })
// .then((response) => {
// this.$download.excel(response, '设备.xls');
// this.exportLoading = false;
// })
// .catch(() => {});
// },
handleTableBtnClick ({data, type}) {
switch (type) {
case 'detail':
this.viewDetail(data.id)
}
},
// 查看详情
viewDetail(id) {
this.editMode = 'detail';
this.open = true;
this.form.id = id;
this.$nextTick(() => {
this.$refs['drawer'].init();
});
},
},
};
</script>

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,23 @@
<!--
* @Author: zwq
* @Date: 2023-12-05 13:45:59
* @LastEditors: zwq
* @LastEditTime: 2024-04-15 17:12:03
* @Description
-->
<template>
<div>
<span>{{ parseTime(injectData.startTime,'{y}年{m}月{d}日') + '-' + (parseTime(injectData.endTime)?parseTime(injectData.endTime,'{y}年{m}月{d}日'):'永久') }}</span>
</div>
</template>
<script>
export default {
name: '',
props: {
injectData: {
type: Object,
default: () => ({}),
},
},
};
</script>

View File

@@ -1,145 +1,5 @@
<template>
<div class="home-page">
<div class="date-tabs">
<!-- @tab-click="handleClick" -->
<el-tabs v-model="activeName" @tab-click="timedayChange" :stretch="true">
<el-tab-pane
:label="'\u2002\u2002日\u2002\u2002'"
name="日"></el-tab-pane>
<el-tab-pane
:label="'\u2002\u2002周\u2002\u2002'"
name="周"></el-tab-pane>
<el-tab-pane
:label="'\u2002\u2002月\u2002\u2002'"
name="月"></el-tab-pane>
<el-tab-pane
:label="'\u2002\u2002年\u2002\u2002'"
name="年"></el-tab-pane>
</el-tabs>
<div class="detail">
<el-date-picker
v-model="timeday"
align="right"
type="date"
format="yyyy-MM-dd"
valueFormat="yyyy-MM-dd"
:clearable="false"
@change="timedayChange"
placeholder="选择日期"
:picker-options="pickerOptions"></el-date-picker>
</div>
</div>
<el-row class="main-top" :gutter="16">
<el-col :span="24" style="position: relative">
<div class="title">
<svg-icon icon-class="home-produce" />
<span class="title-inner">生产总成本</span>
</div>
<el-row class="box">
<el-col :span="4" class="num-box shadow">
<div class="num-style">{{ homeData.priceS }}万元</div>
<div class="unit-style">总计成本</div>
</el-col>
<el-col :span="4" class="num-box shadow">
<div class="num-style">{{ homeData.matPriceS }}万元</div>
<div class="unit-style">原料成本</div>
</el-col>
<el-col :span="4" class="num-box shadow">
<div class="num-style">{{ homeData.energyPriceS }}万元</div>
<div class="unit-style">能源成本</div>
</el-col>
<el-col :span="4" class="num-box shadow">
<div class="num-style">{{ homeData.otherPriceS }}万元</div>
<div class="unit-style">其他成本</div>
</el-col>
<!-- <el-col :span="4" class="num-box shadow">
<div class="num-style">{{ homeData.ratioS }}</div>
<div class="unit-style">综合良品率/%</div>
</el-col> -->
<el-col :span="4" class="num-box shadow">
<div class="num-style">{{ homeData.areaPriceS }}</div>
<div class="unit-style">综合每平米成本</div>
</el-col>
</el-row>
</el-col>
<el-col :span="24" style="position: relative">
<div class="title">
<svg-icon icon-class="home-produce" />
<span class="title-inner">原片成本</span>
</div>
<el-row class="box">
<el-col :span="4" class="num-box shadow">
<div class="num-style">{{ homeData.priceO }}万元</div>
<div class="unit-style">原片总成本</div>
</el-col>
<el-col :span="4" class="num-box shadow">
<div class="num-style">{{ homeData.matPriceO }}万元</div>
<div class="unit-style">原料成本</div>
</el-col>
<el-col :span="4" class="num-box shadow">
<div class="num-style">{{ homeData.energyPriceO }}万元</div>
<div class="unit-style">能源成本</div>
</el-col>
<el-col :span="4" class="num-box shadow">
<div class="num-style">{{ homeData.otherPriceO }}万元</div>
<div class="unit-style">其他成本</div>
</el-col>
<el-col :span="4" class="num-box shadow">
<div class="num-style">{{ homeData.ratioO }}</div>
<div class="unit-style">原片良品率/%</div>
</el-col>
<el-col :span="4" class="num-box shadow">
<div class="num-style">{{ homeData.areaPriceO }}</div>
<div class="unit-style">原片每平米成本</div>
</el-col>
</el-row>
</el-col>
<el-col :span="24" style="position: relative">
<div class="title">
<svg-icon icon-class="home-produce" />
<span class="title-inner">深加工成本</span>
</div>
<el-row class="box">
<el-col :span="4" class="num-box shadow">
<div class="num-style">{{ homeData.priceD }}万元</div>
<div class="unit-style">深加工总成本</div>
</el-col>
<el-col :span="4" class="num-box shadow">
<div class="num-style">{{ homeData.energyPriceD }}万元</div>
<div class="unit-style">能源成本</div>
</el-col>
<el-col :span="4" class="num-box shadow">
<div class="num-style">{{ homeData.otherPriceD }}万元</div>
<div class="unit-style">其他成本</div>
</el-col>
<el-col :span="4" class="num-box shadow">
<div class="num-style">{{ homeData.ratioD }}</div>
<div class="unit-style">深加工良品率/%</div>
</el-col>
<el-col :span="4" class="num-box shadow">
<div class="num-style">{{ homeData.areaPriceD }}</div>
<div class="unit-style">深加工每平米成本</div>
</el-col>
</el-row>
</el-col>
</el-row>
<el-row class="main-bottom" :gutter="16" v-if="false">
<el-col :span="9">
<div class="chart-wrapper">
<line-chart :chart-data="lineChartData" />
</div>
</el-col>
<el-col :span="7">
<div class="chart-wrapper">
<pie-chart />
</div>
</el-col>
<el-col :span="8">
<div class="chart-wrapper">
<bar-chart />
</div>
</el-col>
</el-row>
<div
class="main-footer"
style="
@@ -157,267 +17,29 @@
</template>
<script>
import moment from 'moment';
import tableHeightMixin from '@/mixins/lb/tableHeightMixin';
import LineChart from '../dashboard/LineChart';
import PieChart from '../dashboard/PieChart';
import BarChart from '../dashboard/BarChart';
import PanelGroup from '../dashboard/PanelGroup';
import { getData } from '@/api/cost/allCost';
import { getUserProfile } from '@/api/system/user';
const lineChartData = {
newVisitis: {
expectedData: [100, 120, 161, 134, 105, 160, 165],
actualData: [120, 82, 91, 154, 162, 140, 145],
},
messages: {
expectedData: [200, 192, 120, 144, 160, 130, 140],
actualData: [180, 160, 151, 106, 145, 150, 130],
},
purchases: {
expectedData: [80, 100, 121, 104, 105, 90, 100],
actualData: [120, 90, 100, 138, 142, 130, 130],
},
shoppings: {
expectedData: [130, 140, 141, 142, 145, 150, 160],
actualData: [120, 82, 91, 154, 162, 140, 130],
},
};
export default {
name: 'Home',
mixins: [tableHeightMixin],
components: {
LineChart,
PieChart,
PanelGroup,
BarChart,
},
computed: {
gradientBackground() {
return {
'background-image':
'linear-gradient(90deg, #f0f0f0 25%, rgba(255, 255, 255, 0) 25%, rgba(255, 255, 255, 0) 50%, #f0f0f0 50%, #f0f0f0 75%, rgba(255, 255, 255, 0) 75%, rgba(255, 255, 255, 0))',
'background-size': '100px 100px', // 调整条纹的大小
};
},
},
mixins: [],
components: {},
computed: {},
data() {
return {
activeName: '日',
user: '',
lineChartData: lineChartData.newVisitis,
homeData: {},
timeday: moment(new Date()).subtract(1, 'days').format('YYYY-MM-DD'),
startTime:
moment(new Date()).subtract(0, 'days').format('YYYY-MM-DD') +
' 00:00:00',
endTime:
moment(new Date()).subtract(-1, 'days').format('YYYY-MM-DD') +
' 00:00:00',
pickerOptions: {
disabledDate(time) {
return time.getTime() + 3600 * 1000 * 24 > Date.now();
},
shortcuts: [
{
text: '今天',
onClick(picker) {
picker.$emit('pick', new Date());
},
},
{
text: '昨天',
onClick(picker) {
const date = new Date();
date.setTime(date.getTime() - 3600 * 1000 * 24);
picker.$emit('pick', date);
},
},
{
text: '一周前',
onClick(picker) {
const date = new Date();
date.setTime(date.getTime() - 3600 * 1000 * 24 * 7);
picker.$emit('pick', date);
},
},
],
},
};
return {};
},
created() {
},
beforeDestroy() {
},
methods: {
getData() {
let listQuery = {
//分页
pageSize: 10,
pageNo: 1,
statisticType: ['', '日', '周', '月', '年'].indexOf(this.activeName),
startTime: this.timeday + ' 00:00:00',
};
getData(listQuery).then((response) => {
this.homeData = response.data;
for (let i in this.homeData) {
this.homeData[i] = Number(this.homeData[i]).toFixed(2);
}
});
},
timedayChange() {
let listQuery = {
//分页
pageSize: 10,
pageNo: 1,
statisticType: ['', '日', '周', '月', '年'].indexOf(this.activeName),
startTime: this.timeday + ' 00:00:00',
};
getData(listQuery).then((response) => {
this.homeData = response.data;
for (let i in this.homeData) {
this.homeData[i] = Number(this.homeData[i]).toFixed(2);
}
});
},
goDetail() {
this.$router.push({ path: 'indexDetail' });
},
},
};
</script>
<style lang="scss" scoped>
.home-page::before {
background-image: url('~@/assets/img/home-bg.png');
background-size: cover;
background-repeat: no-repeat;
background-position: center;
content: '';
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
transform: rotate(180deg);
}
.date-tabs {
padding-left: 40px;
padding-top: 20px;
position: relative;
margin-bottom: 20px;
}
:deep(.date-tabs) {
.el-tabs__header {
margin-bottom: 8px;
display: inline-block;
transform: translateY(-12px);
}
.el-tabs__content {
overflow: visible;
}
.el-tabs__item {
font-size: 18px;
color: #fff;
padding-left: 0 !important;
padding-right: 0 !important;
line-height: 36px !important;
height: 36px;
}
.el-tabs__item.is-active {
color: #0b58ff;
}
}
.detail {
display: inline-block;
position: absolute;
left: 260px;
top: 10px;
}
:deep(.detail) {
.el-input__inner {
background-color: transparent;
color: white;
}
}
// .current-date {
// color: #fff;
// font-size: 18px;
// position: absolute;
// left: 260px;
// top: 14px;
// }
.current-time {
color: #fff;
font-size: 18px;
position: absolute;
right: 38px;
top: 14px;
}
.main-top {
width: 100%;
padding: 0 20px 0 40px;
.title {
position: absolute;
left: 34px;
top: 20px;
width: 180px;
font-size: 32px;
z-index: 10;
.title-inner {
position: absolute;
left: 42px;
top: 5px;
font-size: calc(100vw * 20 / 1920);
}
}
.box {
background-color: #fff;
border-radius: 24px;
height: 192px;
padding: 40px 24px 32px 24px;
margin-bottom: 20px;
box-shadow: 0 8px 8px 0 gray;
.num-box {
height: 120px;
padding-top: 26px;
text-align: center;
.num-style {
color: #000;
font-size: calc(100vw * 40 / 1920);
}
.unit-style {
color: rgba(0, 0, 0, 0.7);
font-size: calc(100vw * 18 / 1920);
}
}
.shadow {
background: linear-gradient(90deg, #ffffff 80%, #f2f4f9 100%);
}
}
}
.main-bottom {
width: 100%;
margin-top: 20px;
.chart-wrapper {
margin-left: 10px;
height: 425px;
background: #fff;
border-radius: 5px;
box-shadow: 0 3px 3px 0 gray;
}
}
</style>
<style lang="scss">
.home-page {
.el-progress-bar__inner {
background-image: url('~@/assets/img/home-progress-bg.png');
background-size: cover;
}
}
</style>

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

@@ -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>
@@ -284,7 +284,7 @@ export default {
mobile: '',
mobileCode: '',
rememberMe: false,
tenantName: '技术中心',
tenantName: '芋道源码',
},
scene: 21,

View File

@@ -0,0 +1,81 @@
<!--
* @Author: zwq
* @Date: 2021-11-18 14:16:25
* @LastEditors: zwq
* @LastEditTime: 2025-11-28 14:38:31
* @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="materialCode">
<el-input
v-model="dataForm.materialCode"
clearable
placeholder="请输入物料编码" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="物料型号" prop="materialName">
<el-input
v-model="dataForm.materialName"
clearable
placeholder="请输入物料型号" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="物料规格" prop="material">
<el-input
v-model="dataForm.material"
clearable
placeholder="请输入物料规格" />
</el-form-item>
</el-col>
</el-row>
</el-form>
</template>
<script>
import basicAdd from '@/mixins/basic-add';
import { createProduct, updateProduct,getProduct } from '@/api/ssdl/product&recipe';
export default {
mixins: [basicAdd],
data() {
return {
urlOptions: {
createURL: createProduct,
updateURL: updateProduct,
infoURL: getProduct,
},
dataForm: {
id: undefined,
material: undefined,
materialName: undefined,
materialCode: undefined,
},
typeArr: [],
dataRule: {
materialCode: [
{ required: true, message: '物料编码不能为空', trigger: 'blur' },
],
materialName: [
{ required: true, message: '物料型号不能为空', trigger: 'blur' },
],
material: [
{ required: true, message: '规格不能为空', trigger: 'blur' },
],
},
};
},
methods: {},
};
</script>

View File

@@ -0,0 +1,199 @@
<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 { parseTime } from '@/filter/code-filter';
import { deleteProduct, getProductPage } from '@/api/ssdl/product&recipe';
const tableProps = [
{
prop: 'materialCode',
label: '物料编码',
},
{
prop: 'materialName',
label: '物料型号',
},
{
prop: 'material',
label: '规格',
},
{
prop: 'creator',
label: '创建人',
},
{
prop: 'createTime',
label: '创建时间',
filter: parseTime,
width: 150,
},
];
export default {
mixins: [basicPage],
data() {
return {
urlOptions: {
getDataListURL: getProductPage,
deleteURL: deleteProduct,
},
tableProps,
tableBtn: [
{
type: 'edit',
btnName: '编辑',
},
{
type: 'delete',
btnName: '删除',
},
].filter((v) => v),
tableData: [],
formConfig: [
{
type: 'input',
label: '型号',
placeholder: '型号',
param: 'name',
},
{
type: 'input',
label: '编码',
placeholder: '编码',
param: 'code',
},
{
type: 'button',
btnName: '搜索',
name: 'search',
color: 'primary',
},
// {
// type: 'separate',
// },
// {
// type: 'button',
// btnName: '重置',
// name: 'reset',
// },
{
type: 'separate',
},
{
type: '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 = 20;
this.listQuery.materialName = val.name;
this.listQuery.materialCode = val.code;
this.getDataList();
break;
case 'reset':
this.$refs.searchBarForm.resetForm();
this.listQuery = {
pageSize: 20,
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);
}
},
// 删除
deleteHandle(id, name, index,data) {
this.$confirm(`是否确认删除${'物料型号为 ' + data.materialName + ' '}的数据项?`, "系统提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
this.urlOptions.deleteURL(id).then(({ data }) => {
this.$message({
message: "操作成功",
type: "success",
duration: 1500,
onClose: () => {
this.getDataList();
},
});
});
})
.catch(() => { });
},
},
};
</script>

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: 18px;
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,357 @@
<template>
<el-drawer
:visible.sync="visible"
:show-close="false"
:wrapper-closable="false"
class="drawer"
size="60%">
<small-title slot="title" :no-padding="true">
{{ isdetail ? '详情' : !dataForm.id ? '新增' : '编辑' }}
</small-title>
<div class="content">
<div class="visual-part">
<el-form
ref="dataForm"
:model="dataForm"
:rules="dataRule"
label-width="100px"
label-position="top"
@keyup.enter.native="dataFormSubmit">
<el-row :gutter="20">
<el-col :span="8">
<el-form-item label="配方规格" prop="processSize">
<el-input
v-model="dataForm.processSize"
clearable
:disabled="isdetail"
placeholder="请输入配方规格" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="配方型号" prop="processName">
<el-input
v-model="dataForm.processName"
clearable
:disabled="isdetail"
placeholder="请输入配方型号" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="配方描述" prop="processDesc">
<el-input
v-model="dataForm.processDesc"
clearable
:disabled="isdetail"
placeholder="请输入配方描述" />
</el-form-item>
</el-col>
</el-row>
</el-form>
<small-title
style="margin: 16px 0; padding-left: 8px"
:no-padding="true"
v-if="dataForm.processName && dataForm.processSize">
物料属性列表
</small-title>
<div
class="attr-list"
v-if="dataForm.processName && dataForm.processSize">
<base-table
:table-props="tableProps"
:page="listQuery.pageNo"
:limit="listQuery.pageSize"
:add-button-show="
productAttributeList.length > 3 || isdetail ? null : '添加属性'
"
@emitButtonClick="addNew()"
:table-data="productAttributeList">
<method-btn
v-if="!isdetail"
slot="handleBtn"
:width="120"
label="操作"
:method-list="tableBtn"
@clickBtn="handleClick" />
</base-table>
<pagination
v-show="listQuery.total > 0"
:total="listQuery.total"
:page.sync="listQuery.pageNo"
:limit.sync="listQuery.pageSize"
:page-sizes="[5, 10, 15]"
@pagination="getList" />
</div>
</div>
</div>
<div class="drawer-body__footer">
<el-button style="" @click="goback()">取消</el-button>
<el-button v-if="isdetail" type="primary" @click="goEdit()">
编辑
</el-button>
<el-button v-else type="primary" @click="dataFormSubmit()">
确定
</el-button>
</div>
<product-attr-add
v-if="addOrUpdateVisible"
ref="addOrUpdate"
@refreshDataList="getList" />
</el-drawer>
</template>
<script>
import {
updateProcess,
createProcess,
getProcess,
getProcessDetailPage,
deleteProcess,
} from '@/api/ssdl/product&recipe';
import productAttrAdd from './attr-add';
import { parseTime } from '@/filter/code-filter';
import SmallTitle from './SmallTitle';
const tableBtn = [
{
type: 'edit',
btnName: '编辑',
},
{
type: 'delete',
btnName: '删除',
},
];
const tableProps = [
{
prop: 'createTime',
label: '添加时间',
filter: parseTime,
},
{
prop: 'materialName',
label: '物料型号',
},
{
prop: 'material',
label: '物料规格',
},
{
prop: 'materialNumber',
label: '物料数量',
},
];
export default {
components: { productAttrAdd, SmallTitle },
data() {
return {
visible: false,
addOrUpdateVisible: false,
tableBtn,
tableProps,
productAttributeList: [],
dataForm: {
id: null,
processName: '', // 配方型号
processSize: '', // 配方规格
processDesc: '', // 配方描述
},
listQuery: {
pageSize: 10,
pageNo: 1,
total: 0,
},
dataRule: {
processSize: [
{
required: true,
message: '配方规格不能为空',
trigger: 'blur',
},
],
processName: [
{
required: true,
message: '配方型号不能为空',
trigger: 'blur',
},
],
},
isdetail: false,
};
},
methods: {
initData() {
this.productAttributeList.splice(0);
this.listQuery.total = 0;
},
init(id, isdetail) {
this.initData();
this.isdetail = isdetail || false;
this.dataForm.id = id || null;
this.visible = true;
this.$nextTick(() => {
this.$refs['dataForm'].resetFields();
if (this.dataForm.id) {
// 获取物料详情
getProcess(id).then((response) => {
this.dataForm = response.data;
// 获取物料的属性列表
this.getList();
});
}
});
},
getList() {
// 获取物料的属性列表
getProcessDetailPage({
processName: this.dataForm.processName,
processSize: this.dataForm.processSize,
pageSize: 100,
pageNo: 1,
total: 1,
}).then((response) => {
this.productAttributeList = response.data;
});
},
handleClick(raw) {
if (raw.type === 'delete') {
this.$confirm(
`确定对${
raw.data.name
? '[名称=' + raw.data.name + ']'
: '[序号=' + raw.data._pageIndex + ']'
}进行删除操作?`,
'提示',
{
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
}
)
.then(() => {
deleteProcess(raw.data.id).then(({ data }) => {
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {
this.getList();
},
});
});
})
.catch(() => {});
} else {
this.addNew(raw.data.id);
}
},
// 表单提交
dataFormSubmit() {
this.$refs['dataForm'].validate((valid) => {
if (valid) {
if (
!this.productAttributeList ||
!(this.productAttributeList.length > 0)
) {
this.$modal.msg('物料属性不能为空');
return;
}
this.productAttributeList.forEach((item) => {
item.processName = this.dataForm.processName;
item.processSize = this.dataForm.processSize;
item.processDesc = this.dataForm.processDesc;
});
// 修改的提交
updateProcess(this.productAttributeList).then((response) => {
this.$modal.msgSuccess('提交成功');
this.visible = false;
this.$emit('refreshDataList');
});
return;
// 添加的提交
createProcess(this.productAttributeList).then((response) => {
this.$modal.msgSuccess('新增成功');
this.visible = false;
this.$emit('refreshDataList');
});
}
});
},
goEdit() {
this.isdetail = false;
},
// 新增 / 修改
addNew(id) {
this.addOrUpdateVisible = true;
this.$nextTick(() => {
this.$refs.addOrUpdate.init(id, this.dataForm);
});
},
goback() {
this.$emit('refreshDataList');
this.visible = false;
this.initData();
},
},
};
</script>
<style scoped>
.drawer >>> .el-drawer {
border-radius: 8px 0 0 8px;
display: flex;
flex-direction: column;
}
.drawer >>> .el-form-item__label {
padding: 0;
}
.drawer >>> .el-drawer__header {
margin: 0;
padding: 32px 32px 24px;
border-bottom: 1px solid #dcdfe6;
}
.drawer >>> .el-drawer__body {
flex: 1;
height: 1px;
display: flex;
flex-direction: column;
}
.drawer >>> .content {
padding: 30px 24px;
flex: 1;
display: flex;
flex-direction: column;
/* height: 100%; */
}
.drawer >>> .visual-part {
flex: 1 auto;
max-height: 76vh;
overflow: hidden;
overflow-y: scroll;
padding-right: 10px; /* 调整滚动条样式 */
}
.drawer >>> .el-form,
.drawer >>> .attr-list {
padding: 0 16px;
}
.drawer-body__footer {
display: flex;
justify-content: flex-end;
padding: 18px;
}
</style>

View File

@@ -0,0 +1,184 @@
<template>
<el-dialog
:visible.sync="visible"
:width="'35%'"
:append-to-body="true"
:close-on-click-modal="false"
class="dialog">
<template #title>
<slot name="title">
<div class="titleStyle">
{{ !dataForm.id ? '新增' : '编辑' }}
</div>
</slot>
</template>
<el-form
ref="dataForm"
:model="dataForm"
:rules="dataRule"
label-width="100px"
@keyup.enter.native="dataFormSubmit()">
<!-- <el-form-item label="设备" prop="equipmentId">
<el-select
style="width: 100%"
v-model="dataForm.equipmentId"
@change="setEquipment"
placeholder="请选择设备">
<el-option
v-for="item in equipmentArr"
:key="item.id"
:label="item.equipmentName"
:value="item.id"></el-option>
</el-select>
</el-form-item> -->
<el-form-item label="物料" prop="materialId">
<el-select
style="width: 100%"
v-model="dataForm.materialId"
filterable
@change="setMaterial"
placeholder="请选择物料">
<el-option
v-for="item in productArr"
:key="item.id"
:label="
item.materialCode + '-' + item.materialName + '-' + item.material
"
:value="item.id"></el-option>
</el-select>
</el-form-item>
<el-form-item label="数量" prop="materialNumber">
<el-input-number
v-model="dataForm.materialNumber"
:step="1"
step-strictly
:min="0"></el-input-number>
</el-form-item>
</el-form>
<el-row style="text-align: right">
<el-button @click="visible = false">取消</el-button>
<el-button type="primary" @click="dataFormSubmit()">确定</el-button>
</el-row>
</el-dialog>
</template>
<script>
import {
getProductPage,
createProcess,
getProcess,
updateProcess,
} from '@/api/ssdl/product&recipe';
export default {
data() {
return {
visible: false,
dataForm: {
id: 0,
processId: '', // 配方id
processName: '', // 配方型号
processSize: '', // 配方规格
processDesc: '', // 配方描述
materialId: '',
material: '',
materialName: '',
materialNumber: '',
},
productArr: [],
equipmentArr: [],
dataRule: {
materialId: [
{ required: true, message: '物料不能为空', trigger: 'change' },
],
materialNumber: [
{ required: true, message: '数量不能为空', trigger: 'blur' },
],
},
};
},
methods: {
init(id,data) {
this.dataForm.id = id || '';
this.dataForm.processId = data.id || '';
this.dataForm.processName = data.processName || '';
this.dataForm.processSize = data.processSize || '';
this.dataForm.processDesc = data.processDesc || '';
this.visible = true;
getProductPage({ pageNo: 1, pageSize: 100 }).then((res) => {
this.productArr = res.data.list;
});
// getEquipmentPage({ pageNo: 1, pageSize: 100 }).then((res) => {
// this.equipmentArr = res.data.list;
// });
this.$nextTick(() => {
this.$refs['dataForm'].resetFields();
if (this.dataForm.id) {
getProcess(this.dataForm.id).then((res) => {
this.dataForm = res.data;
});
}
});
},
setMaterial() {
const data = this.productArr.find(
(i) => i.id === this.dataForm.materialId
);
this.dataForm.materialName = data.materialName;
this.dataForm.material = data.material;
},
// 表单提交
dataFormSubmit() {
this.$refs['dataForm'].validate((valid) => {
if (valid) {
// 修改的提交
if (this.dataForm.id) {
updateProcess([{
...this.dataForm,
}]).then((response) => {
this.$modal.msgSuccess('修改成功');
this.visible = false;
this.$emit('refreshDataList');
});
return;
}
// 添加的提交
createProcess([{
...this.dataForm,
}]).then((response) => {
this.$modal.msgSuccess('新增成功');
this.visible = false;
this.$emit('refreshDataList');
});
}
});
},
},
};
</script>
<style scoped>
.dialog >>> .el-dialog__body {
padding: 30px 24px;
}
.dialog >>> .el-dialog__header {
font-size: 16px;
color: rgba(0, 0, 0, 0.85);
font-weight: 500;
padding: 13px 24px;
border-bottom: 1px solid #e9e9e9;
}
.dialog >>> .el-dialog__header .titleStyle::before {
content: '';
display: inline-block;
width: 4px;
height: 16px;
background-color: #0b58ff;
border-radius: 1px;
margin-right: 8px;
position: relative;
top: 2px;
}
</style>

View File

@@ -0,0 +1,258 @@
<!--
* @Author: zwq
* @Date: 2023-08-01 14:55:51
* @LastEditors: zwq
* @LastEditTime: 2025-11-28 14:34:11
* @Description:
-->
<template>
<div class="app-container">
<search-bar
:formConfigs="formConfig"
ref="searchBarForm"
@headBtnClick="buttonClick" />
<el-table
:data="tableData"
:header-cell-style="{
background: '#F2F4F9',
color: '#606266',
}"
border
style="width: 100%"
ref="dataList">
<el-table-column type="expand">
<template slot-scope="scope">
<product
:processName="scope.row.processName"
:processSize="scope.row.processSize"></product>
</template>
</el-table-column>
<el-table-column prop="processName" label="配方型号" />
<el-table-column prop="processSize" label="配方规格" />
<el-table-column prop="processDesc" label="配方描述" />
<el-table-column prop="createTime" label="创建时间" width="150">
<template v-slot="scope">
<span>{{ parseTime(scope.row.createTime) }}</span>
</template>
</el-table-column>
<el-table-column label="操作" width="120">
<template slot-scope="scope">
<el-button
size="mini"
type="text"
@click="handleClick({ data: { ...scope.row }, type: 'edit' })">
<span class="iconfont icon-edit primary-color"></span>
</el-button>
<el-button
size="mini"
type="text"
@click="handleClick({ data: { ...scope.row }, type: 'delete' })">
<span class="iconfont icon-delete" style="color: #f56c6c"></span>
</el-button>
<el-button
size="mini"
type="text"
@click="handleClick({ data: { ...scope.row }, type: 'detail' })">
<span class="iconfont icon-detail primary-color"></span>
</el-button>
</template>
</el-table-column>
</el-table>
<pagination
:limit.sync="listQuery.pageSize"
:page.sync="listQuery.pageNo"
:total="listQuery.total"
@pagination="getDataList" />
<add-or-update
v-if="addOrUpdateVisible"
ref="addOrUpdate"
@refreshDataList="getDataList" />
</div>
</template>
<script>
import AddOrUpdate from './add-or-updata';
import product from './product-mini';
import basicPage from '@/mixins/basic-page';
import { parseTime } from '@/filter/code-filter';
import {
deleteProcessList,
getProcessPage,
getProcessDetailPage,
} from '@/api/ssdl/product&recipe';
export default {
mixins: [basicPage],
data() {
return {
urlOptions: {
getDataListURL: getProcessPage,
deleteURL: deleteProcessList,
},
tableBtn: [
{
type: 'edit',
btnName: '编辑',
},
{
type: 'delete',
btnName: '删除',
},
{
type: 'detail',
btnName: '详情',
},
].filter((v) => v),
tableData: [],
formConfig: [
{
type: 'input',
label: '配方型号',
placeholder: '配方型号',
param: 'val1',
},
{
type: 'input',
label: '配方规格',
placeholder: '配方规格',
param: 'val2',
},
// {
// type: 'input',
// label: '物料型号',
// placeholder: '物料型号',
// param: 'val3',
// },
// {
// type: 'input',
// label: '物料编码',
// placeholder: '物料编码',
// param: 'val4',
// },
{
type: 'button',
btnName: '搜索',
name: 'search',
color: 'primary',
},
// {
// type: 'separate',
// },
// {
// type: 'button',
// btnName: '重置',
// name: 'reset',
// },
{
type: 'separate',
},
{
type: 'button',
btnName: '新增',
name: 'add',
color: 'success',
plain: true,
},
// {
// type: 'separate',
// type: this.$auth.hasPermi('base:product:create') ? 'separate' : '',
// },
// {
// type: this.$auth.hasPermi('base:product:export') ? 'button' : '',
// btnName: '导出',
// name: 'export',
// color: 'warning',
// },
],
};
},
components: {
AddOrUpdate,
product,
},
created() {},
methods: {
buttonClick(val) {
switch (val.btnName) {
case 'search':
this.listQuery.pageNo = 1;
this.listQuery.pageSize = 20;
this.listQuery.processName = val.val1 || null;
this.listQuery.processSize = val.val2 || null;
// this.listQuery.materialName = val.val3 || null;
// this.listQuery.materialCode = val.val4 || null;
this.getDataList();
break;
case 'reset':
this.$refs.searchBarForm.resetForm();
this.listQuery = {
pageSize: 20,
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);
}
},
otherMethods(val) {
this.addOrUpdateVisible = true;
this.addOrEditTitle = '详情';
this.$nextTick(() => {
this.$refs.addOrUpdate.init(val.data.id, true);
});
},
// 删除
deleteHandle(id, name, index, data) {
this.$confirm(
`是否确认删除${'配方型号为 ' + data.processName + ' '}的数据项?`,
'系统提示',
{
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
}
)
.then(() => {
// 获取物料的属性列表
getProcessDetailPage({
processName: data.processName,
processSize: data.processSize,
pageSize: 100,
pageNo: 1,
total: 1,
}).then((response) => {
const ids = response.data.map((i) => i.id);
this.urlOptions.deleteURL(ids).then(({ data }) => {
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {
this.getDataList();
},
});
});
});
})
.catch(() => {});
},
},
};
</script>
<style>
.app-container .el-table .el-table__cell {
padding: 0;
height: 35px;
}
</style>

View File

@@ -0,0 +1,85 @@
<!--
* @Author: zwq
* @Date: 2023-08-24 14:47:58
* @LastEditors: zwq
* @LastEditTime: 2025-11-28 10:06:06
* @Description:
-->
<template>
<div>
<!-- <div class="app-container"> -->
<base-table
v-loading="dataListLoading"
:table-props="tableProps"
max-height="200"
:page="1"
:limit="listQuery.total"
:table-data="tableData" />
</div>
</template>
<script>
import basicPage from '@/mixins/basic-page';
import { parseTime } from '@/filter/code-filter';
import { getProcessDetailPage } from '@/api/ssdl/product&recipe';
const tableProps = [
{
prop: 'materialName',
label: '物料型号',
},
{
prop: 'material',
label: '物料规格',
},
{
prop: 'materialNumber',
label: '物料数量',
},
];
export default {
mixins: [basicPage],
props: {
processSize: {
type: String,
default: '',
},
processName: {
type: String,
default: '',
},
},
data() {
return {
urlOptions: {
getDataListURL: getProcessDetailPage,
},
tableProps,
tableData: [],
listQuery: {
processName: this.processName,
processSize: this.processSize,
pageSize: 100,
pageNo: 1,
total: 1,
},
};
},
components: {
},
created() {
},
methods: {
// 获取数据列表
getDataList() {
this.dataListLoading = true;
this.urlOptions.getDataListURL(this.listQuery).then(response => {
this.tableData = response.data;
this.listQuery.total = response.data.total;
this.dataListLoading = false;
});
},
},
};
</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,697 @@
<!--
* @Author: zwq
* @Date: 2025-10-13 15:07:24
* @LastEditors: zwq
* @LastEditTime: 2025-11-20 14:47:37
* @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="mainTaskType">
<el-select
style="width: 100%"
v-model="dataForm.mainTaskType"
placeholder="请选择任务类型">
<el-option
v-for="item in options0"
: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.mainTaskType !== 2">
<el-form-item label="产品名称" prop="productId">
<el-select
style="width: 100%"
v-model="dataForm.productId"
@change="setMaterial"
placeholder="请选择产品名称">
<el-option
v-for="item in productArr"
:key="item.id"
:label="item.materialName"
:value="item.id"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="6" v-if="dataForm.mainTaskType !== 2">
<el-form-item label="规格型号">
<el-input
readonly
v-model="dataForm.material"
placeholder="规格型号"></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="搬运数量" prop="quantity">
<el-input
v-model="dataForm.quantity"
@blur="validateNumber"
placeholder="请输入正整数且为双数">
<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-group>
</el-form-item>
</el-col>
</el-row>
</el-form>
</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 class="potBG-div">
<div>
<el-row :gutter="10">
<el-col :span="10">
终点库区:
<el-select
style="width: 300px; margin-left: 10px"
v-model="endPot"
size="small"
@change="getEndPot"
placeholder="请选择终点库区">
<el-option
v-for="item in regionArr"
: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 free" />
空盘
<span class="num1-startPot-status full" />
满盘
<span class="num1-startPot-status unavailable" />
不可用
<span class="num1-startPot-status locked" />
锁定
</el-col>
</el-row>
<div class="potTitleBG">
<div v-for="item in Object.keys(PotList)" :key="item">
<div class="potTitle">
{{ item }}
</div>
<div class="potList">
<div
class="pot"
v-for="sitem in PotList[item]"
:key="sitem.id"
:class="
sitem.usableState == 1
? sitem.lineEdgeLibraryState == 1
? 'full'
: 'free'
: sitem.usableState == 2
? 'unavailable'
: 'locked'
"
@click="
sitem.usableState == 1 &&
sitem.lineEdgeLibraryState == 0 &&
setStartPot(sitem)
"
:title="sitem.lineEdgeLibraryName">
{{ sitem.lineEdgeLibraryCode }}
</div>
</div>
</div>
</div>
<el-divider></el-divider>
<div style="text-align: right">
搬运数量
<span style="color: #409eff; font-size: 16px">
{{ dataForm.quantity }}
</span>
可用库位
<span style="color: #409eff; font-size: 16px">{{ stockNum }}</span>
<span
v-if="dataForm.quantity > stockNum"
style="color: #e6a23c; font-size: 16px">
<i class="el-icon-warning"></i>
请注意搬运数量超过可用库位
</span>
</div>
</div>
</div>
</div>
<div v-if="stepNum == 3">
<small-title style="margin: 16px 0" size="sm" :no-padding="true">
步骤三预览与下发
</small-title>
<el-row :gutter="20">
<el-col :span="24">
<div
style="
margin: 10px 0;
font-size: 14px;
font-weight: 500;
color: black;
">
搬运对象
</div>
</el-col>
<el-col :span="6">
搬运对象{{ dataForm.mainTaskType !== 2 ? '产品' : '空盘' }}
</el-col>
<el-col :span="6" v-if="dataForm.mainTaskType !== 2">
产品名称
{{ productArr.find((i) => i.id === dataForm.productId).materialName }}
</el-col>
<el-col :span="6" v-if="dataForm.mainTaskType !== 2">
规格型号
{{ productArr.find((i) => i.id === dataForm.productId).material }}
</el-col>
<el-col :span="6">搬运数量{{ dataForm.quantity + ' 盘' }}</el-col>
<el-col :span="24">
<div
style="
margin: 10px 0;
font-size: 14px;
font-weight: 500;
color: black;
">
起点信息
</div>
</el-col>
<el-col :span="24">按策略自动选择</el-col>
</el-row>
<div>
<el-row :gutter="10">
<el-col :span="24">
<div
style="
margin: 10px 0;
font-size: 14px;
font-weight: 500;
color: black;
">
终点信息
</div>
</el-col>
<el-col :span="10">
库区{{ regionArr.find((i) => i.value === endPot).label }}
</el-col>
</el-row>
<div class="potTitleBG">
<div v-for="item in Object.keys(PotList)" :key="item">
<div class="potTitle">
{{ item }}
</div>
<div class="potList">
<div
class="pot"
v-for="sitem in PotList[item]"
:key="sitem.id"
:class="
sitem.usableState == 1
? sitem.lineEdgeLibraryState == 1
? 'full'
: 'free'
: sitem.usableState == 2
? 'unavailable'
: 'locked'
"
:title="sitem.lineEdgeLibraryName">
{{ sitem.lineEdgeLibraryCode }}
</div>
</div>
</div>
</div>
<el-row :gutter="10">
<el-col :span="24">
<div
style="
margin: 10px 0;
font-size: 14px;
font-weight: 500;
color: black;
">
任务信息
</div>
</el-col>
<el-col :span="8">
任务类型{{ options0[dataForm.mainTaskType - 1].label }}
</el-col>
<el-col :span="8">任务数量{{ dataForm.quantity / 2 }}</el-col>
<el-col :span="8">
本批次任务优先级
<el-select
size="small"
v-model="taskPriority"
placeholder="请选择优先级">
<el-option
v-for="item in options2"
:key="item.value"
:label="item.label"
:value="item.value"></el-option>
</el-select>
</el-col>
</el-row>
</div>
</div>
</div>
</template>
<script>
import SmallTitle from './SmallTitle';
import { getRegion, createPCTask } from '@/api/ssdl/taskList';
import { getProductPage } from '@/api/ssdl/product&recipe';
export default {
components: {
SmallTitle,
},
data() {
return {
dotArr: [
{
name: '选择起点',
},
{
name: '选择终点',
},
{
name: '预览下发',
},
],
potBGcolor: ['', '#dafadc', '#f8f0c4'],
stepNum: 1, // 当前第几步
//第一步参数
dataForm: {
id: undefined,
mainTaskType: undefined,
productId: undefined,
materialName: '', // 物料名称
materialCode: '', // 物料编码
material: undefined,
quantity: undefined,
val5: 1,
},
productArr: [],
options0: [
{
label: '满盘搬运',
value: 1,
},
{
label: '空盘搬运',
value: 2,
},
{
label: '备货搬运',
value: 3,
},
],
options2: [
{
label: '最高',
value: 0,
},
{
label: '较高',
value: 1,
},
{
label: '常规',
value: 2,
},
{
label: '较低',
value: 3,
},
{
label: '最低',
value: 4,
},
],
dataRule: {
mainTaskType: [
{ required: true, message: '任务类型不能为空', trigger: 'change' },
],
productId: [
{ required: true, message: '产品名称不能为空', trigger: 'change' },
],
quantity: [
{ required: true, message: '搬运数量不能为空', trigger: 'blur' },
],
},
endPot: 7, //起点库区选择的类型,进来默认第一个
PotList: {},
//第二步参数
regionArr: [
{
label: '框绞1号线设备1满盘缓存区',
value: 7,
},
{
label: '框绞1号线设备2满盘缓存区',
value: 8,
},
{
label: '框绞1号线设备3满盘缓存区',
value: 9,
},
{
label: '框绞1号线设备4满盘缓存区',
value: 10,
},
{
label: '框绞3号线设备1满盘缓存区',
value: 11,
},
{
label: '框绞3号线设备2满盘缓存区',
value: 12,
},
{
label: '框绞3号线设备3满盘缓存区',
value: 13,
},
{
label: '框绞3号线设备4满盘缓存区',
value: 14,
},
{
label: '框绞2号线设备1满盘缓存区',
value: 15,
},
{
label: '框绞2号线设备2满盘缓存区',
value: 16,
},
{
label: '框绞2号线设备3满盘缓存区',
value: 17,
},
],
stockNum: 0, //可用库位数
taskPriority: 2, //优先级
};
},
methods: {
init(id) {
this.dataForm.id = id || undefined;
this.stepNum = 1;
this.$emit('setSN', this.stepNum);
getProductPage({ pageNo: 1, pageSize: 100 }).then((res) => {
this.productArr = res.data.list;
});
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.$refs['dataForm'].validate((valid) => {
if (!valid) {
return false;
}
this.stepNum += 1;
this.getEndPot();
this.$emit('setSN', this.stepNum);
return;
});
}
if (this.stepNum == 2) {
if (this.dataForm.quantity > this.stockNum) {
this.$message('请注意搬运数量超过可用库位');
return;
}
this.stepNum += 1;
this.$emit('setSN', this.stepNum);
return;
}
if (this.stepNum == 3) {
this.stepNum = 1;
this.$emit('setSN', this.stepNum);
return;
}
},
cancelStep() {},
validateNumber() {
const value = this.dataForm.quantity;
// 校验正整数且为双数
if (!/^[1-9]\d*$/.test(value) || value % 2 !== 0) {
this.$message.error('请输入正整数且为双数');
this.dataForm.quantity = '';
return false;
}
return true;
},
setMaterial() {
const data = this.productArr.find((i) => i.id === this.dataForm.productId)
this.dataForm.materialName = data.materialName
this.dataForm.materialCode = data.materialCode
this.dataForm.material = data.material
},
// 获取终点库区
getEndPot() {
this.PotList = {};
this.stockNum = 0;
getRegion(this.endPot).then((res) => {
res.data.forEach((item) => {
if (item.lineEdgeLibraryState == 0 && item.usableState == 1) {
this.stockNum += 1;
}
});
//提取巷道
let xiangdaoArr = res.data.map((item) =>
item.bindGroupId.substring(0, 5)
);
//提取去重
xiangdaoArr = [...new Set(xiangdaoArr)];
//巷道为对象名,巷道内库位赋给巷道
xiangdaoArr.forEach((objName) => {
const stockArr = res.data.filter((item) => {
if (item.bindGroupId.substring(0, 5) == objName) return item;
});
this.$set(this.PotList, objName, stockArr);
});
});
},
setStartPot(data) {},
},
};
</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: 190px;
background-color: rgb(169, 235, 249);
border-radius: 3px;
margin-right: 5px;
text-align: center;
color: #000000;
letter-spacing: 1px;
margin-bottom: 10px;
font-size: 16px;
}
.potList {
width: 190px;
display: grid;
grid-template-columns: 90px 90px;
gap: 8px;
}
.pot {
width: 90px;
text-align: center;
border: 1px solid gainsboro;
color: black;
border-radius: 3px;
padding: 5px 0;
margin-bottom: 5px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
/* 空闲状态 */
.free {
background-color: #edf7ff;
border: 1px solid #57a5f4;
}
/* 满位状态 */
.full {
background-color: #fff1d4;
border: 1px solid #f8b881;
}
/* 不可用状态 */
.unavailable {
background-color: #e9e8e8;
border: 1px solid #b4b4b4;
}
/* 锁定状态 */
.locked {
background-color: #e8d7ff;
border: 1px solid #722ed1;
}
</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: 220px; /* 计算连接线长度 */
height: 2px;
border-bottom: 1px dashed rgb(11, 88, 255, 1);
margin: 0 5px;
z-index: 1;
}
</style>

View File

@@ -0,0 +1,392 @@
<!--
* @Author: zwq
* @Date: 2025-11-07 17:01:51
* @LastEditors: zwq
* @LastEditTime: 2025-11-17 15:47:16
* @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">
{{ infoData.mainTaskCode }}
</el-col>
<el-col :span="8">
{{
['', '满盘搬运', '空盘搬运', '备料搬运', '临时搬运'][
infoData.mainTaskType
] +
'(' +
['', '自动', '人工'][infoData.taskAttribute] +
')'
}}
</el-col>
<el-col :span="8">
上次刷新{{ parseTime(nowDate) }}
<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[infoData.mainTaskState].color,
}"
class="taskStatus">
{{ statusColor[infoData.mainTaskState].label }}
</span>
</el-col>
<el-col :span="8">
{{ ['最高', '较高', '常规', '较低', '最低'][infoData.taskPriority] }}
</el-col>
<el-col :span="8">{{ infoData.agv }}</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="8">创建人</el-col>
<el-col :span="8">创建时间</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="8">{{ infoData.creator }}</el-col>
<el-col :span="8">{{ parseTime(infoData.createTime) }}</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" v-if="infoData.mainTaskState == 7">
任务异常无效路径
</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 class="pan-body">
<el-row :gutter="15">
<el-col :span="12">物料名称</el-col>
<el-col :span="12">物料规格</el-col>
<el-col :span="12" style="color: black">
{{ infoData.leftMaterialName }}
</el-col>
<el-col :span="12" style="color: black">
{{ infoData.leftMaterial }}
</el-col>
<el-col :span="12">物料编码</el-col>
<el-col :span="12">批次</el-col>
<el-col :span="12" style="color: black">
{{ infoData.leftMaterialCode }}
</el-col>
<el-col :span="12" style="color: black">
{{ infoData.leftBatch }}
</el-col>
<el-col :span="12">线缆长度</el-col>
<el-col :span="12">虚拟盘号</el-col>
<el-col :span="12" style="color: black">
{{ infoData.leftCableLength }}
</el-col>
<el-col :span="12" style="color: black">
{{ infoData.leftVirtualTrayNumber }}
</el-col>
</el-row>
</div>
</div>
</el-col>
<el-col :span="12">
<div class="pan-info">
<div class="pan-title">R盘</div>
<div class="pan-body">
<el-row :gutter="15">
<el-col :span="12">物料名称</el-col>
<el-col :span="12">物料规格</el-col>
<el-col :span="12" style="color: black">
{{ infoData.rightMaterialName }}
</el-col>
<el-col :span="12" style="color: black">
{{ infoData.rightMaterial }}
</el-col>
<el-col :span="12">物料编码</el-col>
<el-col :span="12">批次</el-col>
<el-col :span="12" style="color: black">
{{ infoData.rightMaterialCode }}
</el-col>
<el-col :span="12" style="color: black">
{{ infoData.rightBatch }}
</el-col>
<el-col :span="12">线缆长度</el-col>
<el-col :span="12">虚拟盘号</el-col>
<el-col :span="12" style="color: black">
{{ infoData.rightCableLength }}
</el-col>
<el-col :span="12" style="color: black">
{{ infoData.rightVirtualTrayNumber }}
</el-col>
</el-row>
</div>
</div>
</el-col>
</el-row>
</div>
<div class="bgDiv4" v-if="false">
<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 )(候选)">
{{ infoData.leftLibraryStartName }}
</el-descriptions-item>
<el-descriptions-item label="终点库位( L )(候选)">
{{ infoData.leftLibraryEndName }}
</el-descriptions-item>
<el-descriptions-item label="起点库位( R )(候选)">
{{ infoData.rightLibraryStartName }}
</el-descriptions-item>
<el-descriptions-item label="终点库位( R )(候选)">
{{ infoData.rightLibraryEndName }}
</el-descriptions-item>
<el-descriptions-item
label="起点库位( L )"
:labelStyle="{ background: '#f1ffe9' }">
{{ infoData.changeLeftLibraryStartName }}
</el-descriptions-item>
<el-descriptions-item
label="终点库位( L )"
:labelStyle="{ background: '#f1ffe9' }">
{{ infoData.changeLeftLibraryEndName }}
</el-descriptions-item>
<el-descriptions-item
label="起点库位( R )"
:labelStyle="{ background: '#f1ffe9' }">
{{ infoData.changeRightLibraryStartName }}
</el-descriptions-item>
<el-descriptions-item
label="终点库位( R )"
:labelStyle="{ background: '#f1ffe9' }">
{{ infoData.changeRightLibraryEndName }}
</el-descriptions-item>
</el-descriptions>
</div>
<div class="bgDiv6">
<small-title style="margin: 0 0 8px 0" size="sm" :no-padding="true">
任务日志
</small-title>
<div class="timelineDiv">
<el-timeline style="padding: 0">
<el-timeline-item
v-for="(activity, index) in activities"
:key="index"
:type="index == 0 ? 'primary' : ''"
:color="activity.color"
size="large"
hide-timestamp>
<span>
{{ activity.triggerObject + ' | ' + activity.description }}
</span>
<span style="float: right">
{{ parseTime(activity.createTime) }}
</span>
</el-timeline-item>
</el-timeline>
</div>
</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';
import { getTask, getTaskLogPage } from '@/api/ssdl/taskList';
export default {
name: '',
data() {
return {
visible: false,
infoID: '',
infoData: '',
statusColor: [
//bgDiv1的任务状态
{ label: '待下发', color: '#fa8c16' },
{ label: '待执行', color: '#1890ff' },
{ label: '执行中', color: '#1890ff' },
{ label: '取货完成', color: '#52c41a' },
{ label: '已完成', color: '#52c41a' },
{ label: '暂停中', color: '#8c8c8c' },
{ label: '已终止', color: '#faad14' },
{ label: '异常', color: '#ff4d4f' },
],
nowDate: Date.now(),
//bgDiv2的步骤条
stepNum: 0,
stepStatus: 'finish',
//bgDiv6的时间线
activities: [],
};
},
components: {
SmallTitle,
},
created() {},
methods: {
init(id) {
this.visible = true;
this.infoID = id;
this.$nextTick(() => {
this.getInfoData();
});
},
getInfoData() {
getTask(this.infoID).then(({ data }) => {
this.infoData = data;
if (data.mainTaskState < 3) {
this.stepNum = data.mainTaskState;
} else if (data.mainTaskState == 4) {
this.stepNum = 3;
}
getTaskLogPage({
mainTaskId: this.infoID,
pageNo: 1,
pageSize: 100,
}).then(({ data }) => {
this.activities = data.list.sort((a, b) => a.timestamp - b.timestamp);
});
});
},
//刷新
refresh() {
this.nowDate = Date.now();
this.getInfoData();
},
closeD() {
this.visible = false;
this.$emit('closeDrawer');
},
},
};
</script>
<style lang="scss" scoped>
.bgDiv1 {
background-color: #f1f9ff;
padding: 20px;
line-height: 25px;
font-size: 15px;
.taskStatus {
text-align: center;
border-radius: 3px;
padding: 2px 5px;
color: #fff;
}
}
.bgDiv2 {
padding: 18px 0;
background-image: linear-gradient(
to right,
transparent 0%,
#c5c5c5 10%,
#c5c5c5 90%,
transparent 100%
);
background-position: bottom;
background-size: 100% 1px;
background-repeat: no-repeat;
padding-bottom: 1px;
.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: 200px;
border: 1px solid rgba(121, 121, 121, 0.8);
border-radius: 5px;
.pan-title {
background-color: #d8eeff;
border-radius: 5px;
height: 35px;
font-size: 20px;
line-height: 35px;
padding: 0 20px;
border-bottom: 1px solid rgba(121, 121, 121, 0.5);
letter-spacing: 2px;
}
.pan-body {
padding: 15px;
font-size: 16px;
color: rgba(121, 121, 121, 1);
}
}
}
.bgDiv4 {
padding: 20px 20px 0;
}
.bgDiv5 {
padding: 20px 20px 0;
}
.bgDiv6 {
padding: 20px 20px 0;
.timelineDiv {
padding: 5px;
height: 400px;
overflow-y: auto;
}
}
.drawer-body__footer {
display: flex;
justify-content: flex-end;
padding: 0 18px 10px;
}
</style>

Some files were not shown because too many files have changed in this diff Show More