|
@ -209,6 +209,7 @@ import BasicForm from '@/components/BasicForm/src/BasicForm.vue' |
|
|
import TableHead from '@/components/TableHead/src/TableHead.vue' |
|
|
import TableHead from '@/components/TableHead/src/TableHead.vue' |
|
|
import DetailTable from '@/components/DetailTable/src/DetailTable.vue' |
|
|
import DetailTable from '@/components/DetailTable/src/DetailTable.vue' |
|
|
import { SearchTable } from '@/components/SearchTable' |
|
|
import { SearchTable } from '@/components/SearchTable' |
|
|
|
|
|
import { CACHE_KEY, useCache } from '@/hooks/web/useCache' |
|
|
|
|
|
|
|
|
defineOptions({ name: 'Detail' }) |
|
|
defineOptions({ name: 'Detail' }) |
|
|
|
|
|
|
|
@ -443,6 +444,23 @@ const props = defineProps({ |
|
|
default: 8 |
|
|
default: 8 |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
|
|
|
const filterPermissionAnnexTable = ()=>{ |
|
|
|
|
|
return props.annexTable.filter(item=>{ |
|
|
|
|
|
const { wsCache } = useCache() |
|
|
|
|
|
const permissions = wsCache.get(CACHE_KEY.USER).permissions |
|
|
|
|
|
const all_permission = '*:*:*' |
|
|
|
|
|
if(item?.hasPermi&&item?.hasPermi.length > 0){ |
|
|
|
|
|
const hasPermissions = permissions.find((permission: string) => { |
|
|
|
|
|
return all_permission === permission || item?.hasPermi === permission |
|
|
|
|
|
}) |
|
|
|
|
|
if(!hasPermissions){ |
|
|
|
|
|
console.log('hasPermi',item) |
|
|
|
|
|
return false |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
return true |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
const isShowDrawer = ref(false) |
|
|
const isShowDrawer = ref(false) |
|
|
const detailLoading = ref(false) |
|
|
const detailLoading = ref(false) |
|
|
const tabsList = ref(JSON.parse(JSON.stringify(props.tabs ? props.tabs : ''))) |
|
|
const tabsList = ref(JSON.parse(JSON.stringify(props.tabs ? props.tabs : ''))) |
|
@ -471,7 +489,7 @@ if(props.slotDetailTabList){ |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
let otherList = [...props.annexTable,{ |
|
|
let otherList = [...filterPermissionAnnexTable(),{ |
|
|
label:props.annexAlias.label, |
|
|
label:props.annexAlias.label, |
|
|
prop:'Annex' |
|
|
prop:'Annex' |
|
|
},{ |
|
|
},{ |
|
@ -482,7 +500,7 @@ let otherList = [...props.annexTable,{ |
|
|
prop:'ChangeRecord' |
|
|
prop:'ChangeRecord' |
|
|
}] |
|
|
}] |
|
|
if(props.annexAlias.hidden){ |
|
|
if(props.annexAlias.hidden){ |
|
|
otherList = [...props.annexTable,{ |
|
|
otherList = [...filterPermissionAnnexTable(),{ |
|
|
label:'备注', |
|
|
label:'备注', |
|
|
prop:'Remarks' |
|
|
prop:'Remarks' |
|
|
},{ |
|
|
},{ |
|
@ -548,9 +566,12 @@ const getFileList = async () => { |
|
|
detailLoading.value = false |
|
|
detailLoading.value = false |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 获取其他附件列表篇 |
|
|
// 获取其他附件列表篇 |
|
|
const getAnnexFileList = async (row) => { |
|
|
const getAnnexFileList = async (row) => { |
|
|
props.annexTable?.forEach(async (item) => { |
|
|
let annexTable = filterPermissionAnnexTable() |
|
|
|
|
|
annexTable?.forEach(async (item) => { |
|
|
let requstData = {...remarksData.data,tableName: item?.tableName} |
|
|
let requstData = {...remarksData.data,tableName: item?.tableName} |
|
|
if(item?.queryParams){ |
|
|
if(item?.queryParams){ |
|
|
item?.queryParams?.forEach(queryItem => { |
|
|
item?.queryParams?.forEach(queryItem => { |
|
|