欧美一级特黄大片做受成人-亚洲成人一区二区电影-激情熟女一区二区三区-日韩专区欧美专区国产专区

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

這篇文章主要講解了“Element布局實(shí)現(xiàn)條件過濾查詢的方法”,文中的講解內(nèi)容簡單清晰,易于學(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布局

<div id="app" >
    <el-row>
        <el-col :span="18" :offset="3">
            <el-row :gutter="40">
                <el-col :span="8">
                    <el-form label-width="100px">
                        <el-form-item label="告警時(shí)間">
                            <el-date-picker
                              v-model="searchDayRange"
                              type="daterange"
                              range-separator="-"
                              
                              value-format="yyyy-MM-dd"
                              start-placeholder="開始日期"
                              end-placeholder="結(jié)束日期">
                            </el-date-picker>
                        </el-form-item>
                        <el-form-item label="IP地址">
                            <el-input v-model="searchIp" placeholder="請(qǐng)輸入IP地址"></el-input>
                        </el-form-item>
                    </el-form>
                </el-col>
                <el-col :span="8">
                    <el-form label-width="100px">
                        <el-form-item label="告警類型">
                            <el-select v-model="searchAlarmLevel" placeholder="請(qǐng)選擇" >
                                <el-option v-for="item in alarmType" :key="item.value" :label="item.label" :value="item.value"></el-option>
                          </el-select>
                        </el-form-item>
                        <el-form-item label="搜索內(nèi)容">
                            <el-input v-model="searchContent" placeholder="請(qǐng)輸入搜索內(nèi)容"></el-input>
                        </el-form-item>
                    </el-form>
                </el-col>
                <el-col :span="8">
                    <el-form label-width="100px">
                        <el-form-item label="設(shè)備類型">
                            <el-select v-model="searchDeviceType" placeholder="請(qǐng)選擇設(shè)備類型" >
                                <el-option v-for="item in deviceType" :key="item.type" :label="item.type_cn" :value="item.type"></el-option>
                            </el-select>
                        </el-form-item>
                        <el-form-item label="是否修復(fù)">
                            <el-select v-model="searchStatus" placeholder="請(qǐng)選擇" >
                                <el-option v-for="item in status" :key="item.label" :label="item.label" :value="item.label"></el-option>
                            </el-select>
                        </el-form-item>
                    </el-form>
                </el-col>
            </el-row>
            <el-row>
                <el-col :span="4" :offset="20">
                    <el-button type="primary" @click="getSearch">搜索</el-button>
                    <el-button type="warning" @click="clearData">清空</el-button>
                </el-col>
            </el-row>
            <el-row >
                <el-table :data="alarmData" border >
                    <el-table-column prop="id" label="告警ID"></el-table-column>
                    <el-table-column prop="ip" label="IP地址"></el-table-column>
                    <el-table-column prop="alarm_type_cn" label="設(shè)備類型"></el-table-column>
                    <el-table-column prop="monitor_name" label="監(jiān)控名稱"></el-table-column>
                    <el-table-column prop="title" label="故障內(nèi)容"></el-table-column>
                    <el-table-column prop="monitor_level" label="告警等級(jí)"></el-table-column>
                    <el-table-column prop="appear_time" label="告警時(shí)間"></el-table-column>
                    <el-table-column prop="recover_time" label="恢復(fù)時(shí)間"></el-table-column>
                    <el-table-column label="操作">
                        <template slot-scope="scope">
                            <el-button @click="handleAlarm(scope.row)" type="primary" size="small">已知曉</el-button>
                        </template>
                    </el-table-column>
                </el-table>
                <el-pagination
                  @size-change="handleSizeChange"
                  @current-change="handleCurrentChange"
                  :current-page="currentPage"
                  :page-sizes="[10, 20, 50, 100, 200, 300, 400]"
                  :page-size="pageSize"
                  
                  layout="total, sizes, prev, pager, next, jumper"
                  :total="totalNum">
                </el-pagination>
            </el-row>
        </el-col>
    </el-row>
</div>

2.前端JS

<script type="text/javascript">
    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');
            // 頁面加載就獲取所有模板
            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)
            }
        }
    })
</script>

實(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)注!

新聞名稱:Element布局實(shí)現(xiàn)條件過濾查詢的方法
標(biāo)題來源:http://aaarwkj.com/article18/pegsgp.html

成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供網(wǎng)站維護(hù)、虛擬主機(jī)網(wǎng)站改版、網(wǎng)站收錄、Google、網(wǎng)站營銷

廣告

聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請(qǐng)盡快告知,我們將會(huì)在第一時(shí)間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如需處理請(qǐng)聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時(shí)需注明來源: 創(chuàng)新互聯(lián)

h5響應(yīng)式網(wǎng)站建設(shè)
中文字幕在线成人影院| 亚洲一区二区四区乱码在线| 亚洲成人av在线蜜桃| 国产片中文字幕在线观看| 日韩欧美二区三区在线| 国内自拍一区二区三区| 亚洲最色一区二区三区| 国产精品传媒在线观看网站| 亚洲天堂男人的天堂狠狠操 | 亚洲一区二区三区无人区| 一二三四在线观看日本资讯| 国产第一页第二页在线| 欧美日韩一区二区综合在线视频| 精品一区二区三区在线观看国产| 亚洲一区二区中文字幕av| 日韩欧美亚洲综合久久精品 | 岛国免费av在线观看| 日韩美女毛片啪啪响| 欧美亚洲综合日韩精品区| 日韩一区二区电影在线| 欧美亚洲清纯唯美另类| 国产成人福利视频在线观看| 国产熟女系列一区二区三区| 国产成年人在线免费观看| 日本免费一区二区三区等视频| av手机天堂网免费观看| 国产亚洲精品一区二区三在线观看| 人妻久久一区二区三区精品99| 日本精品免费专区在线观看| 四虎免费在线视频观看| 99热这里只有精品免费播放| 欧美亚洲国语精品一区二区| 麻豆深夜激情在线观看| 黄色国产传媒在线播放| 欧美日韩高清一区二区三区| 国产三级伦理在线播放| 久久精品免费激情视频| 全黄性性激高免费放视频| 亚洲一品道在线观看| 妇女人妻丰满少妇中文字幕| 成人18禁视频免费看|