merge test
This commit is contained in:
		
							
								
								
									
										2
									
								
								.env.dev
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								.env.dev
									
									
									
									
									
								
							@@ -1,7 +1,7 @@
 | 
			
		||||
###
 | 
			
		||||
 # @Author: zhp
 | 
			
		||||
 # @Date: 2024-04-12 14:30:48
 | 
			
		||||
 # @LastEditTime: 2024-04-12 14:31:16
 | 
			
		||||
 # @LastEditTime: 2024-04-22 16:16:52
 | 
			
		||||
 # @LastEditors: zhp
 | 
			
		||||
 # @Description:
 | 
			
		||||
###
 | 
			
		||||
 
 | 
			
		||||
@@ -1,7 +1,7 @@
 | 
			
		||||
/*
 | 
			
		||||
 * @Author: zhp
 | 
			
		||||
 * @Date: 2024-04-18 09:27:54
 | 
			
		||||
 * @LastEditTime: 2024-04-18 16:00:59
 | 
			
		||||
 * @LastEditTime: 2024-04-22 16:21:26
 | 
			
		||||
 * @LastEditors: zhp
 | 
			
		||||
 * @Description:
 | 
			
		||||
 */
 | 
			
		||||
@@ -38,3 +38,27 @@ export function getAutoDailyData(data) {
 | 
			
		||||
    data: data
 | 
			
		||||
  })
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
export function getQualityRecordReport(data) {
 | 
			
		||||
  return request({
 | 
			
		||||
    url: 'base/quality-inspection-record/qualityRecordReport',
 | 
			
		||||
    method: 'post',
 | 
			
		||||
    data: data
 | 
			
		||||
  })
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
export function getProductChildData(data) {
 | 
			
		||||
  return request({
 | 
			
		||||
    url: 'base/report-auto-ydaily-det/list',
 | 
			
		||||
    method: 'post',
 | 
			
		||||
    data: data
 | 
			
		||||
  })
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
export function updateAutoDailyData(data) {
 | 
			
		||||
  return request({
 | 
			
		||||
    url: 'base/report-auto-daily/update',
 | 
			
		||||
    method: 'put',
 | 
			
		||||
    data: data
 | 
			
		||||
  })
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -1,7 +1,7 @@
 | 
			
		||||
<!--
 | 
			
		||||
 * @Author: zhp
 | 
			
		||||
 * @Date: 2024-01-29 16:50:26
 | 
			
		||||
 * @LastEditTime: 2024-04-16 13:44:14
 | 
			
		||||
 * @LastEditTime: 2024-04-22 09:42:45
 | 
			
		||||
 * @LastEditors: zhp
 | 
			
		||||
 * @Description:
 | 
			
		||||
-->
 | 
			
		||||
@@ -34,7 +34,7 @@
 | 
			
		||||
        </el-col>
 | 
			
		||||
 | 
			
		||||
        <el-col :style="{ margin: 8 + 'px' + ' 0' }" :span="8">
 | 
			
		||||
          <base-container :no-content-padding="true" :title="'产量及良率统计'" :size="'small'"
 | 
			
		||||
          <base-container :show-time="true" :no-content-padding="true" :title="'产量及良率统计'" :size="'small'"
 | 
			
		||||
            :title-icon="'energyMonitoring'">
 | 
			
		||||
            <!-- <div style="width: 45%;position: absolute; top: 3em; right: 3em;">
 | 
			
		||||
              <top-radio-group />
 | 
			
		||||
@@ -53,7 +53,8 @@
 | 
			
		||||
        </el-col>
 | 
			
		||||
 | 
			
		||||
        <el-col :style="{ margin: 8 + 'px' + ' 0' }" :span="8">
 | 
			
		||||
          <base-container :no-content-padding="true" :title="'ISRA 缺陷数据'" :size="'small'" :title-icon="'scrap'">
 | 
			
		||||
          <base-container :show-time="true" :no-content-padding="true" :title="'ISRA 缺陷数据'" :size="'small'"
 | 
			
		||||
            :title-icon="'scrap'">
 | 
			
		||||
            <!-- <base-table1 :page="1" :limit="999" :show-index="false" :table-config="ISRATableProps"
 | 
			
		||||
              :table-data="ISRAList" /> -->
 | 
			
		||||
            <ISRAChart ref="ISRAChart" />
 | 
			
		||||
@@ -64,8 +65,8 @@
 | 
			
		||||
 | 
			
		||||
      <el-row :style="{ padding: '0 ' + 9 + 'px' }" :gutter="10" type="flex" class="flex-1">
 | 
			
		||||
        <el-col :style="{ margin: 8 + 'px' + ' 0' }" :span="12">
 | 
			
		||||
          <base-container :no-content-padding="true" :height="256" :title="'废片 缺陷数据'" :size="'eqStatus'"
 | 
			
		||||
            :title-icon="'scrap'">
 | 
			
		||||
          <base-container :show-time="true" :no-content-padding="true" :height="256" :title="'废片 缺陷数据'"
 | 
			
		||||
            :size="'eqStatus'" :title-icon="'scrap'">
 | 
			
		||||
            <!-- <div style="width: 45%;position: absolute; top: 3em; right: 3em;">
 | 
			
		||||
              <top-radio-group />
 | 
			
		||||
            </div> -->
 | 
			
		||||
@@ -98,7 +99,8 @@
 | 
			
		||||
          </base-container>
 | 
			
		||||
        </el-col>
 | 
			
		||||
        <el-col :style="{ margin: 8 + 'px' + ' 0' }" :span="14">
 | 
			
		||||
          <base-container :height="318 + 338 + 16" :size="'eqStatus'" :title="'设备状态监控'" :title-icon="'eqMonitoring'">
 | 
			
		||||
          <base-container :show-time="false" :height="318 + 338 + 16" :size="'eqStatus'" :title="'设备状态监控'"
 | 
			
		||||
            :title-icon="'eqMonitoring'">
 | 
			
		||||
            <!-- <div style="width: 45%;position: absolute; top: 3em; right: 3em;">
 | 
			
		||||
              <top-radio-group />
 | 
			
		||||
            </div> -->
 | 
			
		||||
@@ -625,8 +627,8 @@ export default {
 | 
			
		||||
            `<span style="color:rgba(255,255,255,0.5)">${this.getSize(item.size) || ''}</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>`,
 | 
			
		||||
            `<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:#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>`
 | 
			
		||||
          ])
 | 
			
		||||
          this.cutConfig.data = cutArr
 | 
			
		||||
          // this.$nextTick(() => {
 | 
			
		||||
@@ -652,7 +654,7 @@ export default {
 | 
			
		||||
              wasteList.push(ele.wastArea)
 | 
			
		||||
              nameWasteList.push('缺陷面积:' + this.NumFormat(ele.wastArea) + '㎡')
 | 
			
		||||
              sumAreaList.push(ele.sumArea)
 | 
			
		||||
              yieldList.push(parseFloat((ele.yield * 100).toFixed(0)))
 | 
			
		||||
              yieldList.push(parseFloat((ele.yield * 100).toFixed(2)))
 | 
			
		||||
            })
 | 
			
		||||
            this.$nextTick(() => {
 | 
			
		||||
              this.$refs.firstPileChart.initChart(nameList, [topNameList[0]], [nameWasteList[0]], [productList[0]], [wasteList[0]])
 | 
			
		||||
 
 | 
			
		||||
@@ -170,11 +170,11 @@ export default {
 | 
			
		||||
              },
 | 
			
		||||
              formatter: (params) => {
 | 
			
		||||
                //调用自定义显示格式
 | 
			
		||||
                return this.getEqualNewlineString(params.value + " | " + params.percent.toFixed(0) + "%" + "\n" + params.name,10);
 | 
			
		||||
                return this.getEqualNewlineString(params.value + " | " + params.percent.toFixed(0) + "%");
 | 
			
		||||
              },
 | 
			
		||||
              textStyle: {            // 提示文字的样式
 | 
			
		||||
                // color: '#595959',
 | 
			
		||||
                fontSize: 18
 | 
			
		||||
                fontSize: 16
 | 
			
		||||
              }
 | 
			
		||||
            }
 | 
			
		||||
						},
 | 
			
		||||
 
 | 
			
		||||
@@ -2,7 +2,7 @@
 | 
			
		||||
 * @Author: gtz
 | 
			
		||||
 * @Date: 2022-01-19 15:58:17
 | 
			
		||||
 * @LastEditors: zhp
 | 
			
		||||
 * @LastEditTime: 2024-03-29 14:47:29
 | 
			
		||||
 * @LastEditTime: 2024-04-22 09:41:21
 | 
			
		||||
 * @Description: file content
 | 
			
		||||
 * @FilePath: \mt-bus-fe\src\views\OperationalOverview\components\baseContainer\index.vue
 | 
			
		||||
-->
 | 
			
		||||
@@ -30,7 +30,7 @@
 | 
			
		||||
        <!-- <span v-if="showTime" style="font-size: 20px;color:#52FFF8;margin-left: 10px;margin-top: 2px;">
 | 
			
		||||
          {{ time2 +'-'+ time }}
 | 
			
		||||
        </span> -->
 | 
			
		||||
        <span  style="font-size: 20px;color:#52FFF8;margin-left: 10px;margin-top: 2px;">
 | 
			
		||||
        <span v-if="showTime"  style="font-size: 20px;color:#52FFF8;margin-left: 10px;margin-top: 2px;">
 | 
			
		||||
          {{ startTime + '-' + endTime }}
 | 
			
		||||
        </span>
 | 
			
		||||
      </div>
 | 
			
		||||
@@ -56,6 +56,10 @@ export default {
 | 
			
		||||
      type: Boolean,
 | 
			
		||||
      default: true
 | 
			
		||||
    },
 | 
			
		||||
    showTime: {
 | 
			
		||||
      type: Boolean,
 | 
			
		||||
      default: true
 | 
			
		||||
    },
 | 
			
		||||
    noPadding: {
 | 
			
		||||
      type: Boolean,
 | 
			
		||||
      default: false
 | 
			
		||||
 
 | 
			
		||||
@@ -2,7 +2,7 @@
 | 
			
		||||
<!--
 | 
			
		||||
 * @Author: zhp
 | 
			
		||||
 * @Date: 2023-09-21 09:06:28
 | 
			
		||||
 * @LastEditTime: 2024-04-16 13:39:25
 | 
			
		||||
 * @LastEditTime: 2024-04-22 09:36:58
 | 
			
		||||
 * @LastEditors: zhp
 | 
			
		||||
 * @Description:
 | 
			
		||||
-->
 | 
			
		||||
@@ -97,7 +97,7 @@ export default {
 | 
			
		||||
               { offset: 0.3, color: '#1295FF' }
 | 
			
		||||
             ]),
 | 
			
		||||
             label: {
 | 
			
		||||
               show: true,		//开启显示
 | 
			
		||||
               show: false,		//开启显示
 | 
			
		||||
               position: 'top',	//在上方显示
 | 
			
		||||
               textStyle: {	    //数值样式
 | 
			
		||||
                 color: 'rgba(255,255,255,0.5)', // 坐标值得具体的颜色
 | 
			
		||||
 
 | 
			
		||||
@@ -1,7 +1,7 @@
 | 
			
		||||
<!--
 | 
			
		||||
 * @Author: zhp
 | 
			
		||||
 * @Date: 2023-12-27 13:54:52
 | 
			
		||||
 * @LastEditTime: 2024-04-16 13:16:34
 | 
			
		||||
 * @LastEditTime: 2024-04-19 15:43:08
 | 
			
		||||
 * @LastEditors: zhp
 | 
			
		||||
 * @Description:
 | 
			
		||||
-->
 | 
			
		||||
@@ -170,7 +170,7 @@ export default {
 | 
			
		||||
              let singleData = series.filter(function (item) {
 | 
			
		||||
                return item.name == name
 | 
			
		||||
              })
 | 
			
		||||
              return name + parseFloat((singleData[0].data * 100).toFixed(0)) + '%'
 | 
			
		||||
              return name + parseFloat((singleData[0].data * 100).toFixed(2)) + '%'
 | 
			
		||||
            },
 | 
			
		||||
            itemWidth: 12,
 | 
			
		||||
            itemHeight: 12,
 | 
			
		||||
 
 | 
			
		||||
@@ -2,7 +2,7 @@
 | 
			
		||||
 * @Author: zwq
 | 
			
		||||
 * @Date: 2021-07-19 15:18:30
 | 
			
		||||
 * @LastEditors: zhp
 | 
			
		||||
 * @LastEditTime: 2024-04-18 08:42:00
 | 
			
		||||
 * @LastEditTime: 2024-04-22 12:15:49
 | 
			
		||||
 * @Description:
 | 
			
		||||
-->
 | 
			
		||||
<template>
 | 
			
		||||
@@ -25,19 +25,19 @@
 | 
			
		||||
    <el-row class="container-main flex-col" type="flex">
 | 
			
		||||
      <el-row :style="{ padding: '0 ' + 9 + 'px' }" :gutter="15" type="flex" class="flex-1" style="height: 50%">
 | 
			
		||||
        <el-col :style="{ margin: 8 + 'px' + ' 0' }" :span="8" height="100%">
 | 
			
		||||
          <base-container :title="'设备报警'" :size="'small'" :height="318" :title-icon="'eqAlarm'">
 | 
			
		||||
          <base-container :show-time="true" :title="'设备报警'" :size="'small'" :height="318" :title-icon="'eqAlarm'">
 | 
			
		||||
            <dv-scroll-board class="eqTable" :config="eqConfig" style="width: 100%; height: 350px"
 | 
			
		||||
              ref="eqScrollBoard" />
 | 
			
		||||
          </base-container>
 | 
			
		||||
        </el-col>
 | 
			
		||||
        <el-col :style="{ margin: 8 + 'px' + ' 0' }" :span="8" height="100%">
 | 
			
		||||
          <base-container :title="'各工序缺陷汇总'" :size="'small'" :title-icon="'scrap'">
 | 
			
		||||
          <base-container :show-time="true" :title="'各工序缺陷汇总'" :size="'small'" :title-icon="'scrap'">
 | 
			
		||||
            <dv-scroll-board :config="processConfig" style="width: 100%; height: 350px" ref="processScrollBoard" />
 | 
			
		||||
          </base-container>
 | 
			
		||||
        </el-col>
 | 
			
		||||
 | 
			
		||||
        <el-col :style="{ margin: 8 + 'px' + ' 0' }" :span="8" height="100%">
 | 
			
		||||
          <base-container :height="318" :size="'small'" :title="'工单监控'" :title-icon="'eqMonitoring'">
 | 
			
		||||
          <base-container :show-time="true" :height="318" :size="'small'" :title="'工单监控'" :title-icon="'eqMonitoring'">
 | 
			
		||||
            <div class="order" style="width: 100%; overflow: hidden scroll; height: 350px">
 | 
			
		||||
              <el-row v-for="op in orderList" :key="op.id" style="margin-bottom: .5em;overflow: hidden;">
 | 
			
		||||
                <!-- <el-col :span="12"> -->
 | 
			
		||||
@@ -52,8 +52,7 @@
 | 
			
		||||
                  <span v-if="op.planQuantity" class="orderPlan" style="font-size: 14px;opacity: calc(.6);">{{
 | 
			
		||||
                    op.planQuantity }}</span>
 | 
			
		||||
                </span>
 | 
			
		||||
                <span v-if="op.actualQuantity" class="orderFinish"
 | 
			
		||||
                  style="font-size: 14px;margin-left: 130px;">{{
 | 
			
		||||
                <span v-if="op.actualQuantity" class="orderFinish" style="font-size: 14px;margin-left: 130px;">{{
 | 
			
		||||
                  op.actualQuantity
 | 
			
		||||
                  }}</span>
 | 
			
		||||
                <el-divider class="split" style="background-color: rgba(0, 255, 247, 1)" v-if="op.actualQuantity"
 | 
			
		||||
@@ -70,8 +69,8 @@
 | 
			
		||||
 | 
			
		||||
      <el-row :style="{ padding: '0 ' + 9 + 'px' }" :gutter="12" type="flex" class="flex-1">
 | 
			
		||||
        <el-col :style="{ margin: 8 + 'px' + ' 0' }" :span="12">
 | 
			
		||||
          <base-container :show-yes-time="true" :no-content-padding="true" :height="256" :size="'eqStatus'"
 | 
			
		||||
            :title="'能源监控'" :title-icon="'energyMonitoring'">
 | 
			
		||||
          <base-container :show-time="true" :show-yes-time="true" :no-content-padding="true" :height="256"
 | 
			
		||||
            :size="'eqStatus'" :title="'能源监控'" :title-icon="'energyMonitoring'">
 | 
			
		||||
            <el-row :gutter="9">
 | 
			
		||||
              <el-col :style="{ margin: 8 + 'px' + ' 0' }" :span="24">
 | 
			
		||||
                <linear-bar-chart ref="EnergyMonitoringChart" :name-list="EnergyMonitoringNameList"
 | 
			
		||||
@@ -81,7 +80,7 @@
 | 
			
		||||
          </base-container>
 | 
			
		||||
        </el-col>
 | 
			
		||||
        <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'">
 | 
			
		||||
            <div class="myLegend">
 | 
			
		||||
              <div class=" barCircleLegend"></div>
 | 
			
		||||
@@ -136,7 +135,7 @@ const qualityYearList = [
 | 
			
		||||
		name: '固化机',
 | 
			
		||||
		code: 'EQ20240110111700000201',
 | 
			
		||||
    status: '正常',
 | 
			
		||||
    error: 'true',
 | 
			
		||||
    error: false,
 | 
			
		||||
	},
 | 
			
		||||
	{
 | 
			
		||||
		name: '磨边清洗机',
 | 
			
		||||
@@ -148,7 +147,7 @@ const qualityYearList = [
 | 
			
		||||
		name: '预热机',
 | 
			
		||||
		code: 'EQ20240110111700000205',
 | 
			
		||||
		status: '故障',
 | 
			
		||||
    error: true,
 | 
			
		||||
    error: false,
 | 
			
		||||
	},
 | 
			
		||||
	{
 | 
			
		||||
		name: '下片机',
 | 
			
		||||
@@ -159,7 +158,7 @@ const qualityYearList = [
 | 
			
		||||
		name: '冷却机',
 | 
			
		||||
		code: 'EQ20240110111700000203',
 | 
			
		||||
    status: '正常',
 | 
			
		||||
    error: true,
 | 
			
		||||
    error: false,
 | 
			
		||||
	},
 | 
			
		||||
	{
 | 
			
		||||
		name: 'A储片机106',
 | 
			
		||||
@@ -177,7 +176,7 @@ const qualityYearList = [
 | 
			
		||||
		name: '二次磨边机',
 | 
			
		||||
		code: '	EQ20240110110927000181',
 | 
			
		||||
    status: '正常',
 | 
			
		||||
    error: true,
 | 
			
		||||
    error: false,
 | 
			
		||||
	},
 | 
			
		||||
	{
 | 
			
		||||
		name: '测试设备',
 | 
			
		||||
@@ -483,7 +482,7 @@ export default {
 | 
			
		||||
            </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 ' : '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>`,
 | 
			
		||||
      `<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;
 | 
			
		||||
    let data = [
 | 
			
		||||
 
 | 
			
		||||
@@ -1,7 +1,7 @@
 | 
			
		||||
<!--
 | 
			
		||||
 * @Author: zhp
 | 
			
		||||
 * @Date: 2024-01-24 15:15:24
 | 
			
		||||
 * @LastEditTime: 2024-04-18 16:49:31
 | 
			
		||||
 * @LastEditTime: 2024-04-22 16:14:19
 | 
			
		||||
 * @LastEditors: zhp
 | 
			
		||||
 * @Description:
 | 
			
		||||
-->
 | 
			
		||||
@@ -12,8 +12,7 @@
 | 
			
		||||
      </el-alert> -->
 | 
			
		||||
      <el-form :model="listQuery" :inline="true" ref="dataForm" class="blueTip">
 | 
			
		||||
        <el-form-item label="日" prop="time">
 | 
			
		||||
          <el-date-picker v-model="listQuery.time" value-format="timestamp" type="datetime"
 | 
			
		||||
            placeholder="选择日期">
 | 
			
		||||
          <el-date-picker v-model="listQuery.time" value-format="timestamp" type="datetime" placeholder="选择日期">
 | 
			
		||||
          </el-date-picker>
 | 
			
		||||
        </el-form-item>
 | 
			
		||||
        <el-form-item>
 | 
			
		||||
@@ -24,8 +23,15 @@
 | 
			
		||||
        </el-form-item>
 | 
			
		||||
      </el-form>
 | 
			
		||||
    </div>
 | 
			
		||||
    <inputTable :date="date" :data="tableData" :time="[startTimeStamp]" :sum="all" :type="listQuery.reportType"
 | 
			
		||||
      @refreshDataList="getDataList" />
 | 
			
		||||
    <el-col :span="16">
 | 
			
		||||
      <inputTable :date="date" :data="tableData" :time="[startTimeStamp]" :sum="all" :type="listQuery.reportType"
 | 
			
		||||
        @refreshDataList="getDataList" />
 | 
			
		||||
    </el-col>
 | 
			
		||||
    <el-col :span="8">
 | 
			
		||||
      <inputTableTwo :data="tableDataChild" :time="[startTimeStamp]" :sum="all" :type="listQuery.reportType"
 | 
			
		||||
        @refreshDataList="getDataList" />
 | 
			
		||||
    </el-col>
 | 
			
		||||
 | 
			
		||||
    <!-- <pagination
 | 
			
		||||
			:limit.sync="listQuery.pageSize"
 | 
			
		||||
			:page.sync="listQuery.pageNo"
 | 
			
		||||
@@ -36,18 +42,21 @@
 | 
			
		||||
 | 
			
		||||
<script>
 | 
			
		||||
// import { parseTime } from '../../core/mixins/code-filter';
 | 
			
		||||
import { getAutoDailyData } from '@/api/report/qcReport';
 | 
			
		||||
import { getAutoDailyData, getProductChildData } from '@/api/report/qcReport';
 | 
			
		||||
import inputTable from './inputTable.vue';
 | 
			
		||||
import inputTableTwo from './inputTableTwo.vue';
 | 
			
		||||
 | 
			
		||||
// import { getCorePLList } from '@/api/base/coreProductionLine';
 | 
			
		||||
import moment from 'moment'
 | 
			
		||||
import FileSaver from 'file-saver'
 | 
			
		||||
// import * as XLSX from 'xlsx'
 | 
			
		||||
export default {
 | 
			
		||||
  components: { inputTable },
 | 
			
		||||
  components: { inputTable, inputTableTwo },
 | 
			
		||||
  data() {
 | 
			
		||||
    return {
 | 
			
		||||
      urlOptions: {
 | 
			
		||||
        getDataListURL: getAutoDailyData,
 | 
			
		||||
        getChildDataListURL: getProductChildData,
 | 
			
		||||
        // exportURL: exportGlasscExcel
 | 
			
		||||
      },
 | 
			
		||||
      listQuery: {
 | 
			
		||||
@@ -62,6 +71,7 @@ export default {
 | 
			
		||||
      startTimeStamp: '',
 | 
			
		||||
      endTimeStamp: '',
 | 
			
		||||
      tableData: [],
 | 
			
		||||
      tableDataChild:[],
 | 
			
		||||
      proLineList: [],
 | 
			
		||||
      all: {}
 | 
			
		||||
    };
 | 
			
		||||
@@ -119,12 +129,45 @@ export default {
 | 
			
		||||
        console.log(res.data.datas);
 | 
			
		||||
        let arr = res.data.datas
 | 
			
		||||
        let obj = res.data.reportAutoYdailyRespVO
 | 
			
		||||
        obj.lineName = '合计'
 | 
			
		||||
        obj.lineName = '压延线产量合计'
 | 
			
		||||
        arr.push(obj)
 | 
			
		||||
        // this.tableData.push(res.data.reportAutoYdailyRespVO)
 | 
			
		||||
        this.tableData = arr
 | 
			
		||||
        this.listQuery.total = res.data.length;
 | 
			
		||||
        this.dataListLoading = false;
 | 
			
		||||
      })
 | 
			
		||||
      await this.urlOptions.getChildDataListURL(this.listQuery).then(res => {
 | 
			
		||||
        console.log(res.data.datas)
 | 
			
		||||
        // res.data.datas.sort((a, b) => {
 | 
			
		||||
        //   if (a['lineName'] != b['lineName']) {
 | 
			
		||||
        //     return a['lineName'].localeCompare(b['lineName']);
 | 
			
		||||
        //   }
 | 
			
		||||
        //   // if (a['groupClasses'] == '白班' && b['groupClasses'] == '夜班' ) {
 | 
			
		||||
        //   //   return a['groupClasses'].localeCompare(b['groupClasses']);
 | 
			
		||||
        //   // }
 | 
			
		||||
        //   // if (a['groupClasses'] == '夜班') {
 | 
			
		||||
        //   //   return a['groupClasses'].localeCompare(b['groupClasses']);
 | 
			
		||||
        //   // }
 | 
			
		||||
        // })
 | 
			
		||||
        console.log(res.data.datas);
 | 
			
		||||
        let arr = res.data.datas
 | 
			
		||||
        this.tableData.forEach(ele => {
 | 
			
		||||
          res.data.datas.forEach(item => {
 | 
			
		||||
            if (ele.lineName === item.lineName && item.groupClasses != '小计') {
 | 
			
		||||
              item.width = ele.width
 | 
			
		||||
              item.thick = ele.thick
 | 
			
		||||
              item.length = ele.length
 | 
			
		||||
            }
 | 
			
		||||
          });
 | 
			
		||||
        });
 | 
			
		||||
        let obj = res.data.reportAutoYdailyDetRespVO
 | 
			
		||||
        // obj.lineName = '合计'
 | 
			
		||||
        arr.push(obj)
 | 
			
		||||
        // this.tableChildData.push(res.data.reportAutoYdailyRespVO)
 | 
			
		||||
        this.tableDataChild = arr
 | 
			
		||||
        console.log(this.tableDataChild);
 | 
			
		||||
        // this.listQuery.total = res.data.length;
 | 
			
		||||
        this.dataListLoading = false;
 | 
			
		||||
      });
 | 
			
		||||
    },
 | 
			
		||||
    add0(m) {
 | 
			
		||||
 
 | 
			
		||||
@@ -1,7 +1,7 @@
 | 
			
		||||
<!--
 | 
			
		||||
 * @Author: zhp
 | 
			
		||||
 * @Date: 2024-04-18 15:49:48
 | 
			
		||||
 * @LastEditTime: 2024-04-18 16:30:42
 | 
			
		||||
 * @LastEditTime: 2024-04-22 16:15:08
 | 
			
		||||
 * @LastEditors: zhp
 | 
			
		||||
 * @Description:
 | 
			
		||||
-->
 | 
			
		||||
@@ -13,18 +13,21 @@
 | 
			
		||||
      <el-button v-if="edit" size="small" @click="handleReturn()">返回</el-button>
 | 
			
		||||
      <el-button v-if="edit" size="small" @click="updateData">保存</el-button>
 | 
			
		||||
    </el-row>
 | 
			
		||||
    <el-table :id="id" :data="data" border style="width: 100%">
 | 
			
		||||
    <el-table :span-method="objectSpanMethod" :id="id" :data="data" border style="width: 100%">
 | 
			
		||||
      <el-table-column v-for="(item, index) in cols" :key="index" :prop="item.prop" :label="item.label"
 | 
			
		||||
        :align="item.align ? item.align : 'left'">
 | 
			
		||||
 | 
			
		||||
        <el-table-column v-for="(it, index1) in item.children" :key="index1" :prop="it.prop" :label="it.label"
 | 
			
		||||
          :align="item.align ? item.align : 'left'">
 | 
			
		||||
          <template slot-scope="scope">
 | 
			
		||||
            <span v-if="!edit">{{ scope.row[it.prop] }}</span>
 | 
			
		||||
            <el-input @change="handleChange"
 | 
			
		||||
              :disabled="it.label == '生产线' || it.label == '良品重量(吨)' || it.label == '月累计面积'" v-else
 | 
			
		||||
              v-model="scope.row[it.prop]">
 | 
			
		||||
            </el-input>
 | 
			
		||||
          </template>
 | 
			
		||||
          <el-table-column v-for="(y, index2) in it.children" :key="index2" :prop="y.prop" :label="y.label">
 | 
			
		||||
            <template slot-scope="scope">
 | 
			
		||||
              <span v-if="!edit">{{ scope.row[y.prop] }}</span>
 | 
			
		||||
              <el-input type="number" @change="handleChange" :disabled="y.prop == 'dailyOutputTrend' || y.prop === 'originalGlassStatisticsTrend'
 | 
			
		||||
                 || y.prop === 'actualProductTrend' || y.prop === 'originalGlassPassTrend' || y.prop === 'originalGlassPassNow' || y.prop === 'originalGlassPassHis'
 | 
			
		||||
              " v-else v-model="scope.row[y.prop]"></el-input>
 | 
			
		||||
            </template>
 | 
			
		||||
 | 
			
		||||
          </el-table-column>
 | 
			
		||||
        </el-table-column>
 | 
			
		||||
      </el-table-column>
 | 
			
		||||
@@ -35,7 +38,8 @@
 | 
			
		||||
</template>
 | 
			
		||||
 | 
			
		||||
<script>
 | 
			
		||||
import { updateGlass, updateGlassRemark } from '@/api/report/glass';
 | 
			
		||||
import { updateAutoDailyData } from '@/api/report/qcReport';
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
const cols = [
 | 
			
		||||
  {
 | 
			
		||||
@@ -227,6 +231,45 @@ const cols = [
 | 
			
		||||
      // }
 | 
			
		||||
    },
 | 
			
		||||
  methods: {
 | 
			
		||||
    objectSpanMethod({ row, column, rowIndex, columnIndex }) {
 | 
			
		||||
      let spanOneArr = [], concatOne = 0;
 | 
			
		||||
      this.data.map((item, index) => {
 | 
			
		||||
        if (index === 0) {
 | 
			
		||||
          spanOneArr.push(1);
 | 
			
		||||
        } else {
 | 
			
		||||
          //第一列需合并相同内容的判断条件
 | 
			
		||||
          if (item.lineName === this.data[index - 1].lineName) {
 | 
			
		||||
            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
 | 
			
		||||
        }
 | 
			
		||||
      }
 | 
			
		||||
      // if (columnIndex  == 0  ) {
 | 
			
		||||
      //   // if (rowIndex == this.data.length-1) {
 | 
			
		||||
      //     // console.log(rowIndex)
 | 
			
		||||
      //     return {
 | 
			
		||||
      //       rowspan: this.data.length - 1,
 | 
			
		||||
      //       colspan: 3
 | 
			
		||||
      //     };
 | 
			
		||||
      //   // } else {
 | 
			
		||||
      //     // return {
 | 
			
		||||
      //     //   rowspan: 0,
 | 
			
		||||
      //     //   colspan: 0
 | 
			
		||||
      //     // };
 | 
			
		||||
      //   }
 | 
			
		||||
      // }
 | 
			
		||||
    },
 | 
			
		||||
    handleReturn() {
 | 
			
		||||
      this.edit = false
 | 
			
		||||
      console.log(this.$parent.getDataList());
 | 
			
		||||
@@ -234,19 +277,8 @@ const cols = [
 | 
			
		||||
    handleChange(e) {
 | 
			
		||||
    },
 | 
			
		||||
      updateData() {
 | 
			
		||||
        // let obj = {}
 | 
			
		||||
        // this.data.forEach((ele, index) => {
 | 
			
		||||
        //   if (ele.det === false) {
 | 
			
		||||
        //     this.data[index].lineId = ''
 | 
			
		||||
        //     this.data[index].remark = this.remark
 | 
			
		||||
        //     obj = ele
 | 
			
		||||
        //     delete this.data[index].dailyOutputTrend
 | 
			
		||||
        //     delete this.data[index].originalGlassStatisticsTrend
 | 
			
		||||
        //     delete this.data[index].actualProductTrend
 | 
			
		||||
        //     delete this.data[index].originalGlassPassTrend
 | 
			
		||||
        //     this.data.splice(index, 1)
 | 
			
		||||
        //   }
 | 
			
		||||
        // })
 | 
			
		||||
        let data = this.data.slice(0, -1)
 | 
			
		||||
        // console.log(obj)
 | 
			
		||||
        // let updateArr = this.data
 | 
			
		||||
        // updateArr.forEach((ele, index) => {
 | 
			
		||||
        //   delete ele.dailyOutputTrend
 | 
			
		||||
@@ -260,12 +292,12 @@ const cols = [
 | 
			
		||||
        //   delete ele.actualProductTrend
 | 
			
		||||
        //   delete ele.originalGlassPassTrend
 | 
			
		||||
        // });
 | 
			
		||||
        updateGlass(updateArr).then(response => {
 | 
			
		||||
          updateGlassRemark(obj).then(res => {
 | 
			
		||||
            this.$modal.msgSuccess("修改成功");
 | 
			
		||||
            this.edit = false;
 | 
			
		||||
            this.$emit("refreshDataList");
 | 
			
		||||
          });
 | 
			
		||||
        updateAutoDailyData(data).then(response => {
 | 
			
		||||
          // updateGlassRemark(obj).then(res => {
 | 
			
		||||
            this.$modal.msgSuccess("修改成功")
 | 
			
		||||
            this.edit = false
 | 
			
		||||
          //   this.$emit("refreshDataList");
 | 
			
		||||
          // });
 | 
			
		||||
        });
 | 
			
		||||
      }
 | 
			
		||||
    }
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										252
									
								
								src/views/report/Environmental/productionDayR/inputTableTwo.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										252
									
								
								src/views/report/Environmental/productionDayR/inputTableTwo.vue
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,252 @@
 | 
			
		||||
<!--
 | 
			
		||||
 * @Author: zhp
 | 
			
		||||
 * @Date: 2024-04-22 13:18:59
 | 
			
		||||
 * @LastEditTime: 2024-04-22 16:15:14
 | 
			
		||||
 * @LastEditors: zhp
 | 
			
		||||
 * @Description:
 | 
			
		||||
-->
 | 
			
		||||
<template>
 | 
			
		||||
  <div>
 | 
			
		||||
    <el-row style="float: right; margin-bottom: 5px">
 | 
			
		||||
      <!-- <el-button v-if="!edit && this.$auth.hasPermi('base:report-auto-original-glass:update')" :disabled="noData"
 | 
			
		||||
        size="small" @click="edit = true">编辑</el-button>
 | 
			
		||||
      <el-button v-if="edit" size="small" @click="handleReturn()">返回</el-button>
 | 
			
		||||
      <el-button v-if="edit" size="small" @click="updateData">保存</el-button> -->
 | 
			
		||||
    </el-row>
 | 
			
		||||
    <el-table style="margin-top:38px;width: 100%" :span-method="objectSpanMethod" :data="data" :id="id" border>
 | 
			
		||||
      <el-table-column v-for="(item, index) in cols" :key="index" :prop="item.prop" :label="item.label"
 | 
			
		||||
        :align="item.align ? item.align : 'left'">
 | 
			
		||||
        <el-table-column v-for="(it, index1) in item.children" :key="index1" :prop="it.prop" :label="it.label"
 | 
			
		||||
          :align="item.align ? item.align : 'left'">
 | 
			
		||||
          <el-table-column v-for="(y, index2) in it.children" :key="index2" :prop="y.prop" :label="y.label">
 | 
			
		||||
            <template slot-scope="scope">
 | 
			
		||||
              <span v-if="!edit">{{ scope.row[y.prop] }}</span>
 | 
			
		||||
              <el-input type="number" @change="handleChange" :disabled="false" v-else v-model="scope.row[y.prop]">
 | 
			
		||||
              </el-input>
 | 
			
		||||
            </template>
 | 
			
		||||
          </el-table-column>
 | 
			
		||||
        </el-table-column>
 | 
			
		||||
      </el-table-column>
 | 
			
		||||
    </el-table>
 | 
			
		||||
    <!-- <el-input type="textarea" v-model="remark" placeholder="备注" :disabled="!edit" :autosize="{ minRows: 2, maxRows: 6}">
 | 
			
		||||
    </el-input> -->
 | 
			
		||||
  </div>
 | 
			
		||||
</template>
 | 
			
		||||
 | 
			
		||||
<script>
 | 
			
		||||
import { updateGlass, updateGlassRemark } from '@/api/report/glass';
 | 
			
		||||
 | 
			
		||||
const cols = [
 | 
			
		||||
  {
 | 
			
		||||
		prop: 'xc',
 | 
			
		||||
    // label: '许昌安彩新能科技有限公司2024年4月份生产日报',
 | 
			
		||||
		align: 'center',
 | 
			
		||||
    children: [
 | 
			
		||||
      {
 | 
			
		||||
        prop: 'lineName',
 | 
			
		||||
        label: '产线',
 | 
			
		||||
      },
 | 
			
		||||
			{
 | 
			
		||||
        prop: 'groupClasses',
 | 
			
		||||
        label: '班次',
 | 
			
		||||
      },
 | 
			
		||||
      {
 | 
			
		||||
        prop: 'tractionSpeed',
 | 
			
		||||
        label: '拉引速度(米/分)',
 | 
			
		||||
      },
 | 
			
		||||
      {
 | 
			
		||||
        prop: 'width',
 | 
			
		||||
        label: '板宽(mm)',
 | 
			
		||||
      },
 | 
			
		||||
      {
 | 
			
		||||
        prop: 'weight',
 | 
			
		||||
        label: '板重(g)',
 | 
			
		||||
      },
 | 
			
		||||
      {
 | 
			
		||||
        prop: 'pullWeight',
 | 
			
		||||
        label: '拉引速度(吨/班)',
 | 
			
		||||
      },
 | 
			
		||||
      {
 | 
			
		||||
        prop: 'pullArea',
 | 
			
		||||
        label: '拉引面积(平方米)',
 | 
			
		||||
      },
 | 
			
		||||
			{
 | 
			
		||||
				prop: 'm',
 | 
			
		||||
        label: '尺寸(长、宽、厚)毫米',
 | 
			
		||||
        align: 'center',
 | 
			
		||||
        children: [
 | 
			
		||||
          {
 | 
			
		||||
            prop: 'length',
 | 
			
		||||
            label: '长',
 | 
			
		||||
          },
 | 
			
		||||
          {
 | 
			
		||||
            prop: 'width',
 | 
			
		||||
            label: '宽',
 | 
			
		||||
          },
 | 
			
		||||
          {
 | 
			
		||||
            prop: 'thick',
 | 
			
		||||
            label: '高',
 | 
			
		||||
          }
 | 
			
		||||
        ]
 | 
			
		||||
      }
 | 
			
		||||
		]
 | 
			
		||||
	}
 | 
			
		||||
]
 | 
			
		||||
  export default {
 | 
			
		||||
    props: {
 | 
			
		||||
      data: {
 | 
			
		||||
        type: Array,
 | 
			
		||||
        default: () => [],
 | 
			
		||||
      },
 | 
			
		||||
      id: {
 | 
			
		||||
        type: String,
 | 
			
		||||
        default:'exportTable'
 | 
			
		||||
      },
 | 
			
		||||
      time: {
 | 
			
		||||
        type: Array,
 | 
			
		||||
        default: () => [],
 | 
			
		||||
      },
 | 
			
		||||
      date: {
 | 
			
		||||
        type: String,
 | 
			
		||||
        default:''
 | 
			
		||||
      },
 | 
			
		||||
      sum: {
 | 
			
		||||
        type: Object,
 | 
			
		||||
        default: () => {},
 | 
			
		||||
      },
 | 
			
		||||
      type: {
 | 
			
		||||
        type: Number,
 | 
			
		||||
        default: 3,
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
    data() {
 | 
			
		||||
      return {
 | 
			
		||||
        cols,
 | 
			
		||||
        remark:null,
 | 
			
		||||
        edit: false,
 | 
			
		||||
        noData:false,
 | 
			
		||||
      };
 | 
			
		||||
    },
 | 
			
		||||
  watch: {
 | 
			
		||||
    data: {
 | 
			
		||||
      handler(newv, oldv) {
 | 
			
		||||
        if (newv.length != 0) {
 | 
			
		||||
          this.noData = false
 | 
			
		||||
        } else {
 | 
			
		||||
          this.noData = true
 | 
			
		||||
        }
 | 
			
		||||
      }
 | 
			
		||||
      },
 | 
			
		||||
      time: {
 | 
			
		||||
        immediate: true,
 | 
			
		||||
        handler(newv, oldv) {
 | 
			
		||||
          if (newv[0] !== '') {
 | 
			
		||||
            this.cols[0].label = this.date + '(' + newv[0] + '-' + newv[1] + ')'
 | 
			
		||||
          } else {
 | 
			
		||||
            this.cols[0].label = this.date
 | 
			
		||||
          }
 | 
			
		||||
        }
 | 
			
		||||
      },
 | 
			
		||||
      // type: {
 | 
			
		||||
      //   immediate: true,
 | 
			
		||||
      //   handler(newv, oldv) {
 | 
			
		||||
      //     let text1 = '', text2 = '', text3 = ''
 | 
			
		||||
      //     if (newv === 3) {
 | 
			
		||||
      //       text1 = '本周'
 | 
			
		||||
      //       text2 = '上周'
 | 
			
		||||
      //       text3 = '原片合计(片/周)'
 | 
			
		||||
      //     } else if (newv === 4) {
 | 
			
		||||
      //       text1 = '本月'
 | 
			
		||||
      //       text2 = '上月'
 | 
			
		||||
      //       text3 = '原片合计(片/月)'
 | 
			
		||||
      //     } else if (newv === 2) {
 | 
			
		||||
      //       text1 = '今日'
 | 
			
		||||
      //       text2 = '昨日'
 | 
			
		||||
      //       text3 = '原片合计(片/日)'
 | 
			
		||||
      //     } else {
 | 
			
		||||
      //       text1 = '本年'
 | 
			
		||||
      //       text2 = '上年'
 | 
			
		||||
      //       text3 = '原片合计(片/年)'
 | 
			
		||||
      //     }
 | 
			
		||||
      //     this.cols[0].children[1].children[0].label = text1
 | 
			
		||||
      //     this.cols[0].children[1].children[1].label = text2
 | 
			
		||||
      //     this.cols[0].children[2].children[0].label = text1
 | 
			
		||||
      //     this.cols[0].children[2].children[1].label = text2
 | 
			
		||||
      //     this.cols[0].children[3].children[0].label = text1
 | 
			
		||||
      //     this.cols[0].children[3].children[1].label = text2
 | 
			
		||||
      //     this.cols[0].children[4].children[0].label = text1
 | 
			
		||||
      //     this.cols[0].children[4].children[1].label = text2
 | 
			
		||||
      //     this.cols[0].children[2].label = text3
 | 
			
		||||
      //   }
 | 
			
		||||
      // }
 | 
			
		||||
    },
 | 
			
		||||
  methods: {
 | 
			
		||||
    objectSpanMethod({ row, column, rowIndex, columnIndex }) {
 | 
			
		||||
      let spanOneArr = [], concatOne = 0;
 | 
			
		||||
      this.data.map((item, index) => {
 | 
			
		||||
        if (index === 0) {
 | 
			
		||||
          spanOneArr.push(1);
 | 
			
		||||
        } else {
 | 
			
		||||
          //第一列需合并相同内容的判断条件
 | 
			
		||||
          if (item.lineName === this.data[index - 1].lineName) {
 | 
			
		||||
            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
 | 
			
		||||
        }
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
    handleReturn() {
 | 
			
		||||
      this.edit = false
 | 
			
		||||
      console.log(this.$parent.getDataList());
 | 
			
		||||
    },
 | 
			
		||||
    handleChange(e) {
 | 
			
		||||
    },
 | 
			
		||||
      updateData() {
 | 
			
		||||
        // let obj = {}
 | 
			
		||||
        // this.data.forEach((ele, index) => {
 | 
			
		||||
        //   if (ele.det === false) {
 | 
			
		||||
        //     this.data[index].lineId = ''
 | 
			
		||||
        //     this.data[index].remark = this.remark
 | 
			
		||||
        //     obj = ele
 | 
			
		||||
        //     delete this.data[index].dailyOutputTrend
 | 
			
		||||
        //     delete this.data[index].originalGlassStatisticsTrend
 | 
			
		||||
        //     delete this.data[index].actualProductTrend
 | 
			
		||||
        //     delete this.data[index].originalGlassPassTrend
 | 
			
		||||
        //     this.data.splice(index, 1)
 | 
			
		||||
        //   }
 | 
			
		||||
        // })
 | 
			
		||||
        // let updateArr = this.data
 | 
			
		||||
        // updateArr.forEach((ele, index) => {
 | 
			
		||||
        //   delete ele.dailyOutputTrend
 | 
			
		||||
        //   delete ele.originalGlassStatisticsTrend
 | 
			
		||||
        //   delete ele.actualProductTrend
 | 
			
		||||
        //   delete ele.originalGlassPassTrend
 | 
			
		||||
        // });
 | 
			
		||||
        // this.data.forEach((ele, index) => {
 | 
			
		||||
        //   delete ele.dailyOutputTrend
 | 
			
		||||
        //   delete ele.originalGlassStatisticsTrend
 | 
			
		||||
        //   delete ele.actualProductTrend
 | 
			
		||||
        //   delete ele.originalGlassPassTrend
 | 
			
		||||
        // });
 | 
			
		||||
        // updateGlass(updateArr).then(response => {
 | 
			
		||||
        //   updateGlassRemark(obj).then(res => {
 | 
			
		||||
        //     this.$modal.msgSuccess("修改成功");
 | 
			
		||||
        //     this.edit = false;
 | 
			
		||||
        //     this.$emit("refreshDataList");
 | 
			
		||||
        //   });
 | 
			
		||||
        // });
 | 
			
		||||
      }
 | 
			
		||||
    }
 | 
			
		||||
  };
 | 
			
		||||
</script>
 | 
			
		||||
@@ -1,7 +1,7 @@
 | 
			
		||||
<!--
 | 
			
		||||
 * @Author: zhp
 | 
			
		||||
 * @Date: 2024-04-18 14:08:46
 | 
			
		||||
 * @LastEditTime: 2024-04-19 10:53:21
 | 
			
		||||
 * @LastEditTime: 2024-04-22 08:42:07
 | 
			
		||||
 * @LastEditors: zhp
 | 
			
		||||
 * @Description:
 | 
			
		||||
-->
 | 
			
		||||
@@ -24,14 +24,18 @@
 | 
			
		||||
      </el-table-column>
 | 
			
		||||
    </el-table> -->
 | 
			
		||||
 | 
			
		||||
    <el-table :data="alldata" border style="width: 100%">
 | 
			
		||||
      <el-table-column prop="category" label="项目及分值" width="180">
 | 
			
		||||
    <el-table class="baseTable" :span-method="objectSpanMethod" :data="tableData" style="width: 100%">
 | 
			
		||||
      <el-table-column label="原料样式" align="right" width="150">
 | 
			
		||||
        <el-table-column prop="className" label="时间" width="120">
 | 
			
		||||
        </el-table-column>
 | 
			
		||||
      </el-table-column>
 | 
			
		||||
      <el-table-column prop label="参考标准及评价方法">
 | 
			
		||||
      <el-table-column prop="putType" label="" width="180">
 | 
			
		||||
      </el-table-column>
 | 
			
		||||
      <!-- <el-table-column prop label="参考标准及评价方法">
 | 
			
		||||
        <el-table-column prop="activityName"></el-table-column>
 | 
			
		||||
        <el-table-column prop="message"></el-table-column>
 | 
			
		||||
      </el-table-column>
 | 
			
		||||
      <el-table-column prop="value" label="参考分值">
 | 
			
		||||
      </el-table-column> -->
 | 
			
		||||
      <el-table-column v-for="(item,index) in codeList " :prop="item" :label="item">
 | 
			
		||||
      </el-table-column>
 | 
			
		||||
    </el-table>
 | 
			
		||||
    <!-- <pagination :limit.sync="listQuery.pageSize" :page.sync="listQuery.pageNo" :total="listQuery.total"
 | 
			
		||||
@@ -110,70 +114,13 @@ export default {
 | 
			
		||||
        // deleteURL: deleteQualityHotMaterial,
 | 
			
		||||
        // exportURL: exportFactoryExcel,
 | 
			
		||||
      },
 | 
			
		||||
      // tableProps,
 | 
			
		||||
      headers,
 | 
			
		||||
      // tableData: [
 | 
			
		||||
      //   {
 | 
			
		||||
      //     date: '2016-05-02',
 | 
			
		||||
      //     name: '王小虎',
 | 
			
		||||
      //     address: '上海市普陀区金沙江路 1518 弄'
 | 
			
		||||
      //   },
 | 
			
		||||
      //   {
 | 
			
		||||
      //     date: '2016-05-04',
 | 
			
		||||
      //     name: '王小虎',
 | 
			
		||||
      //     address: '上海市普陀区金沙江路 1517 弄'
 | 
			
		||||
      //   },
 | 
			
		||||
      //   {
 | 
			
		||||
      //     date: '2016-05-01',
 | 
			
		||||
      //     name: '王小虎',
 | 
			
		||||
      //     address: '上海市普陀区金沙江路 1519 弄'
 | 
			
		||||
      //   },
 | 
			
		||||
      //   {
 | 
			
		||||
      //     date: '2016-05-03',
 | 
			
		||||
      //     name: '王小虎',
 | 
			
		||||
      //     address: '上海市普陀区金沙江路 1516 弄'
 | 
			
		||||
      //   }
 | 
			
		||||
      // ],
 | 
			
		||||
      // tableData: [],
 | 
			
		||||
      codeList: ['sj1', 'sj2', 'sj3', 'sj4', 'sj5', 'sj7', 'sj8', 'sj10', 'sj11', 'sj12', 'sj13', 'sj14' ],
 | 
			
		||||
      tableData: [],
 | 
			
		||||
      listQuery: {
 | 
			
		||||
        startTime: undefined,
 | 
			
		||||
        endTime:undefined
 | 
			
		||||
      },
 | 
			
		||||
      originData: [{
 | 
			
		||||
        type: '选择题',
 | 
			
		||||
        num: '5题',
 | 
			
		||||
        average: '3分/题',
 | 
			
		||||
      },
 | 
			
		||||
      {
 | 
			
		||||
        type: '填空题',
 | 
			
		||||
        num: '5题',
 | 
			
		||||
        average: '3分/题',
 | 
			
		||||
      },
 | 
			
		||||
      {
 | 
			
		||||
        type: '选择题',
 | 
			
		||||
        num: '2题',
 | 
			
		||||
        average: '10分/题',
 | 
			
		||||
      }
 | 
			
		||||
      ],
 | 
			
		||||
      originTitle: ['题型', '数量', '均分'], // originTitle 该标题为 正常显示的标题, 数组中的顺序就是上面数据源对象中的字段标题对应的顺序
 | 
			
		||||
      transTitle: ['', '学生1', '学生2', '学生3'], // transTitle 该标题为转化后的标题, 注意多一列,  因为原来的标题变成了竖着显示了, 所以多一列标题, 第一个为空即可
 | 
			
		||||
      transData: [],
 | 
			
		||||
      formConfig: [
 | 
			
		||||
        // {
 | 
			
		||||
        // 	type: 'input',
 | 
			
		||||
        //   label: '报废原因',
 | 
			
		||||
        //   placeholder: '报废原因',
 | 
			
		||||
        //   param: 'content',
 | 
			
		||||
        // },
 | 
			
		||||
        // {
 | 
			
		||||
        //   type: 'select',
 | 
			
		||||
        //   label: '原料名称',
 | 
			
		||||
        //   selectOptions: [],
 | 
			
		||||
        //   labelField: 'name',
 | 
			
		||||
        //   valueField: 'id',
 | 
			
		||||
        //   param: 'materialId',
 | 
			
		||||
        //   filterable: true
 | 
			
		||||
        // },
 | 
			
		||||
        {
 | 
			
		||||
          type: 'datePicker',
 | 
			
		||||
          label: '时间段',
 | 
			
		||||
@@ -193,10 +140,6 @@ export default {
 | 
			
		||||
          name: 'search',
 | 
			
		||||
          color: 'primary',
 | 
			
		||||
        },
 | 
			
		||||
        // {
 | 
			
		||||
        //   type: this.$auth.hasPermi('base:quality-hot-material:create') ? 'separate' : '',
 | 
			
		||||
        //   // type: 'separate',
 | 
			
		||||
        // },
 | 
			
		||||
        {
 | 
			
		||||
          type:'button',
 | 
			
		||||
          btnName: '导出',
 | 
			
		||||
@@ -211,144 +154,6 @@ export default {
 | 
			
		||||
    // AddOrUpdate,
 | 
			
		||||
  },
 | 
			
		||||
  created() {
 | 
			
		||||
    var list = [
 | 
			
		||||
      {
 | 
			
		||||
        "id": "16EE8A54E6917F6479905CDC5B031F22",
 | 
			
		||||
        "activityPointsDOS": [
 | 
			
		||||
          {
 | 
			
		||||
            "id": "16EE8A54E0C17F647404A2DC7783EE88",
 | 
			
		||||
            "activityPointsDOS": [
 | 
			
		||||
              {
 | 
			
		||||
                "id": "1",
 | 
			
		||||
                "value": "6",
 | 
			
		||||
                "activityName": "坚定政治立场。",
 | 
			
		||||
                "message": " (1)牢固树立“四个意识”巴拉巴拉",
 | 
			
		||||
                "period": "19上半年"
 | 
			
		||||
              },
 | 
			
		||||
              {
 | 
			
		||||
                "id": "2",
 | 
			
		||||
                "value": "8",
 | 
			
		||||
                "activityName": "坚定政治立场。",
 | 
			
		||||
                "message": "(2)严格遵守政治纪律和政治规矩.巴拉啦",
 | 
			
		||||
                "period": "19上半年"
 | 
			
		||||
              }
 | 
			
		||||
            ],
 | 
			
		||||
            "activityName": "1. 坚定政治立场。(10分)"
 | 
			
		||||
          },
 | 
			
		||||
          {
 | 
			
		||||
            "id": "16EE8A54E4817F64779EF35CC6671C10",
 | 
			
		||||
            "activityPointsDOS": [
 | 
			
		||||
              {
 | 
			
		||||
                "id": "3",
 | 
			
		||||
                "value": "7",
 | 
			
		||||
                "activityName": "坚持学习提高。",
 | 
			
		||||
                "message": "(1)及时认真参加支部集体学习....",
 | 
			
		||||
                "period": "19上半年"
 | 
			
		||||
              },
 | 
			
		||||
              {
 | 
			
		||||
                "id": "4",
 | 
			
		||||
                "value": "3",
 | 
			
		||||
                "activityName": "坚持学习提高。",
 | 
			
		||||
                "message": "(2)每年集中学习培训....",
 | 
			
		||||
                "period": "19上半年"
 | 
			
		||||
              },
 | 
			
		||||
              {
 | 
			
		||||
                "id": "5",
 | 
			
		||||
                "value": "5",
 | 
			
		||||
                "activityName": "坚持学习提高。",
 | 
			
		||||
                "message": "(3)有取得更高....位",
 | 
			
		||||
                "period": "19上半年"
 | 
			
		||||
              }
 | 
			
		||||
            ],
 | 
			
		||||
            "activityName": "2.坚持学习提高。(6分)"
 | 
			
		||||
          },
 | 
			
		||||
          {
 | 
			
		||||
            "id": "16EE8A54E4817F64779EF35CC6671C10",
 | 
			
		||||
            "activityPointsDOS": [
 | 
			
		||||
              {
 | 
			
		||||
                "id": "6",
 | 
			
		||||
                "value": "7",
 | 
			
		||||
                "activityName": "严格组织生活。",
 | 
			
		||||
                "message": "(1)按季度.....",
 | 
			
		||||
                "period": "19上半年"
 | 
			
		||||
              },
 | 
			
		||||
              {
 | 
			
		||||
                "id": "7",
 | 
			
		||||
                "value": "3",
 | 
			
		||||
                "activityName": "严格组织生活。",
 | 
			
		||||
                "message": "(2)按时上党课.......。",
 | 
			
		||||
                "period": "19上半年"
 | 
			
		||||
              },
 | 
			
		||||
              {
 | 
			
		||||
                "id": "8",
 | 
			
		||||
                "value": "5",
 | 
			
		||||
                "activityName": "坚持学习提高。",
 | 
			
		||||
                "message": "(3)积极参加",
 | 
			
		||||
                "period": "19上半年"
 | 
			
		||||
              }
 | 
			
		||||
            ],
 | 
			
		||||
            "activityName": "3.严格组织生活。(13分)"
 | 
			
		||||
          }
 | 
			
		||||
        ],
 | 
			
		||||
        "category": "合格积分\r\n(40分)"
 | 
			
		||||
      },
 | 
			
		||||
      {
 | 
			
		||||
        "id": "16EE8A54FF617F6491391BD04A0D4E7F",
 | 
			
		||||
        "activityPointsDOS": [
 | 
			
		||||
          {
 | 
			
		||||
            "id": "16EE8A54EA517F647D257760897C805F",
 | 
			
		||||
            "activityPointsDOS": [
 | 
			
		||||
              {
 | 
			
		||||
                "id": "8",
 | 
			
		||||
                "value": "10",
 | 
			
		||||
                "activityName": "1.所在基层党组织情况。(10分)",
 | 
			
		||||
                "message": " (1) 根据所在.....",
 | 
			
		||||
                "period": "19上半年"
 | 
			
		||||
              }
 | 
			
		||||
            ],
 | 
			
		||||
            "activityName": "1.所在基层党组织情况。(10分)"
 | 
			
		||||
          },
 | 
			
		||||
          {
 | 
			
		||||
            "id": "16EE8A54E8517F647B3DE374CF0D6D93",
 | 
			
		||||
            "activityPointsDOS": [
 | 
			
		||||
              {
 | 
			
		||||
                "id": "10",
 | 
			
		||||
                "value": "3",
 | 
			
		||||
                "activityName": "2.年度评议、考核情况。(10分)",
 | 
			
		||||
                "message": " (1) 在党建....",
 | 
			
		||||
                "period": "19上半年"
 | 
			
		||||
              },
 | 
			
		||||
              {
 | 
			
		||||
                "id": "9",
 | 
			
		||||
                "value": "10",
 | 
			
		||||
                "activityName": "2.年度评议、考核情况。(10分)",
 | 
			
		||||
                "message": " (2)在年度.........................................................................",
 | 
			
		||||
                "period": "19上半年"
 | 
			
		||||
              }
 | 
			
		||||
            ],
 | 
			
		||||
            "activityName": "2.年度评议、考核情况。(10分)"
 | 
			
		||||
          }
 | 
			
		||||
        ],
 | 
			
		||||
        "category": "综合积分\r\n(20分)"
 | 
			
		||||
      }
 | 
			
		||||
    ];
 | 
			
		||||
    this.alldata = this.handleTableArr(list);
 | 
			
		||||
    let matrixData = this.originData.map((row) => {
 | 
			
		||||
      let arr = []
 | 
			
		||||
      for (let key in row) {
 | 
			
		||||
        console.log(row[key])
 | 
			
		||||
        arr.push(row[key])
 | 
			
		||||
      }
 | 
			
		||||
      return arr
 | 
			
		||||
    })
 | 
			
		||||
    console.log(matrixData)
 | 
			
		||||
    // 加入标题拼接最终的数据
 | 
			
		||||
    this.transData = matrixData[0].map((col, i) => {
 | 
			
		||||
      return [this.originTitle[i], ...matrixData.map((row) => {
 | 
			
		||||
        return row[i]
 | 
			
		||||
      })]
 | 
			
		||||
    })
 | 
			
		||||
    console.log(this.transData)
 | 
			
		||||
  },
 | 
			
		||||
  mounted() {
 | 
			
		||||
    // this.formConfig[1].defaultSelect[]
 | 
			
		||||
@@ -360,68 +165,6 @@ export default {
 | 
			
		||||
    // this.getDict();
 | 
			
		||||
  },
 | 
			
		||||
  methods: {
 | 
			
		||||
    handleTableArr(data) {
 | 
			
		||||
      let arr = [];
 | 
			
		||||
      for (let i = 0; i < data.length; i++) {
 | 
			
		||||
        let category_info = data[i];
 | 
			
		||||
        let activityPointsDOS = category_info["activityPointsDOS"];
 | 
			
		||||
        let count = 0;
 | 
			
		||||
        for (let j = 0; j < activityPointsDOS.length; j++) {
 | 
			
		||||
          let activityTwo_info = activityPointsDOS[j];
 | 
			
		||||
          let activityTwo_activityPointsDOS = activityPointsDOS[j]["activityPointsDOS"];
 | 
			
		||||
          for (let k = 0; k < activityTwo_activityPointsDOS.length; k++) {
 | 
			
		||||
            count++;
 | 
			
		||||
            let info = {
 | 
			
		||||
              // 确定每天数据的 合并行的数量
 | 
			
		||||
              span_num: k === 0 ? activityTwo_activityPointsDOS.length : 0,
 | 
			
		||||
              value: activityTwo_activityPointsDOS[k]["value"],
 | 
			
		||||
              message: activityTwo_activityPointsDOS[k]["message"],
 | 
			
		||||
              activityName: activityTwo_info["activityName"],
 | 
			
		||||
              category: category_info["category"],
 | 
			
		||||
            };
 | 
			
		||||
            arr.push(info);
 | 
			
		||||
          }
 | 
			
		||||
        }
 | 
			
		||||
        // 第一列的合并数量, 赋值给每个大项的第一个单元格. 比如合格积分要合并 8 行.
 | 
			
		||||
        arr[arr.length - count]["count"] = count;
 | 
			
		||||
      }
 | 
			
		||||
      return arr;
 | 
			
		||||
    },
 | 
			
		||||
    renderHeader(h, { column }) {
 | 
			
		||||
      // 隐藏表头内容
 | 
			
		||||
      column.realLabel = column.label;
 | 
			
		||||
      column.label = '';
 | 
			
		||||
      // 返回一个自定义的表头单元格
 | 
			
		||||
      return h('el-table-column', { props: { width: '50' } }, column.realLabel);
 | 
			
		||||
    },
 | 
			
		||||
    getSummaries(param) {
 | 
			
		||||
      console.log(columns)
 | 
			
		||||
 | 
			
		||||
      const { columns, data } = param;
 | 
			
		||||
      const sums = [];
 | 
			
		||||
      columns.forEach((column, index) => {
 | 
			
		||||
        if (index === 0) {
 | 
			
		||||
          sums[index] = '合计';
 | 
			
		||||
          return;
 | 
			
		||||
        }
 | 
			
		||||
        const values = data.map(item => Number(item[column.property]));
 | 
			
		||||
        if (!values.every(value => isNaN(value))) {
 | 
			
		||||
          sums[index] = values.reduce((prev, curr) => {
 | 
			
		||||
            const value = Number(curr);
 | 
			
		||||
            if (!isNaN(value)) {
 | 
			
		||||
              return prev + curr;
 | 
			
		||||
            } else {
 | 
			
		||||
              return prev;
 | 
			
		||||
            }
 | 
			
		||||
          }, 0);
 | 
			
		||||
          sums[index] += ' ';
 | 
			
		||||
        } else {
 | 
			
		||||
          sums[index] = '-';
 | 
			
		||||
        }
 | 
			
		||||
      });
 | 
			
		||||
 | 
			
		||||
      return sums;
 | 
			
		||||
    },
 | 
			
		||||
    objectSpanMethod({ row, column, rowIndex, columnIndex }) {
 | 
			
		||||
      let spanOneArr = [], concatOne = 0;
 | 
			
		||||
      this.tableData.map((item, index) => {
 | 
			
		||||
@@ -429,7 +172,7 @@ export default {
 | 
			
		||||
          spanOneArr.push(1);
 | 
			
		||||
        } else {
 | 
			
		||||
          //第一列需合并相同内容的判断条件
 | 
			
		||||
          if (item.code === this.tableData[index - 1].code) {
 | 
			
		||||
          if (item.className === this.tableData[index - 1].className) {
 | 
			
		||||
            spanOneArr[concatOne] += 1;
 | 
			
		||||
            spanOneArr.push(0);
 | 
			
		||||
          } else {
 | 
			
		||||
@@ -497,118 +240,139 @@ export default {
 | 
			
		||||
      this.listQuery.startTime = '1713197388000';
 | 
			
		||||
      this.listQuery.endTime = '1713254961000';
 | 
			
		||||
      this.urlOptions.getDataListURL(this.listQuery).then(res => {
 | 
			
		||||
        console.log(res);
 | 
			
		||||
        // this.getSpanArr(this.tableData)
 | 
			
		||||
        // res.data.forEach((ele) => {
 | 
			
		||||
        //   console.log(ele.size.substring(2, ele.size.length - 2))
 | 
			
		||||
        //   // console.log(Object.prototype.toString.call(ele.size))
 | 
			
		||||
        //   // // if (Object.prototype.toString.call(ele.size) === Array) {
 | 
			
		||||
        //   //   console.log(11111)
 | 
			
		||||
        //   //   console.log();
 | 
			
		||||
        //   // }
 | 
			
		||||
        // })
 | 
			
		||||
 | 
			
		||||
        console.log(res.data)
 | 
			
		||||
        this.tableData = res.data.map((ele) => {
 | 
			
		||||
          this.mechanism.push(ele.code)
 | 
			
		||||
          return {
 | 
			
		||||
            classType: ele.classType == 1 ? '白班' : ele.classType == 2 ? '夜班' : '合计',
 | 
			
		||||
            code: ele.code,
 | 
			
		||||
            putNum: ele.putNum,
 | 
			
		||||
            useNum: ele.useNum,
 | 
			
		||||
            // num: ele.num,
 | 
			
		||||
            // size: typeof (ele.size)
 | 
			
		||||
            // size: ele.size.match(/\[(.+?)\]/g) ? ele.size.substring(1, ele.size.length - 1) : ele.size
 | 
			
		||||
        // console.log(res)
 | 
			
		||||
        // console.log(res.data)
 | 
			
		||||
        let arr = [
 | 
			
		||||
          {
 | 
			
		||||
            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: '投入次数',
 | 
			
		||||
          }
 | 
			
		||||
        })
 | 
			
		||||
        for (let i = 0; i < this.tableData.length - 1; i++) {
 | 
			
		||||
          console.log(this.tableData[j].code.substr(this.tableData[j].code.length - 2, 1));
 | 
			
		||||
          // 二次循环,注意:再减去外层的循环次数,向后依次两两相互比较转换;
 | 
			
		||||
          for (let j = 0; j < this.tableData.length - i - 1; j++) {
 | 
			
		||||
            // 当前一个值大于后一个值
 | 
			
		||||
            if (this.tableData[j].code.substr(this.tableData[j].code.length - 2, 1) > this.tableData[j + 1].code.substr(this.tableData[j + 1].code.length - 2, 1)) {
 | 
			
		||||
              // 定义变量,以赋值的形式前后交换,直到换到最小的在前面,左右再无比较,则循环结束形成排序结果
 | 
			
		||||
              let temp = this.tableData[j];
 | 
			
		||||
              this.tableData[j] = this.tableData[j + 1];
 | 
			
		||||
              this.tableData[j + 1] = temp;
 | 
			
		||||
        ]
 | 
			
		||||
        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
 | 
			
		||||
            }
 | 
			
		||||
          }
 | 
			
		||||
        }
 | 
			
		||||
        // let obj = {}
 | 
			
		||||
        // res.data.reduce((prev, curr) => {
 | 
			
		||||
        //   console.log(prev, curr)
 | 
			
		||||
        // })
 | 
			
		||||
        // this.tableData.forEach((ele) => {
 | 
			
		||||
        //   ele.size.substring(2, ele.size.length - 2)
 | 
			
		||||
        //   // console.log(Object.prototype.toString.call(ele.size))
 | 
			
		||||
        //   // // if (Object.prototype.toString.call(ele.size) === Array) {
 | 
			
		||||
        //   //   console.log(11111)
 | 
			
		||||
        //   //   console.log();
 | 
			
		||||
        //   // }
 | 
			
		||||
        // })
 | 
			
		||||
        // let obj = {}
 | 
			
		||||
        // this.tableData.forEach(ele => {
 | 
			
		||||
        //   obj.num += ele.num
 | 
			
		||||
        //   obj.area += ele.num
 | 
			
		||||
        //   obj.count += ele.num
 | 
			
		||||
 | 
			
		||||
        // })
 | 
			
		||||
        // console.log(obj);
 | 
			
		||||
        // this.listQuery.total = res.data.total;
 | 
			
		||||
          })
 | 
			
		||||
        })
 | 
			
		||||
        // console.log(arr)
 | 
			
		||||
        this.tableData = arr
 | 
			
		||||
        this.dataListLoading = false;
 | 
			
		||||
      });
 | 
			
		||||
    },
 | 
			
		||||
    // deleteHandle(id, name, index, data) {
 | 
			
		||||
    //   this.$confirm(`确认要删除序号${index}?`, "提示", {
 | 
			
		||||
    //     confirmButtonText: "确定",
 | 
			
		||||
    //     cancelButtonText: "取消",
 | 
			
		||||
    //     type: "warning",
 | 
			
		||||
    //   })
 | 
			
		||||
    //     .then(() => {
 | 
			
		||||
    //       this.urlOptions.deleteURL(id).then(({ data }) => {
 | 
			
		||||
    //         this.$message({
 | 
			
		||||
    //           message: "操作成功",
 | 
			
		||||
    //           type: "success",
 | 
			
		||||
    //           duration: 1500,
 | 
			
		||||
    //           onClose: () => {
 | 
			
		||||
    //             this.getDataList();
 | 
			
		||||
    //           },
 | 
			
		||||
    //         });
 | 
			
		||||
    //       });
 | 
			
		||||
    //     })
 | 
			
		||||
    //     .catch(() => { });
 | 
			
		||||
    // },
 | 
			
		||||
    // async getDict() {
 | 
			
		||||
    //   // 物料列表
 | 
			
		||||
    //   const res = await getHotMaterialAllList();
 | 
			
		||||
    //   this.formConfig[0].selectOptions = res.data;
 | 
			
		||||
    // },
 | 
			
		||||
    buttonClick(val) {
 | 
			
		||||
      switch (val.btnName) {
 | 
			
		||||
        case 'search':
 | 
			
		||||
          // this.listQuery.pageNo = 1;
 | 
			
		||||
          // this.listQuery.pageSize = 20;
 | 
			
		||||
          // this.listQuery.materialId = val.materialId ? val.materialId : undefined;
 | 
			
		||||
          // this.listQuery.startTime = '1706144404000';
 | 
			
		||||
          // this.listQuery.endTime = '1706230804000';
 | 
			
		||||
          this.listQuery.startTime = val.checkTime ? val.checkTime[0] : undefined;
 | 
			
		||||
          this.listQuery.endTime = val.checkTime ? val.checkTime[1] : undefined;
 | 
			
		||||
          this.getDataList();
 | 
			
		||||
          break;
 | 
			
		||||
        // case 'reset':
 | 
			
		||||
        //   this.$refs.searchBarForm.resetForm();
 | 
			
		||||
        //   this.listQuery = {
 | 
			
		||||
        //     pageSize: 20,
 | 
			
		||||
        //     pageNo: 1,
 | 
			
		||||
        //     total: 1,
 | 
			
		||||
        //   };
 | 
			
		||||
        //   this.getDataList();
 | 
			
		||||
        //   break;
 | 
			
		||||
        // case 'add':
 | 
			
		||||
        //   this.addOrEditTitle = '新增';
 | 
			
		||||
        //   this.addOrUpdateVisible = true;
 | 
			
		||||
        //   this.addOrUpdateHandle();
 | 
			
		||||
        //   break;
 | 
			
		||||
        case 'export':
 | 
			
		||||
          this.handleExport();
 | 
			
		||||
          break;
 | 
			
		||||
@@ -619,24 +383,24 @@ export default {
 | 
			
		||||
  },
 | 
			
		||||
};
 | 
			
		||||
</script>
 | 
			
		||||
<style>
 | 
			
		||||
.baseTable .el-table__body tr.current-row>td.el-table__cell {
 | 
			
		||||
<style scoped>
 | 
			
		||||
::v-deep.baseTable .el-table__body tr.current-row>td.el-table__cell {
 | 
			
		||||
  background-color: #EAF1FC;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
.baseTable .el-table .el-table__cell {
 | 
			
		||||
::v-deep .baseTable .el-table .el-table__cell {
 | 
			
		||||
  padding: 0;
 | 
			
		||||
  height: 35px;
 | 
			
		||||
}
 | 
			
		||||
.el-table thead.is-group th {
 | 
			
		||||
::v-deep.el-table thead.is-group th {
 | 
			
		||||
  background: none;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
.el-table thead.is-group tr:first-of-type th:first-of-type {
 | 
			
		||||
::v-deep.el-table thead.is-group tr:first-of-type th:first-of-type {
 | 
			
		||||
  border-bottom: none;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
.el-table thead.is-group tr:first-of-type th:first-of-type:before {
 | 
			
		||||
::v-deep.el-table thead.is-group tr:first-of-type th:first-of-type:before {
 | 
			
		||||
  content: '';
 | 
			
		||||
  position: absolute;
 | 
			
		||||
  width: 1px;
 | 
			
		||||
@@ -652,7 +416,7 @@ export default {
 | 
			
		||||
  transform-origin: top;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
.el-table thead.is-group tr:last-of-type th:first-of-type:before {
 | 
			
		||||
::v-deep.el-table thead.is-group tr:last-of-type th:first-of-type:before {
 | 
			
		||||
  content: '';
 | 
			
		||||
  position: absolute;
 | 
			
		||||
  width: 1px;
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										435
									
								
								src/views/report/qcReport/fullInspection/index.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										435
									
								
								src/views/report/qcReport/fullInspection/index.vue
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,435 @@
 | 
			
		||||
<!--
 | 
			
		||||
 * @Author: zhp
 | 
			
		||||
 * @Date: 2024-04-18 14:08:46
 | 
			
		||||
 * @LastEditTime: 2024-04-22 17:10:49
 | 
			
		||||
 * @LastEditors: zhp
 | 
			
		||||
 * @Description:
 | 
			
		||||
-->
 | 
			
		||||
<template>
 | 
			
		||||
  <div class="app-container">
 | 
			
		||||
    <search-bar :formConfigs="formConfig" ref="searchBarForm" @headBtnClick="buttonClick" />
 | 
			
		||||
    <!-- <el-table show-summary :header-cell-style="{
 | 
			
		||||
      background: '#F2F4F9',
 | 
			
		||||
      color: '#606266'
 | 
			
		||||
    }" class="baseTable" :max-height="tableH" id="exportTable" :data="tableData" style="width: 100%"
 | 
			
		||||
      :span-method="objectSpanMethod">
 | 
			
		||||
      <el-table-column v-for="item in tableProps" :prop="item.prop" :label="item.label" align="center">
 | 
			
		||||
      </el-table-column>
 | 
			
		||||
    </el-table> -->
 | 
			
		||||
    <!-- <el-table border style="margin-top: 50px;" :data="transData">
 | 
			
		||||
      <el-table-column v-for="(item, index) in transTitle" :label="item" :key="index" align="center">
 | 
			
		||||
        <template slot-scope="scope">
 | 
			
		||||
          {{scope.row[index]}}
 | 
			
		||||
        </template>
 | 
			
		||||
      </el-table-column>
 | 
			
		||||
    </el-table> -->
 | 
			
		||||
 | 
			
		||||
    <el-table class="baseTable" :span-method="objectSpanMethod" :data="tableData" style="width: 100%">
 | 
			
		||||
      <el-table-column label="原料样式" align="right" width="150">
 | 
			
		||||
        <el-table-column prop="className" label="时间" width="120">
 | 
			
		||||
        </el-table-column>
 | 
			
		||||
      </el-table-column>
 | 
			
		||||
      <el-table-column prop="putType" label="" width="180">
 | 
			
		||||
      </el-table-column>
 | 
			
		||||
      <!-- <el-table-column prop label="参考标准及评价方法">
 | 
			
		||||
        <el-table-column prop="activityName"></el-table-column>
 | 
			
		||||
        <el-table-column prop="message"></el-table-column>
 | 
			
		||||
      </el-table-column> -->
 | 
			
		||||
      <el-table-column v-for="(item, index) in codeList " :prop="item" :label="item">
 | 
			
		||||
      </el-table-column>
 | 
			
		||||
    </el-table>
 | 
			
		||||
    <!-- <pagination :limit.sync="listQuery.pageSize" :page.sync="listQuery.pageNo" :total="listQuery.total"
 | 
			
		||||
      @pagination="getDataList" /> -->
 | 
			
		||||
    <!-- <base-dialog
 | 
			
		||||
			:dialogTitle="addOrEditTitle"
 | 
			
		||||
			:dialogVisible="addOrUpdateVisible"
 | 
			
		||||
			@cancel="handleCancel"
 | 
			
		||||
			@confirm="handleConfirm"
 | 
			
		||||
			:before-close="handleCancel"
 | 
			
		||||
			width="30%"> -->
 | 
			
		||||
    <!-- <add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList" /> -->
 | 
			
		||||
    <!-- </base-dialog> -->
 | 
			
		||||
  </div>
 | 
			
		||||
</template>
 | 
			
		||||
 | 
			
		||||
<script>
 | 
			
		||||
// import AddOrUpdate from './add-or-updata';
 | 
			
		||||
// import basicPage from '../../../core/mixins/basic-page';
 | 
			
		||||
// import { parseTime } from '../../../core/mixins/code-filter';
 | 
			
		||||
import {
 | 
			
		||||
  getQualityRecordReport
 | 
			
		||||
} from '@/api/report/qcReport';
 | 
			
		||||
import tableHeightMixin from '@/mixins/lb/tableHeightMixin';
 | 
			
		||||
import FileSaver from 'file-saver'
 | 
			
		||||
// import { getList, } from "@/api/base/qualityScrapType";
 | 
			
		||||
const headers = [
 | 
			
		||||
  // {
 | 
			
		||||
  //   prop: 'createTime',
 | 
			
		||||
  //   label: '添加时间',
 | 
			
		||||
  //   filter: parseTime
 | 
			
		||||
  // },
 | 
			
		||||
  {
 | 
			
		||||
    prop: 'classType',
 | 
			
		||||
    label: '时间'
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    prop: 'equipmentName',
 | 
			
		||||
    label: ''
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    prop: 'num',
 | 
			
		||||
    label: '片数'
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    prop: 'area',
 | 
			
		||||
    label: '面积'
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    prop: 'countNum',
 | 
			
		||||
    label: '托数',
 | 
			
		||||
    // filter: (val) => val == false ? '不合格' : '合格',
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    prop: 'size',
 | 
			
		||||
    label: '规格',
 | 
			
		||||
    // filter: (val) => val == 1 ? 'A' : val == 2 ? 'B' : 'C',
 | 
			
		||||
  },
 | 
			
		||||
  // {
 | 
			
		||||
  //   prop: 'checkerName',
 | 
			
		||||
  //   label: '检测人员'
 | 
			
		||||
  // },
 | 
			
		||||
  // {
 | 
			
		||||
  //   prop: 'checkTime',
 | 
			
		||||
  //   label: '检测时间',
 | 
			
		||||
  //   filter: parseTime
 | 
			
		||||
  // },
 | 
			
		||||
];
 | 
			
		||||
 | 
			
		||||
export default {
 | 
			
		||||
  mixins: [tableHeightMixin],
 | 
			
		||||
  data() {
 | 
			
		||||
    return {
 | 
			
		||||
      urlOptions: {
 | 
			
		||||
        getDataListURL: getQualityRecordReport,
 | 
			
		||||
        // deleteURL: deleteQualityHotMaterial,
 | 
			
		||||
        // exportURL: exportFactoryExcel,
 | 
			
		||||
      },
 | 
			
		||||
      codeList: ['sj1', 'sj2', 'sj3', 'sj4', 'sj5', 'sj7', 'sj8', 'sj10', 'sj11', 'sj12', 'sj13', 'sj14'],
 | 
			
		||||
      tableData: [],
 | 
			
		||||
      formConfig: [
 | 
			
		||||
        {
 | 
			
		||||
          type: 'datePicker',
 | 
			
		||||
          label: '时间段',
 | 
			
		||||
          dateType: 'daterange',
 | 
			
		||||
          format: 'yyyy-MM-dd HH:mm:ss',
 | 
			
		||||
          valueFormat: "timestamp",
 | 
			
		||||
          rangeSeparator: '-',
 | 
			
		||||
          startPlaceholder: '开始时间',
 | 
			
		||||
          endPlaceholder: '结束时间',
 | 
			
		||||
          param: 'checkTime',
 | 
			
		||||
          defaultSelect: [Date.now() - 24 * 60 * 60 - 1000, Date.now()],
 | 
			
		||||
          width: 250
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
          type: 'button',
 | 
			
		||||
          btnName: '查询',
 | 
			
		||||
          name: 'search',
 | 
			
		||||
          color: 'primary',
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
          type: 'button',
 | 
			
		||||
          btnName: '导出',
 | 
			
		||||
          name: 'export',
 | 
			
		||||
          color: 'success',
 | 
			
		||||
          plain: true
 | 
			
		||||
        },
 | 
			
		||||
      ],
 | 
			
		||||
    };
 | 
			
		||||
  },
 | 
			
		||||
  components: {
 | 
			
		||||
    // AddOrUpdate,
 | 
			
		||||
  },
 | 
			
		||||
  created() {
 | 
			
		||||
  },
 | 
			
		||||
  mounted() {
 | 
			
		||||
    // this.formConfig[1].defaultSelect[]
 | 
			
		||||
    // this.listQuery.startTime = this.formConfig[0].defaultSelect[0]
 | 
			
		||||
    // this.listQuery.endTime = this.formConfig[0].defaultSelect[1]
 | 
			
		||||
    // this.formConfig[0].defaultSelect[0] = Date.now()-24*60*60-1000
 | 
			
		||||
    this.getDataList()
 | 
			
		||||
    // this.getSpanArr(this.tableData)
 | 
			
		||||
    // this.getDict();
 | 
			
		||||
  },
 | 
			
		||||
  methods: {
 | 
			
		||||
    objectSpanMethod({ row, column, rowIndex, columnIndex }) {
 | 
			
		||||
      let spanOneArr = [], concatOne = 0;
 | 
			
		||||
      this.tableData.map((item, index) => {
 | 
			
		||||
        if (index === 0) {
 | 
			
		||||
          spanOneArr.push(1);
 | 
			
		||||
        } else {
 | 
			
		||||
          //第一列需合并相同内容的判断条件
 | 
			
		||||
          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
 | 
			
		||||
        }
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
    handleExport() {
 | 
			
		||||
      // 处理查询参数
 | 
			
		||||
      console.log(this.$refs);
 | 
			
		||||
      var xlsxParam = { raw: true };
 | 
			
		||||
      /* 从表生成工作簿对象 */
 | 
			
		||||
      import('xlsx').then(excel => {
 | 
			
		||||
        var wb = excel.utils.table_to_book(
 | 
			
		||||
          document.querySelector("#exportTable"),
 | 
			
		||||
          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) {
 | 
			
		||||
          if (typeof console !== "undefined") console.log(e, wbout);
 | 
			
		||||
        }
 | 
			
		||||
        return wbout;
 | 
			
		||||
        //do something......
 | 
			
		||||
      })
 | 
			
		||||
 | 
			
		||||
    },
 | 
			
		||||
    // otherMethods(val) {
 | 
			
		||||
    //   if (val.type === 'detail') {
 | 
			
		||||
    //     this.addOrUpdateVisible = true;
 | 
			
		||||
    //     this.addOrEditTitle = "详情";
 | 
			
		||||
    //     this.$nextTick(() => {
 | 
			
		||||
    //       this.$refs.addOrUpdate.init(val.data.id, true);
 | 
			
		||||
    //     });
 | 
			
		||||
    //   }
 | 
			
		||||
    // },
 | 
			
		||||
    // 获取数据列表
 | 
			
		||||
    getDataList() {
 | 
			
		||||
      this.dataListLoading = true;
 | 
			
		||||
      // this.listQuery.startTime = '1713197388000';
 | 
			
		||||
      // this.listQuery.endTime = '1713254961000';
 | 
			
		||||
      this.urlOptions.getDataListURL({
 | 
			
		||||
        productionLineId: '1696716506443354114',
 | 
			
		||||
        startTime: '1705618800000'
 | 
			
		||||
      },).then(res => {
 | 
			
		||||
        console.log(res.data);
 | 
			
		||||
        // console.log(res)
 | 
			
		||||
        // console.log(res.data)
 | 
			
		||||
        // let arr = [
 | 
			
		||||
        //   {
 | 
			
		||||
        //     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) {
 | 
			
		||||
      switch (val.btnName) {
 | 
			
		||||
        case 'search':
 | 
			
		||||
          // this.listQuery.startTime = val.checkTime ? val.checkTime[0] : undefined;
 | 
			
		||||
          // this.listQuery.endTime = val.checkTime ? val.checkTime[1] : undefined;
 | 
			
		||||
          this.getDataList();
 | 
			
		||||
          break;
 | 
			
		||||
        case 'export':
 | 
			
		||||
          this.handleExport();
 | 
			
		||||
          break;
 | 
			
		||||
        default:
 | 
			
		||||
          console.log(val);
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
  },
 | 
			
		||||
};
 | 
			
		||||
</script>
 | 
			
		||||
<style>
 | 
			
		||||
.baseTable .el-table__body tr.current-row>td.el-table__cell {
 | 
			
		||||
  background-color: #EAF1FC;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
.baseTable .el-table .el-table__cell {
 | 
			
		||||
  padding: 0;
 | 
			
		||||
  height: 35px;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
.el-table thead.is-group th {
 | 
			
		||||
  background: none;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
.el-table thead.is-group tr:first-of-type th:first-of-type {
 | 
			
		||||
  border-bottom: none;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
.el-table thead.is-group tr:first-of-type th:first-of-type:before {
 | 
			
		||||
  content: '';
 | 
			
		||||
  position: absolute;
 | 
			
		||||
  width: 1px;
 | 
			
		||||
  height: 75px;
 | 
			
		||||
  /*这里需要自己调整,根据td的宽度和高度*/
 | 
			
		||||
  top: 0;
 | 
			
		||||
  left: 0;
 | 
			
		||||
  background-color: grey;
 | 
			
		||||
  opacity: 0.3;
 | 
			
		||||
  display: block;
 | 
			
		||||
  transform: rotate(-53deg);
 | 
			
		||||
  /*这里需要自己调整,根据线的位置*/
 | 
			
		||||
  transform-origin: top;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
.el-table thead.is-group tr:last-of-type th:first-of-type:before {
 | 
			
		||||
  content: '';
 | 
			
		||||
  position: absolute;
 | 
			
		||||
  width: 1px;
 | 
			
		||||
  height: 75px;
 | 
			
		||||
  /*这里需要自己调整,根据td的宽度和高度*/
 | 
			
		||||
  bottom: 0;
 | 
			
		||||
  right: 0;
 | 
			
		||||
  background-color: grey;
 | 
			
		||||
  opacity: 0.3;
 | 
			
		||||
  display: block;
 | 
			
		||||
  transform: rotate(-54deg);
 | 
			
		||||
  /*这里需要自己调整,根据线的位置*/
 | 
			
		||||
  transform-origin: bottom;
 | 
			
		||||
}
 | 
			
		||||
</style>
 | 
			
		||||
@@ -1,7 +1,7 @@
 | 
			
		||||
<!--
 | 
			
		||||
 * @Author: zhp
 | 
			
		||||
 * @Date: 2024-04-18 10:01:33
 | 
			
		||||
 * @LastEditTime: 2024-04-18 16:26:48
 | 
			
		||||
 * @LastEditTime: 2024-04-22 14:42:31
 | 
			
		||||
 * @LastEditors: zhp
 | 
			
		||||
 * @Description:
 | 
			
		||||
-->
 | 
			
		||||
@@ -163,35 +163,35 @@ export default {
 | 
			
		||||
    // this.getDict();
 | 
			
		||||
  },
 | 
			
		||||
  methods: {
 | 
			
		||||
    getSummaries(param) {
 | 
			
		||||
      console.log(columns)
 | 
			
		||||
    // getSummaries(param) {
 | 
			
		||||
    //   console.log(columns)
 | 
			
		||||
 | 
			
		||||
      const { columns, data } = param;
 | 
			
		||||
      const sums = [];
 | 
			
		||||
      columns.forEach((column, index) => {
 | 
			
		||||
        if (index === 0) {
 | 
			
		||||
          sums[index] = '合计';
 | 
			
		||||
          return;
 | 
			
		||||
        }
 | 
			
		||||
        const values = data.map(item => Number(item[column.property]));
 | 
			
		||||
        // const data = data.map(item => !Number(item[column.property]));
 | 
			
		||||
        if (!values.every(value => isNaN(value))) {
 | 
			
		||||
          sums[index] = values.reduce((prev, curr) => {
 | 
			
		||||
            const value = Number(curr);
 | 
			
		||||
            if (!isNaN(value)) {
 | 
			
		||||
              return prev + curr;
 | 
			
		||||
            } else {
 | 
			
		||||
              return prev;
 | 
			
		||||
            }
 | 
			
		||||
          }, 0);
 | 
			
		||||
          sums[index] += ' ';
 | 
			
		||||
        } else {
 | 
			
		||||
          sums[index] = '-';
 | 
			
		||||
        }
 | 
			
		||||
      });
 | 
			
		||||
    //   const { columns, data } = param;
 | 
			
		||||
    //   const sums = [];
 | 
			
		||||
    //   columns.forEach((column, index) => {
 | 
			
		||||
    //     if (index === 0) {
 | 
			
		||||
    //       sums[index] = '合计';
 | 
			
		||||
    //       return;
 | 
			
		||||
    //     }
 | 
			
		||||
    //     const values = data.map(item => Number(item[column.property]));
 | 
			
		||||
    //     // const data = data.map(item => !Number(item[column.property]));
 | 
			
		||||
    //     if (!values.every(value => isNaN(value))) {
 | 
			
		||||
    //       sums[index] = values.reduce((prev, curr) => {
 | 
			
		||||
    //         const value = Number(curr);
 | 
			
		||||
    //         if (!isNaN(value)) {
 | 
			
		||||
    //           return prev + curr;
 | 
			
		||||
    //         } else {
 | 
			
		||||
    //           return prev;
 | 
			
		||||
    //         }
 | 
			
		||||
    //       }, 0);
 | 
			
		||||
    //       sums[index] += ' ';
 | 
			
		||||
    //     } else {
 | 
			
		||||
    //       sums[index] = '-';
 | 
			
		||||
    //     }
 | 
			
		||||
    //   });
 | 
			
		||||
 | 
			
		||||
      return sums;
 | 
			
		||||
    },
 | 
			
		||||
    //   return sums;
 | 
			
		||||
    // },
 | 
			
		||||
    objectSpanMethod({ row, column, rowIndex, columnIndex }) {
 | 
			
		||||
      let spanOneArr = [], concatOne = 0;
 | 
			
		||||
      this.tableData.map((item, index) => {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user