Compare commits

..

No commits in common. "7fe8d7e72caaa469e9db35a0b295650f380c8793" and "7c83268e0cee273064e31930b3d0ecbb827d0c3c" have entirely different histories.

72 changed files with 730 additions and 1313 deletions

View File

@ -1,8 +1,8 @@
### ###
# @Author: Do not edit # @Author: Do not edit
# @Date: 2023-08-29 09:40:39 # @Date: 2023-08-29 09:40:39
# @LastEditTime: 2024-04-03 11:22:19 # @LastEditTime: 2024-04-01 08:31:57
# @LastEditors: DY # @LastEditors: zhp
# @Description: # @Description:
### ###
# 开发环境配置 # 开发环境配置
@ -18,7 +18,7 @@ VUE_APP_TITLE = MES系统
# VUE_APP_BASE_API = 'http://192.168.2.173:48080' # VUE_APP_BASE_API = 'http://192.168.2.173:48080'
# VUE_APP_BASE_API = 'http://192.168.1.49:48082' # VUE_APP_BASE_API = 'http://192.168.1.49:48082'
# VUE_APP_BASE_API = 'http://192.168.1.8:48082' # VUE_APP_BASE_API = 'http://192.168.1.8:48082'
# VUE_APP_BASE_API = 'http://192.168.4.173:9001' # VUE_APP_BASE_API = 'http://192.168.4.173:48082'
# VUE_APP_BASE_API = 'http://192.168.1.104:48082' # VUE_APP_BASE_API = 'http://192.168.1.104:48082'
VUE_APP_BASE_API = 'http://192.168.0.33:48082' VUE_APP_BASE_API = 'http://192.168.0.33:48082'
# VUE_APP_BASE_API = 'http://192.168.1.62:48082' # VUE_APP_BASE_API = 'http://192.168.1.62:48082'

View File

@ -5,7 +5,6 @@ export default {
}; };
}, },
created() { created() {
this.tableH = this?.heightNum ? this.tableHeight(this.heightNum) : this.tableHeight(260);
window.addEventListener('resize', this._setTableHeight); window.addEventListener('resize', this._setTableHeight);
}, },
destroyed() { destroyed() {
@ -13,8 +12,7 @@ export default {
}, },
methods: { methods: {
_setTableHeight() { _setTableHeight() {
this.tableH = this?.heightNum ? this.tableHeight(this.heightNum) : this.tableHeight(260); this.tableH = this.tableHeight(260);
// this.tableH = this.tableHeight(260);
}, },
}, },
}; };

View File

@ -2,7 +2,7 @@
* @Author: zwq * @Author: zwq
* @Date: 2021-07-19 15:18:30 * @Date: 2021-07-19 15:18:30
* @LastEditors: zhp * @LastEditors: zhp
* @LastEditTime: 2024-04-03 10:54:53 * @LastEditTime: 2024-03-29 16:49:00
* @Description: * @Description:
--> -->
<template> <template>
@ -34,7 +34,7 @@
<el-col :style="{ margin: 8 + 'px' + ' 0' }" :span="12"> <el-col :style="{ margin: 8 + 'px' + ' 0' }" :span="12">
<base-container :beilv="1" :size="'eqStatus'" :title="'周转进度'" :title-icon="'order'" :back="'energy'"> <base-container :beilv="1" :size="'eqStatus'" :title="'周转进度'" :title-icon="'order'" :back="'energy'">
<div class="order" style="width:100%; overflow: hidden scroll;height: 350px;"> <div class="order" style="width:100%; overflow: hidden scroll;height: 350px;">
<el-row v-for="op in orderProcessList" :key="op.id" style="margin-bottom: .5em"> <el-row v-for="op in orderProcessList" :key="op.id" style="margin-bottom: 1em">
<!-- <p v-if="op.outRate === 1" class="now-secondary-title" <!-- <p v-if="op.outRate === 1" class="now-secondary-title"
style="font-size: 14px; opacity: calc(.6);color:#4679FD"> style="font-size: 14px; opacity: calc(.6);color:#4679FD">
<i class="el-icon-check" /> <i class="el-icon-check" />
@ -42,7 +42,7 @@
</p> --> </p> -->
<!-- <p class="now-secondary-title">{{ op.name }}</p> --> <!-- <p class="now-secondary-title">{{ op.name }}</p> -->
<p class="now-secondary-title" style="font-size: 14px;opacity: calc(.6);">{{ op.name }}</p> <p class="now-secondary-title" style="font-size: 14px;opacity: calc(.6);">{{ op.name }}</p>
<el-progress style="width: 935px;" text-color="rgba(255, 255, 255, .6)" :stroke-width="10" <el-progress style="width: 910px;" text-color="rgba(255, 255, 255, .6)" :stroke-width="10"
define-back-color="rgba(32, 57, 96, 1)" :percentage="op.outRate * 100" class="custom-progress-bar" /> define-back-color="rgba(32, 57, 96, 1)" :percentage="op.outRate * 100" class="custom-progress-bar" />
</el-row> </el-row>
</div> </div>
@ -606,10 +606,8 @@ export default {
background-image: linear-gradient(to right, #4573fe, #47f8dc); background-image: linear-gradient(to right, #4573fe, #47f8dc);
} }
::v-deep .el-progress__text { ::v-deep .el-progress__text {
width: 50px;
margin-top: -70px; margin-top: -70px;
margin-left: 834px; margin-left: 820px;
text-align: right;
// background-color: unset; // background-color: unset;
// background-image: linear-gradient(to right, #4573fe, #47f8dc); // background-image: linear-gradient(to right, #4573fe, #47f8dc);
} }

View File

@ -1,7 +1,7 @@
<!-- <!--
* @Author: zhp * @Author: zhp
* @Date: 2024-01-29 16:50:26 * @Date: 2024-01-29 16:50:26
* @LastEditTime: 2024-04-03 17:10:15 * @LastEditTime: 2024-04-02 15:01:40
* @LastEditors: zhp * @LastEditors: zhp
* @Description: * @Description:
--> -->
@ -41,11 +41,10 @@
</div> --> </div> -->
<!-- 像下面这样表格里的limit值也许可以用js动态计算出来 --> <!-- 像下面这样表格里的limit值也许可以用js动态计算出来 -->
<div v-if="coldDetData" class="myLegend"> <div v-if="coldDetData" class="myLegend">
<div class=" barCircleLegend"></div>
<div class=" barCircle"></div>
<h4 class="barText">产线良品率</h4>
<div class="barLegend"></div> <div class="barLegend"></div>
<h4 class="barCircleText">产线产量</h4> <h4 class="barText">产线产量</h4>
<div class="barCircle"></div>
<h4 class="barCircleText">产线良品率</h4>
</div> </div>
<double-y-chart ref="productChart" :id="'doubleYChart'" :name-list="cxNameList" :data-list="cxDataList" <double-y-chart ref="productChart" :id="'doubleYChart'" :name-list="cxNameList" :data-list="cxDataList"
:height="359" :show-legend="true" /> :height="359" :show-legend="true" />
@ -310,7 +309,6 @@ export default {
window.location.reload() window.location.reload()
}, 86400000) }, 86400000)
// this.getData() // this.getData()
// this.getReaiData()
}, },
destroyed() { destroyed() {
this.CutWebsocketClose() this.CutWebsocketClose()
@ -412,7 +410,7 @@ export default {
topNameList.push('产线: ' + ele.lineName + ' ' + '总面积:' + ele.sumArea + '㎡') topNameList.push('产线: ' + ele.lineName + ' ' + '总面积:' + ele.sumArea + '㎡')
productList.push(ele.productArea) productList.push(ele.productArea)
wasteList.push(ele.wastArea) wasteList.push(ele.wastArea)
nameWasteList.push('缺陷面积:' + this.NumFormat(ele.wastArea) + '㎡') nameWasteList.push('缺陷面积:' + ele.wastArea + '㎡')
// yieldList.push({ // yieldList.push({
// name: '', // name: '',
// yield:ele.yield // yield:ele.yield
@ -429,82 +427,39 @@ export default {
this.$refs.fifthPileChart.initChart(nameList, [topNameList[4]], [nameWasteList[4]], [productList[4]], [wasteList[4]]) this.$refs.fifthPileChart.initChart(nameList, [topNameList[4]], [nameWasteList[4]], [productList[4]], [wasteList[4]])
}) })
}, },
// getReaiData() { getData() {
// let detData = [ let detData = [
// { {
// name: '1', name: '1',
// run: '', run: '运行',
// }, },
// { {
// name: '2', name: '2',
// run: '', run: '未运行',
// }, },
// { {
// name: '3', name: '3',
// run: '', run: '运行',
// }, },
// { {
// name: '4', name: '4',
// run: '', run: '未运行',
// }, },
// { {
// name: '1', name: '1',
// run: '', run: '运行',
// }, },
// ] ]
// let arr = [] this.realEqList = detData.map((item, index) => [
// let index = 0 // console.log(item)
// for (let i in detData) { `<span style="color:rgba(255,255,255,0.5)" >${index + 1 || ''}
// index++, </span>`,
// arr.push([ `<span style="color:rgba(255,255,255,0.5)">${item.name || ''}</span>`,
// `<span style="color:rgba(255,255,255,0.5)" >${index || ''} `<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>`,
// </span>`, ])
// // `<span style="color:rgba(255,255,255,0.5)" >${i || ''} this.realEqConfig.data = this.realEqList
// // </span>`, this.$refs['realEqScrollBoard'].updateRows(this.realEqList)
// `<span style="color:rgba(255,255,255,0.5)">${i || ''}</span>`, },
// `<span style="color:rgba(255,255,255,0.5)"><div style="${detData[i] == '' ? '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> ${detData[i] || ''}</span>`,
// ])
// }
// // this.$nextTick(() => {
// this.annealFunConfig.data = arr
// this.$refs['annealFunScrollBoard'].updateRows(arr)
// // })
// },
// 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.$nextTick(() => {
// this.realEqConfig.data = this.realEqList
// this.$refs['realEqScrollBoard'].updateRows(this.realEqList)
// // })
// },
CutWebsocketClose(e) { CutWebsocketClose(e) {
this.Cutws.ws.onclose = (event) => { console.log(event );} this.Cutws.ws.onclose = (event) => { console.log(event );}
}, },
@ -617,14 +572,14 @@ export default {
this.cutWsData = event?.data ? JSON.parse(event?.data) : {} this.cutWsData = event?.data ? JSON.parse(event?.data) : {}
if (this.cutWsData.type === 'cutting' && this.cutWsData.name === 'table') { if (this.cutWsData.type === 'cutting' && this.cutWsData.name === 'table') {
let cutArr = this.cutWsData.productHourData.map((item, index) => [ let cutArr = this.cutWsData.productHourData.map((item, index) => [
`<span style="color:rgba(255,255,255,0.5)" >${index + 1 || ''} `<span style="color:rgba(255,255,255,0.7)" >${index + 1 || ''}
</span>`, </span>`,
`<span style="color:rgba(255,255,255,0.5)" >${item.lineName || ''} `<span style="color:rgba(255,255,255,0.7)" >${item.lineName || ''}
</span>`, </span>`,
`<span style="color:rgba(255,255,255,0.5)">${this.formatTime(item.time) || ''}</span>`, `<span style="color:rgba(255,255,255,0.7)">${this.formatTime(item.time) || ''}</span>`,
`<span style="color:rgba(255,255,255,0.5)">${this.getSize(item.size) || ''}</span>`, `<span style="color:rgba(255,255,255,0.7)">${this.getSize(item.size) || ''}</span>`,
`<span style="color:rgba(255,255,255,0.5)">${this.NumFormat(item.productArea) + '㎡' || ''}</span>`, `<span style="color:rgba(255,255,255,0.7)">${item.productArea + '㎡' || ''}</span>`,
`<span style="color:rgba(255,255,255,0.5)">${this.NumFormat(item.wasteArea) + '㎡' || ''}</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:#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>` <div style = "${(item.product * 100).toFixed(2) < 91 ? 'display:block; color:rgba(255, 209, 96, 1)' : 'display:none;'}">${(item.product * 100).toFixed(2) + '%' || ''}</div>`
]) ])
@ -649,16 +604,16 @@ export default {
topNameList.push('产线: ' + ele.lineName + ' ' + '总面积:' + ele.sumArea + '㎡') topNameList.push('产线: ' + ele.lineName + ' ' + '总面积:' + ele.sumArea + '㎡')
productList.push(ele.productArea) productList.push(ele.productArea)
wasteList.push(ele.wastArea) wasteList.push(ele.wastArea)
nameWasteList.push('缺陷面积:' + this.NumFormat(ele.wastArea) + '㎡') nameWasteList.push('缺陷面积:' + ele.wastArea + '㎡')
sumAreaList.push(ele.sumArea) sumAreaList.push(ele.sumArea)
yieldList.push(parseFloat((ele.yield * 100).toFixed(0))) yieldList.push(parseFloat((ele.yield * 100).toFixed(3)))
}) })
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.firstPileChart.initChart(nameList, [topNameList[0]], [nameWasteList[0]], [productList[0]], [wasteList[0]]) 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.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.thirdPileChart.initChart(nameList, [topNameList[0]], [nameWasteList[0]], [productList[0]], [wasteList[0]])
this.$refs.fourthPileChart.initChart(nameList, [topNameList[3]], [nameWasteList[3]], [productList[3]], [wasteList[3]]) this.$refs.fourthPileChart.initChart(nameList, [topNameList[0]], [nameWasteList[0]], [productList[0]], [wasteList[0]])
this.$refs.fifthPileChart.initChart(nameList, [topNameList[4]], [nameWasteList[4]], [productList[4]], [wasteList[4]]) this.$refs.fifthPileChart.initChart(nameList, [topNameList[0]], [nameWasteList[0]], [productList[0]], [wasteList[0]])
this.$refs.productChart.initChart(nameList, yieldList, sumAreaList) this.$refs.productChart.initChart(nameList, yieldList, sumAreaList)
}) })
} }
@ -745,25 +700,6 @@ export default {
// this.funWebsocket.onclose = this.funWebsocketClose // this.funWebsocket.onclose = this.funWebsocketClose
// } // }
}, },
NumFormat(value) {
if (!value) return '0.00'
value = value.toFixed(2)
var intPart = Math.trunc(value) //
// var intPartFormat = intPart.toString().replace(/(\d)(?=(?:\d{3})+$)/g, '$1,') //
var floatPart = '.00' //
var value2Array = value.split('.')
// =2
if (value2Array.length === 2) {
floatPart = value2Array[1].toString() //
if (floatPart.length === 1) {
return intPart + '.' + floatPart + '0'
} else {
return intPart + '.' + floatPart
}
} else {
return intPart + floatPart
}
},
// funWebsocketOnOpen() { // funWebsocketOnOpen() {
// console.log('socket') // console.log('socket')
// this.SJGWebsocket.onmessage() // this.SJGWebsocket.onmessage()
@ -861,7 +797,7 @@ export default {
.myLegend{ .myLegend{
position: absolute; position: absolute;
top: -20px; top: -20px;
right: 20px; right: 50px;
font-size: 12px; font-size: 12px;
color: rgba(255,255,255,.6); color: rgba(255,255,255,.6);
.barLegend{ .barLegend{
@ -871,29 +807,19 @@ export default {
height: 10px; height: 10px;
display: inline-block; display: inline-block;
margin-right: 5px; margin-right: 5px;
border-radius: 30%;
} }
.barText{ .barText{
// float: right; // float: right;
display: inline-block; display: inline-block;
margin-right: 10px; margin-right: 10px;
} }
.barCircleLegend{
width: 15px;
height: 1px;
background-color: rgba(255, 209, 96, 1);
position: absolute;
left: -4.1715px;
top: 21.7px;
}
.barCircle{ .barCircle{
width: 6px; width: 7px;
height: 6px; height: 7px;
border-radius: 50%; border-radius: 50%;
background-color: rgba(255, 209, 96, 1); background-color: rgba(255, 209, 96, 1);
display: inline-block; display: inline-block;
margin-right: 10px; margin-right: 5px;
margin-bottom: 1.7px;
} }
.barCircleText{ .barCircleText{
display: inline-block; display: inline-block;

View File

@ -2,7 +2,7 @@
* @Author: zwq * @Author: zwq
* @Date: 2022-01-21 14:43:06 * @Date: 2022-01-21 14:43:06
* @LastEditors: zhp * @LastEditors: zhp
* @LastEditTime: 2024-04-03 16:33:24 * @LastEditTime: 2024-03-29 14:50:50
* @Description: * @Description:
--> -->
<template> <template>
@ -85,6 +85,7 @@ export default {
defaultConfig: { defaultConfig: {
// legend // legend
legend: { legend: {
orient: 'vertical',
left: '75%', left: '75%',
bottom: 0, bottom: 0,
itemHeight: 10, itemHeight: 10,
@ -196,7 +197,7 @@ export default {
// //
...this.defaultConfig.legend, ...this.defaultConfig.legend,
// //
// ...this.legendConfig ...this.legendConfig
}, },
color: this.barColor, color: this.barColor,
series: [ series: [

View File

@ -2,7 +2,7 @@
<!-- <!--
* @Author: zhp * @Author: zhp
* @Date: 2023-09-21 09:06:28 * @Date: 2023-09-21 09:06:28
* @LastEditTime: 2024-04-03 16:28:40 * @LastEditTime: 2024-04-01 09:12:56
* @LastEditors: zhp * @LastEditors: zhp
* @Description: * @Description:
--> -->
@ -100,9 +100,8 @@ export default {
show: true, // show: true, //
position: 'top', // position: 'top', //
textStyle: { // textStyle: { //
color: 'rgba(255,255,255,0.5)', // color: '#ced1d5',
fontSize: 12, fontSize: 12
fontWight: 'bolder'
} }
}, },
} }
@ -194,19 +193,18 @@ export default {
axisLine: { axisLine: {
lineStyle: { lineStyle: {
type: 'solid', type: 'solid',
color: '#25528f', // 线 color: '#213259', // 线
width: '1' // 线 width: '1' // 线
} }
}, },
axisLabel: { axisLabel: {
textStyle: { textStyle: {
align: 'center',
color: 'rgba(255,255,255,0.5)' // color: 'rgba(255,255,255,0.5)' //
} }
}, },
splitLine: { splitLine: {
lineStyle: { lineStyle: {
color: '#25528f' color: '#213259'
} }
}, },
data: nameList data: nameList
@ -228,7 +226,6 @@ export default {
nameTextStyle: {// y nameTextStyle: {// y
color: 'rgba(255,255,255,0.5)', // color: 'rgba(255,255,255,0.5)', //
align: "left", align: "left",
padding: [0, 0, 0, 8]
}, },
position: 'right', position: 'right',
alignTicks: true, alignTicks: true,
@ -236,20 +233,19 @@ export default {
show: true, show: true,
lineStyle: { lineStyle: {
type: 'solid', type: 'solid',
color: '#25528f', // 线 color: '#213259', // 线
width: '1' // 线 width: '1' // 线
} }
}, },
axisLabel: { axisLabel: {
textStyle: { textStyle: {
color: 'rgba(255,255,255,0.5)', // color: '#ced1d5', //
formatter: '{value}%', formatter: '{value}%'
align:'left',
} }
}, },
splitLine: { splitLine: {
lineStyle: { lineStyle: {
color: '#25528f' color: '#213259'
} }
} }
// type: 'value' // type: 'value'
@ -274,7 +270,6 @@ export default {
color: 'rgba(255,255,255,0.5)', // color: 'rgba(255,255,255,0.5)', //
// fontSize: 10, // fontSize: 10,
align: "right", align: "right",
padding:[0,4,0,0]
}, },
position: 'left', position: 'left',
alignTicks: true, alignTicks: true,
@ -282,21 +277,19 @@ export default {
show: true, show: true,
lineStyle: { lineStyle: {
type: 'solid', type: 'solid',
color: '#25528f', // 线 color: '#213259', // 线
width: '1' // 线 width: '1' // 线
} }
}, },
axisLabel: { axisLabel: {
// padding: [0, 20, 0, 0],
textStyle: { textStyle: {
margin: 60,
color: 'rgba(255,255,255,0.5)', // color: 'rgba(255,255,255,0.5)', //
formatter: '{value} 片' formatter: '{value} 片'
} }
}, },
splitLine: { splitLine: {
lineStyle: { lineStyle: {
color: '#25528f' color: '#213259'
} }
} }
// type: 'value' // type: 'value'

View File

@ -1,7 +1,7 @@
<!-- <!--
* @Author: zhp * @Author: zhp
* @Date: 2023-09-21 09:06:28 * @Date: 2023-09-21 09:06:28
* @LastEditTime: 2024-04-03 17:09:12 * @LastEditTime: 2024-03-29 16:26:28
* @LastEditors: zhp * @LastEditors: zhp
* @Description: * @Description:
--> -->
@ -105,7 +105,7 @@ export default {
show: true, // show: true, //
position: 'top', // position: 'top', //
textStyle: { // textStyle: { //
color: 'rgba(255,255,255,0.5)', // color: '#ced1d5',
fontSize: 12, fontSize: 12,
fontWight:'bolder' fontWight:'bolder'
} }
@ -167,19 +167,19 @@ export default {
type: 'cross' type: 'cross'
} }
}, },
grid: { top: 70, right: 20, bottom: 10, left: 10, containLabel: true }, grid: { top: 90, right: 70, bottom: 20, left: 20, containLabel: true },
// legend: { legend: {
// itemWidth: 10, itemWidth: 10,
// itemHeight: 10, itemHeight: 10,
// top: '2%', top: '0%',
// right: '30px', right: '20px',
// data: ['线', '线'], data: ['产线良品率', '产线产量'],
// textStyle: { textStyle: {
// fontSize: 12 * this.beilv, fontSize: 12 * this.beilv,
// color: '#ced1d5', color: '#ced1d5',
// fontWight: 'bolder' fontWight: 'bolder'
// } }
// }, },
xAxis: { xAxis: {
axisTick: { axisTick: {
show: false show: false
@ -227,7 +227,6 @@ export default {
nameTextStyle: {// y nameTextStyle: {// y
color: 'rgba(255,255,255,0.5)', // color: 'rgba(255,255,255,0.5)', //
align: "left", align: "left",
padding: [0, 0, 0, 2]
}, },
position: 'right', position: 'right',
alignTicks: true, alignTicks: true,
@ -272,7 +271,6 @@ export default {
nameTextStyle: { nameTextStyle: {
color: 'rgba(255,255,255,0.5)', // color: 'rgba(255,255,255,0.5)', //
// fontSize: 10, // fontSize: 10,
padding: [0, 4, 0, 0],
align: "right", align: "right",
}, },
// position: 'left', // position: 'left',

View File

@ -113,7 +113,7 @@ export default {
textStyle: { // textStyle: { //
color: 'rgba(255,255,255,0.5)', // color: 'rgba(255,255,255,0.5)', //
fontSize: 12, fontSize: 12,
fontWeight: 'normal' fontWeight: 'bolder'
} }
}, },
} }
@ -133,7 +133,7 @@ export default {
type: 'shadow' // 线'line' | 'shadow' type: 'shadow' // 线'line' | 'shadow'
} }
}, },
grid: { top: 70, right: 40, bottom: 10, left: 40, containLabel: true }, grid: { top: 90, right: 60, bottom: 20, left: 30, containLabel: true },
// legend: { // legend: {
// itemWidth: 10, // itemWidth: 10,
// itemHeight: 10, // itemHeight: 10,
@ -175,7 +175,7 @@ export default {
name: '单位kwh', name: '单位kwh',
nameTextStyle: { nameTextStyle: {
color: 'rgba(255,255,255,0.5)', // color: 'rgba(255,255,255,0.5)', //
fontSize: 12, fontSize: 10,
align: 'right', align: 'right',
}, },
type: 'value', type: 'value',

View File

@ -1,7 +1,7 @@
<!-- <!--
* @Author: zhp * @Author: zhp
* @Date: 2023-12-27 13:54:52 * @Date: 2023-12-27 13:54:52
* @LastEditTime: 2024-04-03 18:12:18 * @LastEditTime: 2024-04-01 09:14:45
* @LastEditors: zhp * @LastEditors: zhp
* @Description: * @Description:
--> -->
@ -114,10 +114,6 @@ export default {
totalData.push(sum); totalData.push(sum);
} }
// } // }
// rawData[1].map((d, did) =>
// console.log((d / totalData[did]).toFixed(3))
// // totalData[did] <= 0 ? 0 : d / totalData[did]
// )
console.log('total', totalData) console.log('total', totalData)
const series = [ const series = [
'良品', '良品',
@ -138,7 +134,7 @@ export default {
// }, // },
color:colors[sid], color:colors[sid],
data: rawData.length != 0 ? rawData[sid].map((d, did) => data: rawData.length != 0 ? rawData[sid].map((d, did) =>
totalData[did] <= 0 ? 0 : (d / totalData[did]).toFixed(4) totalData[did] <= 0 ? 0 : d / totalData[did]
) : [] ) : []
}; };
}); });
@ -167,15 +163,15 @@ export default {
let singleData = series.filter(function (item) { let singleData = series.filter(function (item) {
return item.name == name return item.name == name
}) })
return name + parseFloat((singleData[0].data * 100).toFixed(0)) + '%' return name + parseFloat((singleData[0].data * 100).toFixed(3)) + '%'
}, },
itemWidth: 12, itemWidth: 12,
itemHeight: 12, itemHeight: 12,
bottom: '20', bottom: '20',
left: '20', left: '20',
icon: 'roundRect', icon: 'rect',
textStyle: { textStyle: {
color: 'rgba(255,255,255,.9)', color: 'rgba(255,255,255,.6)',
fontSize:12, fontSize:12,
} }
}, },
@ -208,7 +204,7 @@ export default {
splitNumber: 50, splitNumber: 50,
// boundaryGap: [20, 20], // boundaryGap: [20, 20],
textStyle: { textStyle: {
color: 'rgba(255,255,255,.9)', color: 'rgba(255,255,255,.6)',
verticalAlign: 'bottom', verticalAlign: 'bottom',
fontSize: 16, fontSize: 16,
align: 'left', align: 'left',
@ -236,7 +232,7 @@ export default {
splitNumber: 50, splitNumber: 50,
// boundaryGap: [20, 20], // boundaryGap: [20, 20],
textStyle: { textStyle: {
color: 'rgba(255,255,255,.9)', color: 'rgba(255,255,255,.6)',
verticalAlign: 'bottom', verticalAlign: 'bottom',
fontSize: 16, fontSize: 16,
align: 'right', align: 'right',

View File

@ -2,7 +2,7 @@
* @Author: zwq * @Author: zwq
* @Date: 2021-07-19 15:18:30 * @Date: 2021-07-19 15:18:30
* @LastEditors: zhp * @LastEditors: zhp
* @LastEditTime: 2024-04-03 17:14:03 * @LastEditTime: 2024-04-02 09:46:46
* @Description: * @Description:
--> -->
<template> <template>
@ -39,11 +39,11 @@
<el-col :style="{ margin: 8 + 'px' + ' 0' }" :span="8" height="100%"> <el-col :style="{ margin: 8 + 'px' + ' 0' }" :span="8" height="100%">
<base-container :height="318" :size="'small'" :title="'工单监控'" :title-icon="'eqMonitoring'"> <base-container :height="318" :size="'small'" :title="'工单监控'" :title-icon="'eqMonitoring'">
<div class="order" style="width: 100%; overflow: hidden scroll; height: 350px"> <div class="order" style="width: 100%; overflow: hidden scroll; height: 350px">
<el-row v-for="op in orderList" :key="op.id" style="margin-bottom: .5em"> <el-row v-for="op in orderList" :key="op.id" style="margin-bottom: 1em">
<!-- <el-col :span="12"> --> <!-- <el-col :span="12"> -->
<p class="now-secondary-title" style="font-size: 14px;opacity: calc(.6);">{{ op.name }}</p> <p class="now-secondary-title" style="font-size: 14px;opacity: calc(.6);">{{ op.name }}</p>
<el-progress style="width: 620px;" text-color="rgba(255, 255, 255, .6)" :stroke-width="10" <el-progress style="width: 610px;" text-color="rgba(255, 255, 255, .6)" :stroke-width="10"
define-back-color="rgba(32, 57, 96, 1)" :percentage="op.progressRate" class="custom-progress-bar" /> define-back-color="rgba(32, 57, 96, 1)" :percentage="op.progressRate" class="custom-progress-bar" />
</el-row> </el-row>
</div> </div>
@ -67,13 +67,6 @@
<el-col :style="{ margin: 8 + 'px' + ' 0' }" :span="12"> <el-col :style="{ margin: 8 + 'px' + ' 0' }" :span="12">
<base-container :show-time="true" :no-content-padding="true" :height="318 + 338 + 16" :size="'eqStatus'" <base-container :show-time="true" :no-content-padding="true" :height="318 + 338 + 16" :size="'eqStatus'"
:title="'产线产量及良品率'" :title-icon="'productLine'"> :title="'产线产量及良品率'" :title-icon="'productLine'">
<div class="myLegend">
<div class=" barCircleLegend"></div>
<div class=" barCircle"></div>
<h4 class="barText">产线良品率</h4>
<div class="barLegend"></div>
<h4 class="barCircleText">产线产量</h4>
</div>
<double-y-chart ref="productLineChart" :id="'doubleYChart'" :height="390" :show-legend="true" /> <double-y-chart ref="productLineChart" :id="'doubleYChart'" :height="390" :show-legend="true" />
</base-container> </base-container>
</el-col> </el-col>
@ -380,27 +373,7 @@ export default {
id: '4', id: '4',
name: '测试工单4', name: '测试工单4',
progressRate: 0.32323, progressRate: 0.32323,
}, },
{
id: '4',
name: '测试工单4',
progressRate: 0.32323,
},
{
id: '4',
name: '测试工单4',
progressRate: 0.32323,
},
{
id: '4',
name: '测试工单4',
progressRate: 0.32323,
},
{
id: '4',
name: '测试工单4',
progressRate: 0.32323,
},
// { // {
// id: '5', // id: '5',
// name: '', // name: '',
@ -416,7 +389,7 @@ export default {
return { return {
id: ele.id, id: ele.id,
name: ele.name, name: ele.name,
progressRate: parseFloat((ele.progressRate * 100).toFixed(0)), progressRate: parseFloat((ele.progressRate * 100).toFixed(3)),
}; };
} }
}); });
@ -444,61 +417,28 @@ export default {
`<span style="color:rgba(255,255,255,0.5)">${item.error || ''}</span>`, `<span style="color:rgba(255,255,255,0.5)">${item.error || ''}</span>`,
]); ]);
this.eqConfig.data = eqArr; this.eqConfig.data = eqArr;
let data = [ let arr = ['D64', 'D62', 'D61', 'D63', 'D65']
{ // let arr = [5, 6, 2, 4, 7, 9, 15];
lineName: 'D62', // 7
outputNum: '11111', for (let i = 0; i < arr.length - 1; i++) {
passRate: '0.9873'
},
{
lineName: 'D63',
outputNum: '23212',
passRate: '0.9873'
},
{
lineName: 'D61',
outputNum: '423323',
passRate: '0.9873'
},
{
lineName: 'D64',
outputNum: '43434',
passRate: '0.9873'
},
]
let nameList = [];
let passRateList = [];
let outputNumList = [];
// let arr = ['D64', 'D62', 'D61', 'D63', 'D65']
for (let i = 0; i < data.length - 1; i++) {
// //
for (let j = 0; j < data.length - i - 1; j++) { for (let j = 0; j < arr.length - i - 1; j++) {
// //
if (data[j].lineName.substr(data[j].lineName.length - 1, 1) > data[j + 1].lineName.substr(data[j + 1].lineName.length - 1, 1)) { if (arr[j].substr(arr[j].length - 1, 1) > arr[j + 1].substr(arr[j + 1].length - 1, 1)) {
// //
let temp = data[j]; let temp = arr[j];
data[j] = data[j + 1]; arr[j] = arr[j + 1];
data[j + 1] = temp; arr[j + 1] = temp;
} }
} }
} }
data.forEach((ele) => { console.log(arr);
// if (item.id == ele.productionLineId) { this.$refs['eqScrollBoard'].updateRows(eqArr);
// if (item.name.substr(0, 1) == "D") { this.$refs.productLineChart.initChart(
// console.log(ele) arr,
nameList.push(ele.lineName); [98, 97, 98.7, 98.5, 98.3],
outputNumList.push(ele.outputNum); [3134, 2323, 3232, 3233, 2321]
passRateList.push(ele.passRate); );
// }
// }
});
this.$nextTick(() => {
this.$refs.productLineChart.initChart(
nameList,
passRateList,
outputNumList
);
})
// this.getList() // this.getList()
this.initWebSocket(); this.initWebSocket();
this.SJGInitWebSocket(); this.SJGInitWebSocket();
@ -690,7 +630,7 @@ export default {
return { return {
id: ele.id, id: ele.id,
name: ele.name, name: ele.name,
progressRate: parseFloat((ele.progressRate * 100).toFixed(0)), progressRate: parseFloat((ele.progressRate * 100).toFixed(3)),
}; };
} }
}); });
@ -721,29 +661,29 @@ export default {
let nameList = []; let nameList = [];
let passRateList = []; let passRateList = [];
let outputNumList = []; 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);
// }
// }
});
// let arr = ['D64', 'D62', 'D61', 'D63', 'D65'] // let arr = ['D64', 'D62', 'D61', 'D63', 'D65']
for (let i = 0; i < this.SJGWsData.detData.length - 1; i++) { for (let i = 0; i < nameList.length - 1; i++) {
// //
for (let j = 0; j < this.SJGWsData.detData.length - i - 1; j++) { for (let j = 0; j < nameList.length - i - 1; j++) {
// //
if (this.SJGWsData.detData[j].lineName.substr(this.SJGWsData.detData[j].lineName.length - 1, 1) > this.SJGWsData.detData[j + 1].lineName.substr(this.SJGWsData.detData[j + 1].lineName.length - 1, 1)) { if (nameList[j].substr(nameList[j].length - 1, 1) > nameList[j + 1].substr(nameList[j + 1].length - 1, 1)) {
// //
let temp = this.SJGWsData.detData[j]; let temp = nameList[j];
this.SJGWsData.detData[j] = this.SJGWsData.detData[j + 1]; nameList[j] = nameList[j + 1];
this.SJGWsData.detData[j + 1] = temp; nameList[j + 1] = temp;
} }
} }
} }
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.$nextTick(() => { this.$nextTick(() => {
this.$refs.productLineChart.initChart( this.$refs.productLineChart.initChart(
nameList, nameList,
@ -802,51 +742,6 @@ export default {
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.myLegend {
position: absolute;
top: -28px;
right: 20px;
font-size: 12px;
color: rgba(255, 255, 255, .6);
.barLegend {
// float: left;
background: linear-gradient(#9DD5FF, #1295FF);
width: 10px;
height: 10px;
display: inline-block;
margin-right: 5px;
border-radius: 30%;
}
.barText {
// float: right;
display: inline-block;
margin-right: 10px;
}
.barCircleLegend {
width: 15px;
height: 1px;
background-color: rgba(255, 209, 96, 1);
position: absolute;
left: -4.1715px;
top: 21.7px;
}
.barCircle {
width: 6px;
height: 6px;
border-radius: 50%;
background-color: rgba(255, 209, 96, 1);
display: inline-block;
margin-right: 10px;
margin-bottom: 1.7px;
}
.barCircleText {
display: inline-block;
}
}
.visual-container { .visual-container {
width: 1920px; width: 1920px;
height: 1080px; height: 1080px;
@ -920,9 +815,8 @@ export default {
background-image: linear-gradient(to right, #4573fe, #47f8dc); background-image: linear-gradient(to right, #4573fe, #47f8dc);
} }
::v-deep .el-progress__text { ::v-deep .el-progress__text {
width: 50px;
margin-top: -70px; margin-top: -70px;
margin-left: 538px; margin-left: 490px;
// background-color: unset; // background-color: unset;
// background-image: linear-gradient(to right, #4573fe, #47f8dc); // background-image: linear-gradient(to right, #4573fe, #47f8dc);
} }

View File

@ -9,8 +9,7 @@
:table-props="tableProps" :table-props="tableProps"
:page="listQuery.pageNo" :page="listQuery.pageNo"
:limit="listQuery.pageSize" :limit="listQuery.pageSize"
:table-data="tableData" :table-data="tableData">
:max-height="tableH">
<method-btn <method-btn
v-if="tableBtn.length" v-if="tableBtn.length"
slot="handleBtn" slot="handleBtn"
@ -34,49 +33,38 @@ import {
getcoreAlarmLogPage getcoreAlarmLogPage
} from '@/api/base/coreAlarmLog'; } from '@/api/base/coreAlarmLog';
import {DICT_TYPE, getDictDatas, publicFormatter } from "@/utils/dict"; import {DICT_TYPE, getDictDatas, publicFormatter } from "@/utils/dict";
import tableHeightMixin from '@/mixins/lb/tableHeightMixin';
const tableProps = [ const tableProps = [
{ {
prop: 'alarmTime', prop: 'alarmTime',
label: '报警时间', label: '报警时间',
filter: parseTime, filter: parseTime
width: 150,
showOverflowtooltip: true
}, },
{ {
prop: 'alarmSource', prop: 'alarmSource',
label: '报警来源', label: '报警来源'
width: 200,
showOverflowtooltip: true
}, },
{ {
prop: 'alarmType', prop: 'alarmType',
label: '报警类型', label: '报警类型'
width: 180,
showOverflowtooltip: true
}, },
{ {
prop: 'alarmGrade', prop: 'alarmGrade',
label: '报警级别', label: '报警级别',
filter: publicFormatter(DICT_TYPE.EQU_ALARM_LEVEL), filter: publicFormatter(DICT_TYPE.EQU_ALARM_LEVEL)
width: 120,
showOverflowtooltip: true
}, },
{ {
prop: 'alarmReason', prop: 'alarmReason',
label: '报警原因', label: '报警原因'
showOverflowtooltip: true
}, },
{ {
prop: 'alarmContent', prop: 'alarmContent',
label: '报警详细', label: '报警详细'
showOverflowtooltip: true
} }
]; ];
export default { export default {
mixins: [basicPage, tableHeightMixin], mixins: [basicPage],
data() { data() {
return { return {
urlOptions: { urlOptions: {
@ -86,7 +74,7 @@ export default {
tableBtn: [].filter((v)=>v), tableBtn: [].filter((v)=>v),
tableData: [], tableData: [],
listQuery: { listQuery: {
pageSize: 20, pageSize: 10,
pageNo: 1, pageNo: 1,
total: 0, total: 0,
alarmSource: undefined, alarmSource: undefined,

View File

@ -2,7 +2,7 @@
* @Author: zwq * @Author: zwq
* @Date: 2021-11-18 14:16:25 * @Date: 2021-11-18 14:16:25
* @LastEditors: DY * @LastEditors: DY
* @LastEditTime: 2024-04-02 16:46:17 * @LastEditTime: 2024-03-20 16:20:39
* @Description: * @Description:
--> -->
<template> <template>
@ -96,7 +96,7 @@ export default {
dataRule: { dataRule: {
code: [{ required: true, message: "客户编号不能为空", trigger: "blur" }], code: [{ required: true, message: "客户编号不能为空", trigger: "blur" }],
name: [{ required: true, message: "客户名称不能为空", trigger: "blur" }], name: [{ required: true, message: "客户名称不能为空", trigger: "blur" }],
// contact: [{ required: true, message: "", trigger: "blur" }], contact: [{ required: true, message: "联系人不能为空", trigger: "blur" }],
telephone: [ telephone: [
{ required: false, trigger: "blur", message: "手机号不能为空" }, { required: false, trigger: "blur", message: "手机号不能为空" },
{ {

View File

@ -9,8 +9,7 @@
:table-props="tableProps" :table-props="tableProps"
:page="listQuery.pageNo" :page="listQuery.pageNo"
:limit="listQuery.pageSize" :limit="listQuery.pageSize"
:table-data="tableData" :table-data="tableData">
:max-height="tableH">
<method-btn <method-btn
v-if="tableBtn.length" v-if="tableBtn.length"
slot="handleBtn" slot="handleBtn"
@ -46,56 +45,41 @@ import {
getCustomerPage, getCustomerPage,
deleteCustomer deleteCustomer
} from '@/api/base/coreCustomer'; } from '@/api/base/coreCustomer';
import tableHeightMixin from '@/mixins/lb/tableHeightMixin';
const tableProps = [ const tableProps = [
{ {
prop: 'createTime', prop: 'createTime',
label: '添加时间', label: '添加时间',
filter: parseTime, filter: parseTime
width: 150,
showOverflowtooltip: true
}, },
{ {
prop: 'name', prop: 'name',
label: '客户名称', label: '客户名称'
width: 150,
showOverflowtooltip: true
}, },
{ {
prop: 'code', prop: 'code',
label: '客户编码', label: '客户编码'
width: 150,
showOverflowtooltip: true
}, },
{ {
prop: 'contact', prop: 'contact',
label: '联系人', label: '联系人'
width: 120,
showOverflowtooltip: true
}, },
{ {
prop: 'telephone', prop: 'telephone',
label: '联系电话', label: '联系电话'
width: 150,
showOverflowtooltip: true
}, },
{ {
prop: 'address', prop: 'address',
label: '地址', label: '地址'
width: 150,
showOverflowtooltip: true
}, },
{ {
prop: 'remark', prop: 'remark',
label: '备注', label: '备注'
minWidth: 150,
showOverflowtooltip: true
}, },
]; ];
export default { export default {
mixins: [basicPage, tableHeightMixin], mixins: [basicPage],
data() { data() {
return { return {
urlOptions: { urlOptions: {

View File

@ -9,8 +9,7 @@
:table-props="tableProps" :table-props="tableProps"
:page="listQuery.pageNo" :page="listQuery.pageNo"
:limit="listQuery.pageSize" :limit="listQuery.pageSize"
:table-data="tableData" :table-data="tableData">
:max-height="tableH">
<method-btn <method-btn
v-if="tableBtn.length" v-if="tableBtn.length"
slot="handleBtn" slot="handleBtn"
@ -46,7 +45,6 @@ import {
getCoreDepartmentPage, getCoreDepartmentPage,
deleteCoreDepartment deleteCoreDepartment
} from '@/api/base/coreDepartment'; } from '@/api/base/coreDepartment';
import tableHeightMixin from '@/mixins/lb/tableHeightMixin';
const tableProps = [ const tableProps = [
{ {
@ -73,7 +71,7 @@ const tableProps = [
]; ];
export default { export default {
mixins: [basicPage, tableHeightMixin], mixins: [basicPage],
data() { data() {
return { return {
urlOptions: { urlOptions: {

View File

@ -64,8 +64,8 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="进日期" prop="enterTime" :rules="[]"> <el-form-item label="进日期" prop="enterTime" :rules="[]">
<el-date-picker v-model="form.enterTime" :disabled="disabled" type="datetime" placeholder="请选择进日期" <el-date-picker v-model="form.enterTime" :disabled="disabled" type="datetime" placeholder="请选择进日期"
value-format="timestamp"></el-date-picker> value-format="timestamp"></el-date-picker>
</el-form-item> </el-form-item>
</el-col> </el-col>

View File

@ -12,8 +12,7 @@
:page="queryParams.pageNo" :page="queryParams.pageNo"
:limit="queryParams.pageSize" :limit="queryParams.pageSize"
:table-data="list" :table-data="list"
@emitFun="handleEmitFun" @emitFun="handleEmitFun">
:max-height="tableH">
<method-btn <method-btn
v-if="tableBtn.length" v-if="tableBtn.length"
slot="handleBtn" slot="handleBtn"
@ -79,7 +78,7 @@
queryParams: { queryParams: {
equipmentId: form.id, equipmentId: form.id,
pageNo: 1, pageNo: 1,
pageSize: 20, pageSize: 10,
}, },
tableBtn: [ tableBtn: [
this.$auth.hasPermi('base:core-equipment-attr:update') this.$auth.hasPermi('base:core-equipment-attr:update')
@ -119,7 +118,6 @@ import {
} from '@/api/base/equipment'; } from '@/api/base/equipment';
import Editor from '@/components/Editor'; import Editor from '@/components/Editor';
import AssetsUpload from './components/AssetsUpload.vue'; import AssetsUpload from './components/AssetsUpload.vue';
import tableHeightMixin from '@/mixins/lb/tableHeightMixin';
export default { export default {
name: 'Equipment', name: 'Equipment',
@ -127,7 +125,7 @@ export default {
Editor, Editor,
EquipmentDrawer, EquipmentDrawer,
}, },
mixins: [basicPageMixin, tableHeightMixin], mixins: [basicPageMixin],
data() { data() {
return { return {
searchBarKeys: ['name', 'code'], searchBarKeys: ['name', 'code'],
@ -159,8 +157,8 @@ export default {
width: 180, width: 180,
filter: (val) => moment(val).format('yyyy-MM-DD HH:mm:ss'), filter: (val) => moment(val).format('yyyy-MM-DD HH:mm:ss'),
}, },
{ prop: 'name', label: '设备名称', width: 180, showOverflowtooltip: true }, { prop: 'name', label: '设备名称' },
{ width: 250, prop: 'code', label: '设备编码' }, { width: 256, prop: 'code', label: '设备编码' },
{ prop: 'equipmentTypeName', label: '设备类型' }, { prop: 'equipmentTypeName', label: '设备类型' },
{ prop: 'enName', label: '英文名称' }, { prop: 'enName', label: '英文名称' },
{ prop: 'abbr', label: '缩写' }, { prop: 'abbr', label: '缩写' },
@ -486,7 +484,7 @@ export default {
// //
queryParams: { queryParams: {
pageNo: 1, pageNo: 1,
pageSize: 20, pageSize: 10,
code: '', code: '',
name: '', name: '',
special: false special: false

View File

@ -12,8 +12,7 @@
:page="queryParams.pageNo" :page="queryParams.pageNo"
:limit="queryParams.pageSize" :limit="queryParams.pageSize"
:table-data="list" :table-data="list"
@emitFun="handleEmitFun" @emitFun="handleEmitFun">
:max-height="tableH">
<method-btn <method-btn
v-if="tableBtn.length" v-if="tableBtn.length"
slot="handleBtn" slot="handleBtn"
@ -52,13 +51,13 @@
import moment from 'moment'; import moment from 'moment';
import basicPageMixin from '@/mixins/lb/basicPageMixin'; import basicPageMixin from '@/mixins/lb/basicPageMixin';
import DialogForm from './dialogForm.vue'; import DialogForm from './dialogForm.vue';
import tableHeightMixin from '@/mixins/lb/tableHeightMixin';
// import { getAccessToken } from '@/utils/auth'; // import { getAccessToken } from '@/utils/auth';
export default { export default {
name: 'EquipmentLineBind', name: 'EquipmentLineBind',
components: { DialogForm }, components: { DialogForm },
mixins: [basicPageMixin, tableHeightMixin], mixins: [basicPageMixin],
data() { data() {
return { return {
basePath: '/base/core-equipment-bind-section', basePath: '/base/core-equipment-bind-section',
@ -82,13 +81,12 @@ export default {
prop: 'createTime', prop: 'createTime',
label: '添加时间', label: '添加时间',
fixed: true, fixed: true,
width: 150, width: 180,
showOverflowtooltip: true,
filter: (val) => moment(val).format('yyyy-MM-DD HH:mm:ss'), filter: (val) => moment(val).format('yyyy-MM-DD HH:mm:ss'),
}, },
{ prop: 'productionLineName', label: '产线名称', width: 120, showOverflowtooltip: true }, { prop: 'productionLineName', label: '产线名称' },
{ prop: 'workshopSectionName', label: '工段名称', width: 120, showOverflowtooltip: true }, { prop: 'workshopSectionName', label: '工段名称' },
{ prop: 'equipmentName', label: '设备名称', width: 150, showOverflowtooltip: true }, { prop: 'equipmentName', label: '设备名称' },
{ prop: 'sort', label: '工段中排序' }, { prop: 'sort', label: '工段中排序' },
{ {
prop: 'lineDataType', prop: 'lineDataType',
@ -238,7 +236,7 @@ export default {
// //
queryParams: { queryParams: {
pageNo: 1, pageNo: 1,
pageSize: 20, pageSize: 10,
equipmentName: null, equipmentName: null,
productionLineId: null, productionLineId: null,
}, },

View File

@ -12,8 +12,7 @@
:page="queryParams.pageNo" :page="queryParams.pageNo"
:limit="queryParams.pageSize" :limit="queryParams.pageSize"
:table-data="list" :table-data="list"
@emitFun="handleEmitFun" @emitFun="handleEmitFun">
:max-height="tableH">
<method-btn <method-btn
v-if="tableBtn.length" v-if="tableBtn.length"
slot="handleBtn" slot="handleBtn"
@ -51,7 +50,6 @@
<script> <script>
import moment from 'moment'; import moment from 'moment';
import basicPageMixin from '@/mixins/lb/basicPageMixin'; import basicPageMixin from '@/mixins/lb/basicPageMixin';
import tableHeightMixin from '@/mixins/lb/tableHeightMixin';
import { import {
createEquipmentType, createEquipmentType,
@ -67,7 +65,7 @@ import {
export default { export default {
name: 'EquipmentType', name: 'EquipmentType',
components: {}, components: {},
mixins: [basicPageMixin, tableHeightMixin], mixins: [basicPageMixin],
data() { data() {
return { return {
searchBarKeys: ['name'], searchBarKeys: ['name'],
@ -173,7 +171,7 @@ export default {
// //
queryParams: { queryParams: {
pageNo: 1, pageNo: 1,
pageSize: 20, pageSize: 10,
name: '', name: '',
}, },
// //

View File

@ -9,8 +9,7 @@
:table-props="tableProps" :table-props="tableProps"
:page="listQuery.pageNo" :page="listQuery.pageNo"
:limit="listQuery.pageSize" :limit="listQuery.pageSize"
:table-data="tableData" :table-data="tableData">
:max-height="tableH">
<method-btn <method-btn
v-if="tableBtn.length" v-if="tableBtn.length"
slot="handleBtn" slot="handleBtn"
@ -44,51 +43,38 @@ import basicPage from '../../core/mixins/basic-page';
import { parseTime } from '../../core/mixins/code-filter'; import { parseTime } from '../../core/mixins/code-filter';
import { getHotMaterialPage, deleteHotMaterial } from '@/api/base/coreHotMaterial'; import { getHotMaterialPage, deleteHotMaterial } from '@/api/base/coreHotMaterial';
import { publicFormatter } from "@/utils/dict"; import { publicFormatter } from "@/utils/dict";
import tableHeightMixin from '@/mixins/lb/tableHeightMixin';
const tableProps = [ const tableProps = [
{ {
prop: 'createTime', prop: 'createTime',
label: '添加时间', label: '添加时间',
filter: parseTime, filter: parseTime
width: 180,
showOverflowtooltip: true
}, },
{ {
prop: 'name', prop: 'name',
label: '原料名称', label: '原料名称'
minWidth: 250,
showOverflowtooltip: true
}, },
{ {
prop: 'code', prop: 'code',
label: '原料编码', label: '原料编码'
width: 250,
showOverflowtooltip: true
}, },
{ {
prop: 'unit', prop: 'unit',
label: '单位', label: '单位',
filter: publicFormatter('unit_dict'), filter: publicFormatter('unit_dict')
width: 90,
showOverflowtooltip: true
}, },
{ {
prop: 'dailyCost', prop: 'dailyCost',
label: '每日消耗量', label: '每日消耗量'
width: 120,
showOverflowtooltip: true
}, },
{ {
prop: 'remark', prop: 'remark',
label: '备注', label: '备注'
width: 120,
showOverflowtooltip: true
}, },
]; ];
export default { export default {
mixins: [basicPage, tableHeightMixin], mixins: [basicPage],
data() { data() {
return { return {
urlOptions: { urlOptions: {

View File

@ -9,8 +9,7 @@
:table-props="tableProps" :table-props="tableProps"
:page="listQuery.pageNo" :page="listQuery.pageNo"
:limit="listQuery.pageSize" :limit="listQuery.pageSize"
:table-data="tableData" :table-data="tableData">
:max-height="tableH">
<method-btn <method-btn
v-if="tableBtn.length" v-if="tableBtn.length"
slot="handleBtn" slot="handleBtn"
@ -46,7 +45,6 @@ import {
getCoreMajorPage, getCoreMajorPage,
deleteCoreMajor deleteCoreMajor
} from '@/api/base/coreMajor'; } from '@/api/base/coreMajor';
import tableHeightMixin from '@/mixins/lb/tableHeightMixin';
const tableProps = [ const tableProps = [
{ {
@ -73,7 +71,7 @@ const tableProps = [
]; ];
export default { export default {
mixins: [basicPage, tableHeightMixin], mixins: [basicPage],
data() { data() {
return { return {
urlOptions: { urlOptions: {

View File

@ -2,17 +2,15 @@
* @Author: zwq * @Author: zwq
* @Date: 2021-11-18 14:16:25 * @Date: 2021-11-18 14:16:25
* @LastEditors: DY * @LastEditors: DY
* @LastEditTime: 2024-03-27 13:47:24 * @LastEditTime: 2024-03-13 13:54:01
* @Description: * @Description:
--> -->
<template> <template>
<el-drawer <el-drawer
:visible.sync="visible" :visible.sync="visible"
:show-close="false" :show-close="false"
:wrapper-closable="true" :wrapper-closable="isdetail"
class="drawer" class="drawer"
:before-close="beforeClose"
@closed="$emit('destroy')"
size="60%"> size="60%">
<small-title slot="title" :no-padding="true"> <small-title slot="title" :no-padding="true">
{{ isdetail ? '详情' : !dataForm.id ? '新增' : '编辑' }} {{ isdetail ? '详情' : !dataForm.id ? '新增' : '编辑' }}
@ -264,15 +262,6 @@ export default {
}, },
mounted() {}, mounted() {},
methods: { methods: {
beforeClose(done) {
if (!this.isdetail) {
this.$confirm('确认关闭?')
.then(_ => {
done();
})
.catch(_ => {});
}
},
clearArea() { clearArea() {
this.$set(this.dataForm, 'area', 0) this.$set(this.dataForm, 'area', 0)
this.$set(this.dataForm, 'weight', 0) this.$set(this.dataForm, 'weight', 0)

View File

@ -9,8 +9,7 @@
:table-props="tableProps" :table-props="tableProps"
:page="listQuery.pageNo" :page="listQuery.pageNo"
:limit="listQuery.pageSize" :limit="listQuery.pageSize"
:table-data="tableData" :table-data="tableData">
:max-height="tableH">
<method-btn <method-btn
v-if="tableBtn.length" v-if="tableBtn.length"
slot="handleBtn" slot="handleBtn"
@ -27,8 +26,7 @@
<add-or-update <add-or-update
v-if="addOrUpdateVisible" v-if="addOrUpdateVisible"
ref="addOrUpdate" ref="addOrUpdate"
@refreshDataList="getDataList" @refreshDataList="getDataList" />
@destroy="addOrUpdateVisible = false" />
</div> </div>
</template> </template>
@ -41,58 +39,43 @@ import {
getCoreProductPage, getCoreProductPage,
deleteCoreProduct deleteCoreProduct
} from '@/api/base/coreProduct'; } from '@/api/base/coreProduct';
import tableHeightMixin from '@/mixins/lb/tableHeightMixin';
const tableProps = [ const tableProps = [
{ {
prop: 'createTime', prop: 'createTime',
label: '添加时间', label: '添加时间',
filter: parseTime, filter: parseTime
width: 150,
showOverflowtooltip: true
}, },
{ {
prop: 'name', prop: 'name',
label: '产品名称', label: '产品名称'
width: 150,
showOverflowtooltip: true
}, },
{ {
prop: 'code', prop: 'code',
label: '产品编码', label: '产品编码'
width: 190,
showOverflowtooltip: true
}, },
{ {
prop: 'productType', prop: 'productType',
label: '产品类型', label: '产品类型',
filter: publicFormatter('product_type'), filter: publicFormatter('product_type')
width: 180,
showOverflowtooltip: true
}, },
{ {
prop: 'specifications', prop: 'specifications',
label: '规格', label: '规格'
width: 150,
showOverflowtooltip: true
}, },
{ {
prop: 'unit', prop: 'unit',
label: '单位', label: '单位',
filter: publicFormatter('unit_dict'), filter: publicFormatter('unit_dict')
width: 90,
showOverflowtooltip: true
}, },
{ {
prop: 'remark', prop: 'remark',
label: '备注', label: '备注',
width: 120,
showOverflowtooltip: true
}, },
]; ];
export default { export default {
mixins: [basicPage, tableHeightMixin], mixins: [basicPage],
data() { data() {
return { return {
urlOptions: { urlOptions: {

View File

@ -9,8 +9,7 @@
:table-props="tableProps" :table-props="tableProps"
:page="listQuery.pageNo" :page="listQuery.pageNo"
:limit="listQuery.pageSize" :limit="listQuery.pageSize"
:table-data="tableData" :table-data="tableData">
:max-height="tableH">
<method-btn <method-btn
v-if="tableBtn.length" v-if="tableBtn.length"
slot="handleBtn" slot="handleBtn"
@ -49,47 +48,34 @@ import {
import { getStatus } from '@/api/core/base/productionLine'; import { getStatus } from '@/api/core/base/productionLine';
import codeFilter from '../../core/mixins/code-filter'; import codeFilter from '../../core/mixins/code-filter';
import { publicFormatter } from '@/utils/dict'; import { publicFormatter } from '@/utils/dict';
import tableHeightMixin from '@/mixins/lb/tableHeightMixin';
const tableProps = [ const tableProps = [
{ {
prop: 'createTime', prop: 'createTime',
label: '添加时间', label: '添加时间',
filter: parseTime, filter: parseTime
width: 150,
showOverflowtooltip: true
}, },
{ {
prop: 'factoryName', prop: 'factoryName',
label: '工厂', label: '工厂'
width: 150,
showOverflowtooltip: true
}, },
{ {
prop: 'roomNameDict', prop: 'roomNameDict',
label: '车间名称', label: '车间名称',
filter: publicFormatter('workshop'), filter: publicFormatter('workshop')
width: 120,
showOverflowtooltip: true
}, },
{ {
prop: 'name', prop: 'name',
label: '产线名称', label: '产线名称'
width: 120,
showOverflowtooltip: true
}, },
{ {
prop: 'code', prop: 'code',
label: '产线编码', label: '产线编码'
width: 150,
showOverflowtooltip: true
}, },
{ {
prop: 'enabled', prop: 'enabled',
label: '当前状态', label: '当前状态',
filter: codeFilter('lineStatus'), filter: codeFilter('lineStatus')
width: 120,
showOverflowtooltip: true
}, },
// { // {
// prop: 'tvalue', // prop: 'tvalue',
@ -97,20 +83,16 @@ const tableProps = [
// }, // },
{ {
prop: 'description', prop: 'description',
label: '描述', label: '描述'
width: 120,
showOverflowtooltip: true
}, },
{ {
prop: 'remark', prop: 'remark',
label: '备注', label: '备注'
width: 120,
showOverflowtooltip: true
} }
]; ];
export default { export default {
mixins: [basicPage, tableHeightMixin], mixins: [basicPage],
data() { data() {
return { return {
urlOptions: { urlOptions: {

View File

@ -2,7 +2,7 @@
* @Author: zwq * @Author: zwq
* @Date: 2021-11-18 14:16:25 * @Date: 2021-11-18 14:16:25
* @LastEditors: DY * @LastEditors: DY
* @LastEditTime: 2024-04-02 16:46:49 * @LastEditTime: 2023-11-22 10:27:43
* @Description: * @Description:
--> -->
<template> <template>
@ -79,7 +79,7 @@ export default {
dataRule: { dataRule: {
code: [{ required: true, message: "供应商编号不能为空", trigger: "blur" }], code: [{ required: true, message: "供应商编号不能为空", trigger: "blur" }],
name: [{ required: true, message: "供应商名称不能为空", trigger: "blur" }], name: [{ required: true, message: "供应商名称不能为空", trigger: "blur" }],
// contact: [{ required: true, message: "", trigger: "blur" }], contact: [{ required: true, message: "联系人不能为空", trigger: "blur" }],
telephone: [ telephone: [
{ required: false, trigger: "blur", message: "手机号不能为空" }, { required: false, trigger: "blur", message: "手机号不能为空" },
{ {

View File

@ -9,8 +9,7 @@
:table-props="tableProps" :table-props="tableProps"
:page="listQuery.pageNo" :page="listQuery.pageNo"
:limit="listQuery.pageSize" :limit="listQuery.pageSize"
:table-data="tableData" :table-data="tableData">
:max-height="tableH">
<method-btn <method-btn
v-if="tableBtn.length" v-if="tableBtn.length"
slot="handleBtn" slot="handleBtn"
@ -46,56 +45,41 @@ import {
getCoreSupplierPage, getCoreSupplierPage,
deleteCoreSupplier deleteCoreSupplier
} from '@/api/base/coreSupplier'; } from '@/api/base/coreSupplier';
import tableHeightMixin from '@/mixins/lb/tableHeightMixin';
const tableProps = [ const tableProps = [
{ {
prop: 'createTime', prop: 'createTime',
label: '添加时间', label: '添加时间',
filter: parseTime, filter: parseTime
width: 150,
showOverflowtooltip: true
}, },
{ {
prop: 'code', prop: 'code',
label: '供应商编码', label: '供应商编码'
width: 150,
showOverflowtooltip: true
}, },
{ {
prop: 'name', prop: 'name',
label: '供应商名称', label: '供应商名称'
width: 180,
showOverflowtooltip: true
}, },
{ {
prop: 'contact', prop: 'contact',
label: '联系人', label: '联系人'
width: 180,
showOverflowtooltip: true
}, },
{ {
prop: 'telephone', prop: 'telephone',
label: '联系电话', label: '联系电话'
width: 150,
showOverflowtooltip: true
}, },
{ {
prop: 'address', prop: 'address',
label: '地址', label: '地址'
width: 180,
showOverflowtooltip: true
}, },
{ {
prop: 'remark', prop: 'remark',
label: '备注', label: '备注'
minWidth: 90,
showOverflowtooltip: true
}, },
]; ];
export default { export default {
mixins: [basicPage, tableHeightMixin], mixins: [basicPage],
data() { data() {
return { return {
urlOptions: { urlOptions: {

View File

@ -9,8 +9,7 @@
:table-props="tableProps" :table-props="tableProps"
:page="listQuery.pageNo" :page="listQuery.pageNo"
:limit="listQuery.pageSize" :limit="listQuery.pageSize"
:table-data="tableData" :table-data="tableData">
:max-height="tableH">
<method-btn <method-btn
v-if="tableBtn.length" v-if="tableBtn.length"
slot="handleBtn" slot="handleBtn"
@ -47,27 +46,20 @@ import {
deleteCoreWorker deleteCoreWorker
} from '@/api/base/coreWorker'; } from '@/api/base/coreWorker';
import moment from 'moment'; import moment from 'moment';
import tableHeightMixin from '@/mixins/lb/tableHeightMixin';
const tableProps = [ const tableProps = [
{ {
prop: 'createTime', prop: 'createTime',
label: '创建时间', label: '创建时间',
filter: parseTime, filter: parseTime
width: 150,
showOverflowtooltip: true
}, },
{ {
prop: 'name', prop: 'name',
label: '姓名', label: '姓名'
width: 120,
showOverflowtooltip: true
}, },
{ {
prop: 'code', prop: 'code',
label: '员工号', label: '员工号'
width: 150,
showOverflowtooltip: true
}, },
{ {
prop: 'sex', prop: 'sex',
@ -78,44 +70,32 @@ const tableProps = [
prop: 'entryTime', prop: 'entryTime',
label: '入职时间', label: '入职时间',
filter: (val) => val ? moment(val).format('yyyy-MM-DD') : '', filter: (val) => val ? moment(val).format('yyyy-MM-DD') : '',
width: 120,
showOverflowtooltip: true
}, },
{ {
prop: 'telephone', prop: 'telephone',
label: '联系电话', label: '联系电话'
width: 150,
showOverflowtooltip: true
}, },
{ {
prop: 'status', prop: 'status',
label: '状态', label: '状态',
filter: (val) => ['', '在职', '离职'][val], filter: (val) => ['', '在职', '离职'][val]
width: 120,
showOverflowtooltip: true
}, },
{ {
prop: 'departmentName', prop: 'departmentName',
label: '部门', label: '部门'
width: 120,
showOverflowtooltip: true
}, },
{ {
prop: 'majorName', prop: 'majorName',
label: '专业', label: '专业'
width: 150,
showOverflowtooltip: true
}, },
{ {
prop: 'remark', prop: 'remark',
label: '备注', label: '备注'
width: 150,
showOverflowtooltip: true
}, },
]; ];
export default { export default {
mixins: [basicPage, tableHeightMixin], mixins: [basicPage],
data() { data() {
return { return {
urlOptions: { urlOptions: {

View File

@ -9,8 +9,7 @@
:table-props="tableProps" :table-props="tableProps"
:page="listQuery.pageNo" :page="listQuery.pageNo"
:limit="listQuery.pageSize" :limit="listQuery.pageSize"
:table-data="tableData" :table-data="tableData">
:max-height="tableH">
<method-btn <method-btn
v-if="tableBtn.length" v-if="tableBtn.length"
slot="handleBtn" slot="handleBtn"
@ -46,14 +45,12 @@ import {
getCWSectionPage, getCWSectionPage,
deleteCWSection deleteCWSection
} from '@/api/base/coreWorkshopSection'; } from '@/api/base/coreWorkshopSection';
import tableHeightMixin from '@/mixins/lb/tableHeightMixin';
const tableProps = [ const tableProps = [
{ {
prop: 'createTime', prop: 'createTime',
label: '添加时间', label: '添加时间',
filter: parseTime, filter: parseTime
}, },
{ {
prop: 'code', prop: 'code',
@ -73,13 +70,12 @@ const tableProps = [
}, },
{ {
prop: 'remark', prop: 'remark',
label: '备注', label: '备注'
showOverflowtooltip: true
}, },
]; ];
export default { export default {
mixins: [basicPage, tableHeightMixin], mixins: [basicPage],
data() { data() {
return { return {
urlOptions: { urlOptions: {

View File

@ -9,8 +9,7 @@
:table-props="tableProps" :table-props="tableProps"
:page="listQuery.pageNo" :page="listQuery.pageNo"
:limit="listQuery.pageSize" :limit="listQuery.pageSize"
:table-data="tableData" :table-data="tableData">
:max-height="tableH">
<method-btn <method-btn
v-if="tableBtn.length" v-if="tableBtn.length"
slot="handleBtn" slot="handleBtn"
@ -41,7 +40,6 @@ import {
} from '@/api/base/material'; } from '@/api/base/material';
import { listData } from "@/api/system/dict/data"; import { listData } from "@/api/system/dict/data";
import { publicFormatter } from '@/utils/dict'; import { publicFormatter } from '@/utils/dict';
import tableHeightMixin from '@/mixins/lb/tableHeightMixin';
const tableProps = [ const tableProps = [
{ {
@ -77,7 +75,7 @@ const tableProps = [
]; ];
export default { export default {
mixins: [basicPage, tableHeightMixin], mixins: [basicPage],
data() { data() {
return { return {
urlOptions: { urlOptions: {

View File

@ -9,8 +9,7 @@
:table-props="tableProps" :table-props="tableProps"
:page="listQuery.pageNo" :page="listQuery.pageNo"
:limit="listQuery.pageSize" :limit="listQuery.pageSize"
:table-data="tableData" :table-data="tableData">
:max-height="tableH">
<method-btn <method-btn
v-if="tableBtn.length" v-if="tableBtn.length"
slot="handleBtn" slot="handleBtn"
@ -39,7 +38,6 @@ import {
getMaterialPBPage, getMaterialPBPage,
deleteMaterialPB deleteMaterialPB
} from '@/api/base/materialProductBom'; } from '@/api/base/materialProductBom';
import tableHeightMixin from '@/mixins/lb/tableHeightMixin';
const tableProps = [ const tableProps = [
{ {
@ -57,7 +55,7 @@ const tableProps = [
]; ];
export default { export default {
mixins: [basicPage, tableHeightMixin], mixins: [basicPage],
components: { components: {
AddOrUpdate, AddOrUpdate,
}, },

View File

@ -6,17 +6,34 @@
* @Description: * @Description:
--> -->
<template> <template>
<div class="app-container"> <div class="app-container">
<search-bar :formConfigs="formConfig" ref="searchBarForm" @headBtnClick="buttonClick" /> <search-bar
<base-table :max-height="tableH" :table-props="tableProps" :page="listQuery.pageNo" :limit="listQuery.pageSize" :formConfigs="formConfig"
:table-data="tableData"> ref="searchBarForm"
<method-btn v-if="tableBtn.length" slot="handleBtn" :width="120" label="操作" :method-list="tableBtn" @headBtnClick="buttonClick" />
@clickBtn="handleClick" /> <base-table
</base-table> :table-props="tableProps"
<pagination :limit.sync="listQuery.pageSize" :page.sync="listQuery.pageNo" :total="listQuery.total" :page="listQuery.pageNo"
@pagination="getDataList" /> :limit="listQuery.pageSize"
<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList" /> :table-data="tableData">
</div> <method-btn
v-if="tableBtn.length"
slot="handleBtn"
:width="120"
label="操作"
:method-list="tableBtn"
@clickBtn="handleClick" />
</base-table>
<pagination
:limit.sync="listQuery.pageSize"
:page.sync="listQuery.pageNo"
:total="listQuery.total"
@pagination="getDataList" />
<add-or-update
v-if="addOrUpdateVisible"
ref="addOrUpdate"
@refreshDataList="getDataList" />
</div>
</template> </template>
<script> <script>
@ -24,7 +41,6 @@ import AddOrUpdate from './add-or-updata';
// import unitDict from './unitDict'; // import unitDict from './unitDict';
import basicPage from '../mixins/basic-page'; import basicPage from '../mixins/basic-page';
import { parseTime } from '../mixins/code-filter'; import { parseTime } from '../mixins/code-filter';
import tableHeightMixin from '@/mixins/lb/tableHeightMixin';
import { import {
getPackingModel, getPackingModel,
} from '@/api/base/printModel.js' } from '@/api/base/printModel.js'
@ -75,7 +91,7 @@ const tableProps = [
]; ];
export default { export default {
mixins: [basicPage, tableHeightMixin], mixins: [basicPage],
data() { data() {
return { return {
urlOptions: { urlOptions: {
@ -298,7 +314,7 @@ export default {
switch (val.btnName) { switch (val.btnName) {
case 'search': case 'search':
this.listQuery.pageNo = 1; this.listQuery.pageNo = 1;
this.listQuery.pageSize = 20; this.listQuery.pageSize = 10;
this.listQuery.workOrderId = val.workOrderId; this.listQuery.workOrderId = val.workOrderId;
if (val.createTime && val.createTime.length != 0) { if (val.createTime && val.createTime.length != 0) {
this.listQuery.createTime = val.createTime this.listQuery.createTime = val.createTime
@ -313,7 +329,7 @@ export default {
case 'reset': case 'reset':
this.$refs.searchBarForm.resetForm(); this.$refs.searchBarForm.resetForm();
this.listQuery = { this.listQuery = {
pageSize: 20, pageSize: 10,
pageNo: 1, pageNo: 1,
total: 1, total: 1,
}; };

View File

@ -2,14 +2,13 @@
* @Author: zwq * @Author: zwq
* @Date: 2023-08-01 14:55:51 * @Date: 2023-08-01 14:55:51
* @LastEditors: zhp * @LastEditors: zhp
* @LastEditTime: 2024-04-03 15:08:38 * @LastEditTime: 2023-12-04 13:38:45
* @Description: * @Description:
--> -->
<template> <template>
<div class="app-container"> <div class="app-container">
<search-bar :formConfigs="formConfig" ref="searchBarForm" @headBtnClick="buttonClick" /> <search-bar :formConfigs="formConfig" ref="searchBarForm" @headBtnClick="buttonClick" />
<base-table :max-height="tableH" :table-props="tableProps" :page="listQuery.pageNo" :limit="listQuery.pageSize" <base-table :table-props="tableProps" :page="listQuery.pageNo" :limit="listQuery.pageSize" :table-data="tableData">
:table-data="tableData">
<method-btn v-if="tableBtn.length" slot="handleBtn" :width="120" label="操作" :method-list="tableBtn" <method-btn v-if="tableBtn.length" slot="handleBtn" :width="120" label="操作" :method-list="tableBtn"
@clickBtn="handleClick" /> @clickBtn="handleClick" />
</base-table> </base-table>
@ -26,9 +25,7 @@ import AddOrUpdate from './add-or-updata';
import basicPage from '../mixins/basic-page'; import basicPage from '../mixins/basic-page';
import { parseTime } from '../mixins/code-filter'; import { parseTime } from '../mixins/code-filter';
import printModelDesign from '../custom/index' import printModelDesign from '../custom/index'
import { updatePackingModel, } from '@/api/base/printModel.js'; import { updatePackingModel,} from '@/api/base/printModel.js';
import tableHeightMixin from '@/mixins/lb/tableHeightMixin';
import { import {
deletePackingModel, deletePackingModel,
getPackingModelPage, getPackingModelPage,
@ -62,7 +59,7 @@ const tableProps = [
]; ];
export default { export default {
mixins: [basicPage, tableHeightMixin], mixins: [basicPage],
data() { data() {
return { return {
urlOptions: { urlOptions: {
@ -165,7 +162,7 @@ export default {
switch (val.btnName) { switch (val.btnName) {
case 'search': case 'search':
this.listQuery.pageNo = 1; this.listQuery.pageNo = 1;
this.listQuery.pageSize = 20; this.listQuery.pageSize = 10;
this.listQuery.packagingCode = val.packagingCode; this.listQuery.packagingCode = val.packagingCode;
this.listQuery.createTime = val.createTime; this.listQuery.createTime = val.createTime;
this.getDataList(); this.getDataList();
@ -173,7 +170,7 @@ export default {
case 'reset': case 'reset':
this.$refs.searchBarForm.resetForm(); this.$refs.searchBarForm.resetForm();
this.listQuery = { this.listQuery = {
pageSize: 20, pageSize: 10,
pageNo: 1, pageNo: 1,
total: 1, total: 1,
}; };

View File

@ -2,21 +2,38 @@
* @Author: zwq * @Author: zwq
* @Date: 2023-08-01 14:55:51 * @Date: 2023-08-01 14:55:51
* @LastEditors: zhp * @LastEditors: zhp
* @LastEditTime: 2024-04-03 15:09:06 * @LastEditTime: 2023-12-04 13:44:01
* @Description: * @Description:
--> -->
<template> <template>
<div class="app-container"> <div class="app-container">
<search-bar :formConfigs="formConfig" ref="searchBarForm" @headBtnClick="buttonClick" /> <search-bar
<base-table :max-height="tableH" :table-props="tableProps" :page="listQuery.pageNo" :limit="listQuery.pageSize" :formConfigs="formConfig"
:table-data="tableData"> ref="searchBarForm"
<method-btn v-if="tableBtn.length" slot="handleBtn" :width="120" label="操作" :method-list="tableBtn" @headBtnClick="buttonClick" />
@clickBtn="handleClick" /> <base-table
</base-table> :table-props="tableProps"
<pagination :limit.sync="listQuery.pageSize" :page.sync="listQuery.pageNo" :total="listQuery.total" :page="listQuery.pageNo"
@pagination="getDataList" /> :limit="listQuery.pageSize"
<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList" /> :table-data="tableData">
</div> <method-btn
v-if="tableBtn.length"
slot="handleBtn"
:width="120"
label="操作"
:method-list="tableBtn"
@clickBtn="handleClick" />
</base-table>
<pagination
:limit.sync="listQuery.pageSize"
:page.sync="listQuery.pageNo"
:total="listQuery.total"
@pagination="getDataList" />
<add-or-update
v-if="addOrUpdateVisible"
ref="addOrUpdate"
@refreshDataList="getDataList" />
</div>
</template> </template>
<script> <script>
@ -24,7 +41,6 @@ import AddOrUpdate from './add-or-updata';
// import unitDict from './unitDict'; // import unitDict from './unitDict';
import basicPage from '../mixins/basic-page'; import basicPage from '../mixins/basic-page';
import { parseTime } from '../mixins/code-filter'; import { parseTime } from '../mixins/code-filter';
import tableHeightMixin from '@/mixins/lb/tableHeightMixin';
import { import {
deletePackingType, deletePackingType,
getPackingTypePage, getPackingTypePage,
@ -48,7 +64,7 @@ const tableProps = [
]; ];
export default { export default {
mixins: [basicPage, tableHeightMixin], mixins: [basicPage],
data() { data() {
return { return {
urlOptions: { urlOptions: {
@ -138,7 +154,7 @@ export default {
switch (val.btnName) { switch (val.btnName) {
case 'search': case 'search':
this.listQuery.pageNo = 1; this.listQuery.pageNo = 1;
this.listQuery.pageSize = 20; this.listQuery.pageSize = 10;
this.listQuery.packagingCode = val.packagingCode; this.listQuery.packagingCode = val.packagingCode;
this.listQuery.createTime = val.createTime; this.listQuery.createTime = val.createTime;
this.getDataList(); this.getDataList();
@ -146,7 +162,7 @@ export default {
case 'reset': case 'reset':
this.$refs.searchBarForm.resetForm(); this.$refs.searchBarForm.resetForm();
this.listQuery = { this.listQuery = {
pageSize: 20, pageSize: 10,
pageNo: 1, pageNo: 1,
total: 1, total: 1,
}; };

View File

@ -106,10 +106,6 @@ export default {
activeIndex(val) { activeIndex(val) {
this.initChart(val); this.initChart(val);
}, },
daterange(val) {
console.log('222', val)
this.templateOption.xAxis.data = val
},
}, },
methods: { methods: {
/** /**
@ -128,8 +124,8 @@ export default {
}, },
/** 初始化/设置 图表 */ /** 初始化/设置 图表 */
initChart(val) { initChart(val) {
console.log('tableData', this.tableData);
if (!this.chart) this.chart = echarts.init(this.$refs.chartDiv); if (!this.chart) this.chart = echarts.init(this.$refs.chartDiv);
this.chart.clear();
switch (val) { switch (val) {
case 0: case 0:
const eqCt = this.tableData.map((row) => ({ const eqCt = this.tableData.map((row) => ({
@ -143,7 +139,7 @@ export default {
...this.templateOption, ...this.templateOption,
yAxis: { ...this.templateOption.yAxis, name: '设备CT' }, yAxis: { ...this.templateOption.yAxis, name: '设备CT' },
series: eqCt, series: eqCt,
}, true); });
break; break;
case 1: case 1:
const eqTt = this.tableData.map((row) => ({ const eqTt = this.tableData.map((row) => ({
@ -157,7 +153,7 @@ export default {
...this.templateOption, ...this.templateOption,
yAxis: { ...this.templateOption.yAxis, name: '设备TT' }, yAxis: { ...this.templateOption.yAxis, name: '设备TT' },
series: eqTt, series: eqTt,
}, true); });
break; break;
case 2: case 2:
const plCt = this.tableData.map((row) => ({ const plCt = this.tableData.map((row) => ({
@ -171,7 +167,7 @@ export default {
...this.templateOption, ...this.templateOption,
yAxis: { ...this.templateOption.yAxis, name: '产线CT' }, yAxis: { ...this.templateOption.yAxis, name: '产线CT' },
series: plCt, series: plCt,
}, true); });
break; break;
case 3: case 3:
const plTt = this.tableData.map((row) => ({ const plTt = this.tableData.map((row) => ({
@ -185,10 +181,9 @@ export default {
...this.templateOption, ...this.templateOption,
yAxis: { ...this.templateOption.yAxis, name: '产线TT' }, yAxis: { ...this.templateOption.yAxis, name: '产线TT' },
series: plTt, series: plTt,
}, true); });
break; break;
default: default:
this.activeIndex = 0
const eqCt2 = this.tableData.map((row) => ({ const eqCt2 = this.tableData.map((row) => ({
name: row.equName, name: row.equName,
type: 'line', type: 'line',
@ -200,7 +195,7 @@ export default {
...this.templateOption, ...this.templateOption,
yAxis: { ...this.templateOption.yAxis, name: '设备CT' }, yAxis: { ...this.templateOption.yAxis, name: '设备CT' },
series: eqCt2, series: eqCt2,
}, true); });
} }
}, },
}, },

View File

@ -18,15 +18,13 @@
:page="1" :page="1"
:limit="999" :limit="999"
:table-props="tableProps" :table-props="tableProps"
:table-data="tableData" :table-data="tableData" />
:max-height="tableH" />
<div v-if="tableData.length == 0" class="no-data-bg"></div> <div v-if="tableData.length == 0" class="no-data-bg"></div>
</el-tab-pane> </el-tab-pane>
<el-tab-pane :label="'\u3000产线平衡分析图\u3000'" name="graph"> <el-tab-pane :label="'\u3000产线平衡分析图\u3000'" name="graph">
<div class="graph" style="height: 800px"> <div class="graph" style="height: 800px">
<!-- graph --> <!-- graph -->
<AnalysisChart <AnalysisChart
ref="analysisChart"
v-if="activeName == 'graph'" v-if="activeName == 'graph'"
:table-data="tableData" :table-data="tableData"
:daterange="dateArr"></AnalysisChart> :daterange="dateArr"></AnalysisChart>
@ -49,14 +47,13 @@ import BalanceChart from '../balanceChart';
import basicPageMixin from '@/mixins/lb/basicPageMixin'; import basicPageMixin from '@/mixins/lb/basicPageMixin';
import AnalysisChart from './chart.vue'; import AnalysisChart from './chart.vue';
import { parseTime } from '@/utils/ruoyi' import { parseTime } from '@/utils/ruoyi'
import tableHeightMixin from '@/mixins/lb/tableHeightMixin';
export default { export default {
components: { components: {
BalanceChart, BalanceChart,
AnalysisChart, AnalysisChart,
}, },
mixins: [basicPageMixin, tableHeightMixin], mixins: [basicPageMixin],
data() { data() {
return { return {
activeName: 'table', activeName: 'table',
@ -179,11 +176,6 @@ export default {
// const p = this.tableProps // const p = this.tableProps
// const d = this.tableData // const d = this.tableData
// debugger; // debugger;
if (this.activeName == 'graph') {
this.$nextTick(() => {
this.$refs['analysisChart'].initChart()
})
}
this.ready = true; this.ready = true;
}, },

View File

@ -9,8 +9,7 @@
:table-props="tableProps" :table-props="tableProps"
:page="listQuery.pageNo" :page="listQuery.pageNo"
:limit="listQuery.pageSize" :limit="listQuery.pageSize"
:table-data="tableData" :table-data="tableData">
:max-height="tableH">
<method-btn <method-btn
v-if="tableBtn.length" v-if="tableBtn.length"
slot="handleBtn" slot="handleBtn"
@ -42,7 +41,6 @@
import AddOrUpdate from './add-or-updata'; import AddOrUpdate from './add-or-updata';
import basicPage from '../../mixins/basic-page'; import basicPage from '../../mixins/basic-page';
import { parseTime } from '../../mixins/code-filter'; import { parseTime } from '../../mixins/code-filter';
import tableHeightMixin from '@/mixins/lb/tableHeightMixin';
import { import {
deleteFactory, deleteFactory,
getFactoryPage getFactoryPage
@ -73,7 +71,7 @@ const tableProps = [
]; ];
export default { export default {
mixins: [basicPage, tableHeightMixin], mixins: [basicPage],
data() { data() {
return { return {
urlOptions: { urlOptions: {

View File

@ -17,7 +17,7 @@ export default {
}, },
tableData: [], tableData: [],
listQuery: { listQuery: {
pageSize: 20, pageSize: 10,
pageNo: 1, pageNo: 1,
total: 1, total: 1,
}, },

View File

@ -27,16 +27,13 @@
import { getPdlDataOneDay } from '@/api/core/monitoring/data24' import { getPdlDataOneDay } from '@/api/core/monitoring/data24'
import { parseTime } from '../../mixins/code-filter'; import { parseTime } from '../../mixins/code-filter';
import { getSchedulingMonitoringRecord1 } from '@/api/monitoring/teamProduction' import { getSchedulingMonitoringRecord1 } from '@/api/monitoring/teamProduction'
import tableHeightMixin from '@/mixins/lb/tableHeightMixin';
export default { export default {
name: 'productionLineData24', name: 'productionLineData24',
mixins: [tableHeightMixin],
components: {}, components: {},
props: {}, props: {},
data() { data() {
return { return {
heightNum: 240,
urlOptions: { urlOptions: {
getDataListURL: getPdlDataOneDay getDataListURL: getPdlDataOneDay
}, },
@ -59,9 +56,9 @@ export default {
}, },
computed: {}, computed: {},
mounted() { mounted() {
// window.addEventListener('resize', () => { window.addEventListener('resize', () => {
// this.tableH = this.tableHeight(240) this.tableH = this.tableHeight(240)
// }) })
this.getList(); this.getList();
}, },
methods: { methods: {
@ -118,7 +115,7 @@ export default {
/** 把 list 里的数据转换成 tableProps 对应的格式 */ /** 把 list 里的数据转换成 tableProps 对应的格式 */
convertList(list) { convertList(list) {
// let sectionArr= [] // let sectionArr= []
let temp = list.datamap ? Object.values(list?.datamap) : [] let temp = Object.values(list.datamap)
console.log('111', temp) console.log('111', temp)
temp.forEach(item => { temp.forEach(item => {

View File

@ -1,139 +0,0 @@
<template>
<div class="energyQuantityManualAddTable">
<el-table
:data="renderData"
border
style="width: 100%"
:header-cell-style="{
background: '#F2F4F9',
color: '#606266',
}">
<el-table-column
prop="tableName"
label="表名*">
<template slot-scope="scope">
<div class="tableInner">
<el-select
v-model="scope.row.tableName"
placeholder="请选择"
style="width: 100%"
@change="changeSelect(scope.row, 'tableName')">
<el-option
v-for="item in tableNameList"
:key="item.id"
:label="item.label"
:value="item.id"></el-option>
</el-select>
</div>
</template>
</el-table-column>
<el-table-column
prop="readingQuantity"
label="抄表数*">
<template slot-scope="scope">
<div class="tableInner">
<el-input-number
v-model="scope.row.readingQuantity"
:min="0"
:max="999999999"
style="width: 100%"
:controls="false"
@change="changeInput(scope.row, 'readingQuantity')"
:precision="2"></el-input-number>
</div>
</template>
</el-table-column>
</el-table>
<el-button
class="addButton"
icon="el-icon-plus"
@click="emitButtonClick">
新增
</el-button>
</div>
</template>
<script>
export default {
name: 'AddTable',
props: {
tableData: {
type: Array,
required: true,
default: () => {
return [];
},
},
tableNameList: {
type: Array,
required: true,
default: () => {
return [];
},
},
},
data() {
return {};
},
computed: {
renderData() {
return this.tableData.map((item, index) => {
return {
...item,
_pageIndex: index + 1,
};
});
},
},
methods: {
emitButtonClick() {
this.$emit('emitButtonClick');
},
changeInput(val1, val2) {
val1.prop = val2;
this.$emit('emitFun', val1);
},
changeSelect(val1, val2) {
val1.prop = val2;
this.$emit('emitFun', val1);
},
},
};
</script>
<style lang='scss' scoped>
.energyQuantityManualAddTable {
.el-table .el-table__cell {
padding: 0;
height: 35px;
}
.addButton {
width: 100%;
height: 35px;
border-top: none;
color: #0b58ff;
border-color: #ebeef5;
border-radius: 0;
}
.addButton:hover {
color: #0b58ff;
border-color: #ebeef5;
background-color: #fff;
}
.addButton:focus {
border-color: #ebeef5;
background-color: #fff;
}
.tableInner .el-input__inner {
border: none;
padding: 0;
height: 33px;
}
}
</style>
<style lang='scss'>
.energyQuantityManualAddTable {
.el-table .el-table__cell {
padding: 0;
height: 35px;
}
}
</style>

View File

@ -1,228 +1,167 @@
<template> <template>
<el-form <el-form ref="energyQuantityManualForm" :rules="rules" label-width="90px" :model="form">
ref="energyQuantityManualForm" <el-row :gutter="20">
:rules="rules" <el-col :span='12'>
label-width="90px" <el-form-item label="能源类型" prop="energyTypeId">
:model="form"> <el-select v-model="form.energyTypeId" placeholder="请选择" style="width: 100%;" filterable>
<el-row :gutter="20"> <el-option v-for="item in this.energyTypeList" :key="item.id" :label="item.name" :value="item.id">
<el-col :span="12"> </el-option>
<el-form-item </el-select>
label="能源类型" </el-form-item>
prop="energyTypeId"> </el-col>
<el-select <el-col :span='12'>
v-model="form.energyTypeId" <el-form-item label="抄表日期" prop="recordTime">
placeholder="请选择" <el-date-picker v-model="form.recordTime" type="date" format="yyyy-MM-dd" value-format="timestamp"
style="width: 100%" placeholder="选择日期" style="width: 100%;">
@change="selEnergyType" </el-date-picker>
filterable> </el-form-item>
<el-option </el-col>
v-for="item in this.energyTypeList" </el-row>
:key="item.id" <el-row :gutter="20">
:label="item.labelName" <el-col :span='24'>
:value="item.id"></el-option> <base-table border :table-props="tableProps" :table-data="tableData" :add-button-show="addButtonShow"
</el-select> @emitFun="inputChange" @emitButtonClick="emitButtonClick" />
</el-form-item> </el-col>
</el-col> </el-row>
<el-col :span="12"> </el-form>
<el-form-item
label="抄表日期"
prop="recordTime">
<el-date-picker
v-model="form.recordTime"
type="date"
format="yyyy-MM-dd"
value-format="timestamp"
placeholder="选择日期"
style="width: 100%"></el-date-picker>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="24">
<add-table
:table-props="tableProps"
:table-data="tableData"
:table-name-list="tableNameList"
@emitFun="inputChange"
@emitButtonClick="emitButtonClick" />
<!-- <base-table
border
:table-props="tableProps"
:table-data="tableData"
:add-button-show="addButtonShow"
@emitFun="inputChange"
@emitButtonClick="emitButtonClick" /> -->
</el-col>
</el-row>
</el-form>
</template> </template>
<script> <script>
import { import { energyQuantityManualCreate, energyQuantityManualUpdate, energyQuantityManualGet } from '@/api/base/energyQuantityManual'
energyQuantityManualCreate, import moment from 'moment'
energyQuantityManualUpdate, import InputArea from './InputArea'
energyQuantityManualGet, import SelectArea from './SelectArea'
} from '@/api/base/energyQuantityManual';
import moment from 'moment';
import AddTable from './AddTable';
import InputArea from './InputArea';
import SelectArea from './SelectArea';
import { energyTableGet } from '@/api/base/energyQuantityManual';
const tableProps = [ const tableProps = [
{ {
prop: 'tableName', prop: 'tableName',
label: '表名*', label: '表名*',
subcomponent: SelectArea, subcomponent: SelectArea
}, },
{ {
prop: 'readingQuantity', prop: 'readingQuantity',
label: '抄表数*', label: '抄表数*',
subcomponent: InputArea, subcomponent: InputArea
}, }
]; ]
export default { export default {
name: 'EnergyQuantityManualAdd', name: 'EnergyQuantityManualAdd',
props: { props: {
energyTypeList: { energyTypeList: {
type: Array, type: Array,
required: true, required: true,
default: () => { default: () => {
return []; return []
}, }
}, }
}, },
data() { data() {
return { return {
tableProps, tableProps,
tableData: [], tableData: [],
tableNameList: [], //list addButtonShow: '新增',
addButtonShow: '新增', form: {
form: { id: '',
id: '', energyTypeId: '',
energyTypeId: '', unit: '',
unit: '', recordTime: ''
recordTime: '', },
}, rules: {
rules: { energyTypeId: [{ required: true, message: '能源类型不能为空', trigger: 'change' }],
energyTypeId: [ recordTime: [{ required: true, message: '抄表日期不能为空', trigger: 'change' }]
{ required: true, message: '能源类型不能为空', trigger: 'change' }, },
], isEdit: false
recordTime: [ }
{ required: true, message: '抄表日期不能为空', trigger: 'change' }, },
], methods: {
}, init(params) {
isEdit: false, this.form.recordTime = moment().valueOf()
}; if (params.type === 'add') {
}, this.isEdit = false
components: { AddTable }, } else if (params.type === 'meterReading') {
methods: { this.isEdit = false
init(params) { this.form.energyTypeId = params.energyTypeId
this.form.recordTime = moment().valueOf(); let obj = {}
if (params.type === 'add') { obj.tableName = params.tableName + ''
this.isEdit = false; obj.readingQuantity = 0
} else if (params.type === 'meterReading') { this.tableData.push(obj)
this.isEdit = false; } else {
this.form.energyTypeId = params.energyTypeId; this.isEdit = true
let obj = {}; this.form.id = params.id
obj.tableName = params.tableName + ''; this.addButtonShow = ''
obj.readingQuantity = 0; energyQuantityManualGet({ id: this.form.id }).then(res => {
this.tableData.push(obj); if (res.code === 0) {
} else { this.form.energyTypeId = res.data.energyTypeId
this.isEdit = true; this.form.recordTime = res.data.recordTime ? res.data.recordTime : null
this.form.id = params.id; let obj = {}
this.addButtonShow = ''; obj.tableName = res.data.tableName ? res.data.tableName + '' : ''
energyQuantityManualGet({ id: this.form.id }).then((res) => { obj.readingQuantity = res.data.readingQuantity
if (res.code === 0) { this.tableData.push(obj)
this.form.energyTypeId = res.data.energyTypeId; }
this.form.recordTime = res.data.recordTime })
? res.data.recordTime }
: null; },
let obj = {}; inputChange(val) {
obj.tableName = res.data.tableName ? res.data.tableName + '' : ''; this.tableData[val._pageIndex - 1][val.prop] = val[val.prop]
obj.readingQuantity = res.data.readingQuantity; },
this.tableData.push(obj); emitButtonClick() {
} let obj = {}
}); obj.tableName = ''
} obj.readingQuantity = 0
}, this.tableData.push(obj)
inputChange(val) { },
this.tableData[val._pageIndex - 1][val.prop] = val[val.prop]; submitForm() {
console.log(this.tableData); this.$refs['energyQuantityManualForm'].validate((valid) => {
}, if (valid) {
emitButtonClick() { //
if (!this.form.energyTypeId) { if (this.tableData.length === 0) {
this.$modal.msgWarning('请先选择能源类型'); this.$modal.msgError("抄表数据不能为空");
return false; return false
} } else {
let obj = {}; for (let item of this.tableData) {
obj.tableName = ''; console.log(item)
obj.readingQuantity = 0; if (!item.tableName || (!item.readingQuantity && item.readingQuantity !== 0)) {
this.tableData.push(obj); this.$modal.msgError("抄表数据有空值,请检查");
}, return false
selEnergyType(id) { }
// }
this.tableData = []; }
this.tableNameList = []; if (this.isEdit) {
energyTableGet({ energyTypeId: id }).then((res) => { //
this.tableNameList = res.data.tableObjs || []; energyQuantityManualUpdate({
}); id: this.form.id,
}, energyTypeId: this.form.energyTypeId,
submitForm() { recordTime: this.form.recordTime,
this.$refs['energyQuantityManualForm'].validate((valid) => { tableName: this.tableData[0].tableName,
if (valid) { readingQuantity: this.tableData[0].readingQuantity
// }).then((res) => {
if (this.tableData.length === 0) { if (res.code === 0) {
this.$modal.msgError('抄表数据不能为空'); this.$modal.msgSuccess("操作成功");
return false; this.$emit('successSubmit')
} else { }
for (let item of this.tableData) { })
console.log(item); } else {
if ( energyQuantityManualCreate({
!item.tableName || energyTypeId: this.form.energyTypeId,
(!item.readingQuantity && item.readingQuantity !== 0) recordTime: this.form.recordTime,
) { data: this.tableData
this.$modal.msgError('抄表数据有空值,请检查'); }).then((res) => {
return false; if (res.code === 0) {
} this.$modal.msgSuccess("操作成功");
} this.$emit('successSubmit')
} }
if (this.isEdit) { })
// }
energyQuantityManualUpdate({ } else {
id: this.form.id, return false
energyTypeId: this.form.energyTypeId, }
recordTime: this.form.recordTime, })
tableName: this.tableData[0].tableName, },
readingQuantity: this.tableData[0].readingQuantity, formClear() {
}).then((res) => { this.$refs.energyQuantityManualForm.resetFields()
if (res.code === 0) { this.form.unit = ''
this.$modal.msgSuccess('操作成功'); this.isEdit = false
this.$emit('successSubmit'); this.addButtonShow = '新增'
} this.tableData = []
}); }
} else { }
energyQuantityManualCreate({ }
energyTypeId: this.form.energyTypeId,
recordTime: this.form.recordTime,
data: this.tableData,
}).then((res) => {
if (res.code === 0) {
this.$modal.msgSuccess('操作成功');
this.$emit('successSubmit');
}
});
}
} else {
return false;
}
});
},
formClear() {
this.$refs.energyQuantityManualForm.resetFields();
this.form.unit = '';
this.isEdit = false;
this.addButtonShow = '新增';
this.tableData = [];
},
},
};
</script> </script>

View File

@ -49,7 +49,9 @@ import {
} from '@/api/base/energyQuantityManual'; } from '@/api/base/energyQuantityManual';
import { getEnergyTypeListAll } from '@/api/base/energyType'; import { getEnergyTypeListAll } from '@/api/base/energyType';
import { publicFormatter } from '@/utils/dict'; import { publicFormatter } from '@/utils/dict';
import { parseTimeTable } from '@/utils/ruoyi'; import { parseTime, parseTimeTable } from '@/utils/ruoyi';
// import FileSaver from "file-saver"
// import * as XLSX from 'xlsx/xlsx.mjs'
import EnergyQuantityManualAdd from './components/energyQuantityManualAdd'; import EnergyQuantityManualAdd from './components/energyQuantityManualAdd';
import moment from 'moment'; import moment from 'moment';
const tableProps = [ const tableProps = [

View File

@ -47,11 +47,7 @@ export default {
energyTableGet({ energyTypeId: id }).then((res) => { energyTableGet({ energyTypeId: id }).then((res) => {
this.form.energyType = res.data.energyType || ''; this.form.energyType = res.data.energyType || '';
this.form.energyTypeId = res.data.energyTypeId || ''; this.form.energyTypeId = res.data.energyTypeId || '';
this.form.tableIds = this.form.tableIds = res.data.tableIds || [];
res.data.tableObjs &&
res.data.tableObjs.map((item) => {
return item.id;
});
}); });
}, },
submitForm() { submitForm() {

View File

@ -9,8 +9,7 @@
:table-props="tableProps" :table-props="tableProps"
:page="listQuery.pageNo" :page="listQuery.pageNo"
:limit="listQuery.pageSize" :limit="listQuery.pageSize"
:table-data="tableData" :table-data="tableData">
:max-height="tableH">
<method-btn <method-btn
v-if="tableBtn.length" v-if="tableBtn.length"
slot="handleBtn" slot="handleBtn"
@ -34,7 +33,6 @@ import {
getEqAnalysis, getEqAnalysis,
exportEqAnalysisExcel, exportEqAnalysisExcel,
} from '@/api/equipment/analysis/statistics'; } from '@/api/equipment/analysis/statistics';
import tableHeightMixin from '@/mixins/lb/tableHeightMixin';
const tableProps = [ const tableProps = [
// { // {
@ -54,49 +52,35 @@ const tableProps = [
{ {
prop: 'lineName', prop: 'lineName',
label: '产线', label: '产线',
width: 150,
showOverflowtooltip: true
}, },
{ {
prop: 'sectionName', prop: 'sectionName',
label: '工段', label: '工段',
width: 150,
showOverflowtooltip: true
}, },
{ {
prop: 'equipmentName', prop: 'equipmentName',
label: '设备名称', label: '设备名称',
minWidth: 150,
showOverflowtooltip: true
}, },
{ {
prop: 'equipmentType', prop: 'equipmentType',
label: '设备类型', label: '设备类型',
width: 150,
showOverflowtooltip: true
}, },
{ {
prop: 'workTime', prop: 'workTime',
label: '工作时间累积(h)', label: '工作时间累积(h)',
width: 160,
showOverflowtooltip: true
}, },
{ {
prop: 'repairCount', prop: 'repairCount',
label: '维修次数', label: '维修次数',
width: 120,
showOverflowtooltip: true
}, },
{ {
prop: 'maintainCount', prop: 'maintainCount',
label: '保养次数', label: '保养次数',
width: 120,
showOverflowtooltip: true
}, },
]; ];
export default { export default {
mixins: [basicPage, tableHeightMixin], mixins: [basicPage],
data() { data() {
const today = new Date(); const today = new Date();
@ -126,7 +110,7 @@ export default {
tableBtn: [].filter((v) => v), tableBtn: [].filter((v) => v),
tableData: [], tableData: [],
listQuery: { listQuery: {
pageSize: 20, pageSize: 10,
pageNo: 1, pageNo: 1,
total: 1, total: 1,
recordTime: [ recordTime: [

View File

@ -75,12 +75,6 @@ export default {
}, },
tooltip: { tooltip: {
trigger: 'item', trigger: 'item',
formatter: (v) => {
const num = String(v.value)?.split('.').length === 2 ? v.value?.toFixed(2) : v.value
return `<div>
<span>${v.name}: ${num}</span>
</div>`
}
}, },
legend: { legend: {
show: false, show: false,

View File

@ -19,7 +19,7 @@
:page="queryParams.pageNo" :page="queryParams.pageNo"
:limit="queryParams.pageSize" :limit="queryParams.pageSize"
:table-data="list" :table-data="list"
:max-height="tableH" max-height="600"
@emitFun="handleEmitFun"> @emitFun="handleEmitFun">
<!-- <method-btn <!-- <method-btn
v-if="tableBtn.length" v-if="tableBtn.length"
@ -42,16 +42,14 @@
<script> <script>
import moment from 'moment'; import moment from 'moment';
import basicPageMixin from '@/mixins/lb/basicPageMixin'; import basicPageMixin from '@/mixins/lb/basicPageMixin';
import tableHeightMixin from '@/mixins/lb/tableHeightMixin';
export default { export default {
name: 'ExceptionAnalysis', name: 'ExceptionAnalysis',
mixins: [basicPageMixin, tableHeightMixin], mixins: [basicPageMixin],
components: {}, components: {},
props: {}, props: {},
data() { data() {
return { return {
heightNum: 220,
searchBarKeys: ['name', 'code'], searchBarKeys: ['name', 'code'],
// tableBtn: [ // tableBtn: [
// this.$auth.hasPermi('base:equipment-group:update') // this.$auth.hasPermi('base:equipment-group:update')

View File

@ -48,11 +48,9 @@
<script> <script>
import moment from 'moment'; import moment from 'moment';
import LineChart from './components/lineChart.vue'; import LineChart from './components/lineChart.vue';
import tableHeightMixin from '@/mixins/lb/tableHeightMixin';
export default { export default {
name: 'QualityAnalysis', name: 'QualityAnalysis',
mixins: [tableHeightMixin],
components: { LineChart }, components: { LineChart },
props: {}, props: {},
data() { data() {
@ -60,6 +58,7 @@ export default {
const [y, m, d] = [now.getFullYear(), now.getMonth(), now.getDate()]; const [y, m, d] = [now.getFullYear(), now.getMonth(), now.getDate()];
return { return {
dialogVisible: false, dialogVisible: false,
tableH: this.tableHeight(260),
urls: { urls: {
page: '/analysis/equipment-analysis/quality', page: '/analysis/equipment-analysis/quality',
}, },
@ -255,9 +254,9 @@ export default {
this.fillProductOptions(); this.fillProductOptions();
}, },
mounted() { mounted() {
// window.addEventListener('resize', () => { window.addEventListener('resize', () => {
// this.tableH = this.tableHeight(260) this.tableH = this.tableHeight(260)
// }) })
this.$refs['search-bar'].headBtnClick('search'); this.$refs['search-bar'].headBtnClick('search');
}, },
methods: { methods: {

View File

@ -12,8 +12,7 @@
:page="queryParams.pageNo" :page="queryParams.pageNo"
:limit="queryParams.pageSize" :limit="queryParams.pageSize"
:table-data="list" :table-data="list"
@emitFun="handleEmitFun" @emitFun="handleEmitFun">
:max-height="tableH">
<method-btn <method-btn
v-if="tableBtn.length" v-if="tableBtn.length"
slot="handleBtn" slot="handleBtn"
@ -62,8 +61,6 @@ import basicPageMixin from '@/mixins/lb/basicPageMixin';
import { publicFormatter } from '@/utils/dict'; import { publicFormatter } from '@/utils/dict';
import AddOrUpdate from './AddOrUpdate.vue'; import AddOrUpdate from './AddOrUpdate.vue';
import moment from 'moment'; import moment from 'moment';
import tableHeightMixin from '@/mixins/lb/tableHeightMixin';
const timeFilter = (val) => moment(val).format('yyyy-MM-DD HH:mm:ss'); const timeFilter = (val) => moment(val).format('yyyy-MM-DD HH:mm:ss');
const btn = { const btn = {
@ -92,7 +89,7 @@ const btn = {
export default { export default {
name: 'Record', name: 'Record',
components: { AddOrUpdate }, components: { AddOrUpdate },
mixins: [basicPageMixin, tableHeightMixin], mixins: [basicPageMixin],
data() { data() {
return { return {
readOnly: false, readOnly: false,
@ -119,17 +116,17 @@ export default {
// : undefined, // : undefined,
].filter((v) => v), ].filter((v) => v),
tableProps: [ tableProps: [
{ prop: 'productionLine', label: '产线', width: 120, showOverflowtooltip: true }, { prop: 'productionLine', label: '产线' },
{ prop: 'workshopSection', label: '工段', width: 120, showOverflowtooltip: true }, { prop: 'workshopSection', label: '工段' },
{ prop: 'equipment', label: '设备名称', width: 120, showOverflowtooltip: true }, { prop: 'equipment', label: '设备名称' },
{ {
prop: 'alarmGrade', prop: 'alarmGrade',
label: '报警级别', label: '报警级别',
filter: publicFormatter(this.DICT_TYPE.EQU_ALARM_LEVEL), filter: publicFormatter(this.DICT_TYPE.EQU_ALARM_LEVEL),
}, },
{ prop: 'createTime', label: '报警时间', filter: timeFilter, width: 150, showOverflowtooltip: true }, { prop: 'createTime', label: '报警时间', filter: timeFilter },
{ prop: 'alarmCode', label: '设备报警码', width: 180, showOverflowtooltip: true }, { prop: 'alarmCode', label: '设备报警码' },
{ prop: 'alarmContent', label: '报警内容', width: 150, showOverflowtooltip: true }, { prop: 'alarmContent', label: '报警内容' },
{ prop: 'opt1', label: '处理记录', name: '查看', subcomponent: btn }, { prop: 'opt1', label: '处理记录', name: '查看', subcomponent: btn },
{ prop: 'opt2', label: '处理', name: '报警处理', subcomponent: btn }, { prop: 'opt2', label: '处理', name: '报警处理', subcomponent: btn },
// { prop: 'remark', label: '' }, // { prop: 'remark', label: '' },
@ -206,7 +203,7 @@ export default {
// //
queryParams: { queryParams: {
pageNo: 1, pageNo: 1,
pageSize: 20, pageSize: 10,
lineId: null, lineId: null,
equipmentId: null, equipmentId: null,
recordTime: [], recordTime: [],

View File

@ -12,8 +12,7 @@
:page="queryParams.pageNo" :page="queryParams.pageNo"
:limit="queryParams.pageSize" :limit="queryParams.pageSize"
:table-data="list" :table-data="list"
@emitFun="handleEmitFun" @emitFun="handleEmitFun">
:max-height="tableH">
<method-btn <method-btn
v-if="tableBtn.length" v-if="tableBtn.length"
slot="handleBtn" slot="handleBtn"
@ -71,7 +70,7 @@
queryParams: { queryParams: {
equipmentGroupId: alarmForm.id, equipmentGroupId: alarmForm.id,
pageNo: 1, pageNo: 1,
pageSize: 20, pageSize: 10,
}, },
tableBtn: [ tableBtn: [
this.$auth.hasPermi('equipment:alarm-group:update') this.$auth.hasPermi('equipment:alarm-group:update')
@ -110,11 +109,10 @@ import { publicFormatter } from '@/utils/dict';
import basicPageMixin from '@/mixins/lb/basicPageMixin'; import basicPageMixin from '@/mixins/lb/basicPageMixin';
// import { getAccessToken } from '@/utils/auth'; // import { getAccessToken } from '@/utils/auth';
import BasicDrawer from './components/BasicDrawer.vue'; import BasicDrawer from './components/BasicDrawer.vue';
import tableHeightMixin from '@/mixins/lb/tableHeightMixin';
export default { export default {
name: 'EquipmentGroup', name: 'EquipmentGroup',
mixins: [basicPageMixin, tableHeightMixin], mixins: [basicPageMixin],
components: { BasicDrawer }, components: { BasicDrawer },
data() { data() {
return { return {

View File

@ -12,8 +12,7 @@
:page="queryParams.pageNo" :page="queryParams.pageNo"
:limit="queryParams.pageSize" :limit="queryParams.pageSize"
:table-data="list" :table-data="list"
@emitFun="handleEmitFun" @emitFun="handleEmitFun">
:max-height="tableH">
<method-btn <method-btn
v-if="tableBtn.length" v-if="tableBtn.length"
slot="handleBtn" slot="handleBtn"
@ -73,7 +72,7 @@
queryParams: { queryParams: {
equipmentGroupId: alarmForm.id, equipmentGroupId: alarmForm.id,
pageNo: 1, pageNo: 1,
pageSize: 20, pageSize: 10,
}, },
tableBtn: [ tableBtn: [
this.$auth.hasPermi('base:equipment-group:update') this.$auth.hasPermi('base:equipment-group:update')
@ -113,12 +112,11 @@ import moment from 'moment';
import { publicFormatter } from '@/utils/dict'; import { publicFormatter } from '@/utils/dict';
import basicPageMixin from '@/mixins/lb/basicPageMixin'; import basicPageMixin from '@/mixins/lb/basicPageMixin';
import BasicDrawer from './components/BasicDrawer.vue'; import BasicDrawer from './components/BasicDrawer.vue';
import tableHeightMixin from '@/mixins/lb/tableHeightMixin';
export default { export default {
name: 'EquipmentBindGroup', name: 'EquipmentBindGroup',
components: { BasicDrawer }, components: { BasicDrawer },
mixins: [basicPageMixin, tableHeightMixin], mixins: [basicPageMixin],
data() { data() {
return { return {
searchBarKeys: ['groupId', 'equipmentName'], searchBarKeys: ['groupId', 'equipmentName'],
@ -256,7 +254,7 @@ export default {
// //
queryParams: { queryParams: {
pageNo: 1, pageNo: 1,
pageSize: 20, pageSize: 10,
equipmentName: null, equipmentName: null,
groupId: null, groupId: null,
}, },

View File

@ -19,8 +19,7 @@
:page="queryParams.pageNo" :page="queryParams.pageNo"
:limit="queryParams.pageSize" :limit="queryParams.pageSize"
:table-data="list" :table-data="list"
@emitFun="handleEmitFun" @emitFun="handleEmitFun">
:max-height="tableH">
<method-btn <method-btn
v-if="tableBtn.length" v-if="tableBtn.length"
slot="handleBtn" slot="handleBtn"
@ -128,11 +127,10 @@ import basicPageMixin from '@/mixins/lb/basicPageMixin';
import BasicDrawer from './components/BasicDrawer.vue'; import BasicDrawer from './components/BasicDrawer.vue';
import { publicFormatter } from '@/utils/dict'; import { publicFormatter } from '@/utils/dict';
import AddOrUpdate from './add-or-updata'; import AddOrUpdate from './add-or-updata';
import tableHeightMixin from '@/mixins/lb/tableHeightMixin';
export default { export default {
name: 'EquipmentPlcConnect', name: 'EquipmentPlcConnect',
mixins: [basicPageMixin, tableHeightMixin], mixins: [basicPageMixin],
components: { BasicDrawer, AddOrUpdate }, components: { BasicDrawer, AddOrUpdate },
data() { data() {
return { return {
@ -158,14 +156,14 @@ export default {
: undefined, : undefined,
].filter((v) => v), ].filter((v) => v),
tableProps: [ tableProps: [
{ prop: 'productionLine', label: '产线', width: 120, showOverflowtooltip: true }, { prop: 'productionLine', label: '产线' },
{ prop: 'workshopSection', label: '工段', width: 120, showOverflowtooltip: true }, { prop: 'workshopSection', label: '工段' },
{ prop: 'equipmentName', label: '设备名', width: 120, showOverflowtooltip: true }, { prop: 'equipmentName', label: '设备名' },
{ prop: 'equipmentCode', label: '设备编码', width: 200, showOverflowtooltip: true }, { prop: 'equipmentCode', label: '设备编码' },
{ prop: 'plcCode', label: '关联表编码', width: 220, showOverflowtooltip: true }, { prop: 'plcCode', label: '关联表编码' },
{ prop: 'plcTableName', label: '关联表名', width: 150, showOverflowtooltip: true }, { prop: 'plcTableName', label: '关联表名' },
{ prop: 'plcName', label: '标识名称', width: 150, showOverflowtooltip: true }, { prop: 'plcName', label: '标识名称' },
{ prop: 'bindingParameters', label: '绑定参数数量', width: 120, showOverflowtooltip: true }, { prop: 'bindingParameters', label: '绑定参数数量' },
// { // {
// _action: 'params-bind', // _action: 'params-bind',
// label: '', // label: '',
@ -271,7 +269,7 @@ export default {
// //
queryParams: { queryParams: {
pageNo: 1, pageNo: 1,
pageSize: 20, pageSize: 10,
plcId: null, plcId: null,
equipmentId: null, equipmentId: null,
}, },

View File

@ -20,8 +20,7 @@
:limit="queryParams.pageSize" :limit="queryParams.pageSize"
:table-data="list" :table-data="list"
ref="pageTable" ref="pageTable"
@emitFun="handleEmitFun" @emitFun="handleEmitFun">
:max-height="tableH">
<method-btn <method-btn
v-if="tableBtn.length" v-if="tableBtn.length"
slot="handleBtn" slot="handleBtn"
@ -61,7 +60,6 @@ import {
exportEquipmentPlcExcel, exportEquipmentPlcExcel,
} from '@/api/base/equipmentPlc'; } from '@/api/base/equipmentPlc';
import basicPageMixin from '@/mixins/lb/basicPageMixin'; import basicPageMixin from '@/mixins/lb/basicPageMixin';
import tableHeightMixin from '@/mixins/lb/tableHeightMixin';
const switchBtn = { const switchBtn = {
name: 'SwitchBtn', name: 'SwitchBtn',
@ -101,7 +99,7 @@ const switchBtn = {
export default { export default {
name: 'EquipmentPlc', name: 'EquipmentPlc',
mixins: [basicPageMixin, tableHeightMixin], mixins: [basicPageMixin],
components: {}, components: {},
data() { data() {
return { return {
@ -129,16 +127,16 @@ export default {
// width: 180, // width: 180,
// filter: (val) => moment(val).format('yyyy-MM-DD HH:mm:ss'), // filter: (val) => moment(val).format('yyyy-MM-DD HH:mm:ss'),
// }, // },
{ prop: 'code', label: '编码', width: 180, showOverflowtooltip: true }, { prop: 'code', label: '编码' },
{ prop: 'plcTableName', label: '关联表名', width: 150, showOverflowtooltip: true }, { prop: 'plcTableName', label: '关联表名' },
{ prop: 'name', label: '标识名称', width: 150, showOverflowtooltip: true }, { prop: 'name', label: '标识名称' },
{ prop: 'enName', label: '英文名称', width: 150, showOverflowtooltip: true }, { prop: 'enName', label: '英文名称' },
{ {
prop: 'collection', prop: 'collection',
label: '是否采集', label: '是否采集',
subcomponent: switchBtn, subcomponent: switchBtn,
}, },
{ prop: 'description', label: '描述', minWidth: 150, showOverflowtooltip: true }, { prop: 'description', label: '描述' },
], ],
searchBarFormConfig: [ searchBarFormConfig: [
{ {
@ -242,7 +240,7 @@ export default {
// //
queryParams: { queryParams: {
pageNo: 1, pageNo: 1,
pageSize: 20, pageSize: 10,
plcTableName: null, plcTableName: null,
name: null, name: null,
}, },

View File

@ -15,7 +15,6 @@
background: '#f2f4f9', background: '#f2f4f9',
color: '#606266', color: '#606266',
}" }"
:max-height="tableH"
class="waiting-list-table"> class="waiting-list-table">
<el-table-column <el-table-column
type="selection" type="selection"
@ -38,9 +37,8 @@
<el-table-column <el-table-column
v-if="selectedBox[0]" v-if="selectedBox[0]"
label="巡检单名称" label="巡检单名称"
:show-overflow-tooltip="true"
prop="name"></el-table-column> prop="name"></el-table-column>
<el-table-column v-if="selectedBox[1]" label="部门" :show-overflow-tooltip="true" prop="planName"> <el-table-column v-if="selectedBox[1]" label="部门" prop="planName">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.department || '---' }} {{ scope.row.department || '---' }}
</template> </template>
@ -48,7 +46,6 @@
<el-table-column <el-table-column
v-if="selectedBox[2]" v-if="selectedBox[2]"
label="巡检时间" label="巡检时间"
width="150"
prop="actualCheckTime"> prop="actualCheckTime">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.actualCheckTime | timeFilter }} {{ scope.row.actualCheckTime | timeFilter }}
@ -57,8 +54,6 @@
<el-table-column <el-table-column
v-if="selectedBox[3]" v-if="selectedBox[3]"
label="班次" label="班次"
width="180"
:show-overflow-tooltip="true"
prop="groupClass"> prop="groupClass">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.groupClass || '---' }} {{ scope.row.groupClass || '---' }}
@ -67,7 +62,6 @@
<el-table-column <el-table-column
v-if="selectedBox[4]" v-if="selectedBox[4]"
label="确认截止时间" label="确认截止时间"
width="150"
prop="confirmDueTime"> prop="confirmDueTime">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.confirmDueTime | timeFilter }} {{ scope.row.confirmDueTime | timeFilter }}
@ -76,7 +70,6 @@
<el-table-column <el-table-column
v-if="selectedBox[5]" v-if="selectedBox[5]"
width="150" width="150"
:show-overflow-tooltip="true"
label="备注" label="备注"
prop="remark"> prop="remark">
<template slot-scope="scope"> <template slot-scope="scope">
@ -179,7 +172,6 @@ export default {
true true
], ],
selectedPlan: [], selectedPlan: [],
tableH: this.tableHeight(260)
}; };
}, },
computed: { computed: {
@ -190,16 +182,6 @@ export default {
})); }));
}, },
}, },
created() {
window.addEventListener('resize', () => {
this.tableH = this.tableHeight(260)
})
},
destroyed() {
window.removeEventListener('resize', () => {
this.tableH = this.tableHeight(260)
});
},
methods: { methods: {
checkSelectable(row, index) { checkSelectable(row, index) {
return true; return true;

View File

@ -139,7 +139,7 @@ export default {
// //
queryParams: { queryParams: {
pageNo: 1, pageNo: 1,
pageSize: 20, pageSize: 10,
maintainPlanId: null, maintainPlanId: null,
startTime: null, startTime: null,
special: false, special: false,

View File

@ -12,8 +12,7 @@
:page="queryParams.pageNo" :page="queryParams.pageNo"
:limit="queryParams.pageSize" :limit="queryParams.pageSize"
:table-data="list" :table-data="list"
@emitFun="handleEmitFun" @emitFun="handleEmitFun">
:max-height="tableH">
<method-btn <method-btn
v-if="tableBtn.length" v-if="tableBtn.length"
slot="handleBtn" slot="handleBtn"
@ -66,7 +65,6 @@ import addRecord from './addRecord.vue';
import AddContent from './addContent.vue'; import AddContent from './addContent.vue';
import { exportCheckOrderExcel, deleteEqCheckLog } from '@/api/equipment/base/inspection/record' import { exportCheckOrderExcel, deleteEqCheckLog } from '@/api/equipment/base/inspection/record'
import { parseTime } from '../../../../core/mixins/code-filter'; import { parseTime } from '../../../../core/mixins/code-filter';
import tableHeightMixin from '@/mixins/lb/tableHeightMixin';
// const timeFilter = (val) => moment(val).format('yyyy-MM-DD HH:mm:ss'); // const timeFilter = (val) => moment(val).format('yyyy-MM-DD HH:mm:ss');
@ -93,7 +91,7 @@ const btn = {
export default { export default {
name: 'EquipmentInspectionRecord', name: 'EquipmentInspectionRecord',
components: { addRecord, AddContent }, components: { addRecord, AddContent },
mixins: [basicPageMixin, tableHeightMixin], mixins: [basicPageMixin],
data() { data() {
return { return {
addOrUpdateVisible: false, addOrUpdateVisible: false,
@ -252,7 +250,7 @@ export default {
// //
queryParams: { queryParams: {
pageNo: 1, pageNo: 1,
pageSize: 20, pageSize: 10,
special: false, special: false,
name: null, name: null,
actualCheckTime: null, actualCheckTime: null,

View File

@ -12,8 +12,7 @@
:page="queryParams.pageNo" :page="queryParams.pageNo"
:limit="queryParams.pageSize" :limit="queryParams.pageSize"
:table-data="list" :table-data="list"
@emitFun="handleEmitFun" @emitFun="handleEmitFun">
:max-height="tableH">
<method-btn <method-btn
v-if="tableBtn.length" v-if="tableBtn.length"
slot="handleBtn" slot="handleBtn"
@ -54,14 +53,13 @@ import addOrUpdata from './add-or-updata.vue';
import add from './add.vue'; import add from './add.vue';
import { parseTime } from '../../../../core/mixins/code-filter'; import { parseTime } from '../../../../core/mixins/code-filter';
import { groupClassesListAll } from '@/api/monitoring/teamProduction'; import { groupClassesListAll } from '@/api/monitoring/teamProduction';
import tableHeightMixin from '@/mixins/lb/tableHeightMixin';
// import { publicFormatter } from '@/utils/dict'; // import { publicFormatter } from '@/utils/dict';
// const timeFilter = (val) => moment(val).format('yyyy-MM-DD HH:mm:ss'); // const timeFilter = (val) => moment(val).format('yyyy-MM-DD HH:mm:ss');
export default { export default {
name: 'EquipmentCheckSetting', name: 'EquipmentCheckSetting',
components: { addOrUpdata, add }, components: { addOrUpdata, add },
mixins: [basicPageMixin, tableHeightMixin], mixins: [basicPageMixin],
data() { data() {
return { return {
addOrUpdateVisible: false, addOrUpdateVisible: false,
@ -104,7 +102,7 @@ export default {
{ {
prop: 'code', prop: 'code',
label: '巡检单编码', label: '巡检单编码',
minWidth: 170, minWidth: 150,
showOverflowtooltip: true, showOverflowtooltip: true,
}, },
{ prop: 'department', label: '部门', showOverflowtooltip: true }, { prop: 'department', label: '部门', showOverflowtooltip: true },
@ -227,7 +225,7 @@ export default {
// //
queryParams: { queryParams: {
pageNo: 1, pageNo: 1,
pageSize: 20, pageSize: 10,
equipmentId: null, equipmentId: null,
name: null, name: null,
special: false, special: false,

View File

@ -7,13 +7,12 @@
<template> <template>
<el-drawer <el-drawer
:visible.sync="visible" :visible="visible"
:show-close="false" :show-close="false"
:wrapper-closable="true" :wrapper-closable="false"
class="drawer" class="drawer"
custom-class="mes-drawer" custom-class="mes-drawer"
size="60%" size="60%"
:before-close="beforeClose"
@closed="$emit('destroy')"> @closed="$emit('destroy')">
<SmallTitle slot="title">编辑</SmallTitle> <SmallTitle slot="title">编辑</SmallTitle>
@ -345,7 +344,6 @@ export default {
label: '设备名称', label: '设备名称',
prop: 'equipmentId', prop: 'equipmentId',
url: '/base/core-equipment/page?pageNo=1&pageSize=100&special=false', url: '/base/core-equipment/page?pageNo=1&pageSize=100&special=false',
bind: { clearable: true, filterable: true },
// method: 'post', // method: 'post',
// queryParams: { // queryParams: {
// pageNo: 1, // pageNo: 1,
@ -445,15 +443,6 @@ export default {
this.getList('line'); this.getList('line');
}, },
methods: { methods: {
beforeClose(done) {
// if (!this.isdetail) {
this.$confirm('确认关闭?')
.then(_ => {
done();
})
.catch(_ => {});
// }
},
handleSearchBarBtnClick(btn) { handleSearchBarBtnClick(btn) {
switch (btn.btnName) { switch (btn.btnName) {
case 'search': case 'search':

View File

@ -15,7 +15,6 @@
background: '#f2f4f9', background: '#f2f4f9',
color: '#606266', color: '#606266',
}" }"
:max-height="tableH"
class="waiting-list-table"> class="waiting-list-table">
<el-table-column <el-table-column
type="selection" type="selection"
@ -37,9 +36,8 @@
</el-table-column> </el-table-column>
<el-table-column <el-table-column
v-if="selectedBox[0]" v-if="selectedBox[0]"
width="160" width="128"
label="设备保养单号" label="设备保养单号"
:show-overflow-tooltip="true"
prop="maintainOrderNumber"></el-table-column> prop="maintainOrderNumber"></el-table-column>
<el-table-column v-if="selectedBox[1]" width="128" label="保养计划名称" prop="planName"> <el-table-column v-if="selectedBox[1]" width="128" label="保养计划名称" prop="planName">
<template slot-scope="scope"> <template slot-scope="scope">
@ -226,7 +224,6 @@ export default {
true, true,
], ],
selectedPlan: [], selectedPlan: [],
tableH: this.tableHeight(260),
}; };
}, },
computed: { computed: {
@ -237,16 +234,6 @@ export default {
})); }));
}, },
}, },
created() {
window.addEventListener('resize', () => {
this.tableH = this.tableHeight(260)
})
},
destroyed() {
window.removeEventListener('resize', () => {
this.tableH = this.tableHeight(260)
});
},
methods: { methods: {
checkSelectable(row, index) { checkSelectable(row, index) {
return ( return (

View File

@ -335,7 +335,6 @@ export default {
label: '设备名称', label: '设备名称',
prop: 'equipmentId', prop: 'equipmentId',
url: '/base/core-equipment/page?pageNo=1&pageSize=100&special=false', url: '/base/core-equipment/page?pageNo=1&pageSize=100&special=false',
bind: { clearable: true, filterable: true },
// method: 'post', // method: 'post',
// queryParams: { // queryParams: {
// pageNo: 1, // pageNo: 1,

View File

@ -197,7 +197,7 @@ export default {
// //
queryParams: { queryParams: {
pageNo: 1, pageNo: 1,
pageSize: 20, pageSize: 10,
maintainPlanId: null, maintainPlanId: null,
startTime: null, startTime: null,
special: false, special: false,

View File

@ -12,8 +12,7 @@
:page="queryParams.pageNo" :page="queryParams.pageNo"
:limit="queryParams.pageSize" :limit="queryParams.pageSize"
:table-data="list" :table-data="list"
@emitFun="handleEmitFun" @emitFun="handleEmitFun">
:max-height="tableH">
<!-- <method-btn <!-- <method-btn
v-if="tableBtn.length" v-if="tableBtn.length"
slot="handleBtn" slot="handleBtn"
@ -60,7 +59,6 @@ import basicPageMixin from '@/mixins/lb/basicPageMixin';
import { exportMaintainMonitorExcel } from '@/api/equipment/base/maintain/record' import { exportMaintainMonitorExcel } from '@/api/equipment/base/maintain/record'
import { parseTime } from '@/utils/ruoyi' import { parseTime } from '@/utils/ruoyi'
import AddContent from '../PlanConfig/addContent.vue'; import AddContent from '../PlanConfig/addContent.vue';
import tableHeightMixin from '@/mixins/lb/tableHeightMixin';
const remainBox = { const remainBox = {
name: 'RemainBox', name: 'RemainBox',
@ -118,7 +116,7 @@ const btn = {
export default { export default {
name: 'Monitor', name: 'Monitor',
components: { AddContent }, components: { AddContent },
mixins: [basicPageMixin, tableHeightMixin], mixins: [basicPageMixin],
data() { data() {
return { return {
addContent: false, addContent: false,
@ -131,7 +129,7 @@ export default {
// width: 180, // width: 180,
// filter: parseTime(createTime), // filter: parseTime(createTime),
// }, // },
{ prop: 'code', label: '保养计划单号', width: 150, showOverflowtooltip: true }, { prop: 'code', label: '保养计划单号', minWidth: 118, showOverflowtooltip: true },
{ prop: 'name', label: '保养计划名称', minWidth: 118, showOverflowtooltip: true }, { prop: 'name', label: '保养计划名称', minWidth: 118, showOverflowtooltip: true },
{ prop: 'departmentName', label: '部门', minWidth: 100, showOverflowtooltip: true }, { prop: 'departmentName', label: '部门', minWidth: 100, showOverflowtooltip: true },
{ prop: 'lineName', label: '产线名', minWidth: 100, showOverflowtooltip: true }, { prop: 'lineName', label: '产线名', minWidth: 100, showOverflowtooltip: true },
@ -207,7 +205,7 @@ export default {
// //
queryParams: { queryParams: {
pageNo: 1, pageNo: 1,
pageSize: 20, pageSize: 10,
special: false, special: false,
equipmentName: null, equipmentName: null,
createTime: null, createTime: null,

View File

@ -9,12 +9,11 @@
:table-props="tableProps" :table-props="tableProps"
:page="listQuery.pageNo" :page="listQuery.pageNo"
:limit="listQuery.pageSize" :limit="listQuery.pageSize"
:table-data="tableData" :table-data="tableData">
:max-height="tableH">
<method-btn <method-btn
v-if="tableBtn.length" v-if="tableBtn.length"
slot="handleBtn" slot="handleBtn"
:width="120" :width="150"
label="操作" label="操作"
:method-list="tableBtn" :method-list="tableBtn"
@clickBtn="handleClick" /> @clickBtn="handleClick" />
@ -54,7 +53,6 @@ import { parseTime, toDay } from '../../../../core/mixins/code-filter';
import { publicFormatter } from '@/utils/dict'; import { publicFormatter } from '@/utils/dict';
import { getPlanPage } from '@/api/equipment/base/maintain/planconfig'; import { getPlanPage } from '@/api/equipment/base/maintain/planconfig';
import { deleteEqMaintainPlan } from '@/api/equipment/base/maintain/record'; import { deleteEqMaintainPlan } from '@/api/equipment/base/maintain/record';
import tableHeightMixin from '@/mixins/lb/tableHeightMixin';
const tableProps = [ const tableProps = [
// { // {
@ -64,64 +62,46 @@ const tableProps = [
// }, // },
{ {
prop: 'name', prop: 'name',
label: '保养计划名称', label: '保养计划名称'
width: 120,
showOverflowtooltip: true
}, },
{ {
prop: 'departmentName', prop: 'departmentName',
label: '部门', label: '部门'
width: 120,
showOverflowtooltip: true
}, },
{ {
prop: 'lineName', prop: 'lineName',
label: '产线名', label: '产线名'
width: 120,
showOverflowtooltip: true
}, },
{ {
prop: 'maintenancePeriod', prop: 'maintenancePeriod',
label: '保养频率(天/次)', label: '保养频率(天/次)'
width: 150,
showOverflowtooltip: true
}, },
{ {
prop: 'firstMaintenanceTime', prop: 'firstMaintenanceTime',
label: '首次保养时间', label: '首次保养时间',
filter: parseTime, filter: parseTime
width: 150,
showOverflowtooltip: true
}, },
{ {
prop: 'maintainDuration', prop: 'maintainDuration',
label: '保养时长', label: '保养时长'
width: 120,
showOverflowtooltip: true
}, },
{ {
prop: 'maintainer', prop: 'maintainer',
label: '计划保养人员', label: '计划保养人员'
width: 150,
showOverflowtooltip: true
}, },
{ {
prop: 'confirmTimeLimit', prop: 'confirmTimeLimit',
label: '确认时限', label: '确认时限',
filter: toDay, filter: toDay
width: 130,
showOverflowtooltip: true
}, },
{ {
prop: 'remark', prop: 'remark',
label: '备注', label: '备注'
width: 150,
showOverflowtooltip: true
} }
]; ];
export default { export default {
mixins: [basicPage, tableHeightMixin], mixins: [basicPage],
data() { data() {
return { return {
urlOptions: { urlOptions: {
@ -131,7 +111,7 @@ export default {
tableProps, tableProps,
addContent: false, addContent: false,
listQuery: { listQuery: {
pageSize: 20, pageSize: 10,
pageNo: 1, pageNo: 1,
total: 0, total: 0,
special: false, special: false,

View File

@ -12,8 +12,7 @@
:page="queryParams.pageNo" :page="queryParams.pageNo"
:limit="queryParams.pageSize" :limit="queryParams.pageSize"
:table-data="list" :table-data="list"
@emitFun="handleEmitFun" @emitFun="handleEmitFun">
:max-height="tableH">
<method-btn <method-btn
v-if="tableBtn.length" v-if="tableBtn.length"
slot="handleBtn" slot="handleBtn"
@ -66,7 +65,6 @@ import Editor from '@/components/Editor';
import { deleteEqMaintainLog, exportMaintainLogExcel } from '@/api/equipment/base/maintain/record'; import { deleteEqMaintainLog, exportMaintainLogExcel } from '@/api/equipment/base/maintain/record';
import AddContent from './addContent.vue'; import AddContent from './addContent.vue';
import { parseTime } from '../../../../core/mixins/code-filter'; import { parseTime } from '../../../../core/mixins/code-filter';
import tableHeightMixin from '@/mixins/lb/tableHeightMixin';
// const timeFilter = (val) => moment(val).format('yyyy-MM-DD HH:mm:ss'); // const timeFilter = (val) => moment(val).format('yyyy-MM-DD HH:mm:ss');
@ -93,7 +91,7 @@ const btn = {
export default { export default {
name: 'EquipmentMaintainRecord', name: 'EquipmentMaintainRecord',
components: { AddContent }, components: { AddContent },
mixins: [basicPageMixin, tableHeightMixin], mixins: [basicPageMixin],
data() { data() {
return { return {
addContent: false, addContent: false,
@ -339,7 +337,7 @@ export default {
// //
queryParams: { queryParams: {
pageNo: 1, pageNo: 1,
pageSize: 20, pageSize: 10,
special: false, special: false,
maintainPlanId: null, maintainPlanId: null,
maintainPlanId: null, maintainPlanId: null,

View File

@ -12,8 +12,7 @@
:page="queryParams.pageNo" :page="queryParams.pageNo"
:limit="queryParams.pageSize" :limit="queryParams.pageSize"
:table-data="list" :table-data="list"
@emitFun="handleEmitFun" @emitFun="handleEmitFun">
:max-height="tableH">
<method-btn <method-btn
v-if="tableBtn.length" v-if="tableBtn.length"
slot="handleBtn" slot="handleBtn"
@ -59,13 +58,12 @@ import { deleteRepair, exportRepairLogExcel } from '@/api/equipment/base/repair'
import { parseTime } from '@/utils/ruoyi' import { parseTime } from '@/utils/ruoyi'
import htmls from './htmls.vue' import htmls from './htmls.vue'
import DialogForm from './Repair--add.vue'; import DialogForm from './Repair--add.vue';
import tableHeightMixin from '@/mixins/lb/tableHeightMixin';
// const timeFilter = (val) => moment(val).format('yyyy-MM-DD HH:mm:ss'); // const timeFilter = (val) => moment(val).format('yyyy-MM-DD HH:mm:ss');
export default { export default {
name: 'EquipmentRepair', name: 'EquipmentRepair',
components: { CustomDialogForm, DialogForm }, components: { CustomDialogForm, DialogForm },
mixins: [basicPageMixin, tableHeightMixin], mixins: [basicPageMixin],
data() { data() {
return { return {
addOrUpdateVisible: false, addOrUpdateVisible: false,
@ -104,16 +102,16 @@ export default {
// width: 180, // width: 180,
// filter: parseTime, // filter: parseTime,
// }, // },
{ prop: 'repairOrderNumber', label: '维修单号', width: 180, showOverflowtooltip: true }, { prop: 'repairOrderNumber', label: '维修单号' },
{ prop: 'lineName', label: '产线名', width: 120, showOverflowtooltip: true }, { prop: 'lineName', label: '产线名' },
{ prop: 'sectionName', label: '工段名', width: 120, showOverflowtooltip: true }, { prop: 'sectionName', label: '工段名' },
{ prop: 'equipmentName', label: '设备名称', minWidth: 100, showOverflowtooltip: true }, { prop: 'equipmentName', label: '设备名称', minWidth: 100, showOverflowtooltip: true },
{ prop: 'faultDetail', label: '故障明细', subcomponent: htmls, width: 180, showOverflowtooltip: true }, { prop: 'faultDetail', label: '故障明细', subcomponent: htmls },
// { prop: 'maintenanceDetail', label: '', subcomponent: htmls, minWidth: 100, showOverflowtooltip: true }, // { prop: 'maintenanceDetail', label: '', subcomponent: htmls, minWidth: 100, showOverflowtooltip: true },
{ {
prop: 'maintenanceStartTime', prop: 'maintenanceStartTime',
label: '维修开始时间', label: '维修开始时间',
width: 150, width: 150,
filter: parseTime, filter: parseTime,
}, },
{ {
@ -195,7 +193,7 @@ export default {
// //
queryParams: { queryParams: {
pageNo: 1, pageNo: 1,
pageSize: 20, pageSize: 10,
special: false, special: false,
maintenanceResult: null, maintenanceResult: null,
createTime: null, createTime: null,

View File

@ -1,7 +1,7 @@
<template> <template>
<div class="app-container"> <div class="app-container">
<search-bar :formConfigs="formConfig" ref="searchBarForm" @headBtnClick="buttonClick" /> <search-bar :formConfigs="formConfig" ref="searchBarForm" @headBtnClick="buttonClick" />
<base-table :max-height="tableH" v-loading="dataListLoading" :table-props="tableProps" :page="listQuery.pageNo" <base-table v-loading="dataListLoading" :table-props="tableProps" :page="listQuery.pageNo"
:limit="listQuery.pageSize" :table-data="tableData"> :limit="listQuery.pageSize" :table-data="tableData">
<method-btn v-if="tableBtn.length" slot="handleBtn" :width="120" label="操作" :method-list="tableBtn" <method-btn v-if="tableBtn.length" slot="handleBtn" :width="120" label="操作" :method-list="tableBtn"
@clickBtn="handleClick" /> @clickBtn="handleClick" />
@ -16,7 +16,7 @@
<script> <script>
import AddOrUpdate from './add-or-updata'; import AddOrUpdate from './add-or-updata';
// import DetailOrUpdate from './detail-or-updata'; // import DetailOrUpdate from './detail-or-updata';
import tableHeightMixin from '@/mixins/lb/tableHeightMixin';
import basicPage from '../../core/mixins/basic-page'; import basicPage from '../../core/mixins/basic-page';
import StatusBtn from './statusBtn.vue' import StatusBtn from './statusBtn.vue'
import { import {
@ -54,7 +54,7 @@ const tableProps = [
]; ];
export default { export default {
mixins: [basicPage, tableHeightMixin], mixins: [basicPage],
data() { data() {
return { return {
urlOptions: { urlOptions: {

View File

@ -1,7 +1,7 @@
<template> <template>
<div class="app-container"> <div class="app-container">
<search-bar :formConfigs="formConfig" ref="searchBarForm" @headBtnClick="buttonClick" /> <search-bar :formConfigs="formConfig" ref="searchBarForm" @headBtnClick="buttonClick" />
<base-table :max-height="tableH" v-loading="dataListLoading" :table-props="tableProps" :page="listQuery.pageNo" <base-table v-loading="dataListLoading" :table-props="tableProps" :page="listQuery.pageNo"
:limit="listQuery.pageSize" :table-data="tableData"> :limit="listQuery.pageSize" :table-data="tableData">
<method-btn v-if="tableBtn.length" slot="handleBtn" :width="120" label="操作" :method-list="tableBtn" <method-btn v-if="tableBtn.length" slot="handleBtn" :width="120" label="操作" :method-list="tableBtn"
@clickBtn="handleClick" /> @clickBtn="handleClick" />
@ -16,7 +16,7 @@
<script> <script>
import AddOrUpdate from './add-or-updata'; import AddOrUpdate from './add-or-updata';
// import DetailOrUpdate from './detail-or-updata'; // import DetailOrUpdate from './detail-or-updata';
import tableHeightMixin from '@/mixins/lb/tableHeightMixin';
import basicPage from '../../core/mixins/basic-page'; import basicPage from '../../core/mixins/basic-page';
import StatusBtn from './statusBtn.vue' import StatusBtn from './statusBtn.vue'
import { import {
@ -54,7 +54,7 @@ const tableProps = [
]; ];
export default { export default {
mixins: [basicPage, tableHeightMixin], mixins: [basicPage],
data() { data() {
return { return {
urlOptions: { urlOptions: {

View File

@ -88,8 +88,7 @@
:page="1" :page="1"
:limit="999" :limit="999"
:table-data="list" :table-data="list"
@emitFun="handleEmitFun" @emitFun="handleEmitFun">
:max-height="tableH">
<!-- <method-btn <!-- <method-btn
v-if="tableBtn.length" v-if="tableBtn.length"
slot="handleBtn" slot="handleBtn"
@ -120,11 +119,9 @@
<script> <script>
import Graph from './graph.vue'; import Graph from './graph.vue';
import tableHeightMixin from '@/mixins/lb/tableHeightMixin';
export default { export default {
name: 'EquipmentProcessAmount', name: 'EquipmentProcessAmount',
mixins: [tableHeightMixin],
components: { Graph }, components: { Graph },
props: {}, props: {},
data() { data() {

View File

@ -10,7 +10,7 @@
<SearchBar :formConfigs="searchBarFormConfig" ref="search-bar" @headBtnClick="handleSearchBarBtnClick" /> <SearchBar :formConfigs="searchBarFormConfig" ref="search-bar" @headBtnClick="handleSearchBarBtnClick" />
<!-- 列表 --> <!-- 列表 -->
<base-table :max-height="tableH" :table-props="tableProps" :page="1" :limit="20" :table-data="list"> <base-table :table-props="tableProps" :page="1" :limit="10" :table-data="list">
</base-table> </base-table>
</el-row> </el-row>
@ -85,7 +85,6 @@ import {
import moment from 'moment'; import moment from 'moment';
// import DialogForm from './dialogForm.vue'; // import DialogForm from './dialogForm.vue';
import * as echarts from 'echarts'; import * as echarts from 'echarts';
import tableHeightMixin from '@/mixins/lb/tableHeightMixin';
// import basicPageMixin from '@/mixins/lb/basicPageMixin'; // import basicPageMixin from '@/mixins/lb/basicPageMixin';
export default { export default {
@ -93,7 +92,7 @@ export default {
// components: { // components: {
// DialogForm, // DialogForm,
// }, // },
mixins: [tableHeightMixin], // mixins: [basicPageMixin],
data() { data() {
return { return {
list: [], list: [],

View File

@ -1,18 +1,40 @@
<template> <template>
<div class="app-container"> <div class="app-container">
<search-bar :formConfigs="formConfig" ref="searchBarForm" @headBtnClick="buttonClick" /> <search-bar
<base-table :max-height="tableH" v-loading="dataListLoading" :table-props="tableProps" :page="listQuery.pageNo" :formConfigs="formConfig"
:limit="listQuery.pageSize" :table-data="tableData"> ref="searchBarForm"
<method-btn v-if="tableBtn.length" slot="handleBtn" :width="120" label="操作" :method-list="tableBtn" @headBtnClick="buttonClick" />
@clickBtn="handleClick" /> <base-table
</base-table> v-loading="dataListLoading"
<pagination :limit.sync="listQuery.pageSize" :page.sync="listQuery.pageNo" :total="listQuery.total" :table-props="tableProps"
@pagination="getDataList" /> :page="listQuery.pageNo"
<base-dialog :dialogTitle="addOrEditTitle" :dialogVisible="addOrUpdateVisible" @cancel="handleCancel" :limit="listQuery.pageSize"
@confirm="handleConfirm" :before-close="handleCancel" width="40%"> :table-data="tableData">
<add-or-update ref="addOrUpdate" @refreshDataList="successSubmit"></add-or-update> <method-btn
</base-dialog> v-if="tableBtn.length"
</div> slot="handleBtn"
:width="120"
label="操作"
:method-list="tableBtn"
@clickBtn="handleClick" />
</base-table>
<pagination
:limit.sync="listQuery.pageSize"
:page.sync="listQuery.pageNo"
:total="listQuery.total"
@pagination="getDataList" />
<base-dialog
:dialogTitle="addOrEditTitle"
:dialogVisible="addOrUpdateVisible"
@cancel="handleCancel"
@confirm="handleConfirm"
:before-close="handleCancel"
width="40%">
<add-or-update
ref="addOrUpdate"
@refreshDataList="successSubmit"></add-or-update>
</base-dialog>
</div>
</template> </template>
<script> <script>
@ -24,7 +46,6 @@ import {
deleteQualityScrapDet, deleteQualityScrapDet,
} from '@/api/base/qualityScrapDet'; } from '@/api/base/qualityScrapDet';
import { getList, } from "@/api/base/qualityScrapType"; import { getList, } from "@/api/base/qualityScrapType";
import tableHeightMixin from '@/mixins/lb/tableHeightMixin';
const tableProps = [ const tableProps = [
{ {
prop: 'createTime', prop: 'createTime',
@ -50,7 +71,7 @@ const tableProps = [
]; ];
export default { export default {
mixins: [basicPage, tableHeightMixin], mixins: [basicPage],
data() { data() {
return { return {
urlOptions: { urlOptions: {
@ -156,7 +177,7 @@ export default {
switch (val.btnName) { switch (val.btnName) {
case 'search': case 'search':
this.listQuery.pageNo = 1; this.listQuery.pageNo = 1;
this.listQuery.pageSize = 20; this.listQuery.pageSize = 10;
this.listQuery.content = val.content ? val.content : undefined; this.listQuery.content = val.content ? val.content : undefined;
this.listQuery.typeId = val.typeId ? val.typeId : undefined; this.listQuery.typeId = val.typeId ? val.typeId : undefined;
this.getDataList(); this.getDataList();
@ -164,7 +185,7 @@ export default {
case 'reset': case 'reset':
this.$refs.searchBarForm.resetForm(); this.$refs.searchBarForm.resetForm();
this.listQuery = { this.listQuery = {
pageSize: 20, pageSize: 10,
pageNo: 1, pageNo: 1,
total: 1, total: 1,
}; };

View File

@ -1,7 +1,7 @@
<template> <template>
<div class="app-container"> <div class="app-container">
<search-bar :formConfigs="formConfig" ref="searchBarForm" @headBtnClick="buttonClick" /> <search-bar :formConfigs="formConfig" ref="searchBarForm" @headBtnClick="buttonClick" />
<base-table :max-height="tableH" v-loading="dataListLoading" :table-props="tableProps" :page="listQuery.pageNo" <base-table v-loading="dataListLoading" :table-props="tableProps" :page="listQuery.pageNo"
:limit="listQuery.pageSize" :table-data="tableData"> :limit="listQuery.pageSize" :table-data="tableData">
<method-btn v-if="tableBtn.length" slot="handleBtn" :width="120" label="操作" :method-list="tableBtn" <method-btn v-if="tableBtn.length" slot="handleBtn" :width="120" label="操作" :method-list="tableBtn"
@clickBtn="handleClick" /> @clickBtn="handleClick" />
@ -19,7 +19,7 @@
<script> <script>
import AddOrUpdate from './add-or-updata'; import AddOrUpdate from './add-or-updata';
import DetailOrUpdate from './detail-or-updata'; import DetailOrUpdate from './detail-or-updata';
import tableHeightMixin from '@/mixins/lb/tableHeightMixin';
import basicPage from './basic-page'; import basicPage from './basic-page';
import { parseTime } from '../../../core/mixins/code-filter'; import { parseTime } from '../../../core/mixins/code-filter';
import { import {
@ -68,7 +68,7 @@ const tableProps = [
]; ];
export default { export default {
mixins: [basicPage, tableHeightMixin], mixins: [basicPage],
data() { data() {
return { return {
urlOptions: { urlOptions: {
@ -214,7 +214,7 @@ export default {
switch (val.btnName) { switch (val.btnName) {
case 'search': case 'search':
this.listQuery.pageNo = 1; this.listQuery.pageNo = 1;
this.listQuery.pageSize = 20; this.listQuery.pageSize = 10;
this.listQuery.workOrderId = val.workOrderId ? val.workOrderId : undefined; this.listQuery.workOrderId = val.workOrderId ? val.workOrderId : undefined;
// this.listQuery.teamId = val.teamId ? val.teamId : undefined; // this.listQuery.teamId = val.teamId ? val.teamId : undefined;
this.getDataList(); this.getDataList();
@ -222,7 +222,7 @@ export default {
case 'reset': case 'reset':
this.$refs.searchBarForm.resetForm(); this.$refs.searchBarForm.resetForm();
this.listQuery = { this.listQuery = {
pageSize: 20, pageSize: 10,
pageNo: 1, pageNo: 1,
total: 1, total: 1,
}; };

View File

@ -1,25 +1,46 @@
<template> <template>
<div class="app-container"> <div class="app-container">
<search-bar :formConfigs="formConfig" ref="searchBarForm" @headBtnClick="buttonClick" /> <search-bar
<base-table :max-height="tableH" v-loading="dataListLoading" :table-props="tableProps" :page="listQuery.pageNo" :formConfigs="formConfig"
:limit="listQuery.pageSize" :table-data="tableData"> ref="searchBarForm"
<method-btn v-if="tableBtn.length" slot="handleBtn" :width="120" label="操作" :method-list="tableBtn" @headBtnClick="buttonClick" />
@clickBtn="handleClick" /> <base-table
</base-table> v-loading="dataListLoading"
<pagination :limit.sync="listQuery.pageSize" :page.sync="listQuery.pageNo" :total="listQuery.total" :table-props="tableProps"
@pagination="getDataList" /> :page="listQuery.pageNo"
<base-dialog :dialogTitle="addOrEditTitle" :dialogVisible="addOrUpdateVisible" @cancel="handleCancel" :limit="listQuery.pageSize"
@confirm="handleConfirm" :before-close="handleCancel" width="40%"> :table-data="tableData">
<add-or-update ref="addOrUpdate" @refreshDataList="successSubmit"></add-or-update> <method-btn
</base-dialog> v-if="tableBtn.length"
</div> slot="handleBtn"
:width="120"
label="操作"
:method-list="tableBtn"
@clickBtn="handleClick" />
</base-table>
<pagination
:limit.sync="listQuery.pageSize"
:page.sync="listQuery.pageNo"
:total="listQuery.total"
@pagination="getDataList" />
<base-dialog
:dialogTitle="addOrEditTitle"
:dialogVisible="addOrUpdateVisible"
@cancel="handleCancel"
@confirm="handleConfirm"
:before-close="handleCancel"
width="40%">
<add-or-update
ref="addOrUpdate"
@refreshDataList="successSubmit"></add-or-update>
</base-dialog>
</div>
</template> </template>
<script> <script>
import AddOrUpdate from './add-or-updata'; import AddOrUpdate from './add-or-updata';
import basicPage from '../../../core/mixins/basic-page'; import basicPage from '../../../core/mixins/basic-page';
import { parseTime } from '../../../core/mixins/code-filter'; import { parseTime } from '../../../core/mixins/code-filter';
import tableHeightMixin from '@/mixins/lb/tableHeightMixin';
import { import {
getQualityScrapTypePage, getQualityScrapTypePage,
deleteQualityScrapType deleteQualityScrapType
@ -50,7 +71,7 @@ const tableProps = [
]; ];
export default { export default {
mixins: [basicPage, tableHeightMixin], mixins: [basicPage],
data() { data() {
return { return {
urlOptions: { urlOptions: {
@ -138,14 +159,14 @@ export default {
switch (val.btnName) { switch (val.btnName) {
case 'search': case 'search':
this.listQuery.pageNo = 1; this.listQuery.pageNo = 1;
this.listQuery.pageSize = 20; this.listQuery.pageSize = 10;
this.listQuery.name = val.name ? val.name : undefined; this.listQuery.name = val.name ? val.name : undefined;
this.getDataList(); this.getDataList();
break; break;
case 'reset': case 'reset':
this.$refs.searchBarForm.resetForm(); this.$refs.searchBarForm.resetForm();
this.listQuery = { this.listQuery = {
pageSize: 20, pageSize: 10,
pageNo: 1, pageNo: 1,
total: 1, total: 1,
}; };

View File

@ -8,8 +8,7 @@
<el-tab-pane :label="'\u2002表格数据\u2002'" name="table"> <el-tab-pane :label="'\u2002表格数据\u2002'" name="table">
<!-- 列表 --> <!-- 列表 -->
<div class="blue-title">产品名{{ productDetail.name }} 产品规格{{ productDetail.specifications }}</div> <div class="blue-title">产品名{{ productDetail.name }} 产品规格{{ productDetail.specifications }}</div>
<base-table :max-height="tableH" class="base-table__margin" :table-props="productProps" :page="1" <base-table class="base-table__margin" :table-props="productProps" :page="1" :limit="10" :table-data="list">
:limit="10" :table-data="list">
</base-table> </base-table>
<div v-for="(item,index) in downProps" :key="index"> <div v-for="(item,index) in downProps" :key="index">
<div class="blue-title">工单名称:{{ list[index].workOrderName }}</div> <div class="blue-title">工单名称:{{ list[index].workOrderName }}</div>
@ -52,7 +51,6 @@ import {
getProductList, getProductList,
getWorkOrderList getWorkOrderList
} from '@/api/monitoring/statisticalData'; } from '@/api/monitoring/statisticalData';
import tableHeightMixin from '@/mixins/lb/tableHeightMixin';
// import Editor from '@/components/Editor'; // import Editor from '@/components/Editor';
import moment from 'moment'; import moment from 'moment';
// import DialogForm from './dialogForm.vue'; // import DialogForm from './dialogForm.vue';
@ -63,7 +61,7 @@ export default {
// components: { // components: {
// DialogForm, // DialogForm,
// }, // },
mixins: [tableHeightMixin], // mixins: [basicPageMixin],
data() { data() {
return { return {
list: [], list: [],

View File

@ -1,26 +1,47 @@
<template> <template>
<div class="app-container"> <div class="app-container">
<!-- 搜索工作栏 --> <!-- 搜索工作栏 -->
<SearchBar :isFold="true" :formConfigs="searchBarFormConfig" ref="search-bar" <SearchBar
@headBtnClick="handleSearchBarBtnClick" /> :formConfigs="searchBarFormConfig"
ref="search-bar"
@headBtnClick="handleSearchBarBtnClick" />
<!-- 列表 --> <!-- 列表 -->
<base-table :table-props="tableProps" :page="queryParams.pageNo" :limit="queryParams.pageSize" :table-data="list" <base-table
@emitFun="handleEmitFun"> :table-props="tableProps"
<method-btn v-if="tableBtn.length" slot="handleBtn" label="操作" :width="120" fixed="right" :method-list="tableBtn" :page="queryParams.pageNo"
@clickBtn="handleTableBtnClick" /> :limit="queryParams.pageSize"
</base-table> :table-data="list"
@emitFun="handleEmitFun">
<method-btn
v-if="tableBtn.length"
slot="handleBtn"
label="操作"
:width="120"
fixed="right"
:method-list="tableBtn"
@clickBtn="handleTableBtnClick" />
</base-table>
<!-- 分页组件 --> <!-- 分页组件 -->
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNo" :limit.sync="queryParams.pageSize" <pagination
@pagination="getList" /> v-show="total > 0"
:total="total"
:page.sync="queryParams.pageNo"
:limit.sync="queryParams.pageSize"
@pagination="getList" />
<!-- 对话框(添加 / 修改) --> <!-- 对话框(添加 / 修改) -->
<base-dialog :dialogTitle="title" :dialogVisible="open" width="50%" @close="cancel" @cancel="cancel" <base-dialog
@confirm="submitForm"> :dialogTitle="title"
<DialogForm v-if="open" ref="form" v-model="form" /> :dialogVisible="open"
</base-dialog> width="50%"
</div> @close="cancel"
@cancel="cancel"
@confirm="submitForm">
<DialogForm v-if="open" ref="form" v-model="form" />
</base-dialog>
</div>
</template> </template>
<script> <script>

View File

@ -1,12 +1,18 @@
<template> <template>
<div class="app-container"> <div class="app-container">
<!-- 搜索工作栏 --> <!-- 搜索工作栏 -->
<SearchBar :formConfigs="searchBarFormConfig" ref="search-bar" <SearchBar
@headBtnClick="handleSearchBarBtnClick" /> :formConfigs="searchBarFormConfig"
ref="search-bar"
@headBtnClick="handleSearchBarBtnClick" />
<!-- 列表 --> <!-- 列表 -->
<base-table :max-height="tableH" :table-props="tableProps" :page="1" :limit="10" :table-data="list"> <base-table
<!-- <method-btn :table-props="tableProps"
:page="1"
:limit="10"
:table-data="list">
<!-- <method-btn
v-if="tableBtn.length" v-if="tableBtn.length"
slot="handleBtn" slot="handleBtn"
label="操作" label="操作"
@ -14,18 +20,18 @@
fixed="right" fixed="right"
:method-list="tableBtn" :method-list="tableBtn"
@clickBtn="handleTableBtnClick" /> --> @clickBtn="handleTableBtnClick" /> -->
</base-table> </base-table>
<!-- 分页组件 --> <!-- 分页组件 -->
<!-- <pagination <!-- <pagination
v-show="total > 0" v-show="total > 0"
:total="total" :total="total"
:page.sync="queryParams.pageNo" :page.sync="queryParams.pageNo"
:limit.sync="queryParams.pageSize" :limit.sync="queryParams.pageSize"
@pagination="getList" /> --> @pagination="getList" /> -->
<!-- 对话框(添加 / 修改) --> <!-- 对话框(添加 / 修改) -->
<!-- <base-dialog <!-- <base-dialog
:dialogTitle="title" :dialogTitle="title"
:dialogVisible="open" :dialogVisible="open"
width="50%" width="50%"
@ -34,7 +40,7 @@
@confirm="submitForm"> @confirm="submitForm">
<DialogForm v-if="open" ref="form" v-model="form" /> <DialogForm v-if="open" ref="form" v-model="form" />
</base-dialog> --> </base-dialog> -->
</div> </div>
</template> </template>
<script> <script>
@ -45,7 +51,6 @@ import {
} from '@/api/monitoring/statisticalData'; } from '@/api/monitoring/statisticalData';
// import Editor from '@/components/Editor'; // import Editor from '@/components/Editor';
import moment from 'moment'; import moment from 'moment';
import tableHeightMixin from '@/mixins/lb/tableHeightMixin';
// import DialogForm from './dialogForm.vue'; // import DialogForm from './dialogForm.vue';
// import basicPageMixin from '@/mixins/lb/basicPageMixin'; // import basicPageMixin from '@/mixins/lb/basicPageMixin';
@ -54,7 +59,7 @@ export default {
// components: { // components: {
// DialogForm, // DialogForm,
// }, // },
mixins: [tableHeightMixin], // mixins: [basicPageMixin],
data() { data() {
return { return {
list: [], list: [],
@ -106,13 +111,7 @@ export default {
btnName: '查询', btnName: '查询',
name: 'search', name: 'search',
color: 'primary', color: 'primary',
}, },
{
type: 'button',
btnName: '返回',
name: 'back',
color: 'primary',
},
// { // {
// type: this.$auth.hasPermi( // type: this.$auth.hasPermi(
// 'base:quality-inspection-record:create' // 'base:quality-inspection-record:create'
@ -374,9 +373,8 @@ export default {
this.queryParams.productionId = val.productionId ? val.productionId : undefined this.queryParams.productionId = val.productionId ? val.productionId : undefined
this.queryParams.startTime = val.checkTime ? val.checkTime[0] : undefined this.queryParams.startTime = val.checkTime ? val.checkTime[0] : undefined
this.queryParams.endTime = val.checkTime ? val.checkTime[1] : undefined this.queryParams.endTime = val.checkTime ? val.checkTime[1] : undefined
this.getList() this.getList()
} else if (val.btnName === 'back') {
this.$router.go(-1)
} }
// console.log(val); // console.log(val);
} }