Commit 5891dc93 authored by Jeff nan's avatar Jeff nan

feat

parent 103bd964
...@@ -187,7 +187,7 @@ ...@@ -187,7 +187,7 @@
</div> </div>
<div> <div>
<el-alert type="info" :closable="false" show-icon title="点击以下链接可下载或预览对应资源"></el-alert> <el-alert type="info" :closable="false" show-icon title="点击以下链接可下载或预览对应资源"></el-alert>
<el-table :data="Object.keys(vocalResult).map(k => ({ key: k, value: vocalResult[k] }))" style="width: 100%; margin-top: 12px;" size="mini" :border="true"> <el-table :data="getVocalResultRows()" style="width: 100%; margin-top: 12px;" size="mini" :border="true">
<el-table-column label="生成资源" width="260"> <el-table-column label="生成资源" width="260">
<template slot-scope="scope"> <template slot-scope="scope">
{{ vocalResourceLabel(scope.row.key) }} {{ vocalResourceLabel(scope.row.key) }}
......
...@@ -213,11 +213,18 @@ function initVueApp(savedData) { ...@@ -213,11 +213,18 @@ function initVueApp(savedData) {
}, },
// 字幕结果表行(隐藏用量相关字段) // 字幕结果表行(隐藏用量相关字段)
getSubtitlesResultRows() { getSubtitlesResultRows() {
return this.getResultRows(this.subtitlesResult);
},
// 去人声结果表行(同样隐藏用量相关字段)
getVocalResultRows() {
return this.getResultRows(this.vocalResult);
},
getResultRows(result) {
const hideKeys = { ai_amount: 1, ai_balance: 1, token_usage: 1 }; const hideKeys = { ai_amount: 1, ai_balance: 1, token_usage: 1 };
const result = this.subtitlesResult || {}; const data = result || {};
return Object.keys(result) return Object.keys(data)
.filter((k) => !hideKeys[k]) .filter((k) => !hideKeys[k])
.map((k) => ({ key: k, value: result[k] })); .map((k) => ({ key: k, value: data[k] }));
}, },
async getAuthKey() { async getAuthKey() {
const resp = await callServerMethod('getAuthKey'); const resp = await callServerMethod('getAuthKey');
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment