Commit fc43e581 by liuyong
2 parents dd734d18 90d303d7
...@@ -6,11 +6,69 @@ const initDrawioGraph = function (that) { ...@@ -6,11 +6,69 @@ const initDrawioGraph = function (that) {
that.loadFile(`-2`, true, file) that.loadFile(`-2`, true, file)
} else { } else {
// const jsonToGraph = JSON.parse(localStorage.getItem('jsonToGraph'))
// console.log('jsonToGraph', JSON.parse(jsonToGraph))
// console.log('that', that)
const xmlData = localStorage.getItem('xmlData') const xmlData = localStorage.getItem('xmlData')
const xmlTitle = localStorage.getItem('xmlTitle') const xmlTitle = localStorage.getItem('xmlTitle')
const file = new LocalFile(that, xmlData, xmlTitle, that.mode) const file = new LocalFile(that, xmlData, xmlTitle, that.mode)
that.loadFile(`-1`, true, file) that.loadFile(`-1`, true, file)
// return
// const xmlCellList = []
// jsonToGraph.forEach(v => {
// let cellObj = {
// sourceIconName: null,
// targetIconName: null
// }
// for (const key in v) {
// if (Object.hasOwnProperty.call(v, key)) {
// const element = v[key];
// if(key === 'sourceIconName' || key === 'targetIconName'){
// var xml = atob(element)
// var doc = mxUtils.parseXml(xml);
// var node = Editor.extractGraphModel(doc.documentElement, true);
// console.log('node', node);
// const xmlData = node.outerHTML
// console.log('xmlData', node.outerHTML)
// const file = new LocalFile(that, xmlData, xmlTitle, that.mode)
// that.loadFile(`-1`, true, file)
// const allCell = that.editor.graph.getDefaultParent().children
// cellObj[key] = allCell[0]
// }
// }
// }
// xmlCellList.push(cellObj)
// })
// console.log('xmlCellList', xmlCellList)
// return
// var xml = atob('PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB2ZXJzaW9uPSIxLjEiIHdpZHRoPSI3MXB4IiBoZWlnaHQ9IjQxcHgiIHZpZXdCb3g9Ii0wLjUgLTAuNSA3MSA0MSIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6IHJnYigyNTUsIDI1NSwgMjU1KTsiPjxkZWZzLz48Zz48cmVjdCB4PSIwIiB5PSIwIiB3aWR0aD0iNzAiIGhlaWdodD0iNDAiIHJ4PSI2IiByeT0iNiIgZmlsbD0iI2ZmZmU1NSIgc3Ryb2tlPSIjYjA5NTAwIiBwb2ludGVyLWV2ZW50cz0iYWxsIi8+PHBhdGggZD0iTSA2MCAxNCBMIDY1IDQgTCA3MCAxNCBaIiBmaWxsPSJyZ2IoMjU1LCAyNTUsIDI1NSkiIHN0cm9rZT0icmdiKDAsIDAsIDApIiBzdHJva2UtbWl0ZXJsaW1pdD0iMTAiIHBvaW50ZXItZXZlbnRzPSJhbGwiLz48L2c+PC9zdmc+')
// // var xml = atob('PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IS0tIERvIG5vdCBlZGl0IHRoaXMgZmlsZSB3aXRoIGVkaXRvcnMgb3RoZXIgdGhhbiBkcmF3LmlvIC0tPjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCI+PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB2ZXJzaW9uPSIxLjEiIHdpZHRoPSIxMjJweCIgaGVpZ2h0PSI2MnB4IiB2aWV3Qm94PSItMC41IC0wLjUgMTIyIDYyIiBjb250ZW50PSImbHQ7bXhmaWxlIGhvc3Q9JnF1b3Q7bG9jYWxob3N0JnF1b3Q7IG1vZGlmaWVkPSZxdW90OzIwMjQtMDEtMTVUMDc6MTE6MDQuMTM3WiZxdW90OyBhZ2VudD0mcXVvdDtNb3ppbGxhLzUuMCAoV2luZG93cyBOVCAxMC4wOyBXaW42NDsgeDY0KSBBcHBsZVdlYktpdC81MzcuMzYgKEtIVE1MLCBsaWtlIEdlY2tvKSBDaHJvbWUvMTIwLjAuMC4wIFNhZmFyaS81MzcuMzYgRWRnLzEyMC4wLjAuMCZxdW90OyB2ZXJzaW9uPSZxdW90O0BEUkFXSU8tVkVSU0lPTkAmcXVvdDsgZXRhZz0mcXVvdDtxT0NveS1YVVJURndURVUtWHY2XyZxdW90OyB0eXBlPSZxdW90O2RldmljZSZxdW90OyZndDsmbHQ7ZGlhZ3JhbSBpZD0mcXVvdDtxSTJ3VmFRUXcwX0FvRG1jVHlXaiZxdW90OyBuYW1lPSZxdW90O+esrCAxIOmhtSZxdW90OyZndDtqWlBCYm9Nd0RJYWZodU9taGhTMkhWdGF1c3VrVGEzVTNhYUl1Q1JTSUN3TkEvYjBjeUNVb3FyU1RqaGYvaml4L1JQUXBHaDNobFhpVFhOUVFiamdiVUEzUVJnU0dzYjRjYVFiU0xSOEdVQnVKUGVpQ2V6bEwzaTQ4TFNXSE00em9kVmFXVm5OWWFiTEVqSTdZOHdZM2N4bEo2M210MVlzaHh1d3o1aTZwVWZKclJqb2MvZzA4VmVRdVJodkpyR3ZyMkNqMkZkeUZvenI1Z3JSYlVBVG83VWRvcUpOUUxubWpYMFp6cVYzZGk4UE0xRGEveHc0OHZjVGZCN0FLbDNzeUZmSFB3UThrT1dRNW9lcDJsZnNYMnU3c1FYQ0Znb2pFdEMxcnEyU0pTU1haaThRTmtKYTJGY3NjL29HYllEc0pKVkt0TkttVDBGWGFacXU4R0ZyYkVMbFpFV2JPNzg4TXBNSmlhMEMrc2lxU3NtTVdhbExGT0xxMFBYU0VqM2xnRk42ZFA2dXNXeUVnYk1YSmRTRjl5OWwxdllvV2dmUnh0Y0x4a0o3dDVQa01oODBOdWdDck9sUTRnL1F5SS9VZXpxTS9icVpIRUxHdE9MS0hmRm9URy9LL0pKNm1oc0dmblRqY3JKSXYzZjFvOUh0SHc9PSZsdDsvZGlhZ3JhbSZndDsmbHQ7L214ZmlsZSZndDsiIHN0eWxlPSJiYWNrZ3JvdW5kLWNvbG9yOiByZ2IoMjU1LCAyNTUsIDI1NSk7Ij48ZGVmcy8+PGc+PHJlY3QgeD0iMCIgeT0iMCIgd2lkdGg9IjEyMSIgaGVpZ2h0PSI2MSIgZmlsbD0iI0ZGM0IzMCIgc3Ryb2tlPSJyZ2IoMCwgMCwgMCkiIHBvaW50ZXItZXZlbnRzPSJhbGwiLz48cGF0aCBkPSJNIDEwMSA4Ljc1IEwgMTA0Ljc1IDUgTCAxMTYgNSBMIDExNiAxNi4yNSBMIDExMi4yNSAyMCBMIDEwMSAyMCBaIE0gMTAxIDguNzUgTCAxMTIuMjUgOC43NSBMIDExMi4yNSAyMCBNIDExNiA1IEwgMTEyLjI1IDguNzUiIGZpbGw9IiNGRjNCMzAiIHN0cm9rZT0icmdiKDAsIDAsIDApIiBzdHJva2UtbWl0ZXJsaW1pdD0iMTAiIHBvaW50ZXItZXZlbnRzPSJhbGwiLz48L2c+PC9zdmc+');
// console.log('xml', xml)
// var doc = mxUtils.parseXml(xml);
// var node = Editor.extractGraphModel(doc.documentElement, true);
// // var xmlDoc = node.ownerDocument;
// console.log('node', node);
// // console.log('xmlDoc', xmlDoc);
// // console.log('doc.documentElement', `<mxGraphModel dx="2219" dy="1878" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="827" pageHeight="1169" math="0" shadow="0">
// // <root>` + node.innerHTML + `</root></mxGraphModel>`);
// const xmlData2 = node.outerHTML
// // console.log('xmlData', xmlData)
// console.log('xmlData2', node.outerHTML)
// const file2 = new LocalFile(that, xmlData2, xmlTitle, that.mode)
// // graph.setXml(xmlData2)
// that.loadFile(`-1`, true, file2)
// // console.log('getModel', that.editor.graph.getChildCells(that.editor.graph.getDefaultParent(), true, true))
// const allCell = that.editor.graph.getDefaultParent().children
// console.log('allCell', allCell)
// console.log('doc', doc.documentElement, that.editor.graph.getModel())
// console.log('set', Editor.prototype.setGraphXml(doc.documentElement))
// // 从XML数据中还原图形状态
// var decoder = new mxCodec(xmlDoc);
// decoder.decode(xmlDoc, that.editor.graph.getModel());
// // 自适应大小
// that.editor.graph.fit();
} }
window.onmessage = (e) => { window.onmessage = (e) => {
...@@ -248,6 +306,8 @@ const leftCustomGraph = function (that) { ...@@ -248,6 +306,8 @@ const leftCustomGraph = function (that) {
if (joinGraph_.state == 1) { if (joinGraph_.state == 1) {
// 标准图元 // 标准图元
joinGraph.pop() joinGraph.pop()
Sidebar.prototype.sidebarTitles = true;//勾选标签
// Sidebar.prototype.createEdgeTemplateEntry
joinGraph.forEach(function (item, index) { joinGraph.forEach(function (item, index) {
if (item.eleDtos) { if (item.eleDtos) {
if (item.eleDtos.length > 0) { if (item.eleDtos.length > 0) {
...@@ -265,7 +325,7 @@ const leftCustomGraph = function (that) { ...@@ -265,7 +325,7 @@ const leftCustomGraph = function (that) {
var xml = that.createLibraryDataFromImages(images) var xml = that.createLibraryDataFromImages(images)
var file = new LocalLibrary(that, xml, libraryName) var file = new LocalLibrary(that, xml, libraryName)
that.libraryLoaded(file, images, null, false) that.libraryLoaded(file, images, null, true)
} else { } else {
} }
} }
......
...@@ -42,10 +42,30 @@ ...@@ -42,10 +42,30 @@
const joinGraph_ = JSON.parse(localStorage.getItem('joinGraph')); const joinGraph_ = JSON.parse(localStorage.getItem('joinGraph'));
if(joinGraph_.state == 2) {
const joinGraph = joinGraph_.graph; const joinGraph = joinGraph_.graph;
this.sidebarTitles = true;//勾选标签 this.sidebarTitles = true;//勾选标签
if(joinGraph_.state == 1) {
joinGraph.forEach(item => {
if(item.arciBelongName == '架构元素关系') {
let fns = [];
item.eleDtos.forEach(item2 => {
fns.push(
this.createEdgeTemplateEntry(
item2.iconName + 'attr=[];assetName=[' + item2.rsName + '];',
item2.shapeWidth ? item2.shapeWidth : 150,
item2.shapeHeight ? item2.shapeHeight : 75,
'',
item2.rsName,
null,
'非封闭图形2'
)
)
});
this.addPaletteFunctions(item.arciBelongId, item.arciBelongName, true, fns);
}
})
}
if(joinGraph_.state == 2) {
// console.log(joinGraph) // console.log(joinGraph)
joinGraph.forEach(item => { joinGraph.forEach(item => {
if(item.arciBelongName == '架构元素关系') { if(item.arciBelongName == '架构元素关系') {
......
...@@ -1041,109 +1041,112 @@ ...@@ -1041,109 +1041,112 @@
} }
} }
} }
// 二次开发-画布只保留五大架构元素关系图标
const joinGraph_ = JSON.parse(localStorage.getItem('joinGraph'));
if(joinGraph_.state == 2) {
this.addGeneralPalette(this.customEntries == null);//通用图形 this.addGeneralPalette(this.customEntries == null);//通用图形
this.addMiscPalette(false); //杂项图形 }
this.addAdvancedPalette(false);//高级图形 // this.addMiscPalette(false); //杂项图形
this.addBasicPalette();//基本图形 // this.addAdvancedPalette(false);//高级图形
this.addStencilPalette('arrows', mxResources.get('arrows'), dir + '/arrows.xml', // this.addBasicPalette();//基本图形
';html=1;' + mxConstants.STYLE_VERTICAL_LABEL_POSITION + '=bottom;' + mxConstants.STYLE_VERTICAL_ALIGN + '=top;' + mxConstants.STYLE_STROKEWIDTH + '=2;strokeColor=#000000;', // this.addStencilPalette('arrows', mxResources.get('arrows'), dir + '/arrows.xml',
null, null, null, null, null, 'arrows'); // ';html=1;' + mxConstants.STYLE_VERTICAL_LABEL_POSITION + '=bottom;' + mxConstants.STYLE_VERTICAL_ALIGN + '=top;' + mxConstants.STYLE_STROKEWIDTH + '=2;strokeColor=#000000;',
this.addArrows2Palette();//箭头图形 // null, null, null, null, null, 'arrows');
// this.addArrows2Palette();//箭头图形
this.setCurrentSearchEntryLibrary('clipart', 'computer');
this.addImagePalette('computer', 'Clipart / Computer', imgDir // this.setCurrentSearchEntryLibrary('clipart', 'computer');
+ '/lib/clip_art/computers/', '_128x128.png', ['Antivirus', // this.addImagePalette('computer', 'Clipart / Computer', imgDir
'Data_Filtering', 'Database', 'Database_Add', 'Database_Minus', // + '/lib/clip_art/computers/', '_128x128.png', ['Antivirus',
'Database_Move_Stack', 'Database_Remove', 'Fujitsu_Tablet', // 'Data_Filtering', 'Database', 'Database_Add', 'Database_Minus',
'Harddrive', 'IBM_Tablet', 'iMac', 'iPad', 'Laptop', 'MacBook', // 'Database_Move_Stack', 'Database_Remove', 'Fujitsu_Tablet',
'Mainframe', 'Monitor', 'Monitor_Tower', // 'Harddrive', 'IBM_Tablet', 'iMac', 'iPad', 'Laptop', 'MacBook',
'Monitor_Tower_Behind', 'Netbook', 'Network', 'Network_2', // 'Mainframe', 'Monitor', 'Monitor_Tower',
'Printer', 'Printer_Commercial', 'Secure_System', 'Server', // 'Monitor_Tower_Behind', 'Netbook', 'Network', 'Network_2',
'Server_Rack', 'Server_Rack_Empty', 'Server_Rack_Partial', // 'Printer', 'Printer_Commercial', 'Secure_System', 'Server',
'Server_Tower', 'Software', 'Stylus', 'Touch', 'USB_Hub', // 'Server_Rack', 'Server_Rack_Empty', 'Server_Rack_Partial',
'Virtual_Application', 'Virtual_Machine', 'Virus', // 'Server_Tower', 'Software', 'Stylus', 'Touch', 'USB_Hub',
'Workstation' ], [ 'Antivirus', 'Data Filtering', 'Database', // 'Virtual_Application', 'Virtual_Machine', 'Virus',
'Database Add', 'Database Minus', 'Database Move Stack', // 'Workstation' ], [ 'Antivirus', 'Data Filtering', 'Database',
'Database Remove', 'Fujitsu Tablet', 'Harddrive', 'IBMTablet', // 'Database Add', 'Database Minus', 'Database Move Stack',
'iMac', 'iPad', 'Laptop', 'MacBook', 'Mainframe', 'Monitor', // 'Database Remove', 'Fujitsu Tablet', 'Harddrive', 'IBMTablet',
'Monitor Tower', 'Monitor Tower Behind', 'Netbook', 'Network', // 'iMac', 'iPad', 'Laptop', 'MacBook', 'Mainframe', 'Monitor',
'Network 2', 'Printer', 'Printer Commercial', 'Secure System', // 'Monitor Tower', 'Monitor Tower Behind', 'Netbook', 'Network',
'Server', 'Server Rack', 'Server Rack Empty', 'Server Rack Partial', // 'Network 2', 'Printer', 'Printer Commercial', 'Secure System',
'Server Tower', 'Software', 'Stylus', 'Touch', 'USB Hub', // 'Server', 'Server Rack', 'Server Rack Empty', 'Server Rack Partial',
'Virtual Application', 'Virtual Machine', 'Virus', 'Workstation']); // 'Server Tower', 'Software', 'Stylus', 'Touch', 'USB Hub',
// 'Virtual Application', 'Virtual Machine', 'Virus', 'Workstation']);
this.setCurrentSearchEntryLibrary('clipart', 'finance');
this.addImagePalette('finance', 'Clipart / Finance', imgDir // this.setCurrentSearchEntryLibrary('clipart', 'finance');
+ '/lib/clip_art/finance/', '_128x128.png', [ 'Arrow_Down', // this.addImagePalette('finance', 'Clipart / Finance', imgDir
'Arrow_Up', 'Coins', 'Credit_Card', 'Dollar', 'Graph', // + '/lib/clip_art/finance/', '_128x128.png', [ 'Arrow_Down',
'Pie_Chart', 'Piggy_Bank', 'Safe', 'Shopping_Cart', // 'Arrow_Up', 'Coins', 'Credit_Card', 'Dollar', 'Graph',
'Stock_Down', 'Stock_Up'], ['Arrow_Down', 'Arrow Up', // 'Pie_Chart', 'Piggy_Bank', 'Safe', 'Shopping_Cart',
'Coins', 'Credit Card', 'Dollar', 'Graph', 'Pie Chart', // 'Stock_Down', 'Stock_Up'], ['Arrow_Down', 'Arrow Up',
'Piggy Bank', 'Safe', 'Shopping Basket', 'Stock Down', 'Stock Up']); // 'Coins', 'Credit Card', 'Dollar', 'Graph', 'Pie Chart',
// 'Piggy Bank', 'Safe', 'Shopping Basket', 'Stock Down', 'Stock Up']);
this.setCurrentSearchEntryLibrary('clipart', 'clipart');
this.addImagePalette('clipart', 'Clipart / Various', imgDir // this.setCurrentSearchEntryLibrary('clipart', 'clipart');
+ '/lib/clip_art/general/', '_128x128.png', [ 'Battery_0', // this.addImagePalette('clipart', 'Clipart / Various', imgDir
'Battery_100', 'Battery_50', 'Battery_75', 'Battery_allstates', // + '/lib/clip_art/general/', '_128x128.png', [ 'Battery_0',
'Bluetooth', 'Earth_globe', 'Empty_Folder', 'Full_Folder', // 'Battery_100', 'Battery_50', 'Battery_75', 'Battery_allstates',
'Gear', 'Keys', 'Lock', 'Mouse_Pointer', 'Plug', 'Ships_Wheel', // 'Bluetooth', 'Earth_globe', 'Empty_Folder', 'Full_Folder',
'Star', 'Tire' ], [ 'Battery 0%', 'Battery 100%', 'Battery 50%', // 'Gear', 'Keys', 'Lock', 'Mouse_Pointer', 'Plug', 'Ships_Wheel',
'Battery 75%', 'Battery', 'Bluetooth', 'Globe', // 'Star', 'Tire' ], [ 'Battery 0%', 'Battery 100%', 'Battery 50%',
'Empty Folder', 'Full Folder', 'Gear', 'Keys', 'Lock', 'Mousepointer', // 'Battery 75%', 'Battery', 'Bluetooth', 'Globe',
'Plug', 'Ships Wheel', 'Star', 'Tire']); // 'Empty Folder', 'Full Folder', 'Gear', 'Keys', 'Lock', 'Mousepointer',
// 'Plug', 'Ships Wheel', 'Star', 'Tire']);
this.setCurrentSearchEntryLibrary('clipart', 'networking');
this.addImagePalette('networking', 'Clipart / Networking', imgDir // this.setCurrentSearchEntryLibrary('clipart', 'networking');
+ '/lib/clip_art/networking/', '_128x128.png', ['Bridge', // this.addImagePalette('networking', 'Clipart / Networking', imgDir
'Certificate', 'Certificate_Off', 'Cloud', 'Cloud_Computer', // + '/lib/clip_art/networking/', '_128x128.png', ['Bridge',
'Cloud_Computer_Private', 'Cloud_Rack', 'Cloud_Rack_Private', // 'Certificate', 'Certificate_Off', 'Cloud', 'Cloud_Computer',
'Cloud_Server', 'Cloud_Server_Private', 'Cloud_Storage', // 'Cloud_Computer_Private', 'Cloud_Rack', 'Cloud_Rack_Private',
'Concentrator', 'Email', 'Firewall_02', 'Firewall', // 'Cloud_Server', 'Cloud_Server_Private', 'Cloud_Storage',
'Firewall-page1', 'Ip_Camera', 'Modem', // 'Concentrator', 'Email', 'Firewall_02', 'Firewall',
'power_distribution_unit', 'Print_Server', // 'Firewall-page1', 'Ip_Camera', 'Modem',
'Print_Server_Wireless', 'Repeater', 'Router', 'Router_Icon', // 'power_distribution_unit', 'Print_Server',
'Switch', 'UPS', 'Wireless_Router', 'Wireless_Router_N'], // 'Print_Server_Wireless', 'Repeater', 'Router', 'Router_Icon',
['Bridge', 'Certificate', 'Certificate Off', 'Cloud', 'Cloud Computer', // 'Switch', 'UPS', 'Wireless_Router', 'Wireless_Router_N'],
'Cloud Computer Private', 'Cloud Rack', 'Cloud Rack Private', // ['Bridge', 'Certificate', 'Certificate Off', 'Cloud', 'Cloud Computer',
'Cloud Server', 'Cloud Server Private', 'Cloud Storage', // 'Cloud Computer Private', 'Cloud Rack', 'Cloud Rack Private',
'Concentrator', 'Email', 'Firewall 1', 'Firewall 2', // 'Cloud Server', 'Cloud Server Private', 'Cloud Storage',
'Firewall', 'Camera', 'Modem', // 'Concentrator', 'Email', 'Firewall 1', 'Firewall 2',
'Power Distribution Unit', 'Print Server', // 'Firewall', 'Camera', 'Modem',
'Print Server Wireless', 'Repeater', 'Router', 'Router Icon', // 'Power Distribution Unit', 'Print Server',
'Switch', 'UPS', 'Wireless Router', 'Wireless Router N'], // 'Print Server Wireless', 'Repeater', 'Router', 'Router Icon',
{'Wireless_Router': 'wireless router switch wap wifi access point wlan', // 'Switch', 'UPS', 'Wireless Router', 'Wireless Router N'],
'Wireless_Router_N': 'wireless router switch wap wifi access point wlan', // {'Wireless_Router': 'wireless router switch wap wifi access point wlan',
'Router': 'router switch', // 'Wireless_Router_N': 'wireless router switch wap wifi access point wlan',
'Router_Icon': 'router switch'}); // 'Router': 'router switch',
// 'Router_Icon': 'router switch'});
this.setCurrentSearchEntryLibrary('clipart', 'people');
this.addImagePalette('people', 'Clipart / People', imgDir // this.setCurrentSearchEntryLibrary('clipart', 'people');
+ '/lib/clip_art/people/', '_128x128.png', ['Suit_Man', // this.addImagePalette('people', 'Clipart / People', imgDir
'Suit_Man_Black', 'Suit_Man_Blue', 'Suit_Man_Green', // + '/lib/clip_art/people/', '_128x128.png', ['Suit_Man',
'Suit_Man_Green_Black', 'Suit_Woman', 'Suit_Woman_Black', // 'Suit_Man_Black', 'Suit_Man_Blue', 'Suit_Man_Green',
'Suit_Woman_Blue', 'Suit_Woman_Green', // 'Suit_Man_Green_Black', 'Suit_Woman', 'Suit_Woman_Black',
'Suit_Woman_Green_Black', 'Construction_Worker_Man', // 'Suit_Woman_Blue', 'Suit_Woman_Green',
'Construction_Worker_Man_Black', 'Construction_Worker_Woman', // 'Suit_Woman_Green_Black', 'Construction_Worker_Man',
'Construction_Worker_Woman_Black', 'Doctor_Man', // 'Construction_Worker_Man_Black', 'Construction_Worker_Woman',
'Doctor_Man_Black', 'Doctor_Woman', 'Doctor_Woman_Black', // 'Construction_Worker_Woman_Black', 'Doctor_Man',
'Farmer_Man', 'Farmer_Man_Black', 'Farmer_Woman', // 'Doctor_Man_Black', 'Doctor_Woman', 'Doctor_Woman_Black',
'Farmer_Woman_Black', 'Nurse_Man', 'Nurse_Man_Black', // 'Farmer_Man', 'Farmer_Man_Black', 'Farmer_Woman',
'Nurse_Woman', // 'Farmer_Woman_Black', 'Nurse_Man', 'Nurse_Man_Black',
'Nurse_Woman_Black', // 'Nurse_Woman',
'Military_Officer', 'Military_Officer_Black', // 'Nurse_Woman_Black',
'Military_Officer_Woman', 'Military_Officer_Woman_Black', // 'Military_Officer', 'Military_Officer_Black',
'Pilot_Man', 'Pilot_Man_Black', 'Pilot_Woman', // 'Military_Officer_Woman', 'Military_Officer_Woman_Black',
'Pilot_Woman_Black', 'Scientist_Man', 'Scientist_Man_Black', // 'Pilot_Man', 'Pilot_Man_Black', 'Pilot_Woman',
'Scientist_Woman', 'Scientist_Woman_Black', 'Security_Man', // 'Pilot_Woman_Black', 'Scientist_Man', 'Scientist_Man_Black',
'Security_Man_Black', 'Security_Woman', 'Security_Woman_Black', // 'Scientist_Woman', 'Scientist_Woman_Black', 'Security_Man',
'Tech_Man', 'Tech_Man_Black', // 'Security_Man_Black', 'Security_Woman', 'Security_Woman_Black',
'Telesales_Man', 'Telesales_Man_Black', 'Telesales_Woman', // 'Tech_Man', 'Tech_Man_Black',
'Telesales_Woman_Black', 'Waiter', 'Waiter_Black', // 'Telesales_Man', 'Telesales_Man_Black', 'Telesales_Woman',
'Waiter_Woman', 'Waiter_Woman_Black', 'Worker_Black', // 'Telesales_Woman_Black', 'Waiter', 'Waiter_Black',
'Worker_Man', 'Worker_Woman', 'Worker_Woman_Black']); // 'Waiter_Woman', 'Waiter_Woman_Black', 'Worker_Black',
// 'Worker_Man', 'Worker_Woman', 'Worker_Woman_Black']);
this.setCurrentSearchEntryLibrary('clipart', 'telco');
// this.setCurrentSearchEntryLibrary('clipart', 'telco');
this.addImagePalette('telco', 'Clipart / Telecommunication', imgDir this.addImagePalette('telco', 'Clipart / Telecommunication', imgDir
+ '/lib/clip_art/telecommunication/', '_128x128.png', [ + '/lib/clip_art/telecommunication/', '_128x128.png', [
'BlackBerry', 'Cellphone', 'HTC_smartphone', 'iPhone', 'BlackBerry', 'Cellphone', 'HTC_smartphone', 'iPhone',
...@@ -1152,62 +1155,62 @@ ...@@ -1152,62 +1155,62 @@
'Palm Treo', 'Signaltower off', 'Signaltower on']); 'Palm Treo', 'Signaltower off', 'Signaltower on']);
this.setCurrentSearchEntryLibrary(); this.setCurrentSearchEntryLibrary();
this.addFlowchartPalette();//流程图图形 // this.addFlowchartPalette();//流程图图形
this.addActiveDirectoryPalette(); // this.addActiveDirectoryPalette();
this.addAndroidPalette(); // this.addAndroidPalette();
this.addAtlassianPalette(); // this.addAtlassianPalette();
this.addBootstrapPalette(); // this.addBootstrapPalette();
this.addDFDPalette(); // this.addDFDPalette();
this.addErPalette();//实体关系图形 // this.addErPalette();//实体关系图形
this.addIos7Palette(); // this.addIos7Palette();
this.addIosPalette(); // this.addIosPalette();
this.addKubernetesPalette(); // this.addKubernetesPalette();
this.addMockupPalette(); // this.addMockupPalette();
this.addSitemapPalette(); // this.addSitemapPalette();
this.addSalesforcePalette(); // this.addSalesforcePalette();
this.addUml25Palette(); // this.addUml25Palette();
this.addUmlPalette(false);//UML图形 // this.addUmlPalette(false);//UML图形
this.addAlliedTelesisPalette(); // this.addAlliedTelesisPalette();
this.addAWS3Palette(); // this.addAWS3Palette();
this.addAWS4bPalette(); // this.addAWS4bPalette();
this.addAWS4Palette(); // this.addAWS4Palette();
this.addAWS3DPalette(); // this.addAWS3DPalette();
this.addAzurePalette(); // this.addAzurePalette();
this.addAzure2Palette(); // this.addAzure2Palette();
this.addMSCAEPalette(); // this.addMSCAEPalette();
this.addC4Palette(); // this.addC4Palette();
this.addCiscoPalette(cisco, dir); // this.addCiscoPalette(cisco, dir);
this.addCisco19Palette(); // this.addCisco19Palette();
this.addCiscoSafePalette(); // this.addCiscoSafePalette();
this.addCumulusPalette(); // this.addCumulusPalette();
this.addCitrixPalette(); // this.addCitrixPalette();
this.addGCP2Palette(); // this.addGCP2Palette();
this.addGCPIconsPalette(); // this.addGCPIconsPalette();
this.addIBMPalette(); // this.addIBMPalette();
this.addNetworkPalette(); // this.addNetworkPalette();
this.addOfficePalette(); // this.addOfficePalette();
this.addRackPalette(rack, dir); // this.addRackPalette(rack, dir);
this.addVeeamPalette(); // this.addVeeamPalette();
this.addVeeam2Palette(); // this.addVeeam2Palette();
this.addVVDPalette(); // this.addVVDPalette();
this.addArchimate3Palette(); // this.addArchimate3Palette();
// this.addArchimate4Palette(); // // this.addArchimate4Palette();
this.addArchiMatePalette(); // this.addArchiMatePalette();
this.addBpmn2Palette(); // this.addBpmn2Palette();
this.addSysMLPalette(sysml, dir); // this.addSysMLPalette(sysml, dir);
this.addLeanMappingPalette(); // this.addLeanMappingPalette();
this.addCabinetsPalette(); // this.addCabinetsPalette();
this.addInfographicPalette(); // this.addInfographicPalette();
this.addEipPalette(); // this.addEipPalette();
this.addElectricalPalette(); // this.addElectricalPalette();
this.addFloorplanPalette(); // this.addFloorplanPalette();
this.addFluidPowerPalette(); // this.addFluidPowerPalette();
this.addGMDLPalette(); // this.addGMDLPalette();
this.addPidPalette(pids, dir); // this.addPidPalette(pids, dir);
this.addThreatModelingPalette(); // this.addThreatModelingPalette();
this.addWebIconsPalette(); // this.addWebIconsPalette();
this.addWebLogosPalette(); // this.addWebLogosPalette();
this.addSignsPalette(signs, dir); // this.addSignsPalette(signs, dir);
this.addCustomGraph(); //二次开发,增加动态读取架构设计要素 this.addCustomGraph(); //二次开发,增加动态读取架构设计要素
// LATER: Check if conflicts with restore libs after loading file // LATER: Check if conflicts with restore libs after loading file
this.showEntries(); this.showEntries();
......
...@@ -31,9 +31,9 @@ function Sidebar(editorUi, container) ...@@ -31,9 +31,9 @@ function Sidebar(editorUi, container)
this.wrapper.style.boxSizing = 'border-box'; this.wrapper.style.boxSizing = 'border-box';
this.wrapper.style.maxHeight = 'calc(100% - ' + this.moreShapesHeight + 'px)'; this.wrapper.style.maxHeight = 'calc(100% - ' + this.moreShapesHeight + 'px)';
this.container.appendChild(this.wrapper); this.container.appendChild(this.wrapper);
/* 二次开发-去除更多图形按钮 */
var title = this.createMoreShapes(); // var title = this.createMoreShapes();
this.container.appendChild(title); // this.container.appendChild(title);
document.body.appendChild(this.graph.container); document.body.appendChild(this.graph.container);
...@@ -3777,6 +3777,14 @@ Sidebar.prototype.addClickHandler = function(elt, ds, cells, clickFn) ...@@ -3777,6 +3777,14 @@ Sidebar.prototype.addClickHandler = function(elt, ds, cells, clickFn)
// console.log(assetName); // console.log(assetName);
cells[0].value = assetName; cells[0].value = assetName;
} }
// 二次开发-元模型管理详情
console.log(evt, cells[0])
if(evt.target.text) {
cells[0].value = evt.target.text;
cells[0].style = cells[0].style.replace('fontColor=#ffffff;', 'fontColor=#000000')
// cells[0].geometry.x = 0
// cells[0].geometry.y = 0
}
oldMouseDown.apply(this, arguments); oldMouseDown.apply(this, arguments);
first = new mxPoint(mxEvent.getClientX(evt), mxEvent.getClientY(evt)); first = new mxPoint(mxEvent.getClientX(evt), mxEvent.getClientY(evt));
op = elt.style.opacity; op = elt.style.opacity;
......
...@@ -32,6 +32,10 @@ export function query_jia_gou_ceng_ci(params) { ...@@ -32,6 +32,10 @@ export function query_jia_gou_ceng_ci(params) {
//查询架构层次 //查询架构层次
return post(EADC_ARRCHITECTURE + '/ele/archi-lv-list', params) return post(EADC_ARRCHITECTURE + '/ele/archi-lv-list', params)
} }
export function query_jia_gou_ceng_ci_new(params) {
//查询架构层次 new
return post(EADC_ARRCHITECTURE + '/archi-model-dict-detail/gDictByKey', params)
}
export function add_jia_gou_gui_shu(params) { export function add_jia_gou_gui_shu(params) {
// 新增架构归属 // 新增架构归属
return post(EADC_ARRCHITECTURE + '/ele/ad-archi-blg', params) return post(EADC_ARRCHITECTURE + '/ele/ad-archi-blg', params)
...@@ -796,6 +800,13 @@ export function updKlPerson(params) { ...@@ -796,6 +800,13 @@ export function updKlPerson(params) {
export function delKlPerson(params) { export function delKlPerson(params) {
return post(EADC_KNOWLEDGE_POOL + '/kl-talent-pool/del', params) return post(EADC_KNOWLEDGE_POOL + '/kl-talent-pool/del', params)
} }
export function getJsonToXml(params) {
return post(EADC_ARRCHITECTURE + '/ele-rel/qEle', params)
}
export function getQryByTree(params) {
return post(EADC_ARRCHITECTURE + '/arc-ast-info/qryByTree', params)
}
export function postRequest(url, params) { export function postRequest(url, params) {
return post(EADC_ARRCHITECTURE + url, params) return post(EADC_ARRCHITECTURE + url, params)
} }
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
v-for="tag in visitedViews" v-for="tag in visitedViews"
ref="tag" ref="tag"
:key="tag.path" :key="tag.path"
:class="isActive(tag) ? 'active' : ''" :class="[isActive(tag) ? 'active' : '', {'length1': visitedViews.length == 1}]"
:to="{ path: tag.path, query: tag.query, fullPath: tag.fullPath }" :to="{ path: tag.path, query: tag.query, fullPath: tag.fullPath }"
tag="span" tag="span"
class="tags-view-item" class="tags-view-item"
...@@ -20,12 +20,12 @@ ...@@ -20,12 +20,12 @@
/> />
</router-link> </router-link>
</scroll-pane> </scroll-pane>
<!-- <ul v-show="visible" :style="{left:left+'px',top:top+'px'}" class="contextmenu"> <ul v-show="visible" :style="{left:left+'px',top:top+'px'}" class="contextmenu">
<li @click="refreshSelectedTag(selectedTag)">Refresh</li> <li @click="refreshSelectedTag(selectedTag)">刷新</li>
<li v-if="!isAffix(selectedTag)" @click="closeSelectedTag(selectedTag)">Close</li> <li v-if="!isAffix(selectedTag)" @click="closeSelectedTag(selectedTag)">关闭</li>
<li @click="closeOthersTags(selectedTag)">Close Others</li> <li @click="closeOthersTags(selectedTag)">关闭其他</li>
<li @click="closeAllTags(selectedTag)">Close All</li> <!-- <li @click="closeAllTags(selectedTag)">关闭所有</li> -->
</ul> --> </ul>
</div> </div>
</template> </template>
...@@ -233,6 +233,9 @@ export default { ...@@ -233,6 +233,9 @@ export default {
/deep/ .scroll-container .el-scrollbar__wrap { /deep/ .scroll-container .el-scrollbar__wrap {
scrollbar-width: none; scrollbar-width: none;
} }
.length1 {
padding-right: 20px!important;
}
.tags-view-container { .tags-view-container {
height: 34px; height: 34px;
width: 100%; width: 100%;
......
...@@ -39,7 +39,7 @@ ...@@ -39,7 +39,7 @@
class="filter-tree" class="filter-tree"
:data="treeData" :data="treeData"
:highlight-current="true" :highlight-current="true"
:props="{ children: 'subList', label: 'viewName', id: 'viewId' }" :props="{ children: 'children', label: 'viewName', id: 'viewId' }"
node-key="viewId" node-key="viewId"
:default-expanded-keys="treeDefaultExpand" :default-expanded-keys="treeDefaultExpand"
:current-node-key="currentNodekey" :current-node-key="currentNodekey"
...@@ -693,7 +693,7 @@ ...@@ -693,7 +693,7 @@
style="overflow-x: auto; display: flex" style="overflow-x: auto; display: flex"
> >
<el-checkbox <el-checkbox
v-for="city in item.subList" v-for="city in item.children"
:label="city.assetId" :label="city.assetId"
:key="city.assetId" :key="city.assetId"
>{{ city.assetName }}</el-checkbox >{{ city.assetName }}</el-checkbox
...@@ -745,7 +745,7 @@ export default { ...@@ -745,7 +745,7 @@ export default {
{ {
viewId: 0, viewId: 0,
viewName: '系统架构资产', viewName: '系统架构资产',
subList: [], children: [],
}, },
], ],
searchParams: { searchParams: {
...@@ -842,7 +842,28 @@ export default { ...@@ -842,7 +842,28 @@ export default {
this.jianSheLeiXingSelect = res this.jianSheLeiXingSelect = res
}) })
}, },
created() {
// 默认选中第一个系统
this.getDefaultSys()
},
methods: { methods: {
getDefaultSys() {
const params = {
manageOrgId: this.searchParams2.let1,
manageDeptId: this.searchParams2.let2,
appName: this.searchParams2.let3,
buildType: this.searchParams2.let4,
current: this.pager2.current,
pageSize: this.pager2.size,
}
querysystemInfoManageTable(params).then((res) => {
if (res.code == 200) {
this.selectRow2 = [res.data.records[0]]
this.showSelectTitle.title = this.selectRow2[0].appName
this.showSelectTitle.status = this.selectRow2[0].buildType == 1 ? '统推' : '自建'
}
})
},
indexMethod(index) { indexMethod(index) {
return (this.pager.current - 1) * this.pager.size + index + 1 return (this.pager.current - 1) * this.pager.size + index + 1
}, },
...@@ -884,9 +905,9 @@ export default { ...@@ -884,9 +905,9 @@ export default {
this.$refs.tree.setCurrentKey(this.currentNodekey) this.$refs.tree.setCurrentKey(this.currentNodekey)
}) })
res.data.map((item) => { res.data.map((item) => {
item.subList = [] item.children = []
}) })
this.treeData[0].subList = res.data this.treeData[0].children = res.data
this.archiBelongId = res.data[0].viewId this.archiBelongId = res.data[0].viewId
this.archiType = res.data[0].archiType this.archiType = res.data[0].archiType
this.get_table() this.get_table()
...@@ -912,6 +933,7 @@ export default { ...@@ -912,6 +933,7 @@ export default {
pageSize: this.pager.size, pageSize: this.pager.size,
prjId: this.showSelectTitle.prjId, prjId: this.showSelectTitle.prjId,
appId: this.showSelectTitle.appId, appId: this.showSelectTitle.appId,
archiBelongId: this.archiBelongId
} }
this.loading = true this.loading = true
getTotalZiChanJiaGouTable(params).then((res) => { getTotalZiChanJiaGouTable(params).then((res) => {
...@@ -1100,7 +1122,7 @@ export default { ...@@ -1100,7 +1122,7 @@ export default {
handleCheckAllChange(val, item) { handleCheckAllChange(val, item) {
let cityOptions = [] let cityOptions = []
if (val) { if (val) {
item.subList.forEach((item2) => { item.children.forEach((item2) => {
cityOptions.push(item2.assetId) cityOptions.push(item2.assetId)
}) })
} else { } else {
...@@ -1111,9 +1133,9 @@ export default { ...@@ -1111,9 +1133,9 @@ export default {
}, },
handleCheckedCitiesChange(value, item) { handleCheckedCitiesChange(value, item) {
let checkedCount = value.length let checkedCount = value.length
item.checkAll = checkedCount === item.subList.length item.checkAll = checkedCount === item.children.length
item.isIndeterminate = item.isIndeterminate =
checkedCount > 0 && checkedCount < item.subList.length checkedCount > 0 && checkedCount < item.children.length
}, },
getElementTreeData(type) { getElementTreeData(type) {
//查询选择遵从总体架构资产类型数据 //查询选择遵从总体架构资产类型数据
......
...@@ -115,11 +115,11 @@ ...@@ -115,11 +115,11 @@
label="架构归属" label="架构归属"
align="center" align="center"
></el-table-column> ></el-table-column>
<el-table-column <!-- <el-table-column-->
prop="eaLevel" <!-- prop="eaLevel"-->
label="元素层级" <!-- label="元素层级"-->
align="center" <!-- align="center"-->
></el-table-column> <!-- ></el-table-column>-->
<el-table-column <el-table-column
prop="content" prop="content"
label="描述" label="描述"
...@@ -266,9 +266,9 @@ ...@@ -266,9 +266,9 @@
</el-input> --> </el-input> -->
<el-option <el-option
v-for="item in dialog_select1" v-for="item in dialog_select1"
:key="item.levelId" :key="item.value"
:label="item.name" :label="item.label"
:value="item.levelId" :value="item.value"
></el-option> ></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
...@@ -743,6 +743,7 @@ import { ...@@ -743,6 +743,7 @@ import {
query_jia_gou_yuan_su_guan_xi_table, query_jia_gou_yuan_su_guan_xi_table,
add_jia_gou_ceng_ci, add_jia_gou_ceng_ci,
query_jia_gou_ceng_ci, query_jia_gou_ceng_ci,
query_jia_gou_ceng_ci_new,
add_jia_gou_gui_shu, add_jia_gou_gui_shu,
query_jia_gou_gui_shu, query_jia_gou_gui_shu,
delete_jia_gou_gui_shu, delete_jia_gou_gui_shu,
...@@ -974,7 +975,7 @@ export default { ...@@ -974,7 +975,7 @@ export default {
this.rowData = row this.rowData = row
//编辑 //编辑
this.ruleForm.let1 = row.elementName this.ruleForm.let1 = row.elementName
this.ruleForm.let2 = row.archiLevelId this.ruleForm.let2 = row.archiLevelId + ''
this.ruleForm.let3 = row.archiBelongId this.ruleForm.let3 = row.archiBelongId
this.ruleForm.let4 = row.content this.ruleForm.let4 = row.content
this.ruleForm.let5 = row.eaLevel this.ruleForm.let5 = row.eaLevel
...@@ -1449,7 +1450,8 @@ export default { ...@@ -1449,7 +1450,8 @@ export default {
get_dialog_select1() { get_dialog_select1() {
//查询架构层次下拉框值 //查询架构层次下拉框值
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
query_jia_gou_ceng_ci({}).then((res) => { // query_jia_gou_ceng_ci({}).then((res) => {
query_jia_gou_ceng_ci_new({"typeValue": "archi_level"}).then(res => {
if (res.code == 200) { if (res.code == 200) {
resolve(res.data) resolve(res.data)
} else { } else {
...@@ -1586,12 +1588,14 @@ export default { ...@@ -1586,12 +1588,14 @@ export default {
this.search_select1 = res2[1] this.search_select1 = res2[1]
result.data.records.map((item) => { result.data.records.map((item) => {
let result1 = res2[0].find( let result1 = res2[0].find(
(item2) => item2.levelId == item.archiLevelId, // (item2) => item2.levelId == item.archiLevelId,
(item2) => item2.value == item.archiLevelId,
) )
let result2 = res2[1].find( let result2 = res2[1].find(
(item2) => item2.belongId == item.archiBelongId, (item2) => item2.belongId == item.archiBelongId,
) )
item['archiLevelName'] = result1 ? result1.name : '' // item['archiLevelName'] = result1 ? result1.name : ''
item['archiLevelName'] = result1 ? result1.label : ''
item['archiBelongName'] = result2 ? result2.name : '' item['archiBelongName'] = result2 ? result2.name : ''
}) })
this.tableData = result.data.records this.tableData = result.data.records
......
<template>
<el-dialog
title="选择图形"
:visible.sync="showDialog"
:close-on-click-modal="false"
width="60%"
@open="handleOpen()"
:before-close="closeGraphDialog"
>
<div>
<el-tabs type="border-card" v-model="tabType">
<el-tab-pane label="常规图元" name="常规图元" style="height: 400px">
<div style="height: 400px; display: flex; align-items: center">
<div
style="
width: 20%;
height: 100%;
border-left: 1px solid #ccc;
border-top: 1px solid #ccc;
border-bottom: 1px solid #ccc;
overflow: auto;
text-align: center;
"
>
<div
:style="{
cursor: 'pointer',
padding: '4px',
'background-color':
nameIndex == index ? 'rgb(13,134,127)' : '#fff',
color: nameIndex == index ? '#fff' : '#000',
}"
v-for="(item, index) in search_select1"
:key="item.belongId"
@click="showCurrentGraph(item.name, index)"
>
{{ item.name }}
</div>
</div>
<div
style="
width: 80%;
height: 100%;
border: 1px solid #ccc;
overflow: auto;
text-align: left;
"
>
<div
:style="{
display: 'inline-block',
margin: '10px',
border: graphIndex == index ? '2px solid #0D867F' : 'none',
padding: '8px',
'border-radius': '6px',
}"
v-for="(item, index) in graphList"
:key="item.graphId"
>
<img
@click="clickGraph(index)"
class="tu_biao_icon"
:src="'data:image/svg+xml;base64,' + item.icon"
alt=""
/>
</div>
</div>
</div>
</el-tab-pane>
</el-tabs>
</div>
<span slot="footer" class="dialog-footer">
<el-button type="primary" @click="save_graph">确定</el-button>
<el-button @click="closeGraphDialog">取消</el-button>
</span></el-dialog
>
</template>
<script>
import {
query_jia_gou_gui_shu_belong_icon,
query_jia_gou_gui_shu,
} from '@/api/index'
export default {
props: {
visible: {
type: Boolean,
default: false,
},
},
data() {
return {
tabType: '常规图元',
graphIndex: -1,
nameIndex: 0,
search_select1: [],
graphList: [],
}
},
components: {},
computed: {
showDialog: {
get() {
return this.visible
},
set(value) {
this.$emit('update:visible', value)
},
},
},
mounted() {},
methods: {
save_graph() {
//图形选择窗口的保存
if (this.graphIndex == -1 && this.graphIndex2 == -1) {
return this.$message.warning('请选择一种图形')
}
this.showDialog = false
const icon =
'data:image/svg+xml;base64,' + this.graphList[this.graphIndex].icon
const iconName = this.graphList[this.graphIndex].graphName
this.$emit('emitSvg', { icon, iconName })
},
closeGraphDialog() {
//图形选择窗口的取消
this.graphIndex = 0
this.nameIndex = 0
this.showDialog = false
},
showCurrentGraph(name, idx) {
//常规图形选择窗口的文字点击
this.nameIndex = idx
this.graphIndex = -1
const params = {
graphType: name,
}
query_jia_gou_gui_shu_belong_icon(params).then((res) => {
if (res.code == 200) {
this.graphList = res.data
}
})
},
clickGraph(idx) {
//常规图形选择窗口的图形点击
this.graphIndex = idx
},
handleOpen() {
query_jia_gou_gui_shu({}).then((res) => {
if (res.code == 200) {
this.search_select1 = res.data
this.showCurrentGraph(this.search_select1[0].name, 0)
} else {
this.$message.warning(res.msg)
}
})
},
},
}
</script>
<style scoped lang="scss">
@import '@/styles/elementui.scss';
</style>
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
<div class="search_menu"> <div class="search_menu">
<div class="search_menu_item_container"> <div class="search_menu_item_container">
<div class="search_menu_item"> <div class="search_menu_item">
<span class="search_title">架构组件名称</span> <span class="search_title">资产名称</span>
<el-input <el-input
v-no-backslash v-no-backslash
v-model="searchParams.assetName" v-model="searchParams.assetName"
...@@ -29,6 +29,16 @@ ...@@ -29,6 +29,16 @@
></el-input> ></el-input>
</div> </div>
<div class="search_menu_item"> <div class="search_menu_item">
<span class="search_title">创建人</span>
<el-input
v-no-backslash
v-model="searchParams.createMan"
maxlength="100"
placeholder="请输入内容"
class="search_item"
></el-input>
</div>
<div class="search_menu_item">
<span class="search_title">所属元素</span> <span class="search_title">所属元素</span>
<el-select <el-select
filterable filterable
...@@ -48,16 +58,22 @@ ...@@ -48,16 +58,22 @@
</el-select> </el-select>
</div> </div>
<div class="search_menu_item"> <div class="search_menu_item">
<span class="search_title">创建人</span> <span class="search_title">状态</span>
<el-input <el-select
v-no-backslash filterable
v-model="searchParams.createMan" v-model="searchParams.state"
maxlength="100" clearable
placeholder="请输入内容" placeholder="请选择"
class="search_item" class="search_item"
></el-input> >
<el-option
v-for="item in assetsStatusOptions"
:key="item.value"
:label="item.label"
:value="item.value"
></el-option>
</el-select>
</div> </div>
</div> </div>
<div class="search_menu_btn_container"> <div class="search_menu_btn_container">
<div class="query_btn" @click="search_table"> <div class="query_btn" @click="search_table">
...@@ -142,7 +158,7 @@ ...@@ -142,7 +158,7 @@
></el-table-column> ></el-table-column>
<el-table-column <el-table-column
prop="assetName" prop="assetName"
label="架构组件名称" label="资产名称"
width="300" width="300"
:show-overflow-tooltip="true" :show-overflow-tooltip="true"
align="center" align="center"
...@@ -151,30 +167,41 @@ ...@@ -151,30 +167,41 @@
prop="eleName" prop="eleName"
label="所属元素" label="所属元素"
align="center" align="center"
show-overflow-tooltip
></el-table-column> ></el-table-column>
<el-table-column <!-- <el-table-column prop="parentAssetName" label="上级资产名称" width="300" :show-overflow-tooltip="true" align="center"></el-table-column> -->
prop="createMan"
label="创建人"
align="center"
></el-table-column>
<!-- <el-table-column prop="parentAssetName" label="上级架构组件名称" width="300" :show-overflow-tooltip="true" align="center"></el-table-column> -->
<el-table-column <el-table-column
prop="version" prop="version"
label="版本号" label="版本号"
align="center" align="center"
show-overflow-tooltip
></el-table-column> ></el-table-column>
<el-table-column label="状态" align="center"> <el-table-column
<template slot-scope="scope"> label="状态"
<span v-if="scope.row.state == 0">已停用</span> align="center"
<span v-if="scope.row.state == 1">已发布</span> prop="state"
<span v-if="scope.row.state == 2">暂存</span> :formatter="
</template> (row, column, cellValue, index) =>
formatterDept(
row,
column,
cellValue,
index,
'assetsStatusOptions',
)
"
>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="createTime" prop="createTime"
label="创建时间" label="创建时间"
align="center" align="center"
></el-table-column> ></el-table-column>
<el-table-column
prop="createMan"
label="创建人"
align="center"
></el-table-column>
<el-table-column label="操作" width="440" align="center"> <el-table-column label="操作" width="440" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<div <div
...@@ -243,6 +270,7 @@ ...@@ -243,6 +270,7 @@
:visible.sync="addDialog" :visible.sync="addDialog"
:center="false" :center="false"
:close-on-click-modal="false" :close-on-click-modal="false"
@close="handleDialogClose"
width="70%" width="70%"
> >
<el-form <el-form
...@@ -320,7 +348,6 @@ ...@@ -320,7 +348,6 @@
node-key="assetId" node-key="assetId"
show-checkbox show-checkbox
:check-strictly="true" :check-strictly="true"
lazy
@check="handleCheckChange" @check="handleCheckChange"
:data="treeSelectData" :data="treeSelectData"
:props="{ :props="{
...@@ -328,12 +355,32 @@ ...@@ -328,12 +355,32 @@
label: 'assetName', label: 'assetName',
id: 'assetId', id: 'assetId',
}" }"
:load="loadTreeSelect"
> >
</el-tree> </el-tree>
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<div class="dialog_form_item3 m-b-20 flex-c">
<div class="dialog_form_item_title">图标设置:</div>
<div class="flex">
<img
:style="{
width: selectGraphSrc.length > 0 ? '80px' : 0,
height: selectGraphSrc.length > 0 ? '40px' : 0,
}"
:src="selectGraphSrc"
alt=""
/>
<div
style="display: flex"
v-if="is_add_edit == 'view' ? false : true"
>
<el-button type="primary" @click="openGraphDialog"
>图形选择</el-button
>
</div>
</div>
</div>
<el-form-item <el-form-item
class="dynamicFormClass" class="dynamicFormClass"
v-for="(item, index) in ruleForm.dynamicForm0_" v-for="(item, index) in ruleForm.dynamicForm0_"
...@@ -421,7 +468,6 @@ ...@@ -421,7 +468,6 @@
node-key="assetId" node-key="assetId"
show-checkbox show-checkbox
:check-strictly="true" :check-strictly="true"
lazy
@check="handleCheckChange2" @check="handleCheckChange2"
:data="treeSelectData" :data="treeSelectData"
:props="{ :props="{
...@@ -429,13 +475,12 @@ ...@@ -429,13 +475,12 @@
label: 'assetName', label: 'assetName',
id: 'assetId', id: 'assetId',
}" }"
:load="loadTreeSelect"
> >
</el-tree> </el-tree>
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="组件类型:" prop="let2"> <el-form-item label="所属元素:" prop="let2">
<el-select <el-select
v-model="ruleForm2.let2" v-model="ruleForm2.let2"
filterable filterable
...@@ -461,17 +506,21 @@ ...@@ -461,17 +506,21 @@
<el-button @click="templateDialog = false">取消</el-button> <el-button @click="templateDialog = false">取消</el-button>
</span> </span>
</el-dialog> </el-dialog>
<!-- 选择图形 -->
<ChooseSvg @emitSvg="getChooseSvg" :visible.sync="chooseSvgVisible" />
</div> </div>
</template> </template>
<script> <script>
import ChooseSvg from './ChooseSvg.vue'
import { import {
getArchiViewManage, getArchiViewManage,
getZiChanJiaGouTable, getZiChanJiaGouTable,
editZiChanJiaGouTable, editZiChanJiaGouTable,
deleteMoreZiChanJiaGouTable, deleteMoreZiChanJiaGouTable,
addMoreZiChanJiaGouTable, addMoreZiChanJiaGouTable,
queryZiChanJiaGouShangJiJieDian, getQryByTree,
queryZiChanJiaGouZuJianLeiXing, queryZiChanJiaGouZuJianLeiXing,
queryZuJianLeiXingBelongForm, queryZuJianLeiXingBelongForm,
exportZhiChanJiaGou, exportZhiChanJiaGou,
...@@ -481,10 +530,12 @@ import { ...@@ -481,10 +530,12 @@ import {
} from '@/api/index.js' } from '@/api/index.js'
import $ from 'jquery' import $ from 'jquery'
import { MessageBox, Message } from 'element-ui' import { MessageBox, Message } from 'element-ui'
import { getDictTypeOptions } from '@/utils'
export default { export default {
name: 'BusiAssetslist', name: 'BusiAssetslist',
components: {}, components: {
ChooseSvg,
},
watch: {}, watch: {},
data() { data() {
return { return {
...@@ -509,11 +560,9 @@ export default { ...@@ -509,11 +560,9 @@ export default {
dynamicForm_: [], dynamicForm_: [],
}, },
rules: { rules: {
let1: [ let1: [{ required: true, message: '请输入资产名称', trigger: 'blur' }],
{ required: true, message: '请输入架构组件名称', trigger: 'blur' },
],
let3: [ let3: [
{ required: true, message: '请选择组件类型', trigger: 'change' }, { required: true, message: '请选择所属元素', trigger: 'change' },
], ],
}, },
rules2: { rules2: {
...@@ -521,7 +570,7 @@ export default { ...@@ -521,7 +570,7 @@ export default {
{ required: true, message: '请选择上级节点', trigger: 'change' }, { required: true, message: '请选择上级节点', trigger: 'change' },
], ],
let2: [ let2: [
{ required: true, message: '请选择组件类型', trigger: 'change' }, { required: true, message: '请选择所属元素', trigger: 'change' },
], ],
}, },
searchParams: { searchParams: {
...@@ -530,6 +579,7 @@ export default { ...@@ -530,6 +579,7 @@ export default {
assetName: null, assetName: null,
createMan: null, createMan: null,
archiEleId: null, archiEleId: null,
state: undefined,
}, },
treeData: [ treeData: [
{ {
...@@ -561,8 +611,15 @@ export default { ...@@ -561,8 +611,15 @@ export default {
// archiAssetTypeId: null, // archiAssetTypeId: null,
treeSelectData: [], treeSelectData: [],
disabled1: false, disabled1: false,
selectGraphSrc: '',
selectGraphShape: '',
chooseSvgVisible: false,
assetsStatusOptions: [],
} }
}, },
created() {
this.getDicts()
},
mounted() { mounted() {
this.getTreeData() this.getTreeData()
window.addEventListener('resize', () => { window.addEventListener('resize', () => {
...@@ -571,6 +628,27 @@ export default { ...@@ -571,6 +628,27 @@ export default {
this.set_table_height() this.set_table_height()
}, },
methods: { methods: {
formatterDept(row, column, cellValue, index, options) {
const obj = this[options]?.find((v) => v.value == cellValue) || {}
return obj.label
},
getDicts() {
getDictTypeOptions('asset_status').then((res) => {
this.assetsStatusOptions = res
})
},
handleDialogClose() {
this.selectGraphSrc = ''
this.selectGraphShape = ''
this.addDialog = false
},
getChooseSvg(svgInfo) {
this.selectGraphSrc = svgInfo.icon
this.selectGraphShape = svgInfo.iconName
},
openGraphDialog() {
this.chooseSvgVisible = true
},
indexMethod(index) { indexMethod(index) {
return (this.pager.current - 1) * this.pager.size + index + 1 return (this.pager.current - 1) * this.pager.size + index + 1
}, },
...@@ -677,6 +755,8 @@ export default { ...@@ -677,6 +755,8 @@ export default {
targetAsset: targetAsset, targetAsset: targetAsset,
assetCode: this.selectCode, assetCode: this.selectCode,
eleName: eleName, eleName: eleName,
icon: this.selectGraphSrc,
iconName: this.selectGraphShape,
} }
const requestParams = const requestParams =
this.is_add_edit == 'add' this.is_add_edit == 'add'
...@@ -763,6 +843,8 @@ export default { ...@@ -763,6 +843,8 @@ export default {
// "archiAssetTypeId": this.archiAssetTypeId, // "archiAssetTypeId": this.archiAssetTypeId,
current: this.pager.current, current: this.pager.current,
pageSize: this.pager.size, pageSize: this.pager.size,
state: this.searchParams.state,
archiBelongId: this.archiBelongId,
} }
this.loading = true this.loading = true
getZiChanJiaGouTable(params).then((res) => { getZiChanJiaGouTable(params).then((res) => {
...@@ -834,6 +916,8 @@ export default { ...@@ -834,6 +916,8 @@ export default {
this.selectCode = row.assetCode this.selectCode = row.assetCode
this.selectLabel = row.parentAssetName this.selectLabel = row.parentAssetName
this.selectValue = row.parentAssetId this.selectValue = row.parentAssetId
this.selectGraphSrc = row.icon
this.selectGraphShape = row.iconName
let targetAsset_id = [] let targetAsset_id = []
if (targetAsset) { if (targetAsset) {
if (targetAsset.length == 4) { if (targetAsset.length == 4) {
...@@ -878,6 +962,8 @@ export default { ...@@ -878,6 +962,8 @@ export default {
this.selectCode = row.assetCode this.selectCode = row.assetCode
this.selectLabel = row.parentAssetName this.selectLabel = row.parentAssetName
this.selectValue = row.parentAssetId this.selectValue = row.parentAssetId
this.selectGraphSrc = row.icon
this.selectGraphShape = row.iconName
this.getZuJianLeiXingSelect(null).then((res) => { this.getZuJianLeiXingSelect(null).then((res) => {
this.zuJianLeiXingSelect = res this.zuJianLeiXingSelect = res
...@@ -949,7 +1035,7 @@ export default { ...@@ -949,7 +1035,7 @@ export default {
archiStage: this.searchParams.archiStage, archiStage: this.searchParams.archiStage,
// archiAssetTypeId: this.archiAssetTypeId, // archiAssetTypeId: this.archiAssetTypeId,
} }
queryZiChanJiaGouShangJiJieDian(params).then((res) => { getQryByTree(params).then((res) => {
if (res.code == 200) { if (res.code == 200) {
resolve(res.data) resolve(res.data)
} }
...@@ -966,7 +1052,7 @@ export default { ...@@ -966,7 +1052,7 @@ export default {
// parentAssetId: this.archiBelongId, // parentAssetId: this.archiBelongId,
// archiAssetTypeId: this.archiAssetTypeId, // archiAssetTypeId: this.archiAssetTypeId,
} }
queryZiChanJiaGouShangJiJieDian(params).then((res) => { getQryByTree(params).then((res) => {
if (res.code == 200) { if (res.code == 200) {
// console.log('上级节点') // console.log('上级节点')
// console.log(res.data) // console.log(res.data)
...@@ -989,7 +1075,7 @@ export default { ...@@ -989,7 +1075,7 @@ export default {
}) })
}, },
zuJianLeiXingSelectChange(data) { zuJianLeiXingSelectChange(data) {
//组件类型选择后 //所属元素选择后
// console.log(data) // console.log(data)
// console.log(this.zuJianLeiXingSelect) // console.log(this.zuJianLeiXingSelect)
const currentItem = this.zuJianLeiXingSelect.find( const currentItem = this.zuJianLeiXingSelect.find(
...@@ -1027,7 +1113,7 @@ export default { ...@@ -1027,7 +1113,7 @@ export default {
} }
}, },
queryZuJianLeiXingSelect(data) { queryZuJianLeiXingSelect(data) {
//组件类型搜索 //所属元素搜索
if (data !== '') { if (data !== '') {
setTimeout(() => { setTimeout(() => {
this.getZuJianLeiXingSelect(data).then((res) => { this.getZuJianLeiXingSelect(data).then((res) => {
...@@ -1041,12 +1127,13 @@ export default { ...@@ -1041,12 +1127,13 @@ export default {
} }
}, },
getZuJianLeiXingSelect(elementName) { getZuJianLeiXingSelect(elementName) {
//组件类型下拉框值 //所属元素下拉框值
const params = { const params = {
state: '1', state: '1',
type: '1', type: '1',
elementName: elementName, elementName: elementName,
archiBelongId: this.archiBelongId, archiBelongId: this.archiBelongId,
scopeList: [1, 3],
} }
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
queryZiChanJiaGouZuJianLeiXing(params).then((res) => { queryZiChanJiaGouZuJianLeiXing(params).then((res) => {
...@@ -1327,6 +1414,12 @@ export default { ...@@ -1327,6 +1414,12 @@ export default {
} }
</style> </style>
<style lang="scss" scoped> <style lang="scss" scoped>
.dialog_form_item_title {
width: 160px;
padding-right: 12px;
box-sizing: border-box;
text-align: right;
}
.filter-tree { .filter-tree {
width: 300px; width: 300px;
height: 100%; height: 100%;
...@@ -1410,7 +1503,7 @@ export default { ...@@ -1410,7 +1503,7 @@ export default {
margin-right: 20px; margin-right: 20px;
} }
.right_container { .right_container {
width: 80%; width: calc(80% - 20px);
} }
.el-button.is-disabled { .el-button.is-disabled {
color: #c0c4cc !important; color: #c0c4cc !important;
...@@ -1421,19 +1514,22 @@ export default { ...@@ -1421,19 +1514,22 @@ export default {
margin-right: 20px; margin-right: 20px;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
flex-wrap: wrap;
} }
.search_menu_item_container { .search_menu_item_container {
display: flex; display: flex;
align-items: center; align-items: center;
width: 80%;
} }
.search_menu_btn_container { .search_menu_btn_container {
display: flex; display: flex;
align-items: center; align-items: center;
width: 20%;
} }
.search_menu_item { .search_menu_item {
display: flex; display: flex;
align-items: center; align-items: center;
width: 344px; width: 25%;
} }
.search_title { .search_title {
/* width: 20%; */ /* width: 20%; */
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
* @Autor: pan * @Autor: pan
* @Date: 2024-03-20 17:53:35 * @Date: 2024-03-20 17:53:35
* @LastEditors: pan * @LastEditors: pan
* @LastEditTime: 2024-03-21 16:03:23 * @LastEditTime: 2024-04-07 20:51:29
--> -->
<template> <template>
...@@ -31,8 +31,8 @@ ...@@ -31,8 +31,8 @@
label="资料类型" label="资料类型"
align="center" align="center"
></el-table-column> ></el-table-column>
<el-table-column label="资料名称" align="center"> <el-table-column label="资料名称" prop="fileName" align="center">
<template slot-scope="scope"> <!-- <template slot-scope="scope">
<el-upload <el-upload
class="upload-demo" class="upload-demo"
action="/eadc-shared-ability/oss/upload" action="/eadc-shared-ability/oss/upload"
...@@ -49,7 +49,7 @@ ...@@ -49,7 +49,7 @@
> >
<el-button size="small" type="primary">点击上传</el-button> <el-button size="small" type="primary">点击上传</el-button>
</el-upload> </el-upload>
</template> </template> -->
</el-table-column> </el-table-column>
</el-table> </el-table>
</div> </div>
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!