Compare commits
27 Commits
projects/r
...
projects/s
| Author | SHA1 | Date | |
|---|---|---|---|
| b6241fe7c4 | |||
| 94edd04a08 | |||
| b926559a7d | |||
| b2984ed4cf | |||
|
|
4ade2dfcdc | ||
|
|
852a3f17a0 | ||
| cba14b1f61 | |||
|
|
33c00785df | ||
|
|
d8acff21e3 | ||
|
|
c0a38c568f | ||
| 6a8a9ed28d | |||
| a2213f4f7e | |||
| 0e1e813dc2 | |||
| c9c8f82910 | |||
| d859ba62c8 | |||
| 31bafae4aa | |||
| 67b6b88863 | |||
|
|
9f3cdcb1c4 | ||
|
|
f11dfe04d5 | ||
| 428a0752eb | |||
| 4e801873b9 | |||
|
|
463706663a | ||
|
|
e8638687b1 | ||
| 6c46083d4a | |||
| ab486dd71b | |||
| 4da1e6f0b1 | |||
| 0b689b5452 |
4
.env.dev
@@ -12,8 +12,8 @@ ENV = 'development'
|
||||
VUE_APP_TITLE = 智能监控分析系统
|
||||
|
||||
# 芋道管理系统/开发环境
|
||||
# VUE_APP_BASE_API = 'http://192.168.8.22:48080'
|
||||
VUE_APP_BASE_API = 'http://172.16.32.40: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
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
"license": "MIT",
|
||||
"scripts": {
|
||||
"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",
|
||||
"build:prod": "SET NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service build --mode prod",
|
||||
"build:stage": "vue-cli-service build --mode stage",
|
||||
@@ -42,16 +42,19 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@babel/parser": "7.18.4",
|
||||
"@jiaminghi/data-view": "^2.10.0",
|
||||
"@riophae/vue-treeselect": "0.4.0",
|
||||
"axios": "0.27.2",
|
||||
"benz-amr-recorder": "^1.1.5",
|
||||
"bpmn-js-token-simulation": "0.10.0",
|
||||
"chinese-lunar": "^0.1.4",
|
||||
"clipboard": "2.0.8",
|
||||
"code-brick-zj": "^1.0.2",
|
||||
"core-js": "^3.26.0",
|
||||
"crypto-js": "^4.0.0",
|
||||
"diagram-js": "^12.3.0",
|
||||
"echarts": "5.4.0",
|
||||
"el-tree-transfer": "^2.4.7",
|
||||
"element-ui": "2.15.12",
|
||||
"file-saver": "^2.0.5",
|
||||
"fuse.js": "6.6.2",
|
||||
|
||||
@@ -25,10 +25,10 @@ export function getCT(data) {
|
||||
// 获取产线平衡分析数据(new)
|
||||
export function getNewCTNow(data) {
|
||||
return request({
|
||||
url: '/analysis/production-analysis/getNewCTNow',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
url: '/analysis/production-analysis/getNewCTNow',
|
||||
method: 'post',
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
// 获取产线平衡分析数据趋势图(new)
|
||||
export function getNewCTCharts(data) {
|
||||
@@ -39,9 +39,10 @@ export function getNewCTCharts(data) {
|
||||
})
|
||||
}
|
||||
// 获取产线平衡分析数据设备list(new)
|
||||
export function getNewCTDet(id) {
|
||||
export function getNewCTDet(data) {
|
||||
return request({
|
||||
url: '/analysis/production-analysis/getNewCTDet?lineId='+id,
|
||||
method: 'get',
|
||||
})
|
||||
url: '/analysis/production-analysis/getNewCTDet',
|
||||
method: 'post',
|
||||
data:data
|
||||
});
|
||||
}
|
||||
|
||||
@@ -41,6 +41,16 @@ export function getProductAuto(data) {
|
||||
})
|
||||
}
|
||||
|
||||
export function getPdlAutoReportNewSearchNow(data) {
|
||||
return request({
|
||||
url: '/monitoring/production-monitor/getPdlAutoReportNewSearchNow',
|
||||
method: 'post',
|
||||
data: data,
|
||||
timeout: 60000,
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
// 班组自动报表分页
|
||||
export function getTeamReportPage(data) {
|
||||
return request({
|
||||
@@ -57,3 +67,29 @@ export function getTeamReportPageDet(id) {
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
|
||||
// 获取产品当班数据
|
||||
export function getProcessAutoReportGroup(data) {
|
||||
return request({
|
||||
url: '/monitoring/production-monitor/getProcessAutoReportGroup',
|
||||
method: 'post',
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
// 获取产品当天数据
|
||||
export function getProcessAutoReportDay(data) {
|
||||
return request({
|
||||
url: '/monitoring/production-monitor/getProcessAutoReportDay',
|
||||
method: 'post',
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
// 获取产品历史数据
|
||||
export function getProcessAutoReportNew(data) {
|
||||
return request({
|
||||
url: '/monitoring/production-monitor/getProcessAutoReportNew',
|
||||
method: 'post',
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
@@ -14,3 +14,79 @@ export function getSectionDataSearch(data) {
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 获取下片日志分页数据
|
||||
export function getDownLogPage(data) {
|
||||
return request({
|
||||
url: '/base/down-log/page',
|
||||
method: 'get',
|
||||
params: data,
|
||||
});
|
||||
}
|
||||
|
||||
// 获取下片日志历史数据
|
||||
export function getDownLogHisData(data) {
|
||||
return request({
|
||||
url: '/base/down-log/pagehis',
|
||||
method: 'get',
|
||||
params: data,
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
// 导出下片日志Excel
|
||||
export function exportDownLogData(query) {
|
||||
return request({
|
||||
url: '/base/down-log/export-excel',
|
||||
method: 'get',
|
||||
params: query,
|
||||
responseType: 'blob',
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
// 获得所有工厂产线列表
|
||||
export function getPdList() {
|
||||
return request({
|
||||
url: '/base/production-line/listAll',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
// 获得玻璃型号列表
|
||||
export function getThick() {
|
||||
return request({
|
||||
url: '/base/down-log/thick',
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
||||
// 获得原片报表
|
||||
export function getCostOriginRadioHisData(data) {
|
||||
return request({
|
||||
url: '/monitoring/cost-origin-ratio-his/page',
|
||||
method: 'get',
|
||||
params: data,
|
||||
});
|
||||
}
|
||||
|
||||
// 修改原片报表
|
||||
export function editCostOriginRadioHisData(data) {
|
||||
return request({
|
||||
url: '/monitoring/cost-origin-ratio-his/update',
|
||||
method: 'put',
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
// 导出原片报表
|
||||
export function exportCostOriginRadioHisData(data) {
|
||||
return request({
|
||||
url: '/monitoring/cost-origin-ratio-his/export-excel',
|
||||
method: 'get',
|
||||
params: data,
|
||||
responseType: 'blob',
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
143
src/api/group/Schedule.js
Normal file
@@ -0,0 +1,143 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 删除排班计划配置基础信息
|
||||
export function deleteGroupPlan(id) {
|
||||
return request({
|
||||
url: '/base/group-scheduling-plan/delete?id=' + id,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
// 获得排班计划配置基础信息分页
|
||||
export function getGroupPlanPage(query) {
|
||||
return request({
|
||||
url: '/base/group-scheduling-plan/page',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 获取code
|
||||
export function getCode() {
|
||||
return request({
|
||||
url: '/base/group-scheduling-plan/getCode',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 获得产线工段树形结构
|
||||
export function getGroupPlanTree() {
|
||||
return request({
|
||||
url: '/base/factory/getTreeSimple',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 基础信息下一步至班组班次
|
||||
export function createStepOne(data) {
|
||||
return request({
|
||||
url: '/base/group-scheduling-plan/createStepOne',
|
||||
method: 'post',
|
||||
data:data
|
||||
})
|
||||
}
|
||||
// 班组班次上一步至基础信息
|
||||
export function returnStepOne(id) {
|
||||
return request({
|
||||
url: '/base/group-scheduling-plan/returnStepOne?id='+id,
|
||||
method: 'delete',
|
||||
})
|
||||
}
|
||||
|
||||
// 获取部门下可用班组
|
||||
export function listByDeptId(id) {
|
||||
return request({
|
||||
url: '/base/group-team/listByDeptId?id='+id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
// 作废计划
|
||||
export function disablePlan(id) {
|
||||
return request({
|
||||
url: '/base/group-scheduling-plan/disablePlan?id='+id,
|
||||
method: 'delete',
|
||||
})
|
||||
}
|
||||
// 同步节假日
|
||||
export function updateScheduleLater(data) {
|
||||
return request({
|
||||
url: '/base/group-holiday/updateScheduleLater',
|
||||
method: 'post',
|
||||
data:data
|
||||
})
|
||||
}
|
||||
// 复制计划
|
||||
export function copyPlan(id) {
|
||||
return request({
|
||||
url: '/base/group-scheduling-plan/copyPlan?id='+id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 列表草稿编辑
|
||||
export function draftEditing(id) {
|
||||
return request({
|
||||
url: '/base/group-scheduling-plan/draftEditing?id='+id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
// 排班计划-详情
|
||||
export function getPlan(id) {
|
||||
return request({
|
||||
url: '/base/group-scheduling-plan/get?id='+id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
// 弹窗-取消
|
||||
export function cancelStepThree(id) {
|
||||
return request({
|
||||
url: '/base/group-scheduling-plan/cancelStepThree?id='+id,
|
||||
method: 'delete',
|
||||
})
|
||||
}
|
||||
// 第三步确认并执行 检查计划时间是否冲突,如果有,返回冲突的计划列表
|
||||
export function checkPlan(data) {
|
||||
return request({
|
||||
url: '/base/group-scheduling-plan/checkPlan',
|
||||
method: 'post',
|
||||
data:data
|
||||
})
|
||||
}
|
||||
// 第三步确认并执行 执行
|
||||
export function createStepFour(id) {
|
||||
return request({
|
||||
url: '/base/group-scheduling-plan/createStepFour',
|
||||
method: 'post',
|
||||
data:id
|
||||
})
|
||||
}
|
||||
// 班组班次下一步至获取预览
|
||||
export function createStepTwo(data) {
|
||||
return request({
|
||||
url: '/base/group-scheduling-plan/createStepTwo',
|
||||
method: 'post',
|
||||
data:data
|
||||
})
|
||||
}
|
||||
// 获取预览上一步至班组班次
|
||||
export function returnStepTwo(id) {
|
||||
return request({
|
||||
url: '/base/group-scheduling-plan/returnStepTwo?id='+id,
|
||||
method: 'delete',
|
||||
})
|
||||
}
|
||||
|
||||
// 第三步获取预览
|
||||
export function getPerView(data) {
|
||||
return request({
|
||||
url: '/base/group-scheduling-plan/getPerView',
|
||||
method: 'post',
|
||||
data:data
|
||||
})
|
||||
}
|
||||
18
src/api/group/calendar.js
Normal file
@@ -0,0 +1,18 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 获取部门及下级部门排班list
|
||||
export function getDeptSchedulingList(data) {
|
||||
return request({
|
||||
url: '/base/group-team-scheduling/getDeptSchedulingList',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
// 某个班组的排班list
|
||||
export function getClassSchedulingList(data) {
|
||||
return request({
|
||||
url: '/base/group-team-scheduling/getClassSchedulingList',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
47
src/api/group/groupSetting.js
Normal file
@@ -0,0 +1,47 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 创建班组基础信息
|
||||
export function createGroup(data) {
|
||||
return request({
|
||||
url: '/base/group-team/create',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 更新班组基础信息
|
||||
export function updateGroup(data) {
|
||||
return request({
|
||||
url: '/base/group-team/update',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
// 获得班组基础信息
|
||||
export function getGroup(id) {
|
||||
return request({
|
||||
url: '/base/group-team/get?id=' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 获得班组基础信息分页
|
||||
export function getGroupPage(query) {
|
||||
return request({
|
||||
url: '/base/group-team/page',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 获取班组code
|
||||
export function getCode() {
|
||||
return request({
|
||||
url: '/base/group-team/getCode',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
92
src/api/group/holidaySetting.js
Normal file
@@ -0,0 +1,92 @@
|
||||
/*
|
||||
* @Author: zwq
|
||||
* @Date: 2025-10-18 21:24:37
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2025-10-22 14:34:29
|
||||
* @Description:
|
||||
*/
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 获得节假日基础信息分页
|
||||
export function deptHolidayPage(query) {
|
||||
return request({
|
||||
url: '/base/group-holiday/page',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
// 获得部门节假日信息
|
||||
export function deptHolidayList(data) {
|
||||
return request({
|
||||
url: '/base/group-holiday/deptHolidayList',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
// 创建节假日基础信息
|
||||
export function createHoliday(data) {
|
||||
return request({
|
||||
url: '/base/group-holiday/create',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
// 节假日操作后直接更新排班日历
|
||||
export function updateSchedule(data) {
|
||||
return request({
|
||||
url: '/base/group-holiday/updateSchedule',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 更新节假日基础信息
|
||||
export function updateHoliday(data) {
|
||||
return request({
|
||||
url: '/base/group-holiday/update',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
// 删除节假日基础信息前校验是否影响排班
|
||||
export function checkDeleteHoliday(id) {
|
||||
return request({
|
||||
url: '/base/group-holiday/checkDelete?id=' + id,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
|
||||
// 删除
|
||||
export function deleteHoliday(id) {
|
||||
return request({
|
||||
url: '/base/group-holiday/delete?id=' + id,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
|
||||
// 获得节假日基础信息
|
||||
export function getHoliday(id) {
|
||||
return request({
|
||||
url: '/base/group-holiday/get?id=' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 获得节假日变动日志分页
|
||||
export function deptHolidayLogList(query) {
|
||||
return request({
|
||||
url: '/base/group-holiday-log/page',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 获得用户本人及以下的部门扁平化结构
|
||||
export function getEnableData() {
|
||||
return request({
|
||||
url: '/base/group-team-scheduling/getEnableData',
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
139
src/api/ssdl/product&recipe.js
Normal file
@@ -0,0 +1,139 @@
|
||||
/*
|
||||
* @Author: zwq
|
||||
* @Date: 2025-11-17 09:25:12
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2025-11-19 13:11:54
|
||||
* @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',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
// 删除工艺
|
||||
export function deleteProcess(id) {
|
||||
return request({
|
||||
url: '/wms/process/delete?id=' + id,
|
||||
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,
|
||||
});
|
||||
}
|
||||
@@ -1 +1,18 @@
|
||||
<svg width="128" height="128" xmlns="http://www.w3.org/2000/svg"><path d="M38.47 52L52 38.462l-23.648-23.67L43.209 0H.035L0 43.137l14.757-14.865L38.47 52zm74.773 47.726L89.526 76 76 89.536l23.648 23.672L84.795 128h43.174L128 84.863l-14.757 14.863zM89.538 52l23.668-23.648L128 43.207V.038L84.866 0 99.73 14.76 76 38.472 89.538 52zM38.46 76L14.792 99.651 0 84.794v43.173l43.137.033-14.865-14.757L52 89.53 38.46 76z"/></svg>
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg width="32px" height="32px" viewBox="0 0 32 32" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<title>全屏</title>
|
||||
<g id="页面-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
||||
<g id="首页" transform="translate(-1865.000000, -106.000000)" fill="#0B58FF">
|
||||
<g id="全屏" transform="translate(1865.000000, 106.000000)">
|
||||
<g>
|
||||
<rect id="矩形" stroke="#0B58FF" opacity="0" x="0.5" y="0.5" width="31" height="31"></rect>
|
||||
<path d="M27.3264942,0.842105263 L27.583814,0.850525866 C28.0103146,0.878577843 28.4244403,0.976634518 28.8180051,1.14344343 C29.2746777,1.33424853 29.6828981,1.60928508 30.0368065,1.96319349 C30.3881547,2.31454163 30.6645305,2.72554187 30.8562967,3.18137947 C31.0567273,3.65427262 31.1578947,4.15615812 31.1578947,4.6735058 L31.1578947,26.4843889 L31.1494741,26.7417088 C31.1214222,27.1682093 31.0233655,27.5823351 30.8565566,27.9758999 C30.6657515,28.4325724 30.3907149,28.8407928 30.0368065,29.1947013 C29.6854584,29.5460494 29.2744581,29.8224253 28.8186205,30.0141914 C28.3457274,30.214622 27.8438419,30.3157895 27.3264942,30.3157895 L5.51561106,30.3157895 L5.25829123,30.3073689 C4.83179065,30.2793169 4.41766492,30.1812602 4.02410014,30.0144513 C3.5674276,29.8236462 3.15920715,29.5486097 2.80529875,29.1947013 C2.45395061,28.8433531 2.17757472,28.4323529 1.98580856,27.9765153 C1.785378,27.5036221 1.68421053,27.0017366 1.68421053,26.4843889 L1.68421053,4.6735058 L1.69263113,4.41618596 C1.72068311,3.98968539 1.81873978,3.57555966 1.98554869,3.18199488 C2.17635379,2.72532234 2.45139035,2.31710189 2.80529875,1.96319349 C3.15664689,1.61184534 3.56764713,1.33546946 4.02348473,1.1437033 C4.49637788,0.943272735 4.99826338,0.842105263 5.51561106,0.842105263 L27.3264942,0.842105263 Z M27.3264942,2.75111508 L5.51561106,2.75111508 L5.36543907,2.75690192 C4.37431777,2.83358398 3.59322034,3.6628098 3.59322034,4.6735058 L3.59322034,26.4843889 L3.59900719,26.6345609 C3.67568924,27.6256822 4.50491506,28.4067797 5.51561106,28.4067797 L27.3264942,28.4067797 L27.4766662,28.4009928 C28.4677875,28.3243108 29.2488849,27.4950849 29.2488849,26.4843889 L29.2488849,4.6735058 L29.2430981,4.52333381 C29.166416,3.53221251 28.3371902,2.75111508 27.3264942,2.75111508 Z M6.93907808,16.8656959 L7.04823476,16.8742044 C7.51440654,16.9376019 7.87511151,17.3390325 7.87511151,17.8202498 L7.87511151,22.7419534 L12.5867439,18.0303211 L12.6763037,17.9513367 C13.0496528,17.6617272 13.593961,17.6880553 13.9362267,18.0303211 C14.3070145,18.4011089 14.3070145,19.009016 13.9362267,19.3798038 L9.18746648,24.1248885 L14.0860839,24.1248885 L14.2012238,24.1314959 C14.6923507,24.1882147 15.0747102,24.6029657 15.0673779,25.0991191 C15.056792,25.6176308 14.6323624,26.0338983 14.1128457,26.0338983 L6.94402319,26.0338983 L6.82978436,26.0273339 C6.34272021,25.9709676 5.96610169,25.5584576 5.96610169,25.0559768 L5.96610169,17.8436664 L5.97273726,17.7287345 C6.02968832,17.2384284 6.44595722,16.8559311 6.93907808,16.8656959 Z M25.9047725,5.12399643 L26.0180629,5.13054044 C26.501183,5.1867256 26.8760036,5.59778744 26.8760036,6.09522748 L26.8760036,13.3108831 L26.869368,13.425815 C26.8124169,13.9161211 26.396148,14.2986184 25.9030272,14.2888536 C25.3853261,14.278234 24.9669938,13.8525337 24.9669938,13.3342997 L24.9669938,8.4159413 L20.2553614,13.1275737 L20.1658016,13.2065581 C19.7924524,13.4961675 19.2481443,13.4698394 18.9058786,13.1275737 C18.5350907,12.7567858 18.5350907,12.1488788 18.9058786,11.7780909 L23.6509632,7.03300624 L18.7526762,7.03300624 L18.6375099,7.02640054 C18.1463449,6.96969821 17.7649507,6.5551 17.7747062,6.0600055 C17.7853132,5.54026395 18.2097429,5.12399643 18.7292596,5.12399643 L25.9047725,5.12399643 Z" id="形状结合" fill-rule="nonzero" opacity="0.79078311"></path>
|
||||
</g>
|
||||
<g>
|
||||
<rect id="矩形" stroke="#0B58FF" opacity="0" x="0.5" y="0.5" width="31" height="31"></rect>
|
||||
<path d="M27.3264942,0.842105263 L27.583814,0.850525866 C28.0103146,0.878577843 28.4244403,0.976634518 28.8180051,1.14344343 C29.2746777,1.33424853 29.6828981,1.60928508 30.0368065,1.96319349 C30.3881547,2.31454163 30.6645305,2.72554187 30.8562967,3.18137947 C31.0567273,3.65427262 31.1578947,4.15615812 31.1578947,4.6735058 L31.1578947,26.4843889 L31.1494741,26.7417088 C31.1214222,27.1682093 31.0233655,27.5823351 30.8565566,27.9758999 C30.6657515,28.4325724 30.3907149,28.8407928 30.0368065,29.1947013 C29.6854584,29.5460494 29.2744581,29.8224253 28.8186205,30.0141914 C28.3457274,30.214622 27.8438419,30.3157895 27.3264942,30.3157895 L5.51561106,30.3157895 L5.25829123,30.3073689 C4.83179065,30.2793169 4.41766492,30.1812602 4.02410014,30.0144513 C3.5674276,29.8236462 3.15920715,29.5486097 2.80529875,29.1947013 C2.45395061,28.8433531 2.17757472,28.4323529 1.98580856,27.9765153 C1.785378,27.5036221 1.68421053,27.0017366 1.68421053,26.4843889 L1.68421053,4.6735058 L1.69263113,4.41618596 C1.72068311,3.98968539 1.81873978,3.57555966 1.98554869,3.18199488 C2.17635379,2.72532234 2.45139035,2.31710189 2.80529875,1.96319349 C3.15664689,1.61184534 3.56764713,1.33546946 4.02348473,1.1437033 C4.49637788,0.943272735 4.99826338,0.842105263 5.51561106,0.842105263 L27.3264942,0.842105263 Z M27.3264942,2.75111508 L5.51561106,2.75111508 L5.36543907,2.75690192 C4.37431777,2.83358398 3.59322034,3.6628098 3.59322034,4.6735058 L3.59322034,26.4843889 L3.59900719,26.6345609 C3.67568924,27.6256822 4.50491506,28.4067797 5.51561106,28.4067797 L27.3264942,28.4067797 L27.4766662,28.4009928 C28.4677875,28.3243108 29.2488849,27.4950849 29.2488849,26.4843889 L29.2488849,4.6735058 L29.2430981,4.52333381 C29.166416,3.53221251 28.3371902,2.75111508 27.3264942,2.75111508 Z M6.93907808,16.8656959 L7.04823476,16.8742044 C7.51440654,16.9376019 7.87511151,17.3390325 7.87511151,17.8202498 L7.87511151,22.7419534 L12.5867439,18.0303211 L12.6763037,17.9513367 C13.0496528,17.6617272 13.593961,17.6880553 13.9362267,18.0303211 C14.3070145,18.4011089 14.3070145,19.009016 13.9362267,19.3798038 L9.18746648,24.1248885 L14.0860839,24.1248885 L14.2012238,24.1314959 C14.6923507,24.1882147 15.0747102,24.6029657 15.0673779,25.0991191 C15.056792,25.6176308 14.6323624,26.0338983 14.1128457,26.0338983 L6.94402319,26.0338983 L6.82978436,26.0273339 C6.34272021,25.9709676 5.96610169,25.5584576 5.96610169,25.0559768 L5.96610169,17.8436664 L5.97273726,17.7287345 C6.02968832,17.2384284 6.44595722,16.8559311 6.93907808,16.8656959 Z M25.9047725,5.12399643 L26.0180629,5.13054044 C26.501183,5.1867256 26.8760036,5.59778744 26.8760036,6.09522748 L26.8760036,13.3108831 L26.869368,13.425815 C26.8124169,13.9161211 26.396148,14.2986184 25.9030272,14.2888536 C25.3853261,14.278234 24.9669938,13.8525337 24.9669938,13.3342997 L24.9669938,8.4159413 L20.2553614,13.1275737 L20.1658016,13.2065581 C19.7924524,13.4961675 19.2481443,13.4698394 18.9058786,13.1275737 C18.5350907,12.7567858 18.5350907,12.1488788 18.9058786,11.7780909 L23.6509632,7.03300624 L18.7526762,7.03300624 L18.6375099,7.02640054 C18.1463449,6.96969821 17.7649507,6.5551 17.7747062,6.0600055 C17.7853132,5.54026395 18.2097429,5.12399643 18.7292596,5.12399643 L25.9047725,5.12399643 Z" id="形状结合" fill-rule="nonzero" opacity="0.79078311"></path>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 421 B After Width: | Height: | Size: 7.3 KiB |
12
src/assets/icons/svg/refresh.svg
Normal file
@@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg width="16px" height="16px" viewBox="0 0 16 16" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<title>更新</title>
|
||||
<g id="页面-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
||||
<g id="首页" transform="translate(-474.000000, -116.000000)" fill="#0B58FF" fill-rule="nonzero">
|
||||
<g id="更新" transform="translate(474.000000, 116.000000)">
|
||||
<rect id="矩形" opacity="0" x="0" y="0" width="16" height="16"></rect>
|
||||
<path d="M14.9793977,2.67910156 L13.9879914,3.45429687 C12.6362336,1.72636719 10.5338899,0.6171875 8.17314768,0.6171875 C4.09678049,0.6171875 0.797366431,3.91308594 0.792086694,7.99121094 C0.786819556,12.0728516 4.09326487,15.3828125 8.17314768,15.3828125 C11.3600617,15.3828125 14.0758821,13.3613281 15.1094758,10.5294922 C15.135843,10.4556641 15.0971711,10.3730469 15.023343,10.3484375 L14.0266633,10.0056641 C13.954593,9.98105469 13.8754914,10.0179688 13.8491242,10.0900391 C13.8174836,10.1779297 13.7823274,10.2658203 13.7454133,10.3519531 C13.4413117,11.0726562 13.0053742,11.7195312 12.4499055,12.275 C11.8944367,12.8304687 11.2475617,13.2664062 10.5286164,13.5722656 C9.78506174,13.8869141 8.99228831,14.046875 8.17666331,14.046875 C7.35928049,14.046875 6.56826487,13.8869141 5.82471018,13.5722656 C5.10576487,13.2681641 4.45888987,12.8322266 3.90342112,12.275 C3.34795237,11.7195312 2.91201487,11.0726562 2.60791331,10.3519531 C2.29326487,9.60664063 2.13330393,8.815625 2.13330393,7.99824219 C2.13330393,7.18085937 2.29326487,6.38984375 2.60791331,5.64453125 C2.91201487,4.92382812 3.34795237,4.27695312 3.90342112,3.72148438 C4.45888987,3.16601563 5.10576487,2.73007813 5.82471018,2.42421875 C6.56826487,2.10957031 7.36103831,1.94960938 8.17666331,1.94960938 C8.99404612,1.94960938 9.78506174,2.10957031 10.5286164,2.42421875 C11.2475617,2.72832031 11.8944367,3.16425781 12.4499055,3.72148438 C12.6239289,3.89550781 12.7874055,4.08007812 12.9385774,4.2734375 L11.8803742,5.09960938 C11.7872102,5.17167969 11.8188508,5.31933594 11.9331086,5.34746094 L15.0198274,6.10332031 C15.107718,6.12441406 15.1938508,6.05761719 15.1938508,5.96796875 L15.2079133,2.78808594 C15.2061555,2.67207031 15.0708039,2.60703125 14.9793977,2.67910156 L14.9793977,2.67910156 Z" id="路径" stroke="#0B58FF" stroke-width="0.5"></path>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 2.4 KiB |
18
src/assets/icons/svg/unFullscreen.svg
Normal file
@@ -0,0 +1,18 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg width="32px" height="32px" viewBox="0 0 32 32" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<title>推出全屏</title>
|
||||
<g id="页面-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
||||
<g id="首页" transform="translate(-1815.000000, -103.000000)" fill="#0B58FF">
|
||||
<g id="推出全屏" transform="translate(1815.000000, 103.000000)">
|
||||
<g id="全屏">
|
||||
<rect id="矩形" stroke="#0B58FF" opacity="0" x="0.5" y="0.5" width="31" height="31"></rect>
|
||||
<path d="M26.7638125,1.45454545 L27.0177905,1.4628567 C27.4387521,1.49054436 27.8474996,1.58732758 28.2359531,1.75197014 C28.6866948,1.94029725 29.0896137,2.2117619 29.4389259,2.56107409 C29.7857111,2.90785927 30.0584977,3.31352185 30.2477734,3.76343947 C30.4456009,4.23019115 30.5454545,4.72555866 30.5454545,5.23618754 L30.5454545,26.7638125 L30.5371433,27.0177905 C30.5094556,27.4387521 30.4126724,27.8474996 30.2480299,28.2359531 C30.0597028,28.6866948 29.7882381,29.0896137 29.4389259,29.4389259 C29.0921407,29.7857111 28.6864782,30.0584977 28.2365605,30.2477734 C27.7698088,30.4456009 27.2744413,30.5454545 26.7638125,30.5454545 L5.23618754,30.5454545 L4.98220952,30.5371433 C4.56124792,30.5094556 4.15250044,30.4126724 3.7640469,30.2480299 C3.31330516,30.0597028 2.91038628,29.7882381 2.56107409,29.4389259 C2.21428891,29.0921407 1.94150232,28.6864782 1.75222663,28.2365605 C1.55439906,27.7698088 1.45454545,27.2744413 1.45454545,26.7638125 L1.45454545,5.23618754 L1.4628567,4.98220952 C1.49054436,4.56124792 1.58732758,4.15250044 1.75197014,3.7640469 C1.94029725,3.31330516 2.2117619,2.91038628 2.56107409,2.56107409 C2.90785927,2.21428891 3.31352185,1.94150232 3.76343947,1.75222663 C4.23019115,1.55439906 4.72555866,1.45454545 5.23618754,1.45454545 L26.7638125,1.45454545 Z M26.7638125,3.33876293 L5.23618754,3.33876293 L5.08796584,3.34447462 C4.10971624,3.42016081 3.33876293,4.23861746 3.33876293,5.23618754 L3.33876293,26.7638125 L3.34447462,26.9120342 C3.42016081,27.8902838 4.23861746,28.6612371 5.23618754,28.6612371 L26.7638125,28.6612371 L26.9120342,28.6555254 C27.8902838,28.5798392 28.6612371,27.7613825 28.6612371,26.7638125 L28.6612371,5.23618754 L28.6555254,5.08796584 C28.5798392,4.10971624 27.7613825,3.33876293 26.7638125,3.33876293 Z M13.6987866,17.269857 L13.8115418,17.2763362 C14.2922804,17.3319705 14.6640078,17.7391232 14.6640078,18.2350783 L14.6640078,25.3537223 L14.6574584,25.4671616 C14.6012469,25.9511001 14.1903841,26.3286298 13.7036674,26.3189919 L13.5959284,26.3105939 C13.1358108,26.2480197 12.7797903,25.8518025 12.7797903,25.3768348 L12.7797903,20.5190494 L8.12934794,25.1694917 L8.04095127,25.2474504 C7.67245079,25.5332987 7.13521162,25.5073124 6.79739091,25.1694917 C6.43141847,24.8035193 6.43141847,24.2035071 6.79739091,23.8375347 L11.4844789,19.1540745 L6.64947993,19.1540745 L6.53583534,19.1475529 C6.05108664,19.0915708 5.67369292,18.6822061 5.68093001,18.1924962 C5.69137836,17.6807185 6.11029591,17.269857 6.62306566,17.269857 L13.6987866,17.269857 Z M18.2962333,5.68100813 C18.807211,5.69148979 19.2201105,6.11166149 19.2201105,6.62316519 L19.2201105,11.4776488 L23.8705528,6.82720649 L23.9589495,6.74924786 C24.32745,6.46339956 24.8646892,6.48938577 25.2025099,6.82720649 C25.5684823,7.19317893 25.5684823,7.79319108 25.2025099,8.15916352 L20.5190497,12.8426237 L25.3537226,12.8426237 L25.4673933,12.8491436 C25.9521795,12.9051095 26.3286206,13.3143234 26.3189917,13.8029881 C26.3085224,14.3159797 25.8896049,14.7268412 25.3768351,14.7268412 L18.2945107,14.7268412 L18.1826915,14.7203822 C17.7058457,14.6649267 17.335893,14.2592033 17.335893,13.7682235 L17.335893,6.64627767 L17.3424424,6.53283844 C17.3986538,6.04889994 17.8095166,5.67137018 18.2962333,5.68100813 Z" id="形状结合" fill-rule="nonzero" opacity="0.79078311"></path>
|
||||
</g>
|
||||
<g id="全屏">
|
||||
<rect id="矩形" stroke="#0B58FF" opacity="0" x="0.5" y="0.5" width="31" height="31"></rect>
|
||||
<path d="M26.7638125,1.45454545 L27.0177905,1.4628567 C27.4387521,1.49054436 27.8474996,1.58732758 28.2359531,1.75197014 C28.6866948,1.94029725 29.0896137,2.2117619 29.4389259,2.56107409 C29.7857111,2.90785927 30.0584977,3.31352185 30.2477734,3.76343947 C30.4456009,4.23019115 30.5454545,4.72555866 30.5454545,5.23618754 L30.5454545,26.7638125 L30.5371433,27.0177905 C30.5094556,27.4387521 30.4126724,27.8474996 30.2480299,28.2359531 C30.0597028,28.6866948 29.7882381,29.0896137 29.4389259,29.4389259 C29.0921407,29.7857111 28.6864782,30.0584977 28.2365605,30.2477734 C27.7698088,30.4456009 27.2744413,30.5454545 26.7638125,30.5454545 L5.23618754,30.5454545 L4.98220952,30.5371433 C4.56124792,30.5094556 4.15250044,30.4126724 3.7640469,30.2480299 C3.31330516,30.0597028 2.91038628,29.7882381 2.56107409,29.4389259 C2.21428891,29.0921407 1.94150232,28.6864782 1.75222663,28.2365605 C1.55439906,27.7698088 1.45454545,27.2744413 1.45454545,26.7638125 L1.45454545,5.23618754 L1.4628567,4.98220952 C1.49054436,4.56124792 1.58732758,4.15250044 1.75197014,3.7640469 C1.94029725,3.31330516 2.2117619,2.91038628 2.56107409,2.56107409 C2.90785927,2.21428891 3.31352185,1.94150232 3.76343947,1.75222663 C4.23019115,1.55439906 4.72555866,1.45454545 5.23618754,1.45454545 L26.7638125,1.45454545 Z M26.7638125,3.33876293 L5.23618754,3.33876293 L5.08796584,3.34447462 C4.10971624,3.42016081 3.33876293,4.23861746 3.33876293,5.23618754 L3.33876293,26.7638125 L3.34447462,26.9120342 C3.42016081,27.8902838 4.23861746,28.6612371 5.23618754,28.6612371 L26.7638125,28.6612371 L26.9120342,28.6555254 C27.8902838,28.5798392 28.6612371,27.7613825 28.6612371,26.7638125 L28.6612371,5.23618754 L28.6555254,5.08796584 C28.5798392,4.10971624 27.7613825,3.33876293 26.7638125,3.33876293 Z M13.6987866,17.269857 L13.8115418,17.2763362 C14.2922804,17.3319705 14.6640078,17.7391232 14.6640078,18.2350783 L14.6640078,25.3537223 L14.6574584,25.4671616 C14.6012469,25.9511001 14.1903841,26.3286298 13.7036674,26.3189919 L13.5959284,26.3105939 C13.1358108,26.2480197 12.7797903,25.8518025 12.7797903,25.3768348 L12.7797903,20.5190494 L8.12934794,25.1694917 L8.04095127,25.2474504 C7.67245079,25.5332987 7.13521162,25.5073124 6.79739091,25.1694917 C6.43141847,24.8035193 6.43141847,24.2035071 6.79739091,23.8375347 L11.4844789,19.1540745 L6.64947993,19.1540745 L6.53583534,19.1475529 C6.05108664,19.0915708 5.67369292,18.6822061 5.68093001,18.1924962 C5.69137836,17.6807185 6.11029591,17.269857 6.62306566,17.269857 L13.6987866,17.269857 Z M18.2962333,5.68100813 C18.807211,5.69148979 19.2201105,6.11166149 19.2201105,6.62316519 L19.2201105,11.4776488 L23.8705528,6.82720649 L23.9589495,6.74924786 C24.32745,6.46339956 24.8646892,6.48938577 25.2025099,6.82720649 C25.5684823,7.19317893 25.5684823,7.79319108 25.2025099,8.15916352 L20.5190497,12.8426237 L25.3537226,12.8426237 L25.4673933,12.8491436 C25.9521795,12.9051095 26.3286206,13.3143234 26.3189917,13.8029881 C26.3085224,14.3159797 25.8896049,14.7268412 25.3768351,14.7268412 L18.2945107,14.7268412 L18.1826915,14.7203822 C17.7058457,14.6649267 17.335893,14.2592033 17.335893,13.7682235 L17.335893,6.64627767 L17.3424424,6.53283844 C17.3986538,6.04889994 17.8095166,5.67137018 18.2962333,5.68100813 Z" id="形状结合" fill-rule="nonzero" opacity="0.79078311"></path>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 7.3 KiB |
BIN
src/assets/images/banzu.png
Normal file
|
After Width: | Height: | Size: 2.6 KiB |
BIN
src/assets/images/daoban.png
Normal file
|
After Width: | Height: | Size: 3.1 KiB |
BIN
src/assets/images/lianpai.png
Normal file
|
After Width: | Height: | Size: 2.3 KiB |
BIN
src/assets/images/xiujia.png
Normal file
|
After Width: | Height: | Size: 2.1 KiB |
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/cold-data-board-msg1.png
Normal file
|
After Width: | Height: | Size: 16 KiB |
BIN
src/assets/img/cold-data-board-msg2.png
Normal file
|
After Width: | Height: | Size: 14 KiB |
BIN
src/assets/img/home-bg.png
Normal file
|
After Width: | Height: | Size: 1.2 MiB |
BIN
src/assets/img/home-progress-bg.png
Normal file
|
After Width: | Height: | Size: 936 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 |
@@ -81,7 +81,7 @@ export default {
|
||||
border: none;
|
||||
background: #fff;
|
||||
border-radius: 8px;
|
||||
padding: 15px;
|
||||
padding: 16px;
|
||||
color: #888;
|
||||
letter-spacing: 2px;
|
||||
flex: 1;
|
||||
|
||||
@@ -9,6 +9,7 @@ import store from './store';
|
||||
import router from './router';
|
||||
import directive from './directive'; // directive
|
||||
import plugins from './plugins'; // plugins
|
||||
import dataV from '@jiaminghi/data-view'
|
||||
|
||||
import './assets/icons'; // icon
|
||||
import './permission'; // permission control
|
||||
@@ -77,6 +78,7 @@ Vue.use(directive);
|
||||
Vue.use(plugins);
|
||||
Vue.use(VueMeta);
|
||||
// Vue.use(hljs.vuePlugin);
|
||||
Vue.use(dataV);
|
||||
|
||||
// bpmnProcessDesigner 需要引入
|
||||
import MyPD from '@/components/bpmnProcessDesigner/package/index.js';
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* @Author: zwq
|
||||
* @Date: 2022-08-24 11:19:43
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2024-04-02 09:33:29
|
||||
* @LastEditTime: 2025-11-19 13:20:30
|
||||
* @Description:
|
||||
*/
|
||||
export default {
|
||||
@@ -69,7 +69,7 @@ export default {
|
||||
this.$refs.addOrUpdate.init(val.data.id);
|
||||
});
|
||||
} else if (val.type === "delete") {
|
||||
this.deleteHandle(val.data.id, val.data.name, val.data._pageIndex)
|
||||
this.deleteHandle(val.data.id, val.data.name, val.data._pageIndex,val.data)
|
||||
} else {
|
||||
this.otherMethods(val)
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@ import { isRelogin } from '@/utils/request'
|
||||
NProgress.configure({ showSpinner: false })
|
||||
|
||||
// 增加三方登陆 update by 芋艿
|
||||
const whiteList = ['/login', '/social-login', '/auth-redirect', '/bind', '/register', '/oauthLogin/gitee']
|
||||
const whiteList = ['/login', '/social-login','screenbg', '/auth-redirect', '/bind', '/register', '/oauthLogin/gitee']
|
||||
|
||||
router.beforeEach((to, from, next) => {
|
||||
NProgress.start()
|
||||
@@ -25,9 +25,9 @@ router.beforeEach((to, from, next) => {
|
||||
// 获取字典数据 add by 芋艿
|
||||
store.dispatch('dict/loadDictDatas')
|
||||
// 判断当前用户是否已拉取完 user_info 信息
|
||||
store.dispatch('GetInfo').then(() => {
|
||||
store.dispatch('GetInfo').then(userInfo => {
|
||||
isRelogin.show = false
|
||||
store.dispatch('GenerateRoutes').then(accessRoutes => {
|
||||
store.dispatch('GenerateRoutes', userInfo.menus).then(accessRoutes => {
|
||||
// 根据 roles 权限生成可访问的路由表
|
||||
router.addRoutes(accessRoutes) // 动态添加可访问路由表
|
||||
next({ ...to, replace: true }) // hack方法 确保addRoutes已完成
|
||||
|
||||
@@ -28,223 +28,277 @@ Vue.use(Router)
|
||||
|
||||
// 公共路由
|
||||
export const constantRoutes = [
|
||||
{
|
||||
path: '/redirect',
|
||||
component: Layout,
|
||||
hidden: true,
|
||||
children: [
|
||||
{
|
||||
path: '/redirect/:path(.*)',
|
||||
component: (resolve) => require(['@/views/redirect'], resolve)
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: '/login',
|
||||
component: (resolve) => require(['@/views/login'], resolve),
|
||||
hidden: true
|
||||
},
|
||||
{
|
||||
path: '/sso',
|
||||
component: (resolve) => require(['@/views/sso'], resolve),
|
||||
hidden: true
|
||||
},
|
||||
{
|
||||
path: '/social-login',
|
||||
component: (resolve) => require(['@/views/socialLogin'], resolve),
|
||||
hidden: true
|
||||
},
|
||||
{
|
||||
path: '/404',
|
||||
component: (resolve) => require(['@/views/error/404'], resolve),
|
||||
hidden: true
|
||||
},
|
||||
{
|
||||
path: '/401',
|
||||
component: (resolve) => require(['@/views/error/401'], resolve),
|
||||
hidden: true
|
||||
},
|
||||
{
|
||||
path: '/print-design',
|
||||
component: (resolve) => require(['@/views/print/design'], resolve),
|
||||
hidden: true
|
||||
},
|
||||
{
|
||||
path: "",
|
||||
component: Layout,
|
||||
redirect: "index",
|
||||
children: [
|
||||
{
|
||||
path: "index",
|
||||
component: (resolve) => require(["@/views/core/base/factory/index"], resolve),
|
||||
name: "首页",
|
||||
meta: { title: "首页", icon: "dashboard", affix: true },
|
||||
hidden: true
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
path: '/user',
|
||||
component: Layout,
|
||||
hidden: true,
|
||||
redirect: 'noredirect',
|
||||
children: [{
|
||||
path: 'profile',
|
||||
component: (resolve) => require(['@/views/system/user/profile/index'], resolve),
|
||||
name: 'Profile',
|
||||
meta: { title: '个人中心', icon: 'user' }
|
||||
}, {
|
||||
path: 'notify-message',
|
||||
component: (resolve) => require(['@/views/system/notify/my/index'], resolve),
|
||||
name: 'MyNotifyMessage',
|
||||
meta: { title: '我的站内信', icon: 'message' },
|
||||
}]
|
||||
},
|
||||
{
|
||||
path: '/dict',
|
||||
component: Layout,
|
||||
hidden: true,
|
||||
children: [{
|
||||
path: 'type/data/:dictId(\\d+)',
|
||||
component: (resolve) => require(['@/views/system/dict/data'], resolve),
|
||||
name: 'SystemDictData',
|
||||
meta: { title: '字典数据', icon: '', activeMenu: '/system/dict' }
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: '/job',
|
||||
component: Layout,
|
||||
hidden: true,
|
||||
children: [{
|
||||
path: 'log',
|
||||
component: (resolve) => require(['@/views/infra/job/log'], resolve),
|
||||
name: 'InfraJobLog',
|
||||
meta: { title: '调度日志', activeMenu: '/infra/job' }
|
||||
}
|
||||
]
|
||||
}, {
|
||||
path: '/codegen',
|
||||
component: Layout,
|
||||
hidden: true,
|
||||
children: [{
|
||||
path: 'edit/:tableId(\\d+)',
|
||||
component: (resolve) => require(['@/views/infra/codegen/editTable'], resolve),
|
||||
name: 'InfraCodegenEditTable',
|
||||
meta: { title: '修改生成配置', activeMenu: '/infra/codegen' }
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: '/bpm',
|
||||
component: Layout,
|
||||
hidden: true,
|
||||
redirect: 'noredirect',
|
||||
children: [{
|
||||
path: 'oa/leave/create',
|
||||
component: (resolve) => require(['@/views/bpm/oa/leave/create'], resolve),
|
||||
name: 'BpmOALeaveCreate',
|
||||
meta: { title: '发起 OA 请假', icon: 'form', activeMenu: '/bpm/oa/leave' }
|
||||
}, {
|
||||
path: 'oa/leave/detail',
|
||||
component: (resolve) => require(['@/views/bpm/oa/leave/detail'], resolve),
|
||||
name: 'BpmOALeaveDetail',
|
||||
meta: { title: '查看 OA 请假', icon: 'view', activeMenu: '/bpm/oa/leave' }
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: '/bpm',
|
||||
component: Layout,
|
||||
hidden: true,
|
||||
children: [{
|
||||
path: 'manager/form/edit',
|
||||
component: (resolve) => require(['@/views/bpm/form/formEditor'], resolve),
|
||||
name: 'BpmFormEditor',
|
||||
meta: { title: '流程表单-编辑', activeMenu: '/bpm/manager/form' }
|
||||
}, {
|
||||
path: 'manager/definition',
|
||||
component: (resolve) => require(['@/views/bpm/definition/index'], resolve),
|
||||
name: 'BpmProcessDefinition',
|
||||
meta: { title: '流程定义', activeMenu: '/bpm/manager/model' }
|
||||
}, {
|
||||
path: 'manager/model/design',
|
||||
component: (resolve) => require(['@/views/bpm/model/modelEditor'], resolve),
|
||||
name: 'BpmModelEditor',
|
||||
meta: { title: '设计流程', activeMenu: '/bpm/manager/model' }
|
||||
}, {
|
||||
path: 'process-instance/create',
|
||||
component: (resolve) => require(['@/views/bpm/processInstance/create'], resolve),
|
||||
name: 'BpmProcessInstanceCreate',
|
||||
meta: { title: '发起流程', activeMenu: '/bpm/task/my' }
|
||||
}, {
|
||||
path: 'process-instance/detail',
|
||||
component: (resolve) => require(['@/views/bpm/processInstance/detail'], resolve),
|
||||
name: 'BpmProcessInstanceDetail',
|
||||
meta: { title: '流程详情', activeMenu: '/bpm/task/my' }
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: '/property',
|
||||
component: Layout,
|
||||
hidden: true,
|
||||
children: [{
|
||||
path: 'value/:propertyId(\\d+)',
|
||||
component: (resolve) => require(['@/views/mall/product/property/value'], resolve),
|
||||
name: 'ProductPropertyValue',
|
||||
meta: { title: '商品属性值', icon: '', activeMenu: '/product/property' }
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: '/spu',
|
||||
component: Layout,
|
||||
hidden: true,
|
||||
children: [{
|
||||
path: 'edit/:spuId(\\d+)',
|
||||
component: (resolve) => require(['@/views/mall/product/spu/save'], resolve),
|
||||
name: 'ProductSpuUpdate',
|
||||
meta: { title: '修改商品', activeMenu: '/product/spu' }
|
||||
},
|
||||
{
|
||||
path: 'add',
|
||||
component: (resolve) => require(['@/views/mall/product/spu/save'], resolve),
|
||||
name: 'ProductSpuCreate',
|
||||
meta: { title: '添加商品', activeMenu: '/product/spu' }
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: '/trade/order',
|
||||
component: Layout,
|
||||
hidden: true,
|
||||
children: [
|
||||
{
|
||||
path: 'detail',
|
||||
name: 'TradeOrderDetail',
|
||||
hidden: true,
|
||||
meta: { title: '订单详情' },
|
||||
component: (resolve) => require(['@/views/mall/trade/order/detail'], resolve)
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: '/pay',
|
||||
component: Layout,
|
||||
hidden: true,
|
||||
children: [{
|
||||
path: 'order/submit',
|
||||
name: 'PayOrderSubmit',
|
||||
hidden: true,
|
||||
meta: {
|
||||
title: '收银台',
|
||||
noCache: true
|
||||
},
|
||||
component: (resolve) => require(['@/views/pay/order/submit'], resolve)
|
||||
}]
|
||||
}
|
||||
]
|
||||
{
|
||||
path: '/redirect',
|
||||
component: Layout,
|
||||
hidden: true,
|
||||
children: [
|
||||
{
|
||||
path: '/redirect/:path(.*)',
|
||||
component: (resolve) => require(['@/views/redirect'], resolve),
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
path: '/login',
|
||||
component: (resolve) => require(['@/views/login'], resolve),
|
||||
// hidden: true,
|
||||
},
|
||||
|
||||
{
|
||||
path: '/sso',
|
||||
component: (resolve) => require(['@/views/sso'], resolve),
|
||||
hidden: true,
|
||||
},
|
||||
{
|
||||
path: '/social-login',
|
||||
component: (resolve) => require(['@/views/socialLogin'], resolve),
|
||||
hidden: true,
|
||||
},
|
||||
{
|
||||
path: '/404',
|
||||
component: (resolve) => require(['@/views/error/404'], resolve),
|
||||
hidden: true,
|
||||
},
|
||||
{
|
||||
path: '/401',
|
||||
component: (resolve) => require(['@/views/error/401'], resolve),
|
||||
hidden: true,
|
||||
},
|
||||
{
|
||||
path: '/print-design',
|
||||
component: (resolve) => require(['@/views/print/design'], resolve),
|
||||
hidden: true,
|
||||
},
|
||||
{
|
||||
path: '',
|
||||
component: Layout,
|
||||
redirect: 'index',
|
||||
children: [
|
||||
{
|
||||
path: 'index',
|
||||
component: (resolve) => require(['@/views/home/index'], resolve),
|
||||
name: '首页',
|
||||
meta: { title: '首页', icon: 'dashboard', affix: true },
|
||||
hidden: true,
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
path: '/screenbg',
|
||||
component: () =>
|
||||
import(
|
||||
/* webpackChunkName: "about" */ '@/views/productionVisualization/equipmentBoard'
|
||||
),
|
||||
name: 'screenbg',
|
||||
meta: { title: '大屏', icon: 'chart' },
|
||||
},
|
||||
{
|
||||
path: '/user',
|
||||
component: Layout,
|
||||
hidden: true,
|
||||
redirect: 'noredirect',
|
||||
children: [
|
||||
{
|
||||
path: 'profile',
|
||||
component: (resolve) =>
|
||||
require(['@/views/system/user/profile/index'], resolve),
|
||||
name: 'Profile',
|
||||
meta: { title: '个人中心', icon: 'user' },
|
||||
},
|
||||
{
|
||||
path: 'notify-message',
|
||||
component: (resolve) =>
|
||||
require(['@/views/system/notify/my/index'], resolve),
|
||||
name: 'MyNotifyMessage',
|
||||
meta: { title: '我的站内信', icon: 'message' },
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
path: '/dict',
|
||||
component: Layout,
|
||||
hidden: true,
|
||||
children: [
|
||||
{
|
||||
path: 'type/data/:dictId(\\d+)',
|
||||
component: (resolve) => require(['@/views/system/dict/data'], resolve),
|
||||
name: 'SystemDictData',
|
||||
meta: { title: '字典数据', icon: '', activeMenu: '/system/dict' },
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
path: '/job',
|
||||
component: Layout,
|
||||
hidden: true,
|
||||
children: [
|
||||
{
|
||||
path: 'log',
|
||||
component: (resolve) => require(['@/views/infra/job/log'], resolve),
|
||||
name: 'InfraJobLog',
|
||||
meta: { title: '调度日志', activeMenu: '/infra/job' },
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
path: '/codegen',
|
||||
component: Layout,
|
||||
hidden: true,
|
||||
children: [
|
||||
{
|
||||
path: 'edit/:tableId(\\d+)',
|
||||
component: (resolve) =>
|
||||
require(['@/views/infra/codegen/editTable'], resolve),
|
||||
name: 'InfraCodegenEditTable',
|
||||
meta: { title: '修改生成配置', activeMenu: '/infra/codegen' },
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
path: '/bpm',
|
||||
component: Layout,
|
||||
hidden: true,
|
||||
redirect: 'noredirect',
|
||||
children: [
|
||||
{
|
||||
path: 'oa/leave/create',
|
||||
component: (resolve) =>
|
||||
require(['@/views/bpm/oa/leave/create'], resolve),
|
||||
name: 'BpmOALeaveCreate',
|
||||
meta: {
|
||||
title: '发起 OA 请假',
|
||||
icon: 'form',
|
||||
activeMenu: '/bpm/oa/leave',
|
||||
},
|
||||
},
|
||||
{
|
||||
path: 'oa/leave/detail',
|
||||
component: (resolve) =>
|
||||
require(['@/views/bpm/oa/leave/detail'], resolve),
|
||||
name: 'BpmOALeaveDetail',
|
||||
meta: {
|
||||
title: '查看 OA 请假',
|
||||
icon: 'view',
|
||||
activeMenu: '/bpm/oa/leave',
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
path: '/bpm',
|
||||
component: Layout,
|
||||
hidden: true,
|
||||
children: [
|
||||
{
|
||||
path: 'manager/form/edit',
|
||||
component: (resolve) =>
|
||||
require(['@/views/bpm/form/formEditor'], resolve),
|
||||
name: 'BpmFormEditor',
|
||||
meta: { title: '流程表单-编辑', activeMenu: '/bpm/manager/form' },
|
||||
},
|
||||
{
|
||||
path: 'manager/definition',
|
||||
component: (resolve) =>
|
||||
require(['@/views/bpm/definition/index'], resolve),
|
||||
name: 'BpmProcessDefinition',
|
||||
meta: { title: '流程定义', activeMenu: '/bpm/manager/model' },
|
||||
},
|
||||
{
|
||||
path: 'manager/model/design',
|
||||
component: (resolve) =>
|
||||
require(['@/views/bpm/model/modelEditor'], resolve),
|
||||
name: 'BpmModelEditor',
|
||||
meta: { title: '设计流程', activeMenu: '/bpm/manager/model' },
|
||||
},
|
||||
{
|
||||
path: 'process-instance/create',
|
||||
component: (resolve) =>
|
||||
require(['@/views/bpm/processInstance/create'], resolve),
|
||||
name: 'BpmProcessInstanceCreate',
|
||||
meta: { title: '发起流程', activeMenu: '/bpm/task/my' },
|
||||
},
|
||||
{
|
||||
path: 'process-instance/detail',
|
||||
component: (resolve) =>
|
||||
require(['@/views/bpm/processInstance/detail'], resolve),
|
||||
name: 'BpmProcessInstanceDetail',
|
||||
meta: { title: '流程详情', activeMenu: '/bpm/task/my' },
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
path: '/property',
|
||||
component: Layout,
|
||||
hidden: true,
|
||||
children: [
|
||||
{
|
||||
path: 'value/:propertyId(\\d+)',
|
||||
component: (resolve) =>
|
||||
require(['@/views/mall/product/property/value'], resolve),
|
||||
name: 'ProductPropertyValue',
|
||||
meta: {
|
||||
title: '商品属性值',
|
||||
icon: '',
|
||||
activeMenu: '/product/property',
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
path: '/spu',
|
||||
component: Layout,
|
||||
hidden: true,
|
||||
children: [
|
||||
{
|
||||
path: 'edit/:spuId(\\d+)',
|
||||
component: (resolve) =>
|
||||
require(['@/views/mall/product/spu/save'], resolve),
|
||||
name: 'ProductSpuUpdate',
|
||||
meta: { title: '修改商品', activeMenu: '/product/spu' },
|
||||
},
|
||||
{
|
||||
path: 'add',
|
||||
component: (resolve) =>
|
||||
require(['@/views/mall/product/spu/save'], resolve),
|
||||
name: 'ProductSpuCreate',
|
||||
meta: { title: '添加商品', activeMenu: '/product/spu' },
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
path: '/trade/order',
|
||||
component: Layout,
|
||||
hidden: true,
|
||||
children: [
|
||||
{
|
||||
path: 'detail',
|
||||
name: 'TradeOrderDetail',
|
||||
hidden: true,
|
||||
meta: { title: '订单详情' },
|
||||
component: (resolve) =>
|
||||
require(['@/views/mall/trade/order/detail'], resolve),
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
path: '/pay',
|
||||
component: Layout,
|
||||
hidden: true,
|
||||
children: [
|
||||
{
|
||||
path: 'order/submit',
|
||||
name: 'PayOrderSubmit',
|
||||
hidden: true,
|
||||
meta: {
|
||||
title: '收银台',
|
||||
noCache: true,
|
||||
},
|
||||
component: (resolve) => require(['@/views/pay/order/submit'], resolve),
|
||||
},
|
||||
],
|
||||
},
|
||||
];
|
||||
|
||||
// 防止连续点击多次路由报错
|
||||
let routerPush = Router.prototype.push;
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import {constantRoutes} from '@/router'
|
||||
import {getRouters} from '@/api/menu'
|
||||
import Layout from '@/layout/index'
|
||||
import ParentView from '@/components/ParentView';
|
||||
import {toCamelCase} from "@/utils";
|
||||
@@ -27,22 +26,25 @@ const permission = {
|
||||
},
|
||||
},
|
||||
actions: {
|
||||
// 生成路由
|
||||
GenerateRoutes({commit}) {
|
||||
/**
|
||||
* 生成路由
|
||||
*
|
||||
* @param commit commit 函数
|
||||
* @param menus 路由参数
|
||||
*/
|
||||
GenerateRoutes({commit}, menus) {
|
||||
return new Promise(resolve => {
|
||||
// 向后端请求路由数据(菜单)
|
||||
getRouters().then(res => {
|
||||
const sdata = JSON.parse(JSON.stringify(res.data)) // 【重要】用于菜单中的数据
|
||||
const rdata = JSON.parse(JSON.stringify(res.data)) // 用于最后添加到 Router 中的数据
|
||||
const sidebarRoutes = filterAsyncRouter(sdata)
|
||||
const rewriteRoutes = filterAsyncRouter(rdata, false, true)
|
||||
rewriteRoutes.push({path: '*', redirect: '/404', hidden: true})
|
||||
commit('SET_ROUTES', rewriteRoutes)
|
||||
commit('SET_SIDEBAR_ROUTERS', constantRoutes.concat(sidebarRoutes))
|
||||
commit('SET_DEFAULT_ROUTES', sidebarRoutes)
|
||||
commit('SET_TOPBAR_ROUTES', sidebarRoutes)
|
||||
resolve(rewriteRoutes)
|
||||
})
|
||||
// 将 menus 菜单,转换为 route 路由数组
|
||||
const sdata = JSON.parse(JSON.stringify(menus)) // 【重要】用于菜单中的数据
|
||||
const rdata = JSON.parse(JSON.stringify(menus)) // 用于最后添加到 Router 中的数据
|
||||
const sidebarRoutes = filterAsyncRouter(sdata)
|
||||
const rewriteRoutes = filterAsyncRouter(rdata, false, true)
|
||||
rewriteRoutes.push({path: '*', redirect: '/404', hidden: true})
|
||||
commit('SET_ROUTES', rewriteRoutes)
|
||||
commit('SET_SIDEBAR_ROUTERS', constantRoutes.concat(sidebarRoutes))
|
||||
commit('SET_DEFAULT_ROUTES', sidebarRoutes)
|
||||
commit('SET_TOPBAR_ROUTES', sidebarRoutes)
|
||||
resolve(rewriteRoutes)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
@@ -80,8 +80,18 @@ export default {
|
||||
immediate: true,
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
initChart() {
|
||||
methods: {
|
||||
getUniqueTimes() {
|
||||
const { edgeCt, temperCt, downCt } = this.barData;
|
||||
// 合并所有包含时间的数组
|
||||
const allTimeEntries = [...(edgeCt || []), ...(temperCt || []), ...(downCt || [])];
|
||||
// 提取时间戳并去重(使用 Set)
|
||||
const uniqueTimes = [...new Set(allTimeEntries.map(item => item.recordTime))];
|
||||
// 按时间戳排序(确保时间顺序正确)
|
||||
return uniqueTimes.sort((a, b) => a - b);
|
||||
},
|
||||
initChart() {
|
||||
const uniqueTimes = this.getUniqueTimes();
|
||||
const _this = this;
|
||||
this.chart.setOption({
|
||||
title: {
|
||||
@@ -124,9 +134,7 @@ export default {
|
||||
},
|
||||
xAxis: {
|
||||
type: 'category',
|
||||
data: this.barData.edgeCt.map((item) => {
|
||||
return parseTime(item.recordTime, '{m}-{d} {h}:{i}');
|
||||
}),
|
||||
data: uniqueTimes.map(time => parseTime(time, '{m}-{d} {h}:{i}')),
|
||||
axisPointer: {
|
||||
type: 'shadow',
|
||||
},
|
||||
@@ -152,44 +160,50 @@ export default {
|
||||
end: 100,
|
||||
},
|
||||
],
|
||||
series: [
|
||||
{
|
||||
name: '磨边节拍',
|
||||
type: 'line',
|
||||
tooltip: {
|
||||
valueFormatter: function (value) {
|
||||
return value + 'pcs/min';
|
||||
},
|
||||
},
|
||||
data: this.barData.edgeCt.map((item) => {
|
||||
return item.ct;
|
||||
}),
|
||||
},
|
||||
{
|
||||
name: '钢化节拍',
|
||||
type: 'line',
|
||||
tooltip: {
|
||||
valueFormatter: function (value) {
|
||||
return value + 'pcs/min';
|
||||
},
|
||||
},
|
||||
data: this.barData.temperCt.map((item) => {
|
||||
return item.ct;
|
||||
}),
|
||||
},
|
||||
{
|
||||
name: '下片节拍',
|
||||
type: 'line',
|
||||
tooltip: {
|
||||
valueFormatter: function (value) {
|
||||
return value + 'pcs/min';
|
||||
},
|
||||
},
|
||||
data: this.barData.downCt.map((item) => {
|
||||
return item.ct;
|
||||
}),
|
||||
},
|
||||
],
|
||||
series: [
|
||||
{
|
||||
name: '磨边节拍',
|
||||
type: 'line',
|
||||
tooltip: {
|
||||
valueFormatter: function (value) {
|
||||
return value + 'pcs/min';
|
||||
},
|
||||
},
|
||||
data: uniqueTimes.map(time => {
|
||||
// 查找当前时间对应的 ct 值,没有则补 null(图表中会显示为断点)
|
||||
const match = this.barData.edgeCt.find(item => item.recordTime === time);
|
||||
return match ? match.ct : 0;
|
||||
})
|
||||
},
|
||||
// 钢化节拍
|
||||
{
|
||||
name: '钢化节拍',
|
||||
type: 'line',
|
||||
tooltip: {
|
||||
valueFormatter: function (value) {
|
||||
return value + 'pcs/min';
|
||||
},
|
||||
},
|
||||
data: uniqueTimes.map(time => {
|
||||
const match = this.barData.temperCt.find(item => item.recordTime === time);
|
||||
return match ? match.ct : 0;
|
||||
})
|
||||
},
|
||||
// 下片节拍
|
||||
{
|
||||
name: '下片节拍',
|
||||
type: 'line',
|
||||
tooltip: {
|
||||
valueFormatter: function (value) {
|
||||
return value + 'pcs/min';
|
||||
},
|
||||
},
|
||||
data: uniqueTimes.map(time => {
|
||||
const match = this.barData.downCt.find(item => item.recordTime === time);
|
||||
return match ? match.ct : 0;
|
||||
})
|
||||
}
|
||||
]
|
||||
});
|
||||
},
|
||||
},
|
||||
|
||||
@@ -119,12 +119,12 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
// 获取数据列表
|
||||
init(lineId, startTime, endTime) {
|
||||
init(lId, startTime, endTime) {
|
||||
this.eqChartData = [];
|
||||
this.time.startTime = startTime;
|
||||
this.time.endTime = endTime;
|
||||
this.dataListLoading = true;
|
||||
getNewCTDet(lineId).then((response) => {
|
||||
getNewCTDet({ lineId: [lId], startTime, endTime }).then((response) => {
|
||||
this.tableData = response.data;
|
||||
this.dataListLoading = false;
|
||||
});
|
||||
|
||||
@@ -183,7 +183,7 @@ export default {
|
||||
// 获取当前时间
|
||||
const now = new Date();
|
||||
// 获取前一天的同一时间
|
||||
const yesterday = new Date(now.getTime() - 24 * 60 * 60 * 1000);
|
||||
const yesterday = new Date(now.getTime());
|
||||
// 设置为00:00:00
|
||||
yesterday.setHours(0, 0, 0, 0);
|
||||
// 设置为23:59:59
|
||||
|
||||
@@ -80,7 +80,7 @@ export default {
|
||||
defaultSelect: [],
|
||||
multiple: true,
|
||||
filterable: true,
|
||||
width: 400,
|
||||
width: 200,
|
||||
},
|
||||
{
|
||||
type: 'datePicker',
|
||||
|
||||
@@ -1,157 +1,104 @@
|
||||
<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>
|
||||
<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="12">
|
||||
<el-form-item label="产品编码" prop="code">
|
||||
<el-input
|
||||
v-model="dataForm.code"
|
||||
clearable
|
||||
:disabled="isdetail"
|
||||
placeholder="请输入产品编码" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="产品名称" prop="name">
|
||||
<el-input
|
||||
v-model="dataForm.name"
|
||||
clearable
|
||||
:disabled="isdetail"
|
||||
placeholder="请输入产品名称" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="产品类型" prop="typeDictValue">
|
||||
<el-select
|
||||
v-model="dataForm.typeDictValue"
|
||||
style="width: 100%"
|
||||
:disabled="isdetail"
|
||||
placeholder="请选择产品类型">
|
||||
<el-option
|
||||
v-for="dict in getDictDatas(DICT_TYPE.PRODUCT_TYPE)"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="单位" prop="unitDictValue">
|
||||
<el-select
|
||||
v-model="dataForm.unitDictValue"
|
||||
style="width: 100%"
|
||||
:disabled="isdetail"
|
||||
placeholder="请选择单位">
|
||||
<el-option
|
||||
v-for="dict in getDictDatas(DICT_TYPE.UNIT_DICT)"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="原片规格" prop="originalSpecifications">
|
||||
<el-input
|
||||
:disabled="isdetail"
|
||||
v-model="dataForm.originalSpecifications"
|
||||
placeholder="请输入原片规格" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="原片单位平方数" prop="originalArea">
|
||||
<el-input
|
||||
:disabled="isdetail"
|
||||
v-model="dataForm.originalArea"
|
||||
placeholder="请输入原片单位平方数" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="深加工规格" prop="specifications">
|
||||
<el-input
|
||||
:disabled="isdetail"
|
||||
v-model="dataForm.specifications"
|
||||
placeholder="请输入深加工规格" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="深加工单位平方数" prop="area">
|
||||
<el-input
|
||||
:disabled="isdetail"
|
||||
v-model="dataForm.area"
|
||||
placeholder="请输入深加工单位平方数" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="24">
|
||||
<el-form-item label="完成单位产品用时" prop="processTime">
|
||||
<el-input
|
||||
:disabled="isdetail"
|
||||
v-model="dataForm.processTime"
|
||||
placeholder="请输入完成单位产品用时" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<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="12">
|
||||
<el-form-item label="产品编码" prop="code">
|
||||
<el-input v-model="dataForm.code" clearable :disabled="isdetail" placeholder="请输入产品编码" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="产品名称" prop="name">
|
||||
<el-input v-model="dataForm.name" clearable :disabled="isdetail" placeholder="请输入产品名称" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="产品类型" prop="typeDictValue">
|
||||
<el-select v-model="dataForm.typeDictValue" style="width: 100%" :disabled="isdetail"
|
||||
placeholder="请选择产品类型">
|
||||
<el-option v-for="dict in getDictDatas(DICT_TYPE.PRODUCT_TYPE)" :key="dict.value" :label="dict.label"
|
||||
:value="dict.value" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="单位" prop="unitDictValue">
|
||||
<el-select v-model="dataForm.unitDictValue" style="width: 100%" :disabled="isdetail"
|
||||
placeholder="请选择单位">
|
||||
<el-option v-for="dict in getDictDatas(DICT_TYPE.UNIT_DICT)" :key="dict.value" :label="dict.label"
|
||||
:value="dict.value" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="原片规格" prop="originalSpecifications">
|
||||
<el-input :disabled="isdetail" v-model="dataForm.originalSpecifications" placeholder="请输入原片规格" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="原片单位平方数" prop="originalArea">
|
||||
<el-input :disabled="isdetail" v-model="dataForm.originalArea" placeholder="请输入原片单位平方数" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="深加工规格" prop="specifications">
|
||||
<el-input :disabled="isdetail" v-model="dataForm.specifications" placeholder="请输入深加工规格" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="深加工单位平方数" prop="area">
|
||||
<el-input :disabled="isdetail" v-model="dataForm.area" placeholder="请输入深加工单位平方数" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="完成单位产品用时" prop="processTime">
|
||||
<el-input :disabled="isdetail" v-model="dataForm.processTime" placeholder="请输入完成单位产品用时" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label=" 加工属性" prop="processType">
|
||||
<el-select v-model="dataForm.processType" clearable style="width: 100%" :disabled="isdetail"
|
||||
placeholder="请选择加工属性">
|
||||
<el-option v-for="dict in processTypeList" :key="dict.id" :label="dict.label"
|
||||
:value="dict.id" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
|
||||
<small-title
|
||||
style="margin: 16px 0; padding-left: 8px"
|
||||
:no-padding="true">
|
||||
产品属性列表
|
||||
</small-title>
|
||||
<small-title style="margin: 16px 0; padding-left: 8px" :no-padding="true">
|
||||
产品属性列表
|
||||
</small-title>
|
||||
|
||||
<div class="attr-list">
|
||||
<base-table
|
||||
:table-props="tableProps"
|
||||
:page="listQuery.pageNo"
|
||||
:limit="listQuery.pageSize"
|
||||
:add-button-show="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="attr-list">
|
||||
<base-table :table-props="tableProps" :page="listQuery.pageNo" :limit="listQuery.pageSize"
|
||||
:add-button-show="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 style="position: absolute; bottom: 24px; right: 24px">
|
||||
<!-- <div style="position: absolute; bottom: 24px; right: 24px">
|
||||
<el-button style="margin-right: 10px" @click="goback()">返回</el-button>
|
||||
<el-button v-if="isdetail" type="primary" @click="goEdit()">
|
||||
编辑
|
||||
@@ -167,22 +114,19 @@
|
||||
</span>
|
||||
</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>
|
||||
<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"
|
||||
:product-id="dataForm.id"
|
||||
@refreshDataList="getList" />
|
||||
</el-drawer>
|
||||
<product-attr-add v-if="addOrUpdateVisible" ref="addOrUpdate" :product-id="dataForm.id"
|
||||
@refreshDataList="getList" />
|
||||
</el-drawer>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
@@ -246,13 +190,31 @@ export default {
|
||||
specifications: '', // 深加工规格
|
||||
unitDictValue: '', // 单位id
|
||||
originalSpecifications: '', // 原片规格
|
||||
originalArea: 0, // 原片单位平方数
|
||||
originalArea: 0, // 原片单位平方数
|
||||
processType:undefined,
|
||||
},
|
||||
listQuery: {
|
||||
pageSize: 10,
|
||||
pageNo: 1,
|
||||
total: 0,
|
||||
},
|
||||
},
|
||||
processTypeList: [
|
||||
{
|
||||
id: '0',
|
||||
label:'压花丝印'
|
||||
},
|
||||
{
|
||||
id: '1',
|
||||
label: '无印打孔'
|
||||
},
|
||||
{
|
||||
id: '2',
|
||||
label: '单层镀膜'
|
||||
}, {
|
||||
id: '3',
|
||||
label: '双层镀膜'
|
||||
}
|
||||
],
|
||||
dataRule: {
|
||||
code: [
|
||||
{
|
||||
|
||||
@@ -6,31 +6,17 @@
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<search-bar
|
||||
:formConfigs="formConfig"
|
||||
ref="searchBarForm"
|
||||
@headBtnClick="buttonClick" />
|
||||
<base-table
|
||||
v-if="showData.length"
|
||||
class="right-aside"
|
||||
v-loading="dataListLoading"
|
||||
:table-props="tableProps"
|
||||
:page="listQuery.pageNo"
|
||||
:limit="listQuery.pageSize"
|
||||
:selectWidth="55"
|
||||
:table-data="showData"
|
||||
@selection-change="selectChange"
|
||||
>
|
||||
</base-table>
|
||||
<div v-else class="no-data-bg"></div>
|
||||
<pagination
|
||||
:limit.sync="listQuery.pageSize"
|
||||
:page.sync="listQuery.pageNo"
|
||||
:total="listQuery.total"
|
||||
@pagination="getDataList"
|
||||
/>
|
||||
<!-- <div v-show="false" ref="pdf">
|
||||
<div class="app-container">
|
||||
|
||||
<search-bar :formConfigs="formConfig" ref="searchBarForm" @headBtnClick="buttonClick" />
|
||||
<base-table v-if="showData.length" class="right-aside" v-loading="dataListLoading" :table-props="tableProps"
|
||||
:page="listQuery.pageNo" :limit="listQuery.pageSize" :selectWidth="55" :table-data="showData"
|
||||
@selection-change="selectChange">
|
||||
</base-table>
|
||||
<div v-else class="no-data-bg"></div>
|
||||
<pagination :limit.sync="listQuery.pageSize" :page.sync="listQuery.pageNo" :total="listQuery.total"
|
||||
@pagination="getDataList" />
|
||||
<!-- <div v-show="false" ref="pdf">
|
||||
<base-table
|
||||
v-loading="dataListLoading"
|
||||
:table-props="tableProps"
|
||||
@@ -39,19 +25,15 @@
|
||||
:table-data="selectedList"
|
||||
/>
|
||||
</div> -->
|
||||
<el-dialog
|
||||
title="提示"
|
||||
:visible.sync="dialogVisible"
|
||||
width="30%"
|
||||
:before-close="handleClose">
|
||||
<el-button type="primary" @click="exportXlsx">xlsx</el-button>
|
||||
<el-button type="success" @click="exportPdf">pdf</el-button>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="dialogVisible = false">取 消</el-button>
|
||||
<el-button type="primary" @click="dialogVisible = false">确 定</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</div>
|
||||
<el-dialog title="提示" :visible.sync="dialogVisible" width="30%" :before-close="handleClose">
|
||||
<el-button type="primary" @click="exportXlsx">xlsx</el-button>
|
||||
<el-button type="success" @click="exportPdf">pdf</el-button>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="dialogVisible = false">取 消</el-button>
|
||||
<el-button type="primary" @click="dialogVisible = false">确 定</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
@@ -203,7 +185,8 @@ export default {
|
||||
}
|
||||
],
|
||||
};
|
||||
},
|
||||
},
|
||||
|
||||
created() {
|
||||
this.getDataList()
|
||||
this.getPdLineList()
|
||||
|
||||
132
src/views/core/monitoring/components/buttonNav.vue
Normal file
@@ -0,0 +1,132 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2024-10-21 08:43:35
|
||||
* @LastEditTime: 2024-10-21 09:10:09
|
||||
* @LastEditors: zhp
|
||||
* @Description: Vue2版本的标签切换组件
|
||||
-->
|
||||
|
||||
<template>
|
||||
<!-- 按钮切换 -->
|
||||
<div v-if="buttonMode" class="button-nav">
|
||||
<button v-for="m in menus" :key="m" :class="{ active: m === currentMenu }" :data-text="m"
|
||||
@click="handleMenuChange(m)"></button>
|
||||
</div>
|
||||
<!-- 标签切换 -->
|
||||
<div v-else class="custom-tabs" style="height: 100%; width: 100%">
|
||||
<el-tabs v-model="currentMenu" class="tag-nav" style="height: 100%">
|
||||
<el-tab-pane v-for="(m, idx) in menus" :key="m" :label="idx == 0 ? `\u2002${m}\u2002` : `\u3000${m}\u3000`"
|
||||
:name="m">
|
||||
<slot :name="`tab${idx + 1}`"></slot>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
props: {
|
||||
menus: {
|
||||
type: Array,
|
||||
required: true,
|
||||
default: () => [],
|
||||
validator(val) {
|
||||
return val.length > 0;
|
||||
}
|
||||
},
|
||||
buttonMode: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
currentMenu: this.menus[0] || ''
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
handleMenuChange(menu) {
|
||||
this.currentMenu = menu;
|
||||
this.$emit('change', menu);
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
currentMenu(val) {
|
||||
this.$emit('change', val);
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
if (this.menus.length > 0) {
|
||||
this.currentMenu = this.menus[0];
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.button-nav {
|
||||
width: 100%;
|
||||
padding: 12px 0;
|
||||
display: flex;
|
||||
gap: 12px;
|
||||
}
|
||||
|
||||
.button-nav * {
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
.button-nav button {
|
||||
cursor: pointer;
|
||||
appearance: none;
|
||||
outline: none;
|
||||
border: none;
|
||||
background: #fff;
|
||||
border-radius: 8px;
|
||||
border-bottom-left-radius: 5px;
|
||||
border-bottom-right-radius: 5px;
|
||||
padding: 20px;
|
||||
color: #888;
|
||||
letter-spacing: 2px;
|
||||
flex: 1;
|
||||
box-sizing: padding-box;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.button-nav button::after {
|
||||
content: attr(data-text);
|
||||
position: absolute;
|
||||
top: 10px;
|
||||
left: 50%;
|
||||
font-size: 18px;
|
||||
font-weight: 500;
|
||||
transform: translate(-50%);
|
||||
}
|
||||
|
||||
.button-nav button.active {
|
||||
color: #111;
|
||||
border-bottom: 4px solid #0b58ff;
|
||||
}
|
||||
|
||||
.custom-tabs /deep/ .el-tabs__header {
|
||||
margin-bottom: 8px;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.custom-tabs /deep/ .el-tabs__item {
|
||||
padding-left: 0px !important;
|
||||
padding-right: 0px !important;
|
||||
line-height: 36px !important;
|
||||
height: 36px;
|
||||
}
|
||||
|
||||
.custom-tabs /deep/ .el-tabs__content {
|
||||
height: calc(100% - 42px);
|
||||
}
|
||||
|
||||
.custom-tabs /deep/ .el-tab-pane {
|
||||
box-sizing: border-box;
|
||||
height: 100%;
|
||||
padding: 20px;
|
||||
border: 10px solid #f002;
|
||||
}
|
||||
</style>
|
||||
@@ -95,7 +95,7 @@ const tableProps = [
|
||||
prop: 'inputN',
|
||||
label: '投入',
|
||||
align: 'center',
|
||||
children: [
|
||||
children: [
|
||||
{
|
||||
prop: 'inputNum',
|
||||
label: '投入数量/片',
|
||||
|
||||
272
src/views/core/monitoring/lineAuto/BarChart.vue
Normal file
@@ -0,0 +1,272 @@
|
||||
<template>
|
||||
<div :class="className" :style="{ height: height, width: width, marginLeft: '10px' }" />
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import * as echarts from 'echarts';
|
||||
require('echarts/theme/macarons'); // 引入主题
|
||||
import resize from '@/utils/chartMixins/resize';
|
||||
|
||||
const animationDuration = 1000;
|
||||
|
||||
export default {
|
||||
mixins: [resize], // 混入 resize 逻辑(自适应窗口)
|
||||
props: {
|
||||
className: {
|
||||
type: String,
|
||||
default: 'chart',
|
||||
},
|
||||
title: {
|
||||
type: String,
|
||||
default: '',
|
||||
},
|
||||
width: {
|
||||
type: String,
|
||||
default: '100%',
|
||||
},
|
||||
height: {
|
||||
type: String,
|
||||
default: '300px',
|
||||
},
|
||||
barData: {
|
||||
type: Array,
|
||||
default: () => [],
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
chart: null, // 图表实例
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
// 监听 barData 变化(深度监听数组内部元素)
|
||||
barData: {
|
||||
deep: true,
|
||||
handler: 'handleBarDataChange', // 调用处理方法
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
// 组件挂载后初始化图表(确保 DOM 已就绪)
|
||||
this.$nextTick(() => {
|
||||
this.initChart();
|
||||
});
|
||||
},
|
||||
beforeDestroy() {
|
||||
// 组件销毁前清理图表实例
|
||||
if (this.chart) {
|
||||
this.chart.dispose();
|
||||
this.chart = null;
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// barData 变化时的处理方法
|
||||
handleBarDataChange() {
|
||||
// 确保 DOM 存在再更新图表
|
||||
this.$nextTick(() => {
|
||||
// 如果图表未初始化,先初始化;否则直接更新数据
|
||||
if (!this.chart) {
|
||||
this.initChart();
|
||||
} else {
|
||||
this.updateChart();
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
// 初始化图表
|
||||
initChart() {
|
||||
// 避免重复初始化(先销毁旧实例)
|
||||
if (this.chart) {
|
||||
this.chart.dispose();
|
||||
}
|
||||
|
||||
// 确保 DOM 元素存在
|
||||
if (!this.$el) {
|
||||
console.error('图表容器 DOM 元素不存在');
|
||||
return;
|
||||
}
|
||||
|
||||
// 初始化图表实例
|
||||
this.chart = echarts.init(this.$el, 'macarons');
|
||||
// 设置图表配置
|
||||
this.setChartOption();
|
||||
},
|
||||
|
||||
// 更新图表数据(复用配置逻辑)
|
||||
updateChart() {
|
||||
if (!this.chart) return;
|
||||
this.setChartOption();
|
||||
},
|
||||
|
||||
// 图表配置项(抽离为单独方法,方便初始化和更新复用)
|
||||
setChartOption() {
|
||||
const dataValues = this.barData.flatMap(item => [item.inputNum || 0, item.outputNum || 0]);
|
||||
const maxData = Math.max(...dataValues, 0); // 加 0 确保无数据时 maxData 为 0
|
||||
|
||||
// 2. 计算 Y 轴最大值(留 10% 余量,避免数据顶到顶部)
|
||||
let yMax = 0;
|
||||
if (maxData > 0) {
|
||||
yMax = Math.ceil(maxData * 1.1); // 向上取整,确保刻度为整数
|
||||
} else {
|
||||
yMax = 100; // 无数据时默认最大值为 100,避免 Y 轴消失
|
||||
}
|
||||
|
||||
// 3. 计算 interval(5 个刻度对应 4 个间隔,向上取整确保间隔为整数)
|
||||
const yInterval = Math.ceil((yMax - 0) / 4); // min 固定为 0,直接减 0
|
||||
|
||||
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: ['#288AFF', '#8EF0AB', '#FFDC94'],
|
||||
tooltip: {
|
||||
trigger: 'axis',
|
||||
axisPointer: {
|
||||
type: 'cross',
|
||||
crossStyle: {
|
||||
color: '#999',
|
||||
},
|
||||
},
|
||||
},
|
||||
legend: {
|
||||
data: ['投入', '产出', '加工成品率'],
|
||||
},
|
||||
grid: {
|
||||
left: 20,
|
||||
right: 30,
|
||||
top:40,
|
||||
bottom: 10,
|
||||
|
||||
containLabel: true,
|
||||
splitArea: {
|
||||
show: false // 关键:关闭网格背景分区(去掉间隔色块)
|
||||
}
|
||||
},
|
||||
xAxis: {
|
||||
type: 'category',
|
||||
data: this.barData.map((item) => item.lineName),
|
||||
axisLine: {
|
||||
lineStyle: {
|
||||
color: 'rgba(0, 0, 0, 0.45)',
|
||||
width: 1 // 轴线宽度(可选,默认 1,可按需调整)
|
||||
}
|
||||
},
|
||||
// 2. 控制 X 轴刻度线颜色(与轴线颜色保持一致,视觉统一)
|
||||
axisTick: {
|
||||
lineStyle: {
|
||||
color: 'rgba(0, 0, 0, 0.45)', // 刻度线颜色,需与轴线颜色匹配
|
||||
width: 1 // 刻度线宽度(可选)
|
||||
},
|
||||
alignWithLabel: true // 可选:让刻度线与文字对齐(避免文字偏移时刻度线错位)
|
||||
},
|
||||
// 3. 控制 X 轴文字颜色(如:深灰色 rgba(0, 0, 0, 0.45))
|
||||
axisLabel: {
|
||||
color: 'rgba(0, 0, 0, 0.45)6', // 文字颜色,可自定义
|
||||
fontSize: 12, // 可选:调整文字大小(默认 12,按需修改)
|
||||
// 可选:文字过长时换行/省略(避免文字重叠,按需开启)
|
||||
formatter: (value) => {
|
||||
// 示例:文字超过 6 个字符时换行(可根据需求调整字符数)
|
||||
if (value.length > 6) {
|
||||
return value.slice(0, 6) + '\n' + value.slice(6);
|
||||
}
|
||||
return value;
|
||||
}
|
||||
},
|
||||
// 原有配置(若需保留可解开注释)
|
||||
// axisPointer: {
|
||||
// type: 'shadow',
|
||||
// }
|
||||
},
|
||||
yAxis: [
|
||||
{
|
||||
type: 'value',
|
||||
name: '投入/产出 片',
|
||||
min: 0, // 最小值固定为 0
|
||||
max: yMax,
|
||||
interval: yInterval,
|
||||
splitArea: {
|
||||
show: false
|
||||
},
|
||||
axisLabel: {
|
||||
formatter: '{value}',
|
||||
color: 'rgba(0, 0, 0, 0.45)'
|
||||
},
|
||||
|
||||
// 可选:修改 Y 轴名称颜色(与文字颜色保持一致)
|
||||
nameTextStyle: {
|
||||
color: 'rgba(0, 0, 0, 0.45)'
|
||||
}
|
||||
},
|
||||
{
|
||||
type: 'value',
|
||||
name: '加工成品率',
|
||||
min: 0,
|
||||
max: 100, // 成品率固定 0-100%
|
||||
interval: 25, // 100 / 4 = 25,刚好 5 个刻度(0、25、50、75、100)
|
||||
axisLabel: {
|
||||
formatter: '{value} %',
|
||||
color: 'rgba(0, 0, 0, 0.45)'
|
||||
},
|
||||
splitArea: {
|
||||
show: false
|
||||
},
|
||||
// 可选:修改 Y 轴名称颜色
|
||||
nameTextStyle: {
|
||||
color: 'rgba(0, 0, 0, 0.45)'
|
||||
}
|
||||
},
|
||||
],
|
||||
series: [
|
||||
{
|
||||
name: '投入',
|
||||
type: 'bar',
|
||||
barWidth: '20',
|
||||
data: this.barData.map((item) => item.inputNum),
|
||||
tooltip: {
|
||||
valueFormatter: (value) => `${value} 片`,
|
||||
},
|
||||
animationDuration,
|
||||
},
|
||||
{
|
||||
name: '产出',
|
||||
type: 'bar',
|
||||
barWidth: '20',
|
||||
data: this.barData.map((item) => item.outputNum),
|
||||
tooltip: {
|
||||
valueFormatter: (value) => `${value} 片`,
|
||||
},
|
||||
animationDuration,
|
||||
},
|
||||
{
|
||||
name: '加工成品率',
|
||||
type: 'line',
|
||||
yAxisIndex: 1,
|
||||
tooltip: {
|
||||
valueFormatter: (value) => `${value} %`,
|
||||
},
|
||||
data: this.barData.map((item) => item.processingRatio),
|
||||
},
|
||||
],
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
361
src/views/core/monitoring/nextClip/hisData.vue
Normal file
@@ -0,0 +1,361 @@
|
||||
<!--
|
||||
* @Author: Do not edit
|
||||
* @Date: 2023-08-29 14:59:29
|
||||
* @LastEditTime: 2024-12-02 13:44:47
|
||||
* @LastEditors: zwq
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<!-- :isFold="true" 控制展开 -->
|
||||
<search-bar
|
||||
:formConfigs="formConfig"
|
||||
ref="searchBarForm"
|
||||
@headBtnClick="buttonClick" />
|
||||
<base-table
|
||||
v-if="showData.length"
|
||||
class="right-aside"
|
||||
v-loading="dataListLoading"
|
||||
:table-props="tableProps"
|
||||
:page="listQuery.pageNo"
|
||||
:limit="listQuery.pageSize"
|
||||
:table-data="showData"
|
||||
>
|
||||
<!-- <method-btn
|
||||
v-if="tableBtn.length"
|
||||
slot="handleBtn"
|
||||
:width="120"
|
||||
label="操作"
|
||||
:method-list="tableBtn"
|
||||
@clickBtn="handleClick" /> -->
|
||||
</base-table>
|
||||
<div v-else class="no-data-bg"></div>
|
||||
<pagination
|
||||
:limit.sync="listQuery.pageSize"
|
||||
:page.sync="listQuery.pageNo"
|
||||
:total="listQuery.total"
|
||||
@pagination="getDataList" />
|
||||
<!-- <el-dialog
|
||||
title="提示"
|
||||
:visible.sync="dialogVisible"
|
||||
width="30%"
|
||||
:before-close="handleClose">
|
||||
<el-button type="primary" @click="exportXlsx">xlsx</el-button>
|
||||
<el-button type="success" @click="exportPdf">pdf</el-button>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="dialogVisible = false">取 消</el-button>
|
||||
<el-button type="primary" @click="dialogVisible = false">确 定</el-button>
|
||||
</span>
|
||||
</el-dialog> -->
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { parseTime } from '../../mixins/code-filter';
|
||||
import { getDownLogHisData, getPdList, getThick } from '@/api/core/monitoring/index'
|
||||
import * as XLSX from 'xlsx'
|
||||
import FileSaver from 'file-saver'
|
||||
import jsPDF from 'jspdf'
|
||||
import html2canvas from 'html2canvas'
|
||||
|
||||
const tableProps = [
|
||||
{
|
||||
prop: 'productionLineName',
|
||||
label: '产线'
|
||||
},
|
||||
{
|
||||
prop: 'eqName',
|
||||
label: '下片机械手编号'
|
||||
},
|
||||
{
|
||||
prop: 'pos',
|
||||
label: '工位编号'
|
||||
},
|
||||
{
|
||||
prop: 'pallet',
|
||||
label: '托数/托'
|
||||
},
|
||||
{
|
||||
prop: 'palletNum',
|
||||
label: '下片托数'
|
||||
},
|
||||
{
|
||||
prop: 'startTime',
|
||||
label: '开始时间',
|
||||
filter: parseTime,
|
||||
width: 160
|
||||
},
|
||||
{
|
||||
prop: 'endTime',
|
||||
label: '结束时间',
|
||||
filter: parseTime,
|
||||
width: 160
|
||||
},
|
||||
{
|
||||
prop: 'outputNum',
|
||||
label: '玻璃长度/mm'
|
||||
},
|
||||
{
|
||||
prop: 'width',
|
||||
label: '玻璃宽度/mm',
|
||||
},
|
||||
{
|
||||
prop: 'thick',
|
||||
label: '玻璃长度/mm'
|
||||
},
|
||||
];
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
urlOptions: {
|
||||
getDataListURL: getDownLogHisData
|
||||
},
|
||||
tableData: [],
|
||||
listQuery: {
|
||||
pageSize: 10,
|
||||
pageNo: 1,
|
||||
total: 1,
|
||||
eqName: undefined,
|
||||
productionLineId: undefined,
|
||||
thick:undefined
|
||||
},
|
||||
exportLoading: false,
|
||||
dataListLoading: false,
|
||||
selectedList: [],
|
||||
dialogVisible: false,
|
||||
addOrEditTitle: '',
|
||||
addOrUpdateVisible: false,
|
||||
tableProps,
|
||||
tableBtn: [
|
||||
{
|
||||
type: 'his',
|
||||
btnName: '历史',
|
||||
},
|
||||
].filter((v) => v),
|
||||
tableData: [],
|
||||
showData: [],
|
||||
fileName: '',
|
||||
formConfig: [
|
||||
{
|
||||
type: 'select',
|
||||
label: '产线',
|
||||
selectOptions: [],
|
||||
param: 'productionLineId'
|
||||
},
|
||||
{
|
||||
type: 'select',
|
||||
label: '玻璃型号',
|
||||
selectOptions: [],
|
||||
param: 'thick'
|
||||
},
|
||||
{
|
||||
type: 'datePicker',
|
||||
label: '统计开始时间',
|
||||
dateType: 'daterange',
|
||||
format: 'yyyy-MM-dd',
|
||||
valueFormat: "yyyy-MM-dd HH:mm:ss",
|
||||
rangeSeparator: '-',
|
||||
startPlaceholder: '开始时间',
|
||||
endPlaceholder: '结束时间',
|
||||
param: 'timeVal',
|
||||
defaultTime: ['00:00:00', '23:59:59'],
|
||||
defaultSelect: []
|
||||
},
|
||||
{
|
||||
type: 'button',
|
||||
btnName: '查询',
|
||||
name: 'search',
|
||||
color: 'primary',
|
||||
},
|
||||
{
|
||||
type: 'separate',
|
||||
},
|
||||
{
|
||||
// type: this.$auth.hasPermi('base:factory:export') ? 'button' : '',
|
||||
type: 'button',
|
||||
btnName: '导出',
|
||||
name: 'export',
|
||||
color: 'warning',
|
||||
}
|
||||
],
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
this.$refs.searchBarForm.formInline.productionLineId = this.$route.query.productionLineId
|
||||
this.$refs.searchBarForm.formInline.thick = this.$route.query.thick
|
||||
this.listQuery.productionLineId = this.$route.query.productionLineId
|
||||
this.listQuery.thick = this.$route.query.thick
|
||||
this.getDataList()
|
||||
this.getPdLineList()
|
||||
console.log('this.$route.query', this.$route.query);
|
||||
|
||||
},
|
||||
methods: {
|
||||
handleClick(val) {
|
||||
this.addOrUpdateVisible = true;
|
||||
this.addOrEditTitle =
|
||||
val.data?.factoryName + '-' + val.data?.lineName + ' 详情';
|
||||
this.$nextTick(() => {
|
||||
this.$refs.eqDetail.init(
|
||||
val.data.lineId,
|
||||
this.listQuery.startTime,
|
||||
this.listQuery.endTime
|
||||
);
|
||||
});
|
||||
},
|
||||
test() {
|
||||
var target = document.getElementsByClassName("right-aside")[0]
|
||||
target.style.background = '#FFFFFF'
|
||||
var that = this
|
||||
setTimeout(() => {
|
||||
html2canvas(target).then(function(canvas) {
|
||||
var contentWidth = canvas.width
|
||||
var contentHeight = canvas.height
|
||||
|
||||
// 一页pdf显示html页面生成的canvas高度
|
||||
var pageHeight = contentHeight / 592.28 * 841.89
|
||||
// 未生成pdf的html页面高度
|
||||
var leftHeight = contentHeight
|
||||
// 页面偏移
|
||||
var position = 0
|
||||
// a4纸的尺寸[595.28,841.89],html页面生成的canvas在pdf中图片的高度
|
||||
var imgWidth = 595.28
|
||||
var imgHeight = 592.28 / contentWidth * contentHeight
|
||||
|
||||
var pageData = canvas.toDataURL('image/jpeg', 1.0)
|
||||
|
||||
console.log('nihc URL', leftHeight, pageHeight)
|
||||
|
||||
var pdf = new jsPDF('', 'pt', 'a4')
|
||||
|
||||
if (leftHeight < pageHeight) {
|
||||
pdf.addImage(pageData, 'JPEG', 0, 20, imgWidth, imgHeight)
|
||||
} else {
|
||||
while(leftHeight > 0) {
|
||||
pdf.addImage(pageData, 'JPEG', 0, position, imgWidth, imgHeight)
|
||||
leftHeight -= pageHeight
|
||||
position -= 841.89
|
||||
// 避免空白页
|
||||
if (leftHeight > 0) {
|
||||
pdf.addPage()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pdf.save(that.fileName + '工段统计.pdf')
|
||||
})
|
||||
}, 300)
|
||||
},
|
||||
exportECL() {
|
||||
let tables = document.querySelector('.el-table').cloneNode(true)
|
||||
const fix = tables.querySelector('.el-table__fixed')
|
||||
const fixRight = tables.querySelector('.el-table__fixed-right')
|
||||
if (fix) {
|
||||
tables.removeChild(tables.querySelector('.el-table__fixed'))
|
||||
}
|
||||
if (fixRight) {
|
||||
tables.removeChild(tables.querySelector('.el-table__fixed-right'))
|
||||
}
|
||||
let exportTable = XLSX.utils.table_to_book(tables)
|
||||
|
||||
var exportTableOut = XLSX.write(exportTable, {
|
||||
bookType: 'xlsx', bookSST: true, type: 'array'
|
||||
})
|
||||
// sheetjs.xlsx为导出表格的标题名称
|
||||
try {
|
||||
FileSaver.saveAs(new Blob([exportTableOut], {
|
||||
type: 'application/octet-stream'
|
||||
}), this.fileName + '工段统计.xlsx')
|
||||
} catch (e) {
|
||||
if (typeof console !== 'undefined') console.log(e, exportTableOut)
|
||||
}
|
||||
return exportTableOut
|
||||
},
|
||||
exportPdf() {
|
||||
this.test()
|
||||
setTimeout(() =>{
|
||||
this.dialogVisible = false
|
||||
this.showData = this.tableData
|
||||
}, 600)
|
||||
|
||||
},
|
||||
exportXlsx() {
|
||||
this.exportECL()
|
||||
this.dialogVisible = false
|
||||
this.showData = this.tableData
|
||||
},
|
||||
handleClose(done) {
|
||||
this.$confirm('确认关闭?')
|
||||
.then(_ => {
|
||||
done();
|
||||
})
|
||||
.catch(_ => {});
|
||||
},
|
||||
getPdLineList() {
|
||||
getPdList().then((res) => {
|
||||
this.formConfig[0].selectOptions = res.data || []
|
||||
})
|
||||
getThick().then((res) => {
|
||||
this.formConfig[1].selectOptions = res.data.map((item) => {
|
||||
return {
|
||||
id: item.thick + 'mm',
|
||||
name: item.thick + 'mm'
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
selectChange(val) {
|
||||
console.log(val)
|
||||
this.selectedList = val
|
||||
},
|
||||
buttonClick(val) {
|
||||
switch (val.btnName) {
|
||||
case 'search':
|
||||
this.listQuery.pageNo = 1;
|
||||
this.listQuery.pageSize = 10;
|
||||
this.listQuery.productId = val.productId ? val.productId : undefined;
|
||||
this.listQuery.startTime = val.timeVal ? val.timeVal[0]: undefined;
|
||||
this.listQuery.endTime = val.timeVal ? val.timeVal[1]: undefined;
|
||||
|
||||
//this.listQuery.reportEndTime = val.timeVal ? [new Date(val.timeVal[1]).getTime()] : undefined;
|
||||
this.getDataList();
|
||||
break;
|
||||
case 'export':
|
||||
this.handleExport();
|
||||
break;
|
||||
default:
|
||||
console.log(val);
|
||||
}
|
||||
},
|
||||
// 获取数据列表
|
||||
getDataList() {
|
||||
this.listQuery.eqName = this.$route.query.eqName
|
||||
this.dataListLoading = true;
|
||||
this.urlOptions.getDataListURL(this.listQuery).then(response => {
|
||||
this.tableData = response.data.list
|
||||
this.showData = this.tableData
|
||||
this.listQuery.total = response.data.total;
|
||||
this.dataListLoading = false;
|
||||
});
|
||||
},
|
||||
// 每页数
|
||||
sizeChangeHandle(val) {
|
||||
this.listQuery.pageSize = val;
|
||||
this.listQuery.pageNo = 1;
|
||||
this.getDataList();
|
||||
},
|
||||
// 当前页
|
||||
currentChangeHandle(val) {
|
||||
this.listQuery.pageNo = val;
|
||||
this.getDataList();
|
||||
},
|
||||
handleExport() {
|
||||
if (this.selectedList.length > 0) {
|
||||
this.showData = this.selectedList
|
||||
}
|
||||
this.dialogVisible = true
|
||||
}
|
||||
},
|
||||
};
|
||||
</script>
|
||||
373
src/views/core/monitoring/nextClip/index.vue
Normal file
@@ -0,0 +1,373 @@
|
||||
<!--
|
||||
* @Author: Do not edit
|
||||
* @Date: 2023-08-29 14:59:29
|
||||
* @LastEditTime: 2024-12-02 13:44:47
|
||||
* @LastEditors: zwq
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<!-- :isFold="true" 控制展开 -->
|
||||
<search-bar
|
||||
:formConfigs="formConfig"
|
||||
ref="searchBarForm"
|
||||
@headBtnClick="buttonClick" />
|
||||
<base-table
|
||||
v-if="showData.length"
|
||||
class="right-aside"
|
||||
v-loading="dataListLoading"
|
||||
:table-props="tableProps"
|
||||
:page="listQuery.pageNo"
|
||||
:limit="listQuery.pageSize"
|
||||
:table-data="showData"
|
||||
>
|
||||
<method-btn
|
||||
v-if="tableBtn.length"
|
||||
slot="handleBtn"
|
||||
:width="120"
|
||||
label="操作"
|
||||
:method-list="tableBtn"
|
||||
@clickBtn="handleClick" />
|
||||
</base-table>
|
||||
<div v-else class="no-data-bg"></div>
|
||||
<pagination
|
||||
:limit.sync="listQuery.pageSize"
|
||||
:page.sync="listQuery.pageNo"
|
||||
:total="listQuery.total"
|
||||
@pagination="getDataList" />
|
||||
<!-- <el-dialog
|
||||
title="提示"
|
||||
:visible.sync="dialogVisible"
|
||||
width="30%"
|
||||
:before-close="handleClose">
|
||||
<el-button type="primary" @click="exportXlsx">xlsx</el-button>
|
||||
<el-button type="success" @click="exportPdf">pdf</el-button>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="dialogVisible = false">取 消</el-button>
|
||||
<el-button type="primary" @click="dialogVisible = false">确 定</el-button>
|
||||
</span>
|
||||
</el-dialog> -->
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { parseTime } from '../../mixins/code-filter';
|
||||
import { getDownLogPage, getPdList, getThick, exportDownLogData } from '@/api/core/monitoring/index'
|
||||
import * as XLSX from 'xlsx'
|
||||
import FileSaver from 'file-saver'
|
||||
import jsPDF from 'jspdf'
|
||||
import html2canvas from 'html2canvas'
|
||||
|
||||
const tableProps = [
|
||||
{
|
||||
prop: 'productionLineName',
|
||||
label: '产线'
|
||||
},
|
||||
{
|
||||
prop: 'eqName',
|
||||
label: '下片机械手编号'
|
||||
},
|
||||
{
|
||||
prop: 'pos',
|
||||
label: '工位编号'
|
||||
},
|
||||
{
|
||||
prop: 'pallet',
|
||||
label: '托数/托'
|
||||
},
|
||||
{
|
||||
prop: 'palletNum',
|
||||
label: '下片托数'
|
||||
},
|
||||
{
|
||||
prop: 'startTime',
|
||||
label: '开始时间',
|
||||
filter: parseTime,
|
||||
width: 160
|
||||
},
|
||||
{
|
||||
prop: 'endTime',
|
||||
label: '结束时间',
|
||||
filter: parseTime,
|
||||
width: 160
|
||||
},
|
||||
{
|
||||
prop: 'outputNum',
|
||||
label: '玻璃长度/mm'
|
||||
},
|
||||
{
|
||||
prop: 'width',
|
||||
label: '玻璃宽度/mm',
|
||||
},
|
||||
{
|
||||
prop: 'thick',
|
||||
label: '玻璃厚度/mm'
|
||||
},
|
||||
];
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
urlOptions: {
|
||||
getDataListURL: getDownLogPage
|
||||
},
|
||||
tableData: [],
|
||||
listQuery: {
|
||||
pageSize: 10,
|
||||
pageNo: 1,
|
||||
total: 1,
|
||||
productionLineId: undefined,
|
||||
thick: undefined,
|
||||
|
||||
},
|
||||
exportLoading: false,
|
||||
dataListLoading: false,
|
||||
selectedList: [],
|
||||
dialogVisible: false,
|
||||
addOrEditTitle: '',
|
||||
addOrUpdateVisible: false,
|
||||
tableProps,
|
||||
tableBtn: [
|
||||
{
|
||||
type: 'his',
|
||||
btnName: '历史',
|
||||
},
|
||||
].filter((v) => v),
|
||||
tableData: [],
|
||||
showData: [],
|
||||
fileName: '',
|
||||
formConfig: [
|
||||
{
|
||||
type: 'select',
|
||||
label: '产线',
|
||||
selectOptions: [],
|
||||
param: 'productionLineId'
|
||||
},
|
||||
{
|
||||
type: 'select',
|
||||
label: '玻璃型号',
|
||||
selectOptions: [],
|
||||
param: 'thick'
|
||||
},
|
||||
{
|
||||
type: 'datePicker',
|
||||
label: '统计开始时间',
|
||||
dateType: 'daterange',
|
||||
format: 'yyyy-MM-dd',
|
||||
valueFormat: "yyyy-MM-dd HH:mm:ss",
|
||||
rangeSeparator: '-',
|
||||
startPlaceholder: '开始时间',
|
||||
endPlaceholder: '结束时间',
|
||||
param: 'timeVal',
|
||||
defaultTime: ['00:00:00', '23:59:59'],
|
||||
defaultSelect: []
|
||||
},
|
||||
{
|
||||
type: 'button',
|
||||
btnName: '查询',
|
||||
name: 'search',
|
||||
color: 'primary',
|
||||
},
|
||||
{
|
||||
type: 'separate',
|
||||
},
|
||||
{
|
||||
// type: this.$auth.hasPermi('base:factory:export') ? 'button' : '',
|
||||
type: 'button',
|
||||
btnName: '导出',
|
||||
name: 'export',
|
||||
color: 'warning',
|
||||
}
|
||||
],
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getDataList()
|
||||
this.getPdLineList()
|
||||
},
|
||||
methods: {
|
||||
handleClick(val) {
|
||||
console.log(val);
|
||||
if (val.type === 'his') {
|
||||
this.$router.push({
|
||||
path: 'nextClipHis',
|
||||
query: {
|
||||
eqName: val.data.eqName,
|
||||
productionLineId: this.listQuery.productionLineId,
|
||||
thick: this.listQuery.thick,
|
||||
},
|
||||
});
|
||||
}
|
||||
// this.addOrUpdateVisible = true;
|
||||
// this.addOrEditTitle =
|
||||
// val.data?.factoryName + '-' + val.data?.lineName + ' 详情';
|
||||
// this.$nextTick(() => {
|
||||
// this.$refs.eqDetail.init(
|
||||
// val.data.lineId,
|
||||
// this.listQuery.startTime,
|
||||
// this.listQuery.endTime
|
||||
// );
|
||||
// });
|
||||
},
|
||||
test() {
|
||||
var target = document.getElementsByClassName("right-aside")[0]
|
||||
target.style.background = '#FFFFFF'
|
||||
var that = this
|
||||
setTimeout(() => {
|
||||
html2canvas(target).then(function(canvas) {
|
||||
var contentWidth = canvas.width
|
||||
var contentHeight = canvas.height
|
||||
|
||||
// 一页pdf显示html页面生成的canvas高度
|
||||
var pageHeight = contentHeight / 592.28 * 841.89
|
||||
// 未生成pdf的html页面高度
|
||||
var leftHeight = contentHeight
|
||||
// 页面偏移
|
||||
var position = 0
|
||||
// a4纸的尺寸[595.28,841.89],html页面生成的canvas在pdf中图片的高度
|
||||
var imgWidth = 595.28
|
||||
var imgHeight = 592.28 / contentWidth * contentHeight
|
||||
|
||||
var pageData = canvas.toDataURL('image/jpeg', 1.0)
|
||||
|
||||
console.log('nihc URL', leftHeight, pageHeight)
|
||||
|
||||
var pdf = new jsPDF('', 'pt', 'a4')
|
||||
|
||||
if (leftHeight < pageHeight) {
|
||||
pdf.addImage(pageData, 'JPEG', 0, 20, imgWidth, imgHeight)
|
||||
} else {
|
||||
while(leftHeight > 0) {
|
||||
pdf.addImage(pageData, 'JPEG', 0, position, imgWidth, imgHeight)
|
||||
leftHeight -= pageHeight
|
||||
position -= 841.89
|
||||
// 避免空白页
|
||||
if (leftHeight > 0) {
|
||||
pdf.addPage()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pdf.save(that.fileName + '工段统计.pdf')
|
||||
})
|
||||
}, 300)
|
||||
},
|
||||
exportECL() {
|
||||
let tables = document.querySelector('.el-table').cloneNode(true)
|
||||
const fix = tables.querySelector('.el-table__fixed')
|
||||
const fixRight = tables.querySelector('.el-table__fixed-right')
|
||||
if (fix) {
|
||||
tables.removeChild(tables.querySelector('.el-table__fixed'))
|
||||
}
|
||||
if (fixRight) {
|
||||
tables.removeChild(tables.querySelector('.el-table__fixed-right'))
|
||||
}
|
||||
let exportTable = XLSX.utils.table_to_book(tables)
|
||||
|
||||
var exportTableOut = XLSX.write(exportTable, {
|
||||
bookType: 'xlsx', bookSST: true, type: 'array'
|
||||
})
|
||||
// sheetjs.xlsx为导出表格的标题名称
|
||||
try {
|
||||
FileSaver.saveAs(new Blob([exportTableOut], {
|
||||
type: 'application/octet-stream'
|
||||
}), this.fileName + '工段统计.xlsx')
|
||||
} catch (e) {
|
||||
if (typeof console !== 'undefined') console.log(e, exportTableOut)
|
||||
}
|
||||
return exportTableOut
|
||||
},
|
||||
exportPdf() {
|
||||
this.test()
|
||||
setTimeout(() =>{
|
||||
this.dialogVisible = false
|
||||
this.showData = this.tableData
|
||||
}, 600)
|
||||
|
||||
},
|
||||
exportXlsx() {
|
||||
this.exportECL()
|
||||
this.dialogVisible = false
|
||||
this.showData = this.tableData
|
||||
},
|
||||
handleClose(done) {
|
||||
this.$confirm('确认关闭?')
|
||||
.then(_ => {
|
||||
done();
|
||||
})
|
||||
.catch(_ => {});
|
||||
},
|
||||
getPdLineList() {
|
||||
getPdList().then((res) => {
|
||||
this.formConfig[0].selectOptions = res.data || []
|
||||
})
|
||||
getThick().then((res) => {
|
||||
this.formConfig[1].selectOptions = res.data.map((item) => {
|
||||
return {
|
||||
id: item.thick + 'mm',
|
||||
name: item.thick + 'mm'
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
selectChange(val) {
|
||||
console.log(val)
|
||||
this.selectedList = val
|
||||
},
|
||||
buttonClick(val) {
|
||||
switch (val.btnName) {
|
||||
case 'search':
|
||||
this.listQuery.pageNo = 1;
|
||||
this.listQuery.pageSize = 10;
|
||||
this.listQuery.productionLineId = val.productionLineId ? val.productionLineId : undefined;
|
||||
this.listQuery.thick = val.thick ? val.thick : undefined;
|
||||
this.listQuery.startTime = val.timeVal ? val.timeVal[0]: undefined;
|
||||
this.listQuery.endTime = val.timeVal ? val.timeVal[1]: undefined;
|
||||
|
||||
//this.listQuery.reportEndTime = val.timeVal ? [new Date(val.timeVal[1]).getTime()] : undefined;
|
||||
this.getDataList();
|
||||
break;
|
||||
case 'export':
|
||||
this.handleExport();
|
||||
break;
|
||||
default:
|
||||
console.log(val);
|
||||
}
|
||||
},
|
||||
// 获取数据列表
|
||||
getDataList() {
|
||||
this.dataListLoading = true;
|
||||
this.urlOptions.getDataListURL(this.listQuery).then(response => {
|
||||
this.tableData = response.data.list
|
||||
this.showData = this.tableData
|
||||
this.listQuery.total = response.data.total;
|
||||
this.dataListLoading = false;
|
||||
});
|
||||
},
|
||||
// 每页数
|
||||
sizeChangeHandle(val) {
|
||||
this.listQuery.pageSize = val;
|
||||
this.listQuery.pageNo = 1;
|
||||
this.getDataList();
|
||||
},
|
||||
// 当前页
|
||||
currentChangeHandle(val) {
|
||||
this.listQuery.pageNo = val;
|
||||
this.getDataList();
|
||||
},
|
||||
handleExport() {
|
||||
// 处理查询参数
|
||||
let params = { ...this.listQuery };
|
||||
params.pageNo = undefined;
|
||||
params.pageSize = undefined;
|
||||
this.$modal.confirm('是否确认导出下片日志?').then(() => {
|
||||
this.exportLoading = true;
|
||||
return exportDownLogData(params);
|
||||
}).then(response => {
|
||||
this.$download.excel(response, '下片日志.xls');
|
||||
this.exportLoading = false;
|
||||
}).catch(() => { });
|
||||
}
|
||||
},
|
||||
};
|
||||
</script>
|
||||
272
src/views/core/monitoring/productAuto/BarChart.vue
Normal file
@@ -0,0 +1,272 @@
|
||||
<template>
|
||||
<div :class="className" :style="{ height: height, width: width, marginLeft: '10px' }" />
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import * as echarts from 'echarts';
|
||||
require('echarts/theme/macarons'); // 引入主题
|
||||
import resize from '@/utils/chartMixins/resize';
|
||||
|
||||
const animationDuration = 1000;
|
||||
|
||||
export default {
|
||||
mixins: [resize], // 混入 resize 逻辑(自适应窗口)
|
||||
props: {
|
||||
className: {
|
||||
type: String,
|
||||
default: 'chart',
|
||||
},
|
||||
title: {
|
||||
type: String,
|
||||
default: '',
|
||||
},
|
||||
width: {
|
||||
type: String,
|
||||
default: '100%',
|
||||
},
|
||||
height: {
|
||||
type: String,
|
||||
default: '300px',
|
||||
},
|
||||
barData: {
|
||||
type: Array,
|
||||
default: () => [],
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
chart: null, // 图表实例
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
// 监听 barData 变化(深度监听数组内部元素)
|
||||
barData: {
|
||||
deep: true,
|
||||
handler: 'handleBarDataChange', // 调用处理方法
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
// 组件挂载后初始化图表(确保 DOM 已就绪)
|
||||
this.$nextTick(() => {
|
||||
this.initChart();
|
||||
});
|
||||
},
|
||||
beforeDestroy() {
|
||||
// 组件销毁前清理图表实例
|
||||
if (this.chart) {
|
||||
this.chart.dispose();
|
||||
this.chart = null;
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// barData 变化时的处理方法
|
||||
handleBarDataChange() {
|
||||
// 确保 DOM 存在再更新图表
|
||||
this.$nextTick(() => {
|
||||
// 如果图表未初始化,先初始化;否则直接更新数据
|
||||
if (!this.chart) {
|
||||
this.initChart();
|
||||
} else {
|
||||
this.updateChart();
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
// 初始化图表
|
||||
initChart() {
|
||||
// 避免重复初始化(先销毁旧实例)
|
||||
if (this.chart) {
|
||||
this.chart.dispose();
|
||||
}
|
||||
|
||||
// 确保 DOM 元素存在
|
||||
if (!this.$el) {
|
||||
console.error('图表容器 DOM 元素不存在');
|
||||
return;
|
||||
}
|
||||
|
||||
// 初始化图表实例
|
||||
this.chart = echarts.init(this.$el, 'macarons');
|
||||
// 设置图表配置
|
||||
this.setChartOption();
|
||||
},
|
||||
|
||||
// 更新图表数据(复用配置逻辑)
|
||||
updateChart() {
|
||||
if (!this.chart) return;
|
||||
this.setChartOption();
|
||||
},
|
||||
|
||||
// 图表配置项(抽离为单独方法,方便初始化和更新复用)
|
||||
setChartOption() {
|
||||
const dataValues = this.barData.flatMap(item => [item.inputNum || 0, item.outputNum || 0]);
|
||||
const maxData = Math.max(...dataValues, 0); // 加 0 确保无数据时 maxData 为 0
|
||||
|
||||
// 2. 计算 Y 轴最大值(留 10% 余量,避免数据顶到顶部)
|
||||
let yMax = 0;
|
||||
if (maxData > 0) {
|
||||
yMax = Math.ceil(maxData * 1.1); // 向上取整,确保刻度为整数
|
||||
} else {
|
||||
yMax = 100; // 无数据时默认最大值为 100,避免 Y 轴消失
|
||||
}
|
||||
|
||||
// 3. 计算 interval(5 个刻度对应 4 个间隔,向上取整确保间隔为整数)
|
||||
const yInterval = Math.ceil((yMax - 0) / 4); // min 固定为 0,直接减 0
|
||||
|
||||
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: ['#288AFF', '#8EF0AB', '#FFDC94'],
|
||||
tooltip: {
|
||||
trigger: 'axis',
|
||||
axisPointer: {
|
||||
type: 'cross',
|
||||
crossStyle: {
|
||||
color: '#999',
|
||||
},
|
||||
},
|
||||
},
|
||||
legend: {
|
||||
data: ['投入', '产出', '加工成品率'],
|
||||
},
|
||||
grid: {
|
||||
left: 20,
|
||||
right: 30,
|
||||
top:40,
|
||||
bottom: 10,
|
||||
|
||||
containLabel: true,
|
||||
splitArea: {
|
||||
show: false // 关键:关闭网格背景分区(去掉间隔色块)
|
||||
}
|
||||
},
|
||||
xAxis: {
|
||||
type: 'category',
|
||||
data: this.barData.map((item) => item.lineName),
|
||||
axisLine: {
|
||||
lineStyle: {
|
||||
color: 'rgba(0, 0, 0, 0.45)',
|
||||
width: 1 // 轴线宽度(可选,默认 1,可按需调整)
|
||||
}
|
||||
},
|
||||
// 2. 控制 X 轴刻度线颜色(与轴线颜色保持一致,视觉统一)
|
||||
axisTick: {
|
||||
lineStyle: {
|
||||
color: 'rgba(0, 0, 0, 0.45)', // 刻度线颜色,需与轴线颜色匹配
|
||||
width: 1 // 刻度线宽度(可选)
|
||||
},
|
||||
alignWithLabel: true // 可选:让刻度线与文字对齐(避免文字偏移时刻度线错位)
|
||||
},
|
||||
// 3. 控制 X 轴文字颜色(如:深灰色 rgba(0, 0, 0, 0.45))
|
||||
axisLabel: {
|
||||
color: 'rgba(0, 0, 0, 0.45)6', // 文字颜色,可自定义
|
||||
fontSize: 12, // 可选:调整文字大小(默认 12,按需修改)
|
||||
// 可选:文字过长时换行/省略(避免文字重叠,按需开启)
|
||||
formatter: (value) => {
|
||||
// 示例:文字超过 6 个字符时换行(可根据需求调整字符数)
|
||||
if (value.length > 6) {
|
||||
return value.slice(0, 6) + '\n' + value.slice(6);
|
||||
}
|
||||
return value;
|
||||
}
|
||||
},
|
||||
// 原有配置(若需保留可解开注释)
|
||||
// axisPointer: {
|
||||
// type: 'shadow',
|
||||
// }
|
||||
},
|
||||
yAxis: [
|
||||
{
|
||||
type: 'value',
|
||||
name: '投入/产出 片',
|
||||
min: 0, // 最小值固定为 0
|
||||
max: yMax,
|
||||
interval: yInterval,
|
||||
splitArea: {
|
||||
show: false
|
||||
},
|
||||
axisLabel: {
|
||||
formatter: '{value}',
|
||||
color: 'rgba(0, 0, 0, 0.45)'
|
||||
},
|
||||
|
||||
// 可选:修改 Y 轴名称颜色(与文字颜色保持一致)
|
||||
nameTextStyle: {
|
||||
color: 'rgba(0, 0, 0, 0.45)'
|
||||
}
|
||||
},
|
||||
{
|
||||
type: 'value',
|
||||
name: '加工成品率',
|
||||
min: 0,
|
||||
max: 100, // 成品率固定 0-100%
|
||||
interval: 25, // 100 / 4 = 25,刚好 5 个刻度(0、25、50、75、100)
|
||||
axisLabel: {
|
||||
formatter: '{value} %',
|
||||
color: 'rgba(0, 0, 0, 0.45)'
|
||||
},
|
||||
splitArea: {
|
||||
show: false
|
||||
},
|
||||
// 可选:修改 Y 轴名称颜色
|
||||
nameTextStyle: {
|
||||
color: 'rgba(0, 0, 0, 0.45)'
|
||||
}
|
||||
},
|
||||
],
|
||||
series: [
|
||||
{
|
||||
name: '投入',
|
||||
type: 'bar',
|
||||
barWidth: '20',
|
||||
data: this.barData.map((item) => item.inputNum),
|
||||
tooltip: {
|
||||
valueFormatter: (value) => `${value} 片`,
|
||||
},
|
||||
animationDuration,
|
||||
},
|
||||
{
|
||||
name: '产出',
|
||||
type: 'bar',
|
||||
barWidth: '20',
|
||||
data: this.barData.map((item) => item.outputNum),
|
||||
tooltip: {
|
||||
valueFormatter: (value) => `${value} 片`,
|
||||
},
|
||||
animationDuration,
|
||||
},
|
||||
{
|
||||
name: '加工成品率',
|
||||
type: 'line',
|
||||
yAxisIndex: 1,
|
||||
tooltip: {
|
||||
valueFormatter: (value) => `${value} %`,
|
||||
},
|
||||
data: this.barData.map((item) => item.processingRatio),
|
||||
},
|
||||
],
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
273
src/views/core/monitoring/productAuto/baseTable.vue
Normal file
@@ -0,0 +1,273 @@
|
||||
<template>
|
||||
<div class="baseTable">
|
||||
<el-table
|
||||
:ref="id"
|
||||
:data="renderData"
|
||||
v-bind="$attrs"
|
||||
:border="cancelBorder ? false : true"
|
||||
@current-change="currentChange"
|
||||
@selection-change="handleSelectionChange"
|
||||
style="width: 100%"
|
||||
:header-cell-style="{
|
||||
background: '#F2F4F9',
|
||||
color: '#606266',
|
||||
}">
|
||||
<!-- 多选 -->
|
||||
<el-table-column
|
||||
v-if="selectWidth"
|
||||
type="selection"
|
||||
:width="selectWidth" />
|
||||
<!-- 序号 -->
|
||||
<el-table-column
|
||||
v-if="page && limit"
|
||||
prop="_pageIndex"
|
||||
:width="pageWidth"
|
||||
align="center"
|
||||
:fixed="cancelPageFixed ? false : true">
|
||||
<template slot="header">
|
||||
<el-popover placement="bottom-start" width="300" trigger="click">
|
||||
<div
|
||||
class="setting-box"
|
||||
style="max-height: 400px; overflow-y: auto">
|
||||
<el-checkbox
|
||||
v-for="(item, index) in tableProps"
|
||||
:key="'cb' + index"
|
||||
v-model="selectedBox[index]"
|
||||
:label="item.label" />
|
||||
</div>
|
||||
<i slot="reference" class="el-icon-s-tools" />
|
||||
</el-popover>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column
|
||||
v-for="item in renderTableHeadList"
|
||||
:key="item.prop"
|
||||
v-bind="item"
|
||||
:label="item.label"
|
||||
:prop="item.prop"
|
||||
:fixed="item.fixed || false"
|
||||
:show-overflow-tooltip="item.showOverflowtooltip || false"
|
||||
:sortable="item.sortable || false">
|
||||
<template slot="header">
|
||||
<span>{{ item.label }}</span>
|
||||
</template>
|
||||
<!-- 多表头 -->
|
||||
<template v-if="item.children">
|
||||
<el-table-column
|
||||
v-for="sub in item.children"
|
||||
:prop="sub.prop"
|
||||
:key="sub.prop"
|
||||
v-bind="sub"
|
||||
:label="sub.label">
|
||||
<template v-if="sub.children">
|
||||
<el-table-column
|
||||
v-for="ssub in sub.children"
|
||||
:prop="ssub.prop"
|
||||
:key="ssub.prop"
|
||||
v-bind="ssub"
|
||||
:label="ssub.label">
|
||||
<template slot-scope="sscopeInner">
|
||||
<component
|
||||
:is="ssub.subcomponent"
|
||||
v-if="ssub.subcomponent"
|
||||
:key="sscopeInner.row.id"
|
||||
:inject-data="{ ...sscopeInner.row, ...ssub }"
|
||||
@emitData="emitData" />
|
||||
<span v-else>
|
||||
{{ sscopeInner.row[ssub.prop] | commonFilter(ssub.filter) }}
|
||||
</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</template>
|
||||
<template slot-scope="scopeInner">
|
||||
<component
|
||||
:is="sub.subcomponent"
|
||||
v-if="sub.subcomponent"
|
||||
:key="scopeInner.row.id"
|
||||
:inject-data="{ ...scopeInner.row, ...sub }"
|
||||
@emitData="emitData" />
|
||||
<span v-else>
|
||||
{{ scopeInner.row[sub.prop] | commonFilter(sub.filter) }}
|
||||
</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</template>
|
||||
<template slot-scope="scope">
|
||||
<component
|
||||
:is="item.subcomponent"
|
||||
v-if="item.subcomponent"
|
||||
:key="scope.row.id"
|
||||
:itemProp="item.prop"
|
||||
:inject-data="{ ...scope.row, ...item }"
|
||||
@emitData="emitData" />
|
||||
<span v-else>
|
||||
{{ scope.row[item.prop] | commonFilter(item.filter) }}
|
||||
</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<slot name="handleBtn" />
|
||||
</el-table>
|
||||
<!-- 表格底部加号 -->
|
||||
<el-button
|
||||
v-if="addButtonShow"
|
||||
class="addButton"
|
||||
icon="el-icon-plus"
|
||||
@click="emitButtonClick">
|
||||
{{ addButtonShow }}
|
||||
</el-button>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'BaseTable',
|
||||
filters: {
|
||||
commonFilter: (source, filterType = (a) => a) => {
|
||||
return filterType(source);
|
||||
},
|
||||
},
|
||||
props: {
|
||||
cancelBorder: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
cancelPageFixed: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
tableData: {
|
||||
type: Array,
|
||||
required: true,
|
||||
default: () => {
|
||||
return [];
|
||||
},
|
||||
},
|
||||
tableProps: {
|
||||
type: Array,
|
||||
default: () => {
|
||||
return [];
|
||||
},
|
||||
},
|
||||
id: {
|
||||
type: String,
|
||||
required: false,
|
||||
default: '',
|
||||
},
|
||||
page: {
|
||||
type: Number,
|
||||
required: false,
|
||||
default: 0,
|
||||
},
|
||||
pageWidth: {
|
||||
type: Number,
|
||||
required: false,
|
||||
default: 70,
|
||||
},
|
||||
limit: {
|
||||
type: Number,
|
||||
required: false,
|
||||
default: 0,
|
||||
},
|
||||
selectWidth: {
|
||||
type: Number,
|
||||
required: false,
|
||||
default: 0,
|
||||
},
|
||||
addButtonShow: {
|
||||
type: String,
|
||||
required: false,
|
||||
default: '',
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
selectedBox: new Array(100).fill(true),
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
renderTableHeadList() {
|
||||
return this.tableProps.filter((item, index) => {
|
||||
return this.selectedBox[index];
|
||||
});
|
||||
},
|
||||
renderData() {
|
||||
return this.tableData.map((item, index) => {
|
||||
return {
|
||||
...item,
|
||||
_pageIndex: (this.page - 1) * this.limit + index + 1,
|
||||
};
|
||||
});
|
||||
},
|
||||
},
|
||||
beforeMount() {
|
||||
this.selectedBox = new Array(100).fill(true);
|
||||
},
|
||||
methods: {
|
||||
currentChange(newVal, oldVal) {
|
||||
this.$emit('current-change', { newVal, oldVal });
|
||||
},
|
||||
handleSelectionChange(val) {
|
||||
this.$emit('selection-change', val);
|
||||
},
|
||||
emitData(val) {
|
||||
this.$emit('emitFun', val);
|
||||
},
|
||||
emitButtonClick() {
|
||||
this.$emit('emitButtonClick');
|
||||
},
|
||||
setCurrent(name, index) {
|
||||
let _this = this;
|
||||
let obj = _this.$refs[name].data[index];
|
||||
_this.$refs[name].setCurrentRow(obj);
|
||||
},
|
||||
doLayout(name) {
|
||||
this.$refs[name].doLayout();
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style scoped>
|
||||
.baseTable .show-col-btn {
|
||||
margin-right: 5px;
|
||||
line-height: inherit;
|
||||
cursor: pointer;
|
||||
}
|
||||
.baseTable .el-icon-refresh {
|
||||
cursor: pointer;
|
||||
}
|
||||
</style>
|
||||
<style>
|
||||
.baseTable .el-table__body tr.current-row > td.el-table__cell {
|
||||
background-color: #eaf1fc;
|
||||
}
|
||||
.baseTable .el-table .el-table__cell {
|
||||
padding: 0;
|
||||
height: 35px;
|
||||
}
|
||||
.baseTable .addButton {
|
||||
width: 100%;
|
||||
height: 35px;
|
||||
border-top: none;
|
||||
color: #0b58ff;
|
||||
border-color: #ebeef5;
|
||||
border-radius: 0;
|
||||
}
|
||||
.baseTable .addButton:hover {
|
||||
color: #0b58ff;
|
||||
border-color: #ebeef5;
|
||||
background-color: #fff;
|
||||
}
|
||||
.baseTable .addButton:focus {
|
||||
border-color: #ebeef5;
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
.el-tooltip__popper.is-dark {
|
||||
background: rgba(0, 0, 0, 0.6) !important;
|
||||
}
|
||||
.el-tooltip__popper .popper__arrow,
|
||||
.el-tooltip__popper .popper__arrow::after {
|
||||
border-top-color: rgba(0, 0, 0, 0.4) !important;
|
||||
}
|
||||
</style>
|
||||
65
src/views/core/monitoring/rawFilmReport/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>
|
||||
221
src/views/core/monitoring/rawFilmReport/add-or-updata.vue
Normal file
@@ -0,0 +1,221 @@
|
||||
<template>
|
||||
<el-dialog :visible.sync="visible" width="40%">
|
||||
<small-title slot="title" :no-padding="true">
|
||||
{{ !dataForm.id ? '新增' : '编辑' }}
|
||||
</small-title>
|
||||
|
||||
<div class="content">
|
||||
<div class="visual-part">
|
||||
<el-form ref="dataForm" :model="dataForm" :rules="dataRule" label-width="100px"
|
||||
@keyup.enter.native="dataFormSubmit">
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="维度" prop="statisticType">
|
||||
<el-select v-model="dataForm.statisticType" style="width: 100%" placeholder="请选择维度">
|
||||
<el-option v-for="item in statisticTypeList" :key="item.id" :label="item.name" :value="item.id" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="厚度" prop="modifyThick">
|
||||
<el-input v-model="dataForm.modifyThick" placeholder="请输入厚度" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="在线速度" prop="modifySpeed">
|
||||
<el-input v-model="dataForm.modifySpeed" placeholder="请输入在线速度" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="宽度" prop="modifyWidth">
|
||||
<el-input v-model="dataForm.modifyWidth" placeholder="请输入宽度" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="拉引量" prop="modifyInArea">
|
||||
<el-input v-model="dataForm.modifyInArea" placeholder="请输入拉引量" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="下片面积" prop="modifyOutArea">
|
||||
<el-input v-model="dataForm.modifyOutArea" placeholder="请输入下片面积" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="良品率" prop="modifyRatio">
|
||||
<el-input v-model="dataForm.modifyRatio" placeholder="请输入良品率" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</div>
|
||||
</div>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button style="" @click="goback()">取消</el-button>
|
||||
<el-button type="primary" @click="dataFormSubmit()">
|
||||
确定
|
||||
</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { editCostOriginRadioHisData } from '@/api/core/monitoring/index'
|
||||
import { parseTime } from '../../mixins/code-filter';
|
||||
import SmallTitle from './SmallTitle';
|
||||
export default {
|
||||
components: { SmallTitle },
|
||||
data() {
|
||||
return {
|
||||
visible: false,
|
||||
addOrUpdateVisible: false,
|
||||
statisticTypeList: [
|
||||
{
|
||||
id: '0',
|
||||
name: '班组'
|
||||
},
|
||||
{
|
||||
id: '1',
|
||||
name: '日'
|
||||
},
|
||||
{
|
||||
id: '2',
|
||||
name: '周'
|
||||
},
|
||||
{
|
||||
id: '3',
|
||||
name: '月'
|
||||
},
|
||||
{
|
||||
id: '4',
|
||||
name: '年'
|
||||
}
|
||||
],
|
||||
dataForm: {
|
||||
id: null,
|
||||
statisticType:undefined,
|
||||
modifyThick: undefined,
|
||||
modifySpeed: undefined,
|
||||
modifyWidth: undefined,
|
||||
modifyInArea: undefined,
|
||||
modifyOutArea: undefined,
|
||||
modifyRatio: undefined,
|
||||
},
|
||||
dataRule: {
|
||||
statisticType: [
|
||||
{
|
||||
required: true,
|
||||
message: '维度不能为空',
|
||||
trigger: 'blur',
|
||||
},
|
||||
// {
|
||||
// type: 'number',
|
||||
// message: '产品编码为数字类型',
|
||||
// trigger: 'blur',
|
||||
// transfom: 'val => Number(val)',
|
||||
// },
|
||||
],
|
||||
},
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
init(data) {
|
||||
console.log(data,'data');
|
||||
|
||||
this.dataForm.id = data.id || null;
|
||||
this.visible = true;
|
||||
this.$nextTick(() => {
|
||||
this.$refs['dataForm'].resetFields();
|
||||
this.dataForm = {
|
||||
id: data.id || null,
|
||||
statisticType: data.statisticType || undefined,
|
||||
modifyThick: data.thick || undefined, // 厚度对应
|
||||
modifySpeed: data.speed || undefined, // 在线速度对应
|
||||
modifyWidth: data.width || undefined, // 掰边宽度对应
|
||||
modifyInArea: data.inArea || undefined, // 拉引量对应
|
||||
modifyOutArea: data.outArea || undefined, // 下片面积对应
|
||||
modifyRatio: data.ratio || undefined, // 良品率对应
|
||||
};
|
||||
});
|
||||
},
|
||||
// 表单提交
|
||||
dataFormSubmit() {
|
||||
this.$refs['dataForm'].validate((valid) => {
|
||||
if (valid) {
|
||||
// 修改的提交
|
||||
if (this.dataForm.id) {
|
||||
editCostOriginRadioHisData(this.dataForm).then((response) => {
|
||||
this.$modal.msgSuccess('修改成功');
|
||||
this.visible = false;
|
||||
this.$emit('refreshDataList');
|
||||
});
|
||||
return;
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
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>
|
||||
281
src/views/core/monitoring/rawFilmReport/index.vue
Normal file
@@ -0,0 +1,281 @@
|
||||
<!--
|
||||
* @Author: Do not edit
|
||||
* @Date: 2023-08-29 14:59:29
|
||||
* @LastEditTime: 2024-12-02 13:44:47
|
||||
* @LastEditors: zwq
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<!-- :isFold="true" 控制展开 -->
|
||||
<search-bar :formConfigs="formConfig" ref="searchBarForm" @headBtnClick="buttonClick" />
|
||||
<base-table v-if="tableData.length" class="right-aside" v-loading="dataListLoading" :table-props="tableProps"
|
||||
:page="listQuery.pageNo" :limit="listQuery.pageSize" :table-data="tableData">
|
||||
<method-btn v-if="tableBtn.length" slot="handleBtn" :width="120" label="操作" :method-list="tableBtn"
|
||||
@clickBtn="handleClick" />
|
||||
</base-table>
|
||||
<div v-else class="no-data-bg"></div>
|
||||
<pagination :limit.sync="listQuery.pageSize" :page.sync="listQuery.pageNo" :total="listQuery.total"
|
||||
@pagination="getDataList" />
|
||||
<!-- <el-dialog
|
||||
title="提示"
|
||||
:visible.sync="dialogVisible"
|
||||
width="30%"
|
||||
:before-close="handleClose">
|
||||
<el-button type="primary" @click="exportXlsx">xlsx</el-button>
|
||||
<el-button type="success" @click="exportPdf">pdf</el-button>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="dialogVisible = false">取 消</el-button>
|
||||
<el-button type="primary" @click="dialogVisible = false">确 定</el-button>
|
||||
</span>
|
||||
</el-dialog> -->
|
||||
<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import AddOrUpdate from './add-or-updata';
|
||||
import { parseTime } from '../../mixins/code-filter';
|
||||
import { getCostOriginRadioHisData, getPdList } from '@/api/core/monitoring/index'
|
||||
import * as XLSX from 'xlsx'
|
||||
import FileSaver from 'file-saver'
|
||||
import jsPDF from 'jspdf'
|
||||
import html2canvas from 'html2canvas'
|
||||
import { exportCostOriginRadioHisData } from '../../../../api/core/monitoring';
|
||||
|
||||
const tableProps = [
|
||||
|
||||
{
|
||||
prop: 'reportType',
|
||||
label: '报表类型'
|
||||
},
|
||||
{
|
||||
prop: 'time',
|
||||
label: '日期',
|
||||
// filter: parseTime,
|
||||
width: 160
|
||||
},
|
||||
{
|
||||
prop: 'bindObjectName',
|
||||
label: '产线'
|
||||
},
|
||||
{
|
||||
prop: 'thick',
|
||||
label: '厚度'
|
||||
},
|
||||
{
|
||||
prop: 'speed',
|
||||
label: '在线速度'
|
||||
},
|
||||
{
|
||||
prop: 'width',
|
||||
label: '掰边宽度'
|
||||
},
|
||||
{
|
||||
prop: 'inArea',
|
||||
label: '拉引量/㎡'
|
||||
},
|
||||
{
|
||||
prop: 'outArea',
|
||||
label: '下片面积/㎡'
|
||||
},
|
||||
{
|
||||
prop: 'ratio',
|
||||
label: '良品率'
|
||||
},
|
||||
];
|
||||
|
||||
export default {
|
||||
components: {
|
||||
AddOrUpdate
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
urlOptions: {
|
||||
getDataListURL: getCostOriginRadioHisData
|
||||
},
|
||||
tableData: [],
|
||||
listQuery: {
|
||||
pageSize: 10,
|
||||
pageNo: 1,
|
||||
total: 1,
|
||||
bindObjectId: undefined,
|
||||
statisticType: undefined,
|
||||
},
|
||||
pdLineList:[],
|
||||
exportLoading: false,
|
||||
dataListLoading: false,
|
||||
selectedList: [],
|
||||
dialogVisible: false,
|
||||
addOrEditTitle: '',
|
||||
addOrUpdateVisible: false,
|
||||
tableProps,
|
||||
tableBtn: [
|
||||
{
|
||||
type: 'edit',
|
||||
btnName: '编辑',
|
||||
},
|
||||
].filter((v) => v),
|
||||
tableData: [],
|
||||
fileName: '',
|
||||
formConfig: [
|
||||
{
|
||||
type: 'select',
|
||||
label: '维度',
|
||||
selectOptions: [
|
||||
{
|
||||
id: '0',
|
||||
name:'班组'
|
||||
},
|
||||
{
|
||||
id: '1',
|
||||
name: '日'
|
||||
},
|
||||
{
|
||||
id: '2',
|
||||
name: '周'
|
||||
},
|
||||
{
|
||||
id: '3',
|
||||
name: '月'
|
||||
},
|
||||
{
|
||||
id: '4',
|
||||
name: '年'
|
||||
}
|
||||
],
|
||||
param: 'statisticType'
|
||||
},
|
||||
{
|
||||
type: 'select',
|
||||
label: '产线',
|
||||
selectOptions: [],
|
||||
param: 'bindObjectId'
|
||||
},
|
||||
|
||||
{
|
||||
type: 'datePicker',
|
||||
label: '统计开始时间',
|
||||
dateType: 'daterange',
|
||||
format: 'yyyy-MM-dd',
|
||||
valueFormat: "yyyy-MM-dd HH:mm:ss",
|
||||
rangeSeparator: '-',
|
||||
startPlaceholder: '开始时间',
|
||||
endPlaceholder: '结束时间',
|
||||
param: 'timeVal',
|
||||
defaultTime: ['00:00:00', '23:59:59'],
|
||||
defaultSelect: []
|
||||
},
|
||||
{
|
||||
type: 'button',
|
||||
btnName: '查询',
|
||||
name: 'search',
|
||||
color: 'primary',
|
||||
},
|
||||
{
|
||||
type: 'separate',
|
||||
},
|
||||
{
|
||||
// type: this.$auth.hasPermi('base:factory:export') ? 'button' : '',
|
||||
type: 'button',
|
||||
btnName: '导出',
|
||||
name: 'export',
|
||||
color: 'warning',
|
||||
}
|
||||
],
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
this.$refs.searchBarForm.formInline.statisticType = '1';
|
||||
this.listQuery.statisticType = '1';
|
||||
this.getDataList()
|
||||
this.getPdLineList()
|
||||
},
|
||||
methods: {
|
||||
handleClick(val) {
|
||||
console.log(val);
|
||||
if (val.type === 'edit') {
|
||||
this.addOrUpdateVisible= true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.addOrUpdate.init(val.data);
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
getPdLineList() {
|
||||
getPdList().then((res) => {
|
||||
this.formConfig[1].selectOptions = res.data || []
|
||||
this.pdLineList = res.data || []; // 保存产线数据
|
||||
})
|
||||
},
|
||||
selectChange(val) {
|
||||
console.log(val)
|
||||
this.selectedList = val
|
||||
},
|
||||
buttonClick(val) {
|
||||
console.log('val', val);
|
||||
|
||||
switch (val.btnName) {
|
||||
case 'search':
|
||||
this.listQuery.pageNo = 1;
|
||||
this.listQuery.pageSize = 10;
|
||||
this.listQuery.bindObjectId = val.bindObjectId ? val.bindObjectId : undefined;
|
||||
this.listQuery.statisticType = val.statisticType ? val.statisticType : undefined;
|
||||
this.listQuery.startTime = val.timeVal ? val.timeVal[0]: undefined;
|
||||
this.listQuery.endTime = val.timeVal ? val.timeVal[1]: undefined;
|
||||
|
||||
//this.listQuery.reportEndTime = val.timeVal ? [new Date(val.timeVal[1]).getTime()] : undefined;
|
||||
this.getDataList();
|
||||
break;
|
||||
case 'export':
|
||||
this.handleExport();
|
||||
break;
|
||||
default:
|
||||
console.log(val);
|
||||
}
|
||||
},
|
||||
// 获取数据列表
|
||||
getDataList() {
|
||||
this.dataListLoading = true;
|
||||
this.urlOptions.getDataListURL(this.listQuery).then(response => {
|
||||
const arr = ['班组','日', '周', '月', '年'];
|
||||
this.tableData = response.data?.list?.map((item) => {
|
||||
item.reportType = arr[this.listQuery.statisticType];
|
||||
item.statisticType = this.listQuery.statisticType
|
||||
|
||||
// 匹配 bindObjectName
|
||||
const targetLine = this.pdLineList.find(line => line.id === item.bindObjectId);
|
||||
item.bindObjectName = targetLine ? targetLine.name : ''; // 赋值名称,无匹配则为空
|
||||
return item;
|
||||
});
|
||||
this.listQuery.total = response.data.total;
|
||||
this.dataListLoading = false;
|
||||
});
|
||||
},
|
||||
// 每页数
|
||||
sizeChangeHandle(val) {
|
||||
this.listQuery.pageSize = val;
|
||||
this.listQuery.pageNo = 1;
|
||||
this.getDataList();
|
||||
},
|
||||
// 当前页
|
||||
currentChangeHandle(val) {
|
||||
this.listQuery.pageNo = val;
|
||||
this.getDataList();
|
||||
},
|
||||
handleExport() {
|
||||
// 处理查询参数
|
||||
let params = { ...this.listQuery };
|
||||
params.pageNo = undefined;
|
||||
params.pageSize = undefined;
|
||||
this.$modal.confirm('是否确认导出原片报表?').then(() => {
|
||||
this.exportLoading = true;
|
||||
return exportCostOriginRadioHisData(params);
|
||||
}).then(response => {
|
||||
this.$download.excel(response, '原片报表.xls');
|
||||
this.exportLoading = false;
|
||||
}).catch(() => { });
|
||||
}
|
||||
},
|
||||
};
|
||||
</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>
|
||||
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div>
|
||||
<div style="background: #f2f4f9; height: 40px; width: 100%">
|
||||
<!-- <div style="background: #f2f4f9; height: 40px; width: 100%">
|
||||
<ButtonNav :menus="['按日期', '按规格']" @change="currentMenu">
|
||||
<template v-slot:tab1>
|
||||
<div>按日期</div>
|
||||
@@ -9,7 +9,7 @@
|
||||
<div>按规格</div>
|
||||
</template>
|
||||
</ButtonNav>
|
||||
</div>
|
||||
</div> -->
|
||||
<div class="app-container energyOverlimitLog">
|
||||
<div v-show="activeName === 'his'">
|
||||
<!-- 搜索工作栏 -->
|
||||
@@ -54,7 +54,7 @@
|
||||
:page.sync="listQuery.pageNo"
|
||||
:limit.sync="listQuery.pageSize"
|
||||
:total="listQuery.total"
|
||||
@pagination="getDataList" />
|
||||
@pagination="getNavDataList" />
|
||||
<base-dialog
|
||||
:dialogTitle="addOrEditTitle"
|
||||
:dialogVisible="addOrUpdateVisible"
|
||||
@@ -86,32 +86,36 @@ import ButtonNav from '@/components/ButtonNav';
|
||||
|
||||
const tableProps = [
|
||||
{
|
||||
prop: 'recTime',
|
||||
prop: 'time',
|
||||
label: '日期',
|
||||
filter: (val) => parseTime(val, '{y}年{m}月{d}日'),
|
||||
},
|
||||
{
|
||||
prop: 'originArea',
|
||||
label: '原片下片面积',
|
||||
filter: (val) => (val != null ? Number(val).toFixed(2) : '-'),
|
||||
},
|
||||
{
|
||||
prop: 'deepArea',
|
||||
label: '深加工下片面积',
|
||||
filter: (val) => (val != null ? Number(val).toFixed(2) : '-'),
|
||||
},
|
||||
{
|
||||
prop: 'originPrice',
|
||||
label: '原片成本/元',
|
||||
align: 'right',
|
||||
filter: (val) => (val != null ? Number(val).toFixed(2) : '-'),
|
||||
},
|
||||
{
|
||||
prop: 'deepPrice',
|
||||
label: '深加工成本/元',
|
||||
align: 'right',
|
||||
filter: (val) => (val != null ? Number(val).toFixed(2) : '-'),
|
||||
},
|
||||
{
|
||||
prop: 'price',
|
||||
label: '总成本/元',
|
||||
align: 'right',
|
||||
filter: (val) => (val != null ? Number(val).toFixed(2) : '-'),
|
||||
},
|
||||
];
|
||||
const tableProps2 = [
|
||||
@@ -244,19 +248,12 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
buttonClick(val) {
|
||||
if (val.statisticType === 2) {
|
||||
this.tableProps[0].filter = (val) =>
|
||||
parseTime(val, '{y}年第{w}周');
|
||||
}else{
|
||||
this.tableProps[0].filter = (val) =>
|
||||
parseTime(val, '{y}年{m}月{d}日');
|
||||
}
|
||||
this.formConfig2[0].startPlaceholder = '开始时间';
|
||||
this.formConfig2[0].endPlaceholder = '结束时间';
|
||||
switch (val.btnName) {
|
||||
case 'search':
|
||||
this.listQuery.pageNo = 1;
|
||||
this.listQuery.pageSize = 10;
|
||||
this.listQuery.pageSize = 20;
|
||||
this.listQuery.bindObjectId = val.name || null;
|
||||
this.listQuery.statisticType = val.statisticType || 1;
|
||||
this.listQuery.startTime = val.searchTime ? val.searchTime[0] : null;
|
||||
@@ -274,7 +271,7 @@ export default {
|
||||
break;
|
||||
case 'export':
|
||||
this.listQuery.pageNo = 1;
|
||||
this.listQuery.pageSize = 10;
|
||||
this.listQuery.pageSize = 20;
|
||||
this.listQuery.bindObjectId = val.name || null;
|
||||
this.listQuery.statisticType = val.statisticType || 1;
|
||||
this.listQuery.startTime = val.searchTime ? val.searchTime[0] : null;
|
||||
@@ -334,12 +331,19 @@ export default {
|
||||
this.otherMethods(val);
|
||||
}
|
||||
},
|
||||
getNavDataList(){
|
||||
if (this.activeName === 'his') {
|
||||
this.getDataList();
|
||||
} else {
|
||||
this.getDataList2();
|
||||
}
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
let exportURL, title;
|
||||
if (this.activeName === 'his') {
|
||||
exportURL = exportCostSumExcel;
|
||||
title = '总成本统计-按日期';
|
||||
title = '总成本统计';
|
||||
} else {
|
||||
exportURL = exportRawStatisticsRealtimeExcel;
|
||||
title = '总成本统计-按规格';
|
||||
|
||||
@@ -77,7 +77,7 @@ export default {
|
||||
switch (val.btnName) {
|
||||
case 'search':
|
||||
this.listQuery.pageNo = 1;
|
||||
this.listQuery.pageSize = 10;
|
||||
this.listQuery.pageSize = 20;
|
||||
this.listQuery.name = val.name||null;
|
||||
this.listQuery.startTime = val.searchTime ? val.searchTime[0] : null;
|
||||
this.listQuery.endTime = val.searchTime
|
||||
@@ -90,7 +90,7 @@ export default {
|
||||
break;
|
||||
case 'export':
|
||||
this.listQuery.pageNo = 1;
|
||||
this.listQuery.pageSize = 10;
|
||||
this.listQuery.pageSize = 20;
|
||||
this.listQuery.name = val.name;
|
||||
this.listQuery.recTime = val.searchTime;
|
||||
this.handleExport();
|
||||
|
||||
@@ -54,7 +54,7 @@
|
||||
:page.sync="listQuery.pageNo"
|
||||
:limit.sync="listQuery.pageSize"
|
||||
:total="listQuery.total"
|
||||
@pagination="getDataList" />
|
||||
@pagination="getNavDataList" />
|
||||
<base-dialog
|
||||
:dialogTitle="addOrEditTitle"
|
||||
:dialogVisible="addOrUpdateVisible"
|
||||
@@ -86,24 +86,27 @@ import ButtonNav from '@/components/ButtonNav';
|
||||
|
||||
const tableProps = [
|
||||
{
|
||||
prop: 'recTime',
|
||||
prop: 'time',
|
||||
label: '日期',
|
||||
filter: (val) => parseTime(val, '{y}年{m}月{d}日'),
|
||||
},
|
||||
{
|
||||
prop: 'remark',
|
||||
label: '备注',
|
||||
},
|
||||
{
|
||||
prop: 'energyTypeName',
|
||||
label: '能源类型',
|
||||
},
|
||||
{
|
||||
prop: 'bindObjectName',
|
||||
label: '监控对象',
|
||||
filter: (val) => (val != null ? val : '--'),
|
||||
},
|
||||
{
|
||||
prop: 'meterName',
|
||||
label: '抄表名',
|
||||
filter: (val) => (val != null ? val : '--'),
|
||||
},
|
||||
// {
|
||||
// prop: 'bindObjectName',
|
||||
// label: '监控对象',
|
||||
// filter: (val) => (val != null ? val : '--'),
|
||||
// },
|
||||
// {
|
||||
// prop: 'meterName',
|
||||
// label: '抄表名',
|
||||
// filter: (val) => (val != null ? val : '--'),
|
||||
// },
|
||||
{
|
||||
prop: 'quantity',
|
||||
label: '累计使用量',
|
||||
@@ -115,20 +118,24 @@ const tableProps = [
|
||||
},
|
||||
];
|
||||
const tableProps2 = [
|
||||
{
|
||||
prop: 'remark',
|
||||
label: '备注',
|
||||
},
|
||||
{
|
||||
prop: 'energyTypeName',
|
||||
label: '能源类型',
|
||||
},
|
||||
{
|
||||
prop: 'bindObjectName',
|
||||
label: '监控对象',
|
||||
filter: (val) => (val != null ? val : '--'),
|
||||
},
|
||||
{
|
||||
prop: 'meter',
|
||||
label: '抄表名',
|
||||
filter: (val) => (val != null ? val : '--'),
|
||||
},
|
||||
// {
|
||||
// prop: 'bindObjectName',
|
||||
// label: '监控对象',
|
||||
// filter: (val) => (val != null ? val : '--'),
|
||||
// },
|
||||
// {
|
||||
// prop: 'meter',
|
||||
// label: '抄表名',
|
||||
// filter: (val) => (val != null ? val : '--'),
|
||||
// },
|
||||
{
|
||||
prop: 'quantity',
|
||||
label: '累计使用量',
|
||||
@@ -207,13 +214,16 @@ export default {
|
||||
{
|
||||
type: 'datePicker',
|
||||
label: '时间范围',
|
||||
dateType: 'daterange',
|
||||
format: 'yyyy-MM-dd',
|
||||
dateType: 'datetimerange',
|
||||
format: 'yyyy-MM-dd HH:mm:ss',
|
||||
valueFormat: 'yyyy-MM-dd HH:mm:ss',
|
||||
rangeSeparator: '-',
|
||||
startPlaceholder: '开始时间',
|
||||
endPlaceholder: '结束时间',
|
||||
defaultTime: ['08:30:00', '08:30:00'],
|
||||
param: 'searchTime',
|
||||
width: 350,
|
||||
clearable: false,
|
||||
},
|
||||
{
|
||||
type: 'button',
|
||||
@@ -262,26 +272,18 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
buttonClick(val) {
|
||||
if (val.statisticType === 2) {
|
||||
this.tableProps[0].filter = (val) =>
|
||||
parseTime(val, '{y}年第{w}周');
|
||||
}else{
|
||||
this.tableProps[0].filter = (val) =>
|
||||
parseTime(val, '{y}年{m}月{d}日');
|
||||
}
|
||||
this.formConfig2[1].startPlaceholder = '开始时间';
|
||||
this.formConfig2[1].endPlaceholder = '结束时间';
|
||||
switch (val.btnName) {
|
||||
case 'search':
|
||||
this.listQuery.pageNo = 1;
|
||||
this.listQuery.pageSize = 10;
|
||||
this.listQuery.pageSize = 20;
|
||||
this.listQuery.energyTypeId = val.name || null;
|
||||
this.listQuery.statisticType = val.statisticType || 1;
|
||||
this.listQuery.startTime = val.searchTime ? val.searchTime[0] : null;
|
||||
this.listQuery.endTime = val.searchTime
|
||||
? val.searchTime[1].substr(0, 10) + ' 23:59:59'
|
||||
: null;
|
||||
this.listQuery.endTime = val.searchTime ? val.searchTime[1] : null;
|
||||
if (this.activeName === 'his') {
|
||||
this.listQuery.endTime = val.searchTime
|
||||
? val.searchTime[1].substr(0, 10) + ' 23:59:59'
|
||||
: null;
|
||||
this.getDataList();
|
||||
} else {
|
||||
this.getDataList2();
|
||||
@@ -292,13 +294,18 @@ export default {
|
||||
break;
|
||||
case 'export':
|
||||
this.listQuery.pageNo = 1;
|
||||
this.listQuery.pageSize = 10;
|
||||
this.listQuery.pageSize = 20;
|
||||
this.listQuery.energyTypeId = val.name || null;
|
||||
this.listQuery.statisticType = val.statisticType || 1;
|
||||
this.listQuery.startTime = val.searchTime ? val.searchTime[0] : null;
|
||||
this.listQuery.endTime = val.searchTime
|
||||
? val.searchTime[1].substr(0, 10) + ' 23:59:59'
|
||||
? val.searchTime[1]
|
||||
: null;
|
||||
if (this.activeName === 'his') {
|
||||
this.listQuery.endTime = val.searchTime
|
||||
? val.searchTime[1].substr(0, 10) + ' 23:59:59'
|
||||
: null;
|
||||
}
|
||||
this.handleExport();
|
||||
break;
|
||||
default:
|
||||
@@ -320,15 +327,26 @@ export default {
|
||||
const end = new Date();
|
||||
const start = new Date();
|
||||
start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
|
||||
this.listQuery.startTime = parseTime(start).substr(0, 10) + ' 00:00:00';
|
||||
this.listQuery.endTime = parseTime(end).substr(0, 10) + ' 23:59:59';
|
||||
this.formConfig2[1].startPlaceholder = parseTime(start).substr(0, 10);
|
||||
this.formConfig2[1].endPlaceholder = parseTime(end).substr(0, 10);
|
||||
this.listQuery.startTime = parseTime(start).substr(0, 10) + ' 08:30:00';
|
||||
this.listQuery.endTime = parseTime(end).substr(0, 10) + ' 08:30:00';
|
||||
this.$nextTick(() => {
|
||||
this.$refs.searchBarForm2.formInline.searchTime = [
|
||||
this.listQuery.startTime,
|
||||
this.listQuery.endTime,
|
||||
];
|
||||
});
|
||||
this.listQuery.name = null;
|
||||
this.listQuery.pageNo = 1;
|
||||
this.getDataList2();
|
||||
}
|
||||
},
|
||||
getNavDataList(){
|
||||
if (this.activeName === 'his') {
|
||||
this.getDataList();
|
||||
} else {
|
||||
this.getDataList2();
|
||||
}
|
||||
},
|
||||
// 获取数据2列表
|
||||
getDataList2() {
|
||||
if (this.listQuery.startTime) {
|
||||
|
||||
@@ -54,7 +54,7 @@
|
||||
:page.sync="listQuery.pageNo"
|
||||
:limit.sync="listQuery.pageSize"
|
||||
:total="listQuery.total"
|
||||
@pagination="getDataList" />
|
||||
@pagination="getNavDataList" />
|
||||
<base-dialog
|
||||
:dialogTitle="addOrEditTitle"
|
||||
:dialogVisible="addOrUpdateVisible"
|
||||
@@ -87,9 +87,12 @@ import ButtonNav from '@/components/ButtonNav';
|
||||
|
||||
const tableProps = [
|
||||
{
|
||||
prop: 'recTime',
|
||||
prop: 'time',
|
||||
label: '日期',
|
||||
filter: (val) => parseTime(val, '{y}年{m}月{d}日'),
|
||||
},
|
||||
{
|
||||
prop: 'remark',
|
||||
label: '备注',
|
||||
},
|
||||
{
|
||||
prop: 'otherCostName',
|
||||
@@ -99,9 +102,14 @@ const tableProps = [
|
||||
prop: 'price',
|
||||
label: '总价(元)',
|
||||
align: 'right',
|
||||
filter: (val) => (val != null ? Number(val).toFixed(2) : '-'),
|
||||
},
|
||||
];
|
||||
const tableProps2 = [
|
||||
// {
|
||||
// prop: 'remark',
|
||||
// label: '备注',
|
||||
// },
|
||||
{
|
||||
prop: 'otherCostName',
|
||||
label: '成本名称',
|
||||
@@ -110,6 +118,7 @@ const tableProps2 = [
|
||||
prop: 'price',
|
||||
label: '总价(元)',
|
||||
align: 'right',
|
||||
filter: (val) => (val != null ? Number(val).toFixed(2) : '-'),
|
||||
},
|
||||
];
|
||||
export default {
|
||||
@@ -182,13 +191,16 @@ export default {
|
||||
{
|
||||
type: 'datePicker',
|
||||
label: '时间范围',
|
||||
dateType: 'daterange',
|
||||
format: 'yyyy-MM-dd',
|
||||
dateType: 'datetimerange',
|
||||
format: 'yyyy-MM-dd HH:mm:ss',
|
||||
valueFormat: 'yyyy-MM-dd HH:mm:ss',
|
||||
rangeSeparator: '-',
|
||||
startPlaceholder: '开始时间',
|
||||
endPlaceholder: '结束时间',
|
||||
defaultTime: ['08:30:00', '08:30:00'],
|
||||
param: 'searchTime',
|
||||
width: 350,
|
||||
clearable: false,
|
||||
},
|
||||
{
|
||||
type: 'button',
|
||||
@@ -237,26 +249,20 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
buttonClick(val) {
|
||||
if (val.statisticType === 2) {
|
||||
this.tableProps[0].filter = (val) =>
|
||||
parseTime(val, '{y}年第{w}周');
|
||||
}else{
|
||||
this.tableProps[0].filter = (val) =>
|
||||
parseTime(val, '{y}年{m}月{d}日');
|
||||
}
|
||||
this.formConfig2[1].startPlaceholder = '开始时间';
|
||||
this.formConfig2[1].endPlaceholder = '结束时间';
|
||||
switch (val.btnName) {
|
||||
case 'search':
|
||||
this.listQuery.pageNo = 1;
|
||||
this.listQuery.pageSize = 10;
|
||||
this.listQuery.pageSize = 20;
|
||||
this.listQuery.name = val.name || null;
|
||||
this.listQuery.statisticType = val.statisticType || 1;
|
||||
this.listQuery.startTime = val.searchTime ? val.searchTime[0] : null;
|
||||
this.listQuery.endTime = val.searchTime
|
||||
? val.searchTime[1].substr(0, 10) + ' 23:59:59'
|
||||
? val.searchTime[1]
|
||||
: null;
|
||||
if (this.activeName === 'his') {
|
||||
this.listQuery.endTime = val.searchTime
|
||||
? val.searchTime[1].substr(0, 10) + ' 23:59:59'
|
||||
: null;
|
||||
this.getDataList();
|
||||
} else {
|
||||
this.getDataList2();
|
||||
@@ -267,13 +273,18 @@ export default {
|
||||
break;
|
||||
case 'export':
|
||||
this.listQuery.pageNo = 1;
|
||||
this.listQuery.pageSize = 10;
|
||||
this.listQuery.pageSize = 20;
|
||||
this.listQuery.name = val.name || null;
|
||||
this.listQuery.statisticType = val.statisticType || 1;
|
||||
this.listQuery.startTime = val.searchTime ? val.searchTime[0] : null;
|
||||
this.listQuery.endTime = val.searchTime
|
||||
? val.searchTime[1].substr(0, 10) + ' 23:59:59'
|
||||
? val.searchTime[1]
|
||||
: null;
|
||||
if (this.activeName === 'his') {
|
||||
this.listQuery.endTime = val.searchTime
|
||||
? val.searchTime[1].substr(0, 10) + ' 23:59:59'
|
||||
: null;
|
||||
}
|
||||
this.handleExport();
|
||||
break;
|
||||
default:
|
||||
@@ -295,15 +306,26 @@ export default {
|
||||
const end = new Date();
|
||||
const start = new Date();
|
||||
start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
|
||||
this.listQuery.startTime = parseTime(start).substr(0, 10) + ' 00:00:00';
|
||||
this.listQuery.endTime = parseTime(end).substr(0, 10) + ' 23:59:59';
|
||||
this.formConfig2[1].startPlaceholder = parseTime(start).substr(0, 10);
|
||||
this.formConfig2[1].endPlaceholder = parseTime(end).substr(0, 10);
|
||||
this.listQuery.startTime = parseTime(start).substr(0, 10) + ' 08:30:00';
|
||||
this.listQuery.endTime = parseTime(end).substr(0, 10) + ' 08:30:00';
|
||||
this.$nextTick(() => {
|
||||
this.$refs.searchBarForm2.formInline.searchTime = [
|
||||
this.listQuery.startTime,
|
||||
this.listQuery.endTime,
|
||||
];
|
||||
});
|
||||
this.listQuery.name = null;
|
||||
this.listQuery.pageNo = 1;
|
||||
this.getDataList2();
|
||||
}
|
||||
},
|
||||
getNavDataList(){
|
||||
if (this.activeName === 'his') {
|
||||
this.getDataList();
|
||||
} else {
|
||||
this.getDataList2();
|
||||
}
|
||||
},
|
||||
// 获取数据2列表
|
||||
getDataList2() {
|
||||
getRawOthercostSunPage(this.listQuery).then((response) => {
|
||||
|
||||
@@ -65,6 +65,7 @@ const tableProps = [
|
||||
prop: 'price',
|
||||
label: '成本金额',
|
||||
align: 'right',
|
||||
filter: (val) => (val != null ? Number(val).toFixed(2) : '-'),
|
||||
},
|
||||
{
|
||||
prop: 'remark',
|
||||
@@ -161,7 +162,7 @@ export default {
|
||||
switch (val.btnName) {
|
||||
case 'search':
|
||||
this.listQuery.pageNo = 1;
|
||||
this.listQuery.pageSize = 10;
|
||||
this.listQuery.pageSize = 20;
|
||||
this.listQuery.name = val.name||null;
|
||||
this.listQuery.startTime = val.searchTime ? val.searchTime[0] : null;
|
||||
this.listQuery.endTime = val.searchTime
|
||||
@@ -174,7 +175,7 @@ export default {
|
||||
break;
|
||||
case 'export':
|
||||
this.listQuery.pageNo = 1;
|
||||
this.listQuery.pageSize = 10;
|
||||
this.listQuery.pageSize = 20;
|
||||
this.listQuery.name = val.name||null;
|
||||
this.listQuery.startTime = val.searchTime ? val.searchTime[0] : null;
|
||||
this.listQuery.endTime = val.searchTime
|
||||
|
||||
@@ -10,9 +10,9 @@
|
||||
<span>
|
||||
{{
|
||||
injectData.type == 1
|
||||
? `每天等价,${injectData.price}元`
|
||||
? `每天等价,${Number(injectData.price)}元`
|
||||
: injectData.type == 2
|
||||
? `总价${injectData.price}元,年折旧率${injectData.ratio}%,折旧年限${injectData.timeLimit}年`
|
||||
? `总价${Number(injectData.price)}元,年折旧率${injectData.ratio}%,折旧年限${injectData.timeLimit}年`
|
||||
: '-'
|
||||
}}
|
||||
</span>
|
||||
|
||||
@@ -52,7 +52,7 @@
|
||||
:page.sync="listQuery.pageNo"
|
||||
:limit.sync="listQuery.pageSize"
|
||||
:total="listQuery.total"
|
||||
@pagination="getDataList" />
|
||||
@pagination="getNavDataList" />
|
||||
<base-dialog
|
||||
:dialogTitle="addOrEditTitle"
|
||||
:dialogVisible="addOrUpdateVisible"
|
||||
@@ -85,9 +85,12 @@ import ButtonNav from '@/components/ButtonNav';
|
||||
|
||||
const tableProps = [
|
||||
{
|
||||
prop: 'recTime',
|
||||
prop: 'time',
|
||||
label: '日期',
|
||||
filter: (val) => parseTime(val, '{y}年{m}月{d}日'),
|
||||
},
|
||||
{
|
||||
prop: 'remark',
|
||||
label: '备注',
|
||||
},
|
||||
{
|
||||
prop: 'productionLineName',
|
||||
@@ -100,22 +103,27 @@ const tableProps = [
|
||||
{
|
||||
prop: 'innum',
|
||||
label: '上片数量',
|
||||
filter: (val) => (val != null ? Number(val).toFixed(2) : '-'),
|
||||
},
|
||||
{
|
||||
prop: 'outnum',
|
||||
label: '下片数量',
|
||||
filter: (val) => (val != null ? Number(val).toFixed(2) : '-'),
|
||||
},
|
||||
{
|
||||
prop: 'ratio',
|
||||
label: '良品率',
|
||||
filter: (val) => (val ? val * 100 + '%' : '-'),
|
||||
filter: (val) => (val ? Number(val * 100).toFixed(2) + '%' : '-'),
|
||||
},
|
||||
];
|
||||
const tableProps2 = [
|
||||
{
|
||||
prop: 'recTime',
|
||||
prop: 'time',
|
||||
label: '日期',
|
||||
filter: (val) => parseTime(val, '{y}年{m}月{d}日'),
|
||||
},
|
||||
{
|
||||
prop: 'remark',
|
||||
label: '备注',
|
||||
},
|
||||
{
|
||||
prop: 'productionLineName',
|
||||
@@ -128,15 +136,17 @@ const tableProps2 = [
|
||||
{
|
||||
prop: 'innum',
|
||||
label: '进片数量',
|
||||
filter: (val) => (val != null ? Number(val).toFixed(2) : '-'),
|
||||
},
|
||||
{
|
||||
prop: 'outnum',
|
||||
label: '出片数量',
|
||||
filter: (val) => (val != null ? Number(val).toFixed(2) : '-'),
|
||||
},
|
||||
{
|
||||
prop: 'ratio',
|
||||
label: '良品率',
|
||||
filter: (val) => (val ? val * 100 + '%' : '-'),
|
||||
filter: (val) => (val ? Number(val * 100).toFixed(2) + '%' : '-'),
|
||||
},
|
||||
];
|
||||
export default {
|
||||
@@ -170,13 +180,15 @@ export default {
|
||||
{
|
||||
type: 'datePicker',
|
||||
label: '时间范围',
|
||||
dateType: 'daterange',
|
||||
format: 'yyyy-MM-dd',
|
||||
dateType: 'datetimerange',
|
||||
format: 'yyyy-MM-dd HH:mm:ss',
|
||||
valueFormat: 'yyyy-MM-dd HH:mm:ss',
|
||||
rangeSeparator: '-',
|
||||
startPlaceholder: '开始时间',
|
||||
endPlaceholder: '结束时间',
|
||||
defaultTime: ['08:30:00', '08:30:00'],
|
||||
param: 'searchTime',
|
||||
width: 350,
|
||||
},
|
||||
{
|
||||
type: 'button',
|
||||
@@ -225,22 +237,15 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
buttonClick(val) {
|
||||
if (val.statisticType === 2) {
|
||||
this.tableProps[0].filter = (val) =>
|
||||
parseTime(val, '{y}年第{w}周');
|
||||
}else{
|
||||
this.tableProps[0].filter = (val) =>
|
||||
parseTime(val, '{y}年{m}月{d}日');
|
||||
}
|
||||
switch (val.btnName) {
|
||||
case 'search':
|
||||
this.listQuery.pageNo = 1;
|
||||
this.listQuery.pageSize = 10;
|
||||
this.listQuery.pageSize = 20;
|
||||
this.listQuery.productionLineId = val.name || null;
|
||||
this.listQuery.statisticType = val.statisticType || 1;
|
||||
this.listQuery.startTime = val.searchTime ? val.searchTime[0] : null;
|
||||
this.listQuery.endTime = val.searchTime
|
||||
? val.searchTime[1].substr(0, 10) + ' 23:59:59'
|
||||
? val.searchTime[1]
|
||||
: null;
|
||||
if (this.activeName === 'his') {
|
||||
this.getDataList();
|
||||
@@ -253,12 +258,12 @@ export default {
|
||||
break;
|
||||
case 'export':
|
||||
this.listQuery.pageNo = 1;
|
||||
this.listQuery.pageSize = 10;
|
||||
this.listQuery.pageSize = 20;
|
||||
this.listQuery.productionLineId = val.name || null;
|
||||
this.listQuery.statisticType = val.statisticType || 1;
|
||||
this.listQuery.startTime = val.searchTime ? val.searchTime[0] : null;
|
||||
this.listQuery.endTime = val.searchTime
|
||||
? val.searchTime[1].substr(0, 10) + ' 23:59:59'
|
||||
? val.searchTime[1]
|
||||
: null;
|
||||
this.handleExport();
|
||||
break;
|
||||
@@ -309,10 +314,20 @@ export default {
|
||||
this.otherMethods(val);
|
||||
}
|
||||
},
|
||||
getNavDataList(){
|
||||
if (this.activeName === 'his') {
|
||||
this.getDataList();
|
||||
} else {
|
||||
this.getDataList2();
|
||||
}
|
||||
},
|
||||
successSubmit() {
|
||||
this.handleCancel();
|
||||
const val = this.activeName === 'his' ? '产线良品率' : 'now';
|
||||
this.currentMenu(val);
|
||||
if (this.activeName === 'his') {
|
||||
this.getDataList();
|
||||
} else {
|
||||
this.getDataList2();
|
||||
}
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
|
||||
@@ -54,7 +54,7 @@
|
||||
:page.sync="listQuery.pageNo"
|
||||
:limit.sync="listQuery.pageSize"
|
||||
:total="listQuery.total"
|
||||
@pagination="getDataList" />
|
||||
@pagination="getNavDataList" />
|
||||
<base-dialog
|
||||
:dialogTitle="addOrEditTitle"
|
||||
:dialogVisible="addOrUpdateVisible"
|
||||
@@ -87,9 +87,12 @@ import ButtonNav from '@/components/ButtonNav';
|
||||
|
||||
const tableProps = [
|
||||
{
|
||||
prop: 'recTime',
|
||||
prop: 'time',
|
||||
label: '时间',
|
||||
filter: (val) => parseTime(val, '{y}年{m}月{d}日'),
|
||||
},
|
||||
{
|
||||
prop: 'remark',
|
||||
label: '备注',
|
||||
},
|
||||
{
|
||||
prop: 'bindObjectName',
|
||||
@@ -102,33 +105,42 @@ const tableProps = [
|
||||
{
|
||||
prop: 'inCount',
|
||||
label: '上片数量',
|
||||
filter: (val) => (val != null ? Number(val).toFixed(2) : '-'),
|
||||
},
|
||||
{
|
||||
prop: 'outCount',
|
||||
label: '下片数量',
|
||||
filter: (val) => (val != null ? Number(val).toFixed(2) : '-'),
|
||||
},
|
||||
{
|
||||
prop: 'ratio',
|
||||
label: '良品率',
|
||||
filter: (val) => (val ? val * 100 + '%' : '-'),
|
||||
filter: (val) => (val ? Number(val * 100).toFixed(2) + '%' : '-'),
|
||||
},
|
||||
{
|
||||
prop: 'costSum',
|
||||
label: '深加工成本/元',
|
||||
align: 'right',
|
||||
filter: (val) => (val != null ? Number(val).toFixed(2) : '-'),
|
||||
},
|
||||
{
|
||||
prop: 'costPiece',
|
||||
label: '单片成本/元',
|
||||
align: 'right',
|
||||
filter: (val) => (val != null ? Number(val).toFixed(2) : '-'),
|
||||
},
|
||||
{
|
||||
prop: 'costArea',
|
||||
label: '每平米成本/元',
|
||||
align: 'right',
|
||||
filter: (val) => (val != null ? Number(val).toFixed(2) : '-'),
|
||||
},
|
||||
];
|
||||
const tableProps2 = [
|
||||
{
|
||||
prop: 'remark',
|
||||
label: '备注',
|
||||
},
|
||||
{
|
||||
prop: 'bindObjectName',
|
||||
label: '产线',
|
||||
@@ -140,30 +152,35 @@ const tableProps2 = [
|
||||
{
|
||||
prop: 'inCount',
|
||||
label: '上片数量',
|
||||
filter: (val) => (val != null ? Number(val).toFixed(2) : '-'),
|
||||
},
|
||||
{
|
||||
prop: 'outCount',
|
||||
label: '下片数量',
|
||||
filter: (val) => (val != null ? Number(val).toFixed(2) : '-'),
|
||||
},
|
||||
{
|
||||
prop: 'ratio',
|
||||
label: '良品率',
|
||||
filter: (val) => (val ? val * 100 + '%' : '-'),
|
||||
filter: (val) => (val ? Number(val * 100).toFixed(2) + '%' : '-'),
|
||||
},
|
||||
{
|
||||
prop: 'costSum',
|
||||
label: '深加工成本/元',
|
||||
align: 'right',
|
||||
filter: (val) => (val != null ? Number(val).toFixed(2) : '-'),
|
||||
},
|
||||
{
|
||||
prop: 'costPiece',
|
||||
label: '单片成本/元',
|
||||
align: 'right',
|
||||
filter: (val) => (val != null ? Number(val).toFixed(2) : '-'),
|
||||
},
|
||||
{
|
||||
prop: 'costArea',
|
||||
label: '每平米成本/元',
|
||||
align: 'right',
|
||||
filter: (val) => (val != null ? Number(val).toFixed(2) : '-'),
|
||||
},
|
||||
];
|
||||
export default {
|
||||
@@ -225,13 +242,16 @@ export default {
|
||||
{
|
||||
type: 'datePicker',
|
||||
label: '时间范围',
|
||||
dateType: 'daterange',
|
||||
format: 'yyyy-MM-dd',
|
||||
dateType: 'datetimerange',
|
||||
format: 'yyyy-MM-dd HH:mm:ss',
|
||||
valueFormat: 'yyyy-MM-dd HH:mm:ss',
|
||||
rangeSeparator: '-',
|
||||
startPlaceholder: '开始时间',
|
||||
endPlaceholder: '结束时间',
|
||||
defaultTime: ['08:30:00', '08:30:00'],
|
||||
param: 'searchTime',
|
||||
width: 350,
|
||||
clearable: false,
|
||||
},
|
||||
{
|
||||
type: 'select',
|
||||
@@ -288,26 +308,20 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
buttonClick(val) {
|
||||
if (val.statisticType === 2) {
|
||||
this.tableProps[0].filter = (val) =>
|
||||
parseTime(val, '{y}年第{w}周');
|
||||
}else{
|
||||
this.tableProps[0].filter = (val) =>
|
||||
parseTime(val, '{y}年{m}月{d}日');
|
||||
}
|
||||
this.formConfig2[0].startPlaceholder = '开始时间';
|
||||
this.formConfig2[0].endPlaceholder = '结束时间';
|
||||
switch (val.btnName) {
|
||||
case 'search':
|
||||
this.listQuery.pageNo = 1;
|
||||
this.listQuery.pageSize = 10;
|
||||
this.listQuery.pageSize = 20;
|
||||
this.listQuery.bindObjectId = val.name || null;
|
||||
this.listQuery.statisticType = val.statisticType || 1;
|
||||
this.listQuery.startTime = val.searchTime ? val.searchTime[0] : null;
|
||||
this.listQuery.endTime = val.searchTime
|
||||
? val.searchTime[1].substr(0, 10) + ' 23:59:59'
|
||||
? val.searchTime[1]
|
||||
: null;
|
||||
if (this.activeName === 'his') {
|
||||
this.listQuery.endTime = val.searchTime
|
||||
? val.searchTime[1].substr(0, 10) + ' 23:59:59'
|
||||
: null;
|
||||
this.getDataList();
|
||||
} else {
|
||||
this.getDataList2();
|
||||
@@ -318,13 +332,18 @@ export default {
|
||||
break;
|
||||
case 'export':
|
||||
this.listQuery.pageNo = 1;
|
||||
this.listQuery.pageSize = 10;
|
||||
this.listQuery.pageSize = 20;
|
||||
this.listQuery.bindObjectId = val.name || null;
|
||||
this.listQuery.statisticType = val.statisticType || 1;
|
||||
this.listQuery.startTime = val.searchTime ? val.searchTime[0] : null;
|
||||
this.listQuery.endTime = val.searchTime
|
||||
? val.searchTime[1].substr(0, 10) + ' 23:59:59'
|
||||
? val.searchTime[1]
|
||||
: null;
|
||||
if (this.activeName === 'his') {
|
||||
this.listQuery.endTime = val.searchTime
|
||||
? val.searchTime[1].substr(0, 10) + ' 23:59:59'
|
||||
: null;
|
||||
}
|
||||
this.handleExport();
|
||||
break;
|
||||
default:
|
||||
@@ -346,15 +365,26 @@ export default {
|
||||
const end = new Date();
|
||||
const start = new Date();
|
||||
start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
|
||||
this.listQuery.startTime = parseTime(start).substr(0, 10) + ' 00:00:00';
|
||||
this.listQuery.endTime = parseTime(end).substr(0, 10) + ' 23:59:59';
|
||||
this.formConfig2[0].startPlaceholder = parseTime(start).substr(0, 10);
|
||||
this.formConfig2[0].endPlaceholder = parseTime(end).substr(0, 10);
|
||||
this.listQuery.startTime = parseTime(start).substr(0, 10) + ' 08:30:00';
|
||||
this.listQuery.endTime = parseTime(end).substr(0, 10) + ' 08:30:00';
|
||||
this.$nextTick(() => {
|
||||
this.$refs.searchBarForm2.formInline.searchTime = [
|
||||
this.listQuery.startTime,
|
||||
this.listQuery.endTime,
|
||||
];
|
||||
});
|
||||
this.listQuery.name = null;
|
||||
this.listQuery.pageNo = 1;
|
||||
this.getDataList2();
|
||||
}
|
||||
},
|
||||
getNavDataList(){
|
||||
if (this.activeName === 'his') {
|
||||
this.getDataList();
|
||||
} else {
|
||||
this.getDataList2();
|
||||
}
|
||||
},
|
||||
// 获取数据2列表
|
||||
getDataList2() {
|
||||
if (this.listQuery.startTime) {
|
||||
|
||||