可信代码库-企业认证相关接口对接

This commit is contained in:
付民康
2025-06-12 11:25:15 +08:00
parent 2c3f0e54c8
commit 6358350c16
4 changed files with 169 additions and 50 deletions

View File

@@ -5,27 +5,40 @@
<div class="text-[14px] w-full flex items-center justify-between">
<div class="font-bold mb-[16px]">基础信息</div>
<div>
<!-- <d-icon style="margin-right: 4px;color: rgb(61, 204, 166)" v-if="!isEdit" class="font-normal" name="right-o" operable @click="editIconClick">-->
<!-- <template #suffix>-->
<!-- <span>已认证</span>-->
<!-- </template>-->
<!-- </d-icon>-->
<d-icon style="margin-right: 4px;color: rgb(245, 152, 51)" v-if="!isEdit" class="font-normal" name="warning-o" operable @click="editIconClick">
<d-icon style="margin-right: 4px;color: rgb(245, 152, 51)" v-if="!userInfo.enterpriseId" class="font-normal" name="warning-o" operable>
<template #suffix>
<span>未认证</span>
</template>
</d-icon>
<!-- <d-icon style="margin-right: 4px;color: rgb(249, 95, 91)" v-if="!isEdit" class="font-normal" name="error-o" operable @click="editIconClick">-->
<!-- <template #suffix>-->
<!-- <span>驳回</span>-->
<!-- </template>-->
<!-- </d-icon>-->
<!-- <d-icon style="margin-right: 4px;color: rgb(254, 204, 85)" v-if="!isEdit" class="font-normal" name="warning-o" operable @click="editIconClick">-->
<!-- <template #suffix>-->
<!-- <span>审核中</span>-->
<!-- </template>-->
<!-- </d-icon>-->
<d-icon v-if="!isEdit" class="font-normal" style="margin-right: 4px" name="classroom-post-results-large" operable @click="showModal">
<d-icon v-if="userInfo.enterpriseId&&enterpriseDetail?.auditStatus===1" style="margin-right: 4px;color: rgb(61, 204, 166)" class="font-normal" name="right-o" operable>
<template #suffix>
<span>已认证</span>
</template>
</d-icon>
<d-icon v-if="userInfo.enterpriseId&&enterpriseDetail?.auditStatus===2" style="margin-right: 4px;color: rgb(249, 95, 91)" class="font-normal" name="error-o" operable>
<template #suffix>
<span>驳回</span>
</template>
</d-icon>
<div v-if="userInfo.enterpriseId&&enterpriseDetail?.auditStatus===0" style="display: inline-block">
<d-popover trigger="hover" :position="['bottom']">
<template #content>
<div>
<div>企业名称: {{enterpriseDetail?.enterpriseName || '--'}}</div>
<div>企业官网: {{enterpriseDetail?.website || '--'}}</div>
<div>营业执照: <img style="display: inline-block" width="80" v-if="enterpriseDetail?.businessLicenseUrl" :src="enterpriseDetail?.businessLicenseUrl"/></div>
</div>
</template>
<d-icon style="margin-right: 4px;color: rgb(254, 204, 85)" class="font-normal" name="warning-o" operable>
<template #suffix>
<span>审核中</span>
</template>
</d-icon>
</d-popover>
</div>
<d-icon v-if="!userInfo.enterpriseId" class="font-normal" style="margin-right: 4px" name="classroom-post-results-large" operable @click="showModal">
<template #suffix>
<span>申请企业认证</span>
</template>
@@ -240,7 +253,7 @@
</div>
</d-modal>
<QyrzModal ref="qyrzRef"/>
<QyrzModal @refresh="queryUserInfo" ref="qyrzRef"/>
</template>
<script setup lang="ts">
@@ -253,7 +266,7 @@ import {
deleteOrganizationMemberApi, getGroupjoinedListApi,
getOrganizationMemberListApi,
inviteOrganizationMemberApi,
updateOrganizationInfoApi,getGroupmemberinviteApi
updateOrganizationInfoApi,getGroupmemberinviteApi,fetchEnterpriseDetail
} from '@/api/organizationManage/organizationManageApi';
import {
type OrganizationInfoType,
@@ -382,6 +395,9 @@ async function queryUserInfo() {
} else {
hasOrganization.value = false;
}
if (res.data?.data.data.enterpriseId) {
getEnterpriseDetail(res.data?.data.data.enterpriseId);
}
} catch (e) {
Message.error('查询用户信息失败');
}
@@ -524,6 +540,22 @@ async function getOrgList(username) {
orgListSearchLoading.value = false;
}
const enterpriseDetail = ref({});
const getEnterpriseDetail = async (id) => {
try {
const response = await fetchEnterpriseDetail(id);
debugger
if (response.data.code === 200) {
enterpriseDetail.value = response.data.data;
} else {
Message.error('数据获取失败');
}
} catch (error) {
Message.error('网络请求失败');
}
};
// 搜索处理函数(带防抖)
const handleSearch = debounce(() => {
pager.pageIndex = 1; // 搜索时重置到第一页
@@ -546,7 +578,6 @@ function updateFilterTableList() {
// 修改 updateFilterTableList 函数
function updateFilterOrgTableList() {
debugger
const queryStr = orgListSearchParam.value.trim().toLowerCase();
filterOrgList = queryStr