优化前端设备类型的展示

This commit is contained in:
lin
2025-03-24 17:27:06 +08:00
parent a9cf5131e1
commit db7f79194a
8 changed files with 22 additions and 42 deletions

View File

@@ -23,9 +23,7 @@
<el-select size="mini" style="width: 8rem; margin-right: 1rem;" @change="search" v-model="channelType" placeholder="请选择"
default-first-option>
<el-option label="全部" value=""></el-option>
<el-option label="国标设备" :value="1"></el-option>
<el-option label="推流设备" :value="2"></el-option>
<el-option label="拉流代理" :value="3"></el-option>
<el-option v-for="item in Object.values($channelTypeList)" :key="item.id" :label="item.name" :value="item.id"></el-option>
</el-select>
<el-button v-if="hasShare !=='true'" size="mini" type="primary" @click="add()">
添加
@@ -74,9 +72,7 @@
<el-table-column label="类型" min-width="100">
<template v-slot:default="scope">
<div slot="reference" class="name-wrapper">
<el-tag size="medium" effect="plain" v-if="scope.row.dataType === 1">国标设备</el-tag>
<el-tag size="medium" effect="plain" type="success" v-else-if="scope.row.dataType === 2" >推流设备</el-tag>
<el-tag size="medium" effect="plain" type="warning" v-else-if="scope.row.dataType === 3">拉流代理</el-tag>
<el-tag size="medium" effect="plain" type="success" :style="$channelTypeList[scope.row.dataType].style">{{$channelTypeList[scope.row.dataType].name}}</el-tag>
</div>
</template>
</el-table-column>