Sfoglia il codice sorgente

add:按user显示report

wangJJ 5 anni fa
parent
commit
7fd5037c77
3 ha cambiato i file con 30 aggiunte e 8 eliminazioni
  1. 1 1
      package-lock.json
  2. 13 6
      src/components/report/ReportList.vue
  3. 16 1
      src/components/task/Task.vue

+ 1 - 1
package-lock.json

@@ -550,7 +550,7 @@
     },
     "axios": {
       "version": "0.19.0",
-      "resolved": "https://registry.npm.taobao.org/axios/download/axios-0.19.0.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Faxios%2Fdownload%2Faxios-0.19.0.tgz",
+      "resolved": "https://registry.npm.taobao.org/axios/download/axios-0.19.0.tgz",
       "integrity": "sha1-jgm/89kSLhM/e4EByPvdAO09Krg=",
       "requires": {
         "follow-redirects": "1.5.10",

+ 13 - 6
src/components/report/ReportList.vue

@@ -9,12 +9,16 @@
       </el-col>
     </el-row>-->
 
-    <el-table :showHeader="true" :data="reportList" style="width: 100%">
+    <el-table :showHeader="false" :data="reportList" style="width: 100%">
+<!--      <el-table-column-->
+<!--        prop="userName"-->
+<!--        label="提交用户"-->
+<!--      >-->
+<!--      </el-table-column>-->
       <el-table-column
-        prop="userName"
-        label="提交用户"
-      >
-      </el-table-column>
+        prop="name"
+        label="报告名称"
+      ></el-table-column>
       <el-table-column prop="type" label="报告类型" title="报告类型">
         <template slot-scope="scope">
           <span class="badge">{{scope.row.type}}</span>
@@ -115,10 +119,13 @@ export default {
 
 <style lang="less" scoped>
   .report-container {
-    margin: 0 30px;
+    margin: 0 30px 0 0;
   }
 
   .el-row {
     margin-bottom: 20px;
   }
+  .el-collapse-item__content{
+    padding-bottom: 0 !important;
+  }
 </style>

+ 16 - 1
src/components/task/Task.vue

@@ -191,7 +191,22 @@
     </div>
     <div class="create-body" v-if="!isModifyMode">
       <div class="title h2">报告列表</div>
-      <report-list v-bind:reports="reportList" v-bind:taskId="taskId" v-bind:projectId="projectId"/>
+      <el-collapse accordion style="margin: 0 30px">
+        <el-collapse-item v-for="(item,index) in acceptedUserList" :key="item.id">
+          <template slot="title">
+            <el-row style="width: 100%;font-size: 16px">
+              <el-col :span="6">{{item.userVO.userName}}</el-col>
+              <el-col :span="6">{{item.userVO.email}}</el-col>
+              <el-col :span="6">
+                <el-tag type="success" v-if="item.crowdReportVOS">已提交报告</el-tag>
+                <el-tag type="info" v-if="!item.crowdReportVOS">未提交报告</el-tag>
+              </el-col>
+            </el-row>
+          </template>
+          <report-list v-bind:reports="item.crowdReportVOS" v-bind:taskId="taskId" v-bind:projectId="projectId"/>
+        </el-collapse-item>
+      </el-collapse>
+<!--      <report-list v-bind:reports="reportList" v-bind:taskId="taskId" v-bind:projectId="projectId"/>-->
     </div>
   </div>
 </template>