| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306 |
- import { safetyDeviceList } from './safety.api';
- import { BasicColumn } from '/@/components/Table';
- import {reactive} from 'vue'
- export const warnHistoryColumns: BasicColumn[] = [
- {
- title: '序号',
- width: 60,
- align: 'center',
- customRender: ({ index }: { index: number }) => `${index + 1}`
- },
- {
- title: '安装位置',
- dataIndex: 'installLocation',
- key: 'installLocation',
- align: 'center',
- ellipsis: true,
- },
- {
- title: '报警类型',
- dataIndex: 'exceptionTypeC',
- key: 'exceptionTypeC',
- align: 'center',
- ellipsis: true,
- },
- {
- title: '报警原因',
- dataIndex: 'exceptionReason',
- key: 'exceptionReason',
- align: 'center',
- ellipsis: true,
- },
- {
- title: '开始报警时间',
- dataIndex: 'exceptionStartTime',
- key: 'exceptionStartTime',
- align: 'center',
- ellipsis: true,
- },
- {
- title: '结束报警时间',
- dataIndex: 'exceptionEndTime',
- key: 'exceptionEndTime',
- align: 'center',
- ellipsis: true,
- },
- {
- title: '是否完成',
- dataIndex: 'isCompletedC',
- key: 'isCompletedC',
- align: 'center',
- ellipsis: true,
- },
- ]
- export let exceptionTypeList = [
- { label: '超限报警', value: '001' },
- { label: '断电报警', value: '002' },
- { label: '馈电异常', value: '003' },
- { label: '传感器断线', value: '004' },
- { label: '基站断电', value: '005' },
- { label: '基站不通', value: '006' },
- { label: '标校', value: '007' },
- { label: '超量程', value: '008' },
- ]
- export let isCompletedList = [
- { label: '是', value: 1 },
- { label: '否', value: 0 },
- ]
- //分页参数配置
- export let pagination = reactive({
- current: 1, // 当前页码
- pageSize: 10, // 每页显示条数
- total: 0, // 总条目数,后端返回
- // showTotal: (total, range) => `${range[0]}-${range[1]} 条,总共 ${total} 条`, // 分页右下角显示信息
- showSizeChanger: true, // 是否可改变每页显示条数
- pageSizeOptions: ['10', '20', '50'], // 可选的每页显示条数
- })
- export const chartsColumns = (deviceType) => {
- if (deviceType === '') {
- return [];
- }
- };
- export const formConfig = {
- labelAlign: 'left',
- showAdvancedButton: false,
- showResetButton: false,
- showSubmitButton: false,
- schemas: [
- {
- label: '设备类型',
- field: 'dataTypeName',
- component: 'ApiSelect',
- componentProps: {
- api: safetyDeviceList.bind(null, { devicetype: 'safetymonitor', code: 'dataTypeName' }),
- labelField: 'name',
- valueField: 'code',
- },
- },
- {
- label: '设备安装地点',
- field: 'strinstallpos',
- component: 'Input',
- },
- ],
- };
- //测风装置
- export const chartsColumnsRect = [
- {
- legend: '风量',
- seriesName: '(m³/min)',
- ymax: 10000,
- yname: 'm³/min',
- linetype: 'bar',
- yaxispos: 'left',
- color: '#37BCF2',
- sort: 1,
- xRotate: 0,
- dataIndex: 'm³',
- },
- {
- legend: '气源压力',
- seriesName: '(MPa)',
- ymax: 50,
- yname: 'MPa',
- linetype: 'line',
- yaxispos: 'right',
- color: '#FC4327',
- sort: 2,
- xRotate: 0,
- dataIndex: 'sourcePressure',
- },
- ];
- //局部风机
- export const chartsColumnsFan = [
- {
- legend: '风筒风量1',
- seriesName: '(m³/min)',
- ymax: 1000,
- yname: 'm³/min',
- linetype: 'bar',
- yaxispos: 'left',
- color: '#37BCF2',
- sort: 1,
- xRotate: 0,
- dataIndex: 'windQuantity1',
- },
- {
- legend: '风筒风量2',
- seriesName: '(m³/min)',
- ymax: 1000,
- yname: 'm³/min',
- linetype: 'line',
- yaxispos: 'right',
- color: '#FC4327',
- sort: 2,
- xRotate: 0,
- dataIndex: 'windQuantity2',
- },
- ];
- //主风
- export const chartsColumnsMain = [
- {
- legend: '风量',
- seriesName: '(m³/min)',
- ymax: 1000,
- yname: 'm³/min',
- linetype: 'bar',
- yaxispos: 'left',
- color: '#37BCF2',
- sort: 1,
- xRotate: 0,
- dataIndex: 'windQuantity1',
- },
- {
- legend: '频率',
- seriesName: '(Hz)',
- ymax: 1000,
- yname: 'Hz',
- linetype: 'line',
- yaxispos: 'right',
- color: '#FC4327',
- sort: 2,
- xRotate: 0,
- dataIndex: 'windQuantity2',
- },
- ];
- //光钎测温
- export const chartsColumnsFiber = [
- {
- legend: '最高温度',
- seriesName: '(°C)',
- ymax: 100,
- yname: '°C',
- linetype: 'bar',
- yaxispos: 'left',
- color: '#37BCF2',
- sort: 1,
- xRotate: 0,
- dataIndex: 'fmax',
- },
- {
- legend: '平均温度',
- seriesName: '(°C)',
- ymax: 100,
- yname: '°C',
- linetype: 'line',
- yaxispos: 'right',
- color: '#FC4327',
- sort: 2,
- xRotate: 0,
- dataIndex: 'favg',
- },
- ];
- //密闭
- export const chartsColumnsObf = [
- {
- legend: '温度',
- seriesName: '(°C)',
- ymax: 100,
- yname: '°C',
- linetype: 'bar',
- yaxispos: 'left',
- color: '#37BCF2',
- sort: 1,
- xRotate: 0,
- dataIndex: 'temperature',
- },
- {
- legend: 'O2浓度',
- seriesName: '(%)',
- ymax: 100,
- yname: '%',
- linetype: 'line',
- yaxispos: 'right',
- color: '#FC4327',
- sort: 2,
- xRotate: 0,
- dataIndex: 'o2val',
- },
- ];
- //束管
- export const chartsColumnsBun = [
- {
- legend: 'CO浓度',
- seriesName: '(%)',
- ymax: 100,
- yname: '%',
- linetype: 'bar',
- yaxispos: 'left',
- color: '#37BCF2',
- sort: 1,
- xRotate: 0,
- dataIndex: 'coval',
- },
- {
- legend: 'CO2浓度',
- seriesName: '(%)',
- ymax: 100,
- yname: '%',
- linetype: 'line',
- yaxispos: 'right',
- color: '#FC4327',
- sort: 2,
- xRotate: 0,
- dataIndex: 'co2val',
- },
- ];
- export const chartsColumnsreal = [
- {
- legend: '压差',
- seriesName: '(Pa)',
- ymax: 100,
- yname: 'Pa',
- linetype: 'bar',
- yaxispos: 'left',
- color: '#37BCF2',
- sort: 1,
- xRotate: 0,
- dataIndex: 'frontRearDP',
- },
- {
- legend: '气源压力',
- seriesName: '(MPa)',
- ymax: 50,
- yname: 'MPa',
- linetype: 'line',
- yaxispos: 'right',
- color: '#FC4327',
- sort: 2,
- xRotate: 0,
- dataIndex: 'sourcePressure',
- },
- ];
- export const isHaveNoAction = ['safetymonitor', 'wasichoufang', 'atomizing', ''];
|