Merge branch 'develop' of ssh://gitlab.dongwu-inc.com:10022/BOE/fe-manage into develop

This commit is contained in:
zhangyc
2022-12-03 19:42:54 +08:00
6 changed files with 172 additions and 131 deletions

View File

@@ -29,6 +29,7 @@ import BreadCrumb from "@/components/BreadCrumb";
import zhCN from "ant-design-vue/es/locale/zh_CN"; import zhCN from "ant-design-vue/es/locale/zh_CN";
import * as api from "./api/index1"; import * as api from "./api/index1";
import * as api1 from "@/api/index1"; import * as api1 from "@/api/index1";
import * as api2 from "@/api/index";
export default defineComponent({ export default defineComponent({
components: { components: {
@@ -59,6 +60,7 @@ export default defineComponent({
function init() { function init() {
console.log(store); console.log(store);
getUserInfo();
initDict("faceclassPic"); initDict("faceclassPic");
initDict("faceclassClass"); initDict("faceclassClass");
initDict("faceclassScene"); initDict("faceclassScene");
@@ -70,6 +72,11 @@ export default defineComponent({
getOrgTree(); getOrgTree();
} }
async function getUserInfo() {
const userInfo = await api2.userInfo()
store.commit("SET_USER", userInfo);
}
async function initDict(key) { async function initDict(key) {
let list = localStorage.getItem(key); let list = localStorage.getItem(key);
if (list) { if (list) {

View File

@@ -76,4 +76,5 @@ export const getTemplateDetail = (obj) => http.get('/admin/project/template/deta
export const getProjectCount = (projectId) => http.get('/admin/project/projectCount', {params: {projectId: projectId}}) export const getProjectCount = (projectId) => http.get('/admin/project/projectCount', {params: {projectId: projectId}})
export const login = (obj) => http.post('/admin/CheckUser/userLogin', obj) export const login = (obj) => http.post('/admin/CheckUser/userLogin', obj)
export const userInfo = () => http.get('/admin/CheckUser/userInfo')

View File

@@ -61,6 +61,7 @@
import {reactive, toRefs} from "vue"; import {reactive, toRefs} from "vue";
import DownLoad from "../components/drawers/DownLoad"; import DownLoad from "../components/drawers/DownLoad";
import * as api from "../api/index1"; import * as api from "../api/index1";
export default { export default {
name: "NavTop", name: "NavTop",
components: { components: {
@@ -118,6 +119,14 @@ export default {
getUser(); getUser();
const logOut = () => { 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"); window.open("https://u-pre.boe.com/web/", "_self");
}; };
return { return {
@@ -142,9 +151,11 @@ export default {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
background-color: rgba(255, 255, 255, 1); background-color: rgba(255, 255, 255, 1);
.navTopRight { .navTopRight {
display: flex; display: flex;
} }
.role { .role {
display: flex; display: flex;
align-items: center; align-items: center;
@@ -154,6 +165,7 @@ export default {
line-height: 36px; line-height: 36px;
cursor: pointer; cursor: pointer;
position: relative; position: relative;
.roleArrow { .roleArrow {
width: 13px; width: 13px;
height: 7px; height: 7px;
@@ -161,6 +173,7 @@ export default {
background-image: url(../assets/images/navtop/down.png); background-image: url(../assets/images/navtop/down.png);
background-size: 100%; background-size: 100%;
} }
.roleItems { .roleItems {
width: 109px; width: 109px;
height: 90px; height: 90px;
@@ -174,22 +187,27 @@ export default {
display: none; display: none;
z-index: 100; z-index: 100;
} }
.roleItem { .roleItem {
font-size: 14px; font-size: 14px;
font-weight: 400; font-weight: 400;
color: rgba(79, 81, 86, 1); color: rgba(79, 81, 86, 1);
line-height: 36px; line-height: 36px;
} }
.roleItem:hover { .roleItem:hover {
color: #4ea6ff; color: #4ea6ff;
} }
} }
.role:hover .roleItems { .role:hover .roleItems {
display: block; display: block;
} }
.role:hover .roleArrow { .role:hover .roleArrow {
background-image: url(../assets/images/navtop/up.png); background-image: url(../assets/images/navtop/up.png);
} }
.user { .user {
margin-left: 37px; margin-left: 37px;
display: flex; display: flex;
@@ -199,12 +217,14 @@ export default {
color: #b3bdc4; color: #b3bdc4;
line-height: 36px; line-height: 36px;
} }
.signOutMain { .signOutMain {
cursor: pointer; cursor: pointer;
margin-right: 29px; margin-right: 29px;
display: flex; display: flex;
align-items: center; align-items: center;
} }
.signOut { .signOut {
font-size: 16px; font-size: 16px;
font-weight: 400; font-weight: 400;

View File

@@ -115,9 +115,9 @@
:loading="tableDataTotal === -1 ? true : false" :loading="tableDataTotal === -1 ? true : false"
:pagination="false" :pagination="false"
/> />
<div class="pa"> <div class="pa" style="display:flex;justify-content:center;padding:20px;">
<a-pagination <a-pagination
v-if="total > 10" v-if="tableDataTotal > 10"
showSizeChanger="true" showSizeChanger="true"
showQuickJumper="true" showQuickJumper="true"
hideOnSinglePage="true" hideOnSinglePage="true"
@@ -288,7 +288,7 @@ export default {
}; };
list(objn) list(objn)
.then((res) => { .then((res) => {
console.log(res.data.data.rows); console.log('面授课列表', res.data.data);
let result = res.data.data; let result = res.data.data;
state.tableDataTotal = result.total; state.tableDataTotal = result.total;
getClassData(result.rows); getClassData(result.rows);

View File

@@ -28,10 +28,12 @@ export default {
props: { props: {
value: { value: {
type: Number, type: String,
default: ''
}, },
name: { name: {
type: Number, type: String,
default: ''
}, },
disabled: { disabled: {
type: Boolean, type: Boolean,
@@ -55,9 +57,9 @@ export default {
loading: false, loading: false,
init: 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) watch(props, init)
onMounted(() => { onMounted(() => {
@@ -71,15 +73,21 @@ export default {
getMemberData() getMemberData()
} }
function getPushMember() {
state.loading = true
getMemberData()
}
function getMemberData() { function getMemberData() {
console.log('getMemberData')
api1.getMemberInfo(state.memberParam).then((res) => { 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, label: e.realName,
value: e.id value: e.id
})); }));
if (state.memberParam.pageNo === 1 && props.value) { if (state.memberParam.pageNo === 1 && props.value) {
const arrManagerId = props.value.split(',') const arrManagerId = (props.value + '').split(',')
const arrManager = props.name.split(',') const arrManager = props.name.split(',')
state.options = [...arrManager.map((e, i) => ({label: e, value: arrManagerId[i]})), ...list] state.options = [...arrManager.map((e, i) => ({label: e, value: arrManagerId[i]})), ...list]
} else state.options.push(...list) } else state.options.push(...list)
@@ -102,10 +110,11 @@ export default {
function init() { function init() {
console.log('init--', props) 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) { if (props.value) {
const arrManager = props.name.split(',') const arrManager = props.name.split(',')
const arrManagerId = props.value.split(',') const arrManagerId = (props.value + '').split(',')
state.managerArray = props.mode === 'select' ? props.value : arrManagerId; state.managerArray = props.mode === 'select' ? props.value : arrManagerId;
state.options = arrManager.map((e, i) => ({label: e, value: arrManagerId[i]})) state.options = arrManager.map((e, i) => ({label: e, value: arrManagerId[i]}))
} else { } else {
@@ -124,7 +133,7 @@ export default {
} }
function change(e, l) { function change(e, l) {
console.log('change') console.log('change', l)
if (Array.isArray(l)) { if (Array.isArray(l)) {
ctx.emit('update:value', l.map(t => t.value).join(',')) ctx.emit('update:value', l.map(t => t.value).join(','))
ctx.emit('update:name', l.map(t => t.label).join(',')) ctx.emit('update:name', l.map(t => t.label).join(','))

View File

@@ -23,6 +23,7 @@ export default createStore({
assessmentName: "", assessmentName: "",
routerId: null, routerId: null,
projectTemplateId: null, projectTemplateId: null,
userInfo: {},
orgtreeList: [], orgtreeList: [],
faceclassPic: null, faceclassPic: null,
faceclassClass: [], faceclassClass: [],
@@ -54,6 +55,9 @@ export default createStore({
SET_DICT(state, {key, data}) { SET_DICT(state, {key, data}) {
state[key] = data state[key] = data
}, },
SET_USER(state, userInfo) {
state.userInfo = userInfo
},
SET_projectTemplateId(state, projectTemplateId) { SET_projectTemplateId(state, projectTemplateId) {
state.projectTemplateId = projectTemplateId; state.projectTemplateId = projectTemplateId;
} }