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 @@ @@ -46,6 +56,10 @@ export default { window.open("http://www.csrc.gov.cn/"); } else if(type==4){ window.open("https://mt4-mt5.com/mt4Download"); + }else if(type==5){ + window.open("http://www.safe.gov.cn/"); + }else if(type==6){ + window.open("https://www.chinamoney.com.cn/chinese/index.html"); } } } @@ -53,8 +67,20 @@ export default { \ No newline at end of file diff --git a/ruoyi-ui/src/views/tariningReport/index.vue b/ruoyi-ui/src/views/tariningReport/index.vue new file mode 100644 index 0000000..6bcda54 --- /dev/null +++ b/ruoyi-ui/src/views/tariningReport/index.vue @@ -0,0 +1,130 @@ + + + diff --git a/ruoyi-ui/src/views/task/index.vue b/ruoyi-ui/src/views/task/index.vue index 38b5477..5008af1 100644 --- a/ruoyi-ui/src/views/task/index.vue +++ b/ruoyi-ui/src/views/task/index.vue @@ -4,8 +4,10 @@ 进入交易
- 提 交 - 上 传 + + 提 交 + + 上 传
- + @@ -121,10 +121,15 @@ export default { // getroleId() !== "3"? this.dialogVisible = false : this.dialogVisible = true if(getroleId() !== "3") { this.dialogVisible = false - this.getreportPDF() + if(this.$route.query.reportID){ + this.getReport() + }else{ + this.getreportPDF() + } }else{ this.dialogVisible = true this.getreportPDF() + } }, computed: {}, @@ -162,6 +167,15 @@ export default { // this.reportName将数字过滤出来 }); }, + // 获取实验报告 + getReport() { + const repostId=this.$route.query.reportID + testreport.getReportById({id:repostId}).then((res) => { + if (res.code !== 200) return + this.reportdata=res.data + // this.$modal.msgSuccess("提交成功"); + }); + }, // 提交评分 submitScore() { if(this.scoringData.score === null) { diff --git a/ruoyi-ui/src/views/teachingpan/index.vue b/ruoyi-ui/src/views/teachingpan/index.vue index 0754963..147f0a1 100644 --- a/ruoyi-ui/src/views/teachingpan/index.vue +++ b/ruoyi-ui/src/views/teachingpan/index.vue @@ -113,14 +113,6 @@ export default { const file = this.$refs.fileInput.files[0]; console.log("file",file.size); // 文件大小限制超过500m提示 - if(file.size > 500*1024){ - this.$message({ - message: '文件大小超过500M', - type: 'warning' - }); - return; - } - if (!file) { alert('请选择文件!'); return; diff --git a/ruoyi-ui/src/views/trade/components/Deposit.vue b/ruoyi-ui/src/views/trade/components/Deposit.vue index f09e96c..19e54b5 100644 --- a/ruoyi-ui/src/views/trade/components/Deposit.vue +++ b/ruoyi-ui/src/views/trade/components/Deposit.vue @@ -20,7 +20,7 @@ @@ -175,6 +175,9 @@ export default { .trade-cdeposit{ background: #fff; .record{ + display: flex; + // justify-content: center; + align-items: center; height: 60px; line-height: 60px; border-top: 1px solid #EAEAEA; @@ -183,6 +186,9 @@ export default { font-weight: bold; // margin-left: 10px; color: #333333; + ::v-deep .svg-icon{ + margin-right: 10px; + } } } .pagination-container { diff --git a/ruoyi-ui/src/views/trade/components/deals.vue b/ruoyi-ui/src/views/trade/components/deals.vue index af796c9..dc4e802 100644 --- a/ruoyi-ui/src/views/trade/components/deals.vue +++ b/ruoyi-ui/src/views/trade/components/deals.vue @@ -178,13 +178,20 @@ export default { .trade-cdeposit{ background: #fff; .record{ - height: 60px; - line-height: 60px; - border-top: 1px solid #EAEAEA; - font-size: 18px; - font-family: Microsoft YaHei; - font-weight: bold; - color: #333333; + display: flex; + // justify-content: center; + align-items: center; + height: 60px; + line-height: 60px; + border-top: 1px solid #EAEAEA; + font-size: 18px; + font-family: Microsoft YaHei; + font-weight: bold; + // margin-left: 10px; + color: #333333; + ::v-deep .svg-icon{ + margin-right: 10px; + } } } .pagination-container { diff --git a/ruoyi-ui/src/views/trade/components/numberTransactions.vue b/ruoyi-ui/src/views/trade/components/numberTransactions.vue index 7994339..e8be518 100644 --- a/ruoyi-ui/src/views/trade/components/numberTransactions.vue +++ b/ruoyi-ui/src/views/trade/components/numberTransactions.vue @@ -159,13 +159,20 @@ export default { .trade-cdeposit{ background: #fff; .record{ - height: 60px; - line-height: 60px; - border-top: 1px solid #EAEAEA; - font-size: 18px; - font-family: Microsoft YaHei; - font-weight: bold; - color: #333333; + display: flex; + // justify-content: center; + align-items: center; + height: 60px; + line-height: 60px; + border-top: 1px solid #EAEAEA; + font-size: 18px; + font-family: Microsoft YaHei; + font-weight: bold; + // margin-left: 10px; + color: #333333; + ::v-deep .svg-icon{ + margin-right: 10px; + } } } .pagination-container { diff --git a/ruoyi-ui/src/views/trade/components/quotation.vue b/ruoyi-ui/src/views/trade/components/quotation.vue index c016be2..33cf90c 100644 --- a/ruoyi-ui/src/views/trade/components/quotation.vue +++ b/ruoyi-ui/src/views/trade/components/quotation.vue @@ -141,13 +141,20 @@ export default { .trade-cdeposit{ background: #fff; .record{ - height: 60px; - line-height: 60px; - border-top: 1px solid #EAEAEA; - font-size: 18px; - font-family: Microsoft YaHei; - font-weight: bold; - color: #333333; + display: flex; + // justify-content: center; + align-items: center; + height: 60px; + line-height: 60px; + border-top: 1px solid #EAEAEA; + font-size: 18px; + font-family: Microsoft YaHei; + font-weight: bold; + // margin-left: 10px; + color: #333333; + ::v-deep .svg-icon{ + margin-right: 10px; + } } } .pagination-container { diff --git a/ruoyi-ui/src/views/trade/holding.vue b/ruoyi-ui/src/views/trade/holding.vue index b38b3ed..fec2869 100644 --- a/ruoyi-ui/src/views/trade/holding.vue +++ b/ruoyi-ui/src/views/trade/holding.vue @@ -1,8 +1,12 @@