forked from zhurui/management
1 line
13 KiB
JSON
1 line
13 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\\home-cell-components\\academic-sensors.vue?vue&type=script&lang=js&","dependencies":[{"path":"C:\\Users\\27446\\Desktop\\up\\front\\dkha-web-sz-main\\src\\views\\modules\\home-cell-components\\academic-sensors.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\nimport {\n\tmapGetters\n} from 'vuex'\nexport default {\n\tfilters: {\n\t\t// 根据状态返回对应状态的icon\n\t\tfilterIcon(data) {\n\t\t\tlet icon = 'normal.png';\n\t\t\tif (data.isOffdevice == 'true') {\n\t\t\t\ticon = 'offline.png';\n\t\t\t} else if (data.isSendAlarm == 'true') {\n\t\t\t\ticon = 'abnormal.png'\n\t\t\t}\n\t\t\treturn require('@/assets/home/' + icon)\n\t\t}\n\t},\n\tcomputed: {\n\t\t...mapGetters(['environmentList','isFullScreen']),\n\t\twarningList() {\n\t\t\treturn this.environmentList.filter(item => {\n\t\t\t\treturn item.floorAddr[1] == this.activeId\n\t\t\t})\n\t\t}\n\t},\n\tdata() {\n\t\treturn {\n\t\t\tactiveName: '1f',\n\t\t\tactiveNames: '',\n\t\t\tactiveNameArr: [],\n\t\t\tactiveId: '',\n\t\t\tfloorList: [], //楼层列表\n\t\t}\n\t},\n\twatch: {\n\t\t// 监听环境传感器报警数据改变\n\t\tenvironmentList: {\n\t\t\tdeep: true,\n\t\t\thandler(newData) {\n\t\t\t\tif (newData.length > 0) {\n\t\t\t\t\t// 是否有报警设备 优先显示\n\t\t\t\t\tlet warn = newData.filter(item => item.isSendAlarm == 'true');\n\t\t\t\t\tif (warn.length > 0) {\n\t\t\t\t\t\tlet floorId = warn[0].floorAddr[1];\n\t\t\t\t\t\t获取最新报警数据相关信息\n\t\t\t\t\t\tlet list = this.floorList;\n\t\t\t\t\t\t//根据查找最新报警设备所在楼层切换显示报警数据\n\t\t\t\t\t\tfor (let i = 0; i < list.length; i++) {\n\t\t\t\t\t\t\tif (floorId == list[i].df_floorid) {\n\t\t\t\t\t\t\t\tlet arr=[]\n\t\t\t\t\t\t\t\tarr.push(list[i].df_floorname);\n\t\t\t\t\t\t\t\tthis.activeNameArr=Array.from(new Set(arr))\n\t\t\t\t\t\t\t\tthis.activeNameArr.forEach(item=>{\n\t\t\t\t\t\t\t\t\tthis.floorList.forEach(val=>{\n\t\t\t\t\t\t\t\t\t\tif(item == val.df_floorname){\n\t\t\t\t\t\t\t\t\t\t\tval.type=true\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\tthis.activeId = list[i].df_floorid;\n\t\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t}\n\t\t}\n\t},\n\tcreated() {\n\t\tthis.getBuildingFloors();\t\t\t\n\t},\n\tmethods: {\n\t\tchangeFloor(item) {\n\t\t\tthis.activeName = item.df_floorname;\n\t\t\tthis.floorList.forEach(val=>{\n\t\t\t\tif(val.type == item.type){\n\t\t\t\t\titem.type=false\n\t\t\t\t}\n\t\t\t})\t\n\t\t\tthis.activeId = item.df_floorid;\n\t\t},\n\t\tgetBuildingFloors() {\n\t\t\t// 获取教学楼楼层信息 // id -1全部 0学生宿舍 1教师宿舍 2教学楼\n\t\t\tthis.$http({\n\t\t\t\tmethod: \"get\",\n\t\t\t\turl: '/system/scdormitoryfloor/tree/2'\n\t\t\t}).then(({\n\t\t\t\tdata: res\n\t\t\t}) => {\n\t\t\t\tif (res.code != 0) {\n\t\t\t\t\treturn this.$message(res.msg)\n\t\t\t\t}\n\t\t\t\tlet arrs = res.data.filter(item => item.df_parentid != \"0\");\n\t\t\t\tthis.floorList=arrs.map(item=>{\n\t\t\t\t\treturn {\n\t\t\t\t\t\t...item,\n\t\t\t\t\t\ttype:false\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t\t// 默认显示第一个楼层\n\t\t\t\tthis.activeName = this.floorList[0].df_floorname\n\t\t\t\
|