|
@@ -34,12 +34,21 @@
|
|
|
v-show="noticeList.length > 0"
|
|
|
@click="goContentDetails(el)"
|
|
|
>
|
|
|
- <view style="width: 100%; max-width: 100%">
|
|
|
- <view class="content-area-center-title font16">{{ el.infoTitle }}</view>
|
|
|
- <view class="content-area-center-cont font14">{{ el.infoContent }}</view>
|
|
|
- </view>
|
|
|
- <view class="content-area-center-badge"><u-badge :isDot="el.readFlag == 0 ? true : false" type="error"></u-badge></view>
|
|
|
- <view class="content-area-center-time font14">{{ proxy.$time.jktTimes(el.createTime.replace("T", " ")) }}</view>
|
|
|
+
|
|
|
+ <uni-swipe-action style="width: 100%;" ref="swipeAction">
|
|
|
+ <uni-swipe-action-item :right-options="notice" @click="noticeDelete(el)">
|
|
|
+ <view style="display: flex; align-items: center;">
|
|
|
+ <view style="width: 82% !important;float:left;">
|
|
|
+ <view class="content-area-center-title font16">{{ el.infoTitle }}</view>
|
|
|
+ <rich-text :nodes="el.infoContent" class="content-area-center-cont font14"></rich-text>
|
|
|
+ </view>
|
|
|
+ <view class="sign">
|
|
|
+ <view class="badge"><u-badge :isDot="el.readFlag == 0 ? true : false" type="error"></u-badge></view>
|
|
|
+ <view class="time font14">{{ proxy.$time.jktTimes(el.createTime.replace("T", " ")) }}</view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </uni-swipe-action-item>
|
|
|
+ </uni-swipe-action>
|
|
|
</view>
|
|
|
</view>
|
|
|
</template>
|
|
@@ -51,7 +60,7 @@
|
|
|
import { onLoad, onShow, onReady, onHide, onLaunch, onUnload, onNavigationBarButtonTap, onPageScroll } from "@dcloudio/uni-app";
|
|
|
import { ref, reactive, computed, getCurrentInstance, toRefs, inject } from "vue";
|
|
|
/*----------------------------------接口引入-----------------------------------*/
|
|
|
-import { getMceList, updateMceReceiveStatus } from "@/api/mine/info.js";
|
|
|
+import { getMceList, updateMceReceiveStatus, mceDelete } from "@/api/mine/info.js";
|
|
|
import { projectApi } from "@/api/business/project.js";
|
|
|
|
|
|
/*----------------------------------组件引入-----------------------------------*/
|
|
@@ -71,9 +80,19 @@ const state = reactive({
|
|
|
typeName: "",
|
|
|
},
|
|
|
});
|
|
|
-
|
|
|
+const notice = ref([
|
|
|
+ {
|
|
|
+ text: '删除',
|
|
|
+ style: {
|
|
|
+ backgroundColor: '#FF0000',
|
|
|
+ },
|
|
|
+ icon: 'trash', // 如果库支持图标,可以这样设置
|
|
|
+ },
|
|
|
+])
|
|
|
+const swipeAction = ref(null);
|
|
|
const { scrollIntoView, noticeList } = toRefs(state);
|
|
|
|
|
|
+
|
|
|
/**
|
|
|
* @跳转相应类型系统
|
|
|
*/
|
|
@@ -95,7 +114,12 @@ function goContentDetails(e) {
|
|
|
proxy.$tab.navigateTo(`/pages/business/common/projectMange/record/details?reportId=${e.moduleId}`);
|
|
|
}
|
|
|
} else {
|
|
|
- proxy.$tab.navigateTo(`/pages/common/appMessage/details?contentId=${e.contentId}`).then(() => {});
|
|
|
+ //通知公告
|
|
|
+ if(e.infoType == 1){
|
|
|
+ proxy.$tab.navigateTo(`/pages/common/appMessage/nociteDetails?moduleId=${e.moduleId}`).then(() => {});
|
|
|
+ }else{
|
|
|
+ proxy.$tab.navigateTo(`/pages/common/appMessage/details?contentId=${e.contentId}`).then(() => {});
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
//是否已读
|
|
@@ -104,6 +128,18 @@ function goContentDetails(e) {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+function noticeDelete(e) {
|
|
|
+ mceDelete(e.contentId).then(() => {
|
|
|
+ for(let i=0;i<noticeList.value.length;i++){
|
|
|
+ if(noticeList.value[i].id == e.id){
|
|
|
+ swipeAction.value[i].closeAll()
|
|
|
+ noticeList.value.splice(i,1);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ proxy.$modal.msg("删除成功");
|
|
|
+ })
|
|
|
+}
|
|
|
+
|
|
|
/**
|
|
|
* @通知公告列表
|
|
|
* @api接口调用
|
|
@@ -201,12 +237,11 @@ onNavigationBarButtonTap((e) => {
|
|
|
font-weight: 600;
|
|
|
}
|
|
|
|
|
|
- &-center {
|
|
|
+ .content-area-center {
|
|
|
margin: 0;
|
|
|
padding: 15px;
|
|
|
overflow: hidden;
|
|
|
border-bottom: 1px solid #eaeef1;
|
|
|
-
|
|
|
&:nth-child(2) {
|
|
|
border-radius: 10px 10px 0 0;
|
|
|
}
|
|
@@ -229,14 +264,24 @@ onNavigationBarButtonTap((e) => {
|
|
|
&-cont {
|
|
|
color: #666666;
|
|
|
}
|
|
|
-
|
|
|
- &-badge {
|
|
|
- margin: auto 10px auto 0;
|
|
|
- }
|
|
|
-
|
|
|
- &-time {
|
|
|
- margin: auto 0.9375rem auto 0;
|
|
|
+ .sign{
|
|
|
+ width:18%;
|
|
|
+ margin-right:4%;
|
|
|
+ text-align: right;
|
|
|
+ .badge {
|
|
|
+ margin-right:6px;
|
|
|
+ display: inline-block;
|
|
|
+ }
|
|
|
+ .time {
|
|
|
+ display: inline-block;
|
|
|
+ }
|
|
|
}
|
|
|
+
|
|
|
}
|
|
|
}
|
|
|
</style>
|
|
|
+<style>
|
|
|
+.uni-swipe_button-text,.uni-swipe_button .button-hock{
|
|
|
+ font-size: 12px !important;
|
|
|
+}
|
|
|
+</style>
|