mirror of
https://github.com/kuaifan/dootask.git
synced 2025-12-16 05:52:49 +00:00
fix: 修复已知bug
This commit is contained in:
parent
c940698933
commit
19815415d0
@ -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;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -70,8 +70,9 @@ 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 = "")
|
||||||
{
|
{
|
||||||
@ -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