no message
This commit is contained in:
parent
a78437ea72
commit
e92e3e8daf
@ -31,7 +31,17 @@
|
||||
</ScrollerY>
|
||||
<div :class="['dialog-footer', msgNew > 0 && dialogMsgList.length > 0 ? 'newmsg' : '']">
|
||||
<div class="dialog-newmsg" @click="goNewBottom">{{$L('有' + msgNew + '条新消息')}}</div>
|
||||
<DragInput class="dialog-input" v-model="msgText" type="textarea" :rows="1" :autosize="{ minRows: 1, maxRows: 3 }" :maxlength="255" @on-keydown="chatKeydown" @on-input-paste="pasteDrag" :placeholder="$L('输入消息...')" />
|
||||
<DragInput
|
||||
ref="input"
|
||||
v-model="msgText"
|
||||
class="dialog-input"
|
||||
type="textarea"
|
||||
:rows="1"
|
||||
:autosize="{ minRows: 1, maxRows: 3 }"
|
||||
:maxlength="255"
|
||||
@on-keydown="chatKeydown"
|
||||
@on-input-paste="pasteDrag"
|
||||
:placeholder="$L('输入消息...')" />
|
||||
<DialogUpload
|
||||
ref="chatUpload"
|
||||
class="chat-upload"
|
||||
@ -105,7 +115,14 @@ export default {
|
||||
},
|
||||
|
||||
methods: {
|
||||
sendMsg() {
|
||||
sendMsg(text) {
|
||||
if (typeof text === "string" && text) {
|
||||
this.msgText = text;
|
||||
this.$refs.input.focus();
|
||||
}
|
||||
if (!this.msgText) {
|
||||
return;
|
||||
}
|
||||
let tempId = $A.randomString(16);
|
||||
this.dialogMsgList.push({
|
||||
id: tempId,
|
||||
|
@ -267,6 +267,8 @@
|
||||
<div class="file-name">{{file.name}}</div>
|
||||
<div class="file-size">{{$A.bytesToSize(file.size)}}</div>
|
||||
</li>
|
||||
</ul>
|
||||
<ul class="item-content">
|
||||
<li>
|
||||
<div class="add-button" @click="$refs.upload.handleClick()">
|
||||
<i class="iconfont"></i>{{$L('添加附件')}}
|
||||
@ -278,8 +280,10 @@
|
||||
<div class="item-label" slot="label">
|
||||
<i class="iconfont"></i>{{$L('子任务')}}
|
||||
</div>
|
||||
<ul :class="['item-content subtask', taskDetail.sub_task.length === 0 ? 'nosub' : '']">
|
||||
<ul class="item-content subtask">
|
||||
<TaskDetail v-for="(task, key) in taskDetail.sub_task" :key="key" :open-task="task"/>
|
||||
</ul>
|
||||
<ul :class="['item-content', taskDetail.sub_task.length === 0 ? 'nosub' : '']">
|
||||
<li>
|
||||
<Input
|
||||
v-if="addsubShow"
|
||||
@ -319,8 +323,8 @@
|
||||
</div>
|
||||
<TaskUpload ref="upload" class="upload"/>
|
||||
</div>
|
||||
<div class="task-dialog">
|
||||
<DialogWrapper v-if="taskDetail.dialog_id > 0">
|
||||
<div class="task-dialog" :style="dialogStyle">
|
||||
<DialogWrapper v-if="taskDetail.dialog_id > 0" ref="dialog">
|
||||
<div slot="head" class="head">
|
||||
<Icon class="icon" type="ios-chatbubbles-outline" />
|
||||
<div class="nav">
|
||||
@ -337,7 +341,7 @@
|
||||
<p>{{$L('动态')}}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="no-dialog" :style="dialogStyle">
|
||||
<div class="no-dialog">
|
||||
<div class="no-tip">{{$L('暂无消息')}}</div>
|
||||
<div class="no-input">
|
||||
<Input
|
||||
@ -472,7 +476,7 @@ export default {
|
||||
}
|
||||
if (taskDetail.dialog_id) {
|
||||
return {
|
||||
minHeight: (innerHeight - 70 - 66 - 30) + 'px'
|
||||
minHeight: (innerHeight - 70 - 48) + 'px'
|
||||
}
|
||||
} else {
|
||||
return {};
|
||||
@ -980,6 +984,10 @@ export default {
|
||||
id: this.taskDetail.id,
|
||||
dialog_id: data.dialog_id
|
||||
});
|
||||
this.$nextTick(() => {
|
||||
this.$refs.dialog.sendMsg(this.msgText);
|
||||
this.msgText = "";
|
||||
});
|
||||
}).catch(({msg}) => {
|
||||
$A.modalError(msg);
|
||||
});
|
||||
|
@ -144,6 +144,7 @@
|
||||
}
|
||||
}
|
||||
&.file {
|
||||
margin-bottom: -3px;
|
||||
> li {
|
||||
margin-bottom: 2px;
|
||||
.file-load {
|
||||
@ -157,8 +158,12 @@
|
||||
}
|
||||
.file-name {
|
||||
padding-left: 8px;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.file-size {
|
||||
flex-shrink: 0;
|
||||
padding-left: 10px;
|
||||
height: 24px;
|
||||
font-size: 12px;
|
||||
@ -256,7 +261,7 @@
|
||||
> li {
|
||||
.add-input,
|
||||
.add-button {
|
||||
margin-top: 3px;
|
||||
margin-top: -2px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user