wangJJ 5 years ago
parent
commit
22beadef09

+ 0 - 4
src/components/project/ProjectCreate.vue

@@ -21,9 +21,6 @@
           <el-input type="textarea" style="width: 400px" v-model="project.desc"
           <el-input type="textarea" style="width: 400px" v-model="project.desc"
                     placeholder="请输入对项目的描述"></el-input>
                     placeholder="请输入对项目的描述"></el-input>
         </el-form-item>
         </el-form-item>
-        <el-form-item label="领取人数" prop="contactPhone">
-          <el-input-number v-model="project.participantCount" :min="1" :max="10" label="领取人数"></el-input-number>
-        </el-form-item>
         <!--<el-form-item label="价格" prop="price">-->
         <!--<el-form-item label="价格" prop="price">-->
         <!--<el-input type="number" v-model="project.price">-->
         <!--<el-input type="number" v-model="project.price">-->
         <!--<template slot="append">¥</template>-->
         <!--<template slot="append">¥</template>-->
@@ -176,7 +173,6 @@ export default {
         contactPhone: '',
         contactPhone: '',
         type: [],
         type: [],
         platform: [],
         platform: [],
-        participantCount:1,
         desc: '',
         desc: '',
         doc: [],
         doc: [],
         file: [],
         file: [],

+ 6 - 2
src/components/report/TaskReport.vue

@@ -97,7 +97,8 @@ export default {
         content: '',
         content: '',
         file: [],
         file: [],
         fileUrl: '',
         fileUrl: '',
-        conclusion: ''
+        conclusion: '',
+        participantCount: 1
       },
       },
       rules: {
       rules: {
         name: [
         name: [
@@ -149,7 +150,8 @@ export default {
             target: this.report.target,
             target: this.report.target,
             content: this.report.content,
             content: this.report.content,
             file: this.report.fileUrl,
             file: this.report.fileUrl,
-            conclusion: this.report.conclusion
+            conclusion: this.report.conclusion,
+            participantCount: this.report.participantCount
           }
           }
           console.log(newReport)
           console.log(newReport)
           Http.put(Apis.REPORT.UPDATE_TASK_REPORT.replace('{projectId}', this.projectId).replace('{taskId}', this.taskId).replace('{reportId}', this.reportId), newReport).then((res) => {
           Http.put(Apis.REPORT.UPDATE_TASK_REPORT.replace('{projectId}', this.projectId).replace('{taskId}', this.taskId).replace('{reportId}', this.reportId), newReport).then((res) => {
@@ -175,6 +177,7 @@ export default {
       this.report.file = ''
       this.report.file = ''
       this.report.type = ''
       this.report.type = ''
       this.report.conclusion = ''
       this.report.conclusion = ''
+      this.report.participantCount = 1
     },
     },
     cancelCreate () {
     cancelCreate () {
       this.isModifyMode = false
       this.isModifyMode = false
@@ -235,6 +238,7 @@ export default {
         this.report.fileUrl = res.crowdReportVO.file
         this.report.fileUrl = res.crowdReportVO.file
         this.report.conclusion = res.crowdReportVO.conclusion
         this.report.conclusion = res.crowdReportVO.conclusion
         this.report.target = res.crowdReportVO.target
         this.report.target = res.crowdReportVO.target
+        this.report.participantCount = res.crowdReportVO.participantCount
         this.hideLoading()
         this.hideLoading()
       }).catch((error) => {
       }).catch((error) => {
         this.hideLoading()
         this.hideLoading()

+ 14 - 12
src/components/task/Task.vue

@@ -66,6 +66,12 @@
             <el-tab-pane :label="resourceType[2]" name="2"></el-tab-pane>
             <el-tab-pane :label="resourceType[2]" name="2"></el-tab-pane>
           </el-tabs>
           </el-tabs>
         </el-form-item>
         </el-form-item>
+        <el-form-item label="领取人数" prop="quotePrice" v-if="isModifyMode">
+          <el-input-number v-model="task.participantCount" :min="1" :max="100" label="领取人数"></el-input-number>
+        </el-form-item>
+        <el-form-item label="领取人数" prop="quotePrice" v-if="!isModifyMode">
+          {{task.acceptedCount }}/{{ task.participantCount}}
+        </el-form-item>
         <el-form-item label="需求文档" prop="doc">
         <el-form-item label="需求文档" prop="doc">
           <el-upload
           <el-upload
             style="width: 400px"
             style="width: 400px"
@@ -98,12 +104,6 @@
             </span>
             </span>
         </el-form-item>
         </el-form-item>
 
 
-
-        <el-form-item label="领取人数" prop="quotePrice">
-          {{task.acceptedCount }}/{{ task.participantCount}}
-        </el-form-item>
-
-
         <el-form-item label="任务截止时间" prop="datetime">
         <el-form-item label="任务截止时间" prop="datetime">
           <div class="block" v-if="isModifyMode">
           <div class="block" v-if="isModifyMode">
             <el-date-picker
             <el-date-picker
@@ -256,7 +256,8 @@
           quotePrice: '',
           quotePrice: '',
           fixedPrice: '',
           fixedPrice: '',
           doc: [],
           doc: [],
-          requireDocUrl: '123.doc'
+          requireDocUrl: '123.doc',
+          participantCount:1
         },
         },
         reportList: [],
         reportList: [],
         pickerOptions: {
         pickerOptions: {
@@ -393,6 +394,7 @@
         this.task.location = {provinceCode: '', cityCode: ''}
         this.task.location = {provinceCode: '', cityCode: ''}
         this.task.institution = ''
         this.task.institution = ''
         this.task.datetime = ''
         this.task.datetime = ''
+        this.task.participantCount = 1
       },
       },
       //显示页面加载画面
       //显示页面加载画面
       showLoading() {
       showLoading() {
@@ -438,7 +440,7 @@
         this.task.title = res.crowdTaskVO.title
         this.task.title = res.crowdTaskVO.title
         this.task.description = res.crowdTaskVO.description
         this.task.description = res.crowdTaskVO.description
         this.task.serviceType = res.crowdTaskVO.serviceType
         this.task.serviceType = res.crowdTaskVO.serviceType
-        this.task.resource = res.crowdTaskVO.resource
+        this.task.resource = res.crowdTaskVO.resource.toString()
         this.task.location = getProvinceCodeByProvinceName(res.crowdTaskVO.location.provinceCode, res.crowdTaskVO.location.cityCode)
         this.task.location = getProvinceCodeByProvinceName(res.crowdTaskVO.location.provinceCode, res.crowdTaskVO.location.cityCode)
         this.task.institution = res.crowdTaskVO.institution
         this.task.institution = res.crowdTaskVO.institution
         this.task.datetime = new Date(res.crowdTaskVO.datetime)
         this.task.datetime = new Date(res.crowdTaskVO.datetime)
@@ -451,8 +453,6 @@
         this.task.agencyId = res.crowdTaskVO.agencyId
         this.task.agencyId = res.crowdTaskVO.agencyId
         this.task.status = res.crowdTaskVO.status
         this.task.status = res.crowdTaskVO.status
         this.taskOperationControl = res.taskOperationControl
         this.taskOperationControl = res.taskOperationControl
-        // this.reportList = res.crowdReportVOList
-        res.acceptedUserList;
         this.acceptedUserList = res.acceptedUserList;
         this.acceptedUserList = res.acceptedUserList;
         this.handleFormatReport(this.acceptedUserList);
         this.handleFormatReport(this.acceptedUserList);
       },
       },
@@ -487,7 +487,8 @@
               datetime: this.task.datetime,
               datetime: this.task.datetime,
               quotePrice: this.task.quotePrice,
               quotePrice: this.task.quotePrice,
               fixedPrice: this.task.fixedPrice,
               fixedPrice: this.task.fixedPrice,
-              requirementFile: this.task.requireDocUrl
+              requirementFile: this.task.requireDocUrl,
+              participantCount: this.task.participantCount
             }
             }
             //console.log(newTask)
             //console.log(newTask)
             updateTask(this.projectId, this.taskId, newTask, this.updateTaskSuccess, this.updateTaskFail)
             updateTask(this.projectId, this.taskId, newTask, this.updateTaskSuccess, this.updateTaskFail)
@@ -515,7 +516,8 @@
         this.task.quotePrice = res.crowdTaskVO.quotePrice
         this.task.quotePrice = res.crowdTaskVO.quotePrice
         this.task.fixedPrice = res.crowdTaskVO.fixedPrice
         this.task.fixedPrice = res.crowdTaskVO.fixedPrice
         this.task.doc = []
         this.task.doc = []
-        this.task.requireDocUrl = res.crowdTaskVO.requirementFile
+        this.task.requireDocUrl = res.crowdTaskVO.requirementFile,
+          this.task.participantCount = res.crowdTaskVO.participantCount
         this.reportList = res.crowdReportVOList
         this.reportList = res.crowdReportVOList
         this.hideLoading()
         this.hideLoading()
         notify('success', '修改成功')
         notify('success', '修改成功')

+ 9 - 3
src/components/task/TaskCreate.vue

@@ -26,6 +26,9 @@
             </span>
             </span>
           </el-radio-group>
           </el-radio-group>
         </el-form-item>
         </el-form-item>
+        <el-form-item label="领取人数" prop="contactPhone">
+          <el-input-number v-model="task.participantCount" :min="1" :max="10" label="领取人数"></el-input-number>
+        </el-form-item>
         <el-form-item label="任务可见性" prop="resource">
         <el-form-item label="任务可见性" prop="resource">
           <el-tabs :tab-position="tabPosition" v-model="task.resource" style="width: 800px">
           <el-tabs :tab-position="tabPosition" v-model="task.resource" style="width: 800px">
             <el-tab-pane :label="resourceType[0]" name="0">
             <el-tab-pane :label="resourceType[0]" name="0">
@@ -126,7 +129,8 @@ export default {
         quotePrice: '',
         quotePrice: '',
         fixedPrice: '',
         fixedPrice: '',
         doc: [],
         doc: [],
-        requireDocUrl: '123.doc'
+        requireDocUrl: '123.doc',
+        participantCount: 1
       },
       },
       pickerOptions: {
       pickerOptions: {
         shortcuts: [
         shortcuts: [
@@ -261,7 +265,8 @@ export default {
             datetime: this.task.datetime,
             datetime: this.task.datetime,
             quotePrice: this.task.quotePrice,
             quotePrice: this.task.quotePrice,
             fixedPrice: this.task.fixedPrice,
             fixedPrice: this.task.fixedPrice,
-            requirementFile: this.task.requireDocUrl
+            requirementFile: this.task.requireDocUrl,
+            participantCount: this.task.participantCount
           }
           }
           Http.post(Apis.TASK.CREATE_TASK.replace('{projectId}', this.projectId), newTask).then((res) => {
           Http.post(Apis.TASK.CREATE_TASK.replace('{projectId}', this.projectId), newTask).then((res) => {
             console.log(res)
             console.log(res)
@@ -287,7 +292,8 @@ export default {
       this.task.resource = '广场'; //如果是广场不用管Location和institution ,定向看institution,区域看location
       this.task.resource = '广场'; //如果是广场不用管Location和institution ,定向看institution,区域看location
       (this.task.location = {provinceCode: '', cityCode: ''}),
       (this.task.location = {provinceCode: '', cityCode: ''}),
         (this.task.institution = '')
         (this.task.institution = '')
-      this.task.datetime = ''
+      this.task.datetime = '',
+        this.task.participantCount = 1
     },
     },
     locationChange (provinceId, cityId) {
     locationChange (provinceId, cityId) {
       if (provinceId || cityId) {
       if (provinceId || cityId) {