{"remainingRequest":"D:\\jenkins\\workspace\\xq-web-fvue\\node_modules\\thread-loader\\dist\\cjs.js!D:\\jenkins\\workspace\\xq-web-fvue\\node_modules\\babel-loader\\lib\\index.js!D:\\jenkins\\workspace\\xq-web-fvue\\node_modules\\cache-loader\\dist\\cjs.js??ref--0-0!D:\\jenkins\\workspace\\xq-web-fvue\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!D:\\jenkins\\workspace\\xq-web-fvue\\src\\views\\main\\systemSafety\\Redis.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\xq-web-fvue\\src\\views\\main\\systemSafety\\Redis.vue","mtime":1667327530216},{"path":"D:\\jenkins\\workspace\\xq-web-fvue\\babel.config.js","mtime":1667327525434},{"path":"D:\\jenkins\\workspace\\xq-web-fvue\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\xq-web-fvue\\node_modules\\thread-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\xq-web-fvue\\node_modules\\babel-loader\\lib\\index.js","mtime":315532800000},{"path":"D:\\jenkins\\workspace\\xq-web-fvue\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\xq-web-fvue\\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//\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//\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 * as echarts from 'echarts';\nimport portal from '@/api/portal.js';\nimport req from '@/request.js';\nexport default {\n data: function data() {\n return {\n input: '',\n activeName: 'first',\n tableData: [],\n key: {\n title: 'Radis Key 实时数量(个)',\n dataSource: [],\n y: '数量(个)',\n height: 340,\n num: []\n },\n // 内存实时占用情况\n memory: {\n title: 'Radis 内存实时占用情况(KB)',\n dataSource: [],\n y: '内存(KB)',\n num: []\n },\n loading: true,\n currpage: 1,\n pagesize: 10,\n // 定时器ID\n timer: null,\n // 定时器周期\n millisec: 3000,\n tabPosition: 'left',\n url: {\n keysSize: '/monitor/actuator/v1/redis/keysSize',\n memoryInfo: '/monitor/actuator/v1/redis/memoryInfo'\n },\n pageResult: {\n page: 1,\n pageSize: 50,\n total: 0\n },\n data: [],\n dialogVisible: false,\n sequence: {},\n querySearch: [{\n label: 'key名称',\n prop: 'key'\n }]\n };\n },\n mounted: function mounted() {\n var _this = this;\n\n this.openTimer();\n this.loadRedisInfo();\n this.loadData();\n setTimeout(function () {\n _this.getMemory();\n\n _this.getKey();\n\n _this.draw();\n\n _this.draws();\n }, 3000);\n },\n beforeDestroy: function beforeDestroy() {\n this.closeTimer();\n },\n methods: {\n handleClick: function handleClick(tab, event) {},\n openTimer: function openTimer() {\n var _this2 = this;\n\n this.getMemory();\n this.getKey();\n this.closeTimer();\n this.timer = setInterval(function () {\n if (_this2.$route.path === _this2.path) {\n _this2.getMemory();\n\n _this2.getKey();\n }\n }, this.millisec);\n },\n\n /** 关闭定时器 */\n closeTimer: function closeTimer() {\n if (this.timer) clearInterval(this.timer);\n },\n\n /** 查询数据 */\n getMemory: function getMemory() {\n var _this3 = this;\n\n portal.getAction(this.url.memoryInfo).then(function (res) {\n _this3.memory.dataSource.push(_this3.$moment(res.create_time).format('h:mm:ss'));\n\n var num = res.used_memory / 1000;\n\n _this3.memory.num.push(num);\n\n _this3.draw();\n });\n },\n getKey: function getKey() {\n var _this4 = this;\n\n portal.getAction(this.url.keysSize).then(function (res) {\n _this4.key.dataSource.push(_this4.$moment(res.create_time).format('h:mm:ss'));\n\n var num = res.dbSize;\n\n _this4.key.num.push(num);\n\n _this4.draws();\n });\n },\n //绘制echarts\n draw: function draw() {\n var chartDom = document.getElementById('Memory');\n var myChart = echarts.init(chartDom);\n var option;\n option = {\n xAxis: {\n type: 'category',\n boundaryGap: false,\n data: this.memory.dataSource\n },\n yAxis: {\n type: 'value'\n },\n tooltip: {\n trigger: 'axis',\n axisPointer: {\n type: 'cross',\n label: {\n backgroundColor: '#6a7985'\n }\n }\n },\n series: [{\n data: this.memory.num,\n type: 'line',\n areaStyle: {}\n }]\n };\n option && myChart.setOption(option); //防止越界,重绘canvas\n\n window.onresize = myChart.resize;\n myChart.setOption(option); //设置option\n },\n draws: function draws() {\n var chartDom = document.getElementById('Keys');\n var myChart = echarts.init(chartDom);\n var option;\n option = {\n xAxis: {\n type: 'category',\n boundaryGap: false,\n data: this.key.dataSource\n },\n yAxis: {\n type: 'value'\n },\n tooltip: {\n trigger: 'axis',\n axisPointer: {\n type: 'cross',\n label: {\n backgroundColor: '#6a7985'\n }\n }\n },\n series: [{\n data: this.key.num,\n type: 'line',\n areaStyle: {}\n }]\n };\n option && myChart.setOption(option); //防止越界,重绘canvas\n\n window.onresize = myChart.resize;\n myChart.setOption(option); //设置option\n },\n loadRedisInfo: function loadRedisInfo() {\n var _this5 = this;\n\n portal.getRedis().then(function (res) {\n _this5.tableData = res;\n _this5.loading = false;\n });\n },\n handleSizeChange: function handleSizeChange(val) {\n this.pagesize = val;\n },\n handleCurrentChange: function handleCurrentChange(val) {\n this.currpage = val;\n },\n loadings: function loadings() {\n this.loadRedisInfo();\n },\n // readis缓存\n loadData: function loadData(param, cb) {\n var _this6 = this;\n\n // console.log(param)\n // let data = {}\n // if (param.querys) {\n // data.key = param.querys[0].value\n // }\n // data = this.qs.stringify(data)\n portal.getAllCache(param).then(function (res) {\n var arrAt = []; // let i = 0\n\n for (var item in res) {\n // i = i + 1\n //console.log(i, '多次次')\n arrAt.push({\n key: item,\n value: res[item]\n });\n }\n\n _this6.data = arrAt; // this.pageResult = {\n // page: i / 50,\n // pageSize: 50,\n // total: i\n // }\n // this.$refs.htTable.loading = false\n });\n },\n showCache: function showCache(data) {\n this.dialogVisible = true;\n this.sequence.key = data.row.key;\n this.sequence.value = JSON.stringify(data.row.value);\n console.log(this.sequence);\n },\n clickTest: function clickTest(data) {\n var _this7 = this;\n\n // console.log(key, 'key')\n //console.log(this.$refs.htTable.selection)\n // if (this.$refs.htTable.selection.length == 0) {\n // this.$message({\n // type: 'error',\n // message: '请至少选择一条数据'\n // })\n // return\n // }\n // console.log(this.deleteCacheArray, 'array')\n portal.deleteCache(data.row.key).then(function (res) {\n return _this7.loadData();\n });\n },\n beforeCloseDialog: function beforeCloseDialog() {\n this.sysCache = {};\n this.dialogVisible = false;\n },\n afterDelete: function afterDelete() {\n this.$refs.htTable.load();\n },\n //redis缓存根据key值查询\n handelSearch: function handelSearch() {\n var _this8 = this;\n\n var arr = [];\n\n if (this.input !== '') {\n portal.getKeyCache(this.input).then(function (res) {\n for (var item in res) {\n arr.push({\n key: item,\n value: res[item]\n });\n }\n\n _this8.currpage = 1;\n _this8.data = arr;\n });\n } else {\n this.loadData();\n }\n },\n //搜索重置按钮\n handelRefresh: function handelRefresh() {\n this.input = '';\n this.loadData();\n }\n }\n};",null]}