//组件 var mhsComponent = { template:`
搜索
用户没有本菜单权限!
`, data(){ // 获取当前屏幕的分辨率 let screenW = window.screen.width; let screenH = window.innerHeight; console.log("screen width:",screenW); console.log("screen height:",screenH); return { tHeight:screenH-192, tableData: Array(0), input:'', currentPage: 1, pagesize:50, recordTotal:0, date_value:[], begin_t:'', end_t:'', if_show0:false, if_show:false, checked:false, if_show_bt:1, if_show_et:false, } }, mounted() { if (localStorage.getItem("level")==4) { this.$data.if_show = true; return; } this.$data.if_show0= true; var _this = this; axios.post('/deescloud/get_page_setting', { opuser:localStorage.getItem("online_user"), opuser_uuid:localStorage.getItem("uuid"), }) .then(function (response) { if(response.data.r3=="1"){ _this.$data.if_show_bt=1; //_this.$data.if_show_et=false; }else if(response.data.r3=="2"){ //_this.$data.if_show_et=true; _this.$data.if_show_bt=2; }else if(response.data.r3=="3"){ //_this.$data.if_show_et=true; _this.$data.if_show_bt=3; }else{ _this.$data.if_show_bt=1; } }) .catch(function (error) { console.log(error); }); var objs; axios.post('/deescloud/getWellEx1', { opuser:localStorage.getItem("online_user"), opuser_uuid:localStorage.getItem("uuid"), index: this.$data.currentPage, count: this.$data.pagesize, checked:this.$data.checked }) .then(function (response) { console.log(response.data); objs = response.data.data; rcnt = response.data.total; _this.$data.tableData = objs; _this.$data.recordTotal = rcnt; }) .catch(function (error) { console.log(error); }); }, methods: { handleClose(done) { done(); }, getWellEx(_search_name){ document.getElementById("bt_serach").blur(); this.$data.currentPage=1; if (this.$data.begin_t != '' && this.$data.end_t != '' && this.$data.begin_t>this.$data.end_t) { this.$message({ message: '结束时间必须在开始时间之后!', type: 'warning', duration: 1500 }); return; } var _this = this; var objs; axios.post('/deescloud/getWellEx1', { opuser:localStorage.getItem("online_user"), opuser_uuid:localStorage.getItem("uuid"), Wellname: _search_name, index: this.$data.currentPage, count: this.$data.pagesize, BeginTime:this.$data.begin_t, EndTime:this.$data.end_t, checked:this.$data.checked }) .then(function (response) { console.log(response.data); objs = response.data.data; rcnt = response.data.total; _this.$data.tableData = objs; _this.$data.recordTotal = rcnt; }) .catch(function (error) { console.log(error); }); }, handleSizeChange(val) { //console.log(`每页 ${val} 条`); this.$data.pagesize = val; if (this.$data.begin_t != '' && this.$data.end_t != '' && this.$data.begin_t>this.$data.end_t) { this.$message({ message: '结束时间必须在开始时间之后!', type: 'warning', duration: 1500 }); return; } var _this = this; var objs; axios.post('/deescloud/getWellEx1', { opuser:localStorage.getItem("online_user"), opuser_uuid:localStorage.getItem("uuid"), Wellname: this.$data.input, index: this.$data.currentPage, count: this.$data.pagesize, BeginTime:this.$data.begin_t, EndTime:this.$data.end_t, checked:this.$data.checked }) .then(function (response) { console.log(response.data); objs = response.data.data; rcnt = response.data.total; _this.$data.tableData = objs; _this.$data.recordTotal = rcnt; }) .catch(function (error) { console.log(error); }); }, handleCurrentChange(val) { //console.log(`当前页: ${val}`); this.$data.currentPage = val; if (this.$data.begin_t != '' && this.$data.end_t != '' && this.$data.begin_t>this.$data.end_t) { this.$message({ message: '结束时间必须在开始时间之后!', type: 'warning', duration: 1500 }); return; } var _this = this; var objs; axios.post('/deescloud/getWellEx1', { opuser:localStorage.getItem("online_user"), opuser_uuid:localStorage.getItem("uuid"), Wellname: this.$data.input, index: this.$data.currentPage, count: this.$data.pagesize, BeginTime:this.$data.begin_t, EndTime:this.$data.end_t, checked:this.$data.checked }) .then(function (response) { console.log(response.data); objs = response.data.data; rcnt = response.data.total; _this.$data.tableData = objs; _this.$data.recordTotal = rcnt; }) .catch(function (error) { console.log(error); }); }, handleClick(row){ var url = 'mhs.html?id='+row.wellNameSource+'&sid='+row.wellstate+'&iid='+row.welloperator; url = encodeURI(url); window.open(url, ""); }, } }