Compare commits
37 Commits
projects/q
...
projects/s
| Author | SHA1 | Date | |
|---|---|---|---|
| 8ceecde31a | |||
| 015d7c4266 | |||
| bfd8e04780 | |||
| 471245d5b6 | |||
| 8226b45a03 | |||
| dde04cf93f | |||
| 63a67e58de | |||
| 48e9f70625 | |||
| f5f250cb16 | |||
| b6241fe7c4 | |||
| 94edd04a08 | |||
| b926559a7d | |||
| b2984ed4cf | |||
|
|
4ade2dfcdc | ||
|
|
852a3f17a0 | ||
| cba14b1f61 | |||
|
|
33c00785df | ||
|
|
d8acff21e3 | ||
|
|
c0a38c568f | ||
| be86cbd9b3 | |||
| 6a8a9ed28d | |||
| a2213f4f7e | |||
| 0e1e813dc2 | |||
| c9c8f82910 | |||
| d859ba62c8 | |||
| 31bafae4aa | |||
| 67b6b88863 | |||
|
|
9f3cdcb1c4 | ||
|
|
f11dfe04d5 | ||
| 428a0752eb | |||
| 4e801873b9 | |||
|
|
463706663a | ||
|
|
e8638687b1 | ||
| 6c46083d4a | |||
| ab486dd71b | |||
| 4da1e6f0b1 | |||
| 0b689b5452 |
8
.env.dev
@@ -9,11 +9,13 @@
|
|||||||
ENV = 'development'
|
ENV = 'development'
|
||||||
|
|
||||||
# 页面标题
|
# 页面标题
|
||||||
VUE_APP_TITLE = 智能监控分析系统
|
VUE_APP_TITLE = 上上电缆
|
||||||
|
|
||||||
# 芋道管理系统/开发环境
|
# 芋道管理系统/开发环境
|
||||||
# VUE_APP_BASE_API = 'http://192.168.8.22:48080'
|
|
||||||
VUE_APP_BASE_API = 'http://172.16.32.40:48080'
|
# VUE_APP_BASE_API = 'http://192.168.0.31:48080'
|
||||||
|
VUE_APP_BASE_API = 'http://172.16.32.236:48080'
|
||||||
|
# VUE_APP_BASE_API = 'http://line.kszny.picaiba.com'
|
||||||
|
|
||||||
# 路由懒加载
|
# 路由懒加载
|
||||||
VUE_CLI_BABEL_TRANSPILE_MODULES = true
|
VUE_CLI_BABEL_TRANSPILE_MODULES = true
|
||||||
|
|||||||
@@ -2,14 +2,14 @@
|
|||||||
# @Author: zwq
|
# @Author: zwq
|
||||||
# @Date: 2024-03-27 15:49:55
|
# @Date: 2024-03-27 15:49:55
|
||||||
# @LastEditors: zwq
|
# @LastEditors: zwq
|
||||||
# @LastEditTime: 2024-10-30 11:08:47
|
# @LastEditTime: 2025-10-31 09:58:40
|
||||||
# @Description:
|
# @Description:
|
||||||
###
|
###
|
||||||
# 生产环境配置
|
# 生产环境配置
|
||||||
ENV = 'production'
|
ENV = 'production'
|
||||||
|
|
||||||
# 页面标题
|
# 页面标题
|
||||||
VUE_APP_TITLE = 智能监控分析系统
|
VUE_APP_TITLE = 上上电缆
|
||||||
|
|
||||||
# 芋道管理系统/生产环境
|
# 芋道管理系统/生产环境
|
||||||
# VUE_APP_BASE_API = '/prod-api'
|
# VUE_APP_BASE_API = '/prod-api'
|
||||||
|
|||||||
@@ -42,16 +42,18 @@
|
|||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@babel/parser": "7.18.4",
|
"@babel/parser": "7.18.4",
|
||||||
|
"@jiaminghi/data-view": "^2.10.0",
|
||||||
"@riophae/vue-treeselect": "0.4.0",
|
"@riophae/vue-treeselect": "0.4.0",
|
||||||
"axios": "0.27.2",
|
"axios": "0.27.2",
|
||||||
"benz-amr-recorder": "^1.1.5",
|
|
||||||
"bpmn-js-token-simulation": "0.10.0",
|
"bpmn-js-token-simulation": "0.10.0",
|
||||||
|
"chinese-lunar": "^0.1.4",
|
||||||
"clipboard": "2.0.8",
|
"clipboard": "2.0.8",
|
||||||
"code-brick-zj": "^1.0.2",
|
"code-brick-zj": "^1.0.2",
|
||||||
"core-js": "^3.26.0",
|
"core-js": "^3.26.0",
|
||||||
"crypto-js": "^4.0.0",
|
"crypto-js": "^4.0.0",
|
||||||
"diagram-js": "^12.3.0",
|
"diagram-js": "^12.3.0",
|
||||||
"echarts": "5.4.0",
|
"echarts": "5.4.0",
|
||||||
|
"el-tree-transfer": "^2.4.7",
|
||||||
"element-ui": "2.15.12",
|
"element-ui": "2.15.12",
|
||||||
"file-saver": "^2.0.5",
|
"file-saver": "^2.0.5",
|
||||||
"fuse.js": "6.6.2",
|
"fuse.js": "6.6.2",
|
||||||
|
|||||||
49
src/api/areavisual/lane.js
Normal file
@@ -0,0 +1,49 @@
|
|||||||
|
/*
|
||||||
|
* @Author: zwq
|
||||||
|
* @Date: 2025-11-17 09:25:12
|
||||||
|
* @LastEditors: zwq
|
||||||
|
* @LastEditTime: 2026-01-14 13:53:22
|
||||||
|
* @Description:
|
||||||
|
*/
|
||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
|
||||||
|
// 获得巷道分页
|
||||||
|
export function getLanePage(query) {
|
||||||
|
return request({
|
||||||
|
url: '/wms/lane/page',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 获得巷道
|
||||||
|
export function getLane(id) {
|
||||||
|
return request({
|
||||||
|
url: '/wms/lane/get?id=' + id,
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 删除巷道
|
||||||
|
export function deleteLane(id) {
|
||||||
|
return request({
|
||||||
|
url: '/wms/lane/delete?id=' + id,
|
||||||
|
method: 'delete'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 更新
|
||||||
|
export function updateLane(data) {
|
||||||
|
return request({
|
||||||
|
url: '/wms/lane/update',
|
||||||
|
method: 'put',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 创建
|
||||||
|
export function createLane(data) {
|
||||||
|
return request({
|
||||||
|
url: '/wms/lane/create',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
74
src/api/areavisual/lineEdgeLibrary.js
Normal file
@@ -0,0 +1,74 @@
|
|||||||
|
/*
|
||||||
|
* @Author: zwq
|
||||||
|
* @Date: 2025-11-17 09:25:12
|
||||||
|
* @LastEditors: zwq
|
||||||
|
* @LastEditTime: 2026-01-23 13:42:52
|
||||||
|
* @Description:
|
||||||
|
*/
|
||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
|
||||||
|
// 获得线边库分页
|
||||||
|
export function getLineEdgeLibraryPage(query) {
|
||||||
|
return request({
|
||||||
|
url: '/wms/line-edge-library/page',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 获得线边库
|
||||||
|
export function getLineEdgeLibrary(id) {
|
||||||
|
return request({
|
||||||
|
url: '/wms/line-edge-library/get?id=' + id,
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 删除线边库
|
||||||
|
export function deleteLineEdgeLibrary(id) {
|
||||||
|
return request({
|
||||||
|
url: '/wms/line-edge-library/delete?id=' + id,
|
||||||
|
method: 'delete'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 更新
|
||||||
|
export function updateLineEdgeLibrary(data) {
|
||||||
|
return request({
|
||||||
|
url: '/wms/line-edge-library/update',
|
||||||
|
method: 'put',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 更新线边库实时pc --一键清空
|
||||||
|
export function AllQKLineEdgeLibrary(data) {
|
||||||
|
return request({
|
||||||
|
url: '/wms/line-edge-library/lane/cancel/pc',
|
||||||
|
method: 'put',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 更新线边库实时pc --清空操作
|
||||||
|
export function QKLineEdgeLibrary(data) {
|
||||||
|
return request({
|
||||||
|
url: '/wms/line-edge-library/update/pc',
|
||||||
|
method: 'put',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 创建
|
||||||
|
export function createLineEdgeLibrary(data) {
|
||||||
|
return request({
|
||||||
|
url: '/wms/line-edge-library/create',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获得设备分页
|
||||||
|
export function getEquipmentPage(query) {
|
||||||
|
return request({
|
||||||
|
url: '/wms/equipment/page',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
79
src/api/areavisual/overview.js
Normal file
@@ -0,0 +1,79 @@
|
|||||||
|
/*
|
||||||
|
* @Author: zwq
|
||||||
|
* @Date: 2026-01-06 15:18:38
|
||||||
|
* @LastEditors: zwq
|
||||||
|
* @LastEditTime: 2026-01-15 15:02:04
|
||||||
|
* @Description:
|
||||||
|
*/
|
||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
// 获取区域列表
|
||||||
|
export function getAreaList(params) {
|
||||||
|
return request({
|
||||||
|
url: '/wms/region/page',
|
||||||
|
method: 'get',
|
||||||
|
params
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获取区域空满数量
|
||||||
|
export function postAllAreaInfo(data) {
|
||||||
|
return request({
|
||||||
|
url: '/wms/region/lsit/count',
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获取指定库区库位信息
|
||||||
|
export function postAreaInfo(params) {
|
||||||
|
return request({
|
||||||
|
url: '/wms/line-edge-library/list/region',
|
||||||
|
method: 'get',
|
||||||
|
params
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获取区域总览
|
||||||
|
export function postAllAreaOverview(data) {
|
||||||
|
return request({
|
||||||
|
url: '/wms/line-edge-library/line/count',
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 删除能源实时数据库plc相关
|
||||||
|
export function deleteEnergyPlc(id) {
|
||||||
|
return request({
|
||||||
|
url: '/base/energy-plc/delete?id=' + id,
|
||||||
|
method: 'delete'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获取关联表编码
|
||||||
|
export function getCode() {
|
||||||
|
return request({
|
||||||
|
url: '/base/energy-plc/getCode',
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获得能源实时数据库plc相关分页
|
||||||
|
export function getEnergyPlcPage(data) {
|
||||||
|
return request({
|
||||||
|
url: '/base/energy-plc/page',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 导出能源实时数据库plc相关 Excel
|
||||||
|
export function exportEnergyPlcExcel(query) {
|
||||||
|
return request({
|
||||||
|
url: '/base/energy-plc/export-excel',
|
||||||
|
method: 'get',
|
||||||
|
params: query,
|
||||||
|
responseType: 'blob'
|
||||||
|
})
|
||||||
|
}
|
||||||
63
src/api/areavisual/record.js
Normal file
@@ -0,0 +1,63 @@
|
|||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
// 获取出入库历史任务分页
|
||||||
|
export function getRecordPage(params) {
|
||||||
|
return request({
|
||||||
|
url: '/wms/job-main-task-history/page',
|
||||||
|
method: 'get',
|
||||||
|
params
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获取巷道列表
|
||||||
|
export function getLaneList(params) {
|
||||||
|
return request({
|
||||||
|
url: '/wms/lane/page',
|
||||||
|
method: 'get',
|
||||||
|
params
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 更新能源实时数据库plc相关
|
||||||
|
export function updateEnergyPlc(data) {
|
||||||
|
return request({
|
||||||
|
url: '/base/energy-plc/update',
|
||||||
|
method: 'put',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 删除能源实时数据库plc相关
|
||||||
|
export function deleteEnergyPlc(id) {
|
||||||
|
return request({
|
||||||
|
url: '/base/energy-plc/delete?id=' + id,
|
||||||
|
method: 'delete'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获取关联表编码
|
||||||
|
export function getCode() {
|
||||||
|
return request({
|
||||||
|
url: '/base/energy-plc/getCode',
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获得能源实时数据库plc相关分页
|
||||||
|
export function getEnergyPlcPage(data) {
|
||||||
|
return request({
|
||||||
|
url: '/base/energy-plc/page',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 导出能源实时数据库plc相关 Excel
|
||||||
|
export function exportEnergyPlcExcel(query) {
|
||||||
|
return request({
|
||||||
|
url: '/base/energy-plc/export-excel',
|
||||||
|
method: 'get',
|
||||||
|
params: query,
|
||||||
|
responseType: 'blob'
|
||||||
|
})
|
||||||
|
}
|
||||||
49
src/api/areavisual/region.js
Normal file
@@ -0,0 +1,49 @@
|
|||||||
|
/*
|
||||||
|
* @Author: zwq
|
||||||
|
* @Date: 2025-11-17 09:25:12
|
||||||
|
* @LastEditors: zwq
|
||||||
|
* @LastEditTime: 2026-01-14 13:35:11
|
||||||
|
* @Description:
|
||||||
|
*/
|
||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
|
||||||
|
// 获得区域分页
|
||||||
|
export function getRegionPage(query) {
|
||||||
|
return request({
|
||||||
|
url: '/wms/region/page',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 获得区域
|
||||||
|
export function getRegion(id) {
|
||||||
|
return request({
|
||||||
|
url: '/wms/region/get?id=' + id,
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 删除区域
|
||||||
|
export function deleteRegion(id) {
|
||||||
|
return request({
|
||||||
|
url: '/wms/region/delete?id=' + id,
|
||||||
|
method: 'delete'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 更新
|
||||||
|
export function updateRegion(data) {
|
||||||
|
return request({
|
||||||
|
url: '/wms/region/update',
|
||||||
|
method: 'put',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 创建
|
||||||
|
export function createRegion(data) {
|
||||||
|
return request({
|
||||||
|
url: '/wms/region/create',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
@@ -25,10 +25,10 @@ export function getCT(data) {
|
|||||||
// 获取产线平衡分析数据(new)
|
// 获取产线平衡分析数据(new)
|
||||||
export function getNewCTNow(data) {
|
export function getNewCTNow(data) {
|
||||||
return request({
|
return request({
|
||||||
url: '/analysis/production-analysis/getNewCTNow',
|
url: '/analysis/production-analysis/getNewCTNow',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: data
|
data: data,
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
// 获取产线平衡分析数据趋势图(new)
|
// 获取产线平衡分析数据趋势图(new)
|
||||||
export function getNewCTCharts(data) {
|
export function getNewCTCharts(data) {
|
||||||
@@ -39,9 +39,10 @@ export function getNewCTCharts(data) {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
// 获取产线平衡分析数据设备list(new)
|
// 获取产线平衡分析数据设备list(new)
|
||||||
export function getNewCTDet(id) {
|
export function getNewCTDet(data) {
|
||||||
return request({
|
return request({
|
||||||
url: '/analysis/production-analysis/getNewCTDet?lineId='+id,
|
url: '/analysis/production-analysis/getNewCTDet',
|
||||||
method: 'get',
|
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) {
|
export function getTeamReportPage(data) {
|
||||||
return request({
|
return request({
|
||||||
@@ -57,3 +67,29 @@ export function getTeamReportPageDet(id) {
|
|||||||
method: 'get',
|
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
|
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',
|
||||||
|
})
|
||||||
|
}
|
||||||
162
src/api/ssdl/product&recipe.js
Normal file
@@ -0,0 +1,162 @@
|
|||||||
|
/*
|
||||||
|
* @Author: zwq
|
||||||
|
* @Date: 2025-11-17 09:25:12
|
||||||
|
* @LastEditors: zwq
|
||||||
|
* @LastEditTime: 2026-01-13 16:13:53
|
||||||
|
* @Description:
|
||||||
|
*/
|
||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
|
||||||
|
// 获得原料分页
|
||||||
|
export function getProductPage(query) {
|
||||||
|
return request({
|
||||||
|
url: '/wms/material/page',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 获得所有原料
|
||||||
|
export function getAllProductPage(query) {
|
||||||
|
return request({
|
||||||
|
url: '/wms/material/list/all/code',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 获得原料
|
||||||
|
export function getProduct(id) {
|
||||||
|
return request({
|
||||||
|
url: '/wms/material/get?id=' + id,
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 删除原料
|
||||||
|
export function deleteProduct(id) {
|
||||||
|
return request({
|
||||||
|
url: '/wms/material/delete?id=' + id,
|
||||||
|
method: 'delete'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 更新
|
||||||
|
export function updateProduct(data) {
|
||||||
|
return request({
|
||||||
|
url: '/wms/material/update',
|
||||||
|
method: 'put',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 创建
|
||||||
|
export function createProduct(data) {
|
||||||
|
return request({
|
||||||
|
url: '/wms/material/create',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// 获得工艺分页
|
||||||
|
export function getProcessPage(query) {
|
||||||
|
return request({
|
||||||
|
url: '/wms/process/page/group/by',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 获得工艺点击展开表格
|
||||||
|
export function getProcessDetailPage(query) {
|
||||||
|
return request({
|
||||||
|
url: '/wms/process/page/group/by/detail',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 删除工艺
|
||||||
|
export function deleteProcess(id) {
|
||||||
|
return request({
|
||||||
|
url: '/wms/process/delete?id=' + id,
|
||||||
|
method: 'delete'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 批量删除工艺
|
||||||
|
export function deleteProcessList(ids) {
|
||||||
|
return request({
|
||||||
|
url: '/wms/process/delete-list?ids=' + ids,
|
||||||
|
method: 'delete'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 更新
|
||||||
|
export function updateProcess(data) {
|
||||||
|
return request({
|
||||||
|
url: '/wms/process/update',
|
||||||
|
method: 'put',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 创建
|
||||||
|
export function createProcess(data) {
|
||||||
|
return request({
|
||||||
|
url: '/wms/process/create',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 获得工艺
|
||||||
|
export function getProcess(id) {
|
||||||
|
return request({
|
||||||
|
url: '/wms/process/get?id=' + id,
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 工艺设备原料分页
|
||||||
|
export function getProcessMaterialPage(query) {
|
||||||
|
return request({
|
||||||
|
url: '/wms/process-equipment-material/page',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 删除工艺设备原料
|
||||||
|
export function deleteProcessMaterial(id) {
|
||||||
|
return request({
|
||||||
|
url: '/wms/process-equipment-material/delete?id=' + id,
|
||||||
|
method: 'delete'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 更新
|
||||||
|
export function updateProcessMaterial(data) {
|
||||||
|
return request({
|
||||||
|
url: '/wms/process-equipment-material/update',
|
||||||
|
method: 'put',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 创建
|
||||||
|
export function createProcessMaterial(data) {
|
||||||
|
return request({
|
||||||
|
url: '/wms/process-equipment-material/create',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 获得工艺
|
||||||
|
export function getProcessMaterial(id) {
|
||||||
|
return request({
|
||||||
|
url: '/wms/process-equipment-material/get?id=' + id,
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获得设备分页
|
||||||
|
export function getEquipmentPage(query) {
|
||||||
|
return request({
|
||||||
|
url: '/wms/equipment/page',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
60
src/api/ssdl/taskList.js
Normal file
@@ -0,0 +1,60 @@
|
|||||||
|
/*
|
||||||
|
* @Author: zwq
|
||||||
|
* @Date: 2025-11-17 09:25:12
|
||||||
|
* @LastEditors: zwq
|
||||||
|
* @LastEditTime: 2025-11-18 15:42:19
|
||||||
|
* @Description:
|
||||||
|
*/
|
||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
|
||||||
|
// 获得任务分页
|
||||||
|
export function getTaskPage(query) {
|
||||||
|
return request({
|
||||||
|
url: '/wms/job-main-task/page',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 获得任务
|
||||||
|
export function getTask(id) {
|
||||||
|
return request({
|
||||||
|
url: '/wms/job-main-task/get?id=' + id,
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获得任务日志分页
|
||||||
|
export function getTaskLogPage(query) {
|
||||||
|
return request({
|
||||||
|
url: '/wms/job-main-task-log/page',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 更新
|
||||||
|
export function updateTask(data) {
|
||||||
|
return request({
|
||||||
|
url: '/wms/job-main-task/update',
|
||||||
|
method: 'put',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 根据区域id获取该区域下的库位信息
|
||||||
|
export function getRegion(id) {
|
||||||
|
return request({
|
||||||
|
url: '/wms/line-edge-library/get-by-region-id?regionId=' + id,
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 创建
|
||||||
|
export function createPCTask(data) {
|
||||||
|
return request({
|
||||||
|
url: '/wms/job-main-task/pc-create-task',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
9
src/api/visualization/visualization.js
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
export function getLineEdgeLibraryList(data) {
|
||||||
|
return request({
|
||||||
|
url: '/wms/line-edge-library/list',
|
||||||
|
method: 'get',
|
||||||
|
params: data,
|
||||||
|
});
|
||||||
|
}
|
||||||
@@ -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;
|
border: none;
|
||||||
background: #fff;
|
background: #fff;
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
padding: 15px;
|
padding: 16px;
|
||||||
color: #888;
|
color: #888;
|
||||||
letter-spacing: 2px;
|
letter-spacing: 2px;
|
||||||
flex: 1;
|
flex: 1;
|
||||||
|
|||||||
@@ -14,7 +14,12 @@
|
|||||||
v-if="collapse"
|
v-if="collapse"
|
||||||
key="collapse"
|
key="collapse"
|
||||||
class="sidebar-logo-link"
|
class="sidebar-logo-link"
|
||||||
to="/">
|
:to="{
|
||||||
|
path: '/',
|
||||||
|
query: {
|
||||||
|
keyword: 'home',
|
||||||
|
},
|
||||||
|
}">
|
||||||
<img v-if="logo" :src="logo" class="sidebar-logo" />
|
<img v-if="logo" :src="logo" class="sidebar-logo" />
|
||||||
<h1
|
<h1
|
||||||
v-else
|
v-else
|
||||||
@@ -28,7 +33,16 @@
|
|||||||
{{ title }}
|
{{ title }}
|
||||||
</h1>
|
</h1>
|
||||||
</router-link>
|
</router-link>
|
||||||
<router-link v-else key="expand" class="sidebar-logo-link" to="/">
|
<router-link
|
||||||
|
v-else
|
||||||
|
key="expand"
|
||||||
|
class="sidebar-logo-link"
|
||||||
|
:to="{
|
||||||
|
path: '/',
|
||||||
|
query: {
|
||||||
|
keyword: 'home',
|
||||||
|
},
|
||||||
|
}">
|
||||||
<img v-if="logo" :src="logo" class="sidebar-logo" />
|
<img v-if="logo" :src="logo" class="sidebar-logo" />
|
||||||
<h1
|
<h1
|
||||||
class="sidebar-title"
|
class="sidebar-title"
|
||||||
|
|||||||
@@ -1,3 +1,10 @@
|
|||||||
|
<!--
|
||||||
|
* @Author: zwq
|
||||||
|
* @Date: 2026-01-06 15:18:41
|
||||||
|
* @LastEditors: zwq
|
||||||
|
* @LastEditTime: 2026-01-15 09:52:23
|
||||||
|
* @Description:
|
||||||
|
-->
|
||||||
<template>
|
<template>
|
||||||
<div v-if="!item.hidden">
|
<div v-if="!item.hidden">
|
||||||
<template v-if="hasOneShowingChild(item.children,item) && (!onlyOneChild.children||onlyOneChild.noShowingChildren)&&!item.alwaysShow">
|
<template v-if="hasOneShowingChild(item.children,item) && (!onlyOneChild.children||onlyOneChild.noShowingChildren)&&!item.alwaysShow">
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ import store from './store';
|
|||||||
import router from './router';
|
import router from './router';
|
||||||
import directive from './directive'; // directive
|
import directive from './directive'; // directive
|
||||||
import plugins from './plugins'; // plugins
|
import plugins from './plugins'; // plugins
|
||||||
|
import dataV from '@jiaminghi/data-view'
|
||||||
|
|
||||||
import './assets/icons'; // icon
|
import './assets/icons'; // icon
|
||||||
import './permission'; // permission control
|
import './permission'; // permission control
|
||||||
@@ -77,6 +78,7 @@ Vue.use(directive);
|
|||||||
Vue.use(plugins);
|
Vue.use(plugins);
|
||||||
Vue.use(VueMeta);
|
Vue.use(VueMeta);
|
||||||
// Vue.use(hljs.vuePlugin);
|
// Vue.use(hljs.vuePlugin);
|
||||||
|
Vue.use(dataV);
|
||||||
|
|
||||||
// bpmnProcessDesigner 需要引入
|
// bpmnProcessDesigner 需要引入
|
||||||
import MyPD from '@/components/bpmnProcessDesigner/package/index.js';
|
import MyPD from '@/components/bpmnProcessDesigner/package/index.js';
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
* @Author: zwq
|
* @Author: zwq
|
||||||
* @Date: 2022-08-24 11:19:43
|
* @Date: 2022-08-24 11:19:43
|
||||||
* @LastEditors: zwq
|
* @LastEditors: zwq
|
||||||
* @LastEditTime: 2024-04-02 09:33:29
|
* @LastEditTime: 2025-11-28 09:35:03
|
||||||
* @Description:
|
* @Description:
|
||||||
*/
|
*/
|
||||||
export default {
|
export default {
|
||||||
@@ -16,7 +16,7 @@ export default {
|
|||||||
},
|
},
|
||||||
tableData: [], //table数据
|
tableData: [], //table数据
|
||||||
listQuery: { //分页
|
listQuery: { //分页
|
||||||
pageSize: 10,
|
pageSize: 20,
|
||||||
pageNo: 1,
|
pageNo: 1,
|
||||||
total: 1,
|
total: 1,
|
||||||
},
|
},
|
||||||
@@ -69,7 +69,7 @@ export default {
|
|||||||
this.$refs.addOrUpdate.init(val.data.id);
|
this.$refs.addOrUpdate.init(val.data.id);
|
||||||
});
|
});
|
||||||
} else if (val.type === "delete") {
|
} else if (val.type === "delete") {
|
||||||
this.deleteHandle(val.data.id, val.data.name, val.data._pageIndex)
|
this.deleteHandle(val.data.id, val.data.name, val.data._pageIndex,val.data)
|
||||||
} else {
|
} else {
|
||||||
this.otherMethods(val)
|
this.otherMethods(val)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,3 +1,10 @@
|
|||||||
|
/*
|
||||||
|
* @Author: zwq
|
||||||
|
* @Date: 2026-01-06 15:18:38
|
||||||
|
* @LastEditors: zwq
|
||||||
|
* @LastEditTime: 2026-01-15 09:54:44
|
||||||
|
* @Description:
|
||||||
|
*/
|
||||||
import router from './router'
|
import router from './router'
|
||||||
import store from './store'
|
import store from './store'
|
||||||
import { Message } from 'element-ui'
|
import { Message } from 'element-ui'
|
||||||
@@ -9,7 +16,7 @@ import { isRelogin } from '@/utils/request'
|
|||||||
NProgress.configure({ showSpinner: false })
|
NProgress.configure({ showSpinner: false })
|
||||||
|
|
||||||
// 增加三方登陆 update by 芋艿
|
// 增加三方登陆 update by 芋艿
|
||||||
const whiteList = ['/login', '/social-login', '/auth-redirect', '/bind', '/register', '/oauthLogin/gitee']
|
const whiteList = ['/login', '/social-login', 'screenbg', '/auth-redirect', '/bind', '/register', '/oauthLogin/gitee']
|
||||||
|
|
||||||
router.beforeEach((to, from, next) => {
|
router.beforeEach((to, from, next) => {
|
||||||
NProgress.start()
|
NProgress.start()
|
||||||
@@ -17,7 +24,12 @@ router.beforeEach((to, from, next) => {
|
|||||||
to.meta.title && store.dispatch('settings/setTitle', to.meta.title)
|
to.meta.title && store.dispatch('settings/setTitle', to.meta.title)
|
||||||
/* has token*/
|
/* has token*/
|
||||||
if (to.path === '/login') {
|
if (to.path === '/login') {
|
||||||
next({ path: '/' })
|
next({
|
||||||
|
path: '/',
|
||||||
|
query: {
|
||||||
|
keyword: 'home',
|
||||||
|
},
|
||||||
|
})
|
||||||
NProgress.done()
|
NProgress.done()
|
||||||
} else {
|
} else {
|
||||||
if (store.getters.roles.length === 0) {
|
if (store.getters.roles.length === 0) {
|
||||||
@@ -25,9 +37,9 @@ router.beforeEach((to, from, next) => {
|
|||||||
// 获取字典数据 add by 芋艿
|
// 获取字典数据 add by 芋艿
|
||||||
store.dispatch('dict/loadDictDatas')
|
store.dispatch('dict/loadDictDatas')
|
||||||
// 判断当前用户是否已拉取完 user_info 信息
|
// 判断当前用户是否已拉取完 user_info 信息
|
||||||
store.dispatch('GetInfo').then(() => {
|
store.dispatch('GetInfo').then(userInfo => {
|
||||||
isRelogin.show = false
|
isRelogin.show = false
|
||||||
store.dispatch('GenerateRoutes').then(accessRoutes => {
|
store.dispatch('GenerateRoutes', userInfo.menus).then(accessRoutes => {
|
||||||
// 根据 roles 权限生成可访问的路由表
|
// 根据 roles 权限生成可访问的路由表
|
||||||
router.addRoutes(accessRoutes) // 动态添加可访问路由表
|
router.addRoutes(accessRoutes) // 动态添加可访问路由表
|
||||||
next({ ...to, replace: true }) // hack方法 确保addRoutes已完成
|
next({ ...to, replace: true }) // hack方法 确保addRoutes已完成
|
||||||
@@ -35,7 +47,12 @@ router.beforeEach((to, from, next) => {
|
|||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
store.dispatch('LogOut').then(() => {
|
store.dispatch('LogOut').then(() => {
|
||||||
Message.error(err)
|
Message.error(err)
|
||||||
next({ path: '/' })
|
next({
|
||||||
|
path: '/',
|
||||||
|
query: {
|
||||||
|
keyword: 'home',
|
||||||
|
},
|
||||||
|
})
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -28,223 +28,280 @@ Vue.use(Router)
|
|||||||
|
|
||||||
// 公共路由
|
// 公共路由
|
||||||
export const constantRoutes = [
|
export const constantRoutes = [
|
||||||
{
|
{
|
||||||
path: '/redirect',
|
path: '/redirect',
|
||||||
component: Layout,
|
component: Layout,
|
||||||
hidden: true,
|
hidden: true,
|
||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
path: '/redirect/:path(.*)',
|
path: '/redirect/:path(.*)',
|
||||||
component: (resolve) => require(['@/views/redirect'], resolve)
|
component: (resolve) => require(['@/views/redirect'], resolve),
|
||||||
}
|
},
|
||||||
]
|
],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/login',
|
path: '/login',
|
||||||
component: (resolve) => require(['@/views/login'], resolve),
|
component: (resolve) => require(['@/views/login'], resolve),
|
||||||
hidden: true
|
// hidden: true,
|
||||||
},
|
},
|
||||||
{
|
|
||||||
path: '/sso',
|
{
|
||||||
component: (resolve) => require(['@/views/sso'], resolve),
|
path: '/sso',
|
||||||
hidden: true
|
component: (resolve) => require(['@/views/sso'], resolve),
|
||||||
},
|
hidden: true,
|
||||||
{
|
},
|
||||||
path: '/social-login',
|
{
|
||||||
component: (resolve) => require(['@/views/socialLogin'], resolve),
|
path: '/social-login',
|
||||||
hidden: true
|
component: (resolve) => require(['@/views/socialLogin'], resolve),
|
||||||
},
|
hidden: true,
|
||||||
{
|
},
|
||||||
path: '/404',
|
{
|
||||||
component: (resolve) => require(['@/views/error/404'], resolve),
|
path: '/404',
|
||||||
hidden: true
|
component: (resolve) => require(['@/views/error/404'], resolve),
|
||||||
},
|
hidden: true,
|
||||||
{
|
},
|
||||||
path: '/401',
|
{
|
||||||
component: (resolve) => require(['@/views/error/401'], resolve),
|
path: '/401',
|
||||||
hidden: true
|
component: (resolve) => require(['@/views/error/401'], resolve),
|
||||||
},
|
hidden: true,
|
||||||
{
|
},
|
||||||
path: '/print-design',
|
{
|
||||||
component: (resolve) => require(['@/views/print/design'], resolve),
|
path: '/print-design',
|
||||||
hidden: true
|
component: (resolve) => require(['@/views/print/design'], resolve),
|
||||||
},
|
hidden: true,
|
||||||
{
|
},
|
||||||
path: "",
|
{
|
||||||
component: Layout,
|
path: '',
|
||||||
redirect: "index",
|
component: Layout,
|
||||||
children: [
|
redirect: 'index',
|
||||||
{
|
children: [
|
||||||
path: "index",
|
{
|
||||||
component: (resolve) => require(["@/views/core/base/factory/index"], resolve),
|
path: 'index',
|
||||||
name: "首页",
|
component: (resolve) => require(['@/views/productionVisualization/equipmentBoard'], resolve),
|
||||||
meta: { title: "首页", icon: "dashboard", affix: true },
|
name: '首页',
|
||||||
hidden: true
|
meta: { title: '首页', icon: 'dashboard', affix: true },
|
||||||
},
|
hidden: true,
|
||||||
],
|
},
|
||||||
},
|
],
|
||||||
{
|
props: (route) => ({
|
||||||
path: '/user',
|
keyword: 'home',
|
||||||
component: Layout,
|
})
|
||||||
hidden: true,
|
},
|
||||||
redirect: 'noredirect',
|
{
|
||||||
children: [{
|
path: '/screenbg',
|
||||||
path: 'profile',
|
component: () =>
|
||||||
component: (resolve) => require(['@/views/system/user/profile/index'], resolve),
|
import(
|
||||||
name: 'Profile',
|
/* webpackChunkName: "about" */ '@/views/productionVisualization/equipmentBoard'
|
||||||
meta: { title: '个人中心', icon: 'user' }
|
),
|
||||||
}, {
|
name: 'screenbg',
|
||||||
path: 'notify-message',
|
meta: { title: '大屏', icon: 'chart' },
|
||||||
component: (resolve) => require(['@/views/system/notify/my/index'], resolve),
|
},
|
||||||
name: 'MyNotifyMessage',
|
{
|
||||||
meta: { title: '我的站内信', icon: 'message' },
|
path: '/user',
|
||||||
}]
|
component: Layout,
|
||||||
},
|
hidden: true,
|
||||||
{
|
redirect: 'noredirect',
|
||||||
path: '/dict',
|
children: [
|
||||||
component: Layout,
|
{
|
||||||
hidden: true,
|
path: 'profile',
|
||||||
children: [{
|
component: (resolve) =>
|
||||||
path: 'type/data/:dictId(\\d+)',
|
require(['@/views/system/user/profile/index'], resolve),
|
||||||
component: (resolve) => require(['@/views/system/dict/data'], resolve),
|
name: 'Profile',
|
||||||
name: 'SystemDictData',
|
meta: { title: '个人中心', icon: 'user' },
|
||||||
meta: { title: '字典数据', icon: '', activeMenu: '/system/dict' }
|
},
|
||||||
}
|
{
|
||||||
]
|
path: 'notify-message',
|
||||||
},
|
component: (resolve) =>
|
||||||
{
|
require(['@/views/system/notify/my/index'], resolve),
|
||||||
path: '/job',
|
name: 'MyNotifyMessage',
|
||||||
component: Layout,
|
meta: { title: '我的站内信', icon: 'message' },
|
||||||
hidden: true,
|
},
|
||||||
children: [{
|
],
|
||||||
path: 'log',
|
},
|
||||||
component: (resolve) => require(['@/views/infra/job/log'], resolve),
|
{
|
||||||
name: 'InfraJobLog',
|
path: '/dict',
|
||||||
meta: { title: '调度日志', activeMenu: '/infra/job' }
|
component: Layout,
|
||||||
}
|
hidden: true,
|
||||||
]
|
children: [
|
||||||
}, {
|
{
|
||||||
path: '/codegen',
|
path: 'type/data/:dictId(\\d+)',
|
||||||
component: Layout,
|
component: (resolve) => require(['@/views/system/dict/data'], resolve),
|
||||||
hidden: true,
|
name: 'SystemDictData',
|
||||||
children: [{
|
meta: { title: '字典数据', icon: '', activeMenu: '/system/dict' },
|
||||||
path: 'edit/:tableId(\\d+)',
|
},
|
||||||
component: (resolve) => require(['@/views/infra/codegen/editTable'], resolve),
|
],
|
||||||
name: 'InfraCodegenEditTable',
|
},
|
||||||
meta: { title: '修改生成配置', activeMenu: '/infra/codegen' }
|
{
|
||||||
}
|
path: '/job',
|
||||||
]
|
component: Layout,
|
||||||
},
|
hidden: true,
|
||||||
{
|
children: [
|
||||||
path: '/bpm',
|
{
|
||||||
component: Layout,
|
path: 'log',
|
||||||
hidden: true,
|
component: (resolve) => require(['@/views/infra/job/log'], resolve),
|
||||||
redirect: 'noredirect',
|
name: 'InfraJobLog',
|
||||||
children: [{
|
meta: { title: '调度日志', activeMenu: '/infra/job' },
|
||||||
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: '/codegen',
|
||||||
path: 'oa/leave/detail',
|
component: Layout,
|
||||||
component: (resolve) => require(['@/views/bpm/oa/leave/detail'], resolve),
|
hidden: true,
|
||||||
name: 'BpmOALeaveDetail',
|
children: [
|
||||||
meta: { title: '查看 OA 请假', icon: 'view', activeMenu: '/bpm/oa/leave' }
|
{
|
||||||
}
|
path: 'edit/:tableId(\\d+)',
|
||||||
]
|
component: (resolve) =>
|
||||||
},
|
require(['@/views/infra/codegen/editTable'], resolve),
|
||||||
{
|
name: 'InfraCodegenEditTable',
|
||||||
path: '/bpm',
|
meta: { title: '修改生成配置', activeMenu: '/infra/codegen' },
|
||||||
component: Layout,
|
},
|
||||||
hidden: true,
|
],
|
||||||
children: [{
|
},
|
||||||
path: 'manager/form/edit',
|
{
|
||||||
component: (resolve) => require(['@/views/bpm/form/formEditor'], resolve),
|
path: '/bpm',
|
||||||
name: 'BpmFormEditor',
|
component: Layout,
|
||||||
meta: { title: '流程表单-编辑', activeMenu: '/bpm/manager/form' }
|
hidden: true,
|
||||||
}, {
|
redirect: 'noredirect',
|
||||||
path: 'manager/definition',
|
children: [
|
||||||
component: (resolve) => require(['@/views/bpm/definition/index'], resolve),
|
{
|
||||||
name: 'BpmProcessDefinition',
|
path: 'oa/leave/create',
|
||||||
meta: { title: '流程定义', activeMenu: '/bpm/manager/model' }
|
component: (resolve) =>
|
||||||
}, {
|
require(['@/views/bpm/oa/leave/create'], resolve),
|
||||||
path: 'manager/model/design',
|
name: 'BpmOALeaveCreate',
|
||||||
component: (resolve) => require(['@/views/bpm/model/modelEditor'], resolve),
|
meta: {
|
||||||
name: 'BpmModelEditor',
|
title: '发起 OA 请假',
|
||||||
meta: { title: '设计流程', activeMenu: '/bpm/manager/model' }
|
icon: 'form',
|
||||||
}, {
|
activeMenu: '/bpm/oa/leave',
|
||||||
path: 'process-instance/create',
|
},
|
||||||
component: (resolve) => require(['@/views/bpm/processInstance/create'], resolve),
|
},
|
||||||
name: 'BpmProcessInstanceCreate',
|
{
|
||||||
meta: { title: '发起流程', activeMenu: '/bpm/task/my' }
|
path: 'oa/leave/detail',
|
||||||
}, {
|
component: (resolve) =>
|
||||||
path: 'process-instance/detail',
|
require(['@/views/bpm/oa/leave/detail'], resolve),
|
||||||
component: (resolve) => require(['@/views/bpm/processInstance/detail'], resolve),
|
name: 'BpmOALeaveDetail',
|
||||||
name: 'BpmProcessInstanceDetail',
|
meta: {
|
||||||
meta: { title: '流程详情', activeMenu: '/bpm/task/my' }
|
title: '查看 OA 请假',
|
||||||
}
|
icon: 'view',
|
||||||
]
|
activeMenu: '/bpm/oa/leave',
|
||||||
},
|
},
|
||||||
{
|
},
|
||||||
path: '/property',
|
],
|
||||||
component: Layout,
|
},
|
||||||
hidden: true,
|
{
|
||||||
children: [{
|
path: '/bpm',
|
||||||
path: 'value/:propertyId(\\d+)',
|
component: Layout,
|
||||||
component: (resolve) => require(['@/views/mall/product/property/value'], resolve),
|
hidden: true,
|
||||||
name: 'ProductPropertyValue',
|
children: [
|
||||||
meta: { title: '商品属性值', icon: '', activeMenu: '/product/property' }
|
{
|
||||||
}
|
path: 'manager/form/edit',
|
||||||
]
|
component: (resolve) =>
|
||||||
},
|
require(['@/views/bpm/form/formEditor'], resolve),
|
||||||
{
|
name: 'BpmFormEditor',
|
||||||
path: '/spu',
|
meta: { title: '流程表单-编辑', activeMenu: '/bpm/manager/form' },
|
||||||
component: Layout,
|
},
|
||||||
hidden: true,
|
{
|
||||||
children: [{
|
path: 'manager/definition',
|
||||||
path: 'edit/:spuId(\\d+)',
|
component: (resolve) =>
|
||||||
component: (resolve) => require(['@/views/mall/product/spu/save'], resolve),
|
require(['@/views/bpm/definition/index'], resolve),
|
||||||
name: 'ProductSpuUpdate',
|
name: 'BpmProcessDefinition',
|
||||||
meta: { title: '修改商品', activeMenu: '/product/spu' }
|
meta: { title: '流程定义', activeMenu: '/bpm/manager/model' },
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: 'add',
|
path: 'manager/model/design',
|
||||||
component: (resolve) => require(['@/views/mall/product/spu/save'], resolve),
|
component: (resolve) =>
|
||||||
name: 'ProductSpuCreate',
|
require(['@/views/bpm/model/modelEditor'], resolve),
|
||||||
meta: { title: '添加商品', activeMenu: '/product/spu' }
|
name: 'BpmModelEditor',
|
||||||
}
|
meta: { title: '设计流程', activeMenu: '/bpm/manager/model' },
|
||||||
]
|
},
|
||||||
},
|
{
|
||||||
{
|
path: 'process-instance/create',
|
||||||
path: '/trade/order',
|
component: (resolve) =>
|
||||||
component: Layout,
|
require(['@/views/bpm/processInstance/create'], resolve),
|
||||||
hidden: true,
|
name: 'BpmProcessInstanceCreate',
|
||||||
children: [
|
meta: { title: '发起流程', activeMenu: '/bpm/task/my' },
|
||||||
{
|
},
|
||||||
path: 'detail',
|
{
|
||||||
name: 'TradeOrderDetail',
|
path: 'process-instance/detail',
|
||||||
hidden: true,
|
component: (resolve) =>
|
||||||
meta: { title: '订单详情' },
|
require(['@/views/bpm/processInstance/detail'], resolve),
|
||||||
component: (resolve) => require(['@/views/mall/trade/order/detail'], resolve)
|
name: 'BpmProcessInstanceDetail',
|
||||||
}
|
meta: { title: '流程详情', activeMenu: '/bpm/task/my' },
|
||||||
]
|
},
|
||||||
},
|
],
|
||||||
{
|
},
|
||||||
path: '/pay',
|
{
|
||||||
component: Layout,
|
path: '/property',
|
||||||
hidden: true,
|
component: Layout,
|
||||||
children: [{
|
hidden: true,
|
||||||
path: 'order/submit',
|
children: [
|
||||||
name: 'PayOrderSubmit',
|
{
|
||||||
hidden: true,
|
path: 'value/:propertyId(\\d+)',
|
||||||
meta: {
|
component: (resolve) =>
|
||||||
title: '收银台',
|
require(['@/views/mall/product/property/value'], resolve),
|
||||||
noCache: true
|
name: 'ProductPropertyValue',
|
||||||
},
|
meta: {
|
||||||
component: (resolve) => require(['@/views/pay/order/submit'], resolve)
|
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;
|
let routerPush = Router.prototype.push;
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
import {constantRoutes} from '@/router'
|
import {constantRoutes} from '@/router'
|
||||||
import {getRouters} from '@/api/menu'
|
|
||||||
import Layout from '@/layout/index'
|
import Layout from '@/layout/index'
|
||||||
import ParentView from '@/components/ParentView';
|
import ParentView from '@/components/ParentView';
|
||||||
import {toCamelCase} from "@/utils";
|
import {toCamelCase} from "@/utils";
|
||||||
@@ -27,22 +26,25 @@ const permission = {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
actions: {
|
actions: {
|
||||||
// 生成路由
|
/**
|
||||||
GenerateRoutes({commit}) {
|
* 生成路由
|
||||||
|
*
|
||||||
|
* @param commit commit 函数
|
||||||
|
* @param menus 路由参数
|
||||||
|
*/
|
||||||
|
GenerateRoutes({commit}, menus) {
|
||||||
return new Promise(resolve => {
|
return new Promise(resolve => {
|
||||||
// 向后端请求路由数据(菜单)
|
// 将 menus 菜单,转换为 route 路由数组
|
||||||
getRouters().then(res => {
|
const sdata = JSON.parse(JSON.stringify(menus)) // 【重要】用于菜单中的数据
|
||||||
const sdata = JSON.parse(JSON.stringify(res.data)) // 【重要】用于菜单中的数据
|
const rdata = JSON.parse(JSON.stringify(menus)) // 用于最后添加到 Router 中的数据
|
||||||
const rdata = JSON.parse(JSON.stringify(res.data)) // 用于最后添加到 Router 中的数据
|
const sidebarRoutes = filterAsyncRouter(sdata)
|
||||||
const sidebarRoutes = filterAsyncRouter(sdata)
|
const rewriteRoutes = filterAsyncRouter(rdata, false, true)
|
||||||
const rewriteRoutes = filterAsyncRouter(rdata, false, true)
|
rewriteRoutes.push({path: '*', redirect: '/404', hidden: true})
|
||||||
rewriteRoutes.push({path: '*', redirect: '/404', hidden: true})
|
commit('SET_ROUTES', rewriteRoutes)
|
||||||
commit('SET_ROUTES', rewriteRoutes)
|
commit('SET_SIDEBAR_ROUTERS', constantRoutes.concat(sidebarRoutes))
|
||||||
commit('SET_SIDEBAR_ROUTERS', constantRoutes.concat(sidebarRoutes))
|
commit('SET_DEFAULT_ROUTES', sidebarRoutes)
|
||||||
commit('SET_DEFAULT_ROUTES', sidebarRoutes)
|
commit('SET_TOPBAR_ROUTES', sidebarRoutes)
|
||||||
commit('SET_TOPBAR_ROUTES', sidebarRoutes)
|
resolve(rewriteRoutes)
|
||||||
resolve(rewriteRoutes)
|
|
||||||
})
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
81
src/views/areavisual/lane/add-or-updata.vue
Normal file
@@ -0,0 +1,81 @@
|
|||||||
|
<!--
|
||||||
|
* @Author: zwq
|
||||||
|
* @Date: 2021-11-18 14:16:25
|
||||||
|
* @LastEditors: zwq
|
||||||
|
* @LastEditTime: 2025-11-28 14:38:31
|
||||||
|
* @Description:
|
||||||
|
-->
|
||||||
|
<template>
|
||||||
|
<el-form
|
||||||
|
:model="dataForm"
|
||||||
|
:rules="dataRule"
|
||||||
|
ref="dataForm"
|
||||||
|
@keyup.enter.native="dataFormSubmit()"
|
||||||
|
label-width="80px">
|
||||||
|
<el-row :gutter="20">
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="物料编码" prop="materialCode">
|
||||||
|
<el-input
|
||||||
|
v-model="dataForm.materialCode"
|
||||||
|
clearable
|
||||||
|
placeholder="请输入物料编码" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="物料型号" prop="materialName">
|
||||||
|
<el-input
|
||||||
|
v-model="dataForm.materialName"
|
||||||
|
clearable
|
||||||
|
placeholder="请输入物料型号" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row :gutter="20">
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="物料规格" prop="material">
|
||||||
|
<el-input
|
||||||
|
v-model="dataForm.material"
|
||||||
|
clearable
|
||||||
|
placeholder="请输入物料规格" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-form>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import basicAdd from '@/mixins/basic-add';
|
||||||
|
import { createProduct, updateProduct,getProduct } from '@/api/ssdl/product&recipe';
|
||||||
|
|
||||||
|
export default {
|
||||||
|
mixins: [basicAdd],
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
urlOptions: {
|
||||||
|
createURL: createProduct,
|
||||||
|
updateURL: updateProduct,
|
||||||
|
infoURL: getProduct,
|
||||||
|
},
|
||||||
|
dataForm: {
|
||||||
|
id: undefined,
|
||||||
|
material: undefined,
|
||||||
|
materialName: undefined,
|
||||||
|
materialCode: undefined,
|
||||||
|
},
|
||||||
|
typeArr: [],
|
||||||
|
dataRule: {
|
||||||
|
materialCode: [
|
||||||
|
{ required: true, message: '物料编码不能为空', trigger: 'blur' },
|
||||||
|
],
|
||||||
|
materialName: [
|
||||||
|
{ required: true, message: '物料型号不能为空', trigger: 'blur' },
|
||||||
|
],
|
||||||
|
material: [
|
||||||
|
{ required: true, message: '规格不能为空', trigger: 'blur' },
|
||||||
|
],
|
||||||
|
},
|
||||||
|
};
|
||||||
|
},
|
||||||
|
methods: {},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
62
src/views/areavisual/lane/changeStatus.vue
Normal file
@@ -0,0 +1,62 @@
|
|||||||
|
<!--
|
||||||
|
* @Author: zwq
|
||||||
|
* @Date: 2025-10-11 14:41:12
|
||||||
|
* @LastEditors: zwq
|
||||||
|
* @LastEditTime: 2026-01-14 14:15:47
|
||||||
|
* @Description:
|
||||||
|
-->
|
||||||
|
<template>
|
||||||
|
<el-switch
|
||||||
|
@change="changeStatus"
|
||||||
|
size="small"
|
||||||
|
v-model="injectData.laneState"
|
||||||
|
:active-value="1"
|
||||||
|
:inactive-value="2"></el-switch>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { updateLane } from '@/api/areavisual/lane';
|
||||||
|
export default {
|
||||||
|
props: {
|
||||||
|
injectData: {
|
||||||
|
type: Object,
|
||||||
|
default: () => ({}),
|
||||||
|
},
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {};
|
||||||
|
},
|
||||||
|
created() {},
|
||||||
|
methods: {
|
||||||
|
changeStatus(val) {
|
||||||
|
const pdata = { ...this.injectData, laneState: val };
|
||||||
|
this.$confirm(
|
||||||
|
`是否确认修改${'巷道 [ ' + this.injectData.laneName + ' ] '}的状态?`,
|
||||||
|
'更新状态',
|
||||||
|
{
|
||||||
|
confirmButtonText: '确认修改',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
type: 'warning',
|
||||||
|
}
|
||||||
|
)
|
||||||
|
.then(() => {
|
||||||
|
updateLane(pdata).then((res) => {
|
||||||
|
if (res.code === 0 || res.code === 200) {
|
||||||
|
this.$modal.msgSuccess('修改成功');
|
||||||
|
this.$emit('emitData');
|
||||||
|
} else {
|
||||||
|
this.$modal.msg(res.msg);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
})
|
||||||
|
.catch((res) => {
|
||||||
|
this.$emit('emitData');
|
||||||
|
this.$message({
|
||||||
|
type: 'info',
|
||||||
|
message: '已取消',
|
||||||
|
});
|
||||||
|
});
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
@@ -1,40 +1,29 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
<!-- 搜索工作栏 -->
|
|
||||||
<search-bar
|
<search-bar
|
||||||
:formConfigs="formConfig"
|
:formConfigs="formConfig"
|
||||||
ref="searchBarForm"
|
ref="searchBarForm"
|
||||||
@headBtnClick="buttonClick" />
|
@headBtnClick="buttonClick" />
|
||||||
|
|
||||||
<!-- 列表 -->
|
|
||||||
<base-table
|
<base-table
|
||||||
v-loading="dataListLoading"
|
v-loading="dataListLoading"
|
||||||
:table-props="tableProps"
|
:table-props="tableProps"
|
||||||
:page="listQuery.pageNo"
|
:page="listQuery.pageNo"
|
||||||
:limit="listQuery.pageSize"
|
:limit="listQuery.pageSize"
|
||||||
:table-data="tableData">
|
:table-data="tableData"
|
||||||
<method-btn
|
@emitFun="getDataList">
|
||||||
v-if="tableBtn.length"
|
|
||||||
slot="handleBtn"
|
|
||||||
:width="90"
|
|
||||||
label="操作"
|
|
||||||
:method-list="tableBtn"
|
|
||||||
@clickBtn="handleClick" />
|
|
||||||
</base-table>
|
</base-table>
|
||||||
<pagination
|
<pagination
|
||||||
:limit.sync="listQuery.pageSize"
|
:limit.sync="listQuery.pageSize"
|
||||||
:page.sync="listQuery.pageNo"
|
:page.sync="listQuery.pageNo"
|
||||||
:total="listQuery.total"
|
:total="listQuery.total"
|
||||||
@pagination="getDataList" />
|
@pagination="getDataList" />
|
||||||
|
|
||||||
<!-- 对话框(添加 / 修改) -->
|
|
||||||
<base-dialog
|
<base-dialog
|
||||||
:dialogTitle="addOrEditTitle"
|
:dialogTitle="addOrEditTitle"
|
||||||
:dialogVisible="addOrUpdateVisible"
|
:dialogVisible="addOrUpdateVisible"
|
||||||
@cancel="handleCancel"
|
@cancel="handleCancel"
|
||||||
@confirm="handleConfirm"
|
@confirm="handleConfirm"
|
||||||
:before-close="handleCancel"
|
:before-close="handleCancel"
|
||||||
width="40%">
|
width="50%">
|
||||||
<add-or-update
|
<add-or-update
|
||||||
ref="addOrUpdate"
|
ref="addOrUpdate"
|
||||||
@refreshDataList="successSubmit"></add-or-update>
|
@refreshDataList="successSubmit"></add-or-update>
|
||||||
@@ -44,39 +33,71 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import AddOrUpdate from './add-or-updata';
|
import AddOrUpdate from './add-or-updata';
|
||||||
import connectTime from './connectTime';
|
|
||||||
import basicPage from '@/mixins/basic-page';
|
import basicPage from '@/mixins/basic-page';
|
||||||
import { parseTime } from '@/filter/code-filter';
|
import { parseTime } from '@/filter/code-filter';
|
||||||
import {
|
import { deleteLane, getLanePage } from '@/api/areavisual/lane';
|
||||||
deleteMaterialPricing,
|
import changeStatus from './changeStatus.vue';
|
||||||
getMaterialPricingPage,
|
|
||||||
} from '@/api/base/materialPricing';
|
|
||||||
import { getMaterialPage } from '@/api/base/material';
|
|
||||||
|
|
||||||
|
const lane = [
|
||||||
|
{
|
||||||
|
id: '1',
|
||||||
|
name: 'A巷道',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: '2',
|
||||||
|
name: 'B巷道',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: '3',
|
||||||
|
name: 'C巷道',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: '4',
|
||||||
|
name: 'D巷道',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: '5',
|
||||||
|
name: 'E巷道',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: '6',
|
||||||
|
name: 'F巷道',
|
||||||
|
},
|
||||||
|
];
|
||||||
const tableProps = [
|
const tableProps = [
|
||||||
{
|
{
|
||||||
prop: 'name',
|
prop: 'laneCode',
|
||||||
label: '原料名称',
|
label: '巷道编码',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'code',
|
prop: 'laneName',
|
||||||
label: '原料编码',
|
label: '巷道名称',
|
||||||
width: 180,
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'price',
|
prop: 'lane',
|
||||||
label: '单价(元/吨)',
|
label: '巷道',
|
||||||
align: 'right',
|
filter: (val) => {
|
||||||
|
return lane.find((i) => i.id == val)
|
||||||
|
? lane.find((i) => i.id == val).name
|
||||||
|
: '-';
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'laneSort',
|
||||||
|
label: '巷道排序',
|
||||||
|
width:90,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'laneState',
|
||||||
|
label: '巷道状态',
|
||||||
|
width:90,
|
||||||
|
subcomponent: changeStatus,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'createTime',
|
prop: 'createTime',
|
||||||
label: '生效时间',
|
label: '创建时间',
|
||||||
width: 235,
|
filter: parseTime,
|
||||||
subcomponent: connectTime,
|
width: 150,
|
||||||
},
|
|
||||||
{
|
|
||||||
prop: 'remark',
|
|
||||||
label: '备注',
|
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
@@ -85,75 +106,63 @@ export default {
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
urlOptions: {
|
urlOptions: {
|
||||||
getDataListURL: getMaterialPricingPage,
|
getDataListURL: getLanePage,
|
||||||
deleteURL: deleteMaterialPricing,
|
deleteURL: deleteLane,
|
||||||
},
|
},
|
||||||
tableProps,
|
tableProps,
|
||||||
tableBtn: [
|
tableBtn: [
|
||||||
this.$auth.hasPermi(`base:material-pricing:update`)
|
{
|
||||||
? {
|
type: 'edit',
|
||||||
type: 'edit',
|
btnName: '编辑',
|
||||||
btnName: '编辑',
|
},
|
||||||
}
|
{
|
||||||
: undefined,
|
type: 'delete',
|
||||||
this.$auth.hasPermi(`base:material-pricing:delete`)
|
btnName: '删除',
|
||||||
? {
|
},
|
||||||
type: 'delete',
|
|
||||||
btnName: '删除',
|
|
||||||
}
|
|
||||||
: undefined,
|
|
||||||
].filter((v) => v),
|
].filter((v) => v),
|
||||||
tableData: [],
|
tableData: [],
|
||||||
formConfig: [
|
formConfig: [
|
||||||
{
|
{
|
||||||
type: 'select',
|
type: 'input',
|
||||||
label: '原料名称',
|
label: '名称',
|
||||||
selectOptions: [],
|
placeholder: '名称',
|
||||||
param: 'name',
|
param: 'name',
|
||||||
filterable: true,
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: this.$auth.hasPermi('base:material-pricing:query')
|
type: 'input',
|
||||||
? 'button'
|
label: '编码',
|
||||||
: '',
|
placeholder: '编码',
|
||||||
btnName: '查询',
|
param: 'code',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: 'select',
|
||||||
|
label: '巷道',
|
||||||
|
selectOptions: lane,
|
||||||
|
placeholder: '请选择巷道',
|
||||||
|
param: 'lane',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: 'button',
|
||||||
|
btnName: '搜索',
|
||||||
name: 'search',
|
name: 'search',
|
||||||
color: 'primary',
|
color: 'primary',
|
||||||
},
|
},
|
||||||
{
|
|
||||||
type:
|
|
||||||
this.$auth.hasPermi('base:material-pricing:create') &&
|
|
||||||
this.$auth.hasPermi('base:material-pricing:query')
|
|
||||||
? 'separate'
|
|
||||||
: '',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
type: this.$auth.hasPermi('base:material-pricing:create')
|
|
||||||
? 'button'
|
|
||||||
: '',
|
|
||||||
btnName: '新增',
|
|
||||||
name: 'add',
|
|
||||||
color: 'success',
|
|
||||||
plain: true,
|
|
||||||
},
|
|
||||||
],
|
],
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
AddOrUpdate,
|
AddOrUpdate,
|
||||||
},
|
},
|
||||||
created() {
|
created() {},
|
||||||
getMaterialPage({ pageSize: 100, pageNo: 1 }).then((response) => {
|
|
||||||
this.formConfig[0].selectOptions = response.data.list;
|
|
||||||
});
|
|
||||||
},
|
|
||||||
methods: {
|
methods: {
|
||||||
buttonClick(val) {
|
buttonClick(val) {
|
||||||
switch (val.btnName) {
|
switch (val.btnName) {
|
||||||
case 'search':
|
case 'search':
|
||||||
this.listQuery.pageNo = 1;
|
this.listQuery.pageNo = 1;
|
||||||
this.listQuery.pageSize = 10;
|
this.listQuery.pageSize = 20;
|
||||||
this.listQuery.materialId = val.name;
|
this.listQuery.laneName = val.name;
|
||||||
|
this.listQuery.laneCode = val.code;
|
||||||
|
this.listQuery.lane = val.lane;
|
||||||
this.getDataList();
|
this.getDataList();
|
||||||
break;
|
break;
|
||||||
case 'reset':
|
case 'reset':
|
||||||
324
src/views/areavisual/lineEdgeLibrary/add-or-updata.vue
Normal file
@@ -0,0 +1,324 @@
|
|||||||
|
<!--
|
||||||
|
* @Author: zwq
|
||||||
|
* @Date: 2021-11-18 14:16:25
|
||||||
|
* @LastEditors: zwq
|
||||||
|
* @LastEditTime: 2026-01-15 09:16:36
|
||||||
|
* @Description:
|
||||||
|
-->
|
||||||
|
<template>
|
||||||
|
<el-form
|
||||||
|
:model="dataForm"
|
||||||
|
:rules="dataRule"
|
||||||
|
ref="dataForm"
|
||||||
|
@keyup.enter.native="dataFormSubmit()"
|
||||||
|
label-width="80px">
|
||||||
|
<div class="stat-card">
|
||||||
|
<div class="stat-icon">
|
||||||
|
<i class="el-icon-s-grid" style="color: #fff"></i>
|
||||||
|
</div>
|
||||||
|
<div class="stat-title">库位信息</div>
|
||||||
|
<div class="stat-content">
|
||||||
|
<div class="stat-value">{{ lineInfo.lineEdgeLibraryCode }}</div>
|
||||||
|
<div class="stat-label">{{ lineInfo.lineEdgeLibraryName }}</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<el-row :gutter="20">
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="物料" prop="materialId">
|
||||||
|
<el-select
|
||||||
|
style="width: 100%"
|
||||||
|
v-model="dataForm.materialId"
|
||||||
|
filterable
|
||||||
|
@change="setMaterial"
|
||||||
|
placeholder="请选择物料">
|
||||||
|
<el-option
|
||||||
|
v-for="item in productArr"
|
||||||
|
:key="item.id"
|
||||||
|
:label="
|
||||||
|
item.materialCode +
|
||||||
|
'-' +
|
||||||
|
item.materialName +
|
||||||
|
'-' +
|
||||||
|
item.material
|
||||||
|
"
|
||||||
|
:value="item.id"></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="本盘长度" prop="cableLength">
|
||||||
|
<el-input-number
|
||||||
|
v-model="dataForm.cableLength"
|
||||||
|
:min="0"
|
||||||
|
:precision="2"></el-input-number>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="设备" prop="equipmentId">
|
||||||
|
<el-select
|
||||||
|
v-model="dataForm.equipmentId"
|
||||||
|
@change="setEquipment"
|
||||||
|
placeholder="请选择绞体">
|
||||||
|
<el-option
|
||||||
|
v-for="item in options1"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.equipmentName"
|
||||||
|
:value="item.id"></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="应用套号" prop="suite">
|
||||||
|
<el-select v-model="dataForm.suite" placeholder="请选择应用套号">
|
||||||
|
<el-option
|
||||||
|
v-for="item in options2"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<span v-if="dataForm.suite == 2">
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="选择套号" prop="time">
|
||||||
|
<el-date-picker
|
||||||
|
v-model="dataForm.time"
|
||||||
|
value-format="yyyy-MM-dd"
|
||||||
|
type="date"></el-date-picker>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="" prop="productionLine">
|
||||||
|
<el-select v-model="dataForm.productionLine">
|
||||||
|
<el-option
|
||||||
|
v-for="item in options3"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="" prop="numb">
|
||||||
|
<el-select v-model="dataForm.numb">
|
||||||
|
<el-option
|
||||||
|
v-for="item in options4"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</span>
|
||||||
|
</el-row>
|
||||||
|
</el-form>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import basicAdd from '@/mixins/basic-add';
|
||||||
|
import { getAllProductPage } from '@/api/ssdl/product&recipe';
|
||||||
|
import {
|
||||||
|
QKLineEdgeLibrary,
|
||||||
|
getEquipmentPage,
|
||||||
|
} from '@/api/areavisual/lineEdgeLibrary';
|
||||||
|
import { parseTime } from '@/filter/code-filter';
|
||||||
|
|
||||||
|
export default {
|
||||||
|
mixins: [basicAdd],
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
urlOptions: {
|
||||||
|
createURL: QKLineEdgeLibrary,
|
||||||
|
},
|
||||||
|
dataForm: {
|
||||||
|
id: undefined,
|
||||||
|
materialId: undefined,
|
||||||
|
materialName: undefined,
|
||||||
|
materialCode: undefined,
|
||||||
|
material: undefined,
|
||||||
|
cableLength: undefined,
|
||||||
|
equipmentId: undefined,
|
||||||
|
equipmentName: undefined,
|
||||||
|
suite: undefined, //是否成套
|
||||||
|
suiteCode: undefined, //套号
|
||||||
|
time: this.parseTime(new Date(), '{y}-{m}-{d}'),
|
||||||
|
productionLine: undefined,
|
||||||
|
numb: undefined,
|
||||||
|
},
|
||||||
|
lineInfo: {},
|
||||||
|
productArr: [],
|
||||||
|
options1: [],
|
||||||
|
options2: [
|
||||||
|
{
|
||||||
|
value: 2,
|
||||||
|
label: '是',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: 1,
|
||||||
|
label: '否',
|
||||||
|
},
|
||||||
|
],
|
||||||
|
options3: [
|
||||||
|
{
|
||||||
|
value: '6#',
|
||||||
|
label: '6#',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: '7#',
|
||||||
|
label: '7#',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: '8#',
|
||||||
|
label: '8#',
|
||||||
|
},
|
||||||
|
],
|
||||||
|
options4: [
|
||||||
|
{
|
||||||
|
value: 0,
|
||||||
|
label: '0',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: 1,
|
||||||
|
label: '1',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: 2,
|
||||||
|
label: '2',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: 3,
|
||||||
|
label: '3',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: 4,
|
||||||
|
label: '4',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: 5,
|
||||||
|
label: '5',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: 6,
|
||||||
|
label: '6',
|
||||||
|
},
|
||||||
|
],
|
||||||
|
dataRule: {
|
||||||
|
materialId: [
|
||||||
|
{ required: true, message: '物料不能为空', trigger: 'change' },
|
||||||
|
],
|
||||||
|
time: [{ required: true, message: '不能为空', trigger: 'change' }],
|
||||||
|
productionLine: [
|
||||||
|
{ required: true, message: '不能为空', trigger: 'change' },
|
||||||
|
],
|
||||||
|
numb: [{ required: true, message: '不能为空', trigger: 'change' }],
|
||||||
|
},
|
||||||
|
};
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
showLine(val) {
|
||||||
|
getAllProductPage().then((res) => {
|
||||||
|
this.productArr = res.data;
|
||||||
|
});
|
||||||
|
getEquipmentPage({ pageNo: 1, pageSize: 100, equipmentType: 2 }).then(
|
||||||
|
(res) => {
|
||||||
|
this.options1 = res.data.list;
|
||||||
|
}
|
||||||
|
);
|
||||||
|
this.lineInfo = { ...val };
|
||||||
|
},
|
||||||
|
setMaterial() {
|
||||||
|
const data = this.productArr.find(
|
||||||
|
(i) => i.id === this.dataForm.materialId
|
||||||
|
);
|
||||||
|
this.dataForm.materialName = data.materialName;
|
||||||
|
this.dataForm.material = data.material;
|
||||||
|
this.dataForm.materialCode = data.materialCode;
|
||||||
|
},
|
||||||
|
setEquipment() {
|
||||||
|
const data = this.options1.find(
|
||||||
|
(i) => i.id === this.dataForm.equipmentId
|
||||||
|
);
|
||||||
|
this.dataForm.equipmentName = data.equipmentName;
|
||||||
|
},
|
||||||
|
// 表单提交
|
||||||
|
dataFormSubmit() {
|
||||||
|
this.$refs['dataForm'].validate((valid) => {
|
||||||
|
if (!valid) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (this.dataForm.suite == 2) {
|
||||||
|
this.dataForm.suiteCode =
|
||||||
|
this.dataForm.time +
|
||||||
|
'-' +
|
||||||
|
this.dataForm.productionLine +
|
||||||
|
'-' +
|
||||||
|
this.dataForm.numb;
|
||||||
|
}
|
||||||
|
QKLineEdgeLibrary({
|
||||||
|
...this.lineInfo,
|
||||||
|
...this.dataForm,
|
||||||
|
lineEdgeLibraryState: 1,
|
||||||
|
id: this.lineInfo.id,
|
||||||
|
}).then((response) => {
|
||||||
|
this.$modal.msgSuccess('操作成功');
|
||||||
|
this.visible = false;
|
||||||
|
this.$emit('refreshDataList');
|
||||||
|
});
|
||||||
|
return;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.stat-card {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
padding: 10px;
|
||||||
|
background: white;
|
||||||
|
border-radius: 12px;
|
||||||
|
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
|
||||||
|
transition: all 0.3s ease;
|
||||||
|
border-left: 4px solid;
|
||||||
|
border-color: #1a56db;
|
||||||
|
margin-bottom: 30px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* .stat-card:hover {
|
||||||
|
transform: translateY(-5px);
|
||||||
|
box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
|
||||||
|
} */
|
||||||
|
.stat-title {
|
||||||
|
margin: 0 10px;
|
||||||
|
color: #0051ff;
|
||||||
|
font-size: 20px;
|
||||||
|
}
|
||||||
|
.stat-icon {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
width: 60px;
|
||||||
|
height: 60px;
|
||||||
|
border-radius: 12px;
|
||||||
|
margin-right: 15px;
|
||||||
|
background: linear-gradient(to right, #1a56db, #0d47a1);
|
||||||
|
}
|
||||||
|
|
||||||
|
.stat-content {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
}
|
||||||
|
|
||||||
|
.stat-value {
|
||||||
|
font-size: 28px;
|
||||||
|
font-weight: 700;
|
||||||
|
line-height: 1.2;
|
||||||
|
color: #1a56db;
|
||||||
|
}
|
||||||
|
|
||||||
|
.stat-label {
|
||||||
|
font-size: 14px;
|
||||||
|
color: #64748b;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
318
src/views/areavisual/lineEdgeLibrary/index.vue
Normal file
@@ -0,0 +1,318 @@
|
|||||||
|
<template>
|
||||||
|
<div class="app-container">
|
||||||
|
<search-bar
|
||||||
|
:formConfigs="formConfig"
|
||||||
|
ref="searchBarForm"
|
||||||
|
@headBtnClick="buttonClick" />
|
||||||
|
<base-table
|
||||||
|
v-loading="dataListLoading"
|
||||||
|
:table-props="tableProps"
|
||||||
|
:page="listQuery.pageNo"
|
||||||
|
:limit="listQuery.pageSize"
|
||||||
|
:table-data="tableData"
|
||||||
|
@emitFun="getDataList">
|
||||||
|
<method-btn
|
||||||
|
v-if="tableBtn.length"
|
||||||
|
slot="handleBtn"
|
||||||
|
:width="110"
|
||||||
|
label="操作"
|
||||||
|
:method-list="tableBtn"
|
||||||
|
@clickBtn="handleClick" />
|
||||||
|
</base-table>
|
||||||
|
<pagination
|
||||||
|
:limit.sync="listQuery.pageSize"
|
||||||
|
:page.sync="listQuery.pageNo"
|
||||||
|
:total="listQuery.total"
|
||||||
|
@pagination="getDataList" />
|
||||||
|
<base-dialog
|
||||||
|
:dialogTitle="addOrEditTitle"
|
||||||
|
:dialogVisible="addOrUpdateVisible"
|
||||||
|
@cancel="handleCancel"
|
||||||
|
@confirm="handleConfirm"
|
||||||
|
:before-close="handleCancel"
|
||||||
|
destroy-on-close
|
||||||
|
width="50%">
|
||||||
|
<add-or-update
|
||||||
|
ref="addOrUpdate"
|
||||||
|
@refreshDataList="successSubmit"></add-or-update>
|
||||||
|
</base-dialog>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import AddOrUpdate from './add-or-updata';
|
||||||
|
import basicPage from '@/mixins/basic-page';
|
||||||
|
import { parseTime } from '@/filter/code-filter';
|
||||||
|
import {
|
||||||
|
deleteLineEdgeLibrary,
|
||||||
|
getLineEdgeLibraryPage,
|
||||||
|
QKLineEdgeLibrary,
|
||||||
|
} from '@/api/areavisual/lineEdgeLibrary';
|
||||||
|
|
||||||
|
const laneRow = [
|
||||||
|
{
|
||||||
|
id: '1',
|
||||||
|
name: '第一排',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: '2',
|
||||||
|
name: '第二排',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: '3',
|
||||||
|
name: '第三排',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: '4',
|
||||||
|
name: '第四排',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: '5',
|
||||||
|
name: '第五排',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: '6',
|
||||||
|
name: '第六排',
|
||||||
|
},
|
||||||
|
];
|
||||||
|
const tableProps = [
|
||||||
|
{
|
||||||
|
prop: 'lineEdgeLibraryCode',
|
||||||
|
label: '线边库编码',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'lineEdgeLibraryName',
|
||||||
|
label: '线边库名称',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'agvGroundCode',
|
||||||
|
label: 'agv码',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'lineEdgeLibraryState',
|
||||||
|
label: '线边库状态',
|
||||||
|
width: 90,
|
||||||
|
filter: (val) => {
|
||||||
|
return val ? '满位' : '空闲';
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'usableState',
|
||||||
|
label: '是否可用',
|
||||||
|
width: 90,
|
||||||
|
filter: (val) => {
|
||||||
|
return ['', '可用', '不可用', '锁定'][val];
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'trayType',
|
||||||
|
label: '托盘类型',
|
||||||
|
width: 90,
|
||||||
|
filter: (val) => {
|
||||||
|
return val ? '笼式' : '盘式';
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'productionLine',
|
||||||
|
label: '产线',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'equipmentName',
|
||||||
|
label: '设备',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'suiteCode',
|
||||||
|
label: '套号',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'laneRow',
|
||||||
|
label: '巷道排',
|
||||||
|
filter: (val) => {
|
||||||
|
return laneRow.find((i) => i.id == val)
|
||||||
|
? laneRow.find((i) => i.id == val).name
|
||||||
|
: '-';
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'materialCode',
|
||||||
|
label: '物料',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'batch',
|
||||||
|
label: '批次',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'cableLength',
|
||||||
|
label: '线缆长度',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'createTime',
|
||||||
|
label: '创建时间',
|
||||||
|
filter: parseTime,
|
||||||
|
width: 150,
|
||||||
|
},
|
||||||
|
];
|
||||||
|
|
||||||
|
export default {
|
||||||
|
mixins: [basicPage],
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
urlOptions: {
|
||||||
|
getDataListURL: getLineEdgeLibraryPage,
|
||||||
|
deleteURL: deleteLineEdgeLibrary,
|
||||||
|
},
|
||||||
|
tableProps,
|
||||||
|
tableData: [],
|
||||||
|
tableBtn: [
|
||||||
|
{
|
||||||
|
type: 'clear',
|
||||||
|
btnName: '清空',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: 'add',
|
||||||
|
btnName: '添加',
|
||||||
|
},
|
||||||
|
].filter((v) => v),
|
||||||
|
formConfig: [
|
||||||
|
{
|
||||||
|
type: 'input',
|
||||||
|
label: '线边库名称',
|
||||||
|
placeholder: '线边库名称',
|
||||||
|
param: 'name',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: 'input',
|
||||||
|
label: '线边库编码',
|
||||||
|
placeholder: '线边库编码',
|
||||||
|
param: 'code',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: 'select',
|
||||||
|
label: '巷道排',
|
||||||
|
selectOptions: laneRow,
|
||||||
|
placeholder: '请选择巷道排',
|
||||||
|
param: 'laneRow',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: 'button',
|
||||||
|
btnName: '搜索',
|
||||||
|
name: 'search',
|
||||||
|
color: 'primary',
|
||||||
|
},
|
||||||
|
// {
|
||||||
|
// type: 'separate',
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// type: 'button',
|
||||||
|
// btnName: '重置',
|
||||||
|
// name: 'reset',
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// type: 'separate',
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// type: 'button',
|
||||||
|
// btnName: '新增',
|
||||||
|
// name: 'add',
|
||||||
|
// color: 'success',
|
||||||
|
// plain: true,
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// type: this.$auth.hasPermi('base:factory:create') ? 'separate' : '',
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// type: this.$auth.hasPermi('base:factory:export') ? 'button' : '',
|
||||||
|
// btnName: '导出',
|
||||||
|
// name: 'export',
|
||||||
|
// color: 'warning',
|
||||||
|
// },
|
||||||
|
],
|
||||||
|
};
|
||||||
|
},
|
||||||
|
components: {
|
||||||
|
AddOrUpdate,
|
||||||
|
},
|
||||||
|
created() {},
|
||||||
|
methods: {
|
||||||
|
buttonClick(val) {
|
||||||
|
switch (val.btnName) {
|
||||||
|
case 'search':
|
||||||
|
this.listQuery.pageNo = 1;
|
||||||
|
this.listQuery.pageSize = 20;
|
||||||
|
this.listQuery.lineEdgeLibraryName = val.name;
|
||||||
|
this.listQuery.lineEdgeLibraryCode = val.code;
|
||||||
|
this.listQuery.laneRow = val.laneRow;
|
||||||
|
this.getDataList();
|
||||||
|
break;
|
||||||
|
case 'reset':
|
||||||
|
this.$refs.searchBarForm.resetForm();
|
||||||
|
this.listQuery = {
|
||||||
|
pageSize: 20,
|
||||||
|
pageNo: 1,
|
||||||
|
total: 1,
|
||||||
|
};
|
||||||
|
this.getDataList();
|
||||||
|
break;
|
||||||
|
case 'add':
|
||||||
|
this.addOrEditTitle = '新增';
|
||||||
|
this.addOrUpdateVisible = true;
|
||||||
|
this.addOrUpdateHandle();
|
||||||
|
break;
|
||||||
|
case 'export':
|
||||||
|
this.handleExport();
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
console.log(val);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
otherMethods(val) {
|
||||||
|
if (val.type == 'clear') {
|
||||||
|
if (val.data.usableState == 3) {
|
||||||
|
this.$confirm(
|
||||||
|
`当前库位为锁定状态,代表该库位有未完成的任务关联,是否确认清空${
|
||||||
|
'线边库名称为 ' + val.data.lineEdgeLibraryName + ' '
|
||||||
|
}的数据项?`,
|
||||||
|
'锁定库位清空提示',
|
||||||
|
{
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
type: 'warning',
|
||||||
|
}
|
||||||
|
)
|
||||||
|
.then(() => {
|
||||||
|
QKLineEdgeLibrary({...val.data,lineEdgeLibraryState:0,usableState:1 }).then(({ data }) => {
|
||||||
|
this.$message({
|
||||||
|
message: data,
|
||||||
|
type: 'success',
|
||||||
|
duration: 1500,
|
||||||
|
onClose: () => {
|
||||||
|
this.getDataList();
|
||||||
|
},
|
||||||
|
});
|
||||||
|
});
|
||||||
|
})
|
||||||
|
.catch(() => {});
|
||||||
|
} else {
|
||||||
|
QKLineEdgeLibrary({...val.data,lineEdgeLibraryState:0,usableState:1 }).then(({ data }) => {
|
||||||
|
this.$message({
|
||||||
|
message: data,
|
||||||
|
type: 'success',
|
||||||
|
duration: 1500,
|
||||||
|
onClose: () => {
|
||||||
|
this.getDataList();
|
||||||
|
},
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
} else if (val.type === 'add') {
|
||||||
|
this.addOrEditTitle = '添加货物';
|
||||||
|
this.addOrUpdateVisible = true;
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$refs.addOrUpdate.init();
|
||||||
|
this.$refs.addOrUpdate.showLine(val.data);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
326
src/views/areavisual/overview/components/add-or-updata.vue
Normal file
@@ -0,0 +1,326 @@
|
|||||||
|
<!--
|
||||||
|
* @Author: zwq
|
||||||
|
* @Date: 2021-11-18 14:16:25
|
||||||
|
* @LastEditors: zwq
|
||||||
|
* @LastEditTime: 2026-02-03 13:30:54
|
||||||
|
* @Description:
|
||||||
|
-->
|
||||||
|
<template>
|
||||||
|
<el-form
|
||||||
|
:model="dataForm"
|
||||||
|
:rules="dataRule"
|
||||||
|
ref="dataForm"
|
||||||
|
@keyup.enter.native="dataFormSubmit()"
|
||||||
|
label-width="80px">
|
||||||
|
<div class="stat-card">
|
||||||
|
<div class="stat-icon">
|
||||||
|
<i class="el-icon-s-grid" style="color: #fff"></i>
|
||||||
|
</div>
|
||||||
|
<div class="stat-title">库位信息</div>
|
||||||
|
<div class="stat-content">
|
||||||
|
<div class="stat-value">{{ lineInfo.lineEdgeLibraryCode }}</div>
|
||||||
|
<div class="stat-label">{{ lineInfo.lineEdgeLibraryName }}</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<el-row :gutter="20">
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="物料" prop="materialId">
|
||||||
|
<el-select
|
||||||
|
style="width: 100%"
|
||||||
|
v-model="dataForm.materialId"
|
||||||
|
filterable
|
||||||
|
@change="setMaterial"
|
||||||
|
placeholder="请选择物料">
|
||||||
|
<el-option
|
||||||
|
v-for="item in productArr"
|
||||||
|
:key="item.id"
|
||||||
|
:label="
|
||||||
|
item.materialCode +
|
||||||
|
'-' +
|
||||||
|
item.materialName +
|
||||||
|
'-' +
|
||||||
|
item.material
|
||||||
|
"
|
||||||
|
:value="item.id"></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="本盘长度" prop="cableLength">
|
||||||
|
<el-input-number
|
||||||
|
v-model="dataForm.cableLength"
|
||||||
|
:min="0"
|
||||||
|
:precision="2"></el-input-number>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="设备" prop="equipmentId">
|
||||||
|
<el-select
|
||||||
|
v-model="dataForm.equipmentId"
|
||||||
|
@change="setEquipment"
|
||||||
|
placeholder="请选择绞体">
|
||||||
|
<el-option
|
||||||
|
v-for="item in options1"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.equipmentName"
|
||||||
|
:value="item.id"></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="应用套号" prop="suite">
|
||||||
|
<el-select v-model="dataForm.suite" placeholder="请选择应用套号">
|
||||||
|
<el-option
|
||||||
|
v-for="item in options2"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<span v-if="dataForm.suite == 2">
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="选择套号" prop="time">
|
||||||
|
<el-date-picker
|
||||||
|
v-model="dataForm.time"
|
||||||
|
value-format="yyyy-MM-dd"
|
||||||
|
type="date"></el-date-picker>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="" prop="productionLine">
|
||||||
|
<el-select v-model="dataForm.productionLine">
|
||||||
|
<el-option
|
||||||
|
v-for="item in options3"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="" prop="numb">
|
||||||
|
<el-select v-model="dataForm.numb">
|
||||||
|
<el-option
|
||||||
|
v-for="item in options4"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</span>
|
||||||
|
</el-row>
|
||||||
|
</el-form>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import basicAdd from '@/mixins/basic-add';
|
||||||
|
import { getAllProductPage } from '@/api/ssdl/product&recipe';
|
||||||
|
import {
|
||||||
|
QKLineEdgeLibrary,
|
||||||
|
getEquipmentPage,
|
||||||
|
} from '@/api/areavisual/lineEdgeLibrary';
|
||||||
|
import { parseTime } from '@/filter/code-filter';
|
||||||
|
|
||||||
|
export default {
|
||||||
|
mixins: [basicAdd],
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
urlOptions: {
|
||||||
|
createURL: QKLineEdgeLibrary,
|
||||||
|
},
|
||||||
|
dataForm: {
|
||||||
|
id: undefined,
|
||||||
|
materialId: undefined,
|
||||||
|
materialName: undefined,
|
||||||
|
materialCode: undefined,
|
||||||
|
material: undefined,
|
||||||
|
cableLength: undefined,
|
||||||
|
equipmentId: undefined,
|
||||||
|
equipmentName: undefined,
|
||||||
|
suite: undefined, //是否成套
|
||||||
|
suiteCode: undefined, //套号
|
||||||
|
time: this.parseTime(new Date(), '{y}-{m}-{d}'),
|
||||||
|
productionLine: undefined,
|
||||||
|
numb: undefined,
|
||||||
|
},
|
||||||
|
lineInfo: {},
|
||||||
|
productArr: [],
|
||||||
|
options1: [],
|
||||||
|
options2: [
|
||||||
|
{
|
||||||
|
value: 2,
|
||||||
|
label: '是',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: 1,
|
||||||
|
label: '否',
|
||||||
|
},
|
||||||
|
],
|
||||||
|
options3: [
|
||||||
|
{
|
||||||
|
value: '6#',
|
||||||
|
label: '6#',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: '7#',
|
||||||
|
label: '7#',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: '8#',
|
||||||
|
label: '8#',
|
||||||
|
},
|
||||||
|
],
|
||||||
|
options4: [
|
||||||
|
{
|
||||||
|
value: 0,
|
||||||
|
label: '0',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: 1,
|
||||||
|
label: '1',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: 2,
|
||||||
|
label: '2',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: 3,
|
||||||
|
label: '3',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: 4,
|
||||||
|
label: '4',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: 5,
|
||||||
|
label: '5',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: 6,
|
||||||
|
label: '6',
|
||||||
|
},
|
||||||
|
],
|
||||||
|
dataRule: {
|
||||||
|
materialId: [
|
||||||
|
{ required: true, message: '物料不能为空', trigger: 'change' },
|
||||||
|
],
|
||||||
|
time: [{ required: true, message: '不能为空', trigger: 'change' }],
|
||||||
|
productionLine: [
|
||||||
|
{ required: true, message: '不能为空', trigger: 'change' },
|
||||||
|
],
|
||||||
|
numb: [{ required: true, message: '不能为空', trigger: 'change' }],
|
||||||
|
equipmentId: [{ required: true, message: '不能为空', trigger: 'change' }],
|
||||||
|
suite: [{ required: true, message: '不能为空', trigger: 'change' }],
|
||||||
|
},
|
||||||
|
};
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
showLine(val) {
|
||||||
|
getAllProductPage().then((res) => {
|
||||||
|
this.productArr = res.data;
|
||||||
|
});
|
||||||
|
getEquipmentPage({ pageNo: 1, pageSize: 100, equipmentType: 2 }).then(
|
||||||
|
(res) => {
|
||||||
|
this.options1 = res.data.list;
|
||||||
|
}
|
||||||
|
);
|
||||||
|
this.lineInfo = { ...val };
|
||||||
|
},
|
||||||
|
setMaterial() {
|
||||||
|
const data = this.productArr.find(
|
||||||
|
(i) => i.id === this.dataForm.materialId
|
||||||
|
);
|
||||||
|
this.dataForm.materialName = data.materialName;
|
||||||
|
this.dataForm.material = data.material;
|
||||||
|
this.dataForm.materialCode = data.materialCode;
|
||||||
|
},
|
||||||
|
setEquipment() {
|
||||||
|
const data = this.options1.find(
|
||||||
|
(i) => i.id === this.dataForm.equipmentId
|
||||||
|
);
|
||||||
|
this.dataForm.equipmentName = data.equipmentName;
|
||||||
|
},
|
||||||
|
// 表单提交
|
||||||
|
dataFormSubmit() {
|
||||||
|
this.$refs['dataForm'].validate((valid) => {
|
||||||
|
if (!valid) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (this.dataForm.suite == 2) {
|
||||||
|
this.dataForm.suiteCode =
|
||||||
|
this.dataForm.time +
|
||||||
|
'-' +
|
||||||
|
this.dataForm.productionLine +
|
||||||
|
'-' +
|
||||||
|
this.dataForm.numb;
|
||||||
|
}
|
||||||
|
QKLineEdgeLibrary({
|
||||||
|
...this.lineInfo,
|
||||||
|
...this.dataForm,
|
||||||
|
lineEdgeLibraryState: 1,
|
||||||
|
id: this.lineInfo.id,
|
||||||
|
}).then((response) => {
|
||||||
|
this.$modal.msgSuccess('操作成功');
|
||||||
|
this.visible = false;
|
||||||
|
this.$emit('refreshDataList');
|
||||||
|
});
|
||||||
|
return;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.stat-card {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
padding: 10px;
|
||||||
|
background: white;
|
||||||
|
border-radius: 12px;
|
||||||
|
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
|
||||||
|
transition: all 0.3s ease;
|
||||||
|
border-left: 4px solid;
|
||||||
|
border-color: #1a56db;
|
||||||
|
margin-bottom: 30px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* .stat-card:hover {
|
||||||
|
transform: translateY(-5px);
|
||||||
|
box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
|
||||||
|
} */
|
||||||
|
.stat-title {
|
||||||
|
margin: 0 10px;
|
||||||
|
color: #0051ff;
|
||||||
|
font-size: 20px;
|
||||||
|
}
|
||||||
|
.stat-icon {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
width: 60px;
|
||||||
|
height: 60px;
|
||||||
|
border-radius: 12px;
|
||||||
|
margin-right: 15px;
|
||||||
|
background: linear-gradient(to right, #1a56db, #0d47a1);
|
||||||
|
}
|
||||||
|
|
||||||
|
.stat-content {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
}
|
||||||
|
|
||||||
|
.stat-value {
|
||||||
|
font-size: 28px;
|
||||||
|
font-weight: 700;
|
||||||
|
line-height: 1.2;
|
||||||
|
color: #1a56db;
|
||||||
|
}
|
||||||
|
|
||||||
|
.stat-label {
|
||||||
|
font-size: 14px;
|
||||||
|
color: #64748b;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -29,9 +29,9 @@ export default {
|
|||||||
type: String,
|
type: String,
|
||||||
default: '300px',
|
default: '300px',
|
||||||
},
|
},
|
||||||
barData: {
|
ringData: {
|
||||||
type: Array,
|
type: Object,
|
||||||
default: () => [],
|
default: () => {},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
@@ -74,7 +74,7 @@ export default {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
color: ['#288AFF', '#8EF0AB', '#FFDC94'],
|
color: ['#33B36B', '#3A8DFF', '#F59A23'],
|
||||||
tooltip: {
|
tooltip: {
|
||||||
trigger: 'axis',
|
trigger: 'axis',
|
||||||
axisPointer: {
|
axisPointer: {
|
||||||
@@ -85,82 +85,38 @@ export default {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
legend: {
|
legend: {
|
||||||
data: ['投入', '产出', '加工成品率'],
|
data: ['当前满位', '当前空位', '在途'],
|
||||||
},
|
},
|
||||||
grid: {
|
grid: {
|
||||||
containLabel: true,
|
containLabel: true,
|
||||||
},
|
},
|
||||||
xAxis: {
|
|
||||||
type: 'category',
|
|
||||||
data: this.barData.map((item) => {
|
|
||||||
return item.lineName;
|
|
||||||
}),
|
|
||||||
axisPointer: {
|
|
||||||
type: 'shadow',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
yAxis: [
|
|
||||||
{
|
|
||||||
type: 'value',
|
|
||||||
name: '投入/产出 片',
|
|
||||||
min: 0,
|
|
||||||
axisLabel: {
|
|
||||||
formatter: '{value}',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
type: 'value',
|
|
||||||
name: '加工成品率',
|
|
||||||
min: 0,
|
|
||||||
max: 100,
|
|
||||||
interval: 10,
|
|
||||||
axisLabel: {
|
|
||||||
formatter: '{value} %',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
],
|
|
||||||
series: [
|
series: [
|
||||||
{
|
{
|
||||||
name: '投入',
|
// name: '投入',
|
||||||
type: 'bar',
|
type: 'pie',
|
||||||
barWidth: '20',
|
radius: '50%',
|
||||||
data: this.barData.map((item) => {
|
data: [
|
||||||
return item.inputNum;
|
{
|
||||||
}),
|
name: '当前满位',
|
||||||
tooltip: {
|
value: this.ringData.occupiedQuantity
|
||||||
valueFormatter: function (value) {
|
|
||||||
return value + ' 片';
|
|
||||||
},
|
},
|
||||||
},
|
{
|
||||||
animationDuration,
|
name: '当前空位',
|
||||||
},
|
value: this.ringData.idleQuantity
|
||||||
{
|
|
||||||
name: '产出',
|
|
||||||
type: 'bar',
|
|
||||||
barWidth: '20',
|
|
||||||
data: this.barData.map((item) => {
|
|
||||||
return item.outputNum;
|
|
||||||
}),
|
|
||||||
tooltip: {
|
|
||||||
valueFormatter: function (value) {
|
|
||||||
return value + ' 片';
|
|
||||||
},
|
},
|
||||||
},
|
{
|
||||||
animationDuration,
|
name: '在途',
|
||||||
},
|
value: this.ringData.transitQuantity
|
||||||
{
|
|
||||||
name: '加工成品率',
|
|
||||||
type: 'line',
|
|
||||||
yAxisIndex: 1,
|
|
||||||
tooltip: {
|
|
||||||
valueFormatter: function (value) {
|
|
||||||
return value + ' %';
|
|
||||||
},
|
},
|
||||||
},
|
],
|
||||||
data: this.barData.map((item) => {
|
emphasis: {
|
||||||
return item.processingRatio;
|
itemStyle: {
|
||||||
}),
|
shadowBlur: 10,
|
||||||
},
|
shadowOffsetX: 0,
|
||||||
|
shadowColor: 'rgba(0, 0, 0, 0.5)'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
],
|
],
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
687
src/views/areavisual/overview/index.vue
Normal file
@@ -0,0 +1,687 @@
|
|||||||
|
<template>
|
||||||
|
<div class="app-container">
|
||||||
|
<el-row class="overview-container">
|
||||||
|
<el-col :span="4" class="overview-container-left">
|
||||||
|
<el-row style="font-size: 18px; font-weight: bold; line-height: 36px">
|
||||||
|
库区选择
|
||||||
|
</el-row>
|
||||||
|
<el-input
|
||||||
|
v-model="areaSearchForm.regionName"
|
||||||
|
placeholder="库区名称"
|
||||||
|
@blur="getArea"
|
||||||
|
clearable />
|
||||||
|
<el-tree
|
||||||
|
:data="areaList"
|
||||||
|
:node-key="'id'"
|
||||||
|
:props="{ label: 'regionName' }"
|
||||||
|
@node-click="nodeClick" />
|
||||||
|
</el-col>
|
||||||
|
<el-col
|
||||||
|
:span="16"
|
||||||
|
v-if="changeType === 0"
|
||||||
|
class="overview-container-main">
|
||||||
|
<el-row>
|
||||||
|
<el-col
|
||||||
|
:span="8"
|
||||||
|
class="allarea-box"
|
||||||
|
v-for="item in allAreaList"
|
||||||
|
:key="item.id">
|
||||||
|
<div class="areainfo-box">
|
||||||
|
<div class="areainfo-box-header">
|
||||||
|
{{ item.regionName }}
|
||||||
|
</div>
|
||||||
|
<div class="areainfo-box-line">
|
||||||
|
<div
|
||||||
|
class="areainfo-box-line-item"
|
||||||
|
:style="{
|
||||||
|
width: `${(
|
||||||
|
(item.occupiedQuantity /
|
||||||
|
(item.totalInventory + item.transitQuantity)) *
|
||||||
|
100
|
||||||
|
).toFixed(2)}%`,
|
||||||
|
backgroundColor: '#33B36B',
|
||||||
|
}"></div>
|
||||||
|
<div
|
||||||
|
class="areainfo-box-line-item"
|
||||||
|
:style="{
|
||||||
|
width: `${(
|
||||||
|
(item.idleQuantity /
|
||||||
|
(item.totalInventory + item.transitQuantity)) *
|
||||||
|
100
|
||||||
|
).toFixed(2)}%`,
|
||||||
|
backgroundColor: '#3A8DFF',
|
||||||
|
}"></div>
|
||||||
|
<div
|
||||||
|
class="areainfo-box-line-item"
|
||||||
|
:style="{
|
||||||
|
width: `${(
|
||||||
|
(item.transitQuantity /
|
||||||
|
(item.totalInventory + item.transitQuantity)) *
|
||||||
|
100
|
||||||
|
).toFixed(2)}%`,
|
||||||
|
backgroundColor: '#F59A23',
|
||||||
|
}"></div>
|
||||||
|
</div>
|
||||||
|
<el-row class="areainfo-box-info">
|
||||||
|
<el-col class="areainfo-box-info-item" :span="6">
|
||||||
|
<p class="areainfo-box-info-item-count">
|
||||||
|
{{ item.totalInventory }}
|
||||||
|
</p>
|
||||||
|
<p class="areainfo-box-info-item-title">库位总数</p>
|
||||||
|
</el-col>
|
||||||
|
<el-col class="areainfo-box-info-item" :span="6">
|
||||||
|
<p
|
||||||
|
class="areainfo-box-info-item-count"
|
||||||
|
style="color: #33b36b">
|
||||||
|
{{ item.occupiedQuantity }}
|
||||||
|
</p>
|
||||||
|
<p class="areainfo-box-info-item-title">占</p>
|
||||||
|
</el-col>
|
||||||
|
<el-col class="areainfo-box-info-item" :span="6">
|
||||||
|
<p
|
||||||
|
class="areainfo-box-info-item-count"
|
||||||
|
style="color: #3a8dff">
|
||||||
|
{{ item.idleQuantity }}
|
||||||
|
</p>
|
||||||
|
<p class="areainfo-box-info-item-title">空</p>
|
||||||
|
</el-col>
|
||||||
|
<el-col class="areainfo-box-info-item" :span="6">
|
||||||
|
<p
|
||||||
|
class="areainfo-box-info-item-count"
|
||||||
|
style="color: #f59a23">
|
||||||
|
{{ item.transitQuantity }}
|
||||||
|
</p>
|
||||||
|
<p class="areainfo-box-info-item-title">在途</p>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</div>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-col>
|
||||||
|
<el-col
|
||||||
|
:span="4"
|
||||||
|
v-if="changeType === 0"
|
||||||
|
class="overview-container-right">
|
||||||
|
<el-tabs v-model="activeName" @tab-click="handleClickRight">
|
||||||
|
<el-tab-pane label="概览" name="first">
|
||||||
|
<el-row class="overview-container-right-alloverview">
|
||||||
|
<el-col
|
||||||
|
class="overview-container-right-alloverview-item"
|
||||||
|
:span="8">
|
||||||
|
<p class="overview-container-right-alloverview-item-count">
|
||||||
|
{{ allAreaInfo.totalInventory }}
|
||||||
|
</p>
|
||||||
|
<p class="overview-container-right-alloverview-item-title">
|
||||||
|
库位总数
|
||||||
|
</p>
|
||||||
|
</el-col>
|
||||||
|
<el-col
|
||||||
|
class="overview-container-right-alloverview-item"
|
||||||
|
:span="8">
|
||||||
|
<p class="overview-container-right-alloverview-item-count">
|
||||||
|
{{ allAreaInfo.occupiedQuantity }}
|
||||||
|
</p>
|
||||||
|
<p class="overview-container-right-alloverview-item-title">
|
||||||
|
当前满位
|
||||||
|
</p>
|
||||||
|
</el-col>
|
||||||
|
<el-col
|
||||||
|
class="overview-container-right-alloverview-item"
|
||||||
|
:span="8">
|
||||||
|
<p class="overview-container-right-alloverview-item-count">
|
||||||
|
{{ allAreaInfo.idleQuantity }}
|
||||||
|
</p>
|
||||||
|
<p class="overview-container-right-alloverview-item-title">
|
||||||
|
当前空位
|
||||||
|
</p>
|
||||||
|
</el-col>
|
||||||
|
<el-col
|
||||||
|
class="overview-container-right-alloverview-item"
|
||||||
|
:span="8">
|
||||||
|
<p class="overview-container-right-alloverview-item-count">
|
||||||
|
{{ allAreaInfo.transitQuantity }}
|
||||||
|
</p>
|
||||||
|
<p class="overview-container-right-alloverview-item-title">
|
||||||
|
在途
|
||||||
|
</p>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<ringChart :ring-data="allAreaInfo" ref="ringChart" />
|
||||||
|
</el-tab-pane>
|
||||||
|
<el-tab-pane label="在途任务" name="second">在途任务</el-tab-pane>
|
||||||
|
</el-tabs>
|
||||||
|
</el-col>
|
||||||
|
<el-col
|
||||||
|
:span="20"
|
||||||
|
v-if="changeType === 1"
|
||||||
|
class="overview-container-main">
|
||||||
|
<div class="stat-card">
|
||||||
|
<div class="stat-icon">
|
||||||
|
<i class="el-icon-s-grid" style="color: #fff"></i>
|
||||||
|
</div>
|
||||||
|
<div class="stat-title">库区信息</div>
|
||||||
|
<div class="stat-content">
|
||||||
|
<div class="stat-value">{{ getAreaInfoInfo.regionName }}</div>
|
||||||
|
<div class="stat-label">{{ getAreaInfoInfo.regionCode }}</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="area-body">
|
||||||
|
<div v-for="item in Object.keys(areaInfo)" :key="item">
|
||||||
|
<el-button size="mini" style="width:189px;" type="primary" @click="clearAll(item)">
|
||||||
|
一键清空
|
||||||
|
</el-button>
|
||||||
|
<div class="potTitle">{{ item }}</div>
|
||||||
|
<div class="potList">
|
||||||
|
<div v-for="sitem in areaInfo[item]" :key="sitem.id">
|
||||||
|
<div v-if="sitem.empty" class="area-div-empty" />
|
||||||
|
<div v-else class="area-div" :title="sitem.lineEdgeLibraryName">
|
||||||
|
<el-popover
|
||||||
|
placement="top-start"
|
||||||
|
:title="sitem.lineEdgeLibraryCode"
|
||||||
|
width="200"
|
||||||
|
trigger="hover">
|
||||||
|
<div class="point" />
|
||||||
|
<span style="font-weight: 600">名称:</span>
|
||||||
|
{{ sitem.lineEdgeLibraryName }}
|
||||||
|
<br />
|
||||||
|
<div class="point" />
|
||||||
|
<span style="font-weight: 600">状态:</span>
|
||||||
|
{{
|
||||||
|
sitem.usableState == 3
|
||||||
|
? '锁定'
|
||||||
|
: sitem.usableState == 2
|
||||||
|
? '不可用'
|
||||||
|
: sitem.lineEdgeLibraryState == 1
|
||||||
|
? '满位'
|
||||||
|
: '空闲'
|
||||||
|
}}
|
||||||
|
<br />
|
||||||
|
<span
|
||||||
|
v-if="sitem.usableState == 3 ||
|
||||||
|
(sitem.usableState == 1 &&
|
||||||
|
sitem.lineEdgeLibraryState == 1)
|
||||||
|
">
|
||||||
|
<span style="font-weight: 600">物料:</span>
|
||||||
|
{{ sitem.materialCode || '' }}
|
||||||
|
<br />
|
||||||
|
<span style="font-weight: 600">设备:</span>
|
||||||
|
{{ sitem.equipmentName || '' }}
|
||||||
|
<br />
|
||||||
|
<span style="font-weight: 600">套号:</span>
|
||||||
|
{{ sitem.suiteCode || '' }}
|
||||||
|
<br />
|
||||||
|
</span>
|
||||||
|
<el-button type="text" @click="clearLine(sitem)">
|
||||||
|
清空
|
||||||
|
</el-button>
|
||||||
|
<el-button type="text" @click="addLine(sitem)">
|
||||||
|
添加
|
||||||
|
</el-button>
|
||||||
|
<div
|
||||||
|
class="area-icon"
|
||||||
|
:style="{
|
||||||
|
backgroundColor:
|
||||||
|
sitem.usableState == 3
|
||||||
|
? '#E6A23C'
|
||||||
|
: sitem.usableState == 2
|
||||||
|
? 'gray'
|
||||||
|
: sitem.lineEdgeLibraryState == 1
|
||||||
|
? '#67C23A'
|
||||||
|
: '',
|
||||||
|
}"
|
||||||
|
slot="reference">
|
||||||
|
<i
|
||||||
|
:class="
|
||||||
|
sitem.usableState == 3
|
||||||
|
? 'el-icon-lock'
|
||||||
|
: 'el-icon-s-grid'
|
||||||
|
"
|
||||||
|
style="color: #fff"></i>
|
||||||
|
</div>
|
||||||
|
</el-popover>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<base-dialog
|
||||||
|
:dialogTitle="addOrEditTitle"
|
||||||
|
:dialogVisible="addOrUpdateVisible"
|
||||||
|
@cancel="handleCancel"
|
||||||
|
@confirm="handleConfirm"
|
||||||
|
:before-close="handleCancel"
|
||||||
|
destroy-on-close
|
||||||
|
width="50%">
|
||||||
|
<add-or-update
|
||||||
|
ref="addOrUpdate"
|
||||||
|
@refreshDataList="successSubmit"></add-or-update>
|
||||||
|
</base-dialog>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
// import basicPage from '@/mixins/basic-page';
|
||||||
|
import ringChart from './components/ringChart.vue';
|
||||||
|
import AddOrUpdate from './components/add-or-updata';
|
||||||
|
import basicPage from '@/mixins/basic-page';
|
||||||
|
import {
|
||||||
|
getAreaList,
|
||||||
|
postAllAreaInfo,
|
||||||
|
postAllAreaOverview,
|
||||||
|
postAreaInfo,
|
||||||
|
} from '@/api/areavisual/overview';
|
||||||
|
import { QKLineEdgeLibrary,AllQKLineEdgeLibrary } from '@/api/areavisual/lineEdgeLibrary';
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'overview',
|
||||||
|
mixins: [basicPage],
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
areaList: [
|
||||||
|
{
|
||||||
|
id: 0,
|
||||||
|
regionName: '全部库区',
|
||||||
|
},
|
||||||
|
],
|
||||||
|
areaSearchForm: {
|
||||||
|
pageNo: 1,
|
||||||
|
pageSize: 100,
|
||||||
|
regionName: '',
|
||||||
|
},
|
||||||
|
changeType: 0,
|
||||||
|
allAreaList: [],
|
||||||
|
allAreaInfo: {
|
||||||
|
totalInventory: 0,
|
||||||
|
occupiedQuantity: 0,
|
||||||
|
idleQuantity: 0,
|
||||||
|
transitQuantity: 0,
|
||||||
|
},
|
||||||
|
areaInfo: {},
|
||||||
|
activeName: 'first',
|
||||||
|
getAreaInfoInfo: {},
|
||||||
|
};
|
||||||
|
},
|
||||||
|
components: {
|
||||||
|
ringChart,
|
||||||
|
AddOrUpdate,
|
||||||
|
},
|
||||||
|
async created() {
|
||||||
|
this.getArea();
|
||||||
|
this.getAllAreaInfo();
|
||||||
|
this.getAllAreaOverview();
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
activeName: (val) => {
|
||||||
|
if (val === 'first') {
|
||||||
|
this.getAllAreaOverview();
|
||||||
|
} else if (val === 'second') {
|
||||||
|
this.getNowTaskList();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
// 获取库区列表
|
||||||
|
async getArea() {
|
||||||
|
const res = await getAreaList(this.areaSearchForm);
|
||||||
|
if (res.code === 0 && res.data) {
|
||||||
|
(this.areaList = [
|
||||||
|
{
|
||||||
|
id: 0,
|
||||||
|
regionName: '全部库区',
|
||||||
|
},
|
||||||
|
]),
|
||||||
|
this.areaList.push(...res.data.list);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 库区选择
|
||||||
|
nodeClick(data, node, components) {
|
||||||
|
if (data.id === 0) {
|
||||||
|
this.changeType = 0;
|
||||||
|
this.activeName = 'first';
|
||||||
|
this.getAllAreaInfo();
|
||||||
|
} else {
|
||||||
|
this.getAreaInfoInfo = data; //把库区存下,方便刷新
|
||||||
|
this.changeType = 1;
|
||||||
|
this.getAreaInfo(data.id);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 获取全部库区概览信息
|
||||||
|
async getAllAreaInfo() {
|
||||||
|
const res = await postAllAreaInfo([]);
|
||||||
|
console.log(res);
|
||||||
|
if (res.code === 0 && res.data) {
|
||||||
|
this.allAreaList = res.data;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 获取库区概览
|
||||||
|
async getAllAreaOverview() {
|
||||||
|
const res = await postAllAreaOverview([]);
|
||||||
|
console.log(res);
|
||||||
|
if (res.code === 0 && res.data) {
|
||||||
|
this.allAreaInfo = res.data;
|
||||||
|
this.$refs.ringChart.initChart();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 获取在途任务
|
||||||
|
async getNowTaskList() {},
|
||||||
|
// 获取单库区信息
|
||||||
|
async getAreaInfo(id) {
|
||||||
|
const res = await postAreaInfo({ id });
|
||||||
|
if (res.code === 0 && res.data) {
|
||||||
|
// 按巷道号分组
|
||||||
|
this.areaInfo = res.data.reduce((result, item) => {
|
||||||
|
// 提取巷道号
|
||||||
|
const laneNumber = item.lineEdgeLibraryCode.substring(3, 5) + ' 巷道';
|
||||||
|
|
||||||
|
// 如果该巷道还没有分组,创建一个空数组
|
||||||
|
if (!result[laneNumber]) {
|
||||||
|
result[laneNumber] = [];
|
||||||
|
}
|
||||||
|
|
||||||
|
// 将当前项添加到对应巷道的数组中
|
||||||
|
result[laneNumber].push(item);
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}, {});
|
||||||
|
Object.keys(this.areaInfo).forEach((key) => {
|
||||||
|
const arr = this.areaInfo[key];
|
||||||
|
let emptyNum = 0;
|
||||||
|
let insetEmpty = [];
|
||||||
|
arr.forEach((item, index) => {
|
||||||
|
if (
|
||||||
|
!item.empty &&
|
||||||
|
item.lineEdgeLibraryCode.substring(5, 7) !=
|
||||||
|
Math.floor(index / 2) + 1 + emptyNum &&
|
||||||
|
item.lineEdgeLibraryCode[item.lineEdgeLibraryCode.length - 1] ==
|
||||||
|
'L'
|
||||||
|
) {
|
||||||
|
let num =
|
||||||
|
Number(item.lineEdgeLibraryCode.substring(5, 7)) -
|
||||||
|
(Math.floor(index / 2) + 1 + emptyNum);
|
||||||
|
insetEmpty.push({
|
||||||
|
index,
|
||||||
|
num,
|
||||||
|
});
|
||||||
|
emptyNum += num;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
insetEmpty.forEach((item) => {
|
||||||
|
const arrEmpty = Array.from({ length: item.num * 2 }, () => ({
|
||||||
|
empty: true,
|
||||||
|
}));
|
||||||
|
arr.splice(item.index, 0, ...arrEmpty);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
},
|
||||||
|
getDataList() {},
|
||||||
|
// 全部库区右侧分页点击
|
||||||
|
handleClickRight(tab, event) {
|
||||||
|
console.log(tab, event);
|
||||||
|
},
|
||||||
|
clearLine(val) {
|
||||||
|
if (val.usableState == 3) {
|
||||||
|
this.$confirm(
|
||||||
|
`当前库位为锁定状态,代表该库位有未完成的任务关联,是否确认清空${
|
||||||
|
'线边库名称为 ' + val.lineEdgeLibraryName + ' '
|
||||||
|
}的数据项?`,
|
||||||
|
'锁定库位清空提示',
|
||||||
|
{
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
type: 'warning',
|
||||||
|
}
|
||||||
|
)
|
||||||
|
.then(() => {
|
||||||
|
QKLineEdgeLibrary({
|
||||||
|
...val,
|
||||||
|
lineEdgeLibraryState: 0,
|
||||||
|
usableState: 1,
|
||||||
|
}).then(({ data }) => {
|
||||||
|
this.$message({
|
||||||
|
message: data,
|
||||||
|
type: 'success',
|
||||||
|
duration: 1500,
|
||||||
|
onClose: () => {
|
||||||
|
this.getAreaInfo(this.getAreaInfoInfo.id);
|
||||||
|
},
|
||||||
|
});
|
||||||
|
});
|
||||||
|
})
|
||||||
|
.catch(() => {});
|
||||||
|
} else {
|
||||||
|
QKLineEdgeLibrary({
|
||||||
|
...val,
|
||||||
|
lineEdgeLibraryState: 0,
|
||||||
|
usableState: 1,
|
||||||
|
}).then(({ data }) => {
|
||||||
|
this.$message({
|
||||||
|
message: data,
|
||||||
|
type: 'success',
|
||||||
|
duration: 1500,
|
||||||
|
onClose: () => {
|
||||||
|
this.getAreaInfo(this.getAreaInfoInfo.id);
|
||||||
|
},
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
},
|
||||||
|
addLine(val) {
|
||||||
|
this.addOrEditTitle = '添加货物';
|
||||||
|
this.addOrUpdateVisible = true;
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$refs.addOrUpdate.init();
|
||||||
|
this.$refs.addOrUpdate.showLine(val);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// dialog的父组件方法this.$emit("refreshDataList");
|
||||||
|
successSubmit() {
|
||||||
|
this.handleCancel();
|
||||||
|
this.getAreaInfo(this.getAreaInfoInfo.id);
|
||||||
|
},
|
||||||
|
clearAll(item) {
|
||||||
|
if (this.areaInfo[item].length > 0) {
|
||||||
|
AllQKLineEdgeLibrary({
|
||||||
|
...this.areaInfo[item][0],
|
||||||
|
lineEdgeLibraryState: 0,
|
||||||
|
usableState: 1,
|
||||||
|
}).then(({ data }) => {
|
||||||
|
this.$message({
|
||||||
|
message: data,
|
||||||
|
type: 'success',
|
||||||
|
duration: 1500,
|
||||||
|
onClose: () => {
|
||||||
|
this.getAreaInfo(this.getAreaInfoInfo.id);
|
||||||
|
},
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.overview-container {
|
||||||
|
max-height: calc(100vh - 120px - 8px);
|
||||||
|
overflow: scroll;
|
||||||
|
.overview-container-left {
|
||||||
|
padding-right: 12px;
|
||||||
|
}
|
||||||
|
.overview-container-main {
|
||||||
|
.allarea-box {
|
||||||
|
padding: 10px;
|
||||||
|
.areainfo-box {
|
||||||
|
border: 1px solid #bbb;
|
||||||
|
border-radius: 5px;
|
||||||
|
padding: 10px;
|
||||||
|
.areainfo-box-header {
|
||||||
|
font-size: 16px;
|
||||||
|
font-weight: bold;
|
||||||
|
white-space: nowrap; /* 禁止换行 */
|
||||||
|
overflow: hidden; /* 隐藏溢出内容 */
|
||||||
|
text-overflow: ellipsis; /* 溢出部分显示省略号 */
|
||||||
|
}
|
||||||
|
.areainfo-box-line {
|
||||||
|
width: 100%;
|
||||||
|
.areainfo-box-line-item {
|
||||||
|
height: 5px;
|
||||||
|
display: inline-block;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.areainfo-box-info {
|
||||||
|
.areainfo-box-info-item {
|
||||||
|
text-align: center;
|
||||||
|
font-size: 12px;
|
||||||
|
.areainfo-box-info-item-count {
|
||||||
|
font-weight: bold;
|
||||||
|
font-size: 14px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.overview-container-right {
|
||||||
|
.overview-container-right-alloverview {
|
||||||
|
.overview-container-right-alloverview-item {
|
||||||
|
text-align: center;
|
||||||
|
.overview-container-right-alloverview-item-count {
|
||||||
|
font-size: 14px;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<style lang="scss">
|
||||||
|
.el-tree-node__content {
|
||||||
|
height: 40px;
|
||||||
|
line-height: 40px;
|
||||||
|
}
|
||||||
|
.el-tree-node__label {
|
||||||
|
display: block;
|
||||||
|
width: calc(100% - 24px);
|
||||||
|
text-align: center;
|
||||||
|
white-space: nowrap; /* 禁止换行 */
|
||||||
|
overflow: hidden; /* 隐藏溢出内容 */
|
||||||
|
text-overflow: ellipsis; /* 溢出部分显示省略号 */
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.area-body {
|
||||||
|
margin-top: 10px;
|
||||||
|
margin-left: 10px;
|
||||||
|
overflow-x: auto;
|
||||||
|
display: flex;
|
||||||
|
}
|
||||||
|
.potTitle {
|
||||||
|
width: 190px;
|
||||||
|
background-color: rgb(169, 235, 249);
|
||||||
|
border-radius: 3px;
|
||||||
|
margin-right: 5px;
|
||||||
|
text-align: center;
|
||||||
|
color: #000000;
|
||||||
|
letter-spacing: 1px;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
font-size: 16px;
|
||||||
|
padding: 5px;
|
||||||
|
}
|
||||||
|
.potList {
|
||||||
|
width: 190px;
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: 90px 90px;
|
||||||
|
gap: 8px;
|
||||||
|
}
|
||||||
|
.area-div {
|
||||||
|
padding: 10px;
|
||||||
|
background: white;
|
||||||
|
border-radius: 12px;
|
||||||
|
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
|
||||||
|
transition: all 0.3s ease;
|
||||||
|
border: 4px solid #1a56db;
|
||||||
|
margin-bottom: 30px;
|
||||||
|
}
|
||||||
|
.area-div-empty {
|
||||||
|
background: white;
|
||||||
|
width: 90px;
|
||||||
|
height: 88px;
|
||||||
|
margin-bottom: 30px;
|
||||||
|
}
|
||||||
|
.point {
|
||||||
|
width: 5px;
|
||||||
|
height: 5px;
|
||||||
|
border-radius: 50%;
|
||||||
|
background-color: #409eff;
|
||||||
|
float: left;
|
||||||
|
margin-top: 7px;
|
||||||
|
margin-right: 5px;
|
||||||
|
}
|
||||||
|
.area-icon {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
margin: auto;
|
||||||
|
width: 60px;
|
||||||
|
height: 60px;
|
||||||
|
border-radius: 12px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.stat-card {
|
||||||
|
margin-top: 10px;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
padding: 10px;
|
||||||
|
background: white;
|
||||||
|
border-radius: 12px;
|
||||||
|
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
|
||||||
|
transition: all 0.3s ease;
|
||||||
|
border-left: 4px solid;
|
||||||
|
border-color: #1a56db;
|
||||||
|
margin-bottom: 30px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* .stat-card:hover {
|
||||||
|
transform: translateY(-5px);
|
||||||
|
box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
|
||||||
|
} */
|
||||||
|
.stat-title {
|
||||||
|
margin: 0 10px;
|
||||||
|
color: #0051ff;
|
||||||
|
font-size: 20px;
|
||||||
|
}
|
||||||
|
.stat-icon {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
width: 60px;
|
||||||
|
height: 60px;
|
||||||
|
border-radius: 12px;
|
||||||
|
margin-right: 15px;
|
||||||
|
background: linear-gradient(to right, #1a56db, #0d47a1);
|
||||||
|
}
|
||||||
|
|
||||||
|
.stat-content {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
}
|
||||||
|
|
||||||
|
.stat-value {
|
||||||
|
font-size: 28px;
|
||||||
|
font-weight: 700;
|
||||||
|
line-height: 1.2;
|
||||||
|
color: #1a56db;
|
||||||
|
}
|
||||||
|
|
||||||
|
.stat-label {
|
||||||
|
font-size: 14px;
|
||||||
|
color: #64748b;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -34,12 +34,12 @@
|
|||||||
v-if="section.key == 'base'"
|
v-if="section.key == 'base'"
|
||||||
style="margin-bottom: 32px">
|
style="margin-bottom: 32px">
|
||||||
<el-skeleton v-if="!showForm" animated />
|
<el-skeleton v-if="!showForm" animated />
|
||||||
<EquipmentInfoForm
|
<!-- <EquipmentInfoForm
|
||||||
key="drawer-dialog-form"
|
key="drawer-dialog-form"
|
||||||
v-if="showForm"
|
v-if="showForm"
|
||||||
:disabled="mode.includes('detail')"
|
:disabled="mode.includes('detail')"
|
||||||
:sync-filelist="syncFileListFlag"
|
:sync-filelist="syncFileListFlag"
|
||||||
v-model="form" />
|
v-model="form" /> -->
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div v-if="section.key == 'attrs'" style="margin-top: 12px">
|
<div v-if="section.key == 'attrs'" style="margin-top: 12px">
|
||||||
@@ -86,30 +86,10 @@
|
|||||||
</el-button> -->
|
</el-button> -->
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- 属性对话框 -->
|
|
||||||
<base-dialog
|
|
||||||
v-if="sections[1].allowAdd"
|
|
||||||
:dialogTitle="attrTitle"
|
|
||||||
:dialogVisible="attrFormVisible"
|
|
||||||
width="35%"
|
|
||||||
:append-to-body="true"
|
|
||||||
custom-class="baseDialog"
|
|
||||||
@close="closeAttrForm"
|
|
||||||
@cancel="closeAttrForm"
|
|
||||||
@confirm="submitAttrForm">
|
|
||||||
<DialogForm
|
|
||||||
v-if="attrFormVisible"
|
|
||||||
ref="attrForm"
|
|
||||||
:dataForm="attrForm"
|
|
||||||
:rows="attrRows" />
|
|
||||||
</base-dialog>
|
|
||||||
</el-drawer>
|
</el-drawer>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import DialogForm from './DialogForm';
|
|
||||||
import EquipmentInfoForm from './EquipmentInfoForm.vue';
|
|
||||||
|
|
||||||
const SmallTitle = {
|
const SmallTitle = {
|
||||||
name: 'SmallTitle',
|
name: 'SmallTitle',
|
||||||
@@ -138,7 +118,7 @@ const SmallTitle = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: { SmallTitle, DialogForm, EquipmentInfoForm },
|
components: { SmallTitle },
|
||||||
props: ['sections', 'mode', 'dataId'], // dataId 作为一个通用的存放id的字段
|
props: ['sections', 'mode', 'dataId'], // dataId 作为一个通用的存放id的字段
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
277
src/views/areavisual/record/index.vue
Normal file
@@ -0,0 +1,277 @@
|
|||||||
|
<template>
|
||||||
|
<div class="app-container">
|
||||||
|
<!-- 搜索工作栏 -->
|
||||||
|
<SearchBar
|
||||||
|
:formConfigs="searchBarFormConfig"
|
||||||
|
ref="search-bar"
|
||||||
|
isFold
|
||||||
|
@headBtnClick="handleSearchBarBtnClick" />
|
||||||
|
|
||||||
|
<!-- 列表 -->
|
||||||
|
<base-table
|
||||||
|
:table-props="tableProps"
|
||||||
|
:page="queryParams.pageNo"
|
||||||
|
:limit="queryParams.pageSize"
|
||||||
|
:table-data="list"
|
||||||
|
@emitFun="handleEmitFun">
|
||||||
|
<method-btn
|
||||||
|
v-if="tableBtn.length"
|
||||||
|
slot="handleBtn"
|
||||||
|
:width="120"
|
||||||
|
label="操作"
|
||||||
|
:method-list="tableBtn"
|
||||||
|
@clickBtn="handleTableBtnClick" />
|
||||||
|
</base-table>
|
||||||
|
|
||||||
|
<!-- 分页组件 -->
|
||||||
|
<pagination
|
||||||
|
v-show="total > 0"
|
||||||
|
:total="total"
|
||||||
|
:page.sync="queryParams.pageNo"
|
||||||
|
:limit.sync="queryParams.pageSize"
|
||||||
|
@pagination="getList" />
|
||||||
|
|
||||||
|
<!-- 设备 详情 - 编辑 -->
|
||||||
|
<RecordDrawer
|
||||||
|
v-if="open"
|
||||||
|
ref="drawer"
|
||||||
|
:mode="editMode"
|
||||||
|
@update-mode="editMode = $event"
|
||||||
|
:data-id="form.id"
|
||||||
|
@refreshDataList="getList"
|
||||||
|
@cancel="cancelEdit"
|
||||||
|
@destroy="cancelEdit" />
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import moment from 'moment';
|
||||||
|
import basicPageMixin from '@/mixins/lb/basicPageMixin';
|
||||||
|
import RecordDrawer from './components/RecordDrawer';
|
||||||
|
import { getRecordPage, getLaneList } from '@/api/areavisual/record';
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'Equipment',
|
||||||
|
components: {
|
||||||
|
RecordDrawer,
|
||||||
|
},
|
||||||
|
mixins: [basicPageMixin],
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
searchBarKeys: ['name', 'code'],
|
||||||
|
// this.$auth.hasPermi(`base:equipment:update`)
|
||||||
|
tableBtn: [
|
||||||
|
{
|
||||||
|
type: 'detail',
|
||||||
|
btnName: '详情'
|
||||||
|
}
|
||||||
|
].filter((v) => v),
|
||||||
|
tableProps: [
|
||||||
|
{
|
||||||
|
prop: 'recordCode',
|
||||||
|
label: '出/入库单编号',
|
||||||
|
fixed: true,
|
||||||
|
width: 180,
|
||||||
|
// filter: (val) => moment(val).format('yyyy-MM-DD HH:mm:ss'),
|
||||||
|
// showOverflowtooltip: true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'type',
|
||||||
|
label: '业务类型',
|
||||||
|
filter: (val) => val === 1 ? '出库' : '入库',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
width: 180,
|
||||||
|
prop: 'recordTime',
|
||||||
|
label: '出/入库时间',
|
||||||
|
filter: (val) => moment(val).format('yyyy-MM-DD HH:mm:ss')
|
||||||
|
},
|
||||||
|
{ prop: 'recordArea', label: '出/入库库区' },
|
||||||
|
{ prop: 'recordLane', label: '出/入库巷道' },
|
||||||
|
{ prop: 'recordRegion', label: '出/入库库位号' },
|
||||||
|
{ prop: 'target', label: '搬运对象' },
|
||||||
|
{ prop: 'productName', label: '产品名称' },
|
||||||
|
{ prop: 'specification', label: '型号规格' },
|
||||||
|
{ prop: 'recordMan', label: '出/入库人' },
|
||||||
|
{ prop: 'remark', label: '备注' }
|
||||||
|
],
|
||||||
|
searchBarFormConfig: [
|
||||||
|
{
|
||||||
|
type: 'input',
|
||||||
|
label: '关键字',
|
||||||
|
placeholder: '请输入出/入库编码、产品名称、规格型号、库位号',
|
||||||
|
param: 'query',
|
||||||
|
width: 350
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: 'select',
|
||||||
|
label: '业务类型',
|
||||||
|
selectOptions: [
|
||||||
|
{
|
||||||
|
id: '1',
|
||||||
|
name:'出库'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: '2',
|
||||||
|
name:'入库'
|
||||||
|
},
|
||||||
|
],
|
||||||
|
placeholder: '请选择业务类型',
|
||||||
|
param: 'type',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: 'select',
|
||||||
|
label: '出/入库巷道',
|
||||||
|
selectOptions: [],
|
||||||
|
placeholder: '请选择出/入库巷道',
|
||||||
|
param: 'recordLane',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: 'select',
|
||||||
|
label: '来源',
|
||||||
|
selectOptions: [
|
||||||
|
{
|
||||||
|
id: '1',
|
||||||
|
name:'WMS'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: '2',
|
||||||
|
name:'MES'
|
||||||
|
},
|
||||||
|
],
|
||||||
|
placeholder: '请选择来源',
|
||||||
|
param: 'source',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: 'select',
|
||||||
|
label: '出/入库人',
|
||||||
|
selectOptions: [],
|
||||||
|
placeholder: '请选择出/入库人',
|
||||||
|
param: 'recordMan',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: 'datePicker',
|
||||||
|
label: '出/入库时间',
|
||||||
|
placeholder: '请选择出/入库时间',
|
||||||
|
param: 'recordTime',
|
||||||
|
dateType: 'datetimerange',
|
||||||
|
rangeSeparator: '至'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: 'select',
|
||||||
|
label: '载具类型',
|
||||||
|
selectOptions: [
|
||||||
|
{
|
||||||
|
id: '1',
|
||||||
|
name:'AGV'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: '2',
|
||||||
|
name:'人工叉车'
|
||||||
|
},
|
||||||
|
],
|
||||||
|
placeholder: '请选择载具类型',
|
||||||
|
param: 'vehicleType',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: 'button',
|
||||||
|
btnName: '查询',
|
||||||
|
name: 'search',
|
||||||
|
color: 'primary',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: 'button',
|
||||||
|
btnName: '重置',
|
||||||
|
name: 'reset',
|
||||||
|
color: 'info',
|
||||||
|
}
|
||||||
|
],
|
||||||
|
editVisible: false,
|
||||||
|
editMode: 'detail', // 'edit', 'detail'
|
||||||
|
// 是否显示弹出层
|
||||||
|
open: false,
|
||||||
|
// 查询参数
|
||||||
|
queryParams: {
|
||||||
|
pageNo: 1,
|
||||||
|
pageSize: 20,
|
||||||
|
query: '',
|
||||||
|
type: '',
|
||||||
|
source: '',
|
||||||
|
recordLane: '',
|
||||||
|
recordMan: '',
|
||||||
|
recordTime: '',
|
||||||
|
vehicleType: ''
|
||||||
|
},
|
||||||
|
form: {}
|
||||||
|
};
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.getLane()
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
computed: {},
|
||||||
|
methods: {
|
||||||
|
/** 查询列表 */
|
||||||
|
getList() {
|
||||||
|
this.loading = true;
|
||||||
|
// 执行查询
|
||||||
|
getRecordPage(this.queryParams).then((response) => {
|
||||||
|
console.log(response)
|
||||||
|
this.list = response.data.list;
|
||||||
|
this.total = response.data.total;
|
||||||
|
this.loading = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
async getLane() {
|
||||||
|
const res = await getLaneList({
|
||||||
|
pageNo: 1,
|
||||||
|
pageSize: 100
|
||||||
|
})
|
||||||
|
if (res.code === 0 && res.data) {
|
||||||
|
console.log(res.data)
|
||||||
|
this.searchBarFormConfig[2].selectOptions = res.data.list.map(item => {
|
||||||
|
return { id: item.id, name: item.lane }
|
||||||
|
})
|
||||||
|
console.log(this.searchBarFormConfig)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
/** 取消按钮 */
|
||||||
|
cancel() {
|
||||||
|
this.open = false;
|
||||||
|
},
|
||||||
|
// /** 导出按钮操作 */
|
||||||
|
// handleExport() {
|
||||||
|
// // 处理查询参数
|
||||||
|
// let params = { ...this.queryParams };
|
||||||
|
// params.pageNo = undefined;
|
||||||
|
// params.pageSize = undefined;
|
||||||
|
// this.$modal
|
||||||
|
// .confirm('是否确认导出所有设备数据项?')
|
||||||
|
// .then(() => {
|
||||||
|
// this.exportLoading = true;
|
||||||
|
// return exportEquipmentExcel(params);
|
||||||
|
// })
|
||||||
|
// .then((response) => {
|
||||||
|
// this.$download.excel(response, '设备.xls');
|
||||||
|
// this.exportLoading = false;
|
||||||
|
// })
|
||||||
|
// .catch(() => {});
|
||||||
|
// },
|
||||||
|
handleTableBtnClick ({data, type}) {
|
||||||
|
switch (type) {
|
||||||
|
case 'detail':
|
||||||
|
this.viewDetail(data.id)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 查看详情
|
||||||
|
viewDetail(id) {
|
||||||
|
this.editMode = 'detail';
|
||||||
|
this.open = true;
|
||||||
|
this.form.id = id;
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$refs['drawer'].init();
|
||||||
|
});
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
81
src/views/areavisual/region/add-or-updata.vue
Normal file
@@ -0,0 +1,81 @@
|
|||||||
|
<!--
|
||||||
|
* @Author: zwq
|
||||||
|
* @Date: 2021-11-18 14:16:25
|
||||||
|
* @LastEditors: zwq
|
||||||
|
* @LastEditTime: 2025-11-28 14:38:31
|
||||||
|
* @Description:
|
||||||
|
-->
|
||||||
|
<template>
|
||||||
|
<el-form
|
||||||
|
:model="dataForm"
|
||||||
|
:rules="dataRule"
|
||||||
|
ref="dataForm"
|
||||||
|
@keyup.enter.native="dataFormSubmit()"
|
||||||
|
label-width="80px">
|
||||||
|
<el-row :gutter="20">
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="物料编码" prop="materialCode">
|
||||||
|
<el-input
|
||||||
|
v-model="dataForm.materialCode"
|
||||||
|
clearable
|
||||||
|
placeholder="请输入物料编码" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="物料型号" prop="materialName">
|
||||||
|
<el-input
|
||||||
|
v-model="dataForm.materialName"
|
||||||
|
clearable
|
||||||
|
placeholder="请输入物料型号" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row :gutter="20">
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="物料规格" prop="material">
|
||||||
|
<el-input
|
||||||
|
v-model="dataForm.material"
|
||||||
|
clearable
|
||||||
|
placeholder="请输入物料规格" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-form>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import basicAdd from '@/mixins/basic-add';
|
||||||
|
import { createProduct, updateProduct,getProduct } from '@/api/ssdl/product&recipe';
|
||||||
|
|
||||||
|
export default {
|
||||||
|
mixins: [basicAdd],
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
urlOptions: {
|
||||||
|
createURL: createProduct,
|
||||||
|
updateURL: updateProduct,
|
||||||
|
infoURL: getProduct,
|
||||||
|
},
|
||||||
|
dataForm: {
|
||||||
|
id: undefined,
|
||||||
|
material: undefined,
|
||||||
|
materialName: undefined,
|
||||||
|
materialCode: undefined,
|
||||||
|
},
|
||||||
|
typeArr: [],
|
||||||
|
dataRule: {
|
||||||
|
materialCode: [
|
||||||
|
{ required: true, message: '物料编码不能为空', trigger: 'blur' },
|
||||||
|
],
|
||||||
|
materialName: [
|
||||||
|
{ required: true, message: '物料型号不能为空', trigger: 'blur' },
|
||||||
|
],
|
||||||
|
material: [
|
||||||
|
{ required: true, message: '规格不能为空', trigger: 'blur' },
|
||||||
|
],
|
||||||
|
},
|
||||||
|
};
|
||||||
|
},
|
||||||
|
methods: {},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
62
src/views/areavisual/region/changeStatus.vue
Normal file
@@ -0,0 +1,62 @@
|
|||||||
|
<!--
|
||||||
|
* @Author: zwq
|
||||||
|
* @Date: 2025-10-11 14:41:12
|
||||||
|
* @LastEditors: zwq
|
||||||
|
* @LastEditTime: 2026-01-14 14:13:14
|
||||||
|
* @Description:
|
||||||
|
-->
|
||||||
|
<template>
|
||||||
|
<el-switch
|
||||||
|
@change="changeStatus"
|
||||||
|
size="small"
|
||||||
|
v-model="injectData.regionState"
|
||||||
|
:active-value="1"
|
||||||
|
:inactive-value="2"></el-switch>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { updateRegion } from '@/api/areavisual/region';
|
||||||
|
export default {
|
||||||
|
props: {
|
||||||
|
injectData: {
|
||||||
|
type: Object,
|
||||||
|
default: () => ({}),
|
||||||
|
},
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {};
|
||||||
|
},
|
||||||
|
created() {},
|
||||||
|
methods: {
|
||||||
|
changeStatus(val) {
|
||||||
|
const pdata = { ...this.injectData, regionState: val };
|
||||||
|
this.$confirm(
|
||||||
|
`是否确认修改${'区域 [ ' + this.injectData.regionName + ' ] '}的状态?`,
|
||||||
|
'更新状态',
|
||||||
|
{
|
||||||
|
confirmButtonText: '确认修改',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
type: 'warning',
|
||||||
|
}
|
||||||
|
)
|
||||||
|
.then(() => {
|
||||||
|
updateRegion(pdata).then((res) => {
|
||||||
|
if (res.code === 0 || res.code === 200) {
|
||||||
|
this.$modal.msgSuccess('修改成功');
|
||||||
|
this.$emit('emitData');
|
||||||
|
} else {
|
||||||
|
this.$modal.msg(res.msg);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
})
|
||||||
|
.catch((res) => {
|
||||||
|
this.$emit('emitData');
|
||||||
|
this.$message({
|
||||||
|
type: 'info',
|
||||||
|
message: '已取消',
|
||||||
|
});
|
||||||
|
});
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
221
src/views/areavisual/region/index.vue
Normal file
@@ -0,0 +1,221 @@
|
|||||||
|
<template>
|
||||||
|
<div class="app-container">
|
||||||
|
<search-bar
|
||||||
|
:formConfigs="formConfig"
|
||||||
|
ref="searchBarForm"
|
||||||
|
@headBtnClick="buttonClick" />
|
||||||
|
<base-table
|
||||||
|
v-loading="dataListLoading"
|
||||||
|
:table-props="tableProps"
|
||||||
|
:page="listQuery.pageNo"
|
||||||
|
:limit="listQuery.pageSize"
|
||||||
|
:table-data="tableData"
|
||||||
|
@emitFun="getDataList">
|
||||||
|
</base-table>
|
||||||
|
<pagination
|
||||||
|
:limit.sync="listQuery.pageSize"
|
||||||
|
:page.sync="listQuery.pageNo"
|
||||||
|
:total="listQuery.total"
|
||||||
|
@pagination="getDataList" />
|
||||||
|
<base-dialog
|
||||||
|
:dialogTitle="addOrEditTitle"
|
||||||
|
:dialogVisible="addOrUpdateVisible"
|
||||||
|
@cancel="handleCancel"
|
||||||
|
@confirm="handleConfirm"
|
||||||
|
:before-close="handleCancel"
|
||||||
|
width="50%">
|
||||||
|
<add-or-update
|
||||||
|
ref="addOrUpdate"
|
||||||
|
@refreshDataList="successSubmit"></add-or-update>
|
||||||
|
</base-dialog>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import AddOrUpdate from './add-or-updata';
|
||||||
|
import basicPage from '@/mixins/basic-page';
|
||||||
|
import { parseTime } from '@/filter/code-filter';
|
||||||
|
import { deleteRegion, getRegionPage } from '@/api/areavisual/region';
|
||||||
|
import changeStatus from './changeStatus.vue';
|
||||||
|
|
||||||
|
const region = [
|
||||||
|
{
|
||||||
|
id: '1',
|
||||||
|
name: 'A区域',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: '2',
|
||||||
|
name: 'B区域',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: '3',
|
||||||
|
name: 'C区域',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: '4',
|
||||||
|
name: 'D区域',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: '5',
|
||||||
|
name: 'E区域',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: '6',
|
||||||
|
name: 'F区域',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: '7',
|
||||||
|
name: 'G区域',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: '8',
|
||||||
|
name: 'H区域',
|
||||||
|
},
|
||||||
|
];
|
||||||
|
const regionType = [
|
||||||
|
{
|
||||||
|
id: '1',
|
||||||
|
name: '拉丝缓存区',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: '2',
|
||||||
|
name: '满盘存储区',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: '3',
|
||||||
|
name: '空盘存储区',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: '4',
|
||||||
|
name: '复绕区',
|
||||||
|
},
|
||||||
|
];
|
||||||
|
const tableProps = [
|
||||||
|
{
|
||||||
|
prop: 'regionCode',
|
||||||
|
label: '区域编码',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'regionName',
|
||||||
|
label: '区域名称',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'region',
|
||||||
|
label: '区域',
|
||||||
|
filter: (val) => {
|
||||||
|
return region.find((i) => i.id == val)
|
||||||
|
? region.find((i) => i.id == val).name
|
||||||
|
: '-';
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'regionType',
|
||||||
|
label: '区域类型',
|
||||||
|
filter: (val) => {
|
||||||
|
return regionType.find((i) => i.id == val)
|
||||||
|
? regionType.find((i) => i.id == val).name
|
||||||
|
: '-';
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'rowNum',
|
||||||
|
label: '行数',
|
||||||
|
width:90,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'columnNum',
|
||||||
|
label: '列数',
|
||||||
|
width:90,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'regionState',
|
||||||
|
label: '区域状态',
|
||||||
|
width:90,
|
||||||
|
subcomponent: changeStatus,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'createTime',
|
||||||
|
label: '创建时间',
|
||||||
|
filter: parseTime,
|
||||||
|
width: 150,
|
||||||
|
},
|
||||||
|
];
|
||||||
|
|
||||||
|
export default {
|
||||||
|
mixins: [basicPage],
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
urlOptions: {
|
||||||
|
getDataListURL: getRegionPage,
|
||||||
|
deleteURL: deleteRegion,
|
||||||
|
},
|
||||||
|
tableProps,
|
||||||
|
tableData: [],
|
||||||
|
formConfig: [
|
||||||
|
{
|
||||||
|
type: 'input',
|
||||||
|
label: '名称',
|
||||||
|
placeholder: '名称',
|
||||||
|
param: 'name',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: 'input',
|
||||||
|
label: '编码',
|
||||||
|
placeholder: '编码',
|
||||||
|
param: 'code',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: 'select',
|
||||||
|
label: '区域',
|
||||||
|
selectOptions: region,
|
||||||
|
placeholder: '请选择区域',
|
||||||
|
param: 'region',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: 'button',
|
||||||
|
btnName: '搜索',
|
||||||
|
name: 'search',
|
||||||
|
color: 'primary',
|
||||||
|
},
|
||||||
|
],
|
||||||
|
};
|
||||||
|
},
|
||||||
|
components: {
|
||||||
|
AddOrUpdate,
|
||||||
|
},
|
||||||
|
created() {},
|
||||||
|
methods: {
|
||||||
|
buttonClick(val) {
|
||||||
|
switch (val.btnName) {
|
||||||
|
case 'search':
|
||||||
|
this.listQuery.pageNo = 1;
|
||||||
|
this.listQuery.pageSize = 20;
|
||||||
|
this.listQuery.regionName = val.name;
|
||||||
|
this.listQuery.regionCode = val.code;
|
||||||
|
this.listQuery.region = val.region;
|
||||||
|
this.getDataList();
|
||||||
|
break;
|
||||||
|
case 'reset':
|
||||||
|
this.$refs.searchBarForm.resetForm();
|
||||||
|
this.listQuery = {
|
||||||
|
pageSize: 20,
|
||||||
|
pageNo: 1,
|
||||||
|
total: 1,
|
||||||
|
};
|
||||||
|
this.getDataList();
|
||||||
|
break;
|
||||||
|
case 'add':
|
||||||
|
this.addOrEditTitle = '新增';
|
||||||
|
this.addOrUpdateVisible = true;
|
||||||
|
this.addOrUpdateHandle();
|
||||||
|
break;
|
||||||
|
case 'export':
|
||||||
|
this.handleExport();
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
console.log(val);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
@@ -1,100 +0,0 @@
|
|||||||
<!--
|
|
||||||
filename: index.vue
|
|
||||||
author: liubin
|
|
||||||
date: 2023-10-11 09:32:04
|
|
||||||
description: 设备看板
|
|
||||||
-->
|
|
||||||
|
|
||||||
<template>
|
|
||||||
<div ref="dataBoard" class="data-board">
|
|
||||||
<el-button type="text" @click="goback" class="go-back--btn">返回</el-button>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
export default {
|
|
||||||
name: 'DataBoard',
|
|
||||||
components: {},
|
|
||||||
props: {},
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
appMain: null, // dom
|
|
||||||
parentStyle: {
|
|
||||||
margin: '8px 14px 0px 16px',
|
|
||||||
minHeight: 'calc(100vh - 120px - 8px)',
|
|
||||||
}, // object
|
|
||||||
mainFooter: null, // dom
|
|
||||||
};
|
|
||||||
},
|
|
||||||
// mounted() {
|
|
||||||
// this.$nextTick(() => {
|
|
||||||
// this.modify();
|
|
||||||
// });
|
|
||||||
// },
|
|
||||||
// activated() {
|
|
||||||
// this.modify();
|
|
||||||
// },
|
|
||||||
// deactivated() {
|
|
||||||
// this.recover();
|
|
||||||
// },
|
|
||||||
// beforeDestroy() {
|
|
||||||
// this.recover();
|
|
||||||
// },
|
|
||||||
methods: {
|
|
||||||
// modify() {
|
|
||||||
// // 在这个页面临时修改下父类的margin,结束时需还原
|
|
||||||
// this.appMain = document.querySelector('.app-main');
|
|
||||||
// // this.appMain.style.minHeight = 'calc(100vh - 90px)';
|
|
||||||
// this.appMain.style.margin = 0;
|
|
||||||
// // 在这个页面临时删除 main-footer 元素,结束时需还原
|
|
||||||
// // this.mainFooter = document.querySelector('.main-footer').cloneNode(true);
|
|
||||||
// // document.querySelector('.main-footer').remove();
|
|
||||||
// this.$refs.dataBoard.classList.add('data-board');
|
|
||||||
// },
|
|
||||||
// recover() {
|
|
||||||
// this.$refs.dataBoard.classList.remove('data-board');
|
|
||||||
// this.$nextTick(() => {
|
|
||||||
// this.appMain.style.margin = this.parentStyle.margin;
|
|
||||||
// // this.appMain.style.minHeight = this.parentStyle.minHeight;
|
|
||||||
// // this.appMain.insertAdjacentElement('afterend', this.mainFooter);
|
|
||||||
// });
|
|
||||||
// },
|
|
||||||
goback() {
|
|
||||||
this.$router.go(-1);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
};
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style scoped lang="scss">
|
|
||||||
.data-board {
|
|
||||||
position: absolute;
|
|
||||||
top: 0;
|
|
||||||
left: 0;
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
background: url('../../../assets/images/DataBoard.png') 100% 100% / contain
|
|
||||||
no-repeat;
|
|
||||||
}
|
|
||||||
|
|
||||||
.go-back--btn {
|
|
||||||
position: fixed;
|
|
||||||
top: 28px;
|
|
||||||
left: 24px;
|
|
||||||
color: #fff;
|
|
||||||
font-size: 18px;
|
|
||||||
letter-spacing: 6px;
|
|
||||||
|
|
||||||
&:hover {
|
|
||||||
text-decoration: underline;
|
|
||||||
}
|
|
||||||
|
|
||||||
&::after {
|
|
||||||
content: "\2BAA";
|
|
||||||
position: absolute;
|
|
||||||
top: 6px;
|
|
||||||
right: -26px;
|
|
||||||
font-size: 24px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
@@ -1,214 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div class="app-container">
|
|
||||||
|
|
||||||
<!-- 搜索工作栏 -->
|
|
||||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
|
||||||
<el-form-item label="设备id" prop="equipmentId">
|
|
||||||
<el-input v-model="queryParams.equipmentId" placeholder="请输入设备id" clearable @keyup.enter.native="handleQuery"/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item>
|
|
||||||
<el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>
|
|
||||||
<el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>
|
|
||||||
</el-form-item>
|
|
||||||
</el-form>
|
|
||||||
|
|
||||||
<!-- 操作工具栏 -->
|
|
||||||
<el-row :gutter="10" class="mb8">
|
|
||||||
<el-col :span="1.5">
|
|
||||||
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd"
|
|
||||||
v-hasPermi="['base:equipment-attr:create']">新增</el-button>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="1.5">
|
|
||||||
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport" :loading="exportLoading"
|
|
||||||
v-hasPermi="['base:equipment-attr:export']">导出</el-button>
|
|
||||||
</el-col>
|
|
||||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
|
||||||
</el-row>
|
|
||||||
|
|
||||||
<!-- 列表 -->
|
|
||||||
<el-table v-loading="loading" :data="list">
|
|
||||||
<el-table-column label="ID" align="center" prop="id" />
|
|
||||||
<el-table-column label="设备id" align="center" prop="equipmentId" />
|
|
||||||
<el-table-column label="属性名称" align="center" prop="name" />
|
|
||||||
<el-table-column label="属性值" align="center" prop="value" />
|
|
||||||
<el-table-column label="创建时间" align="center" prop="createTime" width="180">
|
|
||||||
<template v-slot="scope">
|
|
||||||
<span>{{ parseTime(scope.row.createTime) }}</span>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
|
||||||
<template v-slot="scope">
|
|
||||||
<el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)"
|
|
||||||
v-hasPermi="['base:equipment-attr:update']">修改</el-button>
|
|
||||||
<el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)"
|
|
||||||
v-hasPermi="['base:equipment-attr:delete']">删除</el-button>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
</el-table>
|
|
||||||
<!-- 分页组件 -->
|
|
||||||
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNo" :limit.sync="queryParams.pageSize"
|
|
||||||
@pagination="getList"/>
|
|
||||||
|
|
||||||
<!-- 对话框(添加 / 修改) -->
|
|
||||||
<el-dialog :title="title" :visible.sync="open" width="500px" v-dialogDrag append-to-body>
|
|
||||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
|
||||||
<el-form-item label="设备id" prop="equipmentId">
|
|
||||||
<el-input v-model="form.equipmentId" placeholder="请输入设备id" />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="属性名称" prop="name">
|
|
||||||
<el-input v-model="form.name" placeholder="请输入属性名称" />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="属性值" prop="value">
|
|
||||||
<el-input v-model="form.value" placeholder="请输入属性值" />
|
|
||||||
</el-form-item>
|
|
||||||
</el-form>
|
|
||||||
<div slot="footer" class="dialog-footer">
|
|
||||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
|
||||||
<el-button @click="cancel">取 消</el-button>
|
|
||||||
</div>
|
|
||||||
</el-dialog>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
import { createEquipmentAttr, updateEquipmentAttr, deleteEquipmentAttr, getEquipmentAttr, getEquipmentAttrPage, exportEquipmentAttrExcel } from "@/api/base/equipmentAttr";
|
|
||||||
|
|
||||||
export default {
|
|
||||||
name: "EquipmentAttr",
|
|
||||||
components: {
|
|
||||||
},
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
// 遮罩层
|
|
||||||
loading: true,
|
|
||||||
// 导出遮罩层
|
|
||||||
exportLoading: false,
|
|
||||||
// 显示搜索条件
|
|
||||||
showSearch: true,
|
|
||||||
// 总条数
|
|
||||||
total: 0,
|
|
||||||
// 设备属性列表
|
|
||||||
list: [],
|
|
||||||
// 弹出层标题
|
|
||||||
title: "",
|
|
||||||
// 是否显示弹出层
|
|
||||||
open: false,
|
|
||||||
// 查询参数
|
|
||||||
queryParams: {
|
|
||||||
pageNo: 1,
|
|
||||||
pageSize: 10,
|
|
||||||
equipmentId: null,
|
|
||||||
},
|
|
||||||
// 表单参数
|
|
||||||
form: {},
|
|
||||||
// 表单校验
|
|
||||||
rules: {
|
|
||||||
equipmentId: [{ required: true, message: "设备id不能为空", trigger: "blur" }],
|
|
||||||
}
|
|
||||||
};
|
|
||||||
},
|
|
||||||
created() {
|
|
||||||
this.getList();
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
/** 查询列表 */
|
|
||||||
getList() {
|
|
||||||
this.loading = true;
|
|
||||||
// 执行查询
|
|
||||||
getEquipmentAttrPage(this.queryParams).then(response => {
|
|
||||||
this.list = response.data.list;
|
|
||||||
this.total = response.data.total;
|
|
||||||
this.loading = false;
|
|
||||||
});
|
|
||||||
},
|
|
||||||
/** 取消按钮 */
|
|
||||||
cancel() {
|
|
||||||
this.open = false;
|
|
||||||
this.reset();
|
|
||||||
},
|
|
||||||
/** 表单重置 */
|
|
||||||
reset() {
|
|
||||||
this.form = {
|
|
||||||
id: undefined,
|
|
||||||
equipmentId: undefined,
|
|
||||||
name: undefined,
|
|
||||||
value: undefined,
|
|
||||||
};
|
|
||||||
this.resetForm("form");
|
|
||||||
},
|
|
||||||
/** 搜索按钮操作 */
|
|
||||||
handleQuery() {
|
|
||||||
this.queryParams.pageNo = 1;
|
|
||||||
this.getList();
|
|
||||||
},
|
|
||||||
/** 重置按钮操作 */
|
|
||||||
resetQuery() {
|
|
||||||
this.resetForm("queryForm");
|
|
||||||
this.handleQuery();
|
|
||||||
},
|
|
||||||
/** 新增按钮操作 */
|
|
||||||
handleAdd() {
|
|
||||||
this.reset();
|
|
||||||
this.open = true;
|
|
||||||
this.title = "添加设备属性";
|
|
||||||
},
|
|
||||||
/** 修改按钮操作 */
|
|
||||||
handleUpdate(row) {
|
|
||||||
this.reset();
|
|
||||||
const id = row.id;
|
|
||||||
getEquipmentAttr(id).then(response => {
|
|
||||||
this.form = response.data;
|
|
||||||
this.open = true;
|
|
||||||
this.title = "修改设备属性";
|
|
||||||
});
|
|
||||||
},
|
|
||||||
/** 提交按钮 */
|
|
||||||
submitForm() {
|
|
||||||
this.$refs["form"].validate(valid => {
|
|
||||||
if (!valid) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
// 修改的提交
|
|
||||||
if (this.form.id != null) {
|
|
||||||
updateEquipmentAttr(this.form).then(response => {
|
|
||||||
this.$modal.msgSuccess("修改成功");
|
|
||||||
this.open = false;
|
|
||||||
this.getList();
|
|
||||||
});
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
// 添加的提交
|
|
||||||
createEquipmentAttr(this.form).then(response => {
|
|
||||||
this.$modal.msgSuccess("新增成功");
|
|
||||||
this.open = false;
|
|
||||||
this.getList();
|
|
||||||
});
|
|
||||||
});
|
|
||||||
},
|
|
||||||
/** 删除按钮操作 */
|
|
||||||
handleDelete(row) {
|
|
||||||
const id = row.id;
|
|
||||||
this.$modal.confirm('是否确认删除设备属性编号为"' + id + '"的数据项?').then(function() {
|
|
||||||
return deleteEquipmentAttr(id);
|
|
||||||
}).then(() => {
|
|
||||||
this.getList();
|
|
||||||
this.$modal.msgSuccess("删除成功");
|
|
||||||
}).catch(() => {});
|
|
||||||
},
|
|
||||||
/** 导出按钮操作 */
|
|
||||||
handleExport() {
|
|
||||||
// 处理查询参数
|
|
||||||
let params = {...this.queryParams};
|
|
||||||
params.pageNo = undefined;
|
|
||||||
params.pageSize = undefined;
|
|
||||||
this.$modal.confirm('是否确认导出所有设备属性数据项?').then(() => {
|
|
||||||
this.exportLoading = true;
|
|
||||||
return exportEquipmentAttrExcel(params);
|
|
||||||
}).then(response => {
|
|
||||||
this.$download.excel(response, '设备属性.xls');
|
|
||||||
this.exportLoading = false;
|
|
||||||
}).catch(() => {});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
</script>
|
|
||||||
@@ -1,482 +0,0 @@
|
|||||||
<!--
|
|
||||||
filename: EquipmentDrawer.vue
|
|
||||||
author: liubin
|
|
||||||
date: 2023-08-22 14:38:56
|
|
||||||
description:
|
|
||||||
-->
|
|
||||||
|
|
||||||
<template>
|
|
||||||
<el-drawer
|
|
||||||
:visible="visible"
|
|
||||||
:show-close="false"
|
|
||||||
:wrapper-closable="false"
|
|
||||||
class="drawer"
|
|
||||||
custom-class="mes-drawer"
|
|
||||||
size="60%"
|
|
||||||
@closed="$emit('destroy')">
|
|
||||||
<SmallTitle slot="title">
|
|
||||||
{{
|
|
||||||
mode.includes('detail')
|
|
||||||
? '详情'
|
|
||||||
: mode.includes('edit')
|
|
||||||
? '编辑'
|
|
||||||
: '新增'
|
|
||||||
}}
|
|
||||||
</SmallTitle>
|
|
||||||
|
|
||||||
<div class="drawer-body flex">
|
|
||||||
<div class="drawer-body__content">
|
|
||||||
<section v-for="(section, index) in sections" :key="section.key">
|
|
||||||
<SmallTitle v-if="index != 0">{{ section.name }}</SmallTitle>
|
|
||||||
|
|
||||||
<div class="form-part" v-if="section.key == 'base'">
|
|
||||||
<el-skeleton v-if="!showForm" animated />
|
|
||||||
<BaseInfoForm
|
|
||||||
key="drawer-dialog-form"
|
|
||||||
v-if="showForm"
|
|
||||||
ref="form"
|
|
||||||
:disabled="true"
|
|
||||||
:dataForm="form"
|
|
||||||
:rows="formRows" />
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div v-if="section.key == 'attrs'" style="margin-top: 12px">
|
|
||||||
<base-table
|
|
||||||
v-loading="attrListLoading"
|
|
||||||
:table-props="section.props"
|
|
||||||
:page="attrQuery?.params.pageNo || 1"
|
|
||||||
:limit="attrQuery?.params.pageSize || 10"
|
|
||||||
:table-data="list"
|
|
||||||
:add-button-show="mode.includes('detail') ? null : '添加属性'"
|
|
||||||
@emitButtonClick="handleAddAttr"
|
|
||||||
@emitFun="handleEmitFun">
|
|
||||||
<method-btn
|
|
||||||
v-if="section.tableBtn"
|
|
||||||
slot="handleBtn"
|
|
||||||
label="操作"
|
|
||||||
:method-list="tableBtn"
|
|
||||||
@clickBtn="handleTableBtnClick" />
|
|
||||||
</base-table>
|
|
||||||
|
|
||||||
<!-- 分页组件 -->
|
|
||||||
<pagination
|
|
||||||
v-show="total > 0"
|
|
||||||
:total="total"
|
|
||||||
:page.sync="attrQuery.params.pageNo"
|
|
||||||
:limit.sync="attrQuery.params.pageSize"
|
|
||||||
@pagination="getAttrList" />
|
|
||||||
</div>
|
|
||||||
</section>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="drawer-body__footer">
|
|
||||||
<el-button style="" @click="handleCancel">取消</el-button>
|
|
||||||
<el-button v-if="mode == 'detail'" type="primary" @click="toggleEdit">
|
|
||||||
编辑
|
|
||||||
</el-button>
|
|
||||||
<el-button v-else type="primary" @click="handleCancel">确定</el-button>
|
|
||||||
<!-- sections的第二项必须是 属性列表 -->
|
|
||||||
<!-- <el-button
|
|
||||||
v-if="sections[1].allowAdd"
|
|
||||||
type="primary"
|
|
||||||
@click="handleAddAttr">
|
|
||||||
添加属性
|
|
||||||
</el-button> -->
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- 属性对话框 -->
|
|
||||||
<base-dialog
|
|
||||||
v-if="sections[1].allowAdd"
|
|
||||||
:dialogTitle="attrTitle"
|
|
||||||
:dialogVisible="attrFormVisible"
|
|
||||||
width="45%"
|
|
||||||
:append-to-body="true"
|
|
||||||
custom-class="baseDialog"
|
|
||||||
@close="closeAttrForm"
|
|
||||||
@cancel="closeAttrForm"
|
|
||||||
@confirm="submitAttrForm">
|
|
||||||
<DialogForm
|
|
||||||
v-if="attrFormVisible"
|
|
||||||
ref="attrForm"
|
|
||||||
:disabled="mode.includes('detail')"
|
|
||||||
v-model="attrForm"
|
|
||||||
:rows="attrRows" />
|
|
||||||
</base-dialog>
|
|
||||||
</el-drawer>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
import BaseInfoForm from '@/components/DialogForm';
|
|
||||||
import DialogForm from './dialogForm';
|
|
||||||
|
|
||||||
const SmallTitle = {
|
|
||||||
name: 'SmallTitle',
|
|
||||||
props: ['size'],
|
|
||||||
data() {
|
|
||||||
return {};
|
|
||||||
},
|
|
||||||
methods: {},
|
|
||||||
render: function (h) {
|
|
||||||
return h(
|
|
||||||
'span',
|
|
||||||
{
|
|
||||||
class: 'small-title',
|
|
||||||
style: {
|
|
||||||
fontSize: '18px',
|
|
||||||
lineHeight:
|
|
||||||
this.size == 'lg' ? '24px' : this.size == 'sm' ? '18px' : '20px',
|
|
||||||
fontWeight: 500,
|
|
||||||
fontFamily: '微软雅黑, Microsoft YaHei, Arial, Helvetica, sans-serif',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
this.$slots.default
|
|
||||||
);
|
|
||||||
},
|
|
||||||
};
|
|
||||||
|
|
||||||
export default {
|
|
||||||
components: { SmallTitle, DialogForm, BaseInfoForm },
|
|
||||||
props: ['sections', 'defaultMode', 'dataId'], // dataId 作为一个通用的存放id的字段
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
mode: '',
|
|
||||||
visible: false,
|
|
||||||
showForm: false,
|
|
||||||
total: 0,
|
|
||||||
form: {},
|
|
||||||
list: [],
|
|
||||||
attrTitle: '',
|
|
||||||
attrForm: {
|
|
||||||
id: null,
|
|
||||||
equipmentGroupId: '',
|
|
||||||
code: '',
|
|
||||||
type: '',
|
|
||||||
grade: '',
|
|
||||||
alarmCode: '',
|
|
||||||
alarmContent: '',
|
|
||||||
plcParamName: '',
|
|
||||||
},
|
|
||||||
attrFormVisible: false,
|
|
||||||
attrRows: [
|
|
||||||
[
|
|
||||||
{
|
|
||||||
input: true,
|
|
||||||
label: '报警编码', // 自动生成
|
|
||||||
prop: 'code',
|
|
||||||
url: '/base/equipment-group-alarm/getCode',
|
|
||||||
rules: [{ required: true, message: '不能为空', trigger: 'blur' }],
|
|
||||||
},
|
|
||||||
{
|
|
||||||
select: true,
|
|
||||||
label: '报警类型', // 固定选项
|
|
||||||
prop: 'type',
|
|
||||||
options: [
|
|
||||||
{ label: '布尔型', value: 2 },
|
|
||||||
{ label: '字符型', value: 1 },
|
|
||||||
],
|
|
||||||
rules: [{ required: true, message: '不能为空', trigger: 'blur' }],
|
|
||||||
},
|
|
||||||
],
|
|
||||||
[
|
|
||||||
{
|
|
||||||
select: true,
|
|
||||||
label: '报警级别', // 字典
|
|
||||||
prop: 'grade',
|
|
||||||
options: this.getDictDatas(this.DICT_TYPE.EQU_ALARM_LEVEL),
|
|
||||||
},
|
|
||||||
{
|
|
||||||
input: true,
|
|
||||||
label: '设备报警编码', // 对应到设备实际的报警编码
|
|
||||||
prop: 'alarmCode',
|
|
||||||
},
|
|
||||||
],
|
|
||||||
[
|
|
||||||
{
|
|
||||||
input: true,
|
|
||||||
label: '参数列名', // 在实时数据库的列名
|
|
||||||
prop: 'plcParamName',
|
|
||||||
rules: [{ required: true, message: '不能为空', trigger: 'blur' }],
|
|
||||||
},
|
|
||||||
{
|
|
||||||
input: true,
|
|
||||||
label: '报警内容',
|
|
||||||
prop: 'alarmContent',
|
|
||||||
rules: [{ required: true, message: '不能为空', trigger: 'blur' }],
|
|
||||||
},
|
|
||||||
],
|
|
||||||
],
|
|
||||||
attrQuery: {
|
|
||||||
params: {
|
|
||||||
pageNo: 1,
|
|
||||||
pageSize: 10,
|
|
||||||
},
|
|
||||||
}, // 属性列表的请求
|
|
||||||
infoQuery: null, // 基本信息的请求
|
|
||||||
attrFormSubmitting: false,
|
|
||||||
attrListLoading: false,
|
|
||||||
};
|
|
||||||
},
|
|
||||||
computed: {
|
|
||||||
formRows() {
|
|
||||||
return this.sections[0].rows.map((row) => {
|
|
||||||
return row.map((col) => {
|
|
||||||
return {
|
|
||||||
...col,
|
|
||||||
bind: {
|
|
||||||
// 详情 模式下,禁用各种输入
|
|
||||||
// disabled: this.mode == 'detail',
|
|
||||||
disabled: true,
|
|
||||||
},
|
|
||||||
};
|
|
||||||
});
|
|
||||||
});
|
|
||||||
},
|
|
||||||
tableBtn() {
|
|
||||||
return this.mode == 'detail' ? [] : this.sections[1].tableBtn;
|
|
||||||
},
|
|
||||||
},
|
|
||||||
mounted() {
|
|
||||||
this.mode = this.defaultMode || 'detail';
|
|
||||||
for (const section of this.sections) {
|
|
||||||
// 请求具体信息
|
|
||||||
if ('url' in section) {
|
|
||||||
const query = {
|
|
||||||
url: section.url,
|
|
||||||
method: section.method || 'get',
|
|
||||||
params: section.queryParams || null,
|
|
||||||
data: section.data || null,
|
|
||||||
};
|
|
||||||
// debugger;
|
|
||||||
this.$axios(query).then(({ data }) => {
|
|
||||||
if (section.key == 'base') {
|
|
||||||
this.form = data;
|
|
||||||
this.showForm = true;
|
|
||||||
this.infoQuery = query;
|
|
||||||
} else if (section.key == 'attrs') {
|
|
||||||
this.attrQuery = query;
|
|
||||||
this.list = data.list;
|
|
||||||
this.total = data.total;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
handleTableBtnClick({ type, data }) {
|
|
||||||
switch (type) {
|
|
||||||
case 'edit':
|
|
||||||
this.handleEditAttr(data.id);
|
|
||||||
break;
|
|
||||||
case 'delete':
|
|
||||||
this.handleDeleteAttr(data.id);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
handleEmitFun(val) {
|
|
||||||
console.log('handleEmitFun', val);
|
|
||||||
},
|
|
||||||
|
|
||||||
init() {
|
|
||||||
this.visible = true;
|
|
||||||
},
|
|
||||||
|
|
||||||
async getAttrList() {
|
|
||||||
this.attrListLoading = true;
|
|
||||||
const res = await this.$axios(this.attrQuery);
|
|
||||||
if (res.code == 0) {
|
|
||||||
this.list = res.data.list;
|
|
||||||
this.total = res.data.total;
|
|
||||||
}
|
|
||||||
this.attrListLoading = false;
|
|
||||||
},
|
|
||||||
|
|
||||||
// 保存表单
|
|
||||||
handleSave() {
|
|
||||||
this.$refs['form'][0].validate(async (valid) => {
|
|
||||||
if (valid) {
|
|
||||||
const isEdit = this.mode == 'edit';
|
|
||||||
await this.$axios({
|
|
||||||
url: this.sections[0][isEdit ? 'urlUpdate' : 'urlCreate'],
|
|
||||||
method: isEdit ? 'put' : 'post',
|
|
||||||
data: this.form,
|
|
||||||
});
|
|
||||||
this.$modal.msgSuccess(`${isEdit ? '更新' : '创建'}成功`);
|
|
||||||
this.visible = false;
|
|
||||||
this.$emit('refreshDataList');
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
|
|
||||||
handleCancel() {
|
|
||||||
this.visible = false;
|
|
||||||
},
|
|
||||||
|
|
||||||
// 开启编辑
|
|
||||||
toggleEdit() {
|
|
||||||
this.mode = 'edit';
|
|
||||||
},
|
|
||||||
|
|
||||||
// 新增属性
|
|
||||||
handleAddAttr() {
|
|
||||||
if (!this.dataId) return this.$message.warning('请先创建设备分组信息');
|
|
||||||
this.attrForm = {
|
|
||||||
id: null,
|
|
||||||
equipmentGroupId: this.dataId,
|
|
||||||
code: '',
|
|
||||||
type: '',
|
|
||||||
grade: '',
|
|
||||||
alarmCode: '',
|
|
||||||
alarmContent: '',
|
|
||||||
plcParamName: '',
|
|
||||||
};
|
|
||||||
this.attrTitle = '添加设备分组报警';
|
|
||||||
this.attrFormVisible = true;
|
|
||||||
},
|
|
||||||
|
|
||||||
// 编辑属性
|
|
||||||
async handleEditAttr(attrId) {
|
|
||||||
const res = await this.$axios({
|
|
||||||
url: this.sections[1].urlDetail,
|
|
||||||
method: 'get',
|
|
||||||
params: { id: attrId },
|
|
||||||
});
|
|
||||||
if (res.code == 0) {
|
|
||||||
this.attrForm = res.data;
|
|
||||||
this.attrTitle = '编辑设备分组报警';
|
|
||||||
this.attrFormVisible = true;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
// 删除属性
|
|
||||||
handleDeleteAttr(attrId) {
|
|
||||||
this.$confirm('确定删除该分组报警?', '提示', {
|
|
||||||
confirmButtonText: '确定',
|
|
||||||
cancelButtonText: '取消',
|
|
||||||
type: 'warning',
|
|
||||||
})
|
|
||||||
.then(async () => {
|
|
||||||
const res = await this.$axios({
|
|
||||||
url: this.sections[1].urlDelete,
|
|
||||||
method: 'delete',
|
|
||||||
params: { id: attrId },
|
|
||||||
});
|
|
||||||
if (res.code == 0) {
|
|
||||||
this.$message({
|
|
||||||
message: '删除成功',
|
|
||||||
type: 'success',
|
|
||||||
duration: 1500,
|
|
||||||
onClose: () => {
|
|
||||||
this.getAttrList();
|
|
||||||
},
|
|
||||||
});
|
|
||||||
}
|
|
||||||
})
|
|
||||||
.catch(() => {});
|
|
||||||
},
|
|
||||||
|
|
||||||
// 提交属性表
|
|
||||||
async submitAttrForm() {
|
|
||||||
this.$refs['attrForm'].validate((valid) => {
|
|
||||||
if (!valid) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
console.log('this.attrform', this.attrForm);
|
|
||||||
const isEdit = this.attrForm.id != null;
|
|
||||||
this.attrFormSubmitting = true;
|
|
||||||
const res = await this.$axios({
|
|
||||||
url: isEdit ? this.sections[1].urlUpdate : this.sections[1].urlCreate,
|
|
||||||
method: isEdit ? 'put' : 'post',
|
|
||||||
data: this.attrForm,
|
|
||||||
});
|
|
||||||
|
|
||||||
if (res.code == 0) {
|
|
||||||
this.closeAttrForm();
|
|
||||||
this.$message({
|
|
||||||
message: `${isEdit ? '更新' : '创建'}成功`,
|
|
||||||
type: 'success',
|
|
||||||
duration: 1500,
|
|
||||||
onClose: () => {
|
|
||||||
this.getAttrList();
|
|
||||||
},
|
|
||||||
});
|
|
||||||
}
|
|
||||||
this.attrFormSubmitting = false;
|
|
||||||
},
|
|
||||||
|
|
||||||
closeAttrForm() {
|
|
||||||
this.attrFormVisible = false;
|
|
||||||
},
|
|
||||||
|
|
||||||
handleClick(raw) {
|
|
||||||
if (raw.type === 'delete') {
|
|
||||||
this.$confirm(`确定删除该报警?`, '提示', {
|
|
||||||
confirmButtonText: '确定',
|
|
||||||
cancelButtonText: '取消',
|
|
||||||
type: 'warning',
|
|
||||||
})
|
|
||||||
.then(() => {
|
|
||||||
deleteProductAttr(raw.data.id).then(({ data }) => {
|
|
||||||
this.$message({
|
|
||||||
message: '操作成功',
|
|
||||||
type: 'success',
|
|
||||||
duration: 1500,
|
|
||||||
onClose: () => {
|
|
||||||
this.getList();
|
|
||||||
},
|
|
||||||
});
|
|
||||||
});
|
|
||||||
})
|
|
||||||
.catch(() => {});
|
|
||||||
} else {
|
|
||||||
this.addNew(raw.data.id);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
},
|
|
||||||
};
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style scoped>
|
|
||||||
.drawer >>> .el-drawer {
|
|
||||||
border-radius: 8px 0 0 8px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.drawer >>> .el-drawer__header {
|
|
||||||
margin: 0;
|
|
||||||
padding: 32px 32px 24px;
|
|
||||||
border-bottom: 1px solid #dcdfe6;
|
|
||||||
margin-bottom: 0px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.small-title::before {
|
|
||||||
content: '';
|
|
||||||
display: inline-block;
|
|
||||||
vertical-align: top;
|
|
||||||
width: 4px;
|
|
||||||
height: 22px;
|
|
||||||
border-radius: 1px;
|
|
||||||
margin-right: 8px;
|
|
||||||
background-color: #0b58ff;
|
|
||||||
}
|
|
||||||
|
|
||||||
.drawer-body {
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
height: 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.drawer-body__content {
|
|
||||||
flex: 1;
|
|
||||||
/* background: #eee; */
|
|
||||||
padding: 20px 30px;
|
|
||||||
overflow-y: auto;
|
|
||||||
}
|
|
||||||
|
|
||||||
.drawer-body__footer {
|
|
||||||
display: flex;
|
|
||||||
justify-content: flex-end;
|
|
||||||
padding: 18px;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
@@ -1,186 +0,0 @@
|
|||||||
<!--
|
|
||||||
filename: dialogForm.vue
|
|
||||||
author: liubin
|
|
||||||
date: 2023-09-11 15:55:13
|
|
||||||
description: DialogForm for equipmentBindSection only
|
|
||||||
-->
|
|
||||||
|
|
||||||
<template>
|
|
||||||
<el-form
|
|
||||||
ref="form"
|
|
||||||
:model="dataForm"
|
|
||||||
label-width="100px"
|
|
||||||
v-loading="formLoading">
|
|
||||||
<el-row :gutter="20">
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item
|
|
||||||
label="报警编码"
|
|
||||||
prop="code"
|
|
||||||
:rules="[{ required: true, message: '不能为空', trigger: 'blur' }]">
|
|
||||||
<el-input
|
|
||||||
:disabled="disabled"
|
|
||||||
v-model="dataForm.code"
|
|
||||||
@change="$emit('update', dataForm)"
|
|
||||||
placeholder="请输入工段排序" />
|
|
||||||
</el-form-item>
|
|
||||||
<!--
|
|
||||||
<el-form-item
|
|
||||||
label="报警编码"
|
|
||||||
prop="code"
|
|
||||||
:rules="[{ required: true, message: '不能为空', trigger: 'blur' }]">
|
|
||||||
<el-select
|
|
||||||
v-model="dataForm.code"
|
|
||||||
placeholder="请选择产线"
|
|
||||||
@change="handleProductlineChange">
|
|
||||||
<el-option
|
|
||||||
v-for="opt in productionLineList"
|
|
||||||
:key="opt.value"
|
|
||||||
:label="opt.label"
|
|
||||||
:value="opt.value" />
|
|
||||||
</el-select>
|
|
||||||
</el-form-item> -->
|
|
||||||
</el-col>
|
|
||||||
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item
|
|
||||||
label="报警类型"
|
|
||||||
prop="type"
|
|
||||||
:rules="[{ required: true, message: '不能为空', trigger: 'blur' }]">
|
|
||||||
<el-select
|
|
||||||
:disabled="disabled"
|
|
||||||
v-model="dataForm.type"
|
|
||||||
placeholder="请选择报警类型"
|
|
||||||
@change="handleTypeChange">
|
|
||||||
<el-option
|
|
||||||
v-for="opt in [
|
|
||||||
{ label: '布尔型', value: 2 },
|
|
||||||
{ label: '字符型', value: 1 },
|
|
||||||
]"
|
|
||||||
:key="opt.value"
|
|
||||||
:label="opt.label"
|
|
||||||
:value="opt.value" />
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
<el-row :gutter="20">
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item
|
|
||||||
label="报警级别"
|
|
||||||
prop="grade"
|
|
||||||
:rules="[{ required: true, message: '不能为空', trigger: 'blur' }]">
|
|
||||||
<el-select
|
|
||||||
:disabled="disabled"
|
|
||||||
v-model="dataForm.grade"
|
|
||||||
placeholder="请选择报警级别"
|
|
||||||
@change="$emit('update', dataForm)">
|
|
||||||
<el-option
|
|
||||||
v-for="opt in getDictDatas(DICT_TYPE.EQU_ALARM_LEVEL)"
|
|
||||||
:key="opt.value"
|
|
||||||
:label="opt.label"
|
|
||||||
:value="opt.value" />
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item
|
|
||||||
v-if="+dataForm.type == 1"
|
|
||||||
label="设备报警编码"
|
|
||||||
prop="alarmCode">
|
|
||||||
<el-input
|
|
||||||
:disabled="disabled"
|
|
||||||
v-model="dataForm.alarmCode"
|
|
||||||
@change="$emit('update', dataForm)"
|
|
||||||
placeholder="请输入设备报警编码" />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
<el-row :gutter="20">
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item
|
|
||||||
label="参数列名"
|
|
||||||
prop="plcParamName"
|
|
||||||
:rules="[{ required: true, message: '不能为空', trigger: 'blur' }]">
|
|
||||||
<el-input
|
|
||||||
:disabled="disabled"
|
|
||||||
v-model="dataForm.plcParamName"
|
|
||||||
placeholder="请输入参数列名"
|
|
||||||
@change="$emit('update', dataForm)"></el-input>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item
|
|
||||||
label="报警内容"
|
|
||||||
prop="alarmContent"
|
|
||||||
:rules="[{ required: true, message: '不能为空', trigger: 'blur' }]">
|
|
||||||
<el-input
|
|
||||||
:disabled="disabled"
|
|
||||||
v-model="dataForm.alarmContent"
|
|
||||||
placeholder="请输入报警内容"
|
|
||||||
@change="$emit('update', dataForm)"></el-input>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
</el-form>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
export default {
|
|
||||||
name: 'DialogForm',
|
|
||||||
model: {
|
|
||||||
prop: 'dataForm',
|
|
||||||
event: 'update',
|
|
||||||
},
|
|
||||||
emits: ['update'],
|
|
||||||
components: {},
|
|
||||||
props: {
|
|
||||||
dataForm: {
|
|
||||||
type: Object,
|
|
||||||
default: () => ({}),
|
|
||||||
},
|
|
||||||
disabled: {
|
|
||||||
type: Boolean,
|
|
||||||
default: false,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
formLoading: true,
|
|
||||||
};
|
|
||||||
},
|
|
||||||
mounted() {
|
|
||||||
this.getCode('/base/equipment-group-alarm/getCode').then((code) => {
|
|
||||||
this.formLoading = false;
|
|
||||||
this.$emit('update', {
|
|
||||||
...this.dataForm,
|
|
||||||
code,
|
|
||||||
});
|
|
||||||
});
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
/** 模拟透传 ref */
|
|
||||||
validate(cb) {
|
|
||||||
return this.$refs.form.validate(cb);
|
|
||||||
},
|
|
||||||
resetFields(args) {
|
|
||||||
return this.$refs.form.resetFields(args);
|
|
||||||
},
|
|
||||||
async handleTypeChange(id) {
|
|
||||||
this.dataForm.alarmCode = '';
|
|
||||||
this.$emit('update', this.dataForm);
|
|
||||||
},
|
|
||||||
async getCode(url) {
|
|
||||||
const response = await this.$axios(url);
|
|
||||||
return response.data;
|
|
||||||
},
|
|
||||||
},
|
|
||||||
};
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style scoped lang="scss">
|
|
||||||
.el-date-editor,
|
|
||||||
.el-select {
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
@@ -1,461 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div class="app-container">
|
|
||||||
<!-- 搜索工作栏 -->
|
|
||||||
<SearchBar
|
|
||||||
:formConfigs="searchBarFormConfig"
|
|
||||||
ref="search-bar"
|
|
||||||
@headBtnClick="handleSearchBarBtnClick" />
|
|
||||||
|
|
||||||
<!-- 列表 -->
|
|
||||||
<base-table
|
|
||||||
:table-props="tableProps"
|
|
||||||
:page="queryParams.pageNo"
|
|
||||||
:limit="queryParams.pageSize"
|
|
||||||
:table-data="list"
|
|
||||||
@emitFun="handleEmitFun">
|
|
||||||
<method-btn
|
|
||||||
v-if="tableBtn.length"
|
|
||||||
slot="handleBtn"
|
|
||||||
label="操作"
|
|
||||||
:width="120"
|
|
||||||
:method-list="tableBtn"
|
|
||||||
@clickBtn="handleTableBtnClick" />
|
|
||||||
</base-table>
|
|
||||||
|
|
||||||
<!-- 分页组件 -->
|
|
||||||
<pagination
|
|
||||||
v-show="total > 0"
|
|
||||||
:total="total"
|
|
||||||
:page.sync="queryParams.pageNo"
|
|
||||||
:limit.sync="queryParams.pageSize"
|
|
||||||
@pagination="getList" />
|
|
||||||
|
|
||||||
<!-- 对话框(添加 / 修改) -->
|
|
||||||
<base-dialog
|
|
||||||
:dialogTitle="title"
|
|
||||||
:dialogVisible="open"
|
|
||||||
width="700px"
|
|
||||||
@close="cancel"
|
|
||||||
@cancel="cancel"
|
|
||||||
@confirm="submitForm">
|
|
||||||
<DialogForm v-if="open" ref="form" v-model="form" :rows="rows" />
|
|
||||||
</base-dialog>
|
|
||||||
|
|
||||||
<!-- 抽屉 详情 -->
|
|
||||||
<BasicDrawer
|
|
||||||
v-if="editVisible"
|
|
||||||
ref="drawer"
|
|
||||||
:default-mode="editMode"
|
|
||||||
:data-id="alarmForm.id"
|
|
||||||
:sections="[
|
|
||||||
{
|
|
||||||
name: '基本信息',
|
|
||||||
key: 'base',
|
|
||||||
rows: drawerBaseInfoRows,
|
|
||||||
url: '/base/equipment-group/get',
|
|
||||||
urlUpdate: '/base/equipment-group/update',
|
|
||||||
urlCreate: '/base/equipment-group/create',
|
|
||||||
queryParams: { id: alarmForm.id },
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: '属性列表',
|
|
||||||
key: 'attrs',
|
|
||||||
props: drawerListProps,
|
|
||||||
url: '/base/equipment-group-alarm/page',
|
|
||||||
urlCreate: '/base/equipment-group-alarm/create',
|
|
||||||
urlUpdate: '/base/equipment-group-alarm/update',
|
|
||||||
urlDelete: '/base/equipment-group-alarm/delete',
|
|
||||||
urlDetail: '/base/equipment-group-alarm/get',
|
|
||||||
queryParams: {
|
|
||||||
equipmentGroupId: alarmForm.id,
|
|
||||||
pageNo: 1,
|
|
||||||
pageSize: 10,
|
|
||||||
},
|
|
||||||
tableBtn: [
|
|
||||||
this.$auth.hasPermi('base:equipment-group:update')
|
|
||||||
? {
|
|
||||||
type: 'edit',
|
|
||||||
btnName: '修改',
|
|
||||||
}
|
|
||||||
: undefined,
|
|
||||||
this.$auth.hasPermi('base:equipment-group:delete')
|
|
||||||
? {
|
|
||||||
type: 'delete',
|
|
||||||
btnName: '删除',
|
|
||||||
}
|
|
||||||
: undefined,
|
|
||||||
].filter((v) => v),
|
|
||||||
allowAdd: true,
|
|
||||||
},
|
|
||||||
]"
|
|
||||||
@refreshDataList="getList"
|
|
||||||
@cancel="editVisible = false"
|
|
||||||
@destroy="editVisible = false" />
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
import {
|
|
||||||
createEquipmentBindGroup,
|
|
||||||
updateEquipmentBindGroup,
|
|
||||||
deleteEquipmentBindGroup,
|
|
||||||
getEquipmentBindGroup,
|
|
||||||
getEquipmentBindGroupPage,
|
|
||||||
exportEquipmentBindGroupExcel,
|
|
||||||
} from '@/api/base/equipmentBindGroup';
|
|
||||||
|
|
||||||
import { getEquipmentGroupPage } from '@/api/base/equipmentGroup';
|
|
||||||
import moment from 'moment';
|
|
||||||
import { publicFormatter } from '@/utils/dict';
|
|
||||||
import basicPageMixin from '@/mixins/lb/basicPageMixin';
|
|
||||||
import BasicDrawer from './components/BasicDrawer.vue';
|
|
||||||
|
|
||||||
export default {
|
|
||||||
name: 'EquipmentBindGroup',
|
|
||||||
components: { BasicDrawer },
|
|
||||||
mixins: [basicPageMixin],
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
searchBarKeys: ['groupId', 'equipmentName'],
|
|
||||||
tableBtn: [
|
|
||||||
this.$auth.hasPermi('base:equipment-bind-group:update')
|
|
||||||
? {
|
|
||||||
type: 'detail',
|
|
||||||
btnName: '查看报警',
|
|
||||||
}
|
|
||||||
: undefined,
|
|
||||||
this.$auth.hasPermi('base:equipment-bind-group:update')
|
|
||||||
? {
|
|
||||||
type: 'edit',
|
|
||||||
btnName: '修改',
|
|
||||||
}
|
|
||||||
: undefined,
|
|
||||||
this.$auth.hasPermi('base:equipment-bind-group:delete')
|
|
||||||
? {
|
|
||||||
type: 'delete',
|
|
||||||
btnName: '删除',
|
|
||||||
}
|
|
||||||
: undefined,
|
|
||||||
].filter((v) => v),
|
|
||||||
tableProps: [
|
|
||||||
{
|
|
||||||
prop: 'createTime',
|
|
||||||
label: '添加时间',
|
|
||||||
fixed: true,
|
|
||||||
width: 180,
|
|
||||||
filter: (val) => moment(val).format('yyyy-MM-DD HH:mm:ss'),
|
|
||||||
},
|
|
||||||
{ prop: 'equipmentName', label: '设备' },
|
|
||||||
{ prop: 'groupName', label: '分组' },
|
|
||||||
// {
|
|
||||||
// _action: 'equipment-bind-group-show-alert',
|
|
||||||
// label: '分组报警',
|
|
||||||
// subcomponent: {
|
|
||||||
// props: ['injectData'],
|
|
||||||
// render: function (h) {
|
|
||||||
// const _this = this;
|
|
||||||
// return h(
|
|
||||||
// 'el-button',
|
|
||||||
// {
|
|
||||||
// props: { type: 'text' },
|
|
||||||
// on: {
|
|
||||||
// click: function () {
|
|
||||||
// console.log('inejctdata', _this.injectData);
|
|
||||||
// _this.$emit('emitData', {
|
|
||||||
// action: _this.injectData._action,
|
|
||||||
// value: _this.injectData,
|
|
||||||
// });
|
|
||||||
// },
|
|
||||||
// },
|
|
||||||
// },
|
|
||||||
// '查看报警'
|
|
||||||
// );
|
|
||||||
// },
|
|
||||||
// },
|
|
||||||
// },
|
|
||||||
],
|
|
||||||
searchBarFormConfig: [
|
|
||||||
{
|
|
||||||
type: 'select',
|
|
||||||
label: '分组',
|
|
||||||
placeholder: '请选择分组',
|
|
||||||
param: 'groupId',
|
|
||||||
filterable: true,
|
|
||||||
selectOptions: [],
|
|
||||||
},
|
|
||||||
{
|
|
||||||
type: 'input',
|
|
||||||
label: '设备',
|
|
||||||
placeholder: '请输入设备',
|
|
||||||
param: 'equipmentName',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
type: 'button',
|
|
||||||
btnName: '查询',
|
|
||||||
name: 'search',
|
|
||||||
color: 'primary',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
type: 'separate',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
type: this.$auth.hasPermi('base:equipment-bind-group:create')
|
|
||||||
? 'button'
|
|
||||||
: '',
|
|
||||||
btnName: '新增',
|
|
||||||
name: 'add',
|
|
||||||
plain: true,
|
|
||||||
color: 'success',
|
|
||||||
},
|
|
||||||
// {
|
|
||||||
// type: this.$auth.hasPermi('base:equipment-group:export') ? 'button' : '',
|
|
||||||
// btnName: '导出',
|
|
||||||
// name: 'export',
|
|
||||||
// color: 'warning',
|
|
||||||
// },
|
|
||||||
],
|
|
||||||
rows: [
|
|
||||||
[
|
|
||||||
{
|
|
||||||
select: true,
|
|
||||||
label: '设备',
|
|
||||||
url: '/base/equipment/page?pageNo=1&pageSize=100',
|
|
||||||
prop: 'equipmentId',
|
|
||||||
bind: {
|
|
||||||
filterable: true,
|
|
||||||
},
|
|
||||||
rules: [{ required: true, message: '不能为空', trigger: 'blur' }],
|
|
||||||
},
|
|
||||||
],
|
|
||||||
[
|
|
||||||
{
|
|
||||||
select: true,
|
|
||||||
label: '报警分组',
|
|
||||||
url: '/base/equipment-group/listAll', // 根据产线获取
|
|
||||||
// depends: '__product_line', // 依赖产线获取数据
|
|
||||||
// depends: 'productionLineId',
|
|
||||||
prop: 'groupId',
|
|
||||||
bind: {
|
|
||||||
filterable: true,
|
|
||||||
},
|
|
||||||
rules: [{ required: true, message: '不能为空', trigger: 'blur' }],
|
|
||||||
},
|
|
||||||
],
|
|
||||||
],
|
|
||||||
// 是否显示弹出层
|
|
||||||
open: false,
|
|
||||||
// 查询参数
|
|
||||||
queryParams: {
|
|
||||||
pageNo: 1,
|
|
||||||
pageSize: 10,
|
|
||||||
equipmentName: null,
|
|
||||||
groupId: null,
|
|
||||||
},
|
|
||||||
// 表单参数
|
|
||||||
form: {},
|
|
||||||
// 表单校验
|
|
||||||
rules: {},
|
|
||||||
//
|
|
||||||
alarmForm: {
|
|
||||||
id: undefined,
|
|
||||||
equipmentGroupCode: undefined,
|
|
||||||
equipmentGroupName: undefined,
|
|
||||||
},
|
|
||||||
editVisible: false,
|
|
||||||
editMode: '',
|
|
||||||
drawerBaseInfoRows: [
|
|
||||||
[
|
|
||||||
{
|
|
||||||
input: true,
|
|
||||||
label: '设备分组名称',
|
|
||||||
prop: 'name',
|
|
||||||
rules: [{ required: true, message: '不能为空', trigger: 'blur' }],
|
|
||||||
// bind: {
|
|
||||||
// disabled: this.editMode == 'detail', // some condition, like detail mode...
|
|
||||||
// }
|
|
||||||
},
|
|
||||||
{
|
|
||||||
input: true,
|
|
||||||
label: '设备分组编码',
|
|
||||||
prop: 'code',
|
|
||||||
// url: '/base/equipment/getCode',
|
|
||||||
},
|
|
||||||
],
|
|
||||||
],
|
|
||||||
drawerListProps: [
|
|
||||||
{
|
|
||||||
prop: 'createTime',
|
|
||||||
label: '添加时间',
|
|
||||||
fixed: true,
|
|
||||||
width: 180,
|
|
||||||
filter: (val) => moment(val).format('yyyy-MM-DD HH:mm:ss'),
|
|
||||||
},
|
|
||||||
{ width: 240, prop: 'code', label: '报警编码' },
|
|
||||||
{
|
|
||||||
width: 100,
|
|
||||||
prop: 'type',
|
|
||||||
label: '报警类型',
|
|
||||||
filter: (val) =>
|
|
||||||
val != null ? ['-', '字符型', '布尔型', '-'][val] : '-',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
width: 90,
|
|
||||||
prop: 'grade',
|
|
||||||
label: '报警级别',
|
|
||||||
filter: publicFormatter(this.DICT_TYPE.EQU_ALARM_LEVEL),
|
|
||||||
},
|
|
||||||
{ width: 180, prop: 'alarmCode', label: '设备报警编码' },
|
|
||||||
{ width: 128, prop: 'plcParamName', label: '参数列名' },
|
|
||||||
{ width: 128, prop: 'alarmContent', label: '报警内容' },
|
|
||||||
],
|
|
||||||
};
|
|
||||||
},
|
|
||||||
created() {
|
|
||||||
this.getList();
|
|
||||||
getEquipmentGroupPage({ pageNo: 1, pageSize: 100 }).then((res) => {
|
|
||||||
this.searchBarFormConfig[0].selectOptions = res.data.list;
|
|
||||||
});
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
/** 覆盖 handleEmitFun 的默认实现 */
|
|
||||||
handleEmitFun({ action, value }) {
|
|
||||||
const {
|
|
||||||
groupId: equipmentGroupId,
|
|
||||||
groupName: equipmentGroupName,
|
|
||||||
groupCode: equipmentGroupCode,
|
|
||||||
} = value;
|
|
||||||
switch (action) {
|
|
||||||
case 'equipment-bind-group-show-alert':
|
|
||||||
// this.$router.push({ path: '/equipment/base/equipment-group-alarm' });
|
|
||||||
this.$router.push({
|
|
||||||
name: 'EquipmentGroupAlarm',
|
|
||||||
params: {
|
|
||||||
equipmentGroupId,
|
|
||||||
equipmentGroupCode,
|
|
||||||
equipmentGroupName,
|
|
||||||
},
|
|
||||||
});
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
/** 查询列表 */
|
|
||||||
getList() {
|
|
||||||
this.loading = true;
|
|
||||||
getEquipmentBindGroupPage(this.queryParams).then((response) => {
|
|
||||||
this.list = response.data.list;
|
|
||||||
this.total = response.data.total;
|
|
||||||
this.loading = false;
|
|
||||||
});
|
|
||||||
},
|
|
||||||
/** 取消按钮 */
|
|
||||||
cancel() {
|
|
||||||
this.open = false;
|
|
||||||
this.reset();
|
|
||||||
},
|
|
||||||
/** 表单重置 */
|
|
||||||
reset() {
|
|
||||||
this.form = {
|
|
||||||
id: undefined,
|
|
||||||
equipmentId: undefined,
|
|
||||||
groupId: undefined,
|
|
||||||
};
|
|
||||||
this.resetForm('form');
|
|
||||||
},
|
|
||||||
/** 搜索按钮操作 */
|
|
||||||
handleQuery() {
|
|
||||||
this.queryParams.pageNo = 1;
|
|
||||||
this.getList();
|
|
||||||
},
|
|
||||||
/** 重置按钮操作 */
|
|
||||||
resetQuery() {
|
|
||||||
this.resetForm('queryForm');
|
|
||||||
this.handleQuery();
|
|
||||||
},
|
|
||||||
/** 新增按钮操作 */
|
|
||||||
handleAdd() {
|
|
||||||
this.reset();
|
|
||||||
this.open = true;
|
|
||||||
this.title = '添加设备与分组绑定';
|
|
||||||
},
|
|
||||||
/** 修改按钮操作 */
|
|
||||||
handleUpdate(row) {
|
|
||||||
this.reset();
|
|
||||||
const id = row.id;
|
|
||||||
getEquipmentBindGroup(id).then((response) => {
|
|
||||||
this.form = response.data;
|
|
||||||
this.open = true;
|
|
||||||
this.title = '修改设备与分组绑定';
|
|
||||||
});
|
|
||||||
},
|
|
||||||
/** 提交按钮 */
|
|
||||||
submitForm() {
|
|
||||||
this.$refs['form'].validate((valid) => {
|
|
||||||
if (!valid) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
// 修改的提交
|
|
||||||
if (this.form.id != null) {
|
|
||||||
updateEquipmentBindGroup(this.form).then((response) => {
|
|
||||||
this.$modal.msgSuccess('修改成功');
|
|
||||||
this.open = false;
|
|
||||||
this.getList();
|
|
||||||
});
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
// 添加的提交
|
|
||||||
createEquipmentBindGroup(this.form).then((response) => {
|
|
||||||
this.$modal.msgSuccess('新增成功');
|
|
||||||
this.open = false;
|
|
||||||
this.getList();
|
|
||||||
});
|
|
||||||
});
|
|
||||||
},
|
|
||||||
// 查看报警
|
|
||||||
handleDetail(row) {
|
|
||||||
const { equipmentId, equipmentName, groupCode, groupId, groupName, id } =
|
|
||||||
row;
|
|
||||||
// 打开抽屉
|
|
||||||
this.editMode = 'detail';
|
|
||||||
this.alarmForm.id = groupId;
|
|
||||||
this.alarmForm.equipmentGroupCode = groupCode;
|
|
||||||
this.alarmForm.equipmentGroupName = groupName;
|
|
||||||
this.editVisible = true;
|
|
||||||
this.$nextTick(() => {
|
|
||||||
this.$refs['drawer'].init();
|
|
||||||
});
|
|
||||||
},
|
|
||||||
/** 删除按钮操作 */
|
|
||||||
handleDelete(row) {
|
|
||||||
const id = row.id;
|
|
||||||
this.$modal
|
|
||||||
.confirm('是否确认删除该分组绑定?')
|
|
||||||
.then(function () {
|
|
||||||
return deleteEquipmentBindGroup(id);
|
|
||||||
})
|
|
||||||
.then(() => {
|
|
||||||
this.getList();
|
|
||||||
this.$modal.msgSuccess('删除成功');
|
|
||||||
})
|
|
||||||
.catch(() => {});
|
|
||||||
},
|
|
||||||
/** 导出按钮操作 */
|
|
||||||
handleExport() {
|
|
||||||
// 处理查询参数
|
|
||||||
let params = { ...this.queryParams };
|
|
||||||
params.pageNo = undefined;
|
|
||||||
params.pageSize = undefined;
|
|
||||||
this.$modal
|
|
||||||
.confirm('是否确认导出所有设备与分组绑定数据项?')
|
|
||||||
.then(() => {
|
|
||||||
this.exportLoading = true;
|
|
||||||
return exportEquipmentBindGroupExcel(params);
|
|
||||||
})
|
|
||||||
.then((response) => {
|
|
||||||
this.$download.excel(response, '设备与分组绑定.xls');
|
|
||||||
this.exportLoading = false;
|
|
||||||
})
|
|
||||||
.catch(() => {});
|
|
||||||
},
|
|
||||||
},
|
|
||||||
};
|
|
||||||
</script>
|
|
||||||
@@ -1,226 +0,0 @@
|
|||||||
<!--
|
|
||||||
filename: dialogForm.vue
|
|
||||||
author: liubin
|
|
||||||
date: 2023-09-11 15:55:13
|
|
||||||
description: DialogForm for equipmentBindSection only
|
|
||||||
-->
|
|
||||||
|
|
||||||
<template>
|
|
||||||
<el-form
|
|
||||||
ref="form"
|
|
||||||
:model="dataForm"
|
|
||||||
label-width="100px"
|
|
||||||
v-loading="formLoading">
|
|
||||||
<el-row :gutter="20">
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item
|
|
||||||
label="产线"
|
|
||||||
prop="productionLineId"
|
|
||||||
:rules="[{ required: true, message: '不能为空', trigger: 'blur' }]">
|
|
||||||
<el-select
|
|
||||||
v-model="dataForm.productionLineId"
|
|
||||||
placeholder="请选择产线"
|
|
||||||
filterable
|
|
||||||
@change="handleProductlineChange">
|
|
||||||
<el-option
|
|
||||||
v-for="opt in productionLineList"
|
|
||||||
:key="opt.value"
|
|
||||||
:label="opt.label"
|
|
||||||
:value="opt.value" />
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item
|
|
||||||
label="工段"
|
|
||||||
prop="workshopSectionId"
|
|
||||||
:rules="[{ required: true, message: '不能为空', trigger: 'blur' }]">
|
|
||||||
<el-select
|
|
||||||
v-model="dataForm.workshopSectionId"
|
|
||||||
filterable
|
|
||||||
placeholder="请选择工段"
|
|
||||||
@change="$emit('update', dataForm)">
|
|
||||||
<el-option
|
|
||||||
v-for="opt in worksectionList"
|
|
||||||
:key="opt.value"
|
|
||||||
:label="opt.label"
|
|
||||||
:value="opt.value" />
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
<el-row :gutter="20">
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item
|
|
||||||
label="设备"
|
|
||||||
prop="equipmentId"
|
|
||||||
:rules="[{ required: true, message: '不能为空', trigger: 'blur' }]">
|
|
||||||
<el-select
|
|
||||||
v-model="dataForm.equipmentId"
|
|
||||||
filterable
|
|
||||||
placeholder="请选择设备"
|
|
||||||
@change="$emit('update', dataForm)">
|
|
||||||
<el-option
|
|
||||||
v-for="opt in equipmentList"
|
|
||||||
:key="opt.value"
|
|
||||||
:label="opt.label"
|
|
||||||
:value="opt.value" />
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="工段设备排序" prop="sort">
|
|
||||||
<el-input-number
|
|
||||||
v-model="dataForm.sort"
|
|
||||||
filterable
|
|
||||||
min="0"
|
|
||||||
max="100"
|
|
||||||
@change="$emit('update', dataForm)"
|
|
||||||
placeholder="请输入工段设备排序" />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
<el-row :gutter="20">
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="产线数据类型" prop="lineDataType">
|
|
||||||
<el-select
|
|
||||||
v-model="dataForm.lineDataType"
|
|
||||||
placeholder="请选择产线数据类型"
|
|
||||||
@change="$emit('update', dataForm)">
|
|
||||||
<el-option
|
|
||||||
v-for="opt in [
|
|
||||||
{ label: '无类型', value: 0 },
|
|
||||||
{ label: '进口统计', value: 1 },
|
|
||||||
{ label: '出口统计', value: 2 },
|
|
||||||
]"
|
|
||||||
:key="opt.value"
|
|
||||||
:label="opt.label"
|
|
||||||
:value="opt.value" />
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="工段数据类型" prop="sectionDataType">
|
|
||||||
<el-select
|
|
||||||
v-model="dataForm.sectionDataType"
|
|
||||||
placeholder="请选择工段数据类型"
|
|
||||||
@change="$emit('update', dataForm)">
|
|
||||||
<el-option
|
|
||||||
v-for="opt in [
|
|
||||||
{ label: '无类型', value: 0 },
|
|
||||||
{ label: '进口统计', value: 1 },
|
|
||||||
{ label: '出口统计', value: 2 },
|
|
||||||
{ label: '进出口计数', value: 3 },
|
|
||||||
]"
|
|
||||||
:key="opt.value"
|
|
||||||
:label="opt.label"
|
|
||||||
:value="opt.value" />
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
</el-form>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
export default {
|
|
||||||
name: 'DialogForm',
|
|
||||||
model: {
|
|
||||||
prop: 'dataForm',
|
|
||||||
event: 'update',
|
|
||||||
},
|
|
||||||
emits: ['update'],
|
|
||||||
components: {},
|
|
||||||
props: {
|
|
||||||
dataForm: {
|
|
||||||
type: Object,
|
|
||||||
default: () => ({}),
|
|
||||||
},
|
|
||||||
},
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
formLoading: true,
|
|
||||||
productionLineList: [],
|
|
||||||
equipmentList: [],
|
|
||||||
worksectionList: [],
|
|
||||||
dataFormCache: null,
|
|
||||||
};
|
|
||||||
},
|
|
||||||
mounted() {
|
|
||||||
Promise.all([this.getProductLineList(), this.getEquipmentList()]).then(
|
|
||||||
() => {
|
|
||||||
this.formLoading = false;
|
|
||||||
}
|
|
||||||
);
|
|
||||||
},
|
|
||||||
watch: {
|
|
||||||
'dataForm.productionLineId': {
|
|
||||||
handler: async function (plId) {
|
|
||||||
if (plId) await this.getWorksectionList(plId);
|
|
||||||
},
|
|
||||||
immediate: true,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
/** 模拟透传 ref */
|
|
||||||
validate(cb) {
|
|
||||||
return this.$refs.form.validate(cb);
|
|
||||||
},
|
|
||||||
resetFields(args) {
|
|
||||||
return this.$refs.form.resetFields(args);
|
|
||||||
},
|
|
||||||
async handleProductlineChange(id) {
|
|
||||||
await this.getWorksectionList(id);
|
|
||||||
this.dataForm.workshopSectionId = null;
|
|
||||||
this.$emit('update', this.dataForm);
|
|
||||||
},
|
|
||||||
// getCode
|
|
||||||
async getCode(url) {
|
|
||||||
const response = await this.$axios(url);
|
|
||||||
return response.data;
|
|
||||||
},
|
|
||||||
// 获取产线列表
|
|
||||||
async getProductLineList() {
|
|
||||||
const response = await this.$axios('/base/production-line/listAll');
|
|
||||||
this.productionLineList = response.data.map((item) => ({
|
|
||||||
label: item.name,
|
|
||||||
value: item.id,
|
|
||||||
}));
|
|
||||||
},
|
|
||||||
// 获取设备列表
|
|
||||||
async getEquipmentList() {
|
|
||||||
const response = await this.$axios(
|
|
||||||
'/base/equipment/page?pageNo=1&pageSize=100'
|
|
||||||
);
|
|
||||||
this.equipmentList = response.data.list.map((item) => ({
|
|
||||||
label: item.name,
|
|
||||||
value: item.id,
|
|
||||||
}));
|
|
||||||
},
|
|
||||||
// 获取工段列表
|
|
||||||
async getWorksectionList(plId) {
|
|
||||||
const response = await this.$axios(
|
|
||||||
'/base/workshop-section/listByParentId',
|
|
||||||
{
|
|
||||||
params: {
|
|
||||||
id: plId,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
);
|
|
||||||
this.worksectionList = response.data.map((item) => ({
|
|
||||||
label: item.name,
|
|
||||||
value: item.id,
|
|
||||||
}));
|
|
||||||
},
|
|
||||||
},
|
|
||||||
};
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style scoped lang="scss">
|
|
||||||
.el-date-editor,
|
|
||||||
.el-select {
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
@@ -1,442 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div class="app-container">
|
|
||||||
<!-- 搜索工作栏 -->
|
|
||||||
<SearchBar
|
|
||||||
:formConfigs="searchBarFormConfig"
|
|
||||||
ref="search-bar"
|
|
||||||
@select-changed="handleSearchBarChanged"
|
|
||||||
@headBtnClick="buttonClick" />
|
|
||||||
|
|
||||||
<!-- 列表 -->
|
|
||||||
<base-table
|
|
||||||
:table-props="tableProps"
|
|
||||||
:page="queryParams.pageNo"
|
|
||||||
:limit="queryParams.pageSize"
|
|
||||||
:table-data="list"
|
|
||||||
@emitFun="handleEmitFun">
|
|
||||||
<method-btn
|
|
||||||
v-if="tableBtn.length"
|
|
||||||
slot="handleBtn"
|
|
||||||
label="操作"
|
|
||||||
:width="120"
|
|
||||||
:method-list="tableBtn"
|
|
||||||
@clickBtn="handleTableBtnClick" />
|
|
||||||
</base-table>
|
|
||||||
|
|
||||||
<!-- 分页组件 -->
|
|
||||||
<pagination
|
|
||||||
v-show="total > 0"
|
|
||||||
:total="total"
|
|
||||||
:page.sync="queryParams.pageNo"
|
|
||||||
:limit.sync="queryParams.pageSize"
|
|
||||||
@pagination="getList" />
|
|
||||||
|
|
||||||
<!-- 对话框(添加 / 修改) -->
|
|
||||||
<base-dialog
|
|
||||||
:dialogTitle="title"
|
|
||||||
:dialogVisible="open"
|
|
||||||
width="700px"
|
|
||||||
@close="cancel"
|
|
||||||
@cancel="cancel"
|
|
||||||
@confirm="submitForm">
|
|
||||||
<DialogForm v-if="open" ref="form" v-model="form" :rows="rows" />
|
|
||||||
</base-dialog>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
import {
|
|
||||||
createEquipmentBindSection,
|
|
||||||
updateEquipmentBindSection,
|
|
||||||
deleteEquipmentBindSection,
|
|
||||||
getEquipmentBindSection,
|
|
||||||
getEquipmentBindSectionPage,
|
|
||||||
exportEquipmentBindSectionExcel,
|
|
||||||
} from '@/api/base/equipmentBindSection';
|
|
||||||
import { getPdList } from '@/api/core/monitoring/auto';
|
|
||||||
import { getFactoryPage } from '@/api/core/base/factory';
|
|
||||||
import moment from 'moment';
|
|
||||||
import basicPageMixin from '@/mixins/lb/basicPageMixin';
|
|
||||||
import DialogForm from './dialogForm.vue';
|
|
||||||
export default {
|
|
||||||
name: 'EquipmentBindSection',
|
|
||||||
components: { DialogForm },
|
|
||||||
mixins: [basicPageMixin],
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
searchBarKeys: ['factoryId','productionLineId','workshopSectionId', 'equipmentName'],
|
|
||||||
tableBtn: [
|
|
||||||
this.$auth.hasPermi('base:equipment-bind-section:update')
|
|
||||||
? {
|
|
||||||
type: 'edit',
|
|
||||||
btnName: '修改',
|
|
||||||
}
|
|
||||||
: undefined,
|
|
||||||
this.$auth.hasPermi('base:equipment-bind-section:delete')
|
|
||||||
? {
|
|
||||||
type: 'delete',
|
|
||||||
btnName: '删除',
|
|
||||||
}
|
|
||||||
: undefined,
|
|
||||||
].filter((v) => v),
|
|
||||||
tableProps: [
|
|
||||||
{
|
|
||||||
prop: 'createTime',
|
|
||||||
label: '添加时间',
|
|
||||||
fixed: true,
|
|
||||||
width: 180,
|
|
||||||
filter: (val) => moment(val).format('yyyy-MM-DD HH:mm:ss'),
|
|
||||||
},
|
|
||||||
{ prop: 'factoryName', label: '工厂' },
|
|
||||||
{ prop: 'productionLine', label: '产线' },
|
|
||||||
{ prop: 'workshopSection', label: '工段' },
|
|
||||||
{ prop: 'equipment', label: '设备名称' },
|
|
||||||
{ prop: 'sort', label: '工段中排序' },
|
|
||||||
{
|
|
||||||
prop: 'lineDataType',
|
|
||||||
label: '产线数据类型',
|
|
||||||
filter: (val) =>
|
|
||||||
val != null ? ['无类型', '进口计数', '出口计数'][val] : '-',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop: 'sectionDataType',
|
|
||||||
label: '工段数据类型',
|
|
||||||
filter: (val) =>
|
|
||||||
val != null ? ['无类型', '进口计数', '出口计数', '进出口计数'][val] : '-',
|
|
||||||
},
|
|
||||||
// {
|
|
||||||
// action: 'show-alert',
|
|
||||||
// label: '报警',
|
|
||||||
// ,
|
|
||||||
// subcomponent: {
|
|
||||||
// props: ['injectData'],
|
|
||||||
// render: function (h) {
|
|
||||||
// const _this = this;
|
|
||||||
// return h(
|
|
||||||
// 'el-button',
|
|
||||||
// {
|
|
||||||
// props: { type: 'text', size: 'mini' },
|
|
||||||
// on: {
|
|
||||||
// click: function () {
|
|
||||||
// console.log('inejctdata', _this.injectData);
|
|
||||||
// _this.$emit('emitData', {
|
|
||||||
// action: _this.injectData.action,
|
|
||||||
// value: _this.injectData.id,
|
|
||||||
// });
|
|
||||||
// },
|
|
||||||
// },
|
|
||||||
// },
|
|
||||||
// '查看报警'
|
|
||||||
// );
|
|
||||||
// },
|
|
||||||
// },
|
|
||||||
// },
|
|
||||||
],
|
|
||||||
searchBarFormConfig: [
|
|
||||||
{
|
|
||||||
type: 'select',
|
|
||||||
label: '工厂',
|
|
||||||
selectOptions: [],
|
|
||||||
param: 'factoryId',
|
|
||||||
onchange: true,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
type: 'select',
|
|
||||||
label: '产线',
|
|
||||||
selectOptions: [],
|
|
||||||
param: 'productionLineId',
|
|
||||||
multiple: true,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
type: 'select',
|
|
||||||
label: '工段',
|
|
||||||
placeholder: '请选择工段',
|
|
||||||
param: 'workshopSectionId',
|
|
||||||
selectOptions: [],
|
|
||||||
filterable: true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
type: 'input',
|
|
||||||
label: '设备',
|
|
||||||
placeholder: '请输入设备',
|
|
||||||
param: 'equipmentName',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
type: 'button',
|
|
||||||
btnName: '查询',
|
|
||||||
name: 'search',
|
|
||||||
color: 'primary',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
type: 'separate',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
type: this.$auth.hasPermi('base:equipment-bind-section:create')
|
|
||||||
? 'button'
|
|
||||||
: '',
|
|
||||||
btnName: '新增',
|
|
||||||
name: 'add',
|
|
||||||
plain: true,
|
|
||||||
color: 'success',
|
|
||||||
},
|
|
||||||
// {
|
|
||||||
// type: this.$auth.hasPermi('base:equipment-group:export') ? 'button' : '',
|
|
||||||
// btnName: '导出',
|
|
||||||
// name: 'export',
|
|
||||||
// color: 'warning',
|
|
||||||
// },
|
|
||||||
],
|
|
||||||
rows: [
|
|
||||||
[
|
|
||||||
{
|
|
||||||
select: true,
|
|
||||||
label: '产线',
|
|
||||||
url: '/base/production-line/listAll',
|
|
||||||
// prop: '__product_line', // __开头代表不传递给服务器
|
|
||||||
prop: 'productionLineId', // 编辑接口返回的产线id,所以不能使用上面那种形式
|
|
||||||
rules: [{ required: true, message: '不能为空', trigger: 'blur' }],
|
|
||||||
},
|
|
||||||
{
|
|
||||||
select: true,
|
|
||||||
label: '工段',
|
|
||||||
url: '/base/workshop-section/listByParentId', // 根据产线获取
|
|
||||||
// depends: '__product_line', // 依赖产线获取数据
|
|
||||||
depends: 'productionLineId',
|
|
||||||
prop: 'workshopSectionId',
|
|
||||||
rules: [{ required: true, message: '不能为空', trigger: 'blur' }],
|
|
||||||
},
|
|
||||||
],
|
|
||||||
[
|
|
||||||
{
|
|
||||||
select: true,
|
|
||||||
label: '设备',
|
|
||||||
url: '/base/equipment/page?pageNo=1&pageSize=100',
|
|
||||||
prop: 'equipmentId',
|
|
||||||
rules: [{ required: true, message: '不能为空', trigger: 'blur' }],
|
|
||||||
},
|
|
||||||
{
|
|
||||||
input: true,
|
|
||||||
label: '工段排序',
|
|
||||||
prop: 'sort',
|
|
||||||
// url: '/base/equipment-group/getCode',
|
|
||||||
},
|
|
||||||
],
|
|
||||||
[
|
|
||||||
{
|
|
||||||
select: true,
|
|
||||||
label: '产线数据类型',
|
|
||||||
options: [
|
|
||||||
{ label: '无类型', value: 0 },
|
|
||||||
{ label: '进口计数', value: 1 },
|
|
||||||
{ label: '出口计数', value: 2 },
|
|
||||||
],
|
|
||||||
prop: 'lineDataType',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
select: true,
|
|
||||||
label: '工段数据类型',
|
|
||||||
options: [
|
|
||||||
{ label: '无类型', value: 0 },
|
|
||||||
{ label: '进口计数', value: 1 },
|
|
||||||
{ label: '出口计数', value: 2 },
|
|
||||||
{ label: '进出口计数', value: 3 },
|
|
||||||
],
|
|
||||||
prop: 'sectionDataType',
|
|
||||||
},
|
|
||||||
],
|
|
||||||
],
|
|
||||||
// 是否显示弹出层
|
|
||||||
open: false,
|
|
||||||
// 查询参数
|
|
||||||
queryParams: {
|
|
||||||
pageNo: 1,
|
|
||||||
pageSize: 10,
|
|
||||||
workshopSectionId: null,
|
|
||||||
equipmentId: null,
|
|
||||||
equipmentName: null,
|
|
||||||
factoryId: null,
|
|
||||||
productionLineId: [],
|
|
||||||
},
|
|
||||||
// 表单参数
|
|
||||||
form: {},
|
|
||||||
};
|
|
||||||
},
|
|
||||||
created() {
|
|
||||||
this.getList();
|
|
||||||
this.initWorksection();
|
|
||||||
this.getPdLineList();
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
/** 准备工段数据 */
|
|
||||||
async initWorksection() {
|
|
||||||
const { code, data } = await this.$axios({
|
|
||||||
url: '/base/workshop-section/listAll',
|
|
||||||
method: 'get',
|
|
||||||
});
|
|
||||||
if (code == 0) {
|
|
||||||
this.searchBarFormConfig[2].selectOptions = data.map((item) => {
|
|
||||||
return {
|
|
||||||
name: item.name,
|
|
||||||
id: item.id,
|
|
||||||
};
|
|
||||||
});
|
|
||||||
}
|
|
||||||
},
|
|
||||||
getPdLineList() {
|
|
||||||
getPdList().then((res) => {
|
|
||||||
this.searchBarFormConfig[1].selectOptions = res.data || [];
|
|
||||||
});
|
|
||||||
const params = {
|
|
||||||
pageSize: 100,
|
|
||||||
pageNo: 1,
|
|
||||||
};
|
|
||||||
getFactoryPage(params).then((res) => {
|
|
||||||
this.searchBarFormConfig[0].selectOptions = res.data.list || [];
|
|
||||||
});
|
|
||||||
},
|
|
||||||
handleSearchBarChanged({ param, value }) {
|
|
||||||
this.queryParams.productionLineId = [];
|
|
||||||
this.$refs['search-bar'].formInline.productionLineId = undefined;
|
|
||||||
getPdList(value).then((res) => {
|
|
||||||
this.searchBarFormConfig[1].selectOptions = res.data || [];
|
|
||||||
});
|
|
||||||
},
|
|
||||||
buttonClick(val) {
|
|
||||||
switch (val.btnName) {
|
|
||||||
case 'search':
|
|
||||||
this.queryParams.pageNo = 1;
|
|
||||||
this.queryParams.pageSize = 10;
|
|
||||||
this.queryParams.name = val.name;
|
|
||||||
this.queryParams.workshopSectionId = val.workshopSectionId || undefined;
|
|
||||||
this.queryParams.equipmentName = val.equipmentName || undefined;
|
|
||||||
this.queryParams.factoryId = val.factoryId || undefined;
|
|
||||||
this.queryParams.productionLineId = val.productionLineId || [];
|
|
||||||
this.handleQuery();
|
|
||||||
break;
|
|
||||||
case 'add':
|
|
||||||
this.handleAdd();
|
|
||||||
break;
|
|
||||||
case 'export':
|
|
||||||
this.handleExport();
|
|
||||||
break;
|
|
||||||
case 'reset':
|
|
||||||
this.$refs['search-bar'].resetForm();
|
|
||||||
this.resetQuery();
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
console.log(val);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
/** 查询列表 */
|
|
||||||
getList() {
|
|
||||||
this.loading = true;
|
|
||||||
// 执行查询
|
|
||||||
getEquipmentBindSectionPage(this.queryParams).then((response) => {
|
|
||||||
this.list = response.data.list;
|
|
||||||
this.total = response.data.total;
|
|
||||||
this.loading = false;
|
|
||||||
});
|
|
||||||
},
|
|
||||||
/** 取消按钮 */
|
|
||||||
cancel() {
|
|
||||||
this.open = false;
|
|
||||||
this.reset();
|
|
||||||
},
|
|
||||||
/** 表单重置 */
|
|
||||||
reset() {
|
|
||||||
this.form = {
|
|
||||||
id: undefined,
|
|
||||||
workshopSectionId: undefined,
|
|
||||||
equipmentId: undefined,
|
|
||||||
sort: undefined,
|
|
||||||
lineDataType: undefined,
|
|
||||||
sectionDataType: undefined,
|
|
||||||
remark: undefined,
|
|
||||||
version: undefined,
|
|
||||||
};
|
|
||||||
this.resetForm('form');
|
|
||||||
},
|
|
||||||
/** 搜索按钮操作 */
|
|
||||||
handleQuery() {
|
|
||||||
this.queryParams.pageNo = 1;
|
|
||||||
this.getList();
|
|
||||||
},
|
|
||||||
/** 重置按钮操作 */
|
|
||||||
resetQuery() {
|
|
||||||
this.resetForm('queryForm');
|
|
||||||
this.handleQuery();
|
|
||||||
},
|
|
||||||
/** 新增按钮操作 */
|
|
||||||
handleAdd() {
|
|
||||||
this.reset();
|
|
||||||
this.open = true;
|
|
||||||
this.title = '添加工段设备绑定';
|
|
||||||
},
|
|
||||||
/** 修改按钮操作 */
|
|
||||||
handleUpdate(row) {
|
|
||||||
this.reset();
|
|
||||||
const id = row.id;
|
|
||||||
getEquipmentBindSection(id).then((response) => {
|
|
||||||
this.form = response.data;
|
|
||||||
this.open = true;
|
|
||||||
this.title = '修改工段设备绑定';
|
|
||||||
});
|
|
||||||
},
|
|
||||||
/** 提交按钮 */
|
|
||||||
submitForm() {
|
|
||||||
this.$refs['form'].validate((valid) => {
|
|
||||||
if (!valid) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
// 修改的提交
|
|
||||||
if (this.form.id != null) {
|
|
||||||
updateEquipmentBindSection(this.form).then((response) => {
|
|
||||||
this.$modal.msgSuccess('修改成功');
|
|
||||||
this.open = false;
|
|
||||||
this.getList();
|
|
||||||
});
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
// 添加的提交
|
|
||||||
createEquipmentBindSection(this.form).then((response) => {
|
|
||||||
this.$modal.msgSuccess('新增成功');
|
|
||||||
this.open = false;
|
|
||||||
this.getList();
|
|
||||||
});
|
|
||||||
});
|
|
||||||
},
|
|
||||||
/** 删除按钮操作 */
|
|
||||||
handleDelete(row) {
|
|
||||||
const id = row.id;
|
|
||||||
this.$modal
|
|
||||||
.confirm('是否确认删除工段设备绑定设备名称为"' + row.equipment + '"的数据项?')
|
|
||||||
.then(function () {
|
|
||||||
return deleteEquipmentBindSection(id);
|
|
||||||
})
|
|
||||||
.then(() => {
|
|
||||||
this.getList();
|
|
||||||
this.$modal.msgSuccess('删除成功');
|
|
||||||
})
|
|
||||||
.catch(() => {});
|
|
||||||
},
|
|
||||||
/** 导出按钮操作 */
|
|
||||||
handleExport() {
|
|
||||||
// 处理查询参数
|
|
||||||
let params = { ...this.queryParams };
|
|
||||||
params.pageNo = undefined;
|
|
||||||
params.pageSize = undefined;
|
|
||||||
this.$modal
|
|
||||||
.confirm('是否确认导出所有工段设备绑定数据项?')
|
|
||||||
.then(() => {
|
|
||||||
this.exportLoading = true;
|
|
||||||
return exportEquipmentBindSectionExcel(params);
|
|
||||||
})
|
|
||||||
.then((response) => {
|
|
||||||
this.$download.excel(response, '工段设备绑定.xls');
|
|
||||||
this.exportLoading = false;
|
|
||||||
})
|
|
||||||
.catch(() => {});
|
|
||||||
},
|
|
||||||
},
|
|
||||||
};
|
|
||||||
</script>
|
|
||||||
@@ -1,225 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div class="app-container">
|
|
||||||
|
|
||||||
<!-- 搜索工作栏 -->
|
|
||||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
|
||||||
<el-form-item label="设备ID" prop="equipmentId">
|
|
||||||
<el-input v-model="queryParams.equipmentId" placeholder="请输入设备ID" clearable @keyup.enter.native="handleQuery"/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item>
|
|
||||||
<el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>
|
|
||||||
<el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>
|
|
||||||
</el-form-item>
|
|
||||||
</el-form>
|
|
||||||
|
|
||||||
<!-- 操作工具栏 -->
|
|
||||||
<el-row :gutter="10" class="mb8">
|
|
||||||
<el-col :span="1.5">
|
|
||||||
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd"
|
|
||||||
v-hasPermi="['base:equipment-file:create']">新增</el-button>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="1.5">
|
|
||||||
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport" :loading="exportLoading"
|
|
||||||
v-hasPermi="['base:equipment-file:export']">导出</el-button>
|
|
||||||
</el-col>
|
|
||||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
|
||||||
</el-row>
|
|
||||||
|
|
||||||
<!-- 列表 -->
|
|
||||||
<el-table v-loading="loading" :data="list">
|
|
||||||
<el-table-column label="id" align="center" prop="id" />
|
|
||||||
<el-table-column label="设备ID" align="center" prop="equipmentId" />
|
|
||||||
<el-table-column label="文件类型 1.图片 2.设备资料" align="center" prop="fileType">
|
|
||||||
<template v-slot="scope">
|
|
||||||
<dict-tag :type="DICT_TYPE.EQU_FILE_TYPE" :value="scope.row.fileType" />
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="原始文件名" align="center" prop="fileName" />
|
|
||||||
<el-table-column label="文件url" align="center" prop="fileUrl" />
|
|
||||||
<el-table-column label="创建时间" align="center" prop="createTime" width="180">
|
|
||||||
<template v-slot="scope">
|
|
||||||
<span>{{ parseTime(scope.row.createTime) }}</span>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
|
||||||
<template v-slot="scope">
|
|
||||||
<el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)"
|
|
||||||
v-hasPermi="['base:equipment-file:update']">修改</el-button>
|
|
||||||
<el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)"
|
|
||||||
v-hasPermi="['base:equipment-file:delete']">删除</el-button>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
</el-table>
|
|
||||||
<!-- 分页组件 -->
|
|
||||||
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNo" :limit.sync="queryParams.pageSize"
|
|
||||||
@pagination="getList"/>
|
|
||||||
|
|
||||||
<!-- 对话框(添加 / 修改) -->
|
|
||||||
<el-dialog :title="title" :visible.sync="open" width="500px" v-dialogDrag append-to-body>
|
|
||||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
|
||||||
<el-form-item label="设备ID" prop="equipmentId">
|
|
||||||
<el-input v-model="form.equipmentId" placeholder="请输入设备ID" />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="文件类型 1.图片 2.设备资料" prop="fileType">
|
|
||||||
<el-select v-model="form.fileType" placeholder="请选择文件类型 1.图片 2.设备资料">
|
|
||||||
<el-option v-for="dict in this.getDictDatas(DICT_TYPE.EQU_FILE_TYPE)"
|
|
||||||
:key="dict.value" :label="dict.label" :value="dict.value" />
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="原始文件名" prop="fileName">
|
|
||||||
<el-input v-model="form.fileName" placeholder="请输入原始文件名" />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="文件url" prop="fileUrl">
|
|
||||||
<el-input v-model="form.fileUrl" placeholder="请输入文件url" />
|
|
||||||
</el-form-item>
|
|
||||||
</el-form>
|
|
||||||
<div slot="footer" class="dialog-footer">
|
|
||||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
|
||||||
<el-button @click="cancel">取 消</el-button>
|
|
||||||
</div>
|
|
||||||
</el-dialog>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
import { createEquipmentFile, updateEquipmentFile, deleteEquipmentFile, getEquipmentFile, getEquipmentFilePage, exportEquipmentFileExcel } from "@/api/base/equipmentFile";
|
|
||||||
|
|
||||||
export default {
|
|
||||||
name: "EquipmentFile",
|
|
||||||
components: {
|
|
||||||
},
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
// 遮罩层
|
|
||||||
loading: true,
|
|
||||||
// 导出遮罩层
|
|
||||||
exportLoading: false,
|
|
||||||
// 显示搜索条件
|
|
||||||
showSearch: true,
|
|
||||||
// 总条数
|
|
||||||
total: 0,
|
|
||||||
// 设备文件对应列表
|
|
||||||
list: [],
|
|
||||||
// 弹出层标题
|
|
||||||
title: "",
|
|
||||||
// 是否显示弹出层
|
|
||||||
open: false,
|
|
||||||
// 查询参数
|
|
||||||
queryParams: {
|
|
||||||
pageNo: 1,
|
|
||||||
pageSize: 10,
|
|
||||||
equipmentId: null,
|
|
||||||
},
|
|
||||||
// 表单参数
|
|
||||||
form: {},
|
|
||||||
// 表单校验
|
|
||||||
rules: {
|
|
||||||
}
|
|
||||||
};
|
|
||||||
},
|
|
||||||
created() {
|
|
||||||
this.getList();
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
/** 查询列表 */
|
|
||||||
getList() {
|
|
||||||
this.loading = true;
|
|
||||||
// 执行查询
|
|
||||||
getEquipmentFilePage(this.queryParams).then(response => {
|
|
||||||
this.list = response.data.list;
|
|
||||||
this.total = response.data.total;
|
|
||||||
this.loading = false;
|
|
||||||
});
|
|
||||||
},
|
|
||||||
/** 取消按钮 */
|
|
||||||
cancel() {
|
|
||||||
this.open = false;
|
|
||||||
this.reset();
|
|
||||||
},
|
|
||||||
/** 表单重置 */
|
|
||||||
reset() {
|
|
||||||
this.form = {
|
|
||||||
id: undefined,
|
|
||||||
equipmentId: undefined,
|
|
||||||
fileType: undefined,
|
|
||||||
fileName: undefined,
|
|
||||||
fileUrl: undefined,
|
|
||||||
};
|
|
||||||
this.resetForm("form");
|
|
||||||
},
|
|
||||||
/** 搜索按钮操作 */
|
|
||||||
handleQuery() {
|
|
||||||
this.queryParams.pageNo = 1;
|
|
||||||
this.getList();
|
|
||||||
},
|
|
||||||
/** 重置按钮操作 */
|
|
||||||
resetQuery() {
|
|
||||||
this.resetForm("queryForm");
|
|
||||||
this.handleQuery();
|
|
||||||
},
|
|
||||||
/** 新增按钮操作 */
|
|
||||||
handleAdd() {
|
|
||||||
this.reset();
|
|
||||||
this.open = true;
|
|
||||||
this.title = "添加设备文件对应";
|
|
||||||
},
|
|
||||||
/** 修改按钮操作 */
|
|
||||||
handleUpdate(row) {
|
|
||||||
this.reset();
|
|
||||||
const id = row.id;
|
|
||||||
getEquipmentFile(id).then(response => {
|
|
||||||
this.form = response.data;
|
|
||||||
this.open = true;
|
|
||||||
this.title = "修改设备文件对应";
|
|
||||||
});
|
|
||||||
},
|
|
||||||
/** 提交按钮 */
|
|
||||||
submitForm() {
|
|
||||||
this.$refs["form"].validate(valid => {
|
|
||||||
if (!valid) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
// 修改的提交
|
|
||||||
if (this.form.id != null) {
|
|
||||||
updateEquipmentFile(this.form).then(response => {
|
|
||||||
this.$modal.msgSuccess("修改成功");
|
|
||||||
this.open = false;
|
|
||||||
this.getList();
|
|
||||||
});
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
// 添加的提交
|
|
||||||
createEquipmentFile(this.form).then(response => {
|
|
||||||
this.$modal.msgSuccess("新增成功");
|
|
||||||
this.open = false;
|
|
||||||
this.getList();
|
|
||||||
});
|
|
||||||
});
|
|
||||||
},
|
|
||||||
/** 删除按钮操作 */
|
|
||||||
handleDelete(row) {
|
|
||||||
const id = row.id;
|
|
||||||
this.$modal.confirm('是否确认删除设备文件对应编号为"' + id + '"的数据项?').then(function() {
|
|
||||||
return deleteEquipmentFile(id);
|
|
||||||
}).then(() => {
|
|
||||||
this.getList();
|
|
||||||
this.$modal.msgSuccess("删除成功");
|
|
||||||
}).catch(() => {});
|
|
||||||
},
|
|
||||||
/** 导出按钮操作 */
|
|
||||||
handleExport() {
|
|
||||||
// 处理查询参数
|
|
||||||
let params = {...this.queryParams};
|
|
||||||
params.pageNo = undefined;
|
|
||||||
params.pageSize = undefined;
|
|
||||||
this.$modal.confirm('是否确认导出所有设备文件对应数据项?').then(() => {
|
|
||||||
this.exportLoading = true;
|
|
||||||
return exportEquipmentFileExcel(params);
|
|
||||||
}).then(response => {
|
|
||||||
this.$download.excel(response, '设备文件对应.xls');
|
|
||||||
this.exportLoading = false;
|
|
||||||
}).catch(() => {});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
</script>
|
|
||||||
@@ -1,481 +0,0 @@
|
|||||||
<!--
|
|
||||||
filename: EquipmentDrawer.vue
|
|
||||||
author: liubin
|
|
||||||
date: 2023-08-22 14:38:56
|
|
||||||
description:
|
|
||||||
-->
|
|
||||||
|
|
||||||
<template>
|
|
||||||
<el-drawer
|
|
||||||
:visible="visible"
|
|
||||||
:show-close="false"
|
|
||||||
:wrapper-closable="false"
|
|
||||||
class="drawer"
|
|
||||||
custom-class="mes-drawer"
|
|
||||||
size="60%"
|
|
||||||
@closed="$emit('destroy')">
|
|
||||||
<SmallTitle slot="title">
|
|
||||||
{{
|
|
||||||
mode.includes('detail')
|
|
||||||
? '详情'
|
|
||||||
: mode.includes('edit')
|
|
||||||
? '编辑'
|
|
||||||
: '新增'
|
|
||||||
}}
|
|
||||||
</SmallTitle>
|
|
||||||
|
|
||||||
<div class="drawer-body flex">
|
|
||||||
<div class="drawer-body__content">
|
|
||||||
<section v-for="(section, index) in sections" :key="section.key">
|
|
||||||
<SmallTitle v-if="index != 0">{{ section.name }}</SmallTitle>
|
|
||||||
|
|
||||||
<div class="form-part" v-if="section.key == 'base'">
|
|
||||||
<el-skeleton v-if="!showForm" animated />
|
|
||||||
<BaseInfoForm
|
|
||||||
key="drawer-dialog-form"
|
|
||||||
v-if="showForm"
|
|
||||||
ref="form"
|
|
||||||
:disabled="mode.includes('detail')"
|
|
||||||
v-model="form"
|
|
||||||
:rows="formRows" />
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div v-if="section.key == 'attrs'" style="margin-top: 12px">
|
|
||||||
<base-table
|
|
||||||
v-loading="attrListLoading"
|
|
||||||
:table-props="section.props"
|
|
||||||
:page="attrQuery?.params.pageNo || 1"
|
|
||||||
:limit="attrQuery?.params.pageSize || 10"
|
|
||||||
:table-data="list"
|
|
||||||
:add-button-show="mode.includes('detail') ? null : '添加属性'"
|
|
||||||
@emitButtonClick="handleAddAttr"
|
|
||||||
@emitFun="handleEmitFun">
|
|
||||||
<method-btn
|
|
||||||
v-if="section.tableBtn"
|
|
||||||
slot="handleBtn"
|
|
||||||
label="操作"
|
|
||||||
:method-list="tableBtn"
|
|
||||||
@clickBtn="handleTableBtnClick" />
|
|
||||||
</base-table>
|
|
||||||
|
|
||||||
<!-- 分页组件 -->
|
|
||||||
<pagination
|
|
||||||
v-show="total > 0"
|
|
||||||
:total="total"
|
|
||||||
:page.sync="attrQuery.params.pageNo"
|
|
||||||
:limit.sync="attrQuery.params.pageSize"
|
|
||||||
@pagination="getAttrList" />
|
|
||||||
</div>
|
|
||||||
</section>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="drawer-body__footer">
|
|
||||||
<el-button style="" @click="handleCancel">取消</el-button>
|
|
||||||
<el-button v-if="mode == 'detail'" type="primary" @click="toggleEdit">
|
|
||||||
编辑
|
|
||||||
</el-button>
|
|
||||||
<el-button v-else type="primary" @click="handleCancel">确定</el-button>
|
|
||||||
<!-- sections的第二项必须是 属性列表 -->
|
|
||||||
<!-- <el-button
|
|
||||||
v-if="sections[1].allowAdd"
|
|
||||||
type="primary"
|
|
||||||
@click="handleAddAttr">
|
|
||||||
添加属性
|
|
||||||
</el-button> -->
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- 属性对话框 -->
|
|
||||||
<base-dialog
|
|
||||||
v-if="sections[1].allowAdd"
|
|
||||||
:dialogTitle="attrTitle"
|
|
||||||
:dialogVisible="attrFormVisible"
|
|
||||||
width="45%"
|
|
||||||
:append-to-body="true"
|
|
||||||
custom-class="baseDialog"
|
|
||||||
@close="closeAttrForm"
|
|
||||||
@cancel="closeAttrForm"
|
|
||||||
@confirm="submitAttrForm">
|
|
||||||
<DialogForm
|
|
||||||
v-if="attrFormVisible"
|
|
||||||
ref="attrForm"
|
|
||||||
:disabled="mode.includes('detail')"
|
|
||||||
v-model="attrForm"
|
|
||||||
:rows="attrRows" />
|
|
||||||
</base-dialog>
|
|
||||||
</el-drawer>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
import BaseInfoForm from '@/components/DialogForm';
|
|
||||||
import DialogForm from './dialogForm';
|
|
||||||
|
|
||||||
const SmallTitle = {
|
|
||||||
name: 'SmallTitle',
|
|
||||||
props: ['size'],
|
|
||||||
data() {
|
|
||||||
return {};
|
|
||||||
},
|
|
||||||
methods: {},
|
|
||||||
render: function (h) {
|
|
||||||
return h(
|
|
||||||
'span',
|
|
||||||
{
|
|
||||||
class: 'small-title',
|
|
||||||
style: {
|
|
||||||
fontSize: '18px',
|
|
||||||
lineHeight:
|
|
||||||
this.size == 'lg' ? '24px' : this.size == 'sm' ? '18px' : '20px',
|
|
||||||
fontWeight: 500,
|
|
||||||
fontFamily: '微软雅黑, Microsoft YaHei, Arial, Helvetica, sans-serif',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
this.$slots.default
|
|
||||||
);
|
|
||||||
},
|
|
||||||
};
|
|
||||||
|
|
||||||
export default {
|
|
||||||
components: { SmallTitle, DialogForm, BaseInfoForm },
|
|
||||||
props: ['sections', 'defaultMode', 'dataId'], // dataId 作为一个通用的存放id的字段
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
mode: '',
|
|
||||||
visible: false,
|
|
||||||
showForm: false,
|
|
||||||
total: 0,
|
|
||||||
form: {},
|
|
||||||
list: [],
|
|
||||||
attrTitle: '',
|
|
||||||
attrForm: {
|
|
||||||
id: null,
|
|
||||||
equipmentGroupId: '',
|
|
||||||
code: '',
|
|
||||||
type: '',
|
|
||||||
grade: '',
|
|
||||||
alarmCode: '',
|
|
||||||
alarmContent: '',
|
|
||||||
plcParamName: '',
|
|
||||||
},
|
|
||||||
attrFormVisible: false,
|
|
||||||
attrRows: [
|
|
||||||
[
|
|
||||||
{
|
|
||||||
input: true,
|
|
||||||
label: '报警编码', // 自动生成
|
|
||||||
prop: 'code',
|
|
||||||
url: '/base/equipment-group-alarm/getCode',
|
|
||||||
rules: [{ required: true, message: '不能为空', trigger: 'blur' }],
|
|
||||||
},
|
|
||||||
{
|
|
||||||
select: true,
|
|
||||||
label: '报警类型', // 固定选项
|
|
||||||
prop: 'type',
|
|
||||||
options: [
|
|
||||||
{ label: '布尔型', value: 2 },
|
|
||||||
{ label: '字符型', value: 1 },
|
|
||||||
],
|
|
||||||
rules: [{ required: true, message: '不能为空', trigger: 'blur' }],
|
|
||||||
},
|
|
||||||
],
|
|
||||||
[
|
|
||||||
{
|
|
||||||
select: true,
|
|
||||||
label: '报警级别', // 字典
|
|
||||||
prop: 'grade',
|
|
||||||
options: this.getDictDatas(this.DICT_TYPE.EQU_ALARM_LEVEL),
|
|
||||||
},
|
|
||||||
{
|
|
||||||
input: true,
|
|
||||||
label: '设备报警编码', // 对应到设备实际的报警编码
|
|
||||||
prop: 'alarmCode',
|
|
||||||
},
|
|
||||||
],
|
|
||||||
[
|
|
||||||
{
|
|
||||||
input: true,
|
|
||||||
label: '参数列名', // 在实时数据库的列名
|
|
||||||
prop: 'plcParamName',
|
|
||||||
rules: [{ required: true, message: '不能为空', trigger: 'blur' }],
|
|
||||||
},
|
|
||||||
{
|
|
||||||
input: true,
|
|
||||||
label: '报警内容',
|
|
||||||
prop: 'alarmContent',
|
|
||||||
rules: [{ required: true, message: '不能为空', trigger: 'blur' }],
|
|
||||||
},
|
|
||||||
],
|
|
||||||
],
|
|
||||||
attrQuery: {
|
|
||||||
params: {
|
|
||||||
pageNo: 1,
|
|
||||||
pageSize: 10,
|
|
||||||
},
|
|
||||||
}, // 属性列表的请求
|
|
||||||
infoQuery: null, // 基本信息的请求
|
|
||||||
attrFormSubmitting: false,
|
|
||||||
attrListLoading: false,
|
|
||||||
};
|
|
||||||
},
|
|
||||||
computed: {
|
|
||||||
formRows() {
|
|
||||||
return this.sections[0].rows.map((row) => {
|
|
||||||
return row.map((col) => {
|
|
||||||
return {
|
|
||||||
...col,
|
|
||||||
bind: {
|
|
||||||
// 详情 模式下,禁用各种输入
|
|
||||||
// disabled: this.mode == 'detail',
|
|
||||||
disabled: true
|
|
||||||
},
|
|
||||||
};
|
|
||||||
});
|
|
||||||
});
|
|
||||||
},
|
|
||||||
tableBtn() {
|
|
||||||
return this.mode == 'detail' ? [] : this.sections[1].tableBtn;
|
|
||||||
},
|
|
||||||
},
|
|
||||||
mounted() {
|
|
||||||
this.mode = this.defaultMode || 'detail';
|
|
||||||
for (const section of this.sections) {
|
|
||||||
// 请求具体信息
|
|
||||||
if ('url' in section) {
|
|
||||||
const query = {
|
|
||||||
url: section.url,
|
|
||||||
method: section.method || 'get',
|
|
||||||
params: section.queryParams || null,
|
|
||||||
data: section.data || null,
|
|
||||||
};
|
|
||||||
// debugger;
|
|
||||||
this.$axios(query).then(({ data }) => {
|
|
||||||
if (section.key == 'base') {
|
|
||||||
this.form = data;
|
|
||||||
this.showForm = true;
|
|
||||||
this.infoQuery = query;
|
|
||||||
} else if (section.key == 'attrs') {
|
|
||||||
this.attrQuery = query;
|
|
||||||
this.list = data.list;
|
|
||||||
this.total = data.total;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
handleTableBtnClick({ type, data }) {
|
|
||||||
switch (type) {
|
|
||||||
case 'edit':
|
|
||||||
this.handleEditAttr(data.id);
|
|
||||||
break;
|
|
||||||
case 'delete':
|
|
||||||
this.handleDeleteAttr(data.id);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
handleEmitFun(val) {
|
|
||||||
console.log('handleEmitFun', val);
|
|
||||||
},
|
|
||||||
|
|
||||||
init() {
|
|
||||||
this.visible = true;
|
|
||||||
},
|
|
||||||
|
|
||||||
async getAttrList() {
|
|
||||||
this.attrListLoading = true;
|
|
||||||
const res = await this.$axios(this.attrQuery);
|
|
||||||
if (res.code == 0) {
|
|
||||||
this.list = res.data.list;
|
|
||||||
this.total = res.data.total;
|
|
||||||
}
|
|
||||||
this.attrListLoading = false;
|
|
||||||
},
|
|
||||||
|
|
||||||
// 保存表单
|
|
||||||
handleSave() {
|
|
||||||
this.$refs['form'][0].validate(async (valid) => {
|
|
||||||
if (valid) {
|
|
||||||
const isEdit = this.mode == 'edit';
|
|
||||||
await this.$axios({
|
|
||||||
url: this.sections[0][isEdit ? 'urlUpdate' : 'urlCreate'],
|
|
||||||
method: isEdit ? 'put' : 'post',
|
|
||||||
data: this.form,
|
|
||||||
});
|
|
||||||
this.$modal.msgSuccess(`${isEdit ? '更新' : '创建'}成功`);
|
|
||||||
this.visible = false;
|
|
||||||
this.$emit('refreshDataList');
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
|
|
||||||
handleCancel() {
|
|
||||||
this.visible = false;
|
|
||||||
},
|
|
||||||
|
|
||||||
// 开启编辑
|
|
||||||
toggleEdit() {
|
|
||||||
this.mode = 'edit';
|
|
||||||
},
|
|
||||||
|
|
||||||
// 新增属性
|
|
||||||
handleAddAttr() {
|
|
||||||
if (!this.dataId) return this.$message.warning('请先创建设备分组信息');
|
|
||||||
this.attrForm = {
|
|
||||||
id: null,
|
|
||||||
equipmentGroupId: this.dataId,
|
|
||||||
code: '',
|
|
||||||
type: '',
|
|
||||||
grade: '',
|
|
||||||
alarmCode: '',
|
|
||||||
alarmContent: '',
|
|
||||||
plcParamName: '',
|
|
||||||
};
|
|
||||||
this.attrTitle = '添加设备分组报警';
|
|
||||||
this.attrFormVisible = true;
|
|
||||||
},
|
|
||||||
|
|
||||||
// 编辑属性
|
|
||||||
async handleEditAttr(attrId) {
|
|
||||||
const res = await this.$axios({
|
|
||||||
url: this.sections[1].urlDetail,
|
|
||||||
method: 'get',
|
|
||||||
params: { id: attrId },
|
|
||||||
});
|
|
||||||
if (res.code == 0) {
|
|
||||||
this.attrForm = res.data;
|
|
||||||
this.attrTitle = '编辑设备分组报警';
|
|
||||||
this.attrFormVisible = true;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
// 删除属性
|
|
||||||
handleDeleteAttr(attrId) {
|
|
||||||
this.$confirm('确定删除该分组报警?', '提示', {
|
|
||||||
confirmButtonText: '确定',
|
|
||||||
cancelButtonText: '取消',
|
|
||||||
type: 'warning',
|
|
||||||
})
|
|
||||||
.then(async () => {
|
|
||||||
const res = await this.$axios({
|
|
||||||
url: this.sections[1].urlDelete,
|
|
||||||
method: 'delete',
|
|
||||||
params: { id: attrId },
|
|
||||||
});
|
|
||||||
if (res.code == 0) {
|
|
||||||
this.$message({
|
|
||||||
message: '删除成功',
|
|
||||||
type: 'success',
|
|
||||||
duration: 1500,
|
|
||||||
onClose: () => {
|
|
||||||
this.getAttrList();
|
|
||||||
},
|
|
||||||
});
|
|
||||||
}
|
|
||||||
})
|
|
||||||
.catch(() => {});
|
|
||||||
},
|
|
||||||
|
|
||||||
// 提交属性表
|
|
||||||
async submitAttrForm() {
|
|
||||||
this.$refs['attrForm'].validate((valid) => {
|
|
||||||
if (!valid) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
const isEdit = this.attrForm.id != null;
|
|
||||||
this.attrFormSubmitting = true;
|
|
||||||
const res = await this.$axios({
|
|
||||||
url: isEdit ? this.sections[1].urlUpdate : this.sections[1].urlCreate,
|
|
||||||
method: isEdit ? 'put' : 'post',
|
|
||||||
data: this.attrForm,
|
|
||||||
});
|
|
||||||
|
|
||||||
if (res.code == 0) {
|
|
||||||
this.closeAttrForm();
|
|
||||||
this.$message({
|
|
||||||
message: `${isEdit ? '更新' : '创建'}成功`,
|
|
||||||
type: 'success',
|
|
||||||
duration: 1500,
|
|
||||||
onClose: () => {
|
|
||||||
this.getAttrList();
|
|
||||||
},
|
|
||||||
});
|
|
||||||
}
|
|
||||||
this.attrFormSubmitting = false;
|
|
||||||
},
|
|
||||||
|
|
||||||
closeAttrForm() {
|
|
||||||
this.attrFormVisible = false;
|
|
||||||
},
|
|
||||||
|
|
||||||
handleClick(raw) {
|
|
||||||
if (raw.type === 'delete') {
|
|
||||||
this.$confirm(`确定删除该报警?`, '提示', {
|
|
||||||
confirmButtonText: '确定',
|
|
||||||
cancelButtonText: '取消',
|
|
||||||
type: 'warning',
|
|
||||||
})
|
|
||||||
.then(() => {
|
|
||||||
deleteProductAttr(raw.data.id).then(({ data }) => {
|
|
||||||
this.$message({
|
|
||||||
message: '操作成功',
|
|
||||||
type: 'success',
|
|
||||||
duration: 1500,
|
|
||||||
onClose: () => {
|
|
||||||
this.getList();
|
|
||||||
},
|
|
||||||
});
|
|
||||||
});
|
|
||||||
})
|
|
||||||
.catch(() => {});
|
|
||||||
} else {
|
|
||||||
this.addNew(raw.data.id);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
},
|
|
||||||
};
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style scoped>
|
|
||||||
.drawer >>> .el-drawer {
|
|
||||||
border-radius: 8px 0 0 8px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.drawer >>> .el-drawer__header {
|
|
||||||
margin: 0;
|
|
||||||
padding: 32px 32px 24px;
|
|
||||||
border-bottom: 1px solid #dcdfe6;
|
|
||||||
margin-bottom: 0px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.small-title::before {
|
|
||||||
content: '';
|
|
||||||
display: inline-block;
|
|
||||||
vertical-align: top;
|
|
||||||
width: 4px;
|
|
||||||
height: 22px;
|
|
||||||
border-radius: 1px;
|
|
||||||
margin-right: 8px;
|
|
||||||
background-color: #0b58ff;
|
|
||||||
}
|
|
||||||
|
|
||||||
.drawer-body {
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
height: 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.drawer-body__content {
|
|
||||||
flex: 1;
|
|
||||||
/* background: #eee; */
|
|
||||||
padding: 20px 30px;
|
|
||||||
overflow-y: auto;
|
|
||||||
}
|
|
||||||
|
|
||||||
.drawer-body__footer {
|
|
||||||
display: flex;
|
|
||||||
justify-content: flex-end;
|
|
||||||
padding: 18px;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
@@ -1,187 +0,0 @@
|
|||||||
<!--
|
|
||||||
filename: dialogForm.vue
|
|
||||||
author: liubin
|
|
||||||
date: 2023-09-11 15:55:13
|
|
||||||
description: DialogForm for equipmentBindSection only
|
|
||||||
-->
|
|
||||||
|
|
||||||
<template>
|
|
||||||
<el-form
|
|
||||||
ref="form"
|
|
||||||
:model="dataForm"
|
|
||||||
label-width="100px"
|
|
||||||
v-loading="formLoading">
|
|
||||||
<el-row :gutter="20">
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item
|
|
||||||
label="报警编码"
|
|
||||||
prop="code"
|
|
||||||
:rules="[{ required: true, message: '不能为空', trigger: 'blur' }]">
|
|
||||||
<el-input
|
|
||||||
:disabled="disabled"
|
|
||||||
v-model="dataForm.code"
|
|
||||||
@change="$emit('update', dataForm)"
|
|
||||||
placeholder="请输入工段排序" />
|
|
||||||
</el-form-item>
|
|
||||||
<!--
|
|
||||||
<el-form-item
|
|
||||||
label="报警编码"
|
|
||||||
prop="code"
|
|
||||||
:rules="[{ required: true, message: '不能为空', trigger: 'blur' }]">
|
|
||||||
<el-select
|
|
||||||
v-model="dataForm.code"
|
|
||||||
placeholder="请选择产线"
|
|
||||||
@change="handleProductlineChange">
|
|
||||||
<el-option
|
|
||||||
v-for="opt in productionLineList"
|
|
||||||
:key="opt.value"
|
|
||||||
:label="opt.label"
|
|
||||||
:value="opt.value" />
|
|
||||||
</el-select>
|
|
||||||
</el-form-item> -->
|
|
||||||
</el-col>
|
|
||||||
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item
|
|
||||||
label="报警类型"
|
|
||||||
prop="type"
|
|
||||||
:rules="[{ required: true, message: '不能为空', trigger: 'blur' }]">
|
|
||||||
<el-select
|
|
||||||
:disabled="disabled"
|
|
||||||
v-model="dataForm.type"
|
|
||||||
placeholder="请选择报警类型"
|
|
||||||
@change="handleTypeChange">
|
|
||||||
<el-option
|
|
||||||
v-for="opt in [
|
|
||||||
{ label: '布尔型', value: 2 },
|
|
||||||
{ label: '字符型', value: 1 },
|
|
||||||
]"
|
|
||||||
:key="opt.value"
|
|
||||||
:label="opt.label"
|
|
||||||
:value="opt.value" />
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
<el-row :gutter="20">
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item
|
|
||||||
label="报警级别"
|
|
||||||
prop="grade"
|
|
||||||
:rules="[{ required: true, message: '不能为空', trigger: 'blur' }]">
|
|
||||||
<el-select
|
|
||||||
:disabled="disabled"
|
|
||||||
v-model="dataForm.grade"
|
|
||||||
placeholder="请选择报警级别"
|
|
||||||
@change="$emit('update', dataForm)">
|
|
||||||
<el-option
|
|
||||||
v-for="opt in getDictDatas(DICT_TYPE.EQU_ALARM_LEVEL)"
|
|
||||||
:key="opt.value"
|
|
||||||
:label="opt.label"
|
|
||||||
:value="opt.value" />
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item
|
|
||||||
v-if="+dataForm.type == 1"
|
|
||||||
label="设备报警编码"
|
|
||||||
prop="alarmCode">
|
|
||||||
<el-input
|
|
||||||
:disabled="disabled"
|
|
||||||
v-model="dataForm.alarmCode"
|
|
||||||
@change="$emit('update', dataForm)"
|
|
||||||
placeholder="请输入设备报警编码" />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
<el-row :gutter="20">
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item
|
|
||||||
label="参数列名"
|
|
||||||
prop="plcParamName"
|
|
||||||
:rules="[{ required: true, message: '不能为空', trigger: 'blur' }]">
|
|
||||||
<el-input
|
|
||||||
:disabled="disabled"
|
|
||||||
v-model="dataForm.plcParamName"
|
|
||||||
placeholder="请输入参数列名"
|
|
||||||
@change="$emit('update', dataForm)"></el-input>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item
|
|
||||||
label="报警内容"
|
|
||||||
prop="alarmContent"
|
|
||||||
:rules="[{ required: true, message: '不能为空', trigger: 'blur' }]">
|
|
||||||
<el-input
|
|
||||||
:disabled="disabled"
|
|
||||||
v-model="dataForm.alarmContent"
|
|
||||||
placeholder="请输入报警内容"
|
|
||||||
@change="$emit('update', dataForm)"></el-input>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
</el-form>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
export default {
|
|
||||||
name: 'DialogForm',
|
|
||||||
model: {
|
|
||||||
prop: 'dataForm',
|
|
||||||
event: 'update',
|
|
||||||
},
|
|
||||||
emits: ['update'],
|
|
||||||
components: {},
|
|
||||||
props: {
|
|
||||||
dataForm: {
|
|
||||||
type: Object,
|
|
||||||
default: () => ({}),
|
|
||||||
},
|
|
||||||
disabled: {
|
|
||||||
type: Boolean,
|
|
||||||
default: false,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
formLoading: true,
|
|
||||||
};
|
|
||||||
},
|
|
||||||
mounted() {
|
|
||||||
this.getCode('/base/equipment-group-alarm/getCode').then((code) => {
|
|
||||||
this.formLoading = false;
|
|
||||||
this.$emit('update', {
|
|
||||||
...this.dataForm,
|
|
||||||
code,
|
|
||||||
});
|
|
||||||
});
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
/** 模拟透传 ref */
|
|
||||||
validate(cb) {
|
|
||||||
return this.$refs.form.validate(cb);
|
|
||||||
},
|
|
||||||
resetFields(args) {
|
|
||||||
return this.$refs.form.resetFields(args);
|
|
||||||
},
|
|
||||||
async handleTypeChange(id) {
|
|
||||||
// debugger;
|
|
||||||
this.dataForm.alarmCode = '';
|
|
||||||
this.$emit('update', this.dataForm);
|
|
||||||
},
|
|
||||||
async getCode(url) {
|
|
||||||
const response = await this.$axios(url);
|
|
||||||
return response.data;
|
|
||||||
},
|
|
||||||
},
|
|
||||||
};
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style scoped lang="scss">
|
|
||||||
.el-date-editor,
|
|
||||||
.el-select {
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
@@ -1,466 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div class="app-container">
|
|
||||||
<!-- 搜索工作栏 -->
|
|
||||||
<SearchBar
|
|
||||||
:formConfigs="searchBarFormConfig"
|
|
||||||
ref="search-bar"
|
|
||||||
@headBtnClick="handleSearchBarBtnClick" />
|
|
||||||
|
|
||||||
<!-- 列表 -->
|
|
||||||
<base-table
|
|
||||||
:table-props="tableProps"
|
|
||||||
:page="queryParams.pageNo"
|
|
||||||
:limit="queryParams.pageSize"
|
|
||||||
:table-data="list"
|
|
||||||
@emitFun="handleEmitFun">
|
|
||||||
<method-btn
|
|
||||||
v-if="tableBtn.length"
|
|
||||||
slot="handleBtn"
|
|
||||||
label="操作"
|
|
||||||
:width="120"
|
|
||||||
:method-list="tableBtn"
|
|
||||||
@clickBtn="handleTableBtnClick" />
|
|
||||||
</base-table>
|
|
||||||
|
|
||||||
<!-- 分页组件 -->
|
|
||||||
<pagination
|
|
||||||
v-show="total > 0"
|
|
||||||
:total="total"
|
|
||||||
:page.sync="queryParams.pageNo"
|
|
||||||
:limit.sync="queryParams.pageSize"
|
|
||||||
@pagination="getList" />
|
|
||||||
|
|
||||||
<!-- 对话框(添加 / 修改) -->
|
|
||||||
<base-dialog
|
|
||||||
:dialogTitle="title"
|
|
||||||
:dialogVisible="open"
|
|
||||||
width="500px"
|
|
||||||
@close="cancel"
|
|
||||||
@cancel="cancel"
|
|
||||||
@confirm="submitForm">
|
|
||||||
<DialogForm v-if="open" ref="form" v-model="form" :rows="rows"/>
|
|
||||||
</base-dialog>
|
|
||||||
|
|
||||||
<!-- 抽屉 详情 -->
|
|
||||||
<BasicDrawer
|
|
||||||
v-if="editVisible"
|
|
||||||
ref="drawer"
|
|
||||||
:default-mode="editMode"
|
|
||||||
:data-id="alarmForm.id"
|
|
||||||
:sections="[
|
|
||||||
{
|
|
||||||
name: '基本信息',
|
|
||||||
key: 'base',
|
|
||||||
rows: drawerBaseInfoRows,
|
|
||||||
url: '/base/equipment-group/get',
|
|
||||||
urlUpdate: '/base/equipment-group/update',
|
|
||||||
urlCreate: '/base/equipment-group/create',
|
|
||||||
queryParams: { id: alarmForm.id },
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: '属性列表',
|
|
||||||
key: 'attrs',
|
|
||||||
props: drawerListProps,
|
|
||||||
url: '/base/equipment-group-alarm/page',
|
|
||||||
urlCreate: '/base/equipment-group-alarm/create',
|
|
||||||
urlUpdate: '/base/equipment-group-alarm/update',
|
|
||||||
urlDelete: '/base/equipment-group-alarm/delete',
|
|
||||||
urlDetail: '/base/equipment-group-alarm/get',
|
|
||||||
queryParams: {
|
|
||||||
equipmentGroupId: alarmForm.id,
|
|
||||||
pageNo: 1,
|
|
||||||
pageSize: 10,
|
|
||||||
},
|
|
||||||
tableBtn: [
|
|
||||||
this.$auth.hasPermi('base:equipment-group:update')
|
|
||||||
? {
|
|
||||||
type: 'edit',
|
|
||||||
btnName: '修改',
|
|
||||||
}
|
|
||||||
: undefined,
|
|
||||||
this.$auth.hasPermi('base:equipment-group:delete')
|
|
||||||
? {
|
|
||||||
type: 'delete',
|
|
||||||
btnName: '删除',
|
|
||||||
}
|
|
||||||
: undefined,
|
|
||||||
].filter((v) => v),
|
|
||||||
allowAdd: true,
|
|
||||||
},
|
|
||||||
]"
|
|
||||||
@refreshDataList="getList"
|
|
||||||
@cancel="editVisible = false"
|
|
||||||
@destroy="editVisible = false" />
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
import {
|
|
||||||
createEquipmentGroup,
|
|
||||||
updateEquipmentGroup,
|
|
||||||
deleteEquipmentGroup,
|
|
||||||
getEquipmentGroup,
|
|
||||||
getEquipmentGroupPage,
|
|
||||||
exportEquipmentGroupExcel,
|
|
||||||
} from '@/api/base/equipmentGroup';
|
|
||||||
import moment from 'moment';
|
|
||||||
import { publicFormatter } from '@/utils/dict';
|
|
||||||
import basicPageMixin from '@/mixins/lb/basicPageMixin';
|
|
||||||
// import { getAccessToken } from '@/utils/auth';
|
|
||||||
import BasicDrawer from './components/BasicDrawer.vue';
|
|
||||||
|
|
||||||
export default {
|
|
||||||
name: 'EquipmentGroup',
|
|
||||||
mixins: [basicPageMixin],
|
|
||||||
components: { BasicDrawer },
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
editVisible: false,
|
|
||||||
editMode: '',
|
|
||||||
searchBarKeys: ['name', 'code'],
|
|
||||||
tableBtn: [
|
|
||||||
this.$auth.hasPermi('base:equipment-group:update')
|
|
||||||
? {
|
|
||||||
type: 'detail',
|
|
||||||
btnName: '查看报警',
|
|
||||||
}
|
|
||||||
: undefined,
|
|
||||||
this.$auth.hasPermi('base:equipment-group:update')
|
|
||||||
? {
|
|
||||||
type: 'edit',
|
|
||||||
btnName: '修改',
|
|
||||||
}
|
|
||||||
: undefined,
|
|
||||||
this.$auth.hasPermi('base:equipment-group:delete')
|
|
||||||
? {
|
|
||||||
type: 'delete',
|
|
||||||
btnName: '删除',
|
|
||||||
}
|
|
||||||
: undefined,
|
|
||||||
].filter((v) => v),
|
|
||||||
tableProps: [
|
|
||||||
{
|
|
||||||
prop: 'createTime',
|
|
||||||
label: '添加时间',
|
|
||||||
fixed: true,
|
|
||||||
width: 180,
|
|
||||||
filter: (val) => moment(val).format('yyyy-MM-DD HH:mm:ss'),
|
|
||||||
},
|
|
||||||
{ prop: 'name', label: '设备分组名称' },
|
|
||||||
{ prop: 'code', label: '设备分组编码' },
|
|
||||||
{ prop: 'remark', label: '备注' },
|
|
||||||
// {
|
|
||||||
// _action: 'equipment-group-show-alert',
|
|
||||||
// label: '报警',
|
|
||||||
// subcomponent: {
|
|
||||||
// props: ['injectData'],
|
|
||||||
// render: function (h) {
|
|
||||||
// const _this = this;
|
|
||||||
// return h(
|
|
||||||
// 'el-button',
|
|
||||||
// {
|
|
||||||
// props: { type: 'text' },
|
|
||||||
// on: {
|
|
||||||
// click: function () {
|
|
||||||
// console.log('inejctdata', _this.injectData);
|
|
||||||
// _this.$emit('emitData', {
|
|
||||||
// action: _this.injectData._action,
|
|
||||||
// // value: _this.injectData.id,
|
|
||||||
// value: _this.injectData,
|
|
||||||
// });
|
|
||||||
// },
|
|
||||||
// },
|
|
||||||
// },
|
|
||||||
// '查看报警'
|
|
||||||
// );
|
|
||||||
// },
|
|
||||||
// },
|
|
||||||
// },
|
|
||||||
],
|
|
||||||
drawerBaseInfoRows: [
|
|
||||||
[
|
|
||||||
{
|
|
||||||
input: true,
|
|
||||||
label: '设备分组名称',
|
|
||||||
prop: 'name',
|
|
||||||
rules: [{ required: true, message: '不能为空', trigger: 'blur' }],
|
|
||||||
// bind: {
|
|
||||||
// disabled: this.editMode == 'detail', // some condition, like detail mode...
|
|
||||||
// }
|
|
||||||
},
|
|
||||||
{
|
|
||||||
input: true,
|
|
||||||
label: '设备分组编码',
|
|
||||||
prop: 'code',
|
|
||||||
// url: '/base/equipment/getCode',
|
|
||||||
}
|
|
||||||
]
|
|
||||||
],
|
|
||||||
drawerListProps: [
|
|
||||||
{
|
|
||||||
prop: 'createTime',
|
|
||||||
label: '添加时间',
|
|
||||||
fixed: true,
|
|
||||||
width: 180,
|
|
||||||
filter: (val) => moment(val).format('yyyy-MM-DD HH:mm:ss'),
|
|
||||||
},
|
|
||||||
{ width: 240, prop: 'code', label: '报警编码' },
|
|
||||||
{
|
|
||||||
width: 100,
|
|
||||||
prop: 'type',
|
|
||||||
label: '报警类型',
|
|
||||||
filter: (val) =>
|
|
||||||
val != null ? ['-', '字符型', '布尔型', '-'][val] : '-',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
width: 90,
|
|
||||||
prop: 'grade',
|
|
||||||
label: '报警级别',
|
|
||||||
filter: publicFormatter(this.DICT_TYPE.EQU_ALARM_LEVEL),
|
|
||||||
},
|
|
||||||
{ width: 180, prop: 'alarmCode', label: '设备报警编码' },
|
|
||||||
{ width: 128, prop: 'plcParamName', label: '参数列名' },
|
|
||||||
{ width: 128, prop: 'alarmContent', label: '报警内容' },
|
|
||||||
],
|
|
||||||
alarmForm: {
|
|
||||||
id: undefined,
|
|
||||||
equipmentGroupCode: undefined,
|
|
||||||
equipmentGroupName: undefined,
|
|
||||||
},
|
|
||||||
searchBarFormConfig: [
|
|
||||||
{
|
|
||||||
type: 'input',
|
|
||||||
label: '分组名称',
|
|
||||||
placeholder: '请输入设备分组名称',
|
|
||||||
param: 'name',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
type: 'input',
|
|
||||||
label: '分组编码',
|
|
||||||
placeholder: '请输入设备分组编码',
|
|
||||||
param: 'code',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
type: 'button',
|
|
||||||
btnName: '查询',
|
|
||||||
name: 'search',
|
|
||||||
color: 'primary',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
type: 'separate',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
type: this.$auth.hasPermi('base:equipment-group:create')
|
|
||||||
? 'button'
|
|
||||||
: '',
|
|
||||||
btnName: '新增',
|
|
||||||
name: 'add',
|
|
||||||
plain: true,
|
|
||||||
color: 'success',
|
|
||||||
},
|
|
||||||
// {
|
|
||||||
// type: this.$auth.hasPermi('base:equipment-group:export') ? 'button' : '',
|
|
||||||
// btnName: '导出',
|
|
||||||
// name: 'export',
|
|
||||||
// color: 'warning',
|
|
||||||
// },
|
|
||||||
],
|
|
||||||
rows: [
|
|
||||||
[
|
|
||||||
{
|
|
||||||
input: true,
|
|
||||||
label: '分组名称',
|
|
||||||
prop: 'name',
|
|
||||||
rules: [{ required: true, message: '不能为空', trigger: 'blur' }],
|
|
||||||
// bind: {
|
|
||||||
// disabled: true, // some condition, like detail mode...
|
|
||||||
// }
|
|
||||||
},
|
|
||||||
],
|
|
||||||
[
|
|
||||||
{
|
|
||||||
input: true,
|
|
||||||
label: '分组编码',
|
|
||||||
prop: 'code',
|
|
||||||
url: '/base/equipment-group/getCode',
|
|
||||||
rules: [{ required: true, message: '不能为空', trigger: 'blur' }],
|
|
||||||
},
|
|
||||||
],
|
|
||||||
[
|
|
||||||
{
|
|
||||||
input: true,
|
|
||||||
label: '备注',
|
|
||||||
prop: 'remark',
|
|
||||||
// rules: [{ required: true, message: '不能为空', trigger: 'blur' }],
|
|
||||||
bind: {
|
|
||||||
placeholder: '请输入备注',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
],
|
|
||||||
],
|
|
||||||
// 是否显示弹出层
|
|
||||||
open: false,
|
|
||||||
// 查询参数
|
|
||||||
queryParams: {
|
|
||||||
pageNo: 1,
|
|
||||||
pageSize: 10,
|
|
||||||
code: null,
|
|
||||||
name: null,
|
|
||||||
},
|
|
||||||
// 表单参数
|
|
||||||
form: {},
|
|
||||||
};
|
|
||||||
},
|
|
||||||
created() {
|
|
||||||
this.getList();
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
/** 覆盖 handleEmitFun 的默认实现 */
|
|
||||||
handleEmitFun({ action, value }) {
|
|
||||||
const {
|
|
||||||
id: equipmentGroupId,
|
|
||||||
name: equipmentGroupName,
|
|
||||||
code: equipmentGroupCode,
|
|
||||||
} = value;
|
|
||||||
switch (action) {
|
|
||||||
case 'equipment-group-show-alert':
|
|
||||||
// this.$router.push({ path: '/equipment/base/equipment-group-alarm' });
|
|
||||||
this.$router.push({
|
|
||||||
name: 'EquipmentGroupAlarm',
|
|
||||||
params: {
|
|
||||||
equipmentGroupId,
|
|
||||||
equipmentGroupCode,
|
|
||||||
equipmentGroupName,
|
|
||||||
},
|
|
||||||
});
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
/** 查询列表 */
|
|
||||||
getList() {
|
|
||||||
this.loading = true;
|
|
||||||
// 执行查询
|
|
||||||
getEquipmentGroupPage(this.queryParams).then((response) => {
|
|
||||||
this.list = response.data.list;
|
|
||||||
this.total = response.data.total;
|
|
||||||
this.loading = false;
|
|
||||||
});
|
|
||||||
},
|
|
||||||
/** 取消按钮 */
|
|
||||||
cancel() {
|
|
||||||
this.open = false;
|
|
||||||
this.reset();
|
|
||||||
},
|
|
||||||
/** 表单重置 */
|
|
||||||
reset() {
|
|
||||||
this.form = {
|
|
||||||
id: undefined,
|
|
||||||
code: undefined,
|
|
||||||
name: undefined,
|
|
||||||
remark: undefined,
|
|
||||||
};
|
|
||||||
this.resetForm('form');
|
|
||||||
},
|
|
||||||
/** 搜索按钮操作 */
|
|
||||||
handleQuery() {
|
|
||||||
this.queryParams.pageNo = 1;
|
|
||||||
this.getList();
|
|
||||||
},
|
|
||||||
/** 重置按钮操作 */
|
|
||||||
resetQuery() {
|
|
||||||
this.resetForm('queryForm');
|
|
||||||
this.handleQuery();
|
|
||||||
},
|
|
||||||
/** 新增按钮操作 */
|
|
||||||
handleAdd() {
|
|
||||||
this.reset();
|
|
||||||
this.open = true;
|
|
||||||
this.title = '添加设备分组(用于同类型不同厂家的设备区分)';
|
|
||||||
},
|
|
||||||
/** 修改按钮操作 */
|
|
||||||
handleUpdate(row) {
|
|
||||||
this.reset();
|
|
||||||
const id = row.id;
|
|
||||||
getEquipmentGroup(id).then((response) => {
|
|
||||||
this.form = response.data;
|
|
||||||
this.open = true;
|
|
||||||
this.title = '修改设备分组(用于同类型不同厂家的设备区分)';
|
|
||||||
});
|
|
||||||
},
|
|
||||||
/** 提交按钮 */
|
|
||||||
submitForm() {
|
|
||||||
this.$refs['form'].validate((valid) => {
|
|
||||||
if (!valid) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
// 修改的提交
|
|
||||||
if (this.form.id != null) {
|
|
||||||
updateEquipmentGroup(this.form).then((response) => {
|
|
||||||
this.$modal.msgSuccess('修改成功');
|
|
||||||
this.open = false;
|
|
||||||
this.getList();
|
|
||||||
});
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
// 添加的提交
|
|
||||||
createEquipmentGroup(this.form).then((response) => {
|
|
||||||
this.$modal.msgSuccess('新增成功');
|
|
||||||
this.open = false;
|
|
||||||
this.getList();
|
|
||||||
});
|
|
||||||
});
|
|
||||||
},
|
|
||||||
// 查看报警
|
|
||||||
handleDetail(row) {
|
|
||||||
// debugger;
|
|
||||||
const { id, code, name, createTime } = row;
|
|
||||||
// 打开抽屉
|
|
||||||
this.editMode = 'detail';
|
|
||||||
this.alarmForm.id = id;
|
|
||||||
this.alarmForm.equipmentGroupCode = code;
|
|
||||||
this.alarmForm.equipmentGroupName = name;
|
|
||||||
this.editVisible = true;
|
|
||||||
this.$nextTick(() => {
|
|
||||||
this.$refs['drawer'].init();
|
|
||||||
});
|
|
||||||
},
|
|
||||||
/** 删除按钮操作 */
|
|
||||||
handleDelete(row) {
|
|
||||||
const id = row.id;
|
|
||||||
this.$modal
|
|
||||||
.confirm('是否确认删除设备分组 "' + row.name + '"?')
|
|
||||||
.then(function () {
|
|
||||||
return deleteEquipmentGroup(id);
|
|
||||||
})
|
|
||||||
.then(() => {
|
|
||||||
this.getList();
|
|
||||||
this.$modal.msgSuccess('删除成功');
|
|
||||||
})
|
|
||||||
.catch(() => {});
|
|
||||||
},
|
|
||||||
/** 导出按钮操作 */
|
|
||||||
handleExport() {
|
|
||||||
// 处理查询参数
|
|
||||||
let params = { ...this.queryParams };
|
|
||||||
params.pageNo = undefined;
|
|
||||||
params.pageSize = undefined;
|
|
||||||
this.$modal
|
|
||||||
.confirm(
|
|
||||||
'是否确认导出所有设备分组(用于同类型不同厂家的设备区分)数据项?'
|
|
||||||
)
|
|
||||||
.then(() => {
|
|
||||||
this.exportLoading = true;
|
|
||||||
return exportEquipmentGroupExcel(params);
|
|
||||||
})
|
|
||||||
.then((response) => {
|
|
||||||
this.$download.excel(
|
|
||||||
response,
|
|
||||||
'设备分组(用于同类型不同厂家的设备区分).xls'
|
|
||||||
);
|
|
||||||
this.exportLoading = false;
|
|
||||||
})
|
|
||||||
.catch(() => {});
|
|
||||||
},
|
|
||||||
},
|
|
||||||
};
|
|
||||||
</script>
|
|
||||||
@@ -1,187 +0,0 @@
|
|||||||
<!--
|
|
||||||
filename: dialogForm.vue
|
|
||||||
author: liubin
|
|
||||||
date: 2023-09-11 15:55:13
|
|
||||||
description: DialogForm for equipmentBindSection only
|
|
||||||
-->
|
|
||||||
|
|
||||||
<template>
|
|
||||||
<el-form
|
|
||||||
ref="form"
|
|
||||||
:model="dataForm"
|
|
||||||
label-width="100px"
|
|
||||||
v-loading="formLoading">
|
|
||||||
<el-row :gutter="20">
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item
|
|
||||||
label="报警编码"
|
|
||||||
prop="code"
|
|
||||||
:rules="[{ required: true, message: '不能为空', trigger: 'blur' }]">
|
|
||||||
<el-input
|
|
||||||
:disabled="disabled"
|
|
||||||
v-model="dataForm.code"
|
|
||||||
@change="$emit('update', dataForm)"
|
|
||||||
placeholder="请输入工段排序" />
|
|
||||||
</el-form-item>
|
|
||||||
<!--
|
|
||||||
<el-form-item
|
|
||||||
label="报警编码"
|
|
||||||
prop="code"
|
|
||||||
:rules="[{ required: true, message: '不能为空', trigger: 'blur' }]">
|
|
||||||
<el-select
|
|
||||||
v-model="dataForm.code"
|
|
||||||
placeholder="请选择产线"
|
|
||||||
@change="handleProductlineChange">
|
|
||||||
<el-option
|
|
||||||
v-for="opt in productionLineList"
|
|
||||||
:key="opt.value"
|
|
||||||
:label="opt.label"
|
|
||||||
:value="opt.value" />
|
|
||||||
</el-select>
|
|
||||||
</el-form-item> -->
|
|
||||||
</el-col>
|
|
||||||
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item
|
|
||||||
label="报警类型"
|
|
||||||
prop="type"
|
|
||||||
:rules="[{ required: true, message: '不能为空', trigger: 'blur' }]">
|
|
||||||
<el-select
|
|
||||||
v-model="dataForm.type"
|
|
||||||
:disabled="disabled"
|
|
||||||
placeholder="请选择报警类型"
|
|
||||||
@change="$emit('update', dataForm)">
|
|
||||||
<el-option
|
|
||||||
v-for="opt in [
|
|
||||||
{ label: '布尔型', value: 2 },
|
|
||||||
{ label: '字符型', value: 1 },
|
|
||||||
]"
|
|
||||||
:key="opt.value"
|
|
||||||
:label="opt.label"
|
|
||||||
:value="opt.value" />
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
<el-row :gutter="20">
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item
|
|
||||||
label="报警级别"
|
|
||||||
prop="grade"
|
|
||||||
:rules="[{ required: true, message: '不能为空', trigger: 'blur' }]">
|
|
||||||
<el-select
|
|
||||||
:disabled="disabled"
|
|
||||||
v-model="dataForm.grade"
|
|
||||||
placeholder="请选择报警级别"
|
|
||||||
@change="$emit('update', dataForm)">
|
|
||||||
<el-option
|
|
||||||
v-for="opt in getDictDatas(DICT_TYPE.EQU_ALARM_LEVEL)"
|
|
||||||
:key="opt.value"
|
|
||||||
:label="opt.label"
|
|
||||||
:value="opt.value" />
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item
|
|
||||||
v-if="+dataForm.type == 1"
|
|
||||||
label="设备报警编码"
|
|
||||||
prop="alarmCode">
|
|
||||||
<el-input
|
|
||||||
:disabled="disabled"
|
|
||||||
v-model="dataForm.alarmCode"
|
|
||||||
@change="$emit('update', dataForm)"
|
|
||||||
placeholder="请输入设备报警编码" />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
<el-row :gutter="20">
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item
|
|
||||||
label="参数列名"
|
|
||||||
prop="plcParamName"
|
|
||||||
:rules="[{ required: true, message: '不能为空', trigger: 'blur' }]">
|
|
||||||
<el-input
|
|
||||||
:disabled="disabled"
|
|
||||||
v-model="dataForm.plcParamName"
|
|
||||||
placeholder="请输入参数列名"
|
|
||||||
@change="$emit('update', dataForm)"></el-input>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item
|
|
||||||
label="报警内容"
|
|
||||||
prop="alarmContent"
|
|
||||||
:rules="[{ required: true, message: '不能为空', trigger: 'blur' }]">
|
|
||||||
<el-input
|
|
||||||
:disabled="disabled"
|
|
||||||
v-model="dataForm.alarmContent"
|
|
||||||
placeholder="请输入报警内容"
|
|
||||||
@change="$emit('update', dataForm)"></el-input>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
</el-form>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
export default {
|
|
||||||
name: 'DialogForm',
|
|
||||||
model: {
|
|
||||||
prop: 'dataForm',
|
|
||||||
event: 'update',
|
|
||||||
},
|
|
||||||
emits: ['update'],
|
|
||||||
components: {},
|
|
||||||
props: {
|
|
||||||
dataForm: {
|
|
||||||
type: Object,
|
|
||||||
default: () => ({}),
|
|
||||||
},
|
|
||||||
disabled: {
|
|
||||||
type: Boolean,
|
|
||||||
default: false,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
formLoading: true,
|
|
||||||
};
|
|
||||||
},
|
|
||||||
mounted() {
|
|
||||||
this.getCode('/base/equipment-group-alarm/getCode').then((code) => {
|
|
||||||
this.formLoading = false;
|
|
||||||
this.$emit('update', {
|
|
||||||
...this.dataForm,
|
|
||||||
code,
|
|
||||||
});
|
|
||||||
});
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
/** 模拟透传 ref */
|
|
||||||
validate(cb) {
|
|
||||||
return this.$refs.form.validate(cb);
|
|
||||||
},
|
|
||||||
resetFields(args) {
|
|
||||||
return this.$refs.form.resetFields(args);
|
|
||||||
},
|
|
||||||
async handleProductlineChange(id) {
|
|
||||||
await this.getWorksectionList(id);
|
|
||||||
this.dataForm.workshopSectionId = null;
|
|
||||||
this.$emit('update', this.dataForm);
|
|
||||||
},
|
|
||||||
async getCode(url) {
|
|
||||||
const response = await this.$axios(url);
|
|
||||||
return response.data;
|
|
||||||
},
|
|
||||||
},
|
|
||||||
};
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style scoped lang="scss">
|
|
||||||
.el-date-editor,
|
|
||||||
.el-select {
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
@@ -1,361 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div class="app-container">
|
|
||||||
<!-- 搜索工作栏 -->
|
|
||||||
<SearchBar
|
|
||||||
:formConfigs="searchBarFormConfig"
|
|
||||||
ref="search-bar"
|
|
||||||
@headBtnClick="handleSearchBarBtnClick" />
|
|
||||||
|
|
||||||
<!-- 列表 -->
|
|
||||||
<base-table
|
|
||||||
:table-props="tableProps"
|
|
||||||
:page="queryParams.pageNo"
|
|
||||||
:limit="queryParams.pageSize"
|
|
||||||
:table-data="list"
|
|
||||||
@emitFun="handleEmitFun">
|
|
||||||
<method-btn
|
|
||||||
v-if="tableBtn.length"
|
|
||||||
slot="handleBtn"
|
|
||||||
label="操作"
|
|
||||||
:width="120"
|
|
||||||
:method-list="tableBtn"
|
|
||||||
@clickBtn="handleTableBtnClick" />
|
|
||||||
</base-table>
|
|
||||||
|
|
||||||
<!-- 分页组件 -->
|
|
||||||
<pagination
|
|
||||||
v-show="total > 0"
|
|
||||||
:total="total"
|
|
||||||
:page.sync="queryParams.pageNo"
|
|
||||||
:limit.sync="queryParams.pageSize"
|
|
||||||
@pagination="getList" />
|
|
||||||
|
|
||||||
<!-- 对话框(添加 / 修改) -->
|
|
||||||
<base-dialog
|
|
||||||
:dialogTitle="title"
|
|
||||||
:dialogVisible="open"
|
|
||||||
width="736px"
|
|
||||||
@close="cancel"
|
|
||||||
@cancel="cancel"
|
|
||||||
@confirm="submitForm">
|
|
||||||
<DialogForm v-if="open" ref="form" v-model="form" :rows="rows" />
|
|
||||||
</base-dialog>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
import {
|
|
||||||
createEquipmentGroupAlarm,
|
|
||||||
updateEquipmentGroupAlarm,
|
|
||||||
deleteEquipmentGroupAlarm,
|
|
||||||
getEquipmentGroupAlarm,
|
|
||||||
getEquipmentGroupAlarmPage,
|
|
||||||
exportEquipmentGroupAlarmExcel,
|
|
||||||
} from '@/api/base/equipmentGroupAlarm';
|
|
||||||
import basicPageMixin from '@/mixins/lb/basicPageMixin';
|
|
||||||
import moment from 'moment';
|
|
||||||
import { publicFormatter } from '@/utils/dict';
|
|
||||||
import DialogForm from './dialogForm.vue';
|
|
||||||
|
|
||||||
export default {
|
|
||||||
name: 'EquipmentGroupAlarm',
|
|
||||||
components: { DialogForm },
|
|
||||||
mixins: [basicPageMixin],
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
searchBarKeys: [''],
|
|
||||||
tableBtn: [
|
|
||||||
this.$auth.hasPermi('base:equipment-group-alarm:update')
|
|
||||||
? {
|
|
||||||
type: 'edit',
|
|
||||||
btnName: '修改',
|
|
||||||
}
|
|
||||||
: undefined,
|
|
||||||
this.$auth.hasPermi('base:equipment-group-alarm:delete')
|
|
||||||
? {
|
|
||||||
type: 'delete',
|
|
||||||
btnName: '删除',
|
|
||||||
}
|
|
||||||
: undefined,
|
|
||||||
].filter((v) => v),
|
|
||||||
tableProps: [
|
|
||||||
{
|
|
||||||
prop: 'createTime',
|
|
||||||
label: '添加时间',
|
|
||||||
fixed: true,
|
|
||||||
width: 180,
|
|
||||||
filter: (val) => moment(val).format('yyyy-MM-DD HH:mm:ss'),
|
|
||||||
},
|
|
||||||
{ width: 240, prop: 'code', label: '报警编码' },
|
|
||||||
{
|
|
||||||
prop: 'type',
|
|
||||||
label: '报警类型',
|
|
||||||
filter: (val) =>
|
|
||||||
val != null ? ['-', '字符型', '布尔型', '-'][val] : '-',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop: 'grade',
|
|
||||||
label: '报警级别',
|
|
||||||
filter: publicFormatter(this.DICT_TYPE.EQU_ALARM_LEVEL),
|
|
||||||
},
|
|
||||||
{ prop: 'alarmCode', label: '设备报警编码' },
|
|
||||||
{ prop: 'plcParamName', label: '参数列名' },
|
|
||||||
{ prop: 'alarmContent', label: '报警内容' },
|
|
||||||
],
|
|
||||||
searchBarFormConfig: [
|
|
||||||
{
|
|
||||||
type: 'input',
|
|
||||||
label: '设备分组编码',
|
|
||||||
width: '220',
|
|
||||||
placeholder: '/',
|
|
||||||
param: 'equipmentGroupCode',
|
|
||||||
defaultSelect: null,
|
|
||||||
disabled: true,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
type: 'input',
|
|
||||||
label: '设备分组名称',
|
|
||||||
placeholder: '/',
|
|
||||||
param: 'equipmentGroupName',
|
|
||||||
defaultSelect: null,
|
|
||||||
disabled: true,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
type: this.$auth.hasPermi('base:equipment-group-alarm:create')
|
|
||||||
? 'button'
|
|
||||||
: '',
|
|
||||||
btnName: '新增',
|
|
||||||
name: 'add',
|
|
||||||
plain: true,
|
|
||||||
color: 'success',
|
|
||||||
},
|
|
||||||
],
|
|
||||||
rows: [
|
|
||||||
[
|
|
||||||
{
|
|
||||||
input: true,
|
|
||||||
label: '报警编码', // 自动生成
|
|
||||||
prop: 'code',
|
|
||||||
url: '/base/equipment-group-alarm/getCode',
|
|
||||||
rules: [{ required: true, message: '不能为空', trigger: 'blur' }],
|
|
||||||
},
|
|
||||||
{
|
|
||||||
select: true,
|
|
||||||
label: '报警类型', // 固定选项
|
|
||||||
prop: 'type',
|
|
||||||
options: [
|
|
||||||
{ label: '布尔型', value: 2 },
|
|
||||||
{ label: '字符型', value: 1 },
|
|
||||||
],
|
|
||||||
rules: [{ required: true, message: '不能为空', trigger: 'blur' }],
|
|
||||||
},
|
|
||||||
],
|
|
||||||
[
|
|
||||||
{
|
|
||||||
select: true,
|
|
||||||
label: '报警级别', // 字典
|
|
||||||
prop: 'grade',
|
|
||||||
options: this.getDictDatas(this.DICT_TYPE.EQU_ALARM_LEVEL),
|
|
||||||
},
|
|
||||||
{
|
|
||||||
input: true,
|
|
||||||
label: '设备报警编码', // 对应到设备实际的报警编码
|
|
||||||
prop: 'alarmCode',
|
|
||||||
},
|
|
||||||
],
|
|
||||||
[
|
|
||||||
{
|
|
||||||
input: true,
|
|
||||||
label: '参数列名', // 在实时数据库的列名
|
|
||||||
prop: 'plcParamName',
|
|
||||||
rules: [{ required: true, message: '不能为空', trigger: 'blur' }],
|
|
||||||
},
|
|
||||||
{
|
|
||||||
input: true,
|
|
||||||
label: '报警内容',
|
|
||||||
prop: 'alarmContent',
|
|
||||||
rules: [{ required: true, message: '不能为空', trigger: 'blur' }],
|
|
||||||
},
|
|
||||||
],
|
|
||||||
],
|
|
||||||
// 是否显示弹出层
|
|
||||||
open: false,
|
|
||||||
// 查询参数
|
|
||||||
queryParams: {
|
|
||||||
pageNo: 1,
|
|
||||||
pageSize: 10,
|
|
||||||
equipmentGroupId: null,
|
|
||||||
},
|
|
||||||
// 表单参数
|
|
||||||
form: {
|
|
||||||
id: null,
|
|
||||||
equipmentGroupId: null,
|
|
||||||
code: null,
|
|
||||||
type: null,
|
|
||||||
grade: null,
|
|
||||||
alarmCode: null,
|
|
||||||
alarmContent: null,
|
|
||||||
plcParamName: null,
|
|
||||||
},
|
|
||||||
// // 表单校验
|
|
||||||
// rules: {
|
|
||||||
// equipmentGroupId: [{ required: true, message: "设备分组ID,关联base_equipment_group不能为空", trigger: "blur" }],
|
|
||||||
// type: [{ required: true, message: "报警类型:1.字符型,2.布尔型不能为空", trigger: "change" }],
|
|
||||||
// alarmContent: [{ required: true, message: "报警内容 该条报警具体的解释不能为空", trigger: "blur" }],
|
|
||||||
// plcParamName: [{ required: true, message: "关联编码,对应到plc_param_name的编码,用于链接数采不能为空", trigger: "blur" }],
|
|
||||||
// }
|
|
||||||
};
|
|
||||||
},
|
|
||||||
// watch: {
|
|
||||||
// $route(value) {
|
|
||||||
// console.log('new route info', value)
|
|
||||||
// }
|
|
||||||
// },
|
|
||||||
// created() {
|
|
||||||
// this.getList();
|
|
||||||
// },
|
|
||||||
activated() {
|
|
||||||
// 设置顶部搜索栏信息
|
|
||||||
const { equipmentGroupName, equipmentGroupCode, equipmentGroupId } =
|
|
||||||
this.$route.params;
|
|
||||||
this.setSearchBarFormValue('equipmentGroupName', equipmentGroupName);
|
|
||||||
this.setSearchBarFormValue('equipmentGroupCode', equipmentGroupCode);
|
|
||||||
this.queryParams.equipmentGroupId = equipmentGroupId;
|
|
||||||
// if (!equipmentGroupId) this.getList(); // 拦截
|
|
||||||
this.getList();
|
|
||||||
},
|
|
||||||
deactivated() {
|
|
||||||
this.setSearchBarFormValue('equipmentGroupName', null);
|
|
||||||
this.setSearchBarFormValue('equipmentGroupCode', null);
|
|
||||||
this.queryParams.equipmentGroupId = null;
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
/** 设置 searchBarForm 的默认值 - 用得比较少 */
|
|
||||||
setSearchBarFormValue(param, value) {
|
|
||||||
this.searchBarFormConfig.forEach((config) => {
|
|
||||||
if (config.param == param) {
|
|
||||||
config.defaultSelect = value;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
/** 查询列表 */
|
|
||||||
getList() {
|
|
||||||
this.loading = true;
|
|
||||||
// 执行查询
|
|
||||||
getEquipmentGroupAlarmPage(this.queryParams).then((response) => {
|
|
||||||
this.list = response.data.list;
|
|
||||||
this.total = response.data.total;
|
|
||||||
this.loading = false;
|
|
||||||
});
|
|
||||||
},
|
|
||||||
/** 取消按钮 */
|
|
||||||
cancel() {
|
|
||||||
this.open = false;
|
|
||||||
this.reset();
|
|
||||||
},
|
|
||||||
/** 表单重置 */
|
|
||||||
reset() {
|
|
||||||
this.form = {
|
|
||||||
id: null,
|
|
||||||
equipmentGroupId: null,
|
|
||||||
code: null,
|
|
||||||
type: null,
|
|
||||||
grade: null,
|
|
||||||
alarmCode: null,
|
|
||||||
alarmContent: null,
|
|
||||||
plcParamName: null,
|
|
||||||
};
|
|
||||||
this.resetForm('form');
|
|
||||||
},
|
|
||||||
/** 搜索按钮操作 */
|
|
||||||
handleQuery() {
|
|
||||||
this.queryParams.pageNo = 1;
|
|
||||||
this.getList();
|
|
||||||
},
|
|
||||||
/** 重置按钮操作 */
|
|
||||||
resetQuery() {
|
|
||||||
this.resetForm('queryForm');
|
|
||||||
this.handleQuery();
|
|
||||||
},
|
|
||||||
/** 新增按钮操作 */
|
|
||||||
handleAdd() {
|
|
||||||
if (this.queryParams.equipmentGroupId == null)
|
|
||||||
return this.$message.warning('没有检测到设备分组信息');
|
|
||||||
this.reset();
|
|
||||||
this.open = true;
|
|
||||||
this.title = '添加设备分组报警明细';
|
|
||||||
},
|
|
||||||
/** 修改按钮操作 */
|
|
||||||
handleUpdate(row) {
|
|
||||||
this.reset();
|
|
||||||
const id = row.id;
|
|
||||||
getEquipmentGroupAlarm(id).then((response) => {
|
|
||||||
this.form = response.data;
|
|
||||||
this.open = true;
|
|
||||||
this.title = '修改设备分组报警明细';
|
|
||||||
});
|
|
||||||
},
|
|
||||||
/** 提交按钮 */
|
|
||||||
submitForm() {
|
|
||||||
this.$refs['form'].validate((valid) => {
|
|
||||||
if (!valid) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
// 修改的提交
|
|
||||||
if (this.form.id != null) {
|
|
||||||
updateEquipmentGroupAlarm({
|
|
||||||
...this.form,
|
|
||||||
equipmentGroupId: this.queryParams.equipmentGroupId,
|
|
||||||
}).then((response) => {
|
|
||||||
this.$modal.msgSuccess('修改成功');
|
|
||||||
this.open = false;
|
|
||||||
this.getList();
|
|
||||||
});
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
// 添加的提交
|
|
||||||
createEquipmentGroupAlarm({
|
|
||||||
...this.form,
|
|
||||||
equipmentGroupId: this.queryParams.equipmentGroupId,
|
|
||||||
}).then((response) => {
|
|
||||||
this.$modal.msgSuccess('新增成功');
|
|
||||||
this.open = false;
|
|
||||||
this.getList();
|
|
||||||
});
|
|
||||||
});
|
|
||||||
},
|
|
||||||
/** 删除按钮操作 */
|
|
||||||
handleDelete(row) {
|
|
||||||
const id = row.id;
|
|
||||||
this.$modal
|
|
||||||
.confirm('是否确认删除该报警?')
|
|
||||||
.then(function () {
|
|
||||||
return deleteEquipmentGroupAlarm(id);
|
|
||||||
})
|
|
||||||
.then(() => {
|
|
||||||
this.getList();
|
|
||||||
this.$modal.msgSuccess('删除成功');
|
|
||||||
})
|
|
||||||
.catch(() => {});
|
|
||||||
},
|
|
||||||
/** 导出按钮操作 */
|
|
||||||
handleExport() {
|
|
||||||
// 处理查询参数
|
|
||||||
let params = { ...this.queryParams };
|
|
||||||
params.pageNo = undefined;
|
|
||||||
params.pageSize = undefined;
|
|
||||||
this.$modal
|
|
||||||
.confirm('是否确认导出所有设备分组报警明细数据项?')
|
|
||||||
.then(() => {
|
|
||||||
this.exportLoading = true;
|
|
||||||
return exportEquipmentGroupAlarmExcel(params);
|
|
||||||
})
|
|
||||||
.then((response) => {
|
|
||||||
this.$download.excel(response, '设备分组报警明细.xls');
|
|
||||||
this.exportLoading = false;
|
|
||||||
})
|
|
||||||
.catch(() => {});
|
|
||||||
},
|
|
||||||
},
|
|
||||||
};
|
|
||||||
</script>
|
|
||||||