|
|
|
@ -69,13 +69,17 @@ |
|
|
|
</template> |
|
|
|
|
|
|
|
<script setup name="cpNoticeList"> |
|
|
|
import { useRouter } from 'vue-router'; |
|
|
|
import { useRouter, useRoute } from 'vue-router'; |
|
|
|
import { showConfirmDialog, showToast } from 'vant'; |
|
|
|
import { deleteNotice, editNotice } from '@/api/enforcement/notice'; |
|
|
|
import NoticeTabContent from './cp_notice_tab_content.vue'; |
|
|
|
|
|
|
|
const router = useRouter(); |
|
|
|
const activeTab = ref('draft'); |
|
|
|
const route = useRoute(); |
|
|
|
// 根据返回参数定位tab:保存草稿返回'draft',提交预告返回'pending' |
|
|
|
const validTabs = ['pending', 'history', 'draft']; |
|
|
|
const queryTab = route.query.tab; |
|
|
|
const activeTab = ref(validTabs.includes(queryTab) ? queryTab : 'pending'); |
|
|
|
|
|
|
|
const draftRef = ref(null); |
|
|
|
const pendingRef = ref(null); |
|
|
|
|