mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-21 08:46:46 +08:00
Merge branch 'develop' of ssh://gitlab.dongwu-inc.com:10022/BOE/fe-manage into develop
This commit is contained in:
@@ -2,8 +2,8 @@
|
||||
<div class="navTop">
|
||||
<div class="navTopMain">
|
||||
<img
|
||||
style="width: 205px; height: 29px; margin-left: 37px; margin-top: 22px"
|
||||
src="../assets/images/navtop/logo.png"
|
||||
style="width: 205px; height: 29px; margin-left: 37px; margin-top: 22px"
|
||||
src="../assets/images/navtop/logo.png"
|
||||
/>
|
||||
<div class="navTopRight">
|
||||
<div class="role">
|
||||
@@ -11,10 +11,10 @@
|
||||
<div class="roleArrow"></div>
|
||||
<div class="roleItems">
|
||||
<div
|
||||
v-for="(value, index) in roleList"
|
||||
:key="index"
|
||||
class="roleItem"
|
||||
@click="changeRole(value)"
|
||||
v-for="(value, index) in roleList"
|
||||
:key="index"
|
||||
class="roleItem"
|
||||
@click="changeRole(value)"
|
||||
>
|
||||
{{ value.name }}
|
||||
</div>
|
||||
@@ -22,14 +22,14 @@
|
||||
</div>
|
||||
<div class="user">
|
||||
<img
|
||||
style="
|
||||
style="
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
margin-left: 8px;
|
||||
border-radius: 15px;
|
||||
margin-right: 10px;
|
||||
"
|
||||
:src="avatar"
|
||||
:src="avatar"
|
||||
/>
|
||||
<div style="margin-right: 20px">{{ username }}</div>
|
||||
</div>
|
||||
@@ -47,20 +47,21 @@
|
||||
</div> -->
|
||||
<div class="signOutMain" @click="logOut">
|
||||
<img
|
||||
style="width: 27px; height: 27px"
|
||||
src="../assets/images/navtop/signout.png"
|
||||
style="width: 27px; height: 27px"
|
||||
src="../assets/images/navtop/signout.png"
|
||||
/>
|
||||
<span class="signOut">登出</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<down-load v-model:downloadVisible="visible" />
|
||||
<down-load v-model:downloadVisible="visible"/>
|
||||
</template>
|
||||
<script>
|
||||
import { reactive, toRefs } from "vue";
|
||||
import {reactive, toRefs} from "vue";
|
||||
import DownLoad from "../components/drawers/DownLoad";
|
||||
import * as api from "../api/index1";
|
||||
|
||||
export default {
|
||||
name: "NavTop",
|
||||
components: {
|
||||
@@ -100,24 +101,32 @@ export default {
|
||||
};
|
||||
const getUser = () => {
|
||||
api
|
||||
.getUser()
|
||||
.then((res) => {
|
||||
console.log("获取登录信息成功", res);
|
||||
if (res.data.code === 200) {
|
||||
state.username = res.data.data.realName;
|
||||
// state.avatar = res.data.data.avatar
|
||||
// ? res.data.data.avatar
|
||||
// : require("../assets/images/avatar.png");
|
||||
state.avatar = require("../assets/images/avatar.png");
|
||||
}
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log("获取登录信息失败", err);
|
||||
});
|
||||
.getUser()
|
||||
.then((res) => {
|
||||
console.log("获取登录信息成功", res);
|
||||
if (res.data.code === 200) {
|
||||
state.username = res.data.data.realName;
|
||||
// state.avatar = res.data.data.avatar
|
||||
// ? res.data.data.avatar
|
||||
// : require("../assets/images/avatar.png");
|
||||
state.avatar = require("../assets/images/avatar.png");
|
||||
}
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log("获取登录信息失败", err);
|
||||
});
|
||||
};
|
||||
getUser();
|
||||
|
||||
const logOut = () => {
|
||||
localStorage.removeItem('faceclassPic');
|
||||
localStorage.removeItem('faceclassClass');
|
||||
localStorage.removeItem('faceclassScene');
|
||||
localStorage.removeItem('projectLevel');
|
||||
localStorage.removeItem('projectSys');
|
||||
localStorage.removeItem('pathmapPic');
|
||||
localStorage.removeItem('projectClass');
|
||||
localStorage.removeItem('projectPic');
|
||||
window.open("https://u-pre.boe.com/web/", "_self");
|
||||
};
|
||||
return {
|
||||
@@ -142,9 +151,11 @@ export default {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
background-color: rgba(255, 255, 255, 1);
|
||||
|
||||
.navTopRight {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.role {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
@@ -154,6 +165,7 @@ export default {
|
||||
line-height: 36px;
|
||||
cursor: pointer;
|
||||
position: relative;
|
||||
|
||||
.roleArrow {
|
||||
width: 13px;
|
||||
height: 7px;
|
||||
@@ -161,6 +173,7 @@ export default {
|
||||
background-image: url(../assets/images/navtop/down.png);
|
||||
background-size: 100%;
|
||||
}
|
||||
|
||||
.roleItems {
|
||||
width: 109px;
|
||||
height: 90px;
|
||||
@@ -174,22 +187,27 @@ export default {
|
||||
display: none;
|
||||
z-index: 100;
|
||||
}
|
||||
|
||||
.roleItem {
|
||||
font-size: 14px;
|
||||
font-weight: 400;
|
||||
color: rgba(79, 81, 86, 1);
|
||||
line-height: 36px;
|
||||
}
|
||||
|
||||
.roleItem:hover {
|
||||
color: #4ea6ff;
|
||||
}
|
||||
}
|
||||
|
||||
.role:hover .roleItems {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.role:hover .roleArrow {
|
||||
background-image: url(../assets/images/navtop/up.png);
|
||||
}
|
||||
|
||||
.user {
|
||||
margin-left: 37px;
|
||||
display: flex;
|
||||
@@ -199,12 +217,14 @@ export default {
|
||||
color: #b3bdc4;
|
||||
line-height: 36px;
|
||||
}
|
||||
|
||||
.signOutMain {
|
||||
cursor: pointer;
|
||||
margin-right: 29px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.signOut {
|
||||
font-size: 16px;
|
||||
font-weight: 400;
|
||||
|
||||
@@ -115,9 +115,9 @@
|
||||
:loading="tableDataTotal === -1 ? true : false"
|
||||
:pagination="false"
|
||||
/>
|
||||
<div class="pa">
|
||||
<div class="pa" style="display:flex;justify-content:center;padding:20px;">
|
||||
<a-pagination
|
||||
v-if="total > 10"
|
||||
v-if="tableDataTotal > 10"
|
||||
showSizeChanger="true"
|
||||
showQuickJumper="true"
|
||||
hideOnSinglePage="true"
|
||||
@@ -288,7 +288,7 @@ export default {
|
||||
};
|
||||
list(objn)
|
||||
.then((res) => {
|
||||
console.log(res.data.data.rows);
|
||||
console.log('面授课列表', res.data.data);
|
||||
let result = res.data.data;
|
||||
state.tableDataTotal = result.total;
|
||||
getClassData(result.rows);
|
||||
|
||||
@@ -28,10 +28,12 @@ export default {
|
||||
|
||||
props: {
|
||||
value: {
|
||||
type: Number,
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
name: {
|
||||
type: Number,
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
disabled: {
|
||||
type: Boolean,
|
||||
@@ -55,9 +57,9 @@ export default {
|
||||
loading: false,
|
||||
init: false
|
||||
});
|
||||
const getMemberThrottle = throttle(getMember, 500)
|
||||
|
||||
watch(() => state.memberParam, getMemberThrottle)
|
||||
watch(()=>state.memberParam.keyWord , throttle(getMember, 500))
|
||||
watch(()=>state.memberParam.pageNo , throttle(getPushMember, 500))
|
||||
watch(props, init)
|
||||
|
||||
onMounted(() => {
|
||||
@@ -71,15 +73,21 @@ export default {
|
||||
getMemberData()
|
||||
}
|
||||
|
||||
function getPushMember() {
|
||||
state.loading = true
|
||||
getMemberData()
|
||||
}
|
||||
|
||||
|
||||
function getMemberData() {
|
||||
console.log('getMemberData')
|
||||
api1.getMemberInfo(state.memberParam).then((res) => {
|
||||
const list = res.data.data.rows.filter(e => !props.value?.includes(e.id + '')).map(e => ({
|
||||
const list = res.data.data.rows.filter(e => !(props.value + '')?.includes(e.id + '')).map(e => ({
|
||||
label: e.realName,
|
||||
value: e.id
|
||||
}));
|
||||
if (state.memberParam.pageNo === 1 && props.value) {
|
||||
const arrManagerId = props.value.split(',')
|
||||
const arrManagerId = (props.value + '').split(',')
|
||||
const arrManager = props.name.split(',')
|
||||
state.options = [...arrManager.map((e, i) => ({label: e, value: arrManagerId[i]})), ...list]
|
||||
} else state.options.push(...list)
|
||||
@@ -102,10 +110,11 @@ export default {
|
||||
|
||||
function init() {
|
||||
console.log('init--', props)
|
||||
if (props.value !== typeof state.managerArray === 'object' ? state.managerArray.join(',') : state.managerArray) {
|
||||
console.log(Array.isArray(state.managerArray))
|
||||
if ((props.value + '') !== (Array.isArray(state.managerArray) ? state.managerArray.join(',') : (state.managerArray + ''))) {
|
||||
if (props.value) {
|
||||
const arrManager = props.name.split(',')
|
||||
const arrManagerId = props.value.split(',')
|
||||
const arrManagerId = (props.value + '').split(',')
|
||||
state.managerArray = props.mode === 'select' ? props.value : arrManagerId;
|
||||
state.options = arrManager.map((e, i) => ({label: e, value: arrManagerId[i]}))
|
||||
} else {
|
||||
@@ -124,7 +133,7 @@ export default {
|
||||
}
|
||||
|
||||
function change(e, l) {
|
||||
console.log('change')
|
||||
console.log('change', l)
|
||||
if (Array.isArray(l)) {
|
||||
ctx.emit('update:value', l.map(t => t.value).join(','))
|
||||
ctx.emit('update:name', l.map(t => t.label).join(','))
|
||||
|
||||
Reference in New Issue
Block a user