修改ui
This commit is contained in:
parent
bfa17e422d
commit
f3043ee11f
@ -1,7 +1,7 @@
|
|||||||
<!--
|
<!--
|
||||||
* @Author: zhp
|
* @Author: zhp
|
||||||
* @Date: 2024-01-29 16:50:26
|
* @Date: 2024-01-29 16:50:26
|
||||||
* @LastEditTime: 2024-04-11 09:55:04
|
* @LastEditTime: 2024-04-16 13:44:14
|
||||||
* @LastEditors: zhp
|
* @LastEditors: zhp
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
@ -635,32 +635,34 @@ export default {
|
|||||||
// this.cutConfig.data = cutArr
|
// this.cutConfig.data = cutArr
|
||||||
// this.$refs['cutScrollBoard'].updateRows(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 = []
|
if (this.cutWsData.coldDetData.length !== 0) {
|
||||||
let nameWasteList = []
|
let nameList = []
|
||||||
let topNameList = []
|
let nameWasteList = []
|
||||||
let productList = []
|
let topNameList = []
|
||||||
let wasteList = []
|
let productList = []
|
||||||
let sumAreaList = []
|
let wasteList = []
|
||||||
let yieldList = []
|
let sumAreaList = []
|
||||||
this.coldDetData = this.cutWsData.coldDetData
|
let yieldList = []
|
||||||
// this.cutTableDataList =
|
this.coldDetData = this.cutWsData.coldDetData
|
||||||
this.cutWsData.coldDetData.forEach((ele, index) => {
|
// this.cutTableDataList =
|
||||||
nameList.push(ele.lineName)
|
this.cutWsData.coldDetData.forEach((ele, index) => {
|
||||||
topNameList.push('产线: ' + ele.lineName + ' ' + '总面积:' + ele.sumArea + '㎡')
|
nameList.push(ele.lineName)
|
||||||
productList.push(ele.productArea)
|
topNameList.push('产线: ' + ele.lineName + ' ' + '总面积:' + ele.sumArea + '㎡')
|
||||||
wasteList.push(ele.wastArea)
|
productList.push(ele.productArea)
|
||||||
nameWasteList.push('缺陷面积:' + this.NumFormat(ele.wastArea) + '㎡')
|
wasteList.push(ele.wastArea)
|
||||||
sumAreaList.push(ele.sumArea)
|
nameWasteList.push('缺陷面积:' + this.NumFormat(ele.wastArea) + '㎡')
|
||||||
yieldList.push(parseFloat((ele.yield * 100).toFixed(0)))
|
sumAreaList.push(ele.sumArea)
|
||||||
})
|
yieldList.push(parseFloat((ele.yield * 100).toFixed(0)))
|
||||||
this.$nextTick(() => {
|
})
|
||||||
this.$refs.firstPileChart.initChart(nameList, [topNameList[0]], [nameWasteList[0]], [productList[0]], [wasteList[0]])
|
this.$nextTick(() => {
|
||||||
this.$refs.secondPileChart.initChart(nameList, [topNameList[1]], [nameWasteList[1]], [productList[1]], [wasteList[1]])
|
this.$refs.firstPileChart.initChart(nameList, [topNameList[0]], [nameWasteList[0]], [productList[0]], [wasteList[0]])
|
||||||
this.$refs.thirdPileChart.initChart(nameList, [topNameList[2]], [nameWasteList[2]], [productList[2]], [wasteList[2]])
|
this.$refs.secondPileChart.initChart(nameList, [topNameList[1]], [nameWasteList[1]], [productList[1]], [wasteList[1]])
|
||||||
this.$refs.fourthPileChart.initChart(nameList, [topNameList[3]], [nameWasteList[3]], [productList[3]], [wasteList[3]])
|
this.$refs.thirdPileChart.initChart(nameList, [topNameList[2]], [nameWasteList[2]], [productList[2]], [wasteList[2]])
|
||||||
this.$refs.fifthPileChart.initChart(nameList, [topNameList[4]], [nameWasteList[4]], [productList[4]], [wasteList[4]])
|
this.$refs.fourthPileChart.initChart(nameList, [topNameList[3]], [nameWasteList[3]], [productList[3]], [wasteList[3]])
|
||||||
this.$refs.productChart.initChart(nameList, yieldList, sumAreaList)
|
this.$refs.fifthPileChart.initChart(nameList, [topNameList[4]], [nameWasteList[4]], [productList[4]], [wasteList[4]])
|
||||||
})
|
this.$refs.productChart.initChart(nameList, yieldList, sumAreaList)
|
||||||
|
})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
// if (typeof (WebSocket) === 'undefined') {
|
// if (typeof (WebSocket) === 'undefined') {
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<!--
|
<!--
|
||||||
* @Author: zhp
|
* @Author: zhp
|
||||||
* @Date: 2024-01-29 13:45:56
|
* @Date: 2024-01-29 13:45:56
|
||||||
* @LastEditTime: 2024-04-15 09:28:21
|
* @LastEditTime: 2024-04-16 13:43:05
|
||||||
* @LastEditors: zhp
|
* @LastEditors: zhp
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
@ -126,22 +126,22 @@ export default {
|
|||||||
color: '#fff00',
|
color: '#fff00',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
legend: {
|
// legend: {
|
||||||
bottom: '10%',
|
// bottom: '10%',
|
||||||
left: 'center',
|
// left: 'center',
|
||||||
itemWidth: 12,
|
// itemWidth: 12,
|
||||||
itemHeight:12,
|
// itemHeight:12,
|
||||||
icon: 'roundRect',
|
// icon: 'roundRect',
|
||||||
textStyle: {
|
// textStyle: {
|
||||||
color: '#fff'
|
// color: '#fff'
|
||||||
},
|
// },
|
||||||
data:this.chartData && this.chartData.length > 0 && this.chartData.map((item,index)=>({
|
// data:this.chartData && this.chartData.length > 0 && this.chartData.map((item,index)=>({
|
||||||
name:item.name,
|
// name:item.name,
|
||||||
itemStyle:{
|
// itemStyle:{
|
||||||
color: this.colors[index%4]
|
// color: this.colors[index%4]
|
||||||
}
|
// }
|
||||||
}))
|
// }))
|
||||||
},
|
// },
|
||||||
series:[{
|
series:[{
|
||||||
name: 'ISRA缺陷检测',
|
name: 'ISRA缺陷检测',
|
||||||
type: 'pie',
|
type: 'pie',
|
||||||
@ -168,7 +168,7 @@ export default {
|
|||||||
},
|
},
|
||||||
textStyle: { // 提示文字的样式
|
textStyle: { // 提示文字的样式
|
||||||
// color: '#595959',
|
// color: '#595959',
|
||||||
fontSize: 16
|
fontSize: 18
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
<!--
|
<!--
|
||||||
* @Author: zhp
|
* @Author: zhp
|
||||||
* @Date: 2023-09-21 09:06:28
|
* @Date: 2023-09-21 09:06:28
|
||||||
* @LastEditTime: 2024-04-09 15:24:39
|
* @LastEditTime: 2024-04-16 13:39:25
|
||||||
* @LastEditors: zhp
|
* @LastEditors: zhp
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
@ -156,6 +156,8 @@ export default {
|
|||||||
this.chart.setOption({
|
this.chart.setOption({
|
||||||
// color: colors,
|
// color: colors,
|
||||||
tooltip: {
|
tooltip: {
|
||||||
|
trigger: 'item',
|
||||||
|
className: "isra-chart-tooltip",
|
||||||
trigger: 'axis',
|
trigger: 'axis',
|
||||||
axisPointer: {
|
axisPointer: {
|
||||||
type: 'cross'
|
type: 'cross'
|
||||||
@ -318,8 +320,16 @@ export default {
|
|||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<style>
|
<style>
|
||||||
|
|
||||||
.coldProductChart{
|
.coldProductChart{
|
||||||
top: -10px;
|
top: -10px;
|
||||||
}
|
}
|
||||||
|
.isra-chart-tooltip {
|
||||||
|
background: #0a2b4f77 !important;
|
||||||
|
border: none !important;
|
||||||
|
backdrop-filter: blur(12px);
|
||||||
|
}
|
||||||
|
|
||||||
|
.isra-chart-tooltip * {
|
||||||
|
color: #fff !important;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<!--
|
<!--
|
||||||
* @Author: zhp
|
* @Author: zhp
|
||||||
* @Date: 2023-09-21 09:06:28
|
* @Date: 2023-09-21 09:06:28
|
||||||
* @LastEditTime: 2024-04-09 15:24:28
|
* @LastEditTime: 2024-04-16 13:37:38
|
||||||
* @LastEditors: zhp
|
* @LastEditors: zhp
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
@ -162,6 +162,8 @@ export default {
|
|||||||
this.chart.setOption({
|
this.chart.setOption({
|
||||||
// color: colors,
|
// color: colors,
|
||||||
tooltip: {
|
tooltip: {
|
||||||
|
trigger: 'item',
|
||||||
|
className: "isra-chart-tooltip",
|
||||||
trigger: 'axis',
|
trigger: 'axis',
|
||||||
axisPointer: {
|
axisPointer: {
|
||||||
type: 'cross'
|
type: 'cross'
|
||||||
@ -327,4 +329,13 @@ export default {
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
top: -30px;
|
top: -30px;
|
||||||
}
|
}
|
||||||
|
.isra-chart-tooltip {
|
||||||
|
background: #0a2b4f77 !important;
|
||||||
|
border: none !important;
|
||||||
|
backdrop-filter: blur(12px);
|
||||||
|
}
|
||||||
|
|
||||||
|
.isra-chart-tooltip * {
|
||||||
|
color: #fff !important;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
@ -128,6 +128,8 @@ export default {
|
|||||||
this.chart.setOption({
|
this.chart.setOption({
|
||||||
tooltip: {
|
tooltip: {
|
||||||
trigger: 'axis',
|
trigger: 'axis',
|
||||||
|
trigger: 'item',
|
||||||
|
className: "isra-chart-tooltip",
|
||||||
axisPointer: {
|
axisPointer: {
|
||||||
// 坐标轴指示器,坐标轴触发有效
|
// 坐标轴指示器,坐标轴触发有效
|
||||||
type: 'shadow' // 默认为直线,可选为:'line' | 'shadow'
|
type: 'shadow' // 默认为直线,可选为:'line' | 'shadow'
|
||||||
@ -226,4 +228,13 @@ export default {
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
top: -30px;
|
top: -30px;
|
||||||
}
|
}
|
||||||
|
.isra-chart-tooltip {
|
||||||
|
background: #0a2b4f77 !important;
|
||||||
|
border: none !important;
|
||||||
|
backdrop-filter: blur(12px);
|
||||||
|
}
|
||||||
|
|
||||||
|
.isra-chart-tooltip * {
|
||||||
|
color: #fff !important;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<!--
|
<!--
|
||||||
* @Author: zhp
|
* @Author: zhp
|
||||||
* @Date: 2023-12-27 13:54:52
|
* @Date: 2023-12-27 13:54:52
|
||||||
* @LastEditTime: 2024-04-03 18:12:18
|
* @LastEditTime: 2024-04-16 13:16:34
|
||||||
* @LastEditors: zhp
|
* @LastEditors: zhp
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
@ -101,11 +101,14 @@ export default {
|
|||||||
});;
|
});;
|
||||||
},
|
},
|
||||||
initChart(nameList, topNameList, nameWasteList, passRateList, wasteList) {
|
initChart(nameList, topNameList, nameWasteList, passRateList, wasteList) {
|
||||||
let rawData = []
|
if (topNameList.length === 0 && nameWasteList.length === 0 && passRateList === 0 && wasteList === 0) {
|
||||||
let colors = ['#0fdedb', '#2359ec']
|
return
|
||||||
|
} else {
|
||||||
|
let rawData = []
|
||||||
|
let colors = ['#0fdedb', '#2359ec']
|
||||||
rawData.push(passRateList, wasteList)
|
rawData.push(passRateList, wasteList)
|
||||||
const totalData = [];
|
const totalData = [];
|
||||||
// if (rawData.length != 0 && raw,Data,length != 0) {
|
// if (rawData.length != 0 && raw,Data,length != 0) {
|
||||||
for (let i = 0; i < rawData[0].length; ++i) {
|
for (let i = 0; i < rawData[0].length; ++i) {
|
||||||
let sum = 0;
|
let sum = 0;
|
||||||
for (let j = 0; j < rawData.length; ++j) {
|
for (let j = 0; j < rawData.length; ++j) {
|
||||||
@ -113,150 +116,152 @@ export default {
|
|||||||
}
|
}
|
||||||
totalData.push(sum);
|
totalData.push(sum);
|
||||||
}
|
}
|
||||||
// }
|
// }
|
||||||
// rawData[1].map((d, did) =>
|
// rawData[1].map((d, did) =>
|
||||||
// console.log((d / totalData[did]).toFixed(3))
|
// console.log((d / totalData[did]).toFixed(3))
|
||||||
// // totalData[did] <= 0 ? 0 : d / totalData[did]
|
// // totalData[did] <= 0 ? 0 : d / totalData[did]
|
||||||
// )
|
// )
|
||||||
console.log('total', totalData)
|
console.log('total', totalData)
|
||||||
const series = [
|
const series = [
|
||||||
'良品',
|
'良品',
|
||||||
'废品',
|
'废品',
|
||||||
// 'Affiliate Ad',
|
// 'Affiliate Ad',
|
||||||
// 'Video Ad',
|
// 'Video Ad',
|
||||||
// 'Search Engine'
|
// 'Search Engine'
|
||||||
].map((name, sid) => {
|
].map((name, sid) => {
|
||||||
// console.log(sid)
|
// console.log(sid)
|
||||||
return {
|
return {
|
||||||
name,
|
name,
|
||||||
type: 'bar',
|
type: 'bar',
|
||||||
stack: 'total',
|
stack: 'total',
|
||||||
barWidth: 12,
|
barWidth: 12,
|
||||||
// label: {
|
// label: {
|
||||||
// show: true,
|
// show: true,
|
||||||
// formatter: (params) => Math.round(params.value * 1000) / 10 + '%'
|
// formatter: (params) => Math.round(params.value * 1000) / 10 + '%'
|
||||||
// },
|
// },
|
||||||
color:colors[sid],
|
color: colors[sid],
|
||||||
data: rawData.length != 0 ? rawData[sid].map((d, did) =>
|
data: rawData.length != 0 ? rawData[sid].map((d, did) =>
|
||||||
totalData[did] <= 0 ? 0 : (d / totalData[did]).toFixed(4)
|
totalData[did] <= 0 ? 0 : (d / totalData[did]).toFixed(4)
|
||||||
) : []
|
) : []
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
// this.charts.resize({
|
// this.charts.resize({
|
||||||
// //width: width,
|
// //width: width,
|
||||||
// //height: height,
|
// //height: height,
|
||||||
// // es6解构
|
// // es6解构
|
||||||
// width,
|
// width,
|
||||||
// height
|
// height
|
||||||
// })
|
// })
|
||||||
this.chart = echarts.init(document.getElementById(this.id))
|
this.chart = echarts.init(document.getElementById(this.id))
|
||||||
let isFinished = false //标记 isFinished
|
let isFinished = false //标记 isFinished
|
||||||
this.chart.on('finished', _ => {
|
this.chart.on('finished', _ => {
|
||||||
if (!isFinished) {
|
if (!isFinished) {
|
||||||
console.log('我只执行一次')
|
console.log('我只执行一次')
|
||||||
isFinished = true
|
isFinished = true
|
||||||
// this.isLoading = false //关闭loading
|
// this.isLoading = false //关闭loading
|
||||||
this.chart.resize() //重新渲染charts大小
|
this.chart.resize() //重新渲染charts大小
|
||||||
}
|
|
||||||
console.log(113, 'finished')
|
|
||||||
})
|
|
||||||
this.chart.setOption({
|
|
||||||
legend: {
|
|
||||||
formatter: function (name) {
|
|
||||||
//通过name获取到数组对象中的单个对象
|
|
||||||
let singleData = series.filter(function (item) {
|
|
||||||
return item.name == name
|
|
||||||
})
|
|
||||||
return name + parseFloat((singleData[0].data * 100).toFixed(0)) + '%'
|
|
||||||
},
|
|
||||||
itemWidth: 12,
|
|
||||||
itemHeight: 12,
|
|
||||||
bottom: '20',
|
|
||||||
left: '20',
|
|
||||||
icon: 'roundRect',
|
|
||||||
textStyle: {
|
|
||||||
color: 'rgba(255,255,255,.9)',
|
|
||||||
fontSize:12,
|
|
||||||
}
|
}
|
||||||
},
|
console.log(113, 'finished')
|
||||||
grid: {
|
})
|
||||||
top:'0',
|
this.chart.setOption({
|
||||||
left: '3%',
|
legend: {
|
||||||
right: '4%',
|
formatter: function (name) {
|
||||||
// bottom: '3%',
|
//通过name获取到数组对象中的单个对象
|
||||||
width: 'auto',
|
let singleData = series.filter(function (item) {
|
||||||
height: '95',
|
return item.name == name
|
||||||
containLabel: true
|
})
|
||||||
},
|
return name + parseFloat((singleData[0].data * 100).toFixed(0)) + '%'
|
||||||
yAxis: [
|
|
||||||
{
|
|
||||||
type: 'category',
|
|
||||||
inverse: true,
|
|
||||||
splitLine: {
|
|
||||||
show: false
|
|
||||||
},
|
},
|
||||||
axisTick: {
|
itemWidth: 12,
|
||||||
show: false
|
itemHeight: 12,
|
||||||
},
|
bottom: '20',
|
||||||
axisLine: {
|
left: '20',
|
||||||
show: false
|
icon: 'roundRect',
|
||||||
},
|
textStyle: {
|
||||||
axisLabel: {
|
color: 'rgba(255,255,255,.9)',
|
||||||
show: true,
|
fontSize: 12,
|
||||||
inside: true,
|
}
|
||||||
interval: 0, //横轴信息全部显
|
|
||||||
splitNumber: 50,
|
|
||||||
// boundaryGap: [20, 20],
|
|
||||||
textStyle: {
|
|
||||||
color: 'rgba(255,255,255,.9)',
|
|
||||||
verticalAlign: 'bottom',
|
|
||||||
fontSize: 16,
|
|
||||||
align: 'left',
|
|
||||||
padding: [0, 0, 10, -5]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
data: topNameList
|
|
||||||
},
|
},
|
||||||
{
|
grid: {
|
||||||
type: 'category',
|
top: '0',
|
||||||
inverse: true,
|
left: '3%',
|
||||||
splitLine: {
|
right: '4%',
|
||||||
show: false
|
// bottom: '3%',
|
||||||
|
width: 'auto',
|
||||||
|
height: '95',
|
||||||
|
containLabel: true
|
||||||
|
},
|
||||||
|
yAxis: [
|
||||||
|
{
|
||||||
|
type: 'category',
|
||||||
|
inverse: true,
|
||||||
|
splitLine: {
|
||||||
|
show: false
|
||||||
|
},
|
||||||
|
axisTick: {
|
||||||
|
show: false
|
||||||
|
},
|
||||||
|
axisLine: {
|
||||||
|
show: false
|
||||||
|
},
|
||||||
|
axisLabel: {
|
||||||
|
show: true,
|
||||||
|
inside: true,
|
||||||
|
interval: 0, //横轴信息全部显
|
||||||
|
splitNumber: 50,
|
||||||
|
// boundaryGap: [20, 20],
|
||||||
|
textStyle: {
|
||||||
|
color: 'rgba(255,255,255,.9)',
|
||||||
|
verticalAlign: 'bottom',
|
||||||
|
fontSize: 16,
|
||||||
|
align: 'left',
|
||||||
|
padding: [0, 0, 10, -5]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
data: topNameList
|
||||||
},
|
},
|
||||||
axisTick: {
|
{
|
||||||
show: false
|
type: 'category',
|
||||||
},
|
inverse: true,
|
||||||
axisLine: {
|
splitLine: {
|
||||||
show: false
|
show: false
|
||||||
},
|
},
|
||||||
axisLabel: {
|
axisTick: {
|
||||||
show: true,
|
show: false
|
||||||
inside: true,
|
},
|
||||||
interval: 0, //横轴信息全部显
|
axisLine: {
|
||||||
splitNumber: 50,
|
show: false
|
||||||
// boundaryGap: [20, 20],
|
},
|
||||||
textStyle: {
|
axisLabel: {
|
||||||
color: 'rgba(255,255,255,.9)',
|
show: true,
|
||||||
verticalAlign: 'bottom',
|
inside: true,
|
||||||
fontSize: 16,
|
interval: 0, //横轴信息全部显
|
||||||
align: 'right',
|
splitNumber: 50,
|
||||||
padding: [0, 0, 10, -5]
|
// boundaryGap: [20, 20],
|
||||||
}
|
textStyle: {
|
||||||
},
|
color: 'rgba(255,255,255,.9)',
|
||||||
data: nameWasteList
|
verticalAlign: 'bottom',
|
||||||
}
|
fontSize: 16,
|
||||||
],
|
align: 'right',
|
||||||
xAxis: {
|
padding: [0, 0, 10, -5]
|
||||||
// max: 120,
|
}
|
||||||
show: false,
|
},
|
||||||
},
|
data: nameWasteList
|
||||||
series:series
|
}
|
||||||
})
|
],
|
||||||
this.$nextTick(() => {
|
xAxis: {
|
||||||
setTimeout(() => {
|
// max: 120,
|
||||||
this.resize()
|
show: false,
|
||||||
},1000);
|
},
|
||||||
})
|
series: series
|
||||||
|
})
|
||||||
|
this.$nextTick(() => {
|
||||||
|
setTimeout(() => {
|
||||||
|
this.resize()
|
||||||
|
}, 1000);
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
// this.chart.resize({
|
// this.chart.resize({
|
||||||
// width: 'auto',
|
// width: 'auto',
|
||||||
// height: 90
|
// height: 90
|
||||||
|
@ -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-04-10 16:10:11
|
* @LastEditTime: 2024-04-16 13:42:27
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
<template>
|
<template>
|
||||||
@ -747,8 +747,8 @@ export default {
|
|||||||
`<span style="color:rgba(255,255,255,0.5)">${
|
`<span style="color:rgba(255,255,255,0.5)">${
|
||||||
item.code || ''
|
item.code || ''
|
||||||
}</span>`,
|
}</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.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 == '是' ? '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.error || ''}</span>`,
|
`<span style="color:rgba(255,255,255,0.5)"><div style="${item.error == 'true' ? '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: red;float:left;margin:10px 10px 0 0 '}"></div> ${item.error || ''}</span>`,
|
||||||
]);
|
]);
|
||||||
this.eqConfig.data = eqArr;
|
this.eqConfig.data = eqArr;
|
||||||
// this.$nextTick(() => {
|
// this.$nextTick(() => {
|
||||||
@ -790,7 +790,23 @@ export default {
|
|||||||
outputNumList
|
outputNumList
|
||||||
);
|
);
|
||||||
})
|
})
|
||||||
} else if (this.SJGInitWebSocket === 'inspection') {
|
} else if (this.SJGWsData.type === 'inspection') {
|
||||||
|
let processArr = this.SJGWsData.detData.map((item, index) => [
|
||||||
|
`<span style="color:rgba(255,255,255,0.5)" >${index + 1 || ''}
|
||||||
|
</span>`,
|
||||||
|
`<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.$nextTick(() => {
|
||||||
|
this.$refs['processScrollBoard'].updateRows(processArr);
|
||||||
|
// })
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user