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