设备保养
This commit is contained in:
@@ -31,7 +31,7 @@
|
||||
@pagination="getList" />
|
||||
|
||||
<!-- 对话框(添加 / 修改) -->
|
||||
<base-dialog
|
||||
<!-- <base-dialog
|
||||
:dialogTitle="title"
|
||||
:dialogVisible="open"
|
||||
@close="cancel"
|
||||
@@ -43,7 +43,11 @@
|
||||
v-model="form"
|
||||
:has-files="false"
|
||||
:rows="rows" />
|
||||
</base-dialog>
|
||||
</base-dialog> -->
|
||||
<add-content
|
||||
v-if="addContent"
|
||||
ref="addContent"
|
||||
@refreshDataList="addContent = false" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -53,6 +57,7 @@ import moment from 'moment';
|
||||
import basicPageMixin from '@/mixins/lb/basicPageMixin';
|
||||
import { exportMaintainMonitorExcel } from '@/api/equipment/base/maintain/record'
|
||||
import { parseTime } from '@/utils/ruoyi'
|
||||
import AddContent from '../PlanConfig/addContent.vue';
|
||||
|
||||
const remainBox = {
|
||||
name: 'RemainBox',
|
||||
@@ -107,11 +112,12 @@ const btn = {
|
||||
};
|
||||
|
||||
export default {
|
||||
name: 'PlanConfig',
|
||||
components: {},
|
||||
name: 'Monitor',
|
||||
components: { AddContent },
|
||||
mixins: [basicPageMixin],
|
||||
data() {
|
||||
return {
|
||||
addContent: false,
|
||||
searchBarKeys: ['planId', 'equipmentId'],
|
||||
tableProps: [
|
||||
// {
|
||||
@@ -121,46 +127,53 @@ export default {
|
||||
// width: 180,
|
||||
// filter: parseTime(createTime),
|
||||
// },
|
||||
{ prop: 'name', label: '保养计划' },
|
||||
{ prop: 'code', label: '保养计划单号' },
|
||||
{ prop: 'name', label: '保养计划名称' },
|
||||
{ prop: 'departmentName', label: '部门' },
|
||||
{ prop: 'lineName', label: '产线名' },
|
||||
{ prop: 'sectionName', label: '工段名' },
|
||||
{ prop: 'equipmentName', label: '设备名称' },
|
||||
{ prop: 'equipmentCode', label: '设备编码' },
|
||||
{ prop: 'maintenancePeriod', label: '保养频率' },
|
||||
{
|
||||
prop: 'maintainType',
|
||||
label: '保养类型',
|
||||
filter: publicFormatter(this.DICT_TYPE.MAINTAIN_TYPE),
|
||||
prop: 'lastPlanMaintainTime',
|
||||
label: '上次计划保养时间',
|
||||
filter: parseTime,
|
||||
},
|
||||
{
|
||||
prop: 'lastMaintainTime',
|
||||
label: '上次保养时间',
|
||||
label: '上次实际保养时间',
|
||||
filter: parseTime,
|
||||
},
|
||||
{ prop: 'nextMaintainTime', label: '计划下次保养时间', filter: parseTime },
|
||||
{ prop: 'nextMaintainTime', label: '下次计划保养时间', filter: parseTime },
|
||||
{ prop: 'maintainer', label: '计划保养人员' },
|
||||
// { prop: 'equipmentName', label: '设备名称' },
|
||||
// { prop: 'equipmentCode', label: '设备编码' },
|
||||
// { prop: 'maintenancePeriod', label: '保养频率' },
|
||||
// {
|
||||
// prop: 'maintainType',
|
||||
// label: '保养类型',
|
||||
// filter: publicFormatter(this.DICT_TYPE.MAINTAIN_TYPE),
|
||||
// },
|
||||
// { prop: 'opt1', label: '设备保养', name: '操作', subcomponent: btn },
|
||||
{ prop: 'opt2', label: '保养内容', name: '详情', subcomponent: btn },
|
||||
{
|
||||
prop: 'remainDays',
|
||||
label: '距离保养时间(天)',
|
||||
label: '距离下次保养剩余时间(天)',
|
||||
subcomponent: remainBox,
|
||||
},
|
||||
{ prop: 'opt1', label: '设备保养', name: '操作', subcomponent: btn },
|
||||
{ prop: 'opt2', label: '保养记录', name: '查看详情', subcomponent: btn },
|
||||
}
|
||||
],
|
||||
searchBarFormConfig: [
|
||||
{
|
||||
type: 'select',
|
||||
label: '保养计划',
|
||||
label: '保养计划名称',
|
||||
placeholder: '请选择保养计划',
|
||||
param: 'planId',
|
||||
filterable: true,
|
||||
},
|
||||
{
|
||||
type: 'select',
|
||||
label: '设备名',
|
||||
placeholder: '请选择设备',
|
||||
param: 'equipmentId',
|
||||
filterable: true,
|
||||
},
|
||||
// {
|
||||
// type: 'select',
|
||||
// label: '设备名',
|
||||
// placeholder: '请选择设备',
|
||||
// param: 'equipmentId',
|
||||
// filterable: true,
|
||||
// },
|
||||
{
|
||||
type: 'button',
|
||||
btnName: '查询',
|
||||
@@ -255,13 +268,18 @@ export default {
|
||||
row: value
|
||||
} })
|
||||
break;
|
||||
case '保养记录':
|
||||
const queryData = {
|
||||
equipmentId: value.equipmentId,
|
||||
maintainPlanId: value.id,
|
||||
relatePlan: value.lastMaintainTime ? 1 : 2
|
||||
}
|
||||
this.$router.push({ path: '/equipment/base/maintain/record',query: queryData })
|
||||
case '保养内容':
|
||||
// 保养内容
|
||||
this.addContent = true;
|
||||
this.$nextTick(() => {
|
||||
this.$refs.addContent.init(value.id, true);
|
||||
});
|
||||
// const queryData = {
|
||||
// equipmentId: value.equipmentId,
|
||||
// maintainPlanId: value.id,
|
||||
// relatePlan: value.lastMaintainTime ? 1 : 2
|
||||
// }
|
||||
// this.$router.push({ path: '/equipment/base/maintain/record',query: queryData })
|
||||
break;
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user