|
|
@@ -0,0 +1,193 @@
|
|
|
+
|
|
|
+<script setup lang="ts">
|
|
|
+import { ref } from 'vue'
|
|
|
+
|
|
|
+// 下载分类
|
|
|
+const categories = ref([
|
|
|
+ { id: 1, name: 'Windows' },
|
|
|
+ { id: 50, name: '信创/Linux' },
|
|
|
+ { id: 56, name: 'CMSV7客户端' },
|
|
|
+ { id: 60, name: 'APP' },
|
|
|
+ { id: 28, name: '对接SDK' },
|
|
|
+ { id: 37, name: '说明书' },
|
|
|
+ { id: 43, name: '功能列表' },
|
|
|
+ { id: 3, name: '协议标准' }
|
|
|
+])
|
|
|
+
|
|
|
+// 下载项数据
|
|
|
+const downloads = ref([
|
|
|
+ {
|
|
|
+ id: 1,
|
|
|
+ title: 'CMSserverV6服务器',
|
|
|
+ description: '服务器安装包,集公务车、渣土车、第三方、网约车、主动安全、校车六位一体的版本。',
|
|
|
+ version: '7.34.0.5_20250102',
|
|
|
+ size: '957.65 MB',
|
|
|
+ file: '/downloads/CMSServerV6-WIN-7.34.0.5-20250102.zip'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ id: 2,
|
|
|
+ title: 'CMSV6客户端(64位)',
|
|
|
+ description: '64位电脑客户端,车载平台和执法仪平台通用,适用于64位的Windows操作系统。',
|
|
|
+ version: '7.34.0.5_20250102',
|
|
|
+ size: '108.19 MB',
|
|
|
+ file: '/downloads/CMSV6-WIN-7.34.0.5-20250102.zip'
|
|
|
+ }
|
|
|
+])
|
|
|
+
|
|
|
+// 当前选中分类
|
|
|
+const activeCategory = ref(-1)
|
|
|
+
|
|
|
+// 处理下载
|
|
|
+const handleDownload = (filePath: string) => {
|
|
|
+ const link = document.createElement('a')
|
|
|
+ link.href = filePath
|
|
|
+ link.download = filePath.split('/').pop() || 'download.zip'
|
|
|
+ document.body.appendChild(link)
|
|
|
+ link.click()
|
|
|
+ document.body.removeChild(link)
|
|
|
+}
|
|
|
+</script>
|
|
|
+
|
|
|
+<template>
|
|
|
+ <div class="download-center">
|
|
|
+ <!-- 搜索区域 -->
|
|
|
+ <div class="search-box">
|
|
|
+ <input
|
|
|
+ type="text"
|
|
|
+ placeholder="请输入名称或内容"
|
|
|
+ class="search-input"
|
|
|
+ >
|
|
|
+ <button class="search-button">搜索</button>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <!-- 分类筛选 -->
|
|
|
+ <div class="category-filter">
|
|
|
+ <div
|
|
|
+ v-for="category in categories"
|
|
|
+ :key="category.id"
|
|
|
+ class="category-item"
|
|
|
+ :class="{ active: activeCategory === category.id }"
|
|
|
+ @click="activeCategory = category.id"
|
|
|
+ >
|
|
|
+ {{ category.name }}
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <!-- 下载列表 -->
|
|
|
+ <div class="download-list">
|
|
|
+ <div
|
|
|
+ v-for="item in downloads"
|
|
|
+ :key="item.id"
|
|
|
+ class="download-item"
|
|
|
+ >
|
|
|
+ <div class="download-info">
|
|
|
+ <h3>{{ item.title }}</h3>
|
|
|
+ <p>{{ item.description }}</p>
|
|
|
+ <div class="download-meta">
|
|
|
+ <span>版本: {{ item.version }}</span>
|
|
|
+ <span>大小: {{ item.size }}</span>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <button
|
|
|
+ class="download-button"
|
|
|
+ @click="handleDownload(item.file)"
|
|
|
+ >
|
|
|
+ 下载
|
|
|
+ </button>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+
|
|
|
+<style scoped>
|
|
|
+.download-center {
|
|
|
+ max-width: 1200px;
|
|
|
+ margin: 0 auto;
|
|
|
+ padding: 2rem;
|
|
|
+}
|
|
|
+
|
|
|
+.search-box {
|
|
|
+ display: flex;
|
|
|
+ margin-bottom: 2rem;
|
|
|
+ gap: 1rem;
|
|
|
+}
|
|
|
+
|
|
|
+.search-input {
|
|
|
+ flex: 1;
|
|
|
+ padding: 0.75rem 1rem;
|
|
|
+ border: 1px solid #ddd;
|
|
|
+ border-radius: 4px;
|
|
|
+ font-size: 1rem;
|
|
|
+}
|
|
|
+
|
|
|
+.search-button {
|
|
|
+ padding: 0 2rem;
|
|
|
+ background: #3270FF;
|
|
|
+ color: white;
|
|
|
+ border: none;
|
|
|
+ border-radius: 4px;
|
|
|
+ cursor: pointer;
|
|
|
+ font-size: 1rem;
|
|
|
+}
|
|
|
+
|
|
|
+.category-filter {
|
|
|
+ display: flex;
|
|
|
+ flex-wrap: wrap;
|
|
|
+ gap: 0.5rem;
|
|
|
+ margin-bottom: 2rem;
|
|
|
+}
|
|
|
+
|
|
|
+.category-item {
|
|
|
+ padding: 0.5rem 1rem;
|
|
|
+ background: #f5f5f5;
|
|
|
+ border-radius: 4px;
|
|
|
+ cursor: pointer;
|
|
|
+}
|
|
|
+
|
|
|
+.category-item.active {
|
|
|
+ background: #3270FF;
|
|
|
+ color: white;
|
|
|
+}
|
|
|
+
|
|
|
+.download-list {
|
|
|
+ display: grid;
|
|
|
+ gap: 1.5rem;
|
|
|
+}
|
|
|
+
|
|
|
+.download-item {
|
|
|
+ display: flex;
|
|
|
+ justify-content: space-between;
|
|
|
+ align-items: center;
|
|
|
+ padding: 1.5rem;
|
|
|
+ background: white;
|
|
|
+ border-radius: 8px;
|
|
|
+ box-shadow: 0 2px 8px rgba(0,0,0,0.1);
|
|
|
+}
|
|
|
+
|
|
|
+.download-info h3 {
|
|
|
+ margin: 0 0 0.5rem;
|
|
|
+ font-size: 1.25rem;
|
|
|
+}
|
|
|
+
|
|
|
+.download-info p {
|
|
|
+ margin: 0 0 1rem;
|
|
|
+ color: #666;
|
|
|
+}
|
|
|
+
|
|
|
+.download-meta {
|
|
|
+ display: flex;
|
|
|
+ gap: 1rem;
|
|
|
+ color: #888;
|
|
|
+ font-size: 0.875rem;
|
|
|
+}
|
|
|
+
|
|
|
+.download-button {
|
|
|
+ padding: 0.5rem 1.5rem;
|
|
|
+ background: #3270FF;
|
|
|
+ color: white;
|
|
|
+ border: none;
|
|
|
+ border-radius: 4px;
|
|
|
+ cursor: pointer;
|
|
|
+ font-size: 1rem;
|
|
|
+}
|
|
|
+</style>
|