Merge branch 'test' of http://47.103.154.90:83/r/WI/Web.V1.0 into test
| | |
| | | <!-- TimeRange v-model è· @change ä¸çå¼ä¼ä¸ä¸æ ·ï¼ä»¥@change ä¸ä¸ºå --> |
| | | <template v-if="visibleParams && visibleParams.length > 0"> |
| | | <component |
| | | class="flex-0 m-1" |
| | | class="flex-0 m-2" |
| | | v-model="paramsValueList[index].value" |
| | | v-for="(item, index) in visibleParams as any" |
| | | :key="item.id" |
| | |
| | | ></component> |
| | | </template> |
| | | <slot> </slot> |
| | | <YRange @input="yRangeInput" /> |
| | | <el-tooltip |
| | | v-if="originChartType === ChartTypeEnum.Score" |
| | | :content="`${Object.keys(scoreMap) |
| | | .map((key) => `${key} 表示${scoreMap[key]}`) |
| | | .join(', ')}`" |
| | | placement="top-start" |
| | | > |
| | | <SvgIcon name="fa fa-question-circle-o" :size="15" class="ml-1 cursor-help flex-center" color="#909399" /> |
| | | </el-tooltip> |
| | | |
| | | <YRange v-model="yRange" @input="yRangeInput" /> |
| | | <el-checkbox class="m-1" v-model="isMultiCompare" label="夿¥å¯¹æ¯" @change="multiCompareChange"></el-checkbox> |
| | | <el-checkbox class="m-2" v-model="isMultiCompare" label="夿¥å¯¹æ¯" @change="multiCompareChange"></el-checkbox> |
| | | |
| | | <DisplayMode class="ml-auto" v-model="showMode" @change="displayModeChange" /> |
| | | </div> |
| | |
| | | import { deepClone } from '/@/utils/other'; |
| | | import { debounce } from '/@/utils/util'; |
| | | const chartRef = ref<HTMLDivElement>(null); |
| | | const yRange = ref({ |
| | | min: null as number, |
| | | max: null as number, |
| | | }); |
| | | |
| | | const showMode = ref(DisplayModeType.Chart); |
| | | // const props = defineProps({ |
| | |
| | | handleData(); |
| | | setNewOption(); |
| | | }; |
| | | const { chartContainerResize, chartInstance, initChart } = useDrawChatChart({ chartRef, drawChart }); |
| | | const { chartContainerResize, chartInstance } = useDrawChatChart({ chartRef, drawChart }); |
| | | |
| | | // æ´æ¢å表 |
| | | const changeMap = new Map<string, any>(null); |
| | |
| | | } |
| | | }; |
| | | |
| | | let realRange = { |
| | | min: null, |
| | | max: null, |
| | | }; |
| | | |
| | | const getSingleDayOption = (day = COMMON_DAY) => |
| | | ({ |
| | | tooltip: { |
| | |
| | | } as echarts.EChartsOption); |
| | | //#region ====================== 设置Yèå´ ====================== |
| | | const debounceSetYRange = debounce((val) => { |
| | | (realRange.min = val.min), (realRange.max = val.max); |
| | | chartInstance.value.setOption({ |
| | | yAxis: { |
| | | min: val.min, |
| | | max: val.max, |
| | | }, |
| | | yAxis: realRange, |
| | | }); |
| | | |
| | | currentSeries.value = currentSeries.value.concat([]); |
| | |
| | | |
| | | const tableData = computed(() => { |
| | | if (!currentSeries.value) return []; |
| | | // const min = yRange.value.min == null ? -Infinity : yRange.value.min; |
| | | // const max = yRange.value.max == null ? Infinity : yRange.value.max; |
| | | const min = realRange.min == null ? -Infinity : realRange.min; |
| | | const max = realRange.max == null ? Infinity : realRange.max; |
| | | const timeDataMap = currentSeries.value.reduce((preVal, curVal, index) => { |
| | | for (const item of curVal.data) { |
| | | const [time, value] = item; |
| | | |
| | | // if (value < min || value > max) { |
| | | // continue; |
| | | // } |
| | | let [time, value] = item; |
| | | // 夿¥å¯¹æ¯ï¼åªæ¾ç¤ºæ¶åç§ |
| | | if (isMultiCompare.value) { |
| | | time = time.slice(11); |
| | | } |
| | | if (value < min || value > max) { |
| | | continue; |
| | | } |
| | | if (!preVal[time]) { |
| | | preVal[time] = []; |
| | | } |
| | | |
| | | // score ç±»åï¼value å¼ï¼éè¦æ å°æå¦ä¸ä¸ªå¼ |
| | | if (originChartType === ChartTypeEnum.Score) { |
| | | value = scoreMap[value]; |
| | | } |
| | | preVal[time][index] = value; |
| | | } |
| | |
| | | watch( |
| | | () => currentSeries.value, |
| | | (val) => { |
| | | if (!tableIsShow.value) return; |
| | | tableKey.value = _.random(0, 100000) + ''; |
| | | } |
| | | ); |
| | |
| | | ...item, |
| | | width: 0, |
| | | label: item.title, |
| | | sortable: item.type === 'time', |
| | | // sortable: item.type === 'time', |
| | | prop: index + '', |
| | | isShow: isShow, |
| | | } as TableCol; |
| | |
| | | @dlgClosed="closeDialog" |
| | | :closeOnClickModal="true" |
| | | > |
| | | <el-form :model="item" ref="dialogFormRef" :rules="dialogFormRules" label-width="76"> |
| | | <el-form :model="item" ref="dialogFormRef" :rules="dialogFormRules" :label-width="labelWidth"> |
| | | <el-form-item :label="colList[key]?.label" :prop="key" v-for="key in Object.keys(colList)"> |
| | | <el-input readonly :modelValue="item[key]"></el-input> |
| | | </el-form-item> |
| | |
| | | |
| | | import type { FormInstance, FormRules } from 'element-plus'; |
| | | |
| | | import { computed, ref } from 'vue'; |
| | | import { computed, onMounted, ref } from 'vue'; |
| | | import { getTextWidth } from '/@/utils/util'; |
| | | |
| | | const props = defineProps(['item', 'colList']); |
| | | const props = defineProps(['item', 'colList','title']); |
| | | //#region ====================== å¢å ãä¿®æ¹è®°å½æä½, dialog init====================== |
| | | const dialogTitle = computed(() => { |
| | | return `è®°å½è¯¦æ
`; |
| | | return props.title ?? `è®°å½è¯¦æ
`; |
| | | }); |
| | | |
| | | const dialogIsShow = defineModel({ |
| | |
| | | const closeDialog = () => { |
| | | dialogIsShow.value = false; |
| | | }; |
| | | |
| | | const measureWidthOffset = 12; |
| | | const labelWidth = ref(undefined); |
| | | const getMaxLabelWidth = () =>{ |
| | | |
| | | let maxLen = 0; |
| | | let maxStr = ''; |
| | | Object.values(props.colList ).map(item=>{ |
| | | const label = (item as any).label as string; |
| | | |
| | | const currentLen = label.gblen(); |
| | | if(currentLen> maxLen){ |
| | | maxLen = currentLen |
| | | maxStr = label; |
| | | } |
| | | }) |
| | | |
| | | |
| | | const maxWidth = getTextWidth(maxStr,{ |
| | | size: '14px', |
| | | })+measureWidthOffset; |
| | | labelWidth.value = maxWidth; |
| | | } |
| | | |
| | | onMounted(() => { |
| | | getMaxLabelWidth(); |
| | | }); |
| | | </script> |
| | | <style scoped lang="scss"></style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <ywDialog |
| | | v-model="dialogIsShow" |
| | | :showHeaderIcon="false" |
| | | :title="dialogTitle" |
| | | width="470" |
| | | :showFooter="false" |
| | | @dlgClosed="closeDialog" |
| | | :closeOnClickModal="true" |
| | | > |
| | | <el-form :model="item" ref="dialogFormRef" :rules="dialogFormRules" :label-width="labelWidth"> |
| | | <!-- <el-form-item :label="colList[key]?.label" :prop="key" v-for="key in Object.keys(colList)"> |
| | | <el-input readonly :modelValue="item[key]"></el-input> |
| | | </el-form-item> --> |
| | | </el-form> |
| | | </ywDialog> |
| | | </template> |
| | | |
| | | <script setup lang="ts"> |
| | | import ywDialog from '/@/components/dialog/yw-dialog.vue'; |
| | | |
| | | import type { FormInstance, FormRules } from 'element-plus'; |
| | | |
| | | import { computed, onMounted, ref } from 'vue'; |
| | | import { getTextWidth } from '/@/utils/util'; |
| | | |
| | | const props = defineProps(['item', 'colList','title']); |
| | | //#region ====================== å¢å ãä¿®æ¹è®°å½æä½, dialog init====================== |
| | | const dialogTitle = computed(() => { |
| | | return props.title ?? `è®°å½è¯¦æ
`; |
| | | }); |
| | | |
| | | const dialogIsShow = defineModel({ |
| | | type: Boolean, |
| | | }); |
| | | const dialogFormRef = ref<FormInstance>(null); |
| | | |
| | | const dialogFormRules = ref<FormRules>({ |
| | | // title: [{ required: true, message: '请è¾å
¥æ é¢', trigger: 'blur' }], |
| | | // prompt: [{ required: true, message: '请è¾å
¥æç¤ºè¯', trigger: 'blur' }], |
| | | }); |
| | | |
| | | //#endregion |
| | | |
| | | const closeDialog = () => { |
| | | dialogIsShow.value = false; |
| | | }; |
| | | |
| | | const measureWidthOffset = 12; |
| | | const labelWidth = ref(undefined); |
| | | const getMaxLabelWidth = () =>{ |
| | | |
| | | let maxLen = 0; |
| | | let maxStr = ''; |
| | | Object.values(props.colList ).map(item=>{ |
| | | const label = (item as any).label as string; |
| | | |
| | | const currentLen = label.gblen(); |
| | | if(currentLen> maxLen){ |
| | | maxLen = currentLen |
| | | maxStr = label; |
| | | } |
| | | }) |
| | | |
| | | |
| | | const maxWidth = getTextWidth(maxStr,{ |
| | | size: '14px', |
| | | })+measureWidthOffset; |
| | | labelWidth.value = maxWidth; |
| | | } |
| | | |
| | | onMounted(() => { |
| | | // getMaxLabelWidth(); |
| | | }); |
| | | </script> |
| | | <style scoped lang="scss"></style> |
| | |
| | | <img src="/static/images/wave/PlugIn.png" class="set-icon box-border" /> |
| | | </el-button> |
| | | </div> |
| | | <InfoDetail class="text-base" v-model="infoDetailIsShow" :item="detailMapRow" /> |
| | | |
| | | <div class="set-input"> |
| | | <!-- @input="inputText" --> |
| | | |
| | |
| | | > |
| | | <span class="text-sm text-gray-500 pr-1.5">{{ index + 1 }}</span> |
| | | <span> {{ item?.question }} </span> |
| | | <!-- <span class="text-blue-400 font-bold cursor-pointer hover:underline" @click.stop="tipMetricsClick">æµè¯æ¯</span> --> |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | import VoicePage from './voicePage/VoicePage.vue'; |
| | | import { querySimilarityHistory } from '/@/api/ai/chat'; |
| | | import { useClickOther } from '/@/hooks/useClickOther'; |
| | | import InfoDetail from './InfoDetail.vue'; |
| | | |
| | | import { onClickOutside } from '@vueuse/core' |
| | | import { onClickOutside } from '@vueuse/core'; |
| | | const emits = defineEmits(['sendClick']); |
| | | const props = defineProps(['isTalking', 'isHome']); |
| | | const voicePageIsShow = defineModel('voicePageIsShow', { |
| | |
| | | bottom: null, |
| | | }); |
| | | |
| | | onClickOutside(tipEleRef,()=>{ |
| | | triggerShow.value = true |
| | | }) |
| | | onClickOutside(tipEleRef, () => { |
| | | triggerShow.value = false; |
| | | }); |
| | | const inputText = (text) => { |
| | | nextTick(() => { |
| | | setTimeout(() => { |
| | |
| | | } |
| | | ); |
| | | }; |
| | | |
| | | |
| | | //#region ====================== é«äº®ææ ç¹å»====================== |
| | | const infoDetailIsShow = ref(false); |
| | | const detailMapRow = ref(null); |
| | | |
| | | const tipMetricsClick = (row) => { |
| | | detailMapRow.value = row; |
| | | infoDetailIsShow.value = true; |
| | | }; |
| | | //#endregion |
| | | </script> |
| | | <style scoped lang="scss"> |
| | | .set-waterTitle { |