sunjh 6 vuotta sitten
vanhempi
commit
468e02667a

+ 5 - 5
src/components/Mine.vue

@@ -84,11 +84,11 @@ export default {
   },
   methods: {
     loadData () {
-      Http.get(Apis.PAGE.MY_CROWD_TEST_PAGE,{}).then((res)=>{
-        this.finishedTaskList = res.finishedTaskList
-        this.unFinishedTaskList = res.unFinishedTaskList
-        this.appliedProjectList = res.appliedProjectList
-        this.user = res.user
+      Http.get(Apis.PAGE.MY_CROWD_TEST_PAGE.replace('{userId}', 3), {}).then((res) => {
+        this.finishedTaskList = res.crowdProjectVOList
+        this.unFinishedTaskList = res.unfinishedTasks
+        this.appliedProjectList = res.finishedTasks
+        this.user = res.userVO
       })
     }
   },

+ 2 - 11
src/components/cheat/ProjectAdd.vue

@@ -207,6 +207,7 @@ export default {
         price: '',
         datetime: ''
       },
+      excelFile:{},
       rules: {
         // name: [
         //   {required: true, message: '请输入报告名称', trigger: 'blur'}
@@ -307,17 +308,7 @@ export default {
 
     },
     uploadProjectCreateExcelFile (param) {
-      const formData = new FormData()
-      let config = {
-        //添加请求头
-        headers: {'Content-Type': 'multipart/form-data'},
-      }
-      formData.append('file', param.file)
-      Http.upload(Apis.PROJECT.ADD_PROJECT_BY_EXCEL, formData, config).then((res) => {
-        console.log('上传成功')
-        this.project.excelFileUrl = res.data
-        console.log(res.data)
-      })
+      this.excelFile = param.file
     },
     uploadRequireDoc (param) {
       const formData = new FormData()

+ 7 - 7
src/components/project/ProjectCreate.vue

@@ -352,13 +352,13 @@ export default {
       this.project.budget = ''
     },
     beforeFileUpload (file) {
-      const isAPK = file.type === 'application/vnd.android.package-archive'
-      const isDMG = file.type === 'application/octet-stream'
-
-      if (!isAPK && !isDMG) {
-        this.$message.error('上传安装包只能是 APK 或 DMG 格式!')
-      }
-      return isAPK && isDMG
+      // const isAPK = file.type === 'application/vnd.android.package-archive'
+      // const isDMG = file.type === 'application/octet-stream'
+      //
+      // if (!isAPK && !isDMG) {
+      //   this.$message.error('上传安装包只能是 APK 或 DMG 格式!')
+      // }
+      // return isAPK && isDMG
     },
     loadData () {
       Http.get(Apis.PAGE.PROJECT_DETAIL_PAGE).then((res) => {

+ 6 - 6
src/components/report/ReportCreate.vue

@@ -84,8 +84,8 @@ export default {
     return {
       reportType: ReportType,
       scope: 0,
-      projectId:'',
-      taskId:'',
+      projectId: '',
+      taskId: '',
       dependencyCode: '',
       report: {
         name: '',
@@ -144,12 +144,12 @@ export default {
         conclusion: this.report.conclusion
       }
       console.log(newReport)
-      if (this.taskId == null){
-        Http.post(Apis.REPORT.CREATE_PROJECT_REPORT.replace('{projectId}',this.projectId), newReport).then((res) => {
+      if (this.taskId == null) {
+        Http.post(Apis.REPORT.CREATE_PROJECT_REPORT.replace('{projectId}', this.projectId), newReport).then((res) => {
           console.log(res)
         })
-      }else{
-        Http.post(Apis.REPORT.CREATE_TASK_REPORT.replace('{projectId}',this.projectId).replace('{taskId}',this.taskId), newReport).then((res) => {
+      } else {
+        Http.post(Apis.REPORT.CREATE_TASK_REPORT.replace('{projectId}', this.projectId).replace('{taskId}', this.taskId), newReport).then((res) => {
           console.log(res)
         })
       }

+ 3 - 3
src/js/api.js

@@ -41,9 +41,9 @@ export default {
     ADD_AGENCY: ''
   },
   PAGE: {
-    HOME_PAGE: '/api/index/',
-    SQUARE_PAGE: '/api/task/',
-    MY_CROWD_TEST_PAGE: '/api/page/myCrowdTest/',
+    HOME_PAGE: '/api/common/index/',
+    SQUARE_PAGE: '/api/common/task/',
+    MY_CROWD_TEST_PAGE: '/api/common/mycrowd/{userId}',
     TASK_DETAIL_PAGE: '/api/page/taskDetail/{taskId}/',
     PROJECT_DETAIL_PAGE: '/api/project/{projectId}/',
     REPORT_DETAIL_PAGE: '/api/page/reportDetail/{reportId}/',