|
@@ -10,17 +10,17 @@
|
|
</uni-row>
|
|
</uni-row>
|
|
</view>
|
|
</view>
|
|
<view class="" v-if="tableData.length>0 && isLoaded">
|
|
<view class="" v-if="tableData.length>0 && isLoaded">
|
|
- <uni-card v-for="(item, index) in tableData" :key="index" @click.native="onNoticeClick(item)">
|
|
|
|
- <view class="titles">{{item.title}}</view>
|
|
|
|
|
|
+ <uni-card v-for="(item, index) in tableData" :key="index">
|
|
|
|
+ <view class="titles">{{item.remind_title}}</view>
|
|
<view style="float: left;">重要提醒内容:</view>
|
|
<view style="float: left;">重要提醒内容:</view>
|
|
<!-- <text class="conts">{{item.taskContent}}</text> -->
|
|
<!-- <text class="conts">{{item.taskContent}}</text> -->
|
|
- <rich-text :nodes="item.content?item.content:''" class="font-12"></rich-text>
|
|
|
|
- <view style="float: left;">发布日期:{{item}}</view>
|
|
|
|
|
|
+ <rich-text :nodes="item.remind_content?item.remind_content:''" class="font-12"></rich-text>
|
|
|
|
+ <view style="float: left;">发布日期:{{item.pubDate}}</view>
|
|
<view class="an-niu">
|
|
<view class="an-niu">
|
|
- <view class="an-niu-street" @click.native="uploadButton" link>
|
|
|
|
- <text class="bianji">上传</text>
|
|
|
|
|
|
+ <view class="an-niu-street" @click.native="uploadButton(item)" link>
|
|
|
|
+ <text class="bianji" v-if="item.is_done==0">上传</text>
|
|
</view>
|
|
</view>
|
|
- <text @click="isRead" class="detail isread">已阅</text>
|
|
|
|
|
|
+ <text @click="isRead(item)" class="detail isread " v-if="item.is_read==0&&item.is_done==0">已阅</text>
|
|
<text @click.native="onNoticeClick(item)" class="detail">查看详情</text>
|
|
<text @click.native="onNoticeClick(item)" class="detail">查看详情</text>
|
|
</view>
|
|
</view>
|
|
</uni-card>
|
|
</uni-card>
|
|
@@ -61,25 +61,27 @@
|
|
</u-list-item>
|
|
</u-list-item>
|
|
</u-list> -->
|
|
</u-list> -->
|
|
<tarBar :totarBer='tar'></tarBar>
|
|
<tarBar :totarBer='tar'></tarBar>
|
|
- <u-popup :show="showDel" title="完成提醒" mode="center">
|
|
|
|
- <view style="width: 400rpx;height: 200rpx;margin: 20rpx 20rpx;">
|
|
|
|
- <view>完成描述</view>
|
|
|
|
- <u--textarea v-model="eventContent" placeholder="请输入内容" :disabled="isview" :maxlength="1000" count
|
|
|
|
|
|
+ <u-popup :show="showComplete" title="完成提醒" mode="center">
|
|
|
|
+ <view style="width:550rpx;height: 900rpx;margin: 20rpx 20rpx;position: relative;overflow-y: auto;">
|
|
|
|
+ <view class="titles-popup">完成描述:</view>
|
|
|
|
+ <u--textarea v-model="formData.donetext" placeholder="请输入内容" :maxlength="500" count
|
|
height="150">
|
|
height="150">
|
|
- <view class="">
|
|
|
|
- 附件上传
|
|
|
|
- </view>
|
|
|
|
- <uni-file-picker v-model="formData.attId" del-icon limit="5" auto-upload file-mediatype="all"
|
|
|
|
- @select="selectFile" @delete="deleteFile">
|
|
|
|
- <button type="primary" class="selectBtn">选择文件</button>
|
|
|
|
- <!-- 加载中 -->
|
|
|
|
- <isLodingModel v-if="loading"></isLodingModel>
|
|
|
|
- </uni-file-picker>
|
|
|
|
</u--textarea>
|
|
</u--textarea>
|
|
- <view style="display: flex;justify-content: space-around;align-items: center;margin-top: 40rpx;">
|
|
|
|
- <button class="antherBtn" @click="makeSureDel" style="background-color: red;">确认</button>
|
|
|
|
- <button class="antherBtn" @click="showDel = false">取消</button>
|
|
|
|
|
|
+ <view class="titles-popup">
|
|
|
|
+ 附件上传:
|
|
</view>
|
|
</view>
|
|
|
|
+ <uni-file-picker v-model="formData.fileUrls" del-icon limit="5" file-mediatype="all"
|
|
|
|
+ @select="selectFile" @delete="deleteFile">
|
|
|
|
+ <button type="primary" class="selectBtn">选择文件</button>
|
|
|
|
+ <!-- 加载中 -->
|
|
|
|
+ <isLodingModel v-if="loading"></isLodingModel>
|
|
|
|
+ </uni-file-picker>
|
|
|
|
+ <view style="position:absolute;bottom:20px;width: 100%;">
|
|
|
|
+ <view style="display: flex;justify-content: space-around;align-items: center;width: 100%;">
|
|
|
|
+ <button class="antherBtn" @click="makeSure" style="background-color: #4cb2b6;color: #fff;">确认</button>
|
|
|
|
+ <button class="antherBtn" @click="showComplete = false">取消</button>
|
|
|
|
+ </view>
|
|
|
|
+ </view>
|
|
</view>
|
|
</view>
|
|
</u-popup>
|
|
</u-popup>
|
|
<!-- 加载中 -->
|
|
<!-- 加载中 -->
|
|
@@ -89,13 +91,18 @@
|
|
<script>
|
|
<script>
|
|
import tarBar from '@/components/tabBar/index' //先把tabBar.vue组件导入
|
|
import tarBar from '@/components/tabBar/index' //先把tabBar.vue组件导入
|
|
import {
|
|
import {
|
|
- getRemindBroadPage, // 通知公告列表
|
|
|
|
|
|
+ getRemindBroadPage,// 重要通知列表
|
|
|
|
+ setisread,//是否已阅
|
|
|
|
+ remindBroadFinish
|
|
} from "@/api/remind";
|
|
} from "@/api/remind";
|
|
import {
|
|
import {
|
|
- uploadFile
|
|
|
|
|
|
+ uploadFileComp
|
|
} from '@/utils/common.js';
|
|
} from '@/utils/common.js';
|
|
|
|
+ import {
|
|
|
|
+ parseTime // 时间戳转换
|
|
|
|
+ } from '@/utils/ruoyi';
|
|
|
|
+ import config from '@/config'
|
|
let that = null;
|
|
let that = null;
|
|
- import config from '@/config'
|
|
|
|
const baseUrlImg = config.baseUrlImg
|
|
const baseUrlImg = config.baseUrlImg
|
|
export default {
|
|
export default {
|
|
components: {
|
|
components: {
|
|
@@ -123,11 +130,16 @@
|
|
ids: '0',
|
|
ids: '0',
|
|
title: '1',
|
|
title: '1',
|
|
tan90: `${baseUrlImg}/tan90.png`,
|
|
tan90: `${baseUrlImg}/tan90.png`,
|
|
- eventContent: '', //上传描述内容
|
|
|
|
- fileUrls: [], //上传附件
|
|
|
|
formData: {
|
|
formData: {
|
|
- attId: []
|
|
|
|
|
|
+ fileUrls: [],
|
|
|
|
+ donetext: '', //上传描述内容
|
|
|
|
+ doneDate:'',//完成时间
|
|
|
|
+ attId:[],
|
|
|
|
+ broadId:null,
|
|
|
|
+ broadType:null
|
|
|
|
+
|
|
},
|
|
},
|
|
|
|
+ showComplete:false
|
|
}
|
|
}
|
|
},
|
|
},
|
|
// 在 vue页面,向起始页通过事件传递数据
|
|
// 在 vue页面,向起始页通过事件传递数据
|
|
@@ -157,44 +169,91 @@
|
|
// 获取数据
|
|
// 获取数据
|
|
getData(pageNo, value = '') {
|
|
getData(pageNo, value = '') {
|
|
this.loading = true
|
|
this.loading = true
|
|
|
|
+ this.tableData = [];
|
|
this.pageNo = pageNo
|
|
this.pageNo = pageNo
|
|
- const deptId = uni.getStorageSync('getUserInfo_key')?.streetInfo?.id;
|
|
|
|
|
|
+ const deptId = uni.getStorageSync('getUserInfo_key')?.streetInfo?uni.getStorageSync('getUserInfo_key').streetInfo.id:uni.getStorageSync('getUserInfo_key').userInfo.deptId;
|
|
const userId = uni.getStorageSync('getUserInfo_key')?.userInfo?.id;
|
|
const userId = uni.getStorageSync('getUserInfo_key')?.userInfo?.id;
|
|
getRemindBroadPage({
|
|
getRemindBroadPage({
|
|
pageNo: this.pageNo,
|
|
pageNo: this.pageNo,
|
|
pageSize: 10,
|
|
pageSize: 10,
|
|
reciver: deptId,
|
|
reciver: deptId,
|
|
- userId: userId
|
|
|
|
|
|
+ userId: userId,
|
|
|
|
+ remindTitle:this.keyword
|
|
}).then(response => {
|
|
}).then(response => {
|
|
this.isLoaded = true
|
|
this.isLoaded = true
|
|
|
|
+ response.data.records.forEach(item=>{
|
|
|
|
+ item.pubDate = parseTime(item.pub_date,"{y}-{m}-{d}")
|
|
|
|
+ })
|
|
// 为数据赋值:通过展开运算符的形式,进行新旧数据的拼接
|
|
// 为数据赋值:通过展开运算符的形式,进行新旧数据的拼接
|
|
- this.tableData = [...this.tableData, ...response.data.list]
|
|
|
|
|
|
+ this.tableData = [...this.tableData, ...response.data.records]
|
|
// this.tableData = response.data.list;
|
|
// this.tableData = response.data.list;
|
|
this.total = response.data.total;
|
|
this.total = response.data.total;
|
|
this.loading = false;
|
|
this.loading = false;
|
|
});
|
|
});
|
|
},
|
|
},
|
|
|
|
+ isRead(item){
|
|
|
|
+ const arr = [];
|
|
|
|
+ arr[0]=item.broad_id
|
|
|
|
+ setisread({broadIds:arr}).then(res=>{
|
|
|
|
+ this.getData(1);
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+
|
|
|
|
+ uploadButton(item){
|
|
|
|
+ this.showComplete=true;
|
|
|
|
+ this.formData.attId = [];
|
|
|
|
+ this.formData.broadId = item.broad_id;
|
|
|
|
+ this.formData.broadType = item.broad_type
|
|
|
|
+ this.formData.fileUrls=[];
|
|
|
|
+ this.formData.donetext = ''
|
|
|
|
+ },
|
|
// 移出图片函数
|
|
// 移出图片函数
|
|
async deleteFile(e) {
|
|
async deleteFile(e) {
|
|
- this.formData.attId = [];
|
|
|
|
|
|
+ this.formData.attId.forEach((item,index)=>{
|
|
|
|
+ console.log(e.tempFilePath,'-------------');
|
|
|
|
+ if(item.id==e.tempFilePath){
|
|
|
|
+ this.formData.attId.splice(index, 1);
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ // this.formData.fileUrls = [];
|
|
},
|
|
},
|
|
selectFile(e) {
|
|
selectFile(e) {
|
|
|
|
+ console.log(e.tempFilePaths,'e.tempFilePaths');
|
|
let promises = [];
|
|
let promises = [];
|
|
for (let i = 0; i < e.tempFilePaths.length; i++) {
|
|
for (let i = 0; i < e.tempFilePaths.length; i++) {
|
|
- const promise = uploadFile(e.tempFilePaths, i, this);
|
|
|
|
- promises.push(promise);
|
|
|
|
|
|
+ const promise2 = uploadFileComp(e.tempFilePaths, i, this,this.formData.attId.length);
|
|
|
|
+ this.$forceUpdate()
|
|
|
|
+ promises.push(promise2);
|
|
}
|
|
}
|
|
Promise.all(promises).then(result => {
|
|
Promise.all(promises).then(result => {
|
|
|
|
+ console.log(result,'result====');
|
|
// 处理上传文件成功的结果
|
|
// 处理上传文件成功的结果
|
|
}).catch(error => {
|
|
}).catch(error => {
|
|
// 处理上传文件失败的错误
|
|
// 处理上传文件失败的错误
|
|
});
|
|
});
|
|
},
|
|
},
|
|
|
|
+ //上传文件点击确认
|
|
|
|
+ makeSure(){
|
|
|
|
+ this.formData.doneDate = parseTime(new Date(),"{y}-{m}-{d}");
|
|
|
|
+ this.formData.attId.forEach(item=>{
|
|
|
|
+ this.formData.fileUrls.push(item.path)
|
|
|
|
+ })
|
|
|
|
+ console.log('sdfsf',this.formData);
|
|
|
|
+ remindBroadFinish(this.formData).then(res=>{
|
|
|
|
+ this.$modal.msgSuccess('上传成功');
|
|
|
|
+ this.showComplete=false;
|
|
|
|
+ }).catch(err=>{
|
|
|
|
+ this.$modal.msgSuccess('上传失败');
|
|
|
|
+ this.showComplete=false;
|
|
|
|
+ })
|
|
|
|
+ this.getData()
|
|
|
|
+ },
|
|
// 单个公告详情点击事件
|
|
// 单个公告详情点击事件
|
|
onNoticeClick(val) {
|
|
onNoticeClick(val) {
|
|
this.isLoaded = false
|
|
this.isLoaded = false
|
|
uni.navigateTo({
|
|
uni.navigateTo({
|
|
- url: `/pagesA/fire/remind/details/details?id=${val.id}`,
|
|
|
|
|
|
+ url: `/pagesA/fire/remind/details/details?id=${val.broad_id}`,
|
|
success: function(res) {
|
|
success: function(res) {
|
|
// 通过eventChannel向被打开页面传送数据
|
|
// 通过eventChannel向被打开页面传送数据
|
|
res.eventChannel.emit('acceptDataFromOpenerPage', val)
|
|
res.eventChannel.emit('acceptDataFromOpenerPage', val)
|
|
@@ -277,4 +336,20 @@
|
|
-webkit-line-clamp: 1;
|
|
-webkit-line-clamp: 1;
|
|
overflow: hidden;
|
|
overflow: hidden;
|
|
}
|
|
}
|
|
|
|
+ .selectBtn {
|
|
|
|
+ width: 200rpx;
|
|
|
|
+ margin-left: 0;
|
|
|
|
+ font-size: 30rpx;
|
|
|
|
+ background-color: #4cb2b6;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ .titles-popup{
|
|
|
|
+ margin: 10px 10px;
|
|
|
|
+ font-weight: 600;
|
|
|
|
+ font-size: 14px;
|
|
|
|
+ }
|
|
|
|
+ ::v-deep .uni-file-picker__lists{
|
|
|
|
+ height: 200rpx;
|
|
|
|
+ overflow-y: auto;
|
|
|
|
+ }
|
|
</style>
|
|
</style>
|