Commit 9947cccc by 前端

Merge branch 'v3.3.0' of http://192.168.3.233:8090/saas/scrm-micro-marketing into xuyl_dev_sop

 Conflicts:
	src/views/material/addMaterial.vue
2 parents 43e160f5 9e193012
......@@ -22,7 +22,7 @@
<el-input v-model="materialAddForm.materialName" :size="size" placeholder="请输入素材名称"
maxlength="30" :disabled="notDisplayProperties"></el-input>
</el-form-item>
<el-form-item label="素材类型:" prop="materialType">
<el-form-item label="素材类型:" prop="materialType" class="materialType">
<el-radio-group v-model="materialAddForm.materialType" @change="radioChange"
:disabled="routeInfo.addOrEdit != 1">
<el-radio :label="1">PDF文件</el-radio>
......@@ -33,9 +33,9 @@
<div v-show="materialAddForm.materialType == 1">
<div class="pdf-show">
<input type="file" style="opacity: 0" accept=".pdf"
:disabled="notDisplayProperties" @change="e => handlePdfChange(e)"/>
:disabled="routeInfo.addOrEdit == 2 && routeInfo.status != 1" @change="e => handlePdfChange(e)"/>
<el-button icon="el-icon-plus" :size="size"
:disabled="notDisplayProperties">选择文件
:disabled="routeInfo.addOrEdit == 2 && routeInfo.status != 1">选择文件
</el-button>
</div>
<!-- <div v-if="pdfUrl">{{ pdfUrl }}</div> -->
......@@ -46,6 +46,14 @@
</li>
</ul>
</div>
<!-- 选择自定义链接 -->
<!-- <div v-show="materialAddForm.materialType == 2">
<el-form :model="linkForm" :rules="linkRules" ref="linkForm" label-width="100px">
<el-form-item label="链接地址" prop="link">
<el-input v-model="linkForm.link" placeholder="请填写跳转链接" maxlength="150" show-word-limit></el-input>
</el-form-item>
</el-form>
</div> -->
<!-- 选择图文 -->
<div v-show="materialAddForm.materialType == 3">
<textBox @change="writeChange" ref="textBox" @forbid="forbidEdit"></textBox>
......@@ -421,8 +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
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
}
......@@ -493,6 +501,19 @@ export default {
}
})
},
// 获取所有业务类型
// findAllDictData(dictType) {
// var params = {
// dictType
// }
// this.$apis.material.findAllDictData(params).then(res => {
// if (res) {
// if (dictType == 'business_type') {
// this.businessTypes = res
// }
// }
// })
// },
getListEntBusinessType() {
var params = {}
// flag 0-跟进专员调用 1-素材调用
......@@ -730,6 +751,11 @@ export default {
</script>
<style lang="scss" scoped>
.materialType{
/deep/.el-form-item__content{
max-width: 85%;
}
}
.disableUpload {
cursor: not-allowed;
cursor: no-drop;
......
......@@ -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 {
// 素材组数量
......@@ -134,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'
......@@ -182,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;
......@@ -197,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;
......@@ -215,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!