摄像头接口调整
This commit is contained in:
parent
d16b315351
commit
f18fa858d4
|
|
@ -12,8 +12,11 @@ enum Api {
|
|||
edit = '/iot/tplink/cameraInfo/edit',
|
||||
rebootDevice = '/iot/tplink/cameraInfo/rebootDevice',
|
||||
previewUrl = '/iot/tplink/cameraInfo/getPreviewUrl',
|
||||
getDeviceDetails = '/iot/tplink/cameraInfo/getDeviceDetails',
|
||||
getImageCommon = '/iot/tplink/cameraInfo/getImageCommon',
|
||||
setImageCommon = '/iot/tplink/cameraInfo/setImageCommon',
|
||||
getImageSwitch = '/iot/tplink/cameraInfo/getImageSwitch',
|
||||
setImageSwitch = '/iot/tplink/cameraInfo/setImageSwitch',
|
||||
getOsdCapability = '/iot/tplink/cameraInfo/getOsdCapability',
|
||||
getOsd = '/iot/tplink/cameraInfo/getOsd',
|
||||
setOsd = '/iot/tplink/cameraInfo/setOsd',
|
||||
|
|
@ -112,6 +115,12 @@ export const rebootDevice = (params) => {
|
|||
return defHttp.post({ url: Api.rebootDevice, params });
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取设备信息
|
||||
* @param params
|
||||
*/
|
||||
export const getDeviceDetails = (params) => defHttp.get({ url: Api.getDeviceDetails, params });
|
||||
|
||||
/**
|
||||
* 获取画面基本信息
|
||||
* @param params
|
||||
|
|
@ -124,6 +133,18 @@ export const getImageCommon = (params) => defHttp.post({ url: Api.getImageCommon
|
|||
*/
|
||||
export const setImageCommon = (params) => defHttp.post({ url: Api.setImageCommon, params });
|
||||
|
||||
/**
|
||||
* 获取画面基本信息
|
||||
* @param params
|
||||
*/
|
||||
export const getImageSwitch = (params) => defHttp.post({ url: Api.getImageSwitch, params });
|
||||
|
||||
/**
|
||||
* 设置画面基本信息
|
||||
* @param params
|
||||
*/
|
||||
export const setImageSwitch = (params) => defHttp.post({ url: Api.setImageSwitch, params });
|
||||
|
||||
/**
|
||||
* 获取OSD能力集参数
|
||||
* @param params
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@
|
|||
<template #title>
|
||||
<a-row style="font-weight: normal;">
|
||||
<a-col :span="18">
|
||||
<div style="font-size: 14px;">SN:<span style="font-weight: bold;">{{ item.sn ? item.sn : '未配置' }}</span></div>
|
||||
<div style="font-size: 14px;">SN:<span style="font-weight: bold;">{{ item.mac ? item.mac : '未配置' }}</span></div>
|
||||
<div style="font-size: 12px;">设备名称:{{ item.deviceName }}</div>
|
||||
</a-col>
|
||||
<a-col :span="6" style="display: flex; justify-content: flex-end;">
|
||||
|
|
@ -105,11 +105,11 @@
|
|||
</template>
|
||||
|
||||
<script lang="ts" name="iot-nuIotCameraInfo" setup>
|
||||
import { ref, reactive, createVNode, h, onMounted, watch, unref } from 'vue';
|
||||
import { ref, reactive, createVNode, h, onMounted, watch, unref,nextTick } from 'vue';
|
||||
import { BasicTable, useTable, TableAction } from '/@/components/Table';
|
||||
import { useListPage } from '/@/hooks/system/useListPage';
|
||||
import { columns, searchFormSchema } from '../camera.data';
|
||||
import { getImageCommon, list } from '../camera.api';
|
||||
import { getDeviceDetails, list } from '../camera.api';
|
||||
import { useUserStore } from '/@/store/modules/user';
|
||||
import { useDrawer } from "@/components/Drawer";
|
||||
import { useRouter } from 'vue-router';
|
||||
|
|
@ -166,16 +166,23 @@ function handlePreview(record: Recordable) {
|
|||
if (record.deviceIndex == null) {
|
||||
return
|
||||
}
|
||||
getImageCommon({
|
||||
"deviceIndex": record.deviceIndex,
|
||||
"type": "switch"
|
||||
// getImageCommon({
|
||||
// "deviceIndex": record.deviceIndex,
|
||||
// "type": "switch"
|
||||
// }).then(res => {
|
||||
// previewModal.value.disableSubmit = true;
|
||||
// previewModal.value.edit(record);
|
||||
// }).catch(res => {
|
||||
// reload();
|
||||
// });
|
||||
getDeviceDetails({
|
||||
"deviceIndex": record.deviceIndex
|
||||
}).then(res => {
|
||||
previewModal.value.disableSubmit = true;
|
||||
previewModal.value.edit(record);
|
||||
}).catch(res => {
|
||||
}).catch(res=>{
|
||||
reload();
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -188,21 +195,43 @@ function handleSuccess() {
|
|||
/**
|
||||
* 画面配置
|
||||
*/
|
||||
// function handlePicConfig(record) {
|
||||
// var params = {
|
||||
// deviceIndex: record.deviceIndex,
|
||||
// parentId: record.parentId,
|
||||
// multitrans: record.multitrans,
|
||||
// projectId: record.projectId,
|
||||
// regionId: record.regionId,
|
||||
// ip: record.ip
|
||||
// }
|
||||
// cameraPictureConfigModal.value.disableSubmit = true;
|
||||
// cameraPictureConfigModal.value.edit(params);
|
||||
// }
|
||||
function handlePicConfig(record) {
|
||||
var params = {
|
||||
deviceIndex: record.deviceIndex,
|
||||
parentId: record.parentId,
|
||||
multitrans: record.multitrans,
|
||||
projectId: record.projectId,
|
||||
regionId: record.regionId,
|
||||
ip: record.ip
|
||||
if (record.deviceIndex == null) {
|
||||
return
|
||||
}
|
||||
cameraPictureConfigModal.value.disableSubmit = true;
|
||||
cameraPictureConfigModal.value.edit(params);
|
||||
|
||||
getDeviceDetails({
|
||||
"deviceIndex": record.deviceIndex
|
||||
}).then(res => {
|
||||
var params = {
|
||||
deviceIndex: record.deviceIndex,
|
||||
deviceName: record.deviceName,
|
||||
parentId: record.parentId,
|
||||
multitrans: record.multitrans,
|
||||
projectId: record.projectId,
|
||||
regionId: record.regionId,
|
||||
ip: record.ip
|
||||
}
|
||||
nextTick(()=>{
|
||||
cameraPictureConfigModal.value.disableSubmit = true;
|
||||
cameraPictureConfigModal.value.edit(params);
|
||||
})
|
||||
}).catch(res=>{
|
||||
reload();
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 左侧树选择后触发
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@
|
|||
|
||||
<span class="buttonSpan jtImg" @click="screenshot"><span style="margin-left:30px;">截图</span></span>
|
||||
<span class="buttonSpan bjImg" @click="manualAlarm"><span style="margin-left:30px;">报警</span></span>
|
||||
|
||||
|
||||
<a-popover >
|
||||
<template #content>
|
||||
<div style="text-align: center;">
|
||||
|
|
@ -166,10 +166,10 @@ import { useMessage } from '/@/hooks/web/useMessage';
|
|||
import { getValueType } from '/@/utils';
|
||||
import { Form } from 'ant-design-vue';
|
||||
import {
|
||||
getImageCommon,
|
||||
getImageSwitch,
|
||||
getMultitransUrl,
|
||||
getPreviewUrl,
|
||||
setImageCommon,
|
||||
setImageSwitch,
|
||||
testAudio,
|
||||
motionCtrl
|
||||
} from "../camera.api";
|
||||
|
|
@ -340,7 +340,7 @@ function getSwitch() {
|
|||
if (formData.deviceIndex == null) {
|
||||
return
|
||||
}
|
||||
getImageCommon({
|
||||
getImageSwitch({
|
||||
"deviceIndex": formData.deviceIndex,
|
||||
"type": "switch"
|
||||
}).then(res => {
|
||||
|
|
@ -354,7 +354,7 @@ function getSwitch() {
|
|||
function changeSwitch(attr, value) {
|
||||
let param = {};
|
||||
param[attr] = value;
|
||||
setImageCommon({
|
||||
setImageSwitch({
|
||||
"deviceIndex": formData.deviceIndex,
|
||||
"type": "switch",
|
||||
"param": param
|
||||
|
|
|
|||
|
|
@ -79,12 +79,11 @@ import { useMessage } from '@/hooks/web/useMessage';
|
|||
import { getValueType } from '@/utils';
|
||||
import { Form } from 'ant-design-vue';
|
||||
import {
|
||||
getImageCommon,
|
||||
getImageSwitch,
|
||||
setImageSwitch,
|
||||
getMultitransUrl,
|
||||
getPreviewUrl,
|
||||
setImageCommon,
|
||||
testAudio,
|
||||
motionCtrl
|
||||
testAudio
|
||||
} from "../camera.api";
|
||||
|
||||
const props = defineProps({
|
||||
|
|
@ -300,7 +299,7 @@ function getSwitch() {
|
|||
if (formData.deviceIndex == null) {
|
||||
return
|
||||
}
|
||||
getImageCommon({
|
||||
getImageSwitch({
|
||||
"deviceIndex": formData.deviceIndex,
|
||||
"type": "switch"
|
||||
}).then(res => {
|
||||
|
|
@ -314,7 +313,7 @@ function getSwitch() {
|
|||
function changeSwitch(attr, value) {
|
||||
let param = {};
|
||||
param[attr] = value;
|
||||
setImageCommon({
|
||||
setImageSwitch({
|
||||
"deviceIndex": formData.deviceIndex,
|
||||
"type": "switch",
|
||||
"param": param
|
||||
|
|
|
|||
|
|
@ -109,7 +109,7 @@ import { reactive, ref, h, onMounted } from 'vue';
|
|||
import { defHttp } from '/@/utils/http/axios';
|
||||
import { Statistic } from 'ant-design-vue';
|
||||
import { Modal } from "ant-design-vue";
|
||||
import { list, eleReset, eleCutOff, eleConnected, eleRead } from './electricity.api';
|
||||
import { list, eleReset, eleControl, eleRead } from './electricity.api';
|
||||
import { Pagination } from 'ant-design-vue';
|
||||
import { JInput } from '/@/components/Form';
|
||||
import JDictSelectTag from '/@/components/Form/src/jeecg/components/JDictSelectTag.vue';
|
||||
|
|
@ -170,7 +170,7 @@ async function handleControlLz(record) {
|
|||
'sn' : record.sn,
|
||||
'type': '10'
|
||||
};
|
||||
await eleCutOff(params);
|
||||
await eleControl(params);
|
||||
setTimeout(() => {
|
||||
reload();
|
||||
}, 4000);
|
||||
|
|
@ -192,7 +192,7 @@ async function handleControlHz(record) {
|
|||
'sn' : record.sn,
|
||||
'type': '11'
|
||||
};
|
||||
await eleConnected(params);
|
||||
await eleControl(params);
|
||||
setTimeout(() => {
|
||||
reload();
|
||||
}, 4000);
|
||||
|
|
|
|||
Loading…
Reference in New Issue