|
@ -27,6 +27,11 @@ |
|
|
<span>{{ item.label }}</span> |
|
|
<span>{{ item.label }}</span> |
|
|
<img src="../images/add.svg" @click="controlClick(item.add)"> |
|
|
<img src="../images/add.svg" @click="controlClick(item.add)"> |
|
|
</div> |
|
|
</div> |
|
|
|
|
|
<div>雨刷 |
|
|
|
|
|
<Button .native="controlClick(49)">开</Button> |
|
|
|
|
|
<Button @click.native="controlClick(48)">关</Button> |
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</Dialog> |
|
|
</Dialog> |
|
@ -36,11 +41,15 @@ |
|
|
import Dialog from "@screen/components/Dialog/index.vue"; |
|
|
import Dialog from "@screen/components/Dialog/index.vue"; |
|
|
import { controlCamera } from "@screen/pages/Home/components/RoadAndEvents/utils/httpList.js" |
|
|
import { controlCamera } from "@screen/pages/Home/components/RoadAndEvents/utils/httpList.js" |
|
|
import { throttle } from "lodash" |
|
|
import { throttle } from "lodash" |
|
|
|
|
|
import Switcher from '@screen/pages/service/PublishingChannelManagement/components/Switcher.vue'; |
|
|
|
|
|
import Button from "@screen/components/Buttons/Button.vue"; |
|
|
|
|
|
|
|
|
|
|
|
//开 49 关 48 |
|
|
export default { |
|
|
export default { |
|
|
name: 'CameraControlDialog', |
|
|
name: 'CameraControlDialog', |
|
|
components: { |
|
|
components: { |
|
|
Dialog |
|
|
Dialog, |
|
|
|
|
|
Button |
|
|
}, |
|
|
}, |
|
|
model: { |
|
|
model: { |
|
|
prop: 'visible', |
|
|
prop: 'visible', |
|
@ -71,7 +80,18 @@ export default { |
|
|
add: "13", |
|
|
add: "13", |
|
|
sub: "14" |
|
|
sub: "14" |
|
|
}, |
|
|
}, |
|
|
] |
|
|
], |
|
|
|
|
|
activeOption: { |
|
|
|
|
|
active: { |
|
|
|
|
|
text: "开" |
|
|
|
|
|
}, |
|
|
|
|
|
unActive: { |
|
|
|
|
|
text: "关" |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
|
|
|
data: { |
|
|
|
|
|
state: 0 |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
computed: { |
|
|
computed: { |
|
@ -87,7 +107,21 @@ export default { |
|
|
methods: { |
|
|
methods: { |
|
|
controlClick: throttle(function (type) { |
|
|
controlClick: throttle(function (type) { |
|
|
controlCamera(this.deviceId, type) |
|
|
controlCamera(this.deviceId, type) |
|
|
}, 150) |
|
|
}, 150), |
|
|
|
|
|
async handleSwitcherChange(value, data) { |
|
|
|
|
|
let str = data.state ? "关闭" : "开启"; |
|
|
|
|
|
|
|
|
|
|
|
data.state = value; |
|
|
|
|
|
const isContinue = await confirm({ message: `${str}` }) |
|
|
|
|
|
.catch(() => { |
|
|
|
|
|
console.log(data.state, value, 333) |
|
|
|
|
|
data.state = !value; |
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
if (!isContinue) return; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
}, |
|
|
}, |
|
|
} |
|
|
} |
|
|
</script> |
|
|
</script> |
|
@ -180,12 +214,13 @@ export default { |
|
|
.options { |
|
|
.options { |
|
|
display: flex; |
|
|
display: flex; |
|
|
flex-direction: column; |
|
|
flex-direction: column; |
|
|
|
|
|
justify-content: center; |
|
|
gap: 18px; |
|
|
gap: 18px; |
|
|
|
|
|
|
|
|
>div { |
|
|
>div { |
|
|
display: flex; |
|
|
display: flex; |
|
|
align-items: center; |
|
|
align-items: center; |
|
|
|
|
|
justify-content: center; |
|
|
gap: 9px; |
|
|
gap: 9px; |
|
|
|
|
|
|
|
|
img { |
|
|
img { |
|
|