|
@@ -731,7 +731,7 @@
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<script setup>
|
|
<script setup>
|
|
|
-import { ref, computed, onMounted } from 'vue'
|
|
|
|
|
|
|
+import { ref, computed, onMounted, onBeforeUnmount } from 'vue'
|
|
|
import { ElMessageBox } from 'element-plus'
|
|
import { ElMessageBox } from 'element-plus'
|
|
|
import AddMarketing from '../components/addMarketing.vue'
|
|
import AddMarketing from '../components/addMarketing.vue'
|
|
|
import { getMarketingList, setMarketingStatus, marketingAnalysis } from '../api/marketing'
|
|
import { getMarketingList, setMarketingStatus, marketingAnalysis } from '../api/marketing'
|
|
@@ -773,9 +773,18 @@ const openCreateModal = () => {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
const marketingList = ref([])
|
|
const marketingList = ref([])
|
|
|
|
|
+const handleExternalMarketingRefresh = () => {
|
|
|
|
|
+ getData()
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
onMounted(() => {
|
|
onMounted(() => {
|
|
|
getData()
|
|
getData()
|
|
|
getStatsData()
|
|
getStatsData()
|
|
|
|
|
+ window.addEventListener('marketing:refresh', handleExternalMarketingRefresh)
|
|
|
|
|
+})
|
|
|
|
|
+
|
|
|
|
|
+onBeforeUnmount(() => {
|
|
|
|
|
+ window.removeEventListener('marketing:refresh', handleExternalMarketingRefresh)
|
|
|
})
|
|
})
|
|
|
|
|
|
|
|
const loading = ref(false)
|
|
const loading = ref(false)
|