liuqiao 4 år sedan
förälder
incheckning
6d16744eba

+ 24 - 4
src/views/user/match/owerdas/dsproject/index.vue

@@ -65,7 +65,7 @@
               <div class="list_bottom">
                 <div class="baogaoxiaz">
                 <p class="project-name">{{ item.megagameTitle }}  </p>
-                <div class="xiazai"   >
+                <div class="xiazai"   v-if="item.hasOwnProperty('reportFileName')==true" >
                  <el-button
                   type="primary"
                   size="mini"
@@ -73,7 +73,17 @@
                   plain
                   circle
                   @click="xiazai(item.reportfile,item.reportFileName)"
-                ></el-button></div></div>
+                ></el-button></div>
+                  <div class="xiazai" v-else >
+                 <el-button
+                  type="primary"
+                  size="mini"
+                  icon="el-icon-s-order"
+                  plain
+                  circle
+                   disabled
+                ></el-button></div>
+                </div>
                 <p>{{ item.uname }}</p>
                 <p>{{item.questionTitle}}</p>
                 <div class="chapingfen clearfix">
@@ -153,7 +163,7 @@
               <div class="list_bottom">
                 <div class="baogaoxiaz">
                 <p class="project-name">{{ item.megagameTitle }}  </p>
-                <div class="xiazai"   >
+                <div class="xiazai" v-if="item.hasOwnProperty('reportFileName')==true">
                  <el-button
                   type="primary"
                   size="mini"
@@ -161,7 +171,17 @@
                   plain
                   circle
                   @click="xiazai(item.reportfile,item.reportFileName)"
-                ></el-button></div></div>
+                ></el-button></div>
+                 <div class="xiazai" v-else >
+                 <el-button
+                  type="primary"
+                  size="mini"
+                  icon="el-icon-s-order"
+                  plain
+                  circle
+                   disabled
+                ></el-button></div>
+                </div>
                 <p>{{ item.uname }}</p>
                 <p>{{item.questionTitle}}</p>
                 <div class="chapingfen clearfix">

+ 39 - 11
src/views/user/menu/index.vue

@@ -38,7 +38,7 @@
       </el-table-column>
    <el-table-column label="操作">
       <template slot-scope="scope">
-         <el-button  size="mini" type="text"  @click="particulars(scope.row['id'])" >查看项目</el-button>
+         <el-button  size="mini" type="text"  @click="lookjq(scope.row['projectId'],scope.row['questionSolverType'])" >查看项目</el-button>
       </template>
     </el-table-column>
     </el-table>
@@ -98,7 +98,7 @@ export default {
          const header = []
         header.push({ label: '用户ID', prop: 'uid' })
          header.push({ label: '用户名称', prop: 'uname', sortable: 'custom' })
-        header.push({ label: 'id', prop: 'id', sortable: 'custom' })
+        // header.push({ label: 'id', prop: 'id', sortable: 'custom' })
         header.push({ label: '状态', prop: 'status', sortable: 'custom' })
         header.push({ label: '参赛时间', prop: 'enterTime', sortable: 'custom' })
         header.push({ label: '发布时间', prop: 'endTime', sortable: 'custom' })
@@ -106,15 +106,15 @@ export default {
         header.push({ label: '评审员名称', prop: 'reviewName', sortable: 'custom' })
         header.push({ label: '评语', prop: 'reviewContent', sortable: 'custom' })
         header.push({ label: '评分', prop: 'score', sortable: 'custom' })
-        header.push({ label: '大赛id', prop: 'megagameId', sortable: 'custom' })
+        // header.push({ label: '大赛id', prop: 'megagameId', sortable: 'custom' })
         header.push({ label: '大赛标题', prop: 'megagameTitle', sortable: 'custom' })
-        header.push({ label: '大赛状态', prop: 'megagameStatus', sortable: 'custom' })
-        header.push({ label: '题目ID', prop: 'questionId', sortable: 'custom' })
+        // header.push({ label: '大赛状态', prop: 'megagameStatus', sortable: 'custom' })
+        // header.push({ label: '题目ID', prop: 'questionId', sortable: 'custom' })
         header.push({ label: '题目标题', prop: 'questionTitle', sortable: 'custom' })
-        header.push({ label: '选题方式', prop: 'questionSelectionWay', sortable: 'custom' })
-        header.push({ label: '业务类型', prop: 'questionBusinessType', sortable: 'custom' })
+        // header.push({ label: '选题方式', prop: 'questionSelectionWay', sortable: 'custom' })
+        // header.push({ label: '业务类型', prop: 'questionBusinessType', sortable: 'custom' })
         header.push({ label: '求解器类型', prop: 'questionSolverType', sortable: 'custom' })
-        header.push({ label: '题目分值', prop: 'questionScore', sortable: 'custom' })
+        // header.push({ label: '题目分值', prop: 'questionScore', sortable: 'custom' })
         header.push({ label: '难度级别', prop: 'questionRank', sortable: 'custom' })
         // header.push({ label: '操作', prop: 'operation' })
         this.headerData = header;
@@ -152,10 +152,10 @@ export default {
           };
            switch (row.questionRank) {
             case "1":
-              row.questionRank = "普通";
+              row.questionRank = "学生";
               break;
             case "2":
-              row.questionRank ="一般";
+              row.questionRank ="专业";
               break;
                case "3":
               row.questionRank = "困难";
@@ -191,7 +191,35 @@ export default {
         })
         .catch((err) => {})
     },
-    
+    // 查看项目
+ lookjq(projectId,projectType) {
+         const params = {
+        transCode: 'A00006',
+      }
+ let lesseeId=this.$store.getters.lesseeId;
+      request(params)
+        .then((res) => {
+          console.log(res)
+ 
+          this.$message.success(' 即将进入求解器')
+          console.log( res.authCode);
+       setTimeout(() => {
+        window.open(
+          this.$store.getters.cfdUrl +
+            "?authCode=" +
+            res.authCode +
+            "&projectId=" +
+           projectId +
+            "&projectType=" +
+            projectType+
+            '&lesseeId=' +
+         lesseeId,
+          "_blank"
+        );
+      }, 1000);
+        })
+        .catch((err) => {})
+    },
    onSubmit(){
   this.getResource(this.form.name,this.form.id)
    },

+ 4 - 1
src/views/user/project/index.vue

@@ -279,7 +279,9 @@ export default {
           .then((res) => { 
             loading.close()
             this.listData = res.rows
-            this.paginationConfig.total = res.total
+            this.paginationConfig.total = res.total;
+           this.fileuploadConfig.reportFile=res.rows[0].reportFile;
+          this.fileuploadConfig.reportFileName=res.rows[0].reportFileName;
           })
           .catch((err) => {
             loading.close()
@@ -384,6 +386,7 @@ export default {
       this.fileuploadConfig.reportFile=reportFile;
       this.fileuploadConfig.reportFileName=reportFileName;
         this.$refs.fileupload.fileuploadisShow=true;
+ 
     },
       bgclick(projectId){
         this.projectId=projectId;