Merge remote-tracking branch 'origin/develop' into develop

This commit is contained in:
韦荣超
2022-02-12 16:02:04 +08:00
15 changed files with 98 additions and 88 deletions
@@ -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 -1
View File
@@ -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 -1
View File
@@ -1,6 +1,6 @@
{
"name": "DooTask",
"version": "0.7.94",
"version": "0.8.0",
"description": "DooTask is task management system.",
"scripts": {
"start": "./cmd dev",
+1 -1
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
File diff suppressed because one or more lines are too long
+1
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
File diff suppressed because one or more lines are too long
-1
View File
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+1
View File
@@ -1,5 +1,6 @@
{
"/js/app.js": "/js/app.js",
"/css/app.css": "/css/app.css",
"/.DS_Store": "/.DS_Store",
"/favicon.ico": "/favicon.ico"
}
+40 -34
View File
@@ -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);
},
+30 -29
View File
@@ -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;