|
@@ -580,9 +580,12 @@ export default {
|
|
|
},
|
|
|
// 获取租户已购买的插件列表
|
|
|
async getPayedServices (compare = true) {
|
|
|
+ // debugger
|
|
|
const response = await plugins({ tenantId: this.tenantId });
|
|
|
+ console.log(response)
|
|
|
this.pageTreeData = response.data.map(plugin => {
|
|
|
- return {
|
|
|
+ if(plugin.activatedServices){
|
|
|
+ return {
|
|
|
...plugin,
|
|
|
activatedServices: plugin.activatedServices.map(service => {
|
|
|
return {
|
|
@@ -594,12 +597,19 @@ export default {
|
|
|
};
|
|
|
})
|
|
|
};
|
|
|
+ }else{
|
|
|
+ return {
|
|
|
+ ...plugin,
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
});
|
|
|
// 如果dialog里有值,就对比勾选服务
|
|
|
if (compare && this.dialogTreeData.length > 0) {
|
|
|
this.pageTreeData.forEach(plugin => {
|
|
|
let serviceCodes = [];
|
|
|
- plugin.activatedServices.forEach(service => {
|
|
|
+ if(plugin.activatedServices){
|
|
|
+ plugin.activatedServices.forEach(service => {
|
|
|
if (
|
|
|
!service.tenantServiceItems ||
|
|
|
service.tenantServiceItems.length === 0
|
|
@@ -611,6 +621,8 @@ export default {
|
|
|
);
|
|
|
}
|
|
|
});
|
|
|
+ }
|
|
|
+
|
|
|
this.dialogDefaultCheckedKeyObj[plugin.pluginCode] = serviceCodes;
|
|
|
});
|
|
|
}
|