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

no message

上级 3171c565
......@@ -65,7 +65,7 @@
</section>
</template>
<script>
import { mapGetters, mapMutations } from 'vuex';
// import { mapGetters, mapMutations } from 'vuex';
let clipboard = null;
export default {
props: {
......@@ -91,22 +91,23 @@ export default {
};
},
computed: {
...mapGetters(['stickerCacheMap']),
// ...mapGetters(['stickerCacheMap']),
},
watch: {
taskLogId(newVal) {
if(this.stickerCacheMap[newVal]) {
this.stickerIdList = this.stickerCacheMap[newVal];
} else {
this.stickerIdList = [];
}
this.getStikerInfo(newVal);
// if(this.stickerCacheMap[newVal]) {
// this.stickerIdList = this.stickerCacheMap[newVal];
// } else {
// this.stickerIdList = [];
// }
}
},
created() {
this.getStickerList();
},
methods: {
...mapMutations(['SET_STICKER_CACHE_MAP']),
// ...mapMutations(['SET_STICKER_CACHE_MAP']),
// 查询所有的问题分类
getStickerList() {
......@@ -123,6 +124,21 @@ export default {
});
},
// 根据tasklogid查询问题分类
getStikerInfo(taskLogId) {
this.GET(`/im/sticker/info?taskLogId=${taskLogId}`).then(res => {
if (res.code === "000000") {
this.stickerIdList = res.data || [];
} else {
this.$message({
message: res.message,
type: "error"
});
}
});
},
// 删除时,也要保存
removeTag() {
console.log(this.stickerIdList);
this.stickerSave(false);
......@@ -133,7 +149,7 @@ export default {
// 下拉框出现(status==true)或者选项为空时,直接退出
// if(status || !this.stickerIdList.length) return;
if(status) return;
this.SET_STICKER_CACHE_MAP({key: this.taskLogId, idList: this.stickerIdList});
// this.SET_STICKER_CACHE_MAP({key: this.taskLogId, idList: this.stickerIdList});
let params = {
stickerIdList: this.stickerIdList,
taskLogId: this.taskLogId,
......
......@@ -268,6 +268,22 @@ export default {
}
},
watch: {
// 监听消息列表的变化,添加sessionFlag(会话结束标志)
messageList: {
handler(newMsgList) {
let l = newMsgList.length;
if (l >= 2) {
for (let i = 1; i < l; i++) {
if (newMsgList[i - 1].taskLogId !== newMsgList[i].taskLogId) {
newMsgList[i].sessionFlag = true;
}
}
}
},
deep: true
},
},
created() {
_this = this;
this.picakfAccId = getPicaKFAccid();
......@@ -288,22 +304,6 @@ export default {
}
};
},
watch: {
// 监听消息列表的变化,添加sessionFlag(会话结束标志)
messageList: {
handler(newMsgList) {
let l = newMsgList.length;
if (l >= 2) {
for (let i = 1; i < l; i++) {
if (newMsgList[i - 1].taskLogId !== newMsgList[i].taskLogId) {
newMsgList[i].sessionFlag = true;
}
}
}
},
deep: true
}
},
mounted() {
this.$nextTick(() => {
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册