提交 6dcbeb07 authored 作者: caijian's avatar caijian

first commit

上级
VITE_BASE_API= '/api'
\ No newline at end of file
# 线上地址
VITE_BASE_API= '/api'
\ No newline at end of file
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*
# Dependencies
node_modules
.pnpm
.npm
# Build outputs
dist
dist-ssr
*.local
# Environment variables
.env
.env.local
.env.development.local
.env.test.local
.env.production.local
# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
# OS generated files
Thumbs.db
.DS_Store
# Runtime data
pids
*.pid
*.seed
*.pid.lock
# Coverage directory used by tools like istanbul
coverage
*.lcov
# nyc test coverage
.nyc_output
# Dependency directories
jspm_packages/
# Optional npm cache directory
.npm
# Optional eslint cache
.eslintcache
# Microbundle cache
.rpt2_cache/
.rts2_cache_cjs/
.rts2_cache_es/
.rts2_cache_umd/
# Optional REPL history
.node_repl_history
# Output of 'npm pack'
*.tgz
# Yarn Integrity file
.yarn-integrity
# parcel-bundler cache (https://parceljs.org/)
.cache
.parcel-cache
# Next.js build output
.next
# Nuxt.js build / generate output
.nuxt
# Storybook build outputs
.out
.storybook-out
# Temporary folders
tmp/
temp/
\ No newline at end of file
# Think Tank
一个基于 Vue 3 + Element Plus + Vue Router 的现代化前端项目模板。
## 技术栈
- **Vue 3** - 渐进式 JavaScript 框架
- **Element Plus** - 基于 Vue 3 的企业级 UI 组件库
- **Vue Router** - Vue.js 官方路由管理器
- **Vite** - 下一代前端构建工具
## 项目特性
- ✨ 使用 Vue 3 Composition API
- 🎨 集成 Element Plus UI 组件库
- 🚀 Vite 构建工具,开发体验极佳
- 📱 响应式设计,支持多种设备
- 🛣️ Vue Router 路由管理
- 🔧 自动导入配置,开发更高效
## 快速开始
### 安装依赖
```bash
npm install
```
### 启动开发服务器
```bash
npm run dev
```
### 构建生产版本
```bash
npm run build
```
### 预览生产构建
```bash
npm run preview
```
## 项目结构
```
think-tank/
├── src/
│ ├── components/ # 可复用组件
│ ├── views/ # 页面组件
│ ├── router/ # 路由配置
│ ├── App.vue # 根组件
│ └── main.js # 应用入口
├── package.json # 项目配置
├── vite.config.js # Vite 配置
└── index.html # HTML 模板
```
## 开发指南
### 添加新页面
1.`src/views/` 目录下创建新的 Vue 组件
2.`src/router/index.js` 中添加路由配置
3. 在导航菜单中添加链接
### 使用 Element Plus 组件
项目已配置自动导入,可以直接使用 Element Plus 组件:
```vue
<template>
<el-button type="primary">按钮</el-button>
<el-input v-model="input" placeholder="请输入内容"></el-input>
</template>
```
### 图标使用
项目已全局注册 Element Plus 图标,可以直接使用:
```vue
<template>
<el-icon><User /></el-icon>
</template>
<script setup>
import { User } from '@element-plus/icons-vue'
</script>
```
## 浏览器支持
- Chrome >= 87
- Firefox >= 78
- Safari >= 14
- Edge >= 88
## 许可证
MIT License
\ No newline at end of file
File added
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>某方向风险监测预警系统</title>
</head>
<body>
<div id="app"></div>
<script type="module" src="/src/main.js"></script>
</body>
</html>
\ No newline at end of file
{
"compilerOptions": {
"baseUrl": "src",
"paths": {
"@/*": ["*"]
},
"target": "esnext",
"module": "esnext",
"moduleResolution": "node",
"allowJs": true,
},
"include": ["src/**/*"],
"exclude": ["node_modules", "dist"]
}
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
{
"name": "think-tank",
"version": "1.0.0",
"description": "Vue3 + Element Plus + Vue Router 项目",
"main": "index.js",
"scripts": {
"dev": "vite",
"build": "vite build",
"preview": "vite preview",
"serve": "vite preview"
},
"keywords": [
"vue3",
"element-plus",
"vue-router",
"vite"
],
"author": "",
"license": "MIT",
"dependencies": {
"@element-plus/icons-vue": "^2.3.1",
"axios": "^1.12.2",
"echarts": "^5.4.3",
"echarts-wordcloud": "^2.1.0",
"element-plus": "^2.4.4",
"vue": "^3.4.0",
"vue-router": "^4.2.5"
},
"devDependencies": {
"@vitejs/plugin-vue": "^5.0.0",
"sass": "^1.92.1",
"unplugin-auto-import": "^0.17.0",
"unplugin-vue-components": "^0.26.0",
"vite": "^5.0.0"
}
}
<template>
<div id="app">
<el-container>
<el-header>
<nav class="navbar">
<div class="nav-brand">
<el-icon class="brand-icon"><Monitor /></el-icon>
<span class="brand-text">某方向风险监测预警系统</span>
</div>
<div class="nav-menu">
<el-dropdown @command="handleHomeCommand" class="home-dropdown">
<div class="nav-link dropdown-trigger">
<el-icon><House /></el-icon>
<span>首页</span>
<el-icon class="dropdown-arrow"><ArrowDown /></el-icon>
</div>
<template #dropdown>
<el-dropdown-menu>
<el-dropdown-item command="/">智库首页</el-dropdown-item>
<el-dropdown-item command="/billHome">法案首页</el-dropdown-item>
</el-dropdown-menu>
</template>
</el-dropdown>
<div class="nav-link">
<el-icon><User /></el-icon>
<span>国家</span>
</div>
<div class="nav-link">
<el-icon><Location /></el-icon>
<span>领域</span>
</div>
<div class="nav-link">
<el-icon><Document /></el-icon>
<span>要素</span>
</div>
<div class="nav-link">
<el-icon><Bell /></el-icon>
<span>事件</span>
</div>
</div>
<div class="user-info">
<el-icon><Message /></el-icon>
<el-icon><User /></el-icon>
<span>管理员</span>
</div>
</nav>
</el-header>
<el-main class="main-container">
<router-view />
</el-main>
</el-container>
</div>
</template>
<script setup>
import { Monitor, House, User, Location, Document, Bell, Message, ArrowDown } from '@element-plus/icons-vue'
import { useRouter } from 'vue-router'
const router = useRouter()
const handleHomeCommand = (command) => {
router.push(command)
}
</script>
<style>
/* 全局样式重置 */
* {
box-sizing: border-box;
}
html, body {
margin: 0;
padding: 0;
width: 100%;
height: 100%;
}
body {
font-family: 'Helvetica Neue', Helvetica, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', '微软雅黑', Arial, sans-serif;
}
</style>
<style scoped>
#app {
font-family: 'Helvetica Neue', Helvetica, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', '微软雅黑', Arial, sans-serif;
width: 100%;
min-height: 100vh;
}
/* 确保Element Plus容器组件占满宽度 */
.el-container {
width: 100%;
min-height: 100vh;
}
.navbar {
display: flex;
justify-content: center;
align-items: center;
padding: 0 24px;
background: white;
color: #333;
height: 100%;
border-bottom: 1px solid #e5e7eb;
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
position: relative;
}
.main-container {
/* 移除宽度限制,让子页面自己控制布局 */
width: 100%;
}
.nav-brand {
display: flex;
align-items: center;
gap: 12px;
position: absolute;
left: 24px;
}
.brand-icon {
font-size: 24px;
color: #1e3a8a;
}
.brand-text {
font-size: 18px;
font-weight: 600;
color: #333;
}
.nav-menu {
display: flex;
align-items: center;
gap: 32px;
}
.nav-link {
display: flex;
align-items: center;
gap: 6px;
color: #333;
text-decoration: none;
padding: 8px 12px;
border-radius: 6px;
transition: all 0.3s;
font-size: 14px;
cursor: pointer;
}
.nav-link:hover,
.nav-link.router-link-active {
background-color: #1459BB;
color: #fff;
}
.home-dropdown {
display: inline-block;
}
.dropdown-trigger {
cursor: pointer;
}
.dropdown-arrow {
font-size: 12px;
margin-left: 4px;
transition: transform 0.3s;
}
.home-dropdown:hover .dropdown-arrow {
transform: rotate(180deg);
}
.user-info {
display: flex;
align-items: center;
gap: 8px;
padding: 8px 12px;
background: #f3f4f6;
border-radius: 6px;
color: #333;
position: absolute;
right: 24px;
}
.el-header {
padding: 0;
height: 60px;
}
.el-main {
padding: 0;
min-height: calc(100vh - 60px);
background-color: rgba(246, 251, 255, 1);
}
</style>
\ No newline at end of file
差异被折叠。
import request from "@/api/request.js";
// 基本信息-根据法案ID获取法案信息
/**
* @param {id}
*/
export function getBillInfo(params) {
return request({
method: 'GET',
url: `/billInfoBean/info/${params.id}`,
params,
})
}
// 提出人-根据动议ID获取对应的提出人信息
/**
* @param {id}
* @header token
*/
export function getBillPerson(params) {
return request({
method: 'GET',
url: `/billInfoBean/person/${params.id}`,
params,
})
}
// 法案进程、相关事件(最新进展)-根据法案ID获取事件信息
/**
* @param {id}
* @header token
*/
export function getBillEvent(params) {
return request({
method: 'GET',
url: `/billInfoBean/event/${params.id}`,
params,
})
}
// 法案进程(前期进展)-根据法案ID获取动议流程
/**
* @param {id}
* @header token
*/
export function getBillDyqk(params) {
return request({
method: 'GET',
url: `/billInfoBean/dyqk/${params.id}`,
params,
})
}
// 立法背景-根据法案ID获取背景内容
/**
* @param {id,cRelated,currentPage,pageSize}
* @header token
*/
export function getBillBackground(params) {
return request({
method: 'GET',
url: `/billInfoBean/background/${params.id}`,
params,
})
}
// 议员相关性-根据法案ID获取议员分析信息(现在只包括名称 支持 反对,没有标签和事件动态)
/**
* @param {id, isOppose}
* @header token
*/
export function getBillPersonAnalyze(params) {
return request({
method: 'GET',
url: `/billInfoBean/personAnalyze/${params.id}`,
params,
})
}
// 主要条款-根据法案ID获取原文id列表
/**
* @param {id}
* @header token
*/
export function getBillContentId(params) {
return request({
method: 'GET',
url: `/billInfoBean/contentId/${params.id}`,
params,
})
}
// 主要条款-根据原文ID获取条款内容
/**
* @param {id,cRelated,currentPage,pageSize}
* @header token
*/
export function getBillContentTk(params) {
return request({
method: 'GET',
url: `/billInfoBean/content/tk/${params.id}`,
params,
})
}
// 限制方式-根据法案原文ID获取限制方式列表
/**
* @param {id}
* @header token
*/
export function getBillContentXzfs(params) {
return request({
method: 'GET',
url: `/billInfoBean/content/xzfs/${params.id}`,
params,
})
}
// 涉及行业-根据法案原文ID获取行业领域列表
/**
* @param {id}
* @header token
*/
export function getBillHyly(params) {
return request({
method: 'GET',
url: `/billInfoBean/content/hyly/${params.id}`,
params,
})
}
\ No newline at end of file
import request from "@/api/request.js";
// 根据法案ID获取耗时分析
/**
* @param {id}
*/
export function getBillTimeAnalyze(params) {
return request({
method: 'GET',
url: `/billDeepDive/processAnalyze/time/${params.id}`,
params,
})
}
// 根据法案ID获取党派政治献金
/**
* @param {id, personCongress}
*/
export function getBillTotalXj(params) {
return request({
method: 'GET',
url: `/billDeepDive/processAnalyze/totalxj/${params.id}`,
params,
})
}
// 根据法案ID获取投票情况
/**
* @param {id}
*/
export function getBillTp(params) {
return request({
method: 'GET',
url: `/billDeepDive/processAnalyze/tp/${params.id}`,
params,
})
}
// 根据法案ID获取政治献金
/**
* @param {id, personCongress}
*/
export function getBillXj(params) {
return request({
method: 'GET',
url: `/billDeepDive/processAnalyze/xj/${params.id}`,
params,
})
}
// 根据动议ID获取动议详细信息
/**
* @param {id}
*/
export function getProcessSummaryDetail(params) {
return request({
method: 'GET',
url: `/billDeepDive/processSummary/detail/${params.id}`,
params,
})
}
// 根据动议ID获取条款内容
/**
* @param {id,cRelated,currentPage,pageSize}
*/
export function getProcessSummaryTk(params) {
return request({
method: 'GET',
url: `/billDeepDive/processSummary/tk/${params.id}`,
params,
})
}
// 根据动议ID获取动议流程
/**
* @param {id}
*/
export function getProcessSummary(params) {
return request({
method: 'GET',
url: `/billDeepDive/processSummary/${params.id}`,
params,
})
}
\ No newline at end of file
import request from "@/api/request.js";
// 获取热门法案列表
export function getHotBills() {
return request({
method: 'GET',
url: '/BillOverview/hotBills',
})
}
// 根据法案类型获取法案列表
/**
* @param {type}
*/
export function getBillsByType(params) {
return request({
method: 'GET',
url: '/BillOverview/bills',
params,
})
}
// 根据行业领域字典列表
export function getHylyList() {
return request({
method: 'GET',
url: `/billImpactAnalysis/industry/hylyList`,
})
}
\ No newline at end of file
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论