@@ -15,7 +15,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<!-- 已读/未读 -->
|
<!-- 已读/未读 -->
|
||||||
<!-- <span v-if="v.read" class="el-tag el-tag--success el-tag--mini read">已读</span> -->
|
<!-- <span v-if="v.read" class="el-tag el-tag--success el-tag--mini read">已读</span> -->
|
||||||
<button v-if="!v.read" class="el-tag el-tag--danger el-tag--mini read" @click="handleview(v)">查看画面</button>
|
<button v-if="!v.read" class="el-tag el-tag--danger el-tag--mini read" @click="handleView(v)">查看画面</button>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<el-empty v-else :description="'消息为空'"></el-empty>
|
<el-empty v-else :description="'消息为空'"></el-empty>
|
||||||
@@ -27,6 +27,7 @@
|
|||||||
<script setup lang="ts" name="layoutBreadcrumbUserNews">
|
<script setup lang="ts" name="layoutBreadcrumbUserNews">
|
||||||
import { useNoticeStore } from '@/store/modules/notice';
|
import { useNoticeStore } from '@/store/modules/notice';
|
||||||
import { listNotice } from '@/api/system/notice';
|
import { listNotice } from '@/api/system/notice';
|
||||||
|
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||||
|
|
||||||
const noticeStore = useNoticeStore();
|
const noticeStore = useNoticeStore();
|
||||||
const { readAll } = useNoticeStore();
|
const { readAll } = useNoticeStore();
|
||||||
@@ -37,11 +38,22 @@ const state = reactive({
|
|||||||
});
|
});
|
||||||
const newsList = ref([]) as any;
|
const newsList = ref([]) as any;
|
||||||
|
|
||||||
|
const monitorVideoUrl = ref();
|
||||||
|
const dialog = reactive<DialogOption>({
|
||||||
|
visible: false,
|
||||||
|
title: ''
|
||||||
|
});
|
||||||
|
|
||||||
//查看画面
|
//查看画面
|
||||||
const handleview = (row: any) => {
|
const handleView = (row: any) => {
|
||||||
console.log('查看画面', row);
|
console.log('查看画面', row);
|
||||||
// 在这里可以添加打开画面的逻辑,例如:
|
// 在这里可以添加打开画面的逻辑
|
||||||
// window.open('https://example.com/notice/' + newsList.value[row].id);
|
if (!row || !row.videoUrl) {
|
||||||
|
proxy?.$modal.msgError('视频地址不存在');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
monitorVideoUrl.value = row.videoUrl;
|
||||||
|
dialog.visible = true;
|
||||||
};
|
};
|
||||||
/**
|
/**
|
||||||
* 过滤消息(只保留最新的5条)
|
* 过滤消息(只保留最新的5条)
|
||||||
|
|||||||
Reference in New Issue
Block a user