Compare commits

...

40 Commits

Author SHA1 Message Date
zwq
8cd53915c1 修改仓库UI测试bug 2023-11-23 16:42:09 +08:00
571d204d68 Merge pull request 'projects/mes-zhp' (#105) from projects/mes-zhp into projects/mes-test
Reviewed-on: #105
2023-11-23 16:41:12 +08:00
‘937886381’
afafbccc0c Merge branch 'projects/mes-test' into projects/mes-zhp 2023-11-23 14:33:32 +08:00
‘937886381’
0948737f1a 修改bug 2023-11-23 14:32:53 +08:00
0ce6bc07a0 Merge pull request 'projects/mes-lb' (#104) from projects/mes-lb into projects/mes-test
Reviewed-on: #104
2023-11-22 17:09:03 +08:00
lb
e318aa4f59 Merge branch 'projects/mes-test' into projects/mes-lb 2023-11-22 17:05:53 +08:00
lb
ab09a2b08c update zentao bugs 2023-11-22 17:04:22 +08:00
d2d5503792 Merge pull request 'projects/mes-zjl' (#103) from projects/mes-zjl into projects/mes-test
Reviewed-on: #103
2023-11-22 17:01:21 +08:00
6940155e4f merge test 2023-11-22 17:00:32 +08:00
dfc758bfae 订单监控图 2023-11-22 16:58:32 +08:00
ec2994e928 Merge pull request 'projects/mes-dy' (#102) from projects/mes-dy into projects/mes-test
Reviewed-on: #102
2023-11-22 14:53:35 +08:00
helloDy
5492666b53 merge 2023-11-22 14:43:07 +08:00
lb
cd55b4c860 update 2023-11-22 14:41:53 +08:00
helloDy
a7f811aa3e bug 2023-11-22 14:41:10 +08:00
lb
33188481bf update login 2023-11-22 14:27:30 +08:00
0200fc08f1 Merge pull request 'projects/mes-zhp' (#101) from projects/mes-zhp into projects/mes-test
Reviewed-on: #101
2023-11-22 14:14:03 +08:00
‘937886381’
a22da566c3 解决冲突 2023-11-22 14:11:23 +08:00
‘937886381’
3c99ddc4c0 修改bug 2023-11-22 14:00:02 +08:00
96705bd4d9 Merge pull request 'update hints' (#100) from projects/mes-lb into projects/mes-test
Reviewed-on: #100
2023-11-22 13:28:39 +08:00
lb
ac28476024 update hints 2023-11-22 11:15:39 +08:00
1299a56e22 Merge pull request 'update some equipment bugs' (#99) from projects/mes-lb into projects/mes-test
Reviewed-on: #99
2023-11-22 10:21:55 +08:00
lb
b348a31b24 update some equipment bugs 2023-11-22 10:14:40 +08:00
67d639c413 Merge pull request 'update bugs' (#98) from projects/mes-lb into projects/mes-test
Reviewed-on: #98
2023-11-21 17:03:52 +08:00
lb
c6d618b2b8 update bugs 2023-11-21 17:02:22 +08:00
aa79d15f52 Merge pull request 'projects/mes-lb' (#97) from projects/mes-lb into projects/mes-test
Reviewed-on: #97
2023-11-21 16:09:15 +08:00
lb
c8fb8d7589 Merge branch 'projects/mes-test' into projects/mes-lb 2023-11-21 16:08:44 +08:00
lb
51baca61cc update equipment attach process 2023-11-21 15:07:33 +08:00
lb
847e34fcc6 update 2023-11-21 11:48:17 +08:00
lb
32a43fbc3b update process equipment relation 2023-11-21 09:13:28 +08:00
lb
20975948ef update 2023-11-20 16:50:38 +08:00
c46c4dbf65 Merge pull request '更新仓库bug' (#96) from projects/mes-zwq into projects/mes-test
Reviewed-on: #96
2023-11-20 16:11:49 +08:00
lb
ac041c2f4a update bom-selector v1 2023-11-20 15:53:23 +08:00
lb
dd23c49ba0 update 设备选择 2023-11-20 14:21:14 +08:00
lb
44452f2e89 update 2023-11-20 11:26:27 +08:00
lb
8ddef0de9d update bomselector 2023-11-17 17:07:52 +08:00
lb
7249abf5b1 add BomSelector 2023-11-17 16:57:55 +08:00
lb
76f5385140 add Candidate 2023-11-17 16:05:57 +08:00
lb
bb731dfcd4 add custom tree 2023-11-17 14:56:43 +08:00
lb
d3eb9d8fbc update custom-transfer 2023-11-17 11:25:28 +08:00
lb
9a7521e691 add CustomTrasfer 2023-11-17 11:15:18 +08:00
185 changed files with 3277 additions and 2963 deletions

View File

@ -1,7 +1,7 @@
###
# @Author: Do not edit
# @Date: 2023-08-29 09:40:39
# @LastEditTime: 2023-11-16 14:07:34
# @LastEditTime: 2023-11-21 10:36:47
# @LastEditors: DY
# @Description:
###
@ -12,14 +12,14 @@ ENV = 'development'
VUE_APP_TITLE = MES系统
# 芋道管理系统/开发环境
VUE_APP_BASE_API = 'http://100.64.0.26:48082'
# VUE_APP_BASE_API = 'http://192.168.0.33:48082'
# VUE_APP_BASE_API = 'http://100.64.0.26:48082'
VUE_APP_BASE_API = 'http://192.168.0.33:48082'
# VUE_APP_BASE_API = 'http://192.168.4.173:48080'
# VUE_APP_BASE_API = 'http://192.168.2.173:48080'
# VUE_APP_BASE_API = 'http://192.168.1.49:48080'
# VUE_APP_BASE_API = 'http://192.168.1.8:48080'
# 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.1.56:48080'
# VUE_APP_BASE_API = 'http://192.168.1.56:48082'
# VUE_APP_BASE_API = 'http://192.168.4.159:48080'
# 积木报表指向地址

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

After

Width:  |  Height:  |  Size: 4.2 KiB

View File

@ -113,6 +113,15 @@ export function orderMonitor(query) {
})
}
// 获取订单绑定的工单和数量信息可传订单id列表map索引为订单id
export function orderAssignmentList(query) {
return request({
url: '/base/order/orderAssignmentList',
method: 'get',
params: query
})
}
// 获得所有客户列表
export function customerList() {
return request({

View File

@ -1,3 +1,10 @@
/*
* @Author: zhp
* @Date: 2023-10-17 09:26:38
* @LastEditTime: 2023-11-20 15:50:08
* @LastEditors: zhp
* @Description:
*/
import request from '@/utils/request'
// 创建质量检测信息基础
@ -52,3 +59,11 @@ export function exportQualityInspectionDetExcel(query) {
responseType: 'blob'
})
}
export function getQualityInspectionDetList(query) {
return request({
url: '/base/quality-inspection-det/listAll',
method: 'get',
params: query
})
}

View File

@ -1,7 +1,7 @@
/*
* @Author: Do not edit
* @Date: 2023-11-08 15:56:52
* @LastEditTime: 2023-11-13 08:52:12
* @LastEditTime: 2023-11-20 16:38:18
* @LastEditors: DY
* @Description:
*/
@ -65,4 +65,12 @@ export function getcheckList(query) {
method: 'get',
params: query
})
}
// 删除巡检内容
export function deleteCheck(id) {
return request({
url: '/base/equipment-check/delete?id=' + id,
method: 'delete'
})
}

View File

@ -1,7 +1,7 @@
/*
* @Author: Do not edit
* @Date: 2023-11-08 15:56:52
* @LastEditTime: 2023-11-16 20:22:12
* @LastEditTime: 2023-11-21 10:50:55
* @LastEditors: DY
* @Description:
*/
@ -14,3 +14,21 @@ export function deleteEqMaintainLog(id) {
method: 'delete'
})
}
// 删除设备保养计划配置
export function deleteEqMaintainPlan(id) {
return request({
url: '/base/equipment-maintain-plan/delete?id=' + id,
method: 'delete'
})
}
// 导出设备保养监控
export function exportMaintainMonitorExcel(query) {
return request({
url: '/base/equipment-maintain-plan/monitor-export',
method: 'get',
params: query,
responseType: 'blob'
})
}

View File

@ -0,0 +1,16 @@
/*
* @Author: Do not edit
* @Date: 2023-11-22 13:59:17
* @LastEditTime: 2023-11-22 13:59:45
* @LastEditors: DY
* @Description:
*/
import request from '@/utils/request'
// 删除设备备品备件
export function deleteSparePart(id) {
return request({
url: '/base/equipment-spare-part/delete?id=' + id,
method: 'delete'
})
}

View File

@ -1,7 +1,7 @@
/*
* @Author: zhp
* @Date: 2023-11-07 19:47:48
* @LastEditTime: 2023-11-16 17:49:23
* @LastEditTime: 2023-11-23 13:57:41
* @LastEditors: zhp
* @Description:
*/
@ -104,3 +104,18 @@ export function getMaterialList(data) {
data: data
})
}
export function getMaterialCode(data) {
return request({
url: '/extend/process-equ-material-bom/getCode',
method: 'get',
params: data
})
}
export function createProcessEquMaterialBomDetList(data) {
return request({
url: '/extend/process-equ-material-bom-det/createByList',
method: 'post',
data: data
})
}

View File

@ -1,7 +1,7 @@
/*
* @Author: zhp
* @Date: 2023-11-09 09:37:14
* @LastEditTime: 2023-11-16 17:47:21
* @LastEditTime: 2023-11-23 14:15:45
* @LastEditors: zhp
* @Description:
*/
@ -104,3 +104,19 @@ export function getValueList(data) {
params: data
})
}
export function getValueCode(data) {
return request({
url: '/extend/process-equ-value-bom/getCode',
method: 'get',
params: data
})
}
export function createProcessEquValueBomDetList(data) {
return request({
url: '/extend/process-equ-value-bom-det/createByList',
method: 'post',
data: data
})
}

View File

@ -0,0 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="16px" height="16px" viewBox="0 0 16 16" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>编组 17</title>
<g id="页面" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" opacity="0.695141">
<g id="最新参考" transform="translate(-1780.000000, -57.000000)" fill="#000000" fill-rule="nonzero">
<g id="编组-4" transform="translate(1772.000000, 48.000000)">
<g id="编组-17" transform="translate(8.000000, 9.000000)">
<rect id="矩形备份-2" opacity="0" x="0" y="0" width="16" height="16"></rect>
<g id="文档" transform="translate(2.436519, 1.472460)">
<path d="M9.61879642,0.990942446 C9.83682412,0.990942446 10.0548518,1.18867806 10.0548518,1.38641367 L10.0548518,11.6686655 C10.0548518,11.8664011 9.83682412,12.0641367 9.61879642,12.0641367 L3.60123204,12.0641367 L1.02850524,9.69130935 L1.02850524,1.38641367 C1.02850524,1.18867806 1.24653294,0.990942446 1.46456063,0.990942446 L9.61879642,0.990942446 M9.61879642,0.2 L1.50816617,0.2 C0.810477546,0.2 0.2,0.753659712 0.2,1.38641367 L0.2,10.0076863 L3.25238773,12.8550791 L9.61879642,12.8550791 C10.316485,12.8550791 10.9269626,12.3014194 10.9269626,11.6686655 L10.9269626,1.38641367 C10.9269626,0.753659712 10.316485,0.2 9.61879642,0.2 Z" id="形状"></path>
<path d="M9.61879642,0 C10.4228194,0 11.1269626,0.638607809 11.1269626,1.38641367 L11.1269626,11.6686655 C11.1269626,12.4164713 10.4228194,13.0550791 9.61879642,13.0550791 L3.25238773,13.0550791 L3.11596256,13.0013261 L0.0635748259,10.1539333 L0,10.0076863 L0,1.38641367 C0,0.638607809 0.704143212,0 1.50816617,0 L9.61879642,0 Z M9.61879642,0.4 L1.50816617,0.4 C0.91681188,0.4 0.4,0.868711615 0.4,1.38641367 L0.4,9.921 L3.331,12.6550791 L9.61879642,12.6550791 C10.1707271,12.6550791 10.657723,12.2467792 10.7202028,11.7714283 L10.7269626,11.6686655 L10.7269626,1.38641367 C10.7269626,0.868711615 10.2101507,0.4 9.61879642,0.4 Z M9.61879642,0.790942446 C9.94315845,0.790942446 10.2548518,1.07362615 10.2548518,1.38641367 L10.2548518,11.6686655 C10.2548518,11.981453 9.94315845,12.2641367 9.61879642,12.2641367 L3.60123204,12.2641367 L3.46563766,12.2111542 L0.892910861,9.83832691 L0.828505241,9.69130935 L0.828505241,1.38641367 C0.828505241,1.07362615 1.1401986,0.790942446 1.46456063,0.790942446 L9.61879642,0.790942446 Z M9.69667678,1.08901006 L1.38668992,1.08901006 C1.27286315,1.08901006 1.14612572,1.20395189 1.14612572,1.28821491 L1.14561083,9.66174324 L3.64342649,11.9659298 L9.69667678,11.9660691 C9.79153243,11.9660691 9.8953538,11.8862484 9.92732605,11.8108781 L9.93724098,11.7668642 L9.93724098,1.28821491 C9.93724098,1.20395189 9.81050356,1.08901006 9.69667678,1.08901006 Z" id="形状"></path>
<path d="M4.54092961,3.67913093 L2.25985278,3.67913093 C2.22052387,3.67913093 2.22052387,3.65291165 2.22052387,3.65291165 L2.22052387,2.91877199 C2.22052387,2.89255271 2.22052387,2.89255271 2.25985278,2.89255271 L4.54092961,2.89255271 C4.58025852,2.89255271 4.58025852,2.89255271 4.58025852,2.91877199 L4.58025852,3.65291165 L4.54092961,3.67913093 Z M8.86710981,5.44893192 L2.25985278,5.44893192 C2.22052387,5.44893192 2.22052387,5.44893192 2.22052387,5.40960301 L2.22052387,4.70168261 C2.22052387,4.6623537 2.22052387,4.6623537 2.25985278,4.6623537 L8.86710981,4.6623537 C8.90643872,4.6623537 8.90643872,4.6623537 8.90643872,4.70168261 L8.90643872,5.40960301 L8.86710981,5.44893192 Z M8.86710981,7.41537746 L2.25985278,7.41537746 C2.22052387,7.41537746 2.22052387,7.41537746 2.22052387,7.37604855 L2.22052387,6.66812815 C2.22052387,6.62879924 2.22052387,6.62879924 2.25985278,6.62879924 L8.86710981,6.62879924 C8.90643872,6.62879924 8.90643872,6.62879924 8.90643872,6.66812815 L8.90643872,7.37604855 L8.86710981,7.41537746 Z" id="形状"></path>
<path d="M8.86710981,6.44841431 C9.00606257,6.44841431 9.08682365,6.5291754 9.08682365,6.66812815 L9.08682365,7.37604855 L9.03399013,7.50359996 L8.99466122,7.54292887 L8.86710981,7.59576239 L2.25985278,7.59576239 C2.12090003,7.59576239 2.04013894,7.51500131 2.04013894,7.37604855 L2.04013894,6.66812815 C2.04013894,6.5291754 2.12090003,6.44841431 2.25985278,6.44841431 L8.86710981,6.44841431 Z M8.72520451,6.80870958 L2.40090881,6.80870958 L2.40090881,7.23441802 L8.72520451,7.23441802 L8.72520451,6.80870958 Z M8.86710981,4.48196877 C9.00606257,4.48196877 9.08682365,4.56272985 9.08682365,4.70168261 L9.08682365,5.40960301 L9.03399013,5.53715441 L8.99466122,5.57648333 L8.86710981,5.62931685 L2.25985278,5.62931685 C2.12090003,5.62931685 2.04013894,5.54855576 2.04013894,5.40960301 L2.04013894,4.70168261 C2.04013894,4.56272985 2.12090003,4.48196877 2.25985278,4.48196877 L8.86710981,4.48196877 Z M8.72520451,4.84251382 L2.40090881,4.84251382 L2.40090881,5.26822226 L8.72520451,5.26822226 L8.72520451,4.84251382 Z M4.54092961,2.71216778 C4.66811215,2.71216778 4.76064346,2.77385532 4.76064346,2.91877199 L4.76064346,3.65291165 L4.68031808,3.80300099 L4.64098917,3.82922026 L4.54092961,3.85951586 L2.25985278,3.85951586 C2.18859958,3.85951586 2.12331983,3.83050264 2.08113204,3.77425225 C2.04130723,3.6964836 2.04130723,3.6964836 2.04013894,3.65291165 L2.04013894,2.91877199 C2.04013894,2.77385532 2.13267025,2.71216778 2.25985278,2.71216778 L4.54092961,2.71216778 Z M4.39957385,3.07293764 L2.40090881,3.07293764 L2.40090881,3.49864608 L4.39957385,3.49864608 L4.39957385,3.07293764 Z" id="形状"></path>
<path d="M3.50158987,12.5394187 L3.50158987,9.83587533 L0.88525753,9.83587533 L0.88525753,8.96376455 L3.93764526,8.96376455 C4.19927849,8.96376455 4.37370065,9.1381867 4.37370065,9.39981994 L4.37370065,12.5394187 L3.50158987,12.5394187 Z" id="路径"></path>
</g>
</g>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 5.8 KiB

View File

@ -37,6 +37,9 @@ $tabWidth: $tabW * 1px;
$rowHeight: $rowH * 1px;
$buttonHeight: $buttonH * 1px;
// 1080px 高度为基准的 1px
$base1px: 0.15vh; // 1px / 1080px;
// - - - - - 页面基础设置
.container {
.login-code {
@ -87,7 +90,7 @@ $buttonHeight: $buttonH * 1px;
width: 100%;
height: 100%;
background-color: #ffffff;
// box-shadow: 0px 16px 40px rgba(0, 0, 0, 0.07);
// box-shadow: 0px calc(16 * 0.12vh) 40px rgba(0, 0, 0, 0.07);
// border-radius: 20px;
// 定位
position: relative;
@ -100,6 +103,7 @@ $buttonHeight: $buttonH * 1px;
// 元素
// width: $picWidth;
height: $picHeight;
// height: 10vh;
background-image: url($picImage);
background-repeat: no-repeat;
background-size: 100% 100%;
@ -118,7 +122,7 @@ $buttonHeight: $buttonH * 1px;
}
.field {
position: relative;
margin-top: 8%;
margin-top: 14vh;
flex: 2;
// width: 800px;
display: flex;
@ -130,17 +134,36 @@ $buttonHeight: $buttonH * 1px;
text-align: center;
clear: both;
position: relative;
top: -36px;
height: 128px;
top: calc(-32 * $base1px);
height: calc(128 * $base1px);
.title {
margin: 0;
margin-left: 32px;
margin-left: calc(28 * 0.12vh);
font-weight: 400;
user-select: none;
color: #000;
font-size: 36px;
line-height: 54px;
font-size: calc(28 * 0.12vh);
line-height: calc(40 * 0.12vh);
letter-spacing: calc(2 * 0.12vh);
.cnbm_logo {
height: calc(40 * 0.12vh);
width: calc(40 * 0.12vh);
position: relative;
top: calc(8 * 0.12vh);
right: calc(8 * 0.12vh);
}
}
.sub-title {
margin: 0;
margin-left: calc(28 * 0.12vh);
font-weight: 400;
user-select: none;
color: #000;
font-size: calc(28 * 0.12vh);
line-height: calc(48 * 0.12vh);
letter-spacing: 2px;
}
}
@ -159,10 +182,10 @@ $buttonHeight: $buttonH * 1px;
.footer {
user-select: none;
// 元素
margin: 12px 0;
height: 16px;
line-height: 16px;
font-size: 12px;
margin: calc(12 * 0.12vh) 0;
height: calc(16 * 0.12vh);
line-height: calc(16 * 0.12vh);
font-size: calc(12 * 0.12vh);
color: #8c8c8c;
a,
@ -176,12 +199,8 @@ $buttonHeight: $buttonH * 1px;
.form {
margin-top: 0;
box-sizing: border-box;
// width: $formWidth;
width: 100%;
// - - - tab
:deep(.el-tabs__nav) {
// background: #f0f3;
}
:deep(.el-tabs__content) {
padding: 20px 0 0;
}
@ -189,12 +208,13 @@ $buttonHeight: $buttonH * 1px;
user-select: none;
// 元素
width: $tabWidth;
height: $rowHeight;
// height: $rowHeight;
height: calc(54 * 0.12vh);
padding: 0;
// 文字
line-height: $rowHeight;
color: #666666;
font-size: 18px;
font-size: calc(14 * 0.12vh);
font-weight: 400;
text-align: center;
}
@ -210,7 +230,8 @@ $buttonHeight: $buttonH * 1px;
:deep(.el-input__inner) {
// 元素
width: 100%;
height: $rowHeight;
// height: $rowHeight;
height: calc(72 * 0.12vh);
background: #f5f5f5;
border: 0;
border-radius: 28px;
@ -280,7 +301,7 @@ $buttonHeight: $buttonH * 1px;
margin-bottom: 20px;
// 文字
line-height: 26px;
font-size: 20px;
font-size: calc(18 * 0.12vh);
color: #ffffff;
}
.button-active {
@ -299,13 +320,14 @@ $buttonHeight: $buttonH * 1px;
:deep(.el-input__inner) {
// 元素
width: 420px;
height: 66px;
height: calc(52 * 0.12vh);
// height: 66px;
color: #262626;
font-size: 18px;
font-size: calc(14 * 0.12vh);
}
:deep(.el-checkbox__label) {
font-size: 18px;
line-height: 14px;
font-size: calc(14 * 0.12vh);
line-height: calc(12 * 0.12vh);
}
}
}
@ -314,19 +336,42 @@ $buttonHeight: $buttonH * 1px;
@media screen and (min-width: 1920px) {
.container {
.content {
.field {
flex: initial;
width: 800px;
// width: 800px;
width: 40vw;
}
}
}
}
@media screen and (min-height: 1024px) {
.container {
.content {
.field {
margin-top: 16vh;
}
}
}
}
@media screen and (max-height: 1024px) {
.container {
.content {
.field {
margin-top: 8vh;
}
}
}
}
@media screen and (min-width: 599px) and (max-width: 1366px) {
.container {
min-width: 599px;
// min-width: 599px;
min-width: 42vw;
.content {
// width: 710px;
// height: 397px;
@ -337,6 +382,7 @@ $buttonHeight: $buttonH * 1px;
display: none;
}
.field {
// margin-top: 6vh;
// width: calc(710px - 314px);
// left: 314px;
// justify-content: center;
@ -363,6 +409,14 @@ $buttonHeight: $buttonH * 1px;
}
}
// @media screen and (max-height: 1080px) {
// .container {
// .field {
// transform: scale(0.74);
// }
// }
// }
/* ===== MOBILE DESIGN ===== */
$mobileW: 375;
$mobileH: 812;
@ -503,7 +557,7 @@ $iconBgImage: '../assets/images/icon.png';
.footer {
// 元素
font-size: 12px;
font-size: calc(12 * 0.12vh);
font-family: PingFang SC;
font-weight: 400;
line-height: 17px;
@ -511,7 +565,7 @@ $iconBgImage: '../assets/images/icon.png';
opacity: 0.6;
// 定位
// position: absolute;
bottom: -32px;
bottom: -calc(32 * 0.12vh);
}
}
}

View File

@ -65,6 +65,7 @@
v-if="col.subcomponent"
:key="col.key"
:disabled="disabled"
:read-only="disabled"
:is="col.subcomponent"
v-model="form[col.prop]"
:inlineStyle="col.style"
@ -346,6 +347,8 @@ export default {
console.log('setting code: ', response.data);
//
this.form[opt.prop] = response.data;
// dataFormcodebug
this.$emit('update', this.form)
}
});
}

View File

@ -1,279 +1,293 @@
<template>
<div>
<el-upload
:action="uploadFileUrl"
:before-upload="handleBeforeUpload"
:on-success="handleUploadSuccess"
:on-error="handleUploadError"
name="file"
:show-file-list="false"
:headers="headers"
style="display: none"
ref="upload"
v-if="this.type === 'url'"
>
</el-upload>
<div class="editor" ref="editor" :style="styles"></div>
</div>
<div :class="[readOnly ? 'editor-wrapper' : '']">
<el-upload
:action="uploadFileUrl"
:before-upload="handleBeforeUpload"
:on-success="handleUploadSuccess"
:on-error="handleUploadError"
name="file"
:show-file-list="false"
:headers="headers"
style="display: none"
ref="upload"
v-if="this.type === 'url'"></el-upload>
<div class="editor" ref="editor" :style="styles"></div>
</div>
</template>
<script>
import Quill from "quill";
import "quill/dist/quill.core.css";
import "quill/dist/quill.snow.css";
import "quill/dist/quill.bubble.css";
import { getAccessToken } from "@/utils/auth";
import Quill from 'quill';
import 'quill/dist/quill.core.css';
import 'quill/dist/quill.snow.css';
import 'quill/dist/quill.bubble.css';
import { getAccessToken } from '@/utils/auth';
export default {
name: "Editor",
props: {
/* 编辑器的内容 */
value: {
type: String,
default: "",
},
/* 高度 */
height: {
type: Number,
default: null,
},
/* 最小高度 */
minHeight: {
type: Number,
default: null,
},
/* 只读 */
readOnly: {
type: Boolean,
default: false,
},
// (MB)
fileSize: {
type: Number,
default: 5,
},
/* 类型base64格式、url格式 */
type: {
type: String,
default: "url",
}
},
data() {
return {
uploadFileUrl: process.env.VUE_APP_BASE_API + "/admin-api/infra/file/upload", //
headers: { Authorization: "Bearer " + getAccessToken() }, //
Quill: null,
currentValue: "",
options: {
theme: "snow",
bounds: document.body,
debug: "warn",
modules: {
//
toolbar: [
["bold", "italic", "underline", "strike"], // 线 线
["blockquote", "code-block"], //
[{ list: "ordered" }, { list: "bullet" }], //
[{ indent: "-1" }, { indent: "+1" }], //
[{ size: ["small", false, "large", "huge"] }], //
[{ header: [1, 2, 3, 4, 5, 6, false] }], //
[{ color: [] }, { background: [] }], //
[{ align: [] }], //
["clean"], //
["link", "image", "video"] //
],
},
placeholder: "请输入内容",
readOnly: true,
},
};
},
computed: {
styles() {
let style = {};
if (this.minHeight) {
style.minHeight = `${this.minHeight}px`;
}
if (this.height) {
style.height = `${this.height}px`;
}
return style;
},
},
watch: {
value: {
handler(val) {
if (val !== this.currentValue) {
this.currentValue = val === null ? "" : val;
if (this.Quill) {
this.Quill.pasteHTML(this.currentValue);
}
}
},
immediate: true,
},
},
mounted() {
this.init();
},
beforeDestroy() {
this.Quill = null;
},
methods: {
init() {
const editor = this.$refs.editor;
this.Quill = new Quill(editor, this.options);
// start
this.$nextTick(()=>{
this.Quill.blur();
if(!this.readOnly){
this.Quill.enable();
}
});
//
if (this.type === 'url') {
let toolbar = this.Quill.getModule("toolbar");
toolbar.addHandler("image", (value) => {
this.uploadType = "image";
if (value) {
this.$refs.upload.$children[0].$refs.input.click();
} else {
this.quill.format("image", false);
}
});
}
this.Quill.pasteHTML(this.currentValue);
this.Quill.on("text-change", (delta, oldDelta, source) => {
const html = this.$refs.editor.children[0].innerHTML;
const text = this.Quill.getText();
const quill = this.Quill;
this.currentValue = html;
this.$emit("input", html);
this.$emit("on-change", { html, text, quill });
});
this.Quill.on("text-change", (delta, oldDelta, source) => {
this.$emit("on-text-change", delta, oldDelta, source);
});
this.Quill.on("selection-change", (range, oldRange, source) => {
this.$emit("on-selection-change", range, oldRange, source);
});
this.Quill.on("editor-change", (eventName, ...args) => {
this.$emit("on-editor-change", eventName, ...args);
});
},
//
handleBeforeUpload(file) {
//
if (this.fileSize) {
const isLt = file.size / 1024 / 1024 < this.fileSize;
if (!isLt) {
this.$message.error(`上传文件大小不能超过 ${this.fileSize} MB!`);
return false;
}
}
return true;
},
handleUploadSuccess(res, file) {
//
let quill = this.Quill;
//
// edit by
if (res.code === 200 || res.code === 0) {
//
let length = quill.getSelection().index;
// res.url
// edit by
quill.insertEmbed(length, "image", res.data);
//
quill.setSelection(length + 1);
} else {
this.$message.error("图片插入失败");
}
},
handleUploadError() {
this.$message.error("图片插入失败");
},
},
name: 'Editor',
props: {
/* 编辑器的内容 */
value: {
type: String,
default: '',
},
/* 高度 */
height: {
type: Number,
default: null,
},
/* 最小高度 */
minHeight: {
type: Number,
default: null,
},
/* 只读 */
readOnly: {
type: Boolean,
default: false,
},
// (MB)
fileSize: {
type: Number,
default: 5,
},
/* 类型base64格式、url格式 */
type: {
type: String,
default: 'url',
},
},
data() {
return {
uploadFileUrl:
process.env.VUE_APP_BASE_API + '/admin-api/infra/file/upload', //
headers: { Authorization: 'Bearer ' + getAccessToken() }, //
Quill: null,
currentValue: '',
options: {
theme: 'snow',
bounds: document.body,
debug: 'warn',
modules: {
//
toolbar: [
['bold', 'italic', 'underline', 'strike'], // 线 线
['blockquote', 'code-block'], //
[{ list: 'ordered' }, { list: 'bullet' }], //
[{ indent: '-1' }, { indent: '+1' }], //
[{ size: ['small', false, 'large', 'huge'] }], //
[{ header: [1, 2, 3, 4, 5, 6, false] }], //
[{ color: [] }, { background: [] }], //
[{ align: [] }], //
['clean'], //
['link', 'image', 'video'], //
],
},
placeholder: '请输入内容',
readOnly: true,
},
};
},
computed: {
styles() {
let style = {};
if (this.minHeight) {
style.minHeight = `${this.minHeight}px`;
}
if (this.height) {
style.height = `${this.height}px`;
}
return style;
},
},
watch: {
value: {
handler(val) {
if (val !== this.currentValue) {
this.currentValue = val === null ? '' : val;
if (this.Quill) {
this.Quill.pasteHTML(this.currentValue);
}
}
},
immediate: true,
},
},
mounted() {
this.init();
},
beforeDestroy() {
this.Quill = null;
},
methods: {
init() {
const editor = this.$refs.editor;
this.Quill = new Quill(editor, this.options);
// start
this.$nextTick(() => {
this.Quill.blur();
if (!this.readOnly) {
this.Quill.enable();
}
});
//
if (this.type === 'url') {
let toolbar = this.Quill.getModule('toolbar');
toolbar.addHandler('image', (value) => {
this.uploadType = 'image';
if (value) {
this.$refs.upload.$children[0].$refs.input.click();
} else {
this.quill.format('image', false);
}
});
}
this.Quill.pasteHTML(this.currentValue);
this.Quill.on('text-change', (delta, oldDelta, source) => {
const html = this.$refs.editor.children[0].innerHTML;
const text = this.Quill.getText();
const quill = this.Quill;
this.currentValue = html;
this.$emit('input', html);
this.$emit('on-change', { html, text, quill });
});
this.Quill.on('text-change', (delta, oldDelta, source) => {
this.$emit('on-text-change', delta, oldDelta, source);
});
this.Quill.on('selection-change', (range, oldRange, source) => {
this.$emit('on-selection-change', range, oldRange, source);
});
this.Quill.on('editor-change', (eventName, ...args) => {
this.$emit('on-editor-change', eventName, ...args);
});
},
//
handleBeforeUpload(file) {
//
if (this.fileSize) {
const isLt = file.size / 1024 / 1024 < this.fileSize;
if (!isLt) {
this.$message.error(`上传文件大小不能超过 ${this.fileSize} MB!`);
return false;
}
}
return true;
},
handleUploadSuccess(res, file) {
//
let quill = this.Quill;
//
// edit by
if (res.code === 200 || res.code === 0) {
//
let length = quill.getSelection().index;
// res.url
// edit by
quill.insertEmbed(length, 'image', res.data);
//
quill.setSelection(length + 1);
} else {
this.$message.error('图片插入失败');
}
},
handleUploadError() {
this.$message.error('图片插入失败');
},
},
};
</script>
<style>
.editor, .ql-toolbar {
white-space: pre-wrap !important;
line-height: normal !important;
.editor-wrapper {
position: relative;
cursor: not-allowed;
&::after {
content: '';
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: #f5f7fa77;
}
}
.editor,
.ql-toolbar {
white-space: pre-wrap !important;
line-height: normal !important;
}
.quill-img {
display: none;
display: none;
}
.ql-snow .ql-tooltip[data-mode="link"]::before {
content: "请输入链接地址:";
.ql-snow .ql-tooltip[data-mode='link']::before {
content: '请输入链接地址:';
}
.ql-snow .ql-tooltip.ql-editing a.ql-action::after {
border-right: 0px;
content: "保存";
padding-right: 0px;
border-right: 0px;
content: '保存';
padding-right: 0px;
}
.ql-snow .ql-tooltip[data-mode="video"]::before {
content: "请输入视频地址:";
.ql-snow .ql-tooltip[data-mode='video']::before {
content: '请输入视频地址:';
}
.ql-snow .ql-picker.ql-size .ql-picker-label::before,
.ql-snow .ql-picker.ql-size .ql-picker-item::before {
content: "14px";
content: '14px';
}
.ql-snow .ql-picker.ql-size .ql-picker-label[data-value="small"]::before,
.ql-snow .ql-picker.ql-size .ql-picker-item[data-value="small"]::before {
content: "10px";
.ql-snow .ql-picker.ql-size .ql-picker-label[data-value='small']::before,
.ql-snow .ql-picker.ql-size .ql-picker-item[data-value='small']::before {
content: '10px';
}
.ql-snow .ql-picker.ql-size .ql-picker-label[data-value="large"]::before,
.ql-snow .ql-picker.ql-size .ql-picker-item[data-value="large"]::before {
content: "18px";
.ql-snow .ql-picker.ql-size .ql-picker-label[data-value='large']::before,
.ql-snow .ql-picker.ql-size .ql-picker-item[data-value='large']::before {
content: '18px';
}
.ql-snow .ql-picker.ql-size .ql-picker-label[data-value="huge"]::before,
.ql-snow .ql-picker.ql-size .ql-picker-item[data-value="huge"]::before {
content: "32px";
.ql-snow .ql-picker.ql-size .ql-picker-label[data-value='huge']::before,
.ql-snow .ql-picker.ql-size .ql-picker-item[data-value='huge']::before {
content: '32px';
}
.ql-snow .ql-picker.ql-header .ql-picker-label::before,
.ql-snow .ql-picker.ql-header .ql-picker-item::before {
content: "文本";
content: '文本';
}
.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="1"]::before,
.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="1"]::before {
content: "标题1";
.ql-snow .ql-picker.ql-header .ql-picker-label[data-value='1']::before,
.ql-snow .ql-picker.ql-header .ql-picker-item[data-value='1']::before {
content: '标题1';
}
.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="2"]::before,
.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="2"]::before {
content: "标题2";
.ql-snow .ql-picker.ql-header .ql-picker-label[data-value='2']::before,
.ql-snow .ql-picker.ql-header .ql-picker-item[data-value='2']::before {
content: '标题2';
}
.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="3"]::before,
.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="3"]::before {
content: "标题3";
.ql-snow .ql-picker.ql-header .ql-picker-label[data-value='3']::before,
.ql-snow .ql-picker.ql-header .ql-picker-item[data-value='3']::before {
content: '标题3';
}
.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="4"]::before,
.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="4"]::before {
content: "标题4";
.ql-snow .ql-picker.ql-header .ql-picker-label[data-value='4']::before,
.ql-snow .ql-picker.ql-header .ql-picker-item[data-value='4']::before {
content: '标题4';
}
.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="5"]::before,
.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="5"]::before {
content: "标题5";
.ql-snow .ql-picker.ql-header .ql-picker-label[data-value='5']::before,
.ql-snow .ql-picker.ql-header .ql-picker-item[data-value='5']::before {
content: '标题5';
}
.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="6"]::before,
.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="6"]::before {
content: "标题6";
.ql-snow .ql-picker.ql-header .ql-picker-label[data-value='6']::before,
.ql-snow .ql-picker.ql-header .ql-picker-item[data-value='6']::before {
content: '标题6';
}
.ql-snow .ql-picker.ql-font .ql-picker-label::before,
.ql-snow .ql-picker.ql-font .ql-picker-item::before {
content: "标准字体";
content: '标准字体';
}
.ql-snow .ql-picker.ql-font .ql-picker-label[data-value="serif"]::before,
.ql-snow .ql-picker.ql-font .ql-picker-item[data-value="serif"]::before {
content: "衬线字体";
.ql-snow .ql-picker.ql-font .ql-picker-label[data-value='serif']::before,
.ql-snow .ql-picker.ql-font .ql-picker-item[data-value='serif']::before {
content: '衬线字体';
}
.ql-snow .ql-picker.ql-font .ql-picker-label[data-value="monospace"]::before,
.ql-snow .ql-picker.ql-font .ql-picker-item[data-value="monospace"]::before {
content: "等宽字体";
.ql-snow .ql-picker.ql-font .ql-picker-label[data-value='monospace']::before,
.ql-snow .ql-picker.ql-font .ql-picker-item[data-value='monospace']::before {
content: '等宽字体';
}
</style>

View File

@ -2,7 +2,7 @@
* @Author: zwq
* @Date: 2021-07-19 15:18:30
* @LastEditors: zhp
* @LastEditTime: 2023-11-15 16:04:06
* @LastEditTime: 2023-11-23 11:14:30
* @Description:
-->
<template>
@ -14,6 +14,8 @@
}">
<img src="../../assets/img/logo.png" style="width:1.1em;position:relative;top:.4em" alt="">
许昌安彩AGV原片周转看板
<h3 class="unit">单位河南汇融科技服务有限公司</h3>
<h3 class="time">{{ times }}</h3>
<!-- <el-button
type="text"
class="title-button"
@ -87,11 +89,11 @@
<!-- <div style="width: 45%;position: absolute; top: 3em; right: 3em;">
<top-radio-group />
</div> -->
<el-row :gutter="9 * beilv">
<el-col :style="{ margin: 8 + 'px' + ' 0' }" :span="24">
<!-- <el-row :gutter="9 * beilv"> -->
<!-- <el-col :style="{ margin: 8 + 'px' + ' 0' }" :span="24"> -->
<base-table :page="1" :limit="9" :show-index="false" :beilv="1" :table-config="inventoryTableProps"
:table-data="inventoryList" />
</el-col>
<!-- </el-col> -->
<!-- <el-col :style="{ margin: 8 + 'px' + ' 0' }" :span="12">
<base-table3
:page="2"
@ -101,7 +103,7 @@
:table-data="qualityList2"
/>
</el-col> -->
</el-row>
<!-- </el-row> -->
</base-container>
</el-col>
<el-col :style="{ margin: 8 + 'px' + ' 0' }" :span="12">
@ -666,7 +668,8 @@ export default {
return {
beilv: 1,
beilv2: 1,
clientWidth:0,
clientWidth: 0,
times:undefined,
value: 100,
qualityYearTableProps,
cxNameList,
@ -727,27 +730,28 @@ export default {
}
},
// watch: {
// clientWidth(val) {
// if (!this.timer) {
// this.clientWidth = val
// this.beilv2 = this.clientWidth / 1920
// this.timer = true
// let _this = this
// setTimeout(function () {
// _this.timer = false
// }, 500)
// }
// //
// this.windowWidth(val);
// }
// },
watch: {
clientWidth(val) {
if (!this.timer) {
this.clientWidth = val
this.beilv2 = this.clientWidth / 1920
this.timer = true
let _this = this
setTimeout(function () {
_this.timer = false
}, 500)
}
//
this.windowWidth(val);
}
},
created() {
// this.fetchList('exception-alarm')
// this.fetchList('inAndOutOfEachLine')
// this.fetchList('order-process')
// this.fetchList('line-chart-data')
this.init()
this.getTimes()
this.windowWidth(document.documentElement.clientWidth)
},
mounted() {
@ -776,6 +780,30 @@ export default {
// removeEventListener('resize', resizeFun)
// },
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) {
this.clientWidth = value
},
@ -846,7 +874,19 @@ export default {
background-size: 100% 100%;
color: #00fff0;
text-align: center;
position: relative;
.unit{
position: absolute;
left: 260px;
top:25px;
font-size: 20px;
}
.time{
position: absolute;
left: 1360px;
top:25px;
font-size: 20px;
}
.title-button {
color: #00fff0;
font-size: 20px;
@ -901,7 +941,7 @@ export default {
</style>
<style lang="scss">
<style lang="scss" >
.visual-container {
::-webkit-scrollbar {
width: 8px;

View File

@ -60,7 +60,7 @@
<el-col :style="{ margin: 8 + 'px' + ' 0' }" :span="24">
<base-container1 :beilv="1" :title="'设备状态监控'" :title-icon="'1_5'">
<div class="visual-select">
<el-select v-model="modelMonth" size="mini" placeholder="">
<el-select class="coldSelect" v-model="modelMonth" size="mini" placeholder="">
<el-option key="1" value="钢1线" label="钢1线" default />
</el-select>
</div>
@ -634,21 +634,21 @@ export default {
}
}
},
watch: {
clientWidth(val) {
if (!this.timer) {
this.clientWidth = val
this.beilv2 = this.clientWidth / 1920
this.timer = true
let _this = this
setTimeout(function () {
_this.timer = false
}, 500)
}
//
this.windowWidth(val);
}
},
// watch: {
// clientWidth(val) {
// if (!this.timer) {
// this.clientWidth = val
// this.beilv2 = this.clientWidth / 1920
// this.timer = true
// let _this = this
// setTimeout(function () {
// _this.timer = false
// }, 500)
// }
// //
// this.windowWidth(val);
// }
// },
created() {
// this.fetchList('exception-alarm')
// this.fetchList('inAndOutOfEachLine')
@ -658,6 +658,7 @@ export default {
this.windowWidth(document.documentElement.clientWidth)
},
mounted() {
console.log(1111);
const _this = this;
_this.beilv2 = document.documentElement.clientWidth / 1920
window.onresize = () => {
@ -686,6 +687,7 @@ export default {
methods: {
windowWidth(value) {
this.clientWidth = value
this.beilv2 = this.clientWidth / 1920
},
// erd.listenTo(document.getElementById("box"), (element) => {
// var width = element.offsetWidth;
@ -1057,7 +1059,7 @@ export default {
}
</style>
<style lang="scss">
<style lang="scss" >
.visual-container {
::-webkit-scrollbar {
width: 8px;
@ -1096,23 +1098,25 @@ export default {
background-color: rgba($color: #5bc4be, $alpha: 1);
}
}
.el-input {
min-height: 10px;
}
.coldSelect{
.el-input {
min-height: 10px;
}
.el-input__inner {
background-color: rgba($color: #31878c, $alpha: 0.29);
border: rgba($color: #31878c, $alpha: 0.29);
color: aliceblue;
}
.el-input__inner {
background-color: rgba($color: #31878c, $alpha: 0.29);
border: rgba($color: #31878c, $alpha: 0.29);
color: aliceblue;
}
.el-divider--vertical {
height: 174px;
width: 1px;
border: rgba(255, 255, 255, 0.15);
color: rgba(255, 255, 255, 0.15);
margin-left: 3em;
}
.el-divider--vertical {
height: 174px;
width: 1px;
border: rgba(255, 255, 255, 0.15);
color: rgba(255, 255, 255, 0.15);
margin-left: 3em;
}
}
</style>
<style scoped>

View File

@ -2,7 +2,7 @@
* @Author: zwq
* @Date: 2021-07-19 15:18:30
* @LastEditors: zhp
* @LastEditTime: 2023-10-17 11:10:22
* @LastEditTime: 2023-11-23 11:11:35
* @Description:
-->
<template>
@ -44,7 +44,7 @@
<el-col :style="{ margin: 8 + 'px' + ' 0' }" :span="8">
<base-container :title="'各工序缺陷汇总'" :title-icon="'5_2'">
<div class="visual-select">
<el-select v-model="modelMonth" size="mini" placeholder="">
<el-select class="coldSelect" v-model="modelMonth" size="mini" placeholder="">
<el-option key="1" value="钢1线" label="钢1线" default />
</el-select>
</div>
@ -740,16 +740,16 @@ export default {
// this.fetchList('order-process')
// this.fetchList('line-chart-data')
this.init()
this.windowWidth(document.documentElement.clientWidth)
},
mounted() {
const _this = this;
window.onresize = () => {
return (() => {
_this.clientWidth = `${document.documentElement.clientWidth}`
this.beilv2 = _this.clientWidth / 1920
})()
}
this.windowWidth(document.documentElement.clientWidth)
// const _this = this;
// window.onresize = () => {
// return (() => {
// _this.clientWidth = `${document.documentElement.clientWidth}`
// this.beilv2 = _this.clientWidth / 1920
// })()
// }
// this.beilv2 = window.innerWidth / 1920
// addEventListener('resize', resizeFun = () => {
// this.beilv2 = window.innerWidth / 1920
@ -770,6 +770,7 @@ export default {
methods: {
windowWidth(value) {
this.clientWidth = value
this.beilv2 = this.clientWidth / 1920
},
// fetchList(type) {
// switch (type) {
@ -932,7 +933,8 @@ export default {
background-color: rgba($color: #5bc4be, $alpha: 1);
}
}
.el-input {
.coldSelect{
.el-input {
min-height: 10px;
}
@ -949,6 +951,7 @@ export default {
color: rgba(255, 255, 255, 0.15);
margin-left: 3em;
}
}
</style>

View File

@ -2,7 +2,7 @@
* @Author: zwq
* @Date: 2021-11-18 14:16:25
* @LastEditors: DY
* @LastEditTime: 2023-11-03 10:53:43
* @LastEditTime: 2023-11-22 10:27:50
* @Description:
-->
<template>
@ -77,8 +77,8 @@ export default {
remark: undefined
},
dataRule: {
code: [{ required: true, message: "专业编码不能为空", trigger: "blur" }],
name: [{ required: true, message: "专业名称不能为空", trigger: "blur" }],
code: [{ required: true, message: "客户编号不能为空", trigger: "blur" }],
name: [{ required: true, message: "客户名称不能为空", trigger: "blur" }],
contact: [{ required: true, message: "联系人不能为空", trigger: "blur" }],
telephone: [
{ required: false, trigger: "blur", message: "手机号不能为空" },
@ -87,10 +87,12 @@ export default {
if (value) {
if (/^(?:(?:\+|00)86)?1(?:3[\d]|4[5-79]|5[0-35-9]|6[5-7]|7[0-8]|8[\d]|9[189])\d{8}$/.test(value) === false) {
callback(new Error("手机号格式错误"));
} else {
callback();
}
} else {
callback();
}
callback();
}
}, trigger: "blur"
}
]

View File

@ -105,8 +105,8 @@ export default {
formConfig: [
{
type: 'input',
label: '名称',
placeholder: '专业',
label: '客户名称',
placeholder: '客户名称',
param: 'name',
},
{

View File

@ -2,7 +2,7 @@
* @Author: zwq
* @Date: 2021-11-18 14:16:25
* @LastEditors: DY
* @LastEditTime: 2023-11-02 14:16:30
* @LastEditTime: 2023-11-22 10:32:10
* @Description:
-->
<template>
@ -89,7 +89,6 @@ export default {
const menu = { id: 0, name: '总部门', children: [] };
menu.children = this.handleTree(this.departmentlList, "id")
this.menuOptions.push(menu)
console.log('你好', this.menuOptions)
},
/** 转换菜单数据结构 */
normalizer(node) {

View File

@ -134,6 +134,11 @@ export default {
// this.dataListLoading = false;
// });
// },
successSubmit() {
this.handleCancel()
this.getDataList()
this.$refs.addOrUpdate.getDict()
},
buttonClick(val) {
switch (val.btnName) {
case 'search':

View File

@ -162,7 +162,7 @@ export default {
input: true,
label: '属性名称',
prop: 'name',
rules: [{ required: true, message: '不能为空', trigger: 'blur' }],
rules: [{ required: true, message: '属性名称不能为空', trigger: 'blur' }],
},
],
[

View File

@ -10,7 +10,7 @@
v-loading="formLoading">
<el-row :gutter="20">
<el-col :span="8">
<el-form-item label="设备名称" prop="name" :rules="[{ required: true, message: '不能为空', trigger: 'blur' }]">
<el-form-item label="设备名称" prop="name" :rules="[{ required: true, message: '设备名称不能为空', trigger: 'blur' }]">
<el-input v-model="form.name" :disabled="disabled" placeholder="请输入设备名称"></el-input>
</el-form-item>
</el-col>
@ -33,7 +33,7 @@
</el-col>
<el-col :span="8">
<el-form-item label="设备类型" prop="equipmentTypeId"
:rules="[{ required: true, message: '不能为空', trigger: 'blur' }]">
:rules="[{ required: true, message: '设备类型不能为空', trigger: 'blur' }]">
<el-select v-model="form.equipmentTypeId" :disabled="disabled" filterable placeholder="请选择设备类型">
<el-option v-for="eqType in eqTypeList" :key="eqType.id" :label="eqType.name"
:value="eqType.id"></el-option>
@ -43,7 +43,7 @@
<el-col :span="8">
<el-form-item label="预计生产时间(min/天)" prop="workTime" :rules="[
{ required: true, message: '不能为空', trigger: 'blur' },
{ required: true, message: '预计生产时间不能为空', trigger: 'blur' },
{
type: 'number',
message: '请输入正确的数字值',
@ -71,7 +71,7 @@
</el-col>
<el-col :span="8">
<el-form-item label="设备TT值" prop="tvalue" :rules="[
{ required: true, message: '不能为空', trigger: 'blur' },
{ required: true, message: '设备TT值不能为空', trigger: 'blur' },
{
type: 'number',
message: '请输入正确的数字值',
@ -86,7 +86,7 @@
<el-row :gutter="20">
<el-col :span="8">
<el-form-item label="产品加工时间(s)" prop="processingTime" :rules="[
{ required: true, message: '不能为空', trigger: 'blur' },
{ required: true, message: '产品加工时间不能为空', trigger: 'blur' },
{
type: 'number',
message: '请输入正确的数字值',

View File

@ -123,7 +123,7 @@ export default {
},
{ prop: 'name', label: '设备名称' },
{ width: 256, prop: 'code', label: '设备编码' },
{ prop: 'equipmentType', label: '设备类型' },
{ prop: 'equipmentTypeName', label: '设备类型' },
{ prop: 'enName', label: '英文名称' },
{ prop: 'abbr', label: '缩写' },
// {
@ -196,7 +196,7 @@ export default {
input: true,
label: '设备名称',
prop: 'name',
rules: [{ required: true, message: '不能为空', trigger: 'blur' }],
rules: [{ required: true, message: '设备名称不能为空', trigger: 'blur' }],
// bind: {
// disabled: this.editMode == 'detail', // some condition, like detail mode...
// }
@ -211,10 +211,6 @@ export default {
input: true,
label: '英文名称',
prop: 'enName',
// rules: [{ required: true, message: '', trigger: 'blur' }],
// bind: {
// disabled: true, // some condition, like detail mode...
// }
},
],
[
@ -222,10 +218,6 @@ export default {
input: true,
label: '缩写',
prop: 'abbr',
// rules: [{ required: true, message: '', trigger: 'blur' }],
// bind: {
// disabled: true, // some condition, like detail mode...
// }
},
{
@ -233,7 +225,7 @@ export default {
label: '设备类型',
prop: 'equipmentTypeId',
url: '/base/core-equipment-type/page?pageNo=1&pageSize=100',
rules: [{ required: true, message: '不能为空', trigger: 'blur' }],
rules: [{ required: true, message: '设备类型不能为空', trigger: 'blur' }],
bind: {
filterable: true,
},
@ -243,7 +235,7 @@ export default {
label: '预计生产时间(min/天)',
prop: 'workTime',
rules: [
{ required: true, message: '不能为空', trigger: 'blur' },
{ required: true, message: '预计生产时间不能为空', trigger: 'blur' },
{
type: 'number',
message: '请输入正确的数字值',
@ -264,18 +256,26 @@ export default {
datetime: true,
label: '生产日期',
prop: 'productionTime',
bind: {
format: 'yyyy-MM-dd',
clearable: true,
},
},
{
datetime: true,
label: '进厂日期',
prop: 'enterTime',
bind: {
format: 'yyyy-MM-dd',
clearable: true,
},
},
{
input: true,
prop: 'tvalue',
label: '设备TT值',
rules: [
{ required: true, message: '不能为空', trigger: 'blur' },
{ required: true, message: '设备TT值不能为空', trigger: 'blur' },
{
type: 'number',
message: '请输入正确的数字值',
@ -291,7 +291,7 @@ export default {
label: '产品加工时间(s)',
prop: 'processingTime',
rules: [
{ required: true, message: '不能为空', trigger: 'blur' },
{ required: true, message: '产品加工时间不能为空', trigger: 'blur' },
{
type: 'number',
message: '请输入正确的数字值',
@ -304,7 +304,6 @@ export default {
{
input: true,
label: '制造商',
// rules: [{ required: true, message: '', trigger: 'blur' }],
prop: 'manufacturer',
},
{
@ -317,7 +316,6 @@ export default {
{
textarea: true,
label: '功能描述',
// rules: [{ required: true, message: '', trigger: 'blur' }],
prop: 'description',
},
],

View File

@ -149,7 +149,7 @@ export default {
select: true,
label: '产线',
prop: 'productionLineId',
rules: [{ required: true, message: '不能为空', trigger: 'blur' }],
rules: [{ required: true, message: '产线名不能为空', trigger: 'blur' }],
url: '/base/core-production-line/listAll',
bind: { clearable: true, filterable: true },
// watch: 'workshopSectionId'
@ -159,7 +159,7 @@ export default {
label: '工段',
prop: 'workshopSectionId',
depends: 'productionLineId',
rules: [{ required: true, message: '不能为空', trigger: 'blur' }],
rules: [{ required: true, message: '工段不能为空', trigger: 'blur' }],
bind: { clearable: true, filterable: true },
url: '/base/core-workshop-section/listByParentId',
},
@ -169,7 +169,7 @@ export default {
select: true,
label: '设备',
prop: 'equipmentId',
rules: [{ required: true, message: '不能为空', trigger: 'blur' }],
rules: [{ required: true, message: '设备名不能为空', trigger: 'blur' }],
bind: { clearable: true, filterable: true },
url: '/base/core-equipment/listAll',
},

View File

@ -91,15 +91,15 @@ export default {
width: 180,
filter: (val) => moment(val).format('yyyy-MM-DD HH:mm:ss'),
},
{ prop: 'name', label: '设备类型名称' },
{ prop: 'code', label: '检测类型编码' },
{ prop: 'name', label: '类型名称' },
{ prop: 'code', label: '类型编号' },
{ prop: 'remark', label: '备注' },
],
searchBarFormConfig: [
{
type: 'input',
label: '设备类型',
placeholder: '请输入设备类型名称',
placeholder: '设备类型',
param: 'name',
},
{
@ -133,18 +133,19 @@ export default {
[
{
input: true,
label: '设备类型名称',
label: '类型名称',
prop: 'name',
rules: [{ required: true, message: '不能为空', trigger: 'blur' }],
rules: [{ required: true, message: '类型名称不能为空', trigger: 'blur' }],
// bind: {
// disabled: true, // some condition, like detail mode...
// }
},
{
input: true,
label: '设备类型编码',
label: '类型编号',
prop: 'code',
url: '/base/core-equipment-type/getCode',
rules: [{ required: true, message: '类型编号不能为空', trigger: 'blur' }],
},
],
[
@ -174,7 +175,13 @@ export default {
name: '',
},
//
form: {},
form: {
code: undefined,
name: undefined,
id: undefined,
parentId: undefined,
remark: undefined
},
};
},
watch: {
@ -268,7 +275,7 @@ export default {
handleDelete(row) {
const id = row.id;
this.$modal
.confirm('是否确认删除设备类型"' + row.name + '"?')
.confirm('是否确认删除设备类型"' + row.name + '"的数据项?')
.then(function () {
return deleteEquipmentType(id);
})

View File

@ -97,8 +97,8 @@ export default {
formConfig: [
{
type: 'input',
label: '名称',
placeholder: '专业',
label: '专业名称',
placeholder: '专业名称',
param: 'name',
},
{

View File

@ -107,8 +107,8 @@ export default {
formConfig: [
{
type: 'input',
label: '工单名称',
placeholder: '工单名称',
label: '产品名称',
placeholder: '产品名称',
param: 'name'
},
{

View File

@ -2,7 +2,7 @@
* @Author: zwq
* @Date: 2021-11-18 14:16:25
* @LastEditors: DY
* @LastEditTime: 2023-11-03 19:28:06
* @LastEditTime: 2023-11-21 18:59:54
* @Description:
-->
<template>
@ -11,7 +11,7 @@
:rules="dataRule"
ref="dataForm"
@keyup.enter.native="dataFormSubmit()"
label-width="80px">
label-width="100px">
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="产线名称" prop="name">
@ -30,7 +30,8 @@
<el-select
v-model="dataForm.factoryId"
filterable
placeholder="请选择工厂">
placeholder="请选择工厂"
style="width: 100%">
<el-option
v-for="dict in factoryList"
:key="dict.id"
@ -94,8 +95,8 @@ export default {
},
factoryList: [],
dataRule: {
code: [{ required: true, message: "专业编码不能为空", trigger: "blur" }],
name: [{ required: true, message: "专业名称不能为空", trigger: "blur" }],
code: [{ required: true, message: "产线编号不能为空", trigger: "blur" }],
name: [{ required: true, message: "产线名称不能为空", trigger: "blur" }],
factoryId: [{ required: true, message: "工厂不能为空", trigger: "blur" }]
}
};

View File

@ -71,6 +71,10 @@ const tableProps = [
label: '当前状态',
filter: codeFilter('lineStatus')
},
{
prop: 'tvalue',
label: '产线TT值(h)'
},
{
prop: 'description',
label: '描述'

View File

@ -2,7 +2,7 @@
* @Author: zwq
* @Date: 2021-11-18 14:16:25
* @LastEditors: DY
* @LastEditTime: 2023-11-03 11:00:47
* @LastEditTime: 2023-11-22 10:27:43
* @Description:
-->
<template>
@ -77,8 +77,8 @@ export default {
remark: undefined
},
dataRule: {
code: [{ required: true, message: "专业编码不能为空", trigger: "blur" }],
name: [{ required: true, message: "专业名称不能为空", trigger: "blur" }],
code: [{ required: true, message: "供应商编号不能为空", trigger: "blur" }],
name: [{ required: true, message: "供应商名称不能为空", trigger: "blur" }],
contact: [{ required: true, message: "联系人不能为空", trigger: "blur" }],
telephone: [
{ required: false, trigger: "blur", message: "手机号不能为空" },
@ -87,10 +87,12 @@ export default {
if (value) {
if (/^(?:(?:\+|00)86)?1(?:3[\d]|4[5-79]|5[0-35-9]|6[5-7]|7[0-8]|8[\d]|9[189])\d{8}$/.test(value) === false) {
callback(new Error("手机号格式错误"));
} else {
callback();
}
} else {
callback();
}
callback();
}
}, trigger: "blur"
}
]
@ -98,6 +100,31 @@ export default {
};
},
mounted() {},
methods: {}
methods: {
//
dataFormSubmit() {
console.log('你好', this.dataForm)
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");
});
});
},
}
};
</script>

View File

@ -2,7 +2,7 @@
* @Author: zwq
* @Date: 2021-11-18 14:16:25
* @LastEditors: DY
* @LastEditTime: 2023-11-06 14:38:20
* @LastEditTime: 2023-11-20 16:51:24
* @Description:
-->
<template>
@ -95,7 +95,8 @@ const tableProps = [
},
{
prop: 'material',
label: '原料名称'
label: '原料名称',
filter: publicFormatter('material')
},
{
prop: 'origin',
@ -103,7 +104,7 @@ const tableProps = [
filter: (val) => ['', '内部', '采购'][val]
},
{
prop: 'supplierId',
prop: 'supplierName',
label: '供应商',
},
{
@ -195,7 +196,7 @@ export default {
...this.listQuery,
workOrderId: this.dataForm.id,
}).then((response) => {
this.materialList = response.data.list;
this.materialList = response.data.records;
this.listQuery.total = response.data.total;
});
},

View File

@ -26,8 +26,8 @@
</el-form-item>
</el-col>
<el-col :span='12'>
<el-form-item label="产品规格" prop="productSpec">
<el-input v-model="dataForm.productSpec" disabled></el-input>
<el-form-item label="产品规格" prop="specifications">
<el-input v-model="dataForm.specifications" />
</el-form-item>
</el-col>
</el-row>
@ -35,9 +35,9 @@
<el-col :span='12'>
<el-form-item label="计划开始时间">
<el-date-picker
v-model="planStartTime"
v-model="dataForm.planStartTime"
type="datetime"
value-format="yyyy-MM-dd HH:mm:ss"
value-format="timestamp"
style="width: 100%;"
placeholder="选择日期">
</el-date-picker>
@ -46,9 +46,9 @@
<el-col :span='12'>
<el-form-item label="计划完成时间">
<el-date-picker
v-model="planFinishTime"
v-model="dataForm.planFinishTime"
type="datetime"
value-format="yyyy-MM-dd HH:mm:ss"
value-format="timestamp"
style="width: 100%;"
placeholder="选择日期">
</el-date-picker>
@ -83,8 +83,8 @@
<el-col :span='12'>
<el-form-item label="物料计算方式" prop="materialMethod">
<el-radio-group v-model="dataForm.materialMethod" @change="materialMethodChange">
<el-radio :label="1">产品基础</el-radio>
<el-radio :label="2">工艺扩展</el-radio>
<el-radio :label="1">产品基础BOM</el-radio>
<el-radio :label="2">工艺扩展BOM</el-radio>
</el-radio-group>
</el-form-item>
</el-col>
@ -168,7 +168,7 @@ export default {
name: '',
code: '',
planProductId: '',
productSpec: '',
specifications: '',
planStartTime: '',
planFinishTime: '',
planAssignQuantity: 0,
@ -186,7 +186,7 @@ export default {
planProductId: [{ required: true, message: "产品名称不能为空", trigger: "change" }],
planAssignQuantity: [{ required: true, message: "计划投入数量不能为空", trigger: "blur" }],
planQuantity: [{ required: true, message: "计划生产数量不能为空", trigger: "blur" }],
productLineIds: [{ required: true, message: "产品不能为空", trigger: "change" }]
productLineIds: [{ required: true, message: "关联产线不能为空", trigger: "change" }]
},
productList: [],
processFlowList: [],
@ -232,6 +232,10 @@ export default {
if (this.dataForm.id) {
getCoreWO(id).then(response => {
this.dataForm = response.data;
if (this.dataForm.priority !== undefined) {
this.dataForm.priority = String(this.dataForm.priority)
}
this.dataForm.priority
});
} else {
if (this.urlOptions.isGetCode) {
@ -264,7 +268,11 @@ export default {
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.$emit("refreshDataList", true);
console.log('121', this.dataForm.name)
this.$emit("refreshDataList", {
id: response.data,
name: this.dataForm.name
});
}).catch(() => {
this.$emit("refreshDataList");
});

View File

@ -62,7 +62,7 @@
<el-input
v-model="dataForm.batch"
clearable
placeholder="请输入规格" />
placeholder="请输入批次号" />
</el-form-item>
<el-form-item label="数量" prop="num">
<el-input-number
@ -143,13 +143,19 @@ export default {
},
init(id) {
this.dataForm.id = id || '';
console.log('1', this.dataForm.id)
this.visible = true;
this.$nextTick(() => {
this.$refs['dataForm'].resetFields();
if (this.dataForm.id) {
getCoreWOMa(this.dataForm.id).then((res) => {
this.dataForm = res.data
if (this.dataForm.unit !== undefined) {
this.dataForm.unit = String(this.dataForm.unit)
}
if (this.dataForm.material !== undefined) {
this.dataForm.material = String(this.dataForm.material)
}
console.log('111', this.dataForm)
});
}
});

View File

@ -2,7 +2,7 @@
* @Author: zwq
* @Date: 2021-11-18 14:16:25
* @LastEditors: DY
* @LastEditTime: 2023-11-16 13:45:13
* @LastEditTime: 2023-11-22 09:47:53
* @Description:
-->
<template>
@ -16,6 +16,7 @@
<!-- <small-title slot="title" :no-padding="true">
{{ isdetail ? '详情' : !dataForm.id ? '新增' : '编辑' }}
</small-title> -->
<el-button style="float: right" type="primary" @click="goback()">返回</el-button>
<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>
</div>
@ -33,7 +34,7 @@
<el-col :span="8">工单名称:{{ dataForm.name }}</el-col>
<el-col :span="8">工单来源:{{ dataForm.triggerOrigin === 1 ? 'MES' : dataForm.triggerOrigin === 2 ? 'ERP' : ''}}</el-col>
<el-col :span="8">所属订单:
<span v-for="(item, index) in orderArray" :key="index" style="margin-right: 10px">{{ item.name }}</span>
<span v-for="(item, index) in orderList" :key="index" style="margin-right: 10px">{{ item.orderName }}</span>
</el-col>
</el-row>
<el-row :gutter="20">
@ -42,7 +43,7 @@
<el-col :span="8">计划生产数量:{{ dataForm.planQuantity }}</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="8">预计用时(小时):{{ dataForm.expectedTime }}</el-col>
<el-col :span="8">预计用时(小时):{{ dataForm.remainingTime }}</el-col>
<el-col :span="8">计划投入数量:{{ dataForm.planAssignQuantity }}</el-col>
<el-col :span="8">优先级:{{ fitlerP(dataForm.priority) }}</el-col>
</el-row>
@ -63,9 +64,7 @@
</small-title>
<div class="formContent">
<el-row :gutter="20">
<el-col :span="8">订单创建时间:
<span v-for="(item, index) in orderArray" :key="index" style="margin-right: 10px; white-space: pre-wrap">{{ parseTime(item.createTime) }}</span>
</el-col>
<el-col :span="8">工单创建时间:{{ parseTime(dataForm.createTime) }}</el-col>
<el-col :span="8">计划开始时间:{{ parseTime(dataForm.planStartTime) }}</el-col>
<el-col :span="8">计划完成时间:{{ parseTime(dataForm.planFinishTime) }}</el-col>
</el-row>
@ -143,7 +142,7 @@
<script>
// import basicAdd from '../../core/mixins/basic-add';
import { getCoreWO, getMaterialBomPage, getConOrderList, getCoreWOListById } from "@/api/base/coreWorkOrder";
import { orderList } from "@/api/base/orderManage";
// import { orderList } from "@/api/base/orderManage";
import { getProcessFlowList } from '@/api/base/orderManage'
import SmallTitle from './SmallTitle';
import { publicFormatter } from "@/utils/dict";
@ -186,7 +185,7 @@ const tableProps = [
const tableProps1 = [
{
prop: 'materialName',
label: '料名称'
label: '料名称'
},
{
prop: 'unit',
@ -223,7 +222,7 @@ export default {
dataForm: {},
orderList: [],
materialList: [],
orderArray: [],
// orderArray: [],
visible: false,
isdetail: false,
workOrderButton: [],
@ -336,12 +335,11 @@ export default {
});
}
//
orderList({
workOrderId: this.dataForm.id
}).then((response) => {
this.orderArray = response.data;
// this.listQuery.total = response.data.total;
});
// orderList({
// workOrderId: this.dataForm.id
// }).then((response) => {
// this.orderArray = response.data;
// });
},
init(id, isdetail) {
this.initData();
@ -374,8 +372,7 @@ export default {
});
},
goback() {
this.visible = false;
this.$emit('refreshDataList');
this.$router.go(-1);
// this.initData();
},
goEdit() {

View File

@ -213,7 +213,7 @@ export default {
{
name: 'status',
type: 'equal',
value: 3
value: 2
},
{
name: 'status',
@ -313,7 +313,15 @@ export default {
refreshWorkOrder(val) {
console.log(val)
if (val) {
console.log('打印')
// 使
console.log('预使用原料信息')
this.handleCancel()
this.getDataList()
this.materialVisible = true;
this.addOrEditTitle = "预使用主原料信息";
this.$nextTick(() => {
this.$refs.material.init(val, true);
});
} else {
this.successSubmit()
}

View File

@ -2,7 +2,7 @@
* @Author: zwq
* @Date: 2021-11-18 14:16:25
* @LastEditors: DY
* @LastEditTime: 2023-11-03 11:01:24
* @LastEditTime: 2023-11-22 10:26:58
* @Description:
-->
<template>
@ -211,10 +211,12 @@ export default {
if (value) {
if (/^(?:(?:\+|00)86)?1(?:3[\d]|4[5-79]|5[0-35-9]|6[5-7]|7[0-8]|8[\d]|9[189])\d{8}$/.test(value) === false) {
callback(new Error("手机号格式错误"));
} else {
callback();
}
} else {
callback();
}
callback();
}
}, trigger: "blur"
}
],
@ -243,13 +245,32 @@ export default {
setOut(val) {
if (val === 1) {
this.isOut = true
this.dataForm.outTime = ''
} else {
this.isOut = false
}
},
reset() {
this.dataForm = {
id: undefined,
code: undefined,
name: undefined,
fileUrl: undefined,
sex: 0,
telephone: undefined,
departmentId: undefined,
position: undefined,
entryTime: new Date().getTime(),
status: 1,
outTime: undefined,
education: undefined,
workCost: undefined,
remark: undefined
}
this.majorIdList = undefined
},
//
dataFormSubmit() {
console.log('111', this.dataForm)
this.$refs["dataForm"].validate((valid) => {
if (!valid) {
return false;
@ -292,7 +313,8 @@ export default {
});
},
init(id) {
this.dataForm.id = id || "";
this.reset()
this.dataForm.id = id || undefined;
this.visible = true;
if (this.urlOptions.getOption) {
this.getArr()

View File

@ -2,7 +2,7 @@
* @Author: zwq
* @Date: 2021-11-18 14:16:25
* @LastEditors: DY
* @LastEditTime: 2023-11-03 19:31:25
* @LastEditTime: 2023-11-22 08:55:37
* @Description:
-->
<template>
@ -82,8 +82,8 @@ export default {
},
proLineList: [],
dataRule: {
code: [{ required: true, message: "专业编码不能为空", trigger: "blur" }],
name: [{ required: true, message: "专业名称不能为空", trigger: "blur" }],
code: [{ required: true, message: "工段编号不能为空", trigger: "blur" }],
name: [{ required: true, message: "工段名称不能为空", trigger: "blur" }],
productionLineId: [{ required: true, message: "产线不能为空", trigger: "blur" }],
sort: [{ required: true, message: "排序不能为空", trigger: "blur" }]
}

View File

@ -202,12 +202,11 @@ export default {
}
},
created() {
// this.init()
// console.log('aaaaaa')
// this.otherPaper()
// $('.hiprintEpContainer').empty()
},
destroyed () {
$('.hiprintEpContainer').empty()
console.log(11111)
},
methods: {
// handleClose() {
@ -215,6 +214,7 @@ export default {
// },
closed() {
$('.hiprintEpContainer').empty()
$('.hiprint-printTemplate').empty()
},
init(data) {
this.drawer = true
@ -256,17 +256,17 @@ export default {
// console.log(this.modelData)
// console.log($('#hiprint-printTemplate').empty())
if (this.modelData != {}) {
console.log(this.modelData);
$('.hiprintEpContainer').empty()
hiprint.PrintElementTypeManager.build('.hiprintEpContainer', provider.value)
$('.hiprint-printTemplate').empty()
hiprintTemplate = new hiprint.PrintTemplate({
template: JSON.parse(this.modelData),
settingContainer: '#PrintElementOptionSetting',
paginationContainer: '.hiprint-printPagination'
})
} else {
// if () {
// console.log(this.modelData);
// $('.hiprintEpContainer').empty()
// hiprint.PrintElementTypeManager.build('.hiprintEpContainer', provider.value)
// $('.hiprint-printTemplate').empty()
// hiprintTemplate = new hiprint.PrintTemplate({
// template: JSON.parse(this.modelData),
// settingContainer: '#PrintElementOptionSetting',
// paginationContainer: '.hiprint-printPagination'
// })
// } else {
$('.hiprintEpContainer').empty()
console.log(this.modelData);
hiprint.PrintElementTypeManager.build('.hiprintEpContainer', provider.value)
@ -275,11 +275,11 @@ export default {
const template = provider.value
// console.log(template)
hiprintTemplate = new hiprint.PrintTemplate({
template: template,
template: this.modelData != '' ? JSON.parse(this.modelData) : {},
settingContainer: '#PrintElementOptionSetting',
paginationContainer: '.hiprint-printPagination'
})
}
// }
hiprintTemplate.design('#hiprint-printTemplate')
// console.log(hiprintTemplate)
console.log(hiprintTemplate);

View File

@ -236,212 +236,10 @@ export const aProvider = function (ops) {
};
};
// 自定义设计元素2
export const bProvider = function (ops) {
var addElementTypes = function (context) {
context.removePrintElementTypes("bProviderModule");
context.addPrintElementTypes(
"bProviderModule",
[
new hiprint.PrintElementTypeGroup("常规", [
{
tid: 'bProviderModule.header', title: '单据表头', data: '单据表头', type: 'text',
options: {
testData: '单据表头',
height: 17,
fontSize: 16.5,
fontWeight: "700",
textAlign: "center",
hideTitle: true
}
},
{
tid: 'bProviderModule.type', title: '单据类型', data: '单据类型', type: 'text',
options: {
testData: '单据类型',
height: 16,
fontSize: 15,
fontWeight: "700",
textAlign: "center",
hideTitle: true
}
},
{
tid: 'bProviderModule.order', title: '订单编号', data: 'XS888888888', type: 'text',
options: {
field: 'orderId',
testData: 'XS888888888',
height: 16,
fontSize: 6.75,
fontWeight: "700",
textAlign: "left",
textContentVerticalAlign: "middle"
}
},
{
tid: 'bProviderModule.date', title: '业务日期', data: '2020-01-01', type: 'text',
options: {
field: 'date',
testData: '2020-01-01',
height: 16,
fontSize: 6.75,
fontWeight: "700",
textAlign: "left",
textContentVerticalAlign: "middle"
}
},
{
tid: 'bProviderModule.barcode', title: '条形码', data: 'XS888888888', type: 'text',
options: {
field: 'barcode',
testData: 'XS888888888',
height: 32,
fontSize: 12,
lineHeight: 18,
textType: "barcode"
}
},
{
tid: 'bProviderModule.qrcode', title: '二维码', data: 'XS888888888', type: 'text',
options: {
field: 'qrcode',
testData: 'XS888888888',
height: 32,
fontSize: 12,
lineHeight: 18,
textType: "qrcode"
}
},
{
tid: 'bProviderModule.platform', title: '平台名称', data: '平台名称', type: 'text',
options: {
testData: '平台名称',
height: 17,
fontSize: 16.5,
fontWeight: "700",
textAlign: "center",
hideTitle: true
}
},
{tid: 'bProviderModule.image', title: 'Logo', data: 'data: image/png;base64iVBORw0KGgoAAAANSUhEUgAAAGQAAABkCAYAAABw4pVUAAAHVklEQVR4nO2dT2wUVRzHv2/2T5eSAlvFilwgQUH+eLACaUxEiJLAxdh44MDZi2ChUIrSFtoCgbbSP4GDdwgeEA8kRTAI0iIGBL1ITLxgLAlCsCKBYndnx7zd35pl2+7On/de387OJ9l00515/z7z/szMmzfs7869mD0yCjw2gZAB4VhAiln4/dUaRGdU18aOnzw9dn24ioGJj0soFsJr1z2yNm+qN2/fvRFL8XyMYqTmFfxZ+TwMc1xKDsL/f2Ms8xGeLwuIRpCKx99MHf/i4uPrw5GQ9jIAfsCMXfw2HkuOX03Wb1qLh4+uIGFJjzecPoS5iEhUTg1hDMaM2GuRk6cGMTQUCYmPQQq86CMAkkPDkQirGAzXf7Du34ejN9IHmETCRjQGPL6D+4NnYDEJDQmXbaY6on/dm2Vm/jHdZe0Almm6Ll+YNQbzasX7765BNHI1o0sOYRghwExg7MG9dDQSiqsdwHuZmlFKMjLwQ3QcFtjlSxHTenLO3Lp7vfU09AOS41Ka+HC6CjIDIaqmguvIPgBtIgOcDhjVlMTQtarKOScumR/teCdpxoeNZGJCapjFt7Rcywrb2MYtnQBatCpZTzCkYCF+5suKRXf+6EvOmv0GSzwrhB/QpmGkBYZSpqvIZAlp8ZeMLFwKUH3z2gqWyd/+3F/5b1yRQQMCN8gQspeaKt+SAItSCxCiPjIjhDEkjRAMxmCZSbgZkYke537qdxl57KM8C0OkkD0ADohMXIlwgPIuBFFC9uS3p2XGflFSRAgpdxlZeBl84jUQr0ImjDTKGWZZBwE0eCkCL0J20UgjgGCwEDHNPjB86PbiilshfGRxOBCRD0tLCSWTnzMLO9yE4EbIzjIdTdmGpc8/rB4qK0c4FcKbqe7pyWZJ0k1lZhsnQnZq3EzV00dHDjupKXaFNGtcM7YA+Io+WzRIz2R0UxkWxY6QJgCHlCbfPlzAsZytj2ks5RCVZUGKCdkOoEt+Wl3RkCcjyzGv5wIS6aIynZJCQni7d0TTjPFaMFDg9wGNa8qRQn3KVEI+1rjPmKpm5KNzTemmMp7AZEK2AehXmz7bbC1SM/IZoH10pJ/K+hnyhXBrvZpmoBHAURf7HaV9daQ3v6Zk7hhWVr4AYDOAzzRNeKPHAyW7r459Yj/deUynMcyqqpY9/fXW+RTwkiF/ms5pADcd7nMbwAkBcfMM3wOwwOF+rys46TxCt+T72d2NG0YSg2fnC58ANDkbAZyVH41QNgAYVBTXNiMxeLYG6qawvagmGqGoTHOfwcAe6T8TvWwYlTC7OsALgRDNCIRoRiBEMwIhmhEI0YxAiGYEQjRDtZCY9iUyEaVpVi3kvuL4RKA0zSqF8Ad5TimMTxSnKO1KUCWEZ6hDVaYk0KFKigohbSUuI0uHiieKZQtp89kM+U7ZUmQKafHp4wpSH/eWJaTT5zPkD8g62GQI8cXqDTZok/HEsWgh+3Of2y4D2kU/0idKyEOaJdgqKLxSotXlfLFJESXkicKZGTrys6g0iRIyD8AvAFYLCq+UWC1yACOyD+Hrf1wAUCcwTN2pozzXiEqn6E59JoBvANQKDldHaimvM0WmTcawlydw2Oc1pY7yKFQGJJ4YxqiTXyEp/OlkBeVNyn0SmZdO5gC47rOOfjXlaY6sCGRfXKwA8LVP+pRaykuFzEhUXH7nR9P3AFYqiEsWKykP0mpGFlU3qKI0IlmlKD6RrKK0R1VEpvIW7uwSHXnVUdqVoHqSwz+K4xOB0jQH87I0IxCiGYEQzQiEaEYgRDMCIZoRCNGMQIhmBEI0gwuJK0xScKZemHiY1mzqUxThYgBLHO7zQOAzGnMBPOdwn8WC4rbDNjaSWVajQaEUp9wBsB7ALY/hLAVwHsB89VmwRXrhuGwf0q/xIl/z6f6105qVyxIKQ1cZjdlV/HI79V6N1yjk/dxlAMtc7LuM9lXZVzqhIXdxtvxR1kCxZUynkbl0o2ihgyQspH3mapqn7flrSE427O3TuKbwGZI/AlhuY9vltO08Belyw6T99lTnIQN2VmGeJqppskGhpfoW0DbVmuahaarVVQudGPZo3tH/RCOnfJbSbzp34D1T/VjsTL3X6esWFMJngJwDsCgnykX0P+mzQ1yyq9jqqtnzkGI0a7wgPz9pfJm+/6ZxB77bzus+7L7pkwdkarr8OBdwJee7jjQVaqZysVtDsuwK3j3lmGYnb5hwerW3S+PRl440OX3dh5vL7z0iXzXqY/bYbaZycXs/5KDdV/iUKc1URo7xcoOqq0yfui1Gq5e3EoUava1qzS/aJQGs8xKIj2jx+gCoVyGcoUBKGs8yIEgIAiliZEDwJAehL3ovIYS+2F9UDckyRH/fFhmoxuwTvdaJaCGc7+gyi9+br1YZSzTJEAIaffHrZG/JCFwDpK16JEsI5yK9uMdvzVe7zAUxZQrhXKKBwxqZkSikQ8aiZbnIFgKS4oea0i5bBhQJgQ+kKJEBhUJAUkqxo+cduJqVrQH8B6xBgBhvJFNDAAAAAElFTkSuQmCC', type: 'image', options: {
src: 'data: image/png;base64iVBORw0KGgoAAAANSUhEUgAAAGQAAABkCAYAAABw4pVUAAAHVklEQVR4nO2dT2wUVRzHv2/2T5eSAlvFilwgQUH+eLACaUxEiJLAxdh44MDZi2ChUIrSFtoCgbbSP4GDdwgeEA8kRTAI0iIGBL1ITLxgLAlCsCKBYndnx7zd35pl2+7On/de387OJ9l00515/z7z/szMmzfs7869mD0yCjw2gZAB4VhAiln4/dUaRGdU18aOnzw9dn24ioGJj0soFsJr1z2yNm+qN2/fvRFL8XyMYqTmFfxZ+TwMc1xKDsL/f2Ms8xGeLwuIRpCKx99MHf/i4uPrw5GQ9jIAfsCMXfw2HkuOX03Wb1qLh4+uIGFJjzecPoS5iEhUTg1hDMaM2GuRk6cGMTQUCYmPQQq86CMAkkPDkQirGAzXf7Du34ejN9IHmETCRjQGPL6D+4NnYDEJDQmXbaY6on/dm2Vm/jHdZe0Almm6Ll+YNQbzasX7765BNHI1o0sOYRghwExg7MG9dDQSiqsdwHuZmlFKMjLwQ3QcFtjlSxHTenLO3Lp7vfU09AOS41Ka+HC6CjIDIaqmguvIPgBtIgOcDhjVlMTQtarKOScumR/teCdpxoeNZGJCapjFt7Rcywrb2MYtnQBatCpZTzCkYCF+5suKRXf+6EvOmv0GSzwrhB/QpmGkBYZSpqvIZAlp8ZeMLFwKUH3z2gqWyd/+3F/5b1yRQQMCN8gQspeaKt+SAItSCxCiPjIjhDEkjRAMxmCZSbgZkYke537qdxl57KM8C0OkkD0ADohMXIlwgPIuBFFC9uS3p2XGflFSRAgpdxlZeBl84jUQr0ImjDTKGWZZBwE0eCkCL0J20UgjgGCwEDHNPjB86PbiilshfGRxOBCRD0tLCSWTnzMLO9yE4EbIzjIdTdmGpc8/rB4qK0c4FcKbqe7pyWZJ0k1lZhsnQnZq3EzV00dHDjupKXaFNGtcM7YA+Io+WzRIz2R0UxkWxY6QJgCHlCbfPlzAsZytj2ks5RCVZUGKCdkOoEt+Wl3RkCcjyzGv5wIS6aIynZJCQni7d0TTjPFaMFDg9wGNa8qRQn3KVEI+1rjPmKpm5KNzTemmMp7AZEK2AehXmz7bbC1SM/IZoH10pJ/K+hnyhXBrvZpmoBHAURf7HaV9daQ3v6Zk7hhWVr4AYDOAzzRNeKPHAyW7r459Yj/deUynMcyqqpY9/fXW+RTwkiF/ms5pADcd7nMbwAkBcfMM3wOwwOF+rys46TxCt+T72d2NG0YSg2fnC58ANDkbAZyVH41QNgAYVBTXNiMxeLYG6qawvagmGqGoTHOfwcAe6T8TvWwYlTC7OsALgRDNCIRoRiBEMwIhmhEI0YxAiGYEQjRDtZCY9iUyEaVpVi3kvuL4RKA0zSqF8Ad5TimMTxSnKO1KUCWEZ6hDVaYk0KFKigohbSUuI0uHiieKZQtp89kM+U7ZUmQKafHp4wpSH/eWJaTT5zPkD8g62GQI8cXqDTZok/HEsWgh+3Of2y4D2kU/0idKyEOaJdgqKLxSotXlfLFJESXkicKZGTrys6g0iRIyD8AvAFYLCq+UWC1yACOyD+Hrf1wAUCcwTN2pozzXiEqn6E59JoBvANQKDldHaimvM0WmTcawlydw2Oc1pY7yKFQGJJ4YxqiTXyEp/OlkBeVNyn0SmZdO5gC47rOOfjXlaY6sCGRfXKwA8LVP+pRaykuFzEhUXH7nR9P3AFYqiEsWKykP0mpGFlU3qKI0IlmlKD6RrKK0R1VEpvIW7uwSHXnVUdqVoHqSwz+K4xOB0jQH87I0IxCiGYEQzQiEaEYgRDMCIZoRCNGMQIhmBEI0gwuJK0xScKZemHiY1mzqUxThYgBLHO7zQOAzGnMBPOdwn8WC4rbDNjaSWVajQaEUp9wBsB7ALY/hLAVwHsB89VmwRXrhuGwf0q/xIl/z6f6105qVyxIKQ1cZjdlV/HI79V6N1yjk/dxlAMtc7LuM9lXZVzqhIXdxtvxR1kCxZUynkbl0o2ihgyQspH3mapqn7flrSE427O3TuKbwGZI/AlhuY9vltO08Belyw6T99lTnIQN2VmGeJqppskGhpfoW0DbVmuahaarVVQudGPZo3tH/RCOnfJbSbzp34D1T/VjsTL3X6esWFMJngJwDsCgnykX0P+mzQ1yyq9jqqtnzkGI0a7wgPz9pfJm+/6ZxB77bzus+7L7pkwdkarr8OBdwJee7jjQVaqZysVtDsuwK3j3lmGYnb5hwerW3S+PRl440OX3dh5vL7z0iXzXqY/bYbaZycXs/5KDdV/iUKc1URo7xcoOqq0yfui1Gq5e3EoUava1qzS/aJQGs8xKIj2jx+gCoVyGcoUBKGs8yIEgIAiliZEDwJAehL3ovIYS+2F9UDckyRH/fFhmoxuwTvdaJaCGc7+gyi9+br1YZSzTJEAIaffHrZG/JCFwDpK16JEsI5yK9uMdvzVe7zAUxZQrhXKKBwxqZkSikQ8aiZbnIFgKS4oea0i5bBhQJgQ+kKJEBhUJAUkqxo+cduJqVrQH8B6xBgBhvJFNDAAAAAElFTkSuQmCC',
fit: 'none'
}},
]),
new hiprint.PrintElementTypeGroup("客户", [
{
tid: 'bProviderModule.khname', title: '客户名称', data: '高级客户', type: 'text',
options: {
field: 'name',
testData: '高级客户',
height: 16,
fontSize: 6.75,
fontWeight: "700",
textAlign: "left",
textContentVerticalAlign: "middle"
}
},
{
tid: 'bProviderModule.tel', title: '客户电话', data: '18888888888', type: 'text',
options: {
field: 'tel',
testData: '18888888888',
height: 16,
fontSize: 6.75,
fontWeight: "700",
textAlign: "left",
textContentVerticalAlign: "middle"
}
},
]),
new hiprint.PrintElementTypeGroup("表格/其他", [
{
tid: 'bProviderModule.table', title: '订单数据',
type: 'table',
options: {
field: 'table',
fields: [
{text: '名称', field: 'NAME'},
{text: '数量', field: 'SL'},
{text: '规格', field: 'GG'},
{text: '条码', field: 'TM'},
{text: '单价', field: 'DJ'},
{text: '金额', field: 'JE'},
{text: '备注', field: 'DETAIL'},
],
},
editable: true,
columnDisplayEditable: true,//列显示是否能编辑
columnDisplayIndexEditable: true,//列顺序显示是否能编辑
columnTitleEditable: true,//列标题是否能编辑
columnResizable: true, //列宽是否能调整
columnAlignEditable: true,//列对齐是否调整
columns: [
[
{title: '名称', align: 'center', field: 'NAME', width: 100},
{title: '数量', align: 'center', field: 'SL', width: 100},
{title: '条码', align: 'center', field: 'TM', width: 100},
{title: '规格', align: 'center', field: 'GG', width: 100},
{title: '单价', align: 'center', field: 'DJ', width: 100},
{title: '金额', align: 'center', field: 'JE', width: 100},
{title: '备注', align: 'center', field: 'DETAIL', width: 100},
]
],
footerFormatter: function (options, rows, data, currentPageGridRowsData) {
if (data && data['totalCap']) {
return `<td style="padding:0 10px" colspan="100">${'应收金额大写: ' + data['totalCap']}</td>`
}
return '<td style="padding:0 10px" colspan="100">应收金额大写: </td>'
},
},
{tid: 'bProviderModule.customText', title: '文本', customText: '自定义文本', custom: true, type: 'text'},
{
tid: 'bProviderModule.longText', title: '长文本', type: 'longText', options: {
field: 'test.longText',
width: 200,
testData: '长文本分页/不分页测试'
},
}
]),
new hiprint.PrintElementTypeGroup("辅助", [
{
tid: 'bProviderModule.hline',
title: '横线',
type: 'hline'
},
{
tid: 'bProviderModule.vline',
title: '竖线',
type: 'vline'
},
{
tid: 'bProviderModule.rect',
title: '矩形',
type: 'rect'
},
{
tid: 'bProviderModule.oval',
title: '椭圆',
type: 'oval'
}
])
]
);
};
return {
addElementTypes: addElementTypes
};
};
// type: 1供货商 2经销商
export default [{
name: 'A设计',
value: 'aProviderModule',
type: 1,
f: aProvider()
}, {
name: 'B设计',
value: 'bProviderModule',
type: 2,
f: bProvider()
}]

View File

@ -16,7 +16,7 @@
<el-form-item
label="产线"
prop="productionLineId"
:rules="[{ required: true, message: '不能为空', trigger: 'blur' }]">
:rules="[{ required: true, message: '产线不能为空', trigger: 'blur' }]">
<el-select
v-model="dataForm.productionLineId"
placeholder="请选择产线"
@ -35,7 +35,7 @@
<el-form-item
label="工段"
prop="workshopSectionId"
:rules="[{ required: true, message: '不能为空', trigger: 'blur' }]">
:rules="[{ required: true, message: '工段不能为空', trigger: 'blur' }]">
<el-select
v-model="dataForm.workshopSectionId"
filterable
@ -55,7 +55,7 @@
<el-form-item
label="设备"
prop="equipmentId"
:rules="[{ required: true, message: '不能为空', trigger: 'blur' }]">
:rules="[{ required: true, message: '设备不能为空', trigger: 'blur' }]">
<el-select
v-model="dataForm.equipmentId"
filterable

View File

@ -176,7 +176,7 @@ export default {
url: '/base/production-line/listAll',
// prop: '__product_line', // __
prop: 'productionLineId', // 线id使
rules: [{ required: true, message: '不能为空', trigger: 'blur' }],
rules: [{ required: true, message: '产线不能为空', trigger: 'blur' }],
},
{
select: true,
@ -185,7 +185,7 @@ export default {
// depends: '__product_line', // 线
depends: 'productionLineId',
prop: 'workshopSectionId',
rules: [{ required: true, message: '不能为空', trigger: 'blur' }],
rules: [{ required: true, message: '工段不能为空', trigger: 'blur' }],
},
],
[
@ -194,7 +194,7 @@ export default {
label: '设备',
url: '/base/core-equipment/page?pageNo=1&pageSize=100',
prop: 'equipmentId',
rules: [{ required: true, message: '不能为空', trigger: 'blur' }],
rules: [{ required: true, message: '设备不能为空', trigger: 'blur' }],
},
{
input: true,

View File

@ -16,36 +16,20 @@
<el-form-item
label="报警编码"
prop="code"
:rules="[{ required: true, message: '不能为空', trigger: 'blur' }]">
:rules="[{ required: true, message: '报警编码不能为空', trigger: 'blur' }]">
<el-input
:disabled="disabled"
v-model="dataForm.code"
@change="$emit('update', dataForm)"
placeholder="请输入工段排序" />
</el-form-item>
<!--
<el-form-item
label="报警编码"
prop="code"
:rules="[{ required: true, message: '不能为空', trigger: 'blur' }]">
<el-select
v-model="dataForm.code"
placeholder="请选择产线"
@change="handleProductlineChange">
<el-option
v-for="opt in productionLineList"
:key="opt.value"
:label="opt.label"
:value="opt.value" />
</el-select>
</el-form-item> -->
</el-col>
<el-col :span="12">
<el-form-item
label="报警类型"
prop="type"
:rules="[{ required: true, message: '不能为空', trigger: 'blur' }]">
:rules="[{ required: true, message: '报警类型不能为空', trigger: 'blur' }]">
<el-select
v-model="dataForm.type"
:disabled="disabled"
@ -68,7 +52,7 @@
<el-form-item
label="报警级别"
prop="grade"
:rules="[{ required: true, message: '不能为空', trigger: 'blur' }]">
:rules="[{ required: true, message: '报警级别不能为空', trigger: 'blur' }]">
<el-select
:disabled="disabled"
v-model="dataForm.grade"
@ -101,7 +85,7 @@
<el-form-item
label="参数列名"
prop="plcParamName"
:rules="[{ required: true, message: '不能为空', trigger: 'blur' }]">
:rules="[{ required: true, message: '参数列名不能为空', trigger: 'blur' }]">
<el-input
:disabled="disabled"
v-model="dataForm.plcParamName"
@ -113,7 +97,7 @@
<el-form-item
label="报警内容"
prop="alarmContent"
:rules="[{ required: true, message: '不能为空', trigger: 'blur' }]">
:rules="[{ required: true, message: '报警内容不能为空', trigger: 'blur' }]">
<el-input
:disabled="disabled"
v-model="dataForm.alarmContent"

View File

@ -137,7 +137,7 @@ export default {
label: '报警编码', //
prop: 'code',
url: '/base/equipment-group-alarm/getCode',
rules: [{ required: true, message: '不能为空', trigger: 'blur' }],
rules: [{ required: true, message: '报警编码不能为空', trigger: 'blur' }],
},
{
select: true,
@ -147,7 +147,7 @@ export default {
{ label: '布尔型', value: 2 },
{ label: '字符型', value: 1 },
],
rules: [{ required: true, message: '不能为空', trigger: 'blur' }],
rules: [{ required: true, message: '报警类型不能为空', trigger: 'blur' }],
},
],
[
@ -168,13 +168,13 @@ export default {
input: true,
label: '参数列名', //
prop: 'plcParamName',
rules: [{ required: true, message: '不能为空', trigger: 'blur' }],
rules: [{ required: true, message: '参数列名不能为空', trigger: 'blur' }],
},
{
input: true,
label: '报警内容',
prop: 'alarmContent',
rules: [{ required: true, message: '不能为空', trigger: 'blur' }],
rules: [{ required: true, message: '报警内容不能为空', trigger: 'blur' }],
},
],
],

View File

@ -177,7 +177,7 @@ export default {
input: true,
label: '关联表名',
prop: 'plcTableName',
rules: [{ required: true, message: '不能为空', trigger: 'blur' }],
rules: [{ required: true, message: '关联表名不能为空', trigger: 'blur' }],
// bind: {
// disabled: true, // some condition, like detail mode...
// }
@ -187,7 +187,7 @@ export default {
label: '编码',
prop: 'code',
url: '/base/equipment-group/getCode',
rules: [{ required: true, message: '不能为空', trigger: 'blur' }],
rules: [{ required: true, message: '编码不能为空', trigger: 'blur' }],
},
],
[
@ -195,7 +195,7 @@ export default {
input: true,
label: '标识',
prop: 'name',
rules: [{ required: true, message: '不能为空', trigger: 'blur' }],
rules: [{ required: true, message: '标识不能为空', trigger: 'blur' }],
// bind: {
// disabled: true, // some condition, like detail mode...
// }

View File

@ -166,13 +166,13 @@ export default {
input: true,
label: '参数列名',
prop: 'plcParamName',
rules: [{ required: true, message: '不能为空', trigger: 'blur' }],
rules: [{ required: true, message: '参数列名不能为空', trigger: 'blur' }],
},
{
input: true,
label: '参数名称',
prop: 'name',
rules: [{ required: true, message: '不能为空', trigger: 'blur' }],
rules: [{ required: true, message: '参数名称不能为空', trigger: 'blur' }],
},
],
[
@ -181,7 +181,6 @@ export default {
label: '单位',
prop: 'unit',
options: this.getDictDatas(this.DICT_TYPE.UNIT_DICT),
// rules: [{ required: true, message: '', trigger: 'blur' }],
},
{
switch: true,
@ -222,7 +221,6 @@ export default {
transform: (val) => Number(val),
},
],
// rules: [{ required: true, message: '', trigger: 'blur' }],
},
],
[
@ -230,13 +228,11 @@ export default {
input: true,
label: '标准值',
prop: 'defaultValue',
// rules: [{ required: true, message: '', trigger: 'blur' }],
},
{
input: true,
label: '描述',
prop: 'description',
// rules: [{ required: true, message: '', trigger: 'blur' }],
},
],
[
@ -244,7 +240,6 @@ export default {
input: true,
label: '备注',
prop: 'remark',
// rules: [{ required: true, message: '', trigger: 'blur' }],
},
],
],

View File

@ -236,7 +236,7 @@ export default {
prop: 'plcId',
labelKey: `plcTableName`,
url: '/base/equipment-plc/listAll',
rules: [{ required: true, message: '不能为空', trigger: 'blur' }],
rules: [{ required: true, message: '关联表名不能为空', trigger: 'blur' }],
bind: {
filterable: true,
},
@ -248,7 +248,7 @@ export default {
label: '设备',
prop: 'equipmentId',
url: '/base/core-equipment/page?pageNo=1&pageSize=99',
rules: [{ required: true, message: '不能为空', trigger: 'blur' }],
rules: [{ required: true, message: '设备不能为空', trigger: 'blur' }],
bind: {
filterable: true,
},
@ -274,7 +274,7 @@ export default {
input: true,
label: '设备名',
prop: 'equipmentName',
rules: [{ required: true, message: '不能为空', trigger: 'blur' }],
rules: [{ required: true, message: '设备名不能为空', trigger: 'blur' }],
// bind: {
// disabled: this.editMode == 'detail', // some condition, like detail mode...
// }

View File

@ -120,13 +120,13 @@ export default {
input: true,
label: '参数列名',
prop: 'plcParamName',
rules: [{ required: true, message: '不能为空', trigger: 'blur' }],
rules: [{ required: true, message: '参数列名不能为空', trigger: 'blur' }],
},
{
input: true,
label: '参数名称',
prop: 'name',
rules: [{ required: true, message: '不能为空', trigger: 'blur' }],
rules: [{ required: true, message: '参数名称不能为空', trigger: 'blur' }],
},
],
[
@ -135,7 +135,6 @@ export default {
label: '单位',
prop: 'unit',
options: this.getDictDatas(this.DICT_TYPE.UNIT_DICT),
// rules: [{ required: true, message: '', trigger: 'blur' }],
},
{
switch: true,
@ -176,7 +175,6 @@ export default {
transform: (val) => Number(val),
},
],
// rules: [{ required: true, message: '', trigger: 'blur' }],
},
],
[
@ -184,13 +182,11 @@ export default {
input: true,
label: '标准值',
prop: 'defaultValue',
// rules: [{ required: true, message: '', trigger: 'blur' }],
},
{
input: true,
label: '描述',
prop: 'description',
// rules: [{ required: true, message: '', trigger: 'blur' }],
},
],
[
@ -198,7 +194,6 @@ export default {
input: true,
label: '备注',
prop: 'remark',
// rules: [{ required: true, message: '', trigger: 'blur' }],
},
],
],

View File

@ -2,7 +2,7 @@
* @Author: zwq
* @Date: 2021-11-18 14:16:25
* @LastEditors: DY
* @LastEditTime: 2023-11-06 19:44:24
* @LastEditTime: 2023-11-22 11:22:38
* @Description:
-->
<template>
@ -127,12 +127,17 @@
物料属性
</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>
<base-table
:table-props="tableProps"
:page="listQuery.pageNo"
:limit="listQuery.pageSize"
:add-button-show="isdetail ? null : '添加属性'"
@emitButtonClick="addNew()"
:table-data="materialAttrList">
<method-btn
v-if="!isdetail"
@ -152,11 +157,11 @@
</div>
<div class="drawer-body__footer">
<el-button style="" @click="goback()">取消</el-button>
<el-button v-if="isdetail" type="primary" @click="goEdit()">
<el-button style="" @click="goback()">{{ isdetail ? '关闭' : '取消' }}</el-button>
<!-- <el-button v-if="isdetail" type="primary" @click="goEdit()">
编辑
</el-button>
<el-button v-else type="primary" @click="dataFormSubmit()">确定</el-button>
</el-button> -->
<el-button v-if="!isdetail" type="primary" @click="dataFormSubmit()">确定</el-button>
</div>
</div>
@ -425,4 +430,12 @@ export default {
justify-content: flex-end;
padding: 18px;
}
.action_btn {
float: right;
margin: -35px 15px;
font-size: 14px;
}
.add {
color: #0b58ff;
}
</style>

View File

@ -2,7 +2,7 @@
* @Author: zwq
* @Date: 2021-11-18 14:16:25
* @LastEditors: DY
* @LastEditTime: 2023-11-06 20:04:03
* @LastEditTime: 2023-11-22 11:09:44
* @Description:
-->
<template>
@ -44,7 +44,7 @@
</el-col>
<el-col :span="12">
<el-form-item label="产品BOM编码" prop="code">
<el-input v-model="dataForm.code" disabled placeholder="请输入产品Bom编码" />
<el-input v-model="dataForm.code" :disabled="isdetail" placeholder="请输入产品Bom编码" />
</el-form-item>
</el-col>
</el-row>
@ -154,11 +154,11 @@
</div>
<div class="drawer-body__footer">
<el-button style="" @click="goback()">取消</el-button>
<el-button v-if="isdetail" type="primary" @click="goEdit()">
<el-button style="" @click="goback()">{{ isdetail ? '关闭' : '取消' }}</el-button>
<!-- <el-button v-if="isdetail" type="primary" @click="goEdit()">
编辑
</el-button>
<el-button v-else type="primary" @click="dataFormSubmit()">确定</el-button>
</el-button> -->
<el-button v-if="!isdetail" type="primary" @click="dataFormSubmit()">确定</el-button>
</div>
</div>
@ -304,15 +304,16 @@ export default {
}
return row.materialId === item.id
})
this.unitList.filter(u => {
if (tempM[0].unit === u.value) {
row.unit = u.value
row.mUnit = u.label
}
})
if (tempM[0].unit) {
this.unitList.filter(u => {
if (tempM[0].unit === u.value) {
row.unit = u.value
row.mUnit = u.label
}
})
}
// row.materialCode = tempList[0].code
// row.unit = tempList[0].unit
console.log('row', row)
},
edit(row) {
row.isEdit = true

View File

@ -151,7 +151,7 @@ export default {
case 'search':
this.listQuery.pageNo = 1;
this.listQuery.pageSize = 10;
this.listQuery.name = val.name ? val.name : undefined;
this.listQuery.productName = val.name ? val.name : undefined;
this.getDataList();
break;
case 'reset':

View File

@ -2,7 +2,7 @@
* @Author: zwq
* @Date: 2021-11-18 14:16:25
* @LastEditors: DY
* @LastEditTime: 2023-11-06 19:27:57
* @LastEditTime: 2023-11-22 10:40:08
* @Description:
-->
<template>
@ -151,7 +151,7 @@ export default {
equipmentId: undefined,
userName: undefined,
userNames: [],
useTime: undefined,
useTime: new Date().getTime(),
address: undefined,
num: 0,
source: undefined,

View File

@ -130,7 +130,7 @@ export default {
type: 'datePicker',
label: '使用时间段',
dateType: 'datetimerange',
format: 'yyyy-MM-dd',
format: 'yyyy-MM-dd HH:mm:ss',
valueFormat: 'yyyy-MM-dd HH:mm:ss',
rangeSeparator: '-',
startPlaceholder: '开始时间',

View File

@ -2,7 +2,7 @@
* @Author: zwq
* @Date: 2023-08-01 14:55:51
* @LastEditors: zhp
* @LastEditTime: 2023-11-07 19:28:18
* @LastEditTime: 2023-11-22 14:40:59
* @Description:
-->
<template>
@ -77,7 +77,7 @@ const tableProps = [
{
prop: 'printStatus',
label: '打印状态',
// subcomponent: unitDict,
filter: (val) => val == 1 ? '未打印' : '已打印',
},
{
prop: 'createTime',
@ -96,7 +96,11 @@ export default {
exportURL: exportPackingExcel,
},
tableProps,
tableBtn: [
tableBtn: [
{
type: 'print',
btnName: '打印',
},
this.$auth.hasPermi(`base:packaging-print-log:update`)
? {
type: 'edit',
@ -109,10 +113,6 @@ export default {
btnName: '删除',
}
: undefined,
{
type: 'print',
btnName: '打印',
},
].filter((v) => v),
tableData: [],
formConfig: [

View File

@ -2,7 +2,7 @@
* @Author: zwq
* @Date: 2023-08-01 14:55:51
* @LastEditors: zhp
* @LastEditTime: 2023-11-01 10:28:29
* @LastEditTime: 2023-11-22 14:40:07
* @Description:
-->
<template>
@ -33,6 +33,11 @@ import {
} from '@/api/base/printModel';
const tableProps = [
{
prop: 'createTime',
label: '创建时间',
filter: parseTime
},
{
prop: 'name',
label: '模板名称'
@ -64,7 +69,11 @@ export default {
},
tableProps,
modelShow:false,
tableBtn: [
tableBtn: [
{
type: 'print',
btnName: '查看',
},
this.$auth.hasPermi(`base:packaging-print-model:update`)
? {
type: 'edit',
@ -77,10 +86,6 @@ export default {
btnName: '删除',
}
: undefined,
{
type: 'print',
btnName: '查看',
},
].filter((v) => v),
tableData: [],
formConfig: [

View File

@ -2,7 +2,7 @@
* @Author: zwq
* @Date: 2023-08-01 14:55:51
* @LastEditors: zhp
* @LastEditTime: 2023-10-18 16:11:22
* @LastEditTime: 2023-11-22 14:36:33
* @Description:
-->
<template>
@ -107,12 +107,12 @@ export default {
// valueFormat: 'yyyy-MM-dd',
// param: 'createTime',
// },
{
type: 'button',
btnName: '搜索',
name: 'search',
color: 'primary',
},
// {
// type: 'button',
// btnName: '',
// name: 'search',
// color: 'primary',
// },
// {
// type: 'separate',
// },
@ -125,7 +125,7 @@ export default {
type: 'separate',
},
{
type: this.$auth.hasPermi('base:packaging-print-log:create') ? 'button' : '',
type: this.$auth.hasPermi('base:packaging-print-type:create') ? 'button' : '',
btnName: '新增',
name: 'add',
color: 'success',

View File

@ -69,7 +69,7 @@ const tableProps = [
prop: 'createTime',
label: '添加时间',
filter: parseTime,
minWidth: 150
minWidth: 160
},
{
prop: 'deliveryCarCode',
@ -81,7 +81,7 @@ const tableProps = [
prop: 'loadTime',
label: '装车时间',
filter: parseTime,
minWidth: 150
minWidth: 160
},
{
prop: 'productName',

View File

@ -78,7 +78,7 @@ const tableProps = [
prop: 'deliveryTime',
label: '发货时间',
filter: parseTime,
minWidth: 150
minWidth: 160
},
{
prop: 'code',

View File

@ -122,7 +122,7 @@ const tableProps = [
prop: 'deliveryTime',
label: '发货时间',
filter: parseTime,
minWidth: 150
minWidth: 160
},
{
prop: 'code',
@ -151,7 +151,7 @@ const tableProps2 = [
prop: 'createTime',
label: '添加时间',
filter: parseTime,
minWidth: 150
minWidth: 160
},
{
prop: 'deliveryCarCode',
@ -162,7 +162,7 @@ const tableProps2 = [
prop: 'loadTime',
label: '装车时间',
filter: parseTime,
minWidth: 150
minWidth: 160
},
{
prop: 'productName',

View File

@ -39,14 +39,12 @@
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<el-col :span="12">
<el-form-item label="是否采集" prop="collection">
<el-switch v-model="form.collection"></el-switch>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<el-col :span="12">
<el-form-item label="描述" prop="description">
<el-input v-model="form.description"></el-input>
</el-form-item>

View File

@ -37,6 +37,7 @@
@cancel="handleCancel"
@confirm="handleConfirm"
:before-close="handleCancel"
width='30%'
>
<energy-plc-connect-add ref="energyPlcConnect" :objList="objList" @successSubmit="successSubmit" />
</base-dialog>

View File

@ -9,7 +9,7 @@
width="120">
</el-table-column>
</el-table>
<span v-if='singlePrice'><span class='priceTitle'>单价(): </span>{{ singlePrice }}</span>
<span v-if='singlePrice'><span class='priceTitle'>单价(): </span>{{ singlePrice.toFixed(2) }}</span>
<el-button
slot="reference"
type="text"
@ -32,7 +32,8 @@ const temp1 = [
},
{
prop: 'price',
label: '单价(元)'
label: '单价(元)',
align: 'right'
}
]
const temp2 = [
@ -46,7 +47,8 @@ const temp2 = [
},
{
prop: 'price',
label: '单价(元)'
label: '单价(元)',
align: 'right'
}
]
export default {
@ -78,12 +80,20 @@ export default {
console.log(res)
if (res.data.pricingMethod === 0) {
this.tableProps = this.temp1
this.tableData = res.data.segPriceList
this.singlePrice = ''
let arr1 = res.data.segPriceList
for (let item of arr1) {
item.price = item.price.toFixed(2)
}
this.tableData = arr1
} else if (res.data.pricingMethod === 1) {
this.tableProps = this.temp2
this.tableData = res.data.usedPriceList
this.singlePrice = ''
let arr2 = res.data.usedPriceList
for (let item of arr2) {
item.price = item.price.toFixed(2)
}
this.tableData = arr2
} else {
this.tableProps = []
this.tableData = []

View File

@ -1,5 +1,5 @@
<template>
<el-form ref="form" :rules="rules" label-width="80px" :model="form">
<el-form ref="form" :rules="rules" label-width="100px" :model="form">
<el-row>
<el-col :span="12">
<el-form-item label="能源类型" prop="name">

View File

@ -26,28 +26,6 @@
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="监控模式" prop="type">
<el-select v-model="form.type" placeholder="请选择" style="width: 100%;" @change="typeChange">
<el-option label="合并" :value= "1" ></el-option>
<el-option label="详细" :value= "2" ></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="监控详细参数" prop="type" v-if="form.type === 2">
<el-select v-model="form.plcParamId" placeholder="请选择" style="width: 100%;" @change="selectDetail">
<el-option
v-for="item in detailList"
:key="item.id"
:label="item.name"
:value="item.id">
</el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="指标类型" prop="limitType">
@ -61,10 +39,32 @@
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="监控模式" prop="type">
<el-select v-model="form.type" placeholder="请选择" style="width: 100%;" @change="typeChange">
<el-option label="合并" :value= "1" ></el-option>
<el-option label="详细" :value= "2" ></el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="消耗量阈值">
<el-input-number v-model="form.minValue" placeholder="最小值" :max="10000000000000000" style="width: 50%;"></el-input-number>
<el-input-number v-model="form.maxValue" placeholder="最大值" :max="10000000000000000" style="width: 50%;"></el-input-number>
<el-input-number v-model="form.minValue" placeholder="最小值" :max="9999999" style="width: 50%;"></el-input-number>
<el-input-number v-model="form.maxValue" placeholder="最大值" :max="9999999" style="width: 50%;"></el-input-number>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="监控详细参数" prop="type" v-if="form.type === 2">
<el-select v-model="form.plcParamId" placeholder="请选择" style="width: 100%;" @change="selectDetail">
<el-option
v-for="item in detailList"
:key="item.id"
:label="item.name"
:value="item.id">
</el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>

View File

@ -37,7 +37,7 @@
@cancel="handleCancel"
@confirm="handleConfirm"
:before-close="handleCancel"
width='60%'
width='50%'
>
<energy-limit-add ref="energyLimit" @successSubmit="successSubmit" :energyTypeList="energyTypeList" :objList="objList"/>
</base-dialog>

View File

@ -40,13 +40,13 @@ const tableProps = [
prop: 'startTime',
label: '开始时间',
filter: parseTime,
minWidth: 150
minWidth: 160
},
{
prop: 'endTime',
label: '结束时间',
filter: parseTime,
minWidth: 150
minWidth: 160
},
{
prop: 'statisticName',

View File

@ -70,7 +70,7 @@ export default {
},
{
type: 'datePicker',
label: '时间(必填)',
label: '时间',
dateType: 'datetimerange',
format: 'yyyy-MM-dd HH:mm:ss',
valueFormat: "timestamp",
@ -80,7 +80,8 @@ export default {
param: 'timeVal',
defaultSelect: [],
width: 350,
clearable: false
clearable: false,
required:true
},
{
type: 'button',

View File

@ -172,11 +172,11 @@ export default {
this.$modal.msgWarning('工单不能为空')
return false
}
if (!val.objType) {
if (!val.energyTypeId) {
this.$modal.msgWarning('能源类型不能为空')
return false
}
if (!val.energyTypeId) {
if (!val.objType) {
this.$modal.msgWarning('对象维度不能为空')
return false
}

View File

@ -29,27 +29,60 @@
<section v-for="(section, index) in sections" :key="section.key">
<SmallTitle v-if="index != 0">{{ section.name }}</SmallTitle>
<div class="form-part" v-if="section.key == 'base'">
<div
class="form-part"
v-if="section.key == 'base'"
style="border-bottom: 1px solid #dfdfdf; margin-bottom: 24px">
<el-skeleton v-if="!showForm" animated />
<BaseInfoForm
<!-- <BaseInfoForm
key="drawer-dialog-form"
v-if="showForm"
ref="form"
:disabled="mode.includes('detail')"
:dataForm="form"
:rows="formRows" />
:rows="formRows" /> -->
<el-row style="margin-bottom: 24px">
<el-col :span="8">
<div
class="title"
style="font-weight: 700; font-size: 16px; margin: 8px 0">
设备分组名称
</div>
<div class="value" style="font-size: 14px">{{ form.name }}</div>
</el-col>
<el-col :span="8">
<div
class="title"
style="font-weight: 700; font-size: 16px; margin: 8px 0">
设备分组编码
</div>
<div class="value" style="font-size: 14px">
{{ form.code }}
</div>
</el-col>
</el-row>
</div>
<div v-if="section.key == 'attrs'" style="margin-top: 12px">
<div
v-if="section.key == 'attrs'"
style="position: relative; margin-top: 12px">
<!-- v-if="!mode.includes('detail')" -->
<div style="position: absolute; top: -40px; right: 0">
<el-button @click="handleAddAttr" type="text">
<i class="el-icon-plus"></i>
添加报警
</el-button>
</div>
<base-table
v-loading="attrListLoading"
:table-props="section.props"
:page="attrQuery?.params.pageNo || 1"
:limit="attrQuery?.params.pageSize || 10"
:table-data="list"
:add-button-show="mode.includes('detail') ? null : '添加属性'"
@emitButtonClick="handleAddAttr"
@emitFun="handleEmitFun">
<!-- :add-button-show="mode.includes('detail') ? null : '添加属性'"
@emitButtonClick="handleAddAttr" -->
<method-btn
v-if="section.tableBtn"
slot="handleBtn"
@ -71,17 +104,10 @@
<div class="drawer-body__footer">
<el-button style="" @click="handleCancel">取消</el-button>
<el-button v-if="mode == 'detail'" type="primary" @click="toggleEdit">
<!-- <el-button v-if="mode == 'detail'" type="primary" @click="toggleEdit">
编辑
</el-button>
<el-button v-else type="primary" @click="handleCancel">确定</el-button>
<!-- sections的第二项必须是 属性列表 -->
<!-- <el-button
v-if="sections[1].allowAdd"
type="primary"
@click="handleAddAttr">
添加属性
</el-button> -->
</el-button> -->
<!-- <el-button v-else type="primary" @click="handleCancel">确定</el-button> -->
</div>
</div>
@ -99,9 +125,9 @@
<DialogForm
v-if="attrFormVisible"
ref="attrForm"
:disabled="mode.includes('detail')"
v-model="attrForm"
:rows="attrRows" />
<!-- :disabled="mode.includes('detail')" -->
</base-dialog>
</el-drawer>
</template>
@ -165,8 +191,30 @@ export default {
label: '报警编码', //
prop: 'code',
url: '/base/equipment-group-alarm/getCode',
rules: [{ required: true, message: '不能为空', trigger: 'blur' }],
rules: [{ required: true, message: '报警编码不能为空', trigger: 'blur' }],
},
{
select: true,
label: '报警级别', //
prop: 'grade',
options: this.getDictDatas(this.DICT_TYPE.EQU_ALARM_LEVEL),
},
],
[
{
input: true,
label: '参数列名', //
prop: 'plcParamName',
rules: [{ required: true, message: '参数列名不能为空', trigger: 'blur' }],
},
{
input: true,
label: '报警内容',
prop: 'alarmContent',
rules: [{ required: true, message: '报警内容不能为空', trigger: 'blur' }],
},
],
[
{
select: true,
label: '报警类型', //
@ -175,15 +223,7 @@ export default {
{ label: '布尔型', value: 2 },
{ label: '字符型', value: 1 },
],
rules: [{ required: true, message: '不能为空', trigger: 'blur' }],
},
],
[
{
select: true,
label: '报警级别', //
prop: 'grade',
options: this.getDictDatas(this.DICT_TYPE.EQU_ALARM_LEVEL),
rules: [{ required: true, message: '报警类型不能为空', trigger: 'blur' }],
},
{
input: true,
@ -191,20 +231,6 @@ export default {
prop: 'alarmCode',
},
],
[
{
input: true,
label: '参数列名', //
prop: 'plcParamName',
rules: [{ required: true, message: '不能为空', trigger: 'blur' }],
},
{
input: true,
label: '报警内容',
prop: 'alarmContent',
rules: [{ required: true, message: '不能为空', trigger: 'blur' }],
},
],
],
attrQuery: {
params: {
@ -226,7 +252,7 @@ export default {
bind: {
//
// disabled: this.mode == 'detail',
disabled: true
disabled: true,
},
};
});

View File

@ -16,46 +16,26 @@
<el-form-item
label="报警编码"
prop="code"
:rules="[{ required: true, message: '不能为空', trigger: 'blur' }]">
:rules="[{ required: true, message: '报警编码不能为空', trigger: 'blur' }]">
<el-input
:disabled="disabled"
v-model="dataForm.code"
@change="$emit('update', dataForm)"
placeholder="请输入报警编码" />
</el-form-item>
<!--
<el-form-item
label="报警编码"
prop="code"
:rules="[{ required: true, message: '不能为空', trigger: 'blur' }]">
<el-select
v-model="dataForm.code"
placeholder="请选择产线"
@change="handleProductlineChange">
<el-option
v-for="opt in productionLineList"
:key="opt.value"
:label="opt.label"
:value="opt.value" />
</el-select>
</el-form-item> -->
</el-col>
<el-col :span="12">
<el-form-item
label="报警类型"
prop="type"
:rules="[{ required: true, message: '不能为空', trigger: 'blur' }]">
label="报警级别"
prop="grade"
:rules="[{ required: true, message: '报警级别不能为空', trigger: 'blur' }]">
<el-select
:disabled="disabled"
v-model="dataForm.type"
placeholder="请选择报警类型"
@change="handleTypeChange">
v-model="dataForm.grade"
placeholder="请选择报警级别"
@change="$emit('update', dataForm)">
<el-option
v-for="opt in [
{ label: '布尔型', value: 2 },
{ label: '字符型', value: 1 },
]"
v-for="opt in getDictDatas(DICT_TYPE.EQU_ALARM_LEVEL)"
:key="opt.value"
:label="opt.label"
:value="opt.value" />
@ -66,16 +46,45 @@
<el-row :gutter="20">
<el-col :span="12">
<el-form-item
label="报警级别"
prop="grade"
:rules="[{ required: true, message: '不能为空', trigger: 'blur' }]">
label="参数列名"
prop="plcParamName"
:rules="[{ required: true, message: '参数列名不能为空', trigger: 'blur' }]">
<el-input
:disabled="disabled"
v-model="dataForm.plcParamName"
placeholder="请输入参数列名"
@change="$emit('update', dataForm)"></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item
label="报警内容"
prop="alarmContent"
:rules="[{ required: true, message: '报警内容不能为空', trigger: 'blur' }]">
<el-input
:disabled="disabled"
v-model="dataForm.alarmContent"
placeholder="请输入报警内容"
@change="$emit('update', dataForm)"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="12">
<el-form-item
label="报警类型"
prop="type"
:rules="[{ required: true, message: '报警类型不能为空', trigger: 'blur' }]">
<el-select
:disabled="disabled"
v-model="dataForm.grade"
placeholder="请选择报警级别"
@change="$emit('update', dataForm)">
v-model="dataForm.type"
placeholder="请选择报警类型"
@change="handleTypeChange">
<el-option
v-for="opt in getDictDatas(DICT_TYPE.EQU_ALARM_LEVEL)"
v-for="opt in [
{ label: '布尔型', value: 2 },
{ label: '字符型', value: 1 },
]"
:key="opt.value"
:label="opt.label"
:value="opt.value" />
@ -96,32 +105,6 @@
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="12">
<el-form-item
label="参数列名"
prop="plcParamName"
:rules="[{ required: true, message: '不能为空', trigger: 'blur' }]">
<el-input
:disabled="disabled"
v-model="dataForm.plcParamName"
placeholder="请输入参数列名"
@change="$emit('update', dataForm)"></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item
label="报警内容"
prop="alarmContent"
:rules="[{ required: true, message: '不能为空', trigger: 'blur' }]">
<el-input
:disabled="disabled"
v-model="dataForm.alarmContent"
placeholder="请输入报警内容"
@change="$emit('update', dataForm)"></el-input>
</el-form-item>
</el-col>
</el-row>
</el-form>
</template>

View File

@ -183,10 +183,7 @@ export default {
input: true,
label: '设备分组名称',
prop: 'name',
rules: [{ required: true, message: '不能为空', trigger: 'blur' }],
// bind: {
// disabled: this.editMode == 'detail', // some condition, like detail mode...
// }
rules: [{ required: true, message: '设备分组名称不能为空', trigger: 'blur' }],
},
{
input: true,
@ -271,7 +268,7 @@ export default {
input: true,
label: '分组名称',
prop: 'name',
rules: [{ required: true, message: '不能为空', trigger: 'blur' }],
rules: [{ required: true, message: '分组名称不能为空', trigger: 'blur' }],
// bind: {
// disabled: true, // some condition, like detail mode...
// }
@ -283,7 +280,7 @@ export default {
label: '分组编码',
prop: 'code',
url: '/base/equipment-group/getCode',
rules: [{ required: true, message: '不能为空', trigger: 'blur' }],
rules: [{ required: true, message: '分组编码不能为空', trigger: 'blur' }],
},
],
[
@ -291,7 +288,6 @@ export default {
input: true,
label: '备注',
prop: 'remark',
// rules: [{ required: true, message: '', trigger: 'blur' }],
bind: {
placeholder: '请输入备注',
},

View File

@ -29,27 +29,60 @@
<section v-for="(section, index) in sections" :key="section.key">
<SmallTitle v-if="index != 0">{{ section.name }}</SmallTitle>
<div class="form-part" v-if="section.key == 'base'">
<div
class="form-part"
v-if="section.key == 'base'"
style="border-bottom: 1px solid #dfdfdf; margin-bottom: 24px">
<el-skeleton v-if="!showForm" animated />
<BaseInfoForm
<!-- <BaseInfoForm
key="drawer-dialog-form"
v-if="showForm"
ref="form"
:disabled="true"
:dataForm="form"
:rows="formRows" />
:rows="formRows" /> -->
<el-row style="margin-bottom: 24px">
<el-col :span="8">
<div
class="title"
style="font-weight: 700; font-size: 16px; margin: 8px 0">
设备分组名称
</div>
<div class="value" style="font-size: 14px">{{ form.name }}</div>
</el-col>
<el-col :span="8">
<div
class="title"
style="font-weight: 700; font-size: 16px; margin: 8px 0">
设备分组编码
</div>
<div class="value" style="font-size: 14px">
{{ form.code }}
</div>
</el-col>
</el-row>
</div>
<div v-if="section.key == 'attrs'" style="margin-top: 12px">
<div
v-if="section.key == 'attrs'"
style="position: relative; margin-top: 12px">
<!-- v-if="!mode.includes('detail')" -->
<div style="position: absolute; top: -40px; right: 0">
<el-button @click="handleAddAttr" type="text">
<i class="el-icon-plus"></i>
添加属性
</el-button>
</div>
<base-table
v-loading="attrListLoading"
:table-props="section.props"
:page="attrQuery?.params.pageNo || 1"
:limit="attrQuery?.params.pageSize || 10"
:table-data="list"
:add-button-show="mode.includes('detail') ? null : '添加属性'"
@emitButtonClick="handleAddAttr"
@emitFun="handleEmitFun">
<!-- :add-button-show="mode.includes('detail') ? null : '添加属性'"
@emitButtonClick="handleAddAttr" -->
<method-btn
v-if="section.tableBtn"
slot="handleBtn"
@ -71,17 +104,10 @@
<div class="drawer-body__footer">
<el-button style="" @click="handleCancel">取消</el-button>
<el-button v-if="mode == 'detail'" type="primary" @click="toggleEdit">
<!-- <el-button v-if="mode == 'detail'" type="primary" @click="toggleEdit">
编辑
</el-button>
<el-button v-else type="primary" @click="handleCancel">确定</el-button>
<!-- sections的第二项必须是 属性列表 -->
<!-- <el-button
v-if="sections[1].allowAdd"
type="primary"
@click="handleAddAttr">
添加属性
</el-button> -->
</el-button> -->
<!-- <el-button v-else type="primary" @click="handleCancel">确定</el-button> -->
</div>
</div>
@ -96,10 +122,10 @@
@close="closeAttrForm"
@cancel="closeAttrForm"
@confirm="submitAttrForm">
<!-- :disabled="mode.includes('detail')" -->
<DialogForm
v-if="attrFormVisible"
ref="attrForm"
:disabled="mode.includes('detail')"
v-model="attrForm"
:rows="attrRows" />
</base-dialog>
@ -165,7 +191,7 @@ export default {
label: '报警编码', //
prop: 'code',
url: '/base/equipment-group-alarm/getCode',
rules: [{ required: true, message: '不能为空', trigger: 'blur' }],
rules: [{ required: true, message: '报警编码不能为空', trigger: 'blur' }],
},
{
select: true,
@ -175,7 +201,7 @@ export default {
{ label: '布尔型', value: 2 },
{ label: '字符型', value: 1 },
],
rules: [{ required: true, message: '不能为空', trigger: 'blur' }],
rules: [{ required: true, message: '报警类型不能为空', trigger: 'blur' }],
},
],
[
@ -196,13 +222,13 @@ export default {
input: true,
label: '参数列名', //
prop: 'plcParamName',
rules: [{ required: true, message: '不能为空', trigger: 'blur' }],
rules: [{ required: true, message: '参数列名不能为空', trigger: 'blur' }],
},
{
input: true,
label: '报警内容',
prop: 'alarmContent',
rules: [{ required: true, message: '不能为空', trigger: 'blur' }],
rules: [{ required: true, message: '报警内容不能为空', trigger: 'blur' }],
},
],
],

View File

@ -16,46 +16,27 @@
<el-form-item
label="报警编码"
prop="code"
:rules="[{ required: true, message: '不能为空', trigger: 'blur' }]">
:rules="[{ required: true, message: '报警编码不能为空', trigger: 'blur' }]">
<el-input
:disabled="disabled"
v-model="dataForm.code"
@change="$emit('update', dataForm)"
placeholder="请输入工段排序" />
</el-form-item>
<!--
<el-form-item
label="报警编码"
prop="code"
:rules="[{ required: true, message: '不能为空', trigger: 'blur' }]">
<el-select
v-model="dataForm.code"
placeholder="请选择产线"
@change="handleProductlineChange">
<el-option
v-for="opt in productionLineList"
:key="opt.value"
:label="opt.label"
:value="opt.value" />
</el-select>
</el-form-item> -->
</el-col>
<el-col :span="12">
<el-form-item
label="报警类型"
prop="type"
:rules="[{ required: true, message: '不能为空', trigger: 'blur' }]">
label="报警级别"
prop="grade"
:rules="[{ required: true, message: '报警级别不能为空', trigger: 'blur' }]">
<el-select
:disabled="disabled"
v-model="dataForm.type"
placeholder="请选择报警类型"
@change="handleTypeChange">
v-model="dataForm.grade"
placeholder="请选择报警级别"
@change="$emit('update', dataForm)">
<el-option
v-for="opt in [
{ label: '布尔型', value: 2 },
{ label: '字符型', value: 1 },
]"
v-for="opt in getDictDatas(DICT_TYPE.EQU_ALARM_LEVEL)"
:key="opt.value"
:label="opt.label"
:value="opt.value" />
@ -66,16 +47,45 @@
<el-row :gutter="20">
<el-col :span="12">
<el-form-item
label="报警级别"
prop="grade"
:rules="[{ required: true, message: '不能为空', trigger: 'blur' }]">
label="参数列名"
prop="plcParamName"
:rules="[{ required: true, message: '参数列名不能为空', trigger: 'blur' }]">
<el-input
:disabled="disabled"
v-model="dataForm.plcParamName"
placeholder="请输入参数列名"
@change="$emit('update', dataForm)"></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item
label="报警内容"
prop="alarmContent"
:rules="[{ required: true, message: '报警内容不能为空', trigger: 'blur' }]">
<el-input
:disabled="disabled"
v-model="dataForm.alarmContent"
placeholder="请输入报警内容"
@change="$emit('update', dataForm)"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="12">
<el-form-item
label="报警类型"
prop="type"
:rules="[{ required: true, message: '报警类型不能为空', trigger: 'blur' }]">
<el-select
:disabled="disabled"
v-model="dataForm.grade"
placeholder="请选择报警级别"
@change="$emit('update', dataForm)">
v-model="dataForm.type"
placeholder="请选择报警类型"
@change="handleTypeChange">
<el-option
v-for="opt in getDictDatas(DICT_TYPE.EQU_ALARM_LEVEL)"
v-for="opt in [
{ label: '布尔型', value: 2 },
{ label: '字符型', value: 1 },
]"
:key="opt.value"
:label="opt.label"
:value="opt.value" />
@ -96,32 +106,6 @@
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="12">
<el-form-item
label="参数列名"
prop="plcParamName"
:rules="[{ required: true, message: '不能为空', trigger: 'blur' }]">
<el-input
:disabled="disabled"
v-model="dataForm.plcParamName"
placeholder="请输入参数列名"
@change="$emit('update', dataForm)"></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item
label="报警内容"
prop="alarmContent"
:rules="[{ required: true, message: '不能为空', trigger: 'blur' }]">
<el-input
:disabled="disabled"
v-model="dataForm.alarmContent"
placeholder="请输入报警内容"
@change="$emit('update', dataForm)"></el-input>
</el-form-item>
</el-col>
</el-row>
</el-form>
</template>

View File

@ -224,7 +224,7 @@ export default {
bind: {
filterable: true,
},
rules: [{ required: true, message: '不能为空', trigger: 'blur' }],
rules: [{ required: true, message: '设备不能为空', trigger: 'blur' }],
},
],
[
@ -238,7 +238,7 @@ export default {
bind: {
filterable: true,
},
rules: [{ required: true, message: '不能为空', trigger: 'blur' }],
rules: [{ required: true, message: '报警分组不能为空', trigger: 'blur' }],
},
],
],
@ -269,7 +269,7 @@ export default {
input: true,
label: '设备分组名称',
prop: 'name',
rules: [{ required: true, message: '不能为空', trigger: 'blur' }],
rules: [{ required: true, message: '设备分组名称不能为空', trigger: 'blur' }],
// bind: {
// disabled: this.editMode == 'detail', // some condition, like detail mode...
// }

View File

@ -61,7 +61,7 @@
rows: drawerBaseInfoRows,
},
{
name: '属性列表',
name: '采集参数',
key: 'attrs',
props: drawerListProps,
url: '/base/equipment-plc-param/page',
@ -75,18 +75,26 @@
pageSize: 10,
},
tableBtn: [
this.$auth.hasPermi('equipment:collection-config-param:update')
? {
type: 'edit',
btnName: '修改',
}
: undefined,
this.$auth.hasPermi('equipment:collection-config-param:delete')
? {
type: 'delete',
btnName: '删除',
}
: undefined,
{
type: 'edit',
btnName: '修改',
},
{
type: 'delete',
btnName: '删除',
},
// this.$auth.hasPermi('equipment:collection-config-param:update')
// ? {
// type: 'edit',
// btnName: '',
// }
// : undefined,
// this.$auth.hasPermi('equipment:collection-config-param:delete')
// ? {
// type: 'delete',
// btnName: '',
// }
// : undefined,
].filter((v) => v),
allowAdd: true,
},
@ -106,7 +114,6 @@ import {
getEquipmentPlcConnectPage,
exportEquipmentPlcConnectExcel,
} from '@/api/base/equipmentPlcConnect';
import moment from 'moment';
import basicPageMixin from '@/mixins/lb/basicPageMixin';
// import './http';
import BasicDrawer from './components/BasicDrawer.vue';
@ -182,13 +189,15 @@ export default {
placeholder: '请选择设备',
param: 'equipmentId',
selectOptions: [],
filterable: true
},
{
type: 'select',
label: '编码',
placeholder: '请选择编码',
label: '关联表编码',
placeholder: '请选择关联表编码',
param: 'plcId',
selectOptions: [],
filterable: true
},
{
type: 'button',
@ -224,7 +233,9 @@ export default {
prop: 'plcId',
labelKey: `plcTableName`,
url: '/base/equipment-plc/listAll',
rules: [{ required: true, message: '不能为空', trigger: 'blur' }],
rules: [
{ required: true, message: '关联表名不能为空', trigger: 'blur' },
],
bind: {
filterable: true,
},
@ -236,7 +247,9 @@ export default {
label: '设备',
prop: 'equipmentId',
url: '/base/core-equipment/page?pageNo=1&pageSize=99',
rules: [{ required: true, message: '不能为空', trigger: 'blur' }],
rules: [
{ required: true, message: '设备不能为空', trigger: 'blur' },
],
bind: {
filterable: true,
},
@ -262,7 +275,9 @@ export default {
input: true,
label: '设备名',
prop: 'equipmentName',
rules: [{ required: true, message: '不能为空', trigger: 'blur' }],
rules: [
{ required: true, message: '设备名不能为空', trigger: 'blur' },
],
// bind: {
// disabled: this.editMode == 'detail', // some condition, like detail mode...
// }
@ -296,7 +311,8 @@ export default {
label: '生产参数类型',
filter: (val) =>
val != null
? ['', '进片数量', '出片数量', '破损数量', '无类型', ''][val]
// ? ['', '', '', '', '', ''][val]
? ['', '进口计数', '出口计数', '损耗计数', '无类型', ''][val]
: '-',
},
{

View File

@ -59,7 +59,6 @@ import {
getEquipmentPlcPage,
exportEquipmentPlcExcel,
} from '@/api/base/equipmentPlc';
import moment from 'moment';
import basicPageMixin from '@/mixins/lb/basicPageMixin';
const switchBtn = {
@ -184,7 +183,7 @@ export default {
input: true,
label: '关联表名',
prop: 'plcTableName',
rules: [{ required: true, message: '不能为空', trigger: 'blur' }],
rules: [{ required: true, message: '关联表名不能为空', trigger: 'blur' }],
// bind: {
// disabled: true, // some condition, like detail mode...
// }
@ -194,7 +193,7 @@ export default {
label: '编码',
prop: 'code',
url: '/base/equipment-group/getCode',
rules: [{ required: true, message: '不能为空', trigger: 'blur' }],
rules: [{ required: true, message: '编码不能为空', trigger: 'blur' }],
},
],
[
@ -202,7 +201,7 @@ export default {
input: true,
label: '标识',
prop: 'name',
rules: [{ required: true, message: '不能为空', trigger: 'blur' }],
rules: [{ required: true, message: '标识不能为空', trigger: 'blur' }],
// bind: {
// disabled: true, // some condition, like detail mode...
// }
@ -352,7 +351,7 @@ export default {
handleDelete(row) {
const id = row.id;
this.$modal
.confirm('是否确认删除实时数据采集配置编号为"' + id + '"的数据项?')
.confirm('是否确认删除该配置?')
.then(function () {
return deleteEquipmentPlc(id);
})

View File

@ -29,27 +29,62 @@
<section v-for="(section, index) in sections" :key="section.key">
<SmallTitle v-if="index != 0">{{ section.name }}</SmallTitle>
<div class="form-part" v-if="section.key == 'base'">
<div
class="form-part"
v-if="section.key == 'base'"
style="border-bottom: 1px solid #dfdfdf; margin-bottom: 24px">
<el-skeleton v-if="!showForm" animated />
<BaseInfoForm
<!-- <BaseInfoForm
key="drawer-dialog-form"
v-if="showForm"
ref="form"
:disabled="mode.includes('detail')"
v-model="form"
:rows="formRows" />
:rows="formRows" /> -->
<el-row style="margin-bottom: 24px">
<el-col :span="8">
<div
class="title"
style="font-weight: 700; font-size: 16px; margin: 8px 0">
设备名
</div>
<div class="value" style="font-size: 14px">
{{ form.equipmentName }}
</div>
</el-col>
<el-col :span="8">
<div
class="title"
style="font-weight: 700; font-size: 16px; margin: 8px 0">
关联表名
</div>
<div class="value" style="font-size: 14px">
{{ form.plcTableName }}
</div>
</el-col>
</el-row>
</div>
<div v-if="section.key == 'attrs'" style="margin-top: 12px">
<div
v-if="section.key == 'attrs'"
style="position: relative; margin-top: 12px">
<!-- v-if="!mode.includes('detail')" -->
<div style="position: absolute; top: -40px; right: 0">
<el-button @click="handleAddAttr" type="text">
<i class="el-icon-plus"></i>
添加属性
</el-button>
</div>
<base-table
v-loading="attrListLoading"
:table-props="section.props"
:page="attrQuery?.params.pageNo || 1"
:limit="attrQuery?.params.pageSize || 10"
:table-data="list"
:add-button-show="mode.includes('detail') ? null : '添加属性'"
@emitButtonClick="handleAddAttr"
@emitFun="handleEmitFun">
<!-- :add-button-show="mode.includes('detail') ? null : '添加属性'"
@emitButtonClick="handleAddAttr" -->
<method-btn
v-if="section.tableBtn"
slot="handleBtn"
@ -71,17 +106,10 @@
<div class="drawer-body__footer">
<el-button style="" @click="handleCancel">取消</el-button>
<el-button v-if="mode == 'detail'" type="primary" @click="toggleEdit">
<!-- <el-button v-if="mode == 'detail'" type="primary" @click="toggleEdit">
编辑
</el-button>
<el-button v-else type="primary" @click="handleCancel">确定</el-button>
<!-- sections的第二项必须是 属性列表 -->
<!-- <el-button
v-if="sections[1].allowAdd"
type="primary"
@click="handleAddAttr">
添加属性
</el-button> -->
</el-button> -->
<!-- <el-button v-else type="primary" @click="handleCancel">确定</el-button> -->
</div>
</div>
@ -96,10 +124,10 @@
@close="closeAttrForm"
@cancel="closeAttrForm"
@confirm="submitAttrForm">
<!-- :disabled="mode.includes('detail')" -->
<DialogForm
v-if="attrFormVisible"
ref="attrForm"
:disabled="mode.includes('detail')"
v-model="attrForm"
:rows="attrRows" />
</base-dialog>
@ -166,13 +194,17 @@ export default {
input: true,
label: '参数列名',
prop: 'plcParamName',
rules: [{ required: true, message: '不能为空', trigger: 'blur' }],
rules: [
{ required: true, message: '参数列名不能为空', trigger: 'blur' },
],
},
{
input: true,
label: '参数名称',
prop: 'name',
rules: [{ required: true, message: '不能为空', trigger: 'blur' }],
rules: [
{ required: true, message: '参数名称不能为空', trigger: 'blur' },
],
},
],
[
@ -181,7 +213,6 @@ export default {
label: '单位',
prop: 'unit',
options: this.getDictDatas(this.DICT_TYPE.UNIT_DICT),
// rules: [{ required: true, message: '', trigger: 'blur' }],
},
{
switch: true,
@ -199,24 +230,39 @@ export default {
label: '设备参数类型',
prop: 'equipment_param_type',
options: [
{ label: '一般参数', value: 1 },
{ label: '工艺参数', value: 2 },
{ label: '报警参数', value: 3 },
],
rules: [{ required: true, message: '不能为空', trigger: 'blur' }],
{ label: '一般参数', value: 1 },
{ label: '工艺参数', value: 2 },
{ label: '报警参数', value: 3 },
],
rules: [
{
required: true,
message: '设备参数类型不能为空',
trigger: 'blur',
},
],
},
{
select: true,
select: true,
label: '生产参数类型',
prop: 'production_param_type',
prop: 'production_param_type',
options: [
{ label: '进片数量', value: 1 },
{ label: '出片数量', value: 2 },
{ label: '破损数量', value: 3 },
{ label: '无类型', value: 4 },
],
rules: [{ required: true, message: '不能为空', trigger: 'blur' }],
// { label: '', value: 1 },
// { label: '', value: 2 },
// { label: '', value: 3 },
// { label: '', value: 4 },
{ label: '进口计数', value: 1 },
{ label: '出口计数', value: 2 },
{ label: '损耗计数', value: 3 },
{ label: '无类型', value: 4 },
],
rules: [
{
required: true,
message: '生产参数类型不能为空',
trigger: 'blur',
},
],
},
],
[
@ -248,7 +294,6 @@ export default {
transform: (val) => Number(val),
},
],
// rules: [{ required: true, message: '', trigger: 'blur' }],
},
],
[
@ -256,13 +301,11 @@ export default {
input: true,
label: '标准值',
prop: 'defaultValue',
// rules: [{ required: true, message: '', trigger: 'blur' }],
},
{
input: true,
label: '描述',
prop: 'description',
// rules: [{ required: true, message: '', trigger: 'blur' }],
},
],
[
@ -270,7 +313,6 @@ export default {
input: true,
label: '备注',
prop: 'remark',
// rules: [{ required: true, message: '', trigger: 'blur' }],
},
],
],
@ -283,6 +325,7 @@ export default {
infoQuery: null, //
attrFormSubmitting: false,
attrListLoading: false,
shouldRefreshPageView: false,
};
},
computed: {
@ -301,10 +344,12 @@ export default {
});
},
tableBtn() {
return this.mode == 'detail' ? [] : this.sections[1].tableBtn;
return this.sections[1].tableBtn;
// return this.mode == 'detail' ? [] : this.sections[1].tableBtn;
},
},
mounted() {
this.shouldRefreshPageView = false;
this.mode = this.defaultMode || 'detail';
for (const section of this.sections) {
//
@ -381,6 +426,9 @@ export default {
},
handleCancel() {
if (this.shouldRefreshPageView) {
this.$emit('refreshDataList');
}
this.visible = false;
},
@ -404,7 +452,7 @@ export default {
remark: '',
alarmContent: '',
};
this.attrTitle = '添加设备绑定信息';
this.attrTitle = '添加参数绑定信息';
this.attrFormVisible = true;
},
@ -417,14 +465,14 @@ export default {
});
if (res.code == 0) {
this.attrForm = res.data;
this.attrTitle = '编辑设备绑定信息';
this.attrTitle = '编辑参数绑定信息';
this.attrFormVisible = true;
}
},
//
handleDeleteAttr(attrId) {
this.$confirm('确定删除该分组报警?', '提示', {
this.$confirm('确定删除该参数?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
@ -436,6 +484,7 @@ export default {
params: { id: attrId },
});
if (res.code == 0) {
this.shouldRefreshPageView = true;
this.$message({
message: '删除成功',
type: 'success',
@ -450,35 +499,37 @@ export default {
},
//
async submitAttrForm() {
this.$refs['attrForm'].validate((valid) => {
submitAttrForm() {
this.$refs['attrForm'].validate(async (valid) => {
if (!valid) {
return;
}
});
const isEdit = this.attrForm.id != null;
this.attrFormSubmitting = true;
const res = await this.$axios({
url: isEdit ? this.sections[1].urlUpdate : this.sections[1].urlCreate,
method: isEdit ? 'put' : 'post',
data: {
...this.attrForm,
connectId: this.infoData.id,
},
});
if (res.code == 0) {
this.closeAttrForm();
this.$message({
message: `${isEdit ? '更新' : '创建'}成功`,
type: 'success',
duration: 1500,
onClose: () => {
this.getAttrList();
const isEdit = this.attrForm.id != null;
this.attrFormSubmitting = true;
const res = await this.$axios({
url: isEdit ? this.sections[1].urlUpdate : this.sections[1].urlCreate,
method: isEdit ? 'put' : 'post',
data: {
...this.attrForm,
connectId: this.infoData.id,
},
});
}
this.attrFormSubmitting = false;
if (res.code == 0) {
this.closeAttrForm();
this.$message({
message: `${isEdit ? '更新' : '创建'}成功`,
type: 'success',
duration: 1500,
onClose: () => {
this.getAttrList();
this.shouldRefreshPageView = true;
},
});
}
this.attrFormSubmitting = false;
});
},
closeAttrForm() {
@ -487,7 +538,7 @@ export default {
handleClick(raw) {
if (raw.type === 'delete') {
this.$confirm(`确定删除该报警?`, '提示', {
this.$confirm(`确定删除该参数?`, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',

View File

@ -1,187 +0,0 @@
<!--
filename: dialogForm.vue
author: liubin
date: 2023-09-11 15:55:13
description: DialogForm for equipmentBindSection only
-->
<template>
<el-form
ref="form"
:model="dataForm"
label-width="100px"
v-loading="formLoading">
<el-row :gutter="20">
<el-col :span="12">
<el-form-item
label="报警编码"
prop="code"
:rules="[{ required: true, message: '不能为空', trigger: 'blur' }]">
<el-input
:disabled="disabled"
v-model="dataForm.code"
@change="$emit('update', dataForm)"
placeholder="请输入工段排序" />
</el-form-item>
<!--
<el-form-item
label="报警编码"
prop="code"
:rules="[{ required: true, message: '不能为空', trigger: 'blur' }]">
<el-select
v-model="dataForm.code"
placeholder="请选择产线"
@change="handleProductlineChange">
<el-option
v-for="opt in productionLineList"
:key="opt.value"
:label="opt.label"
:value="opt.value" />
</el-select>
</el-form-item> -->
</el-col>
<el-col :span="12">
<el-form-item
label="报警类型"
prop="type"
:rules="[{ required: true, message: '不能为空', trigger: 'blur' }]">
<el-select
v-model="dataForm.type"
:disabled="disabled"
placeholder="请选择报警类型"
@change="$emit('update', dataForm)">
<el-option
v-for="opt in [
{ label: '布尔型', value: 2 },
{ label: '字符型', value: 1 },
]"
:key="opt.value"
:label="opt.label"
:value="opt.value" />
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="12">
<el-form-item
label="报警级别"
prop="grade"
:rules="[{ required: true, message: '不能为空', trigger: 'blur' }]">
<el-select
:disabled="disabled"
v-model="dataForm.grade"
placeholder="请选择报警级别"
@change="$emit('update', dataForm)">
<el-option
v-for="opt in getDictDatas(DICT_TYPE.EQU_ALARM_LEVEL)"
:key="opt.value"
:label="opt.label"
:value="opt.value" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item
v-if="+dataForm.type == 1"
label="设备报警编码"
prop="alarmCode">
<el-input
:disabled="disabled"
v-model="dataForm.alarmCode"
@change="$emit('update', dataForm)"
placeholder="请输入设备报警编码" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="12">
<el-form-item
label="参数列名"
prop="plcParamName"
:rules="[{ required: true, message: '不能为空', trigger: 'blur' }]">
<el-input
:disabled="disabled"
v-model="dataForm.plcParamName"
placeholder="请输入参数列名"
@change="$emit('update', dataForm)"></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item
label="报警内容"
prop="alarmContent"
:rules="[{ required: true, message: '不能为空', trigger: 'blur' }]">
<el-input
:disabled="disabled"
v-model="dataForm.alarmContent"
placeholder="请输入报警内容"
@change="$emit('update', dataForm)"></el-input>
</el-form-item>
</el-col>
</el-row>
</el-form>
</template>
<script>
export default {
name: 'DialogForm',
model: {
prop: 'dataForm',
event: 'update',
},
emits: ['update'],
components: {},
props: {
dataForm: {
type: Object,
default: () => ({}),
},
disabled: {
type: Boolean,
default: false,
},
},
data() {
return {
formLoading: true,
};
},
mounted() {
this.getCode('/base/equipment-group-alarm/getCode').then((code) => {
this.formLoading = false;
this.$emit('update', {
...this.dataForm,
code,
});
});
},
methods: {
/** 模拟透传 ref */
validate(cb) {
return this.$refs.form.validate(cb);
},
resetFields(args) {
return this.$refs.form.resetFields(args);
},
async handleProductlineChange(id) {
await this.getWorksectionList(id);
this.dataForm.workshopSectionId = null;
this.$emit('update', this.dataForm);
},
async getCode(url) {
const response = await this.$axios(url);
return response.data;
},
},
};
</script>
<style scoped lang="scss">
.el-date-editor,
.el-select {
width: 100%;
}
</style>

View File

@ -1,361 +0,0 @@
<template>
<div class="app-container">
<!-- 搜索工作栏 -->
<SearchBar
:formConfigs="searchBarFormConfig"
ref="search-bar"
@headBtnClick="handleSearchBarBtnClick" />
<!-- 列表 -->
<base-table
:table-props="tableProps"
:page="queryParams.pageNo"
:limit="queryParams.pageSize"
:table-data="list"
@emitFun="handleEmitFun">
<method-btn
v-if="tableBtn.length"
slot="handleBtn"
label="操作"
:width="120"
:method-list="tableBtn"
@clickBtn="handleTableBtnClick" />
</base-table>
<!-- 分页组件 -->
<pagination
v-show="total > 0"
:total="total"
:page.sync="queryParams.pageNo"
:limit.sync="queryParams.pageSize"
@pagination="getList" />
<!-- 对话框(添加 / 修改) -->
<base-dialog
:dialogTitle="title"
:dialogVisible="open"
width="736px"
@close="cancel"
@cancel="cancel"
@confirm="submitForm">
<DialogForm v-if="open" ref="form" v-model="form" :rows="rows" />
</base-dialog>
</div>
</template>
<script>
import {
createEquipmentGroupAlarm,
updateEquipmentGroupAlarm,
deleteEquipmentGroupAlarm,
getEquipmentGroupAlarm,
getEquipmentGroupAlarmPage,
exportEquipmentGroupAlarmExcel,
} from '@/api/base/equipmentGroupAlarm';
import basicPageMixin from '@/mixins/lb/basicPageMixin';
import moment from 'moment';
import { publicFormatter } from '@/utils/dict';
import DialogForm from './dialogForm.vue';
export default {
name: 'EquipmentGroupAlarm',
components: { DialogForm },
mixins: [basicPageMixin],
data() {
return {
searchBarKeys: [''],
tableBtn: [
this.$auth.hasPermi('base:equipment-group-alarm:update')
? {
type: 'edit',
btnName: '修改',
}
: undefined,
this.$auth.hasPermi('base:equipment-group-alarm:delete')
? {
type: 'delete',
btnName: '删除',
}
: undefined,
].filter((v) => v),
tableProps: [
{
prop: 'createTime',
label: '添加时间',
fixed: true,
width: 180,
filter: (val) => moment(val).format('yyyy-MM-DD HH:mm:ss'),
},
{ width: 240, prop: 'code', label: '报警编码' },
{
prop: 'type',
label: '报警类型',
filter: (val) =>
val != null ? ['-', '字符型', '布尔型', '-'][val] : '-',
},
{
prop: 'grade',
label: '报警级别',
filter: publicFormatter(this.DICT_TYPE.EQU_ALARM_LEVEL),
},
{ prop: 'alarmCode', label: '设备报警编码' },
{ prop: 'plcParamName', label: '参数列名' },
{ prop: 'alarmContent', label: '报警内容' },
],
searchBarFormConfig: [
{
type: 'input',
label: '设备分组编码',
width: '220',
placeholder: '/',
param: 'equipmentGroupCode',
defaultSelect: null,
disabled: true,
},
{
type: 'input',
label: '设备分组名称',
placeholder: '/',
param: 'equipmentGroupName',
defaultSelect: null,
disabled: true,
},
{
type: this.$auth.hasPermi('base:equipment-group-alarm:create')
? 'button'
: '',
btnName: '新增',
name: 'add',
plain: true,
color: 'success',
},
],
rows: [
[
{
input: true,
label: '报警编码', //
prop: 'code',
url: '/base/equipment-group-alarm/getCode',
rules: [{ required: true, message: '不能为空', trigger: 'blur' }],
},
{
select: true,
label: '报警类型', //
prop: 'type',
options: [
{ label: '布尔型', value: 2 },
{ label: '字符型', value: 1 },
],
rules: [{ required: true, message: '不能为空', trigger: 'blur' }],
},
],
[
{
select: true,
label: '报警级别', //
prop: 'grade',
options: this.getDictDatas(this.DICT_TYPE.EQU_ALARM_LEVEL),
},
{
input: true,
label: '设备报警编码', //
prop: 'alarmCode',
},
],
[
{
input: true,
label: '参数列名', //
prop: 'plcParamName',
rules: [{ required: true, message: '不能为空', trigger: 'blur' }],
},
{
input: true,
label: '报警内容',
prop: 'alarmContent',
rules: [{ required: true, message: '不能为空', trigger: 'blur' }],
},
],
],
//
open: false,
//
queryParams: {
pageNo: 1,
pageSize: 10,
equipmentGroupId: null,
},
//
form: {
id: null,
equipmentGroupId: null,
code: null,
type: null,
grade: null,
alarmCode: null,
alarmContent: null,
plcParamName: null,
},
// //
// rules: {
// equipmentGroupId: [{ required: true, message: "IDbase_equipment_group", trigger: "blur" }],
// type: [{ required: true, message: ":1.2.", trigger: "change" }],
// alarmContent: [{ required: true, message: " ", trigger: "blur" }],
// plcParamName: [{ required: true, message: "plc_param_name", trigger: "blur" }],
// }
};
},
// watch: {
// $route(value) {
// console.log('new route info', value)
// }
// },
// created() {
// this.getList();
// },
activated() {
//
const { equipmentGroupName, equipmentGroupCode, equipmentGroupId } =
this.$route.params;
this.setSearchBarFormValue('equipmentGroupName', equipmentGroupName);
this.setSearchBarFormValue('equipmentGroupCode', equipmentGroupCode);
this.queryParams.equipmentGroupId = equipmentGroupId;
// if (!equipmentGroupId) this.getList(); //
this.getList();
},
deactivated() {
this.setSearchBarFormValue('equipmentGroupName', null);
this.setSearchBarFormValue('equipmentGroupCode', null);
this.queryParams.equipmentGroupId = null;
},
methods: {
/** 设置 searchBarForm 的默认值 - 用得比较少 */
setSearchBarFormValue(param, value) {
this.searchBarFormConfig.forEach((config) => {
if (config.param == param) {
config.defaultSelect = value;
}
});
},
/** 查询列表 */
getList() {
this.loading = true;
//
getEquipmentGroupAlarmPage(this.queryParams).then((response) => {
this.list = response.data.list;
this.total = response.data.total;
this.loading = false;
});
},
/** 取消按钮 */
cancel() {
this.open = false;
this.reset();
},
/** 表单重置 */
reset() {
this.form = {
id: null,
equipmentGroupId: null,
code: null,
type: null,
grade: null,
alarmCode: null,
alarmContent: null,
plcParamName: null,
};
this.resetForm('form');
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNo = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm('queryForm');
this.handleQuery();
},
/** 新增按钮操作 */
handleAdd() {
if (this.queryParams.equipmentGroupId == null)
return this.$message.error('没有检测到设备分组信息');
this.reset();
this.open = true;
this.title = '添加设备分组报警明细';
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
const id = row.id;
getEquipmentGroupAlarm(id).then((response) => {
this.form = response.data;
this.open = true;
this.title = '修改设备分组报警明细';
});
},
/** 提交按钮 */
submitForm() {
this.$refs['form'].validate((valid) => {
if (!valid) {
return;
}
//
if (this.form.id != null) {
updateEquipmentGroupAlarm({
...this.form,
equipmentGroupId: this.queryParams.equipmentGroupId,
}).then((response) => {
this.$modal.msgSuccess('修改成功');
this.open = false;
this.getList();
});
return;
}
//
createEquipmentGroupAlarm({
...this.form,
equipmentGroupId: this.queryParams.equipmentGroupId,
}).then((response) => {
this.$modal.msgSuccess('新增成功');
this.open = false;
this.getList();
});
});
},
/** 删除按钮操作 */
handleDelete(row) {
const id = row.id;
this.$modal
.confirm('是否确认删除该报警?')
.then(function () {
return deleteEquipmentGroupAlarm(id);
})
.then(() => {
this.getList();
this.$modal.msgSuccess('删除成功');
})
.catch(() => {});
},
/** 导出按钮操作 */
handleExport() {
//
let params = { ...this.queryParams };
params.pageNo = undefined;
params.pageSize = undefined;
this.$modal
.confirm('是否确认导出所有设备分组报警明细数据项?')
.then(() => {
this.exportLoading = true;
return exportEquipmentGroupAlarmExcel(params);
})
.then((response) => {
this.$download.excel(response, '设备分组报警明细.xls');
this.exportLoading = false;
})
.catch(() => {});
},
},
};
</script>

View File

@ -52,6 +52,7 @@
import moment from 'moment';
import basicPageMixin from '@/mixins/lb/basicPageMixin';
import { publicFormatter } from '@/utils/dict';
import { deleteCheck } from "@/api/equipment/base/inspection/settings";
const timeFilter = (val) => moment(val).format('yyyy-MM-DD HH:mm:ss');
@ -127,7 +128,7 @@ export default {
label: '巡检内容编号',
prop: 'code',
url: '/base/equipment-check/getCode',
rules: [{ required: true, message: '不能为空', trigger: 'blur' }],
rules: [{ required: true, message: '巡检内容编号不能为空', trigger: 'blur' }],
},
],
[
@ -135,7 +136,7 @@ export default {
input: true,
label: '巡检项目',
prop: 'program',
rules: [{ required: true, message: '不能为空', trigger: 'blur' }],
rules: [{ required: true, message: '巡检项目不能为空', trigger: 'blur' }],
},
],
[
@ -143,7 +144,7 @@ export default {
input: true,
label: '巡检内容',
prop: 'content',
rules: [{ required: true, message: '不能为空', trigger: 'blur' }],
rules: [{ required: true, message: '巡检内容不能为空', trigger: 'blur' }],
},
],
[
@ -163,7 +164,12 @@ export default {
content: null,
},
//
form: {},
form: {
code: '',
program: '',
id: undefined,
content: ''
},
basePath: '/base/equipment-check',
mode: null,
};
@ -224,7 +230,7 @@ export default {
},
/** 新增按钮操作 */
handleAdd() {
this.reset();
// this.reset();
this.open = true;
this.title = '添加巡检内容';
},
@ -265,9 +271,10 @@ export default {
handleDelete(row) {
const id = row.id;
this.$modal
.confirm('是否确认删除记录"' + row.name + '"?')
.confirm('是否确认删除巡检项目名称为"' + row.program + '"的数据项?')
.then(function () {
return this.delete({ id });
// return this.delete({ id });
return deleteCheck(id)
})
.then(() => {
this.getList();

View File

@ -166,7 +166,7 @@ export default {
filterable: true,
clearable: true,
},
rules: [{ required: true, message: '不能为空', trigger: 'blur' }],
rules: [{ required: true, message: '设备名称不能为空', trigger: 'blur' }],
},
],
[
@ -181,8 +181,7 @@ export default {
clearable: true,
multiple: true,
},
options: [{ label: 'test', value: 'test' }],
rules: [{ required: true, message: '不能为空', trigger: 'blur' }],
rules: [{ required: true, message: '维修工不能为空', trigger: 'blur' }],
},
{
input: true,
@ -195,7 +194,7 @@ export default {
datetime: true,
label: '故障发生时间',
prop: 'faultTime',
rules: [{ required: true, message: '不能为空', trigger: 'blur' }],
rules: [{ required: true, message: '故障发生时间不能为空', trigger: 'blur' }],
bind: {
format: 'yyyy-MM-dd HH:mm:ss',
'value-format': 'timestamp',

View File

@ -103,8 +103,7 @@ export default {
{ prop: 'equipmentName', label: '设备' },
{ prop: 'responsible', label: '负责人' },
{ prop: 'equipmentCode', label: '描述' },
{ prop: 'checkNumber', label: '巡检条数' }, // TODO:
{ prop: 'remark', label: '备注' },
{ prop: 'checkNumber', label: '巡检条数' } // TODO:
],
searchBarFormConfig: [
{
@ -152,14 +151,14 @@ export default {
input: true,
label: '配置名称',
prop: 'name',
rules: [{ required: true, message: '不能为空', trigger: 'blur' }],
rules: [{ required: true, message: '配置名称不能为空', trigger: 'blur' }],
},
{
input: true,
label: '配置编码',
prop: 'code',
url: '/base/equipment-check-config/getCode',
rules: [{ required: true, message: '不能为空', trigger: 'blur' }],
rules: [{ required: true, message: '配置编码不能为空', trigger: 'blur' }],
},
],
[
@ -168,7 +167,7 @@ export default {
label: '设备名称',
prop: 'equipmentId',
url: '/base/core-equipment/listAll',
rules: [{ required: true, message: '不能为空', trigger: 'blur' }],
rules: [{ required: true, message: '设备名称不能为空', trigger: 'blur' }],
},
{
input: true,

View File

@ -51,6 +51,7 @@
import { publicFormatter } from '@/utils/dict';
import moment from 'moment';
import basicPageMixin from '@/mixins/lb/basicPageMixin';
import { exportMaintainMonitorExcel } from '@/api/equipment/base/maintain/record'
const remainBox = {
name: 'RemainBox',
@ -124,7 +125,7 @@ export default {
{ prop: 'sectionName', label: '工段' },
{ prop: 'equipmentName', label: '设备名称' },
{ prop: 'equipmentCode', label: '设备编码' },
{ prop: 'maintainDuration', label: '保养频率' },
{ prop: 'maintenancePeriod', label: '保养频率' },
{
prop: 'maintainType',
label: '保养类型',
@ -195,6 +196,24 @@ export default {
this.getList();
},
methods: {
/** 导出按钮操作 */
handleExport() {
//
let params = { ...this.queryParams };
params.pageNo = undefined;
params.pageSize = undefined;
this.$modal
.confirm('是否确认导出所有设备保养监控数据项?')
.then(() => {
this.exportLoading = true;
return exportMaintainMonitorExcel(params);
})
.then((response) => {
this.$download.excel(response, '设备保养监控.xls');
this.exportLoading = false;
})
.catch(() => { });
},
initSearchBar() {
this.http('/base/core-equipment/listAll', 'get').then(({ data }) => {
this.$set(

View File

@ -50,6 +50,7 @@
<script>
import moment from 'moment';
import basicPageMixin from '@/mixins/lb/basicPageMixin';
import { deleteEqMaintainPlan } from '@/api/equipment/base/maintain/record'
export default {
name: 'PlanConfig',
@ -88,7 +89,7 @@ export default {
},
{ prop: 'name', label: '计划名称' },
{ prop: 'code', label: '计划编号' },
{ prop: 'enabled', label: '启用状态' },
{ prop: 'enabled', label: '启用状态', filter: (val) => ['停用', '启用'][val] },
{ prop: 'lineName', label: '产线' },
{ prop: 'sectionName', label: '工段' },
{ prop: 'equipmentName', label: '设备名称' },
@ -169,14 +170,14 @@ export default {
input: true,
label: '计划名称',
prop: 'name',
rules: [{ required: true, message: '不能为空', trigger: 'blur' }],
rules: [{ required: true, message: '计划名称不能为空', trigger: 'blur' }],
},
{
input: true,
label: '计划编号',
prop: 'code',
url: '/base/equipment-maintain-plan/getCode',
rules: [{ required: true, message: '不能为空', trigger: 'blur' }],
rules: [{ required: true, message: '计划编号不能为空', trigger: 'blur' }],
},
],
[
@ -185,7 +186,7 @@ export default {
label: '设备名称',
prop: 'equipmentId',
url: '/base/core-equipment/listAll',
rules: [{ required: true, message: '不能为空', trigger: 'blur' }],
rules: [{ required: true, message: '设备名称不能为空', trigger: 'blur' }],
},
{
select: true,
@ -220,6 +221,7 @@ export default {
transform: (val) => Number(val),
},
],
rules: [{ required: true, message: '保养频率不能为空', trigger: 'blur' }],
},
],
[{ input: true, label: '备注', prop: 'remark' }],
@ -344,9 +346,9 @@ export default {
handleDelete(row) {
const id = row.id;
this.$modal
.confirm('是否确认删除设备类型"' + row.name + '"?')
.confirm('是否确认删除计划名称为"' + row.name + '"的数据项?')
.then(function () {
return this.del(id);
return deleteEqMaintainPlan(id);
})
.then(() => {
this.getList();

View File

@ -42,7 +42,7 @@
v-if="open"
ref="form"
v-model="form"
:disabled="mode == 'detail'"
:disabled="mode == 'detail'"
:has-files="true"
:rows="rows" />
</base-dialog>
@ -53,7 +53,7 @@
import moment from 'moment';
import basicPageMixin from '@/mixins/lb/basicPageMixin';
import Editor from '@/components/Editor';
import { deleteEqMaintainLog } from '@/api/equipment/base/maintain/record'
import { deleteEqMaintainLog } from '@/api/equipment/base/maintain/record';
const timeFilter = (val) => moment(val).format('yyyy-MM-DD HH:mm:ss');
@ -64,7 +64,6 @@ export default {
data() {
return {
searchBarKeys: [
'maintainPlanId',
'maintainPlanId',
'startTime',
'relatePlan',
@ -187,10 +186,9 @@ export default {
filterable: true,
clearable: true,
},
rules: [{ required: true, message: '不能为空', trigger: 'blur' }],
rules: [{ required: true, message: '保养设备不能为空', trigger: 'blur' }],
},
{
// TODO:
select: true,
label: '保养人员',
prop: 'maintainWorker',
@ -201,7 +199,7 @@ export default {
clearable: true,
multiple: true,
},
rules: [{ required: true, message: '不能为空', trigger: 'blur' }],
rules: [{ required: true, message: '保养人员不能为空', trigger: 'blur' }],
},
{
input: true,
@ -218,15 +216,14 @@ export default {
'active-value': 1,
'inactive-value': 2,
},
rules: [{ required: true, message: '不能为空', trigger: 'blur' }],
rules: [{ required: true, message: '是否计划保养不能为空', trigger: 'blur' }],
},
{},
{
// TODO:
select: true,
label: '所属计划',
prop: 'maintainPlanId',
url: '',
url: '/base/equipment-maintain-plan/page',
bind: {
filterable: true,
clearable: true,
@ -238,7 +235,7 @@ export default {
datetime: true,
label: '开始时间',
prop: 'startTime',
rules: [{ required: true, message: '不能为空', trigger: 'blur' }],
rules: [{ required: true, message: '开始时间不能为空', trigger: 'blur' }],
bind: {
format: 'yyyy-MM-dd HH:mm:ss',
'value-format': 'timestamp',
@ -250,7 +247,7 @@ export default {
datetime: true,
label: '结束时间',
prop: 'endTime',
rules: [{ required: true, message: '不能为空', trigger: 'blur' }],
rules: [{ required: true, message: '结束时间不能为空', trigger: 'blur' }],
bind: {
format: 'yyyy-MM-dd HH:mm:ss',
'value-format': 'timestamp',
@ -272,10 +269,16 @@ export default {
prop: 'files',
},
],
// TODO:
[{ label: '保养描述', prop: 'maintenanceDes', subcomponent: Editor, bind: {
'min-height': 192
} }],
[
{
label: '保养描述',
prop: 'maintenanceDes',
subcomponent: Editor,
bind: {
'min-height': 192,
},
},
],
[{ input: true, label: '备注', prop: 'remark' }],
],
//
@ -293,20 +296,26 @@ export default {
//
form: {},
basePath: '/base/equipment-maintain-log',
mode: null
mode: null,
};
},
created() {
this.initSearchBar();
if (this.$route.query) {
this.queryParams.equipmentId = this.$route.query?.equipmentId ?? undefined
this.queryParams.maintainPlanId = this.$route.query?.maintainPlanId ?? undefined
this.queryParams.relatePlan = this.$route.query?.relatePlan ?? undefined
this.queryParams.startTime = this.$route.query?.createTime ?? undefined
this.searchBarFormConfig[0].defaultSelect = this.$route.query.equipmentId ?? undefined
this.searchBarFormConfig[1].defaultSelect = Number(this.$route.query.maintainPlanId) ?? undefined
this.searchBarFormConfig[2].defaultSelect = this.$route.query?.createTime ?? undefined
this.searchBarFormConfig[3].defaultSelect = Number(this.$route.query.relatePlan) ?? undefined
this.queryParams.equipmentId =
this.$route.query?.equipmentId ?? undefined;
this.queryParams.maintainPlanId =
this.$route.query?.maintainPlanId ?? undefined;
this.queryParams.relatePlan = this.$route.query?.relatePlan ?? undefined;
this.queryParams.startTime = this.$route.query?.createTime ?? undefined;
this.searchBarFormConfig[0].defaultSelect =
this.$route.query.equipmentId ?? undefined;
this.searchBarFormConfig[1].defaultSelect =
Number(this.$route.query.maintainPlanId) ?? undefined;
this.searchBarFormConfig[2].defaultSelect =
this.$route.query?.createTime ?? undefined;
this.searchBarFormConfig[3].defaultSelect =
Number(this.$route.query.relatePlan) ?? undefined;
}
this.getList();
},
@ -349,7 +358,7 @@ export default {
/** 取消按钮 */
cancel() {
this.open = false;
this.mode = null;
this.mode = null;
this.reset();
},
/** 表单重置 */
@ -399,7 +408,7 @@ export default {
this.info({ id }).then((response) => {
this.form = response.data;
this.open = true;
this.form.maintainWorker = this.form.maintainWorker.split(',')
this.form.maintainWorker = this.form.maintainWorker.split(',');
this.title = '修改保养记录';
});
},
@ -409,7 +418,7 @@ export default {
if (!valid) {
return;
}
this.form.maintainWorker = this.form.maintainWorker.join(',')
this.form.maintainWorker = this.form.maintainWorker.join(',');
//
if (this.form.id != null) {
this.put(this.form).then((response) => {
@ -431,7 +440,7 @@ export default {
handleDelete(row) {
const id = row.id;
this.$modal
.confirm('是否删除设备保养单号为"' + row.maintainOrderNumber + '"的数据项?')
.confirm('是否删除设备名称为"' + row.equipmentName + '"的数据项?')
.then(function () {
return deleteEqMaintainLog(id);
})
@ -443,7 +452,7 @@ export default {
},
handleDetail({ id }) {
this.reset();
this.mode = 'detail'
this.mode = 'detail';
this.info({ id }).then((response) => {
this.form = response.data;
this.open = true;

View File

@ -19,6 +19,7 @@
ref="form"
:model="dataForm"
label-width="100px"
label-position="top"
v-loading="formLoading">
<el-row :gutter="20">
<el-col :span="8">
@ -62,7 +63,7 @@
<el-form-item
label="维修开始时间"
prop="maintenanceStartTime"
:rules="[{ required: true, message: '不能为空', trigger: 'blur' }]">
:rules="[{ required: true, message: '维修开始时间不能为空', trigger: 'blur' }]">
<el-date-picker
v-model="dataForm.maintenanceStartTime"
type="datetime"
@ -76,7 +77,7 @@
<el-form-item
label="维修结束时间"
prop="maintenanceFinishTime"
:rules="[{ required: true, message: '不能为空', trigger: 'blur' }]">
:rules="[{ required: true, message: '维修结束时间不能为空', trigger: 'blur' }]">
<el-date-picker
v-model="dataForm.maintenanceFinishTime"
type="datetime"
@ -90,7 +91,7 @@
<el-form-item
label="维修方式"
prop="repairMode"
:rules="[{ required: true, message: '不能为空', trigger: 'blur' }]">
:rules="[{ required: true, message: '维修方式不能为空', trigger: 'blur' }]">
<el-select
:disabled="disabled"
v-model="dataForm.repairMode"
@ -126,7 +127,7 @@
<el-form-item
label="故障明细"
prop="faultDetail"
:rules="[{ required: true, message: '不能为空', trigger: 'blur' }]">
:rules="[{ required: true, message: '故障明细不能为空', trigger: 'blur' }]">
<!-- // -->
<editor v-model="dataForm.faultDetail" :read-only="disabled" :min-height="380"/>
</el-form-item>
@ -213,7 +214,7 @@ export default {
this.visible = false;
},
goEdit() {
this.isdetail = false;
this.disabled = false;
},
/** 模拟透传 ref */
validate(cb) {

View File

@ -112,7 +112,7 @@ export default {
{
prop: 'maintenanceStatus',
label: '维修状态',
filter: (v) => (v != null ? ['未完成', '完成'][v] : ''),
filter: (v) => (v != null ? ['未完成', '完成', '进行中'][v] : ''),
},
{ prop: 'maintenanceDuration', label: '维修时长(h)' },
{ prop: 'lineName', label: '产线' },
@ -138,8 +138,23 @@ export default {
selectOptions: [
{ name: '未完成', id: '0' },
{ name: '完成', id: '1' },
{ name: '进行中', id: '2' },
],
},
//
{
type: 'datePicker',
label: '时间段',
dateType: 'daterange', // datetimerange
format: 'yyyy-MM-dd',
valueFormat: 'yyyy-MM-dd HH:mm:ss',
// valueFormat: 'timestamp',
rangeSeparator: '-',
startPlaceholder: '开始日期',
endPlaceholder: '结束日期',
defaultTime: ['00:00:00', '23:59:59'],
param: 'createTime'
},
{
type: 'button',
btnName: '查询',
@ -169,7 +184,7 @@ export default {
input: true,
label: '维修单号',
prop: 'repairOrderNumber',
rules: [{ required: true, message: '不能为空', trigger: 'blur' }],
rules: [{ required: true, message: '维修单号不能为空', trigger: 'blur' }],
},
{
select: true,
@ -180,7 +195,7 @@ export default {
filterable: true,
clearable: true,
},
rules: [{ required: true, message: '不能为空', trigger: 'blur' }],
rules: [{ required: true, message: '设备名称不能为空', trigger: 'blur' }],
},
],
[
@ -198,7 +213,7 @@ export default {
// multiple: true,
},
// options: [{ label: 'test', value: 'test' }],
rules: [{ required: true, message: '不能为空', trigger: 'blur' }],
rules: [{ required: true, message: '维修工不能为空', trigger: 'blur' }],
},
{
input: true,
@ -211,7 +226,7 @@ export default {
datetime: true,
label: '故障发生时间',
prop: 'faultTime',
rules: [{ required: true, message: '不能为空', trigger: 'blur' }],
rules: [{ required: true, message: '故障发生时间不能为空', trigger: 'blur' }],
bind: {
format: 'yyyy-MM-dd HH:mm:ss',
'value-format': 'timestamp',

View File

@ -161,7 +161,7 @@ export default {
input: true,
label: '配置名称',
prop: 'name',
rules: [{ required: true, message: '不能为空', trigger: 'blur' }],
rules: [{ required: true, message: '配置名称不能为空', trigger: 'blur' }],
},
],
[
@ -174,7 +174,7 @@ export default {
filterable: true,
clearable: true,
},
rules: [{ required: true, message: '不能为空', trigger: 'blur' }],
rules: [{ required: true, message: '设备名称不能为空', trigger: 'blur' }],
},
],
[

View File

@ -52,6 +52,7 @@
import moment from 'moment';
import basicPageMixin from '@/mixins/lb/basicPageMixin';
import { publicFormatter } from '@/utils/dict';
import { deleteSparePart } from '@/api/equipment/base/spare-parts/list'
const timeFilter = (val) => moment(val).format('yyyy-MM-DD HH:mm:ss');
@ -131,6 +132,7 @@ export default {
input: true,
label: '备件名称',
prop: 'name',
rules: [{ required: true, message: '备件名称不能为空', trigger: 'blur' }],
},
{
input: true,
@ -153,7 +155,7 @@ export default {
filterable: true,
clearable: true,
},
rules: [{ required: true, message: '不能为空', trigger: 'blur' }],
rules: [{ required: true, message: '供应商不能为空', trigger: 'blur' }],
},
],
[
@ -196,21 +198,6 @@ export default {
prop: 'remark',
},
],
// [
// {
// datetime: true,
// label: '',
// prop: 'faultTime',
// rules: [{ required: true, message: '', trigger: 'blur' }],
// bind: {
// format: 'yyyy-MM-dd HH:mm:ss',
// 'value-format': 'timestamp',
// // 'value-format': 'yyyy-MM-dd HH:mm:ss',
// clearable: true,
// },
// },
// ],
],
//
open: false,
@ -328,9 +315,9 @@ export default {
handleDelete(row) {
const id = row.id;
this.$modal
.confirm('是否确认删除记录"' + row.name + '"?')
.confirm('是否确认删除备件名称为"' + row.name + '"的数据项?')
.then(function () {
return this.delete({ id });
return deleteSparePart(id);
})
.then(() => {
this.getList();

View File

@ -211,7 +211,7 @@ export default {
input: true,
label: '配置名称',
prop: 'name',
rules: [{ required: true, message: '不能为空', trigger: 'blur' }],
rules: [{ required: true, message: '配置名称不能为空', trigger: 'blur' }],
},
],
[
@ -224,7 +224,7 @@ export default {
filterable: true,
clearable: true,
},
rules: [{ required: true, message: '不能为空', trigger: 'blur' }],
rules: [{ required: true, message: '设备名称不能为空', trigger: 'blur' }],
},
],
[

View File

@ -482,7 +482,7 @@ export default {
async submitForm() {
const { code, data } = await this.$axios({
url: '/analysis/equipment-analysis/quantity',
url: '/monitoring/equipment-monitor/quantity-series',
method: 'get',
params: this.queryParams,
});

View File

@ -6,19 +6,29 @@
-->
<template>
<div class="status-timegraph-container" style="background: #f2f4f9; flex: 1; display: flex; flex-direction: column">
<el-row class="" style="
<div
class="status-timegraph-container"
style="background: #f2f4f9; flex: 1; display: flex; flex-direction: column">
<el-row
class=""
style="
margin-bottom: 12px;
background: #fff;
padding: 16px 16px 0;
border-radius: 8px;
">
<div class="blue-title">生产节拍时序图</div>
<SearchBar :formConfigs="searchBarFormConfig" ref="search-bar" :remove-blue="true"
@select-changed="handleSearchBarSelectChange" @headBtnClick="handleSearchBarBtnClick" />
<SearchBar
:formConfigs="searchBarFormConfig"
ref="search-bar"
:remove-blue="true"
@select-changed="handleSearchBarSelectChange"
@headBtnClick="handleSearchBarBtnClick" />
</el-row>
<el-row class="" style="
<el-row
class=""
style="
height: 1px;
flex: 1;
margin-bottom: 12px;
@ -47,17 +57,36 @@
</div>
</el-col>
</el-row>
<div class="main-area" style="flex: 1; display: flex; flex-direction: column">
<div class="graphs" v-show="graphList.length" id="status-chart" style="height: 1px; flex: 1"></div>
<div
class="main-area"
style="flex: 1; display: flex; flex-direction: column">
<div
class="graphs"
v-show="graphList.length"
id="status-chart"
style="height: 1px; flex: 1"></div>
<h2 v-if="!graphList || graphList.length == 0" class="no-data-bg"></h2>
</div>
</el-row>
<!-- 对话框(添加 / 修改) -->
<base-dialog dialogTitle="添加设备" :dialogVisible="open" width="500px" @close="open = false" @cancel="open = false"
<base-dialog
dialogTitle="添加设备"
:dialogVisible="open"
width="500px"
@close="open = false"
@cancel="open = false"
@confirm="submitForm">
<el-select v-if="open" style="width: 100%" v-model="queryParams.equipmentId" placeholder="请选择一个设备">
<el-option v-for="eq in eqList" :key="eq.id" :value="eq.id" :label="eq.name"></el-option>
<el-select
v-if="open"
style="width: 100%"
v-model="queryParams.equipmentId"
placeholder="请选择一个设备">
<el-option
v-for="eq in eqList"
:key="eq.id"
:value="eq.id"
:label="eq.name"></el-option>
</el-select>
</base-dialog>
</div>
@ -129,7 +158,7 @@ export default {
open: false,
eqList: [],
startTime: null,
gantt: null
gantt: null,
// demo: [
// [
// {
@ -159,7 +188,7 @@ export default {
this.initEquipment();
// this.getList();
},
mounted() { },
mounted() {},
watch: {
graphList: {
handler(val) {
@ -171,7 +200,6 @@ export default {
return;
}
this.gantt.update(val);
});
}
return;
@ -215,7 +243,9 @@ export default {
params: this.queryParams,
});
if (code == 0) {
this.existingEquipments = Object.values(data).map((eq) => eq[0].equipmentId);
this.existingEquipments = Object.values(data).map(
(eq) => eq[0].equipmentId
);
this.graphList = this.objectToArray(data);
}
},
@ -302,26 +332,26 @@ export default {
return;
}
this.startTime = new Date(payload.recordTime)
this.startTime = new Date(payload.recordTime);
this.queryParams.lineId = payload.lineId || null;
this.queryParams.sectionId = payload.sectionId || null;
this.queryParams.equipmentId = payload.equipmentId || null;
this.queryParams.recordTime = payload.recordTime
? [
payload.recordTime,
new Date(
new Date(payload.recordTime).getTime() + 24 * 3600 * 1000
)
.toLocaleDateString()
.split('/')
.map((value, index) => {
if (index == 1 || index == 2) {
return value.padStart(2, '0');
}
return value;
})
.join('-') + ' 00:00:00',
]
payload.recordTime,
new Date(
new Date(payload.recordTime).getTime() + 24 * 3600 * 1000
)
.toLocaleDateString()
.split('/')
.map((value, index) => {
if (index == 1 || index == 2) {
return value.padStart(2, '0');
}
return value;
})
.join('-') + ' 00:00:00',
]
: null;
this.getList();
break;
@ -337,7 +367,7 @@ export default {
return;
}
const { code, data } = await this.$axios({
url: '/analysis/equipment-analysis/status',
url: '/monitoring/equipment-monitor/status-series',
method: 'get',
params: this.queryParams,
});
@ -444,7 +474,7 @@ export default {
}
.running {
background-color: #288AFF;
background-color: #288aff;
// background-color: #84f04e;
}
@ -455,7 +485,7 @@ export default {
.fault {
// background-color: #ea5b5b;
background-color: #FC9C91;
background-color: #fc9c91;
}
.full {
@ -469,7 +499,7 @@ export default {
}
.stop {
background-color: #FFDC94;
background-color: #ffdc94;
}
.legend-row {
@ -478,7 +508,7 @@ export default {
display: flex;
justify-content: flex-end;
>.legend:not(:last-child) {
> .legend:not(:last-child) {
margin-right: 12px;
}
@ -521,7 +551,7 @@ export default {
background: #ccc;
}
.echarts__status-chart>div {
.echarts__status-chart > div {
height: 100% !important;
width: 100% !important;
}

View File

@ -2,7 +2,7 @@
* @Author: zwq
* @Date: 2021-11-18 14:16:25
* @LastEditors: zhp
* @LastEditTime: 2023-11-10 16:26:08
* @LastEditTime: 2023-11-22 16:50:55
* @Description:
-->
<template>
@ -100,7 +100,8 @@ import {
updateProcessEquMaterialBom,
getEquipmentList,
processEquMaterialBomDetPage,
deleteProcessEquMaterialBomDet
deleteProcessEquMaterialBomDet,
getMaterialCode
} from '@/api/extend/processEquMaterialBom';
import SmallTitle from './SmallTitle';
import { parseTime } from '../../core/mixins/code-filter';
@ -197,7 +198,6 @@ export default {
};
},
mounted() {
this.getDict()
},
methods: {
getCode(val) {
@ -223,6 +223,9 @@ export default {
// console.log(response);
this.equipmentList = res.data
})
getMaterialCode().then(res => {
this.dataForm.code = res.data
})
},
handleClick(raw) {
if (raw.type === 'delete') {
@ -267,7 +270,8 @@ export default {
});
},
init(id, isdetail) {
this.initData();
this.initData()
this.getDict()
this.isdetail = isdetail || false;
this.dataForm.id = id || undefined;
this.visible = true;

View File

@ -1,7 +1,7 @@
<!--
* @Author: zhp
* @Date: 2023-11-08 15:30:27
* @LastEditTime: 2023-11-09 14:11:02
* @LastEditTime: 2023-11-23 14:27:59
* @LastEditors: zhp
* @Description:
-->
@ -18,13 +18,16 @@
<el-form ref="dataForm" :model="dataForm" :rules="dataRule" label-width="100px"
@keyup.enter.native="dataFormSubmit()">
<el-form-item label="物料名称" prop="materialId">
<el-select v-model="dataForm.materialId" filterable placeholder="请选择物料名称">
<el-select v-model="dataForm.materialId" filterable placeholder="请选择物料名称" multiple>
<el-option v-for="dict in materialList" :key=" dict.id" :label="dict.name" :value="dict.id" />
</el-select>
</el-form-item>
<el-form-item label="数量" prop="num">
<el-input v-model="dataForm.num" placeholder="请输入数量" clearable />
</el-form-item>
<el-form-item label="备注" prop="remark">
<el-input v-model="dataForm.remark" placeholder="请输入备注" clearable />
</el-form-item>
</el-form>
<el-row style="text-align: right">
@ -37,7 +40,7 @@
<script>
import {
getProcessEquMaterialBomDet,
createProcessEquMaterialBomDet,
createProcessEquMaterialBomDetList,
updateProcessEquMaterialBomDet,
getMaterialList
} from '@/api/extend/processEquMaterialBom';
@ -56,11 +59,13 @@ export default {
dataForm: {
id: undefined,
bomId: undefined,
materialId:null,
materialId:[],
num: undefined,
remark:undefined
},
dataRule: {
attrName: [{ required: true, message: '名称不能为空', trigger: 'blur' }],
materialId: [{ required: true, message: '名称不能为空', trigger: 'change' }],
num: [{ required: true, message: '数量不能为空', trigger: 'blur' }],
},
};
},
@ -79,8 +84,11 @@ export default {
getProcessEquMaterialBomDet({
id: this.dataForm.id
}).then((res) => {
this.dataForm = res.data;
// this.dataForm.materialId = materialId;
this.dataForm = res.data
const arr = []
arr.push(res.data.materialId)
this.dataForm.materialId =arr
console.log(this.dataForm.materialId);
// this.dataForm.value = value;
});
}
@ -97,10 +105,16 @@ export default {
this.$refs['dataForm'].validate((valid) => {
if (valid) {
//
if (this.dataForm.id) {
if (this.dataForm.id) {
const dataObj = {
materialId: this.dataForm.materialId.toString(),
bomId: this.dataForm.bomId,
num: this.dataForm.num,
id: this.dataForm.id,
remark: this.dataForm.remark
}
updateProcessEquMaterialBomDet({
...this.dataForm,
productId: this.productId,
...dataObj
}).then((response) => {
this.$modal.msgSuccess('修改成功');
this.visible = false;
@ -108,11 +122,16 @@ export default {
});
return;
}
//
createProcessEquMaterialBomDet({
...this.dataForm,
productId: this.productId,
}).then((response) => {
//
const dataArr = this.dataForm.materialId.map(ele => {
return {
materialId: ele,
bomId: this.dataForm.bomId,
num: this.dataForm.num,
remark: this.dataForm.remark
}
});
createProcessEquMaterialBomDetList(dataArr).then((response) => {
this.$modal.msgSuccess('新增成功');
this.visible = false;
this.$emit('refreshDataList');

View File

@ -2,7 +2,7 @@
* @Author: zwq
* @Date: 2021-11-18 14:16:25
* @LastEditors: zhp
* @LastEditTime: 2023-11-09 14:49:16
* @LastEditTime: 2023-11-23 09:20:12
* @Description:
-->
<template>
@ -53,7 +53,7 @@
</el-form-item>
</el-form>
</div>
<div class="drawer-body__footer">
<div v-if="isdetail" class="drawer-body__footer">
<el-button style="" @click="goback()">取消</el-button>
<el-button v-if="isdetail" type="primary" @click="goEdit()">
编辑
@ -63,7 +63,7 @@
<div class="attr-list" v-if="idAttrShow">
<small-title style="margin: 16px 0; padding-left: 8px" :no-padding="true">
设备物料明细
设备参数
</small-title>
<div v-if="!isdetail" class="action_btn">
@ -100,7 +100,8 @@ import {
updateProcessEquValueBom,
getEquipmentList,
processEquValueBomDetPage,
deleteProcessEquValueBomDet
deleteProcessEquValueBomDet,
getValueCode
} from '@/api/extend/processEquValueBom';
import SmallTitle from './SmallTitle';
import { parseTime } from '../../core/mixins/code-filter';
@ -208,7 +209,6 @@ export default {
};
},
mounted() {
this.getDict()
},
methods: {
getCode(val) {
@ -234,6 +234,9 @@ export default {
// console.log(response);
this.equipmentList = res.data
})
getValueCode().then(res => {
this.dataForm.code = res.data
})
},
handleClick(raw) {
if (raw.type === 'delete') {
@ -277,8 +280,9 @@ export default {
this.listQuery.total = response.data.total;
});
},
init(id, isdetail) {
this.initData();
init(id, isdetail) {
this.getDict()
this.initData()
console.log(isdetail);
this.isdetail = isdetail || false;
this.dataForm.id = id || undefined;

View File

@ -1,7 +1,7 @@
<!--
* @Author: zhp
* @Date: 2023-11-08 15:30:27
* @LastEditTime: 2023-11-09 14:44:49
* @LastEditTime: 2023-11-23 14:26:54
* @LastEditors: zhp
* @Description:
-->
@ -18,19 +18,19 @@
<el-form ref="dataForm" :model="dataForm" :rules="dataRule" label-width="100px"
@keyup.enter.native="dataFormSubmit()">
<el-form-item label="参数名称" prop="paramId">
<el-select v-model="dataForm.paramId" filterable placeholder="参数名称" @change="getData">
<el-select v-model="dataForm.paramId" filterable placeholder="参数名称" @change="getData" multiple >
<el-option v-for="dict in materialList" :key=" dict.id" :label="dict.name" :value="dict.id" />
</el-select>
</el-form-item>
<!-- <el-form-item label="参数编码" prop="code">
<el-input v-model="dataForm.code" placeholder="请输入参数编码" clearable />
</el-form-item> -->
<el-form-item label="标准最小值" prop="standardMinValue">
<!-- <el-form-item label="标准最小值" prop="standardMinValue">
<el-input v-model="dataForm.standardMinValue" placeholder="请输入标准最小值" clearable />
</el-form-item>
<el-form-item label="标准最大值" prop="standardMaxValue">
<el-input v-model="dataForm.standardMaxValue" placeholder="请输入标准最大值" clearable />
</el-form-item>
</el-form-item> -->
<el-form-item label="工艺最小值" prop="minValue">
<el-input v-model="dataForm.minValue" placeholder="请输入工艺最小值" clearable />
</el-form-item>
@ -55,7 +55,7 @@
<script>
import {
getProcessEquValueBomDet,
createProcessEquValueBomDet,
createProcessEquValueBomDetList,
updateProcessEquValueBomDet,
getValueList
} from '@/api/extend/processEquValueBom';
@ -74,7 +74,7 @@ export default {
dataForm: {
id: undefined,
bomId: undefined,
paramId:undefined,
paramId:[],
minValue:undefined,
maxValue: undefined,
defaultValue: undefined,
@ -117,6 +117,10 @@ export default {
id: this.dataForm.id
}).then((res) => {
this.dataForm = res.data;
const arr = []
arr.push(res.data.paramId)
this.dataForm.paramId = arr
console.log(this.dataForm.paramId);
// this.dataForm.materialId = materialId;
// this.dataForm.value = value;
});
@ -137,22 +141,41 @@ export default {
this.$refs['dataForm'].validate((valid) => {
if (valid) {
//
if (this.dataForm.id) {
if (this.dataForm.id) {
const dataObj = {
paramId: this.dataForm.paramId.toString(),
bomId: this.dataForm.bomId,
minValue: this.dataForm.minValue,
maxValue: this.dataForm.maxValue,
defaultValue: this.dataForm.defaultValue,
standardMinValue: this.dataForm.standardMinValue,
standardMaxValue: this.dataForm.standardMaxValue,
remark: this.dataForm.remark,
id: this.dataForm.id
}
updateProcessEquValueBomDet({
...this.dataForm,
productId: this.productId,
...dataObj,
}).then((response) => {
this.$modal.msgSuccess('修改成功');
this.visible = false;
this.$emit('refreshDataList');
});
return;
}
}
const dataArr = this.dataForm.paramId.map(ele => {
return {
paramId: ele,
bomId: this.dataForm.bomId,
minValue: this.dataForm.minValue,
maxValue: this.dataForm.maxValue,
defaultValue: this.dataForm.defaultValue,
standardMinValue: this.dataForm.standardMinValue,
standardMaxValue: this.dataForm.standardMaxValue,
remark: this.dataForm.remark
}
});
//
createProcessEquValueBomDet({
...this.dataForm,
productId: this.productId,
}).then((response) => {
createProcessEquValueBomDetList(dataArr).then((response) => {
this.$modal.msgSuccess('新增成功');
this.visible = false;
this.$emit('refreshDataList');

View File

@ -180,7 +180,7 @@ export default {
input: true,
label: '工艺名称',
prop: 'name',
rules: [{ required: true, message: '不能为空', trigger: 'blur' }],
rules: [{ required: true, message: '工艺名称不能为空', trigger: 'blur' }],
// bind: {
// disabled: this.editMode == 'detail', // some condition, like detail mode...
// }
@ -197,6 +197,7 @@ export default {
select: true,
label: '产线',
prop: 'lineId',
rules: [{ required: true, message: '产线不能为空', trigger: 'blur' }],
// cache: 'processFlow::lineList',
url: '/base/core-production-line/listAll',
bind: {
@ -217,8 +218,9 @@ export default {
[
{
textarea: true,
label: '功能描述',
label: '工艺描述',
prop: 'remark',
rules: [{ required: true, message: '工艺描述不能为空', trigger: 'blur' }],
},
],
],

View File

@ -0,0 +1,114 @@
<!--
filename: BomSelection.vue
author: liubin
date: 2023-11-20 13:23:36
description:
-->
<template>
<div class="bom-selection">
<el-checkbox
v-for="item in list__inner"
:key="item.id + randomKey"
:label="item.name"
:disabled="item.disabled"
:checked="item.id === selected"
@change="(e) => handleChange(item, e)"
class="sl__body-item"></el-checkbox>
</div>
</template>
<script>
export default {
name: 'BomSelection',
components: {},
// model: {
// prop: 'selected',
// event: 'update',
// },
props: {
currentSelect: {
type: String,
default: null,
},
list: {
type: Array,
default: () => [],
},
equipmentId: {
type: String,
default: '',
},
},
data() {
return {
list__inner: [],
selected: null,
randomKey: Math.random(),
};
},
watch: {
list: {
handler(val) {
if (val) {
this.list__inner = val.map((item) => ({ ...item, disabled: false }));
}
},
deep: true,
immediate: true,
},
currentSelect: {
handler(val) {
this.selected = val;
this.randomKey = Math.random();
},
immediate: true,
},
},
methods: {
handleChange(bomItem, selected) {
this.list__inner = this.list__inner.map((item) => ({
...item,
disabled: selected ? item.id !== bomItem.id : false,
}));
if (selected) this.selected = null;
else this.clearSelected();
this.$emit('change', this.equipmentId, bomItem.id, selected);
this.$nextTick(() => {
this.$forceUpdate();
});
},
clearSelected() {
console.log('clearSelected');
this.selected = null;
this.randomKey = Math.random();
// this.$emit('update', null);
// this.$nextTick(() => {
// this.$forceUpdate();
// });
},
},
};
</script>
<style scoped lang="scss">
.bom-selection {
display: flex;
flex-direction: column;
gap: 6px;
padding: 6px;
}
.sl__body-item {
margin: 0;
padding: 3px 6px;
border-radius: 4px;
transition: background 0.3s ease-in-out;
&:hover {
background: #0001;
}
}
</style>

View File

@ -0,0 +1,264 @@
<!--
filename: BomSelector.vue
author: liubin
date: 2023-11-17 16:23:28
description:
-->
<template>
<div class="bom-selector">
<el-row>
<el-col :span="8">
<el-input
v-model="searchText"
placeholder="搜索"
clearable
style="margin-bottom: 12px; user-select: none">
<i slot="prefix" class="el-input__icon el-icon-search"></i>
</el-input>
</el-col>
</el-row>
<el-row style="border: 1px solid #ccc; display: flex">
<el-col :span="8">
<div class="select-list">
<div class="sl__header" style="background: #f3f4fb; padding: 12px">
<span style="">可分配设备</span>
<span>
{{ selectedEquipments.length }}/{{ filteredBomList.length }}
</span>
</div>
<div class="sl__body">
<div
class="sl__body-item"
v-for="eq in filteredBomList"
:key="eq.id + refreshKey">
<el-checkbox
:key="refreshKey"
:checked="selectedEquipments.includes(eq.id)"
@change="(e) => handleEquipmentChange(eq, e)"
class=""></el-checkbox>
<span
:key="'label' + refreshKey"
@click.stop="() => handleLoadDom(eq)">
{{ eq.name }}
</span>
</div>
</div>
</div>
</el-col>
<el-col :span="8" style="border-left: 1px solid #ccc">
<div class="select-list">
<div class="sl__header" style="background: #f3f4fb; padding: 12px">
<span style="">物料BOM</span>
</div>
<BomSelection
ref="materialsBomList"
:key="materialsBomList.equipmentId + 'materialsBomList'"
:list="materialsBomList"
:equipment-id="materialsBomList.equipmentId"
:current-select="currentSelectedMaterialBomId"
@change="handleMaterialBomChange" />
</div>
</el-col>
<el-col :span="8" style="border-left: 1px solid #ccc">
<div class="select-list">
<div class="sl__header" style="background: #f3f4fb; padding: 12px">
<span style="">参数BOM</span>
</div>
<BomSelection
ref="valuesBomList"
:key="valuesBomList.equipmentId + 'valuesBomList'"
:list="valuesBomList"
:equipment-id="valuesBomList.equipmentId"
:current-select="currentSelectedValueBomId"
@change="handleValueBomChange" />
</div>
</el-col>
</el-row>
</div>
</template>
;
<script>
import BomSelection from './BomSelection.vue';
export default {
name: 'BomSelector',
components: { BomSelection },
model: {
prop: 'value',
event: 'update',
},
props: {
bomList: {
type: Array,
default: () => [],
},
value: {
type: Array,
default: () => [],
},
},
data() {
return {
searchText: '',
selectedEquipments: [],
selected: [],
materialsBomList: [],
valuesBomList: [],
refreshKey: Math.random(),
currentSelectedMaterialBomId: null,
currentSelectedValueBomId: null,
};
},
watch: {
value: {
handler(val) {
console.log('value', val);
if (val) {
this.selectedEquipments = val.map((item) => item.equipmentId);
this.selected = val;
}
},
deep: true,
immediate: true,
},
},
computed: {
filteredBomList() {
return this.bomList.filter((item) => {
return item.name.includes(this.searchText);
});
},
},
methods: {
commit() {
this.$emit('update', this.selected);
},
handleLoadDom(eq) {
// dom
this.currentEquipment = eq.id;
this.materialsBomList = eq.materialsBom;
this.valuesBomList = eq.valuesBom;
// bom
if (this.selectedEquipments.includes(eq.id)) {
const selectedItem = this.selected.find(
(item) => item.equipmentId == eq.id
);
this.currentSelectedMaterialBomId =
selectedItem.equMaterialBomId ?? null;
this.currentSelectedValueBomId = selectedItem.equValueBomId ?? null;
}
},
handleEquipmentChange(eq, selected) {
this.currentEquipment = eq.id;
this.materialsBomList = eq.materialsBom;
this.valuesBomList = eq.valuesBom;
if (selected) {
this.selectedEquipments.push(eq.id);
this.selected.push({
equipmentId: eq.id,
equValueBomId: null,
equMaterialBomId: null,
});
// this.$emit('update', this.selected);
} else {
//
this.selectedEquipments = this.selectedEquipments.filter(
(id) => id !== eq.id
);
// this.$refs.materialsBomList.clearSelected();
// this.$refs.valuesBomList.clearSelected();
this.currentSelectedMaterialBomId = null;
this.currentSelectedValueBomId = null;
this.selected = this.selected.filter(
(item) => item.equipmentId !== eq.id
);
// this.$emit('update', this.selected);
}
},
handleMaterialBomChange(equipmentId, bomId, selected) {
const selectedItem = this.selected.find(
(item) => item.equipmentId == equipmentId
);
if (selected && !selectedItem) {
//
this.selectedEquipments.push(equipmentId);
this.selected.push({
equipmentId,
equValueBomId: null,
equMaterialBomId: bomId,
});
// ''
this.refreshKey = Math.random();
// this.$emit('update', this.selected);
return;
}
selectedItem && (selectedItem.equMaterialBomId = selected ? bomId : null);
this.currentSelectedMaterialBomId = selected ? bomId : null;
// this.$emit('update', this.selected);
},
handleValueBomChange(equipmentId, bomId, selected) {
const selectedItem = this.selected.find(
(item) => item.equipmentId == equipmentId
);
if (selected && !selectedItem) {
//
this.selectedEquipments.push(equipmentId);
this.selected.push({
equipmentId,
equValueBomId: bomId,
equMaterialBomId: null,
});
this.refreshKey = Math.random();
// this.$emit('update', this.selected);
return;
}
selectedItem && (selectedItem.equValueBomId = selected ? bomId : null);
this.currentSelectedValueBomId = selected ? bomId : null;
// this.$emit('update', this.selected);
},
},
};
</script>
<style scoped lang="scss">
.bom-selector {
min-height: 200px;
}
.sl__body {
display: flex;
flex-direction: column;
gap: 6px;
padding: 6px;
}
.sl__body-item {
margin: 0;
padding: 3px 6px;
border-radius: 4px;
cursor: pointer;
transition: background 0.3s ease-in-out;
display: flex;
align-items: center;
gap: 8px;
> span {
flex: 1;
}
&:hover {
background: #0001;
}
}
.sl__header {
border-bottom: 1px solid #ccc;
}
</style>

View File

@ -31,6 +31,9 @@
icon="el-icon-search"
placeholder="搜索"
v-model="searchText"
:disabled="currentDet == null"
@change="handleSearchTextChange"
clearable
style="margin-left: 20px">
<i slot="prefix" class="el-input__icon el-icon-search"></i>
</el-input>
@ -63,22 +66,27 @@
<base-dialog
dialogTitle="选择设备"
:dialogVisible="open"
width="45%"
@close="cancel"
@cancel="cancel"
@confirm="submitForm">
<el-transfer v-model="choosedEquipments" :data="eqList">
<!-- <span slot-scope="{ option }">
{{ option.key }} - {{ option.label }}
</span> -->
</el-transfer>
<!-- <CustomTransfer /> -->
<BomSelector
ref="bomSelector"
v-if="open"
:bom-list="bomList"
:value="selectedBoms"
@update="selectedBoms = $event" />
</base-dialog>
</section>
</template>
<script>
import BomSelector from './BomSelector.vue';
export default {
name: 'ProcessBom',
components: {},
components: { BomSelector },
props: {
currentDet: {
type: Object,
@ -89,11 +97,12 @@ export default {
return {
open: false,
eqList: [],
bomList: [],
finalList: [],
choosedEquipments: [],
searchBarFormConfig: [{ label: '工序下设备' }],
tableProps: [
{ prop: 'equipmentId', label: '设备名称' },
{ prop: 'equName', label: '设备名称' },
{ prop: 'materialName', label: '物料BOM' },
{ prop: 'valueName', label: '参数BOM' },
],
@ -103,13 +112,17 @@ export default {
queryParams: {
pageNo: 1,
pageSize: 10,
equipmentName: '',
},
searchText: ''
searchText: '',
selectedBoms: [],
timer: null,
};
},
watch: {
currentDet: {
handler(val) {
console.log('currentDet', val);
if (val != null) {
this.getList(val);
} else {
@ -121,51 +134,21 @@ export default {
},
},
methods: {
renderFn(h, option) {
console.log(option);
return <span>1</span>;
},
async getEqList() {
console.log('currentDet', this.currentDet);
const { sectionId } = this.currentDet;
const { code, data } = await this.http(
'base/core-equipment-bind-section/page',
'get',
{ workshopSectionId: sectionId, pageNo: 1, pageSize: 100 }
);
if (code == 0) {
console.log('workshopSectionId', data);
//
this.eqList = [
{ equipmentId: 1, equipmentName: '设备1' },
{ equipmentId: 2, equipmentName: '设备2' },
{ equipmentId: 3, equipmentName: '设备3' },
{ equipmentId: 4, equipmentName: '设备4' },
{ equipmentId: 5, equipmentName: '设备5' },
{ equipmentId: 6, equipmentName: '设备6' },
]; // ].map((item) => ({ label: item.equipmentName, key: item.equipmentId }));
// bombom
// bom bom
this.finalList = this.eqList.map((item) => {
item.sub = [];
// key: equipmentId-bomId
item.sub.push({
key: item.equipmentId + '-' + '101',
label: '参数bom1',
});
item.sub.push({
key: item.equipmentId + '-' + '201',
label: '物料bom1',
});
return item;
});
}
},
handleEmitFun() {},
handleTableBtnClick() {},
handleSearchTextChange(val) {
if (this.timer) clearTimeout(this.timer);
this.timer = setTimeout(() => {
console.log('geting list.......');
this.queryParams.equipmentName = val;
this.$nextTick(() => {
this.getList(this.currentDet);
});
}, 300);
},
put(payload) {
return this.http(this.updateUrl, 'put', payload);
},
@ -186,8 +169,41 @@ export default {
data: method !== 'get' ? payload : null,
});
},
submitForm() {},
async getList({ detId, detName, detDesc, flowId, sectionName } = {}) {
submitForm() {
//
this.$refs.bomSelector.commit();
//
this.$nextTick(async () => {
console.log('selectedBoms', this.selectedBoms);
if (this.selectedBoms.length) {
const { code, data } = await this.http(
'/extend/process-flow-det-equipment/createList',
'post',
this.selectedBoms.map((item) => ({
...item,
flowDetId: this.currentDet.detId,
}))
);
if (code == 0) {
this.$message.success('操作成功');
this.getList(this.currentDet);
this.cancel();
} else {
this.$message.error('操作失败');
}
} else {
this.$message.info('请选择设备');
}
});
},
async getList({
detId,
detName,
detDesc,
flowId,
sectionName,
sectionId,
} = {}) {
console.log('get list', detId, detName, flowId);
const { data, code } = await this.http(
'/extend/process-flow-det-equipment/page',
@ -201,10 +217,38 @@ export default {
this.list.splice(0);
this.total = 0;
}
// bom
this.http('/extend/process-flow-det/getEquipmentDetBySectionId', 'post', {
sectionId,
flowDetId: detId,
}).then(({ code, data }) => {
if (code == 0) {
this.bomList = data.map((eq) => {
eq.materialsBom = eq.materialsBom || [];
eq.valuesBom = eq.valuesBom || [];
//
eq.materialsBom.chosen = eq.materialsBomChoseId ?? null;
eq.valuesBom.chosen = eq.valuesBomChoseId ?? null;
if (eq.equChose || eq.materialsBom.chosen || eq.valuesBom.chosen) {
this.selectedBoms.push({
equipmentId: eq.id,
equMaterialBomId: eq.materialsBom.chosen,
equValueBomId: eq.valuesBom.chosen,
});
}
// id
eq.materialsBom.equipmentId = eq.id;
eq.valuesBom.equipmentId = eq.id;
return eq;
});
} else {
this.bomList.splice(0);
}
});
},
async handleAddEquipment() {
this.open = true;
await this.getEqList();
},
cancel() {
this.open = false;

View File

@ -102,7 +102,7 @@ export default {
input: true,
label: '工序名称',
prop: 'name',
rules: [{ required: true, message: '不能为空', trigger: 'blur' }],
rules: [{ required: true, message: '工序名称不能为空', trigger: 'blur' }],
},
],
[
@ -111,7 +111,7 @@ export default {
label: '工段',
prop: 'sectionId',
url: '/base/core-workshop-section/listAll',
rules: [{ required: true, message: '不能为空', trigger: 'blur' }],
rules: [{ required: true, message: '工段不能为空', trigger: 'blur' }],
bind: {
filterable: true,
},

Some files were not shown because too many files have changed in this diff Show More