安全通知能能修改->企业公告,通知公告部分
parent
f80b00bd8c
commit
c36e88fba1
|
@ -1,4 +1,3 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectRootManager" version="2" default="true">
|
||||
<output url="file://$PROJECT_DIR$/classes" />
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// export var basePath = "http://192.168.0.42:8099/";
|
||||
export var basePath = "http://192.168.0.49:8091";
|
||||
export var basePath = "http://192.168.0.49:8093/";
|
||||
// export var basePath = "https://gateway.qhdsafety.com/";
|
||||
export const baseImgPath = "https://file.zcloudchina.com/YTHFile";
|
||||
export const adminPath = "http://192.168.0.18:8085";
|
||||
|
|
|
@ -24,7 +24,6 @@
|
|||
<view v-if="mesCount>0" class="cu-tag badge">{{mesCount}}</view>
|
||||
</view>
|
||||
<view :class="PageCur=='works'?'text-blue':'text-gray'">通知</view>
|
||||
|
||||
</view>
|
||||
<view class="action" @click="NavChange" data-cur="my">
|
||||
<view class='cuIcon-cu-image'>
|
||||
|
@ -166,7 +165,7 @@
|
|||
title: '请稍候'
|
||||
})
|
||||
uni.request({
|
||||
url: basePath + '/app/notice/getRedPoint',
|
||||
url: basePath + '/app/trafficNotice/getRedPoint',
|
||||
method: 'POST',
|
||||
dataType: 'json',
|
||||
header: {
|
||||
|
@ -177,7 +176,6 @@
|
|||
USER_ID:loginUser.USER_ID,
|
||||
},
|
||||
success: (res) => {
|
||||
|
||||
if("success" == res.data.result){
|
||||
uni.hideLoading();
|
||||
_this.mesCount = res.data.count;
|
||||
|
|
|
@ -189,7 +189,7 @@
|
|||
title: '请稍候'
|
||||
})
|
||||
uni.request({
|
||||
url: basePath + '/app/notice/listForCp',
|
||||
url: basePath + '/app/trafficNotice/getRedPoint',
|
||||
method: 'POST',
|
||||
dataType: 'json',
|
||||
header: {
|
||||
|
|
|
@ -41,7 +41,7 @@
|
|||
<scroll-view class="dy-scroll-nobg" scroll-y :style="'top:'+sTop+'px;height:calc(100vh - '+totalHeight+'px)'">
|
||||
<view v-if="list.length>0" >
|
||||
<view class="news-list">
|
||||
<view class="news-item" v-for="item in list" :key="item.NOTICE_ID" @click="$noMultipleClicks(goToDetail,item.NOTICE_ID)">
|
||||
<view class="news-item" v-for="item in pclist" :key="item.NOTIFICATION_ID" @click="$noMultipleClicks(goToPcDetail, item.NOTIFICATION_ID)">
|
||||
<view class="news-media-list">
|
||||
<!-- <image src="https://ossweb-img.qq.com/images/lol/web201310/skin/big10006.jpg" mode="aspectFill" class="news-media-logo"></image>-->
|
||||
<view class="news-media-body">
|
||||
|
@ -75,17 +75,17 @@
|
|||
<view class="news-item" v-for="item in pclist" :key="item.NOTICECORP_ID" >
|
||||
<view class="news-media-list">
|
||||
<view class="news-media-body">
|
||||
<view class="news-media-title" @click="$noMultipleClicks(goToPcDetail,item.NOTICECORPUSERID_ID)">
|
||||
{{item.SYNOPSIS}}
|
||||
<view class="news-media-title" @click="$noMultipleClicks(goToPcDetail,item.NOTIFICATION_ID)">
|
||||
{{item.LEVEL}}
|
||||
<text style="float:right;">
|
||||
<template v-if="item.TYPE=='0'">未读</template>
|
||||
<template v-else-if="item.TYPE=='1'">已读</template>
|
||||
</text>
|
||||
</view>
|
||||
<view class="news-media-text">
|
||||
<text>{{item.CREATTIME}}</text>
|
||||
<text>{{item.CREATETIME}}</text>
|
||||
<view v-if="item.TYPE=='1'" style="float:right;">
|
||||
<button class="cu-btn round bg-red" style="height:40upx;" @click="deleteNotice(item.NOTICECORPUSERID_ID)">删除</button>
|
||||
<button class="cu-btn round bg-red" style="height:40upx;" @click="deleteNotice(item.NOTIFICATION_ID)">删除</button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
@ -232,7 +232,7 @@
|
|||
title: '请稍候'
|
||||
})
|
||||
uni.request({
|
||||
url: basePath + '/app/notice/listForCp',
|
||||
url: basePath + '/app/trafficNotice/listForCp',
|
||||
method: 'POST',
|
||||
dataType: 'json',
|
||||
header: {
|
||||
|
@ -241,7 +241,7 @@
|
|||
data: {
|
||||
showCount : _this.showCount,
|
||||
currentPage : _this.currentPage,
|
||||
KEYWORDS:_this.KEYWORDS,
|
||||
KEYWORDS:_this.KEYWORDS,
|
||||
loginUserId :loginUserId,
|
||||
CORPINFO_ID:loginUser.CORPINFO_ID,
|
||||
USER_ID:loginUser.USER_ID,
|
||||
|
@ -285,14 +285,14 @@
|
|||
title: '处理中'
|
||||
})
|
||||
uni.request({
|
||||
url: basePath+'/app/notice/delete',
|
||||
url: basePath+'/app/trafficNotice/delete',
|
||||
method: 'POST',
|
||||
dataType: 'json',
|
||||
header: {
|
||||
'Content-type':'application/x-www-form-urlencoded'
|
||||
},
|
||||
data: {
|
||||
NOTICECORPUSERID_ID: ID
|
||||
NOTIFICATION_ID: ID
|
||||
},
|
||||
success: (res) => {
|
||||
uni.hideLoading();
|
||||
|
|
|
@ -6,24 +6,38 @@
|
|||
</cu-custom>
|
||||
<scroll-view scroll-y>
|
||||
<view class="message-warp">
|
||||
<view class="title">
|
||||
{{pd.SYNOPSIS}}
|
||||
</view>
|
||||
<view class="title">
|
||||
通知标题:
|
||||
</view>
|
||||
<view class="info">
|
||||
<!-- <text>双控平台</text>-->
|
||||
<text>{{pd.CREATTIME}}</text>
|
||||
</view>
|
||||
<view class="content">
|
||||
<rich-text :nodes="content"></rich-text>
|
||||
</view>
|
||||
<view class="message-warp" v-if="pd.FILEPATH">
|
||||
<view class="cu-item" @click="$noMultipleClicks(goStuToOpen,pd.FILEPATH)">
|
||||
<view class="content">
|
||||
<text class="cuIcon-read text-blue"></text>
|
||||
<text class="text-grey">附件</text>
|
||||
</view>
|
||||
</view>
|
||||
{{pd.TITLE}}
|
||||
</view>
|
||||
<view class="title">
|
||||
通知内容:
|
||||
</view>
|
||||
<view class="info">
|
||||
{{pd.NOTIFICATIONCONTENT}}
|
||||
</view>
|
||||
<view class="info">
|
||||
<text>{{pd.CREATETIME}}</text>
|
||||
</view>
|
||||
|
||||
<view class="message-warp" v-if="pd.VIDEO_ROUTE">
|
||||
<video :src="pd.VIDEO_ROUTE" controls="true"></video>
|
||||
</view>
|
||||
<view class="message-warp" v-if="pd.ATTACHMENT_ROUTE">
|
||||
<view class="cu-item" @click="$noMultipleClicks(goStuToOpen,pd.ATTACHMENT_ROUTE)">
|
||||
<view class="content">
|
||||
<text class="cuIcon-read text-blue"></text>
|
||||
<text class="text-grey">附件</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="pd.REPLYSTATUS === '1'">
|
||||
<view class="reply-title">回复内容</view>
|
||||
<input type="text" class="reply-input" v-model="replyContent" placeholder="请输入回复内容" />
|
||||
<button class="submit-btn" @click="confirmReply" v-show="pd.REPLYSTATUS === '1'">确定</button>
|
||||
</view>
|
||||
</view>
|
||||
<view class="cu-tabbar-height"></view>
|
||||
</scroll-view>
|
||||
|
@ -32,68 +46,133 @@
|
|||
|
||||
<script>
|
||||
import {
|
||||
basePath,loginUserId,corpinfoId,loginUser,baseImgPath
|
||||
basePath,loginUser,baseImgPath
|
||||
} from '@/common/tool.js';
|
||||
import HTMLParser from "@/components/html-parser.js"
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
id:'',
|
||||
id:'',
|
||||
content:'',
|
||||
pd:[],
|
||||
pd: {},
|
||||
type:'',
|
||||
noClick:true,
|
||||
isConfirmed: false,
|
||||
replyContent: '',
|
||||
}
|
||||
},
|
||||
onLoad(e){
|
||||
this.type =e.type;
|
||||
this.id=e.id;
|
||||
this.getData();
|
||||
this.sendEditRequest();
|
||||
this.markAsRead();
|
||||
console.log(e)
|
||||
},
|
||||
methods: {
|
||||
getData() {
|
||||
var _this = this;
|
||||
uni.showLoading({
|
||||
title: '请稍候'
|
||||
})
|
||||
var url = basePath + '/app/notice/goEdit'
|
||||
if("1"==_this.type){
|
||||
url = basePath + '/app/notice/goEditForPc'
|
||||
}
|
||||
console.log(_this.id)
|
||||
uni.request({
|
||||
url:url,
|
||||
method: 'POST',
|
||||
dataType: 'json',
|
||||
header: {
|
||||
'Content-type':'application/x-www-form-urlencoded'
|
||||
},
|
||||
data: {
|
||||
NOTICECORPUSERID_ID:_this.id,
|
||||
loginUserId:loginUserId,
|
||||
corpinfoId:corpinfoId,
|
||||
ISMAIN:loginUser.ISMAIN,
|
||||
CORPINFO_ID:loginUser.CORPINFO_ID,
|
||||
USER_ID:loginUser.USER_ID,
|
||||
},
|
||||
success: (res) => {
|
||||
if("success" == res.data.result){
|
||||
uni.hideLoading();
|
||||
_this.pd = res.data.pd;
|
||||
_this.content= new HTMLParser(res.data.pd.CONTENT.trim());
|
||||
var pages = getCurrentPages(); // 获取当前页面栈
|
||||
var prePage = pages[pages.length - 2]; // 上一个页面
|
||||
prePage.$vm.initflag = true; // A 页面 init方法 为true
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: res.data.message,
|
||||
duration: 2000
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
confirmReply() {
|
||||
this.isConfirmed = true;
|
||||
this.sendEditRequest();
|
||||
},
|
||||
getData() {
|
||||
var _this = this;
|
||||
uni.showLoading({
|
||||
title: '请稍候'
|
||||
});
|
||||
|
||||
var requestData = {
|
||||
NOTIFICATION_ID: _this.id,
|
||||
USER_ID: loginUser.USER_ID,
|
||||
};
|
||||
|
||||
uni.request({
|
||||
url: basePath + '/app/trafficNotice/listForCp',
|
||||
method: 'POST',
|
||||
dataType: 'json',
|
||||
header: {
|
||||
'Content-type': 'application/x-www-form-urlencoded'
|
||||
},
|
||||
data: requestData,
|
||||
success: (res) => {
|
||||
if ("success" == res.data.result && res.data.varList && res.data.varList.length > 0) {
|
||||
_this.pd = res.data.varList[0];
|
||||
_this.content = new HTMLParser(_this.pd.NOTIFICATIONCONTENT.trim());
|
||||
if (_this.pd.REPLYCONTENT && _this.pd.REPLYCONTENT.trim() !== '') {
|
||||
_this.replyContent = _this.pd.REPLYCONTENT;
|
||||
}
|
||||
uni.hideLoading();
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: '数据加载失败',
|
||||
duration: 2000
|
||||
});
|
||||
uni.hideLoading();
|
||||
}
|
||||
},
|
||||
fail: () => {
|
||||
uni.showToast({
|
||||
title: '请求失败',
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
});
|
||||
uni.hideLoading();
|
||||
}
|
||||
});
|
||||
},
|
||||
markAsRead() {
|
||||
const _this = this;
|
||||
uni.request({
|
||||
url: basePath + '/app/trafficNotice/edit',
|
||||
method: 'POST',
|
||||
header: {
|
||||
'Content-Type': 'application/x-www-form-urlencoded'
|
||||
},
|
||||
data: {
|
||||
NOTIFICATION_ID: _this.id,
|
||||
USER_ID: loginUser.USER_ID,
|
||||
TYPE: _this.type,
|
||||
},
|
||||
});
|
||||
},
|
||||
sendEditRequest() {
|
||||
if (!this.isConfirmed) {
|
||||
return;
|
||||
}
|
||||
var _this = this;
|
||||
var requestData = {
|
||||
NOTIFICATION_ID: _this.id,
|
||||
USER_ID: loginUser.USER_ID,
|
||||
REPLYCONTENT: _this.replyContent
|
||||
};
|
||||
if (!_this.replyContent) {
|
||||
uni.showToast({
|
||||
title: '回复内容不能为空',
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
});
|
||||
return;
|
||||
}
|
||||
uni.request({
|
||||
url: basePath + '/app/trafficNotice/edit',
|
||||
method: 'POST',
|
||||
dataType: 'json',
|
||||
header: {
|
||||
'Content-type': 'application/x-www-form-urlencoded'
|
||||
},
|
||||
data: requestData,
|
||||
success: (res) => {
|
||||
if (res.data.result === "success") {
|
||||
uni.showToast({
|
||||
title: '回复成功',
|
||||
duration: 2000
|
||||
});
|
||||
_this.replyContent = ''; // 清空回复内容
|
||||
this.isConfirmed = false; // 重置确认状态
|
||||
}
|
||||
},
|
||||
});
|
||||
},
|
||||
|
||||
goStuToOpen(e) {
|
||||
var url=baseImgPath + e ;
|
||||
var url2 = encodeURI(url);
|
||||
|
@ -113,7 +192,31 @@
|
|||
font-size: 34upx;
|
||||
margin-bottom: 20upx;
|
||||
}
|
||||
|
||||
.submit-btn {
|
||||
background-color: #007AFF; /* 蓝色背景 */
|
||||
color: white; /* 白色文字 */
|
||||
border: none; /* 无边框 */
|
||||
padding: 5upx 10upx; /* 内边距 */
|
||||
font-size: 18upx; /* 字体大小 */
|
||||
margin-top: 10upx; /* 上边距 */
|
||||
border-radius: 5upx; /* 圆角 */
|
||||
width: auto; /* 修改处:宽度自动,取决于内容和内边距 */
|
||||
max-width: 100upx; /* 修改处:最大宽度,可以根据需要调整 */
|
||||
display: block; /* 块级元素 */
|
||||
margin-left: auto; /* 水平居中 */
|
||||
margin-right: auto; /* 水平居中 */
|
||||
}
|
||||
.reply-input {
|
||||
box-sizing: border-box;
|
||||
border: 1px solid #dcdfe6; /* 设置边框颜色和宽度 */
|
||||
border-radius: 4px; /* 轻微圆角效果 */
|
||||
padding: 10px; /* 设置一些内边距*/
|
||||
font-size: 16px; /* 设置适当的字体大小 */
|
||||
color: #606266; /* 设置字体颜色 */
|
||||
margin: 10px 0; /* 设置上下外边距 */
|
||||
width: 100%; /* 宽度设置为100% */
|
||||
height: 40px; /* 设置一个固定的高度 */
|
||||
}
|
||||
.info {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
|
|
Loading…
Reference in New Issue