{"remainingRequest":"D:\\jenkins\\workspace\\xq-web-fvue\\node_modules\\thread-loader\\dist\\cjs.js!D:\\jenkins\\workspace\\xq-web-fvue\\node_modules\\babel-loader\\lib\\index.js!D:\\jenkins\\workspace\\xq-web-fvue\\node_modules\\cache-loader\\dist\\cjs.js??ref--0-0!D:\\jenkins\\workspace\\xq-web-fvue\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!D:\\jenkins\\workspace\\xq-web-fvue\\src\\views\\main\\organizationPermission\\PostManagementFvue.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\xq-web-fvue\\src\\views\\main\\organizationPermission\\PostManagementFvue.vue","mtime":1667327530028},{"path":"D:\\jenkins\\workspace\\xq-web-fvue\\babel.config.js","mtime":1667327525434},{"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\\thread-loader\\dist\\cjs.js","mtime":499162500000},{"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":["import \"core-js/modules/es6.function.name\";\nimport \"regenerator-runtime/runtime\";\nimport _asyncToGenerator from \"D:/jenkins/workspace/xq-web-fvue/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js\";\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//\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//\n//\n//\n//\n//\n//\n//\n//\nimport org from '@/api/org.js';\nimport utils from '@/hotent-ui-util.js';\n\nvar eipOrgDialog = function eipOrgDialog() {\n  return import('@/components/dialog/EipOrgDialog.vue');\n};\n\nvar EipJobSelector = function EipJobSelector() {\n  return import('@/components/selector/EipJobSelector.vue');\n};\n\nimport distrubutiveUser from \"./DistrubutiveUser\";\nexport default {\n  components: {\n    eipOrgDialog: eipOrgDialog,\n    distrubutiveUser: distrubutiveUser,\n    EipJobSelector: EipJobSelector\n  },\n  computed: {\n    demDeleteUrl: function demDeleteUrl() {\n      return window.context.uc + '/api/org/v1/orgPost/deleteOrgPost';\n    },\n    saveRoleUrl: function saveRoleUrl() {\n      var preUrl = window.context.uc + '/api/org/v1/orgPost';\n\n      if (this.orgPost.id) {\n        preUrl += '/updateOrgPost';\n      } else {\n        preUrl += '/saveOrgPost';\n      }\n\n      return preUrl;\n    },\n    requestMethod: function requestMethod() {\n      return 'POST';\n    }\n  },\n  data: function data() {\n    return {\n      dialogVisible: false,\n      dialogVisibleMenuPerm: false,\n      orgPost: {\n        name: '',\n        code: '',\n        jobCode: '',\n        jobName: '',\n        // orgName: '',\n        orgCode: ''\n      },\n      isSubmit: true,\n      data: [],\n      pageResult: {\n        page: 1,\n        pageSize: 50,\n        total: 0\n      },\n      loadDataUrl: '',\n      menuPerm: {},\n      allowRoles: [],\n      diaType: '',\n      jobs: [],\n      postUser: [],\n      readOnly: true,\n      tempOrgPost: {},\n      // 树\n      selectOrgId: '',\n      selectOrgName: '',\n      orgList: [],\n      //下拉框待选择的组织\n      demList: [],\n      //下拉框待选择的维度\n      treeData: [],\n      //树形菜单展示的数组\n      defaultProps: {\n        children: 'children',\n        label: 'name'\n      }\n    };\n  },\n  mounted: function mounted() {\n    this.getAllDemList();\n    this.$validator = this.$root.$validator;\n  },\n  methods: {\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    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    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    demChange: function demChange(data) {\n      this.selectOrgId = data;\n      this.orgPost.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.orgPost.orgCode = '';\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.orgPost.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    handleRefresh: function handleRefresh(cb) {\n      this.orgPost.orgCode = '';\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    // 树\n    rowClick: function rowClick(row, column, event) {\n      this.$refs.htTable.$refs.htTable.toggleRowSelection(row);\n    },\n    selectOrg: function selectOrg() {\n      this.$refs['eipOrgDialog'].showDialog();\n    },\n    setDemDefault: function setDemDefault(row) {\n      var _this3 = this;\n\n      org.setDemDefault(row.code).then(function () {\n        _this3.$refs.htTable.load();\n      });\n    },\n    handleClose: function handleClose() {\n      this.dialogVisible = false;\n      this.diaType = 'close';\n      this.loadDataUrl = '';\n    },\n    handleCloseMenuPerm: function handleCloseMenuPerm() {\n      this.dialogVisibleMenuPerm = false;\n    },\n    showDialog: function showDialog(row) {\n      if (!this.orgPost.orgCode) {\n        this.$message.error('请选择岗位组织');\n      } else {\n        this.dialogVisible = true;\n\n        if (row) {\n          this.orgPost = this.$options.data().orgPost;\n          this.loadDataUrl = \"/api/org/v1/orgPost/getOrgPost?postCode=\".concat(encodeURIComponent(row.code));\n        } else {\n          this.loadDataUrl = '';\n          this.diaType = 'add';\n        }\n\n        if (this.diaType === 'showInfo') {\n          this.dialogVisible = false;\n        }\n      }\n    },\n    dialogCancle: function dialogCancle(dialogVisible) {\n      this[dialogVisible] = false;\n    },\n    loadData: function loadData(param, cb) {\n      var _this4 = this;\n\n      org.getOrgPostPage(param).then(function (response) {\n        _this4.data = response.rows;\n        _this4.pageResult = {\n          page: response.page,\n          pageSize: response.pageSize,\n          total: response.total\n        };\n      }).finally(function () {\n        return cb();\n      });\n    },\n    handleCommand: function handleCommand(params) {\n      var _this5 = this;\n\n      this.readOnly = false;\n\n      switch (params.command) {\n        case 'showInfo':\n          this.diaType = 'showInfo'; // this.showDialog(params.row)\n\n          this.orgPost = params.row;\n          org.getFullname(params.row.id).then(function (resp) {\n            _this5.postUser = resp;\n          });\n          break;\n\n        case 'assignMenu':\n          this.diaType = 'edit';\n          this.showDialog(params.row);\n          break;\n\n        case 'disPersonnel':\n          this.$refs.distrubutiveUser.showDialog(params.row.id, params.row.code);\n          break;\n\n        default:\n          break;\n      }\n    },\n    beforeSaveData: function () {\n      var _beforeSaveData = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {\n        return regeneratorRuntime.wrap(function _callee$(_context) {\n          while (1) {\n            switch (_context.prev = _context.next) {\n              case 0:\n                this.isSubmit = true;\n\n              case 1:\n              case \"end\":\n                return _context.stop();\n            }\n          }\n        }, _callee, this);\n      }));\n\n      function beforeSaveData() {\n        return _beforeSaveData.apply(this, arguments);\n      }\n\n      return beforeSaveData;\n    }(),\n    afterSaveData: function afterSaveData() {\n      this.dialogVisible = false;\n      this.$refs.htTable.load();\n    },\n    afterDelete: function afterDelete() {\n      this.$refs.htTable.load();\n    },\n    afterLoadData: function afterLoadData(data) {\n      var _this6 = this;\n\n      // 编辑角色\n      if (this.dialogVisible || this.diaType === 'showInfo') {\n        this.orgPost = data.value;\n        this.tempOrgPost = JSON.parse(JSON.stringify(this.orgPost));\n        setTimeout(function () {\n          return _this6.$validator.validateAll('editDemForm');\n        });\n      }\n    },\n    eipOrgDialogOk: function eipOrgDialogOk(data) {\n      var _this7 = this;\n\n      if (data.length > 1) {\n        this.$message.error('岗位组织不能选择多个');\n        return;\n      }\n\n      if (this.tempOrgPost.orgId && this.tempOrgPost.orgId != data[0].id) {\n        var this_ = this;\n        this.$confirm('修改所属组织，保存后当前岗位下的人员会一并转移到新组织下', '提示', {\n          cancelButtonText: '取消',\n          confirmButtonText: '确定',\n          type: 'warning',\n          closeOnClickModal: false\n        }).then(function () {\n          this_.orgPost.orgCode = data[0].code;\n          this_.$set(_this7.orgPost, 'orgName', data[0].name);\n        });\n      } else {\n        this.orgPost.orgCode = data[0].code;\n        this.$set(this.orgPost, 'orgName', data[0].name);\n      }\n    }\n  }\n};",null]}