| | |
| | | export const menuData = [ |
| | | { |
| | | label: '站点名称', |
| | | placeholder: '请输入站点名称', |
| | | name: 'diName', |
| | | value: '', |
| | | status: 'success', |
| | | tips: '站点名称不能为空', |
| | | onChange:(v)=>{ |
| | | this.value = v |
| | | } |
| | | }, |
| | | { |
| | | label: 'MN编号', |
| | | placeholder: '请输入MN编号', |
| | | name: 'diMnCode', |
| | | value: '', |
| | | status: 'success', |
| | | tips: 'MN编号不能为空', |
| | | onChange:(v)=>{ |
| | | this.value = v |
| | | } |
| | | }, |
| | | { |
| | | label: '设备类型', |
| | | placeholder: '请输入设备类型', |
| | | name: 'diType', |
| | | value: '', |
| | | status: 'success', |
| | | tips: '设备类型不能为空', |
| | | onChange:(v)=>{ |
| | | this.value = v |
| | | } |
| | | }, |
| | | ]; |
| | | import { baseInputItem, hideInputItem, setDefaultValue } from "../../../../components/form/form-util.js"; |
| | | import { monitorDevices } from '../../../../common/dataMonitorDeviceType'; |
| | | import { treatmentDevices } from '../../../../common/dataTreatmentDeviceType'; |
| | | import { productionDevices } from '../../../../common/dataProductionDeviceType'; |
| | | import { freq } from '../../../../common/dataMaintainFrequency'; |
| | | import { status } from '../../../../common/dataRunningStatus'; |
| | | import { ownership } from '../../../../common/dataOwnership'; |
| | | |
| | | /** |
| | | * 监测设备表单 |
| | | * @param {Number} sceneType 场景类型(飞羽监管系统) |
| | | * @param {Object} defaultValue 表单默认值 |
| | | */ |
| | | export function monitorDeviceForm(sceneType, defaultValue) { |
| | | const items = [ |
| | | hideInputItem('id', 'diId'), |
| | | hideInputItem('创建时间', 'diCreateTime'), |
| | | hideInputItem('更新时间', 'diUpdateTime'), |
| | | hideInputItem('场景id', 'diSceneGuid'), |
| | | hideInputItem('场景类型', 'diSceneTypeId'), |
| | | |
| | | baseInputItem('站点名称', 'diName', true), |
| | | baseInputItem('设备编号', 'diDeviceCode'), |
| | | // 设备类型和设备子类合并用级联选择器展示 |
| | | baseInputItem( |
| | | '设备类型', |
| | | '_type', |
| | | true, |
| | | 'cascader', |
| | | monitorDevices(sceneType), |
| | | ['选择设备类型', '选择设备子类'], |
| | | ['diTypeId', 'diSubtypeId'], |
| | | ), |
| | | // baseInputItem('设备类型', 'diTypeId', true, 'picker'), |
| | | // baseInputItem('设备子类', 'diSubtypeId', true, 'picker'), |
| | | baseInputItem('供应商', 'diSupplier'), |
| | | baseInputItem('运维商', 'diMaintainer'), |
| | | baseInputItem('运维频次', 'diMaintainFrequency', true, 'picker', freq), |
| | | baseInputItem('运维人员', 'diMaintainStaff'), |
| | | baseInputItem('运维电话', 'diMaintainTel'), |
| | | baseInputItem('运行状态', 'diRunningStatus', true, 'picker', status), |
| | | baseInputItem('品牌型号', 'diBrandModel'), |
| | | baseInputItem('设备参数', 'diDeviceParam'), |
| | | baseInputItem('所有权', 'diOwnership', true, 'picker', ownership), |
| | | |
| | | // todo 2024/8/12: 后续要添加二维码的信息扫描录入 |
| | | // baseInputItem('标识二维码', 'DI_QR_Code'), |
| | | // baseInputItem('其他第三方或设备自带二维码', 'DI_Other_QR_Code'), |
| | | ]; |
| | | |
| | | // 填充默认数据 |
| | | setDefaultValue(items, defaultValue); |
| | | |
| | | return items; |
| | | } |
| | | |
| | | /** |
| | | * 治理设备表单 |
| | | */ |
| | | export function treatmentDeviceForm(sceneType, defaultValue) { |
| | | return [ |
| | | baseInputItem('站点名称', 'diName', true), |
| | | baseInputItem('设备编号', 'diDeviceCode'), |
| | | baseInputItem('设备类型', 'diType', true), |
| | | baseInputItem('供应商', 'diSupplier'), |
| | | baseInputItem('运维商', 'diMaintainer'), |
| | | baseInputItem('是否上线', 'diRunningStatus', true, 'switch'), |
| | | baseInputItem('是否拆除', 'diRemoved', true, 'switch'), |
| | | ]; |
| | | } |
| | | |
| | | /** |
| | | * 生产设备表单 |
| | | */ |
| | | export function productionDeviceForm(sceneType, defaultValue) { |
| | | return [ |
| | | baseInputItem('站点名称', 'diName', true), |
| | | baseInputItem('设备编号', 'diDeviceCode'), |
| | | baseInputItem('设备类型', 'diType', true), |
| | | baseInputItem('供应商', 'diSupplier'), |
| | | baseInputItem('运维商', 'diMaintainer'), |
| | | baseInputItem('是否上线', 'diRunningStatus', true, 'switch'), |
| | | baseInputItem('是否拆除', 'diRemoved', true, 'switch'), |
| | | ]; |
| | | } |
| | | |
| | | /** |
| | | * 设备状态表单 |
| | | */ |
| | | export function deviceStatusForm(defaultValue) { |
| | | return [ |
| | | hideInputItem('id', 'dlId'), |
| | | hideInputItem('设备id', 'dlDeviceId'), |
| | | hideInputItem('设备类型', 'dlDeviceType'), |
| | | hideInputItem('场景id', 'dlSceneGuid'), |
| | | hideInputItem('场景类型', 'dlSceneTypeId'), |
| | | hideInputItem('现场图片', 'dlPicUrl'), |
| | | hideInputItem('现场视频', 'dlVideoUrl'), |
| | | hideInputItem('创建时间', 'dlCreateTime'), |
| | | hideInputItem('更新时间', 'dlUpdateTime'), |
| | | |
| | | baseInputItem('设备位置', 'DL_Location', true), |
| | | baseInputItem('经度', 'DL_Longitude'), |
| | | baseInputItem('维度', 'DL_Latitude', true), |
| | | baseInputItem('是否规范', 'DL_Standard', true, 'switch'), |
| | | baseInputItem('不规范原因', 'DL_UnStandard_Reason'), |
| | | baseInputItem('运行状态', 'DL_Real_Time_Status', true, 'picker', status), |
| | | ]; |
| | | } |