fix(aiot): 恢复摄像头管理页面应用名显示和输入 - 改善用户体验
- 表格恢复显示应用名和流ID列,移除用户看不懂的摄像头编码列 - 表单恢复应用名输入框,用户可输入有意义的名称(如:大堂、停车场等) - 恢复应用名必填验证 - camera_code在后台自动生成,前端只在编辑时只读显示 - 改善用户体验:用户看到的是可理解的应用名,而不是技术编码
This commit is contained in:
@@ -54,7 +54,8 @@ const searchQuery = ref('');
|
||||
const searchPulling = ref<string | undefined>(undefined);
|
||||
|
||||
const columns = [
|
||||
{ title: '摄像头编码', dataIndex: 'cameraCode', width: 180 },
|
||||
{ title: '应用名', dataIndex: 'app', width: 120 },
|
||||
{ title: '流ID', dataIndex: 'stream', width: 150 },
|
||||
{ title: '拉流地址', dataIndex: 'srcUrl', ellipsis: true },
|
||||
{ title: '状态', key: 'pulling', width: 100 },
|
||||
{ title: 'ROI', key: 'roiCount', width: 80, align: 'center' as const },
|
||||
@@ -186,6 +187,10 @@ function handleEdit(row: AiotDeviceApi.Camera) {
|
||||
}
|
||||
|
||||
async function handleSave() {
|
||||
if (!editForm.app?.trim()) {
|
||||
message.warning('请输入应用名');
|
||||
return;
|
||||
}
|
||||
if (!editForm.stream?.trim()) {
|
||||
message.warning('请输入流ID');
|
||||
return;
|
||||
@@ -438,6 +443,13 @@ onMounted(() => {
|
||||
<Form.Item v-if="editForm.id" label="摄像头编码">
|
||||
<Input :value="editForm.cameraCode" disabled />
|
||||
</Form.Item>
|
||||
<Form.Item label="应用名" required>
|
||||
<Input
|
||||
v-model:value="editForm.app"
|
||||
placeholder="如: live、大堂、停车场等"
|
||||
:disabled="!!editForm.id"
|
||||
/>
|
||||
</Form.Item>
|
||||
<Form.Item label="流ID" required>
|
||||
<Input
|
||||
v-model:value="editForm.stream"
|
||||
|
||||
Reference in New Issue
Block a user