{"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\\uc\\heiorgmanager\\OrgPost.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\xq-web-bpm\\src\\views\\uc\\heiorgmanager\\OrgPost.vue","mtime":1675071993428},{"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":["import \"regenerator-runtime/runtime\";\nimport _asyncToGenerator from \"D:/jenkins/workspace/xq-web-bpm/node_modules/@babel/runtime/helpers/esm/asyncToGenerator\";\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\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 uc from \"@/api/uc.js\";\nimport EipUserDialog from \"@/components/dialog/EipUserDialog.vue\";\nimport DistrubutiveUser from \"./DistrubutiveUser\";\nexport default {\n  name: \"org-post\",\n  // props:['orgId','orgCode'],\n  props: {\n    orgId: {\n      type: String\n    },\n    orgCode: {\n      type: String\n    },\n    orgManagerNow: {\n      type: Object\n    }\n  },\n  components: {\n    EipUserDialog: EipUserDialog,\n    DistrubutiveUser: DistrubutiveUser\n  },\n  computed: {\n    demDeleteUrl: function demDeleteUrl() {\n      return window.context.uc + \"/api/org/v1/orgPost/deleteOrgPost\";\n    },\n    saveOrgPost: function saveOrgPost() {\n      var preUrl = window.context.uc + \"/api/org/v1/orgPost\";\n      this.OrgPost.orgCode = this.orgCode;\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      position: \"right\",\n      dialogVisible: false,\n      dialogVisibleMenuPerm: false,\n      OrgPost: {\n        jobCode: \"\",\n        //职务编码\n        jobName: \"\",\n        //职务名称\n        name: \"\",\n        //岗位名称\n        code: \"\" //岗位编码\n\n      },\n      job: [],\n      isSubmit: false,\n      data: [],\n      pageResult: {\n        page: 1,\n        pageSize: 50,\n        total: 0\n      },\n      loadDataUrl: \"\",\n      menuPerm: {},\n      allowRoles: [],\n      readOnly: false,\n      distOrgUser: false,\n      //分配岗位人员页面\n      diaType: '',\n      postUser: [],\n      editDialog: false\n    };\n  },\n  mounted: function mounted() {\n    this.$validator = this.$root.$validator;\n  },\n  methods: {\n    setDemDefault: function setDemDefault(row) {\n      var _this = this;\n\n      org.setDemDefault(row.code).then(function () {\n        _this.$refs.htTable.load();\n      });\n    },\n    handleClose: function handleClose() {\n      this.dialogVisible = false;\n      this.diaType = false;\n      this.editDialog = false;\n    },\n    handleCloseMenuPerm: function handleCloseMenuPerm() {\n      this.dialogVisibleMenuPerm = false;\n    },\n    showDialog: function showDialog(row) {\n      var _this2 = this;\n\n      this.dialogVisible = true;\n      uc.getJobPage({\n        \"pageBean\": {\n          \"page\": 1,\n          \"pageSize\": 1000\n        }\n      }).then(function (resp) {\n        _this2.job = resp.rows;\n      });\n\n      if (row) {\n        var _code = \"\".concat(row.code);\n\n        org.getOrgPost(_code).then(function (resp) {\n          _this2.OrgPost = resp.value;\n        });\n      } else {\n        this.OrgPost = {\n          name: \"\",\n          code: \"\",\n          jobName: \"\",\n          jobCode: \"\"\n        };\n      }\n    },\n    dialogCancle: function dialogCancle(dialogVisible) {\n      this[dialogVisible] = false;\n    },\n    loadData: function loadData(param, cb) {\n      var _this3 = this;\n\n      uc.getOrgPostPage(param).then(function (rep) {\n        _this3.data = rep.rows;\n        _this3.pageResult = {\n          page: rep.page,\n          pageSize: rep.pageSize,\n          total: rep.total\n        };\n      }).finally(function () {\n        return cb();\n      });\n    },\n    handleCommand: function handleCommand(params) {\n      var _this4 = this;\n\n      this.readOnly = false;\n\n      switch (params.command) {\n        case \"showInfo\":\n          if (!this.orgManagerNow.posPerms || this.orgManagerNow.posPerms.indexOf('edit') < 0) {\n            this.$message.error(\"您无编辑权限，请联系管理员\");\n            return;\n          }\n\n          this.readOnly = true;\n          this.$refs.distrubutiveUser.showDialog(params.row.id, params.row.code);\n          break;\n\n        case \"orgInfo\":\n          this.diaType = 'showInfo';\n          this.OrgPost = params.row;\n          org.getFullname(params.row.id).then(function (resp) {\n            _this4.postUser = resp;\n          });\n          break;\n\n        case \"setPostMaster\":\n          if (!this.orgManagerNow.posPerms || this.orgManagerNow.posPerms.indexOf('edit') < 0) {\n            this.$message.error(\"您无编辑权限，请联系管理员\");\n            return;\n          }\n\n          var isMain = false;\n\n          if (params.row.isCharge == 0) {\n            isMain = true;\n          }\n\n          org.setPostMaster({\n            postCode: params.row.code,\n            isMain: isMain\n          }).then(function () {\n            _this4.$refs.htTable.load();\n          });\n          break;\n\n        case \"edit\":\n          console.log(params.row);\n\n          if (!this.orgManagerNow.posPerms || this.orgManagerNow.posPerms.indexOf('edit') < 0) {\n            this.$message.error(\"您无编辑权限，请联系管理员\");\n            return;\n          }\n\n          org.getOrgPost(params.row.code).then(function (resp) {\n            _this4.OrgPost = resp.value;\n          });\n          this.editDialog = true;\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.editDialog = false;\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 _this5 = this;\n\n      // 编辑角色\n      if (this.dialogVisible) {\n        this.demension = data;\n        setTimeout(function () {\n          return _this5.$validator.validateAll(\"editDemForm\");\n        });\n      }\n    },\n    distOrgUserLoad: function distOrgUserLoad(param, cb) {\n      var _this6 = this;\n\n      org.getOrgUserPage(param).then(function (response) {\n        _this6.data = response.rows;\n        _this6.pageResult = {\n          page: response.page,\n          pageSize: response.pageSize,\n          total: response.total\n        };\n      }).finally(function () {\n        return cb();\n      });\n    }\n  }\n};",null]}