feat: 语音指标
This commit is contained in:
parent
7ec3797737
commit
7afbe084aa
@ -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
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@ -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;
|
||||
|
||||
|
||||
@ -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;
|
||||
}
|
||||
|
||||
@ -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)
|
||||
|
||||
@ -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';
|
||||
|
||||
@ -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 = "";
|
||||
|
||||
Loading…
Reference in New Issue
Block a user