Commit 4650bd49 by lijiabin

feat: 实践发布支持选择所属一级部门

parent a24b3b2b
......@@ -15,6 +15,7 @@ export interface AddOrUpdatePracticeDto {
tagList: { tagId: number; sort: number }[]
sendType: SendTypeEnum
sendTime: string
deptId?: string
type?: ArticleTypeEnum
}
......
......@@ -62,6 +62,21 @@
:height="100"
/>
</div>
<div v-if="userInfo.isOfficialAccount && type === ArticleTypeEnum.PRACTICE" class="mb-3">
<el-select
v-model="form.deptId"
placeholder="请选择所属一级部门"
clearable
class="w-full"
>
<el-option
v-for="item in firstDepListOptions"
:key="item.id"
:value="item.id"
:label="item.name"
/>
</el-select>
</div>
<!-- 标签内容 -->
<div class="mb-2">
<!-- 选择的标签内容 -->
......@@ -148,7 +163,12 @@ import { useUserStore } from '@/stores'
import { storeToRefs } from 'pinia'
import SelectTagsDialog from './components/selectTagsDialog.vue'
import { useResetData, useUploadImg } from '@/hooks'
import { ArticleTypeEnum, ReleaseStatusTypeEnum, SendTypeEnum } from '@/constants'
import {
ArticleTypeEnum,
firstDepListOptions,
ReleaseStatusTypeEnum,
SendTypeEnum,
} from '@/constants'
import { useTagsStore } from '@/stores'
import { addOrUpdatePractice, addOrUpdateArticle } from '@/api'
import type { AddOrUpdatePracticeDto } from '@/api'
......@@ -238,6 +258,7 @@ const [form, , forReset] = useResetData({
tagList: [],
sendType: SendTypeEnum.IMMEDIATE,
sendTime: '',
deptId: '',
})
const { imgList, handleFileChange, handleDeleteImg, uploadPercent } = useUploadImg(
......
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