Commit 1caed191 authored by 华国豪's avatar 华国豪 🙄

新增云盘

parent 9c7b1302
...@@ -41,6 +41,7 @@ global.PREVIWERIMG = 0 ...@@ -41,6 +41,7 @@ global.PREVIWERIMG = 0
global.DIALOG_MESSAGE = '' global.DIALOG_MESSAGE = ''
global.CURRENT_TEAM_MEMBERS = {} global.CURRENT_TEAM_MEMBERS = {}
global.WORKUSERID = '' global.WORKUSERID = ''
global.CDSWMsg = {}
let updateTimer let updateTimer
let loginWindow let loginWindow
let mainWindow let mainWindow
...@@ -52,6 +53,7 @@ let newMsgWindow ...@@ -52,6 +53,7 @@ let newMsgWindow
let scrollerhotWindows let scrollerhotWindows
let addNewUserWinodes let addNewUserWinodes
let workWinodes let workWinodes
let CloudDiskShareWindes
let dialogWindows let dialogWindows
let noticeWindows let noticeWindows
let forwardWindows let forwardWindows
...@@ -87,6 +89,7 @@ const addnewuserUrl = process.env.NODE_ENV === 'development' ? `http://localhost ...@@ -87,6 +89,7 @@ const addnewuserUrl = process.env.NODE_ENV === 'development' ? `http://localhost
const appXmlPath = process.execPath.substring(0, process.execPath.lastIndexOf('\\') + 1) + 'app.json' 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 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` const workWin = process.env.NODE_ENV === 'development' ? `http://localhost:9080/#/workWin` : `file://${__dirname}/index.html#/workWin`
const CloudDiskShareWin = process.env.NODE_ENV === 'development' ? `http://localhost:9080/#/CloudDiskShareWin` : `file://${__dirname}/index.html#/CloudDiskShareWin`
process.on('uncaughtException', error => { process.on('uncaughtException', error => {
console.log(error) console.log(error)
...@@ -830,6 +833,10 @@ ipc.on('createo-or-open-work', function(event, obj) { ...@@ -830,6 +833,10 @@ ipc.on('createo-or-open-work', function(event, obj) {
global.WORKUSERID = obj global.WORKUSERID = obj
getWorkWin() getWorkWin()
}) })
ipc.on('createo-or-open-CloudDiskShareWin', function(event, obj) {
global.CDSWMsg = obj
getCloudDiskShareWin()
})
ipc.on('open-forward-msg', function(event, obj) { ipc.on('open-forward-msg', function(event, obj) {
global.FORWARD_MSG = obj global.FORWARD_MSG = obj
getForwardWindows() getForwardWindows()
...@@ -1089,7 +1096,31 @@ let getWorkWin = function() { ...@@ -1089,7 +1096,31 @@ let getWorkWin = function() {
} else { } else {
workWinodes.focus() workWinodes.focus()
} }
}
let getCloudDiskShareWin = function() {
if (!CloudDiskShareWindes || CloudDiskShareWindes.isDestroyed()) {
CloudDiskShareWindes = new BrowserWindow({
transparent: systemPreferences.isAeroGlassEnabled(),
frame: false,
maximizable: false,
resizable: false,
show: false,
icon: windowIcon,
width: 510,
height: 640,
skipTaskbar: false,
alwaysOnTop: false,
webPreferences: { webSecurity: false }
})
CloudDiskShareWindes.loadURL(CloudDiskShareWin)
CloudDiskShareWindes.setMenu(null)
CloudDiskShareWindes.once('ready-to-show', () => {
CloudDiskShareWindes.show()
//addNewUserWinodes.webContents.openDevTools(true);
})
} else {
CloudDiskShareWindes.focus()
}
} }
let getForwardWindows = function() { let getForwardWindows = function() {
if (!forwardWindows || forwardWindows.isDestroyed()) { if (!forwardWindows || forwardWindows.isDestroyed()) {
......
import md5 from 'js-md5' import md5 from 'js-md5'
import MsgBus from './msgBus' import MsgBus from './msgBus'
import co from 'co'
export default { export default {
install(Vue, options) { install(Vue, options) {
Vue.prototype.MsgBus = MsgBus; Vue.prototype.MsgBus = MsgBus;
...@@ -18,10 +19,47 @@ export default { ...@@ -18,10 +19,47 @@ export default {
//主地址 //主地址
DomainUrl: domainUrl, DomainUrl: domainUrl,
//常用提交数据URL //常用提交数据URL
PostUrl: domainUrl + "/api/common/post" PostUrl: domainUrl + "/api/common/post",
//上传站点
UploadUrl: "http://upload.oytour.com",
}; };
return obj; return obj;
} }
Vue.prototype.random_string = function (len) {
len = len || 32;
var chars = 'ABCDEFGHJKMNPQRSTWXYZabcdefhijkmnprstwxyz2345678';
var maxPos = chars.length;
var pwd = '';
for (let i = 0; i < len; i++) {
pwd += chars.charAt(Math.floor(Math.random() * maxPos));
}
return pwd;
},
//上传文件到本地服务器
Vue.prototype.UploadSelfFileT = function (path, files, successCall, ocr) {
if (files && files.length > 0) {
let nameList = new Array()
for (let index = 0; index < files.length; index++) {
nameList.push(this.random_string());
}
let that = this;
co(function* () {
for (let index = 0; index < files.length; index++) {
let fileName = nameList[index]
fileName = path + fileName + "." + files[index].name.split('.').pop()
var formData = new FormData();
var uploadUrl = that.domainManager().UploadUrl + "/Upload?filePath=" + path + '&ocr=' + ocr;
formData.append("myfile", files[index]);
that.$http.post(uploadUrl, formData, {})
.then(res => {
successCall(res);
})
}
}).catch(function (err) {
});
}
}
Vue.prototype.apipost = function(cmd, msg, successCall, faildCall) { Vue.prototype.apipost = function(cmd, msg, successCall, faildCall) {
if (msg == null || msg == "") { if (msg == null || msg == "") {
msg = {} msg = {}
......
...@@ -42,6 +42,7 @@ export default { ...@@ -42,6 +42,7 @@ export default {
</script> </script>
<style> <style>
@import url("./assets/css/font.css"); @import url("./assets/css/font.css");
@import url("./assets/css/fileIcon.css");
@import url("./assets/css/global.css"); @import url("./assets/css/global.css");
@import url("./assets/css/alifont"); @import url("./assets/css/alifont");
</style> </style>
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -85,4 +85,13 @@ button{ ...@@ -85,4 +85,13 @@ button{
padding: 5px 20px; padding: 5px 20px;
font-family: 'Microsoft YaHei' !important; font-family: 'Microsoft YaHei' !important;
font-size: 12px; font-size: 12px;
}
.normalBtn{ color: #fff; padding: 0 15px; height:30px; background:#459BFB; border: 1px solid #459BFB; cursor: pointer; margin-left: 10px;}
.normalBtn:hover{background: #459BFB;box-shadow:2px 0px 4px rgba(69, 155, 251,0.25)}
.normalBtn:active{background: #459BFB;}
.hollowFixedBtn{ background: #fff; color: #459BFB; padding: 0 15px; height:30px;border:1px solid #459BFB; cursor: pointer;margin-left: 10px;}
.hollowFixedBtn:hover{ box-shadow:2px 0px 4px rgba(69, 155, 251,0.25)}
.hollowFixedBtn:active{border-color: #459BFB;}
.w100{
width: 100px;
} }
\ No newline at end of file
...@@ -2,10 +2,10 @@ ...@@ -2,10 +2,10 @@
background-image: url('../img/im/icons_file.png'); background-image: url('../img/im/icons_file.png');
} }
.fileIcon { .fileIcon {
cursor: default; cursor: default;
display: inline-block; display: inline-block;
height: 100%; height: 26px;
width: 100%; width: 26px;
vertical-align: middle; vertical-align: middle;
margin:0px 5px 0 0; margin:0px 5px 0 0;
} }
......
This diff is collapsed.
...@@ -23,7 +23,12 @@ ...@@ -23,7 +23,12 @@
</li> </li>
<li :class="{'active':chosenState.val==3}"> <li :class="{'active':chosenState.val==3}">
<el-tooltip class="item" effect="dark" content="收藏" placement="right"> <el-tooltip class="item" effect="dark" content="收藏" placement="right">
<i class="iconfont iconshoucang" @click="changeMenu(3,'收藏')"></i> <i class="iconfont iconshoucang" style="font-size: 28px;" @click="changeMenu(3,'收藏')"></i>
</el-tooltip>
</li>
<li :class="{'active':chosenState.val==4}">
<el-tooltip class="item" effect="dark" content="云盘" placement="right">
<i class="iconfont iconicloud1" style="font-size: 18px;" @click="changeMenu(4,'云盘')"></i>
</el-tooltip> </el-tooltip>
</li> </li>
</ul> </ul>
...@@ -64,6 +69,7 @@ ...@@ -64,6 +69,7 @@
<mail v-show="chosenState.val==1"></mail> <mail v-show="chosenState.val==1"></mail>
<empty v-show="chosenState.val==2"></empty> <empty v-show="chosenState.val==2"></empty>
<Collection v-if="chosenState.val==3"></Collection> <Collection v-if="chosenState.val==3"></Collection>
<CloudDisk v-if="chosenState.val==4" />
</div> </div>
</div> </div>
<user-card v-if="usercardInfo.searchName!=''" :usercard="usercardInfo"></user-card> <user-card v-if="usercardInfo.searchName!=''" :usercard="usercardInfo"></user-card>
...@@ -82,6 +88,7 @@ import mail from "./team/maillist"; ...@@ -82,6 +88,7 @@ import mail from "./team/maillist";
import userCard from "./team/usercard"; import userCard from "./team/usercard";
import empty from "./tools/emptyPage"; import empty from "./tools/emptyPage";
import Collection from "./tools/Collection"; import Collection from "./tools/Collection";
import CloudDisk from "./tools/CloudDisk";
import { setInterval } from "timers"; import { setInterval } from "timers";
export default { export default {
components: { components: {
...@@ -89,15 +96,16 @@ export default { ...@@ -89,15 +96,16 @@ export default {
mail, mail,
userCard, userCard,
empty, empty,
Collection Collection,
CloudDisk
}, },
data() { data() {
return { return {
user: {}, user: {},
chosenMenu: 0, chosenMenu: 4,
chosenState: { chosenState: {
val: 0, val: 4,
name: "消息" name: "云盘"
}, },
atInfo: { atInfo: {
left: 0, left: 0,
...@@ -210,11 +218,14 @@ export default { ...@@ -210,11 +218,14 @@ export default {
document.getElementById("homebox").addEventListener("click", function(e) { document.getElementById("homebox").addEventListener("click", function(e) {
if ( if (
(that.usercardInfo.searchName != "" || that.atInfo.atName != "") && (that.usercardInfo.searchName != "" || that.atInfo.atName != "") &&
e.target.className.indexOf("u-circle") == -1 e.target.className.indexOf("u-circle") == -1
) { ) {
that.usercardInfo.searchName = ""; that.usercardInfo.searchName = "";
that.atInfo.atName = ""; that.atInfo.atName = "";
} }
if (e.target.className.indexOf("icongengduo2") == -1 && e.target.className.indexOf("tool-CloudDiskList-item") == -1) {
that.MsgBus.$emit("hide-tool-CloudDiskList");
}
that.MsgBus.$emit("close-copy"); that.MsgBus.$emit("close-copy");
that.MsgBus.$emit("hide-this-winShow"); that.MsgBus.$emit("hide-this-winShow");
}); });
......
...@@ -400,13 +400,13 @@ export default { ...@@ -400,13 +400,13 @@ export default {
} }
if(msgs.length>0) if(msgs.length>0)
this.lstTimer=msgs[msgs.length-1].time this.lstTimer=msgs[msgs.length-1].time
if(this.scene=='team'){ // if(this.scene=='team'){
msgs=msgs.filter(x=>{ // msgs=msgs.filter(x=>{
if(x.type!='notification' ||(x.type=='notification' && !x.attach.team.custom)) // if(x.type!='notification' ||(x.type=='notification' && !x.attach.team.custom))
return x // return x
return; // return;
}) // })
} // }
// console.log(msgs) // console.log(msgs)
return msgs; return msgs;
}, },
......
...@@ -623,25 +623,25 @@ export default { ...@@ -623,25 +623,25 @@ export default {
} }
} }
let lastMsg = item.lastMsg || {}; let lastMsg = item.lastMsg || {};
if ( // if (
lastMsg.scene === "team" && // lastMsg.scene === "team" &&
lastMsg.type === "notification" && // lastMsg.type === "notification" &&
lastMsg.attach && // lastMsg.attach &&
lastMsg.attach.team && // lastMsg.attach.team &&
lastMsg.attach.team.custom && // lastMsg.attach.team.custom &&
this.$store.state.msgs[item.id] && // this.$store.state.msgs[item.id] &&
this.$store.state.msgs[item.id].length>0 // this.$store.state.msgs[item.id].length>0
) { // ) {
for (let i = this.$store.state.msgs[item.id].length-1; i >= 0; i--) { // for (let i = this.$store.state.msgs[item.id].length-1; i >= 0; i--) {
lastMsg=this.$store.state.msgs[item.id][i] // lastMsg=this.$store.state.msgs[item.id][i]
if ( // if (
lastMsg.type != "notification" || // lastMsg.type != "notification" ||
(lastMsg.type == "notification" && !lastMsg.attach.team.custom) // (lastMsg.type == "notification" && !lastMsg.attach.team.custom)
){ // ){
break; // break;
} // }
} // }
} // }
if (lastMsg.type === "text") { if (lastMsg.type === "text") {
item.lastMsgShow = lastMsg.text || ""; item.lastMsgShow = lastMsg.text || "";
} else if (lastMsg.type === "custom") { } else if (lastMsg.type === "custom") {
......
This diff is collapsed.
This diff is collapsed.
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
<img :src="imgUrl" alt=""> <img :src="imgUrl" alt="">
</div> </div>
<div class="file" v-if="item.CollectionType === 4"> <div class="file" v-if="item.CollectionType === 4">
<div class="fileIcon" :class="[item.Title]"></div> <div class="CollectionContentListItem-fileIcon" :class="[item.Title]"></div>
<div> <div>
<el-tooltip popper-class="tooltip-item" effect="dark" :content="item.Content" placement="top"> <el-tooltip popper-class="tooltip-item" effect="dark" :content="item.Content" placement="top">
<p class="text-row1 file-name">{{item.Content}}</p> <p class="text-row1 file-name">{{item.Content}}</p>
...@@ -228,7 +228,7 @@ export default { ...@@ -228,7 +228,7 @@ export default {
left: -999px; left: -999px;
top: -999px top: -999px
} }
.fileIcon{ .CollectionContentListItem-fileIcon{
width: 60px; width: 60px;
height: 60px; height: 60px;
} }
......
...@@ -105,7 +105,7 @@ export default { ...@@ -105,7 +105,7 @@ export default {
} }
.CollectionSearchBox .type-box li div i.iconfont{ .CollectionSearchBox .type-box li div i.iconfont{
color: #555; color: #555;
font-size: 24px; font-size: 20px;
padding-right: 15px; padding-right: 15px;
} }
.CollectionSearchBox .type-box li div span{ .CollectionSearchBox .type-box li div span{
......
<template>
<div>
<searchBox :list="list" :activeID="activeID" @changeType="changeType" />
<contentList :showData="showData" :loading="loading" :activeName="activeName" :srearchKey="srearchKey" :FileType="FileType"/>
</div>
</template>
<script>
import searchBox from '../team/CollectionSearchBox'
import contentList from '../team/CloudDiskList'
export default {
components: {
searchBox,
contentList
},
data(){
return{
activeID: 0,
activeName: '全部文件',
list: [
{
id: 0,
name: '全部文件',
icon: 'iconquanbuwenjian'
},
{
id: 1,
name: '图片',
icon: 'icontupian3'
},
{
id: 2,
name: '文档',
icon: 'iconwendang2'
},
{
id: 3,
name: '视频',
icon: 'iconshipin'
}
,
{
id: 4,
name: '音乐',
icon: 'iconyinle1'
}
,
{
id: 5,
name: '我的分享',
icon: 'iconfenxiang'
}
,
{
id: 6,
name: '分享给我的',
icon: 'iconfenxianggeiwo2'
}
],
FileType: 0,
dataList: [],
showData: [],
loading: false,
srearchKey: '',
}
},mounted() {
this.getDataList()
let _this = this
this.MsgBus.$on('get-collection-list', function (){
_this.getDataList()
_this.activeID = 0
})
},methods: {
//获取数据
getDataList: function (){
this.loading = true
this.apipost("user_post_GetCollectionList", {}, res => {
if (res.data.resultCode === 1) {
this.showData = res.data.data
this.dataList = res.data.data
} else {
this.$message.error('操作失败')
}
this.loading = false
}, err => {})
},
// 改变收藏类型
changeType: function (id){
this.showData = []
this.activeID = id;
this.activeName = this.list[id].name;
this.FileType = id
}
}
}
</script>
<style>
@import url("../../assets/css/icon.css");
</style>
\ No newline at end of file
...@@ -19,7 +19,7 @@ export default { ...@@ -19,7 +19,7 @@ export default {
{ {
id: 0, id: 0,
name: '全部收藏', name: '全部收藏',
icon: 'iconquanbu' icon: 'iconquanbuwenjian1'
}, },
{ {
id: 1, id: 1,
...@@ -29,12 +29,12 @@ export default { ...@@ -29,12 +29,12 @@ export default {
{ {
id: 2, id: 2,
name: '相册', name: '相册',
icon: 'iconshangchuanzhaopian' icon: 'icontupian3'
}, },
{ {
id: 4, id: 4,
name: '文件', name: '文件',
icon: 'iconwenjian' icon: 'iconwendang2'
} }
, ,
{ {
......
This diff is collapsed.
...@@ -53,6 +53,11 @@ export default new Router({ ...@@ -53,6 +53,11 @@ export default new Router({
name: 'workWin', name: 'workWin',
component: require('@/components/team/workWin') component: require('@/components/team/workWin')
}, },
{
path: '/CloudDiskShareWin',
name: 'CloudDiskShareWin',
component: require('@/components/team/CloudDiskShareWin')
},
{ {
path: '/notice', path: '/notice',
name: '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