Compare commits
4 Commits
926904f2a1
...
5667c74ea1
Author | SHA1 | Date |
---|---|---|
|
5667c74ea1 | 10 months ago |
|
d79d0f092f | 10 months ago |
|
206dbfb441 | 10 months ago |
|
b0319d545b | 10 months ago |
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 5.0 KiB After Width: | Height: | Size: 5.0 KiB |
Before Width: | Height: | Size: 4.9 KiB After Width: | Height: | Size: 4.9 KiB |
@ -0,0 +1,185 @@ |
|||
<template> |
|||
<div class="body"> |
|||
<div class="right" :style="{ width: isMultiControl ? '100%' : undefined }"> |
|||
<div class="top-content"> |
|||
<Video v-if="!isMultiControl" class="item-video" :pileNum="pileNum" /> |
|||
|
|||
<label style="width: 98px;">雨刷: </label> |
|||
<div style="margin-top: 20px"> |
|||
<el-radio-group v-model="cmdType" size="medium"> |
|||
<el-radio-button label="49" >开</el-radio-button> |
|||
<el-radio-button label="48">关</el-radio-button> |
|||
|
|||
</el-radio-group> |
|||
</div> |
|||
<!-- <ElInput type="textarea" class="inputarea" v-model="releaseMessage" :autosize="{ minRows: 3, maxRows: 3 }" :maxlength="150" |
|||
showWordLimit placeholder="请输入发布内容" />--> |
|||
</div> |
|||
|
|||
<!-- <div class="footer"> |
|||
<Button @click.native="handleSubmit" :loading="submitting"> |
|||
确定 |
|||
</Button> |
|||
|
|||
<Button style="background-color: rgba(0, 179, 204, 0.3)" @click.native="cancelClick"> |
|||
取消 |
|||
</Button> |
|||
</div> --> |
|||
</div> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import Dialog from "@screen/components/Dialog/index.vue"; |
|||
import Button from "@screen/components/Buttons/Button.vue"; |
|||
import Video from "@screen/components/Video"; |
|||
import CheckboxGroup from "@screen/components/FormConfig/components/ElCheckboxGroup.vue"; |
|||
|
|||
import request from "@/utils/request"; |
|||
import { batchFunctions } from "@screen/pages/Home/components/RoadAndEvents/utils/httpList.js"; |
|||
import { multiResultShow } from "@screen/utils/common"; |
|||
|
|||
import { Message } from "element-ui"; |
|||
|
|||
export default { |
|||
name: "videoCamera", |
|||
components: { |
|||
Dialog, |
|||
Button, |
|||
Video, |
|||
CheckboxGroup, |
|||
}, |
|||
model: { |
|||
prop: "visible", |
|||
event: "update:value", |
|||
}, |
|||
props: { |
|||
visible: Boolean, |
|||
pileNum: String, |
|||
otherConfig: String, |
|||
isMultiControl: Boolean, |
|||
selectItems: { |
|||
type: Array, |
|||
default: () => [] |
|||
} |
|||
}, |
|||
data() { |
|||
return { |
|||
submitting: false, |
|||
checkList: [], |
|||
cmdType: null, |
|||
// musicList: [], |
|||
}; |
|||
}, |
|||
computed: { |
|||
modelVisible: { |
|||
get() { |
|||
return this.visible; |
|||
}, |
|||
set(val) { |
|||
this.$emit("update:value", val); |
|||
}, |
|||
}, |
|||
}, |
|||
created() { |
|||
// getDeviceList(5).then((data) => { |
|||
// if (Array.isArray(data)) |
|||
// this.musicList = data.map((item) => ({ |
|||
// ...item, |
|||
// disabled: item.deviceState != 1, |
|||
// })); |
|||
// }); |
|||
}, |
|||
methods: { |
|||
cancelClick() { |
|||
this.$emit("update:activeIcon", null); |
|||
this.$emit("update:submitting", false); |
|||
// this.submitting = false; |
|||
}, |
|||
handleSubmit() { |
|||
const trimmedCmdType = this.cmdType?.trim(); |
|||
const selectItems = this.selectItems.map(item => JSON.parse(item)); |
|||
const checkList = selectItems.map(item => JSON.parse(item.otherConfig)); |
|||
if (!trimmedCmdType) { |
|||
return Message.error("请选择命令类型!"); |
|||
} |
|||
if (!selectItems.length) |
|||
return Message.error("请至少选择一个设备!"); |
|||
|
|||
// this.submitting = true; |
|||
this.$emit("update:submitting", true); |
|||
|
|||
batchFunctions( |
|||
{ |
|||
"devices": selectItems, |
|||
"functions": [ |
|||
{ |
|||
"functionId": "videoCamera",//随便 不为空即可 |
|||
"cmdType":trimmedCmdType, |
|||
} |
|||
|
|||
] |
|||
}) |
|||
.then((data) => { |
|||
multiResultShow(data.data, item => item.result.retCode == '0', "相机功能调用"); |
|||
}) |
|||
.finally(() => { |
|||
// this.submitting = false; |
|||
this.$emit("update:submitting", false); |
|||
}); |
|||
}, |
|||
}, |
|||
}; |
|||
</script> |
|||
|
|||
<style lang="scss" scoped> |
|||
.body { |
|||
display: flex; |
|||
gap: 9px; |
|||
height: 100%; |
|||
padding-right: 9px; |
|||
margin-top: 15px; |
|||
|
|||
.right { |
|||
display: flex; |
|||
flex-direction: column; |
|||
justify-content: space-between; |
|||
|
|||
.top-content { |
|||
display: flex; |
|||
flex-direction: row; |
|||
// gap: 9px; |
|||
align-items: center; |
|||
|
|||
.item-video { |
|||
width: 545px; |
|||
} |
|||
|
|||
label { |
|||
font-size: 15px; |
|||
font-family: PingFang SC, PingFang SC; |
|||
font-weight: 400; |
|||
color: #3de8ff; |
|||
line-height: 19px; |
|||
vertical-align: middle; |
|||
text-align: right; |
|||
padding-right: 12px; |
|||
box-sizing: border-box; |
|||
} |
|||
} |
|||
} |
|||
} |
|||
.inputarea{ |
|||
width: 100%; |
|||
::v-deep textarea{ |
|||
border: 0px !important; |
|||
border-radius: 2px !important; |
|||
} |
|||
} |
|||
.footer { |
|||
display: flex; |
|||
align-items: center; |
|||
justify-content: flex-end; |
|||
gap: 9px; |
|||
} |
|||
</style> |