| | |
| | | <template #header> |
| | | <el-form ref="queryFormRef" :inline="true" :model="queryParams"> |
| | | <el-form-item label="名称" prop="title"> |
| | | <el-input v-model="queryParams.title" style="width: 226.4px" placeholder="指标名称" clearable /> |
| | | <el-input v-model="queryParams.title" style="width: 226.4px" placeholder="指标名称" clearable @input="selectTitleChange" /> |
| | | </el-form-item> |
| | | <el-form-item label="主题域" prop="metrics_group"> |
| | | <el-tree-select |
| | |
| | | v-model="queryParams.metrics_group" |
| | | node-key="group_id" |
| | | clearable |
| | | defaultExpandAll |
| | | :data="listTreeData" |
| | | placeholder="请选择主题域" |
| | | check-strictly |
| | |
| | | </el-tree-select> |
| | | </el-form-item> |
| | | <el-form-item label="重要性" prop="metrics_important"> |
| | | <el-select v-model="queryParams.metrics_important" style="width: 186.4px" clearable> |
| | | <el-select v-model="queryParams.metrics_important" style="width: 186.4px" clearable @change="selectImportantChange"> |
| | | <el-option |
| | | v-for="item in Object.keys(eMetrics_Ops)" |
| | | :key="item" |
| | |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button type="primary" icon="ele-Search" @click="handleQueryTable"> 查询 </el-button> |
| | | <el-button icon="ele-Refresh" @click="resetQuery">重置 </el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | |
| | | <el-table-column label="操作" width="80" fixed="right" show-overflow-tooltip> |
| | | <template #default="scope"> |
| | | <div class="space-x-3 items-center flex"> |
| | | <el-tooltip |
| | | <!-- <el-tooltip |
| | | effect="dark" |
| | | :content="scope.row.published === SupervisorPublished.Y ? '取消发布' : '发布'" |
| | | placement="top" |
| | |
| | | ) |
| | | " |
| | | ></i> |
| | | </el-tooltip> |
| | | </el-tooltip> --> |
| | | <el-tooltip effect="dark" content="对话测试" placement="top"> |
| | | <i class="ywifont ywicon-ceshi !text-[20px] text-blue-400 cursor-pointer" @click="openChatTest(scope.row)"></i> |
| | | </el-tooltip> |
| | |
| | | <script setup lang="ts"> |
| | | import { useDraggable } from '@vueuse/core'; |
| | | import axios, { CancelTokenSource } from 'axios'; |
| | | import { debounce } from 'lodash'; |
| | | import { computed, nextTick, onMounted, ref } from 'vue'; |
| | | import { useRouter } from 'vue-router'; |
| | | import { SupervisorPublished } from '../../lowCode/sqlAmis/types'; |
| | |
| | | import { useQueryTable } from '/@/hooks/useQueryTable'; |
| | | import { useCompRef } from '/@/utils/types'; |
| | | import { convertListToTree } from '/@/utils/util'; |
| | | import { eMetrics_Ops, eMetrics_Ops_Color } from '/@/views/types/metrics'; |
| | | import { OptClassificationMap, classificationEnum, eMetrics_Ops, eMetrics_Ops_Color } from '/@/views/types/metrics'; |
| | | const router = useRouter(); |
| | | |
| | | //#region ====================== 表格数据,table init ====================== |
| | | const tableLoading = ref(false); |
| | | const tableData = ref([]); |
| | |
| | | themeDomainData.value = res.groups || []; |
| | | }; |
| | | const listTreeData = computed(() => { |
| | | return convertListToTree(themeDomainData.value, { |
| | | const byParentData = convertListToTree(themeDomainData.value, { |
| | | ID: 'group_id', |
| | | Children: 'Children', |
| | | ParentID: 'p_group_id', |
| | | }); |
| | | const result = []; |
| | | byParentData.forEach((item) => { |
| | | if ( |
| | | item.group_type != OptClassificationMap[classificationEnum.Office] && |
| | | item.group_type != OptClassificationMap[classificationEnum.Knowledge] |
| | | ) { |
| | | result.push(item); |
| | | } |
| | | }); |
| | | return result; |
| | | }); |
| | | const debounceQuery = debounce(() => handleQueryTable(), 500); |
| | | //按指标名称查询 |
| | | const selectTitleChange = (val) => { |
| | | debounceQuery(); |
| | | }; |
| | | //按主题域查询 |
| | | const selectMetricsChange = (val) => { |
| | | queryParams.value.metrics_group = val; |
| | | handleQueryTable(); |
| | | }; |
| | | //按重要性查询 |
| | | const selectImportantChange = (val) => { |
| | | queryParams.value.metrics_important = val; |
| | | handleQueryTable(); |
| | | }; |
| | | |
| | | const queryParams = ref({ |
| | | title: '', |
| | | metrics_group: '', |