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

关闭会话等

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