Compare commits

..

No commits in common. "ac3957e0c7338cc12ec59da861e18df70079decb" and "670ded05116f7f4f3312a5c94edd10a2bb2b08d3" have entirely different histories.

9 changed files with 90 additions and 289 deletions

File diff suppressed because one or more lines are too long

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-01-18 14:06:05 * @LastEditTime: 2024-01-08 16:07:58
* @Description: * @Description:
--> -->
<template> <template>
@ -46,15 +46,13 @@
<!-- <el-row style="margin-bottom: 1em"> <!-- <el-row style="margin-bottom: 1em">
<p class="now-team-title">加工工单进度</p> <p class="now-team-title">加工工单进度</p>
</el-row> --> </el-row> -->
<el-row v-for="op in orderProcessList" :key="op.id" style="margin-bottom: 1em"> <el-row v-for="op in orderProcessList" :key="op.id" style="margin-bottom: 1em">
<el-progress :percentage="op.outRate * 100" class="custom-progress-bar" />
<p v-if="op.outRate === 1" class="now-secondary-title" style="color:#4679FD"> <p v-if="op.outRate === 1" class="now-secondary-title" style="color:#4679FD">
<i class="el-icon-check" /> <i class="el-icon-check" />
{{ op.name }} {{ op.name }}
</p> </p>
<p v-else class="now-secondary-title">{{ op.name }}</p> <p v-else class="now-secondary-title">{{ op.name }}</p>
<el-progress define-back-color="rgba(32, 57, 96, 1)" text-color="white" :percentage="op.outRate * 100"
class="custom-progress-bar" />
</el-row> </el-row>
<!-- <el-row> <!-- <el-row>
<el-progress :percentage="100" class="custom-progress-bar" /> <el-progress :percentage="100" class="custom-progress-bar" />
@ -405,13 +403,13 @@ const locationTableProps = [
prop: 'level', prop: 'level',
label: '存放位置', label: '存放位置',
// subcomponent: alarmLevel, // subcomponent: alarmLevel,
// align: 'center' align: 'center'
}, },
{ {
prop: 'unit', prop: 'unit',
label: '单位', label: '单位',
// subcomponent: alarmLevel, // subcomponent: alarmLevel,
// align: 'center' align: 'center'
}, },
{ {
prop: 'product', prop: 'product',
@ -467,13 +465,13 @@ const inventoryTableProps = [
prop: 'level', prop: 'level',
label: '规格', label: '规格',
// subcomponent: alarmLevel, // subcomponent: alarmLevel,
// align: 'center' align: 'center'
}, },
{ {
prop: 'unit', prop: 'unit',
label: '单位', label: '单位',
// subcomponent: alarmLevel, // subcomponent: alarmLevel,
// align: 'center' align: 'center'
}, },
{ {
prop: 'product', prop: 'product',
@ -519,7 +517,7 @@ const qualityYearTableProps = [
prop: 'level', prop: 'level',
label: '库位', label: '库位',
// subcomponent: alarmLevel, // subcomponent: alarmLevel,
// align: 'center' align: 'center'
}, },
{ {
prop: 'product', prop: 'product',

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-01-18 14:01:09 * @LastEditTime: 2024-01-17 14:00:15
* @Description: * @Description:
--> -->
<template> <template>
@ -29,7 +29,7 @@
<el-row class="container-main flex-col" type="flex"> <el-row class="container-main flex-col" type="flex">
<el-row :style="{ padding: '0 ' + 9 + 'px' }" :gutter="15" type="flex" class="flex-1"> <el-row :style="{ padding: '0 ' + 9 + 'px' }" :gutter="15" type="flex" class="flex-1">
<el-col :style="{ margin: 8 + 'px' + ' 0' }" :span="8"> <el-col :style="{ margin: 8 + 'px' + ' 0' }" :span="8">
<base-container :title="'切割数据'" :size="'small'" :title-icon="'eqAlarm'"> <base-container :title="'切割数据'" :size="'small'" :title-icon="'eqAlarm'">
<!-- <base-table1 :page="1" :limit="999" :show-index="false" :table-config="cutProps" <!-- <base-table1 :page="1" :limit="999" :show-index="false" :table-config="cutProps"
:table-data="cutTableDataList" /> --> :table-data="cutTableDataList" /> -->
<dv-scroll-board :config="cutConfig" style="width:100%;height:350px" ref='cutScrollBoard' /> <dv-scroll-board :config="cutConfig" style="width:100%;height:350px" ref='cutScrollBoard' />
@ -37,8 +37,7 @@
</el-col> </el-col>
<el-col :style="{ margin: 8 + 'px' + ' 0' }" :span="8"> <el-col :style="{ margin: 8 + 'px' + ' 0' }" :span="8">
<base-container :no-content-padding="true" :title="'产量及良率统计'" :size="'small'" <base-container :title="'产量及良率统计'" :size="'small'" :title-icon="'energyMonitoring'">
:title-icon="'energyMonitoring'">
<!-- <div style="width: 45%;position: absolute; top: 3em; right: 3em;"> <!-- <div style="width: 45%;position: absolute; top: 3em; right: 3em;">
<top-radio-group /> <top-radio-group />
</div> --> </div> -->
@ -59,8 +58,7 @@
<el-row :style="{ padding: '0 ' + 9 + 'px' }" :gutter="10" type="flex" class="flex-1"> <el-row :style="{ padding: '0 ' + 9 + 'px' }" :gutter="10" type="flex" class="flex-1">
<el-col :style="{ margin: 8 + 'px' + ' 0' }" :span="12"> <el-col :style="{ margin: 8 + 'px' + ' 0' }" :span="12">
<base-container :no-content-padding="true" :height="256" :title="'废片 缺陷数据'" :size="'middle'" <base-container :height="256" :title="'废片 缺陷数据'" :size="'middle'" :title-icon="'scrap'">
:title-icon="'scrap'">
<!-- <div style="width: 45%;position: absolute; top: 3em; right: 3em;"> <!-- <div style="width: 45%;position: absolute; top: 3em; right: 3em;">
<top-radio-group /> <top-radio-group />
</div> --> </div> -->
@ -82,8 +80,8 @@
</base-container> </base-container>
</el-col> </el-col>
<el-col :style="{ margin: 8 + 'px' + ' 0' }" :span="14"> <el-col :style="{ margin: 8 + 'px' + ' 0' }" :span="14">
<base-container :no-content-padding="true" :no-padding="true" :height="318 + 338 + 16" :size="'eqStatus'" <base-container :no-padding="true" :height="318 + 338 + 16" :size="'eqStatus'" :title="'设备状态监控'"
:title="'设备状态监控'" :title-icon="'eqMonitoring'"> :title-icon="'eqMonitoring'">
<!-- <div style="width: 45%;position: absolute; top: 3em; right: 3em;"> <!-- <div style="width: 45%;position: absolute; top: 3em; right: 3em;">
<top-radio-group /> <top-radio-group />
</div> --> </div> -->
@ -704,7 +702,7 @@ export default {
`<span style="color:rgba(255,255,255,0.5)">${item.time || ''}</span>`, `<span style="color:rgba(255,255,255,0.5)">${item.time || ''}</span>`,
`<span style="color:rgba(255,255,255,0.5)">${item.type || ''}</span>`, `<span style="color:rgba(255,255,255,0.5)">${item.type || ''}</span>`,
`<span style="color:rgba(255,255,255,0.5)">${item.num || ''}</span>`, `<span style="color:rgba(255,255,255,0.5)">${item.num || ''}</span>`,
`<span style="color:rgba(255,255,255,0.5)">${(item.percent * 100).toFixed(2) || ''}</span>`, `<span style="color:rgba(255,255,255,0.5)">${item.percent|| ''}</span>`,
]) ])
this.ISRAConfig.data = ISRAArr this.ISRAConfig.data = ISRAArr
this.$refs['ISRAScrollBoard'].updateRows(ISRAArr) this.$refs['ISRAScrollBoard'].updateRows(ISRAArr)

View File

@ -2,7 +2,7 @@
* @Author: gtz * @Author: gtz
* @Date: 2022-01-19 15:58:17 * @Date: 2022-01-19 15:58:17
* @LastEditors: zhp * @LastEditors: zhp
* @LastEditTime: 2024-01-18 13:59:40 * @LastEditTime: 2024-01-17 14:57:00
* @Description: file content * @Description: file content
* @FilePath: \mt-bus-fe\src\views\OperationalOverview\components\baseContainer\index.vue * @FilePath: \mt-bus-fe\src\views\OperationalOverview\components\baseContainer\index.vue
--> -->
@ -229,7 +229,7 @@ export default {
} }
.bar-content { .bar-content {
padding: 1em; // padding: 1em;
flex: 1 auto; flex: 1 auto;
position: relative; position: relative;
} }

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-01-18 13:57:38 * @LastEditTime: 2024-01-17 13:52:44
* @Description: * @Description:
--> -->
<template> <template>
@ -34,7 +34,7 @@
:table-data="equipmentList" /> --> :table-data="equipmentList" /> -->
<!-- <base-table1 :page="1" :limit="999" :show-index="false" :table-config="qualityYearTableProps" <!-- <base-table1 :page="1" :limit="999" :show-index="false" :table-config="qualityYearTableProps"
:table-data="qualityYearList" /> --> :table-data="qualityYearList" /> -->
<dv-scroll-board class="eqTable" :config="eqConfig" style="width:100%;height:350px" ref='eqScrollBoard' /> <dv-scroll-board :config="eqConfig" style="width:100%;height:350px" ref='eqScrollBoard' />
</base-container> </base-container>
</el-col> </el-col>
@ -63,15 +63,37 @@
</el-row> --> </el-row> -->
<el-row v-for="op in orderList" :key="op.id" style="margin-bottom: 1em"> <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">{{ op.name }}</p> <el-progress :percentage="op.progressRate * 100" class="custom-progress-bar" />
<el-progress define-back-color="rgba(32, 57, 96, 1)" text-color="white"
:percentage="op.progressRate * 100" class="custom-progress-bar" />
<!-- <p v-if="op.progressRate === 1" class="now-secondary-title" style="color:#4679FD"> <!-- <p v-if="op.progressRate === 1" class="now-secondary-title" style="color:#4679FD">
<i class="el-icon-check" /> <i class="el-icon-check" />
{{ op.name }} {{ op.name }}
</p> --> </p> -->
<p class="now-secondary-title">{{ op.name }}</p>
<!-- </el-col> --> <!-- </el-col> -->
</el-row> </el-row>
<!-- <el-row>
<el-progress :percentage="100" class="custom-progress-bar" />
<p class="now-secondary-title" style="color:#4679FD">
<i class="el-icon-check" />
成都碲化镉5000一期订单
</p>
</el-row>
<el-row>
<el-progress :percentage="85" class="custom-progress-bar" />
<p class="now-secondary-title">成都碲化镉二订单</p>
</el-row>
<el-row>
<el-progress :percentage="85" class="custom-progress-bar" />
<p class="now-secondary-title">长利订单1000</p>
</el-row>
<el-row>
<el-progress :percentage="85" class="custom-progress-bar" />
<p class="now-secondary-title">国际工程20号订单</p>
</el-row>
<el-row>
<el-progress :percentage="85" class="custom-progress-bar" />
<p class="now-secondary-title">铜铟镓硒眉山10万订单</p>
</el-row> -->
</div> </div>
<!-- </div> --> <!-- </div> -->
</base-container> </base-container>
@ -80,8 +102,7 @@
<el-row :style="{ padding: '0 ' + 9 + 'px' }" :gutter="12" type="flex" class="flex-1"> <el-row :style="{ padding: '0 ' + 9 + 'px' }" :gutter="12" type="flex" class="flex-1">
<el-col :style="{ margin: 8 + 'px' + ' 0' }" :span="12"> <el-col :style="{ margin: 8 + 'px' + ' 0' }" :span="12">
<base-container :no-content-padding="true" :height="256" :size="'middle'" :title="'能源监控'" <base-container :height="256" :size="'middle'" :title="'能源监控'" :title-icon="'energyMonitoring'">
:title-icon="'energyMonitoring'">
<!-- <div style="width: 45%;position: absolute; top: 3em; right: 3em;"> <!-- <div style="width: 45%;position: absolute; top: 3em; right: 3em;">
<top-radio-group /> <top-radio-group />
</div> --> </div> -->
@ -103,8 +124,7 @@
</base-container> </base-container>
</el-col> </el-col>
<el-col :style="{ margin: 8 + 'px' + ' 0' }" :span="12"> <el-col :style="{ margin: 8 + 'px' + ' 0' }" :span="12">
<base-container :no-content-padding="true" :height="318 + 338 + 16" :size="'middle'" :title="'产线产量及良品率'" <base-container :height="318 + 338 + 16" :size="'middle'" :title="'产线产量及良品率'" :title-icon="'productLine'">
:title-icon="'productLine'">
<!-- <div style="width: 45%;position: absolute; top: 3em; right: 3em;"> <!-- <div style="width: 45%;position: absolute; top: 3em; right: 3em;">
<top-radio-group /> <top-radio-group />
</div> --> </div> -->
@ -404,26 +424,21 @@ const qualityYearTableProps = [
] ]
const qualityYearList = [ const qualityYearList = [
{ name: '钢化炉', code: '21321312', status: '运行', error: '否' },
{ name: '磨边机', code: '32323232', status: '运行', error: '否' },
{ name: '镀膜机', code: '32213213', status: '运行', error: '否' },
{ name: '钢化清洗机', code: '21321323', status: '运行', error: '否' },
{ name: '固化机', code: '21321321', status: '运行', error: '否' },
{ name: '磨边清洗机', code: '21321321', status: '运行', error: '否' },
{ name: '预热机', code: '21321321', status: '故障', error: '是' },
{ name: '下片机', code: '21321321', status: '运行', error: '否' },
{ {
name: '翻转机', code: 'EQ20240110112358000235', status: '运行', error: '否' }, name: '冷却机', code: '21321321', status: '运行', error: '否' },
{ {
name: '烘干炉', code: 'EQ20240110112537000241', status: '运行', error: '否' }, name: 'A储片机106', code: '21321321', status: '运行', error: '否' },
{ { name: '二次清洗机', code: '21321321', status: '运行', error: '否' },
name: '清洗机', code: ' EQ20240110112310000232', status: '运行', error: '否' }, { name: '二次磨边机', code: '21321321', status: '故障', error: '是' },
{ name: '钢化清洗机', code: 'EQ20240110111700000208', status: '运行', error: '否' }, { name: '测试设备', code: '21321321', status: '运行', error: '否' }
{ name: '固化机', code: 'EQ20240110111700000201', status: '运行', error: '否' },
{
name: '磨边清洗机', code: ' EQ20240110111700000208', status: '运行', error: '否' },
{ name: '预热机', code: 'EQ20240110111700000205', status: '故障', error: '是' },
{ name: '下片机', code: 'EQ20240115151435000279', status: '运行', error: '否' },
{
name: '冷却机', code: 'EQ20240110111700000203', status: '运行', error: '否' },
{
name: 'A储片机106', code: 'EQ20240110111700000202', status: '运行', error: '否' },
{ name: '二次清洗机', code: 'EQ20240110111700000209', status: '运行', error: '否' },
{
name: '二次磨边机', code: ' EQ20240110110927000181', status: '故障', error: '是' },
{ name: '测试设备', code: 'EQ20240110111700000201', status: '运行', error: '否' }
] ]
const qualityMonthTableProps = [ const qualityMonthTableProps = [
@ -448,43 +463,43 @@ const qualityMonthList = [
{ {
productionLineName: 'Y61', productionLineName: 'Y61',
sectionName: '成型', sectionName: '成型',
count: '3片', count: '199片',
inspectionTypeName: '细长泡' inspectionTypeName: '细长泡'
}, },
{ {
productionLineName: 'Y62', productionLineName: 'Y62',
sectionName: '组合落板', sectionName: '组合落板',
count: '4片', count: '123片',
inspectionTypeName: '细长泡' inspectionTypeName: '细长泡'
}, },
{ {
productionLineName: 'Y61', productionLineName: 'Y61',
sectionName: '磨边', sectionName: '磨边',
count: '6片', count: '212片',
inspectionTypeName: '开口泡' inspectionTypeName: '开口泡'
}, },
{ {
productionLineName: 'Y63', productionLineName: 'Y63',
sectionName: '清洗', sectionName: '清洗',
count: '5片', count: '33片',
inspectionTypeName: '结石' inspectionTypeName: '结石'
}, },
{ {
productionLineName: 'Y64', productionLineName: 'Y64',
sectionName: '打孔', sectionName: '打孔',
count: '2片', count: '332片',
inspectionTypeName: '结石' inspectionTypeName: '结石'
}, },
{ {
productionLineName: 'Y63', productionLineName: 'Y63',
sectionName: '成型', sectionName: '成型',
count: '7片', count: '432片',
inspectionTypeName: '开口泡' inspectionTypeName: '开口泡'
}, },
{ {
productionLineName: 'Y61', productionLineName: 'Y61',
sectionName: '上片', sectionName: '上片',
count: '8片', count: '200片',
inspectionTypeName: '结石' inspectionTypeName: '结石'
} }
] ]
@ -535,22 +550,22 @@ export default {
qualityYearTableProps, qualityYearTableProps,
cxNameList, cxNameList,
eqConfig: { eqConfig: {
header: ['序号', '设备名称', '设备编码', '设备状态', '是否故障'], header: ['序号', '设备名称', '工序', '损耗片数', '缺陷类型'],
headerBGC: 'rgba(32, 55, 96, 0.8)', headerBGC: 'rgba(32, 55, 96, 0.8)',
oddRowBGC: 'rgba(32, 55, 96, 0.8)', oddRowBGC: 'rgba(32, 55, 96, 0.8)',
evenRowBGC: 'rgba(14, 32, 62, 0.8)', evenRowBGC: 'rgba(14, 32, 62, 0.8)',
columnWidth: [70, 100, 200, 90, 90,], columnWidth: [70, 130, 100, 120, 110,],
align: ['center'], align: ['center'],
data: [], data: [],
// index:true, // index:true,
rowNum: 10 rowNum: 10
}, },
processConfig: { processConfig: {
header: ['序号', '产线名称', '工序', '损耗片数', '缺陷类型'], header: ['序号', '产线名', '设备编码', '设备状态', '是否故障'],
headerBGC: 'rgba(32, 55, 96, 0.8)', headerBGC: 'rgba(32, 55, 96, 0.8)',
oddRowBGC: 'rgba(32, 55, 96, 0.8)', oddRowBGC: 'rgba(32, 55, 96, 0.8)',
evenRowBGC: 'rgba(14, 32, 62, 0.8)', evenRowBGC: 'rgba(14, 32, 62, 0.8)',
columnWidth: [70, 130, 100, 120, 110,], columnWidth: [70, 70, 130, 150, 110,],
align: ['center'], align: ['center'],
data: [], data: [],
// index:true, // index:true,
@ -664,7 +679,7 @@ export default {
'get', 'get',
).then((res) => { ).then((res) => {
// console.log('11111', res); // console.log('11111', res);
if (res.data.length !==0) { if (res.data) {
let processArr = res.data.map((item, index) => [ let processArr = res.data.map((item, index) => [
// console.log(item) // console.log(item)
`<span style="color:rgba(255,255,255,0.5)" >${index + 1 || ''} `<span style="color:rgba(255,255,255,0.5)" >${index + 1 || ''}
@ -679,21 +694,6 @@ export default {
]) ])
this.processConfig.data = processArr this.processConfig.data = processArr
this.$refs['processScrollBoard'].updateRows(processArr) this.$refs['processScrollBoard'].updateRows(processArr)
} else {
let processArr = qualityMonthList.map((item, index) => [
// console.log(item)
`<span style="color:rgba(255,255,255,0.5)" >${index + 1 || ''}
</span>`,
// formatDate(item.planStartTime) || '',
`
<span style="color:rgba(255,255,255,0.5)" >${item.productionLineName || ''}
</span>`,
`<span style="color:rgba(255,255,255,0.5)">${item.sectionName || ''}</span>`,
`<span style="color:rgba(255,255,255,0.5)">${item.count || ''}</span>`,
`<span style="color:rgba(255,255,255,0.5)">${item.inspectionTypeName || ''}</span>`,
])
this.processConfig.data = processArr
this.$refs['processScrollBoard'].updateRows(processArr)
} }
}) })
}, },
@ -844,22 +844,6 @@ export default {
// console.log(this.EnergyMonitoringList) // console.log(this.EnergyMonitoringList)
// this.$nextTick(() => { // this.$nextTick(() => {
// this.$refs.productLineChart.initChart(Array.from(new Set(nameList)), passRateList, outputNumList) // this.$refs.productLineChart.initChart(Array.from(new Set(nameList)), passRateList, outputNumList)
} else {
console.log(this.qualityYearList);
let eqArr = this.qualityYearList.map((item,index) => [
`<span style="color:rgba(255,255,255,0.5)" >${index + 1 || ''}
</span>`,
// formatDate(item.planStartTime) || '',
`
<span style="color:rgba(255,255,255,0.5)" >${item.name || ''}
</span>`,
`<span style="color:rgba(255,255,255,0.5)">${item.code || ''}</span>`,
`<span style="color:rgba(255,255,255,0.5)">${item.status || ''}</span>`,
`<span style="color:rgba(255,255,255,0.5)">${item.error || ''}</span>`,
])
this.eqConfig.data = eqArr
this.$refs['eqScrollBoard'].updateRows(eqArr)
} }
}, },
// //
@ -1044,6 +1028,10 @@ export default {
background-color: unset; background-color: unset;
background-image: linear-gradient(to right, #4573fe, #47f8dc); background-image: linear-gradient(to right, #4573fe, #47f8dc);
} }
// ::v-deep .el-progress-bar__outer {
// background-color:rgba(71, 248, 220, 1);
// // background-image: rgba(71, 248, 220, 1))
// }
.visual-select { .visual-select {
position: absolute; position: absolute;
right: 1em; right: 1em;
@ -1113,6 +1101,7 @@ export default {
margin-left: 3em; margin-left: 3em;
} }
} }
</style> </style>
<style scoped> <style scoped>
@ -1129,7 +1118,4 @@ export default {
/* .container-main { /* .container-main {
min-height: calc(100vh - 10em); min-height: calc(100vh - 10em);
} */ } */
.eqTable{
overflow: hidden;
}
</style> </style>

View File

@ -1,4 +1,4 @@
<!-- <!--
filename: index.vue filename: index.vue
author: liubin author: liubin
date: 2023-09-04 09:34:52 date: 2023-09-04 09:34:52

View File

@ -104,7 +104,7 @@ export default {
label: '工段', label: '工段',
}, },
{ {
prop: 'inspectionInfoList', prop: 'inspectionDetContent',
label: '检测内容', label: '检测内容',
} }
], ],
@ -133,23 +133,17 @@ export default {
// this.getList(); // this.getList();
}, },
methods: { methods: {
getDataList() { /** 查询列表 */
this.dataListLoading = true; // getList() {
this.urlOptions.getDataListURL(this.listQuery).then(response => { // this.loading = true;
this.tableData = response.data.map((item) => { // //
// console.log(item); // getQualityInspectionBoxBtnPage(this.listQuery).then((response) => {
return { // this.list = response.data.list;
inspectionInfoList: item.inspectionInfoList.toString(), // this.total = response.data.total;
productionLineId:item.productionLineId, // this.loading = false;
productionLineName:item.productionLineName, // });
sectionId: item.sectionId, // },
sectionName: item.sectionName /** 表单重置 */
}
})
this.listQuery.total = response.data.total;
this.dataListLoading = false;
});
},
reset() { reset() {
this.form = { this.form = {
id: null, id: null,

View File

@ -1,175 +0,0 @@
/*
* @Author: zhp
* @Date: 2024-01-17 16:59:30
* @LastEditTime: 2024-01-17 16:59:30
* @LastEditors: zhp
* @Description:
*/
/*
* @Author: zwq
* @Date: 2022-08-24 11:19:43
* @LastEditors: zhp
* @LastEditTime: 2024-01-10 10:29:29
* @Description:
*/
export default {
data() {
/* eslint-disable */
return {
urlOptions: {
getDataListURL: '',
deleteURL: '',
statusUrl: '',
exportURL: ''
},
tableData: [],
listQuery: {
pageSize: 10,
pageNo: 1,
total: 1,
},
exportLoading: false,
dataListLoading: false,
addOrEditTitle: '',
addOrUpdateVisible: false,
}
},
created() {
},
mounted() {
// this.getDataList()
},
methods: {
// 获取数据列表
getDataList() {
this.dataListLoading = true;
this.urlOptions.getDataListURL(this.listQuery).then(response => {
this.tableData = response.data.list;
this.listQuery.total = response.data.total;
this.dataListLoading = false;
});
},
// 每页数
sizeChangeHandle(val) {
this.listQuery.pageSize = val;
this.listQuery.pageNo = 1;
this.getDataList();
},
// 当前页
currentChangeHandle(val) {
this.listQuery.pageNo = val;
this.getDataList();
},
// 新增 / 修改
addOrUpdateHandle(id) {
this.addOrUpdateVisible = true;
this.$nextTick(() => {
this.$refs.addOrUpdate.init(id);
});
},
cancel(id) {
this.$refs["popover-" + id].showPopper = false;
},
//改变状态
changeStatus(id) {
this.$http
.post(this.urlOptions.statusUrl, { id })
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg);
}
this.$refs["popover-" + id].showPopper = false;
this.$message({
message: this.$t("prompt.success"),
type: "success",
duration: 500,
onClose: () => {
this.getDataList();
},
});
})
.catch(() => { });
},
//tableBtn点击
handleClick(val) {
if (val.type === "edit") {
this.addOrUpdateVisible = true;
this.addOrEditTitle = "编辑";
this.$nextTick(() => {
this.$refs.addOrUpdate.init(val.data.id);
});
} else if (val.type === "delete") {
this.deleteHandle(val.data.id, val.data.name, val.data._pageIndex,val.data)
} else if (val.type === "change") {
this.changeStatus(val.data.id)
} else {
this.otherMethods(val)
}
},
// 删除
deleteHandle(id, name, index) {
this.$confirm(`确定对${name ? '[名称=' + name + ']' : '[序号=' + index + ']'}进行删除操作?`, "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
this.urlOptions.deleteURL(id).then(({ data }) => {
this.$message({
message: "操作成功",
type: "success",
duration: 1500,
onClose: () => {
this.getDataList();
},
});
});
})
.catch(() => { });
},
//search-bar点击
buttonClick(val) {
switch (val.btnName) {
case "search":
this.listQuery.xm1 = val.xm1;
this.listQuery.xm2 = val.xm2;
this.listQuery.pageNo = 1;
this.getDataList();
break;
case "add":
this.addOrEditTitle = '新增'
this.addOrUpdateVisible = true;
this.addOrUpdateHandle()
break;
default:
console.log(val)
}
},
handleCancel() {
this.$refs.addOrUpdate.formClear()
this.addOrUpdateVisible = false
this.addOrEditTitle = ''
},
handleConfirm() {
this.$refs.addOrUpdate.dataFormSubmit()
},
successSubmit() {
this.handleCancel()
this.getDataList()
},
/** 导出按钮操作 */
handleExport() {
// 处理查询参数
let params = { ...this.queryParams };
params.pageNo = undefined;
params.pageSize = undefined;
this.$modal.confirm('是否确认导出所有数据项?').then(() => {
this.exportLoading = true;
return this.urlOptions.exportURL(params);
}).then(response => {
this.$download.excel(response, '工厂.xls');
this.exportLoading = false;
}).catch(() => { });
}
}
}

View File

@ -20,7 +20,7 @@
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 basicPage from './basic-page'; import basicPage from '../../../core/mixins/basic-page';
import { parseTime } from '../../../core/mixins/code-filter'; import { parseTime } from '../../../core/mixins/code-filter';
import { import {
getQualityScrapLogPage, getQualityScrapLogPage,