projects/mesxc-dy #361
@@ -1,3 +1,3 @@
 | 
			
		||||
.dockerignore
 | 
			
		||||
dist
 | 
			
		||||
#dist
 | 
			
		||||
node_modules
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										59
									
								
								.drone.yml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										59
									
								
								.drone.yml
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,59 @@
 | 
			
		||||
---
 | 
			
		||||
kind: pipeline
 | 
			
		||||
type: docker
 | 
			
		||||
name: default
 | 
			
		||||
 | 
			
		||||
steps:
 | 
			
		||||
- name: build
 | 
			
		||||
  image: node:16-alpine
 | 
			
		||||
  pull: if_not_exists
 | 
			
		||||
  environment:
 | 
			
		||||
    NODE_ENV: ""
 | 
			
		||||
  commands:
 | 
			
		||||
  #- yarn install --frozen-lockfile
 | 
			
		||||
  - yarn install 
 | 
			
		||||
  - env ${NODE_ENV} yarn build:prod 
 | 
			
		||||
 | 
			
		||||
- name: publish
 | 
			
		||||
  image: docker:dind
 | 
			
		||||
  pull: if_not_exists
 | 
			
		||||
  volumes:
 | 
			
		||||
  - name: dockersock
 | 
			
		||||
    path: /var/run/docker.sock
 | 
			
		||||
  - name: dockerconfig
 | 
			
		||||
    path: /root/.docker
 | 
			
		||||
  commands:
 | 
			
		||||
  - docker build -t hub.kszny.picaiba.com/kszny/xcac-ui ./
 | 
			
		||||
  - docker push hub.kszny.picaiba.com/kszny/xcac-ui
 | 
			
		||||
  depends_on:
 | 
			
		||||
  - build
 | 
			
		||||
 | 
			
		||||
- name: deploy
 | 
			
		||||
  image: appleboy/drone-ssh
 | 
			
		||||
  pull: if-not-exists
 | 
			
		||||
  settings:
 | 
			
		||||
    host:
 | 
			
		||||
      - 172.24.145.74
 | 
			
		||||
    username: root
 | 
			
		||||
    password: Root@123
 | 
			
		||||
    port: 22
 | 
			
		||||
    command_timeout: 2m
 | 
			
		||||
    script:
 | 
			
		||||
    - docker pull hub.kszny.picaiba.com/kszny/xcac-ui
 | 
			
		||||
    - docker run --rm -v /data/www/xcac:/tmp hub.kszny.picaiba.com/kszny/xcac-ui sh -c "rm -rf /tmp/* && mv -f /html /tmp"
 | 
			
		||||
  depends_on:
 | 
			
		||||
  - publish
 | 
			
		||||
 | 
			
		||||
volumes:
 | 
			
		||||
- name: dockersock
 | 
			
		||||
  host:
 | 
			
		||||
    path: /var/run/docker.sock
 | 
			
		||||
- name: dockerconfig
 | 
			
		||||
  host:
 | 
			
		||||
    path: /root/.docker
 | 
			
		||||
 | 
			
		||||
trigger:
 | 
			
		||||
  branch:
 | 
			
		||||
  - projects/mesxc-test
 | 
			
		||||
  event:
 | 
			
		||||
  - push
 | 
			
		||||
							
								
								
									
										7
									
								
								.env.dev
									
									
									
									
									
								
							
							
						
						
									
										7
									
								
								.env.dev
									
									
									
									
									
								
							@@ -13,14 +13,15 @@ VUE_APP_TITLE = MES系统
 | 
			
		||||
 | 
			
		||||
# 芋道管理系统/开发环境
 | 
			
		||||
VUE_APP_BASE_API = 'http://192.168.0.33:48082'
 | 
			
		||||
# VUE_APP_BASE_API = 'http://192.168.4.176:48082'
 | 
			
		||||
# VUE_APP_BASE_API = 'http://xcac.mes.picaiba.com/'
 | 
			
		||||
# VUE_APP_BASE_API = 'http://10.70.2.2:8080'
 | 
			
		||||
# 积木报表指向地址
 | 
			
		||||
VUE_APP_JIMU_API = 'http://192.168.1.101:48082'
 | 
			
		||||
 | 
			
		||||
# socket地址(现场)
 | 
			
		||||
# VUE_APP_Socket_API = 'ws://10.70.2.2:8080'
 | 
			
		||||
VUE_APP_Socket_API = 'ws://10.70.2.2:8080'
 | 
			
		||||
# socket地址(公司线上)
 | 
			
		||||
VUE_APP_Socket_API = 'ws://192.168.0.33:48082'
 | 
			
		||||
# VUE_APP_Socket_API = 'ws://192.168.0.33:48082'
 | 
			
		||||
# socket dcs地址(只有现场)
 | 
			
		||||
VUE_APP_Socket_Dcs_API = 'ws://10.70.180.10:8081'
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										24
									
								
								Dockerfile
									
									
									
									
									
								
							
							
						
						
									
										24
									
								
								Dockerfile
									
									
									
									
									
								
							@@ -1,21 +1,3 @@
 | 
			
		||||
FROM node:16-alpine as build-stage
 | 
			
		||||
 | 
			
		||||
WORKDIR /admim
 | 
			
		||||
 | 
			
		||||
COPY .npmrc package.json yarn.lock ./
 | 
			
		||||
RUN --mount=type=cache,id=yarn-store,target=/root/.yarn-store \
 | 
			
		||||
    yarn install --frozen-lockfile
 | 
			
		||||
 | 
			
		||||
COPY . .
 | 
			
		||||
ARG NODE_ENV=""
 | 
			
		||||
RUN env ${NODE_ENV} yarn build:prod
 | 
			
		||||
 | 
			
		||||
## -- stage: dist => nginx --
 | 
			
		||||
FROM nginx:alpine
 | 
			
		||||
 | 
			
		||||
ENV TZ=Asia/Shanghai
 | 
			
		||||
 | 
			
		||||
COPY ./nginx.conf /etc/nginx/conf.d/default.conf
 | 
			
		||||
COPY --from=build-stage /admim/dist /usr/share/nginx/html
 | 
			
		||||
 | 
			
		||||
EXPOSE 80
 | 
			
		||||
FROM busybox 
 | 
			
		||||
LABEL maintainer thomas.hairong@gmail.com
 | 
			
		||||
COPY dist /html/
 | 
			
		||||
 
 | 
			
		||||
@@ -2,7 +2,7 @@
 | 
			
		||||
 * @Author: zwq
 | 
			
		||||
 * @Date: 2021-07-19 15:18:30
 | 
			
		||||
 * @LastEditors: zhp
 | 
			
		||||
 * @LastEditTime: 2024-04-22 12:15:49
 | 
			
		||||
 * @LastEditTime: 2024-04-24 14:48:00
 | 
			
		||||
 * @Description:
 | 
			
		||||
-->
 | 
			
		||||
<template>
 | 
			
		||||
@@ -37,7 +37,7 @@
 | 
			
		||||
        </el-col>
 | 
			
		||||
 | 
			
		||||
        <el-col :style="{ margin: 8 + 'px' + ' 0' }" :span="8" height="100%">
 | 
			
		||||
          <base-container :show-time="true" :height="318" :size="'small'" :title="'工单监控'" :title-icon="'eqMonitoring'">
 | 
			
		||||
          <base-container :show-time="false" :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"> -->
 | 
			
		||||
@@ -749,7 +749,7 @@ export default {
 | 
			
		||||
							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:10px 10px 0 0 ' : 'box-shadow: 0px 0px 2px 1px #FFBD02;width:6px;height:6px;border-radius: 50%;  background-color: #FFBD02;float:left;margin:10px 10px 0 0 '}"></div>  ${item.status || ''}</span>`,
 | 
			
		||||
            `<span style="color:rgba(255,255,255,0.5)"><div style="${item.error == 'false' ? 'box-shadow: 0px 0px 2px 1px #2760FF;width:6px;height:6px;border-radius: 50%;background-color: #2760FF;float:left;margin:10px 10px 0 0 ' : 'box-shadow: 0px 0px 2px 1px red;width:6px;height:6px;border-radius: 50%;  background-color: red;float:left;margin:10px 10px 0 0 '}"></div>  ${item.error == true ?'是' :'否'  || ''}</span>`,
 | 
			
		||||
            `<span style="color:rgba(255,255,255,0.5)"><div style="${item.error == false ? 'box-shadow: 0px 0px 2px 1px #2760FF;width:6px;height:6px;border-radius: 50%;background-color: #2760FF;float:left;margin:10px 10px 0 0 ' : 'box-shadow: 0px 0px 2px 1px red;width:6px;height:6px;border-radius: 50%;  background-color: red;float:left;margin:10px 10px 0 0 '}"></div>  ${item.error == true ?'是' :'否'  || ''}</span>`,
 | 
			
		||||
					]);
 | 
			
		||||
          this.eqConfig.data = eqArr;
 | 
			
		||||
          // this.$nextTick(() => {
 | 
			
		||||
 
 | 
			
		||||
@@ -1,22 +1,26 @@
 | 
			
		||||
<template>
 | 
			
		||||
	<div>
 | 
			
		||||
		<NotMsg v-show="notMsg"/>
 | 
			
		||||
		<div id='gasChart' class="gas-chart" style="width:600px;height:200px;" v-show='!notMsg'></div>
 | 
			
		||||
		<NotMsg v-show="notMsg" />
 | 
			
		||||
		<div
 | 
			
		||||
			id="gasChart"
 | 
			
		||||
			class="gas-chart"
 | 
			
		||||
			style="width: 600px; height: 200px"
 | 
			
		||||
			v-show="!notMsg"></div>
 | 
			
		||||
	</div>
 | 
			
		||||
</template>
 | 
			
		||||
 | 
			
		||||
<script>
 | 
			
		||||
import * as echarts from 'echarts';
 | 
			
		||||
import resize from './../mixins/resize'
 | 
			
		||||
import NotMsg from './../components/NotMsg'
 | 
			
		||||
import resize from './../mixins/resize';
 | 
			
		||||
import NotMsg from './../components/NotMsg';
 | 
			
		||||
 | 
			
		||||
export default {
 | 
			
		||||
	name: 'GasChart',
 | 
			
		||||
	mixins: [resize],
 | 
			
		||||
	components:{ NotMsg },
 | 
			
		||||
	components: { NotMsg },
 | 
			
		||||
	props: {
 | 
			
		||||
		chartType: '', // 能源类型
 | 
			
		||||
		chartTime: ''
 | 
			
		||||
		chartTime: '',
 | 
			
		||||
	},
 | 
			
		||||
	data() {
 | 
			
		||||
		const colors = [
 | 
			
		||||
@@ -31,159 +35,170 @@ export default {
 | 
			
		||||
		];
 | 
			
		||||
		return {
 | 
			
		||||
			chart: null,
 | 
			
		||||
			notMsg:false
 | 
			
		||||
			notMsg: false,
 | 
			
		||||
		};
 | 
			
		||||
	},
 | 
			
		||||
	computed: {
 | 
			
		||||
		gasChartMsg() {
 | 
			
		||||
			return this.$store.state.websocket.sumGasInfo
 | 
			
		||||
			return this.$store.state.websocket.sumGasInfo;
 | 
			
		||||
		},
 | 
			
		||||
		energyWeekTrend() {
 | 
			
		||||
			return this.$store.state.websocket.energyWeekTrend
 | 
			
		||||
			return this.$store.state.websocket.energyWeekTrend;
 | 
			
		||||
		},
 | 
			
		||||
		energyMonthTrend() {
 | 
			
		||||
			return this.$store.state.websocket.energyMonthTrend
 | 
			
		||||
			return this.$store.state.websocket.energyMonthTrend;
 | 
			
		||||
		},
 | 
			
		||||
		energyYearTrend() {
 | 
			
		||||
			return this.$store.state.websocket.energyYearTrend
 | 
			
		||||
		}
 | 
			
		||||
			return this.$store.state.websocket.energyYearTrend;
 | 
			
		||||
		},
 | 
			
		||||
	},
 | 
			
		||||
	watch: {
 | 
			
		||||
		energyWeekTrend: {// 监听周电能,更新图
 | 
			
		||||
		energyWeekTrend: {
 | 
			
		||||
			// 监听周电能,更新图
 | 
			
		||||
			handler(newVal, oldVal) {
 | 
			
		||||
				if (this.chartTime === '周' && this.chartType === '电耗能') {
 | 
			
		||||
					this.updateChart()
 | 
			
		||||
					this.$emit('emitFun')
 | 
			
		||||
					this.updateChart();
 | 
			
		||||
					this.$emit('emitFun');
 | 
			
		||||
				}
 | 
			
		||||
			}
 | 
			
		||||
			},
 | 
			
		||||
		},
 | 
			
		||||
		energyMonthTrend: {// 监听月电能,更新图
 | 
			
		||||
		energyMonthTrend: {
 | 
			
		||||
			// 监听月电能,更新图
 | 
			
		||||
			handler(newVal, oldVal) {
 | 
			
		||||
				if (this.chartTime === '月' && this.chartType === '电耗能') {
 | 
			
		||||
					this.updateChart()
 | 
			
		||||
					this.$emit('emitFun')
 | 
			
		||||
					this.updateChart();
 | 
			
		||||
					this.$emit('emitFun');
 | 
			
		||||
				}
 | 
			
		||||
			}
 | 
			
		||||
			},
 | 
			
		||||
		},
 | 
			
		||||
		energyYearTrend: {// 监听年电能,更新图
 | 
			
		||||
		energyYearTrend: {
 | 
			
		||||
			// 监听年电能,更新图
 | 
			
		||||
			handler(newVal, oldVal) {
 | 
			
		||||
				if (this.chartTime === '年' && this.chartType === '电耗能') {
 | 
			
		||||
					this.updateChart()
 | 
			
		||||
					this.$emit('emitFun')
 | 
			
		||||
					this.updateChart();
 | 
			
		||||
					this.$emit('emitFun');
 | 
			
		||||
				}
 | 
			
		||||
			}
 | 
			
		||||
			},
 | 
			
		||||
		},
 | 
			
		||||
		gasChartMsg: {// 监听天然气,更新图
 | 
			
		||||
		gasChartMsg: {
 | 
			
		||||
			// 监听天然气,更新图
 | 
			
		||||
			handler(newVal, oldVal) {
 | 
			
		||||
				if (this.chartType === '天然气I' || this.chartType === '天然气II') {
 | 
			
		||||
					this.updateChart()
 | 
			
		||||
					this.$emit('emitFun')
 | 
			
		||||
					this.updateChart();
 | 
			
		||||
					this.$emit('emitFun');
 | 
			
		||||
				}
 | 
			
		||||
			}
 | 
			
		||||
			},
 | 
			
		||||
		},
 | 
			
		||||
		chartTime: {// 监听时间变化,更新图
 | 
			
		||||
		chartTime: {
 | 
			
		||||
			// 监听时间变化,更新图
 | 
			
		||||
			handler(newVal, oldVal) {
 | 
			
		||||
				this.updateChart()
 | 
			
		||||
			}
 | 
			
		||||
				this.updateChart();
 | 
			
		||||
			},
 | 
			
		||||
		},
 | 
			
		||||
		chartType: {// 监听能源类型变化,更新图
 | 
			
		||||
		chartType: {
 | 
			
		||||
			// 监听能源类型变化,更新图
 | 
			
		||||
			handler(newVal, oldVal) {
 | 
			
		||||
				this.updateChart()
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
				this.updateChart();
 | 
			
		||||
			},
 | 
			
		||||
		},
 | 
			
		||||
	},
 | 
			
		||||
	mounted() {
 | 
			
		||||
		this.$el.addEventListener('resize', () => {
 | 
			
		||||
			console.log('resziing.....');
 | 
			
		||||
		});
 | 
			
		||||
		this.updateChart()
 | 
			
		||||
		this.updateChart();
 | 
			
		||||
	},
 | 
			
		||||
	methods: {
 | 
			
		||||
		updateChart() {
 | 
			
		||||
			let gasName  = ''
 | 
			
		||||
			let gasName = '';
 | 
			
		||||
			const colors = ['#FFCB59'];
 | 
			
		||||
			let temp = []
 | 
			
		||||
			let seriesData = []
 | 
			
		||||
			let xData = []
 | 
			
		||||
			let yData = []
 | 
			
		||||
			let temp = [];
 | 
			
		||||
			let seriesData = [];
 | 
			
		||||
			let xData = [];
 | 
			
		||||
			let yData = [];
 | 
			
		||||
			switch (this.chartType) {
 | 
			
		||||
				case '电耗能':{
 | 
			
		||||
					gasName = '电耗能'
 | 
			
		||||
				case '电耗能': {
 | 
			
		||||
					gasName = '电耗能';
 | 
			
		||||
					if (this.chartTime === '周') {
 | 
			
		||||
						temp = this.energyWeekTrend || []
 | 
			
		||||
					}else if(this.chartTime === '月') {
 | 
			
		||||
						temp = this.energyMonthTrend || []
 | 
			
		||||
					}else{
 | 
			
		||||
						temp = this.energyYearTrend || []
 | 
			
		||||
						temp = this.energyWeekTrend || [];
 | 
			
		||||
					} else if (this.chartTime === '月') {
 | 
			
		||||
						temp = this.energyMonthTrend || [];
 | 
			
		||||
					} else {
 | 
			
		||||
						temp = this.energyYearTrend || [];
 | 
			
		||||
					}
 | 
			
		||||
					temp && temp.map(i => {
 | 
			
		||||
						xData.push(i.time)
 | 
			
		||||
						yData.push(i.qty)
 | 
			
		||||
					})
 | 
			
		||||
					temp &&
 | 
			
		||||
						temp.map((i) => {
 | 
			
		||||
							xData.push(i.time);
 | 
			
		||||
							yData.push(i.qty);
 | 
			
		||||
						});
 | 
			
		||||
					break;
 | 
			
		||||
				}
 | 
			
		||||
				case '天然气I':{
 | 
			
		||||
				case '天然气I': {
 | 
			
		||||
					if (this.chartTime === '周') {
 | 
			
		||||
						yData = this.gasChartMsg.hisSumGas1For7Day || []
 | 
			
		||||
					}else if(this.chartTime === '月') {
 | 
			
		||||
						yData = this.gasChartMsg.sumGas1ForMonth || []
 | 
			
		||||
					}else{
 | 
			
		||||
						yData = this.gasChartMsg.sumGas1ForYear || []
 | 
			
		||||
						yData = this.gasChartMsg.hisSumGas1For7Day || [];
 | 
			
		||||
					} else if (this.chartTime === '月') {
 | 
			
		||||
						yData = this.gasChartMsg.sumGas1ForMonth || [];
 | 
			
		||||
					} else {
 | 
			
		||||
						yData = this.gasChartMsg.sumGas1ForYear || [];
 | 
			
		||||
					}
 | 
			
		||||
					gasName = '天然气I'
 | 
			
		||||
					xData = this.getXdata()
 | 
			
		||||
					gasName = '天然气I';
 | 
			
		||||
					xData = this.getXdata();
 | 
			
		||||
					break;
 | 
			
		||||
				}
 | 
			
		||||
				default:
 | 
			
		||||
				gasName = '天然气II'
 | 
			
		||||
				if (this.chartTime === '周') {
 | 
			
		||||
						yData = this.gasChartMsg.hisSumGas2For7Day || []
 | 
			
		||||
					}else if(this.chartTime === '月') {
 | 
			
		||||
						yData = this.gasChartMsg.sumGas2ForMonth || []
 | 
			
		||||
					}else{
 | 
			
		||||
						yData = this.gasChartMsg.sumGas2ForYear || []
 | 
			
		||||
					gasName = '天然气II';
 | 
			
		||||
					if (this.chartTime === '周') {
 | 
			
		||||
						yData = this.gasChartMsg.hisSumGas2For7Day || [];
 | 
			
		||||
					} else if (this.chartTime === '月') {
 | 
			
		||||
						yData = this.gasChartMsg.sumGas2ForMonth || [];
 | 
			
		||||
					} else {
 | 
			
		||||
						yData = this.gasChartMsg.sumGas2ForYear || [];
 | 
			
		||||
					}
 | 
			
		||||
				xData = this.getXdata()
 | 
			
		||||
					xData = this.getXdata();
 | 
			
		||||
			}
 | 
			
		||||
			if (yData.length === 0) {
 | 
			
		||||
         this.notMsg = true
 | 
			
		||||
         return
 | 
			
		||||
      } else {
 | 
			
		||||
        this.notMsg = false
 | 
			
		||||
      }
 | 
			
		||||
				this.notMsg = true;
 | 
			
		||||
				return;
 | 
			
		||||
			} else {
 | 
			
		||||
				this.notMsg = false;
 | 
			
		||||
			}
 | 
			
		||||
			if (yData.length == 0) {
 | 
			
		||||
				seriesData = []
 | 
			
		||||
			}else {
 | 
			
		||||
				seriesData = [{
 | 
			
		||||
					name: gasName,
 | 
			
		||||
					data: yData,
 | 
			
		||||
					type: "line",
 | 
			
		||||
					areaStyle: {
 | 
			
		||||
				seriesData = [];
 | 
			
		||||
			} else {
 | 
			
		||||
				yData = yData.map((item) => {
 | 
			
		||||
					return (item = Number(item.toFixed(2)));
 | 
			
		||||
				});
 | 
			
		||||
				seriesData = [
 | 
			
		||||
					{
 | 
			
		||||
						name: gasName,
 | 
			
		||||
						data: yData,
 | 
			
		||||
						type: 'line',
 | 
			
		||||
						areaStyle: {
 | 
			
		||||
							color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
 | 
			
		||||
							{ offset: 0, color: '#FFCB59' + "40" },
 | 
			
		||||
							{ offset: 0.5, color: '#FFCB59' + "20" },
 | 
			
		||||
							{ offset: 1, color: '#FFCB59' + "00" },
 | 
			
		||||
								{ offset: 0, color: '#FFCB59' + '40' },
 | 
			
		||||
								{ offset: 0.5, color: '#FFCB59' + '20' },
 | 
			
		||||
								{ offset: 1, color: '#FFCB59' + '00' },
 | 
			
		||||
							]),
 | 
			
		||||
						},
 | 
			
		||||
						lineStyle: {
 | 
			
		||||
							width: 1,
 | 
			
		||||
						},
 | 
			
		||||
						symbol: 'circle',
 | 
			
		||||
						symbolSize: 5,
 | 
			
		||||
						emphasis: {
 | 
			
		||||
							focus: 'series',
 | 
			
		||||
						},
 | 
			
		||||
					},
 | 
			
		||||
					lineStyle: {
 | 
			
		||||
							width: 1
 | 
			
		||||
					},
 | 
			
		||||
					symbol: 'circle',
 | 
			
		||||
					symbolSize: 5,
 | 
			
		||||
					emphasis: {
 | 
			
		||||
							focus: 'series'
 | 
			
		||||
					}
 | 
			
		||||
				}]
 | 
			
		||||
					
 | 
			
		||||
				];
 | 
			
		||||
			}
 | 
			
		||||
			// 绘图
 | 
			
		||||
			if (
 | 
			
		||||
        this.chart !== null &&
 | 
			
		||||
        this.chart !== '' &&
 | 
			
		||||
        this.chart !== undefined
 | 
			
		||||
      ) {
 | 
			
		||||
        this.chart.dispose() // 页面多次刷新会出现警告,Dom已经初始化了一个实例,这是销毁实例
 | 
			
		||||
      }
 | 
			
		||||
				this.chart !== null &&
 | 
			
		||||
				this.chart !== '' &&
 | 
			
		||||
				this.chart !== undefined
 | 
			
		||||
			) {
 | 
			
		||||
				this.chart.dispose(); // 页面多次刷新会出现警告,Dom已经初始化了一个实例,这是销毁实例
 | 
			
		||||
			}
 | 
			
		||||
			this.chart = echarts.init(document.getElementById('gasChart'));
 | 
			
		||||
			var option = {
 | 
			
		||||
				color: colors,
 | 
			
		||||
@@ -204,7 +219,7 @@ export default {
 | 
			
		||||
					},
 | 
			
		||||
				},
 | 
			
		||||
				yAxis: {
 | 
			
		||||
					name: this.chartType === '电耗能'?'单位kwh':'单位Nm³',
 | 
			
		||||
					name: this.chartType === '电耗能' ? '单位kwh' : '单位Nm³',
 | 
			
		||||
					nameTextStyle: {
 | 
			
		||||
						color: '#fff',
 | 
			
		||||
						fontSize: 10,
 | 
			
		||||
@@ -230,10 +245,10 @@ export default {
 | 
			
		||||
				series: seriesData,
 | 
			
		||||
				tooltip: {
 | 
			
		||||
					trigger: 'axis',
 | 
			
		||||
					className: "gas-tooltip"
 | 
			
		||||
					className: 'gas-tooltip',
 | 
			
		||||
				},
 | 
			
		||||
			}
 | 
			
		||||
			option && this.chart.setOption(option)
 | 
			
		||||
			};
 | 
			
		||||
			option && this.chart.setOption(option);
 | 
			
		||||
		},
 | 
			
		||||
		getXdata() {
 | 
			
		||||
			const today = new Date();
 | 
			
		||||
@@ -242,31 +257,39 @@ export default {
 | 
			
		||||
			let days = 30;
 | 
			
		||||
			if (this.chartTime === '周') {
 | 
			
		||||
				return Array(7)
 | 
			
		||||
						.fill(1)
 | 
			
		||||
						.map((_, index) => {
 | 
			
		||||
							const today = new Date();
 | 
			
		||||
							const dtimestamp = today - (index+1) * 24 * 60 * 60 * 1000;
 | 
			
		||||
							return `${new Date(dtimestamp).getMonth()+1}.${new Date(dtimestamp).getDate()}`;}).reverse()
 | 
			
		||||
			}else if (this.chartTime == "月") {
 | 
			
		||||
					.fill(1)
 | 
			
		||||
					.map((_, index) => {
 | 
			
		||||
						const today = new Date();
 | 
			
		||||
						const dtimestamp = today - (index + 1) * 24 * 60 * 60 * 1000;
 | 
			
		||||
						return `${new Date(dtimestamp).getMonth() + 1}.${new Date(
 | 
			
		||||
							dtimestamp
 | 
			
		||||
						).getDate()}`;
 | 
			
		||||
					})
 | 
			
		||||
					.reverse();
 | 
			
		||||
			} else if (this.chartTime == '月') {
 | 
			
		||||
				if (currentMonth in [1, 3, 5, 7, 8, 10, 12]) {
 | 
			
		||||
					days = 31;
 | 
			
		||||
				} else if (currentMonth == 2) {
 | 
			
		||||
					days = this.isLeapYear(currentYear) ? 29 : 28;
 | 
			
		||||
				}
 | 
			
		||||
				return Array(days)
 | 
			
		||||
						.fill(1)
 | 
			
		||||
						.map((_, index) => {
 | 
			
		||||
							return `${currentMonth}.${days - index}`;}).reverse()
 | 
			
		||||
					.fill(1)
 | 
			
		||||
					.map((_, index) => {
 | 
			
		||||
						return `${currentMonth}.${days - index}`;
 | 
			
		||||
					})
 | 
			
		||||
					.reverse();
 | 
			
		||||
			} else {
 | 
			
		||||
				return Array(12)
 | 
			
		||||
						.fill(1)
 | 
			
		||||
						.map((_, index) => {
 | 
			
		||||
							return `${12 - index}`;}).reverse()
 | 
			
		||||
					.fill(1)
 | 
			
		||||
					.map((_, index) => {
 | 
			
		||||
						return `${12 - index}`;
 | 
			
		||||
					})
 | 
			
		||||
					.reverse();
 | 
			
		||||
			}
 | 
			
		||||
		},
 | 
			
		||||
		isLeapYear(year) {
 | 
			
		||||
			return year % 400 == 0 || (year % 4 == 0 && year % 100 != 0);
 | 
			
		||||
		}
 | 
			
		||||
		},
 | 
			
		||||
	},
 | 
			
		||||
};
 | 
			
		||||
</script>
 | 
			
		||||
@@ -278,12 +301,12 @@ export default {
 | 
			
		||||
}
 | 
			
		||||
</style>
 | 
			
		||||
<style>
 | 
			
		||||
  .gas-tooltip {
 | 
			
		||||
    background: #0a2b4f77 !important;
 | 
			
		||||
    border: none !important;
 | 
			
		||||
    backdrop-filter: blur(12px);
 | 
			
		||||
  }
 | 
			
		||||
  .gas-tooltip * {
 | 
			
		||||
    color: #fff !important;
 | 
			
		||||
  }
 | 
			
		||||
.gas-tooltip {
 | 
			
		||||
	background: #0a2b4f77 !important;
 | 
			
		||||
	border: none !important;
 | 
			
		||||
	backdrop-filter: blur(12px);
 | 
			
		||||
}
 | 
			
		||||
.gas-tooltip * {
 | 
			
		||||
	color: #fff !important;
 | 
			
		||||
}
 | 
			
		||||
</style>
 | 
			
		||||
 
 | 
			
		||||
@@ -1,70 +1,91 @@
 | 
			
		||||
<template>
 | 
			
		||||
	<div>
 | 
			
		||||
		<NotMsg v-show="notMsg"/>
 | 
			
		||||
		<div id="israChart" class="isra-chart" style="width:600px;height:390px;" v-show='!notMsg'></div>
 | 
			
		||||
		<NotMsg v-show="notMsg" />
 | 
			
		||||
		<div
 | 
			
		||||
			id="israChart"
 | 
			
		||||
			class="isra-chart"
 | 
			
		||||
			style="width: 600px; height: 390px"
 | 
			
		||||
			v-show="!notMsg"></div>
 | 
			
		||||
	</div>
 | 
			
		||||
</template>
 | 
			
		||||
 | 
			
		||||
<script>
 | 
			
		||||
import * as echarts from 'echarts';
 | 
			
		||||
import resize from './../mixins/resize'
 | 
			
		||||
import NotMsg from './../components/NotMsg'
 | 
			
		||||
import resize from './../mixins/resize';
 | 
			
		||||
import NotMsg from './../components/NotMsg';
 | 
			
		||||
 | 
			
		||||
export default {
 | 
			
		||||
	name: 'ISRAChart',
 | 
			
		||||
	mixins: [resize],
 | 
			
		||||
	components:{ NotMsg },
 | 
			
		||||
	components: { NotMsg },
 | 
			
		||||
	props: {},
 | 
			
		||||
	data() {
 | 
			
		||||
		return {
 | 
			
		||||
			chart: null,
 | 
			
		||||
			notMsg:true,
 | 
			
		||||
			colors:['#2760ff', '#518eec', '#0ee8e4', '#ddb523'],
 | 
			
		||||
			chartData: []
 | 
			
		||||
			notMsg: true,
 | 
			
		||||
			colors: ['#2760ff', '#518eec', '#0ee8e4', '#ddb523'],
 | 
			
		||||
			chartData: [],
 | 
			
		||||
		};
 | 
			
		||||
	},
 | 
			
		||||
	activated() {
 | 
			
		||||
	},
 | 
			
		||||
	activated() {},
 | 
			
		||||
	computed: {
 | 
			
		||||
		israChartMsg() {
 | 
			
		||||
			return this.$store.state.websocket.israKiln
 | 
			
		||||
		}
 | 
			
		||||
			return this.$store.state.websocket.israKiln;
 | 
			
		||||
		},
 | 
			
		||||
	},
 | 
			
		||||
	watch: {
 | 
			
		||||
		israChartMsg: {
 | 
			
		||||
			handler(newVal, oldVal) {
 | 
			
		||||
				this.chartData = newVal || []
 | 
			
		||||
				this.updateChart()
 | 
			
		||||
				this.$emit('emitFun')
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
				this.chartData = newVal || [];
 | 
			
		||||
				this.updateChart();
 | 
			
		||||
				this.$emit('emitFun');
 | 
			
		||||
			},
 | 
			
		||||
		},
 | 
			
		||||
	},
 | 
			
		||||
	methods: {
 | 
			
		||||
		getEqualNewlineString(params, length) {
 | 
			
		||||
			let text = '';
 | 
			
		||||
			let count = Math.ceil(params.length / length); // 向上取整数
 | 
			
		||||
			// 一行展示length个
 | 
			
		||||
			if (count > 1) {
 | 
			
		||||
				for (let z = 1; z <= count; z++) {
 | 
			
		||||
					text += params.substr((z - 1) * length, length);
 | 
			
		||||
					if (z < count) {
 | 
			
		||||
						text += '\n';
 | 
			
		||||
					}
 | 
			
		||||
				}
 | 
			
		||||
			} else {
 | 
			
		||||
				text += params.substr(0, length);
 | 
			
		||||
			}
 | 
			
		||||
			return text;
 | 
			
		||||
		},
 | 
			
		||||
		updateChart() {
 | 
			
		||||
			console.log('update')
 | 
			
		||||
			let num = 0
 | 
			
		||||
			this.chartData && this.chartData.length > 0 && this.chartData.map(i => {
 | 
			
		||||
				num+=i.num
 | 
			
		||||
			})
 | 
			
		||||
			console.log('update');
 | 
			
		||||
			let num = 0;
 | 
			
		||||
			this.chartData &&
 | 
			
		||||
				this.chartData.length > 0 &&
 | 
			
		||||
				this.chartData.map((i) => {
 | 
			
		||||
					num += i.num;
 | 
			
		||||
				});
 | 
			
		||||
			if (
 | 
			
		||||
        this.chart !== null &&
 | 
			
		||||
        this.chart !== '' &&
 | 
			
		||||
        this.chart !== undefined
 | 
			
		||||
      ) {
 | 
			
		||||
        this.chart.dispose()
 | 
			
		||||
      }
 | 
			
		||||
				this.chart !== null &&
 | 
			
		||||
				this.chart !== '' &&
 | 
			
		||||
				this.chart !== undefined
 | 
			
		||||
			) {
 | 
			
		||||
				this.chart.dispose();
 | 
			
		||||
			}
 | 
			
		||||
			if (this.chartData && this.chartData.length > 0) {
 | 
			
		||||
         this.notMsg = false
 | 
			
		||||
      } else {
 | 
			
		||||
        this.notMsg = true
 | 
			
		||||
				return
 | 
			
		||||
      }
 | 
			
		||||
				this.notMsg = false;
 | 
			
		||||
			} else {
 | 
			
		||||
				this.notMsg = true;
 | 
			
		||||
				return;
 | 
			
		||||
			}
 | 
			
		||||
			this.chart = echarts.init(document.getElementById('israChart'));
 | 
			
		||||
			var option = {
 | 
			
		||||
				color:this.colors,
 | 
			
		||||
				title:{
 | 
			
		||||
				color: this.colors,
 | 
			
		||||
				title: {
 | 
			
		||||
					text: num,
 | 
			
		||||
					subtext: '总数',
 | 
			
		||||
					subtext: '总数/个',
 | 
			
		||||
					top: '32%',
 | 
			
		||||
					left: '49%',
 | 
			
		||||
					textAlign: 'center',
 | 
			
		||||
@@ -81,55 +102,92 @@ export default {
 | 
			
		||||
					bottom: '2%',
 | 
			
		||||
					left: 'center',
 | 
			
		||||
					itemWidth: 18,
 | 
			
		||||
					itemHeight:18,
 | 
			
		||||
					itemHeight: 18,
 | 
			
		||||
					icon: 'circle',
 | 
			
		||||
					textStyle: {
 | 
			
		||||
						color: '#fff'
 | 
			
		||||
						color: '#fff',
 | 
			
		||||
					},
 | 
			
		||||
					data:this.chartData && this.chartData.length > 0 && this.chartData.map((item,index)=>({
 | 
			
		||||
						name:item.name,
 | 
			
		||||
						itemStyle:{
 | 
			
		||||
							color: this.colors[index%4]
 | 
			
		||||
						}
 | 
			
		||||
					}))
 | 
			
		||||
					data:
 | 
			
		||||
						this.chartData &&
 | 
			
		||||
						this.chartData.length > 0 &&
 | 
			
		||||
						this.chartData.map((item, index) => ({
 | 
			
		||||
							name: item.name,
 | 
			
		||||
							itemStyle: {
 | 
			
		||||
								color: this.colors[index % 4],
 | 
			
		||||
							},
 | 
			
		||||
						})),
 | 
			
		||||
				},
 | 
			
		||||
				series:[{
 | 
			
		||||
				series: [
 | 
			
		||||
					{
 | 
			
		||||
						name: 'ISRA缺陷检测',
 | 
			
		||||
						type: 'pie',
 | 
			
		||||
						center: ['50%', '40%'],
 | 
			
		||||
						radius: ['45%', '70%'],
 | 
			
		||||
						avoidLabelOverlap: true,
 | 
			
		||||
						// label: {
 | 
			
		||||
						// 	show: true,
 | 
			
		||||
						// },
 | 
			
		||||
						// labelLine: {
 | 
			
		||||
						// 	show: true,
 | 
			
		||||
						// },
 | 
			
		||||
						label: {
 | 
			
		||||
							show: false
 | 
			
		||||
							show: true,
 | 
			
		||||
							normal: {
 | 
			
		||||
								alignTo: 'labelLine',
 | 
			
		||||
								margin: 10,
 | 
			
		||||
								edgeDistance: 10,
 | 
			
		||||
								lineHeight: 16,
 | 
			
		||||
								formatter: (params) => {
 | 
			
		||||
									//调用自定义显示格式
 | 
			
		||||
									return this.getEqualNewlineString(
 | 
			
		||||
										params.value + ' | ' + params.percent.toFixed(0) + '%'
 | 
			
		||||
									);
 | 
			
		||||
								},
 | 
			
		||||
								textStyle: {
 | 
			
		||||
									// 提示文字的样式
 | 
			
		||||
									// color: '#595959',
 | 
			
		||||
									fontSize: 16,
 | 
			
		||||
								},
 | 
			
		||||
							},
 | 
			
		||||
						},
 | 
			
		||||
						labelLine: {
 | 
			
		||||
							show: true,
 | 
			
		||||
							length: 25,
 | 
			
		||||
							length2: 10,
 | 
			
		||||
						},
 | 
			
		||||
						data: this.chartData && this.chartData.length > 0 && this.chartData.map((item, index) => ({
 | 
			
		||||
						name:item.name,
 | 
			
		||||
						value: item.num,
 | 
			
		||||
						itemStyle:{
 | 
			
		||||
							color:{
 | 
			
		||||
								type: 'linear',
 | 
			
		||||
								x: 1,
 | 
			
		||||
								y: 1,
 | 
			
		||||
								x2: 0,
 | 
			
		||||
								y2: 0,
 | 
			
		||||
								global: false,
 | 
			
		||||
								colorStops:[
 | 
			
		||||
									{offset: 0,color: this.colors[index%4]},
 | 
			
		||||
									{offset: 1,color: this.colors[index%4]+'33'}
 | 
			
		||||
								]
 | 
			
		||||
							}
 | 
			
		||||
						}
 | 
			
		||||
					}))}],
 | 
			
		||||
					tooltip: {
 | 
			
		||||
						trigger: 'item',
 | 
			
		||||
						className: "isra-chart-tooltip"
 | 
			
		||||
						data:
 | 
			
		||||
							this.chartData &&
 | 
			
		||||
							this.chartData.length > 0 &&
 | 
			
		||||
							this.chartData.map((item, index) => ({
 | 
			
		||||
								name: item.name,
 | 
			
		||||
								value: item.num,
 | 
			
		||||
								label: {
 | 
			
		||||
									color: this.colors[index % 4],
 | 
			
		||||
								},
 | 
			
		||||
								itemStyle: {
 | 
			
		||||
									color: {
 | 
			
		||||
										type: 'linear',
 | 
			
		||||
										x: 1,
 | 
			
		||||
										y: 1,
 | 
			
		||||
										x2: 0,
 | 
			
		||||
										y2: 0,
 | 
			
		||||
										global: false,
 | 
			
		||||
										colorStops: [
 | 
			
		||||
											{ offset: 0, color: this.colors[index % 4] },
 | 
			
		||||
											{ offset: 1, color: this.colors[index % 4] + '33' },
 | 
			
		||||
										],
 | 
			
		||||
									},
 | 
			
		||||
								},
 | 
			
		||||
							})),
 | 
			
		||||
					},
 | 
			
		||||
			}
 | 
			
		||||
				],
 | 
			
		||||
				tooltip: {
 | 
			
		||||
					trigger: 'item',
 | 
			
		||||
					className: 'isra-chart-tooltip',
 | 
			
		||||
				},
 | 
			
		||||
			};
 | 
			
		||||
			this.chart.setOption(option);
 | 
			
		||||
		}
 | 
			
		||||
		},
 | 
			
		||||
	},
 | 
			
		||||
};
 | 
			
		||||
</script>
 | 
			
		||||
@@ -141,12 +199,12 @@ export default {
 | 
			
		||||
}
 | 
			
		||||
</style>
 | 
			
		||||
<style>
 | 
			
		||||
  .isra-chart-tooltip {
 | 
			
		||||
    background: #0a2b4f77 !important;
 | 
			
		||||
    border: none !important;
 | 
			
		||||
    backdrop-filter: blur(12px);
 | 
			
		||||
  }
 | 
			
		||||
  .isra-chart-tooltip * {
 | 
			
		||||
    color: #fff !important;
 | 
			
		||||
  }
 | 
			
		||||
.isra-chart-tooltip {
 | 
			
		||||
	background: #0a2b4f77 !important;
 | 
			
		||||
	border: none !important;
 | 
			
		||||
	backdrop-filter: blur(12px);
 | 
			
		||||
}
 | 
			
		||||
.isra-chart-tooltip * {
 | 
			
		||||
	color: #fff !important;
 | 
			
		||||
}
 | 
			
		||||
</style>
 | 
			
		||||
 
 | 
			
		||||
@@ -1,77 +1,95 @@
 | 
			
		||||
<template>
 | 
			
		||||
  <div style="flex: 1;">
 | 
			
		||||
    <Container name="设备报警" size="middle" style="">
 | 
			
		||||
      <TimePrompt class="timeShow" :timestr="timestr" />
 | 
			
		||||
      <div style="padding: 5px 10px;">
 | 
			
		||||
        <dv-scroll-board :config="config" style="width:575px;height:380px" ref='eqScrollBoard'/>
 | 
			
		||||
      </div>
 | 
			
		||||
    </Container>
 | 
			
		||||
  </div>
 | 
			
		||||
	<div style="flex: 1">
 | 
			
		||||
		<Container
 | 
			
		||||
			name="设备报警"
 | 
			
		||||
			size="middle"
 | 
			
		||||
			style="">
 | 
			
		||||
			<TimePrompt
 | 
			
		||||
				class="timeShow"
 | 
			
		||||
				:timestr="timestr" />
 | 
			
		||||
			<div style="padding: 5px 10px">
 | 
			
		||||
				<dv-scroll-board
 | 
			
		||||
					:config="config"
 | 
			
		||||
					style="width: 575px; height: 380px"
 | 
			
		||||
					ref="eqScrollBoard" />
 | 
			
		||||
			</div>
 | 
			
		||||
		</Container>
 | 
			
		||||
	</div>
 | 
			
		||||
</template>
 | 
			
		||||
<script>
 | 
			
		||||
import Container from '../components/Container.vue';
 | 
			
		||||
import TimePrompt from '../components/TimePrompt';
 | 
			
		||||
import { switchShowTime } from '../utils'
 | 
			
		||||
import { switchShowTime } from '../utils';
 | 
			
		||||
export default {
 | 
			
		||||
  name: 'EqAlarm',
 | 
			
		||||
  components: { Container, TimePrompt },
 | 
			
		||||
  computed: {
 | 
			
		||||
    sjgEquipment() {
 | 
			
		||||
      return this.$store.state.websocket.sjgEquipment
 | 
			
		||||
    }
 | 
			
		||||
  },
 | 
			
		||||
  data() {
 | 
			
		||||
    return {
 | 
			
		||||
      timestr: '',
 | 
			
		||||
      config: {
 | 
			
		||||
        header: ['序号', '设备名称', '设备编码','设备状态','是否故障'],
 | 
			
		||||
        headerBGC: 'rgba(32, 55, 96, 0.8)',
 | 
			
		||||
        oddRowBGC: 'rgba(32, 55, 96, 0.8)',
 | 
			
		||||
        evenRowBGC: 'rgba(14, 32, 62, 0.8)',
 | 
			
		||||
        columnWidth: [60, 150, 190],
 | 
			
		||||
        align: ['center'],
 | 
			
		||||
        data: [],
 | 
			
		||||
        // data: [
 | 
			
		||||
        //   [1, '四大线3小线铺纸机', 'EQ20240110130909000255', '正常', '否'],
 | 
			
		||||
        //   [2, '四大线2小线铺纸机', 'EQ20240110130848000254', '正常', '否'],
 | 
			
		||||
        //   [3, '四大线1小线铺纸机', 'EQ20240110130832000253', '正常', '否'],
 | 
			
		||||
        //   [4, '12线下片台', 'EQ20240110130817000252', '正常', '否'],
 | 
			
		||||
        //   [5, '11线下片台', '	EQ20240110130743000250', '正常', '否'],
 | 
			
		||||
        //   [6, '10线下片台', '	EQ20240110130743000250', '正常', '否'],
 | 
			
		||||
        //   [7, '4大线五区自动连线柜', 'EQ20240110130731000249', '正常', '否'],
 | 
			
		||||
        //   [8, '四大线四区2小线清洗机', 'EQ20240110112716000248', '正常', '否'],
 | 
			
		||||
        //   [9, '四大线四区1小线清洗机', 'EQ20240110112700000247', '正常', '否'],
 | 
			
		||||
        //   [10, '4大线四区自动连线柜', 'EQ20240110112646000246', '正常', '否']
 | 
			
		||||
        // ],
 | 
			
		||||
        rowNum: 10
 | 
			
		||||
      }
 | 
			
		||||
    }
 | 
			
		||||
  },
 | 
			
		||||
  mounted(){
 | 
			
		||||
    this.timestr = switchShowTime('日')
 | 
			
		||||
  },
 | 
			
		||||
  watch:{
 | 
			
		||||
    sjgEquipment: {
 | 
			
		||||
	name: 'EqAlarm',
 | 
			
		||||
	components: { Container, TimePrompt },
 | 
			
		||||
	computed: {
 | 
			
		||||
		sjgEquipment() {
 | 
			
		||||
			return this.$store.state.websocket.sjgEquipment;
 | 
			
		||||
		},
 | 
			
		||||
	},
 | 
			
		||||
	data() {
 | 
			
		||||
		return {
 | 
			
		||||
			timestr: '',
 | 
			
		||||
			config: {
 | 
			
		||||
				header: ['序号', '设备名称', '设备编码', '设备状态', '是否故障'],
 | 
			
		||||
				headerBGC: 'rgba(32, 55, 96, 0.8)',
 | 
			
		||||
				oddRowBGC: 'rgba(32, 55, 96, 0.8)',
 | 
			
		||||
				evenRowBGC: 'rgba(14, 32, 62, 0.8)',
 | 
			
		||||
				columnWidth: [60, 150, 190],
 | 
			
		||||
				align: ['center'],
 | 
			
		||||
				data: [],
 | 
			
		||||
				// data: [
 | 
			
		||||
				//   [1, '四大线3小线铺纸机', 'EQ20240110130909000255', '正常', '否'],
 | 
			
		||||
				//   [2, '四大线2小线铺纸机', 'EQ20240110130848000254', '正常', '否'],
 | 
			
		||||
				//   [3, '四大线1小线铺纸机', 'EQ20240110130832000253', '正常', '否'],
 | 
			
		||||
				//   [4, '12线下片台', 'EQ20240110130817000252', '正常', '否'],
 | 
			
		||||
				//   [5, '11线下片台', '	EQ20240110130743000250', '正常', '否'],
 | 
			
		||||
				//   [6, '10线下片台', '	EQ20240110130743000250', '正常', '否'],
 | 
			
		||||
				//   [7, '4大线五区自动连线柜', 'EQ20240110130731000249', '正常', '否'],
 | 
			
		||||
				//   [8, '四大线四区2小线清洗机', 'EQ20240110112716000248', '正常', '否'],
 | 
			
		||||
				//   [9, '四大线四区1小线清洗机', 'EQ20240110112700000247', '正常', '否'],
 | 
			
		||||
				//   [10, '4大线四区自动连线柜', 'EQ20240110112646000246', '正常', '否']
 | 
			
		||||
				// ],
 | 
			
		||||
				rowNum: 10,
 | 
			
		||||
			},
 | 
			
		||||
		};
 | 
			
		||||
	},
 | 
			
		||||
	mounted() {
 | 
			
		||||
		this.timestr = switchShowTime('日');
 | 
			
		||||
	},
 | 
			
		||||
	watch: {
 | 
			
		||||
		sjgEquipment: {
 | 
			
		||||
			handler(newVal, oldVal) {
 | 
			
		||||
        let outArr = this.sjgEquipment.map((item, index) => [
 | 
			
		||||
          index+1,
 | 
			
		||||
          `<span title=${item.name || ''}>${item.name || ''}</span>`,
 | 
			
		||||
          `<span title=${item.code || ''}>${item.code || ''}</span>`,
 | 
			
		||||
          item.status,
 | 
			
		||||
          item.error? '是': '否'
 | 
			
		||||
      ]);
 | 
			
		||||
        this.config.data = outArr
 | 
			
		||||
        this.$refs['eqScrollBoard'].updateRows(outArr)
 | 
			
		||||
        this.timestr = switchShowTime('日')
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
				let outArr = this.sjgEquipment.map((item, index) => [
 | 
			
		||||
					index + 1,
 | 
			
		||||
					`<span title=${item.name || ''}>${item.name || ''}</span>`,
 | 
			
		||||
					`<span title=${item.code || ''}>${item.code || ''}</span>`,
 | 
			
		||||
					`<span><div style="${
 | 
			
		||||
						item.status == '运行'
 | 
			
		||||
							? 'box-shadow: 0px 0px 2px 1px #2760FF;width:6px;height:6px;border-radius: 50%;background-color: #2760FF;float:left;margin:13px 10px 0 0 '
 | 
			
		||||
							: item.status == '故障'
 | 
			
		||||
							? 'box-shadow: 0px 0px 2px 1px red;width:6px;height:6px;border-radius: 50%;  background-color: red;float:left;margin:13px 10px 0 0 '
 | 
			
		||||
							: 'box-shadow: 0px 0px 2px 1px #FFBD02;width:6px;height:6px;border-radius: 50%;  background-color: #FFBD02;float:left;margin:13px 10px 0 0 '
 | 
			
		||||
					}"></div>  ${item.status || ''}</span>`,
 | 
			
		||||
					`<span"><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.config.data = outArr;
 | 
			
		||||
				this.$refs['eqScrollBoard'].updateRows(outArr);
 | 
			
		||||
				this.timestr = switchShowTime('日');
 | 
			
		||||
			},
 | 
			
		||||
		},
 | 
			
		||||
	},
 | 
			
		||||
};
 | 
			
		||||
</script>
 | 
			
		||||
<style lang='scss' scoped>
 | 
			
		||||
<style lang="scss" scoped>
 | 
			
		||||
.timeShow {
 | 
			
		||||
  position: absolute;
 | 
			
		||||
  top: 20px;
 | 
			
		||||
  left: 170px;
 | 
			
		||||
	position: absolute;
 | 
			
		||||
	top: 20px;
 | 
			
		||||
	left: 170px;
 | 
			
		||||
}
 | 
			
		||||
</style>
 | 
			
		||||
</style>
 | 
			
		||||
 
 | 
			
		||||
@@ -1,67 +1,88 @@
 | 
			
		||||
<template>
 | 
			
		||||
  <Container name="工单监控" size="middle" style="">
 | 
			
		||||
    <TimePrompt class="timeShow" :timestr="timestr" />
 | 
			
		||||
    <div style="padding: 5px 10px;" class="WOMonitoring">
 | 
			
		||||
      <dv-scroll-board :config="config" style="width:900px;height:380px" ref='worderScrollBoard'/>
 | 
			
		||||
    </div>
 | 
			
		||||
  </Container>
 | 
			
		||||
	<Container
 | 
			
		||||
		name="工单监控"
 | 
			
		||||
		size="middle"
 | 
			
		||||
		style="">
 | 
			
		||||
		<TimePrompt
 | 
			
		||||
			class="timeShow"
 | 
			
		||||
			:timestr="timestr" />
 | 
			
		||||
		<div
 | 
			
		||||
			style="padding: 5px 10px"
 | 
			
		||||
			class="WOMonitoring">
 | 
			
		||||
			<dv-scroll-board
 | 
			
		||||
				:config="config"
 | 
			
		||||
				style="width: 900px; height: 380px"
 | 
			
		||||
				ref="worderScrollBoard" />
 | 
			
		||||
		</div>
 | 
			
		||||
	</Container>
 | 
			
		||||
</template>
 | 
			
		||||
<script>
 | 
			
		||||
import Container from '../components/Container.vue';
 | 
			
		||||
import TimePrompt from '../components/TimePrompt';
 | 
			
		||||
import { switchShowTime } from '../utils'
 | 
			
		||||
import { formatDate } from '@/utils'
 | 
			
		||||
import { switchShowTime } from '../utils';
 | 
			
		||||
import { formatDate } from '@/utils';
 | 
			
		||||
export default {
 | 
			
		||||
  name: 'WorkOrderMonitoring',
 | 
			
		||||
  components: { Container, TimePrompt },
 | 
			
		||||
  computed: {
 | 
			
		||||
    order() {
 | 
			
		||||
      return this.$store.state.websocket.workOrder
 | 
			
		||||
    }
 | 
			
		||||
  },
 | 
			
		||||
  data() {
 | 
			
		||||
    return {
 | 
			
		||||
      timestr: '',
 | 
			
		||||
      config: {
 | 
			
		||||
        header: ['序号', '工单名称', '规格','产线','工单状态', '计划完成时间','计划产量','实际产量'],
 | 
			
		||||
        headerBGC: 'rgba(32, 55, 96, 0.8)',
 | 
			
		||||
        oddRowBGC: 'rgba(32, 55, 96, 0.8)',
 | 
			
		||||
        evenRowBGC: 'rgba(14, 32, 62, 0.8)',
 | 
			
		||||
        columnWidth: [60, 120, 120, 60, 100, 150],
 | 
			
		||||
        align: ['center'],
 | 
			
		||||
        data: [],
 | 
			
		||||
        rowNum:10
 | 
			
		||||
      }
 | 
			
		||||
    }
 | 
			
		||||
  },
 | 
			
		||||
  mounted(){
 | 
			
		||||
    this.timestr = switchShowTime('日')
 | 
			
		||||
  },
 | 
			
		||||
  watch:{
 | 
			
		||||
    order: {
 | 
			
		||||
	name: 'WorkOrderMonitoring',
 | 
			
		||||
	components: { Container, TimePrompt },
 | 
			
		||||
	computed: {
 | 
			
		||||
		order() {
 | 
			
		||||
			return this.$store.state.websocket.workOrder;
 | 
			
		||||
		},
 | 
			
		||||
	},
 | 
			
		||||
	data() {
 | 
			
		||||
		return {
 | 
			
		||||
			timestr: '',
 | 
			
		||||
			config: {
 | 
			
		||||
				header: [
 | 
			
		||||
					'序号',
 | 
			
		||||
					'工单名称',
 | 
			
		||||
					'规格',
 | 
			
		||||
					'产线',
 | 
			
		||||
					'工单状态',
 | 
			
		||||
					'计划完成时间',
 | 
			
		||||
					'计划产量',
 | 
			
		||||
					'实际产量',
 | 
			
		||||
					'完成进度',
 | 
			
		||||
				],
 | 
			
		||||
				headerBGC: 'rgba(32, 55, 96, 0.8)',
 | 
			
		||||
				oddRowBGC: 'rgba(32, 55, 96, 0.8)',
 | 
			
		||||
				evenRowBGC: 'rgba(14, 32, 62, 0.8)',
 | 
			
		||||
				columnWidth: [60, 120, 120, 60, 100, 150],
 | 
			
		||||
				align: ['center'],
 | 
			
		||||
				data: [],
 | 
			
		||||
				rowNum: 10,
 | 
			
		||||
			},
 | 
			
		||||
		};
 | 
			
		||||
	},
 | 
			
		||||
	mounted() {
 | 
			
		||||
		this.timestr = switchShowTime('日');
 | 
			
		||||
	},
 | 
			
		||||
	watch: {
 | 
			
		||||
		order: {
 | 
			
		||||
			handler(newVal, oldVal) {
 | 
			
		||||
        let outArr = this.order.map((item, index) => [
 | 
			
		||||
          index+1,
 | 
			
		||||
          `<span title=${item.name || ''}>${item.name || ''}</span>`,
 | 
			
		||||
          item.specifications,
 | 
			
		||||
          item.lines,
 | 
			
		||||
          this.getDictDatas(this.DICT_TYPE.ORDER_STATUS)[item.status]?.label,
 | 
			
		||||
          formatDate(item.planFinishTime),
 | 
			
		||||
          item.planQuantity,
 | 
			
		||||
          item.planAssignQuantity
 | 
			
		||||
      ]);
 | 
			
		||||
        this.config.data = outArr
 | 
			
		||||
        this.$refs['worderScrollBoard'].updateRows(outArr)
 | 
			
		||||
        this.timestr = switchShowTime('日')
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
				let outArr = this.order.map((item, index) => [
 | 
			
		||||
					index + 1,
 | 
			
		||||
					`<span title=${item.name || ''}>${item.name || ''}</span>`,
 | 
			
		||||
					item.specifications,
 | 
			
		||||
					item.lines,
 | 
			
		||||
					this.getDictDatas(this.DICT_TYPE.ORDER_STATUS)[item.status]?.label,
 | 
			
		||||
					formatDate(item.planFinishTime),
 | 
			
		||||
					item.planQuantity,
 | 
			
		||||
					item.actualQuantity,
 | 
			
		||||
					(item.progressRate * 100).toFixed(0) + '%',
 | 
			
		||||
				]);
 | 
			
		||||
				this.config.data = outArr;
 | 
			
		||||
				this.$refs['worderScrollBoard'].updateRows(outArr);
 | 
			
		||||
				this.timestr = switchShowTime('日');
 | 
			
		||||
			},
 | 
			
		||||
		},
 | 
			
		||||
	},
 | 
			
		||||
};
 | 
			
		||||
</script>
 | 
			
		||||
<style lang='scss' scoped>
 | 
			
		||||
<style lang="scss" scoped>
 | 
			
		||||
.timeShow {
 | 
			
		||||
  position: absolute;
 | 
			
		||||
  top: 20px;
 | 
			
		||||
  left: 170px;
 | 
			
		||||
	position: absolute;
 | 
			
		||||
	top: 20px;
 | 
			
		||||
	left: 170px;
 | 
			
		||||
}
 | 
			
		||||
</style>
 | 
			
		||||
</style>
 | 
			
		||||
 
 | 
			
		||||
@@ -1,22 +1,24 @@
 | 
			
		||||
<!-- 
 | 
			
		||||
    filename: MaterialCost.vue
 | 
			
		||||
    author: liubin
 | 
			
		||||
    date: 2023-12-06 09:09:27
 | 
			
		||||
    description: 
 | 
			
		||||
-->
 | 
			
		||||
 | 
			
		||||
<template>
 | 
			
		||||
	<Container name="能耗" size="middle" style="">
 | 
			
		||||
		<TimePrompt class="timeShow" :timestr="timestr" />
 | 
			
		||||
	<Container
 | 
			
		||||
		name="能耗"
 | 
			
		||||
		size="middle"
 | 
			
		||||
		style="">
 | 
			
		||||
		<EnergeTop />
 | 
			
		||||
		<SplitLine :horizontal="true" />
 | 
			
		||||
		<div class="" style="flex: 2; padding: 8px">
 | 
			
		||||
		<div
 | 
			
		||||
			class=""
 | 
			
		||||
			style="flex: 2; padding: 8px">
 | 
			
		||||
			<div
 | 
			
		||||
				class="header-line"
 | 
			
		||||
				style="margin: 8px 0 16px; display: flex; align-items: center">
 | 
			
		||||
				<h2 class="" style="margin: 0; color: #0ee8fe; margin-right: 12px">
 | 
			
		||||
				<h2
 | 
			
		||||
					class=""
 | 
			
		||||
					style="margin: 0; color: #0ee8fe; margin-right: 12px">
 | 
			
		||||
					能耗趋势图
 | 
			
		||||
				</h2>
 | 
			
		||||
				<TimePrompt
 | 
			
		||||
					class="timeShow"
 | 
			
		||||
					:timestr="timestr" />
 | 
			
		||||
				<!-- <Switcher /> -->
 | 
			
		||||
				<div>
 | 
			
		||||
					<!-- <span class="lgd lgd-total">总量</span> -->
 | 
			
		||||
@@ -32,11 +34,21 @@
 | 
			
		||||
					justify-content: space-between;
 | 
			
		||||
				">
 | 
			
		||||
				<SelectorBtnGroup
 | 
			
		||||
					:options="['电耗能', '天然气I', '天然气II']" @emitFun='toggleType' :active='chartType'/>
 | 
			
		||||
				<SelectorBtnGroup :options="['周', '月', '年']" @emitFun='toggleDate' :active='chartTime'/>
 | 
			
		||||
					:options="['电耗能', '天然气I', '天然气II']"
 | 
			
		||||
					@emitFun="toggleType"
 | 
			
		||||
					:active="chartType" />
 | 
			
		||||
				<SelectorBtnGroup
 | 
			
		||||
					:options="['周', '月', '年']"
 | 
			
		||||
					@emitFun="toggleDate"
 | 
			
		||||
					:active="chartTime" />
 | 
			
		||||
			</div>
 | 
			
		||||
			<div class="chart" style="height: 200px; margin-top: 8px;">
 | 
			
		||||
				<GasChart :chartType='chartType' :chartTime='chartTime' @emitFun='dateUpdate'/>
 | 
			
		||||
			<div
 | 
			
		||||
				class="chart"
 | 
			
		||||
				style="height: 200px; margin-top: 8px">
 | 
			
		||||
				<GasChart
 | 
			
		||||
					:chartType="chartType"
 | 
			
		||||
					:chartTime="chartTime"
 | 
			
		||||
					@emitFun="dateUpdate" />
 | 
			
		||||
			</div>
 | 
			
		||||
		</div>
 | 
			
		||||
	</Container>
 | 
			
		||||
@@ -51,7 +63,7 @@ import EnergeTop from './EnergeTop';
 | 
			
		||||
import GasChart from '../components/GasChart.vue';
 | 
			
		||||
import SelectorBtnGroup from '../components/SelectorBtnGroup';
 | 
			
		||||
import TimePrompt from '../components/TimePrompt';
 | 
			
		||||
import { switchShowTime } from '../utils'
 | 
			
		||||
import { switchShowTime } from '../utils';
 | 
			
		||||
export default {
 | 
			
		||||
	name: 'EnergeCost',
 | 
			
		||||
	components: {
 | 
			
		||||
@@ -61,48 +73,43 @@ export default {
 | 
			
		||||
		EnergeTop,
 | 
			
		||||
		GasChart,
 | 
			
		||||
		SelectorBtnGroup,
 | 
			
		||||
		TimePrompt
 | 
			
		||||
		TimePrompt,
 | 
			
		||||
	},
 | 
			
		||||
	props: {},
 | 
			
		||||
	data() {
 | 
			
		||||
		return {
 | 
			
		||||
			chartType:'电耗能',
 | 
			
		||||
			chartTime:'周',
 | 
			
		||||
			timestr: ''
 | 
			
		||||
			chartType: '电耗能',
 | 
			
		||||
			chartTime: '周',
 | 
			
		||||
			timestr: '',
 | 
			
		||||
		};
 | 
			
		||||
	},
 | 
			
		||||
	mounted() {
 | 
			
		||||
    this.timestr = switchShowTime(this.chartTime)
 | 
			
		||||
  },
 | 
			
		||||
		this.timestr = switchShowTime(this.chartTime);
 | 
			
		||||
	},
 | 
			
		||||
	computed: {
 | 
			
		||||
		gasInfoMsg() {
 | 
			
		||||
			return this.$store.state.websocket.gasInfo
 | 
			
		||||
			return this.$store.state.websocket.gasInfo;
 | 
			
		||||
		},
 | 
			
		||||
	},
 | 
			
		||||
	methods: {
 | 
			
		||||
		// 切换能源
 | 
			
		||||
		toggleType(val) {
 | 
			
		||||
			this.chartType = val
 | 
			
		||||
			this.chartType = val;
 | 
			
		||||
		},
 | 
			
		||||
		// 切换时间
 | 
			
		||||
		toggleDate(val) {
 | 
			
		||||
			this.chartTime = val
 | 
			
		||||
			this.timestr = switchShowTime(val)
 | 
			
		||||
			this.chartTime = val;
 | 
			
		||||
			this.timestr = switchShowTime(val);
 | 
			
		||||
		},
 | 
			
		||||
		// 数据更新
 | 
			
		||||
    dateUpdate() {
 | 
			
		||||
      this.timestr = switchShowTime(this.chartTime)
 | 
			
		||||
    }
 | 
			
		||||
		dateUpdate() {
 | 
			
		||||
			this.timestr = switchShowTime(this.chartTime);
 | 
			
		||||
		},
 | 
			
		||||
	},
 | 
			
		||||
};
 | 
			
		||||
</script>
 | 
			
		||||
 | 
			
		||||
<style scoped lang="scss">
 | 
			
		||||
.timeShow {
 | 
			
		||||
  position: absolute;
 | 
			
		||||
  top: 20px;
 | 
			
		||||
  left: 120px;
 | 
			
		||||
}
 | 
			
		||||
.lgd {
 | 
			
		||||
	color: #fff;
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -1,7 +1,11 @@
 | 
			
		||||
<template>
 | 
			
		||||
	<div class="gas-handle" style="flex: 2">
 | 
			
		||||
		<Container name="烟气处理" size="large" style="">
 | 
			
		||||
			<TimePrompt class="timeShow" :timestr="timestr" />
 | 
			
		||||
	<div
 | 
			
		||||
		class="gas-handle"
 | 
			
		||||
		style="flex: 2">
 | 
			
		||||
		<Container
 | 
			
		||||
			name="烟气处理"
 | 
			
		||||
			size="large"
 | 
			
		||||
			style="">
 | 
			
		||||
			<div
 | 
			
		||||
				class=""
 | 
			
		||||
				style="
 | 
			
		||||
@@ -24,7 +28,13 @@
 | 
			
		||||
						">
 | 
			
		||||
						氧气含量
 | 
			
		||||
					</span>
 | 
			
		||||
					<span style="font-size: 20px; line-height: 1.24; flex: 1">{{exhaustGasInfo?.O2_float ? (Number(exhaustGasInfo.O2_float)).toFixed(2) : ''}}%</span>
 | 
			
		||||
					<span style="font-size: 20px; line-height: 1.24; flex: 1">
 | 
			
		||||
						{{
 | 
			
		||||
							exhaustGasInfo?.O2_float
 | 
			
		||||
								? Number(exhaustGasInfo.O2_float).toFixed(2)
 | 
			
		||||
								: ''
 | 
			
		||||
						}}%
 | 
			
		||||
					</span>
 | 
			
		||||
				</ShadowRect>
 | 
			
		||||
				<ShadowRect>
 | 
			
		||||
					<div
 | 
			
		||||
@@ -33,13 +43,19 @@
 | 
			
		||||
							line-height: 1.24;
 | 
			
		||||
							flex: 1;
 | 
			
		||||
							text-align: right;
 | 
			
		||||
							padding:5px 8px 5px 0;
 | 
			
		||||
							padding: 5px 8px 5px 0;
 | 
			
		||||
							letter-spacing: 3px;
 | 
			
		||||
						">
 | 
			
		||||
						<p style="margin: 0; line-height: inherit">氮氧化物</p>
 | 
			
		||||
						<p style="margin: 0; line-height: inherit">排放浓度</p>
 | 
			
		||||
					</div>
 | 
			
		||||
					<span style="font-size: 20px; line-height: 1.24; flex: 1.2">{{exhaustGasInfo?.NOX_float ? (Number(exhaustGasInfo.NOX_float)).toFixed(2) : ''}}mg/m³</span>
 | 
			
		||||
					<span style="font-size: 20px; line-height: 1.24; flex: 1.2">
 | 
			
		||||
						{{
 | 
			
		||||
							exhaustGasInfo?.NOX_float
 | 
			
		||||
								? Number(exhaustGasInfo.NOX_float).toFixed(2)
 | 
			
		||||
								: ''
 | 
			
		||||
						}}mg/m³
 | 
			
		||||
					</span>
 | 
			
		||||
				</ShadowRect>
 | 
			
		||||
 | 
			
		||||
				<ShadowRect>
 | 
			
		||||
@@ -49,13 +65,19 @@
 | 
			
		||||
							line-height: 1.24;
 | 
			
		||||
							flex: 1;
 | 
			
		||||
							text-align: right;
 | 
			
		||||
							padding:5px 8px 5px 0;
 | 
			
		||||
							padding: 5px 8px 5px 0;
 | 
			
		||||
							letter-spacing: 3px;
 | 
			
		||||
						">
 | 
			
		||||
						<p style="margin: 0; line-height: inherit">二氧化硫</p>
 | 
			
		||||
						<p style="margin: 0; line-height: inherit">排放浓度</p>
 | 
			
		||||
					</div>
 | 
			
		||||
					<span style="font-size: 20px; line-height: 1.24; flex: 1">{{exhaustGasInfo?.SO2_float ? (Number(exhaustGasInfo.SO2_float)).toFixed(2) : ''}}mg/m³</span>
 | 
			
		||||
					<span style="font-size: 20px; line-height: 1.24; flex: 1">
 | 
			
		||||
						{{
 | 
			
		||||
							exhaustGasInfo?.SO2_float
 | 
			
		||||
								? Number(exhaustGasInfo.SO2_float).toFixed(2)
 | 
			
		||||
								: ''
 | 
			
		||||
						}}mg/m³
 | 
			
		||||
					</span>
 | 
			
		||||
				</ShadowRect>
 | 
			
		||||
 | 
			
		||||
				<ShadowRect>
 | 
			
		||||
@@ -70,17 +92,30 @@
 | 
			
		||||
						">
 | 
			
		||||
						颗粒物浓度
 | 
			
		||||
					</span>
 | 
			
		||||
					<span style="font-size: 20px; line-height: 1.24; flex: 1.2">{{exhaustGasInfo?.dust_float ? (Number(exhaustGasInfo.dust_float)).toFixed(2) : ''}}mg/m³</span>
 | 
			
		||||
					<span style="font-size: 20px; line-height: 1.24; flex: 1.2">
 | 
			
		||||
						{{
 | 
			
		||||
							exhaustGasInfo?.dust_float
 | 
			
		||||
								? Number(exhaustGasInfo.dust_float).toFixed(2)
 | 
			
		||||
								: ''
 | 
			
		||||
						}}mg/m³
 | 
			
		||||
					</span>
 | 
			
		||||
				</ShadowRect>
 | 
			
		||||
			</div>
 | 
			
		||||
			<KilnLine :horizontal="true" />
 | 
			
		||||
			<div class="" style="flex: 2; padding: 8px">
 | 
			
		||||
			<div
 | 
			
		||||
				class=""
 | 
			
		||||
				style="flex: 2; padding: 8px">
 | 
			
		||||
				<div
 | 
			
		||||
					class="header-line"
 | 
			
		||||
					style="margin-bottom: 10px; display: flex; align-items: center">
 | 
			
		||||
					<h2 class="" style="margin: 5px 0; color: #0ee8fe; margin-right: 12px">
 | 
			
		||||
					<h2
 | 
			
		||||
						class=""
 | 
			
		||||
						style="margin: 5px 0; color: #0ee8fe; margin-right: 12px">
 | 
			
		||||
						烟气趋势图
 | 
			
		||||
					</h2>
 | 
			
		||||
					<TimePrompt
 | 
			
		||||
						class="timeShow"
 | 
			
		||||
						:timestr="timestr" />
 | 
			
		||||
					<!-- <Switcher /> -->
 | 
			
		||||
					<div>
 | 
			
		||||
						<!-- <span class="lgd lgd-total">总量</span> -->
 | 
			
		||||
@@ -96,11 +131,21 @@
 | 
			
		||||
						justify-content: space-between;
 | 
			
		||||
					">
 | 
			
		||||
					<SelectorBtnGroup
 | 
			
		||||
						:options="['氧气含量', '二氧化硫', '氮氧化物', '颗粒物']" @emitFun='toggleType' :active='chartType'/>
 | 
			
		||||
					<SelectorBtnGroup :options="['日', '周', '月', '年']" @emitFun='toggleDate' :active='chartTime' />
 | 
			
		||||
						:options="['氧气含量', '二氧化硫', '氮氧化物', '颗粒物']"
 | 
			
		||||
						@emitFun="toggleType"
 | 
			
		||||
						:active="chartType" />
 | 
			
		||||
					<SelectorBtnGroup
 | 
			
		||||
						:options="['日', '周', '月', '年']"
 | 
			
		||||
						@emitFun="toggleDate"
 | 
			
		||||
						:active="chartTime" />
 | 
			
		||||
				</div>
 | 
			
		||||
				<div class="chart" style="height: 250px;margin-top: 10px;">
 | 
			
		||||
					<FlueGasChart :chartType='chartType' :chartTime='chartTime' @emitFun='dateUpdate'/>
 | 
			
		||||
				<div
 | 
			
		||||
					class="chart"
 | 
			
		||||
					style="height: 250px; margin-top: 10px">
 | 
			
		||||
					<FlueGasChart
 | 
			
		||||
						:chartType="chartType"
 | 
			
		||||
						:chartTime="chartTime"
 | 
			
		||||
						@emitFun="dateUpdate" />
 | 
			
		||||
				</div>
 | 
			
		||||
			</div>
 | 
			
		||||
		</Container>
 | 
			
		||||
@@ -115,7 +160,7 @@ import KilnLine from '../components/line';
 | 
			
		||||
import SelectorBtnGroup from '../components/SelectorBtnGroup';
 | 
			
		||||
import FlueGasChart from '../components/FlueGasChart';
 | 
			
		||||
import TimePrompt from '../components/TimePrompt';
 | 
			
		||||
import { switchShowTime } from '../utils'
 | 
			
		||||
import { switchShowTime } from '../utils';
 | 
			
		||||
 | 
			
		||||
export default {
 | 
			
		||||
	name: 'GasHandle',
 | 
			
		||||
@@ -125,49 +170,44 @@ export default {
 | 
			
		||||
		KilnLine,
 | 
			
		||||
		SelectorBtnGroup,
 | 
			
		||||
		FlueGasChart,
 | 
			
		||||
		TimePrompt
 | 
			
		||||
		TimePrompt,
 | 
			
		||||
	},
 | 
			
		||||
	props: {},
 | 
			
		||||
	data() {
 | 
			
		||||
		return {
 | 
			
		||||
			chartType:'氧气含量',
 | 
			
		||||
			chartTime:'日',
 | 
			
		||||
			timestr: ''
 | 
			
		||||
			chartType: '氧气含量',
 | 
			
		||||
			chartTime: '日',
 | 
			
		||||
			timestr: '',
 | 
			
		||||
		};
 | 
			
		||||
	},
 | 
			
		||||
	computed: {
 | 
			
		||||
		exhaustGasInfo() {
 | 
			
		||||
			return this.$store.state.websocket.exhaustGasInfo
 | 
			
		||||
		}
 | 
			
		||||
			return this.$store.state.websocket.exhaustGasInfo;
 | 
			
		||||
		},
 | 
			
		||||
	},
 | 
			
		||||
	mounted() {
 | 
			
		||||
    this.timestr = switchShowTime(this.chartTime)
 | 
			
		||||
  },
 | 
			
		||||
		this.timestr = switchShowTime(this.chartTime);
 | 
			
		||||
	},
 | 
			
		||||
	methods: {
 | 
			
		||||
		// 烟气
 | 
			
		||||
		toggleType(val) {
 | 
			
		||||
			console.log('烟气' + val)
 | 
			
		||||
			this.chartType = val
 | 
			
		||||
			console.log('烟气' + val);
 | 
			
		||||
			this.chartType = val;
 | 
			
		||||
		},
 | 
			
		||||
		// 切换时间
 | 
			
		||||
		toggleDate(val) {
 | 
			
		||||
			this.chartTime = val
 | 
			
		||||
			this.timestr = switchShowTime(val)
 | 
			
		||||
			this.chartTime = val;
 | 
			
		||||
			this.timestr = switchShowTime(val);
 | 
			
		||||
		},
 | 
			
		||||
		// 数据更新
 | 
			
		||||
    dateUpdate() {
 | 
			
		||||
      this.timestr = switchShowTime(this.chartTime)
 | 
			
		||||
    }
 | 
			
		||||
		dateUpdate() {
 | 
			
		||||
			this.timestr = switchShowTime(this.chartTime);
 | 
			
		||||
		},
 | 
			
		||||
	},
 | 
			
		||||
};
 | 
			
		||||
</script>
 | 
			
		||||
 | 
			
		||||
<style scoped lang="scss">
 | 
			
		||||
.timeShow {
 | 
			
		||||
  position: absolute;
 | 
			
		||||
  top: 20px;
 | 
			
		||||
  left: 170px;
 | 
			
		||||
}
 | 
			
		||||
.gas-handle {
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -3,6 +3,9 @@
 | 
			
		||||
		name="原料用量统计"
 | 
			
		||||
		size="middle"
 | 
			
		||||
		style="">
 | 
			
		||||
		<TimePrompt
 | 
			
		||||
			class="timeShow"
 | 
			
		||||
			:timestr="timestr" />
 | 
			
		||||
		<div style="flex: 1; display: flex; gap: 8px; flex-direction: column">
 | 
			
		||||
			<div
 | 
			
		||||
				class="absolute"
 | 
			
		||||
@@ -10,8 +13,8 @@
 | 
			
		||||
					flex: 2;
 | 
			
		||||
					padding: 12px 12px 0 12px;
 | 
			
		||||
					display: grid;
 | 
			
		||||
					grid-template-columns: repeat(2, 1fr);
 | 
			
		||||
					grid-auto-rows: repeat(4, 1fr);
 | 
			
		||||
					grid-template-columns: repeat(3, 1fr);
 | 
			
		||||
					grid-auto-rows: repeat(3, 1fr);
 | 
			
		||||
					gap: 8px;
 | 
			
		||||
				">
 | 
			
		||||
				<ShadowRect
 | 
			
		||||
@@ -22,7 +25,8 @@
 | 
			
		||||
						class="material"
 | 
			
		||||
						style="
 | 
			
		||||
							flex: 1;
 | 
			
		||||
							padding-bottom: 3px;
 | 
			
		||||
							padding-bottom: 18px;
 | 
			
		||||
							padding-top: 18px;
 | 
			
		||||
							display: flex;
 | 
			
		||||
							flex-direction: column;
 | 
			
		||||
							gap: 4px;
 | 
			
		||||
@@ -53,20 +57,33 @@
 | 
			
		||||
<script>
 | 
			
		||||
import Container from '../components/Container';
 | 
			
		||||
import ShadowRect from '../components/ShadowRect.vue';
 | 
			
		||||
import TimePrompt from '../components/TimePrompt';
 | 
			
		||||
import { switchShowTime } from '../utils';
 | 
			
		||||
export default {
 | 
			
		||||
	name: 'MaterialCost',
 | 
			
		||||
	components: { Container, ShadowRect },
 | 
			
		||||
	components: { Container, ShadowRect, TimePrompt },
 | 
			
		||||
	props: {},
 | 
			
		||||
	data() {
 | 
			
		||||
		return {};
 | 
			
		||||
		return {
 | 
			
		||||
			timestr: '',
 | 
			
		||||
		};
 | 
			
		||||
	},
 | 
			
		||||
	computed: {
 | 
			
		||||
		materialMsg() {
 | 
			
		||||
			return this.$store.state.websocket.material;
 | 
			
		||||
		},
 | 
			
		||||
	},
 | 
			
		||||
	mounted() {
 | 
			
		||||
		this.timestr = switchShowTime('日');
 | 
			
		||||
	},
 | 
			
		||||
	methods: {},
 | 
			
		||||
};
 | 
			
		||||
</script>
 | 
			
		||||
 | 
			
		||||
<style scoped lang="scss"></style>
 | 
			
		||||
<style lang="scss" scoped>
 | 
			
		||||
.timeShow {
 | 
			
		||||
	position: absolute;
 | 
			
		||||
	top: 20px;
 | 
			
		||||
	left: 210px;
 | 
			
		||||
}
 | 
			
		||||
</style>
 | 
			
		||||
 
 | 
			
		||||
@@ -29,6 +29,8 @@ export const switchShowTime = (type) => {
 | 
			
		||||
      }
 | 
			
		||||
      if (lastMonth === 12) {
 | 
			
		||||
        startYear = currentYear - 1
 | 
			
		||||
      }else{
 | 
			
		||||
        startYear = currentYear
 | 
			
		||||
      }
 | 
			
		||||
      startTime = startYear+'.'+lastMonth+'.'+day
 | 
			
		||||
      endTime = currentYear+'.'+(nowTime.getMonth()+1)+'.28'
 | 
			
		||||
 
 | 
			
		||||
@@ -1,70 +1,94 @@
 | 
			
		||||
<template>
 | 
			
		||||
  <div style="flex: 1;" class="orderContainer">
 | 
			
		||||
    <Container name="订单完成情况" size="small" style="">
 | 
			
		||||
      <TimePrompt class="timeShow" :timestr="timestr" />
 | 
			
		||||
      <div style="padding: 5px 10px;">
 | 
			
		||||
        <dv-scroll-board :config="config" style="width:575px;height:230px" ref='orderScrollBoard'/>
 | 
			
		||||
      </div>
 | 
			
		||||
    </Container>
 | 
			
		||||
  </div>
 | 
			
		||||
	<div
 | 
			
		||||
		style="flex: 1"
 | 
			
		||||
		class="orderContainer">
 | 
			
		||||
		<Container
 | 
			
		||||
			name="订单完成情况"
 | 
			
		||||
			size="small"
 | 
			
		||||
			style="">
 | 
			
		||||
			<TimePrompt
 | 
			
		||||
				class="timeShow"
 | 
			
		||||
				:timestr="timestr" />
 | 
			
		||||
			<div style="padding: 5px 10px">
 | 
			
		||||
				<dv-scroll-board
 | 
			
		||||
					:config="config"
 | 
			
		||||
					style="width: 575px; height: 230px"
 | 
			
		||||
					ref="orderScrollBoard" />
 | 
			
		||||
			</div>
 | 
			
		||||
		</Container>
 | 
			
		||||
	</div>
 | 
			
		||||
</template>
 | 
			
		||||
<script>
 | 
			
		||||
import Container from '../components/Container'
 | 
			
		||||
import Container from '../components/Container';
 | 
			
		||||
import TimePrompt from '../components/TimePrompt';
 | 
			
		||||
import { formatDate } from '@/utils'
 | 
			
		||||
import { switchShowTime } from '../utils'
 | 
			
		||||
import { formatDate } from '@/utils';
 | 
			
		||||
import { switchShowTime } from '../utils';
 | 
			
		||||
export default {
 | 
			
		||||
  name: 'OrderStatus',
 | 
			
		||||
  components: { Container, TimePrompt },
 | 
			
		||||
  computed: {
 | 
			
		||||
    order() {
 | 
			
		||||
      return this.$store.state.websocket.order
 | 
			
		||||
    }
 | 
			
		||||
  },
 | 
			
		||||
  data() {
 | 
			
		||||
    return {
 | 
			
		||||
      timestr: '',
 | 
			
		||||
      config: {
 | 
			
		||||
        header: ['上线时间', '客户名称', '规格','完成度'],
 | 
			
		||||
        headerBGC: 'rgba(32, 55, 96, 0.8)',
 | 
			
		||||
        oddRowBGC: 'rgba(32, 55, 96, 0.8)',
 | 
			
		||||
        evenRowBGC: 'rgba(14, 32, 62, 0.8)',
 | 
			
		||||
        columnWidth: [155, 160, 150],
 | 
			
		||||
        data: [],
 | 
			
		||||
        rowNum: 6
 | 
			
		||||
      }
 | 
			
		||||
    }
 | 
			
		||||
  },
 | 
			
		||||
  mounted() {
 | 
			
		||||
    this.timestr = switchShowTime('日')
 | 
			
		||||
  },
 | 
			
		||||
  watch:{
 | 
			
		||||
    order:{
 | 
			
		||||
      handler() {
 | 
			
		||||
        let outArr = this.order.map((item) => [
 | 
			
		||||
        formatDate(item.planStartTime) || '',
 | 
			
		||||
          `<span title=${item.customerName || ''}>${item.customerName || ''}</span>`,
 | 
			
		||||
          `<span title=${item.specifications || ''}>${item.specifications || ''}</span>`,
 | 
			
		||||
          `<span style="display:inline-block;width:60px;">${item.completeRate?(item.completeRate*100).toFixed(2)+'%':'0%'}</span>
 | 
			
		||||
	name: 'OrderStatus',
 | 
			
		||||
	components: { Container, TimePrompt },
 | 
			
		||||
	computed: {
 | 
			
		||||
		order() {
 | 
			
		||||
			return this.$store.state.websocket.order;
 | 
			
		||||
		},
 | 
			
		||||
	},
 | 
			
		||||
	data() {
 | 
			
		||||
		return {
 | 
			
		||||
			timestr: '',
 | 
			
		||||
			config: {
 | 
			
		||||
				header: ['上线时间', '客户名称', '规格', '完成度'],
 | 
			
		||||
				headerBGC: 'rgba(32, 55, 96, 0.8)',
 | 
			
		||||
				oddRowBGC: 'rgba(32, 55, 96, 0.8)',
 | 
			
		||||
				evenRowBGC: 'rgba(14, 32, 62, 0.8)',
 | 
			
		||||
				columnWidth: [155, 160, 150],
 | 
			
		||||
				data: [],
 | 
			
		||||
				rowNum: 6,
 | 
			
		||||
			},
 | 
			
		||||
		};
 | 
			
		||||
	},
 | 
			
		||||
	mounted() {
 | 
			
		||||
		this.timestr = switchShowTime('日');
 | 
			
		||||
	},
 | 
			
		||||
	watch: {
 | 
			
		||||
		order: {
 | 
			
		||||
			handler() {
 | 
			
		||||
				let outArr = this.order.map((item) => [
 | 
			
		||||
					formatDate(item.planStartTime) || '',
 | 
			
		||||
					`<span title=${item.customerName || ''}>${
 | 
			
		||||
						item.customerName || ''
 | 
			
		||||
					}</span>`,
 | 
			
		||||
					`<span title=${item.specifications || ''}>${
 | 
			
		||||
						item.specifications || ''
 | 
			
		||||
					}</span>`,
 | 
			
		||||
					`<span style="display:inline-block;width:60px;">${
 | 
			
		||||
						item.completeRate
 | 
			
		||||
							? (item.completeRate * 100).toFixed(2) + '%'
 | 
			
		||||
							: '0%'
 | 
			
		||||
					}</span>
 | 
			
		||||
          <div style="display:inline-block;height:20px;margin-top:-5px;vertical-align:middle;">
 | 
			
		||||
            <svg xmlns="http://www.w3.org/200/svg" height="20" width="20">
 | 
			
		||||
              <circle cx="10" cy="10" r="6" fill="none" stroke="#283851" stroke-width="4" stroke-linecap="round"/>
 | 
			
		||||
              <circle style="transform-origin: center;transform: rotate(-90deg);" id="J_progress_bar" cx="10" cy="10" r="6" fill="none" stroke="#47FF27" stroke-width="4" stroke-dasharray="${item.completeRate?item.completeRate.toFixed(2)*37.68+','+((1-item.completeRate.toFixed(2))*37.68):(0+','+37.68)}"/>
 | 
			
		||||
              <circle style="transform-origin: center;transform: rotate(-90deg);" id="J_progress_bar" cx="10" cy="10" r="6" fill="none" stroke="#47FF27" stroke-width="4" stroke-dasharray="${
 | 
			
		||||
								item.completeRate
 | 
			
		||||
									? item.completeRate.toFixed(2) * 37.68 +
 | 
			
		||||
									  ',' +
 | 
			
		||||
									  (1 - item.completeRate.toFixed(2)) * 37.68
 | 
			
		||||
									: 0 + ',' + 37.68
 | 
			
		||||
							}"/>
 | 
			
		||||
            </svg>
 | 
			
		||||
          </div>`
 | 
			
		||||
      ]);
 | 
			
		||||
      this.config.data = outArr
 | 
			
		||||
      this.$refs['orderScrollBoard'].updateRows(outArr)
 | 
			
		||||
      this.timestr = switchShowTime('日')
 | 
			
		||||
      }
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
          </div>`,
 | 
			
		||||
				]);
 | 
			
		||||
				this.config.data = outArr;
 | 
			
		||||
				this.$refs['orderScrollBoard'].updateRows(outArr);
 | 
			
		||||
				this.timestr = switchShowTime('日');
 | 
			
		||||
			},
 | 
			
		||||
		},
 | 
			
		||||
	},
 | 
			
		||||
};
 | 
			
		||||
</script>
 | 
			
		||||
<style lang='scss' scoped>
 | 
			
		||||
<style lang="scss" scoped>
 | 
			
		||||
.timeShow {
 | 
			
		||||
  position: absolute;
 | 
			
		||||
  top: 20px;
 | 
			
		||||
  left: 210px;
 | 
			
		||||
	position: absolute;
 | 
			
		||||
	top: 20px;
 | 
			
		||||
	left: 210px;
 | 
			
		||||
}
 | 
			
		||||
</style>
 | 
			
		||||
</style>
 | 
			
		||||
 
 | 
			
		||||
@@ -1,7 +1,7 @@
 | 
			
		||||
<!--
 | 
			
		||||
 * @Author: zhp
 | 
			
		||||
 * @Date: 2024-04-18 14:08:46
 | 
			
		||||
 * @LastEditTime: 2024-04-23 16:18:27
 | 
			
		||||
 * @LastEditTime: 2024-04-24 13:52:45
 | 
			
		||||
 * @LastEditors: zhp
 | 
			
		||||
 * @Description:
 | 
			
		||||
-->
 | 
			
		||||
@@ -25,18 +25,20 @@
 | 
			
		||||
    </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 align="center" prop="" label="配料日报" width="120">
 | 
			
		||||
        <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>
 | 
			
		||||
      <el-table-column prop="putType" label="" width="180">
 | 
			
		||||
      </el-table-column>
 | 
			
		||||
      <!-- <el-table-column prop label="参考标准及评价方法">
 | 
			
		||||
        <el-table-column align="center" 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 style="text-align: center;" v-for="(item,index) in codeList " :prop="item" :label="item">
 | 
			
		||||
        <!-- <template slot-scope="scope">
 | 
			
		||||
        <el-table-column align="center" style="text-align: center;" v-for="(item,index) in codeList " :prop="item"
 | 
			
		||||
          :label="item">
 | 
			
		||||
          <!-- <template slot-scope="scope">
 | 
			
		||||
          <el-col :span="12">
 | 
			
		||||
            {{ codeList[index] }}
 | 
			
		||||
          </el-col>
 | 
			
		||||
@@ -49,6 +51,7 @@
 | 
			
		||||
            </el-col>
 | 
			
		||||
          </el-row>
 | 
			
		||||
        </template> -->
 | 
			
		||||
        </el-table-column>
 | 
			
		||||
      </el-table-column>
 | 
			
		||||
    </el-table>
 | 
			
		||||
    <!-- <pagination :limit.sync="listQuery.pageSize" :page.sync="listQuery.pageNo" :total="listQuery.total"
 | 
			
		||||
@@ -145,7 +148,7 @@ export default {
 | 
			
		||||
          endPlaceholder: '结束时间',
 | 
			
		||||
          param: 'checkTime',
 | 
			
		||||
          defaultSelect: [Date.now() - 24 * 60 * 60 - 1000, Date.now()],
 | 
			
		||||
          width: 250
 | 
			
		||||
          width: 350
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
          type:'button',
 | 
			
		||||
@@ -157,7 +160,7 @@ export default {
 | 
			
		||||
          type:'button',
 | 
			
		||||
          btnName: '导出',
 | 
			
		||||
          name: 'export',
 | 
			
		||||
          color: 'success',
 | 
			
		||||
          color: 'primary',
 | 
			
		||||
          plain: true
 | 
			
		||||
        },
 | 
			
		||||
      ],
 | 
			
		||||
@@ -212,7 +215,7 @@ export default {
 | 
			
		||||
      }
 | 
			
		||||
      }
 | 
			
		||||
      if (columnIndex === 1)  {
 | 
			
		||||
        if (rowIndex === 1 || rowIndex === 3 || rowIndex === 5 || rowIndex === 7 || rowIndex === 9 || rowIndex === 11) {
 | 
			
		||||
        if (rowIndex %2 == 1) {
 | 
			
		||||
          return {
 | 
			
		||||
            rowspan: 1,
 | 
			
		||||
            colspan: 2
 | 
			
		||||
@@ -220,7 +223,7 @@ 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) {
 | 
			
		||||
        if (rowIndex % 2 == 0) {
 | 
			
		||||
          return {
 | 
			
		||||
            rowspan: 2,
 | 
			
		||||
            colspan: 1
 | 
			
		||||
@@ -252,7 +255,7 @@ export default {
 | 
			
		||||
            //返回一个新创建的 Blob 对象,其内容由参数中给定的数组串联组成。
 | 
			
		||||
            new Blob([wbout], { type: "application/octet-stream" }),
 | 
			
		||||
            //设置导出文件名称
 | 
			
		||||
            "原片各线堆垛表.xlsx"
 | 
			
		||||
            "切割堆垛日报表.xlsx"
 | 
			
		||||
          );
 | 
			
		||||
        } catch (e) {
 | 
			
		||||
          if (typeof console !== "undefined") console.log(e, wbout);
 | 
			
		||||
@@ -558,11 +561,13 @@ export default {
 | 
			
		||||
  background: none;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
::v-deep.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;
 | 
			
		||||
} */
 | 
			
		||||
::v-deep.el-table thead.is-group tr:nth-child(2) th:nth-child(1) {
 | 
			
		||||
  border-bottom: none;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
::v-deep.el-table thead.is-group tr:first-of-type th:first-of-type:before {
 | 
			
		||||
::v-deep.el-table thead.is-group tr:nth-child(2) th:first-of-type:before {
 | 
			
		||||
  content: '';
 | 
			
		||||
  position: absolute;
 | 
			
		||||
  width: 1px;
 | 
			
		||||
@@ -578,7 +583,7 @@ export default {
 | 
			
		||||
  transform-origin: top;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
::v-deep.el-table thead.is-group tr:last-of-type th:first-of-type:before {
 | 
			
		||||
::v-deep.el-table thead.is-group tr:nth-child(3) th:first-of-type:before {
 | 
			
		||||
  content: '';
 | 
			
		||||
  position: absolute;
 | 
			
		||||
  width: 1px;
 | 
			
		||||
 
 | 
			
		||||
@@ -1,7 +1,7 @@
 | 
			
		||||
<!--
 | 
			
		||||
 * @Author: zhp
 | 
			
		||||
 * @Date: 2024-04-18 10:01:33
 | 
			
		||||
 * @LastEditTime: 2024-04-23 15:15:22
 | 
			
		||||
 * @LastEditTime: 2024-04-24 09:34:36
 | 
			
		||||
 * @LastEditors: zhp
 | 
			
		||||
 * @Description:
 | 
			
		||||
-->
 | 
			
		||||
@@ -41,6 +41,7 @@ import {
 | 
			
		||||
} from '@/api/report/qcReport';
 | 
			
		||||
import tableHeightMixin from '@/mixins/lb/tableHeightMixin';
 | 
			
		||||
import FileSaver from 'file-saver'
 | 
			
		||||
import { parseTime } from '../../../core/mixins/code-filter';
 | 
			
		||||
// import { getList, } from "@/api/base/qualityScrapType";
 | 
			
		||||
const tableProps = [
 | 
			
		||||
  // {
 | 
			
		||||
@@ -70,7 +71,7 @@ const tableProps = [
 | 
			
		||||
      },
 | 
			
		||||
      {
 | 
			
		||||
        prop: 'thickness',
 | 
			
		||||
        label: '厚度'
 | 
			
		||||
        label: '厚度mm'
 | 
			
		||||
      },
 | 
			
		||||
      {
 | 
			
		||||
        prop: 'glassCode',
 | 
			
		||||
@@ -79,7 +80,9 @@ const tableProps = [
 | 
			
		||||
      {
 | 
			
		||||
        prop: 'stackingType',
 | 
			
		||||
        label: '堆垛方式',
 | 
			
		||||
        filter: (val) => val == 1 ? '集装架' : '堵头箱',
 | 
			
		||||
        // filter: (val) =>
 | 
			
		||||
        //   val != null ? ['集装架', '堵头箱'][val] : '',
 | 
			
		||||
        // filter: ((val) => { val == 1 ? '集装架' : '堵头箱' }),
 | 
			
		||||
      },
 | 
			
		||||
      {
 | 
			
		||||
        prop: 'pieces',
 | 
			
		||||
@@ -95,16 +98,16 @@ const tableProps = [
 | 
			
		||||
      },
 | 
			
		||||
      {
 | 
			
		||||
        prop: 'dusting',
 | 
			
		||||
        label: '堆垛情况',
 | 
			
		||||
        label: '喷粉情况',
 | 
			
		||||
      },
 | 
			
		||||
      {
 | 
			
		||||
        prop: 'palletNumber',
 | 
			
		||||
        label: '堆垛时间',
 | 
			
		||||
      },
 | 
			
		||||
      {
 | 
			
		||||
        prop: 'endTime',
 | 
			
		||||
        label: '集装架号',
 | 
			
		||||
      },
 | 
			
		||||
      {
 | 
			
		||||
        prop: 'remark',
 | 
			
		||||
        label: '备注',
 | 
			
		||||
      }
 | 
			
		||||
    ]
 | 
			
		||||
  }
 | 
			
		||||
];
 | 
			
		||||
@@ -318,7 +321,23 @@ export default {
 | 
			
		||||
        //   //   console.log();
 | 
			
		||||
        //   // }
 | 
			
		||||
        // })
 | 
			
		||||
        this.tableData = response.data
 | 
			
		||||
        this.tableData = response.data.map((ele) => {
 | 
			
		||||
          return {
 | 
			
		||||
            lineName: ele.lineName,
 | 
			
		||||
            className: ele.className,
 | 
			
		||||
            groupName: ele.groupName,
 | 
			
		||||
            size: ele.size,
 | 
			
		||||
            thickness: ele.thickness,
 | 
			
		||||
            glassCode: ele.glassCode,
 | 
			
		||||
            stackingType: ele.stackingType == 1 ? '集装架' : '堵头箱',
 | 
			
		||||
            pieces: ele.pieces,
 | 
			
		||||
            originCode: ele.originCode,
 | 
			
		||||
            endTime: parseTime(ele.endTime),
 | 
			
		||||
            dusting: ele.dusting,
 | 
			
		||||
            palletNumber: ele.palletNumber,
 | 
			
		||||
            remark:ele.remark
 | 
			
		||||
          }
 | 
			
		||||
        })
 | 
			
		||||
        // let obj = {}
 | 
			
		||||
        // response.data.reduce((prev, curr) => {
 | 
			
		||||
        //   console.log(prev, curr)
 | 
			
		||||
@@ -405,12 +424,12 @@ 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;
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -1,14 +1,14 @@
 | 
			
		||||
<!--
 | 
			
		||||
 * @Author: zhp
 | 
			
		||||
 * @Date: 2024-04-18 14:08:46
 | 
			
		||||
 * @LastEditTime: 2024-04-23 15:08:44
 | 
			
		||||
 * @LastEditTime: 2024-04-24 14:41:01
 | 
			
		||||
 * @LastEditors: zhp
 | 
			
		||||
 * @Description:
 | 
			
		||||
-->
 | 
			
		||||
<template>
 | 
			
		||||
  <div class="app-container">
 | 
			
		||||
    <el-form :model="listQuery" :inline="true" ref="dataForm" class="blueTip">
 | 
			
		||||
      <el-form-item label="日" prop="startTime">
 | 
			
		||||
      <el-form-item label="时间" prop="startTime">
 | 
			
		||||
        <el-date-picker v-model="listQuery.startTime" value-format="timestamp" type="date" placeholder="选择日期">
 | 
			
		||||
        </el-date-picker>
 | 
			
		||||
      </el-form-item>
 | 
			
		||||
@@ -61,7 +61,12 @@
 | 
			
		||||
      </el-table-column>
 | 
			
		||||
      <div slot="append" v-if="this.tableData.length != 0" style="text-align: center">
 | 
			
		||||
        <!--在此处添加你想要插入在表格最后一行的内容-->
 | 
			
		||||
 | 
			
		||||
        <el-col :span="8">
 | 
			
		||||
          人工监测人员
 | 
			
		||||
        </el-col>
 | 
			
		||||
        <el-col :span="8">
 | 
			
		||||
          <!-- {{  }} -->
 | 
			
		||||
        </el-col>
 | 
			
		||||
        <el-col :span="8">
 | 
			
		||||
          合计
 | 
			
		||||
        </el-col>
 | 
			
		||||
@@ -205,7 +210,7 @@ export default {
 | 
			
		||||
          prop: 'num11'
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
          label: '合计',
 | 
			
		||||
          label: '不良合计',
 | 
			
		||||
          prop: 'sum'
 | 
			
		||||
        }
 | 
			
		||||
      ],
 | 
			
		||||
@@ -234,7 +239,7 @@ export default {
 | 
			
		||||
          type: 'button',
 | 
			
		||||
          btnName: '导出',
 | 
			
		||||
          name: 'export',
 | 
			
		||||
          color: 'success',
 | 
			
		||||
          color: 'primary',
 | 
			
		||||
          plain: true
 | 
			
		||||
        },
 | 
			
		||||
      ],
 | 
			
		||||
@@ -305,8 +310,9 @@ export default {
 | 
			
		||||
      return y + '-' + m + '-' + d + ' ' + h + ':' + minute + ':' + second;
 | 
			
		||||
    },
 | 
			
		||||
    handleGetClass(e) {
 | 
			
		||||
 | 
			
		||||
      this.listQuery.startTime = new Date(new Date().setHours(0, 7, 0, 0)).getTime()
 | 
			
		||||
      let str = this.listQuery.startTime
 | 
			
		||||
      // console.log(str);
 | 
			
		||||
      this.listQuery.startTime = new Date(new Date(str).setHours(0, 7, 0, 0)).getTime()
 | 
			
		||||
      // console.log(startTime1)
 | 
			
		||||
      this.codeList = []
 | 
			
		||||
      if (e === '早班查询') {
 | 
			
		||||
@@ -360,7 +366,7 @@ export default {
 | 
			
		||||
            prop: 'num11'
 | 
			
		||||
          },
 | 
			
		||||
          {
 | 
			
		||||
            label: '合计',
 | 
			
		||||
            label: '不良合计',
 | 
			
		||||
            prop: 'sum'
 | 
			
		||||
          }
 | 
			
		||||
        ]
 | 
			
		||||
@@ -369,8 +375,9 @@ export default {
 | 
			
		||||
        ])
 | 
			
		||||
        this.getDataList()
 | 
			
		||||
      } else {
 | 
			
		||||
        // this.codeList = []
 | 
			
		||||
        this.listQuery.startTime = new Date(new Date().setHours(1, 9, 0, 0)).getTime()
 | 
			
		||||
        let str = this.listQuery.startTime
 | 
			
		||||
        // console.log(str);
 | 
			
		||||
        this.listQuery.startTime = new Date(new Date(str).setHours(0, 7, 0, 0)).getTime()
 | 
			
		||||
       let  arr = [
 | 
			
		||||
          {
 | 
			
		||||
           label: '19:00',
 | 
			
		||||
@@ -422,7 +429,7 @@ export default {
 | 
			
		||||
            prop: 'num11'
 | 
			
		||||
         },
 | 
			
		||||
         {
 | 
			
		||||
           label: '合计',
 | 
			
		||||
           label: '不良合计',
 | 
			
		||||
           prop: 'sum'
 | 
			
		||||
         }
 | 
			
		||||
        ]
 | 
			
		||||
@@ -477,6 +484,15 @@ export default {
 | 
			
		||||
    // },
 | 
			
		||||
    // 获取数据列表
 | 
			
		||||
    getDataList() {
 | 
			
		||||
      if (this.radio === '晚班查询') {
 | 
			
		||||
        let str = this.listQuery.startTime
 | 
			
		||||
        // console.log(str);
 | 
			
		||||
        this.listQuery.startTime = new Date(new Date(str).setHours(1, 9, 0, 0)).getTime()
 | 
			
		||||
      } else {
 | 
			
		||||
        let str = this.listQuery.startTime
 | 
			
		||||
        // console.log(str);
 | 
			
		||||
        this.listQuery.startTime = new Date(new Date(str).setHours(0, 7, 0, 0)).getTime()
 | 
			
		||||
      }
 | 
			
		||||
      this.dataListLoading = true;
 | 
			
		||||
      // this.listQuery.startTime = '1713197388000';
 | 
			
		||||
      // this.listQuery.endTime = '1713254961000';
 | 
			
		||||
 
 | 
			
		||||
@@ -1,7 +1,7 @@
 | 
			
		||||
<!--
 | 
			
		||||
 * @Author: zhp
 | 
			
		||||
 * @Date: 2024-04-18 10:01:33
 | 
			
		||||
 * @LastEditTime: 2024-04-23 15:15:45
 | 
			
		||||
 * @LastEditTime: 2024-04-24 09:56:20
 | 
			
		||||
 * @LastEditors: zhp
 | 
			
		||||
 * @Description:
 | 
			
		||||
-->
 | 
			
		||||
@@ -11,9 +11,10 @@
 | 
			
		||||
    <el-table :header-cell-style="{
 | 
			
		||||
      background: '#F2F4F9',
 | 
			
		||||
      color: '#606266'
 | 
			
		||||
    }" class="baseTable" :max-height="tableH" id="exportTable" :data="tableData" style="width: 100%"
 | 
			
		||||
    }" class="baseTable" border :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 :width="item.width" v-for="item in tableProps" :prop="item.prop" :label="item.label"
 | 
			
		||||
        align="center">
 | 
			
		||||
      </el-table-column>
 | 
			
		||||
    </el-table>
 | 
			
		||||
    <!-- <pagination :limit.sync="listQuery.pageSize" :page.sync="listQuery.pageNo" :total="listQuery.total"
 | 
			
		||||
@@ -39,6 +40,7 @@ import {
 | 
			
		||||
  getOriginalLineDataList
 | 
			
		||||
} from '@/api/report/qcReport';
 | 
			
		||||
import tableHeightMixin from '@/mixins/lb/tableHeightMixin';
 | 
			
		||||
import { width } from '@antv/x6-common/lib/dom/position';
 | 
			
		||||
import FileSaver from 'file-saver'
 | 
			
		||||
// import { getList, } from "@/api/base/qualityScrapType";
 | 
			
		||||
const tableProps = [
 | 
			
		||||
@@ -49,11 +51,13 @@ const tableProps = [
 | 
			
		||||
  // },
 | 
			
		||||
  {
 | 
			
		||||
    prop: 'lineName',
 | 
			
		||||
    label: '产线'
 | 
			
		||||
    label: '产线',
 | 
			
		||||
    width:'100'
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    prop: 'equipmentName',
 | 
			
		||||
    label: ''
 | 
			
		||||
    label: '',
 | 
			
		||||
    width: '200'
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    prop: 'num',
 | 
			
		||||
@@ -122,7 +126,7 @@ export default {
 | 
			
		||||
          type: 'datePicker',
 | 
			
		||||
          label: '时间段',
 | 
			
		||||
          dateType: 'daterange',
 | 
			
		||||
          format: 'yyyy-MM-dd HH:mm:ss',
 | 
			
		||||
          // format: 'yyyy-MM-dd HH:mm:ss',
 | 
			
		||||
          valueFormat: "timestamp",
 | 
			
		||||
          rangeSeparator: '-',
 | 
			
		||||
          startPlaceholder: '开始时间',
 | 
			
		||||
@@ -154,7 +158,7 @@ export default {
 | 
			
		||||
          type:'button',
 | 
			
		||||
          btnName: '导出',
 | 
			
		||||
          name: 'export',
 | 
			
		||||
          color: 'success',
 | 
			
		||||
          color: 'primary',
 | 
			
		||||
          plain: true
 | 
			
		||||
        },
 | 
			
		||||
      ],
 | 
			
		||||
 
 | 
			
		||||
@@ -1,19 +1,19 @@
 | 
			
		||||
<!--
 | 
			
		||||
 * @Author: zhp
 | 
			
		||||
 * @Date: 2024-04-18 15:07:53
 | 
			
		||||
 * @LastEditTime: 2024-04-23 15:15:52
 | 
			
		||||
 * @LastEditTime: 2024-04-24 09:58:07
 | 
			
		||||
 * @LastEditors: zhp
 | 
			
		||||
 * @Description:
 | 
			
		||||
-->
 | 
			
		||||
<template>
 | 
			
		||||
  <div class="app-container">
 | 
			
		||||
    <search-bar :formConfigs="formConfig" ref="searchBarForm" @headBtnClick="buttonClick" />
 | 
			
		||||
    <el-table show-summary :header-cell-style="{
 | 
			
		||||
    <el-table :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">
 | 
			
		||||
    }" class="baseTable" border id="exportTable" :data="tableData" style="width: 100%" :span-method="objectSpanMethod">
 | 
			
		||||
      <el-table-column :width="item.width" v-for="item in tableProps" :prop="item.prop" :label="item.label"
 | 
			
		||||
        align="center">
 | 
			
		||||
      </el-table-column>
 | 
			
		||||
    </el-table>
 | 
			
		||||
    <!-- <pagination :limit.sync="listQuery.pageSize" :page.sync="listQuery.pageNo" :total="listQuery.total"
 | 
			
		||||
@@ -49,11 +49,13 @@ const tableProps = [
 | 
			
		||||
  // },
 | 
			
		||||
  {
 | 
			
		||||
    prop: 'lineName',
 | 
			
		||||
    label: '产线'
 | 
			
		||||
    label: '产线',
 | 
			
		||||
    width:'150',
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    prop: 'dataType',
 | 
			
		||||
    label: ''
 | 
			
		||||
    label: '',
 | 
			
		||||
    width: '150',
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    prop: 'type',
 | 
			
		||||
@@ -69,7 +71,7 @@ const tableProps = [
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    prop: 'rate',
 | 
			
		||||
    label: '占比',
 | 
			
		||||
    label: '占比%',
 | 
			
		||||
    // filter: (val) => val == false ? '不合格' : '合格',
 | 
			
		||||
  },
 | 
			
		||||
  // {
 | 
			
		||||
@@ -121,7 +123,7 @@ export default {
 | 
			
		||||
          type: 'datePicker',
 | 
			
		||||
          label: '时间段',
 | 
			
		||||
          dateType: 'daterange',
 | 
			
		||||
          format: 'yyyy-MM-dd HH:mm:ss',
 | 
			
		||||
          // format: 'yyyy-MM-dd HH:mm:ss',
 | 
			
		||||
          valueFormat: "timestamp",
 | 
			
		||||
          rangeSeparator: '-',
 | 
			
		||||
          startPlaceholder: '开始时间',
 | 
			
		||||
@@ -153,7 +155,7 @@ export default {
 | 
			
		||||
          type:'button',
 | 
			
		||||
          btnName: '导出',
 | 
			
		||||
          name: 'export',
 | 
			
		||||
          color: 'success',
 | 
			
		||||
          color: 'primary',
 | 
			
		||||
          plain: true
 | 
			
		||||
        },
 | 
			
		||||
      ],
 | 
			
		||||
@@ -179,34 +181,6 @@ export default {
 | 
			
		||||
      console.log(res)
 | 
			
		||||
      this.formConfig[1].selectOptions = res.data
 | 
			
		||||
    },
 | 
			
		||||
    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;
 | 
			
		||||
      let spanTwoArr = [], concatTwo = 0;
 | 
			
		||||
@@ -276,7 +250,7 @@ export default {
 | 
			
		||||
            //返回一个新创建的 Blob 对象,其内容由参数中给定的数组串联组成。
 | 
			
		||||
            new Blob([wbout], { type: "application/octet-stream" }),
 | 
			
		||||
            //设置导出文件名称
 | 
			
		||||
            "原片各线堆垛表.xlsx"
 | 
			
		||||
            "原片各线优化切割堆垛表.xlsx"
 | 
			
		||||
          );
 | 
			
		||||
        } catch (e) {
 | 
			
		||||
          if (typeof console !== "undefined") console.log(e, wbout);
 | 
			
		||||
@@ -319,7 +293,7 @@ export default {
 | 
			
		||||
            type: ele.type,
 | 
			
		||||
            pieces: ele.pieces,
 | 
			
		||||
            area: ele.area,
 | 
			
		||||
            rate: ele.rate
 | 
			
		||||
            rate: (ele.rate * 100).toFixed(2)
 | 
			
		||||
            // useNum: ele.useNum,
 | 
			
		||||
            // num: ele.num,
 | 
			
		||||
            // size: typeof (ele.size)
 | 
			
		||||
@@ -412,13 +386,14 @@ 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;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
</style>
 | 
			
		||||
 
 | 
			
		||||
@@ -111,7 +111,10 @@ const mesEN = new WsConnect(
 | 
			
		||||
    if (msgData == null) return;
 | 
			
		||||
    switch (msgData?.type) {
 | 
			
		||||
      case "EnergyInfo": {
 | 
			
		||||
        store.dispatch({ type: "websocket/setEnergyInfo", payload: msgData.data })
 | 
			
		||||
        let keys = Object.keys(msgData.data)
 | 
			
		||||
        if (keys.includes('elecQty1') || keys.includes('waterQty')) {
 | 
			
		||||
          store.dispatch({ type: "websocket/setEnergyInfo", payload: msgData.data })
 | 
			
		||||
        }
 | 
			
		||||
        break;
 | 
			
		||||
      }
 | 
			
		||||
      case "EnergyTrend": {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user