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
@ -167,9 +167,9 @@ class User extends AbstractModel
|
||||
if (!$this->bot) {
|
||||
return 0;
|
||||
}
|
||||
$key = "BotOwner::" . $this->userid;
|
||||
$key = "getBotOwner::" . $this->userid;
|
||||
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;
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@ -70,8 +70,9 @@ class WebSocketDialog extends AbstractModel
|
||||
/**
|
||||
* 获取对话列表
|
||||
* @param int $userid 会员ID
|
||||
* @param bool $hasData
|
||||
* @return $this
|
||||
* @param $updated
|
||||
* @param $deleted
|
||||
* @return array
|
||||
*/
|
||||
public function getDialogList($userid, $updated = "", $deleted = "")
|
||||
{
|
||||
@ -96,8 +97,6 @@ class WebSocketDialog extends AbstractModel
|
||||
return $data;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 格式化对话
|
||||
* @param int $userid 会员ID
|
||||
|
||||
@ -592,21 +592,16 @@ export default {
|
||||
this.selects = $A.cloneJSON(this.uncancelable)
|
||||
return
|
||||
}
|
||||
let optional = this.multipleMax - this.selects.length
|
||||
this.lists.some(item => {
|
||||
if (this.isUncancelable(item.userid)) {
|
||||
return false
|
||||
}
|
||||
if (this.isDisabled(item.userid)) {
|
||||
return false
|
||||
}
|
||||
if (optional <= 0) {
|
||||
if (this.multipleMax && this.selects.length >= this.multipleMax) {
|
||||
$A.messageWarning("已超过最大选择数量")
|
||||
return true
|
||||
}
|
||||
if (!this.selects.includes(item.userid)) {
|
||||
this.selects.push(item.userid)
|
||||
optional--
|
||||
}
|
||||
})
|
||||
},
|
||||
@ -626,6 +621,7 @@ export default {
|
||||
return
|
||||
}
|
||||
this.selects.push(userid)
|
||||
// 滚动到选中的位置
|
||||
this.$nextTick(() => {
|
||||
$A.scrollIntoViewIfNeeded(this.$refs.selected.querySelector(`li[data-id="${userid}"]`))
|
||||
})
|
||||
@ -649,6 +645,11 @@ export default {
|
||||
$A.messageWarning("部分成员禁止选择")
|
||||
}
|
||||
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;
|
||||
}
|
||||
},
|
||||
|
||||
@ -180,6 +180,7 @@
|
||||
:avatar-size="28"
|
||||
:title="$L('修改负责人')"
|
||||
:project-id="taskDetail.project_id"
|
||||
:add-icon="false"
|
||||
:before-submit="onOwner"/>
|
||||
</FormItem>
|
||||
<FormItem v-if="getAssist.length > 0 || assistForce">
|
||||
@ -195,6 +196,7 @@
|
||||
:title="$L(getAssist.length > 0 ? '修改协助人员' : '添加协助人员')"
|
||||
:project-id="taskDetail.project_id"
|
||||
:disabled-choice="assistData.disabled"
|
||||
:add-icon="false"
|
||||
:before-submit="onAssist"/>
|
||||
</FormItem>
|
||||
<FormItem v-if="taskDetail.end_at || timeForce">
|
||||
@ -1183,7 +1185,7 @@ export default {
|
||||
case 'assist':
|
||||
this.assistForce = true;
|
||||
this.$nextTick(() => {
|
||||
this.$refs.assist.onSelect();
|
||||
this.$refs.assist.onSelection();
|
||||
});
|
||||
break;
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user