suerprisePlus
2024-07-16 6069325e1a37cf0462afda1627d4c660735dc57e
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: