快捷发布代码优化

This commit is contained in:
zhaol 2025-05-06 10:41:02 +08:00
parent a133ae385a
commit b12d3d7dfe

View File

@ -89,7 +89,7 @@ $(function () {
}
});
}
function initSaveFun() {
Dock.showView('');
var obj = Model.define;
@ -265,6 +265,14 @@ $(function () {
* 快捷发布
*/
$("#QuickPublishing").off("click").on("click", function () {
var type='';
//工程制度标准
if(methodId=="engineering.standard"){
type='1';
}else{
//发布流程
type='2';
}
$.ajax({
type: "POST",
url: "./jd",
@ -272,7 +280,7 @@ $(function () {
sid: CLB.sid,
palUUID:ruuid,
cmd: "com.actionsoft.apps.coe.pal.publisher.createProcess",
processDefId: "obj_fb1c7a54b98b412187388c8bab407362",
type: type,
},
success: function (r) {
window.open(r.data.url);
@ -293,7 +301,7 @@ $(function () {
sid: CLB.sid,
palUUID:ruuid,
cmd: "com.actionsoft.apps.coe.pal.publisher.createProcess_processTermination",
processDefId: "obj_fb1c7a54b98b412187388c8bab407362",
processDefId: "obj_8ade0297948b4e4aa360cc48e9283414",
},
success: function (r) {
if(r.result == "error"){
@ -325,7 +333,7 @@ $(function () {
$("#modelingGuide").off("click").on("click", function () {
initGuide();
});
/**
* 获取流程列表信息并跳转到dw数据试图
*/
@ -352,7 +360,7 @@ $(function () {
},
});
}
// 编号刷点击事件
$('#bar_sort').off("click").on("click", function () {
if ($("#saving_tip").text() != "已保存成功" && $("#saving_tip").text() != "保存成功" && $("#saving_tip").text() != "您的文件已经成功保存" && $("#saving_tip").text() != "") {
@ -475,19 +483,19 @@ $(function () {
// var autoSave_interval = 0.5 * 60 * 1000 - autoSave_countdownStart; // 3分钟
var autoSave_timer;
var autoSave_countdownTimer;
// 保存文档的函数
function autoSave_saveDocument() {
console.log('自动保存成功' + getCurrTime());
$("#bar_save").click(); // 实际的保存操作
$("#autoSave_countdown").hide(); // 保存后隐藏倒计时
}
function manualSave_resetTimes() {
$("#autoSave_countdown").hide(); // 保存后隐藏倒计时
autoSave_resetTimers();// 重置定时器
}
// 重置定时器的函数
function autoSave_resetTimers() {
clearTimeout(autoSave_timer);
@ -496,13 +504,13 @@ $(function () {
console.log(autoSave_interval + '后开始倒计时' + getCurrTime());
autoSave_timer = setTimeout(autoSave_autoSave, autoSave_interval);
}
// 自动保存的函数
function autoSave_autoSave() {
autoSave_resetTimers();// 保存后重置定时器
autoSave_countdown(); // 开始倒计时
}
// 倒计时的函数
function autoSave_countdown() {
if ($("#saving_tip").text() == "已保存成功" || $("#saving_tip").text() == "保存成功" || $("#saving_tip").text() == "您的文件已经成功保存" || $("#saving_tip").text() == "") {
@ -526,7 +534,7 @@ $(function () {
}
}, 1000);
}
// 初始化定时器
console.log('开始执行定时器' + getCurrTime());
autoSave_resetTimers();