From 6069325e1a37cf0462afda1627d4c660735dc57e Mon Sep 17 00:00:00 2001
From: suerprisePlus <15810472099@163.com>
Date: 星期二, 16 七月 2024 09:51:56 +0800
Subject: [PATCH] 版本更新

---
 src/views/chartView/index.vue |  149 ++++++++++++++++++++++++++++++-------------------
 1 files changed, 91 insertions(+), 58 deletions(-)

diff --git a/src/views/chartView/index.vue b/src/views/chartView/index.vue
index 8567b56..3098418 100644
--- a/src/views/chartView/index.vue
+++ b/src/views/chartView/index.vue
@@ -219,57 +219,30 @@
     },
 
     async setMsgStart(res) {
-      // if (res.indexOf("鍐涗簨鐩爣") > -1 || res.indexOf("姘戝畢") > -1 || res.indexOf("缁忔祹鐩爣") > -1 || res.indexOf("娴峰啗闄嗘垬闃�") > -1 || res.indexOf("鍫や赴") > -1) {
-      //   this.$store.state.setScreenFlag = true;
-      //   this.list.splice(-1, 1);
-      //   this.loading = false;
-      //   layerJson.setQyeryData(res);
-      // } else
-      // if (res.indexOf("markDown") > -1) {
-      //   setTimeout(() => {
-      //     this.getMd();
-      //   }, 2000);
-
-      // }else
-      if (res.indexOf("scanWeapon") > -1) {
-        this.setQueryMapPlan("scanWeapon");
-      } else if (res.indexOf("weaponParameters") > -1) {
-        this.setQueryMapPlan("weaponParameters");
-      } else if (res.indexOf("searchTarget") > -1) {
-        this.setQueryMapPlan("searchTarget");
-      } else if (res.indexOf("attackUSAFCommandCenter") > -1) {
-        this.setQueryMapPlan("attackUSAFCommandCenter");
-      } else if (res.indexOf("USAFCommandCenterQuery") > -1) {
-        this.setQueryMapPlan("USAFCommandCenterQuery");
-      } else if (res.indexOf("simulationAttack") > -1) {
-        this.setQueryMapPlan("simulationAttack");
-      } else if (res.indexOf("defenceRangeTyphoonSystem") > -1) {
-        this.setQueryMapPlan("defenceRangeTyphoonSystem");
-      } else if (res.indexOf("flyToSubicBayArea") > -1) {
-        this.setQueryMapPlan("flyToSubicBayArea");
-      } else if (res.indexOf("displayWeaponSystem") > -1) {
-        this.setQueryMapPlan("displayWeaponSystem");
-      } else if (res.indexOf("weaponSystemParameters") > -1) {
-        this.setQueryMapPlan("weaponSystemParameters");
-      }
-      // else if(res.indexOf("鑻忔瘮鍏嬫咕") > -1){
-      //   this.$store.state.setScreenFlag = true;
-      //   this.list.splice(-1, 1);
-      //   this.loading = false;
-      //   this.$nextTick(() => {
-      //         setTimeout(() => {
-      //           mapInfo.setEntityQueryInput();
-      //         }, 1000);
-      //       });
-      // }
-      else if (res == "鐢熸垚鎴樺満鐜鎶ュ憡") {
+      if (res == "瀹氫綅鍒拌嫃姣斿厠婀�") {
+        this.setQueryMapPlan('flyToSubicBayArea', null)
+      } else if (res == "姝ゅ尯鍩熸湁鍝簺姝﹀櫒绯荤粺") {
+        this.setQueryMapPlan('displayWeaponSystem', null)
+      } else if (res == "鏌ヨ璇ュ尯鍩熷唴鐩爣鍙婂垎甯�") {
+        this.setQueryMapPlan('searchTarget', null)
+      }else if (res == "鍒嗘瀽鍫や赴绯荤粺鐨勬�ц兘鍜岄槻寰¤寖鍥�") {
+        this.setQueryMapPlan('defenceRangeTyphoonSystem', null)
+      }  else if (res == "瀹氫綅鍒扮編鍥界┖鍐涙寚鎸ヤ腑蹇�") {
+        this.setQueryMapPlan('USAFCommandCenterQuery', null)
+      } else if (res == "鐢熸垚鎴樺満鐜鎶ュ憡") {
         this.getUrlMd(config.reportMd, config.reportDocx)
+        // axios.get("/Data/Report.html").then(response=>{
+        //     var roleMsg = msgData.getHTMLData(response.data);
+        //     this.list[this.list.length - 1].list = roleMsg.list;
+        //     this.loading = false;
+        //   })
       }
-      else if (res == "涓夌淮瀹炴櫙") {
+      else if (res.indexOf("055") > -1) {
         layerJson.setTitleSetRest();
         this.setV1Fastgpt(res);
       } else {
         const data = await getAIMessage(res);
+
         if (data.status == 200) {
           if (data.name) {
             this.$store.state.setScreenFlag = true;
@@ -292,10 +265,40 @@
             this.getMsg("ai", data.content);
             this.list[this.list.length - 1].sourceValue = "2";
           } else {
-            this.getMsg("ai", "绋嶅悗鏈嶅姟銆傘�傘��");
+            if (data.length > 0) {
+              this.setSourceList(data)
+            } else {
+              this.getMsg("ai", "绋嶅悗鏈嶅姟銆傘�傘��");
+            }
+            // 
           }
         }
       }
+
+
+    },
+    setSourceList(res) {
+      const obj = res[0].quoteList
+      var roleMsg = [
+        {
+          type: "text",
+          val: "鏈煡璇㈠埌鐩稿叧淇℃伅"
+        }
+      ];
+
+      const length = this.list.length - 1;
+
+      if (obj.length > 0) {
+        this.$store.state.ragList.push({
+          quest: res,
+          index: length,
+          val: obj
+        });
+        roleMsg = msgData.getRagData(obj[0], true, res);
+      }
+
+      this.list[length].list = roleMsg;
+      this.loading = false;
     },
     getUrlMd(res, link) {
       axios.get(res).then(response => {
@@ -336,8 +339,15 @@
             height: 1371.1909347746105
           });
           var obj = this.getQueryGroupBy("姝﹀櫒", "weaponname");
-          var table_head = ["姝﹀櫒鍚嶇О", "鏁伴噺", "鍑虹幇鏃堕棿"]
-          this.getQueryEentityGroupBy(obj, "weaponname", response, table_head);
+          // var table_head = ["姝﹀櫒鍚嶇О", "鏁伴噺", "鍑虹幇鏃堕棿"]
+          // this.getQueryEentityGroupBy(obj, "weaponname", response, table_head);
+
+          // this.getUrlMd("/Data/姝﹀櫒绯荤粺缁嗗寲.md", null)
+          axios.get("/Data/姝﹀櫒绯荤粺.html").then(response => {
+            var roleMsg = msgData.getHTMLData(response.data);
+            this.list[this.list.length - 1].list = roleMsg.list;
+            this.loading = false;
+          })
           layerJson.setAddWfsJson();
           break;
         case "weaponSystemParameters":
@@ -373,7 +383,7 @@
               this.getUrlMd(url, null)
             } else {
               this.getMsg("ai", response.content);
-              
+
             }
           } else {
             this.getMsg("ai", response.content);
@@ -386,28 +396,40 @@
 
         case "searchTarget":
           var obj = this.getQueryGroupBy("寤虹瓚", "targettype");
-          var table_head = ["鐩爣绫诲瀷", "鏁伴噺"]
-          this.getQueryEentityGroupBy(obj, "targettype", response, table_head);
+
+          // 瀹炰綋鐩爣鍒楄〃_1.html
+          axios.get("/Data/瀹炰綋鐩爣鍒楄〃_1.html").then(response => {
+            var roleMsg = msgData.getHTMLData(response.data);
+            this.list[this.list.length - 1].list = roleMsg.list;
+            this.loading = false;
+          })
+          // axios.get("/Data/鎴樺満鐜.json").then(response=>{
+          //   var roleMsg =msgData.getJsonToHtml(response.data);
+          //   this.list[this.list.length - 1].list = roleMsg.list;
+          //   this.loading = false;
+          // })
+          // var table_head = ["鐩爣绫诲瀷", "鏁伴噺"]
+          // this.getQueryEentityGroupBy(obj, "targettype", response, table_head);
           var list = [
             {
               name: "鍐涗簨鐩爣",
-              color: "#409EFF"
+              color: "#73afff"
             },
             {
               name: "鏀挎不鐩爣",
-              color: "#FFFF00"
+              color: "#fffd72"
             },
             {
               name: "缁忔祹鐩爣",
-              color: "#FFA500"
+              color: "#fabc56"
             },
             {
               name: "绀句細鐩爣",
-              color: "#000000"
+              color: "#272424"
             },
             {
               name: "姘戝畢",
-              color: "#808080"
+              color: "#979696"
             }
           ];
           layerJson.setQueryByFiledList(list, 0);
@@ -422,8 +444,18 @@
         case "USAFCommandCenterQuery":
           var obj = "ejfl like '%绌哄啗鍩哄湴%'";
           layerJson.setQueryExtent2(obj, false);
-          this.getMsg("ai", "缇庡浗绌哄啗鎸囨尌涓績锛屽寘鍚�4搴у脊鑽簱锛�11搴ф补搴擄紝1搴ф満搴撱��");
-          this.list[this.list.length - 1].sourceValue = "1";
+          // this.getMsg("ai", "缇庡浗绌哄啗鎸囨尌涓績锛屽寘鍚�4搴у脊鑽簱锛�11搴ф补搴擄紝1搴ф満搴撱��");
+          // this.getUrlMd("/Data/缇庡浗绌哄啗鎸囨尌涓績.md", null)
+          // this.list[this.list.length - 1].sourceValue = "1";
+          // 
+
+          axios.get("/Data/缇庡浗绌哄啗鎸囨尌涓績.html").then(response => {
+            var roleMsg = msgData.getHTMLData(response.data);
+            this.list[this.list.length - 1].list = roleMsg.list;
+            this.loading = false;
+          })
+          // 
+          // 
           break;
         case "simulationAttack":
           var obj = "ejfl like '%绌哄啗鍩哄湴%'";
@@ -437,6 +469,7 @@
           layerJson.setQueryTF2(obj);
           this.getMsg("ai", "鐩稿叧淇℃伅宸插湪鍦板浘妯″潡灞曠ず");
           this.list[this.list.length - 1].sourceValue = "1";
+          this.getUrlMd("/Data/鍫や赴绯荤粺.md", null)
           break;
 
         default:

--
Gitblit v1.9.3