cxs 1 ヶ月 前
コミット
684efaf8b6

+ 1 - 1
.env.production

@@ -22,4 +22,4 @@ VITE_DROP_CONSOLE = true
 VITE_PWA = true
 
 # 线上环境接口地址
-VITE_API_URL = "https://mock.mengxuegu.com/mock/629d727e6163854a32e8307e"
+VITE_API_URL = /api

+ 6 - 2
.eslintrc.cjs

@@ -20,7 +20,11 @@ module.exports = {
         }
     },
     // 继承某些已有的规则
-    extends: ["plugin:vue/vue3-recommended", "plugin:@typescript-eslint/recommended", "plugin:prettier/recommended"],
+    extends: [
+      "plugin:vue/vue3-recommended",
+      "plugin:@typescript-eslint/recommended",
+      "plugin:prettier/recommended"
+    ],
     /**
      * "off" 或 0    ==>  关闭规则
      * "warn" 或 1   ==>  打开的规则作为警告(不影响代码执行)
@@ -59,4 +63,4 @@ module.exports = {
         "vue/no-setup-props-destructure": "off", // 禁止解构 props 传递给 setup
         "prettier/prettier": "off"
     }
-};
+};

BIN
dist.zip


+ 3 - 3
package.json

@@ -7,9 +7,9 @@
   "scripts": {
     "dev": "vite",
     "serve": "vite",
-    "build:dev": "vue-tsc && vite build --mode development",
-    "build:test": "vue-tsc && vite build --mode test",
-    "build:pro": "vue-tsc && vite build --mode production",
+    "build:dev": "vite build --mode development",
+    "build:test": "vite build --mode test",
+    "build:pro": "vite build --mode production",
     "type:check": "vue-tsc --noEmit --skipLibCheck",
     "preview": "pnpm build:dev && vite preview",
     "lint:eslint": "eslint --fix --ext .js,.ts,.vue ./src",

+ 1 - 1
src/components/PDFEmbed/PdfViewer.vue

@@ -42,7 +42,7 @@ const scaleData = reactive({
 });
 
 const vuePdfRef = ref<InstanceType<typeof VuePdfEmbed> | null>(null);
-const myDiv = ref(null);
+const myDiv = ref();
 const lastPage = () => {
   if (scaleData.pageNum > 1) {
     scaleData.pageNum--

+ 1 - 1
src/components/ProTable/components/Pagination.vue

@@ -27,7 +27,7 @@ interface PaginationProps {
   pageable: Pageable;
   handleSizeChange: (size: number) => void;
   handleCurrentChange: (currentPage: number) => void;
-  pageSizes: number[];
+  pageSizes?: number[];
 }
 
 defineProps<PaginationProps>();

+ 30 - 0
src/views/query/deviceHealth/index.vue

@@ -600,6 +600,36 @@ function formatDate(timestamp) {
   const minutes = String(date.getMinutes()).padStart(2, '0');
   return `${year}-${month}-${day} ${hours}:${minutes}`;
 }
+
+
+const dataTypeList= [
+  {
+    value: 0,
+    label: '正常',
+  },
+  {
+    value: 1,
+    label: '未连接',
+  },
+  {
+    value: 2,
+    label: '告警',
+  },{
+    value: 3,
+    label: '故障',
+  },{
+    value: 4,
+    label: '不确定',
+  },{
+    value: 5,
+    label: '未启用',
+  }
+]
+
+function findLabelByValue(noticeTypeList, value) {
+  const item = noticeTypeList.find(item => item.value === value);
+  return item ? item.label : null;
+}
 </script>
 
 <style>