Compare commits
2 Commits
projects/s
...
399e2bc965
| Author | SHA1 | Date | |
|---|---|---|---|
| 399e2bc965 | |||
| 7bee1f7863 |
4
.env.dev
@@ -12,8 +12,8 @@ ENV = 'development'
|
|||||||
VUE_APP_TITLE = 智能监控分析系统
|
VUE_APP_TITLE = 智能监控分析系统
|
||||||
|
|
||||||
# 芋道管理系统/开发环境
|
# 芋道管理系统/开发环境
|
||||||
VUE_APP_BASE_API = 'http://172.16.32.76:48080'
|
# VUE_APP_BASE_API = 'http://192.168.8.22:48080'
|
||||||
# VUE_APP_BASE_API = 'http://line.kszny.picaiba.com'
|
VUE_APP_BASE_API = 'http://172.16.33.65:48082'
|
||||||
|
|
||||||
# 路由懒加载
|
# 路由懒加载
|
||||||
VUE_CLI_BABEL_TRANSPILE_MODULES = true
|
VUE_CLI_BABEL_TRANSPILE_MODULES = true
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"local": "vue-cli-service serve --mode local",
|
"local": "vue-cli-service serve --mode local",
|
||||||
"dev": "vue-cli-service serve --mode dev",
|
"dev": "SET NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service serve --mode dev",
|
||||||
"front": "vue-cli-service serve --mode front",
|
"front": "vue-cli-service serve --mode front",
|
||||||
"build:prod": "SET NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service build --mode prod",
|
"build:prod": "SET NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service build --mode prod",
|
||||||
"build:stage": "vue-cli-service build --mode stage",
|
"build:stage": "vue-cli-service build --mode stage",
|
||||||
@@ -77,6 +77,7 @@
|
|||||||
"vue": "2.7.14",
|
"vue": "2.7.14",
|
||||||
"vue-count-to": "1.0.13",
|
"vue-count-to": "1.0.13",
|
||||||
"vue-cropper": "0.5.8",
|
"vue-cropper": "0.5.8",
|
||||||
|
"vue-jlunar-datepicker": "^2.3.2",
|
||||||
"vue-meta": "^2.4.0",
|
"vue-meta": "^2.4.0",
|
||||||
"vue-plugin-hiprint": "0.0.54-fix",
|
"vue-plugin-hiprint": "0.0.54-fix",
|
||||||
"vue-quill-editor": "^3.0.6",
|
"vue-quill-editor": "^3.0.6",
|
||||||
|
|||||||
@@ -141,3 +141,13 @@ export function getPerView(data) {
|
|||||||
data:data
|
data:data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 导出 Excel
|
||||||
|
export function exportExcel(query) {
|
||||||
|
return request({
|
||||||
|
url: '/base/group-scheduling-plan/export-excel',
|
||||||
|
method: 'get',
|
||||||
|
params: query,
|
||||||
|
responseType: 'blob'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|||||||
@@ -90,3 +90,29 @@ export function getEnableData() {
|
|||||||
method: 'get',
|
method: 'get',
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 解除继承节假日
|
||||||
|
export function disExtends(data) {
|
||||||
|
return request({
|
||||||
|
url: '/base/group-holiday/disExtends',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 恢复继承节假日
|
||||||
|
export function reExtends(data) {
|
||||||
|
return request({
|
||||||
|
url: '/base/group-holiday/reExtends',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获得部门节假日继承设置信息设置
|
||||||
|
export function getSet(query) {
|
||||||
|
return request({
|
||||||
|
url: '/base/group-holiday-dept-set/getSet',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|||||||
@@ -1,9 +0,0 @@
|
|||||||
import request from '@/utils/request'
|
|
||||||
|
|
||||||
export function getLineEdgeLibraryList(data) {
|
|
||||||
return request({
|
|
||||||
url: '/wms/line-edge-library/list',
|
|
||||||
method: 'get',
|
|
||||||
params: data,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
Before Width: | Height: | Size: 461 B |
|
Before Width: | Height: | Size: 321 B |
|
Before Width: | Height: | Size: 312 B |
|
Before Width: | Height: | Size: 244 B |
|
Before Width: | Height: | Size: 137 B |
|
Before Width: | Height: | Size: 165 B |
|
Before Width: | Height: | Size: 139 B |
|
Before Width: | Height: | Size: 170 B |
|
Before Width: | Height: | Size: 929 B |
|
Before Width: | Height: | Size: 321 B |
|
Before Width: | Height: | Size: 320 B |
|
Before Width: | Height: | Size: 261 B |
|
Before Width: | Height: | Size: 416 B |
|
Before Width: | Height: | Size: 305 B |
|
Before Width: | Height: | Size: 325 B |
|
Before Width: | Height: | Size: 259 B |
|
Before Width: | Height: | Size: 420 B |
|
Before Width: | Height: | Size: 321 B |
|
Before Width: | Height: | Size: 5.5 KiB |
|
Before Width: | Height: | Size: 5.7 KiB |
|
Before Width: | Height: | Size: 5.7 KiB |
|
Before Width: | Height: | Size: 5.5 KiB |
|
Before Width: | Height: | Size: 5.7 KiB |
|
Before Width: | Height: | Size: 2.1 KiB |
|
Before Width: | Height: | Size: 8.9 KiB |
|
Before Width: | Height: | Size: 1.0 KiB |
|
Before Width: | Height: | Size: 326 B |
|
Before Width: | Height: | Size: 622 B |
|
Before Width: | Height: | Size: 220 B |
|
Before Width: | Height: | Size: 379 B |
|
Before Width: | Height: | Size: 355 B |
|
Before Width: | Height: | Size: 325 B |
|
Before Width: | Height: | Size: 562 B |
|
Before Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 5.3 KiB |
|
Before Width: | Height: | Size: 611 B |
|
Before Width: | Height: | Size: 1.9 MiB |
@@ -9,7 +9,7 @@ import { isRelogin } from '@/utils/request'
|
|||||||
NProgress.configure({ showSpinner: false })
|
NProgress.configure({ showSpinner: false })
|
||||||
|
|
||||||
// 增加三方登陆 update by 芋艿
|
// 增加三方登陆 update by 芋艿
|
||||||
const whiteList = ['/login', '/social-login','screenbg', '/auth-redirect', '/bind', '/register', '/oauthLogin/gitee']
|
const whiteList = ['/login', '/social-login', '/auth-redirect', '/bind', '/register', '/oauthLogin/gitee']
|
||||||
|
|
||||||
router.beforeEach((to, from, next) => {
|
router.beforeEach((to, from, next) => {
|
||||||
NProgress.start()
|
NProgress.start()
|
||||||
@@ -25,9 +25,9 @@ router.beforeEach((to, from, next) => {
|
|||||||
// 获取字典数据 add by 芋艿
|
// 获取字典数据 add by 芋艿
|
||||||
store.dispatch('dict/loadDictDatas')
|
store.dispatch('dict/loadDictDatas')
|
||||||
// 判断当前用户是否已拉取完 user_info 信息
|
// 判断当前用户是否已拉取完 user_info 信息
|
||||||
store.dispatch('GetInfo').then(userInfo => {
|
store.dispatch('GetInfo').then(() => {
|
||||||
isRelogin.show = false
|
isRelogin.show = false
|
||||||
store.dispatch('GenerateRoutes', userInfo.menus).then(accessRoutes => {
|
store.dispatch('GenerateRoutes').then(accessRoutes => {
|
||||||
// 根据 roles 权限生成可访问的路由表
|
// 根据 roles 权限生成可访问的路由表
|
||||||
router.addRoutes(accessRoutes) // 动态添加可访问路由表
|
router.addRoutes(accessRoutes) // 动态添加可访问路由表
|
||||||
next({ ...to, replace: true }) // hack方法 确保addRoutes已完成
|
next({ ...to, replace: true }) // hack方法 确保addRoutes已完成
|
||||||
|
|||||||
@@ -28,277 +28,223 @@ Vue.use(Router)
|
|||||||
|
|
||||||
// 公共路由
|
// 公共路由
|
||||||
export const constantRoutes = [
|
export const constantRoutes = [
|
||||||
{
|
{
|
||||||
path: '/redirect',
|
path: '/redirect',
|
||||||
component: Layout,
|
component: Layout,
|
||||||
hidden: true,
|
hidden: true,
|
||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
path: '/redirect/:path(.*)',
|
path: '/redirect/:path(.*)',
|
||||||
component: (resolve) => require(['@/views/redirect'], resolve),
|
component: (resolve) => require(['@/views/redirect'], resolve)
|
||||||
},
|
}
|
||||||
],
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/login',
|
path: '/login',
|
||||||
component: (resolve) => require(['@/views/login'], resolve),
|
component: (resolve) => require(['@/views/login'], resolve),
|
||||||
// hidden: true,
|
hidden: true
|
||||||
},
|
},
|
||||||
|
{
|
||||||
{
|
path: '/sso',
|
||||||
path: '/sso',
|
component: (resolve) => require(['@/views/sso'], resolve),
|
||||||
component: (resolve) => require(['@/views/sso'], resolve),
|
hidden: true
|
||||||
hidden: true,
|
},
|
||||||
},
|
{
|
||||||
{
|
path: '/social-login',
|
||||||
path: '/social-login',
|
component: (resolve) => require(['@/views/socialLogin'], resolve),
|
||||||
component: (resolve) => require(['@/views/socialLogin'], resolve),
|
hidden: true
|
||||||
hidden: true,
|
},
|
||||||
},
|
{
|
||||||
{
|
path: '/404',
|
||||||
path: '/404',
|
component: (resolve) => require(['@/views/error/404'], resolve),
|
||||||
component: (resolve) => require(['@/views/error/404'], resolve),
|
hidden: true
|
||||||
hidden: true,
|
},
|
||||||
},
|
{
|
||||||
{
|
path: '/401',
|
||||||
path: '/401',
|
component: (resolve) => require(['@/views/error/401'], resolve),
|
||||||
component: (resolve) => require(['@/views/error/401'], resolve),
|
hidden: true
|
||||||
hidden: true,
|
},
|
||||||
},
|
{
|
||||||
{
|
path: '/print-design',
|
||||||
path: '/print-design',
|
component: (resolve) => require(['@/views/print/design'], resolve),
|
||||||
component: (resolve) => require(['@/views/print/design'], resolve),
|
hidden: true
|
||||||
hidden: true,
|
},
|
||||||
},
|
{
|
||||||
{
|
path: "",
|
||||||
path: '',
|
component: Layout,
|
||||||
component: Layout,
|
redirect: "index",
|
||||||
redirect: 'index',
|
children: [
|
||||||
children: [
|
{
|
||||||
{
|
path: "index",
|
||||||
path: 'index',
|
component: (resolve) => require(["@/views/home/index"], resolve),
|
||||||
component: (resolve) => require(['@/views/home/index'], resolve),
|
name: "首页",
|
||||||
name: '首页',
|
meta: { title: "首页", icon: "dashboard", affix: true },
|
||||||
meta: { title: '首页', icon: 'dashboard', affix: true },
|
hidden: true
|
||||||
hidden: true,
|
},
|
||||||
},
|
],
|
||||||
],
|
},
|
||||||
},
|
{
|
||||||
{
|
path: '/user',
|
||||||
path: '/screenbg',
|
component: Layout,
|
||||||
component: () =>
|
hidden: true,
|
||||||
import(
|
redirect: 'noredirect',
|
||||||
/* webpackChunkName: "about" */ '@/views/productionVisualization/equipmentBoard'
|
children: [{
|
||||||
),
|
path: 'profile',
|
||||||
name: 'screenbg',
|
component: (resolve) => require(['@/views/system/user/profile/index'], resolve),
|
||||||
meta: { title: '大屏', icon: 'chart' },
|
name: 'Profile',
|
||||||
},
|
meta: { title: '个人中心', icon: 'user' }
|
||||||
{
|
}, {
|
||||||
path: '/user',
|
path: 'notify-message',
|
||||||
component: Layout,
|
component: (resolve) => require(['@/views/system/notify/my/index'], resolve),
|
||||||
hidden: true,
|
name: 'MyNotifyMessage',
|
||||||
redirect: 'noredirect',
|
meta: { title: '我的站内信', icon: 'message' },
|
||||||
children: [
|
}]
|
||||||
{
|
},
|
||||||
path: 'profile',
|
{
|
||||||
component: (resolve) =>
|
path: '/dict',
|
||||||
require(['@/views/system/user/profile/index'], resolve),
|
component: Layout,
|
||||||
name: 'Profile',
|
hidden: true,
|
||||||
meta: { title: '个人中心', icon: 'user' },
|
children: [{
|
||||||
},
|
path: 'type/data/:dictId(\\d+)',
|
||||||
{
|
component: (resolve) => require(['@/views/system/dict/data'], resolve),
|
||||||
path: 'notify-message',
|
name: 'SystemDictData',
|
||||||
component: (resolve) =>
|
meta: { title: '字典数据', icon: '', activeMenu: '/system/dict' }
|
||||||
require(['@/views/system/notify/my/index'], resolve),
|
}
|
||||||
name: 'MyNotifyMessage',
|
]
|
||||||
meta: { title: '我的站内信', icon: 'message' },
|
},
|
||||||
},
|
{
|
||||||
],
|
path: '/job',
|
||||||
},
|
component: Layout,
|
||||||
{
|
hidden: true,
|
||||||
path: '/dict',
|
children: [{
|
||||||
component: Layout,
|
path: 'log',
|
||||||
hidden: true,
|
component: (resolve) => require(['@/views/infra/job/log'], resolve),
|
||||||
children: [
|
name: 'InfraJobLog',
|
||||||
{
|
meta: { title: '调度日志', activeMenu: '/infra/job' }
|
||||||
path: 'type/data/:dictId(\\d+)',
|
}
|
||||||
component: (resolve) => require(['@/views/system/dict/data'], resolve),
|
]
|
||||||
name: 'SystemDictData',
|
}, {
|
||||||
meta: { title: '字典数据', icon: '', activeMenu: '/system/dict' },
|
path: '/codegen',
|
||||||
},
|
component: Layout,
|
||||||
],
|
hidden: true,
|
||||||
},
|
children: [{
|
||||||
{
|
path: 'edit/:tableId(\\d+)',
|
||||||
path: '/job',
|
component: (resolve) => require(['@/views/infra/codegen/editTable'], resolve),
|
||||||
component: Layout,
|
name: 'InfraCodegenEditTable',
|
||||||
hidden: true,
|
meta: { title: '修改生成配置', activeMenu: '/infra/codegen' }
|
||||||
children: [
|
}
|
||||||
{
|
]
|
||||||
path: 'log',
|
},
|
||||||
component: (resolve) => require(['@/views/infra/job/log'], resolve),
|
{
|
||||||
name: 'InfraJobLog',
|
path: '/bpm',
|
||||||
meta: { title: '调度日志', activeMenu: '/infra/job' },
|
component: Layout,
|
||||||
},
|
hidden: true,
|
||||||
],
|
redirect: 'noredirect',
|
||||||
},
|
children: [{
|
||||||
{
|
path: 'oa/leave/create',
|
||||||
path: '/codegen',
|
component: (resolve) => require(['@/views/bpm/oa/leave/create'], resolve),
|
||||||
component: Layout,
|
name: 'BpmOALeaveCreate',
|
||||||
hidden: true,
|
meta: { title: '发起 OA 请假', icon: 'form', activeMenu: '/bpm/oa/leave' }
|
||||||
children: [
|
}, {
|
||||||
{
|
path: 'oa/leave/detail',
|
||||||
path: 'edit/:tableId(\\d+)',
|
component: (resolve) => require(['@/views/bpm/oa/leave/detail'], resolve),
|
||||||
component: (resolve) =>
|
name: 'BpmOALeaveDetail',
|
||||||
require(['@/views/infra/codegen/editTable'], resolve),
|
meta: { title: '查看 OA 请假', icon: 'view', activeMenu: '/bpm/oa/leave' }
|
||||||
name: 'InfraCodegenEditTable',
|
}
|
||||||
meta: { title: '修改生成配置', activeMenu: '/infra/codegen' },
|
]
|
||||||
},
|
},
|
||||||
],
|
{
|
||||||
},
|
path: '/bpm',
|
||||||
{
|
component: Layout,
|
||||||
path: '/bpm',
|
hidden: true,
|
||||||
component: Layout,
|
children: [{
|
||||||
hidden: true,
|
path: 'manager/form/edit',
|
||||||
redirect: 'noredirect',
|
component: (resolve) => require(['@/views/bpm/form/formEditor'], resolve),
|
||||||
children: [
|
name: 'BpmFormEditor',
|
||||||
{
|
meta: { title: '流程表单-编辑', activeMenu: '/bpm/manager/form' }
|
||||||
path: 'oa/leave/create',
|
}, {
|
||||||
component: (resolve) =>
|
path: 'manager/definition',
|
||||||
require(['@/views/bpm/oa/leave/create'], resolve),
|
component: (resolve) => require(['@/views/bpm/definition/index'], resolve),
|
||||||
name: 'BpmOALeaveCreate',
|
name: 'BpmProcessDefinition',
|
||||||
meta: {
|
meta: { title: '流程定义', activeMenu: '/bpm/manager/model' }
|
||||||
title: '发起 OA 请假',
|
}, {
|
||||||
icon: 'form',
|
path: 'manager/model/design',
|
||||||
activeMenu: '/bpm/oa/leave',
|
component: (resolve) => require(['@/views/bpm/model/modelEditor'], resolve),
|
||||||
},
|
name: 'BpmModelEditor',
|
||||||
},
|
meta: { title: '设计流程', activeMenu: '/bpm/manager/model' }
|
||||||
{
|
}, {
|
||||||
path: 'oa/leave/detail',
|
path: 'process-instance/create',
|
||||||
component: (resolve) =>
|
component: (resolve) => require(['@/views/bpm/processInstance/create'], resolve),
|
||||||
require(['@/views/bpm/oa/leave/detail'], resolve),
|
name: 'BpmProcessInstanceCreate',
|
||||||
name: 'BpmOALeaveDetail',
|
meta: { title: '发起流程', activeMenu: '/bpm/task/my' }
|
||||||
meta: {
|
}, {
|
||||||
title: '查看 OA 请假',
|
path: 'process-instance/detail',
|
||||||
icon: 'view',
|
component: (resolve) => require(['@/views/bpm/processInstance/detail'], resolve),
|
||||||
activeMenu: '/bpm/oa/leave',
|
name: 'BpmProcessInstanceDetail',
|
||||||
},
|
meta: { title: '流程详情', activeMenu: '/bpm/task/my' }
|
||||||
},
|
}
|
||||||
],
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/bpm',
|
path: '/property',
|
||||||
component: Layout,
|
component: Layout,
|
||||||
hidden: true,
|
hidden: true,
|
||||||
children: [
|
children: [{
|
||||||
{
|
path: 'value/:propertyId(\\d+)',
|
||||||
path: 'manager/form/edit',
|
component: (resolve) => require(['@/views/mall/product/property/value'], resolve),
|
||||||
component: (resolve) =>
|
name: 'ProductPropertyValue',
|
||||||
require(['@/views/bpm/form/formEditor'], resolve),
|
meta: { title: '商品属性值', icon: '', activeMenu: '/product/property' }
|
||||||
name: 'BpmFormEditor',
|
}
|
||||||
meta: { title: '流程表单-编辑', activeMenu: '/bpm/manager/form' },
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: 'manager/definition',
|
path: '/spu',
|
||||||
component: (resolve) =>
|
component: Layout,
|
||||||
require(['@/views/bpm/definition/index'], resolve),
|
hidden: true,
|
||||||
name: 'BpmProcessDefinition',
|
children: [{
|
||||||
meta: { title: '流程定义', activeMenu: '/bpm/manager/model' },
|
path: 'edit/:spuId(\\d+)',
|
||||||
},
|
component: (resolve) => require(['@/views/mall/product/spu/save'], resolve),
|
||||||
{
|
name: 'ProductSpuUpdate',
|
||||||
path: 'manager/model/design',
|
meta: { title: '修改商品', activeMenu: '/product/spu' }
|
||||||
component: (resolve) =>
|
},
|
||||||
require(['@/views/bpm/model/modelEditor'], resolve),
|
{
|
||||||
name: 'BpmModelEditor',
|
path: 'add',
|
||||||
meta: { title: '设计流程', activeMenu: '/bpm/manager/model' },
|
component: (resolve) => require(['@/views/mall/product/spu/save'], resolve),
|
||||||
},
|
name: 'ProductSpuCreate',
|
||||||
{
|
meta: { title: '添加商品', activeMenu: '/product/spu' }
|
||||||
path: 'process-instance/create',
|
}
|
||||||
component: (resolve) =>
|
]
|
||||||
require(['@/views/bpm/processInstance/create'], resolve),
|
},
|
||||||
name: 'BpmProcessInstanceCreate',
|
{
|
||||||
meta: { title: '发起流程', activeMenu: '/bpm/task/my' },
|
path: '/trade/order',
|
||||||
},
|
component: Layout,
|
||||||
{
|
hidden: true,
|
||||||
path: 'process-instance/detail',
|
children: [
|
||||||
component: (resolve) =>
|
{
|
||||||
require(['@/views/bpm/processInstance/detail'], resolve),
|
path: 'detail',
|
||||||
name: 'BpmProcessInstanceDetail',
|
name: 'TradeOrderDetail',
|
||||||
meta: { title: '流程详情', activeMenu: '/bpm/task/my' },
|
hidden: true,
|
||||||
},
|
meta: { title: '订单详情' },
|
||||||
],
|
component: (resolve) => require(['@/views/mall/trade/order/detail'], resolve)
|
||||||
},
|
}
|
||||||
{
|
]
|
||||||
path: '/property',
|
},
|
||||||
component: Layout,
|
{
|
||||||
hidden: true,
|
path: '/pay',
|
||||||
children: [
|
component: Layout,
|
||||||
{
|
hidden: true,
|
||||||
path: 'value/:propertyId(\\d+)',
|
children: [{
|
||||||
component: (resolve) =>
|
path: 'order/submit',
|
||||||
require(['@/views/mall/product/property/value'], resolve),
|
name: 'PayOrderSubmit',
|
||||||
name: 'ProductPropertyValue',
|
hidden: true,
|
||||||
meta: {
|
meta: {
|
||||||
title: '商品属性值',
|
title: '收银台',
|
||||||
icon: '',
|
noCache: true
|
||||||
activeMenu: '/product/property',
|
},
|
||||||
},
|
component: (resolve) => require(['@/views/pay/order/submit'], resolve)
|
||||||
},
|
}]
|
||||||
],
|
}
|
||||||
},
|
]
|
||||||
{
|
|
||||||
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;
|
let routerPush = Router.prototype.push;
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import {constantRoutes} from '@/router'
|
import {constantRoutes} from '@/router'
|
||||||
|
import {getRouters} from '@/api/menu'
|
||||||
import Layout from '@/layout/index'
|
import Layout from '@/layout/index'
|
||||||
import ParentView from '@/components/ParentView';
|
import ParentView from '@/components/ParentView';
|
||||||
import {toCamelCase} from "@/utils";
|
import {toCamelCase} from "@/utils";
|
||||||
@@ -26,25 +27,22 @@ const permission = {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
actions: {
|
actions: {
|
||||||
/**
|
// 生成路由
|
||||||
* 生成路由
|
GenerateRoutes({commit}) {
|
||||||
*
|
|
||||||
* @param commit commit 函数
|
|
||||||
* @param menus 路由参数
|
|
||||||
*/
|
|
||||||
GenerateRoutes({commit}, menus) {
|
|
||||||
return new Promise(resolve => {
|
return new Promise(resolve => {
|
||||||
// 将 menus 菜单,转换为 route 路由数组
|
// 向后端请求路由数据(菜单)
|
||||||
const sdata = JSON.parse(JSON.stringify(menus)) // 【重要】用于菜单中的数据
|
getRouters().then(res => {
|
||||||
const rdata = JSON.parse(JSON.stringify(menus)) // 用于最后添加到 Router 中的数据
|
const sdata = JSON.parse(JSON.stringify(res.data)) // 【重要】用于菜单中的数据
|
||||||
const sidebarRoutes = filterAsyncRouter(sdata)
|
const rdata = JSON.parse(JSON.stringify(res.data)) // 用于最后添加到 Router 中的数据
|
||||||
const rewriteRoutes = filterAsyncRouter(rdata, false, true)
|
const sidebarRoutes = filterAsyncRouter(sdata)
|
||||||
rewriteRoutes.push({path: '*', redirect: '/404', hidden: true})
|
const rewriteRoutes = filterAsyncRouter(rdata, false, true)
|
||||||
commit('SET_ROUTES', rewriteRoutes)
|
rewriteRoutes.push({path: '*', redirect: '/404', hidden: true})
|
||||||
commit('SET_SIDEBAR_ROUTERS', constantRoutes.concat(sidebarRoutes))
|
commit('SET_ROUTES', rewriteRoutes)
|
||||||
commit('SET_DEFAULT_ROUTES', sidebarRoutes)
|
commit('SET_SIDEBAR_ROUTERS', constantRoutes.concat(sidebarRoutes))
|
||||||
commit('SET_TOPBAR_ROUTES', sidebarRoutes)
|
commit('SET_DEFAULT_ROUTES', sidebarRoutes)
|
||||||
resolve(rewriteRoutes)
|
commit('SET_TOPBAR_ROUTES', sidebarRoutes)
|
||||||
|
resolve(rewriteRoutes)
|
||||||
|
})
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,14 +2,14 @@
|
|||||||
* @Author: zwq
|
* @Author: zwq
|
||||||
* @Date: 2025-10-23 13:43:55
|
* @Date: 2025-10-23 13:43:55
|
||||||
* @LastEditors: zwq
|
* @LastEditors: zwq
|
||||||
* @LastEditTime: 2025-10-23 16:50:43
|
* @LastEditTime: 2025-11-05 13:50:39
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
<template>
|
<template>
|
||||||
<div class="app-container">
|
<div class="app-container" style="padding-top:0">
|
||||||
<div v-for="item in groupClassArr" :key="item.planId">
|
<div v-for="item in groupClassArr" :key="item.planId">
|
||||||
<small-title style="margin: 16px 0" size="sm" :no-padding="true">
|
<small-title style="margin: 16px 0" size="sm" :no-padding="true">
|
||||||
{{item.planName}}
|
{{deptName + ' - ' +item.planName}}
|
||||||
</small-title>
|
</small-title>
|
||||||
<base-table
|
<base-table
|
||||||
:table-props="tableProps"
|
:table-props="tableProps"
|
||||||
@@ -55,12 +55,14 @@ export default {
|
|||||||
tableProps,
|
tableProps,
|
||||||
tableData: [],
|
tableData: [],
|
||||||
groupClassArr: [],
|
groupClassArr: [],
|
||||||
|
deptName: ''
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
created() {},
|
created() {},
|
||||||
methods: {
|
methods: {
|
||||||
init(det) {
|
init(det,deptName) {
|
||||||
this.tableData = det;
|
this.tableData = det;
|
||||||
|
this.deptName = deptName
|
||||||
//返回计划名和id
|
//返回计划名和id
|
||||||
const arr = det.map((item) => {
|
const arr = det.map((item) => {
|
||||||
const obj = {
|
const obj = {
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
* @Author: zwq
|
* @Author: zwq
|
||||||
* @Date: 2025-10-23 13:43:55
|
* @Date: 2025-10-23 13:43:55
|
||||||
* @LastEditors: zwq
|
* @LastEditors: zwq
|
||||||
* @LastEditTime: 2025-10-24 11:14:55
|
* @LastEditTime: 2025-11-05 13:48:48
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
<template>
|
<template>
|
||||||
@@ -167,7 +167,9 @@
|
|||||||
HolidayList[Number(data.day.split('-')[2]) - 1]
|
HolidayList[Number(data.day.split('-')[2]) - 1]
|
||||||
?.det,
|
?.det,
|
||||||
HolidayList[Number(data.day.split('-')[2]) - 1]
|
HolidayList[Number(data.day.split('-')[2]) - 1]
|
||||||
?.date
|
?.date,
|
||||||
|
HolidayList[Number(data.day.split('-')[2]) - 1]
|
||||||
|
?.deptName
|
||||||
)
|
)
|
||||||
"
|
"
|
||||||
:title="
|
:title="
|
||||||
@@ -441,11 +443,11 @@ export default {
|
|||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
holidayLog(det, date) {
|
holidayLog(det, date,deptName) {
|
||||||
this.dialogTitle = this.showDeptName + '-' + date + '-排班详情';
|
this.dialogTitle = this.showDeptName + '-' + date + '-排班详情';
|
||||||
this.logVisible = true;
|
this.logVisible = true;
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$refs.holidayLogRef.init(det);
|
this.$refs.holidayLogRef.init(det,deptName);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
cancelLog() {
|
cancelLog() {
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
* @Author: zwq
|
* @Author: zwq
|
||||||
* @Date: 2025-10-11 14:27:37
|
* @Date: 2025-10-11 14:27:37
|
||||||
* @LastEditors: zwq
|
* @LastEditors: zwq
|
||||||
* @LastEditTime: 2025-10-29 17:12:04
|
* @LastEditTime: 2025-11-04 15:16:48
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
<template>
|
<template>
|
||||||
@@ -25,7 +25,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { listByDeptId } from '@/api/group/Schedule';
|
import { getGroupPage } from '@/api/group/groupSetting';
|
||||||
|
|
||||||
const tableProps = [
|
const tableProps = [
|
||||||
{
|
{
|
||||||
@@ -39,7 +39,7 @@ const tableProps = [
|
|||||||
width: 100,
|
width: 100,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'deptId',
|
prop: 'deptName',
|
||||||
label: '所属部门',
|
label: '所属部门',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -57,7 +57,7 @@ export default {
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
urlOptions: {
|
urlOptions: {
|
||||||
getDataListURL: listByDeptId,
|
getDataListURL: getGroupPage,
|
||||||
},
|
},
|
||||||
tableProps,
|
tableProps,
|
||||||
tableData: [],
|
tableData: [],
|
||||||
@@ -86,16 +86,16 @@ export default {
|
|||||||
pageSize: 100,
|
pageSize: 100,
|
||||||
code: '',
|
code: '',
|
||||||
name: '',
|
name: '',
|
||||||
|
deptId: undefined,
|
||||||
},
|
},
|
||||||
selectedList: [],
|
selectedList: [],
|
||||||
selectedArr: [], //已选的班组,从父组件传过来的
|
selectedArr: [], //已选的班组,从父组件传过来的
|
||||||
deptId: undefined,
|
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
created() {},
|
created() {},
|
||||||
methods: {
|
methods: {
|
||||||
init(id, tableData) {
|
init(id, tableData) {
|
||||||
this.deptId = id;
|
this.formInline.deptId = id;
|
||||||
this.selectedArr = tableData || [];
|
this.selectedArr = tableData || [];
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.getDataList();
|
this.getDataList();
|
||||||
@@ -103,8 +103,8 @@ export default {
|
|||||||
},
|
},
|
||||||
// 获取数据列表
|
// 获取数据列表
|
||||||
getDataList() {
|
getDataList() {
|
||||||
this.urlOptions.getDataListURL(this.deptId).then((response) => {
|
this.urlOptions.getDataListURL(this.formInline).then((response) => {
|
||||||
this.tableData = response.data;
|
this.tableData = response.data.list;
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
if (this.selectedArr.length > 0) {
|
if (this.selectedArr.length > 0) {
|
||||||
this.setSelectedRows();
|
this.setSelectedRows();
|
||||||
@@ -149,22 +149,19 @@ export default {
|
|||||||
selectChange(val) {
|
selectChange(val) {
|
||||||
this.selectedList = val;
|
this.selectedList = val;
|
||||||
},
|
},
|
||||||
// 判断两个数组是否有重复的 id
|
// 判断两个数组是否有重复的 id,去重
|
||||||
hasDuplicateIds(arr1, arr2) {
|
hasDuplicateIds(arr1, arr2) {
|
||||||
const idSet = new Set(arr1.map((item) => item.id));
|
return arr2.filter(
|
||||||
return arr2.some((item) => idSet.has(item.id));
|
(item2) => !arr1.some((item1) => item1.id === item2.id)
|
||||||
|
);
|
||||||
},
|
},
|
||||||
|
|
||||||
dataFormSubmit() {
|
dataFormSubmit() {
|
||||||
if (this.selectedList && this.selectedList.length > 0) {
|
if (this.selectedList && this.selectedList.length > 0) {
|
||||||
const haveData = this.hasDuplicateIds(
|
this.selectedList = this.hasDuplicateIds(
|
||||||
this.selectedArr,
|
this.selectedArr,
|
||||||
this.selectedList
|
this.selectedList
|
||||||
);
|
);
|
||||||
if (haveData) {
|
|
||||||
this.$message('请不要重复添加数组');
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
this.$emit('refreshTableData', this.selectedList);
|
this.$emit('refreshTableData', this.selectedList);
|
||||||
} else if (this.selectedArr.length > 0) {
|
} else if (this.selectedArr.length > 0) {
|
||||||
this.$message('请不要重复添加数组');
|
this.$message('请不要重复添加数组');
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
* @Author: zwq
|
* @Author: zwq
|
||||||
* @Date: 2025-10-13 15:07:24
|
* @Date: 2025-10-13 15:07:24
|
||||||
* @LastEditors: zwq
|
* @LastEditors: zwq
|
||||||
* @LastEditTime: 2025-10-29 15:28:52
|
* @LastEditTime: 2025-11-04 16:07:45
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
<template>
|
<template>
|
||||||
@@ -54,10 +54,11 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="6">
|
<el-col :span="6">
|
||||||
<el-form-item label="部门">
|
<el-form-item label="部门" prop="deptId">
|
||||||
<dept-select
|
<dept-select
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
ref="deptSelect"
|
ref="deptSelect"
|
||||||
|
v-model="dataForm.deptId"
|
||||||
@DeptId="setDeptId"></dept-select>
|
@DeptId="setDeptId"></dept-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
@@ -111,7 +112,7 @@
|
|||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="6" v-if="dataForm.shiftType>1">
|
<el-col :span="6" v-if="dataForm.shiftType > 1">
|
||||||
<el-form-item label="同班次连排" prop="shiftSustainedNum">
|
<el-form-item label="同班次连排" prop="shiftSustainedNum">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="dataForm.shiftSustainedNum"
|
v-model="dataForm.shiftSustainedNum"
|
||||||
@@ -150,6 +151,12 @@
|
|||||||
</base-table>
|
</base-table>
|
||||||
<small-title style="margin: 16px 0" size="sm" :no-padding="true">
|
<small-title style="margin: 16px 0" size="sm" :no-padding="true">
|
||||||
班组
|
班组
|
||||||
|
<el-tag type="warning" style="color: black">
|
||||||
|
<i class="el-icon-warning" style="color: #ffbd02"></i>
|
||||||
|
排班从计划开始时间对应的第一个班次开始,按
|
||||||
|
<span style="color: red">班组列表顺序</span>
|
||||||
|
依次循环执行
|
||||||
|
</el-tag>
|
||||||
</small-title>
|
</small-title>
|
||||||
<base-table
|
<base-table
|
||||||
:table-props="tableProps2"
|
:table-props="tableProps2"
|
||||||
@@ -157,6 +164,7 @@
|
|||||||
:limit="10"
|
:limit="10"
|
||||||
:table-data="tableData2"
|
:table-data="tableData2"
|
||||||
:add-button-show="'新增'"
|
:add-button-show="'新增'"
|
||||||
|
@emitFun="handleSort"
|
||||||
@emitButtonClick="addNewGroup">
|
@emitButtonClick="addNewGroup">
|
||||||
<method-btn
|
<method-btn
|
||||||
v-if="tableBtn2.length"
|
v-if="tableBtn2.length"
|
||||||
@@ -174,8 +182,7 @@
|
|||||||
:no-padding="true">
|
:no-padding="true">
|
||||||
排班计划预览
|
排班计划预览
|
||||||
<span style="font-size: 14px; color: #ff1c15">
|
<span style="font-size: 14px; color: #ff1c15">
|
||||||
系统将根据以下设置,按班组轮班顺序依次循环每日班次,生成正式排班计划,请确认。
|
系统将根据
|
||||||
|
|
||||||
<el-popover
|
<el-popover
|
||||||
placement="right"
|
placement="right"
|
||||||
title="比如三班两倒,同班次连排2天,不休周末排班如下"
|
title="比如三班两倒,同班次连排2天,不休周末排班如下"
|
||||||
@@ -192,9 +199,10 @@
|
|||||||
</el-table>
|
</el-table>
|
||||||
<i
|
<i
|
||||||
slot="reference"
|
slot="reference"
|
||||||
class="el-icon-warning-outline"
|
class="el-icon-chat-dot-square"
|
||||||
style="color: #ff1c15"></i>
|
style="color: #409eff; font-size: 18px"></i>
|
||||||
</el-popover>
|
</el-popover>
|
||||||
|
设置,按班组轮班顺序依次循环每日班次,生成正式排班计划,请确认。
|
||||||
</span>
|
</span>
|
||||||
</small-title>
|
</small-title>
|
||||||
<el-tag>
|
<el-tag>
|
||||||
@@ -227,7 +235,7 @@
|
|||||||
<div style="color: rgba(0, 0, 0, 0.6)">同班次连排</div>
|
<div style="color: rgba(0, 0, 0, 0.6)">同班次连排</div>
|
||||||
<div style="color: #000000">
|
<div style="color: #000000">
|
||||||
{{
|
{{
|
||||||
dataForm.shiftSustainedNum +
|
(dataForm.shiftSustainedNum ? dataForm.shiftSustainedNum : '') +
|
||||||
['日', '周', '月', '季'][dataForm.shiftSustainedType - 1]
|
['日', '周', '月', '季'][dataForm.shiftSustainedType - 1]
|
||||||
}}
|
}}
|
||||||
</div>
|
</div>
|
||||||
@@ -335,6 +343,7 @@ import { parseTime } from '@/filter/code-filter';
|
|||||||
import editClass from './edit-class.vue';
|
import editClass from './edit-class.vue';
|
||||||
import addGroup from './add-group.vue';
|
import addGroup from './add-group.vue';
|
||||||
import bindLine from './bind-line.vue';
|
import bindLine from './bind-line.vue';
|
||||||
|
import sortSet from './sortSet.vue';
|
||||||
import {
|
import {
|
||||||
getCode,
|
getCode,
|
||||||
createStepOne,
|
createStepOne,
|
||||||
@@ -374,10 +383,17 @@ const tableProps1 = [
|
|||||||
];
|
];
|
||||||
|
|
||||||
const tableProps2 = [
|
const tableProps2 = [
|
||||||
|
{
|
||||||
|
prop: 'shunxu',
|
||||||
|
label: '顺序',
|
||||||
|
width: 70,
|
||||||
|
subcomponent: sortSet,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
prop: 'code',
|
prop: 'code',
|
||||||
label: '班组编号',
|
label: '班组编号',
|
||||||
width: 140,
|
width: 140,
|
||||||
|
showOverflowtooltip: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'name',
|
prop: 'name',
|
||||||
@@ -476,6 +492,7 @@ export default {
|
|||||||
name: [
|
name: [
|
||||||
{ required: true, message: '计划名称不能为空', trigger: 'blur' },
|
{ required: true, message: '计划名称不能为空', trigger: 'blur' },
|
||||||
],
|
],
|
||||||
|
deptId: [{ required: true, message: '部门不能为空', trigger: 'blur' }],
|
||||||
startDay: [
|
startDay: [
|
||||||
{ required: true, message: '开始时间不能为空', trigger: 'change' },
|
{ required: true, message: '开始时间不能为空', trigger: 'change' },
|
||||||
],
|
],
|
||||||
@@ -610,12 +627,10 @@ export default {
|
|||||||
this.tableData2 = res.data?.stepTwo.groupPlanTeamBaseVOList;
|
this.tableData2 = res.data?.stepTwo.groupPlanTeamBaseVOList;
|
||||||
this.tableData2.forEach((item, index) => {
|
this.tableData2.forEach((item, index) => {
|
||||||
let lineName = '';
|
let lineName = '';
|
||||||
lineName = this.setLineName(item.bindLineTree, lineName);
|
if (item.isProduction) {
|
||||||
this.$set(
|
lineName = this.setLineName(item.bindLineTree);
|
||||||
this.tableData2[index],
|
}
|
||||||
'lineName',
|
this.$set(this.tableData2[index], 'lineName', lineName);
|
||||||
lineName.slice(0, -1)
|
|
||||||
);
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
@@ -654,9 +669,12 @@ export default {
|
|||||||
this.$message('部门不能为空');
|
this.$message('部门不能为空');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const compareDate = this.compareDates(this.dataForm.startDay,this.dataForm.endDay)
|
const compareDate = this.compareDates(
|
||||||
|
this.dataForm.startDay,
|
||||||
|
this.dataForm.endDay
|
||||||
|
);
|
||||||
|
|
||||||
if (compareDate > 0 ) {
|
if (compareDate > 0) {
|
||||||
this.$message('开始时间不能大于结束时间');
|
this.$message('开始时间不能大于结束时间');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -684,7 +702,10 @@ export default {
|
|||||||
|
|
||||||
let isbindLine = false;
|
let isbindLine = false;
|
||||||
this.tableData2.forEach((item) => {
|
this.tableData2.forEach((item) => {
|
||||||
if (!item.bindLineTree || item.bindLineTree.length == 0) {
|
if (
|
||||||
|
item.isProduction &&
|
||||||
|
(!item.bindLineTree || item.bindLineTree.length == 0)
|
||||||
|
) {
|
||||||
isbindLine = true;
|
isbindLine = true;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -730,8 +751,8 @@ export default {
|
|||||||
const obj = {
|
const obj = {
|
||||||
teamId: item.id,
|
teamId: item.id,
|
||||||
name: item.name,
|
name: item.name,
|
||||||
leaderName: item.leaderName,
|
leaderName: item.leaderName,
|
||||||
leaderPhone:item.leaderPhone,
|
leaderPhone: item.leaderPhone,
|
||||||
bindData: JSON.stringify(item.bindLineTree),
|
bindData: JSON.stringify(item.bindLineTree),
|
||||||
};
|
};
|
||||||
data.groupPlanTeamBaseVOList.push(obj);
|
data.groupPlanTeamBaseVOList.push(obj);
|
||||||
@@ -774,7 +795,7 @@ export default {
|
|||||||
setDataForm() {
|
setDataForm() {
|
||||||
this.$refs.deptSelect.setID(this.dataForm.deptId);
|
this.$refs.deptSelect.setID(this.dataForm.deptId);
|
||||||
},
|
},
|
||||||
//比较时间,开始时间在结束时间前
|
//比较时间,开始时间在结束时间前
|
||||||
compareDates(date1, date2) {
|
compareDates(date1, date2) {
|
||||||
const d1 = date1;
|
const d1 = date1;
|
||||||
const d2 = date2;
|
const d2 = date2;
|
||||||
@@ -793,50 +814,56 @@ export default {
|
|||||||
this.tableData1 = [];
|
this.tableData1 = [];
|
||||||
if (this.dataForm.shiftType == 1) {
|
if (this.dataForm.shiftType == 1) {
|
||||||
const obj = {
|
const obj = {
|
||||||
|
sort: 1,
|
||||||
name: '长白班',
|
name: '长白班',
|
||||||
startTime: '08:00:00',
|
startTime: '08:00:00',
|
||||||
endTime: '17:00:00',
|
endTime: '17:00:00',
|
||||||
daySpan: 0, //是否跨天
|
daySpan: 0, //是否跨天
|
||||||
code: 1, //排版日历页面,根据这个字段显示颜色
|
code: 1, //排版日历页面,根据这个字段显示颜色
|
||||||
};
|
};
|
||||||
this.tableData1.push(obj);
|
this.tableData1.push(obj);
|
||||||
} else if (this.dataForm.shiftType == 2) {
|
} else if (this.dataForm.shiftType == 2) {
|
||||||
const obj1 = {
|
const obj1 = {
|
||||||
|
sort: 1,
|
||||||
name: '白班',
|
name: '白班',
|
||||||
startTime: '08:00:00',
|
startTime: '08:00:00',
|
||||||
endTime: '20:00:00',
|
endTime: '20:00:00',
|
||||||
daySpan: 0,
|
daySpan: 0,
|
||||||
code: 1,
|
code: 1,
|
||||||
};
|
};
|
||||||
const obj2 = {
|
const obj2 = {
|
||||||
|
sort: 2,
|
||||||
name: '夜班',
|
name: '夜班',
|
||||||
startTime: '20:00:00',
|
startTime: '20:00:00',
|
||||||
endTime: '08:00:00',
|
endTime: '08:00:00',
|
||||||
daySpan: 1,
|
daySpan: 1,
|
||||||
code: 3,
|
code: 3,
|
||||||
};
|
};
|
||||||
this.tableData1.push(obj1, obj2);
|
this.tableData1.push(obj1, obj2);
|
||||||
} else if (this.dataForm.shiftType == 3) {
|
} else if (this.dataForm.shiftType == 3) {
|
||||||
const obj1 = {
|
const obj1 = {
|
||||||
|
sort: 1,
|
||||||
name: '早班',
|
name: '早班',
|
||||||
startTime: '08:00:00',
|
startTime: '08:00:00',
|
||||||
endTime: '16:00:00',
|
endTime: '16:00:00',
|
||||||
daySpan: 0,
|
daySpan: 0,
|
||||||
code: 1,
|
code: 1,
|
||||||
};
|
};
|
||||||
const obj2 = {
|
const obj2 = {
|
||||||
|
sort: 2,
|
||||||
name: '中班',
|
name: '中班',
|
||||||
startTime: '16:00:00',
|
startTime: '16:00:00',
|
||||||
endTime: '00:00:00',
|
endTime: '00:00:00',
|
||||||
daySpan: 1,
|
daySpan: 1,
|
||||||
code: 2,
|
code: 2,
|
||||||
};
|
};
|
||||||
const obj3 = {
|
const obj3 = {
|
||||||
|
sort: 3,
|
||||||
name: '夜班',
|
name: '夜班',
|
||||||
startTime: '00:00:00',
|
startTime: '00:00:00',
|
||||||
endTime: '08:00:00',
|
endTime: '08:00:00',
|
||||||
daySpan: 0,
|
daySpan: 0,
|
||||||
code: 3,
|
code: 3,
|
||||||
};
|
};
|
||||||
this.tableData1.push(obj1, obj2, obj3);
|
this.tableData1.push(obj1, obj2, obj3);
|
||||||
}
|
}
|
||||||
@@ -859,11 +886,37 @@ export default {
|
|||||||
this.tableData2.splice(val.data._pageIndex - 1, 1);
|
this.tableData2.splice(val.data._pageIndex - 1, 1);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
//班组改变顺序
|
||||||
|
handleSort(val) {
|
||||||
|
if (val.type == 'up') {
|
||||||
|
const temp = this.tableData2[val.index];
|
||||||
|
this.tableData2.splice(val.index, 1);
|
||||||
|
let i = 0;
|
||||||
|
//如果是数组第一个,再向上则放到最后
|
||||||
|
if (val.index == 0) {
|
||||||
|
i = this.tableData2.length;
|
||||||
|
} else {
|
||||||
|
i = val.index - 1;
|
||||||
|
}
|
||||||
|
this.tableData2.splice(i, 0, temp);
|
||||||
|
} else {
|
||||||
|
const temp = this.tableData2[val.index];
|
||||||
|
this.tableData2.splice(val.index, 1);
|
||||||
|
let i = 0;
|
||||||
|
//如果是数组最后一个,再向下则放到第一个(因为先splice(val.index, 1)所以这里length不用-1)
|
||||||
|
if (val.index == this.tableData2.length) {
|
||||||
|
i = 0;
|
||||||
|
} else {
|
||||||
|
i = val.index + 1;
|
||||||
|
}
|
||||||
|
this.tableData2.splice(i, 0, temp);
|
||||||
|
}
|
||||||
|
},
|
||||||
// 新增班组
|
// 新增班组
|
||||||
addNewGroup() {
|
addNewGroup() {
|
||||||
this.addOrUpdateVisible2 = true;
|
this.addOrUpdateVisible2 = true;
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$refs.addGroupRef.init(this.dataForm.deptId,this.tableData2);
|
this.$refs.addGroupRef.init(this.dataForm.deptId, this.tableData2);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
cancel1() {
|
cancel1() {
|
||||||
@@ -886,6 +939,15 @@ export default {
|
|||||||
},
|
},
|
||||||
refreshTableData1(index, val) {
|
refreshTableData1(index, val) {
|
||||||
this.tableData1.splice(index, 1, val);
|
this.tableData1.splice(index, 1, val);
|
||||||
|
this.tableData1.sort((a, b) => {
|
||||||
|
if (a.sort === b.sort) {
|
||||||
|
return -1; // sort相等时,a排在b前面
|
||||||
|
}
|
||||||
|
return a.sort - b.sort;
|
||||||
|
});
|
||||||
|
this.tableData1.forEach((item, index) => {
|
||||||
|
item.sort = index + 1;
|
||||||
|
});
|
||||||
this.cancel1();
|
this.cancel1();
|
||||||
},
|
},
|
||||||
refreshTableData2(val) {
|
refreshTableData2(val) {
|
||||||
@@ -895,22 +957,38 @@ export default {
|
|||||||
refreshTableData3(index, val) {
|
refreshTableData3(index, val) {
|
||||||
this.tableData2[index].bindLineTree = val;
|
this.tableData2[index].bindLineTree = val;
|
||||||
let lineName = '';
|
let lineName = '';
|
||||||
lineName = this.setLineName(val, lineName);
|
lineName = this.setLineName(val);
|
||||||
if (lineName) {
|
if (lineName) {
|
||||||
this.$set(this.tableData2[index], 'lineName', lineName.slice(0, -1));
|
this.$set(this.tableData2[index], 'lineName', lineName);
|
||||||
}
|
}
|
||||||
this.cancel3();
|
this.cancel3();
|
||||||
},
|
},
|
||||||
//提取绑定的产线工段名展示出来
|
//提取绑定的产线工段名展示出来
|
||||||
setLineName(val, lineName) {
|
setLineName(val) {
|
||||||
val.forEach((item) => {
|
if (!val || val.length === 0) return '';
|
||||||
lineName += item.name + ':';
|
|
||||||
if (item.children && item.children.length > 0) {
|
const currentLevelNames = val.map((item) => item.name);
|
||||||
const childName = this.setLineName(item.children, lineName);
|
|
||||||
lineName = childName;
|
// 处理当前层级显示
|
||||||
|
let currentDisplay = '';
|
||||||
|
if (currentLevelNames.length > 1) {
|
||||||
|
currentDisplay = `(${currentLevelNames.join(' 、 ')})`;
|
||||||
|
} else {
|
||||||
|
currentDisplay = currentLevelNames[0];
|
||||||
|
}
|
||||||
|
|
||||||
|
// 查找所有子节点(取第一个有子节点的元素)
|
||||||
|
const childNode = val.find(
|
||||||
|
(item) => item.children && item.children.length > 0
|
||||||
|
);
|
||||||
|
if (childNode) {
|
||||||
|
const childPath = this.setLineName(childNode.children);
|
||||||
|
if (childPath) {
|
||||||
|
return `${currentDisplay} / ${childPath}`;
|
||||||
}
|
}
|
||||||
});
|
}
|
||||||
return lineName;
|
|
||||||
|
return currentDisplay;
|
||||||
},
|
},
|
||||||
//第三步
|
//第三步
|
||||||
// 进来加载预览排班
|
// 进来加载预览排班
|
||||||
@@ -919,6 +997,7 @@ export default {
|
|||||||
id: this.dataForm.id,
|
id: this.dataForm.id,
|
||||||
count: day,
|
count: day,
|
||||||
};
|
};
|
||||||
|
this.period = day;
|
||||||
this.tableProps3 = [];
|
this.tableProps3 = [];
|
||||||
this.tableData3 = [];
|
this.tableData3 = [];
|
||||||
getPerView(data).then((res) => {
|
getPerView(data).then((res) => {
|
||||||
@@ -946,6 +1025,7 @@ export default {
|
|||||||
label: item.day,
|
label: item.day,
|
||||||
work: item.work,
|
work: item.work,
|
||||||
subcomponent: propSpan,
|
subcomponent: propSpan,
|
||||||
|
showOverflowtooltip: true,
|
||||||
};
|
};
|
||||||
this.tableProps3.push(obj);
|
this.tableProps3.push(obj);
|
||||||
item.det.forEach((sItem, sIndex) => {
|
item.det.forEach((sItem, sIndex) => {
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
* @Author: zwq
|
* @Author: zwq
|
||||||
* @Date: 2025-10-21 14:27:23
|
* @Date: 2025-10-21 14:27:23
|
||||||
* @LastEditors: zwq
|
* @LastEditors: zwq
|
||||||
* @LastEditTime: 2025-10-21 15:02:27
|
* @LastEditTime: 2025-11-04 10:49:16
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
<template>
|
<template>
|
||||||
@@ -46,7 +46,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<span class="title">创建人:</span>
|
<span class="title">创建人:</span>
|
||||||
{{ infoData.creator }}
|
{{ infoData.creatorName }}
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<span class="title">创建时间:</span>
|
<span class="title">创建时间:</span>
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
* @Author: zwq
|
* @Author: zwq
|
||||||
* @Date: 2021-11-18 14:16:25
|
* @Date: 2021-11-18 14:16:25
|
||||||
* @LastEditors: zwq
|
* @LastEditors: zwq
|
||||||
* @LastEditTime: 2025-10-20 10:23:52
|
* @LastEditTime: 2025-11-04 14:08:47
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
<template>
|
<template>
|
||||||
@@ -15,9 +15,10 @@
|
|||||||
label-width="80px">
|
label-width="80px">
|
||||||
<el-row :gutter="20">
|
<el-row :gutter="20">
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="序号" prop="index">
|
<el-form-item label="排序" prop="sort">
|
||||||
<el-input-number
|
<el-input-number
|
||||||
v-model="dataForm.index"
|
style="width: 100%"
|
||||||
|
v-model="dataForm.sort"
|
||||||
:step="1"
|
:step="1"
|
||||||
:min="1"
|
:min="1"
|
||||||
step-strictly />
|
step-strictly />
|
||||||
@@ -38,7 +39,8 @@
|
|||||||
format="H:mm"
|
format="H:mm"
|
||||||
value-format="HH:mm:ss"
|
value-format="HH:mm:ss"
|
||||||
v-model="dataForm.startTime"
|
v-model="dataForm.startTime"
|
||||||
placeholder="选择日期时间"></el-time-picker>
|
@change="timeFun('start')"
|
||||||
|
placeholder="选择时间"></el-time-picker>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
@@ -48,7 +50,19 @@
|
|||||||
format="H:mm"
|
format="H:mm"
|
||||||
value-format="HH:mm:ss"
|
value-format="HH:mm:ss"
|
||||||
v-model="dataForm.endTime"
|
v-model="dataForm.endTime"
|
||||||
placeholder="选择日期时间"></el-time-picker>
|
@change="timeFun('end')"
|
||||||
|
placeholder="选择时间"></el-time-picker>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="是否跨天" prop="daySpan">
|
||||||
|
<el-switch
|
||||||
|
v-model="dataForm.daySpan"
|
||||||
|
disabled
|
||||||
|
:active-value="1"
|
||||||
|
:inactive-value="0"
|
||||||
|
active-text="隔天"
|
||||||
|
inactive-text="当天"></el-switch>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
@@ -70,15 +84,17 @@ export default {
|
|||||||
return {
|
return {
|
||||||
dataForm: {
|
dataForm: {
|
||||||
id: undefined,
|
id: undefined,
|
||||||
index: undefined,
|
sort: undefined,
|
||||||
name: undefined,
|
name: undefined,
|
||||||
startTime: undefined,
|
startTime: undefined,
|
||||||
endTime: undefined,
|
endTime: undefined,
|
||||||
|
daySpan: 0,
|
||||||
|
code: 1,
|
||||||
remark: undefined,
|
remark: undefined,
|
||||||
},
|
},
|
||||||
_pageIndex: 1,
|
_pageIndex: 1,
|
||||||
dataRule: {
|
dataRule: {
|
||||||
index: [{ required: true, message: '序号不能为空', trigger: 'blur' }],
|
sort: [{ required: true, message: '排序不能为空', trigger: 'blur' }],
|
||||||
name: [
|
name: [
|
||||||
{ required: true, message: '班次名称不能为空', trigger: 'blur' },
|
{ required: true, message: '班次名称不能为空', trigger: 'blur' },
|
||||||
],
|
],
|
||||||
@@ -93,13 +109,31 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
init(val) {
|
init(val) {
|
||||||
this._pageIndex = val._pageIndex-1;
|
this._pageIndex = val._pageIndex - 1;
|
||||||
this.dataForm.index = val._pageIndex || 1;
|
this.dataForm.sort = val._pageIndex || 1;
|
||||||
this.dataForm.name = val.name || undefined;
|
this.dataForm.name = val.name || undefined;
|
||||||
this.dataForm.startTime = val.startTime || undefined;
|
this.dataForm.startTime = val.startTime || undefined;
|
||||||
this.dataForm.endTime = val.endTime || undefined;
|
this.dataForm.endTime = val.endTime || undefined;
|
||||||
this.dataForm.remark = val.remark || undefined;
|
this.dataForm.remark = val.remark || undefined;
|
||||||
|
this.dataForm.daySpan = val.daySpan || 0;
|
||||||
|
this.dataForm.code = val.code || 1;
|
||||||
},
|
},
|
||||||
|
timeFun(val) {
|
||||||
|
if (this.dataForm.startTime && this.dataForm.endTime) {
|
||||||
|
if (this.dataForm.startTime > this.dataForm.endTime) {
|
||||||
|
this.dataForm.daySpan = 1
|
||||||
|
} else if (this.dataForm.startTime < this.dataForm.endTime) {
|
||||||
|
this.dataForm.daySpan = 0
|
||||||
|
} else {
|
||||||
|
if (val === 'start') {
|
||||||
|
this.dataForm.startTime = ''
|
||||||
|
} else {
|
||||||
|
this.dataForm.endTime = ''
|
||||||
|
}
|
||||||
|
this.$modal.msgWarning('班次开始时间和结束时间不能相同')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
// 表单提交
|
// 表单提交
|
||||||
dataFormSubmit() {
|
dataFormSubmit() {
|
||||||
this.$refs['dataForm'].validate((valid) => {
|
this.$refs['dataForm'].validate((valid) => {
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
<!--
|
<!--
|
||||||
* @Author: zwq
|
* @Author: zwq
|
||||||
* @Date: 2025-10-11 14:27:37
|
* @Date: 2025-10-13 15:07:24
|
||||||
* @LastEditors: zwq
|
* @LastEditors: zwq
|
||||||
* @LastEditTime: 2025-10-29 14:50:16
|
* @LastEditTime: 2025-11-05 08:51:13
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
<template>
|
<template>
|
||||||
@@ -31,12 +31,14 @@
|
|||||||
<el-form-item label="开始时间" prop="startDay">
|
<el-form-item label="开始时间" prop="startDay">
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
v-model="formInline.startDay"
|
v-model="formInline.startDay"
|
||||||
|
size="small"
|
||||||
type="datetime"
|
type="datetime"
|
||||||
placeholder="选择日期时间"></el-date-picker>
|
placeholder="选择日期时间"></el-date-picker>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="结束时间" prop="endDay">
|
<el-form-item label="结束时间" prop="endDay">
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
v-model="formInline.endDay"
|
v-model="formInline.endDay"
|
||||||
|
size="small"
|
||||||
type="datetime"
|
type="datetime"
|
||||||
placeholder="选择日期时间"></el-date-picker>
|
placeholder="选择日期时间"></el-date-picker>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@@ -46,8 +48,12 @@
|
|||||||
ref="deptSelect"
|
ref="deptSelect"
|
||||||
@DeptId="setDeptId"></dept-select>
|
@DeptId="setDeptId"></dept-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="状态" prop="leaderName">
|
<el-form-item label="状态" prop="status">
|
||||||
<el-select v-model="formInline.status" placeholder="请选择状态">
|
<el-select
|
||||||
|
v-model="formInline.status"
|
||||||
|
size="small"
|
||||||
|
clearable
|
||||||
|
placeholder="请选择状态">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in options"
|
v-for="item in options"
|
||||||
:key="item.value"
|
:key="item.value"
|
||||||
@@ -65,7 +71,8 @@
|
|||||||
</el-button>
|
</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<span class="separateStyle"
|
<span
|
||||||
|
class="separateStyle"
|
||||||
v-hasPermi="['base:group-scheduling-plan:query']"></span>
|
v-hasPermi="['base:group-scheduling-plan:query']"></span>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
@@ -74,7 +81,8 @@
|
|||||||
</el-button>
|
</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<span class="separateStyle"
|
<span
|
||||||
|
class="separateStyle"
|
||||||
v-hasPermi="['base:group-scheduling-plan:create']"></span>
|
v-hasPermi="['base:group-scheduling-plan:create']"></span>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
@@ -87,6 +95,17 @@
|
|||||||
新增
|
新增
|
||||||
</el-button>
|
</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item>
|
||||||
|
<el-button
|
||||||
|
type="warning"
|
||||||
|
plain
|
||||||
|
size="small"
|
||||||
|
@click="handleExport"
|
||||||
|
:loading="exportLoading"
|
||||||
|
v-hasPermi="['base:group-scheduling-plan:export']">
|
||||||
|
导出
|
||||||
|
</el-button>
|
||||||
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</div>
|
</div>
|
||||||
<base-table
|
<base-table
|
||||||
@@ -201,6 +220,7 @@ import {
|
|||||||
copyPlan,
|
copyPlan,
|
||||||
disablePlan,
|
disablePlan,
|
||||||
updateScheduleLater,
|
updateScheduleLater,
|
||||||
|
exportExcel,
|
||||||
} from '@/api/group/Schedule';
|
} from '@/api/group/Schedule';
|
||||||
|
|
||||||
const tableProps = [
|
const tableProps = [
|
||||||
@@ -268,91 +288,97 @@ export default {
|
|||||||
},
|
},
|
||||||
tableProps,
|
tableProps,
|
||||||
tableBtn: [
|
tableBtn: [
|
||||||
this.$auth.hasPermi('base:group-scheduling-plan:update')?
|
this.$auth.hasPermi('base:group-scheduling-plan:update')
|
||||||
{
|
? {
|
||||||
type: 'edit',
|
type: 'edit',
|
||||||
btnName: '编辑',
|
btnName: '编辑',
|
||||||
showParam: {
|
showParam: {
|
||||||
type: '&',
|
type: '&',
|
||||||
data: [
|
data: [
|
||||||
{
|
{
|
||||||
type: 'equal',
|
type: 'equal',
|
||||||
name: 'status',
|
name: 'status',
|
||||||
value: 1,
|
value: 1,
|
||||||
|
},
|
||||||
|
],
|
||||||
},
|
},
|
||||||
],
|
}
|
||||||
},
|
: undefined,
|
||||||
}:undefined,
|
this.$auth.hasPermi('base:group-scheduling-plan:delete')
|
||||||
this.$auth.hasPermi('base:group-scheduling-plan:delete')?
|
? {
|
||||||
{
|
type: 'delete',
|
||||||
type: 'delete',
|
btnName: '删除',
|
||||||
btnName: '删除',
|
showParam: {
|
||||||
showParam: {
|
type: '&',
|
||||||
type: '&',
|
data: [
|
||||||
data: [
|
{
|
||||||
{
|
type: 'equal',
|
||||||
type: 'equal',
|
name: 'status',
|
||||||
name: 'status',
|
value: 1,
|
||||||
value: 1,
|
},
|
||||||
|
],
|
||||||
},
|
},
|
||||||
],
|
}
|
||||||
},
|
: undefined,
|
||||||
}:undefined,
|
this.$auth.hasPermi('base:group-scheduling-plan:query')
|
||||||
this.$auth.hasPermi('base:group-scheduling-plan:query')?
|
? {
|
||||||
{
|
type: 'detail',
|
||||||
type: 'detail',
|
btnName: '查看',
|
||||||
btnName: '查看',
|
showParam: {
|
||||||
showParam: {
|
type: '&',
|
||||||
type: '&',
|
data: [
|
||||||
data: [
|
{
|
||||||
{
|
type: 'unequal',
|
||||||
type: 'unequal',
|
name: 'status',
|
||||||
name: 'status',
|
value: 1,
|
||||||
value: 1,
|
},
|
||||||
|
],
|
||||||
},
|
},
|
||||||
],
|
}
|
||||||
},
|
: undefined,
|
||||||
}:undefined,
|
this.$auth.hasPermi('base:group-scheduling-plan:delete')
|
||||||
this.$auth.hasPermi('base:group-scheduling-plan:delete')?
|
? {
|
||||||
{
|
type: 'cancel',
|
||||||
type: 'cancel',
|
btnName: '作废',
|
||||||
btnName: '作废',
|
showParam: {
|
||||||
showParam: {
|
type: '&',
|
||||||
type: '&',
|
data: [
|
||||||
data: [
|
{
|
||||||
{
|
type: 'equal',
|
||||||
type: 'equal',
|
name: 'status',
|
||||||
name: 'status',
|
value: 2,
|
||||||
value: 2,
|
},
|
||||||
|
],
|
||||||
},
|
},
|
||||||
],
|
}
|
||||||
},
|
: undefined,
|
||||||
}:undefined,
|
this.$auth.hasPermi('base:group-holiday:update')
|
||||||
this.$auth.hasPermi('base:group-holiday:update')?
|
? {
|
||||||
{
|
type: 'sync',
|
||||||
type: 'sync',
|
btnName: '同步节假日',
|
||||||
btnName: '同步节假日',
|
showParam: {
|
||||||
showParam: {
|
type: '&',
|
||||||
type: '&',
|
data: [
|
||||||
data: [
|
{
|
||||||
{
|
type: 'equal',
|
||||||
type: 'equal',
|
name: 'status',
|
||||||
name: 'status',
|
value: 2,
|
||||||
value: 2,
|
},
|
||||||
|
{
|
||||||
|
type: 'equal',
|
||||||
|
name: 'updateFlag',
|
||||||
|
value: true,
|
||||||
|
},
|
||||||
|
],
|
||||||
},
|
},
|
||||||
{
|
}
|
||||||
type: 'equal',
|
: undefined,
|
||||||
name: 'updateFlag',
|
this.$auth.hasPermi('base:group-scheduling-plan:create')
|
||||||
value: true,
|
? {
|
||||||
},
|
type: 'copy',
|
||||||
],
|
btnName: '复制',
|
||||||
},
|
}
|
||||||
}:undefined,
|
: undefined,
|
||||||
this.$auth.hasPermi('base:group-scheduling-plan:create')?
|
|
||||||
{
|
|
||||||
type: 'copy',
|
|
||||||
btnName: '复制',
|
|
||||||
}:undefined,
|
|
||||||
].filter((v) => v),
|
].filter((v) => v),
|
||||||
tableData: [],
|
tableData: [],
|
||||||
options: [
|
options: [
|
||||||
@@ -379,12 +405,14 @@ export default {
|
|||||||
},
|
},
|
||||||
stepNum: 1, // 新增编辑时当前第几步
|
stepNum: 1, // 新增编辑时当前第几步
|
||||||
detailVisible: false,
|
detailVisible: false,
|
||||||
|
// 导出遮罩层
|
||||||
|
exportLoading: false,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
AddOrUpdate,
|
AddOrUpdate,
|
||||||
deptSelect,
|
deptSelect,
|
||||||
detail
|
detail,
|
||||||
},
|
},
|
||||||
created() {},
|
created() {},
|
||||||
methods: {
|
methods: {
|
||||||
@@ -411,7 +439,7 @@ export default {
|
|||||||
this.formInline.code = null;
|
this.formInline.code = null;
|
||||||
this.formInline.deptId = null;
|
this.formInline.deptId = null;
|
||||||
this.$refs.deptSelect.clear();
|
this.$refs.deptSelect.clear();
|
||||||
this.formInline.leaderName = null;
|
this.formInline.status = null;
|
||||||
this.listQuery = {
|
this.listQuery = {
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
pageNo: 1,
|
pageNo: 1,
|
||||||
@@ -474,23 +502,44 @@ export default {
|
|||||||
} else if (val.type === 'cancel') {
|
} else if (val.type === 'cancel') {
|
||||||
disablePlan(val.data.id).then((res) => {
|
disablePlan(val.data.id).then((res) => {
|
||||||
this.$modal.msgSuccess('作废成功');
|
this.$modal.msgSuccess('作废成功');
|
||||||
this.getDataList()
|
this.getDataList();
|
||||||
});
|
});
|
||||||
} else if (val.type === 'sync') {
|
} else if (val.type === 'sync') {
|
||||||
updateScheduleLater({ planId: val.data.id }).then((res) => {
|
updateScheduleLater({
|
||||||
|
planId: val.data.id,
|
||||||
|
logId: val.data.updateLogId,
|
||||||
|
}).then((res) => {
|
||||||
this.$modal.msgSuccess('同步节假日成功');
|
this.$modal.msgSuccess('同步节假日成功');
|
||||||
this.getDataList()
|
this.getDataList();
|
||||||
});
|
});
|
||||||
} else if (val.type === 'copy') {
|
} else if (val.type === 'copy') {
|
||||||
copyPlan(val.data.id).then((res) => {
|
copyPlan(val.data.id).then((res) => {
|
||||||
this.$modal.msgSuccess('复制成功');
|
this.$modal.msgSuccess('复制成功');
|
||||||
this.getDataList()
|
this.getDataList();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
detailCancel() {
|
detailCancel() {
|
||||||
this.detailVisible = false;
|
this.detailVisible = false;
|
||||||
},
|
},
|
||||||
|
/** 导出按钮操作 */
|
||||||
|
handleExport() {
|
||||||
|
// 处理查询参数
|
||||||
|
let params = { ...this.formInline };
|
||||||
|
params.pageNo = undefined;
|
||||||
|
params.pageSize = undefined;
|
||||||
|
this.$modal
|
||||||
|
.confirm('是否确认导出所有数据项?')
|
||||||
|
.then(() => {
|
||||||
|
this.exportLoading = true;
|
||||||
|
return exportExcel(params);
|
||||||
|
})
|
||||||
|
.then((response) => {
|
||||||
|
this.$download.excel(response, '排班计划.xls');
|
||||||
|
this.exportLoading = false;
|
||||||
|
})
|
||||||
|
.catch(() => {});
|
||||||
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
44
src/views/group/Schedule/sortSet.vue
Normal file
@@ -0,0 +1,44 @@
|
|||||||
|
<!--
|
||||||
|
* @Author: zwq
|
||||||
|
* @Date: 2025-10-13 16:40:08
|
||||||
|
* @LastEditors: zwq
|
||||||
|
* @LastEditTime: 2025-11-04 16:08:57
|
||||||
|
* @Description:
|
||||||
|
-->
|
||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<el-button type="text" size="mini" @click="moveUp()" style="display:inline-block">↑</el-button>
|
||||||
|
<el-button type="text" size="mini" @click="moveDown()" style="display:inline-block;float:right">↓</el-button>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
props: {
|
||||||
|
injectData: {
|
||||||
|
type: Object,
|
||||||
|
default: () => ({}),
|
||||||
|
},
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {};
|
||||||
|
},
|
||||||
|
created() {},
|
||||||
|
methods: {
|
||||||
|
moveUp() {
|
||||||
|
const val = {
|
||||||
|
type: 'up',
|
||||||
|
index: this.injectData._pageIndex - 1,
|
||||||
|
};
|
||||||
|
this.$emit('emitData', val);
|
||||||
|
},
|
||||||
|
moveDown() {
|
||||||
|
const val = {
|
||||||
|
type: 'down',
|
||||||
|
index: this.injectData._pageIndex - 1,
|
||||||
|
};
|
||||||
|
this.$emit('emitData', val);
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
@@ -2,13 +2,13 @@
|
|||||||
* @Author: zwq
|
* @Author: zwq
|
||||||
* @Date: 2025-10-13 16:18:41
|
* @Date: 2025-10-13 16:18:41
|
||||||
* @LastEditors: zwq
|
* @LastEditors: zwq
|
||||||
* @LastEditTime: 2025-10-20 10:13:26
|
* @LastEditTime: 2025-11-04 10:54:19
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
<template>
|
<template>
|
||||||
<span>
|
<span>
|
||||||
{{
|
{{
|
||||||
injectData.shiftSustainedNum +
|
(injectData.shiftSustainedNum?injectData.shiftSustainedNum:'') +
|
||||||
(injectData.shiftSustainedType
|
(injectData.shiftSustainedType
|
||||||
? ['', '日', '周', '月', '季'][injectData.shiftSustainedType]
|
? ['', '日', '周', '月', '季'][injectData.shiftSustainedType]
|
||||||
: '')
|
: '')
|
||||||
|
|||||||
@@ -48,7 +48,6 @@ export default {
|
|||||||
this.deptId = id;
|
this.deptId = id;
|
||||||
},
|
},
|
||||||
clear() {
|
clear() {
|
||||||
console.log(this.$refs.treeselect);
|
|
||||||
this.$refs.treeselect.clear();
|
this.$refs.treeselect.clear();
|
||||||
},
|
},
|
||||||
// 格式化部门的下拉框
|
// 格式化部门的下拉框
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
* @Author: zwq
|
* @Author: zwq
|
||||||
* @Date: 2021-11-18 14:16:25
|
* @Date: 2021-11-18 14:16:25
|
||||||
* @LastEditors: zwq
|
* @LastEditors: zwq
|
||||||
* @LastEditTime: 2025-10-29 14:47:33
|
* @LastEditTime: 2025-10-31 15:47:16
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
<template>
|
<template>
|
||||||
@@ -31,10 +31,11 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item label="部门">
|
<el-form-item label="部门" prop="deptId">
|
||||||
<dept-select
|
<dept-select
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
ref="deptSelect"
|
ref="deptSelect"
|
||||||
|
v-model="dataForm.deptId"
|
||||||
@DeptId="setDeptId"></dept-select>
|
@DeptId="setDeptId"></dept-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
@@ -44,7 +45,7 @@
|
|||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
v-model="dataForm.leaderId"
|
v-model="dataForm.leaderId"
|
||||||
@change="setLeaderName"
|
@change="setLeaderName"
|
||||||
filterable
|
filterable
|
||||||
placeholder="请选择组长">
|
placeholder="请选择组长">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in leaderArr"
|
v-for="item in leaderArr"
|
||||||
@@ -59,7 +60,7 @@
|
|||||||
<el-input
|
<el-input
|
||||||
v-model="dataForm.leaderPhone"
|
v-model="dataForm.leaderPhone"
|
||||||
clearable
|
clearable
|
||||||
maxlength="11"
|
maxlength="11"
|
||||||
placeholder="请输入组长电话" />
|
placeholder="请输入组长电话" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
@@ -137,7 +138,7 @@ export default {
|
|||||||
num: undefined,
|
num: undefined,
|
||||||
remark: undefined,
|
remark: undefined,
|
||||||
},
|
},
|
||||||
setData: true,
|
setData: true,
|
||||||
leaderArr: [],
|
leaderArr: [],
|
||||||
options: [
|
options: [
|
||||||
{
|
{
|
||||||
@@ -156,19 +157,23 @@ export default {
|
|||||||
name: [
|
name: [
|
||||||
{ required: true, message: '班组名称不能为空', trigger: 'blur' },
|
{ required: true, message: '班组名称不能为空', trigger: 'blur' },
|
||||||
],
|
],
|
||||||
|
deptId: [
|
||||||
|
{ required: true, message: '部门不能为空', trigger: 'blur' },
|
||||||
|
],
|
||||||
leaderId: [
|
leaderId: [
|
||||||
{ required: true, message: '组长不能为空', trigger: 'change' },
|
{ required: true, message: '组长不能为空', trigger: 'change' },
|
||||||
],
|
],
|
||||||
isProduction: [
|
isProduction: [
|
||||||
{ required: true, message: '生产班组不能为空', trigger: 'change' },
|
{ required: true, message: '生产班组不能为空', trigger: 'change' },
|
||||||
],
|
],
|
||||||
leaderPhone: [
|
leaderPhone: [
|
||||||
{
|
{
|
||||||
pattern: /^(?:(?:\+|00)86)?1(?:3[\d]|4[5-79]|5[0-35-9]|6[5-7]|7[0-8]|8[\d]|9[189])\d{8}$/,
|
pattern:
|
||||||
message: "请输入正确的手机号码",
|
/^(?:(?:\+|00)86)?1(?:3[\d]|4[5-79]|5[0-35-9]|6[5-7]|7[0-8]|8[\d]|9[189])\d{8}$/,
|
||||||
trigger: "blur"
|
message: '请输入正确的手机号码',
|
||||||
}
|
trigger: 'blur',
|
||||||
]
|
},
|
||||||
|
],
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
@@ -184,9 +189,9 @@ export default {
|
|||||||
})
|
})
|
||||||
.catch(() => {});
|
.catch(() => {});
|
||||||
},
|
},
|
||||||
setDataForm(){
|
setDataForm() {
|
||||||
this.$refs.deptSelect.setID(this.dataForm.deptId)
|
this.$refs.deptSelect.setID(this.dataForm.deptId);
|
||||||
},
|
},
|
||||||
setLeaderName(val) {
|
setLeaderName(val) {
|
||||||
this.leaderArr.map((item) => {
|
this.leaderArr.map((item) => {
|
||||||
if (val === item.id) {
|
if (val === item.id) {
|
||||||
@@ -194,33 +199,33 @@ export default {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 表单提交
|
// 表单提交
|
||||||
dataFormSubmit() {
|
dataFormSubmit() {
|
||||||
this.$refs["dataForm"].validate((valid) => {
|
this.$refs['dataForm'].validate((valid) => {
|
||||||
if (!valid) {
|
if (!valid) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if(!this.dataForm.deptId){
|
if (!this.dataForm.deptId) {
|
||||||
this.$message('部门不能为空');
|
this.$message('部门不能为空');
|
||||||
return
|
return;
|
||||||
}
|
}
|
||||||
// 修改的提交
|
// 修改的提交
|
||||||
if (this.dataForm.id) {
|
if (this.dataForm.id) {
|
||||||
this.urlOptions.updateURL(this.dataForm).then(response => {
|
this.urlOptions.updateURL(this.dataForm).then((response) => {
|
||||||
this.$modal.msgSuccess("修改成功");
|
this.$modal.msgSuccess('修改成功');
|
||||||
this.visible = false;
|
this.visible = false;
|
||||||
this.$emit("refreshDataList");
|
this.$emit('refreshDataList');
|
||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// 添加的提交
|
// 添加的提交
|
||||||
this.urlOptions.createURL(this.dataForm).then(response => {
|
this.urlOptions.createURL(this.dataForm).then((response) => {
|
||||||
this.$modal.msgSuccess("新增成功");
|
this.$modal.msgSuccess('新增成功');
|
||||||
this.visible = false;
|
this.visible = false;
|
||||||
this.$emit("refreshDataList");
|
this.$emit('refreshDataList');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
* @Author: zwq
|
* @Author: zwq
|
||||||
* @Date: 2021-11-18 14:16:25
|
* @Date: 2021-11-18 14:16:25
|
||||||
* @LastEditors: zwq
|
* @LastEditors: zwq
|
||||||
* @LastEditTime: 2025-10-23 13:29:58
|
* @LastEditTime: 2025-11-05 13:43:53
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
<template>
|
<template>
|
||||||
@@ -18,6 +18,7 @@
|
|||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="节假日名称" prop="name">
|
<el-form-item label="节假日名称" prop="name">
|
||||||
<el-input
|
<el-input
|
||||||
|
ref="inputWidth"
|
||||||
v-model="dataForm.name"
|
v-model="dataForm.name"
|
||||||
clearable
|
clearable
|
||||||
:disabled="detail"
|
:disabled="detail"
|
||||||
@@ -54,7 +55,7 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item
|
<el-form-item
|
||||||
v-if="dataForm.dateType == 1"
|
v-if="dataForm.dateType == 1 && dataForm.calendarType == 1"
|
||||||
label="日期"
|
label="日期"
|
||||||
prop="dateDay">
|
prop="dateDay">
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
@@ -66,9 +67,13 @@
|
|||||||
placeholder="选择日期"
|
placeholder="选择日期"
|
||||||
format="yyyy-MM-dd"
|
format="yyyy-MM-dd"
|
||||||
value-format="--MM-dd"
|
value-format="--MM-dd"
|
||||||
|
@blur="$forceUpdate()"
|
||||||
:picker-options="pickerOptions"></el-date-picker>
|
:picker-options="pickerOptions"></el-date-picker>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item v-else label="日期" prop="dateDayArr">
|
<el-form-item
|
||||||
|
v-else-if="dataForm.dateType == 2 && dataForm.calendarType == 1"
|
||||||
|
label="日期"
|
||||||
|
prop="dateDayArr">
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
:disabled="detail"
|
:disabled="detail"
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
@@ -80,8 +85,53 @@
|
|||||||
range-separator="至"
|
range-separator="至"
|
||||||
start-placeholder="开始日期"
|
start-placeholder="开始日期"
|
||||||
end-placeholder="结束日期"
|
end-placeholder="结束日期"
|
||||||
|
@blur="$forceUpdate()"
|
||||||
:picker-options="pickerOptions"></el-date-picker>
|
:picker-options="pickerOptions"></el-date-picker>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item
|
||||||
|
v-else-if="dataForm.dateType == 1 && dataForm.calendarType == 2"
|
||||||
|
label="日期"
|
||||||
|
prop="dateDayChinese">
|
||||||
|
<j-date-picker
|
||||||
|
ref="JDatePicker1"
|
||||||
|
style="line-height: 18px"
|
||||||
|
v-model="dataForm.dateDayChinese"
|
||||||
|
id="value1"
|
||||||
|
:width="width1"
|
||||||
|
:placeholder="placeholder"
|
||||||
|
:picker-options="pickerOptions"
|
||||||
|
:rangeSeparator="rangeSeparator"
|
||||||
|
@change="onDateChange"
|
||||||
|
:disabled="detail"
|
||||||
|
:showLunarClass="showLunarClass"
|
||||||
|
:showLunarControl="showLunarControl"
|
||||||
|
type="DATE"
|
||||||
|
:showBackYears="showBackYears"
|
||||||
|
:showLunarIcon="showLunarIcon"
|
||||||
|
:format="format"></j-date-picker>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item
|
||||||
|
v-else-if="dataForm.dateType == 2 && dataForm.calendarType == 2"
|
||||||
|
label="日期"
|
||||||
|
prop="dateDayArrChinese">
|
||||||
|
<j-date-picker
|
||||||
|
style="line-height: 18px"
|
||||||
|
ref="JDatePicker2"
|
||||||
|
v-model="dataForm.dateDayArrChinese"
|
||||||
|
id="value2"
|
||||||
|
:width="width1"
|
||||||
|
:placeholder="placeholder"
|
||||||
|
:picker-options="pickerOptions"
|
||||||
|
:rangeSeparator="rangeSeparator"
|
||||||
|
@change="onDateChange"
|
||||||
|
:disabled="detail"
|
||||||
|
:showLunarClass="showLunarClass"
|
||||||
|
:showLunarControl="showLunarControl"
|
||||||
|
type="DATERANGE"
|
||||||
|
:showBackYears="showBackYears"
|
||||||
|
:showLunarIcon="showLunarIcon"
|
||||||
|
:format="format"></j-date-picker>
|
||||||
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="是否每年重复" prop="repeat">
|
<el-form-item label="是否每年重复" prop="repeat">
|
||||||
@@ -131,6 +181,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import JDatePicker from 'vue-jlunar-datepicker';
|
||||||
import {
|
import {
|
||||||
createHoliday,
|
createHoliday,
|
||||||
updateHoliday,
|
updateHoliday,
|
||||||
@@ -141,7 +192,9 @@ import {
|
|||||||
} from '@/api/group/holidaySetting';
|
} from '@/api/group/holidaySetting';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {},
|
components: {
|
||||||
|
JDatePicker,
|
||||||
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
dataForm: {
|
dataForm: {
|
||||||
@@ -151,6 +204,10 @@ export default {
|
|||||||
dateType: 1,
|
dateType: 1,
|
||||||
dateDay: undefined,
|
dateDay: undefined,
|
||||||
dateDayArr: [],
|
dateDayArr: [],
|
||||||
|
dateDayChinese: undefined,
|
||||||
|
dateDayArrChinese: [],
|
||||||
|
noRepeatYear: undefined,
|
||||||
|
noRepeatYearChinese: undefined,
|
||||||
repeat: true,
|
repeat: true,
|
||||||
inherited: true, // 是否为继承
|
inherited: true, // 是否为继承
|
||||||
deptId: undefined,
|
deptId: undefined,
|
||||||
@@ -202,6 +259,12 @@ export default {
|
|||||||
dateDayArr: [
|
dateDayArr: [
|
||||||
{ required: true, message: '日期不能为空', trigger: 'change' },
|
{ required: true, message: '日期不能为空', trigger: 'change' },
|
||||||
],
|
],
|
||||||
|
dateDayChinese: [
|
||||||
|
{ required: true, message: '日期不能为空', trigger: 'change' },
|
||||||
|
],
|
||||||
|
dateDayArrChinese: [
|
||||||
|
{ required: true, message: '日期不能为空', trigger: 'change' },
|
||||||
|
],
|
||||||
repeat: [
|
repeat: [
|
||||||
{
|
{
|
||||||
required: true,
|
required: true,
|
||||||
@@ -216,12 +279,61 @@ export default {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
dialogVisible: false,
|
dialogVisible: false,
|
||||||
|
//农历组件数据
|
||||||
|
showLunarClass: 'LUNAR', //农历日期的展示类型 MIX(混合)FULLLUNAR(全农历)LUNAR(农历)NUMBER(数字)
|
||||||
|
showBackYears: 2, //向后展示年数;见于年份列表;
|
||||||
|
showLunarIcon: true, //是否显示农历控制组件
|
||||||
|
showLunarControl: false, //是否显示农历控制组件
|
||||||
|
width1: '300', //这个设置成100%,原组件写死了px需要修改
|
||||||
|
format: 'yyyy-MM-dd',
|
||||||
|
placeholder: '',
|
||||||
|
rangeSeparator: '-',
|
||||||
|
editable: true,
|
||||||
|
clearable: true,
|
||||||
|
pickerOptions: {
|
||||||
|
disabledDate(time) {
|
||||||
|
return time.getTime() < Date.now() - 8.64e7;
|
||||||
|
},
|
||||||
|
},
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
||||||
|
watch: {
|
||||||
|
'dataForm.calendarType': function (newValue, oldValue) {
|
||||||
|
this.$nextTick(() => {
|
||||||
|
if (this.$refs.JDatePicker1) {
|
||||||
|
this.$refs.JDatePicker1.isLunar = true; //默认转为农历
|
||||||
|
this.$refs.JDatePicker1.onLunarChange();
|
||||||
|
}
|
||||||
|
if (this.$refs.JDatePicker2) {
|
||||||
|
this.$refs.JDatePicker2.isLunar = true;
|
||||||
|
this.$refs.JDatePicker2.onLunarChange();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
'dataForm.dateType': function (newValue, oldValue) {
|
||||||
|
this.$nextTick(() => {
|
||||||
|
if (this.$refs.JDatePicker1) {
|
||||||
|
this.$refs.JDatePicker1.isLunar = true; //默认转为农历
|
||||||
|
this.$refs.JDatePicker1.onLunarChange();
|
||||||
|
}
|
||||||
|
if (this.$refs.JDatePicker2) {
|
||||||
|
this.$refs.JDatePicker2.isLunar = true;
|
||||||
|
this.$refs.JDatePicker2.onLunarChange();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.width1 = this.$refs.inputWidth.$el.offsetWidth + '';
|
||||||
|
});
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
init(deptId, id, detail) {
|
init(deptId, val, detail) {
|
||||||
this.dataForm.deptId = deptId || undefined;
|
this.dataForm.deptId = deptId || undefined;
|
||||||
this.dataForm.id = id || undefined;
|
this.dataForm.id = val.holidayId || undefined;
|
||||||
|
this.dataForm.inherited = val.isInherit || false;
|
||||||
this.detail = detail || false;
|
this.detail = detail || false;
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$refs['dataForm'].resetFields();
|
this.$refs['dataForm'].resetFields();
|
||||||
@@ -245,14 +357,21 @@ export default {
|
|||||||
this.dataForm.dateType == 1 &&
|
this.dataForm.dateType == 1 &&
|
||||||
this.dataForm.calendarType == 2
|
this.dataForm.calendarType == 2
|
||||||
) {
|
) {
|
||||||
this.dataForm.dateDay = this.dataForm.oneDayChinese;
|
this.dataForm.dateDayChinese =
|
||||||
|
'L' +
|
||||||
|
new Date().getFullYear() +
|
||||||
|
this.dataForm.oneDayChinese.slice(-6);
|
||||||
} else if (
|
} else if (
|
||||||
this.dataForm.dateType == 2 &&
|
this.dataForm.dateType == 2 &&
|
||||||
this.dataForm.calendarType == 2
|
this.dataForm.calendarType == 2
|
||||||
) {
|
) {
|
||||||
this.dataForm.dateDayArr = [
|
this.dataForm.dateDayArrChinese = [
|
||||||
this.dataForm.startDayChinese,
|
'L' +
|
||||||
this.dataForm.endDayChinese,
|
new Date().getFullYear() +
|
||||||
|
this.dataForm.startDayChinese.slice(-6),
|
||||||
|
'L' +
|
||||||
|
new Date().getFullYear() +
|
||||||
|
this.dataForm.endDayChinese.slice(-6),
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -307,10 +426,13 @@ export default {
|
|||||||
this.$modal.msgSuccess('删除成功');
|
this.$modal.msgSuccess('删除成功');
|
||||||
updateSchedule({ logId: res.data.logId }).then((res1) => {
|
updateSchedule({ logId: res.data.logId }).then((res1) => {
|
||||||
this.$modal.msgSuccess('更新成功');
|
this.$modal.msgSuccess('更新成功');
|
||||||
this.$emit('refreshPage');
|
|
||||||
});
|
});
|
||||||
|
this.$emit('refreshPage');
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
onDateChange(val) {
|
||||||
|
console.log(val);
|
||||||
|
},
|
||||||
// 表单提交
|
// 表单提交
|
||||||
dataFormSubmit() {
|
dataFormSubmit() {
|
||||||
this.$refs['dataForm'].validate((valid) => {
|
this.$refs['dataForm'].validate((valid) => {
|
||||||
@@ -329,25 +451,57 @@ export default {
|
|||||||
this.dataForm.dateType == 1 &&
|
this.dataForm.dateType == 1 &&
|
||||||
this.dataForm.calendarType == 2
|
this.dataForm.calendarType == 2
|
||||||
) {
|
) {
|
||||||
this.dataForm.oneDayChinese = this.dataForm.dateDay;
|
this.dataForm.oneDayChinese =
|
||||||
|
'--' + this.dataForm.dateDayChinese.slice(-5);
|
||||||
} else if (
|
} else if (
|
||||||
this.dataForm.dateType == 2 &&
|
this.dataForm.dateType == 2 &&
|
||||||
this.dataForm.calendarType == 2
|
this.dataForm.calendarType == 2
|
||||||
) {
|
) {
|
||||||
this.dataForm.startDayChinese = this.dataForm.dateDayArr[0];
|
this.dataForm.startDayChinese =
|
||||||
this.dataForm.endDayChinese = this.dataForm.dateDayArr[1];
|
'--' + this.dataForm.dateDayArrChinese[0].slice(-5);
|
||||||
|
this.dataForm.endDayChinese =
|
||||||
|
'--' + this.dataForm.dateDayArrChinese[1].slice(-5);
|
||||||
|
}
|
||||||
|
if (this.dataForm.calendarType == 1 && !this.dataForm.repeat) {
|
||||||
|
this.dataForm.noRepeatYear = new Date().getFullYear();
|
||||||
|
} else if (this.dataForm.calendarType == 2 && !this.dataForm.repeat) {
|
||||||
|
this.dataForm.noRepeatYearChinese = new Date().getFullYear();
|
||||||
}
|
}
|
||||||
// 修改的提交
|
// 修改的提交
|
||||||
if (this.dataForm.id) {
|
if (this.dataForm.id) {
|
||||||
updateHoliday(this.dataForm).then((response) => {
|
updateHoliday(this.dataForm).then((res) => {
|
||||||
this.$modal.msgSuccess('修改成功');
|
if (!res.data.updateFlag) {
|
||||||
this.$emit('refreshPage');
|
this.$modal.msgSuccess('修改成功');
|
||||||
|
this.$emit('refreshPage');
|
||||||
|
} else {
|
||||||
|
this.$confirm(
|
||||||
|
'新增节假日影响已有排班计划,是否立即更新?',
|
||||||
|
'更新排班',
|
||||||
|
{
|
||||||
|
confirmButtonText: '立即更新',
|
||||||
|
cancelButtonText: '暂不更新',
|
||||||
|
type: 'warning',
|
||||||
|
}
|
||||||
|
)
|
||||||
|
.then(() => {
|
||||||
|
updateSchedule({ logId: res.data.logId }).then((res1) => {
|
||||||
|
this.$modal.msgSuccess('更新成功');
|
||||||
|
});
|
||||||
|
this.$emit('refreshPage');
|
||||||
|
})
|
||||||
|
.catch(() => {
|
||||||
|
this.$message({
|
||||||
|
type: 'info',
|
||||||
|
message: '已取消',
|
||||||
|
});
|
||||||
|
this.$emit('refreshPage');
|
||||||
|
});
|
||||||
|
}
|
||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// 添加的提交
|
// 添加的提交
|
||||||
createHoliday(this.dataForm).then((res) => {
|
createHoliday(this.dataForm).then((res) => {
|
||||||
updateSchedule;
|
|
||||||
if (!res.data.updateFlag) {
|
if (!res.data.updateFlag) {
|
||||||
this.$modal.msgSuccess('新增成功');
|
this.$modal.msgSuccess('新增成功');
|
||||||
this.$emit('refreshPage');
|
this.$emit('refreshPage');
|
||||||
@@ -363,15 +517,16 @@ export default {
|
|||||||
)
|
)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
updateSchedule({ logId: res.data.logId }).then((res1) => {
|
updateSchedule({ logId: res.data.logId }).then((res1) => {
|
||||||
this.$modal.msgSuccess('新增成功');
|
this.$modal.msgSuccess('更新成功');
|
||||||
this.$emit('refreshPage');
|
|
||||||
});
|
});
|
||||||
|
this.$emit('refreshPage');
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
this.$message({
|
this.$message({
|
||||||
type: 'info',
|
type: 'info',
|
||||||
message: '已取消',
|
message: '已取消',
|
||||||
});
|
});
|
||||||
|
this.$emit('refreshPage');
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -33,6 +33,10 @@ const tableProps = [
|
|||||||
prop: 'opPeopleName',
|
prop: 'opPeopleName',
|
||||||
label: '操作人'
|
label: '操作人'
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
prop: 'deptName',
|
||||||
|
label: '部门'
|
||||||
|
},
|
||||||
{
|
{
|
||||||
prop: 'opType',
|
prop: 'opType',
|
||||||
label: '操作类型',
|
label: '操作类型',
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
* @Author: zwq
|
* @Author: zwq
|
||||||
* @Date: 2024-07-01 14:54:06
|
* @Date: 2024-07-01 14:54:06
|
||||||
* @LastEditors: zwq
|
* @LastEditors: zwq
|
||||||
* @LastEditTime: 2025-10-27 10:18:54
|
* @LastEditTime: 2025-11-05 13:46:00
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
<template>
|
<template>
|
||||||
@@ -32,15 +32,24 @@
|
|||||||
<div class="groupTeamScheduling">
|
<div class="groupTeamScheduling">
|
||||||
<div class="operationArea">
|
<div class="operationArea">
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="16">
|
<el-col :span="6">
|
||||||
<div style="height: 40px; font-size: 16px">
|
<div style="height: 40px; font-size: 16px">
|
||||||
<span style="color: #409eff; font-weight: 600">
|
<span style="color: #409eff; font-weight: 600">
|
||||||
{{ showDeptName }}
|
{{ showDeptName }}
|
||||||
</span>
|
</span>
|
||||||
节假日设置
|
节假日设置
|
||||||
|
<span
|
||||||
|
:style="{
|
||||||
|
color: inherited ? '#67c23a' : '#b5b839',
|
||||||
|
fontSize: '12px',
|
||||||
|
fontWeight: 600,
|
||||||
|
}"
|
||||||
|
v-show="ishasParent">
|
||||||
|
{{ inherited ? '继承模式' : '自定义模式' }}
|
||||||
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8">
|
<el-col :span="18" v-if="!ishasParent">
|
||||||
<div style="float: right">
|
<div style="float: right">
|
||||||
<el-button
|
<el-button
|
||||||
size="small"
|
size="small"
|
||||||
@@ -58,6 +67,39 @@
|
|||||||
</el-button>
|
</el-button>
|
||||||
</div>
|
</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
<el-col :span="18" v-else style="text-align: right">
|
||||||
|
<el-button
|
||||||
|
size="small"
|
||||||
|
type="primary"
|
||||||
|
:disabled="inherited"
|
||||||
|
v-hasPermi="['base:group-holiday:create']"
|
||||||
|
@click="addHoliday">
|
||||||
|
新增节假日
|
||||||
|
</el-button>
|
||||||
|
<el-button
|
||||||
|
size="small"
|
||||||
|
type="success"
|
||||||
|
:disabled="inherited"
|
||||||
|
v-hasPermi="['base:group-holiday:update']"
|
||||||
|
@click="reExtends">
|
||||||
|
恢复继承
|
||||||
|
</el-button>
|
||||||
|
<el-button
|
||||||
|
size="small"
|
||||||
|
type="warning"
|
||||||
|
:disabled="!inherited"
|
||||||
|
v-hasPermi="['base:group-holiday:update']"
|
||||||
|
@click="disExtends">
|
||||||
|
解除继承
|
||||||
|
</el-button>
|
||||||
|
<el-button
|
||||||
|
size="small"
|
||||||
|
:disabled="inherited"
|
||||||
|
v-hasPermi="['base:group-holiday-log:query']"
|
||||||
|
@click="holidayLog">
|
||||||
|
节假日变更记录
|
||||||
|
</el-button>
|
||||||
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</div>
|
</div>
|
||||||
<div class="operationArea">
|
<div class="operationArea">
|
||||||
@@ -73,6 +115,24 @@
|
|||||||
:clearable="false"
|
:clearable="false"
|
||||||
style="width: 120px"></el-date-picker>
|
style="width: 120px"></el-date-picker>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item label="继承上一级的节假日" v-show="ishasParent">
|
||||||
|
<div
|
||||||
|
style="
|
||||||
|
width: 36px;
|
||||||
|
height: 36px;
|
||||||
|
background-color: #67c23a;
|
||||||
|
border-radius: 3px;
|
||||||
|
"></div>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="本级自定义的节假日" v-show="ishasParent">
|
||||||
|
<div
|
||||||
|
style="
|
||||||
|
width: 36px;
|
||||||
|
height: 36px;
|
||||||
|
background-color: #b5b839;
|
||||||
|
border-radius: 3px;
|
||||||
|
"></div>
|
||||||
|
</el-form-item>
|
||||||
<el-form-item style="float: right">
|
<el-form-item style="float: right">
|
||||||
<el-button
|
<el-button
|
||||||
size="small"
|
size="small"
|
||||||
@@ -83,15 +143,24 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<el-tag
|
<el-tag
|
||||||
v-if="topDeptId == deptId"
|
v-if="!ishasParent"
|
||||||
type="warning"
|
type="warning"
|
||||||
closable
|
|
||||||
style="margin-bottom: 10px; color: black">
|
style="margin-bottom: 10px; color: black">
|
||||||
<i class="el-icon-warning" style="color: #ffbd02"></i>
|
<i class="el-icon-warning" style="color: #ffbd02"></i>
|
||||||
当前节假日设置为组织架构中最高层级配置,默认自动继承至下属部门。子部门可选择
|
当前节假日设置为组织架构中最高层级配置,默认自动继承至下属部门。子部门可选择
|
||||||
<span style="color: red">解除继承</span>
|
<span style="color: red">解除继承</span>
|
||||||
设置后进行独立修改,复制后不再继承上级设置
|
设置后进行独立修改,复制后不再继承上级设置
|
||||||
</el-tag>
|
</el-tag>
|
||||||
|
<el-tag
|
||||||
|
v-else
|
||||||
|
type="warning"
|
||||||
|
closable
|
||||||
|
style="margin-bottom: 10px; color: black">
|
||||||
|
<i class="el-icon-warning" style="color: #ffbd02"></i>
|
||||||
|
当前部门继承上级节假日设置,默认不可修改。可通过
|
||||||
|
<span style="color: red">解除继承</span>
|
||||||
|
进行自定义,解除后将不再继承。
|
||||||
|
</el-tag>
|
||||||
</div>
|
</div>
|
||||||
<!-- 日历区域 -->
|
<!-- 日历区域 -->
|
||||||
<div class="calenderArea">
|
<div class="calenderArea">
|
||||||
@@ -99,7 +168,16 @@
|
|||||||
<template slot="dateCell" slot-scope="{ data }">
|
<template slot="dateCell" slot-scope="{ data }">
|
||||||
<div v-if="data.type === 'current-month'">
|
<div v-if="data.type === 'current-month'">
|
||||||
<!-- 日期 -->
|
<!-- 日期 -->
|
||||||
<div class="dateStyle">
|
<div
|
||||||
|
class="dateStyle"
|
||||||
|
@click="
|
||||||
|
new Date(data.day).getTime() > Date.now() &&
|
||||||
|
HolidayList[Number(data.day.split('-')[2]) - 1]
|
||||||
|
?.isHoliday &&
|
||||||
|
showDetail(
|
||||||
|
HolidayList[Number(data.day.split('-')[2]) - 1]
|
||||||
|
)
|
||||||
|
">
|
||||||
<el-row :gutter="20">
|
<el-row :gutter="20">
|
||||||
<!-- 公历和农历 -->
|
<!-- 公历和农历 -->
|
||||||
<el-col :span="18">
|
<el-col :span="18">
|
||||||
@@ -134,13 +212,14 @@
|
|||||||
">
|
">
|
||||||
<div
|
<div
|
||||||
class="holiday-div"
|
class="holiday-div"
|
||||||
@click="
|
:style="{
|
||||||
new Date(data.day).getTime() > Date.now() &&
|
backgroundColor: ishasParent
|
||||||
showDetail(
|
? HolidayList[Number(data.day.split('-')[2]) - 1]
|
||||||
HolidayList[Number(data.day.split('-')[2]) - 1]
|
.isInherit
|
||||||
.holidayId
|
? '#67c23a'
|
||||||
)
|
: '#b5b839'
|
||||||
">
|
: '',
|
||||||
|
}">
|
||||||
{{
|
{{
|
||||||
HolidayList[Number(data.day.split('-')[2]) - 1]
|
HolidayList[Number(data.day.split('-')[2]) - 1]
|
||||||
?.holidayName
|
?.holidayName
|
||||||
@@ -179,6 +258,7 @@
|
|||||||
@confirm="handleConfirm"
|
@confirm="handleConfirm"
|
||||||
:before-close="cancel"
|
:before-close="cancel"
|
||||||
:destroy-on-close="true"
|
:destroy-on-close="true"
|
||||||
|
class="addDialog"
|
||||||
width="40%">
|
width="40%">
|
||||||
<add-or-updata
|
<add-or-updata
|
||||||
ref="addOrUpdataRef"
|
ref="addOrUpdataRef"
|
||||||
@@ -252,7 +332,14 @@ import moment from 'moment';
|
|||||||
import { solarToLunar } from 'chinese-lunar';
|
import { solarToLunar } from 'chinese-lunar';
|
||||||
|
|
||||||
import { getUserProfile } from '@/api/system/user';
|
import { getUserProfile } from '@/api/system/user';
|
||||||
import { deptHolidayList, getEnableData } from '@/api/group/holidaySetting';
|
import {
|
||||||
|
deptHolidayList,
|
||||||
|
getEnableData,
|
||||||
|
disExtends,
|
||||||
|
reExtends,
|
||||||
|
updateSchedule,
|
||||||
|
getSet,
|
||||||
|
} from '@/api/group/holidaySetting';
|
||||||
|
|
||||||
import addOrUpdata from './add-or-updata.vue';
|
import addOrUpdata from './add-or-updata.vue';
|
||||||
import holidayLog from './holidayLog';
|
import holidayLog from './holidayLog';
|
||||||
@@ -274,7 +361,9 @@ export default {
|
|||||||
// 选择的部门名称
|
// 选择的部门名称
|
||||||
showDeptName: undefined,
|
showDeptName: undefined,
|
||||||
topDeptId: undefined, // 保存当前用户的部门id为最高级部门id
|
topDeptId: undefined, // 保存当前用户的部门id为最高级部门id
|
||||||
|
parentId: undefined, // 保存部门点击时对象的父id,用于解除和恢复继承
|
||||||
deptId: undefined,
|
deptId: undefined,
|
||||||
|
ishasParent: false, // 判断是否有上级,false,则表示为最高级
|
||||||
defaultProps: {
|
defaultProps: {
|
||||||
children: 'children',
|
children: 'children',
|
||||||
label: 'name',
|
label: 'name',
|
||||||
@@ -283,6 +372,7 @@ export default {
|
|||||||
addOrUpdateVisible: false,
|
addOrUpdateVisible: false,
|
||||||
detail: false,
|
detail: false,
|
||||||
logVisible: false,
|
logVisible: false,
|
||||||
|
inherited: true, //该部门是否为继承状态
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
@@ -298,9 +388,9 @@ export default {
|
|||||||
this.showDeptName = response.data.dept.name || '';
|
this.showDeptName = response.data.dept.name || '';
|
||||||
this.topDeptId = response.data.dept.id || ''; // 保存当前用户的部门id为最高级部门id
|
this.topDeptId = response.data.dept.id || ''; // 保存当前用户的部门id为最高级部门id
|
||||||
this.deptId = response.data.dept.id || '';
|
this.deptId = response.data.dept.id || '';
|
||||||
this.getHolidayPage();
|
this.getTreeselect();
|
||||||
|
this.getSet();
|
||||||
});
|
});
|
||||||
this.getTreeselect();
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
getHolidayPage() {
|
getHolidayPage() {
|
||||||
@@ -329,11 +419,23 @@ export default {
|
|||||||
/** 查询部门下拉树结构 */
|
/** 查询部门下拉树结构 */
|
||||||
getTreeselect() {
|
getTreeselect() {
|
||||||
getEnableData().then((response) => {
|
getEnableData().then((response) => {
|
||||||
|
// 遍历部门,判断当前帐号的部门是否有为最上级
|
||||||
|
const nowDept = response.data.filter((i) => i.id == this.topDeptId);
|
||||||
|
this.ishasParent = nowDept.hasParent;
|
||||||
|
this.parentId = nowDept.parentId;
|
||||||
|
|
||||||
// 处理 deptOptions 参数
|
// 处理 deptOptions 参数
|
||||||
this.deptOptions = [];
|
this.deptOptions = [];
|
||||||
this.deptOptions.push(...this.handleTree(response.data, 'id'));
|
this.deptOptions.push(...this.handleTree(response.data, 'id'));
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
// 根据部门id查询该部门是否是继承
|
||||||
|
getSet() {
|
||||||
|
getSet({ id: this.deptId }).then((res) => {
|
||||||
|
this.inherited = res.data;
|
||||||
|
});
|
||||||
|
this.getHolidayPage();
|
||||||
|
},
|
||||||
// 筛选节点
|
// 筛选节点
|
||||||
filterNode(value, data) {
|
filterNode(value, data) {
|
||||||
if (!value) return true;
|
if (!value) return true;
|
||||||
@@ -343,6 +445,9 @@ export default {
|
|||||||
handleNodeClick(data) {
|
handleNodeClick(data) {
|
||||||
this.deptId = data.id;
|
this.deptId = data.id;
|
||||||
this.showDeptName = data.name;
|
this.showDeptName = data.name;
|
||||||
|
this.ishasParent = data.hasParent;
|
||||||
|
this.parentId = data.parentId;
|
||||||
|
this.getSet();
|
||||||
this.getHolidayPage();
|
this.getHolidayPage();
|
||||||
},
|
},
|
||||||
//获取农历
|
//获取农历
|
||||||
@@ -414,9 +519,108 @@ export default {
|
|||||||
this.detail = false;
|
this.detail = false;
|
||||||
this.dialogTitle = '新增节假日';
|
this.dialogTitle = '新增节假日';
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$refs.addOrUpdataRef.init(this.deptId);
|
this.$refs.addOrUpdataRef.init(this.deptId, {
|
||||||
|
inherited: this.inherited,
|
||||||
|
});
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
disExtends() {
|
||||||
|
this.$confirm(
|
||||||
|
'当前节假日设置继承自上级部门,解除继承后将不再自动同步上级设置。<br/>系统将保留当前节假日配置作为初始数据,您可以自定义修改。<br/>是否确认解除继承?',
|
||||||
|
'解除继承',
|
||||||
|
{
|
||||||
|
dangerouslyUseHTMLString: true,
|
||||||
|
confirmButtonText: '确认解除',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
type: 'warning',
|
||||||
|
}
|
||||||
|
)
|
||||||
|
.then(() => {
|
||||||
|
disExtends({ id: this.deptId, pid: this.parentId }).then((res) => {
|
||||||
|
if (!res.data.updateFlag) {
|
||||||
|
this.$modal.msgSuccess('操作成功');
|
||||||
|
this.getSet();
|
||||||
|
} else {
|
||||||
|
this.$confirm(
|
||||||
|
'新增节假日影响已有排班计划,是否立即更新?',
|
||||||
|
'更新排班',
|
||||||
|
{
|
||||||
|
confirmButtonText: '立即更新',
|
||||||
|
cancelButtonText: '暂不更新',
|
||||||
|
type: 'warning',
|
||||||
|
}
|
||||||
|
)
|
||||||
|
.then(() => {
|
||||||
|
updateSchedule({ logId: res.data.logId }).then((res1) => {
|
||||||
|
this.$modal.msgSuccess('更新成功');
|
||||||
|
this.getSet();
|
||||||
|
});
|
||||||
|
})
|
||||||
|
.catch(() => {
|
||||||
|
this.$message({
|
||||||
|
type: 'info',
|
||||||
|
message: '已取消',
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
})
|
||||||
|
.catch((res) => {
|
||||||
|
console.log(res);
|
||||||
|
this.$message({
|
||||||
|
type: 'info',
|
||||||
|
message: '已取消',
|
||||||
|
});
|
||||||
|
});
|
||||||
|
},
|
||||||
|
reExtends() {
|
||||||
|
this.$confirm(
|
||||||
|
'恢复继承后,当前部门将重新同步未来时间的上级部门的节假日设置,<br/>现有自定义配置将被清空并替换为上级设置,不可恢复。<br/>是否确认继续?',
|
||||||
|
'恢复继承',
|
||||||
|
{
|
||||||
|
dangerouslyUseHTMLString: true,
|
||||||
|
confirmButtonText: '确认恢复继承',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
type: 'warning',
|
||||||
|
}
|
||||||
|
)
|
||||||
|
.then(() => {
|
||||||
|
reExtends({ id: this.deptId, pid: this.parentId }).then((res) => {
|
||||||
|
if (!res.data.updateFlag) {
|
||||||
|
this.$modal.msgSuccess('操作成功');
|
||||||
|
this.getSet();
|
||||||
|
} else {
|
||||||
|
this.$confirm(
|
||||||
|
'新增节假日影响已有排班计划,是否立即更新?',
|
||||||
|
'更新排班',
|
||||||
|
{
|
||||||
|
confirmButtonText: '立即更新',
|
||||||
|
cancelButtonText: '暂不更新',
|
||||||
|
type: 'warning',
|
||||||
|
}
|
||||||
|
)
|
||||||
|
.then(() => {
|
||||||
|
updateSchedule({ logId: res.data.logId }).then((res1) => {
|
||||||
|
this.$modal.msgSuccess('更新成功');
|
||||||
|
this.getSet();
|
||||||
|
});
|
||||||
|
})
|
||||||
|
.catch(() => {
|
||||||
|
this.$message({
|
||||||
|
type: 'info',
|
||||||
|
message: '已取消',
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
})
|
||||||
|
.catch(() => {
|
||||||
|
this.$message({
|
||||||
|
type: 'info',
|
||||||
|
message: '已取消',
|
||||||
|
});
|
||||||
|
});
|
||||||
|
},
|
||||||
holidayLog() {
|
holidayLog() {
|
||||||
this.logVisible = true;
|
this.logVisible = true;
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
@@ -434,12 +638,12 @@ export default {
|
|||||||
handleConfirm() {
|
handleConfirm() {
|
||||||
this.$refs.addOrUpdataRef.dataFormSubmit();
|
this.$refs.addOrUpdataRef.dataFormSubmit();
|
||||||
},
|
},
|
||||||
showDetail(id) {
|
showDetail(val) {
|
||||||
this.addOrUpdateVisible = true;
|
this.addOrUpdateVisible = true;
|
||||||
this.detail = true;
|
this.detail = true;
|
||||||
this.dialogTitle = '节假日详情';
|
this.dialogTitle = '节假日详情';
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$refs.addOrUpdataRef.init(this.deptId, id, true);
|
this.$refs.addOrUpdataRef.init(this.deptId, val, true);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
editHoliday() {
|
editHoliday() {
|
||||||
@@ -561,4 +765,9 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.addDialog {
|
||||||
|
.el-dialog__body {
|
||||||
|
overflow: visible;
|
||||||
|
}
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -44,7 +44,7 @@
|
|||||||
border-radius: 100%;
|
border-radius: 100%;
|
||||||
background: #26b9de;
|
background: #26b9de;
|
||||||
"></span>
|
"></span>
|
||||||
上上电缆
|
智能监控分析系统
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<video
|
<video
|
||||||
@@ -103,7 +103,7 @@
|
|||||||
line-height: 54px;
|
line-height: 54px;
|
||||||
letter-spacing: 2px;
|
letter-spacing: 2px;
|
||||||
">
|
">
|
||||||
上上电缆
|
智能监控分析系统
|
||||||
</h3>
|
</h3>
|
||||||
</h2>
|
</h2>
|
||||||
|
|
||||||
|
|||||||
@@ -1,114 +0,0 @@
|
|||||||
<!--
|
|
||||||
* @Author: zwq
|
|
||||||
* @Date: 2021-11-18 14:16:25
|
|
||||||
* @LastEditors: zwq
|
|
||||||
* @LastEditTime: 2025-11-12 15:35:21
|
|
||||||
* @Description:
|
|
||||||
-->
|
|
||||||
<template>
|
|
||||||
<el-form
|
|
||||||
:model="dataForm"
|
|
||||||
:rules="dataRule"
|
|
||||||
ref="dataForm"
|
|
||||||
@keyup.enter.native="dataFormSubmit()"
|
|
||||||
label-width="80px">
|
|
||||||
<el-row :gutter="20">
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="产品编码" prop="code">
|
|
||||||
<el-input
|
|
||||||
v-model="dataForm.code"
|
|
||||||
clearable
|
|
||||||
placeholder="请输入产品编码" />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="产品名称" prop="name">
|
|
||||||
<el-input
|
|
||||||
v-model="dataForm.name"
|
|
||||||
clearable
|
|
||||||
placeholder="请输入产品名称" />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
<el-row :gutter="20">
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="产品规格" prop="address">
|
|
||||||
<el-input
|
|
||||||
v-model="dataForm.address"
|
|
||||||
clearable
|
|
||||||
placeholder="请输入产品规格" />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="产品类型" prop="name">
|
|
||||||
<el-select
|
|
||||||
v-model="dataForm.name"
|
|
||||||
disabled
|
|
||||||
:style="{ width: '100%' }"
|
|
||||||
placeholder="请选择产品类型">
|
|
||||||
<el-option
|
|
||||||
v-for="item in typeArr"
|
|
||||||
:key="item.name"
|
|
||||||
:label="item.label"
|
|
||||||
:value="item.name"></el-option>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="启用状态" prop="enabled">
|
|
||||||
<el-select
|
|
||||||
:style="{ width: '100%' }" v-model="dataForm.enabled" placeholder="请选择启用状态">
|
|
||||||
<el-option
|
|
||||||
v-for="dict in this.getDictDatas(DICT_TYPE.INFRA_BOOLEAN_STRING)"
|
|
||||||
:key="dict.value"
|
|
||||||
:label="dict.label"
|
|
||||||
:value="dict.value" />
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
</el-form>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
import basicAdd from '@/mixins/basic-add';
|
|
||||||
import {
|
|
||||||
createFactory,
|
|
||||||
updateFactory,
|
|
||||||
getFactory,
|
|
||||||
getCode,
|
|
||||||
} from '@/api/core/base/factory';
|
|
||||||
|
|
||||||
export default {
|
|
||||||
mixins: [basicAdd],
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
urlOptions: {
|
|
||||||
isGetCode: true,
|
|
||||||
codeURL: getCode,
|
|
||||||
createURL: createFactory,
|
|
||||||
updateURL: updateFactory,
|
|
||||||
infoURL: getFactory,
|
|
||||||
},
|
|
||||||
dataForm: {
|
|
||||||
id: undefined,
|
|
||||||
code: undefined,
|
|
||||||
name: undefined,
|
|
||||||
address: undefined,
|
|
||||||
enabled:'1',
|
|
||||||
remark: undefined,
|
|
||||||
},
|
|
||||||
typeArr: [],
|
|
||||||
dataRule: {
|
|
||||||
code: [
|
|
||||||
{ required: true, message: '产品编码不能为空', trigger: 'blur' },
|
|
||||||
],
|
|
||||||
name: [
|
|
||||||
{ required: true, message: '产品名称不能为空', trigger: 'blur' },
|
|
||||||
],
|
|
||||||
},
|
|
||||||
};
|
|
||||||
},
|
|
||||||
methods: {},
|
|
||||||
};
|
|
||||||
</script>
|
|
||||||
@@ -1,35 +0,0 @@
|
|||||||
<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>
|
|
||||||
@@ -1,209 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div class="app-container">
|
|
||||||
<search-bar
|
|
||||||
:formConfigs="formConfig"
|
|
||||||
ref="searchBarForm"
|
|
||||||
@headBtnClick="buttonClick" />
|
|
||||||
<base-table
|
|
||||||
v-loading="dataListLoading"
|
|
||||||
:table-props="tableProps"
|
|
||||||
:page="listQuery.pageNo"
|
|
||||||
:limit="listQuery.pageSize"
|
|
||||||
:table-data="tableData"
|
|
||||||
@emitFun="getDataList">
|
|
||||||
<method-btn
|
|
||||||
v-if="tableBtn.length"
|
|
||||||
slot="handleBtn"
|
|
||||||
:width="90"
|
|
||||||
label="操作"
|
|
||||||
:method-list="tableBtn"
|
|
||||||
@clickBtn="handleClick" />
|
|
||||||
</base-table>
|
|
||||||
<pagination
|
|
||||||
:limit.sync="listQuery.pageSize"
|
|
||||||
:page.sync="listQuery.pageNo"
|
|
||||||
:total="listQuery.total"
|
|
||||||
@pagination="getDataList" />
|
|
||||||
<base-dialog
|
|
||||||
:dialogTitle="addOrEditTitle"
|
|
||||||
:dialogVisible="addOrUpdateVisible"
|
|
||||||
@cancel="handleCancel"
|
|
||||||
@confirm="handleConfirm"
|
|
||||||
:before-close="handleCancel"
|
|
||||||
width="50%">
|
|
||||||
<add-or-update
|
|
||||||
ref="addOrUpdate"
|
|
||||||
@refreshDataList="successSubmit"></add-or-update>
|
|
||||||
</base-dialog>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
import AddOrUpdate from './add-or-updata';
|
|
||||||
import basicPage from '@/mixins/basic-page';
|
|
||||||
import changeStatus from './changeStatus.vue';
|
|
||||||
import { parseTime } from '@/filter/code-filter';
|
|
||||||
import {
|
|
||||||
deleteFactory,
|
|
||||||
getFactoryPage,
|
|
||||||
exportFactoryExcel,
|
|
||||||
} from '@/api/core/base/factory';
|
|
||||||
|
|
||||||
const tableProps = [
|
|
||||||
{
|
|
||||||
prop: 'code',
|
|
||||||
label: '产品编码',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop: 'name',
|
|
||||||
label: '产品名称',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop: 'address',
|
|
||||||
label: '规格型号',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop: 'remark',
|
|
||||||
label: '产品分类',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop: 'remark1',
|
|
||||||
label: '创建人',
|
|
||||||
width: 90,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop: 'createTime',
|
|
||||||
label: '时间',
|
|
||||||
filter: parseTime,
|
|
||||||
width: 150,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop: 'enabled',
|
|
||||||
label: '状态',
|
|
||||||
subcomponent: changeStatus,
|
|
||||||
width: 80,
|
|
||||||
},
|
|
||||||
];
|
|
||||||
|
|
||||||
export default {
|
|
||||||
mixins: [basicPage],
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
urlOptions: {
|
|
||||||
getDataListURL: getFactoryPage,
|
|
||||||
deleteURL: deleteFactory,
|
|
||||||
exportURL: exportFactoryExcel,
|
|
||||||
},
|
|
||||||
tableProps,
|
|
||||||
tableBtn: [
|
|
||||||
this.$auth.hasPermi(`base:factory:update`)
|
|
||||||
? {
|
|
||||||
type: 'edit',
|
|
||||||
btnName: '编辑',
|
|
||||||
}
|
|
||||||
: undefined,
|
|
||||||
this.$auth.hasPermi(`base:factory:delete`)
|
|
||||||
? {
|
|
||||||
type: 'delete',
|
|
||||||
btnName: '删除',
|
|
||||||
}
|
|
||||||
: undefined,
|
|
||||||
].filter((v) => v),
|
|
||||||
tableData: [],
|
|
||||||
formConfig: [
|
|
||||||
{
|
|
||||||
type: 'select',
|
|
||||||
label: '分类',
|
|
||||||
selectOptions: [],
|
|
||||||
param: 'val1',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
type: 'select',
|
|
||||||
label: '状态',
|
|
||||||
selectOptions: [
|
|
||||||
{ id: 1, name: '正常' },
|
|
||||||
{ id: 2, name: '停用' },
|
|
||||||
],
|
|
||||||
param: 'val2',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
type: 'input',
|
|
||||||
label: '产品编码',
|
|
||||||
placeholder: '产品编码',
|
|
||||||
param: 'name',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
type: 'button',
|
|
||||||
btnName: '搜索',
|
|
||||||
name: 'search',
|
|
||||||
color: 'primary',
|
|
||||||
},
|
|
||||||
// {
|
|
||||||
// type: 'separate',
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// type: 'button',
|
|
||||||
// btnName: '重置',
|
|
||||||
// name: 'reset',
|
|
||||||
// },
|
|
||||||
{
|
|
||||||
type: 'separate',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
type: this.$auth.hasPermi('base:factory:create') ? 'button' : '',
|
|
||||||
btnName: '新增',
|
|
||||||
name: 'add',
|
|
||||||
color: 'success',
|
|
||||||
plain: true,
|
|
||||||
},
|
|
||||||
// {
|
|
||||||
// type: this.$auth.hasPermi('base:factory:create') ? 'separate' : '',
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// type: this.$auth.hasPermi('base:factory:export') ? 'button' : '',
|
|
||||||
// btnName: '导出',
|
|
||||||
// name: 'export',
|
|
||||||
// color: 'warning',
|
|
||||||
// },
|
|
||||||
],
|
|
||||||
};
|
|
||||||
},
|
|
||||||
components: {
|
|
||||||
AddOrUpdate,
|
|
||||||
},
|
|
||||||
created() {},
|
|
||||||
methods: {
|
|
||||||
buttonClick(val) {
|
|
||||||
switch (val.btnName) {
|
|
||||||
case 'search':
|
|
||||||
this.listQuery.pageNo = 1;
|
|
||||||
this.listQuery.pageSize = 10;
|
|
||||||
this.listQuery.name = val.name;
|
|
||||||
this.listQuery.val1 = val.val1;
|
|
||||||
this.listQuery.val2 = val.val2;
|
|
||||||
this.getDataList();
|
|
||||||
break;
|
|
||||||
case 'reset':
|
|
||||||
this.$refs.searchBarForm.resetForm();
|
|
||||||
this.listQuery = {
|
|
||||||
pageSize: 10,
|
|
||||||
pageNo: 1,
|
|
||||||
total: 1,
|
|
||||||
};
|
|
||||||
this.getDataList();
|
|
||||||
break;
|
|
||||||
case 'add':
|
|
||||||
this.addOrEditTitle = '新增';
|
|
||||||
this.addOrUpdateVisible = true;
|
|
||||||
this.addOrUpdateHandle();
|
|
||||||
break;
|
|
||||||
case 'export':
|
|
||||||
this.handleExport();
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
console.log(val);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
},
|
|
||||||
};
|
|
||||||
</script>
|
|
||||||
@@ -1,114 +0,0 @@
|
|||||||
<!--
|
|
||||||
* @Author: zwq
|
|
||||||
* @Date: 2021-11-18 14:16:25
|
|
||||||
* @LastEditors: zwq
|
|
||||||
* @LastEditTime: 2025-11-12 15:35:21
|
|
||||||
* @Description:
|
|
||||||
-->
|
|
||||||
<template>
|
|
||||||
<el-form
|
|
||||||
:model="dataForm"
|
|
||||||
:rules="dataRule"
|
|
||||||
ref="dataForm"
|
|
||||||
@keyup.enter.native="dataFormSubmit()"
|
|
||||||
label-width="80px">
|
|
||||||
<el-row :gutter="20">
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="产品编码" prop="code">
|
|
||||||
<el-input
|
|
||||||
v-model="dataForm.code"
|
|
||||||
clearable
|
|
||||||
placeholder="请输入产品编码" />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="产品名称" prop="name">
|
|
||||||
<el-input
|
|
||||||
v-model="dataForm.name"
|
|
||||||
clearable
|
|
||||||
placeholder="请输入产品名称" />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
<el-row :gutter="20">
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="产品规格" prop="address">
|
|
||||||
<el-input
|
|
||||||
v-model="dataForm.address"
|
|
||||||
clearable
|
|
||||||
placeholder="请输入产品规格" />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="产品类型" prop="name">
|
|
||||||
<el-select
|
|
||||||
v-model="dataForm.name"
|
|
||||||
disabled
|
|
||||||
:style="{ width: '100%' }"
|
|
||||||
placeholder="请选择产品类型">
|
|
||||||
<el-option
|
|
||||||
v-for="item in typeArr"
|
|
||||||
:key="item.name"
|
|
||||||
:label="item.label"
|
|
||||||
:value="item.name"></el-option>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="启用状态" prop="enabled">
|
|
||||||
<el-select
|
|
||||||
:style="{ width: '100%' }" v-model="dataForm.enabled" placeholder="请选择启用状态">
|
|
||||||
<el-option
|
|
||||||
v-for="dict in this.getDictDatas(DICT_TYPE.INFRA_BOOLEAN_STRING)"
|
|
||||||
:key="dict.value"
|
|
||||||
:label="dict.label"
|
|
||||||
:value="dict.value" />
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
</el-form>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
import basicAdd from '@/mixins/basic-add';
|
|
||||||
import {
|
|
||||||
createFactory,
|
|
||||||
updateFactory,
|
|
||||||
getFactory,
|
|
||||||
getCode,
|
|
||||||
} from '@/api/core/base/factory';
|
|
||||||
|
|
||||||
export default {
|
|
||||||
mixins: [basicAdd],
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
urlOptions: {
|
|
||||||
isGetCode: true,
|
|
||||||
codeURL: getCode,
|
|
||||||
createURL: createFactory,
|
|
||||||
updateURL: updateFactory,
|
|
||||||
infoURL: getFactory,
|
|
||||||
},
|
|
||||||
dataForm: {
|
|
||||||
id: undefined,
|
|
||||||
code: undefined,
|
|
||||||
name: undefined,
|
|
||||||
address: undefined,
|
|
||||||
enabled:'1',
|
|
||||||
remark: undefined,
|
|
||||||
},
|
|
||||||
typeArr: [],
|
|
||||||
dataRule: {
|
|
||||||
code: [
|
|
||||||
{ required: true, message: '产品编码不能为空', trigger: 'blur' },
|
|
||||||
],
|
|
||||||
name: [
|
|
||||||
{ required: true, message: '产品名称不能为空', trigger: 'blur' },
|
|
||||||
],
|
|
||||||
},
|
|
||||||
};
|
|
||||||
},
|
|
||||||
methods: {},
|
|
||||||
};
|
|
||||||
</script>
|
|
||||||
@@ -1,35 +0,0 @@
|
|||||||
<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>
|
|
||||||
@@ -1,229 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div class="app-container">
|
|
||||||
<search-bar
|
|
||||||
:formConfigs="formConfig"
|
|
||||||
ref="searchBarForm"
|
|
||||||
@headBtnClick="buttonClick" />
|
|
||||||
<base-table
|
|
||||||
v-loading="dataListLoading"
|
|
||||||
:table-props="tableProps"
|
|
||||||
:page="listQuery.pageNo"
|
|
||||||
:limit="listQuery.pageSize"
|
|
||||||
:table-data="tableData"
|
|
||||||
@emitFun="getDataList">
|
|
||||||
<method-btn
|
|
||||||
v-if="tableBtn.length"
|
|
||||||
slot="handleBtn"
|
|
||||||
:width="90"
|
|
||||||
label="操作"
|
|
||||||
:method-list="tableBtn"
|
|
||||||
@clickBtn="handleClick" />
|
|
||||||
</base-table>
|
|
||||||
<pagination
|
|
||||||
:limit.sync="listQuery.pageSize"
|
|
||||||
:page.sync="listQuery.pageNo"
|
|
||||||
:total="listQuery.total"
|
|
||||||
@pagination="getDataList" />
|
|
||||||
<base-dialog
|
|
||||||
:dialogTitle="addOrEditTitle"
|
|
||||||
:dialogVisible="addOrUpdateVisible"
|
|
||||||
@cancel="handleCancel"
|
|
||||||
@confirm="handleConfirm"
|
|
||||||
:before-close="handleCancel"
|
|
||||||
width="50%">
|
|
||||||
<add-or-update
|
|
||||||
ref="addOrUpdate"
|
|
||||||
@refreshDataList="successSubmit"></add-or-update>
|
|
||||||
</base-dialog>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
import AddOrUpdate from './add-or-updata';
|
|
||||||
import basicPage from '@/mixins/basic-page';
|
|
||||||
import changeStatus from './changeStatus.vue';
|
|
||||||
import { parseTime } from '@/filter/code-filter';
|
|
||||||
import {
|
|
||||||
deleteFactory,
|
|
||||||
getFactoryPage,
|
|
||||||
exportFactoryExcel,
|
|
||||||
} from '@/api/core/base/factory';
|
|
||||||
|
|
||||||
const tableProps = [
|
|
||||||
{
|
|
||||||
prop: 'code',
|
|
||||||
label: '产品编码',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop: 'name',
|
|
||||||
label: '产品名称',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop: 'address',
|
|
||||||
label: '规格型号',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop: 'remark',
|
|
||||||
label: '产品分类',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop: 'remark1',
|
|
||||||
label: '创建人',
|
|
||||||
width: 90,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop: 'createTime',
|
|
||||||
label: '时间',
|
|
||||||
filter: parseTime,
|
|
||||||
width: 150,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop: 'enabled',
|
|
||||||
label: '状态',
|
|
||||||
subcomponent: changeStatus,
|
|
||||||
width: 80,
|
|
||||||
},
|
|
||||||
];
|
|
||||||
|
|
||||||
export default {
|
|
||||||
mixins: [basicPage],
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
urlOptions: {
|
|
||||||
getDataListURL: getFactoryPage,
|
|
||||||
deleteURL: deleteFactory,
|
|
||||||
exportURL: exportFactoryExcel,
|
|
||||||
},
|
|
||||||
tableProps,
|
|
||||||
tableBtn: [
|
|
||||||
this.$auth.hasPermi(`base:factory:update`)
|
|
||||||
? {
|
|
||||||
type: 'edit',
|
|
||||||
btnName: '编辑',
|
|
||||||
}
|
|
||||||
: undefined,
|
|
||||||
this.$auth.hasPermi(`base:factory:delete`)
|
|
||||||
? {
|
|
||||||
type: 'delete',
|
|
||||||
btnName: '删除',
|
|
||||||
}
|
|
||||||
: undefined,
|
|
||||||
].filter((v) => v),
|
|
||||||
tableData: [],
|
|
||||||
formConfig: [
|
|
||||||
{
|
|
||||||
type: 'select',
|
|
||||||
label: '适用框绞线',
|
|
||||||
selectOptions: [],
|
|
||||||
param: 'val1',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
type: 'select',
|
|
||||||
label: '修改人',
|
|
||||||
selectOptions: [],
|
|
||||||
param: 'val2',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
type: 'select',
|
|
||||||
label: '状态',
|
|
||||||
selectOptions: [
|
|
||||||
{ id: 1, name: '正常' },
|
|
||||||
{ id: 2, name: '停用' },
|
|
||||||
],
|
|
||||||
param: 'val3',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
type: 'datePicker',
|
|
||||||
label: '最后修改时间',
|
|
||||||
dateType: 'daterange',
|
|
||||||
format: 'yyyy-MM-dd',
|
|
||||||
valueFormat: 'yyyy-MM-dd HH:mm:ss',
|
|
||||||
rangeSeparator: '-',
|
|
||||||
startPlaceholder: '开始时间',
|
|
||||||
endPlaceholder: '结束时间',
|
|
||||||
param: 'searchTime',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
type: 'input',
|
|
||||||
label: '产品编码',
|
|
||||||
placeholder: '产品编码',
|
|
||||||
param: 'name',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
type: 'button',
|
|
||||||
btnName: '搜索',
|
|
||||||
name: 'search',
|
|
||||||
color: 'primary',
|
|
||||||
},
|
|
||||||
// {
|
|
||||||
// type: 'separate',
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// type: 'button',
|
|
||||||
// btnName: '重置',
|
|
||||||
// name: 'reset',
|
|
||||||
// },
|
|
||||||
{
|
|
||||||
type: 'separate',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
type: this.$auth.hasPermi('base:factory:create') ? 'button' : '',
|
|
||||||
btnName: '新增',
|
|
||||||
name: 'add',
|
|
||||||
color: 'success',
|
|
||||||
plain: true,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
type: 'separate',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
type: 'button',
|
|
||||||
btnName: '导出',
|
|
||||||
name: 'export',
|
|
||||||
color: 'warning',
|
|
||||||
},
|
|
||||||
],
|
|
||||||
};
|
|
||||||
},
|
|
||||||
components: {
|
|
||||||
AddOrUpdate,
|
|
||||||
},
|
|
||||||
created() {},
|
|
||||||
methods: {
|
|
||||||
buttonClick(val) {
|
|
||||||
switch (val.btnName) {
|
|
||||||
case 'search':
|
|
||||||
this.listQuery.pageNo = 1;
|
|
||||||
this.listQuery.pageSize = 10;
|
|
||||||
this.listQuery.name = val.name;
|
|
||||||
this.listQuery.val1 = val.val1;
|
|
||||||
this.listQuery.val2 = val.val2;
|
|
||||||
this.listQuery.val3 = val.val3;
|
|
||||||
this.listQuery.startTime = val.searchTime ? val.searchTime[0] : null;
|
|
||||||
this.listQuery.endTime = val.searchTime ? val.searchTime[1] : null;
|
|
||||||
this.getDataList();
|
|
||||||
break;
|
|
||||||
case 'reset':
|
|
||||||
this.$refs.searchBarForm.resetForm();
|
|
||||||
this.listQuery = {
|
|
||||||
pageSize: 10,
|
|
||||||
pageNo: 1,
|
|
||||||
total: 1,
|
|
||||||
};
|
|
||||||
this.getDataList();
|
|
||||||
break;
|
|
||||||
case 'add':
|
|
||||||
this.addOrEditTitle = '新增';
|
|
||||||
this.addOrUpdateVisible = true;
|
|
||||||
this.addOrUpdateHandle();
|
|
||||||
break;
|
|
||||||
case 'export':
|
|
||||||
this.handleExport();
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
console.log(val);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
},
|
|
||||||
};
|
|
||||||
</script>
|
|
||||||
@@ -1,38 +0,0 @@
|
|||||||
/*
|
|
||||||
* @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
|
|
||||||
@@ -1,170 +0,0 @@
|
|||||||
<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>
|
|
||||||
@@ -1,299 +0,0 @@
|
|||||||
<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>
|
|
||||||
@@ -1,97 +0,0 @@
|
|||||||
<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>
|
|
||||||
@@ -1,232 +0,0 @@
|
|||||||
<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>
|
|
||||||
@@ -1,294 +0,0 @@
|
|||||||
<!--
|
|
||||||
* @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>
|
|
||||||
@@ -1,294 +0,0 @@
|
|||||||
<!--
|
|
||||||
* @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>
|
|
||||||
@@ -1,348 +0,0 @@
|
|||||||
<!--
|
|
||||||
* @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>
|
|
||||||
@@ -1,111 +0,0 @@
|
|||||||
<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>
|
|
||||||
@@ -1,250 +0,0 @@
|
|||||||
<!--
|
|
||||||
* @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>
|
|
||||||
@@ -1,77 +0,0 @@
|
|||||||
<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>
|
|
||||||
@@ -1,62 +0,0 @@
|
|||||||
/*
|
|
||||||
* @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)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,273 +0,0 @@
|
|||||||
<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. 重命名 props:ref → 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>
|
|
||||||
@@ -1,259 +0,0 @@
|
|||||||
<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>
|
|
||||||
@@ -1,86 +0,0 @@
|
|||||||
<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>
|
|
||||||
@@ -1,99 +0,0 @@
|
|||||||
@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;
|
|
||||||
}
|
|
||||||
@@ -1,173 +0,0 @@
|
|||||||
// 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;
|
|
||||||
}
|
|
||||||
@@ -1,31 +0,0 @@
|
|||||||
/**
|
|
||||||
* 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;
|
|
||||||
}
|
|
||||||
@@ -1,319 +0,0 @@
|
|||||||
@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;
|
|
||||||
}
|
|
||||||
@@ -1,66 +0,0 @@
|
|||||||
@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;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,209 +0,0 @@
|
|||||||
#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;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,48 +0,0 @@
|
|||||||
// 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;
|
|
||||||
}
|
|
||||||
@@ -1,35 +0,0 @@
|
|||||||
// 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;
|
|
||||||
}
|
|
||||||
@@ -1,66 +0,0 @@
|
|||||||
<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>
|
|
||||||
@@ -1,66 +0,0 @@
|
|||||||
<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>
|
|
||||||
@@ -1,214 +0,0 @@
|
|||||||
<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>
|
|
||||||
@@ -1,65 +0,0 @@
|
|||||||
<!--
|
|
||||||
* @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>
|
|
||||||
@@ -1,442 +0,0 @@
|
|||||||
<!--
|
|
||||||
* @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>
|
|
||||||
@@ -1,273 +0,0 @@
|
|||||||
<!--
|
|
||||||
* @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>
|
|
||||||
@@ -1,65 +0,0 @@
|
|||||||
<!--
|
|
||||||
* @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>
|
|
||||||
@@ -1,32 +0,0 @@
|
|||||||
<!--
|
|
||||||
* @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>
|
|
||||||
@@ -1,32 +0,0 @@
|
|||||||
<!--
|
|
||||||
* @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>
|
|
||||||
@@ -1,57 +0,0 @@
|
|||||||
<!--
|
|
||||||
* @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>
|
|
||||||