8315f10c by lihua

评审代码

1 parent a13d7955
...@@ -330,7 +330,7 @@ const transferValueToNew = (val, isTemplate = false) => { ...@@ -330,7 +330,7 @@ const transferValueToNew = (val, isTemplate = false) => {
330 childInfo.constraintFieldValue = childInfo.additionValue.map(a => a.enName); 330 childInfo.constraintFieldValue = childInfo.additionValue.map(a => a.enName);
331 } 331 }
332 if (childInfo.constraintEnName == 'limitedState' && childInfo.additionValue?.length) { 332 if (childInfo.constraintEnName == 'limitedState' && childInfo.additionValue?.length) {
333 childInfo.constraintStateValue = childInfo.additionValue?.[0].value; 333 childInfo.constraintStateValue = childInfo.additionValue?.[0]?.value;
334 } 334 }
335 if (childInfo.constraintEnName == 'areaAddress' && childInfo.additionValue?.length) { 335 if (childInfo.constraintEnName == 'areaAddress' && childInfo.additionValue?.length) {
336 childInfo.constraintAddressValue = childInfo.additionValue.map(a => a.value?.split('-')); 336 childInfo.constraintAddressValue = childInfo.additionValue.map(a => a.value?.split('-'));
......
...@@ -27,7 +27,6 @@ import useDataSmartContract from "@/store/modules/dataSmartContract"; ...@@ -27,7 +27,6 @@ import useDataSmartContract from "@/store/modules/dataSmartContract";
27 const { required } = useValidator(); 27 const { required } = useValidator();
28 const userStore = useUserStore(); 28 const userStore = useUserStore();
29 const userData = JSON.parse(localStorage.userData); 29 const userData = JSON.parse(localStorage.userData);
30 const tenantData = JSON.parse(localStorage.tenantInfo);
31 const router = useRouter(); 30 const router = useRouter();
32 const route = useRoute(); 31 const route = useRoute();
33 const fullscreenLoading = ref(false); 32 const fullscreenLoading = ref(false);
......
...@@ -350,9 +350,6 @@ const exportProductTableInfo = computed(() => { ...@@ -350,9 +350,6 @@ const exportProductTableInfo = computed(() => {
350 } 350 }
351 }); 351 });
352 352
353
354 const nodeInfoFormRef = ref();
355
356 const nodeInfoFormItems = ref([{ 353 const nodeInfoFormItems = ref([{
357 label: '策略执行者类型', 354 label: '策略执行者类型',
358 type: 'input', 355 type: 'input',
...@@ -557,39 +554,9 @@ const signInfoFormItems = ref([{ ...@@ -557,39 +554,9 @@ const signInfoFormItems = ref([{
557 block: true, 554 block: true,
558 field: 'file', 555 field: 'file',
559 }, 556 },
560 // {
561 // label: '签署签名',
562 // tip: '文件大小不超过20MB',
563 // type: 'upload-file',
564 // limitSize: 20,
565 // limit: 1,
566 // required: true,
567 // default: [],
568 // block: false,
569 // field: 'signFile',
570 // },
571 // {
572 // label: '签署时间',
573 // type: 'input',
574 // placeholder: '确定签署提交的时间',
575 // field: 'submitTime',
576 // default: '',
577 // maxlength: 50,
578 // disabled: true
579 // },
580 ]); 557 ]);
581 558
582 const signInfoFormRules = ref({ 559 const signInfoFormRules = ref({});
583 // signFile: [{
584 // validator: (rule: any, value: any, callback: any) => {
585 // if (!value?.length) {
586 // callback(new Error('请上传文件'))
587 // } else {
588 // callback();
589 // }
590 // }, trigger: 'change'
591 // }],
592 });
593 560
594 const viewResultVoucherFile = (url) => { 561 const viewResultVoucherFile = (url) => {
595 if (!url) { 562 if (!url) {
...@@ -603,37 +570,6 @@ const signFileLoading = ref(false); ...@@ -603,37 +570,6 @@ const signFileLoading = ref(false);
603 570
604 const signFileUrlInfo: any = ref({ name: '', url: '' }); 571 const signFileUrlInfo: any = ref({ name: '', url: '' });
605 572
606 // function getElementPdfPosition(element, options = {}) {
607 // const { scale = 2, pageHeightPt = 842 } = options;
608
609 // // 1. 获取元素距离容器顶部的像素距离
610 // const container = document.getElementById('pdf-container'); // 你的根容器
611 // const rect = element.getBoundingClientRect();
612 // const containerRect = container.getBoundingClientRect();
613 // const topPx = rect.top - containerRect.top + window.scrollY;
614
615 // // 2. html2canvas 默认使用 devicePixelRatio,但 html2pdf 通常固定 scale
616 // // html2pdf 内部会将 canvas 高度按比例缩放到 PDF 页面宽度
617 // // 简化模型:假设 PDF 宽度 = 595pt (A4),对应 canvas.width / scale px
618
619 // const pdfPageWidthPt = 595; // A4 width in pt
620 // const containerWidthPx = container.offsetWidth;
621 // const pxToPtRatio = pdfPageWidthPt / containerWidthPx; // 每像素多少 pt
622
623 // const topPt = topPx * pxToPtRatio;
624
625 // // 3. 计算落在第几页 & 页内 Y 坐标
626 // const page = Math.floor(topPt / pageHeightPt) + 1;
627 // const yInPage = topPt % pageHeightPt;
628
629 // return {
630 // page,
631 // x: rect.left * pxToPtRatio, // 可选 X 坐标
632 // y: yInPage,
633 // totalY: topPt
634 // };
635 // }
636
637 const geneSignFile = async () => { 573 const geneSignFile = async () => {
638 const element = document.getElementById('pdf-content'); // 指定要转PDF的DOM 574 const element = document.getElementById('pdf-content'); // 指定要转PDF的DOM
639 if (!element) { 575 if (!element) {
......
...@@ -15,7 +15,6 @@ import useDataSmartContract from "@/store/modules/dataSmartContract"; ...@@ -15,7 +15,6 @@ import useDataSmartContract from "@/store/modules/dataSmartContract";
15 import { commonPageConfig, USERROLE } from '@/utils/enum'; 15 import { commonPageConfig, USERROLE } from '@/utils/enum';
16 16
17 const userData = JSON.parse(localStorage.userData); 17 const userData = JSON.parse(localStorage.userData);
18 const tenantData = JSON.parse(localStorage.tenantInfo);
19 const router = useRouter(); 18 const router = useRouter();
20 const route = useRoute(); 19 const route = useRoute();
21 const { proxy } = getCurrentInstance() as any; 20 const { proxy } = getCurrentInstance() as any;
...@@ -26,6 +25,7 @@ const isDataUse = computed(() => { ...@@ -26,6 +25,7 @@ const isDataUse = computed(() => {
26 return localStorage.getItem('userRole') == USERROLE.USE; 25 return localStorage.getItem('userRole') == USERROLE.USE;
27 }) 26 })
28 27
28 /** ------------------------ 搜索栏配置 ------------------------- */
29 const searchItemList = ref([ 29 const searchItemList = ref([
30 { 30 {
31 type: "input", 31 type: "input",
...@@ -48,6 +48,7 @@ const searchItemList = ref([ ...@@ -48,6 +48,7 @@ const searchItemList = ref([
48 } 48 }
49 ]); 49 ]);
50 50
51 /** 表格显示的字段配置 */
51 const tableFields = ref([ 52 const tableFields = ref([
52 { label: "序号", type: "index", width: 56, align: "center" }, 53 { label: "序号", type: "index", width: 56, align: "center" },
53 { label: "合约名称", field: "contractName", width: 160, }, 54 { label: "合约名称", field: "contractName", width: 160, },
...@@ -61,13 +62,13 @@ const tableFields = ref([ ...@@ -61,13 +62,13 @@ const tableFields = ref([
61 { label: "提交时间", field: "submitTime", width: 170 }, 62 { label: "提交时间", field: "submitTime", width: 170 },
62 ]); 63 ]);
63 64
65 /** 分页 */
64 const page = ref({ 66 const page = ref({
65 ...commonPageConfig, 67 ...commonPageConfig,
66 contractName: '', 68 contractName: '',
67 contractStatus: '' 69 contractStatus: ''
68 }); 70 });
69 71 /** 表格配置信息 */
70 const currTableData: any = ref({});
71 const tableInfo = ref({ 72 const tableInfo = ref({
72 id: 'contract-table', 73 id: 'contract-table',
73 rowKey: 'guid', 74 rowKey: 'guid',
...@@ -164,6 +165,7 @@ const tableInfo = ref({ ...@@ -164,6 +165,7 @@ const tableInfo = ref({
164 } 165 }
165 }); 166 });
166 167
168 /** 表格操作按钮对应的处理函数 */
167 const btnHandles = { 169 const btnHandles = {
168 edit: (scope) => { 170 edit: (scope) => {
169 router.push({ 171 router.push({
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!