Compare commits

..

2 Commits

Author SHA1 Message Date
ab486dd71b 首页样式调整 2025-07-07 15:49:00 +08:00
0b689b5452 首页样式 2025-07-04 17:02:20 +08:00
45 changed files with 10544 additions and 11494 deletions

BIN
dist.zip

Binary file not shown.

View File

@@ -42,6 +42,7 @@
},
"dependencies": {
"@babel/parser": "7.18.4",
"@jiaminghi/data-view": "^2.10.0",
"@riophae/vue-treeselect": "0.4.0",
"axios": "0.27.2",
"benz-amr-recorder": "^1.1.5",
@@ -52,6 +53,7 @@
"crypto-js": "^4.0.0",
"diagram-js": "^12.3.0",
"echarts": "5.4.0",
"el-tree-transfer": "^2.4.7",
"element-ui": "2.15.12",
"file-saver": "^2.0.5",
"fuse.js": "6.6.2",

View File

@@ -44,25 +44,16 @@ export function getProductAuto(data) {
// 班组自动报表分页
export function getTeamReportPage(data) {
return request({
url: '/monitoring/group-off-record/page',
method: 'post',
data: data,
});
url: '/monitoring/team-auto-report/page',
method: 'post',
data: data
})
}
// 班组自动报表分页详细
export function getTeamReportPageDet(id) {
return request({
url: '/monitoring/group-off-record/get?id=' + id,
url: '/monitoring/team-auto-report/pageDet?id=' + id,
method: 'get',
})
}
export function exportGroupProductReportExcel(data) {
return request({
url: '/monitoring/group-off-record/export-det-excel',
method: 'get',
params: data,
responseType: 'blob',
});
}

View File

@@ -1,18 +0,0 @@
import request from '@/utils/request'
// 获得工厂分页
export function getMaterialReceiptIssuePageData(data) {
return request({
url: '/base/material-warehouse-his/page',
method: 'post',
data: data,
});
}
export function createMaterialIssue(data) {
return request({
url: '/base/material-warehouse-his/create',
method: 'post',
data: data,
});
}

View File

@@ -1,45 +0,0 @@
import request from '@/utils/request'
export function getOrderPage(data) {
return request({
url: '/base/core-work-order/page',
method: 'post',
data: data,
});
}
export function updateOrderData(data) {
return request({
url: '/base/core-work-order/updatee',
method: 'put',
data: data,
});
}
export function createOrderData(data) {
return request({
url: '/base/core-work-order/create',
method: 'post',
data: data,
});
}
export function getOrderData(id) {
return request({
url: '/base/core-work-order/get?id=' + id,
method: 'get',
});
}
export function getOrderCode(data) {
return request({
url: '/base/core-work-order/getCode',
method: 'get',
data: data,
});
}
export function deleteOrder(id) {
return request({
url: '/base/core-work-order/delete?id=' + id,
method: 'delete'
})
}

View File

@@ -1 +1,18 @@
<svg width="128" height="128" xmlns="http://www.w3.org/2000/svg"><path d="M38.47 52L52 38.462l-23.648-23.67L43.209 0H.035L0 43.137l14.757-14.865L38.47 52zm74.773 47.726L89.526 76 76 89.536l23.648 23.672L84.795 128h43.174L128 84.863l-14.757 14.863zM89.538 52l23.668-23.648L128 43.207V.038L84.866 0 99.73 14.76 76 38.472 89.538 52zM38.46 76L14.792 99.651 0 84.794v43.173l43.137.033-14.865-14.757L52 89.53 38.46 76z"/></svg>
<?xml version="1.0" encoding="UTF-8"?>
<svg width="32px" height="32px" viewBox="0 0 32 32" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>全屏</title>
<g id="页面-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="首页" transform="translate(-1865.000000, -106.000000)" fill="#0B58FF">
<g id="全屏" transform="translate(1865.000000, 106.000000)">
<g>
<rect id="矩形" stroke="#0B58FF" opacity="0" x="0.5" y="0.5" width="31" height="31"></rect>
<path d="M27.3264942,0.842105263 L27.583814,0.850525866 C28.0103146,0.878577843 28.4244403,0.976634518 28.8180051,1.14344343 C29.2746777,1.33424853 29.6828981,1.60928508 30.0368065,1.96319349 C30.3881547,2.31454163 30.6645305,2.72554187 30.8562967,3.18137947 C31.0567273,3.65427262 31.1578947,4.15615812 31.1578947,4.6735058 L31.1578947,26.4843889 L31.1494741,26.7417088 C31.1214222,27.1682093 31.0233655,27.5823351 30.8565566,27.9758999 C30.6657515,28.4325724 30.3907149,28.8407928 30.0368065,29.1947013 C29.6854584,29.5460494 29.2744581,29.8224253 28.8186205,30.0141914 C28.3457274,30.214622 27.8438419,30.3157895 27.3264942,30.3157895 L5.51561106,30.3157895 L5.25829123,30.3073689 C4.83179065,30.2793169 4.41766492,30.1812602 4.02410014,30.0144513 C3.5674276,29.8236462 3.15920715,29.5486097 2.80529875,29.1947013 C2.45395061,28.8433531 2.17757472,28.4323529 1.98580856,27.9765153 C1.785378,27.5036221 1.68421053,27.0017366 1.68421053,26.4843889 L1.68421053,4.6735058 L1.69263113,4.41618596 C1.72068311,3.98968539 1.81873978,3.57555966 1.98554869,3.18199488 C2.17635379,2.72532234 2.45139035,2.31710189 2.80529875,1.96319349 C3.15664689,1.61184534 3.56764713,1.33546946 4.02348473,1.1437033 C4.49637788,0.943272735 4.99826338,0.842105263 5.51561106,0.842105263 L27.3264942,0.842105263 Z M27.3264942,2.75111508 L5.51561106,2.75111508 L5.36543907,2.75690192 C4.37431777,2.83358398 3.59322034,3.6628098 3.59322034,4.6735058 L3.59322034,26.4843889 L3.59900719,26.6345609 C3.67568924,27.6256822 4.50491506,28.4067797 5.51561106,28.4067797 L27.3264942,28.4067797 L27.4766662,28.4009928 C28.4677875,28.3243108 29.2488849,27.4950849 29.2488849,26.4843889 L29.2488849,4.6735058 L29.2430981,4.52333381 C29.166416,3.53221251 28.3371902,2.75111508 27.3264942,2.75111508 Z M6.93907808,16.8656959 L7.04823476,16.8742044 C7.51440654,16.9376019 7.87511151,17.3390325 7.87511151,17.8202498 L7.87511151,22.7419534 L12.5867439,18.0303211 L12.6763037,17.9513367 C13.0496528,17.6617272 13.593961,17.6880553 13.9362267,18.0303211 C14.3070145,18.4011089 14.3070145,19.009016 13.9362267,19.3798038 L9.18746648,24.1248885 L14.0860839,24.1248885 L14.2012238,24.1314959 C14.6923507,24.1882147 15.0747102,24.6029657 15.0673779,25.0991191 C15.056792,25.6176308 14.6323624,26.0338983 14.1128457,26.0338983 L6.94402319,26.0338983 L6.82978436,26.0273339 C6.34272021,25.9709676 5.96610169,25.5584576 5.96610169,25.0559768 L5.96610169,17.8436664 L5.97273726,17.7287345 C6.02968832,17.2384284 6.44595722,16.8559311 6.93907808,16.8656959 Z M25.9047725,5.12399643 L26.0180629,5.13054044 C26.501183,5.1867256 26.8760036,5.59778744 26.8760036,6.09522748 L26.8760036,13.3108831 L26.869368,13.425815 C26.8124169,13.9161211 26.396148,14.2986184 25.9030272,14.2888536 C25.3853261,14.278234 24.9669938,13.8525337 24.9669938,13.3342997 L24.9669938,8.4159413 L20.2553614,13.1275737 L20.1658016,13.2065581 C19.7924524,13.4961675 19.2481443,13.4698394 18.9058786,13.1275737 C18.5350907,12.7567858 18.5350907,12.1488788 18.9058786,11.7780909 L23.6509632,7.03300624 L18.7526762,7.03300624 L18.6375099,7.02640054 C18.1463449,6.96969821 17.7649507,6.5551 17.7747062,6.0600055 C17.7853132,5.54026395 18.2097429,5.12399643 18.7292596,5.12399643 L25.9047725,5.12399643 Z" id="形状结合" fill-rule="nonzero" opacity="0.79078311"></path>
</g>
<g>
<rect id="矩形" stroke="#0B58FF" opacity="0" x="0.5" y="0.5" width="31" height="31"></rect>
<path d="M27.3264942,0.842105263 L27.583814,0.850525866 C28.0103146,0.878577843 28.4244403,0.976634518 28.8180051,1.14344343 C29.2746777,1.33424853 29.6828981,1.60928508 30.0368065,1.96319349 C30.3881547,2.31454163 30.6645305,2.72554187 30.8562967,3.18137947 C31.0567273,3.65427262 31.1578947,4.15615812 31.1578947,4.6735058 L31.1578947,26.4843889 L31.1494741,26.7417088 C31.1214222,27.1682093 31.0233655,27.5823351 30.8565566,27.9758999 C30.6657515,28.4325724 30.3907149,28.8407928 30.0368065,29.1947013 C29.6854584,29.5460494 29.2744581,29.8224253 28.8186205,30.0141914 C28.3457274,30.214622 27.8438419,30.3157895 27.3264942,30.3157895 L5.51561106,30.3157895 L5.25829123,30.3073689 C4.83179065,30.2793169 4.41766492,30.1812602 4.02410014,30.0144513 C3.5674276,29.8236462 3.15920715,29.5486097 2.80529875,29.1947013 C2.45395061,28.8433531 2.17757472,28.4323529 1.98580856,27.9765153 C1.785378,27.5036221 1.68421053,27.0017366 1.68421053,26.4843889 L1.68421053,4.6735058 L1.69263113,4.41618596 C1.72068311,3.98968539 1.81873978,3.57555966 1.98554869,3.18199488 C2.17635379,2.72532234 2.45139035,2.31710189 2.80529875,1.96319349 C3.15664689,1.61184534 3.56764713,1.33546946 4.02348473,1.1437033 C4.49637788,0.943272735 4.99826338,0.842105263 5.51561106,0.842105263 L27.3264942,0.842105263 Z M27.3264942,2.75111508 L5.51561106,2.75111508 L5.36543907,2.75690192 C4.37431777,2.83358398 3.59322034,3.6628098 3.59322034,4.6735058 L3.59322034,26.4843889 L3.59900719,26.6345609 C3.67568924,27.6256822 4.50491506,28.4067797 5.51561106,28.4067797 L27.3264942,28.4067797 L27.4766662,28.4009928 C28.4677875,28.3243108 29.2488849,27.4950849 29.2488849,26.4843889 L29.2488849,4.6735058 L29.2430981,4.52333381 C29.166416,3.53221251 28.3371902,2.75111508 27.3264942,2.75111508 Z M6.93907808,16.8656959 L7.04823476,16.8742044 C7.51440654,16.9376019 7.87511151,17.3390325 7.87511151,17.8202498 L7.87511151,22.7419534 L12.5867439,18.0303211 L12.6763037,17.9513367 C13.0496528,17.6617272 13.593961,17.6880553 13.9362267,18.0303211 C14.3070145,18.4011089 14.3070145,19.009016 13.9362267,19.3798038 L9.18746648,24.1248885 L14.0860839,24.1248885 L14.2012238,24.1314959 C14.6923507,24.1882147 15.0747102,24.6029657 15.0673779,25.0991191 C15.056792,25.6176308 14.6323624,26.0338983 14.1128457,26.0338983 L6.94402319,26.0338983 L6.82978436,26.0273339 C6.34272021,25.9709676 5.96610169,25.5584576 5.96610169,25.0559768 L5.96610169,17.8436664 L5.97273726,17.7287345 C6.02968832,17.2384284 6.44595722,16.8559311 6.93907808,16.8656959 Z M25.9047725,5.12399643 L26.0180629,5.13054044 C26.501183,5.1867256 26.8760036,5.59778744 26.8760036,6.09522748 L26.8760036,13.3108831 L26.869368,13.425815 C26.8124169,13.9161211 26.396148,14.2986184 25.9030272,14.2888536 C25.3853261,14.278234 24.9669938,13.8525337 24.9669938,13.3342997 L24.9669938,8.4159413 L20.2553614,13.1275737 L20.1658016,13.2065581 C19.7924524,13.4961675 19.2481443,13.4698394 18.9058786,13.1275737 C18.5350907,12.7567858 18.5350907,12.1488788 18.9058786,11.7780909 L23.6509632,7.03300624 L18.7526762,7.03300624 L18.6375099,7.02640054 C18.1463449,6.96969821 17.7649507,6.5551 17.7747062,6.0600055 C17.7853132,5.54026395 18.2097429,5.12399643 18.7292596,5.12399643 L25.9047725,5.12399643 Z" id="形状结合" fill-rule="nonzero" opacity="0.79078311"></path>
</g>
</g>
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 421 B

After

Width:  |  Height:  |  Size: 7.3 KiB

View File

@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="16px" height="16px" viewBox="0 0 16 16" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>更新</title>
<g id="页面-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="首页" transform="translate(-474.000000, -116.000000)" fill="#0B58FF" fill-rule="nonzero">
<g id="更新" transform="translate(474.000000, 116.000000)">
<rect id="矩形" opacity="0" x="0" y="0" width="16" height="16"></rect>
<path d="M14.9793977,2.67910156 L13.9879914,3.45429687 C12.6362336,1.72636719 10.5338899,0.6171875 8.17314768,0.6171875 C4.09678049,0.6171875 0.797366431,3.91308594 0.792086694,7.99121094 C0.786819556,12.0728516 4.09326487,15.3828125 8.17314768,15.3828125 C11.3600617,15.3828125 14.0758821,13.3613281 15.1094758,10.5294922 C15.135843,10.4556641 15.0971711,10.3730469 15.023343,10.3484375 L14.0266633,10.0056641 C13.954593,9.98105469 13.8754914,10.0179688 13.8491242,10.0900391 C13.8174836,10.1779297 13.7823274,10.2658203 13.7454133,10.3519531 C13.4413117,11.0726562 13.0053742,11.7195312 12.4499055,12.275 C11.8944367,12.8304687 11.2475617,13.2664062 10.5286164,13.5722656 C9.78506174,13.8869141 8.99228831,14.046875 8.17666331,14.046875 C7.35928049,14.046875 6.56826487,13.8869141 5.82471018,13.5722656 C5.10576487,13.2681641 4.45888987,12.8322266 3.90342112,12.275 C3.34795237,11.7195312 2.91201487,11.0726562 2.60791331,10.3519531 C2.29326487,9.60664063 2.13330393,8.815625 2.13330393,7.99824219 C2.13330393,7.18085937 2.29326487,6.38984375 2.60791331,5.64453125 C2.91201487,4.92382812 3.34795237,4.27695312 3.90342112,3.72148438 C4.45888987,3.16601563 5.10576487,2.73007813 5.82471018,2.42421875 C6.56826487,2.10957031 7.36103831,1.94960938 8.17666331,1.94960938 C8.99404612,1.94960938 9.78506174,2.10957031 10.5286164,2.42421875 C11.2475617,2.72832031 11.8944367,3.16425781 12.4499055,3.72148438 C12.6239289,3.89550781 12.7874055,4.08007812 12.9385774,4.2734375 L11.8803742,5.09960938 C11.7872102,5.17167969 11.8188508,5.31933594 11.9331086,5.34746094 L15.0198274,6.10332031 C15.107718,6.12441406 15.1938508,6.05761719 15.1938508,5.96796875 L15.2079133,2.78808594 C15.2061555,2.67207031 15.0708039,2.60703125 14.9793977,2.67910156 L14.9793977,2.67910156 Z" id="路径" stroke="#0B58FF" stroke-width="0.5"></path>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.4 KiB

View File

@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="32px" height="32px" viewBox="0 0 32 32" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>推出全屏</title>
<g id="页面-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="首页" transform="translate(-1815.000000, -103.000000)" fill="#0B58FF">
<g id="推出全屏" transform="translate(1815.000000, 103.000000)">
<g id="全屏">
<rect id="矩形" stroke="#0B58FF" opacity="0" x="0.5" y="0.5" width="31" height="31"></rect>
<path d="M26.7638125,1.45454545 L27.0177905,1.4628567 C27.4387521,1.49054436 27.8474996,1.58732758 28.2359531,1.75197014 C28.6866948,1.94029725 29.0896137,2.2117619 29.4389259,2.56107409 C29.7857111,2.90785927 30.0584977,3.31352185 30.2477734,3.76343947 C30.4456009,4.23019115 30.5454545,4.72555866 30.5454545,5.23618754 L30.5454545,26.7638125 L30.5371433,27.0177905 C30.5094556,27.4387521 30.4126724,27.8474996 30.2480299,28.2359531 C30.0597028,28.6866948 29.7882381,29.0896137 29.4389259,29.4389259 C29.0921407,29.7857111 28.6864782,30.0584977 28.2365605,30.2477734 C27.7698088,30.4456009 27.2744413,30.5454545 26.7638125,30.5454545 L5.23618754,30.5454545 L4.98220952,30.5371433 C4.56124792,30.5094556 4.15250044,30.4126724 3.7640469,30.2480299 C3.31330516,30.0597028 2.91038628,29.7882381 2.56107409,29.4389259 C2.21428891,29.0921407 1.94150232,28.6864782 1.75222663,28.2365605 C1.55439906,27.7698088 1.45454545,27.2744413 1.45454545,26.7638125 L1.45454545,5.23618754 L1.4628567,4.98220952 C1.49054436,4.56124792 1.58732758,4.15250044 1.75197014,3.7640469 C1.94029725,3.31330516 2.2117619,2.91038628 2.56107409,2.56107409 C2.90785927,2.21428891 3.31352185,1.94150232 3.76343947,1.75222663 C4.23019115,1.55439906 4.72555866,1.45454545 5.23618754,1.45454545 L26.7638125,1.45454545 Z M26.7638125,3.33876293 L5.23618754,3.33876293 L5.08796584,3.34447462 C4.10971624,3.42016081 3.33876293,4.23861746 3.33876293,5.23618754 L3.33876293,26.7638125 L3.34447462,26.9120342 C3.42016081,27.8902838 4.23861746,28.6612371 5.23618754,28.6612371 L26.7638125,28.6612371 L26.9120342,28.6555254 C27.8902838,28.5798392 28.6612371,27.7613825 28.6612371,26.7638125 L28.6612371,5.23618754 L28.6555254,5.08796584 C28.5798392,4.10971624 27.7613825,3.33876293 26.7638125,3.33876293 Z M13.6987866,17.269857 L13.8115418,17.2763362 C14.2922804,17.3319705 14.6640078,17.7391232 14.6640078,18.2350783 L14.6640078,25.3537223 L14.6574584,25.4671616 C14.6012469,25.9511001 14.1903841,26.3286298 13.7036674,26.3189919 L13.5959284,26.3105939 C13.1358108,26.2480197 12.7797903,25.8518025 12.7797903,25.3768348 L12.7797903,20.5190494 L8.12934794,25.1694917 L8.04095127,25.2474504 C7.67245079,25.5332987 7.13521162,25.5073124 6.79739091,25.1694917 C6.43141847,24.8035193 6.43141847,24.2035071 6.79739091,23.8375347 L11.4844789,19.1540745 L6.64947993,19.1540745 L6.53583534,19.1475529 C6.05108664,19.0915708 5.67369292,18.6822061 5.68093001,18.1924962 C5.69137836,17.6807185 6.11029591,17.269857 6.62306566,17.269857 L13.6987866,17.269857 Z M18.2962333,5.68100813 C18.807211,5.69148979 19.2201105,6.11166149 19.2201105,6.62316519 L19.2201105,11.4776488 L23.8705528,6.82720649 L23.9589495,6.74924786 C24.32745,6.46339956 24.8646892,6.48938577 25.2025099,6.82720649 C25.5684823,7.19317893 25.5684823,7.79319108 25.2025099,8.15916352 L20.5190497,12.8426237 L25.3537226,12.8426237 L25.4673933,12.8491436 C25.9521795,12.9051095 26.3286206,13.3143234 26.3189917,13.8029881 C26.3085224,14.3159797 25.8896049,14.7268412 25.3768351,14.7268412 L18.2945107,14.7268412 L18.1826915,14.7203822 C17.7058457,14.6649267 17.335893,14.2592033 17.335893,13.7682235 L17.335893,6.64627767 L17.3424424,6.53283844 C17.3986538,6.04889994 17.8095166,5.67137018 18.2962333,5.68100813 Z" id="形状结合" fill-rule="nonzero" opacity="0.79078311"></path>
</g>
<g id="全屏">
<rect id="矩形" stroke="#0B58FF" opacity="0" x="0.5" y="0.5" width="31" height="31"></rect>
<path d="M26.7638125,1.45454545 L27.0177905,1.4628567 C27.4387521,1.49054436 27.8474996,1.58732758 28.2359531,1.75197014 C28.6866948,1.94029725 29.0896137,2.2117619 29.4389259,2.56107409 C29.7857111,2.90785927 30.0584977,3.31352185 30.2477734,3.76343947 C30.4456009,4.23019115 30.5454545,4.72555866 30.5454545,5.23618754 L30.5454545,26.7638125 L30.5371433,27.0177905 C30.5094556,27.4387521 30.4126724,27.8474996 30.2480299,28.2359531 C30.0597028,28.6866948 29.7882381,29.0896137 29.4389259,29.4389259 C29.0921407,29.7857111 28.6864782,30.0584977 28.2365605,30.2477734 C27.7698088,30.4456009 27.2744413,30.5454545 26.7638125,30.5454545 L5.23618754,30.5454545 L4.98220952,30.5371433 C4.56124792,30.5094556 4.15250044,30.4126724 3.7640469,30.2480299 C3.31330516,30.0597028 2.91038628,29.7882381 2.56107409,29.4389259 C2.21428891,29.0921407 1.94150232,28.6864782 1.75222663,28.2365605 C1.55439906,27.7698088 1.45454545,27.2744413 1.45454545,26.7638125 L1.45454545,5.23618754 L1.4628567,4.98220952 C1.49054436,4.56124792 1.58732758,4.15250044 1.75197014,3.7640469 C1.94029725,3.31330516 2.2117619,2.91038628 2.56107409,2.56107409 C2.90785927,2.21428891 3.31352185,1.94150232 3.76343947,1.75222663 C4.23019115,1.55439906 4.72555866,1.45454545 5.23618754,1.45454545 L26.7638125,1.45454545 Z M26.7638125,3.33876293 L5.23618754,3.33876293 L5.08796584,3.34447462 C4.10971624,3.42016081 3.33876293,4.23861746 3.33876293,5.23618754 L3.33876293,26.7638125 L3.34447462,26.9120342 C3.42016081,27.8902838 4.23861746,28.6612371 5.23618754,28.6612371 L26.7638125,28.6612371 L26.9120342,28.6555254 C27.8902838,28.5798392 28.6612371,27.7613825 28.6612371,26.7638125 L28.6612371,5.23618754 L28.6555254,5.08796584 C28.5798392,4.10971624 27.7613825,3.33876293 26.7638125,3.33876293 Z M13.6987866,17.269857 L13.8115418,17.2763362 C14.2922804,17.3319705 14.6640078,17.7391232 14.6640078,18.2350783 L14.6640078,25.3537223 L14.6574584,25.4671616 C14.6012469,25.9511001 14.1903841,26.3286298 13.7036674,26.3189919 L13.5959284,26.3105939 C13.1358108,26.2480197 12.7797903,25.8518025 12.7797903,25.3768348 L12.7797903,20.5190494 L8.12934794,25.1694917 L8.04095127,25.2474504 C7.67245079,25.5332987 7.13521162,25.5073124 6.79739091,25.1694917 C6.43141847,24.8035193 6.43141847,24.2035071 6.79739091,23.8375347 L11.4844789,19.1540745 L6.64947993,19.1540745 L6.53583534,19.1475529 C6.05108664,19.0915708 5.67369292,18.6822061 5.68093001,18.1924962 C5.69137836,17.6807185 6.11029591,17.269857 6.62306566,17.269857 L13.6987866,17.269857 Z M18.2962333,5.68100813 C18.807211,5.69148979 19.2201105,6.11166149 19.2201105,6.62316519 L19.2201105,11.4776488 L23.8705528,6.82720649 L23.9589495,6.74924786 C24.32745,6.46339956 24.8646892,6.48938577 25.2025099,6.82720649 C25.5684823,7.19317893 25.5684823,7.79319108 25.2025099,8.15916352 L20.5190497,12.8426237 L25.3537226,12.8426237 L25.4673933,12.8491436 C25.9521795,12.9051095 26.3286206,13.3143234 26.3189917,13.8029881 C26.3085224,14.3159797 25.8896049,14.7268412 25.3768351,14.7268412 L18.2945107,14.7268412 L18.1826915,14.7203822 C17.7058457,14.6649267 17.335893,14.2592033 17.335893,13.7682235 L17.335893,6.64627767 L17.3424424,6.53283844 C17.3986538,6.04889994 17.8095166,5.67137018 18.2962333,5.68100813 Z" id="形状结合" fill-rule="nonzero" opacity="0.79078311"></path>
</g>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 7.3 KiB

View File

@@ -1,16 +1,30 @@
<!--
filename: index.vue
author: liubin
date: 2024-04-02 09:49:36
description:
-->
<template>
<!-- 按钮切换 -->
<div v-if="buttonMode" class="button-nav">
<button v-for="m in menus" :key="m" @click="handleClick(m)"
<button
v-for="m in menus"
:key="m"
@click="currentMenu = m"
:data-text="m"
:class="[m === currentMenu ? 'active' : '']"
></button>
></button>
</div>
<!-- 标签切换 -->
<div v-else class="custom-tabs" style="height: 100%; width: 100%">
<el-tabs class="tag-nav" v-model="currentMenu" style="height: 100%" @tab-click="handleTabClick">
<el-tab-pane v-for="(m, idx) in menus" :key="m" :label="idx == 0 ? `\u2002${m}\u2002` : `\u3000${m}\u3000`"
:name="m">
<el-tabs class="tag-nav" v-model="currentMenu" style="height: 100%">
<el-tab-pane
v-for="(m, idx) in menus"
:key="m"
:label="idx == 0 ? `\u2002${m}\u2002` : `\u3000${m}\u3000`"
:name="m"
>
<slot :name="`tab${idx + 1}`"></slot>
</el-tab-pane>
</el-tabs>
@@ -25,17 +39,14 @@ export default {
type: Array,
required: true,
default: () => [],
validator: (val) => val.length > 0,
validator: (val) => {
return val.length > 0;
},
},
buttonMode: {
type: Boolean,
default: true,
},
// 新增支持外部传入选中值v-model 绑定)
value: {
type: String,
default: "",
},
},
data() {
return {
@@ -43,34 +54,16 @@ export default {
};
},
created() {
// 优先使用外部传入的 value否则默认第一个
this.currentMenu = this.value || this.menus[0];
this.currentMenu = this.menus[0];
},
watch: {
// 监听外部 value 变化,同步到内部 currentMenu
value(newVal) {
this.currentMenu = newVal;
},
// 监听内部 currentMenu 变化,通知外部
currentMenu(val) {
this.$emit("input", val); // 触发 v-model 同步
this.$emit("change", val); // 保留原 change 事件
},
},
methods: {
// 按钮点击事件
handleClick(m) {
this.currentMenu = m;
},
// 标签点击事件el-tabs 自带)
handleTabClick(tab) {
this.currentMenu = tab.name;
this.$emit("change", val);
},
},
};
</script>
<!-- 样式不变 -->
<style scoped lang="scss">
.button-nav {
width: 100%;
@@ -115,24 +108,22 @@ export default {
</style>
<style scoped>
.custom-tabs>>>.el-tabs__header {
.custom-tabs >>> .el-tabs__header {
margin-bottom: 8px;
display: inline-block;
/* transform: translateY(-12px); */
}
.custom-tabs>>>.el-tabs__item {
.custom-tabs >>> .el-tabs__item {
padding-left: 0px !important;
padding-right: 0px !important;
line-height: 36px !important;
height: 36px;
}
.custom-tabs>>>.el-tabs__content {
.custom-tabs >>> .el-tabs__content {
height: calc(100% - 42px);
}
.custom-tabs>>>.el-tab-pane {
.custom-tabs >>> .el-tab-pane {
box-sizing: border-box;
height: 100%;
padding: 20px;

View File

@@ -9,6 +9,7 @@ import store from './store';
import router from './router';
import directive from './directive'; // directive
import plugins from './plugins'; // plugins
import dataV from '@jiaminghi/data-view'
import './assets/icons'; // icon
import './permission'; // permission control
@@ -77,6 +78,7 @@ Vue.use(directive);
Vue.use(plugins);
Vue.use(VueMeta);
// Vue.use(hljs.vuePlugin);
Vue.use(dataV);
// bpmnProcessDesigner 需要引入
import MyPD from '@/components/bpmnProcessDesigner/package/index.js';

View File

@@ -76,7 +76,7 @@ export const constantRoutes = [
children: [
{
path: "index",
component: (resolve) => require(["@/views/core/base/factory/index"], resolve),
component: (resolve) => require(["@/views/home/index"], resolve),
name: "首页",
meta: { title: "首页", icon: "dashboard", affix: true },
hidden: true

View File

@@ -1,47 +1,61 @@
<template>
<div>
<div style="background: #f2f4f9; height: 40px; width: 100%">
<ButtonNav :menus="['当前', '历史']" @change="currentMenu" v-model="activeName">
<!-- <template v-slot:tab1>
<div>当前</div>
</template>
<template v-slot:tab2>
<div>历史</div>
</template> -->
</ButtonNav>
</div>
<div class="app-container energyOverlimitLog">
<div v-if="activeName === '历史' && routeType !== 'order'">
<!-- 搜索工作栏 -->
<search-bar :formConfigs="formConfig" ref="searchBarForm" @select-changed="handleSearchBarChanged"
@headBtnClick="buttonClick" />
</div>
<h2 v-else>
订单名称:{{ name }}
订单编码:{{ code }}
<el-button v-hasPermi="['base:core-work-order:export']" type="primary" @click="handleExport">导出</el-button>
</h2>
<div v-show="activeName === '当前'"></div>
<!-- 列表 -->
<div v-if="activeName === '历史'">
<base-table-s :page="1" :limit="100" :table-props="tableProps" :table-data="tableData"
:max-height="tableH / 2"></base-table-s>
<div v-if="listQuery.lineId.length !== 1 && tableData.length > 0">
<barChart style="margin-top: 50px" ref="barChart" height="600px" :bar-data="tableData" />
</div>
</div>
<div v-if="activeName === '当前'">
<span class="blue-block"></span>
<span class="tip">当班数据</span>
<base-table-s :page="1" :limit="100" :table-props="tableProps" :table-data="tableData2"
:max-height="tableH / 2" />
<span class="blue-block"></span>
<span class="tip">当天数据</span>
<base-table-s :page="1" :limit="100" :table-props="tableProps" :table-data="tableData3"
:max-height="tableH / 2" />
</div>
</div>
</div>
<div>
<div style="background: #f2f4f9; height: 40px; width: 100%">
<ButtonNav :menus="['当前', '历史']" @change="currentMenu">
<template v-slot:tab1>
<div>当前</div>
</template>
<template v-slot:tab2>
<div>历史</div>
</template>
</ButtonNav>
</div>
<div class="app-container energyOverlimitLog">
<div v-show="activeName === 'his'">
<!-- 搜索工作栏 -->
<search-bar
:formConfigs="formConfig"
ref="searchBarForm"
@select-changed="handleSearchBarChanged"
@headBtnClick="buttonClick" />
</div>
<div v-show="activeName === 'now'"></div>
<!-- 列表 -->
<div v-if="activeName === 'his'">
<base-table-s
:page="1"
:limit="100"
:table-props="tableProps"
:table-data="tableData"
:max-height="tableH / 2"></base-table-s>
<div v-if="listQuery.lineId.length !== 1 && tableData.length > 0">
<barChart
style="margin-top: 50px"
ref="barChart"
height="600px"
:bar-data="tableData" />
</div>
</div>
<div v-if="activeName === 'now'">
<span class="blue-block"></span>
<span class="tip">当班数据</span>
<base-table-s
:page="1"
:limit="100"
:table-props="tableProps"
:table-data="tableData2"
:max-height="tableH / 2" />
<span class="blue-block"></span>
<span class="tip">当天数据</span>
<base-table-s
:page="1"
:limit="100"
:table-props="tableProps"
:table-data="tableData3"
:max-height="tableH / 2" />
</div>
</div>
</div>
</template>
<script>
@@ -266,10 +280,7 @@ export default {
return {
urlOptions: {
getDataListURL: getPdlAutoReportNewSearch,
},
routeType: 'line',
code: '',
name:'',
},
formConfig: [
{
type: 'select',
@@ -283,8 +294,7 @@ export default {
label: '产线',
selectOptions: [],
param: 'lineId',
multiple: true,
defaultSelect:[]
multiple: true,
},
{
type: 'datePicker',
@@ -295,8 +305,7 @@ export default {
rangeSeparator: '-',
startPlaceholder: '开始时间',
endPlaceholder: '结束时间',
param: 'timeVal',
defaultSelect:[],
param: 'timeVal',
width: 350,
},
{
@@ -309,8 +318,8 @@ export default {
type: 'separate',
},
{
type: this.$auth.hasPermi('|base:core-work-order:export') ? 'button' : '',
// type: 'button',
// type: this.$auth.hasPermi('base:factory:export') ? 'button' : '',
type: 'button',
btnName: '导出',
name: 'export',
color: 'warning',
@@ -319,7 +328,7 @@ export default {
listQuery: {
lineId: [],
},
activeName: '当前',
activeName: 'now',
tableProps,
tableData: [],
tableData2: [],
@@ -331,32 +340,10 @@ export default {
baseTableS,
barChart,
},
mounted() {
this.getPdLineList()
this.$nextTick(() => {
const tab = this.$route.query.tab; // 获取路由参数
console.log(this.$route.query);
this.routeType = this.$route.query.buttonType === 'order' ? 'order' : 'line'
this.code = this.$route.query.code
this.name = this.$route.query.name
if (tab === 'his') {
// 路由参数为 his 时,切换到“历史”标签
this.activeName = '历史'; // 注意:这里直接传标签名('历史'),不是'his'
this.formConfig[1].defaultSelect = this.$route.query.lineId
this.formConfig[2].defaultSelect[0] = this.$route.query.startProduceTime
this.formConfig[2].defaultSelect[1] = this.$route.query.finishProduceTime
// this.buttonClick()
this.listQuery.lineId = this.$route.query.lineId
} else {
this.activeName = '当前'; // 默认“当前”标签
}
})
// ... 其他方法 ...
},
methods: {
created() {
this.getPdLineList();
},
methods: {
getPdLineList() {
getPdList().then((res) => {
this.formConfig[1].selectOptions = res.data || [];
@@ -376,7 +363,7 @@ export default {
this.listQuery.lineId = val.lineId || [];
this.listQuery.startTime = val.timeVal ? val.timeVal[0] : undefined;
this.listQuery.endTime = val.timeVal ? val.timeVal[1] : undefined;
if (this.activeName === '历史') {
if (this.activeName === 'his') {
this.getDataList();
} else {
this.getDataList2();
@@ -388,19 +375,13 @@ export default {
default:
console.log(val);
}
},
currentMenu(val) {
this.activeName = val; // 同步标签名到 activeName
let actualName = val === '历史' ? 'his' : 'now'; // 转换为内部状态
// 后续逻辑不变(根据 activeName 加载对应数据)
if (actualName === 'his') {
// this.$refs.searchBarForm.resetForm();
this.listQuery.factoryId = undefined;
if (!this.$route.query.lineId) {
this.listQuery.lineId = [];
}
},
currentMenu(val) {
this.activeName = val === '历史' ? 'his' : 'now';
if (this.activeName === 'his') {
this.$refs.searchBarForm.resetForm();
this.listQuery.factoryId = undefined;
this.listQuery.lineId = [];
// 获取当前时间
const now = new Date();
// 获取前一天的同一时间
@@ -423,98 +404,39 @@ export default {
this.getDataList2();
}
},
getDataList() {
if (this.listQuery.startTime) {
this.dataListLoading = true;
// 判断是否为order类型且lineId有值
if (this.routeType === 'order' && this.listQuery.lineId?.length) {
// 存储所有接口请求的Promise
const requests = this.listQuery.lineId.map(lineId => {
// 复制原有查询参数替换当前lineId
const params = { ...this.listQuery, lineId: [lineId] };
return this.urlOptions.getDataListURL(params);
});
// 并行执行所有请求
Promise.all(requests)
.then(responses => {
// 合并所有接口返回的数据
this.tableData = responses.flatMap(response => {
return response.data.map(item => {
// 处理嵌套属性
item.originalLossNum = item.original?.lossNum;
item.originalLossArea = item.original?.lossArea;
item.edgeLossNum = item.edge?.lossNum;
item.edgeLossArea = item.edge?.lossArea;
item.drillLossNum = item.drill?.lossNum;
item.drillLossArea = item.drill?.lossArea;
item.coatingLossNum = item.coating?.lossNum;
item.coatingLossArea = item.coating?.lossArea;
item.silkLossNum = item.silk?.lossNum;
item.silkLossArea = item.silk?.lossArea;
item.temperingLossNum = item.tempering?.lossNum;
item.temperingLossArea = item.tempering?.lossArea;
item.packingLossNum = item.packing?.lossNum;
item.packingLossArea = item.packing?.lossArea;
return item;
});
});
this.$nextTick(() => {
if (this.tableData.length > 0) {
this.$refs.barChart.initChart();
}
});
})
.catch(error => {
console.error('接口请求失败:', error);
this.$message.error('数据加载失败,请重试');
})
.finally(() => {
this.dataListLoading = false;
});
} else {
// 非order类型或无lineId时正常单次请求
this.urlOptions.getDataListURL(this.listQuery)
.then(response => {
this.tableData = response.data.map((item, index) => {
item.originalLossNum = item.original?.lossNum;
item.originalLossArea = item.original?.lossArea;
item.edgeLossNum = item.edge?.lossNum;
item.edgeLossArea = item.edge?.lossArea;
item.drillLossNum = item.drill?.lossNum;
item.drillLossArea = item.drill?.lossArea;
item.coatingLossNum = item.coating?.lossNum;
item.coatingLossArea = item.coating?.lossArea;
item.silkLossNum = item.silk?.lossNum;
item.silkLossArea = item.silk?.lossArea;
item.temperingLossNum = item.tempering?.lossNum;
item.temperingLossArea = item.tempering?.lossArea;
item.packingLossNum = item.packing?.lossNum;
item.packingLossArea = item.packing?.lossArea;
return item;
});
this.$nextTick(() => {
if (this.tableData.length > 0) {
this.$refs.barChart.initChart();
}
});
})
.catch(error => {
console.error('接口请求失败:', error);
this.$message.error('数据加载失败,请重试');
})
.finally(() => {
this.dataListLoading = false;
});
}
} else {
this.$message.warning('请选择时间范围');
}
},
// 获取数据列表
getDataList() {
if (this.listQuery.startTime) {
this.dataListLoading = true;
this.urlOptions.getDataListURL(this.listQuery).then((response) => {
this.tableData = response.data.map((item, index) => {
item.originalLossNum = item.original?.lossNum;
item.originalLossArea = item.original?.lossArea;
item.edgeLossNum = item.edge?.lossNum;
item.edgeLossArea = item.edge?.lossArea;
item.drillLossNum = item.drill?.lossNum;
item.drillLossArea = item.drill?.lossArea;
item.coatingLossNum = item.coating?.lossNum;
item.coatingLossArea = item.coating?.lossArea;
item.silkLossNum = item.silk?.lossNum;
item.silkLossArea = item.silk?.lossArea;
item.temperingLossNum = item.tempering?.lossNum;
item.temperingLossArea = item.tempering?.lossArea;
item.packingLossNum = item.packing?.lossNum;
item.packingLossArea = item.packing?.lossArea;
return item;
});
this.$nextTick(() => {
if(this.tableData.length>0){
this.$refs.barChart.initChart();
}
});
this.dataListLoading = false;
});
} else {
this.$message.warning('请选择时间范围');
}
},
// 获取数据2列表
getDataList2() {
getPdlAutoReportNewSearchNow().then((response) => {

View File

@@ -6,224 +6,208 @@
* @Description:
-->
<template>
<div>
<search-bar :formConfigs="formConfig" ref="searchBarForm" @headBtnClick="buttonClick" />
<el-table id="detail" :data="tableData" :header-cell-style="{
<div>
<search-bar
:formConfigs="formConfig"
ref="searchBarForm"
@headBtnClick="buttonClick" />
<el-table
id="detail"
:data="tableData"
:header-cell-style="{
background: '#F2F4F9',
color: '#606266',
}" border v-loading="dataListLoading" style="width: 100%" ref="dataList">
<el-table-column prop="lineName" label="产线" align="center" />
<!-- <el-table-column prop="sizes" width="105" showOverflowtooltip align="center" label="规格" /> -->
<!-- <el-table-column prop="process" label="产品工艺" align="center" /> -->
<el-table-column prop="inputN" label="磨边" align="center">
<el-table-column prop="edgeNum" label="投入数量/片" />
<el-table-column prop="edgeTime" label="数据上报时间">
<template v-slot="scope">
<span>
{{
scope.row.reportType === 0
? parseTime(scope.row.edgeTime)
: '-'
}}
</span>
</template>
</el-table-column>
</el-table-column>
<el-table-column prop="outputN" label="打孔/丝印" align="center">
<el-table-column prop="drillCoating" label="投入数量">
<template v-slot="scope">
<span>
{{
(scope.row.drillNum ?? '-')
+ '/'
+ (scope.row.coatingNum ?? '-')
}}
</span>
</template>
</el-table-column>
<el-table-column prop="coatingTime" label="数据上报时间">
<template v-slot="scope">
<span>
{{
scope.row.reportType === 0
? parseTime(scope.row.coatingTime)
: '-'
}}
</span>
</template>
</el-table-column>
</el-table-column>
<el-table-column prop="lossN" label="镀膜" align="center">
<el-table-column prop="silkNum" label="投入数量" />
<el-table-column prop="silkTime" label="数据上报时间">
<template v-slot="scope">
<span>
{{
scope.row.reportType === 0
? parseTime(scope.row.silkTime)
: '-'
}}
</span>
</template>
</el-table-column>
</el-table-column>
<el-table-column prop="lossN" label="钢化" align="center">
<el-table-column prop="temperingNum" label="投入数量" />
<el-table-column prop="temperingTime" label="数据上报时间">
<template v-slot="scope">
<span>
{{
scope.row.reportType === 0
? parseTime(scope.row.temperingTime)
: '-'
}}
</span>
</template>
</el-table-column>
</el-table-column>
<el-table-column prop="lossN" label="包装" align="center">
<el-table-column prop="packingNum" label="投入数量" />
<el-table-column prop="packingTime" label="数据上报时间">
<template v-slot="scope">
<span>
{{
scope.row.reportType === 0
? parseTime(scope.row.packingTime)
: '-'
}}
</span>
</template>
</el-table-column>
</el-table-column>
<!-- <el-table-column prop="lossRatio" label="不良率/%">
<template v-slot="scope">
<span>
{{
scope.row.lossRatio != null ? scope.row.lossRatio.toFixed(2) : '-'
}}
</span>
</template>
</el-table-column>
<el-table-column prop="outputRatio" label="投入产出率/%">
<template v-slot="scope">
<span>
{{
scope.row.outputRatio != null
? scope.row.outputRatio.toFixed(2)
: '-'
}}
</span>
</template>
</el-table-column>
<el-table-column prop="processingRatio" label="加工成品率/%">
<template v-slot="scope">
<span>
{{
scope.row.processingRatio != null
? scope.row.processingRatio.toFixed(2)
: '-'
}}
</span>
</template>
</el-table-column>
<el-table-column prop="lossD" label="不良详情" align="center">
<el-table-column prop="original" label="原片" align="center">
<el-table-column prop="originalLossNum" label="原片不良/片" />
<el-table-column prop="originalLossArea" label="原片不良/m²">
<template v-slot="scope">
<span>
{{
scope.row.originalLossArea != null
? scope.row.originalLossArea.toFixed(2)
: '-'
}}
</span>
</template>
</el-table-column>
</el-table-column>
<el-table-column prop="edge" label="磨边" align="center">
<el-table-column prop="edgeLossNum" label="磨边不良/片" />
<el-table-column prop="edgeLossArea" label="磨边不良/m²">
<template v-slot="scope">
<span>
{{
scope.row.edgeLossArea != null
? scope.row.edgeLossArea.toFixed(2)
: '-'
}}
</span>
</template>
</el-table-column>
</el-table-column>
<el-table-column prop="drill" label="打孔" align="center">
<el-table-column prop="drillLossNum" label="打孔不良/片" />
<el-table-column prop="drillLossArea" label="打孔不良/m²">
<template v-slot="scope">
<span>
{{
scope.row.drillLossArea != null
? scope.row.drillLossArea.toFixed(2)
: '-'
}}
</span>
</template>
</el-table-column>
</el-table-column>
<el-table-column prop="coating" label="镀膜" align="center">
<el-table-column prop="coatingLossNum" label="镀膜不良/片" />
<el-table-column prop="coatingLossArea" label="镀膜不良/m²">
<template v-slot="scope">
<span>
{{
scope.row.coatingLossArea != null
? scope.row.coatingLossArea.toFixed(2)
: '-'
}}
</span>
</template>
</el-table-column>
</el-table-column>
<el-table-column prop="silk" label="丝印" align="center">
<el-table-column prop="silkLossNum" label="丝印不良/片" />
<el-table-column prop="silkLossArea" label="丝印不良/m²">
<template v-slot="scope">
<span>
{{
scope.row.silkLossArea != null
? scope.row.silkLossArea.toFixed(2)
: '-'
}}
</span>
</template>
</el-table-column>
</el-table-column>
<el-table-column prop="tempering" label="钢化" align="center">
<el-table-column prop="temperingLossNum" label="钢化不良/片" />
<el-table-column prop="temperingLossArea" label="钢化不良/m²">
<template v-slot="scope">
<span>
{{
scope.row.temperingLossArea != null
? scope.row.temperingLossArea.toFixed(2)
: '-'
}}
</span>
</template>
</el-table-column>
</el-table-column> -->
<el-table-column prop="down" label="下片" align="center">
<el-table-column prop="downNum" label="成品数量" />
<el-table-column prop="scrapNum" label="废片数量" />
<el-table-column prop="inputOutputRate" label="投入产出率" />
<el-table-column prop="yieldRate" label="加工成品率" />
</el-table-column>
</el-table-column>
</el-table>
</div>
}"
border
:span-method="arraySpanMethod"
v-loading="dataListLoading"
style="width: 100%"
ref="dataList">
<el-table-column prop="lineName" label="产线" align="center" />
<el-table-column
prop="sizes"
width="105"
showOverflowtooltip
align="center"
label="规格" />
<el-table-column prop="process" label="产品工艺" align="center" />
<el-table-column prop="inputN" label="投入" align="center">
<el-table-column prop="inputNum" label="投入数量/片" />
<el-table-column prop="inputArea" label="投入面积/m²">
<template v-slot="scope">
<span>
{{
scope.row.inputArea != null
? scope.row.inputArea.toFixed(2)
: '-'
}}
</span>
</template>
</el-table-column>
</el-table-column>
<el-table-column prop="outputN" label="产出" align="center">
<el-table-column prop="outputNum" label="产出数量/片" />
<el-table-column prop="outputArea" label="产出面积/m²">
<template v-slot="scope">
<span>
{{
scope.row.outputArea != null
? scope.row.outputArea.toFixed(2)
: '-'
}}
</span>
</template>
</el-table-column>
</el-table-column>
<el-table-column prop="lossN" label="不良" align="center">
<el-table-column prop="lossNum" label="不良数量/片" />
<el-table-column prop="lossArea" label="不良面积/m²">
<template v-slot="scope">
<span>
{{
scope.row.lossArea != null ? scope.row.lossArea.toFixed(2) : '-'
}}
</span>
</template>
</el-table-column>
</el-table-column>
<el-table-column prop="lossRatio" label="不良率/%">
<template v-slot="scope">
<span>
{{
scope.row.lossRatio != null ? scope.row.lossRatio.toFixed(2) : '-'
}}
</span>
</template>
</el-table-column>
<el-table-column prop="outputRatio" label="投入产出率/%">
<template v-slot="scope">
<span>
{{
scope.row.outputRatio != null
? scope.row.outputRatio.toFixed(2)
: '-'
}}
</span>
</template>
</el-table-column>
<el-table-column prop="processingRatio" label="加工成品率/%">
<template v-slot="scope">
<span>
{{
scope.row.processingRatio != null
? scope.row.processingRatio.toFixed(2)
: '-'
}}
</span>
</template>
</el-table-column>
<el-table-column prop="lossD" label="不良详情" align="center">
<el-table-column prop="original" label="原片" align="center">
<el-table-column prop="originalLossNum" label="原片不良/片" />
<el-table-column prop="originalLossArea" label="原片不良/m²">
<template v-slot="scope">
<span>
{{
scope.row.originalLossArea != null
? scope.row.originalLossArea.toFixed(2)
: '-'
}}
</span>
</template>
</el-table-column>
</el-table-column>
<el-table-column prop="edge" label="磨边" align="center">
<el-table-column prop="edgeLossNum" label="磨边不良/片" />
<el-table-column prop="edgeLossArea" label="磨边不良/m²">
<template v-slot="scope">
<span>
{{
scope.row.edgeLossArea != null
? scope.row.edgeLossArea.toFixed(2)
: '-'
}}
</span>
</template>
</el-table-column>
</el-table-column>
<el-table-column prop="drill" label="打孔" align="center">
<el-table-column prop="drillLossNum" label="打孔不良/片" />
<el-table-column prop="drillLossArea" label="打孔不良/m²">
<template v-slot="scope">
<span>
{{
scope.row.drillLossArea != null
? scope.row.drillLossArea.toFixed(2)
: '-'
}}
</span>
</template>
</el-table-column>
</el-table-column>
<el-table-column prop="coating" label="镀膜" align="center">
<el-table-column prop="coatingLossNum" label="镀膜不良/片" />
<el-table-column prop="coatingLossArea" label="镀膜不良/m²">
<template v-slot="scope">
<span>
{{
scope.row.coatingLossArea != null
? scope.row.coatingLossArea.toFixed(2)
: '-'
}}
</span>
</template>
</el-table-column>
</el-table-column>
<el-table-column prop="silk" label="丝印" align="center">
<el-table-column prop="silkLossNum" label="丝印不良/片" />
<el-table-column prop="silkLossArea" label="丝印不良/m²">
<template v-slot="scope">
<span>
{{
scope.row.silkLossArea != null
? scope.row.silkLossArea.toFixed(2)
: '-'
}}
</span>
</template>
</el-table-column>
</el-table-column>
<el-table-column prop="tempering" label="钢化" align="center">
<el-table-column prop="temperingLossNum" label="钢化不良/片" />
<el-table-column prop="temperingLossArea" label="钢化不良/m²">
<template v-slot="scope">
<span>
{{
scope.row.temperingLossArea != null
? scope.row.temperingLossArea.toFixed(2)
: '-'
}}
</span>
</template>
</el-table-column>
</el-table-column>
<el-table-column prop="packing" label="包装" align="center">
<el-table-column prop="packingLossNum" label="包装不良/片" />
<el-table-column prop="packingLossArea" label="包装不良/m²">
<template v-slot="scope">
<span>
{{
scope.row.packingLossArea != null
? scope.row.packingLossArea.toFixed(2)
: '-'
}}
</span>
</template>
</el-table-column>
</el-table-column>
</el-table-column>
</el-table>
</div>
</template>
<script>
import { getTeamReportPageDet, exportGroupProductReportExcel } from '@/api/core/monitoring/auto';
import { getTeamReportPageDet } from '@/api/core/monitoring/auto';
import * as XLSX from 'xlsx';
import FileSaver from 'file-saver';
@@ -231,8 +215,7 @@ export default {
components: {},
data() {
return {
tableData: [],
id:null,
tableData: [],
dataListLoading: false,
formConfig: [
{
@@ -250,8 +233,7 @@ export default {
mounted() {},
methods: {
// 获取数据列表
init(id) {
this.id = id
init(id) {
this.dataListLoading = true;
getTeamReportPageDet(id).then((response) => {
this.tableData = response.data?.map((item, index) => {
@@ -277,17 +259,17 @@ export default {
this.dataListLoading = false;
});
},
// arraySpanMethod({ row, column, rowIndex, columnIndex }) {
// if (row.isSummaryReport) {
// if (columnIndex === 0) {
// return [1, 3];
// } else if (columnIndex === 1) {
// return [0, 0];
// } else if (columnIndex === 2) {
// return [0, 0];
// }
// }
// },
arraySpanMethod({ row, column, rowIndex, columnIndex }) {
if (row.isSummaryReport) {
if (columnIndex === 0) {
return [1, 3];
} else if (columnIndex === 1) {
return [0, 0];
} else if (columnIndex === 2) {
return [0, 0];
}
}
},
buttonClick(val) {
switch (val.btnName) {
@@ -298,33 +280,27 @@ export default {
console.log(val);
}
},
handleExport() {
this.$modal.confirm('是否确认导出').then(() => {
return exportGroupProductReportExcel({id:this.id});
}).then(response => {
console.log(response)
this.$download.excel(response, '班组生产报表-详情.xls');
}).catch(() => {})
// let tables = document.querySelector('#detail').cloneNode(true);
// let exportTable = XLSX.utils.table_to_book(tables);
handleExport() {
let tables = document.querySelector('#detail').cloneNode(true);
let exportTable = XLSX.utils.table_to_book(tables);
// var exportTableOut = XLSX.write(exportTable, {
// bookType: 'xlsx',
// bookSST: true,
// type: 'array',
// });
// // sheetjs.xlsx为导出表格的标题名称
// try {
// FileSaver.saveAs(
// new Blob([exportTableOut], {
// type: 'application/octet-stream',
// }),
// '班组生产报表-详情.xlsx'
// );
// } catch (e) {
// if (typeof console !== 'undefined') console.log(e, exportTableOut);
// }
// return exportTableOut;
var exportTableOut = XLSX.write(exportTable, {
bookType: 'xlsx',
bookSST: true,
type: 'array',
});
// sheetjs.xlsx为导出表格的标题名称
try {
FileSaver.saveAs(
new Blob([exportTableOut], {
type: 'application/octet-stream',
}),
'班组生产报表-详情.xlsx'
);
} catch (e) {
if (typeof console !== 'undefined') console.log(e, exportTableOut);
}
return exportTableOut;
},
},
};

View File

@@ -74,7 +74,7 @@ const tableProps = [
fixed: true
},
{
prop: 'reportDate',
prop: 'reportName',
label: '日期',
width: 180,
fixed: true
@@ -89,241 +89,211 @@ const tableProps = [
label: '班组',
fixed: true
},
{
prop: 'edgeNum',
label: '磨边',
fixed: true
}, {
prop: 'drillOrCoating',
label: '打孔/丝印',
fixed: true
}, {
prop: 'silkNum',
label: '镀膜',
fixed: true
}, {
prop: 'temperingNum',
label: '钢化',
fixed: true
}, {
prop: 'packingNum',
label: '包装',
fixed: true
},
{
prop: 'inputN',
label: '下片',
label: '投入',
align: 'center',
children: [
{
prop: 'downNum',
label: '成品数量',
prop: 'inputNum',
label: '投入数量/片',
width:100
},
{
prop: 'scrapNum',
label: '废片数量',
prop: 'inputArea',
label: '投入面积/m²',
width:100
},
{
prop: 'inputOutputRate',
label: '投入产出率',
width: 100
},
{
prop: 'yieldRate',
label: '加工成品率',
width: 100
},
},
],
},
{
prop: 'outputN',
label: '产出',
align: 'center',
children: [
{
prop: 'outputNum',
label: '产出数量/片',
width:100
},
{
prop: 'outputArea',
label: '产出面积/㎡',
filter: (val) => (val != null ? val.toFixed(2) : '-'),
width:100
},
],
},
{
prop: 'lossN',
label: '不良',
align: 'center',
children: [
{
prop: 'lossNum',
label: '不良数量/片',
width:100
},
{
prop: 'lossArea',
label: '不良面积/㎡',
filter: (val) => (val != null ? val.toFixed(2) : '-'),
width:100
},
],
},
{
prop: 'lossRatio',
label: '不良率/%',
filter: (val) => (val != null ? val.toFixed(2) : '-'),
width:100
},
{
prop: 'outputRatio',
label: '投入产出率/%',
filter: (val) => (val != null ? val.toFixed(2) : '-'),
width:110
},
{
prop: 'processingRatio',
label: '加工成品率/%',
filter: (val) => (val != null ? val.toFixed(2) : '-'),
width:110
},
{
prop: 'lossD',
label: '不良详情',
align: 'center',
children: [
{
prop: 'original',
label: '原片',
align: 'center',
children: [
{
prop: 'originalLossNum',
label: '原片不良/片',
width:100
},
{
prop: 'originalLossArea',
label: '原片不良/㎡',
filter: (val) => (val != null ? val.toFixed(2) : '-'),
width:100
},
],
},
{
prop: 'edge',
label: '磨边',
align: 'center',
children: [
{
prop: 'edgeLossNum',
label: '磨边不良/片',
width:100
},
{
prop: 'edgeLossArea',
label: '磨边不良/㎡',
filter: (val) => (val != null ? val.toFixed(2) : '-'),
width:100
},
],
},
{
prop: 'drill',
label: '打孔',
align: 'center',
children: [
{
prop: 'drillLossNum',
label: '打孔不良/片',
width:100
},
{
prop: 'drillLossArea',
label: '打孔不良/㎡',
filter: (val) => (val != null ? val.toFixed(2) : '-'),
width:100
},
],
},
{
prop: 'coating',
label: '镀膜',
align: 'center',
children: [
{
prop: 'coatingLossNum',
label: '镀膜不良/片',
width:100
},
{
prop: 'coatingLossArea',
label: '镀膜不良/㎡',
filter: (val) => (val != null ? val.toFixed(2) : '-'),
width:100
},
],
},
{
prop: 'silk',
label: '丝印',
align: 'center',
children: [
{
prop: 'silkLossNum',
label: '丝印不良/片',
width:100
},
{
prop: 'silkLossArea',
label: '丝印不良/㎡',
filter: (val) => (val != null ? val.toFixed(2) : '-'),
width:100
},
],
},
{
prop: 'tempering',
label: '钢化',
align: 'center',
children: [
{
prop: 'temperingLossNum',
label: '钢化不良/片',
width:100
},
{
prop: 'temperingLossArea',
label: '钢化不良/㎡',
filter: (val) => (val != null ? val.toFixed(2) : '-'),
width:100
},
],
},
{
prop: 'packing',
label: '包装',
align: 'center',
children: [
{
prop: 'packingLossNum',
label: '包装不良/片',
width:100
},
{
prop: 'packingLossArea',
label: '包装不良/㎡',
filter: (val) => (val != null ? val.toFixed(2) : '-'),
width:100
},
],
},
],
},
// {
// prop: 'outputN',
// label: '产出',
// align: 'center',
// children: [
// {
// prop: 'outputNum',
// label: '产出数量/片',
// width:100
// },
// {
// prop: 'outputArea',
// label: '产出面积/㎡',
// filter: (val) => (val != null ? val.toFixed(2) : '-'),
// width:100
// },
// ],
// },
// {
// prop: 'lossN',
// label: '不良',
// align: 'center',
// children: [
// {
// prop: 'lossNum',
// label: '不良数量/片',
// width:100
// },
// {
// prop: 'lossArea',
// label: '不良面积/㎡',
// filter: (val) => (val != null ? val.toFixed(2) : '-'),
// width:100
// },
// ],
// },
// {
// prop: 'lossRatio',
// label: '不良率/%',
// filter: (val) => (val != null ? val.toFixed(2) : '-'),
// width:100
// },
// {
// prop: 'outputRatio',
// label: '投入产出率/%',
// filter: (val) => (val != null ? val.toFixed(2) : '-'),
// width:110
// },
// {
// prop: 'processingRatio',
// label: '加工成品率/%',
// filter: (val) => (val != null ? val.toFixed(2) : '-'),
// width:110
// },
// {
// prop: 'lossD',
// label: '不良详情',
// align: 'center',
// children: [
// {
// prop: 'original',
// label: '原片',
// align: 'center',
// children: [
// {
// prop: 'originalLossNum',
// label: '原片不良/片',
// width:100
// },
// {
// prop: 'originalLossArea',
// label: '原片不良/㎡',
// filter: (val) => (val != null ? val.toFixed(2) : '-'),
// width:100
// },
// ],
// },
// {
// prop: 'edge',
// label: '磨边',
// align: 'center',
// children: [
// {
// prop: 'edgeLossNum',
// label: '磨边不良/片',
// width:100
// },
// {
// prop: 'edgeLossArea',
// label: '磨边不良/㎡',
// filter: (val) => (val != null ? val.toFixed(2) : '-'),
// width:100
// },
// ],
// },
// {
// prop: 'drill',
// label: '打孔',
// align: 'center',
// children: [
// {
// prop: 'drillLossNum',
// label: '打孔不良/片',
// width:100
// },
// {
// prop: 'drillLossArea',
// label: '打孔不良/㎡',
// filter: (val) => (val != null ? val.toFixed(2) : '-'),
// width:100
// },
// ],
// },
// {
// prop: 'coating',
// label: '镀膜',
// align: 'center',
// children: [
// {
// prop: 'coatingLossNum',
// label: '镀膜不良/片',
// width:100
// },
// {
// prop: 'coatingLossArea',
// label: '镀膜不良/㎡',
// filter: (val) => (val != null ? val.toFixed(2) : '-'),
// width:100
// },
// ],
// },
// {
// prop: 'silk',
// label: '丝印',
// align: 'center',
// children: [
// {
// prop: 'silkLossNum',
// label: '丝印不良/片',
// width:100
// },
// {
// prop: 'silkLossArea',
// label: '丝印不良/㎡',
// filter: (val) => (val != null ? val.toFixed(2) : '-'),
// width:100
// },
// ],
// },
// {
// prop: 'tempering',
// label: '钢化',
// align: 'center',
// children: [
// {
// prop: 'temperingLossNum',
// label: '钢化不良/片',
// width:100
// },
// {
// prop: 'temperingLossArea',
// label: '钢化不良/㎡',
// filter: (val) => (val != null ? val.toFixed(2) : '-'),
// width:100
// },
// ],
// },
// {
// prop: 'packing',
// label: '包装',
// align: 'center',
// children: [
// {
// prop: 'packingLossNum',
// label: '包装不良/片',
// width:100
// },
// {
// prop: 'packingLossArea',
// label: '包装不良/㎡',
// filter: (val) => (val != null ? val.toFixed(2) : '-'),
// width:100
// },
// ],
// },
// ],
// },
];
export default {
@@ -339,22 +309,17 @@ export default {
listQuery: {
reportType: 1,
pageSize: 10,
pageNo: 1,
startTime: undefined,
endTime: undefined,
pageNo: 1,
total: 1,
},
fileName: '',
dataListLoading: false,
tableProps,
tableBtn: [
this.$auth.hasPermi(`monitoring:group-off:update`)
? {
type: 'eq',
btnName: '详情',
}
: undefined,
tableBtn: [
{
type: 'eq',
btnName: '详情',
},
].filter((v) => v),
showData: [],
tableData: [],
@@ -374,19 +339,15 @@ export default {
{
type: 'select',
label: '报表类型',
selectOptions: [
{
id: 0,
name: '班',
},
selectOptions: [
{
id: 1,
name: '日',
},
// {
// id: 2,
// name: '周',
// },
{
id: 2,
name: '周',
},
{
id: 3,
name: '月',
@@ -403,16 +364,15 @@ export default {
type: 'datePicker',
label: '时间范围',
dateType: 'daterange',
format: 'yyyy-MM-dd',
valueFormat: 'timestamp',
format: 'yyyy-MM-dd',
valueFormat: 'timestamp',
rangeSeparator: '-',
startPlaceholder: '开始时间',
endPlaceholder: '结束时间',
param: 'timeVal',
},
{
type: this.$auth.hasPermi('monitoring:group-off:query') ? 'button' : '',
type: 'button',
btnName: '查询',
name: 'search',
color: 'primary',
@@ -421,8 +381,8 @@ export default {
type: 'separate',
},
{
type: this.$auth.hasPermi('monitoring:group-off:export') ? 'button' : '',
// type: 'button',
// type: this.$auth.hasPermi('base:factory:export') ? 'button' : '',
type: 'button',
btnName: '导出',
name: 'export',
color: 'warning',
@@ -442,9 +402,7 @@ export default {
// 设置为23:59:59
const end = new Date(yesterday.getTime());
end.setHours(23, 59, 59, 59);
this.listQuery.startTime = yesterday.getTime(), [end.getTime()];
this.listQuery.endTime = end.getTime()
this.listQuery.reportStartTime = [yesterday.getTime(),end.getTime()];
this.$nextTick(() => {
this.$refs.searchBarForm.formInline.timeVal = [yesterday.getTime(),end.getTime()];
});
@@ -503,12 +461,9 @@ export default {
this.listQuery.factoryId = val.factoryId || undefined;
this.listQuery.teamId = val.teamId || undefined;
this.listQuery.reportType = val.reportType || undefined;
this.listQuery.startTime = val.timeVal
? val.timeVal[0]
: undefined;
this.listQuery.endTime = val.timeVal
? val.timeVal[1]
: undefined;
this.listQuery.reportStartTime = val.timeVal
? val.timeVal
: undefined;
this.getDataList();
break;
case 'export':
@@ -520,10 +475,8 @@ export default {
},
// 获取数据列表
getDataList() {
this.dataListLoading = true;
console.log(this.listQuery);
const arr = ['班', '日', '', '月', '年']; // 索引0对应班1对应日3对应月4对应年索引2留空
this.dataListLoading = true;
const arr = ['日', '周', '月', '年'];
this.urlOptions.getDataListURL(this.listQuery).then((response) => {
if (!response.data.list) {
this.showData = [];
@@ -531,8 +484,7 @@ export default {
return;
}
this.tableData = response.data?.list.map((item, index) => {
item.reportType = arr[item.reportType] || item.reportType;
item.drillOrCoating = item.drillNum + "/" + item.coatingNum
item.reportType = arr[item.reportType - 1];
item.originalLossNum = item.original?.lossNum;
item.originalLossArea = item.original?.lossArea;
item.edgeLossNum = item.edge?.lossNum;
@@ -556,7 +508,7 @@ export default {
},
handleClick(val) {
this.addOrUpdateVisible = true;
const time = val.data.timeVal ? parseTime(val.data.timeVal[0]) + '-' + parseTime(val.data.timeVal[1]) : '- '
const time = val.data.reportName?val.data.reportName:'- '
const teamName = val.data.teamName?val.data.teamName:'- '
const teamLeader = val.data.teamLeader?val.data.teamLeader:'- '
this.addOrEditTitle =

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.6 KiB

View File

@@ -0,0 +1,101 @@
<template>
<ModelBox name='1-3'>
<div class='count-box'>
<div class='count-tip-box'>
<div class='item'>
<p class='num'>2,344</p>
<p class='title'>本班合计</p>
</div>
<div class='split'></div>
<div class='item'>
<p class='num'>2,344</p>
<p class='title'>本日合计</p>
</div>
</div>
<dv-scroll-board :config="config" style="width:580px;height:180px;margin-top: 10px;" class='count-table'/>
<span class='split-line' style='left: 70px;'></span>
<span class='split-line' style='left: 195px;'></span>
<span class='split-line' style='left: 320px;'></span>
<span class='split-line' style='left: 445px;'></span>
</div>
</ModelBox>
</template>
<script>
import ModelBox from './ModelBox.vue';
export default {
name: 'Count',
components: {
ModelBox
},
data() {
return {
config:{
header: ['<span style="color:#000;">序号</span>', '<span style="color:#000;">产线</span>', '<span style="color:#000;">本班</span>', '<span style="color:#000;">本日</span>', '<span style="color:#000;">一托玻璃数量</span>'],
headerHeight: 30,
headerBGC: '#E8EDF8',
oddRowBGC:'#E8EDF8',
evenRowBGC:'#fff',
rowNum: 5,
columnWidth: [70, 125, 125, 125, 130],
align : ['center', 'center', 'center', 'center', 'center'],
data: [
['<span style="color:#000;">1</span>', '<span style="color:#000;">A1</span>', '<span style="color:#000;">23</span>', '<span style="color:#000;">234</span>', '<span style="color:#000;">234</span>'],
['<span style="color:#000;">2</span>', '<span style="color:#000;">A2</span>', '<span style="color:#000;">13</span>', '<span style="color:#000;">234</span>','<span style="color:#000;">234</span>'],
['<span style="color:#000;">3</span>', '<span style="color:#000;">A3</span>', '<span style="color:#000;">24</span>', '<span style="color:#000;">234</span>', '<span style="color:#000;">234</span>'],
['<span style="color:#000;">4</span>', '<span style="color:#000;">A4</span>', '<span style="color:#000;">45</span>', '<span style="color:#000;">234</span>', '<span style="color:#000;">234</span>'],
['<span style="color:#000;">5</span>', '<span style="color:#000;">A5</span>', '<span style="color:#000;">55</span>', '<span style="color:#000;">234</span>', '<span style="color:#000;">234</span>']
]
}
}
},
methods: {
init() {
}
}
}
</script>
<style lang='scss' scoped>
.count-box {
position: relative;
.count-tip-box {
margin-bottom: 20px;
.split {
width: 2px;
height: 40px;
background: #CDD3DF;
display: inline-block;
}
.item {
display: inline-block;
width: 290px;
text-align: center;
p{
margin: 0;
}
.num {
font-weight: 500;
font-size: 28px;
color: #155EFF;
margin-bottom: 5px;
}
.title {
font-size: 14px;
color: rgba(0,0,0,0.5);
line-height: 14px;
}
}
}
.count-table {
box-shadow: 0px 2px 4px 0px #D5DAE6;
}
.split-line {
position: absolute;
top: 77px;
width: 1px;
height: 180px;
background: #CDD3DF;
}
}
</style>

View File

@@ -0,0 +1,60 @@
<template>
<ModelBox name='1-2'>
<div class='eq-alarm'>
<dv-scroll-board :config="config" style="width:580px;height:250px;margin-top: 10px;" />
<span class='split-line' style='left: 66px;'></span>
<span class='split-line' style='left: 226px;'></span>
<span class='split-line' style='left: 366px;'></span>
</div>
</ModelBox>
</template>
<script>
import ModelBox from './ModelBox.vue';
export default {
name: 'EqAlarm',
components: {
ModelBox
},
data() {
return {
config:{
header: ['<span style="color:#000;">序号</span>', '<span style="color:#000;">报警时间</span>', '<span style="color:#000;">报警设备</span>', '<span style="color:#000;">报警内容</span>'],
headerHeight: 25,
headerBGC: '#E8EDF8',
oddRowBGC:'#E8EDF8',
evenRowBGC:'#fff',
rowNum: 8,
columnWidth: [66, 160, 140, 214],
align : ['center', 'center', 'center', 'center'],
data: [
['<span style="color:#000;">1</span>', '<span style="color:#000;">2014/12/28 19:20</span>', '<span style="color:#000;">A-1打孔机</span>', '<span style="color:#000;">各种报警内容</span>'],
['<span style="color:#000;">2</span>', '<span style="color:#000;">2014/12/28 19:20</span>', '<span style="color:#000;">A-2打孔机</span>', '<span style="color:#000;">各种报警内容</span>'],
['<span style="color:#000;">3</span>', '<span style="color:#000;">2014/12/28 19:20</span>', '<span style="color:#000;">A-2打孔机</span>', '<span style="color:#000;">各种报警内容</span>'],
['<span style="color:#000;">4</span>', '<span style="color:#000;">2014/12/28 19:20</span>', '<span style="color:#000;">A-2打孔机</span>', '<span style="color:#000;">各种报警内容</span>'],
['<span style="color:#000;">5</span>', '<span style="color:#000;">2014/12/28 19:20</span>', '<span style="color:#000;">A-2打孔机</span>', '<span style="color:#000;">各种报警内容</span>'],
['<span style="color:#000;">6</span>', '<span style="color:#000;">2014/12/28 19:20</span>', '<span style="color:#000;">A-2打孔机</span>', '<span style="color:#000;">各种报警内容</span>'],
['<span style="color:#000;">7</span>', '<span style="color:#000;">2014/12/28 19:20</span>', '<span style="color:#000;">A-2打孔机</span>', '<span style="color:#000;">各种报警内容</span>'],
['<span style="color:#000;">8</span>', '<span style="color:#000;">2014/12/28 19:20</span>', '<span style="color:#000;">A-2打孔机</span>', '<span style="color:#000;">各种报警内容</span>']
]
}
}
},
methods: {
init() {
}
}
}
</script>
<style lang='scss' scoped>
.eq-alarm {
position: relative;
.split-line {
position: absolute;
top: 0;
width: 1px;
height: 250px;
background: #CDD3DF;
}
}
</style>

View File

@@ -0,0 +1,60 @@
<template>
<div class='header'>
<span class='title'>生产驾驶舱</span>
<span class='time'>刷新时间{{time}}</span>
<svg-icon icon-class="refresh" class='refresh-btn' @click='refreshData'/>
<el-button type="text" class="screen-btn" @click="changeFullScreen">
<svg-icon v-if="isFullScreen" icon-class="unFullscreen" />
<svg-icon v-else icon-class="fullscreen" />
</el-button>
</div>
</template>
<script>
import moment from 'moment/moment';
export default {
props: {
isFullScreen: false
},
data() {
return {
time: moment().format('HH:mm:ss YYYY.MM.DD')
}
},
methods: {
changeFullScreen() {
this.$emit('screenfullChange');
},
refreshData() {
this.time = moment().format('HH:mm:ss YYYY.MM.DD')
}
}
}
</script>
<style lang='scss' scoped>
.header {
position: relative;
.title {
font-size: 28px;
color:'#000';
letter-spacing: 2px;
margin-right: 10px;
}
.time {
font-size: 14px;
color:'#000';
margin-right: 8px;
}
.refresh-btn {
font-size: 16px;
cursor: pointer;
}
.screen-btn {
position: absolute;
right: 15px;
top: 50%;
transform: translateY(-50%);
font-size: 32px;
}
}
</style>

View File

@@ -0,0 +1,130 @@
<template>
<ModelBox name='2-2'>
<div class='line-container'>
<div class='table-box'>
<div class='title'>本班次</div>
<dv-scroll-board :config="config" style="width:600px;height:242px;margin-top: 10px;"/>
<span class='split-line' style='left: 66px;'></span>
<span class='split-line' style='left: 186px;'></span>
<span class='split-line' style='left: 311px;'></span>
<span class='split-line' style='left: 437px;'></span>
</div>
<div class='table-box'>
<div class='title'>本日</div>
<dv-scroll-board :config="config" style="width:600px;height:242px;margin-top: 10px;"/>
<span class='split-line' style='left: 66px;'></span>
<span class='split-line' style='left: 186px;'></span>
<span class='split-line' style='left: 311px;'></span>
<span class='split-line' style='left: 437px;'></span>
</div>
<div class='table-box'>
<div class='title'>本周</div>
<dv-scroll-board :config="config" style="width:600px;height:242px;margin-top: 10px;"/>
<span class='split-line' style='left: 66px;'></span>
<span class='split-line' style='left: 186px;'></span>
<span class='split-line' style='left: 311px;'></span>
<span class='split-line' style='left: 437px;'></span>
</div>
<div class='table-box'>
<div class='title'>本月</div>
<dv-scroll-board :config="config" style="width:600px;height:242px;margin-top: 10px;"/>
<span class='split-line' style='left: 66px;'></span>
<span class='split-line' style='left: 186px;'></span>
<span class='split-line' style='left: 311px;'></span>
<span class='split-line' style='left: 437px;'></span>
</div>
</div>
</ModelBox>
</template>
<script>
import ModelBox from './ModelBox.vue';
export default {
name: 'LineInpurAndOutput',
components: {
ModelBox
},
data() {
return {
config:{
header: ['<span style="color:#000;">序号</span>', '<span style="color:#000;">工段</span>', '<span style="color:#000;">投入数量/片</span>', '<span style="color:#000;">产出数量/片</span>','<span style="color:#000;">产出率/%</span>'],
headerHeight: 25,
headerBGC: '#E8EDF8',
oddRowBGC:'#E8EDF8',
evenRowBGC:'#fff',
rowNum: 8,
columnWidth: [66, 120, 125, 126, 174],
align : ['center', 'center', 'center', 'center', 'center'],
data: []
}
}
},
mounted() {
this.getData()
},
methods: {
getData() {
let arr1 = []
let arr2 = []
let data = [
[1,'A1-磨边',234344,234333,100],
[2,'A1-磨边',234344,234333,10],
[3,'A1-磨边',234344,234333,96],
[4,'A1-磨边',234344,234333,20],
[5,'A1-磨边',234344,234333,40],
[6,'A1-磨边',234344,234333,90],
[7,'A1-磨边',234344,234333,80],
[8,'A1-磨边',234344,234333,80],
]
for (let i =0; i < data.length; i++) {
arr1.push(`<span style="color:#000;">${data[i][0]}</span>`)
arr1.push(`<span style="color:#000;">${data[i][1]}</span>`)
arr1.push(`<span style="color:#000;">${data[i][2]}</span>`)
arr1.push(`<span style="color:#000;">${data[i][3]}</span>`)
arr1.push(`<div style="width:136px; margin:0px;">
<div style="display:inline-block;height:8px; background:#D8DEEB; border-radius:4px; overflow:hidden;text-align:left;width:90px">
<div style="width:${data[i][4]}%; height:100%; background:#0B58FF;border-radius:4px;"></div>
</div>
<span style="display:inline-block;margin-left:10px; color:#000; font-size:14px;">${data[i][4]}%</span>
</div>`)
arr2.push(arr1)
arr1 = []
}
this.config.data = arr2
}
}
}
</script>
<style lang='scss' scoped>
.line-container {
display: flex;
height: 600px;
justify-content: space-between;
align-content: space-between;
flex-wrap: wrap;
.table-box {
width: 601px;
height: 300px;
position: relative;
padding-top: 16px;
.title {
width: 271px;
height: 27px;
line-height: 27px;
font-size: 20px;
color: #000000;
letter-spacing: 4px;
text-align: center;
background-image: url(../assets/img/title-bg.png);
background-size: 100% 100%;
margin: 0 auto;
}
.split-line {
position: absolute;
top: 53px;
width: 1px;
height: 242px;
background: #CDD3DF;
}
}
}
</style>

View File

@@ -0,0 +1,165 @@
<template>
<ModelBox name='3-1'>
<div class='line-rate'>
<div class='legend-box'>
<div class='legend-item' v-for='(item, index) in legendArr' :key='index'>
<span class='dot' :style='{backgroundColor: item.color,"--dot-color": item.color}'></span>
<span class='name'>{{item.name}}</span>
</div>
</div>
<div id='lineRate' style='width: 584px; height: 270px;'></div>
</div>
</ModelBox>
</template>
<script>
import * as echarts from 'echarts';
import ModelBox from './ModelBox.vue';
export default {
name: 'LineRate',
components: {
ModelBox
},
data() {
return {
legendArr:[
{color:'#FFCE6A', name:'A1'},
{color:'#21CECD', name:'A2'},
{color:'#77B4FD', name:'A3'},
{color:'#29BDFA', name:'A4'},
{color:'#5A7DDA', name:'A5'},
{color:'#FFB49D', name:'A6'},
{color:'#C5A6FC', name:'A7'},
{color:'#7164FF', name:'A8'},
{color:'#98B0C7', name:'A9'},
{color:'#5D7092', name:'A10'}
]
}
},
mounted() {
this.getChart()
},
methods: {
init() {
},
getChart() {
var chartDom = document.getElementById('lineRate');
var myChart = echarts.init(chartDom);
var option;
option = {
color: ['#FFCE6A', '#21CECD', '#77B4FD', '#29BDFA', '#5A7DDA', '#FFB49D', '#C5A6FC', '#7164FF', '#98B0C7', '#5D7092'],
tooltip: {
trigger: 'axis'
},
grid: {
top: 32,
left: 10,
right: 15,
bottom: 5,
containLabel: true
},
xAxis: {
type: 'category',
boundaryGap: false,
axisLine: {
show:true,
lineStyle:{
color: 'rgba(0,0,0,0.45)'
}
},
data: ['6:00', '7:00', '8:00', '9:00', '10:00', '11:00', '12:00'],
},
yAxis: {
type: 'value',
axisLabel: {
formatter: '{value}%'
},
axisLine: {
show:false,
lineStyle:{
color: 'rgba(0,0,0,0.45)'
}
}
},
series: [
{
name: 'A1',
type: 'line',
symbol: 'circle',
symbolSize: 6,
data: [82, 13, 10, 33, 90, 23, 71]
},
{
name: 'A2',
type: 'line',
symbol: 'circle',
symbolSize: 6,
data: [22, 38, 59, 23, 99, 33, 31]
},
{
name: 'A3',
type: 'line',
symbol: 'circle',
symbolSize: 6,
data: [15, 43, 20, 95, 89, 33, 41]
},
{
name: 'A4',
type: 'line',
symbol: 'circle',
symbolSize: 6,
data: [32, 33, 30, 33, 39, 33, 32]
},
{
name: 'A5',
type: 'line',
symbol: 'circle',
symbolSize: 6,
data: [82, 93, 90, 93, 29, 33, 32]
}
]
};
option && myChart.setOption(option);
}
}
}
</script>
<style lang='scss' scoped>
.line-rate {
position: relative;
.legend-box {
width: 280px;
height: 35px;
position: absolute;
right: 0;
top:-20px;
display: flex;
flex-flow: row wrap;
.legend-item {
width: 55px;
.dot {
display: inline-block;
width: 8px;
height: 8px;
border-radius: 50%;
margin-right: 8px;
position: relative;
}
.dot::before {
content: '';
display: inline-block;
width: 14px;
height: 2px;
background-color: var(--dot-color);
position: absolute;
top:3px;
left: -3px;
}
.name{
font-size: 14px;
color: #8C8C8C;
}
}
}
}
</style>

View File

@@ -0,0 +1,163 @@
<template>
<ModelBox name='1-1'>
<div class='loss-sum'>
<SwitchBtn class='switch-btn' @chooseBtn='chooseBtn'/>
<div id='lossSum' style='width: 584px; height: 270px;'></div>
</div>
</ModelBox>
</template>
<script>
import * as echarts from 'echarts';
import ModelBox from './ModelBox.vue';
import SwitchBtn from './SwitchBtn.vue';
export default {
name: 'LossSum',
components: {
ModelBox,
SwitchBtn
},
data() {
return {
}
},
mounted() {
this.getChart()
},
methods: {
getChart() {
var chartDom = document.getElementById('lossSum');
var myChart = echarts.init(chartDom);
var option;
option = {
color: ['#FFCE6A', '#96F0B1', '#63BDFF', '#288AFF', '#AC8BFF', '#7164FF', '#3B2BFD'],
legend: {
top:18,
right:5,
itemWidth:8,
itemHeight:8,
textStyle:{
color: '#8C8C8C',
fontSize: '14px'
}
},
grid: {
top: 50,
left: 10,
right: 5,
bottom: 5,
containLabel: true
},
tooltip: {
trigger: 'axis',
axisPointer: {
type: 'shadow'
},
formatter: function(params) {
let result = `<span>${params[0].name}</span><br/>`;
params.forEach(item => {
result += `<div style="display:flex;align-items:center;">
<span style="display:inline-block;width:8px;height:8px;background:${item.color};margin-right:5px;"></span>
<span style="display:inline-block;margin-right:20px;">${item.seriesName}</span>
<span style="font-weight:bold;">${item.value}</span><br/>
</div>`;
});
return result;
}
},
xAxis: {
type: 'category',
axisLine: {
show:true,
lineStyle:{
color: 'rgba(0,0,0,0.45)'
}
},
axisTick: {
show:false
},
data:['A1', 'A2', 'A3', 'A4', 'A5']
},
yAxis: {
name:'单位/片',
nameTextStyle:{
color: 'rgba(0,0,0,0.45)',
fontSize: '14px'
},
axisLine: {
show:true,
lineStyle:{
color: 'rgba(0,0,0,0.45)'
}
}
},
series: [
{
name: '包装',
type: 'bar',
barGap: '30%',
barWidth: 8,
data: [433, 858, 937, 926, 928]
},
{
name: '上片',
type: 'bar',
barGap: '30%',
barWidth: 8,
data: [831, 734, 551, 864, 810]
},
{
name: '磨边',
type: 'bar',
barGap: '30%',
barWidth: 8,
data: [864, 652, 825, 810, 810]
},
{
name: '打孔',
type: 'bar',
barGap: '30%',
barWidth: 8,
data: [724, 539, 391, 810, 810]
},
{
name: '丝印',
type: 'bar',
barGap: '30%',
barWidth: 8,
data: [831, 734, 551, 864, 810]
},
{
name: '镀膜',
type: 'bar',
barGap: '30%',
barWidth: 8,
data: [864, 652, 825, 810, 810]
},
{
name: '钢化',
type: 'bar',
barGap: '30%',
barWidth: 8,
data: [433, 858, 937, 926, 928]
},
]
};
option && myChart.setOption(option);
},
chooseBtn(val) {
console.log(val)
}
}
}
</script>
<style lang='scss' scoped>
.loss-sum {
position: relative;
.switch-btn {
position: absolute;
right: -3px;
top: -27px;
}
}
</style>

View File

@@ -0,0 +1,85 @@
<template>
<div class='model-box' :style='{width: width + "px", height: height + "px"}'>
<div>
<img :src="icon" alt="" width='24' height='24' class='icon'>
<span class='model-title'>{{title}}</span>
</div>
<slot></slot>
</div>
</template>
<script>
import img1 from './../assets/img/1-1.png';
import img2 from './../assets/img/1-2.png';
import img3 from './../assets/img/1-3.png';
import img4 from './../assets/img/2-1.png';
import img5 from './../assets/img/2-2.png';
import img6 from './../assets/img/3-1.png';
export default {
name: 'ModelBox',
props: {
name: {
type: String,
default: ''
}
},
data () {
return {
title: '',
icon:'',
width: 618,
height: 322
}
},
mounted () {
this.getTitle()
},
methods: {
getTitle () {
switch (this.name) {
case '1-1':
this.title = '工段损耗汇总'
this.icon = img1
break;
case '1-2':
this.title = '设备报警'
this.icon = img2
break;
case '1-3':
this.title = '托数统计'
this.icon = img3
break;
case '2-1':
this.title = '工段投入和产出'
this.icon = img4
break;
case '3-1':
this.title = '产线加工成品率'
this.icon = img6
break;
default:
this.title = '产线投入和产出'
this.icon = img5
this.width = 1253
this.height = 660
}
}
}
}
</script>
<style lang='scss' scoped>
.model-box {
background: #FFFFFF;
border-radius: 8px;
border: 1px solid #FFFFFF;
padding: 14px 16px;
.icon {
vertical-align: bottom;
margin-right: 5px;
}
.model-title{
font-size: 20px;
color: #000000;
line-height: 24px;
}
}
</style>

View File

@@ -0,0 +1,136 @@
<template>
<ModelBox name='2-1'>
<div class='section-content'>
<SwitchBtn class='switch-btn' @chooseBtn='chooseBtn'/>
<div class='section-list'>
<div
v-for='item in sectionArr'
:key='item.id'
class='section-item'
:class='{acvtive: sectionActive === item.id}'
@click='sectionActive = item.id'
>{{item.name}}</div>
</div>
<dv-scroll-board :config="config" style="width:583px;height:220px;" class='section-table'/>
<span class='split-line' style='left: 66px;'></span>
<span class='split-line' style='left: 186px;'></span>
<span class='split-line' style='left: 306px;'></span>
<span class='split-line' style='left: 426px;'></span>
</div>
</ModelBox>
</template>
<script>
import ModelBox from './ModelBox.vue';
import SwitchBtn from './SwitchBtn.vue';
import arrowGreen from '../assets/img/arrow-green.png';
import arrowRed from '../assets/img/arrow-red.png';
export default {
name: 'SectionInputAndOutput',
components: {
ModelBox,
SwitchBtn
},
data() {
return {
sectionArr:[
{id:'1', name:'上片'},
{id:'2', name:'磨边'},
{id:'3', name:'打孔'},
{id:'4', name:'丝印'},
{id:'5', name:'镀膜'},
{id:'6', name:'钢化'},
{id:'7', name:'包装'}
],
sectionActive: '1',
config:{
header: ['<span style="color:#000;">序号</span>', '<span style="color:#000;">工段</span>', '<span style="color:#000;">投入数量/片</span>', '<span style="color:#000;">产出数量/片</span>','<span style="color:#000;">产出率/%</span>'],
headerHeight: 25,
headerBGC: '#E8EDF8',
oddRowBGC:'#E8EDF8',
evenRowBGC:'#fff',
rowNum: 7,
columnWidth: [60, 120, 120, 120, 163],
align : ['center', 'center', 'center', 'center', 'center'],
data:[]
}
}
},
mounted() {
this.getData()
},
methods: {
getData() {
let arr1 = []
let arr2 = []
let data = [
[1,'A1-磨边',234344,234333,100],
[2,'A1-磨边',234344,234333,10],
[3,'A1-磨边',234344,234333,96],
[4,'A1-磨边',234344,234333,20],
[5,'A1-磨边',234344,234333,40],
[6,'A1-磨边',234344,234333,90],
[7,'A1-磨边',234344,234333,80],
]
for (let i =0; i < data.length; i++) {
arr1.push(`<span style="color:#000;">${data[i][0]}</span>`)
arr1.push(`<img src=${arrowRed} width=12 style="margin-right:2px" /><span style="color:#000;">${data[i][1]}</span>`)
arr1.push(`<span style="color:#000;">${data[i][2]}</span>`)
arr1.push(`<span style="color:#000;">${data[i][3]}</span>`)
arr1.push(`<div style="width:136px; margin:0px;">
<div style="display:inline-block;height:8px; background:#D8DEEB; border-radius:4px; overflow:hidden;text-align:left;width:90px">
<div style="width:${data[i][4]}%; height:100%; background:#0B58FF;border-radius:4px;"></div>
</div>
<span style="display:inline-block;margin-left:10px; color:#000; font-size:14px;">${data[i][4]}%</span>
</div>`)
arr2.push(arr1)
arr1 = []
}
this.config.data = arr2
},
chooseBtn(val) {
console.log(val)
}
}
}
</script>
<style lang='scss' scoped>
.section-content {
position: relative;
.switch-btn {
position: absolute;
right: -3px;
top: -27px;
}
.section-list {
display: flex;
flex-flow: row wrap;
justify-content: space-between;
padding-top: 20px;
cursor: pointer;
.section-item {
height: 24px;
line-height: 24px;
width: 81px;
text-align: center;
letter-spacing: 4px;
background-color: #E8EDF8;
}
.acvtive {
background-color: #0B58FF;
color: #fff;
}
}
.section-table {
margin-top: 2px;
box-shadow: 0px 2px 4px 0px #D5DAE6;
}
.split-line {
position: absolute;
top: 46px;
width: 1px;
height: 221px;
background: #CDD3DF;
}
}
</style>

View File

@@ -0,0 +1,57 @@
<template>
<div class='button-box'>
<span v-for='(item, index) in btnArr' :key='index' style='display: inline-block;'>
<span class='split' v-if='index > 0' :class='{ "split-active": activeIndex === index || activeIndex === index - 1}'>|</span>
<span class='button-item' @click='chooseBtn(index)' :class='{ "item-active": activeIndex === index}'>{{item}}</span>
</span>
</div>
</template>
<script>
export default {
name: 'SwitchBtn',
data() {
return {
activeIndex: 1,
btnArr: ['本班次', '本日', '本周', '本月']
}
},
methods: {
chooseBtn(index) {
this.activeIndex = index
this.$emit('chooseBtn', index)
}
}
}
</script>
<style lang='scss' scoped>
.button-box {
display: inline-block;
color: #000;
background: #F2F4F9;
border-radius: 40px;
cursor: pointer;
.button-item {
display: inline-block;
font-size: 16px;
height: 32px;
line-height: 32px;
padding: 0 12px;
}
.item-active {
color: #fff;
background: #0B58FF;
border-radius: 40px;
}
.split {
display: inline-block;
font-size: 14px;
height: 32px;
line-height: 32px;
vertical-align: top;
color: #686868;
}
.split-active {
color: #F2F4F9;
}
}
</style>

155
src/views/home/index.vue Normal file
View File

@@ -0,0 +1,155 @@
<template>
<div class='home-box'>
<div
id="homeComtainerB"
ref="homeComtainerB"
>
<div
class='home-comtainer'
id="homeComtainer"
style="width: 1920px; height: 1080px"
:style="{ transform: 'scale(' + scaleNum + ')' }"
>
<HomeHeader :isFullScreen="isFullScreen" @screenfullChange="screenfullChange"/>
<div class='line-one'>
<LossSum style='margin-right: 16px;'/>
<EqAlarm style='margin-right: 16px;'/>
<Count />
</div>
<div class='line-two'>
<div>
<SectionInputAndOutput style='margin-bottom: 16px;'/>
<LineRate />
</div>
<LineInpurAndOutput style='margin-left: 16px;'/>
</div>
</div>
</div>
</div>
</template>
<script>
import HomeHeader from './components/HomeHeader.vue';
import LossSum from './components/LossSum.vue';
import EqAlarm from './components/EqAlarm.vue';
import Count from './components/Count.vue';
import SectionInputAndOutput from './components/SectionInputAndOutput.vue';
import LineRate from './components/LineRate.vue';
import LineInpurAndOutput from './components/LineInpurAndOutput.vue';
import { debounce } from '@/utils/debounce';
import screenfull from 'screenfull';
export default {
name: 'Home',
components: {
HomeHeader,
LossSum,
EqAlarm,
Count,
SectionInputAndOutput,
LineRate,
LineInpurAndOutput
},
data() {
return {
isFullScreen: false,
scaleNum: 1
};
},
created() {
this.init();
},
mounted() {
this.boxReset();
window.addEventListener('resize', this.boxReset);
},
destroyed() {
window.removeEventListener('resize', this.boxReset);
},
methods: {
boxReset() {
debounce(() => {
this.resetSize();
}, 300)();
},
change() {
this.isFullScreen = screenfull.isFullscreen;
},
init() {
if (screenfull.isEnabled) {
screenfull.on('change', this.change);
}
},
destroy() {
if (screenfull.isEnabled) {
screenfull.off('change', this.change);
}
},
// 全屏
screenfullChange() {
if (!screenfull.isEnabled) {
this.$message({
message: 'you browser can not work',
type: 'warning',
});
return false;
}
screenfull.toggle(this.$refs.homeComtainerB);
},
resetSize() {
let coldContainerBox = document.getElementById('homeComtainer');
let rw = parseFloat(window.innerWidth);
let rh = parseFloat(window.innerHeight);
let bw = parseFloat(coldContainerBox.style.width);
let bh = parseFloat(coldContainerBox.style.height);
let wx = 0;
let hx = 0;
if (screenfull.isFullscreen) {
wx = rw / bw;
hx = rh / bh;
} else {
if (this.$store.state.app.sidebar.opened) {
wx = (rw - 280) / bw;
hx = (rh - 116) / bh;
} else {
wx = (rw - 85) / bw;
hx = (rh - 116) / bh;
}
}
this.scaleNum = wx;
},
},
watch: {
'$store.state.app.sidebar.opened': {
handler(newVal, oldVal) {
this.boxReset();
},
immediate: true
}
}
}
</script>
<style lang='scss' scoped>
.home-box {
min-height: calc(100vh - 56px - 72px);
min-width: calc(100vh - 280px);
background-color: #F2F4F9;
}
.home-comtainer{
background-color: #F2F4F9;
position: absolute;
transform-origin: 16px 8px;
top: 0px;
left: 0px;
padding-left: 16px;
padding-top: 10px;
overflow: hidden;
.line-one {
display: flex;
margin-top: 16px;
}
.line-two {
display: flex;
margin-top: 16px;
}
}
</style>

View File

@@ -1,123 +0,0 @@
<!--
* @Author: zwq
* @Date: 2021-11-18 14:16:25
* @LastEditors: DY
* @LastEditTime: 2023-10-16 11:16:48
* @Description:
-->
<template>
<el-form :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmit()" label-width="80px">
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="物料名称" prop="materialName">
<el-input v-model="dataForm.materialName" clearable placeholder="请输入物料名称" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="物料规格" prop="materialSize">
<el-input v-model="dataForm.materialSize" clearable placeholder="请输入物料规格" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="物料批次" prop="materialDate">
<el-input v-model="dataForm.materialDate" clearable placeholder="请输入物料批次" />
</el-form-item>
</el-col>
<!-- <el-form-item label="启用状态" prop="enabled">
<el-select
v-model="dataForm.enabled"
placeholder="请选择启用状态">
<el-option
v-for="dict in this.getDictDatas(DICT_TYPE.INFRA_BOOLEAN_STRING)"
:key="dict.value"
:label="dict.label"
:value="dict.value" />
</el-select>
</el-form-item> -->
<el-col :span="12">
<el-form-item label="入库数量" prop="materialNum">
<el-input v-model="dataForm.materialNum" clearable placeholder="请输入入库数量" />
</el-form-item>
</el-col>
</el-row>
</el-form>
</template>
<script>
import basicAdd from './../mixins/basic-add';
import {
createMaterialIssue,
} from '@/api/material/issue';
export default {
mixins: [basicAdd],
data() {
return {
urlOptions: {
isGetCode: false,
// codeURL: getCode,
createURL: createMaterialIssue,
// updateURL: updateFactory,
// infoURL: getFactory,
},
dataForm: {
id: undefined,
materialName: undefined,
materialNum: undefined,
materialDate: undefined,
materialSize: undefined,
operateStatus:undefined
},
dataRule: {
materialName: [{ required: true, message: "物料名称不能为空", trigger: "blur" }],
materialNum: [{ required: true, message: "数量不能为空", trigger: "blur" }],
}
};
},
methods: {
init(operateStatus) {
this.dataForm.operateStatus = operateStatus;
this.visible = true;
this.$nextTick(() => {
this.$refs["dataForm"].resetFields();
// if (this.dataForm.id) {
// this.urlOptions.infoURL(id).then(response => {
// this.dataForm = response.data;
// if (this.setData) {
// this.setDataForm()
// }
// });
// } else {
// if (this.urlOptions.isGetCode) {
// this.getCode()
// }
// }
});
},
dataFormSubmit() {
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

@@ -1,243 +0,0 @@
<template>
<div class="app-container">
<search-bar
:formConfigs="formConfig"
ref="searchBarForm"
@headBtnClick="buttonClick" />
<base-table
v-loading="dataListLoading"
:table-props="tableProps"
:page="listQuery.pageNo"
:limit="listQuery.pageSize"
:table-data="tableData">
<!-- <method-btn
v-if="tableBtn.length"
slot="handleBtn"
:width="120"
label="操作"
:method-list="tableBtn"
@clickBtn="handleClick" /> -->
</base-table>
<pagination
:limit.sync="listQuery.pageSize"
:page.sync="listQuery.pageNo"
:total="listQuery.total"
@pagination="getDataList" />
<base-dialog
:dialogTitle="addOrEditTitle"
:dialogVisible="addOrUpdateVisible"
@cancel="handleCancel"
@confirm="handleConfirm"
:before-close="handleCancel"
width="30%">
<add-or-update
ref="addOrUpdate"
@refreshDataList="successSubmit"></add-or-update>
</base-dialog>
</div>
</template>
<script>
import AddOrUpdate from './add-or-updata';
import basicPage from './../mixins/basic-page';
import { parseTime } from './../mixins/code-filter';
import {
getMaterialReceiptIssuePageData,
} from '@/api/material/issue';
const tableProps = [
{
prop: 'materialName',
label: '物料名称'
},
{
prop: 'materialSize',
label: '物料规格'
},
{
prop: 'materialDate',
label: '物料批次'
},
{
prop: 'operateStatus',
label: '操作状态',
filter: (val) => ['', '入库', '出库'][val]
},
{
prop: 'materialNum',
label: '出入库数量',
// filter: (val) => ['', '入库', '出库', '移库'][val]
},
{
prop: 'createTime',
label: '操作时间',
filter: parseTime
},
{
prop: 'creator',
label: '操作人',
// filter: parseTime
},
];
export default {
mixins: [basicPage],
data() {
return {
urlOptions: {
getDataListURL: getMaterialReceiptIssuePageData,
// deleteURL: deleteFactory,
// exportURL: exportFactoryExcel,
},
operateStatus:undefined,
tableProps,
// tableBtn: [
// this.$auth.hasPermi(`base:factory:update`)
// ? {
// type: 'edit',
// btnName: '编辑',
// }
// : undefined,
// this.$auth.hasPermi(`base:factory:delete`)
// ? {
// type: 'delete',
// btnName: '删除',
// }
// : undefined,
// ].filter((v)=>v),
tableData: [],
formConfig: [
{
type: 'input',
label: '物料名称',
placeholder: '物料名称',
param: 'materialName',
},
{
type: 'input',
label: '操作人',
placeholder: '操作人',
param: 'operateName',
},
{
type: 'select',
label: '操作状态',
placeholder: '操作状态',
selectOptions: [{
id: 1,
name:'入库'
},
{
id: 2,
name: '出库'
}],
param: 'operateStatus',
},
{
type: 'datePicker',
label: '操作时间',
dateType: 'daterange',
format: 'yyyy-MM-dd',
valueFormat: 'timestamp',
rangeSeparator: '-',
startPlaceholder: '开始时间',
endPlaceholder: '结束时间',
param: 'timeVal',
},
{
type: this.$auth.hasPermi('base:material-warehouse-his:query') ? 'button' : '',
btnName: '搜索',
name: 'search',
color: 'primary',
},
// {
// type: 'separate',
// },
// {
// type: 'button',
// btnName: '重置',
// name: 'reset',
// },
{
type: 'separate',
},
{
type: this.$auth.hasPermi('base:material-warehouse-his:create') ? 'button' : '',
btnName: '入库',
name: 'receipt',
color: 'success',
plain: true,
},
{
type: this.$auth.hasPermi('base:material-warehouse-his:create') ? 'button' : '',
btnName: '出库',
name: 'issue',
color: 'success',
plain: true,
},
// {
// type: this.$auth.hasPermi('base:factory:create') ? 'separate' : '',
// },
// {
// type: this.$auth.hasPermi('base:factory:export') ? 'button' : '',
// btnName: '导出',
// name: 'export',
// color: 'warning',
// },
],
};
},
components: {
AddOrUpdate,
},
created() {},
methods: {
addOrUpdateHandle() {
this.addOrUpdateVisible = true;
this.$nextTick(() => {
this.$refs.addOrUpdate.init(this.operateStatus);
});
},
buttonClick(val) {
switch (val.btnName) {
case 'search':
this.listQuery.pageNo = 1;
this.listQuery.pageSize = 10;
this.listQuery.operateName = val.operateName ? val.operateName :undefined;
this.listQuery.operateTimeStart = val.timeVal? val.timeVal[0] :undefined;
this.listQuery.operateTimeEnd = val.timeVal ? val.timeVal[1] : undefined;
this.listQuery.materialName = val.materialName ? val.materialName : undefined;
this.listQuery.operateStatus = val.operateStatus ? val.operateStatus : undefined;
this.getDataList();
break;
case 'reset':
this.$refs.searchBarForm.resetForm();
this.listQuery = {
pageSize: 10,
pageNo: 1,
total: 1,
};
this.getDataList();
break;
case 'receipt':
this.addOrEditTitle = '入库';
this.addOrUpdateVisible = true;
this.operateStatus = 1
this.addOrUpdateHandle();
break;
case 'issue':
this.addOrEditTitle = '出库';
this.addOrUpdateVisible = true;
this.operateStatus = 2
this.addOrUpdateHandle();
break;
case 'export':
this.handleExport();
break;
default:
console.log(val);
}
},
},
};
</script>

View File

@@ -1,100 +0,0 @@
/*
* @Author: zwq
* @Date: 2022-08-24 11:19:43
* @LastEditors: zwq
* @LastEditTime: 2023-08-03 14:21:04
* @Description:
*/
export default {
data() {
/* eslint-disable */
return {
urlOptions: {
createURL: '',
updateURL: '',
infoURL: '',
codeURL: '',
getOption: false,
isGetCode: false,
optionArrUrl: [],
optionArr: {}
},
visible: false,
setData: false
}
},
created() {
},
activated() {
},
methods: {
init(id) {
this.dataForm.id = id || "";
this.visible = true;
if (this.urlOptions.getOption) {
this.getArr()
}
this.$nextTick(() => {
this.$refs["dataForm"].resetFields();
if (this.dataForm.id) {
this.urlOptions.infoURL(id).then(response => {
this.dataForm = response.data;
if (this.setData) {
this.setDataForm()
}
});
} else {
if (this.urlOptions.isGetCode) {
this.getCode()
}
}
});
},
getCode() {
this.urlOptions.codeURL()
.then(({ data: res }) => {
this.dataForm.code = res;
})
.catch(() => {});
},
getArr() {
const params = {
pageSize: 100,
pageNo: 1,
}
this.urlOptions.optionArrUrl.forEach((item, index) => {
item(params).then(({ data: res }) => {
this.$set(this.urlOptions.optionArr, `arr${index}`, res.list)
})
.catch(() => {
});
});
},
// 表单提交
dataFormSubmit() {
this.$refs["dataForm"].validate((valid) => {
if (!valid) {
return false;
}
// 修改的提交
if (this.dataForm.id) {
this.urlOptions.updateURL(this.dataForm).then(response => {
this.$modal.msgSuccess("修改成功");
this.visible = false;
this.$emit("refreshDataList");
});
return;
}
// 添加的提交
this.urlOptions.createURL(this.dataForm).then(response => {
this.$modal.msgSuccess("新增成功");
this.visible = false;
this.$emit("refreshDataList");
});
});
},
formClear() {
this.$refs.dataForm.resetFields()
}
}
}

View File

@@ -1,168 +0,0 @@
/*
* @Author: zwq
* @Date: 2022-08-24 11:19:43
* @LastEditors: DY
* @LastEditTime: 2023-09-21 16:02:07
* @Description:
*/
export default {
data() {
/* eslint-disable */
return {
urlOptions: {
getDataListURL: '',
deleteURL: '',
statusUrl: '',
exportURL: ''
},
tableData: [],
listQuery: {
pageSize: 10,
pageNo: 1,
total: 1,
},
exportLoading: false,
dataListLoading: false,
addOrEditTitle: '',
addOrUpdateVisible: false,
}
},
created() {
},
mounted() {
this.getDataList()
},
methods: {
// 获取数据列表
getDataList() {
this.dataListLoading = true;
this.urlOptions.getDataListURL(this.listQuery).then(response => {
this.tableData = response.data.list;
this.listQuery.total = response.data.total;
this.dataListLoading = false;
});
},
// 每页数
sizeChangeHandle(val) {
this.listQuery.pageSize = val;
this.listQuery.pageNo = 1;
this.getDataList();
},
// 当前页
currentChangeHandle(val) {
this.listQuery.pageNo = val;
this.getDataList();
},
// 新增 / 修改
addOrUpdateHandle(id) {
this.addOrUpdateVisible = true;
this.$nextTick(() => {
this.$refs.addOrUpdate.init(id);
});
},
cancel(id) {
this.$refs["popover-" + id].showPopper = false;
},
//改变状态
changeStatus(id) {
this.$http
.post(this.urlOptions.statusUrl, { id })
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.warning(res.msg);
}
this.$refs["popover-" + id].showPopper = false;
this.$message({
message: this.$t("prompt.success"),
type: "success",
duration: 500,
onClose: () => {
this.getDataList();
},
});
})
.catch(() => { });
},
//tableBtn点击
handleClick(val) {
if (val.type === "edit") {
this.addOrUpdateVisible = true;
this.addOrEditTitle = "编辑";
this.$nextTick(() => {
this.$refs.addOrUpdate.init(val.data.id);
});
} else if (val.type === "delete") {
this.deleteHandle(val.data.id, val.data.name, val.data._pageIndex)
} else if (val.type === "change") {
this.changeStatus(val.data.id)
} else {
this.otherMethods(val)
}
},
// 删除
deleteHandle(id, name, index) {
this.$confirm(`确定对${name ? '[名称=' + name + ']' : '[序号=' + index + ']'}进行删除操作?`, "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
this.urlOptions.deleteURL(id).then(({ data }) => {
this.$message({
message: "操作成功",
type: "success",
duration: 1500,
onClose: () => {
this.getDataList();
},
});
});
})
.catch(() => { });
},
//search-bar点击
buttonClick(val) {
switch (val.btnName) {
case "search":
this.listQuery.xm1 = val.xm1;
this.listQuery.xm2 = val.xm2;
this.listQuery.pageNo = 1;
this.getDataList();
break;
case "add":
this.addOrEditTitle = '新增'
this.addOrUpdateVisible = true;
this.addOrUpdateHandle()
break;
default:
console.log(val)
}
},
handleCancel() {
this.$refs.addOrUpdate.formClear()
this.addOrUpdateVisible = false
this.addOrEditTitle = ''
},
handleConfirm() {
this.$refs.addOrUpdate.dataFormSubmit()
},
successSubmit() {
this.handleCancel()
this.getDataList()
},
/** 导出按钮操作 */
handleExport() {
// 处理查询参数
let params = { ...this.queryParams };
params.pageNo = undefined;
params.pageSize = undefined;
this.$modal.confirm('是否确认导出所有数据项?').then(() => {
this.exportLoading = true;
return this.urlOptions.exportURL(params);
}).then(response => {
this.$download.excel(response, '工厂.xls');
this.exportLoading = false;
}).catch(() => { });
}
}
}

View File

@@ -1,73 +0,0 @@
/*
* @Date: 2020-12-29 16:49:28
* @LastEditors: DY
* @LastEditTime: 2023-09-12 11:13:34
* @FilePath: \basic-admin\src\filters\basicData\index.js
* @Description:
*/
const table = {
lineStatus: {
1: '生产中',
2: '停止',
3: '未知',
},
reportType: {
1: '日',
2: '周',
3: '月'
},
pdType: {
1: '原片',
0: '深加工',
},
}
// 日期格式化
export function parseTime(time, pattern) {
if (arguments.length === 0 || !time) {
return null
}
const format = pattern || '{y}-{m}-{d} {h}:{i}:{s}'
let date
if (typeof time === 'object') {
date = time
} else {
if ((typeof time === 'string') && (/^[0-9]+$/.test(time))) {
time = parseInt(time)
} else if (typeof time === 'string') {
time = time.replace(new RegExp(/-/gm), '/').replace('T', ' ').replace(new RegExp(/\.\d{3}/gm),'');
}
if ((typeof time === 'number') && (time.toString().length === 10)) {
time = time * 1000
}
date = new Date(time)
}
const formatObj = {
y: date.getFullYear(),
m: date.getMonth() + 1,
d: date.getDate(),
h: date.getHours(),
i: date.getMinutes(),
s: date.getSeconds(),
a: date.getDay()
}
const time_str = format.replace(/{([ymdhisa])+}/g, (result, key) => {
let value = formatObj[key]
// Note: getDay() returns 0 on Sunday
if (key === 'a') {
return ['日', '一', '二', '三', '四', '五', '六'][value]
}
if (result.length > 0 && value < 10) {
value = '0' + value
}
return value || 0
})
return time_str
}
export default function (dictTable) {
return function (val) {
return table?.[dictTable]?.[val]
}
}

View File

@@ -1,172 +0,0 @@
<!--
* @Author: zwq
* @Date: 2023-08-01 13:52:10
* @LastEditors: DY
* @LastEditTime: 2023-10-16 13:40:00
* @Description:
-->
<template>
<el-form :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmit()"
label-width="130px">
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="订单名称" prop="name">
<el-input v-model="dataForm.name" clearable placeholder="请输入订单名称" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="订单编码" prop="code">
<el-input v-model="dataForm.code" clearable placeholder="请输入订单编码" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="客户" prop="customerName">
<el-input v-model="dataForm.customerName" clearable placeholder="请输入客户" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="计划加工量(片)" prop="planProductNum">
<el-input v-model="dataForm.planProductNum" clearable placeholder="请输入计划加工量" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="产品工艺" prop="processName">
<el-input v-model="dataForm.processName" clearable placeholder="请输入产品工艺" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="产品规格" prop="planProductSize">
<el-input v-model="dataForm.planProductSize" clearable placeholder="请输入产品规格" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="交货日期" prop="deliveryTime">
<el-date-picker v-model="dataForm.deliveryTime" type="date" placeholder="选择交货日期" value-format="timestamp">
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="包装规格(片/箱)" prop="packSpec">
<el-input v-model="dataForm.packSpec" clearable placeholder="请输入包装规格" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="备注" prop="remark">
<el-input v-model="dataForm.remark" clearable placeholder="请输入备注" />
</el-form-item>
</el-col>
</el-row>
<span>产线信息</span>
<el-button type="text" icon="el-icon-plus" @click="handleAdd" style="color: #409EFF;float: right;">
</el-button>
<el-divider></el-divider>
<el-row :gutter="24" v-for="(item, index) in dataForm.bindLineList" :key="index">
<el-col :span="8">
<el-form-item label="产线" :prop="'bindLineList.' + index + '.lineId'">
<el-select v-model="item.lineId" filterable clearable placeholder="请选择产线">
<el-option v-for="line in urlOptions.optionArr.arr0" :key="line.id" :label="line.name"
:value="line.id"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="14">
<el-form-item label="实际生产时间段" :prop="'bindLineList[' + index + '].dateRange'">
<el-date-picker v-model="item.dateRange" type="datetimerange" range-separator="至" start-placeholder="开始日期"
end-placeholder="结束日期" value-format="timestamp" @change="(va1) => handleChange(va1, index)" />
</el-form-item>
</el-col>
<el-col :span="2">
<!-- 删除按钮至少保留一项 -->
<el-button type="text" icon="el-icon-delete" @click="handleDelete(index)"
:disabled="dataForm.bindLineList.length <= 1" style="color: #f56c6c;"></el-button>
</el-col>
</el-row>
<!-- <el-form-item label="备注" prop="remark">
<el-input v-model="dataForm.remark" clearable placeholder="请输入备注" />
</el-form-item> -->
</el-form>
</template>
<script>
import basicAdd from '../../mixins/basic-add';
import {
updateOrderData,
createOrderData,
getOrderData,
getOrderCode
// exportWorkshopSectionExcel
} from "@/api/order/index";
import {
getProductionLinePage,
} from '@/api/core/base/productionLine';
export default {
mixins: [basicAdd],
data() {
return {
urlOptions: {
getOption: true,
isGetCode: true,
codeURL: getOrderCode,
createURL: createOrderData,
updateURL: updateOrderData,
infoURL: getOrderData,
optionArrUrl: [getProductionLinePage],
},
dataForm: {
id: undefined,
code: undefined,
bindLineList: [
],
deliveryTime:undefined,
name: undefined,
remark: undefined,
planProductSize: undefined,
planProductNum: undefined,
customerName: undefined,
processName: undefined,
packSpec: undefined,
},
dataRule: {
code: [
{ required: true, message: '订单编码不能为空', trigger: 'blur' },
],
name: [
{ required: true, message: '订单名称不能为空', trigger: 'blur' },
],
},
};
},
methods: {
handleAdd() {
const newItem = {
productionLineId: '',
dateRange: []
};
// 使用 this.$set 向数组添加元素(确保响应式)
this.$set(
this.dataForm.bindLineList,
this.dataForm.bindLineList.length, // 新元素的索引(数组长度即最后一个位置)
newItem // 要添加的新元素
);
},
handleChange(val, index) {
console.log(val);
this.dataForm.bindLineList[index].startProduceTime = val[0]
this.dataForm.bindLineList[index].finishProduceTime = val[1]
},
handleDelete(index) {
this.dataForm.bindLineList.splice(index, 1);
Message.info('已删除该配置');
},
},
};
</script>

View File

@@ -1,358 +0,0 @@
<!--
* @Author: zhp
* @Date: 2021-12-04 16:27:09
* @LastEditTime: 2022-08-09 09:47:17
* @LastEditors: zhp
* @Description:
-->
<template>
<div>
<el-drawer title="详情" :visible.sync="drawer" :before-close="handleClose" size="60%">
<div class="detailBox">
<h2 style="margin-left: 32px;">
订单编号: {{ dataForm.code}}
</h2>
<el-row>
<el-col :span="8">
<p class="title">订单名称</p>
<p class="text">{{ dataForm.name }}</p>
</el-col>
<el-col :span="8">
<p class="title">客户</p>
<p class="text">{{ dataForm.customerName }}</p>
</el-col>
<el-col :span="8">
<p class="title">计划加工量</p>
<p class="text">{{ dataForm?.planProductNum }}</p>
</el-col>
</el-row>
<!-- <el-divider /> -->
<div>
<el-row>
<el-col :span="8">
<p class="title">产品工艺</p>
<p class="text">{{ dataForm?.processName }}</p>
</el-col>
<el-col :span="8">
<p class="title">产品规格</p>
<p class="text">{{ dataForm?.planProductSize }}</p>
</el-col>
<el-col :span="8">
<p class="title">交货日期</p>
<p class="text">{{ parseTime(dataForm?.deliveryTime) }}</p>
</el-col>
</el-row>
<el-row>
<el-col :span="8">
<p class="title">包装规格/</p>
<p class="text">{{ dataForm?.packSpec }}</p>
</el-col>
<el-col :span="8">
<p class="title">实际生产时间</p>
<p class="text">{{ parseTime(dataForm?.startProduceTime) + '-' + parseTime(dataForm?.finishProduceTime) }}</p>
</el-col>
<el-col :span="8">
<p class="title">实际投入数量</p>
<p class="text">{{ dataForm?.assignQuantity }}</p>
</el-col>
</el-row>
<el-row>
<el-col :span="8">
<p class="title">实际产出数量</p>
<p class="text">{{ dataForm?.actualQuantity }}</p>
</el-col>
<el-col :span="8">
<p class="title">备注</p>
<p class="text">{{ dataForm?.remark }}</p>
</el-col>
</el-row>
</div>
<!-- <div v-if="glass === 4"> -->
<!-- 铜铟镓硒待完成 -->
<!-- </div> -->
</div>
<!-- <head-form :form-config="headFormConfig" @headBtnClick="btnClick" /> -->
<h2 style="margin-left: 32px;">
产线信息
</h2>
<el-divider />
<el-button @click="handleRoute" type="text" style="float: right;margin-right: 20px;">订单生产详情</el-button>
<base-table :table-props="tableProps" :table-data="tableData">
<method-btn v-if="tableBtn.length" slot="handleBtn" :width="120" label="操作" :method-list="tableBtn"
@clickBtn="handleClick" />
</base-table>
<!-- <pagination :limit.sync="listQuery.pageSize" :page.sync="listQuery.pageNo" :total="listQuery.total"
@pagination="getDataList" /> -->
</el-drawer>
</div>
</template>
<script>
const tableProps = [{
prop: 'lineName',
label: '产线',
align: 'center'
},
{
prop: 'processName',
label: '产品工艺',
align: 'center'
}, {
prop: 'planProductSize',
label: '产品规格',
align: 'center'
}, {
prop: 'startProduceTime',
label: '开始时间',
filter: parseTime,
align: 'center'
}, {
prop: 'finishProduceTime',
label: '结束时间',
filter: parseTime,
align: 'center'
}, {
prop: 'assignQuantity',
label: '投入数量',
align: 'center'
}, {
prop: 'actualQuantity',
label: '产出数量',
align: 'center'
},
]
// import { getPageWareHouseSubstrateHistory } from '@/api/equipment/trans'
// import BaseTable from '@/components/BaseTable'
// // import MethodBtn from '@/components/BaseTable/subcomponents/MethodBtn'
// import Pagination from '@/components/Pagination'
// edit here
// import i18n from '@/lang'
// import HeadForm from '@/components/basicData/HeadForm'
import {
getOrderData,
// exportWorkshopSectionExcel
} from "@/api/order/index";
import { parseTime } from '../../mixins/code-filter';
export default {
components: {
// BaseTable,
// Pagination,
// HeadForm
// MethodBtn
// MethodBtn
},
data() {
return {
tableProps,
drawer: false,
list: [],
tableBtn: [{
type: 'detail',
btnName: '产线生产详情',
}
// this.$auth.hasPermi(`base:workshop-section:delete`)
// ? {
// type: 'delete',
// btnName: '删除',
// }
// : undefined,
].filter((v) => v),
tableData:[],
listLoading: false,
total: 0,
edit: false,
// dataForm: {
// id: null,
// io: null,
// status: null
// },
lineIdList:[],
dataForm: {
id: null,
name: '', // 订单名称
customerName: '', // 客户
planProductNum: '', // 计划加工量
processName: '', // 产品工艺
planProductSize: '', // 产品规格
deliveryTime: '', // 交货日期
packSpec: '', // 包装规格(片/箱)
startProduceTime: '', // 实际生产时间
assignQuantity: '', // 实际投入数量
actualQuantity: '', // 实际产出数量
remark: '' // 备注
},
listQuery: {
},
// headFormConfig: [
// {
// label: this.$t('module.equipmentManager.trans.inEqTime'),
// type: 'datePickRange',
// dateType: 'datetimerange',
// format: 'yyyy-MM-dd HH:mm:ss',
// valueFormat: 'yyyy-MM-ddTHH:mm:ss',
// param: 'inTime'
// },
// {
// label: this.$t('module.equipmentManager.trans.outTime'),
// type: 'datePickRange',
// dateType: 'datetimerange',
// format: 'yyyy-MM-dd HH:mm:ss',
// valueFormat: 'yyyy-MM-ddTHH:mm:ss',
// param: 'outTime'
// },
// {
// type: 'button',
// btnName: 'btn.search',
// name: 'search',
// color: 'primary'
// }
// // {
// // type: 'button',
// // btnName: 'btn.exportBtn',
// // name: 'exportBtn',
// // color: 'primary'
// // }
// ],
rules: {
// slotNo: [
// { required: true, message: this.$i18nForm(['placeholder.input', this.$t('module.equipmentManager.trans.slotNo')]), trigger: 'blur' }
// ],
// substrateId: [
// { required: true, message: this.$i18nForm(['placeholder.input', this.$t('module.equipmentManager.trans.substrateId')]), trigger: 'blur' }
// ]
}
}
},
methods: {
handleClose() {
this.drawer = false
},
handleRoute() {
console.log(this.lineIdList);
this.$router.push({
path: '/core/monitoring/production-line-data',
query: {
lineId: this.lineIdList,
startProduceTime: this.dataForm.startProduceTime,
finishProduceTime: this.dataForm.finishProduceTime,
tab: 'his',
name: this.dataForm.name,
code: this.dataForm.code,
buttonType:'order'
}
})
},
handleClick(val) {
console.log(val);
this.$router.push({
path: '/core/monitoring/production-line-data',
query: {
lineId: [val.data.lineId],
startProduceTime: val.data.startProduceTime,
finishProduceTime: val.data.finishProduceTime,
tab:'his'
}
})
},
async init(id) {
// if (id !== undefined) {
this.dataForm.id = id || ''
// this.edit = true
// }
// console.log(this.edit)
this.drawer = true
this.$nextTick(() => {
// this.$refs['dataForm'].resetFields()
getOrderData(id).then((res) => {
this.dataForm = res.data
this.tableData = res.data.bindLines
this.tableData.forEach(ele => {
this.lineIdList.push(
ele.lineId
)
});
})
// console.log();
// if (this.listQuery.id) {
// this.getList()
// }
})
},
getList() {
getPageWareHouseSubstrateHistory(this.listQuery).then(res => {
console.log(res)
this.list = res.data.records
this.total = res.data.total
})
}
// dataSubmit() {
// this.$refs['dataForm'].validate((valid) => {
// if (valid) {
// if (this.dataForm.id) {
// const data = {
// id: this.dataForm.id,
// io: this.dataForm.io,
// status: this.dataForm.status
// }
// addOrUpdateLineSideWareHouseDetailData(data).then(res => {
// this.$message({
// message: this.$t('module.basicData.visual.success'),
// type: 'success',
// duration: 1500,
// onClose: () => {
// this.drawer = false
// this.$emit('refreshDataList')
// }
// })
// })
// }
// }
// })
// }
}
}
</script>
<style lang="scss" scoped>
.detailBox p {
margin: 0;
padding: 0 32px;
}
.detailBox.title {
/* width: 56px; */
/* height: 14px; */
font-family: Source Han Sans CN, Source Han Sans CN;
font-weight: 400;
font-size: 14px;
color: rgba(0, 0, 0, 0.85);
line-height: 16px;
text-align: left;
font-style: normal;
text-transform: none;
}
.detailBox.text {
font-size: 14px;
font-weight: 400;
color: rgba(102, 102, 102, 0.75);
padding-bottom: 20px;
}
.detailBox {
width: 98%;
padding: 30px 0;
}
</style>

View File

@@ -1,362 +0,0 @@
<template>
<div class="app-container">
<search-bar :formConfigs="formConfig" ref="searchBarForm" @headBtnClick="buttonClick" />
<el-table v-loading="dataListLoading" :data="tableData" row-key="id" border style="width: 100%">
<el-table-column label="序号" type="index" width="50" />
<!-- 订单名称/产线名称列 -->
<el-table-column prop="name" label="订单名称/产线名称" align="center" />
<!-- 订单编号列 -->
<el-table-column prop="code" label="订单编号" align="center" />
<!-- 客户列 -->
<el-table-column prop="customerName" label="客户" align="center" />
<!-- 计划加工量列 -->
<el-table-column prop="planProductNum" label="计划加工量" align="center" />
<!-- 实际加工量列 -->
<el-table-column prop="actualQuantity" label="实际加工量" align="center" />
<!-- 产品工艺列 -->
<el-table-column prop="processName" label="产品工艺" align="center" />
<!-- 产品规格列 -->
<el-table-column prop="planProductSize" label="产品规格" align="center" />
<!-- 交货时间列带时间格式化 -->
<el-table-column prop="deliveryTime" label="交货时间" align="center">
<template #default="scope">
{{ parseTime(scope.row.deliveryTime) }}
</template>
</el-table-column>
<!-- 开始时间列带时间格式化 -->
<el-table-column prop="startProduceTime" label="开始时间" align="center">
<template #default="scope">
{{ parseTime(scope.row.startProduceTime) }}
</template>
</el-table-column>
<!-- 结束时间列带时间格式化 -->
<el-table-column prop="finishProduceTime" label="结束时间" align="center">
<template #default="scope">
{{ parseTime(scope.row.finishProduceTime) }}
</template>
</el-table-column>
<!-- 产线数量列 -->
<el-table-column prop="bindLineNum" label="产线数量" align="center" />
<!-- 操作列对应原handleBtn插槽 -->
<el-table-column fixed="right" label="操作" width="120">
<template #default="scope">
<!-- 只在 level 0 时显示操作按钮 -->
<div v-if="scope.row.level === 0">
<!-- 详情按钮 -->
<span v-hasPermi="['base:core-work-order:update']" class="iconfont icon-detail primary-color"
@click="handleDetail(scope.row)" style="cursor: pointer; margin-right: 10px;"></span>
<!-- 编辑按钮 -->
<span v-hasPermi="['base:core-work-order:update']" class="iconfont icon-edit primary-color"
@click="handleEdit(scope.row)" style="cursor: pointer; margin-right: 10px;"></span>
<!-- 删除按钮 -->
<span v-hasPermi="['base:core-work-order:delete']" class="iconfont icon-delete delete-color"
@click="deleteHandle(scope.row.id,scope.row.name,scope.row.index)" style="cursor: pointer;"></span>
</div>
</template>
</el-table-column>
</el-table>
<pagination :limit.sync="listQuery.pageSize" :page.sync="listQuery.pageNo" :total="listQuery.total"
@pagination="getDataList" />
<base-dialog :dialogTitle="addOrEditTitle" :dialogVisible="addOrUpdateVisible" @cancel="handleCancel"
@confirm="handleConfirm" :before-close="handleCancel" width="50%">
<add-or-update ref="addOrUpdate" @refreshDataList="successSubmit"></add-or-update>
</base-dialog>
<detail v-if="dialogVisibleDetail" ref="detailDialog" @refreshDataList="getDataList" />
</div>
</template>
<script>
import AddOrUpdate from './add-or-updata';
import detail from './detail';
import basicPage from '../../mixins/basic-page';
import { parseTime } from '../../mixins/code-filter';
import {
getOrderPage,
deleteOrder
// getWorkshopSectionPage,
// exportWorkshopSectionExcel
} from "@/api/order/index";
import { getPdList } from '@/api/core/monitoring/auto';
import { getFactoryPage } from '@/api/core/base/factory';
const tableProps = [
{
prop: 'name',
label: '订单名称/产线名称'
},
{
prop: 'code',
label: '订单编号'
},
{
prop: 'customerName',
label: '客户'
},
{
prop: 'planProductNum',
label: '计划加工量'
},
{
prop: 'productNum',
label: '实际加工量'
},
{
prop: 'processName',
label: '产品工艺'
},
{
prop: 'planProductSize',
label: '产品规格'
},
{
prop: 'deliveryTime',
label: '交货时间',
filter: parseTime
},
{
prop: 'startProduceTime',
label: '开始时间',
filter: parseTime
},
{
prop: 'finishProduceTime',
label: '结束时间',
filter: parseTime
},
{
prop: 'bindLineNum',
label: '产线数量',
},
];
export default {
mixins: [basicPage],
data() {
return {
urlOptions: {
getDataListURL: getOrderPage,
deleteURL: deleteOrder,
// exportURL: exportWorkshopSectionExcel,
},
tableProps,
dialogVisibleDetail:false,
tableBtn: [
this.$auth.hasPermi(`base:core-work-order:update`)
? {
type: 'edit',
btnName: '编辑',
}
: undefined,
this.$auth.hasPermi(`base:core-work-order:delete`)
? {
type: 'delete',
btnName: '删除',
}
: undefined,
].filter((v)=>v),
listQuery: {
lineId: null,
startTime: undefined,
endTime:undefined
},
tableData: [],
formConfig: [
{
type: 'input',
label: '订单名称',
placeholder: '工段名称',
param: 'name',
},
// {
// type: 'select',
// label: '工厂',
// selectOptions: [],
// param: 'factoryId',
// onchange: true,
// },
{
type: 'select',
label: '产线',
selectOptions: [],
param: 'lineId',
// multiple: true,
},
{
type: 'datePicker',
label: '时间范围',
dateType: 'daterange',
format: 'yyyy-MM-dd',
valueFormat: 'timestamp',
rangeSeparator: '-',
startPlaceholder: '开始时间',
endPlaceholder: '结束时间',
param: 'timeVal',
},
{
type: this.$auth.hasPermi('base:core-work-order:query') ? 'button' : '',
btnName: '搜索',
name: 'search',
color: 'primary',
},
// {
// type: 'separate',
// },
// {
// type: 'button',
// btnName: '重置',
// name: 'reset',
// },
{
type: 'separate',
},
{
type: this.$auth.hasPermi('base:core-work-order:create') ? 'button' : '',
btnName: '新增',
name: 'add',
color: 'success',
plain: true,
},
// {
// type: this.$auth.hasPermi('base:workshop-section:create') ? 'separate' : '',
// },
// {
// type: this.$auth.hasPermi('base:workshop-section:export') ? 'button' : '',
// btnName: '导出',
// name: 'export',
// color: 'warning',
// },
],
};
},
components: {
AddOrUpdate,
detail
},
created() {
this.getPdLineList();
},
methods: {
getPdLineList() {
getPdList().then((res) => {
this.formConfig[1].selectOptions = res.data || [];
});
const params = {
pageSize: 100,
pageNo: 1,
};
getFactoryPage(params).then((res) => {
this.formConfig[0].selectOptions = res.data.list || [];
});
},
// handleSearchBarChanged({ param, value }) {
// this.listQuery.lineId = null;
// this.$refs.searchBarForm.formInline.lineId = undefined;
// getPdList(value).then((res) => {
// this.formConfig[1].selectOptions = res.data || [];
// });
// },
getDataList() {
this.dataListLoading = true;
this.urlOptions.getDataListURL(this.listQuery).then(response => {
this.tableData = response.data.list.map((ele) => {
ele.children = ele.bindLines.map((item) => {
item.name = item.lineName;
item.level = 1
return item
})
ele.level = 0
return ele;
})
console.log(this.tableData);
this.listQuery.total = response.data.total;
this.dataListLoading = false;
});
},
handleEdit(val) {
console.log(val);
// if (val.type === "edit") {
this.addOrUpdateVisible = true;
this.addOrEditTitle = "编辑";
this.$nextTick(() => {
this.$refs.addOrUpdate.init(val.id);
});
// }
},
handleDetail(val) {
console.log(val);
// if (val.type === "edit") {
this.dialogVisibleDetail = true;
// this.addOrEditTitle = "编辑";
this.$nextTick(() => {
this.$refs.detailDialog.init(val.id);
});
// }
},
addOrUpdateHandle(id) {
this.addOrUpdateVisible = true;
this.$nextTick(() => {
this.$refs.addOrUpdate.init(id);
});
},
buttonClick(val) {
console.log(val);
switch (val.btnName) {
case 'search':
this.listQuery.pageNo = 1;
this.listQuery.pageSize = 10;
this.listQuery.name = val.name;
this.listQuery.factoryId = val.factoryId || undefined;
this.listQuery.lineId = val.lineId || null;
this.listQuery.startTime = val.timeVal ? val.timeVal[0] : undefined
this.listQuery.endTime = val.timeVal ? val.timeVal[1] : undefined
this.getDataList();
break;
case 'reset':
this.$refs.searchBarForm.resetForm();
this.listQuery = {
pageSize: 10,
pageNo: 1,
total: 1,
};
this.getDataList();
break;
case 'add':
this.addOrEditTitle = '新增';
this.addOrUpdateVisible = true;
this.addOrUpdateHandle();
break;
case 'export':
this.handleExport();
break;
default:
console.log(val);
}
},
},
};
</script>
<style>
.delete-color {
color: #ff5454;
}
.primary-color {
color: #0b58ff;
}
</style>

View File

@@ -1,109 +0,0 @@
/*
* @Author: zwq
* @Date: 2022-08-24 11:19:43
* @LastEditors: zwq
* @LastEditTime: 2023-08-03 14:21:04
* @Description:
*/
export default {
data() {
/* eslint-disable */
return {
urlOptions: {
createURL: '',
updateURL: '',
infoURL: '',
codeURL: '',
getOption: false,
isGetCode: false,
optionArrUrl: [],
optionArr: {}
},
dataForm:{},
visible: false,
setData: false
}
},
created() {
},
activated() {
},
methods: {
init(id) {
this.dataForm.id = id || "";
this.visible = true;
if (this.urlOptions.getOption) {
this.getArr()
}
this.$nextTick(() => {
this.$refs["dataForm"].resetFields();
this.dataForm.bindLineList = []
if (this.dataForm.id) {
this.urlOptions.infoURL(id).then(response => {
this.dataForm = response.data;
this.dataForm.bindLineList = response.data.bindLines.map((ele) => {
ele.lineId = ele.lineId;
ele.dateRange = [ele.startProduceTime, ele.finishProduceTime];
return ele
})
if (this.setData) {
this.setDataForm()
}
});
} else {
if (this.urlOptions.isGetCode) {
this.getCode()
}
}
});
},
getCode() {
this.urlOptions.codeURL()
.then(({ data: res }) => {
this.dataForm.code = res;
})
.catch(() => {});
},
getArr() {
const params = {
pageSize: 100,
pageNo: 1,
}
this.urlOptions.optionArrUrl.forEach((item, index) => {
item(params).then(({ data: res }) => {
this.$set(this.urlOptions.optionArr, `arr${index}`, res.list)
})
.catch(() => {
});
});
},
// 表单提交
dataFormSubmit() {
this.$refs["dataForm"].validate((valid) => {
if (!valid) {
return false;
}
// 修改的提交
if (this.dataForm.id) {
this.urlOptions.updateURL(this.dataForm).then(response => {
this.$modal.msgSuccess("修改成功");
this.visible = false;
this.$emit("refreshDataList");
});
return;
}
// 添加的提交
this.urlOptions.createURL(this.dataForm).then(response => {
this.$modal.msgSuccess("新增成功");
this.visible = false;
this.$emit("refreshDataList");
});
});
},
formClear() {
this.$refs.dataForm.resetFields()
}
}
}

View File

@@ -1,168 +0,0 @@
/*
* @Author: zwq
* @Date: 2022-08-24 11:19:43
* @LastEditors: DY
* @LastEditTime: 2023-09-21 16:02:07
* @Description:
*/
export default {
data() {
/* eslint-disable */
return {
urlOptions: {
getDataListURL: '',
deleteURL: '',
statusUrl: '',
exportURL: ''
},
tableData: [],
listQuery: {
pageSize: 10,
pageNo: 1,
total: 1,
},
exportLoading: false,
dataListLoading: false,
addOrEditTitle: '',
addOrUpdateVisible: false,
}
},
created() {
},
mounted() {
this.getDataList()
},
methods: {
// 获取数据列表
getDataList() {
this.dataListLoading = true;
this.urlOptions.getDataListURL(this.listQuery).then(response => {
this.tableData = response.data.list;
this.listQuery.total = response.data.total;
this.dataListLoading = false;
});
},
// 每页数
sizeChangeHandle(val) {
this.listQuery.pageSize = val;
this.listQuery.pageNo = 1;
this.getDataList();
},
// 当前页
currentChangeHandle(val) {
this.listQuery.pageNo = val;
this.getDataList();
},
// 新增 / 修改
addOrUpdateHandle(id) {
this.addOrUpdateVisible = true;
this.$nextTick(() => {
this.$refs.addOrUpdate.init(id);
});
},
cancel(id) {
this.$refs["popover-" + id].showPopper = false;
},
//改变状态
changeStatus(id) {
this.$http
.post(this.urlOptions.statusUrl, { id })
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.warning(res.msg);
}
this.$refs["popover-" + id].showPopper = false;
this.$message({
message: this.$t("prompt.success"),
type: "success",
duration: 500,
onClose: () => {
this.getDataList();
},
});
})
.catch(() => { });
},
//tableBtn点击
handleClick(val) {
if (val.type === "edit") {
this.addOrUpdateVisible = true;
this.addOrEditTitle = "编辑";
this.$nextTick(() => {
this.$refs.addOrUpdate.init(val.data.id);
});
} else if (val.type === "delete") {
this.deleteHandle(val.data.id, val.data.name, val.data._pageIndex)
} else if (val.type === "change") {
this.changeStatus(val.data.id)
} else {
this.otherMethods(val)
}
},
// 删除
deleteHandle(id, name, index) {
this.$confirm(`确定对${name ? '[名称=' + name + ']' : '[序号=' + index + ']'}进行删除操作?`, "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
this.urlOptions.deleteURL(id).then(({ data }) => {
this.$message({
message: "操作成功",
type: "success",
duration: 1500,
onClose: () => {
this.getDataList();
},
});
});
})
.catch(() => { });
},
//search-bar点击
buttonClick(val) {
switch (val.btnName) {
case "search":
this.listQuery.xm1 = val.xm1;
this.listQuery.xm2 = val.xm2;
this.listQuery.pageNo = 1;
this.getDataList();
break;
case "add":
this.addOrEditTitle = '新增'
this.addOrUpdateVisible = true;
this.addOrUpdateHandle()
break;
default:
console.log(val)
}
},
handleCancel() {
this.$refs.addOrUpdate.formClear()
this.addOrUpdateVisible = false
this.addOrEditTitle = ''
},
handleConfirm() {
this.$refs.addOrUpdate.dataFormSubmit()
},
successSubmit() {
this.handleCancel()
this.getDataList()
},
/** 导出按钮操作 */
handleExport() {
// 处理查询参数
let params = { ...this.queryParams };
params.pageNo = undefined;
params.pageSize = undefined;
this.$modal.confirm('是否确认导出所有数据项?').then(() => {
this.exportLoading = true;
return this.urlOptions.exportURL(params);
}).then(response => {
this.$download.excel(response, '工厂.xls');
this.exportLoading = false;
}).catch(() => { });
}
}
}

View File

@@ -1,73 +0,0 @@
/*
* @Date: 2020-12-29 16:49:28
* @LastEditors: DY
* @LastEditTime: 2023-09-12 11:13:34
* @FilePath: \basic-admin\src\filters\basicData\index.js
* @Description:
*/
const table = {
lineStatus: {
1: '生产中',
2: '停止',
3: '未知',
},
reportType: {
1: '日',
2: '周',
3: '月'
},
pdType: {
1: '原片',
0: '深加工',
},
}
// 日期格式化
export function parseTime(time, pattern) {
if (arguments.length === 0 || !time) {
return null
}
const format = pattern || '{y}-{m}-{d} {h}:{i}:{s}'
let date
if (typeof time === 'object') {
date = time
} else {
if ((typeof time === 'string') && (/^[0-9]+$/.test(time))) {
time = parseInt(time)
} else if (typeof time === 'string') {
time = time.replace(new RegExp(/-/gm), '/').replace('T', ' ').replace(new RegExp(/\.\d{3}/gm),'');
}
if ((typeof time === 'number') && (time.toString().length === 10)) {
time = time * 1000
}
date = new Date(time)
}
const formatObj = {
y: date.getFullYear(),
m: date.getMonth() + 1,
d: date.getDate(),
h: date.getHours(),
i: date.getMinutes(),
s: date.getSeconds(),
a: date.getDay()
}
const time_str = format.replace(/{([ymdhisa])+}/g, (result, key) => {
let value = formatObj[key]
// Note: getDay() returns 0 on Sunday
if (key === 'a') {
return ['日', '一', '二', '三', '四', '五', '六'][value]
}
if (result.length > 0 && value < 10) {
value = '0' + value
}
return value || 0
})
return time_str
}
export default function (dictTable) {
return function (val) {
return table?.[dictTable]?.[val]
}
}

17511
yarn.lock

File diff suppressed because it is too large Load Diff