2025-03-26 17:10:06 +08:00
|
|
|
|
<template>
|
|
|
|
|
|
<div class="welcome">
|
|
|
|
|
|
<HeaderBar />
|
|
|
|
|
|
|
2025-04-05 20:19:28 +08:00
|
|
|
|
<div class="operation-bar">
|
2025-04-11 15:43:45 +08:00
|
|
|
|
<h2 class="page-title">{{ modelTypeText }}</h2>
|
|
|
|
|
|
<div class="action-group">
|
|
|
|
|
|
<div class="search-group">
|
|
|
|
|
|
<el-input
|
|
|
|
|
|
placeholder="请输入模型名称查询"
|
|
|
|
|
|
v-model="search"
|
|
|
|
|
|
class="search-input"
|
|
|
|
|
|
clearable
|
|
|
|
|
|
@keyup.enter.native="handleSearch"
|
|
|
|
|
|
style="width: 240px"
|
|
|
|
|
|
/>
|
|
|
|
|
|
<el-button class="btn-search" @click="handleSearch">
|
|
|
|
|
|
搜索
|
|
|
|
|
|
</el-button>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
2025-04-05 20:19:28 +08:00
|
|
|
|
</div>
|
2025-03-31 14:28:29 +08:00
|
|
|
|
|
2025-03-26 17:10:06 +08:00
|
|
|
|
<!-- 主体内容 -->
|
|
|
|
|
|
<div class="main-wrapper">
|
|
|
|
|
|
<div class="content-panel">
|
|
|
|
|
|
<!-- 左侧导航 -->
|
|
|
|
|
|
<el-menu :default-active="activeTab" class="nav-panel" @select="handleMenuSelect"
|
2025-04-05 20:19:28 +08:00
|
|
|
|
style="background-size: cover; background-position: center;">
|
2025-03-26 17:10:06 +08:00
|
|
|
|
<el-menu-item index="vad">
|
|
|
|
|
|
<span class="menu-text">语言活动检测</span>
|
|
|
|
|
|
</el-menu-item>
|
|
|
|
|
|
<el-menu-item index="asr">
|
|
|
|
|
|
<span class="menu-text">语音识别</span>
|
|
|
|
|
|
</el-menu-item>
|
|
|
|
|
|
<el-menu-item index="llm">
|
|
|
|
|
|
<span class="menu-text">大语言模型</span>
|
|
|
|
|
|
</el-menu-item>
|
|
|
|
|
|
<el-menu-item index="intent">
|
|
|
|
|
|
<span class="menu-text">意图识别</span>
|
|
|
|
|
|
</el-menu-item>
|
|
|
|
|
|
<el-menu-item index="tts">
|
|
|
|
|
|
<span class="menu-text">语音合成</span>
|
|
|
|
|
|
</el-menu-item>
|
|
|
|
|
|
<el-menu-item index="memory">
|
|
|
|
|
|
<span class="menu-text">记忆</span>
|
|
|
|
|
|
</el-menu-item>
|
|
|
|
|
|
</el-menu>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- 右侧内容 -->
|
|
|
|
|
|
<div class="content-area">
|
2025-04-05 20:19:28 +08:00
|
|
|
|
<el-table ref="modelTable" style="width: 100%" :header-cell-style="{ background: 'transparent' }"
|
|
|
|
|
|
:data="modelList" class="data-table" header-row-class-name="table-header"
|
|
|
|
|
|
:header-cell-class-name="headerCellClassName" @selection-change="handleSelectionChange">
|
2025-03-26 17:10:06 +08:00
|
|
|
|
<el-table-column type="selection" width="55" align="center"></el-table-column>
|
2025-04-02 23:52:13 +08:00
|
|
|
|
<el-table-column label="模型名称" prop="modelName" align="center"></el-table-column>
|
|
|
|
|
|
<el-table-column label="模型编码" prop="modelCode" align="center"></el-table-column>
|
|
|
|
|
|
<el-table-column label="提供商" align="center">
|
|
|
|
|
|
<template slot-scope="scope">
|
2025-04-08 18:01:47 +08:00
|
|
|
|
{{ scope.row.configJson.type || '未知' }}
|
2025-04-02 23:52:13 +08:00
|
|
|
|
</template>
|
|
|
|
|
|
</el-table-column>
|
2025-03-31 14:28:29 +08:00
|
|
|
|
<el-table-column label="是否启用" align="center">
|
2025-03-26 17:10:06 +08:00
|
|
|
|
<template slot-scope="scope">
|
2025-04-05 20:19:28 +08:00
|
|
|
|
<el-switch v-model="scope.row.isEnabled" class="custom-switch" :active-value="1" :inactive-value="0"
|
2025-04-07 15:15:45 +08:00
|
|
|
|
@change="handleStatusChange(scope.row)" />
|
2025-03-26 17:10:06 +08:00
|
|
|
|
</template>
|
|
|
|
|
|
</el-table-column>
|
2025-04-12 17:36:04 +08:00
|
|
|
|
<el-table-column label="是否默认" align="center">
|
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
|
<el-switch v-model="scope.row.isDefault" class="custom-switch" :active-value="1" :inactive-value="0"
|
|
|
|
|
|
@change="handleDefaultChange(scope.row)" />
|
|
|
|
|
|
</template>
|
|
|
|
|
|
</el-table-column>
|
2025-04-02 11:36:12 +08:00
|
|
|
|
<el-table-column v-if="activeTab === 'tts'" label="音色管理" align="center">
|
|
|
|
|
|
<template slot-scope="scope">
|
2025-04-12 17:36:04 +08:00
|
|
|
|
<el-button type="text" size="mini" @click="openTtsDialog(scope.row)" class="voice-management-btn">
|
2025-04-02 11:36:12 +08:00
|
|
|
|
音色管理
|
|
|
|
|
|
</el-button>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
</el-table-column>
|
|
|
|
|
|
<el-table-column label="操作" align="center" width="150px">
|
2025-03-26 17:10:06 +08:00
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
|
<el-button type="text" size="mini" @click="editModel(scope.row)" class="edit-btn">
|
|
|
|
|
|
修改
|
|
|
|
|
|
</el-button>
|
|
|
|
|
|
<el-button type="text" size="mini" @click="deleteModel(scope.row)" class="delete-btn">
|
|
|
|
|
|
删除
|
|
|
|
|
|
</el-button>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
</el-table-column>
|
|
|
|
|
|
</el-table>
|
2025-03-31 14:28:29 +08:00
|
|
|
|
|
2025-03-26 17:10:06 +08:00
|
|
|
|
<div class="table-footer">
|
|
|
|
|
|
<div class="batch-actions">
|
2025-04-11 15:43:45 +08:00
|
|
|
|
<el-button size="mini" type="primary" @click="selectAll" >
|
|
|
|
|
|
{{ isAllSelected ?
|
|
|
|
|
|
'取消全选' : '全选' }}
|
|
|
|
|
|
</el-button>
|
|
|
|
|
|
<el-button type="success" size="mini" @click="addModel" class="add-btn">
|
|
|
|
|
|
新增
|
|
|
|
|
|
</el-button>
|
2025-03-26 17:10:06 +08:00
|
|
|
|
<el-button size="mini" type="danger" icon="el-icon-delete" @click="batchDelete">
|
|
|
|
|
|
删除
|
|
|
|
|
|
</el-button>
|
|
|
|
|
|
</div>
|
2025-04-02 17:19:46 +08:00
|
|
|
|
<div class="custom-pagination">
|
|
|
|
|
|
<button class="pagination-btn" :disabled="currentPage === 1" @click="goFirst">首页</button>
|
|
|
|
|
|
<button class="pagination-btn" :disabled="currentPage === 1" @click="goPrev">上一页</button>
|
|
|
|
|
|
|
2025-04-05 20:19:28 +08:00
|
|
|
|
<button v-for="page in visiblePages" :key="page" class="pagination-btn"
|
|
|
|
|
|
:class="{ active: page === currentPage }" @click="goToPage(page)">
|
2025-04-02 17:19:46 +08:00
|
|
|
|
{{ page }}
|
|
|
|
|
|
</button>
|
|
|
|
|
|
|
|
|
|
|
|
<button class="pagination-btn" :disabled="currentPage === pageCount" @click="goNext">下一页</button>
|
|
|
|
|
|
<span class="total-text">共{{ total }}条记录</span>
|
2025-03-26 21:43:07 +08:00
|
|
|
|
</div>
|
2025-03-26 17:10:06 +08:00
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
2025-04-05 20:19:28 +08:00
|
|
|
|
<ModelEditDialog :modelType="activeTab" :visible.sync="editDialogVisible" :modelData="editModelData"
|
|
|
|
|
|
@save="handleModelSave" />
|
2025-04-12 17:36:04 +08:00
|
|
|
|
<TtsModel :visible.sync="ttsDialogVisible" :ttsModelId="selectedTtsModelId" />
|
2025-04-05 20:19:28 +08:00
|
|
|
|
<AddModelDialog :modelType="activeTab" :visible.sync="addDialogVisible" @confirm="handleAddConfirm" />
|
2025-03-20 18:11:37 +08:00
|
|
|
|
</div>
|
|
|
|
|
|
|
2025-03-26 17:10:06 +08:00
|
|
|
|
<div class="copyright">
|
2025-04-05 20:19:28 +08:00
|
|
|
|
©2025 xiaozhi-esp32-server
|
2025-03-26 17:10:06 +08:00
|
|
|
|
</div>
|
2025-04-05 20:19:28 +08:00
|
|
|
|
</div>
|
2025-03-26 17:10:06 +08:00
|
|
|
|
</template>
|
2025-03-20 18:11:37 +08:00
|
|
|
|
|
2025-03-26 17:10:06 +08:00
|
|
|
|
<script>
|
2025-04-05 21:03:46 +08:00
|
|
|
|
import Api from "@/apis/api";
|
2025-04-05 20:19:28 +08:00
|
|
|
|
import AddModelDialog from "@/components/AddModelDialog.vue";
|
2025-03-26 17:10:06 +08:00
|
|
|
|
import HeaderBar from "@/components/HeaderBar.vue";
|
|
|
|
|
|
import ModelEditDialog from "@/components/ModelEditDialog.vue";
|
|
|
|
|
|
import TtsModel from "@/components/TtsModel.vue";
|
|
|
|
|
|
|
|
|
|
|
|
export default {
|
2025-03-26 21:43:07 +08:00
|
|
|
|
components: { HeaderBar, ModelEditDialog, TtsModel, AddModelDialog },
|
2025-03-26 17:10:06 +08:00
|
|
|
|
data() {
|
|
|
|
|
|
return {
|
2025-03-26 21:43:07 +08:00
|
|
|
|
addDialogVisible: false,
|
2025-03-26 17:10:06 +08:00
|
|
|
|
activeTab: 'llm',
|
|
|
|
|
|
search: '',
|
|
|
|
|
|
editDialogVisible: false,
|
|
|
|
|
|
editModelData: {},
|
|
|
|
|
|
ttsDialogVisible: false,
|
2025-04-09 11:00:10 +08:00
|
|
|
|
selectedTtsModelId: '',
|
2025-04-02 23:52:13 +08:00
|
|
|
|
modelList: [],
|
2025-03-26 17:10:06 +08:00
|
|
|
|
currentPage: 1,
|
2025-04-02 23:52:13 +08:00
|
|
|
|
pageSize: 5,
|
|
|
|
|
|
total: 0,
|
2025-03-31 14:28:29 +08:00
|
|
|
|
selectedModels: [],
|
|
|
|
|
|
isAllSelected: false
|
2025-03-26 17:10:06 +08:00
|
|
|
|
};
|
|
|
|
|
|
},
|
2025-04-02 17:19:46 +08:00
|
|
|
|
|
2025-04-02 23:52:13 +08:00
|
|
|
|
created() {
|
|
|
|
|
|
this.loadData();
|
|
|
|
|
|
},
|
|
|
|
|
|
|
2025-04-02 17:19:46 +08:00
|
|
|
|
computed: {
|
2025-04-03 08:24:47 +08:00
|
|
|
|
|
|
|
|
|
|
modelTypeText() {
|
|
|
|
|
|
const map = {
|
|
|
|
|
|
vad: '语言活动检测模型(VAD)',
|
|
|
|
|
|
asr: '语音识别模型(ASR)',
|
|
|
|
|
|
llm: '大语言模型(LLM)',
|
|
|
|
|
|
intent: '意图识别模型(Intent)',
|
|
|
|
|
|
tts: '语音合成模型(TTS)',
|
|
|
|
|
|
memory: '记忆模型(Memory)'
|
|
|
|
|
|
}
|
|
|
|
|
|
return map[this.activeTab] || '模型配置'
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
|
2025-04-02 17:19:46 +08:00
|
|
|
|
pageCount() {
|
|
|
|
|
|
return Math.ceil(this.total / this.pageSize);
|
|
|
|
|
|
},
|
|
|
|
|
|
visiblePages() {
|
|
|
|
|
|
const pages = [];
|
|
|
|
|
|
const maxVisible = 3;
|
|
|
|
|
|
let start = Math.max(1, this.currentPage - 1);
|
|
|
|
|
|
let end = Math.min(this.pageCount, start + maxVisible - 1);
|
|
|
|
|
|
|
|
|
|
|
|
if (end - start + 1 < maxVisible) {
|
|
|
|
|
|
start = Math.max(1, end - maxVisible + 1);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
for (let i = start; i <= end; i++) {
|
|
|
|
|
|
pages.push(i);
|
|
|
|
|
|
}
|
|
|
|
|
|
return pages;
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
|
2025-03-26 17:10:06 +08:00
|
|
|
|
methods: {
|
2025-04-09 11:00:10 +08:00
|
|
|
|
openTtsDialog(row) {
|
|
|
|
|
|
this.selectedTtsModelId = row.id;
|
|
|
|
|
|
this.ttsDialogVisible = true;
|
|
|
|
|
|
},
|
2025-03-31 14:28:29 +08:00
|
|
|
|
headerCellClassName({ column, columnIndex }) {
|
|
|
|
|
|
if (columnIndex === 0) {
|
|
|
|
|
|
return 'custom-selection-header';
|
|
|
|
|
|
}
|
|
|
|
|
|
return '';
|
|
|
|
|
|
},
|
2025-03-26 17:10:06 +08:00
|
|
|
|
handleMenuSelect(index) {
|
|
|
|
|
|
this.activeTab = index;
|
2025-04-03 08:24:47 +08:00
|
|
|
|
this.currentPage = 1;
|
|
|
|
|
|
this.loadData();
|
2025-03-20 18:11:37 +08:00
|
|
|
|
},
|
2025-03-26 17:10:06 +08:00
|
|
|
|
handleSearch() {
|
2025-04-07 16:57:31 +08:00
|
|
|
|
this.currentPage = 1;
|
|
|
|
|
|
this.loadData();
|
2025-03-26 17:10:06 +08:00
|
|
|
|
},
|
2025-04-04 23:52:36 +08:00
|
|
|
|
// 批量删除
|
2025-03-26 17:10:06 +08:00
|
|
|
|
batchDelete() {
|
2025-03-31 14:28:29 +08:00
|
|
|
|
if (this.selectedModels.length === 0) {
|
2025-04-04 23:52:36 +08:00
|
|
|
|
this.$message.warning('请先选择要删除的模型')
|
|
|
|
|
|
return
|
2025-03-31 14:28:29 +08:00
|
|
|
|
}
|
2025-04-04 23:52:36 +08:00
|
|
|
|
|
2025-03-31 14:28:29 +08:00
|
|
|
|
this.$confirm('确定要删除选中的模型吗?', '提示', {
|
|
|
|
|
|
confirmButtonText: '确定',
|
|
|
|
|
|
cancelButtonText: '取消',
|
|
|
|
|
|
type: 'warning'
|
|
|
|
|
|
}).then(() => {
|
2025-04-04 23:52:36 +08:00
|
|
|
|
const deletePromises = this.selectedModels.map(model =>
|
|
|
|
|
|
new Promise(resolve => {
|
2025-04-05 21:03:46 +08:00
|
|
|
|
Api.model.deleteModel(
|
2025-04-04 23:52:36 +08:00
|
|
|
|
model.id,
|
2025-04-05 20:19:28 +08:00
|
|
|
|
({ data }) => resolve(data.code === 0)
|
2025-04-04 23:52:36 +08:00
|
|
|
|
)
|
|
|
|
|
|
})
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
Promise.all(deletePromises).then(results => {
|
|
|
|
|
|
if (results.every(Boolean)) {
|
2025-04-07 15:14:20 +08:00
|
|
|
|
this.$message.success({
|
|
|
|
|
|
message: '批量删除成功',
|
|
|
|
|
|
showClose: true
|
|
|
|
|
|
})
|
2025-04-04 23:52:36 +08:00
|
|
|
|
this.loadData()
|
|
|
|
|
|
} else {
|
2025-04-07 15:14:20 +08:00
|
|
|
|
this.$message.error({
|
|
|
|
|
|
message: '部分删除失败',
|
|
|
|
|
|
showClose: true
|
|
|
|
|
|
})
|
2025-04-04 23:52:36 +08:00
|
|
|
|
}
|
|
|
|
|
|
})
|
2025-03-31 14:28:29 +08:00
|
|
|
|
}).catch(() => {
|
2025-04-04 23:52:36 +08:00
|
|
|
|
this.$message.info('已取消删除')
|
|
|
|
|
|
})
|
|
|
|
|
|
},
|
2025-03-26 17:10:06 +08:00
|
|
|
|
addModel() {
|
2025-03-26 21:43:07 +08:00
|
|
|
|
this.addDialogVisible = true;
|
2025-03-26 17:10:06 +08:00
|
|
|
|
},
|
|
|
|
|
|
editModel(model) {
|
2025-04-04 23:52:36 +08:00
|
|
|
|
this.editModelData = JSON.parse(JSON.stringify(model));
|
2025-03-26 17:10:06 +08:00
|
|
|
|
this.editDialogVisible = true;
|
|
|
|
|
|
},
|
2025-04-04 23:52:36 +08:00
|
|
|
|
// 删除单个模型
|
2025-03-26 17:10:06 +08:00
|
|
|
|
deleteModel(model) {
|
2025-04-04 23:52:36 +08:00
|
|
|
|
this.$confirm('确定要删除该模型吗?', '提示', {
|
2025-03-31 14:28:29 +08:00
|
|
|
|
confirmButtonText: '确定',
|
|
|
|
|
|
cancelButtonText: '取消',
|
|
|
|
|
|
type: 'warning'
|
|
|
|
|
|
}).then(() => {
|
2025-04-05 21:03:46 +08:00
|
|
|
|
Api.model.deleteModel(
|
2025-04-04 23:52:36 +08:00
|
|
|
|
model.id,
|
2025-04-05 20:19:28 +08:00
|
|
|
|
({ data }) => {
|
2025-04-04 23:52:36 +08:00
|
|
|
|
if (data.code === 0) {
|
2025-04-07 15:14:20 +08:00
|
|
|
|
this.$message.success({
|
|
|
|
|
|
message: '删除成功',
|
|
|
|
|
|
showClose: true
|
|
|
|
|
|
})
|
2025-04-04 23:52:36 +08:00
|
|
|
|
this.loadData()
|
|
|
|
|
|
} else {
|
2025-04-07 15:14:20 +08:00
|
|
|
|
this.$message.error({
|
|
|
|
|
|
message: data.msg || '删除失败',
|
|
|
|
|
|
showClose: true
|
|
|
|
|
|
})
|
2025-04-04 23:52:36 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
)
|
2025-03-31 14:28:29 +08:00
|
|
|
|
}).catch(() => {
|
2025-04-04 23:52:36 +08:00
|
|
|
|
this.$message.info('已取消删除')
|
|
|
|
|
|
})
|
2025-03-26 17:10:06 +08:00
|
|
|
|
},
|
|
|
|
|
|
handleCurrentChange(page) {
|
|
|
|
|
|
this.currentPage = page;
|
2025-03-31 14:28:29 +08:00
|
|
|
|
this.$refs.modelTable.clearSelection();
|
2025-03-26 17:10:06 +08:00
|
|
|
|
},
|
2025-04-08 10:53:59 +08:00
|
|
|
|
handleModelSave({ provideCode, formData }) {
|
|
|
|
|
|
const modelType = this.activeTab;
|
|
|
|
|
|
const id = formData.id;
|
|
|
|
|
|
Api.model.updateModel(
|
|
|
|
|
|
{ modelType, provideCode, id, formData },
|
|
|
|
|
|
({ data }) => {
|
|
|
|
|
|
if (data.code === 0) {
|
|
|
|
|
|
this.$message.success('保存成功');
|
|
|
|
|
|
this.loadData();
|
|
|
|
|
|
this.editDialogVisible = false;
|
|
|
|
|
|
} else {
|
|
|
|
|
|
this.$message.error(data.msg || '保存失败');
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
);
|
2025-03-26 17:10:06 +08:00
|
|
|
|
},
|
|
|
|
|
|
selectAll() {
|
2025-03-31 14:28:29 +08:00
|
|
|
|
if (this.isAllSelected) {
|
|
|
|
|
|
this.$refs.modelTable.clearSelection();
|
|
|
|
|
|
} else {
|
|
|
|
|
|
this.$refs.modelTable.toggleAllSelection();
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
handleSelectionChange(val) {
|
|
|
|
|
|
this.selectedModels = val;
|
|
|
|
|
|
this.isAllSelected = val.length === this.modelList.length;
|
|
|
|
|
|
if (val.length === 0) {
|
|
|
|
|
|
this.isAllSelected = false;
|
|
|
|
|
|
}
|
2025-03-26 21:43:07 +08:00
|
|
|
|
},
|
2025-04-03 16:23:15 +08:00
|
|
|
|
|
|
|
|
|
|
// 新增模型配置
|
2025-03-26 21:43:07 +08:00
|
|
|
|
handleAddConfirm(newModel) {
|
2025-04-03 16:23:15 +08:00
|
|
|
|
const params = {
|
|
|
|
|
|
modelType: this.activeTab,
|
2025-04-07 09:44:48 +08:00
|
|
|
|
provideCode: newModel.provideCode,
|
2025-04-03 16:23:15 +08:00
|
|
|
|
formData: {
|
|
|
|
|
|
...newModel,
|
|
|
|
|
|
isDefault: newModel.isDefault ? 1 : 0,
|
2025-04-07 09:44:48 +08:00
|
|
|
|
isEnabled: newModel.isEnabled ? 1 : 0,
|
|
|
|
|
|
configJson: newModel.configJson
|
2025-04-03 16:23:15 +08:00
|
|
|
|
}
|
|
|
|
|
|
};
|
|
|
|
|
|
|
2025-04-05 21:03:46 +08:00
|
|
|
|
Api.model.addModel(params, ({ data }) => {
|
2025-04-03 16:23:15 +08:00
|
|
|
|
if (data.code === 0) {
|
2025-04-07 15:14:20 +08:00
|
|
|
|
this.$message.success({
|
|
|
|
|
|
message: '新增成功',
|
|
|
|
|
|
showClose: true
|
|
|
|
|
|
});
|
2025-04-03 16:23:15 +08:00
|
|
|
|
this.loadData();
|
|
|
|
|
|
} else {
|
2025-04-07 15:14:20 +08:00
|
|
|
|
this.$message.error({
|
|
|
|
|
|
message: data.msg || '新增失败',
|
|
|
|
|
|
showClose: true
|
|
|
|
|
|
});
|
2025-04-03 16:23:15 +08:00
|
|
|
|
}
|
|
|
|
|
|
});
|
2025-04-02 17:19:46 +08:00
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
// 分页器
|
|
|
|
|
|
goFirst() {
|
2025-04-05 20:19:28 +08:00
|
|
|
|
this.currentPage = 1;
|
|
|
|
|
|
this.loadData();
|
2025-04-02 17:19:46 +08:00
|
|
|
|
},
|
|
|
|
|
|
goPrev() {
|
|
|
|
|
|
if (this.currentPage > 1) {
|
|
|
|
|
|
this.currentPage--;
|
|
|
|
|
|
this.loadData();
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
goNext() {
|
|
|
|
|
|
if (this.currentPage < this.pageCount) {
|
|
|
|
|
|
this.currentPage++;
|
|
|
|
|
|
this.loadData();
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
goToPage(page) {
|
|
|
|
|
|
this.currentPage = page;
|
|
|
|
|
|
this.loadData();
|
|
|
|
|
|
},
|
2025-04-02 23:52:13 +08:00
|
|
|
|
|
|
|
|
|
|
// 获取模型配置列表
|
2025-04-02 17:19:46 +08:00
|
|
|
|
loadData() {
|
2025-04-02 23:52:13 +08:00
|
|
|
|
const params = {
|
|
|
|
|
|
modelType: this.activeTab,
|
|
|
|
|
|
modelName: this.search,
|
|
|
|
|
|
page: this.currentPage,
|
|
|
|
|
|
limit: this.pageSize
|
|
|
|
|
|
};
|
|
|
|
|
|
|
2025-04-05 21:03:46 +08:00
|
|
|
|
Api.model.getModelList(params, ({ data }) => {
|
2025-04-02 23:52:13 +08:00
|
|
|
|
if (data.code === 0) {
|
|
|
|
|
|
this.modelList = data.data.list;
|
|
|
|
|
|
this.total = data.data.total;
|
|
|
|
|
|
} else {
|
|
|
|
|
|
this.$message.error(data.msg || '获取模型列表失败');
|
|
|
|
|
|
}
|
|
|
|
|
|
});
|
2025-04-07 15:15:45 +08:00
|
|
|
|
},
|
2025-04-12 17:36:04 +08:00
|
|
|
|
// 处理启用/禁用状态变更
|
2025-04-07 15:15:45 +08:00
|
|
|
|
handleStatusChange(model) {
|
|
|
|
|
|
const newStatus = model.isEnabled ? 1 : 0
|
|
|
|
|
|
const originalStatus = model.isEnabled
|
2025-04-12 17:36:04 +08:00
|
|
|
|
|
2025-04-07 15:15:45 +08:00
|
|
|
|
model.isEnabled = !model.isEnabled
|
|
|
|
|
|
|
|
|
|
|
|
Api.model.updateModelStatus(
|
|
|
|
|
|
model.id,
|
|
|
|
|
|
newStatus,
|
|
|
|
|
|
({ data }) => {
|
|
|
|
|
|
if (data.code === 0) {
|
|
|
|
|
|
this.$message.success(newStatus === 1 ? '启用成功' : '禁用成功')
|
|
|
|
|
|
// 保持新状态
|
|
|
|
|
|
model.isEnabled = newStatus
|
|
|
|
|
|
} else {
|
|
|
|
|
|
// 操作失败时恢复原状态
|
|
|
|
|
|
model.isEnabled = originalStatus
|
|
|
|
|
|
this.$message.error(data.msg || '操作失败')
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
)
|
2025-04-12 17:36:04 +08:00
|
|
|
|
},
|
|
|
|
|
|
handleDefaultChange(model) {
|
|
|
|
|
|
Api.model.setDefaultModel(model.id, ({ data }) => {
|
|
|
|
|
|
if (data.code === 0) {
|
|
|
|
|
|
this.$message.success('设置默认模型成功')
|
|
|
|
|
|
this.loadData()
|
|
|
|
|
|
}
|
|
|
|
|
|
})
|
2025-03-24 17:27:08 +08:00
|
|
|
|
}
|
2025-03-26 21:43:07 +08:00
|
|
|
|
},
|
2025-03-26 17:10:06 +08:00
|
|
|
|
};
|
|
|
|
|
|
</script>
|
2025-03-20 18:11:37 +08:00
|
|
|
|
|
2025-03-26 17:10:06 +08:00
|
|
|
|
<style scoped>
|
2025-04-12 17:36:04 +08:00
|
|
|
|
.el-switch {
|
|
|
|
|
|
height: 23px;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2025-04-05 20:19:28 +08:00
|
|
|
|
::v-deep .el-table tr {
|
2025-04-02 12:05:09 +08:00
|
|
|
|
background: transparent;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2025-03-26 17:10:06 +08:00
|
|
|
|
.welcome {
|
|
|
|
|
|
min-width: 900px;
|
|
|
|
|
|
min-height: 506px;
|
|
|
|
|
|
height: 100vh;
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
position: relative;
|
|
|
|
|
|
flex-direction: column;
|
2025-04-02 11:36:12 +08:00
|
|
|
|
background-size: cover;
|
2025-04-02 12:05:09 +08:00
|
|
|
|
background: linear-gradient(to bottom right, #dce8ff, #e4eeff, #e6cbfd) center;
|
2025-03-26 17:10:06 +08:00
|
|
|
|
-webkit-background-size: cover;
|
|
|
|
|
|
-o-background-size: cover;
|
|
|
|
|
|
}
|
2025-03-20 18:11:37 +08:00
|
|
|
|
|
2025-03-26 17:10:06 +08:00
|
|
|
|
.main-wrapper {
|
2025-04-11 15:43:45 +08:00
|
|
|
|
margin: 5px 22px;
|
2025-03-26 17:10:06 +08:00
|
|
|
|
border-radius: 15px;
|
2025-03-26 21:43:07 +08:00
|
|
|
|
min-height: 600px;
|
2025-03-26 17:10:06 +08:00
|
|
|
|
box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
|
|
|
|
|
|
position: relative;
|
2025-04-05 20:19:28 +08:00
|
|
|
|
background: rgba(237, 242, 255, 0.5);
|
2025-03-26 17:10:06 +08:00
|
|
|
|
}
|
2025-03-24 17:27:08 +08:00
|
|
|
|
|
2025-03-26 17:10:06 +08:00
|
|
|
|
.operation-bar {
|
|
|
|
|
|
display: flex;
|
2025-03-31 14:28:29 +08:00
|
|
|
|
justify-content: space-between;
|
2025-03-26 17:10:06 +08:00
|
|
|
|
align-items: center;
|
|
|
|
|
|
padding: 16px 24px;
|
|
|
|
|
|
}
|
2025-03-24 17:27:08 +08:00
|
|
|
|
|
2025-03-31 14:28:29 +08:00
|
|
|
|
.page-title {
|
|
|
|
|
|
font-size: 24px;
|
|
|
|
|
|
margin: 0;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.right-operations {
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
gap: 10px;
|
|
|
|
|
|
margin-left: auto;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2025-03-26 17:10:06 +08:00
|
|
|
|
.content-panel {
|
|
|
|
|
|
flex: 1;
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
|
height: 100%;
|
|
|
|
|
|
border-radius: 15px;
|
|
|
|
|
|
background: transparent;
|
2025-04-05 22:12:54 +08:00
|
|
|
|
border: 1px solid #fff;
|
2025-03-26 17:10:06 +08:00
|
|
|
|
}
|
2025-03-24 17:27:08 +08:00
|
|
|
|
|
2025-03-26 17:10:06 +08:00
|
|
|
|
.nav-panel {
|
2025-03-31 14:28:29 +08:00
|
|
|
|
min-width: 242px;
|
2025-03-26 17:10:06 +08:00
|
|
|
|
height: 100%;
|
|
|
|
|
|
border-right: 1px solid #ebeef5;
|
2025-03-31 14:28:29 +08:00
|
|
|
|
background:
|
2025-04-05 20:19:28 +08:00
|
|
|
|
linear-gradient(120deg,
|
2025-03-31 14:28:29 +08:00
|
|
|
|
rgba(107, 140, 255, 0.3) 0%,
|
|
|
|
|
|
rgba(169, 102, 255, 0.3) 25%,
|
2025-04-05 20:19:28 +08:00
|
|
|
|
transparent 60%),
|
2025-03-31 14:28:29 +08:00
|
|
|
|
url("../assets/model/model.png") no-repeat center / cover;
|
2025-03-26 17:10:06 +08:00
|
|
|
|
padding: 16px 0;
|
|
|
|
|
|
flex-shrink: 0;
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
|
}
|
2025-03-24 17:27:08 +08:00
|
|
|
|
|
2025-03-26 17:10:06 +08:00
|
|
|
|
.nav-panel .el-menu-item {
|
2025-03-31 14:28:29 +08:00
|
|
|
|
height: 50px;
|
|
|
|
|
|
line-height: 50px;
|
2025-03-26 17:10:06 +08:00
|
|
|
|
border-radius: 4px;
|
|
|
|
|
|
transition: all 0.3s;
|
|
|
|
|
|
display: flex !important;
|
|
|
|
|
|
justify-content: flex-end;
|
|
|
|
|
|
padding-right: 12px !important;
|
|
|
|
|
|
width: fit-content;
|
2025-04-11 15:43:45 +08:00
|
|
|
|
margin: 8px 0 8px auto;
|
2025-03-26 17:10:06 +08:00
|
|
|
|
min-width: unset;
|
|
|
|
|
|
}
|
2025-03-20 18:11:37 +08:00
|
|
|
|
|
2025-03-26 17:10:06 +08:00
|
|
|
|
.nav-panel .el-menu-item.is-active {
|
2025-03-31 14:28:29 +08:00
|
|
|
|
background: #e9f0ff;
|
|
|
|
|
|
color: #0ba6f4 !important;
|
|
|
|
|
|
position: relative;
|
|
|
|
|
|
padding-left: 40px !important;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.nav-panel .el-menu-item.is-active::before {
|
|
|
|
|
|
content: '';
|
|
|
|
|
|
position: absolute;
|
|
|
|
|
|
left: 15px;
|
|
|
|
|
|
top: 50%;
|
|
|
|
|
|
transform: translateY(-50%);
|
|
|
|
|
|
width: 13px;
|
|
|
|
|
|
height: 13px;
|
|
|
|
|
|
background: #409EFF;
|
|
|
|
|
|
border-radius: 50%;
|
|
|
|
|
|
box-shadow: 0 0 4px rgba(64, 158, 255, 0.5);
|
2025-03-26 17:10:06 +08:00
|
|
|
|
}
|
2025-03-20 18:11:37 +08:00
|
|
|
|
|
2025-03-26 17:10:06 +08:00
|
|
|
|
.menu-text {
|
|
|
|
|
|
font-size: 14px;
|
|
|
|
|
|
color: #606266;
|
|
|
|
|
|
text-align: right;
|
|
|
|
|
|
width: 100%;
|
|
|
|
|
|
padding-right: 8px;
|
|
|
|
|
|
}
|
2025-03-20 18:11:37 +08:00
|
|
|
|
|
2025-03-26 17:10:06 +08:00
|
|
|
|
.content-area {
|
|
|
|
|
|
flex: 1;
|
|
|
|
|
|
padding: 24px;
|
|
|
|
|
|
height: 100%;
|
|
|
|
|
|
min-width: 600px;
|
|
|
|
|
|
overflow-x: auto;
|
2025-04-02 16:47:44 +08:00
|
|
|
|
background-color: white;
|
2025-04-02 12:05:09 +08:00
|
|
|
|
|
2025-03-26 17:10:06 +08:00
|
|
|
|
}
|
2025-03-20 18:11:37 +08:00
|
|
|
|
|
2025-03-26 17:10:06 +08:00
|
|
|
|
.title-bar {
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
justify-content: space-between;
|
|
|
|
|
|
align-items: center;
|
|
|
|
|
|
margin-bottom: 24px;
|
|
|
|
|
|
flex-wrap: nowrap;
|
|
|
|
|
|
}
|
2025-03-24 17:27:08 +08:00
|
|
|
|
|
2025-03-26 17:10:06 +08:00
|
|
|
|
.action-group {
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
align-items: center;
|
|
|
|
|
|
gap: 16px;
|
|
|
|
|
|
}
|
2025-03-24 17:27:08 +08:00
|
|
|
|
|
2025-03-26 17:10:06 +08:00
|
|
|
|
.search-group {
|
|
|
|
|
|
display: flex;
|
2025-04-11 15:43:45 +08:00
|
|
|
|
gap: 10px;
|
2025-03-26 17:10:06 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.search-input {
|
|
|
|
|
|
width: 240px;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2025-04-11 15:43:45 +08:00
|
|
|
|
.btn-search {
|
|
|
|
|
|
background: linear-gradient(135deg, #6b8cff, #a966ff);
|
|
|
|
|
|
border: none;
|
|
|
|
|
|
color: white;
|
2025-03-31 14:28:29 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2025-04-02 12:05:09 +08:00
|
|
|
|
::v-deep .search-input .el-input__inner {
|
2025-04-11 15:43:45 +08:00
|
|
|
|
border-radius: 4px;
|
|
|
|
|
|
border: 1px solid #DCDFE6;
|
|
|
|
|
|
background-color: white;
|
|
|
|
|
|
transition: border-color 0.2s;
|
2025-03-31 14:28:29 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2025-04-11 15:43:45 +08:00
|
|
|
|
::v-deep .search-input .el-input__inner:focus {
|
|
|
|
|
|
border-color: #6b8cff;
|
|
|
|
|
|
outline: none;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.btn-search {
|
|
|
|
|
|
background: linear-gradient(135deg, #6b8cff, #a966ff);
|
2025-04-02 12:05:09 +08:00
|
|
|
|
border: none;
|
|
|
|
|
|
color: white;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2025-04-11 15:43:45 +08:00
|
|
|
|
.btn-search:hover {
|
|
|
|
|
|
opacity: 0.9;
|
|
|
|
|
|
transform: translateY(-1px);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2025-03-26 17:10:06 +08:00
|
|
|
|
.data-table {
|
|
|
|
|
|
border-radius: 6px;
|
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
|
background-color: transparent !important;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2025-04-02 12:05:09 +08:00
|
|
|
|
.data-table /deep/ .el-table__row {
|
2025-03-26 17:10:06 +08:00
|
|
|
|
background-color: transparent !important;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.table-header th {
|
|
|
|
|
|
background-color: transparent !important;
|
|
|
|
|
|
color: #606266;
|
|
|
|
|
|
font-weight: 600;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.table-footer {
|
|
|
|
|
|
margin-top: 24px;
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
justify-content: space-between;
|
|
|
|
|
|
align-items: center;
|
|
|
|
|
|
padding: 16px 0;
|
2025-03-26 21:43:07 +08:00
|
|
|
|
width: 100%;
|
2025-03-26 17:10:06 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.batch-actions {
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
gap: 8px;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.copyright {
|
|
|
|
|
|
text-align: center;
|
|
|
|
|
|
color: #979db1;
|
|
|
|
|
|
font-size: 12px;
|
|
|
|
|
|
font-weight: 400;
|
|
|
|
|
|
margin-top: auto;
|
|
|
|
|
|
padding: 30px 0 20px;
|
|
|
|
|
|
position: absolute;
|
|
|
|
|
|
bottom: 0;
|
|
|
|
|
|
left: 50%;
|
|
|
|
|
|
transform: translateX(-50%);
|
|
|
|
|
|
width: 100%;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2025-04-02 12:05:09 +08:00
|
|
|
|
.title-wrapper {
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
align-items: center;
|
|
|
|
|
|
gap: 8px;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2025-04-11 15:43:45 +08:00
|
|
|
|
.batch-actions .el-button {
|
|
|
|
|
|
min-width: 72px;
|
|
|
|
|
|
height: 32px;
|
|
|
|
|
|
padding: 7px 12px 7px 10px;
|
|
|
|
|
|
font-size: 12px;
|
|
|
|
|
|
border-radius: 4px;
|
|
|
|
|
|
line-height: 1;
|
|
|
|
|
|
font-weight: 500;
|
|
|
|
|
|
border: none;
|
|
|
|
|
|
transition: all 0.3s ease;
|
|
|
|
|
|
box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.batch-actions .el-button:hover {
|
|
|
|
|
|
transform: translateY(-1px);
|
|
|
|
|
|
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.batch-actions .el-button--primary {
|
|
|
|
|
|
background: #5f70f3 !important;
|
|
|
|
|
|
color: white;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.batch-actions .el-button--success {
|
|
|
|
|
|
background: #5bc98c;
|
|
|
|
|
|
color: white;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.batch-actions .el-button--danger {
|
|
|
|
|
|
background: #fd5b63;
|
|
|
|
|
|
color: white;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2025-04-02 12:05:09 +08:00
|
|
|
|
.batch-actions .el-button:first-child {
|
|
|
|
|
|
background: linear-gradient(135deg, #409EFF, #6B8CFF);
|
2025-03-26 17:10:06 +08:00
|
|
|
|
border: none;
|
|
|
|
|
|
color: white;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2025-04-02 12:05:09 +08:00
|
|
|
|
.batch-actions .el-button:first-child:hover {
|
|
|
|
|
|
background: linear-gradient(135deg, #3A8EE6, #5A7CFF);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.el-table th /deep/ .el-table__cell {
|
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
|
-webkit-user-select: none;
|
|
|
|
|
|
-moz-user-select: none;
|
|
|
|
|
|
user-select: none;
|
|
|
|
|
|
background-color: transparent !important;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.pagination-container {
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
justify-content: flex-end;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
::v-deep .el-table .custom-selection-header .cell .el-checkbox__inner {
|
2025-04-05 20:19:28 +08:00
|
|
|
|
display: none !important;
|
2025-04-02 12:05:09 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
::v-deep .el-table .custom-selection-header .cell::before {
|
|
|
|
|
|
content: '选择';
|
|
|
|
|
|
display: block;
|
|
|
|
|
|
text-align: center;
|
|
|
|
|
|
line-height: 0;
|
|
|
|
|
|
color: black;
|
|
|
|
|
|
margin-top: 23px;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
::v-deep .el-table__body .el-checkbox__inner {
|
|
|
|
|
|
display: inline-block !important;
|
|
|
|
|
|
background: #e6edfa;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
::v-deep .el-table thead th:not(:first-child) .cell {
|
|
|
|
|
|
color: #303133 !important;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
::v-deep .nav-panel .el-menu-item.is-active .menu-text {
|
|
|
|
|
|
color: #409EFF !important;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
::v-deep .data-table {
|
2025-04-05 20:19:28 +08:00
|
|
|
|
|
2025-04-02 12:05:09 +08:00
|
|
|
|
&.el-table::before,
|
|
|
|
|
|
&.el-table::after,
|
|
|
|
|
|
&.el-table__inner-wrapper::before {
|
|
|
|
|
|
display: none !important;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
::v-deep .data-table .el-table__header-wrapper {
|
2025-04-05 20:19:28 +08:00
|
|
|
|
border-bottom: 1px solid rgb(224, 227, 237);
|
2025-04-02 12:05:09 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
::v-deep .data-table .el-table__body td {
|
2025-04-05 20:19:28 +08:00
|
|
|
|
border-bottom: 1px solid rgb(224, 227, 237) !important;
|
2025-04-02 12:05:09 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2025-04-05 20:19:28 +08:00
|
|
|
|
.el-button img {
|
2025-04-02 12:05:09 +08:00
|
|
|
|
height: 1em;
|
|
|
|
|
|
vertical-align: middle;
|
|
|
|
|
|
padding-right: 2px;
|
|
|
|
|
|
padding-bottom: 2px;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
::v-deep .el-checkbox__inner {
|
|
|
|
|
|
border-color: #cfcfcf !important;
|
|
|
|
|
|
transition: all 0.2s ease-in-out;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
::v-deep .el-checkbox__input.is-checked .el-checkbox__inner {
|
2025-04-11 16:01:57 +08:00
|
|
|
|
background-color: #5f70f3;
|
|
|
|
|
|
border-color: #5f70f3;
|
2025-04-02 12:05:09 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2025-04-02 11:36:12 +08:00
|
|
|
|
.voice-management-btn {
|
|
|
|
|
|
background: #9db3ea;
|
|
|
|
|
|
color: white;
|
|
|
|
|
|
min-width: 68px;
|
|
|
|
|
|
line-height: 14px;
|
|
|
|
|
|
white-space: nowrap;
|
|
|
|
|
|
transition: all 0.3s;
|
|
|
|
|
|
border-radius: 10px;
|
2025-03-26 17:10:06 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2025-04-02 11:36:12 +08:00
|
|
|
|
.voice-management-btn:hover {
|
2025-04-05 20:19:28 +08:00
|
|
|
|
background: #8aa2e0;
|
|
|
|
|
|
/* 悬停时颜色加深 */
|
2025-04-02 11:36:12 +08:00
|
|
|
|
transform: scale(1.05);
|
2025-03-26 21:43:07 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2025-04-02 12:05:09 +08:00
|
|
|
|
::v-deep .el-table .el-table-column--selection .cell {
|
|
|
|
|
|
padding-left: 15px !important;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
::v-deep .el-table .el-table__fixed-right .cell {
|
|
|
|
|
|
padding-right: 15px !important;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2025-04-05 20:19:28 +08:00
|
|
|
|
.edit-btn,
|
|
|
|
|
|
.delete-btn {
|
2025-04-02 11:36:12 +08:00
|
|
|
|
margin: 0 8px;
|
|
|
|
|
|
color: #7079aa !important;
|
2025-03-26 21:43:07 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2025-04-02 12:05:09 +08:00
|
|
|
|
::v-deep .el-table .cell {
|
|
|
|
|
|
padding-left: 10px;
|
|
|
|
|
|
padding-right: 10px;
|
2025-03-31 14:28:29 +08:00
|
|
|
|
}
|
2025-04-02 12:05:09 +08:00
|
|
|
|
|
2025-04-02 17:19:46 +08:00
|
|
|
|
/* 分页器 */
|
|
|
|
|
|
.custom-pagination {
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
align-items: center;
|
|
|
|
|
|
gap: 8px;
|
|
|
|
|
|
margin-top: 15px;
|
|
|
|
|
|
|
|
|
|
|
|
/* 导航按钮样式 (首页、上一页、下一页) */
|
|
|
|
|
|
.pagination-btn:first-child,
|
|
|
|
|
|
.pagination-btn:nth-child(2),
|
|
|
|
|
|
.pagination-btn:nth-last-child(2) {
|
|
|
|
|
|
min-width: 60px;
|
|
|
|
|
|
height: 32px;
|
|
|
|
|
|
padding: 0 12px;
|
|
|
|
|
|
border-radius: 4px;
|
|
|
|
|
|
border: 1px solid #e4e7ed;
|
|
|
|
|
|
background: #DEE7FF;
|
|
|
|
|
|
color: #606266;
|
|
|
|
|
|
font-size: 14px;
|
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
|
transition: all 0.3s ease;
|
|
|
|
|
|
|
|
|
|
|
|
&:hover {
|
|
|
|
|
|
background: #d7dce6;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
&:disabled {
|
|
|
|
|
|
opacity: 0.6;
|
|
|
|
|
|
cursor: not-allowed;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/* 数字按钮样式 */
|
|
|
|
|
|
.pagination-btn:not(:first-child):not(:nth-child(2)):not(:nth-last-child(2)) {
|
|
|
|
|
|
min-width: 28px;
|
|
|
|
|
|
height: 32px;
|
|
|
|
|
|
padding: 0;
|
|
|
|
|
|
border-radius: 4px;
|
|
|
|
|
|
border: 1px solid transparent;
|
|
|
|
|
|
background: transparent;
|
|
|
|
|
|
color: #606266;
|
|
|
|
|
|
font-size: 14px;
|
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
|
transition: all 0.3s ease;
|
|
|
|
|
|
|
|
|
|
|
|
&:hover {
|
|
|
|
|
|
background: rgba(245, 247, 250, 0.3);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.pagination-btn.active {
|
|
|
|
|
|
background: #5f70f3 !important;
|
|
|
|
|
|
color: #ffffff !important;
|
|
|
|
|
|
border-color: #5f70f3 !important;
|
|
|
|
|
|
|
|
|
|
|
|
&:hover {
|
|
|
|
|
|
background: #6d7cf5 !important;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.total-text {
|
|
|
|
|
|
color: #909399;
|
|
|
|
|
|
font-size: 14px;
|
|
|
|
|
|
margin-left: 10px;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
2025-03-26 17:10:06 +08:00
|
|
|
|
</style>
|