|
|
@ -2,147 +2,231 @@ import { BasicColumn } from '/@/components/Table'; |
|
|
|
import { FormSchema } from '/@/components/Table'; |
|
|
|
import { rules } from '/@/utils/helper/validator'; |
|
|
|
import { render } from '/@/utils/common/renderUtils'; |
|
|
|
import { JVxeTypes, JVxeColumn } from '/@/components/jeecg/JVxeTable/types' |
|
|
|
import { JVxeTypes, JVxeColumn } from '/@/components/jeecg/JVxeTable/types'; |
|
|
|
import { useUserStore } from '/@/store/modules/user'; |
|
|
|
import { defHttp } from '/@/utils/http/axios'; |
|
|
|
import { ref } from 'vue'; |
|
|
|
// 获取当前权限下的场景id
|
|
|
|
const sceneId = useUserStore().userInfo?.sceneId; |
|
|
|
// 场景列表
|
|
|
|
const sceneList: any = []; |
|
|
|
// 防区列表
|
|
|
|
const areaList: any = []; |
|
|
|
// 站点列表
|
|
|
|
const stationList: any = []; |
|
|
|
// 树状相机数据
|
|
|
|
const nodeTree: any = ref([]); |
|
|
|
// 获取当前场景及子场景信息
|
|
|
|
function getCurrentScene() { |
|
|
|
return defHttp.get( |
|
|
|
{ url: '/military/msMapScene/list', params: { sceneId: sceneId + '*', pageNo: 1, pageSize: 9999 } }, |
|
|
|
{ isTransformResponse: false } |
|
|
|
); |
|
|
|
} |
|
|
|
// 获取当前场景(包括其子场景)下的所有防区
|
|
|
|
function getCurrentSceneArea() { |
|
|
|
return defHttp.get({ url: '/military/msMapLine/list', params: { pageNo: 1, pageSize: 9999 } }, { isTransformResponse: false }); |
|
|
|
} |
|
|
|
// 获取当前防区下的所有站点
|
|
|
|
function getCurrentAreaStation() { |
|
|
|
return defHttp.get({ url: '/military/camera/site/list', params: { pageNo: 1, pageSize: 9999 } }, { isTransformResponse: false }); |
|
|
|
} |
|
|
|
|
|
|
|
// 处理相机树状数据
|
|
|
|
function handleCameraTree(data, index = undefined) { |
|
|
|
let arr: any = []; |
|
|
|
for (let i = 0; i < data.length; i++) { |
|
|
|
let obj: any = {}; |
|
|
|
let item = data[i]; |
|
|
|
obj.label = item.title; |
|
|
|
obj.value = obj.key = item.value; |
|
|
|
obj.disabled = item.children?.length >= 0 ? true : false; |
|
|
|
if (item.children && item.children.length > 0) { |
|
|
|
obj.children = handleCameraTree(item.children); |
|
|
|
} |
|
|
|
arr.push(obj); |
|
|
|
} |
|
|
|
return arr; |
|
|
|
} |
|
|
|
|
|
|
|
// 将数据转化为树状结构
|
|
|
|
getCurrentScene().then((res) => { |
|
|
|
sceneList.value = res.result.records; |
|
|
|
getCurrentSceneArea().then((res1) => { |
|
|
|
areaList.value = res1.result.records; |
|
|
|
getCurrentAreaStation().then((res2) => { |
|
|
|
stationList.value = res2.result.records; |
|
|
|
|
|
|
|
// 定义一个空数组作为树状数组的根节点
|
|
|
|
const tree: any = []; |
|
|
|
//遍历场景列表,查找当前场景(及子场景)数据
|
|
|
|
sceneList.value.forEach((row) => { |
|
|
|
const node = { title: row.sceneName, value: row.sceneId, children: [] }; |
|
|
|
tree.push(node); |
|
|
|
}); |
|
|
|
// 遍历防区列表,查找对应场景下的数据
|
|
|
|
areaList.value.forEach((row) => { |
|
|
|
const parentNode = tree.find((node) => node.value === row.sceneId); |
|
|
|
if (parentNode) { |
|
|
|
const node = { title: row.name, value: row.id, children: [] }; |
|
|
|
parentNode.children.push(node); |
|
|
|
} |
|
|
|
}); |
|
|
|
// 遍历站点列表,查找对应防区下的数据
|
|
|
|
stationList.value.forEach((row) => { |
|
|
|
const parentNodes = tree.map((node) => node.children).flat(); |
|
|
|
const parentNode = parentNodes.find((node) => node.value === row.lineId); |
|
|
|
if (parentNode) { |
|
|
|
const node = { title: row.sitename, value: row.id, children: null }; |
|
|
|
parentNode.children.push(node); |
|
|
|
} |
|
|
|
}); |
|
|
|
// 转化为ant tree-select结构
|
|
|
|
nodeTree.value = handleCameraTree(tree); |
|
|
|
}); |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
//列表数据
|
|
|
|
export const columns: BasicColumn[] = [ |
|
|
|
{ |
|
|
|
title: '所属站点', |
|
|
|
align: "center", |
|
|
|
dataIndex: 'deviceOwnerId_dictText' |
|
|
|
align: 'center', |
|
|
|
dataIndex: 'deviceOwnerId_dictText', |
|
|
|
}, |
|
|
|
{ |
|
|
|
title: '类型', |
|
|
|
align: "center", |
|
|
|
title: '设备类型', |
|
|
|
align: 'center', |
|
|
|
dataIndex: 'deviceType_dictText', |
|
|
|
width: 120 |
|
|
|
width: 120, |
|
|
|
}, |
|
|
|
{ |
|
|
|
title: '设备编码', |
|
|
|
align: "center", |
|
|
|
align: 'center', |
|
|
|
dataIndex: 'deviceCode', |
|
|
|
width: 120 |
|
|
|
width: 120, |
|
|
|
}, |
|
|
|
{ |
|
|
|
title: '名称', |
|
|
|
align: "center", |
|
|
|
dataIndex: 'deviceName' |
|
|
|
title: '设备名称', |
|
|
|
align: 'center', |
|
|
|
dataIndex: 'deviceName', |
|
|
|
}, |
|
|
|
{ |
|
|
|
title: '位置', |
|
|
|
align: "center", |
|
|
|
dataIndex: 'devicePosition' |
|
|
|
title: '部署位置', |
|
|
|
align: 'center', |
|
|
|
dataIndex: 'devicePosition', |
|
|
|
}, |
|
|
|
{ |
|
|
|
title: '经度', |
|
|
|
align: "center", |
|
|
|
dataIndex: 'deviceLon' |
|
|
|
align: 'center', |
|
|
|
dataIndex: 'deviceLon', |
|
|
|
}, |
|
|
|
{ |
|
|
|
title: '纬度', |
|
|
|
align: "center", |
|
|
|
dataIndex: 'deviceLat' |
|
|
|
align: 'center', |
|
|
|
dataIndex: 'deviceLat', |
|
|
|
}, |
|
|
|
{ |
|
|
|
title: '海拔', |
|
|
|
align: "center", |
|
|
|
dataIndex: 'deviceAlt' |
|
|
|
align: 'center', |
|
|
|
dataIndex: 'deviceAlt', |
|
|
|
}, |
|
|
|
{ |
|
|
|
title: '设备状态', |
|
|
|
align: "center", |
|
|
|
align: 'center', |
|
|
|
dataIndex: 'deviceStatus_dictText', |
|
|
|
width: 90 |
|
|
|
width: 90, |
|
|
|
}, |
|
|
|
{ |
|
|
|
title: '访问路径', |
|
|
|
align: "center", |
|
|
|
dataIndex: 'deviceUrl' |
|
|
|
align: 'center', |
|
|
|
dataIndex: 'deviceUrl', |
|
|
|
}, |
|
|
|
{ |
|
|
|
title: '网络协议', |
|
|
|
align: "center", |
|
|
|
dataIndex: 'netProtocol' |
|
|
|
align: 'center', |
|
|
|
dataIndex: 'netProtocol_dictText', |
|
|
|
}, |
|
|
|
{ |
|
|
|
title: '数据协议', |
|
|
|
align:"center", |
|
|
|
dataIndex:"dataProtocol" |
|
|
|
align: 'center', |
|
|
|
dataIndex: 'dataProtocol_dictText', |
|
|
|
}, |
|
|
|
{ |
|
|
|
title: 'ip地址', |
|
|
|
align: "center", |
|
|
|
dataIndex: 'deviceIp' |
|
|
|
align: 'center', |
|
|
|
dataIndex: 'deviceIp', |
|
|
|
}, |
|
|
|
{ |
|
|
|
title: '端口', |
|
|
|
align: "center", |
|
|
|
dataIndex: 'ipPort' |
|
|
|
align: 'center', |
|
|
|
dataIndex: 'ipPort', |
|
|
|
}, |
|
|
|
{ |
|
|
|
title: '端口2', |
|
|
|
align: "center", |
|
|
|
dataIndex: 'ipPort2' |
|
|
|
align: 'center', |
|
|
|
dataIndex: 'ipPort2', |
|
|
|
}, |
|
|
|
{ |
|
|
|
title: '入网许可证', |
|
|
|
align: "center", |
|
|
|
align: 'center', |
|
|
|
dataIndex: 'isAudit_dictText', |
|
|
|
width: 120 |
|
|
|
width: 120, |
|
|
|
}, |
|
|
|
{ |
|
|
|
title: '用户名', |
|
|
|
align: "center", |
|
|
|
dataIndex: 'username' |
|
|
|
align: 'center', |
|
|
|
dataIndex: 'username', |
|
|
|
}, |
|
|
|
{ |
|
|
|
title: '密码', |
|
|
|
align: "center", |
|
|
|
dataIndex: 'password' |
|
|
|
align: 'center', |
|
|
|
dataIndex: 'password', |
|
|
|
}, |
|
|
|
{ |
|
|
|
title: '设备子类型', |
|
|
|
align: "center", |
|
|
|
dataIndex: 'subtype' |
|
|
|
align: 'center', |
|
|
|
dataIndex: 'subtype', |
|
|
|
}, |
|
|
|
{ |
|
|
|
title: '安装高度', |
|
|
|
align: "center", |
|
|
|
dataIndex: 'deviceHeight' |
|
|
|
align: 'center', |
|
|
|
dataIndex: 'deviceHeight', |
|
|
|
}, |
|
|
|
{ |
|
|
|
title: '初始方位角', |
|
|
|
align: "center", |
|
|
|
dataIndex: 'initAzimuth' |
|
|
|
align: 'center', |
|
|
|
dataIndex: 'initAzimuth', |
|
|
|
}, |
|
|
|
{ |
|
|
|
title: '初始俯仰角', |
|
|
|
align: "center", |
|
|
|
dataIndex: 'initPitch' |
|
|
|
align: 'center', |
|
|
|
dataIndex: 'initPitch', |
|
|
|
}, |
|
|
|
{ |
|
|
|
title: '工作半径', |
|
|
|
align: "center", |
|
|
|
dataIndex: 'workingRadius' |
|
|
|
align: 'center', |
|
|
|
dataIndex: 'workingRadius', |
|
|
|
}, |
|
|
|
{ |
|
|
|
title: '水平视场角度', |
|
|
|
align: "center", |
|
|
|
dataIndex: 'horizontalAngle' |
|
|
|
align: 'center', |
|
|
|
dataIndex: 'horizontalAngle', |
|
|
|
}, |
|
|
|
{ |
|
|
|
title: '垂直视场角度', |
|
|
|
align: "center", |
|
|
|
dataIndex: 'verticalAngle' |
|
|
|
align: 'center', |
|
|
|
dataIndex: 'verticalAngle', |
|
|
|
}, |
|
|
|
{ |
|
|
|
title: '识别刻度', |
|
|
|
align: "center", |
|
|
|
dataIndex: 'identificationScale' |
|
|
|
align: 'center', |
|
|
|
dataIndex: 'identificationScale', |
|
|
|
}, |
|
|
|
{ |
|
|
|
title: '备注', |
|
|
|
align: "center", |
|
|
|
dataIndex: 'remark' |
|
|
|
align: 'center', |
|
|
|
dataIndex: 'remark', |
|
|
|
}, |
|
|
|
|
|
|
|
// {
|
|
|
@ -154,32 +238,31 @@ export const columns: BasicColumn[] = [ |
|
|
|
//查询数据
|
|
|
|
export const searchFormSchema: FormSchema[] = [ |
|
|
|
{ |
|
|
|
label: "所属站点", |
|
|
|
label: '所属站点', |
|
|
|
field: 'deviceOwnerId', |
|
|
|
component: 'JDictSelectTag', |
|
|
|
defaultValue: '00001-00001-00002', |
|
|
|
component: 'TreeSelect', |
|
|
|
componentProps: { |
|
|
|
dictCode: "ms_map_scene,scene_name,scene_id" |
|
|
|
treeData: nodeTree, |
|
|
|
}, |
|
|
|
colProps: { span: 6 }, |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: "设备类型", |
|
|
|
label: '设备类型', |
|
|
|
field: 'deviceType', |
|
|
|
component: 'JDictSelectTag', |
|
|
|
componentProps: { |
|
|
|
dictCode: "dt_deveice_type,type_name,type_no" |
|
|
|
dictCode: 'dt_deveice_type,type_name,type_no', |
|
|
|
}, |
|
|
|
colProps: { span: 6 }, |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: "设备编码", |
|
|
|
label: '设备编码', |
|
|
|
field: 'deviceCode', |
|
|
|
component: 'Input', |
|
|
|
colProps: { span: 6 }, |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: "设备名称", |
|
|
|
label: '设备名称', |
|
|
|
field: 'deviceName', |
|
|
|
component: 'JInput', |
|
|
|
colProps: { span: 6 }, |
|
|
@ -191,11 +274,11 @@ export const searchFormSchema: FormSchema[] = [ |
|
|
|
// colProps: {span: 6},
|
|
|
|
// },
|
|
|
|
{ |
|
|
|
label: "设备状态", |
|
|
|
label: '设备状态', |
|
|
|
field: 'deviceStatus', |
|
|
|
component: 'JDictSelectTag', |
|
|
|
componentProps: { |
|
|
|
dictCode: "dt_sensor_status" |
|
|
|
dictCode: 'dt_sensor_status', |
|
|
|
}, |
|
|
|
colProps: { span: 6 }, |
|
|
|
}, |
|
|
@ -212,81 +295,72 @@ export const searchFormSchema: FormSchema[] = [ |
|
|
|
// colProps: {span: 6},
|
|
|
|
// },
|
|
|
|
{ |
|
|
|
label: "数据协议", |
|
|
|
label: '数据协议', |
|
|
|
field: 'protocol', |
|
|
|
component: 'JDictSelectTag', |
|
|
|
componentProps: { |
|
|
|
dictCode: "dt_device_data_protocol,protocol_name,protocol_type" |
|
|
|
dictCode: 'dt_device_data_protocol,protocol_name,protocol_type', |
|
|
|
}, |
|
|
|
colProps: { span: 6 }, |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: "网络协议", |
|
|
|
label: '网络协议', |
|
|
|
field: 'protocol', |
|
|
|
component: 'JDictSelectTag', |
|
|
|
componentProps: { |
|
|
|
dictCode: "dt_device_net_protocol,protocol_name,protocol_type" |
|
|
|
dictCode: 'dt_device_net_protocol,protocol_name,protocol_type', |
|
|
|
}, |
|
|
|
colProps: { span: 6 }, |
|
|
|
}, |
|
|
|
]; |
|
|
|
|
|
|
|
//表单数据
|
|
|
|
export const formSchema: FormSchema[] = [ |
|
|
|
{ |
|
|
|
label: '所属站点', |
|
|
|
field: 'deviceOwnerId', |
|
|
|
component: 'JDictSelectTag', |
|
|
|
component: 'TreeSelect', |
|
|
|
componentProps: { |
|
|
|
dictCode: "ms_map_scene,scene_name,scene_id" |
|
|
|
treeData: nodeTree, |
|
|
|
}, |
|
|
|
dynamicRules: ({ model, schema }) => { |
|
|
|
return [ |
|
|
|
{ required: true, message: '所属站点不能为空!' }, |
|
|
|
]; |
|
|
|
return [{ required: true, message: '所属站点不能为空!' }]; |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '类型', |
|
|
|
label: '设备类型', |
|
|
|
field: 'deviceType', |
|
|
|
component: 'JDictSelectTag', |
|
|
|
componentProps: { |
|
|
|
dictCode: "dt_deveice_type,type_name,type_no", |
|
|
|
stringToNumber: true |
|
|
|
dictCode: 'dt_deveice_type,type_name,type_no', |
|
|
|
stringToNumber: true, |
|
|
|
}, |
|
|
|
dynamicRules: ({ model, schema }) => { |
|
|
|
return [ |
|
|
|
{ required: true, message: '类型不能为空!' }, |
|
|
|
]; |
|
|
|
return [{ required: true, message: '设备类型不能为空!' }]; |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '编码', |
|
|
|
label: '设备编码', |
|
|
|
field: 'deviceCode', |
|
|
|
component: 'Input', |
|
|
|
dynamicRules: ({ model, schema }) => { |
|
|
|
return [ |
|
|
|
{ required: true, message: '编码不能为空!' }, |
|
|
|
]; |
|
|
|
return [{ required: true, message: '设备编码不能为空!' }]; |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '名称', |
|
|
|
label: '设备名称', |
|
|
|
field: 'deviceName', |
|
|
|
component: 'Input', |
|
|
|
dynamicRules: ({ model, schema }) => { |
|
|
|
return [ |
|
|
|
{ required: true, message: '名称不能为空!' }, |
|
|
|
]; |
|
|
|
return [{ required: true, message: '设备名称不能为空!' }]; |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '位置', |
|
|
|
label: '部署位置', |
|
|
|
field: 'devicePosition', |
|
|
|
component: 'Input', |
|
|
|
dynamicRules: ({ model, schema }) => { |
|
|
|
return [ |
|
|
|
{ required: true, message: '位置不能为空!' }, |
|
|
|
]; |
|
|
|
return [{ required: true, message: '部署位置不能为空!' }]; |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
@ -294,9 +368,7 @@ export const formSchema: FormSchema[] = [ |
|
|
|
field: 'deviceLon', |
|
|
|
component: 'InputNumber', |
|
|
|
dynamicRules: ({ model, schema }) => { |
|
|
|
return [ |
|
|
|
{ required: true, message: '经度不能为空!' }, |
|
|
|
]; |
|
|
|
return [{ required: true, message: '经度不能为空!' }]; |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
@ -304,9 +376,7 @@ export const formSchema: FormSchema[] = [ |
|
|
|
field: 'deviceLat', |
|
|
|
component: 'InputNumber', |
|
|
|
dynamicRules: ({ model, schema }) => { |
|
|
|
return [ |
|
|
|
{ required: true, message: '纬度不能为空!' }, |
|
|
|
]; |
|
|
|
return [{ required: true, message: '纬度不能为空!' }]; |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
@ -314,9 +384,7 @@ export const formSchema: FormSchema[] = [ |
|
|
|
field: 'deviceAlt', |
|
|
|
component: 'InputNumber', |
|
|
|
dynamicRules: ({ model, schema }) => { |
|
|
|
return [ |
|
|
|
{ required: true, message: '海拔不能为空!' }, |
|
|
|
]; |
|
|
|
return [{ required: true, message: '海拔不能为空!' }]; |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
@ -324,13 +392,11 @@ export const formSchema: FormSchema[] = [ |
|
|
|
field: 'deviceStatus', |
|
|
|
component: 'JDictSelectTag', |
|
|
|
componentProps: { |
|
|
|
dictCode: "dt_sensor_status", |
|
|
|
stringToNumber: true |
|
|
|
dictCode: 'dt_sensor_status', |
|
|
|
stringToNumber: true, |
|
|
|
}, |
|
|
|
dynamicRules: ({ model, schema }) => { |
|
|
|
return [ |
|
|
|
{ required: true, message: '设备状态不能为空!' }, |
|
|
|
]; |
|
|
|
return [{ required: true, message: '设备状态不能为空!' }]; |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
@ -338,13 +404,10 @@ export const formSchema: FormSchema[] = [ |
|
|
|
field: 'netProtocol', |
|
|
|
component: 'JDictSelectTag', |
|
|
|
componentProps: { |
|
|
|
dictCode: "dt_device_net_protocol,protocol_name,protocol_type", |
|
|
|
stringToNumber: true |
|
|
|
dictCode: 'dt_device_net_protocol,protocol_name,protocol_type', |
|
|
|
}, |
|
|
|
dynamicRules: ({ model, schema }) => { |
|
|
|
return [ |
|
|
|
{ required: true, message: '网络协议不能为空!' }, |
|
|
|
]; |
|
|
|
return [{ required: true, message: '网络协议不能为空!' }]; |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
@ -352,13 +415,10 @@ export const formSchema: FormSchema[] = [ |
|
|
|
field: 'dataProtocol', |
|
|
|
component: 'JDictSelectTag', |
|
|
|
componentProps: { |
|
|
|
dictCode:"dt_device_data_protocol,protocol_name,protocol_type", |
|
|
|
stringToNumber: true |
|
|
|
dictCode: 'dt_device_data_protocol,protocol_name,protocol_type', |
|
|
|
}, |
|
|
|
dynamicRules: ({ model, schema }) => { |
|
|
|
return [ |
|
|
|
{ required: true, message: '数据协议不能为空!' }, |
|
|
|
]; |
|
|
|
return [{ required: true, message: '数据协议不能为空!' }]; |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
@ -366,9 +426,7 @@ export const formSchema: FormSchema[] = [ |
|
|
|
field: 'deviceUrl', |
|
|
|
component: 'Input', |
|
|
|
dynamicRules: ({ model, schema }) => { |
|
|
|
return [ |
|
|
|
{ required: true, message: '访问路径不能为空!' }, |
|
|
|
]; |
|
|
|
return [{ required: true, message: '访问路径不能为空!' }]; |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
@ -383,7 +441,7 @@ export const formSchema: FormSchema[] = [ |
|
|
|
{ |
|
|
|
pattern: /^((2(5[0-5]|[0-4]\d))|[0-1]?\d{1,2})(\.((2(5[0-5]|[0-4]\d))|[0-1]?\d{1,2})){3}$/, |
|
|
|
message: 'ip地址格式不正确!', |
|
|
|
} |
|
|
|
}, |
|
|
|
], |
|
|
|
}, |
|
|
|
{ |
|
|
@ -398,7 +456,7 @@ export const formSchema: FormSchema[] = [ |
|
|
|
{ |
|
|
|
pattern: /^([1-9]\d{0,3}|[1-5]\d{4}|6[0-4]\d{3}|65[0-4]\d{2}|655[0-2]\d|6553[0-5])$/, |
|
|
|
message: '端口格式不正确!', |
|
|
|
} |
|
|
|
}, |
|
|
|
], |
|
|
|
}, |
|
|
|
{ |
|
|
@ -409,7 +467,7 @@ export const formSchema: FormSchema[] = [ |
|
|
|
{ |
|
|
|
pattern: /^([1-9]\d{0,3}|[1-5]\d{4}|6[0-4]\d{3}|65[0-4]\d{2}|655[0-2]\d|6553[0-5])$/, |
|
|
|
message: '端口2格式不正确!', |
|
|
|
} |
|
|
|
}, |
|
|
|
], |
|
|
|
}, |
|
|
|
{ |
|
|
@ -417,13 +475,11 @@ export const formSchema: FormSchema[] = [ |
|
|
|
field: 'isAudit', |
|
|
|
component: 'JDictSelectTag', |
|
|
|
componentProps: { |
|
|
|
dictCode: "dt_is_audit", |
|
|
|
stringToNumber: true |
|
|
|
dictCode: 'dt_is_audit', |
|
|
|
stringToNumber: true, |
|
|
|
}, |
|
|
|
dynamicRules: ({ model, schema }) => { |
|
|
|
return [ |
|
|
|
{ required: true, message: '入网许可证不能为空!' }, |
|
|
|
]; |
|
|
|
return [{ required: true, message: '入网许可证不能为空!' }]; |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
@ -492,7 +548,7 @@ export const formSchema: FormSchema[] = [ |
|
|
|
label: '', |
|
|
|
field: 'id', |
|
|
|
component: 'Input', |
|
|
|
show: false |
|
|
|
show: false, |
|
|
|
}, |
|
|
|
]; |
|
|
|
//子表单数据
|
|
|
@ -505,53 +561,53 @@ export const dtDeviceSensorInfoColumns: BasicColumn[] = [ |
|
|
|
// },
|
|
|
|
{ |
|
|
|
title: '传感器名称', |
|
|
|
align: "center", |
|
|
|
dataIndex: 'sensorName' |
|
|
|
align: 'center', |
|
|
|
dataIndex: 'sensorName', |
|
|
|
}, |
|
|
|
{ |
|
|
|
title: '传感器编号', |
|
|
|
align: "center", |
|
|
|
dataIndex: 'sensorCode' |
|
|
|
align: 'center', |
|
|
|
dataIndex: 'sensorCode', |
|
|
|
}, |
|
|
|
{ |
|
|
|
title: '状态', |
|
|
|
align: "center", |
|
|
|
dataIndex: 'sensorStatus' |
|
|
|
align: 'center', |
|
|
|
dataIndex: 'sensorStatus', |
|
|
|
}, |
|
|
|
{ |
|
|
|
title: '经度', |
|
|
|
align: "center", |
|
|
|
dataIndex: 'sensorLon' |
|
|
|
align: 'center', |
|
|
|
dataIndex: 'sensorLon', |
|
|
|
}, |
|
|
|
{ |
|
|
|
title: '维度', |
|
|
|
align: "center", |
|
|
|
dataIndex: 'sensorLat' |
|
|
|
align: 'center', |
|
|
|
dataIndex: 'sensorLat', |
|
|
|
}, |
|
|
|
{ |
|
|
|
title: '地址编号例如01', |
|
|
|
align: "center", |
|
|
|
dataIndex: 'sensorAddress' |
|
|
|
align: 'center', |
|
|
|
dataIndex: 'sensorAddress', |
|
|
|
}, |
|
|
|
{ |
|
|
|
title: '寄存器地址编号', |
|
|
|
align: "center", |
|
|
|
dataIndex: 'portId' |
|
|
|
align: 'center', |
|
|
|
dataIndex: 'portId', |
|
|
|
}, |
|
|
|
{ |
|
|
|
title: '值', |
|
|
|
align: "center", |
|
|
|
dataIndex: 'sdata' |
|
|
|
align: 'center', |
|
|
|
dataIndex: 'sdata', |
|
|
|
}, |
|
|
|
{ |
|
|
|
title: '备注', |
|
|
|
align: "center", |
|
|
|
dataIndex: 'remark' |
|
|
|
align: 'center', |
|
|
|
dataIndex: 'remark', |
|
|
|
}, |
|
|
|
{ |
|
|
|
title: '所属区域', |
|
|
|
align: "center", |
|
|
|
dataIndex: 'sysAreaCode' |
|
|
|
align: 'center', |
|
|
|
dataIndex: 'sysAreaCode', |
|
|
|
}, |
|
|
|
]; |
|
|
|
//子表列表数据
|
|
|
@ -568,18 +624,18 @@ export const dtDeviceStatusColumns: BasicColumn[] = [ |
|
|
|
// },
|
|
|
|
{ |
|
|
|
title: '设备初始状态', |
|
|
|
align: "center", |
|
|
|
dataIndex: 'status' |
|
|
|
align: 'center', |
|
|
|
dataIndex: 'status', |
|
|
|
}, |
|
|
|
{ |
|
|
|
title: '状态补充说明', |
|
|
|
align: "center", |
|
|
|
dataIndex: 'remark' |
|
|
|
align: 'center', |
|
|
|
dataIndex: 'remark', |
|
|
|
}, |
|
|
|
{ |
|
|
|
title: '所属区域', |
|
|
|
align: "center", |
|
|
|
dataIndex: 'sysAreaCode' |
|
|
|
align: 'center', |
|
|
|
dataIndex: 'sysAreaCode', |
|
|
|
}, |
|
|
|
]; |
|
|
|
//子表表格配置
|
|
|
@ -596,18 +652,16 @@ export const dtDeviceSensorInfoJVxeColumns: JVxeColumn[] = [ |
|
|
|
title: '传感器名称', |
|
|
|
key: 'sensorName', |
|
|
|
type: JVxeTypes.input, |
|
|
|
width: "200px", |
|
|
|
width: '200px', |
|
|
|
placeholder: '请输入${title}', |
|
|
|
defaultValue: '', |
|
|
|
validateRules: [ |
|
|
|
{ required: true, message: '${title}不能为空' }, |
|
|
|
], |
|
|
|
validateRules: [{ required: true, message: '${title}不能为空' }], |
|
|
|
}, |
|
|
|
{ |
|
|
|
title: '传感器编号', |
|
|
|
key: 'sensorCode', |
|
|
|
type: JVxeTypes.input, |
|
|
|
width: "200px", |
|
|
|
width: '200px', |
|
|
|
placeholder: '请输入${title}', |
|
|
|
defaultValue: '', |
|
|
|
}, |
|
|
@ -615,7 +669,7 @@ export const dtDeviceSensorInfoJVxeColumns: JVxeColumn[] = [ |
|
|
|
title: '状态', |
|
|
|
key: 'sensorStatus', |
|
|
|
type: JVxeTypes.inputNumber, |
|
|
|
width: "200px", |
|
|
|
width: '200px', |
|
|
|
placeholder: '请输入${title}', |
|
|
|
defaultValue: '', |
|
|
|
}, |
|
|
@ -623,7 +677,7 @@ export const dtDeviceSensorInfoJVxeColumns: JVxeColumn[] = [ |
|
|
|
title: '经度', |
|
|
|
key: 'sensorLon', |
|
|
|
type: JVxeTypes.inputNumber, |
|
|
|
width: "200px", |
|
|
|
width: '200px', |
|
|
|
placeholder: '请输入${title}', |
|
|
|
defaultValue: '', |
|
|
|
}, |
|
|
@ -631,7 +685,7 @@ export const dtDeviceSensorInfoJVxeColumns: JVxeColumn[] = [ |
|
|
|
title: '维度', |
|
|
|
key: 'sensorLat', |
|
|
|
type: JVxeTypes.inputNumber, |
|
|
|
width: "200px", |
|
|
|
width: '200px', |
|
|
|
placeholder: '请输入${title}', |
|
|
|
defaultValue: '', |
|
|
|
}, |
|
|
@ -639,7 +693,7 @@ export const dtDeviceSensorInfoJVxeColumns: JVxeColumn[] = [ |
|
|
|
title: '地址编号例如01', |
|
|
|
key: 'sensorAddress', |
|
|
|
type: JVxeTypes.input, |
|
|
|
width: "200px", |
|
|
|
width: '200px', |
|
|
|
placeholder: '请输入${title}', |
|
|
|
defaultValue: '', |
|
|
|
}, |
|
|
@ -647,7 +701,7 @@ export const dtDeviceSensorInfoJVxeColumns: JVxeColumn[] = [ |
|
|
|
title: '寄存器地址编号', |
|
|
|
key: 'portId', |
|
|
|
type: JVxeTypes.inputNumber, |
|
|
|
width: "200px", |
|
|
|
width: '200px', |
|
|
|
placeholder: '请输入${title}', |
|
|
|
defaultValue: '', |
|
|
|
}, |
|
|
@ -655,7 +709,7 @@ export const dtDeviceSensorInfoJVxeColumns: JVxeColumn[] = [ |
|
|
|
title: '值', |
|
|
|
key: 'sdata', |
|
|
|
type: JVxeTypes.inputNumber, |
|
|
|
width: "200px", |
|
|
|
width: '200px', |
|
|
|
placeholder: '请输入${title}', |
|
|
|
defaultValue: '', |
|
|
|
}, |
|
|
@ -663,7 +717,7 @@ export const dtDeviceSensorInfoJVxeColumns: JVxeColumn[] = [ |
|
|
|
title: '备注', |
|
|
|
key: 'remark', |
|
|
|
type: JVxeTypes.input, |
|
|
|
width: "200px", |
|
|
|
width: '200px', |
|
|
|
placeholder: '请输入${title}', |
|
|
|
defaultValue: '', |
|
|
|
}, |
|
|
@ -671,17 +725,17 @@ export const dtDeviceSensorInfoJVxeColumns: JVxeColumn[] = [ |
|
|
|
title: '所属区域', |
|
|
|
key: 'sysAreaCode', |
|
|
|
type: JVxeTypes.input, |
|
|
|
width: "200px", |
|
|
|
width: '200px', |
|
|
|
placeholder: '请输入${title}', |
|
|
|
defaultValue: '', |
|
|
|
}, |
|
|
|
] |
|
|
|
]; |
|
|
|
export const dtDeviceStatusJVxeColumns: JVxeColumn[] = [ |
|
|
|
{ |
|
|
|
title: '设备唯一标识', |
|
|
|
key: 'deviceId', |
|
|
|
type: JVxeTypes.input, |
|
|
|
width: "200px", |
|
|
|
width: '200px', |
|
|
|
placeholder: '请输入${title}', |
|
|
|
defaultValue: '', |
|
|
|
}, |
|
|
@ -689,29 +743,25 @@ export const dtDeviceStatusJVxeColumns: JVxeColumn[] = [ |
|
|
|
title: '所属站点ID', |
|
|
|
key: 'deviceOwnerId', |
|
|
|
type: JVxeTypes.inputNumber, |
|
|
|
width: "200px", |
|
|
|
width: '200px', |
|
|
|
placeholder: '请输入${title}', |
|
|
|
defaultValue: '', |
|
|
|
validateRules: [ |
|
|
|
{ required: true, message: '${title}不能为空' }, |
|
|
|
], |
|
|
|
validateRules: [{ required: true, message: '${title}不能为空' }], |
|
|
|
}, |
|
|
|
{ |
|
|
|
title: '设备初始状态', |
|
|
|
key: 'status', |
|
|
|
type: JVxeTypes.inputNumber, |
|
|
|
width: "200px", |
|
|
|
width: '200px', |
|
|
|
placeholder: '请输入${title}', |
|
|
|
defaultValue: '', |
|
|
|
validateRules: [ |
|
|
|
{ required: true, message: '${title}不能为空' }, |
|
|
|
], |
|
|
|
validateRules: [{ required: true, message: '${title}不能为空' }], |
|
|
|
}, |
|
|
|
{ |
|
|
|
title: '状态补充说明', |
|
|
|
key: 'remark', |
|
|
|
type: JVxeTypes.input, |
|
|
|
width: "200px", |
|
|
|
width: '200px', |
|
|
|
placeholder: '请输入${title}', |
|
|
|
defaultValue: '', |
|
|
|
}, |
|
|
@ -719,11 +769,11 @@ export const dtDeviceStatusJVxeColumns: JVxeColumn[] = [ |
|
|
|
title: '所属区域', |
|
|
|
key: 'sysAreaCode', |
|
|
|
type: JVxeTypes.input, |
|
|
|
width: "200px", |
|
|
|
width: '200px', |
|
|
|
placeholder: '请输入${title}', |
|
|
|
defaultValue: '', |
|
|
|
}, |
|
|
|
] |
|
|
|
]; |
|
|
|
|
|
|
|
/** |
|
|
|
* 流程表单调用这个方法获取formSchema |
|
|
|