{"remainingRequest":"D:\\jenkins\\workspace\\xq-web-fvue\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!D:\\jenkins\\workspace\\xq-web-fvue\\src\\views\\app\\selDeptUsers.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\xq-web-fvue\\src\\views\\app\\selDeptUsers.vue","mtime":1667327529934},{"path":"D:\\jenkins\\workspace\\xq-web-fvue\\node_modules\\babel-loader\\lib\\index.js","mtime":315532800000},{"path":"D:\\jenkins\\workspace\\xq-web-fvue\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\xq-web-fvue\\node_modules\\vue-loader\\lib\\index.js","mtime":499162500000}],"contextDependencies":[],"result":["//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\r\nimport {Message} from 'element-ui'\r\nexport default {\r\n  data() {\r\n    return {\r\n      checkAll: false,\r\n      checkedUser: [],\r\n      deptList: [],\r\n      userList: [],\r\n      childUserList: [],\r\n      users: [],\r\n      deptUsers: [],\r\n      isIndeterminate: false,\r\n      value: [],\r\n      value2: [],\r\n      isActive: [],\r\n      isActive2: false,\r\n      currentHandleCheckIndex: 0,\r\n      deptId: 0,\r\n    }\r\n  },\r\n  // beforeRouteEnter(to, from, next) {\r\n  //   next((vm) => {\r\n  //     if(from.name == 'selPaticipants'){\r\n\r\n  //     }\r\n  //   })\r\n  // },\r\n  created() {\r\n    let query = this.$route.query\r\n    this.deptId = query.deptId\r\n    this.deptUsers = JSON.parse(query.deptUsers)\r\n    console.log(this.deptUsers, 'this.deptUsers')\r\n    this.$bus.on('setAllUnCheck', () => {\r\n      this.deptUsers.forEach((item) => {\r\n        item.isChecked = false\r\n      })\r\n    })\r\n    this.$bus.on('changeValue', (id) => {\r\n      this.value.forEach((e, i) => {\r\n        if (e == id) {\r\n          this.value.splice(i, 1)\r\n        }\r\n      })\r\n    })\r\n  },\r\n  mounted() {\r\n    window.scrollTo(0, 0)\r\n  },\r\n  methods: {\r\n    handleCheckedUserChange(value) {\r\n      this.value = value\r\n      console.log(this.value, 'handleCheckedUserChange=this.value')\r\n    },\r\n    handlerOk() {\r\n      // this.$router.push({ path: '/order', query: { value: this.value } })\r\n      this.deptUsers.forEach((item) => {\r\n        this.value.indexOf(item.userId) != -1\r\n          ? (item.isChecked = true)\r\n          : (item.isChecked = false)\r\n      })\r\n      localStorage.setItem('deptUsers', JSON.stringify(this.deptUsers))\r\n      localStorage.setItem('deptId', JSON.stringify(this.deptId))\r\n      this.$router.push({\r\n        name: 'selParticipants',\r\n        // query: {\r\n        //   deptUsers: this.deptUsers,\r\n        //   deptId: this.deptId\r\n        // }\r\n      })\r\n      console.log(this.value, 'this.value')\r\n    },\r\n    changeActive(item) {\r\n      // item.isActive = !item.isActive\r\n      // console.log(this.deptList, 'this.deptList')\r\n    },\r\n\r\n    filterUserListByDeptid(id) {\r\n      let users = this.users\r\n      let userList = this.userList\r\n      var filUserList = userList.filter(\r\n        (item) => item.department.indexOf(id) != -1\r\n      )\r\n      let users2 = users.filter((i) => {\r\n        if (\r\n          filUserList.find((item) => {\r\n            return item.name == i\r\n          }) != undefined\r\n        ) {\r\n          return true\r\n        } else {\r\n          return false\r\n        }\r\n      })\r\n      return users2\r\n    },\r\n  },\r\n  watch: {\r\n    deptList: {\r\n      immediate: true,\r\n      deep: true,\r\n      handler: function (newVal, oldVal) {},\r\n    },\r\n  },\r\n  computed: {},\r\n}\r\n",null]}