1
guanqb
2022-12-29 03900d40ba75d2edc3dab260e37b3b80bc448747
1
7 files modified
1119 ■■■■■ changed files
src/api/activity/index.js 18 ●●●● patch | view | raw | blame | history
src/api/video/index.js 10 ●●●● patch | view | raw | blame | history
src/router/axios.js 150 ●●●● patch | view | raw | blame | history
src/views/house/index.vue 342 ●●●● patch | view | raw | blame | history
src/views/video/list.vue 6 ●●●● patch | view | raw | blame | history
src/views/video/region.vue 307 ●●●● patch | view | raw | blame | history
vue.config.js 286 ●●●● patch | view | raw | blame | history
src/api/activity/index.js
@@ -8,7 +8,7 @@
 */
export const getSecurityList = (current, size, type, name, startTime, endTime) => {
    return request({
        url: `/security/security/page`,
        url: `/api/security/security/page`,
        method: 'get',
        params: {
            current,
@@ -28,7 +28,7 @@
 */
export const getCarList = (params) => {
    return request({
        url: `/policecar/policecar/all`,
        url: `/api/policecar/policecar/all`,
        method: 'get',
        params: params
    })
@@ -41,7 +41,7 @@
 */
export const getPoliceList = (params) => {
    return request({
        url: `/policeman/policeman/all`,
        url: `/api/policeman/policeman/all`,
        method: 'get',
        params: params
    })
@@ -57,7 +57,7 @@
 */
export const addCarAndRange = (carId, position, securityId, type) => {
    return request({
        url: `/securityManageCar/securityManageCar/save`,
        url: `/api/securityManageCar/securityManageCar/save`,
        method: 'post',
        params: {
            carId,
@@ -76,7 +76,7 @@
 */
export const updateActivityCar = (id, carId) => {
    return request({
        url: `/securityManageCar/securityManageCar/update`,
        url: `/api/securityManageCar/securityManageCar/update`,
        method: 'post',
        params: {
            id,
@@ -95,7 +95,7 @@
 */
export const addActivityPolice = (policemanId, position, securityId, type) => {
    return request({
        url: `/securityManage/securityManage/save`,
        url: `/api/securityManage/securityManage/save`,
        method: 'post',
        params: {
            policemanId,
@@ -114,7 +114,7 @@
 */
export const updateActivityPolice = (id, policemanId) => {
    return request({
        url: `/securityManage/securityManage/update`,
        url: `/api/securityManage/securityManage/update`,
        method: 'post',
        params: {
            id,
@@ -130,7 +130,7 @@
 */
export const getSecurityPoliceList = (securityId) => {
    return request({
        url: `/securityManage/securityManage/all`,
        url: `/api/securityManage/securityManage/all`,
        method: 'get',
        params: {
            securityId
@@ -146,7 +146,7 @@
 */
export const getSecurityCarList = (securityId) => {
    return request({
        url: `/securityManageCar/securityManageCar/all`,
        url: `/api/securityManageCar/securityManageCar/all`,
        method: 'get',
        params: {
            securityId
src/api/video/index.js
@@ -20,7 +20,7 @@
 */
export const getVideoList = (page, count, query, params = {}) => {
    return request({
        url: '/device/query/devices/36110000002009999000/channels',
        url: '/device/query/devices/34020000002000000003/channels',
        method: 'get',
        requestBaseUrl: 'outside',
        params: {
@@ -73,7 +73,7 @@
 */
export const updateRegionSaveList = (type, positions, name) => {
    return request({
        url: '/range/range/updatee',
        url: '/api/range/range/updatee',
        method: 'post',
        params: {
            type,
@@ -91,7 +91,7 @@
 */
export const insertRegionSaveList = (type, positions, name, patrol) => {
    return request({
        url: '/range/range/insertes',
        url: '/api/range/range/insertes',
        method: 'post',
        params: {
            type,
@@ -109,7 +109,7 @@
 */
export const getRegionSaveList = (current, size, name) => {
    return request({
        url: '/range/range/page',
        url: '/api/range/range/page',
        method: 'get',
        params: {
            current,
@@ -125,7 +125,7 @@
 */
export const deleteRegionSaveList = (ids) => {
    return request({
        url: '/range/range/remove',
        url: '/api/range/range/remove',
        method: 'post',
        params: {
            ids
src/router/axios.js
@@ -13,104 +13,104 @@
 * isSerialize是否开启form表单提交
 * isToken是否需要token
 */
import axios from "axios";
import router from "@/router/page/index.js";
import { Message } from "element-ui";
import axios from "axios"
import router from "@/router/page/index.js"
import { Message } from "element-ui"
// 获取公共配置域名
import {Base64} from 'js-base64';
import { Base64 } from 'js-base64'
import * as auth from '@/utils/auth'
// 调用后台管理的
const service = axios.create({
  // baseURL: 'http://36.14.255.242:18080/api',
  // baseURL: 'http://192.168.0.102:1888/api',
  // baseURL: 'http://192.168.0.105:18080/api',
  // baseURL: 'http://192.168.0.115:82',
  // baseURL: 'http://192.168.0.112:18080',
  // baseURL: 'http://192.168.0.115:1888/api',
    // baseURL: 'http://36.14.255.242:18080/api',
    // baseURL: 'http://192.168.0.102:1888/api',
    // baseURL: 'http://192.168.0.105:18080/api',
    // baseURL: 'http://192.168.0.115:82',
    // baseURL: 'http://192.168.0.112:18080',
    // baseURL: 'http://192.168.0.115:1888/api',
  // baseURL: 'http://192.168.0.115:82',
  // baseURL: 'http://192.168.0.106:1888/api',
    // baseURL: 'http://192.168.0.125:82',
    // baseURL: 'http://192.168.0.106:1888/api',
  // 内网部署地址
  // baseURL: 'http://10.141.11.11:82',
  timeout: 600000, // request timeout
});
    // 内网部署地址
    // baseURL: 'http://10.141.11.11:82',
    timeout: 600000, // request timeout
})
// 返回其他状态码
service.defaults.validateStatus = function (status) {
  return status >= 200 && status <= 500;
};
    return status >= 200 && status <= 500
}
// 跨域请求,允许保存cookie
// service.defaults.withCredentials = true
// http request拦截
service.interceptors.request.use(
  (config) => {
    // 调用监控平台的
    if (config.requestBaseUrl == "outside") {
      // config.baseURL = 'http://192.168.0.115:1888/api'
      // config.baseURL = 'http://192.168.0.105:80/api'
      // config.baseURL = 'http://192.168.0.115:18080/api'
      // 内网部署地址
      // config.baseURL = 'http://10.141.11.11:18185/api'
      config.baseURL = "http://192.168.0.115:18185/api";
      // config.baseURL = 'http://192.168.0.106:1888/api'
    } else if (config.requestBaseUrl == "fengt") {
      config.baseURL = "http://10.141.11.11:18080";
    }
    (config) => {
        // 调用监控平台的
        if (config.requestBaseUrl == "outside") {
            // config.baseURL = 'http://192.168.0.115:1888/api'
            // config.baseURL = 'http://192.168.0.105:80/api'
            // config.baseURL = 'http://192.168.0.115:18080/api'
            // 内网部署地址
            // config.baseURL = 'http://10.141.11.11:18185/api'
            config.baseURL = "http://192.168.0.109:18080/api"
            // config.baseURL = 'http://192.168.0.106:1888/api'
        } else if (config.requestBaseUrl == "fengt") {
            config.baseURL = "http://10.141.11.11:18080"
        }
    //headers判断是否需要
    const authorization = config.authorization === false;
    if (!authorization) {
      config.headers["Authorization"] = `Basic ${Base64.encode("saber:saber_secret")}`;
    }
    //让每个请求携带token
    const meta = config.meta || {};
    const isToken = meta.isToken === false;
    if (auth.getToken() && !isToken) {
      config.headers['Blade-Auth'] = "bearer " + auth.getToken();
    }
    //headers中配置text请求
    if (config.text === true) {
      config.headers["Content-Type"] = "text/plain";
    }
        //headers判断是否需要
        const authorization = config.authorization === false
        if (!authorization) {
            config.headers["Authorization"] = `Basic ${Base64.encode("saber:saber_secret")}`
        }
        //让每个请求携带token
        const meta = config.meta || {}
        const isToken = meta.isToken === false
        if (auth.getToken() && !isToken) {
            config.headers['Blade-Auth'] = "bearer " + auth.getToken()
        }
        //headers中配置text请求
        if (config.text === true) {
            config.headers["Content-Type"] = "text/plain"
        }
    // const token = auth.getToken()
        // const token = auth.getToken()
    // 添加token
    // token && (config.headers.token = token)
        // 添加token
        // token && (config.headers.token = token)
    return config;
  },
  (error) => {
    return Promise.reject(error);
  }
);
        return config
    },
    (error) => {
        return Promise.reject(error)
    }
)
// http response 拦截
service.interceptors.response.use(
  (res) => {
    const code = res.data.code;
    if (code==401 || code == 403 || res.data.data == "token 验证失败!") {
      // sessionStorage.removeItem('token')
      router.push("/login");
    } else {
      return res;
    }
  },
  (error) => {
    Message({
      message: error.message,
      type: "error",
      duration: 5 * 1000,
    });
// service.interceptors.response.use(
//     (res) => {
//         const code = res.data.code
//         if (code == 401 || code == 403 || res.data.data == "token 验证失败!") {
//             // sessionStorage.removeItem('token')
//             router.push("/login")
//         } else {
//             return res
//         }
//     },
//     (error) => {
//         Message({
//             message: error.message,
//             type: "error",
//             duration: 5 * 1000,
//         })
    return Promise.reject(new Error(error));
  }
);
//         return Promise.reject(new Error(error))
//     }
// )
export default service;
export default service
src/views/house/index.vue
@@ -16,27 +16,51 @@
                <!-- <input v-model="searchValue" @input="searchChange" type="text" placeholder="请输入搜索条件" />
                <button @click="searchClick" class="el-icon-search"></button>-->
                <el-popover ref="popover" placement="bottom" trigger="click" :visible-arrow="false"
                    popper-class="tree-search-popup">
                <el-popover
                    ref="popover"
                    placement="bottom"
                    trigger="click"
                    :visible-arrow="false"
                    popper-class="tree-search-popup"
                >
                    <el-input placeholder="请输入搜索条件" v-model="filterText"></el-input>
                    <el-tree style="width: 360px; height: 400px; overflow: auto;" class="select-tree-box"
                        :data="testData" :props="defaultProps" ref="popupTree" @current-change="currentChangeHandle"
                        :default-expand-all="defaultExpandAll" :accordion="accordion"
                        :highlight-current="highlightCurrent" :expand-on-click-node="true" check-strictly
                        :filter-node-method="filterNode"></el-tree>
                    <el-tree
                        style="width: 360px; height: 400px; overflow: auto;"
                        class="select-tree-box"
                        :data="testData"
                        :props="defaultProps"
                        ref="popupTree"
                        @current-change="currentChangeHandle"
                        :default-expand-all="defaultExpandAll"
                        :accordion="accordion"
                        :highlight-current="highlightCurrent"
                        :expand-on-click-node="true"
                        check-strictly
                        :filter-node-method="filterNode"
                    ></el-tree>
                </el-popover>
                <el-input slot="reference" v-model="prop" v-popover:popover :readonly="true" placeholder="请输入搜索条件"
                    style="cursor: pointer;"></el-input>
                <el-input
                    slot="reference"
                    v-model="prop"
                    v-popover:popover
                    :readonly="true"
                    placeholder="请输入搜索条件"
                    style="cursor: pointer;"
                ></el-input>
            </div>
            <div v-show="searchValBoxShow" class="search-val-box">
                <div>
                    <div @click="searchVlaClick(item)" v-for="(item, index) in searchArray" :key="index">
                    <div
                        @click="searchVlaClick(item)"
                        v-for="(item, index) in searchArray"
                        :key="index"
                    >
                        {{
        item.name
}}
                        item.name
                        }}
                    </div>
                </div>
            </div>
@@ -71,17 +95,48 @@
                </div>
                <div class="nav-tab">
                    <div class="nav" :class="navType == 0 ? 'choosed' : ''" @click="navClick" data-type="0">基本信息</div>
                    <div class="nav" :class="navType == 1 ? 'choosed' : ''" @click="navClick" data-type="1">警务信息</div>
                    <div class="nav" :class="navType == 2 ? 'choosed' : ''" @click="navClick" data-type="2">预警信息</div>
                    <div
                        class="nav"
                        :class="navType == 0 ? 'choosed' : ''"
                        @click="navClick"
                        data-type="0"
                    >基本信息</div>
                    <div
                        class="nav"
                        :class="navType == 1 ? 'choosed' : ''"
                        @click="navClick"
                        data-type="1"
                    >警务信息</div>
                    <div
                        class="nav"
                        :class="navType == 2 ? 'choosed' : ''"
                        @click="navClick"
                        data-type="2"
                    >预警信息</div>
                </div>
                <div class="base-info" v-show="navType == 0">
                    <div class="sub-nav-list">
                        <div class="sub-nav" :class="{ on: subNavType == 1 }" @click="subNavType = 1">楼栋</div>
                        <div class="sub-nav" :class="{ on: subNavType == 2 }" @click="subNavType = 2">出入口</div>
                        <div class="sub-nav" :class="{ on: subNavType == 3 }" @click="subNavType = 3">停车场</div>
                        <div class="sub-nav" :class="{ on: subNavType == 4 }" @click="subNavType = 4">商业</div>
                        <div
                            class="sub-nav"
                            :class="{ on: subNavType == 1 }"
                            @click="subNavType = 1"
                        >楼栋</div>
                        <div
                            class="sub-nav"
                            :class="{ on: subNavType == 2 }"
                            @click="subNavType = 2"
                        >出入口</div>
                        <div
                            class="sub-nav"
                            :class="{ on: subNavType == 3 }"
                            @click="subNavType = 3"
                        >停车场</div>
                        <div
                            class="sub-nav"
                            :class="{ on: subNavType == 4 }"
                            @click="subNavType = 4"
                        >商业</div>
                    </div>
                    <div class="floor-content" v-show="subNavType == 1">
@@ -90,20 +145,35 @@
                                <i class="el-icon-caret-left"></i>
                            </div>
                            <div class="build-outBox" ref="BuildOutBox">
                                <div class="build-box" style="left: 0px;"
                                    :style="{ width: `calc(${Math.ceil(buildingList.length / 10)} * (356 / 1920) * 100vw` }">
                                    <div class="ridgepole-list" v-for="index of Math.ceil(buildingList.length / 10)"
                                        :key="index">
                                        <div v-for="(item, index) in buildingList.slice((index - 1) * 10, index * 10)"
                                            :key="index" @click="buildingClick(item)"
                                            :class="{ on: buildingChoosed.name == item.name }" :title="item.name">{{
        item.name
}}</div>
                                <div
                                    class="build-box"
                                    style="left: 0px;"
                                    :style="{ width: `calc(${Math.ceil(buildingList.length / 10)} * (356 / 1920) * 100vw` }"
                                >
                                    <div
                                        class="ridgepole-list"
                                        v-for="index of Math.ceil(buildingList.length / 10)"
                                        :key="index"
                                    >
                                        <div
                                            v-for="(item, index) in buildingList.slice((index - 1) * 10, index * 10)"
                                            :key="index"
                                            @click="buildingClick(item)"
                                            :class="{ on: buildingChoosed.name == item.name }"
                                            :title="item.name"
                                        >
                                            {{
                                            item.name
                                            }}
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <div class="nextBtn rightBtn" @click="nextBtn">
                                <i v-show="buildingList.length > 10 && nextBtnShow" class="el-icon-caret-right"></i>
                                <i
                                    v-show="buildingList.length > 10 && nextBtnShow"
                                    class="el-icon-caret-right"
                                ></i>
                            </div>
                        </div>
@@ -184,9 +254,19 @@
                            <div class="condo">
                                <div class="type">选择单元</div>
                                <div class="type-select">
                                    <el-select size="small" v-model="unitValue" placeholder="请选择" @change="chooseUnit">
                                        <el-option v-for="item in unitOptions" :key="item.value" :label="item.label"
                                            :value="item.value" class="unit-option"></el-option>
                                    <el-select
                                        size="small"
                                        v-model="unitValue"
                                        placeholder="请选择"
                                        @change="chooseUnit"
                                    >
                                        <el-option
                                            v-for="item in unitOptions"
                                            :key="item.value"
                                            :label="item.label"
                                            :value="item.value"
                                            class="unit-option"
                                        ></el-option>
                                    </el-select>
                                </div>
                            </div>
@@ -195,17 +275,20 @@
                                <div class="type-val">
                                    <div>
                                        <span
                                            style="width: 10px; height: 10px; background: #0E88FF; border-radius: 50%;"></span>
                                            style="width: 10px; height: 10px; background: #0E88FF; border-radius: 50%;"
                                        ></span>
                                        流动人口
                                    </div>
                                    <div>
                                        <span
                                            style="width: 10px; height: 10px; background: #FF796C; border-radius: 50%;"></span>
                                            style="width: 10px; height: 10px; background: #FF796C; border-radius: 50%;"
                                        ></span>
                                        重点人员
                                    </div>
                                    <div>
                                        <span
                                            style="width: 10px; height: 10px; background: #FEAC04; border-radius: 50%;"></span>
                                            style="width: 10px; height: 10px; background: #FEAC04; border-radius: 50%;"
                                        ></span>
                                        境外人口
                                    </div>
                                </div>
@@ -237,28 +320,42 @@
                                </div>
                                <div class="floor-box">
                                    <div class="floor-num" style="left: 0">
                                        <div :class="{ on: floorsType == index }" @click="floorsType = index"
                                            v-for="index in Math.ceil(unitHouseChoosed.length / 5)" :key="index">
                                        <div
                                            :class="{ on: floorsType == index }"
                                            @click="floorsType = index"
                                            v-for="index in Math.ceil(unitHouseChoosed.length / 5)"
                                            :key="index"
                                        >
                                            {{ unitHouseChoosed[index * 5 - 5].floor_num }}-{{ unitHouseChoosed[index *
        5
        - 1] ? unitHouseChoosed[index * 5
            - 1].floor_num : unitHouseChoosed[unitHouseChoosed.length - 1].floor_num
}}层</div>
                                            5
                                            - 1] ? unitHouseChoosed[index * 5
                                            - 1].floor_num : unitHouseChoosed[unitHouseChoosed.length - 1].floor_num
                                            }}层
                                        </div>
                                    </div>
                                </div>
                                <div @click="nextFloorBtn" class="floorBtn rightFloorBtn" v-show="nextFloorShow">
                                <div
                                    @click="nextFloorBtn"
                                    class="floorBtn rightFloorBtn"
                                    v-show="nextFloorShow"
                                >
                                    <i class="el-icon-caret-right"></i>
                                </div>
                            </div>
                            <div class="floor-detail">
                                <div v-for="(item, index) in unitHouseChoosed.slice((floorsType - 1) * 5, floorsType * 5)"
                                    :key="index">
                                <div
                                    v-for="(item, index) in unitHouseChoosed.slice((floorsType - 1) * 5, floorsType * 5)"
                                    :key="index"
                                >
                                    <div class="title">{{ item.floor_num }}层:</div>
                                    <div class="detail">
                                        <div v-for="(value, index) in item.floor_house" :key="index"
                                        <div
                                            v-for="(value, index) in item.floor_house"
                                            :key="index"
                                            @click="residentDetailsClick(value)"
                                            :class="[{ 'chuzu': value.houseType == '出租' }, { 'zizhu': value.houseType == '自住' }, { 'kongzhi': value.houseType == '空置' }, { 'shangye': value.houseType == '商业' }]">
                                            :class="[{ 'chuzu': value.houseType == '出租' }, { 'zizhu': value.houseType == '自住' }, { 'kongzhi': value.houseType == '空置' }, { 'shangye': value.houseType == '商业' }]"
                                        >
                                            {{ value.house_num }}
                                            <div class="flow"></div>
                                            <div class="focus"></div>
@@ -270,30 +367,39 @@
                        </div>
                    </div>
                    <div class="come-out-content" v-show="subNavType == 2">
                        <el-table :data="comeoutArr" style="width: 100%"
                        <el-table
                            :data="comeoutArr"
                            style="width: 100%"
                            :header-cell-style="{ 'text-align': 'center', 'background-color': '#203c60', 'borderColor': '#324e75' }"
                            :cell-style="{ 'text-align': 'center', 'borderColor': '#324e75' }"
                            :row-class-name="tableRowClassName">
                            :row-class-name="tableRowClassName"
                        >
                            <el-table-column prop="name" label="名称" width="130"></el-table-column>
                            <el-table-column prop="position" label="位置" width="150"></el-table-column>
                            <el-table-column prop="type" label="类别" width="120"></el-table-column>
                        </el-table>
                    </div>
                    <div class="park-content" v-show="subNavType == 3">
                        <el-table :data="parkArr" style="width: 100%"
                        <el-table
                            :data="parkArr"
                            style="width: 100%"
                            :header-cell-style="{ 'text-align': 'center', 'background-color': '#203c60', 'borderColor': '#324e75' }"
                            :cell-style="{ 'text-align': 'center', 'borderColor': '#324e75' }"
                            :row-class-name="tableRowClassName">
                            :row-class-name="tableRowClassName"
                        >
                            <el-table-column prop="name" label="名称" width="130"></el-table-column>
                            <el-table-column prop="position" label="位置" width="150"></el-table-column>
                            <el-table-column prop="type" label="类别" width="120"></el-table-column>
                        </el-table>
                    </div>
                    <div class="business-content" v-show="subNavType == 4">
                        <el-table :data="businessArr" style="width: 100%"
                        <el-table
                            :data="businessArr"
                            style="width: 100%"
                            :header-cell-style="{ 'text-align': 'center', 'background-color': '#203c60', 'borderColor': '#324e75' }"
                            :cell-style="{ 'text-align': 'center', 'borderColor': '#324e75' }"
                            :row-class-name="tableRowClassName">
                            :row-class-name="tableRowClassName"
                        >
                            <el-table-column prop="name" label="名称" width="130"></el-table-column>
                            <el-table-column prop="position" label="位置" width="150"></el-table-column>
                            <el-table-column prop="type" label="类别" width="120"></el-table-column>
@@ -302,10 +408,14 @@
                </div>
                <div class="police-info" v-show="navType == 1">
                    <el-table :data="arr" style="width: 100%"
                    <el-table
                        :data="arr"
                        style="width: 100%"
                        :header-cell-style="{ 'text-align': 'center', 'background-color': '#203c60', 'borderColor': '#324e75' }"
                        :cell-style="{ 'text-align': 'center', 'borderColor': '#324e75' }"
                        :row-class-name="tableRowClassName" @row-click="clickData">
                        :row-class-name="tableRowClassName"
                        @row-click="clickData"
                    >
                        <el-table-column prop="name" label="名称" width="130"></el-table-column>
                        <el-table-column prop="time" label="时间" width="150"></el-table-column>
                        <el-table-column prop="type" label="类别" width="120"></el-table-column>
@@ -313,10 +423,14 @@
                </div>
                <div class="warning-info" v-show="navType == 2">
                    <el-table :data="warningArray" style="width: 100%"
                    <el-table
                        :data="warningArray"
                        style="width: 100%"
                        :header-cell-style="{ 'text-align': 'center', 'background-color': '#203c60', 'borderColor': '#324e75' }"
                        :cell-style="{ 'text-align': 'center', 'borderColor': '#324e75' }"
                        :row-class-name="tableRowClassName" @row-click="clickData">
                        :row-class-name="tableRowClassName"
                        @row-click="clickData"
                    >
                        <el-table-column prop="name" label="名称" width="130"></el-table-column>
                        <el-table-column prop="time" label="时间" width="150"></el-table-column>
                        <el-table-column prop="type" label="类别" width="120"></el-table-column>
@@ -326,18 +440,32 @@
        </div>
        <!-- <transition name="special-animal"></transition>-->
        <div class="search-content">
            <input v-model="searchExtensivelyValue" @input="searchExtensivelyChange" @focus="searchExtensivelyFocus"
                type="text" placeholder="请输入搜索条件" />
            <input
                v-model="searchExtensivelyValue"
                @input="searchExtensivelyChange"
                @focus="searchExtensivelyFocus"
                type="text"
                placeholder="请输入搜索条件"
            />
            <button @click="searchExtensivelyClick" class="el-icon-search"></button>
        </div>
        <div v-show="searchExtensivelyValBoxShow" class="searchExtensively-val-box">
            <div>
                <div @click="searchExtensivelyVlaClick(item)" v-for="(item, index) in searchExtensivelyArray"
                    :key="index">{{ item.name }}</div>
                <div
                    @click="searchExtensivelyVlaClick(item)"
                    v-for="(item, index) in searchExtensivelyArray"
                    :key="index"
                >{{ item.name }}</div>
            </div>
        </div>
        <el-dialog title="信息详情" :modal="true" :visible.sync="dialogVisible" :before-close="handleClose"
            :close-on-click-modal="true" class="police-affairs-details-box">
        <el-dialog
            title="信息详情"
            :modal="true"
            :visible.sync="dialogVisible"
            :before-close="handleClose"
            :close-on-click-modal="true"
            class="police-affairs-details-box"
        >
            <div class="item">
                <div>名称:</div>
                <div>{{ JWdetails.name }}</div>
@@ -372,12 +500,21 @@
            </div>
        </el-dialog>
        <el-dialog :title="residentDetailsTitle" :modal="true" :visible.sync="residentDetailsShow"
            :before-close="residentDetailsClose" :close-on-click-modal="true" class="resident-details-box" width="30%">
        <el-dialog
            :title="residentDetailsTitle"
            :modal="true"
            :visible.sync="residentDetailsShow"
            :before-close="residentDetailsClose"
            :close-on-click-modal="true"
            class="resident-details-box"
            width="30%"
        >
            <h3 style="text-align:left;margin:10px 0 10px 0">户主信息</h3>
            <el-table :data="houseDate.householdsDate"
            <el-table
                :data="houseDate.householdsDate"
                :header-cell-style="{ 'text-align': 'center', 'background-color': '#203c60', 'borderColor': '#324e75' }"
                :cell-style="{ 'text-align': 'center', 'borderColor': '#324e75' }">
                :cell-style="{ 'text-align': 'center', 'borderColor': '#324e75' }"
            >
                <el-table-column prop="name" label="姓名"></el-table-column>
                <el-table-column prop="peopleType" label="重点人员"></el-table-column>
                <el-table-column prop="nation" label="民族"></el-table-column>
@@ -945,7 +1082,7 @@
            border-radius: 10px;
            overflow: hidden;
            &>div {
            & > div {
                height: 100%;
                overflow-y: auto;
@@ -980,9 +1117,11 @@
                        left: 10px;
                        right: 10px;
                        bottom: 4px;
                        background: linear-gradient(135deg,
                                rgb(33 150 243 / 74%),
                                rgb(254 254 254 / 0%));
                        background: linear-gradient(
                            135deg,
                            rgb(33 150 243 / 74%),
                            rgb(254 254 254 / 0%)
                        );
                        z-index: -1;
                    }
                }
@@ -993,7 +1132,7 @@
                }
                .housing-introduce {
                    &>div {
                    & > div {
                        padding: 0 10px;
                        display: flex;
@@ -1056,7 +1195,7 @@
                    }
                }
                &>.floor-content {
                & > .floor-content {
                    .build-info {
                        display: flex;
                        position: relative;
@@ -1105,7 +1244,7 @@
                                    flex-wrap: wrap;
                                    width: 356px;
                                    &>div {
                                    & > div {
                                        display: flex;
                                        align-items: center;
                                        justify-content: center;
@@ -1134,7 +1273,7 @@
                        .content {
                            display: flex;
                            &>div {
                            & > div {
                                height: 26px;
                                line-height: 26px;
                                flex: 1;
@@ -1142,7 +1281,7 @@
                                justify-content: center;
                                border-right: 1px solid #50555f;
                                &>div:last-child {
                                & > div:last-child {
                                    margin-left: 14px;
                                    font-size: 18px;
                                    font-weight: bold;
@@ -1150,11 +1289,11 @@
                                }
                            }
                            &>div:first-child {
                            & > div:first-child {
                                width: 30%;
                            }
                            &>div:last-child {
                            & > div:last-child {
                                border: none;
                            }
                        }
@@ -1171,10 +1310,10 @@
                                display: flex;
                                justify-content: space-around;
                                &>div {
                                & > div {
                                    flex: 1;
                                    &>div:first-child {
                                    & > div:first-child {
                                        height: 30px;
                                        line-height: 30px;
                                        font-size: 18px;
@@ -1182,7 +1321,7 @@
                                        color: #499d99;
                                    }
                                    &>div:last-child {
                                    & > div:last-child {
                                        height: 26px;
                                        line-height: 26px;
                                    }
@@ -1196,8 +1335,8 @@
                            display: flex;
                            justify-content: space-around;
                            &>div {
                                &>div:first-child {
                            & > div {
                                & > div:first-child {
                                    height: 30px;
                                    line-height: 30px;
                                    font-size: 18px;
@@ -1225,7 +1364,6 @@
                    }
                    .house-element-info {
                        .condo,
                        .legend {
                            display: flex;
@@ -1248,12 +1386,12 @@
                                display: flex;
                                flex: 1;
                                &>div {
                                & > div {
                                    flex: 1;
                                    display: flex;
                                    align-items: center;
                                    &>span {
                                    & > span {
                                        margin: 0 10px;
                                        width: 14px;
                                        height: 8px;
@@ -1320,7 +1458,7 @@
                                    left: 0;
                                    transition: all 1s;
                                    &>div {
                                    & > div {
                                        margin: 0 4px;
                                        display: flex;
                                        justify-content: center;
@@ -1332,7 +1470,7 @@
                                        cursor: default;
                                    }
                                    &>.on {
                                    & > .on {
                                        border: 1px solid orange;
                                        color: orange;
                                    }
@@ -1344,7 +1482,7 @@
                            margin-top: 14px;
                            height: 220px;
                            &>div {
                            & > div {
                                margin: 8px;
                                height: 36px;
                                line-height: 36px;
@@ -1358,7 +1496,7 @@
                                    flex: 1;
                                    display: flex;
                                    &>div {
                                    & > div {
                                        margin: 0 4px;
                                        position: relative;
                                        width: 68px;
@@ -1382,29 +1520,33 @@
                                        }
                                        .focus {
                                            top: calc((100% - 18px) / 4 * 2 + 6px);
                                            top: calc(
                                                (100% - 18px) / 4 * 2 + 6px
                                            );
                                            background: rgb(255, 121, 108);
                                        }
                                        .warning {
                                            top: calc((100% - 18px) / 4 * 3 + 12px);
                                            top: calc(
                                                (100% - 18px) / 4 * 3 + 12px
                                            );
                                            background: rgb(254, 172, 4);
                                        }
                                    }
                                    &>.chuzu {
                                    & > .chuzu {
                                        border: 1px solid #3a8b3a;
                                    }
                                    &>.zizhu {
                                    & > .zizhu {
                                        border: 1px solid #2c77bb;
                                    }
                                    &>.kongzhi {
                                    & > .kongzhi {
                                        border: 1px solid #5c6169;
                                    }
                                    &>.shangye {
                                    & > .shangye {
                                        border: 1px solid #cc9456;
                                    }
                                }
@@ -1491,7 +1633,7 @@
        border-radius: 10px;
        overflow: hidden;
        &>div {
        & > div {
            height: 100%;
            overflow-y: auto;
@@ -1521,9 +1663,11 @@
    height: 100%;
    overflow: hidden;
    border-radius: 2px;
    background: linear-gradient(135deg,
            rgba(252, 252, 252, 0.108),
            rgb(254, 254, 254));
    background: linear-gradient(
        135deg,
        rgba(252, 252, 252, 0.108),
        rgb(254, 254, 254)
    );
    animation: prog 3s ease infinite;
}
src/views/video/list.vue
@@ -150,7 +150,6 @@
    mounted () {
        this.$parent.$parent.$parent.resize('400px', true)
        graphicLayer = new EntityDraw()
    },
    methods: {
@@ -291,6 +290,9 @@
        },
        draw (type) {
            if (graphicLayer == null) graphicLayer = new EntityDraw()
            this.saveFlag = true
            if (type == 'polyline') {
                this.inputpopup = true
@@ -300,6 +302,8 @@
                this.drawType = 2
            }
            const that = this
            graphicLayer.activate(type, (lastEventData) => {
                console.log('数据更新lastEventData', lastEventData)
                this.drawInfo = lastEventData
src/views/video/region.vue
@@ -14,22 +14,33 @@
        <div class="region-left-container">
            <div v-show="boxShow" class="container-content">
                <div class="search-box">
                    <input v-model="searchValue" @input="searchChange" type="text" placeholder="请输入搜索条件" />
                    <input
                        v-model="searchValue"
                        @input="searchChange"
                        type="text"
                        placeholder="请输入搜索条件"
                    />
                    <button @click="searchClick" class="el-icon-search"></button>
                </div>
                <div v-show="true" class="search-val-box">
                    <div @click="searchVlaClick(item)" v-for="(item, index) in searchArray" :key="index">{{ item.name }}
                    </div>
                    <div
                        @click="searchVlaClick(item)"
                        v-for="(item, index) in searchArray"
                        :key="index"
                    >{{ item.name }}</div>
                </div>
                <div class="list-show">
                    <div class="car-list">
                        <div class="list-box">
                            <el-table :data="saveRangeList" style="width: 100%"
                            <el-table
                                :data="saveRangeList"
                                style="width: 100%"
                                :header-cell-style="{ 'text-align': 'center', 'background-color': '#203c60', 'borderColor': '#324e75' }"
                                :cell-style="{ 'text-align': 'center', 'borderColor': '#324e75' }"
                                @cell-click="rowClick">
                                @cell-click="rowClick"
                            >
                                <el-table-column prop="name" label="范围名称" min-width="50%"></el-table-column>
                                <el-table-column prop="type" label="范围类型" min-width="50%">
                                    <template slot-scope="scope">
@@ -39,11 +50,20 @@
                                </el-table-column>
                                <el-table-column prop="id" label="操作" min-width="50%">
                                    <template slot-scope="scope">
                                        <el-button @click="flytoRange(scope.row)" type="text" size="small" title="定位">
                                        <el-button
                                            @click="flytoRange(scope.row)"
                                            type="text"
                                            size="small"
                                            title="定位"
                                        >
                                            <i class="el-icon-location"></i>
                                        </el-button>
                                        <el-button @click="deleteRegionSaveList(scope.row.id)" type="text" size="small"
                                            title="删除">
                                        <el-button
                                            @click="deleteRegionSaveList(scope.row.id)"
                                            type="text"
                                            size="small"
                                            title="删除"
                                        >
                                            <i class="el-icon-delete"></i>
                                        </el-button>
                                    </template>
@@ -51,9 +71,14 @@
                            </el-table>
                        </div>
                        <div class="pages">
                            <el-pagination background layout="prev, pager, next" :page-size="pagesize"
                                :page-count="pagesCount" :current-page="currentPage"
                                @current-change="handleCurrentChange"></el-pagination>
                            <el-pagination
                                background
                                layout="prev, pager, next"
                                :page-size="pagesize"
                                :page-count="pagesCount"
                                :current-page="currentPage"
                                @current-change="handleCurrentChange"
                            ></el-pagination>
                        </div>
                    </div>
                </div>
@@ -61,104 +86,247 @@
        </div>
        <div class="item video1" v-show="isShowVideo1">
            <div class="select" v-show="isShowSelect.video1" @mouseenter="enterSelectBox(1)">
                <el-select size="small" v-model="monitorType1" @change="((val) => { navClick(val, 1) })" placeholder="请选择"
                    ref="videoSelect1">
                    <el-option v-for="item in monitorOption" :key="item.value" :label="item.label"
                        :value="item.value"></el-option>
                <el-select
                    size="small"
                    v-model="monitorType1"
                    @change="((val) => { navClick(val, 1) })"
                    placeholder="请选择"
                    ref="videoSelect1"
                >
                    <el-option
                        v-for="item in monitorOption"
                        :key="item.value"
                        :label="item.label"
                        :value="item.value"
                    ></el-option>
                </el-select>
            </div>
            <div class="video" @mouseenter="enterVideoBox(1)" @mouseleave="leaveVideoBox(1)">
                <video id="videoElement1" autoplay controls width="100%" height="100%" style="object-fit: fill"></video>
                <video
                    id="videoElement1"
                    autoplay
                    controls
                    width="100%"
                    height="100%"
                    style="object-fit: fill"
                ></video>
            </div>
        </div>
        <div class="item video2" v-show="isShowVideo2">
            <div class="select" v-show="isShowSelect.video2" @mouseenter="enterSelectBox(2)">
                <el-select size="small" v-model="monitorType2" @change="((val) => { navClick(val, 2) })" placeholder="请选择"
                    ref="videoSelect2">
                    <el-option v-for="item in monitorOption" :key="item.value" :label="item.label"
                        :value="item.value"></el-option>
                <el-select
                    size="small"
                    v-model="monitorType2"
                    @change="((val) => { navClick(val, 2) })"
                    placeholder="请选择"
                    ref="videoSelect2"
                >
                    <el-option
                        v-for="item in monitorOption"
                        :key="item.value"
                        :label="item.label"
                        :value="item.value"
                    ></el-option>
                </el-select>
            </div>
            <div class="video" @mouseenter="enterVideoBox(2)" @mouseleave="leaveVideoBox(2)">
                <video id="videoElement2" autoplay controls width="100%" height="100%" style="object-fit: fill"></video>
                <video
                    id="videoElement2"
                    autoplay
                    controls
                    width="100%"
                    height="100%"
                    style="object-fit: fill"
                ></video>
            </div>
        </div>
        <div class="item video3" v-show="isShowVideo3">
            <div class="select" v-show="isShowSelect.video3" @mouseenter="enterSelectBox(3)">
                <el-select size="small" v-model="monitorType3" @change="((val) => { navClick(val, 3) })" placeholder="请选择"
                    ref="videoSelect3">
                    <el-option v-for="item in monitorOption" :key="item.value" :label="item.label"
                        :value="item.value"></el-option>
                <el-select
                    size="small"
                    v-model="monitorType3"
                    @change="((val) => { navClick(val, 3) })"
                    placeholder="请选择"
                    ref="videoSelect3"
                >
                    <el-option
                        v-for="item in monitorOption"
                        :key="item.value"
                        :label="item.label"
                        :value="item.value"
                    ></el-option>
                </el-select>
            </div>
            <div class="video" @mouseenter="enterVideoBox(3)" @mouseleave="leaveVideoBox(3)">
                <video id="videoElement3" autoplay controls width="100%" height="100%" style="object-fit: fill"></video>
                <video
                    id="videoElement3"
                    autoplay
                    controls
                    width="100%"
                    height="100%"
                    style="object-fit: fill"
                ></video>
            </div>
        </div>
        <div class="item video4" v-show="isShowVideo4">
            <div class="select" v-show="isShowSelect.video4" @mouseenter="enterSelectBox(4)">
                <el-select size="small" v-model="monitorType4" @change="((val) => { navClick(val, 4) })" placeholder="请选择"
                    ref="videoSelect4">
                    <el-option v-for="item in monitorOption" :key="item.value" :label="item.label"
                        :value="item.value"></el-option>
                <el-select
                    size="small"
                    v-model="monitorType4"
                    @change="((val) => { navClick(val, 4) })"
                    placeholder="请选择"
                    ref="videoSelect4"
                >
                    <el-option
                        v-for="item in monitorOption"
                        :key="item.value"
                        :label="item.label"
                        :value="item.value"
                    ></el-option>
                </el-select>
            </div>
            <div class="video" @mouseenter="enterVideoBox(4)" @mouseleave="leaveVideoBox(4)">
                <video id="videoElement4" autoplay controls width="100%" height="100%" style="object-fit: fill"></video>
                <video
                    id="videoElement4"
                    autoplay
                    controls
                    width="100%"
                    height="100%"
                    style="object-fit: fill"
                ></video>
            </div>
        </div>
        <div class="item video5" v-show="isShowVideo5">
            <div class="select" v-show="isShowSelect.video5" @mouseenter="enterSelectBox(5)">
                <el-select size="small" v-model="monitorType5" @change="((val) => { navClick(val, 5) })" placeholder="请选择"
                    ref="videoSelect5">
                    <el-option v-for="item in monitorOption" :key="item.value" :label="item.label"
                        :value="item.value"></el-option>
                <el-select
                    size="small"
                    v-model="monitorType5"
                    @change="((val) => { navClick(val, 5) })"
                    placeholder="请选择"
                    ref="videoSelect5"
                >
                    <el-option
                        v-for="item in monitorOption"
                        :key="item.value"
                        :label="item.label"
                        :value="item.value"
                    ></el-option>
                </el-select>
            </div>
            <div class="video" @mouseenter="enterVideoBox(5)" @mouseleave="leaveVideoBox(5)">
                <video id="videoElement5" autoplay controls width="100%" height="100%" style="object-fit: fill"></video>
                <video
                    id="videoElement5"
                    autoplay
                    controls
                    width="100%"
                    height="100%"
                    style="object-fit: fill"
                ></video>
            </div>
        </div>
        <div class="item video6" v-show="isShowVideo6">
            <div class="select" v-show="isShowSelect.video6" @mouseenter="enterSelectBox(6)">
                <el-select size="small" v-model="monitorType6" @change="((val) => { navClick(val, 6) })" placeholder="请选择"
                    ref="videoSelect6">
                    <el-option v-for="item in monitorOption" :key="item.value" :label="item.label"
                        :value="item.value"></el-option>
                <el-select
                    size="small"
                    v-model="monitorType6"
                    @change="((val) => { navClick(val, 6) })"
                    placeholder="请选择"
                    ref="videoSelect6"
                >
                    <el-option
                        v-for="item in monitorOption"
                        :key="item.value"
                        :label="item.label"
                        :value="item.value"
                    ></el-option>
                </el-select>
            </div>
            <div class="video" @mouseenter="enterVideoBox(6)" @mouseleave="leaveVideoBox(6)">
                <video id="videoElement6" autoplay controls width="100%" height="100%" style="object-fit: fill"></video>
                <video
                    id="videoElement6"
                    autoplay
                    controls
                    width="100%"
                    height="100%"
                    style="object-fit: fill"
                ></video>
            </div>
        </div>
        <div class="item video7" v-show="isShowVideo7">
            <div class="select" v-show="isShowSelect.video7" @mouseenter="enterSelectBox(7)">
                <el-select size="small" v-model="monitorType7" v-show="isShowSelect.video7"
                    @change="((val) => { navClick(val, 7) })" placeholder="请选择" ref="videoSelect7">
                    <el-option v-show="isShowSelect.video7" v-for="item in monitorOption" :key="item.value"
                        :label="item.label" :value="item.value"></el-option>
                <el-select
                    size="small"
                    v-model="monitorType7"
                    v-show="isShowSelect.video7"
                    @change="((val) => { navClick(val, 7) })"
                    placeholder="请选择"
                    ref="videoSelect7"
                >
                    <el-option
                        v-show="isShowSelect.video7"
                        v-for="item in monitorOption"
                        :key="item.value"
                        :label="item.label"
                        :value="item.value"
                    ></el-option>
                </el-select>
            </div>
            <div class="video" @mouseenter="enterVideoBox(7)" @mouseleave="leaveVideoBox(7)">
                <video id="videoElement7" autoplay controls width="100%" height="100%" style="object-fit: fill"></video>
                <video
                    id="videoElement7"
                    autoplay
                    controls
                    width="100%"
                    height="100%"
                    style="object-fit: fill"
                ></video>
            </div>
        </div>
        <div class="item video8" v-show="isShowVideo8">
            <div class="select" v-show="isShowSelect.video8" @mouseenter="enterSelectBox(8)">
                <el-select size="small" v-model="monitorType8" @change="((val) => { navClick(val, 8) })" placeholder="请选择"
                    ref="videoSelect8">
                    <el-option v-for="item in monitorOption" :key="item.value" :label="item.label"
                        :value="item.value"></el-option>
                <el-select
                    size="small"
                    v-model="monitorType8"
                    @change="((val) => { navClick(val, 8) })"
                    placeholder="请选择"
                    ref="videoSelect8"
                >
                    <el-option
                        v-for="item in monitorOption"
                        :key="item.value"
                        :label="item.label"
                        :value="item.value"
                    ></el-option>
                </el-select>
            </div>
            <div class="video" @mouseenter="enterVideoBox(8)" @mouseleave="leaveVideoBox(8)">
                <video id="videoElement8" autoplay controls width="100%" height="100%" style="object-fit: fill"></video>
                <video
                    id="videoElement8"
                    autoplay
                    controls
                    width="100%"
                    height="100%"
                    style="object-fit: fill"
                ></video>
            </div>
        </div>
        <el-dialog :title="dialogTitle" :modal="true" :visible.sync="dialogVisible" :before-close="dialogBeforeClose"
            :close-on-click-modal="true" class="car-video-box">
            <video id="videoElement" autoplay controls width="100%" height="100%" style="object-fit: fill"></video>
        <el-dialog
            :title="dialogTitle"
            :modal="true"
            :visible.sync="dialogVisible"
            :before-close="dialogBeforeClose"
            :close-on-click-modal="true"
            class="car-video-box"
        >
            <video
                id="videoElement"
                autoplay
                controls
                width="100%"
                height="100%"
                style="object-fit: fill"
            ></video>
        </el-dialog>
    </div>
</template>
@@ -166,7 +334,7 @@
<script>
import EntityDraw from "@/utils/EntityDraw.js"
import { listQuery, accurateSearch } from "@/utils/search.js"
import { getVideoList, getDevices, getRegionSaveList, deleteRegionSaveList } from '@/api/video/index.js'
import { getVideoList, getDevices, getRegionSaveList, deleteRegionSaveList, getRegionList } from '@/api/video/index.js'
import flvjs from 'flv.js'
let graphicLayer = null
@@ -425,15 +593,22 @@
        },
        rowClick (row) {
            // this.$EventBus.$emit('toPosition', {
            //     layerName: 'monitoringLayers',
            //     siteJd: row.longitude,
            //     siteWd: row.latitude,
            //     siteGd: 60000,
            //     siteHeading: -3,
            //     sitePitch: -90
            // })
            console.log(row, 1111)
            let positionStr = ''
            positionStr = row.positions.slice(11, positionStr.length - 1)
            let positionArr = []
            positionArr = positionStr.split(",").slice(0, positionArr.length - 1)
            let positionNewStr = ''
            positionArr.forEach(item => {
                let lng = item.split(' ')[0]
                let lat = item.split(' ')[1]
                positionNewStr += lng + ',' + lat + ';'
            })
            console.log(positionNewStr, 333)
            getRegionList(1, 15, positionStr).then(res => {
                // let data = res.data.data.list
                console.log(res, 123)
            })
        },
        async siteClick (e) {
@@ -665,7 +840,7 @@
                border-radius: 10px;
                overflow-y: auto;
                &>div {
                & > div {
                    height: 100%;
                    padding: 0 10px;
                    line-height: 36px;
@@ -676,7 +851,7 @@
            .list-show {
                flex: 1;
                &>div {
                & > div {
                    height: 100%;
                    display: flex;
                    flex-direction: column;
vue.config.js
@@ -9,157 +9,157 @@
 * Copyright (c) 2022 by shuishen 1109946754@qq.com, All Rights Reserved.
 */
const path = require("path");
const CopywebpackPlugin = require("copy-webpack-plugin");
const dvgisDist = "./node_modules/@dvgis";
const webpack = require("webpack");
const path = require("path")
const CopywebpackPlugin = require("copy-webpack-plugin")
const dvgisDist = "./node_modules/@dvgis"
const webpack = require("webpack")
const CompressionPlugin = require("compression-webpack-plugin");
const pxtovw = require("postcss-px-to-viewport");
const CompressionPlugin = require("compression-webpack-plugin")
const pxtovw = require("postcss-px-to-viewport")
const productionGzipExtensions = ["js", "css"];
const productionGzipExtensions = ["js", "css"]
module.exports = {
  css: {
    loaderOptions: {
      // 给 sass-loader 传递选项
      scss: {
        prependData: `@import "~@/styles/scssFile.scss";`,
      },
      // postcss: {
      //     plugins: [   //配置px转rem进行适配
      //         require('postcss-px2rem')({
      //             // 根标签字号大小根据设计稿宽度/flexible.js里的份数得到,这里假定设计稿宽度为3840 3840/24 = 160px
      //             remUnit: 80
      //         }),
      //     ]
      // }
      // postcss: {
      //     //给postcss-loader传递选项
      //     plugins: [
      //         new pxtovw({
      //             unitToConvert: 'px', //需要转换的单位,默认为"px";
      //             viewportWidth: 1920, //设计稿的视口宽度
      //             viewportHeight: 1080, //设计稿的视口宽度
      //             unitPrecision: 5, //单位转换后保留的小数位数
      //             propList: ['*'], //要进行转换的属性列表,*表示匹配所有,!表示不转换
      //             viewportUnit: 'vw', //转换后的视口单位
      //             fontViewportUnit: 'vw', //转换后字体使用的视口单位
      //             selectorBlackList: [], //不进行转换的css选择器,继续使用原有单位
      //             minPixelValue: 1, //设置最小的转换数值
      //             mediaQuery: false, //设置媒体查询里的单位是否需要转换单位
      //             replace: true, //是否直接更换属性值,而不添加备用属性
      //             exclude: [/node_modules/], //忽略某些文件夹下的文件
      //             // landscape: true,
      //             // landscapeUnit: 'vw',
      //             // landscapeWidth: 1920
      //         })
      //     ]
      // }
    css: {
        loaderOptions: {
            // 给 sass-loader 传递选项
            scss: {
                prependData: `@import "~@/styles/scssFile.scss";`,
            },
            // postcss: {
            //     plugins: [   //配置px转rem进行适配
            //         require('postcss-px2rem')({
            //             // 根标签字号大小根据设计稿宽度/flexible.js里的份数得到,这里假定设计稿宽度为3840 3840/24 = 160px
            //             remUnit: 80
            //         }),
            //     ]
            // }
            // postcss: {
            //     //给postcss-loader传递选项
            //     plugins: [
            //         new pxtovw({
            //             unitToConvert: 'px', //需要转换的单位,默认为"px";
            //             viewportWidth: 1920, //设计稿的视口宽度
            //             viewportHeight: 1080, //设计稿的视口宽度
            //             unitPrecision: 5, //单位转换后保留的小数位数
            //             propList: ['*'], //要进行转换的属性列表,*表示匹配所有,!表示不转换
            //             viewportUnit: 'vw', //转换后的视口单位
            //             fontViewportUnit: 'vw', //转换后字体使用的视口单位
            //             selectorBlackList: [], //不进行转换的css选择器,继续使用原有单位
            //             minPixelValue: 1, //设置最小的转换数值
            //             mediaQuery: false, //设置媒体查询里的单位是否需要转换单位
            //             replace: true, //是否直接更换属性值,而不添加备用属性
            //             exclude: [/node_modules/], //忽略某些文件夹下的文件
            //             // landscape: true,
            //             // landscapeUnit: 'vw',
            //             // landscapeWidth: 1920
            //         })
            //     ]
            // }
        },
    },
  },
  // 其他配置
  chainWebpack: (config) => {
    config.plugin("copy").use(CopywebpackPlugin, [
      [
        {
          from: path.join(dvgisDist, "dc-sdk/dist/resources"),
          to: "libs/dc-sdk/resources",
        },
        {
          from: "./public/img",
          to: "img",
        },
        {
          from: "./public/model",
          to: "model",
        },
        {
          from: "./public/video",
          to: "video",
        },
        {
          from: "./public/libs",
          to: "libs",
        },
        {
          from: "./public/depend",
          to: "depend",
        },
      ],
    ]);
    // 其他配置
    chainWebpack: (config) => {
        config.plugin("copy").use(CopywebpackPlugin, [
            [
                {
                    from: path.join(dvgisDist, "dc-sdk/dist/resources"),
                    to: "libs/dc-sdk/resources",
                },
                {
                    from: "./public/img",
                    to: "img",
                },
                {
                    from: "./public/model",
                    to: "model",
                },
                {
                    from: "./public/video",
                    to: "video",
                },
                {
                    from: "./public/libs",
                    to: "libs",
                },
                {
                    from: "./public/depend",
                    to: "depend",
                },
            ],
        ])
    // config.plugin("define").tap((args) => {
    //     args[0]["process"] = { ...args[0]["process.env"] }
    //     return args
    // })
  },
  configureWebpack: {
    externals: {
      vue: "Vue",
      Vuex: "Vuex",
      "vue-router": "VueRouter",
      "element-ui": "ELEMENT",
      echarts: "echarts",
        // config.plugin("define").tap((args) => {
        //     args[0]["process"] = { ...args[0]["process.env"] }
        //     return args
        // })
    },
    // webpack plugins
    plugins: [
      // Ignore all locale files of moment.js
      new webpack.IgnorePlugin(/^\.\/locale$/, /moment$/),
      // 配置compression-webpack-plugin压缩
      new CompressionPlugin({
        algorithm: "gzip",
        test: new RegExp("\\.(" + productionGzipExtensions.join("|") + ")$"),
        threshold: 10240,
        minRatio: 0.8,
      }),
      new webpack.optimize.LimitChunkCountPlugin({
        maxChunks: 5,
        minChunkSize: 100,
      }),
      // 提供带 Content-Encoding 编码的压缩版的资源
      // new CompressionPlugin({
      //     algorithm: 'gzip',
      //     test: /\.js$|\.html$|\.css/, // 匹配文件名
      //     // test: /\.(js|css)$/,
      //     threshold: 10240, // 对超过10k的数据压缩
      //     deleteOriginalAssets: false, // 不删除源文件
      //     minRatio: 0.8 // 压缩比
      // })
    ],
  },
  devServer: {
    open: false, // 编译完成是否打开网页
    host: "0.0.0.0", // 指定使用地址,默认localhost,0.0.0.0代表可以被外界访问
    port: 8081, // 访问端口
    https: false, // 编译失败时刷新页面
    hot: true, // 开启热加载
    hotOnly: false,
    // proxy: {
    //     [process.env.VUE_APP_API]: {//拦截器(拦截链接中有/api)
    //         target: process.env.VUE_API_DEV_TARGET,//'http://192.168.1.114:3000', //process.env.VUE_API_DEV_TARGET, //API服务器的地址
    //         changeOrigin: true,
    //         pathRewrite: {
    //             //'^/api': '/'
    //             [`^${process.env.VUE_APP_API}`]: '',
    //             //[`^${process.env.VUE_APP_API}`]: '/', //配置出来的接口没有 /api
    //         }
    //     }
    // }
    proxy: {
      "/api": {
        // target用于配置你允许访问数据的计算机名称,即是你的api接口的服务器地址
        target: "http://192.168.0.115:1888/api",
        // ws: true, //启用webSocket
        changeOrigin: true, //开启代理跨域
        pathRewrite: {
          "^/api": "",
    configureWebpack: {
        externals: {
            vue: "Vue",
            Vuex: "Vuex",
            "vue-router": "VueRouter",
            "element-ui": "ELEMENT",
            echarts: "echarts",
        },
      },
        // webpack plugins
        plugins: [
            // Ignore all locale files of moment.js
            new webpack.IgnorePlugin(/^\.\/locale$/, /moment$/),
            // 配置compression-webpack-plugin压缩
            new CompressionPlugin({
                algorithm: "gzip",
                test: new RegExp("\\.(" + productionGzipExtensions.join("|") + ")$"),
                threshold: 10240,
                minRatio: 0.8,
            }),
            new webpack.optimize.LimitChunkCountPlugin({
                maxChunks: 5,
                minChunkSize: 100,
            }),
            // 提供带 Content-Encoding 编码的压缩版的资源
            // new CompressionPlugin({
            //     algorithm: 'gzip',
            //     test: /\.js$|\.html$|\.css/, // 匹配文件名
            //     // test: /\.(js|css)$/,
            //     threshold: 10240, // 对超过10k的数据压缩
            //     deleteOriginalAssets: false, // 不删除源文件
            //     minRatio: 0.8 // 压缩比
            // })
        ],
    },
  },
};
    devServer: {
        open: false, // 编译完成是否打开网页
        host: "0.0.0.0", // 指定使用地址,默认localhost,0.0.0.0代表可以被外界访问
        port: 82, // 访问端口
        https: false, // 编译失败时刷新页面
        hot: true, // 开启热加载
        hotOnly: false,
        // proxy: {
        //     [process.env.VUE_APP_API]: {//拦截器(拦截链接中有/api)
        //         target: process.env.VUE_API_DEV_TARGET,//'http://192.168.1.114:3000', //process.env.VUE_API_DEV_TARGET, //API服务器的地址
        //         changeOrigin: true,
        //         pathRewrite: {
        //             //'^/api': '/'
        //             [`^${process.env.VUE_APP_API}`]: '',
        //             //[`^${process.env.VUE_APP_API}`]: '/', //配置出来的接口没有 /api
        //         }
        //     }
        // }
        proxy: {
            "/api": {
                // target用于配置你允许访问数据的计算机名称,即是你的api接口的服务器地址
                target: "http://192.168.0.125:82",
                // ws: true, //启用webSocket
                changeOrigin: true, //开启代理跨域
                pathRewrite: {
                    "^/api": "",
                },
            },
        },
    },
}