Browse Source

1、新增开户行
2、新建项目新增go平台选项、修改
3、go平台按钮校验
4、首页样式修改

郭超 2 years ago
parent
commit
765a0a09da

+ 21 - 2
src/components/task/Task.vue

@@ -86,6 +86,19 @@
             <el-form-item label="领取人数" prop="contactPhone" v-if="isModifyMode&&task.resource !== '0' && currType.type===1">
               <el-input-number v-model="task.participantCount" :min="2" :max="1000" label="领取人数"></el-input-number>
             </el-form-item>
+            <el-form-item label="Go平台" prop="goPlatform">
+              <div v-if="!isModifyMode">
+                <!--<div v-if="task.resource=='1'">{{updateLocation(task.location)}}</div>-->
+                <div v-if="task.goPlatform">使用</div>
+                <div v-else>不使用</div>
+              </div>
+              <div v-else>
+                <el-radio-group v-model="task.goPlatform">
+                  <el-radio :label="0">不使用</el-radio>
+                  <el-radio :label="1">使用</el-radio>
+                </el-radio-group>
+              </div>
+            </el-form-item>
             <el-form-item label="领取人数" prop="quotePrice" v-if="!isModifyMode">
               {{task.acceptedCount }}/{{ task.participantCount}}
             </el-form-item>
@@ -154,10 +167,11 @@
             </el-form-item>
 
             <el-form-item v-if="!isModifyMode">
+              <el-button size="mini" @click="toProject()">项目详情</el-button>
               <el-button v-if="taskOperationControl.update||taskOperationControl.taskRecommend" @click="manageVirtualMachine()" type="primary" size="mini">管理虚拟机</el-button>
               <el-button v-if="taskOperationControl.writeReport||taskOperationControl.uploadReport" @click="connectVirtualMachine()" type="primary" size="mini">连接虚拟机</el-button>
-              <el-button size="mini" @click="toProject()">项目详情</el-button>
-              <el-button size="mini" @click="toGo()">go语言测试在线测试平台</el-button>
+
+              <el-button v-if="(taskOperationControl.writeReport||taskOperationControl.uploadReport||taskOperationControl.update||taskOperationControl.taskRecommend)&&task.goPlatform" type="primary" size="mini" @click="toGo()">go语言测试在线测试平台</el-button>
 
               <el-popover
                 placement="top-start"
@@ -338,6 +352,7 @@ export default {
         doc: [],
         requireDocUrl: '',
         participantCount: 1,
+        goPlatform: 0,
         title: '',
         description: '',
         endPoint: {
@@ -536,6 +551,7 @@ export default {
       this.task.institution = ''
       this.task.datetime = ''
       this.task.participantCount = 1
+      this.task.goPlatform = 0
       // this.task.endPointVO.caseId = ''
       // this.task.endPointVO.examId = ''
     },
@@ -646,6 +662,7 @@ export default {
       this.task.quotePrice = res.crowdTaskVO.quotePrice
       this.task.acceptedCount = res.crowdTaskVO.acceptedCount
       this.task.participantCount = res.crowdTaskVO.participantCount
+      this.task.goPlatform = res.crowdTaskVO.goPlatform
       this.task.fixedPrice = res.crowdTaskVO.fixedPrice
       this.task.doc = []
       this.task.requireDocUrl = res.crowdTaskVO.requirementFile
@@ -731,6 +748,7 @@ export default {
             fixedPrice: this.task.fixedPrice,
             requirementFile: this.task.requireDocUrl,
             participantCount: this.task.participantCount,
+            goPlatform: this.task.goPlatform,
             endPoint: this.task.endPoint
           }
           //console.log(newTask)
@@ -762,6 +780,7 @@ export default {
       this.task.doc = []
       this.task.requireDocUrl = res.crowdTaskVO.requirementFile,
         this.task.participantCount = res.crowdTaskVO.participantCount
+      this.task.goPlatform = res.crowdTaskVO.goPlatform
       this.task.endPoint = res.crowdTaskVO.endPointVO ? res.crowdTaskVO.endPointVO : {
         serverCode: '',
       }

+ 11 - 0
src/components/task/TaskCreate.vue

@@ -80,6 +80,14 @@
         <el-form-item label="领取人数" prop="contactPhone" v-if="task.resource !== '0' && currType.type===1">
           <el-input-number v-model="task.participantCount" :min="2" :max="1000" label="领取人数"></el-input-number>
         </el-form-item>
+
+        <el-form-item label="Go平台" prop="goPlatform">
+          <el-radio-group v-model="task.goPlatform">
+            <el-radio :label="0">不使用</el-radio>
+            <el-radio :label="1">使用</el-radio>
+          </el-radio-group>
+        </el-form-item>
+
         <el-form-item label="需求文档" prop="doc">
           <el-upload
             drag
@@ -159,6 +167,7 @@
           doc: [],
           requireDocUrl: '',
           participantCount: 1,
+          goPlatform: 0,
           endPoint: {
             serverCode: '',
           }
@@ -328,6 +337,7 @@
               fixedPrice: this.task.fixedPrice,
               requirementFile: this.task.requireDocUrl,
               participantCount: this.task.participantCount,
+              goPlatform: this.task.goPlatform,
               endPoint: this.task.endPoint
             }
             Http.post(Apis.TASK.CREATE_TASK.replace('{projectId}', this.projectId), newTask).then((res) => {
@@ -356,6 +366,7 @@
           (this.task.institution = '')
         this.task.datetime = '',
           this.task.participantCount = 1
+        this.task.goPlatform
       },
       locationChange(provinceId, cityId) {
         if (provinceId || cityId) {

+ 4 - 4
src/config/index.js

@@ -135,10 +135,10 @@ export const setConfig = (conf) => {
 }
 
 // 开发使用
-// export const login_url = 'http://crowd.dev.mooctest.net/page/login?redirect=http%3a%2f%2fcrowd.dev.mooctest.net%2f%23%2fhome'
-// export const register_url = 'http://crowd.dev.mooctest.net/page/register'
+export const login_url = 'http://crowd.dev.mooctest.net/page/login?redirect=http%3a%2f%2fcrowd.dev.mooctest.net%2f%23%2fhome'
+export const register_url = 'http://crowd.dev.mooctest.net/page/register'
 
 
 // 线上使用
-export const login_url = 'http://user.cofortest.com:8081/page/login?redirect=http%3a%2f%2fwww.cofortest.com%2f%23%2fhome'
-export const  register_url = 'http://user.cofortest.com:8081/page/register'
+// export const login_url = 'http://user.cofortest.com:8081/page/login?redirect=http%3a%2f%2fwww.cofortest.com%2f%23%2fhome'
+// export const  register_url = 'http://user.cofortest.com:8081/page/register'

+ 2 - 2
src/pages/Homepage/HotAgency.vue

@@ -7,7 +7,7 @@
     </div>
     <div class="popular-list">
       <el-row class="popular-list-item" v-for="item in agencyRank" :key="item.id">
-        <el-col :span="19">
+        <el-col :span="18">
           <img :src="item.agencyPhoto==null?defaultValue.image:item.agencyPhoto" alt="logo-project" class="pull-left project-logo-img" style="cursor: pointer" @click="goToDetail(item.userId)">
           <div style="margin-left: 55px; cursor: pointer;" @click="goToDetail(item.userId)"  >
             <div class="list-item-title single-line-title">
@@ -18,7 +18,7 @@
             </div>
           </div>
         </el-col>
-        <el-col :span="5">
+        <el-col :span="6">
           <div class="project-people-number">
             {{item.taskCount}}次
           </div>

+ 2 - 2
src/pages/Homepage/HotCrowd.vue

@@ -7,7 +7,7 @@
     </div>
     <div class="popular-list">
       <el-row class="popular-list-item" v-for="item in applicationTypeRank" :key="item.id" @click.native="goToDetail(item.code)">
-        <el-col :span="19">
+        <el-col :span="18">
           <img :src="item.image" alt="logo-project" class="pull-left project-logo-img">
           <div style="margin-left: 55px">
             <div class="list-item-title single-line-title">
@@ -17,7 +17,7 @@
             </div>
           </div>
         </el-col>
-        <el-col :span="5">
+        <el-col :span="6">
           <div class="project-people-number">
             {{item.count}}次
           </div>

+ 18 - 9
src/pages/UserCenter/MyBankCard.vue

@@ -31,13 +31,16 @@
             </el-option>
           </el-select>
         </el-form-item>
+        <el-form-item label="开户行" prop="subName">
+          <el-input v-model="bankCardForm.subName"></el-input>
+        </el-form-item>
       </el-form>
-      <div>
-        银行卡绑定成功后,您将享受以下服务:
-      </div>
-      <div>①可以申请平台的收益</div>
-      <div>②可以申请平台的收益</div>
-      <div>③可以申请平台的收益</div>
+<!--      <div>-->
+<!--        银行卡绑定成功后,您将享受以下服务:-->
+<!--      </div>-->
+<!--      <div>①可以申请平台的收益</div>-->
+<!--      <div>②可以申请平台的收益</div>-->
+<!--      <div>③可以申请平台的收益</div>-->
       <span slot="footer" class="dialog-footer">
     <el-button @click="addBankCard = false">取 消</el-button>
     <el-button type="primary" @click="handleAddBankCard">确认添加</el-button>
@@ -66,6 +69,7 @@
         form: {
           name: '',
           number:'',
+          subName:'',
           institution:'',
           date:'',
           isPublic:''
@@ -73,7 +77,8 @@
         bankCardForm:{
           user:'',
           number:'',
-          name:''
+          name:'',
+          subName:'',
         },
         user:{},
         bankCardVOList:[],
@@ -87,7 +92,10 @@
             ],
             name: [
                 {required: true, message: '银行类型不可为空', trigger: 'blur'}
-            ]
+            ],
+            subName: [
+              {required: true, message: '开户行不可为空', trigger: 'blur'},
+            ],
         }
       }
     },
@@ -110,7 +118,8 @@
 
                       this.bankCardForm.user = '',
                       this.bankCardForm.number = '',
-                      this.bankCardForm.name = ''
+                      this.bankCardForm.name = '',
+                      this.bankCardForm.subName = '',
                       this.loadData();
 
                   }).catch(error => {