|
|
|
|
@ -55,7 +55,7 @@
|
|
|
|
|
</a-dropdown>
|
|
|
|
|
</li>
|
|
|
|
|
<li v-else>
|
|
|
|
|
<router-link to="/mybill" :class="routertitleindex == 5? 'titleactive' : ''">
|
|
|
|
|
<router-link to="/mybill" :class="routertitleindex == 5 ? 'titleactive' : ''">
|
|
|
|
|
<!-- <div> -->
|
|
|
|
|
<span>职位报名</span>
|
|
|
|
|
<!-- <i class="iconfont icon-youjiantou"></i> -->
|
|
|
|
|
@ -120,10 +120,39 @@
|
|
|
|
|
</div>
|
|
|
|
|
</a-dropdown>
|
|
|
|
|
</div>
|
|
|
|
|
<!-- v-if="false" -->
|
|
|
|
|
<!-- <div class="g_mr_16 more-team">
|
|
|
|
|
<a-dropdown :trigger="['click']" class="" placement="bottomRight" :getPopupContainer="(node) => node.parentNode">
|
|
|
|
|
<div class="fsa more-team-button" style="padding: 0px 12px">
|
|
|
|
|
<div class="fss">
|
|
|
|
|
<div>
|
|
|
|
|
<div class="logo">{{ userbaseInfo.agencyName && userbaseInfo.agencyName.charAt(0) }}</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="hover-f40" style="max-width: 98px">{{ userbaseInfo.agencyName }}</div>
|
|
|
|
|
</div>
|
|
|
|
|
<i class="iconfont icon-paixu f12" style="color: #ccc; margin-left: 4px"></i>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="" slot="overlay" style="box-shadow: 0px 2px 4px 0px rgba(229, 229, 229, 0.5), 0px 4px 12px 0px rgba(0, 0, 0, 0.15)">
|
|
|
|
|
<div class="more-team-drop">
|
|
|
|
|
<div class="fsa p12 pr8 hover-blue" style="border-radius: 4px; cursor: pointer" @click="changeTeam(item)" v-for="(item, index) in teamList">
|
|
|
|
|
<div class="fss">
|
|
|
|
|
<div>
|
|
|
|
|
<img v-if="item.logo" :src="item.logo" alt="" />
|
|
|
|
|
<div v-else class="logo">{{ item.agencyName && item.agencyName.charAt(0) }}</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="" style="width: 98px">{{ item.agencyName }}</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="ml12 f12 cf4" v-if="item.checked">当前</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</a-dropdown>
|
|
|
|
|
</div> -->
|
|
|
|
|
<a-dropdown
|
|
|
|
|
:trigger="['click']"
|
|
|
|
|
overlayClassName="logindropdown"
|
|
|
|
|
placement="bottomRight"
|
|
|
|
|
overlayClassName="logindropdown"
|
|
|
|
|
:getPopupContainer="
|
|
|
|
|
(triggerNode) => {
|
|
|
|
|
return triggerNode.parentNode || document.body;
|
|
|
|
|
@ -135,11 +164,11 @@
|
|
|
|
|
<img :src="userbaseInfo.imgSrc" class="mr4" style="border-radius: 50%; width: 28px; height: 28px" alt v-else />
|
|
|
|
|
<div class="ml4 f14 c6">{{ userbaseInfo.userName || userbaseInfo.nickName || "-" }}</div>
|
|
|
|
|
</span>
|
|
|
|
|
<div class="loginbox" slot="overlay">
|
|
|
|
|
<div class="loginbox" slot="overlay" style="width: 224px">
|
|
|
|
|
<router-link to="/accountsetting">
|
|
|
|
|
<div>
|
|
|
|
|
<div class="hover-blue br4" style="padding: 12px 12px">
|
|
|
|
|
<span> <i class="iconfont icon-gerenzhongxin"></i>个人中心 </span>
|
|
|
|
|
<i class="iconfont icon-youjiantou"></i>
|
|
|
|
|
<i class="iconfont icon-youjiantou c9"></i>
|
|
|
|
|
</div>
|
|
|
|
|
</router-link>
|
|
|
|
|
<!-- <router-link to="/merchantBack" v-if="loginValue.agencyName == '郑州一才工作' ">
|
|
|
|
|
@ -151,12 +180,39 @@
|
|
|
|
|
</div>
|
|
|
|
|
</router-link>-->
|
|
|
|
|
<!-- 2023-11-29 注释该条件 && (loginValue.agencyRole == 2 || loginValue.agencyRole == 1 ) -->
|
|
|
|
|
<router-link to="###" v-if="loginValue.agencyName == '郑州一才工作' || loginValue.id == '116253'">
|
|
|
|
|
<div @click="goAdmin">
|
|
|
|
|
<span> <i class="iconfont icon-shangjiahoutai"></i>商家后台 </span>
|
|
|
|
|
<i class="iconfont icon-youjiantou"></i>
|
|
|
|
|
<!-- v-if="loginValue.agencyName == '郑州一才工作' || loginValue.id == '116253'" -->
|
|
|
|
|
|
|
|
|
|
<div @click.stop="goAdmin" class="hover-blue br4 fsa" style="padding: 12px 12px; line-height: 25px; border-bottom: 0" v-if="loginValue.agencyName == '郑州一才工作' || loginValue.id == '116253'">
|
|
|
|
|
<span class="f14"> <i class="iconfont icon-shangjiahoutai mr6"></i>商家后台 </span>
|
|
|
|
|
<i class="iconfont icon-youjiantou c9"></i>
|
|
|
|
|
</div>
|
|
|
|
|
</router-link>
|
|
|
|
|
|
|
|
|
|
<a-dropdown :trigger="['click']" class="more-team" :getPopupContainer="(node) => node.parentNode" overlayClassName="setPosition">
|
|
|
|
|
<span class="fsa more-team-button hover-blue br4" style="padding: 6px 12px" @click.stop>
|
|
|
|
|
<div class="fss">
|
|
|
|
|
<div>
|
|
|
|
|
<i class="icon-qiehuantuandui iconfont g_mr_5" style="font-size: 16px"></i>
|
|
|
|
|
切换团队
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="fse">
|
|
|
|
|
<div class="cf40 esl" style="max-width: 98px">{{ userbaseInfo.agencyName }}</div>
|
|
|
|
|
<i class="iconfont icon-youjiantou c9"></i>
|
|
|
|
|
</div>
|
|
|
|
|
</span>
|
|
|
|
|
<div class="more-team-drop" slot="overlay">
|
|
|
|
|
<div class="fsa p12 hover-blue" style="border-radius: 4px; cursor: pointer" @click="changeTeam(item)" v-for="(item, index) in teamList">
|
|
|
|
|
<div class="fss">
|
|
|
|
|
<div>
|
|
|
|
|
<img v-if="item.logo" class="mr8" :src="item.logo" style="width: 16px; height: 16px" alt="" />
|
|
|
|
|
<div v-else class="logo mr8">{{ item.agencyName && item.agencyName.charAt(0) }}</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="tl" style="width: 98px">{{ item.agencyName }}</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="ml12 f12 cf4" v-if="item.checked">当前</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</a-dropdown>
|
|
|
|
|
<!-- <router-link to="###" v-if="loginValue.agencyName == '郑州一才工作'">
|
|
|
|
|
<div @click="goJiaofu">
|
|
|
|
|
<span>
|
|
|
|
|
@ -165,7 +221,7 @@
|
|
|
|
|
<i class="iconfont icon-youjiantou"></i>
|
|
|
|
|
</div>
|
|
|
|
|
</router-link> -->
|
|
|
|
|
<button @click="logout">退出登录</button>
|
|
|
|
|
<button @click="logout" class="mb6">退出登录</button>
|
|
|
|
|
</div>
|
|
|
|
|
</a-dropdown>
|
|
|
|
|
</span>
|
|
|
|
|
@ -284,7 +340,8 @@ import {
|
|
|
|
|
// getCityApi,
|
|
|
|
|
} from "../api/job";
|
|
|
|
|
|
|
|
|
|
import { logoutApi } from "../api/login";
|
|
|
|
|
import { logoutApi, checkTokenApi } from "../api/login";
|
|
|
|
|
import { getTeamListApi, changeTeamApi } from "../api/userinfo";
|
|
|
|
|
|
|
|
|
|
export default {
|
|
|
|
|
inject: ["reload"],
|
|
|
|
|
@ -329,6 +386,7 @@ export default {
|
|
|
|
|
userbaseInfo: JSON.parse(localStorage.getItem("LOGIN_DATA")),
|
|
|
|
|
loginPage: false,
|
|
|
|
|
routertitleindex: 0,
|
|
|
|
|
teamList: [],
|
|
|
|
|
};
|
|
|
|
|
},
|
|
|
|
|
// 计算属性
|
|
|
|
|
@ -445,6 +503,7 @@ export default {
|
|
|
|
|
// this.getJobListYicai();
|
|
|
|
|
this.isLaoxiangshow();
|
|
|
|
|
this.showfooter();
|
|
|
|
|
this.getTeamList();
|
|
|
|
|
},
|
|
|
|
|
/**
|
|
|
|
|
* el 被新创建的 vm.el 替换,并挂载到实例上去之后调用该钩子。
|
|
|
|
|
@ -532,7 +591,58 @@ export default {
|
|
|
|
|
this.laoxiangshow = true;
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
/**
|
|
|
|
|
* 获取团队列表
|
|
|
|
|
*/
|
|
|
|
|
getTeamList() {
|
|
|
|
|
let that = this;
|
|
|
|
|
getTeamListApi().then((res) => {
|
|
|
|
|
console.log(res);
|
|
|
|
|
|
|
|
|
|
that.teamList = res.data.data;
|
|
|
|
|
console.log("that.teamList", that.teamList);
|
|
|
|
|
|
|
|
|
|
that.teamList.forEach((item, index) => {
|
|
|
|
|
if (item.id == that.loginValue.user.agencyId) {
|
|
|
|
|
item.checked = true;
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
changeTeam(_item) {
|
|
|
|
|
let that = this;
|
|
|
|
|
if (_item.id == that.loginValue.user.agencyId) {
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
console.log(_item);
|
|
|
|
|
changeTeamApi(_item.id).then((res1) => {
|
|
|
|
|
console.log("res1", res1);
|
|
|
|
|
if (res1.data.status == 2001) {
|
|
|
|
|
// localStorage.setItem("DAOTIAN_userinfo_agencyid", _item.id);
|
|
|
|
|
that.$message.error(res1.data.msg);
|
|
|
|
|
that.getTeamList();
|
|
|
|
|
} else {
|
|
|
|
|
localStorage.setItem("DAOTIAN_agencyid", _item.id);
|
|
|
|
|
checkTokenApi().then((res) => {
|
|
|
|
|
console.log(res.data);
|
|
|
|
|
localStorage.setItem("LOGIN_DATA", JSON.stringify(res.data.data));
|
|
|
|
|
let routeUrl = that.$router.resolve({
|
|
|
|
|
path: "/list",
|
|
|
|
|
});
|
|
|
|
|
window.open(routeUrl.href, "_blank");
|
|
|
|
|
setTimeout(() => {
|
|
|
|
|
window.close();
|
|
|
|
|
}, 10);
|
|
|
|
|
// return
|
|
|
|
|
// localStorage.setItem("DAOTIAN_token", res.data.token);
|
|
|
|
|
// that.reload();
|
|
|
|
|
|
|
|
|
|
// location.reload();
|
|
|
|
|
// router.push("/merchantManagement/homePage");
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
async logout() {
|
|
|
|
|
// logoutApi().then((result) => {
|
|
|
|
|
// console.log(result);
|
|
|
|
|
@ -543,6 +653,7 @@ export default {
|
|
|
|
|
if (data.status === 200) {
|
|
|
|
|
localStorage.removeItem("LOGIN_DATA");
|
|
|
|
|
localStorage.removeItem("DAOTIAN_token");
|
|
|
|
|
localStorage.removeItem("LOGIN_DATA_token");
|
|
|
|
|
localStorage.removeItem("daotian_to_admin_token");
|
|
|
|
|
this.reload();
|
|
|
|
|
this.$router.push("/main");
|
|
|
|
|
@ -595,33 +706,36 @@ export default {
|
|
|
|
|
|
|
|
|
|
goAdmin() {
|
|
|
|
|
let obj = JSON.parse(localStorage.getItem("LOGIN_DATA"));
|
|
|
|
|
console.log(JSON.stringify(obj.user));
|
|
|
|
|
let token = localStorage.getItem("LOGIN_DATA_token");
|
|
|
|
|
console.log(obj);
|
|
|
|
|
console.log(token);
|
|
|
|
|
if (window.location.hostname == "localhost") {
|
|
|
|
|
// 测试环境,通过URL获取token
|
|
|
|
|
window.open("http://localhost:3000/#/login?token=" + obj.token + "&username=" + (obj.user.userName ? obj.user.userName : obj.user.nickName) + "&avatar=" + obj.imgSrc + "&roleid=" + obj.user.agencyRoleId + "&agencyid=" + obj.user.agencyId + "&userInfo=" + JSON.stringify(obj));
|
|
|
|
|
window.open("http://localhost:3000/#/login?token=" + token + "&username=" + (obj.user.userName ? obj.user.userName : obj.user.nickName) + "&avatar=" + obj.imgSrc + "&roleid=" + obj.user.agencyRoleId + "&agencyid=" + obj.user.agencyId + "&userInfo=" + JSON.stringify(obj));
|
|
|
|
|
} else {
|
|
|
|
|
// 正式环境,通过缓存获取
|
|
|
|
|
localStorage.setItem("daotian_to_admin", JSON.stringify(obj));
|
|
|
|
|
localStorage.setItem("daotian_to_admin_token", obj.token);
|
|
|
|
|
localStorage.setItem("daotian_to_admin_token", token);
|
|
|
|
|
localStorage.setItem("daotian_to_admin_avatar", obj.imgSrc);
|
|
|
|
|
localStorage.setItem("daotian_to_admin_username", obj.user.userName ? obj.user.userName : obj.user.nickName);
|
|
|
|
|
localStorage.setItem("daotian_to_admin_roleid", obj.user.agencyRoleId);
|
|
|
|
|
localStorage.setItem("daotian_to_admin_agencyid", obj.user.agencyId);
|
|
|
|
|
if (window.location.origin.indexOf("www") > -1) {
|
|
|
|
|
window.open("http://www.ibocai.cn/#/login?token=" + obj.token + "&username=" + (obj.user.userName ? obj.user.userName : obj.user.nickName) + "&avatar=" + obj.imgSrc + "&roleid=" + obj.user.agencyRoleId + "&agencyid=" + obj.user.agencyId + "&userInfo=" + JSON.stringify(obj));
|
|
|
|
|
window.open("http://www.ibocai.cn/#/login?token=" + token + "&username=" + (obj.user.userName ? obj.user.userName : obj.user.nickName) + "&avatar=" + obj.imgSrc + "&roleid=" + obj.user.agencyRoleId + "&agencyid=" + obj.user.agencyId + "&userInfo=" + JSON.stringify(obj));
|
|
|
|
|
} else {
|
|
|
|
|
window.open("http://ibocai.cn/#/login?token=" + obj.token + "&username=" + (obj.user.userName ? obj.user.userName : obj.user.nickName) + "&avatar=" + obj.imgSrc + "&roleid=" + obj.user.agencyRoleId + "&agencyid=" + obj.user.agencyId + "&userInfo=" + JSON.stringify(obj));
|
|
|
|
|
window.open("http://ibocai.cn/#/login?token=" + token + "&username=" + (obj.user.userName ? obj.user.userName : obj.user.nickName) + "&avatar=" + obj.imgSrc + "&roleid=" + obj.user.agencyRoleId + "&agencyid=" + obj.user.agencyId + "&userInfo=" + JSON.stringify(obj));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
goJiaofu() {
|
|
|
|
|
let obj = JSON.parse(localStorage.getItem("LOGIN_DATA"));
|
|
|
|
|
let token = JSON.parse(localStorage.getItem("LOGIN_DATA_token"));
|
|
|
|
|
if (window.location.hostname == "localhost") {
|
|
|
|
|
// 测试环境,通过URL获取token
|
|
|
|
|
window.open("http://localhost:3000/#/other/delivery?token=" + obj.token + "&username=" + (obj.user.userName ? obj.user.userName : obj.user.nickName) + "&avatar=" + obj.imgSrc + "&roleid=" + obj.user.agencyRoleId + "&agencyid=" + obj.user.agencyId + "&userInfo=" + JSON.stringify(obj));
|
|
|
|
|
window.open("http://localhost:3000/#/other/delivery?token=" + token + "&username=" + (obj.user.userName ? obj.user.userName : obj.user.nickName) + "&avatar=" + obj.imgSrc + "&roleid=" + obj.user.agencyRoleId + "&agencyid=" + obj.user.agencyId + "&userInfo=" + JSON.stringify(obj));
|
|
|
|
|
} else {
|
|
|
|
|
// 正式环境,通过缓存获取
|
|
|
|
|
localStorage.setItem("daotian_to_admin_token", obj.token);
|
|
|
|
|
localStorage.setItem("daotian_to_admin_token", token);
|
|
|
|
|
localStorage.setItem("daotian_to_admin", JSON.stringify(obj));
|
|
|
|
|
localStorage.setItem("daotian_to_admin_avatar", obj.imgSrc);
|
|
|
|
|
localStorage.setItem("daotian_to_admin_username", obj.user.userName ? obj.user.userName : obj.user.nickName);
|
|
|
|
|
@ -1106,4 +1220,49 @@ export default {
|
|
|
|
|
/deep/ .ant-dropdown {
|
|
|
|
|
top: 68px !important;
|
|
|
|
|
}
|
|
|
|
|
.hover-blue {
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
&:hover {
|
|
|
|
|
background-color: #f5f5f5;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.more-team {
|
|
|
|
|
.more-team-button {
|
|
|
|
|
height: 32px;
|
|
|
|
|
margin-right: 16px;
|
|
|
|
|
border-radius: 4px;
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
border: 1px solid #ddd;
|
|
|
|
|
&:hover {
|
|
|
|
|
.hover-f40 {
|
|
|
|
|
color: #ff4400;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.more-team-drop {
|
|
|
|
|
padding: 6px;
|
|
|
|
|
background: #fff;
|
|
|
|
|
border-radius: 4px;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
/deep/.setPosition {
|
|
|
|
|
padding: 4px;
|
|
|
|
|
left: -218px !important;
|
|
|
|
|
border-radius: 4px;
|
|
|
|
|
background-color: #fff;
|
|
|
|
|
box-shadow: 0px 2px 4px 0px rgba(229, 229, 229, 0.5), 0px 4px 12px 0px rgba(0, 0, 0, 0.15);
|
|
|
|
|
}
|
|
|
|
|
.logo {
|
|
|
|
|
width: 16px;
|
|
|
|
|
height: 16px;
|
|
|
|
|
text-align: center;
|
|
|
|
|
line-height: 16px;
|
|
|
|
|
color: #fff;
|
|
|
|
|
font-size: 10px;
|
|
|
|
|
background: #ff6a00;
|
|
|
|
|
border-radius: 2px;
|
|
|
|
|
margin-right: 8px;
|
|
|
|
|
}
|
|
|
|
|
</style>
|
|
|
|
|
|