物联设备填写SN时增加图片引导

This commit is contained in:
曹磊 2026-04-29 10:25:42 +08:00
parent e841e4983e
commit 872de0dcdf
8 changed files with 82 additions and 28 deletions

BIN
src/assets/iot/db_xlh.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 54 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 270 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 291 KiB

BIN
src/assets/iot/sb_sn.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 91 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 538 KiB

BIN
src/assets/iot/wsdj_sn.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 63 KiB

View File

@ -13,16 +13,60 @@
<a-row>
<a-col :span="24">
<a-form-item label="备注" v-bind="validateInfos.dimension" id="devicePreviewForm-remarks" name="remarks">
<a-textarea v-model:value="formData.remarks" :auto-size="{ minRows: 3, maxRows: 6 }"></a-textarea>
<a-textarea v-model:value="formData.remarks" :auto-size="{ minRows: 2, maxRows: 5 }"></a-textarea>
</a-form-item>
</a-col>
</a-row>
<a-row v-if="formData.deviceType=='NETWORKVIDEORECORDER'">
<a-col :span="24">
<a-form-item label="样例" >
<div class="tbClass"><img src="../../../../../assets/iot/recorder_sn.png"/></div>
<span style="font-size: 16px;color:red;font-weight: 700;">提示请正确填写设备标识如标识填写错误将无法正常集成设备</span>
</a-form-item>
</a-col>
</a-row>
<a-row v-if="formData.deviceType=='ROUTER'">
<a-col :span="24">
<a-form-item label="样例" >
<div class="tbClass"><img src="../../../../../assets/iot/router_sn.png"/></div>
<span style="font-size: 16px;color:red;font-weight: 700;">提示请正确填写设备标识如标识填写错误将无法正常集成设备</span>
</a-form-item>
</a-col>
</a-row>
<a-row v-if="formData.deviceType=='SWITCH'">
<a-col :span="24">
<a-form-item label="样例" >
<div class="tbClass"><img src="../../../../../assets/iot/switch_sn.png"/></div>
<span style="font-size: 16px;color:red;font-weight: 700;">提示请正确填写设备标识如标识填写错误将无法正常集成设备</span>
</a-form-item>
</a-col>
</a-row>
<a-row v-if="formData.deviceType=='db'">
<a-col :span="24">
<a-form-item label="样例" >
<div class="tbClass"><img src="../../../../../assets/iot/db_xlh.png"/></div>
<span style="font-size: 16px;color:red;font-weight: 700;">提示请正确填写设备标识如标识填写错误将无法正常集成设备</span>
</a-form-item>
</a-col>
</a-row>
<a-row v-if="formData.deviceType=='sb'">
<a-col :span="24">
<a-form-item label="样例" >
<div class="tbClass"><img src="../../../../../assets/iot/sb_sn.png"/></div>
<span style="font-size: 16px;color:red;font-weight: 700;">提示请正确填写设备标识如标识填写错误将无法正常集成设备</span>
</a-form-item>
</a-col>
</a-row>
<a-row v-if="formData.deviceType=='wsdj'">
<a-col :span="24">
<a-form-item label="样例" >
<div class="tbClass"><img src="../../../../../assets/iot/wsdj_sn.png"/></div>
<span style="font-size: 16px;color:red;font-weight: 700;">提示请正确填写设备标识如标识填写错误将无法正常集成设备</span>
</a-form-item>
</a-col>
</a-row>
<a-row>
<a-col :span="24">
<div style="padding: 14px;display: flex;justify-content: center;">
<span style="font-size: 16px;color:red;font-weight: 700;">提示请正确填写设备标识如标识填写错误将无法正常集成设备</span>
</div>
</a-col>
</a-row>
</a-form>
</template>
@ -56,6 +100,7 @@ const formData = reactive<Record<string, any>>({
sn: undefined,
ywId: undefined,
remarks: undefined,
deviceType: undefined,
});
const { createMessage } = useMessage();
const labelCol = ref<any>({ xs: { span: 24 }, sm: { span: 5 } });
@ -90,6 +135,7 @@ function add() {
* 编辑
*/
async function edit(record) {
console.log(record);
isUpdate.value = true;
nextTick(() => {
resetFields();
@ -155,4 +201,12 @@ defineExpose({
</script>
<style lang="less" scoped>
.tbClass {
background: #fff;
height: 500px;
border-radius: 5px;
display: flex;
justify-content: space-evenly;
border: 1px solid #d9d9d9;
}
</style>

View File

@ -37,6 +37,11 @@ export const columns: BasicColumn[] = [
align: "center",
dataIndex: 'dimension',
},
{
title: '设备类型',
align: "center",
dataIndex: 'deviceType_dictText',
},
{
title: '设备标识',
align: "center",
@ -47,11 +52,6 @@ export const columns: BasicColumn[] = [
align: "center",
dataIndex: 'deviceName',
},
{
title: '设备类型',
align: "center",
dataIndex: 'deviceType_dictText',
},
{
title: '设备型号',
align: "center",
@ -84,30 +84,15 @@ export const previewColumns: BasicColumn[] = [
dataIndex: 'batchNo',
},
{
title: '设备名称',
title: '设备维度',
align: "center",
dataIndex: 'deviceName',
dataIndex: 'dimension',
},
{
title: '设备类型',
align: "center",
dataIndex: 'deviceType_dictText',
},
{
title: '设备型号',
align: "center",
dataIndex: 'deviceModel',
},
{
title: '生产厂家',
align: "center",
dataIndex: 'factory',
},
{
title: '设备维度',
align: "center",
dataIndex: 'dimension',
},
{
title: '设备标识',
align: "center",
@ -122,6 +107,21 @@ export const previewColumns: BasicColumn[] = [
}
},
},
{
title: '设备名称',
align: "center",
dataIndex: 'deviceName',
},
{
title: '设备型号',
align: "center",
dataIndex: 'deviceModel',
},
{
title: '生产厂家',
align: "center",
dataIndex: 'factory',
},
{
title: '时间',
align: "center",