|
|
@@ -78,20 +78,20 @@
|
|
|
border
|
|
|
style="width: 100%"
|
|
|
>
|
|
|
- <el-table-column label="缩略图" width="160">
|
|
|
- <template #default>
|
|
|
+ <el-table-column label="缩略图" width="160" v-if="this.resource==='img'">
|
|
|
+ <template #default='{row}'>
|
|
|
<div class="smimg">
|
|
|
- <img src="../../assets/img/user.png" alt="" />
|
|
|
+ <img :src="baseURL+row.filePath" alt="" />
|
|
|
</div>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column prop="name" label="附件名称" width="160"> </el-table-column>
|
|
|
- <el-table-column prop="address" label="附件说明" ></el-table-column>
|
|
|
- <el-table-column prop="name" label="上传人" width="160"> </el-table-column>
|
|
|
- <el-table-column prop="name" label="上传时间" width="160"> </el-table-column>
|
|
|
- <el-table-column label="操作" width="160">
|
|
|
- <template #default>
|
|
|
- <a href="/">下 载</a>
|
|
|
+ <el-table-column prop="name" label="附件名称" > </el-table-column>
|
|
|
+ <!-- <el-table-column prop="address" label="附件说明" ></el-table-column> -->
|
|
|
+ <!-- <el-table-column prop="name" label="上传人" width="360"> </el-table-column> -->
|
|
|
+ <el-table-column prop="updateTime" label="上传时间" width="360"> </el-table-column>
|
|
|
+ <el-table-column label="操作" width="360">
|
|
|
+ <template #default='{row}'>
|
|
|
+ <a :href="baseURL+row.filePath" download target='_blank' class="mydown" >下 载</a>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
@@ -107,6 +107,7 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
+import { getFileList } from '../../apis/holding'
|
|
|
import axios from '@/utils/request'
|
|
|
import TabList from '@/components/tabLeft.vue'
|
|
|
export default {
|
|
|
@@ -124,21 +125,33 @@ export default {
|
|
|
],
|
|
|
resource: 'video',
|
|
|
affix: [
|
|
|
- { label: '模型', value: 'model' },
|
|
|
- { label: '视频', value: 'video' },
|
|
|
- { label: '图片', value: 'img' },
|
|
|
- { label: '音频', value: 'audio' },
|
|
|
- { label: '文档', value: 'doc' }
|
|
|
+ { label: '高清图片', value: 'img' },
|
|
|
+ { label: '视频文件', value: 'video' },
|
|
|
+ { label: '音频文件', value: 'audio' },
|
|
|
+ { label: '三维模型', value: 'model' },
|
|
|
+ { label: '文档资料', value: 'doc' }
|
|
|
]
|
|
|
}
|
|
|
},
|
|
|
// 监听属性 类似于data概念
|
|
|
computed: {},
|
|
|
// 监控data中的数据变化
|
|
|
- watch: {},
|
|
|
+ watch: {
|
|
|
+ resource () {
|
|
|
+ this.getFileList()
|
|
|
+ }
|
|
|
+ },
|
|
|
// 方法集合
|
|
|
methods: {
|
|
|
-
|
|
|
+ // 获取附件列表
|
|
|
+ async getFileList () {
|
|
|
+ const res = await getFileList(this.myObj.id, this.resource)
|
|
|
+ // console.log(666, res)
|
|
|
+ this.tableData = res.data
|
|
|
+ this.tableData.forEach(v => {
|
|
|
+ v.updateTime = v.updateTime.slice(0, 10)
|
|
|
+ })
|
|
|
+ }
|
|
|
},
|
|
|
// 生命周期 - 创建完成(可以访问当前this实例)
|
|
|
created () {
|
|
|
@@ -149,6 +162,8 @@ export default {
|
|
|
mounted () {
|
|
|
// 拿到路由跳转传过来的数据
|
|
|
this.myObj = this.$route.query
|
|
|
+ // 调用获取附件方法
|
|
|
+ this.getFileList()
|
|
|
},
|
|
|
beforeCreate () {}, // 生命周期 - 创建之前
|
|
|
beforeMount () {}, // 生命周期 - 挂载之前
|
|
|
@@ -163,8 +178,14 @@ export default {
|
|
|
body {
|
|
|
overflow: auto;
|
|
|
}
|
|
|
+body .el-table::before {
|
|
|
+ z-index: inherit;
|
|
|
+}
|
|
|
//@import url(); 引入公共css类
|
|
|
.holding3_look {
|
|
|
+ .mydown {
|
|
|
+ color: #40a9ff;
|
|
|
+ }
|
|
|
/deep/#mytitle > span {
|
|
|
font-weight: 800;
|
|
|
}
|
|
|
@@ -193,7 +214,7 @@ body {
|
|
|
padding: 10px 0 0 40px;
|
|
|
.conten_left {
|
|
|
width: 465px;
|
|
|
- height: 500px;
|
|
|
+ height: 400px;
|
|
|
background-color: #fafafa;
|
|
|
display: flex;
|
|
|
align-items: center;
|
|
|
@@ -205,11 +226,11 @@ body {
|
|
|
}
|
|
|
.conten_right {
|
|
|
flex: 1;
|
|
|
- height: 500px;
|
|
|
+ height: 400px;
|
|
|
.title {
|
|
|
display: flex;
|
|
|
border-bottom: 2px solid #ccc;
|
|
|
- height: 50px;
|
|
|
+ height: 40px;
|
|
|
align-items: center;
|
|
|
margin: 0 20px;
|
|
|
h3 {
|
|
|
@@ -252,15 +273,20 @@ body {
|
|
|
}
|
|
|
.conten_bot {
|
|
|
position: relative;
|
|
|
+
|
|
|
.btn{
|
|
|
position: absolute;
|
|
|
left: 50%;
|
|
|
transform: translateX(-50%);
|
|
|
- bottom: 12px;
|
|
|
+ bottom: -45px;
|
|
|
}
|
|
|
height: 250px;
|
|
|
width: 100%;
|
|
|
.resource {
|
|
|
+ /deep/.el-table{
|
|
|
+ max-height: 190px;
|
|
|
+ overflow: auto;
|
|
|
+ }
|
|
|
.smimg{
|
|
|
text-align: center;
|
|
|
height: 40px;
|
|
|
@@ -269,7 +295,8 @@ body {
|
|
|
height: 40px;
|
|
|
}
|
|
|
}
|
|
|
- height: 174px;
|
|
|
+ max-height: 250px;
|
|
|
+ // overflow: auto;
|
|
|
width: 97%;
|
|
|
max-width: 1580px;
|
|
|
border: 1px solid #ccc;
|