gerson
2024-07-27 ed1170014712737986ddcb4d760907c4b1d5f686
src/components/chat/chatComponents/summaryCom/components/recordSet/RecordSetDialog.vue
@@ -8,7 +8,7 @@
</template>
<script setup lang="ts">
import { ref, watch } from 'vue';
import { nextTick, ref, watch } from 'vue';
import RecordSet from './RecordSet.vue';
import { queryScadaTimeValues } from '/@/api/ai/chat';
import { useCompRef } from '/@/utils/types';
@@ -17,7 +17,7 @@
import TimeRange from './components/TimeRange.vue';
import List from './components/List.vue';
const props = defineProps(['otype', 'oname']);
const props = defineProps(['otype', 'oname', 'indexName']);
const isShow = defineModel({
   type: Boolean,
@@ -51,14 +51,22 @@
const chartValues = ref(null);
const setChartData = async (timeRange: string[]) => {
   const res = await queryScadaTimeValues({
      otype: props.otype,
      oname: props.oname,
      // 设备类型
      ptype: props.otype,
      // 设备名称
      pname: props.oname,
      otype: props.indexName,
      start_time: timeRange[0],
      end_time: timeRange[1],
      step_time: stepTime.value,
   });
   chartValues.value = res.values;
   recordSetRef.value.drawChart();
   chartValues.value.chart = 'single_line';
   nextTick(() => {
      setTimeout(() => {
         recordSetRef.value.drawChart();
      }, 0);
   });
};
watch(