Commit c7cd055f by 史敦盼

问题修复

1 parent ccc0cd26
......@@ -73,6 +73,8 @@ const initAttributePanel = function(that) {
//二次开发-保存属性按钮--------------------------------------------------------------------------
if(urlParams.page === 'archiViewManageDetails') {
const save_button = document.createElement('button');
save_button.innerHTML = '保存';
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) {
let fieldsValue = [];
console.log('propertyList', propertyList)
if(!propertyList.length) return
// propertyList.forEach(item => {
// propertyArray.push({
// propertyId: item.id,
......@@ -134,6 +137,7 @@ const initAttributePanel = function(that) {
})
// window.parent.postMessage({ type: 'saveProperty', data: propertyArray }, '*');
});
}
// button_container.appendChild(save_button);
// that.container.appendChild(button_container);
......@@ -150,14 +154,14 @@ const initAttributePanel = function(that) {
let infoList = []
// let haveAttrString = cell.style.match(/info__=\[[^\]]*\];/);
// let stringAttr = haveAttrString[0].split('info__=')[1];
let str = cell.style
let str = cell.style.endsWith(';') ? cell.style : cell.style + ';'
let startChar = "info__=";
let 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)
infoList = JSON.parse(haveAttrString);
infoList.forEach(item => {
infoList && infoList.forEach(item => {
fnAddInfoItem(infoContain, item.name, item.value)
})
}
......@@ -202,7 +206,7 @@ const initAttributePanel = function(that) {
} else {
// 设置单元格内容
if(j === 0) {
cellT.textContent = propertyList[i].cnName;
cellT.textContent = propertyList[i].cnName || propertyList[i].name;
} else if(j === 1) {
cellT.textContent = propertyList[i].dataType;
} else if(j === 2) {
......@@ -223,13 +227,13 @@ const initAttributePanel = function(that) {
let infoList1 = []
// let haveAttrString1 = cell.style.match(/info__=\[[^\]]*\]/);
// let stringAttr = haveAttrString1[0].split('info__=')[1];
let str = cell.style
let str = cell.style.endsWith(';') ? cell.style : cell.style + ';'
let startChar = "info__=";
let 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.forEach(item => {
infoList1 && infoList1.forEach(item => {
fnAddInfoItemCanEdit(that.container, item.name, item.value, 100, item.element)
})
}
......@@ -358,10 +362,10 @@ const initAttributePanel = function(that) {
const archiData = res.data;
archiData.forEach((v, i) => {
var option1 = document.createElement("option");
option1.value = v.elementId;
option1.text = v.elementName;
if(v.elementName == c.value) {
c.text = v.elementName
option1.value = v.parentElement;
option1.text = v.parentElement;
if(v.parentElement == c.value) {
c.text = v.parentElement
c.options[i].selected = true
}
c.appendChild(option1);
......
......@@ -101,7 +101,7 @@
fns.push(
this.createVertexTemplateEntry(
// '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.shapeHeight ? item2.shapeHeight : 41,
null,
......
......@@ -837,6 +837,10 @@ export function getOrgOption(params) {
export function 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) {
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 {
this.getDicyTable()
this.formData = {
...item,
archiLevelId: this.formData.archiLevelId.toString(),
archiBelongId: this.formData.archiBelongId.toString(),
archiLevelId: item.archiLevelId.toString(),
archiBelongId: item.archiBelongId.toString(),
}
this.transferValue1 = this.formData.archiEleId
.split(',')
......@@ -884,8 +884,8 @@ export default {
this.getDicyTable()
this.formData = {
...item,
archiLevelId: this.formData.archiLevelId.toString(),
archiBelongId: this.formData.archiBelongId.toString(),
archiLevelId: item.archiLevelId.toString(),
archiBelongId: item.archiBelongId.toString(),
}
this.transferValue1 = this.formData.archiEleId
.split(',')
......
......@@ -305,7 +305,7 @@ export default {
const version = res2.data.version;
localStorage.setItem('xmlData', xmlData);
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 {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!