mirror of
https://github.com/kuaifan/dootask.git
synced 2025-12-15 05:12:49 +00:00
Merge remote-tracking branch 'origin/develop' into develop
This commit is contained in:
commit
56b91a59a2
@ -382,7 +382,7 @@ class DialogController extends AbstractController
|
||||
if ($data['type'] == 'file') {
|
||||
$codeExt = ['txt'];
|
||||
$officeExt = ['doc', 'docx', 'xls', 'xlsx', 'ppt', 'pptx'];
|
||||
$localExt = ['jpg', 'jpeg', 'png', 'gif'];
|
||||
$localExt = ['jpg', 'jpeg', 'png', 'gif', 'bmp', 'ico', 'raw', 'tif', 'tiff', 'mp3', 'wav', 'mp4', 'flv', 'avi', 'mov', 'wmv', 'mkv', '3gp', 'rm'];
|
||||
$msg = Base::json2array($dialogMsg->getRawOriginal('msg'));
|
||||
$filePath = public_path($msg['path']);
|
||||
if (in_array($msg['ext'], $codeExt) && $msg['size'] < 2 * 1024 * 1024) {
|
||||
|
||||
@ -1094,7 +1094,7 @@ class ProjectController extends AbstractController
|
||||
/**
|
||||
* @api {get} api/project/task/filedetail 23. 获取任务文件详情
|
||||
*
|
||||
* @apiDescription 需要token身份(限:项目、任务负责人)
|
||||
* @apiDescription 需要token身份
|
||||
* @apiVersion 1.0.0
|
||||
* @apiGroup project
|
||||
* @apiName task__filedetail
|
||||
@ -1130,11 +1130,11 @@ class ProjectController extends AbstractController
|
||||
$data = $file->toArray();
|
||||
$data['path'] = $file->getRawOriginal('path');
|
||||
//
|
||||
ProjectTask::userTask($file->task_id, true, true);
|
||||
ProjectTask::userTask($file->task_id, null);
|
||||
//
|
||||
$codeExt = ['txt'];
|
||||
$officeExt = ['doc', 'docx', 'xls', 'xlsx', 'ppt', 'pptx'];
|
||||
$localExt = ['jpg', 'jpeg', 'png', 'gif'];
|
||||
$localExt = ['jpg', 'jpeg', 'png', 'gif', 'bmp', 'ico', 'raw', 'tif', 'tiff', 'mp3', 'wav', 'mp4', 'flv', 'avi', 'mov', 'wmv', 'mkv', '3gp', 'rm'];
|
||||
$filePath = public_path($data['path']);
|
||||
if (in_array($data['ext'], $codeExt) && $data['size'] < 2 * 1024 * 1024) {
|
||||
// 文本预览,限制2M内的文件
|
||||
@ -1160,7 +1160,7 @@ class ProjectController extends AbstractController
|
||||
/**
|
||||
* @api {get} api/project/task/filedown 24. 下载任务文件
|
||||
*
|
||||
* @apiDescription 需要token身份(限:项目、任务负责人)
|
||||
* @apiDescription 需要token身份
|
||||
* @apiVersion 1.0.0
|
||||
* @apiGroup project
|
||||
* @apiName task__filedown
|
||||
@ -1183,7 +1183,7 @@ class ProjectController extends AbstractController
|
||||
}
|
||||
//
|
||||
try {
|
||||
ProjectTask::userTask($file->task_id, true, true);
|
||||
ProjectTask::userTask($file->task_id, null);
|
||||
} catch (\Exception $e) {
|
||||
abort(403, $e->getMessage() ?: "This file not support download.");
|
||||
}
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "DooTask",
|
||||
"version": "0.7.94",
|
||||
"version": "0.8.0",
|
||||
"description": "DooTask is task management system.",
|
||||
"main": "main.js",
|
||||
"license": "MIT",
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "DooTask",
|
||||
"version": "0.7.94",
|
||||
"version": "0.8.0",
|
||||
"description": "DooTask is task management system.",
|
||||
"scripts": {
|
||||
"start": "./cmd dev",
|
||||
|
||||
2
public/css/app.css
vendored
2
public/css/app.css
vendored
File diff suppressed because one or more lines are too long
2
public/js/app.js
vendored
2
public/js/app.js
vendored
File diff suppressed because one or more lines are too long
1
public/js/build/249.js
vendored
Normal file
1
public/js/build/249.js
vendored
Normal file
File diff suppressed because one or more lines are too long
2
public/js/build/423.js
vendored
2
public/js/build/423.js
vendored
File diff suppressed because one or more lines are too long
1
public/js/build/43.js
vendored
1
public/js/build/43.js
vendored
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -1,5 +1,6 @@
|
||||
{
|
||||
"/js/app.js": "/js/app.js",
|
||||
"/css/app.css": "/css/app.css",
|
||||
"/.DS_Store": "/.DS_Store",
|
||||
"/favicon.ico": "/favicon.ico"
|
||||
}
|
||||
|
||||
@ -337,6 +337,7 @@ export default {
|
||||
'taskId',
|
||||
'wsOpenNum',
|
||||
'columnTemplate',
|
||||
'dialogOpenId',
|
||||
|
||||
'themeMode',
|
||||
'themeList',
|
||||
@ -449,7 +450,7 @@ export default {
|
||||
|
||||
natificationHidden(val) {
|
||||
clearTimeout(this.notificationTimeout);
|
||||
if (!val) {
|
||||
if (!val && this.notificationClass) {
|
||||
this.notificationTimeout = setTimeout(() => {
|
||||
this.notificationClass.close();
|
||||
}, 6000);
|
||||
@ -674,39 +675,44 @@ export default {
|
||||
},
|
||||
|
||||
addDialogMsg(data) {
|
||||
if (this.natificationHidden && this.natificationReady) {
|
||||
const {id, dialog_id, type, msg} = data;
|
||||
let body = '';
|
||||
switch (type) {
|
||||
case 'text':
|
||||
body = msg.text;
|
||||
break;
|
||||
case 'file':
|
||||
body = '[' + this.$L(msg.type == 'img' ? '图片信息' : '文件信息') + ']'
|
||||
break;
|
||||
default:
|
||||
return;
|
||||
}
|
||||
this._notificationId = id;
|
||||
this.notificationClass.replaceOptions({
|
||||
icon: $A.originUrl('images/logo.png'),
|
||||
body: body,
|
||||
data: data,
|
||||
tag: "dialog",
|
||||
requireInteraction: true
|
||||
});
|
||||
let dialog = this.cacheDialogs.find((item) => item.id == dialog_id);
|
||||
if (dialog) {
|
||||
this.notificationClass.replaceTitle(dialog.name);
|
||||
this.notificationClass.userAgreed();
|
||||
} else {
|
||||
this.$store.dispatch("getDialogOne", dialog_id).then(({data}) => {
|
||||
if (this._notificationId === id) {
|
||||
this.notificationClass.replaceTitle(data.name);
|
||||
this.notificationClass.userAgreed();
|
||||
}
|
||||
}).catch(() => {})
|
||||
}
|
||||
if (!this.natificationReady) {
|
||||
return;
|
||||
}
|
||||
if (!this.natificationHidden && this.curPath == "/manage/messenger" && this.dialogOpenId == data.dialog_id) {
|
||||
return;
|
||||
}
|
||||
//
|
||||
const {id, dialog_id, type, msg} = data;
|
||||
let body = '';
|
||||
switch (type) {
|
||||
case 'text':
|
||||
body = msg.text;
|
||||
break;
|
||||
case 'file':
|
||||
body = '[' + this.$L(msg.type == 'img' ? '图片信息' : '文件信息') + ']'
|
||||
break;
|
||||
default:
|
||||
return;
|
||||
}
|
||||
this._notificationId = id;
|
||||
this.notificationClass.replaceOptions({
|
||||
icon: $A.originUrl('images/logo.png'),
|
||||
body: body,
|
||||
data: data,
|
||||
tag: "dialog",
|
||||
requireInteraction: true
|
||||
});
|
||||
let dialog = this.cacheDialogs.find((item) => item.id == dialog_id);
|
||||
if (dialog) {
|
||||
this.notificationClass.replaceTitle(dialog.name);
|
||||
this.notificationClass.userAgreed();
|
||||
} else {
|
||||
this.$store.dispatch("getDialogOne", dialog_id).then(({data}) => {
|
||||
if (this._notificationId === id) {
|
||||
this.notificationClass.replaceTitle(data.name);
|
||||
this.notificationClass.userAgreed();
|
||||
}
|
||||
}).catch(() => {})
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
@ -68,10 +68,7 @@
|
||||
<!--主任务-->
|
||||
<div
|
||||
v-else-if="ready"
|
||||
:class="{'task-detail':true, 'open-dialog': hasOpenDialog, 'completed': taskDetail.complete_at}"
|
||||
@drop.prevent="taskPasteDrag($event, 'drag')"
|
||||
@dragover.prevent="taskDragOver(true, $event)"
|
||||
@dragleave.prevent="taskDragOver(false, $event)">
|
||||
:class="{'task-detail':true, 'open-dialog': hasOpenDialog, 'completed': taskDetail.complete_at}">
|
||||
<div v-show="taskDetail.id > 0" class="task-info">
|
||||
<div class="head">
|
||||
<TaskMenu
|
||||
@ -383,7 +380,10 @@
|
||||
</div>
|
||||
</div>
|
||||
<ProjectLog v-if="navActive=='log' && taskId > 0" ref="log" :task-id="taskDetail.id" :show-load="false" @on-load-change="logLoadChange"/>
|
||||
<div v-else class="no-dialog">
|
||||
<div v-else class="no-dialog"
|
||||
@drop.prevent="taskPasteDrag($event, 'drag')"
|
||||
@dragover.prevent="taskDragOver(true, $event)"
|
||||
@dragleave.prevent="taskDragOver(false, $event)">
|
||||
<div class="no-tip">{{$L('暂无消息')}}</div>
|
||||
<div class="no-input">
|
||||
<DragInput
|
||||
@ -402,13 +402,13 @@
|
||||
<Icon v-else type="md-send" />
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="dialogDrag" class="drag-over" @click="dialogDrag=false">
|
||||
<div class="drag-text">{{$L('拖动到这里发送')}}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="!taskDetail.id" class="task-load"><Loading/></div>
|
||||
<div v-if="dialogDrag" class="drag-over" @click="dialogDrag=false">
|
||||
<div class="drag-text">{{$L('拖动到这里发送')}}</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -492,14 +492,14 @@ export default {
|
||||
autoresize_bottom_margin: 2,
|
||||
min_height: 200,
|
||||
max_height: 380,
|
||||
contextmenu: 'bold italic underline forecolor backcolor | codesample | uploadImages uploadFiles | preview screenload',
|
||||
contextmenu: 'bold italic underline forecolor backcolor | codesample | uploadImages browseImages | preview screenload',
|
||||
valid_elements : 'a[href|target=_blank],em,strong/b,div[align],span[style],a,br,p,img[src|alt|witdh|height],pre[class],code',
|
||||
toolbar: false
|
||||
},
|
||||
taskOptionFull: {
|
||||
menubar: 'file edit view',
|
||||
valid_elements : 'a[href|target=_blank],em,strong/b,div[align],span[style],a,br,p,img[src|alt|witdh|height],pre[class],code',
|
||||
toolbar: 'uploadImages | uploadFiles | bold italic underline forecolor backcolor | codesample | preview screenload'
|
||||
toolbar: 'uploadImages | bold italic underline forecolor backcolor | codesample | preview screenload'
|
||||
},
|
||||
|
||||
dialogDrag: false,
|
||||
|
||||
@ -199,6 +199,10 @@ export default {
|
||||
this.getContactsList(1);
|
||||
}
|
||||
},
|
||||
dialogId(id) {
|
||||
$A.setStorage("messenger::dialogId", id);
|
||||
this.$store.state.dialogOpenId = id;
|
||||
},
|
||||
dialogOpenId(id) {
|
||||
if ( id > 0 )
|
||||
this.dialogId = id;
|
||||
@ -248,11 +252,9 @@ export default {
|
||||
|
||||
closeDialog() {
|
||||
this.dialogId = 0;
|
||||
$A.setStorage("messenger::dialogId", 0)
|
||||
},
|
||||
|
||||
openDialog(dialog, smooth) {
|
||||
$A.setStorage("messenger::dialogId", dialog.id)
|
||||
this.dialogId = dialog.id;
|
||||
this.scrollIntoActive(smooth);
|
||||
},
|
||||
|
||||
@ -135,7 +135,8 @@
|
||||
}
|
||||
}
|
||||
.scroller {
|
||||
margin-left: 36px;
|
||||
margin-left: 28px;
|
||||
padding-left: 8px;
|
||||
padding-right: 36px;
|
||||
overflow-x: hidden;
|
||||
overflow-y: auto;
|
||||
@ -155,7 +156,6 @@
|
||||
}
|
||||
.desc {
|
||||
margin-top: 10px;
|
||||
overflow: auto;
|
||||
div[contenteditable="true"] {
|
||||
outline: none
|
||||
}
|
||||
@ -531,6 +531,7 @@
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
position: relative;
|
||||
.no-tip {
|
||||
flex: 1;
|
||||
display: none;
|
||||
@ -555,6 +556,33 @@
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
.drag-over {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
z-index: 3;
|
||||
background-color: rgba(255, 255, 255, 0.78);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
&:before {
|
||||
content: "";
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 36px;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
border: 2px dashed #7b7b7b;
|
||||
border-radius: 12px;
|
||||
}
|
||||
.drag-text {
|
||||
padding: 12px;
|
||||
font-size: 18px;
|
||||
color: #666666;
|
||||
}
|
||||
}
|
||||
}
|
||||
.project-log {
|
||||
margin-left: 36px;
|
||||
@ -602,33 +630,6 @@
|
||||
height: 32px;
|
||||
}
|
||||
}
|
||||
.drag-over {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
z-index: 3;
|
||||
background-color: rgba(255, 255, 255, 0.78);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
&:before {
|
||||
content: "";
|
||||
position: absolute;
|
||||
top: 16px;
|
||||
left: 16px;
|
||||
right: 16px;
|
||||
bottom: 16px;
|
||||
border: 2px dashed #7b7b7b;
|
||||
border-radius: 12px;
|
||||
}
|
||||
.drag-text {
|
||||
padding: 12px;
|
||||
font-size: 18px;
|
||||
color: #666666;
|
||||
}
|
||||
}
|
||||
|
||||
&.open-dialog {
|
||||
flex-direction: row;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user