diff --git a/src/components/TestPanel.vue b/src/components/TestPanel.vue index 5c64a3f..2e1e940 100644 --- a/src/components/TestPanel.vue +++ b/src/components/TestPanel.vue @@ -44,6 +44,8 @@
+ 填写实验报告 查看实验报告
- +
+ + + + + + + + + + +
+
@@ -78,7 +115,8 @@ - - @@ -145,7 +184,7 @@
@@ -172,12 +211,54 @@ diff --git a/src/config/index.js b/src/config/index.js index ba0bfdc..af087bf 100644 --- a/src/config/index.js +++ b/src/config/index.js @@ -10,9 +10,9 @@ let host = location.origin + '/' let bankPath = `${location.origin}/banksystem` // 银行系统 // 121.37.12.51 | 192.168.31.151 if (isDev) { - host = 'http://192.168.31.152:9000/' + // host = 'http://192.168.31.152:9000/' // host = 'http://192.168.31.53:9000/' - // host = 'http://121.37.12.51:9000/' + host = 'http://121.37.12.51:9000/' // host = 'https://occupationlab.com/' bankPath = `http://${location.hostname}:8093` } else if (isPro) { diff --git a/src/store/index.js b/src/store/index.js index 8ddd250..ea9df33 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -2,7 +2,17 @@ import Vue from 'vue'; import Vuex from 'vuex'; Vue.use(Vuex); const store = new Vuex.Store({ - state: {}, - mutations: {} + state: { + language: 0, + reportId: '' + }, + mutations: { + setLanguage: (state, id) => { + state.language = id + }, + setReportId: (state, id) => { + state.reportId = id + }, + } }); export default store; \ No newline at end of file diff --git a/src/styles/common.scss b/src/styles/common.scss index d5cadad..facf3f7 100644 --- a/src/styles/common.scss +++ b/src/styles/common.scss @@ -1,7 +1,7 @@ .flex { display: flex; } -.break-all{ +.break-all { word-break: break-all; } .c-p { @@ -35,29 +35,30 @@ input::-ms-input-placeholder { } body .cus-table.el-table { border-radius: 4px; - th{ - background-color: #E8F0FF !important; - .cell{ + th { + background-color: #e8f0ff !important; + .cell { color: #222326; font-weight: normal; - .el-checkbox{ - &:before{ + .el-checkbox { + &:before { opacity: 1; } } } } - th, td{ + th, + td { padding: 10px 0; - border-bottom-color: #E1E6F2; + border-bottom-color: #e1e6f2; .cell { font-size: 12px; } } - &.el-table--striped .el-table__body tr.el-table__row--striped td{ - background-color: #FAFBFF !important; + &.el-table--striped .el-table__body tr.el-table__row--striped td { + background-color: #fafbff !important; } - .el-button--text{ + .el-button--text { padding: 0; } } @@ -74,7 +75,10 @@ body .cus-table.el-table { .pagination { margin: 20px 0; text-align: center; - button,.number,.more,.el-input__inner{ + button, + .number, + .more, + .el-input__inner { min-width: 32px !important; height: 32px !important; line-height: 32px; @@ -83,11 +87,15 @@ body .cus-table.el-table { border: 1px solid #ccc !important; border-radius: 2px !important; } - button i{ + button i { color: #333; } - .active{ + .active { color: #fff !important; - background-color: #007eff!important; + background-color: #007eff !important; } -} \ No newline at end of file +} +.code-mirror { + text-align: left; + line-height: 30px; +} diff --git a/src/views/Home.vue b/src/views/Home.vue index a01d5d1..dff7d9d 100644 --- a/src/views/Home.vue +++ b/src/views/Home.vue @@ -60,14 +60,9 @@ :retResult.sync="item.retResult" :modelIsShow.sync="modelIsShow" @cache="leavePage"> -
@@ -88,9 +83,11 @@ import testPanel from "../components/TestPanel"; import codemirror from "../components/codemirror"; import Cookie from 'js-cookie' import { Loading } from 'element-ui' +import Config from '@/config' export default { data () { return { + Config, loaded: false, // 页面是否加载完的标识,页面默认隐藏,一进来先显示加载条,接口加载完后再显示页面,不然一开始会一闪而过没有样式的页面 loadIns: null, // loading实例 competitionId: Cookie.get('admin-competitionId'), @@ -99,6 +96,7 @@ export default { curriculumName: Cookie.get('admin-curriculumName') ? unescape(Cookie.get('admin-curriculumName')) : 'python', // 课程名称 assessmentId: Cookie.get('admin-assessmentId'), // 考核id mallId: Cookie.get('admin-mallId'), + language: +Cookie.get('admin-language') || 0, // 编程语言 projectId: '', systemId: '', modelIsShow: false, // 导入模型按钮是否显示 @@ -113,7 +111,6 @@ export default { name: 'Vscode' }, ], - language: 0, // 编程语言 curTab: '', // 选中后绑定的对象 workbench: [], // 判分点切换列表 codeKey: 1 // 编辑器索引 @@ -174,7 +171,8 @@ export default { }, // 编程语言选择回调 languageChange (id) { - + Cookie.set('admin-language', id) + this.$refs.mainindex.reportVisible = false }, // 跳转我的数据 toData () {