快速入驻

zsk_admin
zsk 10 months ago
parent 594641bcf3
commit 67f9c8fb52

@ -17,7 +17,8 @@ export function getBusinessCoopList(data) {
// Add agency
export function addAgency(data) {
return request({
url: "/admin/v4/agency/addAgency",
url: "/business/coop/approve",
// url: "/admin/v4/agency/addAgency",
method: "post",
data: setqs(data),
});

@ -8,7 +8,8 @@ import {
} from 'ant-design-vue';
import commonJS from './common.js';
const router = useRouter()
const baseURL = "https://admin.ibocai.com.cn/api_prod"; // 正式环境线上
// const baseURL = "https://admin.ibocai.com.cn/api_prod"; // 正式环境线上
const baseURL = "http://192.168.3.83:8003"; // 正式环境线上
// const baseURL2 = "https://a.matripe.com.cn/api_stock"; // 正式环境线上
let protocol = location.protocol
let trueUrl = protocol == 'http:' ? baseURL : baseURL2

@ -0,0 +1,309 @@
<template>
<div class="p-components-map-poi">
<div id="container"></div>
<div id="myPageTop">
<div class="g_flex_row_center" style="position: relative">
<div>
<input id="tipinput" placeholder="请输入关键词搜索" autocomplete="off" v-model="keyword" />
</div>
<div class="btn g_flex_c">
<svg focusable="false" data-icon="search" width="1em" height="1em" fill="currentColor" aria-hidden="true" viewBox="64 64 896 896"><path d="M909.6 854.5L649.9 594.8C690.2 542.7 712 479 712 412c0-80.2-31.3-155.4-87.9-212.1-56.6-56.7-132-87.9-212.1-87.9s-155.5 31.3-212.1 87.9C143.2 256.5 112 331.8 112 412c0 80.1 31.3 155.5 87.9 212.1C256.5 680.8 331.8 712 412 712c67 0 130.6-21.8 182.7-62l259.7 259.6a8.2 8.2 0 0011.6 0l43.6-43.5a8.2 8.2 0 000-11.6zM570.4 570.4C528 612.7 471.8 636 412 636s-116-23.3-158.4-65.6C211.3 528 188 471.8 188 412s23.3-116.1 65.6-158.4C296 211.3 352.2 188 412 188s116.1 23.2 158.4 65.6S636 352.2 636 412s-23.3 116.1-65.6 158.4z"></path></svg>
</div>
</div>
</div>
<div class="g_pt_10 g_flex_row_between">
<div>
<div class="g_fw_700 g_fs_14">{{ mapInfo.name }}</div>
<div class="g_fs_14">{{ mapInfo.address }}</div>
</div>
<div class="g_flex_column_center" v-if="mapInfo.name">
<a-button type="primary" @click="submitForm"></a-button>
</div>
</div>
</div>
</template>
<script setup>
import { ref, onMounted, getCurrentInstance, watch, defineEmits, defineProps } from "vue";
import { Modal, message } from "ant-design-vue";
import AMapLoader from "@amap/amap-jsapi-loader";
import { mapConfig } from "../../utils/config.js";
/* #################### 初始化事件 #################### */
const emits = defineEmits(["submitEvent"]);
const commonJS = getCurrentInstance().appContext.app.config.globalProperties.G;
const mapInfo = ref({
name: "",
address: "",
lat: "",
lng: "",
});
const keyword = ref("");
const selectInfo = ref({});
const props = defineProps({
info: {
type: Object,
default: () => {
return {
name: "",
address: "",
lat: "",
lng: "",
};
},
},
});
const defaultInfo = ref({
mdistrict: "",
});
onMounted(() => {
console.log("地图组件:", props.info);
mapInfo.value = props.info;
keyword.value = mapInfo.value.name;
});
/* ############################## 地图配置 ############################## */
window._AMapSecurityConfig = {
securityJsCode: mapConfig.secret,
};
AMapLoader.load({
key: mapConfig.key,
version: "2.0",
plugins: ["AMap.Scale", "AMap.HawkEye", "AMap.ToolBar", "AMap.ControlBar", "AMap.Geocoder"],
})
.then((AMap) => {
/* ################################# 初始化 ################################# */
let mapPraams = {
zoom: 13,
resizeEnable: true,
};
console.log(mapPraams);
if (mapInfo.value.lat && mapInfo.value.lng) {
console.log("getLng");
mapPraams.center = [mapInfo.value.lng, mapInfo.value.lat];
} else {
mapPraams.center = [116.397429, 39.909183];
}
var initMarker,
map = new AMap.Map("container", mapPraams); //"container" <div> id
/* ################################# 实例化事件 ################################# */
const addMarker = () => {
if (!initMarker && mapInfo.value.lat && mapInfo.value.lng) {
console.log("getLng");
initMarker = new AMap.Marker({
icon: "//a.amap.com/jsapi_demos/static/demo-center/icons/poi-marker-red.png",
position: [Number(mapInfo.value.lng), Number(mapInfo.value.lat)],
offset: new AMap.Pixel(-13, -30),
});
initMarker.setMap(map);
}
};
addMarker();
/* ################################# 点击事件 ################################# */
var geocoder = new AMap.Geocoder();
var marker,
lnglat = [];
map.on("click", function (ev) {
mapInfo.value = {
name: "",
address: "",
lat: ev.lnglat.lat,
lng: ev.lnglat.lng,
};
keyword.value = mapInfo.value.name;
lnglat = [ev.lnglat.lng, ev.lnglat.lat];
geocoder.getAddress(lnglat, function (status, result) {
if (marker) {
marker.setMap(null);
marker = null;
}
setTimeout(() => {
console.log("点击点返回结果:", result);
if (status === "complete" && result.info === "OK") {
let _address = "",
_district = result.regeocode.addressComponent.province + result.regeocode.addressComponent.city + result.regeocode.addressComponent.district;
if (result.regeocode.addressComponent.neighborhood) {
_address = result.regeocode.addressComponent.neighborhood;
} else {
_address = result.regeocode.formattedAddress.replace(_district + result.regeocode.addressComponent.township, () => "");
}
mapInfo.value.name = _address;
keyword.value = mapInfo.value.name;
mapInfo.value.address = result.regeocode.formattedAddress;
selectInfo.value = {
address: result.regeocode.formattedAddress,
district: _district,
lat: mapInfo.value.lat,
lng: mapInfo.value.lng,
name: mapInfo.value.name,
};
defaultInfo.value = {
mdistrict: _district,
};
if (initMarker) {
initMarker.setMap(null);
initMarker = null;
}
marker = new AMap.Marker({
icon: "//a.amap.com/jsapi_demos/static/demo-center/icons/poi-marker-red.png",
position: [mapInfo.value.lng, mapInfo.value.lat],
offset: new AMap.Pixel(-13, -30),
});
marker.setMap(map);
}
}, 10);
});
});
/* ################################# 工具条 ################################# */
var scale = new AMap.Scale({
visible: true,
}),
toolBar = new AMap.ToolBar({
visible: true,
position: {
top: "110px",
right: "40px",
},
}),
controlBar = new AMap.ControlBar({
visible: true,
position: {
top: "10px",
right: "10px",
},
}),
overView = new AMap.HawkEye({
visible: true,
});
map.addControl(scale);
map.addControl(toolBar);
map.addControl(controlBar);
map.addControl(overView);
/* ################################# POI搜索与选择 ################################# */
//
var autoOptions = {
input: "tipinput",
};
AMap.plugin(["AMap.PlaceSearch", "AMap.AutoComplete"], function () {
var auto = new AMap.AutoComplete(autoOptions);
var placeSearch = new AMap.PlaceSearch({
map: map,
}); //
auto.on("select", select); //
function select(e) {
console.log("map 获取下拉选择地址信息:", e);
placeSearch.setCity(e.poi.adcode);
placeSearch.search(e.poi.name); //
selectInfo.value = e.poi;
if (e.poi.location) {
mapInfo.value = {
name: e.poi.name,
address: e.poi.district + e.poi.address,
lat: e.poi.location.lat,
lng: e.poi.location.lng,
};
} else {
mapInfo.value = {
name: e.poi.name,
address: e.poi.district + e.poi.address,
lat: "",
lng: "",
};
}
keyword.value = mapInfo.value.name;
defaultInfo.value = {
mdistrict: e.poi.district,
};
}
});
})
.catch((e) => {
console.log("地图异常状态数据:", e);
});
const submitForm = () => {
if (mapInfo.value.lat == "") {
console.log("经纬度:", mapInfo.value);
message.error("请重新选择");
return false;
}
emits("submitEvent", {
pointInfo: Object.assign(defaultInfo.value, mapInfo.value),
initInfo: Object.assign(defaultInfo.value, selectInfo.value),
});
};
</script>
<style lang="less">
.p-components-map-poi {
#container {
width: 100%;
height: calc(100vh - 254px);
}
#myPageTop {
position: absolute;
top: 106px;
width: 280px;
border: none;
right: 236px;
padding: 0;
}
#myPageTop input {
-webkit-box-sizing: border-box;
box-sizing: border-box;
margin: 0;
padding: 0;
font-variant: tabular-nums;
list-style: none;
-webkit-font-feature-settings: "tnum";
font-feature-settings: "tnum";
position: relative;
display: inline-block;
width: 100%;
height: 32px;
padding: 4px 11px;
color: rgba(0, 0, 0, 0.65);
font-size: 14px;
line-height: 1.5;
background-color: #fff;
background-image: none;
border: 1px solid #d9d9d9;
border-radius: 4px;
-webkit-transition: all 0.3s;
transition: all 0.3s;
width: 280px;
outline: #1677ff;
}
#myPageTop input:focus {
border-color: #40a9ff;
border-right-width: 1px !important;
}
#myPageTop .btn {
cursor: pointer;
width: 32px;
height: 32px;
background-color: #1677ff;
color: #fff;
position: absolute;
right: 0;
top: 0;
border-top-right-radius: 4px;
border-bottom-right-radius: 4px;
}
.amap-icon img {
width: 25px;
height: 34px;
}
}
</style>

@ -3,55 +3,34 @@
<!-- Header with search and tabs -->
<div class="header-container">
<div class="left-container">
<a-input-search
v-model:value="searchKeyword"
placeholder="请输入关键字"
style="width: 320px"
@search="getTable"
@change="handleChangeSearch"
allowClear
/>
<a-input-search v-model:value="searchKeyword" placeholder="请输入关键字" style="width: 320px" @search="getTable" @change="handleChangeSearch" allowClear />
</div>
<a-radio-group v-model:value="activeTab" style="margin-left: 16px;">
<a-radio-group v-model:value="activeTab" style="margin-left: 16px">
<a-radio-button value="all" style="width: 80px; text-align: center">全部</a-radio-button>
<a-radio-button value="realNamePending" style="width: 80px;padding: 0; text-align: center">实名待审</a-radio-button>
<a-radio-button value="realNameApproved" style="width: 80px;padding: 0; text-align: center">实名已审</a-radio-button>
<a-radio-button value="realNameRejected" style="width: 80px;padding: 0; text-align: center">实名驳回</a-radio-button>
<a-radio-button value="qualificationPending" style="width: 80px;padding: 0; text-align: center">资质待审</a-radio-button>
<a-radio-button value="qualificationApproved" style="width: 80px;padding: 0; text-align: center">资质已审</a-radio-button>
<a-radio-button value="realNamePending" style="width: 80px; padding: 0; text-align: center">实名待审</a-radio-button>
<a-radio-button value="realNameApproved" style="width: 80px; padding: 0; text-align: center">实名已审</a-radio-button>
<a-radio-button value="realNameRejected" style="width: 80px; padding: 0; text-align: center">实名驳回</a-radio-button>
<a-radio-button value="qualificationPending" style="width: 80px; padding: 0; text-align: center">资质待审</a-radio-button>
<a-radio-button value="qualificationApproved" style="width: 80px; padding: 0; text-align: center">资质已审</a-radio-button>
</a-radio-group>
</div>
<!-- Company Auth table -->
<a-table
:columns="columns"
:data-source="companyList"
:scroll="{ x: 1200, y: tableHeight }"
:pagination="false"
:loading="loading"
@change="handleTableChange"
rowKey="id"
>
<a-table :columns="columns" :data-source="companyList" :scroll="{ x: 1200, y: tableHeight }" :pagination="false" :loading="loading" @change="handleTableChange" rowKey="id">
<template #bodyCell="{ column, record }">
<!-- Company Type column -->
<template v-if="column.dataIndex === 'companyType'">
{{ record.companyType === 0 ? '企业' : record.companyType === 1 ? '个体' : '-' }}
{{ record.companyType === 0 ? "企业" : record.companyType === 1 ? "个体" : "-" }}
</template>
<!-- 营业执照照片 -->
<template v-if="column.dataIndex === 'businessLicensePic'">
<div v-if="record.businessLicensePic" class="image-preview">
<a-image :src="record.businessLicensePic" alt="营业执照"/>
</div>
<span v-else>-</span>
<a-image :src="record.businessLicensePic || 'http://matripe.oss-cn-beijing.aliyuncs.com/defaultMountain.png'" alt="营业执照" />
</template>
<!-- 法人身份证正面 -->
<template v-if="column.dataIndex === 'legalPersonIdCardImgFront'">
<div v-if="record.legalPersonIdCardImgFront" class="image-preview">
<a-image :src="record.legalPersonIdCardImgFront" alt="身份证人像面"/>
</div>
<span v-else>-</span>
<a-image :src="record.legalPersonIdCardImgFront || 'http://matripe.oss-cn-beijing.aliyuncs.com/defaultMountain.png'" alt="身份证人像面" />
</template>
<!-- Real Name Auth Status column -->
@ -59,28 +38,14 @@
<!-- <span :class="getStatusClass(record.realNameAuth)">
{{ getStatusText(record.realNameAuth) }}
</span> -->
<a
v-if="record.realNameAuth === 0"
href="javascript:"
@click="showRealNameAuthModal(record)"
>实名认证</a>
<span
v-else
class="disabled-link"
>{{ getStatusText(record.realNameAuth) }}</span>
<a v-if="record.realNameAuth === 0" href="javascript:" @click="showRealNameAuthModal(record)"></a>
<span v-else class="disabled-link">{{ getStatusText(record.realNameAuth) }}</span>
</template>
<!-- Certification Auth Status column -->
<template v-if="column.dataIndex === 'certificationAuth'">
<a
v-if="record.certificationAuth === 0 || record.certificationAuth === ''"
href="javascript:"
@click="showCertificationAuthModal(record)"
>资质认证</a>
<span
v-else
class="disabled-link"
>{{ getStatusText(record.certificationAuth) }}</span>
<a v-if="record.certificationAuth === 0 || record.certificationAuth === ''" href="javascript:" @click="showCertificationAuthModal(record)"></a>
<span v-else class="disabled-link">{{ getStatusText(record.certificationAuth) }}</span>
<!-- <span :class="getStatusClass(record.certificationAuth)">
{{ getStatusText(record.certificationAuth) }}
</span> -->
@ -113,52 +78,29 @@
<!-- 新增其他字段的判断 -->
<template v-if="['companyName', 'realNameAuthContactsName', 'realNameAuthContactsTel', 'certificationAuthContactsName', 'certificationAuthContactsTel'].includes(column.dataIndex)">
{{ record[column.dataIndex] || '-' }}
{{ record[column.dataIndex] || "-" }}
</template>
</template>
</a-table>
<!-- Pagination -->
<div class="g_pb_16 g_pt_16 g_pageBottom" v-if="companyList.length > 0">
<a-pagination
v-model:current="pagination.current"
v-model:page-size="pagination.pageSize"
:total="pagination.total"
:show-total="(total) => `共 ${total} 条`"
@change="handlePageChange"
:showSizeChanger="true"
:show-quick-jumper="pagination.total > pagination.pageSize"
:hideOnSinglePage="false"
/>
<a-pagination v-model:current="pagination.current" v-model:page-size="pagination.pageSize" :total="pagination.total" :show-total="(total) => `${total}`" @change="handlePageChange" :showSizeChanger="true" :show-quick-jumper="pagination.total > pagination.pageSize" :hideOnSinglePage="false" />
</div>
<!-- Real Name Auth Modal -->
<a-modal
title="实名认证审核"
:visible="realNameAuthModalVisible"
@cancel="handleCancel"
:footer="null"
width="800px"
destroyOnClose
>
<a-form
:model="approvalForm"
ref="approvalFormRef"
layout="horizontal"
@finish="handleRealNameAuthSubmit"
:label-col="{ span: 6 }"
:wrapper-col="{ span: 16 }"
>
<a-modal title="实名认证审核" :visible="realNameAuthModalVisible" @cancel="handleCancel" :footer="null" width="800px" destroyOnClose>
<a-form :model="approvalForm" ref="approvalFormRef" layout="horizontal" @finish="handleRealNameAuthSubmit" :label-col="{ span: 6 }" :wrapper-col="{ span: 16 }">
<a-form-item label="社会统一信用代码">
<span class="ant-form-text">{{ currentRecord.codeUSC || '-' }}</span>
<span class="ant-form-text">{{ currentRecord.codeUSC || "-" }}</span>
</a-form-item>
<a-form-item label="商户类型">
<span class="ant-form-text">{{ currentRecord.companyType === 0 ? '企业' : currentRecord.companyType === 1 ? '个体' : '-' }}</span>
<span class="ant-form-text">{{ currentRecord.companyType === 0 ? "企业" : currentRecord.companyType === 1 ? "个体" : "-" }}</span>
</a-form-item>
<a-form-item label="企业名称">
<span class="ant-form-text">{{ currentRecord.companyName || '-' }}</span>
<span class="ant-form-text">{{ currentRecord.companyName || "-" }}</span>
</a-form-item>
<a-form-item label="营业执照照片">
@ -169,11 +111,11 @@
</a-form-item>
<a-form-item label="法人代表人姓名">
<span class="ant-form-text">{{ currentRecord.legalPersonName || '-' }}</span>
<span class="ant-form-text">{{ currentRecord.legalPersonName || "-" }}</span>
</a-form-item>
<a-form-item label="法人身份证号">
<span class="ant-form-text">{{ currentRecord.legalPersonIdCardNo || '-' }}</span>
<span class="ant-form-text">{{ currentRecord.legalPersonIdCardNo || "-" }}</span>
</a-form-item>
<a-form-item label="身份证人像面">
@ -191,11 +133,11 @@
</a-form-item>
<a-form-item label="联系人姓名">
<span class="ant-form-text">{{ currentRecord.realNameAuthContactsName || '-' }}</span>
<span class="ant-form-text">{{ currentRecord.realNameAuthContactsName || "-" }}</span>
</a-form-item>
<a-form-item label="联系人手机号">
<span class="ant-form-text">{{ currentRecord.realNameAuthContactsTel || '-' }}</span>
<span class="ant-form-text">{{ currentRecord.realNameAuthContactsTel || "-" }}</span>
</a-form-item>
<a-form-item label="审核结果" name="status" :rules="[{ required: true, message: '请选择审核结果' }]">
@ -206,11 +148,7 @@
</a-form-item>
<a-form-item label="审核备注" name="remark">
<a-textarea
v-model:value="approvalForm.remark"
placeholder="请输入审核备注"
:rows="3"
/>
<a-textarea v-model:value="approvalForm.remark" placeholder="请输入审核备注" :rows="3" />
</a-form-item>
<a-form-item :wrapper-col="{ offset: 6, span: 16 }">
@ -223,22 +161,8 @@
</a-modal>
<!-- Certification Auth Modal -->
<a-modal
title="资质认证审核"
:visible="certificationAuthModalVisible"
@cancel="handleCancel"
:footer="null"
width="800px"
destroyOnClose
>
<a-form
:model="approvalForm"
ref="approvalFormRef"
layout="horizontal"
@finish="handleCertificationAuthSubmit"
:label-col="{ span: 6 }"
:wrapper-col="{ span: 16 }"
>
<a-modal title="资质认证审核" :visible="certificationAuthModalVisible" @cancel="handleCancel" :footer="null" width="800px" destroyOnClose>
<a-form :model="approvalForm" ref="approvalFormRef" layout="horizontal" @finish="handleCertificationAuthSubmit" :label-col="{ span: 6 }" :wrapper-col="{ span: 16 }">
<a-form-item label="人力资源服务许可证">
<div class="image-preview" v-if="currentRecord.serviceLicenseImage">
<a-image :src="currentRecord.serviceLicenseImage" alt="人力资源服务许可证" @click="previewImage(currentRecord.serviceLicenseImage)" />
@ -254,11 +178,11 @@
</a-form-item>
<a-form-item label="联系人姓名">
<span class="ant-form-text">{{ currentRecord.certificationAuthContactsName || '-' }}</span>
<span class="ant-form-text">{{ currentRecord.certificationAuthContactsName || "-" }}</span>
</a-form-item>
<a-form-item label="联系人手机号">
<span class="ant-form-text">{{ currentRecord.certificationAuthContactsTel || '-' }}</span>
<span class="ant-form-text">{{ currentRecord.certificationAuthContactsTel || "-" }}</span>
</a-form-item>
<a-form-item label="审核结果" name="status" :rules="[{ required: true, message: '请选择审核结果' }]">
@ -269,11 +193,7 @@
</a-form-item>
<a-form-item label="审核备注" name="remark">
<a-textarea
v-model:value="approvalForm.remark"
placeholder="请输入审核备注"
:rows="3"
/>
<a-textarea v-model:value="approvalForm.remark" placeholder="请输入审核备注" :rows="3" />
</a-form-item>
<a-form-item :wrapper-col="{ offset: 6, span: 16 }">
@ -286,12 +206,7 @@
</a-modal>
<!-- Image Preview Modal -->
<a-modal
:visible="imagePreviewVisible"
:footer="null"
@cancel="imagePreviewVisible = false"
width="800px"
>
<a-modal :visible="imagePreviewVisible" :footer="null" @cancel="imagePreviewVisible = false" width="800px">
<img :src="previewImageUrl" style="width: 100%" />
</a-modal>
</div>
@ -443,7 +358,6 @@ const fetchCompanyAuthList = async () => {
const response = await getCompanyAuthList(searchForm);
if (response.status === 200) {
console.log("response", response);
// const { records, total } = response.data.recordList;
@ -596,8 +510,7 @@ onMounted(() => {
</script>
<style scoped>
:deep(.ant-form-item){
:deep(.ant-form-item) {
margin-bottom: 12px;
}
.company-auth-management {
@ -625,7 +538,7 @@ onMounted(() => {
}
.image-preview img {
border:1px dashed #ccc;
border: 1px dashed #ccc;
width: 100%;
height: 100%;
object-fit: contain;

@ -1,8 +1,18 @@
<template>
<div class="business-coop-management">
<!-- Search input -->
<div class="search-container">
<!-- <div class="search-container">
<a-input-search v-model:value="searchKeyword" placeholder="请输入关键字" style="width: 320px" @search="getTable" @change="handleChangeSearch" allowClear />
</div> -->
<div class="header-container">
<div class="left-container">
<a-input-search v-model:value="searchKeyword" placeholder="请输入关键字" style="width: 320px" @search="getTable" @change="handleChangeSearch" allowClear />
</div>
<a-radio-group v-model:value="activeTab" style="margin-left: 16px">
<a-radio-button value="all" style="width: 80px; text-align: center">全部</a-radio-button>
<a-radio-button value="pending" style="width: 80px; text-align: center">待审核</a-radio-button>
<a-radio-button value="approved" style="width: 80px; text-align: center">已审核</a-radio-button>
</a-radio-group>
</div>
<!-- Business coop table -->
@ -55,8 +65,12 @@
</template>
<!-- Operation column -->
<template v-if="column.dataIndex === 'operate'">
<!-- <template v-if="column.dataIndex === 'operate'">
<a href="javascript:" @click="showExamineModal(record)"></a>
</template> -->
<template v-if="column.dataIndex === 'operate'">
<span v-if="record.finished === 1" style="color: #999; cursor: not-allowed;"></span>
<a v-else href="javascript:" @click="showExamineModal(record)"></a>
</template>
</template>
</a-table>
@ -92,9 +106,9 @@
<div class="display-flex">
<span style="max-width: 475px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis">{{ formState.address }}</span>
<span class="iconfont icon-dizhi f14" style="color: #999; line-height: 32px; margin-left: 6px; cursor: pointer" v-if="!formState.address" @click="showMapModal()"></span>
<span class="iconfont icon-dizhi f14" style="color: #999; line-height: 32px; margin-left: 6px; cursor: pointer" v-if="!formState.address" @click="handleOpenMap('address')"></span>
<span class="iconfont icon-dizhi f14" v-if="formState.address" style="color: #1890ff; line-height: 32px; margin-left: 6px; cursor: pointer" @click="showMapModal()"></span>
<span class="iconfont icon-dizhi f14" v-if="formState.address" style="color: #1890ff; line-height: 32px; margin-left: 6px; cursor: pointer" @click="handleOpenMap('address')"></span>
</div>
</a-form-item>
@ -135,12 +149,20 @@
<a-modal :visible="imageModalVisible" title="查看图片" @ok="imageModalVisible = false" @cancel="imageModalVisible = false">
<img :src="currentImage" alt="Image" style="max-width: 100%; max-height: 80vh" />
</a-modal>
<!-- 高德POI搜索 -->
<a-modal v-model:open="poiModal.isShow" title="位置" width="800px" :zIndex="1001" centered :footer="false" :destroyOnClose="true" :forceRender="true">
<div class style="height: calc(100vh - 200px); overflow-y: auto">
<mapPOIpanel :info="poiModal" @submitEvent="getPoiInfo" />
</div>
</a-modal>
</div>
</template>
<script setup>
import { ref, reactive, onMounted, watch, getCurrentInstance } from "vue";
import { message } from "ant-design-vue";
import mapPOIpanel from "../components/poi.vue"; //
import { getBusinessCoopList, addAgency, getTemplateList, getChannelUserList } from "@/api/bussinessCoop";
const commonJS = getCurrentInstance().appContext.app.config.globalProperties.G;
// State
@ -160,6 +182,7 @@ const searchForm = reactive({
pageNum: 1,
pageSize: 10,
keyword: "",
status: "", //
});
const coopTypesArray = [
@ -204,6 +227,7 @@ const formState = reactive({
lngLatStr: "",
updateContactTime: 0,
desp: "",
businessCooperationId:'',
});
// Form item layout
@ -289,17 +313,6 @@ window.addEventListener("resize", () => {
tableHeight.value = window.innerHeight - 381;
});
// Methods
const getTable = async () => {
searchForm.keyword = searchKeyword.value;
searchForm.pageNum = 1;
pagination.current = 1;
await fetchBusinessCoopList();
};
const handleChangeSearch = () => {
searchForm.keyword = searchKeyword.value;
};
const fetchBusinessCoopList = async () => {
loading.value = true;
@ -324,6 +337,50 @@ const fetchBusinessCoopList = async () => {
}
};
// Methods
const getTable = async () => {
searchForm.keyword = searchKeyword.value;
searchForm.pageNum = 1;
pagination.current = 1;
// activeTab status
if (activeTab.value === "all") {
searchForm.status = "";
} else if (activeTab.value === "pending") {
searchForm.status = 2;
} else if (activeTab.value === "approved") {
searchForm.status = 1;
}
await fetchBusinessCoopList();
};
const handleChangeSearch = () => {
searchForm.keyword = searchKeyword.value;
};
const activeTab = ref("all");
// activeTab status
watch(
() => activeTab.value,
(newVal) => {
if (newVal === "all") {
searchForm.status = ""; //
} else if (newVal === "pending") {
searchForm.status = 2;
} else if (newVal === "approved") {
searchForm.status = 1;
}
fetchBusinessCoopList(); //
},
{ immediate: true }
);
const handleTableChange = (pag) => {
pagination.current = pag.current;
searchForm.pageNum = pag.current;
@ -337,11 +394,13 @@ const handlePageChange = (page) => {
};
const showExamineModal = (record) => {
console.log(record);
// Pre-fill form data if needed
formState.agencyName = record.companyName || "";
formState.userName = record.userName || "";
formState.tel = record.tel || "";
formState.address = record.address || "";
formState.businessCooperationId = record.id || "";
entryShowExamine.value = true;
};
@ -373,9 +432,48 @@ const showImageModal = (imageUrl) => {
currentImage.value = imageUrl;
imageModalVisible.value = true;
};
/* #################### 高德POI弹窗模块 #################### */
const poiModal = ref({
isShow: false,
name: "",
address: "",
lat: "",
lng: "",
type: "",
});
const submitForm = ref({});
const handleOpenMap = ($type) => {
//
poiModal.value = {
isShow: true,
// name: submitForm.value.aliasName,
address: submitForm.value.address,
lat: commonJS.isNotEmptyCheck(submitForm.value.lat) ? submitForm.value.lat : 0,
lng: commonJS.isNotEmptyCheck(submitForm.value.lng) ? submitForm.value.lng : 0,
type: $type,
};
console.log("poiModal.value", poiModal.value);
};
const getPoiInfo = (e) => {
console.log("获取地图选择信息:", e, " -- 类型:", poiModal.value.type);
//
poiModal.value.isShow = false;
//
var reg = /.+?(省|市|自治区|自治州|县|区)/g; //
if (poiModal.value.type == "address") {
submitForm.value.address = e.pointInfo.address;
submitForm.value.district = e.initInfo.district
.match(reg)
.filter((item, index) => item)
.join(",");
submitForm.value.lat = e.initInfo.lat;
submitForm.value.lng = e.initInfo.lng;
submitForm.value.mdistrict = e.initInfo.mdistrict;
formState.address = e.pointInfo.address;
formState.lngLatStr = e.initInfo.lng+','+e.initInfo.lat;
const showMapModal = () => {
// Implement map modal logic here
}
console.log(submitForm.value);
};
const handleChange = () => {
@ -426,4 +524,16 @@ onMounted(async () => {
border-radius: 4px;
cursor: pointer;
}
.header-container {
display: flex;
/* justify-content: space-between; */
align-items: center;
margin-bottom: 16px;
}
.left-container {
display: flex;
align-items: center;
}
</style>

@ -11,7 +11,7 @@
</div>
<!-- Banner table -->
<a-table :columns="columns" :data-source="bannerList" :scroll="{ x: 900, y: tableHeight }" :pagination="false" :loading="loading" @change="handleTableChange" rowKey="id">
<a-table :columns="columns" :data-source="bannerList" :scroll="{ x: 1300, y: tableHeight }" :pagination="false" :loading="loading" @change="handleTableChange" rowKey="id">
<!-- Sort column -->
<template #bodyCell="{ column, record, index }">
<template v-if="column.dataIndex === 'sort'">

Loading…
Cancel
Save