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

去掉之前缓存的数据

上级 a301584f
...@@ -65,7 +65,6 @@ ...@@ -65,7 +65,6 @@
</section> </section>
</template> </template>
<script> <script>
// import { mapGetters, mapMutations } from 'vuex';
let clipboard = null; let clipboard = null;
export default { export default {
props: { props: {
...@@ -91,24 +90,16 @@ export default { ...@@ -91,24 +90,16 @@ export default {
}; };
}, },
computed: { computed: {
// ...mapGetters(['stickerCacheMap']),
}, },
watch: { watch: {
taskLogId(newVal) { taskLogId(newVal) {
this.getStikerInfo(newVal); this.getStikerInfo(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 => {
...@@ -146,10 +137,8 @@ export default { ...@@ -146,10 +137,8 @@ export default {
// 保存用户问题分类 // 保存用户问题分类
stickerSave(status) { stickerSave(status) {
// 下拉框出现(status==true)或者选项为空时,直接退出 // 下拉框出现(status==true),直接退出
// if(status || !this.stickerIdList.length) return;
if(status) return; if(status) 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,
......
const common = { const common = {
state: { state: {
_token: '', _token: '',
// 问题归类
stickerCacheMap: {
},
isFromAssignTask: false, isFromAssignTask: false,
}, },
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;
},
SET_IS_FROM_ASSIGN_TASK: (state, status) => { SET_IS_FROM_ASSIGN_TASK: (state, status) => {
state.isFromAssignTask = status; state.isFromAssignTask = status;
} }
......
const getters = { const getters = {
_token: state => state.common._token, _token: state => state.common._token,
stickerCacheMap: state => state.common.stickerCacheMap,
isFromAssignTask: state => state.common.isFromAssignTask, isFromAssignTask: state => state.common.isFromAssignTask,
} }
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册