上传HTML和js、css

This commit is contained in:
袁东强 2025-07-14 14:38:14 +08:00 committed by zhaolei
parent f042851245
commit de99c3fa7c
5 changed files with 7057 additions and 0 deletions

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,280 @@
<!DOCTYPE html >
<html xmlns=http://www.w3.org/1999/xhtml>
<head>
<title><#fileName></title>
<meta charset="UTF-8">
<link rel="stylesheet" href="../commons/css/awsui.css">
<link type='text/css' rel='stylesheet' href='../apps/com.actionsoft.apps.coe.pal/lib/designer/themes/default/diagraming/designer.versionCompare.css' />
<script type='text/javascript' src='../commons/js/jquery/scripts/jquery.js'></script>
<script type="text/javascript" src="../commons/js/awsui.js"></script>
<script type='text/javascript' charset='UTF-8' src='../apps/com.actionsoft.apps.coe.pal/lib/designer/scripts/diagraming/schema/schema.js'></script>
<!-- 版本对比 -->
<script type='text/javascript' charset='UTF-8' src='../apps/com.actionsoft.apps.coe.pal/lib/designer/scripts/diagraming/versionCompare/version.core.debug.js'></script>
<script>
var 修改 = "<I18N#修改>"
var 由 = "<I18N#>"
var 设计中 = "<I18N#设计中>"
var 已发布 = "<I18N#已发布>"
var 已停用 = "<I18N#已停用>"
var 审核中 = "<I18N#审核中>"
var 设计 = "<I18N#设计>"
var 文件属性 = "<I18N#文件属性>"
var 文件信息 = "<I18N#文件信息>";
var 附件 = "<I18N#附件>"
var 形状属性 = "<I18N#形状属性>"
var 数据属性 = "<I18N#数据属性>"
var 链接 = "<I18N#链接>"
var 暂无文件属性 = "<I18N#暂无文件属性>"
var 关联附件 = "<I18N#关联附件>"
var 暂无形状属性 = "<I18N#暂无形状属性>"
var 文件链接 = "<I18N#文件链接>"
var 自定义链接 = "<I18N#自定义链接>"
var 暂无 = "<I18N#暂无>"
var 预览 = "<I18N#预览>"
var 正在切换 = "<I18N#正在切换>"
var 是否将 = "<I18N#是否将>"
var 切换为使用中 = "<I18N#切换为使用中>"
var 图元位于画布左侧可解除同步锁定查看 = "<I18N#图元位于画布左侧可解除同步锁定查看>"
var 图元位于画布右侧可解除同步锁定查看 = "<I18N#图元位于画布右侧可解除同步锁定查看>"
var 图元位于画布顶部可解除同步锁定查看 = "<I18N#图元位于画布顶部可解除同步锁定查看>"
var 图元位于画布底部可解除同步锁定查看 = "<I18N#图元位于画布底部可解除同步锁定查看>"
var 同步版本间操作 = "<I18N#同步版本间操作>"
var 关闭缩略图 = "<I18N#关闭缩略图>"
var 显示缩略图 = "<I18N#显示缩略图>"
var 缩小 = "<I18N#缩小>"
var 重置 = "<I18N#重置>"
var 放大 = "<I18N#放大>"
var 新增图元 = "<I18N#新增图元>"
var 删除图元 = "<I18N#删除图元>"
var 图元位置变化 = "<I18N#图元位置变化>"
var 图元信息变化 = "<I18N#图元信息变化>"
var 图元名称样式变化 = "<I18N#图元名称样式变化>"
var isProcessExec = <#isProcessExec> // 版本对比页面与梳理到执行流程对比页面共用 以此进行区分 方便页面屏蔽一些逻辑与数据
// 是否用于bpm隐藏属性、隐藏返回按钮
var ifHideUI = <#ifHideUI>
var versionData = <#versionData>
var curData = <#curData>
var pageDefinition = {
left: JSON.parse(versionData.definition),
right: JSON.parse(curData.definition)
}
var leftOfRelationShapes = <#leftOfRelationShapes>
var rightOfRelationShapes = <#rightOfRelationShapes>
var methodId = "<#methodId>"
var methodIcon = <#methodIcon>
var fileName = "<#fileName>"
var relationShapeInfo = {
left: leftOfRelationShapes,
right: rightOfRelationShapes
}
var isSameOperate = true // 同步版本间操作
var diffList = <#diffNode>
var diffNode = diffList.filter(i => i.type.length > 0)
$(document).ready(function () {
$('.method-icon').append('<i class="awsui-iconfont">' + methodIcon.code + '</i>');
$('.method-icon').css({background: methodIcon.color});
$('.file-name').text(fileName)
$('.version-num-left').text(versionData.versionNo)
$('.version-num-right').text(curData.versionNo)
$('.update-time-left').text(versionData.updateTime)
$('.update-time-right').text(curData.updateTime)
// 悬浮icon
$('.attribute-view-btn').off("mouseenter").on("mouseenter", function () {
let pos = $(this).attr('position')
let str = Utils.getSelected(pos).length > 0 ? 数据属性 : 文件信息
let html = `<div class="btn-text">${str}</div>`
if($(this).find('.btn-text').length === 0) {
$(this).css('width', 'auto')
$(this).append(html)
}
}).off("mouseleave").on("mouseleave", function () {
$(this).css('width', '40px')
$(this).find('.btn-text').remove()
})
// 梳理到执行
if (isProcessExec) {
// 继续编辑按钮 屏蔽
$('.left-right').css('visibility', 'hidden')
// 左侧版本下拉列表 屏蔽
$('.left .left-center .center-top i.awsui-iconfont').css('visibility', 'hidden')
}
if (ifHideUI) {
// 属性侧边栏 屏蔽
$('.attribute-view-btn').hide()
// 返回按钮 屏蔽
$('.back-icon').hide()
}
$('.same-operate').attr('awsui-qtip', 同步版本间操作)
$('.close-nav-icon').attr('awsui-qtip', 关闭缩略图)
$('.show-nav-icon').attr('awsui-qtip', 显示缩略图)
$('.zoom-in-icon').attr('awsui-qtip', 放大)
$('.zoom-value').attr('awsui-qtip', 重置)
$('.zoom-out-icon').attr('awsui-qtip', 缩小)
})
// 左侧 版本切换显示隐藏的开关处理通过iframe url传递 isHistory 参数
$("#leftChangeVersion").ready(function () {
let urlParams = new URLSearchParams(window.location.search);
if (urlParams.get('isHistory') === 'true') {
let leftChangeVersion = $("#leftChangeVersion");
leftChangeVersion.css("visibility", "hidden");
}
})
// 点击其他触发
document.addEventListener('click', function(event) {
// 关闭版本列表
versionCompareFun.closeVersionListByClick(event)
});
</script>
<script type='text/javascript' charset='UTF-8' src='../apps/com.actionsoft.apps.coe.pal/lib/designer/scripts/diagraming/versionCompare/version.methods.debug.js'></script>
</head>
<body style="overflow: hidden;margin: 0">
<div class="page-head flex-center">
<div class="left flex-center">
<div>
<span class="back-icon" style="cursor: pointer" onclick="versionListFun.closeComparePage()"><i class="awsui-iconfont">&#xe715;</i></span>
<span class="method-icon"></span>
<span class="file-name" style="font-size: 20px"></span>
</div>
<div class="left-center" style="position:relative;">
<div class="center-top">
<span class="version-num-left"></span>
<i class="awsui-iconfont" style="font-size: 12px" onclick="versionCompareFun.openCompareList()">&#xe716;</i>
</div>
<div class="update-time update-time-left"></div>
<div id="compareVersionList" class="compare-version-list" style="display:none;"></div>
</div>
<div id="leftChangeVersion" class="left-right" onclick="versionCompareFun.changeToSelectedV()">
<I18N#切换到该版本>
</div>
</div>
<div class="same-operate opend-operate" awsui-qtip="同步版本间操作" onclick="versionCompareFun.isOpenSameOperate(false)">
<i class="awsui-iconfont">&#xe7b3;</i>
</div>
<div class="same-operate closed-operate" style="display:none;" awsui-qtip="同步版本间操作" onclick="versionCompareFun.isOpenSameOperate(true)">
<i class="awsui-iconfont">&#xe7bc;</i>
</div>
<div class="right flex-center">
<div></div>
<div class="left-center">
<div class="center-top version-num-right"></div>
<div class="update-time update-time-right"></div>
</div>
<div class="left-right" onclick="versionListFun.closeComparePage()">
<span><I18N#继续编辑></span>
</div>
</div>
</div>
<div style="display: flex;">
<div class="designer-wrapper" style="border-right: 1px solid #666">
<div id="designer-layout-left" class="version-designer-layout" position="left">
<div id="canvas-container-left" class="version-canvas_container" >
<div id="designer-canvas-left" class="version-canvas">
<canvas id="designer-grids-left"></canvas>
</div>
</div>
</div>
<!-- 悬浮按钮 -->
<div id="view-btn-left" position="left" class="attribute-view-btn" onclick="versionCompareFun.openAttributeView('left')">
<div class="btn-icon">
<i class="awsui-iconfont" style="font-size: 20px">&#xe698;</i>
</div>
</div>
<!-- 文件信息 -->
<div id="attribute-view-left" class="attribute-view">
<div class="view-head">
<div class="head-left" viewType="file"></div>
<div class="head-right">
<i class="awsui-iconfont" onclick="versionCompareFun.closeAttributeView('left')">&#xe633;</i>
</div>
</div>
<div id="view-body-left" class="view-body"></div>
</div>
<!-- 文件预览 -->
<div id="file-preview-left">
<img style="width: 100%;height: 93%;object-fit: contain"/>
</div>
<!-- 图元不在可视区域范围提示 -->
<div class="shape-tip shape-tip-left"><I18N#图元位于画布左侧可解除同步锁定查看></div>
</div>
<div class="designer-wrapper">
<div id="designer-layout-right" class="version-designer-layout" position="right">
<div id="canvas-container-right" class="version-canvas_container" >
<div id="designer-canvas-right" class="version-canvas">
<canvas id="designer-grids-right"></canvas>
</div>
</div>
</div>
<div id="view-btn-right" position="right" class="attribute-view-btn" onclick="versionCompareFun.openAttributeView('right')">
<div class="btn-icon">
<i class="awsui-iconfont" style="font-size: 20px">&#xe698;</i>
</div>
</div>
<div id="attribute-view-right" class="attribute-view">
<div class="view-head">
<div class="head-left" viewType="file"></div>
<div class="head-right">
<i class="awsui-iconfont" onclick="versionCompareFun.closeAttributeView('right')">&#xe633;</i>
</div>
</div>
<div id="view-body-right" class="view-body"></div>
</div>
<div id="file-preview-right">
<img style="width: 100%;height: 93%;object-fit: contain"/>
</div>
<div class="shape-tip shape-tip-right"><I18N#图元位于画布左侧可解除同步锁定查看></div>
</div>
</div>
<div class="version-footer">
<div class="footer-half" style="border-right: 1px solid #666">
<span><i class="awsui-iconfont close-nav-icon" style="display: none" id="close-nav-left" awsui-qtip="关闭缩略图" onclick="versionCompareFun.openNavigation('left',false)">&#xe603;</i></span>
<span><i class="awsui-iconfont show-nav-icon" awsui-qtip="显示缩略图" id="show-nav-left" onclick="versionCompareFun.openNavigation('left',true)">&#xe603;</i></span>
<span><i class="awsui-iconfont zoom-out-icon" awsui-qtip="缩小" onclick="versionCompareFun.pageZoom('left','zoomOut')">&#xe715;</i></span>
<span id="zoom-value-left" class="zoom-value" awsui-qtip="重置" onclick="versionCompareFun.pageZoom('left','reset')">100%</span>
<span><i class="awsui-iconfont zoom-in-icon" awsui-qtip="放大" onclick="versionCompareFun.pageZoom('left','zoomIn')">&#xe717;</i></span>
<!-- 鹰眼导航 -->
<div id="navigation-view-left" class="version-dock_view">
<div class="navigation_bounding">
<div class="navigation_view_container">
<canvas id="navigation-canvas-left" width="120px" height="160px" class="navigation_canvas"></canvas>
<div id="navigation-eye-left" class="navigation_eye"></div>
</div>
</div>
</div>
</div>
<div class="footer-half">
<span><i class="awsui-iconfont close-nav-icon" style="display: none" id="close-nav-right" awsui-qtip="关闭缩略图" onclick="versionCompareFun.openNavigation('right',false)">&#xe603;</i></span>
<span><i class="awsui-iconfont show-nav-icon" awsui-qtip="显示缩略图" id="show-nav-right" onclick="versionCompareFun.openNavigation('right',true)">&#xe603;</i></span>
<span><i class="awsui-iconfont zoom-out-icon" awsui-qtip="缩小" onclick="versionCompareFun.pageZoom('right','zoomOut')">&#xe715;</i></span>
<span id="zoom-value-right" class="zoom-value" awsui-qtip="重置" onclick="versionCompareFun.pageZoom('right','reset')">100%</span>
<span><i class="awsui-iconfont zoom-in-icon" awsui-qtip="放大" onclick="versionCompareFun.pageZoom('right','zoomIn')">&#xe717;</i></span>
<div id="navigation-view-right" class="version-dock_view">
<div class="navigation_bounding">
<div class="navigation_view_container">
<canvas id="navigation-canvas-right" width="120px" height="160px" class="navigation_canvas"></canvas>
<div id="navigation-eye-right" class="navigation_eye"></div>
</div>
</div>
</div>
</div>
</div>
<div id="model-left" class="dialog-model" style="display: none;left: 0"></div>
<div id="model-right" class="dialog-model" style="display: none;right: 0"></div>
</body>
</html>

View File

@ -0,0 +1,785 @@
/**
* 业务代码
*/
// main页面打开版本列表
const versionListFun = {
versionList: [],
historyList: [],
openVersionList() {
let page = $("#versionList")
if (page.length > 0) {
this.closeVersionList()
return
}
$(`<div id="versionList" class="versionList"></div>`).appendTo("#designer_header")
this.loadVersionList()
},
loadVersionList() {
function versionItem(item) {
return `
<div class="version-item">
<div class="version-content">
<div class="top-info">
<span class="left-span version-state-${item.versionStatus}">${item.versionNo} ${item.versionStatus1}</span>
<span style="font-size: 12px;display: inline-flex;align-items: center">${item.updateTime}<span class="update-user-name" awsui-qtip="${item.updateUser}">${item.updateUser}</span>${}</span>
</div>
<div class="bottom-info">
<span class="left-span">${item.createTime}</span>
<span style="display: inline-flex;align-items: center"> ${}<span class="create-user-name" awsui-qtip="${item.createUser}">${item.createUser}</span>${}</span>
</div>
</div>
<div class="version-icon">
${item.hasCreatePerm ? `<i class="awsui-iconfont" awsui-qtip="${新建版本}" onclick="versionListFun.createNewVersion(event,${JSON.stringify(item).replace(/\"/g, "'")})">&#xe840;</i>` : ''}
<i class="awsui-iconfont" style="margin: 0 13px;display: ${item.versionStatus === 'use' ? 'none' : ''}" awsui-qtip="${版本对比}" onclick="versionListFun.openComparePage(event,${JSON.stringify(item).replace(/\"/g, "'")})">&#xe7cd;</i>
<i class="awsui-iconfont" awsui-qtip="${切换该版本}" style="display: ${item.isHistory || item.versionStatus === 'use' ? 'none' : ''}" onclick="versionListFun.switchVersion(event,${JSON.stringify(item).replace(/\"/g, "'")})">&#xe839;</i>
<div class="select-version" id="select_${item.plId}"></div>
</div>
</div>
`
}
awsui.ajax.request({
url: './jd',
method: 'POST',
data: {
cmd: 'com.actionsoft.apps.coe.pal_pl_repository_designer_version_list',
sid: sid,
wsId: wsId,
teamId: teamId,
id: ruuid
},
ok: function (res) {
if (res.result === 'ok') {
const status = {
use: 设计中,
publish: 已发布,
stop: 已停用,
approval: 审核中,
designer: 设计
}
let versionList = res.data.versionList, historyList = res.data.historyList
versionList.forEach(item => {
item.versionStatus1 = status[item.versionStatus]
})
historyList.forEach(item => {
item.versionStatus1 = status[item.versionStatus]
})
versionListFun.versionList = [...versionList]
versionListFun.historyList = [...historyList]
let str = ''
versionList.forEach(item => {
str += versionItem(item)
})
if (historyList.length > 0) {
str += `<div class="history-title">${历史版本}</div>`
historyList.forEach(item => {
str += versionItem({...item, isHistory: true})
})
}
$("#versionList").empty()
$("#versionList").append(str)
}
}
})
},
closeVersionList() {
if ($("#versionList")) {
$("#versionList").remove()
}
},
// 创建新版本
createNewVersion(event, item) {
event.stopPropagation()
if (versionListFun.historyList.length > 0 && isBpmSupportMinor != 'true') { // 不支持小版本迭代
$.confirm({
title: 提示,
content: `${确定将} ${item.versionNo} ${item.isHistory ? 历史版本为模板创建新版本文件 : 版本为模板创建新版本文件}?`,
onConfirm: function () {
awsui.ajax.request({
url: './jd',
method: 'POST',
data: {
cmd: 'com.actionsoft.apps.coe.pal_pl_repository_designer_version_manager_create',
sid: sid,
wsId: wsId,
teamId: teamId,
id: item.plId,
isLargeIteration: true,
isHistory: item.isHistory || false
},
ok: function (res) {
if (res.result === 'ok') {
versionListFun.loadVersionList()
}
}
})
}
})
} else {
let {plId, versionNo} = item
let selectVersion = $("#select_" + plId)
if (selectVersion.is(":visible")) {
selectVersion.empty()
selectVersion.hide()
return
}
$(".select-version").hide()
selectVersion.show()
let smallVersionInteger = parseInt(versionNo.match(/\d+\.\d+/g)[0]); // 小版本整数位
let smallVersionDecimal; // 小版本小数位
let arr1 = []; // 大版本号
let arr2 = []; // 以当前版本为大版本的所有小版本
let largeVersion, smallVersion
let allVersion = versionListFun.versionList.concat(versionListFun.historyList).map(item => item.versionNo.match(/\d+\.\d+/g)[0].split('.'))
allVersion.forEach(item => {
arr1.push(parseInt(item[0]))
if (item[0] == smallVersionInteger) {
arr2.push(parseInt(item[1]))
}
})
smallVersionDecimal = Math.max(...arr2) + 1
largeVersion = 'v' + (Math.max(...arr1) + 1).toFixed(1)
if (item.isHistory) {
smallVersion = 'v' + Math.max(...arr1) + '.' + smallVersionDecimal
} else {
smallVersion = 'v' + smallVersionInteger + '.' + smallVersionDecimal
}
selectVersion.html(`
<div>${请选择版本号}:</div>
<div style="height: 25px;padding: 8px 0 4px 0;">
<input class="awsui-radio" type="radio" name="versionRadio" isLargeIteration="true">
<span style="line-height: 19px">${largeVersion}</span>
</div>
<div>
<input class="awsui-radio" type="radio" name="versionRadio" isLargeIteration="false">
<span style="line-height: 19px">${smallVersion}</span>
</div>
`)
$("input[name='versionRadio']").on("click", function (event) {
event.stopPropagation()
let isLargeIteration = $(this).attr("isLargeIteration") == 'true'
awsui.ajax.request({
url: './jd',
method: 'POST',
data: {
cmd: 'com.actionsoft.apps.coe.pal_pl_repository_designer_version_manager_create',
sid: sid,
wsId: wsId,
teamId: teamId,
id: item.plId,
isLargeIteration: isLargeIteration,
isHistory: item.isHistory || false
},
ok: function (res) {
if (res.result === 'ok') {
let newId = res.data.uuid
awsui.ajax.request({
url: './jd',
method: 'POST',
data: {
cmd: 'com.actionsoft.apps.coe.pal_pl_repository_designer_version_manager_use',
sid: sid,
wsId: wsId,
teamId: teamId,
id: newId,
},
ok: function (res) {
if (res.result === 'ok') {
let currentURL = window.location.href
let url = new URL(currentURL)
let searchParams = new URLSearchParams(url.search)
searchParams.set('uuid', newId);
url.search = searchParams.toString()
window.location.href = url.toString()
}
}
})
}
}
})
});
}
},
// 打开版本对比
openComparePage(event, item) {
event.stopPropagation()
let compareBox = $("#versionCompareBox")
compareBox.empty()
compareBox.show()
let str = '<iframe id="versionCompareContent" name="versionCompareContent" style="width: 100%; height: 100%;border: none"></iframe>';
compareBox.append(str);
$('#versionCompareContent').attr(
'src', "./w?sid=" + sid
+ "&cmd=com.actionsoft.apps.coe.pal_pl_repository_designer_version_compare"
+ "&wsId=" + wsId
+ "&compareVerId=" + item.plId
+ "&curId=" + ruuid
+ "&teamId=" + teamId
// 添加子页面所需参数:是否为历史版本
+ "&isHistory=" + item.isHistory
)
versionListFun.closeVersionList()
},
// 关闭版本对比
closeComparePage() {
parent.$("#versionCompareBox").hide()
parent.$("#versionCompareBox").empty()
},
// 切换版本
switchVersion(event, item) {
event.stopPropagation()
if ($("#saving_tip").text() == 文件已修改未保存) {
$.confirm({
title: 提示,
content: 文件修改未保存 + '' + 是否继续切换,
onConfirm: function () {
versionListFun.changeCurVersion(item.plId)
}
})
} else {
versionListFun.changeCurVersion(item.plId)
}
},
changeCurVersion(uuid) {
awsui.ajax.request({
url: './jd',
method: 'POST',
data: {
cmd: 'com.actionsoft.apps.coe.pal_pl_repository_designer_version_manager_use',
sid: sid,
wsId: wsId,
teamId: teamId,
id: uuid,
},
ok: function (res) {
if (res.result === 'ok') {
let currentURL = window.location.href
let url = new URL(currentURL)
let searchParams = new URLSearchParams(url.search)
searchParams.set('uuid', uuid);
url.search = searchParams.toString()
window.location.href = url.toString()
}
}
})
}
}
// 版本对比页面
const designerZoomYl = {
left: 100,
right: 100
}
const fileTabStr = ` <div class="attr-tab active-tab" tab="attr">
<div class="tab-name">${文件属性}</div>
</div>
<div class="attr-tab" tab="upFile">
<div class="tab-name">${附件}</div>
</div>
`
const shapeTabStr = ` <div class="attr-tab active-tab" tab="attr">
<div class="tab-name">${形状属性}</div>
</div>
<div class="attr-tab" tab="upFile">
<div class="tab-name">${附件}</div>
</div>
<div class="attr-tab" tab="link">
<div class="tab-name">${链接}</div>
</div>
`
const versionCompareFun = {
// 缩放
pageZoom(position, type) {
function handleZoom(position, type) {
if (type == 'zoomIn') {
if (designerZoomYl[position] + 10 > 200) {
designerZoomYl[position] = 200;
} else {
designerZoomYl[position] = designerZoomYl[position] + 10;
}
} else if (type == 'zoomOut') {
if (designerZoomYl[position] - 10 < 50) {
designerZoomYl[position] = 50;
} else {
designerZoomYl[position] = designerZoomYl[position] - 10;
}
} else {
designerZoomYl[position] = 100;
}
VersionDesigner.setZoomScale(position, designerZoomYl[position] / 100);
$("#zoom-value-" + position).text(Math.round(VersionDesigner.config.scale[position] * 100) + '%')
}
handleZoom(position, type)
if (isSameOperate) {
let otherPos = position === "left" ? "right" : "left";
designerZoomYl[otherPos] = designerZoomYl[position]
VersionDesigner.setZoomScale(otherPos, designerZoomYl[position] / 100);
$("#zoom-value-" + otherPos).text(Math.round(VersionDesigner.config.scale[otherPos] * 100) + '%')
}
},
// 鹰眼导航
openNavigation: function (position, isShow) {
function handleNav(position, isShow) {
if (isShow) {
$("#navigation-view-" + position).show()
Navigator.draw(position)
$('#show-nav-' + position).hide()
$('#close-nav-' + position).show()
} else {
$("#navigation-view-" + position).hide()
$('#show-nav-' + position).show()
$('#close-nav-' + position).hide()
}
}
handleNav(position, isShow)
if (isSameOperate) {
let otherPos = position === "left" ? "right" : "left";
handleNav(otherPos, isShow)
}
},
openAttributeView: function (position) {
function handleAttrView(position) {
let selectedLength = Utils.getSelected(position).length
let view = $("#attribute-view-" + position)
let headLeft = view.find('.head-left')
if (selectedLength > 0) {
headLeft.attr('viewType', 'shape')
headLeft.html(shapeTabStr)
versionCompareFun.writeShapeAttributeHtml(position)
} else {
headLeft.attr('viewType', 'file')
headLeft.html(fileTabStr)
versionCompareFun.writeFileAttributeHtml(position)
}
view.show()
let btn = $("#view-btn-" + position)
btn.find('.btn-text').remove()
btn.css('width', '45px')
btn.hide()
versionCompareFun.attrViewEvent(position)
}
handleAttrView(position)
if (isSameOperate) {
let otherPos = position === "left" ? "right" : "left";
handleAttrView(otherPos)
}
},
closeAttributeView: function (position) {
$("#attribute-view-" + position).hide()
$("#view-btn-" + position).show()
if (isSameOperate) {
let otherPos = position === "left" ? "right" : "left";
$("#attribute-view-" + otherPos).hide()
$("#view-btn-" + otherPos).show()
}
},
// view事件
attrViewEvent: function (position) {
let otherPos = position === "left" ? "right" : "left";
let view = $("#attribute-view-" + position), viewBody = $("#view-body-" + position)
let otherView = $("#attribute-view-" + otherPos)
// tab点击
view.find(".head-left").off("click").on("click", ".attr-tab", function () {
view.find(".head-left div.active-tab").removeClass("active-tab");
$(this).addClass("active-tab");
let activeTab = $(this).attr("tab")
viewBody.children().css('display', 'none')
viewBody.find('.view-' + activeTab).show()
if (isSameOperate) {
if (otherView.is(":visible")) {
let curType = $(this).parent().attr("viewType") // 当前是文件属性还是数据属性 file/shape
let otherViewHead = otherView.find('.head-left'), otherViewBody = $("#view-body-" + otherPos), otherType = otherViewHead.attr("viewType")
if (curType === otherType) {
updateActiveTab(otherViewHead, otherViewBody, activeTab)
} else {
if (curType === 'shape') {
let selectedId = Utils.getSelectedIds(position)[0]
if (PageModel[otherPos].define.elements[selectedId]) {
Utils.selectShape(otherPos, selectedId)
versionCompareFun.updateAttributeView(otherPos)
updateActiveTab(otherViewHead, otherViewBody, activeTab)
}
} else {
Utils.unselect(otherPos)
versionCompareFun.updateAttributeView(otherPos)
updateActiveTab(otherViewHead, otherViewBody, activeTab)
}
}
}
}
function updateActiveTab(otherViewHead, otherViewBody, activeTab) {
otherViewHead.children().removeClass("active-tab")
otherViewHead.find(`div[tab=${activeTab}]`).addClass("active-tab")
otherViewBody.children().css('display', 'none')
otherViewBody.find('.view-' + activeTab).show()
}
})
// 内容滚动
viewBody.off("scroll").on("scroll", function () {
if (isSameOperate) {
if (otherView.is(":visible")) {
let otherViewBody = $("#view-body-" + otherPos)
otherViewBody.scrollTop($(this).scrollTop())
}
}
})
},
// 点击画布更新属性页面
updateAttributeView: function (position) {
let view = $("#attribute-view-" + position)
let headLeft = view.find('.head-left')
let viewType = headLeft.attr('viewType') // 当前是文件属性还是数据属性 file/shape
if (view.is(":visible")) {
let selectedLength = Utils.getSelected(position).length
if (viewType === 'file') { // 已经打开了文件属性窗口
if (selectedLength > 0) {
headLeft.html(shapeTabStr)
headLeft.attr('viewType', 'shape')
this.writeShapeAttributeHtml(position)
}
} else { // 已经打开了数据属性窗口
if (selectedLength > 0) {
this.writeShapeAttributeHtml(position)
} else {
headLeft.html(fileTabStr)
headLeft.attr('viewType', 'file')
this.writeFileAttributeHtml(position)
}
}
this.attrViewEvent(position)
}
},
// 文件属性
writeFileAttributeHtml: function (position) {
const view = $("#attribute-view-" + position)
const activeTab = view.find(".active-tab").attr("tab")
let body = $("#view-body-" + position)
body.empty()
let allData = position === 'left' ? versionData : curData
let attr = allData.fileAttr, upFile = allData.fileUpFile, relationUpFile = allData.fileRelationUpFile
let attrStr = this.getAttrStr(position, attr)
let bodyStr = `<div class="view-attr" style="display:none;">
${attrStr === '' ? `<div class="category-item">${暂无文件属性}</div>` : `${attrStr}`}
</div>
<div class="view-upFile" style="display:none;">
${this.getAttrStr(position, [{type: 'file', name: 附件, value: upFile.value, isDiff: upFile.isDiff,}])}
${this.getAttrStr(position, [{type: 'file', name: 关联附件, value: relationUpFile.value, isDiff: relationUpFile.isDiff}])}
</div>`
body.html(bodyStr)
body.find('.view-' + activeTab).show()
// 追加差异样式
view.find(".tab-name").removeClass('attr-diff')
if (attr && attr.some(i => i.isDiff)) {
view.find('div[tab=attr]').find('.tab-name').addClass('attr-diff')
}
},
// 形状属性
writeShapeAttributeHtml: function (position) {
const view = $("#attribute-view-" + position)
const activeTab = view.find(".active-tab").attr("tab")
let body = $("#view-body-" + position)
body.empty()
let shape = Utils.getSelected(position)[0]
const allData = position === 'left' ? versionData : curData
let attributeArr = allData.shapeAttr[shape.id] || [],
shapeUpFile = allData.shapeUpFile[shape.id] || {},
shapeRelationUpFile = allData.shapeRelationUpFile[shape.id] || {},
shapeLink = allData.shapeLink[shape.id] || {file: {}, custom: {}}
let attrStr = this.getAttrStr(position, attributeArr)
let bodyStr = `<div class="view-attr" style="display:none;">
${attrStr === '' ? `<div class="category-item">${暂无形状属性}</div>` : `${attrStr}`}
</div>
<div class="view-upFile" style="display:none;">
${this.getAttrStr(position, [{type: 'file', name: 附件, value: shapeUpFile.value, isDiff: shapeUpFile.isDiff,}])}
${this.getAttrStr(position, [{type: 'file', name: 关联附件, value: shapeRelationUpFile.value, isDiff: shapeRelationUpFile.isDiff}])}
</div>
<div class="view-link" style="display:none;">
${this.getAttrStr(position, [{type: 'shapeLink', name: 文件链接, value: shapeLink.file.value, isDiff: shapeLink.file.isDiff}])}
${this.getAttrStr(position, [{type: 'shapeLink', name: 自定义链接, value: shapeLink.custom.value, isDiff: shapeLink.custom.isDiff}])}
</div>`
body.html(bodyStr)
body.find('.view-' + activeTab).show()
// 追加差异样式
view.find(".tab-name").removeClass('attr-diff')
if (attributeArr.some(i => i.isDiff)) {
view.find('div[tab=attr]').find('.tab-name').addClass('attr-diff')
}
if (shapeUpFile.isDiff || shapeRelationUpFile.isDiff) {
view.find('div[tab=upFile]').find('.tab-name').addClass('attr-diff')
}
if (shapeLink.file.isDiff || shapeLink.custom.isDiff) {
view.find('div[tab=link]').find('.tab-name').addClass('attr-diff')
}
},
getAttrStr: function (position, attr) {
let str = ''
if (!attr) return str;
attr.forEach(item => {
if (item.type === 'relation' || item.type === 'awsorg') {
item.value = item.value.toString()
}
let contentStr = ''
switch (item.type) {
case 'table':
if (item.value) {
let tableStr = ''
let table = JSON.parse(item.value).table
let t1 = table[0].name, t2 = table[0].desc
tableStr += `<div class="table-header">
<div class="left-tr" >${t1}</div>
<div class="right-tr">${t2}</div>
</div>`
for (let i = 1; i < table.length; i++) {
let t1 = table[i].name, t2 = table[i].desc
tableStr += `<div class="table-row">
<div class="left-tr">${t1}</div>
<div class="right-tr">${t2}</div>
</div>`
}
contentStr = `<div class="attr-table-content">${tableStr}</div>`
} else {
contentStr = `<div class="category-content">${暂无}${item.name}</div>`
}
break;
case 'file':
let isHighSecurity = false
let fileList = item.value || []
let listStr = ''
fileList.forEach(item => {
let security = '' // 三元
if (isHighSecurity) {
security = `<span style="color: ${item.securityInfo.color}">${item.securityInfo.name}</span>`
}
listStr += `<div class="file-item">
<div class="name-box">
<span class="name-content" awsui-qtip="${item.fileName}" style="max-width: ${security === '' ? '100%' : 'calc(100% - 50px)'}" >${item.fileName}</span>
${security}
</div>
<div class="file-menu" awsui-qtip="${预览}" onclick="versionCompareFun.previewFile('${position}',${JSON.stringify(item).replace(/\"/g, "'")})">
<i class="awsui-iconfont">&#xe698;</i>
</div>
</div>`
})
contentStr = `<div class="category-content">${listStr === '' ? `${暂无}${item.name}` : listStr}</div>`
break;
case 'link':
contentStr = `<div class="category-content">
${item.value === '' ? `${暂无}${item.name}` : `<a href="${item.value}" target="_blank" style="color: #333">${item.value}</a>`}
</div>`
break;
case 'shapeLink':
let linkStr = '', list = item.value || []
list.forEach(i => {
linkStr += `<div class="file-item">
<div class="name-box" awsui-qtip="${i.url}">
<a href="${i.url}" target="_blank" style="color: #333">${i.value}</a>
</div>
</div>`
})
contentStr = `<div class="category-content">${linkStr === '' ? `${暂无}${item.name}` : linkStr}</div>`
break;
default:
contentStr = `<div class="category-content">
${item.value === '' ? `${暂无}${item.name}` : `${item.value}`}
</div>`
}
str += `<div class="category-item ${item.isDiff ? 'attr-diff' : ''}">
<div class="attr-title">${item.name}</div>
${contentStr}
</div>`
})
return str
},
// 预览
previewFile(position, file) {
const imgType = ['jpg', 'jpeg', 'gif', 'png']
const fileType = file.fileName.split('.').reverse()[0]
if (!imgType.includes(fileType)) { // 不是图片
window.open(file.downloadUrl)
return
}
$("#attribute-view-" + position).css('opacity', 0)
$('#model-' + position).show()
const otherPos = position === 'left' ? 'right' : 'left'
const windowWidth = document.body.clientWidth
const dialog = $('#file-preview-' + position), otherDialog = $('#file-preview-' + otherPos)
const img = new Image()
img.src = file.downloadUrl
img.addEventListener('load', function () {
dialog.find('img').attr('src', img.src)
dialog.dialog({
title: file.fileName,
width: 650,
height: 480,
model: false,
onClose: function () {
$('#model-' + position).hide()
$("#attribute-view-" + position).css('opacity', 1)
}
})
let dialogWidth = dialog.outerWidth(true), otherDialogWidth = otherDialog.outerWidth(true)
let x = windowWidth / 2 / 2 - dialogWidth / 2
if (position === 'right') {
x += windowWidth / 2
}
dialog.css({
left: x + 'px'
})
if (otherDialog.is(":visible")) {
// dialog机制会把已经打开的dialog居中 这里重新设置一下
let x = windowWidth / 2 / 2 - otherDialogWidth / 2
if (otherPos === 'right') {
x += windowWidth / 2
}
otherDialog.css({
left: x + 'px'
})
}
})
},
// 同步操作
isOpenSameOperate(isOpen) {
isSameOperate = isOpen
if (isOpen) {
$('.opend-operate').show()
$('.closed-operate').hide()
} else {
$('.opend-operate').hide()
$('.closed-operate').show()
}
},
// 版本列表
openCompareList() {
versionCompareFun.closeAttributeView('left')
versionCompareFun.closeAttributeView('right')
let page = $("#compareVersionList")
if (page.is(":visible")) {
page.hide()
page.empty()
} else {
awsui.ajax.request({
url: './jd',
method: 'POST',
data: {
cmd: 'com.actionsoft.apps.coe.pal_pl_repository_designer_version_list',
sid: parent.sid,
wsId: parent.wsId,
teamId: parent.teamId,
id: parent.ruuid
},
ok: function (res) {
if (res.result === 'ok') {
const status = {
use: 设计中,
publish: 已发布,
stop: 已停用,
approval: 审核中,
designer: 设计
}
let versionList = res.data.versionList, historyList = res.data.historyList
versionList.forEach(item => {
item.versionStatus1 = status[item.versionStatus]
})
historyList.forEach(item => {
item.isHistory = true
item.versionStatus1 = status[item.versionStatus]
})
let allList = versionList.concat(historyList)
page.empty()
let str = ''
allList.forEach(item => {
let isDisabled = item.versionNo === versionData.versionNo || item.versionNo === curData.versionNo
str += `
<div style="cursor: ${isDisabled ? 'not-allowed' : 'pointer'}" class="version-item ${isDisabled ? 'disabled' : ''}" onclick="versionCompareFun.changeComparePageUrl(this,'${item.plId}','${item.isHistory}')">
<div class="version-content">
<div class="top-info">
<span class="left-span version-state-${item.versionStatus}">${item.versionNo} ${item.versionStatus1}</span>
</div>
<div class="bottom-info">
<span style="display: inline-flex;align-items: center">${item.updateTime} ${}<span style="max-width: 65px" class="update-user-name" awsui-qtip="${item.updateUser}">${item.updateUser}</span>${}</span>
</div>
</div>
<div style="width: 30px;text-align: center">
<i class="awsui-iconfont" style="font-size: 20px">${item.versionNo === versionData.versionNo ? '&#xea2e;' : ''}</i>
</div>
</div>
`
})
page.append(str)
page.show()
}
}
})
}
},
// 点击监听 关闭版本列表
closeVersionListByClick(event) {
let page = $("#compareVersionList")
if (!page.is(":visible")) {
return;
}
let targetElement = event.target; // 获取被点击的元素
let isClickInsideDropdown = document.getElementById('compareVersionList').contains(targetElement); // 检查点击是否在下拉框内
let isClickOnButton = document.querySelector('.center-top').contains(targetElement); // 检查点击是否在触发按钮内
if (!isClickInsideDropdown && !isClickOnButton) {
// 关闭下拉框
page.hide()
page.empty()
}
},
// 切换对比版本
changeComparePageUrl($this, compareVerId, isHistory) {
if ($($this).hasClass('disabled')) return
let listBox = $("#compareVersionList"), iframe = parent.$('#versionCompareContent')
listBox.hide()
listBox.empty()
parent.$.simpleAlert(正在切换, 'loading')
iframe.attr(
'src', "./w?sid=" + parent.sid
+ "&cmd=com.actionsoft.apps.coe.pal_pl_repository_designer_version_compare"
+ "&wsId=" + parent.wsId
+ "&compareVerId=" + compareVerId
+ "&curId=" + curData.plId
+ "&teamId=" + parent.teamId
// 添加子页面所需参数:是否为历史版本
+ "&isHistory=" + isHistory
)
iframe.on('load', function () {
parent.$.simpleAlert("close")
})
},
// 切换到该版本
changeToSelectedV() {
$.confirm({
title: 提示,
content: 是否将 + ` ${versionData.versionNo} ` + 切换为使用中,
onConfirm: function () {
awsui.ajax.request({
url: './jd',
method: 'POST',
data: {
cmd: 'com.actionsoft.apps.coe.pal_pl_repository_designer_version_manager_use',
sid: parent.sid,
wsId: parent.wsId,
teamId: parent.teamId,
id: versionData.plId,
},
ok: function (res) {
if (res.result === 'ok') {
let currentURL = parent.window.location.href
let url = new URL(currentURL)
let searchParams = new URLSearchParams(url.search)
searchParams.set('uuid', versionData.plId);
url.search = searchParams.toString()
parent.window.location.href = url.toString()
}
}
})
}
})
}
}

View File

@ -0,0 +1,643 @@
.compare-main {
height: 100%;
width: 100%;
position: absolute;
left: 0;
top: 0;
z-index: 9999
}
.versionList {
position: absolute;
top: 45px;
right: 75px;
width: 430px;
height: 310px;
padding: 10px;
overflow: auto;
background: #fff;
box-shadow: 0px 6px 18px 0px rgba(0, 21, 44, 0.1);
border-radius: 8px;
z-index: 9999;
}
.compare-version-list {
position: absolute;
top: 40px;
left: -131px;
width: 290px;
height: 310px;
padding: 10px;
overflow: auto;
background: #fff;
box-shadow: 0px 6px 18px 0px rgba(0, 21, 44, 0.1);
border-radius: 8px;
z-index: 9999;
}
.version-item {
height: 60px;
margin-bottom: 2px;
border-radius: 4px;
display: flex;
align-items: center;
padding: 0 14px 0 18px
}
.disabled {
background: #f2f2f2 !important;
color: #c0c4cc;
cursor: not-allowed;
}
.version-state-use {
color: #4E7FF9
}
.version-state-publish {
color: #1FDD00
}
.version-state-stop {
color: #E02020
}
.version-state-approval {
color: #FF8F0B
}
.version-state-designer {
color: #8592A6
}
.version-item:hover {
background: #F1F6FF;
}
.version-item:hover .version-icon {
visibility: visible;
}
.version-content {
flex: 1
}
.version-content .left-span {
display: inline-block;
width: 90px;
}
.version-content .top-info {
font-size: 14px;
padding: 3px 0;
}
.version-content .bottom-info {
color: #8592A6;
font-size: 12px;
}
.version-content .update-user-name {
display: inline-block;
max-width: 80px;
padding: 0 5px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.version-content .create-user-name {
display: inline-block;
max-width: 150px;
padding: 0 5px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.version-icon {
position: relative;
width: 85px;
visibility: hidden;
}
.version-icon i {
font-size: 17px;
cursor: pointer;
color: #8592A6;
}
.select-version {
display: none;
position: absolute;
top: 23px;
left: -110px;
width: 140px;
height: 100px;
font-size: 14px;
background: #FFFFFF;
box-shadow: 0px 4px 12px 0px rgba(0, 0, 0, 0.1);
border-radius: 4px;
padding: 10px 15px;
box-sizing: border-box;
z-index: 1;
}
.history-title {
border-top: 1px solid #D9D9D9;
margin-top: 5px;
font-weight: 500;
font-size: 14px;
color: #333333;
padding: 12px 0 12px 20px;
}
/********************************** 下面是版本对比页面 ******************************************************/
.flex-center {
display: flex;
align-items: center;
justify-content: space-between
}
.page-head {
height: 60px;
padding: 0 10px;
}
.left,
.right {
flex: 1;
display: flex;
}
.page-head .method-icon {
display: inline-block;
color: white;
width: 30px;
height: 30px;
margin: 0 10px;
border-radius: 3px;
text-align: center;
line-height: 30px;
}
.page-head .left-right {
min-width: 90px;
padding: 0 5px;
height: 34px;
line-height: 34px;
background: #FFFFFF;
border-radius: 4px 4px 4px 4px;
border: 1px solid #DDDDDD;
text-align: center;
margin-right: 15px;
cursor: pointer;
}
.page-head .left-center {
height: 40px;
width: 100px;
display: flex;
flex-direction: column;
align-items: center;
justify-content: space-around;
}
.page-head .update-time {
font-size: 12px;
color: #8592A6;
}
.center-top {
font-size: 14px;
cursor: pointer;
}
.same-operate {
width: 26px;
height: 26px;
line-height: 26px;
border-radius: 2px;
color: #fff;
text-align: center;
cursor: pointer;
box-shadow: 5px -5px 0px 0px #83AEFF;
}
.opend-operate {
background: #2978FF;
box-shadow: 5px -5px 0px 0px #83AEFF;
}
.closed-operate {
background: #5B606A;
box-shadow: 5px -5px 0px 0px #A0AAB5;
}
.designer-wrapper {
position: relative;
width: 50%;
height: calc(100vh - 60px - 35px);
border-top: 1px solid #666;
}
.version-designer-layout {
width: 100%;
height: 100%;
background: url(../images/diagraming/canvas_bg.jpg) repeat;
overflow: auto;
}
.version-canvas_container {
padding: 10px;
}
.version-canvas {
position: relative;
background: #fff;
width: 100%;
height: 100%;
cursor: default;
}
.version-footer {
height: 35px;
display: flex;
}
.footer-half {
position: relative;
height: 100%;
width: 50%;
display: flex;
align-items: center;
justify-content: flex-end;
}
.footer-half .zoom-value {
display: inline-block;
font-size: 14px;
width: 50px;
text-align: center;
cursor: pointer;
}
.footer-half i {
cursor: pointer;
margin: 0 10px;
user-select: none;
}
.shape_box {
position: absolute;
}
.text_canvas {
position: absolute;
padding: 0px;
border: none;
background: transparent;
cursor: inherit;
overflow: hidden;
-moz-user-select: none;
-webkit-user-select: none;
-ms-user-select: none;
-khtml-user-select: none;
user-select: none;
}
.attr_canvas {
position: absolute;
}
input,
textarea {
resize: none;
outline: none;
font-size: 13px;
font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}
.shape-controls {
position: absolute;
}
.shape-controls .controls-bounding {
position: absolute;
left: -10px;
top: -10px;
}
.shape_controller {
position: absolute;
border-style: solid;
border-width: 1px;
background: white;
}
.shape_locker {
position: absolute;
}
.diff-icon-wrapper {
position: absolute;
left: 0;
top: -23px;
z-index: 200;
}
.diff-icon-span {
display: inline-block;
width: 20px;
height: 20px;
line-height: 20px;
border-radius: 50%;
text-align: center;
margin-right: 4px;
}
.diff-icon-span i {
color: #fff;
font-size: 14px;
}
.shape_link_point {
cursor: pointer;
position: absolute;
right: -14px;
bottom: -0px;
width: 10px;
height: 10px;
color: #515151;
}
.shape_attachment_point {
cursor: pointer;
position: absolute;
right: -14px;
bottom: 16px;
width: 10px;
height: 10px;
}
/********************************** 鹰眼视图开始 ***************************************/
.version-dock_view {
display: none;
position: absolute;
top: -200px;
right: 20px;
width: 220px;
background: #f5f5f5;
border: 1px solid #999;
-webkit-box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.33);
-moz-box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.33);
box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.33);
}
.navigation_bounding {
padding: 10px 0px;
overflow: hidden;
}
.navigation_view_container {
margin: 0px auto;
position: relative;
width: 120px;
}
.navigation_canvas {
background: white;
border: 1px solid #888;
}
.navigation_eye {
position: absolute;
border: 2px solid #6EB1EB;
top: 0px;
left: 0px;
width: 100px;
height: 80px;
}
/********************************** 鹰眼视图结束 ***************************************/
.attribute-view {
display: none;
position: absolute;
right: 2px;
top: 2px;
height: calc(100% - 4px);
width: 390px;
background: #FFFFFF;
box-shadow: -6px 0px 18px 0px rgba(0, 0, 0, 0.1);
z-index: 299;
}
.attribute-view-btn {
position: absolute;
right: 0;
top: 30px;
width: 40px;
height: 40px;
background: #FFFFFF;
box-shadow: 0 2px 10px 0 rgba(227, 233, 241, 0.7);
border-radius: 25px 0 0 25px;
border: 1px solid #DFE5F0;
padding: 0 5px 0 8px;
box-sizing: border-box;
display: flex;
align-items: center;
cursor: pointer;
/*transition: width .1s ease-in-out;*/
user-select: none;
z-index: 299;
}
.attribute-view-btn .btn-icon {
width: 32px;
height: 32px;
line-height: 32px;
text-align: center;
pointer-events: none;
}
.attribute-view .view-head {
display: flex;
align-items: center;
justify-content: space-between;
height: 54px;
padding: 0 16px;
border-bottom: 1px solid #DFE5F0;
font-size: 14px;
font-weight: 500;
}
.view-head .head-left {
height: 100%;
display: flex;
align-items: center;
}
.attr-tab {
height: 100%;
display: flex;
align-items: center;
margin-right: 15px;
border-bottom: solid 2px transparent;
}
.attr-tab .tab-name {
padding: 3px;
cursor: pointer;
}
.head-right i {
cursor: pointer;
font-size: 12px;
color: #4C576C;
}
.active-tab {
cursor: default;
border-bottom: solid 2px #4e7ff9;
color: #4e7ff9;
}
.attribute-view .view-body {
box-sizing: border-box;
padding: 8px;
height: calc(100% - 54px);
overflow: auto;
}
.category-item {
padding: 8px;
margin-bottom: 2px;
}
.attr-diff {
background: rgba(255, 143, 11, 0.15);
border: 2px dashed #FF8F0B;
}
.category-item .attr-title {
font-weight: 500;
font-size: 14px;
color: #333333;
margin-bottom: 10px;
}
.category-item .category-content {
background: #F5F5F5;
border-radius: 4px;
padding: 5px 10px;
min-height: 15px;
}
.attr-table-content {
border-radius: 4px 4px 0 0;
border: 1px solid #D9D9D9;
}
.attr-table-content .table-header {
display: flex;
height: 32px;
line-height: 32px;
background: #F5F5F5;
border-radius: 4px 4px 0 0;
border-bottom: 1px solid #D9D9D9;
}
.table-header div {
text-align: center;
}
.attr-table-content .table-row {
display: flex;
border-bottom: 1px solid #D9D9D9;
}
.category-item .table-row:last-child {
border-bottom: none;
}
.table-row div {
padding: 6px 5px;
}
.attr-table-content .left-tr {
box-sizing: border-box;
width: 110px;
border-right: 1px solid #D9D9D9;
}
.attr-table-content .right-tr {
flex: 1;
}
.file-item {
display: flex;
justify-content: space-between;
margin-bottom: 5px;
}
.name-box {
width: calc(100% - 30px);
display: flex;
align-items: center;
}
.name-box .name-content {
display: inline-block;
max-width: calc(100% - 30px);
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.file-item .file-menu {
visibility: hidden;
}
.file-item:hover .file-menu {
cursor: pointer;
visibility: visible;
}
.dialog-model {
position: absolute;
top: 60px;
width: 50%;
height: calc(100% - 60px);
background: #fff;
z-index: 299;
opacity: 0.6;
}
.shape-tip {
position: absolute;
top: 50%;
transform: translateY(-50%);
z-index: 299;
color: #E02020;
writing-mode: vertical-rl;
text-align: center;
padding: 35px 6px;
background: #FFFCFC;
letter-spacing: 3px;
display: none;
}
.shape-tip-left {
right: 0;
clip-path: polygon(0 30px, 100% 0, 100% 100%, 0 calc(100% - 30px));
}
.shape-tip-right {
left: 0;
clip-path: polygon(0 0, 100% 30px, 100% calc(100% - 30px), 0 100%);
}