|
@@ -24,97 +24,122 @@
|
|
<el-table-column label="H109 OUT" align="center" prop="h109Out" :show-overflow-tooltip="true">
|
|
<el-table-column label="H109 OUT" align="center" prop="h109Out" :show-overflow-tooltip="true">
|
|
<el-table-column v-for="(item,index) in 8" :label="'PASS '+(index+1).toString()" align="center" width="80">
|
|
<el-table-column v-for="(item,index) in 8" :label="'PASS '+(index+1).toString()" align="center" width="80">
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
- <span v-if="scope.row.h109Out[index]>=1080" style="color:red;">{{scope.row.h109Out[index]}}</span>
|
|
|
|
- <span v-if="scope.row.h109Out[index]<1080">{{scope.row.h109Out[index]}}</span>
|
|
|
|
|
|
+ <span @click="handleCoilAnalysis('H109', (index+1).toString())" v-if="scope.row.h109Out[index]>=1080" style="color:red;">{{scope.row.h109Out[index]}}</span>
|
|
|
|
+ <span @click="handleCoilAnalysis('H109', (index+1).toString())" v-if="scope.row.h109Out[index]<1080">{{scope.row.h109Out[index]}}</span>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<el-table-column label="H110 OUT" align="center" prop="h110Out" :show-overflow-tooltip="true">
|
|
<el-table-column label="H110 OUT" align="center" prop="h110Out" :show-overflow-tooltip="true">
|
|
<el-table-column v-for="(item,index) in 8" :label="'PASS '+(index+1).toString()" align="center" width="80">
|
|
<el-table-column v-for="(item,index) in 8" :label="'PASS '+(index+1).toString()" align="center" width="80">
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
- <span v-if="scope.row.h110Out[index]>=1080" style="color:red;">{{scope.row.h110Out[index]}}</span>
|
|
|
|
- <span v-if="scope.row.h110Out[index]<1080">{{scope.row.h110Out[index]}}</span>
|
|
|
|
|
|
+ <span @click="handleCoilAnalysis('H110', (index+1).toString())" v-if="scope.row.h110Out[index]>=1080" style="color:red;">{{scope.row.h110Out[index]}}</span>
|
|
|
|
+ <span @click="handleCoilAnalysis('H110', (index+1).toString())" v-if="scope.row.h110Out[index]<1080">{{scope.row.h110Out[index]}}</span>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<el-table-column label="H111 OUT" align="center" prop="h111Out" :show-overflow-tooltip="true">
|
|
<el-table-column label="H111 OUT" align="center" prop="h111Out" :show-overflow-tooltip="true">
|
|
<el-table-column v-for="(item,index) in 8" :label="'PASS '+(index+1).toString()" align="center" width="80">
|
|
<el-table-column v-for="(item,index) in 8" :label="'PASS '+(index+1).toString()" align="center" width="80">
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
- <span v-if="scope.row.h111Out[index]>=1080" style="color:red;">{{scope.row.h111Out[index]}}</span>
|
|
|
|
- <span v-if="scope.row.h111Out[index]<1080">{{scope.row.h111Out[index]}}</span>
|
|
|
|
|
|
+ <span @click="handleCoilAnalysis('H111', (index+1).toString())" v-if="scope.row.h111Out[index]>=1080" style="color:red;">{{scope.row.h111Out[index]}}</span>
|
|
|
|
+ <span @click="handleCoilAnalysis('H111', (index+1).toString())" v-if="scope.row.h111Out[index]<1080">{{scope.row.h111Out[index]}}</span>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<el-table-column label="H112 OUT" align="center" prop="h112Out" :show-overflow-tooltip="true">
|
|
<el-table-column label="H112 OUT" align="center" prop="h112Out" :show-overflow-tooltip="true">
|
|
<el-table-column v-for="(item,index) in 8" :label="'PASS '+(index+1).toString()" align="center" width="80">
|
|
<el-table-column v-for="(item,index) in 8" :label="'PASS '+(index+1).toString()" align="center" width="80">
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
- <span v-if="scope.row.h112Out[index]>=1080" style="color:red;">{{scope.row.h112Out[index]}}</span>
|
|
|
|
- <span v-if="scope.row.h112Out[index]<1080">{{scope.row.h112Out[index]}}</span>
|
|
|
|
|
|
+ <span @click="handleCoilAnalysis('H112', (index+1).toString())" v-if="scope.row.h112Out[index]>=1080" style="color:red;">{{scope.row.h112Out[index]}}</span>
|
|
|
|
+ <span @click="handleCoilAnalysis('H112', (index+1).toString())" v-if="scope.row.h112Out[index]<1080">{{scope.row.h112Out[index]}}</span>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<el-table-column label="H113 OUT" align="center" prop="h113Out" :show-overflow-tooltip="true">
|
|
<el-table-column label="H113 OUT" align="center" prop="h113Out" :show-overflow-tooltip="true">
|
|
<el-table-column v-for="(item,index) in 8" :label="'PASS '+(index+1).toString()" align="center" width="80">
|
|
<el-table-column v-for="(item,index) in 8" :label="'PASS '+(index+1).toString()" align="center" width="80">
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
- <span v-if="scope.row.h113Out[index]>=1080" style="color:red;">{{scope.row.h113Out[index]}}</span>
|
|
|
|
- <span v-if="scope.row.h113Out[index]<1080">{{scope.row.h113Out[index]}}</span>
|
|
|
|
|
|
+ <span @click="handleCoilAnalysis('H113', (index+1).toString())" v-if="scope.row.h113Out[index]>=1080" style="color:red;">{{scope.row.h113Out[index]}}</span>
|
|
|
|
+ <span @click="handleCoilAnalysis('H113', (index+1).toString())" v-if="scope.row.h113Out[index]<1080">{{scope.row.h113Out[index]}}</span>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<el-table-column label="H114 OUT" align="center" prop="h114Out" :show-overflow-tooltip="true">
|
|
<el-table-column label="H114 OUT" align="center" prop="h114Out" :show-overflow-tooltip="true">
|
|
<el-table-column v-for="(item,index) in 8" :label="'PASS '+(index+1).toString()" align="center" width="80">
|
|
<el-table-column v-for="(item,index) in 8" :label="'PASS '+(index+1).toString()" align="center" width="80">
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
- <span v-if="scope.row.h114Out[index]>=1080" style="color:red;">{{scope.row.h114Out[index]}}</span>
|
|
|
|
- <span v-if="scope.row.h114Out[index]<1080">{{scope.row.h114Out[index]}}</span>
|
|
|
|
|
|
+ <span @click="handleCoilAnalysis('H114', (index+1).toString())" v-if="scope.row.h114Out[index]>=1080" style="color:red;">{{scope.row.h114Out[index]}}</span>
|
|
|
|
+ <span @click="handleCoilAnalysis('H114', (index+1).toString())" v-if="scope.row.h114Out[index]<1080">{{scope.row.h114Out[index]}}</span>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<el-table-column label="H115 OUT" align="center" prop="h115Out" :show-overflow-tooltip="true">
|
|
<el-table-column label="H115 OUT" align="center" prop="h115Out" :show-overflow-tooltip="true">
|
|
<el-table-column v-for="(item,index) in 8" :label="'PASS '+(index+1).toString()" align="center" width="80">
|
|
<el-table-column v-for="(item,index) in 8" :label="'PASS '+(index+1).toString()" align="center" width="80">
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
- <span v-if="scope.row.h115Out[index]>=1080" style="color:red;">{{scope.row.h115Out[index]}}</span>
|
|
|
|
- <span v-if="scope.row.h115Out[index]<1080">{{scope.row.h115Out[index]}}</span>
|
|
|
|
|
|
+ <span @click="handleCoilAnalysis('H115', (index+1).toString())" v-if="scope.row.h115Out[index]>=1080" style="color:red;">{{scope.row.h115Out[index]}}</span>
|
|
|
|
+ <span @click="handleCoilAnalysis('H115', (index+1).toString())" v-if="scope.row.h115Out[index]<1080">{{scope.row.h115Out[index]}}</span>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<el-table-column label="H116 OUT" align="center" prop="h116Out" :show-overflow-tooltip="true">
|
|
<el-table-column label="H116 OUT" align="center" prop="h116Out" :show-overflow-tooltip="true">
|
|
<el-table-column v-for="(item,index) in 8" :label="'PASS '+(index+1).toString()" align="center" width="80">
|
|
<el-table-column v-for="(item,index) in 8" :label="'PASS '+(index+1).toString()" align="center" width="80">
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
- <span v-if="scope.row.h116Out[index]>=1080" style="color:red;">{{scope.row.h116Out[index]}}</span>
|
|
|
|
- <span v-if="scope.row.h116Out[index]<1080">{{scope.row.h116Out[index]}}</span>
|
|
|
|
|
|
+ <span @click="handleCoilAnalysis('H116', (index+1).toString())" v-if="scope.row.h116Out[index]>=1080" style="color:red;">{{scope.row.h116Out[index]}}</span>
|
|
|
|
+ <span @click="handleCoilAnalysis('H116', (index+1).toString())" v-if="scope.row.h116Out[index]<1080">{{scope.row.h116Out[index]}}</span>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<el-table-column label="H117 OUT" align="center" prop="h117Out" :show-overflow-tooltip="true">
|
|
<el-table-column label="H117 OUT" align="center" prop="h117Out" :show-overflow-tooltip="true">
|
|
<el-table-column v-for="(item,index) in 8" :label="'PASS '+(index+1).toString()" align="center" width="80">
|
|
<el-table-column v-for="(item,index) in 8" :label="'PASS '+(index+1).toString()" align="center" width="80">
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
- <span v-if="scope.row.h117Out[index]>=1080" style="color:red;">{{scope.row.h117Out[index]}}</span>
|
|
|
|
- <span v-if="scope.row.h117Out[index]<1080">{{scope.row.h117Out[index]}}</span>
|
|
|
|
|
|
+ <span @click="handleCoilAnalysis('H117', (index+1).toString())" v-if="scope.row.h117Out[index]>=1080" style="color:red;">{{scope.row.h117Out[index]}}</span>
|
|
|
|
+ <span @click="handleCoilAnalysis('H117', (index+1).toString())" v-if="scope.row.h117Out[index]<1080">{{scope.row.h117Out[index]}}</span>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<el-table-column label="H118 OUT" align="center" prop="h118Out" :show-overflow-tooltip="true">
|
|
<el-table-column label="H118 OUT" align="center" prop="h118Out" :show-overflow-tooltip="true">
|
|
<el-table-column v-for="(item,index) in 8" :label="'PASS '+(index+1).toString()" align="center" width="80">
|
|
<el-table-column v-for="(item,index) in 8" :label="'PASS '+(index+1).toString()" align="center" width="80">
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
- <span v-if="scope.row.h118Out[index]>=1080" style="color:red;">{{scope.row.h118Out[index]}}</span>
|
|
|
|
- <span v-if="scope.row.h118Out[index]<1080">{{scope.row.h118Out[index]}}</span>
|
|
|
|
|
|
+ <span @click="handleCoilAnalysis('H118', (index+1).toString())" v-if="scope.row.h118Out[index]>=1080" style="color:red;">{{scope.row.h118Out[index]}}</span>
|
|
|
|
+ <span @click="handleCoilAnalysis('H118', (index+1).toString())" v-if="scope.row.h118Out[index]<1080">{{scope.row.h118Out[index]}}</span>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<el-table-column label="H130 OUT" align="center" prop="h130Out" :show-overflow-tooltip="true">
|
|
<el-table-column label="H130 OUT" align="center" prop="h130Out" :show-overflow-tooltip="true">
|
|
<el-table-column v-for="(item,index) in 12" :label="'PASS '+(index+1).toString()" align="center" width="80">
|
|
<el-table-column v-for="(item,index) in 12" :label="'PASS '+(index+1).toString()" align="center" width="80">
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
- <span v-if="scope.row.h130Out[index]>=1080" style="color:red;">{{scope.row.h130Out[index]}}</span>
|
|
|
|
- <span v-if="scope.row.h130Out[index]<1080">{{scope.row.h130Out[index]}}</span>
|
|
|
|
|
|
+ <span @click="handleCoilAnalysis('H130', (index+1).toString())" v-if="scope.row.h130Out[index]>=1080" style="color:red;">{{scope.row.h130Out[index]}}</span>
|
|
|
|
+ <span @click="handleCoilAnalysis('H130', (index+1).toString())" v-if="scope.row.h130Out[index]<1080">{{scope.row.h130Out[index]}}</span>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
</el-table>
|
|
</el-table>
|
|
|
|
+ <!-- COIL趋势分析对话框 -->
|
|
|
|
+ <el-dialog :close-on-click-modal="false" @close="disposeChart" :title="analysis.title" :visible.sync="analysis.open" width="80%" append-to-body>
|
|
|
|
+ <el-form :model="analysisQueryParams" ref="queryForm" :inline="true" label-width="68px">
|
|
|
|
+ <el-form-item label="开始时间" prop="startDate">
|
|
|
|
+ <el-date-picker
|
|
|
|
+ v-model="analysisQueryParams.startDate"
|
|
|
|
+ type="date"
|
|
|
|
+ placeholder="选择开始时间"
|
|
|
|
+ value-format="yyyy-MM-dd">
|
|
|
|
+ </el-date-picker>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <el-form-item label="结束时间" prop="endDate">
|
|
|
|
+ <el-date-picker
|
|
|
|
+ v-model="analysisQueryParams.endDate"
|
|
|
|
+ type="date"
|
|
|
|
+ placeholder="选择结束时间"
|
|
|
|
+ value-format="yyyy-MM-dd">
|
|
|
|
+ </el-date-picker>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <el-form-item>
|
|
|
|
+ <el-button type="cyan" icon="el-icon-search" size="mini" @click="handleCoilAnalysis(null, null)">搜索</el-button>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </el-form>
|
|
|
|
+ <div id="trendChart" style="width:100%; height: 600px;"></div>
|
|
|
|
+ </el-dialog>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script>
|
|
<script>
|
|
- import { listCoil } from "@/api/production/temperature";
|
|
|
|
|
|
+ import { listCoil, listCoilAnalysis } from "@/api/production/temperature";
|
|
import { treeselect } from "@/api/system/dept";
|
|
import { treeselect } from "@/api/system/dept";
|
|
import { getToken } from "@/utils/auth";
|
|
import { getToken } from "@/utils/auth";
|
|
import Treeselect from "@riophae/vue-treeselect";
|
|
import Treeselect from "@riophae/vue-treeselect";
|
|
@@ -125,6 +150,39 @@
|
|
components: { Treeselect },
|
|
components: { Treeselect },
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
|
|
+ furnace: null,
|
|
|
|
+ pass: null,
|
|
|
|
+ analysisQueryParams: {
|
|
|
|
+ furnanceName: null,
|
|
|
|
+ pass: null,
|
|
|
|
+ startDate: null,
|
|
|
|
+ endDate: null,
|
|
|
|
+ },
|
|
|
|
+ valueList: [],
|
|
|
|
+ dateList: [],
|
|
|
|
+ // 对话框控件值
|
|
|
|
+ analysisDialogElement: {
|
|
|
|
+ // 开始时间
|
|
|
|
+ startDate: null,
|
|
|
|
+ // 结束时间
|
|
|
|
+ endDate: null,
|
|
|
|
+ },
|
|
|
|
+ // 趋势图
|
|
|
|
+ chart: null,
|
|
|
|
+ // 对话框控件值
|
|
|
|
+ analysisDialogElement: {
|
|
|
|
+ // 开始时间
|
|
|
|
+ startDate: null,
|
|
|
|
+ // 结束时间
|
|
|
|
+ endDate: null,
|
|
|
|
+ },
|
|
|
|
+ // 趋势分析参数
|
|
|
|
+ analysis: {
|
|
|
|
+ // 是否显示弹出层
|
|
|
|
+ open: false,
|
|
|
|
+ // 弹出层标题
|
|
|
|
+ title: "",
|
|
|
|
+ },
|
|
// 遮罩层
|
|
// 遮罩层
|
|
loading: true,
|
|
loading: true,
|
|
// 选中数组
|
|
// 选中数组
|
|
@@ -204,7 +262,7 @@
|
|
id: [
|
|
id: [
|
|
{ required: true, message: "主键id不能为空", trigger: "blur" }
|
|
{ required: true, message: "主键id不能为空", trigger: "blur" }
|
|
],
|
|
],
|
|
- }
|
|
|
|
|
|
+ },
|
|
};
|
|
};
|
|
},
|
|
},
|
|
watch: {
|
|
watch: {
|
|
@@ -222,6 +280,94 @@
|
|
// this.getTreeselect();
|
|
// this.getTreeselect();
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
|
|
+ /** 绘制趋势图 */
|
|
|
|
+ draw() {
|
|
|
|
+ this.valueList = [];
|
|
|
|
+ this.dateList = [];
|
|
|
|
+ listCoilAnalysis(this.analysisQueryParams).then(response => {
|
|
|
|
+ let data = response.data;
|
|
|
|
+ this.maxValue = 0;
|
|
|
|
+ this.minValue = data[0].passMaxValue;
|
|
|
|
+ for (let i = 0; i < data.length; i++) {
|
|
|
|
+ if (data[i].passMaxValue != null) {
|
|
|
|
+ this.valueList.push(data[i].passMaxValue);
|
|
|
|
+ this.dateList.push(data[i].recordTime);
|
|
|
|
+ if (data[i].passMaxValue > this.maxValue) {
|
|
|
|
+ this.maxValue = data[i].passMaxValue;
|
|
|
|
+ }
|
|
|
|
+ if (data[i].passMaxValue < this.minValue) {
|
|
|
|
+ this.minValue = data[i].passMaxValue;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ this.chart = this.echarts.init(document.getElementById("trendChart"));
|
|
|
|
+ let option = {
|
|
|
|
+ tooltip: {
|
|
|
|
+ trigger: "item"
|
|
|
|
+ },
|
|
|
|
+ grid: {
|
|
|
|
+ left: 90,
|
|
|
|
+ right: 80,
|
|
|
|
+ },
|
|
|
|
+ xAxis: {
|
|
|
|
+ data: this.dateList,
|
|
|
|
+ },
|
|
|
|
+ yAxis: {
|
|
|
|
+ max: this.maxValue,
|
|
|
|
+ min: this.minValue,
|
|
|
|
+ min: function(value) { // 取最小值向下取整为最小刻度
|
|
|
|
+ return Math.floor(value.min)
|
|
|
|
+ },
|
|
|
|
+ max: function(value) { // 取最大值向上取整为最大刻度
|
|
|
|
+ return Math.ceil(value.max)
|
|
|
|
+ },
|
|
|
|
+ scale: true,
|
|
|
|
+ type: 'value',
|
|
|
|
+ },
|
|
|
|
+ series: [
|
|
|
|
+ {
|
|
|
|
+ name: this.fieldNameTitle,
|
|
|
|
+ label: {
|
|
|
|
+ show: true,
|
|
|
|
+ position: 'top'
|
|
|
|
+ },
|
|
|
|
+ data: this.valueList,
|
|
|
|
+ type: 'line',
|
|
|
|
+ smooth: true,
|
|
|
|
+ symbolSize: 15,
|
|
|
|
+ color:"#5470c6",
|
|
|
|
+ lineStyle: {
|
|
|
|
+ width: 6
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ ],
|
|
|
|
+ };
|
|
|
|
+ this.chart.setOption(option);
|
|
|
|
+ });
|
|
|
|
+ },
|
|
|
|
+ /** 销毁趋势图 */
|
|
|
|
+ disposeChart() {
|
|
|
|
+ this.echarts.dispose(this.chart);
|
|
|
|
+ this.analysisQueryParams.furnanceName = null;
|
|
|
|
+ this.analysisQueryParams.pass = null;
|
|
|
|
+ this.analysisQueryParams.startDate = null;
|
|
|
|
+ this.analysisQueryParams.endDate = null;
|
|
|
|
+ this.furnace = null;
|
|
|
|
+ this.pass = null;
|
|
|
|
+ },
|
|
|
|
+ handleCoilAnalysis(furnace, pass) {
|
|
|
|
+ if (furnace != null) {
|
|
|
|
+ this.analysisQueryParams.furnanceName = furnace;
|
|
|
|
+ this.furnace = furnace;
|
|
|
|
+ }
|
|
|
|
+ if (pass != null) {
|
|
|
|
+ this.analysisQueryParams.pass = pass;
|
|
|
|
+ this.pass = pass;
|
|
|
|
+ }
|
|
|
|
+ this.analysis.title = "炉管测温趋势分析(" + this.analysisQueryParams.furnanceName + " PASS " + this.analysisQueryParams.pass + ")";
|
|
|
|
+ this.analysis.open = true;
|
|
|
|
+ this.draw();
|
|
|
|
+ },
|
|
init() {
|
|
init() {
|
|
let date = new Date();
|
|
let date = new Date();
|
|
this.queryParams.recordTime = date.getFullYear() + "-" + Number(date.getMonth() + 1);
|
|
this.queryParams.recordTime = date.getFullYear() + "-" + Number(date.getMonth() + 1);
|