Parcourir la source

增加新的功能并修复一些问题

linyk il y a 2 ans
Parent
commit
ea66b9d025
54 fichiers modifiés avec 1097 ajouts et 284 suppressions
  1. 1 1
      build/build.js
  2. 1 1
      config/dev.env.js
  3. 1 1
      config/prod.env.js
  4. 1 1
      config/test.env.js
  5. BIN
      src/assets/img/Bjjsj.gif
  6. BIN
      src/assets/img/Htzr.png
  7. BIN
      src/assets/img/Njdx.png
  8. BIN
      src/assets/img/Shjtdx.png
  9. 0 0
      src/assets/img/jfjgc.png
  10. BIN
      src/assets/img/qrcode.jpg
  11. 0 0
      src/assets/img/tuosi.png
  12. 1 1
      src/components/Mine.vue
  13. 2 3
      src/components/commons/Footer2.0.vue
  14. 12 5
      src/components/commons/Header2.0.vue
  15. 14 23
      src/components/commons/HomeSliceOnline.vue
  16. 62 17
      src/components/project/Project.vue
  17. 49 11
      src/components/project/ProjectCreate.vue
  18. 3 3
      src/components/project/ProjectSearch.vue
  19. 29 17
      src/components/task/Task.vue
  20. 36 26
      src/components/task/TaskCreate.vue
  21. 16 2
      src/config/index.js
  22. 14 3
      src/js/api.js
  23. 3 2
      src/js/fileService.js
  24. 7 2
      src/js/userService.js
  25. 177 0
      src/pages/Agency/Agencys.vue
  26. 100 0
      src/pages/Company/Companys.vue
  27. 4 11
      src/pages/Homepage/BrandCard.vue
  28. 4 3
      src/pages/Homepage/Homepage.vue
  29. 3 3
      src/pages/Homepage/HotAgency.vue
  30. 2 2
      src/pages/Homepage/HotContest.vue
  31. 41 0
      src/pages/Homepage/HotField.vue
  32. 49 27
      src/pages/Homepage/InstitutionCard.vue
  33. 77 0
      src/pages/HomepageSearch/FieldList.vue
  34. 152 0
      src/pages/Project/List.vue
  35. 55 0
      src/pages/Project/utils/index.js
  36. 2 5
      src/pages/Square/PopularProject.vue
  37. 1 1
      src/pages/Statistics/components/Count.vue
  38. 2 2
      src/pages/Statistics/components/TransactionTable.vue
  39. 33 16
      src/pages/Statistics/components/map/StaffDistributionMap.vue
  40. 1 1
      src/pages/Statistics/components/map/TotalMap.vue
  41. 25 43
      src/pages/Statistics/components/map/map-data.js
  42. 2 2
      src/pages/Technology/HotActicle.vue
  43. 12 1
      src/pages/TestCase/components/defect_detail.vue
  44. 26 3
      src/pages/TestCase/components/defect_list.vue
  45. 1 1
      src/pages/TestCase/components/test_case_list.vue
  46. 7 1
      src/pages/TestCase/exam_testcases.vue
  47. 1 1
      src/pages/Tester/components/PieChart.vue
  48. 24 13
      src/pages/Tester/components/RaddarChart.vue
  49. 7 2
      src/pages/Tester/testertask.vue
  50. 1 5
      src/pages/UserCenter/BindingMail.vue
  51. 1 5
      src/pages/UserCenter/MailBinding.vue
  52. 1 5
      src/pages/UserCenter/ReBindingMail.vue
  53. 1 2
      src/pages/login/login.vue
  54. 33 10
      src/router/index.js

+ 1 - 1
build/build.js

@@ -2,7 +2,7 @@
 require('./check-versions')()
 
 process.env.NODE_ENV = 'production'
-// process.env.env_config = 'test'
+process.env.env_config = 'test'
 const ora = require('ora')
 const rm = require('rimraf')
 const path = require('path')

+ 1 - 1
config/dev.env.js

@@ -19,6 +19,6 @@ module.exports = {
   REGISTER_URL: '"http://127.0.0.1:8081/page/register"',
   OSS_URL: '"https://mooctest-crowd-service.oss-cn-hangzhou.aliyuncs.com/Plantform/dev/"',
   FWZL_PAGE_URL: '"http://8.134.39.104:7492/project?project_code={projectCode}"',
-  CPZL_PAGE_URL: '"http://8.134.39.104:7492/project?project_code={projectCode}"',
+  CPZL_PAGE_URL: '"http://8.134.39.104:8080/nfsplatform/twpevaluate/skipAssess?project_code={projectCode}"',
   RYPG_PAGE_URL: '"http://8.134.39.104:7477/#/evaofproj/{projectCode}"'
 }

+ 1 - 1
config/prod.env.js

@@ -7,6 +7,6 @@ module.exports = {
   REGISTER_URL: '"http://user.cofortest.com/page/register"',
   OSS_URL: '"https://mooctest-crowd-service.oss-cn-hangzhou.aliyuncs.com/Plantform/online/"',
   FWZL_PAGE_URL: '"http://8.134.39.104:7492/project?project_code={projectCode}"',
-  CPZL_PAGE_URL: '"http://8.134.39.104:7492/project?project_code={projectCode}"',
+  CPZL_PAGE_URL: '"http://8.134.39.104:8080/nfsplatform/twpevaluate/skipAssess?project_code={projectCode}"',
   RYPG_PAGE_URL: '"http://8.134.39.104:7477/#/evaofproj/{projectCode}"'
 }

+ 1 - 1
config/test.env.js

@@ -14,6 +14,6 @@ module.exports = {
   // REGISTER_URL: '"http://10.18.18.39:8081/page/register"',
   OSS_URL: '"https://mooctest-crowd-service.oss-cn-hangzhou.aliyuncs.com/Plantform/dev/"',
   FWZL_PAGE_URL: '"http://8.134.39.104:7492/project?project_code={projectCode}"',
-  CPZL_PAGE_URL: '"http://8.134.39.104:7492/project?project_code={projectCode}"',
+  CPZL_PAGE_URL: '"http://8.134.39.104:8080/nfsplatform/twpevaluate/skipAssess?project_code={projectCode}"',
   RYPG_PAGE_URL: '"http://8.134.39.104:7477/#/evaofproj/{projectCode}"'
 }

BIN
src/assets/img/Bjjsj.gif


BIN
src/assets/img/Htzr.png


BIN
src/assets/img/Njdx.png


BIN
src/assets/img/Shjtdx.png


+ 0 - 0
src/assets/img/解放军工程.png → src/assets/img/jfjgc.png


BIN
src/assets/img/qrcode.jpg


+ 0 - 0
src/assets/img/拓思.png → src/assets/img/tuosi.png


+ 1 - 1
src/components/Mine.vue

@@ -167,7 +167,7 @@
           isIndividualUser: false,
           isEnterpriseUser: false,
           isAgency: false,
-          isSystemAdministrator: false
+          isSystemAdministrator: false,
         },
         user: {
           userVO: {

+ 2 - 3
src/components/commons/Footer2.0.vue

@@ -20,8 +20,8 @@
             电话:{{ footer_mobile }}  传真:{{ footer_fax }}1<br/>
             电子邮箱:{{ footer_email }}
           </div>
-          <div class="code-block pull-right" v-if="footer_QRcode">
-            <img :src="footer_QRcode" alt="QRcode" class="mooctest-code" style="width: 110px;height: 110px;display: block">
+          <div class="code-block pull-right">
+            <img src="../../assets/img/qrcode.jpg" alt="QRcode" class="mooctest-code" style="width: 110px;height: 110px;display: block">
             <div style="width: 110px;text-align: center">官方微信公众号</div>
           </div>
         </el-col>
@@ -44,7 +44,6 @@ export default {
       footer_mobile:CONFIG.footer_mobile,
       footer_fax:CONFIG.footer_fax,
       footer_email:CONFIG.footer_email,
-      footer_QRcode:CONFIG.footer_QRcode,
       footer_provider_number_url: CONFIG.footer_provider_number_url
     }
   }

+ 12 - 5
src/components/commons/Header2.0.vue

@@ -26,7 +26,7 @@
                     </el-link>
                   </router-link>
                 </el-dropdown-item>
-                <el-dropdown-item v-if="rolesPermissions.isSystemAdministrator">
+                <el-dropdown-item v-if="rolesPermissions.isSystemAdministrator || rolesPermissions.isRegionalAdmin">
                   <router-link :to="{ name: 'AuthenticationManage'}">
                     <el-link icon="el-icon-view" :underline="false">
                       审核认证信息
@@ -55,10 +55,17 @@
             </router-link>
           </li>
 
-          <span v-if="isLogin&&rolesPermissions.isSystemAdministrator">&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;</span>
-          <li v-if="isLogin&&rolesPermissions.isSystemAdministrator">
-            <router-link v-if="isLogin" to="/statistics">
-              <span>机构统计</span>
+<!--          <span v-if="isLogin&&rolesPermissions.isSystemAdministrator">&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;</span>-->
+<!--          <li v-if="isLogin&&rolesPermissions.isSystemAdministrator">-->
+<!--            <router-link v-if="isLogin" to="/statistics">-->
+<!--              <span>机构统计</span>-->
+<!--            </router-link>-->
+<!--          </li>-->
+
+          <span v-if="isLogin && (rolesPermissions.isSystemAdministrator || rolesPermissions.isRegionalAdmin)">&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;</span>
+          <li v-if="isLogin && (rolesPermissions.isSystemAdministrator || rolesPermissions.isRegionalAdmin)">
+            <router-link v-if="isLogin" to="/companys">
+              <span>服务企业</span>
             </router-link>
           </li>
 

+ 14 - 23
src/components/commons/HomeSliceOnline.vue

@@ -30,8 +30,6 @@ export default {
   name: 'HomeSlice',
   data() {
     return {
-      user: {},
-      isLogin: false,
       loading:false
     }
   },
@@ -39,23 +37,20 @@ export default {
     showLoading() {
       this.loading = true
     },
-    hideLoading() {
+    hideLoading () {
       this.loading = false
     },
-    loadData(){
-      if (storageGet('user') != null) {
-        this.isLogin = true;
-        this.user = storageGet('user').userVO;
-      }
+    checkLogin () {
+      return storageGet('user') !== null
     },
     checkCreateProjectAuth() {
-      if (!this.isLogin) {
+      if (!this.checkLogin()) {
         console.log("请登录后访问");
         notify('warning', '请登录后访问');
-      }
-      else if(this.isLogin){
-        this.showLoading();
-        Http.get(Apis.USER.IS_PART.replace('{userId}', this.user.id)).then((res) => {
+      } else {
+        this.showLoading()
+        let user = storageGet('user').userVO
+        Http.get(Apis.USER.IS_PART.replace('{userId}', user.id)).then((res) => {
           console.log(res)
           this.hideLoading()
           this.$router.push('/project/create');
@@ -66,13 +61,13 @@ export default {
       }
     },
     checkCreateTaskAuth() {
-      if (!this.isLogin) {
+      if (!this.checkLogin()) {
         console.log("请登录后访问");
         notify('warning', '请登录后访问');
-      }
-      else if(this.isLogin){
+      } else {
         this.showLoading();
-        Http.get(Apis.USER.IS_AGENCY.replace('{userId}', this.user.id)).then((res) => {
+        let user = storageGet('user').userVO
+        Http.get(Apis.USER.IS_AGENCY.replace('{userId}', user.id)).then((res) => {
           console.log(res)
           this.hideLoading()
           this.$router.push('/square');
@@ -80,18 +75,14 @@ export default {
           this.hideLoading()
           notify('error', error.data)
         })
-
       }
     },
-    goToCreateProject(){
+    goToCreateProject (){
       this.checkCreateProjectAuth();
     },
-    goToCreateTask(){
+    goToCreateTask (){
       this.checkCreateTaskAuth();
     },
-  },
-  mounted() {
-    this.loadData();
   }
 }
 </script>

+ 62 - 17
src/components/project/Project.vue

@@ -27,6 +27,17 @@
               <el-input v-if="isModifyMode" v-model="project.contactPhone" placeholder="请输入联系人电话"></el-input>
               <span v-if="!isModifyMode">{{project.contactPhone}}</span>
             </el-form-item>
+            <el-form-item size="small" label="机构代发包" prop="contactPhone" v-if="isAgency">
+              <el-checkbox :disabled="!isModifyMode" v-model="project.forCompany"></el-checkbox>
+            </el-form-item>
+            <el-form-item size="small" v-if="project.forCompany" label="代发企业名字" prop="entrustUnit">
+              <el-input size="small" v-if="isModifyMode" v-model="project.entrustUnit" placeholder="请输入代发企业名字"></el-input>
+              <span v-if="!isModifyMode">{{project.entrustUnit}}</span>
+            </el-form-item>
+            <el-form-item size="small" v-if="project.forCompany" label="代发企业地址" prop="entrustUnitAddress">
+              <el-input size="small" v-if="isModifyMode" v-model="project.entrustUnitAddress" placeholder="请输入代发企业地址"></el-input>
+              <span v-if="!isModifyMode">{{project.entrustUnitAddress}}</span>
+            </el-form-item>
             <el-form-item size="small" label="预算" prop="budget">
               <el-input v-if="isModifyMode" type="number" v-model="project.budget">
                 ¥
@@ -50,8 +61,8 @@
             <!--            <el-form-item v-if="!isModifyMode" size="small" label="状态" prop="status">-->
             <!--              <span v-if="!isModifyMode">{{project.statusVO?project.statusVO.text:''}}</span>-->
             <!--            </el-form-item>-->
-            <el-form-item size="small" label="区域管理员" prop="institution" v-if="project.institution">
-              <span v-if="!isModifyMode">{{project.institution}}</span>
+            <el-form-item size="small" label="区域管理员" prop="institution" v-if="!isModifyMode && project.institution">
+              <span>{{project.institution}}</span>
             </el-form-item>
             <el-form-item label="需求描述">
               <el-input style="width: 400px" autosize v-if="isModifyMode" type="textarea"
@@ -112,11 +123,19 @@
               <el-tabs :tab-position="tabPosition" v-model="project.resource" style="max-height: 200px;"
                        v-if="isModifyMode">
                 <el-tab-pane :label="resourceType[0]" :name="0">
-                  <el-radio-group v-model="project.institution">
-                    <el-radio :label="item" name="type" v-for="(item,index) in institutionArray" :key="index">
-                      {{item.name}}
-                    </el-radio>
-                  </el-radio-group>
+<!--                  <el-radio-group v-model="project.institution">-->
+<!--                    <el-radio :label="item" name="type" v-for="(item,index) in institutionArray" :key="index">-->
+<!--                      {{item.name}}-->
+<!--                    </el-radio>-->
+<!--                  </el-radio-group>-->
+                  <el-select v-model="project.regionManagerId" filterable placeholder="请选择">
+                    <el-option
+                      v-for="item in institutionArray"
+                      :key="item.id"
+                      :label="item.name"
+                      :value="item.id">
+                    </el-option>
+                  </el-select>
                 </el-tab-pane>
                 <el-tab-pane :label="resourceType[1]" :name="1">
                   <provincecity
@@ -186,11 +205,11 @@
             <i v-if="project.fileUrl==null || project.fileUrl==''" class="el-icon-document">暂无文件</i>
           </span>
             </el-form-item>
-            <el-form-item label="委托单位" prop="entrustUnit" v-if="project.entrustUnit">
-              <el-input style="width: 400px" autosize v-if="isModifyMode" type="textarea"
-                        v-model="project.entrustUnit"></el-input>
-              <span v-if="!isModifyMode">{{project.entrustUnit}}</span>
-            </el-form-item>
+<!--            <el-form-item label="委托单位" prop="entrustUnit" v-if="project.entrustUnit">-->
+<!--              <el-input style="width: 400px" autosize v-if="isModifyMode" type="textarea"-->
+<!--                        v-model="project.entrustUnit"></el-input>-->
+<!--              <span v-if="!isModifyMode">{{project.entrustUnit}}</span>-->
+<!--            </el-form-item>-->
             <el-form-item label="项目截止时间" prop="datetime">
               <div class="block" v-if="isModifyMode">
                 <el-date-picker
@@ -251,6 +270,9 @@
               <el-button v-if="this.project.status==4 && !this.fwzlStatus"  type="success" size="mini" @click="generateServiceEvaluate()">
                 服务质量评估生成
               </el-button>
+              <el-button v-if="projectOperationControl.exportReport"  type="success" size="mini" @click="exportFinalReport()">
+                导出报告
+              </el-button>
             </el-form-item>
           </el-form>
 
@@ -383,6 +405,7 @@
           reject: false,
           update: false,
           uploadReport: false,
+          exportReport: false
         },
         project: {
           userId: 0,
@@ -390,7 +413,6 @@
           type: [],
           platform: '',
           valuationStandard: '',
-          entrustUnit: '',
           field: '',
           desc: '',
           resource: '',
@@ -406,7 +428,11 @@
           price: '',
           datetime: '',
           usage: '',
-          status: ''
+          status: '',
+          entrustUnit: '',
+          entrustUnitAddress: '',
+          forCompany: false,
+          regionManagerId: 0
         },
         task: [],
         progress: [],
@@ -443,6 +469,7 @@
         cpzlStatus: true,
         rypgStatus: true,
         fwzlStatus: true,
+        isAgency: storageGet('rolesPermissions') ? storageGet('rolesPermissions').isAgency : false,
         rules: {
           name: [
             {required: true, message: '请输入项目名称', trigger: 'blur'},
@@ -465,6 +492,12 @@
               }, trigger: 'blur'
             },
           ],
+          entrustUnit: [
+            {required: true, message: '请输入代发企业名字', trigger: 'blur'}
+          ],
+          entrustUnitAddress: [
+            {required: true, message: '请输入代发企业地址', trigger: 'blur'}
+          ],
           type: [
             {
               type: 'array',
@@ -505,7 +538,7 @@
             {required: true},
             {
               validator: (rule, value, callback) => {
-                if (value == 0 && this.project.institution == null) {
+                if (value == 0 && !this.project.regionManagerId) {
                   callback(new Error('定向发布至少要选择一个区域管理员'))
                 } else {
                   callback()
@@ -653,12 +686,11 @@
               type: this.project.type,
               platform: this.project.platform,
               valuationStandard: this.project.valuationStandard,
-              entrustUnit: this.project.entrustUnit,
               field: this.project.field,
               desc: this.project.desc,
               resource: this.project.resource,
               location: getProvinceNameByProvinceCode(this.project.location.provinceCode, this.project.location.cityCode),
-              institution: this.project.institution == null ? null : this.project.institution.id,
+              institution: this.project.regionManagerId,
               contactName: this.project.contactName,
               contactPhone: this.project.contactPhone,
               doc: this.project.requireDocUrl,
@@ -667,6 +699,8 @@
               price: this.project.price,
               datetime: this.project.datetime,
               usage: this.project.usage,
+              entrustUnit: this.project.forCompany ? this.project.entrustUnit : '',
+              entrustUnitAddress: this.project.forCompany ? this.project.entrustUnitAddress : ''
             }
             console.log(newProject);
             Http.put(Apis.PROJECT.UPDATE_PROJECT.replace('{projectId}', this.projectId), newProject).then((res) => {
@@ -692,6 +726,9 @@
               this.project.usage = res.projectDetails.usage
               this.project.fileUrl = res.projectDetails.file
               this.project.requireDocUrl = res.projectDetails.doc
+              this.project.forCompany = res.projectDetails.forCompany
+              this.project.entrustUnitAddress = res.projectDetails.entrustUnitAddress
+              this.project.regionManagerId = res.projectDetails.regionManagerId
               this.task = res.taskList
               this.reportList = res.reportList
               this.isModifyMode = false
@@ -916,6 +953,10 @@
           this.fwzlStatus = false
         })
       },
+      exportFinalReport () {
+        let url = Apis.PROJECT.EXPORT.replace('{projectCode}', this.projectId)
+        window.open(url)
+      },
       handleDelete(index, id) {
         this.$confirm('确认删除该任务?')
           .then(_ => {
@@ -990,6 +1031,10 @@
           this.project.userId = res.projectDetails.userId
           this.project.status = res.projectDetails.status
           this.project.statusVO = res.projectDetails.statusVO
+          this.project.entrustUnit = res.projectDetails.entrustUnit
+          this.project.entrustUnitAddress = res.projectDetails.entrustUnitAddress
+          this.project.forCompany = res.projectDetails.forCompany
+          this.project.regionManagerId = res.projectDetails.regionManagerId
           this.task = res.taskList
           this.reportList = res.reportList
           this.projectOperationControl = res.projectOperationControl

+ 49 - 11
src/components/project/ProjectCreate.vue

@@ -12,6 +12,15 @@
         <el-form-item label="手机号" prop="contactPhone">
           <el-input size="small" v-model="project.contactPhone" placeholder="请输入联系人电话"></el-input>
         </el-form-item>
+        <el-form-item label="机构代发包" v-if="isAgency">
+          <el-checkbox v-model="forCompany"/>
+        </el-form-item>
+        <el-form-item label="代发企业名字" v-if="forCompany" prop="entrustUnit">
+          <el-input size="small" v-model="project.entrustUnit" placeholder="请输入代发企业名字"></el-input>
+        </el-form-item>
+        <el-form-item label="代发企业地址" v-if="forCompany" prop="entrustUnitAddress">
+          <el-input size="small" v-model="project.entrustUnitAddress" placeholder="请输入代发企业地址"></el-input>
+        </el-form-item>
         <el-form-item label="预算" prop="budget">
           <el-input size="small" type="number" v-model="project.budget" placeholder="请输入项目预算">
             <template slot="append">¥</template>
@@ -157,7 +166,8 @@
     getAllApplicationTypes,
     getAllServiceTypes,
     getProvinceNameByProvinceCode,
-    storageGet
+    storageGet,
+    checkFileType
   } from '@/js/index'
 
   export default {
@@ -188,6 +198,8 @@
       // platforms: [],
       serviceType: [{code: '', name: ''}],
       resourceType: ResourceType,
+      isAgency: storageGet('rolesPermissions').isAgency,
+      forCompany: storageGet('rolesPermissions').isAgency,
       project: {
         userId: 0,
         name: '',
@@ -195,7 +207,7 @@
         contactPhone: '',
         type: [],
         platform: '',
-        valuationStandard:'',
+        valuationStandard: '',
         field: '',
         desc: '',
         doc: [],
@@ -208,7 +220,9 @@
         datetime: '',
         price: '',
         usage: '',
-        budget: ''
+        budget: '',
+        entrustUnit: '',
+        entrustUnitAddress: ''
       },
       pickerOptions: {
         disabledDate(time) {
@@ -261,6 +275,12 @@
             }, trigger: 'blur'
           },
         ],
+        entrustUnit: [
+          {required: true, message: '请输入代发企业名字', trigger: 'blur'}
+        ],
+        entrustUnitAddress: [
+          {required: true, message: '请输入代发企业地址', trigger: 'blur'}
+        ],
         type: [
           {
             required: true,
@@ -409,7 +429,9 @@
             budget: this.project.budget,
             datetime: this.project.datetime,
             usage: this.project.usage,
-            price: this.project.price
+            price: this.project.price,
+            entrustUnit: this.forCompany ? this.project.entrustUnit : '',
+            entrustUnitAddress: this.forCompany ? this.project.entrustUnitAddress : ''
           }
           console.log(newProject)
           Http.post(Apis.PROJECT.CREATE_PROJECT, newProject).then((res) => {
@@ -455,22 +477,38 @@
       this.project.price = ''
       this.project.usage = ''
       this.project.budget = ''
+      this.project.entrustUnit = ''
+      this.project.entrustUnitAddress = ''
     },
     beforeApkUpload (file) {
-      return true;
-      //const fileType = ['exe', 'apk', 'dmg']
-      //return checkFileType(file, fileType, this.beforeApkUploadError)
+      console.log(3, file.type)
+      const isEXE = (file.type === 'application/octet-stream' || file.type === 'application/x-msdownload')
+      const iSAPK = file.type === 'application/vnd.android.package-archive'
+      const isDMG = file.type === 'application/x-apple-diskimage'
+      if (!(isEXE || iSAPK || isDMG)) {
+        this.$message.error('上传文件只能是 EXE、APK、DMG格式!')
+      }
+      return isEXE || iSAPK || isDMG
     },
     beforeApkUploadError () {
       this.$message.error('上传文件只能是exe,dmg,apk格式!')
     },
     beforeFileUpload (file) {
-      return true;
-      //const fileTypeList = ['pdf', 'xls', 'xlsx', 'doc', 'docx', 'txt']
-      //return checkFileType(file, fileTypeList, this.beforeFileUploadError)
+      const isPDF = file.type === 'application/pdf'
+      const isDOC = file.type === 'application/msword'
+      const isDOCX = file.type === 'application/vnd.openxmlformats-officedocument.wordprocessingml.document'
+      const isEXCEL = file.type === 'application/vnd.ms-excel'
+      const isXLS = file.type === 'application/x-xls'
+      const isTXT = file.type === 'text/plain'
+      const isXLSX = file.type === 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'
+      const isZIP = file.type === 'application/x-zip-compressed'
+      if (!(isDOC || isDOCX || isEXCEL || isPDF || isTXT || isXLS || isXLSX || isZIP)) {
+        this.$message.error('上传文件只能是 PDF、DOC、DOCX、XLS、TXT、XLSX、ZIP!')
+      }
+      return isDOC || isEXCEL || isPDF || isTXT || isXLS || isXLSX || isZIP
     },
     beforeFileUploadError () {
-      this.$message.error('上传文件只能是 PDF 、 DOC 、DOCX 、XLS、TXT、XLSX 格式!')
+      this.$message.error('上传文件只能是PDF、DOC、DOCX、XLS、TXT、XLSX、ZIP 格式!')
     },
     loadData () {
       Http.get(Apis.PAGE.PROJECT_DETAIL_PAGE).then((res) => {

+ 3 - 3
src/components/project/ProjectSearch.vue

@@ -37,9 +37,9 @@ export default {
   watch: {
     'selectedProjectCode': {
       immediate: true,
-      handler: function () {
-        if (this.getRefreshTaskListFunc()) {
-          this.getRefreshTaskListFunc()(this.selectedProjectCode)
+      handler: function (nv, ov) {
+        if (this.getRefreshTaskListFunc() && nv) {
+          this.getRefreshTaskListFunc()(nv)
         }
       }
     }

+ 29 - 17
src/components/task/Task.vue

@@ -59,15 +59,23 @@
                 v-if="isModifyMode"
               >
                 <el-tab-pane :label="resourceType[0]" name="0">
-                  <el-radio-group v-model="task.institution" @change="handleTestTypeChange">
-                    <el-radio
-                      :label="item"
-                      name="type"
-                      v-for="(item,index) in institutionArray"
-                      :key="index"
-                    >{{item.evaluationAgencyName}}
-                    </el-radio>
-                  </el-radio-group>
+<!--                  <el-radio-group v-model="task.institution" @change="handleTestTypeChange">-->
+<!--                    <el-radio-->
+<!--                      :label="item"-->
+<!--                      name="type"-->
+<!--                      v-for="(item,index) in institutionArray"-->
+<!--                      :key="index"-->
+<!--                    >{{item.evaluationAgencyName}}-->
+<!--                    </el-radio>-->
+<!--                  </el-radio-group>-->
+                  <el-select v-model="task.agencyId" filterable placeholder="请选择">
+                    <el-option
+                      v-for="item in institutionArray"
+                      :key="item.id"
+                      :label="item.name"
+                      :value="item.id">
+                    </el-option>
+                  </el-select>
                 </el-tab-pane>
                 <!--<el-tab-pane :label="resourceType[1]" name="1">-->
                 <!--<provincecity-->
@@ -80,6 +88,9 @@
                 <el-tab-pane :label="resourceType[2]" name="2"></el-tab-pane>
               </el-tabs>
             </el-form-item>
+            <el-form-item size="small" label="定向单位" prop="institution" v-if="!isModifyMode && task.institution">
+              <span>{{task.institution}}</span>
+            </el-form-item>
             <el-form-item label="领取人数" prop="contactPhone" v-if="isModifyMode&&task.resource !== '0' && currType.type===0">
               <el-input-number v-model="task.participantCount" :min="1" :max="1000" label="领取人数"></el-input-number>
             </el-form-item>
@@ -300,7 +311,7 @@ import Apis from '@/js/api.js'
 import {notify} from '@/constants/index'
 import {
   ensureEndTask,
-  getAllAgencies,
+  getAllInstitutions,
   getAllServiceTypes,
   getFormalTimeFromDate,
   getProvinceCodeByProvinceName,
@@ -330,7 +341,8 @@ export default {
       showBD: true,
       rolesPermissions: {},
       loading: false,
-      isModifyMode: false,      institutionArray: [],
+      isModifyMode: false,
+      institutionArray: [],
       tabPosition: 'top',
       resourceType: ResourceType,
       serviceType: [],
@@ -426,7 +438,7 @@ export default {
           {required: true},
           {
             validator: (rule, value, callback) => {
-              if (value == 0 && this.task.institution.id == null) {
+              if (value == 0 && !this.task.agencyId) {
                 callback(new Error('定向发布至少要选择一个测评机构'))
               } else {
                 callback()
@@ -564,7 +576,7 @@ export default {
       this.task.type = ''
       this.task.resource = '2' //如果是广场不用管Location和institution ,定向看institution,区域看location
       this.task.location = {provinceCode: '', cityCode: ''}
-      this.task.institution = ''
+      this.task.institution = null
       this.task.datetime = ''
       this.task.participantCount = 1
       this.task.goPlatform = 0
@@ -586,7 +598,7 @@ export default {
 
       this.rolesPermissions = storageGet('rolesPermissions')
       console.log(this.rolesPermissions,'this.rolesPermissions')
-      if (storageGet('rolesPermissions').isRegionManager || storageGet('rolesPermissions').isSystemAdministrator) {
+      if (storageGet('rolesPermissions') && (storageGet('rolesPermissions').isRegionManager || storageGet('rolesPermissions').isSystemAdministrator)) {
         this.showBD = true;
       } else {
         this.showBD = false;
@@ -613,7 +625,7 @@ export default {
     },
     //加载所有的测评机构
     setInstitutions() {
-      getAllAgencies().then((res) => {
+      getAllInstitutions().then((res) => {
         this.institutionArray = res
       }).catch((error) => {
         notify('error', '获取机构列表失败')
@@ -758,14 +770,14 @@ export default {
             type: this.task.serviceType,
             resource: this.task.resource,
             location: this.task.location == null ? {} : getProvinceNameByProvinceCode(this.task.location.provinceCode, this.task.location.cityCode),
-            institution: this.task.institution ? this.task.institution.id : null,
             datetime: this.task.datetime,
             quotePrice: this.task.quotePrice,
             fixedPrice: this.task.fixedPrice,
             requirementFile: this.task.requireDocUrl,
             participantCount: this.task.participantCount,
             goPlatform: this.task.goPlatform,
-            endPoint: this.task.endPoint
+            endPoint: this.task.endPoint,
+            institution: this.task.agencyId
           }
           //console.log(newTask)
           updateTask(this.projectId, this.taskId, newTask, this.updateTaskSuccess, this.updateTaskFail)

+ 36 - 26
src/components/task/TaskCreate.vue

@@ -37,15 +37,24 @@
         <el-form-item label="任务可见性" prop="resource" style="width:700px;" v-if="currType.type==0">
           <el-tabs :tab-position="tabPosition" v-model="task.resource" style="width: 800px">
             <el-tab-pane :label="resourceType[0]" name="0">
-              <el-radio-group v-model="task.institution">
-                <el-radio
-                  :label="item"
-                  name="type"
-                  v-for="item,index in institutionArray"
-                  :key="index"
-                >{{item.evaluationAgencyName}}
-                </el-radio>
-              </el-radio-group>
+<!--              <el-radio-group v-model="task.institution">-->
+<!--                <el-radio-->
+<!--                  :label="item"-->
+<!--                  name="type"-->
+<!--                  v-for="item,index in institutionArray"-->
+<!--                  :key="index"-->
+<!--                >{{item.evaluationAgencyName}}-->
+<!--                </el-radio>-->
+<!--              </el-radio-group>-->
+              <el-select v-model="task.institution" filterable placeholder="请选择">
+                <el-option
+                  v-for="item in institutionArray"
+                  :key="item.id"
+                  :label="item.name"
+                  :value="item.id">
+                </el-option>
+              </el-select>
+              <br/>
              <el-button  type="primary" size="mini" @click="instituationEvaluate()">
                   机构评估
               </el-button>
@@ -137,7 +146,7 @@
   import Apis from '@/js/api.js'
   import ResourceType from '@/constants/enum/resource-type.js'
   import {notify} from '@/constants/index'
-  import {getAllAgencies, getAllServiceTypes, getProvinceNameByProvinceCode, storageGet} from '@/js/index'
+  import {getAllInstitutions, getAllServiceTypes, getProvinceNameByProvinceCode, storageGet} from '@/js/index'
 
   export default {
     name: 'Task',
@@ -160,7 +169,7 @@
           type: '',
           resource: '', //如果是广场不用管Location和institution ,定向看institution,区域看location
           // location: {provinceCode: '3200', cityCode: '3201'},
-          institution: '',
+          institution: null,
           datetime: '',
           quotePrice: '',
           fixedPrice: '',
@@ -224,7 +233,7 @@
             {required: true},
             {
               validator: (rule, value, callback) => {
-                if (value == 0 && this.task.institution.id == null) {
+                if (value == 0 && !this.task.institution) {
                   callback(new Error('定向发布至少要选择一个测评机构'))
                 } else {
                   callback()
@@ -285,7 +294,7 @@
         window.open(turl,'_blank');
       },
       peopleEvaluate(){
-        let turl ='http://8.134.39.104:7477/index.html#/index/evaluatetesteroverall';
+        let turl ='http://8.134.39.104:7477/#/evaluate/evaevaall';
         window.open(turl,'_blank');
       },
       handleTestTypeChange(val) {
@@ -331,7 +340,7 @@
               type: this.task.type,
               resource: this.task.resource,
               // location: this.task.resource == '0' ? getProvinceNameByProvinceCode(this.task.location.provinceCode, this.task.location.cityCode):null,
-              institution: this.task.resource == '0' ? this.task.institution.id : null,
+              institution: this.task.resource === '0' ? this.task.institution : null,
               datetime: this.task.datetime,
               quotePrice: this.task.quotePrice,
               fixedPrice: this.task.fixedPrice,
@@ -362,11 +371,11 @@
         this.task.desc = ''
         this.task.type = ''
         this.task.resource = '广场'; //如果是广场不用管Location和institution ,定向看institution,区域看location
-        (this.task.location = {provinceCode: '', cityCode: ''}),
-          (this.task.institution = '')
-        this.task.datetime = '',
-          this.task.participantCount = 1
-        this.task.goPlatform
+        this.task.location = {provinceCode: '', cityCode: ''}
+        this.task.institution = null
+        this.task.datetime = ''
+        this.task.participantCount = 1
+        this.task.goPlatform = 0
       },
       locationChange(provinceId, cityId) {
         if (provinceId || cityId) {
@@ -394,19 +403,21 @@
       beforeRemove(file, fileList) {
         //return this.$confirm(`确定移除 ${file.name}?`)
       },
+      // RAR文件获取不到ContentType
       beforeFileUpload(file) {
-        console.log(file)
         const isPDF = file.type === 'application/pdf'
-        const isDOC = file.type === 'application/vnd.openxmlformats-officedocument.wordprocessingml.document'
+        const isDOC = file.type === 'application/msword'
+        const isDOCX = file.type === 'application/vnd.openxmlformats-officedocument.wordprocessingml.document'
         const isEXCEL = file.type === 'application/vnd.ms-excel'
         const isXLS = file.type === 'application/x-xls'
         const isTXT = file.type === 'text/plain'
         const isXLSX = file.type === 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'
+        const isZIP = file.type === 'application/x-zip-compressed'
         //console.log(file)
-        if (!(isDOC || isEXCEL || isPDF || isTXT || isXLS || isXLSX)) {
-          this.$message.error('上传文件只能是 PDF 、 DOC 、DOCX 、XLS、TXT、XLSX 格式!')
+        if (!(isDOC || isDOCX || isEXCEL || isPDF || isTXT || isXLS || isXLSX || isZIP)) {
+          this.$message.error('上传文件只能是 PDF、DOC、DOCX、XLS、TXT、XLSX、ZIP!')
         }
-        return isDOC || isEXCEL || isPDF || isTXT || isXLS || isXLSX
+        return isDOC || isEXCEL || isPDF || isTXT || isXLS || isXLSX || isZIP
       },
       uploadRequireDoc(param) {
         this.showLoading()
@@ -432,9 +443,8 @@
         })
       },
       setInstitutions() {
-        getAllAgencies().then((res) => {
+        getAllInstitutions().then((res) => {
           this.institutionArray = res
-          console.log(this.institutionArray)
         }).catch((error) => {
           notify('error', '测评机构加载失败')
         })

+ 16 - 2
src/config/index.js

@@ -135,8 +135,22 @@ export const setConfig = (conf) => {
 }
 
 //本地开发使用
-export const login_url = (process.env.ENV_CONFIG === 'dev' || process.env.ENV_CONFIG === 'test') ? '#/login' : 'http://user.cofortest.com:8081/page/login?redirect=http%3a%2f%2fwww.cofortest.com%2f%23%2fhome'
-export const register_url = (process.env.ENV_CONFIG === 'dev' || process.env.ENV_CONFIG === 'test') ? '' : 'http://user.cofortest.com:8081/page/register'
+export let login_url
+if (process.env.ENV_CONFIG === 'dev') {
+  login_url = 'http://127.0.0.1:8080/page/login?redirect=http%3a%2f%2f127.0.0.1:5757%2f%23%2fhome'
+} else if (process.env.ENV_CONFIG === 'test') {
+  login_url = 'http://59.42.10.67:8080/page/login?redirect=http%3a%2f%2f59.42.10.67%2f%23%2fhome'
+} else if (process.env.ENV_CONFIG === 'prod') {
+  login_url = 'http://user.cofortest.com:8080/page/login?redirect=http%3a%2f%2fwww.cofortest.com%2f%23%2fhome'
+}
+export let register_url
+if (process.env.ENV_CONFIG === 'dev') {
+  register_url = 'http://127.0.0.1:8080/page/register'
+} else if (process.env.ENV_CONFIG === 'test') {
+  register_url = 'http://59.42.10.67:8080/page/register'
+} else if (process.env.ENV_CONFIG === 'prod') {
+  register_url = 'http://www.cofortest.com:8080/page/register'
+}
 
 // 开发使用
 // export const login_url = 'http://crowd.dev.mooctest.net:8281/page/login?redirect=http%3a%2f%2fdev.mooctest.net%3A5757%2f%23%2fhome'

+ 14 - 3
src/js/api.js

@@ -14,6 +14,8 @@ export default {
     MORE_HOT_PROJECT: '/api/square/hotProject/list',
     CROWD_PROJECT: '/api/common/index/crowd/project/{code}',
     GET_SIMPLE_DATAS: '/api/simpleprojectdatas',
+    PROJECT_LIST: '/api/project/{pageNo}/{pageSize}',
+    EXPORT: '/api/project/{projectCode}/exportreport'
   },
   TASK: {
     GET_TASK: '/api/project/{projectId}/task/{taskId}/',
@@ -93,7 +95,8 @@ export default {
     REPORT_DETAIL_PAGE: '/api/page/reportDetail/{reportId}/'
   },
   AGENCY: {
-    GET_DETAIL: '/api/agency/{agencyId}'
+    GET_DETAIL: '/api/agency/{agencyId}',
+    PAGE: '/api/agency/page/{pageNo}/{pageSize}'
   },
   RESOURCE: {
     GET_DETAIL: '/api/common/index/resource/{code}'
@@ -124,7 +127,8 @@ export default {
     UPLOAD_TEST_CASES_FILE: '/api/testcase/upload/{taskCode}/',
     UPLOAD_DEFECTS_FILE: '/api/testcase/uploaddefects/{taskCode}/',
     EXAM_ALL_VALID: '/api/testcase/examallvalid/{taskCode}/{designerId}/',
-    EXPORT: '/api/testcase/export/{taskCode}'
+    EXPORT: '/api/testcase/export/{taskCode}',
+    EXAM_UPDATE_DEFECT: '/api/testcase/examupdatedefect/{id}'
   },
   TESTENV: {
     ADD: '/api/testenv/',
@@ -167,10 +171,17 @@ export default {
   },
   RYPG: {
     STATUS: '/api/rypg/status/{projectCode}',
-    GENERATE: '/api/rypg/generate/{projectCode}'
+    GENERATE: '/api/rypg/generate/{projectCode}',
+    VALUES: '/api/rypg/values/{userId}'
   },
   TASKAMOUNT: {
     CAL: '/api/taskamount/calculation/{taskCode}/{effectiveWorkloadAmount}/{defectExciationAmount}/{extraRewardAmount}',
     CAL_AND_END: '/api/taskamount/calandend'
+  },
+  COMPANY: {
+    PAGE: '/api/company/page/{pageNo}/{pageSize}'
+  },
+  FIELD: {
+    RANK: '/api/field/rank'
   }
 }

+ 3 - 2
src/js/fileService.js

@@ -36,9 +36,10 @@ export const beforeUploadFile = () => {
 
 }
 export const checkFileType = (file, typeList, checkFileTypeError) => {
-  var fileType = file.name.split('.')[file.name.split('.').length - 1].toLowerCase()
+  var fileType = file.name.substring(file.name.lastIndexOf('.') + 1).toLowerCase()
   if (!typeList.includes(fileType)) {
     checkFileTypeError()
+    return false
   }
-  return typeList.includes(fileType)
+  return true
 }

+ 7 - 2
src/js/userService.js

@@ -30,14 +30,16 @@ export const getRolesPermissions = (roleList) => {
     individualUser: 'generalUser',
     enterpriseUser: 'enterpriseUser',
     agency: 'evaluationAgency',
-    systemAdministrator: 'SystemAdministrator'
+    systemAdministrator: 'SystemAdministrator',
+    regionalAdmin: 'RegionalAdmin'
   }
   const permissions = {
     isRegionManager: false,
     isIndividualUser: false,
     isEnterpriseUser: false,
     isAgency: false,
-    isSystemAdministrator: false
+    isSystemAdministrator: false,
+    isRegionalAdmin: false
   }
   if (roleList.includes(roles.regionManager)) {
     permissions.isRegionManager = true
@@ -62,6 +64,9 @@ export const getRolesPermissions = (roleList) => {
     permissions.isEnterpriseUser = true
     permissions.isIndividualUser = true
   }
+  if (roleList.includes(roles.regionalAdmin)) {
+    permissions.isRegionalAdmin = true
+  }
   return permissions
 }
 

+ 177 - 0
src/pages/Agency/Agencys.vue

@@ -0,0 +1,177 @@
+<template>
+  <div class="home-wrapper">
+    <div class="nav" stype="height:500px">
+      <!--搜索框-->
+      <el-row class="search-nav" style="padding: 30px 0 20px 0">
+        <el-col :span="6">
+          <div class="pull-left" @click="gotoHome" style="cursor: pointer">
+            <img class="logo-img" :src="logo_transparent"/>
+            <span class="logo-title">{{logoTitle}}</span>
+          </div>
+        </el-col>
+        <el-col :span="12">
+          <div class="search-nav">
+            <div id="search-block ">
+              <el-tabs v-model="searchType" type="card" @tab-click="handleTypeClick">
+                <el-tab-pane v-for="item in searchTypeArr" v-if="item.value!=='all'" :label="item.name"
+                             :name="item.value"
+                             :key="item.value"></el-tab-pane>
+              </el-tabs>
+              <div class="search-input">
+                <el-input placeholder="请输入内容" v-model="listQueryParam.keyword" class="input-with-select">
+                  <el-button class="search-button" slot="append" type="primary" @click="getList()">搜索</el-button>
+                </el-input>
+              </div>
+            </div>
+          </div>
+        </el-col>
+        <el-col :span="6">
+          <el-button type="primary pull-right" class="releaseBtn" @click="checkCreateProjectAuth()">免费发布众测需求</el-button>
+        </el-col>
+      </el-row>
+    </div>
+    <div class="container" style="margin: 20px auto;">
+      <div class="create-body">
+        <div class="title h2">测评机构</div>
+        <el-collapse accordion style="margin: 0 30px">
+          <template style="color: black">
+            <el-table
+              ref="multipleTable"
+              :data="agencys"
+              tooltip-effect="dark"
+              style="width: 100%; font-size: 20px; color: black" v-loading="loading">
+              <el-table-column
+                label="头像"
+                min-width="10%">
+                <template slot-scope="{row}"><img
+                  :src="row.logo"
+                  style="width: 50px; height: 50px;"/>
+                </template>
+              </el-table-column>
+              <el-table-column
+                prop="name"
+                label="名称"
+                align="left"
+                min-width="26%">
+              </el-table-column>
+              <el-table-column
+                prop="address"
+                align="left"
+                label="地址"
+                min-width="40%">
+              </el-table-column>
+              <el-table-column
+                prop="receiveCount"
+                align="center"
+                label="接包数量(个)"
+                min-width="12%">
+              </el-table-column>
+              <el-table-column
+                prop="sendCount"
+                align="center"
+                label="发包数量(个)"
+                min-width="12%">
+              </el-table-column>
+            </el-table>
+          </template>
+          <el-pagination
+            v-if="total > 0"
+            :page-size="listQueryParam.pageSize"
+            layout="prev, pager, next"
+            :total="total"
+            :current-page="listQueryParam.pageNo"
+            @current-change="getList"
+            class="pull-right"
+          >
+          </el-pagination>
+        </el-collapse>
+      </div>
+    </div>
+  </div>
+</template>
+
+<script>
+import Http from '@/js/http'
+import Api from '@/js/api'
+import {notify} from '@/constants'
+import {CONFIG} from '../../config'
+import {storageGet} from '@/js/index'
+
+export default {
+  name: 'Agencys',
+  data: function () {
+    return {
+      agencys: [],
+      listQueryParam: {
+        pageNo: 1,
+        pageSize: 20,
+        keyword: this.$route.params.searchVal ? this.$route.params.searchVal : ''
+      },
+      total: 0,
+      logoTitle: CONFIG.logoTitle,
+      logo_transparent: CONFIG.logo_transparent,
+      loading: false,
+      searchVal: '',
+      searchType: 'agency',
+      searchTypeArr: [
+        {
+          'name': '机构',
+          'value': 'agency'
+        }]
+    }
+  },
+  mounted () {
+    this.getList()
+  },
+  methods: {
+    gotoHome () {
+      this.$router.push('/home')
+    },
+    getList (index) {
+      if (!index) {
+        index = 1
+      }
+      this.loading = true
+      let url = Api.AGENCY.PAGE.replace('{pageNo}', index - 1)
+        .replace('{pageSize}', this.listQueryParam.pageSize)
+      url = url + '?keyword=' + this.listQueryParam.keyword
+      Http.get(url).then((res) => {
+        const agencyPage = res.data
+        this.total = agencyPage.totalCount
+        this.listQueryParam.pageNo = agencyPage.pageNo + 1
+        this.listQueryParam.pageSize = agencyPage.pageSize
+        this.agencys.splice(0, this.agencys.length)
+        agencyPage.datas.forEach(agency => {
+          this.agencys.push(agency)
+        })
+        this.loading = false
+      }).catch((error) => {
+        console.error(error)
+        notify('error', '获取机构数据异常:' + error)
+        this.loading = false
+      })
+    },
+    handleTypeClick (tab) {
+      this.searchType = tab.name
+    },
+    checkCreateProjectAuth () {
+      let user = storageGet('user')
+      if (!user) {
+        notify('warning', '请登录后访问')
+      } else {
+        Http.get(Api.USER.IS_PART.replace('{userId}', user.id)).then((res) => {
+          this.$router.push('/project/create')
+        }).catch((error) => {
+          notify('error', error.data)
+        })
+      }
+    }
+  }
+}
+</script>
+<style lang="scss">
+@import "../../style/search-nav.scss";
+.item-template {
+  height: 80px;
+}
+</style>

+ 100 - 0
src/pages/Company/Companys.vue

@@ -0,0 +1,100 @@
+<template>
+  <div class="app-container">
+    <div class="title h1" style="margin-top: 10px;">服务企业</div>
+    <div class="filter-container">
+      <el-input placeholder="公司名字" v-model="listQueryParam.keyword" style="width: 15%; margin-left: 20px; margin-bottom: 20px;"></el-input>
+      <el-button class="filter-item" style="margin-left: 10px;" type="primary" @click="search">
+        搜索
+      </el-button>
+    </div>
+
+    <div>
+      <el-table
+        :data="companys"
+        border
+        fit
+        style="width: 100%"
+        v-loading="listLoading"
+      >
+        <el-table-column label="名字" align="center" min-width="25%">
+          <template slot-scope="{row}">
+            <span>{{ row.name }}</span>
+          </template>
+        </el-table-column>
+        <el-table-column label="地址" align="center" :show-overflow-tooltip="true" min-width="35%">
+          <template slot-scope="{row}">
+            <span>{{ row.address }}</span>
+          </template>
+        </el-table-column>
+        <el-table-column label="注册时间" align="center" min-width="20%">
+          <template slot-scope="{row}">
+            <span>{{ row.applyTime }}</span>
+          </template>
+        </el-table-column>
+        <el-table-column label="发包数(个)" align="center" min-width="20%">
+          <template slot-scope="{row}">
+            <span>{{ row.projectCount }}</span>
+          </template>
+        </el-table-column>
+      </el-table>
+      <pagination v-show="total > 0" :total="total" :page.sync="listQueryParam.pageNo" :limit.sync="listQueryParam.pageSize" @pagination="getList" />
+    </div>
+  </div>
+</template>
+
+<script>
+import Http from '@/js/http'
+import Api from '@/js/api'
+import {notify} from '@/constants'
+import Pagination from '@/components/Pagination'
+
+export default {
+  name: 'Companys',
+  components: { Pagination },
+  data: function () {
+    return {
+      companys: [],
+      listLoading: false,
+      listQueryParam: {
+        pageNo: 1,
+        pageSize: 20,
+        keyword: ''
+      },
+      total: 0
+    }
+  },
+  mounted () {
+    this.getList()
+  },
+  methods: {
+    search () {
+      this.listQueryParam.pageNo = 1
+      this.getList()
+    },
+    getList () {
+      this.listLoading = true
+      let url = Api.COMPANY.PAGE.replace('{pageNo}', this.listQueryParam.pageNo - 1)
+        .replace('{pageSize}', this.listQueryParam.pageSize)
+      url = url + '?keyword=' + this.listQueryParam.keyword
+      Http.get(url).then((res) => {
+        const companyPage = res.data
+        this.total = companyPage.totalCount
+        this.listQueryParam.pageNo = companyPage.pageNo + 1
+        this.listQueryParam.pageSize = companyPage.pageSize
+        this.companys.splice(0, this.companys.length)
+        companyPage.datas.forEach(company => {
+          this.companys.push(company)
+        })
+      }).catch((error) => {
+        console.error(error)
+        notify('error', '获取公司数据异常:' + error)
+      })
+      this.listLoading = false
+    }
+  }
+}
+</script>
+
+<style scoped>
+
+</style>

+ 4 - 11
src/pages/Homepage/BrandCard.vue

@@ -10,7 +10,7 @@
       <el-row :gutter="15">
         <el-col v-for="item in residentAgencyList" :key="item.id" :span="4" style="height: 90px; margin-bottom: 28px">
           <img :src="item.agencyPhoto==null?defaultValue.image:item.agencyPhoto" :alt="item.evaluationAgencyName"
-               style="width: 70%;height: 100%; cursor: pointer;" @click="goToDetail(item.userId)"/>
+               style="width: 70%; height: 100%; cursor: pointer;" @click="goToMoreAgency()"/>
         </el-col>
       </el-row>
     </div>
@@ -29,18 +29,11 @@
       }
     },
     methods: {
-      goToMoreAgency() {
+      goToMoreAgency () {
         this.$router.push({
-          name: 'AgencyResidentList',
-        });
-      },
-      goToDetail(userId) {
-        this.$router.push({
-          name: 'NewAgencyDetail',
-          path: '/agency/detail',
-          query: { id: userId, type: 1 }
+          name: 'AgencyList'
         })
-      },
+      }
     }
   }
 </script>

+ 4 - 3
src/pages/Homepage/Homepage.vue

@@ -56,7 +56,7 @@
         </el-col>
         <el-col :span="5" class="homepage-right-modules">
           <LoginCard v-if="HOME_DISPLAY.login_card"/>
-          <HotCrowd :applicationTypeRank="homeDataNoCache.applicationTypeRank" v-if="HOME_DISPLAY.hot_crowd"/>
+          <HotField :field-rank="homeDataNoCache.fieldList" v-if="HOME_DISPLAY.hot_crowd"/>
           <HotAgency :agencyRank="homeDataNoCache.agencyRank" v-if="HOME_DISPLAY.hot_agency"/>
           <HotUser :userRank="homeDataNoCache.userRank" v-if="HOME_DISPLAY.hot_user"/>
           <HotContest :competitionList="homeData.competitionList" v-if="HOME_DISPLAY.hot_contest"/>
@@ -76,7 +76,8 @@ import BrandCard from './BrandCard'
 import ResourceAndTool from './ResourceAndTool'
 import TestCard from './TestCard'
 import InstitutionCard from './InstitutionCard'
-import HotCrowd from './HotCrowd'
+// import HotCrowd from './HotCrowd'
+import HotField from './HotField'
 import HotAgency from './HotAgency'
 import HotUser from './HotUser'
 import HotContest from './HotContest'
@@ -94,7 +95,7 @@ import {CONFIG} from "../../config";
 export default {
   name: 'Homepage',
   components: {
-    HotCrowd,
+    HotField,
     HotContest,
     HotUser,
     HotAgency,

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

@@ -6,10 +6,10 @@
       <el-button style="float: right; padding: 3px 0;line-height: 25px" type="text" @click="goToMoreAgency()">>></el-button>
     </div>
     <div class="popular-list">
-      <el-row class="popular-list-item" v-for="item in agencyRank" :key="item.id">
+      <el-row class="popular-list-item" v-for="item in agencyRank.slice(0, 3)" :key="item.id">
         <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)"  >
+          <img :src="item.agencyPhoto==null?defaultValue.image:item.agencyPhoto" alt="logo-project" class="pull-left project-logo-img" style="cursor: pointer" @click="goToMoreAgency()">
+          <div style="margin-left: 55px; cursor: pointer;" @click="goToMoreAgency()"  >
             <div class="list-item-title single-line-title">
               {{item.evaluationAgencyName}}
             </div>

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

@@ -54,7 +54,7 @@
 <style lang="scss">
   @import "../../style/main";
   .popular-card {
-    margin-bottom: 5px;
+    margin-bottom: 5px!important;
   }
   .popular-header .el-card__header{
     border-bottom: 2px solid rgba(0,117,203,1) !important;
@@ -80,7 +80,7 @@
 
   .popular-list {
     .popular-list-item {
-      padding: 4px 10px;
+      padding: 4px 10px !important;
       border-bottom: 1px solid #ccc !important;
 
       .list-item-title {

Fichier diff supprimé car celui-ci est trop grand
+ 41 - 0
src/pages/Homepage/HotField.vue


+ 49 - 27
src/pages/Homepage/InstitutionCard.vue

@@ -3,7 +3,7 @@
     <div class="insititution-card-header">平台合作机构(项目组)</div>
     <div class="insititution-card-content">
       <el-row style="height: 80px;margin-bottom: 20px">
-      <el-col :span="9">
+      <el-col :span="8">
         <div class="iscas-block insititution-block">
           <img src="../../assets/img/ISCAS.png"
                alt="logo-institution"
@@ -19,27 +19,37 @@
         </div>
       </el-col>
       <el-col :span="8">
-        <div class="insititution-block">
-          <div class="single-title">
-            北京计算机技术及应用研究所
+        <div class="iscas-block insititution-block">
+          <img src="../../assets/img/Bjjsj.gif"
+               alt="logo-institution"
+               class="insititution-logo">
+          <div class="iscas-info">
+            <div class="iscas-title single-title" >
+              北京计算机技术及应用研究所
+            </div>
           </div>
-
         </div>
       </el-col>
-      <el-col :span="7">
-        <div class="insititution-block">
-          <img src="../../assets/img/SJTU.png"
+      <el-col :span="8">
+        <div class="iscas-block insititution-block">
+          <img src="../../assets/img/Shjtdx.png"
                alt="logo-institution"
-               style="height: 60px;width: 100%"
-
-          >
+               class="insititution-logo">
+          <div class="iscas-info">
+            <div class="iscas-title">
+              上海交通大学
+            </div>
+            <div class="iscas-title-english">
+              SHANGHAI JIAO TONG UNIVERSITY
+            </div>
+          </div>
         </div>
       </el-col>
     </el-row>
       <el-row style="height: 80px;margin-bottom: 20px">
-        <el-col :span="9">
+        <el-col :span="8">
           <div class="iscas-block insititution-block">
-            <img src="../../assets/img/解放军工程.png"
+            <img src="../../assets/img/jfjgc.png"
                  alt="logo-institution"
                  class="insititution-logo">
             <div class="iscas-info">
@@ -64,20 +74,26 @@
             </div>
           </div>
         </el-col>
-        <el-col :span="7">
-          <div class="insititution-block">
-            <img src="../../assets/img/NJU.png"
+        <el-col :span="8">
+          <div class="iscas-block insititution-block">
+            <img src="../../assets/img/Njdx.png"
                  alt="logo-institution"
-                 style="height: 60px;width: 100%"
-
-            >
+                 class="insititution-logo">
+            <div class="iscas-info">
+              <div class="iscas-title">
+                南京大学
+              </div>
+              <div class="iscas-title-english">
+                NANJING UNIVERSITY
+              </div>
+            </div>
           </div>
         </el-col>
       </el-row>
       <el-row style="height: 80px;margin-bottom: 20px">
-        <el-col :span="9">
+        <el-col :span="8">
           <div class="iscas-block insititution-block">
-            <img src="../../assets/img/拓思.png"
+            <img src="../../assets/img/tuosi.png"
                  alt="logo-institution"
                  class="insititution-logo">
             <div class="iscas-info">
@@ -102,13 +118,19 @@
             </div>
           </div>
         </el-col>
-        <el-col :span="7">
-          <div class="insititution-block">
-            <img src="../../assets/img/SQA.png"
+        <el-col :span="8">
+          <div class="iscas-block insititution-block">
+            <img src="../../assets/img/Htzr.png"
                  alt="logo-institution"
-                 style="height: 60px;width: 100%"
-
-            >
+                 class="iscas-logo" style="width: 120px;">
+            <div class="iscas-info" style="padding-left: 10px;">
+              <div class="iscas-title">
+                航天中认软件测评科技(北京)有限责任公司
+              </div>
+              <div class="iscas-title-english">
+                SPACE CQC ASSOCIATE
+              </div>
+            </div>
           </div>
         </el-col>
       </el-row>

Fichier diff supprimé car celui-ci est trop grand
+ 77 - 0
src/pages/HomepageSearch/FieldList.vue


+ 152 - 0
src/pages/Project/List.vue

@@ -0,0 +1,152 @@
+<template>
+  <div class="app-container" v-loading="loading">
+    <div class="title h1" style="margin-top: 10px;">项目列表</div>
+    <div class="filter-container">
+      <el-select v-model="listQueryParam.selectedApplicationType">
+        <el-option value="" label="---应用类型---"/>
+        <el-option value="MOBILE" label="移动APP测试"/>
+        <el-option value="WEB" label="Web应用测试"/>
+        <el-option value="FLUSHBONAD" label="嵌入式软件测试"/>
+        <el-option value="INDUSTRY" label="工业控制软件测试"/>
+        <el-option value="TECHNIQUE" label="智能终端测试"/>
+        <el-option value="OTHER" label="其他产品及应用测试"/>
+      </el-select>
+      <el-select v-model="listQueryParam.selectedField">
+        <el-option value="" label="---领域---"/>
+        <el-option value="KJFW" label="科技服务"/>
+        <el-option value="FWHLW" label="服务互联网"/>
+        <el-option value="JCDL" label="集成电路"/>
+        <el-option value="ZNCGQ" label="智能传感器"/>
+        <el-option value="GDSB" label="高端设备"/>
+        <el-option value="OTHER" label="其他"/>
+      </el-select>
+      <el-input placeholder="项目名字名字" v-model="listQueryParam.keyword" style="width: 15%; margin-left: 20px; margin-bottom: 20px;"></el-input>
+      <el-button class="filter-item" style="margin-left: 10px;" type="primary" @click="getList()">
+        搜索
+      </el-button>
+    </div>
+
+    <div>
+      <el-table
+        :data="projects"
+        border
+        fit
+        style="width: 100%"
+        v-loading="loading"
+      >
+        <el-table-column label="项目名称" align="center" :show-overflow-tooltip="true" min-width="35%">
+          <template slot-scope="{row}">
+            <span>{{ row.name }}</span>
+          </template>
+        </el-table-column>
+        <el-table-column label="项目状态" align="center" min-width="12%">
+          <template slot-scope="{row}">
+            <span>{{ toStatusCn(row.status) }}</span>
+          </template>
+        </el-table-column>
+        <el-table-column label="应用类型" align="center" min-width="15%">
+          <template slot-scope="{row}">
+            <span>{{ toApplicationTypeCn(row.applicationType) }}</span>
+          </template>
+        </el-table-column>
+        <el-table-column label="领域" align="center" min-width="15%">
+          <template slot-scope="{row}">
+            <span>{{ toFieldTypeCn(row.fieldType) }}</span>
+          </template>
+        </el-table-column>
+        <el-table-column label="项目预算" align="center" :show-overflow-tooltip="true" min-width="12%">
+          <template slot-scope="{row}">
+            <span>¥{{ row.quotedPrice }}</span>
+          </template>
+        </el-table-column>
+        <el-table-column label="参与人数" align="center" :show-overflow-tooltip="true" min-width="12%">
+          <template slot-scope="{row}">
+            <span>{{ row.joinCount }}</span>
+          </template>
+        </el-table-column>
+        <el-table-column label="操作" align="center" class-name="small-padding fixed-width" min-width="12%">
+          <template slot-scope="{row,$index}">
+            <i class="el-icon-tickets mini-margin" @click="goToProjectDetail(row.code)" style="cursor: pointer;" title="查看详情"></i>
+          </template>
+        </el-table-column>
+      </el-table>
+
+      <pagination v-show="total>0" :total="total" :page.sync="listQueryParam.pageNo" :limit.sync="listQueryParam.pageSize" @pagination="getList" />
+    </div>
+  </div>
+</template>
+
+<script>
+  import Http from '@/js/http.js'
+  import Apis from '@/js/api.js'
+  import {notify} from "@/constants"
+  import utils from "./utils"
+  import Pagination from '@/components/Pagination'
+
+  export default {
+    name: 'Projects',
+    components: { Pagination },
+    data () {
+      return {
+        listQueryParam: {
+          pageNo: 1,
+          pageSize: 20,
+          selectedApplicationType: this.$route.params.applicationType,
+          selectedField: this.$route.params.fieldType,
+          keyword: ''
+        },
+        projects: [],
+        loading: false,
+        total: 0
+      }
+    },
+    mounted () {
+      this.$nextTick(() => {
+        this.getList()
+      })
+    },
+    methods: {
+      ...utils,
+      hideListLoading () {
+        this.loading = false
+      },
+      showListLoading () {
+        this.loading = true
+      },
+      getList () {
+        this.showListLoading()
+        let url = Apis.PROJECT.PROJECT_LIST.replace('{pageNo}', this.listQueryParam.pageNo - 1)
+          .replace('{pageSize}', this.listQueryParam.pageSize) + '?1=1'
+        if (this.listQueryParam.selectedApplicationType) {
+          url = url + '&applicationType=' + this.listQueryParam.selectedApplicationType
+        }
+        if (this.listQueryParam.selectedField) {
+          url = url + '&fieldType=' + this.listQueryParam.selectedField
+        }
+        if (this.listQueryParam.keyword) {
+          url = url + '&keyword=' + this.listQueryParam.keyword
+        }
+        Http.get(url).then((res) => {
+          const projectPage = res.data
+          this.total = projectPage.totalCount
+          this.listQueryParam.pageNo = projectPage.pageNo + 1
+          this.listQueryParam.pageSize = projectPage.pageSize
+          this.projects = projectPage.datas
+        }).catch((error) => {
+          notify('error', '获取项目列表异常:' + error.data)
+        })
+        this.hideListLoading()
+      },
+      goToProjectDetail (code) {
+        this.$router.push({name: 'Project', params: {projectId: code}})
+      }
+    }
+  }
+</script>
+
+<style scoped>
+.filter-container {
+  margin-bottom: 4px;
+  padding-left: 6px;
+}
+</style>

+ 55 - 0
src/pages/Project/utils/index.js

@@ -0,0 +1,55 @@
+export default {
+  toApplicationTypeCn (applicationType) {
+    var applicationTypeCn = ''
+    if (applicationType === 'MOBILE') {
+      applicationTypeCn = '移动APP测试'
+    } else if (applicationType === 'WEB') {
+      applicationTypeCn = 'Web应用测试'
+    } else if (applicationType === 'FLUSHBONAD') {
+      applicationTypeCn = '嵌入式软件测试'
+    } else if (applicationType === 'INDUSTRY') {
+      applicationTypeCn = '工业控制软件测试'
+    } else if (applicationType === 'TECHNIQUE') {
+      applicationTypeCn = '智能终端测试'
+    } else if (applicationType === 'OTHER') {
+      applicationTypeCn = '其他产品及应用测试'
+    }
+    return applicationTypeCn
+  },
+  toFieldTypeCn (fieldType) {
+    var fieldTypeCn = ''
+    if (fieldType === 'KJFW') {
+      fieldTypeCn = '科技服务'
+    } else if (fieldType === 'FWHLW') {
+      fieldTypeCn = '服务互联网'
+    } else if (fieldType === 'JCDL') {
+      fieldTypeCn = '集成电路'
+    } else if (fieldType === 'ZNCGQ') {
+      fieldTypeCn = '智能传感器'
+    } else if (fieldType === 'GDSB') {
+      fieldTypeCn = '高端设备'
+    } else if (fieldType === 'OTHER') {
+      fieldTypeCn = '其他'
+    }
+    return fieldTypeCn
+  },
+  toStatusCn (status) {
+    var statusCn = ''
+    if (status === -1) {
+      statusCn = '项目被拒'
+    } else if (status === 0) {
+      statusCn = '创建项目'
+    } else if (status === 1) {
+      statusCn = '发布项目'
+    } else if (status === 2) {
+      statusCn = '接收项目'
+    } else if (status === 3) {
+      statusCn = '提交项目'
+    } else if (status === 4) {
+      statusCn = '结束项目'
+    } else if (status === 5) {
+      statusCn = '时间截止'
+    }
+    return statusCn
+  }
+}

+ 2 - 5
src/pages/Square/PopularProject.vue

@@ -1,5 +1,5 @@
 <template>
-  <div class="popular-card">
+  <div>
   <el-card>
     <div slot="header" class="popular-header">
       <img src="../../assets/img/popular-project.png" alt="popular-project" class="popular-header-img"/>
@@ -61,9 +61,6 @@
 <style lang="scss">
   @import "../../style/main";
 
-  .popular-card {
-    margin-bottom: 15px;
-  }
   .popular-header .el-card__header{
     border-bottom: 2px solid rgba(0,117,203,1) !important;
   }
@@ -88,7 +85,7 @@
 
   .popular-list {
     .popular-list-item {
-      padding: 10px 10px;
+      padding: 4px 10px;
       border-bottom: 1px solid #ccc !important;
       .list-item-title{
         font-size:14px;

+ 1 - 1
src/pages/Statistics/components/Count.vue

@@ -9,7 +9,7 @@
         </p>
       </el-col>
       <el-col :offset="2" :xs="24" :sm="24" :lg="5" style="height: 100%;">
-        <p class="title1">注册企业</p>
+        <p class="title1">服务企业</p>
         <p class="title2">
           <label>{{countDatas.companyCount}}</label>
           <label>家</label>

+ 2 - 2
src/pages/Statistics/components/TransactionTable.vue

@@ -5,9 +5,9 @@
         <div class="no-wrap">{{ scope.row.name }}</div>
       </template>
     </el-table-column>
-    <el-table-column label="得分" min-width="100" align="center">
+    <el-table-column label="缺陷数(个)" min-width="100" align="center">
       <template slot-scope="scope" class="no-wrap">
-        {{ scope.row.score === -1 ? '未评分' :  scope.row.score}}
+        {{ scope.row.defectCount }}
       </template>
     </el-table-column>
   </el-table>

+ 33 - 16
src/pages/Statistics/components/map/StaffDistributionMap.vue

@@ -11,26 +11,22 @@ export default {
   props: ['taskInfo'],
   watch: {
     taskInfo (newVal, oldVal) {
-      let targetCity = newVal.companyCity
-      if (targetCity && targetCity.endsWith('市')) {
-        targetCity = targetCity.substr(0, targetCity.length - 1)
-      }
+      let targetProvince = newVal.companyProvince
+      targetProvince = this.changeProvinceName(targetProvince)
       // 初始化起点数据
-      const cityCountMap = new Map()
+      const provinceCountMap = new Map()
       newVal.testers.forEach(tester => {
-        let cityName = tester.city
-        if (cityName && cityName.endsWith('市')) {
-          cityName = cityName.substr(0, cityName.length - 1)
-        }
-        if (cityName) {
-          let val = cityCountMap.get(cityName) || 0
+        let provinceName = tester.province
+        provinceName = this.changeProvinceName(provinceName)
+        if (provinceName) {
+          let val = provinceCountMap.get(provinceName) || 0
           val++
-          cityCountMap.set(cityName, val)
+          provinceCountMap.set(provinceName, val)
         }
       })
       // 初始化飞线数据
       const fromDatas = []
-      cityCountMap.forEach((v, k) => {
+      provinceCountMap.forEach((v, k) => {
         fromDatas.push({name: k, value: v})
       })
       // 基于准备好的dom,初始化echarts实例
@@ -72,9 +68,9 @@ export default {
 
       const getMapDataAction = function () {
         fromDatas.map((fromData, index) => {
-          let myData = [[{name: fromData.name, value: fromData.value}, {name: targetCity}]]
+          let myData = [[{name: fromData.name, value: fromData.value}, {name: targetProvince}]]
           series.push({
-            name: targetCity,
+            name: targetProvince,
             type: 'scatter',
             zlevel: 20,
             color: '#f00',
@@ -225,7 +221,28 @@ export default {
     }
   },
   methods: {
-
+    changeProvinceName (provinceName) {
+      if (provinceName && provinceName.endsWith('省')) {
+        provinceName = provinceName.substr(0, provinceName.length - 1)
+      } else if (provinceName && provinceName.endsWith('市')) {
+        provinceName = provinceName.substr(0, provinceName.length - 1)
+      } else if (provinceName === '西藏自治区') {
+        provinceName = '西藏'
+      } else if (provinceName === '广西壮族自治区') {
+        provinceName = '广西'
+      } else if (provinceName === '内蒙古自治区') {
+        provinceName = '内蒙古'
+      } else if (provinceName === '宁夏回族自治区') {
+        provinceName = '宁夏'
+      } else if (provinceName === '新疆维吾尔自治区' || provinceName === '新疆自治区') {
+        provinceName = '新疆'
+      } else if (provinceName === '香港特别行政区') {
+        provinceName = '香港'
+      } else if (provinceName === '澳门地区') {
+        provinceName = '澳门'
+      }
+      return provinceName
+    }
   }
 }
 

+ 1 - 1
src/pages/Statistics/components/map/TotalMap.vue

@@ -39,7 +39,7 @@ export default {
         '甘肃省',
         '青海省',
         '宁夏回族自治区',
-        '新疆维吾尔自治区',
+        '新疆自治区',
         '台湾省',
         '香港特别行政区',
         '澳门特别行政区'

+ 25 - 43
src/pages/Statistics/components/map/map-data.js

@@ -1,57 +1,39 @@
 // 地图基本数据
 export const geoCoordMap = {
+  '新疆': [87.633473, 43.799238],
+  '内蒙古': [111.772606, 40.823156],
+  '黑龙江': [127.3,46.28],
+  '吉林': [125.3,43.88],
+  '辽宁': [123.38,41.8],
+  '河北': [117.220297, 39.173149],
+  '北京': [116.413384, 39.910925],
+  '天津': [117.209523, 39.093668],
+  '山西': [112.515496, 37.866566],
   '陕西': [109.503789, 35.860026],
-  '西安': [108.946466, 34.347269],
+  '宁夏': [106.265605, 38.476878],
   '甘肃': [103.832478, 36.065465],
-  '兰州': [103.84044, 36.067321],
-  '新疆': [87.633473, 43.799238],
-  '乌鲁木齐': [87.62444, 43.830763],
-  '内蒙古自治区': [111.772606, 40.823156],
-  '包头': [109.846544, 40.662929],
   '青海': [101.786462, 36.627159],
-  '西宁': [101.78443, 36.623393],
-  '宁夏': [106.265605, 38.476878],
-  '银川': [106.258602, 38.487834],
+  '西藏': [91.124342, 29.652894],
   '四川': [104.073467, 30.577543],
-  '成都': [104.081534, 30.655822],
   '重庆': [106.558434, 29.568996],
-  '西藏': [91.124342, 29.652894],
-  '拉萨': [91.120789, 29.65005],
-  '云南': [101.592952, 24.864213],
-  '昆明': [102.852448, 24.873998],
-  '贵州': [106.714476, 26.60403],
-  '贵阳': [106.636577, 26.653325],
-  '广西壮族自治区': [108.924274, 23.552255],
-  '南宁': [108.373451, 22.822607],
-  '山西': [112.515496, 37.866566],
-  '太原': [112.534919, 37.873219],
-  '河南': [113.65, 33.75],
-  '郑州': [113.631419, 34.753439],
   '湖北': [112.410562, 31.209316],
-  '武汉': [114.311582, 30.598467],
-  '湖南': [111.720664, 27.695864],
-  '长沙': [112.945473, 28.234889],
-  '江西': [115.676082, 27.757258],
-  '南昌': [115.864589, 28.689455],
-  '安徽': [117.33054, 31.734294],
-  '合肥': [117.233443, 31.826578],
-  '南京': [118.78, 32.04],
-  '请选择省份': [118.78, 32.04],
-  '江苏': [118.78, 32.04],
-  '山东': [117,36.65],
+  '河南': [113.65, 33.75],
+  '山东': [117, 36.65],
+  '江苏': [118.78, 32.85],
   '上海': [121.480539, 31.235929],
+  '安徽': [117.33054, 31.734294],
   '浙江': [120.159533, 30.271548],
-  '杭州': [120.215503, 30.253087],
+  '江西': [115.676082, 27.757258],
+  '湖南': [111.720664, 27.695864],
+  '贵州': [106.714476, 26.60403],
+  '云南': [101.592952, 24.864213],
   '广东': [113.394818, 23.408004],
-  '广州': [113.271431, 23.135336],
-  '北京': [116.413384, 39.910925],
-  '天津': [117.209523, 39.093668],
-  '河北': [117.220297, 39.173149],
-  '唐山': [118.186459, 39.636584],
-  '黑龙江':[127.3,46.28],
-  '辽宁':[123.38,41.8],
-  '福建':[119.3,26.08],
-  '吉林':[125.3,43.88]
+  '广西': [108.924274, 23.552255],
+  '福建': [119.3, 26.08],
+  '海南': [109.7, 19.1],
+  '香港': [114.15, 22.15],
+  '澳门': [114.15, 22.15],
+  '台湾': [121.68, 23]
 }
 // 初始化飞线数据
 export const XAData = [

+ 2 - 2
src/pages/Technology/HotActicle.vue

@@ -60,7 +60,7 @@
   @import "../../style/main";
 
   .popular-card {
-    margin-bottom: 15px;
+    margin-bottom: 5px!important;
   }
   .popular-header .el-card__header{
     border-bottom: 2px solid rgba(0,117,203,1) !important;
@@ -86,7 +86,7 @@
 
   .popular-list {
     .popular-list-item {
-      padding: 10px 10px;
+      padding: 4px 10px;
       border-bottom: 1px solid #ccc !important;
       .list-item-title{
         cursor:pointer;

+ 12 - 1
src/pages/TestCase/components/defect_detail.vue

@@ -10,7 +10,14 @@
       <expend-text :text="defectData.descr"></expend-text>
     </el-form-item>
     <el-form-item label="严重等级">
-      <span>{{toSeriousnessCn(defectData.seriousness)}}</span>
+      <el-select v-if="canAudit" v-model="defectData.seriousness">
+        <el-option value="VERY_HIGH" label="致命"/>
+        <el-option value="HIGH" label="严重"/>
+        <el-option value="MID" label="一般"/>
+        <el-option value="LOW" label="轻微"/>
+        <el-option value="VERY_LOW" label="建议"/>
+      </el-select>
+      <span v-else>{{toSeriousnessCn(defectData.seriousness)}}</span>
     </el-form-item>
     <el-form-item label="优先级">
       <span>{{toPriorityCn(defectData.priority)}}</span>
@@ -87,6 +94,10 @@ export default {
           screenshots: []
         }
       }
+    },
+    canAudit: {
+      type: Boolean,
+      default: false
     }
   },
   methods: {

+ 26 - 3
src/pages/TestCase/components/defect_list.vue

@@ -55,7 +55,8 @@
       </el-table-column>
       <el-table-column label="操作" align="center" class-name="small-padding fixed-width" min-width="20%">
         <template slot-scope="{row,$index}">
-          <i class="el-icon-tickets mini-margin" @click="handleDetail(row)" v-if="!testCaseCanEdit" style="cursor: pointer;" title="查看详情"></i>
+          <i class="el-icon-tickets mini-margin" @click="handleDetail(row)" v-if="!testCaseCanEdit && !canAudit" style="cursor: pointer;" title="查看详情"></i>
+          <i class="el-icon-edit mini-margin" @click="handleDetail(row)" v-if="!testCaseCanEdit && canAudit" style="cursor: pointer;" title="审核"></i>
           <i class="el-icon-edit mini-margin " @click="handleUpdate(row)" v-if="testCaseCanEdit" style="cursor: pointer;" title="编辑"></i>
           <i class="el-icon-delete mini-margin " @click="handleDelete(row,$index)" v-if="testCaseCanEdit" style="cursor: pointer;" title="删除"></i>
           <i class="el-icon-document-copy mini-margin " @click="handleCopy(row)" v-if="testCaseCanEdit" style="cursor: pointer;" title="复制"></i>
@@ -78,11 +79,14 @@
     </el-dialog>
 
     <el-dialog title="缺陷详情" :visible.sync="detailDialogFormVisible" :close-on-click-modal="false">
-      <defect-detail ref="defectDetail" style="width: 600px;" :defect-data="defectData"></defect-detail>
+      <defect-detail ref="defectDetail" style="width: 600px;" :defect-data="defectData" :can-audit="canAudit"></defect-detail>
       <div slot="footer" class="dialog-footer">
         <el-button @click="detailDialogFormVisible = false">
           取消
         </el-button>
+        <el-button v-if="canAudit" type="primary" @click="submitSeriousness()">
+          提交
+        </el-button>
       </div>
     </el-dialog>
   </div>
@@ -120,7 +124,7 @@ export default {
         selectedTaskCode: this.selectedTaskCode,
         selectedUserId: this.selectedUserId
       },
-      total: 0,
+      total: 0
     }
   },
   props: {
@@ -145,6 +149,10 @@ export default {
     selectedUserId: {
       type: Number,
       default: 0
+    },
+    canAudit: {
+      type: Boolean,
+      default: false
     }
   },
   created () {
@@ -239,6 +247,21 @@ export default {
         this.getRefreshTestCaseListFunc()()
       })
     },
+    submitSeriousness () {
+      Http.post(Api.TESTCASE.EXAM_UPDATE_DEFECT.replace('{id}', this.defectData.id), {'seriousness': this.defectData.seriousness}).then((res) => {
+        if (res.code === 20000) {
+          notify('success', '提交成功')
+          this.detailDialogFormVisible = false
+          this.getRefreshDefectListFunc()()
+          this.getRefreshTestCaseListFunc()()
+        } else {
+          notify('error', '提交失败')
+        }
+      }).catch((error) => {
+        console.error(error)
+        notify('error', '提交异常:' + error.data.message)
+      })
+    },
     hideListLoading () {
       this.listLoading = false
     },

+ 1 - 1
src/pages/TestCase/components/test_case_list.vue

@@ -12,7 +12,7 @@
     >
       <el-table-column type="expand" align="center" min-width="1%">
         <template slot-scope="{row, $index}">
-          <defect-list :defects="row.defects" :selected-task-code="selectedTaskCode" ref="innerDefectList" :isContained="true" :test-case-can-edit="testCaseCanEdit"/>
+          <defect-list :defects="row.defects" :selected-task-code="selectedTaskCode" ref="innerDefectList" :isContained="true" :test-case-can-edit="testCaseCanEdit" :can-audit="canAudit"/>
         </template>
       </el-table-column>
       <el-table-column label="编号" prop="code" sortable="custom" align="center" min-width="3%">

+ 7 - 1
src/pages/TestCase/exam_testcases.vue

@@ -47,7 +47,7 @@
         <test-case-list ref="testCaseList" :selected-task-code="selectedTaskCode" :selected-user-id="selectedUserId" :selected-test-status="selectedTestStatus" :selected-exam-status="selectedExamStatus" :test-case-can-edit="false" :can-audit="canAudit"></test-case-list>
       </el-tab-pane>
       <el-tab-pane label="用例缺陷" name="defects">
-        <defect-list ref="defectList" :isContained="false" :test-case-can-edit="false" :selected-task-code="selectedTaskCode" :selected-user-id="selectedUserId"></defect-list>
+        <defect-list ref="defectList" :isContained="false" :test-case-can-edit="false" :selected-task-code="selectedTaskCode" :selected-user-id="selectedUserId" :can-audit="canAudit"></defect-list>
       </el-tab-pane>
       <el-tab-pane label="测试环境" name="testEnvs">
         <test-env-list ref="testEnvList" :test-case-can-edit="false" :selected-task-code="selectedTaskCode" :selected-user-id="selectedUserId"></test-env-list>
@@ -67,6 +67,7 @@ import TestToolList from './components/test_tool_list'
 import Http from '@/js/http'
 import Api from '@/js/api'
 import {notify} from '@/constants'
+import {mapActions} from 'vuex'
 
 export default {
   name: 'ExamTestCases',
@@ -146,8 +147,13 @@ export default {
   created () {
     this.getSimpleProjectDatas()
     this.getSimpleTaskDatas(true)
+    this.$nextTick(() => {
+      this.setRefreshTestCaseListFunc(this.$refs.testCaseList.getList)
+      this.setRefreshDefectListFunc(this.$refs.defectList.getList)
+    })
   },
   methods: {
+    ...mapActions(['setRefreshTestCaseListFunc', 'setRefreshDefectListFunc']),
     getList (firstIn) {
       this.canAudit = this.selectedTaskData.status !== 4 && this.selectedUser.isCommitted === 1
       this.$refs.testCaseList.listQueryParam.selectedTaskCode = this.selectedTaskCode

+ 1 - 1
src/pages/Tester/components/PieChart.vue

@@ -23,7 +23,7 @@ export default {
       default: '300px'
     }
   },
-  data() {
+  data () {
     return {
       chart: null
     }

+ 24 - 13
src/pages/Tester/components/RaddarChart.vue

@@ -29,32 +29,39 @@
         type: String,
         default: '300px'
       },
-      info: {
-        type: Object,
-        default: {}
+      userRadars: {
+        type: Array
       }
     },
-    data() {
+    data () {
       return {
-        chart: null
+        chart: null,
+        userRadarValues: []
       }
     },
-    mounted() {
+    mounted () {
       this.$nextTick(() => {
         this.initChart()
       })
     },
-    beforeDestroy() {
+    beforeDestroy () {
       if (!this.chart) {
         return
       }
       this.chart.dispose()
       this.chart = null
     },
+    watch: {
+      userRadars: {
+        handler: function (nv, ov) {
+          this.userRadarValues = nv
+          this.initChart()
+        }
+      }
+    },
     methods: {
-      initChart() {
+      initChart () {
         this.chart = echarts.init(document.getElementById('radderChart'), 'macarons')
-
         this.chart.setOption(
           {
             tooltip: {},
@@ -71,15 +78,19 @@
                   padding: [3, 5]
                 }
               },
-              indicator:this.info.labels.map(item=>{
-                return {name:[item],max:10}
-              })
+              indicator: [
+                { name: '测试用例编写能力', max: 5 },
+                { name: 'BUG挖掘能力', max: 5 },
+                { name: 'BUG严重度', max: 5 },
+                { name: 'BUG紧急度', max: 5 },
+                { name: 'BUG描述能力', max: 5 },
+              ]
             },
             series: [{
               type: 'radar',
               data: [
                 {
-                  value: this.info.data,
+                  value: this.userRadarValues ? this.userRadarValues : [0, 0, 0, 0, 0],
                   name: '个人能力雷达图'
                 }
               ]

+ 7 - 2
src/pages/Tester/testertask.vue

@@ -17,7 +17,7 @@
         <el-row :gutter="20" style="height: calc(100vh - 90px - 480px);min-height: 400px">
           <el-col :xs="24" :sm="24" :lg="9" style="height: 100%">
             <div class="chart-wrapper card-shadow" style="height: 99%">
-              <raddar-chart :info="userRadar" v-if="userRadar&&userRadar.data"/>
+              <raddar-chart :user-radars="userRadars"/>
             </div>
           </el-col>
           <el-col :xs="24" :sm="24" :lg="15" style="height: 100%">
@@ -69,7 +69,7 @@
           tester: {}
         },
         bugList: [],
-        userRadar: {},
+        userRadars: [],
         timeLineList: [],
         labels: []
       }
@@ -82,6 +82,11 @@
         }).catch((error) => {
           notify('error', '获取测试人员数据失败:系统异常')
         })
+        Http.get(Api.RYPG.VALUES.replace('{userId}', userId)).then((res) => {
+          this.userRadars = res.data
+        }).catch((error) => {
+          notify('error', '获取测试人员能力值异常:系统异常')
+        })
       },
       handlePeopleData () {
         // const data = this.getPeopleData;

+ 1 - 5
src/pages/UserCenter/BindingMail.vue

@@ -68,11 +68,7 @@
         })
       },
       getVerifyCode(){
-        let params = {
-          id:this.user.id,
-          email:this.mailBindingForm.mail
-        }
-        Http.put('/api/verify/email',params).then((res)=>{
+        Http.get('/api/verify/email/' + this.mailBindingForm.mail).then((res)=>{
             if(res.msg == "ERROR"){
                 notify('error', res.data);
             }else{

+ 1 - 5
src/pages/UserCenter/MailBinding.vue

@@ -80,11 +80,7 @@
         });
       },
       getVerifyCode() {
-        let params = {
-          id: this.user.id,
-          email: this.emailBindingForm.email
-        }
-        Http.put('/api/verify/email', params).then((res) => {
+        Http.get('/api/verify/email/' + this.emailBindingForm.email).then((res) => {
           this.hasVerifyCode = true;
           let _this = this;
           let codeTimer = setInterval(function () {

+ 1 - 5
src/pages/UserCenter/ReBindingMail.vue

@@ -94,11 +94,7 @@
 
       },
       getVerifyCode() {
-        let params = {
-          id: this.user.id,
-          email: this.emailBindingForm.email
-        }
-        Http.put('/api/verify/email', params).then((res) => {
+        Http.get('/api/verify/email/' + this.emailBindingForm.email).then((res) => {
           let _this = this;
           if (res.msg == "ERROR") {
             notify('error', '验证码获取失败:' + res.data);

+ 1 - 2
src/pages/login/login.vue

@@ -18,7 +18,6 @@
 import Http from '@/js/http'
 import Api from '@/js/api'
 import {notify} from '@/constants'
-import router from '@/router'
 
 export default {
   name: 'login',
@@ -36,7 +35,7 @@ export default {
       }
       Http.post(Api.LOGIN, loginData).then((res) => {
         if (res.code === 20000) {
-          router.back()
+          this.$router.go(-1)
         } else {
           notify('error', '登陆失败:' + res.msg)
         }

+ 33 - 10
src/router/index.js

@@ -76,6 +76,15 @@ export default new Router({
       }
     },
     {
+      path: '/project/list',
+      name: 'Projects',
+      component: resolve => require(['@/pages/Project/List.vue'], resolve),
+      meta: {
+        title: '',
+        requireAuth: false
+      }
+    },
+    {
       path: '/project/:projectId',
       name: 'Project',
       component: resolve => require(['@/components/project/Project.vue'], resolve),
@@ -294,21 +303,21 @@ export default new Router({
     {
       path: '/agency/list/show',
       name: 'AgencyList',
-      component: resolve => require(['@/pages/HomepageSearch/AgencyList.vue'], resolve),
-      meta: {
-        title: '',
-        requireAuth: false
-      }
-    },
-    {
-      path: '/agency/resident/list',
-      name: 'AgencyResidentList',
-      component: resolve => require(['@/pages/HomepageSearch/AgencyResidentList.vue'], resolve),
+      component: resolve => require(['@/pages/Agency/Agencys.vue'], resolve),
       meta: {
         title: '',
         requireAuth: false
       }
     },
+    // {
+    //   path: '/agency/resident/list',
+    //   name: 'AgencyResidentList',
+    //   component: resolve => require(['@/pages/HomepageSearch/AgencyResidentList.vue'], resolve),
+    //   meta: {
+    //     title: '',
+    //     requireAuth: false
+    //   }
+    // },
     {
       path: '/competition/list',
       name: 'CompetitionList',
@@ -391,6 +400,15 @@ export default new Router({
       }
     },
     {
+      path: '/field/list',
+      name: 'FieldList',
+      component: resolve => require(['@/pages/HomepageSearch/FieldList.vue'], resolve),
+      meta: {
+        title: '',
+        requireAuth: false
+      }
+    },
+    {
       path: '/field/detail',
       name: 'FieldDetail',
       component: resolve => require(['@/pages/DetailPage/FieldDetail.vue'], resolve),
@@ -534,6 +552,11 @@ export default new Router({
       name: 'TaskAmountCalPage',
       path: '/taskamount/:taskCode',
       component: resolve => require(['@/pages/Amount/TaskAmountCal.vue'], resolve)
+    },
+    {
+      name: 'CompanyListPage',
+      path: '/companys',
+      component: resolve => require(['@/pages/Company/Companys.vue'], resolve)
     }
   ]
 })

Certains fichiers n'ont pas été affichés car il y a eu trop de fichiers modifiés dans ce diff