|
|
@ -96,16 +96,34 @@ |
|
|
|
</template> |
|
|
|
</DetailTable> |
|
|
|
</ContentWrap> |
|
|
|
<!-- other附件组件:如质检明细 --> |
|
|
|
<div v-for="(annexItem ,index) in annexTableData" :key="index" v-show="annexTableData.some(item=>item.label==tabsList[current].label)" class="w-[100%]" :style="{height:remarkHeight+'px'}"> |
|
|
|
<ContentWrap class="w-[100%]"> |
|
|
|
<ElScrollbar ref="scrollbar" :style="{height:annexItem.hasSubDetail?'100%':(remarkHeight-40)+'px'}"> |
|
|
|
<Annex v-show="tabsList[current].label==annexItem.label" |
|
|
|
:annexData="annexItem" |
|
|
|
@handleAnnexSuccess="updateAnnexTableHandle" |
|
|
|
@deleteAnnexSuccess="updateAnnexTableHandle" |
|
|
|
:upData="{...remarksData.data,tableName:annexItem.tableName}" |
|
|
|
/> |
|
|
|
</ElScrollbar> |
|
|
|
</ContentWrap> |
|
|
|
{{annexItem.subDetailTableData.tableColumns}} |
|
|
|
|
|
|
|
<Table style="border:1px solid red;height:100px" |
|
|
|
v-if="!isBasic && fromeWhere != 'countPlan'" |
|
|
|
:columns="annexItem.subDetailTableData.tableColumns" |
|
|
|
:data="annexItem.subDetailTableData.tableList" |
|
|
|
:loading="annexItem.subDetailTableData.loading" |
|
|
|
:pagination="{ total: annexItem.subDetailTableData.tableList.length }" |
|
|
|
v-model:pageSize="tableObjectRef.pageSize" |
|
|
|
v-model:currentPage="tableObjectRef.currentPage" |
|
|
|
/> |
|
|
|
</div> |
|
|
|
<!-- 附件/备注/变更记录 --> |
|
|
|
<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'}"> |
|
|
|
<ContentWrap class="w-[100%]" v-show="tabsList[current].label=='附件'||tabsList[current].label=='备注'||tabsList[current].label=='变更记录'" :style="{height:remarkHeight+'px'}"> |
|
|
|
<!-- 附件组件 --> |
|
|
|
<ElScrollbar ref="scrollbar" :style="{height:(remarkHeight-40)+'px'}"> |
|
|
|
<Annex v-for="(annexItem ,index) in annexTableData" :key="index" v-show="tabsList[current].label==annexItem.label" |
|
|
|
:annexData="annexItem" |
|
|
|
@handleAnnexSuccess="updateAnnexTableHandle" |
|
|
|
@deleteAnnexSuccess="updateAnnexTableHandle" |
|
|
|
:upData="{...remarksData.data,tableName:annexItem.tableName}" |
|
|
|
/> |
|
|
|
<Annex v-show="tabsList[current].label=='附件'" |
|
|
|
:annexData="annexData" |
|
|
|
@handleAnnexSuccess="handleAnnexSuccess" |
|
|
@ -392,7 +410,7 @@ const remarkHeight = computed(() => { |
|
|
|
const annexData = reactive({ |
|
|
|
annexList: [] |
|
|
|
}) |
|
|
|
// 其他附件默认数据数组 |
|
|
|
// // 其他附件默认数据数组 |
|
|
|
const annexTableData = ref<Array<any>>([]) |
|
|
|
|
|
|
|
// 备注数据 |
|
|
@ -416,7 +434,8 @@ const getFileList = async () => { |
|
|
|
} |
|
|
|
} |
|
|
|
// 获取其他附件列表篇 |
|
|
|
const getAnnexFileList = async () => { |
|
|
|
const getAnnexFileList = async (row:id) => { |
|
|
|
console.log('getAnnexFileList') |
|
|
|
props.annexTable?.forEach(async (item) => { |
|
|
|
let requstData = {...remarksData.data,tableName: item?.tableName} |
|
|
|
const annexList = await FileApi.getFileList(requstData) |
|
|
@ -427,8 +446,24 @@ const getAnnexFileList = async () => { |
|
|
|
annexTableData.value.push({ |
|
|
|
label: item.label, |
|
|
|
tableName: item?.tableName || '', |
|
|
|
annexList |
|
|
|
annexList, |
|
|
|
hasSubDetail:item.hasSubDetail||false, |
|
|
|
subDetailTableData:item.subDetailTableData||{} |
|
|
|
}) |
|
|
|
if(item?.subDetailTableData){ |
|
|
|
const { tableObject:subTableObject, tableMethods:subTableMethods } = useTable({ |
|
|
|
getListApi: item.subDetailTableData.getSubList // 分页接口 |
|
|
|
}) |
|
|
|
const {getList:getSubList} = subTableMethods |
|
|
|
subTableObject.params= {} |
|
|
|
item.subDetailTableData.queryParams.forEach(queryItem => { |
|
|
|
subTableObject.params[queryItem.queryField] = row[queryItem.rowField] |
|
|
|
}); |
|
|
|
await getSubList() |
|
|
|
item.subDetailTableData.tableList = subTableObject.tableList |
|
|
|
annexItem.subDetailTableData.tableList |
|
|
|
console.log('subTableObject',annexTableData.value) |
|
|
|
} |
|
|
|
} |
|
|
|
}) |
|
|
|
} |
|
|
@ -444,7 +479,7 @@ const deleteAnnexSuccess = async () => { |
|
|
|
} |
|
|
|
/** 追加的附件 */ |
|
|
|
const updateAnnexTableHandle = () => { |
|
|
|
getAnnexFileList() |
|
|
|
getAnnexFileList(detailData.value) |
|
|
|
getChangeRecordList() |
|
|
|
} |
|
|
|
|
|
|
@ -526,7 +561,7 @@ const openDetail = async (row: any, titleName: any, titleValue: any, tableName: |
|
|
|
detailData.value = row |
|
|
|
getRemarkList() |
|
|
|
getFileList() |
|
|
|
getAnnexFileList() |
|
|
|
getAnnexFileList(row) |
|
|
|
getChangeRecordList() |
|
|
|
// 判断详情按钮是否显示 |
|
|
|
let detailButtonFilter: any = [] |
|
|
|