Compare commits
	
		
			55 Commits
		
	
	
		
			projects/m
			...
			projects/m
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 
						 | 
					1537b1be58 | ||
| 
						 | 
					b2304941a4 | ||
| 14b2a49053 | |||
| 
						 | 
					6adac714f0 | ||
| 
						 | 
					0349f3cde0 | ||
| 
						 | 
					4cafa78908 | ||
| 61ef172534 | |||
| 
						 | 
					19d913a49e | ||
| 
						 | 
					70c3fd44d6 | ||
| 78d6f0bb23 | |||
| 
						 | 
					cf51eff0b7 | ||
| 
						 | 
					539dddf217 | ||
| 
						 | 
					317d01934b | ||
| 
						 | 
					cdfe5c9c1b | ||
| c1ea5157a5 | |||
| 41ceefc20e | |||
| 54425859b5 | |||
| a2a4f8dccd | |||
| 
						 | 
					fd3b054108 | ||
| 
						 | 
					dacae0cbd8 | ||
| 
						 | 
					be83c8196e | ||
| 
						 | 
					ef3f5d3fe7 | ||
| 
						 | 
					ec550f22ec | ||
| 
						 | 
					60633ac581 | ||
| 
						 | 
					9351b82d11 | ||
| 5e4227ba25 | |||
| 82f63dc4ff | |||
| 9a29185410 | |||
| 43e824f958 | |||
| 
						 | 
					de831b339f | ||
| 
						 | 
					f0105c377c | ||
| 3ba5574669 | |||
| 
						 | 
					082988d6d7 | ||
| 
						 | 
					7acb861919 | ||
| c41153a946 | |||
| 6d658d9212 | |||
| bf4bab2f3c | |||
| 20f0efa413 | |||
| 
						 | 
					c48f81b1d9 | ||
| 
						 | 
					7233720c2e | ||
| 6a491ff498 | |||
| 
						 | 
					be607e4bf3 | ||
| 
						 | 
					87ef42e277 | ||
| aa65a7e97e | |||
| 
						 | 
					b8d26c87d8 | ||
| b89f510e61 | |||
| 
						 | 
					0e60f426bc | ||
| 
						 | 
					21f4879394 | ||
| 067cd4765e | |||
| 3c4fe6daaa | |||
| 
						 | 
					e24f9c1079 | ||
| 
						 | 
					61567ce86a | ||
| 2ee66714ca | |||
| ab5867c4fd | |||
| 9a53391999 | 
@@ -1,3 +1,3 @@
 | 
				
			|||||||
.dockerignore
 | 
					.dockerignore
 | 
				
			||||||
dist
 | 
					#dist
 | 
				
			||||||
node_modules
 | 
					node_modules
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										59
									
								
								.drone.yml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										59
									
								
								.drone.yml
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,59 @@
 | 
				
			|||||||
 | 
					---
 | 
				
			||||||
 | 
					kind: pipeline
 | 
				
			||||||
 | 
					type: docker
 | 
				
			||||||
 | 
					name: default
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					steps:
 | 
				
			||||||
 | 
					- name: build
 | 
				
			||||||
 | 
					  image: node:16-alpine
 | 
				
			||||||
 | 
					  pull: if_not_exists
 | 
				
			||||||
 | 
					  environment:
 | 
				
			||||||
 | 
					    NODE_ENV: ""
 | 
				
			||||||
 | 
					  commands:
 | 
				
			||||||
 | 
					  #- yarn install --frozen-lockfile
 | 
				
			||||||
 | 
					  - yarn install 
 | 
				
			||||||
 | 
					  - env ${NODE_ENV} yarn build:prod 
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					- name: publish
 | 
				
			||||||
 | 
					  image: docker:dind
 | 
				
			||||||
 | 
					  pull: if_not_exists
 | 
				
			||||||
 | 
					  volumes:
 | 
				
			||||||
 | 
					  - name: dockersock
 | 
				
			||||||
 | 
					    path: /var/run/docker.sock
 | 
				
			||||||
 | 
					  - name: dockerconfig
 | 
				
			||||||
 | 
					    path: /root/.docker
 | 
				
			||||||
 | 
					  commands:
 | 
				
			||||||
 | 
					  - docker build -t hub.kszny.picaiba.com/kszny/xcac-ui ./
 | 
				
			||||||
 | 
					  - docker push hub.kszny.picaiba.com/kszny/xcac-ui
 | 
				
			||||||
 | 
					  depends_on:
 | 
				
			||||||
 | 
					  - build
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					- name: deploy
 | 
				
			||||||
 | 
					  image: appleboy/drone-ssh
 | 
				
			||||||
 | 
					  pull: if-not-exists
 | 
				
			||||||
 | 
					  settings:
 | 
				
			||||||
 | 
					    host:
 | 
				
			||||||
 | 
					      - 172.24.145.74
 | 
				
			||||||
 | 
					    username: root
 | 
				
			||||||
 | 
					    password: Root@123
 | 
				
			||||||
 | 
					    port: 22
 | 
				
			||||||
 | 
					    command_timeout: 2m
 | 
				
			||||||
 | 
					    script:
 | 
				
			||||||
 | 
					    - docker pull hub.kszny.picaiba.com/kszny/xcac-ui
 | 
				
			||||||
 | 
					    - docker run --rm -v /data/www/xcac:/tmp hub.kszny.picaiba.com/kszny/xcac-ui sh -c "rm -rf /tmp/* && mv -f /html /tmp"
 | 
				
			||||||
 | 
					  depends_on:
 | 
				
			||||||
 | 
					  - publish
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					volumes:
 | 
				
			||||||
 | 
					- name: dockersock
 | 
				
			||||||
 | 
					  host:
 | 
				
			||||||
 | 
					    path: /var/run/docker.sock
 | 
				
			||||||
 | 
					- name: dockerconfig
 | 
				
			||||||
 | 
					  host:
 | 
				
			||||||
 | 
					    path: /root/.docker
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					trigger:
 | 
				
			||||||
 | 
					  branch:
 | 
				
			||||||
 | 
					  - projects/mesxc-test
 | 
				
			||||||
 | 
					  event:
 | 
				
			||||||
 | 
					  - push
 | 
				
			||||||
							
								
								
									
										6
									
								
								.env.dev
									
									
									
									
									
								
							
							
						
						
									
										6
									
								
								.env.dev
									
									
									
									
									
								
							@@ -1,8 +1,8 @@
 | 
				
			|||||||
###
 | 
					###
 | 
				
			||||||
 # @Author: zhp
 | 
					 # @Author: zhp
 | 
				
			||||||
 # @Date: 2024-04-12 14:30:48
 | 
					 # @Date: 2024-04-12 14:30:48
 | 
				
			||||||
 # @LastEditTime: 2024-04-23 17:25:25
 | 
					 # @LastEditTime: 2024-04-25 10:07:02
 | 
				
			||||||
 # @LastEditors: DY
 | 
					 # @LastEditors: zhp
 | 
				
			||||||
 # @Description:
 | 
					 # @Description:
 | 
				
			||||||
###
 | 
					###
 | 
				
			||||||
# 开发环境配置
 | 
					# 开发环境配置
 | 
				
			||||||
@@ -13,7 +13,7 @@ VUE_APP_TITLE = MES系统
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
# 芋道管理系统/开发环境
 | 
					# 芋道管理系统/开发环境
 | 
				
			||||||
VUE_APP_BASE_API = 'http://192.168.0.33:48082'
 | 
					VUE_APP_BASE_API = 'http://192.168.0.33:48082'
 | 
				
			||||||
# VUE_APP_BASE_API = 'http://192.168.4.176:48082'
 | 
					# VUE_APP_BASE_API = 'http://192.168.1.104:48082'
 | 
				
			||||||
# 积木报表指向地址
 | 
					# 积木报表指向地址
 | 
				
			||||||
VUE_APP_JIMU_API = 'http://192.168.1.101:48082'
 | 
					VUE_APP_JIMU_API = 'http://192.168.1.101:48082'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										24
									
								
								Dockerfile
									
									
									
									
									
								
							
							
						
						
									
										24
									
								
								Dockerfile
									
									
									
									
									
								
							@@ -1,21 +1,3 @@
 | 
				
			|||||||
FROM node:16-alpine as build-stage
 | 
					FROM busybox 
 | 
				
			||||||
 | 
					LABEL maintainer thomas.hairong@gmail.com
 | 
				
			||||||
WORKDIR /admim
 | 
					COPY dist /html/
 | 
				
			||||||
 | 
					 | 
				
			||||||
COPY .npmrc package.json yarn.lock ./
 | 
					 | 
				
			||||||
RUN --mount=type=cache,id=yarn-store,target=/root/.yarn-store \
 | 
					 | 
				
			||||||
    yarn install --frozen-lockfile
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
COPY . .
 | 
					 | 
				
			||||||
ARG NODE_ENV=""
 | 
					 | 
				
			||||||
RUN env ${NODE_ENV} yarn build:prod
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
## -- stage: dist => nginx --
 | 
					 | 
				
			||||||
FROM nginx:alpine
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
ENV TZ=Asia/Shanghai
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
COPY ./nginx.conf /etc/nginx/conf.d/default.conf
 | 
					 | 
				
			||||||
COPY --from=build-stage /admim/dist /usr/share/nginx/html
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
EXPOSE 80
 | 
					 | 
				
			||||||
 
 | 
				
			|||||||
@@ -50,7 +50,7 @@
 | 
				
			|||||||
    "benz-amr-recorder": "^1.1.5",
 | 
					    "benz-amr-recorder": "^1.1.5",
 | 
				
			||||||
    "bpmn-js-token-simulation": "0.10.0",
 | 
					    "bpmn-js-token-simulation": "0.10.0",
 | 
				
			||||||
    "clipboard": "2.0.8",
 | 
					    "clipboard": "2.0.8",
 | 
				
			||||||
    "code-brick-zj": "^1.0.5",
 | 
					    "code-brick-zj": "^1.1.0",
 | 
				
			||||||
    "core-js": "^3.26.0",
 | 
					    "core-js": "^3.26.0",
 | 
				
			||||||
    "crypto-js": "^4.0.0",
 | 
					    "crypto-js": "^4.0.0",
 | 
				
			||||||
    "diagram-js": "^12.3.0",
 | 
					    "diagram-js": "^12.3.0",
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,8 +1,8 @@
 | 
				
			|||||||
/*
 | 
					/*
 | 
				
			||||||
 * @Author: zhp
 | 
					 * @Author: zhp
 | 
				
			||||||
 * @Date: 2023-10-31 10:55:20
 | 
					 * @Date: 2023-10-31 10:55:20
 | 
				
			||||||
 * @LastEditTime: 2023-12-06 14:09:14
 | 
					 * @LastEditTime: 2024-04-25 15:28:44
 | 
				
			||||||
 * @LastEditors: zhp
 | 
					 * @LastEditors: DY
 | 
				
			||||||
 * @Description:
 | 
					 * @Description:
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
import request from '@/utils/request'
 | 
					import request from '@/utils/request'
 | 
				
			||||||
@@ -34,11 +34,11 @@ export function exportEnergyPlcExcel(query) {
 | 
				
			|||||||
  })
 | 
					  })
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export function getOriginalGlassRetrace(query) {
 | 
					export function getOriginalGlassRetrace(data) {
 | 
				
			||||||
   return request({
 | 
					   return request({
 | 
				
			||||||
    url: '/base/original-glass-statistics/originalGlassRetrace',
 | 
					    url: '/base/original-glass-statistics/originalGlassRetrace',
 | 
				
			||||||
    method: 'get',
 | 
					    method: 'post',
 | 
				
			||||||
    params: query,
 | 
					    data
 | 
				
			||||||
  })
 | 
					  })
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,7 +1,7 @@
 | 
				
			|||||||
/*
 | 
					/*
 | 
				
			||||||
 * @Author: Do not edit
 | 
					 * @Author: Do not edit
 | 
				
			||||||
 * @Date: 2023-12-08 10:26:48
 | 
					 * @Date: 2023-12-08 10:26:48
 | 
				
			||||||
 * @LastEditTime: 2023-12-13 17:16:00
 | 
					 * @LastEditTime: 2024-04-24 16:31:37
 | 
				
			||||||
 * @LastEditors: DY
 | 
					 * @LastEditors: DY
 | 
				
			||||||
 * @Description: 
 | 
					 * @Description: 
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
@@ -59,3 +59,39 @@ export function exportGlasscExcel(query) {
 | 
				
			|||||||
    responseType: 'blob'
 | 
					    responseType: 'blob'
 | 
				
			||||||
  })
 | 
					  })
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// 生产月报查询--冷端生产线
 | 
				
			||||||
 | 
					export function productionMonthY(data) {
 | 
				
			||||||
 | 
					  return request({
 | 
				
			||||||
 | 
					    url: '/extend/customized-reports/productionMonthY',
 | 
				
			||||||
 | 
					    method: 'post',
 | 
				
			||||||
 | 
					    data: data
 | 
				
			||||||
 | 
					  })
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// 生产月报查询--深加工生产线
 | 
				
			||||||
 | 
					export function productionMonthD(data) {
 | 
				
			||||||
 | 
					  return request({
 | 
				
			||||||
 | 
					    url: '/extend/customized-reports/productionMonthD',
 | 
				
			||||||
 | 
					    method: 'post',
 | 
				
			||||||
 | 
					    data: data
 | 
				
			||||||
 | 
					  })
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// 生产年报查询--冷端生产线
 | 
				
			||||||
 | 
					export function productionYearY(data) {
 | 
				
			||||||
 | 
					  return request({
 | 
				
			||||||
 | 
					    url: '/extend/customized-reports/productionYearY',
 | 
				
			||||||
 | 
					    method: 'post',
 | 
				
			||||||
 | 
					    data: data
 | 
				
			||||||
 | 
					  })
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// 生产年报查询--冷端生产线
 | 
				
			||||||
 | 
					export function productionYearD(data) {
 | 
				
			||||||
 | 
					  return request({
 | 
				
			||||||
 | 
					    url: '/extend/customized-reports/productionYearD',
 | 
				
			||||||
 | 
					    method: 'post',
 | 
				
			||||||
 | 
					    data: data
 | 
				
			||||||
 | 
					  })
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,7 +1,7 @@
 | 
				
			|||||||
<!--
 | 
					<!--
 | 
				
			||||||
 * @Author: zhp
 | 
					 * @Author: zhp
 | 
				
			||||||
 * @Date: 2024-01-29 16:50:26
 | 
					 * @Date: 2024-01-29 16:50:26
 | 
				
			||||||
 * @LastEditTime: 2024-04-22 09:42:45
 | 
					 * @LastEditTime: 2024-04-25 09:03:50
 | 
				
			||||||
 * @LastEditors: zhp
 | 
					 * @LastEditors: zhp
 | 
				
			||||||
 * @Description:
 | 
					 * @Description:
 | 
				
			||||||
-->
 | 
					-->
 | 
				
			||||||
@@ -628,7 +628,7 @@ export default {
 | 
				
			|||||||
            `<span style="color:rgba(255,255,255,0.5)">${this.NumFormat(item.productArea) + '㎡' || ''}</span>`,
 | 
					            `<span style="color:rgba(255,255,255,0.5)">${this.NumFormat(item.productArea) + '㎡' || ''}</span>`,
 | 
				
			||||||
            `<span style="color:rgba(255,255,255,0.5)">${this.NumFormat(item.wasteArea) + '㎡' || ''}</span>`,
 | 
					            `<span style="color:rgba(255,255,255,0.5)">${this.NumFormat(item.wasteArea) + '㎡' || ''}</span>`,
 | 
				
			||||||
            `<div style = "${(item.product * 100).toFixed(0) >= 91 ? 'display:block;color:#00FFF7' : 'display:none;'}">${(item.product * 100).toFixed(0) + '%' || ''}</div>
 | 
					            `<div style = "${(item.product * 100).toFixed(0) >= 91 ? 'display:block;color:#00FFF7' : 'display:none;'}">${(item.product * 100).toFixed(0) + '%' || ''}</div>
 | 
				
			||||||
           <div style = "${(item.product * 100).toFixed(0) <= 91 ? 'display:block; color:rgba(255, 209, 96, 1)' : 'display:none;'}">${(item.product * 100).toFixed(0) + '%' || ''}</div>`
 | 
					           <div style = "${(item.product * 100).toFixed(0) <= 91 ? 'display:block; color:rgba(255, 209, 96, 1)' : 'display:none;'}">${(item.product * 100).toFixed(2) + '%' || ''}</div>`
 | 
				
			||||||
          ])
 | 
					          ])
 | 
				
			||||||
          this.cutConfig.data = cutArr
 | 
					          this.cutConfig.data = cutArr
 | 
				
			||||||
          // this.$nextTick(() => {
 | 
					          // this.$nextTick(() => {
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,7 +1,7 @@
 | 
				
			|||||||
<!--
 | 
					<!--
 | 
				
			||||||
 * @Author: zhp
 | 
					 * @Author: zhp
 | 
				
			||||||
 * @Date: 2024-01-29 13:45:56
 | 
					 * @Date: 2024-01-29 13:45:56
 | 
				
			||||||
 * @LastEditTime: 2024-04-17 15:48:21
 | 
					 * @LastEditTime: 2024-04-24 15:48:32
 | 
				
			||||||
 * @LastEditors: zhp
 | 
					 * @LastEditors: zhp
 | 
				
			||||||
 * @Description:
 | 
					 * @Description:
 | 
				
			||||||
-->
 | 
					-->
 | 
				
			||||||
@@ -113,7 +113,7 @@ export default {
 | 
				
			|||||||
				color:this.colors,
 | 
									color:this.colors,
 | 
				
			||||||
				title:{
 | 
									title:{
 | 
				
			||||||
					text: num,
 | 
										text: num,
 | 
				
			||||||
					subtext: '总数/片',
 | 
										subtext: '总数/个',
 | 
				
			||||||
					top: '32%',
 | 
										top: '32%',
 | 
				
			||||||
					left: '49%',
 | 
										left: '49%',
 | 
				
			||||||
					textAlign: 'center',
 | 
										textAlign: 'center',
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -2,7 +2,7 @@
 | 
				
			|||||||
 * @Author: zwq
 | 
					 * @Author: zwq
 | 
				
			||||||
 * @Date: 2021-07-19 15:18:30
 | 
					 * @Date: 2021-07-19 15:18:30
 | 
				
			||||||
 * @LastEditors: zhp
 | 
					 * @LastEditors: zhp
 | 
				
			||||||
 * @LastEditTime: 2024-04-24 14:48:00
 | 
					 * @LastEditTime: 2024-04-26 09:57:41
 | 
				
			||||||
 * @Description:
 | 
					 * @Description:
 | 
				
			||||||
-->
 | 
					-->
 | 
				
			||||||
<template>
 | 
					<template>
 | 
				
			||||||
@@ -42,21 +42,27 @@
 | 
				
			|||||||
              <el-row v-for="op in orderList" :key="op.id" style="margin-bottom: .5em;overflow: hidden;">
 | 
					              <el-row v-for="op in orderList" :key="op.id" style="margin-bottom: .5em;overflow: hidden;">
 | 
				
			||||||
                <!-- <el-col :span="12"> -->
 | 
					                <!-- <el-col :span="12"> -->
 | 
				
			||||||
                <!-- <div style="height: 34px;"> -->
 | 
					                <!-- <div style="height: 34px;"> -->
 | 
				
			||||||
                <span style="display: inline-block;width: 330px;">
 | 
					                <span style="display: inline-block;width: 400px">
 | 
				
			||||||
                  <span class="now-secondary-title" style="font-size: 14px;opacity: calc(.6);">{{ op.name }}</span>
 | 
					                  <span v-if="op.name" class="now-secondary-title" style="font-size: 14px;opacity: calc(.6);">{{ op.name
 | 
				
			||||||
                  <el-divider class="split" v-if="op.specifications" direction="vertical"></el-divider>
 | 
					                  }}</span>
 | 
				
			||||||
 | 
					                  <el-divider v-if="op.specifications" class="split" direction="vertical"></el-divider>
 | 
				
			||||||
                  <!-- <span v-if="op.size" class="split"></span> -->
 | 
					                  <!-- <span v-if="op.size" class="split"></span> -->
 | 
				
			||||||
                  <span v-if="op.specifications" class="orderSize" style="font-size: 14px;opacity: calc(.6);">{{
 | 
					                  <span v-if="op.specifications" class="orderSize" style="font-size: 14px;opacity: calc(.6);">{{
 | 
				
			||||||
                    op.specifications }}</span>
 | 
					                  op.specifications }}</span>
 | 
				
			||||||
                  <el-divider class="split" v-if="op.planQuantity" direction="vertical"></el-divider>
 | 
					                  <el-divider class="split" v-if="op.planQuantity" direction="vertical"></el-divider>
 | 
				
			||||||
                  <span v-if="op.planQuantity" class="orderPlan" style="font-size: 14px;opacity: calc(.6);">{{
 | 
					                  <span v-if="op.planQuantity" class="orderPlan" style="font-size: 14px;opacity: calc(.6);">{{
 | 
				
			||||||
                    op.planQuantity }}</span>
 | 
					                  op.planQuantity }}</span>
 | 
				
			||||||
 | 
					                  <span v-if="op.planQuantity" class="orderFinishTwo"
 | 
				
			||||||
 | 
					                    style="font-size: 14px;opacity: calc(.6);">片</span>
 | 
				
			||||||
                </span>
 | 
					                </span>
 | 
				
			||||||
                <span v-if="op.actualQuantity" class="orderFinish" style="font-size: 14px;margin-left: 130px;">{{
 | 
					                <!-- <span style="overflow: hidden;"> -->
 | 
				
			||||||
                  op.actualQuantity
 | 
					                <span class="orderFinish" style="font-size: 14px;margin-left: 40px;">{{
 | 
				
			||||||
                  }}</span>
 | 
					                op.actualQuantity
 | 
				
			||||||
 | 
					                }}</span>
 | 
				
			||||||
 | 
					                <span v-if="op.actualQuantity" class="orderFinishTwo" style="font-size: 14px">片</span>
 | 
				
			||||||
                <el-divider class="split" style="background-color: rgba(0, 255, 247, 1)" v-if="op.actualQuantity"
 | 
					                <el-divider class="split" style="background-color: rgba(0, 255, 247, 1)" v-if="op.actualQuantity"
 | 
				
			||||||
                  direction="vertical"></el-divider>
 | 
					                  direction="vertical"></el-divider>
 | 
				
			||||||
 | 
					                <!-- </span> -->
 | 
				
			||||||
                <!-- </div> -->
 | 
					                <!-- </div> -->
 | 
				
			||||||
                <el-progress style="width: 620px;" text-color="rgba(0, 255, 247, 1)" :stroke-width="10"
 | 
					                <el-progress style="width: 620px;" text-color="rgba(0, 255, 247, 1)" :stroke-width="10"
 | 
				
			||||||
                  define-back-color="rgba(32, 57, 96, 1)" :percentage="op.progressRate" class="custom-progress-bar" />
 | 
					                  define-back-color="rgba(32, 57, 96, 1)" :percentage="op.progressRate" class="custom-progress-bar" />
 | 
				
			||||||
@@ -80,7 +86,7 @@
 | 
				
			|||||||
          </base-container>
 | 
					          </base-container>
 | 
				
			||||||
        </el-col>
 | 
					        </el-col>
 | 
				
			||||||
        <el-col :style="{ margin: 8 + 'px' + ' 0' }" :span="12">
 | 
					        <el-col :style="{ margin: 8 + 'px' + ' 0' }" :span="12">
 | 
				
			||||||
          <base-container  :show-time="true" :no-content-padding="true" :height="318 + 338 + 16" :size="'eqStatus'"
 | 
					          <base-container :show-time="true" :no-content-padding="true" :height="318 + 338 + 16" :size="'eqStatus'"
 | 
				
			||||||
            :title="'产线产量及良品率'" :title-icon="'productLine'">
 | 
					            :title="'产线产量及良品率'" :title-icon="'productLine'">
 | 
				
			||||||
            <div class="myLegend">
 | 
					            <div class="myLegend">
 | 
				
			||||||
              <div class=" barCircleLegend"></div>
 | 
					              <div class=" barCircleLegend"></div>
 | 
				
			||||||
@@ -110,78 +116,79 @@ const qualityYearList = [
 | 
				
			|||||||
	{
 | 
						{
 | 
				
			||||||
		name: '翻转机',
 | 
							name: '翻转机',
 | 
				
			||||||
		code: 'EQ20240110112358000235',
 | 
							code: 'EQ20240110112358000235',
 | 
				
			||||||
		status: '正常',
 | 
							status: '运行',
 | 
				
			||||||
    error: true,
 | 
					    error: true,
 | 
				
			||||||
	},
 | 
						},
 | 
				
			||||||
	{
 | 
						{
 | 
				
			||||||
		name: '烘干炉',
 | 
							name: '烘干炉',
 | 
				
			||||||
		code: 'EQ20240110112537000241',
 | 
							code: 'EQ20240110112537000241',
 | 
				
			||||||
		status: '计划停机',
 | 
							status: '停机',
 | 
				
			||||||
    error: true,
 | 
					    error: true,
 | 
				
			||||||
	},
 | 
						},
 | 
				
			||||||
	{
 | 
						{
 | 
				
			||||||
		name: '清洗机',
 | 
							name: '清洗机',
 | 
				
			||||||
		code: '	EQ20240110112310000232',
 | 
							code: '	EQ20240110112310000232',
 | 
				
			||||||
    status: '正常',
 | 
					    status: '故障',
 | 
				
			||||||
    error: true,
 | 
					    error: true,
 | 
				
			||||||
	},
 | 
						},
 | 
				
			||||||
	{
 | 
						{
 | 
				
			||||||
		name: '钢化清洗机',
 | 
							name: '钢化清洗机',
 | 
				
			||||||
		code: 'EQ20240110111700000208',
 | 
							code: 'EQ20240110111700000208',
 | 
				
			||||||
    status: '正常',
 | 
					    status: '故障',
 | 
				
			||||||
    error: true,
 | 
					    error: true,
 | 
				
			||||||
	},
 | 
						},
 | 
				
			||||||
	{
 | 
						{
 | 
				
			||||||
		name: '固化机',
 | 
							name: '固化机',
 | 
				
			||||||
		code: 'EQ20240110111700000201',
 | 
							code: 'EQ20240110111700000201',
 | 
				
			||||||
    status: '正常',
 | 
					    status: '停机',
 | 
				
			||||||
    error: false,
 | 
					    error: false,
 | 
				
			||||||
	},
 | 
						},
 | 
				
			||||||
	{
 | 
						{
 | 
				
			||||||
		name: '磨边清洗机',
 | 
							name: '磨边清洗机',
 | 
				
			||||||
		code: '	EQ20240110111700000208',
 | 
							code: '	EQ20240110111700000208',
 | 
				
			||||||
    status: '正常',
 | 
					    status: '停机',
 | 
				
			||||||
    error: true,
 | 
					    error: true,
 | 
				
			||||||
	},
 | 
						},
 | 
				
			||||||
	{
 | 
						{
 | 
				
			||||||
		name: '预热机',
 | 
							name: '预热机',
 | 
				
			||||||
		code: 'EQ20240110111700000205',
 | 
							code: 'EQ20240110111700000205',
 | 
				
			||||||
		status: '故障',
 | 
					    status: '运行',
 | 
				
			||||||
    error: false,
 | 
					    error: false,
 | 
				
			||||||
	},
 | 
						},
 | 
				
			||||||
	{
 | 
						{
 | 
				
			||||||
		name: '下片机',
 | 
							name: '下片机',
 | 
				
			||||||
		code: 'EQ20240115151435000279',
 | 
					    code: 'EQ20240115151435000279',
 | 
				
			||||||
 | 
					    status: '故障',
 | 
				
			||||||
    error: true,
 | 
					    error: true,
 | 
				
			||||||
	},
 | 
						},
 | 
				
			||||||
	{
 | 
						{
 | 
				
			||||||
		name: '冷却机',
 | 
							name: '冷却机',
 | 
				
			||||||
		code: 'EQ20240110111700000203',
 | 
							code: 'EQ20240110111700000203',
 | 
				
			||||||
    status: '正常',
 | 
					    status: '运行',
 | 
				
			||||||
    error: false,
 | 
					    error: false,
 | 
				
			||||||
	},
 | 
						},
 | 
				
			||||||
	{
 | 
						{
 | 
				
			||||||
		name: 'A储片机106',
 | 
							name: 'A储片机106',
 | 
				
			||||||
		code: 'EQ20240110111700000202',
 | 
							code: 'EQ20240110111700000202',
 | 
				
			||||||
    status: '正常',
 | 
					    status: '停机',
 | 
				
			||||||
    error: true,
 | 
					    error: true,
 | 
				
			||||||
	},
 | 
						},
 | 
				
			||||||
	{
 | 
						{
 | 
				
			||||||
		name: '二次清洗机',
 | 
							name: '二次清洗机',
 | 
				
			||||||
		code: 'EQ20240110111700000209',
 | 
							code: 'EQ20240110111700000209',
 | 
				
			||||||
    status: '正常',
 | 
					    status: '停机',
 | 
				
			||||||
    error: true,
 | 
					    error: true,
 | 
				
			||||||
	},
 | 
						},
 | 
				
			||||||
	{
 | 
						{
 | 
				
			||||||
		name: '二次磨边机',
 | 
							name: '二次磨边机',
 | 
				
			||||||
		code: '	EQ20240110110927000181',
 | 
							code: '	EQ20240110110927000181',
 | 
				
			||||||
    status: '正常',
 | 
					    status: '停机',
 | 
				
			||||||
    error: false,
 | 
					    error: false,
 | 
				
			||||||
	},
 | 
						},
 | 
				
			||||||
	{
 | 
						{
 | 
				
			||||||
		name: '测试设备',
 | 
							name: '测试设备',
 | 
				
			||||||
		code: 'EQ20240110111700000201',
 | 
							code: 'EQ20240110111700000201',
 | 
				
			||||||
    status: '正常',
 | 
					    status: '运行',
 | 
				
			||||||
    error: true,
 | 
					    error: true,
 | 
				
			||||||
	},
 | 
						},
 | 
				
			||||||
];
 | 
					];
 | 
				
			||||||
@@ -292,11 +299,11 @@ export default {
 | 
				
			|||||||
			// equipmentList:[],
 | 
								// equipmentList:[],
 | 
				
			||||||
			EnergyMonitoringList: [],
 | 
								EnergyMonitoringList: [],
 | 
				
			||||||
			eqConfig: {
 | 
								eqConfig: {
 | 
				
			||||||
				header: ['序号', '设备名称', '设备编码', '设备状态', '是否故障'],
 | 
					        header: ['序号', '产线名', '设备名称', '设备状态'],
 | 
				
			||||||
				headerBGC: 'rgba(32, 55, 96, 0.8)',
 | 
									headerBGC: 'rgba(32, 55, 96, 0.8)',
 | 
				
			||||||
				oddRowBGC: 'rgba(32, 55, 96, 0.8)',
 | 
									oddRowBGC: 'rgba(32, 55, 96, 0.8)',
 | 
				
			||||||
				evenRowBGC: 'rgba(14, 32, 62, 0.8)',
 | 
									evenRowBGC: 'rgba(14, 32, 62, 0.8)',
 | 
				
			||||||
				columnWidth: [70, 100, 200, 90, 90],
 | 
									columnWidth: [70, 150, 200, 120],
 | 
				
			||||||
				align: ['center'],
 | 
									align: ['center'],
 | 
				
			||||||
				data: [],
 | 
									data: [],
 | 
				
			||||||
				// index:true,
 | 
									// index:true,
 | 
				
			||||||
@@ -373,15 +380,15 @@ export default {
 | 
				
			|||||||
		this.websocketClose();
 | 
							this.websocketClose();
 | 
				
			||||||
		this.SJGWebsocketClose();
 | 
							this.SJGWebsocketClose();
 | 
				
			||||||
	},
 | 
						},
 | 
				
			||||||
	mounted() {
 | 
					  mounted() {
 | 
				
			||||||
		let detData = [
 | 
							let detData = [
 | 
				
			||||||
			{
 | 
								{
 | 
				
			||||||
				id: '1',
 | 
									id: '1',
 | 
				
			||||||
				name: '测试工单',
 | 
					        name: '镀釉光伏玻璃GW',
 | 
				
			||||||
        progressRate: 0.933333,
 | 
					        progressRate: 0.933333,
 | 
				
			||||||
        specifications: '1100*5554*22',
 | 
					        specifications: '1100*5554*22',
 | 
				
			||||||
        plan: 11111,
 | 
					        plan: 111111111111,
 | 
				
			||||||
        actualQuantity:111,
 | 
					        actualQuantity:1000000111111,
 | 
				
			||||||
			},
 | 
								},
 | 
				
			||||||
			{
 | 
								{
 | 
				
			||||||
				id: '2',
 | 
									id: '2',
 | 
				
			||||||
@@ -452,12 +459,12 @@ export default {
 | 
				
			|||||||
		this.orderList = detData.map((ele, index) => {
 | 
							this.orderList = detData.map((ele, index) => {
 | 
				
			||||||
			if (ele.progressRate && ele.progressRate != 1) {
 | 
								if (ele.progressRate && ele.progressRate != 1) {
 | 
				
			||||||
				return {
 | 
									return {
 | 
				
			||||||
					id: ele.id,
 | 
					          id: ele.id,
 | 
				
			||||||
					name: ele.name,
 | 
					          name: this.getStr(String(ele.name), 8),
 | 
				
			||||||
          progressRate: parseFloat((ele.progressRate * 100).toFixed(0)),
 | 
					          progressRate: parseFloat((ele.progressRate * 100).toFixed(0)),
 | 
				
			||||||
          specifications: ele.specifications ?  '规格' + ele.specifications :null,
 | 
					          specifications: ele.specifications ? '规格' + ele.specifications : '',
 | 
				
			||||||
          planQuantity: ele.plan ? '计划' + ele.plan + '片' : null,
 | 
					          planQuantity: ele.plan ? '计划' + this.getStr(String(ele.plan), 6) : '',
 | 
				
			||||||
          actualQuantity: ele.actualQuantity + '片',
 | 
					          actualQuantity: ele.actualQuantity ? this.getStr(String(ele.actualQuantity), 6) : '',
 | 
				
			||||||
				};
 | 
									};
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
		});
 | 
							});
 | 
				
			||||||
@@ -473,16 +480,14 @@ export default {
 | 
				
			|||||||
			this.EnergyMonitoringNameList,
 | 
								this.EnergyMonitoringNameList,
 | 
				
			||||||
			this.EnergyMonitoringList
 | 
								this.EnergyMonitoringList
 | 
				
			||||||
		);
 | 
							);
 | 
				
			||||||
		let eqArr = this.qualityYearList.map((item, index) => [
 | 
					    let eqArr = this.qualityYearList.map((item, index) => [
 | 
				
			||||||
			`<span style="color:rgba(255,255,255,0.5)" >${index + 1 || ''}
 | 
								`<span style="color:rgba(255,255,255,0.5)" >${index + 1 || ''}
 | 
				
			||||||
            </span>`,
 | 
					            </span>`,
 | 
				
			||||||
			// formatDate(item.planStartTime) || '',
 | 
								// formatDate(item.planStartTime) || '',
 | 
				
			||||||
			`
 | 
					      `<span style="color:rgba(255,255,255,0.5)">${item.lineName || ''}</span>`,`
 | 
				
			||||||
          <span style="color:rgba(255,255,255,0.5)" >${item.name || ''}
 | 
					          <span style="color:rgba(255,255,255,0.5)" >${item.name || ''}
 | 
				
			||||||
            </span>`,
 | 
					            </span>`,
 | 
				
			||||||
			`<span style="color:rgba(255,255,255,0.5)">${item.code || ''}</span>`,
 | 
					      `<span style="color:rgba(255,255,255,0.5)"><div style="${item.status == '运行' ? 'box-shadow: 0px 0px 2px 1px #2760FF;width:6px;height:6px;border-radius: 50%;background-color: #2760FF;float:left;margin:13px 10px 0 0' : item.status == '停机' ? 'box-shadow: 0px 0px 2px 1px #FFBD02;width:6px;height:6px;border-radius: 50%;background-color: #FFBD02;float:left;margin:13px 10px 0 0 ' : 'box-shadow: 0px 0px 2px 1px red;width:6px;height:6px;border-radius: 50%;  background-color: red;float:left;margin:13px 10px 0 0'}"></div>  ${item.status || ''}</span>`,
 | 
				
			||||||
      `<span style="color:rgba(255,255,255,0.5)"><div style="${item.status == '正常' ? 'box-shadow: 0px 0px 2px 1px #2760FF;width:6px;height:6px;border-radius: 50%;background-color: #2760FF;float:left;margin:13px 10px 0 0 ' : 'box-shadow: 0px 0px 2px 1px #FFBD02;width:6px;height:6px;border-radius: 50%;  background-color: #FFBD02;float:left;margin:13px 10px 0 0 '}"></div>  ${item.status || ''}</span>`,
 | 
					 | 
				
			||||||
      `<span style="color:rgba(255,255,255,0.5)"><div style="${item.error == false ? 'box-shadow: 0px 0px 2px 1px #2760FF;width:6px;height:6px;border-radius: 50%;background-color: #2760FF;float:left;margin:13px 10px 0 0 ' : 'box-shadow: 0px 0px 2px 1px red;width:6px;height:6px;border-radius: 50%;  background-color: red;float:left;margin:13px 10px 0 0 '}"></div>  ${item.error == true ? '是' : '否' || ''}</span>`,
 | 
					 | 
				
			||||||
		]);
 | 
							]);
 | 
				
			||||||
    this.eqConfig.data = eqArr;
 | 
					    this.eqConfig.data = eqArr;
 | 
				
			||||||
    let data = [
 | 
					    let data = [
 | 
				
			||||||
@@ -561,6 +566,15 @@ export default {
 | 
				
			|||||||
	//   removeEventListener('resize', resizeFun)
 | 
						//   removeEventListener('resize', resizeFun)
 | 
				
			||||||
	// },
 | 
						// },
 | 
				
			||||||
  methods: {
 | 
					  methods: {
 | 
				
			||||||
 | 
					    getStr(str,num) {
 | 
				
			||||||
 | 
					          //你要处理的字符串
 | 
				
			||||||
 | 
					      if (str.length > num) {      //如果字符长度超过10,后面的字符就变成...可自行调整长度和代替字符
 | 
				
			||||||
 | 
					        str = str.substr(0, num) + "..."   //截取从第一个字符开始,往后取10个字符,剩余的用...代替
 | 
				
			||||||
 | 
					        return str
 | 
				
			||||||
 | 
					      } else {
 | 
				
			||||||
 | 
					        return str
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
		getData() {
 | 
							getData() {
 | 
				
			||||||
			let processArr = qualityMonthList.map((item, index) => [
 | 
								let processArr = qualityMonthList.map((item, index) => [
 | 
				
			||||||
				// console.log(item)
 | 
									// console.log(item)
 | 
				
			||||||
@@ -729,12 +743,12 @@ export default {
 | 
				
			|||||||
					this.orderList = this.SJGWsData.detData.map((ele, index) => {
 | 
										this.orderList = this.SJGWsData.detData.map((ele, index) => {
 | 
				
			||||||
						if (ele.progressRate && ele.progressRate != 1) {
 | 
											if (ele.progressRate && ele.progressRate != 1) {
 | 
				
			||||||
							return {
 | 
												return {
 | 
				
			||||||
								id: ele.id,
 | 
					                id: ele.id,
 | 
				
			||||||
								name: ele.name,
 | 
					                name: this.getStr(String(ele.name), 8),
 | 
				
			||||||
                progressRate: parseFloat((ele.progressRate * 100).toFixed(0)),
 | 
					                progressRate: parseFloat((ele.progressRate * 100).toFixed(0)),
 | 
				
			||||||
                specifications: ele.specifications ?  '规格' + ele.specifications :null,
 | 
					                specifications: ele.specifications ? '规格' + ele.specifications : '',
 | 
				
			||||||
                planQuantity: ele.planQuantity  ? '计划' + ele.planQuantity + '片' : null,
 | 
					                planQuantity: ele.planQuantity ? '计划' + this.getStr(String(ele.planQuantity),6) : '',
 | 
				
			||||||
                actualQuantity: ele.actualQuantity ? ele.actualQuantity + '片' : null,
 | 
					                actualQuantity: ele.actualQuantity ? this.getStr(String(ele.actualQuantity), 6) : '',
 | 
				
			||||||
							};
 | 
												};
 | 
				
			||||||
						}
 | 
											}
 | 
				
			||||||
					});
 | 
										});
 | 
				
			||||||
@@ -743,13 +757,13 @@ export default {
 | 
				
			|||||||
					let eqArr = this.SJGWsData.detData.map((item, index) => [
 | 
										let eqArr = this.SJGWsData.detData.map((item, index) => [
 | 
				
			||||||
						`<span style="color:rgba(255,255,255,0.5)" >${index + 1 || ''}
 | 
											`<span style="color:rgba(255,255,255,0.5)" >${index + 1 || ''}
 | 
				
			||||||
            </span>`,
 | 
					            </span>`,
 | 
				
			||||||
 | 
					            `<span style="color:rgba(255,255,255,0.5)">${item.lineName || ''
 | 
				
			||||||
 | 
					            }</span>`,
 | 
				
			||||||
						`<span style="color:rgba(255,255,255,0.5)" >${item.name || ''}
 | 
											`<span style="color:rgba(255,255,255,0.5)" >${item.name || ''}
 | 
				
			||||||
            </span>`,
 | 
					            </span>`,
 | 
				
			||||||
						`<span style="color:rgba(255,255,255,0.5)">${
 | 
					
 | 
				
			||||||
							item.code || ''
 | 
					            `<span style="color:rgba(255,255,255,0.5)"><div style="${item.status == '运行' ? 'box-shadow: 0px 0px 2px 1px #2760FF;width:6px;height:6px;border-radius: 50%;background-color: #2760FF;float:left;margin:13px 10px 0 0' : item.status == '停机' ? 'box-shadow: 0px 0px 2px 1px #FFBD02;width:6px;height:6px;border-radius: 50%;background-color: #FFBD02;float:left;margin:13px 10px 0 0 ' : 'box-shadow: 0px 0px 2px 1px red;width:6px;height:6px;border-radius: 50%;  background-color: red;float:left;margin:13px 10px 0 0'}"></div>  ${item.status || ''}</span>`,
 | 
				
			||||||
						}</span>`,
 | 
					            // `<span style="color:rgba(255,255,255,0.5)"><div style="${item.error == false ? 'box-shadow: 0px 0px 2px 1px #2760FF;width:6px;height:6px;border-radius: 50%;background-color: #2760FF;float:left;margin:10px 10px 0 0 ' : 'box-shadow: 0px 0px 2px 1px red;width:6px;height:6px;border-radius: 50%;  background-color: red;float:left;margin:10px 10px 0 0 '}"></div>  ${item.error == true ?'是' :'否'  || ''}</span>`,
 | 
				
			||||||
            `<span style="color:rgba(255,255,255,0.5)"><div style="${item.status == '正常' ? 'box-shadow: 0px 0px 2px 1px #2760FF;width:6px;height:6px;border-radius: 50%;background-color: #2760FF;float:left;margin:10px 10px 0 0 ' : 'box-shadow: 0px 0px 2px 1px #FFBD02;width:6px;height:6px;border-radius: 50%;  background-color: #FFBD02;float:left;margin:10px 10px 0 0 '}"></div>  ${item.status || ''}</span>`,
 | 
					 | 
				
			||||||
            `<span style="color:rgba(255,255,255,0.5)"><div style="${item.error == false ? 'box-shadow: 0px 0px 2px 1px #2760FF;width:6px;height:6px;border-radius: 50%;background-color: #2760FF;float:left;margin:10px 10px 0 0 ' : 'box-shadow: 0px 0px 2px 1px red;width:6px;height:6px;border-radius: 50%;  background-color: red;float:left;margin:10px 10px 0 0 '}"></div>  ${item.error == true ?'是' :'否'  || ''}</span>`,
 | 
					 | 
				
			||||||
					]);
 | 
										]);
 | 
				
			||||||
          this.eqConfig.data = eqArr;
 | 
					          this.eqConfig.data = eqArr;
 | 
				
			||||||
          // this.$nextTick(() => {
 | 
					          // this.$nextTick(() => {
 | 
				
			||||||
@@ -971,7 +985,7 @@ export default {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
.now-secondary-title {
 | 
					.now-secondary-title {
 | 
				
			||||||
  display: inline-block;
 | 
					  display: inline-block;
 | 
				
			||||||
  width: 70px;
 | 
					  width: 110px;
 | 
				
			||||||
	margin: 0;
 | 
						margin: 0;
 | 
				
			||||||
	font-size: 14px;
 | 
						font-size: 14px;
 | 
				
			||||||
	line-height: 2em;
 | 
						line-height: 2em;
 | 
				
			||||||
@@ -990,16 +1004,27 @@ export default {
 | 
				
			|||||||
  width: 60px;
 | 
					  width: 60px;
 | 
				
			||||||
  margin: 0;
 | 
					  margin: 0;
 | 
				
			||||||
  font-size: 14px;
 | 
					  font-size: 14px;
 | 
				
			||||||
 | 
					  text-align: right;
 | 
				
			||||||
 | 
					  color: rgba(0, 255, 247, 1);
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					.orderFinishTwo{
 | 
				
			||||||
 | 
					  display: inline-block;
 | 
				
			||||||
 | 
					  width: 15px;
 | 
				
			||||||
 | 
					  margin: 0;
 | 
				
			||||||
 | 
					  font-size: 14px;
 | 
				
			||||||
  line-height: 2em;
 | 
					  line-height: 2em;
 | 
				
			||||||
 | 
					  // text-overflow: ellipsis;
 | 
				
			||||||
 | 
					  // white-space: nowrap;
 | 
				
			||||||
 | 
					  // overflow: hidden;
 | 
				
			||||||
  text-align: right;
 | 
					  text-align: right;
 | 
				
			||||||
  color: rgba(0, 255, 247, 1);
 | 
					  color: rgba(0, 255, 247, 1);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
.orderPlan {
 | 
					.orderPlan {
 | 
				
			||||||
  display: inline-block;
 | 
					  display: inline-block;
 | 
				
			||||||
  width: 100px;
 | 
					  // width: 80px;
 | 
				
			||||||
  margin: 0;
 | 
					  margin: 0;
 | 
				
			||||||
  font-size: 14px;
 | 
					  font-size: 14px;
 | 
				
			||||||
  line-height: 2em;
 | 
					  // line-height: 2em;
 | 
				
			||||||
  color: #fff;
 | 
					  color: #fff;
 | 
				
			||||||
  text-align: left;
 | 
					  text-align: left;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -85,7 +85,7 @@ export default {
 | 
				
			|||||||
				color: this.colors,
 | 
									color: this.colors,
 | 
				
			||||||
				title: {
 | 
									title: {
 | 
				
			||||||
					text: num,
 | 
										text: num,
 | 
				
			||||||
					subtext: '总数',
 | 
										subtext: '总数/个',
 | 
				
			||||||
					top: '32%',
 | 
										top: '32%',
 | 
				
			||||||
					left: '49%',
 | 
										left: '49%',
 | 
				
			||||||
					textAlign: 'center',
 | 
										textAlign: 'center',
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -32,11 +32,11 @@ export default {
 | 
				
			|||||||
		return {
 | 
							return {
 | 
				
			||||||
			timestr: '',
 | 
								timestr: '',
 | 
				
			||||||
			config: {
 | 
								config: {
 | 
				
			||||||
				header: ['序号', '设备名称', '设备编码', '设备状态', '是否故障'],
 | 
									header: ['序号', '产线名', '设备名称', '设备状态'],
 | 
				
			||||||
				headerBGC: 'rgba(32, 55, 96, 0.8)',
 | 
									headerBGC: 'rgba(32, 55, 96, 0.8)',
 | 
				
			||||||
				oddRowBGC: 'rgba(32, 55, 96, 0.8)',
 | 
									oddRowBGC: 'rgba(32, 55, 96, 0.8)',
 | 
				
			||||||
				evenRowBGC: 'rgba(14, 32, 62, 0.8)',
 | 
									evenRowBGC: 'rgba(14, 32, 62, 0.8)',
 | 
				
			||||||
				columnWidth: [60, 150, 190],
 | 
									columnWidth: [60, 120, 280],
 | 
				
			||||||
				align: ['center'],
 | 
									align: ['center'],
 | 
				
			||||||
				data: [],
 | 
									data: [],
 | 
				
			||||||
				// data: [
 | 
									// data: [
 | 
				
			||||||
@@ -63,18 +63,20 @@ export default {
 | 
				
			|||||||
			handler(newVal, oldVal) {
 | 
								handler(newVal, oldVal) {
 | 
				
			||||||
				let outArr = this.sjgEquipment.map((item, index) => [
 | 
									let outArr = this.sjgEquipment.map((item, index) => [
 | 
				
			||||||
					index + 1,
 | 
										index + 1,
 | 
				
			||||||
 | 
										`<span title=${item.lineName || ''}>${item.lineName || ''}</span>`,
 | 
				
			||||||
					`<span title=${item.name || ''}>${item.name || ''}</span>`,
 | 
										`<span title=${item.name || ''}>${item.name || ''}</span>`,
 | 
				
			||||||
					`<span title=${item.code || ''}>${item.code || ''}</span>`,
 | 
					 | 
				
			||||||
					`<span><div style="${
 | 
										`<span><div style="${
 | 
				
			||||||
						item.status == '正常'
 | 
											item.status == '运行'
 | 
				
			||||||
							? 'box-shadow: 0px 0px 2px 1px #2760FF;width:6px;height:6px;border-radius: 50%;background-color: #2760FF;float:left;margin:13px 10px 0 0 '
 | 
												? 'box-shadow: 0px 0px 2px 1px #2760FF;width:6px;height:6px;border-radius: 50%;background-color: #2760FF;float:left;margin:13px 10px 0 0 '
 | 
				
			||||||
 | 
												: item.status == '故障'
 | 
				
			||||||
 | 
												? 'box-shadow: 0px 0px 2px 1px red;width:6px;height:6px;border-radius: 50%;  background-color: red;float:left;margin:13px 10px 0 0 '
 | 
				
			||||||
							: 'box-shadow: 0px 0px 2px 1px #FFBD02;width:6px;height:6px;border-radius: 50%;  background-color: #FFBD02;float:left;margin:13px 10px 0 0 '
 | 
												: 'box-shadow: 0px 0px 2px 1px #FFBD02;width:6px;height:6px;border-radius: 50%;  background-color: #FFBD02;float:left;margin:13px 10px 0 0 '
 | 
				
			||||||
					}"></div>  ${item.status || ''}</span>`,
 | 
										}"></div>  ${item.status || ''}</span>`,
 | 
				
			||||||
					`<span"><div style="${
 | 
										// `<span"><div style="${
 | 
				
			||||||
						item.error == false
 | 
										// 	item.error == false
 | 
				
			||||||
							? 'box-shadow: 0px 0px 2px 1px #2760FF;width:6px;height:6px;border-radius: 50%;background-color: #2760FF;float:left;margin:13px 10px 0 0 '
 | 
										// 		? 'box-shadow: 0px 0px 2px 1px #2760FF;width:6px;height:6px;border-radius: 50%;background-color: #2760FF;float:left;margin:13px 10px 0 0 '
 | 
				
			||||||
							: 'box-shadow: 0px 0px 2px 1px red;width:6px;height:6px;border-radius: 50%;  background-color: red;float:left;margin:13px 10px 0 0 '
 | 
										// 		: 'box-shadow: 0px 0px 2px 1px red;width:6px;height:6px;border-radius: 50%;  background-color: red;float:left;margin:13px 10px 0 0 '
 | 
				
			||||||
					}"></div>  ${item.error == true ? '是' : '否' || ''}</span>`,
 | 
										// }"></div>  ${item.error == true ? '是' : '否' || ''}</span>`,
 | 
				
			||||||
				]);
 | 
									]);
 | 
				
			||||||
				this.config.data = outArr;
 | 
									this.config.data = outArr;
 | 
				
			||||||
				this.$refs['eqScrollBoard'].updateRows(outArr);
 | 
									this.$refs['eqScrollBoard'].updateRows(outArr);
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -80,7 +80,7 @@
 | 
				
			|||||||
					</span>
 | 
										</span>
 | 
				
			||||||
				</ShadowRect>
 | 
									</ShadowRect>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
				<ShadowRect>
 | 
									<!-- <ShadowRect>
 | 
				
			||||||
					<span
 | 
										<span
 | 
				
			||||||
						style="
 | 
											style="
 | 
				
			||||||
							font-size: 20px;
 | 
												font-size: 20px;
 | 
				
			||||||
@@ -99,7 +99,7 @@
 | 
				
			|||||||
								: ''
 | 
													: ''
 | 
				
			||||||
						}}mg/m³
 | 
											}}mg/m³
 | 
				
			||||||
					</span>
 | 
										</span>
 | 
				
			||||||
				</ShadowRect>
 | 
									</ShadowRect> -->
 | 
				
			||||||
			</div>
 | 
								</div>
 | 
				
			||||||
			<KilnLine :horizontal="true" />
 | 
								<KilnLine :horizontal="true" />
 | 
				
			||||||
			<div
 | 
								<div
 | 
				
			||||||
@@ -130,8 +130,9 @@
 | 
				
			|||||||
						align-items: center;
 | 
											align-items: center;
 | 
				
			||||||
						justify-content: space-between;
 | 
											justify-content: space-between;
 | 
				
			||||||
					">
 | 
										">
 | 
				
			||||||
 | 
										<!-- :options="['氧气含量', '二氧化硫', '氮氧化物', '颗粒物']" -->
 | 
				
			||||||
					<SelectorBtnGroup
 | 
										<SelectorBtnGroup
 | 
				
			||||||
						:options="['氧气含量', '二氧化硫', '氮氧化物', '颗粒物']"
 | 
											:options="['氧气含量', '二氧化硫', '氮氧化物']"
 | 
				
			||||||
						@emitFun="toggleType"
 | 
											@emitFun="toggleType"
 | 
				
			||||||
						:active="chartType" />
 | 
											:active="chartType" />
 | 
				
			||||||
					<SelectorBtnGroup
 | 
										<SelectorBtnGroup
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -86,16 +86,19 @@ import moment from 'moment';
 | 
				
			|||||||
// import DialogForm from './dialogForm.vue';
 | 
					// import DialogForm from './dialogForm.vue';
 | 
				
			||||||
import * as echarts from 'echarts';
 | 
					import * as echarts from 'echarts';
 | 
				
			||||||
import tableHeightMixin from '@/mixins/lb/tableHeightMixin';
 | 
					import tableHeightMixin from '@/mixins/lb/tableHeightMixin';
 | 
				
			||||||
 | 
					import { getCorePLList } from '@/api/base/coreProductionLine';
 | 
				
			||||||
 | 
					import { parseTime } from '@/utils/ruoyi';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// import basicPageMixin from '@/mixins/lb/basicPageMixin';
 | 
					// import basicPageMixin from '@/mixins/lb/basicPageMixin';
 | 
				
			||||||
export default {
 | 
					export default {
 | 
				
			||||||
  name: 'statisticalData',
 | 
					  name: 'QualityIsra',
 | 
				
			||||||
	// components: {
 | 
						// components: {
 | 
				
			||||||
	// 	DialogForm,
 | 
						// 	DialogForm,
 | 
				
			||||||
	// },
 | 
						// },
 | 
				
			||||||
  mixins: [tableHeightMixin],
 | 
					  mixins: [tableHeightMixin],
 | 
				
			||||||
	data() {
 | 
						data() {
 | 
				
			||||||
    return {
 | 
					    return {
 | 
				
			||||||
 | 
					      isFold: false,
 | 
				
			||||||
      list: [],
 | 
					      list: [],
 | 
				
			||||||
      dynamicProps: [],
 | 
					      dynamicProps: [],
 | 
				
			||||||
      activeName: 'day',
 | 
					      activeName: 'day',
 | 
				
			||||||
@@ -106,6 +109,16 @@ export default {
 | 
				
			|||||||
      weekListUrl: '/base/quality-isra-statistics/weekList',
 | 
					      weekListUrl: '/base/quality-isra-statistics/weekList',
 | 
				
			||||||
      monthListUrl: '/base/quality-isra-statistics/monthList',
 | 
					      monthListUrl: '/base/quality-isra-statistics/monthList',
 | 
				
			||||||
      searchBarFormConfig: [
 | 
					      searchBarFormConfig: [
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					          type: 'select',
 | 
				
			||||||
 | 
					          label: '是否报废',
 | 
				
			||||||
 | 
					          placeholder: '请选择是否报废',
 | 
				
			||||||
 | 
					          param: 'checkDiscard',
 | 
				
			||||||
 | 
					          selectOptions: [
 | 
				
			||||||
 | 
					            { name: '否', id: 0 },
 | 
				
			||||||
 | 
											{ name: '是', id: 1 }
 | 
				
			||||||
 | 
					          ],
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
          type: 'select',
 | 
					          type: 'select',
 | 
				
			||||||
          label: '缺陷类型',
 | 
					          label: '缺陷类型',
 | 
				
			||||||
@@ -114,6 +127,17 @@ export default {
 | 
				
			|||||||
          selectOptions: [],
 | 
					          selectOptions: [],
 | 
				
			||||||
          labelField: 'name',
 | 
					          labelField: 'name',
 | 
				
			||||||
          valueField: 'name',
 | 
					          valueField: 'name',
 | 
				
			||||||
 | 
					          defaultSelect: [],
 | 
				
			||||||
 | 
					          filterable: true
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					          type: 'select',
 | 
				
			||||||
 | 
					          label: '产线',
 | 
				
			||||||
 | 
					          selectOptions: [],
 | 
				
			||||||
 | 
					          labelField: 'name',
 | 
				
			||||||
 | 
					          valueField: 'name',
 | 
				
			||||||
 | 
					          param: 'lineName',
 | 
				
			||||||
 | 
					          filterable: true,
 | 
				
			||||||
          defaultSelect: []
 | 
					          defaultSelect: []
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
				{
 | 
									{
 | 
				
			||||||
@@ -139,8 +163,9 @@ export default {
 | 
				
			|||||||
			],
 | 
								],
 | 
				
			||||||
			// 查询参数
 | 
								// 查询参数
 | 
				
			||||||
			queryParams: {
 | 
								queryParams: {
 | 
				
			||||||
 | 
					        checkDiscard: undefined,
 | 
				
			||||||
        checkType:undefined,
 | 
					        checkType:undefined,
 | 
				
			||||||
        // productionId: undefined,
 | 
					        lineName: undefined,
 | 
				
			||||||
        startTime: undefined,
 | 
					        startTime: undefined,
 | 
				
			||||||
        endTime: undefined,
 | 
					        endTime: undefined,
 | 
				
			||||||
				// productionLineId: null,
 | 
									// productionLineId: null,
 | 
				
			||||||
@@ -149,6 +174,7 @@ export default {
 | 
				
			|||||||
  },
 | 
					  },
 | 
				
			||||||
	created() {
 | 
						created() {
 | 
				
			||||||
		// this.getProductLineList();
 | 
							// this.getProductLineList();
 | 
				
			||||||
 | 
					    // this.isFold = this.searchBarWidth('QualityIsraBox', 1198);
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  computed: {
 | 
					  computed: {
 | 
				
			||||||
    tableProps() {
 | 
					    tableProps() {
 | 
				
			||||||
@@ -168,29 +194,20 @@ export default {
 | 
				
			|||||||
    },
 | 
					    },
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  mounted() {
 | 
					  mounted() {
 | 
				
			||||||
    // if (this.$route.query.woIdString) {
 | 
					    if (this.$route.query.lineName) {
 | 
				
			||||||
    //   console.log(this.$route.query.woIdString)
 | 
					      // console.log('打印看看产线', this.$route.query.lineName)
 | 
				
			||||||
    //   this.queryParams.workOrderIdList = this.$route.query.woIdString.split(',')
 | 
					      this.queryParams.lineName = this.$route.query.lineName
 | 
				
			||||||
    //   // this.queryParams.workOrderIdList = [this.$route.query.woIdString]
 | 
					      this.searchBarFormConfig[2].defaultSelect = this.$route.query.lineName
 | 
				
			||||||
    //   // let arr =[]
 | 
					    }
 | 
				
			||||||
    //   this.searchBarFormConfig[0].defaultSelect = this.$route.query.woIdString.split(',')
 | 
					    if (this.$route.query.originalGlassOutputTime) {
 | 
				
			||||||
    //   console.log(this.searchBarFormConfig[0].defaultSelect);
 | 
					      console.log('你好', this.$route.query.originalGlassOutputTime)
 | 
				
			||||||
    // }
 | 
					      this.queryParams.startTime = parseTime(new Date(Number(this.$route.query.originalGlassOutputTime)))
 | 
				
			||||||
    // if (this.$route.params.startTime && this.$route.params.endTime) {
 | 
					      this.queryParams.endTime = parseTime(new Date(Number(this.$route.query.originalGlassOutputTime)))
 | 
				
			||||||
    //   this.searchBarFormConfig[0].defaultSelect = [
 | 
					      this.searchBarFormConfig[3].defaultSelect = [
 | 
				
			||||||
    //     this.$route.params.startTime,
 | 
					        this.queryParams.startTime,
 | 
				
			||||||
    //     this.$route.params.endTime,
 | 
					        this.queryParams.endTime,
 | 
				
			||||||
    //   ];
 | 
					      ];
 | 
				
			||||||
    //   this.queryParams.param = {};
 | 
					    }
 | 
				
			||||||
    //   this.$set(
 | 
					 | 
				
			||||||
    //     this.queryParams.param,
 | 
					 | 
				
			||||||
    //     'startTime',
 | 
					 | 
				
			||||||
    //     this.$route.params.startTime
 | 
					 | 
				
			||||||
    //   );
 | 
					 | 
				
			||||||
    //   this.$set(this.queryParams.param, 'endTime', this.$route.params.endTime);
 | 
					 | 
				
			||||||
    // } else {
 | 
					 | 
				
			||||||
    //   this.searchBarFormConfig[0].defaultSelect = [];
 | 
					 | 
				
			||||||
    // }
 | 
					 | 
				
			||||||
    this.getList()
 | 
					    this.getList()
 | 
				
			||||||
    this.getData()
 | 
					    this.getData()
 | 
				
			||||||
    this.getDict()
 | 
					    this.getDict()
 | 
				
			||||||
@@ -393,8 +410,12 @@ export default {
 | 
				
			|||||||
          pageNo:1
 | 
					          pageNo:1
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
      });
 | 
					      });
 | 
				
			||||||
      console.log(res)
 | 
					      // console.log(res)
 | 
				
			||||||
      this.searchBarFormConfig[0].selectOptions = res.data.list
 | 
					      this.searchBarFormConfig[1].selectOptions = res.data.list
 | 
				
			||||||
 | 
					      await getCorePLList().then((res) => {
 | 
				
			||||||
 | 
									// console.log(res);
 | 
				
			||||||
 | 
									this.searchBarFormConfig[2].selectOptions = res.data;
 | 
				
			||||||
 | 
								})
 | 
				
			||||||
      // this.searchBarFormConfig[1].selectOptions = res.data.map((item) => {
 | 
					      // this.searchBarFormConfig[1].selectOptions = res.data.map((item) => {
 | 
				
			||||||
      //   return {
 | 
					      //   return {
 | 
				
			||||||
      //     name: item.name,
 | 
					      //     name: item.name,
 | 
				
			||||||
@@ -425,7 +446,7 @@ export default {
 | 
				
			|||||||
    },
 | 
					    },
 | 
				
			||||||
		/** 查询列表 */
 | 
							/** 查询列表 */
 | 
				
			||||||
    async getDataList() {
 | 
					    async getDataList() {
 | 
				
			||||||
      console.log(this.queryParams);
 | 
					      console.log('查询条件', this.queryParams);
 | 
				
			||||||
			this.loading = true;
 | 
								this.loading = true;
 | 
				
			||||||
			// 执行查询
 | 
								// 执行查询
 | 
				
			||||||
      const {
 | 
					      const {
 | 
				
			||||||
@@ -467,7 +488,10 @@ export default {
 | 
				
			|||||||
    },
 | 
					    },
 | 
				
			||||||
		/** 取消按钮 */
 | 
							/** 取消按钮 */
 | 
				
			||||||
    handleSearchBarBtnClick(val) {
 | 
					    handleSearchBarBtnClick(val) {
 | 
				
			||||||
 | 
					      console.log('11111', val)
 | 
				
			||||||
      if (val.btnName === 'search') {
 | 
					      if (val.btnName === 'search') {
 | 
				
			||||||
 | 
					        this.queryParams.checkDiscard = (val?.checkDiscard === 0 || val?.checkDiscard === 1) ? val?.checkDiscard : undefined
 | 
				
			||||||
 | 
					        this.queryParams.lineName = val.lineName ? val.lineName : undefined
 | 
				
			||||||
        this.queryParams.checkType = val.checkType ? val.checkType : undefined
 | 
					        this.queryParams.checkType = val.checkType ? val.checkType : undefined
 | 
				
			||||||
        // this.queryParams.productionId = val.productionId ? val.productionId : undefined
 | 
					        // this.queryParams.productionId = val.productionId ? val.productionId : undefined
 | 
				
			||||||
        this.queryParams.startTime = val.checkTime ? val.checkTime[0] : undefined
 | 
					        this.queryParams.startTime = val.checkTime ? val.checkTime[0] : undefined
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,20 +1,59 @@
 | 
				
			|||||||
<!--
 | 
					<!--
 | 
				
			||||||
 * @Author: zwq
 | 
					 * @Author: zwq
 | 
				
			||||||
 * @Date: 2023-08-01 14:55:51
 | 
					 * @Date: 2023-08-01 14:55:51
 | 
				
			||||||
 * @LastEditors: zhp
 | 
					 * @LastEditors: DY
 | 
				
			||||||
 * @LastEditTime: 2024-04-07 16:25:19
 | 
					 * @LastEditTime: 2024-04-26 09:58:51
 | 
				
			||||||
 * @Description:
 | 
					 * @Description:
 | 
				
			||||||
-->
 | 
					-->
 | 
				
			||||||
<template>
 | 
					<template>
 | 
				
			||||||
  <div class="app-container">
 | 
					  <div class="app-container">
 | 
				
			||||||
    <search-bar :formConfigs="formConfig" ref="searchBarForm" @headBtnClick="buttonClick" />
 | 
					    <!-- <search-bar :formConfigs="formConfig" ref="searchBarForm" @headBtnClick="buttonClick" /> -->
 | 
				
			||||||
    <base-table :max-height="tableH" :table-props="tableProps" :page="listQuery.pageNo" :limit="listQuery.pageSize"
 | 
					    <el-form
 | 
				
			||||||
 | 
								:inline="true"
 | 
				
			||||||
 | 
								:model="listQuery"
 | 
				
			||||||
 | 
								class="blueTip">
 | 
				
			||||||
 | 
					      <el-form-item label="合格证号" prop="certificateNumber">
 | 
				
			||||||
 | 
									<el-input size="small" v-model="listQuery.certificateNumber" clearable placeholder="合格证号" @blur="countTimes(1)" @clear="countArray[0] = false"></el-input>
 | 
				
			||||||
 | 
								</el-form-item>
 | 
				
			||||||
 | 
					      <el-form-item label="成品周转编号" prop="packagingCode">
 | 
				
			||||||
 | 
									<el-input size="small" v-model="listQuery.packagingCode" clearable placeholder="成品周转编号" @blur="countTimes(2)" @clear="countArray[1] = false"></el-input>
 | 
				
			||||||
 | 
								</el-form-item>
 | 
				
			||||||
 | 
					      <el-form-item label="原片周转编号" prop="glassCode">
 | 
				
			||||||
 | 
									<el-input size="small" v-model="listQuery.glassCode" clearable placeholder="原片周转编号" @blur="countTimes(3)" @clear="countArray[2] = false"></el-input>
 | 
				
			||||||
 | 
								</el-form-item>
 | 
				
			||||||
 | 
								<el-form-item label="包装全检时间及产线" prop="val">
 | 
				
			||||||
 | 
									<el-date-picker
 | 
				
			||||||
 | 
										v-model="listQuery.packTime"
 | 
				
			||||||
 | 
										value-format="timestamp"
 | 
				
			||||||
 | 
										type="datetime"
 | 
				
			||||||
 | 
										size="small"
 | 
				
			||||||
 | 
					          clearable
 | 
				
			||||||
 | 
										placeholder="包装全检时间"
 | 
				
			||||||
 | 
					          @change="countTimes('timestamp3')"
 | 
				
			||||||
 | 
					        />
 | 
				
			||||||
 | 
					        <el-select v-model="listQuery.lineName" size="small" clearable filterable placeholder="产线" @change="countTimes('timestamp3')" style="margin-left: 5px">
 | 
				
			||||||
 | 
					          <el-option v-for="(item, index) in lineOptions" :key="index" :label="item.name" :value="item.name"></el-option>
 | 
				
			||||||
 | 
					        </el-select>
 | 
				
			||||||
 | 
								</el-form-item>
 | 
				
			||||||
 | 
					      <el-form-item>
 | 
				
			||||||
 | 
					        <el-button
 | 
				
			||||||
 | 
					          v-if="this.$auth.hasPermi('monitoring:rawMaterial-traceability:query')"
 | 
				
			||||||
 | 
					          type="primary"
 | 
				
			||||||
 | 
					          size="small"
 | 
				
			||||||
 | 
					          @click="getList">
 | 
				
			||||||
 | 
					          查询
 | 
				
			||||||
 | 
					        </el-button>
 | 
				
			||||||
 | 
					      </el-form-item>
 | 
				
			||||||
 | 
							</el-form>
 | 
				
			||||||
 | 
					    <!-- <base-table :max-height="tableH" :table-props="tableProps" :page="listQuery.pageNo" :limit="listQuery.pageSize"
 | 
				
			||||||
 | 
					      :table-data="list"> -->
 | 
				
			||||||
 | 
					    <base-table :max-height="tableH" :table-props="tableProps"
 | 
				
			||||||
      :table-data="list">
 | 
					      :table-data="list">
 | 
				
			||||||
      <!-- <method-btn v-if="tableBtn.length" slot="handleBtn" :width="120" label="操作" :method-list="tableBtn"
 | 
					      <method-btn v-if="tableBtn.length" slot="handleBtn" :width="220" label="缺陷操作" :method-list="tableBtn"
 | 
				
			||||||
        @clickBtn="handleClick" /> -->
 | 
					        @clickBtn="handleClick" />
 | 
				
			||||||
    </base-table>
 | 
					    </base-table>
 | 
				
			||||||
    <pagination :limit.sync="listQuery.pageSize" :page.sync="listQuery.pageNo" :total="listQuery.total"
 | 
					    <!-- <pagination :limit.sync="listQuery.pageSize" :page.sync="listQuery.pageNo" :total="listQuery.total"
 | 
				
			||||||
      @pagination="getList" />
 | 
					      @pagination="getList" /> -->
 | 
				
			||||||
    <!-- <add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList" /> -->
 | 
					    <!-- <add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList" /> -->
 | 
				
			||||||
  </div>
 | 
					  </div>
 | 
				
			||||||
</template>
 | 
					</template>
 | 
				
			||||||
@@ -23,61 +62,76 @@
 | 
				
			|||||||
// import AddOrUpdate from './add-or-updata';
 | 
					// import AddOrUpdate from './add-or-updata';
 | 
				
			||||||
// import unitDict from './unitDict';
 | 
					// import unitDict from './unitDict';
 | 
				
			||||||
// import basicPage from '../mixins/basic-page';
 | 
					// import basicPage from '../mixins/basic-page';
 | 
				
			||||||
import { publicFormatter } from '@/utils/dict';
 | 
					// import { publicFormatter } from '@/utils/dict';
 | 
				
			||||||
import { parseTime } from '../mixins/code-filter';
 | 
					import { parseTime } from '../mixins/code-filter';
 | 
				
			||||||
import tableHeightMixin from '@/mixins/lb/tableHeightMixin';
 | 
					import tableHeightMixin from '@/mixins/lb/tableHeightMixin';
 | 
				
			||||||
 | 
					import { getCorePLList } from '@/api/base/coreProductionLine';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import {
 | 
					import { getOriginalGlassRetrace } from '@/api/quality/rawMaterialTraceability';
 | 
				
			||||||
  getOriginalGlassRetrace,
 | 
					 | 
				
			||||||
  getWorkOrderList,
 | 
					 | 
				
			||||||
  // exportEnergyPlcExcel
 | 
					 | 
				
			||||||
} from '@/api/quality/rawMaterialTraceability';
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
const tableProps = [
 | 
					const tableProps = [
 | 
				
			||||||
 | 
					 | 
				
			||||||
  {
 | 
					  {
 | 
				
			||||||
    prop: 'orderName',
 | 
					    prop: 'certificateNumber',
 | 
				
			||||||
    label: '订单名称',
 | 
					    label: '合格证号',
 | 
				
			||||||
 | 
					    minWidth: 120,
 | 
				
			||||||
 | 
							showOverflowtooltip: true,
 | 
				
			||||||
 | 
					    filter: (val) => val ? val : '--'
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  {
 | 
					  {
 | 
				
			||||||
    prop: 'workOrderName',
 | 
					    prop: 'boxNumber',
 | 
				
			||||||
    label: '工单名称',
 | 
					    label: '箱号',
 | 
				
			||||||
  },
 | 
					    minWidth: 150,
 | 
				
			||||||
  {
 | 
							showOverflowtooltip: true,
 | 
				
			||||||
    prop: 'palletNumber',
 | 
					    filter: (val) => val ? val : '--'
 | 
				
			||||||
    label: '托号',
 | 
					 | 
				
			||||||
  },
 | 
					 | 
				
			||||||
  {
 | 
					 | 
				
			||||||
    prop: 'transportQuantity',
 | 
					 | 
				
			||||||
    label: '该托片数',
 | 
					 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  {
 | 
					  {
 | 
				
			||||||
    prop: 'packagingCode',
 | 
					    prop: 'packagingCode',
 | 
				
			||||||
    label: '包装条码',
 | 
					    label: '成品周转编号',
 | 
				
			||||||
  },
 | 
					    minWidth: 180,
 | 
				
			||||||
  {
 | 
							showOverflowtooltip: true,
 | 
				
			||||||
    prop: 'originalGlassLineName',
 | 
					    filter: (val) => val ? val : '--'
 | 
				
			||||||
    label: '原片产线',
 | 
					 | 
				
			||||||
  },
 | 
					 | 
				
			||||||
  {
 | 
					 | 
				
			||||||
    prop: 'originalGlassOutputTime',
 | 
					 | 
				
			||||||
    label: '原片下片时间',
 | 
					 | 
				
			||||||
    filter: parseTime
 | 
					 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  {
 | 
					  {
 | 
				
			||||||
    prop: 'deepProcessingLineName',
 | 
					    prop: 'deepProcessingLineName',
 | 
				
			||||||
    label: '深加工产线',
 | 
					    label: '深加工产线',
 | 
				
			||||||
 | 
					    minWidth: 120,
 | 
				
			||||||
 | 
							showOverflowtooltip: true,
 | 
				
			||||||
 | 
					    filter: (val) => val ? val : '--'
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  {
 | 
					  {
 | 
				
			||||||
    prop: 'deepProcessingInputTime',
 | 
					    prop: 'deepProcessingInputTime',
 | 
				
			||||||
    label: '深加工上片时间',
 | 
					    label: '深加工上片时间',
 | 
				
			||||||
    filter: parseTime
 | 
					    // filter: (val) => parseTime(val) ? parseTime(val) : '--',
 | 
				
			||||||
 | 
					    filter: parseTime,
 | 
				
			||||||
 | 
					    minWidth: 180,
 | 
				
			||||||
 | 
							showOverflowtooltip: true
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  {
 | 
					  {
 | 
				
			||||||
    prop: 'productionOutputTime',
 | 
					    prop: 'deepProcessingOutputTime',
 | 
				
			||||||
    label: '深加工下片时间',
 | 
					    label: '深加工下片时间',
 | 
				
			||||||
    filter: parseTime
 | 
					    filter: parseTime,
 | 
				
			||||||
 | 
					    minWidth: 180,
 | 
				
			||||||
 | 
							showOverflowtooltip: true
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
 | 
					  {
 | 
				
			||||||
 | 
					    prop: 'glassCode',
 | 
				
			||||||
 | 
					    label: '原片周转编码',
 | 
				
			||||||
 | 
					    minWidth: 150,
 | 
				
			||||||
 | 
							showOverflowtooltip: true
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  {
 | 
				
			||||||
 | 
					    prop: 'originalGlassLineName',
 | 
				
			||||||
 | 
					    label: '原片产线',
 | 
				
			||||||
 | 
					    minWidth: 150,
 | 
				
			||||||
 | 
							showOverflowtooltip: true
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  {
 | 
				
			||||||
 | 
					    prop: 'originalGlassOutputTime',
 | 
				
			||||||
 | 
					    label: '原片下片时间',
 | 
				
			||||||
 | 
					    filter: parseTime,
 | 
				
			||||||
 | 
					    minWidth: 180,
 | 
				
			||||||
 | 
							showOverflowtooltip: true
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
  // {
 | 
					  // {
 | 
				
			||||||
  //   prop: 'scrapDetail',
 | 
					  //   prop: 'scrapDetail',
 | 
				
			||||||
  //   label: '详情',
 | 
					  //   label: '详情',
 | 
				
			||||||
@@ -90,62 +144,90 @@ export default {
 | 
				
			|||||||
  mixins: [tableHeightMixin],
 | 
					  mixins: [tableHeightMixin],
 | 
				
			||||||
  data() {
 | 
					  data() {
 | 
				
			||||||
    return {
 | 
					    return {
 | 
				
			||||||
      // urlOptions: {
 | 
					      lineOptions: [],
 | 
				
			||||||
      //   getDataListURL: getMaterialUseLogPage,
 | 
					 | 
				
			||||||
      //   // deleteURL: deletePackingType,
 | 
					 | 
				
			||||||
      //   // exportURL: exportPackingExcel,
 | 
					 | 
				
			||||||
      // },
 | 
					 | 
				
			||||||
      tableProps,
 | 
					      tableProps,
 | 
				
			||||||
      // tableBtn: [
 | 
					      tableBtn: [
 | 
				
			||||||
      //   // this.$auth.hasPermi(`base:packaging-print-log:update`)
 | 
					        // this.$auth.hasPermi(`base:packaging-print-log:update`)
 | 
				
			||||||
      //   //   ?
 | 
					        //   ?
 | 
				
			||||||
      //     {
 | 
					          {
 | 
				
			||||||
      //       type: 'edit',
 | 
					            type: 'detail0',
 | 
				
			||||||
      //       btnName: '编辑',
 | 
					            btnName: '成品缺陷详情',
 | 
				
			||||||
      //     },
 | 
					          },
 | 
				
			||||||
      //     // : undefined,
 | 
					          // : undefined,
 | 
				
			||||||
      //   // this.$auth.hasPermi(`base:packaging-print-log:delete`)
 | 
					        // this.$auth.hasPermi(`base:packaging-print-log:delete`)
 | 
				
			||||||
      //   //   ?
 | 
					        //   ?
 | 
				
			||||||
      //     {
 | 
					          {
 | 
				
			||||||
      //       type: 'delete',
 | 
					            type: 'detail1',
 | 
				
			||||||
      //       btnName: '删除',
 | 
					            btnName: '原片缺陷详情',
 | 
				
			||||||
      //     }
 | 
					          }
 | 
				
			||||||
      //     // : undefined,
 | 
					          // : undefined,
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      // ].filter((v) => v),
 | 
					      ].filter((v) => v),
 | 
				
			||||||
      list: [],
 | 
					      list: [],
 | 
				
			||||||
      listQuery: {
 | 
					      listQuery: {
 | 
				
			||||||
        pageSize: 10,
 | 
					        // pageSize: 10,
 | 
				
			||||||
        pageNo: 1,
 | 
					        // pageNo: 1,
 | 
				
			||||||
        total: 0,
 | 
					        // total: 0,
 | 
				
			||||||
        workOrderId: undefined,
 | 
					        certificateNumber: undefined,
 | 
				
			||||||
        startTime: undefined,
 | 
					        packagingCode: undefined,
 | 
				
			||||||
        endTime:undefined,
 | 
					        packTime: null,
 | 
				
			||||||
 | 
					        lineName: null,
 | 
				
			||||||
 | 
					        glassCode: undefined
 | 
				
			||||||
      },
 | 
					      },
 | 
				
			||||||
 | 
					      useTime: false,
 | 
				
			||||||
 | 
					      countArray: [false, false, false, false],
 | 
				
			||||||
      // tableH: this.tableHeight(260),
 | 
					      // tableH: this.tableHeight(260),
 | 
				
			||||||
      formConfig: [
 | 
					      formConfig: [
 | 
				
			||||||
 | 
					        // {
 | 
				
			||||||
 | 
					        //   type: 'select',
 | 
				
			||||||
 | 
					        //   label: '工单',
 | 
				
			||||||
 | 
					        //   selectOptions: [],
 | 
				
			||||||
 | 
					        //   labelField: 'name',
 | 
				
			||||||
 | 
					        //   valueField: 'name',
 | 
				
			||||||
 | 
					        //   param: 'workOrderName',
 | 
				
			||||||
 | 
					        //   filterable: true
 | 
				
			||||||
 | 
					        // },
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					          type: 'input',
 | 
				
			||||||
 | 
					          label: '合格证号',
 | 
				
			||||||
 | 
					          placeholder: '合格证号',
 | 
				
			||||||
 | 
					          param: 'certificateNumber',
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					          type: 'input',
 | 
				
			||||||
 | 
					          label: '成品周转编号',
 | 
				
			||||||
 | 
					          placeholder: '成品周转编号',
 | 
				
			||||||
 | 
					          param: 'packagingCode'
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					          type: 'datePicker',
 | 
				
			||||||
 | 
					          label: '包装全检时间及产线',
 | 
				
			||||||
 | 
					          dateType: 'datetimerange',
 | 
				
			||||||
 | 
					          format: 'timestamp',
 | 
				
			||||||
 | 
					          valueFormat: "timestamp",
 | 
				
			||||||
 | 
					          rangeSeparator: '-',
 | 
				
			||||||
 | 
					          startPlaceholder: '开始时间',
 | 
				
			||||||
 | 
					          endPlaceholder: '结束时间',
 | 
				
			||||||
 | 
					          param: 'timeVal',
 | 
				
			||||||
 | 
					          defaultSelect: [],
 | 
				
			||||||
 | 
					          width: 250
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
          type: 'select',
 | 
					          type: 'select',
 | 
				
			||||||
          label: '工单',
 | 
					          label: '',
 | 
				
			||||||
          selectOptions: [],
 | 
					          selectOptions: [],
 | 
				
			||||||
          labelField: 'name',
 | 
					          labelField: 'name',
 | 
				
			||||||
          valueField: 'name',
 | 
					          valueField: 'name',
 | 
				
			||||||
          param: 'workOrderName',
 | 
					          param: 'lineName',
 | 
				
			||||||
          filterable: true
 | 
					          filterable: true
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
        // {
 | 
					        {
 | 
				
			||||||
        //   type: 'datePicker',
 | 
					          type: 'input',
 | 
				
			||||||
        //   label: '时间段',
 | 
					          label: '原片周转编号',
 | 
				
			||||||
        //   dateType: 'daterange',
 | 
					          placeholder: '原片周转编号',
 | 
				
			||||||
        //   format: 'yyyy-MM-dd',
 | 
					          param: 'glassCode'
 | 
				
			||||||
        //   valueFormat: "yyyy-MM-dd",
 | 
					        },
 | 
				
			||||||
        //   rangeSeparator: '-',
 | 
					 | 
				
			||||||
        //   startPlaceholder: '开始时间',
 | 
					 | 
				
			||||||
        //   endPlaceholder: '结束时间',
 | 
					 | 
				
			||||||
        //   param: 'timeVal',
 | 
					 | 
				
			||||||
        //   defaultSelect: [],
 | 
					 | 
				
			||||||
        //   width: 250
 | 
					 | 
				
			||||||
        // },
 | 
					 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
          type: this.$auth.hasPermi('monitoring:rawMaterial-traceability:query') ? 'button' : '',
 | 
					          type: this.$auth.hasPermi('monitoring:rawMaterial-traceability:query') ? 'button' : '',
 | 
				
			||||||
@@ -191,41 +273,86 @@ export default {
 | 
				
			|||||||
    // window.addEventListener('resize', () => {
 | 
					    // window.addEventListener('resize', () => {
 | 
				
			||||||
    //   this.tableH = this.tableHeight(260)
 | 
					    //   this.tableH = this.tableHeight(260)
 | 
				
			||||||
    // })
 | 
					    // })
 | 
				
			||||||
    this.getList()
 | 
					    countArray: [false, false, false, false],
 | 
				
			||||||
 | 
					    this.useTime = false
 | 
				
			||||||
 | 
					    // this.getList()
 | 
				
			||||||
    this.getDict()
 | 
					    this.getDict()
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  methods: {
 | 
					  methods: {
 | 
				
			||||||
 | 
					    handleClick(raw) {
 | 
				
			||||||
 | 
								if (raw.type === 'detail1') {
 | 
				
			||||||
 | 
					        // 原片缺陷
 | 
				
			||||||
 | 
									this.$router.push({
 | 
				
			||||||
 | 
					          path: '/quality/base/quality-isra',
 | 
				
			||||||
 | 
					          query: {
 | 
				
			||||||
 | 
					            // deepProcessingLineId: raw.data.deepProcessingLineId,
 | 
				
			||||||
 | 
					            lineName: raw.data.deepProcessingLineName,
 | 
				
			||||||
 | 
					            originalGlassOutputTime: raw.data.originalGlassOutputTime
 | 
				
			||||||
 | 
					          },
 | 
				
			||||||
 | 
					        });
 | 
				
			||||||
 | 
								} else {
 | 
				
			||||||
 | 
									// 成品缺陷
 | 
				
			||||||
 | 
									this.$router.push({
 | 
				
			||||||
 | 
					          path: '/quality/base/quality-inspection-data/detection-information/statistical-data',
 | 
				
			||||||
 | 
					          query: {
 | 
				
			||||||
 | 
					            startTime: raw.data.deepProcessingInputTime,
 | 
				
			||||||
 | 
					            endTime: raw.data.deepProcessingOutputTime
 | 
				
			||||||
 | 
					          },
 | 
				
			||||||
 | 
					        });
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
							},
 | 
				
			||||||
 | 
					    countTimes(val) {
 | 
				
			||||||
 | 
					      if (val === 1) {
 | 
				
			||||||
 | 
					        this.countArray[0] = this.listQuery.certificateNumber !== '' && this.listQuery.certificateNumber !== undefined
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
 | 
					      if (val === 2) {
 | 
				
			||||||
 | 
					        this.countArray[1] = this.listQuery?.packagingCode !== '' && this.listQuery?.packagingCode !== undefined
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
 | 
					      if (val === 3) {
 | 
				
			||||||
 | 
					        this.countArray[2] = this.listQuery?.glassCode !== '' && this.listQuery?.glassCode !== undefined
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
 | 
					      if (val === 'timestamp3') {
 | 
				
			||||||
 | 
					        if ((this.listQuery.packTime !== '' && this.listQuery.packTime !== null) || (this.listQuery?.lineName !== '' && this.listQuery.lineName !== null)) {
 | 
				
			||||||
 | 
					          this.useTime = true
 | 
				
			||||||
 | 
					          this.countArray[3] = true
 | 
				
			||||||
 | 
					        } else {
 | 
				
			||||||
 | 
					          this.useTime = false
 | 
				
			||||||
 | 
					          this.countArray[3] = true
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
    getList() {
 | 
					    getList() {
 | 
				
			||||||
      getOriginalGlassRetrace({ ...this.listQuery }).then(res => {
 | 
					      let trueArray = this.countArray.filter(val => val === true)
 | 
				
			||||||
        console.log(res);
 | 
					      if (trueArray.length !== 1) {
 | 
				
			||||||
        this.list = res.data || []
 | 
					        this.$message.error('请选择一个条件进行查询!')
 | 
				
			||||||
        console.log(this.list);
 | 
					      } else {
 | 
				
			||||||
        // this.listQuery.total = res.data.total || 0
 | 
					        if (this.useTime === true) {
 | 
				
			||||||
      })
 | 
					          if (this.listQuery.packTime !== null && this.listQuery.packTime !== '' && this.listQuery.lineName !== null && this.listQuery.lineName !== '') {
 | 
				
			||||||
 | 
					            getOriginalGlassRetrace({ ...this.listQuery }).then(res => {
 | 
				
			||||||
 | 
					              console.log(res);
 | 
				
			||||||
 | 
					              this.list = res.data || []
 | 
				
			||||||
 | 
					              console.log(this.list);
 | 
				
			||||||
 | 
					              // this.listQuery.total = res.data.total || 0
 | 
				
			||||||
 | 
					            })
 | 
				
			||||||
 | 
					          } else {
 | 
				
			||||||
 | 
					            this.$message.error('选择包装全检时,时间和产线均为必填!')
 | 
				
			||||||
 | 
					          }
 | 
				
			||||||
 | 
					        } else {
 | 
				
			||||||
 | 
					          getOriginalGlassRetrace({ ...this.listQuery }).then(res => {
 | 
				
			||||||
 | 
					            console.log(res);
 | 
				
			||||||
 | 
					            this.list = res.data || []
 | 
				
			||||||
 | 
					            console.log(this.list);
 | 
				
			||||||
 | 
					          })
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
 | 
					      
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    getDict() {
 | 
					    getDict() {
 | 
				
			||||||
      // 获取产品的属性列表
 | 
					      // 获取产线
 | 
				
			||||||
      // getCustomerList().then((response) => {
 | 
					      getCorePLList().then((res) => {
 | 
				
			||||||
      //   console.log(response);
 | 
									console.log(res);
 | 
				
			||||||
      //   this.customerList = response.data
 | 
									this.lineOptions = res.data;
 | 
				
			||||||
      //   // this.listQuery.total = response.data.total;
 | 
								})
 | 
				
			||||||
      // })
 | 
					 | 
				
			||||||
      // getModelList().then((response) => {
 | 
					 | 
				
			||||||
      //   console.log(response);
 | 
					 | 
				
			||||||
      //   this.modelList = response.data
 | 
					 | 
				
			||||||
      //   // this.listQuery.total = response.data.total;
 | 
					 | 
				
			||||||
      // })
 | 
					 | 
				
			||||||
      getWorkOrderList().then((response) => {
 | 
					 | 
				
			||||||
        // console.log(response);
 | 
					 | 
				
			||||||
        this.formConfig[0].selectOptions = response.data.map((item) => {
 | 
					 | 
				
			||||||
          return {
 | 
					 | 
				
			||||||
            name: item.name,
 | 
					 | 
				
			||||||
            id: item.id
 | 
					 | 
				
			||||||
          }
 | 
					 | 
				
			||||||
        })
 | 
					 | 
				
			||||||
        console.log(this.formConfig[0].selectOptions);
 | 
					 | 
				
			||||||
        // this.listQuery.total = response.data.total;
 | 
					 | 
				
			||||||
      })
 | 
					 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    // handleExport() {
 | 
					    // handleExport() {
 | 
				
			||||||
    //   // 处理查询参数
 | 
					    //   // 处理查询参数
 | 
				
			||||||
@@ -243,7 +370,7 @@ export default {
 | 
				
			|||||||
    buttonClick(val) {
 | 
					    buttonClick(val) {
 | 
				
			||||||
      console.log(val)
 | 
					      console.log(val)
 | 
				
			||||||
      if (val.btnName === 'search') {
 | 
					      if (val.btnName === 'search') {
 | 
				
			||||||
        this.listQuery.workOrderName = val.workOrderName ? val.workOrderName :undefined
 | 
					        this.listQuery.certificateNumber = val.certificateNumber ? val.certificateNumber :undefined
 | 
				
			||||||
        // this.queryParams.status = val.status
 | 
					        // this.queryParams.status = val.status
 | 
				
			||||||
        // if (val.timeVal && val.timeVal.length != 0 ) {
 | 
					        // if (val.timeVal && val.timeVal.length != 0 ) {
 | 
				
			||||||
        // this.listQuery.startTime =  val.timeVal[0] + ' 00:00:00'
 | 
					        // this.listQuery.startTime =  val.timeVal[0] + ' 00:00:00'
 | 
				
			||||||
@@ -272,3 +399,17 @@ export default {
 | 
				
			|||||||
  },
 | 
					  },
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
</script>
 | 
					</script>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					<style scoped>
 | 
				
			||||||
 | 
					.blueTip::before {
 | 
				
			||||||
 | 
						display: inline-block;
 | 
				
			||||||
 | 
						content: '';
 | 
				
			||||||
 | 
						width: 4px;
 | 
				
			||||||
 | 
						height: 18px;
 | 
				
			||||||
 | 
						background: #0b58ff;
 | 
				
			||||||
 | 
						border-radius: 1px;
 | 
				
			||||||
 | 
						margin-right: 8px;
 | 
				
			||||||
 | 
						margin-top: 8px;
 | 
				
			||||||
 | 
						margin-left: 16px;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					</style>
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -60,26 +60,26 @@ export default {
 | 
				
			|||||||
      list: [],
 | 
					      list: [],
 | 
				
			||||||
      dynamicProps:[],
 | 
					      dynamicProps:[],
 | 
				
			||||||
      searchBarFormConfig: [
 | 
					      searchBarFormConfig: [
 | 
				
			||||||
        {
 | 
					        // {
 | 
				
			||||||
          type: 'select',
 | 
					        //   type: 'select',
 | 
				
			||||||
          label: '工单名称',
 | 
					        //   label: '工单名称',
 | 
				
			||||||
          placeholder: '请选择工单名称',
 | 
					        //   placeholder: '请选择工单名称',
 | 
				
			||||||
          param: 'workOrderIdList',
 | 
					        //   param: 'workOrderIdList',
 | 
				
			||||||
          selectOptions: [],
 | 
					        //   selectOptions: [],
 | 
				
			||||||
          multiple: true,
 | 
					        //   multiple: true,
 | 
				
			||||||
          labelField: 'name',
 | 
					        //   labelField: 'name',
 | 
				
			||||||
          valueField: 'id',
 | 
					        //   valueField: 'id',
 | 
				
			||||||
          defaultSelect: [],
 | 
					        //   defaultSelect: [],
 | 
				
			||||||
          filterable: true
 | 
					        //   filterable: true
 | 
				
			||||||
        },
 | 
					        // },
 | 
				
			||||||
				{
 | 
									// {
 | 
				
			||||||
					type: 'select',
 | 
									// 	type: 'select',
 | 
				
			||||||
					label: '产品',
 | 
									// 	label: '产品',
 | 
				
			||||||
          placeholder: '请选择产品',
 | 
					        //   placeholder: '请选择产品',
 | 
				
			||||||
          param: 'productionId',
 | 
					        //   param: 'productionId',
 | 
				
			||||||
          selectOptions: [],
 | 
					        //   selectOptions: [],
 | 
				
			||||||
          filterable: true
 | 
					        //   filterable: true
 | 
				
			||||||
				},
 | 
									// },
 | 
				
			||||||
				// {
 | 
									// {
 | 
				
			||||||
				// 	type: 'input',
 | 
									// 	type: 'input',
 | 
				
			||||||
				// 	label: '检测内容',
 | 
									// 	label: '检测内容',
 | 
				
			||||||
@@ -193,8 +193,8 @@ export default {
 | 
				
			|||||||
			// },
 | 
								// },
 | 
				
			||||||
			// 查询参数
 | 
								// 查询参数
 | 
				
			||||||
			queryParams: {
 | 
								queryParams: {
 | 
				
			||||||
        workOrderIdList:undefined,
 | 
					        // workOrderIdList:undefined,
 | 
				
			||||||
        productionId: undefined,
 | 
					        // productionId: undefined,
 | 
				
			||||||
        startTime: undefined,
 | 
					        startTime: undefined,
 | 
				
			||||||
        endTime: undefined,
 | 
					        endTime: undefined,
 | 
				
			||||||
				// productionLineId: null,
 | 
									// productionLineId: null,
 | 
				
			||||||
@@ -207,16 +207,16 @@ export default {
 | 
				
			|||||||
  computed: {
 | 
					  computed: {
 | 
				
			||||||
    tableProps() {
 | 
					    tableProps() {
 | 
				
			||||||
      return [
 | 
					      return [
 | 
				
			||||||
        {
 | 
					        // {
 | 
				
			||||||
          // width: 128,
 | 
					        //   // width: 128,
 | 
				
			||||||
          prop: 'workOrderName',
 | 
					        //   prop: 'workOrderName',
 | 
				
			||||||
          label: '工单名称',
 | 
					        //   label: '工单名称',
 | 
				
			||||||
        },
 | 
					        // },
 | 
				
			||||||
        {
 | 
					        // {
 | 
				
			||||||
          // width: 128,
 | 
					        //   // width: 128,
 | 
				
			||||||
          prop: 'productionName',
 | 
					        //   prop: 'productionName',
 | 
				
			||||||
          label: '产品',
 | 
					        //   label: '产品',
 | 
				
			||||||
        },
 | 
					        // },
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
          // width: 160,
 | 
					          // width: 160,
 | 
				
			||||||
          prop: 'inspectionContent',
 | 
					          prop: 'inspectionContent',
 | 
				
			||||||
@@ -259,17 +259,17 @@ export default {
 | 
				
			|||||||
    },
 | 
					    },
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  mounted() {
 | 
					  mounted() {
 | 
				
			||||||
    if (this.$route.query.woIdString) {
 | 
					    // if (this.$route.query.woIdString) {
 | 
				
			||||||
      console.log(this.$route.query.woIdString)
 | 
					    //   console.log(this.$route.query.woIdString)
 | 
				
			||||||
      this.queryParams.workOrderIdList = this.$route.query.woIdString.split(',')
 | 
					    //   this.queryParams.workOrderIdList = this.$route.query.woIdString.split(',')
 | 
				
			||||||
      // this.queryParams.workOrderIdList = [this.$route.query.woIdString]
 | 
					    //   // this.queryParams.workOrderIdList = [this.$route.query.woIdString]
 | 
				
			||||||
      // let arr =[]
 | 
					    //   // let arr =[]
 | 
				
			||||||
      this.searchBarFormConfig[0].defaultSelect = this.$route.query.woIdString.split(',')
 | 
					    //   this.searchBarFormConfig[0].defaultSelect = this.$route.query.woIdString.split(',')
 | 
				
			||||||
      console.log(this.searchBarFormConfig[0].defaultSelect);
 | 
					    //   console.log(this.searchBarFormConfig[0].defaultSelect);
 | 
				
			||||||
    }
 | 
					    // }
 | 
				
			||||||
    if (this.$route.query.startTime && this.$route.query.endTime) {
 | 
					    if (this.$route.query.startTime && this.$route.query.endTime) {
 | 
				
			||||||
      // console.log(this.$route.query.startTime);
 | 
					      // console.log(this.$route.query.startTime);
 | 
				
			||||||
      this.searchBarFormConfig[2].defaultSelect = [moment(Number(this.$route.query.startTime)).format('yyyy-MM-DD HH:mm:ss'), moment(Number(this.$route.query.endTime)).format('yyyy-MM-DD HH:mm:ss'),]
 | 
					      this.searchBarFormConfig[0].defaultSelect = [moment(Number(this.$route.query.startTime)).format('yyyy-MM-DD HH:mm:ss'), moment(Number(this.$route.query.endTime)).format('yyyy-MM-DD HH:mm:ss'),]
 | 
				
			||||||
      this.queryParams.startTime = moment(Number(this.$route.query.startTime)).format('yyyy-MM-DD HH:mm:ss')
 | 
					      this.queryParams.startTime = moment(Number(this.$route.query.startTime)).format('yyyy-MM-DD HH:mm:ss')
 | 
				
			||||||
      this.queryParams.endTime = moment(Number(this.$route.query.endTime)).format('yyyy-MM-DD HH:mm:ss')
 | 
					      this.queryParams.endTime = moment(Number(this.$route.query.endTime)).format('yyyy-MM-DD HH:mm:ss')
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
@@ -370,8 +370,8 @@ export default {
 | 
				
			|||||||
		/** 取消按钮 */
 | 
							/** 取消按钮 */
 | 
				
			||||||
    handleSearchBarBtnClick(val) {
 | 
					    handleSearchBarBtnClick(val) {
 | 
				
			||||||
      if (val.btnName === 'search') {
 | 
					      if (val.btnName === 'search') {
 | 
				
			||||||
        this.queryParams.workOrderIdList = val.workOrderIdList ? val.workOrderIdList : undefined
 | 
					        // this.queryParams.workOrderIdList = val.workOrderIdList ? val.workOrderIdList : undefined
 | 
				
			||||||
        this.queryParams.productionId = val.productionId ? val.productionId : undefined
 | 
					        // this.queryParams.productionId = val.productionId ? val.productionId : undefined
 | 
				
			||||||
        this.queryParams.startTime = val.checkTime ? val.checkTime[0] : undefined
 | 
					        this.queryParams.startTime = val.checkTime ? val.checkTime[0] : undefined
 | 
				
			||||||
        this.queryParams.endTime = val.checkTime ? val.checkTime[1] : undefined
 | 
					        this.queryParams.endTime = val.checkTime ? val.checkTime[1] : undefined
 | 
				
			||||||
        this.getList()
 | 
					        this.getList()
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -75,7 +75,7 @@ export default {
 | 
				
			|||||||
					selectOptions: [
 | 
										selectOptions: [
 | 
				
			||||||
						{ id: '1', name: '当前班次' },
 | 
											{ id: '1', name: '当前班次' },
 | 
				
			||||||
						{ id: '2', name: '近24小时' },
 | 
											{ id: '2', name: '近24小时' },
 | 
				
			||||||
						{ id: '3', name: '日报' },
 | 
											{ id: '3', name: '昨日日报' },
 | 
				
			||||||
					],
 | 
										],
 | 
				
			||||||
					defaultSelect: '1',
 | 
										defaultSelect: '1',
 | 
				
			||||||
					param: 'timeType',
 | 
										param: 'timeType',
 | 
				
			||||||
@@ -112,7 +112,7 @@ export default {
 | 
				
			|||||||
					selectOptions: [
 | 
										selectOptions: [
 | 
				
			||||||
						{ id: '1', name: '当前班次' },
 | 
											{ id: '1', name: '当前班次' },
 | 
				
			||||||
						{ id: '2', name: '近24小时' },
 | 
											{ id: '2', name: '近24小时' },
 | 
				
			||||||
						{ id: '3', name: '日报' },
 | 
											{ id: '3', name: '昨日日报' },
 | 
				
			||||||
					],
 | 
										],
 | 
				
			||||||
					param: 'timeType',
 | 
										param: 'timeType',
 | 
				
			||||||
					clearable: false,
 | 
										clearable: false,
 | 
				
			||||||
@@ -196,6 +196,7 @@ export default {
 | 
				
			|||||||
				this.tableProp = [];
 | 
									this.tableProp = [];
 | 
				
			||||||
				let timeArr = this.uniqueTime(data, 'timeStr');
 | 
									let timeArr = this.uniqueTime(data, 'timeStr');
 | 
				
			||||||
				let arr = [];
 | 
									let arr = [];
 | 
				
			||||||
 | 
									let arr1 = [];
 | 
				
			||||||
				timeArr.map((item) => {
 | 
									timeArr.map((item) => {
 | 
				
			||||||
					let obj = {};
 | 
										let obj = {};
 | 
				
			||||||
					obj.prop = item.timeStr;
 | 
										obj.prop = item.timeStr;
 | 
				
			||||||
@@ -203,7 +204,17 @@ export default {
 | 
				
			|||||||
					obj.minWidth = 140;
 | 
										obj.minWidth = 140;
 | 
				
			||||||
					arr.push(obj);
 | 
										arr.push(obj);
 | 
				
			||||||
				});
 | 
									});
 | 
				
			||||||
				this.tableProp = this.tableProp1.concat(arr); //表头
 | 
									let obj1 = {};
 | 
				
			||||||
 | 
									obj1.children = arr.length > 0 ? arr : [{ label: '合计' }];
 | 
				
			||||||
 | 
									obj1.label =
 | 
				
			||||||
 | 
										'24小时原片工段产量表(' +
 | 
				
			||||||
 | 
										moment(this.queryParams.startTime).format('YYYY-MM-DD HH:mm:ss') +
 | 
				
			||||||
 | 
										'-' +
 | 
				
			||||||
 | 
										moment(this.queryParams.endTime).format('YYYY-MM-DD HH:mm:ss') +
 | 
				
			||||||
 | 
										')';
 | 
				
			||||||
 | 
									arr1.push(obj1);
 | 
				
			||||||
 | 
									this.tableProp = this.tableProp1.concat(arr1); //表头
 | 
				
			||||||
 | 
									console.log(this.tableProp);
 | 
				
			||||||
				this.transferData(data);
 | 
									this.transferData(data);
 | 
				
			||||||
			});
 | 
								});
 | 
				
			||||||
		},
 | 
							},
 | 
				
			||||||
@@ -286,7 +297,6 @@ export default {
 | 
				
			|||||||
		transferData(data) {
 | 
							transferData(data) {
 | 
				
			||||||
			let tempData = [];
 | 
								let tempData = [];
 | 
				
			||||||
			let lineNum = 0; //第一条产线
 | 
								let lineNum = 0; //第一条产线
 | 
				
			||||||
			let sumArr = [];
 | 
					 | 
				
			||||||
			for (let i = 0; i < data.length; i++) {
 | 
								for (let i = 0; i < data.length; i++) {
 | 
				
			||||||
				if (i === 0) {
 | 
									if (i === 0) {
 | 
				
			||||||
					this.procedureName.map((item) => {
 | 
										this.procedureName.map((item) => {
 | 
				
			||||||
@@ -299,37 +309,28 @@ export default {
 | 
				
			|||||||
					});
 | 
										});
 | 
				
			||||||
					lineNum++;
 | 
										lineNum++;
 | 
				
			||||||
				} else {
 | 
									} else {
 | 
				
			||||||
					if (data[i].timeStr === '总计') {
 | 
										if (data[i].lineName === data[i - 1].lineName) {
 | 
				
			||||||
						sumArr.push(data[i]);
 | 
											//相同产线,添加列
 | 
				
			||||||
					} else {
 | 
											let startNum = 5 * (lineNum - 1);
 | 
				
			||||||
						if (data[i].lineName === data[i - 1].lineName) {
 | 
											let endNum = 5 * lineNum - 1;
 | 
				
			||||||
							//相同产线,添加列
 | 
											for (let k = startNum; k <= endNum; k++) {
 | 
				
			||||||
							let startNum = 5 * (lineNum - 1);
 | 
												let str = this.procedureName[k % 5];
 | 
				
			||||||
							let endNum = 5 * lineNum - 1;
 | 
												tempData[k][data[i].timeStr] = data[i][str.ename];
 | 
				
			||||||
							for (let k = startNum; k <= endNum; k++) {
 | 
					 | 
				
			||||||
								let str = this.procedureName[k % 5];
 | 
					 | 
				
			||||||
								tempData[k][data[i].timeStr] = data[i][str.ename];
 | 
					 | 
				
			||||||
							}
 | 
					 | 
				
			||||||
						} else {
 | 
					 | 
				
			||||||
							//不同产线,同时添加5行
 | 
					 | 
				
			||||||
							this.procedureName.map((item) => {
 | 
					 | 
				
			||||||
								let obj = {};
 | 
					 | 
				
			||||||
								obj.lineName = data[i].lineName;
 | 
					 | 
				
			||||||
								obj.procedure = item.name;
 | 
					 | 
				
			||||||
								obj.eName = item.ename;
 | 
					 | 
				
			||||||
								obj[data[i].timeStr] = data[i][item.ename];
 | 
					 | 
				
			||||||
								tempData.push(obj);
 | 
					 | 
				
			||||||
							});
 | 
					 | 
				
			||||||
							lineNum++;
 | 
					 | 
				
			||||||
						}
 | 
											}
 | 
				
			||||||
 | 
										} else {
 | 
				
			||||||
 | 
											//不同产线,同时添加5行
 | 
				
			||||||
 | 
											this.procedureName.map((item) => {
 | 
				
			||||||
 | 
												let obj = {};
 | 
				
			||||||
 | 
												obj.lineName = data[i].lineName;
 | 
				
			||||||
 | 
												obj.procedure = item.name;
 | 
				
			||||||
 | 
												obj.eName = item.ename;
 | 
				
			||||||
 | 
												obj[data[i].timeStr] = data[i][item.ename];
 | 
				
			||||||
 | 
												tempData.push(obj);
 | 
				
			||||||
 | 
											});
 | 
				
			||||||
 | 
											lineNum++;
 | 
				
			||||||
					}
 | 
										}
 | 
				
			||||||
				}
 | 
									}
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
			for (let j = 0; j < tempData.length; j++) {
 | 
					 | 
				
			||||||
				sumArr.map((item) => {
 | 
					 | 
				
			||||||
					tempData[j]['总计'] = item[tempData[j].eName];
 | 
					 | 
				
			||||||
				});
 | 
					 | 
				
			||||||
			}
 | 
					 | 
				
			||||||
			this.tableData = tempData;
 | 
								this.tableData = tempData;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
			this.$nextTick(() => {
 | 
								this.$nextTick(() => {
 | 
				
			||||||
@@ -395,7 +396,17 @@ export default {
 | 
				
			|||||||
					arr.push(obj);
 | 
										arr.push(obj);
 | 
				
			||||||
				});
 | 
									});
 | 
				
			||||||
				arr.push({ prop: 'sum', label: '合计' });
 | 
									arr.push({ prop: 'sum', label: '合计' });
 | 
				
			||||||
				this.tableProp2 = this.tableProp1.concat(arr); //表头
 | 
									let arr1 = [];
 | 
				
			||||||
 | 
									let obj1 = {};
 | 
				
			||||||
 | 
									obj1.children = arr;
 | 
				
			||||||
 | 
									obj1.label =
 | 
				
			||||||
 | 
										'24小时深加工工段产量表(' +
 | 
				
			||||||
 | 
										moment(this.queryParams2.startTime).format('YYYY-MM-DD HH:mm:ss') +
 | 
				
			||||||
 | 
										'-' +
 | 
				
			||||||
 | 
										moment(this.queryParams2.endTime).format('YYYY-MM-DD HH:mm:ss') +
 | 
				
			||||||
 | 
										')';
 | 
				
			||||||
 | 
									arr1.push(obj1);
 | 
				
			||||||
 | 
									this.tableProp2 = this.tableProp1.concat(arr1); //表头
 | 
				
			||||||
				this.getSpanArr(this.tableData2);
 | 
									this.getSpanArr(this.tableData2);
 | 
				
			||||||
				this.$nextTick(() => {
 | 
									this.$nextTick(() => {
 | 
				
			||||||
					this.reTable2();
 | 
										this.reTable2();
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,141 +1,389 @@
 | 
				
			|||||||
<!--
 | 
					<!--
 | 
				
			||||||
 * @Author: Do not edit
 | 
					 * @Author: Do not edit
 | 
				
			||||||
 * @Date: 2024-04-22 15:49:56
 | 
					 * @Date: 2024-04-22 15:49:56
 | 
				
			||||||
 * @LastEditTime: 2024-04-23 17:06:16
 | 
					 * @LastEditTime: 2024-04-26 10:32:29
 | 
				
			||||||
 * @LastEditors: DY
 | 
					 * @LastEditors: DY
 | 
				
			||||||
 * @Description: 
 | 
					 * @Description: 
 | 
				
			||||||
-->
 | 
					-->
 | 
				
			||||||
<template>
 | 
					<template>
 | 
				
			||||||
  <div class="weekly">
 | 
						<div class="weekly">
 | 
				
			||||||
    <el-form :inline="true" :model="listQuery" class="blueTip">
 | 
							<el-form
 | 
				
			||||||
      <el-form-item label="月" prop="reportTime">
 | 
								:inline="true"
 | 
				
			||||||
        <el-date-picker v-model="reportTime" type="month" size="small" @change="changeTime" placeholder="选择月">
 | 
								:model="listQuery"
 | 
				
			||||||
        </el-date-picker>
 | 
								class="blueTip">
 | 
				
			||||||
      </el-form-item>
 | 
								<el-form-item
 | 
				
			||||||
      <el-button v-if="this.$auth.hasPermi('base:report-auto-production:query')" type="primary" size="small" @click="search()">
 | 
									label="月份"
 | 
				
			||||||
        查询
 | 
									prop="reportTime">
 | 
				
			||||||
      </el-button>
 | 
									<el-date-picker
 | 
				
			||||||
      <el-button v-if="this.$auth.hasPermiAnd(['base:report-auto-original-glass:export', 'base:report-auto-production:export'])" type="primary" size="small" plain
 | 
										v-model="listQuery.time"
 | 
				
			||||||
        @click="handleExport">导出</el-button>
 | 
										value-format="timestamp"
 | 
				
			||||||
    </el-form>
 | 
										type="month"
 | 
				
			||||||
    <monthWeek v-if="glassWeekShow" ref="monthWeek" :product="false" :params="listQuery" />
 | 
										size="small"
 | 
				
			||||||
    <proMonth v-if="proWeekShow" ref="proMonth" :product="false" :params="listQuery" />
 | 
										placeholder="选择月"></el-date-picker>
 | 
				
			||||||
  </div>
 | 
								</el-form-item>
 | 
				
			||||||
 | 
								<el-button
 | 
				
			||||||
 | 
									v-if="this.$auth.hasPermi('base:report-auto-production:query')"
 | 
				
			||||||
 | 
									type="primary"
 | 
				
			||||||
 | 
									size="small"
 | 
				
			||||||
 | 
									@click="getList">
 | 
				
			||||||
 | 
									查询
 | 
				
			||||||
 | 
								</el-button>
 | 
				
			||||||
 | 
								<el-button
 | 
				
			||||||
 | 
									v-if="
 | 
				
			||||||
 | 
										this.$auth.hasPermiAnd([
 | 
				
			||||||
 | 
											'base:report-auto-original-glass:export',
 | 
				
			||||||
 | 
											'base:report-auto-production:export',
 | 
				
			||||||
 | 
										])
 | 
				
			||||||
 | 
									"
 | 
				
			||||||
 | 
									type="primary"
 | 
				
			||||||
 | 
									size="small"
 | 
				
			||||||
 | 
									plain
 | 
				
			||||||
 | 
									@click="handleExport">
 | 
				
			||||||
 | 
									导出
 | 
				
			||||||
 | 
								</el-button>
 | 
				
			||||||
 | 
							</el-form>
 | 
				
			||||||
 | 
							<base-table
 | 
				
			||||||
 | 
								ref="productionDataMonthTable11"
 | 
				
			||||||
 | 
								id="productionDataMonthTable1"
 | 
				
			||||||
 | 
								:table-props="tableProps"
 | 
				
			||||||
 | 
								:table-data="tableData"
 | 
				
			||||||
 | 
								:span-method="objectSpanMethod1"
 | 
				
			||||||
 | 
								@emitFun="handleEmitFun"
 | 
				
			||||||
 | 
								:max-height="tableH" />
 | 
				
			||||||
 | 
							<base-table
 | 
				
			||||||
 | 
							ref="productionDataMonthTable22"
 | 
				
			||||||
 | 
								id="productionDataMonthTable2"
 | 
				
			||||||
 | 
								:table-props="tableProps1"
 | 
				
			||||||
 | 
								:table-data="tableData1"
 | 
				
			||||||
 | 
								:span-method="objectSpanMethod1"
 | 
				
			||||||
 | 
								@emitFun="handleEmitFun"
 | 
				
			||||||
 | 
								:max-height="tableH"
 | 
				
			||||||
 | 
								style="margin-top: 15px" />
 | 
				
			||||||
 | 
						</div>
 | 
				
			||||||
</template>
 | 
					</template>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
<script>
 | 
					<script>
 | 
				
			||||||
import monthWeek from '../glass/month.vue'
 | 
					import { productionMonthY, productionMonthD } from '@/api/report/glass';
 | 
				
			||||||
import proMonth from '../productionMonthReport/index.vue'
 | 
					 | 
				
			||||||
import { parseTime } from '../../core/mixins/code-filter';
 | 
					import { parseTime } from '../../core/mixins/code-filter';
 | 
				
			||||||
 | 
					import FileSaver from 'file-saver';
 | 
				
			||||||
 | 
					import * as XLSX from 'xlsx/xlsx.mjs';
 | 
				
			||||||
 | 
					import tableHeightMixin from '@/mixins/lb/tableHeightMixin';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export default {
 | 
					export default {
 | 
				
			||||||
  components: { monthWeek, proMonth },
 | 
						// components: { monthWeek, proMonth },
 | 
				
			||||||
  data() {
 | 
						mixins: [tableHeightMixin],
 | 
				
			||||||
    return {
 | 
						data() {
 | 
				
			||||||
      listQuery: {
 | 
							return {
 | 
				
			||||||
				// pageSize: 10,
 | 
								heightNum: 350,
 | 
				
			||||||
				// pageNo: 1,
 | 
								listQuery: {
 | 
				
			||||||
				// total: 0,
 | 
									time: '',
 | 
				
			||||||
				reportType: 4,
 | 
								},
 | 
				
			||||||
				reportTime: []
 | 
								// startTimeStamp: '',
 | 
				
			||||||
      },
 | 
								// endTimeStamp: '',
 | 
				
			||||||
      startTimeStamp: '',
 | 
								// reportTime: '',
 | 
				
			||||||
      endTimeStamp: '',
 | 
								// glassWeekShow: false,
 | 
				
			||||||
      reportTime: '',
 | 
								// proWeekShow: false,
 | 
				
			||||||
      glassWeekShow: false,
 | 
								tableData: [],
 | 
				
			||||||
      proWeekShow: false
 | 
								tableProps: [],
 | 
				
			||||||
    }
 | 
								tableData1: [],
 | 
				
			||||||
  },
 | 
								tableProps1: [],
 | 
				
			||||||
  created() {
 | 
								resData: [],
 | 
				
			||||||
    this.getCurrentMonthFirst()
 | 
								span1: [], //表格1的合并规则
 | 
				
			||||||
    this.glassWeekShow = true
 | 
								resData1: [],
 | 
				
			||||||
    this.proWeekShow = true
 | 
								span2: []
 | 
				
			||||||
  },
 | 
							};
 | 
				
			||||||
  methods: {
 | 
						},
 | 
				
			||||||
    getCurrentMonthFirst() {
 | 
						created() {
 | 
				
			||||||
      const date = new Date();
 | 
							let now = new Date()
 | 
				
			||||||
      date.setDate(1);
 | 
					    now.setHours(0, 0, 0, 0)
 | 
				
			||||||
      this.reportTime = date
 | 
					    now.setDate(1)
 | 
				
			||||||
      // console.log(date)
 | 
					    let startOfMonth = now.getTime()
 | 
				
			||||||
      this.changeTime(date)
 | 
					    this.listQuery.time = startOfMonth
 | 
				
			||||||
      // console.log(date.valueOf());
 | 
						},
 | 
				
			||||||
    },
 | 
						mounted() {
 | 
				
			||||||
    handleExport() {
 | 
							this.getList();
 | 
				
			||||||
      this.$nextTick(() => {
 | 
						},
 | 
				
			||||||
        this.$refs['monthWeek'].handleExport()
 | 
						methods: {
 | 
				
			||||||
        this.$refs['proMonth'].handleExport()
 | 
							getTime1() {
 | 
				
			||||||
      })
 | 
								const firstDayOfMonth = new Date(this.listQuery.time)
 | 
				
			||||||
    },
 | 
								const lastDayOfMonth = new Date(firstDayOfMonth.getFullYear(), firstDayOfMonth.getMonth() + 1, 0, 0, 0, 0, 0)
 | 
				
			||||||
    search() {
 | 
								// console.log('时间', parseTime(firstDayOfMonth), parseTime(lastDayOfMonth))
 | 
				
			||||||
      this.$nextTick(() => {
 | 
								this.$set(this.tableProps[2], 'label', '许昌安彩月原片生产汇总(' + parseTime(firstDayOfMonth) + '-' + parseTime(lastDayOfMonth) + ')')
 | 
				
			||||||
        this.$refs['monthWeek'].getDataList()
 | 
								this.$set(this.tableProps1[2], 'label', '许昌安彩月成品生产汇总(' + parseTime(firstDayOfMonth) + '-' + parseTime(lastDayOfMonth) + ')') 
 | 
				
			||||||
        this.$refs['proMonth'].getDataList()
 | 
								// this.tableProps[2].label = '许昌安彩月原片生产汇总(' + parseTime(firstDayOfMonth) + '-' + parseTime(lastDayOfMonth) + ')'
 | 
				
			||||||
      })
 | 
								// this.tableProps1[2].label = '许昌安彩月成品生产汇总(' + parseTime(firstDayOfMonth) + '-' + parseTime(lastDayOfMonth) + ')'
 | 
				
			||||||
    },
 | 
								console.log(this.tableProps, this.tableProps1)
 | 
				
			||||||
    changeTime(val) {
 | 
							},
 | 
				
			||||||
      console.log(val)
 | 
							async getList() {
 | 
				
			||||||
			if(val) {
 | 
								const firstDayOfMonth = new Date(this.listQuery.time)
 | 
				
			||||||
					const timeStamp = val.getMonth(); //标准时间转为时间戳,毫秒级别
 | 
								const lastDayOfMonth = new Date(firstDayOfMonth.getFullYear(), firstDayOfMonth.getMonth() + 1, 0, 0, 0, 0, 0)
 | 
				
			||||||
					const fullyear = val.getFullYear()
 | 
								this.tableData = [];
 | 
				
			||||||
					let days = 0
 | 
								this.tableProps = [
 | 
				
			||||||
					switch (timeStamp) {
 | 
									{
 | 
				
			||||||
            case 0:
 | 
										prop: 'lineName',
 | 
				
			||||||
            case 2:
 | 
										label: '',
 | 
				
			||||||
            case 4:
 | 
										fixed: true,
 | 
				
			||||||
            case 6:
 | 
										width: 120,
 | 
				
			||||||
            case 7:
 | 
										'show-overflow-tooltip': true
 | 
				
			||||||
            case 9:
 | 
									},
 | 
				
			||||||
            case 11:
 | 
									{
 | 
				
			||||||
							days = 31
 | 
										prop: 'paramsName',
 | 
				
			||||||
							break
 | 
										label: '',
 | 
				
			||||||
            case 3:
 | 
										fixed: true,
 | 
				
			||||||
            case 4:
 | 
										width: 120,
 | 
				
			||||||
            case 8:
 | 
										'show-overflow-tooltip': true
 | 
				
			||||||
            case 10:
 | 
									},
 | 
				
			||||||
							days = 30
 | 
									{
 | 
				
			||||||
							break
 | 
										prop: 'xc',
 | 
				
			||||||
						case 1:
 | 
										label: '许昌安彩月原片生产汇总(' + parseTime(firstDayOfMonth) + '-' + parseTime(lastDayOfMonth) + ')',
 | 
				
			||||||
							if ((fullyear % 400 === 0) || (fullyear % 4 === 0 && fullyear % 100 !== 0)) {
 | 
										// align: 'center',
 | 
				
			||||||
								days = 29
 | 
										children: []
 | 
				
			||||||
							} else {
 | 
									}
 | 
				
			||||||
								days = 28
 | 
								];
 | 
				
			||||||
              }
 | 
								this.tableData1 = [];
 | 
				
			||||||
              break
 | 
								this.tableProps1 = [
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										prop: 'lineName',
 | 
				
			||||||
 | 
										label: '',
 | 
				
			||||||
 | 
										fixed: true,
 | 
				
			||||||
 | 
										width: 120,
 | 
				
			||||||
 | 
										'show-overflow-tooltip': true
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										prop: 'paramsName',
 | 
				
			||||||
 | 
										label: '',
 | 
				
			||||||
 | 
										fixed: true,
 | 
				
			||||||
 | 
										width: 120,
 | 
				
			||||||
 | 
										'show-overflow-tooltip': true,
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										prop: 'xc1',
 | 
				
			||||||
 | 
										label: '许昌安彩月成品生产汇总(' + parseTime(firstDayOfMonth) + '-' + parseTime(lastDayOfMonth) + ')',
 | 
				
			||||||
 | 
										// align: 'center',
 | 
				
			||||||
 | 
										children: []
 | 
				
			||||||
 | 
									}
 | 
				
			||||||
 | 
								];
 | 
				
			||||||
 | 
								await productionMonthY(this.listQuery).then((res) => {
 | 
				
			||||||
 | 
									this.resData = res.data;
 | 
				
			||||||
 | 
									// 设置表头
 | 
				
			||||||
 | 
									Object.keys(this.resData).forEach((item) => {
 | 
				
			||||||
 | 
										this.tableProps[2].children.push({
 | 
				
			||||||
 | 
											prop: item,
 | 
				
			||||||
 | 
											label: item,
 | 
				
			||||||
 | 
											'show-overflow-tooltip': true,
 | 
				
			||||||
 | 
										});
 | 
				
			||||||
 | 
									});
 | 
				
			||||||
 | 
									this.buildTableData(this.resData);
 | 
				
			||||||
 | 
								});
 | 
				
			||||||
 | 
								await productionMonthD(this.listQuery).then((res) => {
 | 
				
			||||||
 | 
									this.resData1 = res.data;
 | 
				
			||||||
 | 
									// 设置表头
 | 
				
			||||||
 | 
									Object.keys(this.resData1).forEach((item) => {
 | 
				
			||||||
 | 
										this.tableProps1[2].children.push({
 | 
				
			||||||
 | 
											prop: item,
 | 
				
			||||||
 | 
											label: item,
 | 
				
			||||||
 | 
											'show-overflow-tooltip': true,
 | 
				
			||||||
 | 
										});
 | 
				
			||||||
 | 
									});
 | 
				
			||||||
 | 
									this.buildTableData1(this.resData1);
 | 
				
			||||||
 | 
								});
 | 
				
			||||||
 | 
								// this.getTime1()
 | 
				
			||||||
 | 
							},
 | 
				
			||||||
 | 
							// 设置表格2数据
 | 
				
			||||||
 | 
							buildTableData1(data) {
 | 
				
			||||||
 | 
								let keys = Object.keys(data);
 | 
				
			||||||
 | 
								let tempData = [];
 | 
				
			||||||
 | 
								let subKeys = Object.keys(data[keys[0]]);
 | 
				
			||||||
 | 
								let sub2Keys = Object.keys(data[keys[0]][subKeys[0]]);
 | 
				
			||||||
 | 
								for (let i = 0; i < keys.length; i++) {
 | 
				
			||||||
 | 
									if (i === 0) {
 | 
				
			||||||
 | 
										for (let j = 0; j < subKeys.length; j++) {
 | 
				
			||||||
 | 
											for (let k = 0; k < sub2Keys.length; k++) {
 | 
				
			||||||
 | 
												let obj = {};
 | 
				
			||||||
 | 
												obj.lineName = subKeys[j];
 | 
				
			||||||
 | 
												obj.paramsName = sub2Keys[k];
 | 
				
			||||||
 | 
												obj[keys[0]] = data[keys[0]][subKeys[j]][sub2Keys[k]];
 | 
				
			||||||
 | 
												tempData.push(obj);
 | 
				
			||||||
 | 
											}
 | 
				
			||||||
					}
 | 
										}
 | 
				
			||||||
        this.startTimeStamp = this.timeFun(new Date(fullyear, timeStamp, 1, 7, 0, 1).getTime()); //开始时间
 | 
									} else {
 | 
				
			||||||
        this.endTimeStamp = this.timeFun(new Date(fullyear, timeStamp, days, 7, 0, 0).getTime()); //结束时间
 | 
										for (let j = 0; j < subKeys.length; j++) {
 | 
				
			||||||
					console.log(this.startTimeStamp, this.endTimeStamp)
 | 
											for (let k = 0; k < sub2Keys.length; k++) {
 | 
				
			||||||
        this.listQuery.reportTime[0] = parseTime(new Date(fullyear, timeStamp, 1, 7, 0, 1).getTime()) //+ ' 00:00:00' //new Date(this.startTimeStamp + ' 00:00:00').getTime() / 1000
 | 
												for (let v = 0; v < tempData.length; v++) {
 | 
				
			||||||
					this.listQuery.reportTime[1] = parseTime(new Date(fullyear, timeStamp, days, 7, 0, 0).getTime()) //+ ' 23:59:59' //new Date(this.endTimeStamp + ' 23:59:59').getTime() / 1000
 | 
													if (
 | 
				
			||||||
			} else {
 | 
														tempData[v].lineName === subKeys[j] &&
 | 
				
			||||||
					this.listQuery.reportTime = []
 | 
														tempData[v].paramsName === sub2Keys[k]
 | 
				
			||||||
 | 
													) {
 | 
				
			||||||
 | 
														tempData[v][keys[i]] = data[keys[i]][subKeys[j]][sub2Keys[k]];
 | 
				
			||||||
 | 
													}
 | 
				
			||||||
 | 
												}
 | 
				
			||||||
 | 
											}
 | 
				
			||||||
 | 
										}
 | 
				
			||||||
 | 
									}
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
								this.tableData1 = tempData;
 | 
				
			||||||
 | 
								this.getSpanArr1(this.tableData1);
 | 
				
			||||||
 | 
								this.$nextTick(() => {
 | 
				
			||||||
 | 
									this.reTable1();
 | 
				
			||||||
 | 
								});
 | 
				
			||||||
 | 
							},
 | 
				
			||||||
 | 
							// 设置表格数据
 | 
				
			||||||
 | 
							buildTableData(data) {
 | 
				
			||||||
 | 
								let keys = Object.keys(data);
 | 
				
			||||||
 | 
								let tempData = [];
 | 
				
			||||||
 | 
								let subKeys = Object.keys(data[keys[0]]);
 | 
				
			||||||
 | 
								let sub2Keys = Object.keys(data[keys[0]][subKeys[0]]);
 | 
				
			||||||
 | 
								for (let i = 0; i < keys.length; i++) {
 | 
				
			||||||
 | 
									if (i === 0) {
 | 
				
			||||||
 | 
										for (let j = 0; j < subKeys.length; j++) {
 | 
				
			||||||
 | 
											for (let k = 0; k < sub2Keys.length; k++) {
 | 
				
			||||||
 | 
												let obj = {};
 | 
				
			||||||
 | 
												obj.lineName = subKeys[j];
 | 
				
			||||||
 | 
												obj.paramsName = sub2Keys[k];
 | 
				
			||||||
 | 
												obj[keys[0]] = data[keys[0]][subKeys[j]][sub2Keys[k]];
 | 
				
			||||||
 | 
												tempData.push(obj);
 | 
				
			||||||
 | 
											}
 | 
				
			||||||
 | 
										}
 | 
				
			||||||
 | 
									} else {
 | 
				
			||||||
 | 
										for (let j = 0; j < subKeys.length; j++) {
 | 
				
			||||||
 | 
											for (let k = 0; k < sub2Keys.length; k++) {
 | 
				
			||||||
 | 
												for (let v = 0; v < tempData.length; v++) {
 | 
				
			||||||
 | 
													if (
 | 
				
			||||||
 | 
														tempData[v].lineName === subKeys[j] &&
 | 
				
			||||||
 | 
														tempData[v].paramsName === sub2Keys[k]
 | 
				
			||||||
 | 
													) {
 | 
				
			||||||
 | 
														tempData[v][keys[i]] = data[keys[i]][subKeys[j]][sub2Keys[k]];
 | 
				
			||||||
 | 
													}
 | 
				
			||||||
 | 
												}
 | 
				
			||||||
 | 
											}
 | 
				
			||||||
 | 
										}
 | 
				
			||||||
 | 
									}
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
								this.tableData = tempData;
 | 
				
			||||||
 | 
								this.getSpanArr(this.tableData);
 | 
				
			||||||
 | 
								this.$nextTick(() => {
 | 
				
			||||||
 | 
									this.reTable();
 | 
				
			||||||
 | 
								});
 | 
				
			||||||
 | 
							},
 | 
				
			||||||
 | 
							reTable() {
 | 
				
			||||||
 | 
								this.$refs.productionDataMonthTable11.doLayout('productionDataMonthTable1');
 | 
				
			||||||
 | 
							},
 | 
				
			||||||
 | 
							reTable1() {
 | 
				
			||||||
 | 
								this.$refs.productionDataMonthTable22.doLayout('productionDataMonthTable2');
 | 
				
			||||||
 | 
							},
 | 
				
			||||||
 | 
							getSpanArr1(data) {
 | 
				
			||||||
 | 
								this.span2 = [];
 | 
				
			||||||
 | 
								for (var i = 0; i < data.length; i++) {
 | 
				
			||||||
 | 
									if (i === 0) {
 | 
				
			||||||
 | 
										this.span2.push(1);
 | 
				
			||||||
 | 
										this.index1 = 0;
 | 
				
			||||||
 | 
									} else {
 | 
				
			||||||
 | 
										if (data[i].lineName === data[i - 1].lineName) {
 | 
				
			||||||
 | 
											this.span2[this.index1] += 1;
 | 
				
			||||||
 | 
											this.span2.push(0);
 | 
				
			||||||
 | 
										} else {
 | 
				
			||||||
 | 
											this.span2.push(1);
 | 
				
			||||||
 | 
											this.index1 = i;
 | 
				
			||||||
 | 
										}
 | 
				
			||||||
 | 
									}
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
		},
 | 
							},
 | 
				
			||||||
    //时间戳转为yy-mm-dd hh:mm:ss
 | 
							// 获取合并行
 | 
				
			||||||
		timeFun(unixtimestamp) {
 | 
							getSpanArr(data) {
 | 
				
			||||||
				var unixtimestamp = new Date(unixtimestamp);
 | 
								this.span1 = [];
 | 
				
			||||||
				var year = 1900 + unixtimestamp.getYear();
 | 
								for (var i = 0; i < data.length; i++) {
 | 
				
			||||||
				var month = "0" + (unixtimestamp.getMonth() + 1);
 | 
									if (i === 0) {
 | 
				
			||||||
				var date = "0" + unixtimestamp.getDate();
 | 
										this.span1.push(1);
 | 
				
			||||||
				return year + "-" + month.substring(month.length - 2, month.length) + "-" + date.substring(date.length - 2, date.length)
 | 
										this.index = 0;
 | 
				
			||||||
		}
 | 
									} else {
 | 
				
			||||||
  }
 | 
										if (data[i].lineName === data[i - 1].lineName) {
 | 
				
			||||||
}
 | 
											this.span1[this.index] += 1;
 | 
				
			||||||
 | 
											this.span1.push(0);
 | 
				
			||||||
 | 
										} else {
 | 
				
			||||||
 | 
											this.span1.push(1);
 | 
				
			||||||
 | 
											this.index = i;
 | 
				
			||||||
 | 
										}
 | 
				
			||||||
 | 
									}
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
							},
 | 
				
			||||||
 | 
							objectSpanMethod1({ rowIndex, columnIndex }) {
 | 
				
			||||||
 | 
								if (columnIndex === 0) {
 | 
				
			||||||
 | 
									const _row = this.span1[rowIndex];
 | 
				
			||||||
 | 
									return {
 | 
				
			||||||
 | 
										rowspan: _row,
 | 
				
			||||||
 | 
										colspan: 1,
 | 
				
			||||||
 | 
									};
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
							},
 | 
				
			||||||
 | 
							handleExport() {
 | 
				
			||||||
 | 
								const xlsxParam = { raw: true };
 | 
				
			||||||
 | 
								let tables = document.querySelector('.el-table').cloneNode(true)
 | 
				
			||||||
 | 
								const fix = tables.querySelector('.el-table__fixed')
 | 
				
			||||||
 | 
								const fixRight = tables.querySelector('.el-table__fixed-right')
 | 
				
			||||||
 | 
								if (fix) {
 | 
				
			||||||
 | 
									tables.removeChild(tables.querySelector('.el-table__fixed'))
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
								if (fixRight) {
 | 
				
			||||||
 | 
									tables.removeChild(tables.querySelector('.el-table__fixed-right'))
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
								let workbook = XLSX.utils.book_new();
 | 
				
			||||||
 | 
								var ws = XLSX.utils.table_to_sheet(
 | 
				
			||||||
 | 
									tables,
 | 
				
			||||||
 | 
									xlsxParam
 | 
				
			||||||
 | 
								);
 | 
				
			||||||
 | 
								XLSX.utils.book_append_sheet(workbook, ws, '许昌安彩月原片生产汇总');
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
								let tables1 = document.querySelectorAll('.el-table')[1].cloneNode(true)
 | 
				
			||||||
 | 
								const fix1 = tables1.querySelector('.el-table__fixed')
 | 
				
			||||||
 | 
								const fixRight1 = tables1.querySelector('.el-table__fixed-right')
 | 
				
			||||||
 | 
								if (fix1) {
 | 
				
			||||||
 | 
									tables1.removeChild(fix1)
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
								if (fixRight1) {
 | 
				
			||||||
 | 
									tables1.removeChild(fixRight1)
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
								var prows = XLSX.utils.table_to_sheet(
 | 
				
			||||||
 | 
									tables1,
 | 
				
			||||||
 | 
									xlsxParam
 | 
				
			||||||
 | 
								);
 | 
				
			||||||
 | 
								XLSX.utils.book_append_sheet(workbook, prows, '许昌安彩月成品生产汇总');
 | 
				
			||||||
 | 
								let fileName = '生产数据汇总表-月报.xlsx';
 | 
				
			||||||
 | 
								var wbout = XLSX.write(workbook, {
 | 
				
			||||||
 | 
									bookType: 'xlsx',
 | 
				
			||||||
 | 
									bookSST: true,
 | 
				
			||||||
 | 
									type: 'array',
 | 
				
			||||||
 | 
								});
 | 
				
			||||||
 | 
								try {
 | 
				
			||||||
 | 
									FileSaver.saveAs(
 | 
				
			||||||
 | 
										new Blob([wbout], { type: 'application/octet-stream' }),
 | 
				
			||||||
 | 
										fileName
 | 
				
			||||||
 | 
									);
 | 
				
			||||||
 | 
									this.$message.success('导出成功');
 | 
				
			||||||
 | 
								} catch (e) {
 | 
				
			||||||
 | 
									if (typeof console !== 'undefined') console.log(e, wbout);
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
								return wbout;
 | 
				
			||||||
 | 
							},
 | 
				
			||||||
 | 
							handleEmitFun(payload) {
 | 
				
			||||||
 | 
								console.log('payload', payload);
 | 
				
			||||||
 | 
							},
 | 
				
			||||||
 | 
						},
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
</script>
 | 
					</script>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
<style scoped>
 | 
					<style scoped>
 | 
				
			||||||
.weekly {
 | 
					.weekly {
 | 
				
			||||||
  padding-top: 16px;
 | 
						padding: 16px;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
.blueTip::before{
 | 
					.blueTip::before {
 | 
				
			||||||
  display: inline-block;
 | 
						display: inline-block;
 | 
				
			||||||
  content: '';
 | 
						content: '';
 | 
				
			||||||
  width: 4px;
 | 
						width: 4px;
 | 
				
			||||||
  height: 18px;
 | 
						height: 18px;
 | 
				
			||||||
  background: #0B58FF;
 | 
						background: #0b58ff;
 | 
				
			||||||
  border-radius: 1px;
 | 
						border-radius: 1px;
 | 
				
			||||||
  margin-right: 8PX;
 | 
						margin-right: 8px;
 | 
				
			||||||
  margin-top: 8px;
 | 
						margin-top: 8px;
 | 
				
			||||||
  margin-left: 16px;
 | 
						margin-left: 16px;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
</style>
 | 
					</style>
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,14 +1,14 @@
 | 
				
			|||||||
<!--
 | 
					<!--
 | 
				
			||||||
 * @Author: Do not edit
 | 
					 * @Author: Do not edit
 | 
				
			||||||
 * @Date: 2024-04-22 15:49:56
 | 
					 * @Date: 2024-04-22 15:49:56
 | 
				
			||||||
 * @LastEditTime: 2024-04-23 15:43:36
 | 
					 * @LastEditTime: 2024-04-25 14:31:53
 | 
				
			||||||
 * @LastEditors: DY
 | 
					 * @LastEditors: DY
 | 
				
			||||||
 * @Description: 
 | 
					 * @Description: 
 | 
				
			||||||
-->
 | 
					-->
 | 
				
			||||||
<template>
 | 
					<template>
 | 
				
			||||||
  <div class="weekly">
 | 
					  <div class="weekly">
 | 
				
			||||||
    <el-form :inline="true" :model="listQuery" class="blueTip">
 | 
					    <el-form :inline="true" :model="listQuery" class="blueTip">
 | 
				
			||||||
      <el-form-item>
 | 
					      <el-form-item label="周" prop="reportTime">
 | 
				
			||||||
        <el-date-picker v-model="reportTime" type="week" size="small" @change="changeTime"
 | 
					        <el-date-picker v-model="reportTime" type="week" size="small" @change="changeTime"
 | 
				
			||||||
          :picker-options="{firstDayOfWeek: 4}" :format="'yyyy 第 WW 周' + '\u3000' + startTimeStamp + '-' + endTimeStamp"
 | 
					          :picker-options="{firstDayOfWeek: 4}" :format="'yyyy 第 WW 周' + '\u3000' + startTimeStamp + '-' + endTimeStamp"
 | 
				
			||||||
          style="width: 350px" placeholder="选择周">
 | 
					          style="width: 350px" placeholder="选择周">
 | 
				
			||||||
@@ -28,7 +28,9 @@
 | 
				
			|||||||
<script>
 | 
					<script>
 | 
				
			||||||
import glassWeek from '../glass/weekly.vue'
 | 
					import glassWeek from '../glass/weekly.vue'
 | 
				
			||||||
import proWeek from '../productionWeekReport/index.vue'
 | 
					import proWeek from '../productionWeekReport/index.vue'
 | 
				
			||||||
import { parseTime } from '../../core/mixins/code-filter';
 | 
					import { parseTime } from '../../core/mixins/code-filter'
 | 
				
			||||||
 | 
					import FileSaver from 'file-saver'
 | 
				
			||||||
 | 
					import * as XLSX from 'xlsx/xlsx.mjs'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export default {
 | 
					export default {
 | 
				
			||||||
  components: { glassWeek, proWeek },
 | 
					  components: { glassWeek, proWeek },
 | 
				
			||||||
@@ -45,7 +47,8 @@ export default {
 | 
				
			|||||||
      endTimeStamp: '',
 | 
					      endTimeStamp: '',
 | 
				
			||||||
      reportTime: '',
 | 
					      reportTime: '',
 | 
				
			||||||
      glassWeekShow: false,
 | 
					      glassWeekShow: false,
 | 
				
			||||||
      proWeekShow: false
 | 
					      proWeekShow: false,
 | 
				
			||||||
 | 
					      proTabaleData: []
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  created() {
 | 
					  created() {
 | 
				
			||||||
@@ -54,11 +57,35 @@ export default {
 | 
				
			|||||||
    this.proWeekShow = true
 | 
					    this.proWeekShow = true
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  methods: {
 | 
					  methods: {
 | 
				
			||||||
 | 
					    // handleExport() {
 | 
				
			||||||
 | 
					    //   this.$nextTick(() => {
 | 
				
			||||||
 | 
					    //     this.$refs['glassWeek'].handleExport()
 | 
				
			||||||
 | 
					    //     this.$refs['proWeek'].handleExport()
 | 
				
			||||||
 | 
					    //   })
 | 
				
			||||||
 | 
					    // },
 | 
				
			||||||
    handleExport() {
 | 
					    handleExport() {
 | 
				
			||||||
      this.$nextTick(() => {
 | 
					      const xlsxParam = { raw: true }
 | 
				
			||||||
        this.$refs['glassWeek'].handleExport()
 | 
					      let workbook = XLSX.utils.book_new()
 | 
				
			||||||
        this.$refs['proWeek'].handleExport()
 | 
					      var ws = XLSX.utils.table_to_sheet( document.querySelector('#exportTable'), xlsxParam)
 | 
				
			||||||
      })
 | 
					      XLSX.utils.book_append_sheet(workbook, ws, '许昌安彩周原片生产汇总')
 | 
				
			||||||
 | 
					      var prows = XLSX.utils.table_to_sheet( document.querySelector('#exportproductionTable'), xlsxParam)
 | 
				
			||||||
 | 
					      XLSX.utils.book_append_sheet(workbook, prows, '许昌安彩周成品生产汇总')
 | 
				
			||||||
 | 
					      let fileName = '生产数据汇总表-周报.xlsx';
 | 
				
			||||||
 | 
					      var wbout = XLSX.write(workbook, {
 | 
				
			||||||
 | 
					        bookType: 'xlsx',
 | 
				
			||||||
 | 
					        bookSST: true,
 | 
				
			||||||
 | 
					        type: 'array',
 | 
				
			||||||
 | 
					      });
 | 
				
			||||||
 | 
					      try {
 | 
				
			||||||
 | 
					        FileSaver.saveAs(
 | 
				
			||||||
 | 
					          new Blob([wbout], { type: 'application/octet-stream' }),
 | 
				
			||||||
 | 
					          fileName
 | 
				
			||||||
 | 
					        );
 | 
				
			||||||
 | 
					        this.$message.success('导出成功');
 | 
				
			||||||
 | 
					      } catch (e) {
 | 
				
			||||||
 | 
					        if (typeof console !== 'undefined') console.log(e, wbout);
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
 | 
					      return wbout;
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    search() {
 | 
					    search() {
 | 
				
			||||||
      this.$nextTick(() => {
 | 
					      this.$nextTick(() => {
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,117 +1,387 @@
 | 
				
			|||||||
<!--
 | 
					<!--
 | 
				
			||||||
 * @Author: Do not edit
 | 
					 * @Author: Do not edit
 | 
				
			||||||
 * @Date: 2024-04-22 15:49:56
 | 
					 * @Date: 2024-04-22 15:49:56
 | 
				
			||||||
 * @LastEditTime: 2024-04-23 17:16:11
 | 
					 * @LastEditTime: 2024-04-26 10:34:12
 | 
				
			||||||
 * @LastEditors: DY
 | 
					 * @LastEditors: DY
 | 
				
			||||||
 * @Description: 
 | 
					 * @Description: 
 | 
				
			||||||
-->
 | 
					-->
 | 
				
			||||||
<template>
 | 
					<template>
 | 
				
			||||||
  <div class="weekly">
 | 
						<div class="weekly">
 | 
				
			||||||
    <el-form :inline="true" :model="listQuery" class="blueTip">
 | 
							<el-form
 | 
				
			||||||
      <el-form-item label="年" prop="reportTime">
 | 
								:inline="true"
 | 
				
			||||||
          <el-date-picker v-model="reportTime" type="year" size="small" @change="changeTime"
 | 
								:model="listQuery"
 | 
				
			||||||
            :picker-options="{firstDayOfWeek: 1}" :format="'yyyy 年' + '\u3000' + startTimeStamp + '-' + endTimeStamp"
 | 
								class="blueTip">
 | 
				
			||||||
            style="width: 350px" placeholder="选择年">
 | 
								<el-form-item
 | 
				
			||||||
          </el-date-picker>
 | 
									label="年份"
 | 
				
			||||||
        </el-form-item>
 | 
									prop="reportTime">
 | 
				
			||||||
      <el-button v-if="this.$auth.hasPermi('base:report-auto-production:query')" type="primary" size="small" @click="search()">
 | 
									<el-date-picker
 | 
				
			||||||
        查询
 | 
										v-model="listQuery.time"
 | 
				
			||||||
      </el-button>
 | 
										value-format="timestamp"
 | 
				
			||||||
      <el-button v-if="this.$auth.hasPermiAnd(['base:report-auto-original-glass:export', 'base:report-auto-production:export'])" type="primary" size="small" plain
 | 
										type="year"
 | 
				
			||||||
        @click="handleExport">导出</el-button>
 | 
										size="small"
 | 
				
			||||||
    </el-form>
 | 
										placeholder="选择年"></el-date-picker>
 | 
				
			||||||
    <glassYear v-if="glassYearShow" ref="glassYear" :product="false" :params="listQuery" />
 | 
								</el-form-item>
 | 
				
			||||||
    <proYear v-if="proYearShow" ref="proYear" :product="false" :params="listQuery" />
 | 
								<el-button
 | 
				
			||||||
  </div>
 | 
									v-if="this.$auth.hasPermi('base:report-auto-production:query')"
 | 
				
			||||||
 | 
									type="primary"
 | 
				
			||||||
 | 
									size="small"
 | 
				
			||||||
 | 
									@click="getList">
 | 
				
			||||||
 | 
									查询
 | 
				
			||||||
 | 
								</el-button>
 | 
				
			||||||
 | 
								<el-button
 | 
				
			||||||
 | 
									v-if="
 | 
				
			||||||
 | 
										this.$auth.hasPermiAnd([
 | 
				
			||||||
 | 
											'base:report-auto-original-glass:export',
 | 
				
			||||||
 | 
											'base:report-auto-production:export',
 | 
				
			||||||
 | 
										])
 | 
				
			||||||
 | 
									"
 | 
				
			||||||
 | 
									type="primary"
 | 
				
			||||||
 | 
									size="small"
 | 
				
			||||||
 | 
									plain
 | 
				
			||||||
 | 
									@click="handleExport">
 | 
				
			||||||
 | 
									导出
 | 
				
			||||||
 | 
								</el-button>
 | 
				
			||||||
 | 
							</el-form>
 | 
				
			||||||
 | 
							<base-table
 | 
				
			||||||
 | 
							ref="productionDataYearTable11"
 | 
				
			||||||
 | 
								id="productionDataYearTable1"
 | 
				
			||||||
 | 
								:table-props="tableProps"
 | 
				
			||||||
 | 
								:table-data="tableData"
 | 
				
			||||||
 | 
								:span-method="objectSpanMethod1"
 | 
				
			||||||
 | 
								@emitFun="handleEmitFun"
 | 
				
			||||||
 | 
								:max-height="tableH" />
 | 
				
			||||||
 | 
							<base-table
 | 
				
			||||||
 | 
							ref="productionDataYearTable22"
 | 
				
			||||||
 | 
								id="productionDataYearTable2"
 | 
				
			||||||
 | 
								:table-props="tableProps1"
 | 
				
			||||||
 | 
								:table-data="tableData1"
 | 
				
			||||||
 | 
								:span-method="objectSpanMethod1"
 | 
				
			||||||
 | 
								@emitFun="handleEmitFun"
 | 
				
			||||||
 | 
								:max-height="tableH"
 | 
				
			||||||
 | 
								style="margin-top: 15px" />
 | 
				
			||||||
 | 
						</div>
 | 
				
			||||||
</template>
 | 
					</template>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
<script>
 | 
					<script>
 | 
				
			||||||
import glassYear from '../glass/year.vue'
 | 
					import { productionYearY, productionYearD } from '@/api/report/glass';
 | 
				
			||||||
import proYear from '../productionYearReport/index.vue'
 | 
					 | 
				
			||||||
import { parseTime } from '../../core/mixins/code-filter';
 | 
					import { parseTime } from '../../core/mixins/code-filter';
 | 
				
			||||||
 | 
					import FileSaver from 'file-saver';
 | 
				
			||||||
 | 
					import * as XLSX from 'xlsx/xlsx.mjs';
 | 
				
			||||||
 | 
					import tableHeightMixin from '@/mixins/lb/tableHeightMixin';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export default {
 | 
					export default {
 | 
				
			||||||
  components: { glassYear, proYear },
 | 
						// components: { monthWeek, proMonth },
 | 
				
			||||||
  data() {
 | 
						mixins: [tableHeightMixin],
 | 
				
			||||||
    return {
 | 
						data() {
 | 
				
			||||||
      listQuery: {
 | 
							return {
 | 
				
			||||||
				// pageSize: 10,
 | 
								heightNum: 350,
 | 
				
			||||||
				// pageNo: 1,
 | 
								listQuery: {
 | 
				
			||||||
				// total: 0,
 | 
									time: '',
 | 
				
			||||||
				reportType: 5,
 | 
								},
 | 
				
			||||||
				reportTime: []
 | 
								// startTimeStamp: '',
 | 
				
			||||||
      },
 | 
								// endTimeStamp: '',
 | 
				
			||||||
      startTimeStamp: '',
 | 
								// reportTime: '',
 | 
				
			||||||
      endTimeStamp: '',
 | 
								// glassWeekShow: false,
 | 
				
			||||||
      reportTime: '',
 | 
								// proWeekShow: false,
 | 
				
			||||||
      glassYearShow: false,
 | 
								tableData: [],
 | 
				
			||||||
      proYearShow: false
 | 
								tableProps: [],
 | 
				
			||||||
    }
 | 
								tableData1: [],
 | 
				
			||||||
  },
 | 
								tableProps1: [],
 | 
				
			||||||
  created() {
 | 
								resData: [],
 | 
				
			||||||
    this.getCurrentYearFirst()
 | 
								span1: [], //表格1的合并规则
 | 
				
			||||||
    this.glassYearShow = true
 | 
								resData1: [],
 | 
				
			||||||
    this.proYearShow = true
 | 
								span2: []
 | 
				
			||||||
  },
 | 
							};
 | 
				
			||||||
  methods: {
 | 
						},
 | 
				
			||||||
    handleExport() {
 | 
						created() {
 | 
				
			||||||
      this.$nextTick(() => {
 | 
							let now = new Date()
 | 
				
			||||||
        this.$refs['glassYear'].handleExport()
 | 
					    now.setHours(0, 0, 0, 0)
 | 
				
			||||||
        this.$refs['proYear'].handleExport()
 | 
					    now.setDate(1)
 | 
				
			||||||
      })
 | 
							now.setMonth(0)
 | 
				
			||||||
    },
 | 
					    let startOfMonth = now.getTime()
 | 
				
			||||||
    search() {
 | 
					    // let firstDayOfMonth = new Date(startOfMonth)
 | 
				
			||||||
      this.$nextTick(() => {
 | 
							// console.log('看看', parseTime(firstDayOfMonth))
 | 
				
			||||||
        this.$refs['glassYear'].getDataList()
 | 
					    this.listQuery.time = startOfMonth
 | 
				
			||||||
        this.$refs['proYear'].getDataList()
 | 
						},
 | 
				
			||||||
      })
 | 
						mounted() {
 | 
				
			||||||
    },
 | 
							this.getList();
 | 
				
			||||||
    changeTime(val) {
 | 
						},
 | 
				
			||||||
			if(val) {
 | 
						methods: {
 | 
				
			||||||
					// let timeStamp = val.getTime(); //标准时间转为时间戳,毫秒级别
 | 
							getTime() {
 | 
				
			||||||
        this.endTimeStamp = this.timeFun(new Date(val.getFullYear(),11, 31, 7, 0, 0).getTime()); //开始时间
 | 
								const firstDayOfYear = new Date(this.listQuery.time)
 | 
				
			||||||
        this.startTimeStamp = this.timeFun(new Date(val.getFullYear(), 0, 1, 7, 0, 1).getTime()); //结束时间
 | 
								const lastDayOfYear = new Date(firstDayOfYear.getFullYear() + 1, 0, 0, 0, 0, 0, 0)
 | 
				
			||||||
        this.listQuery.reportTime[0] = parseTime(new Date(val.getFullYear(), 0, 1, 7, 0, 1).getTime()) //+ ' 00:00:00' //new Date(this.startTimeStamp + ' 00:00:00').getTime() / 1000
 | 
								// console.log('时间', parseTime(firstDayOfMonth), parseTime(lastDayOfMonth))
 | 
				
			||||||
        this.listQuery.reportTime[1] = parseTime(new Date(val.getFullYear(), 11, 31, 7, 0, 0).getTime()) //+ ' 23:59:59' //new Date(this.endTimeStamp + ' 23:59:59').getTime() / 1000
 | 
								this.tableProps[0].label = '许昌安彩年原片生产汇总(' + parseTime(firstDayOfYear) + '-' + parseTime(lastDayOfYear) + ')'
 | 
				
			||||||
			} else {
 | 
								this.tableProps1[0].label = '许昌安彩年成品生产汇总(' + parseTime(firstDayOfYear) + '-' + parseTime(lastDayOfYear) + ')'
 | 
				
			||||||
					this.listQuery.reportTime = []
 | 
							},
 | 
				
			||||||
 | 
							async getList() {
 | 
				
			||||||
 | 
								// this.getTime()
 | 
				
			||||||
 | 
								const firstDayOfYear = new Date(this.listQuery.time)
 | 
				
			||||||
 | 
								const lastDayOfYear = new Date(firstDayOfYear.getFullYear() + 1, 0, 0, 0, 0, 0, 0)
 | 
				
			||||||
 | 
								this.tableData = [];
 | 
				
			||||||
 | 
								this.tableProps = [
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										prop: 'lineName',
 | 
				
			||||||
 | 
										label: '',
 | 
				
			||||||
 | 
										fixed: true,
 | 
				
			||||||
 | 
										width: 120,
 | 
				
			||||||
 | 
										'show-overflow-tooltip': true
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										prop: 'paramsName',
 | 
				
			||||||
 | 
										label: '',
 | 
				
			||||||
 | 
										fixed: true,
 | 
				
			||||||
 | 
										width: 120,
 | 
				
			||||||
 | 
										'show-overflow-tooltip': true
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										prop: 'xc',
 | 
				
			||||||
 | 
										label: '许昌安彩年原片生产汇总(' + parseTime(firstDayOfYear) + '-' + parseTime(lastDayOfYear) + ')',
 | 
				
			||||||
 | 
										// align: 'center',
 | 
				
			||||||
 | 
										children: []
 | 
				
			||||||
 | 
									}
 | 
				
			||||||
 | 
								];
 | 
				
			||||||
 | 
								this.tableData1 = [];
 | 
				
			||||||
 | 
								this.tableProps1 = [
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										prop: 'lineName',
 | 
				
			||||||
 | 
										label: '',
 | 
				
			||||||
 | 
										fixed: true,
 | 
				
			||||||
 | 
										'show-overflow-tooltip': true
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										prop: 'paramsName',
 | 
				
			||||||
 | 
										label: '',
 | 
				
			||||||
 | 
										fixed: true,
 | 
				
			||||||
 | 
										'show-overflow-tooltip': true
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										prop: 'xc1',
 | 
				
			||||||
 | 
										label: '许昌安彩年成品生产汇总(' + parseTime(firstDayOfYear) + '-' + parseTime(lastDayOfYear) + ')',
 | 
				
			||||||
 | 
										// align: 'center',
 | 
				
			||||||
 | 
										children: []
 | 
				
			||||||
 | 
									}
 | 
				
			||||||
 | 
								];
 | 
				
			||||||
 | 
								await productionYearY(this.listQuery).then((res) => {
 | 
				
			||||||
 | 
									this.resData = res.data;
 | 
				
			||||||
 | 
									// 设置表头
 | 
				
			||||||
 | 
									Object.keys(this.resData).forEach((item) => {
 | 
				
			||||||
 | 
										this.tableProps[2].children.push({
 | 
				
			||||||
 | 
											prop: item,
 | 
				
			||||||
 | 
											label: item,
 | 
				
			||||||
 | 
											'show-overflow-tooltip': true,
 | 
				
			||||||
 | 
										});
 | 
				
			||||||
 | 
									});
 | 
				
			||||||
 | 
									this.buildTableData(this.resData);
 | 
				
			||||||
 | 
								});
 | 
				
			||||||
 | 
								await productionYearD(this.listQuery).then((res) => {
 | 
				
			||||||
 | 
									this.resData1 = res.data;
 | 
				
			||||||
 | 
									// 设置表头
 | 
				
			||||||
 | 
									Object.keys(this.resData1).forEach((item) => {
 | 
				
			||||||
 | 
										this.tableProps1[2].children.push({
 | 
				
			||||||
 | 
											prop: item,
 | 
				
			||||||
 | 
											label: item,
 | 
				
			||||||
 | 
											'show-overflow-tooltip': true,
 | 
				
			||||||
 | 
										});
 | 
				
			||||||
 | 
									});
 | 
				
			||||||
 | 
									this.buildTableData1(this.resData1);
 | 
				
			||||||
 | 
								});
 | 
				
			||||||
 | 
							},
 | 
				
			||||||
 | 
							// 设置表格2数据
 | 
				
			||||||
 | 
							buildTableData1(data) {
 | 
				
			||||||
 | 
								let keys = Object.keys(data);
 | 
				
			||||||
 | 
								let tempData = [];
 | 
				
			||||||
 | 
								let subKeys = Object.keys(data[keys[0]]);
 | 
				
			||||||
 | 
								let sub2Keys = Object.keys(data[keys[0]][subKeys[0]]);
 | 
				
			||||||
 | 
								for (let i = 0; i < keys.length; i++) {
 | 
				
			||||||
 | 
									if (i === 0) {
 | 
				
			||||||
 | 
										for (let j = 0; j < subKeys.length; j++) {
 | 
				
			||||||
 | 
											for (let k = 0; k < sub2Keys.length; k++) {
 | 
				
			||||||
 | 
												let obj = {};
 | 
				
			||||||
 | 
												obj.lineName = subKeys[j];
 | 
				
			||||||
 | 
												obj.paramsName = sub2Keys[k];
 | 
				
			||||||
 | 
												obj[keys[0]] = data[keys[0]][subKeys[j]][sub2Keys[k]];
 | 
				
			||||||
 | 
												tempData.push(obj);
 | 
				
			||||||
 | 
											}
 | 
				
			||||||
 | 
										}
 | 
				
			||||||
 | 
									} else {
 | 
				
			||||||
 | 
										for (let j = 0; j < subKeys.length; j++) {
 | 
				
			||||||
 | 
											for (let k = 0; k < sub2Keys.length; k++) {
 | 
				
			||||||
 | 
												for (let v = 0; v < tempData.length; v++) {
 | 
				
			||||||
 | 
													if (
 | 
				
			||||||
 | 
														tempData[v].lineName === subKeys[j] &&
 | 
				
			||||||
 | 
														tempData[v].paramsName === sub2Keys[k]
 | 
				
			||||||
 | 
													) {
 | 
				
			||||||
 | 
														tempData[v][keys[i]] = data[keys[i]][subKeys[j]][sub2Keys[k]];
 | 
				
			||||||
 | 
													}
 | 
				
			||||||
 | 
												}
 | 
				
			||||||
 | 
											}
 | 
				
			||||||
 | 
										}
 | 
				
			||||||
 | 
									}
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
								this.tableData1 = tempData;
 | 
				
			||||||
 | 
								this.getSpanArr1(this.tableData1);
 | 
				
			||||||
 | 
								this.$nextTick(() => {
 | 
				
			||||||
 | 
									this.reTable1();
 | 
				
			||||||
 | 
								});
 | 
				
			||||||
 | 
							},
 | 
				
			||||||
 | 
							// 设置表格数据
 | 
				
			||||||
 | 
							buildTableData(data) {
 | 
				
			||||||
 | 
								let keys = Object.keys(data);
 | 
				
			||||||
 | 
								let tempData = [];
 | 
				
			||||||
 | 
								let subKeys = Object.keys(data[keys[0]]);
 | 
				
			||||||
 | 
								let sub2Keys = Object.keys(data[keys[0]][subKeys[0]]);
 | 
				
			||||||
 | 
								for (let i = 0; i < keys.length; i++) {
 | 
				
			||||||
 | 
									if (i === 0) {
 | 
				
			||||||
 | 
										for (let j = 0; j < subKeys.length; j++) {
 | 
				
			||||||
 | 
											for (let k = 0; k < sub2Keys.length; k++) {
 | 
				
			||||||
 | 
												let obj = {};
 | 
				
			||||||
 | 
												obj.lineName = subKeys[j];
 | 
				
			||||||
 | 
												obj.paramsName = sub2Keys[k];
 | 
				
			||||||
 | 
												obj[keys[0]] = data[keys[0]][subKeys[j]][sub2Keys[k]];
 | 
				
			||||||
 | 
												tempData.push(obj);
 | 
				
			||||||
 | 
											}
 | 
				
			||||||
 | 
										}
 | 
				
			||||||
 | 
									} else {
 | 
				
			||||||
 | 
										for (let j = 0; j < subKeys.length; j++) {
 | 
				
			||||||
 | 
											for (let k = 0; k < sub2Keys.length; k++) {
 | 
				
			||||||
 | 
												for (let v = 0; v < tempData.length; v++) {
 | 
				
			||||||
 | 
													if (
 | 
				
			||||||
 | 
														tempData[v].lineName === subKeys[j] &&
 | 
				
			||||||
 | 
														tempData[v].paramsName === sub2Keys[k]
 | 
				
			||||||
 | 
													) {
 | 
				
			||||||
 | 
														tempData[v][keys[i]] = data[keys[i]][subKeys[j]][sub2Keys[k]];
 | 
				
			||||||
 | 
													}
 | 
				
			||||||
 | 
												}
 | 
				
			||||||
 | 
											}
 | 
				
			||||||
 | 
										}
 | 
				
			||||||
 | 
									}
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
								this.tableData = tempData;
 | 
				
			||||||
 | 
								this.getSpanArr(this.tableData);
 | 
				
			||||||
 | 
								this.$nextTick(() => {
 | 
				
			||||||
 | 
									this.reTable();
 | 
				
			||||||
 | 
								});
 | 
				
			||||||
 | 
							},
 | 
				
			||||||
 | 
							reTable() {
 | 
				
			||||||
 | 
								this.$refs.productionDataYearTable11.doLayout('productionDataYearTable1');
 | 
				
			||||||
 | 
							},
 | 
				
			||||||
 | 
							reTable1() {
 | 
				
			||||||
 | 
								this.$refs.productionDataYearTable22.doLayout('productionDataYearTable2');
 | 
				
			||||||
 | 
							},
 | 
				
			||||||
 | 
							getSpanArr1(data) {
 | 
				
			||||||
 | 
								this.span2 = [];
 | 
				
			||||||
 | 
								for (var i = 0; i < data.length; i++) {
 | 
				
			||||||
 | 
									if (i === 0) {
 | 
				
			||||||
 | 
										this.span2.push(1);
 | 
				
			||||||
 | 
										this.index1 = 0;
 | 
				
			||||||
 | 
									} else {
 | 
				
			||||||
 | 
										if (data[i].lineName === data[i - 1].lineName) {
 | 
				
			||||||
 | 
											this.span2[this.index1] += 1;
 | 
				
			||||||
 | 
											this.span2.push(0);
 | 
				
			||||||
 | 
										} else {
 | 
				
			||||||
 | 
											this.span2.push(1);
 | 
				
			||||||
 | 
											this.index1 = i;
 | 
				
			||||||
 | 
										}
 | 
				
			||||||
 | 
									}
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
		},
 | 
							},
 | 
				
			||||||
    getCurrentYearFirst() {
 | 
							// 获取合并行
 | 
				
			||||||
      let date = new Date();
 | 
							getSpanArr(data) {
 | 
				
			||||||
      date.setDate(1);
 | 
								this.span1 = [];
 | 
				
			||||||
      date.setMonth(0);
 | 
								for (var i = 0; i < data.length; i++) {
 | 
				
			||||||
      this.reportTime = date;
 | 
									if (i === 0) {
 | 
				
			||||||
      this.startTimeStamp = this.timeFun(new Date(new Date().getFullYear(), 0, 1,7,0,1).getTime()); //开始时间
 | 
										this.span1.push(1);
 | 
				
			||||||
      this.endTimeStamp = this.timeFun(new Date(new Date().getFullYear(), 11, 31, 7, 0, 0).getTime()); //结束时间
 | 
										this.index = 0;
 | 
				
			||||||
      this.listQuery.reportTime[0] = parseTime(new Date(new Date().getFullYear(), 0, 1, 7, 0, 1).getTime()) //+ ' 00:00:00' //new Date(this.startTimeStamp + ' 00:00:00').getTime() / 1000
 | 
									} else {
 | 
				
			||||||
      this.listQuery.reportTime[1] = parseTime(new Date(new Date().getFullYear(), 11, 31, 7, 0, 0).getTime()) //+ ' 23:59:59' //new Date(this.endTimeStamp + ' 23:59:59').getTime() / 100
 | 
										if (data[i].lineName === data[i - 1].lineName) {
 | 
				
			||||||
    },
 | 
											this.span1[this.index] += 1;
 | 
				
			||||||
    //时间戳转为yy-mm-dd hh:mm:ss
 | 
											this.span1.push(0);
 | 
				
			||||||
		timeFun(unixtimestamp) {
 | 
										} else {
 | 
				
			||||||
				var unixtimestamp = new Date(unixtimestamp);
 | 
											this.span1.push(1);
 | 
				
			||||||
				var year = 1900 + unixtimestamp.getYear();
 | 
											this.index = i;
 | 
				
			||||||
				var month = "0" + (unixtimestamp.getMonth() + 1);
 | 
										}
 | 
				
			||||||
				var date = "0" + unixtimestamp.getDate();
 | 
									}
 | 
				
			||||||
				return year + "-" + month.substring(month.length - 2, month.length) + "-" + date.substring(date.length - 2, date.length)
 | 
								}
 | 
				
			||||||
		},
 | 
							},
 | 
				
			||||||
  }
 | 
							objectSpanMethod1({ rowIndex, columnIndex }) {
 | 
				
			||||||
}
 | 
								if (columnIndex === 0) {
 | 
				
			||||||
 | 
									const _row = this.span1[rowIndex];
 | 
				
			||||||
 | 
									return {
 | 
				
			||||||
 | 
										rowspan: _row,
 | 
				
			||||||
 | 
										colspan: 1,
 | 
				
			||||||
 | 
									};
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
							},
 | 
				
			||||||
 | 
							handleExport() {
 | 
				
			||||||
 | 
								const xlsxParam = { raw: true };
 | 
				
			||||||
 | 
								let tables = document.querySelector('.el-table').cloneNode(true)
 | 
				
			||||||
 | 
								const fix = tables.querySelector('.el-table__fixed')
 | 
				
			||||||
 | 
								const fixRight = tables.querySelector('.el-table__fixed-right')
 | 
				
			||||||
 | 
								if (fix) {
 | 
				
			||||||
 | 
									tables.removeChild(tables.querySelector('.el-table__fixed'))
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
								if (fixRight) {
 | 
				
			||||||
 | 
									tables.removeChild(tables.querySelector('.el-table__fixed-right'))
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
								let workbook = XLSX.utils.book_new();
 | 
				
			||||||
 | 
								var ws = XLSX.utils.table_to_sheet(
 | 
				
			||||||
 | 
									tables,
 | 
				
			||||||
 | 
									xlsxParam
 | 
				
			||||||
 | 
								);
 | 
				
			||||||
 | 
								XLSX.utils.book_append_sheet(workbook, ws, '许昌安彩年原片生产汇总');
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
								let tables1 = document.querySelectorAll('.el-table')[1].cloneNode(true)
 | 
				
			||||||
 | 
								const fix1 = tables1.querySelector('.el-table__fixed')
 | 
				
			||||||
 | 
								const fixRight1 = tables1.querySelector('.el-table__fixed-right')
 | 
				
			||||||
 | 
								if (fix1) {
 | 
				
			||||||
 | 
									tables1.removeChild(tables1.querySelector('.el-table__fixed'))
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
								if (fixRight1) {
 | 
				
			||||||
 | 
									tables1.removeChild(tables1.querySelector('.el-table__fixed-right'))
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
								var prows = XLSX.utils.table_to_sheet(
 | 
				
			||||||
 | 
									tables1,
 | 
				
			||||||
 | 
									xlsxParam
 | 
				
			||||||
 | 
								);
 | 
				
			||||||
 | 
								XLSX.utils.book_append_sheet(workbook, prows, '许昌安彩年成品生产汇总');
 | 
				
			||||||
 | 
								let fileName = '生产数据汇总表-年报.xlsx';
 | 
				
			||||||
 | 
								var wbout = XLSX.write(workbook, {
 | 
				
			||||||
 | 
									bookType: 'xlsx',
 | 
				
			||||||
 | 
									bookSST: true,
 | 
				
			||||||
 | 
									type: 'array',
 | 
				
			||||||
 | 
								});
 | 
				
			||||||
 | 
								try {
 | 
				
			||||||
 | 
									FileSaver.saveAs(
 | 
				
			||||||
 | 
										new Blob([wbout], { type: 'application/octet-stream' }),
 | 
				
			||||||
 | 
										fileName
 | 
				
			||||||
 | 
									);
 | 
				
			||||||
 | 
									this.$message.success('导出成功');
 | 
				
			||||||
 | 
								} catch (e) {
 | 
				
			||||||
 | 
									if (typeof console !== 'undefined') console.log(e, wbout);
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
								return wbout;
 | 
				
			||||||
 | 
							},
 | 
				
			||||||
 | 
							handleEmitFun(payload) {
 | 
				
			||||||
 | 
								console.log('payload', payload);
 | 
				
			||||||
 | 
							},
 | 
				
			||||||
 | 
						},
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
</script>
 | 
					</script>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
<style scoped>
 | 
					<style scoped>
 | 
				
			||||||
.weekly {
 | 
					.weekly {
 | 
				
			||||||
  padding-top: 16px;
 | 
						padding: 16px;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
.blueTip::before{
 | 
					.blueTip::before {
 | 
				
			||||||
  display: inline-block;
 | 
						display: inline-block;
 | 
				
			||||||
  content: '';
 | 
						content: '';
 | 
				
			||||||
  width: 4px;
 | 
						width: 4px;
 | 
				
			||||||
  height: 18px;
 | 
						height: 18px;
 | 
				
			||||||
  background: #0B58FF;
 | 
						background: #0b58ff;
 | 
				
			||||||
  border-radius: 1px;
 | 
						border-radius: 1px;
 | 
				
			||||||
  margin-right: 8PX;
 | 
						margin-right: 8px;
 | 
				
			||||||
  margin-top: 8px;
 | 
						margin-top: 8px;
 | 
				
			||||||
  margin-left: 16px;
 | 
						margin-left: 16px;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
</style>
 | 
					</style>
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,10 +1,3 @@
 | 
				
			|||||||
<!--
 | 
					 | 
				
			||||||
 * @Author: zhp
 | 
					 | 
				
			||||||
 * @Date: 2024-04-18 14:08:46
 | 
					 | 
				
			||||||
 * @LastEditTime: 2024-04-24 13:52:45
 | 
					 | 
				
			||||||
 * @LastEditors: zhp
 | 
					 | 
				
			||||||
 * @Description:
 | 
					 | 
				
			||||||
-->
 | 
					 | 
				
			||||||
<template>
 | 
					<template>
 | 
				
			||||||
  <div class="app-container">
 | 
					  <div class="app-container">
 | 
				
			||||||
    <search-bar :formConfigs="formConfig" ref="searchBarForm" @headBtnClick="buttonClick" />
 | 
					    <search-bar :formConfigs="formConfig" ref="searchBarForm" @headBtnClick="buttonClick" />
 | 
				
			||||||
@@ -24,10 +17,13 @@
 | 
				
			|||||||
      </el-table-column>
 | 
					      </el-table-column>
 | 
				
			||||||
    </el-table> -->
 | 
					    </el-table> -->
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    <el-table class="baseTable" :span-method="objectSpanMethod" :data="tableData" style="width: 100%">
 | 
					    <el-table id="exportTable" :header-cell-style="{
 | 
				
			||||||
      <el-table-column align="center" prop="" label="配料日报" width="120">
 | 
					      background: '#F2F4F9',
 | 
				
			||||||
 | 
					      color: '#606266'
 | 
				
			||||||
 | 
					    }" class="baseTable" :span-method="objectSpanMethod" :data="tableData" style="width: 100%">
 | 
				
			||||||
 | 
					      <el-table-column align="center" prop="" :label=" '配料日报' + time " width="120">
 | 
				
			||||||
        <el-table-column label="原料样式" align="right" width="150">
 | 
					        <el-table-column label="原料样式" align="right" width="150">
 | 
				
			||||||
          <el-table-column  prop="className" label="时间" width="120">
 | 
					          <el-table-column prop="className" label="时间" width="120">
 | 
				
			||||||
          </el-table-column>
 | 
					          </el-table-column>
 | 
				
			||||||
        </el-table-column>
 | 
					        </el-table-column>
 | 
				
			||||||
        <el-table-column align="center" prop="putType" label="" width="180">
 | 
					        <el-table-column align="center" prop="putType" label="" width="180">
 | 
				
			||||||
@@ -36,7 +32,7 @@
 | 
				
			|||||||
        <el-table-column prop="activityName"></el-table-column>
 | 
					        <el-table-column prop="activityName"></el-table-column>
 | 
				
			||||||
        <el-table-column prop="message"></el-table-column>
 | 
					        <el-table-column prop="message"></el-table-column>
 | 
				
			||||||
      </el-table-column> -->
 | 
					      </el-table-column> -->
 | 
				
			||||||
        <el-table-column align="center" style="text-align: center;" v-for="(item,index) in codeList " :prop="item"
 | 
					        <el-table-column align="center" style="text-align: center;" v-for="(item, index) in codeList " :prop="item"
 | 
				
			||||||
          :label="item">
 | 
					          :label="item">
 | 
				
			||||||
          <!-- <template slot-scope="scope">
 | 
					          <!-- <template slot-scope="scope">
 | 
				
			||||||
          <el-col :span="12">
 | 
					          <el-col :span="12">
 | 
				
			||||||
@@ -77,6 +73,7 @@ import {
 | 
				
			|||||||
} from '@/api/report/qcReport';
 | 
					} from '@/api/report/qcReport';
 | 
				
			||||||
import tableHeightMixin from '@/mixins/lb/tableHeightMixin';
 | 
					import tableHeightMixin from '@/mixins/lb/tableHeightMixin';
 | 
				
			||||||
import FileSaver from 'file-saver'
 | 
					import FileSaver from 'file-saver'
 | 
				
			||||||
 | 
					import moment from 'moment'
 | 
				
			||||||
// import { getList, } from "@/api/base/qualityScrapType";
 | 
					// import { getList, } from "@/api/base/qualityScrapType";
 | 
				
			||||||
const headers = [
 | 
					const headers = [
 | 
				
			||||||
  // {
 | 
					  // {
 | 
				
			||||||
@@ -122,7 +119,7 @@ const headers = [
 | 
				
			|||||||
];
 | 
					];
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export default {
 | 
					export default {
 | 
				
			||||||
  mixins: [ tableHeightMixin],
 | 
					  mixins: [tableHeightMixin],
 | 
				
			||||||
  data() {
 | 
					  data() {
 | 
				
			||||||
    return {
 | 
					    return {
 | 
				
			||||||
      urlOptions: {
 | 
					      urlOptions: {
 | 
				
			||||||
@@ -130,34 +127,33 @@ export default {
 | 
				
			|||||||
        // deleteURL: deleteQualityHotMaterial,
 | 
					        // deleteURL: deleteQualityHotMaterial,
 | 
				
			||||||
        // exportURL: exportFactoryExcel,
 | 
					        // exportURL: exportFactoryExcel,
 | 
				
			||||||
      },
 | 
					      },
 | 
				
			||||||
      codeList: ['sj1', 'sj2', 'sj3', 'sj4', 'sj5', 'sj7', 'sj8', 'sj10', 'sj11', 'sj12', 'sj13', 'sj14'],
 | 
					      codeList: ['sj1', 'sj2', 'sj3', 'sj4', 'sj5', 'sj7', 'sj8', 'sj10', 'sj11','sj14'],
 | 
				
			||||||
      tableData: [],
 | 
					      tableData: [],
 | 
				
			||||||
      listQuery: {
 | 
					      listQuery: {
 | 
				
			||||||
        startTime: undefined,
 | 
					        startTime: undefined,
 | 
				
			||||||
        endTime:undefined
 | 
					        endTime: undefined
 | 
				
			||||||
      },
 | 
					      },
 | 
				
			||||||
 | 
					      time: '',
 | 
				
			||||||
      formConfig: [
 | 
					      formConfig: [
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
          type: 'datePicker',
 | 
					          type: 'datePicker',
 | 
				
			||||||
          label: '时间段',
 | 
					          label: '时间',
 | 
				
			||||||
          dateType: 'daterange',
 | 
					          dateType: 'date',
 | 
				
			||||||
          format: 'yyyy-MM-dd HH:mm:ss',
 | 
					          format: 'yyyy-MM-dd',
 | 
				
			||||||
          valueFormat: "timestamp",
 | 
					          valueFormat: "timestamp",
 | 
				
			||||||
          rangeSeparator: '-',
 | 
					          rangeSeparator: '-',
 | 
				
			||||||
          startPlaceholder: '开始时间',
 | 
					 | 
				
			||||||
          endPlaceholder: '结束时间',
 | 
					 | 
				
			||||||
          param: 'checkTime',
 | 
					          param: 'checkTime',
 | 
				
			||||||
          defaultSelect: [Date.now() - 24 * 60 * 60 - 1000, Date.now()],
 | 
					          defaultSelect: Date.now(),
 | 
				
			||||||
          width: 350
 | 
					          width: 150
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
          type:'button',
 | 
					          type: 'button',
 | 
				
			||||||
          btnName: '查询',
 | 
					          btnName: '查询',
 | 
				
			||||||
          name: 'search',
 | 
					          name: 'search',
 | 
				
			||||||
          color: 'primary',
 | 
					          color: 'primary',
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
          type:'button',
 | 
					          type: 'button',
 | 
				
			||||||
          btnName: '导出',
 | 
					          btnName: '导出',
 | 
				
			||||||
          name: 'export',
 | 
					          name: 'export',
 | 
				
			||||||
          color: 'primary',
 | 
					          color: 'primary',
 | 
				
			||||||
@@ -173,14 +169,29 @@ export default {
 | 
				
			|||||||
  },
 | 
					  },
 | 
				
			||||||
  mounted() {
 | 
					  mounted() {
 | 
				
			||||||
    // this.formConfig[1].defaultSelect[]
 | 
					    // this.formConfig[1].defaultSelect[]
 | 
				
			||||||
    this.listQuery.startTime = this.formConfig[0].defaultSelect[0]
 | 
					    this.listQuery.startTime = Date.now()
 | 
				
			||||||
    this.listQuery.endTime = this.formConfig[0].defaultSelect[1]
 | 
					    this.time = moment(new Date((Date.now())).setHours(8, 0, 0, 0)).format('YYYY-MM-DD HH:mm:ss') + moment(new Date(Date.now() + 24*60*60*1000).setHours(8, 0, 0, 0)).format('YYYY-MM-DD HH:mm:ss')
 | 
				
			||||||
 | 
					    this.listQuery.endTime = Date.now()
 | 
				
			||||||
    // this.formConfig[0].defaultSelect[0] = Date.now()-24*60*60-1000
 | 
					    // this.formConfig[0].defaultSelect[0] = Date.now()-24*60*60-1000
 | 
				
			||||||
    this.getDataList()
 | 
					    this.getDataList()
 | 
				
			||||||
    // this.getSpanArr(this.tableData)
 | 
					    // this.getSpanArr(this.tableData)
 | 
				
			||||||
    // this.getDict();
 | 
					    // this.getDict();
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  methods: {
 | 
					  methods: {
 | 
				
			||||||
 | 
					    timestampToTime(date) {
 | 
				
			||||||
 | 
					      // 时间戳为10位需*1000,时间戳为13位不需乘1000
 | 
				
			||||||
 | 
					      // var date = new Date(timestamp * 1000);
 | 
				
			||||||
 | 
					      var Y = date.getFullYear() + "-";
 | 
				
			||||||
 | 
					      var M =
 | 
				
			||||||
 | 
					        (date.getMonth() + 1 < 10
 | 
				
			||||||
 | 
					          ? "0" + (date.getMonth() + 1)
 | 
				
			||||||
 | 
					          : date.getMonth() + 1) + "-";
 | 
				
			||||||
 | 
					      var D = (date.getDate() < 10 ? "0" + date.getDate() : date.getDate()) + " ";
 | 
				
			||||||
 | 
					      var h = date.getHours() + ":";
 | 
				
			||||||
 | 
					      var m = date.getMinutes() + ":";
 | 
				
			||||||
 | 
					      var s = date.getSeconds();
 | 
				
			||||||
 | 
					      return Y + M + D + h + m + s;
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
    objectSpanMethod({ row, column, rowIndex, columnIndex }) {
 | 
					    objectSpanMethod({ row, column, rowIndex, columnIndex }) {
 | 
				
			||||||
      let spanOneArr = [], concatOne = 0;
 | 
					      let spanOneArr = [], concatOne = 0;
 | 
				
			||||||
      this.tableData.map((item, index) => {
 | 
					      this.tableData.map((item, index) => {
 | 
				
			||||||
@@ -206,23 +217,23 @@ export default {
 | 
				
			|||||||
          colspan: _col
 | 
					          colspan: _col
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
      if (columnIndex === 1 ) {
 | 
					      if (columnIndex === 1) {
 | 
				
			||||||
        if (rowIndex === 0 || rowIndex === 2 || rowIndex === 4 || rowIndex === 6 || rowIndex === 8 || rowIndex === 10) {
 | 
					        if (rowIndex === 0 || rowIndex === 2 || rowIndex === 4 || rowIndex === 6 || rowIndex === 8 || rowIndex === 10) {
 | 
				
			||||||
          return {
 | 
					          return {
 | 
				
			||||||
            rowspan: 2,
 | 
					            rowspan: 2,
 | 
				
			||||||
            colspan: 1
 | 
					            colspan: 1
 | 
				
			||||||
          }
 | 
					          }
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
      }
 | 
					      if (columnIndex === 1) {
 | 
				
			||||||
      if (columnIndex === 1)  {
 | 
					        if (rowIndex % 2 == 1) {
 | 
				
			||||||
        if (rowIndex %2 == 1) {
 | 
					 | 
				
			||||||
          return {
 | 
					          return {
 | 
				
			||||||
            rowspan: 1,
 | 
					            rowspan: 1,
 | 
				
			||||||
            colspan: 2
 | 
					            colspan: 2
 | 
				
			||||||
          }
 | 
					          }
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
      if (columnIndex === 4 || columnIndex === 5 || columnIndex === 6 || columnIndex === 7 || columnIndex === 8 || columnIndex === 9 || columnIndex === 10 || columnIndex === 11 || columnIndex === 12 || columnIndex === 13) {
 | 
					      if (columnIndex === 4 || columnIndex === 5 || columnIndex === 6 || columnIndex === 7 || columnIndex === 8 || columnIndex === 9 || columnIndex === 10 || columnIndex === 11 ) {
 | 
				
			||||||
        if (rowIndex % 2 == 0) {
 | 
					        if (rowIndex % 2 == 0) {
 | 
				
			||||||
          return {
 | 
					          return {
 | 
				
			||||||
            rowspan: 2,
 | 
					            rowspan: 2,
 | 
				
			||||||
@@ -255,7 +266,7 @@ export default {
 | 
				
			|||||||
            //返回一个新创建的 Blob 对象,其内容由参数中给定的数组串联组成。
 | 
					            //返回一个新创建的 Blob 对象,其内容由参数中给定的数组串联组成。
 | 
				
			||||||
            new Blob([wbout], { type: "application/octet-stream" }),
 | 
					            new Blob([wbout], { type: "application/octet-stream" }),
 | 
				
			||||||
            //设置导出文件名称
 | 
					            //设置导出文件名称
 | 
				
			||||||
            "切割堆垛日报表.xlsx"
 | 
					            "配料日报.xlsx"
 | 
				
			||||||
          );
 | 
					          );
 | 
				
			||||||
        } catch (e) {
 | 
					        } catch (e) {
 | 
				
			||||||
          if (typeof console !== "undefined") console.log(e, wbout);
 | 
					          if (typeof console !== "undefined") console.log(e, wbout);
 | 
				
			||||||
@@ -285,7 +296,7 @@ export default {
 | 
				
			|||||||
        let arr = [
 | 
					        let arr = [
 | 
				
			||||||
          {
 | 
					          {
 | 
				
			||||||
            classType: 1,
 | 
					            classType: 1,
 | 
				
			||||||
            className:'白班(8:00-20:00)',
 | 
					            className: '白班(8:00-20:00)',
 | 
				
			||||||
            'sj1': null,
 | 
					            'sj1': null,
 | 
				
			||||||
            'sj2': null,
 | 
					            'sj2': null,
 | 
				
			||||||
            'sj3': null,
 | 
					            'sj3': null,
 | 
				
			||||||
@@ -295,10 +306,9 @@ export default {
 | 
				
			|||||||
            'sj8': null,
 | 
					            'sj8': null,
 | 
				
			||||||
            'sj10': null,
 | 
					            'sj10': null,
 | 
				
			||||||
            'sj11': null,
 | 
					            'sj11': null,
 | 
				
			||||||
            'sj12': null,
 | 
					
 | 
				
			||||||
            'sj13': null,
 | 
					 | 
				
			||||||
            'sj14': null,
 | 
					            'sj14': null,
 | 
				
			||||||
            putType: '投入数量'
 | 
					            putType: '原料投入(kg)'
 | 
				
			||||||
          },
 | 
					          },
 | 
				
			||||||
          {
 | 
					          {
 | 
				
			||||||
            classType: 1,
 | 
					            classType: 1,
 | 
				
			||||||
@@ -312,8 +322,7 @@ export default {
 | 
				
			|||||||
            'sj8': null,
 | 
					            'sj8': null,
 | 
				
			||||||
            'sj10': null,
 | 
					            'sj10': null,
 | 
				
			||||||
            'sj11': null,
 | 
					            'sj11': null,
 | 
				
			||||||
            'sj12': null,
 | 
					
 | 
				
			||||||
            'sj13': null,
 | 
					 | 
				
			||||||
            'sj14': null,
 | 
					            'sj14': null,
 | 
				
			||||||
            'sj1+sj2': null,
 | 
					            'sj1+sj2': null,
 | 
				
			||||||
            putType: ''
 | 
					            putType: ''
 | 
				
			||||||
@@ -330,8 +339,7 @@ export default {
 | 
				
			|||||||
            'sj8': null,
 | 
					            'sj8': null,
 | 
				
			||||||
            'sj10': null,
 | 
					            'sj10': null,
 | 
				
			||||||
            'sj11': null,
 | 
					            'sj11': null,
 | 
				
			||||||
            'sj12': null,
 | 
					
 | 
				
			||||||
            'sj13': null,
 | 
					 | 
				
			||||||
            'sj14': null,
 | 
					            'sj14': null,
 | 
				
			||||||
            putType: '投入次数'
 | 
					            putType: '投入次数'
 | 
				
			||||||
          },
 | 
					          },
 | 
				
			||||||
@@ -347,8 +355,7 @@ export default {
 | 
				
			|||||||
            'sj8': null,
 | 
					            'sj8': null,
 | 
				
			||||||
            'sj10': null,
 | 
					            'sj10': null,
 | 
				
			||||||
            'sj11': null,
 | 
					            'sj11': null,
 | 
				
			||||||
            'sj12': null,
 | 
					
 | 
				
			||||||
            'sj13': null,
 | 
					 | 
				
			||||||
            'sj14': null,
 | 
					            'sj14': null,
 | 
				
			||||||
            'sj1+sj2': null,
 | 
					            'sj1+sj2': null,
 | 
				
			||||||
            putType: ''
 | 
					            putType: ''
 | 
				
			||||||
@@ -365,10 +372,9 @@ export default {
 | 
				
			|||||||
            'sj8': null,
 | 
					            'sj8': null,
 | 
				
			||||||
            'sj10': null,
 | 
					            'sj10': null,
 | 
				
			||||||
            'sj11': null,
 | 
					            'sj11': null,
 | 
				
			||||||
            'sj12': null,
 | 
					
 | 
				
			||||||
            'sj13': null,
 | 
					 | 
				
			||||||
            'sj14': null,
 | 
					            'sj14': null,
 | 
				
			||||||
            putType: '投入数量',
 | 
					            putType: '原料投入(kg)',
 | 
				
			||||||
          },
 | 
					          },
 | 
				
			||||||
          {
 | 
					          {
 | 
				
			||||||
            classType: 2,
 | 
					            classType: 2,
 | 
				
			||||||
@@ -382,14 +388,13 @@ export default {
 | 
				
			|||||||
            'sj8': null,
 | 
					            'sj8': null,
 | 
				
			||||||
            'sj10': null,
 | 
					            'sj10': null,
 | 
				
			||||||
            'sj11': null,
 | 
					            'sj11': null,
 | 
				
			||||||
            'sj12': null,
 | 
					
 | 
				
			||||||
            'sj13': null,
 | 
					 | 
				
			||||||
            'sj14': null,
 | 
					            'sj14': null,
 | 
				
			||||||
            'sj1+sj2': null,
 | 
					            'sj1+sj2': null,
 | 
				
			||||||
            putType: ''
 | 
					            putType: ''
 | 
				
			||||||
          },
 | 
					          },
 | 
				
			||||||
          {
 | 
					          {
 | 
				
			||||||
            classType:2,
 | 
					            classType: 2,
 | 
				
			||||||
            className: '夜班(20:00-8:00)',
 | 
					            className: '夜班(20:00-8:00)',
 | 
				
			||||||
            'sj1': null,
 | 
					            'sj1': null,
 | 
				
			||||||
            'sj2': null,
 | 
					            'sj2': null,
 | 
				
			||||||
@@ -400,8 +405,7 @@ export default {
 | 
				
			|||||||
            'sj8': null,
 | 
					            'sj8': null,
 | 
				
			||||||
            'sj10': null,
 | 
					            'sj10': null,
 | 
				
			||||||
            'sj11': null,
 | 
					            'sj11': null,
 | 
				
			||||||
            'sj12': null,
 | 
					
 | 
				
			||||||
            'sj13': null,
 | 
					 | 
				
			||||||
            'sj14': null,
 | 
					            'sj14': null,
 | 
				
			||||||
            putType: '投入次数',
 | 
					            putType: '投入次数',
 | 
				
			||||||
          },
 | 
					          },
 | 
				
			||||||
@@ -417,8 +421,7 @@ export default {
 | 
				
			|||||||
            'sj8': null,
 | 
					            'sj8': null,
 | 
				
			||||||
            'sj10': null,
 | 
					            'sj10': null,
 | 
				
			||||||
            'sj11': null,
 | 
					            'sj11': null,
 | 
				
			||||||
            'sj12': null,
 | 
					
 | 
				
			||||||
            'sj13': null,
 | 
					 | 
				
			||||||
            'sj14': null,
 | 
					            'sj14': null,
 | 
				
			||||||
            'sj1+sj2': null,
 | 
					            'sj1+sj2': null,
 | 
				
			||||||
            putType: ''
 | 
					            putType: ''
 | 
				
			||||||
@@ -435,10 +438,9 @@ export default {
 | 
				
			|||||||
            'sj8': null,
 | 
					            'sj8': null,
 | 
				
			||||||
            'sj10': null,
 | 
					            'sj10': null,
 | 
				
			||||||
            'sj11': null,
 | 
					            'sj11': null,
 | 
				
			||||||
            'sj12': null,
 | 
					
 | 
				
			||||||
            'sj13': null,
 | 
					 | 
				
			||||||
            'sj14': null,
 | 
					            'sj14': null,
 | 
				
			||||||
            putType: '投入数量',
 | 
					            putType: '原料投入(kg)',
 | 
				
			||||||
          },
 | 
					          },
 | 
				
			||||||
          {
 | 
					          {
 | 
				
			||||||
            classType: 3,
 | 
					            classType: 3,
 | 
				
			||||||
@@ -452,10 +454,9 @@ export default {
 | 
				
			|||||||
            'sj8': null,
 | 
					            'sj8': null,
 | 
				
			||||||
            'sj10': null,
 | 
					            'sj10': null,
 | 
				
			||||||
            'sj11': null,
 | 
					            'sj11': null,
 | 
				
			||||||
            'sj12': null,
 | 
					
 | 
				
			||||||
            'sj13': null,
 | 
					 | 
				
			||||||
            'sj14': null,
 | 
					            'sj14': null,
 | 
				
			||||||
            'sj1+sj2':null,
 | 
					            'sj1+sj2': null,
 | 
				
			||||||
            putType: ''
 | 
					            putType: ''
 | 
				
			||||||
          },
 | 
					          },
 | 
				
			||||||
          {
 | 
					          {
 | 
				
			||||||
@@ -470,8 +471,7 @@ export default {
 | 
				
			|||||||
            'sj8': null,
 | 
					            'sj8': null,
 | 
				
			||||||
            'sj10': null,
 | 
					            'sj10': null,
 | 
				
			||||||
            'sj11': null,
 | 
					            'sj11': null,
 | 
				
			||||||
            'sj12': null,
 | 
					
 | 
				
			||||||
            'sj13': null,
 | 
					 | 
				
			||||||
            'sj14': null,
 | 
					            'sj14': null,
 | 
				
			||||||
            putType: '投入次数',
 | 
					            putType: '投入次数',
 | 
				
			||||||
          },
 | 
					          },
 | 
				
			||||||
@@ -487,41 +487,40 @@ export default {
 | 
				
			|||||||
            'sj8': null,
 | 
					            'sj8': null,
 | 
				
			||||||
            'sj10': null,
 | 
					            'sj10': null,
 | 
				
			||||||
            'sj11': null,
 | 
					            'sj11': null,
 | 
				
			||||||
            'sj12': null,
 | 
					
 | 
				
			||||||
            'sj13': null,
 | 
					 | 
				
			||||||
            'sj14': null,
 | 
					            'sj14': null,
 | 
				
			||||||
            'sj1+sj2': null,
 | 
					            'sj1+sj2': null,
 | 
				
			||||||
            putType: ''
 | 
					            putType: ''
 | 
				
			||||||
          },
 | 
					          },
 | 
				
			||||||
        ]
 | 
					        ]
 | 
				
			||||||
        res.data.forEach((ele) => {
 | 
					        res.data.forEach((ele) => {
 | 
				
			||||||
          if(ele.classType === 1 && ele.code == 'sj1+sj2') {
 | 
					          if (ele.classType === 1 && ele.code == 'sj1+sj2') {
 | 
				
			||||||
            arr[1]['putType'] = ele.putNum
 | 
					            arr[1]['putType'] = ele.useNum
 | 
				
			||||||
            arr[3]['putType'] = ele.useNum
 | 
					            arr[3]['putType'] = ele.putNum
 | 
				
			||||||
            // arr[1]['sj2'] = ele.putNum
 | 
					            // arr[1]['sj2'] = ele.putNum
 | 
				
			||||||
            // arr[3]['sj2'] = ele.useNum
 | 
					            // arr[3]['sj2'] = ele.useNum
 | 
				
			||||||
          } else if (ele.classType === 2 && ele.code == 'sj1+sj2') {
 | 
					          } else if (ele.classType === 2 && ele.code == 'sj1+sj2') {
 | 
				
			||||||
            arr[5]['putType'] = ele.putNum
 | 
					            arr[5]['putType'] = ele.useNum
 | 
				
			||||||
            arr[7]['putType'] = ele.useNum
 | 
					            arr[7]['putType'] = ele.putNum
 | 
				
			||||||
            // arr[5]['sj2'] = ele.putNum
 | 
					            // arr[5]['sj2'] = ele.putNum
 | 
				
			||||||
            // arr[7]['sj2'] = ele.useNum
 | 
					            // arr[7]['sj2'] = ele.useNum
 | 
				
			||||||
          } else if (ele.classType === 3 && ele.code == 'sj1+sj2') {
 | 
					          } else if (ele.classType === 3 && ele.code == 'sj1+sj2') {
 | 
				
			||||||
            arr[9]['putType'] = ele.putNum
 | 
					            arr[9]['putType'] = ele.useNum
 | 
				
			||||||
            arr[11]['putType'] = ele.useNum
 | 
					            arr[11]['putType'] = ele.putNum
 | 
				
			||||||
            // arr[9]['sj2'] = ele.putNum
 | 
					            // arr[9]['sj2'] = ele.putNum
 | 
				
			||||||
            // arr[11]['sj2'] = ele.useNum
 | 
					            // arr[11]['sj2'] = ele.useNum
 | 
				
			||||||
          }
 | 
					          }
 | 
				
			||||||
          this.codeList.forEach((item) => {
 | 
					          this.codeList.forEach((item) => {
 | 
				
			||||||
            if (ele.classType === 1 && ele.code == item) {
 | 
					            if (ele.classType === 1 && ele.code == item) {
 | 
				
			||||||
              // console.log(arr[0][item])
 | 
					              // console.log(arr[0][item])
 | 
				
			||||||
              arr[0][item] = ele.putNum
 | 
					              arr[0][item] = ele.useNum
 | 
				
			||||||
              arr[2][item] = ele.useNum
 | 
					              arr[2][item] = ele.putNum
 | 
				
			||||||
            } else if (ele.classType === 2 && ele.code == item) {
 | 
					            } else if (ele.classType === 2 && ele.code == item) {
 | 
				
			||||||
              arr[4][item] = ele.putNum
 | 
					              arr[4][item] = ele.useNum
 | 
				
			||||||
              arr[6][item] = ele.useNum
 | 
					              arr[6][item] = ele.putNum
 | 
				
			||||||
            } else if (ele.classType === 3 && ele.code == item) {
 | 
					            } else if (ele.classType === 3 && ele.code == item) {
 | 
				
			||||||
              arr[8][item] = ele.putNum
 | 
					              arr[8][item] = ele.useNum
 | 
				
			||||||
              arr[10][item] = ele.useNum
 | 
					              arr[10][item] = ele.putNum
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
          })
 | 
					          })
 | 
				
			||||||
        })
 | 
					        })
 | 
				
			||||||
@@ -532,10 +531,13 @@ export default {
 | 
				
			|||||||
      });
 | 
					      });
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    buttonClick(val) {
 | 
					    buttonClick(val) {
 | 
				
			||||||
 | 
					      console.log(val.checkTime)
 | 
				
			||||||
 | 
					      // Date.now() - 24 * 60 * 60 - 1000
 | 
				
			||||||
      switch (val.btnName) {
 | 
					      switch (val.btnName) {
 | 
				
			||||||
        case 'search':
 | 
					        case 'search':
 | 
				
			||||||
          this.listQuery.startTime = val.checkTime ? val.checkTime[0] : undefined;
 | 
					          this.listQuery.startTime = val.checkTime ? new Date(new Date(val.checkTime).setHours(8, 0, 0, 0)).getTime() : undefined;
 | 
				
			||||||
          this.listQuery.endTime = val.checkTime ? val.checkTime[1] : undefined;
 | 
					          this.time = moment(new Date((val.checkTime)).setHours(8, 0, 0, 0)).format('YYYY-MM-DD HH:mm:ss') + moment(new Date(val.checkTime + 24 * 60 * 60 * 1000).setHours(7, 59, 59)).format('YYYY-MM-DD HH:mm:ss')
 | 
				
			||||||
 | 
					          this.listQuery.endTime = val.checkTime ? new Date(new Date(val.checkTime + 24 * 60 * 60 * 1000).setHours(7, 59, 59)).getTime() : undefined;
 | 
				
			||||||
          this.getDataList();
 | 
					          this.getDataList();
 | 
				
			||||||
          break;
 | 
					          break;
 | 
				
			||||||
        case 'export':
 | 
					        case 'export':
 | 
				
			||||||
@@ -549,6 +551,10 @@ export default {
 | 
				
			|||||||
};
 | 
					};
 | 
				
			||||||
</script>
 | 
					</script>
 | 
				
			||||||
<style scoped>
 | 
					<style scoped>
 | 
				
			||||||
 | 
					.baseTable{
 | 
				
			||||||
 | 
					  border-color: #D1D4DB;
 | 
				
			||||||
 | 
					  background-color: #F2F4F9;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
::v-deep.baseTable .el-table__body tr.current-row>td.el-table__cell {
 | 
					::v-deep.baseTable .el-table__body tr.current-row>td.el-table__cell {
 | 
				
			||||||
  background-color: #EAF1FC;
 | 
					  background-color: #EAF1FC;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
@@ -557,6 +563,7 @@ export default {
 | 
				
			|||||||
  padding: 0;
 | 
					  padding: 0;
 | 
				
			||||||
  height: 35px;
 | 
					  height: 35px;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
::v-deep.el-table thead.is-group th {
 | 
					::v-deep.el-table thead.is-group th {
 | 
				
			||||||
  background: none;
 | 
					  background: none;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
@@ -567,6 +574,7 @@ export default {
 | 
				
			|||||||
::v-deep.el-table thead.is-group tr:nth-child(2) th:nth-child(1) {
 | 
					::v-deep.el-table thead.is-group tr:nth-child(2) th:nth-child(1) {
 | 
				
			||||||
  border-bottom: none;
 | 
					  border-bottom: none;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
::v-deep.el-table thead.is-group tr:nth-child(2) th:first-of-type:before {
 | 
					::v-deep.el-table thead.is-group tr:nth-child(2) th:first-of-type:before {
 | 
				
			||||||
  content: '';
 | 
					  content: '';
 | 
				
			||||||
  position: absolute;
 | 
					  position: absolute;
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,7 +1,7 @@
 | 
				
			|||||||
<!--
 | 
					<!--
 | 
				
			||||||
 * @Author: zhp
 | 
					 * @Author: zhp
 | 
				
			||||||
 * @Date: 2023-12-12 13:45:25
 | 
					 * @Date: 2023-12-12 13:45:25
 | 
				
			||||||
 * @LastEditTime: 2024-04-23 16:58:06
 | 
					 * @LastEditTime: 2024-04-24 15:27:49
 | 
				
			||||||
 * @LastEditors: DY
 | 
					 * @LastEditors: DY
 | 
				
			||||||
 * @Description:
 | 
					 * @Description:
 | 
				
			||||||
-->
 | 
					-->
 | 
				
			||||||
@@ -26,7 +26,7 @@
 | 
				
			|||||||
        <el-button size="small" v-if="isSave" @click="saveDataList()">保存</el-button>
 | 
					        <el-button size="small" v-if="isSave" @click="saveDataList()">保存</el-button>
 | 
				
			||||||
      </el-row>
 | 
					      </el-row>
 | 
				
			||||||
    </div>
 | 
					    </div>
 | 
				
			||||||
    <el-table id="exportTable" :data="list" style="width: 100%" :header-cell-style="{
 | 
					    <el-table id="exportproductionTable" :data="list" style="width: 100%" :header-cell-style="{
 | 
				
			||||||
      background: '#F2F4F9',
 | 
					      background: '#F2F4F9',
 | 
				
			||||||
      color: '#606266'
 | 
					      color: '#606266'
 | 
				
			||||||
    }">
 | 
					    }">
 | 
				
			||||||
@@ -496,7 +496,7 @@ export default {
 | 
				
			|||||||
      /* 从表生成工作簿对象 */
 | 
					      /* 从表生成工作簿对象 */
 | 
				
			||||||
      import('xlsx').then(excel => {
 | 
					      import('xlsx').then(excel => {
 | 
				
			||||||
        var wb = excel.utils.table_to_book(
 | 
					        var wb = excel.utils.table_to_book(
 | 
				
			||||||
          document.querySelector("#exportTable"),
 | 
					          document.querySelector("#exportproductionTable"),
 | 
				
			||||||
          xlsxParam
 | 
					          xlsxParam
 | 
				
			||||||
        );
 | 
					        );
 | 
				
			||||||
        /* 获取二进制字符串作为输出 */
 | 
					        /* 获取二进制字符串作为输出 */
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,7 +1,7 @@
 | 
				
			|||||||
<!--
 | 
					<!--
 | 
				
			||||||
 * @Author: zhp
 | 
					 * @Author: zhp
 | 
				
			||||||
 * @Date: 2023-12-12 13:45:25
 | 
					 * @Date: 2023-12-12 13:45:25
 | 
				
			||||||
 * @LastEditTime: 2024-04-23 16:58:12
 | 
					 * @LastEditTime: 2024-04-24 15:29:21
 | 
				
			||||||
 * @LastEditors: DY
 | 
					 * @LastEditors: DY
 | 
				
			||||||
 * @Description:
 | 
					 * @Description:
 | 
				
			||||||
-->
 | 
					-->
 | 
				
			||||||
@@ -28,7 +28,7 @@
 | 
				
			|||||||
        <el-button size="small" v-if="isSave" @click="saveDataList()">保存</el-button>
 | 
					        <el-button size="small" v-if="isSave" @click="saveDataList()">保存</el-button>
 | 
				
			||||||
      </el-row>
 | 
					      </el-row>
 | 
				
			||||||
    </div>
 | 
					    </div>
 | 
				
			||||||
    <el-table id="exportTable" :data="list" style="width: 100%" :header-cell-style="{
 | 
					    <el-table id="exportproductionTable" :data="list" style="width: 100%" :header-cell-style="{
 | 
				
			||||||
      background: '#F2F4F9',
 | 
					      background: '#F2F4F9',
 | 
				
			||||||
      color: '#606266'
 | 
					      color: '#606266'
 | 
				
			||||||
    }">
 | 
					    }">
 | 
				
			||||||
@@ -517,7 +517,7 @@ export default {
 | 
				
			|||||||
      /* 从表生成工作簿对象 */
 | 
					      /* 从表生成工作簿对象 */
 | 
				
			||||||
      import('xlsx').then(excel => {
 | 
					      import('xlsx').then(excel => {
 | 
				
			||||||
        var wb = excel.utils.table_to_book(
 | 
					        var wb = excel.utils.table_to_book(
 | 
				
			||||||
          document.querySelector("#exportTable"),
 | 
					          document.querySelector("#exportproductionTable"),
 | 
				
			||||||
          xlsxParam
 | 
					          xlsxParam
 | 
				
			||||||
        );
 | 
					        );
 | 
				
			||||||
        /* 获取二进制字符串作为输出 */
 | 
					        /* 获取二进制字符串作为输出 */
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,7 +1,7 @@
 | 
				
			|||||||
<!--
 | 
					<!--
 | 
				
			||||||
 * @Author: zhp
 | 
					 * @Author: zhp
 | 
				
			||||||
 * @Date: 2023-12-12 13:45:25
 | 
					 * @Date: 2023-12-12 13:45:25
 | 
				
			||||||
 * @LastEditTime: 2024-04-23 17:21:04
 | 
					 * @LastEditTime: 2024-04-24 15:28:10
 | 
				
			||||||
 * @LastEditors: DY
 | 
					 * @LastEditors: DY
 | 
				
			||||||
 * @Description:
 | 
					 * @Description:
 | 
				
			||||||
-->
 | 
					-->
 | 
				
			||||||
@@ -30,7 +30,7 @@
 | 
				
			|||||||
        <el-button size="small" v-if="isSave" @click="saveDataList()">保存</el-button>
 | 
					        <el-button size="small" v-if="isSave" @click="saveDataList()">保存</el-button>
 | 
				
			||||||
      </el-row>
 | 
					      </el-row>
 | 
				
			||||||
    </div>
 | 
					    </div>
 | 
				
			||||||
    <el-table id="exportTable" :data="list" style="width: 100%" :header-cell-style="{
 | 
					    <el-table id="exportproductionTable" :data="list" style="width: 100%" :header-cell-style="{
 | 
				
			||||||
      background: '#F2F4F9',
 | 
					      background: '#F2F4F9',
 | 
				
			||||||
      color: '#606266'
 | 
					      color: '#606266'
 | 
				
			||||||
    }">
 | 
					    }">
 | 
				
			||||||
@@ -452,7 +452,7 @@ export default {
 | 
				
			|||||||
      /* 从表生成工作簿对象 */
 | 
					      /* 从表生成工作簿对象 */
 | 
				
			||||||
      import('xlsx').then(excel => {
 | 
					      import('xlsx').then(excel => {
 | 
				
			||||||
        var wb = excel.utils.table_to_book(
 | 
					        var wb = excel.utils.table_to_book(
 | 
				
			||||||
          document.querySelector("#exportTable"),
 | 
					          document.querySelector("#exportproductionTable"),
 | 
				
			||||||
          xlsxParam
 | 
					          xlsxParam
 | 
				
			||||||
        );
 | 
					        );
 | 
				
			||||||
        /* 获取二进制字符串作为输出 */
 | 
					        /* 获取二进制字符串作为输出 */
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,7 +1,7 @@
 | 
				
			|||||||
<!--
 | 
					<!--
 | 
				
			||||||
 * @Author: zhp
 | 
					 * @Author: zhp
 | 
				
			||||||
 * @Date: 2024-04-18 10:01:33
 | 
					 * @Date: 2024-04-18 10:01:33
 | 
				
			||||||
 * @LastEditTime: 2024-04-24 09:34:36
 | 
					 * @LastEditTime: 2024-04-26 10:44:00
 | 
				
			||||||
 * @LastEditors: zhp
 | 
					 * @LastEditors: zhp
 | 
				
			||||||
 * @Description:
 | 
					 * @Description:
 | 
				
			||||||
-->
 | 
					-->
 | 
				
			||||||
@@ -17,6 +17,12 @@
 | 
				
			|||||||
        </el-table-column>
 | 
					        </el-table-column>
 | 
				
			||||||
      </el-table-column>
 | 
					      </el-table-column>
 | 
				
			||||||
    </el-table>
 | 
					    </el-table>
 | 
				
			||||||
 | 
					    <el-table class="baseTable" :max-height="tableH" id="exportTableChild" :data="tableDataChild" style="width: 100%">
 | 
				
			||||||
 | 
					      <el-table-column v-for="item in tablePropsChild" :prop="item.prop" :label="item.label" align="center">
 | 
				
			||||||
 | 
					        <el-table-column v-for="it in item.children" :prop="it.prop" :label="it.label" align="center">
 | 
				
			||||||
 | 
					        </el-table-column>
 | 
				
			||||||
 | 
					      </el-table-column>
 | 
				
			||||||
 | 
					    </el-table>
 | 
				
			||||||
    <!-- <pagination :limit.sync="listQuery.pageSize" :page.sync="listQuery.pageNo" :total="listQuery.total"
 | 
					    <!-- <pagination :limit.sync="listQuery.pageSize" :page.sync="listQuery.pageNo" :total="listQuery.total"
 | 
				
			||||||
      @pagination="getDataList" /> -->
 | 
					      @pagination="getDataList" /> -->
 | 
				
			||||||
    <!-- <base-dialog
 | 
					    <!-- <base-dialog
 | 
				
			||||||
@@ -42,6 +48,37 @@ import {
 | 
				
			|||||||
import tableHeightMixin from '@/mixins/lb/tableHeightMixin';
 | 
					import tableHeightMixin from '@/mixins/lb/tableHeightMixin';
 | 
				
			||||||
import FileSaver from 'file-saver'
 | 
					import FileSaver from 'file-saver'
 | 
				
			||||||
import { parseTime } from '../../../core/mixins/code-filter';
 | 
					import { parseTime } from '../../../core/mixins/code-filter';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					const tablePropsChild = [
 | 
				
			||||||
 | 
					  {
 | 
				
			||||||
 | 
					    prop: '',
 | 
				
			||||||
 | 
					    label: '人工堆垛人员'
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  {
 | 
				
			||||||
 | 
					    prop: '',
 | 
				
			||||||
 | 
					    label: '规格mm'
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  {
 | 
				
			||||||
 | 
					    prop: '',
 | 
				
			||||||
 | 
					    label: '片数'
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  {
 | 
				
			||||||
 | 
					    prop: '',
 | 
				
			||||||
 | 
					    label: '规格mm'
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  {
 | 
				
			||||||
 | 
					    prop: '',
 | 
				
			||||||
 | 
					    label: '片数'
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  {
 | 
				
			||||||
 | 
					    prop: '',
 | 
				
			||||||
 | 
					    label: '规格mm'
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  {
 | 
				
			||||||
 | 
					    prop: '',
 | 
				
			||||||
 | 
					    label: '片数'
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					]
 | 
				
			||||||
// import { getList, } from "@/api/base/qualityScrapType";
 | 
					// import { getList, } from "@/api/base/qualityScrapType";
 | 
				
			||||||
const tableProps = [
 | 
					const tableProps = [
 | 
				
			||||||
  // {
 | 
					  // {
 | 
				
			||||||
@@ -121,14 +158,16 @@ export default {
 | 
				
			|||||||
        // deleteURL: deleteQualityHotMaterial,
 | 
					        // deleteURL: deleteQualityHotMaterial,
 | 
				
			||||||
        // exportURL: exportFactoryExcel,
 | 
					        // exportURL: exportFactoryExcel,
 | 
				
			||||||
      },
 | 
					      },
 | 
				
			||||||
 | 
					      tablePropsChild,
 | 
				
			||||||
      tableProps,
 | 
					      tableProps,
 | 
				
			||||||
      tableData: [],
 | 
					      tableData: [],
 | 
				
			||||||
 | 
					      tableDataChild:[],
 | 
				
			||||||
      mergeArr: [],//记录合并行数
 | 
					      mergeArr: [],//记录合并行数
 | 
				
			||||||
      pos: 0,
 | 
					      pos: 0,
 | 
				
			||||||
      listQuery: {
 | 
					      listQuery: {
 | 
				
			||||||
        startTime: undefined,
 | 
					        startTime: undefined,
 | 
				
			||||||
        endTime: undefined,
 | 
					        endTime: undefined,
 | 
				
			||||||
        lineId: null,
 | 
					        lineId: undefined,
 | 
				
			||||||
      },
 | 
					      },
 | 
				
			||||||
      formConfig: [
 | 
					      formConfig: [
 | 
				
			||||||
        // {
 | 
					        // {
 | 
				
			||||||
@@ -150,13 +189,13 @@ export default {
 | 
				
			|||||||
          type: 'datePicker',
 | 
					          type: 'datePicker',
 | 
				
			||||||
          label: '时间段',
 | 
					          label: '时间段',
 | 
				
			||||||
          dateType: 'daterange',
 | 
					          dateType: 'daterange',
 | 
				
			||||||
          format: 'yyyy-MM-dd HH:mm:ss',
 | 
					          format: 'yyyy-MM-dd',
 | 
				
			||||||
          valueFormat: "timestamp",
 | 
					          valueFormat: "timestamp",
 | 
				
			||||||
          rangeSeparator: '-',
 | 
					          rangeSeparator: '-',
 | 
				
			||||||
          startPlaceholder: '开始时间',
 | 
					          startPlaceholder: '开始时间',
 | 
				
			||||||
          endPlaceholder: '结束时间',
 | 
					          endPlaceholder: '结束时间',
 | 
				
			||||||
          param: 'checkTime',
 | 
					          param: 'checkTime',
 | 
				
			||||||
          defaultSelect: [Date.now() - 24 * 60 * 60 - 1000, Date.now()],
 | 
					          defaultSelect: [new Date(new Date(Date.now()).setHours(7, 0, 0, 0)).getTime(), new Date(new Date(Date.now()).setHours(6, 59, 59)).getTime() + 24 * 60 * 60 * 1000],
 | 
				
			||||||
          width: 350
 | 
					          width: 350
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
@@ -166,6 +205,7 @@ export default {
 | 
				
			|||||||
          labelField: 'name',
 | 
					          labelField: 'name',
 | 
				
			||||||
          valueField: 'id',
 | 
					          valueField: 'id',
 | 
				
			||||||
          param: 'lineId',
 | 
					          param: 'lineId',
 | 
				
			||||||
 | 
					          multiple:true,
 | 
				
			||||||
          filterable: true
 | 
					          filterable: true
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
@@ -193,9 +233,10 @@ export default {
 | 
				
			|||||||
  },
 | 
					  },
 | 
				
			||||||
  created() { },
 | 
					  created() { },
 | 
				
			||||||
  mounted() {
 | 
					  mounted() {
 | 
				
			||||||
    // this.formConfig[1].defaultSelect[]
 | 
					    // this.formConfig[1].defaultSelect[0] =
 | 
				
			||||||
    this.listQuery.startTime = this.formConfig[0].defaultSelect[0]
 | 
					    // this.formConfig[1].defaultSelect[0] =
 | 
				
			||||||
    this.listQuery.endTime = this.formConfig[0].defaultSelect[1]
 | 
					    this.listQuery.startTime = new Date(new Date(Date.now()).setHours(7, 0, 0, 0)).getTime()
 | 
				
			||||||
 | 
					    this.listQuery.endTime = new Date(new Date(Date.now()).setHours(6, 59, 59)).getTime() + 24 * 60 * 60 * 1000
 | 
				
			||||||
    // this.formConfig[0].defaultSelect[0] = Date.now()-24*60*60-1000
 | 
					    // this.formConfig[0].defaultSelect[0] = Date.now()-24*60*60-1000
 | 
				
			||||||
    this.getDataList()
 | 
					    this.getDataList()
 | 
				
			||||||
    this.getDict()
 | 
					    this.getDict()
 | 
				
			||||||
@@ -287,7 +328,36 @@ export default {
 | 
				
			|||||||
            //返回一个新创建的 Blob 对象,其内容由参数中给定的数组串联组成。
 | 
					            //返回一个新创建的 Blob 对象,其内容由参数中给定的数组串联组成。
 | 
				
			||||||
            new Blob([wbout], { type: "application/octet-stream" }),
 | 
					            new Blob([wbout], { type: "application/octet-stream" }),
 | 
				
			||||||
            //设置导出文件名称
 | 
					            //设置导出文件名称
 | 
				
			||||||
            "原片各线堆垛表.xlsx"
 | 
					            "切割堆垛日报.xlsx"
 | 
				
			||||||
 | 
					          );
 | 
				
			||||||
 | 
					        } catch (e) {
 | 
				
			||||||
 | 
					          if (typeof console !== "undefined") console.log(e, wbout);
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					        return wbout;
 | 
				
			||||||
 | 
					        //do something......
 | 
				
			||||||
 | 
					      })
 | 
				
			||||||
 | 
					      var xlsxParam = { raw: true };
 | 
				
			||||||
 | 
					      /* 从表生成工作簿对象 */
 | 
				
			||||||
 | 
					      import('xlsx').then(excel => {
 | 
				
			||||||
 | 
					        var wb = excel.utils.table_to_book(
 | 
				
			||||||
 | 
					          document.querySelector("#exportTableChild"),
 | 
				
			||||||
 | 
					          xlsxParam
 | 
				
			||||||
 | 
					        );
 | 
				
			||||||
 | 
					        /* 获取二进制字符串作为输出 */
 | 
				
			||||||
 | 
					        var wbout = excel.write(wb, {
 | 
				
			||||||
 | 
					          bookType: "xlsx",
 | 
				
			||||||
 | 
					          bookSST: true,
 | 
				
			||||||
 | 
					          type: "array",
 | 
				
			||||||
 | 
					        });
 | 
				
			||||||
 | 
					        try {
 | 
				
			||||||
 | 
					          FileSaver.saveAs(
 | 
				
			||||||
 | 
					            //Blob 对象表示一个不可变、原始数据的类文件对象。
 | 
				
			||||||
 | 
					            //Blob 表示的不一定是JavaScript原生格式的数据。
 | 
				
			||||||
 | 
					            //File 接口基于Blob,继承了 blob 的功能并将其扩展使其支持用户系统上的文件。
 | 
				
			||||||
 | 
					            //返回一个新创建的 Blob 对象,其内容由参数中给定的数组串联组成。
 | 
				
			||||||
 | 
					            new Blob([wbout], { type: "application/octet-stream" }),
 | 
				
			||||||
 | 
					            //设置导出文件名称
 | 
				
			||||||
 | 
					            "切割堆垛日报.xlsx"
 | 
				
			||||||
          );
 | 
					          );
 | 
				
			||||||
        } catch (e) {
 | 
					        } catch (e) {
 | 
				
			||||||
          if (typeof console !== "undefined") console.log(e, wbout);
 | 
					          if (typeof console !== "undefined") console.log(e, wbout);
 | 
				
			||||||
@@ -295,7 +365,6 @@ export default {
 | 
				
			|||||||
        return wbout;
 | 
					        return wbout;
 | 
				
			||||||
        //do something......
 | 
					        //do something......
 | 
				
			||||||
      })
 | 
					      })
 | 
				
			||||||
 | 
					 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    // otherMethods(val) {
 | 
					    // otherMethods(val) {
 | 
				
			||||||
    //   if (val.type === 'detail') {
 | 
					    //   if (val.type === 'detail') {
 | 
				
			||||||
@@ -395,8 +464,8 @@ export default {
 | 
				
			|||||||
          // this.listQuery.materialId = val.materialId ? val.materialId : undefined;
 | 
					          // this.listQuery.materialId = val.materialId ? val.materialId : undefined;
 | 
				
			||||||
          // this.listQuery.startTime = '1706144404000';
 | 
					          // this.listQuery.startTime = '1706144404000';
 | 
				
			||||||
          // this.listQuery.endTime = '1706230804000';
 | 
					          // this.listQuery.endTime = '1706230804000';
 | 
				
			||||||
          this.listQuery.startTime = val.checkTime ? val.checkTime[0] : undefined;
 | 
					          this.listQuery.startTime = val.checkTime ? new Date(new Date(val.checkTime[0]).setHours(7, 0, 0, 0)).getTime() : undefined;
 | 
				
			||||||
          this.listQuery.endTime = val.checkTime ? val.checkTime[1] : undefined;
 | 
					          this.listQuery.endTime = val.checkTime ? new Date(new Date(val.checkTime[1]).setHours(6, 59, 59)).getTime() + 24*60*60*1000 : undefined;
 | 
				
			||||||
          this.listQuery.lineId = val.lineId ? val.lineId : undefined
 | 
					          this.listQuery.lineId = val.lineId ? val.lineId : undefined
 | 
				
			||||||
          this.getDataList();
 | 
					          this.getDataList();
 | 
				
			||||||
          break;
 | 
					          break;
 | 
				
			||||||
@@ -425,6 +494,10 @@ export default {
 | 
				
			|||||||
};
 | 
					};
 | 
				
			||||||
</script>
 | 
					</script>
 | 
				
			||||||
<style scoped>
 | 
					<style scoped>
 | 
				
			||||||
 | 
					.baseTable {
 | 
				
			||||||
 | 
					  border-color: #D1D4DB;
 | 
				
			||||||
 | 
					  background-color: #F2F4F9;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
::v-deep.baseTable .el-table__body tr.current-row>td.el-table__cell {
 | 
					::v-deep.baseTable .el-table__body tr.current-row>td.el-table__cell {
 | 
				
			||||||
  background-color: #EAF1FC;
 | 
					  background-color: #EAF1FC;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,7 +1,7 @@
 | 
				
			|||||||
<!--
 | 
					<!--
 | 
				
			||||||
 * @Author: zhp
 | 
					 * @Author: zhp
 | 
				
			||||||
 * @Date: 2024-04-18 14:08:46
 | 
					 * @Date: 2024-04-18 14:08:46
 | 
				
			||||||
 * @LastEditTime: 2024-04-24 14:41:01
 | 
					 * @LastEditTime: 2024-04-26 09:10:53
 | 
				
			||||||
 * @LastEditors: zhp
 | 
					 * @LastEditors: zhp
 | 
				
			||||||
 * @Description:
 | 
					 * @Description:
 | 
				
			||||||
-->
 | 
					-->
 | 
				
			||||||
@@ -9,11 +9,11 @@
 | 
				
			|||||||
  <div class="app-container">
 | 
					  <div class="app-container">
 | 
				
			||||||
    <el-form :model="listQuery" :inline="true" ref="dataForm" class="blueTip">
 | 
					    <el-form :model="listQuery" :inline="true" ref="dataForm" class="blueTip">
 | 
				
			||||||
      <el-form-item label="时间" prop="startTime">
 | 
					      <el-form-item label="时间" prop="startTime">
 | 
				
			||||||
        <el-date-picker v-model="listQuery.startTime" value-format="timestamp" type="date" placeholder="选择日期">
 | 
					        <el-date-picker v-model="listQuery.startTime" value-format="yyyy-MM-dd HH:mm:ss" type="date" placeholder="选择日期">
 | 
				
			||||||
        </el-date-picker>
 | 
					        </el-date-picker>
 | 
				
			||||||
      </el-form-item>
 | 
					      </el-form-item>
 | 
				
			||||||
      <el-form-item label="产线" prop="productionLineId">
 | 
					      <el-form-item label="产线" prop="productionLineId">
 | 
				
			||||||
        <el-select v-model="listQuery.productionLineId" placeholder="请选择">
 | 
					        <el-select v-model="listQuery.productionLineId" placeholder="请选择" clearable>
 | 
				
			||||||
          <el-option v-for="item in lineList" :key="item.id" :label="item.name" :value="item.id">
 | 
					          <el-option v-for="item in lineList" :key="item.id" :label="item.name" :value="item.id">
 | 
				
			||||||
          </el-option>
 | 
					          </el-option>
 | 
				
			||||||
        </el-select>
 | 
					        </el-select>
 | 
				
			||||||
@@ -46,7 +46,10 @@
 | 
				
			|||||||
      </el-table-column>
 | 
					      </el-table-column>
 | 
				
			||||||
    </el-table> -->
 | 
					    </el-table> -->
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    <el-table class="baseTable" :data="tableData" style="width: 100%">
 | 
					    <el-table :header-cell-style="{
 | 
				
			||||||
 | 
					      background: '#F2F4F9',
 | 
				
			||||||
 | 
					      color: '#606266'
 | 
				
			||||||
 | 
					    }" class=" baseTable" :data="tableData" style="width: 100%">
 | 
				
			||||||
      <el-table-column label="时间" align="right" width="150">
 | 
					      <el-table-column label="时间" align="right" width="150">
 | 
				
			||||||
        <el-table-column prop="name" label="缺陷" width="120">
 | 
					        <el-table-column prop="name" label="缺陷" width="120">
 | 
				
			||||||
        </el-table-column>
 | 
					        </el-table-column>
 | 
				
			||||||
@@ -59,21 +62,6 @@
 | 
				
			|||||||
      </el-table-column> -->
 | 
					      </el-table-column> -->
 | 
				
			||||||
      <el-table-column v-for="(item, index) in codeList " :prop="item.prop" :label="item.label">
 | 
					      <el-table-column v-for="(item, index) in codeList " :prop="item.prop" :label="item.label">
 | 
				
			||||||
      </el-table-column>
 | 
					      </el-table-column>
 | 
				
			||||||
      <div slot="append" v-if="this.tableData.length != 0" style="text-align: center">
 | 
					 | 
				
			||||||
        <!--在此处添加你想要插入在表格最后一行的内容-->
 | 
					 | 
				
			||||||
        <el-col :span="8">
 | 
					 | 
				
			||||||
          人工监测人员
 | 
					 | 
				
			||||||
        </el-col>
 | 
					 | 
				
			||||||
        <el-col :span="8">
 | 
					 | 
				
			||||||
          <!-- {{  }} -->
 | 
					 | 
				
			||||||
        </el-col>
 | 
					 | 
				
			||||||
        <el-col :span="8">
 | 
					 | 
				
			||||||
          合计
 | 
					 | 
				
			||||||
        </el-col>
 | 
					 | 
				
			||||||
        <el-col :span="8">
 | 
					 | 
				
			||||||
          {{ sum }}
 | 
					 | 
				
			||||||
        </el-col>
 | 
					 | 
				
			||||||
      </div>
 | 
					 | 
				
			||||||
    </el-table>
 | 
					    </el-table>
 | 
				
			||||||
    <!-- <pagination :limit.sync="listQuery.pageSize" :page.sync="listQuery.pageNo" :total="listQuery.total"
 | 
					    <!-- <pagination :limit.sync="listQuery.pageSize" :page.sync="listQuery.pageNo" :total="listQuery.total"
 | 
				
			||||||
      @pagination="getDataList" /> -->
 | 
					      @pagination="getDataList" /> -->
 | 
				
			||||||
@@ -160,59 +148,59 @@ export default {
 | 
				
			|||||||
      radio:'晚班查询',
 | 
					      radio:'晚班查询',
 | 
				
			||||||
      lineList:[],
 | 
					      lineList:[],
 | 
				
			||||||
      codeList: [
 | 
					      codeList: [
 | 
				
			||||||
        {
 | 
					        // {
 | 
				
			||||||
          label: '19:00',
 | 
					        //   label: '19:00',
 | 
				
			||||||
          prop: 'num0'
 | 
					        //   prop: 'num0'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        },
 | 
					        // },
 | 
				
			||||||
        {
 | 
					        // {
 | 
				
			||||||
          label: '20:00',
 | 
					        //   label: '20:00',
 | 
				
			||||||
          prop: 'num1'
 | 
					        //   prop: 'num1'
 | 
				
			||||||
        },
 | 
					        // },
 | 
				
			||||||
        {
 | 
					        // {
 | 
				
			||||||
          label: '21:00',
 | 
					        //   label: '21:00',
 | 
				
			||||||
          prop: 'num2'
 | 
					        //   prop: 'num2'
 | 
				
			||||||
        },
 | 
					        // },
 | 
				
			||||||
        {
 | 
					        // {
 | 
				
			||||||
          label: '22:00',
 | 
					        //   label: '22:00',
 | 
				
			||||||
          prop: 'num3'
 | 
					        //   prop: 'num3'
 | 
				
			||||||
        },
 | 
					        // },
 | 
				
			||||||
        {
 | 
					        // {
 | 
				
			||||||
          label: '23:00',
 | 
					        //   label: '23:00',
 | 
				
			||||||
          prop: 'num4'
 | 
					        //   prop: 'num4'
 | 
				
			||||||
        },
 | 
					        // },
 | 
				
			||||||
        {
 | 
					        // {
 | 
				
			||||||
          label: '00:00',
 | 
					        //   label: '00:00',
 | 
				
			||||||
          prop: 'num5'
 | 
					        //   prop: 'num5'
 | 
				
			||||||
        },
 | 
					        // },
 | 
				
			||||||
        {
 | 
					        // {
 | 
				
			||||||
          label: '01:00',
 | 
					        //   label: '01:00',
 | 
				
			||||||
          prop: 'num6'
 | 
					        //   prop: 'num6'
 | 
				
			||||||
        },
 | 
					        // },
 | 
				
			||||||
        {
 | 
					        // {
 | 
				
			||||||
          label: '02:00',
 | 
					        //   label: '02:00',
 | 
				
			||||||
          prop: 'num7'
 | 
					        //   prop: 'num7'
 | 
				
			||||||
        },
 | 
					        // },
 | 
				
			||||||
        {
 | 
					        // {
 | 
				
			||||||
          label: '03:00',
 | 
					        //   label: '03:00',
 | 
				
			||||||
          prop: 'num8'
 | 
					        //   prop: 'num8'
 | 
				
			||||||
        },
 | 
					        // },
 | 
				
			||||||
        {
 | 
					        // {
 | 
				
			||||||
          label: '04:00',
 | 
					        //   label: '04:00',
 | 
				
			||||||
          prop: 'num9'
 | 
					        //   prop: 'num9'
 | 
				
			||||||
        },
 | 
					        // },
 | 
				
			||||||
        {
 | 
					        // {
 | 
				
			||||||
          label: '05:00',
 | 
					        //   label: '05:00',
 | 
				
			||||||
          prop: 'num10'
 | 
					        //   prop: 'num10'
 | 
				
			||||||
        },
 | 
					        // },
 | 
				
			||||||
        {
 | 
					        // {
 | 
				
			||||||
          label: '06:00',
 | 
					        //   label: '06:00',
 | 
				
			||||||
          prop: 'num11'
 | 
					        //   prop: 'num11'
 | 
				
			||||||
        },
 | 
					        // },
 | 
				
			||||||
        {
 | 
					        // {
 | 
				
			||||||
          label: '不良合计',
 | 
					        //   label: '不良合计',
 | 
				
			||||||
          prop: 'sum'
 | 
					        //   prop: 'sum'
 | 
				
			||||||
        }
 | 
					        // }
 | 
				
			||||||
      ],
 | 
					      ],
 | 
				
			||||||
      tableData: [],
 | 
					      tableData: [],
 | 
				
			||||||
      formConfig: [
 | 
					      formConfig: [
 | 
				
			||||||
@@ -226,7 +214,7 @@ export default {
 | 
				
			|||||||
          startPlaceholder: '开始时间',
 | 
					          startPlaceholder: '开始时间',
 | 
				
			||||||
          endPlaceholder: '结束时间',
 | 
					          endPlaceholder: '结束时间',
 | 
				
			||||||
          param: 'checkTime',
 | 
					          param: 'checkTime',
 | 
				
			||||||
          defaultSelect: [Date.now() - 24 * 60 * 60 - 1000, Date.now()],
 | 
					          defaultSelect: [Date.now() - 24 * 60 * 60*1000, Date.now()],
 | 
				
			||||||
          width: 350
 | 
					          width: 350
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
@@ -255,7 +243,7 @@ export default {
 | 
				
			|||||||
    // this.listQuery.startTime = this.formConfig[0].defaultSelect[0]
 | 
					    // this.listQuery.startTime = this.formConfig[0].defaultSelect[0]
 | 
				
			||||||
    // this.listQuery.endTime = this.formConfig[0].defaultSelect[1]
 | 
					    // this.listQuery.endTime = this.formConfig[0].defaultSelect[1]
 | 
				
			||||||
    // this.formConfig[0].defaultSelect[0] = Date.now()-24*60*60-1000
 | 
					    // this.formConfig[0].defaultSelect[0] = Date.now()-24*60*60-1000
 | 
				
			||||||
    this.listQuery.startTime = new Date(new Date().setHours(1, 9, 0, 0)).getTime()
 | 
					    this.listQuery.startTime = new Date()
 | 
				
			||||||
    this.getDataList()
 | 
					    this.getDataList()
 | 
				
			||||||
    this.getDict()
 | 
					    this.getDict()
 | 
				
			||||||
    // this.getSpanArr(this.tableData)
 | 
					    // this.getSpanArr(this.tableData)
 | 
				
			||||||
@@ -268,28 +256,12 @@ export default {
 | 
				
			|||||||
      this.lineList = res.data
 | 
					      this.lineList = res.data
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    // objectSpanMethod({ row, column, rowIndex, columnIndex }) {
 | 
					    // objectSpanMethod({ row, column, rowIndex, columnIndex }) {
 | 
				
			||||||
    //   let spanOneArr = [], concatOne = 0;
 | 
					    //   if (columnIndex === 1) {
 | 
				
			||||||
    //   this.tableData.map((item, index) => {
 | 
					    //     if (rowIndex === this.tableData.length-1) {
 | 
				
			||||||
    //     if (index === 0) {
 | 
					    //       return {
 | 
				
			||||||
    //       spanOneArr.push(1);
 | 
					    //         rowspan: 1,
 | 
				
			||||||
    //     } else {
 | 
					    //         colspan: 4
 | 
				
			||||||
    //       //第一列需合并相同内容的判断条件
 | 
					    //       }
 | 
				
			||||||
    //       if (item.className === this.tableData[index - 1].className) {
 | 
					 | 
				
			||||||
    //         spanOneArr[concatOne] += 1;
 | 
					 | 
				
			||||||
    //         spanOneArr.push(0);
 | 
					 | 
				
			||||||
    //       } else {
 | 
					 | 
				
			||||||
    //         spanOneArr.push(1);
 | 
					 | 
				
			||||||
    //         concatOne = index;
 | 
					 | 
				
			||||||
    //       };
 | 
					 | 
				
			||||||
    //     }
 | 
					 | 
				
			||||||
    //   });
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    //   if (columnIndex === 0) {
 | 
					 | 
				
			||||||
    //     const _row = spanOneArr[rowIndex];
 | 
					 | 
				
			||||||
    //     const _col = _row > 0 ? 1 : 0;
 | 
					 | 
				
			||||||
    //     return {
 | 
					 | 
				
			||||||
    //       rowspan: _row,
 | 
					 | 
				
			||||||
    //       colspan: _col
 | 
					 | 
				
			||||||
    //     }
 | 
					    //     }
 | 
				
			||||||
    //   }
 | 
					    //   }
 | 
				
			||||||
    // },
 | 
					    // },
 | 
				
			||||||
@@ -310,134 +282,7 @@ export default {
 | 
				
			|||||||
      return y + '-' + m + '-' + d + ' ' + h + ':' + minute + ':' + second;
 | 
					      return y + '-' + m + '-' + d + ' ' + h + ':' + minute + ':' + second;
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    handleGetClass(e) {
 | 
					    handleGetClass(e) {
 | 
				
			||||||
      let str = this.listQuery.startTime
 | 
					 | 
				
			||||||
      // console.log(str);
 | 
					 | 
				
			||||||
      this.listQuery.startTime = new Date(new Date(str).setHours(0, 7, 0, 0)).getTime()
 | 
					 | 
				
			||||||
      // console.log(startTime1)
 | 
					 | 
				
			||||||
      this.codeList = []
 | 
					 | 
				
			||||||
      if (e === '早班查询') {
 | 
					 | 
				
			||||||
        let arr = [
 | 
					 | 
				
			||||||
          {
 | 
					 | 
				
			||||||
            label: '07:00',
 | 
					 | 
				
			||||||
            prop:'num0'
 | 
					 | 
				
			||||||
          },
 | 
					 | 
				
			||||||
          {
 | 
					 | 
				
			||||||
            label: '08:00',
 | 
					 | 
				
			||||||
            prop: 'num1'
 | 
					 | 
				
			||||||
          },
 | 
					 | 
				
			||||||
          {
 | 
					 | 
				
			||||||
            label: '09:00',
 | 
					 | 
				
			||||||
            prop: 'num2'
 | 
					 | 
				
			||||||
          },
 | 
					 | 
				
			||||||
          {
 | 
					 | 
				
			||||||
            label: '10:00',
 | 
					 | 
				
			||||||
            prop: 'num3'
 | 
					 | 
				
			||||||
          },
 | 
					 | 
				
			||||||
          {
 | 
					 | 
				
			||||||
            label: '11:00',
 | 
					 | 
				
			||||||
            prop: 'num4'
 | 
					 | 
				
			||||||
          },
 | 
					 | 
				
			||||||
          {
 | 
					 | 
				
			||||||
            label: '12:00',
 | 
					 | 
				
			||||||
            prop: 'num5'
 | 
					 | 
				
			||||||
          },
 | 
					 | 
				
			||||||
          {
 | 
					 | 
				
			||||||
            label: '13:00',
 | 
					 | 
				
			||||||
            prop: 'num6'
 | 
					 | 
				
			||||||
          },
 | 
					 | 
				
			||||||
          {
 | 
					 | 
				
			||||||
            label: '14:00',
 | 
					 | 
				
			||||||
            prop: 'num7'
 | 
					 | 
				
			||||||
          },
 | 
					 | 
				
			||||||
          {
 | 
					 | 
				
			||||||
            label: '15:00',
 | 
					 | 
				
			||||||
            prop: 'num8'
 | 
					 | 
				
			||||||
          },
 | 
					 | 
				
			||||||
          {
 | 
					 | 
				
			||||||
            label: '16:00',
 | 
					 | 
				
			||||||
            prop: 'num9'
 | 
					 | 
				
			||||||
          },
 | 
					 | 
				
			||||||
          {
 | 
					 | 
				
			||||||
            label: '17:00',
 | 
					 | 
				
			||||||
            prop: 'num10'
 | 
					 | 
				
			||||||
          },
 | 
					 | 
				
			||||||
          {
 | 
					 | 
				
			||||||
            label: '18:00',
 | 
					 | 
				
			||||||
            prop: 'num11'
 | 
					 | 
				
			||||||
          },
 | 
					 | 
				
			||||||
          {
 | 
					 | 
				
			||||||
            label: '不良合计',
 | 
					 | 
				
			||||||
            prop: 'sum'
 | 
					 | 
				
			||||||
          }
 | 
					 | 
				
			||||||
        ]
 | 
					 | 
				
			||||||
        arr.forEach((ele,index) => [
 | 
					 | 
				
			||||||
          this.codeList.push(ele)
 | 
					 | 
				
			||||||
        ])
 | 
					 | 
				
			||||||
        this.getDataList()
 | 
					        this.getDataList()
 | 
				
			||||||
      } else {
 | 
					 | 
				
			||||||
        let str = this.listQuery.startTime
 | 
					 | 
				
			||||||
        // console.log(str);
 | 
					 | 
				
			||||||
        this.listQuery.startTime = new Date(new Date(str).setHours(0, 7, 0, 0)).getTime()
 | 
					 | 
				
			||||||
       let  arr = [
 | 
					 | 
				
			||||||
          {
 | 
					 | 
				
			||||||
           label: '19:00',
 | 
					 | 
				
			||||||
           prop: 'num0'
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
          },
 | 
					 | 
				
			||||||
          {
 | 
					 | 
				
			||||||
            label: '20:00',
 | 
					 | 
				
			||||||
            prop: 'num1'
 | 
					 | 
				
			||||||
          },
 | 
					 | 
				
			||||||
          {
 | 
					 | 
				
			||||||
            label: '21:00',
 | 
					 | 
				
			||||||
            prop: 'num2'
 | 
					 | 
				
			||||||
          },
 | 
					 | 
				
			||||||
          {
 | 
					 | 
				
			||||||
            label: '22:00',
 | 
					 | 
				
			||||||
            prop: 'num3'
 | 
					 | 
				
			||||||
          },
 | 
					 | 
				
			||||||
          {
 | 
					 | 
				
			||||||
            label: '23:00',
 | 
					 | 
				
			||||||
            prop: 'num4'
 | 
					 | 
				
			||||||
          },
 | 
					 | 
				
			||||||
          {
 | 
					 | 
				
			||||||
            label: '00:00',
 | 
					 | 
				
			||||||
            prop: 'num5'
 | 
					 | 
				
			||||||
          },
 | 
					 | 
				
			||||||
          {
 | 
					 | 
				
			||||||
            label: '01:00',
 | 
					 | 
				
			||||||
            prop: 'num6'
 | 
					 | 
				
			||||||
          },
 | 
					 | 
				
			||||||
          {
 | 
					 | 
				
			||||||
            label: '02:00',
 | 
					 | 
				
			||||||
            prop: 'num7'
 | 
					 | 
				
			||||||
          },
 | 
					 | 
				
			||||||
          {
 | 
					 | 
				
			||||||
            label: '03:00',
 | 
					 | 
				
			||||||
            prop: 'num8'
 | 
					 | 
				
			||||||
          },
 | 
					 | 
				
			||||||
          {
 | 
					 | 
				
			||||||
            label: '04:00',
 | 
					 | 
				
			||||||
            prop: 'num9'
 | 
					 | 
				
			||||||
          },
 | 
					 | 
				
			||||||
          {
 | 
					 | 
				
			||||||
            label: '05:00',
 | 
					 | 
				
			||||||
            prop: 'num10'
 | 
					 | 
				
			||||||
          },
 | 
					 | 
				
			||||||
          {
 | 
					 | 
				
			||||||
            label: '06:00',
 | 
					 | 
				
			||||||
            prop: 'num11'
 | 
					 | 
				
			||||||
         },
 | 
					 | 
				
			||||||
         {
 | 
					 | 
				
			||||||
           label: '不良合计',
 | 
					 | 
				
			||||||
           prop: 'sum'
 | 
					 | 
				
			||||||
         }
 | 
					 | 
				
			||||||
        ]
 | 
					 | 
				
			||||||
        arr.forEach((ele, index) => [
 | 
					 | 
				
			||||||
          this.codeList.push(ele)
 | 
					 | 
				
			||||||
        ])
 | 
					 | 
				
			||||||
        this.getDataList()
 | 
					 | 
				
			||||||
      }
 | 
					 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    handleExport() {
 | 
					    handleExport() {
 | 
				
			||||||
      // 处理查询参数
 | 
					      // 处理查询参数
 | 
				
			||||||
@@ -463,7 +308,7 @@ export default {
 | 
				
			|||||||
            //返回一个新创建的 Blob 对象,其内容由参数中给定的数组串联组成。
 | 
					            //返回一个新创建的 Blob 对象,其内容由参数中给定的数组串联组成。
 | 
				
			||||||
            new Blob([wbout], { type: "application/octet-stream" }),
 | 
					            new Blob([wbout], { type: "application/octet-stream" }),
 | 
				
			||||||
            //设置导出文件名称
 | 
					            //设置导出文件名称
 | 
				
			||||||
            "原片各线堆垛表.xlsx"
 | 
					            "全检检验记录.xlsx"
 | 
				
			||||||
          );
 | 
					          );
 | 
				
			||||||
        } catch (e) {
 | 
					        } catch (e) {
 | 
				
			||||||
          if (typeof console !== "undefined") console.log(e, wbout);
 | 
					          if (typeof console !== "undefined") console.log(e, wbout);
 | 
				
			||||||
@@ -484,28 +329,45 @@ export default {
 | 
				
			|||||||
    // },
 | 
					    // },
 | 
				
			||||||
    // 获取数据列表
 | 
					    // 获取数据列表
 | 
				
			||||||
    getDataList() {
 | 
					    getDataList() {
 | 
				
			||||||
      if (this.radio === '晚班查询') {
 | 
					      var str = null
 | 
				
			||||||
        let str = this.listQuery.startTime
 | 
					      if (this.radio == '晚班查询') {
 | 
				
			||||||
        // console.log(str);
 | 
					        console.log(this.radio);
 | 
				
			||||||
        this.listQuery.startTime = new Date(new Date(str).setHours(1, 9, 0, 0)).getTime()
 | 
					        str = new Date(new Date(this.listQuery.startTime).setHours(19, 0, 0, 0)).getTime()
 | 
				
			||||||
      } else {
 | 
					      } else {
 | 
				
			||||||
        let str = this.listQuery.startTime
 | 
					        str = new Date(new Date(this.listQuery.startTime).setHours(7, 0, 0, 0)).getTime()
 | 
				
			||||||
        // console.log(str);
 | 
					 | 
				
			||||||
        this.listQuery.startTime = new Date(new Date(str).setHours(0, 7, 0, 0)).getTime()
 | 
					 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
      this.dataListLoading = true;
 | 
					      // this.dataListLoading = true;
 | 
				
			||||||
      // this.listQuery.startTime = '1713197388000';
 | 
					      // this.listQuery.startTime = '1713197388000';
 | 
				
			||||||
      // this.listQuery.endTime = '1713254961000';
 | 
					      // this.listQuery.endTime = '1713254961000';
 | 
				
			||||||
      this.urlOptions.getDataListURL({
 | 
					      this.urlOptions.getDataListURL({
 | 
				
			||||||
        // productionLineId: '1696716506443354114',
 | 
					        // productionLineId: '1696716506443354114',
 | 
				
			||||||
        // startTime: '1705618800000'
 | 
					        // startTime: '1705618800000',
 | 
				
			||||||
        productionLineId: this.listQuery.productionLineId,
 | 
					        productionLineId: this.listQuery.productionLineId,
 | 
				
			||||||
        startTime:this.listQuery.startTime
 | 
					        startTime: str
 | 
				
			||||||
      },).then(res => {
 | 
					      },).then(res => {
 | 
				
			||||||
        let count = 0
 | 
					        let count = 0
 | 
				
			||||||
        let arr = []
 | 
					        let arr = []
 | 
				
			||||||
        console.log(res.data)
 | 
					        console.log(res.data)
 | 
				
			||||||
        this.sum = res.data.allSum
 | 
					
 | 
				
			||||||
 | 
					        res.data.timeStrList.push('不良合计')
 | 
				
			||||||
 | 
					        this.codeList = res.data.timeStrList.map((ele, index) => {
 | 
				
			||||||
 | 
					          if (ele === '不良合计') {
 | 
				
			||||||
 | 
					            return {
 | 
				
			||||||
 | 
					              label: ele,
 | 
				
			||||||
 | 
					              prop: 'sum'
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					          } else {
 | 
				
			||||||
 | 
					            return {
 | 
				
			||||||
 | 
					              label: ele,
 | 
				
			||||||
 | 
					              prop: 'num' + index
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					          }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        })
 | 
				
			||||||
 | 
					        console.log(this.codeList)
 | 
				
			||||||
 | 
					        // res.data.timeStrList.forEach((ele, index) => [
 | 
				
			||||||
 | 
					        //   this.codeList.push(ele)
 | 
				
			||||||
 | 
					        // ])
 | 
				
			||||||
        for (let i in res.data.qualityInspectionRecordReportLineVOMap) {
 | 
					        for (let i in res.data.qualityInspectionRecordReportLineVOMap) {
 | 
				
			||||||
          count ++,
 | 
					          count ++,
 | 
				
			||||||
          console.log(res.data.qualityInspectionRecordReportLineVOMap[i])
 | 
					          console.log(res.data.qualityInspectionRecordReportLineVOMap[i])
 | 
				
			||||||
@@ -526,130 +388,11 @@ export default {
 | 
				
			|||||||
        }
 | 
					        }
 | 
				
			||||||
        console.log(arr);
 | 
					        console.log(arr);
 | 
				
			||||||
        this.tableData = arr
 | 
					        this.tableData = arr
 | 
				
			||||||
        // console.log(res)
 | 
					        this.tableData.push({
 | 
				
			||||||
        // console.log(res.data)
 | 
					          name: '检验员',
 | 
				
			||||||
        // let arr = [
 | 
					          num11: '合计',
 | 
				
			||||||
        //   {
 | 
					          sum: res.data.allSum
 | 
				
			||||||
        //     classType: 1,
 | 
					        })
 | 
				
			||||||
        //     className: '白班(8:00-20:00)',
 | 
					 | 
				
			||||||
        //     'sj1': null,
 | 
					 | 
				
			||||||
        //     'sj2': null,
 | 
					 | 
				
			||||||
        //     'sj3': null,
 | 
					 | 
				
			||||||
        //     'sj4': null,
 | 
					 | 
				
			||||||
        //     'sj5': null,
 | 
					 | 
				
			||||||
        //     'sj7': null,
 | 
					 | 
				
			||||||
        //     'sj8': null,
 | 
					 | 
				
			||||||
        //     'sj10': null,
 | 
					 | 
				
			||||||
        //     'sj11': null,
 | 
					 | 
				
			||||||
        //     'sj12': null,
 | 
					 | 
				
			||||||
        //     'sj13': null,
 | 
					 | 
				
			||||||
        //     'sj14': null,
 | 
					 | 
				
			||||||
        //     putType: '投入数量'
 | 
					 | 
				
			||||||
        //   },
 | 
					 | 
				
			||||||
        //   {
 | 
					 | 
				
			||||||
        //     classType: 1,
 | 
					 | 
				
			||||||
        //     className: '白班(8:00-20:00)',
 | 
					 | 
				
			||||||
        //     'sj1': null,
 | 
					 | 
				
			||||||
        //     'sj2': null,
 | 
					 | 
				
			||||||
        //     'sj3': null,
 | 
					 | 
				
			||||||
        //     'sj4': null,
 | 
					 | 
				
			||||||
        //     'sj5': null,
 | 
					 | 
				
			||||||
        //     'sj7': null,
 | 
					 | 
				
			||||||
        //     'sj8': null,
 | 
					 | 
				
			||||||
        //     'sj10': null,
 | 
					 | 
				
			||||||
        //     'sj11': null,
 | 
					 | 
				
			||||||
        //     'sj12': null,
 | 
					 | 
				
			||||||
        //     'sj13': null,
 | 
					 | 
				
			||||||
        //     'sj14': null,
 | 
					 | 
				
			||||||
        //     putType: '投入次数'
 | 
					 | 
				
			||||||
        //   },
 | 
					 | 
				
			||||||
        //   {
 | 
					 | 
				
			||||||
        //     classType: 2,
 | 
					 | 
				
			||||||
        //     className: '夜班(20:00-8:00)',
 | 
					 | 
				
			||||||
        //     'sj1': null,
 | 
					 | 
				
			||||||
        //     'sj2': null,
 | 
					 | 
				
			||||||
        //     'sj3': null,
 | 
					 | 
				
			||||||
        //     'sj4': null,
 | 
					 | 
				
			||||||
        //     'sj5': null,
 | 
					 | 
				
			||||||
        //     'sj7': null,
 | 
					 | 
				
			||||||
        //     'sj8': null,
 | 
					 | 
				
			||||||
        //     'sj10': null,
 | 
					 | 
				
			||||||
        //     'sj11': null,
 | 
					 | 
				
			||||||
        //     'sj12': null,
 | 
					 | 
				
			||||||
        //     'sj13': null,
 | 
					 | 
				
			||||||
        //     'sj14': null,
 | 
					 | 
				
			||||||
        //     putType: '投入数量',
 | 
					 | 
				
			||||||
        //   },
 | 
					 | 
				
			||||||
        //   {
 | 
					 | 
				
			||||||
        //     classType: 2,
 | 
					 | 
				
			||||||
        //     className: '夜班(20:00-8:00)',
 | 
					 | 
				
			||||||
        //     'sj1': null,
 | 
					 | 
				
			||||||
        //     'sj2': null,
 | 
					 | 
				
			||||||
        //     'sj3': null,
 | 
					 | 
				
			||||||
        //     'sj4': null,
 | 
					 | 
				
			||||||
        //     'sj5': null,
 | 
					 | 
				
			||||||
        //     'sj7': null,
 | 
					 | 
				
			||||||
        //     'sj8': null,
 | 
					 | 
				
			||||||
        //     'sj10': null,
 | 
					 | 
				
			||||||
        //     'sj11': null,
 | 
					 | 
				
			||||||
        //     'sj12': null,
 | 
					 | 
				
			||||||
        //     'sj13': null,
 | 
					 | 
				
			||||||
        //     'sj14': null,
 | 
					 | 
				
			||||||
        //     putType: '投入次数',
 | 
					 | 
				
			||||||
        //   },
 | 
					 | 
				
			||||||
        //   {
 | 
					 | 
				
			||||||
        //     classType: 1,
 | 
					 | 
				
			||||||
        //     className: '全天',
 | 
					 | 
				
			||||||
        //     'sj1': null,
 | 
					 | 
				
			||||||
        //     'sj2': null,
 | 
					 | 
				
			||||||
        //     'sj3': null,
 | 
					 | 
				
			||||||
        //     'sj4': null,
 | 
					 | 
				
			||||||
        //     'sj5': null,
 | 
					 | 
				
			||||||
        //     'sj7': null,
 | 
					 | 
				
			||||||
        //     'sj8': null,
 | 
					 | 
				
			||||||
        //     'sj10': null,
 | 
					 | 
				
			||||||
        //     'sj11': null,
 | 
					 | 
				
			||||||
        //     'sj12': null,
 | 
					 | 
				
			||||||
        //     'sj13': null,
 | 
					 | 
				
			||||||
        //     'sj14': null,
 | 
					 | 
				
			||||||
        //     putType: '投入数量',
 | 
					 | 
				
			||||||
        //   },
 | 
					 | 
				
			||||||
        //   {
 | 
					 | 
				
			||||||
        //     classType: 2,
 | 
					 | 
				
			||||||
        //     className: '全天',
 | 
					 | 
				
			||||||
        //     'sj1': null,
 | 
					 | 
				
			||||||
        //     'sj2': null,
 | 
					 | 
				
			||||||
        //     'sj3': null,
 | 
					 | 
				
			||||||
        //     'sj4': null,
 | 
					 | 
				
			||||||
        //     'sj5': null,
 | 
					 | 
				
			||||||
        //     'sj7': null,
 | 
					 | 
				
			||||||
        //     'sj8': null,
 | 
					 | 
				
			||||||
        //     'sj10': null,
 | 
					 | 
				
			||||||
        //     'sj11': null,
 | 
					 | 
				
			||||||
        //     'sj12': null,
 | 
					 | 
				
			||||||
        //     'sj13': null,
 | 
					 | 
				
			||||||
        //     'sj14': null,
 | 
					 | 
				
			||||||
        //     putType: '投入次数',
 | 
					 | 
				
			||||||
        //   }
 | 
					 | 
				
			||||||
        // ]
 | 
					 | 
				
			||||||
        // res.data.forEach((ele) => {
 | 
					 | 
				
			||||||
        //   this.codeList.forEach((item) => {
 | 
					 | 
				
			||||||
        //     if (ele.classType === 1 && ele.code == item) {
 | 
					 | 
				
			||||||
        //       // console.log(arr[0][item])
 | 
					 | 
				
			||||||
        //       arr[0][item] = ele.putNum
 | 
					 | 
				
			||||||
        //       arr[1][item] = ele.useNum
 | 
					 | 
				
			||||||
        //     } else if (ele.classType === 2 && ele.code == item) {
 | 
					 | 
				
			||||||
        //       arr[2][item] = ele.putNum
 | 
					 | 
				
			||||||
        //       arr[3][item] = ele.useNum
 | 
					 | 
				
			||||||
        //     } else if (ele.classType === 3 && ele.code == item) {
 | 
					 | 
				
			||||||
        //       arr[4][item] = ele.putNum
 | 
					 | 
				
			||||||
        //       arr[5][item] = ele.useNum
 | 
					 | 
				
			||||||
        //     }
 | 
					 | 
				
			||||||
        //   })
 | 
					 | 
				
			||||||
        // })
 | 
					 | 
				
			||||||
        // // console.log(arr)
 | 
					 | 
				
			||||||
        // this.tableData = arr
 | 
					 | 
				
			||||||
        // this.dataListLoading = false;
 | 
					 | 
				
			||||||
      });
 | 
					      });
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    buttonClick(val) {
 | 
					    buttonClick(val) {
 | 
				
			||||||
@@ -670,6 +413,10 @@ export default {
 | 
				
			|||||||
};
 | 
					};
 | 
				
			||||||
</script>
 | 
					</script>
 | 
				
			||||||
<style scoped>
 | 
					<style scoped>
 | 
				
			||||||
 | 
					.baseTable {
 | 
				
			||||||
 | 
					  border-color: #D1D4DB;
 | 
				
			||||||
 | 
					  background-color: #F2F4F9;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
::v-deep.baseTable .el-table__body tr.current-row>td.el-table__cell {
 | 
					::v-deep.baseTable .el-table__body tr.current-row>td.el-table__cell {
 | 
				
			||||||
  background-color: #EAF1FC;
 | 
					  background-color: #EAF1FC;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -25,7 +25,7 @@ const tableProp1 = [
 | 
				
			|||||||
	{
 | 
						{
 | 
				
			||||||
		prop: 'lineName',
 | 
							prop: 'lineName',
 | 
				
			||||||
		label: '生产线',
 | 
							label: '生产线',
 | 
				
			||||||
		width: 110,
 | 
							width: 90,
 | 
				
			||||||
		fixed: true,
 | 
							fixed: true,
 | 
				
			||||||
	},
 | 
						},
 | 
				
			||||||
	{
 | 
						{
 | 
				
			||||||
@@ -71,6 +71,7 @@ export default {
 | 
				
			|||||||
					label: '产线',
 | 
										label: '产线',
 | 
				
			||||||
					selectOptions: [],
 | 
										selectOptions: [],
 | 
				
			||||||
					param: 'lineId',
 | 
										param: 'lineId',
 | 
				
			||||||
 | 
										multiple: true,
 | 
				
			||||||
				},
 | 
									},
 | 
				
			||||||
				{
 | 
									{
 | 
				
			||||||
					type: 'button',
 | 
										type: 'button',
 | 
				
			||||||
@@ -92,7 +93,7 @@ export default {
 | 
				
			|||||||
			queryParams: {
 | 
								queryParams: {
 | 
				
			||||||
				startTime: '',
 | 
									startTime: '',
 | 
				
			||||||
				endTime: '',
 | 
									endTime: '',
 | 
				
			||||||
				lineId: '',
 | 
									lineId: [],
 | 
				
			||||||
			},
 | 
								},
 | 
				
			||||||
			tableProp1,
 | 
								tableProp1,
 | 
				
			||||||
			tableProp: [],
 | 
								tableProp: [],
 | 
				
			||||||
@@ -108,8 +109,9 @@ export default {
 | 
				
			|||||||
		let start = moment().format('yyyy-MM-DD');
 | 
							let start = moment().format('yyyy-MM-DD');
 | 
				
			||||||
		let end = moment().format('yyyy-MM-DD');
 | 
							let end = moment().format('yyyy-MM-DD');
 | 
				
			||||||
		this.formConfig[0].defaultSelect = [start, end];
 | 
							this.formConfig[0].defaultSelect = [start, end];
 | 
				
			||||||
		this.queryParams.startTime = moment(start + ' 00:00:00').valueOf();
 | 
							this.queryParams.startTime =
 | 
				
			||||||
		this.queryParams.endTime = moment(end + ' 23:59:59').valueOf();
 | 
								moment(start + ' 00:00:00').valueOf() + 25200000;
 | 
				
			||||||
 | 
							this.queryParams.endTime = moment(end + ' 23:59:59').valueOf() + 25200000;
 | 
				
			||||||
		this.getList();
 | 
							this.getList();
 | 
				
			||||||
	},
 | 
						},
 | 
				
			||||||
	methods: {
 | 
						methods: {
 | 
				
			||||||
@@ -238,12 +240,10 @@ export default {
 | 
				
			|||||||
		buttonClick(val) {
 | 
							buttonClick(val) {
 | 
				
			||||||
			if (val.btnName === 'search') {
 | 
								if (val.btnName === 'search') {
 | 
				
			||||||
				if (val.timeVal && val.timeVal.length > 0) {
 | 
									if (val.timeVal && val.timeVal.length > 0) {
 | 
				
			||||||
					this.queryParams.startTime = moment(
 | 
										this.queryParams.startTime =
 | 
				
			||||||
						val.timeVal[0] + ' 00:00:00'
 | 
											moment(val.timeVal[0] + ' 00:00:00').valueOf() + 25200000;
 | 
				
			||||||
					).valueOf();
 | 
										this.queryParams.endTime =
 | 
				
			||||||
					this.queryParams.endTime = moment(
 | 
											moment(val.timeVal[1] + ' 23:59:59').valueOf() + 25200000;
 | 
				
			||||||
						val.timeVal[1] + ' 23:59:59'
 | 
					 | 
				
			||||||
					).valueOf();
 | 
					 | 
				
			||||||
				}
 | 
									}
 | 
				
			||||||
				this.queryParams.lineId = val.lineId;
 | 
									this.queryParams.lineId = val.lineId;
 | 
				
			||||||
				this.getList();
 | 
									this.getList();
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,7 +1,7 @@
 | 
				
			|||||||
<!--
 | 
					<!--
 | 
				
			||||||
 * @Author: zhp
 | 
					 * @Author: zhp
 | 
				
			||||||
 * @Date: 2024-04-18 10:01:33
 | 
					 * @Date: 2024-04-18 10:01:33
 | 
				
			||||||
 * @LastEditTime: 2024-04-24 09:56:20
 | 
					 * @LastEditTime: 2024-04-26 10:44:27
 | 
				
			||||||
 * @LastEditors: zhp
 | 
					 * @LastEditors: zhp
 | 
				
			||||||
 * @Description:
 | 
					 * @Description:
 | 
				
			||||||
-->
 | 
					-->
 | 
				
			||||||
@@ -56,7 +56,7 @@ const tableProps = [
 | 
				
			|||||||
  },
 | 
					  },
 | 
				
			||||||
  {
 | 
					  {
 | 
				
			||||||
    prop: 'equipmentName',
 | 
					    prop: 'equipmentName',
 | 
				
			||||||
    label: '',
 | 
					    label: '机械手名称',
 | 
				
			||||||
    width: '200'
 | 
					    width: '200'
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  {
 | 
					  {
 | 
				
			||||||
@@ -104,7 +104,7 @@ export default {
 | 
				
			|||||||
      listQuery: {
 | 
					      listQuery: {
 | 
				
			||||||
        startTime: undefined,
 | 
					        startTime: undefined,
 | 
				
			||||||
        endTime: undefined,
 | 
					        endTime: undefined,
 | 
				
			||||||
        lineId:null,
 | 
					        lineId:undefined,
 | 
				
			||||||
      },
 | 
					      },
 | 
				
			||||||
      formConfig: [
 | 
					      formConfig: [
 | 
				
			||||||
        // {
 | 
					        // {
 | 
				
			||||||
@@ -132,7 +132,7 @@ export default {
 | 
				
			|||||||
          startPlaceholder: '开始时间',
 | 
					          startPlaceholder: '开始时间',
 | 
				
			||||||
          endPlaceholder: '结束时间',
 | 
					          endPlaceholder: '结束时间',
 | 
				
			||||||
          param: 'checkTime',
 | 
					          param: 'checkTime',
 | 
				
			||||||
          defaultSelect: [Date.now() - 24 * 60 * 60 - 1000, Date.now()],
 | 
					          defaultSelect: [new Date(new Date(Date.now()).setHours(7, 0, 0, 0)).getTime() - 24 * 60 * 60 * 1000, new Date(new Date(Date.now()).setHours(6, 59, 59)).getTime()],
 | 
				
			||||||
          width: 350
 | 
					          width: 350
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
@@ -142,6 +142,7 @@ export default {
 | 
				
			|||||||
          labelField: 'name',
 | 
					          labelField: 'name',
 | 
				
			||||||
          valueField: 'id',
 | 
					          valueField: 'id',
 | 
				
			||||||
          param: 'lineId',
 | 
					          param: 'lineId',
 | 
				
			||||||
 | 
					          multiple:true,
 | 
				
			||||||
          filterable: true
 | 
					          filterable: true
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
@@ -170,8 +171,8 @@ export default {
 | 
				
			|||||||
  created() { },
 | 
					  created() { },
 | 
				
			||||||
  mounted() {
 | 
					  mounted() {
 | 
				
			||||||
    // this.formConfig[1].defaultSelect[]
 | 
					    // this.formConfig[1].defaultSelect[]
 | 
				
			||||||
    this.listQuery.startTime = this.formConfig[0].defaultSelect[0]
 | 
					    this.listQuery.startTime = new Date(new Date(Date.now()).setHours(7, 0, 0, 0)).getTime() - 24 * 60 * 60 * 1000
 | 
				
			||||||
    this.listQuery.endTime = this.formConfig[0].defaultSelect[1]
 | 
					    this.listQuery.endTime = new Date(new Date(Date.now()).setHours(6, 59, 59)).getTime()
 | 
				
			||||||
    // this.formConfig[0].defaultSelect[0] = Date.now()-24*60*60-1000
 | 
					    // this.formConfig[0].defaultSelect[0] = Date.now()-24*60*60-1000
 | 
				
			||||||
    this.getDataList()
 | 
					    this.getDataList()
 | 
				
			||||||
    this.getDict()
 | 
					    this.getDict()
 | 
				
			||||||
@@ -365,8 +366,8 @@ export default {
 | 
				
			|||||||
          // this.listQuery.materialId = val.materialId ? val.materialId : undefined;
 | 
					          // this.listQuery.materialId = val.materialId ? val.materialId : undefined;
 | 
				
			||||||
          // this.listQuery.startTime = '1706144404000';
 | 
					          // this.listQuery.startTime = '1706144404000';
 | 
				
			||||||
          // this.listQuery.endTime = '1706230804000';
 | 
					          // this.listQuery.endTime = '1706230804000';
 | 
				
			||||||
          this.listQuery.startTime = val.checkTime ? val.checkTime[0] : undefined;
 | 
					          this.listQuery.startTime = val.checkTime ? new Date(new Date(val.checkTime[0]).setHours(7, 0, 0, 0)).getTime() - 24 * 60 * 60 * 1000 : undefined;
 | 
				
			||||||
          this.listQuery.endTime = val.checkTime ? val.checkTime[1] : undefined;
 | 
					          this.listQuery.endTime = val.checkTime ? new Date(new Date(val.checkTime[1]).setHours(6, 59, 59)).getTime() : undefined;
 | 
				
			||||||
          this.listQuery.lineId = val.lineId ? val.lineId : undefined
 | 
					          this.listQuery.lineId = val.lineId ? val.lineId : undefined
 | 
				
			||||||
          this.getDataList();
 | 
					          this.getDataList();
 | 
				
			||||||
          break;
 | 
					          break;
 | 
				
			||||||
@@ -395,6 +396,11 @@ export default {
 | 
				
			|||||||
};
 | 
					};
 | 
				
			||||||
</script>
 | 
					</script>
 | 
				
			||||||
<style>
 | 
					<style>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					.baseTable {
 | 
				
			||||||
 | 
					  border-color: #D1D4DB;
 | 
				
			||||||
 | 
					  background-color: #F2F4F9;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
.baseTable .el-table__body tr.current-row>td.el-table__cell {
 | 
					.baseTable .el-table__body tr.current-row>td.el-table__cell {
 | 
				
			||||||
  background-color: #EAF1FC;
 | 
					  background-color: #EAF1FC;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,14 +1,14 @@
 | 
				
			|||||||
<!--
 | 
					<!--
 | 
				
			||||||
 * @Author: zhp
 | 
					 * @Author: zhp
 | 
				
			||||||
 * @Date: 2024-04-18 15:07:53
 | 
					 * @Date: 2024-04-18 15:07:53
 | 
				
			||||||
 * @LastEditTime: 2024-04-24 09:58:07
 | 
					 * @LastEditTime: 2024-04-26 10:44:41
 | 
				
			||||||
 * @LastEditors: zhp
 | 
					 * @LastEditors: zhp
 | 
				
			||||||
 * @Description:
 | 
					 * @Description:
 | 
				
			||||||
-->
 | 
					-->
 | 
				
			||||||
<template>
 | 
					<template>
 | 
				
			||||||
  <div class="app-container">
 | 
					  <div class="app-container">
 | 
				
			||||||
    <search-bar :formConfigs="formConfig" ref="searchBarForm" @headBtnClick="buttonClick" />
 | 
					    <search-bar :formConfigs="formConfig" ref="searchBarForm" @headBtnClick="buttonClick" />
 | 
				
			||||||
    <el-table :header-cell-style="{
 | 
					    <el-table :max-height="tableH" :header-cell-style="{
 | 
				
			||||||
      background: '#F2F4F9',
 | 
					      background: '#F2F4F9',
 | 
				
			||||||
      color: '#606266'
 | 
					      color: '#606266'
 | 
				
			||||||
    }" class="baseTable" border id="exportTable" :data="tableData" style="width: 100%" :span-method="objectSpanMethod">
 | 
					    }" class="baseTable" border id="exportTable" :data="tableData" style="width: 100%" :span-method="objectSpanMethod">
 | 
				
			||||||
@@ -40,6 +40,8 @@ import {
 | 
				
			|||||||
} from '@/api/report/qcReport';
 | 
					} from '@/api/report/qcReport';
 | 
				
			||||||
import tableHeightMixin from '@/mixins/lb/tableHeightMixin';
 | 
					import tableHeightMixin from '@/mixins/lb/tableHeightMixin';
 | 
				
			||||||
import FileSaver from 'file-saver'
 | 
					import FileSaver from 'file-saver'
 | 
				
			||||||
 | 
					// import tableHeightMixin from '@/mixins/lb/tableHeightMixin';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// import { getList, } from "@/api/base/qualityScrapType";
 | 
					// import { getList, } from "@/api/base/qualityScrapType";
 | 
				
			||||||
const tableProps = [
 | 
					const tableProps = [
 | 
				
			||||||
  // {
 | 
					  // {
 | 
				
			||||||
@@ -54,7 +56,7 @@ const tableProps = [
 | 
				
			|||||||
  },
 | 
					  },
 | 
				
			||||||
  {
 | 
					  {
 | 
				
			||||||
    prop: 'dataType',
 | 
					    prop: 'dataType',
 | 
				
			||||||
    label: '',
 | 
					    label: '类别',
 | 
				
			||||||
    width: '150',
 | 
					    width: '150',
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  {
 | 
					  {
 | 
				
			||||||
@@ -67,11 +69,16 @@ const tableProps = [
 | 
				
			|||||||
  },
 | 
					  },
 | 
				
			||||||
  {
 | 
					  {
 | 
				
			||||||
    prop: 'area',
 | 
					    prop: 'area',
 | 
				
			||||||
    label: '面积'
 | 
					    label: '面积(㎡)'
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  {
 | 
					  {
 | 
				
			||||||
    prop: 'rate',
 | 
					    prop: 'rate',
 | 
				
			||||||
    label: '占比%',
 | 
					    label: '占比(%)',
 | 
				
			||||||
 | 
					    // filter: (val) => val == false ? '不合格' : '合格',
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  {
 | 
				
			||||||
 | 
					    prop: 'rateSum',
 | 
				
			||||||
 | 
					    label: '综合成品率(%)',
 | 
				
			||||||
    // filter: (val) => val == false ? '不合格' : '合格',
 | 
					    // filter: (val) => val == false ? '不合格' : '合格',
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  // {
 | 
					  // {
 | 
				
			||||||
@@ -129,7 +136,7 @@ export default {
 | 
				
			|||||||
          startPlaceholder: '开始时间',
 | 
					          startPlaceholder: '开始时间',
 | 
				
			||||||
          endPlaceholder: '结束时间',
 | 
					          endPlaceholder: '结束时间',
 | 
				
			||||||
          param: 'checkTime',
 | 
					          param: 'checkTime',
 | 
				
			||||||
          defaultSelect: [Date.now() - 24 * 60 * 60 - 1000, Date.now()],
 | 
					          defaultSelect: [new Date(new Date(Date.now()).setHours(7, 0, 0, 0)).getTime() - 24 * 60 * 60 * 1000, new Date(new Date(Date.now()).setHours(6, 59, 59)).getTime()],
 | 
				
			||||||
          width: 350
 | 
					          width: 350
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
@@ -139,6 +146,7 @@ export default {
 | 
				
			|||||||
          labelField: 'name',
 | 
					          labelField: 'name',
 | 
				
			||||||
          valueField: 'id',
 | 
					          valueField: 'id',
 | 
				
			||||||
          param: 'lineId',
 | 
					          param: 'lineId',
 | 
				
			||||||
 | 
					          multiple:true,
 | 
				
			||||||
          filterable: true
 | 
					          filterable: true
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
@@ -167,8 +175,8 @@ export default {
 | 
				
			|||||||
  created() { },
 | 
					  created() { },
 | 
				
			||||||
  mounted() {
 | 
					  mounted() {
 | 
				
			||||||
    // this.formConfig[1].defaultSelect[]
 | 
					    // this.formConfig[1].defaultSelect[]
 | 
				
			||||||
    this.listQuery.startTime = this.formConfig[0].defaultSelect[0]
 | 
					    this.listQuery.startTime = new Date(new Date(Date.now()).setHours(7, 0, 0, 0)).getTime() - 24 * 60 * 60 * 1000
 | 
				
			||||||
    this.listQuery.endTime = this.formConfig[0].defaultSelect[1]
 | 
					    this.listQuery.endTime = new Date(new Date(Date.now()).setHours(6, 59, 59)).getTime()
 | 
				
			||||||
    // this.formConfig[0].defaultSelect[0] = Date.now()-24*60*60-1000
 | 
					    // this.formConfig[0].defaultSelect[0] = Date.now()-24*60*60-1000
 | 
				
			||||||
    this.getDataList()
 | 
					    this.getDataList()
 | 
				
			||||||
    this.getDict()
 | 
					    this.getDict()
 | 
				
			||||||
@@ -286,14 +294,15 @@ export default {
 | 
				
			|||||||
        // })
 | 
					        // })
 | 
				
			||||||
        this.tableData = response.data.map((ele) => {
 | 
					        this.tableData = response.data.map((ele) => {
 | 
				
			||||||
          return {
 | 
					          return {
 | 
				
			||||||
            dataType: ele.dataType == 1 ? '成品' : ele.dataType == 2 ? '取样' : '废版',
 | 
					            dataType: ele.dataType == 1 ? '成品' : ele.dataType == 2 ? '取样板' : ele.dataType == 4 ? '合计' : ele.dataType == 3 ? '废版' : '',
 | 
				
			||||||
            code: ele.code,
 | 
					            code: ele.code,
 | 
				
			||||||
            putNum: ele.putNum,
 | 
					            putNum: ele.putNum,
 | 
				
			||||||
            lineName: ele.lineName,
 | 
					            lineName: ele.lineName,
 | 
				
			||||||
            type: ele.type,
 | 
					            type: ele.type == '合计' ? '' : ele.type,
 | 
				
			||||||
            pieces: ele.pieces,
 | 
					            pieces: ele.pieces,
 | 
				
			||||||
            area: ele.area,
 | 
					            area: ele.area,
 | 
				
			||||||
            rate: (ele.rate * 100).toFixed(2)
 | 
					            rate: ele.lineName != '总计' &&  ele.rate ? (ele.rate * 100).toFixed(2) : '',
 | 
				
			||||||
 | 
					            rateSum: ele.lineName === '总计' ? (ele.rate * 100).toFixed(2) : ''
 | 
				
			||||||
            // useNum: ele.useNum,
 | 
					            // useNum: ele.useNum,
 | 
				
			||||||
            // num: ele.num,
 | 
					            // num: ele.num,
 | 
				
			||||||
            // size: typeof (ele.size)
 | 
					            // size: typeof (ele.size)
 | 
				
			||||||
@@ -357,8 +366,10 @@ export default {
 | 
				
			|||||||
          // this.listQuery.materialId = val.materialId ? val.materialId : undefined;
 | 
					          // this.listQuery.materialId = val.materialId ? val.materialId : undefined;
 | 
				
			||||||
          // this.listQuery.startTime = '1706144404000';
 | 
					          // this.listQuery.startTime = '1706144404000';
 | 
				
			||||||
          // this.listQuery.endTime = '1706230804000';
 | 
					          // this.listQuery.endTime = '1706230804000';
 | 
				
			||||||
          this.listQuery.startTime = val.checkTime ? val.checkTime[0] : undefined;
 | 
					          // this.listQuery.startTime = new Date(new Date(Date.now()).setHours(7, 0, 0, 0)).getTime() - 24 * 60 * 60 * 1000
 | 
				
			||||||
          this.listQuery.endTime = val.checkTime ? val.checkTime[1] : undefined;
 | 
					          // this.listQuery.endTime = new Date(new Date(Date.now()).setHours(6, 59, 59)).getTime()
 | 
				
			||||||
 | 
					          this.listQuery.startTime = val.checkTime ? new Date(new Date(val.checkTime[0]).setHours(7, 0, 0, 0)).getTime() - 24 * 60 * 60 * 1000 : undefined;
 | 
				
			||||||
 | 
					          this.listQuery.endTime = val.checkTime ? new Date(new Date(val.checkTime[1]).setHours(6, 59, 59)).getTime() : undefined;
 | 
				
			||||||
          this.listQuery.lineId = val.lineId ? val.lineId : undefined
 | 
					          this.listQuery.lineId = val.lineId ? val.lineId : undefined
 | 
				
			||||||
          this.getDataList();
 | 
					          this.getDataList();
 | 
				
			||||||
          break;
 | 
					          break;
 | 
				
			||||||
@@ -387,6 +398,10 @@ export default {
 | 
				
			|||||||
};
 | 
					};
 | 
				
			||||||
</script>
 | 
					</script>
 | 
				
			||||||
<style scoped>
 | 
					<style scoped>
 | 
				
			||||||
 | 
					.baseTable {
 | 
				
			||||||
 | 
					  border-color: #D1D4DB;
 | 
				
			||||||
 | 
					  background-color: #F2F4F9;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
::v-deep.baseTable .el-table__body tr.current-row>td.el-table__cell {
 | 
					::v-deep.baseTable .el-table__body tr.current-row>td.el-table__cell {
 | 
				
			||||||
  background-color: #EAF1FC;
 | 
					  background-color: #EAF1FC;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user