fix: BUG修改

This commit is contained in:
kun 2024-04-17 09:06:37 +08:00
parent 6f1539326d
commit 5542841cd3
5 changed files with 242 additions and 63 deletions

View File

@ -84,7 +84,7 @@ if (process.env.NODE_ENV == 'development') {
// axios.defaults.baseURL ='http://101.43.164.214:45011/' //上海优益(上海建工) // axios.defaults.baseURL ='http://101.43.164.214:45011/' //上海优益(上海建工)
// axios.defaults.baseURL = 'http://192.168.34.221:28888/' //郭圣雄本地 // axios.defaults.baseURL = 'http://192.168.34.221:28888/' //郭圣雄本地
// axios.defaults.baseURL = 'http://192.168.34.221:28889/' //郭圣雄本地 // axios.defaults.baseURL = 'http://192.168.34.221:28889/' //郭圣雄本地
axios.defaults.baseURL ='http://192.168.34.221:9111/' //郭圣雄本地 // axios.defaults.baseURL ='http://192.168.34.221:9111/' //郭圣雄本地
// axios.defaults.baseURL = 'http://192.168.34.155:19111/' //彭洁本地 // axios.defaults.baseURL = 'http://192.168.34.155:19111/' //彭洁本地
// axios.defaults.baseURL = 'http://182.90.224.237:51234' //郭圣雄远程 // axios.defaults.baseURL = 'http://182.90.224.237:51234' //郭圣雄远程
// axios.defaults.baseURL ='http://101.43.164.214:45020/' //沈阳和盈 // axios.defaults.baseURL ='http://101.43.164.214:45020/' //沈阳和盈
@ -93,7 +93,7 @@ if (process.env.NODE_ENV == 'development') {
// axios.defaults.baseURL = 'http://125.88.207.86:8088/'//中建四局线上(最新)地址 // axios.defaults.baseURL = 'http://125.88.207.86:8088/'//中建四局线上(最新)地址
// axios.defaults.baseURL = 'http://125.88.207.86:8099/'//中建四局(沙湖)线上(最新)地址 // axios.defaults.baseURL = 'http://125.88.207.86:8099/'//中建四局(沙湖)线上(最新)地址
// axios.defaults.baseURL = 'http://jxj.zhgdyun.com:15551/'//测试地址 // axios.defaults.baseURL = 'http://jxj.zhgdyun.com:15551/'//测试地址
// axios.defaults.baseURL = 'http://47.93.215.234:9809/'//测试地址 axios.defaults.baseURL = 'http://47.93.215.234:9809/'//测试地址
// axios.defaults.baseURL = 'http://jxj.zhgdyun.com:19814/'//测试地址 // axios.defaults.baseURL = 'http://jxj.zhgdyun.com:19814/'//测试地址

View File

@ -471,8 +471,8 @@ export default {
console.log("当前跳转链接", this.newBigScreen); console.log("当前跳转链接", this.newBigScreen);
//-------------------- //--------------------
this.jumpToken = localStorage.getItem("jumpToken"); this.jumpToken = localStorage.getItem("jumpToken");
// window.open(this.newBigScreen + "?token=" + this.jumpToken + '&sn=' + this.$store.state.projectSn, "_self"); window.open(this.newBigScreen + "?token=" + this.jumpToken + '&sn=' + this.$store.state.projectSn, "_self");
window.open('http://192.168.34.138:8081/#/large?token=' + this.jumpToken + '&sn=' + this.$store.state.projectSn, "_self")//token // window.open('http://192.168.34.138:8081/#/large?token=' + this.jumpToken + '&sn=' + this.$store.state.projectSn, "_self")//token
} }
// if (this.newBigScreen != null) { // if (this.newBigScreen != null) {
// console.log("",this.newBigScreen) // console.log("",this.newBigScreen)

View File

@ -48,23 +48,23 @@ export default new Vuex.Store({
PAGESIZRS: [10, 20, 30, 50], PAGESIZRS: [10, 20, 30, 50],
// UPLOADURL:' http://101.43.164.214:11111/upload/image/',// 百色 // UPLOADURL:' http://101.43.164.214:11111/upload/image/',// 百色
// FILEURL:' http://101.43.164.214:11111/image/',// 百色 // FILEURL:' http://101.43.164.214:11111/image/',// 百色
UPLOADURL:'http://192.168.34.221:9111/upload/image/',// 郭圣雄 // UPLOADURL:'http://192.168.34.221:9111/upload/image/',// 郭圣雄
FILEURL:'http://192.168.34.221:9111/image/',//郭圣雄 // FILEURL:'http://192.168.34.221:9111/image/',//郭圣雄
WORKFLOWURL: 'http://192.168.34.138:88/#/workspace/forms',//测试工作流地址(本地) // WORKFLOWURL: 'http://192.168.34.138:88/#/workspace/forms',//测试工作流地址(本地)
// UPLOADURL:'http://jxj.zhgdyun.com:15551/upload/image',//测试 // UPLOADURL:'http://jxj.zhgdyun.com:15551/upload/image',//测试
// FILEURL:'http://jxj.zhgdyun.com:15551/image/',//测试 // FILEURL:'http://jxj.zhgdyun.com:15551/image/',//测试
// BASEURL: baseUrl BASEURL: baseUrl
// ? baseUrl ? baseUrl
// : window.location.protocol + "//" + window.location.host + "/", //正式环境 : window.location.protocol + "//" + window.location.host + "/", //正式环境
// UPLOADURL: UPLOADURL:
// window.location.protocol + window.location.protocol +
// "//" + "//" +
// window.location.host + window.location.host +
// "/upload/image", //正式环境 "/upload/image", //正式环境
// FILEURL: window.location.protocol + "//" + window.location.host + "/image/", //正式环境 FILEURL: window.location.protocol + "//" + window.location.host + "/image/", //正式环境
// WORKFLOWURL: 'http://182.90.224.237:9811/#/workspace/forms',//测试平台工作流地址 // WORKFLOWURL: 'http://182.90.224.237:9811/#/workspace/forms',//测试平台工作流地址
// WORKFLOWURL: 'http://182.90.224.237:9814/#/workspace/forms',//鞍钢平台工作流地址 WORKFLOWURL: 'http://182.90.224.237:9814/#/workspace/forms',//鞍钢平台工作流地址
//--------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------
// BASEURL: baseUrl // BASEURL: baseUrl
// ? baseUrl // ? baseUrl

View File

@ -1,6 +1,6 @@
<template> <template>
<!-- 登录 --> <!-- 登录 -->
<div> <div v-if="isShowContent">
<div class="login" v-if="projectType == 'common'"> <div class="login" v-if="projectType == 'common'">
<div class="title flex"> <div class="title flex">
<div class="title_l flex2"> <div class="title_l flex2">
@ -407,6 +407,7 @@ import {
companyLoginApi, companyLoginApi,
projectLoginApi, projectLoginApi,
newRegisterApi, newRegisterApi,
jumpLargeUserInfoApi
} from "@/assets/js/api/loginSign"; } from "@/assets/js/api/loginSign";
import { selectSystemLogoConfigApi } from "@/assets/js/api/jxjadmin"; import { selectSystemLogoConfigApi } from "@/assets/js/api/jxjadmin";
import getcode from "@/components/getMsgCode"; import getcode from "@/components/getMsgCode";
@ -421,6 +422,7 @@ export default {
components: { getcode, LoginInfo }, components: { getcode, LoginInfo },
data() { data() {
return { return {
isShowContent: false,
addPasswordDialog: false, addPasswordDialog: false,
passwordForm: { passwordForm: {
passWord: "", passWord: "",
@ -558,66 +560,127 @@ export default {
// } // }
}, },
created() { created() {
this.company = COMPANY; this.company = COMPANY
this.projectType = PROJECT_TYPE; this.projectType = PROJECT_TYPE
setTimeout(() => { setTimeout(() => {
//401 //401
sessionStorage.setItem("errorResponse", null); sessionStorage.setItem('errorResponse',null);
}, 3000); },3000)
if (this.$route.query.headquartersSn) { if (this.$route.query.headquartersSn) {
this.headquartersSnData = this.$route.query.headquartersSn; this.headquartersSnData = this.$route.query.headquartersSn
} else { } else {
this.headquartersSnData = this.$store.state.userInfo?.headquartersSn this.headquartersSnData = this.$store.state.userInfo?.headquartersSn ? this.$store.state.userInfo.headquartersSn : ''
? this.$store.state.userInfo?.headquartersSn
: "";
}
},
mounted() {
// this.$bus.$on('resetSlideVerify',this.onReset)
delete this.$http.defaults.headers.common["Authorization"];
if (window.location.href.indexOf("type=lgzbdp") != -1) {
window.localStorage.setItem("isIframe", "1");
} else {
if (window.localStorage.getItem("isIframe")) {
window.localStorage.removeItem("isIframe");
}
} }
// --- // ---
if (window.location.href.indexOf("UID") != -1) { if (window.location.href.indexOf('UID') != -1) {
// debugger; // debugger;
this.$store.commit("setUid", true); this.$store.commit('setUid', true)
// let str = window.location.href.split("UID=")[1]; // let str = window.location.href.split("UID=")[1];
let uid = window.location.href.split("UID=")[1]; let uid = window.location.href.split('UID=')[1]
// let uid = str.substring(0, str.length - 7); // let uid = str.substring(0, str.length - 7);
let data = { let data = {
uid, uid
}; }
// //
getUserByUidApi(data).then((res) => { getUserByUidApi(data).then((res) => {
if (res.code == 200) { if (res.code == 200) {
// //
// () this.parseLoginData(res.result)
if (this.loginType == 1 && res.result.accountType == 11) {
this.$message.error("当前登录账号与所选登录方式不符,无法登录");
return;
}
if (this.loginType == 2 && res.result.accountType != 11) {
this.$message.error("当前登录账号与所选登录方式不符,无法登录");
return;
}
this.parseLoginData(res.result);
} else { } else {
this.$message.error(res.message); this.$message.error(res.message)
} }
}); })
} }
// else if(){} else if(window.location.href.indexOf("token") != -1){
else { const newToken = window.location.href.split("token=")[1];
this.$store.commit("setUid", false); const data = { token: newToken };
this.getDetail(this.headquartersSnData); jumpLargeUserInfoApi(data).then((res) => {
this.getData(); if (res.code == 200) {
//
this.parseLoginData(res.result, true)
} else {
this.$message.error(res.message)
}
})
} else {
this.isShowContent = true;
this.$store.commit('setUid', false)
this.getDetail(this.headquartersSnData)
this.getData()
} }
}, },
mounted() {
// this.$bus.$on('resetSlideVerify',this.onReset)
delete this.$http.defaults.headers.common['Authorization']
if (window.location.href.indexOf('type=lgzbdp') != -1) {
window.localStorage.setItem('isIframe', '1')
} else {
if (window.localStorage.getItem('isIframe')) {
window.localStorage.removeItem('isIframe')
}
}
},
// created() {
// this.company = COMPANY;
// this.projectType = PROJECT_TYPE;
// setTimeout(() => {
// //401
// sessionStorage.setItem("errorResponse", null);
// }, 3000);
// if (this.$route.query.headquartersSn) {
// this.headquartersSnData = this.$route.query.headquartersSn;
// } else {
// this.headquartersSnData = this.$store.state.userInfo?.headquartersSn
// ? this.$store.state.userInfo?.headquartersSn
// : "";
// }
// },
// mounted() {
// // this.$bus.$on('resetSlideVerify',this.onReset)
// delete this.$http.defaults.headers.common["Authorization"];
// if (window.location.href.indexOf("type=lgzbdp") != -1) {
// window.localStorage.setItem("isIframe", "1");
// } else {
// if (window.localStorage.getItem("isIframe")) {
// window.localStorage.removeItem("isIframe");
// }
// }
// // ---
// if (window.location.href.indexOf("UID") != -1) {
// // debugger;
// this.$store.commit("setUid", true);
// // let str = window.location.href.split("UID=")[1];
// let uid = window.location.href.split("UID=")[1];
// // let uid = str.substring(0, str.length - 7);
// let data = {
// uid,
// };
// //
// getUserByUidApi(data).then((res) => {
// if (res.code == 200) {
// //
// // ()
// if (this.loginType == 1 && res.result.accountType == 11) {
// this.$message.error("");
// return;
// }
// if (this.loginType == 2 && res.result.accountType != 11) {
// this.$message.error("");
// return;
// }
// this.parseLoginData(res.result);
// } else {
// this.$message.error(res.message);
// }
// });
// }
// // else if(){}
// else {
// this.$store.commit("setUid", false);
// this.getDetail(this.headquartersSnData);
// this.getData();
// }
// },
methods: { methods: {
// //
goLogin() { goLogin() {
@ -963,12 +1026,14 @@ export default {
} }
}); });
}, },
parseLoginData(data) { parseLoginData(data,isOutside) {
if (this.projectType == "zjsj") { if (this.projectType == "zjsj") {
this.$store.commit("setProjectSn", data.sn); this.$store.commit("setProjectSn", data.sn);
} }
window._paq.push(["trackEvent", "点击", "登录", "登录账号"]); window._paq.push(["trackEvent", "点击", "登录", "登录账号"]);
this.$message.success(this.$t("message.login.login_success_msg")); // if(!isOutside){
this.$message.success(this.$t('message.login.login_success_msg')) //
}
this.$http.defaults.headers.common["Authorization"] = this.$http.defaults.headers.common["Authorization"] =
"Bearer" + " " + data.token; "Bearer" + " " + data.token;
this.$http.defaults.headers.common["operateId"] = data.userId; this.$http.defaults.headers.common["operateId"] = data.userId;

View File

@ -897,7 +897,7 @@
</el-col> </el-col>
</el-row> </el-row>
<el-row :gutter="24"> <el-row :gutter="24" v-if="workerInfo.devType == 1">
<el-col :span="12"> <el-col :span="12">
<el-form-item <el-form-item
:label="$t('message.laborMange.faceDevice')" :label="$t('message.laborMange.faceDevice')"
@ -938,6 +938,47 @@
</el-col> </el-col>
</el-row> </el-row>
<el-row :gutter="24" v-if="workerInfo.devType == 2">
<el-col :span="12">
<el-form-item
label="分组"
prop="uGroupId"
>
<!-- <div v-if="detailInfoStatus"> -->
<el-checkbox
v-if="detailInfoStatus"
:indeterminate="isIndeterminate3"
v-model="checkAllGroup"
@change="handleCheckAllChangeGroup"
>{{ $t('message.laborMange.checkAll') }}</el-checkbox
>
<el-checkbox-group
v-if="detailInfoStatus"
v-model="workerInfo.uGroupId"
@change="uGroupIdChange"
>
<el-checkbox
v-for="(item, index) in uGroupAllList"
:key="item.id"
:label="item.id"
:disabled="item.disabled"
>
{{ item.name }}
</el-checkbox>
</el-checkbox-group>
<!-- </div> -->
<div v-else>
<span
v-for="(item, index) in ufaceDevNameList"
:key="index"
>
{{ item }}
</span>
</div>
</el-form-item>
</el-col>
</el-row>
</el-col> </el-col>
</el-row> </el-row>
</el-form> </el-form>
@ -2207,6 +2248,7 @@ import {
checkFaceApi, checkFaceApi,
workerAttendanceRuleList, workerAttendanceRuleList,
ufaceDevList, ufaceDevList,
getGroupListApi,
checkImgLibraryApi, checkImgLibraryApi,
} from "@/assets/js/api/laborPerson.js"; } from "@/assets/js/api/laborPerson.js";
import { getProjectConfigListApi } from "@/assets/js/api/project.js"; import { getProjectConfigListApi } from "@/assets/js/api/project.js";
@ -2224,6 +2266,7 @@ export default {
radio: "", radio: "",
showImgList: false, showImgList: false,
ufaceDevAllList: [], ufaceDevAllList: [],
uGroupAllList: [],
uploadUrl: "", uploadUrl: "",
fileUrl: "", fileUrl: "",
userId: "", userId: "",
@ -2231,6 +2274,7 @@ export default {
originalData: {}, // . originalData: {}, // .
workerInfo: { workerInfo: {
ufaceDevId: [], ufaceDevId: [],
uGroupId: [],
}, // }, //
contractList: [], // contractList: [], //
certificateList: [], // certificateList: [], //
@ -2273,8 +2317,11 @@ export default {
}, },
cropperDialog: false, cropperDialog: false,
ufaceDevNameList: [], ufaceDevNameList: [],
uGroupNameList: [],
isIndeterminate2: false, isIndeterminate2: false,
isIndeterminate3: false,
checkAllFaceDev: false, checkAllFaceDev: false,
checkAllGroup: false,
imgRadiolist: [], imgRadiolist: [],
isSzProject: "", isSzProject: "",
projectSn: "", projectSn: "",
@ -2322,6 +2369,35 @@ export default {
// console.log(res.result[0].isSzProject) // console.log(res.result[0].isSzProject)
}); });
}, },
handleCheckAllChangeGroup(val) {
if (val) {
this.workerInfo.uGroupId = [];
this.uGroupAllList.forEach((item) => {
if (!item.disabled) {
this.workerInfo.uGroupId.push(item.id + "");
}
});
} else {
this.workerInfo.uGroupId = [];
}
console.log(val);
this.isIndeterminate3 = false;
},
uGroupIdChange(val) {
let checkedCount = val.length;
let allCheckList = [];
console.log("---------55");
for (let i = 0; i < this.uGroupAllList.length; i++) {
if (!this.uGroupAllList[i].disabled) {
allCheckList.push(this.uGroupAllList[i]);
}
}
// console.log(this.uGroupAllList, allCheckList)
this.checkAllGroup = checkedCount === allCheckList.length;
console.log(allCheckList);
this.isIndeterminate3 =
checkedCount > 0 && checkedCount < allCheckList.length;
},
handleCheckAllChangeFace(val) { handleCheckAllChangeFace(val) {
if (val) { if (val) {
this.workerInfo.ufaceDevId = []; this.workerInfo.ufaceDevId = [];
@ -2352,6 +2428,42 @@ export default {
checkedCount > 0 && checkedCount < allCheckList.length; checkedCount > 0 && checkedCount < allCheckList.length;
console.log(this.workerInfo.ufaceDevId); console.log(this.workerInfo.ufaceDevId);
}, },
//
// getUGroupDevList() {
// getGroupListApi({ projectSn: this.projectSn }).then((res) => {
// console.log(res);
// if (res.code == 200) {
// this.uGroupAllList = res.result;
// console.log(this.uGroupAllList,777888999)
// this.personForm.uGroupId = [...this.personForm.uGroupId];
// if (this.$store.state.userInfo.accountType == 6) {
// this.uGroupAllList.forEach((item) => {
// item.disabled = true;
// });
// selectUserDevAuthorityByUserIdApi({
// userId: this.$store.state.userInfo.userId,
// devType: "2",
// }).then((res) => {
// if (res.code == 200) {
// let arr = res.result.devId.split(",");
// let id = "";
// this.personForm.uGroupId = [];
// for (let i = 0; i < arr.length; i++) {
// console.log(parseInt(arr[i]));
// this.personForm.uGroupId.push(parseInt(arr[i]));
// id = parseInt(arr[i]);
// for (let j = 0; j < this.uGroupAllList.length; j++) {
// if (this.uGroupAllList[j].id == id) {
// this.uGroupAllList[j].disabled = false;
// }
// }
// }
// }
// });
// }
// }
// });
// },
// //
getUfaceDevList() { getUfaceDevList() {
ufaceDevList({ projectSn: this.$store.state.projectSn }).then((res) => { ufaceDevList({ projectSn: this.$store.state.projectSn }).then((res) => {
@ -2905,7 +3017,9 @@ export default {
} else if(type == 8){ } else if(type == 8){
this.cropperEditTitle = "身份证头像裁剪" this.cropperEditTitle = "身份证头像裁剪"
} }
this.dialogVisible = true; if(this.basicInfoStatus){
this.dialogVisible = true;
}
} else if (name != {}) { } else if (name != {}) {
let url = this.$http.defaults.baseURL + 'xmgl/upload/getRenameFile?fileUrl=' + this.fileUrl + itemUrl + '&fileName=' + itemName let url = this.$http.defaults.baseURL + 'xmgl/upload/getRenameFile?fileUrl=' + this.fileUrl + itemUrl + '&fileName=' + itemName
window.location.href = url; window.location.href = url;