mirror of
https://github.com/kuaifan/dootask.git
synced 2025-12-12 03:01:12 +00:00
feat: 转发消息 - 添加单选模式
This commit is contained in:
parent
5fdd5adef8
commit
fe5ec9677a
@ -1424,3 +1424,4 @@ APP推送
|
||||
不显示原发送者信息
|
||||
转发给:
|
||||
留言
|
||||
多选
|
||||
|
||||
@ -18676,5 +18676,49 @@
|
||||
"de": "Server sind zu niedrig. Bitte aktualisiert den server.",
|
||||
"fr": "La version du serveur est trop basse. Veuillez mettre à jour le serveur.",
|
||||
"id": "Versi server di bawah rendah, silahkan upgrade server."
|
||||
},
|
||||
{
|
||||
"key": "不显示原发送者信息",
|
||||
"zh": "",
|
||||
"zh-CHT": "不顯示原發送者信息",
|
||||
"en": "The original sender information is not displayed",
|
||||
"ko": "원래 보낸 사람 메시지 안 보이기",
|
||||
"ja": "元送信者情報は表示されません。",
|
||||
"de": "Kein original absender anzeigen",
|
||||
"fr": "Ne pas afficher les informations de l’expéditeur original",
|
||||
"id": "Tidak menunjukkan pesan asli"
|
||||
},
|
||||
{
|
||||
"key": "转发给:",
|
||||
"zh": "",
|
||||
"zh-CHT": "轉發給:",
|
||||
"en": "Forward to:",
|
||||
"ko": "다음으로 전달:",
|
||||
"ja": "転送します:",
|
||||
"de": "Und an scotty.",
|
||||
"fr": "Envoyer à:",
|
||||
"id": "Teruskan ke:"
|
||||
},
|
||||
{
|
||||
"key": "留言",
|
||||
"zh": "",
|
||||
"zh-CHT": "留言",
|
||||
"en": "Leave a message",
|
||||
"ko": "메시지",
|
||||
"ja": "伝言です",
|
||||
"de": "Nachricht für mich.",
|
||||
"fr": "Le message",
|
||||
"id": "Tinggalkan pesan"
|
||||
},
|
||||
{
|
||||
"key": "多选",
|
||||
"zh": "",
|
||||
"zh-CHT": "多選",
|
||||
"en": "Multiple choice",
|
||||
"ko": "선",
|
||||
"ja": "複数回答です",
|
||||
"de": "Kommt an die reihe.",
|
||||
"fr": "DuoXuan",
|
||||
"id": "DuoXuan"
|
||||
}
|
||||
]
|
||||
2
public/language/web/de.js
vendored
2
public/language/web/de.js
vendored
File diff suppressed because one or more lines are too long
2
public/language/web/en.js
vendored
2
public/language/web/en.js
vendored
File diff suppressed because one or more lines are too long
2
public/language/web/fr.js
vendored
2
public/language/web/fr.js
vendored
File diff suppressed because one or more lines are too long
2
public/language/web/id.js
vendored
2
public/language/web/id.js
vendored
File diff suppressed because one or more lines are too long
2
public/language/web/ja.js
vendored
2
public/language/web/ja.js
vendored
File diff suppressed because one or more lines are too long
2
public/language/web/key.js
vendored
2
public/language/web/key.js
vendored
File diff suppressed because one or more lines are too long
2
public/language/web/ko.js
vendored
2
public/language/web/ko.js
vendored
File diff suppressed because one or more lines are too long
2
public/language/web/zh-CHT.js
vendored
2
public/language/web/zh-CHT.js
vendored
File diff suppressed because one or more lines are too long
2
public/language/web/zh.js
vendored
2
public/language/web/zh.js
vendored
@ -1 +1 @@
|
||||
if(typeof window.LANGUAGE_DATA==="undefined")window.LANGUAGE_DATA={};window.LANGUAGE_DATA["zh"]=["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","",""]
|
||||
if(typeof window.LANGUAGE_DATA==="undefined")window.LANGUAGE_DATA={};window.LANGUAGE_DATA["zh"]=["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","",""]
|
||||
@ -19,15 +19,20 @@
|
||||
<!-- 顶部 -->
|
||||
<template #header>
|
||||
<div v-if="isFullscreen" class="user-modal-header">
|
||||
<div class="user-modal-close" @click="showModal=false">{{$L('关闭')}}</div>
|
||||
<div class="user-modal-close" @click="[ !multipleChoice && showMultiple ? showMultiple=false : showModal=false]">
|
||||
{{ !multipleChoice && showMultiple ? $L('取消') : $L('关闭') }}
|
||||
</div>
|
||||
<div class="user-modal-title"><span>{{localTitle}}</span></div>
|
||||
<div class="user-modal-submit" @click="onSubmit(1)">
|
||||
<div v-if="showMultiple" class="user-modal-submit" @click="onSubmit(1)">
|
||||
<div v-if="submittIng > 0" class="submit-loading"><Loading /></div>
|
||||
{{$L('确定')}}
|
||||
<template v-if="selects.length > 0">
|
||||
({{selects.length}}<span v-if="multipleMax">/{{multipleMax}}</span>)
|
||||
</template>
|
||||
</div>
|
||||
<div v-else class="user-modal-submit" @click="showMultiple = true">
|
||||
{{$L('多选')}}
|
||||
</div>
|
||||
</div>
|
||||
<div v-else class="ivu-modal-header-inner">{{localTitle}}</div>
|
||||
</template>
|
||||
@ -37,7 +42,7 @@
|
||||
|
||||
<!-- 搜索 -->
|
||||
<div class="user-modal-search">
|
||||
<Scrollbar ref="selected" class="search-selected" v-if="selects.length > 0" enable-x :enable-y="false">
|
||||
<Scrollbar ref="selected" class="search-selected" v-if="showMultiple && selects.length > 0" enable-x :enable-y="false">
|
||||
<ul>
|
||||
<li v-for="item in formatSelect(selects)" :data-id="item.userid" @click.stop="onRemoveItem(item.userid)">
|
||||
<template v-if="item.type=='group'">
|
||||
@ -76,15 +81,19 @@
|
||||
v-for="item in lists"
|
||||
:class="selectClass(item.userid_list)"
|
||||
@click="onSelectProject(item.userid_list)">
|
||||
<template v-if="showMultiple">
|
||||
<Icon class="user-modal-icon" :type="selectIcon(item.userid_list)" />
|
||||
</template>
|
||||
<div class="user-modal-avatar">
|
||||
<i class="taskfont icon-avatar"></i>
|
||||
<div class="project-name">
|
||||
<div class="label">{{item.name}}</div>
|
||||
<div class="subtitle">
|
||||
{{item.userid_list.length}} {{$L('项目成员')}}
|
||||
<template v-if="showMultiple">
|
||||
<em class="all">{{$L('已全选')}}</em>
|
||||
<em class="some">{{$L('已选部分')}}</em>
|
||||
</template>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -93,7 +102,7 @@
|
||||
<!-- 会员、会话 -->
|
||||
<ul v-else>
|
||||
<li
|
||||
v-if="showSelectAll"
|
||||
v-if="showMultiple && showSelectAll"
|
||||
:class="selectClass('all')"
|
||||
@click="onSelectAll">
|
||||
<Icon class="user-modal-icon" :type="selectIcon('all')" />
|
||||
@ -106,8 +115,10 @@
|
||||
disabled: isUncancelable(item.userid) || isDisabled(item.userid)
|
||||
}"
|
||||
@click="onSelectItem(item)">
|
||||
<template v-if="showMultiple">
|
||||
<Icon v-if="selects.includes(item.userid)" class="user-modal-icon" type="ios-checkmark-circle" />
|
||||
<Icon v-else class="user-modal-icon" type="ios-radio-button-off" />
|
||||
</template>
|
||||
<div v-if="item.type=='group'" class="user-modal-avatar">
|
||||
<EAvatar v-if="item.avatar" class="img-avatar" :src="item.avatar" :size="40"></EAvatar>
|
||||
<i v-else-if="item.group_type=='department'" class="taskfont icon-avatar department"></i>
|
||||
@ -134,12 +145,19 @@
|
||||
|
||||
<!-- 底部 -->
|
||||
<template #footer>
|
||||
<Button type="primary" :loading="submittIng > 0" @click="onSubmit(1)">
|
||||
<Button v-if="!multipleChoice && showMultiple" @click="showMultiple = false">
|
||||
{{$L('取消')}}
|
||||
</Button>
|
||||
<Button v-if="showMultiple" type="primary" :loading="submittIng > 0" @click="onSubmit(1)">
|
||||
{{$L('确定')}}
|
||||
<template v-if="selects.length > 0">
|
||||
({{selects.length}}<span v-if="multipleMax">/{{multipleMax}}</span>)
|
||||
</template>
|
||||
</Button>
|
||||
<Button v-else type="primary" @click="showMultiple = true">
|
||||
{{$L('多选')}}
|
||||
</Button>
|
||||
|
||||
</template>
|
||||
</Modal>
|
||||
|
||||
@ -154,14 +172,17 @@
|
||||
<Scrollbar class="search-selected" v-if="selects?.length > 0" enable-x :enable-y="false">
|
||||
<ul>
|
||||
<li v-for="item in formatSelect(selects)" :data-id="item.userid">
|
||||
<template v-if="item.type=='group'">
|
||||
<div v-if="item.type=='group'" class="user-modal-avatar">
|
||||
<EAvatar v-if="item.avatar" class="img-avatar" :src="item.avatar" :size="32"></EAvatar>
|
||||
<i v-else-if="item.group_type=='department'" class="taskfont icon-avatar department"></i>
|
||||
<i v-else-if="item.group_type=='project'" class="taskfont icon-avatar project"></i>
|
||||
<i v-else-if="item.group_type=='task'" class="taskfont icon-avatar task"></i>
|
||||
<i v-else-if="item.group_type=='okr'" class="taskfont icon-avatar task"></i>
|
||||
<Icon v-else class="icon-avatar" type="ios-people" />
|
||||
</template>
|
||||
<div v-if="selects?.length == 1" class="avatar-name">
|
||||
<span>{{item.name}}</span>
|
||||
</div>
|
||||
</div>
|
||||
<UserAvatar v-else :userid="item.userid" :size="32" :show-name="selects?.length == 1" tooltip-disabled />
|
||||
</li>
|
||||
</ul>
|
||||
@ -309,6 +330,13 @@ export default {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
|
||||
// 是否多选
|
||||
multipleChoice: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
},
|
||||
|
||||
// 提交前的回调
|
||||
beforeSubmit: Function
|
||||
},
|
||||
@ -332,6 +360,7 @@ export default {
|
||||
searchKey: null,
|
||||
searchCache: [],
|
||||
showAffirmModal: false,
|
||||
showMultiple: true,
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
@ -362,6 +391,7 @@ export default {
|
||||
showModal(value) {
|
||||
if (value) {
|
||||
this.searchBefore();
|
||||
this.showMultiple = this.multipleChoice
|
||||
}
|
||||
else {
|
||||
this.searchKey = "";
|
||||
@ -648,6 +678,9 @@ export default {
|
||||
});
|
||||
},
|
||||
onSelectItem({ userid }) {
|
||||
if(!this.showMultiple){
|
||||
this.selects = [];
|
||||
}
|
||||
if (this.selects.includes(userid)) {
|
||||
if (this.isUncancelable(userid)) {
|
||||
return;
|
||||
@ -665,11 +698,17 @@ export default {
|
||||
this.selects.push(userid);
|
||||
// 滚动到选中的位置
|
||||
this.$nextTick(() => {
|
||||
$A.scrollIntoViewIfNeeded(this.$refs.selected.querySelector(`li[data-id="${userid}"]`));
|
||||
$A.scrollIntoViewIfNeeded(this.$refs.selected?.querySelector(`li[data-id="${userid}"]`));
|
||||
});
|
||||
}
|
||||
if(!this.showMultiple){
|
||||
this.onSubmit(1)
|
||||
}
|
||||
},
|
||||
onSelectProject(userid_list) {
|
||||
if(!this.showMultiple){
|
||||
this.selects = [];
|
||||
}
|
||||
switch (this.selectIcon(userid_list)) {
|
||||
case 'ios-checkmark-circle':
|
||||
// 去除
|
||||
@ -693,6 +732,9 @@ export default {
|
||||
}
|
||||
break;
|
||||
}
|
||||
if(!this.showMultiple){
|
||||
this.onSubmit(1)
|
||||
}
|
||||
},
|
||||
onRemoveItem(userid) {
|
||||
if (this.isUncancelable(userid)) {
|
||||
|
||||
@ -395,6 +395,7 @@
|
||||
:twice-affirm-title="$L('转发给:')"
|
||||
:before-submit="onForward"
|
||||
:show-select-all="false"
|
||||
:multiple-choice="false"
|
||||
show-dialog
|
||||
module>
|
||||
<template #twice-affirm-body-extend>
|
||||
|
||||
@ -178,6 +178,14 @@
|
||||
.search-selected{
|
||||
max-width: 100%;
|
||||
}
|
||||
.user-modal-avatar{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 5px;
|
||||
.avatar-name{
|
||||
max-width: 90%;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -1453,6 +1453,7 @@
|
||||
position: relative !important;
|
||||
.dialog-scroller{
|
||||
padding: 0 !important;
|
||||
.dialog-item{
|
||||
.dialog-view{
|
||||
width: 100%;
|
||||
max-width: 100% !important;
|
||||
@ -1465,6 +1466,27 @@
|
||||
display: none !important;
|
||||
}
|
||||
}
|
||||
&.self {
|
||||
.dialog-head{
|
||||
background-color: #F4F5F7;
|
||||
.content-text{
|
||||
color: #303133 !important;
|
||||
.markdown-body{
|
||||
color: #303133 !important;
|
||||
}
|
||||
}
|
||||
.dialog-reply{
|
||||
&:after{
|
||||
background-color: rgba(132, 197, 106, 0.7);
|
||||
}
|
||||
.bot,.common-avatar{
|
||||
color: #84C56A !important;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.leave-message{
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user