|
@ -96,16 +96,34 @@ |
|
|
</template> |
|
|
</template> |
|
|
</DetailTable> |
|
|
</DetailTable> |
|
|
</ContentWrap> |
|
|
</ContentWrap> |
|
|
<!-- 附件/备注/变更记录 --> |
|
|
<!-- other附件组件:如质检明细 --> |
|
|
<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'}"> |
|
|
<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:(remarkHeight-40)+'px'}"> |
|
|
<ElScrollbar ref="scrollbar" :style="{height:annexItem.hasSubDetail?'100%':(remarkHeight-40)+'px'}"> |
|
|
<Annex v-for="(annexItem ,index) in annexTableData" :key="index" v-show="tabsList[current].label==annexItem.label" |
|
|
<Annex v-show="tabsList[current].label==annexItem.label" |
|
|
:annexData="annexItem" |
|
|
:annexData="annexItem" |
|
|
@handleAnnexSuccess="updateAnnexTableHandle" |
|
|
@handleAnnexSuccess="updateAnnexTableHandle" |
|
|
@deleteAnnexSuccess="updateAnnexTableHandle" |
|
|
@deleteAnnexSuccess="updateAnnexTableHandle" |
|
|
:upData="{...remarksData.data,tableName:annexItem.tableName}" |
|
|
: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="tabsList[current].label=='附件'||tabsList[current].label=='备注'||tabsList[current].label=='变更记录'" :style="{height:remarkHeight+'px'}"> |
|
|
|
|
|
<!-- 附件组件 --> |
|
|
|
|
|
<ElScrollbar ref="scrollbar" :style="{height:(remarkHeight-40)+'px'}"> |
|
|
<Annex v-show="tabsList[current].label=='附件'" |
|
|
<Annex v-show="tabsList[current].label=='附件'" |
|
|
:annexData="annexData" |
|
|
:annexData="annexData" |
|
|
@handleAnnexSuccess="handleAnnexSuccess" |
|
|
@handleAnnexSuccess="handleAnnexSuccess" |
|
@ -392,7 +410,7 @@ const remarkHeight = computed(() => { |
|
|
const annexData = reactive({ |
|
|
const annexData = reactive({ |
|
|
annexList: [] |
|
|
annexList: [] |
|
|
}) |
|
|
}) |
|
|
// 其他附件默认数据数组 |
|
|
// // 其他附件默认数据数组 |
|
|
const annexTableData = ref<Array<any>>([]) |
|
|
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) => { |
|
|
props.annexTable?.forEach(async (item) => { |
|
|
let requstData = {...remarksData.data,tableName: item?.tableName} |
|
|
let requstData = {...remarksData.data,tableName: item?.tableName} |
|
|
const annexList = await FileApi.getFileList(requstData) |
|
|
const annexList = await FileApi.getFileList(requstData) |
|
@ -427,8 +446,24 @@ const getAnnexFileList = async () => { |
|
|
annexTableData.value.push({ |
|
|
annexTableData.value.push({ |
|
|
label: item.label, |
|
|
label: item.label, |
|
|
tableName: item?.tableName || '', |
|
|
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 = () => { |
|
|
const updateAnnexTableHandle = () => { |
|
|
getAnnexFileList() |
|
|
getAnnexFileList(detailData.value) |
|
|
getChangeRecordList() |
|
|
getChangeRecordList() |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
@ -526,7 +561,7 @@ const openDetail = async (row: any, titleName: any, titleValue: any, tableName: |
|
|
detailData.value = row |
|
|
detailData.value = row |
|
|
getRemarkList() |
|
|
getRemarkList() |
|
|
getFileList() |
|
|
getFileList() |
|
|
getAnnexFileList() |
|
|
getAnnexFileList(row) |
|
|
getChangeRecordList() |
|
|
getChangeRecordList() |
|
|
// 判断详情按钮是否显示 |
|
|
// 判断详情按钮是否显示 |
|
|
let detailButtonFilter: any = [] |
|
|
let detailButtonFilter: any = [] |
|
|