...
|
...
|
@@ -2,7 +2,7 @@ export default { |
|
|
name: 'basicEnvironmentAdd',
|
|
|
template: '',
|
|
|
components: {},
|
|
|
props:['propsData','isDisplay'],
|
|
|
props:['propsData','baseList','isDisplay','baseCount'],
|
|
|
data () {
|
|
|
return {
|
|
|
columns:[
|
...
|
...
|
@@ -72,6 +72,29 @@ export default { |
|
|
let name=Vue.ref();
|
|
|
let baseVisible=Vue.ref(false);
|
|
|
let isLoading=Vue.ref(false);
|
|
|
//显示已添加过的环境列表数据
|
|
|
let baseListChecked=Vue.ref([]);
|
|
|
let setListData=()=>{
|
|
|
if(props.baseList){
|
|
|
props.baseList.map((item,index)=>{
|
|
|
proxy.tableDataList.map(v=>{
|
|
|
if(item.id==v.id){
|
|
|
proxy.baseListChecked.push(v)
|
|
|
|
|
|
}
|
|
|
})
|
|
|
|
|
|
})
|
|
|
console.log("baseListChecked",proxy.baseListChecked)
|
|
|
}
|
|
|
console.log("hahahah",props.baseCount,proxy.count)
|
|
|
if(props.baseCount==proxy.count){
|
|
|
proxy.isLoading=true;
|
|
|
}else{
|
|
|
proxy.isLoading=false;
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
// 监听编辑状态
|
|
|
Vue.watch(()=>props.isDisplay,(newValue, oldValue)=>{
|
...
|
...
|
@@ -153,6 +176,7 @@ export default { |
|
|
if(res && res.data){
|
|
|
proxy.count = res.count;
|
|
|
proxy.tableDataList=res.data;
|
|
|
proxy.setListData();
|
|
|
// proxy.$emit('baseCount',proxy.count);
|
|
|
}
|
|
|
})
|
...
|
...
|
@@ -268,6 +292,9 @@ export default { |
|
|
}
|
|
|
proxy.isLoading=false;
|
|
|
|
|
|
},function (err){
|
|
|
proxy.isLoading=false;
|
|
|
|
|
|
})
|
|
|
}
|
|
|
|
...
|
...
|
@@ -279,9 +306,13 @@ export default { |
|
|
faultConfId:proxy.faultConfId,
|
|
|
|
|
|
}
|
|
|
proxy.isLoading=false;
|
|
|
proxy.$emit('callbackBase',obj);
|
|
|
}
|
|
|
//
|
|
|
return {
|
|
|
setListData,
|
|
|
baseListChecked,
|
|
|
isLoading,
|
|
|
closeDialog,
|
|
|
addRes,
|
...
|
...
|
|