Browse Source

feat:ui尝试

BaiQi 1 year ago
parent
commit
8af5b66d0e

+ 5 - 5
src/App.vue

@@ -1,18 +1,18 @@
 <template>
-  <GlobalHeader v-if="globalVisibility"/>
+  <NewGlobalHeader v-if="globalVisibility"/>
   <div class="main-body">
     <router-view/>
   </div>
-  <GlobalFooter v-if="globalVisibility"/>
+  <!--<GlobalFooter v-if="globalVisibility"/>-->
 </template>
 
 <script>
 
-import GlobalHeader from "@/components/GlobalHeader/GlobalHeader.vue";
-import GlobalFooter from "@/components/GlobalFooter";
+import NewGlobalHeader from "@/components/GlobalHeader/NewGlobalHeader.vue";
+// import GlobalFooter from "@/components/GlobalFooter";
 
 export default {
-  components: {GlobalFooter, GlobalHeader},
+  components: {NewGlobalHeader},
   created() {
     const that = this;
     if (sessionStorage.token) {

+ 5 - 1
src/api/index.js

@@ -24,4 +24,8 @@ const api = {
   ...communicationAPIs
 };
 
-export default api;
+const useApis = () => {
+  return api;
+};
+
+export  {api, useApis};

+ 1 - 1
src/components/GlobalFooter.vue

@@ -67,7 +67,7 @@ export default {
 /*Zhurui修改,footer固定在视口的最下方*/
 .global-footer-wrapper {
   position: absolute;
-  bottom: -220px;
+  bottom: -292px;
   width: 100%;
 }
 

+ 1 - 1
src/router/index.js

@@ -1,7 +1,7 @@
 import { createRouter, createWebHistory } from "vue-router";
 import store from "@/store";
 import { ElMessage } from "element-plus";
-import PortalPage from "@/views/PortalPage/PortalPage";
+import PortalPage from "@/views/PortalPage/NewPortalPage";
 
 const routes = [
   {

+ 0 - 1
src/views/ManagePage/ManagePage.vue

@@ -721,7 +721,6 @@ export default {
               eaiId: _this.form.eaiLink ? -1 : null,
               coderId: _this.form.coderLink ? -1 : null,
               evalId: _this.form.evalLink ? -1 : null,
-              eaiId: _this.form.evalLink ? -1 : null,
             }).then(async (res) => {
               const createdCourse = res.data.data;
               if (createdCourse) {

+ 78 - 78
src/views/PortalPage/PortalPage.vue

@@ -81,89 +81,89 @@
       </el-card>
     </div>
 
-    <div>
-      <el-card :style="{height: this.testRowHeight + 'px'}">
-        <div class="portal-card-title">
-          <div class="portal-card-title-main">我的测试</div>
-          <div style="font-size: 10px; color: #777777" v-if="myTestList.length>6">可滚动查看测试列表</div>
-        </div>
-        <el-divider class="portal-card-divider"/>
-        <div>
-          <div v-if="!isLogin"
-               :style="{height: (this.testRowHeight - 63) + 'px', marginTop: (this.testRowHeight / 2 - 100) + 'px'}"
-               class="portal-card-main" style="cursor: pointer"
-               @click="toAuth">
-            <el-icon :size="72" color="#bfbfbf">
-              <Lock/>
-            </el-icon>
-            <div class="tip">登录以查看</div>
-          </div>
+  <!--  <div>-->
+  <!--    <el-card :style="{height: this.testRowHeight + 'px'}">-->
+  <!--      <div class="portal-card-title">-->
+  <!--        <div class="portal-card-title-main">我的测试</div>-->
+  <!--        <div style="font-size: 10px; color: #777777" v-if="myTestList.length>6">可滚动查看测试列表</div>-->
+  <!--      </div>-->
+  <!--      <el-divider class="portal-card-divider"/>-->
+  <!--      <div>-->
+  <!--        <div v-if="!isLogin"-->
+  <!--             :style="{height: (this.testRowHeight - 63) + 'px', marginTop: (this.testRowHeight / 2 - 100) + 'px'}"-->
+  <!--             class="portal-card-main" style="cursor: pointer"-->
+  <!--             @click="toAuth">-->
+  <!--          <el-icon :size="72" color="#bfbfbf">-->
+  <!--            <Lock/>-->
+  <!--          </el-icon>-->
+  <!--          <div class="tip">登录以查看</div>-->
+  <!--        </div>-->
 
-          <div v-if="isLogin && isStudent && myTestList!==null && myTestList.length!==0"
-               :style="{height: (this.testRowHeight - 63) + 'px'}"
-               class="portal-card-main">
-            <div class="portal-my-card-main">
-              <MyTestCard v-for="test in myTestList" :key="test.id" :testVO="test"/>
-            </div>
-          </div>
+  <!--        <div v-if="isLogin && isStudent && myTestList!==null && myTestList.length!==0"-->
+  <!--             :style="{height: (this.testRowHeight - 63) + 'px'}"-->
+  <!--             class="portal-card-main">-->
+  <!--          <div class="portal-my-card-main">-->
+  <!--            <MyTestCard v-for="test in myTestList" :key="test.id" :testVO="test"/>-->
+  <!--          </div>-->
+  <!--        </div>-->
 
-          <div v-if="isLogin && isStudent && myTestList!==null && myTestList.length===0"
-               :style="{height: (this.testRowHeight - 63) + 'px', marginTop: (this.testRowHeight / 2 - 100) + 'px'}"
-               class="portal-card-main" style="cursor: pointer"
-               @click="toTest">
-            <el-icon :size="72" color="#bfbfbf">
-              <ShoppingCart/>
-            </el-icon>
-            <div class="tip">去参加测试</div>
-          </div>
+  <!--        <div v-if="isLogin && isStudent && myTestList!==null && myTestList.length===0"-->
+  <!--             :style="{height: (this.testRowHeight - 63) + 'px', marginTop: (this.testRowHeight / 2 - 100) + 'px'}"-->
+  <!--             class="portal-card-main" style="cursor: pointer"-->
+  <!--             @click="toTest">-->
+  <!--          <el-icon :size="72" color="#bfbfbf">-->
+  <!--            <ShoppingCart/>-->
+  <!--          </el-icon>-->
+  <!--          <div class="tip">去参加测试</div>-->
+  <!--        </div>-->
 
-          <div v-show="isLogin && isTeacher"
-               :style="{height: (this.testRowHeight - 63) + 'px', marginTop: (this.testRowHeight / 2 - 100) + 'px'}"
-               class="portal-card-main" style="cursor: pointer"
-               @click="toManage">
-            <el-icon :size="72" color="#bfbfbf">
-              <SetUp/>
-            </el-icon>
-            <div class="tip">去管理测试</div>
-          </div>
-        </div>
+  <!--        <div v-show="isLogin && isTeacher"-->
+  <!--             :style="{height: (this.testRowHeight - 63) + 'px', marginTop: (this.testRowHeight / 2 - 100) + 'px'}"-->
+  <!--             class="portal-card-main" style="cursor: pointer"-->
+  <!--             @click="toManage">-->
+  <!--          <el-icon :size="72" color="#bfbfbf">-->
+  <!--            <SetUp/>-->
+  <!--          </el-icon>-->
+  <!--          <div class="tip">去管理测试</div>-->
+  <!--        </div>-->
+  <!--      </div>-->
 
-      </el-card>
-    </div>
+  <!--    </el-card>-->
+  <!--  </div>-->
 
-    <div>
-      <el-card id="portal-test-card-main" ref="portalTestCardBodyMain">
-        <div class="portal-card-title">
-          <div class="portal-card-title-main">智能测试</div>
-          <ElButton plain round type="primary" @click="toTest">前往测试广场</ElButton>
-        </div>
-        <el-divider class="portal-card-divider"/>
-        <el-tabs v-model="activeTestPaneName" @tab-click="changeTestPane" style="min-height: 400px;">
-          <el-tab-pane label="评测题" name="eval">
-            <div class="portal-card-content" v-if="showExampleEvalTestList.length !== 0">
-              <TestCard v-for="item in showExampleEvalTestList" :key="item.id" :testVO="item" :isPublicTest="true"/>
-            </div>
-            <div v-else style="margin: 100px 0 0 calc(50% - 36px);">
-              <el-icon :size="72" color="#bfbfbf">
-                <FolderOpened/>
-              </el-icon>
-              <div class="tip">暂无数据~</div>
-            </div>
-          </el-tab-pane>
-          <el-tab-pane label="代码题" name="coder">
-            <div class="portal-card-content" v-if="showExampleCoderTestList.length !== 0">
-              <TestCard v-for="item in showExampleCoderTestList" :key="item.id" :testVO="item" :isPublicTest="true"/>
-            </div>
-            <div v-else style="margin: 100px 0 0 calc(50% - 36px);">
-              <el-icon :size="72" color="#bfbfbf">
-                <FolderOpened/>
-              </el-icon>
-              <div class="tip">暂无数据~</div>
-            </div>
-          </el-tab-pane>
-        </el-tabs>
-      </el-card>
-    </div>
+  <!--  <div>-->
+  <!--    <el-card id="portal-test-card-main" ref="portalTestCardBodyMain">-->
+  <!--      <div class="portal-card-title">-->
+  <!--        <div class="portal-card-title-main">智能测试</div>-->
+  <!--        <ElButton plain round type="primary" @click="toTest">前往测试广场</ElButton>-->
+  <!--      </div>-->
+  <!--      <el-divider class="portal-card-divider"/>-->
+  <!--      <el-tabs v-model="activeTestPaneName" @tab-click="changeTestPane" style="min-height: 400px;">-->
+  <!--        <el-tab-pane label="评测题" name="eval">-->
+  <!--          <div class="portal-card-content" v-if="showExampleEvalTestList.length !== 0">-->
+  <!--            <TestCard v-for="item in showExampleEvalTestList" :key="item.id" :testVO="item" :isPublicTest="true"/>-->
+  <!--          </div>-->
+  <!--          <div v-else style="margin: 100px 0 0 calc(50% - 36px);">-->
+  <!--            <el-icon :size="72" color="#bfbfbf">-->
+  <!--              <FolderOpened/>-->
+  <!--            </el-icon>-->
+  <!--            <div class="tip">暂无数据~</div>-->
+  <!--          </div>-->
+  <!--        </el-tab-pane>-->
+  <!--        <el-tab-pane label="代码题" name="coder">-->
+  <!--          <div class="portal-card-content" v-if="showExampleCoderTestList.length !== 0">-->
+  <!--            <TestCard v-for="item in showExampleCoderTestList" :key="item.id" :testVO="item" :isPublicTest="true"/>-->
+  <!--          </div>-->
+  <!--          <div v-else style="margin: 100px 0 0 calc(50% - 36px);">-->
+  <!--            <el-icon :size="72" color="#bfbfbf">-->
+  <!--              <FolderOpened/>-->
+  <!--            </el-icon>-->
+  <!--            <div class="tip">暂无数据~</div>-->
+  <!--          </div>-->
+  <!--        </el-tab-pane>-->
+  <!--      </el-tabs>-->
+  <!--    </el-card>-->
+  <!--  </div>-->
   </div>
 </template>