zhongrj
2023-04-01 1622ea385c90a195d86bddf73222b2ba2c9746aa
警力资源样式调整和加载状态逻辑调整
5 files modified
62 ■■■■■ 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 50 ●●●● 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>
@@ -150,6 +151,7 @@
    data () {
        return {
            emptyText: '',
            navType: 0,
            equimentLoading: false,
            dialogTitle: '',
@@ -193,7 +195,7 @@
            equimentTableData: [],
            equimentPage: {
                total: 0,
                pageSize: 25,
                pageSize: 22,
                count: 0,
                currentPage: 1
            },
@@ -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) {
            this.equimentPage.currentPage = currentPage
            this.getEquipmentPaging({ type: this.navType })
        },
        // 获取设备分页数据
        getEquipmentPaging (params) {
            setTimeout(() => {
                this.equimentLoading = false
            }, 1000)
            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
            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 => {
                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,11 +341,13 @@
                        }
                    })
                    this.equimentPage.count = res.data.data.pages
                    this.equimentLoading = false
                } else {
                    this.equimentTableData = []
                    this.equimentPage.total = 0
                    this.equimentLoading = false
                }
            })
@@ -803,6 +823,8 @@
            :deep(.el-main) {
                padding: 0;
                width: 100%;
                overflow: hidden !important;
                ;
            }
        }