forked from zhurui/management
1 line
12 KiB
JSON
1 line
12 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\\components\\public\\dormitory-tree.vue?vue&type=script&lang=js&","dependencies":[{"path":"C:\\Users\\27446\\Desktop\\up\\front\\dkha-web-sz-main\\src\\components\\public\\dormitory-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//\n//\n//\n//\n//\n//\n//\n//\n\nimport { treeDataTranslateDis,treeDataTranslate } from '@/utils'\n export default {\n props: {\n type: String\n },\n data(){\n return{\n filterText:'',\n dataList: [],\n defaultCheckedKeysElectric:[],\n defaultCheckedKeysGoout:[],\n defaultCheckedKeysRoom:[],\n keyElectric:'',\n keyGoout:'',\n }\n },\n watch: {\n filterText (val) {\n this.$refs.tree.filter(val);\n },\n },\n mounted(){\n this.initTree(); \n },\n methods:{\n //第一级数据\n initTree(){\n this.$http.get('/system/scdormitoryfloor/roomTree/0').then(({data:res})=>{\n if(res.code==0){\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 // 宿舍电流 展示第一栋 的 第一层 的 第一个房间\n this.keyElectric=this.dataList[0]['children'][0]['children'][0].id;\n\n //外出管理 展示第一栋 的 第一层\n this.keyGoout=this.dataList[0]['children'][0].id;\n let type=this.dataList[0]['children'][0].df_type;\n let valGoout={\n df_floorid:this.keyGoout,\n df_type:type\n }\n\n //宿舍房间 展示第一栋\n this.keyRoom=this.dataList[0].id;\n let typeroom=this.dataList[0].df_type;\n let valRoom={\n df_floorid:this.keyRoom,\n df_type:typeroom\n }\n\n //树 默认展示 数组结构\n this.defaultCheckedKeysElectric.push(this.keyElectric);\n this.defaultCheckedKeysGoout.push(this.keyGoout);\n this.defaultCheckedKeysRoom.push(this.keyRoom);\n\n //储存数据\n this.$store.state.user.defaultCheckedKeys=this.keyElectric\n this.$store.state.user.valGoout=valGoout;\n this.$store.state.user.valRoom=valRoom;\n\n //默认展开 的 节点 标亮\n this.$nextTick(()=>{\n if(thi
|