Compare commits
18 Commits
399e2bc965
...
projects/s
| Author | SHA1 | Date | |
|---|---|---|---|
| 8226b45a03 | |||
| dde04cf93f | |||
| 63a67e58de | |||
| 48e9f70625 | |||
| f5f250cb16 | |||
| b6241fe7c4 | |||
| 94edd04a08 | |||
| b926559a7d | |||
| b2984ed4cf | |||
|
|
4ade2dfcdc | ||
|
|
852a3f17a0 | ||
| cba14b1f61 | |||
|
|
33c00785df | ||
|
|
d8acff21e3 | ||
|
|
c0a38c568f | ||
| be86cbd9b3 | |||
| 6a8a9ed28d | |||
| a2213f4f7e |
6
.env.dev
@@ -12,8 +12,10 @@ ENV = 'development'
|
|||||||
VUE_APP_TITLE = 智能监控分析系统
|
VUE_APP_TITLE = 智能监控分析系统
|
||||||
|
|
||||||
# 芋道管理系统/开发环境
|
# 芋道管理系统/开发环境
|
||||||
# VUE_APP_BASE_API = 'http://192.168.8.22:48080'
|
|
||||||
VUE_APP_BASE_API = 'http://172.16.33.65:48082'
|
VUE_APP_BASE_API = 'http://192.168.0.31:48080'
|
||||||
|
# VUE_APP_BASE_API = 'http://172.16.32.76:48080'
|
||||||
|
# VUE_APP_BASE_API = 'http://line.kszny.picaiba.com'
|
||||||
|
|
||||||
# 路由懒加载
|
# 路由懒加载
|
||||||
VUE_CLI_BABEL_TRANSPILE_MODULES = true
|
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": "SET NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service serve --mode dev",
|
"dev": "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,7 +77,6 @@
|
|||||||
"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",
|
||||||
|
|||||||
72
src/api/areavisual/overview.js
Normal file
@@ -0,0 +1,72 @@
|
|||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
// 获取区域列表
|
||||||
|
export function getAreaList(params) {
|
||||||
|
return request({
|
||||||
|
url: '/wms/region/page',
|
||||||
|
method: 'get',
|
||||||
|
params
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获取区域空满数量
|
||||||
|
export function postAllAreaInfo(data) {
|
||||||
|
return request({
|
||||||
|
url: '/wms/region/lsit/count',
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获取指定库区库位信息
|
||||||
|
export function postAreaInfo(data) {
|
||||||
|
return request({
|
||||||
|
url: '/wms/line-edge-library/list/region',
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获取区域总览
|
||||||
|
export function postAllAreaOverview(data) {
|
||||||
|
return request({
|
||||||
|
url: '/wms/line-edge-library/line/count',
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 删除能源实时数据库plc相关
|
||||||
|
export function deleteEnergyPlc(id) {
|
||||||
|
return request({
|
||||||
|
url: '/base/energy-plc/delete?id=' + id,
|
||||||
|
method: 'delete'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获取关联表编码
|
||||||
|
export function getCode() {
|
||||||
|
return request({
|
||||||
|
url: '/base/energy-plc/getCode',
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获得能源实时数据库plc相关分页
|
||||||
|
export function getEnergyPlcPage(data) {
|
||||||
|
return request({
|
||||||
|
url: '/base/energy-plc/page',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 导出能源实时数据库plc相关 Excel
|
||||||
|
export function exportEnergyPlcExcel(query) {
|
||||||
|
return request({
|
||||||
|
url: '/base/energy-plc/export-excel',
|
||||||
|
method: 'get',
|
||||||
|
params: query,
|
||||||
|
responseType: 'blob'
|
||||||
|
})
|
||||||
|
}
|
||||||
63
src/api/areavisual/record.js
Normal file
@@ -0,0 +1,63 @@
|
|||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
// 获取出入库历史任务分页
|
||||||
|
export function getRecordPage(params) {
|
||||||
|
return request({
|
||||||
|
url: '/wms/job-main-task-history/page',
|
||||||
|
method: 'get',
|
||||||
|
params
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获取巷道列表
|
||||||
|
export function getLaneList(params) {
|
||||||
|
return request({
|
||||||
|
url: '/wms/lane/page',
|
||||||
|
method: 'get',
|
||||||
|
params
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 更新能源实时数据库plc相关
|
||||||
|
export function updateEnergyPlc(data) {
|
||||||
|
return request({
|
||||||
|
url: '/base/energy-plc/update',
|
||||||
|
method: 'put',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 删除能源实时数据库plc相关
|
||||||
|
export function deleteEnergyPlc(id) {
|
||||||
|
return request({
|
||||||
|
url: '/base/energy-plc/delete?id=' + id,
|
||||||
|
method: 'delete'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获取关联表编码
|
||||||
|
export function getCode() {
|
||||||
|
return request({
|
||||||
|
url: '/base/energy-plc/getCode',
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获得能源实时数据库plc相关分页
|
||||||
|
export function getEnergyPlcPage(data) {
|
||||||
|
return request({
|
||||||
|
url: '/base/energy-plc/page',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 导出能源实时数据库plc相关 Excel
|
||||||
|
export function exportEnergyPlcExcel(query) {
|
||||||
|
return request({
|
||||||
|
url: '/base/energy-plc/export-excel',
|
||||||
|
method: 'get',
|
||||||
|
params: query,
|
||||||
|
responseType: 'blob'
|
||||||
|
})
|
||||||
|
}
|
||||||
@@ -141,13 +141,3 @@ 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,29 +90,3 @@ 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
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|||||||
154
src/api/ssdl/product&recipe.js
Normal file
@@ -0,0 +1,154 @@
|
|||||||
|
/*
|
||||||
|
* @Author: zwq
|
||||||
|
* @Date: 2025-11-17 09:25:12
|
||||||
|
* @LastEditors: zwq
|
||||||
|
* @LastEditTime: 2025-11-28 09:29:14
|
||||||
|
* @Description:
|
||||||
|
*/
|
||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
|
||||||
|
// 获得原料分页
|
||||||
|
export function getProductPage(query) {
|
||||||
|
return request({
|
||||||
|
url: '/wms/material/page',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 获得原料
|
||||||
|
export function getProduct(id) {
|
||||||
|
return request({
|
||||||
|
url: '/wms/material/get?id=' + id,
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 删除原料
|
||||||
|
export function deleteProduct(id) {
|
||||||
|
return request({
|
||||||
|
url: '/wms/material/delete?id=' + id,
|
||||||
|
method: 'delete'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 更新
|
||||||
|
export function updateProduct(data) {
|
||||||
|
return request({
|
||||||
|
url: '/wms/material/update',
|
||||||
|
method: 'put',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 创建
|
||||||
|
export function createProduct(data) {
|
||||||
|
return request({
|
||||||
|
url: '/wms/material/create',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// 获得工艺分页
|
||||||
|
export function getProcessPage(query) {
|
||||||
|
return request({
|
||||||
|
url: '/wms/process/page/group/by',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 获得工艺点击展开表格
|
||||||
|
export function getProcessDetailPage(query) {
|
||||||
|
return request({
|
||||||
|
url: '/wms/process/page/group/by/detail',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 删除工艺
|
||||||
|
export function deleteProcess(id) {
|
||||||
|
return request({
|
||||||
|
url: '/wms/process/delete?id=' + id,
|
||||||
|
method: 'delete'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 批量删除工艺
|
||||||
|
export function deleteProcessList(ids) {
|
||||||
|
return request({
|
||||||
|
url: '/wms/process/delete-list?ids=' + ids,
|
||||||
|
method: 'delete'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 更新
|
||||||
|
export function updateProcess(data) {
|
||||||
|
return request({
|
||||||
|
url: '/wms/process/update',
|
||||||
|
method: 'put',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 创建
|
||||||
|
export function createProcess(data) {
|
||||||
|
return request({
|
||||||
|
url: '/wms/process/create',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 获得工艺
|
||||||
|
export function getProcess(id) {
|
||||||
|
return request({
|
||||||
|
url: '/wms/process/get?id=' + id,
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 工艺设备原料分页
|
||||||
|
export function getProcessMaterialPage(query) {
|
||||||
|
return request({
|
||||||
|
url: '/wms/process-equipment-material/page',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 删除工艺设备原料
|
||||||
|
export function deleteProcessMaterial(id) {
|
||||||
|
return request({
|
||||||
|
url: '/wms/process-equipment-material/delete?id=' + id,
|
||||||
|
method: 'delete'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 更新
|
||||||
|
export function updateProcessMaterial(data) {
|
||||||
|
return request({
|
||||||
|
url: '/wms/process-equipment-material/update',
|
||||||
|
method: 'put',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 创建
|
||||||
|
export function createProcessMaterial(data) {
|
||||||
|
return request({
|
||||||
|
url: '/wms/process-equipment-material/create',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 获得工艺
|
||||||
|
export function getProcessMaterial(id) {
|
||||||
|
return request({
|
||||||
|
url: '/wms/process-equipment-material/get?id=' + id,
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获得设备分页
|
||||||
|
export function getEquipmentPage(query) {
|
||||||
|
return request({
|
||||||
|
url: '/wms/equipment/page',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
60
src/api/ssdl/taskList.js
Normal file
@@ -0,0 +1,60 @@
|
|||||||
|
/*
|
||||||
|
* @Author: zwq
|
||||||
|
* @Date: 2025-11-17 09:25:12
|
||||||
|
* @LastEditors: zwq
|
||||||
|
* @LastEditTime: 2025-11-18 15:42:19
|
||||||
|
* @Description:
|
||||||
|
*/
|
||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
|
||||||
|
// 获得任务分页
|
||||||
|
export function getTaskPage(query) {
|
||||||
|
return request({
|
||||||
|
url: '/wms/job-main-task/page',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 获得任务
|
||||||
|
export function getTask(id) {
|
||||||
|
return request({
|
||||||
|
url: '/wms/job-main-task/get?id=' + id,
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获得任务日志分页
|
||||||
|
export function getTaskLogPage(query) {
|
||||||
|
return request({
|
||||||
|
url: '/wms/job-main-task-log/page',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 更新
|
||||||
|
export function updateTask(data) {
|
||||||
|
return request({
|
||||||
|
url: '/wms/job-main-task/update',
|
||||||
|
method: 'put',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 根据区域id获取该区域下的库位信息
|
||||||
|
export function getRegion(id) {
|
||||||
|
return request({
|
||||||
|
url: '/wms/line-edge-library/get-by-region-id?regionId=' + id,
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 创建
|
||||||
|
export function createPCTask(data) {
|
||||||
|
return request({
|
||||||
|
url: '/wms/job-main-task/pc-create-task',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
9
src/api/visualization/visualization.js
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
export function getLineEdgeLibraryList(data) {
|
||||||
|
return request({
|
||||||
|
url: '/wms/line-edge-library/list',
|
||||||
|
method: 'get',
|
||||||
|
params: data,
|
||||||
|
});
|
||||||
|
}
|
||||||
BIN
src/assets/img/ABN.png
Normal file
|
After Width: | Height: | Size: 461 B |
BIN
src/assets/img/ABNScale.png
Normal file
|
After Width: | Height: | Size: 321 B |
BIN
src/assets/img/DIS.png
Normal file
|
After Width: | Height: | Size: 312 B |
BIN
src/assets/img/DISScale.png
Normal file
|
After Width: | Height: | Size: 244 B |
BIN
src/assets/img/EP.png
Normal file
|
After Width: | Height: | Size: 137 B |
BIN
src/assets/img/EPScale.png
Normal file
|
After Width: | Height: | Size: 165 B |
BIN
src/assets/img/FP.png
Normal file
|
After Width: | Height: | Size: 139 B |
BIN
src/assets/img/FPScale.png
Normal file
|
After Width: | Height: | Size: 170 B |
BIN
src/assets/img/IDL.png
Normal file
|
After Width: | Height: | Size: 929 B |
BIN
src/assets/img/IDLScale.png
Normal file
|
After Width: | Height: | Size: 321 B |
BIN
src/assets/img/IT.png
Normal file
|
After Width: | Height: | Size: 320 B |
BIN
src/assets/img/ITScale.png
Normal file
|
After Width: | Height: | Size: 261 B |
BIN
src/assets/img/LCK.png
Normal file
|
After Width: | Height: | Size: 416 B |
BIN
src/assets/img/LCKScale.png
Normal file
|
After Width: | Height: | Size: 305 B |
BIN
src/assets/img/OCC.png
Normal file
|
After Width: | Height: | Size: 325 B |
BIN
src/assets/img/OCCScale.png
Normal file
|
After Width: | Height: | Size: 259 B |
BIN
src/assets/img/RES.png
Normal file
|
After Width: | Height: | Size: 420 B |
BIN
src/assets/img/RESScale.png
Normal file
|
After Width: | Height: | Size: 321 B |
BIN
src/assets/img/Top1.png
Normal file
|
After Width: | Height: | Size: 5.5 KiB |
BIN
src/assets/img/Top2.png
Normal file
|
After Width: | Height: | Size: 5.7 KiB |
BIN
src/assets/img/Top3.png
Normal file
|
After Width: | Height: | Size: 5.7 KiB |
BIN
src/assets/img/Top4.png
Normal file
|
After Width: | Height: | Size: 5.5 KiB |
BIN
src/assets/img/Top5.png
Normal file
|
After Width: | Height: | Size: 5.7 KiB |
BIN
src/assets/img/agvCar.png
Normal file
|
After Width: | Height: | Size: 2.1 KiB |
BIN
src/assets/img/agvItemBg.png
Normal file
|
After Width: | Height: | Size: 8.9 KiB |
BIN
src/assets/img/alarmItemBg.png
Normal file
|
After Width: | Height: | Size: 1.0 KiB |
BIN
src/assets/img/chargeBg.png
Normal file
|
After Width: | Height: | Size: 326 B |
BIN
src/assets/img/chargeCircle.png
Normal file
|
After Width: | Height: | Size: 622 B |
BIN
src/assets/img/leftTable.png
Normal file
|
After Width: | Height: | Size: 220 B |
BIN
src/assets/img/recycle.png
Normal file
|
After Width: | Height: | Size: 379 B |
BIN
src/assets/img/rightTable.png
Normal file
|
After Width: | Height: | Size: 355 B |
BIN
src/assets/img/runBg.png
Normal file
|
After Width: | Height: | Size: 325 B |
BIN
src/assets/img/runCircle.png
Normal file
|
After Width: | Height: | Size: 562 B |
BIN
src/assets/img/ssdlLeftTitle.png
Normal file
|
After Width: | Height: | Size: 12 KiB |
BIN
src/assets/img/ssdlTitle.png
Normal file
|
After Width: | Height: | Size: 5.3 KiB |
BIN
src/assets/img/standbyCircle.png
Normal file
|
After Width: | Height: | Size: 611 B |
BIN
src/assets/img/threeDimensionalChartBg.png
Normal file
|
After Width: | Height: | Size: 1.9 MiB |
@@ -2,7 +2,7 @@
|
|||||||
* @Author: zwq
|
* @Author: zwq
|
||||||
* @Date: 2022-08-24 11:19:43
|
* @Date: 2022-08-24 11:19:43
|
||||||
* @LastEditors: zwq
|
* @LastEditors: zwq
|
||||||
* @LastEditTime: 2024-04-02 09:33:29
|
* @LastEditTime: 2025-11-28 09:35:03
|
||||||
* @Description:
|
* @Description:
|
||||||
*/
|
*/
|
||||||
export default {
|
export default {
|
||||||
@@ -16,7 +16,7 @@ export default {
|
|||||||
},
|
},
|
||||||
tableData: [], //table数据
|
tableData: [], //table数据
|
||||||
listQuery: { //分页
|
listQuery: { //分页
|
||||||
pageSize: 10,
|
pageSize: 20,
|
||||||
pageNo: 1,
|
pageNo: 1,
|
||||||
total: 1,
|
total: 1,
|
||||||
},
|
},
|
||||||
@@ -69,7 +69,7 @@ export default {
|
|||||||
this.$refs.addOrUpdate.init(val.data.id);
|
this.$refs.addOrUpdate.init(val.data.id);
|
||||||
});
|
});
|
||||||
} else if (val.type === "delete") {
|
} else if (val.type === "delete") {
|
||||||
this.deleteHandle(val.data.id, val.data.name, val.data._pageIndex)
|
this.deleteHandle(val.data.id, val.data.name, val.data._pageIndex,val.data)
|
||||||
} else {
|
} else {
|
||||||
this.otherMethods(val)
|
this.otherMethods(val)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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', '/auth-redirect', '/bind', '/register', '/oauthLogin/gitee']
|
const whiteList = ['/login', '/social-login','screenbg', '/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(() => {
|
store.dispatch('GetInfo').then(userInfo => {
|
||||||
isRelogin.show = false
|
isRelogin.show = false
|
||||||
store.dispatch('GenerateRoutes').then(accessRoutes => {
|
store.dispatch('GenerateRoutes', userInfo.menus).then(accessRoutes => {
|
||||||
// 根据 roles 权限生成可访问的路由表
|
// 根据 roles 权限生成可访问的路由表
|
||||||
router.addRoutes(accessRoutes) // 动态添加可访问路由表
|
router.addRoutes(accessRoutes) // 动态添加可访问路由表
|
||||||
next({ ...to, replace: true }) // hack方法 确保addRoutes已完成
|
next({ ...to, replace: true }) // hack方法 确保addRoutes已完成
|
||||||
|
|||||||
@@ -28,223 +28,277 @@ 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',
|
{
|
||||||
component: (resolve) => require(['@/views/sso'], resolve),
|
path: '/sso',
|
||||||
hidden: true
|
component: (resolve) => require(['@/views/sso'], resolve),
|
||||||
},
|
hidden: true,
|
||||||
{
|
},
|
||||||
path: '/social-login',
|
{
|
||||||
component: (resolve) => require(['@/views/socialLogin'], resolve),
|
path: '/social-login',
|
||||||
hidden: true
|
component: (resolve) => require(['@/views/socialLogin'], resolve),
|
||||||
},
|
hidden: true,
|
||||||
{
|
},
|
||||||
path: '/404',
|
{
|
||||||
component: (resolve) => require(['@/views/error/404'], resolve),
|
path: '/404',
|
||||||
hidden: true
|
component: (resolve) => require(['@/views/error/404'], resolve),
|
||||||
},
|
hidden: true,
|
||||||
{
|
},
|
||||||
path: '/401',
|
{
|
||||||
component: (resolve) => require(['@/views/error/401'], resolve),
|
path: '/401',
|
||||||
hidden: true
|
component: (resolve) => require(['@/views/error/401'], resolve),
|
||||||
},
|
hidden: true,
|
||||||
{
|
},
|
||||||
path: '/print-design',
|
{
|
||||||
component: (resolve) => require(['@/views/print/design'], resolve),
|
path: '/print-design',
|
||||||
hidden: true
|
component: (resolve) => require(['@/views/print/design'], resolve),
|
||||||
},
|
hidden: true,
|
||||||
{
|
},
|
||||||
path: "",
|
{
|
||||||
component: Layout,
|
path: '',
|
||||||
redirect: "index",
|
component: Layout,
|
||||||
children: [
|
redirect: 'index',
|
||||||
{
|
children: [
|
||||||
path: "index",
|
{
|
||||||
component: (resolve) => require(["@/views/home/index"], resolve),
|
path: 'index',
|
||||||
name: "首页",
|
component: (resolve) => require(['@/views/home/index'], resolve),
|
||||||
meta: { title: "首页", icon: "dashboard", affix: true },
|
name: '首页',
|
||||||
hidden: true
|
meta: { title: '首页', icon: 'dashboard', affix: true },
|
||||||
},
|
hidden: true,
|
||||||
],
|
},
|
||||||
},
|
],
|
||||||
{
|
},
|
||||||
path: '/user',
|
{
|
||||||
component: Layout,
|
path: '/screenbg',
|
||||||
hidden: true,
|
component: () =>
|
||||||
redirect: 'noredirect',
|
import(
|
||||||
children: [{
|
/* webpackChunkName: "about" */ '@/views/productionVisualization/equipmentBoard'
|
||||||
path: 'profile',
|
),
|
||||||
component: (resolve) => require(['@/views/system/user/profile/index'], resolve),
|
name: 'screenbg',
|
||||||
name: 'Profile',
|
meta: { title: '大屏', icon: 'chart' },
|
||||||
meta: { title: '个人中心', icon: 'user' }
|
},
|
||||||
}, {
|
{
|
||||||
path: 'notify-message',
|
path: '/user',
|
||||||
component: (resolve) => require(['@/views/system/notify/my/index'], resolve),
|
component: Layout,
|
||||||
name: 'MyNotifyMessage',
|
hidden: true,
|
||||||
meta: { title: '我的站内信', icon: 'message' },
|
redirect: 'noredirect',
|
||||||
}]
|
children: [
|
||||||
},
|
{
|
||||||
{
|
path: 'profile',
|
||||||
path: '/dict',
|
component: (resolve) =>
|
||||||
component: Layout,
|
require(['@/views/system/user/profile/index'], resolve),
|
||||||
hidden: true,
|
name: 'Profile',
|
||||||
children: [{
|
meta: { title: '个人中心', icon: 'user' },
|
||||||
path: 'type/data/:dictId(\\d+)',
|
},
|
||||||
component: (resolve) => require(['@/views/system/dict/data'], resolve),
|
{
|
||||||
name: 'SystemDictData',
|
path: 'notify-message',
|
||||||
meta: { title: '字典数据', icon: '', activeMenu: '/system/dict' }
|
component: (resolve) =>
|
||||||
}
|
require(['@/views/system/notify/my/index'], resolve),
|
||||||
]
|
name: 'MyNotifyMessage',
|
||||||
},
|
meta: { title: '我的站内信', icon: 'message' },
|
||||||
{
|
},
|
||||||
path: '/job',
|
],
|
||||||
component: Layout,
|
},
|
||||||
hidden: true,
|
{
|
||||||
children: [{
|
path: '/dict',
|
||||||
path: 'log',
|
component: Layout,
|
||||||
component: (resolve) => require(['@/views/infra/job/log'], resolve),
|
hidden: true,
|
||||||
name: 'InfraJobLog',
|
children: [
|
||||||
meta: { title: '调度日志', activeMenu: '/infra/job' }
|
{
|
||||||
}
|
path: 'type/data/:dictId(\\d+)',
|
||||||
]
|
component: (resolve) => require(['@/views/system/dict/data'], resolve),
|
||||||
}, {
|
name: 'SystemDictData',
|
||||||
path: '/codegen',
|
meta: { title: '字典数据', icon: '', activeMenu: '/system/dict' },
|
||||||
component: Layout,
|
},
|
||||||
hidden: true,
|
],
|
||||||
children: [{
|
},
|
||||||
path: 'edit/:tableId(\\d+)',
|
{
|
||||||
component: (resolve) => require(['@/views/infra/codegen/editTable'], resolve),
|
path: '/job',
|
||||||
name: 'InfraCodegenEditTable',
|
component: Layout,
|
||||||
meta: { title: '修改生成配置', activeMenu: '/infra/codegen' }
|
hidden: true,
|
||||||
}
|
children: [
|
||||||
]
|
{
|
||||||
},
|
path: 'log',
|
||||||
{
|
component: (resolve) => require(['@/views/infra/job/log'], resolve),
|
||||||
path: '/bpm',
|
name: 'InfraJobLog',
|
||||||
component: Layout,
|
meta: { title: '调度日志', activeMenu: '/infra/job' },
|
||||||
hidden: true,
|
},
|
||||||
redirect: 'noredirect',
|
],
|
||||||
children: [{
|
},
|
||||||
path: 'oa/leave/create',
|
{
|
||||||
component: (resolve) => require(['@/views/bpm/oa/leave/create'], resolve),
|
path: '/codegen',
|
||||||
name: 'BpmOALeaveCreate',
|
component: Layout,
|
||||||
meta: { title: '发起 OA 请假', icon: 'form', activeMenu: '/bpm/oa/leave' }
|
hidden: true,
|
||||||
}, {
|
children: [
|
||||||
path: 'oa/leave/detail',
|
{
|
||||||
component: (resolve) => require(['@/views/bpm/oa/leave/detail'], resolve),
|
path: 'edit/:tableId(\\d+)',
|
||||||
name: 'BpmOALeaveDetail',
|
component: (resolve) =>
|
||||||
meta: { title: '查看 OA 请假', icon: 'view', activeMenu: '/bpm/oa/leave' }
|
require(['@/views/infra/codegen/editTable'], resolve),
|
||||||
}
|
name: 'InfraCodegenEditTable',
|
||||||
]
|
meta: { title: '修改生成配置', activeMenu: '/infra/codegen' },
|
||||||
},
|
},
|
||||||
{
|
],
|
||||||
path: '/bpm',
|
},
|
||||||
component: Layout,
|
{
|
||||||
hidden: true,
|
path: '/bpm',
|
||||||
children: [{
|
component: Layout,
|
||||||
path: 'manager/form/edit',
|
hidden: true,
|
||||||
component: (resolve) => require(['@/views/bpm/form/formEditor'], resolve),
|
redirect: 'noredirect',
|
||||||
name: 'BpmFormEditor',
|
children: [
|
||||||
meta: { title: '流程表单-编辑', activeMenu: '/bpm/manager/form' }
|
{
|
||||||
}, {
|
path: 'oa/leave/create',
|
||||||
path: 'manager/definition',
|
component: (resolve) =>
|
||||||
component: (resolve) => require(['@/views/bpm/definition/index'], resolve),
|
require(['@/views/bpm/oa/leave/create'], resolve),
|
||||||
name: 'BpmProcessDefinition',
|
name: 'BpmOALeaveCreate',
|
||||||
meta: { title: '流程定义', activeMenu: '/bpm/manager/model' }
|
meta: {
|
||||||
}, {
|
title: '发起 OA 请假',
|
||||||
path: 'manager/model/design',
|
icon: 'form',
|
||||||
component: (resolve) => require(['@/views/bpm/model/modelEditor'], resolve),
|
activeMenu: '/bpm/oa/leave',
|
||||||
name: 'BpmModelEditor',
|
},
|
||||||
meta: { title: '设计流程', activeMenu: '/bpm/manager/model' }
|
},
|
||||||
}, {
|
{
|
||||||
path: 'process-instance/create',
|
path: 'oa/leave/detail',
|
||||||
component: (resolve) => require(['@/views/bpm/processInstance/create'], resolve),
|
component: (resolve) =>
|
||||||
name: 'BpmProcessInstanceCreate',
|
require(['@/views/bpm/oa/leave/detail'], resolve),
|
||||||
meta: { title: '发起流程', activeMenu: '/bpm/task/my' }
|
name: 'BpmOALeaveDetail',
|
||||||
}, {
|
meta: {
|
||||||
path: 'process-instance/detail',
|
title: '查看 OA 请假',
|
||||||
component: (resolve) => require(['@/views/bpm/processInstance/detail'], resolve),
|
icon: 'view',
|
||||||
name: 'BpmProcessInstanceDetail',
|
activeMenu: '/bpm/oa/leave',
|
||||||
meta: { title: '流程详情', activeMenu: '/bpm/task/my' }
|
},
|
||||||
}
|
},
|
||||||
]
|
],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/property',
|
path: '/bpm',
|
||||||
component: Layout,
|
component: Layout,
|
||||||
hidden: true,
|
hidden: true,
|
||||||
children: [{
|
children: [
|
||||||
path: 'value/:propertyId(\\d+)',
|
{
|
||||||
component: (resolve) => require(['@/views/mall/product/property/value'], resolve),
|
path: 'manager/form/edit',
|
||||||
name: 'ProductPropertyValue',
|
component: (resolve) =>
|
||||||
meta: { title: '商品属性值', icon: '', activeMenu: '/product/property' }
|
require(['@/views/bpm/form/formEditor'], resolve),
|
||||||
}
|
name: 'BpmFormEditor',
|
||||||
]
|
meta: { title: '流程表单-编辑', activeMenu: '/bpm/manager/form' },
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/spu',
|
path: 'manager/definition',
|
||||||
component: Layout,
|
component: (resolve) =>
|
||||||
hidden: true,
|
require(['@/views/bpm/definition/index'], resolve),
|
||||||
children: [{
|
name: 'BpmProcessDefinition',
|
||||||
path: 'edit/:spuId(\\d+)',
|
meta: { title: '流程定义', activeMenu: '/bpm/manager/model' },
|
||||||
component: (resolve) => require(['@/views/mall/product/spu/save'], resolve),
|
},
|
||||||
name: 'ProductSpuUpdate',
|
{
|
||||||
meta: { title: '修改商品', activeMenu: '/product/spu' }
|
path: 'manager/model/design',
|
||||||
},
|
component: (resolve) =>
|
||||||
{
|
require(['@/views/bpm/model/modelEditor'], resolve),
|
||||||
path: 'add',
|
name: 'BpmModelEditor',
|
||||||
component: (resolve) => require(['@/views/mall/product/spu/save'], resolve),
|
meta: { title: '设计流程', activeMenu: '/bpm/manager/model' },
|
||||||
name: 'ProductSpuCreate',
|
},
|
||||||
meta: { title: '添加商品', activeMenu: '/product/spu' }
|
{
|
||||||
}
|
path: 'process-instance/create',
|
||||||
]
|
component: (resolve) =>
|
||||||
},
|
require(['@/views/bpm/processInstance/create'], resolve),
|
||||||
{
|
name: 'BpmProcessInstanceCreate',
|
||||||
path: '/trade/order',
|
meta: { title: '发起流程', activeMenu: '/bpm/task/my' },
|
||||||
component: Layout,
|
},
|
||||||
hidden: true,
|
{
|
||||||
children: [
|
path: 'process-instance/detail',
|
||||||
{
|
component: (resolve) =>
|
||||||
path: 'detail',
|
require(['@/views/bpm/processInstance/detail'], resolve),
|
||||||
name: 'TradeOrderDetail',
|
name: 'BpmProcessInstanceDetail',
|
||||||
hidden: true,
|
meta: { title: '流程详情', activeMenu: '/bpm/task/my' },
|
||||||
meta: { title: '订单详情' },
|
},
|
||||||
component: (resolve) => require(['@/views/mall/trade/order/detail'], resolve)
|
],
|
||||||
}
|
},
|
||||||
]
|
{
|
||||||
},
|
path: '/property',
|
||||||
{
|
component: Layout,
|
||||||
path: '/pay',
|
hidden: true,
|
||||||
component: Layout,
|
children: [
|
||||||
hidden: true,
|
{
|
||||||
children: [{
|
path: 'value/:propertyId(\\d+)',
|
||||||
path: 'order/submit',
|
component: (resolve) =>
|
||||||
name: 'PayOrderSubmit',
|
require(['@/views/mall/product/property/value'], resolve),
|
||||||
hidden: true,
|
name: 'ProductPropertyValue',
|
||||||
meta: {
|
meta: {
|
||||||
title: '收银台',
|
title: '商品属性值',
|
||||||
noCache: true
|
icon: '',
|
||||||
},
|
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,5 +1,4 @@
|
|||||||
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";
|
||||||
@@ -27,22 +26,25 @@ const permission = {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
actions: {
|
actions: {
|
||||||
// 生成路由
|
/**
|
||||||
GenerateRoutes({commit}) {
|
* 生成路由
|
||||||
|
*
|
||||||
|
* @param commit commit 函数
|
||||||
|
* @param menus 路由参数
|
||||||
|
*/
|
||||||
|
GenerateRoutes({commit}, menus) {
|
||||||
return new Promise(resolve => {
|
return new Promise(resolve => {
|
||||||
// 向后端请求路由数据(菜单)
|
// 将 menus 菜单,转换为 route 路由数组
|
||||||
getRouters().then(res => {
|
const sdata = JSON.parse(JSON.stringify(menus)) // 【重要】用于菜单中的数据
|
||||||
const sdata = JSON.parse(JSON.stringify(res.data)) // 【重要】用于菜单中的数据
|
const rdata = JSON.parse(JSON.stringify(menus)) // 用于最后添加到 Router 中的数据
|
||||||
const rdata = JSON.parse(JSON.stringify(res.data)) // 用于最后添加到 Router 中的数据
|
const sidebarRoutes = filterAsyncRouter(sdata)
|
||||||
const sidebarRoutes = filterAsyncRouter(sdata)
|
const rewriteRoutes = filterAsyncRouter(rdata, false, true)
|
||||||
const rewriteRoutes = filterAsyncRouter(rdata, false, true)
|
rewriteRoutes.push({path: '*', redirect: '/404', hidden: true})
|
||||||
rewriteRoutes.push({path: '*', redirect: '/404', hidden: true})
|
commit('SET_ROUTES', rewriteRoutes)
|
||||||
commit('SET_ROUTES', rewriteRoutes)
|
commit('SET_SIDEBAR_ROUTERS', constantRoutes.concat(sidebarRoutes))
|
||||||
commit('SET_SIDEBAR_ROUTERS', constantRoutes.concat(sidebarRoutes))
|
commit('SET_DEFAULT_ROUTES', sidebarRoutes)
|
||||||
commit('SET_DEFAULT_ROUTES', sidebarRoutes)
|
commit('SET_TOPBAR_ROUTES', sidebarRoutes)
|
||||||
commit('SET_TOPBAR_ROUTES', sidebarRoutes)
|
resolve(rewriteRoutes)
|
||||||
resolve(rewriteRoutes)
|
|
||||||
})
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
125
src/views/areavisual/overview/components/ringChart.vue
Normal file
@@ -0,0 +1,125 @@
|
|||||||
|
<template>
|
||||||
|
<div
|
||||||
|
:class="className"
|
||||||
|
:style="{ height: height, width: width, marginLeft: '10px' }" />
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import * as echarts from 'echarts';
|
||||||
|
require('echarts/theme/macarons'); // echarts theme
|
||||||
|
import resize from '@/utils/chartMixins/resize';
|
||||||
|
|
||||||
|
const animationDuration = 1000;
|
||||||
|
export default {
|
||||||
|
mixins: [resize],
|
||||||
|
props: {
|
||||||
|
className: {
|
||||||
|
type: String,
|
||||||
|
default: 'chart',
|
||||||
|
},
|
||||||
|
title: {
|
||||||
|
type: String,
|
||||||
|
default: '',
|
||||||
|
},
|
||||||
|
width: {
|
||||||
|
type: String,
|
||||||
|
default: '100%',
|
||||||
|
},
|
||||||
|
height: {
|
||||||
|
type: String,
|
||||||
|
default: '300px',
|
||||||
|
},
|
||||||
|
ringData: {
|
||||||
|
type: Object,
|
||||||
|
default: () => {},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
chart: null,
|
||||||
|
targetId: '',
|
||||||
|
};
|
||||||
|
},
|
||||||
|
beforeDestroy() {
|
||||||
|
if (!this.chart) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
this.chart.dispose();
|
||||||
|
this.chart = null;
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
initChart() {
|
||||||
|
this.chart = echarts.init(this.$el, 'macarons');
|
||||||
|
const _this = this;
|
||||||
|
this.chart.setOption({
|
||||||
|
title: {
|
||||||
|
text: this.title
|
||||||
|
? '{space|}{tip|}{space|}{value|' + this.title + '}'
|
||||||
|
: '',
|
||||||
|
textStyle: {
|
||||||
|
rich: {
|
||||||
|
tip: {
|
||||||
|
width: 6,
|
||||||
|
height: 6,
|
||||||
|
borderRadius: 50,
|
||||||
|
backgroundColor: '#288AFF',
|
||||||
|
},
|
||||||
|
space: {
|
||||||
|
width: 8,
|
||||||
|
},
|
||||||
|
value: {
|
||||||
|
fontSize: 14,
|
||||||
|
color: 'black',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
color: ['#33B36B', '#3A8DFF', '#F59A23'],
|
||||||
|
tooltip: {
|
||||||
|
trigger: 'axis',
|
||||||
|
axisPointer: {
|
||||||
|
type: 'cross',
|
||||||
|
crossStyle: {
|
||||||
|
color: '#999',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
legend: {
|
||||||
|
data: ['当前满位', '当前空位', '在途'],
|
||||||
|
},
|
||||||
|
grid: {
|
||||||
|
containLabel: true,
|
||||||
|
},
|
||||||
|
series: [
|
||||||
|
{
|
||||||
|
// name: '投入',
|
||||||
|
type: 'pie',
|
||||||
|
radius: '50%',
|
||||||
|
data: [
|
||||||
|
{
|
||||||
|
name: '当前满位',
|
||||||
|
value: this.ringData.occupiedQuantity
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '当前空位',
|
||||||
|
value: this.ringData.idleQuantity
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '在途',
|
||||||
|
value: this.ringData.transitQuantity
|
||||||
|
},
|
||||||
|
],
|
||||||
|
emphasis: {
|
||||||
|
itemStyle: {
|
||||||
|
shadowBlur: 10,
|
||||||
|
shadowOffsetX: 0,
|
||||||
|
shadowColor: 'rgba(0, 0, 0, 0.5)'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
});
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
262
src/views/areavisual/overview/index.vue
Normal file
@@ -0,0 +1,262 @@
|
|||||||
|
<template>
|
||||||
|
<div class="app-container">
|
||||||
|
<el-row class="overview-container">
|
||||||
|
<el-col :span="4" class="overview-container-left">
|
||||||
|
<el-row style="font-size: 18px; font-weight: bold; line-height: 36px">库区选择</el-row>
|
||||||
|
<el-input
|
||||||
|
v-model="areaSearchForm.regionName"
|
||||||
|
placeholder="库区名称"
|
||||||
|
@blur="getArea"
|
||||||
|
clearable
|
||||||
|
/>
|
||||||
|
<el-tree
|
||||||
|
:data="areaList"
|
||||||
|
:node-key="'id'"
|
||||||
|
:props="{label: 'regionName'}"
|
||||||
|
@node-click="nodeClick"
|
||||||
|
/>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="16" v-if="changeType === 0" class="overview-container-main">
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="8" class="allarea-box" v-for="item in allAreaList" :key="item.id">
|
||||||
|
<div class="areainfo-box">
|
||||||
|
<div class="areainfo-box-header">
|
||||||
|
{{ item.regionName }}
|
||||||
|
</div>
|
||||||
|
<div class="areainfo-box-line">
|
||||||
|
<div class="areainfo-box-line-item" :style="{width: `${(item.occupiedQuantity / (item.totalInventory + item.transitQuantity) * 100).toFixed(2)}%`, backgroundColor: '#33B36B'}"></div>
|
||||||
|
<div class="areainfo-box-line-item" :style="{width: `${(item.idleQuantity / (item.totalInventory + item.transitQuantity) * 100).toFixed(2)}%`, backgroundColor: '#3A8DFF'}"></div>
|
||||||
|
<div class="areainfo-box-line-item" :style="{width: `${(item.transitQuantity / (item.totalInventory + item.transitQuantity) * 100).toFixed(2)}%`, backgroundColor: '#F59A23'}"></div>
|
||||||
|
</div>
|
||||||
|
<el-row class="areainfo-box-info">
|
||||||
|
<el-col class="areainfo-box-info-item" :span="6">
|
||||||
|
<p class="areainfo-box-info-item-count">{{item.totalInventory}}</p>
|
||||||
|
<p class="areainfo-box-info-item-title">库位总数</p>
|
||||||
|
</el-col>
|
||||||
|
<el-col class="areainfo-box-info-item" :span="6">
|
||||||
|
<p class="areainfo-box-info-item-count" style="color: #33B36B">{{item.occupiedQuantity}}</p>
|
||||||
|
<p class="areainfo-box-info-item-title">占</p>
|
||||||
|
</el-col>
|
||||||
|
<el-col class="areainfo-box-info-item" :span="6">
|
||||||
|
<p class="areainfo-box-info-item-count" style="color: #3A8DFF">{{item.idleQuantity}}</p>
|
||||||
|
<p class="areainfo-box-info-item-title">空</p>
|
||||||
|
</el-col>
|
||||||
|
<el-col class="areainfo-box-info-item" :span="6">
|
||||||
|
<p class="areainfo-box-info-item-count" style="color: #F59A23">{{item.transitQuantity}}</p>
|
||||||
|
<p class="areainfo-box-info-item-title">在途</p>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</div>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="4" v-if="changeType === 0" class="overview-container-right">
|
||||||
|
<el-tabs v-model="activeName" @tab-click="handleClickRight">
|
||||||
|
<el-tab-pane label="概览" name="first">
|
||||||
|
<el-row class="overview-container-right-alloverview">
|
||||||
|
<el-col class="overview-container-right-alloverview-item" :span="8">
|
||||||
|
<p class="overview-container-right-alloverview-item-count">{{allAreaInfo.totalInventory}}</p>
|
||||||
|
<p class="overview-container-right-alloverview-item-title">库位总数</p>
|
||||||
|
</el-col>
|
||||||
|
<el-col class="overview-container-right-alloverview-item" :span="8">
|
||||||
|
<p class="overview-container-right-alloverview-item-count">{{allAreaInfo.occupiedQuantity}}</p>
|
||||||
|
<p class="overview-container-right-alloverview-item-title">当前满位</p>
|
||||||
|
</el-col>
|
||||||
|
<el-col class="overview-container-right-alloverview-item" :span="8">
|
||||||
|
<p class="overview-container-right-alloverview-item-count">{{allAreaInfo.idleQuantity}}</p>
|
||||||
|
<p class="overview-container-right-alloverview-item-title">当前空位</p>
|
||||||
|
</el-col>
|
||||||
|
<el-col class="overview-container-right-alloverview-item" :span="8">
|
||||||
|
<p class="overview-container-right-alloverview-item-count">{{allAreaInfo.transitQuantity}}</p>
|
||||||
|
<p class="overview-container-right-alloverview-item-title">在途</p>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<ringChart :ring-data="allAreaInfo" ref="ringChart" />
|
||||||
|
</el-tab-pane>
|
||||||
|
<el-tab-pane label="在途任务" name="second">在途任务</el-tab-pane>
|
||||||
|
</el-tabs>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="20" v-if="changeType === 1" class="overview-container-main"></el-col>
|
||||||
|
</el-row>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
// import basicPage from '@/mixins/basic-page';
|
||||||
|
import ringChart from './components/ringChart.vue';
|
||||||
|
import { getAreaList, postAllAreaInfo, postAllAreaOverview, postAreaInfo } from '@/api/areavisual/overview';
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'overview',
|
||||||
|
// mixins: [basicPage],
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
areaList: [
|
||||||
|
{
|
||||||
|
id: 0,
|
||||||
|
regionName: "全部库区"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
areaSearchForm: {
|
||||||
|
pageNo: 1,
|
||||||
|
pageSize: 100,
|
||||||
|
regionName: ''
|
||||||
|
},
|
||||||
|
changeType: 0,
|
||||||
|
allAreaList: [],
|
||||||
|
allAreaInfo: {
|
||||||
|
totalInventory: 0,
|
||||||
|
occupiedQuantity: 0,
|
||||||
|
idleQuantity: 0,
|
||||||
|
transitQuantity: 0
|
||||||
|
},
|
||||||
|
areaInfo: [],
|
||||||
|
activeName: 'first'
|
||||||
|
};
|
||||||
|
},
|
||||||
|
components: {
|
||||||
|
ringChart
|
||||||
|
},
|
||||||
|
async created() {
|
||||||
|
this.getArea()
|
||||||
|
this.getAllAreaInfo()
|
||||||
|
this.getAllAreaOverview()
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
activeName: (val) => {
|
||||||
|
if (val === 'first') {
|
||||||
|
this.getAllAreaOverview()
|
||||||
|
} else if (val === 'second') {
|
||||||
|
this.getNowTaskList()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
// 获取库区列表
|
||||||
|
async getArea() {
|
||||||
|
const res = await getAreaList(this.areaSearchForm)
|
||||||
|
if (res.code === 0 && res.data) {
|
||||||
|
this.areaList = [
|
||||||
|
{
|
||||||
|
id: 0,
|
||||||
|
regionName: "全部库区"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
this.areaList.push(...(res.data.list))
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 库区选择
|
||||||
|
nodeClick(data, node, components) {
|
||||||
|
if (data.id === 0) {
|
||||||
|
this.changeType = 0
|
||||||
|
this.activeName = 'first'
|
||||||
|
this.getAllAreaInfo()
|
||||||
|
} else {
|
||||||
|
this.changeType = 1
|
||||||
|
this.getAreaInfo(data.id)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 获取全部库区概览信息
|
||||||
|
async getAllAreaInfo() {
|
||||||
|
const res = await postAllAreaInfo([])
|
||||||
|
console.log(res)
|
||||||
|
if (res.code === 0 && res.data) {
|
||||||
|
this.allAreaList = res.data
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 获取库区概览
|
||||||
|
async getAllAreaOverview() {
|
||||||
|
const res = await postAllAreaOverview([])
|
||||||
|
console.log(res)
|
||||||
|
if (res.code === 0 && res.data) {
|
||||||
|
this.allAreaInfo = res.data
|
||||||
|
this.$refs.ringChart.initChart();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 获取在途任务
|
||||||
|
async getNowTaskList() {},
|
||||||
|
// 获取单库区信息
|
||||||
|
async getAreaInfo (id) {
|
||||||
|
const res = await postAreaInfo({id})
|
||||||
|
console.log(res)
|
||||||
|
if (res.code === 0 && res.data) {
|
||||||
|
this.areaInfo = res.data
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 全部库区右侧分页点击
|
||||||
|
handleClickRight (tab, event) {
|
||||||
|
console.log(tab, event)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.overview-container {
|
||||||
|
max-height: calc(100vh - 120px - 8px);
|
||||||
|
overflow: scroll;
|
||||||
|
.overview-container-left {
|
||||||
|
padding-right: 12px;
|
||||||
|
}
|
||||||
|
.overview-container-main {
|
||||||
|
.allarea-box {
|
||||||
|
padding: 10px;
|
||||||
|
.areainfo-box {
|
||||||
|
border: 1px solid #bbb;
|
||||||
|
border-radius: 5px;
|
||||||
|
padding: 10px;
|
||||||
|
.areainfo-box-header {
|
||||||
|
font-size: 16px;
|
||||||
|
font-weight: bold;
|
||||||
|
white-space: nowrap; /* 禁止换行 */
|
||||||
|
overflow: hidden; /* 隐藏溢出内容 */
|
||||||
|
text-overflow: ellipsis; /* 溢出部分显示省略号 */
|
||||||
|
}
|
||||||
|
.areainfo-box-line {
|
||||||
|
width: 100%;
|
||||||
|
.areainfo-box-line-item {
|
||||||
|
height: 5px;
|
||||||
|
display: inline-block;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.areainfo-box-info {
|
||||||
|
.areainfo-box-info-item {
|
||||||
|
text-align: center;
|
||||||
|
font-size: 12px;
|
||||||
|
.areainfo-box-info-item-count {
|
||||||
|
font-weight: bold;
|
||||||
|
font-size: 14px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.overview-container-right {
|
||||||
|
.overview-container-right-alloverview {
|
||||||
|
.overview-container-right-alloverview-item {
|
||||||
|
text-align: center;
|
||||||
|
.overview-container-right-alloverview-item-count {
|
||||||
|
font-size: 14px;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<style lang="scss">
|
||||||
|
.el-tree-node__content {
|
||||||
|
height: 40px;
|
||||||
|
line-height: 40px;
|
||||||
|
}
|
||||||
|
.el-tree-node__label {
|
||||||
|
display: block;
|
||||||
|
width: calc(100% - 24px);
|
||||||
|
text-align: center;
|
||||||
|
white-space: nowrap; /* 禁止换行 */
|
||||||
|
overflow: hidden; /* 隐藏溢出内容 */
|
||||||
|
text-overflow: ellipsis; /* 溢出部分显示省略号 */
|
||||||
|
}
|
||||||
|
</style>
|
||||||
519
src/views/areavisual/record/components/RecordDrawer.vue
Normal file
@@ -0,0 +1,519 @@
|
|||||||
|
<!--
|
||||||
|
filename: EquipmentDrawer.vue
|
||||||
|
author: liubin
|
||||||
|
date: 2023-08-22 14:38:56
|
||||||
|
description:
|
||||||
|
-->
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<el-drawer
|
||||||
|
:visible="visible"
|
||||||
|
:show-close="false"
|
||||||
|
:wrapper-closable="false"
|
||||||
|
class="drawer"
|
||||||
|
custom-class="mes-drawer"
|
||||||
|
size="60%"
|
||||||
|
@closed="$emit('destroy')">
|
||||||
|
<SmallTitle slot="title">
|
||||||
|
{{
|
||||||
|
mode.includes('detail')
|
||||||
|
? '详情'
|
||||||
|
: mode.includes('edit')
|
||||||
|
? '编辑'
|
||||||
|
: '新增'
|
||||||
|
}}
|
||||||
|
</SmallTitle>
|
||||||
|
|
||||||
|
<div class="drawer-body flex">
|
||||||
|
<div class="drawer-body__content">
|
||||||
|
<section v-for="(section, index) in sections" :key="section.key">
|
||||||
|
<SmallTitle v-if="index != 0">{{ section.name }}</SmallTitle>
|
||||||
|
|
||||||
|
<div
|
||||||
|
class="form-part"
|
||||||
|
v-if="section.key == 'base'"
|
||||||
|
style="margin-bottom: 32px">
|
||||||
|
<el-skeleton v-if="!showForm" animated />
|
||||||
|
<!-- <EquipmentInfoForm
|
||||||
|
key="drawer-dialog-form"
|
||||||
|
v-if="showForm"
|
||||||
|
:disabled="mode.includes('detail')"
|
||||||
|
:sync-filelist="syncFileListFlag"
|
||||||
|
v-model="form" /> -->
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div v-if="section.key == 'attrs'" style="margin-top: 12px">
|
||||||
|
<base-table
|
||||||
|
v-loading="attrListLoading"
|
||||||
|
:table-props="section.props"
|
||||||
|
:page="attrQuery?.params.pageNo || 1"
|
||||||
|
:limit="attrQuery?.params.pageSize || 10"
|
||||||
|
:table-data="list"
|
||||||
|
:add-button-show="mode.includes('detail') ? null : '添加属性'"
|
||||||
|
@emitButtonClick="handleAddAttr"
|
||||||
|
@emitFun="handleEmitFun">
|
||||||
|
<method-btn
|
||||||
|
v-if="section.tableBtn"
|
||||||
|
slot="handleBtn"
|
||||||
|
label="操作"
|
||||||
|
:method-list="tableBtn"
|
||||||
|
@clickBtn="handleTableBtnClick" />
|
||||||
|
</base-table>
|
||||||
|
|
||||||
|
<!-- 分页组件 -->
|
||||||
|
<pagination
|
||||||
|
v-show="total > 0"
|
||||||
|
:total="total"
|
||||||
|
:page.sync="attrQuery.params.pageNo"
|
||||||
|
:limit.sync="attrQuery.params.pageSize"
|
||||||
|
@pagination="getAttrList" />
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="drawer-body__footer">
|
||||||
|
<el-button style="" @click="handleCancel">取消</el-button>
|
||||||
|
<el-button v-if="mode == 'detail'" type="primary" @click="toggleEdit">
|
||||||
|
编辑
|
||||||
|
</el-button>
|
||||||
|
<el-button v-else type="primary" @click="handleConfirm">确定</el-button>
|
||||||
|
<!-- sections的第二项必须是 属性列表 -->
|
||||||
|
<!-- <el-button
|
||||||
|
v-if="sections[1].allowAdd"
|
||||||
|
type="primary"
|
||||||
|
@click="handleAddAttr">
|
||||||
|
添加属性
|
||||||
|
</el-button> -->
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</el-drawer>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
|
||||||
|
const SmallTitle = {
|
||||||
|
name: 'SmallTitle',
|
||||||
|
props: ['size'],
|
||||||
|
components: {},
|
||||||
|
data() {
|
||||||
|
return {};
|
||||||
|
},
|
||||||
|
methods: {},
|
||||||
|
render: function (h) {
|
||||||
|
return h(
|
||||||
|
'span',
|
||||||
|
{
|
||||||
|
class: 'small-title',
|
||||||
|
style: {
|
||||||
|
fontSize: '18px',
|
||||||
|
lineHeight:
|
||||||
|
this.size == 'lg' ? '24px' : this.size == 'sm' ? '18px' : '20px',
|
||||||
|
fontWeight: 500,
|
||||||
|
fontFamily: '微软雅黑, Microsoft YaHei, Arial, Helvetica, sans-serif',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
this.$slots.default
|
||||||
|
);
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
export default {
|
||||||
|
components: { SmallTitle },
|
||||||
|
props: ['sections', 'mode', 'dataId'], // dataId 作为一个通用的存放id的字段
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
visible: false,
|
||||||
|
showForm: false,
|
||||||
|
btnLoading: false,
|
||||||
|
total: 0,
|
||||||
|
form: {},
|
||||||
|
list: [],
|
||||||
|
attrTitle: '',
|
||||||
|
attrForm: {
|
||||||
|
id: null,
|
||||||
|
equipmentId: null,
|
||||||
|
name: '',
|
||||||
|
value: '',
|
||||||
|
},
|
||||||
|
attrFormVisible: false,
|
||||||
|
attrRows: [
|
||||||
|
[
|
||||||
|
{
|
||||||
|
input: true,
|
||||||
|
label: '属性名称',
|
||||||
|
prop: 'name',
|
||||||
|
rules: [{ required: true, message: '不能为空', trigger: 'blur' }],
|
||||||
|
},
|
||||||
|
],
|
||||||
|
[
|
||||||
|
{
|
||||||
|
input: true,
|
||||||
|
label: '属性值',
|
||||||
|
prop: 'value',
|
||||||
|
},
|
||||||
|
],
|
||||||
|
],
|
||||||
|
attrQuery: {
|
||||||
|
params: {
|
||||||
|
pageNo: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
},
|
||||||
|
}, // 属性列表的请求
|
||||||
|
infoQuery: null, // 基本信息的请求
|
||||||
|
attrFormSubmitting: false,
|
||||||
|
attrListLoading: false,
|
||||||
|
syncFileListFlag: null,
|
||||||
|
};
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
formRows() {
|
||||||
|
return this.sections[0].rows.map((row) => {
|
||||||
|
return row.map((col) => {
|
||||||
|
if (col.key == 'eq-pics') {
|
||||||
|
// 重置图片的位置
|
||||||
|
return {
|
||||||
|
...col,
|
||||||
|
bind: {
|
||||||
|
...col.bind,
|
||||||
|
},
|
||||||
|
style: {
|
||||||
|
left: 0,
|
||||||
|
right: 'unset',
|
||||||
|
},
|
||||||
|
};
|
||||||
|
}
|
||||||
|
return {
|
||||||
|
...col,
|
||||||
|
bind: {
|
||||||
|
...col.bind,
|
||||||
|
// 详情 模式下,禁用各种输入
|
||||||
|
disabled: this.mode == 'detail',
|
||||||
|
},
|
||||||
|
};
|
||||||
|
});
|
||||||
|
});
|
||||||
|
},
|
||||||
|
tableBtn() {
|
||||||
|
return this.mode == 'detail' ? [] : this.sections[1].tableBtn;
|
||||||
|
},
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
for (const section of this.sections) {
|
||||||
|
// 请求具体信息
|
||||||
|
if ('url' in section) {
|
||||||
|
const query = {
|
||||||
|
url: section.url,
|
||||||
|
method: section.method || 'get',
|
||||||
|
params: section.queryParams || null,
|
||||||
|
data: section.data || null,
|
||||||
|
};
|
||||||
|
this.$axios(query).then(({ data }) => {
|
||||||
|
if (section.key == 'base') {
|
||||||
|
this.form = data;
|
||||||
|
// this.form = {
|
||||||
|
// code: 'gj',
|
||||||
|
// name: '下片机',
|
||||||
|
// enName: 'unload',
|
||||||
|
// abbr: '',
|
||||||
|
// equipmentTypeId: 21084,
|
||||||
|
// remark: '备注',
|
||||||
|
// id: '1712367395052384257',
|
||||||
|
// createTime: 1697095176000,
|
||||||
|
// enterTime: 0,
|
||||||
|
// productionTime: 0,
|
||||||
|
// files: [
|
||||||
|
// {
|
||||||
|
// fileName: '测试.xlsx',
|
||||||
|
// fileUrl: 'https://nimg.ws.126.net/?url=http%3A%2F%2Fdingyue.ws.126.net%2F2022%2F0108%2F0f0c6f30j00r5cle9000sc000hs00gtc.jpg&thumbnail=660x2147483647&quality=80&type=jpg',
|
||||||
|
// fileType: 1
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// fileName: '测试2.xlsx',
|
||||||
|
// fileUrl: 'https://nimg.ws.126.net/?url=http%3A%2F%2Fdingyue.ws.126.net%2F2022%2F0415%2F2cd23619j00racb96000kc000hs00hsc.jpg&thumbnail=660x2147483647&quality=80&type=jpg',
|
||||||
|
// fileType: 1
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// fileName: '测试3.xlsx',
|
||||||
|
// fileUrl: 'https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fsafe-img.xhscdn.com%2Fbw1%2F1fea91a0-d088-409e-b145-e0e61254b28b%3FimageView2%2F2%2Fw%2F1080%2Fformat%2Fjpg&refer=http%3A%2F%2Fsafe-img.xhscdn.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=auto?sec=1700031689&t=2e0fe7d1de7f54adff3007efe133d67c',
|
||||||
|
// fileType: 1
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// fileName: '测试4.xlsx',
|
||||||
|
// fileUrl: 'https://pics5.baidu.com/feed/b7003af33a87e950cdfb4b4546eed044faf2b40d.jpeg?token=1d7484cfe4b014dd201f8c8725cab945',
|
||||||
|
// fileType: 2
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// fileName: '测试5.xlsx',
|
||||||
|
// fileUrl: 'https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fsafe-img.xhscdn.com%2Fbw1%2Fe3500876-9c46-4b70-8d37-4799520cdd13%3FimageView2%2F2%2Fw%2F1080%2Fformat%2Fjpg&refer=http%3A%2F%2Fsafe-img.xhscdn.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=auto?sec=1700031689&t=4abc1df930e62730e5361a7d3765e0f2',
|
||||||
|
// fileType: 2
|
||||||
|
// },
|
||||||
|
// ],
|
||||||
|
// tvalue: 0,
|
||||||
|
// processingTime: 0,
|
||||||
|
// manufacturer: '',
|
||||||
|
// spec: '',
|
||||||
|
// description: '描述',
|
||||||
|
// };
|
||||||
|
this.showForm = true;
|
||||||
|
this.infoQuery = query;
|
||||||
|
} else if (section.key == 'attrs') {
|
||||||
|
this.attrQuery = query;
|
||||||
|
this.list = data.list;
|
||||||
|
this.total = data.total;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
handleTableBtnClick({ type, data }) {
|
||||||
|
switch (type) {
|
||||||
|
case 'edit':
|
||||||
|
this.handleEditAttr(data.id);
|
||||||
|
break;
|
||||||
|
case 'delete':
|
||||||
|
this.handleDeleteAttr(data.id);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
async handleConfirm() {
|
||||||
|
this.btnLoading = true;
|
||||||
|
this.syncFileListFlag = Math.random();
|
||||||
|
|
||||||
|
this.$nextTick(async () => {
|
||||||
|
const { code, data } = await this.$axios({
|
||||||
|
url: this.sections[0].urlUpdate,
|
||||||
|
method: 'put',
|
||||||
|
data: this.form,
|
||||||
|
});
|
||||||
|
if (code == 0) {
|
||||||
|
this.$modal.msgSuccess('更新成功');
|
||||||
|
this.$emit('refreshDataList');
|
||||||
|
}
|
||||||
|
|
||||||
|
this.btnLoading = false;
|
||||||
|
this.handleCancel();
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
handleEmitFun(val) {
|
||||||
|
console.log('handleEmitFun', val);
|
||||||
|
},
|
||||||
|
|
||||||
|
init() {
|
||||||
|
this.visible = true;
|
||||||
|
},
|
||||||
|
|
||||||
|
async getAttrList() {
|
||||||
|
this.attrListLoading = true;
|
||||||
|
const res = await this.$axios(this.attrQuery);
|
||||||
|
if (res.code == 0) {
|
||||||
|
this.list = res.data.list;
|
||||||
|
this.total = res.data.total;
|
||||||
|
}
|
||||||
|
this.attrListLoading = false;
|
||||||
|
},
|
||||||
|
|
||||||
|
// 保存表单
|
||||||
|
handleSave() {
|
||||||
|
this.$refs['form'][0].validate(async (valid) => {
|
||||||
|
if (valid) {
|
||||||
|
const isEdit = this.mode == 'edit';
|
||||||
|
await this.$axios({
|
||||||
|
url: this.sections[0][isEdit ? 'urlUpdate' : 'urlCreate'],
|
||||||
|
method: isEdit ? 'put' : 'post',
|
||||||
|
data: this.form,
|
||||||
|
});
|
||||||
|
this.$modal.msgSuccess(`${isEdit ? '更新' : '创建'}成功`);
|
||||||
|
this.visible = false;
|
||||||
|
this.$emit('refreshDataList');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
handleCancel() {
|
||||||
|
this.visible = false;
|
||||||
|
},
|
||||||
|
|
||||||
|
// 开启编辑
|
||||||
|
toggleEdit() {
|
||||||
|
this.$emit('update-mode', 'edit');
|
||||||
|
},
|
||||||
|
|
||||||
|
// 新增属性
|
||||||
|
handleAddAttr() {
|
||||||
|
if (!this.dataId) return this.$message.warning('请先创建设备信息');
|
||||||
|
this.attrForm = {
|
||||||
|
id: null,
|
||||||
|
equipmentId: this.dataId,
|
||||||
|
name: '',
|
||||||
|
value: '',
|
||||||
|
};
|
||||||
|
this.attrTitle = '添加设备属性';
|
||||||
|
this.attrFormVisible = true;
|
||||||
|
},
|
||||||
|
|
||||||
|
// 编辑属性
|
||||||
|
async handleEditAttr(attrId) {
|
||||||
|
const res = await this.$axios({
|
||||||
|
url: this.sections[1].urlDetail,
|
||||||
|
method: 'get',
|
||||||
|
params: { id: attrId },
|
||||||
|
});
|
||||||
|
if (res.code == 0) {
|
||||||
|
this.attrForm = res.data;
|
||||||
|
this.attrTitle = '编辑设备属性';
|
||||||
|
this.attrFormVisible = true;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
// 删除属性
|
||||||
|
handleDeleteAttr(attrId) {
|
||||||
|
this.$confirm('确定删除该属性?', '提示', {
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
type: 'warning',
|
||||||
|
})
|
||||||
|
.then(async () => {
|
||||||
|
const res = await this.$axios({
|
||||||
|
url: this.sections[1].urlDelete,
|
||||||
|
method: 'delete',
|
||||||
|
params: { id: attrId },
|
||||||
|
});
|
||||||
|
if (res.code == 0) {
|
||||||
|
this.$message({
|
||||||
|
message: '删除成功',
|
||||||
|
type: 'success',
|
||||||
|
duration: 1500,
|
||||||
|
onClose: () => {
|
||||||
|
this.getAttrList();
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.catch(() => {});
|
||||||
|
},
|
||||||
|
|
||||||
|
// 提交属性表
|
||||||
|
submitAttrForm() {
|
||||||
|
this.$refs['attrForm'].validate(async (valid) => {
|
||||||
|
if (!valid) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
|
const isEdit = this.attrForm.id != null;
|
||||||
|
this.attrFormSubmitting = true;
|
||||||
|
const res = await this.$axios({
|
||||||
|
url: isEdit
|
||||||
|
? this.sections[1].urlUpdate
|
||||||
|
: this.sections[1].urlCreate,
|
||||||
|
method: isEdit ? 'put' : 'post',
|
||||||
|
data: this.attrForm,
|
||||||
|
});
|
||||||
|
|
||||||
|
if (res.code == 0) {
|
||||||
|
this.closeAttrForm();
|
||||||
|
this.$message({
|
||||||
|
message: `${isEdit ? '更新' : '创建'}成功`,
|
||||||
|
type: 'success',
|
||||||
|
duration: 1500,
|
||||||
|
onClose: () => {
|
||||||
|
this.getAttrList();
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
|
this.attrFormSubmitting = false;
|
||||||
|
} catch (err) {
|
||||||
|
this.$message({
|
||||||
|
message: err,
|
||||||
|
type: 'error',
|
||||||
|
duration: 1500,
|
||||||
|
});
|
||||||
|
this.attrFormSubmitting = false;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
closeAttrForm() {
|
||||||
|
this.attrFormVisible = false;
|
||||||
|
},
|
||||||
|
|
||||||
|
handleClick(raw) {
|
||||||
|
if (raw.type === 'delete') {
|
||||||
|
this.$confirm(
|
||||||
|
`确定对${
|
||||||
|
raw.data.name
|
||||||
|
? '[名称=' + raw.data.name + ']'
|
||||||
|
: '[序号=' + raw.data._pageIndex + ']'
|
||||||
|
}进行删除操作?`,
|
||||||
|
'提示',
|
||||||
|
{
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
type: 'warning',
|
||||||
|
}
|
||||||
|
)
|
||||||
|
.then(() => {
|
||||||
|
deleteProductAttr(raw.data.id).then(({ data }) => {
|
||||||
|
this.$message({
|
||||||
|
message: '操作成功',
|
||||||
|
type: 'success',
|
||||||
|
duration: 1500,
|
||||||
|
onClose: () => {
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
});
|
||||||
|
});
|
||||||
|
})
|
||||||
|
.catch(() => {});
|
||||||
|
} else {
|
||||||
|
this.addNew(raw.data.id);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.drawer >>> .el-drawer {
|
||||||
|
border-radius: 8px 0 0 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.drawer >>> .el-drawer__header {
|
||||||
|
margin: 0;
|
||||||
|
padding: 32px 32px 24px;
|
||||||
|
border-bottom: 1px solid #dcdfe6;
|
||||||
|
margin-bottom: 0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.small-title::before {
|
||||||
|
content: '';
|
||||||
|
display: inline-block;
|
||||||
|
vertical-align: top;
|
||||||
|
width: 4px;
|
||||||
|
height: 22px;
|
||||||
|
border-radius: 1px;
|
||||||
|
margin-right: 8px;
|
||||||
|
background-color: #0b58ff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.drawer-body {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.drawer-body__content {
|
||||||
|
flex: 1;
|
||||||
|
/* background: #eee; */
|
||||||
|
padding: 20px 30px;
|
||||||
|
overflow-y: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.drawer-body__footer {
|
||||||
|
display: flex;
|
||||||
|
justify-content: flex-end;
|
||||||
|
padding: 18px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
277
src/views/areavisual/record/index.vue
Normal file
@@ -0,0 +1,277 @@
|
|||||||
|
<template>
|
||||||
|
<div class="app-container">
|
||||||
|
<!-- 搜索工作栏 -->
|
||||||
|
<SearchBar
|
||||||
|
:formConfigs="searchBarFormConfig"
|
||||||
|
ref="search-bar"
|
||||||
|
isFold
|
||||||
|
@headBtnClick="handleSearchBarBtnClick" />
|
||||||
|
|
||||||
|
<!-- 列表 -->
|
||||||
|
<base-table
|
||||||
|
:table-props="tableProps"
|
||||||
|
:page="queryParams.pageNo"
|
||||||
|
:limit="queryParams.pageSize"
|
||||||
|
:table-data="list"
|
||||||
|
@emitFun="handleEmitFun">
|
||||||
|
<method-btn
|
||||||
|
v-if="tableBtn.length"
|
||||||
|
slot="handleBtn"
|
||||||
|
:width="120"
|
||||||
|
label="操作"
|
||||||
|
:method-list="tableBtn"
|
||||||
|
@clickBtn="handleTableBtnClick" />
|
||||||
|
</base-table>
|
||||||
|
|
||||||
|
<!-- 分页组件 -->
|
||||||
|
<pagination
|
||||||
|
v-show="total > 0"
|
||||||
|
:total="total"
|
||||||
|
:page.sync="queryParams.pageNo"
|
||||||
|
:limit.sync="queryParams.pageSize"
|
||||||
|
@pagination="getList" />
|
||||||
|
|
||||||
|
<!-- 设备 详情 - 编辑 -->
|
||||||
|
<RecordDrawer
|
||||||
|
v-if="open"
|
||||||
|
ref="drawer"
|
||||||
|
:mode="editMode"
|
||||||
|
@update-mode="editMode = $event"
|
||||||
|
:data-id="form.id"
|
||||||
|
@refreshDataList="getList"
|
||||||
|
@cancel="cancelEdit"
|
||||||
|
@destroy="cancelEdit" />
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import moment from 'moment';
|
||||||
|
import basicPageMixin from '@/mixins/lb/basicPageMixin';
|
||||||
|
import RecordDrawer from './components/RecordDrawer';
|
||||||
|
import { getRecordPage, getLaneList } from '@/api/areavisual/record';
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'Equipment',
|
||||||
|
components: {
|
||||||
|
RecordDrawer,
|
||||||
|
},
|
||||||
|
mixins: [basicPageMixin],
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
searchBarKeys: ['name', 'code'],
|
||||||
|
// this.$auth.hasPermi(`base:equipment:update`)
|
||||||
|
tableBtn: [
|
||||||
|
{
|
||||||
|
type: 'detail',
|
||||||
|
btnName: '详情'
|
||||||
|
}
|
||||||
|
].filter((v) => v),
|
||||||
|
tableProps: [
|
||||||
|
{
|
||||||
|
prop: 'recordCode',
|
||||||
|
label: '出/入库单编号',
|
||||||
|
fixed: true,
|
||||||
|
width: 180,
|
||||||
|
// filter: (val) => moment(val).format('yyyy-MM-DD HH:mm:ss'),
|
||||||
|
// showOverflowtooltip: true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'type',
|
||||||
|
label: '业务类型',
|
||||||
|
filter: (val) => val === 1 ? '出库' : '入库',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
width: 180,
|
||||||
|
prop: 'recordTime',
|
||||||
|
label: '出/入库时间',
|
||||||
|
filter: (val) => moment(val).format('yyyy-MM-DD HH:mm:ss')
|
||||||
|
},
|
||||||
|
{ prop: 'recordArea', label: '出/入库库区' },
|
||||||
|
{ prop: 'recordLane', label: '出/入库巷道' },
|
||||||
|
{ prop: 'recordRegion', label: '出/入库库位号' },
|
||||||
|
{ prop: 'target', label: '搬运对象' },
|
||||||
|
{ prop: 'productName', label: '产品名称' },
|
||||||
|
{ prop: 'specification', label: '型号规格' },
|
||||||
|
{ prop: 'recordMan', label: '出/入库人' },
|
||||||
|
{ prop: 'remark', label: '备注' }
|
||||||
|
],
|
||||||
|
searchBarFormConfig: [
|
||||||
|
{
|
||||||
|
type: 'input',
|
||||||
|
label: '关键字',
|
||||||
|
placeholder: '请输入出/入库编码、产品名称、规格型号、库位号',
|
||||||
|
param: 'query',
|
||||||
|
width: 350
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: 'select',
|
||||||
|
label: '业务类型',
|
||||||
|
selectOptions: [
|
||||||
|
{
|
||||||
|
id: '1',
|
||||||
|
name:'出库'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: '2',
|
||||||
|
name:'入库'
|
||||||
|
},
|
||||||
|
],
|
||||||
|
placeholder: '请选择业务类型',
|
||||||
|
param: 'type',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: 'select',
|
||||||
|
label: '出/入库巷道',
|
||||||
|
selectOptions: [],
|
||||||
|
placeholder: '请选择出/入库巷道',
|
||||||
|
param: 'recordLane',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: 'select',
|
||||||
|
label: '来源',
|
||||||
|
selectOptions: [
|
||||||
|
{
|
||||||
|
id: '1',
|
||||||
|
name:'WMS'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: '2',
|
||||||
|
name:'MES'
|
||||||
|
},
|
||||||
|
],
|
||||||
|
placeholder: '请选择来源',
|
||||||
|
param: 'source',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: 'select',
|
||||||
|
label: '出/入库人',
|
||||||
|
selectOptions: [],
|
||||||
|
placeholder: '请选择出/入库人',
|
||||||
|
param: 'recordMan',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: 'datePicker',
|
||||||
|
label: '出/入库时间',
|
||||||
|
placeholder: '请选择出/入库时间',
|
||||||
|
param: 'recordTime',
|
||||||
|
dateType: 'datetimerange',
|
||||||
|
rangeSeparator: '至'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: 'select',
|
||||||
|
label: '载具类型',
|
||||||
|
selectOptions: [
|
||||||
|
{
|
||||||
|
id: '1',
|
||||||
|
name:'AGV'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: '2',
|
||||||
|
name:'人工叉车'
|
||||||
|
},
|
||||||
|
],
|
||||||
|
placeholder: '请选择载具类型',
|
||||||
|
param: 'vehicleType',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: 'button',
|
||||||
|
btnName: '查询',
|
||||||
|
name: 'search',
|
||||||
|
color: 'primary',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: 'button',
|
||||||
|
btnName: '重置',
|
||||||
|
name: 'reset',
|
||||||
|
color: 'info',
|
||||||
|
}
|
||||||
|
],
|
||||||
|
editVisible: false,
|
||||||
|
editMode: 'detail', // 'edit', 'detail'
|
||||||
|
// 是否显示弹出层
|
||||||
|
open: false,
|
||||||
|
// 查询参数
|
||||||
|
queryParams: {
|
||||||
|
pageNo: 1,
|
||||||
|
pageSize: 20,
|
||||||
|
query: '',
|
||||||
|
type: '',
|
||||||
|
source: '',
|
||||||
|
recordLane: '',
|
||||||
|
recordMan: '',
|
||||||
|
recordTime: '',
|
||||||
|
vehicleType: ''
|
||||||
|
},
|
||||||
|
form: {}
|
||||||
|
};
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.getLane()
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
computed: {},
|
||||||
|
methods: {
|
||||||
|
/** 查询列表 */
|
||||||
|
getList() {
|
||||||
|
this.loading = true;
|
||||||
|
// 执行查询
|
||||||
|
getRecordPage(this.queryParams).then((response) => {
|
||||||
|
console.log(response)
|
||||||
|
this.list = response.data.list;
|
||||||
|
this.total = response.data.total;
|
||||||
|
this.loading = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
async getLane() {
|
||||||
|
const res = await getLaneList({
|
||||||
|
pageNo: 1,
|
||||||
|
pageSize: 100
|
||||||
|
})
|
||||||
|
if (res.code === 0 && res.data) {
|
||||||
|
console.log(res.data)
|
||||||
|
this.searchBarFormConfig[2].selectOptions = res.data.list.map(item => {
|
||||||
|
return { id: item.id, name: item.lane }
|
||||||
|
})
|
||||||
|
console.log(this.searchBarFormConfig)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
/** 取消按钮 */
|
||||||
|
cancel() {
|
||||||
|
this.open = false;
|
||||||
|
},
|
||||||
|
// /** 导出按钮操作 */
|
||||||
|
// handleExport() {
|
||||||
|
// // 处理查询参数
|
||||||
|
// let params = { ...this.queryParams };
|
||||||
|
// params.pageNo = undefined;
|
||||||
|
// params.pageSize = undefined;
|
||||||
|
// this.$modal
|
||||||
|
// .confirm('是否确认导出所有设备数据项?')
|
||||||
|
// .then(() => {
|
||||||
|
// this.exportLoading = true;
|
||||||
|
// return exportEquipmentExcel(params);
|
||||||
|
// })
|
||||||
|
// .then((response) => {
|
||||||
|
// this.$download.excel(response, '设备.xls');
|
||||||
|
// this.exportLoading = false;
|
||||||
|
// })
|
||||||
|
// .catch(() => {});
|
||||||
|
// },
|
||||||
|
handleTableBtnClick ({data, type}) {
|
||||||
|
switch (type) {
|
||||||
|
case 'detail':
|
||||||
|
this.viewDetail(data.id)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 查看详情
|
||||||
|
viewDetail(id) {
|
||||||
|
this.editMode = 'detail';
|
||||||
|
this.open = true;
|
||||||
|
this.form.id = id;
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$refs['drawer'].init();
|
||||||
|
});
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
65
src/views/cost/components/SmallTitle.vue
Normal file
@@ -0,0 +1,65 @@
|
|||||||
|
<!--
|
||||||
|
* @Author: zwq
|
||||||
|
* @Date: 2023-08-01 15:27:31
|
||||||
|
* @LastEditors: zwq
|
||||||
|
* @LastEditTime: 2023-08-01 16:25:54
|
||||||
|
* @Description:
|
||||||
|
-->
|
||||||
|
<template>
|
||||||
|
<div :class="[className, { 'p-0': noPadding }]">
|
||||||
|
<slot />
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
props: {
|
||||||
|
size: {
|
||||||
|
// 取值范围: xl lg md sm
|
||||||
|
type: String,
|
||||||
|
default: 'de',
|
||||||
|
validator: function (val) {
|
||||||
|
return ['xl', 'lg', 'de', 'md', 'sm'].indexOf(val) !== -1;
|
||||||
|
},
|
||||||
|
},
|
||||||
|
noPadding: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
className: function () {
|
||||||
|
return `${this.size}-title`;
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
$pxls: (xl, 28px) (lg, 24px) (de, 20px) (md, 18px) (sm, 16px);
|
||||||
|
$mgr: 8px;
|
||||||
|
@each $size, $height in $pxls {
|
||||||
|
.#{$size}-title {
|
||||||
|
font-size: $height;
|
||||||
|
line-height: $height;
|
||||||
|
color: #000;
|
||||||
|
font-weight: 500;
|
||||||
|
font-family: '微软雅黑', 'Microsoft YaHei', Arial, Helvetica, sans-serif;
|
||||||
|
|
||||||
|
&::before {
|
||||||
|
content: '';
|
||||||
|
display: inline-block;
|
||||||
|
vertical-align: top;
|
||||||
|
width: 4px;
|
||||||
|
height: $height + 2px;
|
||||||
|
border-radius: 1px;
|
||||||
|
margin-right: $mgr;
|
||||||
|
background-color: #0b58ff;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.p-0 {
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
442
src/views/cost/components/add-or-updata.vue
Normal file
@@ -0,0 +1,442 @@
|
|||||||
|
<!--
|
||||||
|
* @Author: zwq
|
||||||
|
* @Date: 2025-10-13 15:07:24
|
||||||
|
* @LastEditors: zwq
|
||||||
|
* @LastEditTime: 2025-11-07 15:35:14
|
||||||
|
* @Description:
|
||||||
|
-->
|
||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<div class="circle-container">
|
||||||
|
<div v-for="(item, index) in dotArr" :key="index" class="circle-wrapper">
|
||||||
|
<div
|
||||||
|
class="circle"
|
||||||
|
:style="{
|
||||||
|
background: stepNum == index + 1 ? '#0B58FF' : '',
|
||||||
|
}">
|
||||||
|
{{ index + 1 }}
|
||||||
|
</div>
|
||||||
|
<div
|
||||||
|
class="circle-text"
|
||||||
|
:style="{
|
||||||
|
color: stepNum == index + 1 ? '#0B58FF' : '',
|
||||||
|
}">
|
||||||
|
{{ item.name }}
|
||||||
|
</div>
|
||||||
|
<!-- 圆点后面的虚线 -->
|
||||||
|
<div v-if="index < 2" class="connector" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div v-if="stepNum == 1">
|
||||||
|
<div class="topTip">
|
||||||
|
1.可选择库区、巷道,同批次创建任务搬运仅支持同一产品型号。
|
||||||
|
<br />
|
||||||
|
2.须在本页下方填写搬运数量,搬运数量仅支持双数,且数量≤当前可用库存总量。
|
||||||
|
</div>
|
||||||
|
<small-title style="margin: 16px 0" size="sm" :no-padding="true">
|
||||||
|
步骤一:选择产品及起点
|
||||||
|
</small-title>
|
||||||
|
<el-form
|
||||||
|
:model="dataForm"
|
||||||
|
:rules="dataRule"
|
||||||
|
ref="dataForm"
|
||||||
|
@keyup.enter.native="dataFormSubmit()"
|
||||||
|
label-position="top"
|
||||||
|
label-width="80px">
|
||||||
|
<el-row :gutter="10">
|
||||||
|
<el-col :span="6">
|
||||||
|
<el-form-item label="搬运对象" prop="val1">
|
||||||
|
<el-select
|
||||||
|
style="width: 100%"
|
||||||
|
v-model="dataForm.val1"
|
||||||
|
placeholder="请选择搬运对象">
|
||||||
|
<el-option
|
||||||
|
v-for="item in options1"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="6" v-if="dataForm.val1 == 1">
|
||||||
|
<el-form-item label="产品名称" prop="val1">
|
||||||
|
<el-select
|
||||||
|
style="width: 100%"
|
||||||
|
v-model="dataForm.val2"
|
||||||
|
placeholder="请选择产品名称">
|
||||||
|
<el-option
|
||||||
|
v-for="item in options1"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="6" v-if="dataForm.val1 == 1">
|
||||||
|
<el-form-item label="规格型号" prop="val1">
|
||||||
|
<el-select
|
||||||
|
style="width: 100%"
|
||||||
|
v-model="dataForm.val2"
|
||||||
|
placeholder="请选择规格型号">
|
||||||
|
<el-option
|
||||||
|
v-for="item in options1"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="6">
|
||||||
|
<el-form-item label="搬运数量" prop="val4">
|
||||||
|
<el-input
|
||||||
|
v-model="dataForm.val4"
|
||||||
|
oninput="value=value.replace(/^(0+)|[^\d]+/g,'')">
|
||||||
|
<template slot="append">盘</template>
|
||||||
|
</el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row :gutter="10">
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="起点信息" prop="val5">
|
||||||
|
<el-radio-group v-model="dataForm.val5">
|
||||||
|
<el-radio :label="1">按策略自动选择</el-radio>
|
||||||
|
<el-radio :label="2">指定起点</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-form>
|
||||||
|
<div v-if="dataForm.val5 == 2" class="potBG-div">
|
||||||
|
<div>
|
||||||
|
<el-row :gutter="10">
|
||||||
|
<el-col :span="10">
|
||||||
|
起点库区:
|
||||||
|
<el-select
|
||||||
|
style="width: 200px; margin-left: 10px"
|
||||||
|
v-model="startPot"
|
||||||
|
size="small"
|
||||||
|
placeholder="请选择起点库区">
|
||||||
|
<el-option
|
||||||
|
v-for="item in options1"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="13" style="text-align: right; line-height: 36px">
|
||||||
|
<span
|
||||||
|
class="num1-startPot-status"
|
||||||
|
style="background-color: #5ab45a" />
|
||||||
|
可选
|
||||||
|
<span class="num1-startPot-status" />
|
||||||
|
不可选
|
||||||
|
<span
|
||||||
|
class="num1-startPot-status"
|
||||||
|
style="background-color: #e9b100" />
|
||||||
|
已选
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<div class="potTitleBG">
|
||||||
|
<div v-for="item in Object.keys(startPotList)" :key="item">
|
||||||
|
<div class="potTitle">
|
||||||
|
{{ item }}
|
||||||
|
</div>
|
||||||
|
<div class="potList">
|
||||||
|
<div
|
||||||
|
class="pot"
|
||||||
|
v-for="sitem in startPotList[item]"
|
||||||
|
:key="sitem.id"
|
||||||
|
:style="{
|
||||||
|
backgroundColor: potBGcolor[sitem.status],
|
||||||
|
cursor: sitem.status > 0 ? 'pointer' : '',
|
||||||
|
}"
|
||||||
|
@click="sitem.status > 0 && setStartPot(sitem)"
|
||||||
|
:title="sitem.name">
|
||||||
|
{{ sitem.name }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<el-divider></el-divider>
|
||||||
|
<div style="text-align: right">可用库存总量 <span style="color:#409EFF;font-size:16px">12</span> 盘</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div v-if="stepNum == 2">
|
||||||
|
<div class="topTip">
|
||||||
|
1.指定终点库位,下发后会锁定所属巷道仅本批次任务进入。
|
||||||
|
<br />
|
||||||
|
2.指定终点库位选位规则:仅可从巷道最里空对位选位。
|
||||||
|
<br />
|
||||||
|
3.只选择库区或巷道时,该方式下当前终点为候选位置,系统将根据策略与现场实际情况自动确定最终终点库位。
|
||||||
|
</div>
|
||||||
|
<small-title style="margin: 16px 0" size="sm" :no-padding="true">
|
||||||
|
步骤二:选择终点
|
||||||
|
</small-title>
|
||||||
|
</div>
|
||||||
|
<div v-if="stepNum == 3">
|
||||||
|
<small-title style="margin: 16px 0" size="sm" :no-padding="true">
|
||||||
|
步骤三:预览与下发
|
||||||
|
</small-title>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import SmallTitle from './SmallTitle';
|
||||||
|
export default {
|
||||||
|
components: {
|
||||||
|
SmallTitle,
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
dotArr: [
|
||||||
|
{
|
||||||
|
name: '选择起点',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '选择终点',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '预览下发',
|
||||||
|
},
|
||||||
|
],
|
||||||
|
potBGcolor: ['', '#dafadc', '#f8f0c4'],
|
||||||
|
stepNum: 1, // 当前第几步
|
||||||
|
//第一步参数
|
||||||
|
dataForm: {
|
||||||
|
id: undefined,
|
||||||
|
val1: undefined,
|
||||||
|
val2: undefined,
|
||||||
|
val3: undefined,
|
||||||
|
val4: undefined,
|
||||||
|
val5: 1,
|
||||||
|
},
|
||||||
|
options1: [
|
||||||
|
{
|
||||||
|
label: '产品',
|
||||||
|
value: 1,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '空盘',
|
||||||
|
value: 2,
|
||||||
|
},
|
||||||
|
],
|
||||||
|
dataRule: {},
|
||||||
|
startPot: undefined, //起点库区选择的类型
|
||||||
|
startPotList: {
|
||||||
|
//起点库区List
|
||||||
|
G01: [
|
||||||
|
{
|
||||||
|
id: '001',
|
||||||
|
name: 'L001',
|
||||||
|
status: 1,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: '002',
|
||||||
|
name: 'R002',
|
||||||
|
status: 1,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: '003',
|
||||||
|
name: 'L003',
|
||||||
|
status: 0,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: '004',
|
||||||
|
name: 'R004',
|
||||||
|
status: 0,
|
||||||
|
},
|
||||||
|
],
|
||||||
|
G02: [
|
||||||
|
{
|
||||||
|
id: '005',
|
||||||
|
name: 'L005',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: '006',
|
||||||
|
name: 'R006',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: '007',
|
||||||
|
name: 'L007',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: '008',
|
||||||
|
name: 'R008',
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
};
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
init(id) {
|
||||||
|
this.dataForm.id = id || undefined;
|
||||||
|
this.$nextTick(() => {
|
||||||
|
if (this.dataForm.id) {
|
||||||
|
} else {
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
//上一步
|
||||||
|
upSubmit() {
|
||||||
|
if (this.stepNum == 2) {
|
||||||
|
this.stepNum -= 1;
|
||||||
|
this.$emit('setSN', this.stepNum);
|
||||||
|
} else if (this.stepNum == 3) {
|
||||||
|
this.stepNum -= 1;
|
||||||
|
this.$emit('setSN', this.stepNum);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
//下一步
|
||||||
|
nextSubmit() {
|
||||||
|
if (this.stepNum == 1) {
|
||||||
|
this.stepNum += 1;
|
||||||
|
this.$emit('setSN', this.stepNum);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (this.stepNum == 2) {
|
||||||
|
this.stepNum += 1;
|
||||||
|
this.$emit('setSN', this.stepNum);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (this.stepNum == 3) {
|
||||||
|
this.stepNum = 1;
|
||||||
|
this.$emit('setSN', this.stepNum);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
cancelStep() {},
|
||||||
|
|
||||||
|
// 第一步方法
|
||||||
|
setStartPot(data) {
|
||||||
|
data.status = data.status == 1 ? 2 : 1;
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.topTip {
|
||||||
|
background-color: #ebebeb;
|
||||||
|
padding: 10px 20px;
|
||||||
|
border-radius: 5px;
|
||||||
|
line-height: 25px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
<!-- //库位点的样式 -->
|
||||||
|
<style scoped>
|
||||||
|
.potBG-div {
|
||||||
|
width: 100%;
|
||||||
|
margin: 10px;
|
||||||
|
border: 1px solid gainsboro;
|
||||||
|
box-shadow: 2px 2px 2px gainsboro, -1px -1px 3px gainsboro;
|
||||||
|
padding: 15px;
|
||||||
|
}
|
||||||
|
.num1-startPot-status {
|
||||||
|
margin-left: 5px;
|
||||||
|
display: inline-block;
|
||||||
|
width: 14px;
|
||||||
|
height: 14px;
|
||||||
|
border: 1px solid gainsboro;
|
||||||
|
}
|
||||||
|
.potTitleBG {
|
||||||
|
margin-top: 10px;
|
||||||
|
overflow-x: auto;
|
||||||
|
display: flex;
|
||||||
|
}
|
||||||
|
.potTitle {
|
||||||
|
width: 82px;
|
||||||
|
background-color: rgb(169, 235, 249);
|
||||||
|
border-radius: 3px;
|
||||||
|
margin-right: 5px;
|
||||||
|
text-align: center;
|
||||||
|
color: #000000;
|
||||||
|
letter-spacing: 1px;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
}
|
||||||
|
.potList {
|
||||||
|
width: 82px;
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: 40px 40px;
|
||||||
|
gap: 2px;
|
||||||
|
}
|
||||||
|
.pot {
|
||||||
|
width: 40px;
|
||||||
|
text-align: center;
|
||||||
|
border: 1px solid gainsboro;
|
||||||
|
border-radius: 3px;
|
||||||
|
padding: 5px 0;
|
||||||
|
margin-bottom: 5px;
|
||||||
|
white-space: nowrap;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<!-- //序号圆点 -->
|
||||||
|
<style scoped>
|
||||||
|
.circle-container {
|
||||||
|
height: 110px;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
padding: 20px;
|
||||||
|
width: 90%;
|
||||||
|
overflow-x: auto;
|
||||||
|
margin: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.circle-wrapper {
|
||||||
|
position: relative;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.circle {
|
||||||
|
width: 52px;
|
||||||
|
height: 52px;
|
||||||
|
border-radius: 50%;
|
||||||
|
background: #8db1ff;
|
||||||
|
font-weight: 500;
|
||||||
|
font-size: 31px;
|
||||||
|
color: #ffffff;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
position: relative;
|
||||||
|
z-index: 2;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
.circle-text {
|
||||||
|
position: absolute;
|
||||||
|
top: 60px;
|
||||||
|
left: -15px;
|
||||||
|
color: #8db1ff;
|
||||||
|
width: 82px;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 下半圆虚线边框 */
|
||||||
|
.circle::after {
|
||||||
|
content: '';
|
||||||
|
position: absolute;
|
||||||
|
bottom: -6px; /* 2px边框 + 2px间隙 */
|
||||||
|
left: -4px;
|
||||||
|
right: -4px;
|
||||||
|
height: 30px; /* 半圆高度 */
|
||||||
|
border-radius: 0 0 60px 60px;
|
||||||
|
border: 1px dashed #0b58ff;
|
||||||
|
border-top: none;
|
||||||
|
z-index: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.connector {
|
||||||
|
width: 160px; /* 计算连接线长度 */
|
||||||
|
height: 2px;
|
||||||
|
border-bottom: 1px dashed rgb(11, 88, 255, 1);
|
||||||
|
margin: 0 5px;
|
||||||
|
z-index: 1;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
273
src/views/cost/components/detailDrawer.vue
Normal file
@@ -0,0 +1,273 @@
|
|||||||
|
<!--
|
||||||
|
* @Author: zwq
|
||||||
|
* @Date: 2025-11-07 17:01:51
|
||||||
|
* @LastEditors: zwq
|
||||||
|
* @LastEditTime: 2025-11-07 22:31:17
|
||||||
|
* @Description:
|
||||||
|
-->
|
||||||
|
<template>
|
||||||
|
<el-drawer
|
||||||
|
:visible.sync="visible"
|
||||||
|
:with-header="false"
|
||||||
|
size="50%"
|
||||||
|
@close="closeD"
|
||||||
|
:show-close="false">
|
||||||
|
<div class="bgDiv1">
|
||||||
|
<el-row :gutter="20" style="margin-bottom: 15px">
|
||||||
|
<el-col :span="8" style="font-size: 20px; font-weight: 600">
|
||||||
|
TSK202510230001
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">满盘搬运(自动)</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
上次刷新:{{ parseTime(Date.now()) }}
|
||||||
|
<el-button type="text" @click="refresh">刷新</el-button>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row :gutter="20">
|
||||||
|
<el-col :span="8">任务状态</el-col>
|
||||||
|
<el-col :span="8">优先级</el-col>
|
||||||
|
<el-col :span="8">执行车辆</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row :gutter="20" style="margin-bottom: 15px">
|
||||||
|
<el-col :span="8">
|
||||||
|
<span
|
||||||
|
:style="{ backgroundColor: statusColor[1].color }"
|
||||||
|
class="taskStatus">
|
||||||
|
{{ statusColor[1].label }}
|
||||||
|
</span>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">中</el-col>
|
||||||
|
<el-col :span="8">--</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row :gutter="20">
|
||||||
|
<el-col :span="8">执行时长</el-col>
|
||||||
|
<el-col :span="8">创建人</el-col>
|
||||||
|
<el-col :span="8">创建时间</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row :gutter="20">
|
||||||
|
<el-col :span="8">--</el-col>
|
||||||
|
<el-col :span="8">系统/张三</el-col>
|
||||||
|
<el-col :span="8">{{ parseTime(Date.now()) }}</el-col>
|
||||||
|
</el-row>
|
||||||
|
</div>
|
||||||
|
<div class="bgDiv2">
|
||||||
|
<el-steps
|
||||||
|
:active="stepNum"
|
||||||
|
finish-status="success"
|
||||||
|
:process-status="stepStatus"
|
||||||
|
align-center>
|
||||||
|
<el-step title="待下发"></el-step>
|
||||||
|
<el-step title="待执行"></el-step>
|
||||||
|
<el-step title="执行中"></el-step>
|
||||||
|
<el-step title="已完成"></el-step>
|
||||||
|
</el-steps>
|
||||||
|
<div class="abnormal">任务异常:无效路径</div>
|
||||||
|
</div>
|
||||||
|
<div class="bgDiv3">
|
||||||
|
<small-title style="margin: 0 0 8px 0" size="sm" :no-padding="true">
|
||||||
|
搬运对象
|
||||||
|
</small-title>
|
||||||
|
<el-row :gutter="20">
|
||||||
|
<el-col :span="12">
|
||||||
|
<div class="pan-info">
|
||||||
|
<div class="pan-title">L盘</div>
|
||||||
|
</div>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<div class="pan-info">
|
||||||
|
<div class="pan-title">R盘</div>
|
||||||
|
</div>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</div>
|
||||||
|
<div class="bgDiv4">
|
||||||
|
<small-title style="margin: 0 0 8px 0" size="sm" :no-padding="true">
|
||||||
|
回收信息
|
||||||
|
</small-title>
|
||||||
|
<el-descriptions :column="2" size="medium" border>
|
||||||
|
<el-descriptions-item label="回收方式">他车回收</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="回收任务编号">
|
||||||
|
18100000000
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="回收库位">
|
||||||
|
CK-01-A05-L / R
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="执行车辆">AGV-06</el-descriptions-item>
|
||||||
|
</el-descriptions>
|
||||||
|
</div>
|
||||||
|
<div class="bgDiv5">
|
||||||
|
<small-title style="margin: 0 0 8px 0" size="sm" :no-padding="true">
|
||||||
|
任务明细
|
||||||
|
</small-title>
|
||||||
|
<el-descriptions :column="2" size="medium" border>
|
||||||
|
<el-descriptions-item label="起点库位(L/R)">
|
||||||
|
CK-01-A05-L / R
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="终点库位(L/R)">
|
||||||
|
CC-02-B03-L/R (候选 )
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="起点策略">--</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="终点策略">入库策略</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="FMS任务号">--</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="车辆位置">--</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="电量">--</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="是否载货">--</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="创建方式">自动/人工</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="任务来源">
|
||||||
|
PDA/PC/系统
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="关联叫料单">--</el-descriptions-item>
|
||||||
|
<el-descriptions-item label=""></el-descriptions-item>
|
||||||
|
</el-descriptions>
|
||||||
|
</div>
|
||||||
|
<div class="bgDiv6">
|
||||||
|
<small-title style="margin: 0 0 8px 0" size="sm" :no-padding="true">
|
||||||
|
任务日志
|
||||||
|
</small-title>
|
||||||
|
<el-timeline style="padding: 0">
|
||||||
|
<el-timeline-item
|
||||||
|
v-for="(activity, index) in activities"
|
||||||
|
:key="index"
|
||||||
|
:type="activity.type"
|
||||||
|
:color="activity.color"
|
||||||
|
size="large"
|
||||||
|
hide-timestamp>
|
||||||
|
<span>{{ activity.content }}</span>
|
||||||
|
<span style="float: right">{{ activity.timestamp }}</span>
|
||||||
|
</el-timeline-item>
|
||||||
|
</el-timeline>
|
||||||
|
</div>
|
||||||
|
<el-divider></el-divider>
|
||||||
|
|
||||||
|
<!-- 底部按钮 -->
|
||||||
|
<div class="drawer-body__footer">
|
||||||
|
<el-button @click="closeD">返 回</el-button>
|
||||||
|
</div>
|
||||||
|
</el-drawer>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
import SmallTitle from './SmallTitle';
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: '',
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
visible: false,
|
||||||
|
title: '',
|
||||||
|
statusColor: [
|
||||||
|
//bgDiv1的任务状态
|
||||||
|
{ label: '待下发', color: '#fa8c16' },
|
||||||
|
{ label: '待执行', color: '#1890ff' },
|
||||||
|
{ label: '执行中', color: '#1890ff' },
|
||||||
|
{ label: '已完成', color: '#52c41a' },
|
||||||
|
{ label: '暂停中', color: '#8c8c8c' },
|
||||||
|
{ label: '已终止', color: '#faad14' },
|
||||||
|
{ label: '异常', color: '#ff4d4f' },
|
||||||
|
{ label: '禁用', color: '#d9d9d9' },
|
||||||
|
],
|
||||||
|
//bgDiv2的步骤条
|
||||||
|
stepNum: 2,
|
||||||
|
stepStatus: 'finish',
|
||||||
|
//bgDiv6的时间线
|
||||||
|
|
||||||
|
activities: [
|
||||||
|
{
|
||||||
|
content: 'FMS | 卸货完成,任务完成',
|
||||||
|
timestamp: '2018-04-12 20:46',
|
||||||
|
type: 'primary',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
content: 'FMS | 取货完成',
|
||||||
|
timestamp: '2018-04-03 20:46',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
content: 'FMS | 派车AGV-03,前往起点取货',
|
||||||
|
timestamp: '2018-04-03 20:46',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
content: '张三 | 任务扫码配对完成,进入待下发',
|
||||||
|
timestamp: '2018-04-03 20:46',
|
||||||
|
},
|
||||||
|
],
|
||||||
|
};
|
||||||
|
},
|
||||||
|
components: {
|
||||||
|
SmallTitle,
|
||||||
|
},
|
||||||
|
created() {},
|
||||||
|
methods: {
|
||||||
|
init(val) {
|
||||||
|
this.visible = true;
|
||||||
|
},
|
||||||
|
//刷新
|
||||||
|
refresh() {},
|
||||||
|
closeD() {
|
||||||
|
this.visible = false
|
||||||
|
this.$emit('closeDrawer');
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.bgDiv1 {
|
||||||
|
background-color: rgba(242, 242, 242, 0.5);
|
||||||
|
padding: 20px;
|
||||||
|
line-height: 25px;
|
||||||
|
font-size: 15px;
|
||||||
|
border-bottom: 1px solid rgba(121, 121, 121, 0.5);
|
||||||
|
.taskStatus {
|
||||||
|
text-align: center;
|
||||||
|
border-radius: 3px;
|
||||||
|
padding: 2px 5px;
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.bgDiv2 {
|
||||||
|
border-bottom: 1px solid rgba(121, 121, 121, 0.5);
|
||||||
|
padding: 18px 0;
|
||||||
|
.abnormal {
|
||||||
|
width: 80%;
|
||||||
|
margin: auto;
|
||||||
|
border-radius: 5px;
|
||||||
|
height: 40px;
|
||||||
|
font-size: 22px;
|
||||||
|
line-height: 40px;
|
||||||
|
text-align: center;
|
||||||
|
background-color: rgba(217, 0, 27, 0.1);
|
||||||
|
color: rgba(217, 0, 27, 1);
|
||||||
|
border: 1px solid rgba(217, 0, 27, 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.bgDiv3 {
|
||||||
|
padding: 20px 20px 0;
|
||||||
|
.pan-info {
|
||||||
|
height: 350px;
|
||||||
|
border: 1px solid rgba(121, 121, 121, 0.8);
|
||||||
|
border-radius: 5px;
|
||||||
|
.pan-title {
|
||||||
|
background-color: rgba(242, 242, 242, 0.5);
|
||||||
|
height: 35px;
|
||||||
|
font-size: 20px;
|
||||||
|
line-height: 35px;
|
||||||
|
padding: 0 20px;
|
||||||
|
border-bottom: 1px solid rgba(121, 121, 121, 0.5);
|
||||||
|
letter-spacing: 2px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.bgDiv4 {
|
||||||
|
padding: 20px 20px 0;
|
||||||
|
}
|
||||||
|
.bgDiv5 {
|
||||||
|
padding: 20px 20px 0;
|
||||||
|
}
|
||||||
|
.bgDiv6 {
|
||||||
|
padding: 20px 20px 0;
|
||||||
|
}
|
||||||
|
.drawer-body__footer {
|
||||||
|
display: flex;
|
||||||
|
justify-content: flex-end;
|
||||||
|
padding: 0 18px 10px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
65
src/views/cost/components/stopInStock.vue
Normal file
@@ -0,0 +1,65 @@
|
|||||||
|
<!--
|
||||||
|
* @Author: zwq
|
||||||
|
* @Date: 2025-11-08 17:44:05
|
||||||
|
* @LastEditors: zwq
|
||||||
|
* @LastEditTime: 2025-11-08 18:13:25
|
||||||
|
* @Description:
|
||||||
|
-->
|
||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<div>请选择要执行的终止方式,系统会根据选择进行处理</div>
|
||||||
|
<el-radio-group v-model="radio" class="stockRadioDiv">
|
||||||
|
<el-radio :label="1" border style="margin: 10px 0">
|
||||||
|
仅终止,稍后回收
|
||||||
|
<div style="font-weight: 400">
|
||||||
|
任务立即终止,车辆保持暂停,稍后可在任务列表中手动回收
|
||||||
|
</div>
|
||||||
|
</el-radio>
|
||||||
|
<el-radio :label="2" border style="margin: 10px 0">
|
||||||
|
终止,并立即回收
|
||||||
|
<div style="font-weight: 400">
|
||||||
|
任务立即终止立即,选择货物回收方式生成任务或更新卸货点
|
||||||
|
</div>
|
||||||
|
</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
<div>
|
||||||
|
终止原因:
|
||||||
|
<el-input
|
||||||
|
type="textarea"
|
||||||
|
:rows="3"
|
||||||
|
style="margin: 10px 0"
|
||||||
|
placeholder="请输入终止原因"
|
||||||
|
v-model="textarea" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
radio: 1,
|
||||||
|
textarea: '',
|
||||||
|
};
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
init(val) {},
|
||||||
|
submit() {
|
||||||
|
if(this.textarea){
|
||||||
|
|
||||||
|
}else{
|
||||||
|
this.$message('请输入终止原因');
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.stockRadioDiv >>> .el-radio--medium.is-bordered {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
height: 70px;
|
||||||
|
line-height: 20px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
32
src/views/cost/components/subSpan1.vue
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
<!--
|
||||||
|
* @Author: zwq
|
||||||
|
* @Date: 2025-10-13 16:18:41
|
||||||
|
* @LastEditors: zwq
|
||||||
|
* @LastEditTime: 2025-11-06 15:19:24
|
||||||
|
* @Description:
|
||||||
|
-->
|
||||||
|
<template>
|
||||||
|
<span>
|
||||||
|
{{
|
||||||
|
(injectData.val2
|
||||||
|
? ['满盘搬运', '空盘搬运', '备料搬运', '临时搬运'][injectData.val2]
|
||||||
|
: '-')
|
||||||
|
}}
|
||||||
|
</span>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
props: {
|
||||||
|
injectData: {
|
||||||
|
type: Object,
|
||||||
|
default: () => ({}),
|
||||||
|
},
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {};
|
||||||
|
},
|
||||||
|
created() {},
|
||||||
|
methods: {},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
32
src/views/cost/components/subSpan2.vue
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
<!--
|
||||||
|
* @Author: zwq
|
||||||
|
* @Date: 2025-10-13 16:18:41
|
||||||
|
* @LastEditors: zwq
|
||||||
|
* @LastEditTime: 2025-11-06 15:20:43
|
||||||
|
* @Description:
|
||||||
|
-->
|
||||||
|
<template>
|
||||||
|
<span>
|
||||||
|
{{
|
||||||
|
(injectData.val3
|
||||||
|
? ['待下发', '待执行', '执行中', '已完成', '暂停中', '已终止', '异常'][injectData.val3]
|
||||||
|
: '-')
|
||||||
|
}}
|
||||||
|
</span>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
props: {
|
||||||
|
injectData: {
|
||||||
|
type: Object,
|
||||||
|
default: () => ({}),
|
||||||
|
},
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {};
|
||||||
|
},
|
||||||
|
created() {},
|
||||||
|
methods: {},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
57
src/views/cost/components/subSpan3.vue
Normal file
@@ -0,0 +1,57 @@
|
|||||||
|
<!--
|
||||||
|
* @Author: zwq
|
||||||
|
* @Date: 2025-10-13 16:18:41
|
||||||
|
* @LastEditors: zwq
|
||||||
|
* @LastEditTime: 2025-11-06 15:37:02
|
||||||
|
* @Description:
|
||||||
|
-->
|
||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<div style="display: flex; align-items: center">
|
||||||
|
<div
|
||||||
|
style="
|
||||||
|
width: 16px;
|
||||||
|
height: 16px;
|
||||||
|
border-radius: 5px;
|
||||||
|
background-color: #e89b24;
|
||||||
|
color: #fff;
|
||||||
|
text-align:center;
|
||||||
|
line-height:16px
|
||||||
|
">
|
||||||
|
L
|
||||||
|
</div>
|
||||||
|
产品名称+产品规格
|
||||||
|
</div>
|
||||||
|
<div style="display: flex; align-items: center">
|
||||||
|
<div
|
||||||
|
style="
|
||||||
|
width: 16px;
|
||||||
|
height: 16px;
|
||||||
|
border-radius: 5px;
|
||||||
|
background-color: #6a96ec;
|
||||||
|
color: #fff;
|
||||||
|
text-align:center;
|
||||||
|
line-height:16px
|
||||||
|
">
|
||||||
|
R
|
||||||
|
</div>
|
||||||
|
产品名称+产品规格
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
props: {
|
||||||
|
injectData: {
|
||||||
|
type: Object,
|
||||||
|
default: () => ({}),
|
||||||
|
},
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {};
|
||||||
|
},
|
||||||
|
created() {},
|
||||||
|
methods: {},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
32
src/views/cost/components/subSpan4.vue
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
<!--
|
||||||
|
* @Author: zwq
|
||||||
|
* @Date: 2025-10-13 16:18:41
|
||||||
|
* @LastEditors: zwq
|
||||||
|
* @LastEditTime: 2025-11-06 15:19:24
|
||||||
|
* @Description:
|
||||||
|
-->
|
||||||
|
<template>
|
||||||
|
<span>
|
||||||
|
{{
|
||||||
|
(injectData.val2
|
||||||
|
? ['满盘搬运', '空盘搬运', '备料搬运', '临时搬运'][injectData.val2]
|
||||||
|
: '-')
|
||||||
|
}}
|
||||||
|
</span>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
props: {
|
||||||
|
injectData: {
|
||||||
|
type: Object,
|
||||||
|
default: () => ({}),
|
||||||
|
},
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {};
|
||||||
|
},
|
||||||
|
created() {},
|
||||||
|
methods: {},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
23
src/views/cost/components/typeRule.vue
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
<!--
|
||||||
|
* @Author: zwq
|
||||||
|
* @Date: 2023-12-05 13:45:59
|
||||||
|
* @LastEditors: zwq
|
||||||
|
* @LastEditTime: 2024-04-15 17:12:03
|
||||||
|
* @Description
|
||||||
|
-->
|
||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<span>{{ parseTime(injectData.startTime,'{y}年{m}月{d}日') + '-' + (parseTime(injectData.endTime)?parseTime(injectData.endTime,'{y}年{m}月{d}日'):'永久') }}</span>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
name: '',
|
||||||
|
props: {
|
||||||
|
injectData: {
|
||||||
|
type: Object,
|
||||||
|
default: () => ({}),
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
@@ -1,145 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="home-page">
|
<div class="home-page">
|
||||||
<div class="date-tabs">
|
|
||||||
<!-- @tab-click="handleClick" -->
|
|
||||||
<el-tabs v-model="activeName" @tab-click="timedayChange" :stretch="true">
|
|
||||||
<el-tab-pane
|
|
||||||
:label="'\u2002\u2002日\u2002\u2002'"
|
|
||||||
name="日"></el-tab-pane>
|
|
||||||
<el-tab-pane
|
|
||||||
:label="'\u2002\u2002周\u2002\u2002'"
|
|
||||||
name="周"></el-tab-pane>
|
|
||||||
<el-tab-pane
|
|
||||||
:label="'\u2002\u2002月\u2002\u2002'"
|
|
||||||
name="月"></el-tab-pane>
|
|
||||||
<el-tab-pane
|
|
||||||
:label="'\u2002\u2002年\u2002\u2002'"
|
|
||||||
name="年"></el-tab-pane>
|
|
||||||
</el-tabs>
|
|
||||||
<div class="detail">
|
|
||||||
<el-date-picker
|
|
||||||
v-model="timeday"
|
|
||||||
align="right"
|
|
||||||
type="date"
|
|
||||||
format="yyyy-MM-dd"
|
|
||||||
valueFormat="yyyy-MM-dd"
|
|
||||||
:clearable="false"
|
|
||||||
@change="timedayChange"
|
|
||||||
placeholder="选择日期"
|
|
||||||
:picker-options="pickerOptions"></el-date-picker>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<el-row class="main-top" :gutter="16">
|
|
||||||
<el-col :span="24" style="position: relative">
|
|
||||||
<div class="title">
|
|
||||||
<svg-icon icon-class="home-produce" />
|
|
||||||
<span class="title-inner">生产总成本</span>
|
|
||||||
</div>
|
|
||||||
<el-row class="box">
|
|
||||||
<el-col :span="4" class="num-box shadow">
|
|
||||||
<div class="num-style">{{ homeData.priceS }}万元</div>
|
|
||||||
<div class="unit-style">总计成本</div>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="4" class="num-box shadow">
|
|
||||||
<div class="num-style">{{ homeData.matPriceS }}万元</div>
|
|
||||||
<div class="unit-style">原料成本</div>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="4" class="num-box shadow">
|
|
||||||
<div class="num-style">{{ homeData.energyPriceS }}万元</div>
|
|
||||||
<div class="unit-style">能源成本</div>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="4" class="num-box shadow">
|
|
||||||
<div class="num-style">{{ homeData.otherPriceS }}万元</div>
|
|
||||||
<div class="unit-style">其他成本</div>
|
|
||||||
</el-col>
|
|
||||||
<!-- <el-col :span="4" class="num-box shadow">
|
|
||||||
<div class="num-style">{{ homeData.ratioS }}</div>
|
|
||||||
<div class="unit-style">综合良品率/%</div>
|
|
||||||
</el-col> -->
|
|
||||||
<el-col :span="4" class="num-box shadow">
|
|
||||||
<div class="num-style">{{ homeData.areaPriceS }}元</div>
|
|
||||||
<div class="unit-style">综合每平米成本</div>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="24" style="position: relative">
|
|
||||||
<div class="title">
|
|
||||||
<svg-icon icon-class="home-produce" />
|
|
||||||
<span class="title-inner">原片成本</span>
|
|
||||||
</div>
|
|
||||||
<el-row class="box">
|
|
||||||
<el-col :span="4" class="num-box shadow">
|
|
||||||
<div class="num-style">{{ homeData.priceO }}万元</div>
|
|
||||||
<div class="unit-style">原片总成本</div>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="4" class="num-box shadow">
|
|
||||||
<div class="num-style">{{ homeData.matPriceO }}万元</div>
|
|
||||||
<div class="unit-style">原料成本</div>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="4" class="num-box shadow">
|
|
||||||
<div class="num-style">{{ homeData.energyPriceO }}万元</div>
|
|
||||||
<div class="unit-style">能源成本</div>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="4" class="num-box shadow">
|
|
||||||
<div class="num-style">{{ homeData.otherPriceO }}万元</div>
|
|
||||||
<div class="unit-style">其他成本</div>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="4" class="num-box shadow">
|
|
||||||
<div class="num-style">{{ homeData.ratioO }}</div>
|
|
||||||
<div class="unit-style">原片良品率/%</div>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="4" class="num-box shadow">
|
|
||||||
<div class="num-style">{{ homeData.areaPriceO }}元</div>
|
|
||||||
<div class="unit-style">原片每平米成本</div>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="24" style="position: relative">
|
|
||||||
<div class="title">
|
|
||||||
<svg-icon icon-class="home-produce" />
|
|
||||||
<span class="title-inner">深加工成本</span>
|
|
||||||
</div>
|
|
||||||
<el-row class="box">
|
|
||||||
<el-col :span="4" class="num-box shadow">
|
|
||||||
<div class="num-style">{{ homeData.priceD }}万元</div>
|
|
||||||
<div class="unit-style">深加工总成本</div>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="4" class="num-box shadow">
|
|
||||||
<div class="num-style">{{ homeData.energyPriceD }}万元</div>
|
|
||||||
<div class="unit-style">能源成本</div>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="4" class="num-box shadow">
|
|
||||||
<div class="num-style">{{ homeData.otherPriceD }}万元</div>
|
|
||||||
<div class="unit-style">其他成本</div>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="4" class="num-box shadow">
|
|
||||||
<div class="num-style">{{ homeData.ratioD }}</div>
|
|
||||||
<div class="unit-style">深加工良品率/%</div>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="4" class="num-box shadow">
|
|
||||||
<div class="num-style">{{ homeData.areaPriceD }}元</div>
|
|
||||||
<div class="unit-style">深加工每平米成本</div>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
<el-row class="main-bottom" :gutter="16" v-if="false">
|
|
||||||
<el-col :span="9">
|
|
||||||
<div class="chart-wrapper">
|
|
||||||
<line-chart :chart-data="lineChartData" />
|
|
||||||
</div>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="7">
|
|
||||||
<div class="chart-wrapper">
|
|
||||||
<pie-chart />
|
|
||||||
</div>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="8">
|
|
||||||
<div class="chart-wrapper">
|
|
||||||
<bar-chart />
|
|
||||||
</div>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
<div
|
<div
|
||||||
class="main-footer"
|
class="main-footer"
|
||||||
style="
|
style="
|
||||||
@@ -157,267 +17,29 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import moment from 'moment';
|
|
||||||
import tableHeightMixin from '@/mixins/lb/tableHeightMixin';
|
|
||||||
import LineChart from '../dashboard/LineChart';
|
|
||||||
import PieChart from '../dashboard/PieChart';
|
|
||||||
import BarChart from '../dashboard/BarChart';
|
|
||||||
import PanelGroup from '../dashboard/PanelGroup';
|
|
||||||
import { getData } from '@/api/cost/allCost';
|
|
||||||
import { getUserProfile } from '@/api/system/user';
|
|
||||||
|
|
||||||
const lineChartData = {
|
|
||||||
newVisitis: {
|
|
||||||
expectedData: [100, 120, 161, 134, 105, 160, 165],
|
|
||||||
actualData: [120, 82, 91, 154, 162, 140, 145],
|
|
||||||
},
|
|
||||||
messages: {
|
|
||||||
expectedData: [200, 192, 120, 144, 160, 130, 140],
|
|
||||||
actualData: [180, 160, 151, 106, 145, 150, 130],
|
|
||||||
},
|
|
||||||
purchases: {
|
|
||||||
expectedData: [80, 100, 121, 104, 105, 90, 100],
|
|
||||||
actualData: [120, 90, 100, 138, 142, 130, 130],
|
|
||||||
},
|
|
||||||
shoppings: {
|
|
||||||
expectedData: [130, 140, 141, 142, 145, 150, 160],
|
|
||||||
actualData: [120, 82, 91, 154, 162, 140, 130],
|
|
||||||
},
|
|
||||||
};
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'Home',
|
name: 'Home',
|
||||||
mixins: [tableHeightMixin],
|
mixins: [],
|
||||||
components: {
|
components: {},
|
||||||
LineChart,
|
computed: {},
|
||||||
PieChart,
|
|
||||||
PanelGroup,
|
|
||||||
BarChart,
|
|
||||||
},
|
|
||||||
computed: {
|
|
||||||
gradientBackground() {
|
|
||||||
return {
|
|
||||||
'background-image':
|
|
||||||
'linear-gradient(90deg, #f0f0f0 25%, rgba(255, 255, 255, 0) 25%, rgba(255, 255, 255, 0) 50%, #f0f0f0 50%, #f0f0f0 75%, rgba(255, 255, 255, 0) 75%, rgba(255, 255, 255, 0))',
|
|
||||||
'background-size': '100px 100px', // 调整条纹的大小
|
|
||||||
};
|
|
||||||
},
|
|
||||||
},
|
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {};
|
||||||
activeName: '日',
|
|
||||||
user: '',
|
|
||||||
lineChartData: lineChartData.newVisitis,
|
|
||||||
homeData: {},
|
|
||||||
timeday: moment(new Date()).subtract(1, 'days').format('YYYY-MM-DD'),
|
|
||||||
startTime:
|
|
||||||
moment(new Date()).subtract(0, 'days').format('YYYY-MM-DD') +
|
|
||||||
' 00:00:00',
|
|
||||||
endTime:
|
|
||||||
moment(new Date()).subtract(-1, 'days').format('YYYY-MM-DD') +
|
|
||||||
' 00:00:00',
|
|
||||||
|
|
||||||
pickerOptions: {
|
|
||||||
disabledDate(time) {
|
|
||||||
return time.getTime() + 3600 * 1000 * 24 > Date.now();
|
|
||||||
},
|
|
||||||
shortcuts: [
|
|
||||||
{
|
|
||||||
text: '今天',
|
|
||||||
onClick(picker) {
|
|
||||||
picker.$emit('pick', new Date());
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
text: '昨天',
|
|
||||||
onClick(picker) {
|
|
||||||
const date = new Date();
|
|
||||||
date.setTime(date.getTime() - 3600 * 1000 * 24);
|
|
||||||
picker.$emit('pick', date);
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
text: '一周前',
|
|
||||||
onClick(picker) {
|
|
||||||
const date = new Date();
|
|
||||||
date.setTime(date.getTime() - 3600 * 1000 * 24 * 7);
|
|
||||||
picker.$emit('pick', date);
|
|
||||||
},
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
};
|
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
},
|
},
|
||||||
beforeDestroy() {
|
beforeDestroy() {
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
getData() {
|
|
||||||
let listQuery = {
|
|
||||||
//分页
|
|
||||||
pageSize: 10,
|
|
||||||
pageNo: 1,
|
|
||||||
statisticType: ['', '日', '周', '月', '年'].indexOf(this.activeName),
|
|
||||||
startTime: this.timeday + ' 00:00:00',
|
|
||||||
};
|
|
||||||
getData(listQuery).then((response) => {
|
|
||||||
this.homeData = response.data;
|
|
||||||
for (let i in this.homeData) {
|
|
||||||
this.homeData[i] = Number(this.homeData[i]).toFixed(2);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
timedayChange() {
|
|
||||||
let listQuery = {
|
|
||||||
//分页
|
|
||||||
pageSize: 10,
|
|
||||||
pageNo: 1,
|
|
||||||
statisticType: ['', '日', '周', '月', '年'].indexOf(this.activeName),
|
|
||||||
startTime: this.timeday + ' 00:00:00',
|
|
||||||
};
|
|
||||||
getData(listQuery).then((response) => {
|
|
||||||
this.homeData = response.data;
|
|
||||||
for (let i in this.homeData) {
|
|
||||||
this.homeData[i] = Number(this.homeData[i]).toFixed(2);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
goDetail() {
|
|
||||||
this.$router.push({ path: 'indexDetail' });
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.home-page::before {
|
|
||||||
background-image: url('~@/assets/img/home-bg.png');
|
|
||||||
background-size: cover;
|
|
||||||
background-repeat: no-repeat;
|
|
||||||
background-position: center;
|
|
||||||
content: '';
|
|
||||||
position: absolute;
|
|
||||||
top: 0;
|
|
||||||
left: 0;
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
transform: rotate(180deg);
|
|
||||||
}
|
|
||||||
.date-tabs {
|
|
||||||
padding-left: 40px;
|
|
||||||
padding-top: 20px;
|
|
||||||
position: relative;
|
|
||||||
margin-bottom: 20px;
|
|
||||||
}
|
|
||||||
:deep(.date-tabs) {
|
|
||||||
.el-tabs__header {
|
|
||||||
margin-bottom: 8px;
|
|
||||||
display: inline-block;
|
|
||||||
transform: translateY(-12px);
|
|
||||||
}
|
|
||||||
|
|
||||||
.el-tabs__content {
|
|
||||||
overflow: visible;
|
|
||||||
}
|
|
||||||
|
|
||||||
.el-tabs__item {
|
|
||||||
font-size: 18px;
|
|
||||||
color: #fff;
|
|
||||||
padding-left: 0 !important;
|
|
||||||
padding-right: 0 !important;
|
|
||||||
line-height: 36px !important;
|
|
||||||
height: 36px;
|
|
||||||
}
|
|
||||||
.el-tabs__item.is-active {
|
|
||||||
color: #0b58ff;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.detail {
|
|
||||||
display: inline-block;
|
|
||||||
position: absolute;
|
|
||||||
left: 260px;
|
|
||||||
top: 10px;
|
|
||||||
}
|
|
||||||
:deep(.detail) {
|
|
||||||
.el-input__inner {
|
|
||||||
background-color: transparent;
|
|
||||||
color: white;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// .current-date {
|
|
||||||
// color: #fff;
|
|
||||||
// font-size: 18px;
|
|
||||||
// position: absolute;
|
|
||||||
// left: 260px;
|
|
||||||
// top: 14px;
|
|
||||||
// }
|
|
||||||
.current-time {
|
|
||||||
color: #fff;
|
|
||||||
font-size: 18px;
|
|
||||||
position: absolute;
|
|
||||||
right: 38px;
|
|
||||||
top: 14px;
|
|
||||||
}
|
|
||||||
.main-top {
|
|
||||||
width: 100%;
|
|
||||||
padding: 0 20px 0 40px;
|
|
||||||
.title {
|
|
||||||
position: absolute;
|
|
||||||
left: 34px;
|
|
||||||
top: 20px;
|
|
||||||
width: 180px;
|
|
||||||
font-size: 32px;
|
|
||||||
z-index: 10;
|
|
||||||
.title-inner {
|
|
||||||
position: absolute;
|
|
||||||
left: 42px;
|
|
||||||
top: 5px;
|
|
||||||
font-size: calc(100vw * 20 / 1920);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.box {
|
|
||||||
background-color: #fff;
|
|
||||||
border-radius: 24px;
|
|
||||||
height: 192px;
|
|
||||||
padding: 40px 24px 32px 24px;
|
|
||||||
margin-bottom: 20px;
|
|
||||||
box-shadow: 0 8px 8px 0 gray;
|
|
||||||
.num-box {
|
|
||||||
height: 120px;
|
|
||||||
padding-top: 26px;
|
|
||||||
text-align: center;
|
|
||||||
.num-style {
|
|
||||||
color: #000;
|
|
||||||
font-size: calc(100vw * 40 / 1920);
|
|
||||||
}
|
|
||||||
.unit-style {
|
|
||||||
color: rgba(0, 0, 0, 0.7);
|
|
||||||
font-size: calc(100vw * 18 / 1920);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.shadow {
|
|
||||||
background: linear-gradient(90deg, #ffffff 80%, #f2f4f9 100%);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.main-bottom {
|
|
||||||
width: 100%;
|
|
||||||
margin-top: 20px;
|
|
||||||
.chart-wrapper {
|
|
||||||
margin-left: 10px;
|
|
||||||
height: 425px;
|
|
||||||
background: #fff;
|
|
||||||
border-radius: 5px;
|
|
||||||
box-shadow: 0 3px 3px 0 gray;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
</style>
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
.home-page {
|
|
||||||
.el-progress-bar__inner {
|
|
||||||
background-image: url('~@/assets/img/home-progress-bg.png');
|
|
||||||
background-size: cover;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
35
src/views/cost/raw/costMaterial/changeStatus.vue
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
<template>
|
||||||
|
<el-switch
|
||||||
|
@change="changeStatus"
|
||||||
|
size="small"
|
||||||
|
v-model="list.enabled"
|
||||||
|
:active-value="1"
|
||||||
|
:inactive-value="0"></el-switch>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { updateGroup } from '@/api/group/groupSetting';
|
||||||
|
export default {
|
||||||
|
props: {
|
||||||
|
injectData: {
|
||||||
|
type: Object,
|
||||||
|
default: () => ({}),
|
||||||
|
},
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
list: this.injectData,
|
||||||
|
};
|
||||||
|
},
|
||||||
|
created() {},
|
||||||
|
methods: {
|
||||||
|
changeStatus(val) {
|
||||||
|
const data = { ...this.injectData, enabled: val };
|
||||||
|
updateGroup(data).then((res) => {
|
||||||
|
this.$modal.msgSuccess('修改成功');
|
||||||
|
this.$emit('emitData');
|
||||||
|
});
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
@@ -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-11-05 13:50:39
|
* @LastEditTime: 2025-10-23 16:50:43
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
<template>
|
<template>
|
||||||
<div class="app-container" style="padding-top:0">
|
<div class="app-container">
|
||||||
<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">
|
||||||
{{deptName + ' - ' +item.planName}}
|
{{item.planName}}
|
||||||
</small-title>
|
</small-title>
|
||||||
<base-table
|
<base-table
|
||||||
:table-props="tableProps"
|
:table-props="tableProps"
|
||||||
@@ -55,14 +55,12 @@ export default {
|
|||||||
tableProps,
|
tableProps,
|
||||||
tableData: [],
|
tableData: [],
|
||||||
groupClassArr: [],
|
groupClassArr: [],
|
||||||
deptName: ''
|
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
created() {},
|
created() {},
|
||||||
methods: {
|
methods: {
|
||||||
init(det,deptName) {
|
init(det) {
|
||||||
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-11-05 13:48:48
|
* @LastEditTime: 2025-10-24 11:14:55
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
<template>
|
<template>
|
||||||
@@ -167,9 +167,7 @@
|
|||||||
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="
|
||||||
@@ -443,11 +441,11 @@ export default {
|
|||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
holidayLog(det, date,deptName) {
|
holidayLog(det, date) {
|
||||||
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,deptName);
|
this.$refs.holidayLogRef.init(det);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
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-11-04 15:16:48
|
* @LastEditTime: 2025-10-29 17:12:04
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
<template>
|
<template>
|
||||||
@@ -25,7 +25,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { getGroupPage } from '@/api/group/groupSetting';
|
import { listByDeptId } from '@/api/group/Schedule';
|
||||||
|
|
||||||
const tableProps = [
|
const tableProps = [
|
||||||
{
|
{
|
||||||
@@ -39,7 +39,7 @@ const tableProps = [
|
|||||||
width: 100,
|
width: 100,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'deptName',
|
prop: 'deptId',
|
||||||
label: '所属部门',
|
label: '所属部门',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -57,7 +57,7 @@ export default {
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
urlOptions: {
|
urlOptions: {
|
||||||
getDataListURL: getGroupPage,
|
getDataListURL: listByDeptId,
|
||||||
},
|
},
|
||||||
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.formInline.deptId = id;
|
this.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.formInline).then((response) => {
|
this.urlOptions.getDataListURL(this.deptId).then((response) => {
|
||||||
this.tableData = response.data.list;
|
this.tableData = response.data;
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
if (this.selectedArr.length > 0) {
|
if (this.selectedArr.length > 0) {
|
||||||
this.setSelectedRows();
|
this.setSelectedRows();
|
||||||
@@ -149,19 +149,22 @@ export default {
|
|||||||
selectChange(val) {
|
selectChange(val) {
|
||||||
this.selectedList = val;
|
this.selectedList = val;
|
||||||
},
|
},
|
||||||
// 判断两个数组是否有重复的 id,去重
|
// 判断两个数组是否有重复的 id
|
||||||
hasDuplicateIds(arr1, arr2) {
|
hasDuplicateIds(arr1, arr2) {
|
||||||
return arr2.filter(
|
const idSet = new Set(arr1.map((item) => item.id));
|
||||||
(item2) => !arr1.some((item1) => item1.id === item2.id)
|
return arr2.some((item) => idSet.has(item.id));
|
||||||
);
|
|
||||||
},
|
},
|
||||||
|
|
||||||
dataFormSubmit() {
|
dataFormSubmit() {
|
||||||
if (this.selectedList && this.selectedList.length > 0) {
|
if (this.selectedList && this.selectedList.length > 0) {
|
||||||
this.selectedList = this.hasDuplicateIds(
|
const haveData = 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-11-04 16:07:45
|
* @LastEditTime: 2025-10-29 15:28:52
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
<template>
|
<template>
|
||||||
@@ -54,11 +54,10 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="6">
|
<el-col :span="6">
|
||||||
<el-form-item label="部门" prop="deptId">
|
<el-form-item label="部门">
|
||||||
<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>
|
||||||
@@ -112,7 +111,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"
|
||||||
@@ -151,12 +150,6 @@
|
|||||||
</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"
|
||||||
@@ -164,7 +157,6 @@
|
|||||||
: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"
|
||||||
@@ -182,7 +174,8 @@
|
|||||||
: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天,不休周末排班如下"
|
||||||
@@ -199,10 +192,9 @@
|
|||||||
</el-table>
|
</el-table>
|
||||||
<i
|
<i
|
||||||
slot="reference"
|
slot="reference"
|
||||||
class="el-icon-chat-dot-square"
|
class="el-icon-warning-outline"
|
||||||
style="color: #409eff; font-size: 18px"></i>
|
style="color: #ff1c15"></i>
|
||||||
</el-popover>
|
</el-popover>
|
||||||
设置,按班组轮班顺序依次循环每日班次,生成正式排班计划,请确认。
|
|
||||||
</span>
|
</span>
|
||||||
</small-title>
|
</small-title>
|
||||||
<el-tag>
|
<el-tag>
|
||||||
@@ -235,7 +227,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>
|
||||||
@@ -343,7 +335,6 @@ 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,
|
||||||
@@ -383,17 +374,10 @@ 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',
|
||||||
@@ -492,7 +476,6 @@ 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' },
|
||||||
],
|
],
|
||||||
@@ -627,10 +610,12 @@ 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 = '';
|
||||||
if (item.isProduction) {
|
lineName = this.setLineName(item.bindLineTree, lineName);
|
||||||
lineName = this.setLineName(item.bindLineTree);
|
this.$set(
|
||||||
}
|
this.tableData2[index],
|
||||||
this.$set(this.tableData2[index], 'lineName', lineName);
|
'lineName',
|
||||||
|
lineName.slice(0, -1)
|
||||||
|
);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
@@ -669,12 +654,9 @@ export default {
|
|||||||
this.$message('部门不能为空');
|
this.$message('部门不能为空');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const compareDate = this.compareDates(
|
const compareDate = this.compareDates(this.dataForm.startDay,this.dataForm.endDay)
|
||||||
this.dataForm.startDay,
|
|
||||||
this.dataForm.endDay
|
|
||||||
);
|
|
||||||
|
|
||||||
if (compareDate > 0) {
|
if (compareDate > 0 ) {
|
||||||
this.$message('开始时间不能大于结束时间');
|
this.$message('开始时间不能大于结束时间');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -702,10 +684,7 @@ export default {
|
|||||||
|
|
||||||
let isbindLine = false;
|
let isbindLine = false;
|
||||||
this.tableData2.forEach((item) => {
|
this.tableData2.forEach((item) => {
|
||||||
if (
|
if (!item.bindLineTree || item.bindLineTree.length == 0) {
|
||||||
item.isProduction &&
|
|
||||||
(!item.bindLineTree || item.bindLineTree.length == 0)
|
|
||||||
) {
|
|
||||||
isbindLine = true;
|
isbindLine = true;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -751,8 +730,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);
|
||||||
@@ -795,7 +774,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;
|
||||||
@@ -814,56 +793,50 @@ 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);
|
||||||
}
|
}
|
||||||
@@ -886,37 +859,11 @@ 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() {
|
||||||
@@ -939,15 +886,6 @@ 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) {
|
||||||
@@ -957,38 +895,22 @@ 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 = this.setLineName(val, lineName);
|
||||||
if (lineName) {
|
if (lineName) {
|
||||||
this.$set(this.tableData2[index], 'lineName', lineName);
|
this.$set(this.tableData2[index], 'lineName', lineName.slice(0, -1));
|
||||||
}
|
}
|
||||||
this.cancel3();
|
this.cancel3();
|
||||||
},
|
},
|
||||||
//提取绑定的产线工段名展示出来
|
//提取绑定的产线工段名展示出来
|
||||||
setLineName(val) {
|
setLineName(val, lineName) {
|
||||||
if (!val || val.length === 0) return '';
|
val.forEach((item) => {
|
||||||
|
lineName += item.name + ':';
|
||||||
const currentLevelNames = val.map((item) => item.name);
|
if (item.children && item.children.length > 0) {
|
||||||
|
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;
|
|
||||||
},
|
},
|
||||||
//第三步
|
//第三步
|
||||||
// 进来加载预览排班
|
// 进来加载预览排班
|
||||||
@@ -997,7 +919,6 @@ 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) => {
|
||||||
@@ -1025,7 +946,6 @@ 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-11-04 10:49:16
|
* @LastEditTime: 2025-10-21 15:02:27
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
<template>
|
<template>
|
||||||
@@ -46,7 +46,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<span class="title">创建人:</span>
|
<span class="title">创建人:</span>
|
||||||
{{ infoData.creatorName }}
|
{{ infoData.creator }}
|
||||||
</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-11-04 14:08:47
|
* @LastEditTime: 2025-10-20 10:23:52
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
<template>
|
<template>
|
||||||
@@ -15,10 +15,9 @@
|
|||||||
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="sort">
|
<el-form-item label="序号" prop="index">
|
||||||
<el-input-number
|
<el-input-number
|
||||||
style="width: 100%"
|
v-model="dataForm.index"
|
||||||
v-model="dataForm.sort"
|
|
||||||
:step="1"
|
:step="1"
|
||||||
:min="1"
|
:min="1"
|
||||||
step-strictly />
|
step-strictly />
|
||||||
@@ -39,8 +38,7 @@
|
|||||||
format="H:mm"
|
format="H:mm"
|
||||||
value-format="HH:mm:ss"
|
value-format="HH:mm:ss"
|
||||||
v-model="dataForm.startTime"
|
v-model="dataForm.startTime"
|
||||||
@change="timeFun('start')"
|
placeholder="选择日期时间"></el-time-picker>
|
||||||
placeholder="选择时间"></el-time-picker>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
@@ -50,19 +48,7 @@
|
|||||||
format="H:mm"
|
format="H:mm"
|
||||||
value-format="HH:mm:ss"
|
value-format="HH:mm:ss"
|
||||||
v-model="dataForm.endTime"
|
v-model="dataForm.endTime"
|
||||||
@change="timeFun('end')"
|
placeholder="选择日期时间"></el-time-picker>
|
||||||
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">
|
||||||
@@ -84,17 +70,15 @@ export default {
|
|||||||
return {
|
return {
|
||||||
dataForm: {
|
dataForm: {
|
||||||
id: undefined,
|
id: undefined,
|
||||||
sort: undefined,
|
index: 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: {
|
||||||
sort: [{ required: true, message: '排序不能为空', trigger: 'blur' }],
|
index: [{ required: true, message: '序号不能为空', trigger: 'blur' }],
|
||||||
name: [
|
name: [
|
||||||
{ required: true, message: '班次名称不能为空', trigger: 'blur' },
|
{ required: true, message: '班次名称不能为空', trigger: 'blur' },
|
||||||
],
|
],
|
||||||
@@ -109,31 +93,13 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
init(val) {
|
init(val) {
|
||||||
this._pageIndex = val._pageIndex - 1;
|
this._pageIndex = val._pageIndex-1;
|
||||||
this.dataForm.sort = val._pageIndex || 1;
|
this.dataForm.index = 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-13 15:07:24
|
* @Date: 2025-10-11 14:27:37
|
||||||
* @LastEditors: zwq
|
* @LastEditors: zwq
|
||||||
* @LastEditTime: 2025-11-05 08:51:13
|
* @LastEditTime: 2025-10-29 14:50:16
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
<template>
|
<template>
|
||||||
@@ -31,14 +31,12 @@
|
|||||||
<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>
|
||||||
@@ -48,12 +46,8 @@
|
|||||||
ref="deptSelect"
|
ref="deptSelect"
|
||||||
@DeptId="setDeptId"></dept-select>
|
@DeptId="setDeptId"></dept-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="状态" prop="status">
|
<el-form-item label="状态" prop="leaderName">
|
||||||
<el-select
|
<el-select v-model="formInline.status" placeholder="请选择状态">
|
||||||
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"
|
||||||
@@ -71,8 +65,7 @@
|
|||||||
</el-button>
|
</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<span
|
<span class="separateStyle"
|
||||||
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>
|
||||||
@@ -81,8 +74,7 @@
|
|||||||
</el-button>
|
</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<span
|
<span class="separateStyle"
|
||||||
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>
|
||||||
@@ -95,17 +87,6 @@
|
|||||||
新增
|
新增
|
||||||
</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
|
||||||
@@ -220,7 +201,6 @@ import {
|
|||||||
copyPlan,
|
copyPlan,
|
||||||
disablePlan,
|
disablePlan,
|
||||||
updateScheduleLater,
|
updateScheduleLater,
|
||||||
exportExcel,
|
|
||||||
} from '@/api/group/Schedule';
|
} from '@/api/group/Schedule';
|
||||||
|
|
||||||
const tableProps = [
|
const tableProps = [
|
||||||
@@ -288,97 +268,91 @@ 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,
|
},
|
||||||
this.$auth.hasPermi('base:group-scheduling-plan:delete')
|
}:undefined,
|
||||||
? {
|
this.$auth.hasPermi('base:group-scheduling-plan:delete')?
|
||||||
type: 'delete',
|
{
|
||||||
btnName: '删除',
|
type: 'delete',
|
||||||
showParam: {
|
btnName: '删除',
|
||||||
type: '&',
|
showParam: {
|
||||||
data: [
|
type: '&',
|
||||||
{
|
data: [
|
||||||
type: 'equal',
|
{
|
||||||
name: 'status',
|
type: 'equal',
|
||||||
value: 1,
|
name: 'status',
|
||||||
},
|
value: 1,
|
||||||
],
|
|
||||||
},
|
},
|
||||||
}
|
],
|
||||||
: undefined,
|
},
|
||||||
this.$auth.hasPermi('base:group-scheduling-plan:query')
|
}:undefined,
|
||||||
? {
|
this.$auth.hasPermi('base:group-scheduling-plan:query')?
|
||||||
type: 'detail',
|
{
|
||||||
btnName: '查看',
|
type: 'detail',
|
||||||
showParam: {
|
btnName: '查看',
|
||||||
type: '&',
|
showParam: {
|
||||||
data: [
|
type: '&',
|
||||||
{
|
data: [
|
||||||
type: 'unequal',
|
{
|
||||||
name: 'status',
|
type: 'unequal',
|
||||||
value: 1,
|
name: 'status',
|
||||||
},
|
value: 1,
|
||||||
],
|
|
||||||
},
|
},
|
||||||
}
|
],
|
||||||
: undefined,
|
},
|
||||||
this.$auth.hasPermi('base:group-scheduling-plan:delete')
|
}:undefined,
|
||||||
? {
|
this.$auth.hasPermi('base:group-scheduling-plan:delete')?
|
||||||
type: 'cancel',
|
{
|
||||||
btnName: '作废',
|
type: 'cancel',
|
||||||
showParam: {
|
btnName: '作废',
|
||||||
type: '&',
|
showParam: {
|
||||||
data: [
|
type: '&',
|
||||||
{
|
data: [
|
||||||
type: 'equal',
|
{
|
||||||
name: 'status',
|
type: 'equal',
|
||||||
value: 2,
|
name: 'status',
|
||||||
},
|
value: 2,
|
||||||
],
|
|
||||||
},
|
},
|
||||||
}
|
],
|
||||||
: undefined,
|
},
|
||||||
this.$auth.hasPermi('base:group-holiday:update')
|
}:undefined,
|
||||||
? {
|
this.$auth.hasPermi('base:group-holiday:update')?
|
||||||
type: 'sync',
|
{
|
||||||
btnName: '同步节假日',
|
type: 'sync',
|
||||||
showParam: {
|
btnName: '同步节假日',
|
||||||
type: '&',
|
showParam: {
|
||||||
data: [
|
type: '&',
|
||||||
{
|
data: [
|
||||||
type: 'equal',
|
{
|
||||||
name: 'status',
|
type: 'equal',
|
||||||
value: 2,
|
name: 'status',
|
||||||
},
|
value: 2,
|
||||||
{
|
|
||||||
type: 'equal',
|
|
||||||
name: 'updateFlag',
|
|
||||||
value: true,
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
},
|
||||||
}
|
{
|
||||||
: undefined,
|
type: 'equal',
|
||||||
this.$auth.hasPermi('base:group-scheduling-plan:create')
|
name: 'updateFlag',
|
||||||
? {
|
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: [
|
||||||
@@ -405,14 +379,12 @@ export default {
|
|||||||
},
|
},
|
||||||
stepNum: 1, // 新增编辑时当前第几步
|
stepNum: 1, // 新增编辑时当前第几步
|
||||||
detailVisible: false,
|
detailVisible: false,
|
||||||
// 导出遮罩层
|
|
||||||
exportLoading: false,
|
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
AddOrUpdate,
|
AddOrUpdate,
|
||||||
deptSelect,
|
deptSelect,
|
||||||
detail,
|
detail
|
||||||
},
|
},
|
||||||
created() {},
|
created() {},
|
||||||
methods: {
|
methods: {
|
||||||
@@ -439,7 +411,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.status = null;
|
this.formInline.leaderName = null;
|
||||||
this.listQuery = {
|
this.listQuery = {
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
pageNo: 1,
|
pageNo: 1,
|
||||||
@@ -502,44 +474,23 @@ 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({
|
updateScheduleLater({ planId: val.data.id }).then((res) => {
|
||||||
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>
|
||||||
|
|||||||
@@ -1,44 +0,0 @@
|
|||||||
<!--
|
|
||||||
* @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-11-04 10:54:19
|
* @LastEditTime: 2025-10-20 10:13:26
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
<template>
|
<template>
|
||||||
<span>
|
<span>
|
||||||
{{
|
{{
|
||||||
(injectData.shiftSustainedNum?injectData.shiftSustainedNum:'') +
|
injectData.shiftSustainedNum +
|
||||||
(injectData.shiftSustainedType
|
(injectData.shiftSustainedType
|
||||||
? ['', '日', '周', '月', '季'][injectData.shiftSustainedType]
|
? ['', '日', '周', '月', '季'][injectData.shiftSustainedType]
|
||||||
: '')
|
: '')
|
||||||
|
|||||||
@@ -48,6 +48,7 @@ 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-31 15:47:16
|
* @LastEditTime: 2025-10-29 14:47:33
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
<template>
|
<template>
|
||||||
@@ -31,11 +31,10 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item label="部门" prop="deptId">
|
<el-form-item label="部门">
|
||||||
<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>
|
||||||
@@ -45,7 +44,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"
|
||||||
@@ -60,7 +59,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>
|
||||||
@@ -138,7 +137,7 @@ export default {
|
|||||||
num: undefined,
|
num: undefined,
|
||||||
remark: undefined,
|
remark: undefined,
|
||||||
},
|
},
|
||||||
setData: true,
|
setData: true,
|
||||||
leaderArr: [],
|
leaderArr: [],
|
||||||
options: [
|
options: [
|
||||||
{
|
{
|
||||||
@@ -157,23 +156,19 @@ 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:
|
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}$/,
|
||||||
/^(?:(?:\+|00)86)?1(?:3[\d]|4[5-79]|5[0-35-9]|6[5-7]|7[0-8]|8[\d]|9[189])\d{8}$/,
|
message: "请输入正确的手机号码",
|
||||||
message: '请输入正确的手机号码',
|
trigger: "blur"
|
||||||
trigger: 'blur',
|
}
|
||||||
},
|
]
|
||||||
],
|
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
@@ -189,9 +184,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) {
|
||||||
@@ -199,33 +194,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-11-05 13:43:53
|
* @LastEditTime: 2025-10-23 13:29:58
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
<template>
|
<template>
|
||||||
@@ -18,7 +18,6 @@
|
|||||||
<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"
|
||||||
@@ -55,7 +54,7 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item
|
<el-form-item
|
||||||
v-if="dataForm.dateType == 1 && dataForm.calendarType == 1"
|
v-if="dataForm.dateType == 1"
|
||||||
label="日期"
|
label="日期"
|
||||||
prop="dateDay">
|
prop="dateDay">
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
@@ -67,13 +66,9 @@
|
|||||||
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
|
<el-form-item v-else label="日期" prop="dateDayArr">
|
||||||
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%"
|
||||||
@@ -85,53 +80,8 @@
|
|||||||
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">
|
||||||
@@ -181,7 +131,6 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import JDatePicker from 'vue-jlunar-datepicker';
|
|
||||||
import {
|
import {
|
||||||
createHoliday,
|
createHoliday,
|
||||||
updateHoliday,
|
updateHoliday,
|
||||||
@@ -192,9 +141,7 @@ import {
|
|||||||
} from '@/api/group/holidaySetting';
|
} from '@/api/group/holidaySetting';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {},
|
||||||
JDatePicker,
|
|
||||||
},
|
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
dataForm: {
|
dataForm: {
|
||||||
@@ -204,10 +151,6 @@ 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,
|
||||||
@@ -259,12 +202,6 @@ 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,
|
||||||
@@ -279,61 +216,12 @@ 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, val, detail) {
|
init(deptId, id, detail) {
|
||||||
this.dataForm.deptId = deptId || undefined;
|
this.dataForm.deptId = deptId || undefined;
|
||||||
this.dataForm.id = val.holidayId || undefined;
|
this.dataForm.id = id || 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();
|
||||||
@@ -357,21 +245,14 @@ export default {
|
|||||||
this.dataForm.dateType == 1 &&
|
this.dataForm.dateType == 1 &&
|
||||||
this.dataForm.calendarType == 2
|
this.dataForm.calendarType == 2
|
||||||
) {
|
) {
|
||||||
this.dataForm.dateDayChinese =
|
this.dataForm.dateDay = this.dataForm.oneDayChinese;
|
||||||
'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.dateDayArrChinese = [
|
this.dataForm.dateDayArr = [
|
||||||
'L' +
|
this.dataForm.startDayChinese,
|
||||||
new Date().getFullYear() +
|
this.dataForm.endDayChinese,
|
||||||
this.dataForm.startDayChinese.slice(-6),
|
|
||||||
'L' +
|
|
||||||
new Date().getFullYear() +
|
|
||||||
this.dataForm.endDayChinese.slice(-6),
|
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -426,13 +307,10 @@ 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) => {
|
||||||
@@ -451,57 +329,25 @@ export default {
|
|||||||
this.dataForm.dateType == 1 &&
|
this.dataForm.dateType == 1 &&
|
||||||
this.dataForm.calendarType == 2
|
this.dataForm.calendarType == 2
|
||||||
) {
|
) {
|
||||||
this.dataForm.oneDayChinese =
|
this.dataForm.oneDayChinese = this.dataForm.dateDay;
|
||||||
'--' + 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.startDayChinese = this.dataForm.dateDayArr[0];
|
||||||
'--' + this.dataForm.dateDayArrChinese[0].slice(-5);
|
this.dataForm.endDayChinese = this.dataForm.dateDayArr[1];
|
||||||
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((res) => {
|
updateHoliday(this.dataForm).then((response) => {
|
||||||
if (!res.data.updateFlag) {
|
this.$modal.msgSuccess('修改成功');
|
||||||
this.$modal.msgSuccess('修改成功');
|
this.$emit('refreshPage');
|
||||||
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');
|
||||||
@@ -517,16 +363,15 @@ 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,10 +33,6 @@ 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-11-05 13:46:00
|
* @LastEditTime: 2025-10-27 10:18:54
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
<template>
|
<template>
|
||||||
@@ -32,24 +32,15 @@
|
|||||||
<div class="groupTeamScheduling">
|
<div class="groupTeamScheduling">
|
||||||
<div class="operationArea">
|
<div class="operationArea">
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="6">
|
<el-col :span="16">
|
||||||
<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="18" v-if="!ishasParent">
|
<el-col :span="8">
|
||||||
<div style="float: right">
|
<div style="float: right">
|
||||||
<el-button
|
<el-button
|
||||||
size="small"
|
size="small"
|
||||||
@@ -67,39 +58,6 @@
|
|||||||
</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">
|
||||||
@@ -115,24 +73,6 @@
|
|||||||
: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"
|
||||||
@@ -143,24 +83,15 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<el-tag
|
<el-tag
|
||||||
v-if="!ishasParent"
|
v-if="topDeptId == deptId"
|
||||||
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">
|
||||||
@@ -168,16 +99,7 @@
|
|||||||
<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
|
<div class="dateStyle">
|
||||||
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">
|
||||||
@@ -212,14 +134,13 @@
|
|||||||
">
|
">
|
||||||
<div
|
<div
|
||||||
class="holiday-div"
|
class="holiday-div"
|
||||||
:style="{
|
@click="
|
||||||
backgroundColor: ishasParent
|
new Date(data.day).getTime() > Date.now() &&
|
||||||
? HolidayList[Number(data.day.split('-')[2]) - 1]
|
showDetail(
|
||||||
.isInherit
|
HolidayList[Number(data.day.split('-')[2]) - 1]
|
||||||
? '#67c23a'
|
.holidayId
|
||||||
: '#b5b839'
|
)
|
||||||
: '',
|
">
|
||||||
}">
|
|
||||||
{{
|
{{
|
||||||
HolidayList[Number(data.day.split('-')[2]) - 1]
|
HolidayList[Number(data.day.split('-')[2]) - 1]
|
||||||
?.holidayName
|
?.holidayName
|
||||||
@@ -258,7 +179,6 @@
|
|||||||
@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"
|
||||||
@@ -332,14 +252,7 @@ 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 {
|
import { deptHolidayList, getEnableData } from '@/api/group/holidaySetting';
|
||||||
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';
|
||||||
@@ -361,9 +274,7 @@ 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',
|
||||||
@@ -372,7 +283,6 @@ export default {
|
|||||||
addOrUpdateVisible: false,
|
addOrUpdateVisible: false,
|
||||||
detail: false,
|
detail: false,
|
||||||
logVisible: false,
|
logVisible: false,
|
||||||
inherited: true, //该部门是否为继承状态
|
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
@@ -388,9 +298,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.getTreeselect();
|
this.getHolidayPage();
|
||||||
this.getSet();
|
|
||||||
});
|
});
|
||||||
|
this.getTreeselect();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
getHolidayPage() {
|
getHolidayPage() {
|
||||||
@@ -419,23 +329,11 @@ 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;
|
||||||
@@ -445,9 +343,6 @@ 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();
|
||||||
},
|
},
|
||||||
//获取农历
|
//获取农历
|
||||||
@@ -519,108 +414,9 @@ 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(() => {
|
||||||
@@ -638,12 +434,12 @@ export default {
|
|||||||
handleConfirm() {
|
handleConfirm() {
|
||||||
this.$refs.addOrUpdataRef.dataFormSubmit();
|
this.$refs.addOrUpdataRef.dataFormSubmit();
|
||||||
},
|
},
|
||||||
showDetail(val) {
|
showDetail(id) {
|
||||||
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, val, true);
|
this.$refs.addOrUpdataRef.init(this.deptId, id, true);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
editHoliday() {
|
editHoliday() {
|
||||||
@@ -765,9 +561,4 @@ 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>
|
||||||
|
|
||||||
@@ -284,7 +284,7 @@ export default {
|
|||||||
mobile: '',
|
mobile: '',
|
||||||
mobileCode: '',
|
mobileCode: '',
|
||||||
rememberMe: false,
|
rememberMe: false,
|
||||||
tenantName: '技术中心',
|
tenantName: '芋道源码',
|
||||||
},
|
},
|
||||||
scene: 21,
|
scene: 21,
|
||||||
|
|
||||||
|
|||||||
81
src/views/product&recipe/product/add-or-updata.vue
Normal file
@@ -0,0 +1,81 @@
|
|||||||
|
<!--
|
||||||
|
* @Author: zwq
|
||||||
|
* @Date: 2021-11-18 14:16:25
|
||||||
|
* @LastEditors: zwq
|
||||||
|
* @LastEditTime: 2025-11-28 14:38:31
|
||||||
|
* @Description:
|
||||||
|
-->
|
||||||
|
<template>
|
||||||
|
<el-form
|
||||||
|
:model="dataForm"
|
||||||
|
:rules="dataRule"
|
||||||
|
ref="dataForm"
|
||||||
|
@keyup.enter.native="dataFormSubmit()"
|
||||||
|
label-width="80px">
|
||||||
|
<el-row :gutter="20">
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="物料编码" prop="materialCode">
|
||||||
|
<el-input
|
||||||
|
v-model="dataForm.materialCode"
|
||||||
|
clearable
|
||||||
|
placeholder="请输入物料编码" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="物料型号" prop="materialName">
|
||||||
|
<el-input
|
||||||
|
v-model="dataForm.materialName"
|
||||||
|
clearable
|
||||||
|
placeholder="请输入物料型号" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row :gutter="20">
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="物料规格" prop="material">
|
||||||
|
<el-input
|
||||||
|
v-model="dataForm.material"
|
||||||
|
clearable
|
||||||
|
placeholder="请输入物料规格" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-form>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import basicAdd from '@/mixins/basic-add';
|
||||||
|
import { createProduct, updateProduct,getProduct } from '@/api/ssdl/product&recipe';
|
||||||
|
|
||||||
|
export default {
|
||||||
|
mixins: [basicAdd],
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
urlOptions: {
|
||||||
|
createURL: createProduct,
|
||||||
|
updateURL: updateProduct,
|
||||||
|
infoURL: getProduct,
|
||||||
|
},
|
||||||
|
dataForm: {
|
||||||
|
id: undefined,
|
||||||
|
material: undefined,
|
||||||
|
materialName: undefined,
|
||||||
|
materialCode: undefined,
|
||||||
|
},
|
||||||
|
typeArr: [],
|
||||||
|
dataRule: {
|
||||||
|
materialCode: [
|
||||||
|
{ required: true, message: '物料编码不能为空', trigger: 'blur' },
|
||||||
|
],
|
||||||
|
materialName: [
|
||||||
|
{ required: true, message: '物料型号不能为空', trigger: 'blur' },
|
||||||
|
],
|
||||||
|
material: [
|
||||||
|
{ required: true, message: '规格不能为空', trigger: 'blur' },
|
||||||
|
],
|
||||||
|
},
|
||||||
|
};
|
||||||
|
},
|
||||||
|
methods: {},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
199
src/views/product&recipe/product/index.vue
Normal file
@@ -0,0 +1,199 @@
|
|||||||
|
<template>
|
||||||
|
<div class="app-container">
|
||||||
|
<search-bar
|
||||||
|
:formConfigs="formConfig"
|
||||||
|
ref="searchBarForm"
|
||||||
|
@headBtnClick="buttonClick" />
|
||||||
|
<base-table
|
||||||
|
v-loading="dataListLoading"
|
||||||
|
:table-props="tableProps"
|
||||||
|
:page="listQuery.pageNo"
|
||||||
|
:limit="listQuery.pageSize"
|
||||||
|
:table-data="tableData"
|
||||||
|
@emitFun="getDataList">
|
||||||
|
<method-btn
|
||||||
|
v-if="tableBtn.length"
|
||||||
|
slot="handleBtn"
|
||||||
|
:width="90"
|
||||||
|
label="操作"
|
||||||
|
:method-list="tableBtn"
|
||||||
|
@clickBtn="handleClick" />
|
||||||
|
</base-table>
|
||||||
|
<pagination
|
||||||
|
:limit.sync="listQuery.pageSize"
|
||||||
|
:page.sync="listQuery.pageNo"
|
||||||
|
:total="listQuery.total"
|
||||||
|
@pagination="getDataList" />
|
||||||
|
<base-dialog
|
||||||
|
:dialogTitle="addOrEditTitle"
|
||||||
|
:dialogVisible="addOrUpdateVisible"
|
||||||
|
@cancel="handleCancel"
|
||||||
|
@confirm="handleConfirm"
|
||||||
|
:before-close="handleCancel"
|
||||||
|
width="50%">
|
||||||
|
<add-or-update
|
||||||
|
ref="addOrUpdate"
|
||||||
|
@refreshDataList="successSubmit"></add-or-update>
|
||||||
|
</base-dialog>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import AddOrUpdate from './add-or-updata';
|
||||||
|
import basicPage from '@/mixins/basic-page';
|
||||||
|
import { parseTime } from '@/filter/code-filter';
|
||||||
|
import { deleteProduct, getProductPage } from '@/api/ssdl/product&recipe';
|
||||||
|
|
||||||
|
const tableProps = [
|
||||||
|
{
|
||||||
|
prop: 'materialCode',
|
||||||
|
label: '物料编码',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'materialName',
|
||||||
|
label: '物料型号',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'material',
|
||||||
|
label: '规格',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'creator',
|
||||||
|
label: '创建人',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'createTime',
|
||||||
|
label: '创建时间',
|
||||||
|
filter: parseTime,
|
||||||
|
width: 150,
|
||||||
|
},
|
||||||
|
];
|
||||||
|
|
||||||
|
export default {
|
||||||
|
mixins: [basicPage],
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
urlOptions: {
|
||||||
|
getDataListURL: getProductPage,
|
||||||
|
deleteURL: deleteProduct,
|
||||||
|
},
|
||||||
|
tableProps,
|
||||||
|
tableBtn: [
|
||||||
|
{
|
||||||
|
type: 'edit',
|
||||||
|
btnName: '编辑',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: 'delete',
|
||||||
|
btnName: '删除',
|
||||||
|
},
|
||||||
|
].filter((v) => v),
|
||||||
|
tableData: [],
|
||||||
|
formConfig: [
|
||||||
|
{
|
||||||
|
type: 'input',
|
||||||
|
label: '型号',
|
||||||
|
placeholder: '型号',
|
||||||
|
param: 'name',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: 'input',
|
||||||
|
label: '编码',
|
||||||
|
placeholder: '编码',
|
||||||
|
param: 'code',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: 'button',
|
||||||
|
btnName: '搜索',
|
||||||
|
name: 'search',
|
||||||
|
color: 'primary',
|
||||||
|
},
|
||||||
|
// {
|
||||||
|
// type: 'separate',
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// type: 'button',
|
||||||
|
// btnName: '重置',
|
||||||
|
// name: 'reset',
|
||||||
|
// },
|
||||||
|
{
|
||||||
|
type: 'separate',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: 'button',
|
||||||
|
btnName: '新增',
|
||||||
|
name: 'add',
|
||||||
|
color: 'success',
|
||||||
|
plain: true,
|
||||||
|
},
|
||||||
|
// {
|
||||||
|
// type: this.$auth.hasPermi('base:factory:create') ? 'separate' : '',
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// type: this.$auth.hasPermi('base:factory:export') ? 'button' : '',
|
||||||
|
// btnName: '导出',
|
||||||
|
// name: 'export',
|
||||||
|
// color: 'warning',
|
||||||
|
// },
|
||||||
|
],
|
||||||
|
};
|
||||||
|
},
|
||||||
|
components: {
|
||||||
|
AddOrUpdate,
|
||||||
|
},
|
||||||
|
created() {},
|
||||||
|
methods: {
|
||||||
|
buttonClick(val) {
|
||||||
|
switch (val.btnName) {
|
||||||
|
case 'search':
|
||||||
|
this.listQuery.pageNo = 1;
|
||||||
|
this.listQuery.pageSize = 20;
|
||||||
|
this.listQuery.materialName = val.name;
|
||||||
|
this.listQuery.materialCode = val.code;
|
||||||
|
this.getDataList();
|
||||||
|
break;
|
||||||
|
case 'reset':
|
||||||
|
this.$refs.searchBarForm.resetForm();
|
||||||
|
this.listQuery = {
|
||||||
|
pageSize: 20,
|
||||||
|
pageNo: 1,
|
||||||
|
total: 1,
|
||||||
|
};
|
||||||
|
this.getDataList();
|
||||||
|
break;
|
||||||
|
case 'add':
|
||||||
|
this.addOrEditTitle = '新增';
|
||||||
|
this.addOrUpdateVisible = true;
|
||||||
|
this.addOrUpdateHandle();
|
||||||
|
break;
|
||||||
|
case 'export':
|
||||||
|
this.handleExport();
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
console.log(val);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 删除
|
||||||
|
deleteHandle(id, name, index,data) {
|
||||||
|
this.$confirm(`是否确认删除${'物料型号为 ' + data.materialName + ' '}的数据项?`, "系统提示", {
|
||||||
|
confirmButtonText: "确定",
|
||||||
|
cancelButtonText: "取消",
|
||||||
|
type: "warning",
|
||||||
|
})
|
||||||
|
.then(() => {
|
||||||
|
this.urlOptions.deleteURL(id).then(({ data }) => {
|
||||||
|
this.$message({
|
||||||
|
message: "操作成功",
|
||||||
|
type: "success",
|
||||||
|
duration: 1500,
|
||||||
|
onClose: () => {
|
||||||
|
this.getDataList();
|
||||||
|
},
|
||||||
|
});
|
||||||
|
});
|
||||||
|
})
|
||||||
|
.catch(() => { });
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
65
src/views/product&recipe/recipe/SmallTitle.vue
Normal file
@@ -0,0 +1,65 @@
|
|||||||
|
<!--
|
||||||
|
* @Author: zwq
|
||||||
|
* @Date: 2023-08-01 15:27:31
|
||||||
|
* @LastEditors: zwq
|
||||||
|
* @LastEditTime: 2023-08-01 16:25:54
|
||||||
|
* @Description:
|
||||||
|
-->
|
||||||
|
<template>
|
||||||
|
<div :class="[className, { 'p-0': noPadding }]">
|
||||||
|
<slot />
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
props: {
|
||||||
|
size: {
|
||||||
|
// 取值范围: xl lg md sm
|
||||||
|
type: String,
|
||||||
|
default: 'de',
|
||||||
|
validator: function (val) {
|
||||||
|
return ['xl', 'lg', 'de', 'md', 'sm'].indexOf(val) !== -1;
|
||||||
|
},
|
||||||
|
},
|
||||||
|
noPadding: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
className: function () {
|
||||||
|
return `${this.size}-title`;
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
$pxls: (xl, 28px) (lg, 24px) (de, 20px) (md, 18px) (sm, 16px);
|
||||||
|
$mgr: 8px;
|
||||||
|
@each $size, $height in $pxls {
|
||||||
|
.#{$size}-title {
|
||||||
|
font-size: 18px;
|
||||||
|
line-height: $height;
|
||||||
|
color: #000;
|
||||||
|
font-weight: 500;
|
||||||
|
font-family: '微软雅黑', 'Microsoft YaHei', Arial, Helvetica, sans-serif;
|
||||||
|
|
||||||
|
&::before {
|
||||||
|
content: '';
|
||||||
|
display: inline-block;
|
||||||
|
vertical-align: top;
|
||||||
|
width: 4px;
|
||||||
|
height: $height + 2px;
|
||||||
|
border-radius: 1px;
|
||||||
|
margin-right: $mgr;
|
||||||
|
background-color: #0b58ff;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.p-0 {
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
357
src/views/product&recipe/recipe/add-or-updata.vue
Normal file
@@ -0,0 +1,357 @@
|
|||||||
|
<template>
|
||||||
|
<el-drawer
|
||||||
|
:visible.sync="visible"
|
||||||
|
:show-close="false"
|
||||||
|
:wrapper-closable="false"
|
||||||
|
class="drawer"
|
||||||
|
size="60%">
|
||||||
|
<small-title slot="title" :no-padding="true">
|
||||||
|
{{ isdetail ? '详情' : !dataForm.id ? '新增' : '编辑' }}
|
||||||
|
</small-title>
|
||||||
|
|
||||||
|
<div class="content">
|
||||||
|
<div class="visual-part">
|
||||||
|
<el-form
|
||||||
|
ref="dataForm"
|
||||||
|
:model="dataForm"
|
||||||
|
:rules="dataRule"
|
||||||
|
label-width="100px"
|
||||||
|
label-position="top"
|
||||||
|
@keyup.enter.native="dataFormSubmit">
|
||||||
|
<el-row :gutter="20">
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="配方规格" prop="processSize">
|
||||||
|
<el-input
|
||||||
|
v-model="dataForm.processSize"
|
||||||
|
clearable
|
||||||
|
:disabled="isdetail"
|
||||||
|
placeholder="请输入配方规格" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="配方型号" prop="processName">
|
||||||
|
<el-input
|
||||||
|
v-model="dataForm.processName"
|
||||||
|
clearable
|
||||||
|
:disabled="isdetail"
|
||||||
|
placeholder="请输入配方型号" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="配方描述" prop="processDesc">
|
||||||
|
<el-input
|
||||||
|
v-model="dataForm.processDesc"
|
||||||
|
clearable
|
||||||
|
:disabled="isdetail"
|
||||||
|
placeholder="请输入配方描述" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-form>
|
||||||
|
|
||||||
|
<small-title
|
||||||
|
style="margin: 16px 0; padding-left: 8px"
|
||||||
|
:no-padding="true"
|
||||||
|
v-if="dataForm.processName && dataForm.processSize">
|
||||||
|
物料属性列表
|
||||||
|
</small-title>
|
||||||
|
|
||||||
|
<div
|
||||||
|
class="attr-list"
|
||||||
|
v-if="dataForm.processName && dataForm.processSize">
|
||||||
|
<base-table
|
||||||
|
:table-props="tableProps"
|
||||||
|
:page="listQuery.pageNo"
|
||||||
|
:limit="listQuery.pageSize"
|
||||||
|
:add-button-show="
|
||||||
|
productAttributeList.length > 3 || isdetail ? null : '添加属性'
|
||||||
|
"
|
||||||
|
@emitButtonClick="addNew()"
|
||||||
|
:table-data="productAttributeList">
|
||||||
|
<method-btn
|
||||||
|
v-if="!isdetail"
|
||||||
|
slot="handleBtn"
|
||||||
|
:width="120"
|
||||||
|
label="操作"
|
||||||
|
:method-list="tableBtn"
|
||||||
|
@clickBtn="handleClick" />
|
||||||
|
</base-table>
|
||||||
|
<pagination
|
||||||
|
v-show="listQuery.total > 0"
|
||||||
|
:total="listQuery.total"
|
||||||
|
:page.sync="listQuery.pageNo"
|
||||||
|
:limit.sync="listQuery.pageSize"
|
||||||
|
:page-sizes="[5, 10, 15]"
|
||||||
|
@pagination="getList" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="drawer-body__footer">
|
||||||
|
<el-button style="" @click="goback()">取消</el-button>
|
||||||
|
<el-button v-if="isdetail" type="primary" @click="goEdit()">
|
||||||
|
编辑
|
||||||
|
</el-button>
|
||||||
|
<el-button v-else type="primary" @click="dataFormSubmit()">
|
||||||
|
确定
|
||||||
|
</el-button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<product-attr-add
|
||||||
|
v-if="addOrUpdateVisible"
|
||||||
|
ref="addOrUpdate"
|
||||||
|
@refreshDataList="getList" />
|
||||||
|
</el-drawer>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import {
|
||||||
|
updateProcess,
|
||||||
|
createProcess,
|
||||||
|
getProcess,
|
||||||
|
getProcessDetailPage,
|
||||||
|
deleteProcess,
|
||||||
|
} from '@/api/ssdl/product&recipe';
|
||||||
|
import productAttrAdd from './attr-add';
|
||||||
|
import { parseTime } from '@/filter/code-filter';
|
||||||
|
import SmallTitle from './SmallTitle';
|
||||||
|
|
||||||
|
const tableBtn = [
|
||||||
|
{
|
||||||
|
type: 'edit',
|
||||||
|
btnName: '编辑',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: 'delete',
|
||||||
|
btnName: '删除',
|
||||||
|
},
|
||||||
|
];
|
||||||
|
const tableProps = [
|
||||||
|
{
|
||||||
|
prop: 'createTime',
|
||||||
|
label: '添加时间',
|
||||||
|
filter: parseTime,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'materialName',
|
||||||
|
label: '物料型号',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'material',
|
||||||
|
label: '物料规格',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'materialNumber',
|
||||||
|
label: '物料数量',
|
||||||
|
},
|
||||||
|
];
|
||||||
|
|
||||||
|
export default {
|
||||||
|
components: { productAttrAdd, SmallTitle },
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
visible: false,
|
||||||
|
addOrUpdateVisible: false,
|
||||||
|
tableBtn,
|
||||||
|
tableProps,
|
||||||
|
productAttributeList: [],
|
||||||
|
dataForm: {
|
||||||
|
id: null,
|
||||||
|
processName: '', // 配方型号
|
||||||
|
processSize: '', // 配方规格
|
||||||
|
processDesc: '', // 配方描述
|
||||||
|
},
|
||||||
|
listQuery: {
|
||||||
|
pageSize: 10,
|
||||||
|
pageNo: 1,
|
||||||
|
total: 0,
|
||||||
|
},
|
||||||
|
dataRule: {
|
||||||
|
processSize: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: '配方规格不能为空',
|
||||||
|
trigger: 'blur',
|
||||||
|
},
|
||||||
|
],
|
||||||
|
processName: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: '配方型号不能为空',
|
||||||
|
trigger: 'blur',
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
isdetail: false,
|
||||||
|
};
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
initData() {
|
||||||
|
this.productAttributeList.splice(0);
|
||||||
|
this.listQuery.total = 0;
|
||||||
|
},
|
||||||
|
init(id, isdetail) {
|
||||||
|
this.initData();
|
||||||
|
this.isdetail = isdetail || false;
|
||||||
|
this.dataForm.id = id || null;
|
||||||
|
this.visible = true;
|
||||||
|
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$refs['dataForm'].resetFields();
|
||||||
|
|
||||||
|
if (this.dataForm.id) {
|
||||||
|
// 获取物料详情
|
||||||
|
getProcess(id).then((response) => {
|
||||||
|
this.dataForm = response.data;
|
||||||
|
// 获取物料的属性列表
|
||||||
|
this.getList();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
getList() {
|
||||||
|
// 获取物料的属性列表
|
||||||
|
getProcessDetailPage({
|
||||||
|
processName: this.dataForm.processName,
|
||||||
|
processSize: this.dataForm.processSize,
|
||||||
|
pageSize: 100,
|
||||||
|
pageNo: 1,
|
||||||
|
total: 1,
|
||||||
|
}).then((response) => {
|
||||||
|
this.productAttributeList = response.data;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
handleClick(raw) {
|
||||||
|
if (raw.type === 'delete') {
|
||||||
|
this.$confirm(
|
||||||
|
`确定对${
|
||||||
|
raw.data.name
|
||||||
|
? '[名称=' + raw.data.name + ']'
|
||||||
|
: '[序号=' + raw.data._pageIndex + ']'
|
||||||
|
}进行删除操作?`,
|
||||||
|
'提示',
|
||||||
|
{
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
type: 'warning',
|
||||||
|
}
|
||||||
|
)
|
||||||
|
.then(() => {
|
||||||
|
deleteProcess(raw.data.id).then(({ data }) => {
|
||||||
|
this.$message({
|
||||||
|
message: '操作成功',
|
||||||
|
type: 'success',
|
||||||
|
duration: 1500,
|
||||||
|
onClose: () => {
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
});
|
||||||
|
});
|
||||||
|
})
|
||||||
|
.catch(() => {});
|
||||||
|
} else {
|
||||||
|
this.addNew(raw.data.id);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 表单提交
|
||||||
|
dataFormSubmit() {
|
||||||
|
this.$refs['dataForm'].validate((valid) => {
|
||||||
|
if (valid) {
|
||||||
|
if (
|
||||||
|
!this.productAttributeList ||
|
||||||
|
!(this.productAttributeList.length > 0)
|
||||||
|
) {
|
||||||
|
this.$modal.msg('物料属性不能为空');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
this.productAttributeList.forEach((item) => {
|
||||||
|
item.processName = this.dataForm.processName;
|
||||||
|
item.processSize = this.dataForm.processSize;
|
||||||
|
item.processDesc = this.dataForm.processDesc;
|
||||||
|
});
|
||||||
|
// 修改的提交
|
||||||
|
updateProcess(this.productAttributeList).then((response) => {
|
||||||
|
this.$modal.msgSuccess('提交成功');
|
||||||
|
this.visible = false;
|
||||||
|
this.$emit('refreshDataList');
|
||||||
|
});
|
||||||
|
return;
|
||||||
|
// 添加的提交
|
||||||
|
createProcess(this.productAttributeList).then((response) => {
|
||||||
|
this.$modal.msgSuccess('新增成功');
|
||||||
|
this.visible = false;
|
||||||
|
this.$emit('refreshDataList');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
goEdit() {
|
||||||
|
this.isdetail = false;
|
||||||
|
},
|
||||||
|
// 新增 / 修改
|
||||||
|
addNew(id) {
|
||||||
|
this.addOrUpdateVisible = true;
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$refs.addOrUpdate.init(id, this.dataForm);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
goback() {
|
||||||
|
this.$emit('refreshDataList');
|
||||||
|
this.visible = false;
|
||||||
|
this.initData();
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.drawer >>> .el-drawer {
|
||||||
|
border-radius: 8px 0 0 8px;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
}
|
||||||
|
|
||||||
|
.drawer >>> .el-form-item__label {
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.drawer >>> .el-drawer__header {
|
||||||
|
margin: 0;
|
||||||
|
padding: 32px 32px 24px;
|
||||||
|
border-bottom: 1px solid #dcdfe6;
|
||||||
|
}
|
||||||
|
.drawer >>> .el-drawer__body {
|
||||||
|
flex: 1;
|
||||||
|
height: 1px;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
}
|
||||||
|
|
||||||
|
.drawer >>> .content {
|
||||||
|
padding: 30px 24px;
|
||||||
|
flex: 1;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
/* height: 100%; */
|
||||||
|
}
|
||||||
|
|
||||||
|
.drawer >>> .visual-part {
|
||||||
|
flex: 1 auto;
|
||||||
|
max-height: 76vh;
|
||||||
|
overflow: hidden;
|
||||||
|
overflow-y: scroll;
|
||||||
|
padding-right: 10px; /* 调整滚动条样式 */
|
||||||
|
}
|
||||||
|
|
||||||
|
.drawer >>> .el-form,
|
||||||
|
.drawer >>> .attr-list {
|
||||||
|
padding: 0 16px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.drawer-body__footer {
|
||||||
|
display: flex;
|
||||||
|
justify-content: flex-end;
|
||||||
|
padding: 18px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
184
src/views/product&recipe/recipe/attr-add.vue
Normal file
@@ -0,0 +1,184 @@
|
|||||||
|
<template>
|
||||||
|
<el-dialog
|
||||||
|
:visible.sync="visible"
|
||||||
|
:width="'35%'"
|
||||||
|
:append-to-body="true"
|
||||||
|
:close-on-click-modal="false"
|
||||||
|
class="dialog">
|
||||||
|
<template #title>
|
||||||
|
<slot name="title">
|
||||||
|
<div class="titleStyle">
|
||||||
|
{{ !dataForm.id ? '新增' : '编辑' }}
|
||||||
|
</div>
|
||||||
|
</slot>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<el-form
|
||||||
|
ref="dataForm"
|
||||||
|
:model="dataForm"
|
||||||
|
:rules="dataRule"
|
||||||
|
label-width="100px"
|
||||||
|
@keyup.enter.native="dataFormSubmit()">
|
||||||
|
<!-- <el-form-item label="设备" prop="equipmentId">
|
||||||
|
<el-select
|
||||||
|
style="width: 100%"
|
||||||
|
v-model="dataForm.equipmentId"
|
||||||
|
@change="setEquipment"
|
||||||
|
placeholder="请选择设备">
|
||||||
|
<el-option
|
||||||
|
v-for="item in equipmentArr"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.equipmentName"
|
||||||
|
:value="item.id"></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item> -->
|
||||||
|
<el-form-item label="物料" prop="materialId">
|
||||||
|
<el-select
|
||||||
|
style="width: 100%"
|
||||||
|
v-model="dataForm.materialId"
|
||||||
|
filterable
|
||||||
|
@change="setMaterial"
|
||||||
|
placeholder="请选择物料">
|
||||||
|
<el-option
|
||||||
|
v-for="item in productArr"
|
||||||
|
:key="item.id"
|
||||||
|
:label="
|
||||||
|
item.materialCode + '-' + item.materialName + '-' + item.material
|
||||||
|
"
|
||||||
|
:value="item.id"></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="数量" prop="materialNumber">
|
||||||
|
<el-input-number
|
||||||
|
v-model="dataForm.materialNumber"
|
||||||
|
:step="1"
|
||||||
|
step-strictly
|
||||||
|
:min="0"></el-input-number>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
|
||||||
|
<el-row style="text-align: right">
|
||||||
|
<el-button @click="visible = false">取消</el-button>
|
||||||
|
<el-button type="primary" @click="dataFormSubmit()">确定</el-button>
|
||||||
|
</el-row>
|
||||||
|
</el-dialog>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import {
|
||||||
|
getProductPage,
|
||||||
|
createProcess,
|
||||||
|
getProcess,
|
||||||
|
updateProcess,
|
||||||
|
} from '@/api/ssdl/product&recipe';
|
||||||
|
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
visible: false,
|
||||||
|
dataForm: {
|
||||||
|
id: 0,
|
||||||
|
processId: '', // 配方id
|
||||||
|
processName: '', // 配方型号
|
||||||
|
processSize: '', // 配方规格
|
||||||
|
processDesc: '', // 配方描述
|
||||||
|
materialId: '',
|
||||||
|
material: '',
|
||||||
|
materialName: '',
|
||||||
|
materialNumber: '',
|
||||||
|
},
|
||||||
|
productArr: [],
|
||||||
|
equipmentArr: [],
|
||||||
|
dataRule: {
|
||||||
|
materialId: [
|
||||||
|
{ required: true, message: '物料不能为空', trigger: 'change' },
|
||||||
|
],
|
||||||
|
materialNumber: [
|
||||||
|
{ required: true, message: '数量不能为空', trigger: 'blur' },
|
||||||
|
],
|
||||||
|
},
|
||||||
|
};
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
init(id,data) {
|
||||||
|
this.dataForm.id = id || '';
|
||||||
|
this.dataForm.processId = data.id || '';
|
||||||
|
this.dataForm.processName = data.processName || '';
|
||||||
|
this.dataForm.processSize = data.processSize || '';
|
||||||
|
this.dataForm.processDesc = data.processDesc || '';
|
||||||
|
this.visible = true;
|
||||||
|
getProductPage({ pageNo: 1, pageSize: 100 }).then((res) => {
|
||||||
|
this.productArr = res.data.list;
|
||||||
|
});
|
||||||
|
// getEquipmentPage({ pageNo: 1, pageSize: 100 }).then((res) => {
|
||||||
|
// this.equipmentArr = res.data.list;
|
||||||
|
// });
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$refs['dataForm'].resetFields();
|
||||||
|
if (this.dataForm.id) {
|
||||||
|
getProcess(this.dataForm.id).then((res) => {
|
||||||
|
this.dataForm = res.data;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
setMaterial() {
|
||||||
|
const data = this.productArr.find(
|
||||||
|
(i) => i.id === this.dataForm.materialId
|
||||||
|
);
|
||||||
|
this.dataForm.materialName = data.materialName;
|
||||||
|
this.dataForm.material = data.material;
|
||||||
|
},
|
||||||
|
// 表单提交
|
||||||
|
dataFormSubmit() {
|
||||||
|
this.$refs['dataForm'].validate((valid) => {
|
||||||
|
if (valid) {
|
||||||
|
// 修改的提交
|
||||||
|
if (this.dataForm.id) {
|
||||||
|
updateProcess([{
|
||||||
|
...this.dataForm,
|
||||||
|
}]).then((response) => {
|
||||||
|
this.$modal.msgSuccess('修改成功');
|
||||||
|
this.visible = false;
|
||||||
|
this.$emit('refreshDataList');
|
||||||
|
});
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
// 添加的提交
|
||||||
|
createProcess([{
|
||||||
|
...this.dataForm,
|
||||||
|
}]).then((response) => {
|
||||||
|
this.$modal.msgSuccess('新增成功');
|
||||||
|
this.visible = false;
|
||||||
|
this.$emit('refreshDataList');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.dialog >>> .el-dialog__body {
|
||||||
|
padding: 30px 24px;
|
||||||
|
}
|
||||||
|
.dialog >>> .el-dialog__header {
|
||||||
|
font-size: 16px;
|
||||||
|
color: rgba(0, 0, 0, 0.85);
|
||||||
|
font-weight: 500;
|
||||||
|
padding: 13px 24px;
|
||||||
|
border-bottom: 1px solid #e9e9e9;
|
||||||
|
}
|
||||||
|
.dialog >>> .el-dialog__header .titleStyle::before {
|
||||||
|
content: '';
|
||||||
|
display: inline-block;
|
||||||
|
width: 4px;
|
||||||
|
height: 16px;
|
||||||
|
background-color: #0b58ff;
|
||||||
|
border-radius: 1px;
|
||||||
|
margin-right: 8px;
|
||||||
|
position: relative;
|
||||||
|
top: 2px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
258
src/views/product&recipe/recipe/index.vue
Normal file
@@ -0,0 +1,258 @@
|
|||||||
|
<!--
|
||||||
|
* @Author: zwq
|
||||||
|
* @Date: 2023-08-01 14:55:51
|
||||||
|
* @LastEditors: zwq
|
||||||
|
* @LastEditTime: 2025-11-28 14:34:11
|
||||||
|
* @Description:
|
||||||
|
-->
|
||||||
|
<template>
|
||||||
|
<div class="app-container">
|
||||||
|
<search-bar
|
||||||
|
:formConfigs="formConfig"
|
||||||
|
ref="searchBarForm"
|
||||||
|
@headBtnClick="buttonClick" />
|
||||||
|
<el-table
|
||||||
|
:data="tableData"
|
||||||
|
:header-cell-style="{
|
||||||
|
background: '#F2F4F9',
|
||||||
|
color: '#606266',
|
||||||
|
}"
|
||||||
|
border
|
||||||
|
style="width: 100%"
|
||||||
|
ref="dataList">
|
||||||
|
<el-table-column type="expand">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<product
|
||||||
|
:processName="scope.row.processName"
|
||||||
|
:processSize="scope.row.processSize"></product>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="processName" label="配方型号" />
|
||||||
|
<el-table-column prop="processSize" label="配方规格" />
|
||||||
|
<el-table-column prop="processDesc" label="配方描述" />
|
||||||
|
<el-table-column prop="createTime" label="创建时间" width="150">
|
||||||
|
<template v-slot="scope">
|
||||||
|
<span>{{ parseTime(scope.row.createTime) }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="操作" width="120">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
@click="handleClick({ data: { ...scope.row }, type: 'edit' })">
|
||||||
|
<span class="iconfont icon-edit primary-color"></span>
|
||||||
|
</el-button>
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
@click="handleClick({ data: { ...scope.row }, type: 'delete' })">
|
||||||
|
<span class="iconfont icon-delete" style="color: #f56c6c"></span>
|
||||||
|
</el-button>
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
@click="handleClick({ data: { ...scope.row }, type: 'detail' })">
|
||||||
|
<span class="iconfont icon-detail primary-color"></span>
|
||||||
|
</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
<pagination
|
||||||
|
:limit.sync="listQuery.pageSize"
|
||||||
|
:page.sync="listQuery.pageNo"
|
||||||
|
:total="listQuery.total"
|
||||||
|
@pagination="getDataList" />
|
||||||
|
<add-or-update
|
||||||
|
v-if="addOrUpdateVisible"
|
||||||
|
ref="addOrUpdate"
|
||||||
|
@refreshDataList="getDataList" />
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import AddOrUpdate from './add-or-updata';
|
||||||
|
import product from './product-mini';
|
||||||
|
import basicPage from '@/mixins/basic-page';
|
||||||
|
import { parseTime } from '@/filter/code-filter';
|
||||||
|
import {
|
||||||
|
deleteProcessList,
|
||||||
|
getProcessPage,
|
||||||
|
getProcessDetailPage,
|
||||||
|
} from '@/api/ssdl/product&recipe';
|
||||||
|
|
||||||
|
export default {
|
||||||
|
mixins: [basicPage],
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
urlOptions: {
|
||||||
|
getDataListURL: getProcessPage,
|
||||||
|
deleteURL: deleteProcessList,
|
||||||
|
},
|
||||||
|
tableBtn: [
|
||||||
|
{
|
||||||
|
type: 'edit',
|
||||||
|
btnName: '编辑',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: 'delete',
|
||||||
|
btnName: '删除',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: 'detail',
|
||||||
|
btnName: '详情',
|
||||||
|
},
|
||||||
|
].filter((v) => v),
|
||||||
|
tableData: [],
|
||||||
|
formConfig: [
|
||||||
|
{
|
||||||
|
type: 'input',
|
||||||
|
label: '配方型号',
|
||||||
|
placeholder: '配方型号',
|
||||||
|
param: 'val1',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: 'input',
|
||||||
|
label: '配方规格',
|
||||||
|
placeholder: '配方规格',
|
||||||
|
param: 'val2',
|
||||||
|
},
|
||||||
|
// {
|
||||||
|
// type: 'input',
|
||||||
|
// label: '物料型号',
|
||||||
|
// placeholder: '物料型号',
|
||||||
|
// param: 'val3',
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// type: 'input',
|
||||||
|
// label: '物料编码',
|
||||||
|
// placeholder: '物料编码',
|
||||||
|
// param: 'val4',
|
||||||
|
// },
|
||||||
|
{
|
||||||
|
type: 'button',
|
||||||
|
btnName: '搜索',
|
||||||
|
name: 'search',
|
||||||
|
color: 'primary',
|
||||||
|
},
|
||||||
|
// {
|
||||||
|
// type: 'separate',
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// type: 'button',
|
||||||
|
// btnName: '重置',
|
||||||
|
// name: 'reset',
|
||||||
|
// },
|
||||||
|
{
|
||||||
|
type: 'separate',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: 'button',
|
||||||
|
btnName: '新增',
|
||||||
|
name: 'add',
|
||||||
|
color: 'success',
|
||||||
|
plain: true,
|
||||||
|
},
|
||||||
|
// {
|
||||||
|
// type: 'separate',
|
||||||
|
// type: this.$auth.hasPermi('base:product:create') ? 'separate' : '',
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// type: this.$auth.hasPermi('base:product:export') ? 'button' : '',
|
||||||
|
// btnName: '导出',
|
||||||
|
// name: 'export',
|
||||||
|
// color: 'warning',
|
||||||
|
// },
|
||||||
|
],
|
||||||
|
};
|
||||||
|
},
|
||||||
|
components: {
|
||||||
|
AddOrUpdate,
|
||||||
|
product,
|
||||||
|
},
|
||||||
|
created() {},
|
||||||
|
methods: {
|
||||||
|
buttonClick(val) {
|
||||||
|
switch (val.btnName) {
|
||||||
|
case 'search':
|
||||||
|
this.listQuery.pageNo = 1;
|
||||||
|
this.listQuery.pageSize = 20;
|
||||||
|
this.listQuery.processName = val.val1 || null;
|
||||||
|
this.listQuery.processSize = val.val2 || null;
|
||||||
|
// this.listQuery.materialName = val.val3 || null;
|
||||||
|
// this.listQuery.materialCode = val.val4 || null;
|
||||||
|
this.getDataList();
|
||||||
|
break;
|
||||||
|
case 'reset':
|
||||||
|
this.$refs.searchBarForm.resetForm();
|
||||||
|
this.listQuery = {
|
||||||
|
pageSize: 20,
|
||||||
|
pageNo: 1,
|
||||||
|
total: 1,
|
||||||
|
};
|
||||||
|
this.getDataList();
|
||||||
|
break;
|
||||||
|
case 'add':
|
||||||
|
this.addOrEditTitle = '新增';
|
||||||
|
this.addOrUpdateVisible = true;
|
||||||
|
this.addOrUpdateHandle();
|
||||||
|
break;
|
||||||
|
case 'export':
|
||||||
|
this.handleExport();
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
console.log(val);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
otherMethods(val) {
|
||||||
|
this.addOrUpdateVisible = true;
|
||||||
|
this.addOrEditTitle = '详情';
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$refs.addOrUpdate.init(val.data.id, true);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 删除
|
||||||
|
deleteHandle(id, name, index, data) {
|
||||||
|
this.$confirm(
|
||||||
|
`是否确认删除${'配方型号为 ' + data.processName + ' '}的数据项?`,
|
||||||
|
'系统提示',
|
||||||
|
{
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
type: 'warning',
|
||||||
|
}
|
||||||
|
)
|
||||||
|
.then(() => {
|
||||||
|
// 获取物料的属性列表
|
||||||
|
getProcessDetailPage({
|
||||||
|
processName: data.processName,
|
||||||
|
processSize: data.processSize,
|
||||||
|
pageSize: 100,
|
||||||
|
pageNo: 1,
|
||||||
|
total: 1,
|
||||||
|
}).then((response) => {
|
||||||
|
const ids = response.data.map((i) => i.id);
|
||||||
|
this.urlOptions.deleteURL(ids).then(({ data }) => {
|
||||||
|
this.$message({
|
||||||
|
message: '操作成功',
|
||||||
|
type: 'success',
|
||||||
|
duration: 1500,
|
||||||
|
onClose: () => {
|
||||||
|
this.getDataList();
|
||||||
|
},
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
})
|
||||||
|
.catch(() => {});
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
.app-container .el-table .el-table__cell {
|
||||||
|
padding: 0;
|
||||||
|
height: 35px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
85
src/views/product&recipe/recipe/product-mini.vue
Normal file
@@ -0,0 +1,85 @@
|
|||||||
|
<!--
|
||||||
|
* @Author: zwq
|
||||||
|
* @Date: 2023-08-24 14:47:58
|
||||||
|
* @LastEditors: zwq
|
||||||
|
* @LastEditTime: 2025-11-28 10:06:06
|
||||||
|
* @Description:
|
||||||
|
-->
|
||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<!-- <div class="app-container"> -->
|
||||||
|
<base-table
|
||||||
|
v-loading="dataListLoading"
|
||||||
|
:table-props="tableProps"
|
||||||
|
max-height="200"
|
||||||
|
:page="1"
|
||||||
|
:limit="listQuery.total"
|
||||||
|
:table-data="tableData" />
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import basicPage from '@/mixins/basic-page';
|
||||||
|
import { parseTime } from '@/filter/code-filter';
|
||||||
|
import { getProcessDetailPage } from '@/api/ssdl/product&recipe';
|
||||||
|
|
||||||
|
const tableProps = [
|
||||||
|
{
|
||||||
|
prop: 'materialName',
|
||||||
|
label: '物料型号',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'material',
|
||||||
|
label: '物料规格',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'materialNumber',
|
||||||
|
label: '物料数量',
|
||||||
|
},
|
||||||
|
];
|
||||||
|
|
||||||
|
export default {
|
||||||
|
mixins: [basicPage],
|
||||||
|
props: {
|
||||||
|
processSize: {
|
||||||
|
type: String,
|
||||||
|
default: '',
|
||||||
|
},
|
||||||
|
processName: {
|
||||||
|
type: String,
|
||||||
|
default: '',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
urlOptions: {
|
||||||
|
getDataListURL: getProcessDetailPage,
|
||||||
|
},
|
||||||
|
tableProps,
|
||||||
|
tableData: [],
|
||||||
|
listQuery: {
|
||||||
|
processName: this.processName,
|
||||||
|
processSize: this.processSize,
|
||||||
|
pageSize: 100,
|
||||||
|
pageNo: 1,
|
||||||
|
total: 1,
|
||||||
|
},
|
||||||
|
};
|
||||||
|
},
|
||||||
|
components: {
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
// 获取数据列表
|
||||||
|
getDataList() {
|
||||||
|
this.dataListLoading = true;
|
||||||
|
this.urlOptions.getDataListURL(this.listQuery).then(response => {
|
||||||
|
this.tableData = response.data;
|
||||||
|
this.listQuery.total = response.data.total;
|
||||||
|
this.dataListLoading = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
@@ -0,0 +1,38 @@
|
|||||||
|
/*
|
||||||
|
* @Author: zhp
|
||||||
|
* @Date: 2022-06-14 14:28:55
|
||||||
|
* @LastEditTime: 2023-08-15 15:48:39
|
||||||
|
* @LastEditors: zhp
|
||||||
|
* @Description:
|
||||||
|
*/
|
||||||
|
const EventListener = {
|
||||||
|
/**
|
||||||
|
* Listen to DOM events during the bubble phase.
|
||||||
|
*
|
||||||
|
* @param {DOMEventTarget} target DOM element to register listener on.
|
||||||
|
* @param {string} eventType Event type, e.g. 'click' or 'mouseover'.
|
||||||
|
* @param {function} callback Callback function.
|
||||||
|
* @return {object} Object with a `remove` method.
|
||||||
|
*/
|
||||||
|
listen(target, eventType, callback) {
|
||||||
|
if (target.addEventListener) {
|
||||||
|
// console.log(1111)
|
||||||
|
target.addEventListener(eventType, callback, false)
|
||||||
|
return {
|
||||||
|
remove() {
|
||||||
|
target.removeEventListener(eventType, callback, false)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else if (target.attachEvent) {
|
||||||
|
// console.log(222)
|
||||||
|
target.attachEvent('on' + eventType, callback)
|
||||||
|
return {
|
||||||
|
remove() {
|
||||||
|
target.detachEvent('on' + eventType, callback)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export default EventListener
|
||||||
@@ -0,0 +1,170 @@
|
|||||||
|
<template>
|
||||||
|
<header class="report-header">
|
||||||
|
<!-- logo 放在最左侧 -->
|
||||||
|
<!-- <img style="width: 221px;height: 31px;" src="" alt="benmaLogo" class="logo"> -->
|
||||||
|
<!-- 标题居中显示 -->
|
||||||
|
<!-- <h1>{{ topTitle }}</h1> -->
|
||||||
|
<!-- 实时时间显示 -->
|
||||||
|
<div class="header-right">
|
||||||
|
<img style="width: 426px;height: 44px;" src="../../../../assets/img/ssdlLeftTitle.png" alt="">
|
||||||
|
<!-- <div class="current-time">
|
||||||
|
<div class="YMD">{{ YMD }}</div>
|
||||||
|
<div class="time">{{ time }}</div>
|
||||||
|
</div> -->
|
||||||
|
</div>
|
||||||
|
<div class="header-right">
|
||||||
|
<img style="width: 426px;height: 44px;" src="../../../../assets/img/ssdlTitle.png" alt="">
|
||||||
|
<div class="current-time">
|
||||||
|
<div class="YMD">{{ YMD }}</div>
|
||||||
|
<div class="time">{{ time }}</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- 全屏按钮保持在右侧 -->
|
||||||
|
<el-button type="text" class="screen-btn" :title="isFullScreen ? '退出全屏' : '全屏'" @click="changeFullScreen">
|
||||||
|
<svg-icon v-if="isFullScreen" icon-class="unFullScreenView" />
|
||||||
|
<svg-icon v-else icon-class="fullScreenView" />
|
||||||
|
</el-button>
|
||||||
|
</header>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
name: 'Header',
|
||||||
|
props: {
|
||||||
|
isFullScreen: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
|
},
|
||||||
|
topTitle: {
|
||||||
|
type: String,
|
||||||
|
default: ''
|
||||||
|
}
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
time: '',
|
||||||
|
YMD:'',
|
||||||
|
timeTimer: null // 用于存储定时器
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
changeFullScreen() {
|
||||||
|
this.$emit('screenfullChange')
|
||||||
|
},
|
||||||
|
exportPDF() {
|
||||||
|
this.$emit('exportPDF')
|
||||||
|
},
|
||||||
|
// 更新当前时间
|
||||||
|
updateTime() {
|
||||||
|
const now = new Date()
|
||||||
|
const hours = this.padZero(now.getHours())
|
||||||
|
const minutes = this.padZero(now.getMinutes())
|
||||||
|
// 新增:获取并格式化秒数
|
||||||
|
const seconds = this.padZero(now.getSeconds())
|
||||||
|
|
||||||
|
const year = now.getFullYear()
|
||||||
|
const month = this.padZero(now.getMonth() + 1) // 补充月份补零,避免单数字月份(如3月显示为"3")
|
||||||
|
const day = this.padZero(now.getDate()) // 补充日期补零
|
||||||
|
|
||||||
|
// 时间格式更新为:时:分:秒
|
||||||
|
this.time = `${hours}:${minutes}:${seconds}`
|
||||||
|
// 日期格式优化:月份和日期补零(如2025.3.5 → 2025.03.05)
|
||||||
|
this.YMD = `${year}.${month}.${day}`
|
||||||
|
},
|
||||||
|
// 补零函数保持不变(确保时分秒都是两位数)
|
||||||
|
padZero(num) {
|
||||||
|
return num < 10 ? '0' + num : num
|
||||||
|
}
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
// 初始化时间
|
||||||
|
this.updateTime()
|
||||||
|
// 设置定时器,每秒更新一次时间
|
||||||
|
this.timeTimer = setInterval(this.updateTime, 1000)
|
||||||
|
},
|
||||||
|
beforeDestroy() {
|
||||||
|
// 组件销毁前清除定时器,防止内存泄漏
|
||||||
|
if (this.timeTimer) {
|
||||||
|
clearInterval(this.timeTimer)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="scss">
|
||||||
|
.report-header {
|
||||||
|
width: 1920px;
|
||||||
|
height: 72px;
|
||||||
|
background: #FFFFFF;
|
||||||
|
box-shadow: 0px 1px 4px 0px rgba(0, 21, 41, 0.12);
|
||||||
|
display: flex;
|
||||||
|
justify-content:space-between;
|
||||||
|
align-items: center;
|
||||||
|
position: relative;
|
||||||
|
padding: 0 20px;
|
||||||
|
|
||||||
|
// .logo {
|
||||||
|
// position: absolute;
|
||||||
|
// left: 40px;
|
||||||
|
// top: 15px;
|
||||||
|
// height: auto;
|
||||||
|
// object-fit: contain;
|
||||||
|
// }
|
||||||
|
.header-right{
|
||||||
|
display: flex;
|
||||||
|
gap: 15px;
|
||||||
|
}
|
||||||
|
h1 {
|
||||||
|
font-family: PingFangSC, PingFang SC;
|
||||||
|
font-weight: 400;
|
||||||
|
font-size: 48px;
|
||||||
|
color: #FFFFFF;
|
||||||
|
letter-spacing: 28px;
|
||||||
|
text-shadow: 1px 7px 2px #002144;
|
||||||
|
text-align: center;
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 实时时间样式
|
||||||
|
.current-time {
|
||||||
|
// position: absolute;
|
||||||
|
// right: 100px; // 位于全屏按钮左侧
|
||||||
|
// top: 20px;
|
||||||
|
color: rgba(0, 0, 0, 0.85); // 假设使用白色文字,可根据实际设计调整
|
||||||
|
// font-size: 22px; // 可根据需要调整大小
|
||||||
|
font-weight: 600;
|
||||||
|
font-family: PingFangSC, PingFang SC;
|
||||||
|
font-weight: 500;
|
||||||
|
font-size: 16px;
|
||||||
|
line-height: 24px;
|
||||||
|
letter-spacing: 1px;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
.YMD{
|
||||||
|
font-weight: 600;
|
||||||
|
}
|
||||||
|
.time{
|
||||||
|
// width: 87px;
|
||||||
|
// height: 14px;
|
||||||
|
font-family: PingFangSC, PingFang SC;
|
||||||
|
font-weight: 600;
|
||||||
|
font-size: 16px;
|
||||||
|
color:rgba(0, 0, 0, 0.85);;
|
||||||
|
// line-height: 14px;
|
||||||
|
letter-spacing: 1px;
|
||||||
|
text-align: left;
|
||||||
|
font-style: normal;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.screen-btn {
|
||||||
|
color: #00fff0;
|
||||||
|
font-size: 26px;
|
||||||
|
position: absolute;
|
||||||
|
right: 21px;
|
||||||
|
top: 85px;
|
||||||
|
transform: translateY(-50%);
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -0,0 +1,299 @@
|
|||||||
|
<template>
|
||||||
|
<div style="flex: 1">
|
||||||
|
<div class="agvStatusContent">
|
||||||
|
<div class="title">AGV状态</div>
|
||||||
|
<div class="agvDetailData">
|
||||||
|
<div class="item" v-for="(agv, index) in agvList" :key="agv.id">
|
||||||
|
<img class="car" src="../../../../assets/img/agvCar.png" alt="AGV小车">
|
||||||
|
<div class="eqInfo">
|
||||||
|
<div class="eqCode">
|
||||||
|
<div class="num">{{ index + 1 }}</div>
|
||||||
|
<div class="code">{{ agv.code }}</div>
|
||||||
|
</div>
|
||||||
|
<div class="eqStatusData">
|
||||||
|
<!-- 状态图标 -->
|
||||||
|
<img style="width: 16px; height: 16px; margin-right: 4px;" :src="require(`@/assets/img/${agv.statusImg}`)"
|
||||||
|
:alt="agv.status">
|
||||||
|
<!-- 状态文字(固定宽度) -->
|
||||||
|
<div class="runningState" :style="getStatusColor(agv.status)">
|
||||||
|
{{ agv.status }}
|
||||||
|
</div>
|
||||||
|
<!-- 动态栅格容器 -->
|
||||||
|
<div class="charge" :class="{
|
||||||
|
'charge--run': agv.status !== '充电中', // 运行中/待命用run背景
|
||||||
|
'charge--charge': agv.status === '充电中' // 充电中用charge背景
|
||||||
|
}">
|
||||||
|
<div class="grid-item" :style="{ backgroundColor: getGridColor(agv.status) }"
|
||||||
|
v-for="(grid, idx) in generateGridArray(getGridCount(agv.progress))" :key="idx"
|
||||||
|
></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="qty">
|
||||||
|
<div class="num">{{ agv.completed }}</div>
|
||||||
|
<div class="qtyTitle">今日完成</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
name: 'AGVStatus',
|
||||||
|
components: {},
|
||||||
|
props: {
|
||||||
|
energyObj: {
|
||||||
|
type: Object,
|
||||||
|
default: () => ({
|
||||||
|
electricComu: 0,
|
||||||
|
steamComu: 0
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
agvList: [
|
||||||
|
{
|
||||||
|
id: 1,
|
||||||
|
code: '设备编号1212121',
|
||||||
|
status: '运行中',
|
||||||
|
statusImg: 'runCircle.png',
|
||||||
|
completed: 47,
|
||||||
|
progress: 80 // 进度80% → 显示4个栅格
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 2,
|
||||||
|
code: '设备编号3434343',
|
||||||
|
status: '待命',
|
||||||
|
statusImg: 'standbyCircle.png',
|
||||||
|
completed: 23,
|
||||||
|
progress: 40 // 进度40% → 显示2个栅格
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 3,
|
||||||
|
code: '设备编号5656565',
|
||||||
|
status: '充电中',
|
||||||
|
statusImg: 'chargeCircle.png',
|
||||||
|
completed: 15,
|
||||||
|
progress: 100 // 进度100% → 显示5个栅格
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 4,
|
||||||
|
code: '设备编号7878787',
|
||||||
|
status: '充电中',
|
||||||
|
statusImg: 'chargeCircle.png',
|
||||||
|
completed: 31,
|
||||||
|
progress: 60 // 进度60% → 显示3个栅格
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
// 获取状态文字颜色
|
||||||
|
getStatusColor(status) {
|
||||||
|
const baseStyle = {
|
||||||
|
color: '', // 默认颜色
|
||||||
|
letterSpacing: '0px' // 默认字间距
|
||||||
|
};
|
||||||
|
|
||||||
|
switch (status) {
|
||||||
|
case '运行中':
|
||||||
|
baseStyle.color = '#0A4BFF';
|
||||||
|
break;
|
||||||
|
case '待命':
|
||||||
|
baseStyle.color = 'rgba(245, 154, 36, 1)';
|
||||||
|
baseStyle.letterSpacing = '8px'; // 待命状态单独加字间距(可调整数值)
|
||||||
|
break;
|
||||||
|
case '充电中':
|
||||||
|
baseStyle.color = 'rgba(0, 225, 37, 1)';
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
baseStyle.color = '';
|
||||||
|
}
|
||||||
|
|
||||||
|
return baseStyle;
|
||||||
|
},
|
||||||
|
// 根据状态获取背景图
|
||||||
|
getBgImage(status) {
|
||||||
|
return status === '充电中' ? 'chargeBg.png' : 'run.png';
|
||||||
|
},
|
||||||
|
// 根据状态获取栅格颜色
|
||||||
|
getGridColor(status) {
|
||||||
|
return status === '充电中'
|
||||||
|
? 'rgba(0, 225, 37, 1)'
|
||||||
|
: 'rgba(120, 138, 221, 1)';
|
||||||
|
},
|
||||||
|
getGridCount(progress) {
|
||||||
|
// 总栅格位置为5个,进度0%→0个,100%→5个,按比例取整
|
||||||
|
const totalGrids = 5;
|
||||||
|
return Math.ceil((progress / 100) * totalGrids);
|
||||||
|
},
|
||||||
|
|
||||||
|
// 生成栅格数组(用于v-for遍历)
|
||||||
|
generateGridArray(count) {
|
||||||
|
// 生成 [1,2,...,count] 的数组,长度为count
|
||||||
|
return Array.from({ length: count }, (_, i) => i + 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang='scss' scoped>
|
||||||
|
.agvStatusContent {
|
||||||
|
width: 367px;
|
||||||
|
height: 512px;
|
||||||
|
background: #FFFFFF;
|
||||||
|
border-radius: 8px;
|
||||||
|
padding: 16px 18px 26px;
|
||||||
|
|
||||||
|
.title {
|
||||||
|
font-family: PingFangSC, PingFang SC;
|
||||||
|
font-weight: 400;
|
||||||
|
font-size: 16px;
|
||||||
|
color: rgba(0, 0, 0, 0.85);
|
||||||
|
line-height: 16px;
|
||||||
|
letter-spacing: 1px;
|
||||||
|
text-align: left;
|
||||||
|
font-style: normal;
|
||||||
|
position: relative;
|
||||||
|
padding-left: 12px;
|
||||||
|
|
||||||
|
&::before {
|
||||||
|
content: '';
|
||||||
|
width: 4px;
|
||||||
|
height: 16px;
|
||||||
|
background: #0A4BFF;
|
||||||
|
border-radius: 1px;
|
||||||
|
position: absolute;
|
||||||
|
left: 0;
|
||||||
|
top: 2px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.agvDetailData {
|
||||||
|
margin-top: 15px;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: 12px;
|
||||||
|
|
||||||
|
.item {
|
||||||
|
width: 332px;
|
||||||
|
height: 101px;
|
||||||
|
padding: 22px 0 0 10px;
|
||||||
|
display: flex;
|
||||||
|
background: url('../../../../assets/img/agvItemBg.png') no-repeat;
|
||||||
|
background-size: cover;
|
||||||
|
|
||||||
|
.car {
|
||||||
|
width: 66px;
|
||||||
|
height: 57px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.eqInfo {
|
||||||
|
margin-left: 6px;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: 8px;
|
||||||
|
|
||||||
|
.eqCode {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
|
||||||
|
.num {
|
||||||
|
width: 21px;
|
||||||
|
height: 24px;
|
||||||
|
background: #0065FF;
|
||||||
|
backdrop-filter: blur(1.5px);
|
||||||
|
font-family: PingFangSC, PingFang SC;
|
||||||
|
font-weight: 400;
|
||||||
|
font-size: 16px;
|
||||||
|
color: #FFFFFF;
|
||||||
|
line-height: 18px;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.code {
|
||||||
|
margin-left: 4px;
|
||||||
|
font-family: PingFangSC, PingFang SC;
|
||||||
|
font-weight: 400;
|
||||||
|
font-size: 16px;
|
||||||
|
color: #020203;
|
||||||
|
line-height: 18px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.eqStatusData {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
|
||||||
|
// 状态文字固定宽度(确保三种状态宽度一致)
|
||||||
|
.runningState {
|
||||||
|
font-family: PingFangSC, PingFang SC;
|
||||||
|
font-weight: 400;
|
||||||
|
font-size: 16px;
|
||||||
|
line-height: 20px;
|
||||||
|
width: 48px; // 固定宽度,适配三种状态文字
|
||||||
|
text-align: left; // 左对齐,避免空格填充
|
||||||
|
}
|
||||||
|
|
||||||
|
// 栅格容器样式
|
||||||
|
.charge {
|
||||||
|
width: 73px;
|
||||||
|
height: 27px;
|
||||||
|
margin-left: 5px;
|
||||||
|
background-size: 100% 100% !important;
|
||||||
|
background-repeat: no-repeat !important;
|
||||||
|
display: flex;
|
||||||
|
justify-content: flex-start;
|
||||||
|
gap: 1px;
|
||||||
|
padding: 5px 0px 4px 3px;
|
||||||
|
|
||||||
|
// 运行中/待命状态的背景图
|
||||||
|
&.charge--run {
|
||||||
|
background-image: url('../../../../assets/img/runBg.png');
|
||||||
|
}
|
||||||
|
|
||||||
|
// 充电中状态的背景图
|
||||||
|
&.charge--charge {
|
||||||
|
background-image: url('../../../../assets/img/chargeBg.png');
|
||||||
|
}
|
||||||
|
|
||||||
|
.grid-item {
|
||||||
|
width: 12px;
|
||||||
|
height: 18px;
|
||||||
|
border-radius: 2px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.qty {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
margin-left: 24px;
|
||||||
|
gap: 12px;
|
||||||
|
|
||||||
|
.num {
|
||||||
|
font-family: PingFangSC, PingFang SC;
|
||||||
|
font-weight: 400;
|
||||||
|
font-size: 31px;
|
||||||
|
color: #000000;
|
||||||
|
line-height: 18px;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.qtyTitle {
|
||||||
|
font-family: PingFangSC, PingFang SC;
|
||||||
|
font-weight: 400;
|
||||||
|
font-size: 14px;
|
||||||
|
color: rgba(2, 2, 3, 0.6);
|
||||||
|
line-height: 18px;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -0,0 +1,97 @@
|
|||||||
|
<template>
|
||||||
|
<div style="flex: 1">
|
||||||
|
<div class="agvStatusContent">
|
||||||
|
<div class="title">异常报警</div>
|
||||||
|
<div class="alarm-item" style="margin-top: 13px;">
|
||||||
|
<div class="item">
|
||||||
|
9:05:21|FMS|AGV-03顶升失败,任务TSK25-1004中断
|
||||||
|
</div>
|
||||||
|
<div class="item">
|
||||||
|
9:05:21|FMS|AGV-03顶升失败,任务TSK25-1004中断
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
// import baseTable from './baseTable.vue'
|
||||||
|
// import baseStatus from './baseStatus.vue'
|
||||||
|
// import handingObject from './handingObject.vue'
|
||||||
|
export default {
|
||||||
|
name: 'AGVStatus',
|
||||||
|
components: {},
|
||||||
|
props: {
|
||||||
|
// energyObj: {
|
||||||
|
// type: Object,
|
||||||
|
// default: () => ({
|
||||||
|
// electricComu: 0,
|
||||||
|
// steamComu: 0
|
||||||
|
// })
|
||||||
|
// }
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
},
|
||||||
|
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang='scss' scoped>
|
||||||
|
.agvStatusContent {
|
||||||
|
width: 930px;
|
||||||
|
height: 92px;
|
||||||
|
background: #FFFFFF;
|
||||||
|
border-radius: 8px;
|
||||||
|
padding: 16px 18px 0 18px;
|
||||||
|
|
||||||
|
.title {
|
||||||
|
font-family: PingFangSC, PingFang SC;
|
||||||
|
font-weight: 400;
|
||||||
|
font-size: 16px;
|
||||||
|
color: rgba(0, 0, 0, 0.85);
|
||||||
|
line-height: 16px;
|
||||||
|
letter-spacing: 1px;
|
||||||
|
text-align: left;
|
||||||
|
font-style: normal;
|
||||||
|
position: relative;
|
||||||
|
padding-left: 12px;
|
||||||
|
|
||||||
|
&::before {
|
||||||
|
content: '';
|
||||||
|
width: 4px;
|
||||||
|
height: 16px;
|
||||||
|
background: #0A4BFF;
|
||||||
|
border-radius: 1px;
|
||||||
|
position: absolute;
|
||||||
|
left: 0;
|
||||||
|
top: 2px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.alarm-item {
|
||||||
|
display: flex;
|
||||||
|
gap: 10px;
|
||||||
|
|
||||||
|
.item {
|
||||||
|
width: 436px;
|
||||||
|
height: 32px;
|
||||||
|
border: 1px rgba(0, 0, 0, 0.3) dashed;
|
||||||
|
background: url('../../../../assets/img/alarmItemBg.png') no-repeat;
|
||||||
|
background-size: 100% 100%;
|
||||||
|
font-family: PingFangSC, PingFang SC;
|
||||||
|
font-weight: 400;
|
||||||
|
font-size: 14px;
|
||||||
|
padding: 0 16px;
|
||||||
|
color: #000000;
|
||||||
|
line-height: 32px;
|
||||||
|
letter-spacing: 1px;
|
||||||
|
text-align: left;
|
||||||
|
font-style: normal;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -0,0 +1,232 @@
|
|||||||
|
<template>
|
||||||
|
<div style="flex: 1">
|
||||||
|
<div class="agvStatusContent">
|
||||||
|
<div class="title">异常原因Top5</div>
|
||||||
|
<div class="alarm-item" style="margin-top: 14px;">
|
||||||
|
<div class="item top1">
|
||||||
|
<dov class="item-data">
|
||||||
|
<div class="data-unit">
|
||||||
|
单位/次
|
||||||
|
</div>
|
||||||
|
<div class="data-detail">
|
||||||
|
<div class="data-title">
|
||||||
|
放货有货
|
||||||
|
</div>
|
||||||
|
<div class="data-num">
|
||||||
|
261,938,984
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</dov>
|
||||||
|
</div>
|
||||||
|
<div class="item top2">
|
||||||
|
<dov class="item-data">
|
||||||
|
<div class="data-unit">
|
||||||
|
单位/次
|
||||||
|
</div>
|
||||||
|
<div class="data-detail">
|
||||||
|
<div class="data-title">
|
||||||
|
车辆故障
|
||||||
|
</div>
|
||||||
|
<div class="data-num">
|
||||||
|
261,938,984
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</dov>
|
||||||
|
</div>
|
||||||
|
<div class="item top3">
|
||||||
|
<dov class="item-data">
|
||||||
|
<div class="data-unit">
|
||||||
|
单位/次
|
||||||
|
</div>
|
||||||
|
<div class="data-detail">
|
||||||
|
<div class="data-title">
|
||||||
|
下发失败
|
||||||
|
</div>
|
||||||
|
<div class="data-num">
|
||||||
|
261,938,984
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</dov>
|
||||||
|
</div>
|
||||||
|
<div class="item top4">
|
||||||
|
<dov class="item-data">
|
||||||
|
<div class="data-unit">
|
||||||
|
单位/次
|
||||||
|
</div>
|
||||||
|
<div class="data-detail">
|
||||||
|
<div class="data-title">
|
||||||
|
取货无货
|
||||||
|
</div>
|
||||||
|
<div class="data-num">
|
||||||
|
261,938,984
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</dov>
|
||||||
|
</div>
|
||||||
|
<div class="item top5">
|
||||||
|
<dov class="item-data">
|
||||||
|
<div class="data-unit">
|
||||||
|
单位/次
|
||||||
|
</div>
|
||||||
|
<div class="data-detail">
|
||||||
|
<div class="data-title">
|
||||||
|
通信中断
|
||||||
|
</div>
|
||||||
|
<div class="data-num">
|
||||||
|
261,938,984
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</dov>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
// import baseTable from './baseTable.vue'
|
||||||
|
// import baseStatus from './baseStatus.vue'
|
||||||
|
// import handingObject from './handingObject.vue'
|
||||||
|
export default {
|
||||||
|
name: 'AGVStatus',
|
||||||
|
components: {},
|
||||||
|
props: {
|
||||||
|
// energyObj: {
|
||||||
|
// type: Object,
|
||||||
|
// default: () => ({
|
||||||
|
// electricComu: 0,
|
||||||
|
// steamComu: 0
|
||||||
|
// })
|
||||||
|
// }
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
},
|
||||||
|
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang='scss' scoped>
|
||||||
|
.agvStatusContent {
|
||||||
|
width: 402px;
|
||||||
|
height: 442px;
|
||||||
|
background: #FFFFFF;
|
||||||
|
border-radius: 8px;
|
||||||
|
padding: 16px 24px;
|
||||||
|
|
||||||
|
.title {
|
||||||
|
font-family: PingFangSC, PingFang SC;
|
||||||
|
font-weight: 400;
|
||||||
|
font-size: 16px;
|
||||||
|
color: rgba(0, 0, 0, 0.85);
|
||||||
|
line-height: 16px;
|
||||||
|
letter-spacing: 1px;
|
||||||
|
text-align: left;
|
||||||
|
font-style: normal;
|
||||||
|
position: relative;
|
||||||
|
padding-left: 12px;
|
||||||
|
|
||||||
|
&::before {
|
||||||
|
content: '';
|
||||||
|
width: 4px;
|
||||||
|
height: 16px;
|
||||||
|
background: #0A4BFF;
|
||||||
|
border-radius: 1px;
|
||||||
|
position: absolute;
|
||||||
|
left: 0;
|
||||||
|
top: 2px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.alarm-item {
|
||||||
|
display: flex;
|
||||||
|
gap: 8px;
|
||||||
|
flex-direction: column;
|
||||||
|
|
||||||
|
.item {
|
||||||
|
width: 354px;
|
||||||
|
height: 70px;
|
||||||
|
background: url('../../../../assets/img/alarmItemBg.png') no-repeat;
|
||||||
|
background-size: 100% 100%;
|
||||||
|
|
||||||
|
.item-data {
|
||||||
|
margin-left: 95px;
|
||||||
|
margin-top: 14px;
|
||||||
|
display: flex;
|
||||||
|
gap: 2px;
|
||||||
|
flex-direction: column;
|
||||||
|
|
||||||
|
.data-unit {
|
||||||
|
// width: 58px;
|
||||||
|
// height: 17px;
|
||||||
|
font-family: PingFangSC, PingFang SC;
|
||||||
|
font-weight: 400;
|
||||||
|
font-size: 14px;
|
||||||
|
color:rgba(0, 0, 0, 0.7);
|
||||||
|
line-height: 17px;
|
||||||
|
letter-spacing: 2px;
|
||||||
|
text-align: left;
|
||||||
|
font-style: normal;
|
||||||
|
}
|
||||||
|
|
||||||
|
.data-detail {
|
||||||
|
display: flex;
|
||||||
|
gap: 12px;
|
||||||
|
|
||||||
|
.data-title {
|
||||||
|
// width: 80px;
|
||||||
|
// height: 17px;
|
||||||
|
font-family: PingFangSC, PingFang SC;
|
||||||
|
font-weight: 400;
|
||||||
|
font-size: 18px;
|
||||||
|
color: rgba(0, 0, 0, 0.7);
|
||||||
|
line-height: 17px;
|
||||||
|
letter-spacing: 1px;
|
||||||
|
text-align: left;
|
||||||
|
font-style: normal;
|
||||||
|
}
|
||||||
|
.data-num{
|
||||||
|
// width: 138px;
|
||||||
|
// height: 17px;
|
||||||
|
font-family: PingFangSC, PingFang SC;
|
||||||
|
font-weight: 400;
|
||||||
|
font-size: 24px;
|
||||||
|
color: #000000;
|
||||||
|
line-height: 12px;
|
||||||
|
text-align: left;
|
||||||
|
font-style: normal;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.top1 {
|
||||||
|
background: url('../../../../assets/img/Top1.png') no-repeat;
|
||||||
|
background-size: 100% 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.top2 {
|
||||||
|
background: url('../../../../assets/img/Top2.png') no-repeat;
|
||||||
|
background-size: 100% 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.top3 {
|
||||||
|
background: url('../../../../assets/img/Top3.png') no-repeat;
|
||||||
|
background-size: 100% 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.top4 {
|
||||||
|
background: url('../../../../assets/img/Top4.png') no-repeat;
|
||||||
|
background-size: 100% 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.top5 {
|
||||||
|
background: url('../../../../assets/img/Top5.png') no-repeat;
|
||||||
|
background-size: 100% 100%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -0,0 +1,294 @@
|
|||||||
|
<!--
|
||||||
|
* @Author: gtz
|
||||||
|
* @Date: 2022-01-19 15:58:17
|
||||||
|
* @LastEditors: zhp
|
||||||
|
* @LastEditTime: 2023-09-16 18:52:57
|
||||||
|
* @Description: file content
|
||||||
|
* @FilePath: \mt-bus-fe\src\views\OperationalOverview\components\baseContainer\index.vue
|
||||||
|
-->
|
||||||
|
<template>
|
||||||
|
<div
|
||||||
|
class="base-container"
|
||||||
|
:style="{ height: '100%', fontSize: 12 * beilv + 'px', padding: 12 * beilv + 'px' }"
|
||||||
|
:class="{ 'no-padding': noPadding, 'border-none': !showLine }"
|
||||||
|
>
|
||||||
|
<!-- <div class="base-container" :style="{height: height * beilv + 'px', fontSize: 12 * beilv + 'px', padding: 12 * beilv + 'px'}"> -->
|
||||||
|
<template v-if="showLine">
|
||||||
|
<div class="line" />
|
||||||
|
<div class="line line-vertical" />
|
||||||
|
<div class="line line-right" />
|
||||||
|
<div class="line line-right-vertical" />
|
||||||
|
<div class="line line-bottom" />
|
||||||
|
<div class="line line-bottom-vertical" />
|
||||||
|
<div class="line line-bottom-right" />
|
||||||
|
<div class="line line-bottom-right-vertical" />
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<div class="bar-item">
|
||||||
|
<div v-if="title" class="bar-title">
|
||||||
|
<div class="line line-bottom" />
|
||||||
|
<div class="line line-bottom-vertical" />
|
||||||
|
<div class="line line-bottom-right" />
|
||||||
|
<div class="line line-bottom-right-vertical" />
|
||||||
|
<span class="title">
|
||||||
|
<!-- <svg-icon :icon-class="titleIcon" style="font-size: 1.5em; position: relative; top: .08em" /> -->
|
||||||
|
{{ title }}
|
||||||
|
</span>
|
||||||
|
<span class="colorBlock One" />
|
||||||
|
<span class="colorBlock Two" />
|
||||||
|
<span class="colorBlock Three" />
|
||||||
|
<span class="colorBlock Four" />
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="bar-content" :class="{ 'p-0': noContentPadding }">
|
||||||
|
<slot />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
name: 'BaseContainer',
|
||||||
|
props: {
|
||||||
|
showLine: {
|
||||||
|
type: Boolean,
|
||||||
|
default: true
|
||||||
|
},
|
||||||
|
noPadding: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
|
},
|
||||||
|
noContentPadding: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
|
},
|
||||||
|
title: {
|
||||||
|
type: String,
|
||||||
|
default: ''
|
||||||
|
},
|
||||||
|
titleIcon: {
|
||||||
|
type: String,
|
||||||
|
default: ''
|
||||||
|
},
|
||||||
|
height: {
|
||||||
|
type: Number,
|
||||||
|
default: 200
|
||||||
|
},
|
||||||
|
baseSize: {
|
||||||
|
type: Number,
|
||||||
|
default: 12
|
||||||
|
},
|
||||||
|
beilv: {
|
||||||
|
type: Number,
|
||||||
|
default: 1
|
||||||
|
}
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
curIndex: 0
|
||||||
|
}
|
||||||
|
},
|
||||||
|
mounted() { },
|
||||||
|
methods: {
|
||||||
|
changeTab(num) {
|
||||||
|
this.curIndex = num
|
||||||
|
this.$emit('tabSelect', num)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.base-container {
|
||||||
|
color: #fff;
|
||||||
|
width: 100%;
|
||||||
|
background-color: rgba($color: #061027, $alpha: 0.15);
|
||||||
|
position: relative;
|
||||||
|
// opacity: 0.65;
|
||||||
|
border-bottom: 2px solid;
|
||||||
|
border-image: linear-gradient(90deg, rgba(195, 255, 251, 0), rgba(0, 255, 236, 1), rgba(144, 255, 246, 0)) 2 2;
|
||||||
|
filter: blur(0px);
|
||||||
|
filter: blur(0px);
|
||||||
|
|
||||||
|
.line {
|
||||||
|
position: absolute;
|
||||||
|
border-top: 1px solid #52fff1;
|
||||||
|
width: .8em;
|
||||||
|
top: -0.1em;
|
||||||
|
left: -0.1em;
|
||||||
|
&-vertical {
|
||||||
|
// top: calc(-5em / 12);
|
||||||
|
left: calc(-1em / 12);
|
||||||
|
transform: rotate(90deg);
|
||||||
|
transform-origin: left;
|
||||||
|
}
|
||||||
|
|
||||||
|
&-right {
|
||||||
|
top: -0.1em;
|
||||||
|
right: .01em;
|
||||||
|
left: inherit;
|
||||||
|
}
|
||||||
|
|
||||||
|
&-right-vertical {
|
||||||
|
top: calc(-2em / 12);
|
||||||
|
right: calc(-1em / 12);
|
||||||
|
left: inherit;
|
||||||
|
transform: rotate(-90deg);
|
||||||
|
transform-origin: right;
|
||||||
|
}
|
||||||
|
|
||||||
|
&-bottom {
|
||||||
|
top: inherit;
|
||||||
|
bottom: 0.01em;
|
||||||
|
left: -0.1em;
|
||||||
|
}
|
||||||
|
|
||||||
|
&-bottom-vertical {
|
||||||
|
top: inherit;
|
||||||
|
left: calc(-1em / 12);
|
||||||
|
bottom: calc(1em / 12);
|
||||||
|
transform: rotate(-90deg);
|
||||||
|
transform-origin: left;
|
||||||
|
}
|
||||||
|
|
||||||
|
&-bottom-right {
|
||||||
|
top: inherit;
|
||||||
|
left: inherit;
|
||||||
|
bottom: 0.01em;
|
||||||
|
right: 0.01em;
|
||||||
|
}
|
||||||
|
|
||||||
|
&-bottom-right-vertical {
|
||||||
|
top: inherit;
|
||||||
|
left: inherit;
|
||||||
|
right: calc(-1em / 12);
|
||||||
|
bottom: calc(-1em / 12);
|
||||||
|
transform: rotate(90deg);
|
||||||
|
transform-origin: right;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.bar-item {
|
||||||
|
height: 100%;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bar-title {
|
||||||
|
width: 100%;
|
||||||
|
background: linear-gradient(90deg, rgba(75, 239, 255, 0.28) 0%, rgba(0, 169, 205, 0) 20%,), linear-gradient(180deg, rgba(75, 239, 255, 0.28) 0%,
|
||||||
|
rgba(0, 169, 205, 0) 20%);
|
||||||
|
backdrop-filter: blur(1.5px);
|
||||||
|
color: #52fff1;
|
||||||
|
.colorBlock{
|
||||||
|
display: inline-block;
|
||||||
|
width: 4px;
|
||||||
|
height: 16px;
|
||||||
|
background: #31A6AE;
|
||||||
|
opacity: 0.84;
|
||||||
|
backdrop-filter: blur(1.5px);
|
||||||
|
margin-left: 39em;
|
||||||
|
// margin-top: 1.2em;
|
||||||
|
}
|
||||||
|
.Two{
|
||||||
|
opacity: 0.55;
|
||||||
|
margin-left: 0.375em;
|
||||||
|
}
|
||||||
|
.Three {
|
||||||
|
opacity: 0.29;
|
||||||
|
margin-left: 0.375em;
|
||||||
|
}
|
||||||
|
.Four {
|
||||||
|
opacity: 0.16;
|
||||||
|
margin-left: 0.375em;
|
||||||
|
}
|
||||||
|
font-size: 1.5em;
|
||||||
|
height: 3em;
|
||||||
|
position: relative;
|
||||||
|
.line {
|
||||||
|
position: absolute;
|
||||||
|
border-top: 1px solid #52fff1;
|
||||||
|
width: .5em;
|
||||||
|
// top: -0.1em;
|
||||||
|
// left: -0.1em;
|
||||||
|
|
||||||
|
// &-vertical {
|
||||||
|
// // top: calc(-5em / 12);
|
||||||
|
// left: calc(-1em / 12);
|
||||||
|
// transform: rotate(90deg);
|
||||||
|
// transform-origin: left;
|
||||||
|
// }
|
||||||
|
|
||||||
|
// &-right {
|
||||||
|
// top: -0.1em;
|
||||||
|
// right: .01em;
|
||||||
|
// left: inherit;
|
||||||
|
// }
|
||||||
|
|
||||||
|
// &-right-vertical {
|
||||||
|
// top: calc(-2em / 12);
|
||||||
|
// right: calc(-1em / 12);
|
||||||
|
// left: inherit;
|
||||||
|
// transform: rotate(-90deg);
|
||||||
|
// transform-origin: right;
|
||||||
|
// }
|
||||||
|
|
||||||
|
&-bottom {
|
||||||
|
top: inherit;
|
||||||
|
bottom: 0.01em;
|
||||||
|
left: -0.1em;
|
||||||
|
}
|
||||||
|
|
||||||
|
&-bottom-vertical {
|
||||||
|
top: inherit;
|
||||||
|
left: calc(-1em / 12);
|
||||||
|
bottom: calc(1em / 12);
|
||||||
|
transform: rotate(-90deg);
|
||||||
|
transform-origin: left;
|
||||||
|
}
|
||||||
|
|
||||||
|
&-bottom-right {
|
||||||
|
top: inherit;
|
||||||
|
left: inherit;
|
||||||
|
bottom: 0.01em;
|
||||||
|
right: 0.01em;
|
||||||
|
}
|
||||||
|
|
||||||
|
&-bottom-right-vertical {
|
||||||
|
top: inherit;
|
||||||
|
left: inherit;
|
||||||
|
right: calc(-0.1em / 12);
|
||||||
|
bottom: calc(.1em / 12);
|
||||||
|
transform: rotate(90deg);
|
||||||
|
transform-origin: right;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.title{
|
||||||
|
margin-left: 1.75em;
|
||||||
|
margin-top: 1em;
|
||||||
|
width: 7em;
|
||||||
|
// height: 100%;
|
||||||
|
display: inline-block;
|
||||||
|
}
|
||||||
|
// padding: 0.67em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bar-content {
|
||||||
|
// padding: 1em;
|
||||||
|
flex: 1 auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.no-padding {
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.p-0 {
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
&.border-none {
|
||||||
|
border: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -0,0 +1,294 @@
|
|||||||
|
<!--
|
||||||
|
* @Author: gtz
|
||||||
|
* @Date: 2022-01-19 15:58:17
|
||||||
|
* @LastEditors: zhp
|
||||||
|
* @LastEditTime: 2023-09-16 10:04:49
|
||||||
|
* @Description: file content
|
||||||
|
* @FilePath: \mt-bus-fe\src\views\OperationalOverview\components\baseContainer\index.vue
|
||||||
|
-->
|
||||||
|
<template>
|
||||||
|
<div
|
||||||
|
class="base-container"
|
||||||
|
:style="{ height: '100%', fontSize: 12 * beilv + 'px', padding: 12 * beilv + 'px' }"
|
||||||
|
:class="{ 'no-padding': noPadding, 'border-none': !showLine }"
|
||||||
|
>
|
||||||
|
<!-- <div class="base-container" :style="{height: height * beilv + 'px', fontSize: 12 * beilv + 'px', padding: 12 * beilv + 'px'}"> -->
|
||||||
|
<template v-if="showLine">
|
||||||
|
<div class="line" />
|
||||||
|
<div class="line line-vertical" />
|
||||||
|
<div class="line line-right" />
|
||||||
|
<div class="line line-right-vertical" />
|
||||||
|
<div class="line line-bottom" />
|
||||||
|
<div class="line line-bottom-vertical" />
|
||||||
|
<div class="line line-bottom-right" />
|
||||||
|
<div class="line line-bottom-right-vertical" />
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<div class="bar-item">
|
||||||
|
<div v-if="title" class="bar-title">
|
||||||
|
<div class="line line-bottom" />
|
||||||
|
<div class="line line-bottom-vertical" />
|
||||||
|
<div class="line line-bottom-right" />
|
||||||
|
<div class="line line-bottom-right-vertical" />
|
||||||
|
<span class="title">
|
||||||
|
<!-- <svg-icon :icon-class="titleIcon" style="font-size: 1.5em; position: relative; top: .08em" /> -->
|
||||||
|
{{ title }}
|
||||||
|
</span>
|
||||||
|
<span class="colorBlock One" />
|
||||||
|
<span class="colorBlock Two" />
|
||||||
|
<span class="colorBlock Three" />
|
||||||
|
<span class="colorBlock Four" />
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="bar-content" :class="{ 'p-0': noContentPadding }">
|
||||||
|
<slot />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
name: 'BaseContainer',
|
||||||
|
props: {
|
||||||
|
showLine: {
|
||||||
|
type: Boolean,
|
||||||
|
default: true
|
||||||
|
},
|
||||||
|
noPadding: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
|
},
|
||||||
|
noContentPadding: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
|
},
|
||||||
|
title: {
|
||||||
|
type: String,
|
||||||
|
default: ''
|
||||||
|
},
|
||||||
|
titleIcon: {
|
||||||
|
type: String,
|
||||||
|
default: ''
|
||||||
|
},
|
||||||
|
height: {
|
||||||
|
type: Number,
|
||||||
|
default: 200
|
||||||
|
},
|
||||||
|
baseSize: {
|
||||||
|
type: Number,
|
||||||
|
default: 12
|
||||||
|
},
|
||||||
|
beilv: {
|
||||||
|
type: Number,
|
||||||
|
default: 1
|
||||||
|
}
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
curIndex: 0
|
||||||
|
}
|
||||||
|
},
|
||||||
|
mounted() { },
|
||||||
|
methods: {
|
||||||
|
changeTab(num) {
|
||||||
|
this.curIndex = num
|
||||||
|
this.$emit('tabSelect', num)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.base-container {
|
||||||
|
color: #fff;
|
||||||
|
width: 100%;
|
||||||
|
background-color: rgba($color: #061027, $alpha: 0.15);
|
||||||
|
position: relative;
|
||||||
|
// opacity: 0.65;
|
||||||
|
border-bottom: 2px solid;
|
||||||
|
border-image: linear-gradient(90deg, rgba(195, 255, 251, 0), rgba(0, 255, 236, 1), rgba(144, 255, 246, 0)) 2 2;
|
||||||
|
filter: blur(0px);
|
||||||
|
filter: blur(0px);
|
||||||
|
|
||||||
|
.line {
|
||||||
|
position: absolute;
|
||||||
|
border-top: 1px solid #52fff1;
|
||||||
|
width: .8em;
|
||||||
|
top: -0.1em;
|
||||||
|
left: -0.1em;
|
||||||
|
&-vertical {
|
||||||
|
// top: calc(-5em / 12);
|
||||||
|
left: calc(-1em / 12);
|
||||||
|
transform: rotate(90deg);
|
||||||
|
transform-origin: left;
|
||||||
|
}
|
||||||
|
|
||||||
|
&-right {
|
||||||
|
top: -0.1em;
|
||||||
|
right: .01em;
|
||||||
|
left: inherit;
|
||||||
|
}
|
||||||
|
|
||||||
|
&-right-vertical {
|
||||||
|
top: calc(-2em / 12);
|
||||||
|
right: calc(-1em / 12);
|
||||||
|
left: inherit;
|
||||||
|
transform: rotate(-90deg);
|
||||||
|
transform-origin: right;
|
||||||
|
}
|
||||||
|
|
||||||
|
&-bottom {
|
||||||
|
top: inherit;
|
||||||
|
bottom: 0.01em;
|
||||||
|
left: -0.1em;
|
||||||
|
}
|
||||||
|
|
||||||
|
&-bottom-vertical {
|
||||||
|
top: inherit;
|
||||||
|
left: calc(-1em / 12);
|
||||||
|
bottom: calc(1em / 12);
|
||||||
|
transform: rotate(-90deg);
|
||||||
|
transform-origin: left;
|
||||||
|
}
|
||||||
|
|
||||||
|
&-bottom-right {
|
||||||
|
top: inherit;
|
||||||
|
left: inherit;
|
||||||
|
bottom: 0.01em;
|
||||||
|
right: 0.01em;
|
||||||
|
}
|
||||||
|
|
||||||
|
&-bottom-right-vertical {
|
||||||
|
top: inherit;
|
||||||
|
left: inherit;
|
||||||
|
right: calc(-1em / 12);
|
||||||
|
bottom: calc(-1em / 12);
|
||||||
|
transform: rotate(90deg);
|
||||||
|
transform-origin: right;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.bar-item {
|
||||||
|
height: 100%;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bar-title {
|
||||||
|
width: 100%;
|
||||||
|
background: linear-gradient(90deg, rgba(75, 239, 255, 0.28) 0%, rgba(0, 169, 205, 0) 20%,), linear-gradient(180deg, rgba(75, 239, 255, 0.28) 0%,
|
||||||
|
rgba(0, 169, 205, 0) 20%);
|
||||||
|
backdrop-filter: blur(1.5px);
|
||||||
|
color: #52fff1;
|
||||||
|
.colorBlock{
|
||||||
|
display: inline-block;
|
||||||
|
width: 4px;
|
||||||
|
height: 16px;
|
||||||
|
background: #31A6AE;
|
||||||
|
opacity: 0.84;
|
||||||
|
backdrop-filter: blur(1.5px);
|
||||||
|
margin-left: 14em;
|
||||||
|
// margin-top: 1.2em;
|
||||||
|
}
|
||||||
|
.Two{
|
||||||
|
opacity: 0.55;
|
||||||
|
margin-left: 0.375em;
|
||||||
|
}
|
||||||
|
.Three {
|
||||||
|
opacity: 0.29;
|
||||||
|
margin-left: 0.375em;
|
||||||
|
}
|
||||||
|
.Four {
|
||||||
|
opacity: 0.16;
|
||||||
|
margin-left: 0.375em;
|
||||||
|
}
|
||||||
|
font-size: 1.5em;
|
||||||
|
height: 3em;
|
||||||
|
position: relative;
|
||||||
|
.line {
|
||||||
|
position: absolute;
|
||||||
|
border-top: 1px solid #52fff1;
|
||||||
|
width: .5em;
|
||||||
|
// top: -0.1em;
|
||||||
|
// left: -0.1em;
|
||||||
|
|
||||||
|
// &-vertical {
|
||||||
|
// // top: calc(-5em / 12);
|
||||||
|
// left: calc(-1em / 12);
|
||||||
|
// transform: rotate(90deg);
|
||||||
|
// transform-origin: left;
|
||||||
|
// }
|
||||||
|
|
||||||
|
// &-right {
|
||||||
|
// top: -0.1em;
|
||||||
|
// right: .01em;
|
||||||
|
// left: inherit;
|
||||||
|
// }
|
||||||
|
|
||||||
|
// &-right-vertical {
|
||||||
|
// top: calc(-2em / 12);
|
||||||
|
// right: calc(-1em / 12);
|
||||||
|
// left: inherit;
|
||||||
|
// transform: rotate(-90deg);
|
||||||
|
// transform-origin: right;
|
||||||
|
// }
|
||||||
|
|
||||||
|
&-bottom {
|
||||||
|
top: inherit;
|
||||||
|
bottom: 0.01em;
|
||||||
|
left: -0.1em;
|
||||||
|
}
|
||||||
|
|
||||||
|
&-bottom-vertical {
|
||||||
|
top: inherit;
|
||||||
|
left: calc(-1em / 12);
|
||||||
|
bottom: calc(1em / 12);
|
||||||
|
transform: rotate(-90deg);
|
||||||
|
transform-origin: left;
|
||||||
|
}
|
||||||
|
|
||||||
|
&-bottom-right {
|
||||||
|
top: inherit;
|
||||||
|
left: inherit;
|
||||||
|
bottom: 0.01em;
|
||||||
|
right: 0.01em;
|
||||||
|
}
|
||||||
|
|
||||||
|
&-bottom-right-vertical {
|
||||||
|
top: inherit;
|
||||||
|
left: inherit;
|
||||||
|
right: calc(-0.1em / 12);
|
||||||
|
bottom: calc(.1em / 12);
|
||||||
|
transform: rotate(90deg);
|
||||||
|
transform-origin: right;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.title{
|
||||||
|
margin-left: 1.75em;
|
||||||
|
margin-top: 1em;
|
||||||
|
width: 6em;
|
||||||
|
// height: 100%;
|
||||||
|
display: inline-block;
|
||||||
|
}
|
||||||
|
// padding: 0.67em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bar-content {
|
||||||
|
// padding: 1em;
|
||||||
|
flex: 1 auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.no-padding {
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.p-0 {
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
&.border-none {
|
||||||
|
border: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -0,0 +1,348 @@
|
|||||||
|
<!--
|
||||||
|
* @Author: gtz
|
||||||
|
* @Date: 2022-01-19 15:58:17
|
||||||
|
* @LastEditors: DY
|
||||||
|
* @LastEditTime: 2023-12-12 14:37:29
|
||||||
|
* @Description: file content
|
||||||
|
* @FilePath: \mt-bus-fe\src\views\OperationalOverview\components\baseContainer\index.vue
|
||||||
|
-->
|
||||||
|
<template>
|
||||||
|
<div
|
||||||
|
class="base-container"
|
||||||
|
:style="{ height: '100%', fontSize: 12 * beilv + 'px', padding: 12 * beilv + 'px' }"
|
||||||
|
:class="{ 'no-padding': noPadding, 'border-none': !showLine }"
|
||||||
|
>
|
||||||
|
<!-- <div class="base-container" :style="{height: height * beilv + 'px', fontSize: 12 * beilv + 'px', padding: 12 * beilv + 'px'}"> -->
|
||||||
|
<template v-if="showLine">
|
||||||
|
<div class="line" />
|
||||||
|
<div class="line line-vertical" />
|
||||||
|
<div class="line line-right" />
|
||||||
|
<div class="line line-right-vertical" />
|
||||||
|
<div class="line line-bottom" />
|
||||||
|
<div class="line line-bottom-vertical" />
|
||||||
|
<div class="line line-bottom-right" />
|
||||||
|
<div class="line line-bottom-right-vertical" />
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<div class="bar-item">
|
||||||
|
<div v-if="title" class="bar-title">
|
||||||
|
<div class="line line-bottom" />
|
||||||
|
<div class="line line-bottom-vertical" />
|
||||||
|
<div class="line line-bottom-right" />
|
||||||
|
<div class="line line-bottom-right-vertical" />
|
||||||
|
<div>
|
||||||
|
<div class="title">
|
||||||
|
<!-- <svg-icon :icon-class="titleIcon" style="font-size: 1.5em; position: relative; top: .08em" /> -->
|
||||||
|
{{ title }}
|
||||||
|
</div>
|
||||||
|
<span :class="curIndex === 1 ? 'num' : 'numTwo'" @click="changeTab(1)">
|
||||||
|
芯片数量
|
||||||
|
<!-- <top-radio-group :data-type="0" @change-time-range="handleChangeOptions('产出数量图', $event)" /> -->
|
||||||
|
</span>
|
||||||
|
<span :class="curIndex === 2 ? 'num' : 'numTwo'" @click="changeTab(2)">
|
||||||
|
组件数量
|
||||||
|
<!-- <top-radio-group :data-type="0" @change-time-range="handleChangeOptions('产出数量图', $event)" /> -->
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="bar-content" :class="{ 'p-0': noContentPadding }">
|
||||||
|
<slot />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
// import TopRadioGroup from '../topRadioGroup'
|
||||||
|
export default {
|
||||||
|
name: 'BaseContainer',
|
||||||
|
// components: {
|
||||||
|
// TopRadioGroup
|
||||||
|
// },
|
||||||
|
props: {
|
||||||
|
showLine: {
|
||||||
|
type: Boolean,
|
||||||
|
default: true
|
||||||
|
},
|
||||||
|
noPadding: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
|
},
|
||||||
|
noContentPadding: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
|
},
|
||||||
|
title: {
|
||||||
|
type: String,
|
||||||
|
default: ''
|
||||||
|
},
|
||||||
|
titleIcon: {
|
||||||
|
type: String,
|
||||||
|
default: ''
|
||||||
|
},
|
||||||
|
height: {
|
||||||
|
type: Number,
|
||||||
|
default: 200
|
||||||
|
},
|
||||||
|
baseSize: {
|
||||||
|
type: Number,
|
||||||
|
default: 12
|
||||||
|
},
|
||||||
|
beilv: {
|
||||||
|
type: Number,
|
||||||
|
default: 1
|
||||||
|
}
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
curIndex: 1
|
||||||
|
}
|
||||||
|
},
|
||||||
|
mounted() { },
|
||||||
|
methods: {
|
||||||
|
changeTab(num) {
|
||||||
|
this.curIndex = num
|
||||||
|
this.$emit('tabSelect', num)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.base-container {
|
||||||
|
color: #fff;
|
||||||
|
width: 100%;
|
||||||
|
background-color: rgba($color: #061027, $alpha: 0.15);
|
||||||
|
position: relative;
|
||||||
|
// opacity: 0.65;
|
||||||
|
border-bottom: 2px solid;
|
||||||
|
border-image: linear-gradient(90deg, rgba(195, 255, 251, 0), rgba(0, 255, 236, 1), rgba(144, 255, 246, 0)) 2 2;
|
||||||
|
filter: blur(0px);
|
||||||
|
filter: blur(0px);
|
||||||
|
|
||||||
|
.line {
|
||||||
|
position: absolute;
|
||||||
|
border-top: 1px solid #52fff1;
|
||||||
|
width: .8em;
|
||||||
|
top: -0.1em;
|
||||||
|
left: -0.1em;
|
||||||
|
&-vertical {
|
||||||
|
// top: calc(-5em / 12);
|
||||||
|
left: calc(-1em / 12);
|
||||||
|
transform: rotate(90deg);
|
||||||
|
transform-origin: left;
|
||||||
|
}
|
||||||
|
|
||||||
|
&-right {
|
||||||
|
top: -0.1em;
|
||||||
|
right: .01em;
|
||||||
|
left: inherit;
|
||||||
|
}
|
||||||
|
|
||||||
|
&-right-vertical {
|
||||||
|
top: calc(-2em / 12);
|
||||||
|
right: calc(-1em / 12);
|
||||||
|
left: inherit;
|
||||||
|
transform: rotate(-90deg);
|
||||||
|
transform-origin: right;
|
||||||
|
}
|
||||||
|
|
||||||
|
&-bottom {
|
||||||
|
top: inherit;
|
||||||
|
bottom: 0.01em;
|
||||||
|
left: -0.1em;
|
||||||
|
}
|
||||||
|
|
||||||
|
&-bottom-vertical {
|
||||||
|
top: inherit;
|
||||||
|
left: calc(-1em / 12);
|
||||||
|
bottom: calc(1em / 12);
|
||||||
|
transform: rotate(-90deg);
|
||||||
|
transform-origin: left;
|
||||||
|
}
|
||||||
|
|
||||||
|
&-bottom-right {
|
||||||
|
top: inherit;
|
||||||
|
left: inherit;
|
||||||
|
bottom: 0.01em;
|
||||||
|
right: 0.01em;
|
||||||
|
}
|
||||||
|
|
||||||
|
&-bottom-right-vertical {
|
||||||
|
top: inherit;
|
||||||
|
left: inherit;
|
||||||
|
right: calc(-1em / 12);
|
||||||
|
bottom: calc(-1em / 12);
|
||||||
|
transform: rotate(90deg);
|
||||||
|
transform-origin: right;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.bar-item {
|
||||||
|
height: 100%;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bar-title {
|
||||||
|
width: 100%;
|
||||||
|
background: linear-gradient(90deg, rgba(75, 239, 255, 0.28) 0%, rgba(0, 169, 205, 0) 20%,), linear-gradient(180deg, rgba(75, 239, 255, 0.28) 0%,
|
||||||
|
rgba(0, 169, 205, 0) 20%);
|
||||||
|
backdrop-filter: blur(1.5px);
|
||||||
|
color: #52fff1;
|
||||||
|
.colorBlock{
|
||||||
|
display: inline-block;
|
||||||
|
width: 4px;
|
||||||
|
height: 16px;
|
||||||
|
background: #31A6AE;
|
||||||
|
opacity: 0.84;
|
||||||
|
backdrop-filter: blur(1.5px);
|
||||||
|
margin-left: 14em;
|
||||||
|
// margin-top: 1.2em;
|
||||||
|
}
|
||||||
|
.Two{
|
||||||
|
opacity: 0.55;
|
||||||
|
margin-left: 0.375em;
|
||||||
|
}
|
||||||
|
.Three {
|
||||||
|
opacity: 0.29;
|
||||||
|
margin-left: 0.375em;
|
||||||
|
}
|
||||||
|
.Four {
|
||||||
|
opacity: 0.16;
|
||||||
|
margin-left: 0.375em;
|
||||||
|
}
|
||||||
|
font-size: 1.5em;
|
||||||
|
height: 3em;
|
||||||
|
position: relative;
|
||||||
|
.line {
|
||||||
|
position: absolute;
|
||||||
|
border-top: 1px solid #52fff1;
|
||||||
|
width: .5em;
|
||||||
|
// top: -0.1em;
|
||||||
|
// left: -0.1em;
|
||||||
|
|
||||||
|
// &-vertical {
|
||||||
|
// // top: calc(-5em / 12);
|
||||||
|
// left: calc(-1em / 12);
|
||||||
|
// transform: rotate(90deg);
|
||||||
|
// transform-origin: left;
|
||||||
|
// }
|
||||||
|
|
||||||
|
// &-right {
|
||||||
|
// top: -0.1em;
|
||||||
|
// right: .01em;
|
||||||
|
// left: inherit;
|
||||||
|
// }
|
||||||
|
|
||||||
|
// &-right-vertical {
|
||||||
|
// top: calc(-2em / 12);
|
||||||
|
// right: calc(-1em / 12);
|
||||||
|
// left: inherit;
|
||||||
|
// transform: rotate(-90deg);
|
||||||
|
// transform-origin: right;
|
||||||
|
// }
|
||||||
|
|
||||||
|
&-bottom {
|
||||||
|
top: inherit;
|
||||||
|
bottom: 0.01em;
|
||||||
|
left: -0.1em;
|
||||||
|
}
|
||||||
|
|
||||||
|
&-bottom-vertical {
|
||||||
|
top: inherit;
|
||||||
|
left: calc(-1em / 12);
|
||||||
|
bottom: calc(1em / 12);
|
||||||
|
transform: rotate(-90deg);
|
||||||
|
transform-origin: left;
|
||||||
|
}
|
||||||
|
|
||||||
|
&-bottom-right {
|
||||||
|
top: inherit;
|
||||||
|
left: inherit;
|
||||||
|
bottom: 0.01em;
|
||||||
|
right: 0.01em;
|
||||||
|
}
|
||||||
|
|
||||||
|
&-bottom-right-vertical {
|
||||||
|
top: inherit;
|
||||||
|
left: inherit;
|
||||||
|
right: calc(-0.1em / 12);
|
||||||
|
bottom: calc(.1em / 12);
|
||||||
|
transform: rotate(90deg);
|
||||||
|
transform-origin: right;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.title{
|
||||||
|
margin-left: 1.75em;
|
||||||
|
margin-top: 1em;
|
||||||
|
width: 6em;
|
||||||
|
float: left;
|
||||||
|
// height: 100%;
|
||||||
|
// display: inline-block;
|
||||||
|
}
|
||||||
|
// padding: 0.67em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bar-content {
|
||||||
|
// padding: 1em;
|
||||||
|
flex: 1 auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.no-padding {
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.p-0 {
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
&.border-none {
|
||||||
|
border: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.num{
|
||||||
|
font-size: 12px;
|
||||||
|
display: inline-block;
|
||||||
|
margin-top: 14px;
|
||||||
|
margin-left: 0.5em;
|
||||||
|
font-family: PingFangSC-Regular, PingFang SC;
|
||||||
|
font-weight: 400;
|
||||||
|
color: #FFFFFF;
|
||||||
|
line-height: 18px;
|
||||||
|
}
|
||||||
|
.num:after {
|
||||||
|
content: '';
|
||||||
|
// bottom: 20%;
|
||||||
|
width: 100%;
|
||||||
|
height: 1px;
|
||||||
|
border-bottom: 1px solid #ccc;
|
||||||
|
display: inline-block;
|
||||||
|
// margin-left: 24px;
|
||||||
|
margin-bottom: 4px;
|
||||||
|
box-shadow: 0px 0px 2px 0px rgba(82, 255, 241, 0.34);
|
||||||
|
border: 1px solid;
|
||||||
|
border-image: linear-gradient(90deg, rgba(138, 255, 249, 0), rgba(112, 255, 245, 1), rgba(82, 255, 241, 0)) 2 2;
|
||||||
|
}
|
||||||
|
.numTwo{
|
||||||
|
font-size: 14px;
|
||||||
|
display: inline-block;
|
||||||
|
font-family: PingFangSC-Regular, PingFang SC;
|
||||||
|
font-weight: 400;
|
||||||
|
color: #FFFFFF;
|
||||||
|
line-height: 18px;
|
||||||
|
opacity: .39;
|
||||||
|
margin-left: .5em;
|
||||||
|
}
|
||||||
|
.numTwo:after {
|
||||||
|
content: '';
|
||||||
|
// bottom: 20%;
|
||||||
|
width: 100%;
|
||||||
|
// height: 1px;
|
||||||
|
// border-bottom: 1px solid #ccc;
|
||||||
|
display: inline-block;
|
||||||
|
// margin-left: 24px;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -0,0 +1,111 @@
|
|||||||
|
<template>
|
||||||
|
<div class="status-text" :class="getStatusClass()">
|
||||||
|
{{ injectData.status }}
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
name: 'StatusLabel',
|
||||||
|
props: {
|
||||||
|
injectData: {
|
||||||
|
type: Object,
|
||||||
|
default: () => ({}),
|
||||||
|
required: true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
// 将中文状态转换为英文
|
||||||
|
getStatusText() {
|
||||||
|
const statusMap = {
|
||||||
|
'暂停中': 'Paused',
|
||||||
|
'已终止': 'Terminated',
|
||||||
|
'已终止-回收': 'Terminated-Recycled',
|
||||||
|
'已终止-待回收': 'Terminated-PendingRecycling',
|
||||||
|
'异常': 'Abnormal',
|
||||||
|
'执行中': 'InProgress',
|
||||||
|
'已完成': 'Done',
|
||||||
|
'未完成': 'Pending'
|
||||||
|
};
|
||||||
|
return statusMap[this.injectData.status] || this.injectData.status;
|
||||||
|
},
|
||||||
|
// 判断是否为含"已终止"的状态(用于绑定样式)
|
||||||
|
getStatusClass() {
|
||||||
|
const chineseStatus = this.injectData.status || '';
|
||||||
|
// 包含"已终止"的中文状态统一归类为terminated类
|
||||||
|
if (chineseStatus.includes('已终止')) {
|
||||||
|
return 'terminated';
|
||||||
|
}
|
||||||
|
// 其他状态直接返回英文类名
|
||||||
|
return this.getStatusText();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.status-text {
|
||||||
|
font-size: 14px;
|
||||||
|
padding: 2px 8px 2px 24px;
|
||||||
|
border-radius: 4px;
|
||||||
|
display: inline-flex;
|
||||||
|
align-items: center;
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 所有含"已终止"的状态共用样式 */
|
||||||
|
.status-text.terminated::before {
|
||||||
|
content: '';
|
||||||
|
position: absolute;
|
||||||
|
left: 8px;
|
||||||
|
width: 14px;
|
||||||
|
height: 14px;
|
||||||
|
/* border-radius: 2px; */
|
||||||
|
background: url('../../../../assets/img/recycle.png') no-repeat;
|
||||||
|
background-size: cover;
|
||||||
|
/* 已终止系列统一色块 */
|
||||||
|
}
|
||||||
|
|
||||||
|
.status-text.terminated {
|
||||||
|
color: rgba(89, 89, 89, 1);
|
||||||
|
/* 已终止系列统一文字色 */
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 暂停中样式 */
|
||||||
|
.status-text.Paused::before {
|
||||||
|
content: '';
|
||||||
|
position: absolute;
|
||||||
|
left: 8px;
|
||||||
|
width: 14px;
|
||||||
|
height: 14px;
|
||||||
|
/* border-radius: 2px; */
|
||||||
|
background: url('../../../../assets/img/recycle.png') no-repeat;
|
||||||
|
background-size: cover;
|
||||||
|
}
|
||||||
|
|
||||||
|
.status-text.Paused {
|
||||||
|
color: rgba(245, 154, 36, 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 其他状态样式 */
|
||||||
|
.status-text.Abnormal {
|
||||||
|
color: rgba(255, 0, 0, 1);
|
||||||
|
padding: 2px 8px;
|
||||||
|
/* 无左侧色块 */
|
||||||
|
}
|
||||||
|
|
||||||
|
.status-text.InProgress {
|
||||||
|
color: rgba(0, 101, 255, 1);
|
||||||
|
padding: 2px 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.status-text.Done {
|
||||||
|
color: #4CAF50;
|
||||||
|
padding: 2px 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.status-text.Pending {
|
||||||
|
color: #FF9800;
|
||||||
|
padding: 2px 8px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -0,0 +1,250 @@
|
|||||||
|
<!--
|
||||||
|
* @Date: 2020-12-14 09:07:03
|
||||||
|
* @LastEditors: zhp
|
||||||
|
* @LastEditTime: 2024-09-05 09:50:14
|
||||||
|
* @FilePath: \mt-bus-fe\src\views\OperationalOverview\components\baseTable.vue
|
||||||
|
* @Description:
|
||||||
|
-->
|
||||||
|
<template>
|
||||||
|
<div class="visual-base-table-container">
|
||||||
|
<el-table :max-height="maxHeight" ref="scroll_Table" @mouseenter.native="autoScroll(true)"
|
||||||
|
@mouseleave.native="autoScroll(false)" v-loading="isLoading"
|
||||||
|
:header-cell-style="{ background: 'rgba(250, 250, 250, 1)', color: 'rgba(0, 0, 0, 0.85)',padding:'3px 2px'}" :row-style="setRowStyle"
|
||||||
|
:data="renderData" border style="width: 100%; background: transparent">
|
||||||
|
<el-table-column v-if="page && limit && showIndex" prop="_pageIndex" label="序号" :width="70" align="center" />
|
||||||
|
<el-table-column v-for="item in renderTableHeadList" :key="item.prop" :show-overflow-tooltip="showOverflow"
|
||||||
|
v-bind="item">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
|
||||||
|
<component :is="item.subcomponent" v-if="item.subcomponent" :inject-data="{...scope.row, ...item}"
|
||||||
|
@emitData="emitData" />
|
||||||
|
<span v-else>{{ scope.row[item.prop] | commonFilter(item.filter) }}</span>
|
||||||
|
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<slot name="content" />
|
||||||
|
</el-table>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
import { isObject, isString } from 'lodash'
|
||||||
|
export default {
|
||||||
|
name: 'BaseTable',
|
||||||
|
filters: {
|
||||||
|
commonFilter: (source, filterType = a => a) => {
|
||||||
|
return filterType(source)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
props: {
|
||||||
|
maxHeight: {
|
||||||
|
type: [Number, String], // 支持数字(如300)或字符串(如'300px')
|
||||||
|
required: false,
|
||||||
|
default: 280 // 原固定值,作为默认 fallback
|
||||||
|
},
|
||||||
|
tableData: {
|
||||||
|
type: Array,
|
||||||
|
required: true,
|
||||||
|
validator: val => val.filter(item => !isObject(item)).length === 0
|
||||||
|
},
|
||||||
|
tableConfig: {
|
||||||
|
type: Array,
|
||||||
|
required: true,
|
||||||
|
validator: val => val.filter(item => !isString(item.prop) || !isString(item.label)).length === 0
|
||||||
|
},
|
||||||
|
isLoading: {
|
||||||
|
type: Boolean,
|
||||||
|
required: false
|
||||||
|
},
|
||||||
|
page: {
|
||||||
|
type: Number,
|
||||||
|
required: false,
|
||||||
|
default: 1
|
||||||
|
},
|
||||||
|
limit: {
|
||||||
|
type: Number,
|
||||||
|
required: false,
|
||||||
|
default: 5
|
||||||
|
},
|
||||||
|
beilv: {
|
||||||
|
type: Number,
|
||||||
|
default: 1
|
||||||
|
},
|
||||||
|
showOverflow: {
|
||||||
|
type: Boolean,
|
||||||
|
default: true
|
||||||
|
},
|
||||||
|
showIndex: {
|
||||||
|
type: Boolean,
|
||||||
|
default: true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
tableConfigBak: [],
|
||||||
|
selectedBox: new Array(100).fill(true)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
renderData() {
|
||||||
|
if (this.tableData.length && !this.tableData[0]._pageIndex) {
|
||||||
|
this.tableData.forEach((item, index) => {
|
||||||
|
item._pageIndex = (this.page - 1) * this.limit + index + 1
|
||||||
|
})
|
||||||
|
}
|
||||||
|
return this.tableData.slice((this.page - 1) * this.limit, this.page * this.limit)
|
||||||
|
},
|
||||||
|
renderTableHeadList() {
|
||||||
|
return this.tableConfig.filter((item, index) => {
|
||||||
|
return this.selectedBox[index]
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
beforeMount() {
|
||||||
|
this.selectedBox = new Array(100).fill(true)
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
this.autoScroll()
|
||||||
|
},
|
||||||
|
beforeDestroy() {
|
||||||
|
this.autoScroll(true)
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
autoScroll(stop) {
|
||||||
|
const table = this.$refs.scroll_Table
|
||||||
|
if (!table) return; // 防止table未加载时出错
|
||||||
|
|
||||||
|
const divData = table.$refs.bodyWrapper
|
||||||
|
if (stop) {
|
||||||
|
window.clearInterval(this.scrolltimer)
|
||||||
|
} else {
|
||||||
|
// 先清除已有计时器,避免重复创建
|
||||||
|
if (this.scrolltimer) {
|
||||||
|
window.clearInterval(this.scrolltimer)
|
||||||
|
}
|
||||||
|
|
||||||
|
this.scrolltimer = window.setInterval(() => {
|
||||||
|
// 每次滚动1像素
|
||||||
|
divData.scrollTop += 1
|
||||||
|
|
||||||
|
// 关键修改:使用>=判断,允许微小像素偏差
|
||||||
|
if (divData.scrollTop + divData.clientHeight >= divData.scrollHeight - 1) {
|
||||||
|
// 滚动到底部后,重置到顶部(延迟一点更自然)
|
||||||
|
// setTimeout(() => {
|
||||||
|
divData.scrollTop = 0
|
||||||
|
// }, 2000); // 停顿500ms后再从头滚动
|
||||||
|
}
|
||||||
|
}, 200) // 滚动速度(数值越小越快)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
emitData(val) {
|
||||||
|
this.$emit('emitFun', val)
|
||||||
|
},
|
||||||
|
setRowStyle(v) {
|
||||||
|
if (v.rowIndex % 2 === 0) {
|
||||||
|
return {
|
||||||
|
background: '#ffff',
|
||||||
|
color: 'rgba(89, 89, 89, 1)',
|
||||||
|
height: 33 + 'px',
|
||||||
|
lineHeight: 26 + 'px',
|
||||||
|
padding: 0,
|
||||||
|
fontSize: 12 + 'px'
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
return {
|
||||||
|
background: '#ffff',
|
||||||
|
color: 'rgba(89, 89, 89, 1)',
|
||||||
|
height: 33 + 'px',
|
||||||
|
lineHeight: 26 + 'px',
|
||||||
|
padding: 0,
|
||||||
|
fontSize: 12 + 'px'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
setCellStyle() {
|
||||||
|
return {
|
||||||
|
// lineHeight: 23 + 'px'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
// @import "./styles/index.scss";
|
||||||
|
.visual-base-table-container {
|
||||||
|
.el-table {
|
||||||
|
border: 0;
|
||||||
|
|
||||||
|
// 关键修改:隐藏滚动条但保留滚动功能
|
||||||
|
&::-webkit-scrollbar {
|
||||||
|
width: 0;
|
||||||
|
height: 0;
|
||||||
|
background: transparent;
|
||||||
|
}
|
||||||
|
// 隐藏表头的gutter
|
||||||
|
.el-table__header .el-table__cell.gutter {
|
||||||
|
display: none !important;
|
||||||
|
}
|
||||||
|
// 表格主体内容区滚动条处理
|
||||||
|
.el-table__body-wrapper {
|
||||||
|
&::-webkit-scrollbar {
|
||||||
|
width: 0;
|
||||||
|
height: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
&::-webkit-scrollbar-thumb {
|
||||||
|
background: transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
&::-webkit-scrollbar-track {
|
||||||
|
background: transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
overflow-y: auto !important; // 确保垂直滚动可用
|
||||||
|
overflow-x: auto !important; // 确保水平滚动可用
|
||||||
|
}
|
||||||
|
|
||||||
|
// 固定列滚动条处理
|
||||||
|
.el-table__fixed,
|
||||||
|
.el-table__fixed-right {
|
||||||
|
.el-table__fixed-body-wrapper {
|
||||||
|
&::-webkit-scrollbar {
|
||||||
|
width: 0;
|
||||||
|
height: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
overflow-y: auto !important;
|
||||||
|
overflow-x: auto !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.el-table::before,.el-table--border::after {
|
||||||
|
background-color: transparent;
|
||||||
|
}
|
||||||
|
.el-table th,td{
|
||||||
|
border-color: rgba(232, 232, 232, 1) !important;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
.el-table tr {
|
||||||
|
background: transparent;
|
||||||
|
}
|
||||||
|
.el-table__row:hover > td {
|
||||||
|
background-color: rgba(79,114,136,0.29) !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.el-table__row--striped:hover > td {
|
||||||
|
background-color: rgba(79,114,136,0.29) !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// .setting {
|
||||||
|
// text-align: right;
|
||||||
|
// padding: 15px;
|
||||||
|
// .setting-box {
|
||||||
|
// width: 100px;
|
||||||
|
// }
|
||||||
|
// i {
|
||||||
|
// color: #aaa;
|
||||||
|
// @extend .pointer;
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
|
</style>
|
||||||
@@ -0,0 +1,77 @@
|
|||||||
|
<template>
|
||||||
|
<div class="handling-object">
|
||||||
|
<!-- 左侧内容:L:名称+规格 -->
|
||||||
|
<div class="handling-item left">
|
||||||
|
<div class="table-icon left-icon"></div>
|
||||||
|
<span style="margin-left: 4px;">{{ leftContent }}</span>
|
||||||
|
</div>
|
||||||
|
<!-- 右侧内容:R:名称+规格 -->
|
||||||
|
<div class="handling-item right">
|
||||||
|
<div class="table-icon right-icon"></div>
|
||||||
|
<span style="margin-left: 4px;">{{ rightContent }}</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
name: 'HandlingObjectLabel',
|
||||||
|
props: {
|
||||||
|
injectData: {
|
||||||
|
type: Object,
|
||||||
|
default: () => ({}),
|
||||||
|
required: true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
// 拆分左侧内容(L:xxx)
|
||||||
|
leftContent() {
|
||||||
|
const handlingStr = this.injectData.handingObject || '';
|
||||||
|
const leftPart = handlingStr.split(',')[0] || ''; // 取第一个逗号前的部分
|
||||||
|
return leftPart.replace('L:', ''); // 移除前缀"L:"
|
||||||
|
},
|
||||||
|
// 拆分右侧内容(R:xxx)
|
||||||
|
rightContent() {
|
||||||
|
const handlingStr = this.injectData.handingObject || '';
|
||||||
|
const rightPart = handlingStr.split(',')[1] || ''; // 取第一个逗号后的部分
|
||||||
|
return rightPart.replace('R:', ''); // 移除前缀"R:"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
<style scoped>
|
||||||
|
.handling-object {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: 4px;
|
||||||
|
font-size: 14px;
|
||||||
|
padding: 4px 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.handling-item {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 2px;
|
||||||
|
/* 防止子元素被压缩 */
|
||||||
|
flex-shrink: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.table-icon {
|
||||||
|
width: 12px;
|
||||||
|
height: 12px;
|
||||||
|
background-size: cover;
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
/* 固定图标尺寸,不被挤压 */
|
||||||
|
flex-shrink: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 左侧图标 */
|
||||||
|
.left-icon {
|
||||||
|
background-image: url('../../../../assets/img/leftTable.png');
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 右侧图标 */
|
||||||
|
.right-icon {
|
||||||
|
background-image: url('../../../../assets/img/rightTable.png');
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -0,0 +1,62 @@
|
|||||||
|
/*
|
||||||
|
* @Author: zhp
|
||||||
|
* @Date: 2023-08-16 08:43:53
|
||||||
|
* @LastEditTime: 2023-09-15 16:12:57
|
||||||
|
* @LastEditors: zhp
|
||||||
|
* @Description:
|
||||||
|
*/
|
||||||
|
import { debounce } from '@/utils'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
$_sidebarElm: null,
|
||||||
|
$_resizeHandler: null
|
||||||
|
}
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
this.$_resizeHandler = debounce(() => {
|
||||||
|
if (this.chart) {
|
||||||
|
this.chart.resize()
|
||||||
|
}
|
||||||
|
}, 100)
|
||||||
|
this.$_initResizeEvent()
|
||||||
|
this.$_initSidebarResizeEvent()
|
||||||
|
},
|
||||||
|
beforeDestroy() {
|
||||||
|
this.$_destroyResizeEvent()
|
||||||
|
this.$_destroySidebarResizeEvent()
|
||||||
|
},
|
||||||
|
// to fixed bug when cached by keep-alive
|
||||||
|
// https://github.com/PanJiaChen/vue-element-admin/issues/2116
|
||||||
|
activated() {
|
||||||
|
this.$_initResizeEvent()
|
||||||
|
this.$_initSidebarResizeEvent()
|
||||||
|
},
|
||||||
|
deactivated() {
|
||||||
|
this.$_destroyResizeEvent()
|
||||||
|
this.$_destroySidebarResizeEvent()
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
// use $_ for mixins properties
|
||||||
|
// https://vuejs.org/v2/style-guide/index.html#Private-property-names-essential
|
||||||
|
$_initResizeEvent() {
|
||||||
|
window.addEventListener('resize', this.$_resizeHandler)
|
||||||
|
},
|
||||||
|
$_destroyResizeEvent() {
|
||||||
|
window.removeEventListener('resize', this.$_resizeHandler)
|
||||||
|
},
|
||||||
|
$_sidebarResizeHandler(e) {
|
||||||
|
if (e.propertyName === 'width') {
|
||||||
|
this.$_resizeHandler()
|
||||||
|
}
|
||||||
|
},
|
||||||
|
$_initSidebarResizeEvent() {
|
||||||
|
this.$_sidebarElm = document.getElementsByClassName('sidebar-container')[0]
|
||||||
|
this.$_sidebarElm && this.$_sidebarElm.addEventListener('transitionend', this.$_sidebarResizeHandler)
|
||||||
|
},
|
||||||
|
$_destroySidebarResizeEvent() {
|
||||||
|
this.$_sidebarElm && this.$_sidebarElm.removeEventListener('transitionend', this.$_sidebarResizeHandler)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,273 @@
|
|||||||
|
<template>
|
||||||
|
<!-- 动态绑定 ref:使用 props 中的 chartRef,而非硬编码 -->
|
||||||
|
<div :ref="chartRef" id="coreLineChart" style="height: 170px; width: 100%;"></div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import * as echarts from 'echarts';
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'Container',
|
||||||
|
props: {
|
||||||
|
// 1. 重命名 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>
|
||||||