From d6e731d4e6b8c97707ee1a6cf455d6cc1f9e8e6f Mon Sep 17 00:00:00 2001
From: 罗广辉 <guanghui.luo@foxmail.com>
Date: Sun, 13 Apr 2025 08:14:42 +0800
Subject: [PATCH] feat: 使用===个等号
---
src/views/Home/HomeLeft/MachineNestList.vue | 2 +-
src/views/Home/HomeLeft/OverviewNext.vue | 4 ++--
src/store/modules/tags.js | 4 ++--
src/views/Home/HomeLeft/InspectionRaskDetails/InspectionRaskDetailsDialog.vue | 20 ++++++++++----------
src/views/Home/useMapAggregation/useMapAggregation.js | 2 +-
src/views/SignMachineNest/MachineRight/MachineStatus/MachineStatus.vue | 4 ++--
6 files changed, 18 insertions(+), 18 deletions(-)
diff --git a/src/store/modules/tags.js b/src/store/modules/tags.js
index 819c900..cd28ca7 100644
--- a/src/store/modules/tags.js
+++ b/src/store/modules/tags.js
@@ -10,10 +10,10 @@
},
mutations: {
ADD_TAG: (state, action) => {
- if (typeof action.name == 'function') action.name = action.name(action.query)
+ if (typeof action.name === 'function') action.name = action.name(action.query)
state.tag = action
setStore({ name: 'tag', content: state.tag })
- if (state.tagList.some(ele => ele.fullPath == action.fullPath)) return
+ if (state.tagList.some(ele => ele.fullPath === action.fullPath)) return
state.tagList.push(action)
setStore({ name: 'tagList', content: state.tagList })
},
diff --git a/src/views/Home/HomeLeft/InspectionRaskDetails/InspectionRaskDetailsDialog.vue b/src/views/Home/HomeLeft/InspectionRaskDetails/InspectionRaskDetailsDialog.vue
index b5b7f35..ebfa5f7 100644
--- a/src/views/Home/HomeLeft/InspectionRaskDetails/InspectionRaskDetailsDialog.vue
+++ b/src/views/Home/HomeLeft/InspectionRaskDetails/InspectionRaskDetailsDialog.vue
@@ -80,25 +80,25 @@
<template #default="scope">
<span
:class="
- scope.row.status == 1
+ scope.row.status === 1
? 'pending '
- : scope.row.status == 2
+ : scope.row.status === 2
? 'distributed'
- : scope.row.status == 3
+ : scope.row.status === 3
? 'finish '
- : scope.row.status == 4
+ : scope.row.status === 4
? 'cancel '
: 'fail '
"
>
{{
- scope.row.status == 1
+ scope.row.status === 1
? '待执行'
- : scope.row.status == 2
+ : scope.row.status === 2
? '执行中'
- : scope.row.status == 3
+ : scope.row.status === 3
? '完成'
- : scope.row.status == 4
+ : scope.row.status === 4
? '取消'
: '失败'
}}
@@ -187,9 +187,9 @@
const handleReset = () => {
dateRange.value = null
Object.keys(searchForm).forEach(key => {
- if (key == 'start_date' || key == 'end_date') {
+ if (key === 'start_date' || key === 'end_date') {
searchForm[key] = null
- } else if (key == 'ai_types') {
+ } else if (key === 'ai_types') {
searchForm[key] = []
} else {
searchForm[key] = ''
diff --git a/src/views/Home/HomeLeft/MachineNestList.vue b/src/views/Home/HomeLeft/MachineNestList.vue
index f629fd2..edd2d42 100644
--- a/src/views/Home/HomeLeft/MachineNestList.vue
+++ b/src/views/Home/HomeLeft/MachineNestList.vue
@@ -14,7 +14,7 @@
infinite-scroll-immediate="true"
>
<div
- :class="[index % 2 == 1 ? 'table-itemeven' : 'table-item']"
+ :class="[index % 2 === 1 ? 'table-itemeven' : 'table-item']"
v-for="(item, index) in tableList"
:key="index"
>
diff --git a/src/views/Home/HomeLeft/OverviewNext.vue b/src/views/Home/HomeLeft/OverviewNext.vue
index 4893556..da35cf6 100644
--- a/src/views/Home/HomeLeft/OverviewNext.vue
+++ b/src/views/Home/HomeLeft/OverviewNext.vue
@@ -18,11 +18,11 @@
>
<div
class="table-item"
- :class="[index % 2 == 1 ? '' : 'table-item-odd']"
+ :class="[index % 2 === 1 ? '' : 'table-item-odd']"
v-for="(item, index) in tableList"
:key="index"
@click="signMachineNestClick(item)"
-
+
>
<div class="name">
<img class="imageicon" :src="overviewnextWay" alt="" />
diff --git a/src/views/Home/useMapAggregation/useMapAggregation.js b/src/views/Home/useMapAggregation/useMapAggregation.js
index 8ffc95a..f1dbbbd 100644
--- a/src/views/Home/useMapAggregation/useMapAggregation.js
+++ b/src/views/Home/useMapAggregation/useMapAggregation.js
@@ -277,7 +277,7 @@
let polygon = {}
- if (item.name == '县') {
+ if (item.name === '县') {
let material = new PolyGradientMaterial({
color: Cesium.Color.fromCssColorString(arrColor[randomInt]),
opacity: 0.7,
diff --git a/src/views/SignMachineNest/MachineRight/MachineStatus/MachineStatus.vue b/src/views/SignMachineNest/MachineRight/MachineStatus/MachineStatus.vue
index 499504b..eae7efb 100644
--- a/src/views/SignMachineNest/MachineRight/MachineStatus/MachineStatus.vue
+++ b/src/views/SignMachineNest/MachineRight/MachineStatus/MachineStatus.vue
@@ -149,7 +149,7 @@
const height = newValue?.height - res?.height;
//针对西安实时高度进行降低
const wId = localStorage.getItem('bs_workspace_id');
- if (wId == 'f47ac10b-58cc-4372-a567-0e02b2c3d479') {
+ if (wId === 'f47ac10b-58cc-4372-a567-0e02b2c3d479') {
detailInfo.value.height = reduceHeight(height);
} else {
detailInfo.value.height = height.toFixed(1) || '--';
@@ -203,7 +203,7 @@
newValue.deviceInfo[
deviceInfo.value.dock.basic_osd?.sub_device?.device_sn ??
osdVisible.sn
- ]?.mode_code == undefined || newValue.deviceInfo[
+ ]?.mode_code === undefined || newValue.deviceInfo[
deviceInfo.value.dock.basic_osd?.sub_device?.device_sn ??
osdVisible.sn
]?.mode_code == 14
--
Gitblit v1.9.3