feat: 语音指标

This commit is contained in:
zhanghao 2026-02-02 11:30:30 +08:00
parent 7ec3797737
commit 7afbe084aa
6 changed files with 11 additions and 32 deletions

View File

@ -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
}
});
}

View File

@ -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;

View File

@ -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;
}

View File

@ -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)

View File

@ -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';

View File

@ -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 = "";