Browse Source

同步设备状态实时监控模块对应表单字段

master
jiejie 1 year ago
parent
commit
d1ba7b36c5
  1. 14
      src/views/military/modules/equipmentMonitor/perimeterAlarm/PerimeterAlarm.api.ts
  2. 68
      src/views/military/modules/equipmentMonitor/perimeterAlarm/PerimeterAlarm.data.ts
  3. 40
      src/views/military/modules/equipmentMonitor/perimeterAlarm/components/PerimeterAlarmForm.vue
  4. 14
      src/views/military/modules/equipmentMonitor/photoelectric/Photoelectric.api.ts
  5. 69
      src/views/military/modules/equipmentMonitor/photoelectric/Photoelectric.data.ts
  6. 40
      src/views/military/modules/equipmentMonitor/photoelectric/components/PhotoelectricForm.vue
  7. 14
      src/views/military/modules/equipmentMonitor/radar/RadarDetection.api.ts
  8. 68
      src/views/military/modules/equipmentMonitor/radar/RadarDetection.data.ts
  9. 40
      src/views/military/modules/equipmentMonitor/radar/components/RadarDetectionForm.vue
  10. 25
      src/views/military/modules/equipmentMonitor/solarEnergy/SiteView.vue

14
src/views/military/modules/equipmentMonitor/perimeterAlarm/PerimeterAlarm.api.ts

@ -4,13 +4,13 @@ import { useMessage } from "/@/hooks/web/useMessage";
const { createConfirm } = useMessage(); const { createConfirm } = useMessage();
enum Api { enum Api {
list = '/military/msDeviceInfo/list', list = '/military/dtDeviceInfo/list',
save='/military/msDeviceInfo/add', save='/military/dtDeviceInfo/add',
edit='/military/msDeviceInfo/edit', edit='/military/dtDeviceInfo/edit',
deleteOne = '/military/msDeviceInfo/delete', deleteOne = '/military/dtDeviceInfo/delete',
deleteBatch = '/military/msDeviceInfo/deleteBatch', deleteBatch = '/military/dtDeviceInfo/deleteBatch',
importExcel = '/military/msDeviceInfo/importExcel', importExcel = '/military/dtDeviceInfo/importExcel',
exportXls = '/military/msDeviceInfo/exportXls', exportXls = '/military/dtDeviceInfo/exportXls',
relayCorxSwitch= '/alarm/recv/relayCorx/switch', relayCorxSwitch= '/alarm/recv/relayCorx/switch',
} }

68
src/views/military/modules/equipmentMonitor/perimeterAlarm/PerimeterAlarm.data.ts

@ -7,13 +7,13 @@ export const columns: BasicColumn[] = [
{ {
title: '设备编号', title: '设备编号',
align: "center", align: "center",
dataIndex: 'deviceNum' dataIndex: 'deviceCode'
},
{
title: '设备厂商',
align: "center",
dataIndex: 'deviceComp_dictText'
}, },
// {
// title: '设备厂商',
// align: "center",
// dataIndex: 'deviceComp_dictText'
// },
{ {
title: '设备名称', title: '设备名称',
align: "center", align: "center",
@ -23,24 +23,24 @@ export const columns: BasicColumn[] = [
{ {
title: '设备IP', title: '设备IP',
align: "center", align: "center",
dataIndex: 'ip' dataIndex: 'deviceIp'
}, },
{ {
title: '监听通信端口', title: '监听通信端口',
align: "center", align: "center",
dataIndex: 'port' dataIndex: 'ipPort'
}, },
{ {
title: '设备状态', title: '设备状态',
align: "center", align: "center",
dataIndex: 'state', dataIndex: 'deviceStatus',
slots: { customRender: 'state' }, slots: { customRender: 'state' },
}, },
{ // {
title: '状态更新时间', // title: '状态更新时间',
align: "center", // align: "center",
dataIndex: 'aliveTime' // dataIndex: 'aliveTime'
}, // },
]; ];
//查询数据 //查询数据
@ -49,11 +49,11 @@ export const searchFormSchema: FormSchema[] = [
//表单数据 //表单数据
export const formSchema: FormSchema[] = [ export const formSchema: FormSchema[] = [
{ // {
label: '设备厂商', // label: '设备厂商',
field: 'deviceComp', // field: 'deviceComp',
component: 'InputNumber', // component: 'InputNumber',
}, // },
{ {
label: '设备名称', label: '设备名称',
field: 'deviceName', field: 'deviceName',
@ -61,33 +61,33 @@ export const formSchema: FormSchema[] = [
}, },
{ {
label: '设备编号', label: '设备编号',
field: 'deviceNum', field: 'deviceCode',
component: 'Input', component: 'Input',
}, },
{ {
label: '设备IP', label: '设备IP',
field: 'ip', field: 'deviceIp',
component: 'Input', component: 'Input',
}, },
{ {
label: '监听/通信端口', label: '监听/通信端口',
field: 'port', field: 'ipPort',
component: 'InputNumber', component: 'InputNumber',
}, },
{ {
label: '启用状态', label: '设备状态',
field: 'state', field: 'deviceStatus',
component: 'InputNumber', component: 'InputNumber',
}, },
{ // {
label: '心跳更新时间', // label: '心跳更新时间',
field: 'aliveTime', // field: 'aliveTime',
component: 'DatePicker', // component: 'DatePicker',
componentProps: { // componentProps: {
showTime: true, // showTime: true,
valueFormat: 'YYYY-MM-DD HH:mm:ss' // valueFormat: 'YYYY-MM-DD HH:mm:ss'
}, // },
}, // },
// TODO 主键隐藏字段,目前写死为ID // TODO 主键隐藏字段,目前写死为ID
{ {
label: '', label: '',

40
src/views/military/modules/equipmentMonitor/perimeterAlarm/components/PerimeterAlarmForm.vue

@ -2,41 +2,41 @@
<a-spin :spinning="confirmLoading"> <a-spin :spinning="confirmLoading">
<a-form ref="formRef" class="antd-modal-form" :labelCol="labelCol" :wrapperCol="wrapperCol"> <a-form ref="formRef" class="antd-modal-form" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-row> <a-row>
<a-col :span="24"> <!-- <a-col :span="24">
<a-form-item label="设备厂商" v-bind="validateInfos.deviceComp"> <a-form-item label="设备厂商" v-bind="validateInfos.deviceComp">
<a-input-number v-model:value="formData.deviceComp" placeholder="请输入设备厂商" style="width: 100%" :disabled="disabled"/> <a-input-number v-model:value="formData.deviceComp" placeholder="请输入设备厂商" style="width: 100%" :disabled="disabled"/>
</a-form-item> </a-form-item>
</a-col> </a-col> -->
<a-col :span="24"> <a-col :span="24">
<a-form-item label="设备名称" v-bind="validateInfos.deviceName"> <a-form-item label="设备名称" v-bind="validateInfos.deviceName">
<a-input v-model:value="formData.deviceName" placeholder="请输入设备名称" :disabled="disabled"></a-input> <a-input v-model:value="formData.deviceName" placeholder="请输入设备名称" :disabled="disabled"></a-input>
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :span="24"> <a-col :span="24">
<a-form-item label="设备编号" v-bind="validateInfos.deviceNum"> <a-form-item label="设备编号" v-bind="validateInfos.deviceCode">
<a-input v-model:value="formData.deviceNum" placeholder="请输入设备编号" :disabled="disabled"></a-input> <a-input v-model:value="formData.deviceCode" placeholder="请输入设备编号" :disabled="disabled"></a-input>
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :span="24"> <a-col :span="24">
<a-form-item label="设备IP" v-bind="validateInfos.ip"> <a-form-item label="设备IP" v-bind="validateInfos.deviceIp">
<a-input v-model:value="formData.ip" placeholder="请输入设备IP" :disabled="disabled"></a-input> <a-input v-model:value="formData.deviceIp" placeholder="请输入设备IP" :disabled="disabled"></a-input>
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :span="24"> <a-col :span="24">
<a-form-item label="监听/通信端口" v-bind="validateInfos.port"> <a-form-item label="监听/通信端口" v-bind="validateInfos.ipPort">
<a-input-number v-model:value="formData.port" placeholder="请输入监听/通信端口" style="width: 100%" :disabled="disabled"/> <a-input-number v-model:value="formData.ipPort" placeholder="请输入监听/通信端口" style="width: 100%" :disabled="disabled"/>
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :span="24"> <a-col :span="24">
<a-form-item label="启用状态" v-bind="validateInfos.state"> <a-form-item label="启用状态" v-bind="validateInfos.deviceStatus">
<a-input-number v-model:value="formData.state" placeholder="请输入启用状态" style="width: 100%" :disabled="disabled"/> <a-input-number v-model:value="formData.deviceStatus" placeholder="请输入启用状态" style="width: 100%" :disabled="disabled"/>
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :span="24"> <!-- <a-col :span="24">
<a-form-item label="心跳更新时间" v-bind="validateInfos.aliveTime"> <a-form-item label="心跳更新时间" v-bind="validateInfos.aliveTime">
<a-date-picker placeholder="请选择心跳更新时间" v-model:value="formData.aliveTime" showTime value-format="YYYY-MM-DD HH:mm:ss" style="width: 100%" :disabled="disabled"/> <a-date-picker placeholder="请选择心跳更新时间" v-model:value="formData.aliveTime" showTime value-format="YYYY-MM-DD HH:mm:ss" style="width: 100%" :disabled="disabled"/>
</a-form-item> </a-form-item>
</a-col> </a-col> -->
</a-row> </a-row>
</a-form> </a-form>
</a-spin> </a-spin>
@ -60,13 +60,17 @@
const emit = defineEmits(['register', 'ok']); const emit = defineEmits(['register', 'ok']);
const formData = reactive<Record<string, any>>({ const formData = reactive<Record<string, any>>({
id: '', id: '',
deviceComp: undefined, // deviceComp: undefined,
deviceName: '', deviceName: '',
deviceNum: '', // deviceNum: '',
ip: '', deviceCode:'',
port: undefined, // ip: '',
state: undefined, deviceIp:'',
aliveTime: '', // port: undefined,
ipPort:undefined,
// state: undefined,
deviceStatus: undefined,
// aliveTime: '',
}); });
const { createMessage } = useMessage(); const { createMessage } = useMessage();
const labelCol = ref<any>({ xs: { span: 24 }, sm: { span: 5 } }); const labelCol = ref<any>({ xs: { span: 24 }, sm: { span: 5 } });

14
src/views/military/modules/equipmentMonitor/photoelectric/Photoelectric.api.ts

@ -4,13 +4,13 @@ import { useMessage } from "/@/hooks/web/useMessage";
const { createConfirm } = useMessage(); const { createConfirm } = useMessage();
enum Api { enum Api {
list = '/military/msDeviceInfo/list', list = '/military/dtDeviceInfo/list',
save='/military/msDeviceInfo/add', save='/military/dtDeviceInfo/add',
edit='/military/msDeviceInfo/edit', edit='/military/dtDeviceInfo/edit',
deleteOne = '/military/msDeviceInfo/delete', deleteOne = '/military/dtDeviceInfo/delete',
deleteBatch = '/military/msDeviceInfo/deleteBatch', deleteBatch = '/military/dtDeviceInfo/deleteBatch',
importExcel = '/military/msDeviceInfo/importExcel', importExcel = '/military/dtDeviceInfo/importExcel',
exportXls = '/military/msDeviceInfo/exportXls', exportXls = '/military/dtDeviceInfo/exportXls',
relayCorxSwitch= '/alarm/recv/relayCorx/switch', relayCorxSwitch= '/alarm/recv/relayCorx/switch',
} }

69
src/views/military/modules/equipmentMonitor/photoelectric/Photoelectric.data.ts

@ -7,14 +7,13 @@ export const columns: BasicColumn[] = [
{ {
title: '设备编号', title: '设备编号',
align: "center", align: "center",
dataIndex: 'deviceNum' dataIndex: 'deviceCode'
},
{
title: '设备厂商',
align: "center",
// dataIndex: 'deviceComp'
dataIndex: 'deviceComp_dictText'
}, },
// {
// title: '设备厂商',
// align: "center",
// dataIndex: 'deviceComp_dictText'
// },
{ {
title: '设备名称', title: '设备名称',
align: "center", align: "center",
@ -24,24 +23,24 @@ export const columns: BasicColumn[] = [
{ {
title: '设备IP', title: '设备IP',
align: "center", align: "center",
dataIndex: 'ip' dataIndex: 'deviceIp'
}, },
{ {
title: '监听通信端口', title: '监听通信端口',
align: "center", align: "center",
dataIndex: 'port' dataIndex: 'ipPort'
}, },
{ {
title: '设备状态', title: '设备状态',
align: "center", align: "center",
dataIndex: 'state', dataIndex: 'deviceStatus',
slots: { customRender: 'state' }, slots: { customRender: 'state' },
}, },
{ // {
title: '状态更新时间', // title: '状态更新时间',
align: "center", // align: "center",
dataIndex: 'aliveTime' // dataIndex: 'aliveTime'
}, // },
]; ];
//查询数据 //查询数据
@ -50,11 +49,11 @@ export const searchFormSchema: FormSchema[] = [
//表单数据 //表单数据
export const formSchema: FormSchema[] = [ export const formSchema: FormSchema[] = [
{ // {
label: '设备厂商', // label: '设备厂商',
field: 'deviceComp', // field: 'deviceComp',
component: 'InputNumber', // component: 'InputNumber',
}, // },
{ {
label: '设备名称', label: '设备名称',
field: 'deviceName', field: 'deviceName',
@ -62,33 +61,33 @@ export const formSchema: FormSchema[] = [
}, },
{ {
label: '设备编号', label: '设备编号',
field: 'deviceNum', field: 'deviceCode',
component: 'Input', component: 'Input',
}, },
{ {
label: '设备IP', label: '设备IP',
field: 'ip', field: 'deviceIp',
component: 'Input', component: 'Input',
}, },
{ {
label: '监听/通信端口', label: '监听/通信端口',
field: 'port', field: 'ipPort',
component: 'InputNumber', component: 'InputNumber',
}, },
{ {
label: '启用状态', label: '设备状态',
field: 'state', field: 'deviceStatus',
component: 'InputNumber', component: 'InputNumber',
}, },
{ // {
label: '心跳更新时间', // label: '心跳更新时间',
field: 'aliveTime', // field: 'aliveTime',
component: 'DatePicker', // component: 'DatePicker',
componentProps: { // componentProps: {
showTime: true, // showTime: true,
valueFormat: 'YYYY-MM-DD HH:mm:ss' // valueFormat: 'YYYY-MM-DD HH:mm:ss'
}, // },
}, // },
// TODO 主键隐藏字段,目前写死为ID // TODO 主键隐藏字段,目前写死为ID
{ {
label: '', label: '',

40
src/views/military/modules/equipmentMonitor/photoelectric/components/PhotoelectricForm.vue

@ -2,41 +2,41 @@
<a-spin :spinning="confirmLoading"> <a-spin :spinning="confirmLoading">
<a-form ref="formRef" class="antd-modal-form" :labelCol="labelCol" :wrapperCol="wrapperCol"> <a-form ref="formRef" class="antd-modal-form" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-row> <a-row>
<a-col :span="24"> <!-- <a-col :span="24">
<a-form-item label="设备厂商" v-bind="validateInfos.deviceComp"> <a-form-item label="设备厂商" v-bind="validateInfos.deviceComp">
<a-input-number v-model:value="formData.deviceComp" placeholder="请输入设备厂商" style="width: 100%" :disabled="disabled"/> <a-input-number v-model:value="formData.deviceComp" placeholder="请输入设备厂商" style="width: 100%" :disabled="disabled"/>
</a-form-item> </a-form-item>
</a-col> </a-col> -->
<a-col :span="24"> <a-col :span="24">
<a-form-item label="设备名称" v-bind="validateInfos.deviceName"> <a-form-item label="设备名称" v-bind="validateInfos.deviceName">
<a-input v-model:value="formData.deviceName" placeholder="请输入设备名称" :disabled="disabled"></a-input> <a-input v-model:value="formData.deviceName" placeholder="请输入设备名称" :disabled="disabled"></a-input>
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :span="24"> <a-col :span="24">
<a-form-item label="设备编号" v-bind="validateInfos.deviceNum"> <a-form-item label="设备编号" v-bind="validateInfos.deviceCode">
<a-input v-model:value="formData.deviceNum" placeholder="请输入设备编号" :disabled="disabled"></a-input> <a-input v-model:value="formData.deviceCode" placeholder="请输入设备编号" :disabled="disabled"></a-input>
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :span="24"> <a-col :span="24">
<a-form-item label="设备IP" v-bind="validateInfos.ip"> <a-form-item label="设备IP" v-bind="validateInfos.deviceIp">
<a-input v-model:value="formData.ip" placeholder="请输入设备IP" :disabled="disabled"></a-input> <a-input v-model:value="formData.deviceIp" placeholder="请输入设备IP" :disabled="disabled"></a-input>
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :span="24"> <a-col :span="24">
<a-form-item label="监听/通信端口" v-bind="validateInfos.port"> <a-form-item label="监听/通信端口" v-bind="validateInfos.ipPort">
<a-input-number v-model:value="formData.port" placeholder="请输入监听/通信端口" style="width: 100%" :disabled="disabled"/> <a-input-number v-model:value="formData.ipPort" placeholder="请输入监听/通信端口" style="width: 100%" :disabled="disabled"/>
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :span="24"> <a-col :span="24">
<a-form-item label="启用状态" v-bind="validateInfos.state"> <a-form-item label="启用状态" v-bind="validateInfos.deviceStatus">
<a-input-number v-model:value="formData.state" placeholder="请输入启用状态" style="width: 100%" :disabled="disabled"/> <a-input-number v-model:value="formData.deviceStatus" placeholder="请输入启用状态" style="width: 100%" :disabled="disabled"/>
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :span="24"> <!-- <a-col :span="24">
<a-form-item label="心跳更新时间" v-bind="validateInfos.aliveTime"> <a-form-item label="心跳更新时间" v-bind="validateInfos.aliveTime">
<a-date-picker placeholder="请选择心跳更新时间" v-model:value="formData.aliveTime" showTime value-format="YYYY-MM-DD HH:mm:ss" style="width: 100%" :disabled="disabled"/> <a-date-picker placeholder="请选择心跳更新时间" v-model:value="formData.aliveTime" showTime value-format="YYYY-MM-DD HH:mm:ss" style="width: 100%" :disabled="disabled"/>
</a-form-item> </a-form-item>
</a-col> </a-col> -->
</a-row> </a-row>
</a-form> </a-form>
</a-spin> </a-spin>
@ -60,13 +60,17 @@
const emit = defineEmits(['register', 'ok']); const emit = defineEmits(['register', 'ok']);
const formData = reactive<Record<string, any>>({ const formData = reactive<Record<string, any>>({
id: '', id: '',
deviceComp: undefined, // deviceComp: undefined,
deviceName: '', deviceName: '',
deviceNum: '', // deviceNum: '',
ip: '', deviceCode:'',
port: undefined, // ip: '',
state: undefined, deviceIp:'',
aliveTime: '', // port: undefined,
ipPort:undefined,
// state: undefined,
deviceStatus: undefined,
// aliveTime: '',
}); });
const { createMessage } = useMessage(); const { createMessage } = useMessage();
const labelCol = ref<any>({ xs: { span: 24 }, sm: { span: 5 } }); const labelCol = ref<any>({ xs: { span: 24 }, sm: { span: 5 } });

14
src/views/military/modules/equipmentMonitor/radar/RadarDetection.api.ts

@ -4,13 +4,13 @@ import { useMessage } from "/@/hooks/web/useMessage";
const { createConfirm } = useMessage(); const { createConfirm } = useMessage();
enum Api { enum Api {
list = '/military/msDeviceInfo/list', list = '/military/dtDeviceInfo/list',
save='/military/msDeviceInfo/add', save='/military/dtDeviceInfo/add',
edit='/military/msDeviceInfo/edit', edit='/military/dtDeviceInfo/edit',
deleteOne = '/military/msDeviceInfo/delete', deleteOne = '/military/dtDeviceInfo/delete',
deleteBatch = '/military/msDeviceInfo/deleteBatch', deleteBatch = '/military/dtDeviceInfo/deleteBatch',
importExcel = '/military/msDeviceInfo/importExcel', importExcel = '/military/dtDeviceInfo/importExcel',
exportXls = '/military/msDeviceInfo/exportXls', exportXls = '/military/dtDeviceInfo/exportXls',
relayCorxSwitch= '/alarm/recv/relayCorx/switch', relayCorxSwitch= '/alarm/recv/relayCorx/switch',
} }

68
src/views/military/modules/equipmentMonitor/radar/RadarDetection.data.ts

@ -7,13 +7,13 @@ export const columns: BasicColumn[] = [
{ {
title: '设备编号', title: '设备编号',
align: "center", align: "center",
dataIndex: 'deviceNum' dataIndex: 'deviceCode'
},
{
title: '设备厂商',
align: "center",
dataIndex: 'deviceComp_dictText'
}, },
// {
// title: '设备厂商',
// align: "center",
// dataIndex: 'deviceComp_dictText'
// },
{ {
title: '设备名称', title: '设备名称',
align: "center", align: "center",
@ -23,24 +23,24 @@ export const columns: BasicColumn[] = [
{ {
title: '设备IP', title: '设备IP',
align: "center", align: "center",
dataIndex: 'ip' dataIndex: 'deviceIp'
}, },
{ {
title: '监听通信端口', title: '监听通信端口',
align: "center", align: "center",
dataIndex: 'port' dataIndex: 'ipPort'
}, },
{ {
title: '设备状态', title: '设备状态',
align: "center", align: "center",
dataIndex: 'state', dataIndex: 'deviceStatus',
slots: { customRender: 'state' }, slots: { customRender: 'state' },
}, },
{ // {
title: '状态更新时间', // title: '状态更新时间',
align: "center", // align: "center",
dataIndex: 'aliveTime' // dataIndex: 'aliveTime'
}, // },
]; ];
//查询数据 //查询数据
@ -49,11 +49,11 @@ export const searchFormSchema: FormSchema[] = [
//表单数据 //表单数据
export const formSchema: FormSchema[] = [ export const formSchema: FormSchema[] = [
{ // {
label: '设备厂商', // label: '设备厂商',
field: 'deviceComp', // field: 'deviceComp',
component: 'InputNumber', // component: 'InputNumber',
}, // },
{ {
label: '设备名称', label: '设备名称',
field: 'deviceName', field: 'deviceName',
@ -61,33 +61,33 @@ export const formSchema: FormSchema[] = [
}, },
{ {
label: '设备编号', label: '设备编号',
field: 'deviceNum', field: 'deviceCode',
component: 'Input', component: 'Input',
}, },
{ {
label: '设备IP', label: '设备IP',
field: 'ip', field: 'deviceIp',
component: 'Input', component: 'Input',
}, },
{ {
label: '监听/通信端口', label: '监听/通信端口',
field: 'port', field: 'ipPort',
component: 'InputNumber', component: 'InputNumber',
}, },
{ {
label: '启用状态', label: '设备状态',
field: 'state', field: 'deviceStatus',
component: 'InputNumber', component: 'InputNumber',
}, },
{ // {
label: '心跳更新时间', // label: '心跳更新时间',
field: 'aliveTime', // field: 'aliveTime',
component: 'DatePicker', // component: 'DatePicker',
componentProps: { // componentProps: {
showTime: true, // showTime: true,
valueFormat: 'YYYY-MM-DD HH:mm:ss' // valueFormat: 'YYYY-MM-DD HH:mm:ss'
}, // },
}, // },
// TODO 主键隐藏字段,目前写死为ID // TODO 主键隐藏字段,目前写死为ID
{ {
label: '', label: '',

40
src/views/military/modules/equipmentMonitor/radar/components/RadarDetectionForm.vue

@ -2,41 +2,41 @@
<a-spin :spinning="confirmLoading"> <a-spin :spinning="confirmLoading">
<a-form ref="formRef" class="antd-modal-form" :labelCol="labelCol" :wrapperCol="wrapperCol"> <a-form ref="formRef" class="antd-modal-form" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-row> <a-row>
<a-col :span="24"> <!-- <a-col :span="24">
<a-form-item label="设备厂商" v-bind="validateInfos.deviceComp"> <a-form-item label="设备厂商" v-bind="validateInfos.deviceComp">
<a-input-number v-model:value="formData.deviceComp" placeholder="请输入设备厂商" style="width: 100%" :disabled="disabled"/> <a-input-number v-model:value="formData.deviceComp" placeholder="请输入设备厂商" style="width: 100%" :disabled="disabled"/>
</a-form-item> </a-form-item>
</a-col> </a-col> -->
<a-col :span="24"> <a-col :span="24">
<a-form-item label="设备名称" v-bind="validateInfos.deviceName"> <a-form-item label="设备名称" v-bind="validateInfos.deviceName">
<a-input v-model:value="formData.deviceName" placeholder="请输入设备名称" :disabled="disabled"></a-input> <a-input v-model:value="formData.deviceName" placeholder="请输入设备名称" :disabled="disabled"></a-input>
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :span="24"> <a-col :span="24">
<a-form-item label="设备编号" v-bind="validateInfos.deviceNum"> <a-form-item label="设备编号" v-bind="validateInfos.deviceCode">
<a-input v-model:value="formData.deviceNum" placeholder="请输入设备编号" :disabled="disabled"></a-input> <a-input v-model:value="formData.deviceCode" placeholder="请输入设备编号" :disabled="disabled"></a-input>
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :span="24"> <a-col :span="24">
<a-form-item label="设备IP" v-bind="validateInfos.ip"> <a-form-item label="设备IP" v-bind="validateInfos.deviceIp">
<a-input v-model:value="formData.ip" placeholder="请输入设备IP" :disabled="disabled"></a-input> <a-input v-model:value="formData.deviceIp" placeholder="请输入设备IP" :disabled="disabled"></a-input>
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :span="24"> <a-col :span="24">
<a-form-item label="监听/通信端口" v-bind="validateInfos.port"> <a-form-item label="监听/通信端口" v-bind="validateInfos.ipPort">
<a-input-number v-model:value="formData.port" placeholder="请输入监听/通信端口" style="width: 100%" :disabled="disabled"/> <a-input-number v-model:value="formData.ipPort" placeholder="请输入监听/通信端口" style="width: 100%" :disabled="disabled"/>
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :span="24"> <a-col :span="24">
<a-form-item label="启用状态" v-bind="validateInfos.state"> <a-form-item label="启用状态" v-bind="validateInfos.deviceStatus">
<a-input-number v-model:value="formData.state" placeholder="请输入启用状态" style="width: 100%" :disabled="disabled"/> <a-input-number v-model:value="formData.deviceStatus" placeholder="请输入启用状态" style="width: 100%" :disabled="disabled"/>
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :span="24"> <!-- <a-col :span="24">
<a-form-item label="心跳更新时间" v-bind="validateInfos.aliveTime"> <a-form-item label="心跳更新时间" v-bind="validateInfos.aliveTime">
<a-date-picker placeholder="请选择心跳更新时间" v-model:value="formData.aliveTime" showTime value-format="YYYY-MM-DD HH:mm:ss" style="width: 100%" :disabled="disabled"/> <a-date-picker placeholder="请选择心跳更新时间" v-model:value="formData.aliveTime" showTime value-format="YYYY-MM-DD HH:mm:ss" style="width: 100%" :disabled="disabled"/>
</a-form-item> </a-form-item>
</a-col> </a-col> -->
</a-row> </a-row>
</a-form> </a-form>
</a-spin> </a-spin>
@ -60,13 +60,17 @@
const emit = defineEmits(['register', 'ok']); const emit = defineEmits(['register', 'ok']);
const formData = reactive<Record<string, any>>({ const formData = reactive<Record<string, any>>({
id: '', id: '',
deviceComp: undefined, // deviceComp: undefined,
deviceName: '', deviceName: '',
deviceNum: '', // deviceNum: '',
ip: '', deviceCode:'',
port: undefined, // ip: '',
state: undefined, deviceIp:'',
aliveTime: '', // port: undefined,
ipPort:undefined,
// state: undefined,
deviceStatus: undefined,
// aliveTime: '',
}); });
const { createMessage } = useMessage(); const { createMessage } = useMessage();
const labelCol = ref<any>({ xs: { span: 24 }, sm: { span: 5 } }); const labelCol = ref<any>({ xs: { span: 24 }, sm: { span: 5 } });

25
src/views/military/modules/equipmentMonitor/solarEnergy/SiteView.vue

@ -426,7 +426,7 @@
defHttp defHttp
.get( .get(
{ {
url: '/military/msDeviceInfo/list', url: '/military/dtDeviceInfo/list',
params: { deviceType: 4 }, params: { deviceType: 4 },
}, },
{ isTransformResponse: false } { isTransformResponse: false }
@ -436,10 +436,19 @@
if (res.result.records.length == 0) { if (res.result.records.length == 0) {
return; return;
} }
// device.value = res.result.records;
// let ip = device[0].value.ip;
// let port = device[0].value.port;
// let data = 'ip=' + ip + '&port=' + port;
// service.get('/alarm/recv/photovoltaics/status?' + data).then((res) => {
// gateway.value = res.data.gateway;
// MPPT_CTRLR.value = res.data.MPPT_CTRLR;
// AC_POWER_METER1.value = res.data.AC_POWER_METER1;
// AC_POWER_METER2.value = res.data.AC_POWER_METER2;
device.value = res.result.records; device.value = res.result.records;
let ip = device[0].value.ip; let deviceIp = device[0].value.deviceIp;
let port = device[0].value.port; let ipPort = device[0].value.ipPort;
let data = 'ip=' + ip + '&port=' + port; let data = 'deviceIp=' + deviceIp + '&ipPort=' + ipPort;
service.get('/alarm/recv/photovoltaics/status?' + data).then((res) => { service.get('/alarm/recv/photovoltaics/status?' + data).then((res) => {
gateway.value = res.data.gateway; gateway.value = res.data.gateway;
MPPT_CTRLR.value = res.data.MPPT_CTRLR; MPPT_CTRLR.value = res.data.MPPT_CTRLR;
@ -456,16 +465,16 @@
defHttp defHttp
.get( .get(
{ {
url: '/military/msDeviceInfo/list', url: '/military/dtDeviceInfo/list',
params: { deviceName: value }, params: { deviceName: value },
}, },
{ isTransformResponse: false } { isTransformResponse: false }
) )
// getAction('/military/msDeviceInfo/list?deviceName=' + value) // getAction('/military/msDeviceInfo/list?deviceName=' + value)
.then((res) => { .then((res) => {
let ip = res.result.records[0].ip; let deviceIp = res.result.records[0].deviceIp;
let port = res.result.records[0].port; let ipPort = res.result.records[0].ipPort;
let data = 'ip=' + ip + '&port=' + port; let data = 'deviceIp=' + deviceIp + '&ipPort=' + ipPort;
service.get('/alarm/recv/photovoltaics/status?' + data).then((res) => { service.get('/alarm/recv/photovoltaics/status?' + data).then((res) => {
this.gateway = res.data.gateway; this.gateway = res.data.gateway;
this.MPPT_CTRLR = res.data.MPPT_CTRLR; this.MPPT_CTRLR = res.data.MPPT_CTRLR;

Loading…
Cancel
Save