|
@ -28,7 +28,7 @@ |
|
|
<Tabs ref="tabRef" :tabsList="tabsList" :current="current" @change="change" /> |
|
|
<Tabs ref="tabRef" :tabsList="tabsList" :current="current" @change="change" /> |
|
|
<div class="flex"> |
|
|
<div class="flex"> |
|
|
<!-- 详情 --> |
|
|
<!-- 详情 --> |
|
|
<ContentWrap class="w-[100%]" v-show="tabsList[current].label!='附件'&&tabsList[current].label!='备注'&&tabsList[current].label!='变更记录'"> <!-- 列表头部 --> |
|
|
<ContentWrap class="w-[100%]" v-show="tabsList[current].label!='附件'&&tabsList[current].label!='备注'&&tabsList[current].label!='变更记录'&&!annexTableData.some(item=>item.label==tabsList[current].label)"> <!-- 列表头部 --> |
|
|
<TableHead |
|
|
<TableHead |
|
|
v-if="!isBasic" |
|
|
v-if="!isBasic" |
|
|
:HeadButttondata="HeadButttondata" |
|
|
:HeadButttondata="HeadButttondata" |
|
@ -97,15 +97,21 @@ |
|
|
</DetailTable> |
|
|
</DetailTable> |
|
|
</ContentWrap> |
|
|
</ContentWrap> |
|
|
<!-- 附件/备注/变更记录 --> |
|
|
<!-- 附件/备注/变更记录 --> |
|
|
<ContentWrap class="w-[100%]" v-show="tabsList[current].label=='附件'||tabsList[current].label=='备注'||tabsList[current].label=='变更记录'" :style="{height:remarkHeight+'px'}"> |
|
|
<ContentWrap class="w-[100%]" v-show="annexTableData.some(item=>item.label==tabsList[current].label)||tabsList[current].label=='附件'||tabsList[current].label=='备注'||tabsList[current].label=='变更记录'" :style="{height:remarkHeight+'px'}"> |
|
|
<!-- 附件组件 --> |
|
|
<!-- 附件组件 --> |
|
|
<ElScrollbar ref="scrollbar" :style="{height:(remarkHeight-40)+'px'}"> |
|
|
<ElScrollbar ref="scrollbar" :style="{height:(remarkHeight-40)+'px'}"> |
|
|
<Annex v-show="tabsList[current].label=='附件'" |
|
|
<Annex v-for="(annexItem ,index) in annexTableData" :key="index" v-show="tabsList[current].label==annexItem.label" |
|
|
:annexData="annexData" |
|
|
:annexData="annexItem" |
|
|
@handleAnnexSuccess="handleAnnexSuccess" |
|
|
@handleAnnexSuccess="updateAnnexTableHandle" |
|
|
@deleteAnnexSuccess="deleteAnnexSuccess" |
|
|
@deleteAnnexSuccess="updateAnnexTableHandle" |
|
|
:upData="remarksData.data" |
|
|
:upData="{...remarksData.data,tableName:annexItem.tableName}" |
|
|
/> |
|
|
/> |
|
|
|
|
|
<Annex v-show="tabsList[current].label=='附件'" |
|
|
|
|
|
:annexData="annexData" |
|
|
|
|
|
@handleAnnexSuccess="handleAnnexSuccess" |
|
|
|
|
|
@deleteAnnexSuccess="deleteAnnexSuccess" |
|
|
|
|
|
:upData="remarksData.data" |
|
|
|
|
|
/> |
|
|
<!-- 备注组件 --> |
|
|
<!-- 备注组件 --> |
|
|
<Remarks v-show="tabsList[current].label=='备注'" |
|
|
<Remarks v-show="tabsList[current].label=='备注'" |
|
|
:remarksData="remarksData" |
|
|
:remarksData="remarksData" |
|
@ -176,6 +182,12 @@ const props = defineProps({ |
|
|
required: true, |
|
|
required: true, |
|
|
default: null |
|
|
default: null |
|
|
}, |
|
|
}, |
|
|
|
|
|
//展示附件组件的tab标签 |
|
|
|
|
|
annexTable: { |
|
|
|
|
|
type: Array, |
|
|
|
|
|
required: false, |
|
|
|
|
|
default: ()=>[] |
|
|
|
|
|
}, |
|
|
// 是否是基础数据 展现详情顶部表单 |
|
|
// 是否是基础数据 展现详情顶部表单 |
|
|
isBasic: { |
|
|
isBasic: { |
|
|
type: Boolean, |
|
|
type: Boolean, |
|
@ -334,7 +346,7 @@ if (props.isBasic == true) { |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
const otherList = [{ |
|
|
const otherList = [...props.annexTable,{ |
|
|
label:'附件', |
|
|
label:'附件', |
|
|
prop:'Annex' |
|
|
prop:'Annex' |
|
|
},{ |
|
|
},{ |
|
@ -373,6 +385,8 @@ const remarkHeight = computed(() => { |
|
|
const annexData = reactive({ |
|
|
const annexData = reactive({ |
|
|
annexList: [] |
|
|
annexList: [] |
|
|
}) |
|
|
}) |
|
|
|
|
|
// 其他附件默认数据数组 |
|
|
|
|
|
const annexTableData = ref<Array<any>>([]) |
|
|
|
|
|
|
|
|
// 备注数据 |
|
|
// 备注数据 |
|
|
const remarksData = reactive({ |
|
|
const remarksData = reactive({ |
|
@ -394,6 +408,23 @@ const getFileList = async () => { |
|
|
detailLoading.value = false |
|
|
detailLoading.value = false |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
// 获取其他附件列表篇 |
|
|
|
|
|
const getAnnexFileList = async () => { |
|
|
|
|
|
props.annexTable?.forEach(async (item) => { |
|
|
|
|
|
let requstData = {...remarksData.data,tableName: item?.tableName} |
|
|
|
|
|
const annexList = await FileApi.getFileList(requstData) |
|
|
|
|
|
const annexData = annexTableData.value.find(annex=>annex.label === item.label) |
|
|
|
|
|
if(annexData){ |
|
|
|
|
|
annexData.annexList = annexList |
|
|
|
|
|
}else{ |
|
|
|
|
|
annexTableData.value.push({ |
|
|
|
|
|
label: item.label, |
|
|
|
|
|
tableName: item?.tableName || '', |
|
|
|
|
|
annexList |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
/** 添加附件 */ |
|
|
/** 添加附件 */ |
|
|
const handleAnnexSuccess = () => { |
|
|
const handleAnnexSuccess = () => { |
|
|
getFileList() |
|
|
getFileList() |
|
@ -404,6 +435,11 @@ const deleteAnnexSuccess = async () => { |
|
|
getFileList() |
|
|
getFileList() |
|
|
getChangeRecordList() |
|
|
getChangeRecordList() |
|
|
} |
|
|
} |
|
|
|
|
|
/** 追加的附件 */ |
|
|
|
|
|
const updateAnnexTableHandle = () => { |
|
|
|
|
|
getAnnexFileList() |
|
|
|
|
|
getChangeRecordList() |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
// Tabs当前选择 |
|
|
// Tabs当前选择 |
|
|
const current = ref(0) |
|
|
const current = ref(0) |
|
@ -481,6 +517,7 @@ const openDetail = async (row: any, titleName: any, titleValue: any, tableName: |
|
|
detailData.value = row |
|
|
detailData.value = row |
|
|
getRemarkList() |
|
|
getRemarkList() |
|
|
getFileList() |
|
|
getFileList() |
|
|
|
|
|
getAnnexFileList() |
|
|
getChangeRecordList() |
|
|
getChangeRecordList() |
|
|
// 判断详情按钮是否显示 |
|
|
// 判断详情按钮是否显示 |
|
|
let detailButtonFilter: any = [] |
|
|
let detailButtonFilter: any = [] |
|
|