import { reactive, defineAsyncComponent } from 'vue'; import echarts from '/@/utils/lib/echarts'; import { useGlobSetting } from '/@/hooks/setting'; export const warningConfig = reactive({ header: ['设备名称', '预警信息', '时间'], data: [ ['火焰6', '严重报警', '03-05'], ['测点43', '一般预警', '03-05'], ['CO23', '一般预警', '03-05'], ['测点6', '超高预警', '03-05'], ['测点65', '超高预警', '03-05'], ['温度4', '一般预警', '03-05'], ['测点61', '一般预警', '03-05'], ['测点87', '一般信息', '03-05'], ], index: false, // columnWidth: [150, 80, 150, 150], headerBGC: '#3d9dd45d', oddRowBGC: '#009acd10', evenRowBGC: '#009acd05', align: ['center', 'center', 'center'], }); export const zhujiangOption = reactive({ tooltip: { trigger: 'axis', axisPointer: { lineStyle: { color: '#fff' } } }, legend: { top: '10', icon: 'rect', data: ['注浆压力'], right: '10px', textStyle: { fontSize: 12, color: '#fff' }, }, grid: { x: 50, y: 50, x2: 12, y2: 40 }, xAxis: { type: 'category', boundaryGap: false, axisLine: { lineStyle: { color: '#57617B' } }, axisLabel: { color: '#ffffffcc' }, splitLine: { show: true, lineStyle: { color: '#57617B22', type: 'dashed' } }, data: [], }, yAxis: [ { type: 'value', name: 'm³/h', max: 10, axisTick: { show: false, }, axisLine: { lineStyle: { show: true, color: '#57617B' } }, axisLabel: { margin: 10, fontSize: 12, color: '#ffffffcc' }, splitLine: { show: true, lineStyle: { color: '#57617B22', type: 'dashed' } }, }, ], series: [ { name: '注浆流量', type: 'line', smooth: true, lineStyle: { width: 2 }, yAxisIndex: 0, areaStyle: { color: new echarts.graphic.LinearGradient( 0, 0, 0, 1, [ { offset: 0, color: 'rgba(185,150,248,0.3)', }, { offset: 0.8, color: 'rgba(185,150,248,0)', }, ], false ), shadowColor: 'rgba(0, 0, 0, 0.1)', shadowBlur: 10, }, data: [], }, ], }); export const yaliOption = reactive({ tooltip: { trigger: 'axis', axisPointer: { lineStyle: { color: '#fff' } } }, legend: { top: '10', icon: 'rect', data: ['注浆压力'], right: '10px', textStyle: { fontSize: 12, color: '#fff' }, }, grid: { x: 50, y: 50, x2: 12, y2: 40 }, xAxis: { type: 'category', boundaryGap: false, axisLine: { lineStyle: { color: '#57617B' } }, axisLabel: { color: '#ffffffcc' }, splitLine: { show: true, lineStyle: { color: '#57617B22', type: 'dashed' } }, data: [], }, yAxis: [ { type: 'value', name: 'm³/h', max: 10, axisTick: { show: false, }, axisLine: { lineStyle: { show: true, color: '#57617B' } }, axisLabel: { margin: 10, fontSize: 12, color: '#ffffffcc' }, splitLine: { show: true, lineStyle: { color: '#57617B22', type: 'dashed' } }, }, ], series: [ { name: '注浆压力', type: 'line', smooth: true, lineStyle: { width: 2 }, yAxisIndex: 0, areaStyle: { color: new echarts.graphic.LinearGradient( 0, 0, 0, 1, [ { offset: 0, color: 'rgba(3, 194, 236, 0.3)', }, { offset: 0.8, color: 'rgba(3, 194, 236, 0)', }, ], false ), shadowColor: 'rgba(0, 0, 0, 0.1)', shadowBlur: 10, }, itemStyle: { color: '#03C2EC' }, data: [], }, ], }); export const deviceMonitorList = [ { title: '定量给料机', dataList: [ { title: '带电', code: 'GLJdd', }, { title: '运行', code: 'GLJyx', }, { title: '故障', code: 'GLJgz', }, ], }, { title: '胶体制备机', dataList: [ { title: '带电', code: 'JTdd', }, { title: '运行', code: 'JTyx', }, { title: '故障', code: 'JTgz', }, ], }, { title: '搅拌机', dataList: [ { title: '带电', code: 'JBJdd', }, { title: '运行', code: 'JBJyx', }, { title: '故障', code: 'JBJgz', }, ], }, { title: '排污泵', dataList: [ { title: '带电', code: 'PWBdd', }, { title: '运行', code: 'PWByx', }, { title: '故障', code: 'PWBgz', }, ], }, { title: '胶带运输机', dataList: [ { title: '带电', code: 'JDdd', }, { title: '运行', code: 'JDyx', }, { title: '故障', code: 'JDgz', }, ], }, { title: '注水泵1', dataList: [ { title: '带电', code: 'ZJSB1dd', }, { title: '运行', code: 'ZJSB1yx', }, { title: '故障', code: 'ZJSB1gz', }, ], }, { title: '注水泵2', dataList: [ { title: '带电', code: 'ZJSB2dd', }, { title: '运行', code: 'ZJSB2yx', }, { title: '故障', code: 'ZJSB2gz', }, ], }, { title: '清水泵', dataList: [ { title: '带电', code: 'QSBdd', }, { title: '运行', code: 'QSByx', }, { title: '故障', code: 'QSBgz', }, ], }, { title: '渣浆泵', dataList: [ { title: '带电', code: 'ZJBdd', }, { title: '运行', code: 'ZJByx', }, { title: '故障', code: 'ZJBgz', }, ], }, ]; export function getMonitorComponent() { const { sysOrgCode } = useGlobSetting(); let groutHome; switch (sysOrgCode) { case 'sdmtjtjjmk': // 锦界 groutHome = defineAsyncComponent(() => import('./components/groutHomeJj.vue')); return groutHome; case 'sdmtjtdltmkhjtj': // 活鸡兔井 groutHome = defineAsyncComponent(() => import('./components/groutHomeHjt.vue')); return groutHome; default: groutHome = defineAsyncComponent(() => import('./components/groutHomeHjt.vue')); return groutHome; } }