{"remainingRequest":"D:\\jenkins\\workspace\\xq-web-bpm\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!D:\\jenkins\\workspace\\xq-web-bpm\\src\\components\\dialog\\EipUrlTreeDialog.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\xq-web-bpm\\src\\components\\dialog\\EipUrlTreeDialog.vue","mtime":1675071991725},{"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\r\nimport { Message } from 'element-ui';\r\nimport req from \"@/request.js\";\r\nexport default {\r\n  name: \"eip-url-tree-dialog\",\r\n  props: {\r\n    title: {\r\n      type: String,\r\n      required: true,\r\n      default: \"选择分类\"\r\n    },\r\n    url: {\r\n      type: String,\r\n      required: true\r\n    },\r\n    requestMethod: {\r\n      type: String,\r\n      default: \"GET\"\r\n    },\r\n  },\r\n  data() {\r\n    return {\r\n      dialogVisible:false,//是否显示对话框\r\n      treeData: [], //树数据\r\n      defaultProps: {\r\n        children: \"children\",\r\n        label: \"name\"\r\n      },\r\n      nodes:{},//鼠标左击点击的树数据\r\n    }\r\n  },\r\n  methods: {\r\n    //显示对话框\r\n    showDialog() {\r\n       this.getData();\r\n    },\r\n    //加载树\r\n    async getData() {\r\n      this.treeData = [];\r\n      this.dialogVisible = true;\r\n      let response = await req.request({\r\n        url: this.url,\r\n        method: this.requestMethod\r\n      });\r\n      this.treeData = response.data;\r\n    },\r\n    //确定对话框\r\n    handleSave(){\r\n      if(JSON.stringify(this.nodes) == \"{}\"){\r\n         Message.warning(\"请选择数据\");\r\n         return;\r\n      }\r\n      this.$emit(\"handle-save\",this.nodes)\r\n      this.nodes = {};\r\n      this.dialogVisible = false;\r\n    },\r\n    //关闭对话框\r\n    handleClose() {\r\n      this.nodes = {};\r\n      this.dialogVisible = false;\r\n    },\r\n    //树鼠标左击事件\r\n    handleNodeClick(node){\r\n      this.nodes = node;\r\n    }\r\n  },\r\n}\r\n",null]}