|
@@ -1,31 +1,31 @@
|
|
|
<template>
|
|
|
- <scroll-view class="scroll-height" :scroll-y="true" :scroll-into-view="scrollIntoView" :data-theme="'theme-' + proxy.$settingStore.themeColor.name" style="padding-bottom: 44px">
|
|
|
+ <scroll-view class="scroll-height" :scroll-y="true" :data-theme="'theme-' + proxy.$settingStore.themeColor.name" style="padding-bottom: 64px">
|
|
|
<view class="appMessage-container">
|
|
|
<view class="content-area">
|
|
|
<u-empty v-if="noticeList.length <= 0 && loading" text="暂无数据" mode="data" icon="http://cdn.uviewui.com/uview/empty/data.png"> </u-empty>
|
|
|
<view :id="index == noticeList.length - 1 ? 'bottomInfo' : ''" v-for="(all, index) in noticeList" :key="index" v-show="noticeList.length > 0" @click="goContentDetails(all)">
|
|
|
|
|
|
- <view class="content-area-center radius bg-white list-cell2 list-cell-arrow2">
|
|
|
+ <view class="content-area-center radius bg-white list-cell list-cell-arrow">
|
|
|
<view class="">
|
|
|
<image class="content-area-center-image-bg" :src="all.img" />
|
|
|
<view class="content-area-center-title font16">{{ all.infoTitle }}</view>
|
|
|
<view class="content-area-center-time font14 ">{{ all.createTime.substring(5,10) }} {{ all.createTime.substring(11,16) }}</view>
|
|
|
</view>
|
|
|
<view class="content-area-center-cont font14">{{ all.infoContent }}</view>
|
|
|
+ <view class="content-area-center-status font12" :style="{color: all.readFlag == 0 ? 'rgb(20, 158, 255)' : '#ccc' }">{{ all.readFlag == 0 ? '未读' : '已读' }}</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
</scroll-view>
|
|
|
+ <oa-tabbar :tabbarValue="1"></oa-tabbar>
|
|
|
</template>
|
|
|
|
|
|
<script setup>
|
|
|
import { onLoad, onShow, onReady, onHide, onLaunch, onNavigationBarButtonTap, onPageScroll } from "@dcloudio/uni-app";
|
|
|
import { ref, reactive, computed, getCurrentInstance, toRefs, inject } from "vue";
|
|
|
-import { useStores, commonStores,stystemStores } from "@/store/modules/index";
|
|
|
-import { getMceList } from "@/api/mine/info.js";
|
|
|
-const useStore = useStores();
|
|
|
-const stystemStore = stystemStores();
|
|
|
+import { getMceList,updateMceReceiveStatus } from "@/api/mine/info.js";
|
|
|
+import { storage_msgType } from "@/utils/storage";
|
|
|
const { proxy } = getCurrentInstance();
|
|
|
const infoType = ref()//消息类型
|
|
|
const loading =ref(false)
|
|
@@ -37,7 +37,7 @@ const data = reactive({
|
|
|
noticeList: [],
|
|
|
});
|
|
|
|
|
|
-const { scrollIntoView, scrollIntoViewBool, tabsCurrent, allInfoList, noticeList } = toRefs(data);
|
|
|
+const { scrollIntoView, tabsCurrent, noticeList } = toRefs(data);
|
|
|
|
|
|
/**
|
|
|
* @初始化
|
|
@@ -54,10 +54,24 @@ function tabsClick(e) {
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * @跳转
|
|
|
+ * @跳转相应类型系统
|
|
|
*/
|
|
|
function goContentDetails(e) {
|
|
|
- proxy.$tab.navigateTo(`/pages/common/textview/index?id=${e.id}`);
|
|
|
+ console.log(e)
|
|
|
+ if(e.infoType == 4){
|
|
|
+ proxy.$tab.navigateTo(`/pages/business/fireIot/alarmManage/alarmDetails/index?id=${e.id}`).then(() => {
|
|
|
+ if(!e.readFlag){
|
|
|
+ updateMceReceiveStatus({id:e.id})
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }else{
|
|
|
+ proxy.$tab.navigateTo(`/pages/common/textview/index?id=${e.id}`).then(() => {
|
|
|
+ if(!e.readFlag){
|
|
|
+ updateMceReceiveStatus({id:e.id})
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -67,12 +81,12 @@ function goContentDetails(e) {
|
|
|
function infoListApi() {
|
|
|
proxy.$modal.loading("加载中");
|
|
|
getMceList({
|
|
|
- current: 1,
|
|
|
- size: 10,
|
|
|
+ // current: 1,
|
|
|
+ // size: 10,
|
|
|
infoType: infoType.value
|
|
|
}).then((requset) => {
|
|
|
let data = requset.data.records
|
|
|
- let infoTypeList = stystemStore.infoList.static.infoTypeStatic
|
|
|
+ let infoTypeList = storage_msgType.get("msgType")?.infoTypeStatic
|
|
|
if (requset.status === "SUCCESS") {
|
|
|
for (let i = 0; i < data.length; i++) {
|
|
|
for (let j = 0; j < infoTypeList.length; j++) {
|
|
@@ -109,6 +123,7 @@ onLoad((options) => {
|
|
|
onReady(() => {});
|
|
|
|
|
|
onShow(() => {
|
|
|
+ init();
|
|
|
//调用系统主题颜色
|
|
|
proxy.$settingStore.systemThemeColor([1]);
|
|
|
});
|
|
@@ -131,7 +146,8 @@ onNavigationBarButtonTap((e) => {
|
|
|
|
|
|
.content-area {
|
|
|
&-center {
|
|
|
- margin: 0 10px 20px 10px;
|
|
|
+ margin: 14px 10px -2px;
|
|
|
+ width:calc(100% - 20px);
|
|
|
padding: 15px;
|
|
|
overflow: hidden;
|
|
|
position: relative;
|
|
@@ -149,12 +165,12 @@ onNavigationBarButtonTap((e) => {
|
|
|
white-space: nowrap; /* 确保文本在一行内显示 */
|
|
|
overflow: hidden; /* 隐藏超出容器的内容 */
|
|
|
text-overflow: ellipsis; /* 使用省略号表示被截断的文本 */
|
|
|
- width: 60%; /* 定义容器宽度 */
|
|
|
+ width: 40%; /* 定义容器宽度 */
|
|
|
}
|
|
|
&-time {
|
|
|
color: #909399;
|
|
|
float:right;
|
|
|
- margin-right:4px;
|
|
|
+ margin-right:14px;
|
|
|
margin-top:12px
|
|
|
}
|
|
|
&-cont {
|
|
@@ -165,7 +181,19 @@ onNavigationBarButtonTap((e) => {
|
|
|
text-overflow: ellipsis; /* 使用省略号表示被截断的文本 */
|
|
|
width: 100%; /* 定义容器宽度 */
|
|
|
}
|
|
|
+ &-status {
|
|
|
+ margin-top:16px;
|
|
|
+ text-align: right;
|
|
|
+ width: 100%;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+.list-cell::after{
|
|
|
+ position: absolute;
|
|
|
+}
|
|
|
+.list-cell-arrow::before{
|
|
|
+ top:66rpx;
|
|
|
+ position: absolute;
|
|
|
+}
|
|
|
</style>
|