yangyin
2024-11-08 f41e52e3debf30558d556dc0451776f5422fb9b8
src/components/chat/chatComponents/summaryCom/components/recordSet/RecordSet.vue
@@ -3,7 +3,7 @@
   <div class="w-full flex-column">
      <div class="flex mb-4 flex-wrap flex-0">
         <!-- TimeRange v-model 跟 @change 中的值会不一样,以@change 中为准 -->
         <template v-if="visibleParams && visibleParams.length > 0 && showFilter">
         <template v-if="visibleParams && visibleParams.length > 0 && showFilter ">
            <component
               class="flex-0 m-2"
               v-model="visibleParams[index].value"
@@ -14,7 +14,7 @@
               :data="item"
               :originData="originData"
               @change="(val) => handleQueryChange(val, item)"
               :disabled="chartLoading"
               :disabled="chartLoading ||disabled"
            ></component>
         </template>
         <slot> </slot>
@@ -104,6 +104,10 @@
      type: Boolean,
      default: true,
   },
   disabled:{
      type:Boolean,
      default:false,
   }
}) as {
   data: any;
   summaryIndex: number;
@@ -112,15 +116,6 @@
const tableLimitHeight = props.chartHeight == undefined ? undefined : document.body.clientHeight * 0.7;
const checkIsDayTime = () => {
   if (!props.showFilter) return false;
   const stepFilter = visibleParams.value.find((item) => item.type === RecordSetParamsType.Step);
   if (!stepFilter.origin.step_value) return false;
   return IS_DAY_LIST.includes(stepFilter.origin.step_value);
};
// 跨度是否是日期形式
const isDayTime = checkIsDayTime();
const chartLoading = ref(false);
const stepOptions = [
@@ -190,6 +185,16 @@
};
const visibleParams = ref(getVisibleParams(props.data));
const checkIsDayTime = () => {
   if (!props.showFilter) return false;
   const stepFilter = visibleParams.value.find((item) => item.type === RecordSetParamsType.Step);
   if (!stepFilter.origin.step_value) return false;
   return IS_DAY_LIST.includes(stepFilter.origin.step_value);
};
// 跨度是否是日期形式
// const isDayTime = checkIsDayTime();
let groupedValues = null;
let timeIndex = undefined;
let valueIndex = undefined;