shuishen
2023-05-06 1829760cfffc5b5a2b59fe675a3d9489daa448d6
src/views/home/components/bottomContainer.vue
@@ -2,7 +2,7 @@
 * @Author: shuishen 1109946754@qq.com
 * @Date: 2023-01-13 15:52:59
 * @LastEditors: shuishen 1109946754@qq.com
 * @LastEditTime: 2023-05-02 17:17:32
 * @LastEditTime: 2023-05-06 21:50:44
 * @FilePath: \srs-police-affairs\src\views\home\components\bottomContainer.vue
 * @Description: 
 * 
@@ -32,41 +32,61 @@
                </div>
                <div class="timeSeclect" v-show="historytype">
                    <el-date-picker
                        v-show="timetype == 0"
                        v-model="currentWeekTime"
                        @change="datePickerChange"
                        type="week"
                        align="center"
                        format="yyyy 第 WW 周"
                        placeholder="选择周"
                        popper-class="date-week-style"
                    ></el-date-picker>
                    <el-date-picker
                        v-show="timetype == 1"
                        v-model="currentMonthTime"
                        @change="datePickerChange"
                        type="month"
                        align="center"
                        placeholder="选择月"
                        popper-class="date-mouth-style"
                    ></el-date-picker>
                    <el-date-picker
                        v-show="timetype == 2"
                        :clearable="false"
                        v-model="currentTime"
                        type="daterange"
                        align="center"
                        unlink-panels
                        range-separator="至"
                        start-placeholder="开始日期"
                        end-placeholder="结束日期"
                        @change="datePickerChange"
                        :picker-options="pickerOptions"
                        popper-class="date-day-style"
                    ></el-date-picker>
                    <div v-show="timetype == 0">
                        <el-date-picker
                            size="small"
                            v-model="currentWeekTime"
                            @change="datePickerChange"
                            type="week"
                            align="center"
                            format="yyyy 第 WW 周"
                            placeholder="选择周"
                            popper-class="date-week-style"
                        ></el-date-picker>
                    </div>
                    <div v-show="timetype == 1">
                        <el-date-picker
                            size="small"
                            v-model="currentMonthTime"
                            @change="datePickerChange"
                            type="month"
                            align="center"
                            placeholder="选择月"
                            popper-class="date-mouth-style"
                        ></el-date-picker>
                    </div>
                    <div v-show="timetype == 2">
                        <el-date-picker
                            size="small"
                            :clearable="false"
                            v-model="currentTime"
                            type="daterange"
                            align="center"
                            unlink-panels
                            range-separator="至"
                            start-placeholder="开始日期"
                            end-placeholder="结束日期"
                            @change="datePickerChange"
                            :picker-options="pickerOptions"
                            popper-class="date-day-style"
                        ></el-date-picker>
                    </div>
                    <div>
                        <el-select
                            style="flex: 1;"
                            size="small"
                            v-model="policeInforValue"
                            @change="policeTypeChange"
                            placeholder="请选择"
                        >
                            <el-option
                                v-for="item in policeInforOptions"
                                :key="item.value"
                                :label="item.label"
                                :value="item.value"
                            ></el-option>
                        </el-select>
                    </div>
                </div>
                <div class="history-tab">
@@ -317,7 +337,46 @@
            currentPage: 1,
            // table高度
            currentTableHeight: 0,
            policeStaionID: ''
            policeStaionID: '',
            policeInforValue: '',
            policeInforOptions: [
                {
                    value: '',
                    label: '全部'
                },
                {
                    value: '盗窃',
                    label: '盗窃'
                },
                {
                    value: '诈骗',
                    label: '诈骗'
                },
                {
                    value: '纠纷',
                    label: '纠纷'
                },
                {
                    value: '涉赌',
                    label: '涉赌'
                },
                {
                    value: '涉毒',
                    label: '涉毒'
                },
                {
                    value: '涉黄',
                    label: '涉黄'
                },
                {
                    value: '求救',
                    label: '求救'
                },
                {
                    value: '其他',
                    label: '其他'
                }
            ],
        }
    },
@@ -582,9 +641,30 @@
            })
        },
        policeTypeChange () {
            this.currentPage = 1
            if (this.timetype == 0) {
                this.getAlarmList({ type: this.timetype, time: this.dateFormat(this.currentWeekTime), current: this.currentPage })
            } else if (this.timetype == 1) {
                this.getAlarmList({ type: this.timetype, time: this.dateFormat(this.currentMonthTime), current: this.currentPage })
            } else {
                const date = this.currentTime.map(item => {
                    return this.dateFormat(item)
                })
                this.getAlarmList({ start: date[0], end: date[1], current: this.currentPage })
            }
        },
        // 获取历史接警记录
        getAlarmList (params) {
            getAlarmList({ ...params, size: this.pagesize, jjdwbh: this.policeStaionID != '' ? this.policeStaionID : this.userInfo.dept_id }).then(res => {
            getAlarmList({ ...params, size: this.pagesize, jjdwbh: this.policeStaionID != '' ? this.policeStaionID : this.userInfo.dept_id, bjlx: this.policeInforValue }).then(res => {
                this.pagesCount = res.data.data.pages
                this.policeSituationHistoryArr = []
@@ -852,7 +932,7 @@
        .timeTab {
            position: absolute;
            top: 22px;
            right: 400px;
            right: 670px;
            display: flex;
            border-radius: 6px;
            overflow: hidden;
@@ -876,11 +956,20 @@
        }
        .timeSeclect {
            width: 250px;
            width: 520px;
            height: 30px;
            position: absolute;
            top: 12px;
            top: 20px;
            right: 130px;
            display: flex;
            align-items: center;
            & > div {
                margin: 0 5px;
                flex: 1;
                display: flex;
                align-items: center;
            }
        }
        .history-tab {