Forráskód Böngészése

众测广场项目和任务more

guo00guo 5 éve
szülő
commit
7ec918a43c

+ 0 - 50
src/components/Mine.vue

@@ -1,56 +1,6 @@
 <template>
   <div class="mine-container">
     <div id="myChart" style="width: 100%;height: 200px;padding-top: 40px"></div>
-    <!--<div class="mine-top-wrapper">-->
-    <!--<el-row :gutter="0" style="height:100%">-->
-    <!--<el-col :span="16">-->
-    <!--<div class="advertise-imgs">-->
-    <!--<img-->
-    <!--src="http://sinastorage.com/storage.miaosha.sina.com.cn/products/201903/e496d11b3d74cf660c286fbd5ab8d0bb.png"-->
-    <!--&gt;-->
-    <!--</div>-->
-    <!--</el-col>-->
-    <!--<el-col :span="8">-->
-    <!--<div class="user-banner">-->
-    <!--<p class="head">-->
-    <!--<a href="javascript:;" class="login-link">-->
-    <!--<img :src="user == null || user.userVO.photoUrl == null?defaultValue.image:user.userVO.photoUrl"-->
-    <!--class="user-img">-->
-    <!--<span class="vertify hide"></span>-->
-    <!--</a>-->
-    <!--</p>-->
-    <!--<div class="username_box">-->
-    <!--<div class="username_icon username_"></div>-->
-    <!--<span class="username">{{user == null?'...':user.userVO.name}}</span>-->
-    <!--</div>-->
-    <!--&lt;!&ndash;<p class="name">&ndash;&gt;-->
-    <!--&lt;!&ndash;<a href="javascript:;" class="login-btn btn btn-medium btn-info">登录</a>&ndash;&gt;-->
-    <!--&lt;!&ndash;<a&ndash;&gt;-->
-    <!--&lt;!&ndash;href="https://login.sina.com.cn/signup/signup?entry=tech"&ndash;&gt;-->
-    <!--&lt;!&ndash;class="register-btn btn btn-medium btn-info"&ndash;&gt;-->
-    <!--&lt;!&ndash;target="_blank"&ndash;&gt;-->
-    <!--&lt;!&ndash;&gt;注册</a>&ndash;&gt;-->
-    <!--&lt;!&ndash;</p>&ndash;&gt;-->
-    <!--&lt;!&ndash;<p class="scores">&ndash;&gt;-->
-    <!--&lt;!&ndash;<a href="/rule/merit" target="_blank">&ndash;&gt;-->
-    <!--&lt;!&ndash;积分&ndash;&gt;-->
-    <!--&lt;!&ndash;<em class="num1">{{user.score}}</em>&ndash;&gt;-->
-    <!--&lt;!&ndash;</a>&ndash;&gt;-->
-    <!--&lt;!&ndash;<span class="line">|</span>&ndash;&gt;-->
-    <!--&lt;!&ndash;<a href="/rule/merit" target="_blank">&ndash;&gt;-->
-    <!--&lt;!&ndash;威望&ndash;&gt;-->
-    <!--&lt;!&ndash;<em class="num2">{{user.prestige}}</em>&ndash;&gt;-->
-    <!--&lt;!&ndash;</a>&ndash;&gt;-->
-    <!--&lt;!&ndash;</p>&ndash;&gt;-->
-    <!--<p>-->
-    <!--<router-link :to="{ name: 'AuthenticationIndex'}">-->
-    <!--<div class="btn btn-medium">实名认证</div>-->
-    <!--</router-link>-->
-    <!--</p>-->
-    <!--</div>-->
-    <!--</el-col>-->
-    <!--</el-row>-->
-    <!--</div>-->
     <div class="mine-body" style="text-align: center;">
       <el-tabs value="myProject" @tab-click="handleTabClick" v-loading="loading" style="width: 90%;margin-left: 5%">
         <el-tab-pane name="unFinishedTask">

+ 1 - 0
src/components/cheat/ProjectAdd.vue

@@ -135,6 +135,7 @@
             </el-form-item>
             <el-form-item type="file" prop="file" label="Excel文件">
               <el-upload
+                style="width: 400px"
                 v-if="isModifyMode"
                 drag
                 class="upload-demo"

+ 2 - 1
src/components/commons/Header2.0.vue

@@ -3,7 +3,8 @@
     <div class="container">
         <div class="nav-location pull-left">
           <i class="el-icon-location-outline" style="margin-right: 5px"></i>
-          <span style="line-height: 34px">{{city}}</span>
+          <span style="line-height: 34px" v-if="!city">{{city}}</span>
+          <span style="line-height: 34px" v-else>暂无</span>
         </div>
         <div class="nav-list pull-right">
           <ul>

+ 5 - 2
src/components/commons/ProjectItem.vue

@@ -8,14 +8,17 @@
       </el-col>
       <el-col :span="6" type="flex" align="middle" justify="center">{{project.name}}</el-col>
       <!--<el-col :span="4">{{project.id}}</el-col>-->
-      <el-col :span="6" type="flex" align="middle" justify="center">
+      <el-col :span="3" type="flex" align="middle" justify="center">
         <span style="font-size: 10px;"
               v-bind:class="['badge']"
         >{{project.platform}}</span>
       </el-col>
-      <el-col :span="2" type="flex" align="middle" justify="center">
+      <el-col :span="3" type="flex" align="middle" justify="center">
         <div class="badge">¥{{project.budget}}</div>
       </el-col>
+      <el-col :span="3" type="flex" align="middle" justify="center">
+        <div>{{project.joinCount}}</div>
+      </el-col>
       <el-col :span="4" type="flex" align="middle" justify="center">
         <el-badge v-if="project.needHandle" is-dot class="item">
           <span class="btn btn-small btn-info" @click="goToProjectDetail(project.id)">查看详情</span>

+ 1 - 1
src/components/project/Project.vue

@@ -909,7 +909,7 @@ export default {
         }
       }).catch((error) => {
         this.hideLoading()
-        notify('error', error.data)
+        // notify('error', error.data)
       })
     },
 

+ 35 - 2
src/pages/DetailPage/ResourceDetail.vue

@@ -9,15 +9,36 @@
           <!--          <span  class="badge">{{resource.photo}}</span>-->
           <img :src="resource.photo" style="width: 50px; height: 50px;"/>
         </el-form-item>
-        <el-form-item label="类型" prop="count" v-if="!type">
+        <el-form-item label="资源描述" prop="description" v-if="!description">
+          <span>{{resource.description}}</span>
+        </el-form-item>
+        <el-form-item label="类型" prop="type" v-if="!type">
           <span>{{resource.type}}</span>
         </el-form-item>
+
+        <el-form-item label="使用场景" prop="scene" v-if="!scene">
+          <span>{{resource.scene}}</span>
+        </el-form-item>
+        <el-form-item label="收费标准" prop="standard" v-if="!standard">
+          <span>{{resource.standard}}</span>
+        </el-form-item>
+        <el-form-item label="注册日期" prop="startTime" v-if="!startTime">
+          <span>{{$moment(resource.startTime).format("YYYY-MM-DD HH:mm:ss")}}</span>
+        </el-form-item>
+
         <el-form-item label="数量" prop="quantity">
           <span>{{resource.quantity}}</span>
         </el-form-item>
         <el-form-item label="状态" prop="state">
           <span class="badge">{{resource.state}}</span>
         </el-form-item>
+        <el-form-item label="单位" prop="unit">
+          <span>{{resource.unit}}</span>
+        </el-form-item>
+
+        <el-form-item label="其他说明" prop="remarks" v-if="!remarks">
+          <span>{{resource.remarks}}</span>
+        </el-form-item>
         <el-form-item>
           <div class="btn btn-medium" @click="back()">返回</div>
         </el-form-item>
@@ -46,7 +67,13 @@
                     photo: '',
                     type: '',
                     quantity: 0,
-                    state: 0
+                    state: 0,
+                    unit: '',
+                    description:'',
+                    standard:'',
+                    startTime:'',
+                    scene:'',
+                    remarks:'',
                 },
             }
         },
@@ -72,6 +99,12 @@
                     this.resource.type = res.data.type
                     this.resource.state = res.data.state
                     this.resource.quantity = res.data.quantity
+                    this.resource.unit = res.data.unit
+                    this.resource.description = res.data.description
+                    this.resource.standard = res.data.standard
+                    this.resource.startTime = res.data.startTime
+                    this.resource.scene = res.data.scene
+                    this.resource.remarks = res.data.remarks
                     this.hideLoading()
                 }).catch((error) => {
                     this.hideLoading()

+ 16 - 3
src/pages/HomepageSearch/CrowdList.vue

@@ -42,20 +42,27 @@
             style="width: 100%; font-size: 20px; color: black">
             <el-table-column
               label="图标"
-              width="400">
+              width="200">
               <template slot-scope="scope"><img :src="scope.row.image" style="width: 50px; height: 50px;"/></template>
             </el-table-column>
             <el-table-column
               prop="name"
               label="名称"
               align="left"
-              width="300">
+              width="200">
             </el-table-column>
             <el-table-column
               prop="count"
               align="center"
               label="项目数量">
             </el-table-column>
+            <el-table-column
+              align="center"
+              label="操作">
+              <template slot-scope="scope">
+                <div class="btn btn-small btn-info" @click="goToDetail(scope.row.code)">查看详情</div>
+              </template>
+            </el-table-column>
           </el-table>
         </template>
           <el-pagination
@@ -157,7 +164,13 @@
             handlePageChange(index) {
                 this.activePage = index;
                 this.handleSearchData();
-            }
+            },
+            goToDetail(code) {
+                this.$router.push({
+                    name: 'ResourceDetail',
+                    params: {id: code}
+                })
+            },
         },
         mounted() {
             this.loadData();

+ 71 - 56
src/pages/Square/PopularProjectAndTaskList.vue

@@ -38,52 +38,37 @@
     </div>
     <div class="mine-body" style="text-align: center;">
       <el-tabs value="myProject" @tab-click="handleTabClick" v-loading="loading" style="width: 90%;margin-left: 5%">
-        <el-tab-pane name="myProject">
+        <el-tab-pane name="myProject" v-if="currTab == 'project'">
           <span v-if="projectAndTaskArr == null || projectAndTaskArr.length == 0"> 暂无项目 </span>
           <el-row v-if="projectAndTaskArr != null && projectAndTaskArr.length != 0" type="flex" align="middle" justify="center"
                   style="font-size: 14px;">
             <el-col :span="6" type="flex" align="middle" justify="center">项目图片</el-col>
             <el-col :span="6" type="flex" align="middle" justify="center">项目名称</el-col>
-            <el-col :span="6" type="flex" align="middle" justify="center">应用类型</el-col>
-            <el-col :span="2" type="flex" align="middle" justify="center">项目预算</el-col>
+            <el-col :span="3" type="flex" align="middle" justify="center">应用类型</el-col>
+            <el-col :span="3" type="flex" align="middle" justify="center">项目预算</el-col>
+            <el-col :span="3" type="flex" align="middle" justify="center">参与人数</el-col>
             <el-col :span="4" type="flex" align="middle" justify="center">操作</el-col>
           </el-row>
-          <project-item v-if="(projectAndTaskArr != null || projectAndTaskArr.length > 0 ) || currTab == 'project'"
+          <project-item v-if="(projectAndTaskArr != null || projectAndTaskArr.length > 0 )"
                                     v-for="(item,index) in projectAndTaskArr" :key="index" :projectItem="item"/>
-          <task-item v-if="(projectAndTaskArr != null || projectAndTaskArr.length > 0 ) || currTab == 'task'"
-                         v-for="(item,index) in projectAndTaskArr" :key="index" :projectItem="item"/>
-<!--          <div v-if="projectAndTaskArr != null || projectAndTaskArr.length > 0"-->
-<!--                        v-for="(item,index) in projectAndTaskArr" :key="index" :projectItem="item">-->
+        </el-tab-pane>
 
-<!--          <template>-->
-<!--            <div class="project-item-container">-->
-<!--              <el-row type="flex" align="middle" justify="center" style="font-size: 14px;">-->
-<!--                <el-col :span="6" type="flex" align="middle" justify="center">-->
-<!--                  <el-badge :value="item.statusVO.text" class="item" :type="item.statusVO.style">-->
-<!--                    <img class="project-cover" src="@/assets/img/home_ban1.jpg">-->
-<!--                  </el-badge>-->
-<!--                </el-col>-->
-<!--                <el-col :span="6" type="flex" align="middle" justify="center">{{item.name}}</el-col>-->
-<!--                &lt;!&ndash;<el-col :span="4">{{project.id}}</el-col>&ndash;&gt;-->
-<!--                <el-col :span="6" type="flex" align="middle" justify="center">-->
-<!--        <span style="font-size: 10px;"-->
-<!--              v-bind:class="['badge']"-->
-<!--        >{{item.platform}}</span>-->
-<!--                </el-col>-->
-<!--                <el-col :span="2" type="flex" align="middle" justify="center">-->
-<!--                  <div class="badge">¥{{item.budget}}</div>-->
-<!--                </el-col>-->
-<!--                <el-col :span="4" type="flex" align="middle" justify="center">-->
-<!--                  <el-badge v-if="item.needHandle" is-dot class="item">-->
-<!--                    <span class="btn btn-small btn-info" @click="goToProjectDetail(item.id)">查看详情</span>-->
-<!--                  </el-badge>-->
-<!--                  <span v-if="!item.needHandle" class="btn btn-small btn-info" @click="goToProjectDetail(item.id)">查看详情</span>-->
-<!--                </el-col>-->
-<!--              </el-row>-->
-<!--            </div>-->
-<!--          </template>-->
-<!--          </div>-->
+        <el-tab-pane name="myProject" v-if="currTab == 'task'">
+          <span v-if="projectAndTaskArr == null || projectAndTaskArr.length == 0"> 暂无项目 </span>
+          <el-row v-if="projectAndTaskArr != null && projectAndTaskArr.length != 0" type="flex" align="middle" justify="center"
+                  style="font-size: 14px;">
+            <el-col :span="5">任务封面</el-col>
+            <el-col :span="4">任务名称</el-col>
+            <el-col :span="4">测试类型</el-col>
+            <el-col :span="4">任务预算</el-col>
+            <el-col :span="4">领取人数</el-col>
+            <el-col :span="3">操作</el-col>
+          </el-row>
+          <task-item v-if="(projectAndTaskArr != null || projectAndTaskArr.length > 0 )"
+                     v-for="(item,index2) in projectAndTaskArr" :key="index2" :task="item"/>
         </el-tab-pane>
+
+
       </el-tabs>
     </div>
 
@@ -134,6 +119,7 @@
         comments: {TaskItem, ProjectItem},
         data(){
             return {
+                loading: false,
                 isLogin: false,
                 searchType:'project',
                 searchVal: '',
@@ -147,13 +133,13 @@
                     {label:"热门测试任务",name:"task"}
                 ],
                 projectAndTaskArr:[],
-                type: 0,
                 activePage:1,
                 totalElements:0,
                 type: ''
             }
         },
         components: {
+            TaskItem,
             ProjectItem,
             SearchBar,
             SquareCard,
@@ -164,6 +150,7 @@
         },
         methods:{
             loadData(){
+                this.showLoading();
                 if (storageGet('user') != null) {
                     this.isLogin = true;
                 }
@@ -175,10 +162,11 @@
                     this.currTab = 'task';
                     this.getHotTask();
                 }
+                this.hideLoading();
             },
             getHotProject(){
                 let params = {
-                    "keyword": this.keyword,//搜索关键字
+                    "keyword": this.searchVal,//搜索关键字
                     "activePage": this.activePage,//指定页面
                     "columnFilters":[]
                 };
@@ -189,7 +177,7 @@
             },
             getHotTask(){
                 let params = {
-                    "keyword": this.keyword,//搜索关键字
+                    "keyword": this.searchVal,//搜索关键字
                     "activePage": this.activePage,//指定页面
                     "columnFilters":[]
                 };
@@ -235,27 +223,23 @@
                 }
             },
             handleSearchData(){
-                let url = '/api/square/search/list';
-                let params = {
-                    "keyword": this.searchVal,//搜索关键字
-                    "activePage": this.activePage,//指定页面
-                    "columnFilters":
-                        [
-                            {
-                                "type": this.searchType // 查询项目就是project,任务就是task
-                            }
-                        ]
-                };
-                Http.post(url,params).then((res)=>{
-                    this.currTab = this.searchType;
-                    this.projectAndTaskArr = res.data.content;
-                    this.totalElements=res.data.totalElements;
-                })
+                console.log("this.searchVal  "  + this.searchVal)
+                if(this.currTab == 'project'){
+                    this.getHotProject();
+                }else{
+                    this.getHotTask();
+                }
             },
             handlePageChange(index){
                 this.activePage = index;
                 this.searchData();
-            }
+            },
+            showLoading () {
+                this.loading = true
+            },
+            hideLoading () {
+                this.loading = false
+            },
         },
         mounted() {
             this.loadData();
@@ -276,4 +260,35 @@
     padding: 15px 0 15px 15px;
   }
 
+
+  .mine-container {
+    padding: 0 80px 40px 80px;
+  }
+
+  .mine-top-wrapper {
+    height: 350px;
+    background-color: #fff;
+  }
+
+  [class*="el-col-"] {
+    height: 100%;
+  }
+
+  .advertise-imgs {
+    height: 100%;
+  }
+
+  .advertise-imgs img {
+    width: 100%;
+    height: 100%;
+  }
+
+  .user-banner {
+    text-align: center;
+    display: inline-table;
+    height: 100%;
+    width: 100%;
+    margin-top: 40px;
+  }
+
 </style>