123456789101112131415161718192021222324252627282930313233343536373839404142434445 |
- export const red1 = (num, flag, then) => {
- if (num == flag)
- return {
- color: 'red',
- num: then,
- }
- else {
- return {
- color: 'black',
- num,
- }
- }
- }
- export const c250_100Red = (num) => {
- return red1(num, 250, -100)
- }
- export const c250_1Red = (num) => {
- return red1(num, 250, -1)
- }
- // 温度
- export const temp1 = c250_100Red
- // 湿度
- export const hum1 = c250_1Red
- export const application = (state) => {
- switch(state + '') {
- case '1': return 'green'
- case '3': return 'red'
- case '4': return 'orange'
- default: return 'black'
- }
- }
- export const result= (result) => {
- switch (result) {
- case '待审核': return 'green'
- default: return 'black'
- }
- }
|