{"remainingRequest":"D:\\jenkins\\workspace\\bbsl-fvue\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!D:\\jenkins\\workspace\\bbsl-fvue\\src\\views\\monitor\\gqMonitor\\components\\sygQueryDialog.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\bbsl-fvue\\src\\views\\monitor\\gqMonitor\\components\\sygQueryDialog.vue","mtime":1687666136950},{"path":"D:\\jenkins\\workspace\\bbsl-fvue\\node_modules\\babel-loader\\lib\\index.js","mtime":315532800000},{"path":"D:\\jenkins\\workspace\\bbsl-fvue\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\bbsl-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// import swStQuery from '@/api/monitor/resMonitor/swStQuery.js'\nimport gqStqQuery from '@/api/monitor/gqMonitor/gqStqQuery.js'\nexport default {\n\tname: 'TimeSelection',\n\tprops: {\n\t\tappType: {\n\t\t\ttype: String,\n\t\t\tdefault: ''\n\t\t},\n\t\tnewParam: {\n\t\t\ttype: Object,\n\t\t\tdefault: ''\n\t\t}\n\t},\n\tdata() {\n\t\treturn {\n\t\t\tpickerOptions: {\n\t\t\t\tdisabledDate(time) {\n\t\t\t\t\t//disabledDate 文档上:设置禁用状态,参数为当前日期,要求返回 Boolean\n\t\t\t\t\treturn time.getTime() > Date.now() //选当前时间之前的时间\n\t\t\t\t\t//return time.getTime() < Date.now()//选当前时间之后的时间\n\t\t\t\t}\n\t\t\t},\n\t\t\tvisible: false,\n\t\t\ttitle: '选择',\n\t\t\tscopeTime: '',\n\t\t\tqueryParam: {\n\t\t\t\tpageBean: {\n\t\t\t\t\tpageSize: 20,\n\t\t\t\t\tpage: 1\n\t\t\t\t},\n\t\t\t\tparams: {\n\t\t\t\t\tappType: null,\n\t\t\t\t\tstartTime: null,\n\t\t\t\t\tendTime: null\n\t\t\t\t}\n\t\t\t},\n\t\t}\n\t},\n\tcreated() {\n\n\t},\n\tmethods: {\n\t\t//默认时间\n\t\tgetCurrentMonthLast() {\n\t\t\tvar moment = require('moment') //打开时默认时间为一天前至获取当前年月日时分秒\n\t\t\tlet endTime = moment().format('YYYY-MM-DD') //当前年月日\n\t\t\tlet startTime = moment()\n\t\t\t\t.subtract(1, 'days')\n\t\t\t\t.format('YYYY-MM-DD')\n\t\t\tthis.scopeTime = [startTime, endTime]\n\t\t\tlet time = moment().format('LTS') //当前时分秒\n\t\t\tthis.queryParam.params.startTime = this.scopeTime[0] + ' ' + '00:00:00'\n\t\t\tthis.queryParam.params.endTime = this.scopeTime[1] + ' ' + time\n\t\t},\n\t\topenShare(val) {\n\t\t\tthis.queryParam.querys = []\n\t\t\tif (val.rscd) {\n\t\t\t\tthis.queryParam.querys.push({\n\t\t\t\t\tproperty: 'bsin.rscd',\n\t\t\t\t\toperation: 'LIKE',\n\t\t\t\t\tvalue: val.rscd,\n\t\t\t\t\tgroup: 'main',\n\t\t\t\t\trelation: 'AND',\n\t\t\t\t})\n\t\t\t} else if (val.wkcn) {\n\t\t\t\tthis.queryParam.querys.push({\n\t\t\t\t\tgroup: 'main',\n\t\t\t\t\toperation: 'LIKE',\n\t\t\t\t\tproperty: 'gqb.wkcn',\n\t\t\t\t\trelation: 'AND',\n\t\t\t\t\tvalue: val.wkcn,\n\t\t\t\t})\n\t\t\t} else if (val.mpnm) {\n\t\t\t\tthis.queryParam.querys.push({\n\t\t\t\t\tgroup: 'main',\n\t\t\t\t\toperation: 'LIKE',\n\t\t\t\t\tproperty: 'gqb.mpnm',\n\t\t\t\t\trelation: 'AND',\n\t\t\t\t\tvalue: val.mpnm,\n\t\t\t\t})\n\t\t\t}\n\t\t\tthis.visible = true\n\t\t\tthis.queryParam.params.appType = this.appType\n\t\t\tthis.getCurrentMonthLast()\n\t\t},\n\t\tchangeDate(val) {\n\t\t\tif (val) {\n\t\t\t\tvar moment = require('moment') //打开时默认时间为一天前至获取当前年月日时分秒\n\t\t\t\tlet time = moment().format('LTS') //当前时分秒\n\t\t\t\tthis.queryParam.params.startTime = val[0] + ' ' + '00:00:00'\n\t\t\t\tthis.queryParam.params.endTime = val[1] + ' ' + time\n\t\t\t} else {\n\t\t\t\tthis.queryParam.params.startTime = ''\n\t\t\t\tthis.queryParam.params.endTime = ''\n\t\t\t}\n\t\t},\n\t\t// 导出数据\n\t\thandleSave() {\n\t\t\t//导出excl\n\t\t\tconst loading = this.$loading({\n\t\t\t\tlock: true,\n\t\t\t\ttext: '导出中...',\n\t\t\t\tspinner: 'el-icon-loading',\n\t\t\t\tbackground: 'rgba(0, 0, 0, 0.7)'\n\t\t\t});\n\t\t\tgqStqQuery.resDataDerived(this.queryParam, res => {\n\t\t\t\tif (res.type === 'application/json') {\n\t\t\t\t\tconst fileReader = new FileReader()\n\t\t\t\t\tfileReader.onloadend = () => {\n\t\t\t\t\t\tconst jsonData = JSON.parse(fileReader.result)\n\t\t\t\t\t\tthis.$message.error(jsonData.message)\n\t\t\t\t\t}\n\t\t\t\t\tfileReader.readAsText(res)\n\t\t\t\t} else {\n\t\t\t\t\tthis.$message.success('导出成功');\n\t\t\t\t\tthis.handleClose()\n\t\t\t\t}\n\t\t\t\tloading.close();\n\t\t\t\t// if (res.message) {\n\t\t\t\t// \tthis.$message.error(res.message);\n\t\t\t\t// }else{\n\n\t\t\t\t// }\n\t\t\t})\n\t\t},\n\t\thandleClose() {\n\t\t\tthis.getCurrentMonthLast()\n\t\t\tthis.queryParam = {\n\t\t\t\tpageBean: {\n\t\t\t\t\tpageSize: 20,\n\t\t\t\t\tpage: 1\n\t\t\t\t},\n\t\t\t\tparams: {\n\t\t\t\t\tappType: null,\n\t\t\t\t\tstartTime: null,\n\t\t\t\t\tendTime: null\n\t\t\t\t}\n\t\t\t}\n\t\t\tthis.visible = false\n\t\t}\n\n\n\t},\n}\n",null]}