部分bug

This commit is contained in:
helloDy
2023-11-24 09:13:56 +08:00
parent 8dbc1d512d
commit 9041428003
13 changed files with 179 additions and 51 deletions

View File

@@ -52,6 +52,7 @@ import { publicFormatter } from '@/utils/dict';
import moment from 'moment';
import basicPageMixin from '@/mixins/lb/basicPageMixin';
import { exportMaintainMonitorExcel } from '@/api/equipment/base/maintain/record'
import { parseTime } from '@/utils/ruoyi'
const remainBox = {
name: 'RemainBox',
@@ -99,7 +100,7 @@ const btn = {
render: function (h) {
return (
<el-button type="text" onClick={this.handleClick}>
{this.injectData.label}
{this.injectData.name}
</el-button>
);
},
@@ -113,16 +114,16 @@ export default {
return {
searchBarKeys: ['planId', 'equipmentId'],
tableProps: [
{
prop: 'createTime',
label: '添加时间',
fixed: true,
width: 180,
filter: (val) => moment(val).format('yyyy-MM-DD HH:mm:ss'),
},
// {
// prop: 'createTime',
// label: '添加时间',
// fixed: true,
// width: 180,
// filter: parseTime(createTime),
// },
{ prop: 'name', label: '保养计划' },
{ prop: 'lineName', label: '产线' },
{ prop: 'sectionName', label: '工段' },
{ prop: 'lineName', label: '产线' },
{ prop: 'sectionName', label: '工段' },
{ prop: 'equipmentName', label: '设备名称' },
{ prop: 'equipmentCode', label: '设备编码' },
{ prop: 'maintenancePeriod', label: '保养频率' },
@@ -134,16 +135,16 @@ export default {
{
prop: 'lastMaintainTime',
label: '上次保养时间',
filter: (val) => moment(val).format('yyyy-MM-DD HH:mm:ss'),
filter: parseTime,
},
{ prop: 'nextMaintainTime', label: '计划下次保养时间' },
{ prop: 'nextMaintainTime', label: '计划下次保养时间', filter: parseTime },
{
prop: 'remainDays',
label: '距离保养时间(天)',
subcomponent: remainBox,
},
{ prop: 'opt1', label: '设备保养', subcomponent: btn },
{ prop: 'opt2', label: '保养记录', subcomponent: btn },
{ prop: 'opt1', label: '设备保养', name: '操作', subcomponent: btn },
{ prop: 'opt2', label: '保养记录', name: '查看详情', subcomponent: btn },
],
searchBarFormConfig: [
{
@@ -243,15 +244,16 @@ export default {
switch (action) {
// 查看详情
case '设备保养':
this.$router.push({ path: '/equipment/base/maintain/plan-config',query: {
equipmentId: value.equipmentId,
equipmentName: value.equipmentName
this.$router.push({ path: '/equipment/base/maintain/record',query: {
addRecord: 1,
row: value
} })
break;
case '保养记录':
const queryData = {
equipmentId: value.equipmentId,
maintainPlanId: value.id
maintainPlanId: value.id,
relatePlan: value.lastMaintainTime ? 1 : 2
}
this.$router.push({ path: '/equipment/base/maintain/record',query: queryData })
break;