订阅领域管理

This commit is contained in:
caoyang
2022-03-03 13:32:37 +08:00
parent 14c71b698e
commit 2fbebce21f
13 changed files with 127 additions and 92 deletions
@@ -1,15 +1,15 @@
<template>
<div class="sub-area">
<a-modal
title="订阅领域管理"
:title="$t('SubscriptionManagement')"
class="sub-area-modal"
:visible="visible"
:confirm-loading="confirmLoading"
:okText="'保存'"
:okText="$t('preservation')"
@ok="handleOk"
@cancel="handleCancel"
>
<a-input-search v-model="searchValue" style="margin-bottom: 8px" placeholder="节点快速查找" @change="onChange" />
<a-input-search v-model="searchValue" style="margin-bottom: 8px" :placeholder="$t('NodeQuickLookup')" @change="onChange" />
<a-tree
v-if="treeData && treeData.length"
v-model="checkedKeys"
@@ -104,7 +104,8 @@
let params = {}
getAction(`sys/category/getSysCategoryTree`,params).then(res=> {
if(res.success){
let data=res.result
this.treeData=this.addAttr(data)
}
})
},
@@ -116,6 +117,17 @@
}
})
},
addAttr(dataI){
if((Array.isArray(dataI)) && dataI.length>0){
dataI.forEach((item,index)=>{
this.$set(item,'key',item.id)
let arr = [];
this.addAttr(item.children,arr);
});
}
// console.log('dataI',dataI)
return dataI
},
afterVisibleChange(val) {
console.log('visible', val);
},
@@ -123,11 +135,14 @@
this.confirmLoading = true;
let params={
domainIdList:this.checkedKeys
}
postAction(`domain/domainUserRel/insert`,params).then(res=>{
if(res.success){
this.$emit('visible',false)
this.$message.success(res.result)
}else{
this.$message.warning(res.message)
}
})
},