lining 3 年之前
父节点
当前提交
b08c5a6a77

+ 5 - 4
src/views/MalfunctionWarning/MalfunctionWarning.vue

@@ -628,16 +628,16 @@ export default {
       let that = this;
       that.API.requestData({
         method: "GET",
-        subUrl: "http://192.168.1.18:9002/case/fault/list",
+        subUrl: "http://192.168.10.7:9002/case/fault/list",
         data: {
           ids: param.join(","),
         },
         success(res) {
           if (res) {
             res.data.forEach((item) => {
-              that.allData.filter((val) => val.idString === item.faultid)[0].labels =
+              that.allData.filter((val) => val.idString === item.faultIds)[0].labels =
                 item.faultcode;
-              that.allData.filter((items) => items.idString === item.faultid)[0].ids =
+              that.allData.filter((items) => items.idString === item.faultIds)[0].ids =
                 item.idString;
             });
           }
@@ -919,6 +919,7 @@ export default {
             model: item.modelId,
             stationen: item.stationId,
             tag: 0,
+            category: 1,
           };
           if (item.ids) {
             obj.id = item.ids;
@@ -929,7 +930,7 @@ export default {
       if (params.length > 0) {
         axios({
           method: "post",
-          url: "http://192.168.1.18:9002/case/fault/insert",
+          url: "http://192.168.10.7:9002/case/fault/insert",
           data: params,
           header: {
             "Content-Type": "application/json",

+ 4 - 4
src/views/MalfunctionWarning/components/superviseDataClassify.vue

@@ -350,11 +350,11 @@ export default {
         datas.tag = item.faultcode
         dataInfos.push(datas);
       });
-      this.chooseAlgorithm.parameters.forEach(item =>{
-          dataParams.push(item.value)
-      })
+      // this.chooseAlgorithm.parameters.forEach(item =>{
+      //     dataParams.push(item.value)
+      // })
       let algorithm = {
-        name: this.chooseAlgorithm.name,
+        name: this.chooseAlgorithm,
         parameter: JSON.stringify(dataParams)
       }
       params.algorithm = algorithm

+ 33 - 27
src/views/MalfunctionWarning/supervised.vue

@@ -120,34 +120,40 @@
       </el-col>
       <el-col :span="8" class="pd-l-8">
         <panel :title="'演示过程图'" :showLine="false">
-          <div class="results" v-if="showTraining">
-            <div class="progressTitle">
-              <div v-if="!trainingFlag">数据获取中...</div>
-              <div v-if="trainingFlag && width < 100">训练中...</div>
-              <div v-if="trainingFlag && width === 100">训练完成</div>
-              <div class="progressNum">
-                当前进度:{{ width >= 0 ? width : 0 }}%
+          <div class="bodys">
+            <div class="results" v-if="showTraining">
+              <div class="progressTitle">
+                <div v-if="!trainingFlag">数据获取中...</div>
+                <div v-if="trainingFlag && width < 100">训练中...</div>
+                <div v-if="trainingFlag && width === 100">训练完成</div>
+                <div class="progressNum">
+                  当前进度:{{ width >= 0 ? width : 0 }}%
+                </div>
+              </div>
+              <div class="box">
+                <div class="progress" :style="`width:${width}%;`"></div>
+                <div class="line"></div>
+                <div class="unprogress" :style="`width:${100 - width}%;`"></div>
               </div>
             </div>
-            <div class="box">
-              <div class="progress" :style="`width:${width}%;`"></div>
-              <div class="line"></div>
-              <div class="unprogress" :style="`width:${100 - width}%;`"></div>
-            </div>
+            <LineChart
+              v-if="lossList"
+              id="loss"
+              :dataList="lossList"
+            ></LineChart>
+            <LineChart
+              v-if="accuracyList"
+              id="accuracy"
+              :dataList="accuracyList"
+            ></LineChart>
+            <BarChart
+              v-if="barList.length > 0"
+              id="bar"
+              :baseLine="ceshiList?.BaseLine"
+              @click="showDetials"
+              :barList="barList"
+            ></BarChart>
           </div>
-          <LineChart v-if="lossList" id="loss" :dataList="lossList"></LineChart>
-          <LineChart
-            v-if="accuracyList"
-            id="accuracy"
-            :dataList="accuracyList"
-          ></LineChart>
-          <BarChart
-            v-if="barList.length > 0"
-            id="bar"
-            :baseLine="ceshiList?.BaseLine"
-            @click="showDetials"
-            :barList="barList"
-          ></BarChart>
         </panel>
       </el-col>
     </el-row>
@@ -396,8 +402,8 @@ export default {
                 (val) => val.code === item.faultcode
               );
               item.stationcn = that.options.filter(
-                  (items) => items.value === item.stationen
-                )[0]?.label;
+                (items) => items.value === item.stationen
+              )[0]?.label;
               if (array.length > 0) {
                 array[0].children.push(item);
               } else {