Browse Source

样本库修改

chenminghua 3 years ago
parent
commit
35c068a7d7

+ 5 - 1
src/views/faultManual/index.vue

@@ -85,18 +85,21 @@ export default {
           {
             name: "故障分类",
             field: "widget",
+            width: '200px',
             is_num: false,
             is_light: false,
           },
           {
             name: "故障名称",
             field: "name",
+            width: '350px',
             is_num: false,
             is_light: false,
           },
           {
             name: "故障原因",
             field: "cause",
+            width: '450px',
             is_num: false,
             is_light: false,
           },
@@ -109,6 +112,7 @@ export default {
           {
             name: "操作",
             field: "",
+            width: '200px',
             is_num: false,
             is_light: false,
             template() {
@@ -154,7 +158,7 @@ export default {
           },
           success(res) {
             that.WidgetArray = res.data;
-            that.WidgetType = res?.data[0]?.widget;
+            that.WidgetType = res?.data[0]?.code;
             that.getTableData();
           },
         });

+ 15 - 15
src/views/layout/Menu.vue

@@ -993,14 +993,14 @@ export default {
                   path: "/others/fault",
                 },
                 {
-                  text: "性能下降样本库",
+                  text: "预警分析样本库",
                   icon: "svg-matrix",
-                  path: "/others/performance",
+                  path: "/others/warning",
                 },
                 {
-                  text: "预警分析样本库",
+                  text: "性能下降样本库",
                   icon: "svg-matrix",
-                  path: "/others/warning",
+                  path: "/others/performance",
                 },
                 {
                   text: "性能预警综合分析",
@@ -1013,7 +1013,17 @@ export default {
                 //   path: "/others/powerline/analysis",
                 // },
                 {
-                  text: "知识库",
+                  text: "风机检修规则",
+                  icon: "svg-matrix",
+                  path: "/others/overhaulRule",
+                },
+                {
+                  text: "故障检修手册",
+                  icon: "svg-matrix",
+                  path: "/others/faultManual",
+                },
+                {
+                  text: "故障维修记录",
                   icon: "svg-matrix",
                   path: "/others/knowledgeBase",
                 },
@@ -1027,16 +1037,6 @@ export default {
                 //   icon: "svg-matrix",
                 //   path: "/others/market",
                 // }
-                {
-                  text: "风机检修规则",
-                  icon: "svg-matrix",
-                  path: "/others/overhaulRule",
-                },
-                {
-                  text: "故障手册",
-                  icon: "svg-matrix",
-                  path: "/others/faultManual",
-                },
               ],
             },
           ],

+ 1 - 3
src/views/powerCurve/index.vue

@@ -91,9 +91,7 @@ export default {
       wtArray: [],
       wpId: "",
       wtId: "",
-      recorddate: "2021-09" || new Date(new Date().getTime() - 3600 * 1000 * 24).formatDate(
-        "yyyy-MM"
-      ),
+      recorddate: new Date(new Date().getTime() - 3600 * 1000 * 24).formatDate("yyyy-MM"),
       chartLineData: {
         xTitle: "风速",
         yTitle: "功率",

+ 14 - 15
src/views/sampleDatabase/analysis/index.vue

@@ -301,21 +301,20 @@ export default {
         });
         
         await that.API.requestData({
-        method: "GET",
-        baseURL: "http://192.168.1.18:9002/",
-        // baseURL: "http://192.168.10.4:9002/",
-        subUrl: "case/performance/line",
-        data: {
-          id: val.id,
-          interval: 30,
-        },
-        success(res) {
-          if (res.code == 200) {
-            that.scatterLineData = res.data;
-            BASE.closeLoading();
-          }
-        },
-      });
+          method: "GET",
+          baseURL: "http://192.168.1.18:9002/",
+          subUrl: "case/performance/line",
+          data: {
+            id: val.id,
+            interval: 30,
+          },
+          success(res) {
+            if (res.code == 200) {
+              that.scatterLineData = res.data;
+              BASE.closeLoading();
+            }
+          },
+        });
       }
     },
   },

+ 33 - 16
src/views/sampleDatabase/knowledgeBase/index.vue

@@ -3,23 +3,29 @@
     <div class="query mg-b-8">
       <div class="query-items">
         <div class="query-item">
-          <div class="lable">知识库:</div>
+          <div class="lable">故障类型:</div>
           <div class="search-input">
             <el-select
-              v-model="knowledge"
+              v-model="faultmodel"
+              multiple
               clearable
+              collapse-tags
               placeholder="请选择"
               popper-class="select"
+              @change="getTableData"
             >
               <el-option
-                v-for="item in knowledgeList"
-                :key="item.value"
-                :value="item.value"
-                :label="item.label"
+                v-for="item in faultList"
+                :key="item.code"
+                :value="item.code"
+                :label="item.widget"
               />
             </el-select>
           </div>
         </div>
+        <div class="query-actions">
+          <button class="btn green" @click="getTableData">搜索</button>
+      </div>
       </div>
     </div>
     <el-row :type="'flex'" class="content">
@@ -91,28 +97,39 @@ export default {
   data() {
     return {
       tableData: [],
-      knowledge: '故障维修记录库',
-      knowledgeList: [
-        {
-          label: "故障维修记录库",
-          value: "0",
-        },
-      ],
+      faultmodel: [],
+      faultList:[],
     };
   },
   components: {},
   created() {
-    this.getData();
+    this.getFaultType();
   },
   methods: {
-    getData() {
+    getFaultType(){
+      let that = this;
+      this.API.requestData({
+        method: "GET",
+        subUrl: "http://192.168.1.18:9002/know/fault/fix/widget",
+        success(res) {
+          if (res) {
+            that.faultList = res?.data;
+            that.faultmodel.push(res?.data[1].code);
+            that.getTableData();
+          }
+        },
+      });
+    },
+    getTableData() {
       let that = this;
       this.API.requestData({
         method: "GET",
         subUrl: "http://192.168.1.18:9002/know/fault/fix/all",
+        data:{
+          faultCode: that.faultmodel
+        },
         success(res) {
           if (res) {
-              console.log(res);
             res.data.forEach((item, index) => {
               item.indexs = index +1;
             });