提交 8969437d 编写于 作者: guangjun.yang's avatar guangjun.yang

关闭会话等

上级 ca3d46e3
......@@ -64,6 +64,7 @@
</section>
</template>
<script>
import { mapGetters, mapMutations } from 'vuex';
let clipboard = null;
export default {
props: {
......@@ -88,10 +89,24 @@ export default {
stickerIdList: []
};
},
computed: {
...mapGetters(['stickerCacheMap']),
},
watch: {
taskLogId(newVal) {
if(this.stickerCacheMap[newVal]) {
this.stickerIdList = this.stickerCacheMap[newVal];
} else {
this.stickerIdList = [];
}
}
},
created() {
this.getStickerList();
},
methods: {
...mapMutations(['SET_STICKER_CACHE_MAP']),
// 查询所有的问题分类
getStickerList() {
this.GET(`/im/sticker/list`).then(res => {
......@@ -109,8 +124,9 @@ export default {
// 保存用户问题分类
stickerSave(status) {
// 下拉框出现或者选项为空时,直接退出
// 下拉框出现(status==true)或者选项为空时,直接退出
if(status || !this.stickerIdList.length) return;
this.SET_STICKER_CACHE_MAP({key: this.taskLogId, idList: this.stickerIdList});
let params = {
stickerIdList: this.stickerIdList,
taskLogId: this.taskLogId,
......@@ -135,6 +151,7 @@ export default {
// .footer:文档的CSS类名
text: function(trigger) {
console.log(_this.userInfo.mobilePhoneCopy);
_this.$message.success('复制成功');
return _this.userInfo.mobilePhoneCopy; // 要粘贴的文案
}
});
......
const common = {
state: {
_token: '',
// 问题归类
stickerCacheMap: {
}
},
mutations: {
CHANGE_TOKEN: (state, data) => {
state._token = data
},
SET_STICKER_CACHE_MAP: (state, chcheMap) => {
state.stickerCacheMap[chcheMap.key] = chcheMap.idList;
},
},
actions: {
changeToken({ commit }, tokenData) {
......
const getters = {
_token: state => state.common._token,
stickerCacheMap: state => state.common.stickerCacheMap,
}
export default getters
此差异已折叠。
......@@ -188,3 +188,4 @@ export function getPhomeDemain() {
return getConfigByEnvType('phomeDemain')
}
......@@ -194,9 +194,10 @@
color: #2f86f6;
}
& > .mid-pdf {
max-width: 260px;
width: 260px;
display: flex;
flex-direction: row;
justify-content: space-between;
text-align: left;
padding: 10px 15px;
background: #f0f1f2;
......@@ -207,6 +208,7 @@
display: flex;
flex-direction: column;
justify-content: space-around;
margin-right: 10px;
.name {
font-size: 13px;
color: #333333;
......
......@@ -22,7 +22,7 @@
<div class="desc">
<div class="top">
<span class="name">{{session.toName}}</span>
<span class="time small">{{session.lastMsgTime}}</span>
<span class="time small">{{session.lastMsgTime | timeFormat}}</span>
</div>
<div class="bottom">
<span>{{session.text}}</span>
......@@ -62,7 +62,7 @@
<img :src="item.avatarImg" alt />
</div>
<div class="msg-item-detail">
<span class="mid-time">{{item.timestamp}}</span>
<span class="mid-time">{{item.timestamp | timeFormat}}</span>
<div v-if="item.showType == 1" class="mid-text-wrapper" style="max-width: 520px;">
<img v-show="item.sendFlag" src="../../../assets/image/IM/icon-no-send.png" alt />
<div class="mid-text">{{item.text}}</div>
......@@ -201,8 +201,8 @@ export default {
historyTimestamp: 0,
realTimestamp: 0,
doctorInfo: {
name: "杨Song",
mobilePhone: "138****7261",
name: "",
mobilePhone: "",
isShowCopyBtn: true
},
containerHeight: CONTAINER_HEIGHT,
......@@ -594,11 +594,14 @@ export default {
// 关闭一个任务
closeOneTask(session) {
let params = {
taskLogId: session.id
taskLogId: session.taskLogId
};
this.POST(`/im/session/kf/closeOneTask`, params).then(res => {
if (res.code === "000000") {
console.log("in closeOneTask", res);
if(res.data == 1) {
this.getSessionList();
}
} else {
this.$message({
message: res.message,
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册