Commit bdc95e8d by 杨北旺

内容管理详情

1 parent 26c8e49d
......@@ -27,11 +27,29 @@
class="img-box mar"
>
<el-image
v-if="orderInfo.type == 0"
style="width: 88px; height: 88px"
:src="i"
:preview-src-list="orderInfo[item.prop]"
>
</el-image>
<video
controls
style="
width: 200px;
height: 200px;
background: #333333;
border-radius: 4px;
"
v-else-if="orderInfo.type == 1"
:src="i"
></video>
<div v-if="orderInfo.type == 2" class="file-box">
<div @click="toOpenPDF(i)" class="file-box-inner">
<img class="icon" src="../../assets/pdf.png" />
<div class="title-desc">{{ orderInfo.title }}.pdf</div>
</div>
</div>
</div>
</div>
</div>
......@@ -50,6 +68,33 @@
</div>
<div v-else-if="item.type == 'list'" class="table-box">
<!-- 表格数据 -->
<el-table
:data="orderInfo[item.prop]"
border
:header-cell-style="{
'text-align': 'center',
'background-color': '#fafafa'
}"
:row-style="{ height: '48px' }"
style="width: 100%"
>
<el-table-column
type="index"
align="center"
width="80"
label="序号"
></el-table-column>
<el-table-column
prop="assignName"
align="center"
label="园区店名称"
/>
<el-table-column
prop="assignId"
align="center"
label="园区店号"
/>
</el-table>
</div>
</div>
</div>
......@@ -58,6 +103,7 @@
</template>
<script>
import { getContentDetail } from "@api/contentManager"
export default {
name: "contentDetail",
data() {
......@@ -71,7 +117,7 @@ export default {
{
label: "类型:",
type: "text",
prop: "contentType"
prop: "typeName"
},
{
label: "封面:",
......@@ -81,7 +127,7 @@ export default {
{
label: "副标题:",
type: "text",
prop: "descprite"
prop: "subtitle"
},
{
label: "内容:",
......@@ -93,45 +139,63 @@ export default {
{
label: "业务场景:",
type: "text",
prop: "sceneType"
prop: "sceneName"
},
{
label: "可见渠道:",
type: "text",
prop: "channelType"
prop: "channelName"
},
{
label: "可见门店:",
type: "list",
prop: "merchants"
prop: "assignInfos"
}
],
orderInfo: {
title: "团队sad卡时间段克拉斯加大了科技萨卡老大",
contentType: "图片",
cover:
"https://qcimg01.glsx.com.cn/group1/M00/05/41/wKgD3mS2UTaAQei5AAdcCnX-ySc391.png",
descprite: "卡加斯点开链接撒库拉",
contentList: [
"https://qcimg01.glsx.com.cn/group1/M00/05/41/wKgD3mS2UTaAQei5AAdcCnX-ySc391.png",
"https://qcimg01.glsx.com.cn/group1/M00/05/41/wKgD3mS2UTaAQei5AAdcCnX-ySc391.png",
"https://qcimg01.glsx.com.cn/group1/M00/05/41/wKgD3mS2UTaAQei5AAdcCnX-ySc391.png"
],
sceneType: "精品升级",
channelType: "培训资料",
merchants: [
{
merchantNo: "44210895",
merchantName: "老梁用车"
}
]
}
orderInfo: {}
}
},
mounted() {},
mounted() {
const id = this.$route.params.id
this.getDetail(id)
},
methods: {}
methods: {
getDetail(id) {
getContentDetail({ id }).then((res) => {
const typeNameMap = {
0: "图片",
1: "视频",
2: "pdf"
}
const sceneNameMap = {
0: "会员权益/升级",
1: "精品升级",
2: "次新车转化",
3: "售后众筹",
4: "积分商城"
}
const channelNameMap = {
0: "培训资料",
1: "营销素材"
}
res.typeName = typeNameMap[res.type]
res.sceneName = sceneNameMap[res.scene]
res.channelName = channelNameMap[res.showChannel]
let contentList = []
res.detailInfos &&
res.detailInfos.forEach((el) => {
contentList.push(el.image)
})
res.contentList = contentList
this.orderInfo = res
})
},
toOpenPDF(url) {
window.open(url)
}
}
}
</script>
<style scoped lang="scss">
......@@ -189,6 +253,32 @@ export default {
.table-box {
width: 728px;
}
.file-box {
display: flex;
align-items: center;
.file-box-inner {
width: 432px;
height: 32px;
background: #f4f6f7;
border-radius: 4px;
display: flex;
align-items: center;
margin-right: 11px;
box-sizing: border-box;
padding: 0 8px;
cursor: pointer;
.icon {
width: 16px;
height: 16px;
margin-right: 8px;
}
.title-desc {
font-weight: 400;
font-size: 14px;
color: #1d1d1d;
}
}
}
}
}
}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!