修改bug
This commit is contained in:
parent
d06784c2c3
commit
7ac9b6d35f
@ -1 +1,14 @@
|
|||||||
<svg class="icon" viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" width="200" height="200"><defs><style/></defs><path d="M459.954 607.201h233.734c14.352 0 25.941-11.088 25.941-24.799 0-13.623-11.588-24.71-25.941-24.71H459.954c-14.353 0-25.987 11.087-25.987 24.71 0 13.71 11.634 24.8 25.987 24.8zm-77.937 217.186l287.564-.272v-.634c9.37-1.494 16.66-9.233 16.66-19.054 0-9.773-7.29-17.694-16.66-19.233v-.633H369.5c-27.275 0-51.95-38.47-51.95-65.215V303.761c.182-1.041.634-1.992.634-3.123 0-10.997-8.985-20.003-20.032-20.003-11.023 0-20.01 9.007-20.01 20.003v418.708c0 54.037 48.939 105.04 103.875 105.04zm311.67-734.462c-3.235 0-311.669-.814-311.669-.814-51.292 0-96.314 39.1-102.108 88.294-.182 1.086-.657 2.037-.657 3.169 0 .09.023.135.023.18 0 .047-.023.09-.023.182h.067c.181 10.86 9.032 19.685 19.942 19.685 10.933 0 19.762-8.825 19.965-19.685h.226c6.044-24.665 27.028-52.044 50.048-52.044h284.755c-.406 60.46 0 118.435 0 118.435 0 54.532 35.992 91.642 91.36 91.642h90.428v380.377c.338 44.261-33.703 65.758-62.18 65.215v.272c-10.23.723-18.426 9.188-18.426 19.594 0 10.454 8.196 18.737 18.426 19.417v.272c.248 0 .498-.092.746-.092.184 0 .34.092.522.092.972 0 1.812-.408 2.74-.545 52.288-3.755 97.58-52.314 97.58-104.225V299.778L693.688 89.925zm51.928 209.853c-27.684 0-51.927-51.412-51.927-78.7V142.377l129.839 157.4h-77.912zM459.955 483.47h233.733c14.352 0 25.941-11.041 25.941-24.709 0-13.667-11.588-24.754-25.941-24.754H459.954c-14.353 0-25.987 11.087-25.987 24.754 0 13.669 11.634 24.71 25.987 24.71zM716.71 841.356c-8.534 0-15.327 6.246-17.114 14.257l-.476-.045c-21.73 44.17-40.426 34.032-62.295 34.032H252.18c-27.277 0-64.466-38.512-64.466-65.213V322.315c0-24.801 29.857-58.607 55.954-63.403v-.544c10.572-.543 19.083-9.142 19.083-19.867 0-10.681-8.511-19.28-19.083-19.777v-.227c-.181.044-.34.091-.52.091-.158 0-.272-.09-.43-.09-1.245 0-2.353.497-3.553.724-50.704 5.203-90.86 52.134-90.86 103.093v502.07c0 54.035 48.938 105.039 103.875 105.039h389.558c47.105 0 78.255-17.199 90.542-61.684 1.36-2.534 2.33-5.25 2.33-8.327.002-9.866-8.009-18.057-17.9-18.057z"/></svg>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<svg width="24px" height="24px" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||||
|
<title>周转进度</title>
|
||||||
|
<g id="新增看板" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
||||||
|
<g id="周转看板" transform="translate(-996.000000, -149.000000)" fill-rule="nonzero">
|
||||||
|
<g id="编组-26备份-2" transform="translate(972.000000, 125.000000)">
|
||||||
|
<g id="周转进度" transform="translate(24.000000, 24.000000)">
|
||||||
|
<rect id="矩形" fill="#000000" opacity="0" x="0" y="0" width="24" height="24"></rect>
|
||||||
|
<path d="M14.5,8.25 L14.5,2 L4,2 C2.8954305,2 2,2.8954305 2,4 L2,14.5 L2,14.5 L8.25,14.5 L8.25,8.25 L14.5,8.25 Z M15.75,9.5 L15.75,15.75 L9.5,15.75 L9.5,22 L20,22 C21.1045695,22 22,21.1045695 22,20 L22,9.5 L22,9.5 L15.75,9.5 Z" id="形状" fill="#59D0E2"></path>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</svg>
|
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 1.0 KiB |
@ -2,7 +2,7 @@
|
|||||||
* @Author: zwq
|
* @Author: zwq
|
||||||
* @Date: 2021-07-19 15:18:30
|
* @Date: 2021-07-19 15:18:30
|
||||||
* @LastEditors: zhp
|
* @LastEditors: zhp
|
||||||
* @LastEditTime: 2024-01-11 15:54:50
|
* @LastEditTime: 2024-01-15 16:03:39
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
<template>
|
<template>
|
||||||
@ -30,8 +30,9 @@
|
|||||||
<el-row :style="{ padding: '0 ' + 9 + 'px' }" :gutter="15" type="flex" class="flex-1">
|
<el-row :style="{ padding: '0 ' + 9 + 'px' }" :gutter="15" type="flex" class="flex-1">
|
||||||
<el-col :style="{ margin: 8 + 'px' + ' 0' }" :span="8">
|
<el-col :style="{ margin: 8 + 'px' + ' 0' }" :span="8">
|
||||||
<base-container :title="'切割数据'" :size="'small'" :title-icon="'eqAlarm'">
|
<base-container :title="'切割数据'" :size="'small'" :title-icon="'eqAlarm'">
|
||||||
<base-table1 :page="1" :limit="999" :show-index="false" :table-config="cutProps"
|
<!-- <base-table1 :page="1" :limit="999" :show-index="false" :table-config="cutProps"
|
||||||
:table-data="cutTableDataList" />
|
:table-data="cutTableDataList" /> -->
|
||||||
|
<dv-scroll-board :config="cutConfig" style="width:100%;height:350px" ref='cutScrollBoard' />
|
||||||
</base-container>
|
</base-container>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
||||||
@ -48,8 +49,9 @@
|
|||||||
|
|
||||||
<el-col :style="{ margin: 8 + 'px' + ' 0' }" :span="8">
|
<el-col :style="{ margin: 8 + 'px' + ' 0' }" :span="8">
|
||||||
<base-container :title="'ISRA 缺陷数据'" :size="'small'" :title-icon="'scrap'">
|
<base-container :title="'ISRA 缺陷数据'" :size="'small'" :title-icon="'scrap'">
|
||||||
<base-table1 :page="1" :limit="999" :show-index="false" :table-config="ISRATableProps"
|
<!-- <base-table1 :page="1" :limit="999" :show-index="false" :table-config="ISRATableProps"
|
||||||
:table-data="ISRAList" />
|
:table-data="ISRAList" /> -->
|
||||||
|
<dv-scroll-board :config="ISRAConfig" style="width:100%;height:350px" ref='ISRAScrollBoard' />
|
||||||
</base-container>
|
</base-container>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
@ -78,25 +80,30 @@
|
|||||||
</base-container>
|
</base-container>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :style="{ margin: 8 + 'px' + ' 0' }" :span="14">
|
<el-col :style="{ margin: 8 + 'px' + ' 0' }" :span="14">
|
||||||
<base-container :height="318 + 338 + 16" :size="'eqStatus'" :title="'设备状态监控'" :title-icon="'eqMonitoring'">
|
<base-container :no-padding="true" :height="318 + 338 + 16" :size="'eqStatus'" :title="'设备状态监控'"
|
||||||
|
:title-icon="'eqMonitoring'">
|
||||||
<!-- <div style="width: 45%;position: absolute; top: 3em; right: 3em;">
|
<!-- <div style="width: 45%;position: absolute; top: 3em; right: 3em;">
|
||||||
<top-radio-group />
|
<top-radio-group />
|
||||||
</div> -->
|
</div> -->
|
||||||
<!-- 像下面这样表格里的limit值,也许可以用js动态计算出来 -->
|
<!-- 像下面这样表格里的limit值,也许可以用js动态计算出来 -->
|
||||||
<el-col :span="6" style="">
|
<el-col :span="6" style="">
|
||||||
<div style="font-size:20px;margin: 5px 0 10px 0">融化风机</div>
|
<div style="font-size:20px;margin: 5px 0 10px 0">融化风机</div>
|
||||||
<base-table1 :page="1" :limit="999" :show-index="false" :table-config="EqMonitoringPropsFun"
|
<!-- <base-table1 :page="1" :limit="999" :show-index="false" :table-config="EqMonitoringPropsFun"
|
||||||
:table-data="funList" />
|
:table-data="funList" /> -->
|
||||||
|
<dv-scroll-board :config="funConfig" style="width:100%;height:350px" ref='funScrollBoard' />
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="6">
|
<el-col :span="6">
|
||||||
<div style="font-size:20px;margin: 5px 0 10px 0;">退火风机</div>
|
<div style="font-size:20px;margin: 5px 0 10px 0;">退火风机</div>
|
||||||
<base-table1 :page="1" :limit="999" :show-index="false" :table-config="EqMonitoringPropsFun"
|
<!-- <base-table1 :page="1" :limit="999" :show-index="false" :table-config="EqMonitoringPropsFun"
|
||||||
:table-data="annealFunList" />
|
:table-data="annealFunList" /> -->
|
||||||
|
<dv-scroll-board :config="annealFunConfig" style="width:100%;height:350px" ref='annealFunScrollBoard' />
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12" style="float: right;">
|
<el-col :span="12" style="float: right;">
|
||||||
<div style="font-size:20px;margin: 5px 0 10px 0;">产线设备</div>
|
<div style="font-size:20px;margin: 5px 0 10px 0;">产线设备</div>
|
||||||
<base-table1 :page="1" :limit="999" :show-index="false" :table-config="EqMonitoringProps"
|
<!-- <base-table1 :page="1" :limit="999" :show-index="false" :table-config="EqMonitoringProps"
|
||||||
:table-data="realEqList" />
|
:table-data="realEqList" /> -->
|
||||||
|
<dv-scroll-board :config="realEqConfig" style="width:100%;height:350px" ref='realEqScrollBoard' />
|
||||||
|
|
||||||
</el-col>
|
</el-col>
|
||||||
<!-- <double-y-chart :id="'doubleYChart'" :name-list="cxNameList" :data-list="cxDataList" :height="359"
|
<!-- <double-y-chart :id="'doubleYChart'" :name-list="cxNameList" :data-list="cxDataList" :height="359"
|
||||||
:show-legend="true" /> -->
|
:show-legend="true" /> -->
|
||||||
@ -141,6 +148,7 @@ import doubleYChart from './components/doubleYChart '
|
|||||||
// var erd = elementResizeDetectorMaker(); //创建实例
|
// var erd = elementResizeDetectorMaker(); //创建实例
|
||||||
// let resizeFun = null
|
// let resizeFun = null
|
||||||
import { parseTime } from '../core/mixins/code-filter';
|
import { parseTime } from '../core/mixins/code-filter';
|
||||||
|
import { formatDate } from '@/utils'
|
||||||
|
|
||||||
|
|
||||||
import LinearBarChart from './components/linearBarChart'
|
import LinearBarChart from './components/linearBarChart'
|
||||||
@ -264,6 +272,61 @@ export default {
|
|||||||
ISRATableProps,
|
ISRATableProps,
|
||||||
orderList: [],
|
orderList: [],
|
||||||
times: '',
|
times: '',
|
||||||
|
cutConfig: {
|
||||||
|
header: ['序号', '产线', '时间', '规格', '良品面积', '废品面积', '良品率'],
|
||||||
|
headerBGC: 'rgba(32, 55, 96, 0.8)',
|
||||||
|
oddRowBGC: 'rgba(32, 55, 96, 0.8)',
|
||||||
|
evenRowBGC: 'rgba(14, 32, 62, 0.8)',
|
||||||
|
columnWidth: [70,70, 130, 150, 110,110,90],
|
||||||
|
align: ['center'],
|
||||||
|
data: [],
|
||||||
|
// index:true,
|
||||||
|
rowNum: 10
|
||||||
|
},
|
||||||
|
funConfig: {
|
||||||
|
header: ['序号', '设备名称', '运行状态'],
|
||||||
|
headerBGC: 'rgba(32, 55, 96, 0.8)',
|
||||||
|
oddRowBGC: 'rgba(32, 55, 96, 0.8)',
|
||||||
|
evenRowBGC: 'rgba(14, 32, 62, 0.8)',
|
||||||
|
columnWidth: [60, 90, 90],
|
||||||
|
align: ['center'],
|
||||||
|
data: [],
|
||||||
|
// index:true,
|
||||||
|
rowNum: 10
|
||||||
|
},
|
||||||
|
realEqConfig: {
|
||||||
|
header: ['序号', '产线', '设备名称', '设备编码', '运行状态','故障状态'],
|
||||||
|
headerBGC: 'rgba(32, 55, 96, 0.8)',
|
||||||
|
oddRowBGC: 'rgba(32, 55, 96, 0.8)',
|
||||||
|
evenRowBGC: 'rgba(14, 32, 62, 0.8)',
|
||||||
|
columnWidth: [60, 80, 90,90,90,90],
|
||||||
|
align: ['center'],
|
||||||
|
data: [],
|
||||||
|
// index:true,
|
||||||
|
rowNum: 10
|
||||||
|
},
|
||||||
|
annealFunConfig: {
|
||||||
|
header: ['序号', '设备名称', '运行状态'],
|
||||||
|
headerBGC: 'rgba(32, 55, 96, 0.8)',
|
||||||
|
oddRowBGC: 'rgba(32, 55, 96, 0.8)',
|
||||||
|
evenRowBGC: 'rgba(14, 32, 62, 0.8)',
|
||||||
|
columnWidth: [60, 90, 90],
|
||||||
|
align: ['center'],
|
||||||
|
data: [],
|
||||||
|
// index:true,
|
||||||
|
rowNum: 10
|
||||||
|
},
|
||||||
|
ISRAConfig: {
|
||||||
|
header: ['序号', '产线', '时间', '缺陷类型', '缺陷数量', '占比'],
|
||||||
|
headerBGC: 'rgba(32, 55, 96, 0.8)',
|
||||||
|
oddRowBGC: 'rgba(32, 55, 96, 0.8)',
|
||||||
|
evenRowBGC: 'rgba(14, 32, 62, 0.8)',
|
||||||
|
columnWidth: [70, 70, 130, 150, 110, 110,],
|
||||||
|
align: ['center'],
|
||||||
|
data: [],
|
||||||
|
// index:true,
|
||||||
|
rowNum: 10
|
||||||
|
},
|
||||||
ISRAList:[],
|
ISRAList:[],
|
||||||
EnergyMonitoringNameList: [],
|
EnergyMonitoringNameList: [],
|
||||||
equipmentList: [],
|
equipmentList: [],
|
||||||
@ -484,22 +547,47 @@ export default {
|
|||||||
if (this.funWsData.type === 'AnnealFanInfo') {
|
if (this.funWsData.type === 'AnnealFanInfo') {
|
||||||
let arr = []
|
let arr = []
|
||||||
for (let i in this.funWsData.data.annealFanInfo) {
|
for (let i in this.funWsData.data.annealFanInfo) {
|
||||||
arr.push({
|
// arr.push({
|
||||||
equipmentName: i,
|
// equipmentName: i,
|
||||||
status: this.funWsData.data.annealFanInfo[i]
|
// status: this.funWsData.data.annealFanInfo[i]
|
||||||
})
|
// })
|
||||||
|
arr.push([
|
||||||
|
// console.log(item)
|
||||||
|
`
|
||||||
|
<span style="color:rgba(255,255,255,0.5)" >${index + 1 || ''}
|
||||||
|
</span>`,
|
||||||
|
// formatDate(item.planStartTime) || '',
|
||||||
|
`
|
||||||
|
<span style="color:rgba(255,255,255,0.5)" >${i || ''}
|
||||||
|
</span>`,
|
||||||
|
`<span style="color:rgba(255,255,255,0.5)">${this.funWsData.data.annealFanInfo[i] || ''}</span>`,
|
||||||
|
])
|
||||||
}
|
}
|
||||||
this.annealFunList = arr
|
this.annealFanConfig.data = arr
|
||||||
|
this.$refs['annealFanScrollBoard'].updateRows(arr)
|
||||||
}
|
}
|
||||||
if (this.funWsData.type === 'FanInfo') {
|
if (this.funWsData.type === 'FanInfo') {
|
||||||
let arr = []
|
let arr = []
|
||||||
for (let i in this.funWsData.data.fanInfo) {
|
for (let i in this.funWsData.data.fanInfo) {
|
||||||
arr.push({
|
// arr.push({
|
||||||
equipmentName: i,
|
// equipmentName: i,
|
||||||
status: this.funWsData.data.fanInfo[i]
|
// status: this.funWsData.data.fanInfo[i]
|
||||||
})
|
// })
|
||||||
|
arr.push([
|
||||||
|
// console.log(item)
|
||||||
|
`
|
||||||
|
<span style="color:rgba(255,255,255,0.5)" >${index + 1 || ''}
|
||||||
|
</span>`,
|
||||||
|
// formatDate(item.planStartTime) || '',
|
||||||
|
`
|
||||||
|
<span style="color:rgba(255,255,255,0.5)" >${i || ''}
|
||||||
|
</span>`,
|
||||||
|
`<span style="color:rgba(255,255,255,0.5)">${this.funWsData.data.fanInfo[i] || ''}</span>`,
|
||||||
|
])
|
||||||
}
|
}
|
||||||
this.funList = arr
|
this.funConfig.data = arr
|
||||||
|
this.$refs['funScrollBoard'].updateRows(arr)
|
||||||
|
// this.funList = arr
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
cutWebsocketOnOpen() {
|
cutWebsocketOnOpen() {
|
||||||
@ -511,30 +599,49 @@ export default {
|
|||||||
this.CutInitWebSocket()
|
this.CutInitWebSocket()
|
||||||
},
|
},
|
||||||
getSize(str) {
|
getSize(str) {
|
||||||
console.log(str.match(/\d+(\.\d+)?/g))
|
// console.log(str.match(/\d+(\.\d+)?/g))
|
||||||
let size = str.match(/\d+(\.\d+)?/g).map(ele => {
|
let size = str.match(/\d+(\.\d+)?/g).map(ele => {
|
||||||
return parseFloat(ele)
|
return parseFloat(ele)
|
||||||
})
|
})
|
||||||
console.log(size[0] + '*' + size[1] + '*' + size[2]);
|
// console.log(size[0] + '*' + size[1] + '*' + size[2]);
|
||||||
return size[0] + '*' + size[1] + '*' + size[2]
|
return size[0] + '*' + size[1] + '*' + size[2]
|
||||||
},
|
},
|
||||||
// 数据接收
|
// 数据接收
|
||||||
cutWebsocketOnMessage(e) {
|
cutWebsocketOnMessage(e) {
|
||||||
this.cutWsData = e?.data ? JSON.parse(e?.data) : {}
|
this.cutWsData = e?.data ? JSON.parse(e?.data) : {}
|
||||||
if (this.cutWsData.type === 'cutting' && this.cutWsData.name === 'table') {
|
if (this.cutWsData.type === 'cutting' && this.cutWsData.name === 'table') {
|
||||||
this.cutTableDataList = this.cutWsData.productHourData.map((ele, index) => {
|
// this.cutTableDataList = this.cutWsData.productHourData.map((ele, index) => {
|
||||||
// if (ele.progressRate != 1) {
|
// // if (ele.progressRate != 1) {
|
||||||
return {
|
// return {
|
||||||
id: ele.id,
|
// id: ele.id,
|
||||||
lineName: ele.lineName,
|
// lineName: ele.lineName,
|
||||||
time: ele.time,
|
// time: ele.time,
|
||||||
size: this.getSize(ele.size),
|
// size: this.getSize(ele.size),
|
||||||
productArea: ele.productArea + '㎡',
|
// productArea: ele.productArea + '㎡',
|
||||||
wasteArea: ele.wasteArea + '㎡',
|
// wasteArea: ele.wasteArea + '㎡',
|
||||||
product: (ele.product * 100).toFixed(2)
|
// product: (ele.product * 100).toFixed(2)
|
||||||
}
|
|
||||||
// }
|
// }
|
||||||
});
|
// // }
|
||||||
|
// });
|
||||||
|
let cutArr = this.cutWsData.productHourData.map((item, index) => [
|
||||||
|
// console.log(item)
|
||||||
|
`
|
||||||
|
<span style="color:rgba(255,255,255,0.5)" >${index + 1 || ''}
|
||||||
|
</span>`,
|
||||||
|
// formatDate(item.planStartTime) || '',
|
||||||
|
`
|
||||||
|
<span style="color:rgba(255,255,255,0.5)" >${item.lineName || ''}
|
||||||
|
</span>`,
|
||||||
|
`<span style="color:rgba(255,255,255,0.5)">${formatDate(item.time) || ''}</span>`,
|
||||||
|
`<span style="color:rgba(255,255,255,0.5)">${this.getSize(item.size) || ''}</span>`,
|
||||||
|
`<span style="color:rgba(255,255,255,0.5)">${item.productArea + '㎡' || ''}</span>`,
|
||||||
|
`<span style="color:rgba(255,255,255,0.5)">${item.wasteArea + '㎡' || ''}</span>`,
|
||||||
|
`<div style = "${(item.product * 100).toFixed(2) > 91 ? 'display:block;color:rgba(255,255,255,0.5)' : 'display:none;'}">${(item.product * 100).toFixed(2) + '%' || ''}</div>
|
||||||
|
<div style = "${(item.product * 100).toFixed(2) < 91 ? 'display:block; color:rgba(255, 209, 96, 1)' : 'display:none;'}">${(item.product * 100).toFixed(2) + '%' || ''}</div>`
|
||||||
|
])
|
||||||
|
this.cutConfig.data = cutArr
|
||||||
|
this.$refs['cutScrollBoard'].updateRows(cutArr)
|
||||||
|
|
||||||
} else if (this.cutWsData.type === 'cutting' && this.cutWsData.name === 'chart' && this.cutWsData.dateType === 'day') {
|
} else if (this.cutWsData.type === 'cutting' && this.cutWsData.name === 'chart' && this.cutWsData.dateType === 'day') {
|
||||||
let nameList = []
|
let nameList = []
|
||||||
let nameWasteList = []
|
let nameWasteList = []
|
||||||
@ -571,33 +678,51 @@ export default {
|
|||||||
// let obj = JSON.parse(data.data)
|
// let obj = JSON.parse(data.data)
|
||||||
this.SJGWsData = e?.data ? JSON.parse(e?.data) : {}
|
this.SJGWsData = e?.data ? JSON.parse(e?.data) : {}
|
||||||
if (this.SJGWsData.type === 'isra') {
|
if (this.SJGWsData.type === 'isra') {
|
||||||
this.ISRAList = this.SJGWsData.detData.map((ele, index) => {
|
// this.ISRAList = this.SJGWsData.detData.map((ele, index) => {
|
||||||
// if (ele.progressRate != 1) {
|
// // if (ele.progressRate != 1) {
|
||||||
return {
|
// return {
|
||||||
id: ele.id,
|
// id: ele.id,
|
||||||
linename: ele.linename,
|
// linename: ele.linename,
|
||||||
type: ele.type,
|
// type: ele.type,
|
||||||
num: ele.num,
|
// num: ele.num,
|
||||||
time:ele.time,
|
// time:ele.time,
|
||||||
percent: ele.percent
|
|
||||||
}
|
|
||||||
// }
|
|
||||||
});
|
|
||||||
} else if (this.SJGWsData.type === 'equipment') {
|
|
||||||
this.realEqList = this.SJGWsData.detData.map((ele, index) => {
|
|
||||||
// if (ele.progressRate != 1) {
|
|
||||||
return {
|
|
||||||
line: ele.line,
|
|
||||||
name: ele.name,
|
|
||||||
code: ele.code,
|
|
||||||
run: ele.run,
|
|
||||||
error: ele.error,
|
|
||||||
// percent: ele.percent
|
// percent: ele.percent
|
||||||
}
|
|
||||||
// }
|
// }
|
||||||
});
|
// // }
|
||||||
|
// });
|
||||||
|
console.log(this.SJGWsData.detData);
|
||||||
|
let ISRAArr = this.SJGWsData.detData.map((item, index) => [
|
||||||
|
// console.log(item)
|
||||||
|
`<span style="color:rgba(255,255,255,0.5)" >${index + 1 || ''}
|
||||||
|
</span>`,
|
||||||
|
// formatDate(item.planStartTime) || '',
|
||||||
|
`
|
||||||
|
<span style="color:rgba(255,255,255,0.5)" >${item.linename || ''}
|
||||||
|
</span>`,
|
||||||
|
`<span style="color:rgba(255,255,255,0.5)">${item.time || ''}</span>`,
|
||||||
|
`<span style="color:rgba(255,255,255,0.5)">${item.type || ''}</span>`,
|
||||||
|
`<span style="color:rgba(255,255,255,0.5)">${item.num || ''}</span>`,
|
||||||
|
`<span style="color:rgba(255,255,255,0.5)">${item.percent|| ''}</span>`,
|
||||||
|
])
|
||||||
|
this.ISRAConfig.data = ISRAArr
|
||||||
|
this.$refs['ISRAScrollBoard'].updateRows(ISRAArr)
|
||||||
|
} else if (this.SJGWsData.type === 'equipment') {
|
||||||
|
this.realEqList = this.SJGWsData.detData.map((ele, index) =>[
|
||||||
|
// console.log(item)
|
||||||
|
`<span style="color:rgba(255,255,255,0.5)" >${index + 1 || ''}
|
||||||
|
</span>`,
|
||||||
|
// formatDate(item.planStartTime) || '',
|
||||||
|
`
|
||||||
|
<span style="color:rgba(255,255,255,0.5)" >${item.line || ''}
|
||||||
|
</span>`,
|
||||||
|
`<span style="color:rgba(255,255,255,0.5)">${item.name || ''}</span>`,
|
||||||
|
`<span style="color:rgba(255,255,255,0.5)">${item.code || ''}</span>`,
|
||||||
|
`<span style="color:rgba(255,255,255,0.5)">${item.run || ''}</span>`,
|
||||||
|
`<span style="color:rgba(255,255,255,0.5)">${item.error || ''}</span>`,
|
||||||
|
]);
|
||||||
}
|
}
|
||||||
|
this.realEqConfig.data = this.realEqList
|
||||||
|
this.$refs['realEqScrollBoard'].updateRows(this.realEqList)
|
||||||
},
|
},
|
||||||
windowWidth(value) {
|
windowWidth(value) {
|
||||||
this.clientWidth = value
|
this.clientWidth = value
|
||||||
@ -818,4 +943,44 @@ export default {
|
|||||||
/* .container-main {
|
/* .container-main {
|
||||||
min-height: calc(100vh - 10em);
|
min-height: calc(100vh - 10em);
|
||||||
} */
|
} */
|
||||||
|
.orange {
|
||||||
|
color: rgba(255, 209, 96, 1)
|
||||||
|
}
|
||||||
|
|
||||||
|
.white {
|
||||||
|
color: rgba(255, 255, 255, 0.5)
|
||||||
|
}
|
||||||
|
.tooltip {
|
||||||
|
position: relative;
|
||||||
|
display: inline-block;
|
||||||
|
}
|
||||||
|
.tooltip .tooltiptext {
|
||||||
|
visibility: hidden;
|
||||||
|
width: 120px;
|
||||||
|
background-color: black;
|
||||||
|
color: #fff;
|
||||||
|
text-align: center;
|
||||||
|
border-radius: 6px;
|
||||||
|
padding: 5px 0;
|
||||||
|
position: absolute;
|
||||||
|
z-index: 1;
|
||||||
|
bottom: 150%;
|
||||||
|
left: 50%;
|
||||||
|
margin-left: -60px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tooltip .tooltiptext::after {
|
||||||
|
content: "";
|
||||||
|
position: absolute;
|
||||||
|
top: 100%;
|
||||||
|
left: 50%;
|
||||||
|
margin-left: -5px;
|
||||||
|
border-width: 5px;
|
||||||
|
border-style: solid;
|
||||||
|
border-color: black transparent transparent transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tooltip:hover .tooltiptext {
|
||||||
|
visibility: visible;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
* @Author: gtz
|
* @Author: gtz
|
||||||
* @Date: 2022-01-19 15:58:17
|
* @Date: 2022-01-19 15:58:17
|
||||||
* @LastEditors: zhp
|
* @LastEditors: zhp
|
||||||
* @LastEditTime: 2024-01-11 15:54:37
|
* @LastEditTime: 2024-01-16 16:06:47
|
||||||
* @Description: file content
|
* @Description: file content
|
||||||
* @FilePath: \mt-bus-fe\src\views\OperationalOverview\components\baseContainer\index.vue
|
* @FilePath: \mt-bus-fe\src\views\OperationalOverview\components\baseContainer\index.vue
|
||||||
-->
|
-->
|
||||||
@ -27,7 +27,17 @@
|
|||||||
<svg-icon :icon-class="titleIcon" style="font-size: 1em; position: relative; top: .08em" />
|
<svg-icon :icon-class="titleIcon" style="font-size: 1em; position: relative; top: .08em" />
|
||||||
{{ title }}
|
{{ title }}
|
||||||
</span>
|
</span>
|
||||||
|
<span style="font-size: 20px;color:#52FFF8;margin-left: 10px;">
|
||||||
|
<!-- <svg-icon :icon-class="titleIcon" style="font-size: 1em; position: relative; top: .08em" /> -->
|
||||||
|
{{ time +'-'+ time2 }}
|
||||||
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
<!-- <div v-if="true" class="bar-title">
|
||||||
|
<span>
|
||||||
|
<svg-icon :icon-class="titleIcon" style="font-size: 1em; position: relative; top: .08em" />
|
||||||
|
{{ title }}
|
||||||
|
</span>
|
||||||
|
</div> -->
|
||||||
<div class="bar-content" :class="{ 'p-0': noContentPadding }">
|
<div class="bar-content" :class="{ 'p-0': noContentPadding }">
|
||||||
<slot />
|
<slot />
|
||||||
</div>
|
</div>
|
||||||
@ -83,21 +93,39 @@ export default {
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
curIndex: 0,
|
curIndex: 0,
|
||||||
|
time: null,
|
||||||
|
time2:null
|
||||||
// imgUrl: require(`../../../../assets/img/${this.back}.png`),
|
// imgUrl: require(`../../../../assets/img/${this.back}.png`),
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
// console.log(this.back);
|
},
|
||||||
// this.$nextTick(() => {
|
mounted () {
|
||||||
// this.$refs.baseContainer.style = `background:url('../../../../assets/img/${this.back}.png') no-repeat;)`
|
this.time = this.format(new Date().setHours(7,0,0));
|
||||||
// })
|
// console.log(time);
|
||||||
// console.log(this.$refs.baseContainer.style)
|
//前一天时间
|
||||||
|
this.time2 = this.format(new Date().setHours(7, 0, 0) - 86400000 * 1);
|
||||||
|
console.log(new Date().setHours(7, 0, 0) - 86400000 * 1);
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
add0(m) {
|
||||||
|
return m < 10 ? '0' + m : m
|
||||||
|
},
|
||||||
|
format(shijianchuo) {
|
||||||
|
//shijianchuo是整数,否则要parseInt转换
|
||||||
|
var time = new Date(shijianchuo);
|
||||||
|
var y = time.getFullYear();
|
||||||
|
var m = time.getMonth() + 1;
|
||||||
|
var d = time.getDate();
|
||||||
|
var h = time.getHours();
|
||||||
|
var mm = time.getMinutes();
|
||||||
|
var s = time.getSeconds();
|
||||||
|
return y + '-' + this.add0(m) + '-' + this.add0(d) + ' ' + h + '时'
|
||||||
|
},
|
||||||
changeTab(num) {
|
changeTab(num) {
|
||||||
this.curIndex = num
|
this.curIndex = num
|
||||||
this.$emit('tabSelect', num)
|
this.$emit('tabSelect', num)
|
||||||
}
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
@ -201,7 +229,7 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.bar-content {
|
.bar-content {
|
||||||
// padding: 1em;
|
padding: 1em;
|
||||||
flex: 1 auto;
|
flex: 1 auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<!--
|
<!--
|
||||||
* @Date: 2020-12-14 09:07:03
|
* @Date: 2020-12-14 09:07:03
|
||||||
* @LastEditors: zhp
|
* @LastEditors: zhp
|
||||||
* @LastEditTime: 2024-01-08 14:09:05
|
* @LastEditTime: 2024-01-12 14:30:46
|
||||||
* @FilePath: \mt-bus-fe\src\views\OperationalOverview\components\baseTable.vue
|
* @FilePath: \mt-bus-fe\src\views\OperationalOverview\components\baseTable.vue
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
@ -110,12 +110,12 @@ export default {
|
|||||||
},
|
},
|
||||||
classOption() {
|
classOption() {
|
||||||
return {
|
return {
|
||||||
step: 0.3, // 数值越大速度滚动越快
|
step: 0.2, // 数值越大速度滚动越快
|
||||||
limitMoveNum: 1, // 开始无缝滚动的数据量 this.list
|
limitMoveNum: 10, // 开始无缝滚动的数据量 this.list
|
||||||
hoverStop: true, // 是否开启鼠标悬停stop
|
hoverStop: true, // 是否开启鼠标悬停stop
|
||||||
direction: 1, // 0向下 1向上 2向左 3向右
|
direction: 1, // 0向下 1向上 2向左 3向右
|
||||||
openWatch: true, // 开启数据实时监控刷新dom
|
openWatch: true, // 开启数据实时监控刷新dom
|
||||||
singleHeight: 0, // 单步运动停止的高度(默认值0是无缝不停止的滚动) direction => 0/1
|
singleHeight: 0/1, // 单步运动停止的高度(默认值0是无缝不停止的滚动) direction => 0/1
|
||||||
singleWidth: 0, // 单步运动停止的宽度(默认值0是无缝不停止的滚动) direction => 2/3
|
singleWidth: 0, // 单步运动停止的宽度(默认值0是无缝不停止的滚动) direction => 2/3
|
||||||
waitTime: 1000, // 单步运动停止的时间(默认值1000ms)
|
waitTime: 1000, // 单步运动停止的时间(默认值1000ms)
|
||||||
};
|
};
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<!--
|
<!--
|
||||||
* @Author: zhp
|
* @Author: zhp
|
||||||
* @Date: 2023-09-21 09:06:28
|
* @Date: 2023-09-21 09:06:28
|
||||||
* @LastEditTime: 2024-01-11 15:52:09
|
* @LastEditTime: 2024-01-12 10:25:19
|
||||||
* @LastEditors: zhp
|
* @LastEditors: zhp
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
@ -70,9 +70,9 @@ export default {
|
|||||||
mounted() {
|
mounted() {
|
||||||
console.log('mounted')
|
console.log('mounted')
|
||||||
console.log('borderRadius: ', this.borderRadius)
|
console.log('borderRadius: ', this.borderRadius)
|
||||||
this.$nextTick(() => {
|
// this.$nextTick(() => {
|
||||||
this.initChart()
|
// this.initChart()
|
||||||
})
|
// })
|
||||||
},
|
},
|
||||||
beforeDestroy() {
|
beforeDestroy() {
|
||||||
if (!this.chart) {
|
if (!this.chart) {
|
||||||
@ -83,6 +83,7 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
initChart(nameList, passRateList, outputNumList) {
|
initChart(nameList, passRateList, outputNumList) {
|
||||||
|
console.log(nameList, passRateList)
|
||||||
let series= [
|
let series= [
|
||||||
{
|
{
|
||||||
name: '产线产量',
|
name: '产线产量',
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
* @Author: zwq
|
* @Author: zwq
|
||||||
* @Date: 2021-07-19 15:18:30
|
* @Date: 2021-07-19 15:18:30
|
||||||
* @LastEditors: zhp
|
* @LastEditors: zhp
|
||||||
* @LastEditTime: 2024-01-12 09:59:58
|
* @LastEditTime: 2024-01-12 16:38:55
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
<template>
|
<template>
|
||||||
@ -32,22 +32,25 @@
|
|||||||
<base-container :title="'设备报警'" :size="'small'" :height="318" :title-icon="'eqAlarm'">
|
<base-container :title="'设备报警'" :size="'small'" :height="318" :title-icon="'eqAlarm'">
|
||||||
<!-- <base-table1 :page="1" :limit="999" :show-index="false" :table-config="qualityYearTableProps"
|
<!-- <base-table1 :page="1" :limit="999" :show-index="false" :table-config="qualityYearTableProps"
|
||||||
:table-data="equipmentList" /> -->
|
:table-data="equipmentList" /> -->
|
||||||
<base-table1 :page="1" :limit="999" :show-index="false" :table-config="qualityYearTableProps"
|
<!-- <base-table1 :page="1" :limit="999" :show-index="false" :table-config="qualityYearTableProps"
|
||||||
:table-data="qualityYearList" />
|
:table-data="qualityYearList" /> -->
|
||||||
|
<dv-scroll-board :config="eqConfig" style="width:100%;height:350px" ref='eqScrollBoard' />
|
||||||
|
|
||||||
</base-container>
|
</base-container>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
||||||
<el-col :style="{ margin: 8 + 'px' + ' 0' }" :span="8" height="100%">
|
<el-col :style="{ margin: 8 + 'px' + ' 0' }" :span="8" height="100%">
|
||||||
<base-container :title="'各工序缺陷汇总'" :size="'small'" :title-icon="'scrap'">
|
<base-container :title="'各工序缺陷汇总'" :size="'small'" :title-icon="'scrap'">
|
||||||
<base-table1 :page="1" :limit="999" :show-index="false" :table-config="qualityMonthTableProps"
|
|
||||||
:table-data="qualityMonthList" />
|
|
||||||
<!-- <base-table1 :page="1" :limit="999" :show-index="false" :table-config="qualityMonthTableProps"
|
<!-- <base-table1 :page="1" :limit="999" :show-index="false" :table-config="qualityMonthTableProps"
|
||||||
:table-data="qualityMonthList" /> -->
|
:table-data="qualityMonthList" /> -->
|
||||||
|
<!-- <base-table1 :page="1" :limit="999" :show-index="false" :table-config="qualityMonthTableProps"
|
||||||
|
:table-data="qualityMonthList" /> -->
|
||||||
|
<dv-scroll-board :config="processConfig" style="width:100%;height:350px" ref='processScrollBoard' />
|
||||||
</base-container>
|
</base-container>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
||||||
<el-col :style="{ margin: 8 + 'px' + ' 0' }" :span="8" height="100%">
|
<el-col :style="{ margin: 8 + 'px' + ' 0' }" :span="8" height="100%">
|
||||||
<base-container :height="318" :size="'small'" :title="'工单监控'" :title-icon="'eqMonitoring'">
|
<base-container :height="318" :size="'small'" :title="'工单监控'" :title-icon="'order'">
|
||||||
<!-- <div style="width: 45%;position: absolute; top: 3em; right: 3em;">
|
<!-- <div style="width: 45%;position: absolute; top: 3em; right: 3em;">
|
||||||
<top-radio-group />
|
<top-radio-group />
|
||||||
</div> -->
|
</div> -->
|
||||||
@ -126,8 +129,7 @@
|
|||||||
<top-radio-group />
|
<top-radio-group />
|
||||||
</div> -->
|
</div> -->
|
||||||
<!-- 像下面这样表格里的limit值,也许可以用js动态计算出来 -->
|
<!-- 像下面这样表格里的limit值,也许可以用js动态计算出来 -->
|
||||||
<double-y-chart ref="productLineChart" :id=" 'doubleYChart' " :name-list="cxNameList"
|
<double-y-chart ref="productLineChart" :id=" 'doubleYChart' " :height="359" :show-legend="true" />
|
||||||
:data-list="cxDataList" :height="359" :show-legend="true" />
|
|
||||||
</base-container>
|
</base-container>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
@ -547,6 +549,28 @@ export default {
|
|||||||
// offsetWidth: null,
|
// offsetWidth: null,
|
||||||
qualityYearTableProps,
|
qualityYearTableProps,
|
||||||
cxNameList,
|
cxNameList,
|
||||||
|
eqConfig: {
|
||||||
|
header: ['序号', '设备名称', '工序', '损耗片数', '缺陷类型'],
|
||||||
|
headerBGC: 'rgba(32, 55, 96, 0.8)',
|
||||||
|
oddRowBGC: 'rgba(32, 55, 96, 0.8)',
|
||||||
|
evenRowBGC: 'rgba(14, 32, 62, 0.8)',
|
||||||
|
columnWidth: [70, 130, 100, 120, 110,],
|
||||||
|
align: ['center'],
|
||||||
|
data: [],
|
||||||
|
// index:true,
|
||||||
|
rowNum: 10
|
||||||
|
},
|
||||||
|
processConfig: {
|
||||||
|
header: ['序号', '产线名', '设备编码', '设备状态', '是否故障'],
|
||||||
|
headerBGC: 'rgba(32, 55, 96, 0.8)',
|
||||||
|
oddRowBGC: 'rgba(32, 55, 96, 0.8)',
|
||||||
|
evenRowBGC: 'rgba(14, 32, 62, 0.8)',
|
||||||
|
columnWidth: [70, 70, 130, 150, 110,],
|
||||||
|
align: ['center'],
|
||||||
|
data: [],
|
||||||
|
// index:true,
|
||||||
|
rowNum: 10
|
||||||
|
},
|
||||||
cxDataList,
|
cxDataList,
|
||||||
productLineList:[],
|
productLineList:[],
|
||||||
qualityYearList,
|
qualityYearList,
|
||||||
@ -607,8 +631,7 @@ export default {
|
|||||||
this.SJGInitWebSocket()
|
this.SJGInitWebSocket()
|
||||||
this.getTimes()
|
this.getTimes()
|
||||||
this.$refs.EnergyMonitoringChart.initChart(['Y61', 'Y62', 'Y63', 'Y64', 'Y65',], [3134, 2323, 3232, 3233, 2321])
|
this.$refs.EnergyMonitoringChart.initChart(['Y61', 'Y62', 'Y63', 'Y64', 'Y65',], [3134, 2323, 3232, 3233, 2321])
|
||||||
this.$refs.productLineChart.initChart(['Y61', 'Y62', 'Y63', 'Y64', 'Y65',], ['98', '97', '98.7', '98.5', '98.3',], ['4532', '1223', '3442', '4343', '2232'])
|
this.$refs.productLineChart.initChart(['Y61', 'Y62', 'Y63', 'Y64', 'Y65',], [98, 97, 98.7, 98.5, 98.3,], [3134, 2323, 3232, 3233, 2321])
|
||||||
|
|
||||||
const _this = this;
|
const _this = this;
|
||||||
_this.beilv2 = document.documentElement.clientWidth / 1920
|
_this.beilv2 = document.documentElement.clientWidth / 1920
|
||||||
window.onresize = () => {
|
window.onresize = () => {
|
||||||
@ -651,13 +674,28 @@ export default {
|
|||||||
// console.log('11111', res);
|
// console.log('11111', res);
|
||||||
this.productLineList = res.data
|
this.productLineList = res.data
|
||||||
})
|
})
|
||||||
// this.$axios.get(
|
this.$axios.get(
|
||||||
// 'base/quality-inspection-record/dayStatistics',
|
'base/quality-inspection-record/dayStatistics',
|
||||||
// 'get',
|
'get',
|
||||||
// ).then((res) => {
|
).then((res) => {
|
||||||
// // console.log('11111', res);
|
// console.log('11111', res);
|
||||||
// this.qualityMonthList = res.data ? res.data : []
|
if (res.data) {
|
||||||
// })
|
let processArr = res.data.map((item, index) => [
|
||||||
|
// console.log(item)
|
||||||
|
`<span style="color:rgba(255,255,255,0.5)" >${index + 1 || ''}
|
||||||
|
</span>`,
|
||||||
|
// formatDate(item.planStartTime) || '',
|
||||||
|
`
|
||||||
|
<span style="color:rgba(255,255,255,0.5)" >${item.productionLineName || ''}
|
||||||
|
</span>`,
|
||||||
|
`<span style="color:rgba(255,255,255,0.5)">${item.sectionName || ''}</span>`,
|
||||||
|
`<span style="color:rgba(255,255,255,0.5)">${item.count || ''}</span>`,
|
||||||
|
`<span style="color:rgba(255,255,255,0.5)">${item.inspectionTypeName || ''}</span>`,
|
||||||
|
])
|
||||||
|
this.processConfig.data = processArr
|
||||||
|
this.$refs['processScrollBoard'].updateRows(processArr)
|
||||||
|
}
|
||||||
|
})
|
||||||
},
|
},
|
||||||
getTimes() {
|
getTimes() {
|
||||||
setInterval(this.getTimesInterval, 1000);
|
setInterval(this.getTimesInterval, 1000);
|
||||||
@ -752,17 +790,31 @@ export default {
|
|||||||
});
|
});
|
||||||
console.log(this.orderList)
|
console.log(this.orderList)
|
||||||
} else if (this.SJGWsData.type === 'equipment') {
|
} else if (this.SJGWsData.type === 'equipment') {
|
||||||
this.equipmentList = this.SJGWsData.detData.map((ele, index) => {
|
// this.equipmentList = this.SJGWsData.detData.map((ele, index) => {
|
||||||
// if (ele.progressRate != 1) {
|
// // if (ele.progressRate != 1) {
|
||||||
return {
|
// return {
|
||||||
id: ele.id,
|
// id: ele.id,
|
||||||
name: ele.name,
|
// name: ele.name,
|
||||||
code: ele.code,
|
// code: ele.code,
|
||||||
status: ele.status,
|
// status: ele.status,
|
||||||
error: ele.error=== true ? '是' : '否'
|
// error: ele.error=== true ? '是' : '否'
|
||||||
}
|
|
||||||
// }
|
// }
|
||||||
});
|
// // }
|
||||||
|
// });
|
||||||
|
let eqArr = this.SJGWsData.detData.map((item, index) => [
|
||||||
|
// console.log(item)
|
||||||
|
`<span style="color:rgba(255,255,255,0.5)" >${index + 1 || ''}
|
||||||
|
</span>`,
|
||||||
|
// formatDate(item.planStartTime) || '',
|
||||||
|
`
|
||||||
|
<span style="color:rgba(255,255,255,0.5)" >${item.name || ''}
|
||||||
|
</span>`,
|
||||||
|
`<span style="color:rgba(255,255,255,0.5)">${item.code || ''}</span>`,
|
||||||
|
`<span style="color:rgba(255,255,255,0.5)">${item.status || ''}</span>`,
|
||||||
|
`<span style="color:rgba(255,255,255,0.5)">${item.error || ''}</span>`,
|
||||||
|
])
|
||||||
|
this.eqConfig.data = eqArr
|
||||||
|
this.$refs['eqScrollBoard'].updateRows(eqArr)
|
||||||
// console.log(SJGWsData.orderList)
|
// console.log(SJGWsData.orderList)
|
||||||
} else if (this.SJGWsData.type === 'productline') {
|
} else if (this.SJGWsData.type === 'productline') {
|
||||||
// console.log(this.wsData.detData);
|
// console.log(this.wsData.detData);
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
<!--
|
<!--
|
||||||
* @Author: zhp
|
* @Author: zhp
|
||||||
* @Date: 2023-12-08 13:46:17
|
* @Date: 2023-12-08 13:46:17
|
||||||
* @LastEditTime: 2024-01-09 16:03:22
|
* @LastEditTime: 2024-01-16 14:59:33
|
||||||
* @LastEditors: zhp
|
* @LastEditors: zhp
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
<template>
|
<template>
|
||||||
<el-drawer :visible.sync="visible" :show-close="false" :wrapper-closable="false" class="drawer" size="50%">
|
<el-drawer :visible.sync="visible" :show-close="true" :wrapper-closable="false" class="drawer" size="50%">
|
||||||
<small-title slot="title" :no-padding="true">
|
<small-title slot="title" :no-padding="true" @close="handleClose">
|
||||||
{{ isdetail ? '详情' : !dataForm.id ? '新增' : '编辑' }}
|
{{ isdetail ? '详情' : !dataForm.id ? '新增' : '编辑' }}
|
||||||
</small-title>
|
</small-title>
|
||||||
<div class="content">
|
<div class="content">
|
||||||
@ -90,6 +90,18 @@
|
|||||||
</span>
|
</span>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
<el-col :span="4">
|
||||||
|
<el-form-item :prop="'checkValueList.' + index + '.minValue'" label="最小值"
|
||||||
|
:rules="[{ required: true, message: '最小值', trigger: 'blur' }]">
|
||||||
|
<el-input disabled style="width: 90%;margin-right: 10px;" v-model="item.minValue"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="4">
|
||||||
|
<el-form-item :prop="'checkValueList.' + index + '.minValue'" label="最大值"
|
||||||
|
:rules="[{ required: true, message: '最大值', trigger: 'blur' }]">
|
||||||
|
<el-input disabled style="width: 90%;margin-right: 10px;" v-model="item.maxValue"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row :gutter="24">
|
<el-row :gutter="24">
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
@ -252,6 +264,10 @@ export default {
|
|||||||
this.dataForm.checkValueList[index].isStandard = false
|
this.dataForm.checkValueList[index].isStandard = false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
handleClose() {
|
||||||
|
this.ingredientList = undefined
|
||||||
|
console.log(222222222);
|
||||||
|
},
|
||||||
dataFormSubmit() {
|
dataFormSubmit() {
|
||||||
this.$refs["dataForm"].validate((valid) => {
|
this.$refs["dataForm"].validate((valid) => {
|
||||||
if (!valid) {
|
if (!valid) {
|
||||||
@ -288,7 +304,9 @@ export default {
|
|||||||
Promise.all(array).then(res => {
|
Promise.all(array).then(res => {
|
||||||
console.log(res)
|
console.log(res)
|
||||||
this.visible = false;
|
this.visible = false;
|
||||||
|
this.$modal.msgSuccess("修改成功");
|
||||||
this.$emit("refreshDataList");
|
this.$emit("refreshDataList");
|
||||||
|
this.ingredientList = []
|
||||||
}).catch(error => {
|
}).catch(error => {
|
||||||
// 如果任何一个请求失败,将会进入这个 catch 块
|
// 如果任何一个请求失败,将会进入这个 catch 块
|
||||||
console.log(error)
|
console.log(error)
|
||||||
@ -326,6 +344,7 @@ export default {
|
|||||||
Promise.all(array).then(res => {
|
Promise.all(array).then(res => {
|
||||||
this.$modal.msgSuccess("新增成功");
|
this.$modal.msgSuccess("新增成功");
|
||||||
this.visible = false;
|
this.visible = false;
|
||||||
|
this.ingredientList= []
|
||||||
this.$emit("refreshDataList");
|
this.$emit("refreshDataList");
|
||||||
}).catch(error => {
|
}).catch(error => {
|
||||||
// 如果任何一个请求失败,将会进入这个 catch 块
|
// 如果任何一个请求失败,将会进入这个 catch 块
|
||||||
@ -434,6 +453,7 @@ export default {
|
|||||||
init(id, isdetail) {
|
init(id, isdetail) {
|
||||||
this.initData()
|
this.initData()
|
||||||
this.getDict()
|
this.getDict()
|
||||||
|
this.ingredientList = []
|
||||||
this.isdetail = isdetail || false;
|
this.isdetail = isdetail || false;
|
||||||
this.dataForm.id = id || undefined;
|
this.dataForm.id = id || undefined;
|
||||||
this.visible = true;
|
this.visible = true;
|
||||||
@ -445,7 +465,6 @@ export default {
|
|||||||
|
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$refs['dataForm'].resetFields();
|
this.$refs['dataForm'].resetFields();
|
||||||
|
|
||||||
if (this.dataForm.id) {
|
if (this.dataForm.id) {
|
||||||
// 获取产品详情
|
// 获取产品详情
|
||||||
let valueList = []
|
let valueList = []
|
||||||
@ -459,6 +478,7 @@ export default {
|
|||||||
valueList = arr.map((ele) => {
|
valueList = arr.map((ele) => {
|
||||||
// console.log(ele)
|
// console.log(ele)
|
||||||
return {
|
return {
|
||||||
|
checkDetId:ele.id,
|
||||||
maxValue: ele.maxValue,
|
maxValue: ele.maxValue,
|
||||||
minValue: ele.minValue
|
minValue: ele.minValue
|
||||||
}
|
}
|
||||||
@ -472,8 +492,8 @@ export default {
|
|||||||
id: ele.id,
|
id: ele.id,
|
||||||
checkDetId: ele.id,
|
checkDetId: ele.id,
|
||||||
checkValue: ele.checkValue,
|
checkValue: ele.checkValue,
|
||||||
// isStandard: true,
|
maxValue:null,
|
||||||
// showIcon: false,
|
minValue: null
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
console.log(this.ingredientList);
|
console.log(this.ingredientList);
|
||||||
@ -487,9 +507,15 @@ export default {
|
|||||||
showIcon: false,
|
showIcon: false,
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
valueList.forEach((ele, index) => {
|
||||||
|
if (this.ingredientList[index].checkDetId >= ele.checkDetId) {
|
||||||
|
this.ingredientList[index].minValue = ele.minValue
|
||||||
|
this.ingredientList[index].maxValue = ele.maxValue
|
||||||
|
}
|
||||||
|
})
|
||||||
valueList.forEach((ele,index) => {
|
valueList.forEach((ele,index) => {
|
||||||
console.log(ele);
|
console.log(ele);
|
||||||
if (this.dataForm.checkValueList[index].checkValue >= ele.minValue && this.dataForm.checkValueList[index].checkValue <= ele.maxValue) {
|
if (this.dataForm.checkValueList[index].checkDetId >= ele.checkDetId && this.dataForm.checkValueList[index].checkValue >= ele.minValue && this.dataForm.checkValueList[index].checkValue <= ele.maxValue) {
|
||||||
this.dataForm.checkValueList[index].showIcon = true
|
this.dataForm.checkValueList[index].showIcon = true
|
||||||
this.dataForm.checkValueList[index].isStandard = true
|
this.dataForm.checkValueList[index].isStandard = true
|
||||||
} else {
|
} else {
|
||||||
@ -512,7 +538,8 @@ export default {
|
|||||||
},
|
},
|
||||||
goback() {
|
goback() {
|
||||||
this.$emit('refreshDataList');
|
this.$emit('refreshDataList');
|
||||||
this.visible = false;
|
this.visible = false
|
||||||
|
this.ingredientList = []
|
||||||
// this.initData();
|
// this.initData();
|
||||||
},
|
},
|
||||||
goEdit() {
|
goEdit() {
|
||||||
|
Loading…
Reference in New Issue
Block a user