Commit c7cd055f by 史敦盼

问题修复

1 parent ccc0cd26
...@@ -73,6 +73,8 @@ const initAttributePanel = function(that) { ...@@ -73,6 +73,8 @@ const initAttributePanel = function(that) {
//二次开发-保存属性按钮-------------------------------------------------------------------------- //二次开发-保存属性按钮--------------------------------------------------------------------------
if(urlParams.page === 'archiViewManageDetails') {
const save_button = document.createElement('button'); const save_button = document.createElement('button');
save_button.innerHTML = '保存'; save_button.innerHTML = '保存';
save_button.style.cssText = 'padding: 12px 20px;line-height: 1;text-align: right;cursor: pointer;background-color: #0d867f;color: #ffffff;'; save_button.style.cssText = 'padding: 12px 20px;line-height: 1;text-align: right;cursor: pointer;background-color: #0d867f;color: #ffffff;';
...@@ -84,6 +86,7 @@ const initAttributePanel = function(that) { ...@@ -84,6 +86,7 @@ const initAttributePanel = function(that) {
let fieldsValue = []; let fieldsValue = [];
console.log('propertyList', propertyList) console.log('propertyList', propertyList)
if(!propertyList.length) return
// propertyList.forEach(item => { // propertyList.forEach(item => {
// propertyArray.push({ // propertyArray.push({
// propertyId: item.id, // propertyId: item.id,
...@@ -134,6 +137,7 @@ const initAttributePanel = function(that) { ...@@ -134,6 +137,7 @@ const initAttributePanel = function(that) {
}) })
// window.parent.postMessage({ type: 'saveProperty', data: propertyArray }, '*'); // window.parent.postMessage({ type: 'saveProperty', data: propertyArray }, '*');
}); });
}
// button_container.appendChild(save_button); // button_container.appendChild(save_button);
// that.container.appendChild(button_container); // that.container.appendChild(button_container);
...@@ -150,14 +154,14 @@ const initAttributePanel = function(that) { ...@@ -150,14 +154,14 @@ const initAttributePanel = function(that) {
let infoList = [] let infoList = []
// let haveAttrString = cell.style.match(/info__=\[[^\]]*\];/); // let haveAttrString = cell.style.match(/info__=\[[^\]]*\];/);
// let stringAttr = haveAttrString[0].split('info__=')[1]; // let stringAttr = haveAttrString[0].split('info__=')[1];
let str = cell.style let str = cell.style.endsWith(';') ? cell.style : cell.style + ';'
let startChar = "info__="; let startChar = "info__=";
let endChar = ";"; let endChar = ";";
let regex = new RegExp(`${startChar}(.*)${endChar}`); let regex = new RegExp(`${startChar}(.*)${endChar}`);
let haveAttrString = str.match(regex)[1].split(';')[0]; let haveAttrString = str.match(regex) && str.match(regex)[1].split(';')[0];
console.log('haveAttrString', haveAttrString) console.log('haveAttrString', haveAttrString)
infoList = JSON.parse(haveAttrString); infoList = JSON.parse(haveAttrString);
infoList.forEach(item => { infoList && infoList.forEach(item => {
fnAddInfoItem(infoContain, item.name, item.value) fnAddInfoItem(infoContain, item.name, item.value)
}) })
} }
...@@ -202,7 +206,7 @@ const initAttributePanel = function(that) { ...@@ -202,7 +206,7 @@ const initAttributePanel = function(that) {
} else { } else {
// 设置单元格内容 // 设置单元格内容
if(j === 0) { if(j === 0) {
cellT.textContent = propertyList[i].cnName; cellT.textContent = propertyList[i].cnName || propertyList[i].name;
} else if(j === 1) { } else if(j === 1) {
cellT.textContent = propertyList[i].dataType; cellT.textContent = propertyList[i].dataType;
} else if(j === 2) { } else if(j === 2) {
...@@ -223,13 +227,13 @@ const initAttributePanel = function(that) { ...@@ -223,13 +227,13 @@ const initAttributePanel = function(that) {
let infoList1 = [] let infoList1 = []
// let haveAttrString1 = cell.style.match(/info__=\[[^\]]*\]/); // let haveAttrString1 = cell.style.match(/info__=\[[^\]]*\]/);
// let stringAttr = haveAttrString1[0].split('info__=')[1]; // let stringAttr = haveAttrString1[0].split('info__=')[1];
let str = cell.style let str = cell.style.endsWith(';') ? cell.style : cell.style + ';'
let startChar = "info__="; let startChar = "info__=";
let endChar = ";"; let endChar = ";";
let regex = new RegExp(`${startChar}(.*)${endChar}`); let regex = new RegExp(`${startChar}(.*)${endChar}`);
let stringAttr = str.match(regex)[1].split(';')[0]; let stringAttr = str.match(regex) && str.match(regex)[1].split(';')[0];
infoList1 = JSON.parse(stringAttr); infoList1 = JSON.parse(stringAttr);
infoList1.forEach(item => { infoList1 && infoList1.forEach(item => {
fnAddInfoItemCanEdit(that.container, item.name, item.value, 100, item.element) fnAddInfoItemCanEdit(that.container, item.name, item.value, 100, item.element)
}) })
} }
...@@ -358,10 +362,10 @@ const initAttributePanel = function(that) { ...@@ -358,10 +362,10 @@ const initAttributePanel = function(that) {
const archiData = res.data; const archiData = res.data;
archiData.forEach((v, i) => { archiData.forEach((v, i) => {
var option1 = document.createElement("option"); var option1 = document.createElement("option");
option1.value = v.elementId; option1.value = v.parentElement;
option1.text = v.elementName; option1.text = v.parentElement;
if(v.elementName == c.value) { if(v.parentElement == c.value) {
c.text = v.elementName c.text = v.parentElement
c.options[i].selected = true c.options[i].selected = true
} }
c.appendChild(option1); c.appendChild(option1);
......
...@@ -101,7 +101,7 @@ ...@@ -101,7 +101,7 @@
fns.push( fns.push(
this.createVertexTemplateEntry( this.createVertexTemplateEntry(
// 'html=1;outlineConnect=0;whiteSpace=wrap;fillColor=#d2edfd;shape=mxgraph.archimate3.application;appType=rightTopCircleHasLeft;archiType=rounded', // 'html=1;outlineConnect=0;whiteSpace=wrap;fillColor=#d2edfd;shape=mxgraph.archimate3.application;appType=rightTopCircleHasLeft;archiType=rounded',
item2.iconName + ';attr=' + JSON.stringify(attr_) + ';info__=' + JSON.stringify(info__), item2.iconName + ';attr=' + JSON.stringify(attr_) + ';info__=' + JSON.stringify(info__) + ';',
item2.shapeWidth ? item2.shapeWidth : 71, item2.shapeWidth ? item2.shapeWidth : 71,
item2.shapeHeight ? item2.shapeHeight : 41, item2.shapeHeight ? item2.shapeHeight : 41,
null, null,
......
...@@ -837,6 +837,10 @@ export function getOrgOption(params) { ...@@ -837,6 +837,10 @@ export function getOrgOption(params) {
export function getDeptOption(params) { export function getDeptOption(params) {
return post(EADC_SHARED_ABILITY + `/org/getDeptOption`, params) return post(EADC_SHARED_ABILITY + `/org/getDeptOption`, params)
} }
// 总体架构资产自动图形化
export function getAutomaticGraphing(params) {
return post(EADC_ARRCHITECTURE + '/archi-asset-view/automaticGraphing', params)
}
export function postRequest(url, params) { export function postRequest(url, params) {
return post(EADC_ARRCHITECTURE + url, params) return post(EADC_ARRCHITECTURE + url, params)
} }
......
const state = {
graphData: []
}
const mutations = {
CHANGE_GRAPH_DATA: (state, data) => {
state.graphData = data
}
}
export default {
namespaced: true,
state,
mutations,
}
\ No newline at end of file
...@@ -838,8 +838,8 @@ export default { ...@@ -838,8 +838,8 @@ export default {
this.getDicyTable() this.getDicyTable()
this.formData = { this.formData = {
...item, ...item,
archiLevelId: this.formData.archiLevelId.toString(), archiLevelId: item.archiLevelId.toString(),
archiBelongId: this.formData.archiBelongId.toString(), archiBelongId: item.archiBelongId.toString(),
} }
this.transferValue1 = this.formData.archiEleId this.transferValue1 = this.formData.archiEleId
.split(',') .split(',')
...@@ -884,8 +884,8 @@ export default { ...@@ -884,8 +884,8 @@ export default {
this.getDicyTable() this.getDicyTable()
this.formData = { this.formData = {
...item, ...item,
archiLevelId: this.formData.archiLevelId.toString(), archiLevelId: item.archiLevelId.toString(),
archiBelongId: this.formData.archiBelongId.toString(), archiBelongId: item.archiBelongId.toString(),
} }
this.transferValue1 = this.formData.archiEleId this.transferValue1 = this.formData.archiEleId
.split(',') .split(',')
......
...@@ -305,7 +305,7 @@ export default { ...@@ -305,7 +305,7 @@ export default {
const version = res2.data.version; const version = res2.data.version;
localStorage.setItem('xmlData', xmlData); localStorage.setItem('xmlData', xmlData);
localStorage.setItem('xmlTitle', xmlTitle); localStorage.setItem('xmlTitle', xmlTitle);
this.$router.push( `/main/metaModelListDetails?id=${res.data}&info=${version}`, () => {}, () => {} ); this.$router.push( `/main/metaModelListDetails?id=${res.data}&info=${version}&page=metaModelListDetails&referenceId=${res.data}`, () => {}, () => {} );
} }
}); });
}else { }else {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!