Commit 37ba571b by 前端

修复bug

1 parent b8fe16c0
......@@ -24,7 +24,7 @@
</el-form-item>
<el-form-item label="素材类型:" prop="materialType">
<el-radio-group v-model="materialAddForm.materialType" @change="radioChange"
:disabled="notDisplayProperties">
:disabled="routeInfo.addOrEdit != 1">
<el-radio :label="1">PDF文件</el-radio>
<!-- <el-radio :label="2">自定义链接</el-radio> -->
<el-radio :label="3">图文</el-radio>
......@@ -88,8 +88,8 @@
<el-form-item label="视频:" class="photoWrap">
<div class="img-div">
<div class="put-img" v-if="materialAddForm.videoUrl">
<video id="video" width="100%" height="100%" preload loop muted>
<source :src="materialAddForm.videoUrl" type="video/mp4"/>
<video :src="materialAddForm.videoUrl" id="video" width="100%" height="100%" preload loop muted>
<!-- <source :src="materialAddForm.videoUrl" type="video/mp4"/>-->
</video>
<div class="mask">
<h3>
......@@ -264,7 +264,7 @@
<GLFooter class="gl-footer">
<el-button @click="onSave" v-if="this.routeInfo.addOrEdit == 1">存草稿</el-button>
<el-button @click="handleCancel" class="btn-cancle">取消</el-button>
<el-button @click="handleSubmit" type="primary">确定</el-button>
<el-button @click="handleSubmit" v-if="this.routeInfo.addOrEdit !== 3" type="primary">确定</el-button>
</GLFooter>
<el-dialog class="image-dialog" :visible.sync="dialogVisibleImg" width="30%">
<big-view ref="viewForm" v-if="dialogVisibleImg" :dialogSrc="dialogSrc" :dialogType="dialogType"></big-view>
......@@ -429,6 +429,8 @@ export default {
if (videoHtml && videoHtml.length && !imgHtml && !html.length) params.materialType = 4
if (!imgHtml && !videoHtml) params.materialType = 5
if (imgHtml && imgHtml.length && !videoHtml && !html.length) params.materialType = 6
if (this.materialAddForm.vedioUrl && !this.materialAddForm.imageUrlList.length) params.materialType = 4
if (this.materialAddForm.imageUrlList.length) params.materialType = 3
this.textBoxContent = encodeURIComponent(this.textBoxContent)
params.materialUrl = this.textBoxContent
}
......
......@@ -3,7 +3,7 @@
<el-button class="add_btn" icon="el-icon-plus" :size="size" @click="handleAddGroup(1)">素材组</el-button>
<div class="all-group">
<div @click="getList">
<img src="@/assets/material/groupIcon.png" alt="" />
<img src="@/assets/material/groupIcon.png" alt=""/>
全部素材组 ({{ groupCounter.length }})
</div>
<div @click="groupVisible = !groupVisible">
......@@ -12,9 +12,10 @@
</div>
</div>
<ul v-show="groupVisible" :style="{ height: groupHeight - 110 + 'px' }">
<li class="group-list" v-for="(item, index) in groupCounter" :class="index === currentIndex ? 'active' : ''" :key="index" @click="handleGroup(item, index)">
<li class="group-list" v-for="(item, index) in groupCounter" :class="index === currentIndex ? 'active' : ''"
:key="index" @click="handleGroup(item, index)">
<div>
<img src="@/assets/material/file.png" alt="" style="vertical-align: middle;height:24px;width:24px" />
<img src="@/assets/material/file.png" alt="" style="vertical-align: middle;height:24px;width:24px"/>
<div class="group-name">{{ item.materialGroupName }}</div>
</div>
<div>
......@@ -23,12 +24,17 @@
<!-- <GLButton class="group-btn" :size="size" type="text" fn="置顶" @click="handleStick(item)">{{ item.orderTime ? '取消置顶' : '置顶' }}</GLButton>
<GLButton class="group-btn" :size="size" type="text" fn="修改" @click="handleAddGroup(2, item)">修改</GLButton>
<GLButton class="group-btn" :size="size" type="text" fn="删除" v-if="item.isDefault == -1" @click="handleDeleteGroup(item.id)">删除</GLButton> -->
<el-button class="group-btn" :size="size" type="text" fn="置顶" @click="handleStick(item)">{{ item.orderTime ? '取消置顶' : '置顶' }}</el-button>
<el-button class="group-btn" :size="size" type="text" fn="修改" @click="handleAddGroup(2, item)">修改</el-button>
<el-button class="group-btn" :size="size" type="text" fn="删除" v-if="item.isDefault == -1" @click="handleDeleteGroup(item.id)">删除</el-button>
<el-button class="group-btn" :size="size" type="text" fn="置顶" @click="handleStick(item)">
{{ item.orderTime ? '取消置顶' : '置顶' }}
</el-button>
<el-button class="group-btn" :size="size" type="text" fn="修改" @click="handleAddGroup(2, item)">修改
</el-button>
<el-button class="group-btn" :size="size" type="text" fn="删除" v-if="item.isDefault == -1"
@click="handleDeleteGroup(item.id)">删除
</el-button>
</div>
<div slot="reference">
<img class="more-icon" src="@/assets/material/more.png" alt="" />
<img class="more-icon" src="@/assets/material/more.png" alt=""/>
</div>
</el-popover>
</div>
......@@ -39,9 +45,10 @@
<script>
import * as dayjs from 'dayjs'
export default {
name: 'materialGroup',
props: { eventBus: Object, groupHeight: Number },
props: {eventBus: Object, groupHeight: Number},
data() {
return {
// 素材组数量
......@@ -102,6 +109,7 @@ export default {
params.groupId = item.id
params.pageNum = 1
params.pageSize = 1000
params.createdType = 2
this.$emit('getList', params, item)
},
// 打开1-新增, 2-编辑 素材组弹框
......@@ -133,7 +141,7 @@ export default {
cancelButtonText: '否',
type: 'warning'
}).then(() => {
this.$apis.material.deleteMaterialList({ id: rowId }).then(res => {
this.$apis.material.deleteMaterialList({id: rowId}).then(res => {
this.$message({
message: res.code == '0' ? '操作成功' : '操作失败',
type: res.code == '0' ? 'success' : 'error'
......@@ -181,13 +189,16 @@ export default {
.status-words {
margin-left: 5px;
}
.material-group {
/deep/.el-popover {
/deep/ .el-popover {
min-width: 50px;
&:hover {
cursor: pointer;
}
}
.all-group {
font-size: 16px;
height: 44px;
......@@ -196,17 +207,21 @@ export default {
display: flex;
justify-content: space-between;
cursor: pointer;
img {
width: 24px;
height: 24px;
vertical-align: middle;
}
i {
color: #999999;
}
}
ul {
overflow: auto;
.group-list {
cursor: pointer;
text-align: left;
......@@ -214,38 +229,46 @@ export default {
margin: 0 10px;
display: flex;
justify-content: space-between;
&.active {
background-color: #ebeaff;
}
.more-icon {
vertical-align: middle;
padding-top: 3px;
}
&:hover {
background-color: #ebeaff;
}
}
}
}
.add_btn {
color: #5850ff;
border-color: #5850ff;
margin: 20px 0 12px 16px;
}
.group-name {
display: inline-flex;
margin-left: 8px;
}
.group-btn {
color: #333333;
display: block;
padding: 8px 0px;
text-align: left;
width: 100%;
&:hover {
background-color: #ebeaff;
}
}
.el-button + .el-button {
margin-left: 0;
}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!