Merge branch 'bjxz-dev' into bjxz-rain

This commit is contained in:
”Rain“ 2024-05-22 22:05:25 +08:00
commit 109b34424f
4 changed files with 87 additions and 73 deletions

View File

@ -84,8 +84,8 @@ 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://jxj.zhgdyun.com:61212/' //彭洁远程 // axios.defaults.baseURL = 'http://jxj.zhgdyun.com:61212/' //彭洁远程
// axios.defaults.baseURL ='http://101.43.164.214:45020/' //沈阳和盈 // axios.defaults.baseURL ='http://101.43.164.214:45020/' //沈阳和盈

View File

@ -98,7 +98,7 @@
<img <img
slot="prefix" slot="prefix"
src="../../assets/images/accountNumber.png" src="../../assets/images/accountNumber.png"
style="width: 16px;height: 23px;" style="width: 16px; height: 23px"
class="inputIcon" class="inputIcon"
/> />
</el-input> </el-input>
@ -115,7 +115,7 @@
<img <img
slot="prefix" slot="prefix"
src="../../assets/images/password.png" src="../../assets/images/password.png"
style="width: 17.15px;height: 26.15px;" style="width: 17.15px; height: 26.15px"
class="inputIcon" class="inputIcon"
/> />
</el-input> </el-input>
@ -237,7 +237,7 @@
<img <img
slot="prefix" slot="prefix"
src="../../assets/images/userNameIcon.png" src="../../assets/images/userNameIcon.png"
style="width: 18.86px;height: 20.54px;" style="width: 18.86px; height: 20.54px"
class="inputIcon" class="inputIcon"
/> />
</el-input> </el-input>
@ -254,7 +254,7 @@
<img <img
slot="prefix" slot="prefix"
src="../../assets/images/password.png" src="../../assets/images/password.png"
style="width: 17.15px;height: 26.15px;" style="width: 17.15px; height: 26.15px"
class="inputIcon" class="inputIcon"
/> />
</el-input> </el-input>
@ -273,7 +273,7 @@
<img <img
slot="prefix" slot="prefix"
src="../../assets/images/enterpriseIcon.png" src="../../assets/images/enterpriseIcon.png"
style="width: 22px;height: 22px;margin-left: 7px;" style="width: 22px; height: 22px; margin-left: 7px"
class="inputIcon" class="inputIcon"
/> />
</el-input> </el-input>
@ -288,7 +288,7 @@
<img <img
slot="prefix" slot="prefix"
src="../../assets/images/emailIcon.png" src="../../assets/images/emailIcon.png"
style="width: 18.86px;height: 13.83px;margin-top: 20px;" style="width: 18.86px; height: 13.83px; margin-top: 20px"
class="inputIcon" class="inputIcon"
/> />
</el-input> </el-input>
@ -407,7 +407,7 @@ import {
companyLoginApi, companyLoginApi,
projectLoginApi, projectLoginApi,
newRegisterApi, newRegisterApi,
jumpLargeUserInfoApi 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";
@ -433,7 +433,8 @@ export default {
passWord: [ passWord: [
{ required: true, message: "请输入新密码", trigger: "blur" }, { required: true, message: "请输入新密码", trigger: "blur" },
{ {
pattern: /^(?=.*\d)(?=.*[a-zA-Z])(?=.*[!@#$%^&*()_+~`\-={}[\]:";'<>?,./])[a-zA-Z\d!@#$%^&*()_+~`\-={}[\]:";'<>?,./]{8,}$/, pattern:
/^(?=.*\d)(?=.*[a-zA-Z])(?=.*[!@#$%^&*()_+~`\-={}[\]:";'<>?,./])[a-zA-Z\d!@#$%^&*()_+~`\-={}[\]:";'<>?,./]{8,}$/,
message: message:
"密码必须包含至少一个字母、一个数字、一个特殊字符以及长度至少为8位数", "密码必须包含至少一个字母、一个数字、一个特殊字符以及长度至少为8位数",
trigger: "blur", trigger: "blur",
@ -495,7 +496,8 @@ export default {
pw: [ pw: [
{ {
required: true, required: true,
message: "密码至少一个字母、一个数字、一个特殊字符以及长度至少为8位数", message:
"密码至少一个字母、一个数字、一个特殊字符以及长度至少为8位数",
trigger: "blur", trigger: "blur",
pattern: /(?=.*[0-9])(?=.*[a-zA-Z])(?=.*[^0-9a-zA-Z]).{8,30}/, pattern: /(?=.*[0-9])(?=.*[a-zA-Z])(?=.*[^0-9a-zA-Z]).{8,30}/,
}, },
@ -560,66 +562,65 @@ 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.headquartersSnData = "";
} }
// else { // else {
// this.headquartersSnData = this.$store.state.userInfo?.headquartersSn ? this.$store.state.userInfo.headquartersSn : '' // 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; // 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) this.parseLoginData(res.result);
} else { } else {
this.$message.error(res.message) this.$message.error(res.message);
} }
}) });
} } else if (window.location.href.indexOf("token") != -1) {
else if(window.location.href.indexOf("token") != -1){
const newToken = window.location.href.split("token=")[1]; const newToken = window.location.href.split("token=")[1];
const data = { token: newToken }; const data = { token: newToken };
jumpLargeUserInfoApi(data).then((res) => { jumpLargeUserInfoApi(data).then((res) => {
if (res.code == 200) { if (res.code == 200) {
// //
this.parseLoginData(res.result, true) this.parseLoginData(res.result, true);
} else { } else {
this.$message.error(res.message) this.$message.error(res.message);
} }
}) });
} else { } else {
this.isShowContent = true; this.isShowContent = true;
this.$store.commit('setUid', false) this.$store.commit("setUid", false);
this.getDetail(this.headquartersSnData) this.getDetail(this.headquartersSnData);
this.getData() this.getData();
} }
}, },
mounted() { mounted() {
// this.$bus.$on('resetSlideVerify',this.onReset) // this.$bus.$on('resetSlideVerify',this.onReset)
delete this.$http.defaults.headers.common['Authorization'] delete this.$http.defaults.headers.common["Authorization"];
if (window.location.href.indexOf('type=lgzbdp') != -1) { if (window.location.href.indexOf("type=lgzbdp") != -1) {
window.localStorage.setItem('isIframe', '1') window.localStorage.setItem("isIframe", "1");
} else { } else {
if (window.localStorage.getItem('isIframe')) { if (window.localStorage.getItem("isIframe")) {
window.localStorage.removeItem('isIframe') window.localStorage.removeItem("isIframe");
} }
} }
}, },
@ -698,7 +699,7 @@ export default {
// //
goRegister() { goRegister() {
this.isLogin = false; this.isLogin = false;
this.registerType = this.loginType this.registerType = this.loginType;
this.registerForm = { this.registerForm = {
account: "", account: "",
pw: "", pw: "",
@ -794,7 +795,7 @@ export default {
this.$store.commit("setProDetail", null); this.$store.commit("setProDetail", null);
this.$store.commit("setProjectSn", ""); this.$store.commit("setProjectSn", "");
this.$store.commit("setGroupTreeList", []); this.$store.commit("setGroupTreeList", []);
this.$store.commit('setSelectedGroupSn', null); this.$store.commit("setSelectedGroupSn", null);
window.localStorage.removeItem("isIframe"); window.localStorage.removeItem("isIframe");
window.localStorage.removeItem("soundList"); window.localStorage.removeItem("soundList");
@ -1006,7 +1007,7 @@ export default {
headquartersSn: this.headquartersSnData, headquartersSn: this.headquartersSnData,
accountType: this.registerType, accountType: this.registerType,
}).then((res) => { }).then((res) => {
if(this.registerType == 1){ if (this.registerType == 1) {
this.$message.success("注册成功,等待审核"); this.$message.success("注册成功,等待审核");
} else { } else {
this.$message.success("注册成功"); this.$message.success("注册成功");
@ -1031,13 +1032,34 @@ export default {
} }
}); });
}, },
parseLoginData(data,isOutside) {
checkInfoComplete() {
this.$confirm(
"系统检测到您未完善邮箱,请去后台中心完善,以免忘记密码时无法通过邮箱验证,导致重置密码失败!",
"温馨提示",
{
confirmButtonText: "用户中心",
cancelButtonText: "取消",
type: "warning",
}
)
.then(() => {
this.$router.push("/userCenter/userConfig");
})
.catch(() => {
this.$message({
type: "info",
message: "已取消",
});
});
},
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", "点击", "登录", "登录账号"]);
if(!isOutside){ if (!isOutside) {
this.$message.success(this.$t('message.login.login_success_msg')) // 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;
@ -1052,7 +1074,9 @@ export default {
var projectModule = []; var projectModule = [];
if ( if (
moduleList.length == 0 && moduleList.length == 0 &&
data.accountType != 1 && data.accountType != 10 && data.accountType != 11 data.accountType != 1 &&
data.accountType != 10 &&
data.accountType != 11
) { ) {
this.$message.warning("当前账号还没分配权限"); this.$message.warning("当前账号还没分配权限");
return false; return false;
@ -1154,6 +1178,9 @@ export default {
if (!arr2.length) { if (!arr2.length) {
if (this.loginType == 1) { if (this.loginType == 1) {
// this.$router.push("/projectIndex"); // this.$router.push("/projectIndex");
if (!this.$store.state.userInfo.personMail) {
this.checkInfoComplete();
}
this.$router.push("/workSpace"); this.$router.push("/workSpace");
} else { } else {
this.$router.push("/supplierIndex"); this.$router.push("/supplierIndex");
@ -1169,6 +1196,9 @@ export default {
) { ) {
if (this.loginType == 1) { if (this.loginType == 1) {
// this.$router.push("/projectIndex"); // this.$router.push("/projectIndex");
if (!this.$store.state.userInfo.personMail) {
this.checkInfoComplete();
}
this.$router.push("/workSpace"); this.$router.push("/workSpace");
} else { } else {
this.$router.push("/supplierIndex"); this.$router.push("/supplierIndex");

View File

@ -27,12 +27,14 @@
:src="$store.state.FILEURL + this.ruleForm.avatar" :src="$store.state.FILEURL + this.ruleForm.avatar"
class="avatar" class="avatar"
/> --> /> -->
<el-image v-if="this.ruleForm.avatar" <el-image
v-if="this.ruleForm.avatar"
:src="$store.state.FILEURL + this.ruleForm.avatar" :src="$store.state.FILEURL + this.ruleForm.avatar"
class="avatar"> class="avatar"
<div slot="error" class="image-slot"> >
<!-- <div slot="error" class="image-slot">
<i class="el-icon-plus" style="font-size: 28px;"></i> <i class="el-icon-plus" style="font-size: 28px;"></i>
</div> </div> -->
</el-image> </el-image>
<div class="avatar-uploader-icon" v-else> <div class="avatar-uploader-icon" v-else>
<i class="el-icon-plus icon-item"></i> <i class="el-icon-plus icon-item"></i>
@ -155,6 +157,11 @@ export default {
}; };
getSystemUserInfoApi(requestData).then((res) => { getSystemUserInfoApi(requestData).then((res) => {
that.ruleForm = { ...res.result }; that.ruleForm = { ...res.result };
let originUserInfo = this.$store.state.userInfo;
that.$store.commit("setUserInfo", {
...originUserInfo,
...that.ruleForm
});
}); });
}, },
beforeAvatarUpload(file) { beforeAvatarUpload(file) {
@ -252,7 +259,7 @@ export default {
width: 178px; width: 178px;
height: 178px; height: 178px;
display: block; display: block;
.image-slot{ .image-slot {
width: 100%; width: 100%;
height: 100%; height: 100%;
display: flex; display: flex;

View File

@ -86,9 +86,6 @@ export default {
// this.selectGroupDialog = true; // this.selectGroupDialog = true;
// } // }
this.getGroupTreeData(); this.getGroupTreeData();
if (!this.$store.state.userInfo.personMail) {
this.checkInfoComplete();
}
}, },
mounted() { mounted() {
// iframe // iframe
@ -102,26 +99,6 @@ export default {
iframe.removeEventListener("load", this.onIframeLoad); iframe.removeEventListener("load", this.onIframeLoad);
}, },
methods: { methods: {
checkInfoComplete() {
this.$confirm(
"系统检测到您未完善邮箱,请去后台中心完善,以免忘记密码时无法通过邮箱验证,导致重置密码失败!",
"温馨提示",
{
confirmButtonText: "用户中心",
cancelButtonText: "取消",
type: "warning",
}
)
.then(() => {
this.$router.push("/userCenter/userConfig");
})
.catch(() => {
this.$message({
type: "info",
message: "已取消",
});
});
},
// //
getModuleMenuList() { getModuleMenuList() {
getNewUserAllModulePageApi({ getNewUserAllModulePageApi({