8315f10c by lihua

评审代码

1 parent a13d7955
......@@ -330,7 +330,7 @@ const transferValueToNew = (val, isTemplate = false) => {
childInfo.constraintFieldValue = childInfo.additionValue.map(a => a.enName);
}
if (childInfo.constraintEnName == 'limitedState' && childInfo.additionValue?.length) {
childInfo.constraintStateValue = childInfo.additionValue?.[0].value;
childInfo.constraintStateValue = childInfo.additionValue?.[0]?.value;
}
if (childInfo.constraintEnName == 'areaAddress' && childInfo.additionValue?.length) {
childInfo.constraintAddressValue = childInfo.additionValue.map(a => a.value?.split('-'));
......
......@@ -27,7 +27,6 @@ import useDataSmartContract from "@/store/modules/dataSmartContract";
const { required } = useValidator();
const userStore = useUserStore();
const userData = JSON.parse(localStorage.userData);
const tenantData = JSON.parse(localStorage.tenantInfo);
const router = useRouter();
const route = useRoute();
const fullscreenLoading = ref(false);
......
......@@ -350,9 +350,6 @@ const exportProductTableInfo = computed(() => {
}
});
const nodeInfoFormRef = ref();
const nodeInfoFormItems = ref([{
label: '策略执行者类型',
type: 'input',
......@@ -557,39 +554,9 @@ const signInfoFormItems = ref([{
block: true,
field: 'file',
},
// {
// label: '签署签名',
// tip: '文件大小不超过20MB',
// type: 'upload-file',
// limitSize: 20,
// limit: 1,
// required: true,
// default: [],
// block: false,
// field: 'signFile',
// },
// {
// label: '签署时间',
// type: 'input',
// placeholder: '确定签署提交的时间',
// field: 'submitTime',
// default: '',
// maxlength: 50,
// disabled: true
// },
]);
const signInfoFormRules = ref({
// signFile: [{
// validator: (rule: any, value: any, callback: any) => {
// if (!value?.length) {
// callback(new Error('请上传文件'))
// } else {
// callback();
// }
// }, trigger: 'change'
// }],
});
const signInfoFormRules = ref({});
const viewResultVoucherFile = (url) => {
if (!url) {
......@@ -603,37 +570,6 @@ const signFileLoading = ref(false);
const signFileUrlInfo: any = ref({ name: '', url: '' });
// function getElementPdfPosition(element, options = {}) {
// const { scale = 2, pageHeightPt = 842 } = options;
// // 1. 获取元素距离容器顶部的像素距离
// const container = document.getElementById('pdf-container'); // 你的根容器
// const rect = element.getBoundingClientRect();
// const containerRect = container.getBoundingClientRect();
// const topPx = rect.top - containerRect.top + window.scrollY;
// // 2. html2canvas 默认使用 devicePixelRatio,但 html2pdf 通常固定 scale
// // html2pdf 内部会将 canvas 高度按比例缩放到 PDF 页面宽度
// // 简化模型:假设 PDF 宽度 = 595pt (A4),对应 canvas.width / scale px
// const pdfPageWidthPt = 595; // A4 width in pt
// const containerWidthPx = container.offsetWidth;
// const pxToPtRatio = pdfPageWidthPt / containerWidthPx; // 每像素多少 pt
// const topPt = topPx * pxToPtRatio;
// // 3. 计算落在第几页 & 页内 Y 坐标
// const page = Math.floor(topPt / pageHeightPt) + 1;
// const yInPage = topPt % pageHeightPt;
// return {
// page,
// x: rect.left * pxToPtRatio, // 可选 X 坐标
// y: yInPage,
// totalY: topPt
// };
// }
const geneSignFile = async () => {
const element = document.getElementById('pdf-content'); // 指定要转PDF的DOM
if (!element) {
......
......@@ -15,7 +15,6 @@ import useDataSmartContract from "@/store/modules/dataSmartContract";
import { commonPageConfig, USERROLE } from '@/utils/enum';
const userData = JSON.parse(localStorage.userData);
const tenantData = JSON.parse(localStorage.tenantInfo);
const router = useRouter();
const route = useRoute();
const { proxy } = getCurrentInstance() as any;
......@@ -26,6 +25,7 @@ const isDataUse = computed(() => {
return localStorage.getItem('userRole') == USERROLE.USE;
})
/** ------------------------ 搜索栏配置 ------------------------- */
const searchItemList = ref([
{
type: "input",
......@@ -48,6 +48,7 @@ const searchItemList = ref([
}
]);
/** 表格显示的字段配置 */
const tableFields = ref([
{ label: "序号", type: "index", width: 56, align: "center" },
{ label: "合约名称", field: "contractName", width: 160, },
......@@ -61,13 +62,13 @@ const tableFields = ref([
{ label: "提交时间", field: "submitTime", width: 170 },
]);
/** 分页 */
const page = ref({
...commonPageConfig,
contractName: '',
contractStatus: ''
});
const currTableData: any = ref({});
/** 表格配置信息 */
const tableInfo = ref({
id: 'contract-table',
rowKey: 'guid',
......@@ -164,6 +165,7 @@ const tableInfo = ref({
}
});
/** 表格操作按钮对应的处理函数 */
const btnHandles = {
edit: (scope) => {
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!