更新后台管理

This commit is contained in:
yaooo 2023-11-29 17:49:04 +08:00
parent 7a50e0ec34
commit 9bc28ea788
3 changed files with 12 additions and 6 deletions

View File

@ -75,7 +75,11 @@
</el-row>
</el-tab-pane>
<el-tab-pane v-if="deviceData.device.type==3" label="监控视频" name="monitor_video">
<video src="http://192.168.1.27/live/test.live.mp4?secret=gqig2yFKkDpIMic1uWZY1L5MsIo0eflm" controls></video>
<video
v-if="deviceData.device.video_url != ''"
:src="deviceData.device.video_url"
controls
></video>
</el-tab-pane>
</el-tabs>
</el-card>
@ -138,6 +142,7 @@ const getDetails = async () => {
deviceData.device.product_id = res.product_id == null ? '' : res.product_id
deviceData.device.product_name = res.product_name == null ? '' : res.product_name
deviceData.monitor_item = res.monitor_item
deviceData.device.video_url = res.video_url
})
.catch((err: any) => {
console.log('err', err)

View File

@ -70,6 +70,9 @@
:value="item.value"
/>
</el-select>
</el-form-item>
<el-form-item label="视频地址" prop="video_url">
<el-input v-model="formData.video_url" clearable placeholder="请输入视频地址" />
</el-form-item>
<el-form-item label="设备状态" prop="status">
<el-select class="flex-1" v-model="formData.status" clearable placeholder="请选择设备状态">
@ -136,6 +139,7 @@ const formData = reactive({
product_id: '',
code: '',
name: '',
video_url: '',
type: '',
monitor_item: '',
status: '',
@ -171,11 +175,6 @@ const formRules = reactive<any>({
message: '请选择设备类型',
trigger: ['blur']
}],
monitor_item: [{
required: true,
message: '请选择设备监测项',
trigger: ['blur']
}],
status: [{
required: true,
message: '请选择设备状态',

View File

@ -51,6 +51,7 @@ class DeviceLogic extends BaseLogic
'name' => $params['name'],
'type' => $params['type'],
'monitor_item' => $params['monitor_item'],
'video_url' => $params['video_url'],
'status' => $params['status'],
'is_online' => $params['is_online'],
'is_bind' => $params['is_bind'],
@ -94,6 +95,7 @@ class DeviceLogic extends BaseLogic
'name' => $params['name'],
'type' => $params['type'],
'monitor_item' => $params['monitor_item'],
'video_url' => $params['video_url'],
'status' => $params['status'],
'is_online' => $params['is_online'],
'is_bind' => $params['is_bind'],