394 lines
14 KiB
HTML
394 lines
14 KiB
HTML
<!DOCTYPE html>
|
||
<html lang="zh-CN">
|
||
<head>
|
||
<meta charset="UTF-8">
|
||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||
<title>风电叶片检查系统 - 智能数据预处理</title>
|
||
<link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css">
|
||
<style>
|
||
/* 基础样式 */
|
||
* {
|
||
margin: 0;
|
||
padding: 0;
|
||
box-sizing: border-box;
|
||
}
|
||
body {
|
||
font-family: "Helvetica Neue", Helvetica, "PingFang SC", "Hiragino Sans GB", Arial, sans-serif;
|
||
background-color: #f0f2f5;
|
||
}
|
||
.app-container {
|
||
display: flex;
|
||
min-height: 100vh;
|
||
}
|
||
.sidebar {
|
||
width: 220px;
|
||
background-color: #304156;
|
||
color: #fff;
|
||
}
|
||
.main-content {
|
||
flex: 1;
|
||
padding: 20px;
|
||
overflow-y: auto;
|
||
}
|
||
|
||
/* 预处理专用样式 */
|
||
.preprocess-container {
|
||
background: #fff;
|
||
border-radius: 4px;
|
||
box-shadow: 0 2px 12px 0 rgba(0,0,0,0.1);
|
||
padding: 20px;
|
||
}
|
||
.step-indicator {
|
||
margin-bottom: 30px;
|
||
}
|
||
.data-preview {
|
||
border: 1px dashed #dcdfe6;
|
||
border-radius: 4px;
|
||
padding: 15px;
|
||
margin-top: 15px;
|
||
min-height: 200px;
|
||
}
|
||
.audio-wave {
|
||
background: #f5f7fa;
|
||
height: 80px;
|
||
margin-top: 10px;
|
||
position: relative;
|
||
}
|
||
.match-result {
|
||
display: flex;
|
||
margin-top: 15px;
|
||
}
|
||
.match-image {
|
||
width: 150px;
|
||
height: 150px;
|
||
border: 1px solid #ebeef5;
|
||
margin-right: 15px;
|
||
}
|
||
.match-text {
|
||
flex: 1;
|
||
}
|
||
.function-tag {
|
||
margin-right: 10px;
|
||
margin-bottom: 10px;
|
||
}
|
||
</style>
|
||
</head>
|
||
<body>
|
||
<div id="app" class="app-container">
|
||
<!-- 侧边栏导航 -->
|
||
<div class="sidebar">
|
||
<div class="logo">
|
||
<h2>风电叶片检查</h2>
|
||
<p>智能管理系统</p>
|
||
</div>
|
||
<el-menu
|
||
default-active="data-preprocess"
|
||
background-color="#304156"
|
||
text-color="#fff"
|
||
active-text-color="#409EFF"
|
||
>
|
||
<!-- 其他菜单项... -->
|
||
<el-submenu index="data">
|
||
<template slot="title">
|
||
<i class="el-icon-upload"></i>
|
||
<span>数据处理</span>
|
||
</template>
|
||
<el-menu-item index="data-import" @click="activeModule='data-import'">数据入库</el-menu-item>
|
||
<el-menu-item index="data-preprocess" @click="activeModule='data-preprocess'">智能预处理</el-menu-item>
|
||
<el-menu-item index="data-platform" @click="activeModule='data-platform'">分析平台</el-menu-item>
|
||
</el-submenu>
|
||
</el-menu>
|
||
</div>
|
||
|
||
<!-- 主内容区 -->
|
||
<div class="main-content">
|
||
<!-- 智能数据预处理模块 -->
|
||
<div v-if="activeModule === 'data-preprocess'" class="preprocess-container">
|
||
<h2>智能数据预处理中心</h2>
|
||
|
||
<el-steps :active="currentStep" finish-status="success" class="step-indicator">
|
||
<el-step title="数据选择"></el-step>
|
||
<el-step title="智能处理"></el-step>
|
||
<el-step title="结果验证"></el-step>
|
||
<el-step title="完成导入"></el-step>
|
||
</el-steps>
|
||
|
||
<!-- 步骤1:数据选择 -->
|
||
<div v-show="currentStep === 0">
|
||
<h3>选择待处理数据源</h3>
|
||
<el-upload
|
||
class="upload-demo"
|
||
drag
|
||
action=""
|
||
multiple
|
||
:on-change="handleFileUpload"
|
||
:auto-upload="false"
|
||
:file-list="fileList"
|
||
>
|
||
<i class="el-icon-upload"></i>
|
||
<div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
|
||
<div class="el-upload__tip" slot="tip">支持图片(jpg/png)、视频(mp4)、音频(mp3/wav)、点云数据(pcd)</div>
|
||
</el-upload>
|
||
|
||
<el-button
|
||
type="primary"
|
||
style="margin-top: 20px;"
|
||
@click="currentStep = 1"
|
||
:disabled="fileList.length === 0"
|
||
>
|
||
开始智能处理
|
||
</el-button>
|
||
</div>
|
||
|
||
<!-- 步骤2:智能处理 -->
|
||
<div v-show="currentStep === 1">
|
||
<h3>选择预处理功能</h3>
|
||
|
||
<div>
|
||
<el-tag
|
||
v-for="func in availableFunctions"
|
||
:key="func.name"
|
||
:type="selectedFunctions.includes(func.name) ? 'primary' : 'info'"
|
||
class="function-tag"
|
||
@click="toggleFunction(func.name)"
|
||
>
|
||
{{ func.label }}
|
||
</el-tag>
|
||
</div>
|
||
|
||
<div v-if="selectedFunctions.length > 0" style="margin-top: 30px;">
|
||
<h4>功能配置</h4>
|
||
|
||
<!-- 语音转文字配置 -->
|
||
<div v-if="selectedFunctions.includes('speech2text')" style="margin-bottom: 20px;">
|
||
<el-card shadow="never">
|
||
<div slot="header">语音转文字配置</div>
|
||
<el-form label-width="120px">
|
||
<el-form-item label="语言模型">
|
||
<el-select v-model="config.speech2text.language" style="width: 100%">
|
||
<el-option label="中文普通话" value="zh-CN"></el-option>
|
||
<el-option label="英语" value="en-US"></el-option>
|
||
</el-select>
|
||
</el-form-item>
|
||
<el-form-item label="专业术语库">
|
||
<el-switch v-model="config.speech2text.useGlossary"></el-switch>
|
||
</el-form-item>
|
||
</el-form>
|
||
</el-card>
|
||
</div>
|
||
|
||
<!-- 关键信息提取配置 -->
|
||
<div v-if="selectedFunctions.includes('keyinfo')" style="margin-bottom: 20px;">
|
||
<el-card shadow="never">
|
||
<div slot="header">关键信息提取配置</div>
|
||
<el-form label-width="120px">
|
||
<el-form-item label="提取模式">
|
||
<el-radio-group v-model="config.keyinfo.mode">
|
||
<el-radio label="standard">标准模式</el-radio>
|
||
<el-radio label="detailed">详细模式</el-radio>
|
||
</el-radio-group>
|
||
</el-form-item>
|
||
<el-form-item label="包含缺陷描述">
|
||
<el-switch v-model="config.keyinfo.includeDefect"></el-switch>
|
||
</el-form-item>
|
||
</el-form>
|
||
</el-card>
|
||
</div>
|
||
|
||
<!-- 图文匹配配置 -->
|
||
<div v-if="selectedFunctions.includes('match')">
|
||
<el-card shadow="never">
|
||
<div slot="header">图文匹配配置</div>
|
||
<el-form label-width="120px">
|
||
<el-form-item label="匹配精度">
|
||
<el-slider v-model="config.match.threshold" :min="50" :max="100"></el-slider>
|
||
</el-form-item>
|
||
<el-form-item label="自动修正">
|
||
<el-switch v-model="config.match.autoAdjust"></el-switch>
|
||
</el-form-item>
|
||
</el-form>
|
||
</el-card>
|
||
</div>
|
||
</div>
|
||
|
||
<div style="margin-top: 30px; text-align: center;">
|
||
<el-button @click="currentStep = 0">上一步</el-button>
|
||
<el-button
|
||
type="primary"
|
||
@click="startProcessing"
|
||
:loading="processing"
|
||
>
|
||
开始处理
|
||
</el-button>
|
||
</div>
|
||
</div>
|
||
|
||
<!-- 步骤3:结果验证 -->
|
||
<div v-show="currentStep === 2">
|
||
<h3>处理结果验证</h3>
|
||
|
||
<el-tabs type="border-card">
|
||
<!-- 语音转文字结果 -->
|
||
<el-tab-pane label="语音转文字" v-if="selectedFunctions.includes('speech2text')">
|
||
<div v-for="(result, index) in processResults.speech2text" :key="index">
|
||
<h4>{{ result.fileName }}</h4>
|
||
<div class="audio-wave">
|
||
<!-- 音频波形图占位 -->
|
||
<div style="position: absolute; top: 50%; left: 20px; transform: translateY(-50%);">
|
||
<i class="el-icon-headset" style="font-size: 24px;"></i>
|
||
</div>
|
||
</div>
|
||
<el-input
|
||
type="textarea"
|
||
:rows="4"
|
||
v-model="result.text"
|
||
style="margin-top: 10px;"
|
||
></el-input>
|
||
</div>
|
||
</el-tab-pane>
|
||
|
||
<!-- 关键信息提取结果 -->
|
||
<el-tab-pane label="关键信息" v-if="selectedFunctions.includes('keyinfo')">
|
||
<el-table :data="processResults.keyinfo" border style="width: 100%">
|
||
<el-table-column prop="fileName" label="文件名" width="180"></el-table-column>
|
||
<el-table-column prop="defectType" label="缺陷类型" width="120"></el-table-column>
|
||
<el-table-column prop="position" label="位置"></el-table-column>
|
||
<el-table-column prop="description" label="描述"></el-table-column>
|
||
</el-table>
|
||
</el-tab-pane>
|
||
|
||
<!-- 图文匹配结果 -->
|
||
<el-tab-pane label="图文匹配" v-if="selectedFunctions.includes('match')">
|
||
<div v-for="(result, index) in processResults.match" :key="index" class="match-result">
|
||
<div class="match-image">
|
||
<img :src="result.image" style="width: 100%; height: 100%; object-fit: contain;">
|
||
</div>
|
||
<div class="match-text">
|
||
<h4>匹配度: {{ result.score }}%</h4>
|
||
<el-input
|
||
type="textarea"
|
||
:rows="5"
|
||
v-model="result.text"
|
||
></el-input>
|
||
</div>
|
||
</div>
|
||
</el-tab-pane>
|
||
</el-tabs>
|
||
|
||
<div style="margin-top: 30px; text-align: center;">
|
||
<el-button @click="currentStep = 1">上一步</el-button>
|
||
<el-button type="primary" @click="currentStep = 3">确认结果</el-button>
|
||
</div>
|
||
</div>
|
||
|
||
<!-- 步骤4:完成导入 -->
|
||
<div v-show="currentStep === 3">
|
||
<h3>预处理完成</h3>
|
||
<el-result
|
||
icon="success"
|
||
title="数据处理成功"
|
||
:subTitle="`已完成 ${processedCount} 个文件的智能预处理`"
|
||
>
|
||
<template slot="extra">
|
||
<el-button type="primary" @click="importToPlatform">导入分析平台</el-button>
|
||
<el-button @click="exportResults">导出处理结果</el-button>
|
||
</template>
|
||
</el-result>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<script src="https://cdn.jsdelivr.net/npm/vue@2.6.14/dist/vue.js"></script>
|
||
<script src="https://unpkg.com/element-ui/lib/index.js"></script>
|
||
<script>
|
||
new Vue({
|
||
el: '#app',
|
||
data() {
|
||
return {
|
||
activeModule: 'data-preprocess',
|
||
currentStep: 0,
|
||
fileList: [],
|
||
availableFunctions: [
|
||
{ name: 'speech2text', label: '语音转文字' },
|
||
{ name: 'keyinfo', label: '关键信息提取' },
|
||
{ name: 'match', label: '图文智能匹配' }
|
||
],
|
||
selectedFunctions: ['speech2text', 'keyinfo', 'match'],
|
||
config: {
|
||
speech2text: {
|
||
language: 'zh-CN',
|
||
useGlossary: true
|
||
},
|
||
keyinfo: {
|
||
mode: 'standard',
|
||
includeDefect: true
|
||
},
|
||
match: {
|
||
threshold: 75,
|
||
autoAdjust: true
|
||
}
|
||
},
|
||
processing: false,
|
||
processResults: {
|
||
speech2text: [
|
||
{
|
||
fileName: '检查记录_20231105.mp3',
|
||
text: '发现1号机组2号叶片前缘有约3厘米的腐蚀痕迹,建议在下个月停机时进行修复处理。'
|
||
}
|
||
],
|
||
keyinfo: [
|
||
{
|
||
fileName: '检查报告_001.docx',
|
||
defectType: '前缘腐蚀',
|
||
position: '1号机组-2号叶片-前缘',
|
||
description: '长度约3cm,深度约2mm'
|
||
}
|
||
],
|
||
match: [
|
||
{
|
||
image: 'https://via.placeholder.com/800x600?text=叶片前缘腐蚀',
|
||
text: '图片显示1号机组2号叶片前缘有明显腐蚀痕迹,与2023年11月5日的检查记录相符',
|
||
score: 89
|
||
}
|
||
]
|
||
}
|
||
}
|
||
},
|
||
computed: {
|
||
processedCount() {
|
||
return this.fileList.length
|
||
}
|
||
},
|
||
methods: {
|
||
handleFileUpload(file, fileList) {
|
||
this.fileList = fileList
|
||
},
|
||
toggleFunction(funcName) {
|
||
const index = this.selectedFunctions.indexOf(funcName)
|
||
if (index >= 0) {
|
||
this.selectedFunctions.splice(index, 1)
|
||
} else {
|
||
this.selectedFunctions.push(funcName)
|
||
}
|
||
},
|
||
startProcessing() {
|
||
this.processing = true
|
||
// 模拟处理过程
|
||
setTimeout(() => {
|
||
this.processing = false
|
||
this.currentStep = 2
|
||
}, 2000)
|
||
},
|
||
importToPlatform() {
|
||
this.$message.success('数据已导入分析平台')
|
||
this.activeModule = 'data-platform'
|
||
},
|
||
exportResults() {
|
||
this.$message.success('处理结果导出成功')
|
||
}
|
||
}
|
||
})
|
||
</script>
|
||
</body>
|
||
</html> |