fix: BUG修改
This commit is contained in:
parent
6f1539326d
commit
5542841cd3
@ -84,7 +84,7 @@ if (process.env.NODE_ENV == 'development') {
|
||||
// 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: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://182.90.224.237:51234' //郭圣雄远程
|
||||
// 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:8099/'//中建四局(沙湖)线上(最新)地址
|
||||
// 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/'//测试地址
|
||||
|
||||
|
||||
|
||||
@ -471,8 +471,8 @@ export default {
|
||||
console.log("当前跳转链接", this.newBigScreen);
|
||||
//-------------------- 跳转新版七参数
|
||||
this.jumpToken = localStorage.getItem("jumpToken");
|
||||
// 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(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过去
|
||||
}
|
||||
// if (this.newBigScreen != null) {
|
||||
// console.log("当前跳转链接",this.newBigScreen)
|
||||
|
||||
@ -48,23 +48,23 @@ export default new Vuex.Store({
|
||||
PAGESIZRS: [10, 20, 30, 50],
|
||||
// UPLOADURL:' http://101.43.164.214:11111/upload/image/',// 百色
|
||||
// FILEURL:' http://101.43.164.214:11111/image/',// 百色
|
||||
UPLOADURL:'http://192.168.34.221:9111/upload/image/',// 郭圣雄
|
||||
FILEURL:'http://192.168.34.221:9111/image/',//郭圣雄
|
||||
WORKFLOWURL: 'http://192.168.34.138:88/#/workspace/forms',//测试工作流地址(本地)
|
||||
// UPLOADURL:'http://192.168.34.221:9111/upload/image/',// 郭圣雄
|
||||
// FILEURL:'http://192.168.34.221:9111/image/',//郭圣雄
|
||||
// WORKFLOWURL: 'http://192.168.34.138:88/#/workspace/forms',//测试工作流地址(本地)
|
||||
// UPLOADURL:'http://jxj.zhgdyun.com:15551/upload/image',//测试
|
||||
// FILEURL:'http://jxj.zhgdyun.com:15551/image/',//测试
|
||||
|
||||
// BASEURL: baseUrl
|
||||
// ? baseUrl
|
||||
// : window.location.protocol + "//" + window.location.host + "/", //正式环境
|
||||
// UPLOADURL:
|
||||
// window.location.protocol +
|
||||
// "//" +
|
||||
// window.location.host +
|
||||
// "/upload/image", //正式环境
|
||||
// FILEURL: window.location.protocol + "//" + window.location.host + "/image/", //正式环境
|
||||
BASEURL: baseUrl
|
||||
? baseUrl
|
||||
: window.location.protocol + "//" + window.location.host + "/", //正式环境
|
||||
UPLOADURL:
|
||||
window.location.protocol +
|
||||
"//" +
|
||||
window.location.host +
|
||||
"/upload/image", //正式环境
|
||||
FILEURL: window.location.protocol + "//" + window.location.host + "/image/", //正式环境
|
||||
// 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
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<!-- 登录 -->
|
||||
<div>
|
||||
<div v-if="isShowContent">
|
||||
<div class="login" v-if="projectType == 'common'">
|
||||
<div class="title flex">
|
||||
<div class="title_l flex2">
|
||||
@ -407,6 +407,7 @@ import {
|
||||
companyLoginApi,
|
||||
projectLoginApi,
|
||||
newRegisterApi,
|
||||
jumpLargeUserInfoApi
|
||||
} from "@/assets/js/api/loginSign";
|
||||
import { selectSystemLogoConfigApi } from "@/assets/js/api/jxjadmin";
|
||||
import getcode from "@/components/getMsgCode";
|
||||
@ -421,6 +422,7 @@ export default {
|
||||
components: { getcode, LoginInfo },
|
||||
data() {
|
||||
return {
|
||||
isShowContent: false,
|
||||
addPasswordDialog: false,
|
||||
passwordForm: {
|
||||
passWord: "",
|
||||
@ -558,66 +560,127 @@ export default {
|
||||
// }
|
||||
},
|
||||
created() {
|
||||
this.company = COMPANY;
|
||||
this.projectType = PROJECT_TYPE;
|
||||
this.company = COMPANY
|
||||
this.projectType = PROJECT_TYPE
|
||||
setTimeout(() => {
|
||||
//删除401标识
|
||||
sessionStorage.setItem("errorResponse", null);
|
||||
}, 3000);
|
||||
sessionStorage.setItem('errorResponse',null);
|
||||
},3000)
|
||||
if (this.$route.query.headquartersSn) {
|
||||
this.headquartersSnData = 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");
|
||||
}
|
||||
this.headquartersSnData = this.$store.state.userInfo?.headquartersSn ? this.$store.state.userInfo.headquartersSn : ''
|
||||
}
|
||||
//兼容第三方平台接入 ---做免码登录
|
||||
if (window.location.href.indexOf("UID") != -1) {
|
||||
if (window.location.href.indexOf('UID') != -1) {
|
||||
// debugger;
|
||||
this.$store.commit("setUid", true);
|
||||
this.$store.commit('setUid', true)
|
||||
// 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 data = {
|
||||
uid,
|
||||
};
|
||||
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);
|
||||
this.parseLoginData(res.result)
|
||||
} else {
|
||||
this.$message.error(res.message);
|
||||
this.$message.error(res.message)
|
||||
}
|
||||
});
|
||||
})
|
||||
}
|
||||
// else if(){}
|
||||
else {
|
||||
this.$store.commit("setUid", false);
|
||||
this.getDetail(this.headquartersSnData);
|
||||
this.getData();
|
||||
else if(window.location.href.indexOf("token") != -1){
|
||||
const newToken = window.location.href.split("token=")[1];
|
||||
const data = { token: newToken };
|
||||
jumpLargeUserInfoApi(data).then((res) => {
|
||||
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: {
|
||||
// 去登录
|
||||
goLogin() {
|
||||
@ -963,12 +1026,14 @@ export default {
|
||||
}
|
||||
});
|
||||
},
|
||||
parseLoginData(data) {
|
||||
parseLoginData(data,isOutside) {
|
||||
if (this.projectType == "zjsj") {
|
||||
this.$store.commit("setProjectSn", data.sn);
|
||||
}
|
||||
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"] =
|
||||
"Bearer" + " " + data.token;
|
||||
this.$http.defaults.headers.common["operateId"] = data.userId;
|
||||
|
||||
@ -897,7 +897,7 @@
|
||||
</el-col>
|
||||
|
||||
</el-row>
|
||||
<el-row :gutter="24">
|
||||
<el-row :gutter="24" v-if="workerInfo.devType == 1">
|
||||
<el-col :span="12">
|
||||
<el-form-item
|
||||
:label="$t('message.laborMange.faceDevice')"
|
||||
@ -938,6 +938,47 @@
|
||||
</el-col>
|
||||
|
||||
</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-row>
|
||||
</el-form>
|
||||
@ -2207,6 +2248,7 @@ import {
|
||||
checkFaceApi,
|
||||
workerAttendanceRuleList,
|
||||
ufaceDevList,
|
||||
getGroupListApi,
|
||||
checkImgLibraryApi,
|
||||
} from "@/assets/js/api/laborPerson.js";
|
||||
import { getProjectConfigListApi } from "@/assets/js/api/project.js";
|
||||
@ -2224,6 +2266,7 @@ export default {
|
||||
radio: "",
|
||||
showImgList: false,
|
||||
ufaceDevAllList: [],
|
||||
uGroupAllList: [],
|
||||
uploadUrl: "",
|
||||
fileUrl: "",
|
||||
userId: "",
|
||||
@ -2231,6 +2274,7 @@ export default {
|
||||
originalData: {}, // 获取的详情信息原数据. 用作判断 不作修改
|
||||
workerInfo: {
|
||||
ufaceDevId: [],
|
||||
uGroupId: [],
|
||||
}, //基本 详情信息
|
||||
contractList: [], //合同信息
|
||||
certificateList: [], //证书
|
||||
@ -2273,8 +2317,11 @@ export default {
|
||||
},
|
||||
cropperDialog: false,
|
||||
ufaceDevNameList: [],
|
||||
uGroupNameList: [],
|
||||
isIndeterminate2: false,
|
||||
isIndeterminate3: false,
|
||||
checkAllFaceDev: false,
|
||||
checkAllGroup: false,
|
||||
imgRadiolist: [],
|
||||
isSzProject: "",
|
||||
projectSn: "",
|
||||
@ -2322,6 +2369,35 @@ export default {
|
||||
// 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) {
|
||||
if (val) {
|
||||
this.workerInfo.ufaceDevId = [];
|
||||
@ -2352,6 +2428,42 @@ export default {
|
||||
checkedCount > 0 && checkedCount < allCheckList.length;
|
||||
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() {
|
||||
ufaceDevList({ projectSn: this.$store.state.projectSn }).then((res) => {
|
||||
@ -2905,7 +3017,9 @@ export default {
|
||||
} else if(type == 8){
|
||||
this.cropperEditTitle = "身份证头像裁剪"
|
||||
}
|
||||
this.dialogVisible = true;
|
||||
if(this.basicInfoStatus){
|
||||
this.dialogVisible = true;
|
||||
}
|
||||
} else if (name != {}) {
|
||||
let url = this.$http.defaults.baseURL + 'xmgl/upload/getRenameFile?fileUrl=' + this.fileUrl + itemUrl + '&fileName=' + itemName
|
||||
window.location.href = url;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user