|
|
@@ -5,7 +5,7 @@ import connectedIcon from '@/assets/images/table/camera-netConnect.png';
|
|
|
import unConnectedIcon from '@/assets/images/table/camera-netUnconnect.png';
|
|
|
// import { protocalTypeSelect } from '@/types/camera/constant';
|
|
|
import useCameraOverview from '../stores/useCameraOverview';
|
|
|
-import { startCameraStream, stopCameraStream } from '@/api/camera/camera-overview';
|
|
|
+import { updateCameraIntState } from '@/api/camera/camera-overview';
|
|
|
import { useSceneTemplateList } from '../stores/useSceneTemplateList';
|
|
|
import { storeToRefs } from 'pinia';
|
|
|
|
|
|
@@ -142,17 +142,10 @@ export const columns: BasicColumn[] = [
|
|
|
modelValue: record.row.integrationState,
|
|
|
onChange: (val) => {
|
|
|
record.row.status = val;
|
|
|
- if (val === 0) {
|
|
|
- startCameraStream(record.row.id).then(() => {
|
|
|
- getState();
|
|
|
- getCameraItems();
|
|
|
- });
|
|
|
- } else {
|
|
|
- stopCameraStream(record.row.id).then(() => {
|
|
|
- getState();
|
|
|
- getCameraItems();
|
|
|
- });
|
|
|
- }
|
|
|
+ updateCameraIntState({ cameraId: record.row.id, intState: val as number }).then(() => {
|
|
|
+ getState();
|
|
|
+ getCameraItems();
|
|
|
+ });
|
|
|
},
|
|
|
activeValue: 0,
|
|
|
inactiveValue: 1,
|