拷贝晟华新大屏
This commit is contained in:
14
src/config/filter.js
Normal file
14
src/config/filter.js
Normal file
@@ -0,0 +1,14 @@
|
||||
// import store from '../vuex/store'
|
||||
|
||||
const filter = {
|
||||
numeric (value) {
|
||||
if (value === '') return ''
|
||||
return Number(value).toFixed(3)
|
||||
},
|
||||
numFixed (value, bit) {
|
||||
if (value === '') return ''
|
||||
return Number(value).toFixed(bit)
|
||||
}
|
||||
}
|
||||
|
||||
export default filter
|
||||
3882
src/config/getData2.js
Normal file
3882
src/config/getData2.js
Normal file
File diff suppressed because one or more lines are too long
65
src/config/http.js
Normal file
65
src/config/http.js
Normal file
@@ -0,0 +1,65 @@
|
||||
import axios from 'axios'
|
||||
import { Dialog } from './mUtils.js'
|
||||
import store from '../vuex/store.js'
|
||||
import router from '@/router'
|
||||
|
||||
axios.defaults.timeout = 50000
|
||||
axios.defaults.headers.post['Content-Type'] = 'application/json;charset=UTF-8'
|
||||
|
||||
axios.interceptors.request.use(
|
||||
config => {
|
||||
// let token = ''
|
||||
// if (store.getters.userInfo !== '') {
|
||||
// token = JSON.parse(store.getters.userInfo).token
|
||||
// }
|
||||
// token && (config.headers.Authorization = token)
|
||||
if (config.method === 'post') {
|
||||
if (!config.data.flag) {
|
||||
config.data = config.data
|
||||
} else {
|
||||
config.data = config.data.formData
|
||||
}
|
||||
}
|
||||
return config
|
||||
},
|
||||
error => {
|
||||
Dialog('错误的传参')
|
||||
return Promise.reject(error)
|
||||
}
|
||||
)
|
||||
|
||||
axios.interceptors.response.use(
|
||||
response => {
|
||||
return Promise.resolve(response)
|
||||
},
|
||||
error => {
|
||||
if (error && error.response) {
|
||||
switch (error.response.status) {
|
||||
case 400:
|
||||
break
|
||||
case 401:
|
||||
// store.dispatch('setSignOut')
|
||||
router.push('/setup')
|
||||
break
|
||||
}
|
||||
return Promise.reject(error.response.data)
|
||||
} else {
|
||||
return Promise.reject(error)
|
||||
}
|
||||
}
|
||||
)
|
||||
|
||||
export const post = (sevmethod, params) => {
|
||||
return new Promise((resolve, reject) => {
|
||||
axios.post(`${store.getters.baseUrl}/` + sevmethod, params)
|
||||
.then(response => {
|
||||
resolve(response.data)
|
||||
}, error => {
|
||||
// Dialog(error.message)
|
||||
reject(error.message)
|
||||
})
|
||||
.catch((error) => {
|
||||
reject(error)
|
||||
})
|
||||
})
|
||||
}
|
||||
134
src/config/mUtils.js
Normal file
134
src/config/mUtils.js
Normal file
@@ -0,0 +1,134 @@
|
||||
import store from '../vuex/store'
|
||||
|
||||
/**
|
||||
* 弹出框
|
||||
*/
|
||||
export const Dialog = (str) => {
|
||||
store.dispatch('showAlert', true)
|
||||
store.dispatch('alertMsg', str)
|
||||
// setTimeout(() => {
|
||||
// store.dispatch('showAlert', false)
|
||||
// }, 30000)
|
||||
}
|
||||
|
||||
/**
|
||||
* 提示框
|
||||
*/
|
||||
export const toast = (str) => {
|
||||
store.dispatch('showToast', true)
|
||||
store.dispatch('toastMsg', str)
|
||||
setTimeout(() => {
|
||||
store.dispatch('showToast', false)
|
||||
}, 3000)
|
||||
}
|
||||
|
||||
/**
|
||||
* 存储localStorage
|
||||
*/
|
||||
export const setStore = (name, content) => {
|
||||
if (!name) return
|
||||
if (typeof content !== 'string') {
|
||||
content = JSON.stringify(content)
|
||||
}
|
||||
window.localStorage.setItem(name, content)
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取localStorage
|
||||
*/
|
||||
export const getStore = name => {
|
||||
if (!name) return
|
||||
return window.localStorage.getItem(name)
|
||||
}
|
||||
|
||||
/**
|
||||
* 小数加法
|
||||
*/
|
||||
export const accAdd = (arg1, arg2) => {
|
||||
var r1, r2, m, c
|
||||
try {
|
||||
r1 = arg1.toString().split('.')[1].length
|
||||
} catch (e) {
|
||||
r1 = 0
|
||||
}
|
||||
try {
|
||||
r2 = arg2.toString().split('.')[1].length
|
||||
} catch (e) {
|
||||
r2 = 0
|
||||
}
|
||||
c = Math.abs(r1 - r2)
|
||||
m = Math.pow(10, Math.max(r1, r2))
|
||||
if (c > 0) {
|
||||
var cm = Math.pow(10, c)
|
||||
if (r1 > r2) {
|
||||
arg1 = Number(arg1.toString().replace('.', ''))
|
||||
arg2 = Number(arg2.toString().replace('.', '')) * cm
|
||||
} else {
|
||||
arg1 = Number(arg1.toString().replace('.', '')) * cm
|
||||
arg2 = Number(arg2.toString().replace('.', ''))
|
||||
}
|
||||
} else {
|
||||
arg1 = Number(arg1.toString().replace('.', ''))
|
||||
arg2 = Number(arg2.toString().replace('.', ''))
|
||||
}
|
||||
return (arg1 + arg2) / m
|
||||
}
|
||||
|
||||
/**
|
||||
* 小数减法
|
||||
*/
|
||||
export const accSubtract = (arg1, arg2) => {
|
||||
var r1, r2, m, c
|
||||
try {
|
||||
r1 = arg1.toString().split('.')[1].length
|
||||
} catch (e) {
|
||||
r1 = 0
|
||||
}
|
||||
try {
|
||||
r2 = arg2.toString().split('.')[1].length
|
||||
} catch (e) {
|
||||
r2 = 0
|
||||
}
|
||||
c = Math.abs(r1 - r2)
|
||||
m = Math.pow(10, Math.max(r1, r2))
|
||||
if (c > 0) {
|
||||
var cm = Math.pow(10, c)
|
||||
if (r1 > r2) {
|
||||
arg1 = Number(arg1.toString().replace('.', ''))
|
||||
arg2 = Number(arg2.toString().replace('.', '')) * cm
|
||||
} else {
|
||||
arg1 = Number(arg1.toString().replace('.', '')) * cm
|
||||
arg2 = Number(arg2.toString().replace('.', ''))
|
||||
}
|
||||
} else {
|
||||
arg1 = Number(arg1.toString().replace('.', ''))
|
||||
arg2 = Number(arg2.toString().replace('.', ''))
|
||||
}
|
||||
return (arg1 - arg2) / m
|
||||
}
|
||||
|
||||
/**
|
||||
* 小数乘法
|
||||
*/
|
||||
export const accMul = (arg1, arg2) => {
|
||||
var m = 0
|
||||
var s1 = arg1.toString()
|
||||
var s2 = arg2.toString()
|
||||
try { m += s1.split('.')[1].length } catch (e) {}
|
||||
try { m += s2.split('.')[1].length } catch (e) {}
|
||||
return Number(s1.replace('.', '')) * Number(s2.replace('.', '')) / Math.pow(10, m)
|
||||
}
|
||||
|
||||
/**
|
||||
* 求数组最大值
|
||||
*/
|
||||
export const maxArr = (arr) => {
|
||||
let max = Number(arr[0])
|
||||
let len = arr.length
|
||||
for (let i = 1; i < len; i++) {
|
||||
if (Number(arr[i]) > max) {
|
||||
max = Number(arr[i])
|
||||
}
|
||||
}
|
||||
return max
|
||||
}
|
||||
426
src/config/mork2.js
Normal file
426
src/config/mork2.js
Normal file
@@ -0,0 +1,426 @@
|
||||
/**
|
||||
* 新版大屏首页左侧报表
|
||||
*/
|
||||
export const homepageDataLeft = () => {
|
||||
let res = {
|
||||
// 当日混料 最多7个元素
|
||||
'todayMix': [
|
||||
{
|
||||
// 物料编码
|
||||
'materialCode': 'GBMCZ3027L323217GM003ZX22-30',
|
||||
'materialName': '物料一',
|
||||
// 需生产
|
||||
'plan': 14,
|
||||
// 已生产
|
||||
'real': 17
|
||||
},
|
||||
{
|
||||
// 物料编码
|
||||
'materialCode': 'GBMCZ3027L323217GM003ZX22-30',
|
||||
'materialName': '物料二',
|
||||
// 需生产
|
||||
'plan': 14,
|
||||
// 已生产
|
||||
'real': 16
|
||||
},
|
||||
{
|
||||
// 物料编码
|
||||
'materialCode': 'GBMCZ3027L323217GM003ZX22-30',
|
||||
'materialName': '物料三',
|
||||
// 需生产
|
||||
'plan': 20,
|
||||
// 已生产
|
||||
'real': 16
|
||||
},
|
||||
{
|
||||
// 物料编码
|
||||
'materialCode': 'GBMCZ3027L323217GM003ZX22-30',
|
||||
'materialName': '物料四',
|
||||
// 需生产
|
||||
'plan': 14,
|
||||
// 已生产
|
||||
'real': 16
|
||||
},
|
||||
{
|
||||
// 物料编码
|
||||
'materialCode': 'GBMCZ3027L323217GM003ZX22-30',
|
||||
'materialName': '物料五',
|
||||
// 需生产
|
||||
'plan': 14,
|
||||
// 已生产
|
||||
'real': 16
|
||||
},
|
||||
{
|
||||
// 物料编码
|
||||
'materialCode': 'GBMCZ3027L323217GM003ZX22-31',
|
||||
'materialName': '物料6',
|
||||
// 需生产
|
||||
'plan': 14,
|
||||
// 已生产
|
||||
'real': 16
|
||||
},
|
||||
{
|
||||
// 物料编码
|
||||
'materialCode': 'GBMCZ3027L323217GM003ZX22-32',
|
||||
'materialName': '物料7',
|
||||
// 需生产
|
||||
'plan': 14,
|
||||
// 已生产
|
||||
'real': 16
|
||||
}
|
||||
],
|
||||
// 当日成品 最多7个元素
|
||||
'todaySort': [
|
||||
{
|
||||
// 物料编码
|
||||
'materialCode': 'GBMCZ3027L323217GM003ZX22-30',
|
||||
// 需生产
|
||||
'plan': 10,
|
||||
// 已压制
|
||||
'press': 20,
|
||||
// 已完成
|
||||
'real': 30
|
||||
},
|
||||
{
|
||||
// 物料编码
|
||||
'materialCode': 'GBMCZ3027L323217GM003ZX22-30',
|
||||
// 需生产
|
||||
'plan': 10,
|
||||
// 已压制
|
||||
'press': 20,
|
||||
// 已完成
|
||||
'real': 30
|
||||
},
|
||||
{
|
||||
// 物料编码
|
||||
'materialCode': 'GBMCZ3027L323217GM003ZX22-30',
|
||||
// 需生产
|
||||
'plan': 10,
|
||||
// 已压制
|
||||
'press': 20,
|
||||
// 已完成
|
||||
'real': 30
|
||||
},
|
||||
{
|
||||
// 物料编码
|
||||
'materialCode': 'GBMCZ3027L323217GM003ZX22-30',
|
||||
// 需生产
|
||||
'plan': 10,
|
||||
// 已压制
|
||||
'press': 20,
|
||||
// 已完成
|
||||
'real': 30
|
||||
},
|
||||
{
|
||||
// 物料编码
|
||||
'materialCode': 'GBMCZ3027L323217GM003ZX22-30',
|
||||
// 需生产
|
||||
'plan': 10,
|
||||
// 已压制
|
||||
'press': 20,
|
||||
// 已完成
|
||||
'real': 30
|
||||
},
|
||||
{
|
||||
// 物料编码
|
||||
'materialCode': 'GBMCZ3027L323217GM003ZX22-30',
|
||||
// 需生产
|
||||
'plan': 10,
|
||||
// 已压制
|
||||
'press': 20,
|
||||
// 已完成
|
||||
'real': 30
|
||||
},
|
||||
{
|
||||
// 物料编码
|
||||
'materialCode': 'GBMCZ3027L323217GM003ZX22-30',
|
||||
// 需生产
|
||||
'plan': 10,
|
||||
// 已压制
|
||||
'press': 20,
|
||||
// 已完成
|
||||
'real': 30
|
||||
}
|
||||
],
|
||||
// 今日生产
|
||||
'todayProduction': {
|
||||
// 压制
|
||||
'todayPressProduction': {
|
||||
// 已生产
|
||||
'real': 2122,
|
||||
// 计划生产
|
||||
'plan': 8400
|
||||
},
|
||||
// 包装
|
||||
'todaySortProduction': {
|
||||
// 已生产
|
||||
'real': 0,
|
||||
// 计划生产
|
||||
'plan': 0
|
||||
},
|
||||
// 订单完成
|
||||
'orderFulfillmentRate': {
|
||||
// 已生产
|
||||
'real': 2122,
|
||||
// 计划生产
|
||||
'plan': 8400
|
||||
},
|
||||
// 混料
|
||||
'todayMixProduction': {
|
||||
// 已生产
|
||||
'real': 0.0,
|
||||
// 计划生产
|
||||
'plan': 0.0
|
||||
},
|
||||
todayTotalPlan: '80',
|
||||
materialCountSize: '2',
|
||||
sortCompleted: '11',
|
||||
sortCompletedQty: '900',
|
||||
sortMaterialCountSize: '1',
|
||||
fulfillmentRate: '25'
|
||||
// 信息
|
||||
// 'message': '今日共需生产<span>8400</span>块,物料种类2种,已完成包装11托,共900块,1个物料,完成率25%。'
|
||||
},
|
||||
// 历史分析 固定7个元素
|
||||
'history': [
|
||||
{
|
||||
// 日期
|
||||
'date': '12月31日',
|
||||
// 成品
|
||||
'sort': 0,
|
||||
// 压制
|
||||
'press': 1890
|
||||
},
|
||||
{
|
||||
'date': '12月31日',
|
||||
'sort': 0,
|
||||
'press': 2640
|
||||
},
|
||||
{
|
||||
'date': '12月31日',
|
||||
'sort': 0,
|
||||
'press': 5364
|
||||
},
|
||||
{
|
||||
'date': '12月31日',
|
||||
'sort': 720,
|
||||
'press': 4962
|
||||
},
|
||||
{
|
||||
'date': '12月31日',
|
||||
'sort': 1584,
|
||||
'press': 1260
|
||||
},
|
||||
{
|
||||
'date': '12月31日',
|
||||
'sort': 1872,
|
||||
'press': 2400
|
||||
},
|
||||
{
|
||||
'date': '12月31日',
|
||||
'sort': 576,
|
||||
'press': 630
|
||||
}
|
||||
],
|
||||
// 库存量监控 最多7个元素
|
||||
'inventory': [
|
||||
{
|
||||
// 物料编码
|
||||
'materialCode': 'GBMCZ3027L323217GM003ZX22-31',
|
||||
'materialName': '物料一',
|
||||
// 数量
|
||||
'qty': 1
|
||||
},
|
||||
{
|
||||
// 物料编码
|
||||
'materialCode': 'GBMCZ3027L323217GM003ZX22-32',
|
||||
'materialName': '物料二',
|
||||
// 数量
|
||||
'qty': 2
|
||||
},
|
||||
{
|
||||
// 物料编码
|
||||
'materialCode': 'GBMCZ3027L323217GM003ZX22-3',
|
||||
'materialName': '物料三',
|
||||
// 数量
|
||||
'qty': 3
|
||||
},
|
||||
{
|
||||
// 物料编码
|
||||
'materialCode': 'GBMCZ3027L323217GM003ZX22-4',
|
||||
'materialName': '物料四',
|
||||
// 数量
|
||||
'qty': 4
|
||||
},
|
||||
{
|
||||
// 物料编码
|
||||
'materialCode': 'GBMCZ3027L323217GM003ZX22-5',
|
||||
'materialName': '物料五',
|
||||
// 数量
|
||||
'qty': 5
|
||||
},
|
||||
{
|
||||
// 物料编码
|
||||
'materialCode': 'GBMCZ3027L323217GM003ZX22-6',
|
||||
'materialName': '物料6',
|
||||
// 数量
|
||||
'qty': 6
|
||||
},
|
||||
{
|
||||
// 物料编码
|
||||
'materialCode': 'GBMCZ3027L323217GM003ZX22-7',
|
||||
'materialName': '物料7',
|
||||
// 数量
|
||||
'qty': 7
|
||||
}
|
||||
]
|
||||
}
|
||||
return res
|
||||
}
|
||||
|
||||
/**
|
||||
* 新版大屏首页右侧报表
|
||||
*/
|
||||
export const homepageDataRight = () => {
|
||||
let res = {
|
||||
'capacityRate': [{'device_name': '混料设备', 'numerical': '60'}, {'device_name': '压制设备', 'numerical': '60'}, {'device_name': '压制设备2', 'numerical': '60'}, {'device_name': '压制设备3', 'numerical': '60'}],
|
||||
'stateStatistics': {
|
||||
count: '20',
|
||||
fourState: [{'status': '5', 'stateName': '正常运行'}, {'status': '5', 'stateName': '暂未生产'}, {'status': '5', 'stateName': '空闲设备'}, {'status': '5', 'stateName': '故障设备'}]
|
||||
},
|
||||
'areaDeviceStatus': {
|
||||
'mix': {
|
||||
'running': 7,
|
||||
'pausing': 3,
|
||||
'shutdown': 4,
|
||||
'inTrouble': 1
|
||||
},
|
||||
'press': {
|
||||
'running': 4,
|
||||
'pausing': 2,
|
||||
'shutdown': 1,
|
||||
'inTrouble': 0
|
||||
},
|
||||
'dry': {
|
||||
'running': 4,
|
||||
'pausing': 7,
|
||||
'shutdown': 8,
|
||||
'inTrouble': 2
|
||||
},
|
||||
'sort': {
|
||||
'running': 7,
|
||||
'pausing': 3,
|
||||
'shutdown': 3,
|
||||
'inTrouble': 1
|
||||
}
|
||||
},
|
||||
'top10Of30Days': [
|
||||
{
|
||||
'device_name': '压机1',
|
||||
'count': 10
|
||||
},
|
||||
{
|
||||
'device_name': '压机2',
|
||||
'count': 9
|
||||
},
|
||||
{
|
||||
'device_name': '混料机1',
|
||||
'count': 8
|
||||
},
|
||||
{
|
||||
'device_name': '窑1',
|
||||
'count': 7
|
||||
},
|
||||
{
|
||||
'device_name': '分拣拆垛机械手1',
|
||||
'count': 6
|
||||
},
|
||||
{
|
||||
'device_name': '压机7',
|
||||
'count': 5
|
||||
},
|
||||
{
|
||||
'device_name': '码垛机械手1',
|
||||
'count': 4
|
||||
},
|
||||
{
|
||||
'device_name': '窑前桁架1',
|
||||
'count': 3
|
||||
},
|
||||
{
|
||||
'device_name': '拆盘机1',
|
||||
'count': 2
|
||||
},
|
||||
{
|
||||
'device_name': '覆膜机1',
|
||||
'count': 1
|
||||
}
|
||||
],
|
||||
'deviceWorkOrder': [
|
||||
{
|
||||
'process': '压制',
|
||||
'deviceCode': 'YJ01',
|
||||
'deviceName': '压机1',
|
||||
'status': '2',
|
||||
'workOrder': 'GD0001',
|
||||
'bom': '1001C1',
|
||||
'material': 'ZLMCZ1001C122211GM001BD20-8',
|
||||
'qty': '1000块',
|
||||
'startTime': '2023-11-20 14:32:32'
|
||||
},
|
||||
{
|
||||
'process': '压制',
|
||||
'deviceCode': 'YJ01',
|
||||
'deviceName': '压机1',
|
||||
'status': '0',
|
||||
'workOrder': 'GD0001',
|
||||
'bom': '1001C1',
|
||||
'material': 'ZLMCZ1001C122211GM001BD20-8',
|
||||
'qty': '1000块',
|
||||
'startTime': '2023-11-20 14:32:32'
|
||||
},
|
||||
{
|
||||
'process': '压制',
|
||||
'deviceCode': 'YJ01',
|
||||
'deviceName': '压机1',
|
||||
'status': '1',
|
||||
'workOrder': 'GD0001',
|
||||
'bom': '1001C1',
|
||||
'material': 'ZLMCZ1001C122211GM001BD20-8',
|
||||
'qty': '1000块',
|
||||
'startTime': '2023-11-20 14:32:32'
|
||||
},
|
||||
{
|
||||
'process': '压制',
|
||||
'deviceCode': 'YJ01',
|
||||
'deviceName': '压机1',
|
||||
'status': '1',
|
||||
'workOrder': 'GD0001',
|
||||
'bom': '1001C1',
|
||||
'material': 'ZLMCZ1001C122211GM001BD20-8',
|
||||
'qty': '1000块',
|
||||
'startTime': '2023-11-20 14:32:32'
|
||||
},
|
||||
{
|
||||
'process': '压制',
|
||||
'deviceCode': 'YJ01',
|
||||
'deviceName': '压机1',
|
||||
'status': '1',
|
||||
'workOrder': 'GD0001',
|
||||
'bom': '1001C1',
|
||||
'material': 'ZLMCZ1001C122211GM001BD20-8',
|
||||
'qty': '1000块',
|
||||
'startTime': '2023-11-20 14:32:32'
|
||||
}
|
||||
]
|
||||
}
|
||||
return res
|
||||
}
|
||||
|
||||
/**
|
||||
* 大屏首页设备
|
||||
*/
|
||||
export const homepageEquipment = () => {
|
||||
let res = {'productReport': [{'number': '192块', 'create_time': '2023-11-18 13:33:52', 'material_code': 'GBMAC3019C123270GM005BB20-30'}, {'number': '324块', 'create_time': '2023-11-11 15:45:02', 'material_code': 'GBMAC3003C123268GM002BB19-8'}, {'number': '240块', 'create_time': '2023-11-11 13:19:43', 'material_code': 'GBMAC3038C223271GM016BB25-30'}, {'number': '324块', 'create_time': '2023-11-11 10:58:42', 'material_code': 'GBMAC3003C123268GM002BB19-8'}, {'number': '240块', 'create_time': '2023-11-08 09:19:05', 'material_code': 'GBMCZ3059L323288GM029ZJTH21-10'}, {'number': '126块', 'create_time': '2023-11-06 16:04:40', 'material_code': 'GBMCZ3053M223268GM002ZJTH-201'}, {'number': '270块', 'create_time': '2023-11-06 15:41:37', 'material_code': 'GBMCZ3053M223268GM002ZJTH-201'}, {'number': '270块', 'create_time': '2023-11-06 14:57:32', 'material_code': 'GBMCZ3053M223268GM002ZJTH-201'}, {'number': '270块', 'create_time': '2023-11-06 14:12:48', 'material_code': 'GBMCZ3053M223268GM002ZJTH-201'}, {'number': '270块', 'create_time': '2023-11-06 13:28:01', 'material_code': 'GBMCZ3053M223268GM002ZJTH-201'}, {'number': '270块', 'create_time': '2023-11-06 12:41:13', 'material_code': 'GBMCZ3053M223268GM002ZJTH-201'}, {'number': '270块', 'create_time': '2023-11-06 11:03:33', 'material_code': 'GBMCZ3053M223268GM002ZJTH-201'}, {'number': '270块', 'create_time': '2023-11-06 10:16:51', 'material_code': 'GBMCZ3053M223268GM002ZJTH-201'}, {'number': '246块', 'create_time': '2023-11-04 15:44:12', 'material_code': 'GBMCZ3053M223268GM002ZJTH-201'}, {'number': '210块', 'create_time': '2023-11-04 13:09:49', 'material_code': 'GBMCZ3053M223268GM002ZJTH-201'}, {'number': '210块', 'create_time': '2023-11-04 12:35:26', 'material_code': 'GBMCZ3053M223268GM002ZJTH-201'}, {'number': '210块', 'create_time': '2023-11-04 11:11:36', 'material_code': 'GBMCZ3053M223268GM002ZJTH-201'}, {'number': '240块', 'create_time': '2023-11-04 10:36:37', 'material_code': 'GBMCZ3059L323288GM029ZJTH21-10'}, {'number': '210块', 'create_time': '2023-11-04 10:35:52', 'material_code': 'GBMCZ3053M223268GM002ZJTH-201'}, {'number': '210块', 'create_time': '2023-11-04 10:09:29', 'material_code': 'GBMCZ3053M223268GM002ZJTH-201'}], 'deviceReport': [{'failure_info': '99', 'device_code': 'FJMDJXS01', 'failure_time': '2023-11-27 09:33:21'}, {'failure_info': '2', 'device_code': 'MDJXS01', 'failure_time': '2023-11-25 16:02:40'}, {'failure_info': '-', 'device_code': 'MDJXS02', 'failure_time': '2023-11-25 14:02:22'}, {'failure_info': '1', 'device_code': 'BZJ01', 'failure_time': '2023-11-25 08:01:38'}, {'failure_info': '-', 'device_code': 'JYHJ01', 'failure_time': '2023-11-22 13:24:07'}, {'failure_info': '-', 'device_code': 'CPJ01', 'failure_time': '2023-11-20 11:03:01'}, {'failure_info': '-', 'device_code': 'RGV01', 'failure_time': '2023-11-17 13:59:38'}, {'failure_info': '-', 'device_code': 'MDJXS03', 'failure_time': '2023-11-15 15:02:08'}, {'failure_info': '-', 'device_code': 'MDJXS04', 'failure_time': '2023-11-03 07:37:52'}, {'failure_info': '-', 'device_code': 'CYHJ01', 'failure_time': '2023-10-25 11:47:21'}]}
|
||||
return res
|
||||
}
|
||||
13
src/config/rem.js
Normal file
13
src/config/rem.js
Normal file
@@ -0,0 +1,13 @@
|
||||
(function (doc, win) {
|
||||
var docEl = doc.documentElement
|
||||
var resizeEvt = 'orientationchange' in window ? 'orientationchange' : 'resize'
|
||||
var recalc = function () {
|
||||
var clientWidth = docEl.clientWidth
|
||||
if (!clientWidth) return
|
||||
docEl.style.fontSize = 100 * (clientWidth / 1920) + 'px'
|
||||
document.body.style.display = 'block'
|
||||
}
|
||||
if (!doc.addEventListener) return win.addEventListener(resizeEvt, recalc, false)
|
||||
doc.addEventListener('DOMContentLoaded', recalc, false)
|
||||
})(document, window)
|
||||
// 晟华大屏尺寸2560*1440,屏幕太大用rem样式会错乱,现在使用px、%
|
||||
Reference in New Issue
Block a user