Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
corporate-culture-qd
Overview
Overview
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
王立鹏
corporate-culture-qd
Commits
b02715a9
Commit
b02715a9
authored
Apr 13, 2026
by
lijiabin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
【需求 21402】 feat: 官方账号发实践文章可以选择一级部门
parent
8b8c38e5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
52 additions
and
40 deletions
+52
-40
types.ts
src/api/article/types.ts
+1
-0
options.ts
src/constants/options.ts
+19
-0
practiceList.vue
src/views/homePage/yaTab/components/practiceList.vue
+2
-22
index.vue
src/views/practiceSearchList/index.vue
+3
-17
index.vue
src/views/publishLongArticle/index.vue
+27
-1
No files found.
src/api/article/types.ts
View file @
b02715a9
...
@@ -207,6 +207,7 @@ export interface ArticleItemDto {
...
@@ -207,6 +207,7 @@ export interface ArticleItemDto {
region
:
string
region
:
string
recommendSort
:
number
recommendSort
:
number
isOfficialAccount
:
BooleanFlag
isOfficialAccount
:
BooleanFlag
deptId
:
string
}
}
/**
/**
...
...
src/constants/options.ts
View file @
b02715a9
...
@@ -263,3 +263,21 @@ export const specificVideoRewardListOptions: {
...
@@ -263,3 +263,21 @@ export const specificVideoRewardListOptions: {
title
:
'从诗词歌赋聊到人生哲学'
,
title
:
'从诗词歌赋聊到人生哲学'
,
},
},
]
]
export
const
firstDepListOptions
=
[
{
id
:
'1825'
,
name
:
'Amazon产品开发部'
},
{
id
:
'76'
,
name
:
'Amazon销售部'
},
{
id
:
'139'
,
name
:
'Amazon运营部'
},
{
id
:
'5114'
,
name
:
'Temu销售部'
},
{
id
:
'4491'
,
name
:
'Tiktok项目部'
},
{
id
:
'39'
,
name
:
'视觉设计部'
},
{
id
:
'23'
,
name
:
'知识产权部'
},
{
id
:
'499'
,
name
:
'供应链管理部'
},
{
id
:
'20'
,
name
:
'IT技术部'
},
{
id
:
'5'
,
name
:
'财务部'
},
{
id
:
'2357'
,
name
:
'人力发展中心'
},
{
id
:
'683'
,
name
:
'副总经理'
},
{
id
:
'6'
,
name
:
'总经理'
},
{
id
:
'3'
,
name
:
'董事长'
},
]
\ No newline at end of file
src/views/homePage/yaTab/components/practiceList.vue
View file @
b02715a9
...
@@ -75,7 +75,7 @@
...
@@ -75,7 +75,7 @@
</div>
</div>
<div
class=
"flex flex-wrap gap-2"
>
<div
class=
"flex flex-wrap gap-2"
>
<label
<label
v-for=
"item in firstDepList"
v-for=
"item in firstDepList
Options
"
:key=
"item.id"
:key=
"item.id"
:class=
"[
:class=
"[
'px-4 py-2 rounded-lg text-sm font-medium cursor-pointer transition-all duration-200',
'px-4 py-2 rounded-lg text-sm font-medium cursor-pointer transition-all duration-200',
...
@@ -228,14 +228,10 @@ import { getPracticeList } from '@/api/practice'
...
@@ -228,14 +228,10 @@ import { getPracticeList } from '@/api/practice'
import
{
usePageSearch
,
useScrollTop
}
from
'@/hooks'
import
{
usePageSearch
,
useScrollTop
}
from
'@/hooks'
import
dayjs
from
'dayjs'
import
dayjs
from
'dayjs'
import
{
TABS_REF_KEY
}
from
'@/constants'
import
{
TABS_REF_KEY
}
from
'@/constants'
// import { useTagsStore } from '@/stores/tags'
// import { storeToRefs } from 'pinia'
import
PublishPractice
from
'@/components/common/PublishBox/index.vue'
import
PublishPractice
from
'@/components/common/PublishBox/index.vue'
import
{
ArticleTypeEnum
}
from
'@/constants'
import
{
ArticleTypeEnum
,
firstDepListOptions
}
from
'@/constants'
import
{
useNavigation
}
from
'@/hooks'
import
{
useNavigation
}
from
'@/hooks'
// const tagsStore = useTagsStore()
// const { tagList } = storeToRefs(tagsStore)
const
router
=
useRouter
()
const
router
=
useRouter
()
const
{
jumpToArticleDetailPage
}
=
useNavigation
()
const
{
jumpToArticleDetailPage
}
=
useNavigation
()
...
@@ -245,22 +241,6 @@ const filterOptions = ref([
...
@@ -245,22 +241,6 @@ const filterOptions = ref([
{
title
:
'最新'
,
id
:
1
},
{
title
:
'最新'
,
id
:
1
},
{
title
:
'最热'
,
id
:
0
},
{
title
:
'最热'
,
id
:
0
},
])
])
const
firstDepList
=
ref
([
{
id
:
'1825'
,
name
:
'Amazon产品开发部'
},
{
id
:
'76'
,
name
:
'Amazon销售部'
},
{
id
:
'139'
,
name
:
'Amazon运营部'
},
{
id
:
'5114'
,
name
:
'Temu销售部'
},
{
id
:
'4491'
,
name
:
'Tiktok项目部'
},
{
id
:
'39'
,
name
:
'视觉设计部'
},
{
id
:
'23'
,
name
:
'知识产权部'
},
{
id
:
'499'
,
name
:
'供应链管理部'
},
{
id
:
'20'
,
name
:
'IT技术部'
},
{
id
:
'5'
,
name
:
'财务部'
},
{
id
:
'2357'
,
name
:
'人力发展中心'
},
{
id
:
'683'
,
name
:
'副总经理'
},
{
id
:
'6'
,
name
:
'总经理'
},
{
id
:
'3'
,
name
:
'董事长'
},
])
const
{
handleBackTop
,
ScrollTopComp
}
=
useScrollTop
(
tabsRef
!
)
const
{
handleBackTop
,
ScrollTopComp
}
=
useScrollTop
(
tabsRef
!
)
const
{
list
,
total
,
searchParams
,
goToPage
,
changePageSize
,
refresh
}
=
usePageSearch
(
const
{
list
,
total
,
searchParams
,
goToPage
,
changePageSize
,
refresh
}
=
usePageSearch
(
getPracticeList
,
getPracticeList
,
...
...
src/views/practiceSearchList/index.vue
View file @
b02715a9
...
@@ -63,7 +63,7 @@
...
@@ -63,7 +63,7 @@
</div>
</div>
<div
class=
"flex flex-wrap gap-2"
>
<div
class=
"flex flex-wrap gap-2"
>
<label
<label
v-for=
"item in firstDepList"
v-for=
"item in firstDepList
Options
"
:key=
"item.id"
:key=
"item.id"
:class=
"[
:class=
"[
'px-4 py-2 rounded-lg text-sm font-medium cursor-pointer transition-all duration-200',
'px-4 py-2 rounded-lg text-sm font-medium cursor-pointer transition-all duration-200',
...
@@ -241,6 +241,7 @@ import { usePageSearch, useScrollTop, useNavigation } from '@/hooks'
...
@@ -241,6 +241,7 @@ import { usePageSearch, useScrollTop, useNavigation } from '@/hooks'
import
dayjs
from
'dayjs'
import
dayjs
from
'dayjs'
import
{
storeToRefs
}
from
'pinia'
import
{
storeToRefs
}
from
'pinia'
import
{
useTagsStore
}
from
'@/stores/tags'
import
{
useTagsStore
}
from
'@/stores/tags'
import
{
firstDepListOptions
}
from
'@/constants'
const
tagsStore
=
useTagsStore
()
const
tagsStore
=
useTagsStore
()
const
{
tagList
}
=
storeToRefs
(
tagsStore
)
const
{
tagList
}
=
storeToRefs
(
tagsStore
)
...
@@ -249,22 +250,7 @@ const route = useRoute()
...
@@ -249,22 +250,7 @@ const route = useRoute()
const
searchPageRef
=
ref
<
HTMLElement
|
null
>
(
null
)
const
searchPageRef
=
ref
<
HTMLElement
|
null
>
(
null
)
const
{
handleBackTop
}
=
useScrollTop
(
searchPageRef
)
const
{
handleBackTop
}
=
useScrollTop
(
searchPageRef
)
const
{
jumpToArticleDetailPage
}
=
useNavigation
()
const
{
jumpToArticleDetailPage
}
=
useNavigation
()
const
firstDepList
=
ref
([
{
id
:
'1825'
,
name
:
'Amazon产品开发部'
},
{
id
:
'76'
,
name
:
'Amazon销售部'
},
{
id
:
'139'
,
name
:
'Amazon运营部'
},
{
id
:
'5114'
,
name
:
'Temu销售部'
},
{
id
:
'4491'
,
name
:
'Tiktok项目部'
},
{
id
:
'39'
,
name
:
'视觉设计部'
},
{
id
:
'23'
,
name
:
'知识产权部'
},
{
id
:
'499'
,
name
:
'供应链管理部'
},
{
id
:
'20'
,
name
:
'IT技术部'
},
{
id
:
'5'
,
name
:
'财务部'
},
{
id
:
'2357'
,
name
:
'人力发展中心'
},
{
id
:
'683'
,
name
:
'副总经理'
},
{
id
:
'6'
,
name
:
'总经理'
},
{
id
:
'3'
,
name
:
'董事长'
},
])
const
sortOptions
=
[
const
sortOptions
=
[
{
label
:
'最新'
,
value
:
1
},
{
label
:
'最新'
,
value
:
1
},
{
label
:
'最热'
,
value
:
0
},
{
label
:
'最热'
,
value
:
0
},
...
...
src/views/publishLongArticle/index.vue
View file @
b02715a9
...
@@ -280,6 +280,19 @@
...
@@ -280,6 +280,19 @@
/>
/>
</el-form-item>
</el-form-item>
</
template
>
</
template
>
<!-- 选一级部门 如果是官方账号 并且是 实践 选填 -->
<
template
v-if=
"userInfo.isOfficialAccount && form.type === ArticleTypeEnum.PRACTICE"
>
<el-form-item
label=
"所属一级部门"
>
<el-select
v-model=
"form.deptId"
:placeholder=
"`请选择一级部门`"
clearable
>
<el-option
v-for=
"item in firstDepListOptions"
:key=
"item.id"
:value=
"item.id"
:label=
"item.name"
/>
</el-select>
</el-form-item>
</
template
>
<!-- 发布设置 -->
<!-- 发布设置 -->
<div>
<div>
<el-form-item
label=
"发布时间"
prop=
"sendType"
>
<el-form-item
label=
"发布时间"
prop=
"sendType"
>
...
@@ -308,7 +321,11 @@
...
@@ -308,7 +321,11 @@
<
template
#
footer
>
<
template
#
footer
>
<div
class=
"flex gap-3 justify-end"
>
<div
class=
"flex gap-3 justify-end"
>
<el-button
@
click=
"handleDrawerClose"
class=
"rounded-lg"
>
取消
</el-button>
<el-button
@
click=
"handleDrawerClose"
class=
"rounded-lg"
>
取消
</el-button>
<el-button
@
click=
"handleSubmit(ReleaseStatusTypeEnum.DRAFT)"
class=
"rounded-lg"
>
<el-button
:loading=
"loading"
@
click=
"handleSubmit(ReleaseStatusTypeEnum.DRAFT)"
class=
"rounded-lg"
>
存草稿
存草稿
</el-button>
</el-button>
<el-button
<el-button
...
@@ -335,6 +352,7 @@ import {
...
@@ -335,6 +352,7 @@ import {
ReleaseStatusTypeEnum
,
ReleaseStatusTypeEnum
,
articleTypeListOptions
,
articleTypeListOptions
,
VideoPositionEnum
,
VideoPositionEnum
,
firstDepListOptions
,
}
from
'@/constants'
}
from
'@/constants'
import
UploadFile
from
'@/components/common/UploadFile/index.vue'
import
UploadFile
from
'@/components/common/UploadFile/index.vue'
import
UploadVideo
from
'@/components/common/UploadVideo/index.vue'
import
UploadVideo
from
'@/components/common/UploadVideo/index.vue'
...
@@ -399,6 +417,7 @@ const [form, resetForm] = useResetData({
...
@@ -399,6 +417,7 @@ const [form, resetForm] = useResetData({
// 视频
// 视频
videoLocation
:
VideoPositionEnum
.
TOP
,
videoLocation
:
VideoPositionEnum
.
TOP
,
articleVideoUrl
:
''
,
articleVideoUrl
:
''
,
deptId
:
''
,
})
})
// 时间选择只允许整十分(:00、:10、:20、:30、:40、:50),秒固定为 0
// 时间选择只允许整十分(:00、:10、:20、:30、:40、:50),秒固定为 0
...
@@ -519,6 +538,9 @@ const transFormData = (releaseStatus: ReleaseStatusTypeEnum) => {
...
@@ -519,6 +538,9 @@ const transFormData = (releaseStatus: ReleaseStatusTypeEnum) => {
}
}
}
}
if
(
data
.
type
===
ArticleTypeEnum
.
PRACTICE
&&
userInfo
.
value
.
isOfficialAccount
)
{
data
.
deptId
=
data
.
deptId
||
''
}
return
data
return
data
}
}
...
@@ -646,6 +668,10 @@ onActivated(async () => {
...
@@ -646,6 +668,10 @@ onActivated(async () => {
}))
||
[]
}))
||
[]
}
}
}
}
if
(
userInfo
.
value
.
isOfficialAccount
&&
form
.
value
.
type
===
ArticleTypeEnum
.
PRACTICE
)
{
form
.
value
.
deptId
=
data
.
deptId
}
}
}
})
})
</
script
>
</
script
>
...
...
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