diff --git a/ruoyi-ui/dist.tar b/ruoyi-ui/dist.tar
index 150f221..f7eeac5 100644
Binary files a/ruoyi-ui/dist.tar and b/ruoyi-ui/dist.tar differ
diff --git a/ruoyi-ui/src/api/login.js b/ruoyi-ui/src/api/login.js
index 1588936..773cf9f 100644
--- a/ruoyi-ui/src/api/login.js
+++ b/ruoyi-ui/src/api/login.js
@@ -1,10 +1,11 @@
import request from '@/utils/request'
// 登录方法
-export function login(username, passwordEncode) {
+export function login(username, passwordEncode ,TOKEN) {
const data = {
username,
passwordEncode,
+ TOKEN
}
return request({
url: '/api/sysUser/login',
diff --git a/ruoyi-ui/src/api/report.js b/ruoyi-ui/src/api/report.js
new file mode 100644
index 0000000..3123012
--- /dev/null
+++ b/ruoyi-ui/src/api/report.js
@@ -0,0 +1,9 @@
+import request from '@/utils/request'
+// 获取实训结束的成员列表
+export const getMemberList = (data) => {
+ return request({
+ url: '/api/report/getReportDtos',
+ method: 'get',
+ params:data
+ })
+}
\ No newline at end of file
diff --git a/ruoyi-ui/src/api/testreport.js b/ruoyi-ui/src/api/testreport.js
index c1658a2..b118af6 100644
--- a/ruoyi-ui/src/api/testreport.js
+++ b/ruoyi-ui/src/api/testreport.js
@@ -31,6 +31,14 @@ export const getReport = (id) => {
params: id
})
}
+// 获取结束学生上传的实验报告
+export const getReportById = (id) => {
+ return request({
+ url: '/api/report/getReportById',
+ method: 'get',
+ params: id
+ })
+}
// 实验报告上传评分
export const uploadScore = (report) => {
return request({
diff --git a/ruoyi-ui/src/assets/icons/svg/EarlyWarning.svg b/ruoyi-ui/src/assets/icons/svg/EarlyWarning.svg
index 4943a2f..81b7259 100644
--- a/ruoyi-ui/src/assets/icons/svg/EarlyWarning.svg
+++ b/ruoyi-ui/src/assets/icons/svg/EarlyWarning.svg
@@ -1 +1 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/ruoyi-ui/src/assets/icons/svg/doubt.svg b/ruoyi-ui/src/assets/icons/svg/doubt.svg
new file mode 100644
index 0000000..74e8bda
--- /dev/null
+++ b/ruoyi-ui/src/assets/icons/svg/doubt.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/ruoyi-ui/src/assets/icons/svg/report.svg b/ruoyi-ui/src/assets/icons/svg/report.svg
new file mode 100644
index 0000000..98b61fb
--- /dev/null
+++ b/ruoyi-ui/src/assets/icons/svg/report.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/ruoyi-ui/src/assets/images/1@2x.png b/ruoyi-ui/src/assets/images/1@2x.png
index bee360f..df3856a 100644
Binary files a/ruoyi-ui/src/assets/images/1@2x.png and b/ruoyi-ui/src/assets/images/1@2x.png differ
diff --git a/ruoyi-ui/src/assets/images/forex.jpg b/ruoyi-ui/src/assets/images/forex.jpg
new file mode 100644
index 0000000..ff9643c
Binary files /dev/null and b/ruoyi-ui/src/assets/images/forex.jpg differ
diff --git a/ruoyi-ui/src/assets/images/logo-full-fff-286x95.png b/ruoyi-ui/src/assets/images/logo-full-fff-286x95.png
new file mode 100644
index 0000000..898ec55
Binary files /dev/null and b/ruoyi-ui/src/assets/images/logo-full-fff-286x95.png differ
diff --git a/ruoyi-ui/src/components/current/index.vue b/ruoyi-ui/src/components/current/index.vue
index 7162692..8241935 100644
--- a/ruoyi-ui/src/components/current/index.vue
+++ b/ruoyi-ui/src/components/current/index.vue
@@ -190,10 +190,19 @@
}
},
mounted(){
+ const path = this.$route.path
setTimeout(() => {
- this.localStorageValue=localStorage.getItem('status')
- this.takeStash.memberId = this.currentId
- this.getlist()
+ //拿到当前路由地址
+ if(path !== '/student/training/homepageage'){
+ localStorage.removeItem('status')
+ this.takeStash.memberId = this.currentId
+ this.getlist()
+ } else{
+ this.localStorageValue=localStorage.getItem('status')
+ this.takeStash.memberId = this.currentId
+ this.getlist()
+ }
+
}, 500);
},
@@ -203,22 +212,30 @@
this.tableData = res?.data.list
this.total = res?.data.total
if(this.tableData == null || this.tableData.length == 0 || this.localStorageValue == 'FINISHED') {
- clearInterval(this.timer)
- return
+ if (this.timer) {
+ clearInterval(this.timer);
+ this.timer = null;
+ }
+ return
+ }
+ if (!this.timer) {
+ this.timer = setInterval(() => {
+ this.price(this.tableData);
+ }, 5000);
}
- this.timer= setInterval(() => {
- this.price(this.tableData)
- }, 5000);
})
},
price(data){
currentPosition.flashProfitAndLoss(data).then(res => {
if(res.code !== 200){
+ console.log(res.code , 'res.code')
clearInterval(this.timer)
- this.getlist()
+
return
}
+ this.getlist()
this.tableData = res.data
+
})
},
modify(data){
@@ -243,6 +260,8 @@
closingPosition(data){
this.list =data
this.colseDialogVisible = true
+
+
},
btn(){
currentPosition.closeTakeStash({stashId:this.list.stashId,memberId:this.list.memberId}).then(res => {
@@ -250,8 +269,9 @@
if(res.code !== 200) return this.$modal.msgSuccess(res.msg);
this.$modal.msgSuccess(res.msg);
this.fatherMethodHandle()
- this.getlist()
+
this.memberlist()
+ this.getlist()
})
},
},
diff --git a/ruoyi-ui/src/permission.js b/ruoyi-ui/src/permission.js
index f8ebd40..79c9327 100644
--- a/ruoyi-ui/src/permission.js
+++ b/ruoyi-ui/src/permission.js
@@ -32,10 +32,10 @@ router.beforeEach((to, from, next) => {
// }
next()
if( getroleId ()== 4){
- if(to.path =="/student/training/List" || to.path == '/student/index'){
+ if(to.path =="/student/training/List" || to.path == '/student/index'){
removememberId()
- next()
- }else{
+ next()
+ }else{
if(to.path =="/student/training/homepageage" || to.path == '/student/transactionRecords'|| to.path =='/student/training/index' || to.path=='/student/training/homepageage'){
return next()
}else{
diff --git a/ruoyi-ui/src/router/index.js b/ruoyi-ui/src/router/index.js
index 8977cb3..180ed16 100644
--- a/ruoyi-ui/src/router/index.js
+++ b/ruoyi-ui/src/router/index.js
@@ -125,7 +125,20 @@ export const dynamicRoutes = [{
]
},
-
+{
+ path: '/student/quotation',
+ component: Layout,
+ hidden: false,
+ permissions: ['system:user:edit'],
+ children: [
+ {
+ path: 'lowcore',
+ component: () => import('@/views/quotation/index.vue'),
+ name: 'lowcore',
+ meta: { title: '行情中心', icon: 'market', affix: true }
+ }
+ ]
+},
{
path: '/student/training',
component: Layout,
@@ -136,7 +149,7 @@ export const dynamicRoutes = [{
path: 'List',
component: () => import('@/views/training/index'),
name: 'training',
- meta: { title: '实训任务', icon: 'quest', affix: true }
+ meta: { title: '实训考核', icon: 'quest', affix: true }
},
{
path: 'homepageage',
@@ -154,20 +167,7 @@ export const dynamicRoutes = [{
}
]
},
-// {
-// path: '/student/task',
-// component: Layout,
-// hidden: true,
-// permissions: ['system:user:edit'],
-// children: [
-// {
-// path: 'homepageage',
-// component: () => import('@/views/task/index'),
-// name: 'homepageage',
-// meta: { title: '任务主页', affix: true, activeMenu: '/student/training/List' }
-// }
-// ]
-// },
+
{
path: '/student/PracticeZone',
component: Layout,
@@ -178,7 +178,7 @@ export const dynamicRoutes = [{
path: 'homepagege',
component: () => import('@/views/PracticeZone/index.vue'),
name: 'PracticeZone',
- meta: { title: '练习专区', affix: true, icon: 'exercise' }
+ meta: { title: '交易中心', affix: true, icon: 'exercise' }
},
{
path: 'index',
@@ -189,20 +189,7 @@ export const dynamicRoutes = [{
}
]
},
-// {
-// path: '/student/trade',
-// component: Layout,
-// hidden: true,
-// permissions: ['system:user:edit'],
-// children: [
-// {
-// path: 'index',
-// component: () => import('@/views/trade/index.vue'),
-// name: 'Index',
-// meta: { title: '练习专区', affix: true, activeMenu: '/student/training/List' }
-// }
-// ]
-// },
+
{
path: '/student/transactionRecords',
component: Layout,
@@ -232,35 +219,44 @@ export const dynamicRoutes = [{
}
]
},
+
{
- path: '/student/quotation',
+ path: '/student/teachingPlan',
component: Layout,
hidden: false,
permissions: ['system:user:edit'],
children: [
{
- path: 'lowcore',
- component: () => import('@/views/quotation/index.vue'),
- name: 'lowcore',
- meta: { title: '行情中心', icon: 'market', affix: true }
+ path: 'case',
+ component: () => import('@/views/teachingpan/index.vue'),
+ name: 'teachingPlan',
+ meta: { title: '实训教案', icon: 'teachingplan', affix: true }
}
]
},
+// 实训结束的任务
{
- path: '/student/teachingPlan',
+ path: '/student/trainingReport',
component: Layout,
hidden: false,
permissions: ['system:user:edit'],
children: [
{
- path: 'case',
- component: () => import('@/views/teachingpan/index.vue'),
- name: 'teachingPlan',
- meta: { title: '实训教案', icon: 'teachingplan', affix: true }
- }
+ path: 'index',
+ component: () => import('@/views/tariningReport/index.vue'),
+ name: 'trainingReport',
+ meta: { title: '实验报告', icon: 'report', affix: true }
+ },
+ // 实验报告
+ {
+ path: 'repost',
+ component: () => import('@/views/task/report.vue'),
+ name: 'repost',
+ hidden: true,
+ meta: { title: '实验报告', affix: true, activeMenu: '/student/trainingReport/index' }
+ },
]
},
-
{
path: '/system/user-auth',
component: Layout,
diff --git a/ruoyi-ui/src/store/modules/user.js b/ruoyi-ui/src/store/modules/user.js
index 2db16d1..dd329e3 100644
--- a/ruoyi-ui/src/store/modules/user.js
+++ b/ruoyi-ui/src/store/modules/user.js
@@ -46,11 +46,13 @@ const user = {
actions: {
// 登录
Login({ commit }, userInfo) {
+
const username = userInfo.username
const passwordEncode = userInfo.passwordEncode
+ const TOKEN = userInfo.token
+
return new Promise((resolve, reject) => {
- login(username, passwordEncode).then(res => {
-
+ login(username,passwordEncode,TOKEN).then(res => {
cookie.setToken(res.data.accessToken)
cookie.setname(res.data.name)
cookie.setschoolId(res.data.schoolId)
@@ -93,6 +95,7 @@ const user = {
return new Promise((resolve, reject) => {
getMemberId(studentNumber).then(res => {
+ cookie.setmemberId(res.data)
// const user = res.user
commit('SET_MEMBERID', res.data)
resolve(res)
@@ -126,7 +129,6 @@ const user = {
})
})
},
-
// 前端 登出
FedLogOut({ commit }) {
return new Promise(resolve => {
@@ -143,6 +145,8 @@ const user = {
cookie.removememberId()
// 删除roleId
cookie.removeroleId()
+ // 删除username
+ cookie.removeusername()
resolve()
})
}
diff --git a/ruoyi-ui/src/utils/request.js b/ruoyi-ui/src/utils/request.js
index ed9e90a..b21cc22 100644
--- a/ruoyi-ui/src/utils/request.js
+++ b/ruoyi-ui/src/utils/request.js
@@ -14,9 +14,9 @@ axios.defaults.headers['Content-Type'] = 'application/json;charset=utf-8'
// 创建axios实例
const service = axios.create({
// axios中请求配置有baseURL选项,表示请求URL公共部分
- baseURL: 'http://118.31.7.2:8801',
- // baseURL: 'http://192.168.2.14:8801',
- // baseURL:"http://192.168.2.17:8801",
+ baseURL: 'http://120.79.54.255:8801',
+ // baseURL: 'http://192.168.2.7:8801',
+ // baseURL:"http://192.168.2.6:8801",
// baseURL: process.env.VUE_APP_BASE_API,
// 超时
timeout: 200000
diff --git a/ruoyi-ui/src/utils/validate.js b/ruoyi-ui/src/utils/validate.js
index adfa254..2a58248 100644
--- a/ruoyi-ui/src/utils/validate.js
+++ b/ruoyi-ui/src/utils/validate.js
@@ -1,3 +1,9 @@
+export function isvalidUsername(str) {
+ // const valid_map = ['admin', 'test']
+ // return valid_map.indexOf(str.trim()) >= 0
+ return str.trim().length >= 3
+}
+
/**
* @param {string} path
* @returns {Boolean}
diff --git a/ruoyi-ui/src/views/PracticeZone/index.vue b/ruoyi-ui/src/views/PracticeZone/index.vue
index 985701e..bda0252 100644
--- a/ruoyi-ui/src/views/PracticeZone/index.vue
+++ b/ruoyi-ui/src/views/PracticeZone/index.vue
@@ -26,6 +26,7 @@
/>
+
@@ -251,7 +254,7 @@ export default {
width: 60%;
// height: 100%;
display: flex;
- justify-content: end;
+ justify-content: flex-end;
align-content: center;
transform: translate(26px, -36px);
}
diff --git a/ruoyi-ui/src/views/quotation/index.vue b/ruoyi-ui/src/views/quotation/index.vue
index 4c031bc..af341a6 100644
--- a/ruoyi-ui/src/views/quotation/index.vue
+++ b/ruoyi-ui/src/views/quotation/index.vue
@@ -1,6 +1,16 @@
+
+