真实的国产乱ⅩXXX66竹夫人,五月香六月婷婷激情综合,亚洲日本VA一区二区三区,亚洲精品一区二区三区麻豆

成都創(chuàng)新互聯(lián)網(wǎng)站制作重慶分公司

Element布局實(shí)現(xiàn)條件過濾查詢的方法

這篇文章主要講解了“Element布局實(shí)現(xiàn)條件過濾查詢的方法”,文中的講解內(nèi)容簡(jiǎn)單清晰,易于學(xué)習(xí)與理解,下面請(qǐng)大家跟著小編的思路慢慢深入,一起來研究和學(xué)習(xí)“Element布局實(shí)現(xiàn)條件過濾查詢的方法”吧!

定制制作可以根據(jù)自己的需求進(jìn)行定制,網(wǎng)站設(shè)計(jì)、成都網(wǎng)站設(shè)計(jì)構(gòu)思過程中功能建設(shè)理應(yīng)排到主要部位公司網(wǎng)站設(shè)計(jì)、成都網(wǎng)站設(shè)計(jì)的運(yùn)用實(shí)際效果公司網(wǎng)站制作網(wǎng)站建立與制做的實(shí)際意義

1.Element布局


    
        
            
                
                    
                        
                            
                            
                        
                        
                            
                        
                    
                
                
                    
                        
                            
                                
                          
                        
                        
                            
                        
                    
                
                
                    
                        
                            
                                
                            
                        
                        
                            
                                
                            
                        
                    
                
            
            
                
                    搜索
                    清空
                
            
            
                
                    
                    
                    
                    
                    
                    
                    
                    
                    
                        
                            已知曉
                        
                    
                
                
                
            
        
    

2.前端JS


    new Vue({
        el: '#app',
        data: {
            searchDayRange: '',
            searchAlarmLevel: '全部',
            searchDeviceType: '',
            searchIp: '',
            start: '',
            end: '',
            loading: false,
            searchContent: '',
            searchStatus: '全部',
            deviceType: [],
            alarmData: [],
            pageSize: 20,
            totalNum: 0,
            currentPage: 1,
            alarmType:[
                {
                    "label":"全部",
                    "value":"全部"
                },
                    {
                    "label":"輕微",
                    "value":"輕微"
                },
                    {
                    "label":"一般",
                    "value":"一般"
                },
                    {
                    "label":"嚴(yán)重",
                    "value":"嚴(yán)重"
                }
            ],
            StatusData: [
                {
                    "label":"全部",
                    "value":"全部"
                },
                    {
                    "label":"已恢復(fù)",
                    "value":"已恢復(fù)"
                },
                    {
                    "label":"未恢復(fù)",
                    "value":"未恢復(fù)"
                }
            ]
        },
        mounted() {
            axios.get(site_url + "device_type/").then(res => {
                if (res.data.result) {
                    this.deviceType = res.data.data
                } else {
                    this.$message.error('請(qǐng)求失敗')
                }
            }, 'json');
            // 頁(yè)面加載就獲取所有模板
            this.init()
        },
        methods: {
            init() {
                params = {};
                this.search(params)
            },
            getSearch() {
                if(typeof(this.searchDayRange) == "undefined" || this.searchDayRange == null || this.searchDayRange == ""){
                    this.start = "";
                    this.end = ""
                } else {
                    this.start = this.searchDayRange[0];
                    this.end = this.searchDayRange[1]
                }
                params = {
                    start: this.start,
                    end: this.end,
                    alarm_level: this.searchAlarmLevel,
                    device_type: this.searchDeviceType,
                    search_ip: this.searchIp,
                    query_str: this.searchContent,
                    status: this.searchStatus
                };
                this.search(params)
            },
            search(params) {
                this.loading = true;
                axios({
                    methods: 'get',
                    url: site_url + 'alarm/',
                    params: params
                })
                .then(res => {
                    if(res.data.result){
                        this.loading = false;
                        this.alarmData = res.data.data.data;
                        this.totalNum = res.data.data.count;
                    } else {
                        this.$message.error('請(qǐng)求失敗')
                    }
                }).catch(error => {
                    this.loading = false;
                    this.$message.error('請(qǐng)求失敗')
                });
            },
            clearData() {
                this.searchDayRange = [];
                this.searchAlarmLevel = '全部';
                this.searchDeviceType = '';
                this.searchIp = '';
                this.searchContent = '';
                this.searchStatus = '全部';
            },
            handleSizeChange(val) {
                this.pageSize = val;
                params = {
                    start: this.searchDayRange[0],
                    end: this.searchDayRange[1],
                    alarm_level: this.searchAlarmLevel,
                    device_type: this.searchDeviceType,
                    search_ip: this.searchIp,
                    query_str: this.searchContent,
                    status: this.searchStatus,
                    page: this.currentPage,
                    page_size: this.pageSize
                };
                this.search(params)
            },
            handleCurrentChange(val) {
                this.currentPage = val;
                params = {
                    start: this.searchDayRange[0],
                    end: this.searchDayRange[1],
                    alarm_level: this.searchAlarmLevel,
                    device_type: this.searchDeviceType,
                    search_ip: this.searchIp,
                    query_str: this.searchContent,
                    status: this.searchStatus,
                    page: this.currentPage,
                    page_size: this.pageSize
                };
                this.search(params)
            }
        }
    })

實(shí)現(xiàn)效果

Element布局實(shí)現(xiàn)條件過濾查詢的方法

感謝各位的閱讀,以上就是“Element布局實(shí)現(xiàn)條件過濾查詢的方法”的內(nèi)容了,經(jīng)過本文的學(xué)習(xí)后,相信大家對(duì)Element布局實(shí)現(xiàn)條件過濾查詢的方法這一問題有了更深刻的體會(huì),具體使用情況還需要大家實(shí)踐驗(yàn)證。這里是創(chuàng)新互聯(lián),小編將為大家推送更多相關(guān)知識(shí)點(diǎn)的文章,歡迎關(guān)注!


網(wǎng)站題目:Element布局實(shí)現(xiàn)條件過濾查詢的方法
當(dāng)前網(wǎng)址:http://weahome.cn/article/pegsgp.html

其他資訊

在線咨詢

微信咨詢

電話咨詢

028-86922220(工作日)

18980820575(7×24)

提交需求

返回頂部