projects/mesxc-zhp #161
										
											Binary file not shown.
										
									
								
							| 
		 Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 4.2 KiB  | 
@@ -113,6 +113,15 @@ export function orderMonitor(query) {
 | 
			
		||||
  })
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// 获取订单绑定的工单和数量信息,可传订单id列表,map索引为订单id
 | 
			
		||||
export function orderAssignmentList(query) {
 | 
			
		||||
  return request({
 | 
			
		||||
    url: '/base/order/orderAssignmentList',
 | 
			
		||||
    method: 'get',
 | 
			
		||||
    params: query
 | 
			
		||||
  })
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// 获得所有客户列表
 | 
			
		||||
export function customerList() {
 | 
			
		||||
  return request({
 | 
			
		||||
 
 | 
			
		||||
@@ -1,7 +1,7 @@
 | 
			
		||||
/*
 | 
			
		||||
 * @Author: Do not edit
 | 
			
		||||
 * @Date: 2023-11-08 15:56:52
 | 
			
		||||
 * @LastEditTime: 2023-11-21 10:50:55
 | 
			
		||||
 * @LastEditTime: 2023-11-23 19:10:07
 | 
			
		||||
 * @LastEditors: DY
 | 
			
		||||
 * @Description: 
 | 
			
		||||
 */
 | 
			
		||||
@@ -32,3 +32,13 @@ export function exportMaintainMonitorExcel(query) {
 | 
			
		||||
    responseType: 'blob'
 | 
			
		||||
  })
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// 导出设备保养记录
 | 
			
		||||
export function exportMaintainLogExcel(query) {
 | 
			
		||||
  return request({
 | 
			
		||||
    url: '/base/equipment-maintain-log/export-excel',
 | 
			
		||||
    method: 'get',
 | 
			
		||||
    params: query,
 | 
			
		||||
    responseType: 'blob'
 | 
			
		||||
  })
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -1,7 +1,7 @@
 | 
			
		||||
/*
 | 
			
		||||
 * @Author: Do not edit
 | 
			
		||||
 * @Date: 2023-11-10 16:09:33
 | 
			
		||||
 * @LastEditTime: 2023-11-16 18:57:08
 | 
			
		||||
 * @LastEditTime: 2023-11-23 20:29:28
 | 
			
		||||
 * @LastEditors: DY
 | 
			
		||||
 * @Description: 
 | 
			
		||||
 */
 | 
			
		||||
@@ -31,3 +31,13 @@ export function deleteRepair(id) {
 | 
			
		||||
    method: 'delete'
 | 
			
		||||
  })
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// 导出设备维修
 | 
			
		||||
export function exportRepairLogExcel(query) {
 | 
			
		||||
  return request({
 | 
			
		||||
    url: '/base/equipment-repair-log/export-excel',
 | 
			
		||||
    method: 'get',
 | 
			
		||||
    params: query,
 | 
			
		||||
    responseType: 'blob'
 | 
			
		||||
  })
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -1,7 +1,7 @@
 | 
			
		||||
/*
 | 
			
		||||
 * @Author: zhp
 | 
			
		||||
 * @Date: 2023-11-07 19:47:48
 | 
			
		||||
 * @LastEditTime: 2023-11-16 17:49:23
 | 
			
		||||
 * @LastEditTime: 2023-11-23 13:57:41
 | 
			
		||||
 * @LastEditors: zhp
 | 
			
		||||
 * @Description:
 | 
			
		||||
 */
 | 
			
		||||
@@ -104,3 +104,18 @@ export function getMaterialList(data) {
 | 
			
		||||
    data: data
 | 
			
		||||
  })
 | 
			
		||||
}
 | 
			
		||||
export function getMaterialCode(data) {
 | 
			
		||||
  return request({
 | 
			
		||||
    url: '/extend/process-equ-material-bom/getCode',
 | 
			
		||||
    method: 'get',
 | 
			
		||||
    params: data
 | 
			
		||||
  })
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
export function createProcessEquMaterialBomDetList(data) {
 | 
			
		||||
  return request({
 | 
			
		||||
    url: '/extend/process-equ-material-bom-det/createByList',
 | 
			
		||||
    method: 'post',
 | 
			
		||||
    data: data
 | 
			
		||||
  })
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -1,7 +1,7 @@
 | 
			
		||||
/*
 | 
			
		||||
 * @Author: zhp
 | 
			
		||||
 * @Date: 2023-11-09 09:37:14
 | 
			
		||||
 * @LastEditTime: 2023-11-16 17:47:21
 | 
			
		||||
 * @LastEditTime: 2023-11-23 14:15:45
 | 
			
		||||
 * @LastEditors: zhp
 | 
			
		||||
 * @Description:
 | 
			
		||||
 */
 | 
			
		||||
@@ -104,3 +104,19 @@ export function getValueList(data) {
 | 
			
		||||
    params: data
 | 
			
		||||
  })
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
export function getValueCode(data) {
 | 
			
		||||
  return request({
 | 
			
		||||
    url: '/extend/process-equ-value-bom/getCode',
 | 
			
		||||
    method: 'get',
 | 
			
		||||
    params: data
 | 
			
		||||
  })
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
export function createProcessEquValueBomDetList(data) {
 | 
			
		||||
  return request({
 | 
			
		||||
    url: '/extend/process-equ-value-bom-det/createByList',
 | 
			
		||||
    method: 'post',
 | 
			
		||||
    data: data
 | 
			
		||||
  })
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										20
									
								
								src/assets/icons/svg/order-monitoring.svg
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										20
									
								
								src/assets/icons/svg/order-monitoring.svg
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,20 @@
 | 
			
		||||
<?xml version="1.0" encoding="UTF-8"?>
 | 
			
		||||
<svg width="16px" height="16px" viewBox="0 0 16 16" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
 | 
			
		||||
    <title>编组 17</title>
 | 
			
		||||
    <g id="页面" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" opacity="0.695141">
 | 
			
		||||
        <g id="最新参考" transform="translate(-1780.000000, -57.000000)" fill="#000000" fill-rule="nonzero">
 | 
			
		||||
            <g id="编组-4" transform="translate(1772.000000, 48.000000)">
 | 
			
		||||
                <g id="编组-17" transform="translate(8.000000, 9.000000)">
 | 
			
		||||
                    <rect id="矩形备份-2" opacity="0" x="0" y="0" width="16" height="16"></rect>
 | 
			
		||||
                    <g id="文档" transform="translate(2.436519, 1.472460)">
 | 
			
		||||
                        <path d="M9.61879642,0.990942446 C9.83682412,0.990942446 10.0548518,1.18867806 10.0548518,1.38641367 L10.0548518,11.6686655 C10.0548518,11.8664011 9.83682412,12.0641367 9.61879642,12.0641367 L3.60123204,12.0641367 L1.02850524,9.69130935 L1.02850524,1.38641367 C1.02850524,1.18867806 1.24653294,0.990942446 1.46456063,0.990942446 L9.61879642,0.990942446 M9.61879642,0.2 L1.50816617,0.2 C0.810477546,0.2 0.2,0.753659712 0.2,1.38641367 L0.2,10.0076863 L3.25238773,12.8550791 L9.61879642,12.8550791 C10.316485,12.8550791 10.9269626,12.3014194 10.9269626,11.6686655 L10.9269626,1.38641367 C10.9269626,0.753659712 10.316485,0.2 9.61879642,0.2 Z" id="形状"></path>
 | 
			
		||||
                        <path d="M9.61879642,0 C10.4228194,0 11.1269626,0.638607809 11.1269626,1.38641367 L11.1269626,11.6686655 C11.1269626,12.4164713 10.4228194,13.0550791 9.61879642,13.0550791 L3.25238773,13.0550791 L3.11596256,13.0013261 L0.0635748259,10.1539333 L0,10.0076863 L0,1.38641367 C0,0.638607809 0.704143212,0 1.50816617,0 L9.61879642,0 Z M9.61879642,0.4 L1.50816617,0.4 C0.91681188,0.4 0.4,0.868711615 0.4,1.38641367 L0.4,9.921 L3.331,12.6550791 L9.61879642,12.6550791 C10.1707271,12.6550791 10.657723,12.2467792 10.7202028,11.7714283 L10.7269626,11.6686655 L10.7269626,1.38641367 C10.7269626,0.868711615 10.2101507,0.4 9.61879642,0.4 Z M9.61879642,0.790942446 C9.94315845,0.790942446 10.2548518,1.07362615 10.2548518,1.38641367 L10.2548518,11.6686655 C10.2548518,11.981453 9.94315845,12.2641367 9.61879642,12.2641367 L3.60123204,12.2641367 L3.46563766,12.2111542 L0.892910861,9.83832691 L0.828505241,9.69130935 L0.828505241,1.38641367 C0.828505241,1.07362615 1.1401986,0.790942446 1.46456063,0.790942446 L9.61879642,0.790942446 Z M9.69667678,1.08901006 L1.38668992,1.08901006 C1.27286315,1.08901006 1.14612572,1.20395189 1.14612572,1.28821491 L1.14561083,9.66174324 L3.64342649,11.9659298 L9.69667678,11.9660691 C9.79153243,11.9660691 9.8953538,11.8862484 9.92732605,11.8108781 L9.93724098,11.7668642 L9.93724098,1.28821491 C9.93724098,1.20395189 9.81050356,1.08901006 9.69667678,1.08901006 Z" id="形状"></path>
 | 
			
		||||
                        <path d="M4.54092961,3.67913093 L2.25985278,3.67913093 C2.22052387,3.67913093 2.22052387,3.65291165 2.22052387,3.65291165 L2.22052387,2.91877199 C2.22052387,2.89255271 2.22052387,2.89255271 2.25985278,2.89255271 L4.54092961,2.89255271 C4.58025852,2.89255271 4.58025852,2.89255271 4.58025852,2.91877199 L4.58025852,3.65291165 L4.54092961,3.67913093 Z M8.86710981,5.44893192 L2.25985278,5.44893192 C2.22052387,5.44893192 2.22052387,5.44893192 2.22052387,5.40960301 L2.22052387,4.70168261 C2.22052387,4.6623537 2.22052387,4.6623537 2.25985278,4.6623537 L8.86710981,4.6623537 C8.90643872,4.6623537 8.90643872,4.6623537 8.90643872,4.70168261 L8.90643872,5.40960301 L8.86710981,5.44893192 Z M8.86710981,7.41537746 L2.25985278,7.41537746 C2.22052387,7.41537746 2.22052387,7.41537746 2.22052387,7.37604855 L2.22052387,6.66812815 C2.22052387,6.62879924 2.22052387,6.62879924 2.25985278,6.62879924 L8.86710981,6.62879924 C8.90643872,6.62879924 8.90643872,6.62879924 8.90643872,6.66812815 L8.90643872,7.37604855 L8.86710981,7.41537746 Z" id="形状"></path>
 | 
			
		||||
                        <path d="M8.86710981,6.44841431 C9.00606257,6.44841431 9.08682365,6.5291754 9.08682365,6.66812815 L9.08682365,7.37604855 L9.03399013,7.50359996 L8.99466122,7.54292887 L8.86710981,7.59576239 L2.25985278,7.59576239 C2.12090003,7.59576239 2.04013894,7.51500131 2.04013894,7.37604855 L2.04013894,6.66812815 C2.04013894,6.5291754 2.12090003,6.44841431 2.25985278,6.44841431 L8.86710981,6.44841431 Z M8.72520451,6.80870958 L2.40090881,6.80870958 L2.40090881,7.23441802 L8.72520451,7.23441802 L8.72520451,6.80870958 Z M8.86710981,4.48196877 C9.00606257,4.48196877 9.08682365,4.56272985 9.08682365,4.70168261 L9.08682365,5.40960301 L9.03399013,5.53715441 L8.99466122,5.57648333 L8.86710981,5.62931685 L2.25985278,5.62931685 C2.12090003,5.62931685 2.04013894,5.54855576 2.04013894,5.40960301 L2.04013894,4.70168261 C2.04013894,4.56272985 2.12090003,4.48196877 2.25985278,4.48196877 L8.86710981,4.48196877 Z M8.72520451,4.84251382 L2.40090881,4.84251382 L2.40090881,5.26822226 L8.72520451,5.26822226 L8.72520451,4.84251382 Z M4.54092961,2.71216778 C4.66811215,2.71216778 4.76064346,2.77385532 4.76064346,2.91877199 L4.76064346,3.65291165 L4.68031808,3.80300099 L4.64098917,3.82922026 L4.54092961,3.85951586 L2.25985278,3.85951586 C2.18859958,3.85951586 2.12331983,3.83050264 2.08113204,3.77425225 C2.04130723,3.6964836 2.04130723,3.6964836 2.04013894,3.65291165 L2.04013894,2.91877199 C2.04013894,2.77385532 2.13267025,2.71216778 2.25985278,2.71216778 L4.54092961,2.71216778 Z M4.39957385,3.07293764 L2.40090881,3.07293764 L2.40090881,3.49864608 L4.39957385,3.49864608 L4.39957385,3.07293764 Z" id="形状"></path>
 | 
			
		||||
                        <path d="M3.50158987,12.5394187 L3.50158987,9.83587533 L0.88525753,9.83587533 L0.88525753,8.96376455 L3.93764526,8.96376455 C4.19927849,8.96376455 4.37370065,9.1381867 4.37370065,9.39981994 L4.37370065,12.5394187 L3.50158987,12.5394187 Z" id="路径"></path>
 | 
			
		||||
                    </g>
 | 
			
		||||
                </g>
 | 
			
		||||
            </g>
 | 
			
		||||
        </g>
 | 
			
		||||
    </g>
 | 
			
		||||
</svg>
 | 
			
		||||
| 
		 After Width: | Height: | Size: 5.8 KiB  | 
							
								
								
									
										14
									
								
								src/assets/icons/svg/return.svg
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										14
									
								
								src/assets/icons/svg/return.svg
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,14 @@
 | 
			
		||||
<?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>rollback</title>
 | 
			
		||||
    <g id="页面" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
 | 
			
		||||
        <g id="按钮与选择" transform="translate(-135.000000, -282.000000)" fill-rule="nonzero">
 | 
			
		||||
            <g id="编组-3" transform="translate(127.000000, 274.000000)">
 | 
			
		||||
                <g id="rollback" transform="translate(8.000000, 8.000000)">
 | 
			
		||||
                    <rect id="矩形" fill="#000000" opacity="0" x="0" y="0" width="16" height="16"></rect>
 | 
			
		||||
                    <path d="M11.390625,3.78125 L5.71875,3.78125 L5.71875,2.625 C5.71875,2.5203125 5.5984375,2.4625 5.5171875,2.5265625 L3.2984375,4.2765625 C3.234375,4.3265625 3.234375,4.4234375 3.2984375,4.4734375 L5.5171875,6.2234375 C5.5984375,6.2875 5.71875,6.2296875 5.71875,6.125 L5.71875,4.96875 L11.203125,4.96875 C11.7554097,4.96875 12.203125,5.41646525 12.203125,5.96875 L12.203125,11.3125 C12.203125,11.8647847 11.7554097,12.3125 11.203125,12.3125 L2.93775156,12.3125 L2.93775156,12.3125 C2.55569144,12.3125 2.36466138,12.4938859 2.36466138,12.8566576 C2.36466138,13.5 2.93775156,13.5 2.93775156,13.5 C2.93775156,13.5 5.75537604,13.5 11.390625,13.5 C13,13.5 13.390625,12.8986083 13.390625,11.9909216 L13.390625,4.96875 C13.390625,4.06071182 13,3.78125 11.390625,3.78125 Z" id="路径" fill="currentColor"></path>
 | 
			
		||||
                </g>
 | 
			
		||||
            </g>
 | 
			
		||||
        </g>
 | 
			
		||||
    </g>
 | 
			
		||||
</svg>
 | 
			
		||||
| 
		 After Width: | Height: | Size: 1.5 KiB  | 
@@ -37,6 +37,9 @@ $tabWidth: $tabW * 1px;
 | 
			
		||||
$rowHeight: $rowH * 1px;
 | 
			
		||||
$buttonHeight: $buttonH * 1px;
 | 
			
		||||
 | 
			
		||||
// 1080px 高度为基准的 1px
 | 
			
		||||
$base1px: 0.15vh; // 1px / 1080px;
 | 
			
		||||
 | 
			
		||||
// - - - - - 页面基础设置
 | 
			
		||||
.container {
 | 
			
		||||
	.login-code {
 | 
			
		||||
@@ -87,7 +90,7 @@ $buttonHeight: $buttonH * 1px;
 | 
			
		||||
		width: 100%;
 | 
			
		||||
		height: 100%;
 | 
			
		||||
		background-color: #ffffff;
 | 
			
		||||
		// box-shadow: 0px 16px 40px rgba(0, 0, 0, 0.07);
 | 
			
		||||
		// box-shadow: 0px calc(16 * 0.12vh) 40px rgba(0, 0, 0, 0.07);
 | 
			
		||||
		// border-radius: 20px;
 | 
			
		||||
		// 定位
 | 
			
		||||
		position: relative;
 | 
			
		||||
@@ -100,6 +103,7 @@ $buttonHeight: $buttonH * 1px;
 | 
			
		||||
			// 元素
 | 
			
		||||
			// width: $picWidth;
 | 
			
		||||
			height: $picHeight;
 | 
			
		||||
			// height: 10vh;
 | 
			
		||||
			background-image: url($picImage);
 | 
			
		||||
			background-repeat: no-repeat;
 | 
			
		||||
			background-size: 100% 100%;
 | 
			
		||||
@@ -118,7 +122,7 @@ $buttonHeight: $buttonH * 1px;
 | 
			
		||||
		}
 | 
			
		||||
		.field {
 | 
			
		||||
			position: relative;
 | 
			
		||||
			margin-top: 8%;
 | 
			
		||||
			margin-top: 14vh;
 | 
			
		||||
			flex: 2;
 | 
			
		||||
			// width: 800px;
 | 
			
		||||
			display: flex;
 | 
			
		||||
@@ -130,17 +134,36 @@ $buttonHeight: $buttonH * 1px;
 | 
			
		||||
				text-align: center;
 | 
			
		||||
				clear: both;
 | 
			
		||||
				position: relative;
 | 
			
		||||
				top: -36px;
 | 
			
		||||
				height: 128px;
 | 
			
		||||
				top: calc(-32 * $base1px);
 | 
			
		||||
				height: calc(128 * $base1px);
 | 
			
		||||
 | 
			
		||||
				.title {
 | 
			
		||||
					margin: 0;
 | 
			
		||||
					margin-left: 32px;
 | 
			
		||||
					margin-left: calc(28 * 0.12vh);
 | 
			
		||||
					font-weight: 400;
 | 
			
		||||
					user-select: none;
 | 
			
		||||
					color: #000;
 | 
			
		||||
					font-size: 36px;
 | 
			
		||||
					line-height: 54px;
 | 
			
		||||
					font-size: calc(28 * 0.12vh);
 | 
			
		||||
					line-height: calc(40 * 0.12vh);
 | 
			
		||||
					letter-spacing: calc(2 * 0.12vh);
 | 
			
		||||
 | 
			
		||||
					.cnbm_logo {
 | 
			
		||||
						height: calc(40 * 0.12vh);
 | 
			
		||||
						width: calc(40 * 0.12vh);
 | 
			
		||||
						position: relative;
 | 
			
		||||
						top: calc(8 * 0.12vh);
 | 
			
		||||
						right: calc(8 * 0.12vh);
 | 
			
		||||
					}
 | 
			
		||||
				}
 | 
			
		||||
 | 
			
		||||
				.sub-title {
 | 
			
		||||
					margin: 0;
 | 
			
		||||
					margin-left: calc(28 * 0.12vh);
 | 
			
		||||
					font-weight: 400;
 | 
			
		||||
					user-select: none;
 | 
			
		||||
					color: #000;
 | 
			
		||||
					font-size: calc(28 * 0.12vh);
 | 
			
		||||
					line-height: calc(48 * 0.12vh);
 | 
			
		||||
					letter-spacing: 2px;
 | 
			
		||||
				}
 | 
			
		||||
			}
 | 
			
		||||
@@ -159,10 +182,10 @@ $buttonHeight: $buttonH * 1px;
 | 
			
		||||
			.footer {
 | 
			
		||||
				user-select: none;
 | 
			
		||||
				// 元素
 | 
			
		||||
				margin: 12px 0;
 | 
			
		||||
				height: 16px;
 | 
			
		||||
				line-height: 16px;
 | 
			
		||||
				font-size: 12px;
 | 
			
		||||
				margin: calc(12 * 0.12vh) 0;
 | 
			
		||||
				height: calc(16 * 0.12vh);
 | 
			
		||||
				line-height: calc(16 * 0.12vh);
 | 
			
		||||
				font-size: calc(12 * 0.12vh);
 | 
			
		||||
				color: #8c8c8c;
 | 
			
		||||
 | 
			
		||||
				a,
 | 
			
		||||
@@ -176,12 +199,8 @@ $buttonHeight: $buttonH * 1px;
 | 
			
		||||
			.form {
 | 
			
		||||
				margin-top: 0;
 | 
			
		||||
				box-sizing: border-box;
 | 
			
		||||
				// width: $formWidth;
 | 
			
		||||
				width: 100%;
 | 
			
		||||
				// - - - tab
 | 
			
		||||
				:deep(.el-tabs__nav) {
 | 
			
		||||
					// background: #f0f3;
 | 
			
		||||
				}
 | 
			
		||||
 | 
			
		||||
				:deep(.el-tabs__content) {
 | 
			
		||||
					padding: 20px 0 0;
 | 
			
		||||
				}
 | 
			
		||||
@@ -189,12 +208,13 @@ $buttonHeight: $buttonH * 1px;
 | 
			
		||||
					user-select: none;
 | 
			
		||||
					// 元素
 | 
			
		||||
					width: $tabWidth;
 | 
			
		||||
					height: $rowHeight;
 | 
			
		||||
					// height: $rowHeight;
 | 
			
		||||
					height: calc(54 * 0.12vh);
 | 
			
		||||
					padding: 0;
 | 
			
		||||
					// 文字
 | 
			
		||||
					line-height: $rowHeight;
 | 
			
		||||
					color: #666666;
 | 
			
		||||
					font-size: 18px;
 | 
			
		||||
					font-size: calc(14 * 0.12vh);
 | 
			
		||||
					font-weight: 400;
 | 
			
		||||
					text-align: center;
 | 
			
		||||
				}
 | 
			
		||||
@@ -210,7 +230,8 @@ $buttonHeight: $buttonH * 1px;
 | 
			
		||||
				:deep(.el-input__inner) {
 | 
			
		||||
					// 元素
 | 
			
		||||
					width: 100%;
 | 
			
		||||
					height: $rowHeight;
 | 
			
		||||
					// height: $rowHeight;
 | 
			
		||||
					height: calc(72 * 0.12vh);
 | 
			
		||||
					background: #f5f5f5;
 | 
			
		||||
					border: 0;
 | 
			
		||||
					border-radius: 28px;
 | 
			
		||||
@@ -280,7 +301,7 @@ $buttonHeight: $buttonH * 1px;
 | 
			
		||||
					margin-bottom: 20px;
 | 
			
		||||
					// 文字
 | 
			
		||||
					line-height: 26px;
 | 
			
		||||
					font-size: 20px;
 | 
			
		||||
					font-size: calc(18 * 0.12vh);
 | 
			
		||||
					color: #ffffff;
 | 
			
		||||
				}
 | 
			
		||||
				.button-active {
 | 
			
		||||
@@ -299,13 +320,14 @@ $buttonHeight: $buttonH * 1px;
 | 
			
		||||
		:deep(.el-input__inner) {
 | 
			
		||||
			// 元素
 | 
			
		||||
			width: 420px;
 | 
			
		||||
			height: 66px;
 | 
			
		||||
			height: calc(52 * 0.12vh);
 | 
			
		||||
			// height: 66px;
 | 
			
		||||
			color: #262626;
 | 
			
		||||
			font-size: 18px;
 | 
			
		||||
			font-size: calc(14 * 0.12vh);
 | 
			
		||||
		}
 | 
			
		||||
		:deep(.el-checkbox__label) {
 | 
			
		||||
			font-size: 18px;
 | 
			
		||||
			line-height: 14px;
 | 
			
		||||
			font-size: calc(14 * 0.12vh);
 | 
			
		||||
			line-height: calc(12 * 0.12vh);
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
@@ -314,19 +336,42 @@ $buttonHeight: $buttonH * 1px;
 | 
			
		||||
@media screen and (min-width: 1920px) {
 | 
			
		||||
	.container {
 | 
			
		||||
		.content {
 | 
			
		||||
 | 
			
		||||
			.field {
 | 
			
		||||
				flex: initial;
 | 
			
		||||
				width: 800px;
 | 
			
		||||
				// width: 800px;
 | 
			
		||||
				width: 40vw;
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@media screen and (min-height: 1024px) {
 | 
			
		||||
	.container {
 | 
			
		||||
		.content {
 | 
			
		||||
			.field {
 | 
			
		||||
				margin-top: 16vh;
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@media screen and (max-height: 1024px) {
 | 
			
		||||
	.container {
 | 
			
		||||
		.content {
 | 
			
		||||
			.field {
 | 
			
		||||
				margin-top: 8vh;
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@media screen and (min-width: 599px) and (max-width: 1366px) {
 | 
			
		||||
	.container {
 | 
			
		||||
		min-width: 599px;
 | 
			
		||||
		// min-width: 599px;
 | 
			
		||||
		min-width: 42vw;
 | 
			
		||||
 | 
			
		||||
		.content {
 | 
			
		||||
			// width: 710px;
 | 
			
		||||
			// height: 397px;
 | 
			
		||||
@@ -337,6 +382,7 @@ $buttonHeight: $buttonH * 1px;
 | 
			
		||||
				display: none;
 | 
			
		||||
			}
 | 
			
		||||
			.field {
 | 
			
		||||
				// margin-top: 6vh;
 | 
			
		||||
				// width: calc(710px - 314px);
 | 
			
		||||
				// left: 314px;
 | 
			
		||||
				// justify-content: center;
 | 
			
		||||
@@ -363,6 +409,14 @@ $buttonHeight: $buttonH * 1px;
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// @media screen and (max-height: 1080px) {
 | 
			
		||||
// 	.container {
 | 
			
		||||
// 		.field {
 | 
			
		||||
// 			transform: scale(0.74);
 | 
			
		||||
// 		}
 | 
			
		||||
// 	}
 | 
			
		||||
// }
 | 
			
		||||
 | 
			
		||||
/* ===== MOBILE DESIGN ===== */
 | 
			
		||||
$mobileW: 375;
 | 
			
		||||
$mobileH: 812;
 | 
			
		||||
@@ -503,7 +557,7 @@ $iconBgImage: '../assets/images/icon.png';
 | 
			
		||||
 | 
			
		||||
		.footer {
 | 
			
		||||
			// 元素
 | 
			
		||||
			font-size: 12px;
 | 
			
		||||
			font-size: calc(12 * 0.12vh);
 | 
			
		||||
			font-family: PingFang SC;
 | 
			
		||||
			font-weight: 400;
 | 
			
		||||
			line-height: 17px;
 | 
			
		||||
@@ -511,7 +565,7 @@ $iconBgImage: '../assets/images/icon.png';
 | 
			
		||||
			opacity: 0.6;
 | 
			
		||||
			// 定位
 | 
			
		||||
			// position: absolute;
 | 
			
		||||
			bottom: -32px;
 | 
			
		||||
			bottom: -calc(32 * 0.12vh);
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -347,6 +347,8 @@ export default {
 | 
			
		||||
									console.log('setting code: ', response.data);
 | 
			
		||||
									// 处理输入框数据
 | 
			
		||||
									this.form[opt.prop] = response.data;
 | 
			
		||||
									// 更新下外部的 dataForm,防止code字段有数据也报空的bug
 | 
			
		||||
									this.$emit('update', this.form)
 | 
			
		||||
								}
 | 
			
		||||
							});
 | 
			
		||||
						}
 | 
			
		||||
 
 | 
			
		||||
@@ -33,6 +33,7 @@ export default {
 | 
			
		||||
			addUrl: '',
 | 
			
		||||
			pageUrl: '',
 | 
			
		||||
			infoUrl: '',
 | 
			
		||||
			deleteUrl: '',
 | 
			
		||||
			basePath: '',
 | 
			
		||||
			form: {}
 | 
			
		||||
		};
 | 
			
		||||
@@ -60,7 +61,7 @@ export default {
 | 
			
		||||
			return this.$axios({
 | 
			
		||||
				url,
 | 
			
		||||
				method,
 | 
			
		||||
				params: method === 'get' ? payload : null,
 | 
			
		||||
				params: (method === 'get' || method === 'delete') ? payload : null,
 | 
			
		||||
				data: method !== 'get' ? payload : null,
 | 
			
		||||
			})
 | 
			
		||||
		},
 | 
			
		||||
@@ -77,6 +78,7 @@ export default {
 | 
			
		||||
			return this.http(this.infoUrl == '' ? this.infoPath : this.infoUrl, 'get', payload);
 | 
			
		||||
		},
 | 
			
		||||
		del(payload) {
 | 
			
		||||
			debugger;
 | 
			
		||||
			return this.http(this.deleteUrl == '' ? this.deletePath : this.deleteUrl, 'delete', payload);
 | 
			
		||||
		},
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -163,7 +163,7 @@ input, textarea{
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
::-webkit-scrollbar-thumb {
 | 
			
		||||
  background-color: rgba(144,147,153,.5);
 | 
			
		||||
  background-color: #EDEDED;
 | 
			
		||||
  background-clip: padding-box;
 | 
			
		||||
  min-height: 28px;
 | 
			
		||||
  -webkit-border-radius: 2em;
 | 
			
		||||
@@ -174,7 +174,7 @@ input, textarea{
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
::-webkit-scrollbar-thumb:hover {
 | 
			
		||||
  background-color: rgba(144,147,153,.3);
 | 
			
		||||
  background-color: #D9D9D9;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// 抽屉head区域---start
 | 
			
		||||
 
 | 
			
		||||
@@ -2,7 +2,7 @@
 | 
			
		||||
 * @Author: zwq
 | 
			
		||||
 * @Date: 2021-07-19 15:18:30
 | 
			
		||||
 * @LastEditors: zhp
 | 
			
		||||
 * @LastEditTime: 2023-11-22 13:58:30
 | 
			
		||||
 * @LastEditTime: 2023-11-23 11:14:30
 | 
			
		||||
 * @Description:
 | 
			
		||||
-->
 | 
			
		||||
<template>
 | 
			
		||||
@@ -730,21 +730,21 @@ export default {
 | 
			
		||||
    }
 | 
			
		||||
  },
 | 
			
		||||
 | 
			
		||||
  // watch: {
 | 
			
		||||
  //   clientWidth(val) {
 | 
			
		||||
  //     if (!this.timer) {
 | 
			
		||||
  //       this.clientWidth = val
 | 
			
		||||
  //       this.beilv2 = this.clientWidth / 1920
 | 
			
		||||
  //       this.timer = true
 | 
			
		||||
  //       let _this = this
 | 
			
		||||
  //       setTimeout(function () {
 | 
			
		||||
  //         _this.timer = false
 | 
			
		||||
  //       }, 500)
 | 
			
		||||
  //     }
 | 
			
		||||
  //     // 这里可以添加修改时的方法
 | 
			
		||||
  //     this.windowWidth(val);
 | 
			
		||||
  //   }
 | 
			
		||||
  // },
 | 
			
		||||
  watch: {
 | 
			
		||||
    clientWidth(val) {
 | 
			
		||||
      if (!this.timer) {
 | 
			
		||||
        this.clientWidth = val
 | 
			
		||||
        this.beilv2 = this.clientWidth / 1920
 | 
			
		||||
        this.timer = true
 | 
			
		||||
        let _this = this
 | 
			
		||||
        setTimeout(function () {
 | 
			
		||||
          _this.timer = false
 | 
			
		||||
        }, 500)
 | 
			
		||||
      }
 | 
			
		||||
      // 这里可以添加修改时的方法
 | 
			
		||||
      this.windowWidth(val);
 | 
			
		||||
    }
 | 
			
		||||
  },
 | 
			
		||||
  created() {
 | 
			
		||||
    // this.fetchList('exception-alarm')
 | 
			
		||||
    // this.fetchList('inAndOutOfEachLine')
 | 
			
		||||
@@ -941,7 +941,7 @@ export default {
 | 
			
		||||
 | 
			
		||||
</style>
 | 
			
		||||
 | 
			
		||||
<style lang="scss">
 | 
			
		||||
<style lang="scss" >
 | 
			
		||||
.visual-container {
 | 
			
		||||
  ::-webkit-scrollbar {
 | 
			
		||||
    width: 8px;
 | 
			
		||||
 
 | 
			
		||||
@@ -60,7 +60,7 @@
 | 
			
		||||
                <el-col :style="{ margin: 8 + 'px' + ' 0' }" :span="24">
 | 
			
		||||
                  <base-container1 :beilv="1" :title="'设备状态监控'" :title-icon="'1_5'">
 | 
			
		||||
                    <div class="visual-select">
 | 
			
		||||
                      <el-select v-model="modelMonth" size="mini" placeholder="">
 | 
			
		||||
                      <el-select class="coldSelect" v-model="modelMonth" size="mini" placeholder="">
 | 
			
		||||
                        <el-option key="1" value="钢1线" label="钢1线" default />
 | 
			
		||||
                      </el-select>
 | 
			
		||||
                    </div>
 | 
			
		||||
@@ -634,21 +634,21 @@ export default {
 | 
			
		||||
      }
 | 
			
		||||
    }
 | 
			
		||||
  },
 | 
			
		||||
  watch: {
 | 
			
		||||
    clientWidth(val) {
 | 
			
		||||
      if (!this.timer) {
 | 
			
		||||
        this.clientWidth = val
 | 
			
		||||
        this.beilv2 = this.clientWidth / 1920
 | 
			
		||||
        this.timer = true
 | 
			
		||||
        let _this = this
 | 
			
		||||
        setTimeout(function () {
 | 
			
		||||
          _this.timer = false
 | 
			
		||||
        }, 500)
 | 
			
		||||
      }
 | 
			
		||||
      // 这里可以添加修改时的方法
 | 
			
		||||
      this.windowWidth(val);
 | 
			
		||||
    }
 | 
			
		||||
  },
 | 
			
		||||
  // watch: {
 | 
			
		||||
  //   clientWidth(val) {
 | 
			
		||||
  //     if (!this.timer) {
 | 
			
		||||
  //       this.clientWidth = val
 | 
			
		||||
  //       this.beilv2 = this.clientWidth / 1920
 | 
			
		||||
  //       this.timer = true
 | 
			
		||||
  //       let _this = this
 | 
			
		||||
  //       setTimeout(function () {
 | 
			
		||||
  //         _this.timer = false
 | 
			
		||||
  //       }, 500)
 | 
			
		||||
  //     }
 | 
			
		||||
  //     // 这里可以添加修改时的方法
 | 
			
		||||
  //     this.windowWidth(val);
 | 
			
		||||
  //   }
 | 
			
		||||
  // },
 | 
			
		||||
  created() {
 | 
			
		||||
    // this.fetchList('exception-alarm')
 | 
			
		||||
    // this.fetchList('inAndOutOfEachLine')
 | 
			
		||||
@@ -658,6 +658,7 @@ export default {
 | 
			
		||||
    this.windowWidth(document.documentElement.clientWidth)
 | 
			
		||||
  },
 | 
			
		||||
  mounted() {
 | 
			
		||||
    console.log(1111);
 | 
			
		||||
    const _this = this;
 | 
			
		||||
    _this.beilv2 = document.documentElement.clientWidth / 1920
 | 
			
		||||
    window.onresize = () => {
 | 
			
		||||
@@ -686,6 +687,7 @@ export default {
 | 
			
		||||
  methods: {
 | 
			
		||||
    windowWidth(value) {
 | 
			
		||||
      this.clientWidth = value
 | 
			
		||||
      this.beilv2 = this.clientWidth / 1920
 | 
			
		||||
    },
 | 
			
		||||
    // erd.listenTo(document.getElementById("box"), (element) => {
 | 
			
		||||
    //   var width = element.offsetWidth;
 | 
			
		||||
@@ -1057,7 +1059,7 @@ export default {
 | 
			
		||||
}
 | 
			
		||||
</style>
 | 
			
		||||
 | 
			
		||||
<style lang="scss">
 | 
			
		||||
<style lang="scss" >
 | 
			
		||||
.visual-container {
 | 
			
		||||
  ::-webkit-scrollbar {
 | 
			
		||||
    width: 8px;
 | 
			
		||||
@@ -1096,23 +1098,25 @@ export default {
 | 
			
		||||
    background-color: rgba($color: #5bc4be, $alpha: 1);
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
     .el-input {
 | 
			
		||||
       min-height: 10px;
 | 
			
		||||
     }
 | 
			
		||||
.coldSelect{
 | 
			
		||||
  .el-input {
 | 
			
		||||
      min-height: 10px;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
     .el-input__inner {
 | 
			
		||||
       background-color: rgba($color: #31878c, $alpha: 0.29);
 | 
			
		||||
       border: rgba($color: #31878c, $alpha: 0.29);
 | 
			
		||||
       color: aliceblue;
 | 
			
		||||
     }
 | 
			
		||||
    .el-input__inner {
 | 
			
		||||
      background-color: rgba($color: #31878c, $alpha: 0.29);
 | 
			
		||||
      border: rgba($color: #31878c, $alpha: 0.29);
 | 
			
		||||
      color: aliceblue;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
     .el-divider--vertical {
 | 
			
		||||
       height: 174px;
 | 
			
		||||
       width: 1px;
 | 
			
		||||
       border: rgba(255, 255, 255, 0.15);
 | 
			
		||||
       color: rgba(255, 255, 255, 0.15);
 | 
			
		||||
       margin-left: 3em;
 | 
			
		||||
     }
 | 
			
		||||
    .el-divider--vertical {
 | 
			
		||||
      height: 174px;
 | 
			
		||||
      width: 1px;
 | 
			
		||||
      border: rgba(255, 255, 255, 0.15);
 | 
			
		||||
      color: rgba(255, 255, 255, 0.15);
 | 
			
		||||
      margin-left: 3em;
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
</style>
 | 
			
		||||
 | 
			
		||||
<style scoped>
 | 
			
		||||
 
 | 
			
		||||
@@ -2,7 +2,7 @@
 | 
			
		||||
 * @Author: zwq
 | 
			
		||||
 * @Date: 2021-07-19 15:18:30
 | 
			
		||||
 * @LastEditors: zhp
 | 
			
		||||
 * @LastEditTime: 2023-10-17 11:10:22
 | 
			
		||||
 * @LastEditTime: 2023-11-23 11:11:35
 | 
			
		||||
 * @Description:
 | 
			
		||||
-->
 | 
			
		||||
<template>
 | 
			
		||||
@@ -44,7 +44,7 @@
 | 
			
		||||
        <el-col :style="{ margin: 8 + 'px' + ' 0' }" :span="8">
 | 
			
		||||
          <base-container :title="'各工序缺陷汇总'" :title-icon="'5_2'">
 | 
			
		||||
            <div class="visual-select">
 | 
			
		||||
              <el-select v-model="modelMonth" size="mini" placeholder="">
 | 
			
		||||
              <el-select class="coldSelect" v-model="modelMonth" size="mini" placeholder="">
 | 
			
		||||
                <el-option key="1" value="钢1线" label="钢1线" default />
 | 
			
		||||
              </el-select>
 | 
			
		||||
            </div>
 | 
			
		||||
@@ -740,16 +740,16 @@ export default {
 | 
			
		||||
    // this.fetchList('order-process')
 | 
			
		||||
    // this.fetchList('line-chart-data')
 | 
			
		||||
    this.init()
 | 
			
		||||
    this.windowWidth(document.documentElement.clientWidth)
 | 
			
		||||
  },
 | 
			
		||||
  mounted() {
 | 
			
		||||
    const _this = this;
 | 
			
		||||
    window.onresize = () => {
 | 
			
		||||
      return (() => {
 | 
			
		||||
        _this.clientWidth = `${document.documentElement.clientWidth}`
 | 
			
		||||
        this.beilv2 = _this.clientWidth / 1920
 | 
			
		||||
      })()
 | 
			
		||||
    }
 | 
			
		||||
    this.windowWidth(document.documentElement.clientWidth)
 | 
			
		||||
    // const _this = this;
 | 
			
		||||
    // window.onresize = () => {
 | 
			
		||||
    //   return (() => {
 | 
			
		||||
    //     _this.clientWidth = `${document.documentElement.clientWidth}`
 | 
			
		||||
    //     this.beilv2 = _this.clientWidth / 1920
 | 
			
		||||
    //   })()
 | 
			
		||||
    // }
 | 
			
		||||
    // this.beilv2 = window.innerWidth / 1920
 | 
			
		||||
    // addEventListener('resize', resizeFun = () => {
 | 
			
		||||
    //   this.beilv2 = window.innerWidth / 1920
 | 
			
		||||
@@ -770,6 +770,7 @@ export default {
 | 
			
		||||
  methods: {
 | 
			
		||||
    windowWidth(value) {
 | 
			
		||||
      this.clientWidth = value
 | 
			
		||||
      this.beilv2 = this.clientWidth / 1920
 | 
			
		||||
    },
 | 
			
		||||
    // fetchList(type) {
 | 
			
		||||
    //   switch (type) {
 | 
			
		||||
@@ -932,7 +933,8 @@ export default {
 | 
			
		||||
    background-color: rgba($color: #5bc4be, $alpha: 1);
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
    .el-input {
 | 
			
		||||
.coldSelect{
 | 
			
		||||
  .el-input {
 | 
			
		||||
      min-height: 10px;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
@@ -949,6 +951,7 @@ export default {
 | 
			
		||||
      color: rgba(255, 255, 255, 0.15);
 | 
			
		||||
      margin-left: 3em;
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
</style>
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -288,10 +288,10 @@ export default {
 | 
			
		||||
				[
 | 
			
		||||
					{
 | 
			
		||||
						input: true,
 | 
			
		||||
						label: '产品加工时间(s)',
 | 
			
		||||
						label: '单件产品加工时间(s)',
 | 
			
		||||
						prop: 'processingTime',
 | 
			
		||||
						rules: [
 | 
			
		||||
							{ required: true, message: '产品加工时间不能为空', trigger: 'blur' },
 | 
			
		||||
							{ required: true, message: '单件产品加工时间不能为空', trigger: 'blur' },
 | 
			
		||||
							{
 | 
			
		||||
								type: 'number',
 | 
			
		||||
								message: '请输入正确的数字值',
 | 
			
		||||
@@ -319,9 +319,16 @@ export default {
 | 
			
		||||
						prop: 'description',
 | 
			
		||||
					},
 | 
			
		||||
				],
 | 
			
		||||
				[
 | 
			
		||||
					{
 | 
			
		||||
						upload: true,
 | 
			
		||||
						label: '上传资料',
 | 
			
		||||
						prop: 'files',
 | 
			
		||||
					},
 | 
			
		||||
				],
 | 
			
		||||
				[
 | 
			
		||||
					{ input: true, label: '备注', prop: 'remark' }
 | 
			
		||||
				]
 | 
			
		||||
				],
 | 
			
		||||
				// [
 | 
			
		||||
				// 	{
 | 
			
		||||
				// 		assetUpload: true,
 | 
			
		||||
 
 | 
			
		||||
@@ -189,6 +189,10 @@ export default {
 | 
			
		||||
						],
 | 
			
		||||
						label: '产线统计类型',
 | 
			
		||||
						prop: 'lineDataType',
 | 
			
		||||
						bind: {
 | 
			
		||||
							clearable: true, filterable: true
 | 
			
		||||
						},
 | 
			
		||||
						rules: [{ required: true, message: '产线统计类型不能为空', trigger: 'change' }],
 | 
			
		||||
					},
 | 
			
		||||
					{
 | 
			
		||||
						select: true,
 | 
			
		||||
@@ -199,6 +203,10 @@ export default {
 | 
			
		||||
						],
 | 
			
		||||
						label: '工段统计类型',
 | 
			
		||||
						prop: 'sectionDataType',
 | 
			
		||||
						bind: {
 | 
			
		||||
							clearable: true, filterable: true
 | 
			
		||||
						},
 | 
			
		||||
						rules: [{ required: true, message: '工段统计类型不能为空', trigger: 'change' }],
 | 
			
		||||
					},
 | 
			
		||||
				],
 | 
			
		||||
			],
 | 
			
		||||
 
 | 
			
		||||
@@ -144,8 +144,8 @@ export default {
 | 
			
		||||
    getDataList() {
 | 
			
		||||
      this.dataListLoading = true;
 | 
			
		||||
      this.urlOptions.getDataListURL(this.listQuery).then(response => {
 | 
			
		||||
        this.tableData = response.data.list;
 | 
			
		||||
				// this.getStatus(response.data.list)
 | 
			
		||||
        // this.tableData = response.data.list;
 | 
			
		||||
				this.getStatus(response.data.list)
 | 
			
		||||
        this.listQuery.total = response.data.total;
 | 
			
		||||
        this.dataListLoading = false;
 | 
			
		||||
      });
 | 
			
		||||
 
 | 
			
		||||
@@ -2,7 +2,7 @@
 | 
			
		||||
 * @Author: zwq
 | 
			
		||||
 * @Date: 2021-11-18 14:16:25
 | 
			
		||||
 * @LastEditors: DY
 | 
			
		||||
 * @LastEditTime: 2023-11-20 16:51:24
 | 
			
		||||
 * @LastEditTime: 2023-11-24 18:20:26
 | 
			
		||||
 * @Description:
 | 
			
		||||
-->
 | 
			
		||||
<template>
 | 
			
		||||
@@ -29,11 +29,10 @@
 | 
			
		||||
 | 
			
		||||
				<div class="action_btn">
 | 
			
		||||
					<template>
 | 
			
		||||
						<span style="display: inline-block;" @click="addNew()">
 | 
			
		||||
							<svg-icon style="width: 14px; height: 14px" class="item-icon" icon-class="table_add" />
 | 
			
		||||
							<span class="add">添加</span>
 | 
			
		||||
						</span>
 | 
			
		||||
					</template>
 | 
			
		||||
            <span style="display: inline-block;">
 | 
			
		||||
              <el-button type="text" @click="addNew()" icon="el-icon-plus">添加</el-button>
 | 
			
		||||
            </span>
 | 
			
		||||
          </template>
 | 
			
		||||
				</div>
 | 
			
		||||
				<base-table
 | 
			
		||||
					:table-props="tableProps"
 | 
			
		||||
@@ -298,7 +297,7 @@ export default {
 | 
			
		||||
}
 | 
			
		||||
.action_btn {
 | 
			
		||||
  float: right;
 | 
			
		||||
  margin: 5px 15px;
 | 
			
		||||
  margin: -40px 15px;
 | 
			
		||||
  font-size: 14px;
 | 
			
		||||
}
 | 
			
		||||
.add {
 | 
			
		||||
 
 | 
			
		||||
@@ -311,11 +311,11 @@ export default {
 | 
			
		||||
      if (val) {
 | 
			
		||||
        this.productList.map(item => {
 | 
			
		||||
          if (val === item.id) {
 | 
			
		||||
            this.dataForm.productSpec = item.specifications
 | 
			
		||||
            this.dataForm.specifications = item.specifications
 | 
			
		||||
          }
 | 
			
		||||
        })
 | 
			
		||||
      } else {
 | 
			
		||||
        this.dataForm.productSpec = ''
 | 
			
		||||
        this.dataForm.specifications = ''
 | 
			
		||||
      }
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
 
 | 
			
		||||
@@ -2,7 +2,7 @@
 | 
			
		||||
 * @Author: zwq
 | 
			
		||||
 * @Date: 2021-11-18 14:16:25
 | 
			
		||||
 * @LastEditors: DY
 | 
			
		||||
 * @LastEditTime: 2023-11-22 09:47:53
 | 
			
		||||
 * @LastEditTime: 2023-11-23 18:45:15
 | 
			
		||||
 * @Description:
 | 
			
		||||
-->
 | 
			
		||||
<template>
 | 
			
		||||
@@ -49,7 +49,9 @@
 | 
			
		||||
				</el-row>
 | 
			
		||||
				<el-row :gutter="20">
 | 
			
		||||
					<el-col :span="8">负责人:{{ dataForm.workers }}</el-col>
 | 
			
		||||
					<el-col :span="8">关联产线:{{ dataForm.productLineNames }}</el-col>
 | 
			
		||||
					<el-col :span="8">关联产线:
 | 
			
		||||
						<span v-for="(item, index) in dataForm.productLineNames" :key="index" style="margin-right: 10px">{{ item }}</span>
 | 
			
		||||
					</el-col>
 | 
			
		||||
					<el-col :span="8">物料计算方式:{{ dataForm.materialMethod === 1 ? '产品基础' : dataForm.materialMethod === 2 ? '工艺扩展' : '' }}</el-col>
 | 
			
		||||
				</el-row>
 | 
			
		||||
				<el-row :gutter="20">
 | 
			
		||||
 
 | 
			
		||||
@@ -2,7 +2,7 @@
 | 
			
		||||
 * @Author: zwq
 | 
			
		||||
 * @Date: 2021-11-18 14:16:25
 | 
			
		||||
 * @LastEditors: DY
 | 
			
		||||
 * @LastEditTime: 2023-11-22 10:26:58
 | 
			
		||||
 * @LastEditTime: 2023-11-24 18:13:02
 | 
			
		||||
 * @Description:
 | 
			
		||||
-->
 | 
			
		||||
<template>
 | 
			
		||||
@@ -196,7 +196,7 @@ export default {
 | 
			
		||||
				workCost: undefined,
 | 
			
		||||
        remark: undefined,
 | 
			
		||||
			},
 | 
			
		||||
			majorIdList: undefined,
 | 
			
		||||
			majorIdList: [],
 | 
			
		||||
			departmentlList: [],
 | 
			
		||||
			menuOptions: [],
 | 
			
		||||
			bindIds: [],
 | 
			
		||||
@@ -267,7 +267,7 @@ export default {
 | 
			
		||||
				workCost: undefined,
 | 
			
		||||
        remark: undefined
 | 
			
		||||
			}
 | 
			
		||||
			this.majorIdList = undefined
 | 
			
		||||
			this.majorIdList = []
 | 
			
		||||
		},
 | 
			
		||||
		// 表单提交
 | 
			
		||||
    dataFormSubmit() {
 | 
			
		||||
@@ -288,24 +288,28 @@ export default {
 | 
			
		||||
            this.visible = false;
 | 
			
		||||
            this.$emit("refreshDataList");
 | 
			
		||||
          });
 | 
			
		||||
					this.majorIdList.forEach(majorId => {
 | 
			
		||||
						createWoBindMa({
 | 
			
		||||
							workerId: this.dataForm.id,
 | 
			
		||||
							majorId: majorId
 | 
			
		||||
						}).then(res => {})
 | 
			
		||||
					});
 | 
			
		||||
					if (this.majorIdList.length > 0) {
 | 
			
		||||
						this.majorIdList.forEach(majorId => {
 | 
			
		||||
							createWoBindMa({
 | 
			
		||||
								workerId: this.dataForm.id,
 | 
			
		||||
								majorId: majorId
 | 
			
		||||
							}).then(res => {})
 | 
			
		||||
						});
 | 
			
		||||
					}
 | 
			
		||||
          return;
 | 
			
		||||
        }
 | 
			
		||||
        // 添加的提交
 | 
			
		||||
        this.urlOptions.createURL(this.dataForm).then(response => {
 | 
			
		||||
					// response.data = id
 | 
			
		||||
					this.workerId = response.data
 | 
			
		||||
					this.majorIdList.forEach(majorId => {
 | 
			
		||||
						createWoBindMa({
 | 
			
		||||
							workerId: this.workerId,
 | 
			
		||||
							majorId: majorId
 | 
			
		||||
						}).then(res => {})
 | 
			
		||||
					});
 | 
			
		||||
					if (this.majorIdList.length > 0) {
 | 
			
		||||
						this.majorIdList.forEach(majorId => {
 | 
			
		||||
							createWoBindMa({
 | 
			
		||||
								workerId: this.workerId,
 | 
			
		||||
								majorId: majorId
 | 
			
		||||
							}).then(res => {})
 | 
			
		||||
						});
 | 
			
		||||
					}
 | 
			
		||||
          this.$modal.msgSuccess("新增成功");
 | 
			
		||||
          this.visible = false;
 | 
			
		||||
          this.$emit("refreshDataList");
 | 
			
		||||
@@ -324,6 +328,7 @@ export default {
 | 
			
		||||
        if (this.dataForm.id) {
 | 
			
		||||
          this.urlOptions.infoURL(id).then(response => {
 | 
			
		||||
            this.dataForm = response.data;
 | 
			
		||||
						this.dataForm.departmentName = undefined
 | 
			
		||||
          });
 | 
			
		||||
					// 获取员工--专业
 | 
			
		||||
					getWoBindMaPage({
 | 
			
		||||
 
 | 
			
		||||
@@ -202,12 +202,11 @@ export default {
 | 
			
		||||
    }
 | 
			
		||||
  },
 | 
			
		||||
  created() {
 | 
			
		||||
    // this.init()
 | 
			
		||||
    // console.log('aaaaaa')
 | 
			
		||||
    // this.otherPaper()
 | 
			
		||||
    // $('.hiprintEpContainer').empty()
 | 
			
		||||
  },
 | 
			
		||||
  destroyed () {
 | 
			
		||||
    $('.hiprintEpContainer').empty()
 | 
			
		||||
    console.log(11111)
 | 
			
		||||
  },
 | 
			
		||||
  methods: {
 | 
			
		||||
    // handleClose() {
 | 
			
		||||
@@ -215,6 +214,7 @@ export default {
 | 
			
		||||
    // },
 | 
			
		||||
    closed() {
 | 
			
		||||
      $('.hiprintEpContainer').empty()
 | 
			
		||||
      $('.hiprint-printTemplate').empty()
 | 
			
		||||
    },
 | 
			
		||||
    init(data) {
 | 
			
		||||
      this.drawer = true
 | 
			
		||||
@@ -256,17 +256,17 @@ export default {
 | 
			
		||||
 | 
			
		||||
        // console.log(this.modelData)
 | 
			
		||||
        // console.log($('#hiprint-printTemplate').empty())
 | 
			
		||||
        if (this.modelData != {}) {
 | 
			
		||||
          console.log(this.modelData);
 | 
			
		||||
          $('.hiprintEpContainer').empty()
 | 
			
		||||
          hiprint.PrintElementTypeManager.build('.hiprintEpContainer', provider.value)
 | 
			
		||||
          $('.hiprint-printTemplate').empty()
 | 
			
		||||
          hiprintTemplate = new hiprint.PrintTemplate({
 | 
			
		||||
            template: JSON.parse(this.modelData),
 | 
			
		||||
            settingContainer: '#PrintElementOptionSetting',
 | 
			
		||||
            paginationContainer: '.hiprint-printPagination'
 | 
			
		||||
          })
 | 
			
		||||
        } else {
 | 
			
		||||
        // if () {
 | 
			
		||||
          // console.log(this.modelData);
 | 
			
		||||
          // $('.hiprintEpContainer').empty()
 | 
			
		||||
          // hiprint.PrintElementTypeManager.build('.hiprintEpContainer', provider.value)
 | 
			
		||||
          // $('.hiprint-printTemplate').empty()
 | 
			
		||||
          // hiprintTemplate = new hiprint.PrintTemplate({
 | 
			
		||||
          //   template: JSON.parse(this.modelData),
 | 
			
		||||
          //   settingContainer: '#PrintElementOptionSetting',
 | 
			
		||||
          //   paginationContainer: '.hiprint-printPagination'
 | 
			
		||||
          // })
 | 
			
		||||
        // } else {
 | 
			
		||||
          $('.hiprintEpContainer').empty()
 | 
			
		||||
          console.log(this.modelData);
 | 
			
		||||
          hiprint.PrintElementTypeManager.build('.hiprintEpContainer', provider.value)
 | 
			
		||||
@@ -275,11 +275,11 @@ export default {
 | 
			
		||||
          const template = provider.value
 | 
			
		||||
          // console.log(template)
 | 
			
		||||
          hiprintTemplate = new hiprint.PrintTemplate({
 | 
			
		||||
            template: template,
 | 
			
		||||
            template: this.modelData != '' ? JSON.parse(this.modelData) : {},
 | 
			
		||||
            settingContainer: '#PrintElementOptionSetting',
 | 
			
		||||
            paginationContainer: '.hiprint-printPagination'
 | 
			
		||||
          })
 | 
			
		||||
        }
 | 
			
		||||
        // }
 | 
			
		||||
        hiprintTemplate.design('#hiprint-printTemplate')
 | 
			
		||||
        // console.log(hiprintTemplate)
 | 
			
		||||
        console.log(hiprintTemplate);
 | 
			
		||||
 
 | 
			
		||||
@@ -236,212 +236,10 @@ export const aProvider = function (ops) {
 | 
			
		||||
  };
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
// 自定义设计元素2
 | 
			
		||||
export const bProvider = function (ops) {
 | 
			
		||||
  var addElementTypes = function (context) {
 | 
			
		||||
    context.removePrintElementTypes("bProviderModule");
 | 
			
		||||
    context.addPrintElementTypes(
 | 
			
		||||
      "bProviderModule",
 | 
			
		||||
      [
 | 
			
		||||
        new hiprint.PrintElementTypeGroup("常规", [
 | 
			
		||||
          {
 | 
			
		||||
            tid: 'bProviderModule.header', title: '单据表头', data: '单据表头', type: 'text',
 | 
			
		||||
            options: {
 | 
			
		||||
              testData: '单据表头',
 | 
			
		||||
              height: 17,
 | 
			
		||||
              fontSize: 16.5,
 | 
			
		||||
              fontWeight: "700",
 | 
			
		||||
              textAlign: "center",
 | 
			
		||||
              hideTitle: true
 | 
			
		||||
            }
 | 
			
		||||
          },
 | 
			
		||||
          {
 | 
			
		||||
            tid: 'bProviderModule.type', title: '单据类型', data: '单据类型', type: 'text',
 | 
			
		||||
            options: {
 | 
			
		||||
              testData: '单据类型',
 | 
			
		||||
              height: 16,
 | 
			
		||||
              fontSize: 15,
 | 
			
		||||
              fontWeight: "700",
 | 
			
		||||
              textAlign: "center",
 | 
			
		||||
              hideTitle: true
 | 
			
		||||
            }
 | 
			
		||||
          },
 | 
			
		||||
          {
 | 
			
		||||
            tid: 'bProviderModule.order', title: '订单编号', data: 'XS888888888', type: 'text',
 | 
			
		||||
            options: {
 | 
			
		||||
              field: 'orderId',
 | 
			
		||||
              testData: 'XS888888888',
 | 
			
		||||
              height: 16,
 | 
			
		||||
              fontSize: 6.75,
 | 
			
		||||
              fontWeight: "700",
 | 
			
		||||
              textAlign: "left",
 | 
			
		||||
              textContentVerticalAlign: "middle"
 | 
			
		||||
            }
 | 
			
		||||
          },
 | 
			
		||||
          {
 | 
			
		||||
            tid: 'bProviderModule.date', title: '业务日期', data: '2020-01-01', type: 'text',
 | 
			
		||||
            options: {
 | 
			
		||||
              field: 'date',
 | 
			
		||||
              testData: '2020-01-01',
 | 
			
		||||
              height: 16,
 | 
			
		||||
              fontSize: 6.75,
 | 
			
		||||
              fontWeight: "700",
 | 
			
		||||
              textAlign: "left",
 | 
			
		||||
              textContentVerticalAlign: "middle"
 | 
			
		||||
            }
 | 
			
		||||
          },
 | 
			
		||||
          {
 | 
			
		||||
            tid: 'bProviderModule.barcode', title: '条形码', data: 'XS888888888', type: 'text',
 | 
			
		||||
            options: {
 | 
			
		||||
              field: 'barcode',
 | 
			
		||||
              testData: 'XS888888888',
 | 
			
		||||
              height: 32,
 | 
			
		||||
              fontSize: 12,
 | 
			
		||||
              lineHeight: 18,
 | 
			
		||||
              textType: "barcode"
 | 
			
		||||
            }
 | 
			
		||||
          },
 | 
			
		||||
          {
 | 
			
		||||
            tid: 'bProviderModule.qrcode', title: '二维码', data: 'XS888888888', type: 'text',
 | 
			
		||||
            options: {
 | 
			
		||||
              field: 'qrcode',
 | 
			
		||||
              testData: 'XS888888888',
 | 
			
		||||
              height: 32,
 | 
			
		||||
              fontSize: 12,
 | 
			
		||||
              lineHeight: 18,
 | 
			
		||||
              textType: "qrcode"
 | 
			
		||||
            }
 | 
			
		||||
          },
 | 
			
		||||
          {
 | 
			
		||||
            tid: 'bProviderModule.platform', title: '平台名称', data: '平台名称', type: 'text',
 | 
			
		||||
            options: {
 | 
			
		||||
              testData: '平台名称',
 | 
			
		||||
              height: 17,
 | 
			
		||||
              fontSize: 16.5,
 | 
			
		||||
              fontWeight: "700",
 | 
			
		||||
              textAlign: "center",
 | 
			
		||||
              hideTitle: true
 | 
			
		||||
            }
 | 
			
		||||
          },
 | 
			
		||||
          {tid: 'bProviderModule.image',  title: 'Logo', data: 'data: image/png;base64iVBORw0KGgoAAAANSUhEUgAAAGQAAABkCAYAAABw4pVUAAAHVklEQVR4nO2dT2wUVRzHv2/2T5eSAlvFilwgQUH+eLACaUxEiJLAxdh44MDZi2ChUIrSFtoCgbbSP4GDdwgeEA8kRTAI0iIGBL1ITLxgLAlCsCKBYndnx7zd35pl2+7On/de387OJ9l00515/z7z/szMmzfs7869mD0yCjw2gZAB4VhAiln4/dUaRGdU18aOnzw9dn24ioGJj0soFsJr1z2yNm+qN2/fvRFL8XyMYqTmFfxZ+TwMc1xKDsL/f2Ms8xGeLwuIRpCKx99MHf/i4uPrw5GQ9jIAfsCMXfw2HkuOX03Wb1qLh4+uIGFJjzecPoS5iEhUTg1hDMaM2GuRk6cGMTQUCYmPQQq86CMAkkPDkQirGAzXf7Du34ejN9IHmETCRjQGPL6D+4NnYDEJDQmXbaY6on/dm2Vm/jHdZe0Almm6Ll+YNQbzasX7765BNHI1o0sOYRghwExg7MG9dDQSiqsdwHuZmlFKMjLwQ3QcFtjlSxHTenLO3Lp7vfU09AOS41Ka+HC6CjIDIaqmguvIPgBtIgOcDhjVlMTQtarKOScumR/teCdpxoeNZGJCapjFt7Rcywrb2MYtnQBatCpZTzCkYCF+5suKRXf+6EvOmv0GSzwrhB/QpmGkBYZSpqvIZAlp8ZeMLFwKUH3z2gqWyd/+3F/5b1yRQQMCN8gQspeaKt+SAItSCxCiPjIjhDEkjRAMxmCZSbgZkYke537qdxl57KM8C0OkkD0ADohMXIlwgPIuBFFC9uS3p2XGflFSRAgpdxlZeBl84jUQr0ImjDTKGWZZBwE0eCkCL0J20UgjgGCwEDHNPjB86PbiilshfGRxOBCRD0tLCSWTnzMLO9yE4EbIzjIdTdmGpc8/rB4qK0c4FcKbqe7pyWZJ0k1lZhsnQnZq3EzV00dHDjupKXaFNGtcM7YA+Io+WzRIz2R0UxkWxY6QJgCHlCbfPlzAsZytj2ks5RCVZUGKCdkOoEt+Wl3RkCcjyzGv5wIS6aIynZJCQni7d0TTjPFaMFDg9wGNa8qRQn3KVEI+1rjPmKpm5KNzTemmMp7AZEK2AehXmz7bbC1SM/IZoH10pJ/K+hnyhXBrvZpmoBHAURf7HaV9daQ3v6Zk7hhWVr4AYDOAzzRNeKPHAyW7r459Yj/deUynMcyqqpY9/fXW+RTwkiF/ms5pADcd7nMbwAkBcfMM3wOwwOF+rys46TxCt+T72d2NG0YSg2fnC58ANDkbAZyVH41QNgAYVBTXNiMxeLYG6qawvagmGqGoTHOfwcAe6T8TvWwYlTC7OsALgRDNCIRoRiBEMwIhmhEI0YxAiGYEQjRDtZCY9iUyEaVpVi3kvuL4RKA0zSqF8Ad5TimMTxSnKO1KUCWEZ6hDVaYk0KFKigohbSUuI0uHiieKZQtp89kM+U7ZUmQKafHp4wpSH/eWJaTT5zPkD8g62GQI8cXqDTZok/HEsWgh+3Of2y4D2kU/0idKyEOaJdgqKLxSotXlfLFJESXkicKZGTrys6g0iRIyD8AvAFYLCq+UWC1yACOyD+Hrf1wAUCcwTN2pozzXiEqn6E59JoBvANQKDldHaimvM0WmTcawlydw2Oc1pY7yKFQGJJ4YxqiTXyEp/OlkBeVNyn0SmZdO5gC47rOOfjXlaY6sCGRfXKwA8LVP+pRaykuFzEhUXH7nR9P3AFYqiEsWKykP0mpGFlU3qKI0IlmlKD6RrKK0R1VEpvIW7uwSHXnVUdqVoHqSwz+K4xOB0jQH87I0IxCiGYEQzQiEaEYgRDMCIZoRCNGMQIhmBEI0gwuJK0xScKZemHiY1mzqUxThYgBLHO7zQOAzGnMBPOdwn8WC4rbDNjaSWVajQaEUp9wBsB7ALY/hLAVwHsB89VmwRXrhuGwf0q/xIl/z6f6105qVyxIKQ1cZjdlV/HI79V6N1yjk/dxlAMtc7LuM9lXZVzqhIXdxtvxR1kCxZUynkbl0o2ihgyQspH3mapqn7flrSE427O3TuKbwGZI/AlhuY9vltO08Belyw6T99lTnIQN2VmGeJqppskGhpfoW0DbVmuahaarVVQudGPZo3tH/RCOnfJbSbzp34D1T/VjsTL3X6esWFMJngJwDsCgnykX0P+mzQ1yyq9jqqtnzkGI0a7wgPz9pfJm+/6ZxB77bzus+7L7pkwdkarr8OBdwJee7jjQVaqZysVtDsuwK3j3lmGYnb5hwerW3S+PRl440OX3dh5vL7z0iXzXqY/bYbaZycXs/5KDdV/iUKc1URo7xcoOqq0yfui1Gq5e3EoUava1qzS/aJQGs8xKIj2jx+gCoVyGcoUBKGs8yIEgIAiliZEDwJAehL3ovIYS+2F9UDckyRH/fFhmoxuwTvdaJaCGc7+gyi9+br1YZSzTJEAIaffHrZG/JCFwDpK16JEsI5yK9uMdvzVe7zAUxZQrhXKKBwxqZkSikQ8aiZbnIFgKS4oea0i5bBhQJgQ+kKJEBhUJAUkqxo+cduJqVrQH8B6xBgBhvJFNDAAAAAElFTkSuQmCC', type: 'image',   options: {
 | 
			
		||||
            src: 'data: image/png;base64iVBORw0KGgoAAAANSUhEUgAAAGQAAABkCAYAAABw4pVUAAAHVklEQVR4nO2dT2wUVRzHv2/2T5eSAlvFilwgQUH+eLACaUxEiJLAxdh44MDZi2ChUIrSFtoCgbbSP4GDdwgeEA8kRTAI0iIGBL1ITLxgLAlCsCKBYndnx7zd35pl2+7On/de387OJ9l00515/z7z/szMmzfs7869mD0yCjw2gZAB4VhAiln4/dUaRGdU18aOnzw9dn24ioGJj0soFsJr1z2yNm+qN2/fvRFL8XyMYqTmFfxZ+TwMc1xKDsL/f2Ms8xGeLwuIRpCKx99MHf/i4uPrw5GQ9jIAfsCMXfw2HkuOX03Wb1qLh4+uIGFJjzecPoS5iEhUTg1hDMaM2GuRk6cGMTQUCYmPQQq86CMAkkPDkQirGAzXf7Du34ejN9IHmETCRjQGPL6D+4NnYDEJDQmXbaY6on/dm2Vm/jHdZe0Almm6Ll+YNQbzasX7765BNHI1o0sOYRghwExg7MG9dDQSiqsdwHuZmlFKMjLwQ3QcFtjlSxHTenLO3Lp7vfU09AOS41Ka+HC6CjIDIaqmguvIPgBtIgOcDhjVlMTQtarKOScumR/teCdpxoeNZGJCapjFt7Rcywrb2MYtnQBatCpZTzCkYCF+5suKRXf+6EvOmv0GSzwrhB/QpmGkBYZSpqvIZAlp8ZeMLFwKUH3z2gqWyd/+3F/5b1yRQQMCN8gQspeaKt+SAItSCxCiPjIjhDEkjRAMxmCZSbgZkYke537qdxl57KM8C0OkkD0ADohMXIlwgPIuBFFC9uS3p2XGflFSRAgpdxlZeBl84jUQr0ImjDTKGWZZBwE0eCkCL0J20UgjgGCwEDHNPjB86PbiilshfGRxOBCRD0tLCSWTnzMLO9yE4EbIzjIdTdmGpc8/rB4qK0c4FcKbqe7pyWZJ0k1lZhsnQnZq3EzV00dHDjupKXaFNGtcM7YA+Io+WzRIz2R0UxkWxY6QJgCHlCbfPlzAsZytj2ks5RCVZUGKCdkOoEt+Wl3RkCcjyzGv5wIS6aIynZJCQni7d0TTjPFaMFDg9wGNa8qRQn3KVEI+1rjPmKpm5KNzTemmMp7AZEK2AehXmz7bbC1SM/IZoH10pJ/K+hnyhXBrvZpmoBHAURf7HaV9daQ3v6Zk7hhWVr4AYDOAzzRNeKPHAyW7r459Yj/deUynMcyqqpY9/fXW+RTwkiF/ms5pADcd7nMbwAkBcfMM3wOwwOF+rys46TxCt+T72d2NG0YSg2fnC58ANDkbAZyVH41QNgAYVBTXNiMxeLYG6qawvagmGqGoTHOfwcAe6T8TvWwYlTC7OsALgRDNCIRoRiBEMwIhmhEI0YxAiGYEQjRDtZCY9iUyEaVpVi3kvuL4RKA0zSqF8Ad5TimMTxSnKO1KUCWEZ6hDVaYk0KFKigohbSUuI0uHiieKZQtp89kM+U7ZUmQKafHp4wpSH/eWJaTT5zPkD8g62GQI8cXqDTZok/HEsWgh+3Of2y4D2kU/0idKyEOaJdgqKLxSotXlfLFJESXkicKZGTrys6g0iRIyD8AvAFYLCq+UWC1yACOyD+Hrf1wAUCcwTN2pozzXiEqn6E59JoBvANQKDldHaimvM0WmTcawlydw2Oc1pY7yKFQGJJ4YxqiTXyEp/OlkBeVNyn0SmZdO5gC47rOOfjXlaY6sCGRfXKwA8LVP+pRaykuFzEhUXH7nR9P3AFYqiEsWKykP0mpGFlU3qKI0IlmlKD6RrKK0R1VEpvIW7uwSHXnVUdqVoHqSwz+K4xOB0jQH87I0IxCiGYEQzQiEaEYgRDMCIZoRCNGMQIhmBEI0gwuJK0xScKZemHiY1mzqUxThYgBLHO7zQOAzGnMBPOdwn8WC4rbDNjaSWVajQaEUp9wBsB7ALY/hLAVwHsB89VmwRXrhuGwf0q/xIl/z6f6105qVyxIKQ1cZjdlV/HI79V6N1yjk/dxlAMtc7LuM9lXZVzqhIXdxtvxR1kCxZUynkbl0o2ihgyQspH3mapqn7flrSE427O3TuKbwGZI/AlhuY9vltO08Belyw6T99lTnIQN2VmGeJqppskGhpfoW0DbVmuahaarVVQudGPZo3tH/RCOnfJbSbzp34D1T/VjsTL3X6esWFMJngJwDsCgnykX0P+mzQ1yyq9jqqtnzkGI0a7wgPz9pfJm+/6ZxB77bzus+7L7pkwdkarr8OBdwJee7jjQVaqZysVtDsuwK3j3lmGYnb5hwerW3S+PRl440OX3dh5vL7z0iXzXqY/bYbaZycXs/5KDdV/iUKc1URo7xcoOqq0yfui1Gq5e3EoUava1qzS/aJQGs8xKIj2jx+gCoVyGcoUBKGs8yIEgIAiliZEDwJAehL3ovIYS+2F9UDckyRH/fFhmoxuwTvdaJaCGc7+gyi9+br1YZSzTJEAIaffHrZG/JCFwDpK16JEsI5yK9uMdvzVe7zAUxZQrhXKKBwxqZkSikQ8aiZbnIFgKS4oea0i5bBhQJgQ+kKJEBhUJAUkqxo+cduJqVrQH8B6xBgBhvJFNDAAAAAElFTkSuQmCC',
 | 
			
		||||
            fit: 'none'
 | 
			
		||||
            }},
 | 
			
		||||
        ]),
 | 
			
		||||
        new hiprint.PrintElementTypeGroup("客户", [
 | 
			
		||||
          {
 | 
			
		||||
            tid: 'bProviderModule.khname', title: '客户名称', data: '高级客户', type: 'text',
 | 
			
		||||
            options: {
 | 
			
		||||
              field: 'name',
 | 
			
		||||
              testData: '高级客户',
 | 
			
		||||
              height: 16,
 | 
			
		||||
              fontSize: 6.75,
 | 
			
		||||
              fontWeight: "700",
 | 
			
		||||
              textAlign: "left",
 | 
			
		||||
              textContentVerticalAlign: "middle"
 | 
			
		||||
            }
 | 
			
		||||
          },
 | 
			
		||||
          {
 | 
			
		||||
            tid: 'bProviderModule.tel', title: '客户电话', data: '18888888888', type: 'text',
 | 
			
		||||
            options: {
 | 
			
		||||
              field: 'tel',
 | 
			
		||||
              testData: '18888888888',
 | 
			
		||||
              height: 16,
 | 
			
		||||
              fontSize: 6.75,
 | 
			
		||||
              fontWeight: "700",
 | 
			
		||||
              textAlign: "left",
 | 
			
		||||
              textContentVerticalAlign: "middle"
 | 
			
		||||
            }
 | 
			
		||||
          },
 | 
			
		||||
        ]),
 | 
			
		||||
        new hiprint.PrintElementTypeGroup("表格/其他", [
 | 
			
		||||
          {
 | 
			
		||||
            tid: 'bProviderModule.table', title: '订单数据',
 | 
			
		||||
            type: 'table',
 | 
			
		||||
            options: {
 | 
			
		||||
              field: 'table',
 | 
			
		||||
              fields: [
 | 
			
		||||
                {text: '名称', field: 'NAME'},
 | 
			
		||||
                {text: '数量', field: 'SL'},
 | 
			
		||||
                {text: '规格', field: 'GG'},
 | 
			
		||||
                {text: '条码', field: 'TM'},
 | 
			
		||||
                {text: '单价', field: 'DJ'},
 | 
			
		||||
                {text: '金额', field: 'JE'},
 | 
			
		||||
                {text: '备注', field: 'DETAIL'},
 | 
			
		||||
              ],
 | 
			
		||||
            },
 | 
			
		||||
            editable: true,
 | 
			
		||||
            columnDisplayEditable: true,//列显示是否能编辑
 | 
			
		||||
            columnDisplayIndexEditable: true,//列顺序显示是否能编辑
 | 
			
		||||
            columnTitleEditable: true,//列标题是否能编辑
 | 
			
		||||
            columnResizable: true, //列宽是否能调整
 | 
			
		||||
            columnAlignEditable: true,//列对齐是否调整
 | 
			
		||||
            columns: [
 | 
			
		||||
              [
 | 
			
		||||
                {title: '名称', align: 'center', field: 'NAME', width: 100},
 | 
			
		||||
                {title: '数量', align: 'center', field: 'SL', width: 100},
 | 
			
		||||
                {title: '条码', align: 'center', field: 'TM', width: 100},
 | 
			
		||||
                {title: '规格', align: 'center', field: 'GG', width: 100},
 | 
			
		||||
                {title: '单价', align: 'center', field: 'DJ', width: 100},
 | 
			
		||||
                {title: '金额', align: 'center', field: 'JE', width: 100},
 | 
			
		||||
                {title: '备注', align: 'center', field: 'DETAIL', width: 100},
 | 
			
		||||
              ]
 | 
			
		||||
            ],
 | 
			
		||||
            footerFormatter: function (options, rows, data, currentPageGridRowsData) {
 | 
			
		||||
              if (data && data['totalCap']) {
 | 
			
		||||
                return `<td style="padding:0 10px" colspan="100">${'应收金额大写: ' + data['totalCap']}</td>`
 | 
			
		||||
              }
 | 
			
		||||
              return '<td style="padding:0 10px" colspan="100">应收金额大写: </td>'
 | 
			
		||||
            },
 | 
			
		||||
          },
 | 
			
		||||
          {tid: 'bProviderModule.customText', title: '文本', customText: '自定义文本', custom: true, type: 'text'},
 | 
			
		||||
          {
 | 
			
		||||
            tid: 'bProviderModule.longText', title: '长文本', type: 'longText', options: {
 | 
			
		||||
              field: 'test.longText',
 | 
			
		||||
              width: 200,
 | 
			
		||||
              testData: '长文本分页/不分页测试'
 | 
			
		||||
            },
 | 
			
		||||
          }
 | 
			
		||||
        ]),
 | 
			
		||||
        new hiprint.PrintElementTypeGroup("辅助", [
 | 
			
		||||
          {
 | 
			
		||||
            tid: 'bProviderModule.hline',
 | 
			
		||||
            title: '横线',
 | 
			
		||||
            type: 'hline'
 | 
			
		||||
          },
 | 
			
		||||
          {
 | 
			
		||||
            tid: 'bProviderModule.vline',
 | 
			
		||||
            title: '竖线',
 | 
			
		||||
            type: 'vline'
 | 
			
		||||
          },
 | 
			
		||||
          {
 | 
			
		||||
            tid: 'bProviderModule.rect',
 | 
			
		||||
            title: '矩形',
 | 
			
		||||
            type: 'rect'
 | 
			
		||||
          },
 | 
			
		||||
          {
 | 
			
		||||
            tid: 'bProviderModule.oval',
 | 
			
		||||
            title: '椭圆',
 | 
			
		||||
            type: 'oval'
 | 
			
		||||
          }
 | 
			
		||||
        ])
 | 
			
		||||
      ]
 | 
			
		||||
    );
 | 
			
		||||
  };
 | 
			
		||||
  return {
 | 
			
		||||
    addElementTypes: addElementTypes
 | 
			
		||||
  };
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
// type: 1供货商 2经销商
 | 
			
		||||
export default [{
 | 
			
		||||
  name: 'A设计',
 | 
			
		||||
  value: 'aProviderModule',
 | 
			
		||||
  type: 1,
 | 
			
		||||
  f: aProvider()
 | 
			
		||||
}, {
 | 
			
		||||
  name: 'B设计',
 | 
			
		||||
  value: 'bProviderModule',
 | 
			
		||||
  type: 2,
 | 
			
		||||
  f: bProvider()
 | 
			
		||||
}]
 | 
			
		||||
 
 | 
			
		||||
@@ -166,13 +166,17 @@ export default {
 | 
			
		||||
						input: true,
 | 
			
		||||
						label: '参数列名',
 | 
			
		||||
						prop: 'plcParamName',
 | 
			
		||||
						rules: [{ required: true, message: '参数列名不能为空', trigger: 'blur' }],
 | 
			
		||||
						rules: [
 | 
			
		||||
							{ required: true, message: '参数列名不能为空', trigger: 'blur' },
 | 
			
		||||
						],
 | 
			
		||||
					},
 | 
			
		||||
					{
 | 
			
		||||
						input: true,
 | 
			
		||||
						label: '参数名称',
 | 
			
		||||
						prop: 'name',
 | 
			
		||||
						rules: [{ required: true, message: '参数名称不能为空', trigger: 'blur' }],
 | 
			
		||||
						rules: [
 | 
			
		||||
							{ required: true, message: '参数名称不能为空', trigger: 'blur' },
 | 
			
		||||
						],
 | 
			
		||||
					},
 | 
			
		||||
				],
 | 
			
		||||
				[
 | 
			
		||||
@@ -419,35 +423,35 @@ export default {
 | 
			
		||||
		},
 | 
			
		||||
 | 
			
		||||
		// 提交属性表
 | 
			
		||||
		async submitAttrForm() {
 | 
			
		||||
			this.$refs['attrForm'].validate((valid) => {
 | 
			
		||||
		submitAttrForm() {
 | 
			
		||||
			this.$refs['attrForm'].validate(async (valid) => {
 | 
			
		||||
				if (!valid) {
 | 
			
		||||
					return;
 | 
			
		||||
				}
 | 
			
		||||
			});
 | 
			
		||||
			const isEdit = this.attrForm.id != null;
 | 
			
		||||
			this.attrFormSubmitting = true;
 | 
			
		||||
			const res = await this.$axios({
 | 
			
		||||
				url: isEdit ? this.sections[1].urlUpdate : this.sections[1].urlCreate,
 | 
			
		||||
				method: isEdit ? 'put' : 'post',
 | 
			
		||||
				data: {
 | 
			
		||||
					...this.attrForm,
 | 
			
		||||
					connectId: this.infoData.id
 | 
			
		||||
				},
 | 
			
		||||
			});
 | 
			
		||||
 | 
			
		||||
			if (res.code == 0) {
 | 
			
		||||
				this.closeAttrForm();
 | 
			
		||||
				this.$message({
 | 
			
		||||
					message: `${isEdit ? '更新' : '创建'}成功`,
 | 
			
		||||
					type: 'success',
 | 
			
		||||
					duration: 1500,
 | 
			
		||||
					onClose: () => {
 | 
			
		||||
						this.getAttrList();
 | 
			
		||||
				const isEdit = this.attrForm.id != null;
 | 
			
		||||
				this.attrFormSubmitting = true;
 | 
			
		||||
				const res = await this.$axios({
 | 
			
		||||
					url: isEdit ? this.sections[1].urlUpdate : this.sections[1].urlCreate,
 | 
			
		||||
					method: isEdit ? 'put' : 'post',
 | 
			
		||||
					data: {
 | 
			
		||||
						...this.attrForm,
 | 
			
		||||
						connectId: this.infoData.id,
 | 
			
		||||
					},
 | 
			
		||||
				});
 | 
			
		||||
			}
 | 
			
		||||
			this.attrFormSubmitting = false;
 | 
			
		||||
 | 
			
		||||
				if (res.code == 0) {
 | 
			
		||||
					this.closeAttrForm();
 | 
			
		||||
					this.$message({
 | 
			
		||||
						message: `${isEdit ? '更新' : '创建'}成功`,
 | 
			
		||||
						type: 'success',
 | 
			
		||||
						duration: 1500,
 | 
			
		||||
						onClose: () => {
 | 
			
		||||
							this.getAttrList();
 | 
			
		||||
						},
 | 
			
		||||
					});
 | 
			
		||||
				}
 | 
			
		||||
				this.attrFormSubmitting = false;
 | 
			
		||||
			});
 | 
			
		||||
		},
 | 
			
		||||
 | 
			
		||||
		closeAttrForm() {
 | 
			
		||||
 
 | 
			
		||||
@@ -39,6 +39,7 @@ import {
 | 
			
		||||
	deleteMaterial
 | 
			
		||||
} from '@/api/base/material';
 | 
			
		||||
import { listData } from "@/api/system/dict/data";
 | 
			
		||||
import { publicFormatter } from '@/utils/dict';
 | 
			
		||||
 | 
			
		||||
const tableProps = [
 | 
			
		||||
	{
 | 
			
		||||
@@ -59,8 +60,9 @@ const tableProps = [
 | 
			
		||||
		label: '英文名称'
 | 
			
		||||
	},
 | 
			
		||||
	{
 | 
			
		||||
		prop: 'materialType',
 | 
			
		||||
		label: '物料类型'
 | 
			
		||||
		prop: 'type',
 | 
			
		||||
		label: '物料类型',
 | 
			
		||||
		filter: publicFormatter('material_type')
 | 
			
		||||
	},
 | 
			
		||||
	{
 | 
			
		||||
		prop: 'supplierName',
 | 
			
		||||
 
 | 
			
		||||
@@ -2,7 +2,7 @@
 | 
			
		||||
 * @Author: zwq
 | 
			
		||||
 * @Date: 2021-11-18 14:16:25
 | 
			
		||||
 * @LastEditors: DY
 | 
			
		||||
 * @LastEditTime: 2023-11-22 11:09:44
 | 
			
		||||
 * @LastEditTime: 2023-11-23 15:00:00
 | 
			
		||||
 * @Description:
 | 
			
		||||
-->
 | 
			
		||||
<template>
 | 
			
		||||
@@ -311,6 +311,9 @@ export default {
 | 
			
		||||
						row.mUnit = u.label
 | 
			
		||||
					}
 | 
			
		||||
				})
 | 
			
		||||
			} else {
 | 
			
		||||
				row.unit = null
 | 
			
		||||
				row.mUnit = ''
 | 
			
		||||
			}
 | 
			
		||||
			// row.materialCode = tempList[0].code
 | 
			
		||||
			// row.unit = tempList[0].unit
 | 
			
		||||
 
 | 
			
		||||
@@ -215,12 +215,33 @@ export default {
 | 
			
		||||
          this.$refs.addOrUpdate.init(val.data.id);
 | 
			
		||||
        });
 | 
			
		||||
      } else if (val.type === "delete") {
 | 
			
		||||
        this.deleteHandle(val.data.id, val.data.materialName, val.data._pageIndex)
 | 
			
		||||
        this.deleteHandle(val.data.id, val.data.materialName)
 | 
			
		||||
      } else if (val.type === "change") {
 | 
			
		||||
        this.changeStatus(val.data.id)
 | 
			
		||||
      } else {
 | 
			
		||||
        this.otherMethods(val)
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
		// 删除
 | 
			
		||||
    deleteHandle(id, name) {
 | 
			
		||||
      this.$confirm(`是否确认删除物料名称为${name}的数据项?`, "提示", {
 | 
			
		||||
        confirmButtonText: "确定",
 | 
			
		||||
        cancelButtonText: "取消",
 | 
			
		||||
        type: "warning",
 | 
			
		||||
      })
 | 
			
		||||
        .then(() => {
 | 
			
		||||
          this.urlOptions.deleteURL(id).then(({ data }) => {
 | 
			
		||||
            this.$message({
 | 
			
		||||
              message: "操作成功",
 | 
			
		||||
              type: "success",
 | 
			
		||||
              duration: 1500,
 | 
			
		||||
              onClose: () => {
 | 
			
		||||
                this.getDataList();
 | 
			
		||||
              },
 | 
			
		||||
            });
 | 
			
		||||
          });
 | 
			
		||||
        })
 | 
			
		||||
        .catch(() => { });
 | 
			
		||||
    }
 | 
			
		||||
	},
 | 
			
		||||
};
 | 
			
		||||
 
 | 
			
		||||
@@ -2,7 +2,7 @@
 | 
			
		||||
 * @Author: zwq
 | 
			
		||||
 * @Date: 2023-08-01 14:55:51
 | 
			
		||||
 * @LastEditors: zhp
 | 
			
		||||
 * @LastEditTime: 2023-11-07 19:28:18
 | 
			
		||||
 * @LastEditTime: 2023-11-22 14:40:59
 | 
			
		||||
 * @Description:
 | 
			
		||||
-->
 | 
			
		||||
<template>
 | 
			
		||||
@@ -77,7 +77,7 @@ const tableProps = [
 | 
			
		||||
  {
 | 
			
		||||
    prop: 'printStatus',
 | 
			
		||||
    label: '打印状态',
 | 
			
		||||
    // subcomponent: unitDict,
 | 
			
		||||
    filter: (val) => val == 1 ? '未打印' : '已打印',
 | 
			
		||||
  },
 | 
			
		||||
	{
 | 
			
		||||
    prop: 'createTime',
 | 
			
		||||
@@ -96,7 +96,11 @@ export default {
 | 
			
		||||
				exportURL: exportPackingExcel,
 | 
			
		||||
			},
 | 
			
		||||
			tableProps,
 | 
			
		||||
			tableBtn: [
 | 
			
		||||
      tableBtn: [
 | 
			
		||||
        {
 | 
			
		||||
          type: 'print',
 | 
			
		||||
          btnName: '打印',
 | 
			
		||||
        },
 | 
			
		||||
        this.$auth.hasPermi(`base:packaging-print-log:update`)
 | 
			
		||||
					? {
 | 
			
		||||
							type: 'edit',
 | 
			
		||||
@@ -109,10 +113,6 @@ export default {
 | 
			
		||||
							btnName: '删除',
 | 
			
		||||
					  }
 | 
			
		||||
          : undefined,
 | 
			
		||||
        {
 | 
			
		||||
          type: 'print',
 | 
			
		||||
          btnName: '打印',
 | 
			
		||||
        },
 | 
			
		||||
			].filter((v) => v),
 | 
			
		||||
			tableData: [],
 | 
			
		||||
      formConfig: [
 | 
			
		||||
 
 | 
			
		||||
@@ -2,7 +2,7 @@
 | 
			
		||||
 * @Author: zwq
 | 
			
		||||
 * @Date: 2023-08-01 14:55:51
 | 
			
		||||
 * @LastEditors: zhp
 | 
			
		||||
 * @LastEditTime: 2023-11-01 10:28:29
 | 
			
		||||
 * @LastEditTime: 2023-11-22 14:40:07
 | 
			
		||||
 * @Description:
 | 
			
		||||
-->
 | 
			
		||||
<template>
 | 
			
		||||
@@ -33,6 +33,11 @@ import {
 | 
			
		||||
} from '@/api/base/printModel';
 | 
			
		||||
 | 
			
		||||
const tableProps = [
 | 
			
		||||
  {
 | 
			
		||||
    prop: 'createTime',
 | 
			
		||||
    label: '创建时间',
 | 
			
		||||
    filter: parseTime
 | 
			
		||||
  },
 | 
			
		||||
	{
 | 
			
		||||
    prop: 'name',
 | 
			
		||||
    label: '模板名称'
 | 
			
		||||
@@ -64,7 +69,11 @@ export default {
 | 
			
		||||
			},
 | 
			
		||||
      tableProps,
 | 
			
		||||
      modelShow:false,
 | 
			
		||||
			tableBtn: [
 | 
			
		||||
      tableBtn: [
 | 
			
		||||
        {
 | 
			
		||||
          type: 'print',
 | 
			
		||||
          btnName: '查看',
 | 
			
		||||
        },
 | 
			
		||||
        this.$auth.hasPermi(`base:packaging-print-model:update`)
 | 
			
		||||
					? {
 | 
			
		||||
							type: 'edit',
 | 
			
		||||
@@ -77,10 +86,6 @@ export default {
 | 
			
		||||
							btnName: '删除',
 | 
			
		||||
					  }
 | 
			
		||||
          : undefined,
 | 
			
		||||
        {
 | 
			
		||||
          type: 'print',
 | 
			
		||||
          btnName: '查看',
 | 
			
		||||
        },
 | 
			
		||||
			].filter((v) => v),
 | 
			
		||||
			tableData: [],
 | 
			
		||||
			formConfig: [
 | 
			
		||||
 
 | 
			
		||||
@@ -2,7 +2,7 @@
 | 
			
		||||
 * @Author: zwq
 | 
			
		||||
 * @Date: 2023-08-01 14:55:51
 | 
			
		||||
 * @LastEditors: zhp
 | 
			
		||||
 * @LastEditTime: 2023-10-18 16:11:22
 | 
			
		||||
 * @LastEditTime: 2023-11-22 14:36:33
 | 
			
		||||
 * @Description:
 | 
			
		||||
-->
 | 
			
		||||
<template>
 | 
			
		||||
@@ -107,12 +107,12 @@ export default {
 | 
			
		||||
        //   valueFormat: 'yyyy-MM-dd',
 | 
			
		||||
        //   param: 'createTime',
 | 
			
		||||
				// },
 | 
			
		||||
				{
 | 
			
		||||
					type: 'button',
 | 
			
		||||
					btnName: '搜索',
 | 
			
		||||
					name: 'search',
 | 
			
		||||
					color: 'primary',
 | 
			
		||||
				},
 | 
			
		||||
				// {
 | 
			
		||||
				// 	type: 'button',
 | 
			
		||||
				// 	btnName: '搜索',
 | 
			
		||||
				// 	name: 'search',
 | 
			
		||||
				// 	color: 'primary',
 | 
			
		||||
				// },
 | 
			
		||||
				// {
 | 
			
		||||
				// 	type: 'separate',
 | 
			
		||||
				// },
 | 
			
		||||
@@ -125,7 +125,7 @@ export default {
 | 
			
		||||
					type: 'separate',
 | 
			
		||||
				},
 | 
			
		||||
				{
 | 
			
		||||
          type: this.$auth.hasPermi('base:packaging-print-log:create') ? 'button' : '',
 | 
			
		||||
          type: this.$auth.hasPermi('base:packaging-print-type:create') ? 'button' : '',
 | 
			
		||||
					btnName: '新增',
 | 
			
		||||
					name: 'add',
 | 
			
		||||
					color: 'success',
 | 
			
		||||
 
 | 
			
		||||
@@ -6,131 +6,150 @@
 | 
			
		||||
 * @Description:
 | 
			
		||||
-->
 | 
			
		||||
<template>
 | 
			
		||||
  <div>
 | 
			
		||||
    <div style="margin: 20px">
 | 
			
		||||
      <el-button v-for="(item, index) in buttonList" :key="index" :class="[item.actived ? 'activeButton': 'normalButton']" @click="changeChart(index)">{{ item.name }}</el-button>
 | 
			
		||||
    </div>
 | 
			
		||||
    <div id="chart" ref="chartDiv" :class="className" :style="{height:height,width:width}" />
 | 
			
		||||
  </div>
 | 
			
		||||
	<div class="balace-chart">
 | 
			
		||||
		<div style="margin: 20px">
 | 
			
		||||
			<el-button
 | 
			
		||||
				v-for="(item, index) in buttonList"
 | 
			
		||||
				:key="index"
 | 
			
		||||
				:class="[item.actived ? 'activeButton' : '']"
 | 
			
		||||
				@click="changeChart(index)">
 | 
			
		||||
				{{ item.name }}
 | 
			
		||||
			</el-button>
 | 
			
		||||
		</div>
 | 
			
		||||
		<div
 | 
			
		||||
			id="chart"
 | 
			
		||||
			ref="chartDiv"
 | 
			
		||||
			:class="className"
 | 
			
		||||
			:style="{ height: height, width: width }" />
 | 
			
		||||
	</div>
 | 
			
		||||
</template>
 | 
			
		||||
 | 
			
		||||
<script>
 | 
			
		||||
import * as echarts from 'echarts'
 | 
			
		||||
require('echarts/theme/macarons') // echarts theme
 | 
			
		||||
import * as echarts from 'echarts';
 | 
			
		||||
require('echarts/theme/macarons'); // echarts theme
 | 
			
		||||
// import resize from './mixins/resize'
 | 
			
		||||
 | 
			
		||||
export default {
 | 
			
		||||
  // mixins: [resize],
 | 
			
		||||
  props: {
 | 
			
		||||
    className: {
 | 
			
		||||
      type: String,
 | 
			
		||||
      default: 'chart'
 | 
			
		||||
    },
 | 
			
		||||
    width: {
 | 
			
		||||
      type: String,
 | 
			
		||||
      default: '100%'
 | 
			
		||||
    },
 | 
			
		||||
    height: {
 | 
			
		||||
      type: String,
 | 
			
		||||
      default: '350px'
 | 
			
		||||
    },
 | 
			
		||||
    // autoResize: {
 | 
			
		||||
    //   type: Boolean,
 | 
			
		||||
    //   default: true
 | 
			
		||||
    // }
 | 
			
		||||
  },
 | 
			
		||||
  data() {
 | 
			
		||||
    return {
 | 
			
		||||
      chart: null,
 | 
			
		||||
      dataArray: [],
 | 
			
		||||
      xDatas: [],
 | 
			
		||||
      buttonList: []
 | 
			
		||||
    }
 | 
			
		||||
  },
 | 
			
		||||
  mounted() {
 | 
			
		||||
    // this.initChart()
 | 
			
		||||
  },
 | 
			
		||||
  methods: {
 | 
			
		||||
    changeChart(index) {
 | 
			
		||||
      this.setOptions(this.xDatas, this.dataArray[index])
 | 
			
		||||
      this.buttonList.forEach((item, s) => {
 | 
			
		||||
        if (index === s) {
 | 
			
		||||
          // item.actived = true
 | 
			
		||||
          this.$nextTick(() =>{
 | 
			
		||||
            // item.actived = true
 | 
			
		||||
            this.$set(item, 'actived', true)
 | 
			
		||||
          })
 | 
			
		||||
        } else {
 | 
			
		||||
          // item.actived = false
 | 
			
		||||
          this.$nextTick(() =>{
 | 
			
		||||
            // item.actived = false
 | 
			
		||||
            this.$set(item, 'actived', false)
 | 
			
		||||
          })
 | 
			
		||||
          // this.$set(item, 'actived', false)
 | 
			
		||||
        }
 | 
			
		||||
      })
 | 
			
		||||
      console.log('看一下数22222据', this.dataArray)
 | 
			
		||||
    },
 | 
			
		||||
    initChart(xData, yData, lineName) {
 | 
			
		||||
      this.dataArray = yData
 | 
			
		||||
      this.buttonList = this.dataArray.map((item, index) => {
 | 
			
		||||
        return {
 | 
			
		||||
          'name': item.name,
 | 
			
		||||
          'actived': index === 0 ? true : false
 | 
			
		||||
        }
 | 
			
		||||
      })
 | 
			
		||||
      console.log('看一下数据', this.dataArray)
 | 
			
		||||
      this.xDatas = xData
 | 
			
		||||
      this.chart = echarts.init(this.$refs.chartDiv, 'macarons')
 | 
			
		||||
      // this.chart = echarts.init(document.getElementById('chart'), 'macarons')
 | 
			
		||||
      // this.setOptions(xData, yData[0], lineName)
 | 
			
		||||
    },
 | 
			
		||||
    setOptions(xData, dataList, lineName) {
 | 
			
		||||
      // let seriesData = []
 | 
			
		||||
        // lineName.forEach((item,index) => {
 | 
			
		||||
        //   seriesData.push({
 | 
			
		||||
        //     name: item,
 | 
			
		||||
        //     data: yData[index],
 | 
			
		||||
        //     type: 'line',
 | 
			
		||||
        //   })
 | 
			
		||||
        // })
 | 
			
		||||
      this.chart.setOption({
 | 
			
		||||
        xAxis: {
 | 
			
		||||
          type: 'category',
 | 
			
		||||
          data: xData
 | 
			
		||||
        },
 | 
			
		||||
        tooltip: {
 | 
			
		||||
          trigger: 'axis'
 | 
			
		||||
        },
 | 
			
		||||
        legend: {
 | 
			
		||||
          data:lineName
 | 
			
		||||
        },
 | 
			
		||||
        yAxis: {
 | 
			
		||||
          type: 'value'
 | 
			
		||||
        },
 | 
			
		||||
        series: [
 | 
			
		||||
          {
 | 
			
		||||
            name: '设备CT',
 | 
			
		||||
            data: dataList.eqData,
 | 
			
		||||
            type: 'line',
 | 
			
		||||
          },
 | 
			
		||||
          {
 | 
			
		||||
            name: '产线CT',
 | 
			
		||||
            data: dataList.plData,
 | 
			
		||||
            type: 'line',
 | 
			
		||||
          }
 | 
			
		||||
        ]
 | 
			
		||||
      })
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
	// mixins: [resize],
 | 
			
		||||
	props: {
 | 
			
		||||
		className: {
 | 
			
		||||
			type: String,
 | 
			
		||||
			default: 'chart',
 | 
			
		||||
		},
 | 
			
		||||
		width: {
 | 
			
		||||
			type: String,
 | 
			
		||||
			default: '100%',
 | 
			
		||||
		},
 | 
			
		||||
		height: {
 | 
			
		||||
			type: String,
 | 
			
		||||
			default: '350px',
 | 
			
		||||
		},
 | 
			
		||||
		// autoResize: {
 | 
			
		||||
		//   type: Boolean,
 | 
			
		||||
		//   default: true
 | 
			
		||||
		// }
 | 
			
		||||
	},
 | 
			
		||||
	data() {
 | 
			
		||||
		return {
 | 
			
		||||
			chart: null,
 | 
			
		||||
			dataArray: [],
 | 
			
		||||
			xDatas: [],
 | 
			
		||||
			buttonList: [],
 | 
			
		||||
		};
 | 
			
		||||
	},
 | 
			
		||||
	mounted() {
 | 
			
		||||
		// this.initChart()
 | 
			
		||||
		this.$nextTick(() => {
 | 
			
		||||
			this.changeChart(0);
 | 
			
		||||
		});
 | 
			
		||||
	},
 | 
			
		||||
	methods: {
 | 
			
		||||
		changeChart(index) {
 | 
			
		||||
			this.setOptions(this.xDatas, this.dataArray[index]);
 | 
			
		||||
			this.buttonList.forEach((item, s) => {
 | 
			
		||||
				if (index === s) {
 | 
			
		||||
					// item.actived = true
 | 
			
		||||
					this.$nextTick(() => {
 | 
			
		||||
						// item.actived = true
 | 
			
		||||
						this.$set(item, 'actived', true);
 | 
			
		||||
					});
 | 
			
		||||
				} else {
 | 
			
		||||
					// item.actived = false
 | 
			
		||||
					this.$nextTick(() => {
 | 
			
		||||
						// item.actived = false
 | 
			
		||||
						this.$set(item, 'actived', false);
 | 
			
		||||
					});
 | 
			
		||||
					// this.$set(item, 'actived', false)
 | 
			
		||||
				}
 | 
			
		||||
			});
 | 
			
		||||
			console.log('看一下数22222据', this.dataArray);
 | 
			
		||||
		},
 | 
			
		||||
		initChart(xData, yData, lineName) {
 | 
			
		||||
			this.dataArray = yData;
 | 
			
		||||
			this.buttonList = this.dataArray.map((item, index) => {
 | 
			
		||||
				return {
 | 
			
		||||
					name: item.name,
 | 
			
		||||
					actived: index === 0 ? true : false,
 | 
			
		||||
				};
 | 
			
		||||
			});
 | 
			
		||||
			console.log('看一下数据', this.dataArray);
 | 
			
		||||
			this.xDatas = xData;
 | 
			
		||||
			this.chart = echarts.init(this.$refs.chartDiv, 'macarons');
 | 
			
		||||
			// this.chart = echarts.init(document.getElementById('chart'), 'macarons')
 | 
			
		||||
			// this.setOptions(xData, yData[0], lineName)
 | 
			
		||||
		},
 | 
			
		||||
		setOptions(xData, dataList, lineName) {
 | 
			
		||||
			// let seriesData = []
 | 
			
		||||
			// lineName.forEach((item,index) => {
 | 
			
		||||
			//   seriesData.push({
 | 
			
		||||
			//     name: item,
 | 
			
		||||
			//     data: yData[index],
 | 
			
		||||
			//     type: 'line',
 | 
			
		||||
			//   })
 | 
			
		||||
			// })
 | 
			
		||||
			this.chart.setOption({
 | 
			
		||||
				xAxis: {
 | 
			
		||||
					type: 'category',
 | 
			
		||||
					data: xData,
 | 
			
		||||
				},
 | 
			
		||||
				tooltip: {
 | 
			
		||||
					trigger: 'axis',
 | 
			
		||||
				},
 | 
			
		||||
				legend: {
 | 
			
		||||
					data: lineName,
 | 
			
		||||
				},
 | 
			
		||||
				yAxis: {
 | 
			
		||||
					type: 'value',
 | 
			
		||||
				},
 | 
			
		||||
				series: [
 | 
			
		||||
					{
 | 
			
		||||
						name: '设备CT',
 | 
			
		||||
						data: dataList.eqData,
 | 
			
		||||
						type: 'line',
 | 
			
		||||
					},
 | 
			
		||||
					{
 | 
			
		||||
						name: '产线CT',
 | 
			
		||||
						data: dataList.plData,
 | 
			
		||||
						type: 'line',
 | 
			
		||||
					},
 | 
			
		||||
				],
 | 
			
		||||
			});
 | 
			
		||||
		},
 | 
			
		||||
	},
 | 
			
		||||
};
 | 
			
		||||
</script>
 | 
			
		||||
 | 
			
		||||
<style scoped>
 | 
			
		||||
.activeButton {
 | 
			
		||||
  background-color: rgb(93,159,255);
 | 
			
		||||
}
 | 
			
		||||
.normalButton {
 | 
			
		||||
  background-color: none;
 | 
			
		||||
.balace-chart >>> .el-button {
 | 
			
		||||
	background: #e3e3e3;
 | 
			
		||||
	color: #333;
 | 
			
		||||
	transition: all 0.3s;
 | 
			
		||||
	border: none;
 | 
			
		||||
 | 
			
		||||
	&.activeButton,
 | 
			
		||||
	&:hover {
 | 
			
		||||
		background: #0b58ff;
 | 
			
		||||
		color: #fff;
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
</style>
 | 
			
		||||
 
 | 
			
		||||
@@ -1,7 +1,7 @@
 | 
			
		||||
<template>
 | 
			
		||||
  <el-form ref="addOrUpdate" :rules="rules" label-width="130px" :model="form">
 | 
			
		||||
    <el-row>
 | 
			
		||||
      <el-col :span='12'>
 | 
			
		||||
  <el-form ref="addOrUpdate" :rules="rules" label-width="130px" :model="form" label-position='top'>
 | 
			
		||||
    <el-row :gutter="20">
 | 
			
		||||
      <el-col :span='6'>
 | 
			
		||||
        <el-form-item label="订单名" prop="orderId">
 | 
			
		||||
          <el-select v-model="form.orderId" placeholder="请选择" style="width: 100%;">
 | 
			
		||||
            <el-option
 | 
			
		||||
@@ -13,14 +13,12 @@
 | 
			
		||||
          </el-select>
 | 
			
		||||
        </el-form-item>
 | 
			
		||||
      </el-col>
 | 
			
		||||
      <el-col :span='12'>
 | 
			
		||||
      <el-col :span='6'>
 | 
			
		||||
        <el-form-item label="发货单名称" prop="name">
 | 
			
		||||
          <el-input v-model="form.name"></el-input>
 | 
			
		||||
        </el-form-item>
 | 
			
		||||
      </el-col>
 | 
			
		||||
    </el-row>
 | 
			
		||||
    <el-row>
 | 
			
		||||
      <el-col :span='12'>
 | 
			
		||||
      <el-col :span='6'>
 | 
			
		||||
        <el-form-item label="发货时间" prop="deliveryTime">
 | 
			
		||||
          <el-date-picker
 | 
			
		||||
            v-model="form.deliveryTime"
 | 
			
		||||
@@ -32,14 +30,14 @@
 | 
			
		||||
          </el-date-picker>
 | 
			
		||||
        </el-form-item>
 | 
			
		||||
      </el-col>
 | 
			
		||||
      <el-col :span='12'>
 | 
			
		||||
      <el-col :span='6'>
 | 
			
		||||
        <el-form-item label="发货单号" prop="code">
 | 
			
		||||
          <el-input v-model="form.code"></el-input>
 | 
			
		||||
        </el-form-item>
 | 
			
		||||
      </el-col>
 | 
			
		||||
    </el-row>
 | 
			
		||||
    <el-row>
 | 
			
		||||
      <el-col :span='12'>
 | 
			
		||||
    <el-row :gutter="20">
 | 
			
		||||
      <el-col :span='6'>
 | 
			
		||||
        <el-form-item label="发货负责人" prop="deliveryPersonId">
 | 
			
		||||
          <el-select v-model="form.deliveryPersonId" placeholder="请选择" style="width: 100%;">
 | 
			
		||||
            <el-option
 | 
			
		||||
@@ -51,21 +49,19 @@
 | 
			
		||||
          </el-select>
 | 
			
		||||
        </el-form-item>
 | 
			
		||||
      </el-col>
 | 
			
		||||
      <el-col :span='12'>
 | 
			
		||||
      <el-col :span='6'>
 | 
			
		||||
        <el-form-item label="运输负责人" prop="principal">
 | 
			
		||||
          <el-input v-model="form.principal"></el-input>
 | 
			
		||||
        </el-form-item>
 | 
			
		||||
      </el-col>
 | 
			
		||||
    </el-row>
 | 
			
		||||
    <el-row>
 | 
			
		||||
      <el-col :span='12'>
 | 
			
		||||
      <el-col :span='6'>
 | 
			
		||||
        <el-form-item label="运输联系方式" prop="principalCall">
 | 
			
		||||
          <el-input v-model="form.principalCall"></el-input>
 | 
			
		||||
        </el-form-item>
 | 
			
		||||
      </el-col>
 | 
			
		||||
      <el-col :span='12'>
 | 
			
		||||
      <el-col :span='6'>
 | 
			
		||||
        <el-form-item label="运输费用" prop="principalCost">
 | 
			
		||||
          <el-input-number v-model="form.principalCost" :min="0" :max='9999999999' :precision='2'></el-input-number>
 | 
			
		||||
          <el-input-number v-model="form.principalCost" :min="0" :max='9999999999' :precision='2' style='width: 100%;'></el-input-number>
 | 
			
		||||
        </el-form-item>
 | 
			
		||||
      </el-col>
 | 
			
		||||
    </el-row>
 | 
			
		||||
 
 | 
			
		||||
@@ -2,10 +2,11 @@
 | 
			
		||||
  <div>
 | 
			
		||||
    <el-drawer
 | 
			
		||||
      title="发货清单详情"
 | 
			
		||||
      size="60%"
 | 
			
		||||
      size="65%"
 | 
			
		||||
      :append-to-body="true"
 | 
			
		||||
      :visible.sync="centervisible"
 | 
			
		||||
      @close='close'>
 | 
			
		||||
      @close='close'
 | 
			
		||||
      :show-close='false'>
 | 
			
		||||
      <div class="box1">
 | 
			
		||||
        <el-row>
 | 
			
		||||
          <el-col :span='12'>
 | 
			
		||||
@@ -69,7 +70,7 @@ const tableProps = [
 | 
			
		||||
    prop: 'createTime',
 | 
			
		||||
    label: '添加时间',
 | 
			
		||||
    filter: parseTime,
 | 
			
		||||
    minWidth: 150
 | 
			
		||||
    minWidth: 160
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    prop: 'deliveryCarCode',
 | 
			
		||||
@@ -81,7 +82,7 @@ const tableProps = [
 | 
			
		||||
    prop: 'loadTime',
 | 
			
		||||
    label: '装车时间',
 | 
			
		||||
    filter: parseTime,
 | 
			
		||||
    minWidth: 150
 | 
			
		||||
    minWidth: 160
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    prop: 'productName',
 | 
			
		||||
@@ -90,7 +91,7 @@ const tableProps = [
 | 
			
		||||
  {
 | 
			
		||||
    prop: 'packagingSize',
 | 
			
		||||
    label: '装箱规格(片/箱)',
 | 
			
		||||
    width: 120
 | 
			
		||||
    width: 150
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    prop: 'packagingNum',
 | 
			
		||||
 
 | 
			
		||||
@@ -1,19 +1,17 @@
 | 
			
		||||
<template>
 | 
			
		||||
  <el-form ref="addOrUpdate" :rules="rules" label-width="130px" :model="form">
 | 
			
		||||
    <el-row>
 | 
			
		||||
      <el-col :span='12'>
 | 
			
		||||
  <el-form ref="addOrUpdate" :rules="rules" label-width="130px" :model="form" label-position='top'>
 | 
			
		||||
    <el-row :gutter="20">
 | 
			
		||||
      <el-col :span='6'>
 | 
			
		||||
        <el-form-item label="发货单号">
 | 
			
		||||
          <el-input v-model="code" disabled></el-input>
 | 
			
		||||
        </el-form-item>
 | 
			
		||||
      </el-col>
 | 
			
		||||
      <el-col :span='12'>
 | 
			
		||||
      <el-col :span='6'>
 | 
			
		||||
        <el-form-item label="装车单号" prop="deliveryCarCode">
 | 
			
		||||
          <el-input v-model="form.deliveryCarCode"></el-input>
 | 
			
		||||
        </el-form-item>
 | 
			
		||||
      </el-col>
 | 
			
		||||
    </el-row>
 | 
			
		||||
    <el-row>
 | 
			
		||||
      <el-col :span='12'>
 | 
			
		||||
      <el-col :span='6'>
 | 
			
		||||
        <el-form-item label="装车时间" prop="loadTime">
 | 
			
		||||
          <el-date-picker
 | 
			
		||||
            v-model="form.loadTime"
 | 
			
		||||
@@ -25,19 +23,19 @@
 | 
			
		||||
          </el-date-picker>
 | 
			
		||||
        </el-form-item>
 | 
			
		||||
      </el-col>
 | 
			
		||||
      <el-col :span='12'>
 | 
			
		||||
      <el-col :span='6'>
 | 
			
		||||
        <el-form-item label="车辆联系人" prop="contactPerson">
 | 
			
		||||
          <el-input v-model="form.contactPerson"></el-input>
 | 
			
		||||
        </el-form-item>
 | 
			
		||||
      </el-col>
 | 
			
		||||
    </el-row>
 | 
			
		||||
    <el-row>
 | 
			
		||||
      <el-col :span='12'>
 | 
			
		||||
    <el-row :gutter="20">
 | 
			
		||||
      <el-col :span='6'>
 | 
			
		||||
        <el-form-item label="联系方式" prop="contactPersonCall">
 | 
			
		||||
          <el-input v-model="form.contactPersonCall"></el-input>
 | 
			
		||||
        </el-form-item>
 | 
			
		||||
      </el-col>
 | 
			
		||||
      <el-col :span='12'>
 | 
			
		||||
      <el-col :span='6'>
 | 
			
		||||
        <el-form-item label="装车产品" prop="productId">
 | 
			
		||||
          <el-select v-model="form.productId" disabled placeholder="请选择" style="width: 100%;">
 | 
			
		||||
            <el-option
 | 
			
		||||
@@ -49,26 +47,24 @@
 | 
			
		||||
          </el-select>
 | 
			
		||||
        </el-form-item>
 | 
			
		||||
      </el-col>
 | 
			
		||||
    </el-row>
 | 
			
		||||
    <el-row>
 | 
			
		||||
      <el-col :span='12'>
 | 
			
		||||
      <el-col :span='6'>
 | 
			
		||||
        <el-form-item label="装箱规格(片/箱)" prop="packagingSize">
 | 
			
		||||
          <el-input-number v-model="form.packagingSize" :min="0" :max='9999999999' style="width:100%"></el-input-number>
 | 
			
		||||
        </el-form-item>
 | 
			
		||||
      </el-col>
 | 
			
		||||
      <el-col :span='12'>
 | 
			
		||||
      <el-col :span='6'>
 | 
			
		||||
        <el-form-item label="产品批次" prop="productDate">
 | 
			
		||||
          <el-input v-model="form.productDate" placeholder="多个批次用','隔开"></el-input>
 | 
			
		||||
        </el-form-item>
 | 
			
		||||
      </el-col>
 | 
			
		||||
    </el-row>
 | 
			
		||||
    <el-row>
 | 
			
		||||
      <el-col :span='12'>
 | 
			
		||||
    <el-row :gutter="20">
 | 
			
		||||
      <el-col :span='6'>
 | 
			
		||||
        <el-form-item label="箱/托数" prop="packagingNum">
 | 
			
		||||
          <el-input-number v-model="form.packagingNum" :min="0" :max='9999999999' style="width:100%"></el-input-number>
 | 
			
		||||
        </el-form-item>
 | 
			
		||||
      </el-col>
 | 
			
		||||
      <el-col :span='12'>
 | 
			
		||||
      <el-col :span='6'>
 | 
			
		||||
        <el-form-item label="装车总量" prop="quantity">
 | 
			
		||||
          <el-input-number v-model="form.quantity" :min="0" :max='9999999999' style="width:100%"></el-input-number>
 | 
			
		||||
        </el-form-item>
 | 
			
		||||
 
 | 
			
		||||
@@ -78,7 +78,7 @@ const tableProps = [
 | 
			
		||||
    prop: 'deliveryTime',
 | 
			
		||||
    label: '发货时间',
 | 
			
		||||
    filter: parseTime,
 | 
			
		||||
    minWidth: 150
 | 
			
		||||
    minWidth: 160
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    prop: 'code',
 | 
			
		||||
@@ -103,7 +103,8 @@ const tableProps = [
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    prop: 'principalCost',
 | 
			
		||||
    label: '运输费用'
 | 
			
		||||
    label: '运输费用',
 | 
			
		||||
    align: 'right'
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    prop: 'remark',
 | 
			
		||||
@@ -225,7 +226,11 @@ export default {
 | 
			
		||||
    },
 | 
			
		||||
    getList() {
 | 
			
		||||
      deliveryLogPage({...this.queryParams}).then(res => {
 | 
			
		||||
        this.list = res.data.list || []
 | 
			
		||||
        let arr = res.data.list || []
 | 
			
		||||
        arr && arr.map(item => {
 | 
			
		||||
          item.principalCost = item.principalCost.toFixed(2)
 | 
			
		||||
        })
 | 
			
		||||
        this.list = arr
 | 
			
		||||
        this.total = res.data.total || 0
 | 
			
		||||
      })
 | 
			
		||||
    },
 | 
			
		||||
 
 | 
			
		||||
@@ -2,9 +2,10 @@
 | 
			
		||||
  <el-drawer
 | 
			
		||||
    title="发货进度"
 | 
			
		||||
    :visible.sync="centervisible"
 | 
			
		||||
    size="80%"
 | 
			
		||||
    size="50%"
 | 
			
		||||
    class="deliveryLogDetail"
 | 
			
		||||
    @close='closeA'>
 | 
			
		||||
    @close='closeA'
 | 
			
		||||
    :show-close='false'>
 | 
			
		||||
    <div class="box1">
 | 
			
		||||
      <div class="box_col">
 | 
			
		||||
        <div class="blodTip">订单名</div>
 | 
			
		||||
@@ -46,7 +47,7 @@
 | 
			
		||||
              <method-btn
 | 
			
		||||
                v-if="tableBtn.length"
 | 
			
		||||
                slot="handleBtn"
 | 
			
		||||
                :width="150"
 | 
			
		||||
                :width="80"
 | 
			
		||||
                label="操作"
 | 
			
		||||
                :method-list="tableBtn"
 | 
			
		||||
                @clickBtn="viewDetDetail"
 | 
			
		||||
@@ -64,7 +65,7 @@
 | 
			
		||||
          <div v-if="activeName === 'barChart'">
 | 
			
		||||
            <div 
 | 
			
		||||
              id="logDetPieBar"
 | 
			
		||||
              style="width: 100%"
 | 
			
		||||
              style="width: 60%"
 | 
			
		||||
              :style="{ height: chartHeight + 'px' }"
 | 
			
		||||
            ></div>
 | 
			
		||||
          </div>
 | 
			
		||||
@@ -74,10 +75,11 @@
 | 
			
		||||
    <!-- 详情抽屉 -->
 | 
			
		||||
    <el-drawer
 | 
			
		||||
      title="发货详情"
 | 
			
		||||
      size="60%"
 | 
			
		||||
      size="50%"
 | 
			
		||||
      :append-to-body="true"
 | 
			
		||||
      :visible.sync="innerDrawer"
 | 
			
		||||
      @close='closeB'>
 | 
			
		||||
      @close='closeB'
 | 
			
		||||
      :show-close='false'>
 | 
			
		||||
      <div class="box3">
 | 
			
		||||
        <el-row>
 | 
			
		||||
          <el-col :span='12'>
 | 
			
		||||
@@ -122,7 +124,7 @@ const tableProps = [
 | 
			
		||||
    prop: 'deliveryTime',
 | 
			
		||||
    label: '发货时间',
 | 
			
		||||
    filter: parseTime,
 | 
			
		||||
    minWidth: 150
 | 
			
		||||
    minWidth: 160
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    prop: 'code',
 | 
			
		||||
@@ -139,7 +141,8 @@ const tableProps = [
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    prop: 'rate',
 | 
			
		||||
    label: '发货比列(%)'
 | 
			
		||||
    label: '发货比列(%)',
 | 
			
		||||
    width: 110
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    prop: 'principalCost',
 | 
			
		||||
@@ -151,7 +154,7 @@ const tableProps2 = [
 | 
			
		||||
    prop: 'createTime',
 | 
			
		||||
    label: '添加时间',
 | 
			
		||||
    filter: parseTime,
 | 
			
		||||
    minWidth: 150
 | 
			
		||||
    minWidth: 160
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    prop: 'deliveryCarCode',
 | 
			
		||||
@@ -162,7 +165,7 @@ const tableProps2 = [
 | 
			
		||||
    prop: 'loadTime',
 | 
			
		||||
    label: '装车时间',
 | 
			
		||||
    filter: parseTime,
 | 
			
		||||
    minWidth: 150
 | 
			
		||||
    minWidth: 160
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    prop: 'productName',
 | 
			
		||||
@@ -171,7 +174,8 @@ const tableProps2 = [
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    prop: 'packagingSize',
 | 
			
		||||
    label: '装箱规格(片/箱)'
 | 
			
		||||
    label: '装箱规格(片/箱)',
 | 
			
		||||
    minWidth: 140
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    prop: 'packagingNum',
 | 
			
		||||
@@ -208,8 +212,8 @@ export default {
 | 
			
		||||
      tableBtn: [
 | 
			
		||||
        this.$auth.hasPermi('base:group-team:update')
 | 
			
		||||
          ? {
 | 
			
		||||
              type: 'detDetail',
 | 
			
		||||
              btnName: '查看发货详情'
 | 
			
		||||
              type: 'detail',
 | 
			
		||||
              btnName: '详情'
 | 
			
		||||
            }
 | 
			
		||||
          : undefined
 | 
			
		||||
      ].filter((v) => v),
 | 
			
		||||
@@ -228,7 +232,7 @@ export default {
 | 
			
		||||
      // 图
 | 
			
		||||
      chartDom: '',
 | 
			
		||||
      chart: '',
 | 
			
		||||
      chartHeight: this.tableHeight(300)
 | 
			
		||||
      chartHeight: this.tableHeight(300)*0.6
 | 
			
		||||
    }
 | 
			
		||||
  },
 | 
			
		||||
  // watch: {
 | 
			
		||||
@@ -268,6 +272,8 @@ export default {
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
    getBar() {
 | 
			
		||||
      let color = ['#7164FF','#288AFF','#63BDFF','#8EF0AB','#FFCE6A']
 | 
			
		||||
      let colorList = []
 | 
			
		||||
      if (
 | 
			
		||||
        this.chart !== null &&
 | 
			
		||||
        this.chart !== '' &&
 | 
			
		||||
@@ -278,64 +284,90 @@ export default {
 | 
			
		||||
      this.chartDom = document.getElementById('logDetPieBar')
 | 
			
		||||
      this.chart = echarts.init(this.chartDom)
 | 
			
		||||
      let seriesData = []
 | 
			
		||||
      let sumData = 0
 | 
			
		||||
      this.tableData && this.tableData.map(item =>{
 | 
			
		||||
      if (this.tableData.length > 0) {
 | 
			
		||||
        for (let i = 0; i < this.tableData.length; i++) {
 | 
			
		||||
          let obj = {}
 | 
			
		||||
          obj.value = this.tableData[i].num
 | 
			
		||||
          obj.name = this.tableData[i].name
 | 
			
		||||
          seriesData.push(obj)
 | 
			
		||||
          if (i < 5) {
 | 
			
		||||
            colorList.push(color[i])
 | 
			
		||||
          } else {
 | 
			
		||||
            colorList.push(color[i%5])
 | 
			
		||||
          }
 | 
			
		||||
        }
 | 
			
		||||
      }
 | 
			
		||||
      if (this.orderMsg.num < this.orderMsg.orderNum) {
 | 
			
		||||
        let obj = {}
 | 
			
		||||
        obj.value = item.rate
 | 
			
		||||
        obj.name = item.name
 | 
			
		||||
        seriesData.push(obj)
 | 
			
		||||
        sumData+=item.rate
 | 
			
		||||
      })
 | 
			
		||||
      if (sumData < 100) {
 | 
			
		||||
        let obj = {}
 | 
			
		||||
        obj.value = 100 - sumData
 | 
			
		||||
        obj.value = this.orderMsg.orderNum - this.orderMsg.num
 | 
			
		||||
        obj.name = "未发货"
 | 
			
		||||
        seriesData.push(obj)
 | 
			
		||||
        colorList.push('#F5F5F5')
 | 
			
		||||
      }else {
 | 
			
		||||
        let obj = {}
 | 
			
		||||
        obj.value = 0
 | 
			
		||||
        obj.name = "未发货"
 | 
			
		||||
        seriesData.push(obj)
 | 
			
		||||
        colorList.push('#F5F5F5')
 | 
			
		||||
      }
 | 
			
		||||
      var option = {
 | 
			
		||||
        color: ['#B0EB42', '#FF9747', '#FF6860', '#7164FF', '#288AFF', '#63BDFF', '#73DE93', '#FFCE6A'],
 | 
			
		||||
        tooltip: {
 | 
			
		||||
          trigger: 'item',
 | 
			
		||||
          formatter: function(params) {
 | 
			
		||||
            let str = `<span style="display:inline-block;width:8px;height:8px;margin: 0 8px 0 -3px;border-radius:2px;background-color:${params.color};"></span>`
 | 
			
		||||
            return `<span>
 | 
			
		||||
                <span style="color:rgba(0,0,0,0.85);">${str}${params.name}</span>
 | 
			
		||||
                <span style="display:inline-block;margin-left:10px;color:rgba(0,0,0,0.45);">${params.percent}</span>
 | 
			
		||||
              </span>`
 | 
			
		||||
          }
 | 
			
		||||
        },
 | 
			
		||||
        color: colorList,
 | 
			
		||||
        legend: {
 | 
			
		||||
          type: 'scroll',
 | 
			
		||||
          orient: 'vertical',
 | 
			
		||||
          right: '10%',
 | 
			
		||||
          top: 20,
 | 
			
		||||
          bottom: 20,
 | 
			
		||||
          icon: 'rect',
 | 
			
		||||
          itemHeight: 8,
 | 
			
		||||
          itemWidth: 8
 | 
			
		||||
          bottom: '5%',
 | 
			
		||||
          left: 'center',
 | 
			
		||||
          itemWidth: 8,
 | 
			
		||||
          itemHeight: 8
 | 
			
		||||
        },
 | 
			
		||||
        series: [
 | 
			
		||||
          {
 | 
			
		||||
            type: 'pie',
 | 
			
		||||
            radius: ['60%', '80%'],
 | 
			
		||||
            avoidLabelOverlap: false,
 | 
			
		||||
            label: {
 | 
			
		||||
              show: false,
 | 
			
		||||
              position: 'center'
 | 
			
		||||
            },
 | 
			
		||||
            radius: ['40%', '55%'],
 | 
			
		||||
            emphasis: {
 | 
			
		||||
              label: {
 | 
			
		||||
                show: true,
 | 
			
		||||
                fontSize: 40,
 | 
			
		||||
                fontWeight: 'bold'
 | 
			
		||||
              },
 | 
			
		||||
              scale: true ,
 | 
			
		||||
              scaleSize: 20 ,
 | 
			
		||||
              scale: false
 | 
			
		||||
            },
 | 
			
		||||
            labelLine: {
 | 
			
		||||
              show: false
 | 
			
		||||
            label: {
 | 
			
		||||
              alignTo: 'edge',
 | 
			
		||||
              formatter: '{name|{b}}\n{value|{c}}',
 | 
			
		||||
              minMargin: 5,
 | 
			
		||||
              edgeDistance: 10,
 | 
			
		||||
              lineHeight: 15,
 | 
			
		||||
              rich: {
 | 
			
		||||
                name: {
 | 
			
		||||
                  fontSize: 14,
 | 
			
		||||
                  color: 'rgba(0,0,0,0.65)'
 | 
			
		||||
                },
 | 
			
		||||
                value: {
 | 
			
		||||
                  fontSize: 14,
 | 
			
		||||
                  color: 'rgba(0,0,0,0.65)'
 | 
			
		||||
                }
 | 
			
		||||
              }
 | 
			
		||||
            },
 | 
			
		||||
            data: seriesData
 | 
			
		||||
          },
 | 
			
		||||
          {
 | 
			
		||||
            type: 'pie',
 | 
			
		||||
            radius: ['40%', '40%'],
 | 
			
		||||
            label: {
 | 
			
		||||
              show: true,
 | 
			
		||||
              position: 'center',
 | 
			
		||||
              color: '#000',
 | 
			
		||||
              formatter: [
 | 
			
		||||
                  '{a|'+this.orderMsg.orderNum+'}',
 | 
			
		||||
                  '{b|总数}'
 | 
			
		||||
              ].join('\n\n'),
 | 
			
		||||
              rich: {
 | 
			
		||||
                a: {
 | 
			
		||||
                    fontSize: 26 +'px'
 | 
			
		||||
                },
 | 
			
		||||
                b: {
 | 
			
		||||
                    fontSize: 16 +'px'
 | 
			
		||||
                }
 | 
			
		||||
              }
 | 
			
		||||
            },
 | 
			
		||||
            emphasis: {
 | 
			
		||||
              scale: false
 | 
			
		||||
            },
 | 
			
		||||
            data: [100]
 | 
			
		||||
          }
 | 
			
		||||
        ]
 | 
			
		||||
      };
 | 
			
		||||
@@ -375,11 +407,13 @@ export default {
 | 
			
		||||
</script>
 | 
			
		||||
<style scoped lang='scss'>
 | 
			
		||||
.box1 {
 | 
			
		||||
  height: 56px;
 | 
			
		||||
  height: 76px;
 | 
			
		||||
  border-bottom: 1px solid #E9E9E9;
 | 
			
		||||
  margin: 0px 8px 20px 30px;
 | 
			
		||||
  .box_col {
 | 
			
		||||
    display: inline-block;
 | 
			
		||||
    width: 20%;
 | 
			
		||||
    padding: 8px 8px 8px 40px;
 | 
			
		||||
    padding: 8px 8px 8px 8px;
 | 
			
		||||
    .blodTip {
 | 
			
		||||
      height: 16px;
 | 
			
		||||
      font-size: 14px;
 | 
			
		||||
@@ -396,7 +430,7 @@ export default {
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
.box2 {
 | 
			
		||||
    padding:32px 32px 30px 30px;
 | 
			
		||||
    padding:0px 32px 30px 30px;
 | 
			
		||||
    height: calc(100vh - 150px);
 | 
			
		||||
}
 | 
			
		||||
.boxTitle {
 | 
			
		||||
 
 | 
			
		||||
@@ -2,7 +2,7 @@
 | 
			
		||||
  <div class="searchBarBox divHeight" ref="searchBarRef" :style="{ paddingRight: isFold ? '55px' : '0px' }">
 | 
			
		||||
    <el-form :inline="true" class="demo-form-inline">
 | 
			
		||||
      <span class="blue-block"></span>
 | 
			
		||||
      <el-form-item label="能源类型">
 | 
			
		||||
      <el-form-item label="能源类型" required>
 | 
			
		||||
        <el-select v-model="queryParams.energyTypeId" placeholder="请选择" style="width: 100px;" size="small">
 | 
			
		||||
          <el-option
 | 
			
		||||
            v-for="item in energyTypeList"
 | 
			
		||||
@@ -12,7 +12,7 @@
 | 
			
		||||
          </el-option>
 | 
			
		||||
        </el-select>
 | 
			
		||||
      </el-form-item>
 | 
			
		||||
      <el-form-item label="时间维度">
 | 
			
		||||
      <el-form-item label="时间维度" required>
 | 
			
		||||
        <el-select v-model="queryParams.timeDim" placeholder="请选择" style="width: 80px;" size="small">
 | 
			
		||||
          <el-option
 | 
			
		||||
            v-for="item in getDictDatas(this.DICT_TYPE.TIME_DIM)"
 | 
			
		||||
@@ -22,7 +22,7 @@
 | 
			
		||||
          </el-option>
 | 
			
		||||
        </el-select>
 | 
			
		||||
      </el-form-item>
 | 
			
		||||
      <el-form-item label="时间范围">
 | 
			
		||||
      <el-form-item label="时间范围" required>
 | 
			
		||||
        <div v-show="queryParams.timeDim === '1'">
 | 
			
		||||
          <el-date-picker
 | 
			
		||||
            v-model="timeValue"
 | 
			
		||||
@@ -124,7 +124,7 @@
 | 
			
		||||
          </el-date-picker>
 | 
			
		||||
        </div>
 | 
			
		||||
      </el-form-item>
 | 
			
		||||
      <el-form-item label="对象维度">
 | 
			
		||||
      <el-form-item label="对象维度" required>
 | 
			
		||||
        <el-select v-model="queryParams.objType" placeholder="请选择" style="width: 80px;" @change="selectObjs" size="small">
 | 
			
		||||
          <el-option
 | 
			
		||||
            v-for="item in getDictDatas(this.DICT_TYPE.OBJECT_TYPE)"
 | 
			
		||||
@@ -134,7 +134,7 @@
 | 
			
		||||
          </el-option>
 | 
			
		||||
        </el-select>
 | 
			
		||||
      </el-form-item>
 | 
			
		||||
      <el-form-item label="对象选择">
 | 
			
		||||
      <el-form-item label="对象选择" required>
 | 
			
		||||
        <el-select v-model="queryParams.objIds" placeholder="请选择" multiple :multiple-limit='5' collapse-tags style="width: 200px;" size="small">
 | 
			
		||||
          <el-option
 | 
			
		||||
            v-for="item in objectList"
 | 
			
		||||
@@ -148,6 +148,8 @@
 | 
			
		||||
      </el-form-item>
 | 
			
		||||
      <el-form-item>
 | 
			
		||||
        <el-button type="primary" size="small" @click="search">查询</el-button>
 | 
			
		||||
        <span class="separateStyle"></span>
 | 
			
		||||
        <el-button size="small" @click="resetBtn">重置</el-button>
 | 
			
		||||
      </el-form-item>
 | 
			
		||||
    </el-form>
 | 
			
		||||
    <span v-if="isFold" class="foldClass" @click='switchMode'>
 | 
			
		||||
@@ -400,6 +402,19 @@ export default {
 | 
			
		||||
      console.log(this.queryParams)
 | 
			
		||||
      this.$emit('submit', this.queryParams)
 | 
			
		||||
    },
 | 
			
		||||
    resetBtn() {
 | 
			
		||||
      this.queryParams.energyTypeId = null
 | 
			
		||||
      this.queryParams.timeDim = this.getDictDatas(this.DICT_TYPE.TIME_DIM)[0].value // 默认时
 | 
			
		||||
      this.queryParams.objIds = []
 | 
			
		||||
      this.queryParams.objType = ''
 | 
			
		||||
      this.timeValue = []
 | 
			
		||||
      this.dateValue = []
 | 
			
		||||
      this.weekValue1 = null
 | 
			
		||||
      this.weekValue2 = null
 | 
			
		||||
      this.monthValue = []
 | 
			
		||||
      this.yearValue1 = null
 | 
			
		||||
      this.yearValue2 = null
 | 
			
		||||
    },
 | 
			
		||||
    transformTime(timeStamp) {// 本月最后一天
 | 
			
		||||
      let year = moment(timeStamp).format('YYYY')
 | 
			
		||||
      let month = moment(timeStamp).format('MM')
 | 
			
		||||
@@ -471,4 +486,12 @@ export default {
 | 
			
		||||
  height: 45px;
 | 
			
		||||
  overflow: hidden;
 | 
			
		||||
}
 | 
			
		||||
.separateStyle {
 | 
			
		||||
  display: inline-block;
 | 
			
		||||
  width: 1px;
 | 
			
		||||
  height: 24px;
 | 
			
		||||
  background: #E8E8E8;
 | 
			
		||||
  vertical-align: middle;
 | 
			
		||||
  margin: 0 10px;
 | 
			
		||||
}
 | 
			
		||||
</style>
 | 
			
		||||
@@ -34,10 +34,10 @@ export default {
 | 
			
		||||
  mounted() {
 | 
			
		||||
    window.addEventListener('resize', () => {
 | 
			
		||||
      this.tableH = this.tableHeight(260)
 | 
			
		||||
      this.isFold = this.searchBarWidth('contrastAnalysisBox', 1310)
 | 
			
		||||
      this.isFold = this.searchBarWidth('contrastAnalysisBox', 1437)
 | 
			
		||||
      // console.log(document.getElementById("contrastAnalysisBox").offsetWidth)
 | 
			
		||||
    })
 | 
			
		||||
    this.isFold = this.searchBarWidth('contrastAnalysisBox', 1310)
 | 
			
		||||
    this.isFold = this.searchBarWidth('contrastAnalysisBox', 1437)
 | 
			
		||||
  },
 | 
			
		||||
  methods: {
 | 
			
		||||
    getList(params) {
 | 
			
		||||
 
 | 
			
		||||
@@ -1,7 +1,7 @@
 | 
			
		||||
<template>
 | 
			
		||||
  <el-form :inline="true" class="demo-form-inline">
 | 
			
		||||
    <span class="blue-block"></span>
 | 
			
		||||
    <el-form-item label="对象选择">
 | 
			
		||||
    <el-form-item label="对象选择" required>
 | 
			
		||||
      <el-cascader
 | 
			
		||||
        v-model="objArr"
 | 
			
		||||
        :options="objList"
 | 
			
		||||
@@ -11,7 +11,7 @@
 | 
			
		||||
        style="width: 250px;"
 | 
			
		||||
        clearable></el-cascader>
 | 
			
		||||
    </el-form-item>
 | 
			
		||||
    <el-form-item label="时间维度">
 | 
			
		||||
    <el-form-item label="时间维度" required>
 | 
			
		||||
      <el-select v-model="queryParams.type" placeholder="请选择" style="width: 80px;" size="small">
 | 
			
		||||
        <el-option
 | 
			
		||||
          v-for="item in timeType"
 | 
			
		||||
@@ -22,7 +22,7 @@
 | 
			
		||||
        </el-option>
 | 
			
		||||
      </el-select>
 | 
			
		||||
    </el-form-item>
 | 
			
		||||
    <el-form-item label="时间">
 | 
			
		||||
    <el-form-item label="时间" required>
 | 
			
		||||
      <div v-show="queryParams.type === 1">
 | 
			
		||||
        <el-date-picker
 | 
			
		||||
          v-model="monthValue"
 | 
			
		||||
@@ -129,7 +129,7 @@ export default {
 | 
			
		||||
    },
 | 
			
		||||
    // 查询
 | 
			
		||||
    search() {
 | 
			
		||||
      if (!this.objArr.length === 0) {
 | 
			
		||||
      if (this.objArr.length === 0) {
 | 
			
		||||
        this.$modal.msgError('请选择对象')
 | 
			
		||||
        return false
 | 
			
		||||
      } else {
 | 
			
		||||
 
 | 
			
		||||
@@ -2,7 +2,7 @@
 | 
			
		||||
  <div class="searchBarBox divHeight" ref="searchBarRef" :style="{ paddingRight: isFold ? '55px' : '0px' }">
 | 
			
		||||
    <el-form :inline="true" class="demo-form-inline">
 | 
			
		||||
      <span class="blue-block"></span>
 | 
			
		||||
      <el-form-item label="能源类型">
 | 
			
		||||
      <el-form-item label="能源类型" required>
 | 
			
		||||
        <el-select v-model="queryParams.energyTypeId" placeholder="请选择" style="width: 100px;" size="small">
 | 
			
		||||
          <el-option
 | 
			
		||||
            v-for="item in energyTypeList"
 | 
			
		||||
@@ -12,7 +12,7 @@
 | 
			
		||||
          </el-option>
 | 
			
		||||
        </el-select>
 | 
			
		||||
      </el-form-item>
 | 
			
		||||
      <el-form-item label="对象选择">
 | 
			
		||||
      <el-form-item label="对象选择" required>
 | 
			
		||||
        <el-cascader
 | 
			
		||||
          v-model="objArr"
 | 
			
		||||
          :options="objList"
 | 
			
		||||
@@ -21,7 +21,7 @@
 | 
			
		||||
          size="small"
 | 
			
		||||
          clearable></el-cascader>
 | 
			
		||||
      </el-form-item>
 | 
			
		||||
      <el-form-item label="时间维度">
 | 
			
		||||
      <el-form-item label="时间维度" required>
 | 
			
		||||
        <el-select v-model="queryParams.timeDim" placeholder="请选择" style="width: 80px;" size="small">
 | 
			
		||||
          <el-option
 | 
			
		||||
            v-for="item in getDictDatas(this.DICT_TYPE.TIME_DIM)"
 | 
			
		||||
@@ -32,7 +32,7 @@
 | 
			
		||||
          </el-option>
 | 
			
		||||
        </el-select>
 | 
			
		||||
      </el-form-item>
 | 
			
		||||
      <el-form-item label="时间范围">
 | 
			
		||||
      <el-form-item label="时间范围" required>
 | 
			
		||||
        <div v-show="queryParams.timeDim === '1'">
 | 
			
		||||
          <el-date-picker
 | 
			
		||||
            v-model="timeValue"
 | 
			
		||||
@@ -129,6 +129,8 @@
 | 
			
		||||
      </el-form-item>
 | 
			
		||||
      <el-form-item>
 | 
			
		||||
        <el-button type="primary" size="small" @click="search">查询</el-button>
 | 
			
		||||
        <span class="separateStyle"></span>
 | 
			
		||||
        <el-button size="small" @click="resetBtn">重置</el-button>
 | 
			
		||||
      </el-form-item>
 | 
			
		||||
    </el-form>
 | 
			
		||||
    <span v-if="isFold" class="foldClass" @click='switchMode'>
 | 
			
		||||
@@ -360,6 +362,14 @@ export default {
 | 
			
		||||
      this.queryParams.endTime = this.queryParams.endTime + ''
 | 
			
		||||
      this.$emit('submit', this.queryParams)
 | 
			
		||||
    },
 | 
			
		||||
    // 重置
 | 
			
		||||
    resetBtn() {
 | 
			
		||||
      this.queryParams.energyTypeId = null
 | 
			
		||||
      this.queryParams.objId = null
 | 
			
		||||
      this.objArr = []
 | 
			
		||||
      this.queryParams.timeDim = this.getDictDatas(this.DICT_TYPE.TIME_DIM)[0].value // 默认时
 | 
			
		||||
      this.timeValue = [moment().startOf('day'), moment().endOf('day')-59*61*1000]
 | 
			
		||||
    },
 | 
			
		||||
    transformTime(timeStamp) {// 本月最后一天
 | 
			
		||||
      let year = moment(timeStamp).format('YYYY')
 | 
			
		||||
      let month = moment(timeStamp).format('MM')
 | 
			
		||||
@@ -435,4 +445,12 @@ export default {
 | 
			
		||||
  height: 45px;
 | 
			
		||||
  overflow: hidden;
 | 
			
		||||
}
 | 
			
		||||
.separateStyle {
 | 
			
		||||
  display: inline-block;
 | 
			
		||||
  width: 1px;
 | 
			
		||||
  height: 24px;
 | 
			
		||||
  background: #E8E8E8;
 | 
			
		||||
  vertical-align: middle;
 | 
			
		||||
  margin: 0 10px;
 | 
			
		||||
}
 | 
			
		||||
</style>
 | 
			
		||||
@@ -34,9 +34,9 @@ export default {
 | 
			
		||||
  mounted() {
 | 
			
		||||
    window.addEventListener('resize', () => {
 | 
			
		||||
      this.tableH = this.tableHeight(260)
 | 
			
		||||
      this.isFold = this.searchBarWidth('trendAnalysisBox', 1146)
 | 
			
		||||
      this.isFold = this.searchBarWidth('trendAnalysisBox', 1263)
 | 
			
		||||
    })
 | 
			
		||||
    this.isFold = this.searchBarWidth('trendAnalysisBox', 1146)
 | 
			
		||||
    this.isFold = this.searchBarWidth('trendAnalysisBox', 1263)
 | 
			
		||||
  },
 | 
			
		||||
  methods: {
 | 
			
		||||
    getList(params) {
 | 
			
		||||
 
 | 
			
		||||
@@ -1,7 +1,7 @@
 | 
			
		||||
<template>
 | 
			
		||||
  <el-form :inline="true" class="demo-form-inline">
 | 
			
		||||
    <span class="blue-block"></span>
 | 
			
		||||
    <el-form-item label="对象选择">
 | 
			
		||||
    <el-form-item label="对象选择" required>
 | 
			
		||||
      <el-cascader
 | 
			
		||||
        v-model="objArr"
 | 
			
		||||
        :options="objList"
 | 
			
		||||
@@ -10,7 +10,7 @@
 | 
			
		||||
        size="small"
 | 
			
		||||
        clearable></el-cascader>
 | 
			
		||||
    </el-form-item>
 | 
			
		||||
    <el-form-item label="时间维度">
 | 
			
		||||
    <el-form-item label="时间维度" required>
 | 
			
		||||
      <el-select v-model="queryParams.type" placeholder="请选择" style="width: 80px;" size="small">
 | 
			
		||||
        <el-option
 | 
			
		||||
          v-for="item in timeType"
 | 
			
		||||
@@ -21,7 +21,7 @@
 | 
			
		||||
        </el-option>
 | 
			
		||||
      </el-select>
 | 
			
		||||
    </el-form-item>
 | 
			
		||||
    <el-form-item label="时间">
 | 
			
		||||
    <el-form-item label="时间" required>
 | 
			
		||||
      <div v-show="queryParams.type === 1 || queryParams.type === 2">
 | 
			
		||||
        <el-date-picker
 | 
			
		||||
          v-model="yearValue"
 | 
			
		||||
@@ -103,7 +103,7 @@ export default {
 | 
			
		||||
    },
 | 
			
		||||
    // 查询
 | 
			
		||||
    search() {
 | 
			
		||||
      if (!this.objArr.length === 0) {
 | 
			
		||||
      if (this.objArr.length === 0) {
 | 
			
		||||
        this.$modal.msgError('请选择对象')
 | 
			
		||||
        return false
 | 
			
		||||
      } else {
 | 
			
		||||
 
 | 
			
		||||
@@ -25,18 +25,16 @@
 | 
			
		||||
      </el-col>
 | 
			
		||||
    </el-row>
 | 
			
		||||
    <el-row>
 | 
			
		||||
      <el-col :span="24">
 | 
			
		||||
        <el-form-item label="描述" prop="description">
 | 
			
		||||
          <el-input v-model="form.description"></el-input>
 | 
			
		||||
        </el-form-item>
 | 
			
		||||
      </el-col>
 | 
			
		||||
    </el-row>
 | 
			
		||||
    <el-row>
 | 
			
		||||
      <el-col :span="24">
 | 
			
		||||
      <el-col :span="12">
 | 
			
		||||
        <el-form-item label="是否采集" prop="collection">
 | 
			
		||||
          <el-switch v-model="form.collection"></el-switch>
 | 
			
		||||
        </el-form-item>
 | 
			
		||||
      </el-col>
 | 
			
		||||
      <el-col :span="12">
 | 
			
		||||
        <el-form-item label="描述" prop="description">
 | 
			
		||||
          <el-input v-model="form.description"></el-input>
 | 
			
		||||
        </el-form-item>
 | 
			
		||||
      </el-col>
 | 
			
		||||
    </el-row>
 | 
			
		||||
  </el-form>
 | 
			
		||||
</template>
 | 
			
		||||
 
 | 
			
		||||
@@ -1,6 +1,6 @@
 | 
			
		||||
<template>
 | 
			
		||||
  <div>
 | 
			
		||||
    <el-drawer :title="drawerTitle" :visible.sync="visible" size="70%" @close='closeD'>
 | 
			
		||||
    <el-drawer :title="drawerTitle" :visible.sync="visible" size="70%" @close='closeD' :show-close='false'>
 | 
			
		||||
      <div class="box">
 | 
			
		||||
        <el-form :inline="true">
 | 
			
		||||
          <el-form-item label="关联表名">
 | 
			
		||||
 
 | 
			
		||||
@@ -39,14 +39,12 @@
 | 
			
		||||
      </el-col>
 | 
			
		||||
    </el-row>
 | 
			
		||||
    <el-row>
 | 
			
		||||
      <el-col :span="24">
 | 
			
		||||
      <el-col :span="12">
 | 
			
		||||
        <el-form-item label="是否采集" prop="collection">
 | 
			
		||||
          <el-switch v-model="form.collection"></el-switch>
 | 
			
		||||
        </el-form-item>
 | 
			
		||||
      </el-col>
 | 
			
		||||
    </el-row>
 | 
			
		||||
    <el-row>
 | 
			
		||||
      <el-col :span="24">
 | 
			
		||||
      <el-col :span="12">
 | 
			
		||||
        <el-form-item label="描述" prop="description">
 | 
			
		||||
          <el-input v-model="form.description"></el-input>
 | 
			
		||||
        </el-form-item>
 | 
			
		||||
 
 | 
			
		||||
@@ -37,6 +37,7 @@
 | 
			
		||||
      @cancel="handleCancel"
 | 
			
		||||
      @confirm="handleConfirm"
 | 
			
		||||
      :before-close="handleCancel"
 | 
			
		||||
      width='30%'
 | 
			
		||||
    >
 | 
			
		||||
      <energy-plc-connect-add ref="energyPlcConnect" :objList="objList" @successSubmit="successSubmit" />
 | 
			
		||||
    </base-dialog>
 | 
			
		||||
 
 | 
			
		||||
@@ -27,7 +27,7 @@
 | 
			
		||||
</template>
 | 
			
		||||
 | 
			
		||||
<script>
 | 
			
		||||
import { getEnergyQuantityRealtimePage, exportEnergyQuantityRealtimeExcel } from "@/api/base/energyQuantityRealtime"
 | 
			
		||||
import { getEnergyQuantityRealtimePage } from "@/api/base/energyQuantityRealtime"
 | 
			
		||||
import { getEnergyTypeListAll } from "@/api/base/energyType"
 | 
			
		||||
// import { publicFormatter } from '@/utils/dict'
 | 
			
		||||
import FileSaver from "file-saver"
 | 
			
		||||
@@ -140,18 +140,16 @@ export default {
 | 
			
		||||
          break
 | 
			
		||||
        default:
 | 
			
		||||
          this.exportTable()
 | 
			
		||||
          // this.$modal.confirm('是否确认导出').then(() => {
 | 
			
		||||
          //     return exportEnergyQuantityRealtimeExcel({...this.queryParams});
 | 
			
		||||
          //   }).then(response => {
 | 
			
		||||
          //     console.log(response)
 | 
			
		||||
          //     this.$download.excel(response, '能源抄表.xls');
 | 
			
		||||
          //   }).catch(() => {})
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
    /** 查询列表 */
 | 
			
		||||
    getList() {
 | 
			
		||||
      getEnergyQuantityRealtimePage(this.queryParams).then(response => {
 | 
			
		||||
        this.list = response.data.list || []
 | 
			
		||||
        let arr = response.data.list || []
 | 
			
		||||
        arr && arr.map(item => {
 | 
			
		||||
          item.amount = item.amount ? (!isNaN(parseFloat(item.amount)) && isFinite(item.amount) ? item.amount.toFixed(2) : '') : ''
 | 
			
		||||
        })
 | 
			
		||||
        this.list = arr
 | 
			
		||||
        this.total = response.data.total;
 | 
			
		||||
        this.exportList = []
 | 
			
		||||
      });
 | 
			
		||||
 
 | 
			
		||||
@@ -5,11 +5,12 @@
 | 
			
		||||
        v-for='item in tableProps'
 | 
			
		||||
        :key="item.prop"
 | 
			
		||||
        :prop="item.prop" 
 | 
			
		||||
        :label="item.label" 
 | 
			
		||||
        :label="item.label"
 | 
			
		||||
        :align="item.align ? item.align : 'left'" 
 | 
			
		||||
        width="120">
 | 
			
		||||
      </el-table-column>
 | 
			
		||||
    </el-table>
 | 
			
		||||
    <span v-if='singlePrice'><span class='priceTitle'>单价(元): </span>{{ singlePrice }}</span>
 | 
			
		||||
    <span v-if='singlePrice'><span class='priceTitle'>单价(元): </span>{{ singlePrice.toFixed(2) }}</span>
 | 
			
		||||
    <el-button
 | 
			
		||||
      slot="reference"
 | 
			
		||||
      type="text"
 | 
			
		||||
@@ -32,7 +33,8 @@ const temp1 = [
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    prop: 'price',
 | 
			
		||||
    label: '单价(元)'
 | 
			
		||||
    label: '单价(元)',
 | 
			
		||||
    align: 'right'
 | 
			
		||||
  }
 | 
			
		||||
]
 | 
			
		||||
const temp2 = [
 | 
			
		||||
@@ -46,7 +48,8 @@ const temp2 = [
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    prop: 'price',
 | 
			
		||||
    label: '单价(元)'
 | 
			
		||||
    label: '单价(元)',
 | 
			
		||||
    align: 'right'
 | 
			
		||||
  }
 | 
			
		||||
]
 | 
			
		||||
export default {
 | 
			
		||||
@@ -78,12 +81,20 @@ export default {
 | 
			
		||||
          console.log(res)
 | 
			
		||||
          if (res.data.pricingMethod === 0) {
 | 
			
		||||
            this.tableProps = this.temp1
 | 
			
		||||
            this.tableData = res.data.segPriceList
 | 
			
		||||
            this.singlePrice = ''
 | 
			
		||||
            let arr1 = res.data.segPriceList
 | 
			
		||||
            for (let item of arr1) {
 | 
			
		||||
              item.price = item.price.toFixed(2)
 | 
			
		||||
            }
 | 
			
		||||
            this.tableData = arr1
 | 
			
		||||
          } else if (res.data.pricingMethod === 1) {
 | 
			
		||||
            this.tableProps = this.temp2
 | 
			
		||||
            this.tableData = res.data.usedPriceList
 | 
			
		||||
            this.singlePrice = ''
 | 
			
		||||
            let arr2 = res.data.usedPriceList
 | 
			
		||||
            for (let item of arr2) {
 | 
			
		||||
              item.price = item.price.toFixed(2)
 | 
			
		||||
            }
 | 
			
		||||
            this.tableData = arr2
 | 
			
		||||
          } else {
 | 
			
		||||
            this.tableProps = []
 | 
			
		||||
            this.tableData = []
 | 
			
		||||
 
 | 
			
		||||
@@ -1,5 +1,5 @@
 | 
			
		||||
<template>
 | 
			
		||||
  <el-form ref="form" :rules="rules" label-width="80px" :model="form">
 | 
			
		||||
  <el-form ref="form" :rules="rules" label-width="100px" :model="form">
 | 
			
		||||
    <el-row>
 | 
			
		||||
      <el-col :span="12">
 | 
			
		||||
        <el-form-item label="能源类型" prop="name">
 | 
			
		||||
 
 | 
			
		||||
@@ -26,28 +26,6 @@
 | 
			
		||||
        </el-form-item>
 | 
			
		||||
      </el-col>
 | 
			
		||||
    </el-row>
 | 
			
		||||
    <el-row>
 | 
			
		||||
      <el-col :span="12">
 | 
			
		||||
        <el-form-item label="监控模式" prop="type">
 | 
			
		||||
          <el-select v-model="form.type" placeholder="请选择" style="width: 100%;" @change="typeChange">
 | 
			
		||||
            <el-option label="合并" :value= "1" ></el-option>
 | 
			
		||||
            <el-option label="详细" :value= "2" ></el-option>
 | 
			
		||||
          </el-select>
 | 
			
		||||
        </el-form-item>
 | 
			
		||||
      </el-col>
 | 
			
		||||
      <el-col :span="12">
 | 
			
		||||
        <el-form-item label="监控详细参数" prop="type" v-if="form.type === 2">
 | 
			
		||||
          <el-select v-model="form.plcParamId" placeholder="请选择" style="width: 100%;" @change="selectDetail">
 | 
			
		||||
            <el-option
 | 
			
		||||
              v-for="item in detailList"
 | 
			
		||||
              :key="item.id"
 | 
			
		||||
              :label="item.name"
 | 
			
		||||
              :value="item.id">
 | 
			
		||||
            </el-option>
 | 
			
		||||
          </el-select>
 | 
			
		||||
        </el-form-item>
 | 
			
		||||
      </el-col>
 | 
			
		||||
    </el-row>
 | 
			
		||||
    <el-row>
 | 
			
		||||
      <el-col :span="12">
 | 
			
		||||
        <el-form-item label="指标类型" prop="limitType">
 | 
			
		||||
@@ -61,10 +39,32 @@
 | 
			
		||||
          </el-select>
 | 
			
		||||
        </el-form-item>
 | 
			
		||||
      </el-col>
 | 
			
		||||
      <el-col :span="12">
 | 
			
		||||
        <el-form-item label="监控模式" prop="type">
 | 
			
		||||
          <el-select v-model="form.type" placeholder="请选择" style="width: 100%;" @change="typeChange">
 | 
			
		||||
            <el-option label="合并" :value= "1" ></el-option>
 | 
			
		||||
            <el-option label="详细" :value= "2" ></el-option>
 | 
			
		||||
          </el-select>
 | 
			
		||||
        </el-form-item>
 | 
			
		||||
      </el-col>
 | 
			
		||||
    </el-row>
 | 
			
		||||
    <el-row>
 | 
			
		||||
      <el-col :span="12">
 | 
			
		||||
        <el-form-item label="消耗量阈值">
 | 
			
		||||
          <el-input-number v-model="form.minValue" placeholder="最小值" :max="10000000000000000" style="width: 50%;"></el-input-number>
 | 
			
		||||
          <el-input-number v-model="form.maxValue" placeholder="最大值" :max="10000000000000000" style="width: 50%;"></el-input-number>
 | 
			
		||||
          <el-input-number v-model="form.minValue" placeholder="最小值" :max="9999999" style="width: 50%;"></el-input-number>
 | 
			
		||||
          <el-input-number v-model="form.maxValue" placeholder="最大值" :max="9999999" style="width: 50%;"></el-input-number>
 | 
			
		||||
        </el-form-item>
 | 
			
		||||
      </el-col>
 | 
			
		||||
      <el-col :span="12">
 | 
			
		||||
        <el-form-item label="监控详细参数" prop="type" v-if="form.type === 2">
 | 
			
		||||
          <el-select v-model="form.plcParamId" placeholder="请选择" style="width: 100%;" @change="selectDetail">
 | 
			
		||||
            <el-option
 | 
			
		||||
              v-for="item in detailList"
 | 
			
		||||
              :key="item.id"
 | 
			
		||||
              :label="item.name"
 | 
			
		||||
              :value="item.id">
 | 
			
		||||
            </el-option>
 | 
			
		||||
          </el-select>
 | 
			
		||||
        </el-form-item>
 | 
			
		||||
      </el-col>
 | 
			
		||||
    </el-row>
 | 
			
		||||
 
 | 
			
		||||
@@ -37,7 +37,7 @@
 | 
			
		||||
      @cancel="handleCancel"
 | 
			
		||||
      @confirm="handleConfirm"
 | 
			
		||||
      :before-close="handleCancel"
 | 
			
		||||
      width='60%'
 | 
			
		||||
      width='50%'
 | 
			
		||||
    >
 | 
			
		||||
      <energy-limit-add ref="energyLimit" @successSubmit="successSubmit" :energyTypeList="energyTypeList" :objList="objList"/>
 | 
			
		||||
    </base-dialog>
 | 
			
		||||
 
 | 
			
		||||
@@ -40,13 +40,13 @@ const tableProps = [
 | 
			
		||||
    prop: 'startTime',
 | 
			
		||||
    label: '开始时间',
 | 
			
		||||
    filter: parseTime,
 | 
			
		||||
    minWidth: 150
 | 
			
		||||
    minWidth: 160
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    prop: 'endTime',
 | 
			
		||||
    label: '结束时间',
 | 
			
		||||
    filter: parseTime,
 | 
			
		||||
    minWidth: 150
 | 
			
		||||
    minWidth: 160
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    prop: 'statisticName',
 | 
			
		||||
 
 | 
			
		||||
@@ -70,7 +70,7 @@ export default {
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
          type: 'datePicker',
 | 
			
		||||
          label: '时间(必填)',
 | 
			
		||||
          label: '时间',
 | 
			
		||||
          dateType: 'datetimerange',
 | 
			
		||||
          format: 'yyyy-MM-dd HH:mm:ss',
 | 
			
		||||
          valueFormat: "timestamp",
 | 
			
		||||
@@ -80,7 +80,8 @@ export default {
 | 
			
		||||
          param: 'timeVal',
 | 
			
		||||
          defaultSelect: [],
 | 
			
		||||
          width: 350,
 | 
			
		||||
          clearable: false
 | 
			
		||||
          clearable: false,
 | 
			
		||||
          required:true
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
          type: 'button',
 | 
			
		||||
 
 | 
			
		||||
@@ -1,6 +1,6 @@
 | 
			
		||||
<template>
 | 
			
		||||
  <div>
 | 
			
		||||
    <el-drawer :title="drawerTitle" :visible.sync="visible" size="70%" @close='closeD'>
 | 
			
		||||
    <el-drawer :title="drawerTitle" :visible.sync="visible" size="70%" @close='closeD' :show-close='false'>
 | 
			
		||||
      <div class="box">
 | 
			
		||||
        <el-form :inline="true">
 | 
			
		||||
          <el-form-item label="方案名称">
 | 
			
		||||
 
 | 
			
		||||
@@ -3,7 +3,8 @@
 | 
			
		||||
    title="新增"
 | 
			
		||||
    :visible.sync="centervisible"
 | 
			
		||||
    size="60%"
 | 
			
		||||
    @close='closeA'>
 | 
			
		||||
    @close='closeA'
 | 
			
		||||
    :show-close='false'>
 | 
			
		||||
    <div class="box">
 | 
			
		||||
      <!-- 搜索工作栏 -->
 | 
			
		||||
      <search-bar
 | 
			
		||||
 
 | 
			
		||||
@@ -172,11 +172,11 @@ export default {
 | 
			
		||||
        this.$modal.msgWarning('工单不能为空')
 | 
			
		||||
        return false
 | 
			
		||||
      }
 | 
			
		||||
      if (!val.objType) {
 | 
			
		||||
      if (!val.energyTypeId) {
 | 
			
		||||
        this.$modal.msgWarning('能源类型不能为空')
 | 
			
		||||
        return false
 | 
			
		||||
      }
 | 
			
		||||
      if (!val.energyTypeId) {
 | 
			
		||||
      if (!val.objType) {
 | 
			
		||||
        this.$modal.msgWarning('对象维度不能为空')
 | 
			
		||||
        return false
 | 
			
		||||
      }
 | 
			
		||||
 
 | 
			
		||||
@@ -28,59 +28,96 @@
 | 
			
		||||
 | 
			
		||||
<script>
 | 
			
		||||
import basicPage from '../../../core/mixins/basic-page';
 | 
			
		||||
import { parseTime } from '../../../core/mixins/code-filter';
 | 
			
		||||
import moment from 'moment';
 | 
			
		||||
import {
 | 
			
		||||
	getEqAnalysis,
 | 
			
		||||
	exportEqAnalysisExcel
 | 
			
		||||
	exportEqAnalysisExcel,
 | 
			
		||||
} from '@/api/equipment/analysis/statistics';
 | 
			
		||||
 | 
			
		||||
const tableProps = [
 | 
			
		||||
	{
 | 
			
		||||
		prop: 'recordTime',
 | 
			
		||||
		label: '时间段',
 | 
			
		||||
		filter: parseTime
 | 
			
		||||
		filter: (val) => {
 | 
			
		||||
			if (val && val.length > 0) {
 | 
			
		||||
				return (
 | 
			
		||||
					moment(val[0]).format('YYYY-MM-DD HH:mm:ss') +
 | 
			
		||||
					' ~ ' +
 | 
			
		||||
					moment(val[1]).format('YYYY-MM-DD HH:mm:ss')
 | 
			
		||||
				);
 | 
			
		||||
			}
 | 
			
		||||
			return '-';
 | 
			
		||||
		},
 | 
			
		||||
	},
 | 
			
		||||
	{
 | 
			
		||||
		prop: 'lineName',
 | 
			
		||||
		label: '产线'
 | 
			
		||||
		label: '产线',
 | 
			
		||||
	},
 | 
			
		||||
	{
 | 
			
		||||
		prop: 'sectionName',
 | 
			
		||||
		label: '工段'
 | 
			
		||||
		label: '工段',
 | 
			
		||||
	},
 | 
			
		||||
	{
 | 
			
		||||
		prop: 'equipmentName',
 | 
			
		||||
		label: '设备名称'
 | 
			
		||||
		label: '设备名称',
 | 
			
		||||
	},
 | 
			
		||||
	{
 | 
			
		||||
		prop: 'equipmentType',
 | 
			
		||||
		label: '设备类型'
 | 
			
		||||
		label: '设备类型',
 | 
			
		||||
	},
 | 
			
		||||
	{
 | 
			
		||||
		prop: 'workTime',
 | 
			
		||||
		label: '工作时间累积(h)'
 | 
			
		||||
		label: '工作时间累积(h)',
 | 
			
		||||
	},
 | 
			
		||||
	{
 | 
			
		||||
		prop: 'repairCount',
 | 
			
		||||
		label: '维修次数'
 | 
			
		||||
		label: '维修次数',
 | 
			
		||||
	},
 | 
			
		||||
	{
 | 
			
		||||
		prop: 'maintainCount',
 | 
			
		||||
		label: '保养次数'
 | 
			
		||||
	}
 | 
			
		||||
		label: '保养次数',
 | 
			
		||||
	},
 | 
			
		||||
];
 | 
			
		||||
 | 
			
		||||
export default {
 | 
			
		||||
	mixins: [basicPage],
 | 
			
		||||
	data() {
 | 
			
		||||
		const today = new Date();
 | 
			
		||||
 | 
			
		||||
		const todayStart = new Date(
 | 
			
		||||
			today.getFullYear(),
 | 
			
		||||
			today.getMonth(),
 | 
			
		||||
			today.getDate(),
 | 
			
		||||
			0,
 | 
			
		||||
			0,
 | 
			
		||||
			0
 | 
			
		||||
		);
 | 
			
		||||
		const todayEnd = new Date(
 | 
			
		||||
			today.getFullYear(),
 | 
			
		||||
			today.getMonth(),
 | 
			
		||||
			today.getDate(),
 | 
			
		||||
			23,
 | 
			
		||||
			59,
 | 
			
		||||
			59
 | 
			
		||||
		);
 | 
			
		||||
 | 
			
		||||
		return {
 | 
			
		||||
			urlOptions: {
 | 
			
		||||
				getDataListURL: getEqAnalysis,
 | 
			
		||||
				exportURL: exportEqAnalysisExcel,
 | 
			
		||||
			},
 | 
			
		||||
			tableProps,
 | 
			
		||||
			tableBtn: [].filter((v)=>v),
 | 
			
		||||
			tableBtn: [].filter((v) => v),
 | 
			
		||||
			tableData: [],
 | 
			
		||||
			listQuery: {
 | 
			
		||||
				pageSize: 10,
 | 
			
		||||
				pageNo: 1,
 | 
			
		||||
				total: 1,
 | 
			
		||||
				recordTime: [
 | 
			
		||||
					moment(todayStart).format('YYYY-MM-DD HH:mm:ss'),
 | 
			
		||||
					moment(todayEnd).format('YYYY-MM-DD HH:mm:ss'),
 | 
			
		||||
				],
 | 
			
		||||
			},
 | 
			
		||||
			formConfig: [
 | 
			
		||||
				{
 | 
			
		||||
					type: 'input',
 | 
			
		||||
@@ -101,7 +138,10 @@ export default {
 | 
			
		||||
					endPlaceholder: '结束日期',
 | 
			
		||||
					defaultTime: ['00:00:00', '23:59:59'],
 | 
			
		||||
					param: 'recordTime',
 | 
			
		||||
					defaultSelect: [],
 | 
			
		||||
					defaultSelect: [
 | 
			
		||||
						moment(todayStart).format('YYYY-MM-DD HH:mm:ss'),
 | 
			
		||||
						moment(todayEnd).format('YYYY-MM-DD HH:mm:ss'),
 | 
			
		||||
					],
 | 
			
		||||
				},
 | 
			
		||||
				{
 | 
			
		||||
					type: 'button',
 | 
			
		||||
@@ -113,33 +153,38 @@ export default {
 | 
			
		||||
					type: 'separate',
 | 
			
		||||
				},
 | 
			
		||||
				{
 | 
			
		||||
					type: this.$auth.hasPermi('equipment:analysis-statistics:export') ? 'button' : '',
 | 
			
		||||
					type: this.$auth.hasPermi('equipment:analysis-statistics:export')
 | 
			
		||||
						? 'button'
 | 
			
		||||
						: '',
 | 
			
		||||
					btnName: '导出',
 | 
			
		||||
					name: 'export',
 | 
			
		||||
					color: 'warning',
 | 
			
		||||
					plain: true
 | 
			
		||||
					plain: true,
 | 
			
		||||
				},
 | 
			
		||||
			],
 | 
			
		||||
		};
 | 
			
		||||
	},
 | 
			
		||||
	created() {},
 | 
			
		||||
	mounted() {},
 | 
			
		||||
	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;
 | 
			
		||||
      });
 | 
			
		||||
    },
 | 
			
		||||
		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;
 | 
			
		||||
			});
 | 
			
		||||
		},
 | 
			
		||||
		buttonClick(val) {
 | 
			
		||||
			switch (val.btnName) {
 | 
			
		||||
				case 'search':
 | 
			
		||||
					this.listQuery.pageNo = 1;
 | 
			
		||||
					this.listQuery.pageSize = 10;
 | 
			
		||||
					this.listQuery.equipmentName = val.name ? val.name : undefined;
 | 
			
		||||
					this.listQuery.recordTime = val.recordTime ? val.recordTime : undefined;
 | 
			
		||||
					this.listQuery.recordTime = val.recordTime
 | 
			
		||||
						? val.recordTime
 | 
			
		||||
						: undefined;
 | 
			
		||||
					this.getDataList();
 | 
			
		||||
					break;
 | 
			
		||||
				case 'reset':
 | 
			
		||||
@@ -158,20 +203,24 @@ export default {
 | 
			
		||||
					console.log(val);
 | 
			
		||||
			}
 | 
			
		||||
		},
 | 
			
		||||
		 /** 导出按钮操作 */
 | 
			
		||||
    handleExport() {
 | 
			
		||||
      // 处理查询参数
 | 
			
		||||
      let params = { ...this.listQuery };
 | 
			
		||||
      params.pageNo = undefined;
 | 
			
		||||
      params.pageSize = undefined;
 | 
			
		||||
      this.$modal.confirm('是否确认导出所有数据项?').then(() => {
 | 
			
		||||
        this.exportLoading = true;
 | 
			
		||||
        return this.urlOptions.exportURL(params);
 | 
			
		||||
      }).then(response => {
 | 
			
		||||
        this.$download.excel(response, '设备统计分析.xls');
 | 
			
		||||
        this.exportLoading = false;
 | 
			
		||||
      }).catch(() => { });
 | 
			
		||||
    }
 | 
			
		||||
		/** 导出按钮操作 */
 | 
			
		||||
		handleExport() {
 | 
			
		||||
			// 处理查询参数
 | 
			
		||||
			let params = { ...this.listQuery };
 | 
			
		||||
			params.pageNo = undefined;
 | 
			
		||||
			params.pageSize = undefined;
 | 
			
		||||
			this.$modal
 | 
			
		||||
				.confirm('是否确认导出所有数据项?')
 | 
			
		||||
				.then(() => {
 | 
			
		||||
					this.exportLoading = true;
 | 
			
		||||
					return this.urlOptions.exportURL(params);
 | 
			
		||||
				})
 | 
			
		||||
				.then((response) => {
 | 
			
		||||
					this.$download.excel(response, '设备统计分析.xls');
 | 
			
		||||
					this.exportLoading = false;
 | 
			
		||||
				})
 | 
			
		||||
				.catch(() => {});
 | 
			
		||||
		},
 | 
			
		||||
	},
 | 
			
		||||
};
 | 
			
		||||
</script>
 | 
			
		||||
 
 | 
			
		||||
@@ -237,6 +237,7 @@ export default {
 | 
			
		||||
					label: '工厂',
 | 
			
		||||
					placeholder: '请选择工厂',
 | 
			
		||||
					param: 'factoryId',
 | 
			
		||||
					filterable: true,
 | 
			
		||||
					selectOptions: [],
 | 
			
		||||
				},
 | 
			
		||||
				{
 | 
			
		||||
@@ -244,6 +245,7 @@ export default {
 | 
			
		||||
					label: '产线',
 | 
			
		||||
					placeholder: '请选择产线',
 | 
			
		||||
					param: 'lineId',
 | 
			
		||||
					filterable: true,
 | 
			
		||||
					selectOptions: [],
 | 
			
		||||
				},
 | 
			
		||||
				// 选项切换
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										281
									
								
								src/views/equipment/base/alarm/Record/AddOrUpdate.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										281
									
								
								src/views/equipment/base/alarm/Record/AddOrUpdate.vue
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,281 @@
 | 
			
		||||
<!--
 | 
			
		||||
 * @Author: zwq
 | 
			
		||||
 * @Date: 2021-11-18 14:16:25
 | 
			
		||||
 * @LastEditors: DY
 | 
			
		||||
 * @LastEditTime: 2023-11-11 20:33:12
 | 
			
		||||
 * @Description:
 | 
			
		||||
-->
 | 
			
		||||
<template>
 | 
			
		||||
	<div class="alarm-handle">
 | 
			
		||||
		<DialogForm
 | 
			
		||||
			ref="orderForm"
 | 
			
		||||
			key="orderForm"
 | 
			
		||||
			v-model="orderForm"
 | 
			
		||||
			:disabled="readOnly"
 | 
			
		||||
			:has-files="false"
 | 
			
		||||
			label-position="top"
 | 
			
		||||
			:rows="orderFormRows" />
 | 
			
		||||
 | 
			
		||||
		<small-title style="margin: 16px 0" :no-padding="true" size="sm">
 | 
			
		||||
			处理方式
 | 
			
		||||
		</small-title>
 | 
			
		||||
 | 
			
		||||
		<DialogForm
 | 
			
		||||
			key="handleMethodForm"
 | 
			
		||||
			ref="handleMethodForm"
 | 
			
		||||
			v-model="handleMethodForm"
 | 
			
		||||
			:disabled="readOnly"
 | 
			
		||||
			:has-files="true"
 | 
			
		||||
			label-position="top"
 | 
			
		||||
			:rows="handleMethodFormRows" />
 | 
			
		||||
	</div>
 | 
			
		||||
</template>
 | 
			
		||||
 | 
			
		||||
<script>
 | 
			
		||||
import SmallTitle from './SmallTitle';
 | 
			
		||||
import { getworkerAll } from '@/api/base/materialUseLog';
 | 
			
		||||
import Editor from '@/components/Editor';
 | 
			
		||||
import DialogForm from '@/components/DialogForm';
 | 
			
		||||
 | 
			
		||||
export default {
 | 
			
		||||
	name: 'AlarmHandle',
 | 
			
		||||
	props: ['readOnly', 'logId'],
 | 
			
		||||
	components: { SmallTitle, DialogForm, Editor },
 | 
			
		||||
	data() {
 | 
			
		||||
		return {
 | 
			
		||||
			orderForm: {
 | 
			
		||||
				id: null,
 | 
			
		||||
				equipment: null,
 | 
			
		||||
				createTime: null,
 | 
			
		||||
				alarmContent: null,
 | 
			
		||||
				alarmValue: null,
 | 
			
		||||
				// 缺少报警编号字段, 用 alarmValue 代替
 | 
			
		||||
			},
 | 
			
		||||
			orderFormRows: [
 | 
			
		||||
				[
 | 
			
		||||
					{
 | 
			
		||||
						input: true,
 | 
			
		||||
						label: '设备编码',
 | 
			
		||||
						prop: 'equipment',
 | 
			
		||||
					},
 | 
			
		||||
					{
 | 
			
		||||
						datetime: true,
 | 
			
		||||
						label: '报警时间',
 | 
			
		||||
						prop: 'createTime',
 | 
			
		||||
					},
 | 
			
		||||
					{
 | 
			
		||||
						input: true,
 | 
			
		||||
						label: '报警编号',
 | 
			
		||||
						prop: 'alarmValue',
 | 
			
		||||
					},
 | 
			
		||||
					{
 | 
			
		||||
						input: true,
 | 
			
		||||
						label: '报警内容',
 | 
			
		||||
						prop: 'alarmContent',
 | 
			
		||||
					},
 | 
			
		||||
				],
 | 
			
		||||
			],
 | 
			
		||||
			handleMethodFormRows: [
 | 
			
		||||
				[
 | 
			
		||||
					{
 | 
			
		||||
						select: true,
 | 
			
		||||
						label: '处理人',
 | 
			
		||||
						prop: 'hander',
 | 
			
		||||
						url: '/base/core-worker/listAll',
 | 
			
		||||
						rules: [
 | 
			
		||||
							{ required: true, message: '类型名称不能为空', trigger: 'blur' },
 | 
			
		||||
						],
 | 
			
		||||
					},
 | 
			
		||||
					{
 | 
			
		||||
						upload: true,
 | 
			
		||||
						label: '上传资料',
 | 
			
		||||
						prop: 'files',
 | 
			
		||||
					},
 | 
			
		||||
				],
 | 
			
		||||
				[
 | 
			
		||||
					{
 | 
			
		||||
						key: 'handerMode',
 | 
			
		||||
						subcomponent: Editor,
 | 
			
		||||
						label: '处理方式',
 | 
			
		||||
						prop: 'handerMode',
 | 
			
		||||
						bind: {
 | 
			
		||||
							'min-height': 200,
 | 
			
		||||
						},
 | 
			
		||||
					},
 | 
			
		||||
				],
 | 
			
		||||
			],
 | 
			
		||||
			handleMethodForm: {
 | 
			
		||||
				id: null,
 | 
			
		||||
				logId: null,
 | 
			
		||||
				hander: null,
 | 
			
		||||
				handerMode: null,
 | 
			
		||||
				remark: null,
 | 
			
		||||
				files: [
 | 
			
		||||
					// {
 | 
			
		||||
					// 	fileName: '',
 | 
			
		||||
					// 	fileType: '',
 | 
			
		||||
					// 	fileUrl: ''
 | 
			
		||||
					// }
 | 
			
		||||
				],
 | 
			
		||||
			},
 | 
			
		||||
			workersList: [],
 | 
			
		||||
		};
 | 
			
		||||
	},
 | 
			
		||||
	mounted() {
 | 
			
		||||
		this.getDict().then(() => {
 | 
			
		||||
			this.init();
 | 
			
		||||
		});
 | 
			
		||||
	},
 | 
			
		||||
	methods: {
 | 
			
		||||
		/**
 | 
			
		||||
		 * 获取员工数据
 | 
			
		||||
		 */
 | 
			
		||||
		async getDict() {
 | 
			
		||||
			const workerRes = await getworkerAll();
 | 
			
		||||
			this.workersList = workerRes.data;
 | 
			
		||||
		},
 | 
			
		||||
 | 
			
		||||
		/**
 | 
			
		||||
		 * 初始化
 | 
			
		||||
		 */
 | 
			
		||||
		async init() {
 | 
			
		||||
			this.initTop();
 | 
			
		||||
			this.initDown();
 | 
			
		||||
		},
 | 
			
		||||
 | 
			
		||||
		/**
 | 
			
		||||
		 * 初始化上部表单
 | 
			
		||||
		 */
 | 
			
		||||
		async initTop() {
 | 
			
		||||
			if (!this.logId) {
 | 
			
		||||
				this.$msgError('缺少报警日志id');
 | 
			
		||||
				this.$emit('close');
 | 
			
		||||
			}
 | 
			
		||||
			const url = '/base/equipment-alarm-log/get';
 | 
			
		||||
			const { data, code } = await this.$axios({
 | 
			
		||||
				url: url,
 | 
			
		||||
				method: 'get',
 | 
			
		||||
				params: {
 | 
			
		||||
					id: this.logId,
 | 
			
		||||
				},
 | 
			
		||||
			});
 | 
			
		||||
			if (code == 0) {
 | 
			
		||||
				this.orderForm = data;
 | 
			
		||||
			}
 | 
			
		||||
		},
 | 
			
		||||
 | 
			
		||||
		/**
 | 
			
		||||
		 * 初始化下部表单
 | 
			
		||||
		 */
 | 
			
		||||
		async initDown() {
 | 
			
		||||
			if (!this.logId) {
 | 
			
		||||
				this.$msgError('缺少报警日志id');
 | 
			
		||||
				this.$emit('close');
 | 
			
		||||
			}
 | 
			
		||||
			const url = '/base/equipment-alarm-hand/get';
 | 
			
		||||
			const { data, code } = await this.$axios({
 | 
			
		||||
				url: url,
 | 
			
		||||
				method: 'get',
 | 
			
		||||
				params: {
 | 
			
		||||
					id: this.logId,
 | 
			
		||||
				},
 | 
			
		||||
			});
 | 
			
		||||
			if (code == 0) {
 | 
			
		||||
				this.handleMethodForm = data;
 | 
			
		||||
			}
 | 
			
		||||
		},
 | 
			
		||||
 | 
			
		||||
		/**
 | 
			
		||||
		 * 更新表单
 | 
			
		||||
		 */
 | 
			
		||||
		async submit() {
 | 
			
		||||
			const result = await Promise.all([
 | 
			
		||||
				await this.updateTop(),
 | 
			
		||||
				await this.updateHandleMethod(),
 | 
			
		||||
			]);
 | 
			
		||||
			if (result[0] == true && result[1] == true) {
 | 
			
		||||
				this.$modal.msgSuccess('更新成功');
 | 
			
		||||
				this.$emit('refreshDataList');
 | 
			
		||||
			} else {
 | 
			
		||||
				this.$modal.msgError('更新失败');
 | 
			
		||||
			}
 | 
			
		||||
		},
 | 
			
		||||
 | 
			
		||||
		/**
 | 
			
		||||
		 * 更新下部表单
 | 
			
		||||
		 */
 | 
			
		||||
		async updateHandleMethod() {
 | 
			
		||||
			const url = '/base/equipment-alarm-hand';
 | 
			
		||||
			const valid = await this.$refs.orderForm.validate();
 | 
			
		||||
			if (!valid) {
 | 
			
		||||
				return false;
 | 
			
		||||
			}
 | 
			
		||||
			const { code, data } = await this.$axios({
 | 
			
		||||
				url: url + (this.handleMethodForm.id ? '/update' : '/create'),
 | 
			
		||||
				method: this.handleMethodForm.id ? 'put' : 'post',
 | 
			
		||||
				data: { ...this.handleMethodForm, logId: this.logId },
 | 
			
		||||
			});
 | 
			
		||||
			if (code == 0) {
 | 
			
		||||
				return true;
 | 
			
		||||
			}
 | 
			
		||||
			return false;
 | 
			
		||||
		},
 | 
			
		||||
 | 
			
		||||
		/**
 | 
			
		||||
		 * 更新上部分表单
 | 
			
		||||
		 */
 | 
			
		||||
		async updateTop() {
 | 
			
		||||
			const url = '/base/equipment-alarm-log';
 | 
			
		||||
			const valid = await this.$refs.handleMethodForm.validate();
 | 
			
		||||
			if (!valid) {
 | 
			
		||||
				return false;
 | 
			
		||||
			}
 | 
			
		||||
			const { code, data } = await this.$axios({
 | 
			
		||||
				url: url + '/update',
 | 
			
		||||
				method: 'put',
 | 
			
		||||
				data: this.orderForm,
 | 
			
		||||
			});
 | 
			
		||||
			if (code == 0) {
 | 
			
		||||
				return true;
 | 
			
		||||
			}
 | 
			
		||||
			return false;
 | 
			
		||||
		},
 | 
			
		||||
 | 
			
		||||
		// 表单提交
 | 
			
		||||
		dataFormSubmit() {
 | 
			
		||||
			this.$refs['dataForm'].validate((valid) => {
 | 
			
		||||
				if (!valid) {
 | 
			
		||||
					return false;
 | 
			
		||||
				}
 | 
			
		||||
 | 
			
		||||
				if (this.file) {
 | 
			
		||||
					const temp = this.file.split(','); // 获取文件个数
 | 
			
		||||
					let arry = [];
 | 
			
		||||
					temp.forEach((item) => {
 | 
			
		||||
						arry.push({
 | 
			
		||||
							fileType: 2,
 | 
			
		||||
							fileUrl: item,
 | 
			
		||||
						});
 | 
			
		||||
					});
 | 
			
		||||
					this.dataForm.files = arry;
 | 
			
		||||
				}
 | 
			
		||||
				this.urlOptions.createURL(this.dataForm).then((response) => {
 | 
			
		||||
					this.$modal.msgSuccess('新增成功');
 | 
			
		||||
					this.visible = false;
 | 
			
		||||
					this.$emit('refreshDataList');
 | 
			
		||||
				});
 | 
			
		||||
			});
 | 
			
		||||
		},
 | 
			
		||||
	},
 | 
			
		||||
};
 | 
			
		||||
</script>
 | 
			
		||||
 | 
			
		||||
<style scoped>
 | 
			
		||||
.alarm-handle {
 | 
			
		||||
	padding: 0;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
.alarm-handle__method >>> .el-select {
 | 
			
		||||
	width: 100% !important;
 | 
			
		||||
}
 | 
			
		||||
</style>
 | 
			
		||||
@@ -40,7 +40,7 @@ $pxls: (xl, 28px) (lg, 24px) (de, 20px) (md, 18px) (sm, 16px);
 | 
			
		||||
$mgr: 8px;
 | 
			
		||||
@each $size, $height in $pxls {
 | 
			
		||||
	.#{$size}-title {
 | 
			
		||||
		font-size: 18px;
 | 
			
		||||
		font-size: $height;
 | 
			
		||||
		line-height: $height;
 | 
			
		||||
		color: #000;
 | 
			
		||||
		font-weight: 500;
 | 
			
		||||
@@ -53,7 +53,7 @@ $mgr: 8px;
 | 
			
		||||
			width: 4px;
 | 
			
		||||
			height: $height + 2px;
 | 
			
		||||
			border-radius: 1px;
 | 
			
		||||
			margin-right: $mgr;
 | 
			
		||||
			margin-right: 4px;
 | 
			
		||||
			background-color: #0b58ff;
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
 
 | 
			
		||||
@@ -1,195 +0,0 @@
 | 
			
		||||
<!--
 | 
			
		||||
 * @Author: zwq
 | 
			
		||||
 * @Date: 2021-11-18 14:16:25
 | 
			
		||||
 * @LastEditors: DY
 | 
			
		||||
 * @LastEditTime: 2023-11-11 20:33:12
 | 
			
		||||
 * @Description:
 | 
			
		||||
-->
 | 
			
		||||
<template>
 | 
			
		||||
	<div>
 | 
			
		||||
		<small-title
 | 
			
		||||
			style="margin: 16px 0; padding-left: 8px"
 | 
			
		||||
			:no-padding="true">
 | 
			
		||||
			系统自带
 | 
			
		||||
		</small-title>
 | 
			
		||||
		<el-form
 | 
			
		||||
			:model="dataForm1"
 | 
			
		||||
			ref="dataForm1"
 | 
			
		||||
			label-width="80px">
 | 
			
		||||
			<el-row :gutter="20">
 | 
			
		||||
				<el-col :span="12">
 | 
			
		||||
					<el-form-item label="设备编码" prop="equipment">
 | 
			
		||||
						<el-input
 | 
			
		||||
							v-model="dataForm1.equipment"
 | 
			
		||||
							disabled
 | 
			
		||||
							placeholder="请输入设备编码" />
 | 
			
		||||
					</el-form-item>
 | 
			
		||||
				</el-col>
 | 
			
		||||
				<el-col :span="12">
 | 
			
		||||
					<el-form-item label="报警时间" prop="createTime">
 | 
			
		||||
						<el-input
 | 
			
		||||
							v-model="dataForm1.createTime"
 | 
			
		||||
							disabled
 | 
			
		||||
							placeholder="请输入报警时间" />
 | 
			
		||||
					</el-form-item>
 | 
			
		||||
				</el-col>
 | 
			
		||||
			</el-row>
 | 
			
		||||
			<el-row :gutter="20">
 | 
			
		||||
				<el-col :span="12">
 | 
			
		||||
					<el-form-item label="报警编号" prop="code">
 | 
			
		||||
						<!-- 接口缺参数 -->
 | 
			
		||||
						<el-input
 | 
			
		||||
							v-model="dataForm1.code"
 | 
			
		||||
							disabled
 | 
			
		||||
							placeholder="请输入报警编号" />
 | 
			
		||||
					</el-form-item>
 | 
			
		||||
				</el-col>
 | 
			
		||||
				<el-col :span="12">
 | 
			
		||||
					<el-form-item label="报警内容" prop="alarmContent">
 | 
			
		||||
						<el-input
 | 
			
		||||
							v-model="dataForm1.alarmContent"
 | 
			
		||||
							disabled
 | 
			
		||||
							placeholder="请输入报警内容" />
 | 
			
		||||
					</el-form-item>
 | 
			
		||||
				</el-col>
 | 
			
		||||
			</el-row>
 | 
			
		||||
		</el-form>
 | 
			
		||||
		<small-title
 | 
			
		||||
			style="margin: 16px 0; padding-left: 8px"
 | 
			
		||||
			:no-padding="true">
 | 
			
		||||
			处理方式
 | 
			
		||||
		</small-title>
 | 
			
		||||
		<el-form
 | 
			
		||||
			:model="dataForm"
 | 
			
		||||
			:rules="dataRule"
 | 
			
		||||
			ref="dataForm"
 | 
			
		||||
			label-width="80px">
 | 
			
		||||
			<el-form-item label="处理人" prop="hander">
 | 
			
		||||
				<el-select
 | 
			
		||||
					v-model="dataForm.hander"
 | 
			
		||||
					:disabled="isdetail"
 | 
			
		||||
					placeholder="请选择处理人"
 | 
			
		||||
					>
 | 
			
		||||
					<el-option
 | 
			
		||||
						v-for="dict in workersList"
 | 
			
		||||
						:key="dict.id"
 | 
			
		||||
						:label="dict.name"
 | 
			
		||||
						:value="dict.name" />
 | 
			
		||||
				</el-select>
 | 
			
		||||
			</el-form-item>
 | 
			
		||||
			<el-form-item label="处理方式" prop="handerMode">
 | 
			
		||||
				<editor v-model="dataForm.handerMode" :read-only="isdetail" :min-height="200"/>
 | 
			
		||||
			</el-form-item>
 | 
			
		||||
			<el-form-item label="附件" prop="file">
 | 
			
		||||
				<!-- <el-input
 | 
			
		||||
					v-model="dataForm.file"
 | 
			
		||||
					type="textarea"
 | 
			
		||||
					min-size="3"
 | 
			
		||||
					placeholder="请输入处理方式" /> -->
 | 
			
		||||
					<FileUpload v-model="file" :disabled="isdetail" />
 | 
			
		||||
			</el-form-item>
 | 
			
		||||
		</el-form>
 | 
			
		||||
	</div>
 | 
			
		||||
</template>
 | 
			
		||||
 | 
			
		||||
<script>
 | 
			
		||||
import basicAdd from '../../../../core/mixins/basic-add';
 | 
			
		||||
import SmallTitle from './SmallTitle';
 | 
			
		||||
import { getworkerAll } from "@/api/base/materialUseLog";
 | 
			
		||||
import { createAlarmHand, getAlarmLog } from '@/api/equipment/base/alarm/records';
 | 
			
		||||
import FileUpload from "@/components/FileUpload";
 | 
			
		||||
import Editor from "@/components/Editor";
 | 
			
		||||
 | 
			
		||||
export default {
 | 
			
		||||
	components: { SmallTitle, FileUpload, Editor },
 | 
			
		||||
	mixins: [basicAdd],
 | 
			
		||||
	data() {
 | 
			
		||||
		return {
 | 
			
		||||
			urlOptions: {
 | 
			
		||||
				createURL: createAlarmHand,
 | 
			
		||||
				infoURL: getAlarmLog,
 | 
			
		||||
			},
 | 
			
		||||
			dataForm1: {
 | 
			
		||||
        id: undefined,
 | 
			
		||||
        equipment: undefined,
 | 
			
		||||
        createTime: undefined,
 | 
			
		||||
        alarmContent: undefined,
 | 
			
		||||
				code: undefined
 | 
			
		||||
			},
 | 
			
		||||
			file: '',
 | 
			
		||||
			dataForm: {
 | 
			
		||||
        id: undefined,
 | 
			
		||||
        hander: undefined,
 | 
			
		||||
        handerMode: undefined
 | 
			
		||||
			},
 | 
			
		||||
			isdetail: false,
 | 
			
		||||
			workersList: [],
 | 
			
		||||
			dataRule: {
 | 
			
		||||
				hander: [{ required: true, message: "处理人不能为空", trigger: "change" }],
 | 
			
		||||
        handerMode: [{ required: true, message: "处理方式不能为空", trigger: "blur" }]
 | 
			
		||||
      }
 | 
			
		||||
		};
 | 
			
		||||
	},
 | 
			
		||||
	mounted() {
 | 
			
		||||
		this.getDict()
 | 
			
		||||
		console.log('我看看', this.dataForm)
 | 
			
		||||
	},
 | 
			
		||||
	methods: {
 | 
			
		||||
		async getDict() {
 | 
			
		||||
			// 获得员工
 | 
			
		||||
			const workerRes = await getworkerAll()
 | 
			
		||||
			this.workersList = workerRes.data
 | 
			
		||||
		},
 | 
			
		||||
		// 表单提交
 | 
			
		||||
    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;
 | 
			
		||||
        // }
 | 
			
		||||
        // 添加的提交
 | 
			
		||||
				if (this.file) {
 | 
			
		||||
					const temp = this.file.split(',') // 获取文件个数
 | 
			
		||||
					let arry = []
 | 
			
		||||
					temp.forEach(item => {
 | 
			
		||||
						arry.push({
 | 
			
		||||
							fileType: 2,
 | 
			
		||||
							fileUrl: item
 | 
			
		||||
						})
 | 
			
		||||
					})
 | 
			
		||||
					this.dataForm.files = arry
 | 
			
		||||
				}
 | 
			
		||||
        this.urlOptions.createURL(this.dataForm).then(response => {
 | 
			
		||||
          this.$modal.msgSuccess("新增成功");
 | 
			
		||||
          this.visible = false;
 | 
			
		||||
          this.$emit("refreshDataList");
 | 
			
		||||
        });
 | 
			
		||||
      });
 | 
			
		||||
    },
 | 
			
		||||
		init(id, isdetail) {
 | 
			
		||||
      this.dataForm1.id = id || "";
 | 
			
		||||
			this.isdetail = isdetail || false
 | 
			
		||||
      this.visible = true;
 | 
			
		||||
      this.$nextTick(() => {
 | 
			
		||||
        this.$refs["dataForm1"].resetFields();
 | 
			
		||||
				this.$refs["dataForm"].resetFields();
 | 
			
		||||
        if (this.dataForm1.id) {
 | 
			
		||||
          this.urlOptions.infoURL(id).then(response => {
 | 
			
		||||
						if (response.data) {
 | 
			
		||||
							this.dataForm1 = response.data;
 | 
			
		||||
						}
 | 
			
		||||
          });
 | 
			
		||||
        }
 | 
			
		||||
      });
 | 
			
		||||
    },
 | 
			
		||||
	},
 | 
			
		||||
};
 | 
			
		||||
</script>
 | 
			
		||||
@@ -45,20 +45,23 @@
 | 
			
		||||
				:disabled="mode == 'detail'"
 | 
			
		||||
				:has-files="false"
 | 
			
		||||
				:rows="rows" /> -->
 | 
			
		||||
			<add-or-update
 | 
			
		||||
			ref="addOrUpdate"
 | 
			
		||||
			@refreshDataList="successSubmit" />
 | 
			
		||||
			<AddOrUpdate
 | 
			
		||||
				v-if="open"
 | 
			
		||||
				ref="addOrUpdate"
 | 
			
		||||
				:read-only="readOnly"
 | 
			
		||||
				:log-id="chosedLogId"
 | 
			
		||||
				@close="cancel"
 | 
			
		||||
				@refreshDataList="successSubmit" />
 | 
			
		||||
		</base-dialog>
 | 
			
		||||
	</div>
 | 
			
		||||
</template>
 | 
			
		||||
 | 
			
		||||
<script>
 | 
			
		||||
import moment from 'moment';
 | 
			
		||||
import basicPageMixin from '@/mixins/lb/basicPageMixin';
 | 
			
		||||
import AddOrUpdate from './add-or-updata.vue'
 | 
			
		||||
import { publicFormatter } from '@/utils/dict';
 | 
			
		||||
// const timeFilter = (val) => moment(val).format('yyyy-MM-DD HH:mm:ss');
 | 
			
		||||
 | 
			
		||||
import AddOrUpdate from './AddOrUpdate.vue';
 | 
			
		||||
import moment from 'moment';
 | 
			
		||||
const timeFilter = (val) => moment(val).format('yyyy-MM-DD HH:mm:ss');
 | 
			
		||||
 | 
			
		||||
const btn = {
 | 
			
		||||
	name: 'tableBtn',
 | 
			
		||||
@@ -68,7 +71,10 @@ const btn = {
 | 
			
		||||
	},
 | 
			
		||||
	methods: {
 | 
			
		||||
		handleClick() {
 | 
			
		||||
			this.$emit('emitData', { action: this.injectData.name, value: this.injectData });
 | 
			
		||||
			this.$emit('emitData', {
 | 
			
		||||
				action: this.injectData.name,
 | 
			
		||||
				value: this.injectData,
 | 
			
		||||
			});
 | 
			
		||||
		},
 | 
			
		||||
	},
 | 
			
		||||
	render: function (h) {
 | 
			
		||||
@@ -80,14 +86,14 @@ const btn = {
 | 
			
		||||
	},
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
export default {
 | 
			
		||||
	name: 'Record',
 | 
			
		||||
	components: { AddOrUpdate },
 | 
			
		||||
	mixins: [basicPageMixin],
 | 
			
		||||
	data() {
 | 
			
		||||
		return {
 | 
			
		||||
			readOnly: false,
 | 
			
		||||
			chosedLogId: false,
 | 
			
		||||
			searchBarKeys: ['equipmentName', 'recordTime'],
 | 
			
		||||
			tableBtn: [
 | 
			
		||||
				// this.$auth.hasPermi('equipment:spare-parts-config:update')
 | 
			
		||||
@@ -113,12 +119,16 @@ export default {
 | 
			
		||||
				{ prop: 'productionLine', label: '产线' },
 | 
			
		||||
				{ prop: 'workshopSection', label: '工段' },
 | 
			
		||||
				{ prop: 'equipment', label: '设备名称' },
 | 
			
		||||
				{ prop: 'alarmGrade', label: '报警级别', filter: publicFormatter(this.DICT_TYPE.EQU_ALARM_LEVEL) },
 | 
			
		||||
				{ prop: 'responsible', label: '报警时间' }, // 接口缺
 | 
			
		||||
				{ prop: 'responsible1', label: '设备报警码' }, // 接口缺
 | 
			
		||||
				{
 | 
			
		||||
					prop: 'alarmGrade',
 | 
			
		||||
					label: '报警级别',
 | 
			
		||||
					filter: publicFormatter(this.DICT_TYPE.EQU_ALARM_LEVEL),
 | 
			
		||||
				},
 | 
			
		||||
				{ prop: 'createTime', label: '报警时间', filter: timeFilter }, // 接口缺
 | 
			
		||||
				{ prop: 'alarmCode', label: '设备报警码' }, // 接口缺
 | 
			
		||||
				{ prop: 'alarmContent', label: '报警内容' },
 | 
			
		||||
				{ prop: 'opt1', label: '处理记录', name: '查看', subcomponent: btn },
 | 
			
		||||
				{ prop: 'opt2', label: '处理', name: '报警处理', subcomponent: btn },  // TODO: 是否换成按钮, 群里问
 | 
			
		||||
				{ prop: 'opt2', label: '处理', name: '报警处理', subcomponent: btn }, // TODO: 是否换成按钮, 群里问
 | 
			
		||||
				// { prop: 'remark', label: '备注' },
 | 
			
		||||
			],
 | 
			
		||||
			searchBarFormConfig: [
 | 
			
		||||
@@ -135,8 +145,8 @@ export default {
 | 
			
		||||
					dateType: 'daterange', // datetimerange
 | 
			
		||||
					// format: 'yyyy-MM-dd HH:mm:ss',
 | 
			
		||||
					format: 'yyyy-MM-dd',
 | 
			
		||||
					// valueFormat: 'timestamp',
 | 
			
		||||
					valueFormat: 'yyyy-MM-dd HH:mm:ss',
 | 
			
		||||
					valueFormat: 'timestamp',
 | 
			
		||||
					// valueFormat: 'yyyy-MM-dd HH:mm:ss',
 | 
			
		||||
					rangeSeparator: '-',
 | 
			
		||||
					startPlaceholder: '开始日期',
 | 
			
		||||
					endPlaceholder: '结束日期',
 | 
			
		||||
@@ -196,9 +206,10 @@ export default {
 | 
			
		||||
				pageSize: 10,
 | 
			
		||||
				lineId: null,
 | 
			
		||||
				equipmentId: null,
 | 
			
		||||
				recordTime: []
 | 
			
		||||
			},
 | 
			
		||||
			basePath: '/base/equipment-alarm-log',
 | 
			
		||||
			list: []
 | 
			
		||||
			list: [],
 | 
			
		||||
		};
 | 
			
		||||
	},
 | 
			
		||||
	created() {
 | 
			
		||||
@@ -206,21 +217,20 @@ export default {
 | 
			
		||||
	},
 | 
			
		||||
	methods: {
 | 
			
		||||
		handleEmitFun(val) {
 | 
			
		||||
			console.log('你好', val)
 | 
			
		||||
			if (val.action === '报警处理') {
 | 
			
		||||
				// this.chosedLogId = val.value.alarmId;
 | 
			
		||||
				this.chosedLogId = val.value.id;
 | 
			
		||||
				// 报警处理
 | 
			
		||||
				this.open = true
 | 
			
		||||
				this.title = '报警处理'
 | 
			
		||||
				this.$nextTick(() => {
 | 
			
		||||
					this.$refs.addOrUpdate.init(val.value.id);
 | 
			
		||||
				});
 | 
			
		||||
				this.open = true;
 | 
			
		||||
				this.title = '报警处理';
 | 
			
		||||
				this.readOnly = false;
 | 
			
		||||
			} else {
 | 
			
		||||
				// this.chosedLogId = val.value.alarmId;
 | 
			
		||||
				this.chosedLogId = val.value.id;
 | 
			
		||||
				// 查看
 | 
			
		||||
				this.open = true
 | 
			
		||||
				this.title = '查看'
 | 
			
		||||
				this.$nextTick(() => {
 | 
			
		||||
					this.$refs.addOrUpdate.init(val.value.id, true);
 | 
			
		||||
				});
 | 
			
		||||
				this.open = true;
 | 
			
		||||
				this.title = '查看';
 | 
			
		||||
				this.readOnly = true;
 | 
			
		||||
			}
 | 
			
		||||
		},
 | 
			
		||||
		/** 查询列表 */
 | 
			
		||||
@@ -234,9 +244,9 @@ export default {
 | 
			
		||||
			});
 | 
			
		||||
		},
 | 
			
		||||
		successSubmit() {
 | 
			
		||||
      this.cancel()
 | 
			
		||||
      this.getList()
 | 
			
		||||
    },
 | 
			
		||||
			this.cancel();
 | 
			
		||||
			this.getList();
 | 
			
		||||
		},
 | 
			
		||||
		/** 取消按钮 */
 | 
			
		||||
		cancel() {
 | 
			
		||||
			this.open = false;
 | 
			
		||||
@@ -282,7 +292,7 @@ export default {
 | 
			
		||||
		},
 | 
			
		||||
		/** 提交按钮 */
 | 
			
		||||
		submitForm() {
 | 
			
		||||
			this.$refs.addOrUpdate.dataFormSubmit()
 | 
			
		||||
			this.$refs.addOrUpdate.submit();
 | 
			
		||||
			// this.$refs['form'].validate((valid) => {
 | 
			
		||||
			// 	if (!valid) {
 | 
			
		||||
			// 		return;
 | 
			
		||||
@@ -310,7 +320,7 @@ export default {
 | 
			
		||||
			this.$modal
 | 
			
		||||
				.confirm('是否确认删除记录"' + row.name + '"?')
 | 
			
		||||
				.then(function () {
 | 
			
		||||
					return this.delete({ id });
 | 
			
		||||
					return this.del({ id });
 | 
			
		||||
				})
 | 
			
		||||
				.then(() => {
 | 
			
		||||
					this.getList();
 | 
			
		||||
 
 | 
			
		||||
@@ -12,7 +12,7 @@
 | 
			
		||||
		:wrapper-closable="false"
 | 
			
		||||
		class="drawer"
 | 
			
		||||
		custom-class="mes-drawer"
 | 
			
		||||
		size="60%"
 | 
			
		||||
		:size="size || '50%'"
 | 
			
		||||
		@closed="$emit('destroy')">
 | 
			
		||||
		<SmallTitle slot="title">
 | 
			
		||||
			{{
 | 
			
		||||
@@ -42,7 +42,8 @@
 | 
			
		||||
							:dataForm="form"
 | 
			
		||||
							:rows="formRows" /> -->
 | 
			
		||||
 | 
			
		||||
						<el-row style="margin-bottom: 24px">
 | 
			
		||||
						<!-- if  -->
 | 
			
		||||
						<el-row v-if="mode.includes('detail')" style="margin-bottom: 24px">
 | 
			
		||||
							<el-col :span="8">
 | 
			
		||||
								<div
 | 
			
		||||
									class="title"
 | 
			
		||||
@@ -62,13 +63,39 @@
 | 
			
		||||
								</div>
 | 
			
		||||
							</el-col>
 | 
			
		||||
						</el-row>
 | 
			
		||||
						<!-- else  -->
 | 
			
		||||
						<el-row v-else style="margin-bottom: 24px" :gutter="20">
 | 
			
		||||
							<el-form ref="form" :model="form">
 | 
			
		||||
								<el-col :span="8">
 | 
			
		||||
									<el-form-item
 | 
			
		||||
										class="title"
 | 
			
		||||
										label="设备分组名称"
 | 
			
		||||
										style="font-size: 16px; margin: 8px 0">
 | 
			
		||||
										<el-input
 | 
			
		||||
											v-model="form.name"
 | 
			
		||||
											placeholder="请输入设备分组名称"></el-input>
 | 
			
		||||
									</el-form-item>
 | 
			
		||||
								</el-col>
 | 
			
		||||
								<el-col :span="8">
 | 
			
		||||
									<el-form-item
 | 
			
		||||
										class="title"
 | 
			
		||||
										label="设备分组编码"
 | 
			
		||||
										style="font-size: 16px; margin: 8px 0">
 | 
			
		||||
										<el-input
 | 
			
		||||
											v-model="form.code"
 | 
			
		||||
											placeholder="请输入设备分组编码"></el-input>
 | 
			
		||||
									</el-form-item>
 | 
			
		||||
								</el-col>
 | 
			
		||||
							</el-form>
 | 
			
		||||
						</el-row>
 | 
			
		||||
					</div>
 | 
			
		||||
 | 
			
		||||
					<div
 | 
			
		||||
						v-if="section.key == 'attrs'"
 | 
			
		||||
						style="position: relative; margin-top: 12px">
 | 
			
		||||
						<!-- v-if="!mode.includes('detail')" -->
 | 
			
		||||
						<div style="position: absolute; top: -40px; right: 0">
 | 
			
		||||
						<div
 | 
			
		||||
							v-if="!mode.includes('detail')"
 | 
			
		||||
							style="position: absolute; top: -40px; right: 0">
 | 
			
		||||
							<el-button @click="handleAddAttr" type="text">
 | 
			
		||||
								<i class="el-icon-plus"></i>
 | 
			
		||||
								添加报警
 | 
			
		||||
@@ -84,7 +111,7 @@
 | 
			
		||||
							<!-- :add-button-show="mode.includes('detail') ? null : '添加属性'"
 | 
			
		||||
							@emitButtonClick="handleAddAttr" -->
 | 
			
		||||
							<method-btn
 | 
			
		||||
								v-if="section.tableBtn"
 | 
			
		||||
								v-if="section.tableBtn && !mode.includes('detail')"
 | 
			
		||||
								slot="handleBtn"
 | 
			
		||||
								label="操作"
 | 
			
		||||
								:method-list="tableBtn"
 | 
			
		||||
@@ -103,11 +130,13 @@
 | 
			
		||||
			</div>
 | 
			
		||||
 | 
			
		||||
			<div class="drawer-body__footer">
 | 
			
		||||
				<el-button style="" @click="handleCancel">取消</el-button>
 | 
			
		||||
				<!-- <el-button v-if="mode == 'detail'" type="primary" @click="toggleEdit">
 | 
			
		||||
					编辑
 | 
			
		||||
				</el-button> -->
 | 
			
		||||
				<!-- <el-button v-else type="primary" @click="handleCancel">确定</el-button> -->
 | 
			
		||||
				<el-button style="" @click="handleCancel">返回</el-button>
 | 
			
		||||
				<el-button
 | 
			
		||||
					type="primary"
 | 
			
		||||
					v-if="!mode.includes('detail')"
 | 
			
		||||
					@click="handleSave">
 | 
			
		||||
					保存
 | 
			
		||||
				</el-button>
 | 
			
		||||
			</div>
 | 
			
		||||
		</div>
 | 
			
		||||
 | 
			
		||||
@@ -163,7 +192,7 @@ const SmallTitle = {
 | 
			
		||||
 | 
			
		||||
export default {
 | 
			
		||||
	components: { SmallTitle, DialogForm, BaseInfoForm },
 | 
			
		||||
	props: ['sections', 'defaultMode', 'dataId'], // dataId 作为一个通用的存放id的字段
 | 
			
		||||
	props: ['sections', 'defaultMode', 'dataId', 'size'], // dataId 作为一个通用的存放id的字段
 | 
			
		||||
	data() {
 | 
			
		||||
		return {
 | 
			
		||||
			mode: '',
 | 
			
		||||
@@ -191,7 +220,9 @@ export default {
 | 
			
		||||
						label: '报警编码', // 自动生成
 | 
			
		||||
						prop: 'code',
 | 
			
		||||
						url: '/base/equipment-group-alarm/getCode',
 | 
			
		||||
						rules: [{ required: true, message: '报警编码不能为空', trigger: 'blur' }],
 | 
			
		||||
						rules: [
 | 
			
		||||
							{ required: true, message: '报警编码不能为空', trigger: 'blur' },
 | 
			
		||||
						],
 | 
			
		||||
					},
 | 
			
		||||
					{
 | 
			
		||||
						select: true,
 | 
			
		||||
@@ -205,13 +236,17 @@ export default {
 | 
			
		||||
						input: true,
 | 
			
		||||
						label: '参数列名', // 在实时数据库的列名
 | 
			
		||||
						prop: 'plcParamName',
 | 
			
		||||
						rules: [{ required: true, message: '参数列名不能为空', trigger: 'blur' }],
 | 
			
		||||
						rules: [
 | 
			
		||||
							{ required: true, message: '参数列名不能为空', trigger: 'blur' },
 | 
			
		||||
						],
 | 
			
		||||
					},
 | 
			
		||||
					{
 | 
			
		||||
						input: true,
 | 
			
		||||
						label: '报警内容',
 | 
			
		||||
						prop: 'alarmContent',
 | 
			
		||||
						rules: [{ required: true, message: '报警内容不能为空', trigger: 'blur' }],
 | 
			
		||||
						rules: [
 | 
			
		||||
							{ required: true, message: '报警内容不能为空', trigger: 'blur' },
 | 
			
		||||
						],
 | 
			
		||||
					},
 | 
			
		||||
				],
 | 
			
		||||
				[
 | 
			
		||||
@@ -223,7 +258,9 @@ export default {
 | 
			
		||||
							{ label: '布尔型', value: 2 },
 | 
			
		||||
							{ label: '字符型', value: 1 },
 | 
			
		||||
						],
 | 
			
		||||
						rules: [{ required: true, message: '报警类型不能为空', trigger: 'blur' }],
 | 
			
		||||
						rules: [
 | 
			
		||||
							{ required: true, message: '报警类型不能为空', trigger: 'blur' },
 | 
			
		||||
						],
 | 
			
		||||
					},
 | 
			
		||||
					{
 | 
			
		||||
						input: true,
 | 
			
		||||
@@ -322,7 +359,7 @@ export default {
 | 
			
		||||
		handleSave() {
 | 
			
		||||
			this.$refs['form'][0].validate(async (valid) => {
 | 
			
		||||
				if (valid) {
 | 
			
		||||
					const isEdit = this.mode == 'edit';
 | 
			
		||||
					const isEdit = !this.mode.includes('detail');
 | 
			
		||||
					await this.$axios({
 | 
			
		||||
						url: this.sections[0][isEdit ? 'urlUpdate' : 'urlCreate'],
 | 
			
		||||
						method: isEdit ? 'put' : 'post',
 | 
			
		||||
@@ -403,32 +440,32 @@ export default {
 | 
			
		||||
		},
 | 
			
		||||
 | 
			
		||||
		// 提交属性表
 | 
			
		||||
		async submitAttrForm() {
 | 
			
		||||
			this.$refs['attrForm'].validate((valid) => {
 | 
			
		||||
		submitAttrForm() {
 | 
			
		||||
			this.$refs['attrForm'].validate(async (valid) => {
 | 
			
		||||
				if (!valid) {
 | 
			
		||||
					return;
 | 
			
		||||
				}
 | 
			
		||||
			});
 | 
			
		||||
			const isEdit = this.attrForm.id != null;
 | 
			
		||||
			this.attrFormSubmitting = true;
 | 
			
		||||
			const res = await this.$axios({
 | 
			
		||||
				url: isEdit ? this.sections[1].urlUpdate : this.sections[1].urlCreate,
 | 
			
		||||
				method: isEdit ? 'put' : 'post',
 | 
			
		||||
				data: this.attrForm,
 | 
			
		||||
			});
 | 
			
		||||
 | 
			
		||||
			if (res.code == 0) {
 | 
			
		||||
				this.closeAttrForm();
 | 
			
		||||
				this.$message({
 | 
			
		||||
					message: `${isEdit ? '更新' : '创建'}成功`,
 | 
			
		||||
					type: 'success',
 | 
			
		||||
					duration: 1500,
 | 
			
		||||
					onClose: () => {
 | 
			
		||||
						this.getAttrList();
 | 
			
		||||
					},
 | 
			
		||||
				const isEdit = this.attrForm.id != null;
 | 
			
		||||
				this.attrFormSubmitting = true;
 | 
			
		||||
				const res = await this.$axios({
 | 
			
		||||
					url: isEdit ? this.sections[1].urlUpdate : this.sections[1].urlCreate,
 | 
			
		||||
					method: isEdit ? 'put' : 'post',
 | 
			
		||||
					data: this.attrForm,
 | 
			
		||||
				});
 | 
			
		||||
			}
 | 
			
		||||
			this.attrFormSubmitting = false;
 | 
			
		||||
 | 
			
		||||
				if (res.code == 0) {
 | 
			
		||||
					this.closeAttrForm();
 | 
			
		||||
					this.$message({
 | 
			
		||||
						message: `${isEdit ? '更新' : '创建'}成功`,
 | 
			
		||||
						type: 'success',
 | 
			
		||||
						duration: 1500,
 | 
			
		||||
						onClose: () => {
 | 
			
		||||
							this.getAttrList();
 | 
			
		||||
						},
 | 
			
		||||
					});
 | 
			
		||||
				}
 | 
			
		||||
				this.attrFormSubmitting = false;
 | 
			
		||||
			});
 | 
			
		||||
		},
 | 
			
		||||
 | 
			
		||||
		closeAttrForm() {
 | 
			
		||||
 
 | 
			
		||||
@@ -45,6 +45,7 @@
 | 
			
		||||
		<BasicDrawer
 | 
			
		||||
			v-if="editVisible"
 | 
			
		||||
			ref="drawer"
 | 
			
		||||
			size="45%"
 | 
			
		||||
			:default-mode="editMode"
 | 
			
		||||
			:data-id="alarmForm.id"
 | 
			
		||||
			:sections="[
 | 
			
		||||
@@ -198,26 +199,23 @@ export default {
 | 
			
		||||
					prop: 'createTime',
 | 
			
		||||
					label: '添加时间',
 | 
			
		||||
					fixed: true,
 | 
			
		||||
					width: 180,
 | 
			
		||||
					filter: (val) => moment(val).format('yyyy-MM-DD HH:mm:ss'),
 | 
			
		||||
				},
 | 
			
		||||
				{ width: 240, prop: 'code', label: '报警编码' },
 | 
			
		||||
				{ prop: 'code', label: '报警编码' },
 | 
			
		||||
				{
 | 
			
		||||
					width: 100,
 | 
			
		||||
					prop: 'type',
 | 
			
		||||
					label: '报警类型',
 | 
			
		||||
					filter: (val) =>
 | 
			
		||||
						val != null ? ['-', '字符型', '布尔型', '-'][val] : '-',
 | 
			
		||||
				},
 | 
			
		||||
				{
 | 
			
		||||
					width: 90,
 | 
			
		||||
					prop: 'grade',
 | 
			
		||||
					label: '报警级别',
 | 
			
		||||
					filter: publicFormatter(this.DICT_TYPE.EQU_ALARM_LEVEL),
 | 
			
		||||
				},
 | 
			
		||||
				{ width: 180, prop: 'alarmCode', label: '设备报警编码' },
 | 
			
		||||
				{ width: 128, prop: 'plcParamName', label: '参数列名' },
 | 
			
		||||
				{ width: 128, prop: 'alarmContent', label: '报警内容' },
 | 
			
		||||
				{ prop: 'alarmCode', label: '设备报警编码' },
 | 
			
		||||
				{ prop: 'plcParamName', label: '参数列名' },
 | 
			
		||||
				{ prop: 'alarmContent', label: '报警内容' },
 | 
			
		||||
			],
 | 
			
		||||
			alarmForm: {
 | 
			
		||||
				id: undefined,
 | 
			
		||||
@@ -406,12 +404,25 @@ export default {
 | 
			
		||||
				});
 | 
			
		||||
			});
 | 
			
		||||
		},
 | 
			
		||||
		handleTableBtnClick({ data, type }) {
 | 
			
		||||
			switch (type) {
 | 
			
		||||
				case 'edit':
 | 
			
		||||
					this.handleDetail(data, 'edit');
 | 
			
		||||
					break;
 | 
			
		||||
				case 'delete':
 | 
			
		||||
					this.handleDelete(data);
 | 
			
		||||
					break;
 | 
			
		||||
				case 'detail':
 | 
			
		||||
					this.handleDetail(data);
 | 
			
		||||
					break;
 | 
			
		||||
			}
 | 
			
		||||
		},
 | 
			
		||||
		// 查看报警
 | 
			
		||||
		handleDetail(row) {
 | 
			
		||||
		handleDetail(row, mode = 'detail') {
 | 
			
		||||
			// debugger;
 | 
			
		||||
			const { id, code, name, createTime } = row;
 | 
			
		||||
			// 打开抽屉
 | 
			
		||||
			this.editMode = 'detail';
 | 
			
		||||
			this.editMode = mode;
 | 
			
		||||
			this.alarmForm.id = id;
 | 
			
		||||
			this.alarmForm.equipmentGroupCode = code;
 | 
			
		||||
			this.alarmForm.equipmentGroupName = name;
 | 
			
		||||
 
 | 
			
		||||
@@ -12,7 +12,7 @@
 | 
			
		||||
		:wrapper-closable="false"
 | 
			
		||||
		class="drawer"
 | 
			
		||||
		custom-class="mes-drawer"
 | 
			
		||||
		size="60%"
 | 
			
		||||
		:size="size || '50%'"
 | 
			
		||||
		@closed="$emit('destroy')">
 | 
			
		||||
		<SmallTitle slot="title">
 | 
			
		||||
			{{
 | 
			
		||||
@@ -42,7 +42,7 @@
 | 
			
		||||
							:dataForm="form"
 | 
			
		||||
							:rows="formRows" /> -->
 | 
			
		||||
 | 
			
		||||
						<el-row style="margin-bottom: 24px">
 | 
			
		||||
						<el-row v-if="mode.includes('detail')" style="margin-bottom: 24px">
 | 
			
		||||
							<el-col :span="8">
 | 
			
		||||
								<div
 | 
			
		||||
									class="title"
 | 
			
		||||
@@ -62,13 +62,38 @@
 | 
			
		||||
								</div>
 | 
			
		||||
							</el-col>
 | 
			
		||||
						</el-row>
 | 
			
		||||
						<el-row v-else style="margin-bottom: 24px" :gutter="20">
 | 
			
		||||
							<el-form ref="form" :model="form">
 | 
			
		||||
								<el-col :span="8">
 | 
			
		||||
									<el-form-item
 | 
			
		||||
										class="title"
 | 
			
		||||
										label="设备分组名称"
 | 
			
		||||
										style="font-size: 16px; margin: 8px 0">
 | 
			
		||||
										<el-input
 | 
			
		||||
											v-model="form.name"
 | 
			
		||||
											placeholder="请输入设备分组名称"></el-input>
 | 
			
		||||
									</el-form-item>
 | 
			
		||||
								</el-col>
 | 
			
		||||
								<el-col :span="8">
 | 
			
		||||
									<el-form-item
 | 
			
		||||
										class="title"
 | 
			
		||||
										label="设备分组编码"
 | 
			
		||||
										style="font-size: 16px; margin: 8px 0">
 | 
			
		||||
										<el-input
 | 
			
		||||
											v-model="form.code"
 | 
			
		||||
											placeholder="请输入设备分组编码"></el-input>
 | 
			
		||||
									</el-form-item>
 | 
			
		||||
								</el-col>
 | 
			
		||||
							</el-form>
 | 
			
		||||
						</el-row>
 | 
			
		||||
					</div>
 | 
			
		||||
 | 
			
		||||
					<div
 | 
			
		||||
						v-if="section.key == 'attrs'"
 | 
			
		||||
						style="position: relative; margin-top: 12px">
 | 
			
		||||
						<!-- v-if="!mode.includes('detail')" -->
 | 
			
		||||
						<div style="position: absolute; top: -40px; right: 0">
 | 
			
		||||
						<div
 | 
			
		||||
							v-if="!mode.includes('detail')"
 | 
			
		||||
							style="position: absolute; top: -40px; right: 0">
 | 
			
		||||
							<el-button @click="handleAddAttr" type="text">
 | 
			
		||||
								<i class="el-icon-plus"></i>
 | 
			
		||||
								添加属性
 | 
			
		||||
@@ -84,7 +109,7 @@
 | 
			
		||||
							<!-- :add-button-show="mode.includes('detail') ? null : '添加属性'"
 | 
			
		||||
							@emitButtonClick="handleAddAttr" -->
 | 
			
		||||
							<method-btn
 | 
			
		||||
								v-if="section.tableBtn"
 | 
			
		||||
								v-if="section.tableBtn && !mode.includes('detail')"
 | 
			
		||||
								slot="handleBtn"
 | 
			
		||||
								label="操作"
 | 
			
		||||
								:method-list="tableBtn"
 | 
			
		||||
@@ -104,10 +129,12 @@
 | 
			
		||||
 | 
			
		||||
			<div class="drawer-body__footer">
 | 
			
		||||
				<el-button style="" @click="handleCancel">取消</el-button>
 | 
			
		||||
				<!-- <el-button v-if="mode == 'detail'" type="primary" @click="toggleEdit">
 | 
			
		||||
					编辑
 | 
			
		||||
				</el-button> -->
 | 
			
		||||
				<!-- <el-button v-else type="primary" @click="handleCancel">确定</el-button> -->
 | 
			
		||||
				<el-button
 | 
			
		||||
					type="primary"
 | 
			
		||||
					v-if="!mode.includes('detail')"
 | 
			
		||||
					@click="handleSave">
 | 
			
		||||
					保存
 | 
			
		||||
				</el-button>
 | 
			
		||||
			</div>
 | 
			
		||||
		</div>
 | 
			
		||||
 | 
			
		||||
@@ -163,7 +190,7 @@ const SmallTitle = {
 | 
			
		||||
 | 
			
		||||
export default {
 | 
			
		||||
	components: { SmallTitle, DialogForm, BaseInfoForm },
 | 
			
		||||
	props: ['sections', 'defaultMode', 'dataId'], // dataId 作为一个通用的存放id的字段
 | 
			
		||||
	props: ['sections', 'defaultMode', 'dataId', 'size'], // dataId 作为一个通用的存放id的字段
 | 
			
		||||
	data() {
 | 
			
		||||
		return {
 | 
			
		||||
			mode: '',
 | 
			
		||||
@@ -191,7 +218,9 @@ export default {
 | 
			
		||||
						label: '报警编码', // 自动生成
 | 
			
		||||
						prop: 'code',
 | 
			
		||||
						url: '/base/equipment-group-alarm/getCode',
 | 
			
		||||
						rules: [{ required: true, message: '报警编码不能为空', trigger: 'blur' }],
 | 
			
		||||
						rules: [
 | 
			
		||||
							{ required: true, message: '报警编码不能为空', trigger: 'blur' },
 | 
			
		||||
						],
 | 
			
		||||
					},
 | 
			
		||||
					{
 | 
			
		||||
						select: true,
 | 
			
		||||
@@ -201,7 +230,9 @@ export default {
 | 
			
		||||
							{ label: '布尔型', value: 2 },
 | 
			
		||||
							{ label: '字符型', value: 1 },
 | 
			
		||||
						],
 | 
			
		||||
						rules: [{ required: true, message: '报警类型不能为空', trigger: 'blur' }],
 | 
			
		||||
						rules: [
 | 
			
		||||
							{ required: true, message: '报警类型不能为空', trigger: 'blur' },
 | 
			
		||||
						],
 | 
			
		||||
					},
 | 
			
		||||
				],
 | 
			
		||||
				[
 | 
			
		||||
@@ -222,13 +253,17 @@ export default {
 | 
			
		||||
						input: true,
 | 
			
		||||
						label: '参数列名', // 在实时数据库的列名
 | 
			
		||||
						prop: 'plcParamName',
 | 
			
		||||
						rules: [{ required: true, message: '参数列名不能为空', trigger: 'blur' }],
 | 
			
		||||
						rules: [
 | 
			
		||||
							{ required: true, message: '参数列名不能为空', trigger: 'blur' },
 | 
			
		||||
						],
 | 
			
		||||
					},
 | 
			
		||||
					{
 | 
			
		||||
						input: true,
 | 
			
		||||
						label: '报警内容',
 | 
			
		||||
						prop: 'alarmContent',
 | 
			
		||||
						rules: [{ required: true, message: '报警内容不能为空', trigger: 'blur' }],
 | 
			
		||||
						rules: [
 | 
			
		||||
							{ required: true, message: '报警内容不能为空', trigger: 'blur' },
 | 
			
		||||
						],
 | 
			
		||||
					},
 | 
			
		||||
				],
 | 
			
		||||
			],
 | 
			
		||||
@@ -322,7 +357,7 @@ export default {
 | 
			
		||||
		handleSave() {
 | 
			
		||||
			this.$refs['form'][0].validate(async (valid) => {
 | 
			
		||||
				if (valid) {
 | 
			
		||||
					const isEdit = this.mode == 'edit';
 | 
			
		||||
					const isEdit = !this.mode.includes('detail');
 | 
			
		||||
					await this.$axios({
 | 
			
		||||
						url: this.sections[0][isEdit ? 'urlUpdate' : 'urlCreate'],
 | 
			
		||||
						method: isEdit ? 'put' : 'post',
 | 
			
		||||
@@ -403,33 +438,32 @@ export default {
 | 
			
		||||
		},
 | 
			
		||||
 | 
			
		||||
		// 提交属性表
 | 
			
		||||
		async submitAttrForm() {
 | 
			
		||||
			this.$refs['attrForm'].validate((valid) => {
 | 
			
		||||
		submitAttrForm() {
 | 
			
		||||
			this.$refs['attrForm'].validate(async (valid) => {
 | 
			
		||||
				if (!valid) {
 | 
			
		||||
					return;
 | 
			
		||||
				}
 | 
			
		||||
			});
 | 
			
		||||
			console.log('this.attrform', this.attrForm);
 | 
			
		||||
			const isEdit = this.attrForm.id != null;
 | 
			
		||||
			this.attrFormSubmitting = true;
 | 
			
		||||
			const res = await this.$axios({
 | 
			
		||||
				url: isEdit ? this.sections[1].urlUpdate : this.sections[1].urlCreate,
 | 
			
		||||
				method: isEdit ? 'put' : 'post',
 | 
			
		||||
				data: this.attrForm,
 | 
			
		||||
			});
 | 
			
		||||
 | 
			
		||||
			if (res.code == 0) {
 | 
			
		||||
				this.closeAttrForm();
 | 
			
		||||
				this.$message({
 | 
			
		||||
					message: `${isEdit ? '更新' : '创建'}成功`,
 | 
			
		||||
					type: 'success',
 | 
			
		||||
					duration: 1500,
 | 
			
		||||
					onClose: () => {
 | 
			
		||||
						this.getAttrList();
 | 
			
		||||
					},
 | 
			
		||||
				const isEdit = this.attrForm.id != null;
 | 
			
		||||
				this.attrFormSubmitting = true;
 | 
			
		||||
				const res = await this.$axios({
 | 
			
		||||
					url: isEdit ? this.sections[1].urlUpdate : this.sections[1].urlCreate,
 | 
			
		||||
					method: isEdit ? 'put' : 'post',
 | 
			
		||||
					data: this.attrForm,
 | 
			
		||||
				});
 | 
			
		||||
			}
 | 
			
		||||
			this.attrFormSubmitting = false;
 | 
			
		||||
 | 
			
		||||
				if (res.code == 0) {
 | 
			
		||||
					this.closeAttrForm();
 | 
			
		||||
					this.$message({
 | 
			
		||||
						message: `${isEdit ? '更新' : '创建'}成功`,
 | 
			
		||||
						type: 'success',
 | 
			
		||||
						duration: 1500,
 | 
			
		||||
						onClose: () => {
 | 
			
		||||
							this.getAttrList();
 | 
			
		||||
						},
 | 
			
		||||
					});
 | 
			
		||||
				}
 | 
			
		||||
				this.attrFormSubmitting = false;
 | 
			
		||||
			});
 | 
			
		||||
		},
 | 
			
		||||
 | 
			
		||||
		closeAttrForm() {
 | 
			
		||||
 
 | 
			
		||||
@@ -45,6 +45,7 @@
 | 
			
		||||
		<BasicDrawer
 | 
			
		||||
			v-if="editVisible"
 | 
			
		||||
			ref="drawer"
 | 
			
		||||
			size="45%"
 | 
			
		||||
			:default-mode="editMode"
 | 
			
		||||
			:data-id="alarmForm.id"
 | 
			
		||||
			:sections="[
 | 
			
		||||
@@ -224,7 +225,9 @@ export default {
 | 
			
		||||
						bind: {
 | 
			
		||||
							filterable: true,
 | 
			
		||||
						},
 | 
			
		||||
						rules: [{ required: true, message: '设备不能为空', trigger: 'blur' }],
 | 
			
		||||
						rules: [
 | 
			
		||||
							{ required: true, message: '设备不能为空', trigger: 'blur' },
 | 
			
		||||
						],
 | 
			
		||||
					},
 | 
			
		||||
				],
 | 
			
		||||
				[
 | 
			
		||||
@@ -238,7 +241,9 @@ export default {
 | 
			
		||||
						bind: {
 | 
			
		||||
							filterable: true,
 | 
			
		||||
						},
 | 
			
		||||
						rules: [{ required: true, message: '报警分组不能为空', trigger: 'blur' }],
 | 
			
		||||
						rules: [
 | 
			
		||||
							{ required: true, message: '报警分组不能为空', trigger: 'blur' },
 | 
			
		||||
						],
 | 
			
		||||
					},
 | 
			
		||||
				],
 | 
			
		||||
			],
 | 
			
		||||
@@ -269,7 +274,13 @@ export default {
 | 
			
		||||
						input: true,
 | 
			
		||||
						label: '设备分组名称',
 | 
			
		||||
						prop: 'name',
 | 
			
		||||
						rules: [{ required: true, message: '设备分组名称不能为空', trigger: 'blur' }],
 | 
			
		||||
						rules: [
 | 
			
		||||
							{
 | 
			
		||||
								required: true,
 | 
			
		||||
								message: '设备分组名称不能为空',
 | 
			
		||||
								trigger: 'blur',
 | 
			
		||||
							},
 | 
			
		||||
						],
 | 
			
		||||
						// bind: {
 | 
			
		||||
						// 	disabled: this.editMode == 'detail', // some condition, like detail mode...
 | 
			
		||||
						// }
 | 
			
		||||
@@ -287,26 +298,23 @@ export default {
 | 
			
		||||
					prop: 'createTime',
 | 
			
		||||
					label: '添加时间',
 | 
			
		||||
					fixed: true,
 | 
			
		||||
					width: 180,
 | 
			
		||||
					filter: (val) => moment(val).format('yyyy-MM-DD HH:mm:ss'),
 | 
			
		||||
				},
 | 
			
		||||
				{ width: 240, prop: 'code', label: '报警编码' },
 | 
			
		||||
				{ prop: 'code', label: '报警编码' },
 | 
			
		||||
				{
 | 
			
		||||
					width: 100,
 | 
			
		||||
					prop: 'type',
 | 
			
		||||
					label: '报警类型',
 | 
			
		||||
					filter: (val) =>
 | 
			
		||||
						val != null ? ['-', '字符型', '布尔型', '-'][val] : '-',
 | 
			
		||||
				},
 | 
			
		||||
				{
 | 
			
		||||
					width: 90,
 | 
			
		||||
					prop: 'grade',
 | 
			
		||||
					label: '报警级别',
 | 
			
		||||
					filter: publicFormatter(this.DICT_TYPE.EQU_ALARM_LEVEL),
 | 
			
		||||
				},
 | 
			
		||||
				{ width: 180, prop: 'alarmCode', label: '设备报警编码' },
 | 
			
		||||
				{ width: 128, prop: 'plcParamName', label: '参数列名' },
 | 
			
		||||
				{ width: 128, prop: 'alarmContent', label: '报警内容' },
 | 
			
		||||
				{ prop: 'alarmCode', label: '设备报警编码' },
 | 
			
		||||
				{ prop: 'plcParamName', label: '参数列名' },
 | 
			
		||||
				{ prop: 'alarmContent', label: '报警内容' },
 | 
			
		||||
			],
 | 
			
		||||
		};
 | 
			
		||||
	},
 | 
			
		||||
@@ -361,6 +369,19 @@ export default {
 | 
			
		||||
			};
 | 
			
		||||
			this.resetForm('form');
 | 
			
		||||
		},
 | 
			
		||||
		handleTableBtnClick({ data, type }) {
 | 
			
		||||
			switch (type) {
 | 
			
		||||
				case 'edit':
 | 
			
		||||
					this.handleDetail(data, 'edit');
 | 
			
		||||
					break;
 | 
			
		||||
				case 'delete':
 | 
			
		||||
					this.handleDelete(data);
 | 
			
		||||
					break;
 | 
			
		||||
				case 'detail':
 | 
			
		||||
					this.handleDetail(data);
 | 
			
		||||
					break;
 | 
			
		||||
			}
 | 
			
		||||
		},
 | 
			
		||||
		/** 搜索按钮操作 */
 | 
			
		||||
		handleQuery() {
 | 
			
		||||
			this.queryParams.pageNo = 1;
 | 
			
		||||
@@ -411,11 +432,11 @@ export default {
 | 
			
		||||
			});
 | 
			
		||||
		},
 | 
			
		||||
		// 查看报警
 | 
			
		||||
		handleDetail(row) {
 | 
			
		||||
		handleDetail(row, mode = 'detail') {
 | 
			
		||||
			const { equipmentId, equipmentName, groupCode, groupId, groupName, id } =
 | 
			
		||||
				row;
 | 
			
		||||
			// 打开抽屉
 | 
			
		||||
			this.editMode = 'detail';
 | 
			
		||||
			this.editMode = mode;
 | 
			
		||||
			this.alarmForm.id = groupId;
 | 
			
		||||
			this.alarmForm.equipmentGroupCode = groupCode;
 | 
			
		||||
			this.alarmForm.equipmentGroupName = groupName;
 | 
			
		||||
 
 | 
			
		||||
@@ -52,6 +52,7 @@
 | 
			
		||||
		<BasicDrawer
 | 
			
		||||
			v-if="editVisible"
 | 
			
		||||
			ref="drawer"
 | 
			
		||||
			size="45%"
 | 
			
		||||
			:default-mode="editMode"
 | 
			
		||||
			:info-data="alarmForm"
 | 
			
		||||
			:sections="[
 | 
			
		||||
@@ -59,9 +60,13 @@
 | 
			
		||||
					name: '基本信息',
 | 
			
		||||
					key: 'base',
 | 
			
		||||
					rows: drawerBaseInfoRows,
 | 
			
		||||
					url: '/base/equipment-plc-connect/get',
 | 
			
		||||
					urlUpdate: '/base/equipment-plc-connect/update',
 | 
			
		||||
					urlCreate: '/base/equipment-plc-connect/create',
 | 
			
		||||
					queryParams: { id: alarmForm.id },
 | 
			
		||||
				},
 | 
			
		||||
				{
 | 
			
		||||
					name: '属性列表',
 | 
			
		||||
					name: '采集参数',
 | 
			
		||||
					key: 'attrs',
 | 
			
		||||
					props: drawerListProps,
 | 
			
		||||
					url: '/base/equipment-plc-param/page',
 | 
			
		||||
@@ -75,18 +80,26 @@
 | 
			
		||||
						pageSize: 10,
 | 
			
		||||
					},
 | 
			
		||||
					tableBtn: [
 | 
			
		||||
						this.$auth.hasPermi('equipment:collection-config-param:update')
 | 
			
		||||
							? {
 | 
			
		||||
									type: 'edit',
 | 
			
		||||
									btnName: '修改',
 | 
			
		||||
							  }
 | 
			
		||||
							: undefined,
 | 
			
		||||
						this.$auth.hasPermi('equipment:collection-config-param:delete')
 | 
			
		||||
							? {
 | 
			
		||||
									type: 'delete',
 | 
			
		||||
									btnName: '删除',
 | 
			
		||||
							  }
 | 
			
		||||
							: undefined,
 | 
			
		||||
						{
 | 
			
		||||
							type: 'edit',
 | 
			
		||||
							btnName: '修改',
 | 
			
		||||
						},
 | 
			
		||||
						{
 | 
			
		||||
							type: 'delete',
 | 
			
		||||
							btnName: '删除',
 | 
			
		||||
						},
 | 
			
		||||
						// this.$auth.hasPermi('equipment:collection-config-param:update')
 | 
			
		||||
						// 	? {
 | 
			
		||||
						// 			type: 'edit',
 | 
			
		||||
						// 			btnName: '修改',
 | 
			
		||||
						// 	  }
 | 
			
		||||
						// 	: undefined,
 | 
			
		||||
						// this.$auth.hasPermi('equipment:collection-config-param:delete')
 | 
			
		||||
						// 	? {
 | 
			
		||||
						// 			type: 'delete',
 | 
			
		||||
						// 			btnName: '删除',
 | 
			
		||||
						// 	  }
 | 
			
		||||
						// 	: undefined,
 | 
			
		||||
					].filter((v) => v),
 | 
			
		||||
					allowAdd: true,
 | 
			
		||||
				},
 | 
			
		||||
@@ -106,7 +119,6 @@ import {
 | 
			
		||||
	getEquipmentPlcConnectPage,
 | 
			
		||||
	exportEquipmentPlcConnectExcel,
 | 
			
		||||
} from '@/api/base/equipmentPlcConnect';
 | 
			
		||||
import moment from 'moment';
 | 
			
		||||
import basicPageMixin from '@/mixins/lb/basicPageMixin';
 | 
			
		||||
// import './http';
 | 
			
		||||
import BasicDrawer from './components/BasicDrawer.vue';
 | 
			
		||||
@@ -182,13 +194,15 @@ export default {
 | 
			
		||||
					placeholder: '请选择设备',
 | 
			
		||||
					param: 'equipmentId',
 | 
			
		||||
					selectOptions: [],
 | 
			
		||||
					filterable: true,
 | 
			
		||||
				},
 | 
			
		||||
				{
 | 
			
		||||
					type: 'select',
 | 
			
		||||
					label: '编码',
 | 
			
		||||
					placeholder: '请选择编码',
 | 
			
		||||
					label: '关联表编码',
 | 
			
		||||
					placeholder: '请选择关联表编码',
 | 
			
		||||
					param: 'plcId',
 | 
			
		||||
					selectOptions: [],
 | 
			
		||||
					filterable: true,
 | 
			
		||||
				},
 | 
			
		||||
				{
 | 
			
		||||
					type: 'button',
 | 
			
		||||
@@ -224,7 +238,9 @@ export default {
 | 
			
		||||
						prop: 'plcId',
 | 
			
		||||
						labelKey: `plcTableName`,
 | 
			
		||||
						url: '/base/equipment-plc/listAll',
 | 
			
		||||
						rules: [{ required: true, message: '关联表名不能为空', trigger: 'blur' }],
 | 
			
		||||
						rules: [
 | 
			
		||||
							{ required: true, message: '关联表名不能为空', trigger: 'blur' },
 | 
			
		||||
						],
 | 
			
		||||
						bind: {
 | 
			
		||||
							filterable: true,
 | 
			
		||||
						},
 | 
			
		||||
@@ -236,7 +252,9 @@ export default {
 | 
			
		||||
						label: '设备',
 | 
			
		||||
						prop: 'equipmentId',
 | 
			
		||||
						url: '/base/core-equipment/page?pageNo=1&pageSize=99',
 | 
			
		||||
						rules: [{ required: true, message: '设备不能为空', trigger: 'blur' }],
 | 
			
		||||
						rules: [
 | 
			
		||||
							{ required: true, message: '设备不能为空', trigger: 'blur' },
 | 
			
		||||
						],
 | 
			
		||||
						bind: {
 | 
			
		||||
							filterable: true,
 | 
			
		||||
						},
 | 
			
		||||
@@ -262,7 +280,9 @@ export default {
 | 
			
		||||
						input: true,
 | 
			
		||||
						label: '设备名',
 | 
			
		||||
						prop: 'equipmentName',
 | 
			
		||||
						rules: [{ required: true, message: '设备名不能为空', trigger: 'blur' }],
 | 
			
		||||
						rules: [
 | 
			
		||||
							{ required: true, message: '设备名不能为空', trigger: 'blur' },
 | 
			
		||||
						],
 | 
			
		||||
						// bind: {
 | 
			
		||||
						// 	disabled: this.editMode == 'detail', // some condition, like detail mode...
 | 
			
		||||
						// }
 | 
			
		||||
@@ -296,7 +316,8 @@ export default {
 | 
			
		||||
					label: '生产参数类型',
 | 
			
		||||
					filter: (val) =>
 | 
			
		||||
						val != null
 | 
			
		||||
							? ['', '进片数量', '出片数量', '破损数量', '无类型', ''][val]
 | 
			
		||||
							? // ? ['', '进片数量', '出片数量', '破损数量', '无类型', ''][val]
 | 
			
		||||
							  ['', '进口计数', '出口计数', '损耗计数', '无类型', ''][val]
 | 
			
		||||
							: '-',
 | 
			
		||||
				},
 | 
			
		||||
				{
 | 
			
		||||
@@ -407,6 +428,19 @@ export default {
 | 
			
		||||
			};
 | 
			
		||||
			this.resetForm('form');
 | 
			
		||||
		},
 | 
			
		||||
		handleTableBtnClick({ data, type }) {
 | 
			
		||||
			switch (type) {
 | 
			
		||||
				case 'edit':
 | 
			
		||||
					this.handleDetail(data, 'edit');
 | 
			
		||||
					break;
 | 
			
		||||
				case 'delete':
 | 
			
		||||
					this.handleDelete(data);
 | 
			
		||||
					break;
 | 
			
		||||
				case 'detail':
 | 
			
		||||
					this.handleDetail(data);
 | 
			
		||||
					break;
 | 
			
		||||
			}
 | 
			
		||||
		},
 | 
			
		||||
		/** 搜索按钮操作 */
 | 
			
		||||
		handleQuery() {
 | 
			
		||||
			this.queryParams.pageNo = 1;
 | 
			
		||||
@@ -458,7 +492,7 @@ export default {
 | 
			
		||||
		},
 | 
			
		||||
 | 
			
		||||
		// 查看报警
 | 
			
		||||
		handleDetail(row) {
 | 
			
		||||
		handleDetail(row, mode = 'detail') {
 | 
			
		||||
			// debugger;
 | 
			
		||||
			const {
 | 
			
		||||
				id,
 | 
			
		||||
@@ -474,7 +508,7 @@ export default {
 | 
			
		||||
				workshopSection,
 | 
			
		||||
			} = row;
 | 
			
		||||
			// 打开抽屉
 | 
			
		||||
			this.editMode = 'detail';
 | 
			
		||||
			this.editMode = mode;
 | 
			
		||||
			this.alarmForm.id = id;
 | 
			
		||||
			this.alarmForm.plcTableName = plcTableName; // 关联表名
 | 
			
		||||
			this.alarmForm.equipmentName = equipmentName;
 | 
			
		||||
 
 | 
			
		||||
@@ -59,7 +59,6 @@ import {
 | 
			
		||||
	getEquipmentPlcPage,
 | 
			
		||||
	exportEquipmentPlcExcel,
 | 
			
		||||
} from '@/api/base/equipmentPlc';
 | 
			
		||||
import moment from 'moment';
 | 
			
		||||
import basicPageMixin from '@/mixins/lb/basicPageMixin';
 | 
			
		||||
 | 
			
		||||
const switchBtn = {
 | 
			
		||||
@@ -352,7 +351,7 @@ export default {
 | 
			
		||||
		handleDelete(row) {
 | 
			
		||||
			const id = row.id;
 | 
			
		||||
			this.$modal
 | 
			
		||||
				.confirm('是否确认删除实时数据采集配置编号为"' + id + '"的数据项?')
 | 
			
		||||
				.confirm('是否确认删除该配置?')
 | 
			
		||||
				.then(function () {
 | 
			
		||||
					return deleteEquipmentPlc(id);
 | 
			
		||||
				})
 | 
			
		||||
 
 | 
			
		||||
@@ -12,7 +12,7 @@
 | 
			
		||||
		:wrapper-closable="false"
 | 
			
		||||
		class="drawer"
 | 
			
		||||
		custom-class="mes-drawer"
 | 
			
		||||
		size="60%"
 | 
			
		||||
		:size="size || '50%'"
 | 
			
		||||
		@closed="$emit('destroy')">
 | 
			
		||||
		<SmallTitle slot="title">
 | 
			
		||||
			{{
 | 
			
		||||
@@ -42,7 +42,8 @@
 | 
			
		||||
							v-model="form"
 | 
			
		||||
							:rows="formRows" /> -->
 | 
			
		||||
 | 
			
		||||
						<el-row style="margin-bottom: 24px">
 | 
			
		||||
						<!-- if  -->
 | 
			
		||||
						<el-row v-if="mode.includes('detail')" style="margin-bottom: 24px">
 | 
			
		||||
							<el-col :span="8">
 | 
			
		||||
								<div
 | 
			
		||||
									class="title"
 | 
			
		||||
@@ -64,13 +65,39 @@
 | 
			
		||||
								</div>
 | 
			
		||||
							</el-col>
 | 
			
		||||
						</el-row>
 | 
			
		||||
						<!-- else  -->
 | 
			
		||||
						<el-row v-else style="margin-bottom: 24px" :gutter="20">
 | 
			
		||||
							<el-form ref="form" :model="form">
 | 
			
		||||
								<el-col :span="8">
 | 
			
		||||
									<el-form-item
 | 
			
		||||
										class="title"
 | 
			
		||||
										label="设备名"
 | 
			
		||||
										style="font-size: 16px; margin: 8px 0">
 | 
			
		||||
										<el-input
 | 
			
		||||
											v-model="form.equipmentName"
 | 
			
		||||
											placeholder="请输入设备名"></el-input>
 | 
			
		||||
									</el-form-item>
 | 
			
		||||
								</el-col>
 | 
			
		||||
								<el-col :span="8">
 | 
			
		||||
									<el-form-item
 | 
			
		||||
										class="title"
 | 
			
		||||
										label="设备关联表名"
 | 
			
		||||
										style="font-size: 16px; margin: 8px 0">
 | 
			
		||||
										<el-input
 | 
			
		||||
											v-model="form.plcTableName"
 | 
			
		||||
											placeholder="请输入关联表名"></el-input>
 | 
			
		||||
									</el-form-item>
 | 
			
		||||
								</el-col>
 | 
			
		||||
							</el-form>
 | 
			
		||||
						</el-row>
 | 
			
		||||
					</div>
 | 
			
		||||
 | 
			
		||||
					<div
 | 
			
		||||
						v-if="section.key == 'attrs'"
 | 
			
		||||
						style="position: relative; margin-top: 12px">
 | 
			
		||||
						<!-- v-if="!mode.includes('detail')" -->
 | 
			
		||||
						<div style="position: absolute; top: -40px; right: 0">
 | 
			
		||||
						<div
 | 
			
		||||
							v-if="!mode.includes('detail')"
 | 
			
		||||
							style="position: absolute; top: -40px; right: 0">
 | 
			
		||||
							<el-button @click="handleAddAttr" type="text">
 | 
			
		||||
								<i class="el-icon-plus"></i>
 | 
			
		||||
								添加属性
 | 
			
		||||
@@ -86,7 +113,7 @@
 | 
			
		||||
							<!-- :add-button-show="mode.includes('detail') ? null : '添加属性'"
 | 
			
		||||
							@emitButtonClick="handleAddAttr" -->
 | 
			
		||||
							<method-btn
 | 
			
		||||
								v-if="section.tableBtn"
 | 
			
		||||
								v-if="section.tableBtn && !mode.includes('detail')"
 | 
			
		||||
								slot="handleBtn"
 | 
			
		||||
								label="操作"
 | 
			
		||||
								:method-list="tableBtn"
 | 
			
		||||
@@ -106,10 +133,12 @@
 | 
			
		||||
 | 
			
		||||
			<div class="drawer-body__footer">
 | 
			
		||||
				<el-button style="" @click="handleCancel">取消</el-button>
 | 
			
		||||
				<!-- <el-button v-if="mode == 'detail'" type="primary" @click="toggleEdit">
 | 
			
		||||
					编辑
 | 
			
		||||
				</el-button> -->
 | 
			
		||||
				<!-- <el-button v-else type="primary" @click="handleCancel">确定</el-button> -->
 | 
			
		||||
				<el-button
 | 
			
		||||
					type="primary"
 | 
			
		||||
					v-if="!mode.includes('detail')"
 | 
			
		||||
					@click="handleSave">
 | 
			
		||||
					保存
 | 
			
		||||
				</el-button>
 | 
			
		||||
			</div>
 | 
			
		||||
		</div>
 | 
			
		||||
 | 
			
		||||
@@ -164,7 +193,7 @@ const SmallTitle = {
 | 
			
		||||
 | 
			
		||||
export default {
 | 
			
		||||
	components: { SmallTitle, DialogForm: BaseInfoForm, BaseInfoForm },
 | 
			
		||||
	props: ['sections', 'defaultMode', 'infoData'],
 | 
			
		||||
	props: ['sections', 'defaultMode', 'infoData', 'size'],
 | 
			
		||||
	data() {
 | 
			
		||||
		return {
 | 
			
		||||
			mode: '',
 | 
			
		||||
@@ -194,13 +223,17 @@ export default {
 | 
			
		||||
						input: true,
 | 
			
		||||
						label: '参数列名',
 | 
			
		||||
						prop: 'plcParamName',
 | 
			
		||||
						rules: [{ required: true, message: '参数列名不能为空', trigger: 'blur' }],
 | 
			
		||||
						rules: [
 | 
			
		||||
							{ required: true, message: '参数列名不能为空', trigger: 'blur' },
 | 
			
		||||
						],
 | 
			
		||||
					},
 | 
			
		||||
					{
 | 
			
		||||
						input: true,
 | 
			
		||||
						label: '参数名称',
 | 
			
		||||
						prop: 'name',
 | 
			
		||||
						rules: [{ required: true, message: '参数名称不能为空', trigger: 'blur' }],
 | 
			
		||||
						rules: [
 | 
			
		||||
							{ required: true, message: '参数名称不能为空', trigger: 'blur' },
 | 
			
		||||
						],
 | 
			
		||||
					},
 | 
			
		||||
				],
 | 
			
		||||
				[
 | 
			
		||||
@@ -230,19 +263,35 @@ export default {
 | 
			
		||||
							{ label: '工艺参数', value: 2 },
 | 
			
		||||
							{ label: '报警参数', value: 3 },
 | 
			
		||||
						],
 | 
			
		||||
						rules: [{ required: true, message: '设备参数类型不能为空', trigger: 'blur' }],
 | 
			
		||||
						rules: [
 | 
			
		||||
							{
 | 
			
		||||
								required: true,
 | 
			
		||||
								message: '设备参数类型不能为空',
 | 
			
		||||
								trigger: 'blur',
 | 
			
		||||
							},
 | 
			
		||||
						],
 | 
			
		||||
					},
 | 
			
		||||
					{
 | 
			
		||||
						select: true,
 | 
			
		||||
						label: '生产参数类型',
 | 
			
		||||
						prop: 'production_param_type',
 | 
			
		||||
						options: [
 | 
			
		||||
							{ label: '进片数量', value: 1 },
 | 
			
		||||
							{ label: '出片数量', value: 2 },
 | 
			
		||||
							{ label: '破损数量', value: 3 },
 | 
			
		||||
							// { label: '进片数量', value: 1 },
 | 
			
		||||
							// { label: '出片数量', value: 2 },
 | 
			
		||||
							// { label: '破损数量', value: 3 },
 | 
			
		||||
							// { label: '无类型', value: 4 },
 | 
			
		||||
							{ label: '进口计数', value: 1 },
 | 
			
		||||
							{ label: '出口计数', value: 2 },
 | 
			
		||||
							{ label: '损耗计数', value: 3 },
 | 
			
		||||
							{ label: '无类型', value: 4 },
 | 
			
		||||
						],
 | 
			
		||||
						rules: [{ required: true, message: '生产参数类型不能为空', trigger: 'blur' }],
 | 
			
		||||
						rules: [
 | 
			
		||||
							{
 | 
			
		||||
								required: true,
 | 
			
		||||
								message: '生产参数类型不能为空',
 | 
			
		||||
								trigger: 'blur',
 | 
			
		||||
							},
 | 
			
		||||
						],
 | 
			
		||||
					},
 | 
			
		||||
				],
 | 
			
		||||
				[
 | 
			
		||||
@@ -305,6 +354,7 @@ export default {
 | 
			
		||||
			infoQuery: null, // 基本信息的请求
 | 
			
		||||
			attrFormSubmitting: false,
 | 
			
		||||
			attrListLoading: false,
 | 
			
		||||
			shouldRefreshPageView: false,
 | 
			
		||||
		};
 | 
			
		||||
	},
 | 
			
		||||
	computed: {
 | 
			
		||||
@@ -323,10 +373,12 @@ export default {
 | 
			
		||||
			});
 | 
			
		||||
		},
 | 
			
		||||
		tableBtn() {
 | 
			
		||||
			return this.mode == 'detail' ? [] : this.sections[1].tableBtn;
 | 
			
		||||
			return this.sections[1].tableBtn;
 | 
			
		||||
			// return this.mode == 'detail' ? [] : this.sections[1].tableBtn;
 | 
			
		||||
		},
 | 
			
		||||
	},
 | 
			
		||||
	mounted() {
 | 
			
		||||
		this.shouldRefreshPageView = false;
 | 
			
		||||
		this.mode = this.defaultMode || 'detail';
 | 
			
		||||
		for (const section of this.sections) {
 | 
			
		||||
			// 请求具体信息
 | 
			
		||||
@@ -389,7 +441,7 @@ export default {
 | 
			
		||||
		handleSave() {
 | 
			
		||||
			this.$refs['form'][0].validate(async (valid) => {
 | 
			
		||||
				if (valid) {
 | 
			
		||||
					const isEdit = this.mode == 'edit';
 | 
			
		||||
					const isEdit = !this.mode.includes('detail');
 | 
			
		||||
					await this.$axios({
 | 
			
		||||
						url: this.sections[0][isEdit ? 'urlUpdate' : 'urlCreate'],
 | 
			
		||||
						method: isEdit ? 'put' : 'post',
 | 
			
		||||
@@ -403,6 +455,9 @@ export default {
 | 
			
		||||
		},
 | 
			
		||||
 | 
			
		||||
		handleCancel() {
 | 
			
		||||
			if (this.shouldRefreshPageView) {
 | 
			
		||||
				this.$emit('refreshDataList');
 | 
			
		||||
			}
 | 
			
		||||
			this.visible = false;
 | 
			
		||||
		},
 | 
			
		||||
 | 
			
		||||
@@ -426,7 +481,7 @@ export default {
 | 
			
		||||
				remark: '',
 | 
			
		||||
				alarmContent: '',
 | 
			
		||||
			};
 | 
			
		||||
			this.attrTitle = '添加设备绑定信息';
 | 
			
		||||
			this.attrTitle = '添加参数绑定信息';
 | 
			
		||||
			this.attrFormVisible = true;
 | 
			
		||||
		},
 | 
			
		||||
 | 
			
		||||
@@ -439,14 +494,14 @@ export default {
 | 
			
		||||
			});
 | 
			
		||||
			if (res.code == 0) {
 | 
			
		||||
				this.attrForm = res.data;
 | 
			
		||||
				this.attrTitle = '编辑设备绑定信息';
 | 
			
		||||
				this.attrTitle = '编辑参数绑定信息';
 | 
			
		||||
				this.attrFormVisible = true;
 | 
			
		||||
			}
 | 
			
		||||
		},
 | 
			
		||||
 | 
			
		||||
		// 删除属性
 | 
			
		||||
		handleDeleteAttr(attrId) {
 | 
			
		||||
			this.$confirm('确定删除该分组报警?', '提示', {
 | 
			
		||||
			this.$confirm('确定删除该参数?', '提示', {
 | 
			
		||||
				confirmButtonText: '确定',
 | 
			
		||||
				cancelButtonText: '取消',
 | 
			
		||||
				type: 'warning',
 | 
			
		||||
@@ -458,6 +513,7 @@ export default {
 | 
			
		||||
						params: { id: attrId },
 | 
			
		||||
					});
 | 
			
		||||
					if (res.code == 0) {
 | 
			
		||||
						this.shouldRefreshPageView = true;
 | 
			
		||||
						this.$message({
 | 
			
		||||
							message: '删除成功',
 | 
			
		||||
							type: 'success',
 | 
			
		||||
@@ -472,35 +528,37 @@ export default {
 | 
			
		||||
		},
 | 
			
		||||
 | 
			
		||||
		// 提交属性表
 | 
			
		||||
		async submitAttrForm() {
 | 
			
		||||
			this.$refs['attrForm'].validate((valid) => {
 | 
			
		||||
		submitAttrForm() {
 | 
			
		||||
			this.$refs['attrForm'].validate(async (valid) => {
 | 
			
		||||
				if (!valid) {
 | 
			
		||||
					return;
 | 
			
		||||
				}
 | 
			
		||||
			});
 | 
			
		||||
			const isEdit = this.attrForm.id != null;
 | 
			
		||||
			this.attrFormSubmitting = true;
 | 
			
		||||
			const res = await this.$axios({
 | 
			
		||||
				url: isEdit ? this.sections[1].urlUpdate : this.sections[1].urlCreate,
 | 
			
		||||
				method: isEdit ? 'put' : 'post',
 | 
			
		||||
				data: {
 | 
			
		||||
					...this.attrForm,
 | 
			
		||||
					connectId: this.infoData.id,
 | 
			
		||||
				},
 | 
			
		||||
			});
 | 
			
		||||
 | 
			
		||||
			if (res.code == 0) {
 | 
			
		||||
				this.closeAttrForm();
 | 
			
		||||
				this.$message({
 | 
			
		||||
					message: `${isEdit ? '更新' : '创建'}成功`,
 | 
			
		||||
					type: 'success',
 | 
			
		||||
					duration: 1500,
 | 
			
		||||
					onClose: () => {
 | 
			
		||||
						this.getAttrList();
 | 
			
		||||
				const isEdit = this.attrForm.id != null;
 | 
			
		||||
				this.attrFormSubmitting = true;
 | 
			
		||||
				const res = await this.$axios({
 | 
			
		||||
					url: isEdit ? this.sections[1].urlUpdate : this.sections[1].urlCreate,
 | 
			
		||||
					method: isEdit ? 'put' : 'post',
 | 
			
		||||
					data: {
 | 
			
		||||
						...this.attrForm,
 | 
			
		||||
						connectId: this.infoData.id,
 | 
			
		||||
					},
 | 
			
		||||
				});
 | 
			
		||||
			}
 | 
			
		||||
			this.attrFormSubmitting = false;
 | 
			
		||||
 | 
			
		||||
				if (res.code == 0) {
 | 
			
		||||
					this.closeAttrForm();
 | 
			
		||||
					this.$message({
 | 
			
		||||
						message: `${isEdit ? '更新' : '创建'}成功`,
 | 
			
		||||
						type: 'success',
 | 
			
		||||
						duration: 1500,
 | 
			
		||||
						onClose: () => {
 | 
			
		||||
							this.getAttrList();
 | 
			
		||||
							this.shouldRefreshPageView = true;
 | 
			
		||||
						},
 | 
			
		||||
					});
 | 
			
		||||
				}
 | 
			
		||||
				this.attrFormSubmitting = false;
 | 
			
		||||
			});
 | 
			
		||||
		},
 | 
			
		||||
 | 
			
		||||
		closeAttrForm() {
 | 
			
		||||
@@ -509,7 +567,7 @@ export default {
 | 
			
		||||
 | 
			
		||||
		handleClick(raw) {
 | 
			
		||||
			if (raw.type === 'delete') {
 | 
			
		||||
				this.$confirm(`确定删除该报警?`, '提示', {
 | 
			
		||||
				this.$confirm(`确定删除该参数?`, '提示', {
 | 
			
		||||
					confirmButtonText: '确定',
 | 
			
		||||
					cancelButtonText: '取消',
 | 
			
		||||
					type: 'warning',
 | 
			
		||||
 
 | 
			
		||||
@@ -52,7 +52,7 @@
 | 
			
		||||
import moment from 'moment';
 | 
			
		||||
import basicPageMixin from '@/mixins/lb/basicPageMixin';
 | 
			
		||||
import { publicFormatter } from '@/utils/dict';
 | 
			
		||||
import { deleteCheck } from "@/api/equipment/base/inspection/settings";
 | 
			
		||||
import { deleteCheck } from '@/api/equipment/base/inspection/settings';
 | 
			
		||||
 | 
			
		||||
const timeFilter = (val) => moment(val).format('yyyy-MM-DD HH:mm:ss');
 | 
			
		||||
 | 
			
		||||
@@ -128,15 +128,21 @@ export default {
 | 
			
		||||
						label: '巡检内容编号',
 | 
			
		||||
						prop: 'code',
 | 
			
		||||
						url: '/base/equipment-check/getCode',
 | 
			
		||||
						rules: [{ required: true, message: '巡检内容编号不能为空', trigger: 'blur' }],
 | 
			
		||||
						rules: [
 | 
			
		||||
							{
 | 
			
		||||
								required: true,
 | 
			
		||||
								message: '巡检内容编号不能为空',
 | 
			
		||||
								trigger: 'blur',
 | 
			
		||||
							},
 | 
			
		||||
						],
 | 
			
		||||
					},
 | 
			
		||||
				],
 | 
			
		||||
				[
 | 
			
		||||
					{
 | 
			
		||||
						input: true,
 | 
			
		||||
						label: '巡检项目',
 | 
			
		||||
						prop: 'program',
 | 
			
		||||
						rules: [{ required: true, message: '巡检项目不能为空', trigger: 'blur' }],
 | 
			
		||||
						rules: [
 | 
			
		||||
							{ required: true, message: '巡检项目不能为空', trigger: 'blur' },
 | 
			
		||||
						],
 | 
			
		||||
					},
 | 
			
		||||
				],
 | 
			
		||||
				[
 | 
			
		||||
@@ -144,10 +150,10 @@ export default {
 | 
			
		||||
						input: true,
 | 
			
		||||
						label: '巡检内容',
 | 
			
		||||
						prop: 'content',
 | 
			
		||||
						rules: [{ required: true, message: '巡检内容不能为空', trigger: 'blur' }],
 | 
			
		||||
						rules: [
 | 
			
		||||
							{ required: true, message: '巡检内容不能为空', trigger: 'blur' },
 | 
			
		||||
						],
 | 
			
		||||
					},
 | 
			
		||||
				],
 | 
			
		||||
				[
 | 
			
		||||
					{
 | 
			
		||||
						input: true,
 | 
			
		||||
						label: '备注',
 | 
			
		||||
@@ -168,7 +174,7 @@ export default {
 | 
			
		||||
				code: '',
 | 
			
		||||
				program: '',
 | 
			
		||||
				id: undefined,
 | 
			
		||||
				content: ''
 | 
			
		||||
				content: '',
 | 
			
		||||
			},
 | 
			
		||||
			basePath: '/base/equipment-check',
 | 
			
		||||
			mode: null,
 | 
			
		||||
@@ -271,10 +277,10 @@ export default {
 | 
			
		||||
		handleDelete(row) {
 | 
			
		||||
			const id = row.id;
 | 
			
		||||
			this.$modal
 | 
			
		||||
				.confirm('是否确认删除巡检项目名称为"' + row.program + '"的数据项?')
 | 
			
		||||
				.confirm('是否确认删除该巡检项目?')
 | 
			
		||||
				.then(function () {
 | 
			
		||||
					// return this.delete({ id });
 | 
			
		||||
					return deleteCheck(id)
 | 
			
		||||
					// return this.del({ id });
 | 
			
		||||
					return deleteCheck(id);
 | 
			
		||||
				})
 | 
			
		||||
				.then(() => {
 | 
			
		||||
					this.getList();
 | 
			
		||||
 
 | 
			
		||||
@@ -77,9 +77,9 @@
 | 
			
		||||
					<el-form-item label="巡检时间" prop="actualTime">
 | 
			
		||||
						<el-date-picker
 | 
			
		||||
							v-model="dataForm.actualTime"
 | 
			
		||||
							type="date"
 | 
			
		||||
							type="datetime"
 | 
			
		||||
							:disabled="isdetail"
 | 
			
		||||
							format='yyyy-MM-dd'
 | 
			
		||||
							format='yyyy-MM-dd HH:mm:ss'
 | 
			
		||||
							value-format="timestamp"
 | 
			
		||||
							placeholder="选择巡检时间" />
 | 
			
		||||
					</el-form-item>
 | 
			
		||||
 
 | 
			
		||||
@@ -69,7 +69,7 @@ export default {
 | 
			
		||||
	data() {
 | 
			
		||||
		return {
 | 
			
		||||
			addOrUpdateVisible: false,
 | 
			
		||||
			searchBarKeys: ['equipmentId', 'createTime'],
 | 
			
		||||
			searchBarKeys: ['equipmentId', 'actualTime'],
 | 
			
		||||
			tableBtn: [
 | 
			
		||||
				this.$auth.hasPermi('equipment:check-record:detail')
 | 
			
		||||
					? {
 | 
			
		||||
@@ -105,6 +105,7 @@ export default {
 | 
			
		||||
					label: '设备',
 | 
			
		||||
					placeholder: '请选择设备',
 | 
			
		||||
					param: 'equipmentId',
 | 
			
		||||
					filterable: true
 | 
			
		||||
				},
 | 
			
		||||
				// 开始结束时间 
 | 
			
		||||
				{
 | 
			
		||||
@@ -112,12 +113,12 @@ export default {
 | 
			
		||||
					label: '时间段',
 | 
			
		||||
					dateType: 'daterange', // datetimerange
 | 
			
		||||
					format: 'yyyy-MM-dd',
 | 
			
		||||
					valueFormat: 'timestamp',
 | 
			
		||||
					valueFormat: 'yyyy-MM-dd HH:mm:ss',
 | 
			
		||||
					rangeSeparator: '-',
 | 
			
		||||
					startPlaceholder: '开始日期',
 | 
			
		||||
					endPlaceholder: '结束日期',
 | 
			
		||||
					defaultTime: ['00:00:00', '23:59:59'],
 | 
			
		||||
					param: 'startTime',
 | 
			
		||||
					param: 'actualTime',
 | 
			
		||||
					// width: 350,
 | 
			
		||||
				},
 | 
			
		||||
				{
 | 
			
		||||
 
 | 
			
		||||
@@ -2,7 +2,7 @@
 | 
			
		||||
 * @Author: zwq
 | 
			
		||||
 * @Date: 2021-11-18 14:16:25
 | 
			
		||||
 * @LastEditors: DY
 | 
			
		||||
 * @LastEditTime: 2023-11-09 11:09:26
 | 
			
		||||
 * @LastEditTime: 2023-11-24 18:38:22
 | 
			
		||||
 * @Description:
 | 
			
		||||
-->
 | 
			
		||||
<template>
 | 
			
		||||
@@ -52,11 +52,10 @@
 | 
			
		||||
 | 
			
		||||
				<div v-if="!isdetail" class="action_btn">
 | 
			
		||||
					<template>
 | 
			
		||||
						<span style="display: inline-block;" @click="addNew()">
 | 
			
		||||
							<svg-icon style="width: 14px; height: 14px" class="item-icon" icon-class="table_add" />
 | 
			
		||||
							<span class="add">添加</span>
 | 
			
		||||
						</span>
 | 
			
		||||
					</template>
 | 
			
		||||
            <span style="display: inline-block;">
 | 
			
		||||
              <el-button type="text" @click="addNew()" icon="el-icon-plus">添加</el-button>
 | 
			
		||||
            </span>
 | 
			
		||||
          </template>
 | 
			
		||||
				</div>
 | 
			
		||||
				<base-table
 | 
			
		||||
					:table-props="tableProps"
 | 
			
		||||
@@ -290,7 +289,7 @@ export default {
 | 
			
		||||
 | 
			
		||||
.drawer >>> .visual-part {
 | 
			
		||||
	flex: 1 auto;
 | 
			
		||||
	max-height: 76vh;
 | 
			
		||||
	max-height: 16vh;
 | 
			
		||||
	overflow: hidden;
 | 
			
		||||
	overflow-y: scroll;
 | 
			
		||||
	padding-right: 10px; /* 调整滚动条样式 */
 | 
			
		||||
@@ -308,7 +307,7 @@ export default {
 | 
			
		||||
}
 | 
			
		||||
.action_btn {
 | 
			
		||||
  float: right;
 | 
			
		||||
  margin: 5px 15px;
 | 
			
		||||
  margin: -40px 15px;
 | 
			
		||||
  font-size: 14px;
 | 
			
		||||
}
 | 
			
		||||
.add {
 | 
			
		||||
 
 | 
			
		||||
@@ -54,7 +54,6 @@
 | 
			
		||||
</template>
 | 
			
		||||
 | 
			
		||||
<script>
 | 
			
		||||
import moment from 'moment';
 | 
			
		||||
import basicPageMixin from '@/mixins/lb/basicPageMixin';
 | 
			
		||||
import addOrUpdata from './add-or-updata.vue';
 | 
			
		||||
// import { publicFormatter } from '@/utils/dict';
 | 
			
		||||
@@ -101,9 +100,9 @@ export default {
 | 
			
		||||
				{ prop: 'lineName', label: '产线' },
 | 
			
		||||
				{ prop: 'sectionName', label: '工段' },
 | 
			
		||||
				{ prop: 'equipmentName', label: '设备' },
 | 
			
		||||
				{ prop: 'responsible', label: '负责人' },
 | 
			
		||||
				{ prop: 'equipmentCode', label: '描述' },
 | 
			
		||||
				{ prop: 'checkNumber', label: '巡检条数' } // TODO: 操作 选项,四个,群里询问
 | 
			
		||||
				{ prop: 'equipmentCode', label: '设备编码' },
 | 
			
		||||
				// { prop: 'responsible', label: '负责人' },
 | 
			
		||||
				{ prop: 'checkNumber', label: '巡检条数' }, // TODO: 操作 选项,四个,群里询问
 | 
			
		||||
			],
 | 
			
		||||
			searchBarFormConfig: [
 | 
			
		||||
				{
 | 
			
		||||
@@ -117,6 +116,7 @@ export default {
 | 
			
		||||
					label: '设备名称',
 | 
			
		||||
					placeholder: '请选择设备',
 | 
			
		||||
					param: 'equipmentId',
 | 
			
		||||
					filterable: true,
 | 
			
		||||
				},
 | 
			
		||||
				{
 | 
			
		||||
					type: 'button',
 | 
			
		||||
@@ -151,14 +151,18 @@ export default {
 | 
			
		||||
						input: true,
 | 
			
		||||
						label: '配置名称',
 | 
			
		||||
						prop: 'name',
 | 
			
		||||
						rules: [{ required: true, message: '配置名称不能为空', trigger: 'blur' }],
 | 
			
		||||
						rules: [
 | 
			
		||||
							{ required: true, message: '配置名称不能为空', trigger: 'blur' },
 | 
			
		||||
						],
 | 
			
		||||
					},
 | 
			
		||||
					{
 | 
			
		||||
						input: true,
 | 
			
		||||
						label: '配置编码',
 | 
			
		||||
						prop: 'code',
 | 
			
		||||
						url: '/base/equipment-check-config/getCode',
 | 
			
		||||
						rules: [{ required: true, message: '配置编码不能为空', trigger: 'blur' }],
 | 
			
		||||
						rules: [
 | 
			
		||||
							{ required: true, message: '配置编码不能为空', trigger: 'blur' },
 | 
			
		||||
						],
 | 
			
		||||
					},
 | 
			
		||||
				],
 | 
			
		||||
				[
 | 
			
		||||
@@ -167,7 +171,13 @@ export default {
 | 
			
		||||
						label: '设备名称',
 | 
			
		||||
						prop: 'equipmentId',
 | 
			
		||||
						url: '/base/core-equipment/listAll',
 | 
			
		||||
						rules: [{ required: true, message: '设备名称不能为空', trigger: 'blur' }],
 | 
			
		||||
						bind: {
 | 
			
		||||
							filterable: true,
 | 
			
		||||
							clearable: true,
 | 
			
		||||
						},
 | 
			
		||||
						rules: [
 | 
			
		||||
							{ required: true, message: '设备名称不能为空', trigger: 'change' },
 | 
			
		||||
						],
 | 
			
		||||
					},
 | 
			
		||||
					{
 | 
			
		||||
						input: true,
 | 
			
		||||
@@ -288,9 +298,9 @@ export default {
 | 
			
		||||
		handleDelete(row) {
 | 
			
		||||
			const id = row.id;
 | 
			
		||||
			this.$modal
 | 
			
		||||
				.confirm('是否确认删除记录"' + row.name + '"?')
 | 
			
		||||
				.then(function () {
 | 
			
		||||
					return this.delete({ id });
 | 
			
		||||
				.confirm('是否确认删除该巡检记录?')
 | 
			
		||||
				.then(() => {
 | 
			
		||||
					return this.del({ id });
 | 
			
		||||
				})
 | 
			
		||||
				.then(() => {
 | 
			
		||||
					this.getList();
 | 
			
		||||
@@ -317,14 +327,14 @@ export default {
 | 
			
		||||
		},
 | 
			
		||||
		handleDetail({ id }) {
 | 
			
		||||
			this.addOrUpdateVisible = true;
 | 
			
		||||
			this.addOrEditTitle = "详情";
 | 
			
		||||
			this.addOrEditTitle = '详情';
 | 
			
		||||
			this.$nextTick(() => {
 | 
			
		||||
				this.$refs.addOrUpdate.init(id, true);
 | 
			
		||||
			});
 | 
			
		||||
		},
 | 
			
		||||
		handleAddDetail({ id }) {
 | 
			
		||||
			this.addOrUpdateVisible = true;
 | 
			
		||||
			this.addOrEditTitle = "添加巡检";
 | 
			
		||||
			this.addOrEditTitle = '添加巡检';
 | 
			
		||||
			this.$nextTick(() => {
 | 
			
		||||
				this.$refs.addOrUpdate.init(id);
 | 
			
		||||
			});
 | 
			
		||||
 
 | 
			
		||||
@@ -52,6 +52,7 @@ import { publicFormatter } from '@/utils/dict';
 | 
			
		||||
import moment from 'moment';
 | 
			
		||||
import basicPageMixin from '@/mixins/lb/basicPageMixin';
 | 
			
		||||
import { exportMaintainMonitorExcel } from '@/api/equipment/base/maintain/record'
 | 
			
		||||
import { parseTime } from '@/utils/ruoyi'
 | 
			
		||||
 | 
			
		||||
const remainBox = {
 | 
			
		||||
	name: 'RemainBox',
 | 
			
		||||
@@ -99,7 +100,7 @@ const btn = {
 | 
			
		||||
	render: function (h) {
 | 
			
		||||
		return (
 | 
			
		||||
			<el-button type="text" onClick={this.handleClick}>
 | 
			
		||||
				{this.injectData.label}
 | 
			
		||||
				{this.injectData.name}
 | 
			
		||||
			</el-button>
 | 
			
		||||
		);
 | 
			
		||||
	},
 | 
			
		||||
@@ -113,16 +114,16 @@ export default {
 | 
			
		||||
		return {
 | 
			
		||||
			searchBarKeys: ['planId', 'equipmentId'],
 | 
			
		||||
			tableProps: [
 | 
			
		||||
				{
 | 
			
		||||
					prop: 'createTime',
 | 
			
		||||
					label: '添加时间',
 | 
			
		||||
					fixed: true,
 | 
			
		||||
					width: 180,
 | 
			
		||||
					filter: (val) => moment(val).format('yyyy-MM-DD HH:mm:ss'),
 | 
			
		||||
				},
 | 
			
		||||
				// {
 | 
			
		||||
				// 	prop: 'createTime',
 | 
			
		||||
				// 	label: '添加时间',
 | 
			
		||||
				// 	fixed: true,
 | 
			
		||||
				// 	width: 180,
 | 
			
		||||
				// 	filter: parseTime(createTime),
 | 
			
		||||
				// },
 | 
			
		||||
				{ prop: 'name', label: '保养计划' },
 | 
			
		||||
				{ prop: 'lineName', label: '产线' },
 | 
			
		||||
				{ prop: 'sectionName', label: '工段' },
 | 
			
		||||
				{ prop: 'lineName', label: '产线名' },
 | 
			
		||||
				{ prop: 'sectionName', label: '工段名' },
 | 
			
		||||
				{ prop: 'equipmentName', label: '设备名称' },
 | 
			
		||||
				{ prop: 'equipmentCode', label: '设备编码' },
 | 
			
		||||
				{ prop: 'maintenancePeriod', label: '保养频率' },
 | 
			
		||||
@@ -134,16 +135,16 @@ export default {
 | 
			
		||||
				{
 | 
			
		||||
					prop: 'lastMaintainTime',
 | 
			
		||||
					label: '上次保养时间',
 | 
			
		||||
					filter: (val) => moment(val).format('yyyy-MM-DD HH:mm:ss'),
 | 
			
		||||
					filter: parseTime,
 | 
			
		||||
				},
 | 
			
		||||
				{ prop: 'nextMaintainTime', label: '计划下次保养时间' },
 | 
			
		||||
				{ prop: 'nextMaintainTime', label: '计划下次保养时间', filter: parseTime },
 | 
			
		||||
				{
 | 
			
		||||
					prop: 'remainDays',
 | 
			
		||||
					label: '距离保养时间(天)',
 | 
			
		||||
					subcomponent: remainBox,
 | 
			
		||||
				},
 | 
			
		||||
				{ prop: 'opt1', label: '设备保养', subcomponent: btn },
 | 
			
		||||
				{ prop: 'opt2', label: '保养记录', subcomponent: btn },
 | 
			
		||||
				{ prop: 'opt1', label: '设备保养', name: '操作', subcomponent: btn },
 | 
			
		||||
				{ prop: 'opt2', label: '保养记录', name: '查看详情', subcomponent: btn },
 | 
			
		||||
			],
 | 
			
		||||
			searchBarFormConfig: [
 | 
			
		||||
				{
 | 
			
		||||
@@ -243,15 +244,16 @@ export default {
 | 
			
		||||
 			switch (action) {
 | 
			
		||||
				// 查看详情
 | 
			
		||||
				case '设备保养':
 | 
			
		||||
					this.$router.push({ path: '/equipment/base/maintain/plan-config',query: {
 | 
			
		||||
						equipmentId: value.equipmentId,
 | 
			
		||||
						equipmentName: value.equipmentName
 | 
			
		||||
					this.$router.push({ path: '/equipment/base/maintain/record',query: {
 | 
			
		||||
						addRecord: 1,
 | 
			
		||||
						row: value
 | 
			
		||||
					} })
 | 
			
		||||
					break;
 | 
			
		||||
				case '保养记录':
 | 
			
		||||
					const queryData = {
 | 
			
		||||
					equipmentId: value.equipmentId,
 | 
			
		||||
					maintainPlanId: value.id
 | 
			
		||||
					maintainPlanId: value.id,
 | 
			
		||||
					relatePlan: value.lastMaintainTime ? 1 : 2
 | 
			
		||||
				}
 | 
			
		||||
				this.$router.push({ path: '/equipment/base/maintain/record',query: queryData })
 | 
			
		||||
				break;
 | 
			
		||||
 
 | 
			
		||||
@@ -51,6 +51,7 @@
 | 
			
		||||
import moment from 'moment';
 | 
			
		||||
import basicPageMixin from '@/mixins/lb/basicPageMixin';
 | 
			
		||||
import { deleteEqMaintainPlan } from '@/api/equipment/base/maintain/record'
 | 
			
		||||
import { publicFormatter } from '@/utils/dict';
 | 
			
		||||
 | 
			
		||||
export default {
 | 
			
		||||
	name: 'PlanConfig',
 | 
			
		||||
@@ -95,7 +96,7 @@ export default {
 | 
			
		||||
				{ prop: 'equipmentName', label: '设备名称' },
 | 
			
		||||
				{ prop: 'maintainDuration', label: '计划保养用时(h)' },
 | 
			
		||||
				{ prop: 'maintenancePeriod', label: '保养频率(天/次)' },
 | 
			
		||||
				{ prop: 'maintainType', label: '保养类型' },
 | 
			
		||||
				{ prop: 'maintainType', label: '保养类型', filter: publicFormatter('maintain_type') },
 | 
			
		||||
				{ prop: 'remark', label: '备注' },
 | 
			
		||||
			],
 | 
			
		||||
			searchBarFormConfig: [
 | 
			
		||||
@@ -106,37 +107,37 @@ export default {
 | 
			
		||||
					param: 'equipmentName',
 | 
			
		||||
				},
 | 
			
		||||
				// 时间段
 | 
			
		||||
				{
 | 
			
		||||
					type: 'datePicker',
 | 
			
		||||
					label: '时间段',
 | 
			
		||||
					dateType: 'daterange', // datetimerange
 | 
			
		||||
					format: 'yyyy-MM-dd',
 | 
			
		||||
					valueFormat: 'yyyy-MM-dd HH:mm:ss',
 | 
			
		||||
					// valueFormat: 'timestamp',
 | 
			
		||||
					rangeSeparator: '-',
 | 
			
		||||
					startPlaceholder: '开始日期',
 | 
			
		||||
					endPlaceholder: '结束日期',
 | 
			
		||||
					defaultTime: ['00:00:00', '23:59:59'],
 | 
			
		||||
					param: 'createTime',
 | 
			
		||||
					// defaultSelect: [
 | 
			
		||||
					// 	new Date(y, m, d)
 | 
			
		||||
					// 		.toLocaleString()
 | 
			
		||||
					// 		.split('/')
 | 
			
		||||
					// 		.map((item, index) => {
 | 
			
		||||
					// 			if (index == 1 || index == 2) return item.padStart(2, '0');
 | 
			
		||||
					// 			return item;
 | 
			
		||||
					// 		})
 | 
			
		||||
					// 		.join('-'),
 | 
			
		||||
					// 	new Date(y, m, d, 23, 59, 59)
 | 
			
		||||
					// 		.toLocaleString()
 | 
			
		||||
					// 		.split('/')
 | 
			
		||||
					// 		.map((item, index) => {
 | 
			
		||||
					// 			if (index == 1 || index == 2) return item.padStart(2, '0');
 | 
			
		||||
					// 			return item;
 | 
			
		||||
					// 		})
 | 
			
		||||
					// 		.join('-'),
 | 
			
		||||
					// ],
 | 
			
		||||
				},
 | 
			
		||||
				// {
 | 
			
		||||
				// 	type: 'datePicker',
 | 
			
		||||
				// 	label: '时间段',
 | 
			
		||||
				// 	dateType: 'daterange', // datetimerange
 | 
			
		||||
				// 	format: 'yyyy-MM-dd',
 | 
			
		||||
				// 	valueFormat: 'yyyy-MM-dd HH:mm:ss',
 | 
			
		||||
				// 	// valueFormat: 'timestamp',
 | 
			
		||||
				// 	rangeSeparator: '-',
 | 
			
		||||
				// 	startPlaceholder: '开始日期',
 | 
			
		||||
				// 	endPlaceholder: '结束日期',
 | 
			
		||||
				// 	defaultTime: ['00:00:00', '23:59:59'],
 | 
			
		||||
				// 	param: 'createTime',
 | 
			
		||||
				// 	// defaultSelect: [
 | 
			
		||||
				// 	// 	new Date(y, m, d)
 | 
			
		||||
				// 	// 		.toLocaleString()
 | 
			
		||||
				// 	// 		.split('/')
 | 
			
		||||
				// 	// 		.map((item, index) => {
 | 
			
		||||
				// 	// 			if (index == 1 || index == 2) return item.padStart(2, '0');
 | 
			
		||||
				// 	// 			return item;
 | 
			
		||||
				// 	// 		})
 | 
			
		||||
				// 	// 		.join('-'),
 | 
			
		||||
				// 	// 	new Date(y, m, d, 23, 59, 59)
 | 
			
		||||
				// 	// 		.toLocaleString()
 | 
			
		||||
				// 	// 		.split('/')
 | 
			
		||||
				// 	// 		.map((item, index) => {
 | 
			
		||||
				// 	// 			if (index == 1 || index == 2) return item.padStart(2, '0');
 | 
			
		||||
				// 	// 			return item;
 | 
			
		||||
				// 	// 		})
 | 
			
		||||
				// 	// 		.join('-'),
 | 
			
		||||
				// 	// ],
 | 
			
		||||
				// },
 | 
			
		||||
				{
 | 
			
		||||
					type: 'button',
 | 
			
		||||
					btnName: '查询',
 | 
			
		||||
@@ -224,6 +225,17 @@ export default {
 | 
			
		||||
						rules: [{ required: true, message: '保养频率不能为空', trigger: 'blur' }],
 | 
			
		||||
					},
 | 
			
		||||
				],
 | 
			
		||||
				[
 | 
			
		||||
					{
 | 
			
		||||
						switch: true,
 | 
			
		||||
						label: '启用状态',
 | 
			
		||||
						prop: 'enabled',
 | 
			
		||||
						bind: {
 | 
			
		||||
							'active-value': 1,
 | 
			
		||||
							'inactive-value': 0,
 | 
			
		||||
						},
 | 
			
		||||
					}
 | 
			
		||||
				],
 | 
			
		||||
				[{ input: true, label: '备注', prop: 'remark' }],
 | 
			
		||||
			],
 | 
			
		||||
			// 是否显示弹出层
 | 
			
		||||
@@ -300,7 +312,8 @@ export default {
 | 
			
		||||
				const queryData = {
 | 
			
		||||
					equipmentId: row.equipmentId,
 | 
			
		||||
					maintainPlanId: row.id,
 | 
			
		||||
					relatePlan: row.enabled
 | 
			
		||||
					isAdd: 1
 | 
			
		||||
					// relatePlan: row.enabled
 | 
			
		||||
				}
 | 
			
		||||
				if (this.queryParams.createTime) {
 | 
			
		||||
					queryData.createTime = this.queryParams.createTime
 | 
			
		||||
 
 | 
			
		||||
@@ -45,6 +45,11 @@
 | 
			
		||||
				:disabled="mode == 'detail'"
 | 
			
		||||
				:has-files="true"
 | 
			
		||||
				:rows="rows" />
 | 
			
		||||
			<el-row v-if="mode === 'detail'" slot="footer" type="flex" justify="end">
 | 
			
		||||
				<el-col :span="12">
 | 
			
		||||
					<el-button size="small" class="btnTextStyle" @click="cancel">关闭</el-button>
 | 
			
		||||
				</el-col>
 | 
			
		||||
			</el-row>
 | 
			
		||||
		</base-dialog>
 | 
			
		||||
	</div>
 | 
			
		||||
</template>
 | 
			
		||||
@@ -53,7 +58,7 @@
 | 
			
		||||
import moment from 'moment';
 | 
			
		||||
import basicPageMixin from '@/mixins/lb/basicPageMixin';
 | 
			
		||||
import Editor from '@/components/Editor';
 | 
			
		||||
import { deleteEqMaintainLog } from '@/api/equipment/base/maintain/record';
 | 
			
		||||
import { deleteEqMaintainLog, exportMaintainLogExcel } from '@/api/equipment/base/maintain/record';
 | 
			
		||||
 | 
			
		||||
const timeFilter = (val) => moment(val).format('yyyy-MM-DD HH:mm:ss');
 | 
			
		||||
 | 
			
		||||
@@ -121,14 +126,14 @@ export default {
 | 
			
		||||
				},
 | 
			
		||||
				{
 | 
			
		||||
					type: 'select',
 | 
			
		||||
					label: '保养计划',
 | 
			
		||||
					placeholder: '请选择保养计划',
 | 
			
		||||
					label: '计划名称',
 | 
			
		||||
					placeholder: '请选择计划名称',
 | 
			
		||||
					param: 'maintainPlanId',
 | 
			
		||||
				},
 | 
			
		||||
				// 开始结束时间
 | 
			
		||||
				{
 | 
			
		||||
					type: 'datePicker',
 | 
			
		||||
					label: '时间段',
 | 
			
		||||
					label: '保养开始时间',
 | 
			
		||||
					dateType: 'daterange', // datetimerange
 | 
			
		||||
					format: 'yyyy-MM-dd',
 | 
			
		||||
					valueFormat: 'yyyy-MM-dd HH:mm:ss',
 | 
			
		||||
@@ -311,13 +316,16 @@ export default {
 | 
			
		||||
			this.searchBarFormConfig[0].defaultSelect =
 | 
			
		||||
				this.$route.query.equipmentId ?? undefined;
 | 
			
		||||
			this.searchBarFormConfig[1].defaultSelect =
 | 
			
		||||
				Number(this.$route.query.maintainPlanId) ?? undefined;
 | 
			
		||||
				this.$route.query.maintainPlanId ?? undefined;
 | 
			
		||||
			this.searchBarFormConfig[2].defaultSelect =
 | 
			
		||||
				this.$route.query?.createTime ?? undefined;
 | 
			
		||||
			this.searchBarFormConfig[3].defaultSelect =
 | 
			
		||||
				Number(this.$route.query.relatePlan) ?? undefined;
 | 
			
		||||
		}
 | 
			
		||||
		this.getList();
 | 
			
		||||
		if (this.$route.query.addRecord) {
 | 
			
		||||
			this.handleAdd()
 | 
			
		||||
		}
 | 
			
		||||
	},
 | 
			
		||||
	methods: {
 | 
			
		||||
		initSearchBar() {
 | 
			
		||||
@@ -398,6 +406,19 @@ export default {
 | 
			
		||||
		/** 新增按钮操作 */
 | 
			
		||||
		handleAdd() {
 | 
			
		||||
			this.reset();
 | 
			
		||||
			if (this.$route.query.addRecord) {
 | 
			
		||||
				// 赋值
 | 
			
		||||
				const tempRow = this.$route.query.row
 | 
			
		||||
				this.form.equipmentId	= tempRow.equipmentId
 | 
			
		||||
				this.form.relatePlan = tempRow.nextMaintainTime ? 1 : 2
 | 
			
		||||
				this.form.startTime = tempRow.nextMaintainTime
 | 
			
		||||
				this.form.maintainPlanId	= tempRow.id
 | 
			
		||||
			}
 | 
			
		||||
			if (this.$route.query.isAdd) {
 | 
			
		||||
				// 赋值
 | 
			
		||||
				this.form.equipmentId	= this.$route.query.equipmentId
 | 
			
		||||
				this.form.maintainPlanId	= this.$route.query.maintainPlanId
 | 
			
		||||
			}
 | 
			
		||||
			this.open = true;
 | 
			
		||||
			this.title = '添加保养记录';
 | 
			
		||||
		},
 | 
			
		||||
@@ -440,7 +461,7 @@ export default {
 | 
			
		||||
		handleDelete(row) {
 | 
			
		||||
			const id = row.id;
 | 
			
		||||
			this.$modal
 | 
			
		||||
				.confirm('是否删除设备名称为"' + row.equipmentName + '"的数据项?')
 | 
			
		||||
				.confirm('是否确认删除设备名称为"' + row.equipmentName + '"的数据项?')
 | 
			
		||||
				.then(function () {
 | 
			
		||||
					return deleteEqMaintainLog(id);
 | 
			
		||||
				})
 | 
			
		||||
@@ -456,7 +477,7 @@ export default {
 | 
			
		||||
			this.info({ id }).then((response) => {
 | 
			
		||||
				this.form = response.data;
 | 
			
		||||
				this.open = true;
 | 
			
		||||
				this.title = '修改保养记录';
 | 
			
		||||
				this.title = '查看保养记录详情';
 | 
			
		||||
			});
 | 
			
		||||
		},
 | 
			
		||||
		/** 导出按钮操作 */
 | 
			
		||||
@@ -469,10 +490,10 @@ export default {
 | 
			
		||||
				.confirm('是否确认导出所有保养记录?')
 | 
			
		||||
				.then(() => {
 | 
			
		||||
					this.exportLoading = true;
 | 
			
		||||
					return exportEquipmentTypeExcel(params);
 | 
			
		||||
					return exportMaintainLogExcel(params);
 | 
			
		||||
				})
 | 
			
		||||
				.then((response) => {
 | 
			
		||||
					this.$download.excel(response, '保养记录.xls');
 | 
			
		||||
					this.$download.excel(response, '设备保养记录.xls');
 | 
			
		||||
					this.exportLoading = false;
 | 
			
		||||
				})
 | 
			
		||||
				.catch(() => {});
 | 
			
		||||
 
 | 
			
		||||
@@ -41,12 +41,12 @@
 | 
			
		||||
			<el-row :gutter="20">
 | 
			
		||||
				<el-col :span="8">
 | 
			
		||||
					<el-form-item label="故障发生时间" prop="faultTime">
 | 
			
		||||
						<span>{{ dataForm.faultTime }}</span>
 | 
			
		||||
						<span>{{ parseTime(dataForm.faultTime) }}</span>
 | 
			
		||||
					</el-form-item>
 | 
			
		||||
				</el-col>
 | 
			
		||||
				<el-col :span="8">
 | 
			
		||||
					<el-form-item label="故障级别" prop="faultLevel">
 | 
			
		||||
						<span>{{ dataForm.faultLevel }}</span>
 | 
			
		||||
						<span>{{ getDictDataLabel('fault-level', dataForm.faultLevel) }}</span>
 | 
			
		||||
					</el-form-item>
 | 
			
		||||
				</el-col>
 | 
			
		||||
				<el-col :span="8">
 | 
			
		||||
@@ -164,11 +164,11 @@
 | 
			
		||||
		</el-form>
 | 
			
		||||
 | 
			
		||||
		<div class="drawer-body__footer">
 | 
			
		||||
			<el-button style="" @click="goback()">取消</el-button>
 | 
			
		||||
			<el-button v-if="disabled" type="primary" @click="goEdit()">
 | 
			
		||||
			<el-button style="" @click="goback()">{{ disabled ? '返回' : '取消' }}</el-button>
 | 
			
		||||
			<!-- <el-button v-if="disabled" type="primary" @click="goEdit()">
 | 
			
		||||
				编辑
 | 
			
		||||
			</el-button>
 | 
			
		||||
			<el-button v-else type="primary" @click="dataFormSubmit()">确定</el-button>
 | 
			
		||||
			</el-button> -->
 | 
			
		||||
			<el-button v-if="!disabled" type="primary" @click="dataFormSubmit()">确定</el-button>
 | 
			
		||||
		</div>
 | 
			
		||||
	</el-drawer>
 | 
			
		||||
</template>
 | 
			
		||||
@@ -179,6 +179,8 @@ import { getEqRepair, updateEqRepair } from '@/api/equipment/base/repair'
 | 
			
		||||
import Editor from "@/components/Editor";
 | 
			
		||||
import FileUpload from "@/components/FileUpload";
 | 
			
		||||
import { getDictDatas } from "@/utils/dict";
 | 
			
		||||
import { parseTime } from '@/utils/ruoyi'
 | 
			
		||||
import { getDictDataLabel } from '@/utils/dict';
 | 
			
		||||
 | 
			
		||||
export default {
 | 
			
		||||
	name: 'DialogForm',
 | 
			
		||||
 
 | 
			
		||||
@@ -53,12 +53,12 @@
 | 
			
		||||
</template>
 | 
			
		||||
 | 
			
		||||
<script>
 | 
			
		||||
import moment from 'moment';
 | 
			
		||||
// import moment from 'moment';
 | 
			
		||||
import basicPageMixin from '@/mixins/lb/basicPageMixin';
 | 
			
		||||
import CustomDialogForm from './CustomDialogForm.vue';
 | 
			
		||||
import { deleteRepair } from '@/api/equipment/base/repair'
 | 
			
		||||
 | 
			
		||||
const timeFilter = (val) => moment(val).format('yyyy-MM-DD HH:mm:ss');
 | 
			
		||||
import { deleteRepair, exportRepairLogExcel } from '@/api/equipment/base/repair'
 | 
			
		||||
import { parseTime } from '@/utils/ruoyi'
 | 
			
		||||
// const timeFilter = (val) => moment(val).format('yyyy-MM-DD HH:mm:ss');
 | 
			
		||||
 | 
			
		||||
export default {
 | 
			
		||||
	name: 'EquipmentRepair',
 | 
			
		||||
@@ -100,14 +100,14 @@ export default {
 | 
			
		||||
					label: '添加时间',
 | 
			
		||||
					fixed: true,
 | 
			
		||||
					width: 180,
 | 
			
		||||
					filter: timeFilter,
 | 
			
		||||
					filter: parseTime,
 | 
			
		||||
				},
 | 
			
		||||
				{ prop: 'repairOrderNumber', label: '设备维修单号' },
 | 
			
		||||
				{ prop: 'maintenanceStartTime', label: '开始时间', filter: timeFilter },
 | 
			
		||||
				{ prop: 'maintenanceStartTime', label: '开始时间', filter: parseTime },
 | 
			
		||||
				{
 | 
			
		||||
					prop: 'maintenanceFinishTime',
 | 
			
		||||
					label: '结束时间',
 | 
			
		||||
					filter: timeFilter,
 | 
			
		||||
					filter: parseTime,
 | 
			
		||||
				},
 | 
			
		||||
				{
 | 
			
		||||
					prop: 'maintenanceStatus',
 | 
			
		||||
@@ -129,6 +129,7 @@ export default {
 | 
			
		||||
					label: '设备',
 | 
			
		||||
					placeholder: '请选择设备',
 | 
			
		||||
					param: 'equipmentId',
 | 
			
		||||
					filterable: true,
 | 
			
		||||
				},
 | 
			
		||||
				{
 | 
			
		||||
					type: 'select',
 | 
			
		||||
@@ -417,10 +418,10 @@ export default {
 | 
			
		||||
				.confirm('是否确认导出所有维修记录?')
 | 
			
		||||
				.then(() => {
 | 
			
		||||
					this.exportLoading = true;
 | 
			
		||||
					return exportEquipmentTypeExcel(params);
 | 
			
		||||
					return exportRepairLogExcel(params);
 | 
			
		||||
				})
 | 
			
		||||
				.then((response) => {
 | 
			
		||||
					this.$download.excel(response, '维修记录.xls');
 | 
			
		||||
					this.$download.excel(response, '设备维修.xls');
 | 
			
		||||
					this.exportLoading = false;
 | 
			
		||||
				})
 | 
			
		||||
				.catch(() => {});
 | 
			
		||||
 
 | 
			
		||||
@@ -75,9 +75,6 @@
 | 
			
		||||
 | 
			
		||||
		<div class="drawer-body__footer">
 | 
			
		||||
			<el-button type="primary" @click="goback()">关闭</el-button>
 | 
			
		||||
			<el-button v-if="disabled" type="primary" @click="goEdit()">
 | 
			
		||||
				编辑
 | 
			
		||||
			</el-button>
 | 
			
		||||
		</div>
 | 
			
		||||
 | 
			
		||||
		<attr-add
 | 
			
		||||
 
 | 
			
		||||
@@ -35,7 +35,7 @@
 | 
			
		||||
		</el-form>
 | 
			
		||||
 | 
			
		||||
		<el-row style="text-align: right">
 | 
			
		||||
			<el-button @click="visible = false">取消</el-button>
 | 
			
		||||
			<el-button @click="cancel">取消</el-button>
 | 
			
		||||
			<el-button type="primary" @click="dataFormSubmit()">确定</el-button>
 | 
			
		||||
		</el-row>
 | 
			
		||||
	</el-dialog>
 | 
			
		||||
@@ -79,21 +79,13 @@ export default {
 | 
			
		||||
				this.partList = res.data.list;
 | 
			
		||||
			})
 | 
			
		||||
		},
 | 
			
		||||
		cancel() {
 | 
			
		||||
			this.$refs['dataForm'].resetFields()
 | 
			
		||||
			this.visible = false
 | 
			
		||||
		},
 | 
			
		||||
		init(id) {
 | 
			
		||||
			this.dataForm.id = id || '';
 | 
			
		||||
			// this.dataForm.id = id || '';
 | 
			
		||||
			this.visible = true;
 | 
			
		||||
			// this.$nextTick(() => {
 | 
			
		||||
			// 	this.$refs['dataForm'].resetFields();
 | 
			
		||||
			// 	if (this.dataForm.id) {
 | 
			
		||||
			// 		getCoreProductAttr({
 | 
			
		||||
			// 			id: this.dataForm.id
 | 
			
		||||
			// 		}).then((res) => {
 | 
			
		||||
			// 			const { name, value } = res.data;
 | 
			
		||||
			// 			this.dataForm.name = name;
 | 
			
		||||
			// 			this.dataForm.value = value;
 | 
			
		||||
			// 		});
 | 
			
		||||
			// 	}
 | 
			
		||||
			// });
 | 
			
		||||
		},
 | 
			
		||||
		// 表单提交
 | 
			
		||||
		dataFormSubmit() {
 | 
			
		||||
@@ -117,6 +109,7 @@ export default {
 | 
			
		||||
						configId: this.configId,
 | 
			
		||||
					}).then((response) => {
 | 
			
		||||
						this.$modal.msgSuccess('新增成功');
 | 
			
		||||
						this.$refs['dataForm'].resetFields()
 | 
			
		||||
						this.visible = false;
 | 
			
		||||
						this.$emit('refreshDataList');
 | 
			
		||||
					});
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										36
									
								
								src/views/equipment/base/spareParts/Config/htmls.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										36
									
								
								src/views/equipment/base/spareParts/Config/htmls.vue
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,36 @@
 | 
			
		||||
<!--
 | 
			
		||||
 * @Author: zhp
 | 
			
		||||
 * @Date: 2023-11-08 14:00:52
 | 
			
		||||
 * @LastEditTime: 2023-11-24 09:12:36
 | 
			
		||||
 * @LastEditors: DY
 | 
			
		||||
 * @Description:
 | 
			
		||||
-->
 | 
			
		||||
<template>
 | 
			
		||||
  <div v-html="content" />
 | 
			
		||||
</template>
 | 
			
		||||
 | 
			
		||||
<script>
 | 
			
		||||
export default {
 | 
			
		||||
  props: {
 | 
			
		||||
    injectData: {
 | 
			
		||||
      type: Object,
 | 
			
		||||
      default: () => ({})
 | 
			
		||||
    }
 | 
			
		||||
  },
 | 
			
		||||
  data() {
 | 
			
		||||
    return {
 | 
			
		||||
      content: ''
 | 
			
		||||
    }
 | 
			
		||||
  },
 | 
			
		||||
  mounted() {
 | 
			
		||||
    this.getContent()
 | 
			
		||||
    console.log('12', this.injectData)
 | 
			
		||||
  },
 | 
			
		||||
 | 
			
		||||
  methods: {
 | 
			
		||||
    getContent() {
 | 
			
		||||
      this.content = this.injectData.description ?? ''
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
</script>
 | 
			
		||||
@@ -60,8 +60,9 @@ import { publicFormatter } from '@/utils/dict';
 | 
			
		||||
import Editor from '@/components/Editor';
 | 
			
		||||
import addSparts from './addSparts.vue';
 | 
			
		||||
import { deleteConfig } from '@/api/equipment/base/spare-parts/config'
 | 
			
		||||
import htmls from './htmls.vue'
 | 
			
		||||
 | 
			
		||||
const timeFilter = (val) => moment(val).format('yyyy-MM-DD HH:mm:ss');
 | 
			
		||||
// const timeFilter = (val) => moment(val).format('yyyy-MM-DD HH:mm:ss');
 | 
			
		||||
 | 
			
		||||
export default {
 | 
			
		||||
	name: 'EquipmentSparePartsConfig',
 | 
			
		||||
@@ -111,7 +112,7 @@ export default {
 | 
			
		||||
				{ prop: 'equipmentCode', label: '设备编码' },
 | 
			
		||||
				{ prop: 'responsible', label: '负责人' },
 | 
			
		||||
				// { prop: 'unit', label: '单位', filter: publicFormatter('unit_dict') },
 | 
			
		||||
				{ prop: 'description', label: '描述' },
 | 
			
		||||
				{ prop: 'description', label: '描述', subcomponent: htmls },
 | 
			
		||||
				{ prop: 'sparePartNumber', label: '备品备件数量' },
 | 
			
		||||
				// { prop: 'remark', label: '备注' },
 | 
			
		||||
			],
 | 
			
		||||
 
 | 
			
		||||
@@ -52,7 +52,7 @@
 | 
			
		||||
import moment from 'moment';
 | 
			
		||||
import basicPageMixin from '@/mixins/lb/basicPageMixin';
 | 
			
		||||
import { publicFormatter } from '@/utils/dict';
 | 
			
		||||
import { deleteSparePart } from '@/api/equipment/base/spare-parts/list'
 | 
			
		||||
import { deleteSparePart } from '@/api/equipment/base/spare-parts/list';
 | 
			
		||||
 | 
			
		||||
const timeFilter = (val) => moment(val).format('yyyy-MM-DD HH:mm:ss');
 | 
			
		||||
 | 
			
		||||
@@ -95,7 +95,7 @@ export default {
 | 
			
		||||
			searchBarFormConfig: [
 | 
			
		||||
				{
 | 
			
		||||
					type: 'input',
 | 
			
		||||
					label: '关键字',
 | 
			
		||||
					label: '备件名称',
 | 
			
		||||
					placeholder: '请输入备件名称',
 | 
			
		||||
					param: 'name',
 | 
			
		||||
				},
 | 
			
		||||
@@ -132,20 +132,33 @@ export default {
 | 
			
		||||
						input: true,
 | 
			
		||||
						label: '备件名称',
 | 
			
		||||
						prop: 'name',
 | 
			
		||||
						rules: [{ required: true, message: '备件名称不能为空', trigger: 'blur' }],
 | 
			
		||||
						rules: [
 | 
			
		||||
							{ required: true, message: '备件名称不能为空', trigger: 'blur' },
 | 
			
		||||
						],
 | 
			
		||||
					},
 | 
			
		||||
					{
 | 
			
		||||
						input: true,
 | 
			
		||||
						label: '备件型号',
 | 
			
		||||
						prop: 'model',
 | 
			
		||||
						label: '备件编码',
 | 
			
		||||
						prop: 'code',
 | 
			
		||||
						url: '/base/equipment-spare-part/getCode',
 | 
			
		||||
						rules: [
 | 
			
		||||
							{ required: true, message: '备件编码不能为空', trigger: 'blur' },
 | 
			
		||||
						],
 | 
			
		||||
					},
 | 
			
		||||
				],
 | 
			
		||||
				[
 | 
			
		||||
					{
 | 
			
		||||
						input: true,
 | 
			
		||||
						label: '备件型号',
 | 
			
		||||
						prop: 'model',
 | 
			
		||||
					},
 | 
			
		||||
					{
 | 
			
		||||
						input: true,
 | 
			
		||||
						label: '规格',
 | 
			
		||||
						prop: 'specifications',
 | 
			
		||||
					},
 | 
			
		||||
				],
 | 
			
		||||
				[
 | 
			
		||||
					{
 | 
			
		||||
						select: true,
 | 
			
		||||
						label: '供应商',
 | 
			
		||||
@@ -155,10 +168,10 @@ export default {
 | 
			
		||||
							filterable: true,
 | 
			
		||||
							clearable: true,
 | 
			
		||||
						},
 | 
			
		||||
						rules: [{ required: true, message: '供应商不能为空', trigger: 'blur' }],
 | 
			
		||||
						rules: [
 | 
			
		||||
							{ required: true, message: '供应商不能为空', trigger: 'blur' },
 | 
			
		||||
						],
 | 
			
		||||
					},
 | 
			
		||||
				],
 | 
			
		||||
				[
 | 
			
		||||
					{
 | 
			
		||||
						select: true,
 | 
			
		||||
						label: '物料类型',
 | 
			
		||||
@@ -169,8 +182,12 @@ export default {
 | 
			
		||||
							filterable: true,
 | 
			
		||||
							clearable: true,
 | 
			
		||||
						},
 | 
			
		||||
						rules: [{ required: true, message: '物料类型不能为空', trigger: 'blur' }],
 | 
			
		||||
						rules: [
 | 
			
		||||
							{ required: true, message: '物料类型不能为空', trigger: 'blur' },
 | 
			
		||||
						],
 | 
			
		||||
					},
 | 
			
		||||
				],
 | 
			
		||||
				[
 | 
			
		||||
					{
 | 
			
		||||
						input: true,
 | 
			
		||||
						label: '使用寿命',
 | 
			
		||||
@@ -184,14 +201,14 @@ export default {
 | 
			
		||||
							},
 | 
			
		||||
						],
 | 
			
		||||
					},
 | 
			
		||||
				],
 | 
			
		||||
				[
 | 
			
		||||
					{
 | 
			
		||||
						select: true,
 | 
			
		||||
						label: '单位',
 | 
			
		||||
						prop: 'unit', // 数据字典
 | 
			
		||||
						options: this.getDictDatas(this.DICT_TYPE.UNIT_DICT),
 | 
			
		||||
					},
 | 
			
		||||
				],
 | 
			
		||||
				[
 | 
			
		||||
					{
 | 
			
		||||
						input: true,
 | 
			
		||||
						label: '备注',
 | 
			
		||||
@@ -284,6 +301,12 @@ export default {
 | 
			
		||||
			const id = row.id;
 | 
			
		||||
			this.info({ id }).then((response) => {
 | 
			
		||||
				this.form = response.data;
 | 
			
		||||
				if (this.form.unit !== undefined) {
 | 
			
		||||
					this.form.unit = String(this.form.unit)
 | 
			
		||||
				}
 | 
			
		||||
				if (this.form.type !== undefined) {
 | 
			
		||||
					this.form.type = String(this.form.type)
 | 
			
		||||
				}
 | 
			
		||||
				this.open = true;
 | 
			
		||||
				this.title = '修改备品备件';
 | 
			
		||||
			});
 | 
			
		||||
 
 | 
			
		||||
@@ -310,7 +310,8 @@ export default {
 | 
			
		||||
		handleClick(raw) {
 | 
			
		||||
			if (raw.type === 'change') {
 | 
			
		||||
				// 更换
 | 
			
		||||
				this.addNew();
 | 
			
		||||
				console.log(raw)
 | 
			
		||||
				this.addNew(raw.data.sparePartId);
 | 
			
		||||
			} else {}
 | 
			
		||||
		},
 | 
			
		||||
		getList() {
 | 
			
		||||
@@ -320,7 +321,7 @@ export default {
 | 
			
		||||
				configId: this.dataForm.id,
 | 
			
		||||
			}).then((response) => {
 | 
			
		||||
				this.list = response.data;
 | 
			
		||||
				this.listQuery.total = response.data.total;
 | 
			
		||||
				this.listQuery.total = response.data.length;
 | 
			
		||||
			});
 | 
			
		||||
		},
 | 
			
		||||
		getList1() {
 | 
			
		||||
@@ -334,10 +335,10 @@ export default {
 | 
			
		||||
			});
 | 
			
		||||
		},
 | 
			
		||||
		// 新增 / 修改
 | 
			
		||||
		addNew(id) {
 | 
			
		||||
		addNew(sparePartId) {
 | 
			
		||||
			this.addOrUpdateVisible = true;
 | 
			
		||||
			this.$nextTick(() => {
 | 
			
		||||
				this.$refs.addOrUpdate.init(id);
 | 
			
		||||
				this.$refs.addOrUpdate.init(sparePartId);
 | 
			
		||||
			});
 | 
			
		||||
		},
 | 
			
		||||
		/** 导出按钮操作 */
 | 
			
		||||
 
 | 
			
		||||
@@ -25,10 +25,27 @@
 | 
			
		||||
					clearable
 | 
			
		||||
					placeholder="请输入操作人" />
 | 
			
		||||
			</el-form-item>
 | 
			
		||||
			<el-form-item label="更换耗时(min)" prop="timeUsed">
 | 
			
		||||
				<el-input-number
 | 
			
		||||
					v-model="dataForm.timeUsed"
 | 
			
		||||
					controls-position="right"
 | 
			
		||||
					clearable
 | 
			
		||||
					placeholder="请输入更换耗时"
 | 
			
		||||
					style="width: 100%" />
 | 
			
		||||
			</el-form-item>
 | 
			
		||||
			<el-form-item label="更换时间" prop="replacementTime">
 | 
			
		||||
				<el-date-picker
 | 
			
		||||
					v-model="dataForm.replacementTime"
 | 
			
		||||
					type="date"
 | 
			
		||||
					format='yyyy-MM-dd'
 | 
			
		||||
					value-format='timestamp'
 | 
			
		||||
					placeholder="选择入更换时间"
 | 
			
		||||
					style="width: 100%" />
 | 
			
		||||
			</el-form-item>
 | 
			
		||||
		</el-form>
 | 
			
		||||
 | 
			
		||||
		<el-row style="text-align: right">
 | 
			
		||||
			<el-button @click="visible = false">取消</el-button>
 | 
			
		||||
			<el-button @click="cancel">取消</el-button>
 | 
			
		||||
			<el-button type="primary" @click="dataFormSubmit()">确定</el-button>
 | 
			
		||||
		</el-row>
 | 
			
		||||
	</el-dialog>
 | 
			
		||||
@@ -49,11 +66,15 @@ export default {
 | 
			
		||||
			visible: false,
 | 
			
		||||
			dataForm: {
 | 
			
		||||
				id: undefined,
 | 
			
		||||
				responsible: ''
 | 
			
		||||
				responsible: '',
 | 
			
		||||
				timeUsed: 0,
 | 
			
		||||
				sparePartId: '',
 | 
			
		||||
				replacementTime: undefined
 | 
			
		||||
			},
 | 
			
		||||
			partList: [],
 | 
			
		||||
			dataRule: {
 | 
			
		||||
				responsible: [{ required: true, message: '操作人不能为空', trigger: 'blur' }]
 | 
			
		||||
				responsible: [{ required: true, message: '操作人不能为空', trigger: 'blur' }],
 | 
			
		||||
				replacementTime: [{ required: true, message: '更换时间不能为空', trigger: 'blur' }]
 | 
			
		||||
			},
 | 
			
		||||
		};
 | 
			
		||||
	},
 | 
			
		||||
@@ -66,9 +87,13 @@ export default {
 | 
			
		||||
		// 	this.partList = res.data
 | 
			
		||||
		// },
 | 
			
		||||
		init(id) {
 | 
			
		||||
			this.dataForm.id = id || '';
 | 
			
		||||
			this.dataForm.sparePartId = id || undefined;
 | 
			
		||||
			this.visible = true;
 | 
			
		||||
		},
 | 
			
		||||
		cancel() {
 | 
			
		||||
			this.$refs['dataForm'].resetFields();
 | 
			
		||||
			this.visible = false;
 | 
			
		||||
		},
 | 
			
		||||
		// 表单提交
 | 
			
		||||
		dataFormSubmit() {
 | 
			
		||||
			this.$refs['dataForm'].validate((valid) => {
 | 
			
		||||
@@ -91,6 +116,7 @@ export default {
 | 
			
		||||
						configId: this.configId,
 | 
			
		||||
					}).then((response) => {
 | 
			
		||||
						this.$modal.msgSuccess('新增成功');
 | 
			
		||||
						this.$refs['dataForm'].resetFields();
 | 
			
		||||
						this.visible = false;
 | 
			
		||||
						this.$emit('refreshDataList');
 | 
			
		||||
					});
 | 
			
		||||
 
 | 
			
		||||
@@ -72,10 +72,10 @@ const remainBox = {
 | 
			
		||||
	},
 | 
			
		||||
	computed: {
 | 
			
		||||
		value() {
 | 
			
		||||
			const temp = this.injectData[this.injectData.prop] || null
 | 
			
		||||
			const temp = this.injectData[this.injectData.prop] || null;
 | 
			
		||||
			if (temp) {
 | 
			
		||||
				console.log('12', temp)
 | 
			
		||||
				return temp === 'Green' ? 'green' : 'red'
 | 
			
		||||
				console.log('12', temp);
 | 
			
		||||
				return temp === 'Green' ? 'green' : 'red';
 | 
			
		||||
			}
 | 
			
		||||
			return this.injectData[this.injectData.prop] || null;
 | 
			
		||||
		},
 | 
			
		||||
@@ -83,7 +83,7 @@ const remainBox = {
 | 
			
		||||
			if (this.value) {
 | 
			
		||||
				// const v = +this.value;
 | 
			
		||||
				// return v < 0 ? 'red' : v >= 0 && v < 2 ? 'yellow' : 'green';
 | 
			
		||||
				return this.value
 | 
			
		||||
				return this.value;
 | 
			
		||||
			}
 | 
			
		||||
			return 'unset';
 | 
			
		||||
		},
 | 
			
		||||
@@ -95,8 +95,7 @@ const remainBox = {
 | 
			
		||||
					this.color
 | 
			
		||||
					// this.color == 'Green' ? 'green' : this.color == 'Red' ? 'red' : 'yellow'
 | 
			
		||||
				}; position:absolute; inset: 0; padding: 0 10px; display: flex; align-items: center; color: ${
 | 
			
		||||
					'unset'
 | 
			
		||||
					// this.color == 'red' ? '#fff' : 'unset'
 | 
			
		||||
					this.color == 'red' || this.color == 'green' ? '#fff' : 'unset'
 | 
			
		||||
				}`}>
 | 
			
		||||
				{this.injectData[this.injectData.prop] || ''}
 | 
			
		||||
			</div>
 | 
			
		||||
@@ -112,7 +111,10 @@ const btn = {
 | 
			
		||||
	},
 | 
			
		||||
	methods: {
 | 
			
		||||
		handleClick() {
 | 
			
		||||
			this.$emit('emitData', { action: this.injectData.name, value: this.injectData });
 | 
			
		||||
			this.$emit('emitData', {
 | 
			
		||||
				action: this.injectData.name,
 | 
			
		||||
				value: this.injectData,
 | 
			
		||||
			});
 | 
			
		||||
		},
 | 
			
		||||
	},
 | 
			
		||||
	render: function (h) {
 | 
			
		||||
@@ -124,8 +126,6 @@ const btn = {
 | 
			
		||||
	},
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
export default {
 | 
			
		||||
	name: 'EquipmentSparePartsMonitor',
 | 
			
		||||
	components: { addSparts },
 | 
			
		||||
@@ -162,7 +162,12 @@ export default {
 | 
			
		||||
				{ prop: 'responsible', label: '负责人' },
 | 
			
		||||
				{ prop: 'color', label: '是否超期', subcomponent: remainBox },
 | 
			
		||||
				{ prop: 'opt1', label: '备件更换', name: '操作', subcomponent: btn },
 | 
			
		||||
				{ prop: 'opt2', label: '更换记录', name: '更新记录', subcomponent: btn },  // TODO: 是否换成按钮, 群里问
 | 
			
		||||
				{
 | 
			
		||||
					prop: 'opt2',
 | 
			
		||||
					label: '更换记录',
 | 
			
		||||
					name: '更新记录',
 | 
			
		||||
					subcomponent: btn,
 | 
			
		||||
				}, // TODO: 是否换成按钮, 群里问
 | 
			
		||||
				// { prop: 'remark', label: '备注' },
 | 
			
		||||
			],
 | 
			
		||||
			searchBarFormConfig: [
 | 
			
		||||
@@ -171,12 +176,14 @@ export default {
 | 
			
		||||
					label: '产线',
 | 
			
		||||
					placeholder: '请选择产线',
 | 
			
		||||
					param: 'lineId',
 | 
			
		||||
					filterable: true,
 | 
			
		||||
				},
 | 
			
		||||
				{
 | 
			
		||||
					type: 'select',
 | 
			
		||||
					label: '设备',
 | 
			
		||||
					placeholder: '请选择设备',
 | 
			
		||||
					param: 'equipmentId',
 | 
			
		||||
					filterable: true,
 | 
			
		||||
				},
 | 
			
		||||
				{
 | 
			
		||||
					type: 'button',
 | 
			
		||||
@@ -211,7 +218,9 @@ export default {
 | 
			
		||||
						input: true,
 | 
			
		||||
						label: '配置名称',
 | 
			
		||||
						prop: 'name',
 | 
			
		||||
						rules: [{ required: true, message: '配置名称不能为空', trigger: 'blur' }],
 | 
			
		||||
						rules: [
 | 
			
		||||
							{ required: true, message: '配置名称不能为空', trigger: 'blur' },
 | 
			
		||||
						],
 | 
			
		||||
					},
 | 
			
		||||
				],
 | 
			
		||||
				[
 | 
			
		||||
@@ -224,7 +233,9 @@ export default {
 | 
			
		||||
							filterable: true,
 | 
			
		||||
							clearable: true,
 | 
			
		||||
						},
 | 
			
		||||
						rules: [{ required: true, message: '设备名称不能为空', trigger: 'blur' }],
 | 
			
		||||
						rules: [
 | 
			
		||||
							{ required: true, message: '设备名称不能为空', trigger: 'blur' },
 | 
			
		||||
						],
 | 
			
		||||
					},
 | 
			
		||||
				],
 | 
			
		||||
				[
 | 
			
		||||
@@ -281,29 +292,29 @@ export default {
 | 
			
		||||
			}
 | 
			
		||||
		},
 | 
			
		||||
		eqOperation({ id }) {
 | 
			
		||||
			this.addOrUpdateVisible = true
 | 
			
		||||
			this.addOrUpdateVisible = true;
 | 
			
		||||
			this.$nextTick(() => {
 | 
			
		||||
				this.$refs.addOrUpdate.init(id);
 | 
			
		||||
			});
 | 
			
		||||
		},
 | 
			
		||||
		updateLog({ id }) {
 | 
			
		||||
			this.addOrUpdateVisible = true
 | 
			
		||||
			this.addOrUpdateVisible = true;
 | 
			
		||||
			this.$nextTick(() => {
 | 
			
		||||
				this.$refs.addOrUpdate.init(id, true);
 | 
			
		||||
			});
 | 
			
		||||
		},
 | 
			
		||||
		initSearchBar() {
 | 
			
		||||
			// 产线列表
 | 
			
		||||
			getCorePLList().then(res => {
 | 
			
		||||
			getCorePLList().then((res) => {
 | 
			
		||||
				this.$set(
 | 
			
		||||
					this.searchBarFormConfig[0],
 | 
			
		||||
					'selectOptions',
 | 
			
		||||
					res.data.map((item) => ({
 | 
			
		||||
						name: item.name,
 | 
			
		||||
						id: item.id
 | 
			
		||||
						id: item.id,
 | 
			
		||||
					}))
 | 
			
		||||
				);
 | 
			
		||||
			})
 | 
			
		||||
			});
 | 
			
		||||
			this.http('/base/core-equipment/listAll', 'get').then(({ data }) => {
 | 
			
		||||
				this.$set(
 | 
			
		||||
					this.searchBarFormConfig[1],
 | 
			
		||||
@@ -319,7 +330,11 @@ export default {
 | 
			
		||||
		getList() {
 | 
			
		||||
			this.loading = true;
 | 
			
		||||
			// 执行查询
 | 
			
		||||
			this.http('/base/equipment-spare-part-config/monitor', 'get', this.queryParams).then((response) => {
 | 
			
		||||
			this.http(
 | 
			
		||||
				'/base/equipment-spare-part-config/monitor',
 | 
			
		||||
				'get',
 | 
			
		||||
				this.queryParams
 | 
			
		||||
			).then((response) => {
 | 
			
		||||
				this.list = response.data.list;
 | 
			
		||||
				this.total = response.data.total;
 | 
			
		||||
				this.loading = false;
 | 
			
		||||
@@ -338,7 +353,7 @@ export default {
 | 
			
		||||
				name: null,
 | 
			
		||||
				equipmentId: null,
 | 
			
		||||
				description: null,
 | 
			
		||||
				responsible: null
 | 
			
		||||
				responsible: null,
 | 
			
		||||
			};
 | 
			
		||||
			this.resetForm('form');
 | 
			
		||||
		},
 | 
			
		||||
@@ -397,7 +412,7 @@ export default {
 | 
			
		||||
			this.$modal
 | 
			
		||||
				.confirm('是否确认删除记录"' + row.name + '"?')
 | 
			
		||||
				.then(function () {
 | 
			
		||||
					return this.delete({ id });
 | 
			
		||||
					return this.del({ id });
 | 
			
		||||
				})
 | 
			
		||||
				.then(() => {
 | 
			
		||||
					this.getList();
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										143
									
								
								src/views/equipment/monitor/SearchBar.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										143
									
								
								src/views/equipment/monitor/SearchBar.vue
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,143 @@
 | 
			
		||||
<!-- 
 | 
			
		||||
    filename: SearchBar.vue
 | 
			
		||||
    author: liubin
 | 
			
		||||
    date: 2023-11-23 14:01:17
 | 
			
		||||
    description: 
 | 
			
		||||
-->
 | 
			
		||||
 | 
			
		||||
<template>
 | 
			
		||||
	<div class="search-bar">
 | 
			
		||||
		<div class="vertical-blue-line"></div>
 | 
			
		||||
		<el-form
 | 
			
		||||
			:inline="true"
 | 
			
		||||
			ref="search-bar__form"
 | 
			
		||||
			:model="form"
 | 
			
		||||
			class="search-bar__form">
 | 
			
		||||
			<el-form-item :label="'产线'" prop="productionLineId">
 | 
			
		||||
				<el-select
 | 
			
		||||
					size="small"
 | 
			
		||||
					placeholder="请选择产线"
 | 
			
		||||
					@change="getEquipmentByLineId"
 | 
			
		||||
					v-model="form.productionLineId">
 | 
			
		||||
					<el-option
 | 
			
		||||
						v-for="item in listLine"
 | 
			
		||||
						:key="item.id"
 | 
			
		||||
						:label="item.name"
 | 
			
		||||
						:value="item.id"></el-option>
 | 
			
		||||
				</el-select>
 | 
			
		||||
			</el-form-item>
 | 
			
		||||
			<el-form-item :label="'设备'" prop="equipmentId">
 | 
			
		||||
				<el-select
 | 
			
		||||
					size="small"
 | 
			
		||||
					placeholder="请选择设备"
 | 
			
		||||
					v-model="form.equipmentId">
 | 
			
		||||
					<el-option
 | 
			
		||||
						v-for="item in listEq"
 | 
			
		||||
						:key="item.id"
 | 
			
		||||
						:label="item.name"
 | 
			
		||||
						:value="item.id"></el-option>
 | 
			
		||||
				</el-select>
 | 
			
		||||
			</el-form-item>
 | 
			
		||||
		</el-form>
 | 
			
		||||
		<el-button type="primary" @click="handleSearch" size="small">
 | 
			
		||||
			查询
 | 
			
		||||
		</el-button>
 | 
			
		||||
	</div>
 | 
			
		||||
</template>
 | 
			
		||||
 | 
			
		||||
<script>
 | 
			
		||||
export default {
 | 
			
		||||
	name: 'SearchBar',
 | 
			
		||||
	model: {
 | 
			
		||||
		prop: 'value',
 | 
			
		||||
		event: 'change',
 | 
			
		||||
	},
 | 
			
		||||
	props: {
 | 
			
		||||
		value: {
 | 
			
		||||
			type: Object,
 | 
			
		||||
			default: () => {},
 | 
			
		||||
		},
 | 
			
		||||
	},
 | 
			
		||||
	data() {
 | 
			
		||||
		return {
 | 
			
		||||
			listLine: [],
 | 
			
		||||
			listEq: [],
 | 
			
		||||
		};
 | 
			
		||||
	},
 | 
			
		||||
	computed: {
 | 
			
		||||
		form: {
 | 
			
		||||
			set(val) {
 | 
			
		||||
				this.emit(val);
 | 
			
		||||
			},
 | 
			
		||||
			get() {
 | 
			
		||||
				return this.value;
 | 
			
		||||
			},
 | 
			
		||||
		},
 | 
			
		||||
	},
 | 
			
		||||
	mounted() {
 | 
			
		||||
		this.getLine();
 | 
			
		||||
	},
 | 
			
		||||
	methods: {
 | 
			
		||||
		emit(newValue) {
 | 
			
		||||
			debugger;
 | 
			
		||||
			this.$emit('update', { ...this.form, ...newValue });
 | 
			
		||||
		},
 | 
			
		||||
		async getLine() {
 | 
			
		||||
			const { data, code } = await this.$axios({
 | 
			
		||||
				url: '/base/core-production-line/listAll',
 | 
			
		||||
			});
 | 
			
		||||
			if (code == 0) {
 | 
			
		||||
				this.listLine = data;
 | 
			
		||||
				return;
 | 
			
		||||
			}
 | 
			
		||||
			this.listLine.splice(0);
 | 
			
		||||
		},
 | 
			
		||||
		async getEquipmentByLineId(id) {
 | 
			
		||||
			const { data, code } = await this.$axios({
 | 
			
		||||
				url: '/base/core-equipment/listByLine',
 | 
			
		||||
				params: {
 | 
			
		||||
					id,
 | 
			
		||||
				},
 | 
			
		||||
			});
 | 
			
		||||
			if (code == 0) {
 | 
			
		||||
				this.listEq = data;
 | 
			
		||||
				return;
 | 
			
		||||
			}
 | 
			
		||||
			this.listEq.splice(0);
 | 
			
		||||
		},
 | 
			
		||||
		handleSearch() {
 | 
			
		||||
			this.$emit('action', {
 | 
			
		||||
				action: 'search',
 | 
			
		||||
				payload: this.form,
 | 
			
		||||
			});
 | 
			
		||||
		},
 | 
			
		||||
	},
 | 
			
		||||
};
 | 
			
		||||
</script>
 | 
			
		||||
 | 
			
		||||
<style scoped lang="scss">
 | 
			
		||||
.search-bar {
 | 
			
		||||
	padding: 12px 0;
 | 
			
		||||
	font-size: 16px;
 | 
			
		||||
	position: relative;
 | 
			
		||||
	display: flex;
 | 
			
		||||
	align-items: center;
 | 
			
		||||
	gap: 12px;
 | 
			
		||||
 | 
			
		||||
	:deep(.el-form-item) {
 | 
			
		||||
		margin-bottom: 0 !important;
 | 
			
		||||
		margin-right: 0;
 | 
			
		||||
 | 
			
		||||
		&:not(:last-child) {
 | 
			
		||||
			margin-right: 18px;
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
.vertical-blue-line {
 | 
			
		||||
	width: 4px;
 | 
			
		||||
	height: 18px;
 | 
			
		||||
	background: #0b58ff;
 | 
			
		||||
	border-radius: 2px;
 | 
			
		||||
}
 | 
			
		||||
</style>
 | 
			
		||||
@@ -1,10 +1,7 @@
 | 
			
		||||
<template>
 | 
			
		||||
	<div class="app-container">
 | 
			
		||||
		<!-- 搜索工作栏 -->
 | 
			
		||||
		<SearchBar
 | 
			
		||||
			:formConfigs="searchBarFormConfig"
 | 
			
		||||
			ref="search-bar"
 | 
			
		||||
			@headBtnClick="handleSearchBarBtnClick" />
 | 
			
		||||
		<SearchBarNew v-model="searchBarForm" @action="handleSearchBarActions" />
 | 
			
		||||
 | 
			
		||||
		<!-- 列表 -->
 | 
			
		||||
		<base-table
 | 
			
		||||
@@ -13,13 +10,13 @@
 | 
			
		||||
			:limit="queryParams.pageSize"
 | 
			
		||||
			:table-data="list"
 | 
			
		||||
			@emitFun="handleEmitFun">
 | 
			
		||||
			<method-btn
 | 
			
		||||
			<!-- <method-btn
 | 
			
		||||
				v-if="tableBtn.length"
 | 
			
		||||
				slot="handleBtn"
 | 
			
		||||
				label="操作"
 | 
			
		||||
				:width="120"
 | 
			
		||||
				:method-list="tableBtn"
 | 
			
		||||
				@clickBtn="handleTableBtnClick" />
 | 
			
		||||
				@clickBtn="handleTableBtnClick" /> -->
 | 
			
		||||
		</base-table>
 | 
			
		||||
 | 
			
		||||
		<!-- 分页组件 -->
 | 
			
		||||
@@ -50,22 +47,23 @@
 | 
			
		||||
</template>
 | 
			
		||||
 | 
			
		||||
<script>
 | 
			
		||||
import moment from 'moment';
 | 
			
		||||
import basicPageMixin from '@/mixins/lb/basicPageMixin';
 | 
			
		||||
import { publicFormatter } from '@/utils/dict';
 | 
			
		||||
import { parseTime } from '@/utils/ruoyi'
 | 
			
		||||
// const timeFilter = (val) => moment(val).format('yyyy-MM-DD HH:mm:ss');
 | 
			
		||||
 | 
			
		||||
import { parseTime } from '@/utils/ruoyi';
 | 
			
		||||
import SearchBarNew from '../SearchBar.vue';
 | 
			
		||||
 | 
			
		||||
const btn = {
 | 
			
		||||
	name: 'tableBtn',
 | 
			
		||||
	props: ['injectData'],
 | 
			
		||||
	components: {},
 | 
			
		||||
	data() {
 | 
			
		||||
		return {};
 | 
			
		||||
	},
 | 
			
		||||
	methods: {
 | 
			
		||||
		handleClick() {
 | 
			
		||||
			this.$emit('emitData', { action: this.injectData.label, value: this.injectData });
 | 
			
		||||
			this.$emit('emitData', {
 | 
			
		||||
				action: this.injectData.label,
 | 
			
		||||
				value: this.injectData,
 | 
			
		||||
			});
 | 
			
		||||
		},
 | 
			
		||||
	},
 | 
			
		||||
	render: function (h) {
 | 
			
		||||
@@ -77,154 +75,104 @@ const btn = {
 | 
			
		||||
	},
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
// monitoring/equipment-monitor/realtime-page
 | 
			
		||||
export default {
 | 
			
		||||
	name: 'StatusAndParams',
 | 
			
		||||
	mixins: [basicPageMixin],
 | 
			
		||||
	components: { SearchBarNew },
 | 
			
		||||
	data() {
 | 
			
		||||
		return {
 | 
			
		||||
			searchBarKeys: ['equipmentName', 'recordTime'],
 | 
			
		||||
			tableBtn: [
 | 
			
		||||
				// this.$auth.hasPermi('equipment:spare-parts-config:update')
 | 
			
		||||
				// 	? {
 | 
			
		||||
				// 			type: 'detail',
 | 
			
		||||
				// 			btnName: '详情',
 | 
			
		||||
				// 	  }
 | 
			
		||||
				// 	: undefined,
 | 
			
		||||
				// this.$auth.hasPermi('equipment:spare-parts-config:update')
 | 
			
		||||
				// 	? {
 | 
			
		||||
				// 			type: 'edit',
 | 
			
		||||
				// 			btnName: '修改',
 | 
			
		||||
				// 	  }
 | 
			
		||||
				// 	: undefined,
 | 
			
		||||
				// this.$auth.hasPermi('equipment:spare-parts-config:delete')
 | 
			
		||||
				// 	? {
 | 
			
		||||
				// 			type: 'delete',
 | 
			
		||||
				// 			btnName: '删除',
 | 
			
		||||
				// 	  }
 | 
			
		||||
				// 	: undefined,
 | 
			
		||||
			].filter((v) => v),
 | 
			
		||||
			tableProps: [
 | 
			
		||||
				{ prop: 'productionLine', label: '设备名称' },
 | 
			
		||||
				{ prop: 'workshopSection', label: '设备编码' },
 | 
			
		||||
				{ prop: 'equipment', label: '投入数' },
 | 
			
		||||
				{ prop: 'productionLine', label: '产出数' },
 | 
			
		||||
				{ prop: 'workshopSection', label: '是否运行' },
 | 
			
		||||
				{ prop: 'equipment22', label: '状态' },
 | 
			
		||||
				// { prop: 'alarmGrade', label: '报警级别', filter: publicFormatter(this.DICT_TYPE.EQU_ALARM_LEVEL) },
 | 
			
		||||
				{ prop: 'productionLine', label: '是否故障' },
 | 
			
		||||
				{ prop: 'workshopSection', label: '生产量记录时间', filter: parseTime },
 | 
			
		||||
				{ prop: 'equipment1', label: '状态记录时间', filter: parseTime },
 | 
			
		||||
				{ prop: 'equipmentName', label: '设备名称' },
 | 
			
		||||
				{ prop: 'equipmentCode', label: '设备编码' },
 | 
			
		||||
				{ prop: 'inQuantity', label: '投入数' },
 | 
			
		||||
				{ prop: 'outQuantity', label: '产出数' },
 | 
			
		||||
				{
 | 
			
		||||
					prop: 'run',
 | 
			
		||||
					label: '是否运行',
 | 
			
		||||
					filter: (val) => (val != null ? (val ? '是' : '否') : ''),
 | 
			
		||||
				},
 | 
			
		||||
				{
 | 
			
		||||
					prop: 'status',
 | 
			
		||||
					label: '状态',
 | 
			
		||||
					filter: (val) =>
 | 
			
		||||
						val != null ? ['正常', '计划停机', '故障'][val] : '',
 | 
			
		||||
				},
 | 
			
		||||
				{
 | 
			
		||||
					prop: 'error',
 | 
			
		||||
					label: '是否故障',
 | 
			
		||||
					filter: (val) => (val != null ? (val ? '是' : '否') : ''),
 | 
			
		||||
				},
 | 
			
		||||
				{
 | 
			
		||||
					prop: 'quantityRecordTime',
 | 
			
		||||
					label: '生产量记录时间',
 | 
			
		||||
					filter: parseTime,
 | 
			
		||||
				},
 | 
			
		||||
				{ prop: 'statusRecordTime', label: '状态记录时间', filter: parseTime },
 | 
			
		||||
				{ prop: 'opt1', label: '状态可视化', name: '查看', subcomponent: btn },
 | 
			
		||||
				{ prop: 'opt2', label: '参数监控', name: '查看', subcomponent: btn }  // TODO: 是否换成按钮, 群里问
 | 
			
		||||
				// { prop: 'remark', label: '备注' },
 | 
			
		||||
			],
 | 
			
		||||
			searchBarFormConfig: [
 | 
			
		||||
				{
 | 
			
		||||
					type: 'input',
 | 
			
		||||
					label: '设备名',
 | 
			
		||||
					placeholder: '请输入设备名称',
 | 
			
		||||
					param: 'equipmentName',
 | 
			
		||||
				},
 | 
			
		||||
				// 时间段
 | 
			
		||||
				{
 | 
			
		||||
					type: 'datePicker',
 | 
			
		||||
					label: '时间段',
 | 
			
		||||
					dateType: 'daterange', // datetimerange
 | 
			
		||||
					// format: 'yyyy-MM-dd HH:mm:ss',
 | 
			
		||||
					format: 'yyyy-MM-dd',
 | 
			
		||||
					// valueFormat: 'timestamp',
 | 
			
		||||
					valueFormat: 'yyyy-MM-dd HH:mm:ss',
 | 
			
		||||
					rangeSeparator: '-',
 | 
			
		||||
					startPlaceholder: '开始日期',
 | 
			
		||||
					endPlaceholder: '结束日期',
 | 
			
		||||
					defaultTime: ['00:00:00', '23:59:59'],
 | 
			
		||||
					param: 'recordTime',
 | 
			
		||||
					// defaultSelect: [
 | 
			
		||||
					// 	new Date(y, m, d)
 | 
			
		||||
					// 		.toLocaleString()
 | 
			
		||||
					// 		.split('/')
 | 
			
		||||
					// 		.map((item, index) => {
 | 
			
		||||
					// 			if (index == 1 || index == 2) return item.padStart(2, '0');
 | 
			
		||||
					// 			return item;
 | 
			
		||||
					// 		})
 | 
			
		||||
					// 		.join('-'),
 | 
			
		||||
					// 	new Date(y, m, d, 23, 59, 59)
 | 
			
		||||
					// 		.toLocaleString()
 | 
			
		||||
					// 		.split('/')
 | 
			
		||||
					// 		.map((item, index) => {
 | 
			
		||||
					// 			if (index == 1 || index == 2) return item.padStart(2, '0');
 | 
			
		||||
					// 			return item;
 | 
			
		||||
					// 		})
 | 
			
		||||
					// 		.join('-'),
 | 
			
		||||
					// ],
 | 
			
		||||
				},
 | 
			
		||||
				{
 | 
			
		||||
					type: 'button',
 | 
			
		||||
					btnName: '查询',
 | 
			
		||||
					name: 'search',
 | 
			
		||||
					color: 'primary',
 | 
			
		||||
				},
 | 
			
		||||
				// {
 | 
			
		||||
				// 	type: 'separate',
 | 
			
		||||
				// },
 | 
			
		||||
				// {
 | 
			
		||||
				// 	type: this.$auth.hasPermi('equipment:spare-parts-config:create')
 | 
			
		||||
				// 		? 'button'
 | 
			
		||||
				// 		: '',
 | 
			
		||||
				// 	btnName: '新增',
 | 
			
		||||
				// 	name: 'add',
 | 
			
		||||
				// 	plain: true,
 | 
			
		||||
				// 	color: 'success',
 | 
			
		||||
				// },
 | 
			
		||||
				// {
 | 
			
		||||
				// 	type: this.$auth.hasPermi('equipment:spare-parts-config:export')
 | 
			
		||||
				// 		? 'button'
 | 
			
		||||
				// 		: '',
 | 
			
		||||
				// 	btnName: '导出',
 | 
			
		||||
				// 	name: 'export',
 | 
			
		||||
				// 	color: 'warning',
 | 
			
		||||
				// },
 | 
			
		||||
				{ prop: 'opt2', label: '参数监控', name: '查看', subcomponent: btn },
 | 
			
		||||
			],
 | 
			
		||||
			searchBarForm: {
 | 
			
		||||
				productionLineId: null,
 | 
			
		||||
				equipmentId: null,
 | 
			
		||||
			},
 | 
			
		||||
			// 是否显示弹出层
 | 
			
		||||
			open: false,
 | 
			
		||||
			// 查询参数
 | 
			
		||||
			queryParams: {
 | 
			
		||||
				pageNo: 1,
 | 
			
		||||
				pageSize: 10,
 | 
			
		||||
				lineId: null,
 | 
			
		||||
				equipmentId: null,
 | 
			
		||||
				productionLineId: null,
 | 
			
		||||
			},
 | 
			
		||||
			basePath: '/base/equipment-alarm-log',
 | 
			
		||||
			list: []
 | 
			
		||||
			list: [],
 | 
			
		||||
		};
 | 
			
		||||
	},
 | 
			
		||||
	created() {
 | 
			
		||||
		// this.getList();
 | 
			
		||||
	mounted() {
 | 
			
		||||
		this.getList();
 | 
			
		||||
	},
 | 
			
		||||
	methods: {
 | 
			
		||||
		handleEmitFun(val) {
 | 
			
		||||
			console.log('你好', val)
 | 
			
		||||
			if (val.action === '状态可视化') {
 | 
			
		||||
		/**
 | 
			
		||||
		 * 处理表格按钮点击事件
 | 
			
		||||
		 * @param {string} action 按钮名称
 | 
			
		||||
		 * @param {object} value 按钮数据(行数据) { equipmentId, equipmentCode, equipmentName, inQuantity, outQuantity, run, status, error, quantityRecordTime, statusRecordTime}
 | 
			
		||||
		 */
 | 
			
		||||
		handleEmitFun({ action, value: row } = {}) {
 | 
			
		||||
			if (action === '状态可视化') {
 | 
			
		||||
				// 状态可视化
 | 
			
		||||
			} else {
 | 
			
		||||
			} else if (action === '参数监控') {
 | 
			
		||||
				// 参数监控
 | 
			
		||||
				// 接口需要 equipmentId recordTime workOrderId 工单id
 | 
			
		||||
				this.$router.push({
 | 
			
		||||
					// path: '/equipment/monitor/full-params',
 | 
			
		||||
					name: 'EquipmentFullParams',
 | 
			
		||||
					params: {
 | 
			
		||||
						equipmentId: row.equipmentId,
 | 
			
		||||
						equipmentCode: row.equipmentCode,
 | 
			
		||||
						equipmentName: row.equipmentName,
 | 
			
		||||
					},
 | 
			
		||||
				});
 | 
			
		||||
			} else {
 | 
			
		||||
			}
 | 
			
		||||
		},
 | 
			
		||||
		/** 查询列表 */
 | 
			
		||||
		getList() {
 | 
			
		||||
			this.loading = true;
 | 
			
		||||
			// 执行查询
 | 
			
		||||
			this.recv(this.queryParams).then((response) => {
 | 
			
		||||
			this.http(
 | 
			
		||||
				'/monitoring/equipment-monitor/realtime-page',
 | 
			
		||||
				'get',
 | 
			
		||||
				this.queryParams
 | 
			
		||||
			).then((response) => {
 | 
			
		||||
				this.list = response.data.list;
 | 
			
		||||
				this.total = response.data.total;
 | 
			
		||||
				this.loading = false;
 | 
			
		||||
			});
 | 
			
		||||
		},
 | 
			
		||||
		successSubmit() {
 | 
			
		||||
      this.cancel()
 | 
			
		||||
      this.getList()
 | 
			
		||||
    },
 | 
			
		||||
			this.cancel();
 | 
			
		||||
			this.getList();
 | 
			
		||||
		},
 | 
			
		||||
		/** 取消按钮 */
 | 
			
		||||
		cancel() {
 | 
			
		||||
			this.open = false;
 | 
			
		||||
@@ -242,9 +190,25 @@ export default {
 | 
			
		||||
		// 	};
 | 
			
		||||
		// 	this.resetForm('form');
 | 
			
		||||
		// },
 | 
			
		||||
		handleSearchBarActions({ action, payload }) {
 | 
			
		||||
			switch (action) {
 | 
			
		||||
				case 'search':
 | 
			
		||||
					this.handleQuery();
 | 
			
		||||
					break;
 | 
			
		||||
				case 'reset':
 | 
			
		||||
					this.resetQuery();
 | 
			
		||||
					break;
 | 
			
		||||
				default:
 | 
			
		||||
					break;
 | 
			
		||||
			}
 | 
			
		||||
		},
 | 
			
		||||
		/** 搜索按钮操作 */
 | 
			
		||||
		handleQuery() {
 | 
			
		||||
			this.queryParams.pageNo = 1;
 | 
			
		||||
			this.queryParams = {
 | 
			
		||||
				...this.queryParams,
 | 
			
		||||
				...this.searchBarForm,
 | 
			
		||||
				pageNo: 1,
 | 
			
		||||
			};
 | 
			
		||||
			this.getList();
 | 
			
		||||
		},
 | 
			
		||||
		/** 重置按钮操作 */
 | 
			
		||||
@@ -270,7 +234,7 @@ export default {
 | 
			
		||||
		},
 | 
			
		||||
		/** 提交按钮 */
 | 
			
		||||
		submitForm() {
 | 
			
		||||
			this.$refs.addOrUpdate.dataFormSubmit()
 | 
			
		||||
			this.$refs.addOrUpdate.dataFormSubmit();
 | 
			
		||||
			// this.$refs['form'].validate((valid) => {
 | 
			
		||||
			// 	if (!valid) {
 | 
			
		||||
			// 		return;
 | 
			
		||||
@@ -297,8 +261,8 @@ export default {
 | 
			
		||||
			const id = row.id;
 | 
			
		||||
			this.$modal
 | 
			
		||||
				.confirm('是否确认删除记录"' + row.name + '"?')
 | 
			
		||||
				.then(function () {
 | 
			
		||||
					return this.delete({ id });
 | 
			
		||||
				.then(() => {
 | 
			
		||||
					return this.del({ id });
 | 
			
		||||
				})
 | 
			
		||||
				.then(() => {
 | 
			
		||||
					this.getList();
 | 
			
		||||
 
 | 
			
		||||
@@ -61,6 +61,8 @@
 | 
			
		||||
				v-if="open"
 | 
			
		||||
				style="width: 100%"
 | 
			
		||||
				v-model="queryParams.equipmentId"
 | 
			
		||||
				filterable
 | 
			
		||||
				clearable
 | 
			
		||||
				placeholder="请选择一个设备">
 | 
			
		||||
				<el-option
 | 
			
		||||
					v-for="eq in eqList"
 | 
			
		||||
@@ -482,7 +484,7 @@ export default {
 | 
			
		||||
 | 
			
		||||
		async submitForm() {
 | 
			
		||||
			const { code, data } = await this.$axios({
 | 
			
		||||
				url: '/analysis/equipment-analysis/quantity',
 | 
			
		||||
				url: '/monitoring/equipment-monitor/quantity-series',
 | 
			
		||||
				method: 'get',
 | 
			
		||||
				params: this.queryParams,
 | 
			
		||||
			});
 | 
			
		||||
 
 | 
			
		||||
@@ -6,19 +6,29 @@
 | 
			
		||||
-->
 | 
			
		||||
 | 
			
		||||
<template>
 | 
			
		||||
	<div class="status-timegraph-container" style="background: #f2f4f9; flex: 1; display: flex; flex-direction: column">
 | 
			
		||||
		<el-row class="" style="
 | 
			
		||||
	<div
 | 
			
		||||
		class="status-timegraph-container"
 | 
			
		||||
		style="background: #f2f4f9; flex: 1; display: flex; flex-direction: column">
 | 
			
		||||
		<el-row
 | 
			
		||||
			class=""
 | 
			
		||||
			style="
 | 
			
		||||
				margin-bottom: 12px;
 | 
			
		||||
				background: #fff;
 | 
			
		||||
				padding: 16px 16px 0;
 | 
			
		||||
				border-radius: 8px;
 | 
			
		||||
			">
 | 
			
		||||
			<div class="blue-title">生产节拍时序图</div>
 | 
			
		||||
			<SearchBar :formConfigs="searchBarFormConfig" ref="search-bar" :remove-blue="true"
 | 
			
		||||
				@select-changed="handleSearchBarSelectChange" @headBtnClick="handleSearchBarBtnClick" />
 | 
			
		||||
			<SearchBar
 | 
			
		||||
				:formConfigs="searchBarFormConfig"
 | 
			
		||||
				ref="search-bar"
 | 
			
		||||
				:remove-blue="true"
 | 
			
		||||
				@select-changed="handleSearchBarSelectChange"
 | 
			
		||||
				@headBtnClick="handleSearchBarBtnClick" />
 | 
			
		||||
		</el-row>
 | 
			
		||||
 | 
			
		||||
		<el-row class="" style="
 | 
			
		||||
		<el-row
 | 
			
		||||
			class=""
 | 
			
		||||
			style="
 | 
			
		||||
				height: 1px;
 | 
			
		||||
				flex: 1;
 | 
			
		||||
				margin-bottom: 12px;
 | 
			
		||||
@@ -47,17 +57,36 @@
 | 
			
		||||
					</div>
 | 
			
		||||
				</el-col>
 | 
			
		||||
			</el-row>
 | 
			
		||||
			<div class="main-area" style="flex: 1; display: flex; flex-direction: column">
 | 
			
		||||
				<div class="graphs" v-show="graphList.length" id="status-chart" style="height: 1px; flex: 1"></div>
 | 
			
		||||
			<div
 | 
			
		||||
				class="main-area"
 | 
			
		||||
				style="flex: 1; display: flex; flex-direction: column">
 | 
			
		||||
				<div
 | 
			
		||||
					class="graphs"
 | 
			
		||||
					v-show="graphList.length"
 | 
			
		||||
					id="status-chart"
 | 
			
		||||
					style="height: 1px; flex: 1"></div>
 | 
			
		||||
				<h2 v-if="!graphList || graphList.length == 0" class="no-data-bg"></h2>
 | 
			
		||||
			</div>
 | 
			
		||||
		</el-row>
 | 
			
		||||
 | 
			
		||||
		<!-- 对话框(添加 / 修改) -->
 | 
			
		||||
		<base-dialog dialogTitle="添加设备" :dialogVisible="open" width="500px" @close="open = false" @cancel="open = false"
 | 
			
		||||
		<base-dialog
 | 
			
		||||
			dialogTitle="添加设备"
 | 
			
		||||
			:dialogVisible="open"
 | 
			
		||||
			width="500px"
 | 
			
		||||
			@close="open = false"
 | 
			
		||||
			@cancel="open = false"
 | 
			
		||||
			@confirm="submitForm">
 | 
			
		||||
			<el-select v-if="open" style="width: 100%" v-model="queryParams.equipmentId" placeholder="请选择一个设备">
 | 
			
		||||
				<el-option v-for="eq in eqList" :key="eq.id" :value="eq.id" :label="eq.name"></el-option>
 | 
			
		||||
			<el-select
 | 
			
		||||
				v-if="open"
 | 
			
		||||
				style="width: 100%"
 | 
			
		||||
				v-model="queryParams.equipmentId"
 | 
			
		||||
				placeholder="请选择一个设备">
 | 
			
		||||
				<el-option
 | 
			
		||||
					v-for="eq in eqList"
 | 
			
		||||
					:key="eq.id"
 | 
			
		||||
					:value="eq.id"
 | 
			
		||||
					:label="eq.name"></el-option>
 | 
			
		||||
			</el-select>
 | 
			
		||||
		</base-dialog>
 | 
			
		||||
	</div>
 | 
			
		||||
@@ -65,12 +94,19 @@
 | 
			
		||||
 | 
			
		||||
<script>
 | 
			
		||||
import Gantt from './chart';
 | 
			
		||||
import moment from 'moment';
 | 
			
		||||
 | 
			
		||||
export default {
 | 
			
		||||
	name: 'SGStatus',
 | 
			
		||||
	components: {},
 | 
			
		||||
	props: {},
 | 
			
		||||
	data() {
 | 
			
		||||
		const today = new Date();
 | 
			
		||||
		const todayStart = new Date(
 | 
			
		||||
			today.getFullYear(),
 | 
			
		||||
			today.getMonth(),
 | 
			
		||||
			today.getDate()
 | 
			
		||||
		);
 | 
			
		||||
		return {
 | 
			
		||||
			chart: null,
 | 
			
		||||
			searchBarFormConfig: [
 | 
			
		||||
@@ -100,6 +136,7 @@ export default {
 | 
			
		||||
					placeholder: '选择日期',
 | 
			
		||||
					param: 'recordTime',
 | 
			
		||||
					required: true,
 | 
			
		||||
					defaultSelect: moment(todayStart).format('YYYY-MM-DD HH:mm:ss'),
 | 
			
		||||
				},
 | 
			
		||||
				{
 | 
			
		||||
					type: 'button',
 | 
			
		||||
@@ -129,7 +166,7 @@ export default {
 | 
			
		||||
			open: false,
 | 
			
		||||
			eqList: [],
 | 
			
		||||
			startTime: null,
 | 
			
		||||
			gantt: null
 | 
			
		||||
			gantt: null,
 | 
			
		||||
			// demo: [
 | 
			
		||||
			// 	[
 | 
			
		||||
			// 		{
 | 
			
		||||
@@ -159,7 +196,7 @@ export default {
 | 
			
		||||
		this.initEquipment();
 | 
			
		||||
		// this.getList();
 | 
			
		||||
	},
 | 
			
		||||
	mounted() { },
 | 
			
		||||
	mounted() {},
 | 
			
		||||
	watch: {
 | 
			
		||||
		graphList: {
 | 
			
		||||
			handler(val) {
 | 
			
		||||
@@ -171,7 +208,6 @@ export default {
 | 
			
		||||
							return;
 | 
			
		||||
						}
 | 
			
		||||
						this.gantt.update(val);
 | 
			
		||||
 | 
			
		||||
					});
 | 
			
		||||
				}
 | 
			
		||||
				return;
 | 
			
		||||
@@ -215,7 +251,9 @@ export default {
 | 
			
		||||
				params: this.queryParams,
 | 
			
		||||
			});
 | 
			
		||||
			if (code == 0) {
 | 
			
		||||
				this.existingEquipments = Object.values(data).map((eq) => eq[0].equipmentId);
 | 
			
		||||
				this.existingEquipments = Object.values(data).map(
 | 
			
		||||
					(eq) => eq[0].equipmentId
 | 
			
		||||
				);
 | 
			
		||||
				this.graphList = this.objectToArray(data);
 | 
			
		||||
			}
 | 
			
		||||
		},
 | 
			
		||||
@@ -302,26 +340,26 @@ export default {
 | 
			
		||||
						return;
 | 
			
		||||
					}
 | 
			
		||||
 | 
			
		||||
					this.startTime = new Date(payload.recordTime)
 | 
			
		||||
					this.startTime = new Date(payload.recordTime);
 | 
			
		||||
					this.queryParams.lineId = payload.lineId || null;
 | 
			
		||||
					this.queryParams.sectionId = payload.sectionId || null;
 | 
			
		||||
					this.queryParams.equipmentId = payload.equipmentId || null;
 | 
			
		||||
					this.queryParams.recordTime = payload.recordTime
 | 
			
		||||
						? [
 | 
			
		||||
							payload.recordTime,
 | 
			
		||||
							new Date(
 | 
			
		||||
								new Date(payload.recordTime).getTime() + 24 * 3600 * 1000
 | 
			
		||||
							)
 | 
			
		||||
								.toLocaleDateString()
 | 
			
		||||
								.split('/')
 | 
			
		||||
								.map((value, index) => {
 | 
			
		||||
									if (index == 1 || index == 2) {
 | 
			
		||||
										return value.padStart(2, '0');
 | 
			
		||||
									}
 | 
			
		||||
									return value;
 | 
			
		||||
								})
 | 
			
		||||
								.join('-') + ' 00:00:00',
 | 
			
		||||
						]
 | 
			
		||||
								payload.recordTime,
 | 
			
		||||
								new Date(
 | 
			
		||||
									new Date(payload.recordTime).getTime() + 24 * 3600 * 1000
 | 
			
		||||
								)
 | 
			
		||||
									.toLocaleDateString()
 | 
			
		||||
									.split('/')
 | 
			
		||||
									.map((value, index) => {
 | 
			
		||||
										if (index == 1 || index == 2) {
 | 
			
		||||
											return value.padStart(2, '0');
 | 
			
		||||
										}
 | 
			
		||||
										return value;
 | 
			
		||||
									})
 | 
			
		||||
									.join('-') + ' 00:00:00',
 | 
			
		||||
						  ]
 | 
			
		||||
						: null;
 | 
			
		||||
					this.getList();
 | 
			
		||||
					break;
 | 
			
		||||
@@ -337,9 +375,12 @@ export default {
 | 
			
		||||
				return;
 | 
			
		||||
			}
 | 
			
		||||
			const { code, data } = await this.$axios({
 | 
			
		||||
				url: '/analysis/equipment-analysis/status',
 | 
			
		||||
				url: '/monitoring/equipment-monitor/status-series',
 | 
			
		||||
				method: 'get',
 | 
			
		||||
				params: this.queryParams,
 | 
			
		||||
				params: {
 | 
			
		||||
					recordTime: this.queryParams.recordTime,
 | 
			
		||||
					equipmentId: this.queryParams.equipmentId,
 | 
			
		||||
				},
 | 
			
		||||
			});
 | 
			
		||||
			if (code == 0) {
 | 
			
		||||
				const newEqlist = this.objectToArray(data);
 | 
			
		||||
@@ -444,7 +485,7 @@ export default {
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
.running {
 | 
			
		||||
	background-color: #288AFF;
 | 
			
		||||
	background-color: #288aff;
 | 
			
		||||
	// background-color: #84f04e;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@@ -455,7 +496,7 @@ export default {
 | 
			
		||||
 | 
			
		||||
.fault {
 | 
			
		||||
	// background-color: #ea5b5b;
 | 
			
		||||
	background-color: #FC9C91;
 | 
			
		||||
	background-color: #fc9c91;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
.full {
 | 
			
		||||
@@ -469,7 +510,7 @@ export default {
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
.stop {
 | 
			
		||||
	background-color: #FFDC94;
 | 
			
		||||
	background-color: #ffdc94;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
.legend-row {
 | 
			
		||||
@@ -478,7 +519,7 @@ export default {
 | 
			
		||||
	display: flex;
 | 
			
		||||
	justify-content: flex-end;
 | 
			
		||||
 | 
			
		||||
	>.legend:not(:last-child) {
 | 
			
		||||
	> .legend:not(:last-child) {
 | 
			
		||||
		margin-right: 12px;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
@@ -521,7 +562,7 @@ export default {
 | 
			
		||||
	background: #ccc;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
.echarts__status-chart>div {
 | 
			
		||||
.echarts__status-chart > div {
 | 
			
		||||
	height: 100% !important;
 | 
			
		||||
	width: 100% !important;
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -2,7 +2,7 @@
 | 
			
		||||
 * @Author: zwq
 | 
			
		||||
 * @Date: 2021-11-18 14:16:25
 | 
			
		||||
 * @LastEditors: zhp
 | 
			
		||||
 * @LastEditTime: 2023-11-10 16:26:08
 | 
			
		||||
 * @LastEditTime: 2023-11-22 16:50:55
 | 
			
		||||
 * @Description:
 | 
			
		||||
-->
 | 
			
		||||
<template>
 | 
			
		||||
@@ -100,7 +100,8 @@ import {
 | 
			
		||||
  updateProcessEquMaterialBom,
 | 
			
		||||
  getEquipmentList,
 | 
			
		||||
  processEquMaterialBomDetPage,
 | 
			
		||||
  deleteProcessEquMaterialBomDet
 | 
			
		||||
  deleteProcessEquMaterialBomDet,
 | 
			
		||||
  getMaterialCode
 | 
			
		||||
} from '@/api/extend/processEquMaterialBom';
 | 
			
		||||
import SmallTitle from './SmallTitle';
 | 
			
		||||
import { parseTime } from '../../core/mixins/code-filter';
 | 
			
		||||
@@ -197,7 +198,6 @@ export default {
 | 
			
		||||
		};
 | 
			
		||||
	},
 | 
			
		||||
  mounted() {
 | 
			
		||||
    this.getDict()
 | 
			
		||||
  },
 | 
			
		||||
  methods: {
 | 
			
		||||
    getCode(val) {
 | 
			
		||||
@@ -223,6 +223,9 @@ export default {
 | 
			
		||||
        // console.log(response);
 | 
			
		||||
        this.equipmentList = res.data
 | 
			
		||||
      })
 | 
			
		||||
      getMaterialCode().then(res => {
 | 
			
		||||
        this.dataForm.code = res.data
 | 
			
		||||
      })
 | 
			
		||||
    },
 | 
			
		||||
		handleClick(raw) {
 | 
			
		||||
			if (raw.type === 'delete') {
 | 
			
		||||
@@ -267,7 +270,8 @@ export default {
 | 
			
		||||
			});
 | 
			
		||||
		},
 | 
			
		||||
		init(id, isdetail) {
 | 
			
		||||
			this.initData();
 | 
			
		||||
      this.initData()
 | 
			
		||||
      this.getDict()
 | 
			
		||||
			this.isdetail = isdetail || false;
 | 
			
		||||
			this.dataForm.id = id || undefined;
 | 
			
		||||
			this.visible = true;
 | 
			
		||||
 
 | 
			
		||||
@@ -1,7 +1,7 @@
 | 
			
		||||
<!--
 | 
			
		||||
 * @Author: zhp
 | 
			
		||||
 * @Date: 2023-11-08 15:30:27
 | 
			
		||||
 * @LastEditTime: 2023-11-09 14:11:02
 | 
			
		||||
 * @LastEditTime: 2023-11-23 14:27:59
 | 
			
		||||
 * @LastEditors: zhp
 | 
			
		||||
 * @Description:
 | 
			
		||||
-->
 | 
			
		||||
@@ -18,13 +18,16 @@
 | 
			
		||||
    <el-form ref="dataForm" :model="dataForm" :rules="dataRule" label-width="100px"
 | 
			
		||||
      @keyup.enter.native="dataFormSubmit()">
 | 
			
		||||
      <el-form-item label="物料名称" prop="materialId">
 | 
			
		||||
        <el-select v-model="dataForm.materialId" filterable placeholder="请选择物料名称">
 | 
			
		||||
        <el-select v-model="dataForm.materialId" filterable placeholder="请选择物料名称" multiple>
 | 
			
		||||
          <el-option v-for="dict in materialList" :key=" dict.id" :label="dict.name" :value="dict.id" />
 | 
			
		||||
        </el-select>
 | 
			
		||||
      </el-form-item>
 | 
			
		||||
      <el-form-item label="数量" prop="num">
 | 
			
		||||
        <el-input v-model="dataForm.num" placeholder="请输入数量" clearable />
 | 
			
		||||
      </el-form-item>
 | 
			
		||||
      <el-form-item label="备注" prop="remark">
 | 
			
		||||
        <el-input v-model="dataForm.remark" placeholder="请输入备注" clearable />
 | 
			
		||||
      </el-form-item>
 | 
			
		||||
    </el-form>
 | 
			
		||||
 | 
			
		||||
    <el-row style="text-align: right">
 | 
			
		||||
@@ -37,7 +40,7 @@
 | 
			
		||||
<script>
 | 
			
		||||
import {
 | 
			
		||||
  getProcessEquMaterialBomDet,
 | 
			
		||||
  createProcessEquMaterialBomDet,
 | 
			
		||||
  createProcessEquMaterialBomDetList,
 | 
			
		||||
  updateProcessEquMaterialBomDet,
 | 
			
		||||
  getMaterialList
 | 
			
		||||
} from '@/api/extend/processEquMaterialBom';
 | 
			
		||||
@@ -56,11 +59,13 @@ export default {
 | 
			
		||||
			dataForm: {
 | 
			
		||||
				id: undefined,
 | 
			
		||||
        bomId: undefined,
 | 
			
		||||
        materialId:null,
 | 
			
		||||
        materialId:[],
 | 
			
		||||
        num: undefined,
 | 
			
		||||
        remark:undefined
 | 
			
		||||
			},
 | 
			
		||||
			dataRule: {
 | 
			
		||||
				attrName: [{ required: true, message: '名称不能为空', trigger: 'blur' }],
 | 
			
		||||
        materialId: [{ required: true, message: '名称不能为空', trigger: 'change' }],
 | 
			
		||||
        num: [{ required: true, message: '数量不能为空', trigger: 'blur' }],
 | 
			
		||||
			},
 | 
			
		||||
		};
 | 
			
		||||
  },
 | 
			
		||||
@@ -79,8 +84,11 @@ export default {
 | 
			
		||||
          getProcessEquMaterialBomDet({
 | 
			
		||||
						id: this.dataForm.id
 | 
			
		||||
					}).then((res) => {
 | 
			
		||||
            this.dataForm = res.data;
 | 
			
		||||
            // this.dataForm.materialId = materialId;
 | 
			
		||||
            this.dataForm = res.data
 | 
			
		||||
            const arr = []
 | 
			
		||||
            arr.push(res.data.materialId)
 | 
			
		||||
            this.dataForm.materialId =arr
 | 
			
		||||
            console.log(this.dataForm.materialId);
 | 
			
		||||
						// this.dataForm.value = value;
 | 
			
		||||
					});
 | 
			
		||||
				}
 | 
			
		||||
@@ -97,10 +105,16 @@ export default {
 | 
			
		||||
			this.$refs['dataForm'].validate((valid) => {
 | 
			
		||||
				if (valid) {
 | 
			
		||||
					// 修改的提交
 | 
			
		||||
					if (this.dataForm.id) {
 | 
			
		||||
          if (this.dataForm.id) {
 | 
			
		||||
            const dataObj = {
 | 
			
		||||
              materialId: this.dataForm.materialId.toString(),
 | 
			
		||||
              bomId: this.dataForm.bomId,
 | 
			
		||||
              num: this.dataForm.num,
 | 
			
		||||
              id: this.dataForm.id,
 | 
			
		||||
              remark: this.dataForm.remark
 | 
			
		||||
            }
 | 
			
		||||
						updateProcessEquMaterialBomDet({
 | 
			
		||||
							...this.dataForm,
 | 
			
		||||
							productId: this.productId,
 | 
			
		||||
              ...dataObj
 | 
			
		||||
						}).then((response) => {
 | 
			
		||||
							this.$modal.msgSuccess('修改成功');
 | 
			
		||||
							this.visible = false;
 | 
			
		||||
@@ -108,11 +122,16 @@ export default {
 | 
			
		||||
						});
 | 
			
		||||
						return;
 | 
			
		||||
					}
 | 
			
		||||
					// 添加的提交
 | 
			
		||||
					createProcessEquMaterialBomDet({
 | 
			
		||||
						...this.dataForm,
 | 
			
		||||
						productId: this.productId,
 | 
			
		||||
					}).then((response) => {
 | 
			
		||||
          // 添加的提交
 | 
			
		||||
          const dataArr = this.dataForm.materialId.map(ele => {
 | 
			
		||||
            return {
 | 
			
		||||
              materialId: ele,
 | 
			
		||||
              bomId: this.dataForm.bomId,
 | 
			
		||||
              num: this.dataForm.num,
 | 
			
		||||
              remark: this.dataForm.remark
 | 
			
		||||
            }
 | 
			
		||||
          });
 | 
			
		||||
          createProcessEquMaterialBomDetList(dataArr).then((response) => {
 | 
			
		||||
						this.$modal.msgSuccess('新增成功');
 | 
			
		||||
						this.visible = false;
 | 
			
		||||
						this.$emit('refreshDataList');
 | 
			
		||||
 
 | 
			
		||||
@@ -2,7 +2,7 @@
 | 
			
		||||
 * @Author: zwq
 | 
			
		||||
 * @Date: 2021-11-18 14:16:25
 | 
			
		||||
 * @LastEditors: zhp
 | 
			
		||||
 * @LastEditTime: 2023-11-09 14:49:16
 | 
			
		||||
 * @LastEditTime: 2023-11-23 09:20:12
 | 
			
		||||
 * @Description:
 | 
			
		||||
-->
 | 
			
		||||
<template>
 | 
			
		||||
@@ -53,7 +53,7 @@
 | 
			
		||||
          </el-form-item>
 | 
			
		||||
        </el-form>
 | 
			
		||||
      </div>
 | 
			
		||||
      <div class="drawer-body__footer">
 | 
			
		||||
      <div v-if="isdetail" class="drawer-body__footer">
 | 
			
		||||
        <el-button style="" @click="goback()">取消</el-button>
 | 
			
		||||
        <el-button v-if="isdetail" type="primary" @click="goEdit()">
 | 
			
		||||
          编辑
 | 
			
		||||
@@ -63,7 +63,7 @@
 | 
			
		||||
 | 
			
		||||
      <div class="attr-list" v-if="idAttrShow">
 | 
			
		||||
        <small-title style="margin: 16px 0; padding-left: 8px" :no-padding="true">
 | 
			
		||||
          设备物料明细
 | 
			
		||||
          设备参数
 | 
			
		||||
        </small-title>
 | 
			
		||||
 | 
			
		||||
        <div v-if="!isdetail" class="action_btn">
 | 
			
		||||
@@ -100,7 +100,8 @@ import {
 | 
			
		||||
  updateProcessEquValueBom,
 | 
			
		||||
  getEquipmentList,
 | 
			
		||||
  processEquValueBomDetPage,
 | 
			
		||||
  deleteProcessEquValueBomDet
 | 
			
		||||
  deleteProcessEquValueBomDet,
 | 
			
		||||
  getValueCode
 | 
			
		||||
} from '@/api/extend/processEquValueBom';
 | 
			
		||||
import SmallTitle from './SmallTitle';
 | 
			
		||||
import { parseTime } from '../../core/mixins/code-filter';
 | 
			
		||||
@@ -208,7 +209,6 @@ export default {
 | 
			
		||||
		};
 | 
			
		||||
	},
 | 
			
		||||
  mounted() {
 | 
			
		||||
    this.getDict()
 | 
			
		||||
  },
 | 
			
		||||
  methods: {
 | 
			
		||||
    getCode(val) {
 | 
			
		||||
@@ -234,6 +234,9 @@ export default {
 | 
			
		||||
        // console.log(response);
 | 
			
		||||
        this.equipmentList = res.data
 | 
			
		||||
      })
 | 
			
		||||
      getValueCode().then(res => {
 | 
			
		||||
        this.dataForm.code = res.data
 | 
			
		||||
      })
 | 
			
		||||
    },
 | 
			
		||||
		handleClick(raw) {
 | 
			
		||||
			if (raw.type === 'delete') {
 | 
			
		||||
@@ -277,8 +280,9 @@ export default {
 | 
			
		||||
				this.listQuery.total = response.data.total;
 | 
			
		||||
			});
 | 
			
		||||
		},
 | 
			
		||||
		init(id, isdetail) {
 | 
			
		||||
      this.initData();
 | 
			
		||||
    init(id, isdetail) {
 | 
			
		||||
      this.getDict()
 | 
			
		||||
      this.initData()
 | 
			
		||||
      console.log(isdetail);
 | 
			
		||||
			this.isdetail = isdetail || false;
 | 
			
		||||
			this.dataForm.id = id || undefined;
 | 
			
		||||
 
 | 
			
		||||
@@ -1,7 +1,7 @@
 | 
			
		||||
<!--
 | 
			
		||||
 * @Author: zhp
 | 
			
		||||
 * @Date: 2023-11-08 15:30:27
 | 
			
		||||
 * @LastEditTime: 2023-11-09 14:44:49
 | 
			
		||||
 * @LastEditTime: 2023-11-23 14:26:54
 | 
			
		||||
 * @LastEditors: zhp
 | 
			
		||||
 * @Description:
 | 
			
		||||
-->
 | 
			
		||||
@@ -18,19 +18,19 @@
 | 
			
		||||
    <el-form ref="dataForm" :model="dataForm" :rules="dataRule" label-width="100px"
 | 
			
		||||
      @keyup.enter.native="dataFormSubmit()">
 | 
			
		||||
      <el-form-item label="参数名称" prop="paramId">
 | 
			
		||||
        <el-select v-model="dataForm.paramId" filterable placeholder="参数名称" @change="getData">
 | 
			
		||||
        <el-select v-model="dataForm.paramId" filterable placeholder="参数名称" @change="getData" multiple >
 | 
			
		||||
          <el-option v-for="dict in materialList" :key=" dict.id" :label="dict.name" :value="dict.id" />
 | 
			
		||||
        </el-select>
 | 
			
		||||
      </el-form-item>
 | 
			
		||||
      <!-- <el-form-item label="参数编码" prop="code">
 | 
			
		||||
        <el-input v-model="dataForm.code" placeholder="请输入参数编码" clearable />
 | 
			
		||||
      </el-form-item> -->
 | 
			
		||||
      <el-form-item label="标准最小值" prop="standardMinValue">
 | 
			
		||||
      <!-- <el-form-item label="标准最小值" prop="standardMinValue">
 | 
			
		||||
        <el-input v-model="dataForm.standardMinValue" placeholder="请输入标准最小值" clearable />
 | 
			
		||||
      </el-form-item>
 | 
			
		||||
      <el-form-item label="标准最大值" prop="standardMaxValue">
 | 
			
		||||
        <el-input v-model="dataForm.standardMaxValue" placeholder="请输入标准最大值" clearable />
 | 
			
		||||
      </el-form-item>
 | 
			
		||||
      </el-form-item> -->
 | 
			
		||||
      <el-form-item label="工艺最小值" prop="minValue">
 | 
			
		||||
        <el-input v-model="dataForm.minValue" placeholder="请输入工艺最小值" clearable />
 | 
			
		||||
      </el-form-item>
 | 
			
		||||
@@ -55,7 +55,7 @@
 | 
			
		||||
<script>
 | 
			
		||||
import {
 | 
			
		||||
  getProcessEquValueBomDet,
 | 
			
		||||
  createProcessEquValueBomDet,
 | 
			
		||||
  createProcessEquValueBomDetList,
 | 
			
		||||
  updateProcessEquValueBomDet,
 | 
			
		||||
  getValueList
 | 
			
		||||
} from '@/api/extend/processEquValueBom';
 | 
			
		||||
@@ -74,7 +74,7 @@ export default {
 | 
			
		||||
			dataForm: {
 | 
			
		||||
				id: undefined,
 | 
			
		||||
        bomId: undefined,
 | 
			
		||||
        paramId:undefined,
 | 
			
		||||
        paramId:[],
 | 
			
		||||
        minValue:undefined,
 | 
			
		||||
        maxValue: undefined,
 | 
			
		||||
        defaultValue: undefined,
 | 
			
		||||
@@ -117,6 +117,10 @@ export default {
 | 
			
		||||
						id: this.dataForm.id
 | 
			
		||||
					}).then((res) => {
 | 
			
		||||
            this.dataForm = res.data;
 | 
			
		||||
            const arr = []
 | 
			
		||||
            arr.push(res.data.paramId)
 | 
			
		||||
            this.dataForm.paramId = arr
 | 
			
		||||
            console.log(this.dataForm.paramId);
 | 
			
		||||
            // this.dataForm.materialId = materialId;
 | 
			
		||||
						// this.dataForm.value = value;
 | 
			
		||||
					});
 | 
			
		||||
@@ -137,22 +141,41 @@ export default {
 | 
			
		||||
			this.$refs['dataForm'].validate((valid) => {
 | 
			
		||||
				if (valid) {
 | 
			
		||||
					// 修改的提交
 | 
			
		||||
					if (this.dataForm.id) {
 | 
			
		||||
          if (this.dataForm.id) {
 | 
			
		||||
            const dataObj = {
 | 
			
		||||
              paramId: this.dataForm.paramId.toString(),
 | 
			
		||||
              bomId: this.dataForm.bomId,
 | 
			
		||||
              minValue: this.dataForm.minValue,
 | 
			
		||||
              maxValue: this.dataForm.maxValue,
 | 
			
		||||
              defaultValue: this.dataForm.defaultValue,
 | 
			
		||||
              standardMinValue: this.dataForm.standardMinValue,
 | 
			
		||||
              standardMaxValue: this.dataForm.standardMaxValue,
 | 
			
		||||
              remark: this.dataForm.remark,
 | 
			
		||||
              id: this.dataForm.id
 | 
			
		||||
            }
 | 
			
		||||
						updateProcessEquValueBomDet({
 | 
			
		||||
							...this.dataForm,
 | 
			
		||||
							productId: this.productId,
 | 
			
		||||
              ...dataObj,
 | 
			
		||||
						}).then((response) => {
 | 
			
		||||
							this.$modal.msgSuccess('修改成功');
 | 
			
		||||
							this.visible = false;
 | 
			
		||||
							this.$emit('refreshDataList');
 | 
			
		||||
						});
 | 
			
		||||
						return;
 | 
			
		||||
					}
 | 
			
		||||
          }
 | 
			
		||||
          const dataArr = this.dataForm.paramId.map(ele => {
 | 
			
		||||
            return {
 | 
			
		||||
              paramId: ele,
 | 
			
		||||
              bomId: this.dataForm.bomId,
 | 
			
		||||
              minValue: this.dataForm.minValue,
 | 
			
		||||
              maxValue: this.dataForm.maxValue,
 | 
			
		||||
              defaultValue: this.dataForm.defaultValue,
 | 
			
		||||
              standardMinValue: this.dataForm.standardMinValue,
 | 
			
		||||
              standardMaxValue: this.dataForm.standardMaxValue,
 | 
			
		||||
              remark: this.dataForm.remark
 | 
			
		||||
            }
 | 
			
		||||
          });
 | 
			
		||||
					// 添加的提交
 | 
			
		||||
					createProcessEquValueBomDet({
 | 
			
		||||
						...this.dataForm,
 | 
			
		||||
						productId: this.productId,
 | 
			
		||||
					}).then((response) => {
 | 
			
		||||
          createProcessEquValueBomDetList(dataArr).then((response) => {
 | 
			
		||||
						this.$modal.msgSuccess('新增成功');
 | 
			
		||||
						this.visible = false;
 | 
			
		||||
						this.$emit('refreshDataList');
 | 
			
		||||
 
 | 
			
		||||
@@ -2,7 +2,7 @@
 | 
			
		||||
 * @Author: zwq
 | 
			
		||||
 * @Date: 2023-08-01 14:55:51
 | 
			
		||||
 * @LastEditors: zhp
 | 
			
		||||
 * @LastEditTime: 2023-11-10 10:23:33
 | 
			
		||||
 * @LastEditTime: 2023-11-22 14:23:40
 | 
			
		||||
 * @Description:
 | 
			
		||||
-->
 | 
			
		||||
<template>
 | 
			
		||||
@@ -70,7 +70,7 @@ const tableProps = [
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    prop: 'yield',
 | 
			
		||||
    label: '成品率'
 | 
			
		||||
    label: '合格率'
 | 
			
		||||
  }
 | 
			
		||||
];
 | 
			
		||||
 | 
			
		||||
@@ -115,19 +115,19 @@ export default {
 | 
			
		||||
          valueField: 'id',
 | 
			
		||||
          param: 'orderName'
 | 
			
		||||
        },
 | 
			
		||||
        // {
 | 
			
		||||
        //   type: 'datePicker',
 | 
			
		||||
        //   label: '时间段',
 | 
			
		||||
        //   dateType: 'daterange',
 | 
			
		||||
        //   format: 'yyyy-MM-dd',
 | 
			
		||||
        //   valueFormat: "yyyy-MM-dd",
 | 
			
		||||
        //   rangeSeparator: '-',
 | 
			
		||||
        //   startPlaceholder: '开始时间',
 | 
			
		||||
        //   endPlaceholder: '结束时间',
 | 
			
		||||
        //   param: 'timeVal',
 | 
			
		||||
        //   defaultSelect: [],
 | 
			
		||||
        //   width: 250
 | 
			
		||||
        // },
 | 
			
		||||
        {
 | 
			
		||||
          type: 'datePicker',
 | 
			
		||||
          label: '工单开始时间',
 | 
			
		||||
          dateType: 'daterange',
 | 
			
		||||
          format: 'yyyy-MM-dd',
 | 
			
		||||
          valueFormat: "yyyy-MM-dd",
 | 
			
		||||
          rangeSeparator: '-',
 | 
			
		||||
          startPlaceholder: '开始时间',
 | 
			
		||||
          endPlaceholder: '结束时间',
 | 
			
		||||
          param: 'timeVal',
 | 
			
		||||
          defaultSelect: [],
 | 
			
		||||
          width: 250
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
          type: 'button',
 | 
			
		||||
          btnName: '搜索',
 | 
			
		||||
@@ -238,13 +238,13 @@ export default {
 | 
			
		||||
      if (val.btnName === 'search') {
 | 
			
		||||
        this.listQuery.orderName = val.orderName ? val.orderName :undefined
 | 
			
		||||
        // this.queryParams.status = val.status
 | 
			
		||||
        // if (val.timeVal && val.timeVal.length != 0 ) {
 | 
			
		||||
        // this.listQuery.startTime =  val.timeVal[0] + ' 00:00:00'
 | 
			
		||||
        // this.listQuery.endTime = val.timeVal[1] + ' 23:59:59'
 | 
			
		||||
        // } else {
 | 
			
		||||
        //   this.listQuery.startTime = undefined
 | 
			
		||||
        //   this.listQuery.endTime = undefined
 | 
			
		||||
        // }
 | 
			
		||||
        if (val.timeVal && val.timeVal.length != 0 ) {
 | 
			
		||||
        this.listQuery.startTime =  val.timeVal[0] + ' 00:00:00'
 | 
			
		||||
        this.listQuery.endTime = val.timeVal[1] + ' 23:59:59'
 | 
			
		||||
        } else {
 | 
			
		||||
          this.listQuery.startTime = undefined
 | 
			
		||||
          this.listQuery.endTime = undefined
 | 
			
		||||
        }
 | 
			
		||||
        this.getList()
 | 
			
		||||
      } else {
 | 
			
		||||
        // this.handleExport()
 | 
			
		||||
 
 | 
			
		||||
@@ -156,7 +156,7 @@ export default {
 | 
			
		||||
              }
 | 
			
		||||
            })
 | 
			
		||||
          } else {
 | 
			
		||||
            createGroupClasses({ ...obj }).then((res) => {
 | 
			
		||||
            createGroupClasses({ ...this.form }).then((res) => {
 | 
			
		||||
              if (res.code === 0) {
 | 
			
		||||
                this.$modal.msgSuccess("操作成功");
 | 
			
		||||
                this.$emit('successSubmit')
 | 
			
		||||
 
 | 
			
		||||
@@ -1,6 +1,6 @@
 | 
			
		||||
<template>
 | 
			
		||||
  <div>
 | 
			
		||||
    <el-drawer :title="title" :visible.sync="visible" size="70%" @close='closeD'>
 | 
			
		||||
    <el-drawer :title="title" :visible.sync="visible" size="70%" @close='closeD' :show-close='false'>
 | 
			
		||||
      <div class="box">
 | 
			
		||||
        <el-row class="topBox">
 | 
			
		||||
          <el-col :span="6">
 | 
			
		||||
@@ -59,6 +59,7 @@
 | 
			
		||||
      @cancel="handleCancel"
 | 
			
		||||
      @confirm="handleConfirm"
 | 
			
		||||
      :before-close="handleCancel"
 | 
			
		||||
      width='40%'
 | 
			
		||||
    >
 | 
			
		||||
      <worker-team-add ref="workerTeamAdd" @successSubmit="successSubmit" />
 | 
			
		||||
    </base-dialog>
 | 
			
		||||
 
 | 
			
		||||
@@ -38,6 +38,7 @@
 | 
			
		||||
      @cancel="handleCancel"
 | 
			
		||||
      @confirm="handleConfirm"
 | 
			
		||||
      :before-close="handleCancel"
 | 
			
		||||
      width='40%'
 | 
			
		||||
    >
 | 
			
		||||
      <group-team-add ref="groupList" @successSubmit="successSubmit" />
 | 
			
		||||
    </base-dialog>
 | 
			
		||||
@@ -50,15 +51,15 @@
 | 
			
		||||
import { getGroupTeamPage, deleteGroupTeam, updateGroupTeam } from "@/api/base/groupTeam";
 | 
			
		||||
import { parseTime } from '@/utils/ruoyi'
 | 
			
		||||
import GroupTeamAdd from './components/groupTeamAdd'
 | 
			
		||||
import StatusBtn from './components/statusBtn.vue'
 | 
			
		||||
import WorkerOperate from './components/workerOperate.vue'
 | 
			
		||||
import WorkerEdit from './components/workerEdit.vue';
 | 
			
		||||
import StatusBtn from './components/statusBtn'
 | 
			
		||||
import WorkerOperate from './components/workerOperate'
 | 
			
		||||
import WorkerEdit from './components/workerEdit'
 | 
			
		||||
const tableProps = [
 | 
			
		||||
  {
 | 
			
		||||
    prop: 'createTime',
 | 
			
		||||
    label: '创建时间',
 | 
			
		||||
    filter: parseTime,
 | 
			
		||||
    minWidth: 150
 | 
			
		||||
    minWidth: 160
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    prop: 'name',
 | 
			
		||||
 
 | 
			
		||||
Some files were not shown because too many files have changed in this diff Show More
		Reference in New Issue
	
	Block a user