...
|
...
|
@@ -71,6 +71,7 @@ export default { |
|
|
let bizName=Vue.ref();
|
|
|
let name=Vue.ref();
|
|
|
let baseVisible=Vue.ref(false);
|
|
|
let isLoading=Vue.ref(false);
|
|
|
|
|
|
// 监听编辑状态
|
|
|
Vue.watch(()=>props.isDisplay,(newValue, oldValue)=>{
|
...
|
...
|
@@ -152,7 +153,7 @@ export default { |
|
|
if(res && res.data){
|
|
|
proxy.count = res.count;
|
|
|
proxy.tableDataList=res.data;
|
|
|
proxy.$emit('baseCount',proxy.count);
|
|
|
// proxy.$emit('baseCount',proxy.count);
|
|
|
}
|
|
|
})
|
|
|
|
...
|
...
|
@@ -164,10 +165,10 @@ export default { |
|
|
|
|
|
let params={
|
|
|
targetId:proxy.targetId,
|
|
|
npmList:[baseList]
|
|
|
baseList:[baseList]
|
|
|
}
|
|
|
|
|
|
proxy.$http.post('/api-web/fault/conf/npm/batchAddNpm',params,function (res){
|
|
|
proxy.$http.post('/api-web/fault/conf/base/batchAddBaseInfo',params,function (res){
|
|
|
if(res && res.success){
|
|
|
proxy.$global.showMsg('添加成功','success');
|
|
|
proxy.targetId=res.str;
|
...
|
...
|
@@ -238,24 +239,24 @@ export default { |
|
|
}
|
|
|
//添加选中的
|
|
|
let saveAll=()=>{
|
|
|
let npmListSelectData=[];
|
|
|
let baseListSelectData=[];
|
|
|
proxy.tableDataList.map(item=>{
|
|
|
if(item.checked){
|
|
|
npmListSelectData.push(item)
|
|
|
baseListSelectData.push(item)
|
|
|
}
|
|
|
|
|
|
})
|
|
|
if(npmListSelectData.length==0){
|
|
|
if(baseListSelectData.length==0){
|
|
|
proxy.$global.showMsg('请选择配置','warning');
|
|
|
}else{
|
|
|
proxy.isLoading=true;
|
|
|
|
|
|
let params={
|
|
|
targetId:proxy.targetId,
|
|
|
npmList:npmListSelectData
|
|
|
baseList:baseListSelectData
|
|
|
}
|
|
|
|
|
|
proxy.$http.post('/api-web/fault/conf/npm/batchAddNpm',params,function (res){
|
|
|
proxy.$http.post('/api-web/fault/conf/base/batchAddBaseInfo',params,function (res){
|
|
|
if(res && res.success){
|
|
|
proxy.$global.showMsg('添加成功','success');
|
|
|
proxy.targetId=res.str;
|
...
|
...
|
@@ -281,6 +282,7 @@ export default { |
|
|
proxy.$emit('callbackBase',obj);
|
|
|
}
|
|
|
return {
|
|
|
isLoading,
|
|
|
closeDialog,
|
|
|
addRes,
|
|
|
saveAlldata,
|
...
|
...
|
|