调整alarm logs的返回数据
This commit is contained in:
@@ -906,9 +906,7 @@ class Sf_Dashboard_Connect(http.Controller):
|
|||||||
'name': log.name,
|
'name': log.name,
|
||||||
'alarm_time': log.alarm_time.strftime('%Y-%m-%d %H:%M:%S'),
|
'alarm_time': log.alarm_time.strftime('%Y-%m-%d %H:%M:%S'),
|
||||||
'fault_alarm_info': log.fault_alarm_info,
|
'fault_alarm_info': log.fault_alarm_info,
|
||||||
'status': log.status,
|
'fault_process': log.fault_process
|
||||||
'note': log.note,
|
|
||||||
'alarm_level': log.alarm_level
|
|
||||||
})
|
})
|
||||||
|
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
@@ -916,7 +914,6 @@ class Sf_Dashboard_Connect(http.Controller):
|
|||||||
|
|
||||||
return json.dumps(res)
|
return json.dumps(res)
|
||||||
|
|
||||||
|
|
||||||
# 设备oee
|
# 设备oee
|
||||||
@http.route('/api/OEE', type='http', auth='public', methods=['GET', 'POST'], csrf=False, cors="*")
|
@http.route('/api/OEE', type='http', auth='public', methods=['GET', 'POST'], csrf=False, cors="*")
|
||||||
def OEE(self, **kw):
|
def OEE(self, **kw):
|
||||||
|
|||||||
@@ -10,7 +10,6 @@ class SfMaintenanceLogs(models.Model):
|
|||||||
code = fields.Char(string='编码', readonly=True)
|
code = fields.Char(string='编码', readonly=True)
|
||||||
name = fields.Char(string='名称', compute='_compute_name')
|
name = fields.Char(string='名称', compute='_compute_name')
|
||||||
type = fields.Selection([('type1', '类型1'), ('type2', '类型2')], string='类型')
|
type = fields.Selection([('type1', '类型1'), ('type2', '类型2')], string='类型')
|
||||||
status = fields.Selection([('待处理', '待处理'), ('已处理', '已处理')], string='状态', default='待处理')
|
|
||||||
brand = fields.Many2one('sf.machine.brand', related='maintenance_equipment_id.brand_id', string='品牌')
|
brand = fields.Many2one('sf.machine.brand', related='maintenance_equipment_id.brand_id', string='品牌')
|
||||||
maintenance_equipment_id = fields.Many2one('maintenance.equipment', string='机台号')
|
maintenance_equipment_id = fields.Many2one('maintenance.equipment', string='机台号')
|
||||||
maintenance_equipment_oee_id = fields.Many2one('maintenance.equipment.oee', string='设备oee')
|
maintenance_equipment_oee_id = fields.Many2one('maintenance.equipment.oee', string='设备oee')
|
||||||
|
|||||||
@@ -58,9 +58,6 @@
|
|||||||
</group>
|
</group>
|
||||||
<group>
|
<group>
|
||||||
<field name="operator"/>
|
<field name="operator"/>
|
||||||
<field name="status"/>
|
|
||||||
|
|
||||||
|
|
||||||
<field name="fault_process"/>
|
<field name="fault_process"/>
|
||||||
<!-- <field name="alarm_way" required="1" widget="radio" options="{'horizontal': true}"/> -->
|
<!-- <field name="alarm_way" required="1" widget="radio" options="{'horizontal': true}"/> -->
|
||||||
<field name="recovery_time"/>
|
<field name="recovery_time"/>
|
||||||
@@ -86,7 +83,6 @@
|
|||||||
<search>
|
<search>
|
||||||
<searchpanel>
|
<searchpanel>
|
||||||
<field name="maintenance_equipment_id" icon="fa-building" enable_counters="1"/>
|
<field name="maintenance_equipment_id" icon="fa-building" enable_counters="1"/>
|
||||||
<field name="status" icon="fa-building" enable_counters="1"/>
|
|
||||||
</searchpanel>
|
</searchpanel>
|
||||||
<field name="code"/>
|
<field name="code"/>
|
||||||
<field name="name"/>
|
<field name="name"/>
|
||||||
|
|||||||
Reference in New Issue
Block a user