guochao 6 роки тому
батько
коміт
c52c5d70b4

+ 1 - 1
package.json

@@ -51,7 +51,7 @@
     "less-loader": "^5.0.0",
     "node-notifier": "^5.1.2",
     "node-sass": "^4.12.0",
-    "optimize-css-assets-webpack-plugin": "^5.0.3",
+    "optimize-css-assets-webpack-plugin": "^3.2.0",
     "ora": "^1.2.0",
     "portfinder": "^1.0.13",
     "postcss-import": "^11.0.0",

+ 6 - 2
src/components/InstitutionRank.vue

@@ -10,8 +10,12 @@
       <el-table-column prop="name" label="机构名称">
         <template slot-scope="scope"><span class="institution-name" style="font-size: 12px">{{scope.row.name}}</span></template>
       </el-table-column>
-      <el-table-column prop="name" label="积分">
-        <template slot-scope="scope"><span class="institution-name" style="font-size: 12px"><el-tag type="primary">{{scope.row.allTaskPrice}}</el-tag></span></template>
+      <el-table-column prop="name" label="金额">
+        <template slot-scope="scope">
+          <span class="institution-name" style="font-size: 12px">
+            {{scope.row.allTaskPrice}}
+          </span>
+        </template>
       </el-table-column>
     </el-table>
   </div>

+ 16 - 10
src/components/Mine.vue

@@ -93,7 +93,7 @@
           <span slot="label">
             <el-badge v-if="myProjectNoticeCount>0" :value="myProjectNoticeCount" class="item"
                       style="height:auto;margin-top: 10px;margin-bottom: 25px; font-size: 16px;">我的项目</el-badge>
-            <el-badge v-if="myProjectNoticeCount==0" class="item"
+            <el-badge v-if="myProjectNoticeCount==null || myProjectNoticeCount == 0" class="item"
                       style="margin-top: 10px;margin-bottom: 25px; font-size: 16px;">我的项目</el-badge>
           </span>
           <span v-if="myProjects == null || myProjects.length == 0"> 暂无项目 </span>
@@ -112,7 +112,8 @@
           <span slot="label">
             <el-badge v-if="processProjectNoticeCount>0" :value="processProjectNoticeCount" class="item"
                       style="margin-top: 10px;margin-bottom: 25px; font-size: 16px;">处理中项目</el-badge>
-            <el-badge v-if="processProjectNoticeCount==0" class="item" style="margin-top: 10px;margin-bottom: 25px; font-size: 16px;">处理中项目</el-badge>
+            <el-badge v-if="processProjectNoticeCount==null || processProjectNoticeCount==0" class="item"
+                      style="margin-top: 10px;margin-bottom: 25px; font-size: 16px;">处理中项目</el-badge>
           </span>
           <el-row v-if="handlingProjects != null && handlingProjects.length != 0" type="flex" align="middle"
                   justify="center" style="font-size: 14px;">
@@ -128,7 +129,10 @@
         </el-tab-pane>
         <el-tab-pane name="acceptableProject">
           <span slot="label">
-            <el-badge class="item" style="margin-top: 10px;margin-bottom: 25px; font-size: 16px;">可接收项目</el-badge>
+            <el-badge v-if="acceptableProjectNoticeCount>0" :value="acceptableProjectNoticeCount" class="item"
+                      style="margin-top: 10px;margin-bottom: 25px; font-size: 16px;">可接收项目</el-badge>
+            <el-badge v-if="acceptableProjectNoticeCount==null || acceptableProjectNoticeCount==0" class="item"
+                      style="margin-top: 10px;margin-bottom: 25px; font-size: 16px;">可接收项目</el-badge>
           </span>
           <el-row v-if="acceptableProjects != null && acceptableProjects.length != 0" type="flex" align="middle"
                   justify="center" style="font-size: 14px;">
@@ -180,6 +184,7 @@ export default {
       defaultValue: defaultValue,
       myProjectNoticeCount: 0,
       processProjectNoticeCount: 0,
+      acceptableProjectNoticeCount: 0,
       rolesPermissions: {
         isRegionManager: false,
         isIndividualUser: false,
@@ -219,8 +224,9 @@ export default {
       this.showLoading()
       Http.get(Apis.PAGE.MY_CROWD_TEST_PAGE.replace('{userId}', this.user.userVO.id)).then((res) => {
         this.hideLoading()
-        this.processProjectNoticeCount = res.processProjectNoticeCount
-        this.myProjectNoticeCount = res.myProjectNoticeCount
+        this.processProjectNoticeCount = res.processProjectNoticeCount == null ? 0 : res.processProjectNoticeCount
+        this.myProjectNoticeCount = res.myProjectNoticeCount == null ? 0 : res.myProjectNoticeCount
+        this.acceptableProjectNoticeCount = res.acceptableProjectNoticeCount == null ? 0 : res.acceptableProjectNoticeCount
         if (res.unfinishedTasks != null && res.unfinishedTasks.length > 0) {
           this.unFinishedTaskList = res.unfinishedTasks
         }
@@ -293,31 +299,31 @@ export default {
             name: '接收项目数量',
             type: 'line',
             stack: '总量',
-            data: [120, 132, 101, 134, 90, 230, 210]
+            data: [2, 3, 3, 2, 4, 5, 6]
           },
           {
             name: '完成项目数量',
             type: 'line',
             stack: '总量',
-            data: [220, 182, 191, 234, 290, 330, 310]
+            data: [2, 3, 3, 2, 4, 5, 6]
           },
           {
             name: '接收任务数量',
             type: 'line',
             stack: '总量',
-            data: [150, 232, 201, 154, 190, 330, 410]
+            data: [22, 33, 41, 14, 55, 33, 41]
           },
           {
             name: '完成任务数量',
             type: 'line',
             stack: '总量',
-            data: [320, 332, 301, 334, 390, 330, 320]
+            data: [21, 33, 31, 14, 39, 33, 32]
           },
           {
             name: '发布项目数量',
             type: 'line',
             stack: '总量',
-            data: [820, 932, 901, 934, 1290, 1330, 1320]
+            data: [2, 3, 1, 0, 1, 2, 2]
           }
         ]
       }

+ 8 - 3
src/components/PersonRank.vue

@@ -8,10 +8,15 @@
         </template>
       </el-table-column>
       <el-table-column prop="name" label="用户名">
-        <template slot-scope="scope"><span class="institution-style" style="font-size: 12px">{{scope.row.name}}</span></template>
+        <template slot-scope="scope"><span class="institution-style" style="font-size: 12px">{{scope.row.name}}</span>
+        </template>
       </el-table-column>
-      <el-table-column prop="number" label="积分">
-        <template slot-scope="scope"><span class="institution-style" style="font-size: 12px"><el-tag type="primary">{{scope.row.allProjectPrice}}</el-tag></span></template>
+      <el-table-column prop="number" label="金额">
+        <template slot-scope="scope">
+          <span class="institution-style" style="font-size: 12px">
+            {{scope.row.allProjectPrice}}
+          </span>
+        </template>
       </el-table-column>
     </el-table>
   </div>

+ 15 - 1
src/components/authen/AgencyAuthenticationCreate.vue

@@ -167,7 +167,21 @@ export default {
     submitInfoSuccess (res) {
       console.log(res)
       this.hideLoading()
-      notify('success', '认证信息上传成功')
+      this.$confirm('认证信息提交成功,将于10个工作日内审核完成')
+        .then(_ => {
+          //done()
+          this.$router.push({
+            name: 'AgencyAuthentication',
+            params: {userId: this.user.userVO.id}
+          })
+          this.hideDialog()
+        })
+        .catch(_ => {
+          this.$router.push({
+            name: 'AgencyAuthentication',
+            params: {userId: this.user.userVO.id}
+          })
+        })
     },
     submitInfoFail (error) {
       this.hideLoading()

+ 326 - 64
src/components/authen/AuthenticationIndex.vue

@@ -1,77 +1,339 @@
 <template>
-  <div class="create-container">
+  <div class="create-container" v-loading="loading">
     <div class="create-body">
-      <div class="title">选择认证类型</div>
-      <el-row type="flex" justify="center" align="middle" style="margin-top: 100px;margin-bottom: 100px;" :gutter="50">
-        <el-col :span="6">
-          <el-card :body-style="{ padding: '0px' }" style="cursor: pointer;">
-            <i class="el-icon-user-solid image" style="color:#909399" @click="toIndividualAuthentication"></i>
-            <div style="text-align: center;font-size: 12px"><span>认证为个人用户,可以创建项目</span></div>
-            <div @click="toIndividualAuthentication" style="padding: 14px;text-align: center;font-size: 20px">
-              <span>个人认证</span>
-            </div>
-          </el-card>
-        </el-col>
-        <el-col :span="6">
-          <el-card :body-style="{ padding: '0px' }" style="cursor: pointer;">
-            <i class="el-icon-s-cooperation image" style="color:#909399" @click="toEnterpriseAuthentication"></i>
-            <div style="text-align: center;font-size: 12px"><span>认证为企业用户,可以创建项目</span></div>
-            <div @click="toEnterpriseAuthentication" style="padding: 14px;text-align: center;font-size: 20px">
-              <span>企业认证</span>
-            </div>
-          </el-card>
-        </el-col>
-        <el-col :span="6">
-          <el-card :body-style="{ padding: '0px' }" style="cursor: pointer;">
-            <i class="el-icon-s-tools image" style="color:#909399;" @click="toAgencyAuthentication"></i>
-            <div style="text-align: center;font-size: 12px"><span>认证为测评机构,可以创建项目或接受任务</span></div>
-            <div @click="toAgencyAuthentication" style="padding: 14px;text-align: center;font-size: 20px">
-              <span>机构认证</span>
-            </div>
-          </el-card>
-        </el-col>
-      </el-row>
+      <div class="title">审核认证信息</div>
+      <el-table
+        :data="handlingAuthList"
+        :row-class-name="rowClassName"
+        stripe
+        style="width: 100%">
+        <el-table-column prop="id" label="编号">
+          <template slot-scope="scope">
+            <span>{{scope.row.id}}</span>
+          </template>
+        </el-table-column>
+        <el-table-column prop="userInfo" label="用户信息">
+          <template slot-scope="scope">
+            <span style="cursor: pointer">
+              <el-link type="primary">{{scope.row.userName}}</el-link>
+            </span>
+          </template>
+        </el-table-column>
+        <el-table-column prop="type" label="认证类型">
+          <template slot-scope="scope">
+            <span>
+              <el-tag v-if="scope.row.type=='personal'" type="success">个人</el-tag>
+              <el-tag v-if="scope.row.type=='agency'">机构</el-tag>
+              <el-tag v-if="scope.row.type=='enterprise'" type="warning">企业</el-tag>
+            </span>
+          </template>
+        </el-table-column>
+        <el-table-column prop="detail" label="认证详情">
+          <template slot-scope="scope">
+            <el-link type="primary" @click="handleAuthDetail(scope.row.userId,scope.row.type)">认证详情</el-link>
+          </template>
+        </el-table-column>
+        <el-table-column prop="status" label="认证状态">
+          <template slot-scope="scope">
+            <span>
+              <el-tag :type="scope.row.authStatus.style">{{scope.row.authStatus.text}}</el-tag>
+            </span>
+          </template>
+        </el-table-column>
+        <el-table-column prop="date" label="申请时间" width="180">
+          <template slot-scope="scope">
+            <span>{{reformTime(new Date(scope.row.applytime))}}</span>
+          </template>
+        </el-table-column>
+        <el-table-column label="操作" width="180">
+          <template slot-scope="scope">
+            <el-button type="primary" size="mini" @click="handleAuthenticationPass(scope.row.userId,scope.row.type)">
+              通过
+            </el-button>
+            <el-button type="danger" size="mini" @click="handleAuthenticationReject(scope.row.userId,scope.row.type)">
+              驳回
+            </el-button>
+          </template>
+        </el-table-column>
+      </el-table>
+      <el-dialog title="认证详情" :visible.sync="showDialog" center width="30%">
+        <el-form :model="authInfoDetail">
+          <el-form-item label="类型:">
+            <span>{{authInfoDetail.type}}</span>
+          </el-form-item>
+          <el-form-item label="姓名:" v-if="authInfoDetail.type == 'personal'">
+            <span>{{authInfoDetail.realName}}</span>
+          </el-form-item>
+          <el-form-item label="身份证号:" v-if="authInfoDetail.type == 'personal'">
+            <span>{{authInfoDetail.IDCard}}</span>
+          </el-form-item>
+          <el-form-item label="身份证照:" v-if="authInfoDetail.type == 'personal'">
+            <span>{{authInfoDetail.IDCardPhoto}}</span>
+          </el-form-item>
+          <el-form-item label="银行账号:">
+            <span>{{authInfoDetail.bankAccount}}</span>
+          </el-form-item>
+          <el-form-item label="地址:">
+            <span>{{authInfoDetail.address}}</span>
+          </el-form-item>
+          <el-form-item label="申请时间:">
+            <span>{{authInfoDetail.applyTime}}</span>
+          </el-form-item>
 
+          <el-form-item label="企业名称:" v-if="authInfoDetail.type == 'enterprise'">
+            <span>{{authInfoDetail.enterpriseName}}</span>
+          </el-form-item>
+          <el-form-item label="法人姓名:" v-if="authInfoDetail.type == 'enterprise'">
+            <span>{{authInfoDetail.legalPersonName}}</span>
+          </el-form-item>
+          <el-form-item label="营业执照:" v-if="authInfoDetail.type == 'enterprise'">
+            <span>{{authInfoDetail.businessLicensePhoto}}</span>
+          </el-form-item>
+          <el-form-item label="统一社会信用代码:" v-if="authInfoDetail.type == 'enterprise'">
+            <span>{{authInfoDetail.unifiedSocialCreditCode}}</span>
+          </el-form-item>
+
+          <el-form-item label="机构名称:" v-if="authInfoDetail.type == 'agency'">
+            <span>{{authInfoDetail.evaluationAgencyName}}</span>
+          </el-form-item>
+          <el-form-item label="机构能力:" v-if="authInfoDetail.type == 'agency'">
+            <span>{{authInfoDetail.evaluationAgencyAbilityList}}</span>
+          </el-form-item>
+          <el-form-item label="机构资源:" v-if="authInfoDetail.type == 'agency'">
+            <span>{{authInfoDetail.evaluationAgencyResourceList}}</span>
+          </el-form-item>
+          <el-form-item label="机构Logo:" v-if="authInfoDetail.type == 'agency'">
+            <span>{{authInfoDetail.agencyPhoto}}</span>
+          </el-form-item>
+        </el-form>
+        <div slot="footer" class="dialog-footer">
+          <el-button type="info" size="mini" @click="hideAuthDialog()">返回</el-button>
+
+          <el-button type="danger" size="mini" @click="handleAuthenticationReject(authInfoDetail.userId,authInfoDetail.userId)">驳回</el-button>
+
+          <el-button type="primary" size="mini" @click="handleAuthenticationPass(authInfoDetail.userId,authInfoDetail.userId)">通过</el-button>
+        </div>
+      </el-dialog>
+      <!--<el-pagination-->
+      <!--:page-size="20"-->
+      <!--hide-on-single-page-->
+      <!--:pager-count="5"-->
+      <!--:current-page.sync="currentPage"-->
+      <!--layout="prev, pager, next"-->
+      <!--@current-change="handleCurrentChange"-->
+      <!--:total="100">-->
+      <!--</el-pagination>-->
     </div>
   </div>
 </template>
 
 <script>
-export default {
-  name: 'AuthenticationIndex',
-  data () {
-    return {}
-  },
-  methods: {
-    test () {
-      console.log('click')
-    },
-    toIndividualAuthentication () {
-      this.$router.push({
-        name: 'IndividualAuthenticationCreate',
-        // params: {projectId: projectId, taskId: taskId}
-      })
-    },
-    toEnterpriseAuthentication () {
-      this.$router.push({
-        name: 'EnterpriseAuthenticationCreate',
-        // params: {projectId: projectId, taskId: taskId}
-      })
-    },
-    toAgencyAuthentication () {
-      this.$router.push({
-        name: 'AgencyAuthenticationCreate',
-        // params: {projectId: projectId, taskId: taskId}
-      })
+    import {
+        checkPassAuth,
+        checkRejectAuth,
+        getAllHandledAuthInfo,
+        getAllHandlingAuthInfo,
+        getFormalTimeFromDate,
+        getCurrentAgencyAuthInfo,
+        getCurrentEnterpriseAuthInfo,
+        getCurrentIndividualAuthenInfo
+    } from '@/js/index'
+    import {notify} from '@/constants/index'
+
+    export default {
+        name: 'AuthenticationManage',
+        data () {
+            return {
+                currentPage: 1,
+                loading: false,
+                showDialog: false,
+                authenticationStatusUntreated: '审核中',
+                authenticationStatusPass: '审核通过',
+                authenticationStatusReject: '审核未通过',
+                handlingAuthList: [],
+                handledAuthList: [],
+                authInfoDetail: {
+                    userId: '',
+                    type: '',
+                    realName: '',
+                    IDCard: '',
+                    IDCardPhoto: '',
+                    bankAccount:'',
+                    address:'',
+                    applyTime:'',
+
+                    enterpriseName:'',
+                    legalPersonName:'',
+                    businessLicensePhoto:'',
+                    unifiedSocialCreditCode:'',
+
+                    evaluationAgencyName:'',
+                    evaluationAgencyAbilityList: [],
+                    evaluationAgencyResourceList: [],
+                    agencyPhoto:'',
+                    updateTime:'',
+                    expireTime:''
+                }
+            }
+        },
+        mounted () {
+            this.$nextTick(() => {
+                this.init()
+            })
+        },
+        methods: {
+            init () {
+                this.getHandlingAuthList()
+                this.getHandledAuthList()
+            },
+            //获取所有未认证信息
+            getHandlingAuthList () {
+                this.showLoading()
+                getAllHandlingAuthInfo(this.getHandlingAuthListSuccess, this.getHandlingAuthListFail)
+            },
+            //获取所有已认证信息
+            getHandlingAuthListSuccess (res) {
+                this.handlingAuthList = res
+                this.hideLoading()
+            },
+            getHandlingAuthListFail (error) {
+                this.hideLoading()
+                notify('error', '获取认证信息失败:' + error.data)
+            },
+            getHandledAuthList () {
+                this.showLoading()
+                getAllHandledAuthInfo(this.getHandledAuthListSuccess, this.getHandledAuthListFail)
+            },
+            getHandledAuthListSuccess (res) {
+                this.handledAuthList = res
+                this.hideLoading()
+            },
+            getHandledAuthListFail (error) {
+                this.hideLoading()
+                notify('error', '获取已认证信息失败:' + error.data)
+            },
+            handleCurrentChange (param) {
+                console.log(param)
+            },
+            handleAuthenticationPass (userId, type) {
+                this.showLoading()
+                checkPassAuth(type, userId, this.handleAuthenticationPassSuccess, this.handleAuthenticationPassFail)
+                // item.status = this.authenticationStatusPass
+                // console.log('通过')
+            },
+            handleAuthenticationPassSuccess (res) {
+                this.hideLoading()
+                this.getHandlingAuthList()
+                console.log(res)
+            },
+            handleAuthenticationPassFail (error) {
+                this.hideLoading()
+                console.log(error)
+                notify('error', '通过失败:' + error.data)
+            },
+            handleAuthenticationReject (userId, type) {
+                this.$prompt('请输入驳回本申请的原因', '提示', {
+                    confirmButtonText: '确定',
+                    cancelButtonText: '取消',
+                }).then((event) => {
+                    const explain = event.value
+                    console.log(explain)
+                    this.showLoading()
+                    const data = {
+                        explain : event.value
+                    }
+                    checkRejectAuth(type, userId, data, this.handleAuthenticationRejectSuccess, this.handleAuthenticationRejectFail)
+                }).catch(() => {
+                })
+            },
+            handleAuthenticationRejectSuccess (res) {
+                this.hideLoading()
+                this.getHandlingAuthList()
+                notify('success','驳回成功')
+                console.log(res)
+            },
+            handleAuthenticationRejectFail (error) {
+                this.hideLoading()
+                console.log(error)
+                notify('error', '拒绝失败:' + error.data)
+            },
+            handleAuthDetail (userId, type) {
+                this.authInfoDetail.userId = userId
+                this.authInfoDetail.type = type
+                this.getAuthInfo(userId, type);
+            },
+            showLoading () {
+                this.loading = true
+            },
+            hideLoading () {
+                this.loading = false
+            },
+            reformTime (date) {
+                return getFormalTimeFromDate(date)
+            },
+            rowClassName ({row, rowIndex}) {
+                //把每一行的索引放进row.id
+                row.id = rowIndex + 1
+            },
+            showAuthDialog () {
+                this.showDialog = true
+            },
+            hideAuthDialog () {
+                this.showDialog = false
+            },
+            getAuthInfo(userId, type){
+                this.showLoading();
+                if(type == 'personal'){
+                    getCurrentIndividualAuthenInfo(userId, this.getCurrentIndividualAuthenInfoSuccess, this.getCurrentIndividualAuthenInfoFail);
+                }else if(type == 'enterprise'){
+                    getCurrentEnterpriseAuthInfo(userId, this.getCurrentEnterpriseAuthInfoSuccess, this.getCurrentEnterpriseAuthInfoFail);
+                }else if(type == 'agency'){
+                    getCurrentAgencyAuthInfo(userId, this.getCurrentAgencyAuthInfoSuccess, this.getCurrentAgencyAuthInfoFail);
+                }
+            },
+            getCurrentIndividualAuthenInfoSuccess(res){
+                this.hideLoading();
+                console.log(res)
+                this.authInfoDetail.realName = res.realName;
+                this.authInfoDetail.IDCard = res.idcard;
+                this.authInfoDetail.IDCardPhoto = res.idcardPhoto;
+                this.authInfoDetail.bankAccount = res.bankAccount;
+                this.authInfoDetail.address = res.address;
+                this.authInfoDetail.applyTime = res.applyTime;
+                this.showAuthDialog()
+                console.log(res)
+
+            },
+            getCurrentIndividualAuthenInfoFail(error){
+                this.hideLoading();
+                notify('error','获取个人认证信息出错:' + error.data);
+            },
+            getCurrentEnterpriseAuthInfoSuccess(){
+                this.hideLoading();
+                this.authInfoDetail.enterpriseName = res.enterpriseName;
+                this.authInfoDetail.legalPersonName = res.legalPersonName;
+                this.authInfoDetail.businessLicensePhoto = res.businessLicensePhoto;
+            },
+            getCurrentEnterpriseAuthInfoFail(){
+                this.hideLoading();
+                notify('error','获取企业认证信息出错:' + error.data);
+            },
+            getCurrentAgencyAuthInfoSuccess(){
+                this.hideLoading();
+                this.authInfoDetail.evaluationAgencyName = res.evaluationAgencyName;
+                this.authInfoDetail.evaluationAgencyAbilityList = res.evaluationAgencyAbilityList;
+                this.authInfoDetail.evaluationAgencyResourceList = res.evaluationAgencyResourceList;
+                this.authInfoDetail.agencyPhoto = res.agencyPhoto;
+                this.authInfoDetail.updateTime = res.updateTime;
+            },
+            getCurrentAgencyAuthInfoFail(){
+                this.hideLoading();
+                notify('error','获取机构认证信息出错:' + error.data);
+            }
+        }
     }
-  }
-}
 </script>
 
 <style scoped>
-  .image {
-    font-size: 150px;
-    text-align: center;
-    display: block;
-  }
+
 </style>

+ 138 - 0
src/components/authen/AuthenticationManage.vue

@@ -167,6 +167,7 @@
                     businessLicensePhoto:'',
                     unifiedSocialCreditCode:'',
 
+<<<<<<< HEAD
                     evaluationAgencyName:'',
                     evaluationAgencyAbilityList: [],
                     evaluationAgencyResourceList: [],
@@ -302,6 +303,143 @@
                 this.authInfoDetail.applyTime = res.applyTime;
                 this.showAuthDialog()
                 console.log(res)
+=======
+        evaluationAgencyName:'',
+        evaluationAgencyAbilityList: [],
+        evaluationAgencyResourceList: [],
+        agencyPhoto:'',
+        updateTime:'',
+        expireTime:''
+      }
+    }
+  },
+  mounted () {
+    this.$nextTick(() => {
+      this.init()
+    })
+  },
+  methods: {
+    init () {
+      this.getHandlingAuthList()
+      this.getHandledAuthList()
+    },
+    //获取所有未认证信息
+    getHandlingAuthList () {
+      this.showLoading()
+      getAllHandlingAuthInfo(this.getHandlingAuthListSuccess, this.getHandlingAuthListFail)
+    },
+    //获取所有已认证信息
+    getHandlingAuthListSuccess (res) {
+      this.handlingAuthList = res
+      this.hideLoading()
+    },
+    getHandlingAuthListFail (error) {
+      this.hideLoading()
+      notify('error', '获取认证信息失败:' + error.data)
+    },
+    getHandledAuthList () {
+      this.showLoading()
+      getAllHandledAuthInfo(this.getHandledAuthListSuccess, this.getHandledAuthListFail)
+    },
+    getHandledAuthListSuccess (res) {
+      this.handledAuthList = res
+      this.hideLoading()
+    },
+    getHandledAuthListFail (error) {
+      this.hideLoading()
+      notify('error', '获取已认证信息失败:' + error.data)
+    },
+    handleCurrentChange (param) {
+      console.log(param)
+    },
+    handleAuthenticationPass (userId, type) {
+      this.showLoading()
+      checkPassAuth(type, userId, this.handleAuthenticationPassSuccess, this.handleAuthenticationPassFail)
+      // item.status = this.authenticationStatusPass
+      // console.log('通过')
+    },
+    handleAuthenticationPassSuccess (res) {
+      this.hideLoading()
+      this.getHandlingAuthList()
+      console.log(res)
+    },
+    handleAuthenticationPassFail (error) {
+      this.hideLoading()
+      console.log(error)
+      notify('error', '通过失败:' + error.data)
+    },
+    handleAuthenticationReject (userId, type) {
+      this.$prompt('请输入驳回本申请的原因', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+      }).then((event) => {
+        const explain = event.value
+        console.log(explain)
+        this.showLoading()
+        const data = {
+          explain : event.value
+        }
+        checkRejectAuth(type, userId, data, this.handleAuthenticationRejectSuccess, this.handleAuthenticationRejectFail)
+      }).catch(() => {
+      })
+    },
+    handleAuthenticationRejectSuccess (res) {
+      this.hideLoading()
+      this.getHandlingAuthList()
+      notify('success','驳回成功')
+      console.log(res)
+    },
+    handleAuthenticationRejectFail (error) {
+      this.hideLoading()
+      console.log(error)
+      notify('error', '拒绝失败:' + error.data)
+    },
+    handleAuthDetail (userId, type) {
+      this.authInfoDetail.userId = userId
+      this.authInfoDetail.type = type
+      this.getAuthInfo(userId, type);
+    },
+    showLoading () {
+      this.loading = true
+    },
+    hideLoading () {
+      this.loading = false
+    },
+    reformTime (date) {
+      return getFormalTimeFromDate(date)
+    },
+    rowClassName ({row, rowIndex}) {
+      //把每一行的索引放进row.id
+      row.id = rowIndex + 1
+    },
+    showAuthDialog () {
+      this.showDialog = true
+    },
+    hideAuthDialog () {
+      this.showDialog = false
+    },
+    getAuthInfo(userId, type){
+        this.showLoading();
+        if(type == 'personal'){
+            getCurrentIndividualAuthenInfo(userId, this.getCurrentIndividualAuthenInfoSuccess, this.getCurrentIndividualAuthenInfoFail);
+        }else if(type == 'enterprise'){
+            getCurrentEnterpriseAuthInfo(userId, this.getCurrentEnterpriseAuthInfoSuccess, this.getCurrentEnterpriseAuthInfoFail);
+        }else if(type == 'agency'){
+            getCurrentAgencyAuthInfo(userId, this.getCurrentAgencyAuthInfoSuccess, this.getCurrentAgencyAuthInfoFail);
+        }
+    },
+    getCurrentIndividualAuthenInfoSuccess(res){
+        this.hideLoading();
+        console.log(res)
+        this.authInfoDetail.realName = res.realName;
+        this.authInfoDetail.IDCard = res.idcard;
+        this.authInfoDetail.IDCardPhoto = res.idcardPhoto;
+        this.authInfoDetail.bankAccount = res.bankAccount;
+        this.authInfoDetail.address = res.address;
+        this.authInfoDetail.applyTime = res.applyTime;
+        this.showAuthDialog()
+        console.log(res)
+>>>>>>> 4d2af0cbfe46452bfca62de1f97ed39a924cfdb5
 
             },
             getCurrentIndividualAuthenInfoFail(error){

+ 15 - 1
src/components/authen/EnterpriseAuthenticationCreate.vue

@@ -131,7 +131,21 @@ export default {
     submitInfoSuccess (res) {
       this.hideLoading()
       console.log(res)
-      notify('success', '认证信息上传成功')
+      this.$confirm('认证信息提交成功,将于10个工作日内审核完成')
+        .then(_ => {
+          //done()
+          this.$router.push({
+            name: 'EnterpriseAuthentication',
+            params: {userId: this.user.userVO.id}
+          })
+          this.hideDialog()
+        })
+        .catch(_ => {
+          this.$router.push({
+            name: 'EnterpriseAuthentication',
+            params: {userId: this.user.userVO.id}
+          })
+        })
     },
     submitInfoFail (error) {
       this.hideLoading()

+ 15 - 1
src/components/authen/IndividualAuthenticationCreate.vue

@@ -133,7 +133,21 @@ export default {
     submitInfoSuccess (res) {
       this.hideLoading()
       console.log(res)
-      notify('success', '认证信息上传成功')
+      this.$confirm('认证信息提交成功,将于10个工作日内审核完成')
+        .then(_ => {
+          //done()
+          this.$router.push({
+            name: 'IndividualAuthentication',
+            params: {userId: this.user.userVO.id}
+          })
+          this.hideDialog()
+        })
+        .catch(_ => {
+          this.$router.push({
+            name: 'IndividualAuthentication',
+            params: {userId: this.user.userVO.id}
+          })
+        })
     },
     submitInfoFail (error) {
       this.hideLoading()

+ 322 - 0
src/components/cheat/AgencyDetail.vue

@@ -0,0 +1,322 @@
+<template>
+  <div class="create-container">
+    <div class="create-body">
+      <div class="title">修改能力和资源</div>
+      <el-form v-loading="loading" :model="agency" :rules="rules" ref="agency" label-width="12%" class="demo-report">
+        <el-form-item prop="file" label="机构logo">
+          <span>
+          <el-image
+            style="width: 100px;"
+            :src="agency.agencyPhoto"
+            fit="scale-down"></el-image>
+        </span>
+        </el-form-item>
+        <el-form-item label="机构名称" prop="name">
+          <!--<el-input size="small" v-if="isModifyMode" v-model="agency.name"></el-input>-->
+          <span>{{agency.evaluationAgencyName}}</span>
+        </el-form-item>
+        <el-form-item size="small" label="机构账户" prop="bankAccount">
+          <!--<el-input v-if="isModifyMode" v-model="agency.bankAccount"></el-input>-->
+          <span>{{agency.bankAccount}}</span>
+        </el-form-item>
+        <el-form-item size="small" label="机构地址" prop="address">
+          <!--<el-input v-if="isModifyMode" v-model="agency.address"></el-input>-->
+          <span>{{agency.address}}</span>
+        </el-form-item>
+        <el-form-item label="机构能力" prop="evaluationAgencyAbilityList">
+          <el-checkbox-group v-if="isModifyMode" v-model="agency.evaluationAgencyAbilityList">
+            <span v-for="(item,index) in serviceTypes" :key="index">
+              <el-checkbox :label="item"
+                           name="evaluationAgencyAbilityList">{{item}}&nbsp;&nbsp;&nbsp;&nbsp;</el-checkbox>
+            </span>
+          </el-checkbox-group>
+          <span v-if="!isModifyMode">
+            <span v-for="(item,index) in agency.evaluationAgencyAbilityList" :key="index">
+              <el-tag>{{item}}</el-tag>&nbsp;
+            </span>
+          </span>
+        </el-form-item>
+        <el-form-item label="机构资源" prop="resource">
+          <span v-if="isModifyMode" v-for="item in agency.evaluationAgencyResourceList" :key="item.id">
+            资源类型:&nbsp;<el-select size="small" v-model="item.type" placeholder="请选择"
+                                  style="width: 15%;margin-bottom: 10px"
+                                  :value="item.type">
+              <el-option
+                v-for="item in resourceTypes"
+                :key="item"
+                :label="item"
+                :value="item">
+              </el-option>
+            </el-select>
+            资源名称:&nbsp;<el-input size="small" v-model="item.name" style="width: 15%"></el-input>
+            总量:&nbsp;<el-input-number size="small" :min="0" v-model="item.totalNum"></el-input-number>
+            可用数量:&nbsp;<el-input-number size="small" :min="0" :max="item.totalNum"
+                                        v-model="item.availableNum"></el-input-number>
+            <el-button size="small" type="danger" icon="el-icon-delete"
+                       @click="removeAgencyResource(item.id)"></el-button>
+            <br/>
+          </span>
+          <el-button v-if="isModifyMode" type="primary" icon="el-icon-circle-plus" plain size="mini"
+                     @click="addAgencyResource">添加资源
+          </el-button>
+          <span v-if="!isModifyMode" v-for="item in agency.evaluationAgencyResourceList" :key="item.id">
+            资源类型:{{item.type}};&nbsp;&nbsp;资源名称:{{item.name}};&nbsp;&nbsp;资源总量:{{item.totalNum}};&nbsp;&nbsp;可用资源:{{item.availableNum}}<br/>
+          </span>
+        </el-form-item>
+
+        <!--<el-form-item v-if="!isModifyMode">-->
+        <!--<div class="btn btn-medium btn-info" @click="modifyInfo()">修改</div>-->
+        <!--<div class="btn btn-medium" @click="cancelModify()">返回</div>-->
+        <!--</el-form-item>-->
+        <el-form-item>
+          <el-button v-if="isModifyMode" type="primary" size="small" @click="submitInfo()">提交</el-button>
+          <el-button v-if="isModifyMode" type="info" size="small" @click="cancelModify()">取消</el-button>
+          <el-button v-if="!isModifyMode" type="primary" size="small" @click="modifyInfo()">修改</el-button>
+          <!--<div class="btn btn-primary" @click="cancelModify()">取消</div>-->
+        </el-form-item>
+      </el-form>
+    </div>
+  </div>
+</template>
+
+<script>
+import {notify} from '@/constants/index'
+import {
+  getAllAbilities,
+  getAllAgencyResourceTypes,
+  getCurrentAgencyAuthInfo,
+  storageGet,
+  updateAgencyResourceAndAbility
+} from '@/js/index'
+
+export default {
+  name: 'Agency',
+  data () {
+    return {
+      user: {},
+      userId: 0,
+      loading: false,
+      isModifyMode: false,
+      dialogVisible: false,
+      serviceTypes: [],
+      resourceTypes: [],
+      agency: {
+        evaluationAgencyName: '',
+        bankAccount: '',
+        address: '',
+        evaluationAgencyAbilityList: [],
+        evaluationAgencyResourceList: [
+          {
+            id: 0,
+            type: '',
+            name: '',
+            totalNum: 0,
+            availableNum: 0,
+          }
+        ],
+        agencyPhoto: '',
+      },
+      rules: {
+        evaluationAgencyAbilityList: [
+          {type: 'array', required: true, message: '请至少选择一个机构能力', trigger: 'change'}
+          // { min: 3, max: 5, message: "长度在 3 到 5 个字符", trigger: "blur" }
+        ],
+        evaluationAgencyResourceList: [
+          {
+            validator: (rule, value, callback) => {
+              console.log(value)
+              if (true) {
+                callback()
+              } else {
+                callback()
+              }
+            }, trigger: 'change'
+          },
+        ]
+      },
+    }
+  },
+  mounted () {
+    this.$nextTick(() => {
+      this.init()
+    })
+  },
+  methods: {
+    //初始化
+    init () {
+      this.setServiceTypes()
+      this.setResourceTypes()
+      this.setUserInfo()
+      this.getAgencyInfo()
+    },
+    getAgencyInfo () {
+      this.showLoading()
+      getCurrentAgencyAuthInfo(this.user.userVO.id, this.getAgencyInfoSuccess, this.getAgencyInfoFail)
+    },
+    getAgencyInfoSuccess (res) {
+      this.hideLoading()
+      this.agency.evaluationAgencyName = res.evaluationAgencyName
+      this.agency.bankAccount = res.bankAccount
+      this.agency.address = res.address
+      this.agency.evaluationAgencyAbilityList = res.evaluationAgencyAbilityList
+      this.agency.evaluationAgencyResourceList = res.evaluationAgencyResourceList
+      this.agency.agencyPhoto = res.agencyPhoto
+    },
+    getAgencyInfoFail (error) {
+      this.hideLoading()
+      notify('error', '获取机构信息失败:' + error.data)
+    },
+    //表单进入可编辑状态,可修改表单,不再使用
+    modifyInfo () {
+      this.isModifyMode = true
+    },
+    //提交表单
+    submitInfo () {
+      this.showLoading()
+      const data = {
+        evaluationAgencyAbilityList: this.agency.evaluationAgencyAbilityList,
+        evaluationAgencyResourceList: this.agency.evaluationAgencyResourceList
+      }
+      updateAgencyResourceAndAbility(this.user.userVO.id, data, this.submitInfoSuccess, this.submitInfoFail)
+    },
+    submitInfoSuccess (res) {
+      this.hideLoading()
+      notify('success', '修改成功')
+      this.cancelModify()
+    },
+    submitInfoFail (error) {
+      this.hideLoading()
+      notify('error', '修改资源能力失败:' + error.data)
+    },
+    //取消修改表单,表单进入不可编辑状态,不再使用
+    cancelModify () {
+      this.isModifyMode = false
+    },
+    //TODO 跳转到登录页面
+    toLogin () {
+      this.hideDialog()
+      this.$router.push({
+        name: 'Home',
+        // params: {projectId: projectId, taskId: taskId}
+      })
+    },
+    //设置服务类型
+    setServiceTypes () {
+      this.serviceTypes = getAllAbilities()
+    },
+    //添加一项测评机构资源
+    addAgencyResource () {
+      const tmpResource = {
+        id: this.agency.evaluationAgencyResourceList.length,
+        type: this.resourceTypes[0],
+        name: '',
+        totalNum: 0,
+        availableNum: 0,
+      }
+      this.agency.evaluationAgencyResourceList.push(tmpResource)
+    },
+    //删除一项测评机构资源
+    removeAgencyResource (id) {
+      this.agency.evaluationAgencyResourceList.splice(id, 1)
+      for (var i = 0; i < this.agency.evaluationAgencyResourceList.length; i++) {
+        this.agency.evaluationAgencyResourceList[i].id = i
+      }
+    },
+    //设置测评机构资源类型
+    setResourceTypes () {
+      this.resourceTypes = getAllAgencyResourceTypes()
+    },
+    //检测测评机构资源填写是否有效
+    checkAgencyResourceVaild () {
+      if (this.agency.evaluationAgencyResourceList.length === 0) {
+        return true
+      }
+      for (var i = 0; i < this.agency.evaluationAgencyResourceList.length; i++) {
+        const item = this.agency.evaluationAgencyResourceList[i]
+        if (item.type === '') {
+          notify('error', '资源类型不能为空')
+          return false
+        }
+        if (item.name === '') {
+          notify('error', '资源名称不能为空')
+          return false
+        }
+        if (item.totalNum < item.availableNum) {
+          notify('error', '资源总数量不能低于可用数量')
+          return false
+        }
+      }
+      return true
+    },
+    //获取用户信息
+    setUserInfo () {
+      this.user = storageGet('user')
+    },
+    //显示loading
+    showLoading () {
+      this.loading = true
+    },
+    //隐藏loading
+    hideLoading () {
+      this.loading = false
+    }
+  },
+  created: function () {
+  }
+}
+</script>
+
+<style scoped>
+  .el-radio {
+    margin: 10px 20px 10px 0;
+  }
+
+  .el-form-item /deep/ .el-tabs__content {
+    max-height: 120px !important;
+    overflow: auto;
+  }
+
+  .el-row {
+    margin-bottom: 10px;
+  }
+
+  .el-input {
+    width: 400px;
+  }
+
+  .avatar-uploader .el-upload {
+    border: 1px dashed #d9d9d9;
+    border-radius: 6px;
+    cursor: pointer;
+    position: relative;
+    overflow: hidden;
+  }
+
+  .avatar-uploader .el-upload:hover {
+    border-color: #409EFF;
+  }
+
+  .avatar-uploader-icon {
+    font-size: 28px;
+    color: #8c939d;
+    width: 178px;
+    height: 178px;
+    line-height: 178px;
+    text-align: center;
+    border: 1px dashed #d9d9d9;
+    border-radius: 6px;
+    cursor: pointer;
+    position: relative;
+    overflow: hidden;
+  }
+
+  .avatar {
+    width: 178px;
+    height: 178px;
+    display: block;
+  }
+
+  .el-input-number {
+    width: 150px;
+  }
+</style>

+ 24 - 9
src/components/commons/Header.vue

@@ -104,7 +104,14 @@
                   </el-link>
                 </router-link>
               </el-dropdown-item>
-              <el-dropdown-item v-if="user.authStatus.text == '未实名认证'">
+              <el-dropdown-item v-if="user.authStatus.text == '审核通过' && user.userVO.authType=='agency'">
+                <router-link :to="{ name: 'Agency',params:{userId:user.userVO.id}}">
+                  <el-link icon="el-icon-edit" :underline="false">
+                    修改机构信息
+                  </el-link>
+                </router-link>
+              </el-dropdown-item>
+              <el-dropdown-item v-if="user.authStatus.text == '未实名认证' && !rolesPermissions.isSystemAdministrator">
                 <router-link :to="{ name: 'AuthenticationIndex'}">
                   <el-link type="info" icon="el-icon-warning-outline" :underline="false">
                     未实名认证
@@ -388,7 +395,7 @@ export default {
           'isSystemAdministrator': false
         })
         console.log('本地没有用户信息,开始加载用户信息')
-        getCurrentUser().then((res) => {
+        getCurrentUser().then((res)=>{
           console.log(res)
           storageSave('user', res)
           this.user = res
@@ -397,14 +404,9 @@ export default {
           console.log('用户信息加载成功')
           this.isLogin = true
           this.fullScreenLoading = false
-        }).catch(error => {
+        }).catch((error)=>{
           console.log('用户信息加载失败')
           this.fullScreenLoading = false
-          // if (error.status == 401) {
-          //   notify('warning', error.data)
-          // } else {
-          //   notify('error', error.data)
-          // }
         })
       } else {
         this.user = storageGet('user')
@@ -412,8 +414,21 @@ export default {
         this.isLogin = true
       }
     },
+    getCurrentUserSuccess (res) {
+      console.log(res)
+      storageSave('user', res)
+      this.user = res
+      this.rolesPermissions = getRolesPermissions(res.roleList)
+      storageSave('rolesPermissions', getRolesPermissions(res.roleList))
+      console.log('用户信息加载成功')
+      this.isLogin = true
+      this.fullScreenLoading = false
+    },
+    getCurrentUserFail (error) {
+      console.log('用户信息加载失败')
+      this.fullScreenLoading = false
+    },
     userLogout () {
-      console.log('ee')
       this.isLogin = false
       logout().then((res) => {
         this.$router.push({

+ 231 - 172
src/components/project/Project.vue

@@ -2,199 +2,208 @@
   <div class="create-container" v-loading="loading">
     <div class="title h1" v-if="!isModifyMode">项目</div>
     <div class="create-body">
-      <div class="title h2" v-if="!isModifyMode">基本信息</div>
-      <div v-if="!isModifyMode" class="el-form-item">
-        <label class="el-form-item__label" style="width: 12%;">编号</label>
-        <div class="el-form-item__content" style="margin-left: 12%;">
-          <div>{{projectId}}</div>
-        </div>
-      </div>
-      <el-form :model="project" :rules="rules" ref="project" label-width="12%" class="demo-project">
-        <el-form-item label="项目名称" prop="name">
-          <el-input size="small" v-if="isModifyMode" v-model="project.name"></el-input>
-          <span v-if="!isModifyMode">{{project.name}}</span>
-        </el-form-item>
+      <el-row type="flex" align="middle" justify="start">
+        <el-col :span="15">
+          <div class="title h2" v-if="!isModifyMode">基本信息</div>
+          <div v-if="!isModifyMode" class="el-form-item">
+            <label class="el-form-item__label" style="width: 30%;">编号</label>
+            <div class="el-form-item__content" style="margin-left: 30%;">
+              <div>{{projectId}}</div>
+            </div>
+          </div>
+          <el-form :model="project" :rules="rules" ref="project" label-width="30%" class="demo-project">
+            <el-form-item label="项目名称" prop="name">
+              <el-input size="small" v-if="isModifyMode" v-model="project.name"></el-input>
+              <span v-if="!isModifyMode">{{project.name}}</span>
+            </el-form-item>
 
-        <el-form-item size="small" label="联系人" prop="contactName">
-          <el-input v-if="isModifyMode" v-model="project.contactName" placeholder="请输入联系人姓名"></el-input>
-          <span v-if="!isModifyMode">{{project.contactName}}</span>
-        </el-form-item>
-        <el-form-item size="small" label="联系人电话" prop="contactPhone">
-          <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="budget">
-          <el-input v-if="isModifyMode" type="number" v-model="project.budget">
-            ¥
-            <template slot="append"></template>
-          </el-input>
-          <span v-if="!isModifyMode">{{project.budget}}¥</span>
-        </el-form-item>
-        <el-form-item v-if="!isModifyMode" size="small" label="状态" prop="status">
-          <span v-if="!isModifyMode">{{project.status==1?'等待接收':(project.status==2?'已被接收':(project.status==3?'项目已提交':'项目已结束'))}}</span>
-        </el-form-item>
-        <el-form-item label="需求描述">
-          <el-input style="width: 400px" autosize v-if="isModifyMode" type="textarea" v-model="project.desc"></el-input>
-          <span v-if="!isModifyMode">{{project.desc}}</span>
-        </el-form-item>
-        <!--<el-form-item label="价格" prop="price">-->
-        <!--<el-input v-if="isModifyMode" type="number" v-model="project.price">-->
-        <!--<template slot="append">¥</template>-->
-        <!--</el-input>-->
-        <!--<span v-if="!isModifyMode">{{project.price}}¥</span>-->
-        <!--</el-form-item>-->
-        <el-form-item label="平台" prop="platform">
-          <el-checkbox-group v-if="isModifyMode" v-model="project.platform">
+            <el-form-item size="small" label="联系人" prop="contactName">
+              <el-input v-if="isModifyMode" v-model="project.contactName" placeholder="请输入联系人姓名"></el-input>
+              <span v-if="!isModifyMode">{{project.contactName}}</span>
+            </el-form-item>
+            <el-form-item size="small" label="联系人电话" prop="contactPhone">
+              <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="budget">
+              <el-input v-if="isModifyMode" type="number" v-model="project.budget">
+                ¥
+                <template slot="append"></template>
+              </el-input>
+              <span v-if="!isModifyMode">{{project.budget}}¥</span>
+            </el-form-item>
+            <el-form-item v-if="!isModifyMode" size="small" label="状态" prop="status">
+              <span v-if="!isModifyMode">{{project.status==1?'等待接收':(project.status==2?'已被接收':(project.status==3?'项目已提交':'项目已结束'))}}</span>
+            </el-form-item>
+            <el-form-item label="需求描述">
+              <el-input style="width: 400px" autosize v-if="isModifyMode" type="textarea"
+                        v-model="project.desc"></el-input>
+              <span v-if="!isModifyMode">{{project.desc}}</span>
+            </el-form-item>
+            <!--<el-form-item label="价格" prop="price">-->
+            <!--<el-input v-if="isModifyMode" type="number" v-model="project.price">-->
+            <!--<template slot="append">¥</template>-->
+            <!--</el-input>-->
+            <!--<span v-if="!isModifyMode">{{project.price}}¥</span>-->
+            <!--</el-form-item>-->
+            <el-form-item label="平台" prop="platform">
+              <el-checkbox-group v-if="isModifyMode" v-model="project.platform">
             <span v-for="(item,index) in platforms" :key="index">
               <el-checkbox :label="item">{{ item }}&nbsp;&nbsp;&nbsp;&nbsp;</el-checkbox>
             </span>
-          </el-checkbox-group>
-          <span
-            v-if="!isModifyMode"
-            class="badge"
-            v-for="item in project.platform"
-          >{{item}}</span>
-        </el-form-item>
-        <el-form-item label="服务类型" prop="type">
-          <el-checkbox-group v-if="isModifyMode" v-model="project.type">
+              </el-checkbox-group>
+              <span
+                v-if="!isModifyMode"
+                class="badge"
+                v-for="item in project.platform"
+              >{{item}}</span>
+            </el-form-item>
+            <el-form-item label="服务类型" prop="type">
+              <el-checkbox-group v-if="isModifyMode" v-model="project.type">
             <span v-for="(item,index) in serviceType" :key="index">
               <el-checkbox :label="item" name="type">{{ item }}&nbsp;&nbsp;</el-checkbox>
             </span>
-          </el-checkbox-group>
-          <span v-if="!isModifyMode" class="badge" v-for="item in project.type">{{item}}</span>
-        </el-form-item>
-        <!--<el-form-item label="用途" prop="usage">-->
-        <!--<el-input v-if="isModifyMode" v-model="project.usage"></el-input>-->
-        <!--<span v-if="!isModifyMode">{{project.usage}}</span>-->
-        <!--</el-form-item>-->
+              </el-checkbox-group>
+              <span v-if="!isModifyMode" class="badge" v-for="item in project.type">{{item}}</span>
+            </el-form-item>
+            <!--<el-form-item label="用途" prop="usage">-->
+            <!--<el-input v-if="isModifyMode" v-model="project.usage"></el-input>-->
+            <!--<span v-if="!isModifyMode">{{project.usage}}</span>-->
+            <!--</el-form-item>-->
 
 
-        <el-form-item label="项目可见性" prop="resource">
-          <div v-if="!isModifyMode">
-            <div v-if="project.resource=='1'">{{updateLocation(project.location)}}</div>
-            <div v-if="project.resource=='0'">{{project.institution==null?'暂未被接收':project.institution}}</div>
-            <div v-if="project.resource=='2'">{{resourceType[project.resource]}}</div>
-          </div>
-          <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-tab-pane>
-            <el-tab-pane :label="resourceType[1]" name="1">
-              <provincecity
-                ref="addFormProvince"
-                @selectChange="locationChange"
-                :provinceCode="project.location==null?'3200':project.location.provinceCode"
-                :cityCode="project.location==null?'3201':project.location.cityCode"
-              ></provincecity>
-            </el-tab-pane>
-            <el-tab-pane :label="resourceType[2]" name="2"></el-tab-pane>
-          </el-tabs>
-        </el-form-item>
+            <el-form-item label="项目可见性" prop="resource">
+              <div v-if="!isModifyMode">
+                <div v-if="project.resource=='1'">{{updateLocation(project.location)}}</div>
+                <div v-if="project.resource=='0'">{{project.institution==null?'暂未被接收':project.institution}}</div>
+                <div v-if="project.resource=='2'">{{resourceType[project.resource]}}</div>
+              </div>
+              <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-tab-pane>
+                <el-tab-pane :label="resourceType[1]" name="1">
+                  <provincecity
+                    ref="addFormProvince"
+                    @selectChange="locationChange"
+                    :provinceCode="project.location==null?'3200':project.location.provinceCode"
+                    :cityCode="project.location==null?'3201':project.location.cityCode"
+                  ></provincecity>
+                </el-tab-pane>
+                <el-tab-pane :label="resourceType[2]" name="2"></el-tab-pane>
+              </el-tabs>
+            </el-form-item>
 
-        <el-form-item label="需求文档" prop="doc">
-          <el-upload
-            style="width: 400px"
-            v-if="isModifyMode"
-            drag
-            class="upload-demo"
-            action=""
-            :on-remove="handleRemove"
-            :before-remove="beforeRemove"
-            :limit="1"
-            :on-exceed="handleExceed"
-            :before-upload="beforeFileUpload"
-            :http-request="uploadRequireDoc"
-            :file-list="project.doc"
-          >
-            <i class="el-icon-upload"></i>
-            <div class="el-upload__text">
-              将文件拖到此处,或
-              <em>点击上传</em>
-            </div>
-          </el-upload>
-          <span v-if="!isModifyMode">
+            <el-form-item label="需求文档" prop="doc">
+              <el-upload
+                style="width: 400px"
+                v-if="isModifyMode"
+                drag
+                class="upload-demo"
+                action=""
+                :on-remove="handleRemove"
+                :before-remove="beforeRemove"
+                :limit="1"
+                :on-exceed="handleExceed"
+                :before-upload="beforeFileUpload"
+                :http-request="uploadRequireDoc"
+                :file-list="project.doc"
+              >
+                <i class="el-icon-upload"></i>
+                <div class="el-upload__text">
+                  将文件拖到此处,或
+                  <em>点击上传</em>
+                </div>
+              </el-upload>
+              <span v-if="!isModifyMode">
             <a :href="project.requireDocUrl" v-if="project.requireDocUrl!=null && project.requireDocUrl!=''"><el-link
               :underline="false" type="primary"><i
               class="el-icon-document"></i>下载文档</el-link></a>
             <i v-if="project.requireDocUrl==null || project.requireDocUrl==''" class="el-icon-document">暂无文档</i>
           </span>
-        </el-form-item>
-        <el-form-item label="安装包" prop="file">
-          <el-upload
-            style="width: 400px"
-            v-if="isModifyMode"
-            drag
-            class="upload-demo"
-            action=""
-            :on-remove="handleRemove"
-            :before-remove="beforeRemove"
-            :limit="1"
-            :on-exceed="handleExceed"
-            :before-upload="beforeApkUpload"
-            :http-request="uploadApkFile"
-            :file-list="project.file"
-          >
-            <i class="el-icon-upload"></i>
-            <div class="el-upload__text">
-              将文件拖到此处,或
-              <em>点击上传</em>
-            </div>
-          </el-upload>
-          <span v-if="!isModifyMode">
+            </el-form-item>
+            <el-form-item label="安装包" prop="file">
+              <el-upload
+                style="width: 400px"
+                v-if="isModifyMode"
+                drag
+                class="upload-demo"
+                action=""
+                :on-remove="handleRemove"
+                :before-remove="beforeRemove"
+                :limit="1"
+                :on-exceed="handleExceed"
+                :before-upload="beforeApkUpload"
+                :http-request="uploadApkFile"
+                :file-list="project.file"
+              >
+                <i class="el-icon-upload"></i>
+                <div class="el-upload__text">
+                  将文件拖到此处,或
+                  <em>点击上传</em>
+                </div>
+              </el-upload>
+              <span v-if="!isModifyMode">
             <a v-if="project.fileUrl!=null && project.fileUrl!=''" :href="project.fileUrl"><el-link :underline="false"
                                                                                                     type="primary"><i
               class="el-icon-document"></i>下载文件</el-link></a>
             <i v-if="project.fileUrl==null || project.fileUrl==''" class="el-icon-document">暂无文件</i>
           </span>
-        </el-form-item>
-        <el-form-item label="项目截止时间" prop="datetime">
-          <div class="block" v-if="isModifyMode">
-            <el-date-picker
-              size="small"
-              v-model="project.datetime"
-              type="datetime"
-              placeholder="选择截止时间"
-              align="right"
-              :picker-options="pickerOptions"
-            ></el-date-picker>
-          </div>
-          <span v-if="!isModifyMode">{{reformDate(new Date(project.datetime))}}</span>
-        </el-form-item>
-        <el-form-item v-if="isModifyMode">
-          <div class="btn btn-small btn-info" @click="submitForm('project')">确认修改</div>
-          <div class="btn btn-small" @click="resetForm('project')">重置</div>
-          <div class="btn btn-small" @click="cancelMode('project')">取消</div>
-        </el-form-item>
-        <el-form-item v-if="!isModifyMode">
+            </el-form-item>
+            <el-form-item label="项目截止时间" prop="datetime">
+              <div class="block" v-if="isModifyMode">
+                <el-date-picker
+                  size="small"
+                  v-model="project.datetime"
+                  type="datetime"
+                  placeholder="选择截止时间"
+                  align="right"
+                  :picker-options="pickerOptions"
+                ></el-date-picker>
+              </div>
+              <span v-if="!isModifyMode">{{reformDate(new Date(project.datetime))}}</span>
+            </el-form-item>
+            <el-form-item v-if="isModifyMode">
+              <div class="btn btn-small btn-info" @click="submitForm('project')">确认修改</div>
+              <div class="btn btn-small" @click="resetForm('project')">重置</div>
+              <div class="btn btn-small" @click="cancelMode('project')">取消</div>
+            </el-form-item>
+            <el-form-item v-if="!isModifyMode">
 
-          <el-button v-if="projectOperationControl.confirmFinish" type="success" size="mini" @click="endProject()">
-            结束项目
-          </el-button>
-          <el-button v-if="projectOperationControl.finish" type="primary" size="mini" @click="submitProjectRequest()">
-            提交项目
-          </el-button>
-          <el-button v-if="projectOperationControl.receive" type="primary" size="mini" @click="receiveProject()">
-            接受项目
-          </el-button>
-          <el-button v-if="projectOperationControl.reject" type="danger" size="mini" @click="rejectProject()">
-            拒绝项目
-          </el-button>
-          <el-button v-if="projectOperationControl.update" type="primary" size="mini" @click="modifyForm()">
-            修改项目
-          </el-button>
-          <el-button v-if="projectOperationControl.createTask" type="primary" size="mini" @click="createNewTask()">
-            新建任务
-          </el-button>
-          <el-button v-if="projectOperationControl.uploadReport" type="primary" size="mini" @click="createReport()">
-            上传报告
-          </el-button>
-        </el-form-item>
-      </el-form>
+              <el-button v-if="projectOperationControl.confirmFinish" type="success" size="mini" @click="endProject()">
+                结束项目
+              </el-button>
+              <el-button v-if="projectOperationControl.finish" type="primary" size="mini"
+                         @click="submitProjectRequest()">
+                提交项目
+              </el-button>
+              <el-button v-if="projectOperationControl.receive" type="primary" size="mini" @click="receiveProject()">
+                接受项目
+              </el-button>
+              <el-button v-if="projectOperationControl.reject" type="danger" size="mini" @click="rejectProject()">
+                拒绝项目
+              </el-button>
+              <el-button v-if="projectOperationControl.update" type="primary" size="mini" @click="modifyForm()">
+                修改项目
+              </el-button>
+              <el-button v-if="projectOperationControl.createTask" type="primary" size="mini" @click="createNewTask()">
+                新建任务
+              </el-button>
+              <el-button v-if="projectOperationControl.uploadReport" type="primary" size="mini" @click="createReport()">
+                上传报告
+              </el-button>
+            </el-form-item>
+          </el-form>
+
+        </el-col>
+        <el-col :span="5" id="pieImage" style="height: 500px;min-width: 500px">
+        </el-col>
+      </el-row>
     </div>
     <div class="create-body" v-if="!isModifyMode">
       <div class="title h2">任务列表</div>
@@ -262,6 +271,7 @@ import Apis from '@/js/api.js'
 import ResourceType from '@/constants/enum/resource-type'
 import provincecity from '@/components/commons/ProvinceCity'
 import {notify} from '@/constants/index'
+import echarts from 'echarts'
 import {
   checkFileType,
   ensureEndProject,
@@ -335,6 +345,7 @@ export default {
         status: ''
       },
       task: [],
+      progress: [],
       reportList: [],
       pickerOptions: {
         shortcuts: [
@@ -484,6 +495,52 @@ export default {
       //   this.platformType.push(PlatformType[item])
       // })
     },
+    //画个饼
+    setEcharts () {
+      // 基于准备好的dom,初始化echarts实例
+      let myChart = echarts.init(document.getElementById('pieImage'))
+      // 绘制图表
+      var option = {
+        tooltip: {
+          trigger: 'item',
+          formatter: '{a} <br/>{b}: {c} ({d}%)'
+        },
+        legend: {
+          orient: 'vertical',
+          x: 'left',
+          data: ['已完成', '进行中']
+        },
+        series: [
+          {
+            name: '任务状态',
+            type: 'pie',
+            radius: ['50%', '70%'],
+            avoidLabelOverlap: false,
+            label: {
+              normal: {
+                show: false,
+                position: 'center'
+              },
+              emphasis: {
+                show: true,
+                textStyle: {
+                  fontSize: '30',
+                  fontWeight: 'bold'
+                }
+              }
+            },
+            labelLine: {
+              normal: {
+                show: false
+              }
+            },
+            data: this.progress,
+            color:['#909399','#409EFF']
+          }
+        ]
+      }
+      myChart.setOption(option)
+    },
     //提交修改
     submitForm (formName) {
       this.$refs['project'].validate(valid => {
@@ -761,7 +818,9 @@ export default {
         this.task = res.taskList
         this.reportList = res.reportList
         this.projectOperationControl = res.projectOperationControl
+        this.progress = res.progress
         this.hideLoading()
+        this.setEcharts()
       }).catch((error) => {
         this.hideLoading()
         notify('error', error.data)

+ 1 - 0
src/js/api.js

@@ -52,6 +52,7 @@ export default {
     UPDATE_INDIVIDUAL_AUTHENTICATION_INFO: '/api/user/{userId}/personalAuth',
     UPDATE_ENTERPRISE_AUTHENTICATION_INFO: '/api/user/{userId}/enterpriseAuth',
     UPDATE_AGENCY_AUTHENTICATION_INFO: '/api/user/{userId}/agency/',
+    UPDATE_AGENCY_RESOURCE_AND_ABILITY:'/api/user/{userId}/agency/resource',
     GET_INDIVIDUAL_AUTHENTICATION_INFO: '/api/user/{userId}/personalAuth',
     GET_ENTERPRISE_AUTHENTICATION_INFO: '/api/user/{userId}/enterpriseAuth',
     GET_AGENCY_AUTHENTICATION_INFO: '/api/user/{userId}/agency',

+ 2 - 0
src/js/index.js

@@ -18,6 +18,7 @@ import {
   uploadAgencyAuthenticationInfo,
   uploadEnterpriseAuthenticationInfo,
   uploadIndividualAuthenticationInfo,
+  updateAgencyResourceAndAbility
 } from './userService'
 import {
   createProject,
@@ -105,6 +106,7 @@ export {
   getCurrentAgencyAuthInfo,
   checkPassAuth,
   checkRejectAuth,
+  updateAgencyResourceAndAbility
 }
 export {
   /*******************************************************************************/

+ 26 - 14
src/js/userService.js

@@ -1,7 +1,7 @@
 import Http from './http'
 import Apis from './api'
 //获取用户信息
-export const getCurrentUser = () => {
+export const getCurrentUser = (getCurrentUserSuccess, getCurrentUserFail) => {
   // const data = {
   //   userVO: {
   //     id: 3,
@@ -17,6 +17,11 @@ export const getCurrentUser = () => {
   //   resolve(data)
   // })
   return Http.get(Apis.USER.GET_CURRENT_USER)
+  // Http.get(Apis.USER.GET_CURRENT_USER).then((res) => {
+  //   getCurrentUserSuccess(res)
+  // }).catch((error) => {
+  //   getCurrentUserFail(error)
+  // })
 }
 //
 export const getRolesPermissions = (roleList) => {
@@ -238,6 +243,13 @@ export const updateAgencyAuthInfo = (userId, authInfo, updateAgencyAuthInfoSucce
     updateAgencyAuthInfoFail(error)
   })
 }
+export const updateAgencyResourceAndAbility = (userId, authInfo, updateAgencyResourceAndAbilitySuccess, updateAgencyResourceAndAbilityFail) => {
+  Http.post(Apis.USER.UPDATE_AGENCY_RESOURCE_AND_ABILITY.replace('{userId}', userId), authInfo).then((res) => {
+    updateAgencyResourceAndAbilitySuccess(res)
+  }).catch((error) => {
+    updateAgencyResourceAndAbilityFail(error)
+  })
+}
 export const updateEnterpriseAuthInfo = (userId, authInfo, updateEnterpriseAuthInfoSuccess, updateEnterpriseAuthInfoFail) => {
   // const data = {}
   // return new Promise((resolve) => {
@@ -252,46 +264,46 @@ export const updateEnterpriseAuthInfo = (userId, authInfo, updateEnterpriseAuthI
 
 export const checkPassAuth = (type, userId, checkPassAuthSuccess, checkPassAuthFail) => {
   if (type == 'agency') {
-    Http.put(Apis.USER.PASS_AGENCY_AUTH.replace('{userId}',userId),{}).then((res)=>{
+    Http.put(Apis.USER.PASS_AGENCY_AUTH.replace('{userId}', userId), {}).then((res) => {
       checkPassAuthSuccess(res)
-    }).catch((error)=>{
+    }).catch((error) => {
       checkPassAuthFail(error)
     })
   }
   if (type == 'personal') {
-    Http.put(Apis.USER.PASS_INDIVIDUAL_AUTH.replace('{userId}',userId),{}).then((res)=>{
+    Http.put(Apis.USER.PASS_INDIVIDUAL_AUTH.replace('{userId}', userId), {}).then((res) => {
       checkPassAuthSuccess(res)
-    }).catch((error)=>{
+    }).catch((error) => {
       checkPassAuthFail(error)
     })
   }
   if (type == 'enterprise') {
-    Http.put(Apis.USER.PASS_ENTERPRISE_AUTH.replace('{userId}',userId),{}).then((res)=>{
+    Http.put(Apis.USER.PASS_ENTERPRISE_AUTH.replace('{userId}', userId), {}).then((res) => {
       checkPassAuthSuccess(res)
-    }).catch((error)=>{
+    }).catch((error) => {
       checkPassAuthFail(error)
     })
   }
 }
-export const checkRejectAuth = (type, userId, checkRejectAuthSuccess, checkRejectAuthFail) => {
+export const checkRejectAuth = (type, userId, data, checkRejectAuthSuccess, checkRejectAuthFail) => {
   if (type == 'agency') {
-    Http.put(Apis.USER.REJECT_INDIVIDUAL_AUTH.replace('{userId}',userId),{}).then((res)=>{
+    Http.put(Apis.USER.REJECT_INDIVIDUAL_AUTH.replace('{userId}', userId), data).then((res) => {
       checkRejectAuthSuccess(res)
-    }).catch((error)=>{
+    }).catch((error) => {
       checkRejectAuthFail(error)
     })
   }
   if (type == 'personal') {
-    Http.put(Apis.USER.REJECT_INDIVIDUAL_AUTH.replace('{userId}',userId),{}).then((res)=>{
+    Http.put(Apis.USER.REJECT_INDIVIDUAL_AUTH.replace('{userId}', userId), data).then((res) => {
       checkRejectAuthSuccess(res)
-    }).catch((error)=>{
+    }).catch((error) => {
       checkRejectAuthFail(error)
     })
   }
   if (type == 'enterprise') {
-    Http.put(Apis.USER.REJECT_ENTERPRISE_AUTH.replace('{userId}',userId),{}).then((res)=>{
+    Http.put(Apis.USER.REJECT_ENTERPRISE_AUTH.replace('{userId}', userId), data).then((res) => {
       checkRejectAuthSuccess(res)
-    }).catch((error)=>{
+    }).catch((error) => {
       checkRejectAuthFail(error)
     })
   }

+ 2 - 0
src/main.js

@@ -59,7 +59,9 @@ import {
   Tooltip,
   Upload,
 } from 'element-ui'
+function getCurrentUserSuccess(res){
 
+}
 router.beforeEach((to, from, next) => {
   const urls = getAuthUrls()
   if (storageGet('user') == null) {

+ 9 - 0
src/router/index.js

@@ -225,5 +225,14 @@ export default new Router({
         requireAuth: false,
       },
     },
+    {
+      path: '/agency/:userId',
+      name: 'Agency',
+      component: resolve => require(['@/components/cheat/AgencyDetail.vue'], resolve),
+      meta: {
+        title: '',
+        requireAuth: false,
+      },
+    },
   ]
 })