|
@@ -36,7 +36,9 @@
|
|
|
class="indexlayout-top-menu-li"
|
|
|
:class="{ active: getTopMenuActive === route.path }"
|
|
|
>
|
|
|
- <div style="display: flex; align-items: center; justify-content: center; flex-direction: column; height: 76px;">
|
|
|
+ <div
|
|
|
+ style="display: flex; align-items: center; justify-content: center; flex-direction: column; height: 76px;"
|
|
|
+ >
|
|
|
<i :class="[route.meta.icon, 'menuSize']"></i>
|
|
|
<span style="line-height: 1.2">{{ route.meta.title }}</span>
|
|
|
</div>
|
|
@@ -45,19 +47,25 @@
|
|
|
</el-scrollbar>
|
|
|
</div>
|
|
|
<div class="right-menu">
|
|
|
- <el-tooltip style="display: flex;" effect="dark" v-if="tenantForm.tenantId == 1" content="点击进入商城系统" placement="bottom">
|
|
|
- <div
|
|
|
- class="msginfo right-position"
|
|
|
- @click="gotoMall"
|
|
|
- >
|
|
|
+ <el-tooltip
|
|
|
+ style="display: flex;"
|
|
|
+ effect="dark"
|
|
|
+ v-if="tenantForm.tenantId == 1"
|
|
|
+ content="点击进入商城系统"
|
|
|
+ placement="bottom"
|
|
|
+ >
|
|
|
+ <div class="msginfo right-position" @click="gotoMall">
|
|
|
<i class="icon_admin_mall operationSize"></i>
|
|
|
</div>
|
|
|
</el-tooltip>
|
|
|
- <el-tooltip style="display: flex;" effect="dark" v-if="tenantForm.tenantId == 1" content="点击进入OA系统" placement="bottom">
|
|
|
- <div
|
|
|
- class="msginfo right-position"
|
|
|
- @click="gotoOa"
|
|
|
- >
|
|
|
+ <el-tooltip
|
|
|
+ style="display: flex;"
|
|
|
+ effect="dark"
|
|
|
+ v-if="tenantForm.tenantId == 1"
|
|
|
+ content="点击进入OA系统"
|
|
|
+ placement="bottom"
|
|
|
+ >
|
|
|
+ <div class="msginfo right-position" @click="gotoOa">
|
|
|
<i class="icon_admin_oa operationSize"></i>
|
|
|
</div>
|
|
|
</el-tooltip>
|
|
@@ -110,7 +118,12 @@
|
|
|
<i class="icon_admin_message operationSize"></i>
|
|
|
</div>
|
|
|
</el-popover> -->
|
|
|
- <el-tooltip style="display: flex;" effect="dark" content="点击查看系统日志" placement="bottom">
|
|
|
+ <el-tooltip
|
|
|
+ style="display: flex;"
|
|
|
+ effect="dark"
|
|
|
+ content="点击查看系统日志"
|
|
|
+ placement="bottom"
|
|
|
+ >
|
|
|
<div
|
|
|
class="msginfo right-position"
|
|
|
v-permission="'/journal'"
|
|
@@ -119,7 +132,18 @@
|
|
|
<i class="icon_admin_message operationSize"></i>
|
|
|
</div>
|
|
|
</el-tooltip>
|
|
|
-
|
|
|
+ <el-tooltip
|
|
|
+ style="display: flex;"
|
|
|
+ effect="dark"
|
|
|
+ content="点击打开聊天"
|
|
|
+ placement="bottom"
|
|
|
+ >
|
|
|
+ <el-badge :is-dot="noReadNum > 0 ? true : false" class="item">
|
|
|
+ <div class="msginfo right-position" @click="gotoChart">
|
|
|
+ <i class="icon_admin_chart operationSize"></i>
|
|
|
+ </div>
|
|
|
+ </el-badge>
|
|
|
+ </el-tooltip>
|
|
|
<div class="left-menu" v-if="organNameList && organNameList.length > 0">
|
|
|
<el-popover
|
|
|
placement="top-start"
|
|
@@ -136,15 +160,16 @@
|
|
|
>{{ item }}</el-tag
|
|
|
>
|
|
|
</div>
|
|
|
- <span
|
|
|
- slot="reference"
|
|
|
- class="msginfo right-position"
|
|
|
- >
|
|
|
+ <span slot="reference" class="msginfo right-position">
|
|
|
<i class="icon_admin_orgin operationSize"></i>
|
|
|
</span>
|
|
|
</el-popover>
|
|
|
</div>
|
|
|
- <el-dropdown class="avatar-container" trigger="hover" style="margin-left: 12px">
|
|
|
+ <el-dropdown
|
|
|
+ class="avatar-container"
|
|
|
+ trigger="hover"
|
|
|
+ style="margin-left: 12px"
|
|
|
+ >
|
|
|
<div class="avatar-wrapper">
|
|
|
<img
|
|
|
v-if="$store.getters.avatar"
|
|
@@ -173,17 +198,30 @@
|
|
|
/>
|
|
|
<div>
|
|
|
<span>{{ name }}</span>
|
|
|
- <p class="positionName" :title="positionName">{{ positionName }}</p>
|
|
|
+ <p class="positionName" :title="positionName">
|
|
|
+ {{ positionName }}
|
|
|
+ </p>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div class="tenantService" v-if="!tenantStatus">
|
|
|
+ <div class="tenantService" v-if="!tenantStatus">
|
|
|
<div class="serviceName">
|
|
|
<p class="name">{{ tenantInfo.serverName }}</p>
|
|
|
- <div class="serviceRenew" @click="onRenew" v-if="$helpers.permission('/ productService') && $helpers.permission('/serviceRenew')">立即续费</div>
|
|
|
+ <div
|
|
|
+ class="serviceRenew"
|
|
|
+ @click="onRenew"
|
|
|
+ v-if="
|
|
|
+ $helpers.permission('/ productService') &&
|
|
|
+ $helpers.permission('/serviceRenew')
|
|
|
+ "
|
|
|
+ >
|
|
|
+ 立即续费
|
|
|
+ </div>
|
|
|
</div>
|
|
|
<div class="serviceTime" v-if="tenantInfo.validRemaining > 0">
|
|
|
- 剩余{{ tenantInfo.validRemaining }}天({{ tenantInfo.expiryDateEnd }})到期
|
|
|
+ 剩余{{ tenantInfo.validRemaining }}天({{
|
|
|
+ tenantInfo.expiryDateEnd
|
|
|
+ }})到期
|
|
|
</div>
|
|
|
<div class="serviceTime" v-else>
|
|
|
已过期
|
|
@@ -199,11 +237,17 @@
|
|
|
<i class="icon_admin_edit userSize"></i>
|
|
|
<span class="dropdown-text">修改密码</span>
|
|
|
</el-dropdown-item>
|
|
|
- <el-dropdown-item @click.native="accountStatus = true" v-if="$helpers.permission('employee/simpleUpdate')">
|
|
|
+ <el-dropdown-item
|
|
|
+ @click.native="accountStatus = true"
|
|
|
+ v-if="$helpers.permission('employee/simpleUpdate')"
|
|
|
+ >
|
|
|
<i class="icon_admin_account userSize"></i>
|
|
|
<span class="dropdown-text">账号设置</span>
|
|
|
</el-dropdown-item>
|
|
|
- <el-dropdown-item style="border-top: 1px solid #E5E5E5;" @click.native="logout">
|
|
|
+ <el-dropdown-item
|
|
|
+ style="border-top: 1px solid #E5E5E5;"
|
|
|
+ @click.native="logout"
|
|
|
+ >
|
|
|
<i class="icon_admin_exit userSize"></i>
|
|
|
<span class="dropdown-text">安全退出</span>
|
|
|
</el-dropdown-item>
|
|
@@ -232,8 +276,8 @@
|
|
|
{
|
|
|
pattern: /^(?![0-9]+$)(?![a-zA-Z]+$)[0-9A-Za-z]{6,20}$/,
|
|
|
message: '密码为6-20位数字和字母组合',
|
|
|
- trigger: 'blur',
|
|
|
- },
|
|
|
+ trigger: 'blur'
|
|
|
+ }
|
|
|
]"
|
|
|
prop="password"
|
|
|
>
|
|
@@ -251,8 +295,8 @@
|
|
|
{
|
|
|
pattern: /^(?![0-9]+$)(?![a-zA-Z]+$)[0-9A-Za-z]{6,20}$/,
|
|
|
message: '密码为6-20位数字和字母组合',
|
|
|
- trigger: 'blur',
|
|
|
- },
|
|
|
+ trigger: 'blur'
|
|
|
+ }
|
|
|
]"
|
|
|
prop="password2"
|
|
|
>
|
|
@@ -266,7 +310,7 @@
|
|
|
<el-form-item
|
|
|
label="验证码"
|
|
|
:rules="[
|
|
|
- { required: true, message: '验证码不能为空', trigger: 'blur' },
|
|
|
+ { required: true, message: '验证码不能为空', trigger: 'blur' }
|
|
|
]"
|
|
|
prop="authCode"
|
|
|
style=""
|
|
@@ -314,7 +358,12 @@
|
|
|
clearable
|
|
|
style="width: 100% !important"
|
|
|
>
|
|
|
- <el-option v-for="(item, index) in tenantList" :key="index" :label="item.name" :value="item.id"></el-option>
|
|
|
+ <el-option
|
|
|
+ v-for="(item, index) in tenantList"
|
|
|
+ :key="index"
|
|
|
+ :label="item.name"
|
|
|
+ :value="item.id"
|
|
|
+ ></el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
@@ -324,7 +373,6 @@
|
|
|
</div>
|
|
|
</el-dialog>
|
|
|
|
|
|
-
|
|
|
<el-dialog
|
|
|
title="账号设置"
|
|
|
append-to-body
|
|
@@ -350,15 +398,15 @@ import { resetPassword } from "@/api/buildTeam";
|
|
|
import AppLink from "./Sidebar/Link";
|
|
|
import { getBelongTopMenuPath } from "@/utils/permission";
|
|
|
// import instructions from "./instructions";
|
|
|
-import { validOaUrl,validMallUrl } from '@/utils/validate'
|
|
|
-import { tenantInfoQueryPage } from '@/views/organManager/api'
|
|
|
-import Cookies from 'js-cookie'
|
|
|
-import axios from 'axios'
|
|
|
-import userModel from './modal/userModal'
|
|
|
+import { validOaUrl, validMallUrl } from "@/utils/validate";
|
|
|
+import { tenantInfoQueryPage } from "@/views/organManager/api";
|
|
|
+import Cookies from "js-cookie";
|
|
|
+import axios from "axios";
|
|
|
+import userModel from "./modal/userModal";
|
|
|
export default {
|
|
|
data() {
|
|
|
- let tenantConfig = sessionStorage.getItem('tenantConfig')
|
|
|
- tenantConfig = tenantConfig ? JSON.parse(tenantConfig) : {}
|
|
|
+ let tenantConfig = sessionStorage.getItem("tenantConfig");
|
|
|
+ tenantConfig = tenantConfig ? JSON.parse(tenantConfig) : {};
|
|
|
return {
|
|
|
accountStatus: false,
|
|
|
organName: this.$store.getters.organName,
|
|
@@ -368,7 +416,7 @@ export default {
|
|
|
phone: "",
|
|
|
authCode: "",
|
|
|
password: "",
|
|
|
- password2: "",
|
|
|
+ password2: ""
|
|
|
},
|
|
|
isDisable: false, // 是否允许发送验证码
|
|
|
timerCount: 60,
|
|
@@ -377,10 +425,11 @@ export default {
|
|
|
tenantVisible: false,
|
|
|
tenantName: tenantConfig.tenantName || null,
|
|
|
tenantForm: {
|
|
|
- tenantId: Number(tenantConfig.tenantId) || null,
|
|
|
+ tenantId: Number(tenantConfig.tenantId) || null
|
|
|
},
|
|
|
tenantList: [],
|
|
|
tenantLogo: tenantConfig.tenantLogo || null,
|
|
|
+ noReadNum: 0
|
|
|
};
|
|
|
},
|
|
|
|
|
@@ -392,18 +441,29 @@ export default {
|
|
|
// Hamburger
|
|
|
},
|
|
|
computed: {
|
|
|
- ...mapGetters(["sidebar", "avatar", "name", "positionName", "permission_routes", "tenantInfo"]),
|
|
|
+ ...mapGetters([
|
|
|
+ "sidebar",
|
|
|
+ "avatar",
|
|
|
+ "name",
|
|
|
+ "positionName",
|
|
|
+ "permission_routes",
|
|
|
+ "tenantInfo"
|
|
|
+ ]),
|
|
|
getTopMenuActive() {
|
|
|
let route = this.$route;
|
|
|
// (route, getBelongTopMenuPath(route))
|
|
|
return getBelongTopMenuPath(route);
|
|
|
},
|
|
|
- tenantStatus() { // 判断是否是平台账号 true 是
|
|
|
- const baseTenantId = sessionStorage.getItem('baseTenantId')
|
|
|
- return baseTenantId < 0 ? true : false
|
|
|
- },
|
|
|
+ tenantStatus() {
|
|
|
+ // 判断是否是平台账号 true 是
|
|
|
+ const baseTenantId = sessionStorage.getItem("baseTenantId");
|
|
|
+ return baseTenantId < 0 ? true : false;
|
|
|
+ }
|
|
|
},
|
|
|
mounted() {
|
|
|
+ this.$bus.$on("getShowNums", obj => {
|
|
|
+ this.noReadNum = obj;
|
|
|
+ });
|
|
|
// 手动加入
|
|
|
this.toggleSideBar();
|
|
|
this.organNameList = this.organName ? this.organName.split(",") : [];
|
|
@@ -421,41 +481,49 @@ export default {
|
|
|
},
|
|
|
async onTenantChange() {
|
|
|
try {
|
|
|
- const res = await tenantInfoQueryPage({ page: 1, rows: 999, payState: 1, state: 1 }, )
|
|
|
- this.tenantList = res.data?.rows || []
|
|
|
- this.tenantVisible = true
|
|
|
- } catch(e) {}
|
|
|
+ const res = await tenantInfoQueryPage({
|
|
|
+ page: 1,
|
|
|
+ rows: 999,
|
|
|
+ payState: 1,
|
|
|
+ state: 1
|
|
|
+ });
|
|
|
+ this.tenantList = res.data?.rows || [];
|
|
|
+ this.tenantVisible = true;
|
|
|
+ } catch (e) {}
|
|
|
},
|
|
|
onRenew() {
|
|
|
- this.$router.push('/productService')
|
|
|
+ this.$router.push("/productService");
|
|
|
},
|
|
|
submitTenant() {
|
|
|
- this.$refs['tenantForm'].validate((res) => {
|
|
|
- if(res) {
|
|
|
- const tenantForm = this.tenantForm
|
|
|
- let tenantName = null
|
|
|
- let tenantLogo = null
|
|
|
+ this.$refs["tenantForm"].validate(res => {
|
|
|
+ if (res) {
|
|
|
+ const tenantForm = this.tenantForm;
|
|
|
+ let tenantName = null;
|
|
|
+ let tenantLogo = null;
|
|
|
this.tenantList.forEach(item => {
|
|
|
- if(item.id == tenantForm.tenantId) {
|
|
|
- tenantName = item.name
|
|
|
- tenantLogo = item.logo
|
|
|
- this.tenantName = item.name
|
|
|
- this.tenantLogo = item.logo
|
|
|
+ if (item.id == tenantForm.tenantId) {
|
|
|
+ tenantName = item.name;
|
|
|
+ tenantLogo = item.logo;
|
|
|
+ this.tenantName = item.name;
|
|
|
+ this.tenantLogo = item.logo;
|
|
|
}
|
|
|
});
|
|
|
- let tenantConfig = sessionStorage.getItem('tenantConfig')
|
|
|
- tenantConfig = tenantConfig ? JSON.parse(tenantConfig) : {}
|
|
|
- if(tenantConfig.tenantId != tenantForm.tenantId) {
|
|
|
+ let tenantConfig = sessionStorage.getItem("tenantConfig");
|
|
|
+ tenantConfig = tenantConfig ? JSON.parse(tenantConfig) : {};
|
|
|
+ if (tenantConfig.tenantId != tenantForm.tenantId) {
|
|
|
//判断是否是当前路由
|
|
|
// if(url == this.$route.path) {
|
|
|
- tenantConfig.tenantId = tenantForm.tenantId
|
|
|
- tenantConfig.tenantName = tenantName
|
|
|
- tenantConfig.tenantLogo = tenantLogo
|
|
|
- sessionStorage.setItem('tenantConfig', JSON.stringify(tenantConfig))
|
|
|
- this.$router.push({
|
|
|
- path: '/redirect',
|
|
|
- query: this.$route.fullPath
|
|
|
- })
|
|
|
+ tenantConfig.tenantId = tenantForm.tenantId;
|
|
|
+ tenantConfig.tenantName = tenantName;
|
|
|
+ tenantConfig.tenantLogo = tenantLogo;
|
|
|
+ sessionStorage.setItem(
|
|
|
+ "tenantConfig",
|
|
|
+ JSON.stringify(tenantConfig)
|
|
|
+ );
|
|
|
+ this.$router.push({
|
|
|
+ path: "/redirect",
|
|
|
+ query: this.$route.fullPath
|
|
|
+ });
|
|
|
// } else {
|
|
|
// this.$router.push({
|
|
|
// path: url
|
|
@@ -463,20 +531,20 @@ export default {
|
|
|
// }
|
|
|
|
|
|
// 需要重置数据
|
|
|
- this.$store.commit('commit_branchs',[])
|
|
|
- this.$store.commit('commit_subjects',[])
|
|
|
- this.$store.commit('commit_teachers',[])
|
|
|
- this.$store.commit('commit_schools',[])
|
|
|
- this.$store.commit('commit_vip_group_category',[])
|
|
|
- this.$store.commit('commit_educations',[])
|
|
|
- this.$store.commit('commit_technician',[])
|
|
|
- this.$store.commit('commit_roles',[])
|
|
|
- this.$store.commit('commit_employs',[])
|
|
|
+ this.$store.commit("commit_branchs", []);
|
|
|
+ this.$store.commit("commit_subjects", []);
|
|
|
+ this.$store.commit("commit_teachers", []);
|
|
|
+ this.$store.commit("commit_schools", []);
|
|
|
+ this.$store.commit("commit_vip_group_category", []);
|
|
|
+ this.$store.commit("commit_educations", []);
|
|
|
+ this.$store.commit("commit_technician", []);
|
|
|
+ this.$store.commit("commit_roles", []);
|
|
|
+ this.$store.commit("commit_employs", []);
|
|
|
// 移除
|
|
|
- localStorage.removeItem('searchs')
|
|
|
+ localStorage.removeItem("searchs");
|
|
|
}
|
|
|
}
|
|
|
- })
|
|
|
+ });
|
|
|
},
|
|
|
gotoRecode() {
|
|
|
this.$router.push("/journal/journal");
|
|
@@ -489,14 +557,14 @@ export default {
|
|
|
this.$message.error("两次密码必须相同");
|
|
|
return;
|
|
|
}
|
|
|
- this.$refs["pwdForm"].validate((res) => {
|
|
|
+ this.$refs["pwdForm"].validate(res => {
|
|
|
if (res) {
|
|
|
// 发请求
|
|
|
resetPassword({
|
|
|
authCode: this.resetForm.authCode,
|
|
|
mobile: this.$store.getters.phone,
|
|
|
- newPassword: this.resetForm.password,
|
|
|
- }).then((res) => {
|
|
|
+ newPassword: this.resetForm.password
|
|
|
+ }).then(res => {
|
|
|
if (res.code == 200) {
|
|
|
// 修改成功
|
|
|
this.$message.success("修改成功");
|
|
@@ -521,9 +589,9 @@ export default {
|
|
|
"/api-web/code/sendSms",
|
|
|
qs.stringify({ mobile: this.$store.getters.phone })
|
|
|
)
|
|
|
- .then((res) => {
|
|
|
+ .then(res => {
|
|
|
if (res.data.code == 200) {
|
|
|
- let timer = setInterval((res) => {
|
|
|
+ let timer = setInterval(res => {
|
|
|
if (this.timerCount <= 0) {
|
|
|
clearInterval(timer);
|
|
|
this.isDisable = false;
|
|
@@ -544,16 +612,20 @@ export default {
|
|
|
checkShow(val) {
|
|
|
this.isShowIns = val;
|
|
|
},
|
|
|
- gotoOa(){
|
|
|
+ gotoOa() {
|
|
|
// console.log(validOaUrl())
|
|
|
// const Token = Cookies.get('cross-Token')
|
|
|
// console.log(Token, validOaUrl().split('//')[1])
|
|
|
// Cookies.set('Admin-Token', Token, { domain: `.${validOaUrl().split('//')[1]}`, path: '/' })
|
|
|
// document.cookie = `Adminoken=${Token};domain=oadev.dayaedu.com;`
|
|
|
- window.open(validOaUrl())
|
|
|
+ window.open(validOaUrl());
|
|
|
+ },
|
|
|
+ gotoMall() {
|
|
|
+ window.open(validMallUrl());
|
|
|
},
|
|
|
- gotoMall(){
|
|
|
- window.open(validMallUrl())
|
|
|
+ gotoChart() {
|
|
|
+ // 初始化未读数
|
|
|
+ this.$bus.$emit("openChart", true);
|
|
|
}
|
|
|
},
|
|
|
watch: {
|
|
@@ -563,11 +635,11 @@ export default {
|
|
|
phone: "",
|
|
|
authCode: "",
|
|
|
password: "",
|
|
|
- password2: "",
|
|
|
+ password2: ""
|
|
|
};
|
|
|
}
|
|
|
- },
|
|
|
- },
|
|
|
+ }
|
|
|
+ }
|
|
|
};
|
|
|
</script>
|
|
|
|
|
@@ -602,7 +674,7 @@ export default {
|
|
|
&.active {
|
|
|
span {
|
|
|
font-weight: 500;
|
|
|
- // border-radius: 6px;
|
|
|
+ // border-radius: 6px;
|
|
|
}
|
|
|
}
|
|
|
// &.active span {
|
|
@@ -779,7 +851,8 @@ export default {
|
|
|
.avatar-wrapper {
|
|
|
display: flex;
|
|
|
align-items: center;
|
|
|
- background: url("../../assets/images/user_tips.png") no-repeat right center;
|
|
|
+ background: url("../../assets/images/user_tips.png") no-repeat right
|
|
|
+ center;
|
|
|
background-size: 45%;
|
|
|
width: 100%;
|
|
|
.user-avatar {
|
|
@@ -791,7 +864,7 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
.tenantService {
|
|
|
- border-bottom: 1px solid #E5E5E5;
|
|
|
+ border-bottom: 1px solid #e5e5e5;
|
|
|
padding: 18px 17px 12px;
|
|
|
.serviceName {
|
|
|
display: flex;
|
|
@@ -810,12 +883,12 @@ export default {
|
|
|
.serviceRenew {
|
|
|
width: 63px;
|
|
|
height: 22px;
|
|
|
- background: linear-gradient(270deg, #FFC65E 0%, #FFE8A6 100%);
|
|
|
+ background: linear-gradient(270deg, #ffc65e 0%, #ffe8a6 100%);
|
|
|
border-radius: 11px;
|
|
|
line-height: 22px;
|
|
|
font-size: 11px;
|
|
|
font-weight: 400;
|
|
|
- color: #981E13;
|
|
|
+ color: #981e13;
|
|
|
text-align: center;
|
|
|
cursor: pointer;
|
|
|
}
|
|
@@ -855,7 +928,7 @@ export default {
|
|
|
font-size: 20px;
|
|
|
font-family: PingFangSC-Semibold, PingFang SC;
|
|
|
font-weight: 600;
|
|
|
- color: #FFFFFF;
|
|
|
+ color: #ffffff;
|
|
|
line-height: 28px;
|
|
|
max-width: 150px;
|
|
|
white-space: nowrap;
|
|
@@ -870,4 +943,7 @@ export default {
|
|
|
overflow: hidden;
|
|
|
text-overflow: ellipsis;
|
|
|
}
|
|
|
-</style>
|
|
|
+/deep/.el-badge__content.is-fixed.is-dot {
|
|
|
+ top: 28px !important;
|
|
|
+}
|
|
|
+</style>
|