mirror of
				https://github.com/continew-org/continew-admin-ui.git
				synced 2025-10-31 22:57:15 +08:00 
			
		
		
		
	fix: 修复公告显示及详情页跳转错误
This commit is contained in:
		| @@ -184,19 +184,19 @@ export interface DictItemPageQuery extends DictItemQuery, PageQuery { | ||||
|  | ||||
| /** 系统公告类型 */ | ||||
| export interface NoticeResp { | ||||
|   id: string | ||||
|   title: string | ||||
|   id?: string | ||||
|   title?: string | ||||
|   content: string | ||||
|   status: number | ||||
|   type: string | ||||
|   effectiveTime: string | ||||
|   terminateTime: string | ||||
|   noticeScope: number | ||||
|   noticeUsers: Array<string> | ||||
|   createUserString: string | ||||
|   createTime: string | ||||
|   updateUserString: string | ||||
|   updateTime: string | ||||
|   status?: number | ||||
|   type?: string | ||||
|   effectiveTime?: string | ||||
|   terminateTime?: string | ||||
|   noticeScope?: number | ||||
|   noticeUsers?: Array<string> | ||||
|   createUserString?: string | ||||
|   createTime?: string | ||||
|   updateUserString?: string | ||||
|   updateTime?: string | ||||
| } | ||||
|  | ||||
| export interface NoticeQuery { | ||||
|   | ||||
| @@ -23,7 +23,7 @@ | ||||
|       </a-typography-paragraph> | ||||
|     </a-typography> | ||||
|     <a-divider /> | ||||
|     <AiEditor v-if="dataDetail?.content" :model-value="dataDetail?.content" /> | ||||
|     <AiEditor :model-value="dataDetail?.content" /> | ||||
|     <a-divider /> | ||||
|     <div v-if="dataDetail?.updateTime" class="update-time-row"> | ||||
|       <span> | ||||
| @@ -41,18 +41,22 @@ import AiEditor from './components/detail/index.vue' | ||||
| import { type NoticeResp, getNotice } from '@/apis/system' | ||||
|  | ||||
| const { width } = useWindowSize() | ||||
| const dataDetail = ref<NoticeResp>() | ||||
| const dataDetail = ref<NoticeResp>({ | ||||
|   content: '', | ||||
| }) | ||||
| const visible = ref(false) | ||||
| // 详情 | ||||
| const onDetail = async (id: string) => { | ||||
|   const res = await getNotice(id) | ||||
|   dataDetail.value = res.data | ||||
|   const { data } = await getNotice(id) | ||||
|   dataDetail.value = data | ||||
|   visible.value = true | ||||
| } | ||||
|  | ||||
| // 重置 | ||||
| const reset = () => { | ||||
|   dataDetail.value = {} | ||||
|   dataDetail.value = { | ||||
|     content: '', | ||||
|   } | ||||
| } | ||||
|  | ||||
| defineExpose({ onDetail }) | ||||
|   | ||||
| @@ -46,6 +46,7 @@ import { useForm } from '@/hooks' | ||||
| const containerRef = ref<HTMLElement | null>() | ||||
| const tabsStore = useTabsStore() | ||||
| const route = useRoute() | ||||
| const router = useRouter() | ||||
| const { id } = route.query | ||||
| const { form, resetForm } = useForm({ | ||||
|   title: '', | ||||
| @@ -62,6 +63,7 @@ const onDetail = async (id: string) => { | ||||
|   Object.assign(form, res.data) | ||||
| } | ||||
| const onBack = () => { | ||||
|   router.back() | ||||
|   tabsStore.closeCurrent(route.path) | ||||
| } | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user