{"remainingRequest":"D:\\jenkins\\workspace\\xq-web-bpm\\node_modules\\thread-loader\\dist\\cjs.js!D:\\jenkins\\workspace\\xq-web-bpm\\node_modules\\babel-loader\\lib\\index.js!D:\\jenkins\\workspace\\xq-web-bpm\\node_modules\\cache-loader\\dist\\cjs.js??ref--0-0!D:\\jenkins\\workspace\\xq-web-bpm\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!D:\\jenkins\\workspace\\xq-web-bpm\\src\\views\\SecurityCenter\\AccountLock.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\xq-web-bpm\\src\\views\\SecurityCenter\\AccountLock.vue","mtime":1675071992772},{"path":"D:\\jenkins\\workspace\\xq-web-bpm\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\xq-web-bpm\\node_modules\\thread-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\xq-web-bpm\\node_modules\\babel-loader\\lib\\index.js","mtime":315532800000},{"path":"D:\\jenkins\\workspace\\xq-web-bpm\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\xq-web-bpm\\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//\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//\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//\nimport uc from '@/api/uc.js';\nimport org from '@/api/org.js';\nimport utils from '@/hotent-ui-util.js';\nexport default {\n  components: {},\n  computed: {},\n  data: function data() {\n    return {\n      selectOrgId: '',\n      selectOrgName: '',\n      orgList: [],\n      //下拉框待选择的组织\n      demList: [],\n      //下拉框待选择的维度\n      treeData: [],\n      //树形菜单展示的数组\n      orgCode: '',\n      dimenList: [],\n      defaultProps: {\n        children: 'children',\n        label: 'name'\n      },\n      reFresh: true,\n      data: [],\n      pageResult: {\n        page: 1,\n        pageSize: 50,\n        total: 0\n      },\n      selectSelection: []\n    };\n  },\n  mounted: function mounted() {\n    this.$validator = this.$root.$validator; //维度-组织数据\n\n    this.getAllDemList();\n  },\n  methods: {\n    rowClick: function rowClick(row, column, event) {\n      this.$refs.htTable.$refs.htTable.toggleRowSelection(row);\n    },\n    getAllDemList: function getAllDemList() {\n      var _this = this;\n\n      org.getDescAll().then(function (resp) {\n        for (var i = 0; i < resp.length; i++) {\n          _this.orgList.push({\n            key: resp[i].id,\n            value: resp[i].demName\n          });\n\n          _this.demList.push({\n            key: resp[i].code,\n            value: resp[i].demName\n          });\n\n          _this.dimenList = resp;\n\n          if (resp[i].isDefault === 1) {\n            _this.selectOrgId = resp[i].id;\n          }\n        }\n      }).then(function (params) {\n        var dem = {\n          demId: _this.selectOrgId\n        };\n        org.getByParentAndDemToTree(dem).then(function (data) {\n          _this.treeData = utils.tile2nest(data);\n        });\n      });\n    },\n    demChange: function demChange(data) {\n      this.selectOrgId = data;\n      this.orgCode = '';\n      this.loadTreeData();\n    },\n    orgTreeClick: function orgTreeClick(orgbytree) {\n      //重置数据\n      var ary = this.$refs.htTable.querys;\n\n      for (var i = 0; i < ary.length; i++) {\n        if (ary[i].group && ary[i].group == 'orgTree') {\n          ary.remove(ary[i]);\n        }\n      }\n\n      var quickSearchEl = document.querySelector('.quick-search input');\n\n      if (quickSearchEl && !quickSearchEl.value) {\n        this.$refs.htTable.querys = [];\n      }\n\n      if (!orgbytree.code) {\n        this.$refs.htTable.querys.push({\n          property: 'DEM_ID_',\n          value: orgbytree.demId,\n          group: 'orgTree',\n          relation: 'AND',\n          operation: 'EQUAL'\n        });\n      } else {\n        this.orgCode = orgbytree.code;\n        var ids = [];\n        var trees = '';\n        this.getOrgTrees(orgbytree, ids);\n        trees = ids.join(',');\n\n        if (trees != '') {\n          this.$refs.htTable.querys.push({\n            property: 'ORG_ID_',\n            value: trees,\n            group: 'orgTree',\n            relation: 'AND',\n            operation: 'IN'\n          });\n        }\n      }\n\n      this.$refs.htTable.load();\n    },\n    getOrgTrees: function getOrgTrees(node, ids) {\n      ids.push(node.id);\n      var arr = node.children;\n\n      if (arr) {\n        for (var i = 0; i < arr.length; i++) {\n          this.getOrgTrees(arr[i], ids);\n        }\n      }\n    },\n    handleRefresh: function handleRefresh(cb) {\n      this.loadTreeData(cb); //重置数据\n\n      var ary = this.$refs.htTable.querys;\n\n      for (var i = 0; i < ary.length; i++) {\n        if (ary[i].group && ary[i].group == 'orgTree') {\n          ary.remove(ary[i]);\n        }\n      }\n\n      this.$refs.htTable.load();\n    },\n    loadTreeData: function loadTreeData(cb) {\n      var _this2 = this;\n\n      var param = {\n        demId: this.selectOrgId\n      };\n      org.getByParentAndDemToTree(param).then(function (data) {\n        _this2.treeData = utils.tile2nest(data);\n        cb && cb();\n      });\n    },\n    loadData: function loadData(param, cb) {\n      var _this3 = this;\n\n      uc.getOrgUserQuery(param).then(function (response) {\n        _this3.data = response.rows;\n        _this3.pageResult = {\n          page: response.page,\n          pageSize: response.pageSize,\n          total: response.total\n        };\n      }).finally(function () {\n        return cb();\n      });\n    },\n    selectRow: function selectRow(selection, row) {\n      this.selectSelection = selection;\n    },\n    handleLockout: function handleLockout(actionType) {\n      var _this4 = this;\n\n      // actionType  lockUser 锁定 unLockUser 解锁\n      if (this.selectSelection.length <= 0) {\n        this.$message.warning('请选择用户！');\n        return;\n      }\n\n      var selectRow = this.selectSelection[0];\n\n      if (selectRow.lockedStatus == 2 && actionType == 'lockUser') {\n        this.$message.warning('该账号当前已是锁定状态！');\n        return;\n      } else if (selectRow.lockedStatus == 1 && actionType == 'unLockUser') {\n        this.$message.warning('该账号当前已是解锁状态！');\n        return;\n      } else {\n        this.$confirm(\"\\u786E\\u5B9A\".concat(actionType == 'lockUser' ? '锁定' : '解锁', \"\\u8BE5\\u7528\\u6237, \\u662F\\u5426\\u7EE7\\u7EED?\"), '提示', {\n          confirmButtonText: '确定',\n          cancelButtonText: '取消',\n          type: 'warning'\n        }).then(function () {\n          var account = selectRow.account;\n          var userNumber = selectRow.userNumber;\n          var param = {};\n\n          if (!account) {\n            // 没有account 才用userNumber\n            param.userNumber = userNumber;\n          } else {\n            param.account = account;\n          }\n\n          uc.accountLockout(param, actionType).then(function (res) {\n            console.log(res);\n\n            _this4.$refs.htTable.load();\n          });\n        }).catch(function () {\n          _this4.$message({\n            type: 'info',\n            message: \"\\u5DF2\\u53D6\\u6D88\".concat(actionType == 'lockUser' ? '锁定' : '解锁')\n          });\n        });\n      }\n    }\n  }\n};",null]}