瀏覽代碼

refactor(equipLedger): remove redundant formatInstallationLocation function

replace the custom formatting function with inline template rendering for installation location display directly
huoyi 1 月之前
父節點
當前提交
575c914201
共有 1 個文件被更改,包括 2 次插入8 次删除
  1. 2 8
      src/views/equipManage/equipLedger/index.vue

+ 2 - 8
src/views/equipManage/equipLedger/index.vue

@@ -57,7 +57,7 @@
57 57
         show-overflow-tooltip />
58 58
       <el-table-column label="安装位置" prop="installationLocation" align="center" min-width="180" show-overflow-tooltip>
59 59
         <template #default="scope">
60
-          {{ formatInstallationLocation(scope.row.installationLocation) }}
60
+          <span>{{ scope.row.terminlName }}{{scope.row.terminlName?'/':''}}{{ scope.row.regionalName }}{{scope.row.regionalName?'/':''}}{{ scope.row.channelName }}</span>
61 61
         </template>
62 62
       </el-table-column>
63 63
       <el-table-column label="使用状态" prop="usageStatus" align="center" min-width="100">
@@ -467,13 +467,7 @@ function handleDelete(row) {
467 467
   }).catch(() => { })
468 468
 }
469 469
 
470
-function formatInstallationLocation(location) {
471
-  if (!location) return ''
472
-  if (typeof location === 'object') {
473
-    return `${location.terminlName || ''}/${location.regionalName || ''}/${location.channelName || ''}`
474
-  }
475
-  return location
476
-}
470
+
477 471
 
478 472
 function handleBatchDelete() {
479 473
   proxy.$modal.confirm('是否确认删除选中的设备?').then(function () {