yxh
10 天以前 bd3f4b0a9b9207b647de0f0d8c52600a2742fd56
src/views/ecg/devmanage/DevStatistic.vue
@@ -8,10 +8,10 @@
        :inline="true"
        label-width="68px"
    >
      <el-form-item label="分类名" prop="category">
      <el-form-item label="设备名称" prop="category">
        <el-select
            v-model="queryParams.category"
            placeholder="请选择分类名"
            placeholder="请选择设备名称"
            clearable
            class="!w-240px"
            @change="categoryChanged"
@@ -68,7 +68,13 @@
      <!--      <el-table-column label="id" align="center" prop="id" />-->
      <el-table-column label="分类名" align="center" prop="category">
        <template #default="scope">
          <dict-tag :type="DICT_TYPE.ECG_DEV_CATEGORY" :value="scope.row.category" />
          <!-- 字典命中时显示标签;未命中的兜底显示原始名称,避免整格空白 -->
          <dict-tag
              v-if="getDictLabel(DICT_TYPE.ECG_DEV_CATEGORY, scope.row.category)"
              :type="DICT_TYPE.ECG_DEV_CATEGORY"
              :value="scope.row.category"
          />
          <span v-else>{{ scope.row.category }}</span>
        </template>
      </el-table-column>
<!--
@@ -91,7 +97,7 @@
</template>
<script setup lang="ts">
import {getStrDictOptions, DICT_TYPE, DictDataType} from '@/utils/dict'
import {getStrDictOptions, getDictLabel, DICT_TYPE, DictDataType} from '@/utils/dict'
import download from '@/utils/download'
import {DeviceApi, DeviceStatisticVO, DevModelApi, OptionsVO} from '@/api/ecg/devmanage'