瀏覽代碼

常规提交

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 4 月之前
父節點
當前提交
df0bb1dded

+ 18 - 14
src/views/IntegratedAlarm/deviceConfig/components/custom.vue

@@ -12,7 +12,7 @@
       >
       <el-upload
         style="display: inline; margin-left: 10px"
-        action="/sharding/alertrule2/import"
+        :action="`${$store.state.baseURL}/alertrule/import`"
         :headers="token"
         :show-file-list="false"
         :on-success="handleSuccess"
@@ -101,7 +101,7 @@
         clearable
       ></el-input>
       <el-button
-        icon="el-icon-search"
+        icon="Search"
         class="buttons"
         round
         size="mini"
@@ -114,8 +114,7 @@
     <el-table
       :data="state.tableData"
       stripe
-      height="calc(100% - 45px)"
-      style="width: 100%"
+      style="width: 100%; height: calc(100% - 100px)"
     >
       <el-table-column
         v-for="item in state.tableHeader"
@@ -187,7 +186,9 @@
       <el-table-column label="操作" align="center" width="80">
         <template #default="scope">
           <el-button
-            style="color: #05bb4c"
+            :style="`color: ${
+              $store.state.theme ? '#1890ff' : '#47aee7'
+            } !important`"
             type="text"
             icon="el-icon-lx-edit"
             :disabled="scope.row.range == 1"
@@ -200,6 +201,7 @@
     </el-table>
     <div class="pagination">
       <el-pagination
+        class="b"
         layout="total, sizes, prev, pager, next"
         :page-sizes="[19, 50, 100, 200, 500]"
         @size-change="
@@ -231,11 +233,15 @@ import { ElMessageBox, ElMessage } from "element-plus";
 import customcomponents from "./custom_components.vue";
 const token = { token: sessionStorage.getItem("token") };
 const store = useStore();
-const stationList = computed(() =>
-  query.category == "windturbine"
-    ? store.state.stationListAll.filter((item) => item.windType == -1)
-    : store.state.stationListAll.filter((item) => item.windType == -2)
-);
+const stationList = computed(() => {
+  if (store?.state?.stationListAll?.length) {
+    return query.category == "windturbine"
+      ? store.state.stationListAll.filter((item) => item.windType == -1)
+      : store.state.stationListAll.filter((item) => item.windType == -2);
+  } else {
+    return [];
+  }
+});
 const isStation = computed(() => store.getters.isStation);
 const state = reactive({
   tableData: [
@@ -370,10 +376,8 @@ const dialogclose = () => {
 };
 const getData = async () => {
   const { data } = await custombj_fetchTableData(query);
-  if (data) {
-    state.tableData = data.records;
-    total.value = data.total;
-  }
+  state.tableData = data.records;
+  total.value = data.total;
 };
 const handleEditClick = (row) => {
   let obj = Object.assign({}, row);

+ 68 - 61
src/views/IntegratedAlarm/deviceConfig/components/faultmode.vue

@@ -38,8 +38,7 @@
     <el-table
       :data="state.faultmodeTableData"
       stripe
-      style="width: 100%"
-      height="calc(100% - 38px)"
+      style="width: 100%; height: calc(100% - 38px)"
     >
       <el-table-column type="index" width="50" />
       <el-table-column prop="name" label="名称"></el-table-column>
@@ -66,13 +65,15 @@
         <template #default="scope">
           <el-button
             type="text"
-            style="color: #05bb4c"
+            :style="`color: ${
+              $store.state.theme ? '#1890ff' : '#47aee7'
+            } !important`"
             @click="handleEdit(scope.row)"
             >编辑</el-button
           >
           <el-button
             type="text"
-            style="color: red"
+            :style="`color: #f25656 !important`"
             @click="handleDelete(scope.row)"
             >删除</el-button
           >
@@ -156,7 +157,7 @@
           <el-col :span="12">
             <el-form-item label="结构">
               <el-cascader
-                v-model="editFormData.structurecode"
+                v-model="editFormData.structureCode"
                 :options="cascaderdata"
                 :props="{ checkStrictly: true, emitPath: false }"
                 clearable
@@ -166,7 +167,11 @@
       </el-form>
       <template #footer>
         <span class="footerButton">
-          <el-button size="mini" round @click="editVisible = false"
+          <el-button
+            :style="`color: #${$store.state.theme ? '000' : 'fff'}`"
+            size="mini"
+            round
+            @click="editVisible = false"
             >取 消</el-button
           >
           <el-button size="mini" round type="primary" @click="saveEdit"
@@ -183,22 +188,22 @@ import { ElMessageBox, ElMessage } from "element-plus";
 import { outExportExcel } from "@/tools/excel/exportExcel.js"; //引入文件
 import {
   faultmode_windturbine,
-  faultmode_structurecode,
+  faultmode_structureCode,
   faultmode_delete,
   faultmode_add_edit,
 } from "@/api/zhbj/index.js";
 let cascaderdata = inject("cascaderdata");
 let desc = inject("desc");
 let treeId = inject("treeId");
-watch(
-  () => treeId,
-  (val, old) => {
-    getfaultmode(desc.value.code);
-  },
-  {
-    deep: true,
-  }
-);
+// watch(
+//   () => treeId,
+//   (val, old) => {
+//     getfaultmode(desc.value.code);
+//   },
+//   {
+//     deep: true,
+//   }
+// );
 let editVisible = ref(false);
 let editFormData = ref({});
 onMounted(() => {
@@ -248,7 +253,7 @@ let state = reactive({
       severity: 6,
       occurence: 3,
       detection: 4,
-      deviceid: "windturbine",
+      deviceId: "windturbine",
       structureCode: "101010211",
       models: null,
     },
@@ -262,7 +267,7 @@ let state = reactive({
       severity: 5,
       occurence: 4,
       detection: 4,
-      deviceid: "windturbine",
+      deviceId: "windturbine",
       structureCode: "101010211",
       models: null,
     },
@@ -277,7 +282,7 @@ let state = reactive({
       severity: 5,
       occurence: 4,
       detection: 3,
-      deviceid: "windturbine",
+      deviceId: "windturbine",
       structureCode: "101010207",
       models: null,
     },
@@ -291,7 +296,7 @@ let state = reactive({
       severity: 5,
       occurence: 3,
       detection: 4,
-      deviceid: "windturbine",
+      deviceId: "windturbine",
       structureCode: "101010207",
       models: null,
     },
@@ -305,7 +310,7 @@ let state = reactive({
       severity: 5,
       occurence: 3,
       detection: 4,
-      deviceid: "windturbine",
+      deviceId: "windturbine",
       structureCode: "101010206",
       models: null,
     },
@@ -319,7 +324,7 @@ let state = reactive({
       severity: 5,
       occurence: 3,
       detection: 4,
-      deviceid: "windturbine",
+      deviceId: "windturbine",
       structureCode: "101010214",
       models: null,
     },
@@ -333,7 +338,7 @@ let state = reactive({
       severity: 5,
       occurence: 3,
       detection: 4,
-      deviceid: "windturbine",
+      deviceId: "windturbine",
       structureCode: "101010202",
       models: null,
     },
@@ -347,7 +352,7 @@ let state = reactive({
       severity: 5,
       occurence: 3,
       detection: 4,
-      deviceid: "windturbine",
+      deviceId: "windturbine",
       structureCode: "101010202",
       models: null,
     },
@@ -361,7 +366,7 @@ let state = reactive({
       severity: 5,
       occurence: 3,
       detection: 4,
-      deviceid: "windturbine",
+      deviceId: "windturbine",
       structureCode: "101010202",
       models: null,
     },
@@ -375,7 +380,7 @@ let state = reactive({
       severity: 5,
       occurence: 3,
       detection: 4,
-      deviceid: "windturbine",
+      deviceId: "windturbine",
       structureCode: "101010202",
       models: null,
     },
@@ -389,7 +394,7 @@ let state = reactive({
       severity: 5,
       occurence: 3,
       detection: 4,
-      deviceid: "windturbine",
+      deviceId: "windturbine",
       structureCode: "101010202",
       models: null,
     },
@@ -403,7 +408,7 @@ let state = reactive({
       severity: 5,
       occurence: 3,
       detection: 4,
-      deviceid: "windturbine",
+      deviceId: "windturbine",
       structureCode: "101010202",
       models: null,
     },
@@ -417,7 +422,7 @@ let state = reactive({
       severity: 5,
       occurence: 3,
       detection: 4,
-      deviceid: "windturbine",
+      deviceId: "windturbine",
       structureCode: "101010202",
       models: null,
     },
@@ -431,7 +436,7 @@ let state = reactive({
       severity: 5,
       occurence: 3,
       detection: 4,
-      deviceid: "windturbine",
+      deviceId: "windturbine",
       structureCode: "101010202",
       models: null,
     },
@@ -445,7 +450,7 @@ let state = reactive({
       severity: 5,
       occurence: 3,
       detection: 4,
-      deviceid: "windturbine",
+      deviceId: "windturbine",
       structureCode: "101010202",
       models: null,
     },
@@ -459,7 +464,7 @@ let state = reactive({
       severity: 5,
       occurence: 4,
       detection: 3,
-      deviceid: "windturbine",
+      deviceId: "windturbine",
       structureCode: "101010202",
       models: null,
     },
@@ -473,7 +478,7 @@ let state = reactive({
       severity: 5,
       occurence: 4,
       detection: 3,
-      deviceid: "windturbine",
+      deviceId: "windturbine",
       structureCode: "101010202",
       models: null,
     },
@@ -487,7 +492,7 @@ let state = reactive({
       severity: 5,
       occurence: 4,
       detection: 3,
-      deviceid: "windturbine",
+      deviceId: "windturbine",
       structureCode: "101010202",
       models: null,
     },
@@ -501,7 +506,7 @@ let state = reactive({
       severity: 5,
       occurence: 4,
       detection: 3,
-      deviceid: "windturbine",
+      deviceId: "windturbine",
       structureCode: "101010202",
       models: null,
     },
@@ -515,7 +520,7 @@ let state = reactive({
       severity: 5,
       occurence: 4,
       detection: 3,
-      deviceid: "windturbine",
+      deviceId: "windturbine",
       structureCode: "101010202",
       models: null,
     },
@@ -531,7 +536,7 @@ let state = reactive({
       severity: 5,
       occurence: 3,
       detection: 4,
-      deviceid: "windturbine",
+      deviceId: "windturbine",
       structureCode: "101010204",
       models: null,
     },
@@ -547,7 +552,7 @@ let state = reactive({
       severity: 5,
       occurence: 3,
       detection: 4,
-      deviceid: "windturbine",
+      deviceId: "windturbine",
       structureCode: "101010208",
       models: null,
     },
@@ -563,7 +568,7 @@ let state = reactive({
       severity: 5,
       occurence: 3,
       detection: 4,
-      deviceid: "windturbine",
+      deviceId: "windturbine",
       structureCode: "101010204",
       models: null,
     },
@@ -579,7 +584,7 @@ let state = reactive({
       severity: 5,
       occurence: 3,
       detection: 4,
-      deviceid: "windturbine",
+      deviceId: "windturbine",
       structureCode: "101010204",
       models: null,
     },
@@ -593,7 +598,7 @@ let state = reactive({
       severity: 5,
       occurence: 3,
       detection: 4,
-      deviceid: "windturbine",
+      deviceId: "windturbine",
       structureCode: "101010204",
       models: null,
     },
@@ -608,7 +613,7 @@ let state = reactive({
       severity: 5,
       occurence: 3,
       detection: 4,
-      deviceid: "windturbine",
+      deviceId: "windturbine",
       structureCode: "101010202",
       models: null,
     },
@@ -624,7 +629,7 @@ let state = reactive({
       severity: 5,
       occurence: 3,
       detection: 4,
-      deviceid: "windturbine",
+      deviceId: "windturbine",
       structureCode: "101010202",
       models: null,
     },
@@ -639,7 +644,7 @@ let state = reactive({
       severity: 5,
       occurence: 3,
       detection: 4,
-      deviceid: "windturbine",
+      deviceId: "windturbine",
       structureCode: "101010202",
       models: null,
     },
@@ -655,7 +660,7 @@ let state = reactive({
       severity: 5,
       occurence: 4,
       detection: 3,
-      deviceid: "windturbine",
+      deviceId: "windturbine",
       structureCode: "101010204",
       models: null,
     },
@@ -669,7 +674,7 @@ let state = reactive({
       severity: 5,
       occurence: 5,
       detection: 3,
-      deviceid: "windturbine",
+      deviceId: "windturbine",
       structureCode: "101010207",
       models: null,
     },
@@ -683,7 +688,7 @@ let state = reactive({
       severity: 5,
       occurence: 3,
       detection: 4,
-      deviceid: "windturbine",
+      deviceId: "windturbine",
       structureCode: "101010208",
       models: null,
     },
@@ -697,7 +702,7 @@ let state = reactive({
       severity: 5,
       occurence: 3,
       detection: 4,
-      deviceid: "windturbine",
+      deviceId: "windturbine",
       structureCode: "101010204",
       models: null,
     },
@@ -711,7 +716,7 @@ let state = reactive({
       severity: 2,
       occurence: 4,
       detection: 3,
-      deviceid: "windturbine",
+      deviceId: "windturbine",
       structureCode: "101010202",
       models: null,
     },
@@ -725,7 +730,7 @@ let state = reactive({
       severity: 2,
       occurence: 4,
       detection: 3,
-      deviceid: "windturbine",
+      deviceId: "windturbine",
       structureCode: "101010202",
       models: null,
     },
@@ -739,7 +744,7 @@ let state = reactive({
       severity: 2,
       occurence: 4,
       detection: 3,
-      deviceid: "windturbine",
+      deviceId: "windturbine",
       structureCode: "101010202",
       models: null,
     },
@@ -753,7 +758,7 @@ let state = reactive({
       severity: 2,
       occurence: 4,
       detection: 3,
-      deviceid: "windturbine",
+      deviceId: "windturbine",
       structureCode: "101010202",
       models: null,
     },
@@ -767,7 +772,7 @@ let state = reactive({
       severity: 2,
       occurence: 4,
       detection: 3,
-      deviceid: "windturbine",
+      deviceId: "windturbine",
       structureCode: "101010202",
       models: null,
     },
@@ -781,7 +786,7 @@ let state = reactive({
       severity: 2,
       occurence: 3,
       detection: 4,
-      deviceid: "windturbine",
+      deviceId: "windturbine",
       structureCode: "101010211",
       models: null,
     },
@@ -795,7 +800,7 @@ let state = reactive({
       severity: 7,
       occurence: 4,
       detection: 4,
-      deviceid: "windturbine",
+      deviceId: "windturbine",
       structureCode: "101010211",
       models: null,
     },
@@ -809,7 +814,7 @@ let state = reactive({
       severity: 7,
       occurence: 3,
       detection: 2,
-      deviceid: "windturbine",
+      deviceId: "windturbine",
       structureCode: "101010211",
       models: null,
     },
@@ -823,7 +828,7 @@ let state = reactive({
       severity: 6,
       occurence: 3,
       detection: 4,
-      deviceid: "windturbine",
+      deviceId: "windturbine",
       structureCode: "101010211",
       models: null,
     },
@@ -837,8 +842,8 @@ let state = reactive({
     severity: null,
     occurence: null,
     detection: null,
-    deviceid: "windturbine",
-    structurecode: "",
+    deviceId: "windturbine",
+    structureCode: "",
     models: null,
   },
 });
@@ -878,7 +883,9 @@ const saveEdit = async () => {
 };
 // getData
 const getfaultmode = async (code) => {
-  const res = await faultmode_structurecode(code);
+  console.log(1111, code);
+  const res = await faultmode_structureCode(code);
+  console.log(2222, res);
   state.faultmodeTableData = res;
 };
 
@@ -908,7 +915,7 @@ const export2Excel = () => {
     "处理方法",
   ];
   const tableKey = [
-    "structurecode",
+    "structureCode",
     "name",
     "code",
     "occurence",

+ 17 - 7
src/views/IntegratedAlarm/deviceConfig/components/message.vue

@@ -1,12 +1,12 @@
 <template>
-  <div style="width: 50%">
+  <div style="width: 50%" class="baseInfoBox">
     <el-form :model="desc" label-width="100px">
       <el-form-item label="结构编码">
         <el-input v-model="desc.code"></el-input>
       </el-form-item>
       <el-form-item label="上级节点">
         <el-cascader
-          v-model="desc.parentcode"
+          v-model="desc.parentCode"
           :options="cascaderdata"
           :props="{ checkStrictly: true, emitPath: false }"
           :show-all-levels="false"
@@ -14,7 +14,7 @@
         />
       </el-form-item>
       <el-form-item label="设备ID">
-        <el-input v-model="desc.deviceid" disabled></el-input>
+        <el-input v-model="desc.deviceId" disabled></el-input>
       </el-form-item>
       <el-form-item label="结构名称">
         <el-input v-model="desc.name"></el-input>
@@ -34,17 +34,27 @@
         ></el-input>
       </el-form-item>
       <el-form-item label="序号">
-        <el-input v-model="desc.orderno"></el-input>
+        <el-input-number v-model="desc.orderno" :step="1" :min="0" />
       </el-form-item>
       <el-form-item label="是否有效">
         <div style="height: 100%; display: flex; align-items: center">
-          <el-switch v-model="desc.enabled" active-color="#67b9ff" />
+          <el-switch
+            v-model="desc.enabled"
+            :active-color="
+              $store.state.moreSty === 'greenSty' ? '#13ce66' : '#2169c3'
+            "
+            inactive-color="#ff4949"
+          />
         </div>
       </el-form-item>
     </el-form>
     <el-button
-      style="float: right; background: #67b9ff; border-color: #67b9ff"
-      type="primary"
+      style="float: right; border: none"
+      :style="`color:#fff;${
+        $store.state.moreSty === 'greenSty'
+          ? 'background: #05bb4c;'
+          : 'background: #2169c3;'
+      }`"
       @click="savedesc"
       :disabled="desc.code == ''"
       >保存</el-button

+ 14 - 14
src/views/IntegratedAlarm/deviceConfig/components/windturbine.vue

@@ -13,7 +13,7 @@
         >
         <el-upload
           style="display: inline; margin-left: 10px"
-          action="/sharding/warning2/import"
+          :action="`${$store.state.baseURL}/alarmconfiguration/import`"
           :headers="token"
           :show-file-list="false"
           :on-success="handleSuccess"
@@ -72,7 +72,7 @@
           clearable
         ></el-input>
         <el-button
-          icon="el-icon-search"
+          icon="Search"
           size="mini"
           round
           class="buttons"
@@ -85,9 +85,8 @@
       <el-table
         :data="state.tableData"
         size="mini"
-        style="width: 100%"
+        style="width: 100%; height: calc(100% - 65px)"
         stripe
-        height="calc(100% - 43px)"
       >
         <el-table-column
           v-for="item in state.tableHeader"
@@ -121,7 +120,9 @@
           <template #default="scope">
             <el-button
               type="text"
-              style="color: #05bb4c"
+              :style="`color: ${
+                $store.state.theme ? '#1890ff' : '#47aee7'
+              } !important`"
               icon="el-icon-lx-edit"
               @click="handleEditClick(scope.row)"
             >
@@ -132,6 +133,7 @@
       </el-table>
       <div class="pagination">
         <el-pagination
+          class="b"
           layout="total, sizes, prev, pager, next"
           :page-sizes="[19, 50, 100, 200, 500]"
           @size-change="
@@ -700,13 +702,11 @@ const dialogclose = () => {
 };
 const getData = async () => {
   const { data } = await windturbinebj_fetchTableData(query);
-  if (data) {
-    data.records.forEach((ele) => {
-      ele.alarmTypeName = warningClassIfyIdConvert(ele.alarmType);
-    });
-    state.tableData = data?.records || [];
-    total.value = data.total;
-  }
+  data.records.forEach((ele) => {
+    ele.alarmTypeName = warningClassIfyIdConvert(ele.alarmType);
+  });
+  state.tableData = data.records;
+  total.value = data.total;
 };
 const handleInsert = () => {
   state.visible = true;
@@ -825,7 +825,7 @@ const levelIdConvert = (val) => {
     case 4:
       return "中高级";
     case 5:
-      return "限电/高级";
+      return "高级";
     default:
       return "";
   }
@@ -877,6 +877,6 @@ const ednaValueConvert = (val) => {
   margin-left: 10px;
 }
 .pagination {
-  padding-top: 10px;
+  padding-top: 15px;
 }
 </style>

+ 48 - 84
src/views/IntegratedAlarm/deviceConfig/components/ycpoint.vue

@@ -39,19 +39,23 @@
         size="mini"
         round
         @click="handleEdit(state.addFormData)"
-        :disabled="desc.code == ''"
+        :disabled="desc?.code == ''"
         >新增</el-button
       >
       <el-upload
         class="upload-demo"
-        :disabled="desc.code == ''"
+        :disabled="desc?.code == ''"
         action="/sharding/device/input"
         :show-file-list="false"
         :on-success="handleSuccess"
         :on-progress="handleProgress"
         :on-error="handleError"
       >
-        <el-button :disabled="desc.code == ''" class="buttons" size="mini" round
+        <el-button
+          :disabled="desc?.code == ''"
+          class="buttons"
+          size="mini"
+          round
           >导入</el-button
         >
       </el-upload>
@@ -60,7 +64,7 @@
         size="mini"
         round
         @click="export2Excel"
-        :disabled="desc.code == ''"
+        :disabled="desc?.code == ''"
         >导出</el-button
       >
     </el-space>
@@ -69,8 +73,7 @@
     <el-table
       :data="state.pointTableData"
       stripe
-      style="width: 100%"
-      height="calc(100% - 45px)"
+      style="width: 100%; height: calc(100% - 45px)"
     >
       <el-table-column type="index" width="50" />
       <el-table-column prop="metricCode" label="测点编码"></el-table-column>
@@ -83,9 +86,14 @@
             trigger="click"
           >
             <template #reference>
-              <el-button type="text" style="color: #05bb4c" size="small">{{
-                scope.row.name
-              }}</el-button>
+              <el-button
+                type="text"
+                :style="`color: ${
+                  $store.state.theme ? '#1890ff' : '#47aee7'
+                } !important`"
+                size="small"
+                >{{ scope.row.name }}</el-button
+              >
             </template>
             <el-table
               size="mini"
@@ -93,17 +101,17 @@
               max-height="400px"
             >
               <el-table-column
-                property="devicemodel"
+                prop="deviceModel"
                 label="机型"
                 align="center"
               ></el-table-column>
               <el-table-column
-                property="uniformcode"
+                prop="uniformCode"
                 label="统一编码"
                 align="center"
               ></el-table-column>
               <el-table-column
-                property="multiplier"
+                prop="multiplier"
                 label="倍率"
                 align="center"
               ></el-table-column>
@@ -126,13 +134,15 @@
         <template #default="scope">
           <el-button
             type="text"
-            style="color: #05bb4c"
+            :style="`color: ${
+              $store.state.theme ? '#1890ff' : '#47aee7'
+            } !important`"
             @click="handleEdit(scope.row)"
             >编辑</el-button
           >
           <el-button
             type="text"
-            style="color: red"
+            :style="`color: #f25656 !important`"
             @click="handleDelete(scope.row)"
             >删除</el-button
           >
@@ -141,6 +151,7 @@
     </el-table>
     <div class="pagination">
       <el-pagination
+        class="b"
         layout="total, sizes, prev, pager, next"
         :page-sizes="[19, 50, 100, 200, 500]"
         @size-change="
@@ -161,7 +172,7 @@
   <el-dialog v-model="editVisible" width="40%">
     <el-form :model="editFormData" label-width="80px">
       <el-form-item label="编码">
-        <el-input v-model="editFormData.metriccode"></el-input>
+        <el-input v-model="editFormData.metricCode"></el-input>
       </el-form-item>
       <el-row :gutter="24">
         <el-col :span="12">
@@ -214,7 +225,7 @@
         <el-col :span="12">
           <el-form-item label="结构">
             <el-cascader
-              v-model="editFormData.structurecode"
+              v-model="editFormData.structureCode"
               :options="cascaderdata"
               :props="{ checkStrictly: true, emitPath: false }"
               clearable
@@ -263,7 +274,7 @@
           style="width: 100%; margin-top: 10px"
           max-height="200px"
         >
-          <el-table-column prop="devicemodel" label="机型" />
+          <el-table-column prop="deviceModel" label="机型" />
           <el-table-column label="倍率">
             <template #default="scope">
               <el-input v-model="scope.row.multiplier" size="mini" />
@@ -271,7 +282,7 @@
           </el-table-column>
           <el-table-column label="统一编码">
             <template #default="scope">
-              <el-input v-model="scope.row.uniformcode" size="mini" />
+              <el-input v-model="scope.row.uniformCode" size="mini" />
             </template>
           </el-table-column>
         </el-table>
@@ -317,7 +328,7 @@ let cascaderdata = inject("cascaderdata");
 watch(
   () => treeId,
   (newV, old) => {
-    state.addFormData.structurecode = desc.value.code;
+    state.addFormData.structureCode = desc.value.code;
     getPoint(desc.value);
   },
   {
@@ -716,56 +727,8 @@ let state = reactive({
   ],
   SearchVal: "",
   selectPoint: "",
-  selectModel: "TZ-2000",
-  modelList: [
-    "TZ-2000",
-    "/HW3-S2500(121)",
-    "EN141/2.65",
-    "TZ2000-93",
-    "SGT1000TS",
-    "GBL220-500/315-HE",
-    "SSL500",
-    "HZ93-2.0MW",
-    "H93L-2.0MW",
-    "Sunny Central 500HE",
-    "XE100-2000",
-    "SG80KTL-M",
-    "SUN2000-50KTL-C1",
-    "SUN2000-50KTL-ZHM3",
-    "SUN2000-50KTL-C",
-    "SG136TX",
-    "SG60KTL-M",
-    "SG630KTL",
-    "SG500MX",
-    "TZ2000-87",
-    "SEC-W02B-1250kW",
-    "/HW3-S2000(110)",
-    "TZ2000/116-85",
-    "W2500C-135-90",
-    "TZ2500",
-    "EN141/3.2",
-    "EN141/2.6",
-    "/UP2000/105",
-    "SEC-W01-1250W",
-    "UP2000-105",
-    "HW2/1500(87)",
-    "HW2-S1500W",
-    "SG1250UD",
-    "AE-500-50-PV-X-HV",
-    "SG50KTL",
-    "SG50KTL-M",
-    "SG630MX",
-    "SG630-MX",
-    "SGI-500KTL",
-    "SUN2000-28KTL",
-    "艾默生SSL500",
-    "TS80KTL-PLUS",
-    "SG1500UD",
-    "SUN2000-125KTL-MO",
-    "EA500KM-M",
-    "PVS-800-57-100KW-A",
-    "SG500KTL",
-  ],
+  selectModel: "",
+  modelList: [],
   categorydataoptions: ["AI", "DI", "CI"],
   addFormData: {
     categorydata: "AI",
@@ -777,12 +740,12 @@ let state = reactive({
     categorysci: null,
     categorysys: null,
     description: null,
-    deviceid: "windturbine",
+    deviceId: "windturbine",
     enname: null,
     id: null,
-    metriccode: "",
+    metricCode: "",
     name: "",
-    structurecode: "",
+    structureCode: "",
     unitname: null,
     unitnamecn: null,
     deviceModelMetrics: [],
@@ -808,14 +771,14 @@ const getPoint = async (node, value) => {
     state.selectModel
   );
   pageTotal.value = res.total;
-  // state.pointTableData = res.records?.sort((a, b) => {
-  //   return a.id - b.id;
-  // });
+  state.pointTableData = res.records?.sort((a, b) => {
+    return a.id - b.id;
+  });
 };
 // 机型
 const getequipmentmodel_list = async () => {
   const { data } = await getWtModel("");
-  // state.modelList = data || [];
+  state.modelList = data || [];
 };
 // 测点 编辑
 const handleEdit = (row) => {
@@ -862,12 +825,12 @@ const handleDelete = (row) => {
 const deviceModelAdd = async () => {
   if (state.deviceModelSel == "") return;
   let obj = {
-    deviceid: editFormData.value.deviceid,
-    devicemodel: state.deviceModelSel,
+    deviceId: editFormData.value.deviceId,
+    deviceModel: state.deviceModelSel,
     id: null,
-    metriccode: editFormData.value.metriccode,
+    metricCode: editFormData.value.metricCode,
     multiplier: 0,
-    uniformcode: "",
+    uniformCode: "",
   };
   editFormData.value.deviceModelMetrics.push(obj);
 };
@@ -917,7 +880,7 @@ const export2Excel = async () => {
   ];
   const tableKey = [
     "structurecode",
-    "metriccode",
+    "metricCode",
     "name",
     "enname",
     "unitname",
@@ -939,12 +902,13 @@ const export2Excel = async () => {
     color: #ffffff;
   }
 }
-.devicemenu {
-  margin-bottom: 10px;
-}
 .ycpoint-table {
   height: calc(100% - 39px);
 }
+
+.pagination {
+  margin-top: 15px;
+}
 </style>
 <style lang="less">
 .point-popover {

+ 76 - 76
src/views/IntegratedAlarm/deviceConfig/components/yxpoint.vue

@@ -21,7 +21,7 @@
       <el-upload
         class="upload-demo"
         :disabled="desc.code == ''"
-        action="/sharding/device/input"
+        :action="`${$store.state.baseURL}/device/input`"
         :show-file-list="false"
         :on-success="handleSuccess"
         :on-progress="handleProgress"
@@ -45,8 +45,7 @@
     <el-table
       :data="state.pointTableData"
       stripe
-      style="width: 100%"
-      height="calc(100% - 45px)"
+      style="width: 100%; height: calc(100% - 45px)"
     >
       <el-table-column type="index" width="50" />
       <el-table-column prop="metricCode" label="测点编码"></el-table-column>
@@ -61,7 +60,9 @@
             <template #reference>
               <el-button
                 type="text"
-                style="color: #05bb4c"
+                :style="`color: ${
+                  $store.state.theme ? '#1890ff' : '#47aee7'
+                } !important`"
                 size="small"
                 @click="handleClick(scope)"
                 >{{ scope.row.name }}</el-button
@@ -73,12 +74,12 @@
               max-height="400px"
             >
               <el-table-column
-                property="devicemodel"
+                property="deviceModel"
                 label="机型"
                 align="center"
               ></el-table-column>
               <el-table-column
-                property="uniformcode"
+                property="uniformCode"
                 label="统一编码"
                 align="center"
               ></el-table-column>
@@ -105,13 +106,15 @@
         <template #default="scope">
           <el-button
             type="text"
-            style="color: #05bb4c"
+            :style="`color: ${
+              $store.state.theme ? '#1890ff' : '#47aee7'
+            } !important`"
             @click="handleEdit(scope.row)"
             >编辑</el-button
           >
           <el-button
             type="text"
-            style="color: red"
+            :style="`color: #f25656 !important`"
             @click="handleDelete(scope.row)"
             >删除</el-button
           >
@@ -120,6 +123,7 @@
     </el-table>
     <div class="pagination">
       <el-pagination
+        class="b"
         layout="total, sizes, prev, pager, next"
         :page-sizes="[19, 50, 100, 200, 500]"
         @size-change="
@@ -140,7 +144,7 @@
   <el-dialog v-model="editVisible" width="40%">
     <el-form :model="editFormData" label-width="80px">
       <el-form-item label="编码">
-        <el-input v-model="editFormData.metriccode"></el-input>
+        <el-input v-model="editFormData.metricCode"></el-input>
       </el-form-item>
       <el-row :gutter="24">
         <el-col :span="12">
@@ -193,7 +197,7 @@
         <el-col :span="12">
           <el-form-item label="结构">
             <el-cascader
-              v-model="editFormData.structurecode"
+              v-model="editFormData.structureCode"
               :options="cascaderdata"
               :props="{ checkStrictly: true, emitPath: false }"
               clearable
@@ -241,7 +245,7 @@
           style="width: 100%; margin-top: 10px"
           max-height="200px"
         >
-          <el-table-column prop="devicemodel" label="机型" />
+          <el-table-column prop="deviceModel" label="机型" />
           <el-table-column label="倍率">
             <template #default="scope">
               <el-input v-model="scope.row.multiplier" size="mini" />
@@ -249,7 +253,7 @@
           </el-table-column>
           <el-table-column label="统一编码">
             <template #default="scope">
-              <el-input v-model="scope.row.uniformcode" size="mini" />
+              <el-input v-model="scope.row.uniformCode" size="mini" />
             </template>
           </el-table-column>
         </el-table>
@@ -289,7 +293,7 @@ let cascaderdata = inject("cascaderdata");
 watch(
   () => treeId,
   (newV, old) => {
-    state.addFormData.structurecode = desc.value.code;
+    state.addFormData.structureCode = desc.value.code;
     getPoint(desc.value);
   },
   {
@@ -309,8 +313,8 @@ let state = reactive({
       id: "1156264805150367744",
       deviceId: "windturbine",
       structureCode: "101010213",
-      metricCode: "AI0001",
-      name: "风机故障1",
+      metricCode: "AI0002",
+      name: "风机故障2",
       enname: "",
       unitName: "",
       unitNamecn: "",
@@ -322,15 +326,15 @@ let state = reactive({
       categoryres3: null,
       categoryres4: null,
       categoryres5: null,
-      description: "风机故障1",
+      description: "风机故障2",
       deviceModelMetrics: null,
     },
     {
       id: "1155576066015109120",
       deviceId: "windturbine",
       structureCode: "101010213",
-      metricCode: "AI0001",
-      name: "风机故障1",
+      metricCode: "AI0002",
+      name: "风机故障2",
       enname: "",
       unitName: "",
       unitNamecn: "",
@@ -342,15 +346,15 @@ let state = reactive({
       categoryres3: null,
       categoryres4: null,
       categoryres5: null,
-      description: "风机故障1",
+      description: "风机故障2",
       deviceModelMetrics: null,
     },
     {
       id: "1160891964355649536",
       deviceId: "windturbine",
       structureCode: "101010213",
-      metricCode: "AI0001",
-      name: "风机故障1",
+      metricCode: "AI0002",
+      name: "风机故障2",
       enname: "",
       unitName: "",
       unitNamecn: "",
@@ -362,15 +366,15 @@ let state = reactive({
       categoryres3: null,
       categoryres4: null,
       categoryres5: null,
-      description: "风机故障1",
+      description: "风机故障2",
       deviceModelMetrics: null,
     },
     {
       id: "1155913526452559872",
       deviceId: "windturbine",
       structureCode: "101010213",
-      metricCode: "AI0001",
-      name: "风机故障1",
+      metricCode: "AI0002",
+      name: "风机故障2",
       enname: "",
       unitName: "",
       unitNamecn: "",
@@ -382,15 +386,15 @@ let state = reactive({
       categoryres3: null,
       categoryres4: null,
       categoryres5: null,
-      description: "风机故障1",
+      description: "风机故障2",
       deviceModelMetrics: null,
     },
     {
       id: "1155913553241579520",
       deviceId: "windturbine",
       structureCode: "101010213",
-      metricCode: "AI0001",
-      name: "风机故障1",
+      metricCode: "AI0002",
+      name: "风机故障2",
       enname: "",
       unitName: "",
       unitNamecn: "",
@@ -402,15 +406,15 @@ let state = reactive({
       categoryres3: null,
       categoryres4: null,
       categoryres5: null,
-      description: "风机故障1",
+      description: "风机故障2",
       deviceModelMetrics: null,
     },
     {
       id: "1156259746740051968",
       deviceId: "windturbine",
       structureCode: "101010213",
-      metricCode: "AI0001",
-      name: "风机故障1",
+      metricCode: "AI0002",
+      name: "风机故障2",
       enname: "",
       unitName: "",
       unitNamecn: "",
@@ -422,15 +426,15 @@ let state = reactive({
       categoryres3: null,
       categoryres4: null,
       categoryres5: null,
-      description: "风机故障1",
+      description: "风机故障2",
       deviceModelMetrics: null,
     },
     {
       id: "1156267504902217728",
       deviceId: "windturbine",
       structureCode: "101010213",
-      metricCode: "AI0001",
-      name: "风机故障1",
+      metricCode: "AI0002",
+      name: "风机故障2",
       enname: "",
       unitName: "",
       unitNamecn: "",
@@ -442,15 +446,15 @@ let state = reactive({
       categoryres3: null,
       categoryres4: null,
       categoryres5: null,
-      description: "风机故障1",
+      description: "风机故障2",
       deviceModelMetrics: null,
     },
     {
       id: "1160891930474061824",
       deviceId: "windturbine",
       structureCode: "101010213",
-      metricCode: "AI0001",
-      name: "风机故障1",
+      metricCode: "AI0002",
+      name: "风机故障2",
       enname: "",
       unitName: "",
       unitNamecn: "",
@@ -462,15 +466,15 @@ let state = reactive({
       categoryres3: null,
       categoryres4: null,
       categoryres5: null,
-      description: "风机故障1",
+      description: "风机故障2",
       deviceModelMetrics: null,
     },
     {
       id: "1156260274253471744",
       deviceId: "windturbine",
       structureCode: "101010213",
-      metricCode: "AI0001",
-      name: "风机故障1",
+      metricCode: "AI0002",
+      name: "风机故障2",
       enname: "",
       unitName: "",
       unitNamecn: "",
@@ -482,15 +486,15 @@ let state = reactive({
       categoryres3: null,
       categoryres4: null,
       categoryres5: null,
-      description: "风机故障1",
+      description: "风机故障2",
       deviceModelMetrics: null,
     },
     {
       id: "1156267544110571520",
       deviceId: "windturbine",
       structureCode: "101010213",
-      metricCode: "AI0001",
-      name: "风机故障1",
+      metricCode: "AI0002",
+      name: "风机故障2",
       enname: "",
       unitName: "",
       unitNamecn: "",
@@ -502,15 +506,15 @@ let state = reactive({
       categoryres3: null,
       categoryres4: null,
       categoryres5: null,
-      description: "风机故障1",
+      description: "风机故障2",
       deviceModelMetrics: null,
     },
     {
       id: "1156260130451759104",
       deviceId: "windturbine",
       structureCode: "101010213",
-      metricCode: "AI0001",
-      name: "风机故障1",
+      metricCode: "AI0002",
+      name: "风机故障2",
       enname: "",
       unitName: "",
       unitNamecn: "",
@@ -522,15 +526,15 @@ let state = reactive({
       categoryres3: null,
       categoryres4: null,
       categoryres5: null,
-      description: "风机故障1",
+      description: "风机故障2",
       deviceModelMetrics: null,
     },
     {
       id: "1156265364842487808",
       deviceId: "windturbine",
       structureCode: "101010213",
-      metricCode: "AI0001",
-      name: "风机故障1",
+      metricCode: "AI0002",
+      name: "风机故障2",
       enname: "",
       unitName: "",
       unitNamecn: "",
@@ -542,15 +546,15 @@ let state = reactive({
       categoryres3: null,
       categoryres4: null,
       categoryres5: null,
-      description: "风机故障1",
+      description: "风机故障2",
       deviceModelMetrics: null,
     },
     {
       id: "1155576093894647808",
       deviceId: "windturbine",
       structureCode: "101010213",
-      metricCode: "AI0001",
-      name: "风机故障1",
+      metricCode: "AI0002",
+      name: "风机故障2",
       enname: "",
       unitName: "",
       unitNamecn: "",
@@ -562,7 +566,7 @@ let state = reactive({
       categoryres3: null,
       categoryres4: null,
       categoryres5: null,
-      description: "风机故障1",
+      description: "风机故障2",
       deviceModelMetrics: null,
     },
     {
@@ -701,12 +705,12 @@ let state = reactive({
     categorysci: null,
     categorysys: null,
     description: null,
-    deviceid: "windturbine",
+    deviceId: "windturbine",
     enname: null,
     id: null,
-    metriccode: "",
+    metricCode: "",
     name: "",
-    structurecode: "",
+    structureCode: "",
     unitname: null,
     unitnamecn: null,
     deviceModelMetrics: [],
@@ -732,13 +736,13 @@ const getPoint = async (node) => {
     state.selectModel
   );
   pageTotal.value = res.total;
-  // state.pointTableData = res.records
-  //   ?.sort((a, b) => {
-  //     return a.id - b.id;
-  //   })
-  //   .map((item, index) => {
-  //     return { ...item, index: index + 1 };
-  //   });
+  state.pointTableData = res.records
+    ?.sort((a, b) => {
+      return a.id - b.id;
+    })
+    .map((item, index) => {
+      return { ...item, index: index + 1 };
+    });
 };
 // 机型
 const getequipmentmodel_list = async () => {
@@ -790,12 +794,12 @@ const handleDelete = (row) => {
 const deviceModelAdd = async () => {
   if (state.deviceModelSel == "") return;
   let obj = {
-    deviceid: editFormData.value.deviceid,
-    devicemodel: state.deviceModelSel,
+    deviceId: editFormData.value.deviceId,
+    deviceModel: state.deviceModelSel,
     id: null,
-    metriccode: editFormData.value.metriccode,
+    metricCode: editFormData.value.metricCode,
     multiplier: 0,
-    uniformcode: "",
+    uniformCode: "",
   };
   editFormData.value.deviceModelMetrics.push(obj);
 };
@@ -844,8 +848,8 @@ const export2Excel = async () => {
     "描述",
   ];
   const tableKey = [
-    "structurecode",
-    "metriccode",
+    "structureCode",
+    "metricCode",
     "name",
     "enname",
     "unitname",
@@ -855,9 +859,7 @@ const export2Excel = async () => {
   ];
   outExportExcel(tableHeader, tableKey, tableData.records, "测点导出excel");
 };
-const handleClick = ({ row }) => {
-  console.log(row.index);
-};
+const handleClick = ({ row }) => {};
 </script>
 <style lang="less" scoped>
 .buttons {
@@ -871,14 +873,12 @@ const handleClick = ({ row }) => {
   }
 }
 
-.devicemenu {
-  margin-bottom: 10px;
-}
 .yxpoint-table {
   height: calc(100% - 39px);
 }
-.devicemenu {
-  margin-bottom: 10px;
+
+.pagination {
+  margin-top: 15px;
 }
 </style>
 <style lang="less">

+ 52 - 31
src/views/IntegratedAlarm/deviceConfig/index.vue

@@ -1,12 +1,12 @@
 <template>
   <div class="device-config">
-    <div class="leftContent">
+    <div class="leftContent" :data-type="$store.state.moreSty">
       <span>{{ pageTitle }}</span>
     </div>
     <div class="device-content">
       <div class="box-card-tree">
         <div class="btns">
-          <el-button size="mini" class="buttons" round @click="handleTreeAdd()"
+          <el-button size="mini" class="buttons" round @click="handleTreeAdd"
             >新增</el-button
           >
           <el-button
@@ -18,7 +18,10 @@
             >删除</el-button
           >
         </div>
-        <div class="trees">
+        <div
+          class="trees"
+          :style="`background: ${$store.state.theme ? '#fff' : '#152545'}`"
+        >
           <el-tree
             :data="state.treedata"
             :props="state.defaultProps"
@@ -30,27 +33,25 @@
           />
         </div>
       </div>
-      <div class="box-card">
+      <div class="box-card baseInfoTabs">
         <el-tabs type="card">
-          <!-- <el-tab-pane label="传感点">
-          <point />
-        </el-tab-pane> -->
-          <el-tab-pane label="遥测点">
+          <el-tab-pane label="遥测点" v-if="1">
             <ycpoint />
           </el-tab-pane>
-          <el-tab-pane label="遥信点">
+          <el-tab-pane label="遥信点" v-if="0">
             <yxpoint />
           </el-tab-pane>
-          <el-tab-pane label="设备报警">
+          <el-tab-pane label="报警" v-if="0">
             <windturbine />
           </el-tab-pane>
-          <el-tab-pane label="故障预警">
+          <el-tab-pane label="预警" v-if="0">
             <custom />
           </el-tab-pane>
-          <el-tab-pane label="故障原因">
+          <!-- 故障原因模块隐藏,模块内修改与新增接口异常,导入 excel 接口404 -->
+          <el-tab-pane label="故障原因" v-if="0">
             <faultmode />
           </el-tab-pane>
-          <el-tab-pane label="基本信息">
+          <el-tab-pane label="基本信息" v-if="0">
             <message />
           </el-tab-pane>
         </el-tabs>
@@ -69,7 +70,7 @@
             <el-col :span="12">
               <el-form-item label="上级节点" label-width="100px">
                 <el-cascader
-                  v-model="state.treeAddFormData.parentcode"
+                  v-model="state.treeAddFormData.parentCode"
                   :options="state.cascaderdata"
                   :props="{ checkStrictly: true, emitPath: false }"
                   :show-all-levels="false"
@@ -94,9 +95,11 @@
           <el-row :gutter="24">
             <el-col :span="10"
               ><el-form-item label="序号">
-                <el-input
+                <el-input-number
                   v-model="state.treeAddFormData.orderno"
-                ></el-input> </el-form-item
+                  :min="0"
+                  :step="1"
+                /> </el-form-item
             ></el-col>
             <el-col :span="6">
               <el-form-item label="是否有效">
@@ -111,7 +114,7 @@
             <el-col :span="8">
               <el-form-item label="设备ID">
                 <el-input
-                  v-model="state.treeAddFormData.deviceid"
+                  v-model="state.treeAddFormData.deviceId"
                   disabled
                 ></el-input> </el-form-item
             ></el-col>
@@ -4262,7 +4265,7 @@ let state = reactive({
     categorysci: null,
     categorysys: null,
     description: null,
-    deviceid: "windturbine",
+    deviceId: "windturbine",
     enname: null,
     id: null,
     metriccode: "",
@@ -4274,12 +4277,12 @@ let state = reactive({
   },
   treeAddFormData: {
     code: "",
-    parentcode: "",
-    deviceid: "windturbine",
+    parentCode: "",
+    deviceId: "windturbine",
     name: "",
     enname: "",
     description: "",
-    orderno: "",
+    orderno: 0,
     enabled: true,
   },
   options: [
@@ -4298,12 +4301,12 @@ let state = reactive({
   ],
   desc: {
     code: "",
-    parentcode: "",
-    deviceid: "",
+    parentCode: "",
+    deviceId: "",
     name: "",
     enname: "",
     description: "",
-    orderno: "",
+    orderno: 0,
     enabled: true,
   },
   treeDelVal: "",
@@ -4372,7 +4375,7 @@ const delTreeBtn = async () => {
 //保存tree add
 const saveTreeAdd = async () => {
   const res = await treeAdd(state.treeAddFormData);
-  if (res.status == 20000) {
+  if (res.code == 200) {
     ElMessage.success(`操作成功!`);
     treeVisible.value = false;
     getData();
@@ -4384,8 +4387,8 @@ const saveTreeAdd = async () => {
 // getData
 const getData = async () => {
   const res = await tree();
-  // state.treedata = [res];
-  // state.cascaderdata = cascaderforEach(res);
+  state.treedata = [res];
+  state.cascaderdata = cascaderforEach(res);
 };
 
 // 递归解析基础数据
@@ -4407,9 +4410,8 @@ const cascaderforEach = (val) => {
   display: block;
 }
 .device-config {
-  height: 100%;
-  width: 100%;
-  padding: 10px 20px;
+  height: calc(100% - 120px);
+  padding: 20px;
   .btns {
     display: flex;
     justify-content: flex-end;
@@ -4432,12 +4434,17 @@ const cascaderforEach = (val) => {
       color: #ffffff;
     }
   }
+  .leftContent[data-type~="greenSty"] {
+    background: url("~@/assets/imgs/title_left_bg1.png") no-repeat;
+  }
+  .leftContent[data-type~="blueSty"] {
+    background: url("~@/assets/imgs/title_left_bg.png") no-repeat;
+  }
   .leftContent {
     width: 242px;
     height: 41px;
     display: flex;
     align-items: center;
-    background: url("~@/assets/imgs/title_left_bg1.png") no-repeat;
 
     span {
       font-size: 16px;
@@ -4473,6 +4480,7 @@ const cascaderforEach = (val) => {
     }
     .box-card {
       width: calc(80% - 20px);
+      height: 100%;
       background: #161f1e;
       padding: 10px;
     }
@@ -4510,3 +4518,16 @@ const cascaderforEach = (val) => {
   }
 }
 </style>
+<style lang="less">
+.trees {
+  .el-tree-node__content {
+    color: #c2e1ff;
+  }
+}
+.box-card {
+  width: calc(80% - 20px);
+  height: 100%;
+  background: #161f1e;
+  padding: 10px;
+}
+</style>

文件差異過大導致無法顯示
+ 765 - 694
src/views/IntegratedAlarm/reliability/partsTemperatureAnalyse/index2.vue