wujingjing
2024-11-12 545109f5b8fe240cb12ea613fc58aec1551b1b09
src/components/chat/chatComponents/summaryCom/components/recordSet/RecordSet.vue
@@ -107,7 +107,7 @@
   disabled:{
      type:Boolean,
      default:false,
   }
   },
}) as {
   data: any;
   summaryIndex: number;
@@ -448,20 +448,9 @@
   }
};
const handleQueryChange = async (val: any, item: RecordSetParamsItem) => {
   if (!val) return;
   const historyId = (props as any).originData.historyId;
const getFilterList = () => {
   const curAgentKey = props.data.agent_key;
   let res = null;
   // 改变原始值
   if (item.type === RecordSetParamsType.TimeRange) {
      item.origin.start_value = val[0];
      item.origin.end_value = val[1];
   } else {
      item.origin.step_value = val;
   }
   try {
      // 相同 agent_key 下所有 filter 请求参数
      const filterList = ((props as any).originData?.content?.origin?.summary ?? []).reduce((preVal, curVal) => {
         if (curVal.agent_key !== curAgentKey) return preVal;
@@ -497,6 +486,23 @@
         return preVal;
      }, []);
   return filterList;
};
const handleQueryChange = async (val: any, item: RecordSetParamsItem) => {
   if (!val) return;
   const historyId = (props as any).originData.historyId;
   let res = null;
   // 改变原始值
   if (item.type === RecordSetParamsType.TimeRange) {
      item.origin.start_value = val[0];
      item.origin.end_value = val[1];
   } else {
      item.origin.step_value = val;
   }
   const filterList = getFilterList();
   try {
      const params = {
         history_id: historyId,
         // 查询前后 agent_key 不会变