Commit b89f523a by liuyong

修改三个架构资产

1 parent c4b33265
...@@ -247,13 +247,11 @@ ...@@ -247,13 +247,11 @@
assetName: null, assetName: null,
createMan: null, createMan: null,
archiEleId: null, archiEleId: null,
assetConstant: null,
archiAssetTypeId: null,
}, },
treeData: [ treeData: [
{ {
viewId: 0, viewId: 0,
viewName: '架构视图管理', viewName: '系统架构资产',
subList: [] subList: []
} }
], ],
...@@ -274,7 +272,11 @@ ...@@ -274,7 +272,11 @@
shangJiJieDianSelect: [], shangJiJieDianSelect: [],
treeDefaultExpand: [], treeDefaultExpand: [],
editId: null, editId: null,
guanLianZiChanSelect: [] guanLianZiChanSelect: [],
archiBelongId: null,
assetConstant: null,
// archiAssetTypeId: null,
}; };
}, },
mounted(){ mounted(){
...@@ -314,7 +316,7 @@ ...@@ -314,7 +316,7 @@
getGuanLianZiChanSelectData(assetName) {//关联资产下拉菜单 getGuanLianZiChanSelectData(assetName) {//关联资产下拉菜单
const params = { const params = {
assetName: assetName, assetName: assetName,
assetConstant: this.searchParams.assetConstant assetConstant: this.assetConstant
} }
queryGuanLianZiChanSelect(params).then(res => { queryGuanLianZiChanSelect(params).then(res => {
console.log(res) console.log(res)
...@@ -366,8 +368,8 @@ ...@@ -366,8 +368,8 @@
archiAssetState: 2, archiAssetState: 2,
archiStage: 2, archiStage: 2,
archiBelongId: this.archiBelongId, archiBelongId: this.archiBelongId,
assetConstant: this.searchParams.assetConstant, assetConstant: this.assetConstant,
archiAssetTypeId: this.searchParams.archiAssetTypeId, // archiAssetTypeId: this.archiAssetTypeId,
archiEleId: this.ruleForm.let3, archiEleId: this.ruleForm.let3,
assetName: this.ruleForm.let1, assetName: this.ruleForm.let1,
sort: this.ruleForm.let4, sort: this.ruleForm.let4,
...@@ -453,8 +455,8 @@ ...@@ -453,8 +455,8 @@
"assetName": this.searchParams.assetName, "assetName": this.searchParams.assetName,
"createMan": this.searchParams.createMan, "createMan": this.searchParams.createMan,
"archiEleId": this.searchParams.archiEleId, "archiEleId": this.searchParams.archiEleId,
"assetConstant": this.searchParams.assetConstant, "assetConstant": this.assetConstant,
"archiAssetTypeId": this.searchParams.archiAssetTypeId, // "archiAssetTypeId": this.archiAssetTypeId,
"current": this.pager.current, "current": this.pager.current,
"pageSize": this.pager.size, "pageSize": this.pager.size,
}; };
...@@ -477,6 +479,7 @@ ...@@ -477,6 +479,7 @@
add() {//新建 add() {//新建
this.addDialog = true; this.addDialog = true;
this.is_add_edit = 'add'; this.is_add_edit = 'add';
this.getShangJiJieDianSelect();
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.form.resetFields(); this.$refs.form.resetFields();
this.ruleForm.let1 = null; this.ruleForm.let1 = null;
...@@ -530,10 +533,11 @@ ...@@ -530,10 +533,11 @@
this.ruleForm.dynamicForm_ = fieldsValue_; this.ruleForm.dynamicForm_ = fieldsValue_;
} }
}, },
getShangJiJieDianSelect(assetConstant) {//上级节点下拉框值 getShangJiJieDianSelect() {//上级节点下拉框值
const params = { const params = {
archiType: assetConstant, archiType: this.assetConstant,
parentAssetId: this.archiBelongId, parentAssetId: this.archiBelongId,
// archiAssetTypeId: this.archiAssetTypeId,
}; };
queryZiChanJiaGouShangJiJieDian(params).then(res => { queryZiChanJiaGouShangJiJieDian(params).then(res => {
if(res.code == 200) { if(res.code == 200) {
...@@ -625,8 +629,8 @@ ...@@ -625,8 +629,8 @@
}); });
const params = { const params = {
assetId: assetIdArray, assetId: assetIdArray,
assetConstant: this.searchParams.assetConstant, assetConstant: this.assetConstant,
archiAssetTypeId: this.searchParams.archiAssetTypeId, // archiAssetTypeId: this.archiAssetTypeId,
}; };
MessageBox.confirm('确定删除?', '提示', { MessageBox.confirm('确定删除?', '提示', {
confirmButtonText: '确定', confirmButtonText: '确定',
...@@ -665,7 +669,7 @@ ...@@ -665,7 +669,7 @@
// console.log(event.target.files[0]); // console.log(event.target.files[0]);
var formData = new FormData(); var formData = new FormData();
formData.append("file", event.target.files[0]); formData.append("file", event.target.files[0]);
formData.append("typeCode", this.searchParams.assetConstant); formData.append("typeCode", this.assetConstant);
importZhiChanJiaGou(formData).then(res => { importZhiChanJiaGou(formData).then(res => {
if(res.code == 200) { if(res.code == 200) {
this.get_table(); this.get_table();
...@@ -726,8 +730,8 @@ ...@@ -726,8 +730,8 @@
}).then(() => { }).then(() => {
const params = { const params = {
assetId: [row.assetId], assetId: [row.assetId],
assetConstant: this.searchParams.assetConstant, assetConstant: this.assetConstant,
archiAssetTypeId: this.searchParams.archiAssetTypeId, // archiAssetTypeId: this.archiAssetTypeId,
} }
deleteMoreZiChanJiaGouTable(params).then(res => { deleteMoreZiChanJiaGouTable(params).then(res => {
if(res.code == 200) { if(res.code == 200) {
...@@ -759,76 +763,107 @@ ...@@ -759,76 +763,107 @@
this.tableHeight = right_container_height - 260 + 'px'; this.tableHeight = right_container_height - 260 + 'px';
}, },
treeClick(data) {//左侧树点击 treeClick(data) {//左侧树点击
if(data.subList) {
return;
}else {
this.searchParams.assetConstant = data.assetConstant;
this.searchParams.archiAssetTypeId = data.viewId;
this.getShangJiJieDianSelect(data.assetConstant, data.archiBelongId);
this.archiBelongId = data.archiBelongId; this.archiBelongId = data.archiBelongId;
this.getZuJianLeiXingSelect(null, this.archiBelongId); this.assetConstant = data.assetConstant;
// this.archiAssetTypeId = data.viewId;
this.getZuJianLeiXingSelect(null);
this.get_table(); this.get_table();
}
}, },
getTreeData() {//查询左侧树 getTreeData() {//查询左侧树
getArchiViewManage({}).then(res => { getArchiViewManage({}).then(res => {
if(res.code == 200) { if(res.code == 200) {
this.treeDefaultExpand = [res.data[0].viewId]; this.treeDefaultExpand = [res.data[0].viewId];
this.currentNodekey = res.data[0].subList[0].viewId; this.currentNodekey = res.data[0].viewId;
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.tree.setCurrentKey(this.currentNodekey); this.$refs.tree.setCurrentKey(this.currentNodekey);
}); });
res.data.map(item => { res.data.map(item => {
item.subList = [];
switch(item.viewName){ switch(item.viewName){
case '安全架构': case '安全架构':
item.subList.map(item2 => { item['assetConstant'] = 'ARCHI_SAFE';
item2['assetConstant'] = 'ARCHI_SAFE'; item['archiBelongId'] = 5;
item2['archiBelongId'] = 5;
})
break; break;
case '技术架构': case '技术架构':
item.subList.map(item2 => { item['assetConstant'] = 'ARCHI_TECHNOLOGY';
item2['assetConstant'] = 'ARCHI_TECHNOLOGY'; item['archiBelongId'] = 4;
item2['archiBelongId'] = 4;
})
break; break;
case '数据架构': case '数据架构':
item.subList.map(item2 => { item['assetConstant'] = 'ARCHI_DATA';
item2['assetConstant'] = 'ARCHI_DATA'; item['archiBelongId'] = 3;
item2['archiBelongId'] = 3;
})
break; break;
case '应用架构': case '应用架构':
item.subList.map(item2 => { item['assetConstant'] = 'ARCHI_APPLICATION';
item2['assetConstant'] = 'ARCHI_APPLICATION'; item['archiBelongId'] = 2;
item2['archiBelongId'] = 2;
})
break; break;
case '业务架构': case '业务架构':
item.subList.map(item2 => { item['assetConstant'] = 'ARCHI_BUSINESS';
item2['assetConstant'] = 'ARCHI_BUSINESS'; item['archiBelongId'] = 1;
item2['archiBelongId'] = 1;
})
break; break;
} }
}) });
// res.data.map(item => {
// switch(item.viewName){
// case '安全架构':
// item.subList.map(item2 => {
// item2['assetConstant'] = 'ARCHI_SAFE';
// item2['archiBelongId'] = 5;
// })
// break;
// case '技术架构':
// item.subList.map(item2 => {
// item2['assetConstant'] = 'ARCHI_TECHNOLOGY';
// item2['archiBelongId'] = 4;
// })
// break;
// case '数据架构':
// item.subList.map(item2 => {
// item2['assetConstant'] = 'ARCHI_DATA';
// item2['archiBelongId'] = 3;
// })
// break;
// case '应用架构':
// item.subList.map(item2 => {
// item2['assetConstant'] = 'ARCHI_APPLICATION';
// item2['archiBelongId'] = 2;
// })
// break;
// case '业务架构':
// item.subList.map(item2 => {
// item2['assetConstant'] = 'ARCHI_BUSINESS';
// item2['archiBelongId'] = 1;
// })
// break;
// }
// });
console.log('树')
console.log(res.data)
this.treeData[0].subList = res.data; this.treeData[0].subList = res.data;
this.archiBelongId = res.data[0].subList[0].archiBelongId; this.archiBelongId = res.data[0].archiBelongId;
this.searchParams.assetConstant = res.data[0].subList[0].assetConstant; this.assetConstant = res.data[0].assetConstant;
this.searchParams.archiAssetTypeId = res.data[0].subList[0].viewId; // this.archiAssetTypeId = res.data[0].viewId;
this.getShangJiJieDianSelect(res.data[0].subList[0].assetConstant, res.data[0].subList[0].archiBelongId); this.getShangJiJieDianSelect();
this.getZuJianLeiXingSelect(null, this.archiBelongId); this.getZuJianLeiXingSelect(null);
this.getGuanLianZiChanSelectData(null); this.getGuanLianZiChanSelectData(null);
this.get_table(); this.get_table();
}else { }else {
Message({
type: 'error',
message: res.msg
});
} }
}); });
}, },
......
...@@ -247,13 +247,11 @@ ...@@ -247,13 +247,11 @@
assetName: null, assetName: null,
createMan: null, createMan: null,
archiEleId: null, archiEleId: null,
assetConstant: null,
archiAssetTypeId: null,
}, },
treeData: [ treeData: [
{ {
viewId: 0, viewId: 0,
viewName: '架构视图管理', viewName: '总体架构资产',
subList: [] subList: []
} }
], ],
...@@ -274,7 +272,11 @@ ...@@ -274,7 +272,11 @@
shangJiJieDianSelect: [], shangJiJieDianSelect: [],
treeDefaultExpand: [], treeDefaultExpand: [],
editId: null, editId: null,
guanLianZiChanSelect: [] guanLianZiChanSelect: [],
archiBelongId: null,
assetConstant: null,
// archiAssetTypeId: null,
}; };
}, },
mounted(){ mounted(){
...@@ -314,7 +316,7 @@ ...@@ -314,7 +316,7 @@
getGuanLianZiChanSelectData(assetName) {//关联资产下拉菜单 getGuanLianZiChanSelectData(assetName) {//关联资产下拉菜单
const params = { const params = {
assetName: assetName, assetName: assetName,
assetConstant: this.searchParams.assetConstant assetConstant: this.assetConstant
} }
queryGuanLianZiChanSelect(params).then(res => { queryGuanLianZiChanSelect(params).then(res => {
console.log(res) console.log(res)
...@@ -366,8 +368,8 @@ ...@@ -366,8 +368,8 @@
archiAssetState: 2, archiAssetState: 2,
archiStage: 1, archiStage: 1,
archiBelongId: this.archiBelongId, archiBelongId: this.archiBelongId,
assetConstant: this.searchParams.assetConstant, assetConstant: this.assetConstant,
archiAssetTypeId: this.searchParams.archiAssetTypeId, // archiAssetTypeId: this.archiAssetTypeId,
archiEleId: this.ruleForm.let3, archiEleId: this.ruleForm.let3,
assetName: this.ruleForm.let1, assetName: this.ruleForm.let1,
sort: this.ruleForm.let4, sort: this.ruleForm.let4,
...@@ -453,8 +455,8 @@ ...@@ -453,8 +455,8 @@
"assetName": this.searchParams.assetName, "assetName": this.searchParams.assetName,
"createMan": this.searchParams.createMan, "createMan": this.searchParams.createMan,
"archiEleId": this.searchParams.archiEleId, "archiEleId": this.searchParams.archiEleId,
"assetConstant": this.searchParams.assetConstant, "assetConstant": this.assetConstant,
"archiAssetTypeId": this.searchParams.archiAssetTypeId, // "archiAssetTypeId": this.archiAssetTypeId,
"current": this.pager.current, "current": this.pager.current,
"pageSize": this.pager.size, "pageSize": this.pager.size,
}; };
...@@ -477,6 +479,7 @@ ...@@ -477,6 +479,7 @@
add() {//新建 add() {//新建
this.addDialog = true; this.addDialog = true;
this.is_add_edit = 'add'; this.is_add_edit = 'add';
this.getShangJiJieDianSelect();
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.form.resetFields(); this.$refs.form.resetFields();
this.ruleForm.let1 = null; this.ruleForm.let1 = null;
...@@ -530,10 +533,11 @@ ...@@ -530,10 +533,11 @@
this.ruleForm.dynamicForm_ = fieldsValue_; this.ruleForm.dynamicForm_ = fieldsValue_;
} }
}, },
getShangJiJieDianSelect(assetConstant) {//上级节点下拉框值 getShangJiJieDianSelect() {//上级节点下拉框值
const params = { const params = {
archiType: assetConstant, archiType: this.assetConstant,
parentAssetId: this.archiBelongId, parentAssetId: this.archiBelongId,
// archiAssetTypeId: this.archiAssetTypeId,
}; };
queryZiChanJiaGouShangJiJieDian(params).then(res => { queryZiChanJiaGouShangJiJieDian(params).then(res => {
if(res.code == 200) { if(res.code == 200) {
...@@ -625,8 +629,8 @@ ...@@ -625,8 +629,8 @@
}); });
const params = { const params = {
assetId: assetIdArray, assetId: assetIdArray,
assetConstant: this.searchParams.assetConstant, assetConstant: this.assetConstant,
archiAssetTypeId: this.searchParams.archiAssetTypeId, // archiAssetTypeId: this.archiAssetTypeId,
}; };
MessageBox.confirm('确定删除?', '提示', { MessageBox.confirm('确定删除?', '提示', {
confirmButtonText: '确定', confirmButtonText: '确定',
...@@ -665,7 +669,7 @@ ...@@ -665,7 +669,7 @@
// console.log(event.target.files[0]); // console.log(event.target.files[0]);
var formData = new FormData(); var formData = new FormData();
formData.append("file", event.target.files[0]); formData.append("file", event.target.files[0]);
formData.append("typeCode", this.searchParams.assetConstant); formData.append("typeCode", this.assetConstant);
importZhiChanJiaGou(formData).then(res => { importZhiChanJiaGou(formData).then(res => {
if(res.code == 200) { if(res.code == 200) {
this.get_table(); this.get_table();
...@@ -726,8 +730,8 @@ ...@@ -726,8 +730,8 @@
}).then(() => { }).then(() => {
const params = { const params = {
assetId: [row.assetId], assetId: [row.assetId],
assetConstant: this.searchParams.assetConstant, assetConstant: this.assetConstant,
archiAssetTypeId: this.searchParams.archiAssetTypeId, // archiAssetTypeId: this.archiAssetTypeId,
} }
deleteMoreZiChanJiaGouTable(params).then(res => { deleteMoreZiChanJiaGouTable(params).then(res => {
if(res.code == 200) { if(res.code == 200) {
...@@ -759,76 +763,107 @@ ...@@ -759,76 +763,107 @@
this.tableHeight = right_container_height - 260 + 'px'; this.tableHeight = right_container_height - 260 + 'px';
}, },
treeClick(data) {//左侧树点击 treeClick(data) {//左侧树点击
if(data.subList) {
return;
}else {
this.searchParams.assetConstant = data.assetConstant;
this.searchParams.archiAssetTypeId = data.viewId;
this.getShangJiJieDianSelect(data.assetConstant, data.archiBelongId);
this.archiBelongId = data.archiBelongId; this.archiBelongId = data.archiBelongId;
this.getZuJianLeiXingSelect(null, this.archiBelongId); this.assetConstant = data.assetConstant;
// this.archiAssetTypeId = data.viewId;
this.getZuJianLeiXingSelect(null);
this.get_table(); this.get_table();
}
}, },
getTreeData() {//查询左侧树 getTreeData() {//查询左侧树
getArchiViewManage({}).then(res => { getArchiViewManage({}).then(res => {
if(res.code == 200) { if(res.code == 200) {
this.treeDefaultExpand = [res.data[0].viewId]; this.treeDefaultExpand = [res.data[0].viewId];
this.currentNodekey = res.data[0].subList[0].viewId; this.currentNodekey = res.data[0].viewId;
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.tree.setCurrentKey(this.currentNodekey); this.$refs.tree.setCurrentKey(this.currentNodekey);
}); });
res.data.map(item => { res.data.map(item => {
item.subList = [];
switch(item.viewName){ switch(item.viewName){
case '安全架构': case '安全架构':
item.subList.map(item2 => { item['assetConstant'] = 'ARCHI_SAFE';
item2['assetConstant'] = 'ARCHI_SAFE'; item['archiBelongId'] = 5;
item2['archiBelongId'] = 5;
})
break; break;
case '技术架构': case '技术架构':
item.subList.map(item2 => { item['assetConstant'] = 'ARCHI_TECHNOLOGY';
item2['assetConstant'] = 'ARCHI_TECHNOLOGY'; item['archiBelongId'] = 4;
item2['archiBelongId'] = 4;
})
break; break;
case '数据架构': case '数据架构':
item.subList.map(item2 => { item['assetConstant'] = 'ARCHI_DATA';
item2['assetConstant'] = 'ARCHI_DATA'; item['archiBelongId'] = 3;
item2['archiBelongId'] = 3;
})
break; break;
case '应用架构': case '应用架构':
item.subList.map(item2 => { item['assetConstant'] = 'ARCHI_APPLICATION';
item2['assetConstant'] = 'ARCHI_APPLICATION'; item['archiBelongId'] = 2;
item2['archiBelongId'] = 2;
})
break; break;
case '业务架构': case '业务架构':
item.subList.map(item2 => { item['assetConstant'] = 'ARCHI_BUSINESS';
item2['assetConstant'] = 'ARCHI_BUSINESS'; item['archiBelongId'] = 1;
item2['archiBelongId'] = 1;
})
break; break;
} }
}) });
// res.data.map(item => {
// switch(item.viewName){
// case '安全架构':
// item.subList.map(item2 => {
// item2['assetConstant'] = 'ARCHI_SAFE';
// item2['archiBelongId'] = 5;
// })
// break;
// case '技术架构':
// item.subList.map(item2 => {
// item2['assetConstant'] = 'ARCHI_TECHNOLOGY';
// item2['archiBelongId'] = 4;
// })
// break;
// case '数据架构':
// item.subList.map(item2 => {
// item2['assetConstant'] = 'ARCHI_DATA';
// item2['archiBelongId'] = 3;
// })
// break;
// case '应用架构':
// item.subList.map(item2 => {
// item2['assetConstant'] = 'ARCHI_APPLICATION';
// item2['archiBelongId'] = 2;
// })
// break;
// case '业务架构':
// item.subList.map(item2 => {
// item2['assetConstant'] = 'ARCHI_BUSINESS';
// item2['archiBelongId'] = 1;
// })
// break;
// }
// });
console.log('树')
console.log(res.data)
this.treeData[0].subList = res.data; this.treeData[0].subList = res.data;
this.archiBelongId = res.data[0].subList[0].archiBelongId; this.archiBelongId = res.data[0].archiBelongId;
this.searchParams.assetConstant = res.data[0].subList[0].assetConstant; this.assetConstant = res.data[0].assetConstant;
this.searchParams.archiAssetTypeId = res.data[0].subList[0].viewId; // this.archiAssetTypeId = res.data[0].viewId;
this.getShangJiJieDianSelect(res.data[0].subList[0].assetConstant, res.data[0].subList[0].archiBelongId); this.getShangJiJieDianSelect();
this.getZuJianLeiXingSelect(null, this.archiBelongId); this.getZuJianLeiXingSelect(null);
this.getGuanLianZiChanSelectData(null); this.getGuanLianZiChanSelectData(null);
this.get_table(); this.get_table();
}else { }else {
Message({
type: 'error',
message: res.msg
});
} }
}); });
}, },
......
...@@ -247,13 +247,11 @@ ...@@ -247,13 +247,11 @@
assetName: null, assetName: null,
createMan: null, createMan: null,
archiEleId: null, archiEleId: null,
assetConstant: null,
archiAssetTypeId: null,
}, },
treeData: [ treeData: [
{ {
viewId: 0, viewId: 0,
viewName: '架构视图管理', viewName: '现状架构资产',
subList: [] subList: []
} }
], ],
...@@ -274,7 +272,11 @@ ...@@ -274,7 +272,11 @@
shangJiJieDianSelect: [], shangJiJieDianSelect: [],
treeDefaultExpand: [], treeDefaultExpand: [],
editId: null, editId: null,
guanLianZiChanSelect: [] guanLianZiChanSelect: [],
archiBelongId: null,
assetConstant: null,
// archiAssetTypeId: null,
}; };
}, },
mounted(){ mounted(){
...@@ -314,7 +316,7 @@ ...@@ -314,7 +316,7 @@
getGuanLianZiChanSelectData(assetName) {//关联资产下拉菜单 getGuanLianZiChanSelectData(assetName) {//关联资产下拉菜单
const params = { const params = {
assetName: assetName, assetName: assetName,
assetConstant: this.searchParams.assetConstant assetConstant: this.assetConstant
} }
queryGuanLianZiChanSelect(params).then(res => { queryGuanLianZiChanSelect(params).then(res => {
console.log(res) console.log(res)
...@@ -366,8 +368,8 @@ ...@@ -366,8 +368,8 @@
archiAssetState: 1, archiAssetState: 1,
archiStage: 1, archiStage: 1,
archiBelongId: this.archiBelongId, archiBelongId: this.archiBelongId,
assetConstant: this.searchParams.assetConstant, assetConstant: this.assetConstant,
archiAssetTypeId: this.searchParams.archiAssetTypeId, // archiAssetTypeId: this.archiAssetTypeId,
archiEleId: this.ruleForm.let3, archiEleId: this.ruleForm.let3,
assetName: this.ruleForm.let1, assetName: this.ruleForm.let1,
sort: this.ruleForm.let4, sort: this.ruleForm.let4,
...@@ -453,8 +455,8 @@ ...@@ -453,8 +455,8 @@
"assetName": this.searchParams.assetName, "assetName": this.searchParams.assetName,
"createMan": this.searchParams.createMan, "createMan": this.searchParams.createMan,
"archiEleId": this.searchParams.archiEleId, "archiEleId": this.searchParams.archiEleId,
"assetConstant": this.searchParams.assetConstant, "assetConstant": this.assetConstant,
"archiAssetTypeId": this.searchParams.archiAssetTypeId, // "archiAssetTypeId": this.archiAssetTypeId,
"current": this.pager.current, "current": this.pager.current,
"pageSize": this.pager.size, "pageSize": this.pager.size,
}; };
...@@ -477,6 +479,7 @@ ...@@ -477,6 +479,7 @@
add() {//新建 add() {//新建
this.addDialog = true; this.addDialog = true;
this.is_add_edit = 'add'; this.is_add_edit = 'add';
this.getShangJiJieDianSelect();
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.form.resetFields(); this.$refs.form.resetFields();
this.ruleForm.let1 = null; this.ruleForm.let1 = null;
...@@ -530,10 +533,11 @@ ...@@ -530,10 +533,11 @@
this.ruleForm.dynamicForm_ = fieldsValue_; this.ruleForm.dynamicForm_ = fieldsValue_;
} }
}, },
getShangJiJieDianSelect(assetConstant) {//上级节点下拉框值 getShangJiJieDianSelect() {//上级节点下拉框值
const params = { const params = {
archiType: assetConstant, archiType: this.assetConstant,
parentAssetId: this.archiBelongId, parentAssetId: this.archiBelongId,
// archiAssetTypeId: this.archiAssetTypeId,
}; };
queryZiChanJiaGouShangJiJieDian(params).then(res => { queryZiChanJiaGouShangJiJieDian(params).then(res => {
if(res.code == 200) { if(res.code == 200) {
...@@ -625,8 +629,8 @@ ...@@ -625,8 +629,8 @@
}); });
const params = { const params = {
assetId: assetIdArray, assetId: assetIdArray,
assetConstant: this.searchParams.assetConstant, assetConstant: this.assetConstant,
archiAssetTypeId: this.searchParams.archiAssetTypeId, // archiAssetTypeId: this.archiAssetTypeId,
}; };
MessageBox.confirm('确定删除?', '提示', { MessageBox.confirm('确定删除?', '提示', {
confirmButtonText: '确定', confirmButtonText: '确定',
...@@ -665,7 +669,7 @@ ...@@ -665,7 +669,7 @@
// console.log(event.target.files[0]); // console.log(event.target.files[0]);
var formData = new FormData(); var formData = new FormData();
formData.append("file", event.target.files[0]); formData.append("file", event.target.files[0]);
formData.append("typeCode", this.searchParams.assetConstant); formData.append("typeCode", this.assetConstant);
importZhiChanJiaGou(formData).then(res => { importZhiChanJiaGou(formData).then(res => {
if(res.code == 200) { if(res.code == 200) {
this.get_table(); this.get_table();
...@@ -726,8 +730,8 @@ ...@@ -726,8 +730,8 @@
}).then(() => { }).then(() => {
const params = { const params = {
assetId: [row.assetId], assetId: [row.assetId],
assetConstant: this.searchParams.assetConstant, assetConstant: this.assetConstant,
archiAssetTypeId: this.searchParams.archiAssetTypeId, // archiAssetTypeId: this.archiAssetTypeId,
} }
deleteMoreZiChanJiaGouTable(params).then(res => { deleteMoreZiChanJiaGouTable(params).then(res => {
if(res.code == 200) { if(res.code == 200) {
...@@ -759,76 +763,107 @@ ...@@ -759,76 +763,107 @@
this.tableHeight = right_container_height - 260 + 'px'; this.tableHeight = right_container_height - 260 + 'px';
}, },
treeClick(data) {//左侧树点击 treeClick(data) {//左侧树点击
if(data.subList) {
return;
}else {
this.searchParams.assetConstant = data.assetConstant;
this.searchParams.archiAssetTypeId = data.viewId;
this.getShangJiJieDianSelect(data.assetConstant, data.archiBelongId);
this.archiBelongId = data.archiBelongId; this.archiBelongId = data.archiBelongId;
this.getZuJianLeiXingSelect(null, this.archiBelongId); this.assetConstant = data.assetConstant;
// this.archiAssetTypeId = data.viewId;
this.getZuJianLeiXingSelect(null);
this.get_table(); this.get_table();
}
}, },
getTreeData() {//查询左侧树 getTreeData() {//查询左侧树
getArchiViewManage({}).then(res => { getArchiViewManage({}).then(res => {
if(res.code == 200) { if(res.code == 200) {
this.treeDefaultExpand = [res.data[0].viewId]; this.treeDefaultExpand = [res.data[0].viewId];
this.currentNodekey = res.data[0].subList[0].viewId; this.currentNodekey = res.data[0].viewId;
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.tree.setCurrentKey(this.currentNodekey); this.$refs.tree.setCurrentKey(this.currentNodekey);
}); });
res.data.map(item => { res.data.map(item => {
item.subList = [];
switch(item.viewName){ switch(item.viewName){
case '安全架构': case '安全架构':
item.subList.map(item2 => { item['assetConstant'] = 'ARCHI_SAFE';
item2['assetConstant'] = 'ARCHI_SAFE'; item['archiBelongId'] = 5;
item2['archiBelongId'] = 5;
})
break; break;
case '技术架构': case '技术架构':
item.subList.map(item2 => { item['assetConstant'] = 'ARCHI_TECHNOLOGY';
item2['assetConstant'] = 'ARCHI_TECHNOLOGY'; item['archiBelongId'] = 4;
item2['archiBelongId'] = 4;
})
break; break;
case '数据架构': case '数据架构':
item.subList.map(item2 => { item['assetConstant'] = 'ARCHI_DATA';
item2['assetConstant'] = 'ARCHI_DATA'; item['archiBelongId'] = 3;
item2['archiBelongId'] = 3;
})
break; break;
case '应用架构': case '应用架构':
item.subList.map(item2 => { item['assetConstant'] = 'ARCHI_APPLICATION';
item2['assetConstant'] = 'ARCHI_APPLICATION'; item['archiBelongId'] = 2;
item2['archiBelongId'] = 2;
})
break; break;
case '业务架构': case '业务架构':
item.subList.map(item2 => { item['assetConstant'] = 'ARCHI_BUSINESS';
item2['assetConstant'] = 'ARCHI_BUSINESS'; item['archiBelongId'] = 1;
item2['archiBelongId'] = 1;
})
break; break;
} }
}) });
// res.data.map(item => {
// switch(item.viewName){
// case '安全架构':
// item.subList.map(item2 => {
// item2['assetConstant'] = 'ARCHI_SAFE';
// item2['archiBelongId'] = 5;
// })
// break;
// case '技术架构':
// item.subList.map(item2 => {
// item2['assetConstant'] = 'ARCHI_TECHNOLOGY';
// item2['archiBelongId'] = 4;
// })
// break;
// case '数据架构':
// item.subList.map(item2 => {
// item2['assetConstant'] = 'ARCHI_DATA';
// item2['archiBelongId'] = 3;
// })
// break;
// case '应用架构':
// item.subList.map(item2 => {
// item2['assetConstant'] = 'ARCHI_APPLICATION';
// item2['archiBelongId'] = 2;
// })
// break;
// case '业务架构':
// item.subList.map(item2 => {
// item2['assetConstant'] = 'ARCHI_BUSINESS';
// item2['archiBelongId'] = 1;
// })
// break;
// }
// });
console.log('树')
console.log(res.data)
this.treeData[0].subList = res.data; this.treeData[0].subList = res.data;
this.archiBelongId = res.data[0].subList[0].archiBelongId; this.archiBelongId = res.data[0].archiBelongId;
this.searchParams.assetConstant = res.data[0].subList[0].assetConstant; this.assetConstant = res.data[0].assetConstant;
this.searchParams.archiAssetTypeId = res.data[0].subList[0].viewId; // this.archiAssetTypeId = res.data[0].viewId;
this.getShangJiJieDianSelect(res.data[0].subList[0].assetConstant, res.data[0].subList[0].archiBelongId); this.getShangJiJieDianSelect();
this.getZuJianLeiXingSelect(null, this.archiBelongId); this.getZuJianLeiXingSelect(null);
this.getGuanLianZiChanSelectData(null); this.getGuanLianZiChanSelectData(null);
this.get_table(); this.get_table();
}else { }else {
Message({
type: 'error',
message: res.msg
});
} }
}); });
}, },
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!