|
@@ -27,7 +27,12 @@ const setDefaultSource=(sourceText)=>{
|
|
|
}
|
|
|
|
|
|
async function getTableData(){
|
|
|
- const res = await infoByCode({ UniqueCode: params.code, FromScene: Number(params.fromScene||'') });
|
|
|
+ const res = await infoByCode({
|
|
|
+ UniqueCode: params.code,
|
|
|
+ FromScene: Number(params.fromScene||''),
|
|
|
+ ReferencedId: Number(params.sourceId||''),
|
|
|
+ Uuid: params.uid||""
|
|
|
+ });
|
|
|
if(res.Ret !== 200) return
|
|
|
|
|
|
info.value=res.Data
|
|
@@ -43,6 +48,24 @@ async function getTableData(){
|
|
|
}
|
|
|
|
|
|
getTableData()
|
|
|
+
|
|
|
+function getSizeStyle(index,type) {
|
|
|
+ const { HeightList,WidthList } = info.value.ReferencedExcelConfig;
|
|
|
+
|
|
|
+ if(WidthList&&HeightList) {
|
|
|
+ let columnsWArr = WidthList.split(',').map(_ =>Number(_)),
|
|
|
+ rowsHArr = HeightList.split(',').map(_ =>Number(_));
|
|
|
+
|
|
|
+ if(type === 'height') {
|
|
|
+ return rowsHArr[index]?`height:${rowsHArr[index]}px`:'';
|
|
|
+ }else {
|
|
|
+ return columnsWArr[index]?`width:${columnsWArr[index]}px`:''
|
|
|
+ }
|
|
|
+
|
|
|
+ }else {
|
|
|
+ return ''
|
|
|
+ }
|
|
|
+}
|
|
|
</script>
|
|
|
|
|
|
<template>
|
|
@@ -63,6 +86,7 @@ getTableData()
|
|
|
<tr
|
|
|
v-for="(item,index) in info.TableInfo?.TableDataList"
|
|
|
:key="index"
|
|
|
+ :style="`${getSizeStyle(index,'height')}`"
|
|
|
>
|
|
|
<td
|
|
|
:class="['data-cell',{
|
|
@@ -79,6 +103,8 @@ getTableData()
|
|
|
font-weight: ${cell.bl ? 'bold' : 'normal'};
|
|
|
font-style: ${cell.it ? 'italic' : 'normal'};
|
|
|
background: ${cell.bg};
|
|
|
+ font-size: ${cell.fs||info.Config?.FontSize||12}px;
|
|
|
+ ${getSizeStyle(cell_index,'width')}
|
|
|
`"
|
|
|
>
|
|
|
<div class="split-word" v-if="cell.ct.s">
|