forked from zhurui/management
1 line
8.7 KiB
JSON
1 line
8.7 KiB
JSON
|
{"remainingRequest":"C:\\Users\\27446\\Desktop\\up\\front\\dkha-web-sz-main\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!C:\\Users\\27446\\Desktop\\up\\front\\dkha-web-sz-main\\src\\views\\modules\\building\\building-tree.vue?vue&type=script&lang=js&","dependencies":[{"path":"C:\\Users\\27446\\Desktop\\up\\front\\dkha-web-sz-main\\src\\views\\modules\\building\\building-tree.vue","mtime":1614735254000},{"path":"C:\\Users\\27446\\Desktop\\up\\front\\dkha-web-sz-main\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"C:\\Users\\27446\\Desktop\\up\\front\\dkha-web-sz-main\\node_modules\\babel-loader\\lib\\index.js","mtime":499162500000},{"path":"C:\\Users\\27446\\Desktop\\up\\front\\dkha-web-sz-main\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"C:\\Users\\27446\\Desktop\\up\\front\\dkha-web-sz-main\\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//\n//\n//\n//\n//\n//\n//\n//\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 { treeDataTranslate } from '@/utils'\nexport default {\n name: 'RenRegionTree',\n data () {\n return {\n filterText: '',\n visibleTree: false,\n dataList: [],\n showName: '',\n expandedKeys: null,\n defaultProps: {\n children: 'children',\n label: 'name'\n }\n }\n },\n props: {\n value: [Number, String],\n parentName: String,\n buildType: String,\n placeholder: String,\n purpose: String\n },\n watch: {\n filterText (val) {\n this.$refs.tree.filter(val)\n },\n parentName (val) {\n this.showName = val\n }\n },\n methods: {\n treeDialog () {\n this.expandedKeys = null\n if (this.$refs.tree) {\n this.$refs.tree.setCurrentKey(null)\n }\n this.visibleTree = true\n this.getDataList(this.value)\n },\n filterNode (value, data) {\n if (!value) return true\n return data.name.indexOf(value) !== -1\n },\n getDataList (id) {\n // id -1全部 0学生宿舍 1教师宿舍 2教学楼\n\n return this.$http.get('/system/scdormitoryfloor/tree/-1').then(({ data: res }) => {\n if (res.code !== 0) {\n return this.$message.error(res.msg)\n }\n let list=res.data.map(item=>{\n return {\n ...item,\n name:item.df_floorname,\n id:item.df_floorid,\n pid:item.df_parentid\n }\n })\n this.dataList = treeDataTranslate(list)\n // this.$nextTick(() => {\n // this.$refs.tree.setCurrentKey(id)\n // this.expandedKeys = [id]\n // })\n }).catch(() => {})\n },\n cancelHandle () {\n this.visibleTree = false\n this.dataList = []\n this.filterText = ''\n },\n clearHandle () {\n this.$emit('input', '0')\n this.$emit('update:parentName', '')\n this.$emit('update:buildType', '')\n this.$emit('update:purpose', '')\n this.showName = ''\n this.visibleTree = false\n this.dataList = []\n this.filterText = ''\n },\n commitHandle () {\n const node = this.$refs.tree.getCurrentNode()\n if (!node) {\n this.$message.error(this.$t('choose'))\n return\n }\n this.$emit('input', node.id)\n this.$emit('update:parentName', node.name)\n this.$emit('update:buildType',String(node.df_type+1))\n this.$emit('update:purpose',String(node.df_purpose))\n this.showName = node.name\n this.visibleTree = false\n this.dataList = []\n this.filterText = ''\n }\n }\n}\n",{"version":3,"sources":["building-tree.vue"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA
|