|
@@ -0,0 +1,165 @@
|
|
|
+<template>
|
|
|
+ <div class="create-container">
|
|
|
+ <div class="create-body" v-loading="loading" style="width: 100%">
|
|
|
+ <div class="title" v-if="this.type == 0">测评机构信息</div>
|
|
|
+ <div class="title" v-else>入驻品牌机构信息</div>
|
|
|
+ <el-form :model="authentication" :rules="rules" ref="authentication" label-width="12%" class="demo-report">
|
|
|
+ <el-form-item prop="agencyPhoto" label="机构logo">
|
|
|
+ <span >
|
|
|
+ <el-image
|
|
|
+ style="width: 100px;"
|
|
|
+ :src="authentication.agencyPhoto"
|
|
|
+ fit="scale-down"></el-image>
|
|
|
+ </span>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="机构名称" prop="evaluationAgencyName">
|
|
|
+ <span >{{authentication.evaluationAgencyName}}</span>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="认证状态" prop="name">
|
|
|
+ <el-tag :type="authentication.authStatus.style">{{authentication.authStatus.text}}</el-tag>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item v-if="!isModifyMode && authentication.authStatus.text == '认证失败'" label="失败原因" prop="name">
|
|
|
+ <el-link v-if="authentication.explain!=null&&authentication.explain!=''" type="danger" disabled>
|
|
|
+ {{authentication.explain}}
|
|
|
+ </el-link>
|
|
|
+ <el-link v-if="authentication.explain==null || authentication.explain==''" type="danger" disabled>管理员未填写
|
|
|
+ </el-link>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="地址" prop="address">
|
|
|
+ <span >{{authentication.address}}</span>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="测评机构能力" prop="evaluationAgencyAbilityList">
|
|
|
+ <span v-for="(item,index) in authentication.evaluationAgencyAbilityList"
|
|
|
+ :key="index"><span class="badge">{{item}}</span></span>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="测评机构资源" prop="evaluationAgencyResourceList">
|
|
|
+ <span v-for="item in authentication.evaluationAgencyResourceList" :key="item.id">
|
|
|
+ 资源类型:{{item.type}}; 资源名称:{{item.name}}; 资源总量:{{item.totalNum}}; 可用资源:{{item.availableNum}}<br/>
|
|
|
+ </span>
|
|
|
+ </el-form-item>
|
|
|
+
|
|
|
+ <el-form-item label="接包数量" prop="taskCount" v-if="this.type == 0">
|
|
|
+ <span >{{authentication.taskCount}}</span>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item >
|
|
|
+ <div class="btn btn-medium btn-info" @click="back()">返回</div>
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+<script>
|
|
|
+ import Http from '@/js/http.js'
|
|
|
+ import Apis from '@/js/api.js'
|
|
|
+ import {notify} from '@/constants/index'
|
|
|
+ import {getAllReportTypes,
|
|
|
+ defaultValue,
|
|
|
+ storageGet,
|
|
|
+ getCurrentAgencyAuthInfo,
|
|
|
+ getAllAgencyResourceTypes,
|
|
|
+ getAllServiceTypes,} from '@/js/index'
|
|
|
+
|
|
|
+ export default {
|
|
|
+ name: 'AgencyDetail',
|
|
|
+ components: {},
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ user: {},
|
|
|
+ loading: false,
|
|
|
+ type: 0,
|
|
|
+ userId: 0,
|
|
|
+ resourceTypes: [],
|
|
|
+ serviceTypes: [],
|
|
|
+ authentication: {
|
|
|
+ mobile: '',
|
|
|
+ evaluationAgencyName: '',
|
|
|
+ bankAccount: '',
|
|
|
+ address: '',
|
|
|
+ evaluationAgencyAbilityList: [],
|
|
|
+ evaluationAgencyResourceList: [],
|
|
|
+ authStatus: {},
|
|
|
+ agencyPhoto: defaultValue.image,
|
|
|
+ explain: '',
|
|
|
+ taskCount: 0
|
|
|
+ },
|
|
|
+ }
|
|
|
+ },
|
|
|
+ mounted() {
|
|
|
+ this.$nextTick(() => {
|
|
|
+ this.init()
|
|
|
+ })
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ init() {
|
|
|
+ this.userId = this.$route.params.id
|
|
|
+ this.type = this.$route.params.type
|
|
|
+ this.setServiceTypes()
|
|
|
+ this.setResourceTypes()
|
|
|
+ this.getAuthInfo ()
|
|
|
+ },
|
|
|
+ back() {
|
|
|
+ this.$router.push({
|
|
|
+ name: 'AgencyList'
|
|
|
+ })
|
|
|
+ },
|
|
|
+ //加载数据
|
|
|
+ getAuthInfo () {
|
|
|
+ this.showLoading()
|
|
|
+ getCurrentAgencyAuthInfo(this.userId, this.getAuthInfoSuccess, this.getAuthInfoFail)
|
|
|
+ },
|
|
|
+ getAuthInfoSuccess (res) {
|
|
|
+ this.hideLoading()
|
|
|
+ this.authentication.agencyPhoto = res.agencyPhoto == null ? defaultValue.image : res.agencyPhoto
|
|
|
+ this.authentication.evaluationAgencyName = res.evaluationAgencyName == null ? '暂未填写' : res.evaluationAgencyName
|
|
|
+ this.authentication.evaluationAgencyAbilityList = res.evaluationAgencyAbilityList == null ? [] : res.evaluationAgencyAbilityList
|
|
|
+ this.authentication.evaluationAgencyResourceList = res.evaluationAgencyResourceList == null ? [] : res.evaluationAgencyResourceList
|
|
|
+ this.authentication.bankAccount = res.bankAccount == null ? '暂未填写' : res.bankAccount
|
|
|
+ this.authentication.address = res.address == null ? '暂未填写' : res.address
|
|
|
+ this.authentication.authStatus = res.authStatus
|
|
|
+ this.authentication.explain = res.explain
|
|
|
+ this.authentication.taskCount = res.taskCount
|
|
|
+ },
|
|
|
+ getAuthInfoFail (error) {
|
|
|
+ this.hideLoading()
|
|
|
+ notify('error', '加载认证信息失败:' + error.data)
|
|
|
+ },
|
|
|
+ //设置测试类型
|
|
|
+ setServiceTypes () {
|
|
|
+ getAllServiceTypes().then((res) => {
|
|
|
+ this.serviceTypes = res
|
|
|
+ }).catch((error) => {
|
|
|
+ notify('error', '机构能力加载失败')
|
|
|
+ })
|
|
|
+ },
|
|
|
+ //设置机构资源类型
|
|
|
+ setResourceTypes () {
|
|
|
+ this.resourceTypes = getAllAgencyResourceTypes()
|
|
|
+ },
|
|
|
+ setUserInfo() {
|
|
|
+ this.user = storageGet('user')
|
|
|
+ },
|
|
|
+ showLoading() {
|
|
|
+ this.loading = true
|
|
|
+ },
|
|
|
+ hideLoading() {
|
|
|
+ this.loading = false
|
|
|
+ }
|
|
|
+ },
|
|
|
+ watch: {
|
|
|
+ agencyType(val) {
|
|
|
+ this.agencyType = val
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+</script>
|
|
|
+
|
|
|
+<style>
|
|
|
+ .demo {
|
|
|
+ font-size: 32px;
|
|
|
+ }
|
|
|
+
|
|
|
+ .el-form-item {
|
|
|
+ max-height: 120px !important;
|
|
|
+ overflow: auto;
|
|
|
+ }
|
|
|
+</style>
|