| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560 |
- import { BasicColumn } from '/@/components/Table';
- import { FormSchema } from '/@/components/Table';
- import { rules } from '/@/utils/helper/validator';
- export const columns: BasicColumn[] = [
- {
- title: '名称',
- dataIndex: 'strname',
- width: 120,
- },
- {
- title: '安装位置',
- dataIndex: 'strinstallpos',
- width: 100,
- },
- {
- title: '是否为常闭型',
- dataIndex: 'bnormalclose',
- width: 100,
- // customRender: render.renderAvatar,
- },
- {
- title: '净宽',
- dataIndex: 'fclearwidth',
- width: 80,
- },
- {
- title: '净高',
- dataIndex: 'fclearheight',
- width: 100,
- },
- {
- title: '风门道数',
- dataIndex: 'ndoorcount',
- width: 100,
- },
- {
- title: '所属分站',
- width: 150,
- dataIndex: 'stationname',
- },
- {
- title: '点表',
- width: 100,
- dataIndex: 'strtype',
- },
- {
- title: '监测类型',
- dataIndex: 'monitorflag',
- width: 100,
- },
- {
- title: '是否模拟数据',
- dataIndex: 'testflag',
- width: 100,
- },
- ];
- export const recycleColumns: BasicColumn[] = [
- {
- title: '名称',
- dataIndex: 'strname',
- width: 100,
- },
- {
- title: '是否为常闭型',
- dataIndex: 'bnormalclose',
- width: 100,
- },
- ];
- export const searchFormSchema: FormSchema[] = [
- {
- label: '名称',
- field: 'strname',
- component: 'Input',
- colProps: { span: 6 },
- },
- {
- label: '安装位置',
- field: 'strinstallpos',
- component: 'Input',
- colProps: { span: 6 },
- },
- {
- label: '是否为常闭型',
- field: 'bnormalclose',
- component: 'JDictSelectTag',
- componentProps: {
- dictCode: 'user_status',
- placeholder: '请选择读写类型',
- stringToNumber: true,
- },
- colProps: { span: 6 },
- },
- ];
- export const formSchema: FormSchema[] = [
- {
- label: '',
- field: 'id',
- component: 'Input',
- show: false,
- },
- {
- label: '名称',
- field: 'strname',
- component: 'Input',
- },
- {
- label: '安装位置',
- field: 'strinstallpos',
- component: 'Input',
- },
- {
- label: '是否为常闭型',
- field: 'bnormalclose',
- component: 'RadioGroup',
- defaultValue: 1,
- componentProps: () => {
- return {
- options: [
- { label: '是', value: 1, key: '1' },
- { label: '否', value: 0, key: '2' },
- ],
- };
- },
- },
- {
- label: '净宽',
- field: 'fclearwidth',
- component: 'Input',
- },
- {
- label: '净高',
- field: 'fclearheight',
- component: 'Input',
- },
- {
- label: '风门道数',
- field: 'ndoorcount',
- component: 'Input',
- },
- {
- label: '所属分站',
- field: 'stationname',
- component: 'JDictSelectTag',
- componentProps: {
- dictCode: 'user_status',
- placeholder: '请选择状态',
- stringToNumber: true,
- },
- },
- {
- label: '点表',
- field: 'strtype',
- component: 'JDictSelectTag',
- componentProps: {
- dictCode: 'user_status',
- placeholder: '请选择状态',
- stringToNumber: true,
- },
- },
- {
- label: '监测类型',
- field: 'monitorflag',
- component: 'JDictSelectTag',
- componentProps: {
- dictCode: 'user_status',
- placeholder: '请选择状态',
- stringToNumber: true,
- },
- },
- {
- label: '是否模拟数据',
- field: 'testflag',
- component: 'RadioGroup',
- defaultValue: 1,
- componentProps: () => {
- return {
- options: [
- { label: '是', value: 1, key: '1' },
- { label: '否', value: 0, key: '2' },
- ],
- };
- },
- },
- ];
- export const formPasswordSchema: FormSchema[] = [
- {
- label: '用户账号',
- field: 'username',
- component: 'Input',
- componentProps: { readOnly: true },
- },
- {
- label: '登录密码',
- field: 'password',
- component: 'StrengthMeter',
- componentProps: {
- placeholder: '请输入登录密码',
- },
- rules: [
- {
- required: true,
- message: '请输入登录密码',
- },
- ],
- },
- {
- label: '确认密码',
- field: 'confirmPassword',
- component: 'InputPassword',
- dynamicRules: ({ values }) => rules.confirmPassword(values, true),
- },
- ];
- export const formAgentSchema: FormSchema[] = [
- {
- label: '',
- field: 'id',
- component: 'Input',
- show: false,
- },
- {
- field: 'userName',
- label: '用户名',
- component: 'Input',
- componentProps: {
- readOnly: true,
- allowClear: false,
- },
- },
- {
- field: 'agentUserName',
- label: '代理人用户名',
- required: true,
- component: 'JSelectUser',
- componentProps: {
- rowKey: 'username',
- labelKey: 'realname',
- maxSelectCount: 10,
- },
- },
- {
- field: 'startTime',
- label: '代理开始时间',
- component: 'DatePicker',
- required: true,
- componentProps: {
- showTime: true,
- valueFormat: 'YYYY-MM-DD HH:mm:ss',
- placeholder: '请选择代理开始时间',
- },
- },
- {
- field: 'endTime',
- label: '代理结束时间',
- component: 'DatePicker',
- required: true,
- componentProps: {
- showTime: true,
- valueFormat: 'YYYY-MM-DD HH:mm:ss',
- placeholder: '请选择代理结束时间',
- },
- },
- {
- field: 'status',
- label: '状态',
- component: 'JDictSelectTag',
- defaultValue: '1',
- componentProps: {
- dictCode: 'valid_status',
- type: 'radioButton',
- },
- },
- ];
- export const tableColumns = [
- {
- title: '',
- dataIndex: 'isCheck',
- customCell: (_, index) => {
- if (index % 2 == 0) {
- return { rowSpan: 2 };
- } else {
- return { rowSpan: 0 };
- }
- },
- },
- {
- title: '安装位置',
- dataIndex: 'address',
- customCell: (_, index) => {
- if (index % 2 == 0) {
- return { rowSpan: 2 };
- } else {
- return { rowSpan: 0 };
- }
- },
- },
- {
- title: '运行风机',
- dataIndex: 'childName',
- },
- {
- title: '风机静压(Pa)',
- dataIndex: 'yc2',
- },
- {
- title: '风机全压(Pa)',
- dataIndex: 'dqPa',
- },
- {
- title: '电机流量(m³/s)',
- dataIndex: 'fanM3',
- },
- {
- title: '电机速度(rpm/s)',
- dataIndex: 'fanSD',
- },
- {
- title: '电机电压(V)',
- dataIndex: 'fanU',
- },
- {
- title: '电机电流(A)',
- dataIndex: 'fanA',
- },
- {
- title: '电机频率(Hz/s)',
- dataIndex: 'fanPL',
- },
- {
- title: '电机功率(KW/s)',
- dataIndex: 'fanGL',
- },
- {
- title: '振动X1(mm/s)',
- dataIndex: 'zdX1',
- },
- {
- title: '振动Y1(mm/s)',
- dataIndex: 'zdY1',
- },
- ];
- export const dataColumns = () => {
- return [
- {
- id: 'UXC',
- name: '电机轴温设定(℃)',
- id2: 'bearingFront2_F1',
- },
- { id: 'VXC', name: '电机定温设定(℃)', id2: 'bearingBack2_F1' },
- {
- id: 'WXC',
- name: '电机前轴温度(℃)',
- id2: 'stator2A_F1',
- },
- {
- id: 'QZC',
- name: '电机后轴温度(℃)',
- id2: 'stator2B_F1',
- },
- { id: 'ZCZ1C', name: '电机定子1温度(℃)', id2: 'fIA2_F1' },
- { id: 'ZCZ2C', name: '电机定子2温度(℃)', id2: 'fIB2_F1' },
- { id: 'FTZ1C', name: '电机定3温度(℃)', id2: 'fIC2_F1' },
- ];
- };
- export const stateColumns = () => {
- return [
- // {
- // id: 'lubeBoxTemperatureF1High',
- // name: '润滑站油箱油温高报警',
- // flag: false,
- // },
- {
- id: 'lubeBoxTemperatureF1Low',
- name: '润滑站1油箱油温低报警',
- flag: true,
- },
- {
- id: 'lubeTemperatureF1High',
- name: '润滑站1供油油温高报警',
- flag: true,
- },
- // {
- // id: 'lubeTemperatureF1Low',
- // name: '润滑站1供油油温低报警',
- // flag: false,
- // },
- { id: 'lubePaF1High', name: '润滑站1供油油压高报警', flag: true },
- { id: 'lubePaF1Low', name: '润滑站1供油油压低报警', flag: true },
- // { id: "ch4_F1High", name: "瓦斯值1高报警", flag: false },
- { id: 'singleDoorF1Warn', name: '侧开风门单模报警', flag: true },
- { id: 'lubeF1SlightFault', name: '稀油润滑站轻故障', flag: true },
- { id: 'lubeF1SevereFault', name: '稀油润滑站重故障', flag: true },
- { id: 'f1B1Fault', name: '变频器1故障', flag: true },
- { id: 'f1B2Fault', name: '变频器2故障', flag: true },
- { id: 'f1Fault', name: '通风机故障', flag: true },
- ];
- };
- export const getData = () => {
- return [
- {
- id: 0,
- isCheck: true,
- address: '1号回风立井',
- strName: '1号回风立井主机',
- childName: '1#风机',
- isRun: false,
- frequency: 0,
- windVal: 0,
- gasVal1: 0,
- gasVal2: 0,
- zdX1: 0,
- zdX2: 0,
- zdY1: 0,
- zdY2: 0,
- yc1: 0,
- yc2: 0,
- dqPa: 0,
- co1: 0,
- fanSD: 0,
- fanA: 0,
- fanU: 0,
- fanPL: 0,
- fanGL: 0,
- fanM3: 0,
- WXC: 0,
- UXC: 0,
- VXC: 0,
- QZC: 0,
- HZC: 0,
- ZCZ1C: 0,
- ZCZ2C: 0,
- FTZ1C: 0,
- FTZ2C: 0,
- DJQZ1C: 0,
- C: 0,
- RH: 0,
- lubeBoxTemperatureF1High: undefined,
- lubeBoxTemperatureF1Low: undefined,
- lubeTemperatureF1High: undefined,
- lubeTemperatureF1Low: undefined,
- lubePaF1High: undefined,
- lubePaF1Low: undefined,
- singleDoorF1Warn: undefined,
- lubeF1SlightFault: undefined,
- lubeF1SevereFault: undefined,
- f1B1Fault: undefined,
- f1B2Fault: undefined,
- f1Fault: undefined,
- },
- {
- id: 1,
- isCheck: false,
- address: '1号回风立井',
- strName: '1号回风立井备机',
- childName: '2#风机',
- isRun: false,
- frequency: 0,
- windVal: 0,
- gasVal1: 0,
- gasVal2: 0,
- zdX1: 0,
- zdX2: 0,
- zdY1: 0,
- zdY2: 0,
- yc1: 0,
- yc2: 0,
- dqPa: 0,
- co1: 0,
- fanSD: 0,
- fanA: 0,
- fanU: 0,
- fanPL: 0,
- fanGL: 0,
- fanM3: 0,
- WXC: 0,
- UXC: 0,
- VXC: 0,
- QZC: 0,
- HZC: 0,
- ZCZ1C: 0,
- ZCZ2C: 0,
- FTZ1C: 0,
- FTZ2C: 0,
- DJQZ1C: 0,
- C: 0,
- RH: 0,
- lubeBoxTemperatureF1High: undefined,
- lubeBoxTemperatureF1Low: undefined,
- lubeTemperatureF1High: undefined,
- lubeTemperatureF1Low: undefined,
- lubePaF1High: undefined,
- lubePaF1Low: undefined,
- singleDoorF1Warn: undefined,
- lubeF1SlightFault: undefined,
- lubeF1SevereFault: undefined,
- f1B1Fault: undefined,
- f1B2Fault: undefined,
- f1Fault: undefined,
- },
- ];
- };
- export const getMonitorData: any = () => {
- return {
- id: 0,
- isCheck: true,
- address: '1号回风立井',
- strName: '1号回风立井主机',
- childName: '1#风机',
- isRun: false,
- frequency: 40,
- windVal: Math.round((Math.random() * 6 + 4) * 100) / 100,
- gasVal1: Math.round((Math.random() * 0.03 + 0) * 100) / 100,
- gasVal2: Math.round((Math.random() * 0.03 + 0) * 100) / 100,
- zdX1: Math.round((Math.random() + 1) * 100) / 100,
- zdX2: Math.round((Math.random() * 10 + 10) * 100) / 100,
- zdY1: Math.round((Math.random() + 1) * 100) / 100,
- zdY2: Math.round((Math.random() * 10 + 10) * 100) / 100,
- yc1: Math.round((Math.random() * 70 + 800) * 100) / 100,
- yc2: Math.round((Math.random() * 100 + 1400) * 100) / 100,
- dqPa: Math.round((Math.random() * 50 + 1000) * 100) / 100,
- co1: 0,
- fanSD: Math.round((Math.random() * 60 + 550) * 100) / 100,
- fanA: Math.round((Math.random() * 60 + 250) * 100) / 100,
- fanU: Math.round((Math.random() * 100 + 500) * 100) / 100,
- fanPL: Math.round((Math.random() * 10 + 40) * 100) / 100,
- fanGL: Math.round((Math.random() * 100 + 150) * 100) / 100,
- fanM3: Math.round((Math.random() * 26 + 200) * 100) / 100,
- WXC: Math.round((Math.random() * 26 + 10) * 100) / 100,
- UXC: Math.round((Math.random() * 26 + 10) * 100) / 100,
- VXC: Math.round((Math.random() * 26 + 10) * 100) / 100,
- QZC: Math.round((Math.random() * 26 + 10) * 100) / 100,
- HZC: Math.round((Math.random() * 26 + 10) * 100) / 100,
- ZCZ1C: Math.round((Math.random() * 26 + 10) * 100) / 100,
- ZCZ2C: Math.round((Math.random() * 26 + 10) * 100) / 100,
- FTZ1C: Math.round((Math.random() * 26 + 10) * 100) / 100,
- FTZ2C: Math.round((Math.random() * 26 + 10) * 100) / 100,
- DJQZ1C: Math.round((Math.random() * 26 + 10) * 100) / 100,
- C: Math.round((Math.random() * 26 + 10) * 100) / 100,
- RH: Math.round((Math.random() * 26 + 14) * 100) / 100,
- lubeBoxTemperatureF1High: true,
- lubeBoxTemperatureF1Low: true,
- lubeTemperatureF1High: true,
- lubeTemperatureF1Low: true,
- lubePaF1High: true,
- lubePaF1Low: true,
- singleDoorF1Warn: true,
- lubeF1SlightFault: true,
- lubeF1SevereFault: true,
- f1B1Fault: true,
- f1B2Fault: true,
- f1Fault: true,
- };
- };
|