update
This commit is contained in:
@@ -27,8 +27,8 @@ const PriorityComponent = {
|
||||
}
|
||||
},
|
||||
methods: {},
|
||||
render: function(h) {
|
||||
return h('span', { style: { display: 'inline-block', borderRadius: '2px', padding: '2px 8px', color: '#fff', opacity: '0.6', backgroundColor: this.bgColor }}, this.priorityText)
|
||||
render: function (h) {
|
||||
return h('span', { style: { display: 'inline-block', borderRadius: '2px', padding: '2px 8px', color: '#fff', opacity: '0.6', backgroundColor: this.bgColor } }, this.priorityText)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -70,12 +70,12 @@ const LifeRemainComponent = {
|
||||
}
|
||||
|
||||
},
|
||||
render: function(h) {
|
||||
render: function (h) {
|
||||
return h('span', {
|
||||
style:
|
||||
{ position: 'absolute', top: 0, left: 0, right: 0, bottom: 0, width: '100%', height: '100%', display: 'flex', justifyContent: 'center', alignItems: 'center', opacity: '0.8', backgroundColor: this.statusColor, color: '#fff' }
|
||||
},
|
||||
this.injectData.remain)
|
||||
this.injectData.remain)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -132,20 +132,27 @@ export const sparepartsProps = [
|
||||
]
|
||||
|
||||
export const sparepartsDatalist = [
|
||||
{ 'name': '激光打印', 'eq': 'A2一次固化机', 'pl': 'C线', 'update_time': '2007-08-31 09:15:24', 'remain': -32, 'stock': 457, 'location': '库位74' },
|
||||
{ 'name': '激光打孔', 'eq': 'A2一次固化机', 'pl': 'C线', 'update_time': '2007-08-31 09:15:24', 'remain': -32, 'stock': 457, 'location': '库位74' },
|
||||
{ 'name': '磨边单元', 'eq': 'B1一次冷却机', 'pl': 'C线', 'update_time': '2016-10-02 22:23:09', 'remain': -95, 'stock': 5600, 'location': '库位10' },
|
||||
{ 'name': '激光打印', 'eq': 'B1一次冷却机', 'pl': 'C线', 'update_time': '1996-09-17 08:57:52', 'remain': 46, 'stock': 6069, 'location': '库位87' },
|
||||
{ 'name': '激光打孔', 'eq': 'B1一次冷却机', 'pl': 'C线', 'update_time': '1996-09-17 08:57:52', 'remain': 46, 'stock': 6069, 'location': '库位87' },
|
||||
{ 'name': '磨边单元', 'eq': 'A2一次固化机', 'pl': 'D线', 'update_time': '2018-07-18 13:15:01', 'remain': 86, 'stock': 2342, 'location': '库位83' },
|
||||
{ 'name': '上片机器人', 'eq': 'A2一次固化机', 'pl': 'E线', 'update_time': '1998-06-11 09:01:10', 'remain': 84, 'stock': 4359, 'location': '库位12' },
|
||||
{ 'name': '丝印', 'eq': 'A1一次固化机', 'pl': 'E线', 'update_time': '2016-02-13 16:20:01', 'remain': -23, 'stock': 888, 'location': '库位69' },
|
||||
{ 'name': '激光打印', 'eq': 'A1磨边清洗机', 'pl': 'B线', 'update_time': '2002-04-07 19:13:29', 'remain': 62, 'stock': 4366, 'location': '库位99' },
|
||||
{ 'name': '激光打孔', 'eq': 'A1磨边清洗机', 'pl': 'B线', 'update_time': '2002-04-07 19:13:29', 'remain': 62, 'stock': 4366, 'location': '库位99' },
|
||||
{ 'name': '丝印', 'eq': 'A1一次固化机', 'update_time': '1980-01-17 04:29:56', 'remain': 73, 'stock': 305, 'location': '库位68' },
|
||||
{ 'name': '激光打印', 'eq': 'A2一次冷却机', 'pl': 'B线', 'update_time': '2014-02-25 17:19:43', 'remain': 36, 'stock': 199, 'location': '库位86' },
|
||||
{ 'name': '激光打孔', 'eq': 'A2一次冷却机', 'pl': 'B线', 'update_time': '2014-02-25 17:19:43', 'remain': 36, 'stock': 199, 'location': '库位86' },
|
||||
{ 'name': '上片机器人', 'eq': 'A2一次冷却机', 'pl': 'C线', 'update_time': '2017-01-23 17:01:29', 'remain': -3, 'stock': 146, 'location': '库位79' },
|
||||
{ 'name': '镀膜', 'eq': 'A2一次固化机', 'pl': 'D线', 'update_time': '2013-02-19 01:29:19', 'remain': 37, 'stock': 6977, 'location': '库位85' },
|
||||
{ 'name': '激光打印', 'eq': 'A1预热机', 'pl': 'B线', 'update_time': '1972-04-26 06:54:43', 'remain': -82, 'stock': 5039, 'location': '库位38' }
|
||||
{ 'name': '激光打孔', 'eq': 'A1预热机', 'pl': 'B线', 'update_time': '1972-04-26 06:54:43', 'remain': -82, 'stock': 5039, 'location': '库位38' }
|
||||
]
|
||||
|
||||
import { default as blue } from './blue.png'
|
||||
import { default as orange } from './orange.png'
|
||||
import { default as green } from './green.png'
|
||||
import { default as red } from './red.png'
|
||||
|
||||
console.log('blue', blue)
|
||||
|
||||
const StatusComponent = {
|
||||
name: 'StatusComponent',
|
||||
props: {
|
||||
@@ -153,28 +160,28 @@ const StatusComponent = {
|
||||
},
|
||||
computed: {
|
||||
statusColor() {
|
||||
const colors = [
|
||||
'#67ff55',
|
||||
'green',
|
||||
'#ffb70c',
|
||||
'#0b58ff',
|
||||
'#ff0c0c'
|
||||
const colors = [green, orange, blue, red
|
||||
// '#67ff55',
|
||||
// '#e0e0e0',
|
||||
// '#ffb70c',
|
||||
// '#0b58ff',
|
||||
// '#ff0c0c'
|
||||
]
|
||||
return colors[this.injectData.status - 1]
|
||||
},
|
||||
statusText() {
|
||||
return [
|
||||
'已完成',
|
||||
'已下发',
|
||||
// '已下发',
|
||||
'已暂定',
|
||||
'进行中',
|
||||
'已结束'
|
||||
][this.injectData.status - 1]
|
||||
}
|
||||
},
|
||||
render: function(h) {
|
||||
return h('span', { style: { display: 'flex', /** justifyContent: 'center', */ alignItems: 'center', color: '#ffffffb3' }}, [
|
||||
h('span', { style: { width: 'calc(6px * var(--beilv))', height: 'calc(6px * var(--beilv))', borderRadius: '50%', backgroundColor: this.statusColor, boxShadow: '0 0 2px 2px ' + this.statusColor, marginRight: 'calc(8px * var(--beilv))' }}, ''),
|
||||
render: function (h) {
|
||||
return h('span', { style: { display: 'flex', /** justifyContent: 'center', */ alignItems: 'center', color: '#ffffffb3' } }, [
|
||||
h('span', { style: { width: 'calc(16px * var(--beilv))', height: 'calc(16px * var(--beilv))', background: `url(${this.statusColor}) no-repeat`, backgroundSize: '100%', marginRight: 'calc(8px * var(--beilv))' } }, ''),
|
||||
h('span', this.statusText)
|
||||
])
|
||||
}
|
||||
@@ -190,8 +197,8 @@ export const rightSideProps = [
|
||||
]
|
||||
|
||||
export const rightSideDatalist = [
|
||||
{ 'orderId': 'OD_3719', 'eq': 'A2一次固化机', 'pl': 'E线', 'status': 2, 'charger': '任洋', 'duration': 5 },
|
||||
{ 'orderId': 'OD_6564', 'eq': 'B1二次镀膜机', 'pl': 'D线', 'status': 2, 'charger': '廖丽', 'duration': 6 },
|
||||
{ 'orderId': 'OD_3719', 'eq': 'A2一次固化机', 'pl': 'E线', 'status': 1, 'charger': '任洋', 'duration': 5 },
|
||||
{ 'orderId': 'OD_6564', 'eq': 'B1二次镀膜机', 'pl': 'D线', 'status': 1, 'charger': '廖丽', 'duration': 6 },
|
||||
{ 'orderId': 'OD_125', 'eq': 'A钢化炉', 'pl': 'E线', 'status': 3, 'charger': '赖秀兰', 'duration': 2 }
|
||||
// { "orderId": "OD_7103", "pl": "C线", "status": 3, "charger": "邱伟", "duration": 7 },
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user