Commit 4f523127 authored by 华国豪's avatar 华国豪 🙄

工作日志查看

parent d08fba1e
......@@ -38,6 +38,7 @@ global.PREVIWERIMGS = []
global.PREVIWERIMG = 0
global.DIALOG_MESSAGE = ''
global.CURRENT_TEAM_MEMBERS = {}
global.WORKUSERID = ''
let updateTimer
let loginWindow
let mainWindow
......@@ -48,6 +49,7 @@ let hideWindow
let newMsgWindow
let scrollerhotWindows
let addNewUserWinodes
let workWinodes
let dialogWindows
let noticeWindows
let forwardWindows
......@@ -81,7 +83,7 @@ const noticeUrl = process.env.NODE_ENV === 'development' ? `http://localhost:908
const addnewuserUrl = process.env.NODE_ENV === 'development' ? `http://localhost:9080/#/addnewuser` : `file://${__dirname}/index.html#/addnewuser`
const appXmlPath = process.execPath.substring(0, process.execPath.lastIndexOf('\\') + 1) + 'app.json'
const forwardUrl = process.env.NODE_ENV === 'development' ? `http://localhost:9080/#/forwardMsg` : `file://${__dirname}/index.html#/forwardMsg`
const workWin = process.env.NODE_ENV === 'development' ? `http://localhost:9080/#/workWin` : `file://${__dirname}/index.html#/workWin`
if (process.env.NODE_ENV !== 'development') {
......@@ -757,6 +759,10 @@ ipc.on('createo-or-open-team', function(event, obj) {
global.CURRENT_TEAM_MEMBERS = obj
getAddNewUserWinodes()
})
ipc.on('createo-or-open-work', function(event, obj) {
global.WORKUSERID = obj
getWorkWin()
})
ipc.on('open-forward-msg', function(event, obj) {
global.FORWARD_MSG = obj
getForwardWindows()
......@@ -992,7 +998,32 @@ let getAddNewUserWinodes = function() {
}
}
let getWorkWin = function() {
if (!workWinodes || workWinodes.isDestroyed()) {
workWinodes = new BrowserWindow({
transparent: systemPreferences.isAeroGlassEnabled(),
frame: false,
maximizable: true,
resizable: true,
show: false,
icon: windowIcon,
width: 450,
height: 670,
skipTaskbar: false,
alwaysOnTop: false,
webPreferences: { webSecurity: false }
})
workWinodes.loadURL(workWin)
workWinodes.setMenu(null)
workWinodes.once('ready-to-show', () => {
workWinodes.show()
//addNewUserWinodes.webContents.openDevTools(true);
})
} else {
workWinodes.focus()
}
}
let getForwardWindows = function() {
if (!forwardWindows || forwardWindows.isDestroyed()) {
forwardWindows = new BrowserWindow({
......
......@@ -102,6 +102,7 @@ export default {
};
},
mounted() {
console.log(this.$electron.remote.getGlobal("LOGINUSER"))
const updateOnlineStatus = () => {
if(navigator.onLine && this.isdissconnection){
this.isdissconnection=false
......
......@@ -58,6 +58,40 @@
></span>
<span v-else-if="msg.type==='custom-type1'" class="msg-text" ref="mediaMsg"></span>
<span v-else-if="msg.type==='custom-type3'" class="msg-text" ref="mediaMsg"></span>
<span v-else-if="msg.type==='custom-type4'" class="msg-text" ref="mediaMsg" @click="openWorkWin(msg.emojiCnt.empId, msg.emojiCnt.date)">
<div class="custom-type4" v-if="msg.flow=='in'">
<img class="rili-img" src="http://staticfile.oytour.com/New/Upload/Cloud/2019-10/20191009110135253.png" alt="">
<el-row>
<el-col :span="18">
<p class="custom-type4-name">{{msg.emojiCnt.name}}</p>
<p class="custom-type4-type">の工作汇报</p>
<div class="custom-type4-time">
<img src="http://staticfile.oytour.com/New/Upload/Cloud/2019-10/20191009110135257.png" alt="">
<p>{{msg.emojiCnt.date}}</p>
</div>
</el-col>
<el-col :span="6">
<img class="ren-img" src="http://staticfile.oytour.com/New/Upload/Cloud/2019-10/20191009110135393.png" alt="">
</el-col>
</el-row>
</div>
<div class="custom-type4 custom-type4-out" v-if="msg.flow=='out'">
<img class="rili-img" src="http://staticfile.oytour.com/New/Upload/Cloud/2019-10/20191009110135253.png" alt="">
<el-row>
<el-col :span="6">
<img class="ren-img" src="http://staticfile.oytour.com/New/Upload/Cloud/2019-10/20191009110135341.png" alt="">
</el-col>
<el-col :span="18">
<p class="custom-type4-name">{{msg.emojiCnt.name}}</p>
<p class="custom-type4-type">の工作汇报</p>
<div class="custom-type4-time">
<img src="http://staticfile.oytour.com/New/Upload/Cloud/2019-10/20191009110135257.png" alt="">
<p>{{msg.emojiCnt.date}}</p>
</div>
</el-col>
</el-row>
</div>
</span>
<span
v-else-if="msg.type==='image'"
class="msg-text"
......@@ -292,6 +326,14 @@ export default {
}); // end this.nextTick
},
methods: {
openWorkWin(id, time){
//打开工作日志详情窗口
let msg = {
id: id,
time: time
}
this.$electron.ipcRenderer.send("createo-or-open-work", msg);
},
AtHim(e){
if (e.target.dataset.flow == "out" || e.target.dataset.scene !== 'team') {
return
......@@ -468,7 +510,13 @@ export default {
item.type = "custom-type3";
item.imgUrl = `${emojiCnt.img}`;
}
} else if (content.msgtype=='custom_work') {// 工作日志
let data = content.data;
let emojiCnt = data.content.data[0].params;
item.emojiCnt = emojiCnt
item.type = "custom-type4";
} else {
console.log(item)
this.formatCustom(item);
item.showText = util.parseCustomMsg(item);
if (item.showText == "[自定义消息]") {
......@@ -1297,6 +1345,71 @@ export default {
user-select: none;
font-family: 'Microsoft YaHei' !important;
}
.custom-type4{
padding: 4px;
width: 270px;
min-width: 270px;
height: 130px;
background: url(http://staticfile.oytour.com/New/Upload/Cloud/2019-10/20191009110135418.png);
background-repeat: no-repeat;
background-size: 100% 100%;
position: relative;
cursor: pointer;
box-sizing: border-box;
}
.custom-type4-out .custom-type4-name{
padding-left: 15px;
}
.custom-type4-out .custom-type4-type{
padding-right: 40px;
}
.custom-type4 .rili-img{
position: absolute;
left: 10px;
width: 40px;
}
.custom-type4.custom-type4-out .rili-img{
left: inherit;
right: 10px;
}
.custom-type4 .ren-img{
width: 70px;;
}
.custom-type4-name{
margin-top: 20px;
color: white;
font-size: 24px;
padding-left: 70px;
margin-bottom: 0;
font-weight: 600;
font-family: "pingfangR" !important;
}
.custom-type4-type{
color: #E7AC5F;
font-size: 20px;
text-align: right;
margin-top: 10px;
padding-right: 10px;
font-family: "pingfang" !important;
margin-bottom: 5px;
}
.custom-type4-time{
display: flex;
color: #DADADA;
font-size: 16px;
height: 25px;
align-items: center;
padding-left: 10px;
}
.custom-type4-out .custom-type4-time{
justify-content: flex-end;
padding-right: 10px;
}
.custom-type4-time img{
width: 24px;
margin-right: 10px;
}
.item-you .in .at-user{
color: #00adff;
}
......
......@@ -126,9 +126,10 @@
</li>
</template>
<template v-for="(session, index) in sessionlist">
<!-- && session.lastMsgShow!== '[未知消息类型]' -->
<li
:class="{'active':currentSession.id==session.id}"
v-if="!session.top && (sessionKey=='' || session.name.indexOf(sessionKey)!=-1)"
v-if="!session.top && (sessionKey=='' || session.name.indexOf(sessionKey)!=-1) && session.name!== ''"
:key="index"
@contextmenu.prevent='showMenu(session,$event)'
@click="enterChat(session)"
......@@ -641,6 +642,7 @@ export default {
) {
item.lastMsgShow = util.generateTeamSysmMsg(lastMsg);
} else if (util.mapMsgType(lastMsg)) {
console.log(item)
item.lastMsgShow = `[${util.mapMsgType(lastMsg)}]`;
} else {
item.lastMsgShow = "";
......
<template>
<div class="work-box">
<div class="header__opera">
<span class="opera__item close" @click="close">
<i class="iconfont iconguanbi"></i>
</span>
</div>
<div v-if="src" style="width: 100%; height: 100%">
<iframe :src='src' style="-webkit-app-region: no-drag !important;width: 100%; height: 100%;border: none;">
</iframe>
</div>
</div>
</template>
<script>
export default {
data(){
return {
src: ''
}
},
mounted() {
let num = Math.ceil(Math.random()*10)
let loginuser = this.$electron.remote.getGlobal("LOGINUSER");
let token = loginuser.token;
let id = this.$electron.remote.getGlobal("WORKUSERID").id
let time = this.$electron.remote.getGlobal("WORKUSERID").time
this.src = `https://activity.oytour.com/html/workPage.html?id=${id}&time=${time}&token=${token}&t=${num}`
},
methods: {
close() {
this.$electron.remote.getCurrentWindow().close();
},
}
}
</script>
<style>
.work-box {
width: 100%;
height: 100%;
box-sizing: border-box;
border: 1px solid #ddd;
box-shadow: 0 0 2px #ccc;
background: #fff;
padding-top: 24px;
-webkit-app-region: drag !important;
}
.work-box .header__opera {
position: absolute;
top: 0px;
right: 0px;
text-align: right;
height: 24px !important;
}
.work-box .header__opera .opera__item {
padding: 2px 5px;
color: #aaa;
cursor: pointer;
display: inline-block;
-webkit-app-region: no-drag !important;
}
.work-box .header__opera .opera__item i {
font-size: 14px;
}
.work-box .header__opera .close:hover {
color: #f1f1f1;
background: #eb3b5a;
}
</style>
\ No newline at end of file
......@@ -48,6 +48,11 @@ export default new Router({
name: 'addnewuser',
component: require('@/components/team/addNewUser')
},
{
path: '/workWin',
name: 'workWin',
component: require('@/components/team/workWin')
},
{
path: '/notice',
name: 'notice',
......
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