| | |
| | | export enum FormProject{ |
| | | PROJECT_NAME = 'projectName', |
| | | PROJECT_STATUS = 'projectStatus', |
| | | PROJCECT_INTRO = 'projectIntro', |
| | | LONGITUDE = 'longitude', |
| | | LATITUDE = 'latitude', |
| | | DEVICELIST = 'deviceList', |
| | | USERLIST = 'userList', |
| | | PROJECT_BLOCKING = 'projectBlocking', |
| | | export enum FormProject { |
| | | PROJECT_NAME = 'projectName', |
| | | PROJECT_STATUS = 'projectStatus', |
| | | PROJCECT_INTRO = 'projectIntro', |
| | | LONGITUDE = 'longitude', |
| | | LATITUDE = 'latitude', |
| | | DEVICELIST = 'deviceList', |
| | | USERLIST = 'userList', |
| | | PROJECT_BLOCKING = 'projectBlocking', |
| | | } |
| | | enum weather{ |
| | | '开启'=1, |
| | | '关闭'=2 |
| | | export enum blocking { |
| | | WINDSPEED = 'windDevice', |
| | | WINDSPEEDREPORT = 'windWeatherReport', |
| | | RAIN = 'rain', |
| | | CLOUDBLOCKINGCONFIGENABLE = 'cloudBlockingConfigEnable', |
| | | WEATHERREPORTENABLE = 'weatherReportEnable', |
| | | } |
| | | enum weather { |
| | | '开启' = 1, |
| | | '关闭' = 2 |
| | | } |
| | | interface deviceList { |
| | | nickName:string |
| | | deviceSource:number |
| | | deviceType:number |
| | | [key:string]:any |
| | | nickName: string |
| | | deviceSource: number |
| | | deviceType: number |
| | | [key: string]: any |
| | | } |
| | | interface projectBlocking { |
| | | weatherBlockingConfigEnable:weather |
| | | cloudBlockingConfigEnable:weather |
| | | |
| | | [blocking.WEATHERREPORTENABLE]?: weather |
| | | [blocking.CLOUDBLOCKINGCONFIGENABLE]: weather |
| | | [blocking.WINDSPEED]?: number |
| | | [blocking.WINDSPEEDREPORT]?: number |
| | | [blocking.RAIN]?: number |
| | | } |
| | | export interface FormState { |
| | | [FormProject.PROJECT_NAME]: string |
| | | [FormProject.PROJECT_STATUS]:string |
| | | [FormProject.PROJCECT_INTRO]:string |
| | | [FormProject.LONGITUDE]:number |
| | | [FormProject.LATITUDE]:number |
| | | [FormProject.DEVICELIST]?:deviceList[] |
| | | [FormProject.USERLIST]:number[] |
| | | [FormProject.PROJECT_BLOCKING]?:{} |
| | | [FormProject.PROJECT_NAME]: string |
| | | [FormProject.PROJECT_STATUS]: string |
| | | [FormProject.PROJCECT_INTRO]: string |
| | | [FormProject.LONGITUDE]: number |
| | | [FormProject.LATITUDE]: number |
| | | [FormProject.DEVICELIST]?: deviceList[] |
| | | [FormProject.USERLIST]: number[] |
| | | [FormProject.PROJECT_BLOCKING]: projectBlocking |
| | | } |
| | | |
| | | /* |
| | | 项目成员表格 |
| | | */ |
| | | export const Usercolumns = [ |
| | | { |
| | | title: '人员项目呼号', |
| | | dataIndex: 'name', |
| | | key: 'name', |
| | | ellipsis: true, |
| | | slots: { customRender: 'name' }, |
| | | }, |
| | | { |
| | | title: '项目角色', |
| | | dataIndex: 'role', |
| | | key: 'role', |
| | | responsive: ['md'], |
| | | ellipsis: true, |
| | | slots: { customRender: 'role' }, |
| | | }, |
| | | { |
| | | title: '编辑', |
| | | dataIndex: 'edit', |
| | | key: 'edit', |
| | | responsive: ['lg'], |
| | | width: '24%', |
| | | ellipsis: true, |
| | | slots: { customRender: 'operation' }, |
| | | }, |
| | | ] |
| | | |
| | | export interface ProjectUser { |
| | | key: string; |
| | | name: string; |
| | | role: number; |
| | | } |
| | | |
| | | /* |
| | | 项目设备表格数据 |
| | | */ |
| | | export const Devicecolumns = [ |
| | | { |
| | | title: '项目设备呼号', |
| | | dataIndex: 'device', |
| | | key: 'device', |
| | | ellipsis: true, |
| | | slots: { customRender: 'device' }, |
| | | }, |
| | | { |
| | | title: '设备型号', |
| | | dataIndex: 'model', |
| | | key: 'model', |
| | | responsive: ['md'], |
| | | ellipsis: true, |
| | | slots: { customRender: 'model' }, |
| | | }, |
| | | { |
| | | title: '编辑', |
| | | dataIndex: 'edit', |
| | | key: 'edit', |
| | | responsive: ['lg'], |
| | | width: '24%', |
| | | ellipsis: true, |
| | | slots: { customRender: 'operation' }, |
| | | }, |
| | | ] |
| | | |
| | | export interface ProjectDevice { |
| | | key: string; |
| | | device: string; |
| | | model: string; |
| | | } |
| | | |
| | | // 校验表单规则 |
| | | export const rules = { |
| | | [FormProject.PROJECT_NAME]: [ |
| | | { required: true, message: '请输入项目名称', trigger: 'blur' }, |
| | | ], |
| | | } |