Преглед изворни кода

Merge branch 'fix-gd-list-bugs' into 'Dev'

Fix gd list bugs

See merge request crowd-2019/crowd-test-service-front!14
薛晓波 пре 5 година
родитељ
комит
c8973cb7a1

+ 2 - 2
config/prod.env.js

@@ -1,6 +1,6 @@
 'use strict'
 module.exports = {
   NODE_ENV: '"production"',
-  API_ROOT: '"//www.callfortest.com"',
-  LOGIN_URL:'"http://user.callfortest.com/page/login?redirect=http%3a%2f%2fwww.callfortest.com%2f%23%2fmine"'
+  API_ROOT: '"//www.cofortest.com"',
+  LOGIN_URL:'"http://user.cofortest.com/page/login?redirect=http%3a%2f%2fwww.cofortest.com%2f%23%2fmine"'
 }

+ 16 - 16
src/components/Home.vue

@@ -21,9 +21,9 @@
               <span style="font-size: 30px;color: white"><i class="el-icon-user"></i></span>
             </div>
             <el-row type="flex" align="middle" justify="center" style="font-size: 14px;">
-              <el-col :span="18" type="flex" align="middle" justify="start"><span style="font-size: 50px; color: white;">{{systemStatistics[0].value}}</span>
+              <el-col :span="18" type="flex" align="middle" justify="start" style="text-align: right"><span style="font-size: 50px; color: white;">{{systemStatistics[0].value}}</span>
               </el-col>
-              <el-col :span="20" type="flex" align="bottom" justify="end"><span> <el-link style="font-size: 16px; color: white;"
+              <el-col :span="20" type="flex" align="bottom" justify="end" style="text-align: left;padding-left: 20px"><span> <el-link style="font-size: 16px; color: white;"
                                                                                           type="success"
                                                                                           :underline="false">{{systemStatistics[0].name}}</el-link></span>
               </el-col>
@@ -36,9 +36,9 @@
               <span style="font-size: 30px;color: white;"><i class="el-icon-setting"></i></span>
             </div>
             <el-row type="flex" align="middle" justify="center" style="font-size: 14px;">
-              <el-col :span="18" type="flex" align="middle" justify="start"><span style="font-size: 50px;color: white;">{{systemStatistics[1].value}}</span>
+              <el-col :span="18" type="flex" align="middle" justify="start" style="text-align: right"><span style="font-size: 50px;color: white;">{{systemStatistics[1].value}}</span>
               </el-col>
-              <el-col :span="20" type="flex" align="bottom" justify="end"><span> <el-link style="font-size: 16px;color: white;"
+              <el-col :span="20" type="flex" align="bottom" justify="end" style="text-align: left;padding-left: 20px"><span> <el-link style="font-size: 16px;color: white;"
                                                                                           type="success"
                                                                                           :underline="false">{{systemStatistics[1].name}}</el-link></span>
               </el-col>
@@ -52,9 +52,9 @@
               <span style="font-size: 30px;color: white;"><i class="el-icon-user-solid"></i></span>
             </div>
             <el-row type="flex" align="middle" justify="center" style="font-size: 14px;">
-              <el-col :span="18" type="flex" align="middle" justify="start"><span style="font-size: 50px;color: white;">{{systemStatistics[2].value}}</span>
+              <el-col :span="18" type="flex" align="middle" justify="start" style="text-align: right"><span style="font-size: 50px;color: white;">{{systemStatistics[2].value}}</span>
               </el-col>
-              <el-col :span="20" type="flex" align="bottom" justify="end"><span> <el-link style="font-size: 16px;color: white;"
+              <el-col :span="20" type="flex" align="bottom" justify="end" style="text-align: left;padding-left: 20px"><span> <el-link style="font-size: 16px;color: white;"
                                                                                           type="success"
                                                                                           :underline="false">{{systemStatistics[2].name}}</el-link></span>
               </el-col>
@@ -67,9 +67,9 @@
               <span style="font-size: 30px;color: white;"><i class="el-icon-cpu"></i></span>
             </div>
             <el-row type="flex" align="middle" justify="center" style="font-size: 14px;">
-              <el-col :span="18" type="flex" align="middle" justify="start"><span style="font-size: 50px;color: white;">{{systemStatistics[3].value}}</span>
+              <el-col :span="18" type="flex" align="middle" justify="start" style="text-align: right"><span style="font-size: 50px;color: white;">{{systemStatistics[3].value}}</span>
               </el-col>
-              <el-col :span="20" type="flex" align="bottom" justify="end"><span> <el-link style="font-size: 16px;color: white;"
+              <el-col :span="20" type="flex" align="bottom" justify="end" style="text-align: left;padding-left: 20px"><span> <el-link style="font-size: 16px;color: white;"
                                                                                           type="success"
                                                                                           :underline="false">{{systemStatistics[3].name}}</el-link></span>
               </el-col>
@@ -84,9 +84,9 @@
               <span style="font-size: 30px;color: white;"><i class="el-icon-coin"></i></span>
             </div>
             <el-row type="flex" align="middle" justify="center" style="font-size: 14px;">
-              <el-col :span="18" type="flex" align="middle" justify="start"><span style="font-size: 50px;color: white;">{{systemStatistics[4].value}}</span>
+              <el-col :span="18" type="flex" align="middle" justify="start" style="text-align: right"><span style="font-size: 50px;color: white;">{{systemStatistics[4].value}}</span>
               </el-col>
-              <el-col :span="20" type="flex" align="bottom" justify="end"><span> <el-link style="font-size: 16px;color: white;"
+              <el-col :span="20" type="flex" align="bottom" justify="end" style="text-align: left;padding-left: 20px"><span> <el-link style="font-size: 16px;color: white;"
                                                                                           type="success"
                                                                                           :underline="false">{{systemStatistics[4].name}}</el-link></span>
               </el-col>
@@ -99,9 +99,9 @@
               <span style="font-size: 30px;color: white;"><i class="el-icon-bank-card"></i></span>
             </div>
             <el-row type="flex" align="middle" justify="center" style="font-size: 14px;">
-              <el-col :span="18" type="flex" align="middle" justify="start"><span style="font-size: 50px;color: white;">{{systemStatistics[5].value}}</span>
+              <el-col :span="18" type="flex" align="middle" justify="start" style="text-align: right"><span style="font-size: 50px;color: white;">{{systemStatistics[5].value}}</span>
               </el-col>
-              <el-col :span="20" type="flex" align="bottom" justify="end"><span> <el-link style="font-size: 16px;color: white;"
+              <el-col :span="20" type="flex" align="bottom" justify="end" style="text-align: left;padding-left: 20px"><span> <el-link style="font-size: 16px;color: white;"
                                                                                           type="success"
                                                                                           :underline="false">{{systemStatistics[5].name}}</el-link></span>
               </el-col>
@@ -115,9 +115,9 @@
               <span style="font-size: 30px;color: white;"><i class="el-icon-notebook-1"></i></span>
             </div>
             <el-row type="flex" align="middle" justify="center" style="font-size: 14px;">
-              <el-col :span="18" type="flex" align="middle" justify="start"><span style="font-size: 50px;color: white;">{{systemStatistics[6].value}}</span>
+              <el-col :span="18" type="flex" align="middle" justify="start" style="text-align: right"><span style="font-size: 50px;color: white;">{{systemStatistics[6].value}}</span>
               </el-col>
-              <el-col :span="20" type="flex" align="bottom" justify="end"><span> <el-link style="font-size: 16px;color: white;"
+              <el-col :span="20" type="flex" align="bottom" justify="end" style="text-align: left;padding-left: 20px"><span> <el-link style="font-size: 16px;color: white;"
                                                                                           type="success"
                                                                                           :underline="false">{{systemStatistics[6].name}}</el-link></span>
               </el-col>
@@ -130,9 +130,9 @@
               <span style="font-size: 30px;color: white;"><i class="el-icon-notebook-2"></i></span>
             </div>
             <el-row type="flex" align="middle" justify="center" style="font-size: 14px;">
-              <el-col :span="18" type="flex" align="middle" justify="start"><span style="font-size: 50px;color: white;">{{systemStatistics[7].value}}</span>
+              <el-col :span="18" type="flex" align="middle" justify="start" style="text-align: right"><span style="font-size: 50px;color: white;">{{systemStatistics[7].value}}</span>
               </el-col>
-              <el-col :span="20" type="flex" align="bottom" justify="end"><span> <el-link style="font-size: 16px;color: white;"
+              <el-col :span="20" type="flex" align="bottom" justify="end" style="text-align: left;padding-left: 20px"><span> <el-link style="font-size: 16px;color: white;"
                                                                                           type="success"
                                                                                           :underline="false">{{systemStatistics[7].name}}</el-link></span>
               </el-col>

+ 31 - 3
src/components/authen/AgencyAuthentication.vue

@@ -145,6 +145,7 @@ export default {
         ],
         bankAccount: [
           {required: true, message: '请输入银行卡账户', trigger: 'blur'},
+          {min: 16, max: 19, message: '银行卡账户输入有误', trigger: 'blur'},
           {
             validator: (rule, value, callback) => {
               if (!this.checkNumber(value)) {
@@ -307,7 +308,25 @@ export default {
       //return this.$confirm(`确定移除 ${file.name}?`)
     },
     //文件上传前的响应函数
-    beforeFileUpload () {
+    beforeFileUpload (file) {
+      // 文件大小不能超过10M
+      if (file.size > 10 * 1000 * 1000){
+        notify('error', '单个文件大小不能超过10M')
+        return false;
+      }
+      let fileName = file.name
+      let index = fileName.lastIndexOf('.');
+      // 文件不能没有后缀
+      if (index <= 0){
+        notify('error', '只能上传png/jpg格式的文件')
+        return false;
+      }
+      let fileSuffix = fileName.substr(index)
+      // 文件后缀必须是.png或者.jpg
+      if (fileSuffix !== '.jpg' && fileSuffix !== '.png') {
+        notify('error', '只能上传png/jpg格式的文件')
+        return false;
+      }
     },
     //上传文件,此处为上传图片
     uploadFile (param) {
@@ -318,13 +337,22 @@ export default {
       }
       formData.append('file', param.file)
       Http.upload(Apis.FILE.UPLOAD_IMAGE.replace('{userId}', this.user.userVO.id), formData, config).then((res) => {
-        console.log('上传成功')
+        this.hideLoading()
         this.authentication.agencyPhoto = res.data
         console.log(res.data)
         notify('success', '上传成功')
         this.$refs['authentication'].validateField('agencyPhoto');
       }).catch(error => {
-        notify('error', error.data)
+        this.hideLoading()
+        try {
+          if (error.response.status === 413){
+            notify('error', '文件过大,请选择小于20M的图片')
+          }else if (error.response.status === 500){
+            notify('error', '上传文件发生错误,请稍后重试')
+          }
+        }catch (e) {
+          notify('error', error.data)
+        }
       })
     },
     //设置服务类型

+ 29 - 2
src/components/authen/AgencyAuthenticationCreate.vue

@@ -127,6 +127,7 @@ export default {
         ],
         bankAccount: [
           {required: true, message: '请输入银行卡账户', trigger: 'blur'},
+          {min: 16, max: 19, message: '银行卡账户输入有误', trigger: 'blur'},
           {
             validator: (rule, value, callback) => {
               if (!this.checkNumber(value)) {
@@ -276,7 +277,25 @@ export default {
       //return this.$confirm(`确定移除 ${file.name}?`)
     },
     //文件上传前的响应函数
-    beforeFileUpload () {
+    beforeFileUpload (file) {
+      // 文件大小不能超过10M
+      if (file.size > 10 * 1000 * 1000){
+        notify('error', '单个文件大小不能超过10M')
+        return false;
+      }
+      let fileName = file.name
+      let index = fileName.lastIndexOf('.');
+      // 文件不能没有后缀
+      if (index <= 0){
+        notify('error', '只能上传png/jpg格式的文件')
+        return false;
+      }
+      let fileSuffix = fileName.substr(index)
+      // 文件后缀必须是.png或者.jpg
+      if (fileSuffix !== '.jpg' && fileSuffix !== '.png') {
+        notify('error', '只能上传png/jpg格式的文件')
+        return false;
+      }
     },
     //上传文件,此处为上传图片
     uploadFile (param) {
@@ -295,7 +314,15 @@ export default {
         this.$refs['authentication'].validateField('agencyPhoto');
       }).catch(error => {
         this.hideLoading()
-        notify('error', error.data)
+        try {
+          if (error.response.status === 413){
+            notify('error', '文件过大,请选择小于20M的图片')
+          }else if (error.response.status === 500){
+            notify('error', '上传文件发生错误,请稍后重试')
+          }
+        }catch (e) {
+          notify('error', error.data)
+        }
       })
     },
     //设置服务类型

+ 30 - 3
src/components/authen/EnterpriseAuthentication.vue

@@ -123,6 +123,7 @@ export default {
             ],
             bankAccount: [
                 {required: true, message: '请输入对公账户', trigger: 'blur'},
+                {min: 16, max: 19, message: '对公账户输入有误', trigger: 'blur'},
                 {
                     validator: (rule, value, callback) => {
                         if (!this.checkNumber(value)) {
@@ -259,7 +260,25 @@ export default {
       //return this.$confirm(`确定移除 ${file.name}?`)
     },
     //文件上传前的响应函数
-    beforeFileUpload () {
+    beforeFileUpload (file) {
+      // 文件大小不能超过10M
+      if (file.size > 10 * 1000 * 1000){
+        notify('error', '单个文件大小不能超过10M')
+        return false;
+      }
+      let fileName = file.name
+      let index = fileName.lastIndexOf('.');
+      // 文件不能没有后缀
+      if (index <= 0){
+        notify('error', '只能上传png/jpg格式的文件')
+        return false;
+      }
+      let fileSuffix = fileName.substr(index)
+      // 文件后缀必须是.png或者.jpg
+      if (fileSuffix !== '.jpg' && fileSuffix !== '.png') {
+        notify('error', '只能上传png/jpg格式的文件')
+        return false;
+      }
     },
     //上传文件,此处为上传图片
     uploadFile (param) {
@@ -277,8 +296,16 @@ export default {
         console.log(res.data)
         notify('success', '上传成功')
       }).catch(error => {
-        this.hideLoading();
-        notify('error', error.data)
+        this.hideLoading()
+        try {
+          if (error.response.status === 413){
+            notify('error', '文件过大,请选择小于20M的图片')
+          }else if (error.response.status === 500){
+            notify('error', '上传文件发生错误,请稍后重试')
+          }
+        }catch (e) {
+          notify('error', error.data)
+        }
       })
     },
     //

+ 29 - 2
src/components/authen/EnterpriseAuthenticationCreate.vue

@@ -104,6 +104,7 @@ export default {
         ],
         bankAccount: [
           {required: true, message: '请输入对公账户', trigger: 'blur'},
+          {min: 16, max: 19, message: '对公账户输入有误', trigger: 'blur'},
           {
             validator: (rule, value, callback) => {
               if (!this.checkNumber(value)) {
@@ -230,7 +231,25 @@ export default {
       //return this.$confirm(`确定移除 ${file.name}?`)
     },
     //文件上传前的响应函数
-    beforeFileUpload () {
+    beforeFileUpload (file) {
+      // 文件大小不能超过10M
+      if (file.size > 10 * 1000 * 1000){
+        notify('error', '单个文件大小不能超过10M')
+        return false;
+      }
+      let fileName = file.name
+      let index = fileName.lastIndexOf('.');
+      // 文件不能没有后缀
+      if (index <= 0){
+        notify('error', '只能上传png/jpg格式的文件')
+        return false;
+      }
+      let fileSuffix = fileName.substr(index)
+      // 文件后缀必须是.png或者.jpg
+      if (fileSuffix !== '.jpg' && fileSuffix !== '.png') {
+        notify('error', '只能上传png/jpg格式的文件')
+        return false;
+      }
     },
     //上传文件,此处为上传图片
     uploadFile (param) {
@@ -250,7 +269,15 @@ export default {
         this.$refs['authentication'].validateField('businessLicensePhoto')
       }).catch(error => {
         this.hideLoading()
-        notify('error', error.data)
+        try {
+          if (error.response.status === 413){
+            notify('error', '文件过大,请选择小于20M的图片')
+          }else if (error.response.status === 500){
+            notify('error', '上传文件发生错误,请稍后重试')
+          }
+        }catch (e) {
+          notify('error', error.data)
+        }
       })
     },
     //

+ 29 - 2
src/components/authen/IndividualAuthentication.vue

@@ -119,6 +119,7 @@ export default {
         ],
         bankAccount: [
           {required: true, message: '请输入银行卡账户', trigger: 'blur'},
+          {min: 16, max: 19, message: '银行卡账户输入有误', trigger: 'blur'},
           {
               validator: (rule, value, callback) => {
                   if (!this.checkNumber(value)) {
@@ -249,7 +250,25 @@ export default {
       //return this.$confirm(`确定移除 ${file.name}?`)
     },
     //文件上传前的响应函数
-    beforeFileUpload () {
+    beforeFileUpload (file) {
+      // 文件大小不能超过10M
+      if (file.size > 10 * 1000 * 1000){
+        notify('error', '单个文件大小不能超过10M')
+        return false;
+      }
+      let fileName = file.name
+      let index = fileName.lastIndexOf('.');
+      // 文件不能没有后缀
+      if (index <= 0){
+        notify('error', '只能上传png/jpg格式的文件')
+        return false;
+      }
+      let fileSuffix = fileName.substr(index)
+      // 文件后缀必须是.png或者.jpg
+      if (fileSuffix !== '.jpg' && fileSuffix !== '.png') {
+        notify('error', '只能上传png/jpg格式的文件')
+        return false;
+      }
     },
     //上传文件,此处为上传图片
     uploadFile (param) {
@@ -270,7 +289,15 @@ export default {
 
       }).catch(error => {
         this.hideLoading()
-        notify('error', error.data)
+        try {
+          if (error.response.status === 413){
+            notify('error', '文件过大,请选择小于20M的图片')
+          }else if (error.response.status === 500){
+            notify('error', '上传文件发生错误,请稍后重试')
+          }
+        }catch (e) {
+          notify('error', error.data)
+        }
       })
     },
     //

+ 30 - 4
src/components/authen/IndividualAuthenticationCreate.vue

@@ -12,6 +12,7 @@
             class="avatar-uploader"
             action=""
             :show-file-list="false"
+            accept=".jpg,.png"
             :http-request="uploadFile"
             :before-upload="beforeFileUpload">
             <img v-if="authentication.IDCardPhoto" :src="authentication.IDCardPhoto" class="avatar">
@@ -104,6 +105,7 @@ export default {
         ],
         bankAccount: [
           {required: true, message: '请输入银行卡账户', trigger: 'blur'},
+          {min: 16, max: 19, message: '银行卡账户输入有误', trigger: 'blur'},
           {
               validator: (rule, value, callback) => {
                   if (!this.checkNumber(value)) {
@@ -209,7 +211,25 @@ export default {
       //return this.$confirm(`确定移除 ${file.name}?`)
     },
     //文件上传前的响应函数
-    beforeFileUpload () {
+    beforeFileUpload (file) {
+      // 文件大小不能超过10M
+      if (file.size > 10 * 1000 * 1000){
+        notify('error', '单个文件大小不能超过10M')
+        return false;
+      }
+      let fileName = file.name
+      let index = fileName.lastIndexOf('.');
+      // 文件不能没有后缀
+      if (index <= 0){
+        notify('error', '只能上传png/jpg格式的文件')
+        return false;
+      }
+      let fileSuffix = fileName.substr(index)
+      // 文件后缀必须是.png或者.jpg
+      if (fileSuffix !== '.jpg' && fileSuffix !== '.png') {
+        notify('error', '只能上传png/jpg格式的文件')
+        return false;
+      }
     },
     //上传文件,此处为上传图片
     uploadFile (param) {
@@ -222,14 +242,20 @@ export default {
       formData.append('file', param.file)
       Http.upload(Apis.FILE.UPLOAD_IMAGE.replace('{userId}', this.user.userVO.id), formData, config).then((res) => {
         this.hideLoading()
-        console.log('上传成功')
         this.authentication.IDCardPhoto = res.data
-        console.log(res.data)
         notify('success', '上传成功')
         this.$refs['authentication'].validateField('IDCardPhoto');
       }).catch(error => {
         this.hideLoading()
-        notify('error', error.data)
+        try {
+          if (error.response.status === 413){
+            notify('error', '文件过大,请选择小于20M的图片')
+          }else if (error.response.status === 500){
+            notify('error', '上传文件发生错误,请稍后重试')
+          }
+        }catch (e) {
+          notify('error', error.data)
+        }
       })
     },
     //

+ 2 - 2
src/components/commons/Footer.vue

@@ -25,8 +25,8 @@
         </ul>
       </nav>
       <div class="copyright pull-right">
-        ©{{time}} 慕测  
-        <a target="_blank" href="http://www.miibeian.gov.cn">  苏ICP备14002894号-3</a>
+        ©{{time}} 慕测
+        <a target="_blank" href="http://www.miibeian.gov.cn">  粤ICP备09019504号-6</a>
       </div>
     </div>
   </div>

+ 35 - 8
src/components/project/Project.vue

@@ -284,7 +284,8 @@ import {
   receiveProjectRequest,
   rejectProject,
   storageGet,
-  submitProjectRequest
+  submitProjectRequest,
+  deleteTask
 } from '@/js/index'
 
 export default {
@@ -348,6 +349,9 @@ export default {
       progress: [],
       reportList: [],
       pickerOptions: {
+        disabledDate(time) {
+          return time.getTime() <= Date.now();
+        },
         shortcuts: [
           {
             text: '今天',
@@ -356,18 +360,18 @@ export default {
             }
           },
           {
-            text: '天',
+            text: '天',
             onClick (picker) {
               const date = new Date()
-              date.setTime(date.getTime() - 3600 * 1000 * 24)
+              date.setTime(date.getTime() + 3600 * 1000 * 24)
               picker.$emit('pick', date)
             }
           },
           {
-            text: '一周',
+            text: '一周',
             onClick (picker) {
               const date = new Date()
-              date.setTime(date.getTime() - 3600 * 1000 * 24 * 7)
+              date.setTime(date.getTime() + 3600 * 1000 * 24 * 7)
               picker.$emit('pick', date)
             }
           }
@@ -384,7 +388,16 @@ export default {
         ],
         contactPhone: [
           {required: true, message: '请输入手机号', trigger: 'blur'},
-          //{min: 11, max: 11, message: '请输入正确的手机号', trigger: 'blur'}
+          {min: 11, max: 11, message: '请输入正确的手机号', trigger: 'blur'},
+          {
+            validator: (rule, value, callback) => {
+              if (!this.checkPhoneNumber(value)) {
+                callback(new Error('手机号输入有误'))
+              } else {
+                callback()
+              }
+            }, trigger: 'blur'
+          },
         ],
         type: [
           {
@@ -565,7 +578,6 @@ export default {
             usage: this.project.usage,
           }
           Http.put(Apis.PROJECT.UPDATE_PROJECT.replace('{projectId}', this.projectId), newProject).then((res) => {
-            console.log('bb')
             console.log(res)
             this.projectId = res.projectDetails.id
             this.project.name = res.projectDetails.name
@@ -752,13 +764,23 @@ export default {
       this.$confirm('确认删除该任务?')
         .then(_ => {
           //done()
-          notify('success', '删除成功')
+          //id->taskid
+          console.log(id)
+          console.log(this.projectId)
+          //deleteTask(this.projectId,id,this.deleteTaskSuccess,this.deleteTaskFail)
         })
         .catch(_ => {
           notify('error', '删除失败')
         })
       //this.task.splice(index, 1)
     },
+    deleteTaskSuccess(res){
+      notify('success', '删除成功')
+    },
+    deleteTaskFail(error){
+      console.log(error)
+      notify('error', '删除失败:'+error)
+    },
     beforeApkUpload (file) {
       const isAPK = file.type === 'application/vnd.android.package-archive'
       const isDMG = file.type === 'application/octet-stream'
@@ -868,6 +890,7 @@ export default {
         notify('success', '需求文档上传成功')
       }).catch((error) => {
         this.hideLoading()
+        this.project.doc = []
         notify('error', '需求文档上传失败:' + error.data)
       })
     },
@@ -885,6 +908,7 @@ export default {
         notify('success', '文件上传成功')
       }).catch((error) => {
         this.hideLoading()
+        this.project.file = []
         notify('error', '文件上传失败')
       })
     },
@@ -908,6 +932,9 @@ export default {
     setUserInfo () {
       this.user = storageGet('user')
     },
+    checkPhoneNumber(phoneNumber){
+      return /^1[3456789]\d{9}$/.test(phoneNumber)
+    },
     showLoading () {
       this.loading = true
     },

+ 24 - 5
src/components/project/ProjectCreate.vue

@@ -188,6 +188,9 @@ export default {
         budget: ''
       },
       pickerOptions: {
+        disabledDate(time) {
+          return time.getTime() <= Date.now();
+        },
         shortcuts: [
           {
             text: '今天',
@@ -196,18 +199,18 @@ export default {
             }
           },
           {
-            text: '天',
+            text: '天',
             onClick (picker) {
               const date = new Date()
-              date.setTime(date.getTime() - 3600 * 1000 * 24)
+              date.setTime(date.getTime() + 3600 * 1000 * 24)
               picker.$emit('pick', date)
             }
           },
           {
-            text: '一周',
+            text: '一周',
             onClick (picker) {
               const date = new Date()
-              date.setTime(date.getTime() - 3600 * 1000 * 24 * 7)
+              date.setTime(date.getTime() + 3600 * 1000 * 24 * 7)
               picker.$emit('pick', date)
             }
           }
@@ -224,7 +227,16 @@ export default {
         ],
         contactPhone: [
           {required: true, message: '请输入手机号', trigger: 'blur'},
-          //{min: 11, max: 11, message: '请输入正确的手机号', trigger: 'blur'}
+          {min: 11, max: 11, message: '请输入正确的手机号', trigger: 'blur'},
+          {
+            validator: (rule, value, callback) => {
+              if (!this.checkPhoneNumber(value)) {
+                callback(new Error('手机号输入有误'))
+              } else {
+                callback()
+              }
+            }, trigger: 'blur'
+          },
         ],
         type: [
           {
@@ -371,11 +383,13 @@ export default {
             // }
           }).catch(error => {
             //console.log(error)
+            this.hideLoading()
             notify('error', error.data)
 
           })
         } else {
           console.log(valid)
+          this.hideLoading()
           notify('error','表单填写错误!')
           return false
         }
@@ -448,6 +462,7 @@ export default {
         //console.log(res.data)
       }).catch((error) => {
         this.hideLoading()
+        this.project.doc = []
         notify('error', '需求文档上传失败:' + error.data)
       })
 
@@ -467,6 +482,7 @@ export default {
         console.log(res)
       }).catch((error) => {
         this.hideLoading()
+        this.project.file = []
         notify('error', '文件上传失败:' + error.data)
       })
     },
@@ -499,6 +515,9 @@ export default {
         }
       })
     },
+    checkPhoneNumber(phoneNumber){
+      return /^1[3456789]\d{9}$/.test(phoneNumber)
+    },
     showLoading () {
       this.loading = true
     },