wangfei
6 天以前 da30bfc3795305f0bbd400d196bcf4c30612c37f
UI-Project/src/views/hollow/hollowequipment.vue
@@ -992,9 +992,8 @@
</template>
<script setup>
import { ElMessage, ElMessageBox } from 'element-plus'
import { onBeforeUnmount, onMounted, onUnmounted, ref, reactive, watch, computed, getCurrentInstance  } from "vue";
import { onBeforeUnmount, onMounted, onUnmounted, ref, reactive, watch, computed, getCurrentInstance ,toRaw } from "vue";
import request from "@/utils/request"
import { host, WebSocketHost } from '@/utils/constants'
import { closeWebSocket, initializeWebSocket } from '@/utils/WebSocketService';
import { useI18n } from 'vue-i18n'
const { t } = useI18n()
@@ -1084,7 +1083,7 @@
  }
]
let socket = null;
const socketUrl = `ws://${WebSocketHost}:${host}/api/hollowGlass/api/talk/HollowGlassOne`;
const socketUrl = `ws://${window.ipConfig.serverUrl}/api/hollowGlass/api/talk/HollowGlassOne`;
const currentPage = ref(parseInt(window.localStorage.getItem('currentPage')) || 1);
watch(() => currentPage.value, (newVal) => {
  window.localStorage.setItem('currentPage', newVal);
@@ -1469,6 +1468,9 @@
function nestedTableRowClassName(parentRow, row) {
  if (parentRow.isThroughSlot == true) {
    return 'row-red-background';
  }
  if (row.row?.sumCount !== undefined && row.row?.pairCount !== undefined && row.row.sumCount !== row.row.pairCount) {
    return 'sum-equal-pair-row' // 返回自定义类名
  }
  return '';
}
@@ -1952,6 +1954,7 @@
  value: null,
  size: null
})
</script>
<style scoped>
#dt {
@@ -2014,4 +2017,9 @@
.el-loading-mask {
  z-index: 2000 !important;
}
/* 核心3:添加行变色样式,通过:deep穿透scoped */
:deep(.sum-equal-pair-row) {
  background-color: #fdf2e8 !important; /* 浅橙底色,可自行修改 */
  color: #e64340 !important; /* 文字色,可选 */
}
</style>