bug --
This commit is contained in:
@@ -73,7 +73,7 @@ const remainBox = {
|
||||
color() {
|
||||
if (this.value) {
|
||||
const v = +this.value;
|
||||
return v < 0 ? 'red' : v >= 0 && v < 2 ? 'yellow' : 'green';
|
||||
return v <= 1 ? 'red' : v > 1 && v <= 2 ? 'yellow' : 'green';
|
||||
}
|
||||
return 'unset';
|
||||
},
|
||||
@@ -84,9 +84,10 @@ const remainBox = {
|
||||
style={`background: ${
|
||||
this.color
|
||||
}; position:absolute; inset: 0; padding: 0 10px; display: flex; align-items: center; color: ${
|
||||
this.color == 'red' ? '#fff' : 'unset'
|
||||
// this.color == 'red' ? '#fff' : 'unset'
|
||||
'#fff'
|
||||
}`}>
|
||||
{this.injectData[this.injectData.prop] || ''}
|
||||
{this.injectData[this.injectData.prop]?.toFixed(0) || ''}
|
||||
</div>
|
||||
);
|
||||
},
|
||||
@@ -128,22 +129,26 @@ export default {
|
||||
// width: 180,
|
||||
// filter: parseTime(createTime),
|
||||
// },
|
||||
{ prop: 'code', label: '保养计划单号' },
|
||||
{ prop: 'name', label: '保养计划名称' },
|
||||
{ prop: 'departmentName', label: '部门' },
|
||||
{ prop: 'lineName', label: '产线名' },
|
||||
{ prop: 'code', label: '保养计划单号', minWidth: 118, showOverflowtooltip: true },
|
||||
{ prop: 'name', label: '保养计划名称', minWidth: 118, showOverflowtooltip: true },
|
||||
{ prop: 'departmentName', label: '部门', minWidth: 100, showOverflowtooltip: true },
|
||||
{ prop: 'lineName', label: '产线名', minWidth: 100, showOverflowtooltip: true },
|
||||
{
|
||||
prop: 'lastPlanMaintainTime',
|
||||
label: '上次计划保养时间',
|
||||
filter: parseTime,
|
||||
minWidth: 160,
|
||||
showOverflowtooltip: true
|
||||
},
|
||||
{
|
||||
prop: 'lastMaintainTime',
|
||||
label: '上次实际保养时间',
|
||||
filter: parseTime,
|
||||
minWidth: 160,
|
||||
showOverflowtooltip: true
|
||||
},
|
||||
{ prop: 'nextPlanMaintainTime', label: '下次计划保养时间', filter: parseTime },
|
||||
{ prop: 'maintainer', label: '计划保养人员' },
|
||||
{ prop: 'nextPlanMaintainTime', label: '下次计划保养时间', filter: parseTime, minWidth: 160, showOverflowtooltip: true },
|
||||
{ prop: 'maintainer', label: '计划保养人员', minWidth: 160, showOverflowtooltip: true },
|
||||
// { prop: 'equipmentName', label: '设备名称' },
|
||||
// { prop: 'equipmentCode', label: '设备编码' },
|
||||
// { prop: 'maintenancePeriod', label: '保养频率' },
|
||||
@@ -153,11 +158,12 @@ export default {
|
||||
// filter: publicFormatter(this.DICT_TYPE.MAINTAIN_TYPE),
|
||||
// },
|
||||
// { prop: 'opt1', label: '设备保养', name: '操作', subcomponent: btn },
|
||||
{ prop: 'opt2', label: '保养内容', name: '详情', subcomponent: btn },
|
||||
{ prop: 'opt2', label: '保养内容', name: '详情', subcomponent: btn, width: 100 },
|
||||
{
|
||||
prop: 'remainDays',
|
||||
label: '距离下次保养剩余时间(天)',
|
||||
subcomponent: remainBox,
|
||||
minWidth: 210,
|
||||
}
|
||||
],
|
||||
searchBarFormConfig: [
|
||||
@@ -232,23 +238,24 @@ export default {
|
||||
.catch(() => { });
|
||||
},
|
||||
initSearchBar() {
|
||||
this.http('/base/core-equipment/page', 'get', {
|
||||
special: false,
|
||||
pageNo: 1,
|
||||
pageSize: 99
|
||||
}).then(({ data }) => {
|
||||
this.$set(
|
||||
this.searchBarFormConfig[1],
|
||||
'selectOptions',
|
||||
(data?.list || []).map((item) => ({
|
||||
name: item.name,
|
||||
id: item.id,
|
||||
}))
|
||||
);
|
||||
});
|
||||
// this.http('/base/core-equipment/page', 'get', {
|
||||
// special: false,
|
||||
// pageNo: 1,
|
||||
// pageSize: 99
|
||||
// }).then(({ data }) => {
|
||||
// this.$set(
|
||||
// this.searchBarFormConfig[1],
|
||||
// 'selectOptions',
|
||||
// (data?.list || []).map((item) => ({
|
||||
// name: item.name,
|
||||
// id: item.id,
|
||||
// }))
|
||||
// );
|
||||
// });
|
||||
this.http('/base/equipment-maintain-plan/page', 'get', {
|
||||
pageNo: 1,
|
||||
pageSize: 100,
|
||||
special: false
|
||||
}).then(({ data }) => {
|
||||
this.$set(
|
||||
this.searchBarFormConfig[0],
|
||||
|
||||
Reference in New Issue
Block a user