Compare commits
111 Commits
projects/m
...
0bb434bc22
| Author | SHA1 | Date | |
|---|---|---|---|
| 0bb434bc22 | |||
|
|
f617597f38 | ||
|
|
df7bc08f71 | ||
| d65f5f9bca | |||
| 4c99d39f8a | |||
| 220ed16c64 | |||
| 39d2c4a959 | |||
| b0bac562c3 | |||
| 60a94cd839 | |||
| a764e20bd4 | |||
| e1384a2d3e | |||
| b9db57d66a | |||
| 9561dc27e3 | |||
| cb6e3c3d5f | |||
|
|
6d8889bbec | ||
|
|
553d19db89 | ||
| f0536c9cf9 | |||
| c91be221dc | |||
| 069b28eeae | |||
| 84cc6dfde7 | |||
| 1d61f056b8 | |||
| eda63ee8c8 | |||
| 78e8401029 | |||
| 5ad93105b3 | |||
| 97612a13ac | |||
| d06756c6ff | |||
| 5ac17b15e1 | |||
| 4e064e4b01 | |||
| f280a92145 | |||
| aaa131cb1f | |||
| f6af441030 | |||
| cb9132abc1 | |||
| 5886875770 | |||
| ccb2808e60 | |||
| a766318e20 | |||
| 41cef952ac | |||
| ef4b31fe2b | |||
| c8219bd7ee | |||
| 20f5a0d4c7 | |||
| fd4b0088dc | |||
| e039a3992d | |||
|
|
c8d55ff625 | ||
|
|
83fc835c51 | ||
| 165a833088 | |||
| 8d5623bb24 | |||
| 4fa49c46ff | |||
| ae251fc428 | |||
| a2c61b86ca | |||
| 503e3442a0 | |||
| 69a65b32ea | |||
| 5ac0782b36 | |||
|
|
3aec5ee86c | ||
|
|
79274aa8c8 | ||
| 29ea06e5be | |||
|
|
f5bb5f27b4 | ||
|
|
fbe8e5c023 | ||
| 46dd33cb05 | |||
| 68898ea67f | |||
| 1299d72404 | |||
| 0f4bddc6d1 | |||
| 91d269e1ce | |||
| 4e26d49ff5 | |||
| 63b19d84e4 | |||
| 5f47cb131f | |||
| ea21f3d4bc | |||
| bdda6c9985 | |||
| ae83da6eb9 | |||
| 6c7390f61e | |||
| 1661615af4 | |||
| b62d0e4096 | |||
| 1c123fa22d | |||
| 6b3619514d | |||
| dee9f7ce8b | |||
| b4d2b69004 | |||
| 8fdaa3e968 | |||
| 54953f7bc6 | |||
| f99e979d14 | |||
| 4f64c255af | |||
| cc0d3d8b75 | |||
| f5233001e7 | |||
| f2e38b5e67 | |||
| fe0c84bc3a | |||
| 7cb88fab88 | |||
| e7263302a7 | |||
| b26e1d5a7f | |||
| 86bdabf358 | |||
| 4069e71477 | |||
| 0a53bcb57e | |||
| 1ce61f13b7 | |||
| 6c661bedd3 | |||
|
|
4e48eae2a7 | ||
| a2ed9ed54b | |||
| 49d002142f | |||
|
|
8399081a6f | ||
|
|
cc6c4772d3 | ||
| ba7dad7fce | |||
|
|
8e7e31f918 | ||
| be430ebbff | |||
| 61b4bf784b | |||
| b0f10b9002 | |||
| e6b9d75f16 | |||
| d9f3434712 | |||
| de15716b7c | |||
| c736992a34 | |||
| dcbb2c719b | |||
| bc2940ca99 | |||
| 76938951ed | |||
| 8b91e7812f | |||
| 9cffa01414 | |||
| 905479d5f4 | |||
| c1ae248234 |
7
.env.dev
@@ -1,8 +1,8 @@
|
|||||||
###
|
###
|
||||||
# @Author: Do not edit
|
# @Author: Do not edit
|
||||||
# @Date: 2023-08-29 09:40:39
|
# @Date: 2023-08-29 09:40:39
|
||||||
# @LastEditTime: 2023-11-21 10:36:47
|
# @LastEditTime: 2023-12-18 13:35:00
|
||||||
# @LastEditors: DY
|
# @LastEditors: zhp
|
||||||
# @Description:
|
# @Description:
|
||||||
###
|
###
|
||||||
# 开发环境配置
|
# 开发环境配置
|
||||||
@@ -20,7 +20,8 @@ VUE_APP_BASE_API = 'http://192.168.0.33:48082'
|
|||||||
# VUE_APP_BASE_API = 'http://192.168.1.8:48082'
|
# VUE_APP_BASE_API = 'http://192.168.1.8:48082'
|
||||||
# VUE_APP_BASE_API = 'http://192.168.4.159:48080'
|
# VUE_APP_BASE_API = 'http://192.168.4.159:48080'
|
||||||
# VUE_APP_BASE_API = 'http://192.168.1.56:48082'
|
# VUE_APP_BASE_API = 'http://192.168.1.56:48082'
|
||||||
# VUE_APP_BASE_API = 'http://192.168.4.159:48080'
|
# VUE_APP_BASE_API = 'http://192.168.1.62:48082'
|
||||||
|
# VUE_APP_BASE_API = 'http://192.168.1.78:48082'
|
||||||
|
|
||||||
# 积木报表指向地址
|
# 积木报表指向地址
|
||||||
VUE_APP_JIMU_API = 'http://192.168.0.33:48082'
|
VUE_APP_JIMU_API = 'http://192.168.0.33:48082'
|
||||||
|
|||||||
@@ -15,15 +15,14 @@ VUE_APP_TITLE = MES系统
|
|||||||
VUE_APP_BASE_API = '/prod-api'
|
VUE_APP_BASE_API = '/prod-api'
|
||||||
|
|
||||||
# 积木报表指向地址
|
# 积木报表指向地址
|
||||||
VUE_APP_JIMU_API = 'http://192.168.0.33:48082'
|
VUE_APP_JIMU_API = 'http://10.70.2.22:8080'
|
||||||
|
|
||||||
|
|
||||||
# 根据服务器或域名修改
|
# 根据服务器或域名修改
|
||||||
# PUBLIC_PATH = 'http://my-pi.com:8888/yudao-admin/'
|
PUBLIC_PATH = 'http://10.70.2.32'
|
||||||
PUBLIC_PATH = 'http://192.168.0.33:8889/'
|
|
||||||
|
|
||||||
# 二级部署路径
|
# 二级部署路径
|
||||||
VUE_APP_APP_NAME ='yudao-admin'
|
# VUE_APP_APP_NAME ='yudao-admin'
|
||||||
|
|
||||||
# 多租户的开关
|
# 多租户的开关
|
||||||
VUE_APP_TENANT_ENABLE = true
|
VUE_APP_TENANT_ENABLE = true
|
||||||
|
|||||||
22
.env.stage
@@ -1,16 +1,21 @@
|
|||||||
NODE_ENV = production
|
# 生产环境配置
|
||||||
|
ENV = 'production'
|
||||||
|
|
||||||
# 页面标题
|
# 页面标题
|
||||||
VUE_APP_TITLE = 产线监控系统
|
VUE_APP_TITLE = MES系统
|
||||||
|
|
||||||
# 测试环境配置
|
# 芋道管理系统/生产环境
|
||||||
ENV = 'staging'
|
VUE_APP_BASE_API = '/prod-api'
|
||||||
|
|
||||||
# 芋道管理系统/测试环境
|
# 积木报表指向地址
|
||||||
VUE_APP_BASE_API = 'http://api-dashboard.yudao.iocoder.cn'
|
VUE_APP_JIMU_API = 'http://192.168.0.33:48082'
|
||||||
|
|
||||||
# 静态资源地址
|
|
||||||
PUBLIC_PATH = 'http://static.yudao.iocoder.cn/'
|
# 根据服务器或域名修改
|
||||||
|
PUBLIC_PATH = 'http://192.168.0.33:8889/'
|
||||||
|
|
||||||
|
# 二级部署路径
|
||||||
|
# VUE_APP_APP_NAME ='yudao-admin'
|
||||||
|
|
||||||
# 多租户的开关
|
# 多租户的开关
|
||||||
VUE_APP_TENANT_ENABLE = true
|
VUE_APP_TENANT_ENABLE = true
|
||||||
@@ -20,4 +25,3 @@ VUE_APP_DOC_ENABLE = false
|
|||||||
|
|
||||||
# 百度统计
|
# 百度统计
|
||||||
VUE_APP_BAIDU_CODE = fadc1bd5db1a1d6f581df60a1807f8ab
|
VUE_APP_BAIDU_CODE = fadc1bd5db1a1d6f581df60a1807f8ab
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* @Author: Do not edit
|
* @Author: Do not edit
|
||||||
* @Date: 2023-10-21 11:50:46
|
* @Date: 2023-10-21 11:50:46
|
||||||
* @LastEditTime: 2023-11-15 15:56:14
|
* @LastEditTime: 2023-12-14 10:57:24
|
||||||
* @LastEditors: DY
|
* @LastEditors: DY
|
||||||
* @Description:
|
* @Description:
|
||||||
*/
|
*/
|
||||||
@@ -66,3 +66,30 @@ export function getHotMaterialList(query) {
|
|||||||
params: query
|
params: query
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 创建原料质量检测条目
|
||||||
|
export function createHotMaterialCheck(data) {
|
||||||
|
return request({
|
||||||
|
url: '/base/core-hot-material-check/create',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 更新原料质量检测条目
|
||||||
|
export function updateHotMaterialCheck(data) {
|
||||||
|
return request({
|
||||||
|
url: '/base/core-hot-material-check/update',
|
||||||
|
method: 'put',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获得质量检测条目列表
|
||||||
|
export function getHotCheckList(query) {
|
||||||
|
return request({
|
||||||
|
url: '/base/core-hot-material-check/listByMaterial',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
56
src/api/base/energyQuantityManual.js
Normal file
@@ -0,0 +1,56 @@
|
|||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
// 获得分页数据
|
||||||
|
export function energyQuantityManualPage(data) {
|
||||||
|
return request({
|
||||||
|
url: '/base/energy-quantity-manual/page',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 创建
|
||||||
|
export function energyQuantityManualCreate(data) {
|
||||||
|
return request({
|
||||||
|
url: '/base/energy-quantity-manual/create',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 更新
|
||||||
|
export function energyQuantityManualUpdate(data) {
|
||||||
|
return request({
|
||||||
|
url: '/base/energy-quantity-manual/update',
|
||||||
|
method: 'put',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
//获得能源抄表(手动)
|
||||||
|
export function energyQuantityManualGet(query) {
|
||||||
|
return request({
|
||||||
|
url: '/base/energy-quantity-manual/get',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
//删除
|
||||||
|
export function energyQuantityManualDelete(query) {
|
||||||
|
return request({
|
||||||
|
url: '/base/energy-quantity-manual/delete',
|
||||||
|
method: 'delete',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
//导出
|
||||||
|
export function energyQuantityManualExport(data) {
|
||||||
|
return request({
|
||||||
|
url: '/base/energy-quantity-manual/export-excel',
|
||||||
|
method: 'post',
|
||||||
|
data: data,
|
||||||
|
responseType: 'blob'
|
||||||
|
})
|
||||||
|
}
|
||||||
125
src/api/base/qualityHotMaterial.js
Normal file
@@ -0,0 +1,125 @@
|
|||||||
|
|
||||||
|
/*
|
||||||
|
* @Author: zhp
|
||||||
|
* @Date: 2023-11-06 15:38:12
|
||||||
|
* @LastEditTime: 2023-12-15 15:29:16
|
||||||
|
* @LastEditors: zhp
|
||||||
|
* @Description:
|
||||||
|
*/
|
||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
// 创建质量检测类型基础
|
||||||
|
export function createQualityHotMaterial(data) {
|
||||||
|
return request({
|
||||||
|
url: '/base/quality-hot-material/create',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 更新质量检测类型基础
|
||||||
|
export function updateQualityHotMaterial(data) {
|
||||||
|
return request({
|
||||||
|
url: '/base/quality-hot-material/update',
|
||||||
|
method: 'put',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 删除质量检测类型基础
|
||||||
|
export function deleteQualityHotMaterial(id) {
|
||||||
|
return request({
|
||||||
|
url: '/base/quality-hot-material/delete?id=' + id,
|
||||||
|
method: 'delete'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获得质量检测类型基础
|
||||||
|
export function getQualityHotMaterial(id) {
|
||||||
|
return request({
|
||||||
|
url: '/base/quality-hot-material/get?id=' + id,
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获得质量检测类型基础分页
|
||||||
|
export function getQualityHotMaterialPage(query) {
|
||||||
|
return request({
|
||||||
|
url: 'base/quality-hot-material/page',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 导出质量检测类型基础 Excel
|
||||||
|
// export function exportQualityScrapTypeExcel(query) {
|
||||||
|
// return request({
|
||||||
|
// url: '/base/quality-scrap-type/export-excel',
|
||||||
|
// method: 'get',
|
||||||
|
// params: query,
|
||||||
|
// responseType: 'blob'
|
||||||
|
// })
|
||||||
|
// }
|
||||||
|
|
||||||
|
export function getCode(query) {
|
||||||
|
return request({
|
||||||
|
url: '/base/quality-hot-material/getCode',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
export function getHotMaterialAllList(query) {
|
||||||
|
return request({
|
||||||
|
url: '/base/core-hot-material/listAll',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function getSupplierList(query) {
|
||||||
|
return request({
|
||||||
|
url: '/base/core-supplier/listAll',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function getWorkerList(query) {
|
||||||
|
return request({
|
||||||
|
url: '/base/core-worker/listAll',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function getMaterialCheckList(query) {
|
||||||
|
return request({
|
||||||
|
url: '/base/core-hot-material-check/listByMaterial',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function createQualityHotMaterialDet(query){
|
||||||
|
return request({
|
||||||
|
url: '/base/quality-hot-material-det/create',
|
||||||
|
method: 'post',
|
||||||
|
data: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function updateQualityHotMaterialDet(query){
|
||||||
|
return request({
|
||||||
|
url: '/base/quality-hot-material-det/listbyfilter',
|
||||||
|
method: 'put',
|
||||||
|
data: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function getQualityHotMaterialDetList(query){
|
||||||
|
return request({
|
||||||
|
url: '/base/quality-hot-material-det/listbyfilter',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
@@ -1,10 +1,17 @@
|
|||||||
|
/*
|
||||||
|
* @Author: zhp
|
||||||
|
* @Date: 2023-12-04 14:10:37
|
||||||
|
* @LastEditTime: 2023-12-14 10:06:03
|
||||||
|
* @LastEditors: zhp
|
||||||
|
* @Description:
|
||||||
|
*/
|
||||||
import request from '@/utils/request'
|
import request from '@/utils/request'
|
||||||
|
|
||||||
// 创建安灯按钮16键对应
|
// 创建安灯按钮16键对应
|
||||||
export function createQualityInspectionBoxBtn(data) {
|
export function createQualityInspectionBoxBtn(data) {
|
||||||
return request({
|
return request({
|
||||||
url: '/base/quality-inspection-box-btn/create',
|
url: '/base/quality-inspection-box-btn/updateBatch',
|
||||||
method: 'post',
|
method: 'put',
|
||||||
data: data
|
data: data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@@ -12,7 +19,7 @@ export function createQualityInspectionBoxBtn(data) {
|
|||||||
// 更新安灯按钮16键对应
|
// 更新安灯按钮16键对应
|
||||||
export function updateQualityInspectionBoxBtn(data) {
|
export function updateQualityInspectionBoxBtn(data) {
|
||||||
return request({
|
return request({
|
||||||
url: '/base/quality-inspection-box-btn/update',
|
url: '/base/quality-inspection-box-btn/updateBatch',
|
||||||
method: 'put',
|
method: 'put',
|
||||||
data: data
|
data: data
|
||||||
})
|
})
|
||||||
@@ -37,7 +44,7 @@ export function getQualityInspectionBoxBtn(id) {
|
|||||||
// 获得安灯按钮16键对应分页
|
// 获得安灯按钮16键对应分页
|
||||||
export function getQualityInspectionBoxBtnPage(query) {
|
export function getQualityInspectionBoxBtnPage(query) {
|
||||||
return request({
|
return request({
|
||||||
url: '/base/quality-inspection-box-btn/page',
|
url: '/base/quality-inspection-box-btn/listGroupByLineSection',
|
||||||
method: 'get',
|
method: 'get',
|
||||||
params: query
|
params: query
|
||||||
})
|
})
|
||||||
@@ -52,3 +59,19 @@ export function exportQualityInspectionBoxBtnExcel(query) {
|
|||||||
responseType: 'blob'
|
responseType: 'blob'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function getAllDetByTypeList(query) {
|
||||||
|
return request({
|
||||||
|
url: '/base/quality-scrap-det/scrapMap',
|
||||||
|
method: 'get',
|
||||||
|
params: query,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
export function getListByLineSection(query) {
|
||||||
|
return request({
|
||||||
|
url: '/base/quality-inspection-box-btn/detListByLineSection',
|
||||||
|
method: 'get',
|
||||||
|
params: query,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* @Author: zhp
|
* @Author: zhp
|
||||||
* @Date: 2023-11-06 15:38:12
|
* @Date: 2023-11-06 15:38:12
|
||||||
* @LastEditTime: 2023-11-06 15:39:39
|
* @LastEditTime: 2023-12-08 09:46:55
|
||||||
* @LastEditors: zhp
|
* @LastEditors: zhp
|
||||||
* @Description:
|
* @Description:
|
||||||
*/
|
*/
|
||||||
@@ -67,3 +67,4 @@ export function getCode(query) {
|
|||||||
params: query
|
params: query
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
78
src/api/cost/costEneryAutoReport.js
Normal file
@@ -0,0 +1,78 @@
|
|||||||
|
/*
|
||||||
|
* @Author: zwq
|
||||||
|
* @Date: 2023-11-23 14:57:00
|
||||||
|
* @LastEditors: zwq
|
||||||
|
* @LastEditTime: 2023-12-07 09:37:18
|
||||||
|
* @Description:
|
||||||
|
*/
|
||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
// 创建能源自动记录报
|
||||||
|
export function createCostEneryAutoReport(data) {
|
||||||
|
return request({
|
||||||
|
url: '/extend/cost-enery-auto-report/create',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 更新能源自动记录报
|
||||||
|
export function updateCostEneryAutoReport(data) {
|
||||||
|
return request({
|
||||||
|
url: '/extend/cost-enery-auto-report/update',
|
||||||
|
method: 'put',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 删除能源自动记录报
|
||||||
|
export function deleteCostEneryAutoReport(id) {
|
||||||
|
return request({
|
||||||
|
url: '/extend/cost-enery-auto-report/delete?id=' + id,
|
||||||
|
method: 'delete'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获得能源自动记录报
|
||||||
|
export function getCostEneryAutoReport(id) {
|
||||||
|
return request({
|
||||||
|
url: '/extend/cost-enery-auto-report/get?id=' + id,
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获得能源自动记录报分页历史
|
||||||
|
export function getCostEneryAutoReportPage(data) {
|
||||||
|
return request({
|
||||||
|
url: '/extend/cost-enery-auto-report/page',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 获得能源查询
|
||||||
|
export function getCostEneryAutoPage(data) {
|
||||||
|
return request({
|
||||||
|
url: '/extend/cost-energy-search/getData',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 导出能源自动记录报 Excel
|
||||||
|
export function exportCostEneryAutoReportExcel(data) {
|
||||||
|
return request({
|
||||||
|
url: '/extend/cost-enery-auto-report/export-excel',
|
||||||
|
method: 'post',
|
||||||
|
data: data,
|
||||||
|
responseType: 'blob'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 导出能源自动记录报 Excel 查询
|
||||||
|
export function exportCostEneryExcel(data) {
|
||||||
|
return request({
|
||||||
|
url: '/extend/cost-energy-search/export-excel',
|
||||||
|
method: 'post',
|
||||||
|
data: data,
|
||||||
|
responseType: 'blob'
|
||||||
|
})
|
||||||
|
}
|
||||||
73
src/api/cost/costMaterialAutoReport.js
Normal file
@@ -0,0 +1,73 @@
|
|||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
// 创建原料成本自动统计报
|
||||||
|
export function createCostMaterialAutoReport(data) {
|
||||||
|
return request({
|
||||||
|
url: '/extend/cost-material-auto-report/create',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 更新原料成本自动统计报
|
||||||
|
export function updateCostMaterialAutoReport(data) {
|
||||||
|
return request({
|
||||||
|
url: '/extend/cost-material-auto-report/update',
|
||||||
|
method: 'put',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 删除原料成本自动统计报
|
||||||
|
export function deleteCostMaterialAutoReport(id) {
|
||||||
|
return request({
|
||||||
|
url: '/extend/cost-material-auto-report/delete?id=' + id,
|
||||||
|
method: 'delete'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获得原料成本自动统计报
|
||||||
|
export function getCostMaterialAutoReport(id) {
|
||||||
|
return request({
|
||||||
|
url: '/extend/cost-material-auto-report/get?id=' + id,
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获得原料成本自动统计报分页历史
|
||||||
|
export function getCostMaterialAutoReportPage(data) {
|
||||||
|
return request({
|
||||||
|
url: '/extend/cost-material-auto-report/page',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获得原料成本查询
|
||||||
|
export function getCostMaterialSearchPage(data) {
|
||||||
|
return request({
|
||||||
|
url: '/extend/cost-material-search/getData',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 导出原料成本自动统计报 Excel
|
||||||
|
export function exportCostMaterialAutoReportExcel(data) {
|
||||||
|
return request({
|
||||||
|
url: '/extend/cost-material-auto-report/export-excel',
|
||||||
|
method: 'post',
|
||||||
|
data: data,
|
||||||
|
responseType: 'blob'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 导出原料成本自动统计报 Excel查询
|
||||||
|
export function exportCostMaterialSearch(data) {
|
||||||
|
return request({
|
||||||
|
url: '/extend/cost-material-search/export-excel',
|
||||||
|
method: 'post',
|
||||||
|
data: data,
|
||||||
|
responseType: 'blob'
|
||||||
|
})
|
||||||
|
}
|
||||||
61
src/api/cost/costMaterialSet.js
Normal file
@@ -0,0 +1,61 @@
|
|||||||
|
/*
|
||||||
|
* @Author: zwq
|
||||||
|
* @Date: 2023-11-15 09:24:30
|
||||||
|
* @LastEditors: zwq
|
||||||
|
* @LastEditTime: 2023-12-05 14:38:48
|
||||||
|
* @Description:
|
||||||
|
*/
|
||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
// 创建原料价位配置
|
||||||
|
export function createCostMaterialSet(data) {
|
||||||
|
return request({
|
||||||
|
url: '/extend/cost-material-set/create',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 更新原料价位配置
|
||||||
|
export function updateCostMaterialSet(data) {
|
||||||
|
return request({
|
||||||
|
url: '/extend/cost-material-set/update',
|
||||||
|
method: 'put',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 删除原料价位配置
|
||||||
|
export function deleteCostMaterialSet(id) {
|
||||||
|
return request({
|
||||||
|
url: '/extend/cost-material-set/delete?id=' + id,
|
||||||
|
method: 'delete'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获得原料价位配置
|
||||||
|
export function getCostMaterialSet(id) {
|
||||||
|
return request({
|
||||||
|
url: '/extend/cost-material-set/get?id=' + id,
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获得原料价位配置分页
|
||||||
|
export function getCostMaterialSetPage(data) {
|
||||||
|
return request({
|
||||||
|
url: '/extend/cost-material-set/page',
|
||||||
|
method: 'POST',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 导出原料价位配置 Excel
|
||||||
|
export function exportCostMaterialSetExcel(query) {
|
||||||
|
return request({
|
||||||
|
url: '/extend/cost-material-set/export-excel',
|
||||||
|
method: 'get',
|
||||||
|
params: query,
|
||||||
|
responseType: 'blob'
|
||||||
|
})
|
||||||
|
}
|
||||||
63
src/api/monitoring/qualityIsra.js
Normal file
@@ -0,0 +1,63 @@
|
|||||||
|
/*
|
||||||
|
* @Author: zhp
|
||||||
|
* @Date: 2023-12-08 15:26:59
|
||||||
|
* @LastEditTime: 2023-12-11 15:21:44
|
||||||
|
* @LastEditors: zhp
|
||||||
|
* @Description:
|
||||||
|
*/
|
||||||
|
import request from '@/utils/request'
|
||||||
|
export function getQualityIsraPage(query) {
|
||||||
|
return request({
|
||||||
|
url: 'base/quality-isra-statistics/getIsraData',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function getQualityIsraDayMap(query) {
|
||||||
|
return request({
|
||||||
|
url: '/base/quality-isra-statistics/dayMap',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function getQualityIsraWeekMap(query) {
|
||||||
|
return request({
|
||||||
|
url: '/base/quality-isra-statistics/weekMap',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function getQualityIsraMonthMap(query) {
|
||||||
|
return request({
|
||||||
|
url: '/base/quality-isra-statistics/monthMap',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function getQualityIsraDayList(query) {
|
||||||
|
return request({
|
||||||
|
url: '/base/quality-isra-statistics/dayList',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function getQualityIsraWeekList(query) {
|
||||||
|
return request({
|
||||||
|
url: '/base/quality-isra-statistics/weekList',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function getQualityIsraMonthList(query) {
|
||||||
|
return request({
|
||||||
|
url: '/base/quality-isra-statistics/monthList',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* @Author: zhp
|
* @Author: zhp
|
||||||
* @Date: 2023-10-31 10:55:20
|
* @Date: 2023-10-31 10:55:20
|
||||||
* @LastEditTime: 2023-10-31 15:05:30
|
* @LastEditTime: 2023-12-06 14:09:14
|
||||||
* @LastEditors: zhp
|
* @LastEditors: zhp
|
||||||
* @Description:
|
* @Description:
|
||||||
*/
|
*/
|
||||||
@@ -33,3 +33,12 @@ export function exportEnergyPlcExcel(query) {
|
|||||||
responseType: 'blob'
|
responseType: 'blob'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function getOriginalGlassRetrace(query) {
|
||||||
|
return request({
|
||||||
|
url: '/base/original-glass-statistics/originalGlassRetrace',
|
||||||
|
method: 'get',
|
||||||
|
params: query,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|||||||
61
src/api/report/glass.js
Normal file
@@ -0,0 +1,61 @@
|
|||||||
|
/*
|
||||||
|
* @Author: Do not edit
|
||||||
|
* @Date: 2023-12-08 10:26:48
|
||||||
|
* @LastEditTime: 2023-12-13 17:16:00
|
||||||
|
* @LastEditors: DY
|
||||||
|
* @Description:
|
||||||
|
*/
|
||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
// 创建原片自动报
|
||||||
|
export function createGlass(data) {
|
||||||
|
return request({
|
||||||
|
url: '/base/report-auto-original-glass/create',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 批量更新原片自动报
|
||||||
|
export function updateGlass(data) {
|
||||||
|
return request({
|
||||||
|
url: '/base/report-auto-original-glass/updatePlus',
|
||||||
|
method: 'put',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 更新原片自动报
|
||||||
|
export function updateGlassRemark(data) {
|
||||||
|
return request({
|
||||||
|
url: '/base/report-auto-original-glass/update',
|
||||||
|
method: 'put',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获得原片自动报
|
||||||
|
export function getGlass(id) {
|
||||||
|
return request({
|
||||||
|
url: '/base/report-auto-original-glass/get?id=' + id,
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获得原片分页
|
||||||
|
export function getGlassPage(query) {
|
||||||
|
return request({
|
||||||
|
url: '/base/report-auto-original-glass/listPlus',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 导出原片自动报 Excel
|
||||||
|
export function exportGlasscExcel(query) {
|
||||||
|
return request({
|
||||||
|
url: '/base/report-auto-original-glass/export-excel',
|
||||||
|
method: 'get',
|
||||||
|
params: query,
|
||||||
|
responseType: 'blob'
|
||||||
|
})
|
||||||
|
}
|
||||||
57
src/api/report/production.js
Normal file
@@ -0,0 +1,57 @@
|
|||||||
|
/*
|
||||||
|
* @Author: zhp
|
||||||
|
* @Date: 2023-12-12 13:49:02
|
||||||
|
* @LastEditTime: 2023-12-14 14:21:43
|
||||||
|
* @LastEditors: zhp
|
||||||
|
* @Description:
|
||||||
|
*/
|
||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
// 获得质量检查信息记录表分页
|
||||||
|
|
||||||
|
export function getProductionDataList(query) {
|
||||||
|
return request({
|
||||||
|
url: '/base/report-auto-production/listPlus',
|
||||||
|
method: 'get',
|
||||||
|
data: query,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function updateProductionDataList(query) {
|
||||||
|
return request({
|
||||||
|
url: '/base/report-auto-production/updatePlus',
|
||||||
|
method: 'put',
|
||||||
|
data: query,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
export function updateSumProductionDataList(query) {
|
||||||
|
return request({
|
||||||
|
url: '/base/report-auto-production/update',
|
||||||
|
method: 'put',
|
||||||
|
data: query,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function getAutoDeliveDataList(query) {
|
||||||
|
return request({
|
||||||
|
url: '/base/report-auto-delive/listPlus',
|
||||||
|
method: 'put',
|
||||||
|
data: query,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function updateAutoDeliveDataList(query) {
|
||||||
|
return request({
|
||||||
|
url: '/base/report-auto-delive/update',
|
||||||
|
method: 'put',
|
||||||
|
data: query,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function updateSumAutoDeliveDataList(query) {
|
||||||
|
return request({
|
||||||
|
url: '/base/report-auto-delive/updatePlus',
|
||||||
|
method: 'put',
|
||||||
|
data: query,
|
||||||
|
})
|
||||||
|
}
|
||||||
92
src/api/safetyEnvironmental/environmental.js
Normal file
@@ -0,0 +1,92 @@
|
|||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
// 获得环保检测指标实时数据
|
||||||
|
export function environmentalCheckRealtime(query) {
|
||||||
|
return request({
|
||||||
|
url: '/base/environmental-check/realtime',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获得环保检测指标趋势数据
|
||||||
|
export function environmentalCheckRealtimeTrend(data) {
|
||||||
|
return request({
|
||||||
|
url: '/base/environmental-check-record/trend',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获得环保检测指标分页
|
||||||
|
export function environmentalCheckPage(query) {
|
||||||
|
return request({
|
||||||
|
url: '/base/environmental-check/page',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 创建环保检测指标
|
||||||
|
export function environmentalCheckCreate(data) {
|
||||||
|
return request({
|
||||||
|
url: '/base/environmental-check/create',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 更新环保检测指标
|
||||||
|
export function environmentalCheckUpdate(data) {
|
||||||
|
return request({
|
||||||
|
url: '/base/environmental-check/update',
|
||||||
|
method: 'put',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获得环保检测指标
|
||||||
|
export function environmentalCheckGet(query) {
|
||||||
|
return request({
|
||||||
|
url: '/base/environmental-check/get',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 删除环保检测指标
|
||||||
|
export function environmentalCheckDelete(query) {
|
||||||
|
return request({
|
||||||
|
url: '/base/environmental-check/delete',
|
||||||
|
method: 'delete',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获得环保检测记录分页
|
||||||
|
export function environmentalCheckRecordPage(data) {
|
||||||
|
return request({
|
||||||
|
url: '/base/environmental-check-record/page',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 导出环保检测记录 Excel
|
||||||
|
export function environmentalCheckRecordExport(data) {
|
||||||
|
return request({
|
||||||
|
url: '/base/environmental-check-record/export-excel',
|
||||||
|
method: 'post',
|
||||||
|
data: data,
|
||||||
|
responseType: 'blob'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获取环保检测指标code
|
||||||
|
export function getEnvironmentalCheckCode(query) {
|
||||||
|
return request({
|
||||||
|
url: '/base/environmental-check/getCode',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
12
src/assets/icons/svg/menuIcon.svg
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<svg width="24px" height="24px" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||||
|
<title>制度流程</title>
|
||||||
|
<g id="页面" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
||||||
|
<g id="栏" transform="translate(-383.000000, -639.000000)" fill="#FFFFFF" fill-rule="nonzero">
|
||||||
|
<g id="制度流程" transform="translate(383.000000, 639.000000)">
|
||||||
|
<rect id="矩形" opacity="0" x="0" y="0" width="24" height="24"></rect>
|
||||||
|
<path d="M4.37117174,17.071929 L2.37885068,17.071929 C2.0028361,17.071929 1.69692899,17.3771995 1.69692899,17.7524526 L1.69692899,19.7475474 C1.69692899,20.1227781 2.00283612,20.428071 2.37885068,20.428071 L4.37117174,20.428071 C4.74718632,20.428071 5.05307101,20.1228005 5.05307101,19.7475474 L5.05307101,17.7524526 C5.05307101,17.3771996 4.74718632,17.071929 4.37117174,17.071929 Z M7.36536289,6.40073051 L21.8846371,6.40073051 C22.2245029,6.40073051 22.5,6.06492662 22.5,5.65073051 C22.5,5.2365344 22.2245029,4.90073051 21.8846371,4.90073051 L7.36536289,4.90073051 C7.02549709,4.90073051 6.75,5.23653442 6.75,5.65073054 C6.75,6.06492665 7.02549711,6.40073051 7.36536289,6.40073051 Z M3.14077284,5.95492436 L2.03265569,4.84248673 C1.8767502,4.68597337 1.62348469,4.6854806 1.46697133,4.84138609 C1.4665023,4.8418533 1.46603442,4.84232168 1.46556772,4.84279121 L1.18448184,5.12557972 C1.0295067,5.28149361 1.02939503,5.5332514 1.1842318,5.6893027 L2.85590574,7.37408916 C3.01150401,7.53090793 3.26476807,7.53189735 3.42158685,7.37629907 C3.42263304,7.37526103 3.42367349,7.3742172 3.42470814,7.37316765 L5.7220224,5.04277966 C5.87599957,4.88658572 5.87547971,4.63552909 5.72085699,4.47997417 L5.4403523,4.19777835 C5.28461275,4.04109986 5.0313479,4.04033871 4.87466942,4.19607825 C4.87370895,4.19703297 4.87275333,4.19799256 4.8718026,4.19895698 L3.14077284,5.95492436 L3.14077284,5.95492436 Z M21.8846371,11.25 L7.36536289,11.25 C7.02549709,11.25 6.75,11.5857972 6.75,11.999985 C6.75,12.4141729 7.02552167,12.75 7.36536289,12.75 L21.8846371,12.75 C22.2245029,12.75 22.5,12.4142028 22.5,11.999985 C22.5,11.5857672 22.2245029,11.25 21.8846371,11.25 Z M21.8846371,17.972656 L7.36536289,17.972656 C7.02549709,17.972656 6.75,18.30843 6.75,18.722656 C6.75,19.1368821 7.02552167,19.472656 7.36536289,19.472656 L21.8846371,19.472656 C22.2245029,19.472656 22.5,19.1368821 22.5,18.722656 C22.5,18.30843 22.2245029,17.972656 21.8846371,17.972656 Z M4.37117174,10.321929 L2.37885068,10.321929 C2.0028361,10.321929 1.69692899,10.6271975 1.69692899,11.0024481 L1.69692899,12.9975519 C1.69692899,13.3727801 2.00283612,13.678071 2.37885068,13.678071 L4.37117174,13.678071 C4.74718632,13.678071 5.05307101,13.3728025 5.05307101,12.9975519 L5.05307101,11.0024481 C5.05307101,10.6271975 4.74718632,10.321929 4.37117174,10.321929 Z" id="形状"></path>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 2.9 KiB |
1
src/assets/icons/svg/noStandards.svg
Normal file
@@ -0,0 +1 @@
|
|||||||
|
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1702606455297" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1590" xmlns:xlink="http://www.w3.org/1999/xlink" width="128" height="128"><path d="M614.4 59.136l238.592 137.728a204.8 204.8 0 0 1 102.4 177.3568v275.5584a204.8 204.8 0 0 1-102.4 177.3568L614.4 964.864a204.8 204.8 0 0 1-204.8 0l-238.592-137.728a204.8 204.8 0 0 1-102.4-177.3568V374.2208a204.8 204.8 0 0 1 102.4-177.3568L409.6 59.136a204.8 204.8 0 0 1 204.8 0z" fill="#EE1609" p-id="1591"></path><path d="M471.04 261.9904v315.392a40.96 40.96 0 1 0 81.92 0v-315.392a40.96 40.96 0 1 0-81.92 0z" fill="#FFFFFF" p-id="1592"></path><path d="M512 706.56m-51.2 0a51.2 51.2 0 1 0 102.4 0 51.2 51.2 0 1 0-102.4 0Z" fill="#FFFFFF" p-id="1593"></path></svg>
|
||||||
|
After Width: | Height: | Size: 895 B |
1
src/assets/icons/svg/standards.svg
Normal file
@@ -0,0 +1 @@
|
|||||||
|
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1702606467176" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1824" xmlns:xlink="http://www.w3.org/1999/xlink" width="128" height="128"><path d="M622.812817 29.238717l258.222014 146.7694A217.658893 217.658893 0 0 1 991.847648 365.004111v293.666761c0 77.991238-42.226593 150.032365-110.812817 188.995994l-258.222014 146.7694a224.568699 224.568699 0 0 1-221.625634 0l-258.222014-146.7694A217.658893 217.658893 0 0 1 32.152352 658.670872v-293.666761c0-77.991238 42.226593-150.032365 110.812817-188.995994L401.187183 29.238717a224.568699 224.568699 0 0 1 221.625634 0z" fill="#4AA468" p-id="1825"></path><path d="M448.852049 592.899754l-124.120591-140.883269a37.108218 37.108218 0 0 0-56.877941 1.087654 51.631607 51.631607 0 0 0-0.447858 65.067342l151.567877 172.105356c15.355125 17.466454 39.987304 18.042272 55.982226 1.407553l279.39929-290.403797a50.863851 50.863851 0 0 0 12.667978-44.529861 44.84976 44.84976 0 0 0-27.511265-34.67699 36.980259 36.980259 0 0 0-39.859345 10.17277l-250.800371 260.653242z" fill="#FFFFFF" p-id="1826"></path></svg>
|
||||||
|
After Width: | Height: | Size: 1.2 KiB |
BIN
src/assets/images/choicepart/Cost.png
Normal file
|
After Width: | Height: | Size: 15 KiB |
BIN
src/assets/images/choicepart/Databoard.png
Normal file
|
After Width: | Height: | Size: 12 KiB |
BIN
src/assets/images/choicepart/SafetyEnvironmental.png
Normal file
|
After Width: | Height: | Size: 15 KiB |
BIN
src/assets/images/detectionData.png
Normal file
|
After Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 5.6 KiB |
BIN
src/assets/logo/logo1.png
Normal file
|
After Width: | Height: | Size: 2.0 KiB |
BIN
src/assets/logo/xcac.png
Normal file
|
After Width: | Height: | Size: 1.2 MiB |
@@ -139,7 +139,7 @@ $base1px: 0.15vh; // 1px / 1080px;
|
|||||||
|
|
||||||
.title {
|
.title {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
margin-left: calc(28 * 0.12vh);
|
margin-left: calc(18px * 0.12vh);
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
user-select: none;
|
user-select: none;
|
||||||
color: #000;
|
color: #000;
|
||||||
@@ -148,8 +148,8 @@ $base1px: 0.15vh; // 1px / 1080px;
|
|||||||
letter-spacing: calc(2 * 0.12vh);
|
letter-spacing: calc(2 * 0.12vh);
|
||||||
|
|
||||||
.cnbm_logo {
|
.cnbm_logo {
|
||||||
height: calc(40 * 0.12vh);
|
height: calc(160 * 0.12vh);
|
||||||
width: calc(40 * 0.12vh);
|
width: calc(182 * 0.12vh);
|
||||||
position: relative;
|
position: relative;
|
||||||
top: calc(8 * 0.12vh);
|
top: calc(8 * 0.12vh);
|
||||||
right: calc(8 * 0.12vh);
|
right: calc(8 * 0.12vh);
|
||||||
|
|||||||
@@ -86,8 +86,8 @@
|
|||||||
</span>
|
</span>
|
||||||
<!-- :file-list="uploadedFileList" -->
|
<!-- :file-list="uploadedFileList" -->
|
||||||
<el-upload
|
<el-upload
|
||||||
class="upload-in-dialog"
|
|
||||||
v-if="col.upload"
|
v-if="col.upload"
|
||||||
|
class="upload-in-dialog"
|
||||||
:key="col.prop + '__el-upload'"
|
:key="col.prop + '__el-upload'"
|
||||||
:action="uploadUrl"
|
:action="uploadUrl"
|
||||||
:headers="uploadHeaders"
|
:headers="uploadHeaders"
|
||||||
@@ -101,7 +101,9 @@
|
|||||||
}
|
}
|
||||||
"
|
"
|
||||||
v-bind="col.bind">
|
v-bind="col.bind">
|
||||||
<el-button size="mini" :disabled="col.bind?.disabled || false">
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
:disabled="disabled || col.bind?.disabled || false">
|
||||||
<svg-icon
|
<svg-icon
|
||||||
icon-class="icon-upload"
|
icon-class="icon-upload"
|
||||||
style="color: inherit"></svg-icon>
|
style="color: inherit"></svg-icon>
|
||||||
@@ -117,6 +119,7 @@
|
|||||||
v-for="file in form[col.prop]"
|
v-for="file in form[col.prop]"
|
||||||
:file="file"
|
:file="file"
|
||||||
:key="file.fileUrl"
|
:key="file.fileUrl"
|
||||||
|
:disabled="disabled"
|
||||||
@delete="!disabled && handleDeleteFile(file, col.prop)" />
|
@delete="!disabled && handleDeleteFile(file, col.prop)" />
|
||||||
</div>
|
</div>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@@ -143,7 +146,7 @@ function findMaxLabelWidth(rows) {
|
|||||||
if (opt.label.length > max) {
|
if (opt.label.length > max) {
|
||||||
max = opt.label.length;
|
max = opt.label.length;
|
||||||
if (opt.label.includes('(')) {
|
if (opt.label.includes('(')) {
|
||||||
max = max - 3
|
max = max - 3;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -153,7 +156,7 @@ function findMaxLabelWidth(rows) {
|
|||||||
|
|
||||||
const uploadedFile = {
|
const uploadedFile = {
|
||||||
name: 'UploadedFile',
|
name: 'UploadedFile',
|
||||||
props: ['file'],
|
props: ['file', 'disabled'],
|
||||||
data() {
|
data() {
|
||||||
return {};
|
return {};
|
||||||
},
|
},
|
||||||
@@ -198,6 +201,7 @@ const uploadedFile = {
|
|||||||
display: 'inline-block',
|
display: 'inline-block',
|
||||||
}}>
|
}}>
|
||||||
{this.file.fileName}
|
{this.file.fileName}
|
||||||
|
{!this.disabled && (
|
||||||
<el-button
|
<el-button
|
||||||
type="text"
|
type="text"
|
||||||
icon="el-icon-close"
|
icon="el-icon-close"
|
||||||
@@ -205,6 +209,7 @@ const uploadedFile = {
|
|||||||
class="dialog__upload_component__close"
|
class="dialog__upload_component__close"
|
||||||
onClick={this.handleDelete}
|
onClick={this.handleDelete}
|
||||||
/>
|
/>
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
@@ -242,7 +247,7 @@ export default {
|
|||||||
size: {
|
size: {
|
||||||
type: String,
|
type: String,
|
||||||
default: '',
|
default: '',
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@@ -407,8 +412,26 @@ export default {
|
|||||||
}
|
}
|
||||||
if (!promiseList.length) this.formLoading = false;
|
if (!promiseList.length) this.formLoading = false;
|
||||||
},
|
},
|
||||||
|
|
||||||
// 上传成功的特殊处理
|
// 上传成功的特殊处理
|
||||||
beforeUpload() {},
|
beforeUpload(file) {
|
||||||
|
const checkFileSize = () => {
|
||||||
|
const isLt2M = file.size / 1024 / 1024 < 2;
|
||||||
|
if (!isLt2M) {
|
||||||
|
this.$modal.msgError('上传文件大小不能超过 2MB!');
|
||||||
|
}
|
||||||
|
return isLt2M;
|
||||||
|
};
|
||||||
|
const checkFileType = () => {
|
||||||
|
const isJPG =
|
||||||
|
file.type === 'image/jpeg' ||
|
||||||
|
file.type === 'image/png' ||
|
||||||
|
file.type === 'image/jpg';
|
||||||
|
return isJPG;
|
||||||
|
};
|
||||||
|
return checkFileSize() && checkFileType();
|
||||||
|
},
|
||||||
|
|
||||||
// 上传前的验证规则可通过 bind 属性传入
|
// 上传前的验证规则可通过 bind 属性传入
|
||||||
handleUploadSuccess(response, file, prop) {
|
handleUploadSuccess(response, file, prop) {
|
||||||
console.log('[handleUploadSuccess]', response, file, prop);
|
console.log('[handleUploadSuccess]', response, file, prop);
|
||||||
|
|||||||
@@ -83,7 +83,7 @@ export default {
|
|||||||
],
|
],
|
||||||
},
|
},
|
||||||
placeholder: '请输入内容',
|
placeholder: '请输入内容',
|
||||||
// readOnly: false,
|
readOnly: true,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
@@ -123,7 +123,6 @@ export default {
|
|||||||
const editor = this.$refs.editor;
|
const editor = this.$refs.editor;
|
||||||
this.Quill = new Quill(editor, this.options);
|
this.Quill = new Quill(editor, this.options);
|
||||||
// 取消自动聚焦 start
|
// 取消自动聚焦 start
|
||||||
this.Quill?.enable(false);
|
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.Quill?.blur();
|
this.Quill?.blur();
|
||||||
this.Quill?.enable(true);
|
this.Quill?.enable(true);
|
||||||
@@ -195,7 +194,7 @@ export default {
|
|||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style>
|
||||||
.editor-wrapper {
|
.editor-wrapper {
|
||||||
position: relative;
|
position: relative;
|
||||||
cursor: not-allowed;
|
cursor: not-allowed;
|
||||||
|
|||||||
@@ -15,6 +15,7 @@
|
|||||||
:headers="headers"
|
:headers="headers"
|
||||||
:file-list="fileList"
|
:file-list="fileList"
|
||||||
:on-preview="handlePictureCardPreview"
|
:on-preview="handlePictureCardPreview"
|
||||||
|
:disabled="disabled"
|
||||||
:class="{hide: this.fileList.length >= this.limit}"
|
:class="{hide: this.fileList.length >= this.limit}"
|
||||||
>
|
>
|
||||||
<i class="el-icon-plus"></i>
|
<i class="el-icon-plus"></i>
|
||||||
@@ -44,6 +45,7 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { getAccessToken } from "@/utils/auth";
|
import { getAccessToken } from "@/utils/auth";
|
||||||
|
import { flatten } from 'min-dash';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
props: {
|
props: {
|
||||||
@@ -67,6 +69,10 @@ export default {
|
|||||||
isShowTip: {
|
isShowTip: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: true
|
default: true
|
||||||
|
},
|
||||||
|
disabled: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
@@ -122,14 +128,16 @@ export default {
|
|||||||
// 上传成功回调
|
// 上传成功回调
|
||||||
handleUploadSuccess(res) {
|
handleUploadSuccess(res) {
|
||||||
// edit by 芋道源码
|
// edit by 芋道源码
|
||||||
|
if (res.code !== 500) {
|
||||||
this.uploadList.push({ name: res.data, url: res.data });
|
this.uploadList.push({ name: res.data, url: res.data });
|
||||||
if (this.uploadList.length === this.number) {
|
if (this.uploadList.length === this.number) {
|
||||||
this.fileList = this.fileList.concat(this.uploadList);
|
this.fileList = this.fileList.concat(this.uploadList);
|
||||||
this.uploadList = [];
|
this.uploadList = [];
|
||||||
this.number = 0;
|
this.number = 0;
|
||||||
this.$emit("input", this.listToString(this.fileList));
|
this.$emit("input", this.listToString(this.fileList));
|
||||||
this.$modal.closeLoading();
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
this.$modal.closeLoading();
|
||||||
},
|
},
|
||||||
// 上传前loading加载
|
// 上传前loading加载
|
||||||
handleBeforeUpload(file) {
|
handleBeforeUpload(file) {
|
||||||
|
|||||||
@@ -17,7 +17,9 @@ export default {
|
|||||||
const vnodes = []
|
const vnodes = []
|
||||||
|
|
||||||
if (icon) {
|
if (icon) {
|
||||||
vnodes.push(<svg-icon icon-class={icon}/>)
|
vnodes.push(<svg-icon style="font-size: 18px;margin-right: 10px;vertical-align: middle;" icon-class={icon}/>)
|
||||||
|
} else {
|
||||||
|
vnodes.push(<span style="display: inline-block; width: 10px;"/>)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (title) {
|
if (title) {
|
||||||
|
|||||||
@@ -15,7 +15,7 @@
|
|||||||
key="collapse"
|
key="collapse"
|
||||||
class="sidebar-logo-link"
|
class="sidebar-logo-link"
|
||||||
to="/">
|
to="/">
|
||||||
<img v-if="logo" :src="logo" class="sidebar-logo" />
|
<img v-if="logo" :src="logo" class="sidebar-logo-close" />
|
||||||
<h1
|
<h1
|
||||||
v-else
|
v-else
|
||||||
class="sidebar-title"
|
class="sidebar-title"
|
||||||
@@ -67,7 +67,7 @@ export default {
|
|||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
title: '中建材智能化院',
|
title: '许昌安彩新能科技有限公司',
|
||||||
logo: logoImg,
|
logo: logoImg,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
@@ -98,8 +98,8 @@ export default {
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
|
|
||||||
& .sidebar-logo {
|
& .sidebar-logo {
|
||||||
width: 32px;
|
width: 67px;
|
||||||
height: 40px;
|
height: 24px;
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
margin-right: 12px;
|
margin-right: 12px;
|
||||||
}
|
}
|
||||||
@@ -108,17 +108,23 @@ export default {
|
|||||||
display: inline-block;
|
display: inline-block;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
font-weight: 600;
|
font-weight: 500;
|
||||||
line-height: 50px;
|
width: 147px;
|
||||||
font-size: 18px;
|
letter-spacing: 2px;
|
||||||
letter-spacing: 1px;
|
font-size: 10px;
|
||||||
font-family: Avenir, Helvetica Neue, Arial, Helvetica, sans-serif;
|
font-family: Avenir, Helvetica Neue, Arial, Helvetica, sans-serif;
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
&.collapse {
|
&.collapse {
|
||||||
.sidebar-logo {
|
// .sidebar-logo {
|
||||||
|
// margin-right: 0px;
|
||||||
|
// }
|
||||||
|
.sidebar-logo-close {
|
||||||
|
width: 54px;
|
||||||
|
height: 19px;
|
||||||
|
vertical-align: middle;
|
||||||
margin-right: 0px;
|
margin-right: 0px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,16 +3,16 @@
|
|||||||
<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">
|
||||||
<app-link v-if="onlyOneChild.meta" :to="resolvePath(onlyOneChild.path)">
|
<app-link v-if="onlyOneChild.meta" :to="resolvePath(onlyOneChild.path)">
|
||||||
<el-menu-item :index="resolvePath(onlyOneChild.path)" :class="{'submenu-title-noDropdown':!isNest}">
|
<el-menu-item :index="resolvePath(onlyOneChild.path)" :class="{'submenu-title-noDropdown':!isNest}">
|
||||||
<item :icon="onlyOneChild.meta.icon||(item.meta&&item.meta.icon)" :title="onlyOneChild.meta.title" />
|
<item icon="menuIcon" :title="onlyOneChild.meta.title" />
|
||||||
</el-menu-item>
|
</el-menu-item>
|
||||||
</app-link>
|
</app-link>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<el-submenu v-else ref="subMenu" :index="resolvePath(item.path)" popper-append-to-body>
|
<el-submenu v-else ref="subMenu" :index="resolvePath(item.path)" popper-append-to-body>
|
||||||
<template slot="title">
|
<template slot="title">
|
||||||
<item v-if="item.meta" :icon="item.meta && item.meta.icon" :title="item.meta.title" />
|
<item v-if="item.meta" icon="menuIcon" :title="item.meta.title" />
|
||||||
</template>
|
</template>
|
||||||
<sidebar-item
|
<sidebar-item-sub
|
||||||
v-for="(child, index) in item.children"
|
v-for="(child, index) in item.children"
|
||||||
:key="child.path + index"
|
:key="child.path + index"
|
||||||
:is-nest="true"
|
:is-nest="true"
|
||||||
@@ -30,10 +30,11 @@ import { isExternal } from '@/utils/validate'
|
|||||||
import Item from './Item'
|
import Item from './Item'
|
||||||
import AppLink from './Link'
|
import AppLink from './Link'
|
||||||
import FixiOSBug from './FixiOSBug'
|
import FixiOSBug from './FixiOSBug'
|
||||||
|
import SidebarItemSub from './SidebarItemSub'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'SidebarItem',
|
name: 'SidebarItem',
|
||||||
components: { Item, AppLink },
|
components: { Item, AppLink, SidebarItemSub },
|
||||||
mixins: [FixiOSBug],
|
mixins: [FixiOSBug],
|
||||||
props: {
|
props: {
|
||||||
// route object
|
// route object
|
||||||
|
|||||||
@@ -3,16 +3,16 @@
|
|||||||
<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">
|
||||||
<app-link v-if="onlyOneChild.meta" :to="resolvePath(onlyOneChild.path)">
|
<app-link v-if="onlyOneChild.meta" :to="resolvePath(onlyOneChild.path)">
|
||||||
<el-menu-item :index="resolvePath(onlyOneChild.path)" :class="{'submenu-title-noDropdown':!isNest}">
|
<el-menu-item :index="resolvePath(onlyOneChild.path)" :class="{'submenu-title-noDropdown':!isNest}">
|
||||||
<item :icon="onlyOneChild.meta.icon||(item.meta&&item.meta.icon)" :title="onlyOneChild.meta.title" />
|
<item icon="" :title="onlyOneChild.meta.title" />
|
||||||
</el-menu-item>
|
</el-menu-item>
|
||||||
</app-link>
|
</app-link>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<el-submenu v-else ref="subMenu" :index="resolvePath(item.path)" popper-append-to-body>
|
<el-submenu v-else ref="subMenu" :index="resolvePath(item.path)" popper-append-to-body>
|
||||||
<template slot="title">
|
<template slot="title">
|
||||||
<item v-if="item.meta" :icon="item.meta && item.meta.icon" :title="item.meta.title" />
|
<item v-if="item.meta" icon="" :title="item.meta.title" />
|
||||||
</template>
|
</template>
|
||||||
<sidebar-item
|
<sidebar-item-sub
|
||||||
v-for="(child, index) in item.children"
|
v-for="(child, index) in item.children"
|
||||||
:key="child.path + index"
|
:key="child.path + index"
|
||||||
:is-nest="true"
|
:is-nest="true"
|
||||||
@@ -32,7 +32,7 @@ import AppLink from './Link'
|
|||||||
import FixiOSBug from './FixiOSBug'
|
import FixiOSBug from './FixiOSBug'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'SidebarItem',
|
name: 'SidebarItemSub',
|
||||||
components: { Item, AppLink },
|
components: { Item, AppLink },
|
||||||
mixins: [FixiOSBug],
|
mixins: [FixiOSBug],
|
||||||
props: {
|
props: {
|
||||||
@@ -1,71 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div
|
|
||||||
:class="{ 'has-logo': showLogo }"
|
|
||||||
:style="{
|
|
||||||
backgroundColor:
|
|
||||||
settings.sideTheme === 'theme-dark'
|
|
||||||
? variables.menuBackground
|
|
||||||
: variables.menuLightBackground,
|
|
||||||
}">
|
|
||||||
<logo v-if="showLogo" :collapse="isCollapse" />
|
|
||||||
<el-scrollbar :class="settings.sideTheme" wrap-class="scrollbar-wrapper">
|
|
||||||
<el-menu
|
|
||||||
:default-active="activeMenu"
|
|
||||||
:collapse="isCollapse"
|
|
||||||
:background-color="
|
|
||||||
settings.sideTheme === 'theme-dark'
|
|
||||||
? variables.menuBackground
|
|
||||||
: variables.menuLightBackground
|
|
||||||
"
|
|
||||||
:text-color="
|
|
||||||
settings.sideTheme === 'theme-dark'
|
|
||||||
? variables.menuColor
|
|
||||||
: variables.menuLightColor
|
|
||||||
"
|
|
||||||
:unique-opened="true"
|
|
||||||
active-text-color="#fff"
|
|
||||||
:collapse-transition="false"
|
|
||||||
mode="vertical">
|
|
||||||
<!-- 根据 sidebarRouters 路由,生成菜单 -->
|
|
||||||
<sidebar-item
|
|
||||||
v-for="(route, index) in sidebarRouters"
|
|
||||||
:key="route.path + index"
|
|
||||||
:item="route"
|
|
||||||
:base-path="route.path" />
|
|
||||||
</el-menu>
|
|
||||||
</el-scrollbar>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
import { mapGetters, mapState } from 'vuex';
|
|
||||||
import Logo from './Logo';
|
|
||||||
import SidebarItem from './SidebarItem';
|
|
||||||
import variables from '@/assets/styles/variables.scss';
|
|
||||||
|
|
||||||
export default {
|
|
||||||
components: { SidebarItem, Logo },
|
|
||||||
computed: {
|
|
||||||
...mapState(['settings']),
|
|
||||||
...mapGetters(['sidebarRouters', 'sidebar']),
|
|
||||||
activeMenu() {
|
|
||||||
const route = this.$route;
|
|
||||||
const { meta, path } = route;
|
|
||||||
// if set path, the sidebar will highlight the path you set
|
|
||||||
if (meta.activeMenu) {
|
|
||||||
return meta.activeMenu;
|
|
||||||
}
|
|
||||||
return path;
|
|
||||||
},
|
|
||||||
showLogo() {
|
|
||||||
return this.$store.state.settings.sidebarLogo;
|
|
||||||
},
|
|
||||||
variables() {
|
|
||||||
return variables;
|
|
||||||
},
|
|
||||||
isCollapse() {
|
|
||||||
return !this.sidebar.opened;
|
|
||||||
},
|
|
||||||
},
|
|
||||||
};
|
|
||||||
</script>
|
|
||||||
@@ -28,10 +28,10 @@
|
|||||||
mode="vertical">
|
mode="vertical">
|
||||||
<!-- 根据 sidebarRouters 路由,生成菜单 -->
|
<!-- 根据 sidebarRouters 路由,生成菜单 -->
|
||||||
<sidebar-item
|
<sidebar-item
|
||||||
v-for="(route, index) in routeList"
|
v-for="(route, index) in routeList.children"
|
||||||
:key="route.path + index"
|
:key="route.path + index"
|
||||||
:item="route"
|
:item="route"
|
||||||
:base-path="route.path" />
|
:base-path="routeList.path+ '/'+ route.path" />
|
||||||
</el-menu>
|
</el-menu>
|
||||||
</el-scrollbar>
|
</el-scrollbar>
|
||||||
</div>
|
</div>
|
||||||
@@ -49,9 +49,7 @@ export default {
|
|||||||
...mapState(['settings']),
|
...mapState(['settings']),
|
||||||
...mapGetters(['sidebarRouters', 'sidebar', 'choicepart']),
|
...mapGetters(['sidebarRouters', 'sidebar', 'choicepart']),
|
||||||
routeList() {
|
routeList() {
|
||||||
// return [this.partList[this.choicepart]]
|
return this.sidebarRouters[this.choicepart]
|
||||||
// return [this.sidebarRouters[29]]
|
|
||||||
return [this.sidebarRouters[this.choicepart]]
|
|
||||||
},
|
},
|
||||||
activeMenu() {
|
activeMenu() {
|
||||||
const route = this.$route;
|
const route = this.$route;
|
||||||
|
|||||||
@@ -94,16 +94,22 @@ export const DICT_TYPE = {
|
|||||||
OBJECT_TYPE: 'object_type',
|
OBJECT_TYPE: 'object_type',
|
||||||
STATISTIC_TYPE: 'statistic_type',
|
STATISTIC_TYPE: 'statistic_type',
|
||||||
TIME_DIM: 'time_dim',
|
TIME_DIM: 'time_dim',
|
||||||
|
TABLE_NAME: 'table_name',
|
||||||
|
METHOD: 'method',
|
||||||
|
|
||||||
// ============== ORDER - 订单模块 =============
|
// ============== ORDER - 订单模块 =============
|
||||||
ORDER_STATUS: 'order_status',
|
ORDER_STATUS: 'order_status',
|
||||||
ORDER_ORIGIN: 'order_Origin',
|
ORDER_ORIGIN: 'order_Origin',
|
||||||
ORDER_PRIORITY: 'order_priority',
|
ORDER_PRIORITY: 'order_priority',
|
||||||
PACK_SPEC: 'pack_spec',
|
PACK_SPEC: 'pack_spec',
|
||||||
|
WORK_ORDER_STATUS: 'work_order_status',
|
||||||
|
|
||||||
// ============== EQUIPMENT - 设备模块 =============
|
// ============== EQUIPMENT - 设备模块 =============
|
||||||
MAINTAIN_TYPE: 'maintain_type',
|
MAINTAIN_TYPE: 'maintain_type',
|
||||||
FAULT_LEVEL: 'fault-level',
|
FAULT_LEVEL: 'fault-level',
|
||||||
|
|
||||||
|
// ============== ENVIRONMENTAL - 环保模块 =============
|
||||||
|
ENVIRONMENT_CHECK_UNIT: 'environment_check_unit'
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
const baseURL = process.env.VUE_APP_BASE_API
|
const baseURL = process.env.VUE_APP_BASE_API
|
||||||
|
|
||||||
// 日期格式化
|
// 日期格式化(通用)
|
||||||
export function parseTime(time, pattern) {
|
export function parseTime(time, pattern) {
|
||||||
if (arguments.length === 0 || !time) {
|
if (arguments.length === 0 || !time) {
|
||||||
return null
|
return null
|
||||||
@@ -48,6 +48,51 @@ export function parseTime(time, pattern) {
|
|||||||
return time_str
|
return time_str
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 日期格式化(仅适用表格)
|
||||||
|
export function parseTimeTable(pattern) {
|
||||||
|
return function(time){
|
||||||
|
if (arguments.length === 0 || !time) {
|
||||||
|
return null
|
||||||
|
}
|
||||||
|
const format = pattern || '{y}-{m}-{d} {h}:{i}:{s}'
|
||||||
|
let date
|
||||||
|
if (typeof time === 'object') {
|
||||||
|
date = time
|
||||||
|
} else {
|
||||||
|
if ((typeof time === 'string') && (/^[0-9]+$/.test(time))) {
|
||||||
|
time = parseInt(time)
|
||||||
|
} else if (typeof time === 'string') {
|
||||||
|
time = time.replace(new RegExp(/-/gm), '/').replace('T', ' ').replace(new RegExp(/\.\d{3}/gm),'');
|
||||||
|
}
|
||||||
|
if ((typeof time === 'number') && (time.toString().length === 10)) {
|
||||||
|
time = time * 1000
|
||||||
|
}
|
||||||
|
date = new Date(time)
|
||||||
|
}
|
||||||
|
const formatObj = {
|
||||||
|
y: date.getFullYear(),
|
||||||
|
m: date.getMonth() + 1,
|
||||||
|
d: date.getDate(),
|
||||||
|
h: date.getHours(),
|
||||||
|
i: date.getMinutes(),
|
||||||
|
s: date.getSeconds(),
|
||||||
|
a: date.getDay()
|
||||||
|
}
|
||||||
|
const time_str = format.replace(/{([ymdhisa])+}/g, (result, key) => {
|
||||||
|
let value = formatObj[key]
|
||||||
|
// Note: getDay() returns 0 on Sunday
|
||||||
|
if (key === 'a') {
|
||||||
|
return ['日', '一', '二', '三', '四', '五', '六'][value]
|
||||||
|
}
|
||||||
|
if (result.length > 0 && value < 10) {
|
||||||
|
value = '0' + value
|
||||||
|
}
|
||||||
|
return value || 0
|
||||||
|
})
|
||||||
|
return time_str
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// 表单重置
|
// 表单重置
|
||||||
export function resetForm(refName) {
|
export function resetForm(refName) {
|
||||||
if (this.$refs[refName]) {
|
if (this.$refs[refName]) {
|
||||||
|
|||||||
@@ -7,6 +7,8 @@
|
|||||||
}">
|
}">
|
||||||
<img src="../../assets/img/logo.png" style="width:1.1em;position:relative;top:.4em" alt="">
|
<img src="../../assets/img/logo.png" style="width:1.1em;position:relative;top:.4em" alt="">
|
||||||
许昌安彩冷端看板
|
许昌安彩冷端看板
|
||||||
|
<h3 class="unit">单位:河南汇融科技服务有限公司</h3>
|
||||||
|
<h3 class="time">{{ times }}</h3>
|
||||||
<!-- <el-button type="text" class="title-button" :style="{ right: 33 + 'px', top: 37 + 'px' }"
|
<!-- <el-button type="text" class="title-button" :style="{ right: 33 + 'px', top: 37 + 'px' }"
|
||||||
@click="changeFullScreen">
|
@click="changeFullScreen">
|
||||||
<svg-icon v-if="isFullScreen" icon-class="unFullScreenView" />
|
<svg-icon v-if="isFullScreen" icon-class="unFullScreenView" />
|
||||||
@@ -616,6 +618,7 @@ export default {
|
|||||||
modelMonth: '',
|
modelMonth: '',
|
||||||
cplNameList,
|
cplNameList,
|
||||||
cplDataList,
|
cplDataList,
|
||||||
|
times:'',
|
||||||
plInput: {},
|
plInput: {},
|
||||||
plOutput: {},
|
plOutput: {},
|
||||||
plRate: {},
|
plRate: {},
|
||||||
@@ -658,7 +661,7 @@ export default {
|
|||||||
this.windowWidth(document.documentElement.clientWidth)
|
this.windowWidth(document.documentElement.clientWidth)
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
console.log(1111);
|
this.getTimes()
|
||||||
const _this = this;
|
const _this = this;
|
||||||
_this.beilv2 = document.documentElement.clientWidth / 1920
|
_this.beilv2 = document.documentElement.clientWidth / 1920
|
||||||
window.onresize = () => {
|
window.onresize = () => {
|
||||||
@@ -685,6 +688,30 @@ export default {
|
|||||||
// removeEventListener('resize', resizeFun)
|
// removeEventListener('resize', resizeFun)
|
||||||
// },
|
// },
|
||||||
methods: {
|
methods: {
|
||||||
|
getTimes() {
|
||||||
|
setInterval(this.getTimesInterval, 1000);
|
||||||
|
},
|
||||||
|
getTimesInterval: function () {
|
||||||
|
let _this = this;
|
||||||
|
let year = new Date().getFullYear(); //获取当前时间的年份
|
||||||
|
let month = new Date().getMonth() + 1; //获取当前时间的月份
|
||||||
|
let day = new Date().getDate(); //获取当前时间的天数
|
||||||
|
let hours = new Date().getHours(); //获取当前时间的小时
|
||||||
|
let minutes = new Date().getMinutes(); //获取当前时间的分数
|
||||||
|
let seconds = new Date().getSeconds(); //获取当前时间的秒数
|
||||||
|
//当小于 10 的是时候,在前面加 0
|
||||||
|
if (hours < 10) {
|
||||||
|
hours = "0" + hours;
|
||||||
|
}
|
||||||
|
if (minutes < 10) {
|
||||||
|
minutes = "0" + minutes;
|
||||||
|
}
|
||||||
|
if (seconds < 10) {
|
||||||
|
seconds = "0" + seconds;
|
||||||
|
}
|
||||||
|
//拼接格式化当前时间
|
||||||
|
this.times = year + "-" + month + "-" + day + " " + hours + ":" + minutes + ":" + seconds;
|
||||||
|
},
|
||||||
windowWidth(value) {
|
windowWidth(value) {
|
||||||
this.clientWidth = value
|
this.clientWidth = value
|
||||||
this.beilv2 = this.clientWidth / 1920
|
this.beilv2 = this.clientWidth / 1920
|
||||||
@@ -1010,7 +1037,18 @@ export default {
|
|||||||
background-size: 100% 100%;
|
background-size: 100% 100%;
|
||||||
color: #00fff0;
|
color: #00fff0;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
.unit {
|
||||||
|
position: absolute;
|
||||||
|
left: 260px;
|
||||||
|
top: 25px;
|
||||||
|
font-size: 20px;
|
||||||
|
}
|
||||||
|
.time {
|
||||||
|
position: absolute;
|
||||||
|
left: 1360px;
|
||||||
|
top: 25px;
|
||||||
|
font-size: 20px;
|
||||||
|
}
|
||||||
.title-button {
|
.title-button {
|
||||||
color: #00fff0;
|
color: #00fff0;
|
||||||
font-size: 20px;
|
font-size: 20px;
|
||||||
|
|||||||
@@ -2,21 +2,20 @@
|
|||||||
* @Author: zwq
|
* @Author: zwq
|
||||||
* @Date: 2021-07-19 15:18:30
|
* @Date: 2021-07-19 15:18:30
|
||||||
* @LastEditors: zhp
|
* @LastEditors: zhp
|
||||||
* @LastEditTime: 2023-11-23 11:11:35
|
* @LastEditTime: 2023-12-19 14:25:07
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
<template>
|
<template>
|
||||||
<div id="container" ref="container" class="visual-container" :style="styles">
|
<div id="container" ref="container" class="visual-container" :style="styles">
|
||||||
<el-row
|
<el-row class="container-title" :style="{
|
||||||
class="container-title"
|
|
||||||
:style="{
|
|
||||||
height: 88 + 'px',
|
height: 88 + 'px',
|
||||||
lineHeight: 88 + 'px',
|
lineHeight: 88 + 'px',
|
||||||
fontSize: 31 + 'px'
|
fontSize: 31 + 'px'
|
||||||
}"
|
}">
|
||||||
>
|
|
||||||
<img src="../../assets/img/logo.png" style="width:1.1em;position:relative;top:.4em" alt="">
|
<img src="../../assets/img/logo.png" style="width:1.1em;position:relative;top:.4em" alt="">
|
||||||
许昌安彩深加工看板
|
许昌安彩深加工看板
|
||||||
|
<h3 class="unit">单位:河南汇融科技服务有限公司</h3>
|
||||||
|
<h3 class="time">{{ times }}</h3>
|
||||||
<!-- <el-button
|
<!-- <el-button
|
||||||
type="text"
|
type="text"
|
||||||
class="title-button"
|
class="title-button"
|
||||||
@@ -31,13 +30,8 @@
|
|||||||
<el-row :style="{ padding: '0 ' + 9 + 'px' }" :gutter="15" type="flex" class="flex-1">
|
<el-row :style="{ padding: '0 ' + 9 + 'px' }" :gutter="15" type="flex" class="flex-1">
|
||||||
<el-col :style="{ margin: 8 + 'px' + ' 0' }" :span="8">
|
<el-col :style="{ margin: 8 + 'px' + ' 0' }" :span="8">
|
||||||
<base-container :title="'设备报警'" :title-icon="'5_1'">
|
<base-container :title="'设备报警'" :title-icon="'5_1'">
|
||||||
<base-table1
|
<base-table1 :page="1" :limit="9" :show-index="false" :table-config="qualityYearTableProps"
|
||||||
:page="1"
|
:table-data="qualityYearList" />
|
||||||
:limit="9"
|
|
||||||
:show-index="false"
|
|
||||||
:table-config="qualityYearTableProps"
|
|
||||||
:table-data="qualityYearList"
|
|
||||||
/>
|
|
||||||
</base-container>
|
</base-container>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
||||||
@@ -48,14 +42,8 @@
|
|||||||
<el-option key="1" value="钢1线" label="钢1线" default />
|
<el-option key="1" value="钢1线" label="钢1线" default />
|
||||||
</el-select>
|
</el-select>
|
||||||
</div>
|
</div>
|
||||||
<base-table1
|
<base-table1 :page="1" :limit="9" :show-index="false" :table-config="qualityMonthTableProps"
|
||||||
:page="1"
|
:table-data="qualityMonthList" />
|
||||||
:limit="9"
|
|
||||||
:show-index="false"
|
|
||||||
|
|
||||||
:table-config="qualityMonthTableProps"
|
|
||||||
:table-data="qualityMonthList"
|
|
||||||
/>
|
|
||||||
</base-container>
|
</base-container>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
||||||
@@ -116,13 +104,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<el-row :gutter="9">
|
<el-row :gutter="9">
|
||||||
<el-col :style="{ margin: 8 + 'px' + ' 0' }" :span="24">
|
<el-col :style="{ margin: 8 + 'px' + ' 0' }" :span="24">
|
||||||
<linear-bar-chart
|
<linear-bar-chart :name-list="cxNameList" :data-list="cxDataList" :height="359" :show-legend="true" />
|
||||||
:name-list="cxNameList"
|
|
||||||
:data-list="cxDataList"
|
|
||||||
:height="359"
|
|
||||||
|
|
||||||
:show-legend="true"
|
|
||||||
/>
|
|
||||||
</el-col>
|
</el-col>
|
||||||
<!-- <el-col :style="{ margin: 8 + 'px' + ' 0' }" :span="12">
|
<!-- <el-col :style="{ margin: 8 + 'px' + ' 0' }" :span="12">
|
||||||
<base-table3
|
<base-table3
|
||||||
@@ -142,14 +124,8 @@
|
|||||||
<top-radio-group />
|
<top-radio-group />
|
||||||
</div>
|
</div>
|
||||||
<!-- 像下面这样表格里的limit值,也许可以用js动态计算出来 -->
|
<!-- 像下面这样表格里的limit值,也许可以用js动态计算出来 -->
|
||||||
<double-y-chart
|
<double-y-chart :id=" 'doubleYChart' " :name-list="cxNameList" :data-list="cxDataList" :height="359"
|
||||||
:id=" 'doubleYChart' "
|
:show-legend="true" />
|
||||||
:name-list="cxNameList"
|
|
||||||
:data-list="cxDataList"
|
|
||||||
:height="359"
|
|
||||||
|
|
||||||
:show-legend="true"
|
|
||||||
/>
|
|
||||||
</base-container>
|
</base-container>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
@@ -685,6 +661,7 @@ export default {
|
|||||||
beilv2: 1,
|
beilv2: 1,
|
||||||
beilv: 1,
|
beilv: 1,
|
||||||
value: 100,
|
value: 100,
|
||||||
|
times:'',
|
||||||
// offsetWidth: null,
|
// offsetWidth: null,
|
||||||
qualityYearTableProps,
|
qualityYearTableProps,
|
||||||
cxNameList,
|
cxNameList,
|
||||||
@@ -742,6 +719,7 @@ export default {
|
|||||||
this.init()
|
this.init()
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
this.getTimes()
|
||||||
this.windowWidth(document.documentElement.clientWidth)
|
this.windowWidth(document.documentElement.clientWidth)
|
||||||
// const _this = this;
|
// const _this = this;
|
||||||
// window.onresize = () => {
|
// window.onresize = () => {
|
||||||
@@ -768,6 +746,30 @@ export default {
|
|||||||
// removeEventListener('resize', resizeFun)
|
// removeEventListener('resize', resizeFun)
|
||||||
// },
|
// },
|
||||||
methods: {
|
methods: {
|
||||||
|
getTimes() {
|
||||||
|
setInterval(this.getTimesInterval, 1000);
|
||||||
|
},
|
||||||
|
getTimesInterval: function () {
|
||||||
|
let _this = this;
|
||||||
|
let year = new Date().getFullYear(); //获取当前时间的年份
|
||||||
|
let month = new Date().getMonth() + 1; //获取当前时间的月份
|
||||||
|
let day = new Date().getDate(); //获取当前时间的天数
|
||||||
|
let hours = new Date().getHours(); //获取当前时间的小时
|
||||||
|
let minutes = new Date().getMinutes(); //获取当前时间的分数
|
||||||
|
let seconds = new Date().getSeconds(); //获取当前时间的秒数
|
||||||
|
//当小于 10 的是时候,在前面加 0
|
||||||
|
if (hours < 10) {
|
||||||
|
hours = "0" + hours;
|
||||||
|
}
|
||||||
|
if (minutes < 10) {
|
||||||
|
minutes = "0" + minutes;
|
||||||
|
}
|
||||||
|
if (seconds < 10) {
|
||||||
|
seconds = "0" + seconds;
|
||||||
|
}
|
||||||
|
//拼接格式化当前时间
|
||||||
|
this.times = year + "-" + month + "-" + day + " " + hours + ":" + minutes + ":" + seconds;
|
||||||
|
},
|
||||||
windowWidth(value) {
|
windowWidth(value) {
|
||||||
this.clientWidth = value
|
this.clientWidth = value
|
||||||
this.beilv2 = this.clientWidth / 1920
|
this.beilv2 = this.clientWidth / 1920
|
||||||
@@ -838,7 +840,19 @@ export default {
|
|||||||
background-size: 100% 100%;
|
background-size: 100% 100%;
|
||||||
color: #00fff0;
|
color: #00fff0;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
.unit {
|
||||||
|
position: absolute;
|
||||||
|
left: 260px;
|
||||||
|
top: 25px;
|
||||||
|
font-size: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.time {
|
||||||
|
position: absolute;
|
||||||
|
left: 1360px;
|
||||||
|
top: 25px;
|
||||||
|
font-size: 20px;
|
||||||
|
}
|
||||||
.title-button {
|
.title-button {
|
||||||
color: #00fff0;
|
color: #00fff0;
|
||||||
font-size: 20px;
|
font-size: 20px;
|
||||||
|
|||||||
@@ -90,7 +90,7 @@ export default {
|
|||||||
{
|
{
|
||||||
type: 'datePicker',
|
type: 'datePicker',
|
||||||
label: '时间段',
|
label: '时间段',
|
||||||
dateType: 'datetimerange',
|
dateType: 'daterange',
|
||||||
format: 'yyyy-MM-dd',
|
format: 'yyyy-MM-dd',
|
||||||
valueFormat: 'yyyy-MM-dd HH:mm:ss',
|
valueFormat: 'yyyy-MM-dd HH:mm:ss',
|
||||||
rangeSeparator: '-',
|
rangeSeparator: '-',
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
* @Author: zwq
|
* @Author: zwq
|
||||||
* @Date: 2021-11-18 14:16:25
|
* @Date: 2021-11-18 14:16:25
|
||||||
* @LastEditors: DY
|
* @LastEditors: DY
|
||||||
* @LastEditTime: 2023-11-22 10:27:50
|
* @LastEditTime: 2023-12-12 16:04:44
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
<template>
|
<template>
|
||||||
@@ -15,25 +15,26 @@
|
|||||||
<el-row :gutter="20">
|
<el-row :gutter="20">
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="客户编号" prop="code">
|
<el-form-item label="客户编号" prop="code">
|
||||||
<el-input v-model="dataForm.code" clearable placeholder="请输入客户编号" />
|
<el-input v-model="dataForm.code" :disabled="isdetail" clearable placeholder="请输入客户编号" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="客户名称" prop="name">
|
<el-form-item label="客户名称" prop="name">
|
||||||
<el-input v-model="dataForm.name" clearable placeholder="请输入客户名称" />
|
<el-input v-model="dataForm.name" :disabled="isdetail" clearable placeholder="请输入客户名称" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row :gutter="20">
|
<el-row :gutter="20">
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="联系人" prop="contact">
|
<el-form-item label="联系人" prop="contact">
|
||||||
<el-input v-model="dataForm.contact" clearable placeholder="请输入联系人" />
|
<el-input v-model="dataForm.contact" :disabled="isdetail" clearable placeholder="请输入联系人" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="联系电话" prop="telephone">
|
<el-form-item label="联系电话" prop="telephone">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="dataForm.telephone"
|
v-model="dataForm.telephone"
|
||||||
|
:disabled="isdetail"
|
||||||
maxlength="11"
|
maxlength="11"
|
||||||
placeholder="请输入联系电话" />
|
placeholder="请输入联系电话" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@@ -42,22 +43,34 @@
|
|||||||
<el-form-item label="地址" prop="address">
|
<el-form-item label="地址" prop="address">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="dataForm.address"
|
v-model="dataForm.address"
|
||||||
|
:disabled="isdetail"
|
||||||
placeholder="请输入地址" />
|
placeholder="请输入地址" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="备注" prop="remark">
|
<el-form-item label="备注" prop="remark">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="dataForm.remark"
|
v-model="dataForm.remark"
|
||||||
|
:disabled="isdetail"
|
||||||
placeholder="请输入备注" />
|
placeholder="请输入备注" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item label="特殊要求" prop="specialRequirements">
|
||||||
|
<el-input
|
||||||
|
type="textarea"
|
||||||
|
v-model="dataForm.specialRequirements"
|
||||||
|
:disabled="isdetail"
|
||||||
|
placeholder="请输入备注" />
|
||||||
|
<imageUpload v-model="files" :disabled="isdetail" :limit="5"/>
|
||||||
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import basicAdd from '../../core/mixins/basic-add';
|
import basicAdd from '../../core/mixins/basic-add';
|
||||||
import { createCustomer, updateCustomer, getCustomer, getCode } from "@/api/base/coreCustomer";
|
import { createCustomer, updateCustomer, getCustomer, getCode } from "@/api/base/coreCustomer";
|
||||||
|
import ImageUpload from '@/components/ImageUpload';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
mixins: [basicAdd],
|
mixins: [basicAdd],
|
||||||
|
components: { ImageUpload },
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
urlOptions: {
|
urlOptions: {
|
||||||
@@ -67,6 +80,8 @@ export default {
|
|||||||
updateURL: updateCustomer,
|
updateURL: updateCustomer,
|
||||||
infoURL: getCustomer
|
infoURL: getCustomer
|
||||||
},
|
},
|
||||||
|
files: [],
|
||||||
|
isdetail: false,
|
||||||
dataForm: {
|
dataForm: {
|
||||||
id: undefined,
|
id: undefined,
|
||||||
code: undefined,
|
code: undefined,
|
||||||
@@ -74,7 +89,9 @@ export default {
|
|||||||
telephone: undefined,
|
telephone: undefined,
|
||||||
contact: undefined,
|
contact: undefined,
|
||||||
address: undefined,
|
address: undefined,
|
||||||
remark: undefined
|
remark: undefined,
|
||||||
|
specialRequirements: undefined,
|
||||||
|
files: []
|
||||||
},
|
},
|
||||||
dataRule: {
|
dataRule: {
|
||||||
code: [{ required: true, message: "客户编号不能为空", trigger: "blur" }],
|
code: [{ required: true, message: "客户编号不能为空", trigger: "blur" }],
|
||||||
@@ -100,6 +117,66 @@ export default {
|
|||||||
};
|
};
|
||||||
},
|
},
|
||||||
mounted() {},
|
mounted() {},
|
||||||
methods: {}
|
methods: {
|
||||||
|
init(id, isdetail) {
|
||||||
|
this.dataForm.id = id || "";
|
||||||
|
this.isdetail = isdetail || false;
|
||||||
|
this.visible = true;
|
||||||
|
if (this.urlOptions.getOption) {
|
||||||
|
this.getArr()
|
||||||
|
}
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$refs["dataForm"].resetFields();
|
||||||
|
if (this.dataForm.id) {
|
||||||
|
this.urlOptions.infoURL(id).then(response => {
|
||||||
|
this.dataForm = response.data;
|
||||||
|
if (this.setData) {
|
||||||
|
this.setDataForm()
|
||||||
|
}
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
if (this.urlOptions.isGetCode) {
|
||||||
|
this.getCode()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 表单提交
|
||||||
|
dataFormSubmit() {
|
||||||
|
console.log('122', this.files)
|
||||||
|
this.$refs["dataForm"].validate((valid) => {
|
||||||
|
if (!valid) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
this.dataForm.files = []
|
||||||
|
if (this.files.length > 0) {
|
||||||
|
this.files.forEach(item => {
|
||||||
|
const temp = {
|
||||||
|
fileType: 1,
|
||||||
|
fileUrl: item
|
||||||
|
}
|
||||||
|
this.dataForm.files.push(temp)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 修改的提交
|
||||||
|
if (this.dataForm.id) {
|
||||||
|
this.urlOptions.updateURL(this.dataForm).then(response => {
|
||||||
|
this.$modal.msgSuccess("修改成功");
|
||||||
|
this.visible = false;
|
||||||
|
this.$emit("refreshDataList");
|
||||||
|
});
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
// 添加的提交
|
||||||
|
this.urlOptions.createURL(this.dataForm).then(response => {
|
||||||
|
this.$modal.msgSuccess("新增成功");
|
||||||
|
this.visible = false;
|
||||||
|
this.$emit("refreshDataList");
|
||||||
|
});
|
||||||
|
});
|
||||||
|
},
|
||||||
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -88,6 +88,12 @@ export default {
|
|||||||
},
|
},
|
||||||
tableProps,
|
tableProps,
|
||||||
tableBtn: [
|
tableBtn: [
|
||||||
|
this.$auth.hasPermi(`base:core-customer:detail`)
|
||||||
|
? {
|
||||||
|
type: 'detail',
|
||||||
|
btnName: '详情',
|
||||||
|
}
|
||||||
|
: undefined,
|
||||||
this.$auth.hasPermi(`base:core-customer:update`)
|
this.$auth.hasPermi(`base:core-customer:update`)
|
||||||
? {
|
? {
|
||||||
type: 'edit',
|
type: 'edit',
|
||||||
@@ -171,6 +177,13 @@ export default {
|
|||||||
console.log(val);
|
console.log(val);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
otherMethods(val) {
|
||||||
|
this.addOrUpdateVisible = true;
|
||||||
|
this.addOrEditTitle = "详情";
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$refs.addOrUpdate.init(val.data.id, true);
|
||||||
|
});
|
||||||
|
}
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -248,6 +248,9 @@ export default {
|
|||||||
label: '设备编码',
|
label: '设备编码',
|
||||||
prop: 'code',
|
prop: 'code',
|
||||||
url: '/base/core-equipment/getCode',
|
url: '/base/core-equipment/getCode',
|
||||||
|
rules: [
|
||||||
|
{ required: true, message: '设备编码不能为空', trigger: 'blur' },
|
||||||
|
],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
input: true,
|
input: true,
|
||||||
|
|||||||
65
src/views/base/coreHotMaterial/SmallTitle.vue
Normal file
@@ -0,0 +1,65 @@
|
|||||||
|
<!--
|
||||||
|
* @Author: zwq
|
||||||
|
* @Date: 2023-08-01 15:27:31
|
||||||
|
* @LastEditors: zwq
|
||||||
|
* @LastEditTime: 2023-08-01 16:25:54
|
||||||
|
* @Description:
|
||||||
|
-->
|
||||||
|
<template>
|
||||||
|
<div :class="[className, { 'p-0': noPadding }]">
|
||||||
|
<slot />
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
props: {
|
||||||
|
size: {
|
||||||
|
// 取值范围: xl lg md sm
|
||||||
|
type: String,
|
||||||
|
default: 'de',
|
||||||
|
validator: function (val) {
|
||||||
|
return ['xl', 'lg', 'de', 'md', 'sm'].indexOf(val) !== -1;
|
||||||
|
},
|
||||||
|
},
|
||||||
|
noPadding: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
className: function () {
|
||||||
|
return `${this.size}-title`;
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
$pxls: (xl, 28px) (lg, 24px) (de, 20px) (md, 18px) (sm, 16px);
|
||||||
|
$mgr: 8px;
|
||||||
|
@each $size, $height in $pxls {
|
||||||
|
.#{$size}-title {
|
||||||
|
font-size: 18px;
|
||||||
|
line-height: $height;
|
||||||
|
color: #000;
|
||||||
|
font-weight: 500;
|
||||||
|
font-family: '微软雅黑', 'Microsoft YaHei', Arial, Helvetica, sans-serif;
|
||||||
|
|
||||||
|
&::before {
|
||||||
|
content: '';
|
||||||
|
display: inline-block;
|
||||||
|
vertical-align: top;
|
||||||
|
width: 4px;
|
||||||
|
height: $height + 2px;
|
||||||
|
border-radius: 1px;
|
||||||
|
margin-right: $mgr;
|
||||||
|
background-color: #0b58ff;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.p-0 {
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
* @Author: zwq
|
* @Author: zwq
|
||||||
* @Date: 2021-11-18 14:16:25
|
* @Date: 2021-11-18 14:16:25
|
||||||
* @LastEditors: DY
|
* @LastEditors: DY
|
||||||
* @LastEditTime: 2023-11-27 20:12:00
|
* @LastEditTime: 2023-12-14 13:52:42
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
<template>
|
<template>
|
||||||
@@ -15,19 +15,19 @@
|
|||||||
<el-row :gutter="20">
|
<el-row :gutter="20">
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="原料名称" prop="name">
|
<el-form-item label="原料名称" prop="name">
|
||||||
<el-input v-model="dataForm.name" clearable placeholder="请输入原料名称" />
|
<el-input v-model="dataForm.name" :disabled="isdetail" clearable placeholder="请输入原料名称" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="原料编号" prop="code">
|
<el-form-item label="原料编号" prop="code">
|
||||||
<el-input v-model="dataForm.code" clearable placeholder="请输入原料编号" />
|
<el-input v-model="dataForm.code" :disabled="isdetail" clearable placeholder="请输入原料编号" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row :gutter="20">
|
<el-row :gutter="20">
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="每日消耗量" prop="dailyCost">
|
<el-form-item label="每日消耗量" prop="dailyCost">
|
||||||
<el-input-number v-model="dataForm.dailyCost" controls-position="right" clearable placeholder="请输入每日消耗量" style="width: 100%" />
|
<el-input-number v-model="dataForm.dailyCost" :disabled="isdetail" :min="0" controls-position="right" clearable placeholder="请输入每日消耗量" style="width: 100%" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
@@ -35,6 +35,7 @@
|
|||||||
<el-select
|
<el-select
|
||||||
v-model="dataForm.unit"
|
v-model="dataForm.unit"
|
||||||
filterable
|
filterable
|
||||||
|
:disabled="isdetail"
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
placeholder="请选择单位">
|
placeholder="请选择单位">
|
||||||
<el-option
|
<el-option
|
||||||
@@ -47,17 +48,58 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-form-item label="备注" prop="remark">
|
<el-form-item label="备注" prop="remark">
|
||||||
<el-input v-model="dataForm.remark" clearable placeholder="请输入备注" />
|
<el-input v-model="dataForm.remark" :disabled="isdetail" clearable placeholder="请输入备注" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
|
<small-title
|
||||||
|
:size="'sm'"
|
||||||
|
style="margin: 16px 0; padding-left: 8px; font-size: 14px"
|
||||||
|
:no-padding="true">
|
||||||
|
质量信息
|
||||||
|
</small-title>
|
||||||
|
<div v-if="!isdetail" class="action_btn">
|
||||||
|
<template>
|
||||||
|
<span style="display: inline-block;">
|
||||||
|
<el-button type="text" @click="addNew()" icon="el-icon-plus">新增</el-button>
|
||||||
|
</span>
|
||||||
|
</template>
|
||||||
|
</div>
|
||||||
|
<el-row :gutter="20" v-for="(item, index) in test" :key="index">
|
||||||
|
<el-col :span="9">
|
||||||
|
<el-form-item label="成分" label-width="50px" prop="name1">
|
||||||
|
<el-input v-model="item.name" :disabled="isdetail" :min="0" controls-position="right" clearable placeholder="请输入成分" style="width: 100%" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="15">
|
||||||
|
<el-form-item label="标准含量" prop="unit1">
|
||||||
|
<el-row :gutter="5">
|
||||||
|
<el-col :span="1">
|
||||||
|
<el-tooltip content="如果标准含量不是一个范围,而是一个值,在最大值、最小值中填入相同数字即可。" placement="top">
|
||||||
|
<span style="margin-left: -15px"><i class="el-icon-question"></i></span>
|
||||||
|
</el-tooltip>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="11">
|
||||||
|
<el-input-number v-model="item.minValue" :disabled="isdetail" :min="0" controls-position="right" clearable placeholder="最小值" style="width: 100%" />
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="11">
|
||||||
|
<el-input-number v-model="item.maxValue" :disabled="isdetail" :min="0" controls-position="right" clearable placeholder="最大值" style="width: 100%" />
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
</el-form>
|
</el-form>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import basicAdd from '../../core/mixins/basic-add';
|
import basicAdd from '../../core/mixins/basic-add';
|
||||||
import { createHotMaterial, updateHotMaterial, getHotMaterial, getCode } from "@/api/base/coreHotMaterial";
|
import { createHotMaterial, updateHotMaterial, getHotMaterial, getCode, createHotMaterialCheck, updateHotMaterialCheck, getHotCheckList } from "@/api/base/coreHotMaterial";
|
||||||
import { getDictDatas} from "@/utils/dict";
|
import { getDictDatas} from "@/utils/dict";
|
||||||
|
import SmallTitle from './SmallTitle';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
components: { SmallTitle },
|
||||||
mixins: [basicAdd],
|
mixins: [basicAdd],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@@ -76,8 +118,10 @@ export default {
|
|||||||
dailyCost: undefined,
|
dailyCost: undefined,
|
||||||
remark: undefined
|
remark: undefined
|
||||||
},
|
},
|
||||||
|
test: [],
|
||||||
departmentlList: [],
|
departmentlList: [],
|
||||||
menuOptions: [],
|
menuOptions: [],
|
||||||
|
isdetail: false,
|
||||||
dataRule: {
|
dataRule: {
|
||||||
code: [{ required: true, message: "原料编码不能为空", trigger: "blur" }],
|
code: [{ required: true, message: "原料编码不能为空", trigger: "blur" }],
|
||||||
name: [{ required: true, message: "原料名称不能为空", trigger: "blur" }]
|
name: [{ required: true, message: "原料名称不能为空", trigger: "blur" }]
|
||||||
@@ -85,6 +129,100 @@ export default {
|
|||||||
};
|
};
|
||||||
},
|
},
|
||||||
mounted() {},
|
mounted() {},
|
||||||
methods: {}
|
methods: {
|
||||||
|
init(id, isdetail) {
|
||||||
|
this.test = []
|
||||||
|
this.dataForm.id = id || "";
|
||||||
|
this.isdetail = isdetail || false;
|
||||||
|
this.visible = true;
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$refs["dataForm"].resetFields();
|
||||||
|
if (this.dataForm.id) {
|
||||||
|
this.urlOptions.infoURL(id).then(response => {
|
||||||
|
this.dataForm = response.data;
|
||||||
|
});
|
||||||
|
getHotCheckList({
|
||||||
|
materialId: this.dataForm.id
|
||||||
|
}).then(res => {
|
||||||
|
this.test = res.data
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
this.test = [
|
||||||
|
{
|
||||||
|
name: null,
|
||||||
|
minValue: undefined,
|
||||||
|
maxValue: undefined
|
||||||
|
}
|
||||||
|
]
|
||||||
|
if (this.urlOptions.isGetCode) {
|
||||||
|
this.getCode()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 表单提交
|
||||||
|
dataFormSubmit() {
|
||||||
|
this.$refs["dataForm"].validate((valid) => {
|
||||||
|
if (!valid) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
// 修改的提交
|
||||||
|
if (this.dataForm.id) {
|
||||||
|
this.urlOptions.updateURL(this.dataForm).then(response => {
|
||||||
|
if (this.test.length > 1 || this.test[0].name) {
|
||||||
|
this.test.forEach(check => {
|
||||||
|
check.hotMaterialId = this.dataForm.id
|
||||||
|
if (check.id) {
|
||||||
|
updateHotMaterialCheck(check).then(res => {
|
||||||
|
console.log(res)
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
createHotMaterialCheck(check).then(res1 => {
|
||||||
|
console.log(res1)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
this.$modal.msgSuccess("修改成功");
|
||||||
|
this.visible = false;
|
||||||
|
this.$emit("refreshDataList");
|
||||||
|
});
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
// 添加的提交
|
||||||
|
this.urlOptions.createURL(this.dataForm).then(response => {
|
||||||
|
if (this.test.length > 1 || this.test[0].name) {
|
||||||
|
this.test.forEach(check => {
|
||||||
|
check.hotMaterialId = response.data
|
||||||
|
createHotMaterialCheck(check).then(res => {
|
||||||
|
console.log(res)
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
this.$modal.msgSuccess("新增成功");
|
||||||
|
this.visible = false;
|
||||||
|
this.$emit("refreshDataList");
|
||||||
|
});
|
||||||
|
});
|
||||||
|
},
|
||||||
|
addNew() {
|
||||||
|
this.test.push({
|
||||||
|
name: null,
|
||||||
|
minValue: undefined,
|
||||||
|
maxValue: undefined
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.action_btn {
|
||||||
|
float: right;
|
||||||
|
margin: -40px 15px;
|
||||||
|
font-size: 14px;
|
||||||
|
}
|
||||||
|
.add {
|
||||||
|
color: #0b58ff;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|||||||
@@ -83,13 +83,19 @@ export default {
|
|||||||
},
|
},
|
||||||
tableProps,
|
tableProps,
|
||||||
tableBtn: [
|
tableBtn: [
|
||||||
this.$auth.hasPermi(`base:core-hot-material:update`)
|
this.$auth.hasPermi(`base:core-hot-material-check:detail`)
|
||||||
|
? {
|
||||||
|
type: 'detail',
|
||||||
|
btnName: '详情',
|
||||||
|
}
|
||||||
|
: undefined,
|
||||||
|
this.$auth.hasPermi(`base:core-hot-material-check:update`)
|
||||||
? {
|
? {
|
||||||
type: 'edit',
|
type: 'edit',
|
||||||
btnName: '编辑',
|
btnName: '编辑',
|
||||||
}
|
}
|
||||||
: undefined,
|
: undefined,
|
||||||
this.$auth.hasPermi(`base:core-hot-material:delete`)
|
this.$auth.hasPermi(`base:core-hot-material-check:delete`)
|
||||||
? {
|
? {
|
||||||
type: 'delete',
|
type: 'delete',
|
||||||
btnName: '删除',
|
btnName: '删除',
|
||||||
@@ -120,7 +126,7 @@ export default {
|
|||||||
type: 'separate',
|
type: 'separate',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: this.$auth.hasPermi('base:core-hot-material:create') ? 'button' : '',
|
type: this.$auth.hasPermi('base:core-hot-material-check:create') ? 'button' : '',
|
||||||
btnName: '新增',
|
btnName: '新增',
|
||||||
name: 'add',
|
name: 'add',
|
||||||
color: 'success',
|
color: 'success',
|
||||||
@@ -143,6 +149,14 @@ export default {
|
|||||||
// this.dataListLoading = false;
|
// this.dataListLoading = false;
|
||||||
// });
|
// });
|
||||||
// },
|
// },
|
||||||
|
otherMethods(val) {
|
||||||
|
// 详情
|
||||||
|
this.addOrUpdateVisible = true;
|
||||||
|
this.addOrEditTitle = "详情";
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$refs.addOrUpdate.init(val.data.id, true);
|
||||||
|
});
|
||||||
|
},
|
||||||
buttonClick(val) {
|
buttonClick(val) {
|
||||||
switch (val.btnName) {
|
switch (val.btnName) {
|
||||||
case 'search':
|
case 'search':
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
* @Author: zwq
|
* @Author: zwq
|
||||||
* @Date: 2021-11-18 14:16:25
|
* @Date: 2021-11-18 14:16:25
|
||||||
* @LastEditors: DY
|
* @LastEditors: DY
|
||||||
* @LastEditTime: 2023-11-27 20:07:09
|
* @LastEditTime: 2023-12-06 10:36:56
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
<template>
|
<template>
|
||||||
@@ -91,27 +91,30 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item label="单位平方数" prop="area">
|
<el-form-item label="单位平方数" prop="area">
|
||||||
<el-input-number v-model="dataForm.area" :precision="2" style="width: 100%" :disabled="isdetail" clearable placeholder="请输入单位平方数" />
|
<el-input-number v-model="dataForm.area" :precision="6" :min="0" style="width: 100%" :disabled="isdetail" clearable placeholder="请输入单位平方数" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row :gutter="20">
|
<el-row :gutter="20">
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item label="规格" prop="specifications">
|
<el-form-item label="规格" prop="specifications">
|
||||||
<el-input v-model="dataForm.specifications" :disabled="isdetail" clearable placeholder="请输入规格" />
|
<el-input v-model="dataForm.specifications" :disabled="isdetail" @blur="setArea" @clear="clearArea" clearable placeholder="请输入规格" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item label="产线生产单位用时(S)" prop="processTime">
|
<el-form-item label="产线生产单位用时(S)" prop="processTime">
|
||||||
<el-input v-model.number="dataForm.processTime" type="number" :disabled="isdetail" clearable placeholder="请输入产线生产单位用时" />
|
<el-input v-model.number="dataForm.processTime" :precision="4" :min="0" type="number" :disabled="isdetail" clearable placeholder="请输入产线生产单位用时" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item label="备注" prop="remark">
|
<el-form-item label="重量" prop="weight">
|
||||||
<el-input v-model="dataForm.remark" :disabled="isdetail" clearable placeholder="请输入备注" />
|
<el-input-number v-model="dataForm.weight" :precision="6" :min="0" style="width: 100%" :disabled="isdetail" clearable placeholder="请输入重量" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
<el-form-item label="备注" prop="remark">
|
||||||
|
<el-input v-model="dataForm.remark" :disabled="isdetail" clearable placeholder="请输入备注" />
|
||||||
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -240,7 +243,8 @@ export default {
|
|||||||
specifications: undefined,
|
specifications: undefined,
|
||||||
processTime: 0,
|
processTime: 0,
|
||||||
remark: undefined,
|
remark: undefined,
|
||||||
unit: undefined
|
unit: undefined,
|
||||||
|
weight: undefined
|
||||||
},
|
},
|
||||||
productAttrList: [],
|
productAttrList: [],
|
||||||
visible: false,
|
visible: false,
|
||||||
@@ -257,6 +261,24 @@ export default {
|
|||||||
},
|
},
|
||||||
mounted() {},
|
mounted() {},
|
||||||
methods: {
|
methods: {
|
||||||
|
clearArea() {
|
||||||
|
this.$set(this.dataForm, 'area', 0)
|
||||||
|
this.$set(this.dataForm, 'weight', 0)
|
||||||
|
},
|
||||||
|
setArea() {
|
||||||
|
if (this.dataForm.specifications) {
|
||||||
|
const height = Number(this.dataForm.specifications.slice(2,4))
|
||||||
|
const length = Number(this.dataForm.specifications.slice(4,8))
|
||||||
|
const width = Number(this.dataForm.specifications.slice(8))
|
||||||
|
// this.dataForm.area = length * width
|
||||||
|
// this.dataForm.weight = 2.5 * height * length * width
|
||||||
|
this.$set(this.dataForm, 'area', length * width)
|
||||||
|
this.$set(this.dataForm, 'weight', 2.5 * height * length * width)
|
||||||
|
} else {
|
||||||
|
this.dataForm.area = 0
|
||||||
|
this.dataForm.weight = 0
|
||||||
|
}
|
||||||
|
},
|
||||||
initData() {
|
initData() {
|
||||||
this.productAttrList.splice(0);
|
this.productAttrList.splice(0);
|
||||||
this.listQuery.total = 0;
|
this.listQuery.total = 0;
|
||||||
@@ -317,6 +339,10 @@ export default {
|
|||||||
// 获取产品详情
|
// 获取产品详情
|
||||||
this.urlOptions.infoURL(id).then(response => {
|
this.urlOptions.infoURL(id).then(response => {
|
||||||
this.dataForm = response.data
|
this.dataForm = response.data
|
||||||
|
// this.dataForm.area = response.data.area || 0
|
||||||
|
// this.dataForm.weight = response.data.weight || 0
|
||||||
|
// this.dataForm.specifications = response.data.specifications || undefined
|
||||||
|
console.log('11res112', this.dataForm.specifications, this.dataForm.weight, this.dataForm.area)
|
||||||
if (this.dataForm.unit !== undefined) {
|
if (this.dataForm.unit !== undefined) {
|
||||||
this.dataForm.unit = String(this.dataForm.unit)
|
this.dataForm.unit = String(this.dataForm.unit)
|
||||||
}
|
}
|
||||||
@@ -339,7 +365,7 @@ export default {
|
|||||||
goback() {
|
goback() {
|
||||||
this.$emit('refreshDataList');
|
this.$emit('refreshDataList');
|
||||||
this.visible = false;
|
this.visible = false;
|
||||||
// this.initData();
|
this.initData();
|
||||||
},
|
},
|
||||||
goEdit() {
|
goEdit() {
|
||||||
this.isdetail = false;
|
this.isdetail = false;
|
||||||
@@ -370,6 +396,7 @@ export default {
|
|||||||
this.urlOptions.createURL(this.dataForm).then(response => {
|
this.urlOptions.createURL(this.dataForm).then(response => {
|
||||||
this.$modal.msgSuccess("新增成功");
|
this.$modal.msgSuccess("新增成功");
|
||||||
this.idAttrShow = true
|
this.idAttrShow = true
|
||||||
|
this.dataForm.id = response.data
|
||||||
// this.visible = false;
|
// this.visible = false;
|
||||||
this.$emit("refreshDataList");
|
this.$emit("refreshDataList");
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
* @Author: zwq
|
* @Author: zwq
|
||||||
* @Date: 2021-11-18 14:16:25
|
* @Date: 2021-11-18 14:16:25
|
||||||
* @LastEditors: DY
|
* @LastEditors: DY
|
||||||
* @LastEditTime: 2023-11-23 18:45:15
|
* @LastEditTime: 2023-12-22 16:02:25
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
<template>
|
<template>
|
||||||
@@ -12,86 +12,153 @@
|
|||||||
:wrapper-closable="false"
|
:wrapper-closable="false"
|
||||||
class="drawer"
|
class="drawer"
|
||||||
size="50%"> -->
|
size="50%"> -->
|
||||||
<div class="app-container">
|
<div class="container">
|
||||||
<!-- <small-title slot="title" :no-padding="true">
|
<!-- <small-title slot="title" :no-padding="true">
|
||||||
{{ isdetail ? '详情' : !dataForm.id ? '新增' : '编辑' }}
|
{{ isdetail ? '详情' : !dataForm.id ? '新增' : '编辑' }}
|
||||||
</small-title> -->
|
</small-title> -->
|
||||||
<el-button style="float: right" type="primary" @click="goback()">返回</el-button>
|
|
||||||
<div v-show="workOrderButton.length">
|
<div v-show="workOrderButton.length">
|
||||||
<el-button v-for="(work, index) in workOrderButton" :key="index" type="primary" @click="init(work.id, true)">{{ work.name }}</el-button>
|
<el-button v-for="(work, index) in workOrderButton" :key="index" type="primary" @click="init(work.id, true)">{{ work.name }}</el-button>
|
||||||
</div>
|
</div>
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<div>
|
<div class="card">
|
||||||
<h1>工单编码:{{ dataForm.code }}</h1>
|
<div class="boxTitle">
|
||||||
|
<span class="blueTitle"></span>
|
||||||
|
<span>工单编码:{{ dataForm.code }}</span>
|
||||||
</div>
|
</div>
|
||||||
<small-title
|
<el-button style="float: right" type="primary" size="small" plain @click="goback()">
|
||||||
style="margin: 16px 0; padding-left: 8px"
|
<svg-icon icon-class="return"/>返回
|
||||||
:no-padding="true">
|
</el-button>
|
||||||
基本信息
|
|
||||||
</small-title>
|
|
||||||
<div class="formContent">
|
<div class="formContent">
|
||||||
<el-row :gutter="20">
|
<el-row :gutter="20">
|
||||||
<el-col :span="8">工单名称:{{ dataForm.name }}</el-col>
|
<el-col :span="3">
|
||||||
<el-col :span="8">工单来源:{{ dataForm.triggerOrigin === 1 ? 'MES' : dataForm.triggerOrigin === 2 ? 'ERP' : ''}}</el-col>
|
<div class="blodTip">工单名称</div>
|
||||||
<el-col :span="8">所属订单:
|
<div class="lightTip">{{ dataForm.name }}</div>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="3">
|
||||||
|
<div class="blodTip">工单来源</div>
|
||||||
|
<div class="lightTip">{{ dataForm.triggerOrigin === 1 ? 'MES' : dataForm.triggerOrigin === 2 ? 'ERP' : ''}}</div>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="3">
|
||||||
|
<div class="blodTip">所属订单</div>
|
||||||
|
<div class="lightTip">
|
||||||
<span v-for="(item, index) in orderList" :key="index" style="margin-right: 10px">{{ item.orderName }}</span>
|
<span v-for="(item, index) in orderList" :key="index" style="margin-right: 10px">{{ item.orderName }}</span>
|
||||||
|
</div>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="3">
|
||||||
|
<div class="blodTip">产品名称</div>
|
||||||
|
<div class="lightTip">{{ dataForm.productName }}</div>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="3">
|
||||||
|
<div class="blodTip">规 格</div>
|
||||||
|
<div class="lightTip">{{ dataForm.specifications }}</div>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="3">
|
||||||
|
<div class="blodTip">计划生产数量</div>
|
||||||
|
<div class="lightTip">{{ dataForm.planQuantity }}</div>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="3">
|
||||||
|
<div class="blodTip">预计用时(小时)</div>
|
||||||
|
<div class="lightTip">{{ dataForm.remainingTime }}</div>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="3">
|
||||||
|
<div class="blodTip">计划投入数量</div>
|
||||||
|
<div class="lightTip">{{ dataForm.planAssignQuantity }}</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row :gutter="20">
|
<el-row :gutter="20">
|
||||||
<el-col :span="8">产品名称:{{ dataForm.productName }}</el-col>
|
<el-col :span="3">
|
||||||
<el-col :span="8">规 格:{{ dataForm.specifications }}</el-col>
|
<div class="blodTip">优先级</div>
|
||||||
<el-col :span="8">计划生产数量:{{ dataForm.planQuantity }}</el-col>
|
<div class="lightTip">{{ fitlerP(dataForm.priority) }}</div>
|
||||||
</el-row>
|
</el-col>
|
||||||
<el-row :gutter="20">
|
<el-col :span="3">
|
||||||
<el-col :span="8">预计用时(小时):{{ dataForm.remainingTime }}</el-col>
|
<div class="blodTip">负责人</div>
|
||||||
<el-col :span="8">计划投入数量:{{ dataForm.planAssignQuantity }}</el-col>
|
<div class="lightTip">{{ dataForm.workers }}</div>
|
||||||
<el-col :span="8">优先级:{{ fitlerP(dataForm.priority) }}</el-col>
|
</el-col>
|
||||||
</el-row>
|
<el-col :span="3">
|
||||||
<el-row :gutter="20">
|
<div class="blodTip">关联产线</div>
|
||||||
<el-col :span="8">负责人:{{ dataForm.workers }}</el-col>
|
<div class="lightTip">
|
||||||
<el-col :span="8">关联产线:
|
|
||||||
<span v-for="(item, index) in dataForm.productLineNames" :key="index" style="margin-right: 10px">{{ item }}</span>
|
<span v-for="(item, index) in dataForm.productLineNames" :key="index" style="margin-right: 10px">{{ item }}</span>
|
||||||
|
</div>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="3">
|
||||||
|
<div class="blodTip">物料计算方式</div>
|
||||||
|
<div class="lightTip">{{ dataForm.materialMethod === 1 ? '产品基础' : dataForm.materialMethod === 2 ? '工艺扩展' : '' }}</div>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="3">
|
||||||
|
<div class="blodTip">关联工艺</div>
|
||||||
|
<div class="lightTip">{{ dataForm.processFlowName }}</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8">物料计算方式:{{ dataForm.materialMethod === 1 ? '产品基础' : dataForm.materialMethod === 2 ? '工艺扩展' : '' }}</el-col>
|
|
||||||
</el-row>
|
|
||||||
<el-row :gutter="20">
|
|
||||||
<el-col :span="8">关联工艺:{{ dataForm.processFlowName }}</el-col>
|
|
||||||
</el-row>
|
</el-row>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<small-title
|
<div class="card">
|
||||||
|
<!-- <small-title
|
||||||
style="margin: 16px 0; padding-left: 8px"
|
style="margin: 16px 0; padding-left: 8px"
|
||||||
:no-padding="true">
|
:no-padding="true">
|
||||||
生产信息
|
生产信息
|
||||||
</small-title>
|
</small-title> -->
|
||||||
|
<div class="boxTitle">
|
||||||
|
<span class="blueTitle"></span>
|
||||||
|
<span>生产信息</span>
|
||||||
|
</div>
|
||||||
<div class="formContent">
|
<div class="formContent">
|
||||||
<el-row :gutter="20">
|
<el-row :gutter="20">
|
||||||
<el-col :span="8">工单创建时间:{{ parseTime(dataForm.createTime) }}</el-col>
|
<el-col :span="3">
|
||||||
<el-col :span="8">计划开始时间:{{ parseTime(dataForm.planStartTime) }}</el-col>
|
<div class="blodTip">工单创建时间</div>
|
||||||
<el-col :span="8">计划完成时间:{{ parseTime(dataForm.planFinishTime) }}</el-col>
|
<div class="lightTip">{{ parseTime(dataForm.createTime) }}</div>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="3">
|
||||||
|
<div class="blodTip">计划开始时间</div>
|
||||||
|
<div class="lightTip">{{ parseTime(dataForm.planStartTime) }}</div>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="3">
|
||||||
|
<div class="blodTip">计划完成时间</div>
|
||||||
|
<div class="lightTip">{{ parseTime(dataForm.planFinishTime) }}</div>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="3">
|
||||||
|
<div class="blodTip">预计结束时间</div>
|
||||||
|
<div class="lightTip">{{ parseTime(dataForm.computeFinishTime) }}</div>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="3">
|
||||||
|
<div class="blodTip">实际开始时间</div>
|
||||||
|
<div class="lightTip">{{ parseTime(dataForm.startProduceTime) }}</div>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="3">
|
||||||
|
<div class="blodTip">实际完成时间</div>
|
||||||
|
<div class="lightTip">{{ parseTime(dataForm.finishProduceTime) }}</div>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="3">
|
||||||
|
<div class="blodTip">工单状态</div>
|
||||||
|
<div class="lightTip">{{ fitlerS(dataForm.status) }}</div>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="3">
|
||||||
|
<div class="blodTip">实际投入数量</div>
|
||||||
|
<div class="lightTip">{{ dataForm.assignQuantity }}</div>
|
||||||
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row :gutter="20">
|
<el-row :gutter="20">
|
||||||
<el-col :span="8">预计结束时间:{{ parseTime(dataForm.computeFinishTime) }}</el-col>
|
<el-col :span="3">
|
||||||
<el-col :span="8">实际开始时间:{{ parseTime(dataForm.startProduceTime) }}</el-col>
|
<div class="blodTip">实际生产数量</div>
|
||||||
<el-col :span="8">实际完成时间:{{ parseTime(dataForm.finishProduceTime) }}</el-col>
|
<div class="lightTip">{{ dataForm.actualQuantity }}</div>
|
||||||
</el-row>
|
</el-col>
|
||||||
<el-row :gutter="20">
|
<el-col :span="3">
|
||||||
<el-col :span="8">工单状态:{{ fitlerS(dataForm.status) }}</el-col>
|
<div class="blodTip">废片数量</div>
|
||||||
<el-col :span="8">实际投入数量:{{ dataForm.assignQuantity }}</el-col>
|
<div class="lightTip">{{ dataForm.nokQuantity }}</div>
|
||||||
<el-col :span="8">实际生产数量:{{ dataForm.actualQuantity }}</el-col>
|
</el-col>
|
||||||
</el-row>
|
<el-col :span="3">
|
||||||
<el-row :gutter="20">
|
<div class="blodTip">检测瑕疵数</div>
|
||||||
<el-col :span="8">废片数量:{{ dataForm.nokQuantity }}</el-col>
|
<div class="lightTip">{{ }}</div>
|
||||||
<el-col :span="8">检测瑕疵数:{{ }}</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="attr-list">
|
<div class="card" style="padding-bottom: 16px; margin-bottom: 10px">
|
||||||
<small-title
|
<div class="boxTitle">
|
||||||
style="margin: 16px 0; padding-left: 8px"
|
<span class="blueTitle"></span>
|
||||||
:no-padding="true">
|
<span>订单相关信息</span>
|
||||||
订单相关信息
|
</div>
|
||||||
</small-title>
|
|
||||||
<base-table
|
<base-table
|
||||||
:table-props="tableProps"
|
:table-props="tableProps"
|
||||||
:page="listQuery.pageNo"
|
:page="listQuery.pageNo"
|
||||||
@@ -114,12 +181,11 @@
|
|||||||
@pagination="getList" /> -->
|
@pagination="getList" /> -->
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="attr-list">
|
<div class="card" style="padding-bottom: 16px;">
|
||||||
<small-title
|
<div class="boxTitle">
|
||||||
style="margin: 16px 0; padding-left: 8px"
|
<span class="blueTitle"></span>
|
||||||
:no-padding="true">
|
<span>预计用料信息</span>
|
||||||
预计用料信息
|
</div>
|
||||||
</small-title>
|
|
||||||
<base-table
|
<base-table
|
||||||
:table-props="tableProps1"
|
:table-props="tableProps1"
|
||||||
:page="listQuery1.pageNo"
|
:page="listQuery1.pageNo"
|
||||||
@@ -228,7 +294,8 @@ export default {
|
|||||||
visible: false,
|
visible: false,
|
||||||
isdetail: false,
|
isdetail: false,
|
||||||
workOrderButton: [],
|
workOrderButton: [],
|
||||||
processFlowList: []
|
processFlowList: [],
|
||||||
|
// tableH: this.tableHeight(510) / 2
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
@@ -391,59 +458,12 @@ export default {
|
|||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
<style scoped>
|
<style scoped>
|
||||||
.drawer >>> .el-drawer {
|
|
||||||
border-radius: 8px 0 0 8px;
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
}
|
|
||||||
|
|
||||||
.drawer >>> .el-form-item__label {
|
|
||||||
padding: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.drawer >>> .el-drawer__header {
|
|
||||||
margin: 0;
|
|
||||||
padding: 32px 32px 24px;
|
|
||||||
border-bottom: 1px solid #dcdfe6;
|
|
||||||
}
|
|
||||||
.drawer >>> .el-drawer__body {
|
|
||||||
flex: 1;
|
|
||||||
height: 1px;
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
}
|
|
||||||
|
|
||||||
.drawer >>> .content {
|
|
||||||
padding: 10px 24px;
|
|
||||||
flex: 1;
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
/* height: 100%; */
|
|
||||||
}
|
|
||||||
|
|
||||||
.drawer >>> .visual-part {
|
|
||||||
flex: 1 auto;
|
|
||||||
max-height: 76vh;
|
|
||||||
overflow: hidden;
|
|
||||||
overflow-y: scroll;
|
|
||||||
padding-right: 10px; /* 调整滚动条样式 */
|
|
||||||
}
|
|
||||||
|
|
||||||
.drawer >>> .el-form,
|
|
||||||
.drawer >>> .attr-list {
|
|
||||||
padding: 0 16px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.drawer-body__footer {
|
|
||||||
display: flex;
|
|
||||||
justify-content: flex-end;
|
|
||||||
padding: 18px;
|
|
||||||
}
|
|
||||||
.formContent {
|
.formContent {
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
line-height: 1.5;
|
line-height: 1.5;
|
||||||
margin-bottom: 10px;
|
margin-bottom: 10px;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
padding: 0 14px;
|
||||||
}
|
}
|
||||||
.action_btn {
|
.action_btn {
|
||||||
float: right;
|
float: right;
|
||||||
@@ -453,4 +473,43 @@ export default {
|
|||||||
.add {
|
.add {
|
||||||
color: #0b58ff;
|
color: #0b58ff;
|
||||||
}
|
}
|
||||||
|
.blodTip {
|
||||||
|
height: 16px;
|
||||||
|
font-size: 14px;
|
||||||
|
font-weight: 600;
|
||||||
|
color: rgba(0,0,0,0.85);
|
||||||
|
margin-bottom: 8px;
|
||||||
|
}
|
||||||
|
.lightTip {
|
||||||
|
height: 16px;
|
||||||
|
font-size: 14px;
|
||||||
|
font-weight: 400;
|
||||||
|
color: rgba(102,102,102,0.75);
|
||||||
|
margin-bottom: 12px;
|
||||||
|
}
|
||||||
|
.container {
|
||||||
|
background-color: rgb(242, 244, 249);
|
||||||
|
}
|
||||||
|
.card {
|
||||||
|
padding: 16px 16px 0 16px;
|
||||||
|
background-color: #fff;
|
||||||
|
border-radius: 9px;
|
||||||
|
}
|
||||||
|
.boxTitle {
|
||||||
|
display: inline-block;
|
||||||
|
font-size: 16px;
|
||||||
|
font-weight: 400;
|
||||||
|
color: #000000;
|
||||||
|
margin:0 10px 20px 0;
|
||||||
|
}
|
||||||
|
.blueTitle {
|
||||||
|
content: '';
|
||||||
|
display: inline-block;
|
||||||
|
width: 4px;
|
||||||
|
height: 18px;
|
||||||
|
background-color: #0B58FF;
|
||||||
|
border-radius: 1px;
|
||||||
|
margin-right: 8px;
|
||||||
|
vertical-align: bottom;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -140,12 +140,13 @@ export default {
|
|||||||
allocationVisible: false,
|
allocationVisible: false,
|
||||||
tableProps,
|
tableProps,
|
||||||
tableBtn: [
|
tableBtn: [
|
||||||
this.$auth.hasPermi(`base:core-work-order:material`)
|
// this.$auth.hasPermi(`base:core-work-order:material`)
|
||||||
? {
|
// ? {
|
||||||
type: 'material',
|
// type: 'material',
|
||||||
btnName: '原料信息',
|
// btnName: '原料信息',
|
||||||
}
|
// showTip: '预使用原料信息'
|
||||||
: undefined,
|
// }
|
||||||
|
// : undefined,
|
||||||
{
|
{
|
||||||
type: 'active',
|
type: 'active',
|
||||||
btnName: '激活',
|
btnName: '激活',
|
||||||
|
|||||||
@@ -268,17 +268,25 @@ export default {
|
|||||||
// })
|
// })
|
||||||
// } else {
|
// } else {
|
||||||
$('.hiprintEpContainer').empty()
|
$('.hiprintEpContainer').empty()
|
||||||
console.log(this.modelData);
|
console.log(this.modelData || {});
|
||||||
hiprint.PrintElementTypeManager.build('.hiprintEpContainer', provider.value)
|
hiprint.PrintElementTypeManager.build('.hiprintEpContainer', provider.value)
|
||||||
$('.hiprint-printTemplate').empty()
|
$('.hiprint-printTemplate').empty()
|
||||||
// const templates = this.$ls.get('KEY_TEMPLATES', {})
|
// const templates = this.$ls.get('KEY_TEMPLATES', {})
|
||||||
const template = provider.value
|
const template = provider.value
|
||||||
// console.log(template)
|
// console.log(template)
|
||||||
|
if (this.modelData) {
|
||||||
hiprintTemplate = new hiprint.PrintTemplate({
|
hiprintTemplate = new hiprint.PrintTemplate({
|
||||||
template: this.modelData != '' ? JSON.parse(this.modelData) : {},
|
template: JSON.parse(this.modelData),
|
||||||
settingContainer: '#PrintElementOptionSetting',
|
settingContainer: '#PrintElementOptionSetting',
|
||||||
paginationContainer: '.hiprint-printPagination'
|
paginationContainer: '.hiprint-printPagination'
|
||||||
})
|
})
|
||||||
|
} else {
|
||||||
|
hiprintTemplate = new hiprint.PrintTemplate({
|
||||||
|
template:{},
|
||||||
|
settingContainer: '#PrintElementOptionSetting',
|
||||||
|
paginationContainer: '.hiprint-printPagination'
|
||||||
|
})
|
||||||
|
}
|
||||||
// }
|
// }
|
||||||
hiprintTemplate.design('#hiprint-printTemplate')
|
hiprintTemplate.design('#hiprint-printTemplate')
|
||||||
// console.log(hiprintTemplate)
|
// console.log(hiprintTemplate)
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
* @Author: zwq
|
* @Author: zwq
|
||||||
* @Date: 2021-11-18 14:16:25
|
* @Date: 2021-11-18 14:16:25
|
||||||
* @LastEditors: DY
|
* @LastEditors: DY
|
||||||
* @LastEditTime: 2023-11-27 15:26:12
|
* @LastEditTime: 2023-12-04 15:10:11
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
<template>
|
<template>
|
||||||
@@ -377,6 +377,7 @@ export default {
|
|||||||
this.urlOptions.createURL(this.dataForm).then(response => {
|
this.urlOptions.createURL(this.dataForm).then(response => {
|
||||||
this.$modal.msgSuccess("新增成功");
|
this.$modal.msgSuccess("新增成功");
|
||||||
this.idAttrShow = true
|
this.idAttrShow = true
|
||||||
|
this.dataForm.id = response.data
|
||||||
this.$emit("refreshDataList");
|
this.$emit("refreshDataList");
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -1,18 +1,18 @@
|
|||||||
<!--
|
<!--
|
||||||
* @Author: zhp
|
* @Author: zhp
|
||||||
* @Date: 2023-10-17 16:50:19
|
* @Date: 2023-10-17 16:50:19
|
||||||
* @LastEditTime: 2023-10-30 10:47:13
|
* @LastEditTime: 2023-12-01 16:48:53
|
||||||
* @LastEditors: zhp
|
* @LastEditors: zhp
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
<template>
|
<template>
|
||||||
<el-dialog :visible.sync="visible" :show-close="false" :wrapper-closable="false" width="40%">
|
<el-dialog class="baseDialog" :visible.sync="visible" :show-close="false" :wrapper-closable="false" width="40%" show-close="true">
|
||||||
<small-title slot="title" :no-padding="true">
|
<small-title slot="title" :no-padding="true">
|
||||||
{{ !dataForm.id ? '新增' : '编辑' }}
|
{{ !dataForm.id ? '新增' : '编辑' }}
|
||||||
</small-title>
|
</small-title>
|
||||||
|
<!--
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<div class="visual-part">
|
<div class="visual-part"> -->
|
||||||
<el-form ref="dataForm" :model="dataForm" :rules="dataRule" label-width="100px"
|
<el-form ref="dataForm" :model="dataForm" :rules="dataRule" label-width="100px"
|
||||||
@keyup.enter.native="dataFormSubmit">
|
@keyup.enter.native="dataFormSubmit">
|
||||||
<el-row :gutter="20">
|
<el-row :gutter="20">
|
||||||
@@ -96,8 +96,8 @@
|
|||||||
:page-sizes="[5, 10, 15]"
|
:page-sizes="[5, 10, 15]"
|
||||||
@pagination="getList" />
|
@pagination="getList" />
|
||||||
</div> -->
|
</div> -->
|
||||||
</div>
|
<!-- </div> -->
|
||||||
</div>
|
<!-- </div> -->
|
||||||
|
|
||||||
<!-- <div style="position: absolute; bottom: 24px; right: 24px">
|
<!-- <div style="position: absolute; bottom: 24px; right: 24px">
|
||||||
<el-button style="margin-right: 10px" @click="goback()">返回</el-button>
|
<el-button style="margin-right: 10px" @click="goback()">返回</el-button>
|
||||||
@@ -416,3 +416,34 @@ export default {
|
|||||||
padding: 18px;
|
padding: 18px;
|
||||||
}
|
}
|
||||||
</style> -->
|
</style> -->
|
||||||
|
<style>
|
||||||
|
|
||||||
|
.baseDialog .el-dialog__header {
|
||||||
|
font-size: 16px;
|
||||||
|
color: rgba(0, 0, 0, 0.85);
|
||||||
|
font-weight: 500;
|
||||||
|
padding: 13px 24px;
|
||||||
|
border-bottom: 1px solid #e9e9e9;
|
||||||
|
}
|
||||||
|
.baseDialog .el-dialog__header .titleStyle::before{
|
||||||
|
content: '';
|
||||||
|
display: inline-block;
|
||||||
|
width: 4px;
|
||||||
|
height: 16px;
|
||||||
|
background-color: #0B58FF;
|
||||||
|
border-radius: 1px;
|
||||||
|
margin-right: 8px;
|
||||||
|
position: relative;
|
||||||
|
top: 2px;
|
||||||
|
}
|
||||||
|
.baseDialog .el-dialog__body {
|
||||||
|
padding-left: 24px;
|
||||||
|
padding-right: 24px;
|
||||||
|
}
|
||||||
|
.baseDialog .btnTextStyle {
|
||||||
|
letter-spacing:6px;
|
||||||
|
padding: 9px 10px 9px 16px;
|
||||||
|
font-size: 14px;
|
||||||
|
}
|
||||||
|
|
||||||
|
</style>
|
||||||
|
|||||||
@@ -1,12 +1,12 @@
|
|||||||
<!--
|
<!--
|
||||||
* @Author: zhp
|
* @Author: zhp
|
||||||
* @Date: 2023-10-17 16:50:19
|
* @Date: 2023-10-17 16:50:19
|
||||||
* @LastEditTime: 2023-10-30 10:41:07
|
* @LastEditTime: 2023-12-04 13:43:19
|
||||||
* @LastEditors: zhp
|
* @LastEditors: zhp
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
<template>
|
<template>
|
||||||
<el-dialog :visible.sync="visible" :show-close="false" :wrapper-closable="false" width="30%">
|
<el-dialog class="baseDialog" :visible.sync="visible" :show-close="false" :wrapper-closable="false" width="30%" show-close="true">
|
||||||
<small-title slot="title" :no-padding="true">
|
<small-title slot="title" :no-padding="true">
|
||||||
{{ !dataForm.id ? '新增' : '编辑' }}
|
{{ !dataForm.id ? '新增' : '编辑' }}
|
||||||
</small-title>
|
</small-title>
|
||||||
@@ -46,7 +46,7 @@
|
|||||||
<el-row :gutter="20">
|
<el-row :gutter="20">
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="模板设计" prop="content">
|
<el-form-item label="模板设计" prop="content">
|
||||||
<el-button type="primary" @click="btnClickDesign()">模板设计</el-button>
|
<el-button icon="el-icon-edit" @click="btnClickDesign()">模板设计</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<!-- <el-col :span="12">
|
<!-- <el-col :span="12">
|
||||||
@@ -439,3 +439,36 @@ export default {
|
|||||||
padding: 18px;
|
padding: 18px;
|
||||||
}
|
}
|
||||||
</style> -->
|
</style> -->
|
||||||
|
<style>
|
||||||
|
|
||||||
|
|
||||||
|
.baseDialog .el-dialog__header {
|
||||||
|
font-size: 16px;
|
||||||
|
color: rgba(0, 0, 0, 0.85);
|
||||||
|
font-weight: 500;
|
||||||
|
padding: 13px 24px;
|
||||||
|
border-bottom: 1px solid #e9e9e9;
|
||||||
|
}
|
||||||
|
.baseDialog .el-dialog__header .titleStyle::before{
|
||||||
|
content: '';
|
||||||
|
display: inline-block;
|
||||||
|
width: 4px;
|
||||||
|
height: 16px;
|
||||||
|
background-color: #0B58FF;
|
||||||
|
border-radius: 1px;
|
||||||
|
margin-right: 8px;
|
||||||
|
position: relative;
|
||||||
|
top: 2px;
|
||||||
|
}
|
||||||
|
.baseDialog .el-dialog__body {
|
||||||
|
padding-left: 24px;
|
||||||
|
padding-right: 24px;
|
||||||
|
}
|
||||||
|
.baseDialog .btnTextStyle {
|
||||||
|
letter-spacing:6px;
|
||||||
|
padding: 9px 10px 9px 16px;
|
||||||
|
font-size: 14px;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
</style>
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
* @Author: zwq
|
* @Author: zwq
|
||||||
* @Date: 2023-08-01 14:55:51
|
* @Date: 2023-08-01 14:55:51
|
||||||
* @LastEditors: zhp
|
* @LastEditors: zhp
|
||||||
* @LastEditTime: 2023-11-22 14:40:07
|
* @LastEditTime: 2023-12-04 13:38:45
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
<template>
|
<template>
|
||||||
@@ -71,7 +71,7 @@ export default {
|
|||||||
modelShow:false,
|
modelShow:false,
|
||||||
tableBtn: [
|
tableBtn: [
|
||||||
{
|
{
|
||||||
type: 'print',
|
type: 'detail',
|
||||||
btnName: '查看',
|
btnName: '查看',
|
||||||
},
|
},
|
||||||
this.$auth.hasPermi(`base:packaging-print-model:update`)
|
this.$auth.hasPermi(`base:packaging-print-model:update`)
|
||||||
@@ -121,11 +121,12 @@ export default {
|
|||||||
// name: 'reset',
|
// name: 'reset',
|
||||||
// },
|
// },
|
||||||
{
|
{
|
||||||
type: 'separate',
|
type: 'label',
|
||||||
|
label:'标签模板',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: this.$auth.hasPermi('base:packaging-print-model:create') ? 'button' : '',
|
type: this.$auth.hasPermi('base:packaging-print-model:create') ? 'button' : '',
|
||||||
btnName: '新增模板',
|
btnName: '新增',
|
||||||
name: 'add',
|
name: 'add',
|
||||||
color: 'success',
|
color: 'success',
|
||||||
plain: true,
|
plain: true,
|
||||||
|
|||||||
@@ -1,19 +1,19 @@
|
|||||||
<!--
|
<!--
|
||||||
* @Author: zhp
|
* @Author: zhp
|
||||||
* @Date: 2023-10-17 16:50:19
|
* @Date: 2023-10-17 16:50:19
|
||||||
* @LastEditTime: 2023-10-18 16:07:39
|
* @LastEditTime: 2023-12-04 13:45:45
|
||||||
* @LastEditors: zhp
|
* @LastEditors: zhp
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
<template>
|
<template>
|
||||||
<el-dialog :visible.sync="visible" :show-close="false" :wrapper-closable="false" width="40%">
|
<el-dialog class="baseDialog" :visible.sync="visible" :show-close="false" :wrapper-closable="false" width="40%" show-close="true">
|
||||||
<small-title slot="title" :no-padding="true">
|
<small-title slot="title" :no-padding="true">
|
||||||
{{ !dataForm.id ? '新增' : '编辑' }}
|
{{ !dataForm.id ? '新增' : '编辑' }}
|
||||||
</small-title>
|
</small-title>
|
||||||
|
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<div class="visual-part">
|
<div class="visual-part">
|
||||||
<el-form ref="dataForm" :model="dataForm" :rules="dataRule" label-width="100px"
|
<el-form ref="dataForm" :model="dataForm" :rules="dataRule" label-width="auto"
|
||||||
@keyup.enter.native="dataFormSubmit">
|
@keyup.enter.native="dataFormSubmit">
|
||||||
<el-row :gutter="20">
|
<el-row :gutter="20">
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
@@ -345,3 +345,37 @@ export default {
|
|||||||
padding: 18px;
|
padding: 18px;
|
||||||
}
|
}
|
||||||
</style> -->
|
</style> -->
|
||||||
|
<style>
|
||||||
|
|
||||||
|
|
||||||
|
.baseDialog .el-dialog__header {
|
||||||
|
font-size: 16px;
|
||||||
|
color: rgba(0, 0, 0, 0.85);
|
||||||
|
font-weight: 500;
|
||||||
|
padding: 13px 24px;
|
||||||
|
border-bottom: 1px solid #e9e9e9;
|
||||||
|
}
|
||||||
|
.baseDialog .el-dialog__header .titleStyle::before{
|
||||||
|
content: '';
|
||||||
|
display: inline-block;
|
||||||
|
width: 4px;
|
||||||
|
height: 16px;
|
||||||
|
background-color: #0B58FF;
|
||||||
|
border-radius: 1px;
|
||||||
|
margin-right: 8px;
|
||||||
|
position: relative;
|
||||||
|
top: 2px;
|
||||||
|
}
|
||||||
|
.baseDialog .el-dialog__body {
|
||||||
|
padding-left: 24px;
|
||||||
|
padding-right: 24px;
|
||||||
|
}
|
||||||
|
.baseDialog .btnTextStyle {
|
||||||
|
letter-spacing:6px;
|
||||||
|
padding: 9px 10px 9px 16px;
|
||||||
|
font-size: 14px;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</style>
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
* @Author: zwq
|
* @Author: zwq
|
||||||
* @Date: 2023-08-01 14:55:51
|
* @Date: 2023-08-01 14:55:51
|
||||||
* @LastEditors: zhp
|
* @LastEditors: zhp
|
||||||
* @LastEditTime: 2023-11-22 14:36:33
|
* @LastEditTime: 2023-12-04 13:44:01
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
<template>
|
<template>
|
||||||
@@ -122,7 +122,8 @@ export default {
|
|||||||
// name: 'reset',
|
// name: 'reset',
|
||||||
// },
|
// },
|
||||||
{
|
{
|
||||||
type: 'separate',
|
type: 'label',
|
||||||
|
label: '标签类型'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: this.$auth.hasPermi('base:packaging-print-type:create') ? 'button' : '',
|
type: this.$auth.hasPermi('base:packaging-print-type:create') ? 'button' : '',
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="navbar">
|
<div class="navbar">
|
||||||
<div style="color: #fff;font-size: 22px; float: left; letter-spacing: 1px; font-weight: 500; padding-left: 24px; marginTop: 13px">
|
<div style="color: #fff;font-size: 22px; float: left; letter-spacing: 2px; font-weight: 500; padding-left: 24px; marginTop: 13px">
|
||||||
<img src="../../../assets/images/cnbm.png" style="width: 26px; height: 26px; position: relative; top: 6px; marginRight: 14px" alt="">
|
<img src="../../../assets/logo/logo.png" style="width: 79px; height: 28px; position: relative; top: 6px; marginRight: 14px" alt="">
|
||||||
MES
|
许昌安彩新能科技有限公司
|
||||||
</div>
|
</div>
|
||||||
<div style="padding-top: 15px; padding-right: 38px;">
|
<div style="padding-top: 15px; padding-right: 38px;">
|
||||||
<navbar-right />
|
<navbar-right />
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
<div class="choicepart-container">
|
<div class="choicepart-container">
|
||||||
<navbar />
|
<navbar />
|
||||||
<div class="choicepart-wrapper">
|
<div class="choicepart-wrapper">
|
||||||
<div class="choicepart-box" id="choicepartBox" :style="'transform:scale('+scale+');width:1574px;height:538px;'" v-show="showItem">
|
<div class="choicepart-box" id="choicepartBox" :style="'transform:scale('+scale+');width:1710px;height:538px;'" v-show="showItem">
|
||||||
<div class="choicepart-line1">
|
<div class="choicepart-line1">
|
||||||
<div
|
<div
|
||||||
v-for="(item, index) in menuArr1"
|
v-for="(item, index) in menuArr1"
|
||||||
@@ -102,9 +102,7 @@ export default {
|
|||||||
meta: {
|
meta: {
|
||||||
title: ''
|
title: ''
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
],
|
|
||||||
menuArr2: [
|
|
||||||
{
|
{
|
||||||
name: 'Packaging',
|
name: 'Packaging',
|
||||||
title: '包装管理',
|
title: '包装管理',
|
||||||
@@ -112,7 +110,9 @@ export default {
|
|||||||
meta: {
|
meta: {
|
||||||
title: ''
|
title: ''
|
||||||
}
|
}
|
||||||
},
|
}
|
||||||
|
],
|
||||||
|
menuArr2: [
|
||||||
{
|
{
|
||||||
name: 'Material',
|
name: 'Material',
|
||||||
title: '物料管理',
|
title: '物料管理',
|
||||||
@@ -129,17 +129,41 @@ export default {
|
|||||||
title: ''
|
title: ''
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
// {
|
||||||
|
// name: 'Delivery',
|
||||||
|
// title: '成品发货',
|
||||||
|
// visible: false,
|
||||||
|
// meta: {
|
||||||
|
// title: ''
|
||||||
|
// }
|
||||||
|
// },
|
||||||
{
|
{
|
||||||
name: 'Delivery',
|
name: 'Report',
|
||||||
title: '成品发货',
|
title: '报表管理',
|
||||||
visible: false,
|
visible: false,
|
||||||
meta: {
|
meta: {
|
||||||
title: ''
|
title: ''
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'Report',
|
name: 'Cost',
|
||||||
title: '报表管理',
|
title: '成本管理',
|
||||||
|
visible: false,
|
||||||
|
meta: {
|
||||||
|
title: ''
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'SafetyEnvironmental',
|
||||||
|
title: '安环管理',
|
||||||
|
visible: false,
|
||||||
|
meta: {
|
||||||
|
title: ''
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'Databoard',
|
||||||
|
title: '数据驾驶舱',
|
||||||
visible: false,
|
visible: false,
|
||||||
meta: {
|
meta: {
|
||||||
title: ''
|
title: ''
|
||||||
@@ -176,7 +200,7 @@ export default {
|
|||||||
console.log(menuList)
|
console.log(menuList)
|
||||||
if (menuList.length > 0) {
|
if (menuList.length > 0) {
|
||||||
for (let i = 0; i < menuList.length; i ++) {
|
for (let i = 0; i < menuList.length; i ++) {
|
||||||
for (let k = 0; k < 7; k++) {
|
for (let k = 0; k < 8; k++) {
|
||||||
if (menuList[i].name === this.menuArr1[k].name) {
|
if (menuList[i].name === this.menuArr1[k].name) {
|
||||||
this.menuArr1[k].visible = true
|
this.menuArr1[k].visible = true
|
||||||
this.menuArr1[k].id = menuList[i].id
|
this.menuArr1[k].id = menuList[i].id
|
||||||
@@ -185,7 +209,7 @@ export default {
|
|||||||
this.menuArr1[k].meta = menuList[i].meta
|
this.menuArr1[k].meta = menuList[i].meta
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
for (let j = 0; j < 6; j++) {
|
for (let j = 0; j < 7; j++) {
|
||||||
if (menuList[i].name === this.menuArr2[j].name) {
|
if (menuList[i].name === this.menuArr2[j].name) {
|
||||||
this.menuArr2[j].visible = true
|
this.menuArr2[j].visible = true
|
||||||
this.menuArr2[j].id = menuList[i].id
|
this.menuArr2[j].id = menuList[i].id
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
* @Author: zwq
|
* @Author: zwq
|
||||||
* @Date: 2022-08-24 11:19:43
|
* @Date: 2022-08-24 11:19:43
|
||||||
* @LastEditors: zhp
|
* @LastEditors: zhp
|
||||||
* @LastEditTime: 2023-11-06 15:59:53
|
* @LastEditTime: 2023-12-13 15:52:53
|
||||||
* @Description:
|
* @Description:
|
||||||
*/
|
*/
|
||||||
export default {
|
export default {
|
||||||
@@ -38,7 +38,7 @@ export default {
|
|||||||
this.$refs["dataForm"].resetFields();
|
this.$refs["dataForm"].resetFields();
|
||||||
if (this.dataForm.id) {
|
if (this.dataForm.id) {
|
||||||
this.urlOptions.infoURL(id).then(response => {
|
this.urlOptions.infoURL(id).then(response => {
|
||||||
this.dataForm = response.data;
|
this.dataForm = response.data
|
||||||
if (this.setData) {
|
if (this.setData) {
|
||||||
this.setDataForm()
|
this.setDataForm()
|
||||||
}
|
}
|
||||||
|
|||||||
162
src/views/cost/energyCost/index.vue
Normal file
@@ -0,0 +1,162 @@
|
|||||||
|
<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"></base-table>
|
||||||
|
<pagination
|
||||||
|
:limit.sync="listQuery.pageSize"
|
||||||
|
:page.sync="listQuery.pageNo"
|
||||||
|
:total="listQuery.total"
|
||||||
|
@pagination="getDataList" />
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import basicPage from '../mixins/basic-page';
|
||||||
|
import codeFilter from '../mixins/code-filter';
|
||||||
|
import {
|
||||||
|
getCostEneryAutoPage,
|
||||||
|
exportCostEneryExcel,
|
||||||
|
} from '@/api/cost/costEneryAutoReport';
|
||||||
|
import { getEnergyTypeListAll } from '@/api/base/energyType';
|
||||||
|
import { publicFormatter } from '@/utils/dict';
|
||||||
|
|
||||||
|
const tableProps = [
|
||||||
|
{
|
||||||
|
prop: 'energyTypeName',
|
||||||
|
label: '能源类型',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'objName',
|
||||||
|
label: '监控对象',
|
||||||
|
filter: (val) => (val != null ? val : '--'),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'tableName',
|
||||||
|
label: '水/气表名',
|
||||||
|
filter: (val) => (val != null ? val : '--'),
|
||||||
|
filter: publicFormatter('table_name'),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'totalUsed',
|
||||||
|
label: '累计使用量',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'totalCost',
|
||||||
|
label: '总价',
|
||||||
|
align: 'right',
|
||||||
|
},
|
||||||
|
];
|
||||||
|
|
||||||
|
export default {
|
||||||
|
mixins: [basicPage],
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
urlOptions: {
|
||||||
|
getDataListURL: getCostEneryAutoPage,
|
||||||
|
exportURL: exportCostEneryExcel
|
||||||
|
},
|
||||||
|
tableData: [],
|
||||||
|
tableProps,
|
||||||
|
drawerVisible: false,
|
||||||
|
formConfig: [
|
||||||
|
{
|
||||||
|
type: 'select',
|
||||||
|
label: '能源类型',
|
||||||
|
selectOptions: [],
|
||||||
|
param: 'energyTypeId',
|
||||||
|
filterable: true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: 'datePicker',
|
||||||
|
label: '时间范围',
|
||||||
|
dateType: 'daterange',
|
||||||
|
format: 'yyyy-MM-dd',
|
||||||
|
valueFormat: 'timestamp',
|
||||||
|
rangeSeparator: '-',
|
||||||
|
startPlaceholder: '开始时间',
|
||||||
|
endPlaceholder: '结束时间',
|
||||||
|
param: 'searchTime',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: 'button',
|
||||||
|
btnName: '查询',
|
||||||
|
name: 'search',
|
||||||
|
color: 'primary',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: this.$auth.hasPermi('cost:energyCost:export')
|
||||||
|
? 'button'
|
||||||
|
: '',
|
||||||
|
btnName: '导出',
|
||||||
|
name: 'export',
|
||||||
|
color: 'primary',
|
||||||
|
plain: true,
|
||||||
|
},
|
||||||
|
],
|
||||||
|
};
|
||||||
|
},
|
||||||
|
components: {},
|
||||||
|
created() {
|
||||||
|
getEnergyTypeListAll().then((response) => {
|
||||||
|
this.formConfig[0].selectOptions = response.data;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
// 获取数据列表
|
||||||
|
getDataList() {
|
||||||
|
if(this.listQuery.searchTime){
|
||||||
|
this.dataListLoading = true;
|
||||||
|
this.urlOptions.getDataListURL(this.listQuery).then(response => {
|
||||||
|
if(response.hasOwnProperty('data')){
|
||||||
|
this.tableData = response.data.list;
|
||||||
|
this.listQuery.total = response.data.total;
|
||||||
|
}
|
||||||
|
this.dataListLoading = false;
|
||||||
|
});
|
||||||
|
}else{
|
||||||
|
this.$message.warning('请选择时间范围')
|
||||||
|
}
|
||||||
|
},
|
||||||
|
buttonClick(val) {
|
||||||
|
switch (val.btnName) {
|
||||||
|
case 'search':
|
||||||
|
this.listQuery.pageNo = 1;
|
||||||
|
this.listQuery.pageSize = 10;
|
||||||
|
this.listQuery.energyTypeId = val.energyTypeId;
|
||||||
|
this.listQuery.searchTime = val.searchTime ? val.searchTime[0] : null;
|
||||||
|
this.listQuery.startTime = val.searchTime ? val.searchTime[0] : null;
|
||||||
|
this.listQuery.endTime = val.searchTime ? val.searchTime[1] : null;
|
||||||
|
this.getDataList();
|
||||||
|
break;
|
||||||
|
case 'export':
|
||||||
|
const data = {
|
||||||
|
energyTypeId:val.energyTypeId,
|
||||||
|
startTime : val.searchTime ? val.searchTime[0] : null,
|
||||||
|
endTime : val.searchTime ? val.searchTime[1] : null,
|
||||||
|
}
|
||||||
|
this.handleExport(data);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
console.log(val);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
<style>
|
||||||
|
.app-container .el-table .el-table__cell {
|
||||||
|
padding: 0;
|
||||||
|
height: 35px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
180
src/views/cost/energyCostHis/index.vue
Normal file
@@ -0,0 +1,180 @@
|
|||||||
|
<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"></base-table>
|
||||||
|
<pagination
|
||||||
|
:limit.sync="listQuery.pageSize"
|
||||||
|
:page.sync="listQuery.pageNo"
|
||||||
|
:total="listQuery.total"
|
||||||
|
@pagination="getDataList" />
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import basicPage from '../mixins/basic-page';
|
||||||
|
import codeFilter from '../mixins/code-filter';
|
||||||
|
import {
|
||||||
|
getCostEneryAutoReportPage,
|
||||||
|
exportCostEneryAutoReportExcel,
|
||||||
|
} from '@/api/cost/costEneryAutoReport';
|
||||||
|
import { getEnergyTypeListAll } from '@/api/base/energyType';
|
||||||
|
import { publicFormatter } from '@/utils/dict';
|
||||||
|
import moment from 'moment';
|
||||||
|
|
||||||
|
const tableProps = [
|
||||||
|
{
|
||||||
|
prop: 'reportType',
|
||||||
|
label: '维度',
|
||||||
|
filter: codeFilter('reportType'),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'reportName',
|
||||||
|
label: '时间',
|
||||||
|
minWidth: 150,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'energyType',
|
||||||
|
label: '能源类型',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'objName',
|
||||||
|
label: '监控对象',
|
||||||
|
filter: (val) => (val != null ? val : '--'),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'tableName',
|
||||||
|
label: '水/气表名',
|
||||||
|
filter: (val) => (val != null ? val : '--'),
|
||||||
|
filter: publicFormatter('table_name'),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'totalUsed',
|
||||||
|
label: '累计使用量',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'totalCost',
|
||||||
|
label: '总价',
|
||||||
|
align: 'right',
|
||||||
|
},
|
||||||
|
];
|
||||||
|
|
||||||
|
export default {
|
||||||
|
mixins: [basicPage],
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
urlOptions: {
|
||||||
|
getDataListURL: getCostEneryAutoReportPage,
|
||||||
|
exportURL: exportCostEneryAutoReportExcel,
|
||||||
|
},
|
||||||
|
tableData: [],
|
||||||
|
tableProps,
|
||||||
|
drawerVisible: false,
|
||||||
|
formConfig: [
|
||||||
|
{
|
||||||
|
type: 'select',
|
||||||
|
label: '维度',
|
||||||
|
selectOptions: [
|
||||||
|
{ id: 2, name: '日' },
|
||||||
|
{ id: 3, name: '周' },
|
||||||
|
{ id: 4, name: '月' },
|
||||||
|
{ id: 5, name: '年' },
|
||||||
|
],
|
||||||
|
param: 'reportType',
|
||||||
|
filterable: true,
|
||||||
|
clearable: false,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: 'select',
|
||||||
|
label: '能源类型',
|
||||||
|
selectOptions: [],
|
||||||
|
param: 'energyTypeId',
|
||||||
|
filterable: true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: 'datePicker',
|
||||||
|
label: '时间范围',
|
||||||
|
dateType: 'daterange',
|
||||||
|
format: 'yyyy-MM-dd',
|
||||||
|
valueFormat: 'yyyy-MM-dd',
|
||||||
|
rangeSeparator: '-',
|
||||||
|
startPlaceholder: '开始时间',
|
||||||
|
endPlaceholder: '结束时间',
|
||||||
|
param: 'searchTime',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: 'button',
|
||||||
|
btnName: '查询',
|
||||||
|
name: 'search',
|
||||||
|
color: 'primary',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: this.$auth.hasPermi('cost:energyCostHis:export')
|
||||||
|
? 'button'
|
||||||
|
: '',
|
||||||
|
btnName: '导出',
|
||||||
|
name: 'export',
|
||||||
|
color: 'primary',
|
||||||
|
plain: true,
|
||||||
|
},
|
||||||
|
],
|
||||||
|
};
|
||||||
|
},
|
||||||
|
components: {},
|
||||||
|
created() {
|
||||||
|
getEnergyTypeListAll().then((response) => {
|
||||||
|
this.formConfig[1].selectOptions = response.data;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
buttonClick(val) {
|
||||||
|
switch (val.btnName) {
|
||||||
|
case 'search':
|
||||||
|
this.listQuery.pageNo = 1;
|
||||||
|
this.listQuery.pageSize = 10;
|
||||||
|
this.listQuery.reportType = val.reportType;
|
||||||
|
this.listQuery.energyTypeId = val.energyTypeId;
|
||||||
|
this.listQuery.reportTime = val.searchTime
|
||||||
|
? [
|
||||||
|
moment(val.searchTime[0]).startOf('day').format('x'),
|
||||||
|
moment(val.searchTime[1]).endOf('day').format('x'),
|
||||||
|
]
|
||||||
|
: null;
|
||||||
|
this.getDataList();
|
||||||
|
break;
|
||||||
|
case 'export':
|
||||||
|
const data = {
|
||||||
|
reportType: val.reportType,
|
||||||
|
energyTypeId: val.energyTypeId,
|
||||||
|
reportTime: val.searchTime
|
||||||
|
? [
|
||||||
|
moment(val.searchTime[0]).startOf('day').format('x'),
|
||||||
|
moment(val.searchTime[1]).endOf('day').format('x'),
|
||||||
|
]
|
||||||
|
: null,
|
||||||
|
};
|
||||||
|
this.handleExport(data);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
console.log(val);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
<style>
|
||||||
|
.app-container .el-table .el-table__cell {
|
||||||
|
padding: 0;
|
||||||
|
height: 35px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
121
src/views/cost/mixins/basic-add.js
Normal file
@@ -0,0 +1,121 @@
|
|||||||
|
/*
|
||||||
|
* @Author: zwq
|
||||||
|
* @Date: 2022-08-24 11:19:43
|
||||||
|
* @LastEditors: zwq
|
||||||
|
* @LastEditTime: 2023-11-02 15:33:39
|
||||||
|
* @Description:
|
||||||
|
*/
|
||||||
|
import { listData } from "@/api/system/dict/data";
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
/* eslint-disable */
|
||||||
|
return {
|
||||||
|
urlOptions: {
|
||||||
|
createURL: '',
|
||||||
|
updateURL: '',
|
||||||
|
infoURL: '',
|
||||||
|
codeURL: '',
|
||||||
|
getOption: false, //是否加载获取下拉框方法
|
||||||
|
isGetCode: false, //是否加载获取code方法
|
||||||
|
getDictList: false, //是否加载获取数据字典方法
|
||||||
|
optionArrUrl: [], //需要获取下拉框的方法数组
|
||||||
|
optionArr: {}, //需要获取下拉框的方法数组的返回结果
|
||||||
|
dictList: {}, //需要获取数据字典的方法数组的返回结果
|
||||||
|
},
|
||||||
|
visible: false,
|
||||||
|
setData: false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
},
|
||||||
|
activated() {
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
init(id) {
|
||||||
|
this.dataForm.id = id || "";
|
||||||
|
this.visible = true;
|
||||||
|
if (this.urlOptions.getOption) {
|
||||||
|
this.getArr()
|
||||||
|
}
|
||||||
|
if (this.urlOptions.getDictList) {
|
||||||
|
this.getDict()
|
||||||
|
}
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$refs["dataForm"].resetFields();
|
||||||
|
if (this.dataForm.id) {
|
||||||
|
this.urlOptions.infoURL(id).then(response => {
|
||||||
|
this.dataForm = response.data;
|
||||||
|
if (this.setData) {
|
||||||
|
this.setDataForm()
|
||||||
|
}
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
if (this.urlOptions.isGetCode) {
|
||||||
|
this.getCode()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
getCode() {
|
||||||
|
this.urlOptions.codeURL()
|
||||||
|
.then(({ data: res }) => {
|
||||||
|
this.dataForm.code = res;
|
||||||
|
})
|
||||||
|
.catch(() => {});
|
||||||
|
},
|
||||||
|
getArr() {
|
||||||
|
const params = {
|
||||||
|
pageSize: 100,
|
||||||
|
pageNo: 1,
|
||||||
|
}
|
||||||
|
this.urlOptions.optionArrUrl.forEach((item, index) => {
|
||||||
|
item(params).then(({ data: res }) => {
|
||||||
|
this.$set(this.urlOptions.optionArr, `arr${index}`, res.list)
|
||||||
|
})
|
||||||
|
.catch(() => {
|
||||||
|
});
|
||||||
|
});
|
||||||
|
},
|
||||||
|
/** 查询字典数据列表 */
|
||||||
|
getDict() {
|
||||||
|
this.nameList.forEach((item,index)=>{
|
||||||
|
const queryParams = {
|
||||||
|
pageNo: 1,
|
||||||
|
pageSize: 99,
|
||||||
|
dictType: item,
|
||||||
|
}
|
||||||
|
listData(queryParams).then(response => {
|
||||||
|
this.$set(this.urlOptions.dictList, `dict${index}`, response.data.list)
|
||||||
|
});
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 表单提交
|
||||||
|
dataFormSubmit() {
|
||||||
|
this.$refs["dataForm"].validate((valid) => {
|
||||||
|
if (!valid) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
// 修改的提交
|
||||||
|
if (this.dataForm.id) {
|
||||||
|
this.urlOptions.updateURL(this.dataForm).then(response => {
|
||||||
|
this.$modal.msgSuccess("修改成功");
|
||||||
|
this.visible = false;
|
||||||
|
this.$emit("refreshDataList");
|
||||||
|
});
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
// 添加的提交
|
||||||
|
this.urlOptions.createURL(this.dataForm).then(response => {
|
||||||
|
this.$modal.msgSuccess("新增成功");
|
||||||
|
this.visible = false;
|
||||||
|
this.$emit("refreshDataList");
|
||||||
|
});
|
||||||
|
});
|
||||||
|
},
|
||||||
|
formClear() {
|
||||||
|
if (this.$refs.dataForm!==undefined) {
|
||||||
|
this.$refs.dataForm.resetFields();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
172
src/views/cost/mixins/basic-page.js
Normal file
@@ -0,0 +1,172 @@
|
|||||||
|
/*
|
||||||
|
* @Author: zwq
|
||||||
|
* @Date: 2022-08-24 11:19:43
|
||||||
|
* @LastEditors: zwq
|
||||||
|
* @LastEditTime: 2023-12-07 09:35:33
|
||||||
|
* @Description:
|
||||||
|
*/
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
/* eslint-disable */
|
||||||
|
return {
|
||||||
|
urlOptions: {
|
||||||
|
getDataListURL: '',
|
||||||
|
deleteURL: '',
|
||||||
|
statusUrl: '',
|
||||||
|
exportURL: ''
|
||||||
|
},
|
||||||
|
tableData: [],
|
||||||
|
listQuery: {
|
||||||
|
pageSize: 10,
|
||||||
|
pageNo: 1,
|
||||||
|
total: 1,
|
||||||
|
},
|
||||||
|
exportLoading: false,
|
||||||
|
dataListLoading: false,
|
||||||
|
addOrEditTitle: '',
|
||||||
|
addOrUpdateVisible: false,
|
||||||
|
addOrUpdate:'addOrUpdate'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
this.getDataList()
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
// 获取数据列表
|
||||||
|
getDataList() {
|
||||||
|
this.dataListLoading = true;
|
||||||
|
this.urlOptions.getDataListURL(this.listQuery).then(response => {
|
||||||
|
if(response.hasOwnProperty('data')){
|
||||||
|
this.tableData = response.data.list;
|
||||||
|
this.listQuery.total = response.data.total;
|
||||||
|
}
|
||||||
|
this.dataListLoading = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 每页数
|
||||||
|
sizeChangeHandle(val) {
|
||||||
|
this.listQuery.pageSize = val;
|
||||||
|
this.listQuery.pageNo = 1;
|
||||||
|
this.getDataList();
|
||||||
|
},
|
||||||
|
// 当前页
|
||||||
|
currentChangeHandle(val) {
|
||||||
|
this.listQuery.pageNo = val;
|
||||||
|
this.getDataList();
|
||||||
|
},
|
||||||
|
// 新增 / 修改
|
||||||
|
addOrUpdateHandle(id) {
|
||||||
|
this.addOrUpdateVisible = true;
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$refs.addOrUpdate.init(id);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
cancel(id) {
|
||||||
|
this.$refs["popover-" + id].showPopper = false;
|
||||||
|
},
|
||||||
|
//改变状态
|
||||||
|
changeStatus(id) {
|
||||||
|
this.$http
|
||||||
|
.post(this.urlOptions.statusUrl, { id })
|
||||||
|
.then(({ data: res }) => {
|
||||||
|
if (res.code !== 0) {
|
||||||
|
return this.$message.error(res.msg);
|
||||||
|
}
|
||||||
|
this.$refs["popover-" + id].showPopper = false;
|
||||||
|
this.$message({
|
||||||
|
message: this.$t("prompt.success"),
|
||||||
|
type: "success",
|
||||||
|
duration: 500,
|
||||||
|
onClose: () => {
|
||||||
|
this.getDataList();
|
||||||
|
},
|
||||||
|
});
|
||||||
|
})
|
||||||
|
.catch(() => { });
|
||||||
|
},
|
||||||
|
//tableBtn点击
|
||||||
|
handleClick(val) {
|
||||||
|
if (val.type === "edit") {
|
||||||
|
this.addOrUpdateVisible = true;
|
||||||
|
this.addOrEditTitle = "编辑";
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$refs.addOrUpdate.init(val.data.id);
|
||||||
|
});
|
||||||
|
} else if (val.type === "delete") {
|
||||||
|
this.deleteHandle(val.data.id, val.data.name, val.data._pageIndex)
|
||||||
|
} else if (val.type === "change") {
|
||||||
|
this.changeStatus(val.data.id)
|
||||||
|
} else {
|
||||||
|
this.otherMethods(val)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 删除
|
||||||
|
deleteHandle(id, name, index) {
|
||||||
|
this.$confirm(`是否确认删除${name ? '名称为"' + name + '"' : '序号为"' + index + '"'}的数据项?`, "系统提示", {
|
||||||
|
confirmButtonText: "确定",
|
||||||
|
cancelButtonText: "取消",
|
||||||
|
type: "warning",
|
||||||
|
})
|
||||||
|
.then(() => {
|
||||||
|
this.urlOptions.deleteURL(id).then(({ data }) => {
|
||||||
|
this.$message({
|
||||||
|
message: "操作成功",
|
||||||
|
type: "success",
|
||||||
|
duration: 1500,
|
||||||
|
onClose: () => {
|
||||||
|
this.getDataList();
|
||||||
|
},
|
||||||
|
});
|
||||||
|
});
|
||||||
|
})
|
||||||
|
.catch(() => { });
|
||||||
|
},
|
||||||
|
//search-bar点击
|
||||||
|
buttonClick(val) {
|
||||||
|
switch (val.btnName) {
|
||||||
|
case "search":
|
||||||
|
this.listQuery.xm1 = val.xm1;
|
||||||
|
this.listQuery.xm2 = val.xm2;
|
||||||
|
this.listQuery.pageNo = 1;
|
||||||
|
this.getDataList();
|
||||||
|
break;
|
||||||
|
case "add":
|
||||||
|
this.addOrEditTitle = '新增'
|
||||||
|
this.addOrUpdateVisible = true;
|
||||||
|
this.addOrUpdateHandle()
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
console.log(val)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
handleCancel() {
|
||||||
|
this.$refs[this.addOrUpdate].formClear()
|
||||||
|
this.addOrUpdateVisible = false
|
||||||
|
this.addOrEditTitle = ''
|
||||||
|
this.addOrUpdate = 'addOrUpdate'
|
||||||
|
},
|
||||||
|
handleConfirm() {
|
||||||
|
this.$refs[this.addOrUpdate].dataFormSubmit()
|
||||||
|
},
|
||||||
|
successSubmit() {
|
||||||
|
this.handleCancel()
|
||||||
|
this.getDataList()
|
||||||
|
},
|
||||||
|
/** 导出按钮操作 */
|
||||||
|
handleExport(data) {
|
||||||
|
// 处理查询参数
|
||||||
|
let params = data?{ ...data }:{ ...this.listQuery };
|
||||||
|
params.pageNo = undefined;
|
||||||
|
params.pageSize = undefined;
|
||||||
|
this.$modal.confirm('是否确认导出所有数据项?').then(() => {
|
||||||
|
this.exportLoading = true;
|
||||||
|
return this.urlOptions.exportURL(params);
|
||||||
|
}).then(response => {
|
||||||
|
this.$download.excel(response, '报表.xls');
|
||||||
|
this.exportLoading = false;
|
||||||
|
}).catch(() => { });
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
79
src/views/cost/mixins/code-filter.js
Normal file
@@ -0,0 +1,79 @@
|
|||||||
|
|
||||||
|
/*
|
||||||
|
* @Date: 2020-12-29 16:49:28
|
||||||
|
* @LastEditors: zwq
|
||||||
|
* @LastEditTime: 2023-12-07 10:00:51
|
||||||
|
* @FilePath: \basic-admin\src\filters\basicData\index.js
|
||||||
|
* @Description:
|
||||||
|
*/
|
||||||
|
|
||||||
|
const table = {
|
||||||
|
lineStatus: {
|
||||||
|
1: '生产中',
|
||||||
|
2: '停止',
|
||||||
|
3: '未知',
|
||||||
|
},
|
||||||
|
deactivate: {
|
||||||
|
1: '启用',
|
||||||
|
0: '停用',
|
||||||
|
},
|
||||||
|
wareType: {
|
||||||
|
1: '缓存',
|
||||||
|
2: '活动',
|
||||||
|
3: '其它',
|
||||||
|
},
|
||||||
|
reportType: {
|
||||||
|
2: '日',
|
||||||
|
3: '周',
|
||||||
|
4: '月',
|
||||||
|
5: '年',
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
// 日期格式化
|
||||||
|
export function parseTime(time, pattern) {
|
||||||
|
if (arguments.length === 0 || !time) {
|
||||||
|
return null
|
||||||
|
}
|
||||||
|
const format = pattern || '{y}-{m}-{d} {h}:{i}:{s}'
|
||||||
|
let date
|
||||||
|
if (typeof time === 'object') {
|
||||||
|
date = time
|
||||||
|
} else {
|
||||||
|
if ((typeof time === 'string') && (/^[0-9]+$/.test(time))) {
|
||||||
|
time = parseInt(time)
|
||||||
|
} else if (typeof time === 'string') {
|
||||||
|
time = time.replace(new RegExp(/-/gm), '/').replace('T', ' ').replace(new RegExp(/\.\d{3}/gm),'');
|
||||||
|
}
|
||||||
|
if ((typeof time === 'number') && (time.toString().length === 10)) {
|
||||||
|
time = time * 1000
|
||||||
|
}
|
||||||
|
date = new Date(time)
|
||||||
|
}
|
||||||
|
const formatObj = {
|
||||||
|
y: date.getFullYear(),
|
||||||
|
m: date.getMonth() + 1,
|
||||||
|
d: date.getDate(),
|
||||||
|
h: date.getHours(),
|
||||||
|
i: date.getMinutes(),
|
||||||
|
s: date.getSeconds(),
|
||||||
|
a: date.getDay()
|
||||||
|
}
|
||||||
|
const time_str = format.replace(/{([ymdhisa])+}/g, (result, key) => {
|
||||||
|
let value = formatObj[key]
|
||||||
|
// Note: getDay() returns 0 on Sunday
|
||||||
|
if (key === 'a') {
|
||||||
|
return ['日', '一', '二', '三', '四', '五', '六'][value]
|
||||||
|
}
|
||||||
|
if (result.length > 0 && value < 10) {
|
||||||
|
value = '0' + value
|
||||||
|
}
|
||||||
|
return value || 0
|
||||||
|
})
|
||||||
|
return time_str
|
||||||
|
}
|
||||||
|
export default function (dictTable) {
|
||||||
|
return function (val) {
|
||||||
|
return table?.[dictTable]?.[val]
|
||||||
|
}
|
||||||
|
}
|
||||||
23
src/views/cost/mixins/connectTime.vue
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
<!--
|
||||||
|
* @Author: zwq
|
||||||
|
* @Date: 2023-12-05 13:45:59
|
||||||
|
* @LastEditors: zwq
|
||||||
|
* @LastEditTime: 2023-12-06 15:54:40
|
||||||
|
* @Description
|
||||||
|
-->
|
||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<span>{{ parseTime(injectData.enableTime,'{y}年{m}月{d}日') + '-' + (parseTime(injectData.disableTime)?parseTime(injectData.disableTime,'{y}年{m}月{d}日'):'永久') }}</span>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
name: '',
|
||||||
|
props: {
|
||||||
|
injectData: {
|
||||||
|
type: Object,
|
||||||
|
default: () => ({}),
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
166
src/views/cost/rawMaterialConfig/add-or-updata.vue
Normal file
@@ -0,0 +1,166 @@
|
|||||||
|
<!--
|
||||||
|
* @Author: zwq
|
||||||
|
* @Date: 2023-08-01 13:52:10
|
||||||
|
* @LastEditors: zwq
|
||||||
|
* @LastEditTime: 2023-12-05 15:41:39
|
||||||
|
* @Description:
|
||||||
|
-->
|
||||||
|
<template>
|
||||||
|
<el-form
|
||||||
|
:model="dataForm"
|
||||||
|
:rules="dataRule"
|
||||||
|
ref="dataForm"
|
||||||
|
v-if="visible"
|
||||||
|
@keyup.enter.native="dataFormSubmit()"
|
||||||
|
label-width="100px"
|
||||||
|
label-position="top">
|
||||||
|
<el-row :gutter="20">
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="原料名称" prop="materialId">
|
||||||
|
<el-select
|
||||||
|
v-model="dataForm.materialId"
|
||||||
|
filterable
|
||||||
|
clearable
|
||||||
|
@change="setCode"
|
||||||
|
:style="{ width: '100%' }"
|
||||||
|
placeholder="请选择原料名称">
|
||||||
|
<el-option
|
||||||
|
v-for="item in MaterialList"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.name"
|
||||||
|
:value="item.id"></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="原料等级" prop="grade">
|
||||||
|
<el-select
|
||||||
|
v-model="dataForm.grade"
|
||||||
|
filterable
|
||||||
|
clearable
|
||||||
|
:style="{ width: '100%' }"
|
||||||
|
placeholder="请选择原料等级">
|
||||||
|
<el-option
|
||||||
|
v-for="item in urlOptions.dictList.dict0"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.label"
|
||||||
|
:value="parseInt(item.value)"></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="原料编码" prop="code">
|
||||||
|
<el-input v-model="dataForm.code" clearable readonly />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="单价" prop="price">
|
||||||
|
<el-input-number
|
||||||
|
:min="0"
|
||||||
|
style="width: 80%"
|
||||||
|
v-model="dataForm.price"
|
||||||
|
clearable
|
||||||
|
placeholder="请输入允许留存时间" />
|
||||||
|
(元/吨)
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="生效开始时间" prop="enabledTime">
|
||||||
|
<el-date-picker
|
||||||
|
v-model="dataForm.enabledTime"
|
||||||
|
type="datetime"
|
||||||
|
value-format="timestamp"
|
||||||
|
:style="{ width: '100%' }"
|
||||||
|
placeholder="选择开始时间"></el-date-picker>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="生效结束时间" prop="disabledTime">
|
||||||
|
<el-date-picker
|
||||||
|
v-model="dataForm.disabledTime"
|
||||||
|
type="datetime"
|
||||||
|
value-format="timestamp"
|
||||||
|
:style="{ width: '100%' }"
|
||||||
|
placeholder="选择结束时间"></el-date-picker>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="备注" prop="remark">
|
||||||
|
<el-input
|
||||||
|
v-model="dataForm.remark"
|
||||||
|
clearable
|
||||||
|
placeholder="请输入备注" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-form>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import basicAdd from '../mixins/basic-add';
|
||||||
|
import {
|
||||||
|
createCostMaterialSet,
|
||||||
|
updateCostMaterialSet,
|
||||||
|
getCostMaterialSet,
|
||||||
|
} from '@/api/cost/costMaterialSet';
|
||||||
|
import { getHotMaterialList } from '@/api/base/coreHotMaterial';
|
||||||
|
|
||||||
|
export default {
|
||||||
|
mixins: [basicAdd],
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
urlOptions: {
|
||||||
|
getDictList: true,
|
||||||
|
createURL: createCostMaterialSet,
|
||||||
|
updateURL: updateCostMaterialSet,
|
||||||
|
infoURL: getCostMaterialSet,
|
||||||
|
getOption: true,
|
||||||
|
},
|
||||||
|
nameList: ['material_grade'],
|
||||||
|
dataForm: {
|
||||||
|
id: undefined,
|
||||||
|
code: '',
|
||||||
|
materialId: '',
|
||||||
|
price: '',
|
||||||
|
grade: '',
|
||||||
|
enabledTime: new Date().getTime(),
|
||||||
|
disabledTime: null,
|
||||||
|
remark: '',
|
||||||
|
},
|
||||||
|
setData: true,
|
||||||
|
MaterialList: [],
|
||||||
|
dataRule: {
|
||||||
|
materialId: [
|
||||||
|
{ required: true, message: '原料不能为空', trigger: 'change' },
|
||||||
|
],
|
||||||
|
price: [{ required: true, message: '单价不能为空', trigger: 'blur' }],
|
||||||
|
enabledTime: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: '生效开始时间不能为空',
|
||||||
|
trigger: 'change',
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
};
|
||||||
|
},
|
||||||
|
created() {},
|
||||||
|
methods: {
|
||||||
|
getArr() {
|
||||||
|
getHotMaterialList().then((response) => {
|
||||||
|
this.MaterialList = response.data;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
setDataForm() {
|
||||||
|
this.setCode();
|
||||||
|
},
|
||||||
|
setCode() {
|
||||||
|
this.MaterialList.forEach((item) => {
|
||||||
|
if (item.id === this.dataForm.materialId) {
|
||||||
|
this.dataForm.code = item.code;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
186
src/views/cost/rawMaterialConfig/index.vue
Normal file
@@ -0,0 +1,186 @@
|
|||||||
|
<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">
|
||||||
|
<method-btn
|
||||||
|
v-if="tableBtn.length"
|
||||||
|
slot="handleBtn"
|
||||||
|
:width="80"
|
||||||
|
label="操作"
|
||||||
|
:method-list="tableBtn"
|
||||||
|
@clickBtn="handleClick" />
|
||||||
|
</base-table>
|
||||||
|
<pagination
|
||||||
|
:limit.sync="listQuery.pageSize"
|
||||||
|
:page.sync="listQuery.pageNo"
|
||||||
|
:total="listQuery.total"
|
||||||
|
@pagination="getDataList" />
|
||||||
|
|
||||||
|
<!-- 对话框(添加 / 修改) -->
|
||||||
|
<base-dialog
|
||||||
|
:dialogTitle="addOrEditTitle"
|
||||||
|
:dialogVisible="addOrUpdateVisible"
|
||||||
|
@cancel="handleCancel"
|
||||||
|
@confirm="handleConfirm"
|
||||||
|
:before-close="handleCancel"
|
||||||
|
width="40%">
|
||||||
|
<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 '../mixins/code-filter';
|
||||||
|
import {
|
||||||
|
deleteCostMaterialSet,
|
||||||
|
getCostMaterialSetPage,
|
||||||
|
} from '@/api/cost/costMaterialSet';
|
||||||
|
import { getHotMaterialList } from '@/api/base/coreHotMaterial';
|
||||||
|
import { publicFormatter } from '@/utils/dict';
|
||||||
|
|
||||||
|
const tableProps = [
|
||||||
|
{
|
||||||
|
prop: 'rawMaterialName',
|
||||||
|
label: '原料名称',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'code',
|
||||||
|
label: '原料编码',
|
||||||
|
width: 190,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'grade',
|
||||||
|
label: '原料等级',
|
||||||
|
filter: publicFormatter('material_grade'),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'dailyUse',
|
||||||
|
label: '单日消耗量(吨)',
|
||||||
|
width: 130,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'price',
|
||||||
|
label: '单价(元/吨)',
|
||||||
|
align: 'right',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'enabledTime',
|
||||||
|
label: '生效时间',
|
||||||
|
filter: parseTime,
|
||||||
|
width: 150,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'remark',
|
||||||
|
label: '备注',
|
||||||
|
},
|
||||||
|
];
|
||||||
|
|
||||||
|
export default {
|
||||||
|
mixins: [basicPage],
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
urlOptions: {
|
||||||
|
getDataListURL: getCostMaterialSetPage,
|
||||||
|
deleteURL: deleteCostMaterialSet,
|
||||||
|
},
|
||||||
|
tableProps,
|
||||||
|
tableBtn: [
|
||||||
|
this.$auth.hasPermi(`cost:rawMaterialConfig:update`)
|
||||||
|
? {
|
||||||
|
type: 'edit',
|
||||||
|
btnName: '编辑',
|
||||||
|
}
|
||||||
|
: undefined,
|
||||||
|
this.$auth.hasPermi(`cost:rawMaterialConfig:delete`)
|
||||||
|
? {
|
||||||
|
type: 'delete',
|
||||||
|
btnName: '删除',
|
||||||
|
}
|
||||||
|
: undefined,
|
||||||
|
].filter((v) => v),
|
||||||
|
tableData: [],
|
||||||
|
formConfig: [
|
||||||
|
{
|
||||||
|
type: 'select',
|
||||||
|
label: '原料名称',
|
||||||
|
selectOptions: [],
|
||||||
|
param: 'name',
|
||||||
|
filterable: true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: 'button',
|
||||||
|
btnName: '查询',
|
||||||
|
name: 'search',
|
||||||
|
color: 'primary',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: 'separate',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: this.$auth.hasPermi('cost:rawMaterialConfig:create')
|
||||||
|
? 'button'
|
||||||
|
: '',
|
||||||
|
btnName: '新增',
|
||||||
|
name: 'add',
|
||||||
|
color: 'success',
|
||||||
|
plain: true,
|
||||||
|
},
|
||||||
|
],
|
||||||
|
};
|
||||||
|
},
|
||||||
|
components: {
|
||||||
|
AddOrUpdate,
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
getHotMaterialList().then((response) => {
|
||||||
|
this.formConfig[0].selectOptions = response.data;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
buttonClick(val) {
|
||||||
|
switch (val.btnName) {
|
||||||
|
case 'search':
|
||||||
|
this.listQuery.pageNo = 1;
|
||||||
|
this.listQuery.pageSize = 10;
|
||||||
|
this.listQuery.materialId = val.name;
|
||||||
|
this.getDataList();
|
||||||
|
break;
|
||||||
|
case 'reset':
|
||||||
|
this.$refs.searchBarForm.resetForm();
|
||||||
|
this.listQuery = {
|
||||||
|
pageSize: 10,
|
||||||
|
pageNo: 1,
|
||||||
|
total: 1,
|
||||||
|
};
|
||||||
|
this.getDataList();
|
||||||
|
break;
|
||||||
|
case 'add':
|
||||||
|
this.addOrEditTitle = '新增';
|
||||||
|
this.addOrUpdateVisible = true;
|
||||||
|
this.addOrUpdateHandle();
|
||||||
|
break;
|
||||||
|
case 'export':
|
||||||
|
this.handleExport();
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
console.log(val);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
171
src/views/cost/rawMaterialCost/index.vue
Normal file
@@ -0,0 +1,171 @@
|
|||||||
|
<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"></base-table>
|
||||||
|
<pagination
|
||||||
|
:limit.sync="listQuery.pageSize"
|
||||||
|
:page.sync="listQuery.pageNo"
|
||||||
|
:total="listQuery.total"
|
||||||
|
@pagination="getDataList" />
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import basicPage from '../mixins/basic-page';
|
||||||
|
import connectTime from '../mixins/connectTime';
|
||||||
|
import {
|
||||||
|
getCostMaterialSearchPage,
|
||||||
|
exportCostMaterialSearch,
|
||||||
|
} from '@/api/cost/costMaterialAutoReport';
|
||||||
|
import { getHotMaterialList } from '@/api/base/coreHotMaterial';
|
||||||
|
import { publicFormatter } from '@/utils/dict';
|
||||||
|
import moment from 'moment';
|
||||||
|
|
||||||
|
const tableProps = [
|
||||||
|
{
|
||||||
|
prop: 'rawMaterialName',
|
||||||
|
label: '原料名称',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'grade',
|
||||||
|
label: '原料等级',
|
||||||
|
filter: publicFormatter('material_grade'),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'price',
|
||||||
|
label: '单价(元/吨)',
|
||||||
|
align: 'right',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'reportName',
|
||||||
|
label: '单价生效时间',
|
||||||
|
minWidth: 190,
|
||||||
|
subcomponent: connectTime,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'totalUsed',
|
||||||
|
label: '累计使用量(吨)',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'totalCost',
|
||||||
|
label: '总价(元)',
|
||||||
|
align: 'right',
|
||||||
|
},
|
||||||
|
];
|
||||||
|
|
||||||
|
export default {
|
||||||
|
mixins: [basicPage],
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
urlOptions: {
|
||||||
|
getDataListURL: getCostMaterialSearchPage,
|
||||||
|
exportURL: exportCostMaterialSearch,
|
||||||
|
},
|
||||||
|
tableData: [],
|
||||||
|
tableProps,
|
||||||
|
drawerVisible: false,
|
||||||
|
formConfig: [
|
||||||
|
{
|
||||||
|
type: 'select',
|
||||||
|
label: '原料名称',
|
||||||
|
selectOptions: [],
|
||||||
|
param: 'materialId',
|
||||||
|
filterable: true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: 'datePicker',
|
||||||
|
label: '时间范围',
|
||||||
|
dateType: 'daterange',
|
||||||
|
format: 'yyyy-MM-dd',
|
||||||
|
valueFormat: 'yyyy-MM-dd',
|
||||||
|
rangeSeparator: '-',
|
||||||
|
startPlaceholder: '开始时间',
|
||||||
|
endPlaceholder: '结束时间',
|
||||||
|
param: 'searchTime',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: 'button',
|
||||||
|
btnName: '查询',
|
||||||
|
name: 'search',
|
||||||
|
color: 'primary',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: this.$auth.hasPermi('cost:rawMaterialCost:export')
|
||||||
|
? 'button'
|
||||||
|
: '',
|
||||||
|
btnName: '导出',
|
||||||
|
name: 'export',
|
||||||
|
color: 'primary',
|
||||||
|
plain: true,
|
||||||
|
},
|
||||||
|
],
|
||||||
|
};
|
||||||
|
},
|
||||||
|
components: {},
|
||||||
|
created() {
|
||||||
|
getHotMaterialList().then((response) => {
|
||||||
|
this.formConfig[0].selectOptions = response.data;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
// 获取数据列表
|
||||||
|
getDataList() {
|
||||||
|
if (this.listQuery.searchTime) {
|
||||||
|
this.dataListLoading = true;
|
||||||
|
this.urlOptions.getDataListURL(this.listQuery).then((response) => {
|
||||||
|
if (response.hasOwnProperty('data')) {
|
||||||
|
this.tableData = response.data.list;
|
||||||
|
this.listQuery.total = response.data.total;
|
||||||
|
}
|
||||||
|
this.dataListLoading = false;
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
this.$message.warning('请选择时间范围');
|
||||||
|
}
|
||||||
|
},
|
||||||
|
buttonClick(val) {
|
||||||
|
switch (val.btnName) {
|
||||||
|
case 'search':
|
||||||
|
this.listQuery.pageNo = 1;
|
||||||
|
this.listQuery.pageSize = 10;
|
||||||
|
this.listQuery.materialId = val.materialId;
|
||||||
|
this.listQuery.searchTime = val.searchTime ? val.searchTime[0] : null;
|
||||||
|
this.listQuery.startTime = val.searchTime
|
||||||
|
? moment(val.searchTime[0]).startOf('day').format('x')
|
||||||
|
: null;
|
||||||
|
this.listQuery.endTime = val.searchTime
|
||||||
|
? moment(val.searchTime[1]).endOf('day').format('x')
|
||||||
|
: null;
|
||||||
|
this.getDataList();
|
||||||
|
break;
|
||||||
|
case 'export':
|
||||||
|
this.listQuery.materialId = val.materialId;
|
||||||
|
this.listQuery.searchTime = val.searchTime ? val.searchTime[0] : null;
|
||||||
|
this.listQuery.startTime = val.searchTime ? val.searchTime[0] : null;
|
||||||
|
this.listQuery.endTime = val.searchTime ? val.searchTime[1] : null;
|
||||||
|
this.handleExport();
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
console.log(val);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
<style>
|
||||||
|
.app-container .el-table .el-table__cell {
|
||||||
|
padding: 0;
|
||||||
|
height: 35px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
177
src/views/cost/rawMaterialCostHis/index.vue
Normal file
@@ -0,0 +1,177 @@
|
|||||||
|
<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"></base-table>
|
||||||
|
<pagination
|
||||||
|
:limit.sync="listQuery.pageSize"
|
||||||
|
:page.sync="listQuery.pageNo"
|
||||||
|
:total="listQuery.total"
|
||||||
|
@pagination="getDataList" />
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import basicPage from '../mixins/basic-page';
|
||||||
|
import codeFilter from '../mixins/code-filter';
|
||||||
|
import {
|
||||||
|
getCostMaterialAutoReportPage,
|
||||||
|
exportCostMaterialAutoReportExcel,
|
||||||
|
} from '@/api/cost/costMaterialAutoReport';
|
||||||
|
import { getHotMaterialList } from '@/api/base/coreHotMaterial';
|
||||||
|
import { publicFormatter } from '@/utils/dict';
|
||||||
|
import moment from 'moment';
|
||||||
|
|
||||||
|
const tableProps = [
|
||||||
|
{
|
||||||
|
prop: 'reportType',
|
||||||
|
label: '维度',
|
||||||
|
filter: codeFilter('reportType'),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'reportName',
|
||||||
|
label: '时间',
|
||||||
|
minWidth: 150,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'rawMaterialName',
|
||||||
|
label: '原料名称',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'grade',
|
||||||
|
label: '原料等级',
|
||||||
|
filter: publicFormatter('material_grade'),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'price',
|
||||||
|
label: '单价(元/吨)',
|
||||||
|
align: 'right',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'totalUsed',
|
||||||
|
label: '累计使用量(吨)',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'totalCost',
|
||||||
|
label: '总价(元)',
|
||||||
|
align: 'right',
|
||||||
|
},
|
||||||
|
];
|
||||||
|
|
||||||
|
export default {
|
||||||
|
mixins: [basicPage],
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
urlOptions: {
|
||||||
|
getDataListURL: getCostMaterialAutoReportPage,
|
||||||
|
exportURL: exportCostMaterialAutoReportExcel,
|
||||||
|
},
|
||||||
|
tableData: [],
|
||||||
|
tableProps,
|
||||||
|
drawerVisible: false,
|
||||||
|
formConfig: [
|
||||||
|
{
|
||||||
|
type: 'select',
|
||||||
|
label: '维度',
|
||||||
|
selectOptions: [
|
||||||
|
{ id: 2, name: '日' },
|
||||||
|
{ id: 3, name: '周' },
|
||||||
|
{ id: 4, name: '月' },
|
||||||
|
{ id: 5, name: '年' },
|
||||||
|
],
|
||||||
|
param: 'reportType',
|
||||||
|
filterable: true,
|
||||||
|
clearable: false,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: 'select',
|
||||||
|
label: '原料名称',
|
||||||
|
selectOptions: [],
|
||||||
|
param: 'materialId',
|
||||||
|
filterable: true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: 'datePicker',
|
||||||
|
label: '时间范围',
|
||||||
|
dateType: 'daterange',
|
||||||
|
format: 'yyyy-MM-dd',
|
||||||
|
valueFormat: 'yyyy-MM-dd',
|
||||||
|
rangeSeparator: '-',
|
||||||
|
startPlaceholder: '开始时间',
|
||||||
|
endPlaceholder: '结束时间',
|
||||||
|
param: 'searchTime',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: 'button',
|
||||||
|
btnName: '查询',
|
||||||
|
name: 'search',
|
||||||
|
color: 'primary',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: this.$auth.hasPermi('cost:rawMaterialCostHis:export')
|
||||||
|
? 'button'
|
||||||
|
: '',
|
||||||
|
btnName: '导出',
|
||||||
|
name: 'export',
|
||||||
|
color: 'primary',
|
||||||
|
plain: true,
|
||||||
|
},
|
||||||
|
],
|
||||||
|
};
|
||||||
|
},
|
||||||
|
components: {},
|
||||||
|
created() {
|
||||||
|
getHotMaterialList().then((response) => {
|
||||||
|
this.formConfig[1].selectOptions = response.data;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
buttonClick(val) {
|
||||||
|
switch (val.btnName) {
|
||||||
|
case 'search':
|
||||||
|
this.listQuery.pageNo = 1;
|
||||||
|
this.listQuery.pageSize = 10;
|
||||||
|
this.listQuery.reportType = val.reportType;
|
||||||
|
this.listQuery.materialId = val.materialId;
|
||||||
|
this.listQuery.times = val.searchTime
|
||||||
|
? [
|
||||||
|
moment(val.searchTime[0]).startOf('day').format('x'),
|
||||||
|
moment(val.searchTime[1]).endOf('day').format('x'),
|
||||||
|
]
|
||||||
|
: null;
|
||||||
|
this.getDataList();
|
||||||
|
break;
|
||||||
|
case 'export':
|
||||||
|
this.listQuery.reportType = val.reportType;
|
||||||
|
this.listQuery.materialId = val.materialId;
|
||||||
|
this.listQuery.times = val.searchTime
|
||||||
|
? [
|
||||||
|
moment(val.searchTime[0]).startOf('day').format('x'),
|
||||||
|
moment(val.searchTime[1]).endOf('day').format('x'),
|
||||||
|
]
|
||||||
|
: null;
|
||||||
|
this.handleExport();
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
console.log(val);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
<style>
|
||||||
|
.app-container .el-table .el-table__cell {
|
||||||
|
padding: 0;
|
||||||
|
height: 35px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
BIN
src/views/databoard/assets/bg.png
Normal file
|
After Width: | Height: | Size: 2.7 MiB |
BIN
src/views/databoard/assets/flow.png
Normal file
|
After Width: | Height: | Size: 1.4 KiB |
BIN
src/views/databoard/assets/full.png
Normal file
|
After Width: | Height: | Size: 1.4 KiB |
BIN
src/views/databoard/assets/gas.png
Normal file
|
After Width: | Height: | Size: 2.0 KiB |
BIN
src/views/databoard/assets/head.png
Normal file
|
After Width: | Height: | Size: 20 KiB |
BIN
src/views/databoard/assets/high.png
Normal file
|
After Width: | Height: | Size: 54 KiB |
BIN
src/views/databoard/assets/middle.png
Normal file
|
After Width: | Height: | Size: 49 KiB |
BIN
src/views/databoard/assets/middle2.png
Normal file
|
After Width: | Height: | Size: 49 KiB |
BIN
src/views/databoard/assets/move.png
Normal file
|
After Width: | Height: | Size: 1.3 KiB |
BIN
src/views/databoard/assets/short.png
Normal file
|
After Width: | Height: | Size: 41 KiB |
97
src/views/databoard/components/Container.vue
Normal file
@@ -0,0 +1,97 @@
|
|||||||
|
<!--
|
||||||
|
filename: Container.vue
|
||||||
|
author: liubin
|
||||||
|
date: 2023-12-05 14:29:53
|
||||||
|
description: 窑炉容器
|
||||||
|
-->
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<div class="kiln-container" :class="['kiln-container__' + size]">
|
||||||
|
<div class="container-hd" style="display: flex; align-items: center">
|
||||||
|
<i
|
||||||
|
class=""
|
||||||
|
style="display: inline-block; margin-left: 12px; padding-top: 4px">
|
||||||
|
<img :src="imgSrc" width="18" height="16" alt="" />
|
||||||
|
</i>
|
||||||
|
<span
|
||||||
|
style="
|
||||||
|
color: #fff;
|
||||||
|
font-size: 20px;
|
||||||
|
line-height: 2;
|
||||||
|
margin-left: 6px;
|
||||||
|
display: inline-block;
|
||||||
|
">
|
||||||
|
{{ name }}
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<div class="container-body">
|
||||||
|
<slot>
|
||||||
|
<div class="test-body">something test....</div>
|
||||||
|
</slot>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
name: 'KilnContainer',
|
||||||
|
components: {},
|
||||||
|
props: ['name', 'width', 'size'],
|
||||||
|
data() {
|
||||||
|
return {};
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
imgSrc() {
|
||||||
|
switch (this.name) {
|
||||||
|
case '原料用量统计':
|
||||||
|
return require('../assets/move.png');
|
||||||
|
case '风机运行频率':
|
||||||
|
return require('../assets/flow.png');
|
||||||
|
case 'ISRA缺陷检测':
|
||||||
|
return require('../assets/gas.png');
|
||||||
|
case '能耗':
|
||||||
|
return require('../assets/gas.png');
|
||||||
|
case '窑炉信息':
|
||||||
|
return require('../assets/gas.png');
|
||||||
|
case '烟气处理':
|
||||||
|
return require('../assets/gas.png');
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
|
methods: {},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="scss">
|
||||||
|
.kiln-container {
|
||||||
|
display: inline-block;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
padding: 8px;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
position: relative;
|
||||||
|
|
||||||
|
&__small {
|
||||||
|
background: url(../assets/short.png) no-repeat;
|
||||||
|
background-size: 100% 100%;
|
||||||
|
background-position: 0 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
&__middle {
|
||||||
|
background: url(../assets/middle.png) no-repeat;
|
||||||
|
background-size: 100% 100%;
|
||||||
|
background-position: 0 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
&__large {
|
||||||
|
background: url(../assets/high.png) no-repeat;
|
||||||
|
background-size: 100% 100%;
|
||||||
|
background-position: 0 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.container-body {
|
||||||
|
flex: 1;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
84
src/views/databoard/components/DateBtnGroup.vue
Normal file
@@ -0,0 +1,84 @@
|
|||||||
|
<!--
|
||||||
|
filename: DateBtnGroup.vue
|
||||||
|
author: liubin
|
||||||
|
date: 2023-12-05 14:35:14
|
||||||
|
description: 日期按钮组
|
||||||
|
-->
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<div class="date-btn-group">
|
||||||
|
<button
|
||||||
|
class="btn"
|
||||||
|
:class="{ 'btn-active': active == '日' }"
|
||||||
|
@click="handleClick('日')">
|
||||||
|
日
|
||||||
|
</button>
|
||||||
|
<button
|
||||||
|
class="btn"
|
||||||
|
:class="{ 'btn-active': active == '周' }"
|
||||||
|
@click="handleClick('周')">
|
||||||
|
周
|
||||||
|
</button>
|
||||||
|
<button
|
||||||
|
class="btn"
|
||||||
|
:class="{ 'btn-active': active == '月' }"
|
||||||
|
@click="handleClick('月')">
|
||||||
|
月
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
name: 'DateBtnGroup',
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
active: '日',
|
||||||
|
};
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
handleClick(v) {
|
||||||
|
this.active = v;
|
||||||
|
this.$emit('change', v);
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="scss">
|
||||||
|
button {
|
||||||
|
appearance: none;
|
||||||
|
border: none;
|
||||||
|
outline: none;
|
||||||
|
background: none;
|
||||||
|
padding: 6px 8px;
|
||||||
|
}
|
||||||
|
.date-btn-group {
|
||||||
|
// position: absolute;
|
||||||
|
// top: 40px;
|
||||||
|
// right: 100px;
|
||||||
|
// border: 1px solid #ccc;
|
||||||
|
// padding: 12px;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn {
|
||||||
|
cursor: pointer;
|
||||||
|
border: 1px solid #11e8e4;
|
||||||
|
border-radius: 4px;
|
||||||
|
color: #11e8e4;
|
||||||
|
transition: all 0.3s ease-in-out;
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
background: #11e8e4;
|
||||||
|
color: #013433;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-active {
|
||||||
|
background: #11e8e4;
|
||||||
|
color: #013433;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
150
src/views/databoard/components/GasChart.vue
Normal file
@@ -0,0 +1,150 @@
|
|||||||
|
<!--
|
||||||
|
filename: GasChart.vue
|
||||||
|
author: liubin
|
||||||
|
date: 2023-12-12 10:53:49
|
||||||
|
description:
|
||||||
|
-->
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<div class="gas-chart"></div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import * as echarts from 'echarts';
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'GasChart',
|
||||||
|
components: {},
|
||||||
|
props: {},
|
||||||
|
data() {
|
||||||
|
const colors = [
|
||||||
|
'#12FFF5',
|
||||||
|
'#2760FF',
|
||||||
|
'#FFD160',
|
||||||
|
'#E80091',
|
||||||
|
'#8064ff',
|
||||||
|
'#ff8a3b',
|
||||||
|
'#8cd26d',
|
||||||
|
'#2aa1ff',
|
||||||
|
];
|
||||||
|
return {
|
||||||
|
chart: null,
|
||||||
|
option: {
|
||||||
|
color: colors,
|
||||||
|
grid: { top: 32, right: 12, bottom: 20, left: 48 },
|
||||||
|
xAxis: {
|
||||||
|
type: 'category',
|
||||||
|
data: Array(7)
|
||||||
|
.fill(1)
|
||||||
|
.map((_, index) => {
|
||||||
|
const today = new Date();
|
||||||
|
const dtimestamp = today - index * 24 * 60 * 60 * 1000;
|
||||||
|
return `${new Date(dtimestamp).getMonth() + 1}.${new Date(
|
||||||
|
dtimestamp
|
||||||
|
).getDate()}`;
|
||||||
|
})
|
||||||
|
.reverse(),
|
||||||
|
axisLabel: {
|
||||||
|
color: '#fff',
|
||||||
|
fontSize: 12,
|
||||||
|
},
|
||||||
|
axisTick: { show: false },
|
||||||
|
axisLine: {
|
||||||
|
lineStyle: {
|
||||||
|
width: 1,
|
||||||
|
color: '#213259',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
yAxis: {
|
||||||
|
name: '单位m³/h',
|
||||||
|
nameTextStyle: {
|
||||||
|
color: '#fff',
|
||||||
|
fontSize: 10,
|
||||||
|
align: 'right',
|
||||||
|
},
|
||||||
|
type: 'value',
|
||||||
|
axisLabel: {
|
||||||
|
color: '#fff',
|
||||||
|
fontSize: 12,
|
||||||
|
},
|
||||||
|
axisLine: {
|
||||||
|
show: true,
|
||||||
|
lineStyle: {
|
||||||
|
color: '#213259',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
splitLine: {
|
||||||
|
lineStyle: {
|
||||||
|
color: '#213259a0',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
series: [
|
||||||
|
Array(7)
|
||||||
|
.fill(1)
|
||||||
|
.map((_) => Math.ceil(Math.random() * 100)),
|
||||||
|
Array(7)
|
||||||
|
.fill(1)
|
||||||
|
.map((_) => Math.ceil(Math.random() * 100)),
|
||||||
|
Array(7)
|
||||||
|
.fill(1)
|
||||||
|
.map((_) => Math.ceil(Math.random() * 100)),
|
||||||
|
].map((v, i) => ({
|
||||||
|
name: ['总量', '白班', '夜班'][i],
|
||||||
|
data: v,
|
||||||
|
type: 'line',
|
||||||
|
symbol: 'circle',
|
||||||
|
areaStyle: {
|
||||||
|
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
|
||||||
|
// i % 8 避免超过8个数据时无颜色的问题
|
||||||
|
{ offset: 0, color: colors[i % 8] + '40' },
|
||||||
|
{ offset: 0.5, color: colors[i % 8] + '20' },
|
||||||
|
{ offset: 1, color: colors[i % 8] + '00' },
|
||||||
|
]),
|
||||||
|
},
|
||||||
|
})),
|
||||||
|
tooltip: {
|
||||||
|
trigger: 'axis',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
},
|
||||||
|
inject: ['resizeChart'],
|
||||||
|
computed: {
|
||||||
|
sidebarStatus() {
|
||||||
|
return this.$store.state.app.sidebar.opened;
|
||||||
|
},
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
sidebarStatus(val) {
|
||||||
|
console.log('sidebarStatus', val);
|
||||||
|
this.chart && this.chart.dispose();
|
||||||
|
|
||||||
|
setTimeout(() => {
|
||||||
|
this.chart = echarts.init(this.$el);
|
||||||
|
this.chart.setOption(this.option);
|
||||||
|
}, 500);
|
||||||
|
},
|
||||||
|
// resizeChart(val) {
|
||||||
|
// console.log('resizeChart', val);
|
||||||
|
// val && this.chart && this.chart.resize();
|
||||||
|
// },
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
this.$el.addEventListener('resize', () => {
|
||||||
|
console.log('resziing.....');
|
||||||
|
});
|
||||||
|
this.chart = echarts.init(this.$el);
|
||||||
|
this.chart.setOption(this.option);
|
||||||
|
},
|
||||||
|
methods: {},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="scss">
|
||||||
|
.gas-chart {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
75
src/views/databoard/components/Header.vue
Normal file
@@ -0,0 +1,75 @@
|
|||||||
|
<!--
|
||||||
|
filename: Header.vue
|
||||||
|
author: liubin
|
||||||
|
date: 2023-12-05 14:30:46
|
||||||
|
description: 顶部标题
|
||||||
|
-->
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<header class="kiln-header">
|
||||||
|
<h1
|
||||||
|
style="
|
||||||
|
font-size: 32px;
|
||||||
|
margin-bottom: 36px;
|
||||||
|
color: #0ee8e4;
|
||||||
|
letter-spacing: 5px;
|
||||||
|
">
|
||||||
|
窑炉生产运行驾驶舱
|
||||||
|
</h1>
|
||||||
|
<!-- left: 312px; -->
|
||||||
|
<div
|
||||||
|
class="firm"
|
||||||
|
style="
|
||||||
|
position: absolute;
|
||||||
|
bottom: 24px;
|
||||||
|
left: 16.5vw;
|
||||||
|
color: #fff;
|
||||||
|
font-size: 16px;
|
||||||
|
letter-spacing: 1px;
|
||||||
|
">
|
||||||
|
单位: 河南汇融科技服务有限公司
|
||||||
|
</div>
|
||||||
|
<div
|
||||||
|
class="datetime"
|
||||||
|
style="
|
||||||
|
position: absolute;
|
||||||
|
bottom: 18px;
|
||||||
|
right: 15.5vw;
|
||||||
|
color: #fff;
|
||||||
|
font-size: 16px;
|
||||||
|
letter-spacing: 1px;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 16px;
|
||||||
|
">
|
||||||
|
<DateBtnGroup />
|
||||||
|
{{ new Date().toLocaleString() }}
|
||||||
|
</div>
|
||||||
|
</header>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import DateBtnGroup from './DateBtnGroup.vue';
|
||||||
|
export default {
|
||||||
|
name: 'KilnHeader',
|
||||||
|
components: { DateBtnGroup },
|
||||||
|
props: {},
|
||||||
|
data() {
|
||||||
|
return {};
|
||||||
|
},
|
||||||
|
computed: {},
|
||||||
|
methods: {},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="scss">
|
||||||
|
.kiln-header {
|
||||||
|
background: url('../assets/head.png') no-repeat;
|
||||||
|
height: 88px;
|
||||||
|
background-size: 100%;
|
||||||
|
background-position: 0 0;
|
||||||
|
display: grid;
|
||||||
|
place-content: center;
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
235
src/views/databoard/components/ISRAChart.vue
Normal file
@@ -0,0 +1,235 @@
|
|||||||
|
<!--
|
||||||
|
filename: ISRAChart.vue
|
||||||
|
author: liubin
|
||||||
|
date: 2023-12-12 09:05:25
|
||||||
|
description:
|
||||||
|
-->
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<div class="isra-chart"></div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import * as echarts from 'echarts';
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'ISRAChart',
|
||||||
|
components: {},
|
||||||
|
props: {},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
chart: null,
|
||||||
|
option: {
|
||||||
|
color: ['#2760ff', '#518eec', '#0ee8e4', '#ddb523'],
|
||||||
|
tooltip: {
|
||||||
|
trigger: 'item',
|
||||||
|
},
|
||||||
|
title: {
|
||||||
|
text: 11234,
|
||||||
|
subtext: '总数',
|
||||||
|
top: '43%',
|
||||||
|
left: '49%',
|
||||||
|
textAlign: 'center',
|
||||||
|
textStyle: {
|
||||||
|
fontSize: 32,
|
||||||
|
lineHeight: 16,
|
||||||
|
color: '#fff',
|
||||||
|
},
|
||||||
|
subtextStyle: {
|
||||||
|
fontSize: 16,
|
||||||
|
color: '#fff7',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
series: [
|
||||||
|
{
|
||||||
|
name: 'Access From',
|
||||||
|
type: 'pie',
|
||||||
|
radius: ['60%', '85%'],
|
||||||
|
avoidLabelOverlap: true,
|
||||||
|
label: {
|
||||||
|
show: true,
|
||||||
|
position: 'outside',
|
||||||
|
formatter: ({ dataIndex, percent }) => {
|
||||||
|
// console.log(
|
||||||
|
// ['#2760ff', '#518eec', '#0ee8e4', '#ddb523'][dataIndex % 4],
|
||||||
|
// percent
|
||||||
|
// );
|
||||||
|
const styleName = ['a', 'b', 'c', 'd'][dataIndex % 4];
|
||||||
|
return `{${styleName}|${percent}%}`;
|
||||||
|
},
|
||||||
|
rich: {
|
||||||
|
a: {
|
||||||
|
color: '#2760ff',
|
||||||
|
fontSize: 18,
|
||||||
|
borderWidth: 0,
|
||||||
|
textBorderWidth: 0,
|
||||||
|
},
|
||||||
|
b: {
|
||||||
|
color: '#518eec',
|
||||||
|
fontSize: 18,
|
||||||
|
borderWidth: 0,
|
||||||
|
textBorderWidth: 0,
|
||||||
|
},
|
||||||
|
c: {
|
||||||
|
color: '#0ee8e4',
|
||||||
|
fontSize: 18,
|
||||||
|
borderWidth: 0,
|
||||||
|
textBorderWidth: 0,
|
||||||
|
},
|
||||||
|
d: {
|
||||||
|
color: '#ddb523',
|
||||||
|
fontSize: 18,
|
||||||
|
borderWidth: 0,
|
||||||
|
textBorderWidth: 0,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
labelLine: {
|
||||||
|
show: true,
|
||||||
|
},
|
||||||
|
itemStyle: {
|
||||||
|
borderRadius: 12,
|
||||||
|
// borderColor: 'transparent',
|
||||||
|
// borderWidth: 20
|
||||||
|
},
|
||||||
|
data: [
|
||||||
|
{
|
||||||
|
value: 1048,
|
||||||
|
name: '缺陷1',
|
||||||
|
itemStyle: {
|
||||||
|
color: {
|
||||||
|
type: 'linear',
|
||||||
|
x: 1,
|
||||||
|
y: 1,
|
||||||
|
x2: 0,
|
||||||
|
y2: 0,
|
||||||
|
colorStops: [
|
||||||
|
{
|
||||||
|
offset: 0,
|
||||||
|
color: '#2760ff', // 0% 处的颜色
|
||||||
|
},
|
||||||
|
// {
|
||||||
|
// offset: 0.6,
|
||||||
|
// color: 'transparent', // 80% 处的颜色
|
||||||
|
// },
|
||||||
|
{
|
||||||
|
offset: 1,
|
||||||
|
color: '#2760ff33', // 100% 处的颜色
|
||||||
|
},
|
||||||
|
],
|
||||||
|
global: false, // 缺省为 false
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: 735,
|
||||||
|
name: '缺陷2',
|
||||||
|
itemStyle: {
|
||||||
|
color: {
|
||||||
|
type: 'linear',
|
||||||
|
x: 0,
|
||||||
|
y: 0,
|
||||||
|
x2: 1,
|
||||||
|
y2: 0,
|
||||||
|
colorStops: [
|
||||||
|
{
|
||||||
|
offset: 0,
|
||||||
|
color: '#518eec', // 0% 处的颜色
|
||||||
|
},
|
||||||
|
// {
|
||||||
|
// offset: 0.6,
|
||||||
|
// color: 'transparent', // 80% 处的颜色
|
||||||
|
// },
|
||||||
|
{
|
||||||
|
offset: 1,
|
||||||
|
color: '#518eec33', // 100% 处的颜色
|
||||||
|
},
|
||||||
|
],
|
||||||
|
global: false, // 缺省为 false
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: 580,
|
||||||
|
name: '缺陷3',
|
||||||
|
itemStyle: {
|
||||||
|
color: {
|
||||||
|
type: 'linear',
|
||||||
|
x: 0,
|
||||||
|
y: 0,
|
||||||
|
x2: 1,
|
||||||
|
y2: 1,
|
||||||
|
colorStops: [
|
||||||
|
{
|
||||||
|
offset: 0,
|
||||||
|
color: '#0ee8e4', // 0% 处的颜色
|
||||||
|
},
|
||||||
|
// {
|
||||||
|
// offset: 0.6,
|
||||||
|
// color: 'transparent', // 80% 处的颜色
|
||||||
|
// },
|
||||||
|
{
|
||||||
|
offset: 1,
|
||||||
|
color: '#0ee8e433', // 100% 处的颜色
|
||||||
|
},
|
||||||
|
],
|
||||||
|
global: false, // 缺省为 false
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: 484,
|
||||||
|
name: '缺陷4',
|
||||||
|
itemStyle: {
|
||||||
|
color: {
|
||||||
|
type: 'linear',
|
||||||
|
x: 1,
|
||||||
|
y: 0,
|
||||||
|
x2: 0,
|
||||||
|
y2: 0,
|
||||||
|
colorStops: [
|
||||||
|
{
|
||||||
|
offset: 0,
|
||||||
|
color: '#ddb523', // 0% 处的颜色
|
||||||
|
},
|
||||||
|
// {
|
||||||
|
// offset: 0.6,
|
||||||
|
// color: 'transparent', // 70% 处的颜色
|
||||||
|
// },
|
||||||
|
{
|
||||||
|
offset: 1,
|
||||||
|
color: '#ddb52333', // 100% 处的颜色
|
||||||
|
},
|
||||||
|
],
|
||||||
|
global: false, // 缺省为 false
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
};
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
this.initChart();
|
||||||
|
},
|
||||||
|
activated() {
|
||||||
|
// this.initChart();
|
||||||
|
},
|
||||||
|
computed: {},
|
||||||
|
methods: {
|
||||||
|
initChart() {
|
||||||
|
this.chart = echarts.init(this.$el);
|
||||||
|
this.chart.setOption(this.option);
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="scss">
|
||||||
|
.isra-chart {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
69
src/views/databoard/components/SelectorBtnGroup.vue
Normal file
@@ -0,0 +1,69 @@
|
|||||||
|
<!--
|
||||||
|
filename: SelectorBtnGroup.vue
|
||||||
|
author: liubin
|
||||||
|
date: 2023-12-05 14:28:24
|
||||||
|
description: 选项按钮组
|
||||||
|
-->
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<div class="selector-btn-group">
|
||||||
|
<button
|
||||||
|
class="btn"
|
||||||
|
v-for="opt in options"
|
||||||
|
:key="opt"
|
||||||
|
@click="active = opt"
|
||||||
|
:class="active == opt ? 'btn-active' : ''">
|
||||||
|
{{ opt }}
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
name: 'SelectorBtnGroup',
|
||||||
|
components: {},
|
||||||
|
props: ['options'],
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
active: this.options[0] || 'default'
|
||||||
|
};
|
||||||
|
},
|
||||||
|
computed: {},
|
||||||
|
methods: {},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="scss">
|
||||||
|
button {
|
||||||
|
border: none;
|
||||||
|
appearance: none;
|
||||||
|
outline: none;
|
||||||
|
color: red;
|
||||||
|
font-size: 14px;
|
||||||
|
padding: 8px 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
button:first-child {
|
||||||
|
border-top-left-radius: 8px;
|
||||||
|
border-bottom-left-radius: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
button:last-child {
|
||||||
|
border-top-right-radius: 8px;
|
||||||
|
border-bottom-right-radius: 8px;
|
||||||
|
}
|
||||||
|
.selector-btn-group {
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn {
|
||||||
|
background: #03233c;
|
||||||
|
color: #fff;
|
||||||
|
cursor: pointer;
|
||||||
|
transition: all 0.3s ease-out;
|
||||||
|
|
||||||
|
&.btn-active,
|
||||||
|
&:hover {
|
||||||
|
background: #0f3d5c;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
71
src/views/databoard/components/ShadowRect.vue
Normal file
@@ -0,0 +1,71 @@
|
|||||||
|
<!--
|
||||||
|
filename: ShadowRect.vue
|
||||||
|
author: liubin
|
||||||
|
date: 2023-12-05 14:28:57
|
||||||
|
description: 阴影矩形
|
||||||
|
-->
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<div class="shadow-rect" :style="{ borderRadius: rounded ? '8px' : '2px' }">
|
||||||
|
<slot>
|
||||||
|
<div
|
||||||
|
class="test-data"
|
||||||
|
style="flex: 1; display: flex; align-items: center">
|
||||||
|
<span
|
||||||
|
style="
|
||||||
|
flex: 7;
|
||||||
|
color: #fff;
|
||||||
|
text-align: right;
|
||||||
|
font-size: 18px;
|
||||||
|
line-height: 1.12;
|
||||||
|
letter-spacing: 1px;
|
||||||
|
padding-right: 12px;
|
||||||
|
">
|
||||||
|
窑炉压力碹顶加权
|
||||||
|
</span>
|
||||||
|
<span
|
||||||
|
style="
|
||||||
|
flex: 3;
|
||||||
|
color: #fff;
|
||||||
|
text-align: left;
|
||||||
|
font-size: 18px;
|
||||||
|
line-height: 1.12;
|
||||||
|
padding-right: 8px;
|
||||||
|
">
|
||||||
|
92Kpa
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</slot>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
name: '',
|
||||||
|
components: {},
|
||||||
|
props: ['rounded'],
|
||||||
|
data() {
|
||||||
|
return {};
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
rounded(val) {
|
||||||
|
if (val) {
|
||||||
|
console.log('val', val);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
|
computed: {},
|
||||||
|
methods: {},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="scss">
|
||||||
|
.shadow-rect {
|
||||||
|
padding: 8px;
|
||||||
|
border-radius: 2px;
|
||||||
|
box-shadow: inset 0 0 8px 2px #ccc3;
|
||||||
|
color: white;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
57
src/views/databoard/components/Switcher.vue
Normal file
@@ -0,0 +1,57 @@
|
|||||||
|
<!--
|
||||||
|
filename: Switcher.vue
|
||||||
|
author: liubin
|
||||||
|
date: 2023-12-05 14:29:29
|
||||||
|
description: 开关
|
||||||
|
-->
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<div class="switcher" style="display: flex; align-items: center; gap: 12px">
|
||||||
|
<el-switch v-model="value"></el-switch>
|
||||||
|
<span style="color: #fff; font-size: 16px">{{ mode }}</span>
|
||||||
|
;
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
name: 'Switcher',
|
||||||
|
components: {},
|
||||||
|
props: {},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
value: true,
|
||||||
|
};
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
mode() {
|
||||||
|
return this.value ? '历史详情' : '实时数据';
|
||||||
|
},
|
||||||
|
},
|
||||||
|
methods: {},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="scss">
|
||||||
|
.switcher {
|
||||||
|
:deep(.el-switch__core) {
|
||||||
|
border: none;
|
||||||
|
background-color: #213d566b;
|
||||||
|
|
||||||
|
&::after {
|
||||||
|
background-color: #02457e;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
:deep(.is-checked) {
|
||||||
|
.el-switch__core {
|
||||||
|
border: none;
|
||||||
|
background-color: #b4fffc;
|
||||||
|
|
||||||
|
&::after {
|
||||||
|
background-color: #08d8cd;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
16
src/views/databoard/components/line.js
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
export default {
|
||||||
|
name: 'KilnLine',
|
||||||
|
props: ['horizontal'],
|
||||||
|
render: function (h) {
|
||||||
|
return (
|
||||||
|
<div
|
||||||
|
class="line"
|
||||||
|
style={{
|
||||||
|
width: this.horizontal ? '100%' : '4px',
|
||||||
|
height: this.horizontal ? '4px' : '100%',
|
||||||
|
background:
|
||||||
|
'radial-gradient(ellipse at center, #3CE7FF, #3CE7FF66, transparent, transparent)',
|
||||||
|
}}></div>
|
||||||
|
);
|
||||||
|
},
|
||||||
|
};
|
||||||
101
src/views/databoard/kiln/EnergeCost.vue
Normal file
@@ -0,0 +1,101 @@
|
|||||||
|
<!--
|
||||||
|
filename: MaterialCost.vue
|
||||||
|
author: liubin
|
||||||
|
date: 2023-12-06 09:09:27
|
||||||
|
description:
|
||||||
|
-->
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<Container name="能耗" size="middle" style="">
|
||||||
|
<EnergeTop />
|
||||||
|
<SplitLine :horizontal="true" />
|
||||||
|
<div class="" style="flex: 2; padding: 8px">
|
||||||
|
<div
|
||||||
|
class="header-line"
|
||||||
|
style="margin-bottom: 8px; display: flex; align-items: center">
|
||||||
|
<h2 class="" style="margin: 0; color: #0ee8fe; margin-right: 12px">
|
||||||
|
烟气趋势图
|
||||||
|
</h2>
|
||||||
|
<Switcher />
|
||||||
|
<div>
|
||||||
|
<span class="lgd lgd-total">总量</span>
|
||||||
|
<!-- <span class="lgd lgd-day">白班</span>
|
||||||
|
<span class="lgd lgd-night">夜班</span> -->
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div
|
||||||
|
class="select-line"
|
||||||
|
style="
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
">
|
||||||
|
<SelectorBtnGroup
|
||||||
|
:options="['氧气含量', '二氧化硫', '一氧化氢', '二氧化氢']" />
|
||||||
|
<SelectorBtnGroup :options="['日', '周', '月', '年']" />
|
||||||
|
</div>
|
||||||
|
<div class="chart" style="height: 150px; margin-top: 8px;">
|
||||||
|
<GasChart />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</Container>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import Container from '../components/Container.vue';
|
||||||
|
import ShadowRect from '../components/ShadowRect.vue';
|
||||||
|
import SplitLine from '../components/line';
|
||||||
|
import Switcher from '../components/Switcher.vue';
|
||||||
|
import EnergeTop from './EnergeTop.vue';
|
||||||
|
import GasChart from '../components/GasChart.vue';
|
||||||
|
import SelectorBtnGroup from '../components/SelectorBtnGroup.vue';
|
||||||
|
export default {
|
||||||
|
name: 'EnergeCost',
|
||||||
|
components: {
|
||||||
|
Container,
|
||||||
|
ShadowRect,
|
||||||
|
SplitLine,
|
||||||
|
Switcher,
|
||||||
|
EnergeTop,
|
||||||
|
GasChart,
|
||||||
|
SelectorBtnGroup,
|
||||||
|
},
|
||||||
|
props: {},
|
||||||
|
data() {
|
||||||
|
return {};
|
||||||
|
},
|
||||||
|
computed: {},
|
||||||
|
methods: {},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="scss">
|
||||||
|
.lgd {
|
||||||
|
color: #fff;
|
||||||
|
|
||||||
|
&:not(:last-child) {
|
||||||
|
margin-right: 12px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.lgd::before {
|
||||||
|
content: '';
|
||||||
|
display: inline-block;
|
||||||
|
width: 8px;
|
||||||
|
height: 8px;
|
||||||
|
margin-right: 4px;
|
||||||
|
border-radius: 2px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.lgd.lgd-total::before {
|
||||||
|
background-color: #ff9e00;
|
||||||
|
}
|
||||||
|
|
||||||
|
.lgd.lgd-day::before {
|
||||||
|
background-color: #08d8cd;
|
||||||
|
}
|
||||||
|
|
||||||
|
.lgd.lgd-night::before {
|
||||||
|
background-color: #0b58ff;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
123
src/views/databoard/kiln/EnergeTop.vue
Normal file
@@ -0,0 +1,123 @@
|
|||||||
|
<!--
|
||||||
|
filename: EnergeTop.vue
|
||||||
|
author: liubin
|
||||||
|
date: 2023-12-11 09:31:41
|
||||||
|
description:
|
||||||
|
-->
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<div
|
||||||
|
class="energe-top"
|
||||||
|
style="
|
||||||
|
flex: 1;
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: 1fr 1fr 1fr;
|
||||||
|
grid-template-rows: auto;
|
||||||
|
gap: 8px;
|
||||||
|
padding: 4px;
|
||||||
|
">
|
||||||
|
<ShadowRect
|
||||||
|
style="grid-row: 1 / 3; flex-direction: column; justify-content: center">
|
||||||
|
<span
|
||||||
|
style="
|
||||||
|
font-size: 16px;
|
||||||
|
line-height: 1.55;
|
||||||
|
text-align: right;
|
||||||
|
padding-right: 8px;
|
||||||
|
letter-spacing: 1px;
|
||||||
|
">
|
||||||
|
余热发电
|
||||||
|
</span>
|
||||||
|
<span
|
||||||
|
style="
|
||||||
|
font-size: 16px;
|
||||||
|
line-height: 1.55;
|
||||||
|
text-align: right;
|
||||||
|
padding-right: 8px;
|
||||||
|
letter-spacing: 1px;
|
||||||
|
">
|
||||||
|
1023kWh
|
||||||
|
</span>
|
||||||
|
</ShadowRect>
|
||||||
|
|
||||||
|
<ShadowRect>
|
||||||
|
<div
|
||||||
|
style="
|
||||||
|
font-size: 16px;
|
||||||
|
line-height: 1.25;
|
||||||
|
flex: 1.2;
|
||||||
|
text-align: right;
|
||||||
|
padding-right: 8px;
|
||||||
|
letter-spacing: 3px;
|
||||||
|
">
|
||||||
|
<p style="margin: 0; line-height: inherit">水耗量</p>
|
||||||
|
</div>
|
||||||
|
<span style="font-size: 16px; line-height: 1.24; flex: 1">32Km³</span>
|
||||||
|
</ShadowRect>
|
||||||
|
|
||||||
|
<ShadowRect>
|
||||||
|
<div
|
||||||
|
style="
|
||||||
|
font-size: 16px;
|
||||||
|
line-height: 1.25;
|
||||||
|
flex: 1.2;
|
||||||
|
text-align: right;
|
||||||
|
padding-right: 8px;
|
||||||
|
letter-spacing: 3px;
|
||||||
|
">
|
||||||
|
<p style="margin: 0; line-height: inherit">天然气I</p>
|
||||||
|
</div>
|
||||||
|
<span style="font-size: 16px; line-height: 1.24; flex: 1">322Km³</span>
|
||||||
|
</ShadowRect>
|
||||||
|
|
||||||
|
<ShadowRect>
|
||||||
|
<div
|
||||||
|
style="
|
||||||
|
font-size: 16px;
|
||||||
|
line-height: 1.25;
|
||||||
|
flex: 1.2;
|
||||||
|
text-align: right;
|
||||||
|
padding-right: 8px;
|
||||||
|
letter-spacing: 3px;
|
||||||
|
">
|
||||||
|
<p style="margin: 0; line-height: inherit">电耗量</p>
|
||||||
|
</div>
|
||||||
|
<span style="font-size: 16px; line-height: 1.24; flex: 1">132kWh</span>
|
||||||
|
</ShadowRect>
|
||||||
|
|
||||||
|
<ShadowRect>
|
||||||
|
<div
|
||||||
|
style="
|
||||||
|
font-size: 16px;
|
||||||
|
line-height: 1.25;
|
||||||
|
flex: 1.2;
|
||||||
|
text-align: right;
|
||||||
|
padding-right: 8px;
|
||||||
|
letter-spacing: 3px;
|
||||||
|
">
|
||||||
|
<p style="margin: 0; line-height: inherit">天然气II</p>
|
||||||
|
</div>
|
||||||
|
<span style="font-size: 16px; line-height: 1.24; flex: 1">992Km³</span>
|
||||||
|
</ShadowRect>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import ShadowRect from '../components/ShadowRect.vue';
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'EnergeTop',
|
||||||
|
components: { ShadowRect },
|
||||||
|
props: {},
|
||||||
|
data() {
|
||||||
|
return {};
|
||||||
|
},
|
||||||
|
computed: {},
|
||||||
|
methods: {},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="scss">
|
||||||
|
.energe-top {
|
||||||
|
}
|
||||||
|
</style>
|
||||||
58
src/views/databoard/kiln/FanSequence.vue
Normal file
@@ -0,0 +1,58 @@
|
|||||||
|
<!--
|
||||||
|
filename: FanSequence.vue
|
||||||
|
author: liubin
|
||||||
|
date: 2023-12-06 09:40:51
|
||||||
|
description:
|
||||||
|
-->
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<Container name="风机运行频率" size="middle" style="">
|
||||||
|
<div class="" style="position: absolute; top: 18px; left: 180px">
|
||||||
|
<Switcher />
|
||||||
|
</div>
|
||||||
|
<div
|
||||||
|
class="absolute"
|
||||||
|
style="
|
||||||
|
padding: 12px;
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: repeat(2, 1fr);
|
||||||
|
grid-auto-rows: auto;
|
||||||
|
gap: 8px;
|
||||||
|
">
|
||||||
|
<ShadowRect v-for="n in 14" :key="n" :rounded="false">
|
||||||
|
<span
|
||||||
|
style="
|
||||||
|
font-size: 16px;
|
||||||
|
line-height: 1.24;
|
||||||
|
flex: 1.2;
|
||||||
|
text-align: right;
|
||||||
|
padding-right: 8px;
|
||||||
|
letter-spacing: 1px;
|
||||||
|
">
|
||||||
|
{{ n }}#风机
|
||||||
|
</span>
|
||||||
|
<span style="font-size: 16px; line-height: 1.24; flex: 1">
|
||||||
|
{{ Math.floor(Math.random() * 100) }}Hz
|
||||||
|
</span>
|
||||||
|
</ShadowRect>
|
||||||
|
</div>
|
||||||
|
</Container>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import Container from '../components/Container.vue';
|
||||||
|
import ShadowRect from '../components/ShadowRect.vue';
|
||||||
|
import Switcher from '../components/Switcher.vue';
|
||||||
|
export default {
|
||||||
|
name: 'FanSequence',
|
||||||
|
components: { Container, ShadowRect, Switcher },
|
||||||
|
props: {},
|
||||||
|
data() {
|
||||||
|
return {};
|
||||||
|
},
|
||||||
|
computed: {},
|
||||||
|
methods: {},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="scss"></style>
|
||||||
176
src/views/databoard/kiln/GasHandle.vue
Normal file
@@ -0,0 +1,176 @@
|
|||||||
|
<!--
|
||||||
|
filename: GasHandle.vue
|
||||||
|
author: liubin
|
||||||
|
date: 2023-12-11 09:02:40
|
||||||
|
description:
|
||||||
|
-->
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<div class="gas-handle" style="flex: 2">
|
||||||
|
<Container name="烟气处理" size="large" style="">
|
||||||
|
<div
|
||||||
|
class=""
|
||||||
|
style="
|
||||||
|
flex: 1;
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: 1fr 1fr;
|
||||||
|
grid-template-rows: auto;
|
||||||
|
gap: 8px;
|
||||||
|
padding: 8px;
|
||||||
|
">
|
||||||
|
<ShadowRect>
|
||||||
|
<span
|
||||||
|
style="
|
||||||
|
font-size: 16px;
|
||||||
|
line-height: 1.24;
|
||||||
|
flex: 1.2;
|
||||||
|
text-align: right;
|
||||||
|
padding-right: 8px;
|
||||||
|
letter-spacing: 1px;
|
||||||
|
">
|
||||||
|
氧气含量
|
||||||
|
</span>
|
||||||
|
<span style="font-size: 16px; line-height: 1.24; flex: 1">82%</span>
|
||||||
|
</ShadowRect>
|
||||||
|
<ShadowRect>
|
||||||
|
<div
|
||||||
|
style="
|
||||||
|
font-size: 16px;
|
||||||
|
line-height: 1.5;
|
||||||
|
flex: 1.2;
|
||||||
|
text-align: right;
|
||||||
|
padding-right: 8px;
|
||||||
|
letter-spacing: 3px;
|
||||||
|
">
|
||||||
|
<p style="margin: 0; line-height: inherit">一氧化氮</p>
|
||||||
|
<p style="margin: 0; line-height: inherit">排放浓度</p>
|
||||||
|
</div>
|
||||||
|
<span style="font-size: 16px; line-height: 1.24; flex: 1">82%</span>
|
||||||
|
</ShadowRect>
|
||||||
|
|
||||||
|
<ShadowRect>
|
||||||
|
<div
|
||||||
|
style="
|
||||||
|
font-size: 16px;
|
||||||
|
line-height: 1.5;
|
||||||
|
flex: 1.2;
|
||||||
|
text-align: right;
|
||||||
|
padding-right: 8px;
|
||||||
|
letter-spacing: 3px;
|
||||||
|
">
|
||||||
|
<p style="margin: 0; line-height: inherit">二氧化硫</p>
|
||||||
|
<p style="margin: 0; line-height: inherit">排放浓度</p>
|
||||||
|
</div>
|
||||||
|
<span style="font-size: 16px; line-height: 1.24; flex: 1">82%</span>
|
||||||
|
</ShadowRect>
|
||||||
|
|
||||||
|
<ShadowRect>
|
||||||
|
<div
|
||||||
|
style="
|
||||||
|
font-size: 16px;
|
||||||
|
line-height: 1.5;
|
||||||
|
flex: 1.2;
|
||||||
|
text-align: right;
|
||||||
|
padding-right: 8px;
|
||||||
|
letter-spacing: 3px;
|
||||||
|
">
|
||||||
|
<p style="margin: 0; line-height: inherit">二氧化氮</p>
|
||||||
|
<p style="margin: 0; line-height: inherit">排放浓度</p>
|
||||||
|
</div>
|
||||||
|
<span style="font-size: 16px; line-height: 1.24; flex: 1">82%</span>
|
||||||
|
</ShadowRect>
|
||||||
|
</div>
|
||||||
|
<KilnLine :horizontal="true" />
|
||||||
|
<div class="" style="flex: 2; padding: 8px">
|
||||||
|
<div
|
||||||
|
class="header-line"
|
||||||
|
style="margin-bottom: 8px; display: flex; align-items: center">
|
||||||
|
<h2 class="" style="margin: 0; color: #0ee8fe; margin-right: 12px">
|
||||||
|
烟气趋势图
|
||||||
|
</h2>
|
||||||
|
<Switcher />
|
||||||
|
<div>
|
||||||
|
<span class="lgd lgd-total">总量</span>
|
||||||
|
<span class="lgd lgd-day">白班</span>
|
||||||
|
<span class="lgd lgd-night">夜班</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div
|
||||||
|
class="select-line"
|
||||||
|
style="
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
">
|
||||||
|
<SelectorBtnGroup
|
||||||
|
:options="['氧气含量', '二氧化硫', '一氧化氢', '二氧化氢']" />
|
||||||
|
<SelectorBtnGroup :options="['日', '周', '月', '年']" />
|
||||||
|
</div>
|
||||||
|
<div class="chart" style="height: 220px">
|
||||||
|
<GasChart />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</Container>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import Container from '../components/Container.vue';
|
||||||
|
import ShadowRect from '../components/ShadowRect.vue';
|
||||||
|
import KilnLine from '../components/line';
|
||||||
|
import Switcher from '../components/Switcher.vue';
|
||||||
|
import SelectorBtnGroup from '../components/SelectorBtnGroup.vue';
|
||||||
|
import GasChart from '../components/GasChart.vue';
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'GasHandle',
|
||||||
|
components: {
|
||||||
|
Container,
|
||||||
|
ShadowRect,
|
||||||
|
KilnLine,
|
||||||
|
Switcher,
|
||||||
|
SelectorBtnGroup,
|
||||||
|
GasChart,
|
||||||
|
},
|
||||||
|
props: {},
|
||||||
|
data() {
|
||||||
|
return {};
|
||||||
|
},
|
||||||
|
computed: {},
|
||||||
|
methods: {},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="scss">
|
||||||
|
.gas-handle {
|
||||||
|
}
|
||||||
|
|
||||||
|
.lgd {
|
||||||
|
color: #fff;
|
||||||
|
|
||||||
|
&:not(:last-child) {
|
||||||
|
margin-right: 12px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.lgd::before {
|
||||||
|
content: '';
|
||||||
|
display: inline-block;
|
||||||
|
width: 8px;
|
||||||
|
height: 8px;
|
||||||
|
margin-right: 4px;
|
||||||
|
border-radius: 2px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.lgd.lgd-total::before {
|
||||||
|
background-color: #ff9e00;
|
||||||
|
}
|
||||||
|
|
||||||
|
.lgd.lgd-day::before {
|
||||||
|
background-color: #08d8cd;
|
||||||
|
}
|
||||||
|
|
||||||
|
.lgd.lgd-night::before {
|
||||||
|
background-color: #0b58ff;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
84
src/views/databoard/kiln/IsraCheck.vue
Normal file
@@ -0,0 +1,84 @@
|
|||||||
|
<!--
|
||||||
|
filename: IsraCheck.vue
|
||||||
|
author: liubin
|
||||||
|
date: 2023-12-06 09:50:13
|
||||||
|
description:
|
||||||
|
-->
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<Container name="ISRA缺陷检测" size="middle" style="">
|
||||||
|
<div style="padding: 12px; display: flex; flex-direction: column; gap: 8px; height: 100%;">
|
||||||
|
<div class="f" style="flex: 9;">
|
||||||
|
<ISRAChart />
|
||||||
|
</div>
|
||||||
|
<ul
|
||||||
|
class="legend"
|
||||||
|
style="
|
||||||
|
flex: 1;
|
||||||
|
padding: 8px;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
gap: 20px;
|
||||||
|
color: #fff;
|
||||||
|
font-size: 14px;
|
||||||
|
">
|
||||||
|
<li class="fault-1">缺陷1</li>
|
||||||
|
<li class="fault-2">缺陷2</li>
|
||||||
|
<li class="fault-3">缺陷3</li>
|
||||||
|
<li class="fault-4">缺陷4</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</Container>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import Container from '../components/Container.vue';
|
||||||
|
import ShadowRect from '../components/ShadowRect.vue';
|
||||||
|
import ISRAChart from '../components/ISRAChart.vue';
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'IsraCheck',
|
||||||
|
components: { Container, ShadowRect, ISRAChart },
|
||||||
|
props: {},
|
||||||
|
data() {
|
||||||
|
return {};
|
||||||
|
},
|
||||||
|
computed: {},
|
||||||
|
methods: {},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="scss">
|
||||||
|
ul,
|
||||||
|
li {
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
list-style: none;
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
li::before {
|
||||||
|
content: '';
|
||||||
|
display: inline-block;
|
||||||
|
width: 8px;
|
||||||
|
height: 8px;
|
||||||
|
border-radius: 50%;
|
||||||
|
background: #ccc;
|
||||||
|
position: absolute;
|
||||||
|
top: 30%;
|
||||||
|
left: -12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
li.fault-1::before {
|
||||||
|
background: #2760ff;
|
||||||
|
}
|
||||||
|
li.fault-2::before {
|
||||||
|
background: #518eec;
|
||||||
|
}
|
||||||
|
li.fault-3::before {
|
||||||
|
background: #0ee8e4;
|
||||||
|
}
|
||||||
|
li.fault-4::before {
|
||||||
|
background: #ddb523;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
71
src/views/databoard/kiln/KilnInfo.vue
Normal file
@@ -0,0 +1,71 @@
|
|||||||
|
<!--
|
||||||
|
filename: KilnInfo.vue
|
||||||
|
author: liubin
|
||||||
|
date: 2023-12-11 09:01:15
|
||||||
|
description:
|
||||||
|
-->
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<div class="kiln-info" style="flex: 1">
|
||||||
|
<Container name="窑炉信息" size="small" style="">
|
||||||
|
<div
|
||||||
|
class="absolute"
|
||||||
|
style="
|
||||||
|
padding: 12px;
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: repeat(2, 1fr);
|
||||||
|
grid-auto-rows: auto;
|
||||||
|
gap: 8px;
|
||||||
|
">
|
||||||
|
<ShadowRect v-for="info in kilnInfo" :key="info.name" :rounded="false">
|
||||||
|
<span
|
||||||
|
style="
|
||||||
|
font-size: 16px;
|
||||||
|
line-height: 1.45;
|
||||||
|
flex: 1.2;
|
||||||
|
text-align: right;
|
||||||
|
padding-right: 8px;
|
||||||
|
letter-spacing: 1px;
|
||||||
|
">
|
||||||
|
{{ info.name }}
|
||||||
|
</span>
|
||||||
|
<span style="font-size: 16px; line-height: 1.45; flex: 1">
|
||||||
|
{{ info.value }}
|
||||||
|
<!-- {{ Math.floor(Math.random() * 100) }}Hz -->
|
||||||
|
</span>
|
||||||
|
</ShadowRect>
|
||||||
|
</div>
|
||||||
|
</Container>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import Container from '../components/Container.vue';
|
||||||
|
import ShadowRect from '../components/ShadowRect.vue';
|
||||||
|
export default {
|
||||||
|
name: 'KilnInfo',
|
||||||
|
components: { Container, ShadowRect },
|
||||||
|
props: {},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
kilnInfo: [
|
||||||
|
{ name: '窑炉压力', value: '83Kpa' },
|
||||||
|
{ name: '循环水温度', value: '53℃' },
|
||||||
|
{ name: '循环水流量', value: '23m³/h' },
|
||||||
|
{ name: '循环水压力', value: '33Kpa' },
|
||||||
|
{ name: '助燃风压力', value: '12Kpa' },
|
||||||
|
{ name: '碹顶加权温度', value: '32℃' },
|
||||||
|
{ name: '压缩气压力', value: '83Kpa' },
|
||||||
|
{ name: '融化加权温度', value: '123℃' },
|
||||||
|
],
|
||||||
|
};
|
||||||
|
},
|
||||||
|
computed: {},
|
||||||
|
methods: {},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="scss">
|
||||||
|
.kiln-info {
|
||||||
|
}
|
||||||
|
</style>
|
||||||
41
src/views/databoard/kiln/LeftFour.vue
Normal file
@@ -0,0 +1,41 @@
|
|||||||
|
<!--
|
||||||
|
filename: LeftFour.vue
|
||||||
|
author: liubin
|
||||||
|
date: 2023-12-06 09:35:30
|
||||||
|
description:
|
||||||
|
-->
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<div
|
||||||
|
class="left-four"
|
||||||
|
style="
|
||||||
|
display: grid;
|
||||||
|
gap: 16px;
|
||||||
|
grid-template-columns: 1fr 1fr;
|
||||||
|
grid-template-rows: 1fr 1fr;
|
||||||
|
">
|
||||||
|
<MaterialCost />
|
||||||
|
<IsraCheck />
|
||||||
|
<EnergeCost />
|
||||||
|
<FanSequence />
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import MaterialCost from './MaterialCost.vue';
|
||||||
|
import FanSequence from './FanSequence.vue';
|
||||||
|
import IsraCheck from './IsraCheck.vue';
|
||||||
|
import EnergeCost from './EnergeCost.vue';
|
||||||
|
export default {
|
||||||
|
name: 'LeftFour',
|
||||||
|
components: { MaterialCost, EnergeCost, IsraCheck, FanSequence },
|
||||||
|
props: {},
|
||||||
|
data() {
|
||||||
|
return {};
|
||||||
|
},
|
||||||
|
computed: {},
|
||||||
|
methods: {},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="scss"></style>
|
||||||
58
src/views/databoard/kiln/MaterialCost.vue
Normal file
@@ -0,0 +1,58 @@
|
|||||||
|
<!--
|
||||||
|
filename: MaterialCost.vue
|
||||||
|
author: liubin
|
||||||
|
date: 2023-12-06 09:09:27
|
||||||
|
description:
|
||||||
|
-->
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<Container name="原料用量统计" size="middle" style="">
|
||||||
|
<div
|
||||||
|
class="absolute"
|
||||||
|
style="
|
||||||
|
padding: 12px;
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: repeat(3, 1fr);
|
||||||
|
grid-auto-rows: auto;
|
||||||
|
gap: 8px;
|
||||||
|
">
|
||||||
|
<ShadowRect v-for="n in 9" :key="n" :rounded="false">
|
||||||
|
<div
|
||||||
|
class="material"
|
||||||
|
style="
|
||||||
|
flex: 1;
|
||||||
|
padding: 6px;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: 4px;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
">
|
||||||
|
<span style="color: #0ee8e4; font-weight: 500; font-size: 32px">
|
||||||
|
234
|
||||||
|
</span>
|
||||||
|
<span style="color: #fff; font-size: 14px; letter-spacing: 1px">
|
||||||
|
- 原料1/吨 -
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</ShadowRect>
|
||||||
|
</div>
|
||||||
|
</Container>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import Container from '../components/Container.vue';
|
||||||
|
import ShadowRect from '../components/ShadowRect.vue';
|
||||||
|
export default {
|
||||||
|
name: 'MaterialCost',
|
||||||
|
components: { Container, ShadowRect },
|
||||||
|
props: {},
|
||||||
|
data() {
|
||||||
|
return {};
|
||||||
|
},
|
||||||
|
computed: {},
|
||||||
|
methods: {},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="scss"></style>
|
||||||
37
src/views/databoard/kiln/RightTwo.vue
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
<!--
|
||||||
|
filename: RightTwo.vue
|
||||||
|
author: liubin
|
||||||
|
date: 2023-12-06 10:19:00
|
||||||
|
description:
|
||||||
|
-->
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<div
|
||||||
|
class="right-two"
|
||||||
|
style="display: flex; gap: 16px; flex-direction: column">
|
||||||
|
<KilnInfo />
|
||||||
|
<GasHandle />
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import Container from '../components/Container.vue';
|
||||||
|
import ShadowRect from '../components/ShadowRect.vue';
|
||||||
|
import KilnLine from '../components/line';
|
||||||
|
import Switcher from '../components/Switcher.vue';
|
||||||
|
import SelectorBtnGroup from '../components/SelectorBtnGroup.vue';
|
||||||
|
import KilnInfo from './KilnInfo.vue';
|
||||||
|
import GasHandle from './GasHandle.vue';
|
||||||
|
export default {
|
||||||
|
name: 'RightTwo',
|
||||||
|
components: { Container, Switcher, SelectorBtnGroup, KilnLine, ShadowRect, KilnInfo, GasHandle },
|
||||||
|
props: {},
|
||||||
|
data() {
|
||||||
|
return {};
|
||||||
|
},
|
||||||
|
computed: {},
|
||||||
|
methods: {},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="scss"></style>
|
||||||
70
src/views/databoard/kiln/index.vue
Normal file
@@ -0,0 +1,70 @@
|
|||||||
|
<!--
|
||||||
|
filename: KilnDataBoard.vue
|
||||||
|
author: liubin
|
||||||
|
date: 2023-12-04 16:51:00
|
||||||
|
description:
|
||||||
|
-->
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<div
|
||||||
|
class="KilnDataBoard"
|
||||||
|
style="
|
||||||
|
position: absolute;
|
||||||
|
top: -8px;
|
||||||
|
left: -16px;
|
||||||
|
width: calc(100% + 28px);
|
||||||
|
height: calc(100% + 38px);
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: 16px;
|
||||||
|
">
|
||||||
|
<KHeader />
|
||||||
|
<div
|
||||||
|
class="main-body"
|
||||||
|
style="flex: 1; display: flex; gap: 16px; padding: 8px 16px">
|
||||||
|
<div class="left-side" style="flex: 2">
|
||||||
|
<LeftFour />
|
||||||
|
</div>
|
||||||
|
<div class="right-side" style="flex: 1">
|
||||||
|
<RightTwo />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import KHeader from '../components/Header.vue';
|
||||||
|
import LeftFour from './LeftFour.vue';
|
||||||
|
import RightTwo from './RightTwo.vue';
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'KilnDataBoard',
|
||||||
|
components: {
|
||||||
|
KHeader,
|
||||||
|
LeftFour,
|
||||||
|
RightTwo,
|
||||||
|
},
|
||||||
|
// provide() {
|
||||||
|
// return {
|
||||||
|
// resizeChart: null,
|
||||||
|
// };
|
||||||
|
// },
|
||||||
|
mounted() {
|
||||||
|
// this.$el.addEventListener('resize', () => {
|
||||||
|
// console.log('resizzzze...')
|
||||||
|
// this.resizeChart = Math.random();
|
||||||
|
// });
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {};
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="scss">
|
||||||
|
.KilnDataBoard {
|
||||||
|
background: url(../assets/bg.png) no-repeat;
|
||||||
|
background-size: cover;
|
||||||
|
background-position: 0 0;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -221,18 +221,30 @@ export default {
|
|||||||
timeSelect() {
|
timeSelect() {
|
||||||
switch (this.queryParams.timeDim) {
|
switch (this.queryParams.timeDim) {
|
||||||
case '1':
|
case '1':
|
||||||
|
if (!this.timeValue) {
|
||||||
|
this.$modal.msgError('时间范围不能为空')
|
||||||
|
return false
|
||||||
|
}
|
||||||
if (this.timeValue[1] - this.timeValue[0] > 7*24*3600000) {
|
if (this.timeValue[1] - this.timeValue[0] > 7*24*3600000) {
|
||||||
this.$modal.msgError('最大时间范围为7天,请重新选择')
|
this.$modal.msgError('最大时间范围为7天,请重新选择')
|
||||||
this.timeValue = []
|
this.timeValue = []
|
||||||
}
|
}
|
||||||
break
|
break
|
||||||
case '2':
|
case '2':
|
||||||
|
if (!this.dateValue) {
|
||||||
|
this.$modal.msgError('时间范围不能为空')
|
||||||
|
return false
|
||||||
|
}
|
||||||
if (this.dateValue[1] - this.dateValue[0] > 29*24*3600000) {
|
if (this.dateValue[1] - this.dateValue[0] > 29*24*3600000) {
|
||||||
this.$modal.msgError('最大时间范围为30天,请重新选择') // 自动选择默认是0:00:00要求是23:59:59
|
this.$modal.msgError('最大时间范围为30天,请重新选择') // 自动选择默认是0:00:00要求是23:59:59
|
||||||
this.dateValue = []
|
this.dateValue = []
|
||||||
}
|
}
|
||||||
break
|
break
|
||||||
case '4':
|
case '4':
|
||||||
|
if (!this.monthValue) {
|
||||||
|
this.$modal.msgError('时间范围不能为空')
|
||||||
|
return false
|
||||||
|
}
|
||||||
if (this.monthValue[1] - this.monthValue[0] > 729*24*3600000) {
|
if (this.monthValue[1] - this.monthValue[0] > 729*24*3600000) {
|
||||||
this.$modal.msgError('最大时间范围为24个月,请重新选择')// 同理上面
|
this.$modal.msgError('最大时间范围为24个月,请重新选择')// 同理上面
|
||||||
this.monthValue = []
|
this.monthValue = []
|
||||||
@@ -338,7 +350,7 @@ export default {
|
|||||||
}
|
}
|
||||||
switch (this.queryParams.timeDim) {
|
switch (this.queryParams.timeDim) {
|
||||||
case '1':
|
case '1':
|
||||||
if (this.timeValue.length > 0) {
|
if (this.timeValue && this.timeValue.length > 0) {
|
||||||
this.queryParams.startTime = this.timeValue[0]
|
this.queryParams.startTime = this.timeValue[0]
|
||||||
this.queryParams.endTime = this.timeValue[1] // 不用转
|
this.queryParams.endTime = this.timeValue[1] // 不用转
|
||||||
} else {
|
} else {
|
||||||
|
|||||||