|
@@ -75,7 +75,29 @@
|
|
|
<dict-tag :type="DICT_TYPE.PMS_DEVICE_STATUS" :value="scope.row.deviceStatus" />
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column
|
|
|
+ <el-table-column :label="t('deviceInfo.deviceBOM')" align="center" prop="hasSetMaintenanceBom" :min-width="flexColumnMinWidths.createTime">
|
|
|
+ <template #header>
|
|
|
+ <div class="column-header">
|
|
|
+ {{ t('deviceInfo.deviceBOM') }}
|
|
|
+ <!-- 添加感叹号图标,并使用 el-tooltip 显示提示 -->
|
|
|
+ <el-tooltip
|
|
|
+ effect="dark"
|
|
|
+ content="请选择有保养项的设备"
|
|
|
+ placement="top"
|
|
|
+ >
|
|
|
+ <el-icon :size="12" color="#e6a23c" style="cursor: pointer; margin-left: 3px">
|
|
|
+ <WarningFilled />
|
|
|
+ </el-icon>
|
|
|
+ </el-tooltip>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ <template #default="{ row }">
|
|
|
+ <div :class="{'no-maintenance': !row.hasSetMaintenanceBom, 'has-maintenance': row.hasSetMaintenanceBom}">
|
|
|
+ {{ row.hasSetMaintenanceBom ? '有保养项' : '无保养项' }}
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <!-- <el-table-column
|
|
|
:label="t('deviceList.createTime')"
|
|
|
align="center"
|
|
|
prop="createTime"
|
|
@@ -86,7 +108,7 @@
|
|
|
{{ formatDateTime(row.createTime) }}
|
|
|
</div>
|
|
|
</template>
|
|
|
- </el-table-column>
|
|
|
+ </el-table-column> -->
|
|
|
</el-table>
|
|
|
</div>
|
|
|
|
|
@@ -107,6 +129,7 @@ import { IotDeviceApi, IotDeviceVO } from '@/api/pms/device'
|
|
|
import { DICT_TYPE } from '@/utils/dict'
|
|
|
import { dateFormatter } from '@/utils/formatTime'
|
|
|
import { CACHE_KEY, useCache } from '@/hooks/web/useCache'
|
|
|
+import { WarningFilled } from '@element-plus/icons-vue'
|
|
|
|
|
|
const dialogVisible = ref(false) // 弹窗的是否展示
|
|
|
const loading = ref(true) // 列表的加载中
|
|
@@ -629,6 +652,16 @@ onUnmounted(() => {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+.no-maintenance {
|
|
|
+ color: red; /* 无保养项文本为红色 */
|
|
|
+ font-weight: bold;
|
|
|
+}
|
|
|
+
|
|
|
+.has-maintenance {
|
|
|
+ color: #67c23a; /* 有保养项文本为淡绿色 */
|
|
|
+ font-weight: bold;
|
|
|
+}
|
|
|
+
|
|
|
.table-wrapper {
|
|
|
width: 100%;
|
|
|
overflow-y: hidden;
|
|
@@ -670,4 +703,38 @@ onUnmounted(() => {
|
|
|
z-index: 10;
|
|
|
}
|
|
|
|
|
|
+/* 使感叹号图标与标题对齐 */
|
|
|
+.column-header {
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: center;
|
|
|
+
|
|
|
+ .el-tooltip {
|
|
|
+ margin-left: 3px;
|
|
|
+ display: inline-flex;
|
|
|
+ align-items: center;
|
|
|
+
|
|
|
+ .el-icon {
|
|
|
+ font-size: 12px;
|
|
|
+ color: #e6a23c;
|
|
|
+ cursor: pointer;
|
|
|
+ transition: color 0.3s;
|
|
|
+
|
|
|
+ &:hover {
|
|
|
+ color: #d48816;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+.el-tooltip {
|
|
|
+ cursor: pointer;
|
|
|
+}
|
|
|
+
|
|
|
+/* 优化图标样式 */
|
|
|
+.el-tooltip .el-icon-warning {
|
|
|
+ font-size: 18px;
|
|
|
+ color: #e6a23c; /* 使感叹号图标有明显的颜色 */
|
|
|
+}
|
|
|
+
|
|
|
</style>
|