{"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\\components\\common\\HtAsideTree.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\xq-web-bpm\\src\\components\\common\\HtAsideTree.vue","mtime":1675071991631},{"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//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\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 portalApi from \"@/api/portal.js\";\nimport portal from \"../../api/portal\";\n\nvar htSysTypeTree = function htSysTypeTree() {\n  return import(\"@/components/common/HtSysTypeTree.vue\");\n};\n\nvar eipAuthDialog = function eipAuthDialog() {\n  return import(\"@/components/dialog/EipAuthDialog.vue\");\n};\n\nexport default {\n  name: \"ht-aside-tree\",\n  components: {\n    htSysTypeTree: htSysTypeTree,\n    eipAuthDialog: eipAuthDialog\n  },\n  props: {\n    width: {\n      type: String,\n      default: styles.aside_width\n    },\n    catId: {\n      type: String,\n      default: \"\"\n    },\n    typeKey: {\n      type: String,\n      default: \"\"\n    },\n    supportFilter: {\n      type: Boolean,\n      default: true\n    },\n    hasFooter: {\n      type: Boolean,\n      default: true\n    },\n    hasNavbarCollapse: {\n      type: Boolean,\n      default: true\n    },\n    defaultExpandedKeys: {\n      type: Array,\n      default: function _default() {\n        return [];\n      }\n    },\n    isDefaultAuth: {\n      type: Boolean,\n      default: false\n    }\n  },\n  computed: {\n    navbarCollapseStyle: function navbarCollapseStyle() {\n      if (this.asideShow) {\n        return {\n          left: parseInt(this.width) + \"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&isDefaultAuth=\").concat(this.isDefaultAuth ? 1 : 0);\n    }\n  },\n  data: function data() {\n    return {\n      asideShow: true,\n      isExpand: false,\n      showCheckbox: false,\n      dialogVisible: false,\n      sysType: {\n        children: [],\n        isLeaf: \"N\",\n        struType: 1,\n        typeKey: \"\",\n        name: \"\"\n      },\n      parentSysType: {\n        name: \"\"\n      },\n      selectedId: \"\"\n    };\n  },\n  watch: {\n    catId: function catId(newVal, oldVal) {\n      var _this2 = this;\n\n      if (newVal && newVal != oldVal) {\n        setTimeout(function () {\n          _this2.$refs.htSysTypeTree.loadData();\n        });\n      }\n    }\n  },\n  mounted: function mounted() {\n    this.$validator = this.$root.$validator;\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    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          break;\n\n        case \"edit\":\n          this.showDialog(data, action);\n          break;\n\n        case \"delete\":\n          this.delSysType(data);\n          break;\n\n        case \"moveto\":\n          this.$message(\"暂未提供该功能\");\n          break;\n\n        case \"auth\":\n          this.auth(data);\n          break;\n\n        default:\n          break;\n      }\n    },\n    auth: function auth(data) {\n      var _this = this;\n\n      var id = \"\";\n      this.selectedId = \"\";\n\n      if (data) {\n        id = data.id;\n        this.selectedId = id;\n        portal.getRights(id, \"app\").then(function (resp) {\n          if (resp.data) {\n            var conf = {\n              right: resp.data.right,\n              permissionList: resp.data.type,\n              autoClose: false\n            };\n\n            _this.$refs.appAuth.showDialog(conf);\n          }\n        });\n      }\n    },\n    authConfirm: function authConfirm(data) {\n      var param = {\n        id: this.selectedId,\n        objType: \"app\",\n        ownerNameJson: JSON.stringify(data)\n      };\n\n      var _this = this;\n\n      this.$http.post(\"${portal}/sys/authUser/v1/saveRights\", param).then(function (resp) {\n        if (resp.data) {\n          if (resp.data.state) {\n            _this.$message.success(\"授权成功\");\n\n            _this.$refs.appAuth.closeDialog();\n          } else {\n            _this.$message.error(resp.data.message);\n          }\n        }\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 _this3 = 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        portalApi.delSysType(data.id).then(function (data) {\n          if (data.state) {\n            _this3.$message({\n              type: \"success\",\n              message: data.message || \"删除成功\"\n            });\n\n            _this3.$refs.htSysTypeTree.loadData();\n\n            _this3.$emit('delete', data);\n          } else {\n            _this3.$message.error(data.message || \"删除成功\");\n          }\n        }, function (error) {\n          _this3.$message.error(error || \"删除失败\");\n        }).catch(function () {\n          _this3.dialogVisible = false;\n        });\n      }).catch(function () {});\n    },\n    handleClose: function handleClose() {\n      this.dialogVisible = false;\n    },\n    afterSaveData: function afterSaveData() {\n      var _this4 = 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        _this4.dialogVisible = false;\n      });\n    }\n  }\n};",null]}