Compare commits

...

No commits in common. 'master' and 'backup-before-author-change' have entirely different histories.

  1. 28
      .gitignore
  2. 24
      README.md
  3. 5
      babel.config.js
  4. 19
      jsconfig.json
  5. 19514
      package-lock.json
  6. 44
      package.json
  7. BIN
      public/favicon.ico
  8. 17
      public/index.html
  9. 212
      src/App.vue
  10. BIN
      src/assets/logo.png
  11. 58
      src/components/HelloWorld.vue
  12. 31
      src/components/Layout/Header.vue
  13. 50
      src/components/Layout/Sidebar.vue
  14. 36
      src/components/Question/QuestionSearch.vue
  15. 69
      src/components/Question/QuestionTable.vue
  16. 38
      src/components/Tabs/TabNavigation.vue
  17. 8
      src/main.js
  18. 37
      src/router/index.js
  19. 0
      src/views/HomeView.vue
  20. 0
      src/views/OneView.vue
  21. 0
      src/views/ProblemView.vue
  22. 0
      src/views/QuestionManage.vue
  23. 0
      src/views/ReportView.vue
  24. 0
      src/views/TestView.vue
  25. 0
      src/views/WrongQuestion.vue
  26. 4
      vue.config.js

28
.gitignore

@ -1,11 +1,23 @@
# ---> Vue
# gitignore template for Vue.js projects
#
# Recommended template: Node.gitignore
.DS_Store
node_modules
/dist
# TODO: where does this rule come from?
docs/_book
# TODO: where does this rule come from?
test/
# local env files
.env.local
.env.*.local
# Log files
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
# Editor directories and files
.idea
.vscode
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?

24
README.md

@ -1,2 +1,24 @@
# Knowledge_Test_Vue
# evaluation-system
## Project setup
```
npm install
```
### Compiles and hot-reloads for development
```
npm run serve
```
### Compiles and minifies for production
```
npm run build
```
### Lints and fixes files
```
npm run lint
```
### Customize configuration
See [Configuration Reference](https://cli.vuejs.org/config/).

5
babel.config.js

@ -0,0 +1,5 @@
module.exports = {
presets: [
'@vue/cli-plugin-babel/preset'
]
}

19
jsconfig.json

@ -0,0 +1,19 @@
{
"compilerOptions": {
"target": "es5",
"module": "esnext",
"baseUrl": "./",
"moduleResolution": "node",
"paths": {
"@/*": [
"src/*"
]
},
"lib": [
"esnext",
"dom",
"dom.iterable",
"scripthost"
]
}
}

19514
package-lock.json
File diff suppressed because it is too large
View File

44
package.json

@ -0,0 +1,44 @@
{
"name": "evaluation-system",
"version": "0.1.0",
"private": true,
"scripts": {
"serve": "vue-cli-service serve",
"build": "vue-cli-service build",
"lint": "vue-cli-service lint"
},
"dependencies": {
"core-js": "^3.8.3",
"vue": "^2.6.14",
"vue-router": "^3.6.5"
},
"devDependencies": {
"@babel/core": "^7.12.16",
"@babel/eslint-parser": "^7.12.16",
"@vue/cli-plugin-babel": "~5.0.0",
"@vue/cli-plugin-eslint": "~5.0.0",
"@vue/cli-service": "~5.0.0",
"eslint": "^7.32.0",
"eslint-plugin-vue": "^8.0.3",
"vue-template-compiler": "^2.6.14"
},
"eslintConfig": {
"root": true,
"env": {
"node": true
},
"extends": [
"plugin:vue/essential",
"eslint:recommended"
],
"parserOptions": {
"parser": "@babel/eslint-parser"
},
"rules": {}
},
"browserslist": [
"> 1%",
"last 2 versions",
"not dead"
]
}

BIN
public/favicon.ico

17
public/index.html

@ -0,0 +1,17 @@
<!DOCTYPE html>
<html lang="">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
<title><%= htmlWebpackPlugin.options.title %></title>
</head>
<body>
<noscript>
<strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
</noscript>
<div id="app"></div>
<!-- built files will be auto injected -->
</body>
</html>

212
src/App.vue

@ -0,0 +1,212 @@
<!--全局样式-->
<template>
<div id="app">
<Header />
<div class="container">
<Sidebar />
<div class="content">
<div class="title">测评系统后台</div>
<TabNavigation :active-tab="activeTab" @update:activeTab="activeTab = $event" />
<!-- 内容区域 -->
<div v-if="activeTab === 'question'" class="question-management">
<QuestionSearch />
<QuestionTable />
</div>
<!-- 其他模块占位 -->
<div v-else class="placeholder">
<p>当前模块内容暂未开发</p>
</div>
<div class="footer-btn">
<button class="btn-red">应用</button>
</div>
</div>
</div>
</div>
</template>
<script>
import Header from './components/Layout/Header.vue'
import Sidebar from './components/Layout/Sidebar.vue'
import TabNavigation from './components/Tabs/TabNavigation.vue'
import QuestionSearch from './components/Question/QuestionSearch.vue'
import QuestionTable from './components/Question/QuestionTable.vue'
export default {
name: 'App',
components: {
Header,
Sidebar,
TabNavigation,
QuestionSearch,
QuestionTable
},
data() {
return {
activeTab: 'question'
}
}
}
</script>
<style>/* 保持原有的全局样式 */
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: 'Arial', sans-serif;
background-color: #f5f5f5;
}
#app {
width: 100%;
height: 100vh;
display: flex;
flex-direction: column;
}
.header {
height: 60px;
background-color: white;
display: flex;
align-items: center;
justify-content: flex-start;
padding-left: 20px;
box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.logo {
color: #e74c3c;
font-weight: bold;
font-size: 18px;
}
.container {
display: flex;
flex: 1;
overflow: hidden;
}
.content {
flex: 1;
padding: 20px;
background-color: white;
overflow-y: auto;
}
.title {
font-size: 20px;
margin-bottom: 20px;
color: #333;
}
.tabs {
display: flex;
gap: 10px;
margin-bottom: 20px;
}
.tab-btn {
padding: 8px 16px;
background-color: #e74c3c;
color: white;
border: none;
border-radius: 4px;
cursor: pointer;
transition: opacity 0.3s;
}
.tab-btn:hover {
background-color: #c0392b;
}
.tab-btn.active {
opacity: 0.5;
}
.search-area {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 20px;
gap: 20px;
}
.search-item {
display: flex;
flex-direction: column;
min-width: 160px;
}
.search-item label {
margin-bottom: 5px;
font-size: 14px;
color: #666;
}
.search-item select,
.search-item input {
padding: 8px;
border: 1px solid #ccc;
border-radius: 4px;
font-size: 14px;
}
.btn-group {
display: flex;
gap: 10px;
}
.btn-red {
padding: 8px 16px;
background-color: #e74c3c;
color: white;
border: none;
border-radius: 4px;
cursor: pointer;
}
.btn-red.small {
padding: 4px 10px;
font-size: 12px;
}
.table-container {
width: 100%;
border-collapse: collapse;
margin-top: 10px;
}
table {
width: 100%;
border-collapse: collapse;
background-color: white;
}
th,
td {
padding: 12px;
text-align: left;
border-bottom: 1px solid #ddd;
}
th {
background-color: #f2f2f2;
font-weight: normal;
color: #333;
}
tr:hover {
background-color: #f9f9f9;
}
.footer-btn {
position: absolute;
bottom: 20px;
right: 20px;
}
</style>

BIN
src/assets/logo.png

After

Width: 200  |  Height: 200  |  Size: 6.7 KiB

58
src/components/HelloWorld.vue

@ -0,0 +1,58 @@
<template>
<div class="hello">
<h1>{{ msg }}</h1>
<p>
For a guide and recipes on how to configure / customize this project,<br>
check out the
<a href="https://cli.vuejs.org" target="_blank" rel="noopener">vue-cli documentation</a>.
</p>
<h3>Installed CLI Plugins</h3>
<ul>
<li><a href="https://github.com/vuejs/vue-cli/tree/dev/packages/%40vue/cli-plugin-babel" target="_blank" rel="noopener">babel</a></li>
<li><a href="https://github.com/vuejs/vue-cli/tree/dev/packages/%40vue/cli-plugin-eslint" target="_blank" rel="noopener">eslint</a></li>
</ul>
<h3>Essential Links</h3>
<ul>
<li><a href="https://vuejs.org" target="_blank" rel="noopener">Core Docs</a></li>
<li><a href="https://forum.vuejs.org" target="_blank" rel="noopener">Forum</a></li>
<li><a href="https://chat.vuejs.org" target="_blank" rel="noopener">Community Chat</a></li>
<li><a href="https://twitter.com/vuejs" target="_blank" rel="noopener">Twitter</a></li>
<li><a href="https://news.vuejs.org" target="_blank" rel="noopener">News</a></li>
</ul>
<h3>Ecosystem</h3>
<ul>
<li><a href="https://router.vuejs.org" target="_blank" rel="noopener">vue-router</a></li>
<li><a href="https://vuex.vuejs.org" target="_blank" rel="noopener">vuex</a></li>
<li><a href="https://github.com/vuejs/vue-devtools#vue-devtools" target="_blank" rel="noopener">vue-devtools</a></li>
<li><a href="https://vue-loader.vuejs.org" target="_blank" rel="noopener">vue-loader</a></li>
<li><a href="https://github.com/vuejs/awesome-vue" target="_blank" rel="noopener">awesome-vue</a></li>
</ul>
</div>
</template>
<script>
export default {
name: 'HelloWorld',
props: {
msg: String
}
}
</script>
<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>
h3 {
margin: 40px 0 0;
}
ul {
list-style-type: none;
padding: 0;
}
li {
display: inline-block;
margin: 0 10px;
}
a {
color: #42b983;
}
</style>

31
src/components/Layout/Header.vue

@ -0,0 +1,31 @@
<!--头部组件-->
<template>
<div class="header">
<div class="logo">Homily Link</div>
</div>
</template>
<script>
export default {
// eslint-disable-next-line vue/multi-word-component-names
name: 'Header'
}
</script>
<style scoped>
.header {
height: 60px;
background-color: white;
display: flex;
align-items: center;
justify-content: flex-start;
padding-left: 20px;
box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.logo {
color: #e74c3c;
font-weight: bold;
font-size: 18px;
}
</style>

50
src/components/Layout/Sidebar.vue

@ -0,0 +1,50 @@
<!--侧边栏组件-->
<template>
<div class="sidebar">
<ul class="sidebar-menu">
<li>主页</li>
<li>发文章</li>
<li>我的内容</li>
<li>我的收藏</li>
<li>评论管理</li>
<li>账号设置</li>
<li class="active">测评管理</li>
</ul>
</div>
</template>
<script>
export default {
name: 'SideBar'
}
</script>
<style scoped>
.sidebar {
width: 200px;
background-color: #f5f5f5;
height: 100%;
border-right: 1px solid #ddd;
}
.sidebar-menu {
list-style: none;
padding: 0;
margin: 0;
}
.sidebar-menu li {
padding: 15px 20px;
cursor: pointer;
transition: background-color 0.3s;
}
.sidebar-menu li:hover {
background-color: #e0e0e0;
}
.sidebar-menu li.active {
background-color: #d1ecf1;
color: #007bff;
}
</style>

36
src/components/Question/QuestionSearch.vue

@ -0,0 +1,36 @@
<!--搜索区域-->
<template>
<div class="search-area">
<div class="search-item">
<label>题目类型</label>
<select>
<option>股票知识</option>
<option>基金知识</option>
<option>投资策略</option>
</select>
</div>
<div class="search-item">
<label>题干查找</label>
<input type="text" placeholder="请输入题干关键词" />
</div>
<div class="search-item">
<label>课程推荐</label>
<select>
<option>量能擒牛</option>
<option>趋势交易</option>
<option>基本面分析</option>
</select>
</div>
<div class="btn-group">
<button class="btn-red">查找</button>
<button class="btn-red">新增题目</button>
<button class="btn-red">Excel导出</button>
</div>
</div>
</template>
<script>
export default {
name: 'QuestionSearch'
}
</script>

69
src/components/Question/QuestionTable.vue

@ -0,0 +1,69 @@
<template>
<div class="table-container">
<table>
<thead>
<tr>
<th>ID</th>
<th>题干</th>
<th>题目类型</th>
<th>出错次数</th>
<th>出错率</th>
<th>推荐课程</th>
<th>操作</th>
</tr>
</thead>
<tbody>
<tr>
<td>1</td>
<td>以下哪项不是股票的基本特征</td>
<td>股票知识</td>
<td>50</td>
<td>50%</td>
<td>量能擒牛</td>
<td>
<button class="btn-red small">查看</button>
<button class="btn-red small">修改</button>
<button class="btn-red small">删除</button>
</td>
</tr>
</tbody>
</table>
</div>
</template>
<script>
export default {
name: 'QuestionTable'
}
</script>
<style scoped>
.table-container {
width: 100%;
border-collapse: collapse;
margin-top: 10px;
}
table {
width: 100%;
border-collapse: collapse;
background-color: white;
}
th,
td {
padding: 12px;
text-align: left;
border-bottom: 1px solid #ddd;
}
th {
background-color: #f2f2f2;
font-weight: normal;
color: #333;
}
tr:hover {
background-color: #f9f9f9;
}
</style>

38
src/components/Tabs/TabNavigation.vue

@ -0,0 +1,38 @@
<!--标签页导航-->
<template>
<div class="tabs">
<button
class="tab-btn"
:class="{ active: activeTab === 'user' }"
@click="$emit('update:activeTab', 'user')"
>
用户数据
</button>
<button
class="tab-btn"
:class="{ active: activeTab === 'wrong' }"
@click="$emit('update:activeTab', 'wrong')"
>
错题统计
</button>
<button
class="tab-btn"
:class="{ active: activeTab === 'question' }"
@click="$emit('update:activeTab', 'question')"
>
题库管理
</button>
</div>
</template>
<script>
export default {
name: 'TabNavigation',
props: {
activeTab: {
type: String,
required: true
}
}
}
</script>

8
src/main.js

@ -0,0 +1,8 @@
import Vue from 'vue'
import App from './App.vue'
Vue.config.productionTip = false
new Vue({
render: h => h(App),
}).$mount('#app')

37
src/router/index.js

@ -0,0 +1,37 @@
import Vue from 'vue'
import VueRouter from 'vue-router'
import QuestionManage from '@/views/QuestionManage.vue'
import UserStatistics from '@/views/UserStatistics.vue'
import WrongQuestion from '@/views/WrongQuestion.vue'
Vue.use(VueRouter)
const routes = [
{
path: '/',
redirect: '/questions'
},
{
path: '/questions',
name: 'QuestionManage',
component: QuestionManage
},
{
path: '/users',
name: 'UserStatistics',
component: UserStatistics
},
{
path: '/wrong-questions',
name: 'WrongQuestion',
component: WrongQuestion
}
]
const router = new VueRouter({
mode: 'history',
base: process.env.BASE_URL,
routes
})
export default router

0
src/views/HomeView.vue

0
src/views/OneView.vue

0
src/views/ProblemView.vue

0
src/views/QuestionManage.vue

0
src/views/ReportView.vue

0
src/views/TestView.vue

0
src/views/WrongQuestion.vue

4
vue.config.js

@ -0,0 +1,4 @@
const { defineConfig } = require('@vue/cli-service')
module.exports = defineConfig({
transpileDependencies: true
})
Loading…
Cancel
Save