{"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\\OrgTree.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\xq-web-bpm\\src\\views\\uc\\heiorgmanager\\OrgTree.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 \"core-js/modules/es7.object.get-own-property-descriptors\";\nimport \"core-js/modules/web.dom.iterable\";\nimport \"core-js/modules/es6.object.keys\";\nimport \"core-js/modules/es6.function.name\";\nimport _defineProperty from \"D:/jenkins/workspace/xq-web-bpm/node_modules/@babel/runtime/helpers/esm/defineProperty\";\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\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 styles from \"@/assets/css/element-variables.scss\";\nimport ucApi from \"@/api/uc.js\";\n\nvar htOrgTree = function htOrgTree() {\n  return import(\"@/views/uc/heiorgmanager/HtOrgTree.vue\");\n};\n\nexport default {\n  name: \"org-tree\",\n  components: {\n    htOrgTree: htOrgTree\n  },\n  props: {\n    width: {\n      type: String,\n      default: styles.aside_width\n    },\n    orgId: {\n      type: String,\n      required: true\n    },\n    supportFilter: {\n      type: Boolean,\n      default: true\n    },\n    orgManagerNow: {\n      type: Object\n    },\n    lazy: {\n      type: Boolean,\n      default: true\n    }\n  },\n  computed: {\n    navbarCollapseStyle: function navbarCollapseStyle() {\n      if (this.asideShow) {\n        return {\n          left: parseInt(this.width) + 16 + \"px\"\n        };\n      }\n\n      return {\n        left: \"0px\"\n      };\n    },\n    saveSysTypeUrl: function saveSysTypeUrl() {\n      return \"\".concat(window.context.portal, \"/sys/sysType/v1/save?parentId=\").concat(this.parentSysType.id, \"&isRoot=\").concat(this.parentSysType.parentId == 0 ? 1 : 0, \"&isPriNode=0\");\n    }\n  },\n  data: function data() {\n    return {\n      asideShow: true,\n      isExpand: true,\n      showCheckbox: false,\n      dialogVisible: false,\n      sysType: {\n        children: [],\n        icon: \"{}\",\n        isLeaf: \"N\",\n        struType: 1,\n        typeKey: \"\",\n        name: \"\"\n      },\n      parentSysType: {\n        name: \"\"\n      }\n    };\n  },\n  methods: {\n    handleNodeClick: function handleNodeClick(node) {\n      this.$emit(\"node-click\", node);\n    },\n    check: function check(data, checkedObj) {\n      this.$emit(\"check\", data, checkedObj);\n    },\n    syncTree: function syncTree() {\n      this.$refs.orgTree.loadData();\n    },\n    handleExpand: function handleExpand() {\n      this.isExpand = !this.isExpand;\n      var elTree = this.$refs.htSysTypeTree.$refs.htTree.$refs.elTree;\n\n      for (var i = 0; i < elTree.store._getAllNodes().length; i++) {\n        elTree.store._getAllNodes()[i].expanded = this.isExpand;\n      }\n    },\n    handleCommand: function handleCommand(command) {\n      var node = command.node;\n      var data = command.data;\n      var action = command.action;\n\n      switch (action) {\n        case \"add\":\n          // this.showDialog(data, action);\n          this.$emit(\"addOrg\", data);\n          break;\n\n        case \"edit\":\n          // this.showDialog(data, action);\n          this.$emit(\"editOrg\", data);\n          break;\n\n        case \"delete\":\n          this.delSysType(data);\n          break;\n\n        case \"syncTree\":\n          this.syncTree();\n          break;\n\n        default:\n          break;\n      }\n    },\n    showDialog: function showDialog(data, action) {\n      this.dialogVisible = true;\n\n      if (data && action == \"add\") {\n        this.sysType.id = \"\";\n        this.sysType.name = \"\";\n        this.sysType.typeKey = \"\";\n        this.parentSysType = data;\n        this.sysType.parentId = data.id;\n        this.sysType.typeGroupKey = data.parentId == 0 ? data.typeKey : data.typeGroupKey;\n      }\n\n      if (data && action == \"edit\") {\n        this.sysType = _objectSpread(_objectSpread({}, this.sysType), data);\n      }\n    },\n    delSysType: function delSysType(data) {\n      var _this = this;\n\n      this.$confirm(\"\\u662F\\u5426\\u786E\\u5B9A\\u5220\\u9664 [\".concat(data.name, \"] ?\"), \"提示\", {\n        confirmButtonText: \"确定\",\n        cancelButtonText: \"取消\",\n        type: \"warning\"\n      }).then(function () {\n        ucApi.deleteOrg(data.code).then(function (data) {\n          if (data.state) {\n            _this.$message({\n              type: \"success\",\n              message: data.message || \"删除成功\"\n            });\n\n            _this.$refs.orgTree.loadData();\n          } else {\n            _this.$message.error(data.message || \"删除成功\");\n          }\n        }, function (error) {\n          _this.$message.error(error || \"删除失败\");\n        }).catch(function () {\n          _this.dialogVisible = false;\n        });\n      });\n    },\n    handleClose: function handleClose() {\n      this.dialogVisible = false;\n    },\n    afterSaveData: function afterSaveData() {\n      var _this2 = this;\n\n      this.$refs.htSysTypeTree.loadData();\n\n      if (this.sysType.id) {\n        this.dialogVisible = false;\n        return;\n      }\n\n      this.sysType.name = \"\";\n      this.sysType.typeKey = \"\";\n      this.$confirm(\"是否继续?\", \"提示\", {\n        confirmButtonText: \"确定\",\n        cancelButtonText: \"取消\",\n        type: \"success\"\n      }).then(function () {}).catch(function () {\n        _this2.dialogVisible = false;\n      });\n    }\n  }\n};",null]}