Merge branch 'projects/mesxc-test' of git.picaiba.com:mt-fe-group/yudao-dev into projects/mesxc-test

This commit is contained in:
gtz
2024-03-28 18:04:33 +08:00
123 changed files with 1437 additions and 15074 deletions

View File

@@ -2,7 +2,7 @@
* @Author: zwq
* @Date: 2021-07-19 15:18:30
* @LastEditors: zhp
* @LastEditTime: 2024-03-26 09:57:35
* @LastEditTime: 2024-03-28 15:28:07
* @Description:
-->
<template>
@@ -16,35 +16,32 @@
许昌安彩AGV原片周转看板
<h3 class="unit">单位河南汇融数字科技有限公司</h3>
<h3 class="time">{{ times }}</h3>
<!-- <el-button
type="text"
class="title-button"
:style="{ right: 33 + 'px', top: 37 + 'px' }"
@click="changeFullScreen"
>
<svg-icon v-if="isFullScreen" icon-class="unFullScreenView" />
<svg-icon v-else icon-class="fullScreenView" />
</el-button> -->
<el-button type="text" class="title-button" :style="{ right: 18 + 'px', top: 26 + 'px', fontSize: '32px' }"
@click="changeFullScreen">
<svg-icon width="32" height="32" v-if="isFullScreen" icon-class="unFullScreenView" />
<svg-icon width="32" height="32" v-else icon-class="fullScreenView" />
</el-button>
</el-row>
<el-row class="container-main flex-col" type="flex">
<el-row :style="{ padding: '0 ' + 9 + 'px' }" :gutter="15 * beilv" type="flex" class="flex-1">
<el-col :style="{ margin: 8 + 'px' + ' 0' }" :span="12">
<base-container :beilv="1" :size="'middle'" :title="'搬运任务'" :title-icon="'task'" :back="'energy'">
<base-table1 :page="1" :limit="999" :show-index="false" :beilv="1" :table-config="qualityYearTableProps"
:table-data="qualityYearList" />
<base-container :beilv="1" :size="'eqStatus'" :title="'搬运任务'" :title-icon="'task'" :back="'energy'">
<!-- <base-table1 :page="1" :limit="999" :show-index="false" :beilv="1" :table-config="qualityYearTableProps"
:table-data="qualityYearList" /> -->
<dv-scroll-board :config="taskConfig" style="width:100%;height:350px" ref='taskScrollBoard' />
</base-container>
</el-col>
<el-col :style="{ margin: 8 + 'px' + ' 0' }" :span="12">
<base-container :beilv="1" :size="'middle'" :title="'周转进度'" :title-icon="'order'" :back="'energy'">
<div style="width:100%; overflow: hidden scroll;">
<base-container :beilv="1" :size="'eqStatus'" :title="'周转进度'" :title-icon="'order'" :back="'energy'">
<div class="order" style="width:100%; overflow: hidden scroll;height: 350px;">
<el-row v-for="op in orderProcessList" :key="op.id" style="margin-bottom: 1em">
<p v-if="op.outRate === 1" class="now-secondary-title" style="color:#4679FD">
<i class="el-icon-check" />
{{ op.name }}
</p>
<p v-else class="now-secondary-title">{{ op.name }}</p>
<el-progress define-back-color="rgba(32, 57, 96, 1)" text-color="white" :percentage="op.outRate * 100"
class="custom-progress-bar" />
<el-progress :stroke-width="10" define-back-color="rgba(32, 57, 96, 1)" text-color="white"
:percentage="op.outRate * 100" class="custom-progress-bar" />
</el-row>
</div>
</base-container>
@@ -53,17 +50,19 @@
<el-row :style="{ padding: '0 ' + 9 + 'px' }" :gutter="12 * beilv" type="flex" class="flex-1">
<el-col :style="{ margin: 8 + 'px' + ' 0' }" :span="12">
<base-container :beilv="1" :height="256" :size="'middle'" :title="'库存管理'" :title-icon="'productLine'"
<base-container :beilv="1" :height="280" :size="'eqStatus'" :title="'库存管理'" :title-icon="'productLine'"
:back="'energy'">
<base-table :page="1" :limit="999" :show-index="false" :beilv="1" :table-config="inventoryTableProps"
:table-data="inventoryList" />
<!-- <base-table :page="1" :limit="999" :show-index="false" :beilv="1" :table-config="inventoryTableProps"
:table-data="inventoryList" /> -->
<dv-scroll-board :config="inventoryConfig" style="width:100%;height:380px" ref='inventoryScrollBoard' />
</base-container>
</el-col>
<el-col :style="{ margin: 8 + 'px' + ' 0' }" :span="12">
<base-container :beilv="1" :height="318 + 338 + 16" :size="'middle'" :title="'库位信息'" :title-icon="'info'"
<base-container :beilv="1" :height="318 + 338 + 16" :size="'eqStatus'" :title="'库位信息'" :title-icon="'info'"
:back="'energy'">
<base-table2 :page="1" :limit="999" :show-index="false" :beilv="1" :table-config="locationTableProps"
:table-data="locationList" />
<!-- <base-table2 :page="1" :limit="999" :show-index="false" :beilv="1" :table-config="locationTableProps"
:table-data="locationList" /> -->
<dv-scroll-board :config="locationConfig" style="width:100%;height:380px" ref='locationScrollBoard' />
</base-container>
</el-col>
</el-row>
@@ -191,6 +190,15 @@ const inventoryList = [
{
eqName: ' 螺丝刀', eqCode: '备件库', level: '', product: ' 123', productCode: 'WLXX20220919000147', unit: '个', time: '2023年9月10日'
},
{
eqName: ' 清洗剂', eqCode: '备件库', level: '200mm', product: ' 123', productCode: 'WLXX20220919000147', unit: '瓶', time: '2023年9月10日'
},
{
eqName: ' 清洗剂', eqCode: '备件库', level: '200mm', product: ' 123', productCode: 'WLXX20220919000147', unit: '瓶', time: '2023年9月10日'
},
{
eqName: ' 清洗剂', eqCode: '备件库', level: '200mm', product: ' 123', productCode: 'WLXX20220919000147', unit: '瓶', time: '2023年9月10日'
},
{
eqName: ' 清洗剂', eqCode: '备件库', level: '200mm', product: ' 123', productCode: 'WLXX20220919000147', unit: '瓶', time: '2023年9月10日'
}
@@ -267,6 +275,39 @@ export default {
inventoryTableProps,
inventoryList,
locationList,
taskConfig: {
header: ['序号', '作业号', '执行叉车', '库位', '成品规格', '成品编码', '时间'],
headerBGC: 'rgba(32, 55, 96, 0.8)',
oddRowBGC: 'rgba(32, 55, 96, 0.8)',
evenRowBGC: 'rgba(14, 32, 62, 0.8)',
columnWidth: [80, 120, 90, 140, 140, 150,130],
align: ['center'],
data: [],
// index:true,
rowNum: 10
},
inventoryConfig: {
header: ['序号', '物件名称', '存放区域', '规格', '数量', '单位', '编码', '入库时间'],
headerBGC: 'rgba(32, 55, 96, 0.8)',
oddRowBGC: 'rgba(32, 55, 96, 0.8)',
evenRowBGC: 'rgba(14, 32, 62, 0.8)',
columnWidth: [80, 100, 90, 140, 80, 70, 180, 120],
align: ['center'],
data: [],
// index:true,
rowNum: 10
},
locationConfig: {
header: ['序号', '库位名称', '存放物件名称', '数量', '存放位置', '编码', '单位', '入库时间'],
headerBGC: 'rgba(32, 55, 96, 0.8)',
oddRowBGC: 'rgba(32, 55, 96, 0.8)',
evenRowBGC: 'rgba(14, 32, 62, 0.8)',
columnWidth: [80, 100, 120, 80, 100, 180, 70, 120],
align: ['center'],
data: [],
// index:true,
rowNum: 10
},
locationTableProps,
qualityYearList,
isFullScreen: false,
@@ -294,6 +335,20 @@ export default {
{
name: '作业号RQ20230911',
outRate: '0.4'
},
{
name: '作业号RQ20230911',
outRate: '0.4'
},
{
name: '作业号RQ20230911',
outRate: '0.4'
}, {
name: '作业号RQ20230911',
outRate: '0.4'
}, {
name: '作业号RQ20230911',
outRate: '0.4'
}
],
// qualityTableProps1,
@@ -316,6 +371,16 @@ export default {
},
watch: {
isFullScreen: function (val) {
if (val) {
const _this = this;
_this.beilv2 = document.documentElement.clientWidth / 1920
console.log(_this.beilv2);
} else {
const _this = this;
_this.beilv2 = document.documentElement.clientWidth / 1920
}
},
clientWidth(val) {
if (!this.timer) {
this.clientWidth = val
@@ -343,6 +408,9 @@ export default {
}, 86400000)
},
mounted() {
this.getTask()
this.getInventoryData()
this.getLocationData()
const _this = this;
window.onresize = () => {
return (() => {
@@ -355,6 +423,60 @@ export default {
getTimes() {
setInterval(this.getTimesInterval, 1000);
},
getTask() {
let eqArr = this.qualityYearList.map((item, index) => [
`<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.eqName || ''}
</span>`,
`<span style="color:rgba(255,255,255,0.5)">${item.eqCode || ''}</span>`,
`<span style="color:rgba(255,255,255,0.5)">${item.level || ''}</span>`,
`<span style="color:rgba(255,255,255,0.5)">${item.product || ''}</span>`,
`<span style="color:rgba(255,255,255,0.5)">${item.productCode || ''}</span>`,
`<span style="color:rgba(255,255,255,0.5)">${item.time || ''}</span>`,
])
this.taskConfig.data = eqArr
this.$refs['taskScrollBoard'].updateRows(eqArr)
},
getInventoryData() {
let eqArr = this.inventoryList.map((item, index) => [
`<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.eqName || ''}
</span>`,
`<span style="color:rgba(255,255,255,0.5)">${item.eqCode || ''}</span>`,
`<span style="color:rgba(255,255,255,0.5)">${item.level || ''}</span>`,
`<span style="color:rgba(255,255,255,0.5)">${item.product || ''}</span>`,
`<span style="color:rgba(255,255,255,0.5)">${item.unit || ''}</span>`,
`<span style="color:rgba(255,255,255,0.5)">${item.productCode || ''}</span>`,
`<span style="color:rgba(255,255,255,0.5)">${item.time || ''}</span>`,
])
this.inventoryConfig.data = eqArr
this.$refs['inventoryScrollBoard'].updateRows(eqArr)
},
getLocationData() {
let eqArr = this.locationList.map((item, index) => [
`<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.eqName || ''}
</span>`,
`<span style="color:rgba(255,255,255,0.5)">${item.eqCode || ''}</span>`,
`<span style="color:rgba(255,255,255,0.5)">${item.product || ''}</span>`,
`<span style="color:rgba(255,255,255,0.5)">${item.level || ''}</span>`,
`<span style="color:rgba(255,255,255,0.5)">${item.productCode || ''}</span>`,
`<span style="color:rgba(255,255,255,0.5)">${item.unit || ''}</span>`,
`<span style="color:rgba(255,255,255,0.5)">${item.time || ''}</span>`,
])
this.locationConfig.data = eqArr
this.$refs['locationScrollBoard'].updateRows(eqArr)
},
getTimesInterval: function () {
let _this = this;
let year = new Date().getFullYear(); //获取当前时间的年份
@@ -383,25 +505,25 @@ export default {
this.isFullScreen = screenfull.isFullscreen
},
init() {
if (screenfull.enabled) {
if (screenfull.isEnabled) {
screenfull.on('change', this.change)
}
},
destroy() {
if (screenfull.enabled) {
if (screenfull.isEnabled) {
screenfull.off('change', this.change)
}
},
changeFullScreen() {
console.log(this.beilv);
if (!screenfull.enabled) {
if (!screenfull.isEnabled) {
this.$message({
message: 'you browser can not work',
type: 'warning'
})
return false
}
screenfull.toggle(this.$refs.container)
screenfull.toggle()
}
}
}
@@ -410,6 +532,9 @@ export default {
<style lang="scss" scoped>
.visual-container {
width: 1920px;
height: 1080px;
@@ -418,26 +543,29 @@ export default {
// opacity: .8;
.container-title {
width: 100%;
background: url('../../assets/img/OperationalOverview/title.png') no-repeat;
background: url('../../assets/img/OperationalOverview/AGV.png') no-repeat;
background-size: 100% 100%;
color: #00fff0;
text-align: center;
word-spacing:8px;
letter-spacing: 8px;
// word-spacing: 8px;
position: relative;
.unit{
position: absolute;
left: 290px;
top:25px;
color: rgba($color: #ffffff, $alpha: 8);
font-size: 20px;
}
.time{
position: absolute;
left: 1360px;
top:25px;
color: rgba($color: #ffffff, $alpha: 8);
font-size: 20px;
}
.unit {
position: absolute;
left: 240px;
top: 25px;
color: rgba(255, 255, 255, 0.80);
font-size: 20px;
letter-spacing: 0px;
}
.time {
position: absolute;
left: 1400px;
top: 25px;
color: rgba(255, 255, 255, 0.80);
font-size: 20px;
letter-spacing: 0px;
}
.title-button {
color: #00fff0;
font-size: 20px;
@@ -489,7 +617,9 @@ export default {
// .container-main {
// padding: 5px;
// }
.order::-webkit-scrollbar{
display: none
}
</style>
<style lang="scss" >

View File

@@ -1,7 +1,7 @@
<!--
* @Author: zhp
* @Date: 2024-01-29 16:50:26
* @LastEditTime: 2024-03-26 18:00:34
* @LastEditTime: 2024-03-28 16:35:49
* @LastEditors: zhp
* @Description:
-->
@@ -17,15 +17,11 @@
许昌安彩冷端看板
<h3 class="unit">单位河南汇融数字科技有限公司</h3>
<h3 class="time">{{ times }}</h3>
<!-- <el-button
type="text"
class="title-button"
:style="{ right: 33 + 'px', top: 37 + 'px' }"
@click="changeFullScreen"
>
<svg-icon v-if="isFullScreen" icon-class="unFullScreenView" />
<svg-icon v-else icon-class="fullScreenView" />
</el-button> -->
<el-button type="text" class="title-button" :style="{ right: 18 + 'px', top: 26 + 'px',fontSize:'32px'}"
@click="changeFullScreen">
<svg-icon width="32" height="32" v-if="isFullScreen" icon-class="unFullScreenView" />
<svg-icon width="32" height="32" v-else icon-class="fullScreenView" />
</el-button>
</el-row>
<el-row class="container-main flex-col" type="flex">
<el-row :style="{ padding: '0 ' + 9 + 'px' }" :gutter="15" type="flex" class="flex-1">
@@ -61,15 +57,26 @@
<el-row :style="{ padding: '0 ' + 9 + 'px' }" :gutter="10" type="flex" class="flex-1">
<el-col :style="{ margin: 8 + 'px' + ' 0' }" :span="12">
<base-container :no-content-padding="true" :height="256" :title="'废片 缺陷数据'" :size="'middle'"
<base-container :no-content-padding="true" :height="256" :title="'废片 缺陷数据'" :size="'eqStatus'"
:title-icon="'scrap'">
<!-- <div style="width: 45%;position: absolute; top: 3em; right: 3em;">
<top-radio-group />
</div> -->
<!-- <el-row :gutter="9"> -->
<!-- <el-col :style="{ margin: 8 + 'px' + ' 0' }" :span="24"> -->
<pile-bar-chart ref="pileChart" :name-list="EnergyMonitoringNameList" :data-list="EnergyMonitoringList"
:height="359" />
<pile-bar-chart style="margin-bottom: -15px" ref="firstPileChart" :height="90" />
<second-pile-bar-chart style="margin-bottom: -15px" id=" 'second' " ref="secondPileChart" :height="90" />
<third-pile-bar-chart style="margin-bottom: -15px" id=" 'third' " ref="thirdPileChart" :height="90" />
<fourth-pile-bar-chart style="margin-bottom: -15px" id=" 'fourth' " ref="fourthPileChart" :height="90" />
<fifth-pile-bar-chart style="margin-bottom: -15px" id=" 'fifth' " ref="fifthPileChart" :height="100" />
<!-- <pile-bar-chart ref="secondPileChart"
:height="90" />
<pile-bar-chart ref="thirdPileChart"
:height="90" />
<pile-bar-chart ref="fourthPileChart"
:height="90" />
<pile-bar-chart ref="fifthPileChart"
:height="90" /> -->
<!-- </el-col> -->
<!-- <el-col :style="{ margin: 8 + 'px' + ' 0' }" :span="12">
<base-table3
@@ -90,21 +97,21 @@
</div> -->
<!-- 像下面这样表格里的limit值也许可以用js动态计算出来 -->
<el-col :span="8" style="">
<div style="font-size:20px;margin: 5px 0 10px 0">熔化风机</div>
<div style="color:rgba(82, 255, 248, 1);font-size:20px;margin: 5px 0 10px 0">熔化风机</div>
<!-- <base-table1 :page="1" :limit="999" :show-index="false" :table-config="EqMonitoringPropsFun"
:table-data="funList" /> -->
<dv-scroll-board :config="funConfig" style="width:100%;height:310px" ref='funScrollBoard' />
</el-col>
<span class="eqLine"></span>
<el-col :span="8">
<div style="font-size:20px;margin: 5px 0 10px 0;">退火风机</div>
<div style="color:rgba(82, 255, 248, 1);font-size:20px;margin: 5px 0 10px 0;">退火风机</div>
<!-- <base-table1 :page="1" :limit="999" :show-index="false" :table-config="EqMonitoringPropsFun"
:table-data="annealFunList" /> -->
<dv-scroll-board :config="annealFunConfig" style="width:100%;height:310px" ref='annealFunScrollBoard' />
</el-col>
<span class="eqLineTwo"></span>
<el-col :span="8" style="float: right;">
<div style="font-size:20px;margin: 5px 0 10px 0;">产线设备</div>
<div style="color:rgba(82, 255, 248, 1);font-size:20px;margin: 5px 0 10px 0;">产线设备</div>
<!-- <base-table1 :page="1" :limit="999" :show-index="false" :table-config="EqMonitoringProps"
:table-data="realEqList" /> -->
<dv-scroll-board :config="realEqConfig" style="width:100%;height:310px" ref='realEqScrollBoard' />
@@ -136,6 +143,11 @@ import baseContainer from './components/baseContainer'
import baseTable1 from './components/baseTable'
import screenfull from 'screenfull'
import pileBarChart from './components/pileBarChart'
import secondPileBarChart from './components/pileBarChart'
import thirdPileBarChart from './components/pileBarChart'
import fourthPileBarChart from './components/pileBarChart'
import fifthPileBarChart from './components/pileBarChart'
import colorDiv from './components/colorDiv'
import moment from "moment";
import doubleYChart from './components/coldDoubleYChart'
@@ -152,7 +164,11 @@ export default {
pileBarChart,
doubleYChart,
LinearBarChart,
ISRAChart
ISRAChart,
secondPileBarChart,
thirdPileBarChart ,
fourthPileBarChart,
fifthPileBarChart ,
},
data() {
return {
@@ -256,6 +272,16 @@ export default {
},
watch: {
isFullScreen:function (val) {
if (val) {
const _this = this;
_this.beilv2 = document.documentElement.clientWidth / 1920
console.log(_this.beilv2);
} else {
const _this = this;
_this.beilv2 = document.documentElement.clientWidth / 1920
}
},
clientWidth(val) {
if (!this.timer) {
this.clientWidth = val
@@ -275,6 +301,7 @@ export default {
setTimeout(() => {
window.location.reload()
}, 86400000)
// this.getData()
},
destroyed() {
this.CutWebsocketClose()
@@ -287,21 +314,96 @@ export default {
}
},
mounted() {
console.log(moment(this.logoutTime - 28800000).format('HH:mm:ss'));
let nameList = []
let nameWasteList = []
let topNameList = []
let productList = []
let wasteList = []
let yieldList = []
// let sumAreaList = []
// let yieldList = []
// this.cutTableDataList =
let coldDetData = [
{
"first": 0.8834,
"lineName": "Y61",
"product": 0.8834,
"productArea": 35069.28,
"second": 0,
'sumArea': 38400,
'wastArea': 3330.72,
"yield": 0.9133
},
{
"first": 0.847,
"lineName": "Y62",
"product": 0.847,
"productArea": 26765.46,
"second": 0,
'sumArea': 1111111,
'wastArea': 22222,
"yield": 0.9133
},
{
"first": 0.8668,
"lineName": "Y63",
"product": 0.8668,
"productArea": 26448.46,
"second": 0,
'sumArea': 1111111,
'wastArea': 22222,
"yield": 0.9133
},
{
"first": 0.9064,
"lineName": "Y64",
"product": 0.9064,
"productArea": 26667.32,
"second": 0,
'sumArea': 1111111,
'wastArea': 22222,
"yield": 0.9133
},
{
"first": 0.8838,
"lineName": "Y65",
"product": 0.8838,
"productArea": 26554.32,
"second": 0,
'sumArea': 1111111,
'wastArea': 22222,
"yield": 0.9133
}
]
coldDetData.forEach((ele, index) => {
nameList.push(ele.lineName)
topNameList.push('产线: ' + ele.lineName + ' ' + '总面积:' + ele.sumArea)
productList.push(ele.productArea)
wasteList.push(ele.wastArea)
nameWasteList.push('缺陷面积:' + ele.wastArea)
yieldList.push({
name: '良品',
yield:ele.yield
})
// sumAreaList.push(ele.sumArea)
// yieldList.push((ele.yield * 100).toFixed(3))
})
this.$refs.firstPileChart.initChart(nameList, [topNameList[0]], [nameWasteList[0]], [productList[0]], [wasteList[0]])
this.$refs.secondPileChart.initChart(nameList, [topNameList[1]], [nameWasteList[1]], [productList[1]], [wasteList[1]])
this.$refs.thirdPileChart.initChart(nameList, [topNameList[2]], [nameWasteList[2]], [productList[2]], [wasteList[2]])
this.$refs.fourthPileChart.initChart(nameList, [topNameList[3]], [nameWasteList[3]], [productList[3]], [wasteList[3]])
this.$refs.fifthPileChart.initChart(nameList, [topNameList[4]], [nameWasteList[4]], [productList[4]], [wasteList[4]])
// this.$refs.productChart.initChart(nameList, yieldList, sumAreaList)
this.getTimes()
// console.log(moment(this.logoutTime - 28800000).format('HH:mm:ss'));
this.funInitWebSocket()
// if (num > 0) {
if (!this.wsIsOpen) {
getDcsMsg()
this.wsIsOpen = true
console.log('开启websocket==========')
}
// } else {
// }
this.CutInitWebSocket()
this.SJGInitWebSocket()
// this.getList()
this.getTimes()
const _this = this;
_this.beilv2 = document.documentElement.clientWidth / 1920
window.onresize = () => {
@@ -312,6 +414,39 @@ export default {
}
},
methods: {
// getData() {
// let detData = [
// {
// name: '1',
// run: '运行',
// },
// {
// name: '2',
// run: '未运行',
// },
// {
// name: '3',
// run: '运行',
// },
// {
// name: '4',
// run: '未运行',
// },
// {
// name: '1',
// run: '运行',
// },
// ]
// this.realEqList = detData.map((item, index) => [
// // console.log(item)
// `<span style="color:rgba(255,255,255,0.5)" >${index + 1 || ''}
// </span>`,
// `<span style="color:rgba(255,255,255,0.5)">${item.name || ''}</span>`,
// `<span style="color:rgba(255,255,255,0.5)"><div style="${item.run == '运行' ? '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.run || ''}</span>`,
// ])
// this.realEqConfig.data = this.realEqList
// this.$refs['realEqScrollBoard'].updateRows(this.realEqList)
// },
CutWebsocketClose(e) {
this.Cutws.ws.onclose = (event) => { console.log(event );}
},
@@ -386,11 +521,14 @@ export default {
`<span style="color:rgba(255,255,255,0.5)" >${index + 1 || ''}
</span>`,
`<span style="color:rgba(255,255,255,0.5)">${item.name || ''}</span>`,
`<span style="color:rgba(255,255,255,0.5)">${item.run || ''}</span>`,
`<span style="color:rgba(255,255,255,0.5)"><div style="${item.run == '运行' ? '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.run || ''}</span>`,
])
}
this.realEqConfig.data = this.realEqList
this.$refs['realEqScrollBoard'].updateRows(this.realEqList)
this.$nextTick(() => {
this.$refs['realEqScrollBoard'].updateRows(this.realEqList)
})
};
// if (typeof (WebSocket) === 'undefined') {
// alert('您的浏览器不支持WebSocket')
@@ -451,9 +589,13 @@ export default {
wasteList.push(ele.wastArea)
nameWasteList.push('缺陷面积:' + ele.wastArea)
sumAreaList.push(ele.sumArea)
yieldList.push((ele.yield * 100).toFixed(3))
yieldList.push(parseFloat((ele.yield * 100).toFixed(3)))
})
this.$refs.pileChart.initChart(nameList, topNameList, nameWasteList, productList, wasteList)
this.$refs.firstPileChart.initChart(nameList, [topNameList[0]], [nameWasteList[0]], [productList[0]], [wasteList[0]])
this.$refs.secondPileChart.initChart(nameList, [topNameList[1]], [nameWasteList[1]], [productList[1]], [wasteList[1]])
this.$refs.thirdPileChart.initChart(nameList, [topNameList[0]], [nameWasteList[0]], [productList[0]], [wasteList[0]])
this.$refs.fourthPileChart.initChart(nameList, [topNameList[0]], [nameWasteList[0]], [productList[0]], [wasteList[0]])
this.$refs.fifthPileChart.initChart(nameList, [topNameList[0]], [nameWasteList[0]], [productList[0]], [wasteList[0]])
this.$refs.productChart.initChart(nameList, yieldList, sumAreaList)
}
};
@@ -495,7 +637,8 @@ export default {
</span>`,
`<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>`,
`<span style="color:rgba(255,255,255,0.5)">${item.name || ''}</span>`,
`<span style="color:rgba(255,255,255,0.5)"><div style="${item.run == '运行' ? '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.run || ''}</span>`,
])
}
this.annealFunConfig.data = arr
@@ -509,7 +652,8 @@ export default {
arr.push([
`<span style="color:rgba(255,255,255,0.5)" >${index || ''}</span>`,
`<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>`,
`<span style="color:rgba(255,255,255,0.5)">${item.name || ''}</span>`,
`<span style="color:rgba(255,255,255,0.5)"><div style="${item.run == '运行' ? '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.run || ''}</span>`,
])
}
this.funConfig.data = arr
@@ -594,106 +738,34 @@ export default {
// console.log(size[0] + '*' + size[1] + '*' + size[2]);
return size[0] + '*' + size[1] + '*' + size[2]
},
// 数据接收
// cutWebsocketOnMessage(e) {
// this.cutWsData = e?.data ? JSON.parse(e?.data) : {}
// if (this.cutWsData.type === 'cutting' && this.cutWsData.name === 'table') {
// let cutArr = this.cutWsData.productHourData.map((item, index) => [
// `<span style="color:rgba(255,255,255,0.7)" >${index + 1 || ''}
// </span>`,
// `<span style="color:rgba(255,255,255,0.7)" >${item.lineName || ''}
// </span>`,
// `<span style="color:rgba(255,255,255,0.7)">${this.formatTime(item.time) || ''}</span>`,
// `<span style="color:rgba(255,255,255,0.7)">${this.getSize(item.size) || ''}</span>`,
// `<span style="color:rgba(255,255,255,0.7)">${item.productArea + '㎡' || ''}</span>`,
// `<span style="color:rgba(255,255,255,0.7)">${item.wasteArea + '㎡' || ''}</span>`,
// `<div style = "${(item.product * 100).toFixed(2) > 91 ? 'display:block;color:#00FFF7' : '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') {
// let nameList = []
// let nameWasteList = []
// let topNameList = []
// let productList = []
// let wasteList = []
// let sumAreaList = []
// let yieldList = []
// // this.cutTableDataList =
// this.cutWsData.coldDetData.forEach((ele, index) => {
// nameList.push(ele.lineName)
// topNameList.push('产线: ' + ele.lineName + ' ' + '总面积:' + ele.sumArea)
// productList.push(ele.productArea)
// wasteList.push(ele.wastArea)
// nameWasteList.push('缺陷面积:' + ele.wastArea)
// sumAreaList.push(ele.sumArea)
// yieldList.push((ele.yield *100).toFixed(3))
// })
// this.$refs.pileChart.initChart(nameList, topNameList, nameWasteList, productList, wasteList)
// this.$refs.productChart.initChart(nameList, yieldList, sumAreaList)
// }
// },
// SJGWebsocketOnOpen() {
// console.log('socket连接成功')
// this.SJGWebsocket.onmessage()
// },
// 连接建立失败重连
// SJGWebsocketOnError(e) {
// this.SJGInitWebSocket()
// },
// 数据接收
// SJGWebsocketOnMessage(e) {
// this.SJGWsData = e?.data ? JSON.parse(e?.data) : {}
// if (this.SJGWsData.type === 'isra') {
// console.log('222222', this.SJGWsData.detData)
// console.log(this.SJGWsData.detData);
// let chartData = this.SJGWsData.detData.map((item, index) => {
// return {
// name: item.type,
// num:item.num
// }
// })
// this.$refs['ISRAChart'].updateChart(chartData)
// } 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>`,
// `<span style="color:rgba(255,255,255,0.5)">${ele.name || ''}</span>`,
// `<span style="color:rgba(255,255,255,0.5)">${ele.run || ''}</span>`,
// ])
// }
// this.realEqConfig.data = this.realEqList
// this.$refs['realEqScrollBoard'].updateRows(this.realEqList)
// },
windowWidth(value) {
this.clientWidth = value
this.beilv2 = this.clientWidth / 1920
},
change() {
console.log(this.isFullScreen);
this.isFullScreen = screenfull.isFullscreen
},
init() {
if (screenfull.enabled) {
if (screenfull.isEnabled) {
screenfull.on('change', this.change)
}
},
destroy() {
if (screenfull.enabled) {
if (screenfull.isEnabled) {
screenfull.off('change', this.change)
}
},
changeFullScreen() {
this.containerWidth = 223223223
if (!screenfull.enabled) {
// this.containerWidth = 223223223
if (!screenfull.isEnabled) {
this.$message({
message: 'you browser can not work',
type: 'warning'
})
return false
}
screenfull.toggle(this.$refs.container)
screenfull.toggle()
}
}
}
@@ -714,14 +786,16 @@ export default {
background-size: 100% 100%;
color: rgba(0, 255, 247, 1);
text-align: center;
letter-spacing: 8px;
word-spacing: 8px;
.unit {
position: absolute;
left: 260px;
left: 290px;
top: 25px;
color: rgba(255, 255, 255, 0.80);
font-size: 20px;
}
letter-spacing: 0px;
}
.time {
position: absolute;
@@ -729,6 +803,7 @@ export default {
color: rgba(255, 255, 255, 0.80);
top: 25px;
font-size: 20px;
letter-spacing: 0px;
}
.title-button {
@@ -780,6 +855,10 @@ export default {
top: 2em;
}
.screen-btn {
color: #00fff0;
font-size: 32px;
}
// .container-main {
// padding: 5px;
// }
@@ -868,6 +947,7 @@ background: linear-gradient(to bottom,rgba(60,
margin-left: 3em;
}
}
</style>
<style scoped>
@@ -926,4 +1006,5 @@ background: linear-gradient(to bottom,rgba(60,
.tooltip:hover .tooltiptext {
visibility: visible;
}
</style>

View File

@@ -1,8 +1,8 @@
<!--
* @Author: zwq
* @Date: 2022-01-21 14:43:06
* @LastEditors: zwq
* @LastEditTime: 2022-01-24 13:27:41
* @LastEditors: zhp
* @LastEditTime: 2024-03-28 16:30:54
* @Description:
-->
<template>
@@ -61,7 +61,7 @@ export default {
},
mounted() {
this.$nextTick(() => {
this.initChart()
// this.initChart()
})
},
beforeDestroy() {

View File

@@ -2,7 +2,7 @@
* @Author: zwq
* @Date: 2022-01-21 14:43:06
* @LastEditors: zhp
* @LastEditTime: 2024-01-25 17:41:44
* @LastEditTime: 2024-03-28 16:45:24
* @Description:
-->
<template>
@@ -90,6 +90,7 @@ export default {
bottom: 0,
itemHeight: 10,
itemWidth: 10,
icon:'roundRect',
formatter: function(name) {
let pieLegendVale = {}
lData.filter((item, index) => {

View File

@@ -2,7 +2,7 @@
* @Author: gtz
* @Date: 2022-01-19 15:58:17
* @LastEditors: zhp
* @LastEditTime: 2024-02-22 10:26:59
* @LastEditTime: 2024-03-27 10:26:35
* @Description: file content
* @FilePath: \mt-bus-fe\src\views\OperationalOverview\components\baseContainer\index.vue
-->
@@ -158,6 +158,7 @@ export default {
<style lang="scss" scoped>
.base-container {
color: #fff;
width: 100%;
@@ -192,7 +193,7 @@ export default {
backdrop-filter: blur(5px);
}
&__eqStatus {
background: url(../../../../assets/img/high.png) no-repeat;
background: url(../../../../assets/img/large.png) no-repeat;
background-size: 100% 100%;
backdrop-filter: blur(5px);
}

View File

@@ -1,7 +1,7 @@
<!--
* @Author: zhp
* @Date: 2023-09-21 09:06:28
* @LastEditTime: 2024-03-26 16:16:50
* @LastEditTime: 2024-03-28 16:31:20
* @LastEditors: zhp
* @Description:
-->
@@ -78,7 +78,7 @@ export default {
this.$el.addEventListener('resize', () => {
console.log('resziing.....');
});
this.initChart()
// this.initChart()
},
beforeDestroy() {
if (!this.chart) {
@@ -112,7 +112,7 @@ export default {
}
// barBorderRadius: this.borderRadius
},
barWidth: 12,
barWidth: 18,
data: outputNumList
},
{
@@ -147,72 +147,40 @@ export default {
]
// const colors = ['#5470C6', '#91CC75', '#EE6666']
this.chart = echarts.init(document.getElementById(this.id))
this.chart.setOption({
// color: colors,
tooltip: {
trigger: 'axis',
axisPointer: {
type: 'cross'
}
},
grid: { top: 90, right: 60, bottom: 20, left: 90 },
legend: {
itemWidth: 10,
itemHeight: 10,
top: '0%',
right: '20px',
data: ['产线产量', '产线良品率'],
textStyle: {
fontSize: 12 * this.beilv,
color: '#ced1d5'
}
},
xAxis: {
type: 'category',
axisLine: {
lineStyle: {
type: 'solid',
color: '#25528f',
width: '1' // 坐标线的宽度
if (!nameList && !passRateList && !outputNumList) {
// 隐藏echarts图表
this.chart.clear(); // 清空图表
this.chart.setOption({ // 设置空的option
title: {
show: false
},
series: []
});
} else {
// 显示echarts图表
this.chart.setOption({
// color: colors,
tooltip: {
trigger: 'axis',
axisPointer: {
type: 'cross'
}
},
axisLabel: {
color: "#fff",
fontSize: 12,
// formatter: '{value}'
// textStyle: {
// color: 'rgba(255,255,255,0.5)' // 坐标值得具体的颜色
// }
},
splitLine: {
lineStyle: {
color: '#25528f'
grid: { top: 90, right: 60, bottom: 20, left: 20, containLabel: true },
legend: {
itemWidth: 10,
itemHeight: 10,
top: '0%',
right: '20px',
data: ['产线产量', '产线良品率'],
textStyle: {
fontSize: 12 * this.beilv,
color: '#ced1d5'
}
},
data: nameList
},
// yAxis: {
// },
yAxis: [
{
// min: function() { // 取最小值向下取整为最小刻度
// return 0
// },
// max: function(value) { // 取最大值向上取整为最大刻度
// return Math.ceil(value.max)
// },
scale: true,
type: 'value',
name: '良品率/%',
nameTextStyle: {// y轴上方单位的颜色
color: '#fff',
align: "left",
},
position: 'right',
alignTicks: true,
xAxis: {
type: 'category',
axisLine: {
show: true,
lineStyle: {
type: 'solid',
color: '#25528f',
@@ -223,72 +191,118 @@ export default {
color: "#fff",
fontSize: 12,
// formatter: '{value}'
formatter: '{value}%'
// }
},
splitLine: {
lineStyle: {
color: '#25528f'
}
}
// type: 'value'
// axisLine: {
// show: true,
// lineStyle: {
// color: colors[0]
// }
// },
},
{
// min: function() { // 取最小值向下取整为最小刻度
// return 0
// },
// max: function(value) { // 取最大值向上取整为最大刻度
// return Math.ceil(value.max)
// },
scale: true,
type: 'value',
name: '产量/片', // y轴上方的单位
nameTextStyle: {
color: "#fff",
// fontSize: 10,
align: "right",
},
// position: 'left',
alignTicks: true,
axisLine: {
show: true,
lineStyle: {
type: 'solid',
color: '#25528f', // 左边线的颜色
width: '1' // 坐标线的宽度
}
},
axisLabel: {
// textStyle: {
// color: 'rgba(255,255,255,0.5)', // 坐标值得具体的颜色
color: "#fff",
fontSize: 12,
// formatter: '{value}'
formatter: '{value} 片'
// color: 'rgba(255,255,255,0.5)' // 坐标值得具体的颜色
// }
},
splitLine: {
lineStyle: {
color: '#25528f'
}
},
data: nameList
},
// yAxis: {
// },
yAxis: [
{
// min: function() { // 取最小值向下取整为最小刻度
// return 0
// },
// max: function(value) { // 取最大值向上取整为最大刻度
// return Math.ceil(value.max)
// },
scale: true,
type: 'value',
name: '良品率/%',
nameTextStyle: {// y轴上方单位的颜色
color: '#fff',
align: "left",
},
position: 'right',
alignTicks: true,
axisLine: {
show: true,
lineStyle: {
// type: 'solid',
color: '#25528f',
// width: '1' // 坐标线的宽度
}
},
axisLabel: {
color: "#fff",
fontSize: 12,
// formatter: '{value}'
formatter: '{value}%'
// }
},
splitLine: {
lineStyle: {
color: '#25528f'
}
}
// type: 'value'
// axisLine: {
// show: true,
// lineStyle: {
// color: colors[0]
// }
// },
},
{
// min: function() { // 取最小值向下取整为最小刻度
// return 0
// },
// max: function(value) { // 取最大值向上取整为最大刻度
// return Math.ceil(value.max)
// },
scale: true,
type: 'value',
name: '产量/片', // y轴上方的单位
nameTextStyle: {
color: "#fff",
// fontSize: 10,
align: "right",
},
// position: 'left',
alignTicks: true,
axisLine: {
show: true,
lineStyle: {
// type: 'solid',
color: '#25528f', // 左边线的颜色
// width: '1' // 坐标线的宽度
}
},
axisLabel: {
// textStyle: {
// color: 'rgba(255,255,255,0.5)', // 坐标值得具体的颜色
color: "#fff",
// show: true,
lineStyle: {
color: "#25528f",
},
// }
},
splitLine: {
lineStyle: {
color: '#25528f'
}
}
// type: 'value'
// axisLine: {
// show: true,
// lineStyle: {
// color: colors[1]
// }jik078u7uut9890999999999999999999999999999999999999999999999999999999999999995u8
// },
}
// type: 'value'
// axisLine: {
// show: true,
// lineStyle: {
// color: colors[1]
// }jik078u7uut9890999999999999999999999999999999999999999999999999999999999999995u8
// },
}
],
series: series
})
],
series: series
})
}
}
}
}

View File

@@ -70,7 +70,7 @@ export default {
// this.dataList.forEach(ele => {
// console.log(ele);
// this.series = []
this.initChart()
// this.initChart()
// this.$nextTick(() => {
// // this.initChart()
// })
@@ -87,8 +87,17 @@ export default {
// console.log('1111', dataList);
// console.log(1)
this.chart = echarts.init(document.getElementById(this.id))
// if (dataList.length !== 0) {
// this.$set(this.series, "data", dataList);
if (!nameList && !dataList) {
// 隐藏echarts图表
this.chart.clear(); // 清空图表
this.chart.setOption({ // 设置空的option
title: {
show: false
},
series: []
});
} else {
// 显示echarts图表
this.series = [{
type: 'bar',
data: dataList,
@@ -109,92 +118,96 @@ export default {
}
// barBorderRadius: this.borderRadius
},
barWidth: 12,
barWidth: 18,
}]
// }
// if (nameList.length !== 0) {
// }
// if (nameList.length !== 0) {
this.nameList = nameList
// }
this.chart.setOption({
tooltip: {
trigger: 'axis',
axisPointer: {
// 坐标轴指示器,坐标轴触发有效
type: 'shadow' // 默认为直线,可选为:'line' | 'shadow'
}
},
grid: { top: 90, right: 60, bottom: 20, left: 90 },
// legend: {
// itemWidth: 10,
// itemHeight: 10,
// // right: '20px',
// data: nameList,
// textStyle: {
// fontSize: 12 * this.beilv,
// color: '#ced1d5'
// }
// },
xAxis: {
type: 'category',
axisLine: {
lineStyle: {
type: 'solid',
color: '#25528f', // 左边线的颜色
width: '1' // 坐标线的宽度
// }
this.chart.setOption({
tooltip: {
trigger: 'axis',
axisPointer: {
// 坐标轴指示器,坐标轴触发有效
type: 'shadow' // 默认为直线,可选为:'line' | 'shadow'
}
},
axisLabel: {
color: "#fff",
fontSize: 12,
// formatter: '{value}'
grid: { top: 90, right: 60, bottom: 20, left: 30, containLabel: true },
// legend: {
// itemWidth: 10,
// itemHeight: 10,
// // right: '20px',
// data: nameList,
// textStyle: {
// fontSize: 12 * this.beilv,
// color: '#ced1d5'
// }
// },
xAxis: {
type: 'category',
axisLine: {
lineStyle: {
type: 'solid',
color: '#25528f', // 左边线的颜色
width: '1' // 坐标线的宽度
}
},
axisLabel: {
color: "#fff",
fontSize: 12,
// formatter: '{value}'
},
splitLine: {
lineStyle: {
color: '#25528f'
}
},
data: this.nameList
},
splitLine: {
lineStyle: {
color: '#25528f'
yAxis: {
name: '单位kwh',
nameTextStyle: {
color: '#fff',
fontSize: 10,
align: 'right',
},
type: 'value',
axisLabel: {
color: "#fff",
fontSize: 12,
// formatter: '{value}/kwh'
},
axisLine: {
show: true,
lineStyle: {
color: "#25528f",
},
},
splitLine: {
lineStyle: {
color: "#25528f",
},
}
},
data: this.nameList
},
yAxis: {
name: '单位kwh',
nameTextStyle: {
color: '#fff',
fontSize: 10,
align: 'right',
},
type: 'value',
axisLabel: {
color: "#fff",
fontSize: 12,
// formatter: '{value}/kwh'
},
axisLine: {
show: true,
lineStyle: {
color: "#25528f",
},
},
splitLine: {
lineStyle: {
color: "#25528f",
},
}
},
// legend: {
// itemHeight: 10,
// itemWidth: 10,
// x: 'center', // 可设定图例在左、右、居中
// y: 'top', // 可设定图例在上、下、居中
// show: this.showLegend,
// data: this.dataList,
// right: '1%',
// textStyle: {
// fontSize: 12 * this.beilv,
// color: '#ced1d5'
// }
// },
series: this.series
})
// legend: {
// itemHeight: 10,
// itemWidth: 10,
// x: 'center', // 可设定图例在左、右、居中
// y: 'top', // 可设定图例在上、下、居中
// show: this.showLegend,
// data: this.dataList,
// right: '1%',
// textStyle: {
// fontSize: 12 * this.beilv,
// color: '#ced1d5'
// }
// },
series: this.series
})
}
// if (dataList.length !== 0) {
// this.$set(this.series, "data", dataList);
}
}
}

View File

@@ -1,7 +1,7 @@
<!--
* @Author: zhp
* @Date: 2023-12-27 13:54:52
* @LastEditTime: 2024-03-26 10:50:30
* @LastEditTime: 2024-03-28 16:30:14
* @LastEditors: zhp
* @Description:
-->
@@ -15,6 +15,7 @@
import * as echarts from 'echarts';
import 'echarts/theme/macarons' // echarts theme
import resize from './mixins/resize'
import { raw } from 'body-parser';
export default {
name: 'OverviewBar',
@@ -42,7 +43,7 @@ export default {
},
height: {
type: Number,
default: 200
default: 100
},
showLegend: {
type: Boolean,
@@ -77,7 +78,7 @@ export default {
// this.dataList.forEach(ele => {
// console.log(ele);
// this.series = []
this.initChart()
// this.initChart()
// this.$nextTick(() => {
// // this.initChart()
// })
@@ -94,7 +95,8 @@ export default {
let rawData = []
let colors = ['#0fdedb', '#2359ec']
rawData.push(passRateList, wasteList)
const totalData = [];
const totalData = [];
// if (rawData.length != 0 && raw,Data,length != 0) {
for (let i = 0; i < rawData[0].length; ++i) {
let sum = 0;
for (let j = 0; j < rawData.length; ++j) {
@@ -102,7 +104,8 @@ export default {
}
totalData.push(sum);
}
console.log('total', totalData);
// }
console.log('total', totalData)
this.chart = echarts.init(document.getElementById(this.id))
const series = [
'良品',
@@ -116,34 +119,49 @@ export default {
name,
type: 'bar',
stack: 'total',
barWidth: 10,
label: {
show: true,
formatter: (params) => Math.round(params.value * 1000) / 10 + '%'
},
barWidth: 12,
// label: {
// show: true,
// formatter: (params) => Math.round(params.value * 1000) / 10 + '%'
// },
color:colors[sid],
data: rawData.length != 0 ? rawData[sid].map((d, did) =>
totalData[did] <= 0 ? 0 : d / totalData[did]
) : []
};
});
// this.charts.resize({
// //width: width,
// //height: height,
// // es6解构
// width,
// height
// })
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(3)) + '%'
},
itemWidth: 12,
itemHeight: 12,
top:'10',
bottom: '20',
left: '20',
icon: 'rect',
textStyle: {
color: '#ffffff'
}
},
grid: {
top:'80',
top:'0',
left: '3%',
right: '4%',
// bottom: '3%',
width: 'auto',
height: '300',
height: '95',
containLabel: true
},
yAxis: [
@@ -170,7 +188,7 @@ export default {
verticalAlign: 'bottom',
fontSize: 12,
align: 'left',
padding: [0, 0, 15, -5]
padding: [0, 0, 10, -5]
}
},
data: topNameList
@@ -198,7 +216,7 @@ export default {
verticalAlign: 'bottom',
fontSize: 12,
align: 'right',
padding: [0, 0, 15, -5]
padding: [0, 0, 10, -5]
}
},
data: nameWasteList
@@ -210,6 +228,10 @@ export default {
},
series:series
})
this.chart.resize({
width: 'auto',
height: 90
});;
}
}
}

View File

@@ -2,7 +2,7 @@
* @Author: zwq
* @Date: 2021-07-19 15:18:30
* @LastEditors: zhp
* @LastEditTime: 2024-03-26 17:57:44
* @LastEditTime: 2024-03-28 16:10:47
* @Description:
-->
<template>
@@ -16,16 +16,19 @@
许昌安彩深加工看板
<h3 class="unit">单位河南汇融数字科技有限公司</h3>
<h3 class="time">{{ times }}</h3>
<el-button type="text" class="title-button" :style="{ right: 18 + 'px', top: 26 + 'px',fontSize:'32px'}"
@click="changeFullScreen">
<svg-icon width="32" height="32" v-if="isFullScreen" icon-class="unFullScreenView" />
<svg-icon width="32" height="32" v-else icon-class="fullScreenView" />
</el-button>
</el-row>
<el-row class="container-main flex-col" type="flex">
<el-row :style="{ padding: '0 ' + 9 + 'px' }" :gutter="15" type="flex" class="flex-1" style="height: 50%;">
<el-col :style="{ margin: 8 + 'px' + ' 0' }" :span="8" height="100%">
<base-container :title="'设备报警'" :size="'small'" :height="318" :title-icon="'eqAlarm'">
<dv-scroll-board class="eqTable" :config="eqConfig" style="width:100%;height:350px" ref='eqScrollBoard' />
</base-container>
</el-col>
<el-col :style="{ margin: 8 + 'px' + ' 0' }" :span="8" height="100%">
<base-container :title="'各工序缺陷汇总'" :size="'small'" :title-icon="'scrap'">
<dv-scroll-board :config="processConfig" style="width:100%;height:350px" ref='processScrollBoard' />
@@ -33,13 +36,14 @@
</el-col>
<el-col :style="{ margin: 8 + 'px' + ' 0' }" :span="8" height="100%">
<base-container :height="318" :size="'small'" :title="'工单监控'" :title-icon="'order'">
<div style="width:100%; overflow: hidden scroll;">
<base-container :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: 1em">
<!-- <el-col :span="12"> -->
<p class="now-secondary-title">{{ op.name }}</p>
<el-progress define-back-color="rgba(32, 57, 96, 1)" text-color="white"
:percentage="op.progressRate * 100" class="custom-progress-bar" />
<el-progress :stroke-width="10" define-back-color="rgba(32, 57, 96, 1)" text-color="white"
:percentage="op.progressRate" class="custom-progress-bar" />
</el-row>
</div>
<!-- </div> -->
@@ -49,8 +53,8 @@
<el-row :style="{ padding: '0 ' + 9 + 'px' }" :gutter="12" type="flex" class="flex-1">
<el-col :style="{ margin: 8 + 'px' + ' 0' }" :span="12">
<base-container :show-yes-time="true" :no-content-padding="true" :height="256" :size="'middle'" :title="'能源监控'"
:title-icon="'energyMonitoring'">
<base-container :show-yes-time="true" :no-content-padding="true" :height="256" :size="'eqStatus'"
:title="'能源监控'" :title-icon="'energyMonitoring'">
<el-row :gutter="9">
<el-col :style="{ margin: 8 + 'px' + ' 0' }" :span="24">
<linear-bar-chart ref="EnergyMonitoringChart" :name-list="EnergyMonitoringNameList"
@@ -60,7 +64,7 @@
</base-container>
</el-col>
<el-col :style="{ margin: 8 + 'px' + ' 0' }" :span="12">
<base-container :show-time="true" :no-content-padding="true" :height="318 + 338 + 16" :size="'middle'"
<base-container :show-time="true" :no-content-padding="true" :height="318 + 338 + 16" :size="'eqStatus'"
:title="'产线产量及良品率'" :title-icon="'productLine'">
<double-y-chart ref="productLineChart" :id=" 'doubleYChart' " :height="390" :show-legend="true" />
</base-container>
@@ -234,7 +238,6 @@ export default {
}
},
computed: {
// ...mapGetters(['sidebar']),
styles() {
const v = Math.floor(this.value * this.beilv2 * 100) / 10000
return {
@@ -243,8 +246,17 @@ export default {
}
}
},
watch: {
isFullScreen: function (val) {
if (val) {
const _this = this;
_this.beilv2 = document.documentElement.clientWidth / 1920
console.log(_this.beilv2);
} else {
const _this = this;
_this.beilv2 = document.documentElement.clientWidth / 1920
}
},
clientWidth(val) {
if (!this.timer) {
this.clientWidth = val
@@ -255,12 +267,10 @@ export default {
_this.timer = false
}, 500)
}
// 这里可以添加修改时的方法
this.windowWidth(val);
}
},
created() {
this.getData()
this.init()
setTimeout(() => {
window.location.reload()
@@ -271,20 +281,67 @@ export default {
this.SJGWebsocketClose()
},
mounted() {
let eqArr = this.qualityYearList.map((item, index) => [
`<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)
this.$refs.productLineChart.initChart(['D61', 'D62', 'D63', 'D64', 'D65',], [98, 97, 98.7, 98.5, 98.3,], [3134, 2323, 3232, 3233, 2321])
// let detData = [
// {
// id:'1',
// name: '测试工单',
// progressRate:0.933333
// },
// {
// id: '2',
// name: '测试工单2',
// progressRate: 0.932323
// }, {
// id: '3',
// name: '测试工单3',
// progressRate: 0.23232
// }, {
// id: '4',
// name: '测试工单4',
// progressRate: 0.32323
// }
// // {
// // id: '5',
// // name: '测试工单',
// // progressRate: 0.5555
// // }, {
// // id: '6',
// // name: '测试工单',
// // progressRate: 0.66564
// // },
// ]
// this.orderList = detData.map((ele, index) => {
// if (ele.progressRate && ele.progressRate != 1) {
// return {
// id: ele.id,
// name: ele.name,
// progressRate: parseFloat((ele.progressRate * 100).toFixed(3))
// }
// }
// });
// let EnergyNameList = ['Y61', 'Y62', 'Y63', 'Y64', 'Y65',]
// this.EnergyMonitoringNameList = EnergyNameList
// let EnergyDataList = [1, 2, 3, 4, 5]
// // this.wsData.data.forEach((ele) => {
// // EnergyDataList.push(ele.useQuantity)
// // })
// this.EnergyMonitoringList = EnergyDataList
// // console.log(EnergyDataList)
// this.$refs.EnergyMonitoringChart.initChart(this.EnergyMonitoringNameList, this.EnergyMonitoringList)
// let eqArr = this.qualityYearList.map((item, index) => [
// `<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)
// this.$refs.productLineChart.initChart(['D61', 'D62', 'D63', 'D64', 'D65',], [98, 97, 98.7, 98.5, 98.3,], [3134, 2323, 3232, 3233, 2321])
// this.getList()
this.initWebSocket()
this.SJGInitWebSocket()
@@ -298,7 +355,9 @@ export default {
this.beilv2 = _this.clientWidth / 1920
})()
}
this.getData()
},
// beforeDestroy() {
// //离开页面删除检测器和所有侦听器
// // erd.uninstall(document); //这里用ref是因为vue离开页面后获取不到dom
@@ -452,7 +511,7 @@ export default {
return {
id: ele.id,
name: ele.name,
progressRate: ele.progressRate.toFixed(3)
progressRate: parseFloat((ele.progressRate * 100).toFixed(3))
}
}
});
@@ -464,7 +523,7 @@ export default {
`<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)"><span style="color:rgba(255,255,255,0.5)"></span> ${item.status || ''}</span>`,
`<span style="color:rgba(255,255,255,0.5)">${item.error || ''}</span>`,
])
this.eqConfig.data = eqArr
@@ -489,122 +548,10 @@ export default {
} else if (this.SJGInitWebSocket === 'inspection') {
}
};
// if (typeof (WebSocket) === 'undefined') {
// alert('您的浏览器不支持WebSocket')
// } else {
// let date = new Date().valueOf()
// // console.log(date);
// console.log(process.env);
// const SJGWsUrl = process.env.VUE_APP_Socket_API + `/websocket/message?userId=SJG${date}`
// this.SJGWebsocket = new WebSocket(SJGWsUrl)
// // 监听 WebSocket 连接
// this.SJGWebsocket.onopen = this.SJGWebsocketOnOpen
// // 监听 WebSocket 错误信息
// this.SJGWebsocket.onerror = this.SJGWebsocketOnError
// // 监听 WebSocket 消息
// this.SJGWebsocket.onmessage = this.SJGWebsocketOnMessage
// // 监听 webSocket 断开信息
// this.SJGWebsocket.onclose = this.SJGWebsocketClose
// }
},
// SJGWebsocketOnOpen() {
// console.log('socket连接成功')
// // console.log(this.SJGWebsocket.onmessage);
// this.SJGWebsocket.onmessage()
// },
// // 连接建立失败重连
// SJGWebsocketOnError(e) {
// // console.log('11111', e)
// this.SJGInitWebSocket()
// },
// 数据接收
// SJGWebsocketOnMessage(e) {
// console.log(1111, e)
// this.SJGWsData = e?.data ? JSON.parse(e?.data) : {}
// // console.log(this.wsData.detData);
// // console.log('22222', this.wsData.data)
// if (this.SJGWsData.type === 'order') {
// this.orderList = this.SJGWsData.detData.map((ele, index) => {
// if (ele.progressRate != 1) {
// return {
// id: ele.id,
// name: ele.name,
// progressRate: ele.progressRate.toFixed(3)
// }
// }
// });
// console.log(this.orderList)
// } else if (this.SJGWsData.type === 'equipment') {
// let eqArr = 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.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)
// } else if (this.SJGWsData.type === 'productline') {
// console.log('aaaaaaaaaaaaaaaaaaa', this.SJGWsData);
// let nameList = []
// let passRateList = []
// let outputNumList = []
// this.SJGWsData.detData.forEach((ele) => {
// // if (item.id == ele.productionLineId) {
// // if (item.name.substr(0, 1) == "D") {
// // console.log(ele)
// nameList.push(ele.lineName)
// outputNumList.push(ele.outputNum)
// passRateList.push(ele.passRate)
// // }
// // }
// })
// this.$refs.productLineChart.initChart(nameList, passRateList, outputNumList)
// } else if (this.SJGInitWebSocket === 'inspection') {
// }
// },
SJGWebsocketClose(e) {
this.SJGws.ws.onclose = (event) => { console.log(event); }
},
// // 连接建立之后执行send方法发送数据
// websocketOnOpen() {
// console.log('socket连接成功')
// this.websocket.onmessage()
// },
// 连接建立失败重连
// websocketOnError(e) {
// console.log('11111', e)
// this.initWebSocket()
// },
// 数据接收
// websocketOnMessage(e) {
// // console.log(1111, e)
// this.wsData = e?.data ? JSON.parse(e?.data) : {}
// // console.log('22222', this.wsData.data)
// if (this.wsData.type === 'EnergyMonitoring') {
// let EnergyNameList = []
// this.wsData.data.forEach((ele) => {
// EnergyNameList.push(ele.lineName)
// })
// this.EnergyMonitoringNameList = EnergyNameList
// let EnergyDataList = []
// this.wsData.data.forEach((ele) => {
// EnergyDataList.push(ele.useQuantity
// )
// })
// this.EnergyMonitoringList = EnergyDataList
// console.log(EnergyDataList)
// this.$refs.EnergyMonitoringChart.initChart(this.EnergyMonitoringNameList, this.EnergyMonitoringList)
// }
// },
// 数据发送
// websocketSend() {
// this.websocket.send('11111')
// },
// // 关闭
websocketClose(e) {
this.wsHeartbeat.ws.onclose = (event) => { console.log(event); }
},
@@ -613,28 +560,32 @@ export default {
this.beilv2 = this.clientWidth / 1920
},
change() {
console.log(this.isFullScreen);
debugger;
this.isFullScreen = screenfull.isFullscreen
},
init() {
if (screenfull.enabled) {
console.log(screenfull.isEnabled);
if (screenfull.isEnabled) {
debugger;
screenfull.on('change', this.change)
}
},
destroy() {
if (screenfull.enabled) {
if (screenfull.isEnabled) {
screenfull.off('change', this.change)
}
},
changeFullScreen() {
this.containerWidth = 223223223
if (!screenfull.enabled) {
// this.containerWidth = 223223223
if (!screenfull.isEnabled) {
this.$message({
message: 'you browser can not work',
type: 'warning'
})
return false
}
screenfull.toggle(this.$refs.container)
screenfull.toggle()
}
}
}
@@ -654,25 +605,24 @@ export default {
background: url('../../assets/img/OperationalOverview/title.png') no-repeat;
background-size: 100% 100%;
color: #00fff0;
// word-spacing: 8px;
word-spacing: 8px;
letter-spacing: 8px;
text-align: center;
.unit {
position: absolute;
left: 290px;
top: 25px;
letter-spacing: 0px;
color: rgba($color: #ffffff, $alpha: 8);
color: rgba(255, 255, 255, 0.80);
font-size: 20px;
letter-spacing: 0px;
}
.time {
position: absolute;
left: 1360px;
color: rgba(255, 255, 255, 0.80);
top: 25px;
letter-spacing: 0px;
color: rgba($color: #ffffff, $alpha: 8);
font-size: 20px;
letter-spacing: 0px;
}
.title-button {
color: #00fff0;
@@ -785,6 +735,9 @@ export default {
margin-left: 3em;
}
}
.order::-webkit-scrollbar {
display: none
}
</style>
<style scoped>

View File

@@ -9,10 +9,11 @@
<div class="itemBox">
<div class="itemClass" v-for="(item, index) in realtimeList" :key='index'>
<div class="itemSub">
<p class="itemNum">{{item.checkValue ? (item.checkValue).toFixed(2) : '-'}}</p>
<p class="itemNum">{{ item.checkValue ? (item.checkValue).toFixed(2) : '-' }}</p>
<p class="itemDescribe" :title="item.name">
<img src="./../../../../../assets/images/detectionData.png" alt="">
{{item.name}}</p>
{{ item.name }}
</p>
</div>
</div>
</div>
@@ -24,8 +25,8 @@
<span>检测指标趋势图</span>
</div>
<!-- 搜索工作栏 -->
<search-area @submit="getTrend"/>
<line-chart :chartData="chartData" v-show='Object.keys(chartData).length !== 0' :timeDim="queryParams.timeDim"/>
<search-area @submit="getTrend" />
<line-chart :chartData="chartData" v-show='Object.keys(chartData).length !== 0' :timeDim="queryParams.timeDim" />
<!-- 没有数据 -->
<div class="no-data-bg" v-show='Object.keys(chartData).length === 0'></div>
</div>
@@ -37,11 +38,11 @@ import LineChart from './../../components/lineChart'
import SearchArea from './../../components/searchArea'
import moment from 'moment'
export default {
name: 'Voc',
data(){
name: 'VocManagement',
data() {
return {
realtimeList:[],
queryParams:{
realtimeList: [],
queryParams: {
checkType: 3,
timeDim: null,
timeRange: []
@@ -53,18 +54,18 @@ export default {
mounted() {
this.getMsg()
this.queryParams.timeDim = this.getDictDatas(this.DICT_TYPE.TIME_DIM)[0].value // 默认时
this.queryParams.timeRange = [moment().startOf('day')+0, moment().endOf('day')-59*61*1000]
this.queryParams.timeRange = [moment().startOf('day') + 0, moment().endOf('day') - 59 * 61 * 1000]
this.getTrend()
},
methods: {
getMsg() {
environmentalCheckRealtime({checkType: 3}).then(res => {
environmentalCheckRealtime({ checkType: 3 }).then(res => {
console.log(res)
this.realtimeList = res.data || []
})
},
getTrend() {
environmentalCheckRealtimeTrend({...this.queryParams}).then(res => {
environmentalCheckRealtimeTrend({ ...this.queryParams }).then(res => {
if (res.code === 0) {
this.chartData = res.data
} else {
@@ -85,34 +86,41 @@ export default {
<style lang='scss' scoped>
.voc {
background-color: #f2f4f9;
.box1 {
height: 172px;
padding: 12px 16px 0;
margin-bottom: 8px;
background-color: #fff;
border-radius: 9px;
.itemBox {
display: flex;
flex-flow: row nowrap;
overflow: auto;
.itemClass {
width: 198px;
height: 88px;
// border: 1px solid green;
padding: 12px 0px 12px 18px;
.itemSub {
width: 176px;
height: 65px;
padding-right: 26px;
border-right: 1px solid #E8E8E8;
P{
P {
margin: 0;
img {
width: 24px;
height: 24px;
vertical-align: middle;
}
}
.itemNum {
font-size: 32px;
font-weight: 600;
@@ -120,33 +128,41 @@ export default {
color: #3E6AF7;
text-align: right;
}
.itemDescribe {
font-size: 16px;
text-align: right;
white-space: nowrap; /* 防止换行 */
overflow: hidden; /* 隐藏超出部分 */
text-overflow: ellipsis; /* 添加省略号 */
white-space: nowrap;
/* 防止换行 */
overflow: hidden;
/* 隐藏超出部分 */
text-overflow: ellipsis;
/* 添加省略号 */
}
}
}
}
.itemClass:last-child > .itemSub{
.itemClass:last-child>.itemSub {
border: none !important;
}
}
.box2 {
background-color: #fff;
border-radius: 9px;
padding: 16px;
height: calc(100vh - 308px);
}
.boxTitle {
display: inline-block;
font-size: 16px;
font-weight: 400;
color: #000000;
margin:0 10px 20px 0;
margin: 0 10px 20px 0;
}
.blueTitle {
content: '';
display: inline-block;

View File

@@ -19,6 +19,7 @@
:page="queryParams.pageNo"
:limit="queryParams.pageSize"
:table-data="list"
:max-height="tableH"
@emitFun="handleEmitFun">
<method-btn
v-if="tableBtn.length"
@@ -90,13 +91,13 @@
pageSize: 10,
},
tableBtn: [
this.$auth.hasPermi('base:core-equipment-attr:update')
this.$auth.hasPermi('base:core-equipment-attr:update') // ('se:firefight-attr:update') // TODO 此处需用firefight-attr权限还是core-equipment-attr 权限?
? {
type: 'edit',
btnName: '修改',
}
: undefined,
this.$auth.hasPermi('base:core-equipment-attr:delete')
this.$auth.hasPermi('base:core-equipment-attr:delete') // ('se:firefight-attr:delete')
? {
type: 'delete',
btnName: '删除',
@@ -115,6 +116,7 @@
<script>
import moment from 'moment';
import basicPageMixin from '@/mixins/lb/basicPageMixin';
import tableHeightMixin from '@/mixins/lb/tableHeightMixin';
import EquipmentDrawer from '../components/firefightingDrawer';
import BaseDialogWrapper from '../components/BaseDialogWrapper.vue';
@@ -135,24 +137,24 @@ export default {
EquipmentDrawer,
BaseDialog: BaseDialogWrapper,
},
mixins: [basicPageMixin],
mixins: [basicPageMixin, tableHeightMixin],
data() {
return {
searchBarKeys: ['name', 'code'],
tableBtn: [
this.$auth.hasPermi(`base:core-equipment:update`)
this.$auth.hasPermi(`se:firefight:update`)
? {
type: 'detail',
btnName: '详情',
}
: undefined,
this.$auth.hasPermi('base:core-equipment:update')
this.$auth.hasPermi('se:firefight:update')
? {
type: 'edit',
btnName: '修改',
}
: undefined,
this.$auth.hasPermi('base:core-equipment:delete')
this.$auth.hasPermi('se:firefight:delete')
? {
type: 'delete',
btnName: '删除',
@@ -160,17 +162,28 @@ export default {
: undefined,
].filter((v) => v),
tableProps: [
{ prop: 'name', label: '设备名称' },
{ width: 256, prop: 'code', label: '设备编码' },
{ prop: 'location', label: '位置' },
{ prop: 'responsiblePeopleName', label: '负责人' },
{ prop: 'name', label: '设备名称', showOverflowtooltip: true },
{
width: 200,
prop: 'code',
label: '设备编码',
showOverflowtooltip: true,
},
{ prop: 'location', label: '位置', showOverflowtooltip: true },
{
prop: 'responsiblePeopleName',
label: '负责人',
showOverflowtooltip: true,
},
{
prop: 'dueDate',
width: 200,
label: '有效期至',
howOverflowTooltip: true,
filter: (val) =>
val != null ? moment(val).format('yyyy-MM-DD HH:mm:ss') : '--',
},
{ prop: 'remark', label: '备注' },
{ prop: 'remark', label: '备注', showOverflowtooltip: true },
],
searchBarFormConfig: [
{
@@ -195,18 +208,14 @@ export default {
type: 'separate',
},
{
type: this.$auth.hasPermi('base:core-equipment:export')
? 'button'
: '',
type: this.$auth.hasPermi('se:firefight:export') ? 'button' : '',
btnName: '导出',
name: 'export',
plain: true,
color: 'primary',
},
{
type: this.$auth.hasPermi('base:core-equipment:create')
? 'button'
: '',
type: this.$auth.hasPermi('se:firefight:create') ? 'button' : '',
btnName: '新增',
name: 'add',
plain: true,
@@ -285,7 +294,7 @@ export default {
// 查询参数
queryParams: {
pageNo: 1,
pageSize: 10,
pageSize: 20,
code: '',
name: '',
},
@@ -337,9 +346,6 @@ export default {
mounted() {
this.getList();
},
activated() {
this.getList();
},
methods: {
/** 查询列表 */
getList() {

View File

@@ -19,6 +19,7 @@
:page="queryParams.pageNo"
:limit="queryParams.pageSize"
:table-data="list"
:max-height="tableH"
@emitFun="handleEmitFun">
<method-btn
v-if="tableBtn.length"
@@ -115,6 +116,7 @@
<script>
import moment from 'moment';
import basicPageMixin from '@/mixins/lb/basicPageMixin';
import tableHeightMixin from '@/mixins/lb/tableHeightMixin';
import EquipmentDrawer from '../components/manageDrawer';
import BaseDialogWrapper from '../components/BaseDialogWrapper.vue';
@@ -133,26 +135,26 @@ export default {
components: {
Editor,
EquipmentDrawer,
BaseDialog: BaseDialogWrapper
BaseDialog: BaseDialogWrapper,
},
mixins: [basicPageMixin],
mixins: [basicPageMixin, tableHeightMixin],
data() {
return {
searchBarKeys: ['name', 'code'],
tableBtn: [
this.$auth.hasPermi(`base:core-equipment:update`)
this.$auth.hasPermi(`se:manage:update`)
? {
type: 'detail',
btnName: '详情',
}
: undefined,
this.$auth.hasPermi('base:core-equipment:update')
this.$auth.hasPermi('se:manage:update')
? {
type: 'edit',
btnName: '修改',
}
: undefined,
this.$auth.hasPermi('base:core-equipment:delete')
this.$auth.hasPermi('se:manage:delete')
? {
type: 'delete',
btnName: '删除',
@@ -167,11 +169,20 @@ export default {
// width: 180,
// filter: (val) => moment(val).format('yyyy-MM-DD HH:mm:ss'),
// },
{ prop: 'name', label: '设备名称' },
{ width: 256, prop: 'code', label: '设备编码' },
{ prop: 'location', label: '位置' },
{ prop: 'responsiblePeopleName', label: '负责人' },
{ prop: 'remark', label: '备注' },
{ prop: 'name', label: '设备名称', showOverflowtooltip: true },
{
width: 256,
prop: 'code',
label: '设备编码',
showOverflowtooltip: true,
},
{ prop: 'location', label: '位置', showOverflowtooltip: true },
{
prop: 'responsiblePeopleName',
label: '负责人',
showOverflowtooltip: true,
},
{ prop: 'remark', label: '备注', showOverflowtooltip: true },
],
searchBarFormConfig: [
{
@@ -196,7 +207,7 @@ export default {
type: 'separate',
},
{
type: this.$auth.hasPermi('base:core-equipment:export')
type: this.$auth.hasPermi('se:manage:export')
? 'button'
: '',
btnName: '导出',
@@ -205,7 +216,7 @@ export default {
color: 'primary',
},
{
type: this.$auth.hasPermi('base:core-equipment:create')
type: this.$auth.hasPermi('se:manage:create')
? 'button'
: '',
btnName: '新增',
@@ -277,7 +288,7 @@ export default {
// 查询参数
queryParams: {
pageNo: 1,
pageSize: 10,
pageSize: 20,
code: '',
name: '',
},
@@ -329,9 +340,6 @@ export default {
mounted() {
this.getList();
},
activated() {
this.getList();
},
methods: {
/** 查询列表 */
getList() {
@@ -407,15 +415,15 @@ export default {
// this.title = '修改设备';
// });
},
handleDetail(row, mode='detail') {
const {id} = row;
handleDetail(row, mode = 'detail') {
const { id } = row;
this.form.id = id;
// 打开抽屉
this.editMode = mode;
this.editVisible = true;
this.$nextTick(() => {
this.$refs['drawer'].init();
})
});
// this.reset();
// this.showUploadComponents = false;
// const id = row.id;

View File

@@ -19,6 +19,7 @@
:page="queryParams.pageNo"
:limit="queryParams.pageSize"
:table-data="list"
:max-height="tableH"
@emitFun="handleEmitFun">
<method-btn
v-if="tableBtn.length"
@@ -90,13 +91,13 @@
pageSize: 10,
},
tableBtn: [
this.$auth.hasPermi('base:core-equipment-attr:update')
this.$auth.hasPermi('se:safety-attr:update')
? {
type: 'edit',
btnName: '修改',
}
: undefined,
this.$auth.hasPermi('base:core-equipment-attr:delete')
this.$auth.hasPermi('se:safety-attr:delete')
? {
type: 'delete',
btnName: '删除',
@@ -115,6 +116,7 @@
<script>
import moment from 'moment';
import basicPageMixin from '@/mixins/lb/basicPageMixin';
import tableHeightMixin from '@/mixins/lb/tableHeightMixin';
import EquipmentDrawer from '../components/safetyDrawer';
import {
createEquipment,
@@ -128,30 +130,30 @@ import AssetsUpload from '../components/AssetsUpload.vue';
import BaseDialogWrapper from '../components/BaseDialogWrapper.vue';
export default {
name: 'SpecialEquipmentForSafety',
name: 'specialEquipmentForSafety',
components: {
Editor,
EquipmentDrawer,
BaseDialog: BaseDialogWrapper,
},
mixins: [basicPageMixin],
mixins: [basicPageMixin, tableHeightMixin],
data() {
return {
searchBarKeys: ['name', 'code'],
tableBtn: [
this.$auth.hasPermi(`base:core-equipment:update`)
this.$auth.hasPermi(`se:safety:update`)
? {
type: 'detail',
btnName: '详情',
}
: undefined,
this.$auth.hasPermi('base:core-equipment:update')
this.$auth.hasPermi('se:safety:update')
? {
type: 'edit',
btnName: '修改',
}
: undefined,
this.$auth.hasPermi('base:core-equipment:delete')
this.$auth.hasPermi('se:safety:delete')
? {
type: 'delete',
btnName: '删除',
@@ -166,11 +168,20 @@ export default {
// width: 180,
// filter: (val) => moment(val).format('yyyy-MM-DD HH:mm:ss'),
// },
{ prop: 'name', label: '设备名称' },
{ width: 256, prop: 'code', label: '设备编码' },
{ prop: 'location', label: '位置' },
{ prop: 'responsiblePeopleName', label: '负责人' },
{ prop: 'remark', label: '备注' },
{ prop: 'name', label: '设备名称', showOverflowtooltip: true },
{
width: 200,
prop: 'code',
label: '设备编码',
showOverflowtooltip: true,
},
{ prop: 'location', label: '位置', showOverflowtooltip: true },
{
prop: 'responsiblePeopleName',
label: '负责人',
showOverflowtooltip: true,
},
{ prop: 'remark', label: '备注', showOverflowtooltip: true },
],
searchBarFormConfig: [
{
@@ -195,7 +206,7 @@ export default {
type: 'separate',
},
{
type: this.$auth.hasPermi('base:core-equipment:export')
type: this.$auth.hasPermi('se:safety:export')
? 'button'
: '',
btnName: '导出',
@@ -204,7 +215,7 @@ export default {
color: 'primary',
},
{
type: this.$auth.hasPermi('base:core-equipment:create')
type: this.$auth.hasPermi('se:safety:create')
? 'button'
: '',
btnName: '新增',
@@ -275,7 +286,7 @@ export default {
// 查询参数
queryParams: {
pageNo: 1,
pageSize: 10,
pageSize: 20,
code: '',
name: '',
},
@@ -327,9 +338,6 @@ export default {
mounted() {
this.getList();
},
activated() {
this.getList();
},
methods: {
/** 查询列表 */
getList() {

View File

@@ -9,6 +9,7 @@
<el-table
:data="tableDataWithIndex"
:border="true"
:max-height="tableH"
@selection-change="handleSelectionChange"
style="width: 100%"
:header-cell-style="{
@@ -20,25 +21,40 @@
type="selection"
:width="50"
:selectable="checkSelectable" />
<el-table-column prop="_pageIndex" width="80" align="center">
<el-table-column
prop="_pageIndex"
width="80"
align="center">
<template slot="header">
<el-popover placement="bottom-start" width="300" trigger="click">
<div class="setting-box" style="max-height: 400px; overflow-y: auto">
<el-popover
placement="bottom-start"
width="300"
trigger="click">
<div
class="setting-box"
style="max-height: 400px; overflow-y: auto">
<el-checkbox
v-for="(item, index) in tablePropsLabelList"
:key="'cb' + index"
v-model="selectedBox[index]"
:label="item.label" />
</div>
<i slot="reference" class="el-icon-s-tools" />
<i
slot="reference"
class="el-icon-s-tools" />
</el-popover>
</template>
</el-table-column>
<el-table-column
v-if="selectedBox[0]"
label="巡检单名称"
:show-overflow-tooltip="true"
prop="name"></el-table-column>
<el-table-column v-if="selectedBox[1]" label="部门" prop="planName">
<el-table-column
v-if="selectedBox[1]"
label="部门"
:show-overflow-tooltip="true"
prop="planName">
<template slot-scope="scope">
{{ scope.row.department || '---' }}
</template>
@@ -46,12 +62,18 @@
<el-table-column
v-if="selectedBox[2]"
label="巡检时间"
width="160"
:show-overflow-tooltip="true"
prop="planCheckTime">
<template slot-scope="scope">
{{ scope.row.planCheckTime | timeFilter }}
</template>
</el-table-column>
<el-table-column v-if="selectedBox[3]" label="班次" prop="groupClass">
<el-table-column
v-if="selectedBox[3]"
label="班次"
:show-overflow-tooltip="true"
prop="groupClass">
<template slot-scope="scope">
{{ scope.row.groupClass || '---' }}
</template>
@@ -59,6 +81,8 @@
<el-table-column
v-if="selectedBox[4]"
label="确认截止时间"
width="160"
:show-overflow-tooltip="true"
prop="confirmDueTime">
<template slot-scope="scope">
{{ scope.row.confirmDueTime | timeFilter }}
@@ -66,17 +90,21 @@
</el-table-column>
<el-table-column
v-if="selectedBox[5]"
width="150"
label="备注"
:show-overflow-tooltip="true"
prop="remark">
<template slot-scope="scope">
{{ scope.row.remark }}
</template>
</el-table-column>
<el-table-column width="188" label="操作">
<el-table-column
width="188"
label="操作">
<template slot-scope="scope">
<el-tooltip content="确认" placement="top">
<el-tooltip
content="确认"
placement="top">
<el-button
type="text"
style="margin: 5px 0; padding: 0"
@@ -87,7 +115,9 @@
</el-tooltip>
<!-- line -->
<span style="margin: 0 4px; font-size: 18px; color: #e5e7eb">|</span>
<el-tooltip content="查看详情" placement="top">
<el-tooltip
content="查看详情"
placement="top">
<el-button
type="text"
style="margin: 5px 0; padding: 0"
@@ -97,7 +127,9 @@
</el-tooltip>
<!-- line -->
<span style="margin: 0 4px; font-size: 18px; color: #e5e7eb">|</span>
<el-tooltip content="编辑" placement="top">
<el-tooltip
content="编辑"
placement="top">
<el-button
type="text"
style="margin: 5px 0; padding: 0"
@@ -107,7 +139,9 @@
</el-tooltip>
<!-- line -->
<span style="margin: 0 4px; font-size: 18px; color: #e5e7eb">|</span>
<el-tooltip content="删除" placement="top">
<el-tooltip
content="删除"
placement="top">
<el-button
type="text"
style="margin: 5px 0; padding: 0"
@@ -122,10 +156,12 @@
<script>
import moment from 'moment';
import tableHeightMixin from '@/mixins/lb/tableHeightMixin';
export default {
name: 'CheckOrderListTable',
components: {},
mixins: [tableHeightMixin],
props: ['tableData', 'page', 'limit', 'permissionGuard'],
filters: {
timeFilter: (val) =>

View File

@@ -20,6 +20,7 @@
:page="queryParams.pageNo"
:limit="queryParams.pageSize"
:table-data="list"
:max-height="tableH"
@emitFun="handleEmitFun">
<method-btn
v-if="tableBtn.length"
@@ -45,7 +46,10 @@
@close="cancel"
@cancel="cancel"
@confirm="handleConfirm">
<add ref="add" v-if="open" @refreshDataList="successSubmit" />
<add
ref="add"
v-if="open"
@refreshDataList="successSubmit" />
</base-dialog>
<!-- 添加巡检查看详情 -->
<addOrUpdata
@@ -62,37 +66,32 @@ import addOrUpdata from './add-or-updata.vue';
import add from './add.vue';
import { parseTime } from '../../core/mixins/code-filter';
import BaseDialogWrapperVue from '../components/BaseDialogWrapper.vue';
import tableHeightMixin from '@/mixins/lb/tableHeightMixin';
export default {
name: 'SpecialEquipmentCheckConfig',
components: { addOrUpdata, add, BaseDialog: BaseDialogWrapperVue },
mixins: [basicPageMixin],
mixins: [basicPageMixin, tableHeightMixin],
data() {
return {
addOrUpdateVisible: false,
addOrEditTitle: '',
searchBarKeys: ['name'],
tableBtn: [
this.$auth.hasPermi('equipment:check-setting:addInsp')
this.$auth.hasPermi('se:check:add-item')
? {
type: 'add',
btnName: '添加',
showTip: '添加巡检',
}
: undefined,
this.$auth.hasPermi('equipment:check-setting:update')
this.$auth.hasPermi('se:check:update')
? {
type: 'edit',
btnName: '修改',
}
: undefined,
// this.$auth.hasPermi('equipment:check-setting:update')
// ? {
// type: 'detail',
// btnName: '查看详情',
// }
// : undefined,
this.$auth.hasPermi('equipment:check-setting:delete')
this.$auth.hasPermi('se:check:delete')
? {
type: 'delete',
btnName: '删除',
@@ -103,28 +102,30 @@ export default {
{
prop: 'name',
label: '巡检单名称',
width: 100,
minWidth: 100,
showOverflowtooltip: true,
},
{
prop: 'code',
width: 180,
label: '巡检单编码',
showOverflowtooltip: true,
},
{
prop: 'department',
label: '部门',
width: 100,
showOverflowtooltip: true,
},
{
prop: 'planCheckTime',
label: '计划巡检时间',
width: 160,
showOverflowtooltip: true,
filter: parseTime,
},
{
prop: 'checkPeriod',
width: 130,
label: '巡检频率(天/次)',
showOverflowtooltip: true,
},
@@ -142,6 +143,7 @@ export default {
{ prop: 'creator', label: '创建人', showOverflowtooltip: true },
{
prop: 'createTime',
width: 160,
label: '创建时间',
showOverflowtooltip: true,
filter: parseTime,
@@ -165,16 +167,14 @@ export default {
type: 'separate',
},
{
type: this.$auth.hasPermi('equipment:check-setting:create')
? 'button'
: '',
type: this.$auth.hasPermi('se:check:create') ? 'button' : '',
btnName: '新增',
name: 'add',
plain: true,
color: 'success',
},
// {
// type: this.$auth.hasPermi('equipment:check-setting:export')
// type: this.$auth.hasPermi('se:check:export')
// ? 'button'
// : '',
// btnName: '导出',
@@ -187,7 +187,7 @@ export default {
// 查询参数
queryParams: {
pageNo: 1,
pageSize: 10,
pageSize: 20,
name: null,
status: 0,
special: true,

View File

@@ -69,7 +69,7 @@ import AddCheckDet from './Content-add_detail.vue';
import BaseDialogWrapperVue from '../components/BaseDialogWrapper.vue';
export default {
name: 'SpecialEquipmentCheckConfig',
name: 'SpecialEquipmentCheckContent',
components: {
addOrUpdata,
add,
@@ -92,7 +92,7 @@ export default {
btnName: '确认',
showTip: '确认',
},
this.$auth.hasPermi('equipment:check-setting:update')
this.$auth.hasPermi('se:check-unconfirm:update')
? {
type: 'edit',
btnName: '修改',
@@ -102,7 +102,7 @@ export default {
type: 'detail',
btnName: '巡检内容详情',
},
this.$auth.hasPermi('equipment:check-setting:delete')
this.$auth.hasPermi('se:check-unconfirm:delete')
? {
type: 'delete',
btnName: '删除',
@@ -131,6 +131,7 @@ export default {
{
prop: 'confirmDueTime',
label: '确认截止时间',
width: 150,
showOverflowtooltip: true,
filter: parseTime,
// filter: (val) =>
@@ -157,7 +158,7 @@ export default {
type: 'separate',
},
{
type: this.$auth.hasPermi('equipment:check-setting:create')
type: this.$auth.hasPermi('se:check-unconfirm:create')
? 'button'
: '',
btnName: '新增',
@@ -166,14 +167,18 @@ export default {
color: 'success',
},
{
type: 'button',
type: this.$auth.hasPermi('se:check-unconfirm:export')
? 'button'
: '',
btnName: '导出',
name: 'export',
plain: true,
color: 'warning',
},
{
type: 'button',
type: this.$auth.hasPermi('se:check-unconfirm:confirm-all')
? 'button'
: '',
btnName: '批量确认',
name: 'batch-confirm',
plain: true,
@@ -185,7 +190,7 @@ export default {
// 查询参数
queryParams: {
pageNo: 1,
pageSize: 10,
pageSize: 20,
name: null,
status: 1,
special: true,

View File

@@ -19,7 +19,9 @@
<div class="drawer-body flex">
<div class="drawer-body__content">
<div class="form-part" style="margin-bottom: 32px">
<div
class="form-part"
style="margin-bottom: 32px">
<!-- <el-skeleton v-if="!showForm" animated /> -->
<el-form
class="equipment-info-form"
@@ -30,37 +32,49 @@
v-loading="formLoading">
<el-row :gutter="20">
<el-col :span="8">
<el-form-item label="巡检单名称" prop="name">
<el-form-item
label="巡检单名称"
prop="name">
<div style="">{{ form.name || '---' }}</div>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="部门" prop="department">
<el-form-item
label="部门"
prop="department">
<div style="">{{ form.department || '---' }}</div>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="班次" prop="groupClass">
<el-form-item
label="班次"
prop="groupClass">
<div style="">{{ form.groupClass || '---' }}</div>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="巡检人" prop="checkPerson">
<el-form-item
label="巡检人"
prop="checkPerson">
<div style="">{{ form.checkPerson || '---' }}</div>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="巡检时间" prop="planCheckTime">
<div style="">{{ form.planCheckTime | parseTime }}</div>
<el-form-item
label="巡检时间"
prop="planCheckTime">
<div style="">{{ form.actualCheckTime | parseTime }}</div>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="确认人" prop="confirmPerson">
<el-form-item
label="确认人"
prop="confirmPerson">
<div style="">{{ form.confirmPerson || '---' }}</div>
</el-form-item>
</el-col>
@@ -81,7 +95,9 @@
<div
v-if="!disableEdit"
style="position: absolute; top: -40px; right: 0">
<el-button @click="handleAddAttr" type="text">
<el-button
@click="handleAddAttr"
type="text">
<i class="el-icon-plus"></i>
添加内容
</el-button>
@@ -112,7 +128,9 @@
</div>
<div class="drawer-body__footer">
<el-button v-if="!disableEdit" @click="handleCancel">
<el-button
v-if="!disableEdit"
@click="handleCancel">
{{ disableEdit ? '返回' : '取消' }}
</el-button>
<el-button

View File

@@ -18,6 +18,7 @@
:table-props="tableProps"
:page="queryParams.pageNo"
:limit="queryParams.pageSize"
:max-height="tableH"
:table-data="list"
@emitFun="handleEmitFun">
<method-btn
@@ -50,11 +51,12 @@ import basicPageMixin from '@/mixins/lb/basicPageMixin';
import { parseTime } from '../../core/mixins/code-filter';
import RecordDetail from './Record-detail.vue';
import moment from 'moment';
import tableHeightMixin from '@/mixins/lb/tableHeightMixin';
export default {
name: 'SpecialEquipmentCheckRecord',
components: { RecordDetail },
mixins: [basicPageMixin],
mixins: [basicPageMixin, tableHeightMixin],
data() {
const today = new Date();
const twoDaysAgo = new Date(today.getTime() - 2 * 24 * 60 * 60 * 1000);
@@ -69,19 +71,19 @@ export default {
addOrUpdateVisible: false,
searchBarKeys: ['name', 'actualCheckTime'],
tableBtn: [
this.$auth.hasPermi('equipment:check-record:detail')
this.$auth.hasPermi('se:check-record:detail')
? {
type: 'detail',
btnName: '详情',
}
: undefined,
// this.$auth.hasPermi('equipment:check-record:update')
// this.$auth.hasPermi('se:check-record:update')
// ? {
// type: 'edit',
// btnName: '修改',
// }
// : undefined,
// this.$auth.hasPermi('equipment:check-record:delete')
// this.$auth.hasPermi('se:check-record:delete')
// ? {
// type: 'delete',
// btnName: '删除',
@@ -89,10 +91,16 @@ export default {
// : undefined,
].filter((v) => v),
tableProps: [
{ prop: 'name', label: '巡检单名称' },
{ prop: 'department', label: '部门' },
{ prop: 'planCheckTime', label: '巡检时间', filter: parseTime },
{ prop: 'groupClass', label: '班次' },
{ prop: 'name', label: '巡检单名称', showOverflowtooltip: true },
{ prop: 'department', label: '部门', showOverflowtooltip: true },
{
prop: 'actualCheckTime',
label: '巡检时间',
width: 160,
filter: parseTime,
showOverflowtooltip: true,
},
{ prop: 'groupClass', label: '班次', showOverflowtooltip: true },
// {
// prop: '_detail',
// label: '巡检内容',
@@ -122,26 +130,6 @@ export default {
{ prop: 'remark', label: '备注' },
],
searchBarFormConfig: [
// {
// type: 'select',
// label: '设备大类',
// placeholder: '请选择设备大类',
// param: 'specialType',
// onchange: true,
// selectOptions: [
// { id: 1, name: '安全设备' },
// { id: 2, name: '消防设备' },
// { id: 3, name: '特种设备' },
// ],
// filterable: true,
// },
// {
// type: 'select',
// label: '设备',
// placeholder: '请选择设备',
// param: 'equipmentId',
// filterable: true,
// },
{
type: 'input',
label: '巡检单名称',
@@ -173,7 +161,7 @@ export default {
type: 'separate',
},
{
type: this.$auth.hasPermi('equipment:check-record:export')
type: this.$auth.hasPermi('se:check-record:export')
? 'button'
: '',
btnName: '导出',
@@ -182,7 +170,7 @@ export default {
color: 'primary',
},
// {
// type: this.$auth.hasPermi('equipment:check-record:create')
// type: this.$auth.hasPermi('se:check-record:create')
// ? 'button'
// : '',
// btnName: '新增',
@@ -196,7 +184,7 @@ export default {
// 查询参数
queryParams: {
pageNo: 1,
pageSize: 10,
pageSize: 20,
special: true,
status: 2,
actualCheckTime: t,

View File

@@ -19,16 +19,9 @@
:table-props="tableProps"
:page="queryParams.pageNo"
:limit="queryParams.pageSize"
:max-height="tableH"
:table-data="list"
@emitFun="handleEmitFun">
<!-- <method-btn
v-if="tableBtn.length"
slot="handleBtn"
label="操作"
:width="120"
:method-list="tableBtn"
@clickBtn="handleTableBtnClick" /> -->
</base-table>
@emitFun="handleEmitFun"></base-table>
<!-- 分页组件 -->
<pagination
@@ -61,74 +54,18 @@
</template>
<script>
// import { publicFormatter } from '@/utils/dict';
// import moment from 'moment';
import basicPageMixin from '@/mixins/lb/basicPageMixin';
import tableHeightMixin from '@/mixins/lb/tableHeightMixin';
import { exportMaintainMonitorExcel } from '@/api/equipment/base/maintain/record';
import { parseTime } from '@/utils/ruoyi';
import MonitorDetail from './Monitor--detail.vue';
const remainBox = {
name: 'RemainBox',
props: ['injectData'],
data() {
return {};
},
computed: {
value() {
return this.injectData[this.injectData.prop] || null;
},
color() {
if (this.value) {
const v = +this.value;
return v < 0 ? '#FF5454' : v >= 0 && v < 2 ? '#FFD767' : '#37D97F';
}
return 'unset';
},
},
render: function (h) {
return (
<div
style={`background: ${
this.color
}; position:absolute; inset: 0; padding: 0 10px; display: flex; align-items: center; color: ${
// this.color == 'red' ? '#fff' : 'unset'
'#fff'
}`}>
{this.injectData[this.injectData.prop]?.toFixed(0) || ''}
</div>
);
},
};
const btn = {
name: 'tableBtn',
props: ['injectData'],
data() {
return {};
},
methods: {
handleClick() {
this.$emit('emitData', {
action: this.injectData.label,
value: this.injectData,
});
},
},
render: function (h) {
return (
<el-button type="text" onClick={this.handleClick}>
{this.injectData.entryText}
</el-button>
);
},
};
import { RemainBox, TableBtn } from '@/components/tableInnerComponents';
export default {
name: 'SpecialEquipmentMaintainMonitor',
name: 'SpecialEquipmentMonitoring',
components: { MonitorDetail },
mixins: [basicPageMixin],
mixins: [basicPageMixin, tableHeightMixin],
data() {
return {
monitorDetailVisible: false,
@@ -189,71 +126,15 @@ export default {
prop: 'opt2',
label: '保养内容',
entryText: '详情',
subcomponent: btn,
subcomponent: TableBtn,
width: 100,
},
{
prop: 'remainDays',
label: '距离下次保养剩余时间(天)',
subcomponent: remainBox,
subcomponent: RemainBox,
minWidth: 210,
},
// {
// prop: 'createTime',
// label: '添加时间',
// fixed: true,
// width: 180,
// filter: parseTime(createTime),
// },
// {
// prop: 'equipmentCategory',
// label: '设备大类',
// minWidth: 100,
// showOverflowtooltip: true,
// filter: (val) =>
// val != null ? ['-', '安全设备', '消防设备', '特种设备'][val] : '-',
// },
// {
// prop: 'equipmentName',
// label: '设备名称',
// minWidth: 100,
// showOverflowtooltip: true,
// },
// { prop: 'maintenancePeriod', label: '保养频率' },
// {
// prop: 'maintainType',
// label: '保养类型',
// showOverflowtooltip: true,
// filter: publicFormatter(this.DICT_TYPE.MAINTAIN_TYPE),
// },
// {
// prop: 'lastMaintainTime',
// label: '上次保养时间',
// filter: parseTime,
// minWidth: 150,
// showOverflowtooltip: true,
// },
// {
// prop: 'remainDays',
// label: '距离保养时间(天)',
// subcomponent: remainBox,
// minWidth: 150,
// // showOverflowtooltip: true
// },
// {
// prop: 'opt1',
// label: '设备保养',
// name: '操作',
// subcomponent: btn,
// width: 100,
// },
// {
// prop: 'opt2',
// label: '保养记录',
// name: '查看详情',
// subcomponent: btn,
// width: 100,
// },
],
searchBarFormConfig: [
{
@@ -263,26 +144,6 @@ export default {
param: 'planId',
filterable: true,
},
// {
// type: 'select',
// label: '设备大类',
// placeholder: '请选择设备大类',
// param: 'specialType',
// onchange: true,
// selectOptions: [
// { id: 1, name: '安全设备' },
// { id: 2, name: '消防设备' },
// { id: 3, name: '特种设备' },
// ],
// filterable: true,
// },
// {
// type: 'select',
// label: '设备名',
// placeholder: '请选择设备',
// param: 'equipmentId',
// filterable: true,
// },
{
type: 'button',
btnName: '查询',
@@ -293,7 +154,7 @@ export default {
type: 'separate',
},
{
type: this.$auth.hasPermi('base:quality-inspection-type:export')
type: this.$auth.hasPermi('se:maintain-plan:export')
? 'button'
: '',
btnName: '导出',
@@ -307,7 +168,7 @@ export default {
// 查询参数
queryParams: {
pageNo: 1,
pageSize: 10,
pageSize: 20,
planId: null,
special: true,
},

View File

@@ -19,6 +19,7 @@
:page="queryParams.pageNo"
:limit="queryParams.pageSize"
:table-data="list"
:max-height="tableH"
@emitFun="handleEmitFun">
<method-btn
v-if="tableBtn.length"
@@ -62,40 +63,39 @@
<script>
import moment from 'moment';
import basicPageMixin from '@/mixins/lb/basicPageMixin';
import tableHeightMixin from '@/mixins/lb/tableHeightMixin';
import { deleteEqMaintainPlan } from '@/api/equipment/base/maintain/record';
import PlanConfigAdd from './PlanConfig--add.vue';
import PlanConfigAddContent from './PlanConfig--addContent.vue';
import BaseDialogWrapper from '../components/BaseDialogWrapper.vue';
export default {
name: 'SpecialEquipmentPlanConfig',
name: 'SpecialEquipmentMaintainPlanConfig',
components: {
BaseDialog: BaseDialogWrapper,
DialogForm: PlanConfigAdd,
PlanConfigAddContent,
},
mixins: [basicPageMixin],
mixins: [basicPageMixin, tableHeightMixin],
data() {
const t = new Date();
const [y, m, d] = [t.getFullYear(), t.getMonth(), t.getDate()];
return {
searchBarKeys: ['planName'], // 'specialType', 'equipmentName', 'createTime'],
searchBarKeys: ['planName'],
tableBtn: [
// {
// type: 'detail',
// btnName: '保养记录',
// },
{
type: 'addContent',
btnName: '添加内容',
},
this.$auth.hasPermi('equipment:plan-config:update')
this.$auth.hasPermi('se:maintain:update')
? {
type: 'addContent',
btnName: '添加内容',
}
: undefined,
this.$auth.hasPermi('se:maintain:update')
? {
type: 'edit',
btnName: '修改',
}
: undefined,
this.$auth.hasPermi('equipment:plan-config:delete')
this.$auth.hasPermi('se:maintain:delete')
? {
type: 'delete',
btnName: '删除',
@@ -103,93 +103,62 @@ export default {
: undefined,
].filter((v) => v),
tableProps: [
{ prop: 'name', label: '保养计划名称' },
{ prop: 'departmentName', label: '部门' },
{ width: 144, prop: 'lineName', label: '产线名' },
{ width: 132, prop: 'maintenancePeriod', label: '保养频率(天/次)' },
{
width: 180,
minWidth: 120,
prop: 'name',
label: '保养计划名称',
showOverflowtooltip: true,
},
{ prop: 'departmentName', label: '部门', showOverflowtooltip: true },
{
prop: 'lineName',
label: '产线名',
showOverflowtooltip: true,
},
{
minWidth: 160,
prop: 'maintenancePeriod',
label: '保养频率(天/次)',
showOverflowtooltip: true,
},
{
minWidth: 160,
prop: 'firstMaintenanceTime',
label: '首次保养时间',
showOverflowtooltip: true,
filter: (val) => moment(val).format('yyyy-MM-DD HH:mm:ss'),
},
{ width: 144, prop: 'maintainDuration', label: '保养时长' },
{ prop: 'maintainer', label: '计划保养人员' },
{
width: 144,
minWidth: 100,
prop: 'maintainDuration',
label: '保养时长',
showOverflowtooltip: true,
},
{
minWidth: 144,
prop: 'maintainer',
label: '计划保养人员',
showOverflowtooltip: true,
},
{
minWidth: 144,
prop: 'confirmTimeLimit',
label: '确认时限',
showOverflowtooltip: true,
filter: (val) =>
val != null && val > 24
? `${(val - (val % 24)) / 24}${val % 24}小时`
: `${val}小时`,
},
{ prop: 'remark', label: '备注' },
// {
// prop: 'createTime',
// label: '添加时间',
// fixed: true,
// width: 180,
// filter: (val) => moment(val).format('yyyy-MM-DD HH:mm:ss'),
// },
// { prop: 'code', label: '计划编号' },
// {
// prop: 'enabled',
// label: '启用状态',
// filter: (val) => ['停用', '启用'][val],
// },
// {
// prop: 'equipmentCategory',
// label: '设备大类',
// filter: (val) =>
// val != null ? ['-', '安全', '消防', '特种'][val] : '-',
// },
// { prop: 'equipmentName', label: '设备名称' },
// { width: 144, prop: 'maintainDuration', label: '计划保养用时(h)' },
// {
// prop: 'maintainType',
// label: '保养类型',
// filter: publicFormatter('maintain_type'),
// },
{ prop: 'remark', label: '备注', showOverflowtooltip: true },
],
searchBarFormConfig: [
// {
// type: 'select',
// label: '设备大类',
// selectOptions: [
// { id: 1, name: '安全设备' },
// { id: 2, name: '消防设备' },
// { id: 3, name: '特种设备' },
// ],
// placeholder: '请选择设备大类',
// param: 'specialType',
// },
{
type: 'input',
label: '保养计划名称',
placeholder: '请输入保养计划名称',
param: 'planName',
// selectOptions: [
// {name: 1, id: 1}
// ]
},
// {
// type: 'input',
// label: '设备名',
// placeholder: '请输入设备名称',
// param: 'equipmentName',
// },
// {
// type: 'datePicker',
// label: '时间段',
// dateType: 'daterange',
// format: 'yyyy-MM-dd',
// valueFormat: 'yyyy-MM-dd HH:mm:ss',
// rangeSeparator: '-',
// startPlaceholder: '开始时间',
// endPlaceholder: '结束时间',
// param: 'createTime',
// },
{
type: 'button',
btnName: '查询',
@@ -200,22 +169,12 @@ export default {
type: 'separate',
},
{
type: this.$auth.hasPermi('equipment:plan-config:create')
? 'button'
: '',
type: this.$auth.hasPermi('se:maintain:create') ? 'button' : '',
btnName: '新增',
name: 'add',
plain: true,
color: 'success',
},
// {
// type: this.$auth.hasPermi('base:quality-inspection-type:export')
// ? 'button'
// : '',
// btnName: '导出',
// name: 'export',
// color: 'warning',
// },
],
rows: [
[
@@ -316,7 +275,7 @@ export default {
// 查询参数
queryParams: {
pageNo: 1,
pageSize: 10,
pageSize: 20,
// equipmentName: null,
// createTime: null,
specialType: null,

View File

@@ -30,8 +30,12 @@
<div class="drawer-body__content">
<section>
<!-- <SmallTitle>保养信息</SmallTitle> -->
<div class="form-part" style="margin-bottom: 32px">
<el-skeleton v-if="!showForm" animated />
<div
class="form-part"
style="margin-bottom: 32px">
<el-skeleton
v-if="!showForm"
animated />
<el-form
v-else
ref="form"
@@ -40,14 +44,18 @@
v-loading="formLoading">
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="计划保养人员" prop="planMaintainWorker">
<span>{{ form.planMaintainWorker }}</span>
<el-form-item
label="计划保养人员"
prop="planMaintainWorker">
<span>{{ form.planMaintainWorker || '---' }}</span>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="实际保养人员" prop="maintainWorker">
<span>{{ form.maintainWorker }}</span>
<el-form-item
label="实际保养人员"
prop="maintainWorker">
<span>{{ form.maintainWorker || '---' }}</span>
</el-form-item>
</el-col>
</el-row>

View File

@@ -19,16 +19,9 @@
:table-props="tableProps"
:page="queryParams.pageNo"
:limit="queryParams.pageSize"
:max-height="tableH"
:table-data="list"
@emitFun="handleEmitFun">
<!-- <method-btn
v-if="tableBtn.length"
slot="handleBtn"
label="操作"
:width="120"
:method-list="tableBtn"
@clickBtn="handleTableBtnClick" /> -->
</base-table>
@emitFun="handleEmitFun"></base-table>
<!-- 分页组件 -->
<pagination
@@ -51,9 +44,16 @@
ref="form"
v-model="form"
:disabled="mode == 'detail'" />
<el-row v-if="mode === 'detail'" slot="footer" type="flex" justify="end">
<el-row
v-if="mode === 'detail'"
slot="footer"
type="flex"
justify="end">
<el-col :span="12">
<el-button size="small" class="btnTextStyle" @click="cancel">
<el-button
size="small"
class="btnTextStyle"
@click="cancel">
关闭
</el-button>
</el-col>
@@ -70,6 +70,7 @@
<script>
import moment from 'moment';
import basicPageMixin from '@/mixins/lb/basicPageMixin';
import tableHeightMixin from '@/mixins/lb/tableHeightMixin';
import Editor from '@/components/Editor';
import DialogForm from './Record--add.vue';
import {
@@ -77,36 +78,15 @@ import {
exportMaintainLogExcel,
} from '@/api/equipment/base/maintain/record';
import RecordDetail from './Record--detail.vue';
import { TableBtn } from '@/components/tableInnerComponents';
const timeFilter = (val) => moment(val).format('yyyy-MM-DD HH:mm:ss');
const btn = {
name: 'tableBtn',
props: ['injectData'],
data() {
return {};
},
methods: {
handleClick() {
this.$emit('emitData', {
action: this.injectData.label,
value: this.injectData,
});
},
},
render: function (h) {
return (
<el-button type="text" onClick={this.handleClick}>
{this.injectData.name}
</el-button>
);
},
};
const timeFilter = (val) =>
val ? moment(val).format('yyyy-MM-DD HH:mm:ss') : '---';
export default {
name: 'SpecialEquipmentMaintainRecord',
components: { DialogForm, RecordDetail },
mixins: [basicPageMixin],
mixins: [basicPageMixin, tableHeightMixin],
data() {
const today = new Date();
const twoDaysAgo = new Date(today.getTime() - 2 * 24 * 60 * 60 * 1000);
@@ -118,28 +98,21 @@ export default {
return {
recordDetailVisible: false,
searchBarKeys: [
'maintainPlanId',
'startTime',
'special',
// 'relatePlan',
// 'equipmentId',
// 'specialType',
],
searchBarKeys: ['maintainPlanId', 'startTime', 'special'],
tableBtn: [
this.$auth.hasPermi('equipment:maintain-record:update')
this.$auth.hasPermi('se:maintain-record:update')
? {
type: 'detail',
btnName: '详情',
}
: undefined,
this.$auth.hasPermi('equipment:maintain-record:update')
this.$auth.hasPermi('se:maintain-record:update')
? {
type: 'edit',
btnName: '修改',
}
: undefined,
this.$auth.hasPermi('equipment:maintain-record:delete')
this.$auth.hasPermi('se:maintain-record:delete')
? {
type: 'delete',
btnName: '删除',
@@ -147,64 +120,57 @@ export default {
: undefined,
].filter((v) => v),
tableProps: [
// {
// prop: 'createTime',
// label: '添加时间',
// fixed: true,
// width: 150,
// filter: timeFilter,
// },
{
prop: 'maintainOrderNumber',
label: '设备保养单号',
width: 110,
minWidth: 110,
showOverflowtooltip: true,
},
{
prop: 'planName',
label: '保养计划名称',
width: 110,
minWidth: 110,
showOverflowtooltip: true,
filter: (val) => (val != null ? val : '---'),
},
{
prop: 'departmentName',
label: '部门',
width: 110,
minWidth: 110,
showOverflowtooltip: true,
},
{
prop: 'lineName',
label: '产线名',
width: 110,
minWidth: 110,
showOverflowtooltip: true,
},
{
prop: 'planStartTime',
label: '计划开始时间',
filter: timeFilter,
minWidth: 150,
minWidth: 130,
showOverflowtooltip: true,
},
{
prop: 'planEndTime',
label: '计划结束时间',
filter: timeFilter,
minWidth: 150,
minWidth: 130,
showOverflowtooltip: true,
},
{
prop: 'startTime',
label: '实际开始时间',
filter: timeFilter,
minWidth: 150,
minWidth: 130,
showOverflowtooltip: true,
},
{
prop: 'endTime',
label: '实际结束时间',
filter: timeFilter,
minWidth: 150,
minWidth: 130,
showOverflowtooltip: true,
},
{
@@ -218,78 +184,12 @@ export default {
{
prop: '_detail',
label: '详情',
name: '详情',
entryText: '详情',
minWidth: 60,
subcomponent: btn,
subcomponent: TableBtn,
},
// {
// prop: 'equipmentCategory',
// label: '设备大类',
// minWidth: 100,
// showOverflowtooltip: true,
// filter: (val) =>
// val != null ? ['-', '安全设备', '消防设备', '特种设备'][val] : '-',
// },
// {
// prop: 'equipmentName',
// label: '设备名称',
// minWidth: 100,
// showOverflowtooltip: true,
// },
// {
// prop: 'maintainWorker',
// label: '保养人员',
// minWidth: 100,
// showOverflowtooltip: true,
// },
// {
// prop: 'relatePlan',
// label: '是否计划保养',
// width: 120,
// filter: (v) => (v != null ? ['', '是', '否'][v] : ''),
// },
// {
// prop: 'planName',
// label: '保养计划名称',
// minWidth: 120,
// showOverflowtooltip: true,
// },
// {
// prop: 'maintainDuration',
// label: '计划保养用时(h)',
// minWidth: 130,
// showOverflowtooltip: true,
// },
// { prop: 'timeUsed', label: '实际保养用时(h)', minWidth: 130 },
// {
// prop: 'remark',
// label: '备注',
// minWidth: 100,
// showOverflowtooltip: true,
// },
],
searchBarFormConfig: [
// {
// type: 'select',
// label: '设备大类',
// placeholder: '请选择设备大类',
// param: 'specialType',
// onchange: true,
// selectOptions: [
// { id: 1, name: '安全设备' },
// { id: 2, name: '消防设备' },
// { id: 3, name: '特种设备' },
// ],
// filterable: true,
// defaultSelect: null
// },
// {
// type: 'select',
// label: '设备',
// placeholder: '请选择设备',
// param: 'equipmentId',
// defaultSelect: null
// },
{
type: 'select',
label: '保养计划名称',
@@ -297,7 +197,7 @@ export default {
param: 'maintainPlanId',
defaultSelect: null,
filterable: true,
clearable: true
clearable: true,
},
// 开始结束时间
{
@@ -314,16 +214,6 @@ export default {
defaultSelect: t,
// width: 350,
},
// {
// type: 'select',
// label: '是否计划保养',
// selectOptions: [
// { name: '是', id: 1 },
// { name: '否', id: 2 },
// ],
// defaultSelect: null,
// param: 'relatePlan',
// },
{
type: 'button',
btnName: '查询',
@@ -334,7 +224,7 @@ export default {
type: 'separate',
},
{
type: this.$auth.hasPermi('equipment:maintain-record:export')
type: this.$auth.hasPermi('se:maintain-record:export')
? 'button'
: '',
btnName: '导出',
@@ -342,15 +232,6 @@ export default {
plain: true,
color: 'primary',
},
// {
// type: this.$auth.hasPermi('equipment:maintain-record:create')
// ? 'button'
// : '',
// btnName: '新增',
// name: 'add',
// plain: true,
// color: 'success',
// },
],
rows: [
[
@@ -508,7 +389,7 @@ export default {
// 查询参数
queryParams: {
pageNo: 1,
pageSize: 10,
pageSize: 20,
maintainPlanId: null,
startTime: t,
// relatePlan: null,
@@ -574,11 +455,13 @@ export default {
getList() {
this.loading = true;
// 执行查询
this.recv({ ...this.queryParams, special: true }).then((response) => {
this.list = response.data.list;
this.total = response.data.total;
this.loading = false;
});
this.recv({ ...this.queryParams, special: true, confirmed: true }).then(
(response) => {
this.list = response.data.list;
this.total = response.data.total;
this.loading = false;
}
);
},
/** 取消按钮 */
cancel() {

View File

@@ -20,6 +20,7 @@
:page="queryParams.pageNo"
:limit="queryParams.pageSize"
:table-data="list"
:max-height="tableH"
@emitFun="handleEmitFun">
<method-btn
v-if="tableBtn.length"
@@ -63,6 +64,7 @@
<script>
import basicPageMixin from '@/mixins/lb/basicPageMixin';
import DetailDrawer from './CustomDialogForm.vue';
import tableHeightMixin from '@/mixins/lb/tableHeightMixin';
import {
deleteRepair,
exportRepairLogExcel,
@@ -75,7 +77,7 @@ import BaseDialogWrapperVue from '../components/BaseDialogWrapper.vue';
export default {
name: 'SpecialEquipmentRepair',
components: { DetailDrawer, DialogForm, BaseDialog: BaseDialogWrapperVue },
mixins: [basicPageMixin],
mixins: [basicPageMixin, tableHeightMixin],
data() {
return {
addOrUpdateVisible: false,
@@ -86,25 +88,19 @@ export default {
'specialType',
],
tableBtn: [
this.$auth.hasPermi('equipment:repair:finish')
this.$auth.hasPermi('se:repair:finish')
? {
type: 'finish',
btnName: '完成',
}
: undefined,
this.$auth.hasPermi('equipment:repair:update')
this.$auth.hasPermi('se:repair:update')
? {
type: 'detail',
btnName: '详情',
}
: undefined,
// this.$auth.hasPermi('equipment:repair:update')
// ? {
// type: 'edit',
// btnName: '修改',
// }
// : undefined,
this.$auth.hasPermi('equipment:repair:delete')
this.$auth.hasPermi('se:repair:delete')
? {
type: 'delete',
btnName: '删除',
@@ -112,13 +108,6 @@ export default {
: undefined,
].filter((v) => v),
tableProps: [
// {
// prop: 'createTime',
// label: '添加时间',
// fixed: true,
// width: 150,
// filter: parseTime,
// },
{
prop: 'repairOrderNumber',
label: '设备维修单号',
@@ -167,6 +156,7 @@ export default {
{
prop: 'maintenanceResult',
label: '维修结果',
minWidth: 110,
showOverflowtooltip: true,
filter: (v) => (v != null ? ['成功', '失败'][v] : ''),
},
@@ -174,7 +164,7 @@ export default {
prop: 'maintenanceDetail',
label: '维修描述',
showOverflowtooltip: true,
width: 110,
minWidth: 110,
subcomponent: htmls,
},
{
@@ -183,52 +173,8 @@ export default {
minWidth: 120,
showOverflowtooltip: true,
},
// {
// prop: 'maintenanceStatus',
// label: '维修状态',
// filter: (v) => (v != null ? ['未完成', '完成', '进行中'][v] : ''),
// },
// { prop: 'maintenanceDuration', label: '维修时长(h)', width: 110 },
// {
// prop: 'equipmentName',
// label: '设备名称',
// minWidth: 100,
// showOverflowtooltip: true,
// },
// {
// prop: 'maintenanceDetail',
// label: '维修明细',
// subcomponent: htmls,
// minWidth: 100,
// showOverflowtooltip: true,
// },
// {
// prop: 'repairman',
// label: '维修工',
// minWidth: 100,
// showOverflowtooltip: true,
// },
// {
// prop: 'repairmanPhone',
// label: '联系方式',
// minWidth: 100,
// showOverflowtooltip: true,
// },
],
searchBarFormConfig: [
// {
// type: 'select',
// label: '设备大类',
// placeholder: '请选择设备大类',
// param: 'specialType',
// onchange: true,
// selectOptions: [
// { id: 1, name: '安全设备' },
// { id: 2, name: '消防设备' },
// { id: 3, name: '特种设备' },
// ],
// filterable: true,
// },
{
type: 'select',
label: '设备',
@@ -253,7 +199,6 @@ export default {
dateType: 'daterange', // datetimerange
format: 'yyyy-MM-dd',
valueFormat: 'yyyy-MM-dd HH:mm:ss',
// valueFormat: 'timestamp',
rangeSeparator: '-',
startPlaceholder: '开始日期',
endPlaceholder: '结束日期',
@@ -270,14 +215,14 @@ export default {
type: 'separate',
},
{
type: this.$auth.hasPermi('equipment:repair:export') ? 'button' : '',
type: this.$auth.hasPermi('se:repair:export') ? 'button' : '',
btnName: '导出',
name: 'export',
plain: true,
color: 'primary',
},
{
type: this.$auth.hasPermi('equipment:repair:create') ? 'button' : '',
type: this.$auth.hasPermi('se:repair:create') ? 'button' : '',
btnName: '新增',
name: 'add',
plain: true,
@@ -289,7 +234,7 @@ export default {
// 查询参数
queryParams: {
pageNo: 1,
pageSize: 10,
pageSize: 20,
// maintenanceStatus: null,
maintenanceResult: null,
createTime: null,

View File

@@ -14,22 +14,6 @@
@select-changed="handleSearchBarChange"
@headBtnClick="handleSearchBarBtnClick" />
<!-- 列表 -->
<!-- <base-table
:table-props="tableProps"
:page="queryParams.pageNo"
:limit="queryParams.pageSize"
:table-data="list"
@selection-change="handleSelectionChange"
@emitFun="handleEmitFun">
<method-btn
v-if="tableBtn.length"
slot="handleBtn"
label="操作"
:width="120"
:method-list="tableBtn"
@clickBtn="handleTableBtnClick" />
</base-table> -->
<WaitingListTable
ref="waiting-list-table"
:table-data="list"
@@ -61,9 +45,16 @@
ref="form"
v-model="form"
:disabled="mode == 'detail'" />
<el-row v-if="mode === 'detail'" slot="footer" type="flex" justify="end">
<el-row
v-if="mode === 'detail'"
slot="footer"
type="flex"
justify="end">
<el-col :span="12">
<el-button size="small" class="btnTextStyle" @click="cancel">
<el-button
size="small"
class="btnTextStyle"
@click="cancel">
关闭
</el-button>
</el-col>
@@ -107,32 +98,8 @@ import WaitingListTable from './WaitingListTable.vue';
import RecordDetail from './Record--detail.vue';
import BaseDialogWrapper from '../components/BaseDialogWrapper.vue';
// const timeFilter = (val) => moment(val).format('yyyy-MM-DD HH:mm:ss');
// const btn = {
// name: 'tableBtn',
// props: ['injectData'],
// data() {
// return {};
// },
// methods: {
// handleClick() {
// this.$emit('emitData', {
// action: this.injectData.label,
// value: this.injectData,
// });
// },
// },
// render: function (h) {
// return (
// <el-button type="text" onClick={this.handleClick}>
// {this.injectData.name}
// </el-button>
// );
// },
// };
export default {
name: 'SpecialEquipmentMaintainRecord',
name: 'SpecialEquipmentMaintainRecordUnconfirmed',
components: {
DialogFormUnplanned,
WaitingListTable,
@@ -146,235 +113,9 @@ export default {
data() {
return {
recordDetailVisible: false,
searchBarKeys: [
'maintainPlanId',
'startTime',
'special',
// 'relatePlan',
// 'equipmentId',
// 'specialType',
],
searchBarKeys: ['maintainPlanId', 'startTime', 'special'],
tobeConfirmedIdList: [],
// tableBtn: [
// // this.$auth.hasPermi('equipment:maintain-record:update')
// // ? {
// // type: 'detail',
// // btnName: '详情',
// // }
// // : undefined,
// {
// type: 'confirm',
// btnName: '确认',
// },
// {
// type: 'edit',
// btnName: '编辑',
// },
// {
// type: 'delete',
// btnName: '删除',
// },
// ],
// tableProps: [
// // {
// // prop: 'createTime',
// // label: '添加时间',
// // fixed: true,
// // width: 150,
// // filter: timeFilter,
// // },
// {
// type: 'selection',
// // prop: '_selection',
// // label: '批量选择',
// width: 48,
// subcomponent: {
// props: ['injectData'],
// data() {
// return {
// outside: false,
// selected: false,
// };
// },
// watch: {
// selected(val) {
// if (!this.outside) {
// console.log('emit row-selected...');
// this.$emit('emitData', {
// action: 'row-selected',
// value: {
// row: this.injectData,
// selected: val,
// },
// });
// }
// },
// injectData: {
// deep: true,
// immediate: true,
// handler: function (val) {
// this.outside = true;
// this.selected = !!((val._selection & 0b01) != 0);
// this.$nextTick(() => {
// this.outside = false;
// });
// },
// },
// },
// render(h) {
// const enabled = 0b10 & this.injectData._selection;
// // return this.injectData?._selection ? h('h1', null, 'hello') : h('h1', null, '1');
// return (
// <div>
// <span>{this.selected}</span>
// <el-checkbox disabled={!enabled} v-model={this.selected} />
// </div>
// );
// },
// },
// },
// {
// prop: 'maintainOrderNumber',
// label: '设备保养单号',
// width: 110,
// showOverflowtooltip: true,
// },
// {
// prop: 'planName',
// label: '保养计划名称',
// width: 110,
// showOverflowtooltip: true,
// },
// {
// prop: 'departmentName',
// label: '部门',
// width: 110,
// showOverflowtooltip: true,
// },
// {
// prop: 'lineName',
// label: '产线名',
// width: 110,
// showOverflowtooltip: true,
// },
// {
// prop: 'planStartTime',
// label: '计划开始时间',
// filter: timeFilter,
// minWidth: 150,
// showOverflowtooltip: true,
// },
// {
// prop: 'planEndTime',
// label: '计划结束时间',
// filter: timeFilter,
// minWidth: 150,
// showOverflowtooltip: true,
// },
// {
// prop: 'startTime',
// label: '实际开始时间',
// filter: timeFilter,
// minWidth: 150,
// showOverflowtooltip: true,
// },
// {
// prop: 'endTime',
// label: '实际结束时间',
// filter: timeFilter,
// minWidth: 150,
// showOverflowtooltip: true,
// },
// {
// prop: 'confirmDueTime',
// label: '确认截止时间',
// filter: timeFilter,
// minWidth: 150,
// showOverflowtooltip: true,
// },
// {
// prop: 'relatePlan',
// label: '保养计划类型',
// minWidth: 150,
// showOverflowtooltip: true,
// filter: (val) =>
// val != null ? ['-', '计划型', '非计划型'][val] : '-',
// },
// {
// prop: '_detail',
// label: '详情',
// name: '详情',
// minWidth: 60,
// subcomponent: btn,
// },
// // {
// // prop: 'equipmentCategory',
// // label: '设备大类',
// // minWidth: 100,
// // showOverflowtooltip: true,
// // filter: (val) =>
// // val != null ? ['-', '安全设备', '消防设备', '特种设备'][val] : '-',
// // },
// // {
// // prop: 'equipmentName',
// // label: '设备名称',
// // minWidth: 100,
// // showOverflowtooltip: true,
// // },
// // {
// // prop: 'maintainWorker',
// // label: '保养人员',
// // minWidth: 100,
// // showOverflowtooltip: true,
// // },
// // {
// // prop: 'relatePlan',
// // label: '是否计划保养',
// // width: 120,
// // filter: (v) => (v != null ? ['', '是', '否'][v] : ''),
// // },
// // {
// // prop: 'planName',
// // label: '保养计划名称',
// // minWidth: 120,
// // showOverflowtooltip: true,
// // },
// // {
// // prop: 'maintainDuration',
// // label: '计划保养用时(h)',
// // minWidth: 130,
// // showOverflowtooltip: true,
// // },
// // { prop: 'timeUsed', label: '实际保养用时(h)', minWidth: 130 },
// // {
// // prop: 'remark',
// // label: '备注',
// // minWidth: 100,
// // showOverflowtooltip: true,
// // },
// ],
searchBarFormConfig: [
// {
// type: 'select',
// label: '设备大类',
// placeholder: '请选择设备大类',
// param: 'specialType',
// onchange: true,
// selectOptions: [
// { id: 1, name: '安全设备' },
// { id: 2, name: '消防设备' },
// { id: 3, name: '特种设备' },
// ],
// filterable: true,
// defaultSelect: null
// },
// {
// type: 'select',
// label: '设备',
// placeholder: '请选择设备',
// param: 'equipmentId',
// defaultSelect: null
// },
{
type: 'select',
label: '保养计划名称',
@@ -399,16 +140,6 @@ export default {
defaultSelect: null,
// width: 350,
},
// {
// type: 'select',
// label: '是否计划保养',
// selectOptions: [
// { name: '是', id: 1 },
// { name: '否', id: 2 },
// ],
// defaultSelect: null,
// param: 'relatePlan',
// },
{
type: 'button',
btnName: '查询',
@@ -419,21 +150,25 @@ export default {
type: 'separate',
},
{
type: 'button',
type: this.$auth.hasPermi('se:maintain-record-pre:create')
? 'button'
: '',
btnName: '新增',
name: 'add',
plain: true,
color: 'success',
},
{
type: 'button',
type: this.$auth.hasPermi('se:maintain-record-pre:confirm-all')
? 'button'
: '',
btnName: '批量确认',
name: 'batchConfirm',
color: 'primary',
plain: true,
},
{
type: this.$auth.hasPermi('equipment:maintain-record:export')
type: this.$auth.hasPermi('se:maintain-record-pre:export')
? 'button'
: '',
btnName: '导出',
@@ -441,22 +176,13 @@ export default {
plain: true,
color: 'primary',
},
// {
// type: this.$auth.hasPermi('equipment:maintain-record:create')
// ? 'button'
// : '',
// btnName: '新增',
// name: 'add',
// plain: true,
// color: 'success',
// },
],
// 是否显示弹出层
open: false,
// 查询参数
queryParams: {
pageNo: 1,
pageSize: 10,
pageSize: 20,
maintainPlanId: null,
startTime: null,
special: true,
@@ -483,30 +209,7 @@ export default {
},
created() {
this.initSearchBar();
// if (this.$route.query) {
// this.queryParams.specialType =
// this.$route.query?.specialType ?? undefined;
// this.queryParams.equipmentId =
// this.$route.query?.equipmentId ?? undefined;
// this.queryParams.maintainPlanId =
// this.$route.query?.maintainPlanId ?? undefined;
// this.queryParams.relatePlan = this.$route.query?.relatePlan ?? undefined;
// this.queryParams.startTime = this.$route.query?.createTime ?? undefined;
// this.searchBarFormConfig[0].defaultSelect =
// this.$route.query.specialType ?? undefined;
// this.searchBarFormConfig[1].defaultSelect =
// this.$route.query.equipmentId ?? undefined;
// this.searchBarFormConfig[2].defaultSelect =
// this.$route.query.maintainPlanId ?? undefined;
// this.searchBarFormConfig[3].defaultSelect =
// this.$route.query?.createTime ?? undefined;
// this.searchBarFormConfig[4].defaultSelect =
// Number(this.$route.query.relatePlan) ?? undefined;
// }
this.getList();
// if (this.$route.query.addRecord) {
// this.handleAdd();
// }
},
methods: {
/** 批量确认 */
@@ -531,60 +234,6 @@ export default {
break;
}
},
handleSelectionChange(list) {
if (this.tobeConfirmedIdList.length) {
this.tobeConfirmedIdList = [];
this.list.forEach((item) => {
this.handleEmitFun({
action: 'row-selected',
value: { row: item, selected: false },
});
});
console.log(
'清空选择列表',
this.list.map((item) => item._selection)
);
} else {
this.tobeConfirmedIdList = list.map((item) => item.id);
this.list.forEach((item) => {
this.handleEmitFun({
action: 'row-selected',
value: { row: item, selected: true },
});
});
console.log(
'全选',
this.list.map((item) => item._selection)
);
}
},
handleEmitFun({ action, value }) {
switch (action) {
case '详情':
this.recordDetailVisible = true;
this.$nextTick(() => {
this.$refs.recordDetailDrawer.show({
id: value.id,
planMaintainWorker: value.planMaintainWorker,
maintainWorker: value.maintainWorker,
});
});
break;
case 'row-selected':
if (value.selected) {
this.tobeConfirmedIdList.push(value.row.id);
value.row._selection = 0b11;
} else {
const index = this.tobeConfirmedIdList.indexOf(value.row.id);
if (index != -1) {
this.tobeConfirmedIdList.splice(index, 1);
}
}
console.log('tobeConfirmedIdList', this.tobeConfirmedIdList);
break;
}
},
handleSearchBarChange({ param, value }) {
if ('specialType' === param) {
@@ -598,10 +247,6 @@ export default {
}
},
initSearchBar() {
// this.http('/base/core-equipment/listAll', 'get').then(({ data }) => {
// this.allSpecialEquipments = data.filter((item) => item.special);
// this.setSearchBarEquipmentList(data.filter((item) => item.special));
// });
this.http('/base/equipment-maintain-plan/page', 'get', {
pageNo: 1,
pageSize: 100,
@@ -609,7 +254,6 @@ export default {
}).then(({ data }) => {
this.$set(
this.searchBarFormConfig[0],
// this.searchBarFormConfig[2],
'selectOptions',
(data?.list || []).map((item) => ({
name: item.name,
@@ -625,7 +269,6 @@ export default {
this.recv({
...this.queryParams,
special: true,
// relatePlan: 2,
confirmed: false,
}).then((response) => {
this.list = response.data.list;
@@ -730,35 +373,6 @@ export default {
}, 450);
});
}
// 添加的提交
// this.getConfirmed()
// .then((confirmed) => {
// this.post({
// ...this.form,
// maintainWorker: this.form.maintainWorker.join(','),
// special: true,
// relatePlan: 2,
// confirmed: true,
// }).then((response) => {
// this.$modal.msgSuccess('新增成功');
// this.open = false;
// this.getList();
// });
// })
// .catch((err) => {
// this.post({
// ...this.form,
// maintainWorker: this.form.maintainWorker.join(','),
// special: true,
// relatePlan: 2,
// confirmed: false,
// }).then((response) => {
// this.$modal.msgSuccess('新增成功');
// this.open = false;
// this.getList();
// });
// });
});
},
/** 确认 */

View File

@@ -10,6 +10,7 @@
:data="tableDataWithIndex"
:border="true"
@selection-change="handleSelectionChange"
:max-height="tableH"
style="width: 100%"
:header-cell-style="{
background: '#f2f4f9',
@@ -46,13 +47,15 @@
</el-table-column>
<el-table-column
v-if="selectedBox[0]"
width="128"
min-width="144"
label="设备保养单号"
:show-overflow-tooltip="true"
prop="maintainOrderNumber"></el-table-column>
<el-table-column
v-if="selectedBox[1]"
width="128"
min-width="144"
label="保养计划名称"
:show-overflow-tooltip="true"
prop="planName">
<template slot-scope="scope">
{{ scope.row.planName || '---' }}
@@ -61,6 +64,7 @@
<el-table-column
v-if="selectedBox[2]"
label="部门"
:show-overflow-tooltip="true"
prop="departmentName">
<template slot-scope="scope">
{{ scope.row.departmentName || '---' }}
@@ -69,6 +73,7 @@
<el-table-column
v-if="selectedBox[3]"
label="产线名"
:show-overflow-tooltip="true"
prop="lineName">
<template slot-scope="scope">
{{ scope.row.lineName || '---' }}
@@ -76,8 +81,9 @@
</el-table-column>
<el-table-column
v-if="selectedBox[4]"
width="150"
min-width="144"
label="计划开始时间"
:show-overflow-tooltip="true"
prop="planStartTime">
<template slot-scope="scope">
{{ scope.row.planStartTime | timeFilter }}
@@ -85,8 +91,9 @@
</el-table-column>
<el-table-column
v-if="selectedBox[5]"
width="150"
min-width="144"
label="计划结束时间"
:show-overflow-tooltip="true"
prop="planEndTime">
<template slot-scope="scope">
{{ scope.row.planEndTime | timeFilter }}
@@ -94,8 +101,9 @@
</el-table-column>
<el-table-column
v-if="selectedBox[6]"
width="150"
min-width="144"
label="实际开始时间"
:show-overflow-tooltip="true"
prop="startTime">
<template slot-scope="scope">
{{ scope.row.startTime | timeFilter }}
@@ -103,8 +111,9 @@
</el-table-column>
<el-table-column
v-if="selectedBox[7]"
width="150"
min-width="144"
label="实际结束时间"
:show-overflow-tooltip="true"
prop="endTime">
<template slot-scope="scope">
{{ scope.row.endTime | timeFilter }}
@@ -112,8 +121,9 @@
</el-table-column>
<el-table-column
v-if="selectedBox[8]"
width="150"
min-width="144"
label="确认截止时间"
:show-overflow-tooltip="true"
prop="confirmDueTime">
<template slot-scope="scope">
{{ scope.row.confirmDueTime | timeFilter }}
@@ -121,8 +131,9 @@
</el-table-column>
<el-table-column
v-if="selectedBox[9]"
width="150"
min-width="144"
label="保养计划类型"
:show-overflow-tooltip="true"
prop="relatePlan">
<template slot-scope="scope">
{{ scope.row.relatePlan | relatePlanFilter }}
@@ -133,6 +144,7 @@
label="操作">
<template slot-scope="scope">
<el-tooltip
v-if="$auth.hasPermi('se:maintain-record-pre:confirm')"
content="确认"
placement="top">
<el-button
@@ -144,8 +156,13 @@
</el-button>
</el-tooltip>
<!-- line -->
<span style="margin: 0 4px; font-size: 18px; color: #e5e7eb">|</span>
<span
style="margin: 0 4px; font-size: 18px; color: #e5e7eb"
v-if="$auth.hasPermi('se:maintain-record-pre:update')">
|
</span>
<el-tooltip
v-if="$auth.hasPermi('se:maintain-record-pre:update')"
content="查看详情"
placement="top">
<el-button
@@ -156,8 +173,13 @@
</el-button>
</el-tooltip>
<!-- line -->
<span style="margin: 0 4px; font-size: 18px; color: #e5e7eb">|</span>
<span
style="margin: 0 4px; font-size: 18px; color: #e5e7eb"
v-if="$auth.hasPermi('se:maintain-record-pre:update')">
|
</span>
<el-tooltip
v-if="$auth.hasPermi('se:maintain-record-pre:update')"
content="编辑"
placement="top">
<el-button
@@ -186,10 +208,12 @@
<script>
import moment from 'moment';
import tableHeightMixin from '@/mixins/lb/tableHeightMixin';
export default {
name: 'WaitingListTable',
components: {},
mixins: [tableHeightMixin],
props: ['tableData', 'page', 'limit'],
filters: {
timeFilter: (val) =>

View File

@@ -6,30 +6,30 @@
* @Description:
-->
<template>
<div v-html="content" />
<div v-html="content" />
</template>
<script>
export default {
props: {
injectData: {
type: Object,
default: () => ({})
}
},
data() {
return {
content: ''
}
},
mounted() {
this.getContent()
},
props: {
injectData: {
type: Object,
default: () => ({}),
},
},
data() {
return {
content: '',
};
},
mounted() {
this.getContent();
},
methods: {
getContent() {
this.content = this.injectData[this.injectData.prop] ?? ''
}
}
}
methods: {
getContent() {
this.content = this.injectData[this.injectData.prop] ?? '';
},
},
};
</script>