import { defineAsyncComponent } from 'vue'; import { BasicColumn } from '/@/components/Table'; import { useGlobSetting } from '/@/hooks/setting'; export const chartsColumns = (deviceType) => { if (deviceType === '') { return []; } }; export const locationList = [ { title: '风门', deviceType: 'gate', isVisible: 0, }, { title: '风窗', deviceType: 'gate1', isVisible: 0, }, { title: '测风装置', deviceType: 'gate2', isVisible: 0, }, { title: '传感器', deviceType: 'gate3', isVisible: 0, }, { title: '局部风机', deviceType: 'gate4', isVisible: 0, }, { title: '主风机', deviceType: 'gate5', isVisible: 0, }, { title: '风筒', deviceType: 'gate6', isVisible: 0, }, { title: '密闭墙', deviceType: 'gate7', isVisible: 0, }, ]; export function getMonitorComponent() { const { sysOrgCode } = useGlobSetting(); let FiberModal; switch (sysOrgCode) { case 'sdmtjthlgmk': //哈拉沟 FiberModal = defineAsyncComponent(() => import('./modal/fiber.modal.vue')); break; default: FiberModal = defineAsyncComponent(() => import('./modal/fiber.modal1.vue')); } const BundleModal = defineAsyncComponent(() => import('./modal/bundle.modal.vue')); const DustModal = defineAsyncComponent(() => import('./modal/dust.modal.vue')); const BallvalveModal = defineAsyncComponent(() => import('./modal/ballvalve.modal.vue')); const AtomizingModal = defineAsyncComponent(() => import('./modal/atomizing.modal.vue')); const GaspatrolModal = defineAsyncComponent(() => import('./modal/atomizing.modal.vue')); return { FiberModal, BundleModal, DustModal, BallvalveModal, AtomizingModal, GaspatrolModal }; } // export const searchFormSchema: FormSchema[] = [ // { // label: '查询日期', // field: 'tData', // component: 'DatePicker', // defaultValue: dayjs(), // componentProps: { // valueFormat: 'YYYY-MM-DD', // }, // }, // { // label: '时间区间', // field: 'tickectDate', // component: 'TimeRangePicker', // componentProps: { // placeholder: ['开始时间', '结束时间'], // valueFormat: 'HH:mm:ss', // }, // }, // { // label: '设备类型', // field: 'gdeviceid', // component: 'ApiSelect', // componentProps: { // api: props.deviceListApi, // resultField: 'records', // labelField: 'strname', // valueField: 'id', // }, // }, // { // label: '间隔时间', // field: 'skip', // component: 'Select', // componentProps: { // options: [ // { // label: '5秒', // value: '1', // }, // { // label: '10秒', // value: '2', // }, // { // label: '1分钟', // value: '3', // }, // { // label: '5分钟', // value: '4', // }, // { // label: '10分钟', // value: '5', // }, // ], // }, // }, // ]; export const majorColumns: BasicColumn[] = [ { title: '序号', dataIndex: '', key: 'rowIndex', width: 60, align: 'center', customRender: ({ index }) => { return `${index}`; }, }, { title: '测段名称', align: 'center', dataIndex: 'name', width: 110, }, { title: '始点', children: [ { title: '测点位置', align: 'center', dataIndex: 'name1', width: 140, }, { title: '风压(Pa)', align: 'center', dataIndex: 'pressure1', width: 100, }, // { // title:'风压(KPa)', // align:"center", // dataIndex: 'name1' // }, { title: '密度(kg/m³)', align: 'center', dataIndex: 'density1', width: 100, }, { title: '标高(m)', align: 'center', dataIndex: 'elevation1', width: 100, }, ], }, { title: '末点', children: [ { title: '测点位置', align: 'center', dataIndex: 'name2', width: 140, }, { title: '风压(Pa)', align: 'center', dataIndex: 'pressure2', width: 100, }, // { // title:'风压(KPa)', // align:"center", // dataIndex: 'name1' // }, { title: '密度(kg/m³)', align: 'center', dataIndex: 'density2', width: 100, }, { title: '标高(m)', align: 'center', dataIndex: 'elevation2', width: 100, }, ], }, { title: '风量(m³/min)', align: 'center', dataIndex: 'm3', width: 110, }, { title: '阻力(Pa)', align: 'center', dataIndex: 'drag', width: 100, }, { title: '风阻(Ns²/m⁸)', align: 'center', dataIndex: 'wdrag', width: 110, }, { title: '更新时间', dataIndex: 'datatime', align: 'center', width: 127, }, ]; export const surfaceChartsColumns = [ { legend: '进风', seriesName: '(m³/min)', ymax: 5000, yname: 'm³/min', linetype: 'line', yaxispos: 'left', color: '#00FFA8', sort: 1, xRotate: 0, dataIndex: 'jin', }, { legend: '回风', seriesName: '', ymax: 5000, yname: 'm³/min', linetype: 'line', yaxispos: 'left', color: '#F07070', sort: 1, xRotate: 0, dataIndex: 'hui', }, ]; export const ballvalveColumns: BasicColumn[] = [ { title: '设备编号', dataIndex: 'deviceNum', width: 60, align: 'center', }, { title: '温度(℃)', dataIndex: 'tempRealtime', align: 'center', width: 60, }, { title: 'CO(ppm)', dataIndex: 'CORealtime', align: 'center', width: 50, }, { title: '压力(Pa)', dataIndex: 'PressureRealtime', align: 'center', width: 50, }, { title: '烟雾(%)', dataIndex: 'SmokeRealtime485', align: 'center', width: 50, }, { title: '是否报警', dataIndex: 'isWarn', align: 'center', width: 50, // customRender: () => { // return `正常`; // }, }, ]; export const noDetailArr = ['nitrogen', 'forcFan']; // 前端详情的, export const haveDetailArr = [ 'windrect', 'window', 'gate', 'fanlocal', 'fanmain', 'fiber', 'bundletube', 'gaspatrol', 'dusting', 'ballvalve', 'pump', 'safetymonitor', 'nitrogen', 'atomizing', ]; export const locationFormConfig = { labelAlign: 'left', showAdvancedButton: false, showResetButton: true, showSubmitButton: false, size: 'small', // baseColProps: { // // offset: 0.5, // xs: 24, // sm: 24, // md: 24, // lg: 9, // xl: 7, // xxl: 4, // }, schemas: [ { label: '人员名称', field: 'strname', component: 'Input', }, { label: '分站名称', field: 'stationname', component: 'Input', }, ], colProps: { span: 4, }, }; export const vehicleFormConfig = { labelAlign: 'left', showAdvancedButton: false, showResetButton: true, showSubmitButton: false, // size: 'small', // baseColProps: { // // offset: 0.5, // xs: 24, // sm: 24, // md: 24, // lg: 9, // xl: 7, // xxl: 4, // }, schemas: [ { label: '车辆名称', field: 'strname', component: 'Input', }, { label: '分站名称', field: 'stationname', component: 'Input', }, ], colProps: { span: 4, }, }; export const haveHandlerArr = ['windrect', 'window', 'gate', 'fanlocal', 'fanmain', 'pump', 'obfurage', 'nitrogen', 'pulping', 'spray', 'dustdev']; // table无操作 export const noWarningArr = ['location', 'vehicle', 'cheliang']; // 无预警详情的 export const haveSysDetailArr = ['']; //有场景详情的 export const noHistoryArr = () => (History_Type['type'] == 'remote' ? ['surface_history'] : []);