ui
This commit is contained in:
@@ -74,8 +74,7 @@ const remainBox = {
|
||||
value() {
|
||||
const temp = this.injectData[this.injectData.prop] || null;
|
||||
if (temp) {
|
||||
console.log('12', temp);
|
||||
return temp === 'Green' ? 'green' : 'red';
|
||||
return temp === 'Green' ? '未超期' : temp === 'Red' ? '已超期' : '即将超期';
|
||||
}
|
||||
return this.injectData[this.injectData.prop] || null;
|
||||
},
|
||||
@@ -83,7 +82,7 @@ const remainBox = {
|
||||
if (this.value) {
|
||||
// const v = +this.value;
|
||||
// return v < 0 ? 'red' : v >= 0 && v < 2 ? 'yellow' : 'green';
|
||||
return this.value;
|
||||
return this.value === '未超期' ? '#37D97F' : this.value === '已超期' ? '#FF5454' : '#FFD767';
|
||||
}
|
||||
return 'unset';
|
||||
},
|
||||
@@ -95,9 +94,9 @@ const remainBox = {
|
||||
this.color
|
||||
// this.color == 'Green' ? 'green' : this.color == 'Red' ? 'red' : 'yellow'
|
||||
}; position:absolute; inset: 0; padding: 0 10px; display: flex; align-items: center; color: ${
|
||||
this.color == 'red' || this.color == 'green' ? '#fff' : 'unset'
|
||||
'#fff'
|
||||
}`}>
|
||||
{this.injectData[this.injectData.prop] || ''}
|
||||
{this.value}
|
||||
</div>
|
||||
);
|
||||
},
|
||||
@@ -155,18 +154,19 @@ export default {
|
||||
// : undefined,
|
||||
].filter((v) => v),
|
||||
tableProps: [
|
||||
{ prop: 'name', label: '配置名' },
|
||||
{ prop: 'lineName', label: '产线名称' },
|
||||
{ prop: 'sectionName', label: '工段名' },
|
||||
{ prop: 'equipmentName', label: '设备名称' },
|
||||
{ prop: 'responsible', label: '负责人' },
|
||||
{ prop: 'name', label: '配置名', showOverflowtooltip: true },
|
||||
{ prop: 'lineName', label: '产线名称', showOverflowtooltip: true },
|
||||
{ prop: 'sectionName', label: '工段名', showOverflowtooltip: true },
|
||||
{ prop: 'equipmentName', label: '设备名称', showOverflowtooltip: true },
|
||||
{ prop: 'responsible', label: '负责人', minWidth: 130, showOverflowtooltip: true },
|
||||
{ prop: 'color', label: '是否超期', subcomponent: remainBox },
|
||||
{ prop: 'opt1', label: '备件更换', name: '操作', subcomponent: btn },
|
||||
{ prop: 'opt1', label: '备件更换', name: '操作', subcomponent: btn, width: 110 },
|
||||
{
|
||||
prop: 'opt2',
|
||||
label: '更换记录',
|
||||
name: '更新记录',
|
||||
subcomponent: btn,
|
||||
width: 110
|
||||
}, // TODO: 是否换成按钮, 群里问
|
||||
// { prop: 'remark', label: '备注' },
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user