资料网员

This commit is contained in:
fengachen
2021-10-13 09:55:05 +08:00
parent 491caf06a3
commit 700767c578
5 changed files with 53 additions and 7 deletions
+5 -1
View File
@@ -839,6 +839,10 @@ color: #2A2A2A;
.form-item .count{
background-color: #aaa;
}
.color-green {
color: #069F99;
}
.no-data{
width: 100%;
height:200px;
@@ -846,4 +850,4 @@ color: #2A2A2A;
justify-content: center;
align-items: center;
color: #999;
}
}
+31 -1
View File
@@ -1,3 +1,4 @@
import MeetingApi from '../js/http/meetingApi'
/**
* 预览文件的方法
* @param fileId 文件id
@@ -5,8 +6,8 @@
*/
// 文件下载的地址 后期上线需要修改地址
const downFileUrl = `http://localhost:3000/jero-boot/sys/common/download/`
// 预览
export function previewFile(fileId,fileName) {
@@ -50,3 +51,32 @@ export function previewFile(fileId,fileName) {
// 截取文件类型
return fileName.slice(index+1)
}
// 通过文件id获取文件的相关信息
export function getFileInfo(id) {
return new Promise(resolve => {
let result = {}
MeetingApi.queryFileInfoById({ id: id }).then(res => {
if (res.success) {
result = res.result
}
}).finally(() => {
resolve(result)
})
})
}
// 获取一个或多个文件信息
export async function initFileList(fileIds) {
if (fileIds) {
const fileList = []
let arr = fileIds.split(',')
for (let i = 0; i < arr.length; i++) {
let fileObj = {}
fileObj = await getFileInfo(arr[i])
fileList.push({ id: fileObj.id, name: fileObj.fileName })
}
return fileList
} else{
return []
}
}
@@ -76,11 +76,10 @@ Page({
fileList.push({ id: fileObj.id, name: fileObj.fileName })
}
return fileList
}
}
},
// 预览
previewFile(e) {
console.log(e);
const fileObj = e.currentTarget.dataset.file
previewFile(fileObj.id,fileObj.name)
},
@@ -94,7 +93,7 @@ Page({
this.setData({
meetingInfo:meetingInfo
})
//
//
let {meetingFiles,meetingData} = meetingInfo
// 获取参会人信息
this.queryPeronInfo(meetingInfo.id)
@@ -163,4 +162,4 @@ Page({
onShareAppMessage: function () {
}
})
})
+1 -1
View File
@@ -152,4 +152,4 @@ Page({
this.data.pageNo++
this.loadData()
},
})
})
+13
View File
@@ -71,6 +71,19 @@ page {
justify-content: space-between;
align-items: center;
}
/* 字体颜色 */
.color-gray {
color:#999
}
.color-green {
color:#069F99
}
.color-orange {
color: orange;
}
.half{
color: burlywood;
}