mirror of
https://github.com/kuaifan/dootask.git
synced 2025-12-16 14:12:51 +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') {
|
if ($data['type'] == 'file') {
|
||||||
$codeExt = ['txt'];
|
$codeExt = ['txt'];
|
||||||
$officeExt = ['doc', 'docx', 'xls', 'xlsx', 'ppt', 'pptx'];
|
$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'));
|
$msg = Base::json2array($dialogMsg->getRawOriginal('msg'));
|
||||||
$filePath = public_path($msg['path']);
|
$filePath = public_path($msg['path']);
|
||||||
if (in_array($msg['ext'], $codeExt) && $msg['size'] < 2 * 1024 * 1024) {
|
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. 获取任务文件详情
|
* @api {get} api/project/task/filedetail 23. 获取任务文件详情
|
||||||
*
|
*
|
||||||
* @apiDescription 需要token身份(限:项目、任务负责人)
|
* @apiDescription 需要token身份
|
||||||
* @apiVersion 1.0.0
|
* @apiVersion 1.0.0
|
||||||
* @apiGroup project
|
* @apiGroup project
|
||||||
* @apiName task__filedetail
|
* @apiName task__filedetail
|
||||||
@ -1130,11 +1130,11 @@ class ProjectController extends AbstractController
|
|||||||
$data = $file->toArray();
|
$data = $file->toArray();
|
||||||
$data['path'] = $file->getRawOriginal('path');
|
$data['path'] = $file->getRawOriginal('path');
|
||||||
//
|
//
|
||||||
ProjectTask::userTask($file->task_id, true, true);
|
ProjectTask::userTask($file->task_id, null);
|
||||||
//
|
//
|
||||||
$codeExt = ['txt'];
|
$codeExt = ['txt'];
|
||||||
$officeExt = ['doc', 'docx', 'xls', 'xlsx', 'ppt', 'pptx'];
|
$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']);
|
$filePath = public_path($data['path']);
|
||||||
if (in_array($data['ext'], $codeExt) && $data['size'] < 2 * 1024 * 1024) {
|
if (in_array($data['ext'], $codeExt) && $data['size'] < 2 * 1024 * 1024) {
|
||||||
// 文本预览,限制2M内的文件
|
// 文本预览,限制2M内的文件
|
||||||
@ -1160,7 +1160,7 @@ class ProjectController extends AbstractController
|
|||||||
/**
|
/**
|
||||||
* @api {get} api/project/task/filedown 24. 下载任务文件
|
* @api {get} api/project/task/filedown 24. 下载任务文件
|
||||||
*
|
*
|
||||||
* @apiDescription 需要token身份(限:项目、任务负责人)
|
* @apiDescription 需要token身份
|
||||||
* @apiVersion 1.0.0
|
* @apiVersion 1.0.0
|
||||||
* @apiGroup project
|
* @apiGroup project
|
||||||
* @apiName task__filedown
|
* @apiName task__filedown
|
||||||
@ -1183,7 +1183,7 @@ class ProjectController extends AbstractController
|
|||||||
}
|
}
|
||||||
//
|
//
|
||||||
try {
|
try {
|
||||||
ProjectTask::userTask($file->task_id, true, true);
|
ProjectTask::userTask($file->task_id, null);
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
abort(403, $e->getMessage() ?: "This file not support download.");
|
abort(403, $e->getMessage() ?: "This file not support download.");
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "DooTask",
|
"name": "DooTask",
|
||||||
"version": "0.7.94",
|
"version": "0.8.0",
|
||||||
"description": "DooTask is task management system.",
|
"description": "DooTask is task management system.",
|
||||||
"main": "main.js",
|
"main": "main.js",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "DooTask",
|
"name": "DooTask",
|
||||||
"version": "0.7.94",
|
"version": "0.8.0",
|
||||||
"description": "DooTask is task management system.",
|
"description": "DooTask is task management system.",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"start": "./cmd dev",
|
"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",
|
"/js/app.js": "/js/app.js",
|
||||||
"/css/app.css": "/css/app.css",
|
"/css/app.css": "/css/app.css",
|
||||||
|
"/.DS_Store": "/.DS_Store",
|
||||||
"/favicon.ico": "/favicon.ico"
|
"/favicon.ico": "/favicon.ico"
|
||||||
}
|
}
|
||||||
|
|||||||
@ -337,6 +337,7 @@ export default {
|
|||||||
'taskId',
|
'taskId',
|
||||||
'wsOpenNum',
|
'wsOpenNum',
|
||||||
'columnTemplate',
|
'columnTemplate',
|
||||||
|
'dialogOpenId',
|
||||||
|
|
||||||
'themeMode',
|
'themeMode',
|
||||||
'themeList',
|
'themeList',
|
||||||
@ -449,7 +450,7 @@ export default {
|
|||||||
|
|
||||||
natificationHidden(val) {
|
natificationHidden(val) {
|
||||||
clearTimeout(this.notificationTimeout);
|
clearTimeout(this.notificationTimeout);
|
||||||
if (!val) {
|
if (!val && this.notificationClass) {
|
||||||
this.notificationTimeout = setTimeout(() => {
|
this.notificationTimeout = setTimeout(() => {
|
||||||
this.notificationClass.close();
|
this.notificationClass.close();
|
||||||
}, 6000);
|
}, 6000);
|
||||||
@ -674,39 +675,44 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
addDialogMsg(data) {
|
addDialogMsg(data) {
|
||||||
if (this.natificationHidden && this.natificationReady) {
|
if (!this.natificationReady) {
|
||||||
const {id, dialog_id, type, msg} = data;
|
return;
|
||||||
let body = '';
|
}
|
||||||
switch (type) {
|
if (!this.natificationHidden && this.curPath == "/manage/messenger" && this.dialogOpenId == data.dialog_id) {
|
||||||
case 'text':
|
return;
|
||||||
body = msg.text;
|
}
|
||||||
break;
|
//
|
||||||
case 'file':
|
const {id, dialog_id, type, msg} = data;
|
||||||
body = '[' + this.$L(msg.type == 'img' ? '图片信息' : '文件信息') + ']'
|
let body = '';
|
||||||
break;
|
switch (type) {
|
||||||
default:
|
case 'text':
|
||||||
return;
|
body = msg.text;
|
||||||
}
|
break;
|
||||||
this._notificationId = id;
|
case 'file':
|
||||||
this.notificationClass.replaceOptions({
|
body = '[' + this.$L(msg.type == 'img' ? '图片信息' : '文件信息') + ']'
|
||||||
icon: $A.originUrl('images/logo.png'),
|
break;
|
||||||
body: body,
|
default:
|
||||||
data: data,
|
return;
|
||||||
tag: "dialog",
|
}
|
||||||
requireInteraction: true
|
this._notificationId = id;
|
||||||
});
|
this.notificationClass.replaceOptions({
|
||||||
let dialog = this.cacheDialogs.find((item) => item.id == dialog_id);
|
icon: $A.originUrl('images/logo.png'),
|
||||||
if (dialog) {
|
body: body,
|
||||||
this.notificationClass.replaceTitle(dialog.name);
|
data: data,
|
||||||
this.notificationClass.userAgreed();
|
tag: "dialog",
|
||||||
} else {
|
requireInteraction: true
|
||||||
this.$store.dispatch("getDialogOne", dialog_id).then(({data}) => {
|
});
|
||||||
if (this._notificationId === id) {
|
let dialog = this.cacheDialogs.find((item) => item.id == dialog_id);
|
||||||
this.notificationClass.replaceTitle(data.name);
|
if (dialog) {
|
||||||
this.notificationClass.userAgreed();
|
this.notificationClass.replaceTitle(dialog.name);
|
||||||
}
|
this.notificationClass.userAgreed();
|
||||||
}).catch(() => {})
|
} 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
|
<div
|
||||||
v-else-if="ready"
|
v-else-if="ready"
|
||||||
:class="{'task-detail':true, 'open-dialog': hasOpenDialog, 'completed': taskDetail.complete_at}"
|
: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)">
|
|
||||||
<div v-show="taskDetail.id > 0" class="task-info">
|
<div v-show="taskDetail.id > 0" class="task-info">
|
||||||
<div class="head">
|
<div class="head">
|
||||||
<TaskMenu
|
<TaskMenu
|
||||||
@ -383,7 +380,10 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<ProjectLog v-if="navActive=='log' && taskId > 0" ref="log" :task-id="taskDetail.id" :show-load="false" @on-load-change="logLoadChange"/>
|
<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-tip">{{$L('暂无消息')}}</div>
|
||||||
<div class="no-input">
|
<div class="no-input">
|
||||||
<DragInput
|
<DragInput
|
||||||
@ -402,13 +402,13 @@
|
|||||||
<Icon v-else type="md-send" />
|
<Icon v-else type="md-send" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div v-if="dialogDrag" class="drag-over" @click="dialogDrag=false">
|
||||||
|
<div class="drag-text">{{$L('拖动到这里发送')}}</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="!taskDetail.id" class="task-load"><Loading/></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>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -492,14 +492,14 @@ export default {
|
|||||||
autoresize_bottom_margin: 2,
|
autoresize_bottom_margin: 2,
|
||||||
min_height: 200,
|
min_height: 200,
|
||||||
max_height: 380,
|
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',
|
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
|
toolbar: false
|
||||||
},
|
},
|
||||||
taskOptionFull: {
|
taskOptionFull: {
|
||||||
menubar: 'file edit view',
|
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',
|
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,
|
dialogDrag: false,
|
||||||
|
|||||||
@ -199,6 +199,10 @@ export default {
|
|||||||
this.getContactsList(1);
|
this.getContactsList(1);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
dialogId(id) {
|
||||||
|
$A.setStorage("messenger::dialogId", id);
|
||||||
|
this.$store.state.dialogOpenId = id;
|
||||||
|
},
|
||||||
dialogOpenId(id) {
|
dialogOpenId(id) {
|
||||||
if ( id > 0 )
|
if ( id > 0 )
|
||||||
this.dialogId = id;
|
this.dialogId = id;
|
||||||
@ -248,11 +252,9 @@ export default {
|
|||||||
|
|
||||||
closeDialog() {
|
closeDialog() {
|
||||||
this.dialogId = 0;
|
this.dialogId = 0;
|
||||||
$A.setStorage("messenger::dialogId", 0)
|
|
||||||
},
|
},
|
||||||
|
|
||||||
openDialog(dialog, smooth) {
|
openDialog(dialog, smooth) {
|
||||||
$A.setStorage("messenger::dialogId", dialog.id)
|
|
||||||
this.dialogId = dialog.id;
|
this.dialogId = dialog.id;
|
||||||
this.scrollIntoActive(smooth);
|
this.scrollIntoActive(smooth);
|
||||||
},
|
},
|
||||||
|
|||||||
@ -135,7 +135,8 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
.scroller {
|
.scroller {
|
||||||
margin-left: 36px;
|
margin-left: 28px;
|
||||||
|
padding-left: 8px;
|
||||||
padding-right: 36px;
|
padding-right: 36px;
|
||||||
overflow-x: hidden;
|
overflow-x: hidden;
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
@ -155,7 +156,6 @@
|
|||||||
}
|
}
|
||||||
.desc {
|
.desc {
|
||||||
margin-top: 10px;
|
margin-top: 10px;
|
||||||
overflow: auto;
|
|
||||||
div[contenteditable="true"] {
|
div[contenteditable="true"] {
|
||||||
outline: none
|
outline: none
|
||||||
}
|
}
|
||||||
@ -531,6 +531,7 @@
|
|||||||
flex: 1;
|
flex: 1;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
|
position: relative;
|
||||||
.no-tip {
|
.no-tip {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
display: none;
|
display: none;
|
||||||
@ -555,6 +556,33 @@
|
|||||||
display: none;
|
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 {
|
.project-log {
|
||||||
margin-left: 36px;
|
margin-left: 36px;
|
||||||
@ -602,33 +630,6 @@
|
|||||||
height: 32px;
|
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 {
|
&.open-dialog {
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user