scorpio 2 lat temu
rodzic
commit
507fde0147
1 zmienionych plików z 4 dodań i 2 usunięć
  1. 4 2
      src/views/home/component/form_dialog.vue

+ 4 - 2
src/views/home/component/form_dialog.vue

@@ -585,8 +585,10 @@ export default {
       })
     },
     saveConfigParams () {
-      const checkList = this.fieldType[this.selectIndex].params.filter(sub => sub.checked === true).map(sub => sub.id)
-      this.$api.params.saveConfigParams(checkList).then(res => {
+      const tmp = this.fieldType.filter(sub => sub.params).map(sub => sub.params)
+      const tmps = [].concat.apply([], tmp)
+      const tmpsList = tmps.filter(sub => sub.checked).map(sub => sub.id)
+      this.$api.params.saveConfigParams(tmpsList).then(res => {
         if (res.code === 200) {
           this.$message.success(res.msg)
         } else {