Commit 0e0d0f1a by 米嘉伟

Merge branch 'dev_zwpt' of http://39.99.224.27:9022/changchao/founder_vue into dev_zwpt

parents 765c83a0 271a8a63
/*
* @Author: your name
* @Date: 2021-09-07 09:57:48
* @LastEditTime: 2022-03-20 21:19:29
* @LastEditors: Please set LastEditors
* @LastEditTime: 2022-06-13 14:42:08
* @LastEditors: error: git config user.name && git config user.email & please set dead value or install git
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @FilePath: \指纹系统\founder_vue\babel.config.js
*/
......@@ -12,7 +12,7 @@
let plugins = [];
if (process.env.NODE_ENV === "production") { // todo if判断是否打包,打包环境下控制台去掉console.log,也可去掉if判断,整个项目不会出现console.log(不建议)
// plugins.push("transform-remove-console");
plugins.push("transform-remove-console");
}
module.exports = {
presets: ["@vue/cli-plugin-babel/preset"],
......
......@@ -62,6 +62,7 @@
"axios": "^0.23.0",
"babel-eslint": "^10.1.0",
"babel-plugin-transform-remove-console": "^6.9.4",
"compression-webpack-plugin": "^10.0.0",
"docdash": "^1.2.0",
"eslint": "^6.7.2",
"eslint-plugin-prettier": "^3.1.3",
......
......@@ -1430,7 +1430,7 @@ export default {
/******************* */
self.ip = ipRes
//console.log(self.ip);
NProgress.start();
// NProgress.start();
this.pop = true
this.isAlter = true
this.errTitle = this.$t('FingerPrint.device_initialization')
......@@ -1557,14 +1557,14 @@ export default {
// this.errDescription = '非授权设备,请联系设备厂商'
// NProgress.done();
// }
NProgress.done();
// NProgress.done();
} else {
// 未识别到机器
this.pop = true
this.isAlter = true
this.errTitle = this.$t('FingerPrint.not_find_device')
this.errDescription = this.$t('FingerPrint.not_get_device_info')
NProgress.done();
// NProgress.done();
}
// this.getPersonInfo()
......@@ -3081,7 +3081,7 @@ export default {
self.$set(this.fingersRight[index], 'statusL', 2)
// self.$refs.rightFinger.children[index].setAttribute('src', self.fingerArr[index])
self.$nextTick(() => {
self.$refs.fingerIcon.style.color = '#FFC005'
// self.$refs.fingerIcon.style.color = '#FFC005'
})
self.preStatusR = 2
self.preIndex = index
......@@ -3376,7 +3376,7 @@ export default {
self.$set(this.fingersLeft[index - 5], 'statusL', 2)
// self.$refs.rightFinger.children[index].setAttribute('src', self.fingerArr[index])
self.$nextTick(() => {
self.$refs.fingerIcon.style.color = '#FFC005'
// self.$refs.fingerIcon.style.color = '#FFC005'
})
self.preStatusL = 2
self.preIndex = index
......@@ -3777,7 +3777,7 @@ export default {
this.fingerImg = ''
this.$nextTick(() => {
this.$refs.fingerIcon.style.color = '#FFC005'
// this.$refs.fingerIcon.style.color = '#FFC005'
})
this.cur = index + 1
this.preIndex = index
......@@ -4133,7 +4133,7 @@ export default {
let result = await this.GrpcCameraService.getCameraState2()
// //console.log(result);
if (result == 0) {
//console.log('相机已启动');
// console.log('相机已启动');
// 启动音频
this.GrpcCameraService.audioPlay(`/video/${Filename}.mp3`)
let finger = await this.GrpcCameraService.getAutoGatherVideoStream2(rightList[index].code,
......@@ -4449,7 +4449,7 @@ export default {
this.fingerImg = ''
this.$nextTick(() => {
this.$refs.fingerIcon.style.color = '#FFC005'
// this.$refs.fingerIcon.style.color = '#FFC005'
})
this.cur = index + 1
this.preIndex = index
......@@ -9262,7 +9262,7 @@ export default {
this.preStatusL = 0
this.fingerImg = ''
this.$nextTick(() => {
this.$refs.fingerIcon.style.color = '#FFC005'
// this.$refs.fingerIcon.style.color = '#FFC005'
})
// 继续当前位自动录制
this.stop = false
......@@ -9302,7 +9302,7 @@ export default {
this.preStatusL = 0
this.fingerImg = ''
this.$nextTick(() => {
this.$refs.fingerIcon.style.color = '#FFC005'
// this.$refs.fingerIcon.style.color = '#FFC005'
})
// 继续当前位自动录制
this.stop = false
......@@ -9672,7 +9672,7 @@ export default {
let self = this
this.finishVisible = false
//console.log('调用上传api');
NProgress.start();
// NProgress.start();
// 生成时间
self.packageHeader.createTime = moment(new Date()).format("YYYYMMDDHHmmss")
// 指纹数据
......@@ -10010,7 +10010,7 @@ export default {
}
NProgress.done();
// NProgress.done();
},
/**
* @description: 处理图片,得到返回的图片
......@@ -10433,7 +10433,7 @@ export default {
this.fingerPic2.push(item.imgSrcL)
})
// 开始压缩
NProgress.start();
// NProgress.start();
const zip = new JSZip()
let i = 1
this.fingerPic2.forEach(item => {
......@@ -10449,7 +10449,7 @@ export default {
i++
})
// 压缩结束
NProgress.done();
// NProgress.done();
zip.generateAsync({
type: "blob"
}).then(async content => { // 生成二进制流
......
/*
* @Author: your name
* @Date: 2021-09-07 09:57:48
* @LastEditTime: 2022-06-10 10:48:05
* @LastEditTime: 2022-06-13 13:59:46
* @LastEditors: error: git config user.name && git config user.email & please set dead value or install git
* @Description: In User Settings Edit
* @FilePath: \指纹系统\founder_vue\vue.config.js
*/
const path = require("path");
const path = require('path')
// 引入等比适配插件
const px2rem = require("postcss-px2rem");
const px2rem = require('postcss-px2rem')
// 配置基本大小
const postcss = px2rem({
// 基准大小 baseSize,需要和rem.js中相同
remUnit: 16
});
remUnit: 16,
})
// const CompressionPlugin = require('compression-webpack-plugin');
// const productionGzipExtensions = /\.(js|css|json|txt|html|ico|svg)(\?.*)?$/i;
......@@ -22,81 +22,97 @@ const postcss = px2rem({
// return path.join(__dirname, dir);
// }
// const CompressionWebpackPlugin = require('compression-webpack-plugin')
// const IS_PROD = ['production', 'prod'].includes(process.env.NODE_ENV)
// const productionGzipExtensions = /\.(js|css|json|txt|html|ico|svg)(\?.*)?$/i
module.exports = {
publicPath: process.env.NODE_ENV === "development" ? "/" : "./",
assetsDir: "static",
configureWebpack: config => {
"#source-map";
if (process.env.NODE_ENV === "production") {
publicPath: process.env.NODE_ENV === 'development' ? '/' : './',
assetsDir: 'static',
configureWebpack: (config) => {
// const plugins = []
;('#source-map')
if (process.env.NODE_ENV === 'production') {
// 为生产环境修改配置...
config.mode = "production";
config.mode = 'production'
} else {
// 为开发环境修改配置...
config.mode = "development";
config.mode = 'development'
}
// if (!IS_PROD) {
// plugins.push(
// new CompressionWebpackPlugin({
// filename: '[path].gz[query]',
// algorithm: 'gzip',
// test: productionGzipExtensions,
// threshold: 10240,
// minRatio: 0.8,
// })
// )
// }
// config.plugins = [...config.plugins, ...plugins]
Object.assign(config, {
// 开发生产共同配置
resolve: {
alias: {
"@": path.resolve(__dirname, "./src"),
"@c": path.resolve(__dirname, "./src/components"),
"@p": path.resolve(__dirname, "./src/pages")
} // 别名配置
}
});
'@': path.resolve(__dirname, './src'),
'@c': path.resolve(__dirname, './src/components'),
'@p': path.resolve(__dirname, './src/pages'),
}, // 别名配置
},
})
},
lintOnSave: false, //关闭eslint
chainWebpack: config => {
chainWebpack: (config) => {
// 配置svg
const svgRule = config.module.rule("svg");
const svgRule = config.module.rule('svg')
// 清除已有的所有 loader,否则接下来的 loader 会附加在该规则现有的 loader 之后。
svgRule.uses.clear();
svgRule.uses.clear()
svgRule
.test(/\.svg$/)
.include.add(path.resolve(__dirname, "./src/icons")) // 配置icons的目录
.include.add(path.resolve(__dirname, './src/icons')) // 配置icons的目录
.end()
.use("svg-sprite-loader")
.loader("svg-sprite-loader")
.use('svg-sprite-loader')
.loader('svg-sprite-loader')
.options({
symbolId: "icon-[name]"
});
const fileRule = config.module.rule("file");
fileRule.uses.clear();
symbolId: 'icon-[name]',
})
const fileRule = config.module.rule('file')
fileRule.uses.clear()
fileRule
.test(/\.svg$/)
.exclude.add(path.resolve(__dirname, "./src/icons")) // 配置icons的目录
.exclude.add(path.resolve(__dirname, './src/icons')) // 配置icons的目录
.end()
.use("file-loader")
.loader("file-loader");
.use('file-loader')
.loader('file-loader')
const oneOfsMap = config.module.rule("scss").oneOfs.store;
oneOfsMap.forEach(item => {
const oneOfsMap = config.module.rule('scss').oneOfs.store
oneOfsMap.forEach((item) => {
item
.use("sass-resources-loader")
.loader("sass-resources-loader")
.use('sass-resources-loader')
.loader('sass-resources-loader')
.options({
resources: "./src/assets/styles/main.scss"
resources: './src/assets/styles/main.scss',
})
.end();
});
config
.plugin('html')
.tap(args => {
args[0].title = ''
return args
})
.end()
})
config.plugin('html').tap((args) => {
args[0].title = ''
return args
})
},
productionSourceMap: false, // 关闭生产映射
devServer: {
port: 11081,
overlay: {
warnings: false,
errors: false
errors: false,
},
proxy: {
"/api": {
'/api': {
// target: "http://192.168.0.137:8080/", // 统一的请求头部每次修改都要重启才会生效 http://39.99.224.27:8006/
target: "http://172.18.108.98:8099/", // 张 认定
// target: "http://172.18.108.98:8099/", // 张 认定
// target: "http://192.168.0.104:8099", // 湖南-马
// target: "http://192.168.128.1136:8099", // 湖南-王
// target: "http://192.168.128.109:8099", // 湖南-张呈光
......@@ -104,10 +120,10 @@ module.exports = {
// target: "http://127.0.0.1:8099",
// target: "http://47.92.225.109:5602",
// target: "http://www.meetfood.cn:2390", // 湖南-线上
// target: "http://zwpt.xzclub.top:9333/",
target: 'http://zwpt.xzclub.top:9333/',
// target: "http://192.168.128.104:8099", // 江
// target: "http://172.20.0.149:8099", // 北京 张
// target: "http://192.168.0.109:8099", // 西藏 张
// target: "http://192.168.0.109:8099", // 西藏 张
// target: "http://192.168.0.143:8099", // 西藏 马
// target: "http://192.168.0.130:8099", // 西藏 刘
// target: "http://172.18.109.63:8099", // 北京 张
......@@ -115,14 +131,14 @@ module.exports = {
ws: true,
changeOrigin: true,
pathRewrite: {
"^/api": "/api"
}
'^/api': '/api',
},
},
"/security": {
'/security': {
// target: "http://192.168.128.106:8765", // 湖南-王
target: "http://172.18.108.98:8765/", // 张 认定
// target: "http://172.18.108.98:8765/", // 张 认定
// target: "http://www.meetfood.cn:2390", // 湖南-王
// target: "http://zwpt.xzclub.top:9333/",
target: 'http://zwpt.xzclub.top:9333/',
// target: "http://192.168.128.109:8765",
// target: "http://172.18.109.63:8765", // 北京 张
// target: "http://192.168.0.165:8765", // 西藏 马
......@@ -132,43 +148,43 @@ module.exports = {
ws: true,
changeOrigin: true,
pathRewrite: {
"^/security": "/security"
}
'^/security': '/security',
},
},
"/token": {
target: "https://155.1.33.8/",
'/token': {
target: 'https://155.1.33.8/',
ws: true,
changeOrigin: true,
pathRewrite: {
"^/token": ""
}
'^/token': '',
},
},
"/logout": {
target: "https://155.1.33.10:9090",
'/logout': {
target: 'https://155.1.33.10:9090',
ws: true,
changeOrigin: true,
pathRewrite: {
"^/logout": ""
}
'^/logout': '',
},
},
"/meiyaLog": {
target: "http://155.1.29.10:8007",
'/meiyaLog': {
target: 'http://155.1.29.10:8007',
ws: true,
changeOrigin: true,
pathRewrite: {
"^/meiyaLog": ""
}
'^/meiyaLog': '',
},
},
}
},
},
css: {
loaderOptions: {
postcss: {
plugins: [postcss]
}
plugins: [postcss],
},
},
sourceMap: process.env.NODE_ENV === "development" ? true : false // 在开发环境下开启 CSS sourcemaps
}
sourceMap: process.env.NODE_ENV === 'development' ? true : false, // 在开发环境下开启 CSS sourcemaps
},
// chainWebpack(config) {
// config.module
// .rule("svg")
......@@ -186,4 +202,4 @@ module.exports = {
// })
// .end();
// }
};
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment