Merge pull request #748 from utchoang/feature/fix-delete-domain

FIX - Domain: fix error tree domain after deleting the domain.
diff --git a/src/components/view/TreeView.vue b/src/components/view/TreeView.vue
index 9621754..0be5228 100644
--- a/src/components/view/TreeView.vue
+++ b/src/components/view/TreeView.vue
@@ -345,6 +345,7 @@
     reloadTreeData (objData) {
       if (objData && objData[0].isDel) {
         this.treeVerticalData = this.treeVerticalData.filter(item => item.id !== objData[0].id)
+        this.treeVerticalData = this.treeVerticalData.filter(item => item.parentdomainid !== objData[0].id)
       } else {
         // data response from action
         let jsonResponse = this.getResponseJsonData(objData[0])
diff --git a/src/config/section/domain.js b/src/config/section/domain.js
index a507ab6..7fbd263 100644
--- a/src/config/section/domain.js
+++ b/src/config/section/domain.js
@@ -130,7 +130,6 @@
       listView: true,
       dataView: true,
       show: (record, store) => {
-        console.log(record)
         return ['Admin'].includes(store.userInfo.roletype) && record.level !== 0 ||
           ['DomainAdmin'].includes(store.userInfo.roletype) && record.domainid !== store.userInfo.domainid
       },
diff --git a/src/views/iam/DomainActionForm.vue b/src/views/iam/DomainActionForm.vue
index 6cfecb7..378b3b7 100644
--- a/src/views/iam/DomainActionForm.vue
+++ b/src/views/iam/DomainActionForm.vue
@@ -157,6 +157,10 @@
       this.$pollJob({
         jobId,
         successMethod: result => {
+          if (this.action.api === 'deleteDomain') {
+            this.$set(this.resource, 'isDel', true)
+            this.parentUpdActionData(this.resource)
+          }
           this.parentFetchData()
           if (action.response) {
             const description = action.response(result.jobresult)
@@ -250,9 +254,6 @@
           if (!hasJobId) {
             this.parentUpdActionData(json)
             this.parentFetchData()
-          } else {
-            this.$set(this.resource, 'isDel', true)
-            this.parentUpdActionData(this.resource)
           }
           this.parentCloseAction()
         }).catch(error => {