Explorar el Código

优化列表字段子表展开后,报错问题

yangfan hace 3 meses
padre
commit
9184f64b45
Se han modificado 1 ficheros con 24 adiciones y 10 borrados
  1. 24 10
      src/components/Dataset-filter/dataset-filter.vue

+ 24 - 10
src/components/Dataset-filter/dataset-filter.vue

@@ -616,11 +616,18 @@ export default {
           excludeColumnIds: excludeColumn.map((i) => i.id).join(',')
         }
         id && (data.id = id)
-        cubePremSave(Base64.encode(JSON.stringify(data))).then((res) => {
-          loading.close()
-          this.$message({ type: 'success', message: '已提交' })
-          this.getData()
-        })
+        cubePremSave(Base64.encode(JSON.stringify(data)))
+          .then((res) => {
+            this.$message({ type: 'success', message: '已提交' })
+            this.getData()
+            loading.close()
+          })
+          .catch(() => {
+            loading.close()
+          })
+          .finally(() => {
+            loading.close()
+          })
       }
       if (this.showFalgTemp === 'Btns') {
         if (!this.nowFilter.dataPermId && this.nowFilter.isDefault === 0) {
@@ -720,11 +727,18 @@ export default {
           isDefault: this.nowFilter.isDefault, //是否是默认权限
           permJson: JSON.stringify(permList)
         }
-        BtnDataPermSubmit(Base64.encode(JSON.stringify(valueList))).then((res) => {
-          loading.close()
-          this.$message({ type: 'success', message: '已提交' })
-          this.getData()
-        })
+        BtnDataPermSubmit(Base64.encode(JSON.stringify(valueList)))
+          .then((res) => {
+            loading.close()
+            this.$message({ type: 'success', message: '已提交' })
+            this.getData()
+          })
+          .catch(() => {
+            loading.close()
+          })
+          .finally(() => {
+            loading.close()
+          })
       }
     },
     // 过滤器添加条件