guanqb
2023-08-01 87f3ec4cd49a56fba958c5d48e22f84aee4542bf
独栋人口弹窗
2 files modified
343 ■■■■ changed files
src/views/house/index.vue 13 ●●●● patch | view | raw | blame | history
vue.config.js 330 ●●●● patch | view | raw | blame | history
src/views/house/index.vue
@@ -1638,7 +1638,7 @@
                this.getResident3DData(residentId)
            } else {
                residentId = params.std_addr_id.split('|')[1]
                this.getVillagePersonInfo('', residentId)
                this.getVillagePersonInfo('独栋', residentId)
                // this.$EventBus.$emit("toPosition", {
                //     siteJd: Number(params.lng),
                //     siteWd: Number(params.lat) - 0.0021,
@@ -1646,7 +1646,6 @@
                //     sitePitch: -45,
                // })
            }
            console.log('residentDetailsClick--then')
            this.getPicURL(residentId)
            this.residentDetailsTitle = `${params.name}住户信息`
            this.residentDetailsShow = true
@@ -2178,6 +2177,16 @@
                phone
            ).then((res) => {
                if (buildId) {
                    if (resBusId == '独栋') {
                        this.houseDate = res.data.data.records
                        setTimeout(() => {
                            this.residentLoading = false
                        }, 500)
                        if (res.data.data.records.length == 0) {
                            this.residentNoDataText = '暂无户室信息'
                        }
                        return
                    }
                    setTimeout(() => {
                        this.personDetailArr = res.data.data.records
                    }, 500)
vue.config.js
@@ -9,179 +9,179 @@
 * 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",
        },
        {
          from: "./public/static",
          to: "static",
        },
        {
          from: "./public/images",
          to: "images",
        },
        {
          from: "./public/qp",
          to: "qp",
        },
        {
          from: "./public/warnings",
          to: "warnings",
        },
      ],
    ]);
    // 其他配置
    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",
                },
                {
                    from: "./public/static",
                    to: "static",
                },
                {
                    from: "./public/images",
                    to: "images",
                },
                {
                    from: "./public/qp",
                    to: "qp",
                },
                {
                    from: "./public/warnings",
                    to: "warnings",
                },
            ],
        ])
    // 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: 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://localhost:82",
        target: "http://192.168.1.177:82",
        // target: "http://106.225.193.35:82",
        // target: "http://192.168.1.170:82",
        // target: "http://192.168.0.100:82",
        // target: "http://172.16.13.150:82",
        // target: "http://10.141.11.11:8081/api",
        // ws: true, //启用webSocket6566
        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://localhost:82",
                // target: "http://192.168.1.177:82",
                // target: "http://106.225.193.35:82",
                // target: "http://192.168.1.170:82",
                // target: "http://192.168.0.100:82",
                // target: "http://172.16.13.150:82",
                // target: "http://10.141.11.11:8081/api",
                // ws: true, //启用webSocket6566
                changeOrigin: true, //开启代理跨域
                pathRewrite: {
                    "^/api": "",
                },
            },
        },
    },
}