| | |
| | | <!-- 表格和分页 --> |
| | | <template v-slot:table-wrap> |
| | | <ul class="toolbar" v-permissions="['business:news:create', 'business:news:delete']"> |
| | | <li><el-button type="primary" @click="$refs.operaNewsWindow.open('新建资讯和定制服务信息表')" icon="el-icon-plus" v-permissions="['business:news:create']">新建</el-button></li> |
| | | <li><el-button type="primary" @click="$refs.operaNewsWindow.open('新建推广资讯')" icon="el-icon-plus" v-permissions="['business:news:create']">新建</el-button></li> |
| | | <li><el-button @click="deleteByIdInBatch" icon="el-icon-delete" v-permissions="['business:news:delete']">删除</el-button></li> |
| | | </ul> |
| | | <el-table |
| | |
| | | @selection-change="handleSelectionChange" |
| | | > |
| | | <el-table-column type="selection" width="55"></el-table-column> |
| | | <el-table-column prop="title" label="标题" min-width="100px"></el-table-column> |
| | | <el-table-column prop="subTitle" label="副标题" min-width="100px"></el-table-column> |
| | | <el-table-column prop="linkType" label="跳转类型" min-width="100px"> |
| | | <el-table-column prop="title" label="文案" fixed min-width="300px"></el-table-column> |
| | | <el-table-column prop="fileList" label="附件" align="center" fixed min-width="250px">> |
| | | <template slot-scope="{row}"> |
| | | <span v-if="row.linkType ==0">富文本</span> |
| | | <span v-if="row.linkType ==1">外链</span> |
| | | <div v-if="row.fileType!=1 && row.fileList!=null && row.fileList.length" class="image-container"> |
| | | <div v-for="(item) in row.fileList" :key="item.id" > |
| | | <el-image |
| | | v-if="item.fileurlFull && item.type !=1" |
| | | class="image-item" |
| | | :src="item.fileurlFull" |
| | | fit="fill" |
| | | :preview-src-list="[item.fileurlFull]"> |
| | | </el-image> |
| | | </div> |
| | | </div> |
| | | <div v-if="row.fileType == 1 && row.fileList!=null && row.fileList.length" class="image-container"> |
| | | <video v-if="row.fileList[0].fileurlFull" style="width: 60px;height: 60px" controls autoplay :src="row.fileList[0].fileurlFull"></video> |
| | | </div> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="status" label="状态" min-width="100px"> |
| | | <el-table-column prop="publishDate" label="发布时间" min-width="150px"></el-table-column> |
| | | <el-table-column prop="status" label="状态" min-width="80px"> |
| | | <template slot-scope="{row}"> |
| | | <span v-if="row.status ==1">不展示</span> |
| | | <span v-if="row.status ==0">展示</span> |
| | | <span v-if="row.status ==1" style="color:red;">不展示</span> |
| | | <span v-if="row.status ==0" style="color:green;">展示</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="publishInfo" label="发布备注" min-width="150px"></el-table-column> |
| | | <el-table-column prop="lookNum" label="浏览量" min-width="80px"></el-table-column> |
| | | <el-table-column prop="donwloadNum" label="下载量" min-width="80px"></el-table-column> |
| | | <el-table-column prop="sortnum" label="排序码" min-width="100px"></el-table-column> |
| | | <el-table-column prop="remark" label="备注" min-width="100px"></el-table-column> |
| | | <el-table-column prop="sortnum" label="排序码" min-width="80px"></el-table-column> |
| | | <el-table-column prop="editorName" label="操作人" min-width="100px"></el-table-column> |
| | | <el-table-column prop="editDate" label="操作时间" min-width="100px"></el-table-column> |
| | | <el-table-column prop="publishDate" label="最近发布时间" min-width="100px"></el-table-column> |
| | | <el-table-column prop="publishUserName" label="最近发布人" min-width="100px"></el-table-column> |
| | | <el-table-column prop="publishInfo" label="最近发布备注" min-width="100px"></el-table-column> |
| | | <el-table-column prop="editDate" label="操作时间" min-width="150px"></el-table-column> |
| | | <el-table-column |
| | | v-if="containPermissions(['business:news:update', 'business:news:delete'])" |
| | | label="操作" |
| | |
| | | fixed="right" |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <el-button type="text" @click="$refs.operaNewsWindow.open('编辑资讯和定制服务信息表', row)" icon="el-icon-edit" v-permissions="['business:news:update']">编辑</el-button> |
| | | <el-button type="text" @click="$refs.operaNewsWindow.open('编辑推广资讯', row)" icon="el-icon-edit" v-permissions="['business:news:update']">编辑</el-button> |
| | | <el-button type="text" @click="deleteById(row)" icon="el-icon-delete" v-permissions="['business:news:delete']">删除</el-button> |
| | | </template> |
| | | </el-table-column> |
| | |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .image-container { |
| | | display: flex; /* 设定为 Flexbox 布局 */ |
| | | flex-wrap: wrap; /* 允许换行 */ |
| | | justify-content: center; /* 水平方向上的间隔分布 */ |
| | | align-items: flex-start; /* 垂直方向上的项目对齐 */ |
| | | } |
| | | |
| | | .image-item { |
| | | height: 60px; |
| | | width: 60px; |
| | | margin-right: 10px; /* 右边距,使得图片之间有间隔 */ |
| | | margin-bottom: 10px; /* 底部边距,使得图片能够换行 */ |
| | | } |
| | | </style> |