Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mp-enterprise-people-recruitment-h5
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
彭佳妮(贵阳日报)
mp-enterprise-people-recruitment-h5
Commits
75c0201a
Commit
75c0201a
authored
Nov 25, 2024
by
李明环(东信)
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of…
Merge branch 'master' of
https://codeup.aliyun.com/62eb413b37e2c6c98549e0c9/gsh-hr-department/mp-enterprise-people-recruitment-h5
parents
93201967
63254235
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
48 additions
and
63 deletions
+48
-63
index.vue
src/pages/user/myCompany/index.vue
+48
-63
No files found.
src/pages/user/myCompany/index.vue
View file @
75c0201a
...
...
@@ -42,18 +42,20 @@
<wd-col-picker
v-model=
"cityValue"
:columns=
"cityOpstion"
:disabled=
"![1].includes(pageStatus)"
value-key=
"value"
label-key=
"label"
auto-complete
custom-value-class=
"value-class"
style=
"width: 100%"
value-key=
"code"
label-key=
"name"
:column-change=
"columnChangeCity"
@
confirm=
"handleConfirmCity"
use-default-slot
>
<p
style=
"width: 100%; color: #77818f"
>
{{
cityText
||
"请选择公司地址"
}}
</p>
</wd-col-picker>
</formItem>
<formItem
title=
"
详细
地址"
icon=
""
>
<p
style=
"color: #77818f"
>
{{
params
.
location
||
"请选择公司
所在地
"
}}
</p>
<formItem
title=
"
注册
地址"
icon=
""
>
<p
style=
"color: #77818f"
>
{{
params
.
location
||
"请选择公司
注册地址
"
}}
</p>
</formItem>
<div
class=
"textarea-wrap"
v-if=
"[1].includes(pageStatus)"
>
<p
class=
"label"
>
公司介绍
</p>
...
...
@@ -78,7 +80,7 @@
import
{
reactive
,
ref
}
from
"vue"
;
import
formItem
from
"./formItem.vue"
;
import
{
getCompanyInfoApi
,
saveCompanyInfoApi
,
companyReviewInfo
}
from
"@/api/user"
;
import
{
get
Tree
ListApi
,
getDictDataApi
}
from
"@/api/common"
;
import
{
get
Area
ListApi
,
getDictDataApi
}
from
"@/api/common"
;
import
{
uploadFiles
}
from
"@/utils/fileUpload"
;
import
{
getEnumText
}
from
"@/utils/utils"
;
import
evn
from
"@/utils/config"
;
...
...
@@ -111,10 +113,10 @@ const jupmLicenseInfo = () => {
};
onLoad
(
async
({
status
})
=>
{
pageStatus
.
value
=
status
*
1
;
// await getTreeListApi().then(res => {
// //
cityOpstion.value.push(res.data);
//
});
getAreaListApi
({
type
:
"province"
,
code
:
""
}).
then
(
res
=>
{
res
.
data
.
unshift
({
name
:
"不限"
,
code
:
null
});
cityOpstion
.
value
.
push
(
res
.
data
);
});
await
getDictDataApi
([
"EnumIndustryCategory"
]).
then
(
res
=>
{
columns
.
value
=
res
.
data
.
EnumIndustryCategory
;
});
...
...
@@ -146,17 +148,17 @@ function getCompanyInfoApiFn() {
creditCode
,
cityCode
,
districtCode
,
provinceCode
provinceCode
,
address
}
=
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
(
"-"
)
;
cityText
.
value
=
address
;
// 审核状态
auditStatus
.
value
=
await
getEnumText
(
"EnumReviewStatus"
,
res
.
data
.
status
);
});
...
...
@@ -180,18 +182,17 @@ function companyReviewInfoFn() {
provinceCode
,
cityCode
,
districtCode
,
companyName
companyName
,
address
}
=
res
.
data
;
cityText
.
value
=
location
;
params
.
companyName
=
companyName
;
params
.
introduction
=
introduction
;
params
.
logoPath
=
logoPath
;
cityText
.
value
=
address
;
params
.
creditCode
=
creditCode
;
await
sleep
();
if
(
provinceCode
)
{
cityValue
.
value
=
[
provinceCode
,
cityCode
,
districtCode
];
}
cityText
.
value
=
[
provinceName
,
cityName
,
districtName
].
join
(
"-"
);
// 审核状态
auditStatus
.
value
=
await
getEnumText
(
"EnumReviewStatus"
,
res
.
data
.
status
);
console
.
log
(
"auditStatus"
,
auditStatus
);
...
...
@@ -199,14 +200,7 @@ function companyReviewInfoFn() {
}
function
handleConfirm
()
{}
/* 获取省市区 */
const
cityOpstion
=
ref
([
colPickerData
.
map
(
item
=>
{
return
{
value
:
item
.
value
,
label
:
item
.
text
};
})
]);
const
cityOpstion
=
ref
([]);
const
columns
=
ref
([]);
const
cityValue
=
ref
([]);
...
...
@@ -219,34 +213,37 @@ function sleep(second = 1) {
},
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
};
})
);
const
keys
=
[
"city"
,
"district"
];
const
columnChangeCity
=
({
selectedItem
,
resolve
,
index
,
finish
})
=>
{
const
type
=
keys
[
index
];
if
(
type
&&
selectedItem
.
code
)
{
getAreaListApi
({
type
,
code
:
selectedItem
.
code
}).
then
(
res
=>
{
res
.
data
.
unshift
({
name
:
"不限"
,
code
:
null
});
resolve
(
res
.
data
);
});
}
else
{
finish
();
}
};
const
handleConfirmCity
=
({
selectedItems
})
=>
{
cityText
.
value
=
selectedItems
.
map
(
v
=>
v
.
name
).
join
(
"-"
);
citySelectedItems
=
selectedItems
;
const
[
province
,
city
,
district
]
=
selectedItems
;
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
[
province
,
city
,
district
,
street
]
=
selectedItems
;
cityText
.
value
=
selectedItems
.
filter
(
v
=>
v
.
code
)
.
map
(
v
=>
v
.
name
||
""
)
.
join
(
"-"
);
params
.
address
=
selectedItems
.
filter
(
v
=>
v
.
code
)
.
map
(
v
=>
v
.
name
||
""
)
.
join
(
"-"
);
if
(
!
province
.
code
)
{
cityText
.
value
=
"不限"
;
params
.
address
=
"不限"
;
}
params
.
provinceCode
=
province
.
code
;
params
.
cityCode
=
city
?.
code
;
params
.
cityName
=
district
?.
name
;
params
.
districtCode
=
district
?.
code
;
params
.
street
=
street
?
street
.
name
:
""
;
};
/* 选择图片 */
const
chooseImage
=
sourceType
=>
{
...
...
@@ -263,19 +260,7 @@ const chooseImage = sourceType => {
const
submit
=
()
=>
{
console
.
log
(
"params"
,
params
);
if
(
validateForm
(
params
,
[
"location"
,
"cityCode"
,
"companyName"
,
"creditCode"
,
"introduction"
,
"districtCode"
,
"id"
,
"provinceCode"
,
"industry"
])
)
{
if
(
validateForm
(
params
,
[
"location"
,
"companyName"
,
"creditCode"
,
"introduction"
,
"id"
,
"industry"
]))
{
saveCompanyInfoApi
(
params
).
then
(
res
=>
{
if
(
res
.
code
==
200
)
{
uni
.
showToast
({
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment