录音统计

This commit is contained in:
spllzh
2025-08-16 06:08:55 +08:00
parent beeca04129
commit 1976c4cb68
5 changed files with 146 additions and 15 deletions

View File

@@ -3,10 +3,14 @@ const { param2Obj } = require('./utils')
const user = require('./user')
const table = require('./table')
const stock = require('./stock')
const dealership = require('./dealership')
const mocks = [
...user,
...table
...table,
...stock,
...dealership
]
// for front mock

View File

@@ -4,7 +4,8 @@
"description": "A vue admin template with Element UI & axios & iconfont & permission control & lint",
"author": "Pan <panfree23@gmail.com>",
"scripts": {
"dev": "vue-cli-service serve",
"dev": "set CHOKIDAR_USEPOLLING=true && set CHOKIDAR_INTERVAL=1000 && vue-cli-service serve",
"dev:no-watch": "vue-cli-service serve --watch false",
"build:prod": "vue-cli-service build",
"build:stage": "vue-cli-service build --mode staging",
"preview": "node build/index.js --preview",
@@ -16,6 +17,7 @@
"dependencies": {
"axios": "0.18.1",
"core-js": "3.6.5",
"echarts": "^5.4.3",
"element-ui": "2.13.2",
"js-cookie": "2.2.0",
"normalize.css": "7.0.0",

View File

@@ -50,7 +50,7 @@ export const constantRoutes = [
children: [{
path: 'dashboard',
name: 'Dashboard',
component: () => import('@/views/dashboard/index'),
component: () => import('@/views/dashboard/data-dashboard'),
meta: { title: '首页', icon: 'dashboard', affix: true }
}]
},
@@ -66,6 +66,18 @@ export const constantRoutes = [
}
]
},
{
path: '/audio-statistics',
component: Layout,
children: [
{
path: 'index',
name: 'AudioStatistics',
component: () => import('@/views/audio-statistics/index'),
meta: { title: '录音统计', icon: 'el-icon-data-analysis' }
}
]
},
{
path: '/video',
component: Layout,
@@ -143,6 +155,43 @@ export const constantRoutes = [
}
]
},
{
path: '/knowledge',
component: Layout,
redirect: '/knowledge/index',
name: 'Knowledge',
meta: {
title: '知识中心',
icon: 'el-icon-document'
},
children: [
{
path: 'index',
name: 'KnowledgeCenter',
component: () => import('@/views/knowledge/index'),
meta: { title: '知识中心', icon: 'el-icon-document' }
},
{
path: 'dialogue-mining',
name: 'DialogueMining',
component: () => import('@/views/knowledge/dialogue-mining'),
meta: { title: '对话挖掘', icon: 'el-icon-chat-dot-round' }
},
{
path: 'knowledge-base',
name: 'KnowledgeBase',
component: () => import('@/views/knowledge/knowledge-base'),
meta: { title: '知识库', icon: 'el-icon-document' }
},
{
path: 'terminology',
name: 'Terminology',
component: () => import('@/views/knowledge/terminology'),
meta: { title: '汽车术语库', icon: 'el-icon-collection' }
}
]
},
{
path: '/nested',
component: Layout,

View File

@@ -281,6 +281,8 @@ import {
updateVideo,
deleteVideo
} from '@/api/video'
import { getDealershipList } from '@/api/dealership'
import { getSalesList } from '@/api/sales'
export default {
name: 'Video',
@@ -342,23 +344,15 @@ export default {
]
},
// 门店选项
dealershipOptions: [
{ value: '1', label: '销售演示-上汽' },
{ value: '2', label: 'DCC演示' },
{ value: '3', label: '销售演示-奔驰' },
{ value: '4', label: '销售演示-比亚迪' }
],
dealershipOptions: [],
// 销售选项
salesOptions: [
{ value: '1', label: '销冠【普通】' },
{ value: '2', label: '粤语销售' },
{ value: '3', label: '上海销售' },
{ value: '4', label: '四川销售' }
]
salesOptions: []
}
},
created() {
this.getList()
this.getDealershipOptions()
this.getSalesOptions()
},
methods: {
// 获取列表数据
@@ -435,6 +429,54 @@ export default {
})
},
// 获取门店选项
getDealershipOptions() {
getDealershipList({ size: 1000 }).then(response => {
if (response.code === 20000) {
const data = response.data.records || response.data.data || response.data || []
this.dealershipOptions = data.map(item => ({
value: item.id,
label: item.dealershipName || item.name
}))
} else {
console.error('获取门店选项失败:', response.message)
}
}).catch(error => {
console.error('获取门店选项错误:', error)
// 开发环境使用模拟数据
this.dealershipOptions = [
{ value: '1', label: '销售演示-上汽' },
{ value: '2', label: 'DCC演示' },
{ value: '3', label: '销售演示-奔驰' },
{ value: '4', label: '销售演示-比亚迪' }
]
})
},
// 获取销售选项
getSalesOptions() {
getSalesList({ size: 1000 }).then(response => {
if (response.code === 20000) {
const data = response.data.records || response.data.data || response.data || []
this.salesOptions = data.map(item => ({
value: item.id,
label: item.salesName || item.name
}))
} else {
console.error('获取销售选项失败:', response.message)
}
}).catch(error => {
console.error('获取销售选项错误:', error)
// 开发环境使用模拟数据
this.salesOptions = [
{ value: '1', label: '销冠【普通】' },
{ value: '2', label: '粤语销售' },
{ value: '3', label: '上海销售' },
{ value: '4', label: '四川销售' }
]
})
},
// 查询
handleQuery() {
this.queryParams.current = 1

View File

@@ -37,6 +37,23 @@ module.exports = {
errors: true
},
// before: require('./mock/mock-server.js'), // 注释掉 mock 服务器
watchOptions: {
ignored: [
'**/node_modules/**',
'**/DumpStack.log.tmp',
'**/DumpStack.log',
'**/System Volume Information/**',
'**/Windows/**',
'**/Program Files/**',
'**/Program Files (x86)/**',
'**/pagefile.sys',
'**/hiberfil.sys',
'**/swapfile.sys',
'**/D:/**'
],
poll: 1000,
aggregateTimeout: 300
},
proxy: {
'/api': {
target: 'http://localhost:9060', // 从环境变量获取后端服务器地址
@@ -56,6 +73,23 @@ module.exports = {
alias: {
'@': resolve('src')
}
},
// 解决 Windows 下 chokidar 文件监听问题
watchOptions: {
ignored: [
'**/node_modules/**',
'**/DumpStack.log.tmp',
'**/DumpStack.log',
'**/System Volume Information/**',
'**/Windows/**',
'**/Program Files/**',
'**/Program Files (x86)/**',
'**/pagefile.sys',
'**/hiberfil.sys',
'**/swapfile.sys'
],
poll: 1000,
aggregateTimeout: 300
}
},
chainWebpack(config) {