在路由跳转前添加日志输出,更新协议页面以支持新的PDF URL,优化协议列表的显示逻辑,调整条件判断以触发PDF获取
This commit is contained in:
parent
a92eae32e5
commit
7dd937782b
@ -24,6 +24,8 @@ router.beforeEach((to, from) => {
|
||||
if (to.path==='/'){
|
||||
hideMinWindow1()
|
||||
}
|
||||
console.log('路由跳转前', to.path)
|
||||
|
||||
// 如果是返回操作(在历史记录中找到目标路由)
|
||||
if (routeHistory.value.includes(to.path)) {
|
||||
slideDirection.value = 'slide-right'
|
||||
|
@ -20,11 +20,13 @@ const router = useRouter()
|
||||
const pmblUrl = ref('') // 存储拍卖笔录的URL
|
||||
const jmxyUrl=ref('')//竞买协议
|
||||
const pmyjqrsUrl=ref('')//拍卖移交确认书
|
||||
const jmxzUrl=ref('')
|
||||
const pmggUrl=ref('')
|
||||
// 协议列表数据
|
||||
const protocolList = computed(() => [
|
||||
{ id: '1', title: $t('signature.agreement.notice'), pdfName: 'pmgg', type: 'local' },
|
||||
{ id: '1', title: $t('signature.agreement.notice'), pdfName: pmggUrl.value, type: 'remote' },
|
||||
{ id: '2', title: $t('signature.agreement.rules'), pdfName: 'pmgz', type: 'local' },
|
||||
{ id: '3', title: $t('signature.agreement.buyerGuide'), pdfName: 'jmxz', type: 'local' },
|
||||
{ id: '3', title: $t('signature.agreement.buyerGuide'), pdfName: jmxzUrl.value, type: 'remote' },
|
||||
{ id: '4', title: $t('signature.agreement.buyerAgreement'), pdfName: jmxyUrl.value, type: 'remote' },
|
||||
{ id: '5', title: $t('signature.agreement.record'), pdfName: pmblUrl.value, type: 'remote' },
|
||||
{ id: '6', title: $t('signature.agreement.transfer'), pdfName: pmyjqrsUrl.value, type: 'remote' }
|
||||
@ -43,6 +45,8 @@ const fetchPmblPdf = async () => {
|
||||
jmxyUrl.value=res.data.ViewUrls?.jmxy1
|
||||
pmblUrl.value=res.data.ViewUrls?.ppbl6
|
||||
pmyjqrsUrl.value=res.data.ViewUrls?.ppqr5
|
||||
jmxzUrl.value=res.data.ViewUrls?.jmxz2
|
||||
pmggUrl.value=res.data.ViewUrls?.pmgg3
|
||||
}
|
||||
} catch (error) {
|
||||
}
|
||||
@ -51,7 +55,7 @@ const fetchPmblPdf = async () => {
|
||||
// 监听折叠面板变化
|
||||
const handleCollapseChange = (name) => {
|
||||
activeNames.value = name
|
||||
if (['4','5','6'].includes(name) && !protocolList.value.find(x=>x.id===name)?.pdfName) {
|
||||
if (['1','3','4','5','6'].includes(name) && !protocolList.value.find(x=>x.id===name)?.pdfName) {
|
||||
fetchPmblPdf()
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user