Commit ab996b9d by 张超军

1.优化认定详情候选加载动画。2.解决列表展开收缩样式位置错乱。

parent b75b6ed3
......@@ -12991,7 +12991,9 @@
* @override
*/
initialize: function initialize() {
this.matrix = [4, 4, 4, 4, 0.7, -4, -4, -4, -4];
this.matrix = [4, 4, 4,
4, 0.7, -4,
-4, -4, -4];
// this.matrix = [1, 1, 1, 1, 0.7, -1, -1, -1, -1];
// this.matrix = [0, -1, 0, -1, 5, -1, 0, -1, 0];
// this.matrix = [1/9, 1/9, 1/9, 1/9, 1/9, 1/9, 1/9, 1/9, 1/9];
<!--
* @Author: your name
* @Date: 2021-09-07 09:58:13
* @LastEditTime: 2022-03-25 17:27:15
* @LastEditTime: 2022-04-17 00:36:57
* @LastEditors: Please set LastEditors
* @Description: In User Settings Edit
* @FilePath: \指纹系统\founder_vue\src\App.vue
......@@ -78,6 +78,7 @@ export default {
.el-message {
z-index: 999999 !important;
justify-content: flex-start !important;
}
// 滚动条的滑块
......@@ -141,10 +142,6 @@ export default {
}
}
/deep/ .el-message {
justify-content: flex-start !important;
}
.el-message-box__message {
margin: 23px 24px 17px 24px;
font-size: 14px;
......
<!--
* @Author: your name
* @Date: 2021-09-09 09:28:46
* @LastEditTime: 2022-04-16 10:50:45
* @LastEditTime: 2022-04-17 00:41:00
* @Description: In User Settings Edit
* @FilePath: \指纹系统\founder_vue\src\views\cxyrd\LTz.vue
-->
......@@ -2643,6 +2643,11 @@ export default {
this.$bus.on('deleteMessage', (obj) => {
if (obj.delTime != null) {
// 移除源特征点
self.bdjqData_source = []
// 移除目标特征点
self.bdjqData_target = []
self.targetImage = "xxx";
self.sourceImage = "xxx";
self.zwtp_target = false
......@@ -2673,6 +2678,15 @@ export default {
this.$bus.on('targetDeleteMessage', (obj) => {
if (obj.delTime != null) {
self.$bus.on('target_info', (target_info) => {
self.target_info = target_info
// 移除源特征点
self.bdjqData_source = []
// 移除目标特征点
self.bdjqData_target = []
self.getBdjqData(self.target_info.barcode_source, self.target_info.seq_source, self.target_info.barcode_target, self.target_info.seq_target, self.target_info.type)
})
self.targetImage = "xxx";
self.zwtp_target = false
self.zwtp_source = false
......
/*
* @Author: your name
* @Date: 2022-01-07 17:40:44
* @LastEditTime: 2022-02-14 17:02:06
* @LastEditTime: 2022-04-20 10:20:51
* @LastEditors: Please set LastEditors
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @FilePath: \指纹系统\founder_vue\src\netmgr\cxyrd\cxyrd.js
......@@ -24,22 +24,22 @@ const _path = {
export default {
// 获取案件指纹
ajfinger(_parameter) {
return fHttp.postJson(_path.ajfinger, _parameter, HttpConfigUtil.closeLoadAndTip())
return fHttp.postJson(_path.ajfinger, _parameter)
},
// 获取案件掌纹
ajhand(_parameter) {
return fHttp.postJson(_path.ajhand, _parameter, HttpConfigUtil.closeLoadAndTip())
return fHttp.postJson(_path.ajhand, _parameter)
},
// 获取人员平面指纹
ryfingerPain(_parameter) {
return fHttp.postJson(_path.ryfingerPain, _parameter, HttpConfigUtil.closeLoadAndTip())
return fHttp.postJson(_path.ryfingerPain, _parameter)
},
// 获取人员滚动指纹
ryfingerRoll(_parameter) {
return fHttp.postJson(_path.ryfingerRoll, _parameter, HttpConfigUtil.closeLoadAndTip())
return fHttp.postJson(_path.ryfingerRoll, _parameter)
},
// 获取人员掌纹
ryhand(_parameter) {
return fHttp.postJson(_path.ryhand, _parameter, HttpConfigUtil.closeLoadAndTip())
return fHttp.postJson(_path.ryhand, _parameter)
},
}
/*
* @Author: zhangchaojun
* @Date: 2022-02-15 15:58:41
* @LastEditTime: 2022-04-12 19:33:25
* @LastEditTime: 2022-04-20 10:21:16
* @LastEditors: Please set LastEditors
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @FilePath: \指纹系统\founder_vue\src\netmgr\imageEd\imageEd.js
......@@ -21,15 +21,15 @@ const _path = {
export default {
// 获取图片特征
fingerTZD(_parameter) {
return fHttp.postJson(_path.fingerTZD, _parameter, HttpConfigUtil.closeLoadAndTip())
return fHttp.postJson(_path.fingerTZD, _parameter)
},
fingerTZD_LL(_parameter) {
return fHttp.postJson(_path.fingerTZD_LL, _parameter, HttpConfigUtil.closeLoadAndTip())
return fHttp.postJson(_path.fingerTZD_LL, _parameter)
},
handTZD(_parameter) {
return fHttp.postJson(_path.handTZD, _parameter, HttpConfigUtil.closeLoadAndTip())
return fHttp.postJson(_path.handTZD, _parameter)
},
handTZD_LL(_parameter) {
return fHttp.postJson(_path.handTZD_LL, _parameter, HttpConfigUtil.closeLoadAndTip())
return fHttp.postJson(_path.handTZD_LL, _parameter)
},
}
......@@ -189,7 +189,7 @@
<el-table-column
prop="taskNumber"
:label="$t('FptxDr.task_number')"
:width="width1"
:width="width_rwh"
>
<template slot-scope="scope">
<svg-icon
......@@ -324,7 +324,7 @@
<el-table-column
prop="taskNumber"
:label="$t('FptxDr.task_number')"
:width="width1"
:width="width_rwh"
>
<template slot-scope="scope">
<svg-icon
......@@ -439,6 +439,7 @@ export default {
name: "gzlb",
data () {
return {
width_rwh: 240,
width5: 50,
width3: 100,
width2: 240,
......@@ -479,7 +480,8 @@ export default {
this.width2 = (this.width2 * w2) / w1;
this.width3 = (this.width3 * w2) / w1;
this.width4 = (this.width4 * w2) / w1;
this.width5 = (this.width5 * w2) / w1
this.width5 = (this.width5 * w2) / w1;
this.width_rwh = (this.width_rwh * w2) / w1;
},
watch: {
// showType (newNum, oldNum) {
......@@ -1240,15 +1242,15 @@ export default {
}
@import "@/assets/css/globalBase.scss";
</style>
<style lang="scss" >
.el-table__expand-icon {
<style lang="scss" scoped>
/deep/.el-table__expand-icon {
position: absolute;
right: 45px;
cursor: pointer;
color: #b51f1f;
transition: transform 0.2s ease-in-out;
width: 11px;
height: 11px;
//height: 11px;
/* border: black 1px solid; */
margin: 0;
background-image: url("../../assets/img/confirm/expend.png");
......@@ -1256,14 +1258,19 @@ export default {
background-size: 11px;
background-repeat: no-repeat;
}
.el-table__expand-icon.el-table__expand-icon--expanded {
/deep/.el-table__expand-icon.el-table__expand-icon--expanded {
position: absolute;
//right: 45px;
cursor: pointer;
width: 11px;
height: 11px;
//height: 11px;
background-image: url("../../assets/img/confirm/shrink.png");
background-position: center;
background-size: 11px;
background-repeat: no-repeat;
transform-origin: center;
transform: rotate(180deg) !important;
transition: transform 0.2s ease-in-out;
}
.el-checkbox__input.is-checked .el-checkbox__inner {
background-color: #006aff;
......
......@@ -2246,7 +2246,7 @@ b {
cursor: pointer;
}
</style>
<style lang="scss">
<style lang="scss" scoped>
.el-tag-box {
// width: 930px;
display: flex !important;
......@@ -2279,7 +2279,7 @@ b {
background: #dadde0;
}
.el-table__expand-icon {
/deep/.el-table__expand-icon {
.el-icon-arrow-right {
cursor: pointer !important;
}
......@@ -2291,7 +2291,7 @@ b {
color: #b51f1f;
transition: transform 0.2s ease-in-out;
width: 11px;
height: 11px;
// height: 11px;
/* border: black 1px solid; */
margin: 0;
background-image: url("../../assets/img/confirm/expend.png");
......@@ -2300,9 +2300,9 @@ b {
background-repeat: no-repeat;
}
.el-table__expand-icon.el-table__expand-icon--expanded {
/deep/.el-table__expand-icon.el-table__expand-icon--expanded {
width: 11px;
height: 11px;
// height: 11px;
background-image: url("../../assets/img/confirm/shrink.png");
background-position: center;
background-size: 11px;
......
......@@ -480,6 +480,7 @@
<el-progress
type="circle"
:percentage="UploadPercent"
color="#006AFF"
></el-progress>
<div
v-show="UploadPercent<100"
......@@ -1198,7 +1199,6 @@ export default {
// TODO 导入日志记录
// this.sendLog('导入')
} else {
debugger
this.$message.error(res.data.message)
this.dialogVisible = false// 进度条弹窗
this.$bus.emit('isBlur', false)
......@@ -1442,8 +1442,8 @@ export default {
cursor: pointer;
}
</style>
<style lang="scss">
.el-table__expand-icon {
<style lang="scss" scoped>
/deep/.el-table__expand-icon {
.el-icon-arrow-right {
cursor: pointer !important;
}
......@@ -1455,7 +1455,7 @@ export default {
color: #b51f1f;
transition: transform 0.2s ease-in-out;
width: 11px;
height: 11px;
// height: 11px;
/* border: black 1px solid; */
margin: 0;
background-image: url("../../assets/img/confirm/expend.png");
......@@ -1464,9 +1464,9 @@ export default {
background-repeat: no-repeat;
}
.el-table__expand-icon.el-table__expand-icon--expanded {
/deep/.el-table__expand-icon.el-table__expand-icon--expanded {
width: 11px;
height: 11px;
// height: 11px;
background-image: url("../../assets/img/confirm/shrink.png");
background-position: center;
background-size: 11px;
......
......@@ -2221,8 +2221,8 @@ export default {
cursor: pointer;
}
</style>
<style lang="scss">
.el-table__expand-icon {
<style lang="scss" scoped>
/deep/.el-table__expand-icon {
.el-icon-arrow-right {
right: 0 !important;
cursor: pointer !important;
......@@ -2233,7 +2233,7 @@ export default {
color: #b51f1f;
transition: transform 0.2s ease-in-out;
width: 11px;
height: 11px;
// height: 11px;
/* border: black 1px solid; */
margin: 0;
background-image: url("../../assets/img/confirm/expend.png");
......@@ -2241,9 +2241,9 @@ export default {
background-size: 11px;
background-repeat: no-repeat;
}
.el-table__expand-icon.el-table__expand-icon--expanded {
/deep/.el-table__expand-icon.el-table__expand-icon--expanded {
width: 11px;
height: 11px;
// height: 11px;
background-image: url("../../assets/img/confirm/shrink.png");
background-position: center;
background-size: 11px;
......@@ -2251,15 +2251,15 @@ export default {
transform: rotate(180deg) !important;
}
</style>
<style scoped lang="scss" >
.el-table__expand-icon {
<style scoped lang="scss">
/deep/.el-table__expand-icon {
position: absolute;
right: 45px;
cursor: pointer;
color: #b51f1f;
transition: transform 0.2s ease-in-out;
width: 11px;
height: 11px;
// height: 11px;
/* border: black 1px solid; */
margin: 0;
background-image: url("../../assets/img/confirm/expend.png");
......@@ -2267,9 +2267,9 @@ export default {
background-size: 11px;
background-repeat: no-repeat;
}
.el-table__expand-icon.el-table__expand-icon--expanded {
/deep/.el-table__expand-icon.el-table__expand-icon--expanded {
width: 11px;
height: 11px;
// height: 11px;
background-image: url("../../assets/img/confirm/shrink.png");
background-position: center;
background-size: 11px;
......
<template>
<div class="login_account width70 middle" v-show="isShow">
<el-input class="width100 margin_top25_bottom10" type="text" :placeholder="$t('Login.username_placeholder')" @keydown.enter.native="login(userInfo)" v-model="userInfo.username">
<!-- <div class="login_account width70 middle" v-show="isShow">
<el-input
class="width100 margin_top25_bottom10"
type="text"
:placeholder="$t('Login.username_placeholder')"
@keydown.enter.native="login(userInfo)"
v-model="userInfo.username"
>
<i slot="prefix" style="display: flex; align-items: center">
<img style="
<img
style="
margin: 1.3125rem 1.3125rem 1.3125rem 1.1875rem;
width: 1rem;
height: 1rem;
" :src="usernameUrl" alt />
"
:src="usernameUrl"
alt
/>
</i>
</el-input>
<el-input class="width100 margin_top25_bottom10" type="password" :placeholder="$t('Login.password_placeholder')" v-model="userInfo.password" @keydown.enter.native="login(userInfo)">
<el-input
class="width100 margin_top25_bottom10"
type="password"
:placeholder="$t('Login.password_placeholder')"
v-model="userInfo.password"
@keydown.enter.native="login(userInfo)"
>
<i slot="prefix">
<img style="
<img
style="
margin: 1.3125rem 1.3125rem 1.3125rem 1.1875rem;
width: 0.9375rem;
height: 0.9375rem;
" :src="passwordUrl" alt />
"
:src="passwordUrl"
alt
/>
</i>
</el-input>
<el-button class="login_button width100 margin_top25_bottom10" type="primary" ref="userLogin" @click="login(userInfo)" :loading="btnLoading">{{$t('Login.login_btn')}}
<el-button
class="login_button width100 margin_top25_bottom10"
type="primary"
ref="userLogin"
@click="login(userInfo)"
:loading="btnLoading"
>{{ $t('Login.login_btn') }}
</el-button>
</div>
</div>-->
<!-- 对接线上 -->
<!-- <div class="AccountsLogin">
<div class="AccountsLogin">
<div class="el-icon-loading"></div>
<span>正在加载中...</span>
</div> -->
</div>
</template>
<script>
import qs from 'qs'
import { Encrypt } from '../../../utils/AESUtils';
import zzwxtCloud from '../../../api/zzwxtCloud.js';
import removeCookie from '@/utils/removeCookie';
import { log } from 'util';
import { Encrypt } from '../../../utils/AESUtils'
import zzwxtCloud from '../../../api/zzwxtCloud.js'
import removeCookie from '@/utils/removeCookie'
import { log } from 'util'
export default {
name: 'AccountsLogin',
......@@ -41,7 +67,7 @@ export default {
watch: {
loginType: {
immediate: true,
handler (val) {
handler(val) {
//console.info("account参数===>", val);
if (val === true) {
this.isShow = true
......@@ -51,7 +77,7 @@ export default {
},
},
},
data () {
data() {
return {
btnLoading: false,
isShow: false,
......@@ -61,18 +87,19 @@ export default {
// 西藏对接数据
userToken: null,
appToken: null,
appId: zzwxtCloud.appId
appId: zzwxtCloud.appId,
}
},
async mounted () {
function getIPs (callback) {
var ip_dups = {};
async mounted() {
function getIPs(callback) {
var ip_dups = {}
//compatibility for firefox and chrome
var RTCPeerConnection = window.RTCPeerConnection
|| window.mozRTCPeerConnection
|| window.webkitRTCPeerConnection;
var useWebKit = !!window.webkitRTCPeerConnection;
var RTCPeerConnection =
window.RTCPeerConnection ||
window.mozRTCPeerConnection ||
window.webkitRTCPeerConnection
var useWebKit = !!window.webkitRTCPeerConnection
//bypass naive webrtc blocking using an iframe
if (!RTCPeerConnection) {
......@@ -81,65 +108,68 @@ export default {
//<iframe id="iframe" sandbox="allow-same-origin" style="display: none"></iframe>
//<script>...getIPs called in here...
//
var win = iframe.contentWindow;
RTCPeerConnection = win.RTCPeerConnection
|| win.mozRTCPeerConnection
|| win.webkitRTCPeerConnection;
useWebKit = !!win.webkitRTCPeerConnection;
var win = iframe.contentWindow
RTCPeerConnection =
win.RTCPeerConnection ||
win.mozRTCPeerConnection ||
win.webkitRTCPeerConnection
useWebKit = !!win.webkitRTCPeerConnection
}
//minimal requirements for data connection
var mediaConstraints = {
optional: [{ RtpDataChannels: true }]
};
optional: [{ RtpDataChannels: true }],
}
// iceServers: [{ urls: "stun:stun.services.mozilla.com" }],
var servers = { iceServers: [{ urls: "stun:stun.l.google.com:19302" }] };
var servers = { iceServers: [{ urls: 'stun:stun.l.google.com:19302' }] }
//construct a new RTCPeerConnection
var pc = new RTCPeerConnection(servers, mediaConstraints);
var pc = new RTCPeerConnection(servers, mediaConstraints)
function handleCandidate (candidate) {
function handleCandidate(candidate) {
//match just the IP address
var ip_regex = /([0-9]{1,3}(\.[0-9]{1,3}){3}|[a-f0-9]{1,4}(:[a-f0-9]{1,4}){7})/
var ip_addr = ip_regex.exec(candidate)[1];
var ip_regex =
/([0-9]{1,3}(\.[0-9]{1,3}){3}|[a-f0-9]{1,4}(:[a-f0-9]{1,4}){7})/
var ip_addr = ip_regex.exec(candidate)[1]
//remove duplicates
if (ip_dups[ip_addr] === undefined)
callback(ip_addr);
if (ip_dups[ip_addr] === undefined) callback(ip_addr)
ip_dups[ip_addr] = true;
ip_dups[ip_addr] = true
}
//listen for candidate events
pc.onicecandidate = function (ice) {
//skip non-candidate events
if (ice.candidate)
handleCandidate(ice.candidate.candidate);
};
if (ice.candidate) handleCandidate(ice.candidate.candidate)
}
//create a bogus data channel
pc.createDataChannel("");
pc.createDataChannel('')
//create an offer sdp
pc.createOffer(function (result) {
pc.createOffer(
function (result) {
//trigger the stun server request
pc.setLocalDescription(result, function () { }, function () { });
}, function () { });
pc.setLocalDescription(
result,
function () {},
function () {}
)
},
function () {}
)
//wait for a while to let everything done
setTimeout(function () {
//read candidate info from local description
var lines = pc.localDescription.sdp.split('\n');
var lines = pc.localDescription.sdp.split('\n')
lines.forEach(function (line) {
if (line.indexOf('a=candidate:') === 0)
handleCandidate(line);
});
}, 1000);
if (line.indexOf('a=candidate:') === 0) handleCandidate(line)
})
}, 1000)
}
//insert IP addresses into the page
// let ipRes = await new Promise((resolve, reject) => {
......@@ -159,20 +189,28 @@ export default {
// this.ip = ipRes
// console.log(this.ip);
// localStorage.setItem("userIP", ipRes); // 存入 参数: 1.调用的值 2.所要存入的数据
window.RTCPeerConnection = window.RTCPeerConnection || window.mozRTCPeerConnection || window.webkitRTCPeerConnection;
var pc = new RTCPeerConnection({ iceServers: [] }), noop = function () { };
pc.createDataChannel(''); //create a bogus data channel
pc.createOffer(pc.setLocalDescription.bind(pc), noop); // create offer andsetlocaldescription
window.RTCPeerConnection =
window.RTCPeerConnection ||
window.mozRTCPeerConnection ||
window.webkitRTCPeerConnection
var pc = new RTCPeerConnection({ iceServers: [] }),
noop = function () {}
pc.createDataChannel('') //create a bogus data channel
pc.createOffer(pc.setLocalDescription.bind(pc), noop) // create offer andsetlocaldescription
pc.onicecandidate = function (ice) {
if (ice && ice.candidate && ice.candidate.candidate) {
var myIP = /([0-9]{1,3}(\.[0-9]{1,3}){3}|[a-f0-9]{1,4}(:[a-f0-9]{1,4}){7})/.exec(ice.candidate.candidate)[1];
console.log('my IP: ', myIP); //【注:ice.candidate.address也可以拿到值】
localStorage.setItem("userIP", myIP);
pc.onicecandidate = noop; 10
var myIP =
/([0-9]{1,3}(\.[0-9]{1,3}){3}|[a-f0-9]{1,4}(:[a-f0-9]{1,4}){7})/.exec(
ice.candidate.candidate
)[1]
console.log('my IP: ', myIP) //【注:ice.candidate.address也可以拿到值】
localStorage.setItem('userIP', myIP)
pc.onicecandidate = noop
10
}
}
};
// localStorage.setItem("userIP", '192.168.1.3'); // 存入 参数: 1.调用的值 2.所要存入的数据
console.log(localStorage.getItem("userIP")); // 输出
console.log(localStorage.getItem('userIP')) // 输出
// document.cookie = '_idp_session=asiodnsaondoaisndosandosando==='
// removeCookie()
......@@ -181,18 +219,18 @@ export default {
// console.log(navigator);
// TODO 放开注释
// this.TibetChange()
console.log(zzwxtCloud);
console.log(zzwxtCloud.appId);
console.log(this.appId);
console.log(zzwxtCloud.applicationUrl);
console.log(zzwxtCloud.authenticatedUrl);
console.log(zzwxtCloud.logoutUrl);
console.log(zzwxtCloud)
console.log(zzwxtCloud.appId)
console.log(this.appId)
console.log(zzwxtCloud.applicationUrl)
console.log(zzwxtCloud.authenticatedUrl)
console.log(zzwxtCloud.logoutUrl)
// this.systemInfoRegister()
// this.sendLog()
},
methods: {
// 登录
login (userinfo) {
login(userinfo) {
let me = this
me.btnLoading = true
this.$axios({
......@@ -201,10 +239,11 @@ export default {
data: qs.stringify(userinfo),
headers: {
'Content-Type': 'application/x-www-form-urlencoded',
'appToken': me.appToken,
'token': me.userToken
appToken: me.appToken,
token: me.userToken,
},
}).then(async (res) => {
})
.then(async (res) => {
me.btnLoading = false
if (res.data.code == 200) {
localStorage.setItem('token', res.data.token)
......@@ -212,36 +251,39 @@ export default {
user.setUser(res.data.userInfo)
// this.$root.tmType = res.data.declassified
console.log(res.data.declassified);
console.log(res.data.declassified)
this.$store.commit('tm/changeTmType', res.data.declassified) // 脱密
console.log(this.$store.state.tm.tmType);
console.log(this.$store.state.tm.tmType)
this.$message.success(this.$t('Login.login_success_tip'))
// this.$message({
// message: this.$t('Login.login_success_tip'),
// duration: 0
// })
//所在单位数据
await this.$store.dispatch("ljk/_ljkRy") // 获取用户人员逻辑库JSON
await this.$store.dispatch("ljk/_ljkAj") // 获取用户案件逻辑库JSON
await this.$store.dispatch("ljk/_ljkAll") // 获取用户所有逻辑库名称NAME
console.log(this.$store.state.ljk.targetOptions_ry);
this.$router.push("/index");
this.$bus.emit("goLogin");
this.$store.commit("layout/setMenu", res.data.auth);
await this.$store.dispatch('ljk/_ljkRy') // 获取用户人员逻辑库JSON
await this.$store.dispatch('ljk/_ljkAj') // 获取用户案件逻辑库JSON
await this.$store.dispatch('ljk/_ljkAll') // 获取用户所有逻辑库名称NAME
console.log(this.$store.state.ljk.targetOptions_ry)
this.$router.push('/index')
this.$bus.emit('goLogin')
this.$store.commit('layout/setMenu', res.data.auth)
// TODO 上传登录日志
// 注册
// await this.systemInfoRegister()
// 日志采集
// this.sendLog()
} else {
this.$message.error(res.data.message)
}
}).catch(err => {
console.log(err);
})
.catch((err) => {
console.log(err)
})
},
// 西藏默认登录逻辑
TibetChange () {
TibetChange() {
// TODO 新增用户默认数据
/**
* idCard: "130481199706122335"
......@@ -269,51 +311,60 @@ export default {
url: zzwxtCloud.applicationUrl,
params: {
appId: self.appId,
userToken: self.userToken
}
}).then(res => {
userToken: self.userToken,
},
})
.then((res) => {
if (res.data.tag == 'fail') {
self.$message.error(res.data.msg.info)
setTimeout(() => {
self.$axios({
self
.$axios({
method: 'get',
url: zzwxtCloud.logoutUrl
}).then(quit => {
url: zzwxtCloud.logoutUrl,
})
.then((quit) => {
localStorage.clear()
removeCookie()
top.location.href = zzwxtCloud.zzwxt
}).catch(err => {
})
.catch((err) => {
// this.$message.error('退出失败!')
})
}, 1000);
}, 1000)
} else {
// 2.获取当前应用令牌接口 -- 成功
self.appToken = res.data.result.appToken
// 存储到localStorage
localStorage.setItem('appToken', self.appToken)
// 3.获取认证用户
self.$axios({
self
.$axios({
method: 'post',
url: zzwxtCloud.authenticatedUrl,
params: {
appId: self.appId,
userToken: self.userToken
}
}).then(infoRes => {
userToken: self.userToken,
},
})
.then((infoRes) => {
if (infoRes.data.tag == 'fail') {
self.$message.error(infoRes.data.msg.info)
setTimeout(() => {
self.$axios({
self
.$axios({
method: 'get',
url: zzwxtCloud.logoutUrl
}).then(quit => {
url: zzwxtCloud.logoutUrl,
})
.then((quit) => {
localStorage.clear()
removeCookie()
top.location.href = zzwxtCloud.zzwxt
}).catch(err => {
})
.catch((err) => {
// this.$message.error('退出失败!')
})
}, 1000);
}, 1000)
} else {
// 3.获取认证用户 -- 成功
// 获取返回的用户信息
......@@ -330,47 +381,58 @@ export default {
// self.login(userInfo)
// 4.调用新增人员
self.$axios({
self
.$axios({
method: 'post',
url: '/security/users/create',
data: {
idCard: sfzh,
identityCard: "",
identityCard: '',
name: xm,
okpassword: "123456",
password: "123456",
phoneNumber: "",
okpassword: '123456',
password: '123456',
phoneNumber: '',
policeNumber: jh,
roleId: "",
roleId: '',
status: 1,
unitCode: dwdm,
unitName: dwmc,
userGroupId: "",
userGroupId: '',
// username: "Tibet"
username: sfzh
}
}).then(xzryRes => {
if (xzryRes.data.code == 201 || xzryRes.data.code == 400) {
username: sfzh,
},
})
.then((xzryRes) => {
if (
xzryRes.data.code == 201 ||
xzryRes.data.code == 400
) {
// 201 新建成功,登录用户
// 400 用户名已存在 -- 走登录逻辑
let userInfo = { username: sfzh, password: '123456' }
// 4.开始登录
self.login(userInfo)
} else if (xzryRes.data.code == 404 || xzryRes.data.code == 500) {
} else if (
xzryRes.data.code == 404 ||
xzryRes.data.code == 500
) {
this.$message.error(this.$t('Common.server_not_find'))
}
}).catch(xzryErr => {
})
.catch((xzryErr) => {
// 新增人员报错
})
}
}).catch(infoErr => {
})
.catch((infoErr) => {
// 3.获取认证用户 -- 失败
location.reload();
location.reload()
})
}
}).catch(err => {
})
.catch((err) => {
// 2.获取当前应用令牌接口 -- 失败
location.reload();
location.reload()
})
},
/**
......@@ -378,19 +440,18 @@ export default {
* @param {*} name
* @return {*}
*/
getCookie (name) {
var arr, reg = new RegExp("(^| )" + name + "=([^;]*)(;|$)");
if (arr = document.cookie.match(reg))
return unescape(arr[2]);
else
return null;
getCookie(name) {
var arr,
reg = new RegExp('(^| )' + name + '=([^;]*)(;|$)')
if ((arr = document.cookie.match(reg))) return unescape(arr[2])
else return null
},
/**
* @name: md5校验
* @param {String} str
* @return {*}
*/
checkMd5 (str) {
checkMd5(str) {
return this.$md5(str)
},
/**
......@@ -398,7 +459,7 @@ export default {
* @param {*}
* @return {*}
*/
async systemInfoRegister () {
async systemInfoRegister() {
let data = {
sysType: '02',
sysCode: zzwxtCloud.appId,
......@@ -406,14 +467,16 @@ export default {
onlinetime: parseInt(new Date().getTime() / 1000) + '',
trustIpList: '0',
targetIpList: '0',
checkSum: ''
checkSum: '',
}
data.checkSum = this.checkMd5(`${data.sysType}&${data.sysCode}&${data.sysDesc}&${data.onlinetime}&${data.trustIpList}&${data.targetIpList}`)
data.checkSum = this.checkMd5(
`${data.sysType}&${data.sysCode}&${data.sysDesc}&${data.onlinetime}&${data.trustIpList}&${data.targetIpList}`
)
this.$axios({
method: 'post',
url: zzwxtCloud.systemInfoRegisterUrl,
data: data
}).then(res => {
data: data,
}).then((res) => {
// 存储系统唯一编号 sysId
localStorage.setItem('sysId', res.data.sysId)
})
......@@ -423,19 +486,20 @@ export default {
* @param {*}
* @return {*}
*/
sendLog () {
sendLog() {
// xxx在xxx时间[操作类型][操作对象类型]:[操作对象名称]
// 例:张三在2021-02-04 12:12:50审批任务:李四角色申请任务
// 查询规范
let time = this.$moment(new Date()).format('YYYY-MM-DD HH:mm:ss')
let name = JSON.parse(localStorage.getItem('userInfo')).user.name
let idCard = JSON.parse(localStorage.getItem('userInfo')).user.idCard
let policeNumber = JSON.parse(localStorage.getItem('userInfo')).user.policeNumber
let policeNumber = JSON.parse(localStorage.getItem('userInfo')).user
.policeNumber
let unitName = JSON.parse(localStorage.getItem('userInfo')).user.unitName
let unitCode = JSON.parse(localStorage.getItem('userInfo')).user.unitCode
let objString = {
operateTime: time,
content: '方正指掌纹系统用户认证'
content: '方正指掌纹系统用户认证',
}
let logContents = []
logContents.push(JSON.stringify(objString))
......@@ -454,17 +518,17 @@ export default {
data: JSON.stringify(data),
headers: {
'Content-Type': 'application/json;charset=UTF-8',
'appToken': this.appToken,
'token': this.userToken
}
}).then(res => {
console.log(res);
appToken: this.appToken,
token: this.userToken,
},
}).then((res) => {
console.log(res)
})
},
ceshi () {
ceshi() {
let objString = {
operateTime: '2022-03-28 21:00:38',
content: '方正指掌纹系统用户认证'
content: '方正指掌纹系统用户认证',
}
let logContents = []
logContents.push(JSON.stringify(objString))
......@@ -473,16 +537,16 @@ export default {
sysId: zzwxtCloud.sysId,
logType: '001',
logContents: logContents,
checkSum: ''
checkSum: '',
// checkSum: '122cea8151d914f74667081a4bfc11e9',
}
// let r = this.utf8ByteToUnicodeStr(`${data.sysId}&${data.logType}&${data.logContents}`)
let r = (`${data.sysId}&${data.logType}&${data.logContents[0]}`)
console.log(r);
let r = `${data.sysId}&${data.logType}&${data.logContents[0]}`
console.log(r)
let s = this.checkMd5(r)
data.checkSum = s
console.log(s);
console.log(JSON.stringify(data));
console.log(s)
console.log(JSON.stringify(data))
},
},
}
......@@ -615,3 +679,9 @@ input {
}
}
</style>
<style lang="scss">
.el-message {
z-index: 999999 !important;
justify-content: flex-start !important;
}
</style>
/*
* @Author: your name
* @Date: 2021-09-07 09:57:48
* @LastEditTime: 2022-04-15 17:46:08
* @LastEditTime: 2022-04-20 16:38:45
* @LastEditors: Please set LastEditors
* @Description: In User Settings Edit
* @FilePath: \指纹系统\founder_vue\vue.config.js
......@@ -104,11 +104,11 @@ 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.43.24:8099", // 西藏 张
// target: "http://192.168.0.108:8099", // 西藏 马
// target: "http://192.168.0.109:8099", // 西藏 张
target: "http://192.168.0.134:8099", // 西藏 马
ws: true,
changeOrigin: true,
pathRewrite: {
......
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