@ -1816,64 +1816,58 @@ class UsersController extends AbstractController
|
||||
public function share__list()
|
||||
{
|
||||
$user = User::auth();
|
||||
$pid = intval(Request::input('pid',-1));
|
||||
$uploadFileId = intval(Request::input('upload_file_id',-1));
|
||||
$pid = intval(Request::input('pid', -1));
|
||||
$uploadFileId = intval(Request::input('upload_file_id', -1));
|
||||
// 上传文件
|
||||
if($uploadFileId !== -1){
|
||||
if($pid==-1) $pid = 0;
|
||||
if ($uploadFileId !== -1) {
|
||||
if ($pid == -1) $pid = 0;
|
||||
$webkitRelativePath = Request::input('webkitRelativePath');
|
||||
$data = (new File)->contentUpload($user,$pid,$webkitRelativePath);
|
||||
$data = (new File)->contentUpload($user, $pid, $webkitRelativePath);
|
||||
return Base::retSuccess('success', $data);
|
||||
}
|
||||
// 获取数据
|
||||
$lists = [];
|
||||
if ($pid !== -1) {
|
||||
$fileList = (new File)->getFileList($user,$pid,'dir',false);
|
||||
foreach($fileList as $file){
|
||||
if($file['id'] != $pid){
|
||||
$fileList = (new File)->getFileList($user, $pid, 'dir', false);
|
||||
foreach ($fileList as $file) {
|
||||
if ($file['id'] != $pid) {
|
||||
$lists[] = [
|
||||
'type' => 'children',
|
||||
'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"),
|
||||
'extend' => ['upload_file_id'=>$file['id']],
|
||||
'name' => $file['name'],
|
||||
'type' => 'children',
|
||||
'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"),
|
||||
'extend' => ['upload_file_id' => $file['id']],
|
||||
'name' => $file['name'],
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
}else{
|
||||
|
||||
} else {
|
||||
$lists[] = [
|
||||
'type' => 'children',
|
||||
'url' => Base::fillUrl("api/users/share/list")."?pid=0",
|
||||
'icon' => url("/images/file/light/folder.png"),
|
||||
'extend' => ['upload_file_id'=>0],
|
||||
'name' => '全部文件',
|
||||
'type' => 'children',
|
||||
'url' => Base::fillUrl("api/users/share/list") . "?pid=0",
|
||||
'icon' => url("images/file/light/folder.png"),
|
||||
'extend' => ['upload_file_id' => 0],
|
||||
'name' => Doo::translate('文件'),
|
||||
];
|
||||
$dialogList = (new WebSocketDialog)->getDialogList($user->userid);
|
||||
foreach($dialogList['data'] as $dialog){
|
||||
if($dialog['type'] == 'user'){
|
||||
foreach ($dialogList['data'] as $dialog) {
|
||||
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']);
|
||||
}else{
|
||||
switch ( $dialog['group_type'] ) {
|
||||
case 'department':
|
||||
$avatar = url("images/avatar/default_department.png");
|
||||
break;
|
||||
case 'project':
|
||||
$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;
|
||||
}
|
||||
} else {
|
||||
$avatar = match ($dialog['group_type']) {
|
||||
'department' => url("images/avatar/default_group_department.png"),
|
||||
'project' => url("images/avatar/default_group_project.png"),
|
||||
'task' => url("images/avatar/default_group_task.png"),
|
||||
default => url("images/avatar/default_group_people.png"),
|
||||
};
|
||||
}
|
||||
$lists[] = [
|
||||
'type' => 'item',
|
||||
'name' => $dialog['name'],
|
||||
'icon' => $avatar,
|
||||
'url' => Base::fillUrl("api/dialog/msg/sendfiles"),
|
||||
'type' => 'item',
|
||||
'name' => $dialog['name'],
|
||||
'icon' => $avatar,
|
||||
'url' => Base::fillUrl("api/dialog/msg/sendfiles"),
|
||||
'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() {
|
||||
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()
|
||||
})
|
||||
},
|
||||
|
||||
|
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
|
||||