版本差异和epc图编号刷(尚未对接数据)

This commit is contained in:
mrs_12345@163.com 2022-07-01 09:42:26 +08:00
parent 148e5205c7
commit fc02c3e757
7 changed files with 2675 additions and 2526 deletions

View File

@ -200,7 +200,76 @@ $(function() {
// saveTimer();
intervalRefresh();
}
// 编号刷点击事件
$('#bar_sort').off("click").on("click",function (){
if ($("#saving_tip").text() != "已保存成功" && $("#saving_tip").text() != "保存成功" && $("#saving_tip").text() != "您的文件已经成功保存") {
$.simpleAlert('页面未保存,请先保存', 'error', 1500);
return;
} else {
// $.simpleAlert("正在编号", "loading");
// $.ajax({
// type: "POST",
// url: "./jd",
// data: {
// sid: CLB.sid,
// cmd: "com.actionsoft.apps.coe.pal_repository_process_define_save",
// uuid: ruuid,
// },
// success: function (msg, textStatus, jqXHR) {
// $.simpleAlert("close");
// console.log(msg)
// },
// error: function (jqXHR, textStatus, errorThrown) {
// $.simpleAlert("close");
// $.simpleAlert('编号失败', 'error', 1500);
// }
// })
let numObj = {
brushId: 'number_brush',
orderList: [
{ shapeId: 'obj_c9e1cda208700001132717c019b9a350',order: 1},
{ shapeId: 'obj_c9e1cda2b8a000013b42e5f045db1f01',order: 2},
{ shapeId: 'obj_c9e1cda4ac10000164dd6bb015406b40',order: 3},
{ shapeId: 'obj_c9e1cda3109000015741104116a918a8',order: 4},
{ shapeId: 'obj_c9e1cdab200000014a2eade016e8170d',order: 5},
{ shapeId: 'obj_c9e1cdb266f0000159a7c8afa7701a68',order: 6},
]
}
let obj = Model.define
console.log(obj)
let elements = obj.elements
let orderList = numObj.orderList
for (let j = 0; j < orderList.length; j++) {
for(let i in elements) {
if (orderList[j].shapeId == i) {
for(let a = 0; a < elements[i].dataAttributes.length; a ++ ) {
if(elements[i].dataAttributes[a].attributesJsonArray !== undefined) {
for(let b = 0; b < elements[i].dataAttributes[a].attributesJsonArray.length; b ++) {
if(elements[i].dataAttributes[a].attributesJsonArray[b].id == numObj.brushId) {
elements[i].dataAttributes[a].attributesJsonArray[b].value = orderList[j].order
}
}
}
}
}
}
}
// for(let i in elements) {
// for(let a = 0; a < elements[i].dataAttributes.length; a ++ ) {
// if(elements[i].dataAttributes[a].attributesJsonArray !== undefined) {
// for(let b = 0; b < elements[i].dataAttributes[a].attributesJsonArray.length; b ++) {
// if(elements[i].dataAttributes[a].attributesJsonArray[b].id == 'number_brush') {
// elements[i].dataAttributes[a].attributesJsonArray[b].value = 24
// }
// }
// }
// }
// }
$("#saving_tip").css("color", "rgb(255, 0, 0)");
$("#saving_tip").text("文件已修改,未保存");
}
})
})

View File

@ -363,6 +363,13 @@ height: 25px;
padding:0 5px;
white-space: normal;
}
.diffTableTbody tr td{
border:1px solid #ccc;
padding:5px;
white-space: normal;
min-height: 25px;
line-height: 20px;
}
.dialogTableTbody tr td{
color: #666666;
border:1px solid #ccc;

View File

@ -3042,6 +3042,82 @@ var Dock = {
}
});
}
else if(this.currentView == 'diff') {
// var html = "<div style=\"font-size: 16px; color: #aaa; text-align: center; vertical-align: middle; line-height: 200px;\">暂无版本差异</div>";
var html = ''
var diffContent = [
{
versionName: 'Ver 2.0',
updateTime: '5月19日 16:00',
updateContent: [
{
title: '文件修改:',
detail: ['[内容]增加了111111111111111111','[责任部门]增加了11111111111111111']
},
{
title: '节点修改:',
detail: ['删除[开始事件]节点','删除[开始]节点','删除[人工]节点']
},
{
title: '[文件]删除11111111111',
detail: []
}
]
},
{
versionName: 'Ver 1.0',
updateTime: '5月14日 15:00',
updateContent: [
{
title: '文件修改',
detail: ['[内容]增加了111111111111 ',]
},
{
title: '节点修改',
detail: ['删除[开始事件]节点','删除[开始]节点','删除[人工]节点','删除[结束]节点']
},
{
title: '[制度]增加了11111111111111',
detail: []
},
{
title: '[文件]删除了11111111111',
detail: []
}
]
}
]
for (var i = 0; i < diffContent.length; i++) {
var diffCount = 0
var content = diffContent[i].updateContent
var diffListHtml = ''
for (var j = 0; j < content.length; j++) {
var diffDetailHtml = ''
var listDetail = content[j].detail
if (listDetail.length == 0) {
diffCount +=1
}
for (var k = 0; k < listDetail.length; k++) {
diffCount +=1
diffDetailHtml += '<div style="margin-left: 10px">' + '·' +listDetail[k]+'</div>'
}
diffListHtml += '<div>' + content[j].title +'</div>'
+ '<div>'+diffDetailHtml+'</div>'
}
html += '<tr>'
+ '<td style="width:50px;">' + diffContent[i].versionName + '</td>'
+ '<td style="width:250px">' + diffContent[i].updateTime + '<span style="padding-left: 10px">' + '(' + diffCount + '处修改)' + '</span>' + '</td>'
+ '</tr>'
+ '<tr>'
+ '<td style="width:50px"></td>'
+ '<td style="width:250px">' + diffListHtml + '</td>'
+ '</tr>'
}
$("#diffTable").empty().html(html)
}
if (this.currentView == "history") {
if (drawNav && Dock.historyVersions == null) {
this.loadHistorys();

View File

@ -147,6 +147,9 @@ html{
.ico.redo{
background-position: -20px 0px;
}
.ico.sort{
background-position: 1px -637px;
}
.ico.brush{
background-position: -20px -20px;
}
@ -284,6 +287,9 @@ html{
.ico_link{
background-position: -20px -420px;
}
.ico_dock_diff {
background-position: -20px -440px;
}
.ico_risk{
background-position: -40px -620px;
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 18 KiB