From 32cba9f8e85baf2e1eb1014f0f64113fe117505f Mon Sep 17 00:00:00 2001 From: libo Date: Tue, 3 Jan 2023 15:51:08 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B5=81=E7=A8=8B=E4=BB=BB=E5=8A=A1=E4=B8=AD?= =?UTF-8?q?=E5=AE=A1=E6=89=B9=E7=82=B9=E5=87=BB=E7=A1=AE=E8=AE=A4=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0loading?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Views/NWFProcess/SignForm.js | 31 +++++++++++++++++-- 1 file changed, 28 insertions(+), 3 deletions(-) diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFProcess/SignForm.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFProcess/SignForm.js index 037cdc685..ac001dc60 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFProcess/SignForm.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFProcess/SignForm.js @@ -59,10 +59,35 @@ var bootstrap = function ($, learun) { }); }); + function debounce(fn, delay) { + let time = null; + return function () { + if (time !== null) { + clearTimeout(time); + } + time = setTimeout(() => { + fn.call(this); + }, delay) + } + } + + //$('#btn_finish').on('click', debounce(function () { + // console.log('123456') + + // var datapair = $sigdiv.jsignature("getdata"); + // top.flowauditfn(datapair,stampurl); + // learun.layerclose(window.name); + + //},500)) + $('#btn_finish').on('click', function () { - var datapair = $sigdiv.jSignature("getData"); - top.flowAuditfn(datapair,stampUrl); - learun.layerClose(window.name); + learun.loading(true, '正在提交'); + var datapair = $sigdiv.jSignature("getData"); + top.flowAuditfn(datapair,stampUrl); + learun.layerClose(window.name); + setTimeout(function () { + learun.loading(false); + }); }); }