新增报表
This commit is contained in:
		
							
								
								
									
										6
									
								
								.env.dev
									
									
									
									
									
								
							
							
						
						
									
										6
									
								
								.env.dev
									
									
									
									
									
								
							@@ -1,7 +1,7 @@
 | 
				
			|||||||
###
 | 
					###
 | 
				
			||||||
 # @Author: zhp
 | 
					 # @Author: zhp
 | 
				
			||||||
 # @Date: 2024-04-12 14:30:48
 | 
					 # @Date: 2024-04-12 14:30:48
 | 
				
			||||||
 # @LastEditTime: 2024-04-23 13:52:57
 | 
					 # @LastEditTime: 2024-04-23 15:43:31
 | 
				
			||||||
 # @LastEditors: zhp
 | 
					 # @LastEditors: zhp
 | 
				
			||||||
 # @Description:
 | 
					 # @Description:
 | 
				
			||||||
###
 | 
					###
 | 
				
			||||||
@@ -13,9 +13,9 @@ VUE_APP_TITLE = MES系统
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
# 芋道管理系统/开发环境
 | 
					# 芋道管理系统/开发环境
 | 
				
			||||||
VUE_APP_BASE_API = 'http://192.168.0.33:48082'
 | 
					VUE_APP_BASE_API = 'http://192.168.0.33:48082'
 | 
				
			||||||
# VUE_APP_BASE_API = 'http://192.168.1.104:48082'
 | 
					# VUE_APP_BASE_API = 'http://192.168.4.176:48082'
 | 
				
			||||||
# 积木报表指向地址
 | 
					# 积木报表指向地址
 | 
				
			||||||
VUE_APP_JIMU_API = 'http://192.168.0.33:48082'
 | 
					VUE_APP_JIMU_API = 'http://192.168.1.101:48082'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# socket地址(现场)
 | 
					# socket地址(现场)
 | 
				
			||||||
# VUE_APP_Socket_API = 'ws://10.70.2.2:8080'
 | 
					# VUE_APP_Socket_API = 'ws://10.70.2.2:8080'
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -2,7 +2,7 @@
 | 
				
			|||||||
<!--
 | 
					<!--
 | 
				
			||||||
 * @Author: zhp
 | 
					 * @Author: zhp
 | 
				
			||||||
 * @Date: 2023-09-21 09:06:28
 | 
					 * @Date: 2023-09-21 09:06:28
 | 
				
			||||||
 * @LastEditTime: 2024-04-23 14:04:24
 | 
					 * @LastEditTime: 2024-04-23 15:34:56
 | 
				
			||||||
 * @LastEditors: zhp
 | 
					 * @LastEditors: zhp
 | 
				
			||||||
 * @Description:
 | 
					 * @Description:
 | 
				
			||||||
-->
 | 
					-->
 | 
				
			||||||
@@ -83,6 +83,9 @@ export default {
 | 
				
			|||||||
    this.chart = null
 | 
					    this.chart = null
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  methods: {
 | 
					  methods: {
 | 
				
			||||||
 | 
					    // getNumLength(num) {
 | 
				
			||||||
 | 
					    //   return num.toString().length;
 | 
				
			||||||
 | 
					    // },
 | 
				
			||||||
    initChart(nameList, passRateList, outputNumList) {
 | 
					    initChart(nameList, passRateList, outputNumList) {
 | 
				
			||||||
      console.log(nameList, passRateList)
 | 
					      console.log(nameList, passRateList)
 | 
				
			||||||
     let  series= [
 | 
					     let  series= [
 | 
				
			||||||
@@ -218,11 +221,10 @@ export default {
 | 
				
			|||||||
        // },
 | 
					        // },
 | 
				
			||||||
        yAxis: [
 | 
					        yAxis: [
 | 
				
			||||||
          {
 | 
					          {
 | 
				
			||||||
            min: function() { // 取最小值向下取整为最小刻度
 | 
					            min: function () { // 取最小值向下取整为最小刻度
 | 
				
			||||||
              return 0
 | 
					              return 0
 | 
				
			||||||
            },
 | 
					            },
 | 
				
			||||||
            max: function(value) { // 取最大值向上取整为最大刻度
 | 
					            max: function (value) { // 取最大值向上取整为最大刻度
 | 
				
			||||||
              return Math.ceil(value.max)
 | 
					 | 
				
			||||||
            },
 | 
					            },
 | 
				
			||||||
            scale: true,
 | 
					            scale: true,
 | 
				
			||||||
            type: 'value',
 | 
					            type: 'value',
 | 
				
			||||||
@@ -266,8 +268,16 @@ export default {
 | 
				
			|||||||
            // },
 | 
					            // },
 | 
				
			||||||
          },
 | 
					          },
 | 
				
			||||||
          {
 | 
					          {
 | 
				
			||||||
            min: 0,
 | 
					            min: function () { // 取最小值向下取整为最小刻度
 | 
				
			||||||
            max: 100000,
 | 
					              return 0
 | 
				
			||||||
 | 
					            },
 | 
				
			||||||
 | 
					            max: function (value) { // 取最大值向上取整为最大刻度
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					              // console.log(value.max.toString().length)
 | 
				
			||||||
 | 
					              // String(value.max)[0]
 | 
				
			||||||
 | 
					              // for
 | 
				
			||||||
 | 
					              // return String(value.max)[0] +
 | 
				
			||||||
 | 
					            },
 | 
				
			||||||
            minInterval: 5,//间隔
 | 
					            minInterval: 5,//间隔
 | 
				
			||||||
            scale: true,
 | 
					            scale: true,
 | 
				
			||||||
            type: 'value',
 | 
					            type: 'value',
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,7 +1,7 @@
 | 
				
			|||||||
<!--
 | 
					<!--
 | 
				
			||||||
 * @Author: zhp
 | 
					 * @Author: zhp
 | 
				
			||||||
 * @Date: 2023-09-21 09:06:28
 | 
					 * @Date: 2023-09-21 09:06:28
 | 
				
			||||||
 * @LastEditTime: 2024-04-23 14:06:05
 | 
					 * @LastEditTime: 2024-04-23 15:36:35
 | 
				
			||||||
 * @LastEditors: zhp
 | 
					 * @LastEditors: zhp
 | 
				
			||||||
 * @Description:
 | 
					 * @Description:
 | 
				
			||||||
-->
 | 
					-->
 | 
				
			||||||
@@ -217,12 +217,11 @@ export default {
 | 
				
			|||||||
          // },
 | 
					          // },
 | 
				
			||||||
          yAxis: [
 | 
					          yAxis: [
 | 
				
			||||||
            {
 | 
					            {
 | 
				
			||||||
              // min: function() { // 取最小值向下取整为最小刻度
 | 
					              min: function () { // 取最小值向下取整为最小刻度
 | 
				
			||||||
              //   return 0
 | 
					                return 0
 | 
				
			||||||
              // },
 | 
					              },
 | 
				
			||||||
              // max: function(value) { // 取最大值向上取整为最大刻度
 | 
					              max: function (value) { // 取最大值向上取整为最大刻度
 | 
				
			||||||
              //   return Math.ceil(value.max)
 | 
					              },
 | 
				
			||||||
              // },
 | 
					 | 
				
			||||||
              scale: true,
 | 
					              scale: true,
 | 
				
			||||||
              type: 'value',
 | 
					              type: 'value',
 | 
				
			||||||
              name: '良品率/%',
 | 
					              name: '良品率/%',
 | 
				
			||||||
@@ -265,8 +264,16 @@ export default {
 | 
				
			|||||||
              // },
 | 
					              // },
 | 
				
			||||||
            },
 | 
					            },
 | 
				
			||||||
            {
 | 
					            {
 | 
				
			||||||
              min: 0,
 | 
					              min: function () { // 取最小值向下取整为最小刻度
 | 
				
			||||||
              max: 100000,
 | 
					                return 0
 | 
				
			||||||
 | 
					              },
 | 
				
			||||||
 | 
					              max: function (value) { // 取最大值向上取整为最大刻度
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                // console.log(value.max.toString().length)
 | 
				
			||||||
 | 
					                // String(value.max)[0]
 | 
				
			||||||
 | 
					                // for
 | 
				
			||||||
 | 
					                // return String(value.max)[0] +
 | 
				
			||||||
 | 
					              },
 | 
				
			||||||
              minInterval: 5,//间隔
 | 
					              minInterval: 5,//间隔
 | 
				
			||||||
              scale: true,
 | 
					              scale: true,
 | 
				
			||||||
              type: 'value',
 | 
					              type: 'value',
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,7 +1,7 @@
 | 
				
			|||||||
<!--
 | 
					<!--
 | 
				
			||||||
 * @Author: zhp
 | 
					 * @Author: zhp
 | 
				
			||||||
 * @Date: 2024-04-18 14:08:46
 | 
					 * @Date: 2024-04-18 14:08:46
 | 
				
			||||||
 * @LastEditTime: 2024-04-23 15:23:05
 | 
					 * @LastEditTime: 2024-04-23 16:18:27
 | 
				
			||||||
 * @LastEditors: zhp
 | 
					 * @LastEditors: zhp
 | 
				
			||||||
 * @Description:
 | 
					 * @Description:
 | 
				
			||||||
-->
 | 
					-->
 | 
				
			||||||
@@ -35,7 +35,7 @@
 | 
				
			|||||||
        <el-table-column prop="activityName"></el-table-column>
 | 
					        <el-table-column prop="activityName"></el-table-column>
 | 
				
			||||||
        <el-table-column prop="message"></el-table-column>
 | 
					        <el-table-column prop="message"></el-table-column>
 | 
				
			||||||
      </el-table-column> -->
 | 
					      </el-table-column> -->
 | 
				
			||||||
      <el-table-column v-for="(item,index) in codeList " :prop="item" :label="item">
 | 
					      <el-table-column style="text-align: center;" v-for="(item,index) in codeList " :prop="item" :label="item">
 | 
				
			||||||
        <!-- <template slot-scope="scope">
 | 
					        <!-- <template slot-scope="scope">
 | 
				
			||||||
          <el-col :span="12">
 | 
					          <el-col :span="12">
 | 
				
			||||||
            {{ codeList[index] }}
 | 
					            {{ codeList[index] }}
 | 
				
			||||||
@@ -127,7 +127,7 @@ export default {
 | 
				
			|||||||
        // deleteURL: deleteQualityHotMaterial,
 | 
					        // deleteURL: deleteQualityHotMaterial,
 | 
				
			||||||
        // exportURL: exportFactoryExcel,
 | 
					        // exportURL: exportFactoryExcel,
 | 
				
			||||||
      },
 | 
					      },
 | 
				
			||||||
      codeList: ['sj1', 'sj2', 'sj3', 'sj4', 'sj5', 'sj7', 'sj8', 'sj10', 'sj11', 'sj12', 'sj13', 'sj14' ],
 | 
					      codeList: ['sj1', 'sj2', 'sj3', 'sj4', 'sj5', 'sj7', 'sj8', 'sj10', 'sj11', 'sj12', 'sj13', 'sj14'],
 | 
				
			||||||
      tableData: [],
 | 
					      tableData: [],
 | 
				
			||||||
      listQuery: {
 | 
					      listQuery: {
 | 
				
			||||||
        startTime: undefined,
 | 
					        startTime: undefined,
 | 
				
			||||||
@@ -211,7 +211,7 @@ export default {
 | 
				
			|||||||
          }
 | 
					          }
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
      if (columnIndex === 1 || columnIndex === 2 || columnIndex === 3 || columnIndex === 4 || columnIndex === 5 || columnIndex === 6)  {
 | 
					      if (columnIndex === 1)  {
 | 
				
			||||||
        if (rowIndex === 1 || rowIndex === 3 || rowIndex === 5 || rowIndex === 7 || rowIndex === 9 || rowIndex === 11) {
 | 
					        if (rowIndex === 1 || rowIndex === 3 || rowIndex === 5 || rowIndex === 7 || rowIndex === 9 || rowIndex === 11) {
 | 
				
			||||||
          return {
 | 
					          return {
 | 
				
			||||||
            rowspan: 1,
 | 
					            rowspan: 1,
 | 
				
			||||||
@@ -219,6 +219,14 @@ export default {
 | 
				
			|||||||
          }
 | 
					          }
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
 | 
					      if (columnIndex === 4 || columnIndex === 5 || columnIndex === 6 || columnIndex === 7 || columnIndex === 8 || columnIndex === 9 || columnIndex === 10 || columnIndex === 11 || columnIndex === 12 || columnIndex === 13) {
 | 
				
			||||||
 | 
					        if (rowIndex === 0 || rowIndex === 2 || rowIndex === 4 || rowIndex === 6 || rowIndex === 8 || rowIndex === 10) {
 | 
				
			||||||
 | 
					          return {
 | 
				
			||||||
 | 
					            rowspan: 2,
 | 
				
			||||||
 | 
					            colspan: 1
 | 
				
			||||||
 | 
					          }
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    handleExport() {
 | 
					    handleExport() {
 | 
				
			||||||
      // 处理查询参数
 | 
					      // 处理查询参数
 | 
				
			||||||
@@ -266,8 +274,8 @@ export default {
 | 
				
			|||||||
    // 获取数据列表
 | 
					    // 获取数据列表
 | 
				
			||||||
    getDataList() {
 | 
					    getDataList() {
 | 
				
			||||||
      this.dataListLoading = true;
 | 
					      this.dataListLoading = true;
 | 
				
			||||||
      this.listQuery.startTime = '1713197388000';
 | 
					      // this.listQuery.startTime = '1713197388000';
 | 
				
			||||||
      this.listQuery.endTime = '1713254961000';
 | 
					      // this.listQuery.endTime = '1713254961000';
 | 
				
			||||||
      this.urlOptions.getDataListURL(this.listQuery).then(res => {
 | 
					      this.urlOptions.getDataListURL(this.listQuery).then(res => {
 | 
				
			||||||
        // console.log(res)
 | 
					        // console.log(res)
 | 
				
			||||||
        // console.log(res.data)
 | 
					        // console.log(res.data)
 | 
				
			||||||
@@ -304,6 +312,7 @@ export default {
 | 
				
			|||||||
            'sj12': null,
 | 
					            'sj12': null,
 | 
				
			||||||
            'sj13': null,
 | 
					            'sj13': null,
 | 
				
			||||||
            'sj14': null,
 | 
					            'sj14': null,
 | 
				
			||||||
 | 
					            'sj1+sj2': null,
 | 
				
			||||||
            putType: ''
 | 
					            putType: ''
 | 
				
			||||||
          },
 | 
					          },
 | 
				
			||||||
          {
 | 
					          {
 | 
				
			||||||
@@ -338,6 +347,7 @@ export default {
 | 
				
			|||||||
            'sj12': null,
 | 
					            'sj12': null,
 | 
				
			||||||
            'sj13': null,
 | 
					            'sj13': null,
 | 
				
			||||||
            'sj14': null,
 | 
					            'sj14': null,
 | 
				
			||||||
 | 
					            'sj1+sj2': null,
 | 
				
			||||||
            putType: ''
 | 
					            putType: ''
 | 
				
			||||||
          },
 | 
					          },
 | 
				
			||||||
          {
 | 
					          {
 | 
				
			||||||
@@ -372,6 +382,7 @@ export default {
 | 
				
			|||||||
            'sj12': null,
 | 
					            'sj12': null,
 | 
				
			||||||
            'sj13': null,
 | 
					            'sj13': null,
 | 
				
			||||||
            'sj14': null,
 | 
					            'sj14': null,
 | 
				
			||||||
 | 
					            'sj1+sj2': null,
 | 
				
			||||||
            putType: ''
 | 
					            putType: ''
 | 
				
			||||||
          },
 | 
					          },
 | 
				
			||||||
          {
 | 
					          {
 | 
				
			||||||
@@ -406,6 +417,7 @@ export default {
 | 
				
			|||||||
            'sj12': null,
 | 
					            'sj12': null,
 | 
				
			||||||
            'sj13': null,
 | 
					            'sj13': null,
 | 
				
			||||||
            'sj14': null,
 | 
					            'sj14': null,
 | 
				
			||||||
 | 
					            'sj1+sj2': null,
 | 
				
			||||||
            putType: ''
 | 
					            putType: ''
 | 
				
			||||||
          },
 | 
					          },
 | 
				
			||||||
          {
 | 
					          {
 | 
				
			||||||
@@ -440,6 +452,7 @@ export default {
 | 
				
			|||||||
            'sj12': null,
 | 
					            'sj12': null,
 | 
				
			||||||
            'sj13': null,
 | 
					            'sj13': null,
 | 
				
			||||||
            'sj14': null,
 | 
					            'sj14': null,
 | 
				
			||||||
 | 
					            'sj1+sj2':null,
 | 
				
			||||||
            putType: ''
 | 
					            putType: ''
 | 
				
			||||||
          },
 | 
					          },
 | 
				
			||||||
          {
 | 
					          {
 | 
				
			||||||
@@ -474,10 +487,27 @@ export default {
 | 
				
			|||||||
            'sj12': null,
 | 
					            'sj12': null,
 | 
				
			||||||
            'sj13': null,
 | 
					            'sj13': null,
 | 
				
			||||||
            'sj14': null,
 | 
					            'sj14': null,
 | 
				
			||||||
 | 
					            'sj1+sj2': null,
 | 
				
			||||||
            putType: ''
 | 
					            putType: ''
 | 
				
			||||||
          },
 | 
					          },
 | 
				
			||||||
        ]
 | 
					        ]
 | 
				
			||||||
        res.data.forEach((ele) => {
 | 
					        res.data.forEach((ele) => {
 | 
				
			||||||
 | 
					          if(ele.classType === 1 && ele.code == 'sj1+sj2') {
 | 
				
			||||||
 | 
					            arr[1]['putType'] = ele.putNum
 | 
				
			||||||
 | 
					            arr[3]['putType'] = ele.useNum
 | 
				
			||||||
 | 
					            // arr[1]['sj2'] = ele.putNum
 | 
				
			||||||
 | 
					            // arr[3]['sj2'] = ele.useNum
 | 
				
			||||||
 | 
					          } else if (ele.classType === 2 && ele.code == 'sj1+sj2') {
 | 
				
			||||||
 | 
					            arr[5]['putType'] = ele.putNum
 | 
				
			||||||
 | 
					            arr[7]['putType'] = ele.useNum
 | 
				
			||||||
 | 
					            // arr[5]['sj2'] = ele.putNum
 | 
				
			||||||
 | 
					            // arr[7]['sj2'] = ele.useNum
 | 
				
			||||||
 | 
					          } else if (ele.classType === 3 && ele.code == 'sj1+sj2') {
 | 
				
			||||||
 | 
					            arr[9]['putType'] = ele.putNum
 | 
				
			||||||
 | 
					            arr[11]['putType'] = ele.useNum
 | 
				
			||||||
 | 
					            // arr[9]['sj2'] = ele.putNum
 | 
				
			||||||
 | 
					            // arr[11]['sj2'] = ele.useNum
 | 
				
			||||||
 | 
					          }
 | 
				
			||||||
          this.codeList.forEach((item) => {
 | 
					          this.codeList.forEach((item) => {
 | 
				
			||||||
            if (ele.classType === 1 && ele.code == item) {
 | 
					            if (ele.classType === 1 && ele.code == item) {
 | 
				
			||||||
              // console.log(arr[0][item])
 | 
					              // console.log(arr[0][item])
 | 
				
			||||||
@@ -494,6 +524,7 @@ export default {
 | 
				
			|||||||
        })
 | 
					        })
 | 
				
			||||||
        // console.log(arr)
 | 
					        // console.log(arr)
 | 
				
			||||||
        this.tableData = arr
 | 
					        this.tableData = arr
 | 
				
			||||||
 | 
					        console.log(this.tableData);
 | 
				
			||||||
        this.dataListLoading = false;
 | 
					        this.dataListLoading = false;
 | 
				
			||||||
      });
 | 
					      });
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user