a223d0c2 by lihua

调整一些样式优化

1 parent 97c1847f
...@@ -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 }
...@@ -1213,4 +1223,13 @@ ...@@ -1213,4 +1223,13 @@
1213 .el-form-item--default .el-form-item__label { 1223 .el-form-item--default .el-form-item__label {
1214 height: 26px; 1224 height: 26px;
1215 line-height: 26px; 1225 line-height: 26px;
1216 }
...\ No newline at end of file ...\ No newline at end of file
1226 }
1227
1228 /** 策略管理详情表格不显示纵向滚动条 */
1229 .el-table.no-scroll-vertical {
1230 .el-table__body-wrapper {
1231 .el-scrollbar__bar.is-vertical {
1232 display: none !important;
1233 }
1234 }
1235 }
......
...@@ -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,7 +336,10 @@ const getDetailInfo = () => { ...@@ -336,7 +336,10 @@ 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 },
...@@ -345,7 +348,7 @@ const productTableInfo = ref({ ...@@ -345,7 +348,7 @@ const productTableInfo = ref({
345 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;
346 } 349 }
347 }, 350 },
348 { label: "API地址", field: "requestUrl", width: 240 }, 351 { label: "API地址", field: "requestUrl", width: 'auto', minWidth: 200 },
349 { label: "描述", field: "apiDescription", width: 240 }, 352 { label: "描述", field: "apiDescription", width: 240 },
350 ], 353 ],
351 data: [], 354 data: [],
...@@ -353,9 +356,10 @@ const productTableInfo = ref({ ...@@ -353,9 +356,10 @@ const productTableInfo = ref({
353 actionInfo: { 356 actionInfo: {
354 label: "操作", 357 label: "操作",
355 type: "btn", 358 type: "btn",
359 fixed: false,
356 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'),
357 isMore: false, 361 isMore: false,
358 width: 130, 362 width: 90,
359 btns: (scope) => { 363 btns: (scope) => {
360 let arrBtns: any = []; 364 let arrBtns: any = [];
361 //若是使用方,则换一个api地址。使用操作是查看时可以查看 365 //若是使用方,则换一个api地址。使用操作是查看时可以查看
...@@ -1420,7 +1424,7 @@ const respParamsTableInfo = ref({ ...@@ -1420,7 +1424,7 @@ const respParamsTableInfo = ref({
1420 </div> 1424 </div>
1421 </ContentWrap> 1425 </ContentWrap>
1422 <ContentWrap v-if="productTableInfo.data?.length" id="product-info" title="服务包信息" style="margin: 16px 16px 16px"> 1426 <ContentWrap v-if="productTableInfo.data?.length" id="product-info" title="服务包信息" style="margin: 16px 16px 16px">
1423 <Table ref="productTableRef" :tableInfo="productTableInfo" class="fiveRow-table" /> 1427 <Table ref="productTableRef" :tableInfo="productTableInfo" />
1424 </ContentWrap> 1428 </ContentWrap>
1425 <ContentWrap v-if="isJSZQ" id="id-paramsInfo" title="入参出参信息" description="" style="margin: 16px 16px 16px"> 1429 <ContentWrap v-if="isJSZQ" id="id-paramsInfo" title="入参出参信息" description="" style="margin: 16px 16px 16px">
1426 <el-tabs v-model="activeTabName" class="param-tabs"> 1430 <el-tabs v-model="activeTabName" class="param-tabs">
...@@ -1435,10 +1439,9 @@ const respParamsTableInfo = ref({ ...@@ -1435,10 +1439,9 @@ const respParamsTableInfo = ref({
1435 <ContentWrap id="id-table" title="资源表" v-if="detailInfo.damCatalogTableInfo?.length" description="" 1439 <ContentWrap id="id-table" title="资源表" v-if="detailInfo.damCatalogTableInfo?.length" description=""
1436 style="margin: 16px 16px 16px"> 1440 style="margin: 16px 16px 16px">
1437 <el-table v-show="!fullscreenLoading" ref="tableRef" :data="detailInfo.damCatalogTableInfo" 1441 <el-table v-show="!fullscreenLoading" ref="tableRef" :data="detailInfo.damCatalogTableInfo"
1438 :highlight-current-row="true" stripe border @expand-change="handleTableExpandChange" height="100%" 1442 :highlight-current-row="true" stripe border @expand-change="handleTableExpandChange" max-height="350"
1439 tooltip-effect="light" row-key="guid" :style="{ 1443 tooltip-effect="light" row-key="guid" :style="{
1440 width: '100%', 1444 width: '100%',
1441 height: '350px',
1442 display: 'inline-block', 1445 display: 'inline-block',
1443 }"> 1446 }">
1444 <el-table-column type="expand"> 1447 <el-table-column type="expand">
...@@ -1494,11 +1497,11 @@ const respParamsTableInfo = ref({ ...@@ -1494,11 +1497,11 @@ const respParamsTableInfo = ref({
1494 </el-table-column> 1497 </el-table-column>
1495 <el-table-column label="序号" type="index" width="56px" align="center" show-overflow-tooltip> 1498 <el-table-column label="序号" type="index" width="56px" align="center" show-overflow-tooltip>
1496 </el-table-column> 1499 </el-table-column>
1497 <el-table-column prop="tableChName" label="表中文名称" width="150px" align="left" show-overflow-tooltip> 1500 <el-table-column prop="tableChName" label="表中文名称" width="160px" align="left" show-overflow-tooltip>
1498 </el-table-column> 1501 </el-table-column>
1499 <el-table-column prop="tableName" label="表英文名称" width="150px" align="left" show-overflow-tooltip> 1502 <el-table-column prop="tableName" label="表英文名称" width="140px" align="left" show-overflow-tooltip>
1500 </el-table-column> 1503 </el-table-column>
1501 <el-table-column prop="dataCount" label="表数据总数(条)" width="150px" align="right" show-overflow-tooltip> 1504 <el-table-column prop="dataCount" label="表数据总数(条)" width="140px" align="right" show-overflow-tooltip>
1502 <template #default="scope"> 1505 <template #default="scope">
1503 <span>{{ scope.row["dataCount"] == null ? '--' : changeNum(scope.row["dataCount"], 0) }}</span> 1506 <span>{{ scope.row["dataCount"] == null ? '--' : changeNum(scope.row["dataCount"], 0) }}</span>
1504 </template> 1507 </template>
...@@ -1513,13 +1516,13 @@ const respParamsTableInfo = ref({ ...@@ -1513,13 +1516,13 @@ const respParamsTableInfo = ref({
1513 <span>{{ scope.row["updateUserName"] || '--' }}</span> 1516 <span>{{ scope.row["updateUserName"] || '--' }}</span>
1514 </template> 1517 </template>
1515 </el-table-column> 1518 </el-table-column>
1516 <el-table-column prop="updateTime" label="修改时间" width="180px" align="left" show-overflow-tooltip> 1519 <el-table-column prop="updateTime" label="修改时间" width="170px" align="left" show-overflow-tooltip>
1517 <template #default="scope"> 1520 <template #default="scope">
1518 <span>{{ scope.row["updateTime"] || '--' }}</span> 1521 <span>{{ scope.row["updateTime"] || '--' }}</span>
1519 </template> 1522 </template>
1520 </el-table-column> 1523 </el-table-column>
1521 <el-table-column label="操作" v-if="!detailInfo.nodeId || foundMode == 'download' || foundMode == 'read' || foundMode == 'readAndDown'" 1524 <el-table-column label="操作" v-if="!detailInfo.nodeId || foundMode == 'download' || foundMode == 'read' || foundMode == 'readAndDown'"
1522 width="220px" align="left" fixed="right" show-overflow-tooltip> 1525 :width="foundMode == 'readAndDown' ? '220px' : '140px'" align="left" fixed="right" show-overflow-tooltip>
1523 <template #default="scope"> 1526 <template #default="scope">
1524 <!-- 如果是下载,就只显示下载,如果是查看和下载就都显示,就两个按钮都显示。仅查看,就仅查看 --> 1527 <!-- 如果是下载,就只显示下载,如果是查看和下载就都显示,就两个按钮都显示。仅查看,就仅查看 -->
1525 <span v-show="foundMode != 'download'" class="text_btn" @click="handleTableViewData(scope)">查看样例数据</span> 1528 <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
......
...@@ -256,7 +256,10 @@ const btnHandles = ref({ ...@@ -256,7 +256,10 @@ const btnHandles = ref({
256 256
257 const extendTableInfo = ref({ 257 const extendTableInfo = ref({
258 id: "input-extend-table", 258 id: "input-extend-table",
259 height: '214px', 259 height: 'auto',
260 class: 'no-scroll-vertical',
261 minPanelHeight: '60px',
262 minHeight: '60px',
260 fields: [ 263 fields: [
261 { label: "序号", type: "index", width: TableColumnWidth.INDEX, align: "center" }, 264 { label: "序号", type: "index", width: TableColumnWidth.INDEX, align: "center" },
262 { label: "扩展字段名称", field: "expansionFieldName", width: 160 }, 265 { label: "扩展字段名称", field: "expansionFieldName", width: 160 },
...@@ -294,12 +297,12 @@ const exportExtendTableInfo = computed(() => { ...@@ -294,12 +297,12 @@ const exportExtendTableInfo = computed(() => {
294 297
295 const productTableInfo = ref({ 298 const productTableInfo = ref({
296 id: "input-product-table", 299 id: "input-product-table",
297 height: '75px', 300 height: 'auto',
298 minHeight: '60px', 301 minHeight: '60px',
299 minPanelHeight: '60px', 302 minPanelHeight: '60px',
300 fields: [ 303 fields: [
301 { label: "序号", type: "index", width: TableColumnWidth.INDEX, align: "center" }, 304 { label: "序号", type: "index", width: TableColumnWidth.INDEX, align: "center" },
302 { label: "数据产品", field: "dataProductName", width: 180 }, 305 { label: "数据产品", field: "dataProductName", width: 270 },
303 { label: "数据产品编码", field: "dataProductId", width: 261 }, 306 { label: "数据产品编码", field: "dataProductId", width: 261 },
304 { label: "所属主体名称", field: "dataProductEntityName", width: 240 }, 307 { label: "所属主体名称", field: "dataProductEntityName", width: 240 },
305 { label: "产品简介", field: "dataProductAbstract", width: 240 }, 308 { label: "产品简介", field: "dataProductAbstract", width: 240 },
...@@ -586,37 +589,36 @@ const signFileLoading = ref(false); ...@@ -586,37 +589,36 @@ const signFileLoading = ref(false);
586 589
587 const signFileUrlInfo: any = ref({ name: '', url: '' }); 590 const signFileUrlInfo: any = ref({ name: '', url: '' });
588 591
589 function getElementPdfPosition(element, options = {}) { 592 // function getElementPdfPosition(element, options = {}) {
590 const { scale = 2, pageHeightPt = 842 } = options; 593 // const { scale = 2, pageHeightPt = 842 } = options;
591 594
592 // 1. 获取元素距离容器顶部的像素距离 595 // // 1. 获取元素距离容器顶部的像素距离
593 const container = document.getElementById('pdf-container'); // 你的根容器 596 // const container = document.getElementById('pdf-container'); // 你的根容器
594 const rect = element.getBoundingClientRect(); 597 // const rect = element.getBoundingClientRect();
595 const containerRect = container.getBoundingClientRect(); 598 // const containerRect = container.getBoundingClientRect();
596 const topPx = rect.top - containerRect.top + window.scrollY; 599 // const topPx = rect.top - containerRect.top + window.scrollY;
597 600
598 // 2. html2canvas 默认使用 devicePixelRatio,但 html2pdf 通常固定 scale 601 // // 2. html2canvas 默认使用 devicePixelRatio,但 html2pdf 通常固定 scale
599 // html2pdf 内部会将 canvas 高度按比例缩放到 PDF 页面宽度 602 // // html2pdf 内部会将 canvas 高度按比例缩放到 PDF 页面宽度
600 // 简化模型:假设 PDF 宽度 = 595pt (A4),对应 canvas.width / scale px 603 // // 简化模型:假设 PDF 宽度 = 595pt (A4),对应 canvas.width / scale px
601 604
602 const pdfPageWidthPt = 595; // A4 width in pt 605 // const pdfPageWidthPt = 595; // A4 width in pt
603 const containerWidthPx = container.offsetWidth; 606 // const containerWidthPx = container.offsetWidth;
604 const pxToPtRatio = pdfPageWidthPt / containerWidthPx; // 每像素多少 pt 607 // const pxToPtRatio = pdfPageWidthPt / containerWidthPx; // 每像素多少 pt
605 608
606 const topPt = topPx * pxToPtRatio; 609 // const topPt = topPx * pxToPtRatio;
607 610
608 // 3. 计算落在第几页 & 页内 Y 坐标 611 // // 3. 计算落在第几页 & 页内 Y 坐标
609 const page = Math.floor(topPt / pageHeightPt) + 1; 612 // const page = Math.floor(topPt / pageHeightPt) + 1;
610 const yInPage = topPt % pageHeightPt; 613 // const yInPage = topPt % pageHeightPt;
611
612 return {
613 page,
614 x: rect.left * pxToPtRatio, // 可选 X 坐标
615 y: yInPage,
616 totalY: topPt
617 };
618 }
619 614
615 // return {
616 // page,
617 // x: rect.left * pxToPtRatio, // 可选 X 坐标
618 // y: yInPage,
619 // totalY: topPt
620 // };
621 // }
620 622
621 const geneSignFile = async () => { 623 const geneSignFile = async () => {
622 const element = document.getElementById('pdf-content'); // 指定要转PDF的DOM 624 const element = document.getElementById('pdf-content'); // 指定要转PDF的DOM
...@@ -1442,7 +1444,7 @@ onActivated(() => { ...@@ -1442,7 +1444,7 @@ onActivated(() => {
1442 <el-table-column type="expand"> 1444 <el-table-column type="expand">
1443 <template #default="scope"> 1445 <template #default="scope">
1444 <div class="h-title mt6">履约证明</div> 1446 <div class="h-title mt6">履约证明</div>
1445 <div class="list_panel" style="width: 1000px;"> 1447 <div class="list_panel" style="width: 1200px;">
1446 <div class="list_item"> 1448 <div class="list_item">
1447 <span class="item_label">日志摘要:</span> 1449 <span class="item_label">日志摘要:</span>
1448 <span class="item_value"><ellipsis-tooltip :content="scope.row?.contractProof?.logHash || '--'" 1450 <span class="item_value"><ellipsis-tooltip :content="scope.row?.contractProof?.logHash || '--'"
...@@ -1456,16 +1458,16 @@ onActivated(() => { ...@@ -1456,16 +1458,16 @@ onActivated(() => {
1456 </span> 1458 </span>
1457 </div> 1459 </div>
1458 <div class="list_item"> 1460 <div class="list_item">
1459 <span class="item_label">发送时间:</span> 1461 <span class="item_label">区块链时间:</span>
1460 <span class="item_value"><ellipsis-tooltip :content="scope.row?.contractProof?.sendTime || '--'" 1462 <span class="item_value"><ellipsis-tooltip :content="scope.row?.contractProof?.sendTime || '--'"
1461 class-name="w100f mr8-i" :refName="'tooltipOver' + 'sendTime'"></ellipsis-tooltip></span> 1463 class-name="w100f mr8-i" :refName="'tooltipOver' + 'sendTime'"></ellipsis-tooltip></span>
1462 </div> 1464 </div>
1463 <div class="list_item" style="width: 50%;"> 1465 <div class="list_item" style="width: 50%;">
1464 <span class="item_label">履约连接器签名:</span> 1466 <span class="item_label">履约连接器名称:</span>
1465 <!-- <template v-if="scope.row?.signature?.url"> 1467 <!-- <template v-if="scope.row?.signature?.url">
1466 <showFile :file="[execProofDetailInfo.signature]"></showFile> 1468 <showFile :file="[execProofDetailInfo.signature]"></showFile>
1467 </template> --> 1469 </template> -->
1468 <span class="item_value">{{ scope.row?.contractProof?.signature || '--' }}</span> 1470 <span class="item_value">{{ scope.row?.contractProof?.connectName || '--' }}</span>
1469 </div> 1471 </div>
1470 </div> 1472 </div>
1471 </template> 1473 </template>
...@@ -1571,7 +1573,7 @@ onActivated(() => { ...@@ -1571,7 +1573,7 @@ onActivated(() => {
1571 <Dialog ref="dialogRef" :dialogInfo="detailDialogInfo" class="policy-table-detail" 1573 <Dialog ref="dialogRef" :dialogInfo="detailDialogInfo" class="policy-table-detail"
1572 @btnClick="handleVersionDialogBtnClick"> 1574 @btnClick="handleVersionDialogBtnClick">
1573 <template #extra-content> 1575 <template #extra-content>
1574 <div v-loading="detailDialogInfo.contentLoading"> 1576 <div v-loading="detailDialogInfo.contentLoading" style="max-height: 600px;overflow-y: auto;">
1575 <StrategyTable ref="strategyTableDetailRef" :show-title="true" :is-look="true" :value="versionDetail"> 1577 <StrategyTable ref="strategyTableDetailRef" :show-title="true" :is-look="true" :value="versionDetail">
1576 </StrategyTable> 1578 </StrategyTable>
1577 </div> 1579 </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!