zhongrj
2023-04-01 1622ea385c90a195d86bddf73222b2ba2c9746aa
警力资源样式调整和加载状态逻辑调整
5 files modified
114 ■■■■■ changed files
public/depend/element-ui.css 2 ●●● patch | view | raw | blame | history
public/static/config.js 2 ●●● patch | view | raw | blame | history
src/styles/media/index.scss 4 ●●●● patch | view | raw | blame | history
src/views/home/components/leftContainer.vue 4 ●●●● patch | view | raw | blame | history
src/views/police/index.vue 102 ●●●●● patch | view | raw | blame | history
public/depend/element-ui.css
@@ -8864,7 +8864,7 @@
}
.el-card__body,
.el-main {
  padding: 20px;
  padding: 0px;
}
.el-rate {
  height: 20px;
public/static/config.js
@@ -24,7 +24,7 @@
    // 视频监控平台
    // 本地开发
    VUE_APP_OUTER_NET_VIDEO: 'http://192.168.0.126:18185/api',
    VUE_APP_OUTER_NET_VIDEO: 'http://192.168.0.100:18185/api',
    // VUE_APP_OUTER_NET_VIDEO: 'http://192.168.0.129:18185/api',
    // 内网部署
    VUE_APP_INTRANET_VIDEO: 'http://10.141.11.11:18185/api',
src/styles/media/index.scss
@@ -930,7 +930,7 @@
                        }
                        .list-show {
                            height: calc(100% - countSizeVh(50));
                            // height: calc(100% - countSizeVh(50));
                            .search-box {
                                padding: countSizeVh(6) countSizeVw(6, 1920);
@@ -951,7 +951,7 @@
                                }
                                .pages {
                                    height: countSizeVh(40);
                                    height: countSizeVh(80);
                                    &>div {
                                        &>button {
src/views/home/components/leftContainer.vue
@@ -384,7 +384,7 @@
            if (xDate.length == 0) {
                options = {
                    title: {
                        text: '暂无数据',
                        text: '暂无数据1',
                        x: 'center',
                        y: 'center',
                        textStyle: {
@@ -883,7 +883,7 @@
            if (dataArr.length == 0) {
                options = {
                    title: {
                        text: '暂无数据',
                        text: '暂无数据1',
                        x: 'center',
                        y: 'center',
                        textStyle: {
src/views/police/index.vue
@@ -13,8 +13,8 @@
    <div class="police-page container">
        <div v-show="boxShow" class="container-content">
            <el-main v-loading="equimentLoading" element-loading-text="拼命加载中" element-loading-spinner="el-icon-loading"
                element-loading-background="rgba(0, 0, 0, 0.2)">
                <div class="switch-box" v-show="!detailFlag && !equimentLoading">
                element-loading-background="rgba(0, 0, 0, 0.2)" style="overflow: hidden;padding: 0px;">
                <div class="switch-box" v-show="!detailFlag">
                    资源类别:
                    <el-select v-model="typeValue" @change="navClick" placeholder="请选择" class="type-select-css">
                        <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value"
@@ -22,7 +22,7 @@
                    </el-select>
                </div>
                <div class="list-show" v-if="!detailFlag && !equimentLoading">
                <div class="list-show" v-if="!detailFlag">
                    <div class="search-box">
                        资源名称:
                        <input v-model="searchValue" @input="searchChange" type="text" placeholder="请输入…" />
@@ -42,6 +42,7 @@
                                    <div class="state-box" :class="{ online: scope.row.status == '1' }"></div>
                                </template>
                            </el-table-column>
                            <div slot="empty" style="text-align: left;">{{ emptyText }}</div>
                            <el-table-column label="操作" align="center"
                                :min-width="typeValue == 0 || typeValue == 2 ? '30%' : '18%'">
                                <template slot-scope="scope">
@@ -59,7 +60,7 @@
                            </el-table-column>
                        </el-table>
                        <div class="pages all-pagination-sty" ref="tablePagination">
                        <div class="pages all-pagination-sty" ref="tablePagination" style="padding-top:-15px">
                            <el-pagination background layout="prev, pager, next" :page-size="equimentPage.pageSize"
                                :page-count="equimentPage.count" :pager-count="4" :current-page="equimentPage.currentPage"
                                @current-change="handleCurrentChange"></el-pagination>
@@ -148,8 +149,9 @@
export default {
    inject: ['userInfo'],
    data () {
    data() {
        return {
            emptyText: '',
            navType: 0,
            equimentLoading: false,
            dialogTitle: '',
@@ -193,7 +195,7 @@
            equimentTableData: [],
            equimentPage: {
                total: 0,
                pageSize: 25,
                pageSize: 22,
                count: 0,
                currentPage: 1
            },
@@ -204,11 +206,11 @@
        }
    },
    created () {
    created() {
        window.addEventListener('resize', this.setTableHeight)
    },
    mounted () {
    mounted() {
        this.$parent.$parent.resize('400px', true)
        this.navClick()
@@ -222,7 +224,7 @@
    methods: {
        // 搜索框改变事件
        searchChange () {
        searchChange() {
            this.detailFlag = false
            this.$EventBus.$emit('mapClearLayer', {
@@ -231,6 +233,8 @@
            })
            this.equimentPage.currentPage = 1
            this.equimentPage.count = 0
            // this.equimentTableData = []
            this.$EventBus.$emit('mapClearLayer', {
                layerName: 'carLayers',
@@ -241,26 +245,39 @@
                layerName: 'policeMonitoringLayers',
                type: 'VectorLayer'
            })
            this.equimentLoading = true
            // 查询分页数据
            this.getEquipmentPaging({ type: this.navType })
        },
        // 设备分页处理
        handleCurrentChange (currentPage) {
        handleCurrentChange(currentPage) {
            this.equimentPage.currentPage = currentPage
            this.getEquipmentPaging({ type: this.navType })
        },
        // 获取设备分页数据
        getEquipmentPaging (params) {
            setTimeout(() => {
                this.equimentLoading = false
            }, 1000)
        getEquipmentPaging(params) {
            this.equimentTableData = []
            this.equimentLoading = true
            this.emptyText = ""
            getEquipmentPaging({ page: this.equimentPage.currentPage, count: this.equimentPage.pageSize, ...params, query: this.searchValue, dwbh: this.userInfo.dept_id }).then(res => {
                this.equimentTableData = []
                this.equimentPage.count = 0
                var total = res.data.data.total
                console.log(total, 6666)
                if (total == 0) {
                    if (this.navType == 0) {
                        this.emptyText = "暂无警车数据"
                    }
                    if (this.navType == 1) {
                        this.emptyText = "暂无摄像头数据"
                    }
                    if (this.navType == 2) {
                        this.emptyText = "暂无手台数据"
                    }
                    if (this.navType == 3) {
                        this.emptyText = "暂无执法记录仪数据"
                    }
                }
                if (res.data.data.list.length > 0) {
                    this.equimentTableData = res.data.data.list.map(item => {
                        let newName = ''
@@ -301,6 +318,7 @@
                                incident: this.siteClick
                            })
                        } else if (this.navType == 2) {
                            this.$EventBus.$emit('layerPointAdd', {
                                layerName: 'policeMonitoringLayers',
                                type: 'billboard',
@@ -323,18 +341,20 @@
                        }
                    })
                    this.equimentPage.count = res.data.data.pages
                    this.equimentLoading = false
                } else {
                    this.equimentTableData = []
                    this.equimentPage.total = 0
                    this.equimentLoading = false
                }
            })
        },
        // 类别切换
        navClick (type) {
        navClick(type) {
            if (type && type == this.navType) return
            this.detailFlag = false
@@ -366,7 +386,7 @@
        },
        // 表格行点击查看定位
        rowClick (row) {
        rowClick(row) {
            if (row.lng == 0 || row.lat == 0) {
                this.$message.error('暂无位置信息!')
@@ -381,13 +401,13 @@
        },
        // 表格行点击查看轨迹
        equipmentTrack (row) {
        equipmentTrack(row) {
            this.detailFlag = true
            this.currentSelectEquipment = row
        },
        async play (row) {
        async play(row) {
            this.videoPlayShow = true
            if (this.flvPlayer != null) {
@@ -430,7 +450,7 @@
            }
        },
        async getDevices (channelId) {
        async getDevices(channelId) {
            let flvAddress = ''
            await getDevices(channelId).then(res => {
                if ('data' in res.data) {
@@ -442,17 +462,17 @@
            return flvAddress
        },
        siteClick (e) {
        siteClick(e) {
            this.play(e.overlay.attrParams)
        },
        dialogBeforeClose () {
        dialogBeforeClose() {
            this.$refs.videoElement.pause()
            this.dialogVisible = false
        },
        // 轨迹返回
        goBack () {
        goBack() {
            this.detailFlag = !this.detailFlag
            this.trackTime = []
@@ -467,7 +487,7 @@
        },
        // 查看轨迹
        async lookTrack () {
        async lookTrack() {
            global.viewer.scene.globe.depthTestAgainstTerrain = false
            if (this.trackTime.length == 0) {
@@ -561,20 +581,20 @@
        },
        // 处理时间补零操作
        disposeTime (s) {
        disposeTime(s) {
            return s < 10 ? '0' + s : s
        },
        setTableHeight () {
        setTableHeight() {
            this.currentTableHeight = this.$refs.tableBox.offsetHeight - this.$refs.tablePagination.offsetHeight
        },
        // 大小重置
        boxResize (val) {
        boxResize(val) {
            this.boxShow = val
        },
        async getHistoricalTrack (params) {
        async getHistoricalTrack(params) {
            let positionArr = []
            await getHistoricalTrack(params).then(res => {
@@ -584,13 +604,13 @@
        },
        // 大搜
        getSearchExtensively (ak, region, query) {
        getSearchExtensively(ak, region, query) {
            getSearchExtensively(ak, region, query).then(res => {
                this.searchExtensivelyArray = res.data.result
            })
        },
        searchExtensivelyClick () {
        searchExtensivelyClick() {
            this.getSearchExtensively('ebf48ecaa1fd436fa3d40c4600aa051f', '361100', this.searchExtensivelyValue)
            this.searchExtensivelyValBoxShow = false
            if (this.searchExtensivelyArray.length > 0) {
@@ -617,7 +637,7 @@
            }
        },
        searchExtensivelyChange () {
        searchExtensivelyChange() {
            if (this.searchExtensivelyValue == '') {
                this.searchExtensivelyValBoxShow = false
                this.isShowClearBtn = false
@@ -633,7 +653,7 @@
            })
        },
        searchExtensivelyVlaClick (item) {
        searchExtensivelyVlaClick(item) {
            this.searchExtensivelyValBoxShow = false
            this.searchExtensivelyValue = item.name
            this.$EventBus.$emit('toPosition', {
@@ -667,18 +687,18 @@
            })
        },
        searchExtensivelyFocus () {
        searchExtensivelyFocus() {
            this.searchExtensivelyValBoxShow = true
            this.getSearchExtensively('ebf48ecaa1fd436fa3d40c4600aa051f', '361100', this.searchExtensivelyValue)
        },
        clearSearchValue () {
        clearSearchValue() {
            this.searchExtensivelyValue = ''
            this.searchExtensivelyChange()
        }
    },
    destroyed () {
    destroyed() {
        this.$EventBus.$emit('mapRemoveLayer', {
            layerName: 'carLayers',
            type: 'VectorLayer'
@@ -803,6 +823,8 @@
            :deep(.el-main) {
                padding: 0;
                width: 100%;
                overflow: hidden !important;
                ;
            }
        }