mirror of
https://github.com/kuaifan/dootask.git
synced 2025-12-13 12:02:51 +00:00
fix: 修复已知bug
This commit is contained in:
parent
c940698933
commit
19815415d0
@ -50,7 +50,7 @@ class DialogController extends AbstractController
|
|||||||
//
|
//
|
||||||
$timerange = TimeRange::parse(Request::input());
|
$timerange = TimeRange::parse(Request::input());
|
||||||
//
|
//
|
||||||
$data = (new WebSocketDialog)->getDialogList($user->userid,$timerange->updated,$timerange->deleted);
|
$data = (new WebSocketDialog)->getDialogList($user->userid, $timerange->updated, $timerange->deleted);
|
||||||
//
|
//
|
||||||
return Base::retSuccess('success', $data);
|
return Base::retSuccess('success', $data);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -43,7 +43,7 @@ class FileController extends AbstractController
|
|||||||
$data = Request::all();
|
$data = Request::all();
|
||||||
$pid = intval($data['pid']);
|
$pid = intval($data['pid']);
|
||||||
//
|
//
|
||||||
return Base::retSuccess('success', (new File)->getFileList($user,$pid) );
|
return Base::retSuccess('success', (new File)->getFileList($user, $pid));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -679,7 +679,7 @@ class FileController extends AbstractController
|
|||||||
$user = User::auth();
|
$user = User::auth();
|
||||||
$pid = intval(Request::input('pid'));
|
$pid = intval(Request::input('pid'));
|
||||||
$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($data['data']['name'] . ' 上传成功', $data['addItem']);
|
return Base::retSuccess($data['data']['name'] . ' 上传成功', $data['addItem']);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -62,7 +62,7 @@ class ProjectTaskUser extends AbstractModel
|
|||||||
$item->save();
|
$item->save();
|
||||||
}
|
}
|
||||||
if ($item->projectTask) {
|
if ($item->projectTask) {
|
||||||
$item->projectTask->addLog("移交{任务}身份", ['userid' => [$originalUserid, ' => ',$newUserid]]);
|
$item->projectTask->addLog("移交{任务}身份", ['userid' => [$originalUserid, ' => ', $newUserid]]);
|
||||||
if (!in_array($item->task_pid, $tastIds)) {
|
if (!in_array($item->task_pid, $tastIds)) {
|
||||||
$tastIds[] = $item->task_pid;
|
$tastIds[] = $item->task_pid;
|
||||||
$item->projectTask->syncDialogUser();
|
$item->projectTask->syncDialogUser();
|
||||||
|
|||||||
@ -167,9 +167,9 @@ class User extends AbstractModel
|
|||||||
if (!$this->bot) {
|
if (!$this->bot) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
$key = "BotOwner::" . $this->userid;
|
$key = "getBotOwner::" . $this->userid;
|
||||||
return Cache::remember($key, now()->addMonth(), function() {
|
return Cache::remember($key, now()->addMonth(), function() {
|
||||||
return intval(UserBot::whereBotId($this->userid)->value('userid'));
|
return intval(UserBot::whereBotId($this->userid)->value('userid')) ?: $this->userid;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -69,11 +69,12 @@ class WebSocketDialog extends AbstractModel
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取对话列表
|
* 获取对话列表
|
||||||
* @param int $userid 会员ID
|
* @param int $userid 会员ID
|
||||||
* @param bool $hasData
|
* @param $updated
|
||||||
* @return $this
|
* @param $deleted
|
||||||
|
* @return array
|
||||||
*/
|
*/
|
||||||
public function getDialogList($userid, $updated="", $deleted="")
|
public function getDialogList($userid, $updated = "", $deleted = "")
|
||||||
{
|
{
|
||||||
$builder = WebSocketDialog::select(['web_socket_dialogs.*', 'u.top_at', 'u.mark_unread', 'u.silence', 'u.updated_at as user_at'])
|
$builder = WebSocketDialog::select(['web_socket_dialogs.*', 'u.top_at', 'u.mark_unread', 'u.silence', 'u.updated_at as user_at'])
|
||||||
->join('web_socket_dialog_users as u', 'web_socket_dialogs.id', '=', 'u.dialog_id')
|
->join('web_socket_dialog_users as u', 'web_socket_dialogs.id', '=', 'u.dialog_id')
|
||||||
@ -96,8 +97,6 @@ class WebSocketDialog extends AbstractModel
|
|||||||
return $data;
|
return $data;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 格式化对话
|
* 格式化对话
|
||||||
* @param int $userid 会员ID
|
* @param int $userid 会员ID
|
||||||
|
|||||||
@ -592,21 +592,16 @@ export default {
|
|||||||
this.selects = $A.cloneJSON(this.uncancelable)
|
this.selects = $A.cloneJSON(this.uncancelable)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
let optional = this.multipleMax - this.selects.length
|
|
||||||
this.lists.some(item => {
|
this.lists.some(item => {
|
||||||
if (this.isUncancelable(item.userid)) {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
if (this.isDisabled(item.userid)) {
|
if (this.isDisabled(item.userid)) {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
if (optional <= 0) {
|
if (this.multipleMax && this.selects.length >= this.multipleMax) {
|
||||||
$A.messageWarning("已超过最大选择数量")
|
$A.messageWarning("已超过最大选择数量")
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
if (!this.selects.includes(item.userid)) {
|
if (!this.selects.includes(item.userid)) {
|
||||||
this.selects.push(item.userid)
|
this.selects.push(item.userid)
|
||||||
optional--
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
@ -626,6 +621,7 @@ export default {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
this.selects.push(userid)
|
this.selects.push(userid)
|
||||||
|
// 滚动到选中的位置
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
$A.scrollIntoViewIfNeeded(this.$refs.selected.querySelector(`li[data-id="${userid}"]`))
|
$A.scrollIntoViewIfNeeded(this.$refs.selected.querySelector(`li[data-id="${userid}"]`))
|
||||||
})
|
})
|
||||||
@ -649,6 +645,11 @@ export default {
|
|||||||
$A.messageWarning("部分成员禁止选择")
|
$A.messageWarning("部分成员禁止选择")
|
||||||
}
|
}
|
||||||
this.selects = this.selects.concat(addList.filter(userid => !this.selects.includes(userid)))
|
this.selects = this.selects.concat(addList.filter(userid => !this.selects.includes(userid)))
|
||||||
|
// 超过最大数量
|
||||||
|
if (this.multipleMax && this.selects.length > this.multipleMax) {
|
||||||
|
$A.messageWarning("已超过最大选择数量")
|
||||||
|
this.selects = this.selects.slice(0, this.multipleMax)
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@ -180,6 +180,7 @@
|
|||||||
:avatar-size="28"
|
:avatar-size="28"
|
||||||
:title="$L('修改负责人')"
|
:title="$L('修改负责人')"
|
||||||
:project-id="taskDetail.project_id"
|
:project-id="taskDetail.project_id"
|
||||||
|
:add-icon="false"
|
||||||
:before-submit="onOwner"/>
|
:before-submit="onOwner"/>
|
||||||
</FormItem>
|
</FormItem>
|
||||||
<FormItem v-if="getAssist.length > 0 || assistForce">
|
<FormItem v-if="getAssist.length > 0 || assistForce">
|
||||||
@ -195,6 +196,7 @@
|
|||||||
:title="$L(getAssist.length > 0 ? '修改协助人员' : '添加协助人员')"
|
:title="$L(getAssist.length > 0 ? '修改协助人员' : '添加协助人员')"
|
||||||
:project-id="taskDetail.project_id"
|
:project-id="taskDetail.project_id"
|
||||||
:disabled-choice="assistData.disabled"
|
:disabled-choice="assistData.disabled"
|
||||||
|
:add-icon="false"
|
||||||
:before-submit="onAssist"/>
|
:before-submit="onAssist"/>
|
||||||
</FormItem>
|
</FormItem>
|
||||||
<FormItem v-if="taskDetail.end_at || timeForce">
|
<FormItem v-if="taskDetail.end_at || timeForce">
|
||||||
@ -1183,7 +1185,7 @@ export default {
|
|||||||
case 'assist':
|
case 'assist':
|
||||||
this.assistForce = true;
|
this.assistForce = true;
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$refs.assist.onSelect();
|
this.$refs.assist.onSelection();
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user