Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
Madara
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
viitto
Madara
Commits
4f523127
Commit
4f523127
authored
Oct 09, 2019
by
华国豪
🙄
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
工作日志查看
parent
d08fba1e
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
223 additions
and
2 deletions
+223
-2
index.js
src/main/index.js
+32
-1
index.vue
src/renderer/components/index.vue
+1
-0
chatitem.vue
src/renderer/components/msssage/chatitem.vue
+113
-0
index.vue
src/renderer/components/msssage/index.vue
+3
-1
workWin.vue
src/renderer/components/team/workWin.vue
+69
-0
index.js
src/renderer/router/index.js
+5
-0
No files found.
src/main/index.js
View file @
4f523127
...
...
@@ -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
({
...
...
src/renderer/components/index.vue
View file @
4f523127
...
...
@@ -102,6 +102,7 @@ export default {
};
},
mounted
()
{
console
.
log
(
this
.
$electron
.
remote
.
getGlobal
(
"LOGINUSER"
))
const
updateOnlineStatus
=
()
=>
{
if
(
navigator
.
onLine
&&
this
.
isdissconnection
){
this
.
isdissconnection
=
false
...
...
src/renderer/components/msssage/chatitem.vue
View file @
4f523127
...
...
@@ -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
;
}
...
...
src/renderer/components/msssage/index.vue
View file @
4f523127
...
...
@@ -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
=
""
;
...
...
src/renderer/components/team/workWin.vue
0 → 100644
View file @
4f523127
<
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
src/renderer/router/index.js
View file @
4f523127
...
...
@@ -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'
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment