Commit 1b63a44a authored by 罗超's avatar 罗超

no message

parent d50e7b74
......@@ -82,7 +82,7 @@ let rendererConfig = {
test: /\.(mp4|webm|ogg|mp3|wav|flac|aac)(\?.*)?$/,
loader: 'url-loader',
options: {
limit: 10000,
limit: 10,
name: 'media/[name]--[folder].[ext]'
}
},
......
......@@ -66,6 +66,14 @@ let webConfig = {
name: 'fonts/[name].[ext]'
}
}
},
{
test: /\.(mp4|webm|ogg|mp3|wav|flac|aac)(\?.*)?$/,
loader: 'url-loader',
options: {
limit: 10,
name: 'media/[name]--[folder].[ext]'
}
}
]
},
......
......@@ -16,3 +16,4 @@ yarn-error.log*
dist/
package/
build/
node_modules.rar
This diff is collapsed.
......@@ -33,12 +33,12 @@
"dist/electron/**/*"
],
"win": {
"icon": "static/icons/logo.ico"
"icon": "build/icons/logo.ico"
}
},
"dependencies": {
"axios": "^0.16.1",
"element-ui": "^1.4.4",
"element-ui": "^2.6.0",
"js-md5": "^0.6.0",
"kscreenshot": "^1.2.0",
"moment": "^2.18.1",
......
......@@ -2,7 +2,7 @@
<html>
<head>
<meta charset="UTF-8">
<title id="index-title">窝游助手</title>
<title id="index-title">麦子助手</title>
<link rel="icon" href="~@/assets/img/logo.ico" />
<% if (htmlWebpackPlugin.options.nodeModules) { %>
<!-- Add `node_modules/` to global paths so `require` works properly in development -->
......
This diff is collapsed.
<style>
@import url("./assets/css/font.css");
@import url("./assets/css/global.css");
@import url("//at.alicdn.com/t/font_1062339_2wir0xyzmh3.css");
@import url("./assets/css/alifont");
</style>
......
This diff is collapsed.
......@@ -15,6 +15,9 @@ body {
width: 100%;
height: 100%;
}
i{
outline: none;
}
input[type="submit"],
input[type="reset"],
input[type="button"],
......
This diff is collapsed.
<template>
<transition name="el-zoom-in-top">
<div class="homebox" :class="{'full':isMaxed}">
<div class="homebox" id='homebox' :class="{'full':isMaxed}">
<div class="leftPannel">
<div class="head">
<img :src="user.Icon" draggable="false">
<img :src="user.Icon" draggable="false" @click.stop="showCard">
</div>
<ul class="menu">
<li :class="{'active':chosenState.val==0}">
......@@ -22,6 +22,11 @@
</el-tooltip>
</li>
</ul>
<div class="last">
<el-tooltip class="item" effect="dark" content="设置" placement="right">
<i class="iconfont iconsanheng"></i>
</el-tooltip>
</div>
</div>
<div class="rightPannel">
<div class="navtool">
......@@ -42,16 +47,26 @@
</div>
<div class="contentarea">
<msg :user=user v-show="chosenState.val==0"></msg>
<mail v-show="chosenState.val==1"></mail>
<empty v-show="chosenState.val==2"></empty>
</div>
</div>
<user-card v-if='usercardInfo.searchName!=""' :usercard='usercardInfo'></user-card>
</div>
</transition>
</template>
<script>
import msg from './msssage/index'
import mail from './team/maillist'
import userCard from './team/usercard'
import empty from './tools/emptyPage'
export default {
components: {
msg
msg,
mail,
userCard,
empty
},
data() {
return {
......@@ -62,7 +77,13 @@ export default {
name: "消息"
},
noticeObj:{},
isMaxed: false
isMaxed: false,
usercardInfo:{
searchName:'',
top:0,
left:0,
currentAccount:''
}
};
},
mounted() {
......@@ -77,8 +98,24 @@ export default {
// scaleFactor;
// this.$electron.webFrame.setZoomFactor(zoomFactor);
this.user = this.$electron.remote.getGlobal("LOGINUSER");
this.usercardInfo.currentAccount=this.user.ImAccount
this.$electron.ipcRenderer.send('create-session')
let that=this
this.MsgBus.$on("open-card", function(name,top,left) {
that.usercardInfo={
searchName:name,
top,
left,
currentAccount:that.user.ImAccount
}
});
this.MsgBus.$on("change-create-session", function(obj) {
that.chosenState={
val: 0,
name: "消息"
}
that.MsgBus.$emit('create-session',obj)
});
this.$electron.ipcRenderer.on('openMsgBox', (event,session) => {
that.changeMenu(0,'消息')
this.MsgBus.$emit("set-current-session",session)
......@@ -89,8 +126,27 @@ export default {
this.$electron.ipcRenderer.on('new-screen-hot', (event,dataurl) => {
this.MsgBus.$emit("new-screen-hot",dataurl)
})
//
this.$electron.ipcRenderer.on('save-team-members', (event,obj) => {
if(obj.action=='add'){
this.MsgBus.$emit("save-members",obj.teamMembers)
}else if(obj.action=='delete'){
this.MsgBus.$emit("delete-members",obj.teamMembers)
}else if(obj.action=='create'){
this.MsgBus.$emit("create-group",obj.teamMembers)
}
//
})
document.getElementById('homebox').addEventListener("click", function() {
if (that.usercardInfo.searchName!="") {
that.usercardInfo.searchName=""
}
});
},
methods: {
showCard(e){
this.MsgBus.$emit('open-card',this.user.emName,e.clientY,e.clientX)
},
changeMenu(i, n) {
this.chosenState = {
val: i,
......@@ -122,14 +178,14 @@ export default {
</script>
<style>
.homebox {
width: calc(100% - 10px);
height: calc(100% - 10px);
overflow: hidden;
width: 100%;
height: 100%;
background: #fff;
border-radius: 2px;
position: relative;
box-shadow: 0 0 2px #ccc;
margin: 5px;
box-shadow: 0 0 2px #333;
margin: 0px;
box-sizing: border-box;
border:1px solid #ccc;
}
.homebox.full {
width: 100%;
......@@ -138,10 +194,10 @@ export default {
}
.homebox .leftPannel {
position: absolute;
left: 0px;
left: -1px;
width: 50px;
bottom: 0px;
top: 0px;
bottom: -1px;
top: -1px;
background: linear-gradient(
0deg,
rgba(71, 121, 255, 1),
......@@ -168,6 +224,18 @@ export default {
.homebox .leftPannel .menu {
margin: 0;
padding: 0;
position: relative;
}
.homebox .leftPannel .last{
left: 0;
bottom: 8px;
position: absolute;
right: 0;
text-align: center;
color: #eee;
}
.homebox .leftPannel .last i{
font-size: 24px;
}
.homebox .leftPannel .menu li {
display: block;
......@@ -225,6 +293,7 @@ export default {
color: #999;
cursor: pointer;
display: inline-block;
background: transparent;
-webkit-app-region: no-drag !important;
}
.homebox .rightPannel .navtool .child__item .header__opera .opera__item i {
......
......@@ -2,7 +2,7 @@
<transition name="el-zoom-in-top">
<div v-show="changeWindowsState" class="login-box">
<div class="login-box__header">
<img src="../assets/img/login/logo.png">
<img src="../assets/img/login/logo.png" style="height: 76px;">
<div class="header__opera">
<span class="opera__item min" @click="minWin">
<i class="iconfont iconzuixiaohua"></i>
......@@ -85,15 +85,15 @@ export default {
return {
loging: false,
usermodel: {
account: "17308037817",
voucher: "lc004257",
account: "",
voucher: "",
remeber: false
},
isRemeber: false,
errorMsg: "",
timerGoLogin: null,
countdown: 3,
changeWindowsState:true
changeWindowsState: true
};
},
methods: {
......@@ -134,9 +134,9 @@ export default {
} else {
localStorage.removeItem("autologin");
}
this.changeWindowsState=false
this.changeWindowsState = false;
setTimeout(() => {
this.$electron.ipcRenderer.send("loginSuccess",userData);
this.$electron.ipcRenderer.send("loginSuccess", userData);
}, 200);
} else {
this.usermodel.voucher = "";
......@@ -162,7 +162,8 @@ export default {
}
},
mounted() {
if (localStorage.autologin) {
let isSignout = this.$electron.remote.getGlobal("ISSIGNOUT");
if (localStorage.autologin && !isSignout) {
let remString = this.$encrypt.Decrypt(localStorage.autologin);
this.usermodel = JSON.parse(remString);
this.isRemeber = true;
......@@ -178,18 +179,18 @@ export default {
}
};
</script>
<style scope="">
<style scope>
.login-box {
width: 320px;
height: 460px;
width: 100%;
height: 100%;
background: #fff;
box-shadow: 0 0 2px #ccc;
overflow: hidden;
box-sizing: border-box;
border-radius: 2px;
margin: 5px;
/* border-radius: 2px; */
-webkit-user-select: none !important;
position: relative;
border: 1px solid #ccc;
padding-top: 170px;
}
.login-box .login-box_error {
position: absolute;
......@@ -207,33 +208,37 @@ export default {
}
}
/* .login-box *{
font-family: '微软雅黑' !important;
font-family: ''Microsoft YaHei'' !important;
} */
.login-box .login-box__header {
width: 320px;
height: 170px;
background: url("../assets/img/login/hg.png");
text-align: center;
display: table-cell;
display: flex;
vertical-align: middle;
align-items: center;
justify-content: center;
position: relative;
-webkit-app-region: drag;
-webkit-user-select: none;
position: absolute;
left: -1px;
/* margin: -1px -1px 0 -1px; */
right: -1px;
top: -1px;
}
.login-box .login-box__header .header__opera {
position: absolute;
top: 0px;
right: -1px;
text-align: right;
-webkit-app-region: no-drag !important;
-webkit-user-select: text !important;
}
.login-box .login-box__header .header__opera .opera__item {
padding: 2px 5px;
color: #f1f1f1;
cursor: pointer;
background: transparent;
display: inline-block;
-webkit-app-region: no-drag !important;
}
.login-box .login-box__header .header__opera .opera__item i {
font-size: 14px;
......@@ -303,7 +308,7 @@ export default {
color: #999;
font-size: 12px;
cursor: pointer;
font-family: "微软雅黑" !important;
font-family: "Microsoft YaHei" !important;
}
.login-box
.login-box__content
......@@ -346,7 +351,7 @@ export default {
.login-box .el-checkbox__label {
font-size: 12px;
color: #999;
font-family: "微软雅黑" !important;
font-family: "Microsoft YaHei" !important;
}
.login-box .el-checkbox__label:hover {
color: #4bca81;
......
This diff is collapsed.
......@@ -23,6 +23,7 @@
v-show="false"
@change="sendFileMsg"
multiple="multiple"
style='outline:none;border:none;'
>
</div>
<div draggable="true" id="text-box" ref="box">
......
......@@ -853,7 +853,7 @@ export default {
}
};
</script>
<style scoped>
<style scope>
@import url("../../assets/css/icon.css");
.item-me .error-msg {
color: #eb3b5a;
......@@ -1018,11 +1018,13 @@ export default {
.item-you .in .pool {
margin-left: 10px;
margin-right: -1px;
z-index: 5;
}
.item-me .out .pool {
margin-right: 10px;
margin-left: -1px;
background: rgba(71, 165, 255, 1);
z-index: 5;
}
.pool .split-item {
width: 100%;
......
This diff is collapsed.
......@@ -2,8 +2,16 @@
<div class="new-box" @mouseleave="leave">
<div class="title">{{userInfo.emName}}</div>
<ul>
<li v-for="(session, index) in sessionlist" class="clearfix" @click="openMsg(session)">
<img :src="session.avatar" />
<li v-for="(session, index) in sessionlist" class="clearfix" :key='index' @click="openMsg(session)">
<div
class="headinfo"
:class="{'notice':!session.avatar,'blue':session.groupType==0,'green':session.groupType==1,'user':session.groupType==-1}"
>
<img :src="session.avatar" v-if="session.avatar">
<i class="iconfont icontaolun" v-else-if="session.groupType == 0"></i>
<i class="iconfont iconqunzu" v-else-if="session.groupType == 1"></i>
<i class="iconfont iconyonghutouxiang" v-else></i>
</div>
<div class="content">
<div class="msgName">{{session.name}}</div>
<div class="unread-msg" v-show="session.unread > 0">{{session.unread}}</div>
......@@ -18,59 +26,59 @@
</template>
<script>
export default {
name: 'new-msg-page',
data () {
export default {
name: "new-msg-page",
data() {
return {
userInfo: {},
chosenMenuIndex: 0,
sessionlist: new Array(),
chosenImg: ''
}
chosenImg: ""
};
},
mounted: function () {
this.userInfo = this.$electron.remote.getGlobal('LOGINUSER')
this.sessionlist = this.$electron.remote.getGlobal('NEWMESSAGE')
setInterval(()=>{
this.sessionlist = this.$electron.remote.getGlobal('NEWMESSAGE')
},2000)
mounted: function() {
this.userInfo = this.$electron.remote.getGlobal("LOGINUSER");
this.sessionlist = this.$electron.remote.getGlobal("NEWMESSAGE");
setInterval(() => {
this.sessionlist = this.$electron.remote.getGlobal("NEWMESSAGE");
}, 2000);
},
methods: {
openMsg (session) {
var sessions = new Array()
sessions.push(session)
this.$store.state.openNewMsgSession = sessions
this.$electron.ipcRenderer.send('openNewMessage', session)
openMsg(session) {
var sessions = new Array();
sessions.push(session);
this.$store.state.openNewMsgSession = sessions;
this.$electron.ipcRenderer.send("openNewMessage", session);
},
leave () {
this.$electron.remote.getCurrentWindow().hide()
leave() {
this.$electron.remote.getCurrentWindow().hide();
},
ignoreAllMsg () {
this.$electron.ipcRenderer.send('ignore-all-message')
}
ignoreAllMsg() {
this.$electron.ipcRenderer.send("ignore-all-message");
}
}
};
</script>
<style scoped>
.new-box{
<style scope>
.new-box {
-webkit-app-region: no-drag !important;
width: 260px;
background: #fff;
border-top: 3px solid rgba(71, 121, 255, 1) ;
border-top: 3px solid rgba(71, 121, 255, 1);
}
.new-box .title{
.new-box .title {
font-size: 22px;
color: #333;
padding: 5px 12px;
}
.new-box ul{
.new-box ul {
display: block;
margin-bottom: 0px;
width: 100%;
padding: 0px;
margin-top: 0px;
}
.new-box ul li{
.new-box ul li {
display: block;
padding: 7px 12px;
list-style: none;
......@@ -78,11 +86,11 @@
position: relative;
-webkit-app-region: no-drag !important;
}
.new-box ul li:hover{
background: #D6D6D6;
.new-box ul li:hover {
background: #d6d6d6;
}
.new-box ul li .unread-msg{
.new-box ul li .unread-msg {
position: absolute;
background: #ef4455;
padding: 0px 4px;
......@@ -94,42 +102,69 @@
line-height: 17px;
text-align: center;
color: #fff;
font-size:12px;
font-size: 12px;
font-weight: 300;
}
.new-box ul li img{
.new-box ul li .headinfo {
width: 32px;
height: 32px;
border-radius:32px;
border-radius: 32px;
float: left;
margin-right:14px;
margin-right: 14px;
}
.new-box ul li .headinfo img{
width: 100%;
width: 32px;
height: 32px;
border-radius: 32px;
}
.new-box ul li .content{
.new-box ul li .headinfo.notice {
background: #fd9644;
border-radius: 100%;
text-align: center;
line-height: 32px;
color: #f1f1f1;
}
.new-box ul li .headinfo.notice.blue {
background: #2d98da;
color: rgba(255, 255, 255, 0.5);
}
.new-box ul li .headinfo.notice.green {
background: #00b894;
}
.new-box ul li .headinfo.notice.user {
background: #d1d8e0;
color: #999;
}
.new-box ul li .headinfo.notice i {
font-size: 16px;
}
.new-box ul li .content {
float: left;
width: 190px;
}
.new-box ul li .content .msgName{
.new-box ul li .content .msgName {
width: 100px;
font-size: 14px;
font-weight: 300;
overflow: hidden;
text-overflow:ellipsis;
text-overflow: ellipsis;
white-space: nowrap;
color: #333 !important;
}
.new-box ul li .content .msg-content{
.new-box ul li .content .msg-content {
overflow: hidden;
text-overflow:ellipsis;
text-overflow: ellipsis;
white-space: nowrap;
color: #bbb;
font-size: 12px;
}
.new-box .bottom-opera{
padding:7px 12px;
.new-box .bottom-opera {
padding: 7px 12px;
border-top: 1px solid #ededed;
}
.new-box .bottom-opera span{
color:#009ADA;
.new-box .bottom-opera span {
color: #009ada;
-webkit-app-region: no-drag !important;
cursor: pointer;
font-size: 12px;
......
......@@ -64,7 +64,7 @@ export default {
}
};
</script>
<style scoped>
<style scope>
@import url("../../assets/css/icon.css");
.item-me .error-msg {
color: #eb3b5a;
......@@ -225,11 +225,13 @@ export default {
.item-you .in .pool {
margin-left: 10px;
margin-right: -1px;
z-index: 5;
}
.item-me .out .pool {
margin-right: 10px;
margin-left: -1px;
background: rgba(71, 165, 255, 1);
z-index: 5;
}
.pool .split-item {
width: 100%;
......
<template>
<div class="notice-box">
<div class="messagehead">
<span class="objname">系统通知</span>
<span class="opera-box">
<el-tooltip class="item" effect="dark" content="清空所有消息" placement="bottom">
<el-button type="danger" @click="clearall" :disabled="notices.length==0" icon="el-icon-delete" circle size="mini"></el-button>
</el-tooltip>
</span>
</div>
<div class="notice-content" v-loading="loading">
<div
class="notice"
v-for="(item, index) in notices"
:key="index"
@click="openSystem(item.Link)"
>
<div
class="h"
:style="{'background':item.Title.substring(0,1)=='财'?'#FAB64B':'#3867d6'}"
>{{item.Title.substring(0,1)}}</div>
<div class="content">
<div class="t">{{item.Title}}</div>
<div class="c">{{item.Content}}</div>
</div>
<div class="timer">{{timeago(item.CreateTime)}}</div>
</div>
<div
class="more"
@click="getMore"
v-if="notices.length>0 && this.pages.pageSize*this.pages.pageIndex<this.pages.total"
>点击加载更多</div>
<div
class="nomore"
v-if="notices.length>0 && (this.pages.pageSize*this.pages.pageIndex)>=this.pages.total"
>
<div class="nomore-re">这是我的底线</div>
</div>
<div class="no-data" v-if="notices.length==0">
<i class="iconfont iconkong"></i>
</div>
</div>
</div>
</template>
<script>
export default {
data() {
return {
notices: [],
pages: {
total: 0,
pageSize: 20,
pageIndex: 1
},
user: null,
loading: false
};
},
mounted() {
this.user = this.$electron.remote.getGlobal("LOGINUSER");
this.getNotices();
this.$store.dispatch("setCurrSession", "p2p-684cb79fe92f46888888");
},
methods: {
clearall() {
let msg = {
EmployeeId: this.user.EmployeeId,
TypeId: 0,
ShowShortcut: 0,
RecPlatform: 2
};
this.apipost("SystemLog_post_LogSetReadStatusForUser", msg, res => {
console.log(res.data);
this.$store.dispatch("deleteSession", 'p2p-684cb79fe92f46888888');
this.$emit('clear-msg')
this.pages.pageIndex = 1;
this.getNotices();
});
},
openSystem(url) {
url = url.indexOf("/") != 0 ? url : url.substring(0, 1);
url = "http://yx.oytour.com/#/" + url;
this.$electron.ipcRenderer.send("openUrl", url);
},
getMore() {
this.pages.pageIndex++;
this.getNotices();
},
getNotices() {
if (this.pageIndex == 1) {
this.notices = [];
}
this.loading = true;
let msg = {
pageIndex: this.pages.pageIndex,
pageSize: this.pages.pageSize,
RB_BranchId: this.user.RB_Branch_id,
IsRead: 0,
IsSys: 1,
Recipient: this.user.EmployeeId,
RecPlatform: 2,
Title: "",
Type: "1",
ShowShortcut: "1"
};
this.apipost(
"SystemLog_get_LogGetPageList",
msg,
res => {
console.log(res.data.data);
if (res.data.resultCode == 1) {
this.pages.total = res.data.data.count;
if (res.data.data.count > 0) {
this.notices = this.notices.concat(res.data.data.pageData);
}
}
this.loading = false;
},
err => {}
);
},
timeago(dateTimeStr) {
var minute = 1000 * 60;
var hour = minute * 60;
var day = hour * 24;
var week = day * 7;
var halfamonth = day * 15;
var month = day * 30;
var now = new Date().getTime(); //获取当前时间毫秒
var diffValue = now - new Date(dateTimeStr).getTime(); //时间差
if (diffValue < 0) {
return;
}
var minC = diffValue / minute; //计算时间差的分,时,天,周,月
var hourC = diffValue / hour;
var dayC = diffValue / day;
var weekC = diffValue / week;
var monthC = diffValue / month;
let result = "";
if (monthC >= 1) {
result = "" + parseInt(monthC) + "月前";
} else if (weekC >= 1) {
result = "" + parseInt(weekC) + "周前";
} else if (dayC >= 1) {
result = "" + parseInt(dayC) + "天前";
} else if (hourC >= 1) {
result = "" + parseInt(hourC) + "小时前";
} else if (minC >= 1) {
result = "" + parseInt(minC) + "分钟前";
} else result = "刚刚";
return result;
}
}
};
</script>
<style scope>
.notice-box {
width: 100%;
height: 100%;
position: relative;
}
.notice-box .messagehead {
height: 46px;
line-height: 46px;
padding-left: 20px;
border-bottom: 1px solid #ddd;
position: relative;
display: flex;
}
.notice-box .messagehead .objname {
font-size: 24px;
color: #333;
flex: 1;
}
.notice-box .messagehead .opera-box {
margin-right: 10px;
}
.notice-box .notice-content {
position: absolute;
left: 0;
right: 0;
top: 66px;
bottom: 10px;
overflow-y: auto;
padding: 0 20px;
}
.notice-box .notice-content .notice {
width: 100%;
display: flex;
align-items: center;
border: 1px solid transparent;
padding: 10px;
box-sizing: border-box;
}
.notice-box .notice-content .notice:hover {
border-color: #eee;
border-radius: 2px;
}
.notice-box .notice-content .notice .h {
width: 40px;
height: 40px;
font-size: 24px;
font-weight: 500;
border-radius: 100%;
text-align: center;
line-height: 40px;
/* background: #FAB64B; */
background: #3867d6;
color: #fff;
}
.notice-box .notice-content .notice .content {
flex: 1;
margin-left: 12px;
}
.notice-box .notice-content .notice .content .t {
font-size: 16px;
color: #444;
margin-bottom: 4px;
font-family: "pingfangR" !important;
}
.notice-box .notice-content .notice .content .c {
font-size: 12px;
color: #999;
font-family: 'Microsoft YaHei' !important;
}
.notice-box .notice-content .notice .timer {
font-size: 12px;
color: #bbb;
font-family: 'Microsoft YaHei' !important;
}
.notice-box .notice-content .more {
color: #3867d6;
font-size: 12px;
text-align: center;
margin-top: 10px;
}
.notice-box .notice-content .more:hover {
text-decoration: underline;
}
.notice-box .notice-content .nomore {
color: #999;
font-size: 12px;
text-align: center;
margin-top: 20px;
border-top: 1px solid #ddd;
position: relative;
}
.notice-box .notice-content .nomore-re {
text-align: center;
display: inline-block;
padding: 0 10px;
background: #fff;
position: absolute;
left: 41%;
top: -9px;
}
.notice-box .no-data {
margin-top: 30px;
text-align: center;
}
.notice-box .no-data i {
font-size: 120px;
color: #bbb;
}
</style>
This diff is collapsed.
This diff is collapsed.
<template>
<div class="user-card" v-loading='loading' :style="{'top':usercard.top+'px','left':usercard.left+'px'}">
<div class="head">
<div class="h">
<img v-if="!user.avatar" src="../../assets/img/litheader.png">
<img v-if="user.avatar" :src="user.avatar">
</div>
<div class="u-info">
<div class="name">{{user.alias}}</div>
<div class="cname">
{{user.companyName}}
<i class="iconfont iconblue-dot"></i>{{user.departmentName}}
</div>
</div>
</div>
<div class="content">
<div class="items">
<span class="label">电话</span>
<span class="val">{{user.account}}</span>
</div>
<div class="items">
<span class="label">职务</span>
<span class="val">{{user.postName}}</span>
</div>
<div class="items btn" v-if="usercard.currentAccount!=user.account">
<el-button type="primary" :disabled="!user.account" icon="iconfont iconliaotian" size="small">和TA聊聊</el-button>
<div class="err" v-if="!user.account">对方还未开通IM账户,无法和他聊天</div>
</div>
</div>
</div>
</template>
<script>
export default {
props: {
usercard:{
type:Object,
default:{}
}
},
data() {
return {
user: null,
loading:false
};
},
mounted() {
this.getUserInfo();
console.log(this.usercard)
},
methods: {
getUserInfo() {
this.loading=true
if (this.usercard.searchName) {
this.apipost(
"admin_Get_Chat_All_SelectEmpName",
{ EmName: this.usercard.searchName },
res => {
if (res.data.resultCode == 1) {
let userinfo=null
res.data.data.forEach(x=>{
if(x.name==this.usercard.searchName){
userinfo=x
return false
}
})
this.createUserInf(userinfo);
}
this.loading=false
},
err => {}
);
}
},
createUserInf(data) {
this.user = {
id: "p2p-" + data.imAccount,
account: data.imAccount,
avatar: data.icon,
alias: data.name,
name: data.name,
companyName: data.companyName,
departmentName: data.departmentName,
postName: data.postName,
unread: 0,
isMute: false,
top: false,
lastMsgShow: ""
};
}
}
};
</script>
<style scope>
.user-card {
position: absolute;
top: 0;
left: 0;
z-index: 5;
width: 271px;
background: rgba(255, 255, 255, 1);
box-shadow: 0px 2px 5px 0px rgba(170, 170, 170, 0.75);
border: 1px solid rgb(170, 170, 170, 0.65);
}
.user-card .head {
height: 98px;
background: linear-gradient(
90deg,
rgba(71, 121, 255, 0.25),
rgba(71, 165, 255, 0.25)
);
padding: 20px;
box-sizing: border-box;
display: flex;
}
.user-card .head .h {
width: 56px;
height: 56px;
background: rgba(179, 202, 252, 1);
border: 3px solid rgba(255, 255, 255, 1);
border-radius: 50%;
box-sizing: border-box;
align-items: center;
}
.user-card .head .h img {
width: 50px;
height: 50px;
border-radius: 50%;
}
.user-card .head .u-info {
margin-left: 15px;
}
.user-card .head .u-info .name {
font-size: 22px;
margin-bottom: 5px;
color: #000;
}
.user-card .head .u-info .cname {
font-size: 12px;
color: #000;
}
.user-card .head .u-info .cname i {
font-size: 14px;
color: rgb(71, 165, 255);
margin: 0 2px;
}
.user-card .content {
padding: 20px;
}
.user-card .content .items {
display: flex;
margin-bottom: 20px;
}
.user-card .content .items.btn {
margin: 0px;
display: block;
}
.user-card .content .items.btn .el-button {
width: 100%;
}
.user-card .content .items.btn .el-button i {
font-size: 14px;
margin-right: 4px;
}
.user-card .content .items.btn .err {
margin-top: 10px;
color: #eb3b5a;
font-size: 12px;
}
.user-card .content .items .label {
color: #999;
font-family: 'Microsoft YaHei' !important;
font-size: 12px;
margin-right: 20px;
}
.user-card .content .items .val {
color: #000;
font-family: 'Microsoft YaHei' !important;
font-size: 12px;
}
</style>
......@@ -241,7 +241,7 @@ export default {
}
};
</script>
<style>
<style scope>
.file-send-box {
min-width: 30px;
overflow: hidden;
......
<template>
<div style="width:100%;height:100%">
<div style="width:100%;height:100%;overflow:hidden;">
<el-dialog title="提示" :visible.sync="visible" :before-close="handleClose" width="100%">
<span>{{msg}}</span>
<span slot="footer" class="dialog-footer">
<el-button type="primary" @click="close">确 定</el-button>
<el-button type="primary" @click="close" size="mini">确 定</el-button>
</span>
</el-dialog>
</div>
......@@ -13,7 +13,7 @@ export default {
data() {
return {
msg: "",
visible:true
visible: true
};
},
mounted() {
......@@ -24,22 +24,23 @@ export default {
this.$electron.remote.getCurrentWindow().close();
},
handleClose(done) {
this.close()
this.close();
}
}
};
</script>
<style>
.el-dialog{
<style scope>
.el-dialog {
top: 0px !important;
width: 100% !important;
bottom: 0 !important;
bottom: 0px !important;
transform: translateX(0%);
margin-bottom: 0;
left: 0;
border:1px solid #ccc;
border-radius: 2px;
border: 1px solid #ccc;
box-sizing: border-box;
position: absolute !important;
margin-top: 0 !important;
}
.el-dialog__header {
padding: 10px 10px 0;
......@@ -53,11 +54,13 @@ export default {
bottom: 0;
width: 100%;
}
.el-dialog__close{
font-size: 11px !important;
.el-dialog__headerbtn {
top: 10px;
}
.el-dialog__close:hover{
color:tomato;
.el-dialog__close {
font-size: 12px !important;
}
.el-dialog__close:hover {
color: tomato;
}
</style>
<template>
<div class="none-data">
正在开发中,敬请期待!
</div>
</template>
<script>
export default {
}
</script>
<style scope>
.none-data{
padding: 50px;
font-size: 26px;
color: #666;
text-align: center;
}
</style>
<template>
<ul id="rightMenu" class="right-menu" :style="{'top':`${top}px`,'left':`${left}px`}">
<li @click="markSessionTop">{{!session.top?'消息置顶':'取消置頂'}}</li>
<li @click="markMute">{{!session.isMute?'消息免打扰':'开启新消息提醒'}}</li>
<li @click="deleteSession">删除聊天</li>
</ul>
</template>
<script>
export default {
props: {
top: {
type: Number,
default: 0
},
left: {
type: Number,
default: 0
},
session: {
type: Object,
default: 0
},
config: {
type: Object,
default: 0
}
},
data() {
return {};
},
mounted() {
document
.getElementById("rightMenu")
.removeEventListener("click", function(e) {
e.preventDefault();
e.stopPropagation();
});
},
methods: {
deleteSession() {
this.$store.dispatch("deleteSession", this.session.id);
this.config.show = false;
},
markMute() {
if (this.session.id.indexOf("team") != -1) {
this.markTeamInMutelist();
} else {
this.markInMutelist();
}
},
markInMutelist() {
this.$store.dispatch("markInMutelist", {
scene: this.session.scene,
to: this.session.to,
isAdd: !this.session.isMute,
account: this.session.to,
name: this.session.name
});
this.config.show = false;
},
markTeamInMutelist() {
var action = "updateInfoInTeam";
this.$store.dispatch("delegateTeamFunction", {
functionName: action,
options: {
teamId: this.session.id.split("-")[1],
muteTeam: !this.session.isMute,
muteNotiType: !this.session.isMute ? 1 : 0,
done: (error, team) => {console.log(error)}
}
});
this.config.show = false;
},
markSessionTop() {
let TOPSESSION = [];
if (window.localStorage.top) {
let isExsit = -1;
TOPSESSION = JSON.parse(window.localStorage.top);
if (TOPSESSION.length > 0) {
TOPSESSION.forEach((x, i) => {
if (x == this.session.id) {
isExsit = i;
}
});
}
if (isExsit == -1) {
TOPSESSION.push(this.session.id);
} else {
TOPSESSION.splice(isExsit, 1);
}
} else {
TOPSESSION.push(this.session.id);
}
window.localStorage.top = JSON.stringify(TOPSESSION);
this.$emit("update-session", TOPSESSION);
this.config.show = false;
}
}
};
</script>
<style scope>
.right-menu {
width: 120px;
border: 1px solid rgb(196, 196, 196);
box-shadow: 0 0 2px rgb(196, 196, 196);
position: absolute;
z-index: 99999999999;
background: #fff;
padding: 0;
margin: 0;
border-radius: 2px;
}
.right-menu li {
padding-left: 20px;
padding-right: 10px;
list-style: none;
font-size: 12px;
font-family: 'Microsoft YaHei' !important;
color: #000;
height: 28px;
line-height: 28px;
cursor: default;
}
.right-menu li:hover {
background: #ddd;
}
</style>
<template>
<div class="notice-tip" v-if="newNotice">
<div class="h">
<span class="icon">
<img src="../../assets/img/32.png">
</span>
<span class="t">{{newNotice.Title}}</span>
<span class="icon" style="margin-top: -8px;" @click="close">
<i class="el-icon-close" style="font-size:14px;color:#333;cursor: pointer;"></i>
</span>
</div>
<div class="c">{{newNotice.Content}}</div>
<div class="b" @click="link(newNotice.Link)">立即查看</div>
</div>
</template>
<script>
export default {
data() {
return {
newNotice: null,
user: null
};
},
mounted() {
this.user = this.$electron.remote.getGlobal("LOGINUSER");
this.loadNotice();
setTimeout(() => {
this.close()
}, 5000*2);
},
methods: {
link(url) {
url = url.indexOf("/") != 0 ? url : url.substring(0, 1);
url = "http://yx.oytour.com/#/" + url;
this.$electron.ipcRenderer.send("openUrl", url);
this.close()
},
loadNotice() {
let msg = {
pageIndex: 1,
pageSize: 1,
RB_BranchId: this.user.RB_Branch_id,
IsRead: 0,
IsSys: 1,
Recipient: this.user.EmployeeId,
RecPlatform: 2,
Title: "",
Type: "1",
ShowShortcut: "1"
};
this.apipost(
"SystemLog_get_LogGetPageList",
msg,
res => {
if (res.data.data.pageData.length > 0)
this.newNotice = res.data.data.pageData[0];
},
err => {}
);
},
close() {
this.$electron.remote.getCurrentWindow().close();
}
}
};
</script>
<style scope>
.notice-tip {
width: 300px;
height: 115px;
background: rgba(252, 254, 255, 1);
border: 1px solid #ddd;
box-sizing: border-box;
}
.notice-tip .h {
height: 30px;
display: flex;
align-items: center;
border-bottom: 1px solid #ddd;
}
.notice-tip .h .icon {
width: 16px;
height: 16px;
margin: 0 8px;
}
.notice-tip .h .t {
font-size: 14px;
font-family: 'Microsoft YaHei' !important;
color: #333;
font-weight: 100;
flex: 1;
}
.notice-tip .c {
padding: 20px;
font-size: 12px;
font-family: 'Microsoft YaHei' !important;
color: #666;
}
.notice-tip .b {
text-align: right;
padding-right: 8px;
color: #4b7bec;
font-size: 12px;
font-family: 'Microsoft YaHei' !important;
cursor: pointer;
}
.notice-tip .b:hover {
text-decoration: underline;
}
</style>
......@@ -45,7 +45,7 @@ export default {
}
};
</script>
<style>
<style scope>
.previewerimg {
width: 100%;
height: 100%;
......
......@@ -82,7 +82,7 @@ export default {
}
};
</script>
<style>
<style scope>
.scrollerhot {
width: 100%;
height: 100%;
......
import Vue from 'vue'
import axios from 'axios'
import App from './App'
import router from './router'
import store from '../store'
import ElementUI from 'element-ui'
import 'element-ui/lib/theme-default/index.css'
import 'element-ui/lib/theme-chalk/index.css'
import App from './App'
import editor from 'vue-html5-editor'
import 'vue-html5-editor/src/style.css'
import MyPlugin from '../plugin/plugin'
import encrypt from '../plugin/encry'
import 'viewerjs/dist/viewer.css'
import Viewer from 'v-viewer'
import 'viewerjs/dist/viewer.css'
Vue.use(editor)
Vue.use(MyPlugin)
......
......@@ -48,6 +48,11 @@ export default new Router({
path: '/addnewuser',
name: 'addnewuser',
component: require('@/components/team/addNewUser')
},
{
path: '/notice',
name: 'notice',
component: require('@/components/tools/notice')
}
]
})
......@@ -51,6 +51,7 @@ export function deleteSession ({state, commit}, sessionId) {
scene,
to: account,
done: function deleteServerSessionDone (error, obj) {
if (error) {
alert(error)
return
......
static/icons/logo.ico

264 KB | W: | H:

static/icons/logo.ico

264 KB | W: | H:

static/icons/logo.ico
static/icons/logo.ico
static/icons/logo.ico
static/icons/logo.ico
  • 2-up
  • Swipe
  • Onion skin
This diff is collapsed.
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