@ -1816,64 +1816,58 @@ class UsersController extends AbstractController
|
|||||||
public function share__list()
|
public function share__list()
|
||||||
{
|
{
|
||||||
$user = User::auth();
|
$user = User::auth();
|
||||||
$pid = intval(Request::input('pid',-1));
|
$pid = intval(Request::input('pid', -1));
|
||||||
$uploadFileId = intval(Request::input('upload_file_id',-1));
|
$uploadFileId = intval(Request::input('upload_file_id', -1));
|
||||||
// 上传文件
|
// 上传文件
|
||||||
if($uploadFileId !== -1){
|
if ($uploadFileId !== -1) {
|
||||||
if($pid==-1) $pid = 0;
|
if ($pid == -1) $pid = 0;
|
||||||
$webkitRelativePath = Request::input('webkitRelativePath');
|
$webkitRelativePath = Request::input('webkitRelativePath');
|
||||||
$data = (new File)->contentUpload($user,$pid,$webkitRelativePath);
|
$data = (new File)->contentUpload($user, $pid, $webkitRelativePath);
|
||||||
return Base::retSuccess('success', $data);
|
return Base::retSuccess('success', $data);
|
||||||
}
|
}
|
||||||
// 获取数据
|
// 获取数据
|
||||||
$lists = [];
|
$lists = [];
|
||||||
if ($pid !== -1) {
|
if ($pid !== -1) {
|
||||||
$fileList = (new File)->getFileList($user,$pid,'dir',false);
|
$fileList = (new File)->getFileList($user, $pid, 'dir', false);
|
||||||
foreach($fileList as $file){
|
foreach ($fileList as $file) {
|
||||||
if($file['id'] != $pid){
|
if ($file['id'] != $pid) {
|
||||||
$lists[] = [
|
$lists[] = [
|
||||||
'type' => 'children',
|
'type' => 'children',
|
||||||
'url' => Base::fillUrl("api/users/share/list") . "?pid=" . $file['id'],
|
'url' => Base::fillUrl("api/users/share/list") . "?pid=" . $file['id'],
|
||||||
'icon' => $file['share'] == 1 ? url("/images/file/light/folder-share.png") : url("/images/file/light/folder.png"),
|
'icon' => $file['share'] == 1 ? url("images/file/light/folder-share.png") : url("images/file/light/folder.png"),
|
||||||
'extend' => ['upload_file_id'=>$file['id']],
|
'extend' => ['upload_file_id' => $file['id']],
|
||||||
'name' => $file['name'],
|
'name' => $file['name'],
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}else{
|
} else {
|
||||||
$lists[] = [
|
$lists[] = [
|
||||||
'type' => 'children',
|
'type' => 'children',
|
||||||
'url' => Base::fillUrl("api/users/share/list")."?pid=0",
|
'url' => Base::fillUrl("api/users/share/list") . "?pid=0",
|
||||||
'icon' => url("/images/file/light/folder.png"),
|
'icon' => url("images/file/light/folder.png"),
|
||||||
'extend' => ['upload_file_id'=>0],
|
'extend' => ['upload_file_id' => 0],
|
||||||
'name' => '全部文件',
|
'name' => Doo::translate('文件'),
|
||||||
];
|
];
|
||||||
$dialogList = (new WebSocketDialog)->getDialogList($user->userid);
|
$dialogList = (new WebSocketDialog)->getDialogList($user->userid);
|
||||||
foreach($dialogList['data'] as $dialog){
|
foreach ($dialogList['data'] as $dialog) {
|
||||||
if($dialog['type'] == 'user'){
|
if ($dialog['avatar']) {
|
||||||
|
$avatar = url($dialog['avatar']);
|
||||||
|
} else if ($dialog['type'] == 'user') {
|
||||||
$avatar = User::getAvatar($dialog['dialog_user']['userid'], $dialog['userimg'], $dialog['email'], $dialog['name']);
|
$avatar = User::getAvatar($dialog['dialog_user']['userid'], $dialog['userimg'], $dialog['email'], $dialog['name']);
|
||||||
}else{
|
} else {
|
||||||
switch ( $dialog['group_type'] ) {
|
$avatar = match ($dialog['group_type']) {
|
||||||
case 'department':
|
'department' => url("images/avatar/default_group_department.png"),
|
||||||
$avatar = url("images/avatar/default_department.png");
|
'project' => url("images/avatar/default_group_project.png"),
|
||||||
break;
|
'task' => url("images/avatar/default_group_task.png"),
|
||||||
case 'project':
|
default => url("images/avatar/default_group_people.png"),
|
||||||
$avatar = url("images/avatar/default_project.png");
|
};
|
||||||
break;
|
|
||||||
case 'task':
|
|
||||||
$avatar = url("images/avatar/default_task.png");
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
$avatar = url("images/avatar/default_people.png");
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
$lists[] = [
|
$lists[] = [
|
||||||
'type' => 'item',
|
'type' => 'item',
|
||||||
'name' => $dialog['name'],
|
'name' => $dialog['name'],
|
||||||
'icon' => $avatar,
|
'icon' => $avatar,
|
||||||
'url' => Base::fillUrl("api/dialog/msg/sendfiles"),
|
'url' => Base::fillUrl("api/dialog/msg/sendfiles"),
|
||||||
'extend' => ['dialog_ids' => $dialog['id']]
|
'extend' => ['dialog_ids' => $dialog['id']]
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
@ -467,4 +467,6 @@ Api接口文档
|
|||||||
开始时间 无效的时间格式
|
开始时间 无效的时间格式
|
||||||
结束时间 无效的时间格式
|
结束时间 无效的时间格式
|
||||||
开始时间不能大于结束时间
|
开始时间不能大于结束时间
|
||||||
找不到符合条件的子节点
|
找不到符合条件的子节点
|
||||||
|
|
||||||
|
文件
|
||||||
|
|||||||
BIN
public/images/avatar/default_group_department.png
Normal file
|
After Width: | Height: | Size: 6.9 KiB |
BIN
public/images/avatar/default_group_people.png
Normal file
|
After Width: | Height: | Size: 7.3 KiB |
BIN
public/images/avatar/default_group_project.png
Normal file
|
After Width: | Height: | Size: 6.6 KiB |
BIN
public/images/avatar/default_group_task.png
Normal file
|
After Width: | Height: | Size: 5.7 KiB |
@ -1 +1 @@
|
|||||||
["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","",""]
|
["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","",""]
|
||||||
@ -1188,7 +1188,9 @@ export default {
|
|||||||
|
|
||||||
onFullBeforeClose() {
|
onFullBeforeClose() {
|
||||||
return new Promise(resolve => {
|
return new Promise(resolve => {
|
||||||
this.$refs.editor.firstChild.innerHTML = this.$refs.editorFull.firstChild.innerHTML
|
if (this.$refs.editorFull?.firstChild) {
|
||||||
|
this.$refs.editor.firstChild.innerHTML = this.$refs.editorFull.firstChild.innerHTML
|
||||||
|
}
|
||||||
resolve()
|
resolve()
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|||||||
|
After Width: | Height: | Size: 6.9 KiB |
|
After Width: | Height: | Size: 7.3 KiB |
|
After Width: | Height: | Size: 6.6 KiB |
|
After Width: | Height: | Size: 5.7 KiB |
@ -1 +1 @@
|
|||||||
Subproject commit 769222641cae4431d379b31aeea77a775a5d9149
|
Subproject commit 8bee1e094aae5ba291d4c4a3fe600dcf41023aaf
|
||||||