Commit 39e7b307 authored by 张莎莎's avatar 张莎莎

提交

parent c6481f0f
# 开发 # 开发
VUE_APP_BASE_API = 'http://172.0.107.36:30001' VUE_APP_BASE_API = 'http://172.0.107.36:30002'
VUE_APP_COUNT_API = 'http://172.0.107.108:8508' VUE_APP_COUNT_API = 'http://172.0.107.108:8508'
VUE_APP_BASE_WSS = 'ws://172.0.107.36:8050/ws' VUE_APP_BASE_WSS = 'ws://172.0.107.36:8050/ws'
VUE_CLI_BABEL_TRANSPILE_MODULES = true VUE_CLI_BABEL_TRANSPILE_MODULES = true
# 教育监管及调度 # 教育监管及调度
#### Description #### Description
中小学心理危机防范直报系统 武汉教育通讯录
#### Software Architecture #### Software Architecture
Software architecture description Software architecture description
......
{ {
"name": "jnpf-web", "name": "jnpf-web",
"version": "3.3.0", "version": "3.3.0",
"description": "中小学心理危机防范直报系统", "description": "武汉教育通讯录",
"author": "中小学心理危机防范直报系统", "author": "武汉教育通讯录",
"license": "MIT", "license": "MIT",
"scripts": { "scripts": {
"dev": "cross-env NODE_OPTIONS=--openssl-legacy-provider vue-cli-service serve --open", "dev": "cross-env NODE_OPTIONS=--openssl-legacy-provider vue-cli-service serve --open",
......
...@@ -199,3 +199,12 @@ export const getchuliren = data => { ...@@ -199,3 +199,12 @@ export const getchuliren = data => {
data data
}) })
} }
/* 获取组织部门 */
export const getorgdepartment = data => {
return request({
url: `/api/permission/Organize/getDepartmentTree`,
method: 'GET',
data
})
}
...@@ -134,7 +134,8 @@ export default { ...@@ -134,7 +134,8 @@ export default {
}, },
methods: { methods: {
visibleChange(val) { visibleChange(val) {
this.$emit('visible-change', val) console.log(this.$parent,'zzzzzzzzzz')
this.$emit('visibleChange', val)
}, },
selectFilter(val) { selectFilter(val) {
if (this.options.length) this.$refs.selectTree.filter(val) if (this.options.length) this.$refs.selectTree.filter(val)
......
...@@ -138,7 +138,7 @@ export default { ...@@ -138,7 +138,7 @@ export default {
setting: '设置' setting: '设置'
}, },
login: { login: {
title: '中小学心理危机防范直报系统', title: '武汉教育通讯录',
scanTitle: '扫码登录', scanTitle: '扫码登录',
codeTitle: '手机验证登录', codeTitle: '手机验证登录',
logIn: '登录', logIn: '登录',
......
<template> <template>
<div class="navbar" :class="slideClass"> <div class="navbar" :class="slideClass">
<!-- <hamburger id="hamburger-container" :is-active="sidebar.opened" class="hamburger-container" <!-- <hamburger id="hamburger-container" :is-active="sidebar.opened" class="hamburger-container"
@toggleClick="toggleSideBar" /> --> @toggleClick="toggleSideBar" />-->
<Logo />
<Menu class="main-menu top-menu" /> <Menu class="main-menu top-menu" />
<NavbarRight /> <NavbarRight />
</div> </div>
...@@ -12,9 +11,8 @@ import { mapGetters, mapState } from 'vuex' ...@@ -12,9 +11,8 @@ import { mapGetters, mapState } from 'vuex'
import Hamburger from '@/components/Hamburger' import Hamburger from '@/components/Hamburger'
import NavbarRight from '../components/NavbarRight' import NavbarRight from '../components/NavbarRight'
import Menu from './menu' import Menu from './menu'
import Logo from './sidebar/Logo'
export default { export default {
components: { Hamburger, NavbarRight, Menu,Logo }, components: { Hamburger, NavbarRight, Menu },
computed: { computed: {
...mapState({ ...mapState({
slideClass: state => state.settings.slideClass, slideClass: state => state.settings.slideClass,
...@@ -33,13 +31,10 @@ export default { ...@@ -33,13 +31,10 @@ export default {
height: 60px; height: 60px;
overflow: hidden; overflow: hidden;
position: relative; position: relative;
// border-bottom: 1px solid #dcdfe6; border-bottom: 1px solid #dcdfe6;
box-shadow: 0px 3px 5px #ccc;
box-sizing: border-box; box-sizing: border-box;
display: flex; display: flex;
align-items: center; align-items: center;
z-index: 10;
.hamburger-container { .hamburger-container {
line-height: 60px; line-height: 60px;
height: 100%; height: 100%;
...@@ -47,12 +42,12 @@ export default { ...@@ -47,12 +42,12 @@ export default {
cursor: pointer; cursor: pointer;
transition: background 0.3s; transition: background 0.3s;
-webkit-tap-highlight-color: transparent; -webkit-tap-highlight-color: transparent;
display: none;
&:hover { &:hover {
background: rgba(0, 0, 0, 0.025); background: rgba(0, 0, 0, 0.025);
display: none;
} }
} }
.top-menu { .top-menu {
flex: 1; flex: 1;
overflow: hidden; overflow: hidden;
......
<template> <template>
<div :class="classObj" class="app-wrapper blend"> <div :class="classObj" class="app-wrapper blend">
<!-- <div v-if="device==='mobile'&&sidebar.opened" class="drawer-bg" @click="handleClickOutside" /> --> <!-- <div v-if="device==='mobile'&&sidebar.opened" class="drawer-bg" @click="handleClickOutside" /> -->
<div :class="{ hasTagsView: needTagsView }">
<div :class="{ 'fixed-header': fixedHeader }">
<navbar />
<!-- <tags-view v-if="needTagsView" /> -->
</div>
<!-- <div>
<sidebar class="sidebar-container" />
</div>
<app-main /> -->
<div style="display:flex;">
<div v-if="hasSubMenu" style="padding:10px 0; background-color: #ebeef5;">
<sidebar class="sidebar-container" /> <sidebar class="sidebar-container" />
<div :class="{hasTagsView:needTagsView}" class="main-container">
<div :class="{'fixed-header':fixedHeader}">
<navbar />
<tags-view v-if="needTagsView" />
</div> </div>
<div class="main-container" style="flex:1;">
<app-main /> <app-main />
</div> </div>
</div> </div>
</div>
</div>
</template> </template>
<script> <script>
import { AppMain, Navbar, Sidebar, TagsView } from './index' import { AppMain, Navbar, Sidebar, TagsView } from "./index";
import ResizeMixin from '../mixin/ResizeHandler' import ResizeMixin from "../mixin/ResizeHandler";
import { mapState } from 'vuex' import { mapState } from "vuex";
import Vue from 'vue'
export default { export default {
name: 'Blend', name: "Blend",
components: { components: {
AppMain, AppMain,
Navbar, Navbar,
...@@ -38,43 +26,30 @@ export default { ...@@ -38,43 +26,30 @@ export default {
TagsView TagsView
}, },
mixins: [ResizeMixin], mixins: [ResizeMixin],
data() {
return {
hasSubMenu: false
}
},
computed: { computed: {
...mapState({ ...mapState({
sidebar: state => state.app.sidebar, sidebar: state => state.app.sidebar,
device: state => state.app.device, device: state => state.app.device,
needTagsView: state => state.settings.tagsView, needTagsView: state => state.settings.tagsView,
fixedHeader: state => state.settings.fixedHeader, fixedHeader: state => state.settings.fixedHeader,
themeClass: state => state.settings.themeClass themeClass: state => state.settings.themeClass,
}), }),
classObj() { classObj() {
return { return {
// hideSidebar: !this.sidebar.opened, hideSidebar: !this.sidebar.opened,
// openSidebar: this.sidebar.opened, openSidebar: this.sidebar.opened,
// withoutAnimation: this.sidebar.withoutAnimation, withoutAnimation: this.sidebar.withoutAnimation,
// [this.themeClass]: true, [this.themeClass]: true,
// mobile: this.device === "mobile" // mobile: this.device === "mobile"
};
} }
}
},
watch: {
$route(to) {
this.hasSubMenu = to.meta.hasSubMenu
}
},
mounted() {
this.hasSubMenu = this.$route.meta.hasSubMenu
}, },
methods: { methods: {
handleClickOutside() { handleClickOutside() {
this.$store.dispatch('app/closeSideBar', { withoutAnimation: false }) this.$store.dispatch("app/closeSideBar", { withoutAnimation: false });
} }
} }
} };
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
...@@ -86,15 +61,12 @@ export default { ...@@ -86,15 +61,12 @@ export default {
position: relative; position: relative;
height: 100%; height: 100%;
width: 100%; width: 100%;
// display: flex; display:flex;
&.mobile.openSidebar { &.mobile.openSidebar {
position: fixed; position: fixed;
top: 0; top: 0;
} }
.app-main {
width: 100%;
}
} }
.drawer-bg { .drawer-bg {
......
<template> <template>
<div> <div>
<el-submenu ref="subMenu" :index="item.path" popper-append-to-body <el-submenu ref="subMenu" :index="item.path" popper-append-to-body
v-if="item.newChildren && item.newChildren.length" :popper-class="`${slideClass} ${themeClass} ${layoutType}`" v-if="item.newChildren && item.newChildren.length"
@click="handleClick(item)"> :popper-class="`${slideClass} ${themeClass} ${layoutType}`" @click="handleClick(item)">
<template slot="title"> <template slot="title">
<item :title="generateTitle(item.vueName, item.fullName)" /> <item :icon="item.icon" :title="generateTitle(item.vueName,item.fullName)" />
</template> </template>
<sidebar-item v-for="child in item.newChildren" :key="child.enCode" :is-nest="true" :item="child" <sidebar-item v-for="child in item.newChildren" :key="child.enCode" :is-nest="true"
:base-path="child.path" class="nest-menu" /> :item="child" :base-path="child.path" class="nest-menu" />
</el-submenu> </el-submenu>
<template v-else> <template v-else>
<el-menu-item :index="item.path" :class="{ 'submenu-title-noDropdown': !isNest }" @click="handleClick(item)"> <el-menu-item :index="item.path" :class="{'submenu-title-noDropdown':!isNest}"
<item :title="generateTitle(item.vueName, item.fullName)" /> @click="handleClick(item)">
<item :icon="item.icon" :title="generateTitle(item.vueName,item.fullName)" />
</el-menu-item> </el-menu-item>
</template> </template>
</div> </div>
...@@ -59,9 +60,7 @@ export default { ...@@ -59,9 +60,7 @@ export default {
methods: { methods: {
handleClick(item) { handleClick(item) {
if (item.type === 1) { if (item.type === 1) {
console.log(item, 99)
this.$store.commit('user/SET_LEFTMENULIST', item.children || []) this.$store.commit('user/SET_LEFTMENULIST', item.children || [])
this.$router.push(item.children[0]) // 默认选中子路由的第一个
} else if (item.type === 6 || (item.type === 7 && item.linkTarget === "_blank")) { } else if (item.type === 6 || (item.type === 7 && item.linkTarget === "_blank")) {
window.open(item.path) window.open(item.path)
} else { } else {
......
...@@ -53,18 +53,6 @@ export default { ...@@ -53,18 +53,6 @@ export default {
list: [] list: []
} }
}, },
watch: {
$route(to) {
console.log(to,999)
// if(to.path=='/messageReport'){
// this.activeName = to.path
// }
this.activeName = to.path
}
},
mounted() {
this.activeName = this.$route.path
},
created() { created() {
let _this = this let _this = this
this.$nextTick(() => { this.$nextTick(() => {
...@@ -132,7 +120,6 @@ export default { ...@@ -132,7 +120,6 @@ export default {
if (boo) break if (boo) break
} }
} }
console.log(this.activeName, 'aaa')
} }
}, },
} }
......
<template> <template>
<div class="sidebar-logo-container" :class="{ collapse: collapse }"> <div class="sidebar-logo-container" :class="{'collapse':collapse}">
<transition name="sidebarLogoFade"> <transition name="sidebarLogoFade">
<router-link v-if="collapse" key="collapse" class="sidebar-logo-link" to="/messageReport"> <router-link v-if="collapse" key="collapse" class="sidebar-logo-link" to="/">
<img src="../../../assets/images/jnpf25.png" class="sidebar-logo" /> <div style="display: flex;align-items: center;
<span style="font-size: 22px;color: #155bcd;font-family: 'PingFangSC-Regular';margin-left: 6px; font-weight: 500;">中小学心理危机防范直报系统</span> justify-content: center;margin-top: -9px;">
<img src="../../../assets/images/jnpf25.png" >
<span class="tongxunword" >武汉教育通讯录</span>
</div>
</router-link> </router-link>
<router-link v-else key="expand" class="sidebar-logo-link" to="/messageReport"> <router-link v-else key="expand" class="sidebar-logo-link" to="/">
<img src="../../../assets/images/jnpf25.png" class="sidebar-logo" v-if="slideClass === 'lightWhite'" /> <div style="display: flex;align-items: center;
<img src="../../../assets/images/jnpf25.png" class="sidebar-logo" v-else /> justify-content: center;margin-top: -9px;">
<span style="font-size: 22px;color: #155bcd;font-family: 'PingFangSC-Regular';margin-left: 6px; font-weight: 500">中小学心理危机防范直报系统</span> <img src="../../../assets/images/jnpf25.png"
v-if="slideClass==='lightWhite'" />
<img src="../../../assets/images/jnpf25.png" v-else />
<span class="tongxunword" >武汉教育通讯录</span>
</div>
</router-link> </router-link>
</transition> </transition>
</div> </div>
...@@ -20,14 +28,13 @@ export default { ...@@ -20,14 +28,13 @@ export default {
name: 'SidebarLogo', name: 'SidebarLogo',
computed: { computed: {
...mapState({ ...mapState({
slideClass: state => state.settings.slideClass slideClass: state => state.settings.slideClass,
}) })
}, },
props: { props: {
collapse: { collapse: {
type: Boolean, type: Boolean,
default: false required: true
// required: true
} }
} }
} }
...@@ -37,7 +44,12 @@ export default { ...@@ -37,7 +44,12 @@ export default {
.sidebarLogoFade-enter-active { .sidebarLogoFade-enter-active {
transition: opacity 1.5s; transition: opacity 1.5s;
} }
.tongxunword{
letter-spacing: 5px;
padding-left: 2px;font-weight: 600;
color: rgb(88, 132, 255);
font-size: 18px;
}
.sidebarLogoFade-enter, .sidebarLogoFade-enter,
.sidebarLogoFade-leave-to { .sidebarLogoFade-leave-to {
opacity: 0; opacity: 0;
...@@ -45,25 +57,22 @@ export default { ...@@ -45,25 +57,22 @@ export default {
.sidebar-logo-container { .sidebar-logo-container {
position: relative; position: relative;
// width: 200px; width: 100%;
height: 60px; height: 60px;
line-height: 60px; line-height: 76px;
// background: #031e39;
margin-right: 30px;
text-align: center; text-align: center;
overflow: hidden; overflow: hidden;
margin-top: -15px;
border-bottom: 1px solid #dcdfe6;
.sidebar-logo-link { .sidebar-logo-link {
display: flex; height: 100%;
align-items: center; /* 垂直居中 */ width: 100%;
justify-content: center; /* 水平居中 */
height: 60px;
padding-left: 10px;
.sidebar-logo { .sidebar-logo {
// width:286px; /* width:100%; */
height: 36px; height:33px;
line-height: 36px; line-height: 46px;
// margin-top:15px; margin-top:18px;
} }
} }
} }
......
<template> <template>
<div :class="classObj"> <div :class="classObj">
<!-- <logo v-if="showLogo" :collapse="isCollapse" /> --> <logo v-if="showLogo" :collapse="isCollapse" />
<el-scrollbar wrap-class="scrollbar-wrapper"> <el-scrollbar wrap-class="scrollbar-wrapper">
<el-menu :default-active="activeMenu" :unique-opened="true" :collapse-transition="false" <el-menu
mode="vertical"> :default-active="activeMenu"
<sidebar-item v-for="route in leftMenuList" :key="route.enCode" :item="route" :base-path="route.path" :collapse="isCollapse"
@click="handleClick(route)" /> :unique-opened="true"
:collapse-transition="false"
mode="vertical"
>
<sidebar-item
v-for="route in leftMenuList"
:key="route.enCode"
:item="route"
:base-path="route.path"
@click="handleClick(route)"
/>
</el-menu> </el-menu>
</el-scrollbar> </el-scrollbar>
</div> </div>
...@@ -58,7 +68,7 @@ export default { ...@@ -58,7 +68,7 @@ export default {
created() { } created() { }
} }
</script> </script>
<style lang="scss"> <style lang="scss" >
@import '../../../styles/variables.scss'; @import '../../../styles/variables.scss';
@import '../../../styles/sidebar.scss'; @import '../../../styles/sidebar.scss';
</style> </style>
...@@ -30,7 +30,7 @@ export default { ...@@ -30,7 +30,7 @@ export default {
methods: { methods: {
handleClick(item) { handleClick(item) {
if (item.type === 1) { if (item.type === 1) {
// this.$store.commit('user/SET_LEFTMENULIST', item.children || []) this.$store.commit('user/SET_LEFTMENULIST', item.children || [])
} else if (item.type === 6 || (item.type === 7 && item.linkTarget === "_blank")) { } else if (item.type === 6 || (item.type === 7 && item.linkTarget === "_blank")) {
window.open(item.path) window.open(item.path)
} else { } else {
......
<template> <template>
<div class="navbar" :class="slideClass"> <div class="navbar" :class="slideClass">
<hamburger id="hamburger-container" :is-active="sidebar.opened" class="hamburger-container" <!-- <hamburger id="hamburger-container" :is-active="sidebar.opened" class="hamburger-container"
@toggleClick="toggleSideBar" /> @toggleClick="toggleSideBar" />-->
<NavbarRight /> <NavbarRight />
</div> </div>
</template> </template>
......
...@@ -61,6 +61,7 @@ export default { ...@@ -61,6 +61,7 @@ export default {
position: relative; position: relative;
height: 100%; height: 100%;
width: 100%; width: 100%;
display: flex;
&.mobile.openSidebar { &.mobile.openSidebar {
position: fixed; position: fixed;
......
...@@ -2,10 +2,19 @@ ...@@ -2,10 +2,19 @@
<div class="sidebar-logo-container" :class="{'collapse':collapse}"> <div class="sidebar-logo-container" :class="{'collapse':collapse}">
<transition name="sidebarLogoFade"> <transition name="sidebarLogoFade">
<router-link v-if="collapse" key="collapse" class="sidebar-logo-link" to="/" @click.native="change()"> <router-link v-if="collapse" key="collapse" class="sidebar-logo-link" to="/" @click.native="change()">
<img src="../../../assets/images/jnpf22.png" class="sidebar-logo"> <div style="display: flex;align-items: center;
justify-content: center;margin-top: -9px;">
<img src="../../../assets/images/jnpf25.png" >
<span class="tongxunword">武汉教育通讯录</span>
</div>
</router-link> </router-link>
<router-link v-else key="expand" class="sidebar-logo-link" to="/" @click.native="change()"> <router-link v-else key="expand" class="sidebar-logo-link" to="/" @click.native="change()">
<img src="../../../assets/images/jnpf22.png" class="sidebar-logo"> <div style="display: flex;align-items: center;
justify-content: center;margin-top: -9px;">
<img src="../../../assets/images/jnpf25.png" >
<span class="tongxunword">武汉教育通讯录</span>
</div>
</router-link> </router-link>
</transition> </transition>
</div> </div>
...@@ -32,7 +41,12 @@ export default { ...@@ -32,7 +41,12 @@ export default {
.sidebarLogoFade-enter-active { .sidebarLogoFade-enter-active {
transition: opacity 1.5s; transition: opacity 1.5s;
} }
.tongxunword{
letter-spacing: 5px;
padding-left: 2px;font-weight: 600;
color: rgb(88, 132, 255);
font-size: 18px;
}
.sidebarLogoFade-enter, .sidebarLogoFade-enter,
.sidebarLogoFade-leave-to { .sidebarLogoFade-leave-to {
opacity: 0; opacity: 0;
...@@ -42,10 +56,11 @@ export default { ...@@ -42,10 +56,11 @@ export default {
position: relative; position: relative;
width: 100%; width: 100%;
height: 60px; height: 60px;
line-height: 60px; line-height: 76px;
background: #031e39;
text-align: center; text-align: center;
overflow: hidden; overflow: hidden;
margin-top: -15px;
border-bottom: 1px solid #dcdfe6;
.sidebar-logo-link { .sidebar-logo-link {
height: 100%; height: 100%;
width: 100%; width: 100%;
......
...@@ -36,7 +36,7 @@ export default { ...@@ -36,7 +36,7 @@ export default {
overflow: auto; overflow: auto;
overflow-x: hidden; overflow-x: hidden;
padding: 10px; padding: 10px;
// margin-bottom: 20px; margin-bottom: 20px;
box-sizing: border-box; box-sizing: border-box;
background: url("../../assets/images/loading-iframe.gif") no-repeat center background: url("../../assets/images/loading-iframe.gif") no-repeat center
center #ebeef5; center #ebeef5;
...@@ -60,15 +60,15 @@ export default { ...@@ -60,15 +60,15 @@ export default {
padding: 70px 20px 20px; padding: 70px 20px 20px;
} }
// .hasTagsView { .hasTagsView {
// .app-main { .app-main {
// height: calc(100vh - 100px); height: calc(100vh - 100px);
// } }
// .fixed-header + .app-main { .fixed-header + .app-main {
// padding: 104px 20px 20px; padding: 104px 20px 20px;
// } }
// } }
</style> </style>
<style lang="scss"> <style lang="scss">
......
<template> <template>
<div> <div>
<el-drawer title="站内消息" :visible.sync="drawer" append-to-body direction="rtl" size="280px" <el-drawer title="站内消息" :visible.sync="drawer" direction="rtl" size="280px"
class="JNPF-messageList JNPF-common-drawer" :before-close="handleClose"> class="JNPF-messageList JNPF-common-drawer" :before-close="handleClose">
<div class="tool"> <div class="tool">
<el-link :underline="false" @click.native="readAll">全部已读</el-link> <el-link :underline="false" @click.native="readAll">全部已读</el-link>
...@@ -42,32 +42,22 @@ ...@@ -42,32 +42,22 @@
<el-button @click="visible = false">{{$t('common.cancelButton')}}</el-button> <el-button @click="visible = false">{{$t('common.cancelButton')}}</el-button>
</span> </span>
</el-dialog> </el-dialog>
<transition name="fade-transform" mode="out-in">
<Form v-if="formVisible" ref="Form" @refreshDataList="init" />
</transition>
</div> </div>
</template> </template>
<script> <script>
import { getMessageList, ReadInfo, MessageAllRead } from '@/api/system/message' import { getMessageList, ReadInfo, MessageAllRead } from '@/api/system/message'
import Form from '@/views/basic/messageRecord/Form.vue'
export default { export default {
name: 'messageList', name: 'messageList',
components: {
Form
},
data() { data() {
return { return {
formVisible:false,
drawer: false, drawer: false,
listQuery: { listQuery: {
currentPage: 1, currentPage: 1,
pageSize: 20, pageSize: 20,
sort: 'desc', sort: 'desc',
keyword: '', keyword: '',
type: '', type: ''
sysCode:'xlzb',
}, },
list: [], list: [],
activeItem: {}, activeItem: {},
...@@ -112,21 +102,10 @@ export default { ...@@ -112,21 +102,10 @@ export default {
readInfo(item) { readInfo(item) {
if (item.type == 1) { if (item.type == 1) {
this.drawer = false this.drawer = false
if(item.isRead=='0'){
item.isRead = '1' item.isRead = '1'
this.$emit('read')
}
setTimeout(() => {
this.formVisible = true
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.Form.init(item.id) this.$refs.Form.init(item.id)
}) })
}, 200) // 延迟匹配动画时间
} else { } else {
ReadInfo(item.id).then(res => { ReadInfo(item.id).then(res => {
this.info = res.data this.info = res.data
...@@ -146,7 +125,6 @@ export default { ...@@ -146,7 +125,6 @@ export default {
} }
if (item.type == 1) { if (item.type == 1) {
this.visible = true this.visible = true
} else { } else {
if (!res.data.bodyText) return if (!res.data.bodyText) return
this.drawer = false this.drawer = false
...@@ -256,7 +234,7 @@ export default { ...@@ -256,7 +234,7 @@ export default {
} }
.JNPF-messageList-item-icon { .JNPF-messageList-item-icon {
background-color: #155bcd; background-color: #1890ff;
width: 36px; width: 36px;
height: 36px; height: 36px;
display: inline-block; display: inline-block;
...@@ -290,18 +268,4 @@ export default { ...@@ -290,18 +268,4 @@ export default {
} }
} }
} }
.fade-transform-enter-active,
.fade-transform-leave-active {
transition: all 0.3s ease;
}
.fade-transform-enter-from {
opacity: 0;
transform: translateY(-10px);
}
.fade-transform-leave-to {
opacity: 0;
transform: translateY(10px);
}
</style> </style>
...@@ -9,34 +9,35 @@ ...@@ -9,34 +9,35 @@
<i class="icon-ym icon-ym-header-IM right-menu-item hover-effect" @click="openUserList()" <i class="icon-ym icon-ym-header-IM right-menu-item hover-effect" @click="openUserList()"
:class="{'twinkle':isTwinkle}"></i> :class="{'twinkle':isTwinkle}"></i>
</el-tooltip> --> </el-tooltip> -->
<el-tooltip :content="$t('navbar.notice')" placement="bottom"> <!-- <el-tooltip :content="$t('navbar.notice')" placement="bottom">
<div class="right-menu-item hover-effect" @click="$refs.MessageList.init()" > <div
class="right-menu-item hover-effect"
@click="$refs.MessageList.init()"
>
<el-badge :value="messageCount" :hidden="!messageCount" :max="99"> <el-badge :value="messageCount" :hidden="!messageCount" :max="99">
<i class="icon-ym icon-ym-header-message"></i> <i class="icon-ym icon-ym-header-message"></i>
</el-badge> </el-badge>
</div> </div>
</el-tooltip> </el-tooltip>-->
<!-- <template v-if="showLanguage"> <!-- <template v-if="showLanguage">
<lang-select class="right-menu-item hover-effect" /> <lang-select class="right-menu-item hover-effect" />
</template> --> </template> -->
</template> </template>
<!-- <div class="avatar-container right-menu-item"> <el-dropdown
class="avatar-container right-menu-item hover-effect"
trigger="hover"
>
<div class="avatar-wrapper"> <div class="avatar-wrapper">
<el-avatar :size="26" :src="define.comUrl + userInfo.headIcon" class="user-avatar" v-if="userInfo.headIcon" /> <el-avatar
<span>你好!{{ userInfo.roleName }}-{{ userInfo.userName }}</span> :size="26"
:src="define.comUrl + userInfo.headIcon"
</div> class="user-avatar"
</div> --> v-if="userInfo.headIcon"
<div class="logout-wrapper" @click="handleLogout"> />
<el-button type="text" icon="icon-ym icon-ym-header-loginOut" :style="{ display: 'flex', alignItems: 'center' }">{{ $t('navbar.logOut') }}</el-button> <span>{{ userInfo.userName }}</span>
</div>
<el-dropdown class="avatar-container right-menu-item hover-effect">
<div class="avatar-wrapper">
<el-avatar :size="26" :src="define.comUrl + userInfo.headIcon" class="user-avatar" v-if="userInfo.headIcon" />
<span>你好!{{ userInfo.userName }}-{{userInfo.roleName}}</span>
<i class="el-icon-arrow-down"></i> <i class="el-icon-arrow-down"></i>
</div> </div>
<el-dropdown-menu slot="dropdown" style="top:45px;"> <el-dropdown-menu slot="dropdown">
<router-link to="/profile"> <router-link to="/profile">
<el-dropdown-item> <el-dropdown-item>
<i class="icon-ym icon-ym-header-userInfo"></i <i class="icon-ym icon-ym-header-userInfo"></i
...@@ -48,8 +49,8 @@ ...@@ -48,8 +49,8 @@
<el-dropdown-item> <el-dropdown-item>
<i class="icon-ym icon-ym-header-feedBack"></i>{{ $t('navbar.feedback') }} <i class="icon-ym icon-ym-header-feedBack"></i>{{ $t('navbar.feedback') }}
</el-dropdown-item> </el-dropdown-item>
</a> --> </a>
<!-- <el-dropdown-item @click.native="visible = true"> <el-dropdown-item @click.native="visible = true">
<i class="icon-ym icon-ym-header-about"></i>{{ $t('navbar.about') }} <i class="icon-ym icon-ym-header-about"></i>{{ $t('navbar.about') }}
</el-dropdown-item> </el-dropdown-item>
<el-dropdown-item @click.native="visible2 = true"> <el-dropdown-item @click.native="visible2 = true">
...@@ -57,7 +58,7 @@ ...@@ -57,7 +58,7 @@
</el-dropdown-item> </el-dropdown-item>
<el-dropdown-item @click.native="lock"> <el-dropdown-item @click.native="lock">
<i class="icon-ym icon-ym-header-lockScreen"></i>{{ $t('navbar.lockScreen') }} <i class="icon-ym icon-ym-header-lockScreen"></i>{{ $t('navbar.lockScreen') }}
</el-dropdown-item> --> </el-dropdown-item>-->
<el-dropdown-item divided @click.native="handleLogout"> <el-dropdown-item divided @click.native="handleLogout">
<i class="icon-ym icon-ym-header-loginOut"></i <i class="icon-ym icon-ym-header-loginOut"></i
>{{ $t("navbar.logOut") }} >{{ $t("navbar.logOut") }}
...@@ -69,14 +70,24 @@ ...@@ -69,14 +70,24 @@
<i class="icon-ym icon-ym-header-pannel"></i> <i class="icon-ym icon-ym-header-pannel"></i>
</div> </div>
</el-tooltip> --> </el-tooltip> -->
<el-dialog title="关于平台" :close-on-click-modal="false" :visible.sync="visible" v-drag-dialog class="JNPF-dialog JNPF-dialog_center about-dialog" lock-scroll width="400px"> <el-dialog
title="关于平台"
:close-on-click-modal="false"
:visible.sync="visible"
v-drag-dialog
class="JNPF-dialog JNPF-dialog_center about-dialog"
lock-scroll
width="400px"
>
<div class="about-dialog-main"> <div class="about-dialog-main">
<div> <div>
<img src="@/assets/images/jnpf.png" class="about-logo" /> <img src="@/assets/images/jnpf.png" class="about-logo" />
</div> </div>
<div> <div>
<p class="title"> <p class="title">
<a href="https://www.jnpfsoft.com" target="_blank">JNPF快速开发平台</a> <a href="https://www.jnpfsoft.com" target="_blank"
>JNPF快速开发平台</a
>
</p> </p>
<p>版本:{{ define.version }}</p> <p>版本:{{ define.version }}</p>
<p>作者:引迈软件</p> <p>作者:引迈软件</p>
...@@ -87,7 +98,15 @@ ...@@ -87,7 +98,15 @@
解放90%重复性的代码编写工作,让你更加专注于业务和体验! 解放90%重复性的代码编写工作,让你更加专注于业务和体验!
</p> </p>
</el-dialog> </el-dialog>
<el-dialog title="官方声明" :close-on-click-modal="false" :visible.sync="visible2" v-drag-dialog class="JNPF-dialog JNPF-dialog_center about-dialog" lock-scroll width="400px"> <el-dialog
title="官方声明"
:close-on-click-modal="false"
:visible.sync="visible2"
v-drag-dialog
class="JNPF-dialog JNPF-dialog_center about-dialog"
lock-scroll
width="400px"
>
<div class="about-dialog-main"> <div class="about-dialog-main">
<div> <div>
JNPF是对外开放性体验产品,平台内所有数据为我司虚构的测试数据,是随机生成非敏感数据,所以严禁任何人在JNPF平台上修改数据内容、扭曲数据目的、传播或售卖测试数据,特此警告。 JNPF是对外开放性体验产品,平台内所有数据为我司虚构的测试数据,是随机生成非敏感数据,所以严禁任何人在JNPF平台上修改数据内容、扭曲数据目的、传播或售卖测试数据,特此警告。
...@@ -101,20 +120,18 @@ ...@@ -101,20 +120,18 @@
</template> </template>
<script> <script>
import { mapGetters, mapState } from 'vuex' import { mapGetters, mapState } from "vuex";
import Screenfull from '@/components/Screenfull' import Screenfull from "@/components/Screenfull";
import SizeSelect from '@/components/SizeSelect' import SizeSelect from "@/components/SizeSelect";
import LangSelect from '@/components/LangSelect' import LangSelect from "@/components/LangSelect";
import Search from '@/components/HeaderSearch' import Search from "@/components/HeaderSearch";
import MessageList from './MessageList' import MessageList from "./MessageList";
import Settings from './settings' import Settings from "./settings";
import UserList from './userList/UserList' import UserList from "./userList/UserList";
import dragDialog from '@/directive/el-drag-dialog' import dragDialog from "@/directive/el-drag-dialog";
import ReconnectingWebSocket from 'reconnecting-websocket' import ReconnectingWebSocket from "reconnecting-websocket";
import { getMessageList } from '@/api/system/message' // import Notify from '@/utils/notify';
//import Notify from '@/utils/notify';
import { EventBus } from '@/utils/eventBus'
//import { debounce } from '@/utils/index'
export default { export default {
directives: { dragDialog }, directives: { dragDialog },
components: { components: {
...@@ -132,7 +149,7 @@ export default { ...@@ -132,7 +149,7 @@ export default {
showSearch: state => state.settings.showSearch, showSearch: state => state.settings.showSearch,
showSettings: state => state.settings.showSettings showSettings: state => state.settings.showSettings
}), }),
...mapGetters(['device', 'userInfo']) ...mapGetters(["device", "userInfo"])
}, },
data() { data() {
return { return {
...@@ -141,259 +158,185 @@ export default { ...@@ -141,259 +158,185 @@ export default {
isTwinkle: false, isTwinkle: false,
messageCount: 0, messageCount: 0,
notify: null, notify: null,
userList: [], userList: []
timer:null };
}
}, },
watch: { watch: {
isTwinkle(val) { isTwinkle(val) {
if (val) { // if (val) {
this.notify.setTitle(true) // this.notify.setTitle(true)
} else { // } else {
this.notify.setTitle() // this.notify.setTitle()
} // }
} }
}, },
created() { created() {
this.initWebSocket() this.initWebSocket();
//this.initNotify() this.initNotify();
},
mounted() {
this.getMessage()
}, },
destroyed() { destroyed() {
if (this.socket) { if (this.socket) {
//离开路由之后断开websocket连接 //离开路由之后断开websocket连接
this.socket.close() this.socket.close();
this.socket = null this.socket = null;
this.$store.commit('user/SET_SOCKET', this.socket) this.$store.commit("user/SET_SOCKET", this.socket);
clearTimeout(this.timer)
} }
}, },
methods: { methods: {
//获取未读消息列表
async getMessage() {
const listQuery = {
currentPage: 1,
pageSize: 10000,
sort: 'desc',
keyword: '',
type: '',
sysCode: 'xlzb'
};
try {
const res = await getMessageList(listQuery);
if (res && res.code === 200) {
if (res.data.list.length > 0) {
const unreadList = res.data.list.filter(item => item.isRead === 0);
console.log(unreadList.length, 'unreadList');
this.$set(this, 'messageCount', unreadList.length);
console.log(this.messageCount, 'this.messageCount');
}
}
} catch (error) {
console.error('Error in getMessage:', error);
}
},
debounce(func, delay) {
let timer = null;
return function() {
clearTimeout(timer);
timer = setTimeout(func, delay);
};
},
initWebSocket() { initWebSocket() {
this.socket = this.$store.getters.socket || null this.socket = this.$store.getters.socket || null;
if ('WebSocket' in window) { if ("WebSocket" in window) {
if (!this.socket) { if (!this.socket) {
this.socket = new ReconnectingWebSocket(process.env.VUE_APP_BASE_WSS) this.socket = new ReconnectingWebSocket(this.define.WebSocketUrl);
this.$store.commit('user/SET_SOCKET', this.socket) this.$store.commit("user/SET_SOCKET", this.socket);
} }
//添加事件监听 //添加事件监听
let socket = this.socket let socket = this.socket;
socket.onopen = () => { socket.onopen = () => {
var onConnection = { var onConnection = {
method: 'OnConnection', method: "OnConnection",
token: this.$store.getters.token, token: this.$store.getters.token,
mobileDevice: false mobileDevice: false
} };
socket.send(JSON.stringify(onConnection)) socket.send(JSON.stringify(onConnection));
} };
socket.onmessage = event => { socket.onmessage = event => {
let data = JSON.parse(event.data)
console.log(data, 'websocket1111111111')
if(data.ids&&data.ids.includes(this.userInfo.userId)){
if(data.message.sysCode=='xlzb'){
this.initNotify(data)
//this.messageCount += 1
//this.getMessage()
// debounce(10000,this.getMessage)
this.timer= setTimeout(() => {
this.getMessage();
EventBus.$emit('refresh-message-report')
}, 5000);
// this.onMessageReceived()
console.log('进行到这')
}
}
//如果有消息推送过来 let data = JSON.parse(event.data);
console.log(data,'websocket1111111111')
if (data.method == "initMessage") {
this.messageCount =
data.unreadMessageCount + data.unreadNoticeCount;
this.isTwinkle = !!data.unreadNums.length;
// if (data.method == 'initMessage') { }
// this.messageCount = data.unreadMessageCount + data.unreadNoticeCount
// this.isTwinkle = !!data.unreadNums.length
// }
//用户在线 //用户在线
// if (data.method == 'Online') { if (data.method == "Online") {
// } }
//用户离线 //用户离线
// if (data.method == 'Offline') { if (data.method == "Offline") {
// } }
//消息推送(消息公告用的) //消息推送(消息公告用的)
// if (data.method == 'messagePush') { if (data.method == "messagePush") {
// this.messageCount += data.unreadNoticeCount this.messageCount += data.unreadNoticeCount;
// if (this.$refs.MessageList.visible) this.$refs.MessageList.init() if (this.$refs.MessageList.visible) this.$refs.MessageList.init();
// } }
//用户过期 //用户过期
if (data.method == 'logout') { if (data.method == "logout") {
this.$message({ this.$message({
message: data.msg || '登录过期,请重新登录', message: data.msg || "登录过期,请重新登录",
type: 'error', type: "error",
duration: 1000, duration: 1000,
onClose: () => { onClose: () => {
this.$store.dispatch('user/resetToken').then(() => { this.$store.dispatch("user/resetToken").then(() => {
location.reload() location.reload();
}) });
} }
}) });
} }
//断开websocket连接 //断开websocket连接
if (data.method == 'closeSocket') { if (data.method == "closeSocket") {
if (this.socket) { if (this.socket) {
this.socket.close() this.socket.close();
this.socket = null this.socket = null;
this.$store.commit('user/SET_SOCKET', this.socket) this.$store.commit("user/SET_SOCKET", this.socket);
} }
} }
//接收对方发送的消息 //接收对方发送的消息
if (data.method == 'receiveMessage') { if (data.method == "receiveMessage") {
//判断是否打开窗口 //判断是否打开窗口
if (this.$refs.UserList && this.$refs.UserList.$refs.JNPFIm && this.$refs.UserList.$refs.JNPFIm.visible) { if (
if (this.$refs.UserList.$refs.JNPFIm.info.id === data.formUserId) { this.$refs.UserList &&
this.$refs.UserList.$refs.JNPFIm &&
this.$refs.UserList.$refs.JNPFIm.visible
) {
if (
this.$refs.UserList.$refs.JNPFIm.info.id === data.formUserId
) {
let messIitem = { let messIitem = {
userId: data.formUserId, userId: data.formUserId,
messageType: data.messageType, messageType: data.messageType,
message: data.formMessage, message: data.formMessage,
dateTime: this.jnpf.toDate(data.dateTime) dateTime: this.jnpf.toDate(data.dateTime)
} };
this.$refs.UserList.$refs.JNPFIm.addItem(messIitem) this.$refs.UserList.$refs.JNPFIm.addItem(messIitem);
//更新已读 //更新已读
let updateReadMessage = { let updateReadMessage = {
method: 'UpdateReadMessage', method: "UpdateReadMessage",
formUserId: data.formUserId, formUserId: data.formUserId,
token: this.$store.getters.token token: this.$store.getters.token
} };
socket.send(JSON.stringify(updateReadMessage)) socket.send(JSON.stringify(updateReadMessage));
this.$refs.UserList.updateReply(data) this.$refs.UserList.updateReply(data);
} else { } else {
this.$refs.UserList.updateReply(data, 1) this.$refs.UserList.updateReply(data, 1);
this.isTwinkle = true this.isTwinkle = true;
} }
} else { } else {
this.$refs.UserList.updateReply(data, 1) this.$refs.UserList.updateReply(data, 1);
this.isTwinkle = true this.isTwinkle = true;
} }
} }
//显示自己发送的消息 //显示自己发送的消息
if (data.method == 'sendMessage') { if (data.method == "sendMessage") {
if (this.$refs.UserList.$refs.JNPFIm.info.id !== data.toUserId) return if (this.$refs.UserList.$refs.JNPFIm.info.id !== data.toUserId)
return;
//添加到客户端 //添加到客户端
let messIitem = { let messIitem = {
userId: data.UserId, userId: data.UserId,
messageType: data.messageType, messageType: data.messageType,
message: data.toMessage, message: data.toMessage,
dateTime: this.jnpf.toDate(data.dateTime) dateTime: this.jnpf.toDate(data.dateTime)
} };
this.$refs.UserList.updateLatestMessage(data) this.$refs.UserList.updateLatestMessage(data);
this.$refs.UserList.$refs.JNPFIm.addItem(messIitem) this.$refs.UserList.$refs.JNPFIm.addItem(messIitem);
} }
//消息列表 //消息列表
if (data.method == 'messageList') { if (data.method == "messageList") {
this.$refs.UserList.$refs.JNPFIm.getList(data) this.$refs.UserList.$refs.JNPFIm.getList(data);
}
} }
};
} }
}, },
toggleSideBar() { toggleSideBar() {
this.$store.dispatch('app/toggleSideBar') this.$store.dispatch("app/toggleSideBar");
}, },
handleLogout() { handleLogout() {
this.$confirm('您确定要退出应用程序吗?', '提示', { this.$confirm("您确定要退出应用程序吗?", "提示", {
type: 'warning' type: "warning"
}) })
.then(() => { .then(() => {
this.logout() this.logout();
}) })
.catch(() => {}) .catch(() => {});
}, },
async logout() { async logout() {
await this.$store.dispatch('user/logout') await this.$store.dispatch("user/logout");
// this.$router.push(`/login?redirect=${this.$route.fullPath}`) // this.$router.push(`/login?redirect=${this.$route.fullPath}`)
this.$router.push(`/login`) this.$router.push(`/login`);
}, },
lock() { lock() {
this.$store.dispatch('user/setLock') this.$store.dispatch("user/setLock");
this.$nextTick(() => { this.$nextTick(() => {
this.$router.push('/lockScreen') this.$router.push("/lockScreen");
}) });
}, },
read(isAll) { read(isAll) {
if (isAll) { if (isAll) {
this.messageCount = 0 this.messageCount = 0;
} else { } else {
// this.getMessage() this.messageCount -= 1;
this.messageCount -= 1 this.messageCount = this.messageCount >= 0 ? this.messageCount : 0;
this.messageCount = this.messageCount >= 0 ? this.messageCount : 0
} }
}, },
openUserList() { openUserList() {
this.$refs.UserList.init() this.$refs.UserList.init();
}, },
changeTwinkle(boo) { changeTwinkle(boo) {
this.isTwinkle = boo this.isTwinkle = boo;
}, },
initNotify(data) { initNotify() {
this.$notify({
title: `${data.message.title}`,
dangerouslyUseHTMLString: true,
duration: 10000,
position: 'bottom-right',
message: `<div style='padding: 10px 0 0 ;'>
<p>${data.message.bodyText}</p>
</div>
`,
onClick: () => {
console.log(this.$route.path, '11111')
if (this.$route.path === '/messageReport') {
// 如果已经是当前页面,则刷新数据
EventBus.$emit('refresh-message-report')
this.$notify.close();
} else {
// 否则正常跳转
this.$router.push('/messageReport');
}
}
});
// await this.getMessage()
// this.notify = new Notify({ // this.notify = new Notify({
// message: '您有新消息', // message: '您有新消息',
// effect: 'flash', // flash | scroll // effect: 'flash', // flash | scroll
...@@ -401,7 +344,7 @@ export default { ...@@ -401,7 +344,7 @@ export default {
// }); // });
} }
} }
} };
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
...@@ -470,16 +413,6 @@ export default { ...@@ -470,16 +413,6 @@ export default {
} }
} }
} }
.logout-wrapper {
display: inline-block;
padding: 0 8px;
height: 80%;
font-size: 14px;
color: #155bcd;
vertical-align: text-bottom;
// line-height: 60px;
cursor: pointer;
}
} }
} }
.about-dialog { .about-dialog {
......
...@@ -244,7 +244,7 @@ export default { ...@@ -244,7 +244,7 @@ export default {
if (!val) return if (!val) return
this.themeClass = val this.themeClass = val
let activeItem = this.imgUrl3.filter(o => o.className === val)[0] let activeItem = this.imgUrl3.filter(o => o.className === val)[0]
this.theme = activeItem && activeItem.color ? activeItem.color : "#155bcd" this.theme = activeItem && activeItem.color ? activeItem.color : "#1890ff"
}, },
immediate: true immediate: true
}, },
......
...@@ -285,7 +285,7 @@ export default { ...@@ -285,7 +285,7 @@ export default {
.el-input__icon { .el-input__icon {
cursor: pointer; cursor: pointer;
&:hover { &:hover {
color: #155bcd; color: #1890ff;
} }
} }
} }
......
...@@ -49,7 +49,7 @@ export default { ...@@ -49,7 +49,7 @@ export default {
position: relative; position: relative;
height: 100%; height: 100%;
width: 100%; width: 100%;
display: flex;
&.mobile.openSidebar { &.mobile.openSidebar {
position: fixed; position: fixed;
top: 0; top: 0;
......
<template> <template>
<component :is="'blend'" /> <component :is="layoutType" />
</template> </template>
<script> <script>
......
...@@ -52,6 +52,7 @@ export default { ...@@ -52,6 +52,7 @@ export default {
position: relative; position: relative;
height: 100%; height: 100%;
width: 100%; width: 100%;
display: flex;
&.mobile.openSidebar { &.mobile.openSidebar {
position: fixed; position: fixed;
......
...@@ -57,7 +57,7 @@ router.beforeEach(async (to, from, next) => { ...@@ -57,7 +57,7 @@ router.beforeEach(async (to, from, next) => {
校级管理员 675251512758259397 校级管理员 675251512758259397
*/ */
// 非以上三个角色 不让登录值报系统 // 非以上三个角色 不让登录值报系统
if (userInfo.roleIds.indexOf('675251512758259397') == -1&&userInfo.roleIds.indexOf('698180744190671109') == -1&&userInfo.roleIds.indexOf('706786921652741637') == -1) { /* if (userInfo.roleIds.indexOf('675251512758259397') == -1&&userInfo.roleIds.indexOf('698180744190671109') == -1&&userInfo.roleIds.indexOf('706786921652741637') == -1) {
// 弹出确认框 // 弹出确认框
try { try {
await MessageBox.confirm('您的账号无权限访问,点击确定退出登录', '提示', { await MessageBox.confirm('您的账号无权限访问,点击确定退出登录', '提示', {
...@@ -79,7 +79,7 @@ router.beforeEach(async (to, from, next) => { ...@@ -79,7 +79,7 @@ router.beforeEach(async (to, from, next) => {
next(false) next(false)
return return
} }
} } */
// if (userInfo.roleIds.indexOf('675251512758259397') == -1) { // if (userInfo.roleIds.indexOf('675251512758259397') == -1) {
// await MessageBox.confirm('您的账号无权限访问,点击确定退出登录?', '提示', { // await MessageBox.confirm('您的账号无权限访问,点击确定退出登录?', '提示', {
// confirmButtonText: '确定', // confirmButtonText: '确定',
...@@ -116,7 +116,7 @@ router.beforeEach(async (to, from, next) => { ...@@ -116,7 +116,7 @@ router.beforeEach(async (to, from, next) => {
await store.dispatch('user/resetToken') await store.dispatch('user/resetToken')
if (error && typeof error == 'string') Message.error(error || 'Has Error') if (error && typeof error == 'string') Message.error(error || 'Has Error')
console.log(to.path) console.log(to.path)
debugger
next(`/login?redirect=${to.path}`) next(`/login?redirect=${to.path}`)
NProgress.done() NProgress.done()
} }
...@@ -125,7 +125,7 @@ router.beforeEach(async (to, from, next) => { ...@@ -125,7 +125,7 @@ router.beforeEach(async (to, from, next) => {
} else { } else {
/* has no token*/ /* has no token*/
if (whiteList.indexOf(to.path) !== -1) { if (whiteList.indexOf(to.path) !== -1) {
debugger
// in the free login whitelist, go directly // in the free login whitelist, go directly
next() next()
} else if (to.path === '/home') { } else if (to.path === '/home') {
......
...@@ -75,7 +75,7 @@ export const constantRoutes = [{ ...@@ -75,7 +75,7 @@ export const constantRoutes = [{
{ {
path: '/', path: '/',
component: Layout, component: Layout,
redirect: '/messageReport', redirect: '/permission/organize',
// children: [ // children: [
// { // {
// path: 'messageReport', // path: 'messageReport',
......
module.exports = { module.exports = {
title: '中小学心理危机防范直报系统', title: '武汉教育通讯录',
/** /**
* @type {boolean} true | false * @type {boolean} true | false
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
display: flex; display: flex;
justify-content: flex-end; justify-content: flex-end;
align-items: center; align-items: center;
background: url(../../assets/images/bg.png) no-repeat center; background: url(../../assets/images/loginBj.jpg) no-repeat center;
background-size: 100% 100%; background-size: 100% 100%;
.login-container { .login-container {
// width: 60%; // width: 60%;
...@@ -218,16 +218,23 @@ ...@@ -218,16 +218,23 @@
height: 58px; height: 58px;
line-height: 58px; line-height: 58px;
position: relative; position: relative;
// border-bottom: 4px solid #155bcd; margin-bottom: 30px;
margin-bottom: 20px;
font-size: 20px; font-size: 20px;
text-align: center; text-align: center;
display: -webkit-box;
display: -ms-flexbox;
display: flex; display: flex;
-webkit-box-pack: center;
-ms-flex-pack: center;
justify-content: center; justify-content: center;
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center; align-items: center;
font-size: 22px; font-size: 22px;
color: #155bcd; font-family: "PingFangSC-Regular";
font-family: 'PingFangSC-Regular'; border-bottom: 1.5px solid #5884FF;
margin-top: -21px;
} }
.rule-tip { .rule-tip {
color: #a0acb7; color: #a0acb7;
......
...@@ -20,13 +20,17 @@ ...@@ -20,13 +20,17 @@
<a class="item" :class="{'active': active==2}" <a class="item" :class="{'active': active==2}"
@click="active=2">{{$t('login.scanTitle')}}</a> @click="active=2">{{$t('login.scanTitle')}}</a>
</div> --> </div> -->
<div class="login-logo"> <!-- <div class="login-logo">
<img src="../../assets/images/login-logo.png" alt=""> <img src="../../assets/images/login-logo.png" alt="">
</div> </div>-->
<div class="login-title"> <div class="login-title">
<!-- <img class="login-logo" src="../../assets/images/login-logo.png" alt=""> --> <img class="login-logo" src="../../assets/images/jnpf25.png" alt="">
<span>{{ $t('login.title') }}</span> <span style="font-size: 25px;
letter-spacing: 7px;
padding-left: 7px;
font-weight: 600;
color: #5884FF;">{{ $t('login.title') }}</span>
</div> </div>
<div class="login-tab1"> <div class="login-tab1">
<a :class="{ active: activeTab === 'phone' }" @click="switchTab('phone')">手机号登录</a> <a :class="{ active: activeTab === 'phone' }" @click="switchTab('phone')">手机号登录</a>
...@@ -297,7 +301,7 @@ export default { ...@@ -297,7 +301,7 @@ export default {
} }
this.$store.dispatch('user/loginByPhone', query).then(res => { this.$store.dispatch('user/loginByPhone', query).then(res => {
this.$router.push({ this.$router.push({
path: '/messageReport', path: '/permission/organize',
query: this.otherQuery query: this.otherQuery
}) })
}).catch(err => { }).catch(err => {
...@@ -428,7 +432,7 @@ export default { ...@@ -428,7 +432,7 @@ export default {
.then(res => { .then(res => {
console.log(res, '我回来了') console.log(res, '我回来了')
this.$router.push({ this.$router.push({
path: '/messageReport', path: '/permission/organize',
query: this.otherQuery query: this.otherQuery
}) })
sessionStorage.setItem('loginAccount', this.loginForm.account) sessionStorage.setItem('loginAccount', this.loginForm.account)
......
...@@ -5,15 +5,15 @@ ...@@ -5,15 +5,15 @@
class="JNPF-dialog JNPF-dialog_center" width="600px"> class="JNPF-dialog JNPF-dialog_center" width="600px">
<el-form ref="dataForm" v-loading="formLoading" :model="dataForm" :rules="dataRule" <el-form ref="dataForm" v-loading="formLoading" :model="dataForm" :rules="dataRule"
label-width="80px"> label-width="80px">
<el-form-item label="所属上级" prop="parentId"> <el-form-item label="所属组织" prop="parentId">
<JNPF-TreeSelect v-model="dataForm.parentId" :options="treeDataInfo" placeholder="选择所属上级" /> <JNPF-TreeSelect v-model="dataForm.parentId" :options="treeDataInfo" placeholder="选择所属组织" />
</el-form-item> </el-form-item>
<el-form-item label="部门名称" prop="fullName"> <el-form-item label="部门名称" prop="fullName">
<el-input v-model="dataForm.fullName" placeholder="输入名称" /> <el-input v-model="dataForm.fullName" placeholder="输入名称" />
</el-form-item> </el-form-item>
<el-form-item label="部门编码" prop="systemCode"> <!-- <el-form-item label="部门编码" prop="systemCode">
<el-input v-model="dataForm.systemCode" placeholder="输入编码" /> <el-input v-model="dataForm.systemCode" placeholder="输入编码" />
</el-form-item> </el-form-item>-->
<el-form-item label="部门主管" prop="managerId"> <el-form-item label="部门主管" prop="managerId">
<user-select v-model="dataForm.managerId" placeholder="选择部门主管" /> <user-select v-model="dataForm.managerId" placeholder="选择部门主管" />
</el-form-item> </el-form-item>
...@@ -54,7 +54,6 @@ export default { ...@@ -54,7 +54,6 @@ export default {
parentId: '', parentId: '',
managerId: '', managerId: '',
fullName: '', fullName: '',
systemCode: '',
sortCode: 0, sortCode: 0,
enabledMark: 1, enabledMark: 1,
description: '' description: ''
...@@ -63,18 +62,17 @@ export default { ...@@ -63,18 +62,17 @@ export default {
usersTreeData: [], usersTreeData: [],
dataRule: { dataRule: {
parentId: [ parentId: [
{ required: true, message: '所属上级不能为空', trigger: 'input' } { required: true, message: '所属组织不能为空', trigger: 'input' }
], ],
fullName: [ fullName: [
{ required: true, message: '请输入部门名称', trigger: 'blur' }, { required: true, message: '请输入部门名称', trigger: 'blur' },
{ validator: this.formValidate('fullName', '部门名称不能含有特殊符号'), trigger: 'blur' }, { validator: this.formValidate('fullName', '部门名称不能含有特殊符号'), trigger: 'blur' },
{ max: 50, message: '部门名称最多为50个字符!', trigger: 'blur' } { max: 50, message: '部门名称最多为50个字符!', trigger: 'blur' }
], ],
systemCode:[ /* systemCode:[
{ required: true, message: '请输入部门编码', trigger: 'blur' }, { required: true, message: '请输入部门编码', trigger: 'blur' },
/*{ validator: this.formValidate('enCode', '部门编码只能输入英文、数字和小数点且小数点不能放在首尾'), trigger: 'blur' },
{ max: 50, message: '部门编码最多为50个字符!', trigger: 'blur' }*/ ] */
]
} }
} }
}, },
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
<el-input placeholder="输入关键字" v-model="filterText" suffix-icon="el-icon-search" clearable /> <el-input placeholder="输入关键字" v-model="filterText" suffix-icon="el-icon-search" clearable />
</div> </div>
<el-scrollbar class="JNPF-common-el-tree-scrollbar" v-loading="treeLoading"> <el-scrollbar class="JNPF-common-el-tree-scrollbar" v-loading="treeLoading">
<el-tree ref="treeBox" :data="treeData" :props="defaultProps" :default-expand-all="expands" <el-tree ref="treeBox" :data="treeData" :props="defaultProps"
highlight-current :expand-on-click-node="false" node-key="id" highlight-current :expand-on-click-node="false" node-key="id"
@node-click="handleNodeClick" class="JNPF-common-el-tree" v-if="refreshTree" @node-click="handleNodeClick" class="JNPF-common-el-tree" v-if="refreshTree"
:filter-node-method="filterNode"> :filter-node-method="filterNode">
...@@ -241,7 +241,7 @@ export default { ...@@ -241,7 +241,7 @@ export default {
this.initData() this.initData()
}, },
refresh() { refresh() {
this.getOrganizeList() /* this.getOrganizeList() */
this.initData() this.initData()
}, },
reset() { reset() {
......
...@@ -10,9 +10,9 @@ ...@@ -10,9 +10,9 @@
<el-form-item label="岗位名称" prop="fullName"> <el-form-item label="岗位名称" prop="fullName">
<el-input v-model="dataForm.fullName" placeholder="输入名称" /> <el-input v-model="dataForm.fullName" placeholder="输入名称" />
</el-form-item> </el-form-item>
<el-form-item label="岗位编码" prop="enCode"> <!-- <el-form-item label="岗位编码" prop="enCode">
<el-input v-model="dataForm.enCode" placeholder="输入编码" /> <el-input v-model="dataForm.enCode" placeholder="输入编码" />
</el-form-item> </el-form-item>-->
<el-form-item label="岗位类型" prop="type"> <el-form-item label="岗位类型" prop="type">
<el-select v-model="dataForm.type" placeholder="请选择类型"> <el-select v-model="dataForm.type" placeholder="请选择类型">
<el-option v-for="item in typeOptions" :key="item.enCode" :label="item.fullName" <el-option v-for="item in typeOptions" :key="item.enCode" :label="item.fullName"
...@@ -74,11 +74,11 @@ export default { ...@@ -74,11 +74,11 @@ export default {
{ validator: this.formValidate('fullName', '岗位名称不能含有特殊符号'), trigger: 'blur' }, { validator: this.formValidate('fullName', '岗位名称不能含有特殊符号'), trigger: 'blur' },
{ max: 50, message: '岗位名称最多为50个字符!', trigger: 'blur' } { max: 50, message: '岗位名称最多为50个字符!', trigger: 'blur' }
], ],
enCode: [ /* enCode: [
{ required: true, message: '请输入岗位编码', trigger: 'blur' }, { required: true, message: '请输入岗位编码', trigger: 'blur' },
{ validator: this.formValidate('userAccount', '岗位编码只能是数字、英文'), trigger: 'blur' }, { validator: this.formValidate('userAccount', '岗位编码只能是数字、英文'), trigger: 'blur' },
{ max: 50, message: '岗位编码最多为50个字符!', trigger: 'blur' } { max: 50, message: '岗位编码最多为50个字符!', trigger: 'blur' }
], ], */
type: [ type: [
{ required: true, message: '岗位类型不能为空', trigger: 'blur' } { required: true, message: '岗位类型不能为空', trigger: 'blur' }
] ]
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
<el-input placeholder="输入关键字" v-model="filterText" suffix-icon="el-icon-search" clearable /> <el-input placeholder="输入关键字" v-model="filterText" suffix-icon="el-icon-search" clearable />
</div> </div>
<el-scrollbar class="JNPF-common-el-tree-scrollbar" v-loading="treeLoading"> <el-scrollbar class="JNPF-common-el-tree-scrollbar" v-loading="treeLoading">
<el-tree ref="treeBox" :data="treeData" :props="defaultProps" :default-expand-all="expands" <el-tree ref="treeBox" :data="treeData" :props="defaultProps"
highlight-current :expand-on-click-node="false" node-key="id" highlight-current :expand-on-click-node="false" node-key="id"
@node-click="handleNodeClick" class="JNPF-common-el-tree" v-if="refreshTree" @node-click="handleNodeClick" class="JNPF-common-el-tree" v-if="refreshTree"
:filter-node-method="filterNode"> :filter-node-method="filterNode">
......
...@@ -26,11 +26,17 @@ ...@@ -26,11 +26,17 @@
@change="onOrganizeChange" clearable /> @change="onOrganizeChange" clearable />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="24">
<el-form-item label="所属部门" prop="departmentId">
<JNPF-TreeSelect v-model="dataForm.departmentId" :options="treeData"
@visibleChange="visibleChange" placeholder="选择所属部门" style="width: 100%" />
</el-form-item>
</el-col>
<el-col :span="24"> <el-col :span="24">
<el-form-item label="岗位" prop="positionId"> <el-form-item label="岗位" prop="positionId">
<el-select v-model="positionId" placeholder="选择岗位" @change="onChange('positionId')" <el-select v-model="positionId" placeholder="选择岗位" @change="onChange('positionId')"
@visible-change="visibleChange" multiple filterable clearable> @visible-change="visibleChange1" multiple filterable clearable>
<el-option-group v-for="group in positionTreeData" :key="group.id" <el-option-group v-for="group in positionTreeData" :key="group.id"
:label="group.fullName+(group.num?'【'+group.num+'】':'')"> :label="group.fullName+(group.num?'【'+group.num+'】':'')">
<el-option v-for="item in group.children" :key="group.id+item.id" <el-option v-for="item in group.children" :key="group.id+item.id"
...@@ -40,26 +46,7 @@ ...@@ -40,26 +46,7 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="24">
<el-form-item label="处理人身份" prop="roleIds">
<el-radio-group v-model="dataForm.roleIds">
<el-radio
v-for="item in roleData"
:key="item.enCode"
:value="item.enCode"
:label="item.enCode"
>{{item.fullName}}</el-radio>
</el-radio-group>
<!-- <el-select v-model="dataForm.roleIds" placeholder="请选择处理人身份" multiple style="width: 100%">
<el-option v-for="item in roleData" :key="item.id" :label="item.fullName"
:value="item.enCode">
</el-option>
</el-select>-->
</el-form-item>
<div style="position:absolute;top: 212px;right:74px;">(可进行信息推报,查看数据统计分析,进行人员队伍管理)</div>
<div style="position:absolute;top: 240px;right:172px;" v-if="flagnum==''">(仅进行信息推报且仅可操作自己上报内容)</div>
</el-col>
</el-row> </el-row>
</el-form> </el-form>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
...@@ -90,7 +77,7 @@ ...@@ -90,7 +77,7 @@
import { getPositionByOrganize } from '@/api/permission/position' import { getPositionByOrganize } from '@/api/permission/position'
import { getRoleByOrganize } from '@/api/permission/role' import { getRoleByOrganize } from '@/api/permission/role'
import { getGroupSelector } from '@/api/permission/group' import { getGroupSelector } from '@/api/permission/group'
import { createUser, updateUser, getUserInfo,getchuliren } from '@/api/xlwjfflxr' import { createUser, updateUser, getUserInfo,getchuliren,getorgdepartment } from '@/api/xlwjfflxr'
import person from './person.vue' import person from './person.vue'
import {getOrganizeInfo} from "@/api/permission/organize"; import {getOrganizeInfo} from "@/api/permission/organize";
export default { export default {
...@@ -113,7 +100,7 @@ export default { ...@@ -113,7 +100,7 @@ export default {
positionId: '', positionId: '',
roleIds:'', roleIds:'',
mobilePhone: '', mobilePhone: '',
departmentId:''
}, },
flagnum:'', flagnum:'',
gene:'', gene:'',
...@@ -127,6 +114,7 @@ export default { ...@@ -127,6 +114,7 @@ export default {
groupTreeData: [], groupTreeData: [],
genderTreeData: [], genderTreeData: [],
nationTreeData: [], nationTreeData: [],
treeData:[],
educationTreeData: [], educationTreeData: [],
certificatesTypeTreeData: [], certificatesTypeTreeData: [],
uploadHeaders: { Authorization: this.$store.getters.token }, uploadHeaders: { Authorization: this.$store.getters.token },
...@@ -137,7 +125,6 @@ export default { ...@@ -137,7 +125,6 @@ export default {
label: 'fullName' label: 'fullName'
}, },
dataRule: { dataRule: {
realName: [ realName: [
{ required: true, message: '请输入真实姓名', trigger: 'blur' }, { required: true, message: '请输入真实姓名', trigger: 'blur' },
{ validator: this.formValidate('fullName', '真实姓名不能含有特殊符号'), trigger: 'blur' }, { validator: this.formValidate('fullName', '真实姓名不能含有特殊符号'), trigger: 'blur' },
...@@ -192,11 +179,9 @@ export default { ...@@ -192,11 +179,9 @@ export default {
/*this.roleIdInfo=this.$store.state.user.userInfo.roleIds;*/ /*this.roleIdInfo=this.$store.state.user.userInfo.roleIds;*/
this.organizeIds=this.$store.state.user.userInfo.organizeId; this.organizeIds=this.$store.state.user.userInfo.organizeId;
getOrganizeInfo(this.organizeIds).then(res => { getOrganizeInfo(this.organizeIds).then(res => {
console.log(res,'44444444')
this.gene=res.data.genre; this.gene=res.data.genre;
console.log(this.gene,'hhhhh')
}).catch(() => { this.formLoading = false }) }).catch(() => { this.formLoading = false })
this.$nextTick(() => { this.$nextTick(() => {
this.formLoading = true this.formLoading = true
this.$refs['dataForm'].resetFields() this.$refs['dataForm'].resetFields()
...@@ -214,7 +199,6 @@ export default { ...@@ -214,7 +199,6 @@ export default {
}else{ }else{
this.flagnum=2 this.flagnum=2
let arr=[] let arr=[]
console.log(this.roleData,'juesesese')
arr = this.roleData.filter(function(num) { return num.enCode!= 'xlfftbr' }); arr = this.roleData.filter(function(num) { return num.enCode!= 'xlfftbr' });
this.roleData=arr; this.roleData=arr;
} }
...@@ -249,10 +233,10 @@ export default { ...@@ -249,10 +233,10 @@ export default {
let arr=res.data.organizeIdTree.split(',') let arr=res.data.organizeIdTree.split(',')
if(arr.length>1){ if(arr.length>1){
this.dataForm.organizeIdTree=[arr.slice(-1)]; this.dataForm.organizeIdTree=[arr.slice(-1)];
console.log(this.dataForm.organizeIdTree,'llllllllllllll')
}else{ }else{
this.dataForm.organizeIdTree=[res.data.organizeIdTree.split(',')] this.dataForm.organizeIdTree=[res.data.organizeIdTree.split(',')]
console.log(this.dataForm.organizeIdTree,'aaaaaaaaaaaaa')
this.getOptionsByOrgIds(this.dataForm.organizeIdTree) this.getOptionsByOrgIds(this.dataForm.organizeIdTree)
} }
...@@ -298,7 +282,6 @@ export default { ...@@ -298,7 +282,6 @@ export default {
this.dataForm[key] = this[key].join() this.dataForm[key] = this[key].join()
}, },
onOrganizeChange(val,datas) { onOrganizeChange(val,datas) {
console.log(val,datas,'fffffffffff')
this.personDatas=datas; this.personDatas=datas;
this.dataForm.positionId = '' this.dataForm.positionId = ''
// this.dataForm.roleId = '' // this.dataForm.roleId = ''
...@@ -307,9 +290,10 @@ export default { ...@@ -307,9 +290,10 @@ export default {
// this.roleId = [] // this.roleId = []
if (!val || !val.length) return if (!val || !val.length) return
this.getOptionsByOrgIds(val) this.getOptionsByOrgIds(val)
this.getdepartment(val)
if(this.gene==5){ if(this.gene==5){
datas[0].map((item,index)=>{ datas[0].map((item,index)=>{
console.log(item,'1111111')
if(!item.fullName.includes('教育局')){ if(!item.fullName.includes('教育局')){
this.dataForm.roleIds=[] this.dataForm.roleIds=[]
this.flagnum='' this.flagnum=''
...@@ -318,8 +302,6 @@ export default { ...@@ -318,8 +302,6 @@ export default {
this.dataForm.roleIds=[] this.dataForm.roleIds=[]
this.flagnum=2 this.flagnum=2
let arr=[] let arr=[]
console.log(this.roleData,'juesesese')
arr = this.roleData.filter(function(num) { return num.enCode!= 'xlfftbr' }); arr = this.roleData.filter(function(num) { return num.enCode!= 'xlfftbr' });
this.roleData=arr; this.roleData=arr;
} }
...@@ -331,8 +313,17 @@ export default { ...@@ -331,8 +313,17 @@ export default {
}, },
getdepartment(val){
const organizeIds = val.map(o => o[o.length - 1])
let params={
'organizeId':organizeIds[0]
}
getorgdepartment(params).then((res)=>{
this.treeData=res.data
})
},
getOptionsByOrgIds(organizeIdTree) { getOptionsByOrgIds(organizeIdTree) {
console.log(organizeIdTree,'oooooooooooooooo')
const organizeIds = organizeIdTree.map(o => o[o.length - 1]) const organizeIds = organizeIdTree.map(o => o[o.length - 1])
this.dataForm.organizeId = organizeIds.join() this.dataForm.organizeId = organizeIds.join()
...@@ -344,17 +335,20 @@ export default { ...@@ -344,17 +335,20 @@ export default {
}) })
}, },
visibleChange(val) { visibleChange(val) {
if (!val) return
if (!this.dataForm.organizeIdTree || !this.dataForm.organizeIdTree.length) this.$message.warning('请先选择所属组织')
},
visibleChange1(val) {
if (!val) return if (!val) return
if (!this.dataForm.organizeIdTree || !this.dataForm.organizeIdTree.length) this.$message.warning('请先选择所属组织') if (!this.dataForm.organizeIdTree || !this.dataForm.organizeIdTree.length) this.$message.warning('请先选择所属组织')
}, },
handleConfirm() { handleConfirm() {
console.log(this.dataForm.roleIds,'bbbbbbbb')
if(this.dataForm.roleIds){ if(this.dataForm.roleIds){
if(this.ddf!=this.dataForm.roleIds){ if(this.ddf!=this.dataForm.roleIds){
this.editdialogVisible=true this.editdialogVisible=true
}else{ }else{
console.log(this.dataForm,'vvvvvvvvvv')
const submitData = JSON.parse(JSON.stringify(this.dataForm)); const submitData = JSON.parse(JSON.stringify(this.dataForm));
submitData.roleIds=JSON.parse(JSON.stringify([submitData.roleIds])) submitData.roleIds=JSON.parse(JSON.stringify([submitData.roleIds]))
this.$refs['dataForm'].validate((valid) => { this.$refs['dataForm'].validate((valid) => {
...@@ -380,7 +374,6 @@ export default { ...@@ -380,7 +374,6 @@ export default {
}) })
} }
}else{ }else{
console.log(this.dataForm,'vvvvv')
this.dataForm.roleIds=[]; this.dataForm.roleIds=[];
this.$refs['dataForm'].validate((valid) => { this.$refs['dataForm'].validate((valid) => {
if (valid) { if (valid) {
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
<el-input placeholder="输入关键字" v-model="filterText" suffix-icon="el-icon-search" clearable /> <el-input placeholder="输入关键字" v-model="filterText" suffix-icon="el-icon-search" clearable />
</div> </div>
<el-scrollbar class="JNPF-common-el-tree-scrollbar" v-loading="treeLoading"> <el-scrollbar class="JNPF-common-el-tree-scrollbar" v-loading="treeLoading">
<el-tree ref="treeBox" :data="treeData" :props="defaultProps" :default-expand-all="expands" <el-tree ref="treeBox" :data="treeData" :props="defaultProps" :default-expanded-keys="expandedKeys"
highlight-current :expand-on-click-node="false" node-key="id" highlight-current :expand-on-click-node="false" node-key="id"
@node-click="handleNodeClick" class="JNPF-common-el-tree" v-if="refreshTree" @node-click="handleNodeClick" class="JNPF-common-el-tree" v-if="refreshTree"
:filter-node-method="filterNode"> :filter-node-method="filterNode">
...@@ -176,6 +176,7 @@ export default { ...@@ -176,6 +176,7 @@ export default {
return { return {
editdialogVisible:false, editdialogVisible:false,
deletedialogVisible:false, deletedialogVisible:false,
keysInfo:[],
editId:'', editId:'',
keyword: '', keyword: '',
treeData: [], treeData: [],
...@@ -183,6 +184,7 @@ export default { ...@@ -183,6 +184,7 @@ export default {
treeLoading: false, treeLoading: false,
listLoading: true, listLoading: true,
organizeId:'', organizeId:'',
expandedKeys: [],
listQuery: { listQuery: {
organizeId: '', organizeId: '',
keyword: '', keyword: '',
...@@ -216,7 +218,7 @@ export default { ...@@ -216,7 +218,7 @@ export default {
this.$refs.treeBox.filter(val) this.$refs.treeBox.filter(val)
} }
}, },
created() { mounted() {
this.getOrganizeList(true) this.getOrganizeList(true)
}, },
methods: { methods: {
...@@ -280,6 +282,7 @@ export default { ...@@ -280,6 +282,7 @@ export default {
getOrganizeList(isInit) { getOrganizeList(isInit) {
this.filterText = '' this.filterText = ''
this.treeLoading = true this.treeLoading = true
getchuliren().then((res)=>{ getchuliren().then((res)=>{
console.log(res,'bbbbbbbbbbbbbbbbb') console.log(res,'bbbbbbbbbbbbbbbbb')
this.roleInfo=res.data.list this.roleInfo=res.data.list
...@@ -287,6 +290,8 @@ export default { ...@@ -287,6 +290,8 @@ export default {
this.organizeId=this.$store.state.user.userInfo.organizeId; this.organizeId=this.$store.state.user.userInfo.organizeId;
if(this.organizeId=='96240625-934F-490B-8AA6-0BC775B18468'){ if(this.organizeId=='96240625-934F-490B-8AA6-0BC775B18468'){
getOrganizeList().then(res => { getOrganizeList().then(res => {
this.$nextTick(() => {
let topItem = { let topItem = {
fullName: "全部", fullName: "全部",
hasChildren: true, hasChildren: true,
...@@ -294,7 +299,6 @@ export default { ...@@ -294,7 +299,6 @@ export default {
children: res.data.list children: res.data.list
} }
this.treeData =[topItem] this.treeData =[topItem]
this.$nextTick(() => {
if (!this.treeData.length) { if (!this.treeData.length) {
this.treeLoading = false this.treeLoading = false
this.listLoading = false this.listLoading = false
...@@ -304,14 +308,17 @@ export default { ...@@ -304,14 +308,17 @@ export default {
this.$refs.treeBox.setCurrentKey(this.treeData[0].id) this.$refs.treeBox.setCurrentKey(this.treeData[0].id)
this.treeLoading = false this.treeLoading = false
if (isInit) this.initData() if (isInit) this.initData()
this.getcommontree()
}) })
}).catch(() => { }).catch(() => {
this.treeLoading = false this.treeLoading = false
}) })
}else{ }else{
getOrganize(this.organizeId).then(res => { getOrganize(this.organizeId).then(res => {
this.treeData =res.data
this.$nextTick(() => { this.$nextTick(() => {
this.treeData =res.data
if (!this.treeData.length) { if (!this.treeData.length) {
this.treeLoading = false this.treeLoading = false
this.listLoading = false this.listLoading = false
...@@ -321,11 +328,17 @@ export default { ...@@ -321,11 +328,17 @@ export default {
this.$refs.treeBox.setCurrentKey(this.treeData[0].id) this.$refs.treeBox.setCurrentKey(this.treeData[0].id)
this.treeLoading = false this.treeLoading = false
if (isInit) this.initData() if (isInit) this.initData()
this.getcommontree()
}) })
}).catch(() => { }).catch(() => {
this.treeLoading = false this.treeLoading = false
}) })
} }
/* getOrganizeList().then(res => { /* getOrganizeList().then(res => {
this.treeData = res.data.list this.treeData = res.data.list
this.$nextTick(() => { this.$nextTick(() => {
...@@ -349,12 +362,21 @@ export default { ...@@ -349,12 +362,21 @@ export default {
this.listLoading = false this.listLoading = false
}) })
}, },
getcommontree(){
this.treeData.map(firstLevel => {
if (firstLevel.children) {
firstLevel.children.forEach(secondLevel => {
this.expandedKeys.push(secondLevel.id);
});
}
});
},
personFormatter(row){ personFormatter(row){
/*row.roleIds = row.roleIds.map(roleCode => { /*row.roleIds = row.roleIds.map(roleCode => {
const matchedRole = this.roleInfo.find(item => item.enCode === roleCode); const matchedRole = this.roleInfo.find(item => item.enCode === roleCode);
return matchedRole ? matchedRole.fullName : roleCode; return matchedRole ? matchedRole.fullName : roleCode;
});*/ });*/
console.log(row,'vvvvvvvvvvvvv')
if(row.roleIds){ if(row.roleIds){
let str= row.roleIds.map(roleCode => { let str= row.roleIds.map(roleCode => {
const matchedRole = this.roleInfo.find(item => item.enCode === roleCode); const matchedRole = this.roleInfo.find(item => item.enCode === roleCode);
...@@ -377,13 +399,10 @@ export default { ...@@ -377,13 +399,10 @@ export default {
this.reset() this.reset()
}, },
addOrUpdateHandle(id) { addOrUpdateHandle(id) {
this.formVisible = true this.formVisible = true
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.Form.init(id, this.type === 'department' ? this.listQuery.organizeId : '') this.$refs.Form.init(id, this.type === 'department' ? this.listQuery.organizeId : '')
}) })
}, },
removeForm(isRefresh) { removeForm(isRefresh) {
this.formVisible = false this.formVisible = false
......
...@@ -50,18 +50,18 @@ ...@@ -50,18 +50,18 @@
</el-form> </el-form>
</el-row> </el-row>
<div class="JNPF-common-layout-main JNPF-flex-main"> <div class="JNPF-common-layout-main JNPF-flex-main">
<!-- <div class="JNPF-common-head">--> <!-- <div class="JNPF-common-head">-->
<!-- <topOpts @add="addOrUpdateHandle()">--> <!-- <topOpts @add="addOrUpdateHandle()">-->
<!-- <el-button type="text" icon="el-icon-download" @click="exportForm">导出</el-button>--> <!-- <el-button type="text" icon="el-icon-download" @click="exportForm">导出</el-button>-->
<!-- <el-button type="text" icon="el-icon-upload2" @click="uploadForm">导入</el-button>--> <!-- <el-button type="text" icon="el-icon-upload2" @click="uploadForm">导入</el-button>-->
<!-- </topOpts>--> <!-- </topOpts>-->
<!-- <div class="JNPF-common-head-right">--> <!-- <div class="JNPF-common-head-right">-->
<!-- <el-tooltip effect="dark" :content="$t('common.refresh')" placement="top">--> <!-- <el-tooltip effect="dark" :content="$t('common.refresh')" placement="top">-->
<!-- <el-link icon="icon-ym icon-ym-Refresh JNPF-common-head-icon" :underline="false"--> <!-- <el-link icon="icon-ym icon-ym-Refresh JNPF-common-head-icon" :underline="false"-->
<!-- @click="initData()" />--> <!-- @click="initData()" />-->
<!-- </el-tooltip>--> <!-- </el-tooltip>-->
<!-- </div>--> <!-- </div>-->
<!-- </div>--> <!-- </div>-->
<JNPF-table v-loading="listLoading" :data="tableData"> <JNPF-table v-loading="listLoading" :data="tableData">
<el-table-column prop="account" label="账号" width="100" /> <el-table-column prop="account" label="账号" width="100" />
<el-table-column prop="realName" label="姓名" width="100" /> <el-table-column prop="realName" label="姓名" width="100" />
...@@ -92,29 +92,29 @@ ...@@ -92,29 +92,29 @@
</el-table-column> </el-table-column>
<el-table-column label="操作" width="150"> <el-table-column label="操作" width="150">
<template slot-scope="scope" > <template slot-scope="scope" >
<el-button type="text" style="color:red;" @click="handleDel(scope.row.id)">删除</el-button> <el-button type="text" style="color:red;" v-if="account!=scope.row.account" @click="handleDel(scope.row.id)">删除</el-button>
<el-button type="text" @click="handleResetPwd(scope.row.id, scope.row.account)">重置密码</el-button> <el-button type="text" @click="handleResetPwd(scope.row.id, scope.row.account)">重置密码</el-button>
</template> </template>
<!-- <template slot-scope="scope" v-if="!scope.row.isAdministrator">--> <!-- <template slot-scope="scope" v-if="!scope.row.isAdministrator">-->
<!-- <tableOpts @del="handleDel(scope.row.id)">--> <!-- <tableOpts @del="handleDel(scope.row.id)">-->
<!--&lt;!&ndash; <tableOpts @edit="editOrUpdateHandle(scope.row.id)" @del="handleDel(scope.row.id)">&ndash;&gt;--> <!--&lt;!&ndash; <tableOpts @edit="editOrUpdateHandle(scope.row.id)" @del="handleDel(scope.row.id)">&ndash;&gt;-->
<!-- <el-dropdown hide-on-click>--> <!-- <el-dropdown hide-on-click>-->
<!-- <span class="el-dropdown-link">--> <!-- <span class="el-dropdown-link">-->
<!-- <el-button size="mini" type="text">--> <!-- <el-button size="mini" type="text">-->
<!-- {{$t('common.moreBtn')}}<i class="el-icon-arrow-down el-icon&#45;&#45;right"></i>--> <!-- {{$t('common.moreBtn')}}<i class="el-icon-arrow-down el-icon&#45;&#45;right"></i>-->
<!-- </el-button>--> <!-- </el-button>-->
<!-- </span>--> <!-- </span>-->
<!-- <el-dropdown-menu slot="dropdown">--> <!-- <el-dropdown-menu slot="dropdown">-->
<!-- <el-dropdown-item--> <!-- <el-dropdown-item-->
<!-- @click.native="handleResetPwd(scope.row.id, scope.row.account)">--> <!-- @click.native="handleResetPwd(scope.row.id, scope.row.account)">-->
<!-- {{$t('user.resetPassword')}}--> <!-- {{$t('user.resetPassword')}}-->
<!-- </el-dropdown-item>--> <!-- </el-dropdown-item>-->
<!-- <el-dropdown-item @click.native="unlockUser(scope.row.id)"--> <!-- <el-dropdown-item @click.native="unlockUser(scope.row.id)"-->
<!-- v-if="scope.row.enabledMark == 2">解除锁定</el-dropdown-item>--> <!-- v-if="scope.row.enabledMark == 2">解除锁定</el-dropdown-item>-->
<!-- </el-dropdown-menu>--> <!-- </el-dropdown-menu>-->
<!-- </el-dropdown>--> <!-- </el-dropdown>-->
<!-- </tableOpts>--> <!-- </tableOpts>-->
<!-- </template>--> <!-- </template>-->
</el-table-column> </el-table-column>
</JNPF-table> </JNPF-table>
<pagination :total="total" :page.sync="listQuery.currentPage" <pagination :total="total" :page.sync="listQuery.currentPage"
...@@ -170,6 +170,7 @@ export default { ...@@ -170,6 +170,7 @@ export default {
}, },
data() { data() {
return { return {
account:'',
keyword: '', keyword: '',
treeData: [], treeData: [],
tableData: [], tableData: [],
...@@ -208,6 +209,9 @@ export default { ...@@ -208,6 +209,9 @@ export default {
} }
}, },
created() { created() {
console.log(this.$store.state.user.userInfo.userAccount,'ggggggg')
this.account=this.$store.state.user.userInfo.userAccount
console.log(this.account,'vvvvvvvvvvvvvvv')
this.getOrganizeList(true) this.getOrganizeList(true)
}, },
methods: { methods: {
......
...@@ -8,7 +8,7 @@ function resolve(dir) { ...@@ -8,7 +8,7 @@ function resolve(dir) {
return path.join(__dirname, dir) return path.join(__dirname, dir)
} }
const name = defaultSettings.title || '中小学心理危机防范直报系统' // page title const name = defaultSettings.title || '武汉教育通讯录' // page title
// If your port is set to 80, // If your port is set to 80,
// use administrator privileges to execute the command line. // use administrator privileges to execute the command line.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment