Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
liangzhen
/
framework-tools-web
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit b89f523a
authored
Feb 04, 2024
by
liuyong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改三个架构资产
1 parent
c4b33265
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
271 additions
and
166 deletions
src/views/archi-asset-manage/index.vue
src/views/busi-assets-list/index.vue
src/views/current-assets-list/index.vue
src/views/archi-asset-manage/index.vue
View file @
b89f523
...
...
@@ -243,17 +243,15 @@
},
searchParams
:
{
archiAssetState
:
2
,
archiStage
:
2
,
archiStage
:
2
,
assetName
:
null
,
createMan
:
null
,
archiEleId
:
null
,
assetConstant
:
null
,
archiAssetTypeId
:
null
,
},
treeData
:
[
{
viewId
:
0
,
viewName
:
'
架构视图管理
'
,
viewName
:
'
系统架构资产
'
,
subList
:
[]
}
],
...
...
@@ -274,7 +272,11 @@
shangJiJieDianSelect
:
[],
treeDefaultExpand
:
[],
editId
:
null
,
guanLianZiChanSelect
:
[]
guanLianZiChanSelect
:
[],
archiBelongId
:
null
,
assetConstant
:
null
,
// archiAssetTypeId: null,
};
},
mounted
(){
...
...
@@ -314,7 +316,7 @@
getGuanLianZiChanSelectData
(
assetName
)
{
//关联资产下拉菜单
const
params
=
{
assetName
:
assetName
,
assetConstant
:
this
.
searchParams
.
assetConstant
assetConstant
:
this
.
assetConstant
}
queryGuanLianZiChanSelect
(
params
).
then
(
res
=>
{
console
.
log
(
res
)
...
...
@@ -364,10 +366,10 @@
console
.
log
(
targetAsset
)
const
params
=
{
archiAssetState
:
2
,
archiStage
:
2
,
archiStage
:
2
,
archiBelongId
:
this
.
archiBelongId
,
assetConstant
:
this
.
searchParams
.
assetConstant
,
archiAssetTypeId
:
this
.
searchParam
s
.
archiAssetTypeId
,
assetConstant
:
this
.
assetConstant
,
// archiAssetTypeId: thi
s.archiAssetTypeId,
archiEleId
:
this
.
ruleForm
.
let3
,
assetName
:
this
.
ruleForm
.
let1
,
sort
:
this
.
ruleForm
.
let4
,
...
...
@@ -453,8 +455,8 @@
"assetName"
:
this
.
searchParams
.
assetName
,
"createMan"
:
this
.
searchParams
.
createMan
,
"archiEleId"
:
this
.
searchParams
.
archiEleId
,
"assetConstant"
:
this
.
searchParams
.
assetConstant
,
"archiAssetTypeId"
:
this
.
searchParam
s
.
archiAssetTypeId
,
"assetConstant"
:
this
.
assetConstant
,
// "archiAssetTypeId": thi
s.archiAssetTypeId,
"current"
:
this
.
pager
.
current
,
"pageSize"
:
this
.
pager
.
size
,
};
...
...
@@ -477,6 +479,7 @@
add
()
{
//新建
this
.
addDialog
=
true
;
this
.
is_add_edit
=
'add'
;
this
.
getShangJiJieDianSelect
();
this
.
$nextTick
(()
=>
{
this
.
$refs
.
form
.
resetFields
();
this
.
ruleForm
.
let1
=
null
;
...
...
@@ -530,10 +533,11 @@
this
.
ruleForm
.
dynamicForm_
=
fieldsValue_
;
}
},
getShangJiJieDianSelect
(
assetConstant
)
{
//上级节点下拉框值
getShangJiJieDianSelect
()
{
//上级节点下拉框值
const
params
=
{
archiType
:
assetConstant
,
archiType
:
this
.
assetConstant
,
parentAssetId
:
this
.
archiBelongId
,
// archiAssetTypeId: this.archiAssetTypeId,
};
queryZiChanJiaGouShangJiJieDian
(
params
).
then
(
res
=>
{
if
(
res
.
code
==
200
)
{
...
...
@@ -625,8 +629,8 @@
});
const
params
=
{
assetId
:
assetIdArray
,
assetConstant
:
this
.
searchParams
.
assetConstant
,
archiAssetTypeId
:
this
.
searchParam
s
.
archiAssetTypeId
,
assetConstant
:
this
.
assetConstant
,
// archiAssetTypeId: thi
s.archiAssetTypeId,
};
MessageBox
.
confirm
(
'确定删除?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
...
...
@@ -665,7 +669,7 @@
// console.log(event.target.files[0]);
var
formData
=
new
FormData
();
formData
.
append
(
"file"
,
event
.
target
.
files
[
0
]);
formData
.
append
(
"typeCode"
,
this
.
searchParams
.
assetConstant
);
formData
.
append
(
"typeCode"
,
this
.
assetConstant
);
importZhiChanJiaGou
(
formData
).
then
(
res
=>
{
if
(
res
.
code
==
200
)
{
this
.
get_table
();
...
...
@@ -726,8 +730,8 @@
}).
then
(()
=>
{
const
params
=
{
assetId
:
[
row
.
assetId
],
assetConstant
:
this
.
searchParams
.
assetConstant
,
archiAssetTypeId
:
this
.
searchParam
s
.
archiAssetTypeId
,
assetConstant
:
this
.
assetConstant
,
// archiAssetTypeId: thi
s.archiAssetTypeId,
}
deleteMoreZiChanJiaGouTable
(
params
).
then
(
res
=>
{
if
(
res
.
code
==
200
)
{
...
...
@@ -759,76 +763,107 @@
this
.
tableHeight
=
right_container_height
-
260
+
'px'
;
},
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
.
getZuJianLeiXingSelect
(
null
,
this
.
archiBelongId
);
this
.
get_table
();
}
this
.
archiBelongId
=
data
.
archiBelongId
;
this
.
assetConstant
=
data
.
assetConstant
;
// this.archiAssetTypeId = data.viewId;
this
.
getZuJianLeiXingSelect
(
null
);
this
.
get_table
();
},
getTreeData
()
{
//查询左侧树
getArchiViewManage
({}).
then
(
res
=>
{
if
(
res
.
code
==
200
)
{
this
.
treeDefaultExpand
=
[
res
.
data
[
0
].
viewId
];
this
.
currentNodekey
=
res
.
data
[
0
].
subList
[
0
].
viewId
;
this
.
currentNodekey
=
res
.
data
[
0
].
viewId
;
this
.
$nextTick
(()
=>
{
this
.
$refs
.
tree
.
setCurrentKey
(
this
.
currentNodekey
);
});
res
.
data
.
map
(
item
=>
{
item
.
subList
=
[];
switch
(
item
.
viewName
){
case
'安全架构'
:
item
.
subList
.
map
(
item2
=>
{
item2
[
'assetConstant'
]
=
'ARCHI_SAFE'
;
item2
[
'archiBelongId'
]
=
5
;
})
item
[
'assetConstant'
]
=
'ARCHI_SAFE'
;
item
[
'archiBelongId'
]
=
5
;
break
;
case
'技术架构'
:
item
.
subList
.
map
(
item2
=>
{
item2
[
'assetConstant'
]
=
'ARCHI_TECHNOLOGY'
;
item2
[
'archiBelongId'
]
=
4
;
})
item
[
'assetConstant'
]
=
'ARCHI_TECHNOLOGY'
;
item
[
'archiBelongId'
]
=
4
;
break
;
case
'数据架构'
:
item
.
subList
.
map
(
item2
=>
{
item2
[
'assetConstant'
]
=
'ARCHI_DATA'
;
item2
[
'archiBelongId'
]
=
3
;
})
item
[
'assetConstant'
]
=
'ARCHI_DATA'
;
item
[
'archiBelongId'
]
=
3
;
break
;
case
'应用架构'
:
item
.
subList
.
map
(
item2
=>
{
item2
[
'assetConstant'
]
=
'ARCHI_APPLICATION'
;
item2
[
'archiBelongId'
]
=
2
;
})
item
[
'assetConstant'
]
=
'ARCHI_APPLICATION'
;
item
[
'archiBelongId'
]
=
2
;
break
;
case
'业务架构'
:
item
.
subList
.
map
(
item2
=>
{
item2
[
'assetConstant'
]
=
'ARCHI_BUSINESS'
;
item2
[
'archiBelongId'
]
=
1
;
})
item
[
'assetConstant'
]
=
'ARCHI_BUSINESS'
;
item
[
'archiBelongId'
]
=
1
;
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
.
archiBelongId
=
res
.
data
[
0
].
subList
[
0
].
archiBelongId
;
this
.
searchParams
.
assetConstant
=
res
.
data
[
0
].
subList
[
0
].
assetConstant
;
this
.
searchParams
.
archiAssetTypeId
=
res
.
data
[
0
].
subList
[
0
].
viewId
;
this
.
getShangJiJieDianSelect
(
res
.
data
[
0
].
subList
[
0
].
assetConstant
,
res
.
data
[
0
].
subList
[
0
].
archiBelongId
);
this
.
getZuJianLeiXingSelect
(
null
,
this
.
archiBelongId
);
this
.
archiBelongId
=
res
.
data
[
0
].
archiBelongId
;
this
.
assetConstant
=
res
.
data
[
0
].
assetConstant
;
// this.archiAssetTypeId = res.data
[0].viewId;
this
.
getShangJiJieDianSelect
();
this
.
getZuJianLeiXingSelect
(
null
);
this
.
getGuanLianZiChanSelectData
(
null
);
this
.
get_table
();
}
else
{
Message
({
type
:
'error'
,
message
:
res
.
msg
});
}
});
},
...
...
src/views/busi-assets-list/index.vue
View file @
b89f523
...
...
@@ -247,13 +247,11 @@
assetName
:
null
,
createMan
:
null
,
archiEleId
:
null
,
assetConstant
:
null
,
archiAssetTypeId
:
null
,
},
treeData
:
[
{
viewId
:
0
,
viewName
:
'
架构视图管理
'
,
viewName
:
'
总体架构资产
'
,
subList
:
[]
}
],
...
...
@@ -274,7 +272,11 @@
shangJiJieDianSelect
:
[],
treeDefaultExpand
:
[],
editId
:
null
,
guanLianZiChanSelect
:
[]
guanLianZiChanSelect
:
[],
archiBelongId
:
null
,
assetConstant
:
null
,
// archiAssetTypeId: null,
};
},
mounted
(){
...
...
@@ -314,7 +316,7 @@
getGuanLianZiChanSelectData
(
assetName
)
{
//关联资产下拉菜单
const
params
=
{
assetName
:
assetName
,
assetConstant
:
this
.
searchParams
.
assetConstant
assetConstant
:
this
.
assetConstant
}
queryGuanLianZiChanSelect
(
params
).
then
(
res
=>
{
console
.
log
(
res
)
...
...
@@ -366,8 +368,8 @@
archiAssetState
:
2
,
archiStage
:
1
,
archiBelongId
:
this
.
archiBelongId
,
assetConstant
:
this
.
searchParams
.
assetConstant
,
archiAssetTypeId
:
this
.
searchParam
s
.
archiAssetTypeId
,
assetConstant
:
this
.
assetConstant
,
// archiAssetTypeId: thi
s.archiAssetTypeId,
archiEleId
:
this
.
ruleForm
.
let3
,
assetName
:
this
.
ruleForm
.
let1
,
sort
:
this
.
ruleForm
.
let4
,
...
...
@@ -453,8 +455,8 @@
"assetName"
:
this
.
searchParams
.
assetName
,
"createMan"
:
this
.
searchParams
.
createMan
,
"archiEleId"
:
this
.
searchParams
.
archiEleId
,
"assetConstant"
:
this
.
searchParams
.
assetConstant
,
"archiAssetTypeId"
:
this
.
searchParam
s
.
archiAssetTypeId
,
"assetConstant"
:
this
.
assetConstant
,
// "archiAssetTypeId": thi
s.archiAssetTypeId,
"current"
:
this
.
pager
.
current
,
"pageSize"
:
this
.
pager
.
size
,
};
...
...
@@ -477,6 +479,7 @@
add
()
{
//新建
this
.
addDialog
=
true
;
this
.
is_add_edit
=
'add'
;
this
.
getShangJiJieDianSelect
();
this
.
$nextTick
(()
=>
{
this
.
$refs
.
form
.
resetFields
();
this
.
ruleForm
.
let1
=
null
;
...
...
@@ -530,10 +533,11 @@
this
.
ruleForm
.
dynamicForm_
=
fieldsValue_
;
}
},
getShangJiJieDianSelect
(
assetConstant
)
{
//上级节点下拉框值
getShangJiJieDianSelect
()
{
//上级节点下拉框值
const
params
=
{
archiType
:
assetConstant
,
archiType
:
this
.
assetConstant
,
parentAssetId
:
this
.
archiBelongId
,
// archiAssetTypeId: this.archiAssetTypeId,
};
queryZiChanJiaGouShangJiJieDian
(
params
).
then
(
res
=>
{
if
(
res
.
code
==
200
)
{
...
...
@@ -625,8 +629,8 @@
});
const
params
=
{
assetId
:
assetIdArray
,
assetConstant
:
this
.
searchParams
.
assetConstant
,
archiAssetTypeId
:
this
.
searchParam
s
.
archiAssetTypeId
,
assetConstant
:
this
.
assetConstant
,
// archiAssetTypeId: thi
s.archiAssetTypeId,
};
MessageBox
.
confirm
(
'确定删除?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
...
...
@@ -665,7 +669,7 @@
// console.log(event.target.files[0]);
var
formData
=
new
FormData
();
formData
.
append
(
"file"
,
event
.
target
.
files
[
0
]);
formData
.
append
(
"typeCode"
,
this
.
searchParams
.
assetConstant
);
formData
.
append
(
"typeCode"
,
this
.
assetConstant
);
importZhiChanJiaGou
(
formData
).
then
(
res
=>
{
if
(
res
.
code
==
200
)
{
this
.
get_table
();
...
...
@@ -726,8 +730,8 @@
}).
then
(()
=>
{
const
params
=
{
assetId
:
[
row
.
assetId
],
assetConstant
:
this
.
searchParams
.
assetConstant
,
archiAssetTypeId
:
this
.
searchParam
s
.
archiAssetTypeId
,
assetConstant
:
this
.
assetConstant
,
// archiAssetTypeId: thi
s.archiAssetTypeId,
}
deleteMoreZiChanJiaGouTable
(
params
).
then
(
res
=>
{
if
(
res
.
code
==
200
)
{
...
...
@@ -759,76 +763,107 @@
this
.
tableHeight
=
right_container_height
-
260
+
'px'
;
},
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
.
getZuJianLeiXingSelect
(
null
,
this
.
archiBelongId
);
this
.
get_table
();
}
this
.
archiBelongId
=
data
.
archiBelongId
;
this
.
assetConstant
=
data
.
assetConstant
;
// this.archiAssetTypeId = data.viewId;
this
.
getZuJianLeiXingSelect
(
null
);
this
.
get_table
();
},
getTreeData
()
{
//查询左侧树
getArchiViewManage
({}).
then
(
res
=>
{
if
(
res
.
code
==
200
)
{
this
.
treeDefaultExpand
=
[
res
.
data
[
0
].
viewId
];
this
.
currentNodekey
=
res
.
data
[
0
].
subList
[
0
].
viewId
;
this
.
currentNodekey
=
res
.
data
[
0
].
viewId
;
this
.
$nextTick
(()
=>
{
this
.
$refs
.
tree
.
setCurrentKey
(
this
.
currentNodekey
);
});
res
.
data
.
map
(
item
=>
{
item
.
subList
=
[];
switch
(
item
.
viewName
){
case
'安全架构'
:
item
.
subList
.
map
(
item2
=>
{
item2
[
'assetConstant'
]
=
'ARCHI_SAFE'
;
item2
[
'archiBelongId'
]
=
5
;
})
item
[
'assetConstant'
]
=
'ARCHI_SAFE'
;
item
[
'archiBelongId'
]
=
5
;
break
;
case
'技术架构'
:
item
.
subList
.
map
(
item2
=>
{
item2
[
'assetConstant'
]
=
'ARCHI_TECHNOLOGY'
;
item2
[
'archiBelongId'
]
=
4
;
})
item
[
'assetConstant'
]
=
'ARCHI_TECHNOLOGY'
;
item
[
'archiBelongId'
]
=
4
;
break
;
case
'数据架构'
:
item
.
subList
.
map
(
item2
=>
{
item2
[
'assetConstant'
]
=
'ARCHI_DATA'
;
item2
[
'archiBelongId'
]
=
3
;
})
item
[
'assetConstant'
]
=
'ARCHI_DATA'
;
item
[
'archiBelongId'
]
=
3
;
break
;
case
'应用架构'
:
item
.
subList
.
map
(
item2
=>
{
item2
[
'assetConstant'
]
=
'ARCHI_APPLICATION'
;
item2
[
'archiBelongId'
]
=
2
;
})
item
[
'assetConstant'
]
=
'ARCHI_APPLICATION'
;
item
[
'archiBelongId'
]
=
2
;
break
;
case
'业务架构'
:
item
.
subList
.
map
(
item2
=>
{
item2
[
'assetConstant'
]
=
'ARCHI_BUSINESS'
;
item2
[
'archiBelongId'
]
=
1
;
})
item
[
'assetConstant'
]
=
'ARCHI_BUSINESS'
;
item
[
'archiBelongId'
]
=
1
;
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
.
archiBelongId
=
res
.
data
[
0
].
subList
[
0
].
archiBelongId
;
this
.
searchParams
.
assetConstant
=
res
.
data
[
0
].
subList
[
0
].
assetConstant
;
this
.
searchParams
.
archiAssetTypeId
=
res
.
data
[
0
].
subList
[
0
].
viewId
;
this
.
getShangJiJieDianSelect
(
res
.
data
[
0
].
subList
[
0
].
assetConstant
,
res
.
data
[
0
].
subList
[
0
].
archiBelongId
);
this
.
getZuJianLeiXingSelect
(
null
,
this
.
archiBelongId
);
this
.
archiBelongId
=
res
.
data
[
0
].
archiBelongId
;
this
.
assetConstant
=
res
.
data
[
0
].
assetConstant
;
// this.archiAssetTypeId = res.data
[0].viewId;
this
.
getShangJiJieDianSelect
();
this
.
getZuJianLeiXingSelect
(
null
);
this
.
getGuanLianZiChanSelectData
(
null
);
this
.
get_table
();
}
else
{
Message
({
type
:
'error'
,
message
:
res
.
msg
});
}
});
},
...
...
src/views/current-assets-list/index.vue
View file @
b89f523
...
...
@@ -243,17 +243,15 @@
},
searchParams
:
{
archiAssetState
:
1
,
archiStage
:
1
,
archiStage
:
1
,
assetName
:
null
,
createMan
:
null
,
archiEleId
:
null
,
assetConstant
:
null
,
archiAssetTypeId
:
null
,
},
treeData
:
[
{
viewId
:
0
,
viewName
:
'
架构视图管理
'
,
viewName
:
'
现状架构资产
'
,
subList
:
[]
}
],
...
...
@@ -274,7 +272,11 @@
shangJiJieDianSelect
:
[],
treeDefaultExpand
:
[],
editId
:
null
,
guanLianZiChanSelect
:
[]
guanLianZiChanSelect
:
[],
archiBelongId
:
null
,
assetConstant
:
null
,
// archiAssetTypeId: null,
};
},
mounted
(){
...
...
@@ -314,7 +316,7 @@
getGuanLianZiChanSelectData
(
assetName
)
{
//关联资产下拉菜单
const
params
=
{
assetName
:
assetName
,
assetConstant
:
this
.
searchParams
.
assetConstant
assetConstant
:
this
.
assetConstant
}
queryGuanLianZiChanSelect
(
params
).
then
(
res
=>
{
console
.
log
(
res
)
...
...
@@ -364,10 +366,10 @@
console
.
log
(
targetAsset
)
const
params
=
{
archiAssetState
:
1
,
archiStage
:
1
,
archiStage
:
1
,
archiBelongId
:
this
.
archiBelongId
,
assetConstant
:
this
.
searchParams
.
assetConstant
,
archiAssetTypeId
:
this
.
searchParam
s
.
archiAssetTypeId
,
assetConstant
:
this
.
assetConstant
,
// archiAssetTypeId: thi
s.archiAssetTypeId,
archiEleId
:
this
.
ruleForm
.
let3
,
assetName
:
this
.
ruleForm
.
let1
,
sort
:
this
.
ruleForm
.
let4
,
...
...
@@ -453,8 +455,8 @@
"assetName"
:
this
.
searchParams
.
assetName
,
"createMan"
:
this
.
searchParams
.
createMan
,
"archiEleId"
:
this
.
searchParams
.
archiEleId
,
"assetConstant"
:
this
.
searchParams
.
assetConstant
,
"archiAssetTypeId"
:
this
.
searchParam
s
.
archiAssetTypeId
,
"assetConstant"
:
this
.
assetConstant
,
// "archiAssetTypeId": thi
s.archiAssetTypeId,
"current"
:
this
.
pager
.
current
,
"pageSize"
:
this
.
pager
.
size
,
};
...
...
@@ -477,6 +479,7 @@
add
()
{
//新建
this
.
addDialog
=
true
;
this
.
is_add_edit
=
'add'
;
this
.
getShangJiJieDianSelect
();
this
.
$nextTick
(()
=>
{
this
.
$refs
.
form
.
resetFields
();
this
.
ruleForm
.
let1
=
null
;
...
...
@@ -530,10 +533,11 @@
this
.
ruleForm
.
dynamicForm_
=
fieldsValue_
;
}
},
getShangJiJieDianSelect
(
assetConstant
)
{
//上级节点下拉框值
getShangJiJieDianSelect
()
{
//上级节点下拉框值
const
params
=
{
archiType
:
assetConstant
,
archiType
:
this
.
assetConstant
,
parentAssetId
:
this
.
archiBelongId
,
// archiAssetTypeId: this.archiAssetTypeId,
};
queryZiChanJiaGouShangJiJieDian
(
params
).
then
(
res
=>
{
if
(
res
.
code
==
200
)
{
...
...
@@ -625,8 +629,8 @@
});
const
params
=
{
assetId
:
assetIdArray
,
assetConstant
:
this
.
searchParams
.
assetConstant
,
archiAssetTypeId
:
this
.
searchParam
s
.
archiAssetTypeId
,
assetConstant
:
this
.
assetConstant
,
// archiAssetTypeId: thi
s.archiAssetTypeId,
};
MessageBox
.
confirm
(
'确定删除?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
...
...
@@ -665,7 +669,7 @@
// console.log(event.target.files[0]);
var
formData
=
new
FormData
();
formData
.
append
(
"file"
,
event
.
target
.
files
[
0
]);
formData
.
append
(
"typeCode"
,
this
.
searchParams
.
assetConstant
);
formData
.
append
(
"typeCode"
,
this
.
assetConstant
);
importZhiChanJiaGou
(
formData
).
then
(
res
=>
{
if
(
res
.
code
==
200
)
{
this
.
get_table
();
...
...
@@ -726,8 +730,8 @@
}).
then
(()
=>
{
const
params
=
{
assetId
:
[
row
.
assetId
],
assetConstant
:
this
.
searchParams
.
assetConstant
,
archiAssetTypeId
:
this
.
searchParam
s
.
archiAssetTypeId
,
assetConstant
:
this
.
assetConstant
,
// archiAssetTypeId: thi
s.archiAssetTypeId,
}
deleteMoreZiChanJiaGouTable
(
params
).
then
(
res
=>
{
if
(
res
.
code
==
200
)
{
...
...
@@ -759,76 +763,107 @@
this
.
tableHeight
=
right_container_height
-
260
+
'px'
;
},
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
.
getZuJianLeiXingSelect
(
null
,
this
.
archiBelongId
);
this
.
get_table
();
}
this
.
archiBelongId
=
data
.
archiBelongId
;
this
.
assetConstant
=
data
.
assetConstant
;
// this.archiAssetTypeId = data.viewId;
this
.
getZuJianLeiXingSelect
(
null
);
this
.
get_table
();
},
getTreeData
()
{
//查询左侧树
getArchiViewManage
({}).
then
(
res
=>
{
if
(
res
.
code
==
200
)
{
this
.
treeDefaultExpand
=
[
res
.
data
[
0
].
viewId
];
this
.
currentNodekey
=
res
.
data
[
0
].
subList
[
0
].
viewId
;
this
.
currentNodekey
=
res
.
data
[
0
].
viewId
;
this
.
$nextTick
(()
=>
{
this
.
$refs
.
tree
.
setCurrentKey
(
this
.
currentNodekey
);
});
res
.
data
.
map
(
item
=>
{
item
.
subList
=
[];
switch
(
item
.
viewName
){
case
'安全架构'
:
item
.
subList
.
map
(
item2
=>
{
item2
[
'assetConstant'
]
=
'ARCHI_SAFE'
;
item2
[
'archiBelongId'
]
=
5
;
})
item
[
'assetConstant'
]
=
'ARCHI_SAFE'
;
item
[
'archiBelongId'
]
=
5
;
break
;
case
'技术架构'
:
item
.
subList
.
map
(
item2
=>
{
item2
[
'assetConstant'
]
=
'ARCHI_TECHNOLOGY'
;
item2
[
'archiBelongId'
]
=
4
;
})
item
[
'assetConstant'
]
=
'ARCHI_TECHNOLOGY'
;
item
[
'archiBelongId'
]
=
4
;
break
;
case
'数据架构'
:
item
.
subList
.
map
(
item2
=>
{
item2
[
'assetConstant'
]
=
'ARCHI_DATA'
;
item2
[
'archiBelongId'
]
=
3
;
})
item
[
'assetConstant'
]
=
'ARCHI_DATA'
;
item
[
'archiBelongId'
]
=
3
;
break
;
case
'应用架构'
:
item
.
subList
.
map
(
item2
=>
{
item2
[
'assetConstant'
]
=
'ARCHI_APPLICATION'
;
item2
[
'archiBelongId'
]
=
2
;
})
item
[
'assetConstant'
]
=
'ARCHI_APPLICATION'
;
item
[
'archiBelongId'
]
=
2
;
break
;
case
'业务架构'
:
item
.
subList
.
map
(
item2
=>
{
item2
[
'assetConstant'
]
=
'ARCHI_BUSINESS'
;
item2
[
'archiBelongId'
]
=
1
;
})
item
[
'assetConstant'
]
=
'ARCHI_BUSINESS'
;
item
[
'archiBelongId'
]
=
1
;
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
.
archiBelongId
=
res
.
data
[
0
].
subList
[
0
].
archiBelongId
;
this
.
searchParams
.
assetConstant
=
res
.
data
[
0
].
subList
[
0
].
assetConstant
;
this
.
searchParams
.
archiAssetTypeId
=
res
.
data
[
0
].
subList
[
0
].
viewId
;
this
.
getShangJiJieDianSelect
(
res
.
data
[
0
].
subList
[
0
].
assetConstant
,
res
.
data
[
0
].
subList
[
0
].
archiBelongId
);
this
.
getZuJianLeiXingSelect
(
null
,
this
.
archiBelongId
);
this
.
archiBelongId
=
res
.
data
[
0
].
archiBelongId
;
this
.
assetConstant
=
res
.
data
[
0
].
assetConstant
;
// this.archiAssetTypeId = res.data
[0].viewId;
this
.
getShangJiJieDianSelect
();
this
.
getZuJianLeiXingSelect
(
null
);
this
.
getGuanLianZiChanSelectData
(
null
);
this
.
get_table
();
}
else
{
Message
({
type
:
'error'
,
message
:
res
.
msg
});
}
});
},
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment