1

parent aee91a17
......@@ -22,10 +22,12 @@
"@dcloudio/uni-mp-weixin": "3.0.0-4000720240327002",
"@dcloudio/uni-mp-xhs": "3.0.0-4000720240327002",
"@dcloudio/uni-quickapp-webview": "3.0.0-4000720240327002",
"@vant/area-data": "^2.0.0",
"axios": "^1.7.2",
"dayjs": "^1.11.12",
"lodash": "^4.17.21",
"pinia": "2.0.36",
"vant": "^4.9.8",
"vconsole": "^3.15.1",
"vue": "^3.3.11",
"vue-i18n": "^9.1.9",
......@@ -4696,6 +4698,24 @@
"dev": true,
"peer": true
},
"node_modules/@vant/area-data": {
"version": "2.0.0",
"resolved": "https://registry.npmmirror.com/@vant/area-data/-/area-data-2.0.0.tgz",
"integrity": "sha512-zgP4AA8z09S9QTNgVCCHo9cHjcybrv22RJDYPjuCkecn4SB98T5EoPQh2TwqbQXmUhbaOGgiZGy3OUaUxnY7qg=="
},
"node_modules/@vant/popperjs": {
"version": "1.3.0",
"resolved": "https://registry.npmmirror.com/@vant/popperjs/-/popperjs-1.3.0.tgz",
"integrity": "sha512-hB+czUG+aHtjhaEmCJDuXOep0YTZjdlRR+4MSmIFnkCQIxJaXLQdSsR90XWvAI2yvKUI7TCGqR8pQg2RtvkMHw=="
},
"node_modules/@vant/use": {
"version": "1.6.0",
"resolved": "https://registry.npmmirror.com/@vant/use/-/use-1.6.0.tgz",
"integrity": "sha512-PHHxeAASgiOpSmMjceweIrv2AxDZIkWXyaczksMoWvKV2YAYEhoizRuk/xFnKF+emUIi46TsQ+rvlm/t2BBCfA==",
"peerDependencies": {
"vue": "^3.0.0"
}
},
"node_modules/@vitejs/plugin-legacy": {
"version": "4.1.1",
"resolved": "https://registry.npmmirror.com/@vitejs/plugin-legacy/-/plugin-legacy-4.1.1.tgz",
......@@ -14320,6 +14340,24 @@
"spdx-expression-parse": "^3.0.0"
}
},
"node_modules/vant": {
"version": "4.9.8",
"resolved": "https://registry.npmmirror.com/vant/-/vant-4.9.8.tgz",
"integrity": "sha512-iP+jNzwxkCeEdTrlUjro3WoXgY32+1CldOtLSc2K8acY7hR7t1zCkjzXSR9zWjtWT7zgNL1LEXofL8O7mtkYdQ==",
"dependencies": {
"@vant/popperjs": "^1.3.0",
"@vant/use": "^1.6.0",
"@vue/shared": "^3.5.11"
},
"peerDependencies": {
"vue": "^3.0.0"
}
},
"node_modules/vant/node_modules/@vue/shared": {
"version": "3.5.12",
"resolved": "https://registry.npmmirror.com/@vue/shared/-/shared-3.5.12.tgz",
"integrity": "sha512-L2RPSAwUFbgZH20etwrXyVyCBu9OxRSi8T/38QsvnkJyvq2LufW2lDCOzm7t/U9C1mkhJGWYfCuFBCmIuNivrg=="
},
"node_modules/vary": {
"version": "1.1.2",
"resolved": "https://registry.npmmirror.com/vary/-/vary-1.1.2.tgz",
......
......@@ -22,10 +22,12 @@
"@dcloudio/uni-mp-weixin": "3.0.0-4000720240327002",
"@dcloudio/uni-mp-xhs": "3.0.0-4000720240327002",
"@dcloudio/uni-quickapp-webview": "3.0.0-4000720240327002",
"@vant/area-data": "^2.0.0",
"axios": "^1.7.2",
"dayjs": "^1.11.12",
"lodash": "^4.17.21",
"pinia": "2.0.36",
"vant": "^4.9.8",
"vconsole": "^3.15.1",
"vue": "^3.3.11",
"vue-i18n": "^9.1.9",
......
// 可以将此代码放置于项目src/hooks/useColPickerData.ts中
import { useCascaderAreaData } from '@vant/area-data'
export type CascaderOption = {
text: any
value: any
children?: any[]
}
/**
* 使用'@vant/area-data'作为数据源,构造ColPicker组件的数据
* @returns
*/
export function useColPickerData() {
// '@vant/area-data' 数据源
const colPickerData: any[] = useCascaderAreaData()
// 根据code查找子节点,不传code则返回所有节点
function findChildrenByCode(data: any[], code?: any): any[] | null {
if (!code) {
return data
}
for (const item of data) {
if (item.value === code) {
return item.children || null
}
if (item.children) {
const childrenResult = findChildrenByCode(item.children, code)
if (childrenResult) {
return childrenResult
}
}
}
return null
}
return { colPickerData, findChildrenByCode }
}
\ No newline at end of file
......@@ -3,6 +3,8 @@ import App from "./App.vue";
import store from "./store";
import Vconsole from "vconsole";
import NavBar from "@/components/navBar/index.vue";
import { Area } from 'vant'
import 'vant/lib/index.css';
// 字体
import '@/assets/font.css';
import { formatTimestamp } from "@/utils/utils";
......@@ -12,6 +14,7 @@ export function createApp() {
app.component("NavBar", NavBar);
const vConsole = new Vconsole();
app.use(store);
app.use(Area);
// app.use(vConsole);
return {
app
......
......@@ -33,7 +33,18 @@
data.bm ? "立即报名" : "报名结束"
}}</wd-button>
</wd-tabbar>
<wd-action-sheet v-model="show" :actions="actions" @close="close" @select="select" />
<wd-popup
v-model="show"
lock-scroll
position="bottom"
:safe-area-inset-bottom="true"
custom-style="height: 200px;border-radius: 30rpx 30rpx 0 0;"
@close="handleClose10"
>
<view class="select">
<view v-for="(item, index) in actions" :key="index" @click="select({ item, index })">{{ item.name }}</view>
</view>
</wd-popup>
</div>
</template>
......@@ -46,7 +57,7 @@ const data = ref({});
const show = ref(false);
const actions = ref([
{
name: "更新岗位"
name: "选择已有岗位"
},
{
name: "新增岗位"
......@@ -77,6 +88,7 @@ function close() {
show.value = false;
}
function select({ item, index }) {
show.value = false;
if (index == 0) {
xma.navigateTo({
url: `/pages/signUp/addPost?articleId=${articleId.value}&type=update`
......@@ -146,6 +158,22 @@ function next() {
}
}
}
.select {
margin: 0 auto;
width: 100%;
align-items: center;
display: flex;
flex-direction: column;
margin-top: 100rpx;
view {
width: 100%;
text-align: center;
padding: 20rpx 0;
font-weight: 600;
font-size: 36rpx;
color: #404040;
}
}
.foot-btn {
position: fixed;
display: flex;
......
......@@ -80,7 +80,7 @@ import { useAsync } from "@/hooks/useAsync";
import _ from "lodash";
import Filter from "@/components/filter/index.vue";
/* tab */
const contentHeight = ref("100rpx");
const contentHeight = ref("50px");
const activeTab = ref("求职推荐");
const changeActiveTab = tab => {
activeTab.value = tab;
......@@ -236,6 +236,7 @@ const getResumeRecommendList = () => {
onShow(() => {
resetPageParams();
getResumeRecommendList();
getUserInfo();
});
// 城市筛选
const valueCity = ref([]);
......@@ -310,10 +311,16 @@ const filterConfirm = data => {
/* 获取用户信息 */
const getUserInfo = async () => {
const userRes = await getLoginUserApi();
if (userRes.data.status == 0) {
if (!userRes.data) {
xma.navigateTo({
url: `/pages/user/businessLicense/fillIn?steps=3`
url: `/pages/user/businessLicense/fillIn?steps=1`
});
} else {
if (userRes.data.status == 0) {
xma.navigateTo({
url: `/pages/user/businessLicense/fillIn?steps=3`
});
}
}
};
onLoad(() => {
......@@ -327,7 +334,6 @@ onLoad(() => {
contentHeight.value = (res.top + res.bottom) / 2 + 25 + "px";
}
});
getUserInfo();
});
</script>
......@@ -341,18 +347,18 @@ onLoad(() => {
display: flex;
align-items: center;
justify-content: center;
padding-bottom: 14rpx;
padding-bottom: 7px;
background-color: #ffffff;
text {
width: 280rpx;
height: 80rpx;
font-size: 36rpx;
line-height: 80rpx;
width: 140px;
height: 40px;
font-size: 18px;
line-height: 40px;
color: #1b2026;
text-align: center;
&.active {
position: relative;
font-size: 36rpx;
font-size: 18px;
font-weight: 600;
background-image: url("https://lygsh-image.wjzpgz.com/community/communityActiveTab.png");
background-repeat: no-repeat;
......@@ -372,56 +378,56 @@ onLoad(() => {
flex-grow: 1;
.filter {
position: relative;
padding: 0 32rpx 0 44rpx;
padding: 0 16px 0 22px;
.filter-opstion {
max-width: 230rpx;
max-width: 115px;
:deep(.wd-picker__field) {
display: flex;
align-items: center;
}
.t1 {
font-size: 24rpx;
font-size: 12px;
font-weight: normal;
line-height: 36rpx;
line-height: 18px;
color: #77818f;
}
.t2 {
flex-grow: 1;
width: 100rpx;
width: 50px;
overflow: hidden;
font-size: 32rpx;
font-size: 16px;
font-weight: 600;
line-height: 48rpx;
line-height: 24px;
color: #1b2026;
text-overflow: ellipsis;
white-space: nowrap;
.arrow {
width: 0;
height: 0;
margin-left: 20rpx;
margin-left: 10px;
border-color: #c9cdd4;
border-width: 8rpx;
transform: rotateZ(45deg) translateY(-4rpx);
border-width: 4px;
transform: rotateZ(45deg) translateY(-2px);
}
}
}
.filter-other {
gap: 16rpx;
gap: 8px;
.item {
display: flex;
align-items: flex-end;
padding: 12rpx 18rpx;
font-size: 24rpx;
padding: 6px 9px;
font-size: 12px;
font-weight: normal;
line-height: 24rpx;
line-height: 12px;
color: #1f86ff;
background: rgb(31 134 255 / 10%);
.arrow {
width: 0;
height: 0;
margin-left: 4rpx;
margin-left: 2px;
border-color: #1f86ff;
border-width: 4rpx;
border-width: 2px;
transform: rotateZ(0deg);
}
}
......@@ -436,25 +442,25 @@ onLoad(() => {
height: 100%;
background-color: #00000066;
.wrapper {
padding: 1rpx 40rpx;
padding: 0.5px 20px;
background-color: #ffffff;
.other-view-item {
margin-top: 24rpx;
margin-top: 12px;
label {
font-size: 24rpx;
font-size: 12px;
color: #1b2026;
}
.select-list {
display: flex;
flex-wrap: wrap;
gap: 24rpx;
margin-top: 24rpx;
gap: 12px;
margin-top: 12px;
.select-item {
padding: 12rpx 28rpx;
font-size: 24rpx;
padding: 6px 14px;
font-size: 12px;
color: #a3a7b3;
border: 2rpx solid #e1e2e6;
border-radius: 8rpx;
border: 1px solid #e1e2e6;
border-radius: 4px;
&.active {
color: #1f86ff;
background: rgb(31 134 255 / 10%);
......@@ -463,36 +469,36 @@ onLoad(() => {
}
}
:deep(.wd-slider) {
height: 36rpx;
padding-top: 36rpx;
height: 18px;
padding-top: 18px;
.wd-slider__button-wrapper {
width: 30rpx;
height: 30rpx;
width: 15px;
height: 15px;
.wd-slider__button {
width: 30rpx;
height: 30rpx;
width: 15px;
height: 15px;
}
.wd-slider__label {
bottom: 36rpx;
width: 30rpx;
font-size: 20rpx;
bottom: 18px;
width: 15px;
font-size: 10px;
}
}
.wd-slider__bar-wrapper {
margin: 0 40rpx;
margin: 0 20px;
}
}
}
.button-wrap {
display: flex;
gap: 24rpx;
gap: 12px;
justify-content: flex-end;
padding: 32rpx 0;
padding: 16px 0;
div {
padding: 10rpx 24rpx;
font-size: 28rpx;
padding: 5px 12px;
font-size: 14px;
color: #1f86ff;
border-radius: 8rpx;
border-radius: 4px;
}
.reset {
color: #ffffff;
......@@ -500,20 +506,20 @@ onLoad(() => {
}
.confirm {
color: #1f86ff;
border: 2rpx solid #1f86ff;
border: 1px solid #1f86ff;
}
}
}
}
.recommend-list {
flex-grow: 1;
height: 200rpx;
height: 100px;
.item {
padding: 16rpx 32rpx;
border-bottom: 16rpx solid #f3f4f8;
padding: 8px 16px;
border-bottom: 8px solid #f3f4f8;
}
.wd-status-tip {
padding-top: 280rpx;
padding-top: 140px;
}
}
}
......
<template>
<div class="page">
<div class="page" :style="{ background: pageType == 'update' ? '#fff' : '#E8E9EA' }">
<NavBar :showIcon="true" :showTitle="true" title="岗位信息" backgroundBox="#FFFFFF"></NavBar>
<view class="from-1" v-if="pageType == 'update'">
<wd-checkbox-group v-model="value">
......@@ -10,11 +10,15 @@
<view class="tip">贵阳|{{ i.workDic }}{{ i.jobTypeName }}</view>
</view>
</view>
<wd-status-tip v-if="!gwList || gwList.length == 0" image="content" tip="暂无岗位" />
</wd-checkbox-group>
</view>
<view v-else>
<view class="from-2" v-for="(item, index) in jobForm" :key="index">
<view class="title">新增岗位信息{{ index + 1 }}</view>
<view class="title">
<view>添加岗位信息{{ index + 1 }}</view>
<wd-icon v-if="index > 0" @click="deleteItem(index)" name="close-outline" size="34rpx"></wd-icon
></view>
<selectbox
@update="initSalaryColumns"
:options="EnumWorkMode"
......@@ -52,56 +56,57 @@
<textarea maxlength="800" v-model="item.positionDesc" placeholder="请输入你的职位描述"></textarea>
</form-item>
</form-row>
<view class="transverse">
<form-item title="职位薪资" icon="">
<view
v-if="item.settlementType == 4"
:class="`inner flex-between ${item.salaryText ? '' : 'placeholder'}`"
@click="onOpen(item, index)"
>
{{ item.salaryText || "请选择月薪范围" }}
<form-item title="职位薪资" icon="">
<view
v-if="item.settlementType == 4"
:class="`inner flex-between ${item.salaryText ? '' : 'placeholder'}`"
style="display: flex; justify-content: space-between; width: 100%"
@click="onOpen(item, index)"
>
{{ item.salaryText || "请选择月薪范围" }}
<!-- <view class="arrow"></view> -->
<checkbox
class="checkbox"
:value="item.negotiableSalary"
@click="onChecked(item)"
:checked="item.negotiableSalary == 1"
>面议</checkbox
>
</view>
<view
v-else
:class="`inner flex-between ${item.salaryText ? '' : 'placeholder'}`"
@click="onOpen(item, index)"
<!-- <view class="arrow"></view> -->
<checkbox
class="checkbox"
:value="item.negotiableSalary"
@click="onChecked(item)"
:checked="item.negotiableSalary == 1"
>面议</checkbox
>
{{ item.salaryText || "请选择时薪范围" }}
<!-- <view class="arrow"></view> -->
<checkbox
class="checkbox"
:value="item.negotiableSalary"
@click="onChecked(item)"
:checked="item.negotiableSalary == 1"
>面议</checkbox
>
</view>
</form-item>
<form-item title="工作地址" icon="">
<wd-col-picker
v-model="cityValue"
:columns="cityOpstion"
value-key="code"
label-key="name"
:column-change="columnChangeCity"
@confirm="params => handleConfirmCity(params, item)"
use-default-slot
</view>
<view
v-else
:class="`inner flex-between ${item.salaryText ? '' : 'placeholder'}`"
style="display: flex; justify-content: space-between; width: 100%"
@click="onOpen(item, index)"
>
{{ item.salaryText || "请选择时薪范围" }}
<!-- <view class="arrow"></view> -->
<checkbox
class="checkbox"
:value="item.negotiableSalary"
@click="onChecked(item)"
:checked="item.negotiableSalary == 1"
>面议</checkbox
>
<p :class="{ placeholder: !item.cityText }" class="text-single">
{{ item.cityText || "请选择公司所在地" }}
</p>
</wd-col-picker>
</form-item>
</view>
</view>
</form-item>
<form-item title="工作地址" icon="">
<wd-col-picker
v-model="cityValue"
:columns="cityOpstion"
value-key="code"
label-key="name"
:column-change="columnChangeCity"
@confirm="params => handleConfirmCity(params, item)"
use-default-slot
>
<p :class="{ placeholder: !item.cityText }" class="text-single">
{{ item.cityText || "请选择公司所在地" }}
</p>
</wd-col-picker>
</form-item>
<form-item title="是否提供食宿" icon="">
<wd-radio-group v-model="item.accommodation" inline shape="dot">
<wd-radio v-for="(v, n) in radioOpstion" :value="v.code" :key="n">{{ v.text }}</wd-radio>
......@@ -414,6 +419,9 @@ function handleClose() {
}
salaryShow.value = false;
}
function deleteItem(index) {
jobForm.value.splice(index, 1);
}
const initageColumns = () => {
const temp = [
{
......@@ -439,7 +447,7 @@ getTreeListApi({ provinceName: "贵州省" }).then(res => {
cityOpstion.value.push(res.data[0].children);
});
getEnumWorkMode();
positionList({}).then(res => {
positionList({ stutas: 3 }).then(res => {
res.data = res.data.map(item => {
item.workDic = EnumWorkMode.value.find(v => v.code == item.workMode).text;
return item;
......@@ -841,10 +849,15 @@ page {
flex-direction: column;
padding: 32rpx;
margin-top: 32rpx;
background: #fff;
.title {
font-size: 48rpx;
font-weight: 500;
color: #1b2026;
width: 100%;
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 32rpx;
}
textarea {
......@@ -892,7 +905,6 @@ page {
}
.text-single {
width: 100%;
margin-left: 20rpx;
white-space: wrap;
overflow: hidden;
text-overflow: ellipsis;
......
......@@ -7,7 +7,7 @@ export const useDefineStore = defineStore("useDefineStore", ()=>{
creditCode: "",
licensePath: "",
location:"",
licenseValidityPeriod: ""
humanResourcesLicensePath: ""
})
function setFormDataKey(key, data) {
this.formData[key] = data;
......
......@@ -27,15 +27,15 @@
<view class="item">
<view class="label"> 是否人资机构 </view>
<view class="content">
<wd-radio-group v-model="pinias.formData.humanResourcesLicensePath" shape="dot" inline>
<wd-radio :value="pinias.formData.humanResourcesLicensePath"></wd-radio>
<wd-radio value=""></wd-radio>
<wd-radio-group v-model="isHumanResources" shape="dot" inline>
<wd-radio value="1"></wd-radio>
<wd-radio value="2"></wd-radio>
</wd-radio-group>
</view>
</view>
<view class="image-upload">
<image
v-if="pinias.formData.humanResourcesLicensePath"
v-if="isHumanResources == '1' && pinias.formData.humanResourcesLicensePath"
:src="evn.APP_IMAGE_BASE_API + pinias.formData.humanResourcesLicensePath"
mode=""
/>
......@@ -143,6 +143,7 @@ const navigateTo = url => {
url
});
};
const isHumanResources = ref("1");
/* 选择图片 */
const chooseImage = sourceType => {
uni.chooseImage({
......@@ -151,6 +152,7 @@ const chooseImage = sourceType => {
success: async ({ tempFiles }) => {
const res = await uploadFiles(tempFiles);
pinias.setFormDataKey("humanResourcesLicensePath", res[0].key);
isHumanResources.value = 1;
}
});
};
......
......@@ -55,13 +55,16 @@ const params = reactive({
});
onLoad(option => {
id.value = option.id;
feedbackByIdFn(option.id);
if (option.id) {
feedbackByIdFn(option.id);
}
});
const feedbackByIdFn = id => {
feedbackById(id).then(feedback => {
detail.value = feedback.data;
params.questionDesc = feedback.data.questionDesc;
imgArr.value = feedback.data.imagesPath.split(",");
console.log("imgArr.value", imgArr.value);
});
};
function previewImage(url) {
......
......@@ -183,7 +183,7 @@ const appealInfoFn = () => {
const companyReviewInfoFn = () => {
companyReviewInfo().then(res => {
const { reviewType, status } = res.data;
if (reviewType === 1) {
if (reviewType == 1) {
navList[0].url = `/pages/user/myCompany/index?status=${status === 0 ? 2 : 3}`;
navList[0].subText = status === 0 ? "审核中" : "审核不通过";
} else if (reviewType !== 1) {
......@@ -195,6 +195,11 @@ const companyReviewInfoFn = () => {
/* 获取用户信息 */
const getUserInfo = async () => {
const userRes = await getLoginUserApi();
if (!userRes.data) {
uni.navigateTo({
url: `/pages/user/businessLicense/fillIn?steps=1`
});
}
if (userRes.code == 200) {
userInfo.value = userRes.data || {};
navList[0].subText = userRes.data.companyName;
......
......@@ -35,22 +35,25 @@
<formItem title="信用代码">
<p style="color: #77818f">{{ companyInfo.creditCode }}</p>
</formItem>
<formItem title="公司地址" arrow>
<formItem title="公司地址" icon="">
<wd-col-picker
v-model="cityValue"
:columns="cityOpstion"
:disabled="![1].includes(pageStatus)"
value-key="code"
label-key="name"
value-key="value"
label-key="label"
auto-complete
:column-change="columnChangeCity"
@confirm="handleConfirmCity"
use-default-slot
>
<p :class="{ placeholder: !params.location }" style="margin-left: 20rpx">
{{ params.location || "请选择公司所在地" }}
</p>
</wd-col-picker>
</formItem>
<formItem title="详细地址" arrow>
<p :class="{ placeholder: !params.location }" style="margin-left: 20rpx">
{{ params.location || "请选择公司所在地" }}
</p>
</formItem>
<div class="textarea-wrap" v-if="[1].includes(pageStatus)">
<p class="label">公司介绍</p>
<textarea maxlength="500" placeholder="请输入公司介绍" v-model="params.introduction" />
......@@ -78,6 +81,8 @@ import { getTreeListApi, getDictDataApi } from "@/api/common";
import { uploadFiles } from "@/utils/fileUpload";
import { getEnumText } from "@/utils/utils";
import evn from "@/utils/config";
import { useColPickerData } from "@/hooks/useColPickerData.ts";
const { colPickerData, findChildrenByCode } = useColPickerData();
const params = reactive({
id: 0,
......@@ -103,9 +108,15 @@ const jupmLicenseInfo = () => {
});
}
};
onLoad(({ status }) => {
onLoad(async ({ status }) => {
pageStatus.value = status * 1;
// await getTreeListApi().then(res => {
// // cityOpstion.value.push(res.data);
// });
await getDictDataApi(["EnumIndustryCategory"]).then(res => {
columns.value = res.data.EnumIndustryCategory;
});
if (status == 1) {
getCompanyInfoApiFn();
} else {
......@@ -122,11 +133,26 @@ function getCompanyInfoApiFn() {
Object.keys(params).forEach(key => {
params[key] = res.data[key];
});
const { provinceName, cityName, districtName, name, introduction, logoPath } = res.data;
const {
provinceName,
cityName,
districtName,
name,
introduction,
logoPath,
creditCode,
cityCode,
districtCode,
provinceCode
} = res.data;
params.companyName = name;
params.introduction = introduction;
params.logoPath = logoPath;
params.creditCode = creditCode;
await sleep();
if (provinceCode) {
cityValue.value = [provinceCode, cityCode, districtCode];
}
cityText.value = [provinceName, cityName, districtName].join("-");
// 审核状态
auditStatus.value = await getEnumText("EnumAuditStatus", res.data.status);
......@@ -139,13 +165,30 @@ function companyReviewInfoFn() {
params[key] = res.data[key];
});
const { provinceName, cityName, districtName, name, introduction, location, logoPath } = res.data;
const {
provinceName,
cityName,
districtName,
name,
introduction,
location,
logoPath,
creditCode,
provinceCode,
cityCode,
districtCode
} = res.data;
cityText.value = location;
params.address = selectedItems.map(v => v.name).join("-");
params.companyName = name;
params.introduction = introduction;
params.logoPath = logoPath;
params.creditCode = creditCode;
await sleep();
if (provinceCode) {
cityValue.value = [provinceCode, cityCode, districtCode];
}
cityText.value = [provinceName, cityName, districtName].join("-");
// 审核状态
auditStatus.value = await getEnumText("EnumAuditStatus", res.data.status);
......@@ -153,21 +196,38 @@ function companyReviewInfoFn() {
}
function handleConfirm() {}
/* 获取省市区 */
const cityOpstion = ref([]);
const cityOpstion = ref([
colPickerData.map(item => {
return {
value: item.value,
label: item.text
};
})
]);
const columns = ref([]);
const cityValue = ref([]);
const cityText = ref("");
let citySelectedItems = [];
getTreeListApi().then(res => {
cityOpstion.value.push(res.data);
});
getDictDataApi(["EnumIndustryCategory"]).then(res => {
columns.value = res.data.EnumIndustryCategory;
});
const columnChangeCity = ({ selectedItem, resolve, finish }) => {
if (selectedItem.children) {
resolve(selectedItem.children);
function sleep(second = 1) {
return new Promise(resolve => {
setTimeout(() => {
resolve(true);
}, 1000 * second);
});
}
const columnChangeCity = async ({ selectedItem, resolve, finish }) => {
await sleep(0.3);
const areaData = findChildrenByCode(colPickerData, selectedItem.value);
if (areaData && areaData.length) {
resolve(
areaData.map(item => {
return {
value: item.value,
label: item.text
};
})
);
} else {
finish();
}
......@@ -176,13 +236,14 @@ const handleConfirmCity = ({ selectedItems }) => {
cityText.value = selectedItems.map(v => v.name).join("-");
citySelectedItems = selectedItems;
const [province, city, district] = selectedItems;
params.provinceCode = province.code;
params.provinceName = province.name;
params.cityCode = city.code;
params.cityName = city.name;
params.districtCode = district.code;
params.districtName = district.name;
params.location = selectedItems.map(v => v.name).join("-");
params.provinceCode = province.value;
params.provinceName = province.label;
params.cityCode = city.value;
params.cityName = city.label;
params.districtCode = district.value;
params.districtName = district.label;
params.address = selectedItems.map(v => v.label).join("-");
// params.location = selectedItems.map(v => v.name).join("-");
};
/* 选择图片 */
const chooseImage = sourceType => {
......@@ -200,6 +261,21 @@ const submit = () => {
console.log("params", params);
if (
// validateForm(params, [
// "location",
// "cityCode",
// "cityName",
// "companyName",
// "creditCode",
// "introduction",
// "districtCode",
// "districtName",
// "id",
// "logoPath",
// "provinceCode",
// "provinceName",
// "industry"
// ])
validateForm(params, [
"location",
"cityCode",
......
This source diff could not be displayed because it is too large. You can view the blob instead.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment