yxl
2025-02-13 92f7479c89d8573d954e5bf37a464c1bbef396eb
commit
已修改2个文件
70 ■■■■■ 文件已修改
src/assets/js/mapSetFunc.js 16 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/chartView/index.vue 54 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/assets/js/mapSetFunc.js
@@ -23,10 +23,15 @@
        this.creatQueryMeta(res);
        break;
      case "aroundPoi_2":
        this.addWfsLayer(res);
        // this.addWfsLayer(res);
        this.addTetrahedron(res);
        break;
      case "getParam":
        this.addTetrahedron(res);
        break;
      case "getTAIWAN":
        this.addWfsLayer(res);
        // this.addTetrahedron(res);
        break;
      case "attackentity":
        this.addPolyLine(res);
@@ -497,14 +502,14 @@
        z: 21
      };
    });
    positions.forEach((item,index) => {
    positions.forEach((item, index) => {
      const particle = earthCtrl.factory.createParticleEffect("flame", item, {
        translation: SmartEarth.Cesium.Cartesian3.fromElements(0, 0, 0), //平移
        emissionRate: 500,
        startScale: 15,
        endScale: 45,
      });
      if (index == positions.length/2) {
      if (index == positions.length / 2) {
        earthCtrl.camera.flyTo(item.x, item.y, 3000, 0, -90, 0, 2);
      }
      this.layerList.push({
@@ -556,6 +561,11 @@
        this.layerList.splice(i, 1);
        i--;
      }
      else if (obj.func == "getTAIWAN") {
        this.layerList[i].layer.destroy();
        this.layerList.splice(i, 1);
        i--;
      }
      else if (obj.func == "radarMaskScan") {
        this.layerList[i].layer.deleteObject();
        this.layerList.splice(i, 1);
src/views/chartView/index.vue
@@ -262,25 +262,25 @@
        session_id: this.uuid.toString(),
      };
      if (formData.message.indexOf("@map") > -1) {
        var obj = {
          ai: "",
          create_time: msgData.getDate1(),
          human: res,
          sessionid: this.uuid,
          update_time: "",
          userid: 0,
        };
        getAgentThistorySave(obj).then((response) => {
          if (response.code == 200) {
            obj.id = response.id;
            this.obj = obj;
          }
      var obj = {
        ai: "",
        create_time: msgData.getDate1(),
        human: res,
        sessionid: this.uuid,
        update_time: "",
        userid: 0,
      };
      getAgentThistorySave(obj).then((response) => {
        if (response.code == 200) {
          obj.id = response.id;
          this.obj = obj;
        }
        if (formData.message.indexOf("@map") > -1) {
          this.setAgentIntention(obj, formData);
        });
      } else {
        this.setRagAgentIntention(formData);
      }
        } else {
          this.setRagAgentIntention(obj, formData);
        }
      });
      // var obj = {
      //   ai: "",
@@ -397,7 +397,7 @@
      //   });
    },
    //普通对话问答
    async setRagAgentIntention(formData) {
    async setRagAgentIntention(obj, formData) {
      try {
        // 发送请求
        const params = new URLSearchParams(formData);
@@ -432,6 +432,8 @@
          const { done, value } = await reader.read();
          if (done) {
            result = false;
            this.setUpdateHistoryInFor(obj, sqlValue);
            console.log(sqlValue, "sqlValue-----");
            break;
          }
          let resText = textDecoder.decode(value);
@@ -443,7 +445,7 @@
          }
          if (resText.indexOf("</think>") > -1) {
            sendMsg = true;
            let position = resText.indexOf('</think>');
            let position = resText.indexOf("</think>");
            resText = resText.substring(position + "</think>".length);
          }
          if (sendMsg) {
@@ -637,6 +639,18 @@
          this.setUpdateHistoryInFor(obj, res.msg);
          this.refashMsg(roleMsg.list);
          break;
        case "getTAIWAN":
          mapSetFunc.init(res);
          console.log("res.data.targetinfo", res);
          const resInfo = res.data
            .map((item) => `| ${item.name} | ${item.targetinfo} |`)
            .join("\n");
          var attr = `| 名称 | 属性信息 |\n|------|------|\n` + resInfo;
          console.log("aaa", attr);
          var roleMsg = msgData.getMdData("markdown", attr);
          this.setUpdateHistoryInFor(obj, res.msg);
          this.refashMsg(roleMsg.list);
          break;
        case "attackentity":
          mapSetFunc.init(res);
          this.setUpdateHistoryInFor(obj, res.msg);