f6416c1b by lihua

调整一些样式优化

1 parent d7f62632
...@@ -191,6 +191,7 @@ ...@@ -191,6 +191,7 @@
191 191
192 &::placeholder { 192 &::placeholder {
193 color: #b2b2b2; 193 color: #b2b2b2;
194 opacity: 1;
194 } 195 }
195 } 196 }
196 197
...@@ -204,6 +205,15 @@ ...@@ -204,6 +205,15 @@
204 } 205 }
205 } 206 }
206 207
208 .el-date-editor {
209 .el-range-input::placeholder {
210 font-family: simsun;
211 font-weight: 400;
212 color: #b2b2b2;
213 opacity: 1; /* 确保颜色完全显示,某些浏览器可能会降低 placeholder 的不透明度 */
214 }
215 }
216
207 .el-textarea { 217 .el-textarea {
208 --el-input-text-color: var(--el-color-regular); 218 --el-input-text-color: var(--el-color-regular);
209 } 219 }
...@@ -1210,3 +1220,12 @@ ...@@ -1210,3 +1220,12 @@
1210 height: 26px; 1220 height: 26px;
1211 line-height: 26px; 1221 line-height: 26px;
1212 } 1222 }
1223
1224 /** 策略管理详情表格不显示纵向滚动条 */
1225 .el-table.no-scroll-vertical {
1226 .el-table__body-wrapper {
1227 .el-scrollbar__bar.is-vertical {
1228 display: none !important;
1229 }
1230 }
1231 }
......
...@@ -47,9 +47,10 @@ const setRefMap = (el: any, item: string) => { ...@@ -47,9 +47,10 @@ const setRefMap = (el: any, item: string) => {
47 } 47 }
48 48
49 const onMouseOver = (str) => { 49 const onMouseOver = (str) => {
50 let parentWidth = refMap?.[str]?.parentNode?.offsetWidth; 50 let rect = refMap?.[str]?.parentNode?.getBoundingClientRect();
51 let parentWidth = rect?.width;
51 let parentHeight = refMap?.[str]?.parentNode?.offsetHeight; 52 let parentHeight = refMap?.[str]?.parentNode?.offsetHeight;
52 let contentWidth = refMap?.[str]?.offsetWidth; 53 let contentWidth = refMap?.[str]?.getBoundingClientRect()?.width;
53 let contentHeight = refMap?.[str]?.offsetHeight; 54 let contentHeight = refMap?.[str]?.offsetHeight;
54 // 判断是否开启tooltip功能 55 // 判断是否开启tooltip功能
55 56
......
...@@ -243,7 +243,7 @@ onMounted(() => { ...@@ -243,7 +243,7 @@ onMounted(() => {
243 height: props.tableInfo.height ?? '100%', 243 height: props.tableInfo.height ?? '100%',
244 'min-height': props.tableInfo.minPanelHeight ?? '' 244 'min-height': props.tableInfo.minPanelHeight ?? ''
245 }"> 245 }">
246 <el-table ref="tableRef" :class="{ 'no-edit': props.tableInfo.readonly, 'sort-table': props.tableInfo.sortable }" 246 <el-table ref="tableRef" :class="[ props.tableInfo.readonly ? 'no-edit' : '', props.tableInfo.sortable ? 'sort-table' : '', props.tableInfo.class || '']"
247 :data="tableData" :highlight-current-row="props.tableInfo.heightlightRow ?? true" 247 :data="tableData" :highlight-current-row="props.tableInfo.heightlightRow ?? true"
248 :show-header="props.tableInfo.showHeader ?? true" stripe :border="props.tableInfo.border 248 :show-header="props.tableInfo.showHeader ?? true" stripe :border="props.tableInfo.border
249 ?? true" :height="props.tableInfo.height === null ? null : (props.tableInfo.height ?? '100%')" 249 ?? true" :height="props.tableInfo.height === null ? null : (props.tableInfo.height ?? '100%')"
...@@ -534,7 +534,7 @@ onMounted(() => { ...@@ -534,7 +534,7 @@ onMounted(() => {
534 }}</span> 534 }}</span>
535 </template> 535 </template>
536 </el-table-column> 536 </el-table-column>
537 <el-table-column :width="actionInfo.width" :class-name="actionInfo.columClass" fixed="right" 537 <el-table-column :width="actionInfo.width" :class-name="actionInfo.columClass" :fixed="actionInfo.fixed ?? 'right'"
538 v-if="actionInfo.show ?? true"> 538 v-if="actionInfo.show ?? true">
539 <template #header> 539 <template #header>
540 <div class="header_title"> 540 <div class="header_title">
......
...@@ -336,14 +336,19 @@ const getDetailInfo = () => { ...@@ -336,14 +336,19 @@ const getDetailInfo = () => {
336 /** ----------------- 数据包信息 --------------------- */ 336 /** ----------------- 数据包信息 --------------------- */
337 const productTableInfo = ref({ 337 const productTableInfo = ref({
338 id: "input-product-table", 338 id: "input-product-table",
339 height: '214px', 339 height: 'auto',
340 minPanelHeight: '40px',
341 minHeight: '40px',
342 class: 'no-scroll-vertical',
340 fields: [ 343 fields: [
341 { label: "序号", type: "index", width: TableColumnWidth.INDEX, align: "center" }, 344 { label: "序号", type: "index", width: TableColumnWidth.INDEX, align: "center" },
342 { label: "服务名称", field: "apiName", width: 180 }, 345 { label: "服务名称", field: "apiName", width: 180 },
343 { label: "API类型", field: "apiType", width: 100, getName: (scope) => { 346 {
347 label: "API类型", field: "apiType", width: 100, getName: (scope) => {
344 return scope.row.apiType && apiTypes.find(a => a.value == scope.row.apiType)?.label; 348 return scope.row.apiType && apiTypes.find(a => a.value == scope.row.apiType)?.label;
345 } }, 349 }
346 { label: "API地址", field: "requestUrl", width: 240 }, 350 },
351 { label: "API地址", field: "requestUrl", width: 'auto', minWidth: 200 },
347 { label: "描述", field: "apiDescription", width: 240 }, 352 { label: "描述", field: "apiDescription", width: 240 },
348 ], 353 ],
349 data: [], 354 data: [],
...@@ -351,9 +356,10 @@ const productTableInfo = ref({ ...@@ -351,9 +356,10 @@ const productTableInfo = ref({
351 actionInfo: { 356 actionInfo: {
352 label: "操作", 357 label: "操作",
353 type: "btn", 358 type: "btn",
359 fixed: false,
354 show: !detailInfo.value.nodeId && (route.query.foundMode == 'read' || route.query.foundMode == 'download'), 360 show: !detailInfo.value.nodeId && (route.query.foundMode == 'read' || route.query.foundMode == 'download'),
355 isMore: false, 361 isMore: false,
356 width: 130, 362 width: 90,
357 btns: (scope) => { 363 btns: (scope) => {
358 let arrBtns: any = []; 364 let arrBtns: any = [];
359 //若是使用方,则换一个api地址。使用操作是查看时可以查看 365 //若是使用方,则换一个api地址。使用操作是查看时可以查看
...@@ -1415,7 +1421,7 @@ const respParamsTableInfo = ref({ ...@@ -1415,7 +1421,7 @@ const respParamsTableInfo = ref({
1415 </div> 1421 </div>
1416 </ContentWrap> 1422 </ContentWrap>
1417 <ContentWrap v-if="productTableInfo.data?.length" id="product-info" title="服务包信息" style="margin: 16px 16px 16px"> 1423 <ContentWrap v-if="productTableInfo.data?.length" id="product-info" title="服务包信息" style="margin: 16px 16px 16px">
1418 <Table ref="productTableRef" :tableInfo="productTableInfo" class="fiveRow-table" /> 1424 <Table ref="productTableRef" :tableInfo="productTableInfo" />
1419 </ContentWrap> 1425 </ContentWrap>
1420 <ContentWrap v-if="isJSZQ" id="id-paramsInfo" title="入参出参信息" description="" style="margin: 16px 16px 16px"> 1426 <ContentWrap v-if="isJSZQ" id="id-paramsInfo" title="入参出参信息" description="" style="margin: 16px 16px 16px">
1421 <el-tabs v-model="activeTabName" class="param-tabs"> 1427 <el-tabs v-model="activeTabName" class="param-tabs">
...@@ -1430,10 +1436,9 @@ const respParamsTableInfo = ref({ ...@@ -1430,10 +1436,9 @@ const respParamsTableInfo = ref({
1430 <ContentWrap id="id-table" title="资源表" v-if="detailInfo.damCatalogTableInfo?.length" description="" 1436 <ContentWrap id="id-table" title="资源表" v-if="detailInfo.damCatalogTableInfo?.length" description=""
1431 style="margin: 16px 16px 16px"> 1437 style="margin: 16px 16px 16px">
1432 <el-table v-show="!fullscreenLoading" ref="tableRef" :data="detailInfo.damCatalogTableInfo" 1438 <el-table v-show="!fullscreenLoading" ref="tableRef" :data="detailInfo.damCatalogTableInfo"
1433 :highlight-current-row="true" stripe border @expand-change="handleTableExpandChange" height="100%" 1439 :highlight-current-row="true" stripe border @expand-change="handleTableExpandChange" max-height="350"
1434 tooltip-effect="light" row-key="guid" :style="{ 1440 tooltip-effect="light" row-key="guid" :style="{
1435 width: '100%', 1441 width: '100%',
1436 height: '350px',
1437 display: 'inline-block', 1442 display: 'inline-block',
1438 }"> 1443 }">
1439 <el-table-column type="expand"> 1444 <el-table-column type="expand">
...@@ -1489,11 +1494,11 @@ const respParamsTableInfo = ref({ ...@@ -1489,11 +1494,11 @@ const respParamsTableInfo = ref({
1489 </el-table-column> 1494 </el-table-column>
1490 <el-table-column label="序号" type="index" width="56px" align="center" show-overflow-tooltip> 1495 <el-table-column label="序号" type="index" width="56px" align="center" show-overflow-tooltip>
1491 </el-table-column> 1496 </el-table-column>
1492 <el-table-column prop="tableChName" label="表中文名称" width="150px" align="left" show-overflow-tooltip> 1497 <el-table-column prop="tableChName" label="表中文名称" width="160px" align="left" show-overflow-tooltip>
1493 </el-table-column> 1498 </el-table-column>
1494 <el-table-column prop="tableName" label="表英文名称" width="150px" align="left" show-overflow-tooltip> 1499 <el-table-column prop="tableName" label="表英文名称" width="140px" align="left" show-overflow-tooltip>
1495 </el-table-column> 1500 </el-table-column>
1496 <el-table-column prop="dataCount" label="表数据总数(条)" width="150px" align="right" show-overflow-tooltip> 1501 <el-table-column prop="dataCount" label="表数据总数(条)" width="140px" align="right" show-overflow-tooltip>
1497 <template #default="scope"> 1502 <template #default="scope">
1498 <span>{{ scope.row["dataCount"] == null ? '--' : changeNum(scope.row["dataCount"], 0) }}</span> 1503 <span>{{ scope.row["dataCount"] == null ? '--' : changeNum(scope.row["dataCount"], 0) }}</span>
1499 </template> 1504 </template>
...@@ -1508,13 +1513,13 @@ const respParamsTableInfo = ref({ ...@@ -1508,13 +1513,13 @@ const respParamsTableInfo = ref({
1508 <span>{{ scope.row["updateUserName"] || '--' }}</span> 1513 <span>{{ scope.row["updateUserName"] || '--' }}</span>
1509 </template> 1514 </template>
1510 </el-table-column> 1515 </el-table-column>
1511 <el-table-column prop="updateTime" label="修改时间" width="180px" align="left" show-overflow-tooltip> 1516 <el-table-column prop="updateTime" label="修改时间" width="170px" align="left" show-overflow-tooltip>
1512 <template #default="scope"> 1517 <template #default="scope">
1513 <span>{{ scope.row["updateTime"] || '--' }}</span> 1518 <span>{{ scope.row["updateTime"] || '--' }}</span>
1514 </template> 1519 </template>
1515 </el-table-column> 1520 </el-table-column>
1516 <el-table-column label="操作" v-if="!detailInfo.nodeId || foundMode == 'download' || foundMode == 'read' || foundMode == 'readAndDown'" 1521 <el-table-column label="操作" v-if="!detailInfo.nodeId || foundMode == 'download' || foundMode == 'read' || foundMode == 'readAndDown'"
1517 width="220px" align="left" fixed="right" show-overflow-tooltip> 1522 :width="foundMode == 'readAndDown' ? '220px' : '140px'" align="left" fixed="right" show-overflow-tooltip>
1518 <template #default="scope"> 1523 <template #default="scope">
1519 <!-- 如果是下载,就只显示下载,如果是查看和下载就都显示,就两个按钮都显示。仅查看,就仅查看 --> 1524 <!-- 如果是下载,就只显示下载,如果是查看和下载就都显示,就两个按钮都显示。仅查看,就仅查看 -->
1520 <span v-show="foundMode != 'download'" class="text_btn" @click="handleTableViewData(scope)">查看样例数据</span> 1525 <span v-show="foundMode != 'download'" class="text_btn" @click="handleTableViewData(scope)">查看样例数据</span>
......
...@@ -163,17 +163,17 @@ const tableInfo = ref({ ...@@ -163,17 +163,17 @@ const tableInfo = ref({
163 { 163 {
164 label: "平均响应时间(s)", field: "averageRespTime", width: 130, align: 'right', type: 'chnum' 164 label: "平均响应时间(s)", field: "averageRespTime", width: 130, align: 'right', type: 'chnum'
165 }, 165 },
166 { 166 // {
167 label: "绑定连接器数", field: "bindingCount", width: 130, align: 'right', type: "text_btn", value: "detail", click: (scope) => { 167 // label: "绑定连接器数", field: "bindingCount", width: 130, align: 'right', type: "text_btn", value: "detail", click: (scope) => {
168 if (!scope.row.bindingCount) { 168 // if (!scope.row.bindingCount) {
169 proxy.$ElMessage.warning('当前没有绑定连接器'); 169 // proxy.$ElMessage.warning('当前没有绑定连接器');
170 return; 170 // return;
171 } 171 // }
172 //TODO, 查看连接器信息。 172 // //TODO, 查看连接器信息。
173 }, getName: (scope) => { 173 // }, getName: (scope) => {
174 return scope.row.bindingCount != null ? changeNum(scope.row.bindingCount ?? 0) : '--'; 174 // return scope.row.bindingCount != null ? changeNum(scope.row.bindingCount ?? 0) : '--';
175 } 175 // }
176 }, 176 // },
177 { label: "API请求路径", field: "requestUrl", width: TableColumnWidth.DESCRIPTION }, 177 { label: "API请求路径", field: "requestUrl", width: TableColumnWidth.DESCRIPTION },
178 { 178 {
179 label: '状态', field: 'apiState', type: 'switch', activeText: '启用', inactiveText: '停用', activeValue: 1, inactiveValue: 0, switchWidth: 56, width: 96, align: 'center' 179 label: '状态', field: 'apiState', type: 'switch', activeText: '启用', inactiveText: '停用', activeValue: 1, inactiveValue: 0, switchWidth: 56, width: 96, align: 'center'
......
...@@ -3,11 +3,11 @@ ...@@ -3,11 +3,11 @@
3 <div class="h-title">策略信息</div> 3 <div class="h-title">策略信息</div>
4 <el-button v-if="!isLook" plain @click="invokeTemplate" v-preReClick>合约模板调用</el-button> 4 <el-button v-if="!isLook" plain @click="invokeTemplate" v-preReClick>合约模板调用</el-button>
5 </div> 5 </div>
6 <el-table class="strategyTable" ref="strategyTableRef" v-loading="strategyDataLoading" :data="strategyData" 6 <el-table class="strategyTable no-scroll-vertical" ref="strategyTableRef" v-loading="strategyDataLoading" :data="strategyData"
7 :height="isReport ? 'auto' : '250px'" :highlight-current-row="true" stripe tooltip-effect="light" border 7 :height="(isReport || isLook) ? 'auto' : '250px'" :highlight-current-row="true" stripe tooltip-effect="light" border
8 :span-method="arraySpanMethod"> 8 :span-method="arraySpanMethod">
9 <el-table-column label="序号" width="56" align="center" fixed="left" :formatter="formatIndex" /> 9 <el-table-column label="序号" width="56" align="center" fixed="left" :formatter="formatIndex" />
10 <el-table-column prop="action" label="行为类型" :width="isReport ? 'auto' : '150px'" 10 <el-table-column prop="action" label="行为类型" :width="isLook ? '106px' : (isReport ? 'auto' : '150px')"
11 :min-width="isReport ? '100px' : undefined" align="left" :show-overflow-tooltip="!isReport"> 11 :min-width="isReport ? '100px' : undefined" align="left" :show-overflow-tooltip="!isReport">
12 <template #header> 12 <template #header>
13 <span>行为类型</span> 13 <span>行为类型</span>
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
31 <span v-else>{{ scope.row['actionEnName'] || '--' }}</span> 31 <span v-else>{{ scope.row['actionEnName'] || '--' }}</span>
32 </template> 32 </template>
33 </el-table-column> 33 </el-table-column>
34 <el-table-column prop="constraintName" label="约束条件" :width="isReport ? 'auto' : '150px'" 34 <el-table-column prop="constraintName" label="约束条件" :width="isLook ? '135px' : (isReport ? 'auto' : '150px')"
35 :min-width="isReport ? '100px' : undefined" align="left" :show-overflow-tooltip="!isReport"> 35 :min-width="isReport ? '100px' : undefined" align="left" :show-overflow-tooltip="!isReport">
36 <template #header> 36 <template #header>
37 <span>约束条件</span> 37 <span>约束条件</span>
...@@ -46,14 +46,14 @@ ...@@ -46,14 +46,14 @@
46 <span v-else>{{ scope.row['constraintName'] || '--' }}</span> 46 <span v-else>{{ scope.row['constraintName'] || '--' }}</span>
47 </template> 47 </template>
48 </el-table-column> 48 </el-table-column>
49 <el-table-column prop="constraintEnName" label="约束条件英文名称" :width="isReport ? 'auto' : '150px'" 49 <el-table-column prop="constraintEnName" label="约束条件英文名称" :width="isReport ? 'auto' : '162px'"
50 :min-width="isReport ? '120px' : undefined" align="left" :show-overflow-tooltip="!isReport"> 50 :min-width="isReport ? '120px' : undefined" align="left" :show-overflow-tooltip="!isReport">
51 <template #default="scope"> 51 <template #default="scope">
52 <el-input v-if="!isLook" v-model="scope.row['constraintEnName']" :disabled="true" placeholder="-"></el-input> 52 <el-input v-if="!isLook" v-model="scope.row['constraintEnName']" :disabled="true" placeholder="-"></el-input>
53 <span v-else>{{ scope.row['constraintEnName'] || '--' }}</span> 53 <span v-else>{{ scope.row['constraintEnName'] || '--' }}</span>
54 </template> 54 </template>
55 </el-table-column> 55 </el-table-column>
56 <el-table-column prop="constraintOperatorCode" label="运算符" :width="isReport ? 'auto' : '150px'" 56 <el-table-column prop="constraintOperatorCode" label="运算符" :width="isLook ? '118px' : (isReport ? 'auto' : '150px')"
57 :min-width="isReport ? '100px' : undefined" align="left" :show-overflow-tooltip="!isReport"> 57 :min-width="isReport ? '100px' : undefined" align="left" :show-overflow-tooltip="!isReport">
58 <template #header> 58 <template #header>
59 <span>运算符</span> 59 <span>运算符</span>
...@@ -68,8 +68,8 @@ ...@@ -68,8 +68,8 @@
68 <span v-else>{{ scope.row['constraintOperatorName'] || '--' }}</span> 68 <span v-else>{{ scope.row['constraintOperatorName'] || '--' }}</span>
69 </template> 69 </template>
70 </el-table-column> 70 </el-table-column>
71 <el-table-column prop="constraintValue" label="约束值" :width="isReport ? 'auto' : '340px'" 71 <el-table-column prop="constraintValue" label="约束值" :width="(isReport || isLook) ? 'auto' : '300px'"
72 :min-width="isReport ? '160px' : undefined" align="left" :show-overflow-tooltip="!isReport"> 72 :min-width="(isReport || isLook) ? '160px' : undefined" align="left" :show-overflow-tooltip="!isReport">
73 <template #header> 73 <template #header>
74 <span>约束值</span> 74 <span>约束值</span>
75 <!-- <span style="color:red;margin-left: 2px;">*</span> --> 75 <!-- <span style="color:red;margin-left: 2px;">*</span> -->
......
...@@ -65,7 +65,7 @@ const tableFields = ref([ ...@@ -65,7 +65,7 @@ const tableFields = ref([
65 { label: "产品名称", field: "productName", width: 180 }, 65 { label: "产品名称", field: "productName", width: 180 },
66 { label: "合约编号", field: "contractId", width: 355 }, 66 { label: "合约编号", field: "contractId", width: 355 },
67 { label: "合约状态", field: "contractStatus", type: "tag", width: 96, align: 'center' }, 67 { label: "合约状态", field: "contractStatus", type: "tag", width: 96, align: 'center' },
68 { label: "发起主体", field: "tenantName", width: 205 }, 68 { label: "发起主体", field: "tenantName", width: 200 },
69 { label: "签署时间", field: "signatureTime", width: 170 } 69 { label: "签署时间", field: "signatureTime", width: 170 }
70 ]); 70 ]);
71 71
......
...@@ -252,7 +252,10 @@ const btnHandles = ref({ ...@@ -252,7 +252,10 @@ const btnHandles = ref({
252 252
253 const extendTableInfo = ref({ 253 const extendTableInfo = ref({
254 id: "input-extend-table", 254 id: "input-extend-table",
255 height: '214px', 255 height: 'auto',
256 class: 'no-scroll-vertical',
257 minPanelHeight: '60px',
258 minHeight: '60px',
256 fields: [ 259 fields: [
257 { label: "序号", type: "index", width: TableColumnWidth.INDEX, align: "center" }, 260 { label: "序号", type: "index", width: TableColumnWidth.INDEX, align: "center" },
258 { label: "扩展字段名称", field: "expansionFieldName", width: 160 }, 261 { label: "扩展字段名称", field: "expansionFieldName", width: 160 },
...@@ -290,12 +293,12 @@ const exportExtendTableInfo = computed(() => { ...@@ -290,12 +293,12 @@ const exportExtendTableInfo = computed(() => {
290 293
291 const productTableInfo = ref({ 294 const productTableInfo = ref({
292 id: "input-product-table", 295 id: "input-product-table",
293 height: '75px', 296 height: 'auto',
294 minHeight: '60px', 297 minHeight: '60px',
295 minPanelHeight: '60px', 298 minPanelHeight: '60px',
296 fields: [ 299 fields: [
297 { label: "序号", type: "index", width: TableColumnWidth.INDEX, align: "center" }, 300 { label: "序号", type: "index", width: TableColumnWidth.INDEX, align: "center" },
298 { label: "数据产品", field: "dataProductName", width: 180 }, 301 { label: "数据产品", field: "dataProductName", width: 270 },
299 { label: "数据产品编码", field: "dataProductId", width: 261 }, 302 { label: "数据产品编码", field: "dataProductId", width: 261 },
300 { label: "所属主体名称", field: "dataProductEntityName", width: 240 }, 303 { label: "所属主体名称", field: "dataProductEntityName", width: 240 },
301 { label: "产品简介", field: "dataProductAbstract", width: 240 }, 304 { label: "产品简介", field: "dataProductAbstract", width: 240 },
...@@ -582,37 +585,36 @@ const signFileLoading = ref(false); ...@@ -582,37 +585,36 @@ const signFileLoading = ref(false);
582 585
583 const signFileUrlInfo: any = ref({ name: '', url: '' }); 586 const signFileUrlInfo: any = ref({ name: '', url: '' });
584 587
585 function getElementPdfPosition(element, options = {}) { 588 // function getElementPdfPosition(element, options = {}) {
586 const { scale = 2, pageHeightPt = 842 } = options; 589 // const { scale = 2, pageHeightPt = 842 } = options;
587 590
588 // 1. 获取元素距离容器顶部的像素距离 591 // // 1. 获取元素距离容器顶部的像素距离
589 const container = document.getElementById('pdf-container'); // 你的根容器 592 // const container = document.getElementById('pdf-container'); // 你的根容器
590 const rect = element.getBoundingClientRect(); 593 // const rect = element.getBoundingClientRect();
591 const containerRect = container.getBoundingClientRect(); 594 // const containerRect = container.getBoundingClientRect();
592 const topPx = rect.top - containerRect.top + window.scrollY; 595 // const topPx = rect.top - containerRect.top + window.scrollY;
593 596
594 // 2. html2canvas 默认使用 devicePixelRatio,但 html2pdf 通常固定 scale 597 // // 2. html2canvas 默认使用 devicePixelRatio,但 html2pdf 通常固定 scale
595 // html2pdf 内部会将 canvas 高度按比例缩放到 PDF 页面宽度 598 // // html2pdf 内部会将 canvas 高度按比例缩放到 PDF 页面宽度
596 // 简化模型:假设 PDF 宽度 = 595pt (A4),对应 canvas.width / scale px 599 // // 简化模型:假设 PDF 宽度 = 595pt (A4),对应 canvas.width / scale px
597 600
598 const pdfPageWidthPt = 595; // A4 width in pt 601 // const pdfPageWidthPt = 595; // A4 width in pt
599 const containerWidthPx = container.offsetWidth; 602 // const containerWidthPx = container.offsetWidth;
600 const pxToPtRatio = pdfPageWidthPt / containerWidthPx; // 每像素多少 pt 603 // const pxToPtRatio = pdfPageWidthPt / containerWidthPx; // 每像素多少 pt
601
602 const topPt = topPx * pxToPtRatio;
603 604
604 // 3. 计算落在第几页 & 页内 Y 坐标 605 // const topPt = topPx * pxToPtRatio;
605 const page = Math.floor(topPt / pageHeightPt) + 1;
606 const yInPage = topPt % pageHeightPt;
607 606
608 return { 607 // // 3. 计算落在第几页 & 页内 Y 坐标
609 page, 608 // const page = Math.floor(topPt / pageHeightPt) + 1;
610 x: rect.left * pxToPtRatio, // 可选 X 坐标 609 // const yInPage = topPt % pageHeightPt;
611 y: yInPage,
612 totalY: topPt
613 };
614 }
615 610
611 // return {
612 // page,
613 // x: rect.left * pxToPtRatio, // 可选 X 坐标
614 // y: yInPage,
615 // totalY: topPt
616 // };
617 // }
616 618
617 const geneSignFile = async () => { 619 const geneSignFile = async () => {
618 const element = document.getElementById('pdf-content'); // 指定要转PDF的DOM 620 const element = document.getElementById('pdf-content'); // 指定要转PDF的DOM
...@@ -1437,7 +1439,7 @@ onActivated(() => { ...@@ -1437,7 +1439,7 @@ onActivated(() => {
1437 <el-table-column type="expand"> 1439 <el-table-column type="expand">
1438 <template #default="scope"> 1440 <template #default="scope">
1439 <div class="h-title mt6">履约证明</div> 1441 <div class="h-title mt6">履约证明</div>
1440 <div class="list_panel" style="width: 1000px;"> 1442 <div class="list_panel" style="width: 1200px;">
1441 <div class="list_item"> 1443 <div class="list_item">
1442 <span class="item_label">日志摘要:</span> 1444 <span class="item_label">日志摘要:</span>
1443 <span class="item_value"><ellipsis-tooltip :content="scope.row?.contractProof?.logHash || '--'" 1445 <span class="item_value"><ellipsis-tooltip :content="scope.row?.contractProof?.logHash || '--'"
...@@ -1451,16 +1453,16 @@ onActivated(() => { ...@@ -1451,16 +1453,16 @@ onActivated(() => {
1451 </span> 1453 </span>
1452 </div> 1454 </div>
1453 <div class="list_item"> 1455 <div class="list_item">
1454 <span class="item_label">发送时间:</span> 1456 <span class="item_label">区块链时间:</span>
1455 <span class="item_value"><ellipsis-tooltip :content="scope.row?.contractProof?.sendTime || '--'" 1457 <span class="item_value"><ellipsis-tooltip :content="scope.row?.contractProof?.sendTime || '--'"
1456 class-name="w100f mr8-i" :refName="'tooltipOver' + 'sendTime'"></ellipsis-tooltip></span> 1458 class-name="w100f mr8-i" :refName="'tooltipOver' + 'sendTime'"></ellipsis-tooltip></span>
1457 </div> 1459 </div>
1458 <div class="list_item" style="width: 50%;"> 1460 <div class="list_item" style="width: 50%;">
1459 <span class="item_label">履约连接器签名:</span> 1461 <span class="item_label">履约连接器名称:</span>
1460 <!-- <template v-if="scope.row?.signature?.url"> 1462 <!-- <template v-if="scope.row?.signature?.url">
1461 <showFile :file="[execProofDetailInfo.signature]"></showFile> 1463 <showFile :file="[execProofDetailInfo.signature]"></showFile>
1462 </template> --> 1464 </template> -->
1463 <span class="item_value">{{ scope.row?.contractProof?.signature || '--' }}</span> 1465 <span class="item_value">{{ scope.row?.contractProof?.connectName || '--' }}</span>
1464 </div> 1466 </div>
1465 </div> 1467 </div>
1466 </template> 1468 </template>
...@@ -1566,7 +1568,7 @@ onActivated(() => { ...@@ -1566,7 +1568,7 @@ onActivated(() => {
1566 <Dialog ref="dialogRef" :dialogInfo="detailDialogInfo" class="policy-table-detail" 1568 <Dialog ref="dialogRef" :dialogInfo="detailDialogInfo" class="policy-table-detail"
1567 @btnClick="handleVersionDialogBtnClick"> 1569 @btnClick="handleVersionDialogBtnClick">
1568 <template #extra-content> 1570 <template #extra-content>
1569 <div v-loading="detailDialogInfo.contentLoading"> 1571 <div v-loading="detailDialogInfo.contentLoading" style="max-height: 600px;overflow-y: auto;">
1570 <StrategyTable ref="strategyTableDetailRef" :show-title="true" :is-look="true" :value="versionDetail"> 1572 <StrategyTable ref="strategyTableDetailRef" :show-title="true" :is-look="true" :value="versionDetail">
1571 </StrategyTable> 1573 </StrategyTable>
1572 </div> 1574 </div>
......
...@@ -54,7 +54,7 @@ const tableFields = ref([ ...@@ -54,7 +54,7 @@ const tableFields = ref([
54 { label: "签署方式", field: "signModeName", width: 120 }, 54 { label: "签署方式", field: "signModeName", width: 120 },
55 { label: "合约状态", field: "contractStatus", type: "tag", width: 96, align: 'center' }, 55 { label: "合约状态", field: "contractStatus", type: "tag", width: 96, align: 'center' },
56 { label: "合约编号", field: "contractId", width: 355 }, 56 { label: "合约编号", field: "contractId", width: 355 },
57 { label: "发起主体", field: "tenantName", width: 205 }, 57 { label: "发起主体", field: "tenantName", width: 200 },
58 { label: "创建人", field: "createUserName", width: 130 }, 58 { label: "创建人", field: "createUserName", width: 130 },
59 { label: "创建时间", field: "createTime", width: 170 }, 59 { label: "创建时间", field: "createTime", width: 170 },
60 { label: "提交企业", field: "submitTenantName", width: 200 }, 60 { label: "提交企业", field: "submitTenantName", width: 200 },
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!