From 7afbe084aad6c7931d6631b57749e652be06c4cd Mon Sep 17 00:00:00 2001 From: zhanghao <774378400@qq.com> Date: Mon, 2 Feb 2026 11:30:30 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E8=AF=AD=E9=9F=B3=E6=8C=87=E6=A0=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/evaluate/indicator.js | 8 ++++-- .../il/speech/components/ScoreTable.vue | 2 +- src/views/evaluate/il/speech/index.vue | 2 +- src/views/evaluate/il/speech/indicator.vue | 2 +- .../evaluate/il/speech/secondaryIndicator.vue | 2 +- src/views/evaluate/il/touch/indicator.vue | 27 +------------------ 6 files changed, 11 insertions(+), 32 deletions(-) diff --git a/src/api/evaluate/indicator.js b/src/api/evaluate/indicator.js index 44a7ba5..d2e9e64 100644 --- a/src/api/evaluate/indicator.js +++ b/src/api/evaluate/indicator.js @@ -1,10 +1,14 @@ import request from "@/utils/request"; // 查询根据层级指标库 -export function getIndicatorByParentId(parentId) { +export function getIndicatorByParentId(parentId, type) { return request({ - url: `/evaluate/indicator/getIndicatorByParentId/${parentId}`, + url: '/evaluate/indicator/getIndicatorByParentId', method: "get", + params: { + parentId, + type + } }); } diff --git a/src/views/evaluate/il/speech/components/ScoreTable.vue b/src/views/evaluate/il/speech/components/ScoreTable.vue index 9fbd5a7..9ae3ae3 100644 --- a/src/views/evaluate/il/speech/components/ScoreTable.vue +++ b/src/views/evaluate/il/speech/components/ScoreTable.vue @@ -182,7 +182,7 @@ const handleDelete = (row, index) => { const getIndicatorByParentIdData = async (parentId) => { try { - const res = await getIndicatorByParentId(parentId); + const res = await getIndicatorByParentId(parentId, 0); if (res.code === 200) { tableData.value = res.data; diff --git a/src/views/evaluate/il/speech/index.vue b/src/views/evaluate/il/speech/index.vue index 2031286..1d120b2 100644 --- a/src/views/evaluate/il/speech/index.vue +++ b/src/views/evaluate/il/speech/index.vue @@ -111,7 +111,7 @@ const submitMetricForm = () => { const getIndicatorByParentIdData = async (parentId) => { try { - const res = await getIndicatorByParentId(parentId); + const res = await getIndicatorByParentId(parentId, 0); if (res.code === 200) { listData.value = res.data; } diff --git a/src/views/evaluate/il/speech/indicator.vue b/src/views/evaluate/il/speech/indicator.vue index 5e1e853..98248b1 100644 --- a/src/views/evaluate/il/speech/indicator.vue +++ b/src/views/evaluate/il/speech/indicator.vue @@ -106,7 +106,7 @@ const handleRefresh = () => { const getIndicatorByParentIdData = async (parentId) => { try { - const res = await getIndicatorByParentId(parentId); + const res = await getIndicatorByParentId(parentId, 0); if (res.code === 200) { metricCategories.value = res.data; emit('activeMetricCategory', res.data[0]?.id || null) diff --git a/src/views/evaluate/il/speech/secondaryIndicator.vue b/src/views/evaluate/il/speech/secondaryIndicator.vue index 2033c64..b1d7b08 100644 --- a/src/views/evaluate/il/speech/secondaryIndicator.vue +++ b/src/views/evaluate/il/speech/secondaryIndicator.vue @@ -243,7 +243,7 @@ const handleEditTab = (event, item) => { const getIndicatorByParentIdData = async (parentId) => { try { - const res = await getIndicatorByParentId(parentId); + const res = await getIndicatorByParentId(parentId, 0); if (res.code === 200) { tabList.value = res.data; activeTab.value = tabList.value[0]?.id || '1'; diff --git a/src/views/evaluate/il/touch/indicator.vue b/src/views/evaluate/il/touch/indicator.vue index 76bca7f..eafec84 100644 --- a/src/views/evaluate/il/touch/indicator.vue +++ b/src/views/evaluate/il/touch/indicator.vue @@ -38,32 +38,7 @@ import MetricCategory from "./components/MetricCategory.vue"; import MetricForm from "./components/MetricForm.vue"; // 模拟数据 -const metricCategories = ref([ - { - id: 1, - name: "语音唤醒", - weight: 30, - subMetrics: [ - { - id: 11, - name: "指挥名称:无噪声唤醒", - weight: 30, - }, - ], - }, - { - id: 2, - name: "语音识别", - weight: 20, - subMetrics: [], - }, - { - id: 3, - name: "智能交互", - weight: 20, - subMetrics: [], - } -]); +const metricCategories = ref([]); const handleAddMetric = () => { newMetric.name = "";