Commit 7ce0cc4c by 前端

Merge branch 'kuangyq_fix_v2.0.0' into 'v2.0.0'

Kuangyq fix v2.0.0

See merge request !79
2 parents 281c1212 c6067e42

78.7 KB | W: | H:

131 KB | W: | H:

src/assets/material/phone.png
src/assets/material/phone.png
src/assets/material/phone.png
src/assets/material/phone.png
  • 2-up
  • Swipe
  • Onion skin
......@@ -145,7 +145,7 @@
</div>
<img slot="reference" src="@/assets/material/view.png" alt="" />
</el-popover>
<img src="@/assets/material/dele.png" alt="" @click="deleteImg" />
<img class="del-img" src="@/assets/material/dele.png" alt="" @click="deleteImg" />
</h3>
</div>
</div>
......@@ -154,11 +154,11 @@
<div class="avatar-uploader-desc-word">上传照片</div>
<input type="file" style="opacity: 0" accept=".jpg, .jpeg, .png" @change="e => handleImgChange(e)" />
</div>
<div @click="phoneVisible = !phoneVisible" class="view-phone">查看效果></div>
<!-- <div @click="phoneVisible = !phoneVisible" class="view-phone">查看效果></div> -->
</div>
</el-form-item>
</div>
<div class="share-desc-right" v-show="phoneVisible">
<div class="share-desc-right">
<div class="share-desc-right-box">
<img class="share-desc-right-box-phone" src="@/assets/material/phone.png" alt="" />
<div class="content-show">
......@@ -177,7 +177,7 @@
</el-form>
<SelectLabel ref="selectLabel" @tagSelected="handleSelect" :dialogVisible="dialogVisible"></SelectLabel>
<GLFooter class="gl-footer">
<el-button @click="onSave">存草稿</el-button>
<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>
</GLFooter>
......@@ -221,9 +221,9 @@ export default {
},
groupCounter: [],
// 分享设置显示
descVisible: false,
descVisible: true,
// 手机显示
phoneVisible: false,
// phoneVisible: false,
businessTypes: [],
materialAddFormRules: {
selectMaterialGroup: [{ required: true, message: '请选择素材组', trigger: 'change' }],
......@@ -244,7 +244,6 @@ export default {
},
mounted() {
this.routeInfo = this.$route.query
console.log(this.routeInfo, 'this.routeInfo');
this.routeInfo.addOrEdit != 1 ? this.getMaterialInfo() : ''
this.title = this.titleObj[this.routeInfo.addOrEdit]
this.materialInsert()
......@@ -710,13 +709,12 @@ export default {
border-radius: 10px;
h3 {
text-align: center;
margin-top: 30%;
margin-left: 2px;
margin-top: 40%;
img {
width: 16px;
height: 16px;
}
:last-child {
.del-img {
padding-left: 12px;
}
}
......@@ -787,7 +785,7 @@ export default {
display: flex;
justify-content: space-between;
&-right-box {
margin-right: 20px;
margin-right: 50px;
width: 290px;
height: 566px;
position: relative;
......@@ -796,13 +794,14 @@ export default {
height: 566px;
}
.content-show {
width: 150px;
height: 52px;
background-color: #fff;
width: 160px;
height: 63px;
padding: 10px 10px;
box-sizing: border-box;
position: absolute;
top: 375px;
left: 79px;
top: 125px;
left: 71px;
display: flex;
justify-content: space-between;
&-img {
......@@ -814,14 +813,17 @@ export default {
}
}
.content-title {
color: #333333;
max-width: 100px;
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
font-size: 10px;
font-size: 13px;
margin-bottom: 4px;
}
.content-word {
color: #999999;
line-height: 14px;
max-width: 100px;
font-size: 8px;
overflow: hidden;
......
<template>
<div class="material-group">
<div class="all-group">
<div>全部素材组 ({{ groupCounter.length }})</div>
<div class="all-group-word" @click="getList">全部素材组 ({{ groupCounter.length }})</div>
<div>
<el-button class="add_btn" icon="el-icon-plus" :size="size" @click="handleAddGroup(1)">新建</el-button>
<el-button class="add_btn" icon="el-icon-plus" :size="size" @click="handleAddGroup(1)">素材组</el-button>
</div>
</div>
<ul>
<li v-for="(item, index) in groupCounter" :key="index" @click="handleGroup(item)">
<li v-for="(item, index) in groupCounter" :class="index === currentIndex ? 'active' : ''" :key="index" @click="handleGroup(item, index)">
<img src="@/assets/material/file.png" alt="" style="vertical-align: middle" />
<div class="group-name">{{ item.materialGroupName }}</div>
<el-popover placement="right" trigger="hover">
<div>
<ul>
<!-- <li @click="handleStick(item)">{{ item.orderTime ? '取消置顶' : '置顶' }}</li> -->
<li>
<GLButton :size="size" type="text" fn="置顶" @click="handleStick(item)">{{ item.orderTime ? '取消置顶' : '置顶' }}</GLButton>
</li>
<!-- <li @click="handleAddGroup(2,item)">修改</li> -->
<li>
<GLButton :size="size" type="text" fn="修改" @click="handleAddGroup(2, item)">修改</GLButton>
</li>
<!-- <li @click="handleDeleteGroup(item.id)" v-if="item.isDefault == -1">删除</li> -->
<li>
<GLButton :size="size" type="text" fn="删除" v-if="item.isDefault == -1" @click="handleDeleteGroup(item.id)">删除</GLButton>
</li>
</ul>
<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>
</div>
<i slot="reference" class="el-icon-more"></i>
</el-popover>
......@@ -48,7 +37,8 @@ export default {
materialGroupName: '',
orderValue: '',
isDefault: '' // 默认素材组 0 是 -1 否(进入页面如果素材组数量为0,就会创建默认素材组,默认素材组不可删除)
}
},
currentIndex: null
}
},
mounted() {
......@@ -91,7 +81,8 @@ export default {
})
},
// 点击素材组获取素材
handleGroup(item) {
handleGroup(item, index) {
this.currentIndex = index
var params = {}
params.groupId = item.id
params.pageNum = 1
......@@ -140,6 +131,11 @@ export default {
})
})
},
// 点击全部素材组获取全部素材
getList() {
this.$emit('getListApi')
this.currentIndex = ''
},
// 二次确认
secondConfirm(title, txt, apiModule, apiName, apiParams, fn) {
this.$confirm(txt, title, {
......@@ -177,19 +173,23 @@ export default {
.all-group {
font-size: 16px;
font-weight: 600;
padding: 24px 16px 0 16px;
padding: 24px 16px 8px 16px;
display: flex;
justify-content: space-between;
.el-button {
margin-top: -13px;
}
&-word {
cursor: pointer;
}
}
ul {
li {
cursor: pointer;
text-align: left;
padding: 8px 16px 8px 18px;
&:first-child {
padding-top: 16px;
&.active {
background-color: #ebeaff;
}
i {
font-size: 16px;
......@@ -209,11 +209,13 @@ ul {
li {
list-style: none;
position: relative;
vertical-align: middle;
&:nth-child(-n + 2) {
padding-bottom: 10px;
}
&:hover {
color: #5850ff;
background-color: #ebeaff;
}
}
}
......@@ -224,4 +226,16 @@ ul {
display: inline-flex;
margin-left: 8px;
}
.group-btn {
display: block;
padding: 8px 10px;
text-align: center;
width: 100%;
&:hover {
background-color: #ebeaff;
}
}
.el-button + .el-button {
margin-left: 0;
}
</style>
......@@ -26,7 +26,7 @@
<el-row :style="{ height: boxHeight }">
<el-col :span="5">
<div class="left" :style="{ height: boxHeight }">
<MaterialGroup @openAddDialog="addDialogShow" :eventBus="eventBus" @getList="getList" @getListApi="getListApi"></MaterialGroup>
<MaterialGroup ref="materialGroup" @openAddDialog="addDialogShow" :eventBus="eventBus" @getList="getList" @getListApi="getListApi"></MaterialGroup>
</div>
</el-col>
<el-col :span="19">
......@@ -374,6 +374,7 @@ export default {
materialName: ''
}
this.getListApi()
this.$refs.materialGroup.currentIndex = null
},
// 获取所有业务类型
findAllDictData(dictType) {
......
......@@ -14,7 +14,7 @@
</span>
</div>
</div>
<div class="matrial-detail-containner">
<div class="matrial-detail-containner" v-show="boxHeight() ? true : false">
<div :class="{ 'materialDetail-desc': true }" :style="{ height: boxHeight() + 'px' }">
<div class="matrial-detail">
<div class="matrial-detail-left">
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!