|
@@ -1,5 +1,5 @@
|
|
|
import { params } from '@/env'
|
|
|
-import { FLODER_LIST } from './constant'
|
|
|
+import { FLODER_LIST, getcaseTabulationList, getcaseOverviewList } from './constant'
|
|
|
import { addUnsetResErrorURLS,axios } from './instance'
|
|
|
import {namespace} from '@/env'
|
|
|
|
|
@@ -17,6 +17,35 @@ export type Floders = Floder[]
|
|
|
addUnsetResErrorURLS(`${namespace}/caseInquest/downDocx`, `${namespace}/caseExtractDetail/downDocx`, `${namespace}/caseImg/getFfmpegImage`)
|
|
|
export const fetchFloders = async () => {
|
|
|
const floders = await axios.get<Floders>(FLODER_LIST, { params: { caseId: params.caseId } })
|
|
|
+ const tabulationList = await axios.get<any>(getcaseTabulationList, { params: { caseId: params.caseId } })
|
|
|
+ const overviewList = await axios.get<any>(getcaseOverviewList, { params: { caseId: params.caseId } })
|
|
|
+ overviewList.forEach((item:any) => {
|
|
|
+ if(item.listCover){
|
|
|
+ floders.unshift({
|
|
|
+ filesId: item.id,
|
|
|
+ filesTypeId: 1,
|
|
|
+ filesTitle: item.title || '平面图',
|
|
|
+ imgType: 1,
|
|
|
+ filesUrl: item.listCover,
|
|
|
+ ...item
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
+ tabulationList.forEach((item:any) => {
|
|
|
+ if(item.listCover){
|
|
|
+ floders.unshift({
|
|
|
+ filesId: item.id,
|
|
|
+ filesTypeId: 1,
|
|
|
+ filesTitle: item.title,
|
|
|
+ filesUrl: item.listCover,
|
|
|
+ imgType: 1,
|
|
|
+ ...item
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
+ // console.log('tabulationList', tabulationList)
|
|
|
+ // console.log('overviewList', overviewList)
|
|
|
+ // console.log('floders1111111', floders)
|
|
|
const otherFloders = [{
|
|
|
filesId: 88,
|
|
|
filesTypeId: 3,
|
|
@@ -42,7 +71,6 @@ export const fetchFloders = async () => {
|
|
|
})
|
|
|
})
|
|
|
}
|
|
|
- console.log('floders', floders)
|
|
|
await Promise.all(otherFloders.map(async of => {
|
|
|
const kybl = await axios.get(of.ex, { params: { caseId: params.caseId } })
|
|
|
if (kybl) {
|