|
|
@ -70,9 +70,13 @@ |
|
|
|
</keep-alive> |
|
|
|
</template> |
|
|
|
|
|
|
|
<Tips v-for="item in $store.state.tipsList" :key="item" @look="handleLook(item)" /> |
|
|
|
<template v-for="(item, index) in $store.state.tipsList"> |
|
|
|
<Tips :key="item.memoId" |
|
|
|
:info="item" |
|
|
|
@look="handleLook(item)" @close="handleClose(item, index)" /> |
|
|
|
</template> |
|
|
|
|
|
|
|
<el-dialog title="收货地址" :visible.sync="dialogFormVisible" :close-on-click-modal="false" append-to-body> |
|
|
|
<el-dialog title="提示信息" :visible.sync="dialogFormVisible" :close-on-click-modal="false" append-to-body> |
|
|
|
<el-form :model="form"> |
|
|
|
<el-form-item label="活动名称" :label-width="formLabelWidth"> |
|
|
|
<el-input v-model="form.name" autocomplete="off"></el-input> |
|
|
@ -96,6 +100,7 @@ |
|
|
|
import { isURL } from "@/utils/validate"; |
|
|
|
import Cookie from "js-cookie"; |
|
|
|
import Tips from './tips.vue' |
|
|
|
import { requestPost } from "@/js/dai/request"; |
|
|
|
export default { |
|
|
|
components: { |
|
|
|
Tips |
|
|
@ -120,7 +125,7 @@ export default { |
|
|
|
this.token = localStorage.getItem("token"); |
|
|
|
this.customerId = localStorage.getItem("customerId"); |
|
|
|
|
|
|
|
// this.loopTips() |
|
|
|
this.loopTips() |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
changeCustomerName(customerName) { |
|
|
@ -207,17 +212,49 @@ export default { |
|
|
|
iframe.postMessage({ name: "lalalal" }, "*"); |
|
|
|
}, |
|
|
|
loopTips() { |
|
|
|
let id = 1 |
|
|
|
this.timer = setInterval(() => { |
|
|
|
id = id + 1 |
|
|
|
if (id == 5) clearInterval(this.timer) |
|
|
|
this.tipsList.push(id) |
|
|
|
console.log('id------0', id) |
|
|
|
}, 1000) |
|
|
|
this.$store.dispatch('setTipsList') |
|
|
|
this.$store.dispatch('setTipsTime') |
|
|
|
// let id = 1 |
|
|
|
// this.timer = setInterval(() => { |
|
|
|
// id = id + 1 |
|
|
|
// if (id == 5) clearInterval(this.timer) |
|
|
|
// this.tipsList.push(id) |
|
|
|
// console.log('id------0', id) |
|
|
|
// }, 1000) |
|
|
|
}, |
|
|
|
async closeTips(memoId) { |
|
|
|
const url = '/gov/project/memoAttr/setReaded' |
|
|
|
const params = { |
|
|
|
memoId |
|
|
|
} |
|
|
|
const { data, code, msg } = await requestPost(url, params) |
|
|
|
if (code != 0) this.$message.error(msg) |
|
|
|
}, |
|
|
|
async getInfo(item) { |
|
|
|
const urls = { |
|
|
|
work_diary: '/gov/project/memoWorkDiary', |
|
|
|
concern: '/gov/project/memoConcern', |
|
|
|
difficulty: '/gov/project/memoDifficulty/detail' |
|
|
|
} |
|
|
|
const params = { |
|
|
|
id: item.memoId, |
|
|
|
readFlag: 0 |
|
|
|
} |
|
|
|
const { data, code, msg } = await requestPost(urls[item.type], params) |
|
|
|
if (code == 0) { |
|
|
|
this.form = { ...data } |
|
|
|
} else this.$message.error(msg) |
|
|
|
}, |
|
|
|
handleClose(item, index) { |
|
|
|
console.log('close-----', item) |
|
|
|
this.$store.state.tipsList.splice(index, 1) |
|
|
|
this.closeTips(item.memoId) |
|
|
|
}, |
|
|
|
handleLook(id) { |
|
|
|
console.log('look-----', id) |
|
|
|
async handleLook(item) { |
|
|
|
console.log('look-----', item) |
|
|
|
await this.getInfo(item) |
|
|
|
this.dialogFormVisible = true |
|
|
|
|
|
|
|
} |
|
|
|
}, |
|
|
|
}; |
|
|
|