Commit 4dcb2b25 by 李伟康

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

2 parents a0a96e86 a4d0b345
...@@ -2083,6 +2083,17 @@ ...@@ -2083,6 +2083,17 @@
"color-convert": "^2.0.1" "color-convert": "^2.0.1"
} }
}, },
"chalk": {
"version": "4.1.2",
"resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
"integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
"dev": true,
"optional": true,
"requires": {
"ansi-styles": "^4.1.0",
"supports-color": "^7.1.0"
}
},
"cliui": { "cliui": {
"version": "6.0.0", "version": "6.0.0",
"resolved": "https://registry.npmmirror.com/cliui/-/cliui-6.0.0.tgz", "resolved": "https://registry.npmmirror.com/cliui/-/cliui-6.0.0.tgz",
...@@ -2124,6 +2135,13 @@ ...@@ -2124,6 +2135,13 @@
"integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==",
"dev": true "dev": true
}, },
"has-flag": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
"integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
"dev": true,
"optional": true
},
"is-fullwidth-code-point": { "is-fullwidth-code-point": {
"version": "3.0.0", "version": "3.0.0",
"resolved": "https://registry.npmmirror.com/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", "resolved": "https://registry.npmmirror.com/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz",
...@@ -2165,6 +2183,28 @@ ...@@ -2165,6 +2183,28 @@
"ansi-regex": "^5.0.1" "ansi-regex": "^5.0.1"
} }
}, },
"supports-color": {
"version": "7.2.0",
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
"integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
"dev": true,
"optional": true,
"requires": {
"has-flag": "^4.0.0"
}
},
"vue-loader-v16": {
"version": "npm:vue-loader@16.8.3",
"resolved": "https://registry.npmjs.org/vue-loader/-/vue-loader-16.8.3.tgz",
"integrity": "sha512-7vKN45IxsKxe5GcVCbc2qFU5aWzyiLrYJyUuMz4BQLKctCj/fmCa0w6fGiiQ2cLFetNcek1ppGJQDCup0c1hpA==",
"dev": true,
"optional": true,
"requires": {
"chalk": "^4.1.0",
"hash-sum": "^2.0.0",
"loader-utils": "^2.0.0"
}
},
"wrap-ansi": { "wrap-ansi": {
"version": "6.2.0", "version": "6.2.0",
"resolved": "https://registry.npmmirror.com/wrap-ansi/-/wrap-ansi-6.2.0.tgz", "resolved": "https://registry.npmmirror.com/wrap-ansi/-/wrap-ansi-6.2.0.tgz",
...@@ -12798,75 +12838,6 @@ ...@@ -12798,75 +12838,6 @@
} }
} }
}, },
"vue-loader-v16": {
"version": "npm:vue-loader@16.8.3",
"resolved": "https://registry.npmmirror.com/vue-loader/-/vue-loader-16.8.3.tgz",
"integrity": "sha512-7vKN45IxsKxe5GcVCbc2qFU5aWzyiLrYJyUuMz4BQLKctCj/fmCa0w6fGiiQ2cLFetNcek1ppGJQDCup0c1hpA==",
"dev": true,
"optional": true,
"requires": {
"chalk": "^4.1.0",
"hash-sum": "^2.0.0",
"loader-utils": "^2.0.0"
},
"dependencies": {
"ansi-styles": {
"version": "4.3.0",
"resolved": "https://registry.npmmirror.com/ansi-styles/-/ansi-styles-4.3.0.tgz",
"integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
"dev": true,
"optional": true,
"requires": {
"color-convert": "^2.0.1"
}
},
"chalk": {
"version": "4.1.2",
"resolved": "https://registry.npmmirror.com/chalk/-/chalk-4.1.2.tgz",
"integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
"dev": true,
"optional": true,
"requires": {
"ansi-styles": "^4.1.0",
"supports-color": "^7.1.0"
}
},
"color-convert": {
"version": "2.0.1",
"resolved": "https://registry.npmmirror.com/color-convert/-/color-convert-2.0.1.tgz",
"integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
"dev": true,
"optional": true,
"requires": {
"color-name": "~1.1.4"
}
},
"color-name": {
"version": "1.1.4",
"resolved": "https://registry.npmmirror.com/color-name/-/color-name-1.1.4.tgz",
"integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
"dev": true,
"optional": true
},
"has-flag": {
"version": "4.0.0",
"resolved": "https://registry.npmmirror.com/has-flag/-/has-flag-4.0.0.tgz",
"integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
"dev": true,
"optional": true
},
"supports-color": {
"version": "7.2.0",
"resolved": "https://registry.npmmirror.com/supports-color/-/supports-color-7.2.0.tgz",
"integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
"dev": true,
"optional": true,
"requires": {
"has-flag": "^4.0.0"
}
}
}
},
"vue-router": { "vue-router": {
"version": "3.5.4", "version": "3.5.4",
"resolved": "https://registry.npmmirror.com/vue-router/-/vue-router-3.5.4.tgz", "resolved": "https://registry.npmmirror.com/vue-router/-/vue-router-3.5.4.tgz",
......
...@@ -552,9 +552,10 @@ export default { ...@@ -552,9 +552,10 @@ export default {
}, },
handleSelect(val) { handleSelect(val) {
this.isUpdate = true this.isUpdate = true
this.tagging = val this.tagging = val || []
let arr = [] let arr = []
this.tagging.forEach(item => { this.tagging.forEach(item => {
item.labelList = item.labelList || []
item.labelList.forEach(tag => { item.labelList.forEach(tag => {
arr.push({ arr.push({
groupId: item.labelGroup.id, groupId: item.labelGroup.id,
...@@ -579,6 +580,7 @@ export default { ...@@ -579,6 +580,7 @@ export default {
} }
let arr = [] let arr = []
this.tagging.forEach(item => { this.tagging.forEach(item => {
item.labelList = item.labelList || []
item.labelList.forEach(tag => { item.labelList.forEach(tag => {
arr.push({ arr.push({
groupId: item.labelGroup.id, groupId: item.labelGroup.id,
......
...@@ -358,10 +358,10 @@ export default { ...@@ -358,10 +358,10 @@ export default {
if (res.code == '0') { if (res.code == '0') {
if (type == 1) { if (type == 1) {
this.time = res.data.createdTime this.time = res.data.createdTime
this.$refs.customer.refreshTable() this.$refs.customer && this.$refs.customer.refreshTable()
} else if (type == 2) { } else if (type == 2) {
this.times = res.data.createdTime this.times = res.data.createdTime
this.$refs.customerGroup.refreshTable() this.$refs.customerGroup && this.$refs.customerGroup.refreshTable()
} }
} }
}) })
...@@ -412,9 +412,9 @@ export default { ...@@ -412,9 +412,9 @@ export default {
message: '操作成功!' message: '操作成功!'
}) })
if (type == 1) { if (type == 1) {
this.$refs.customer.refreshTable() this.$refs.customer && this.$refs.customer.refreshTable()
} else { } else {
this.$refs.customerGroup.refreshTable() this.$refs.customerGroup && this.$refs.customerGroup.refreshTable()
} }
}) })
// } else { // } else {
......
...@@ -22,9 +22,9 @@ ...@@ -22,9 +22,9 @@
<el-input v-model="materialAddForm.materialName" :size="size" placeholder="请输入素材名称" <el-input v-model="materialAddForm.materialName" :size="size" placeholder="请输入素材名称"
maxlength="30" :disabled="notDisplayProperties"></el-input> maxlength="30" :disabled="notDisplayProperties"></el-input>
</el-form-item> </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" <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="1">PDF文件</el-radio>
<!-- <el-radio :label="2">自定义链接</el-radio> --> <!-- <el-radio :label="2">自定义链接</el-radio> -->
<el-radio :label="3">图文</el-radio> <el-radio :label="3">图文</el-radio>
...@@ -88,8 +88,8 @@ ...@@ -88,8 +88,8 @@
<el-form-item label="视频:" class="photoWrap"> <el-form-item label="视频:" class="photoWrap">
<div class="img-div"> <div class="img-div">
<div class="put-img" v-if="materialAddForm.videoUrl"> <div class="put-img" v-if="materialAddForm.videoUrl">
<video id="video" width="100%" height="100%" preload loop muted> <video :src="materialAddForm.videoUrl" id="video" width="100%" height="100%" preload loop muted>
<source :src="materialAddForm.videoUrl" type="video/mp4"/> <!-- <source :src="materialAddForm.videoUrl" type="video/mp4"/>-->
</video> </video>
<div class="mask"> <div class="mask">
<h3> <h3>
...@@ -264,7 +264,7 @@ ...@@ -264,7 +264,7 @@
<GLFooter class="gl-footer"> <GLFooter class="gl-footer">
<el-button @click="onSave" v-if="this.routeInfo.addOrEdit == 1">存草稿</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" v-if="this.routeInfo.addOrEdit !== 3" type="primary">确定</el-button>
</GLFooter> </GLFooter>
<el-dialog class="image-dialog" :visible.sync="dialogVisibleImg" width="30%"> <el-dialog class="image-dialog" :visible.sync="dialogVisibleImg" width="30%">
<big-view ref="viewForm" v-if="dialogVisibleImg" :dialogSrc="dialogSrc" :dialogType="dialogType"></big-view> <big-view ref="viewForm" v-if="dialogVisibleImg" :dialogSrc="dialogSrc" :dialogType="dialogType"></big-view>
...@@ -429,6 +429,8 @@ export default { ...@@ -429,6 +429,8 @@ export default {
if (videoHtml && videoHtml.length && !imgHtml && !html.length) params.materialType = 4 if (videoHtml && videoHtml.length && !imgHtml && !html.length) params.materialType = 4
if (!imgHtml && !videoHtml) params.materialType = 5 if (!imgHtml && !videoHtml) params.materialType = 5
if (imgHtml && imgHtml.length && !videoHtml && !html.length) params.materialType = 6 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) this.textBoxContent = encodeURIComponent(this.textBoxContent)
params.materialUrl = this.textBoxContent params.materialUrl = this.textBoxContent
} }
...@@ -749,6 +751,11 @@ export default { ...@@ -749,6 +751,11 @@ export default {
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.materialType{
/deep/.el-form-item__content{
max-width: 85%;
}
}
.disableUpload { .disableUpload {
cursor: not-allowed; cursor: not-allowed;
cursor: no-drop; cursor: no-drop;
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<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 class="all-group"> <div class="all-group">
<div @click="getList"> <div @click="getList">
<img src="@/assets/material/groupIcon.png" alt="" /> <img src="@/assets/material/groupIcon.png" alt=""/>
全部素材组 ({{ groupCounter.length }}) 全部素材组 ({{ groupCounter.length }})
</div> </div>
<div @click="groupVisible = !groupVisible"> <div @click="groupVisible = !groupVisible">
...@@ -12,9 +12,10 @@ ...@@ -12,9 +12,10 @@
</div> </div>
</div> </div>
<ul v-show="groupVisible" :style="{ height: groupHeight - 110 + 'px' }"> <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> <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 class="group-name">{{ item.materialGroupName }}</div>
</div> </div>
<div> <div>
...@@ -23,12 +24,17 @@ ...@@ -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="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="修改" @click="handleAddGroup(2, item)">修改</GLButton>
<GLButton class="group-btn" :size="size" type="text" fn="删除" v-if="item.isDefault == -1" @click="handleDeleteGroup(item.id)">删除</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="handleStick(item)">
<el-button class="group-btn" :size="size" type="text" fn="修改" @click="handleAddGroup(2, item)">修改</el-button> {{ item.orderTime ? '取消置顶' : '置顶' }}
<el-button class="group-btn" :size="size" type="text" fn="删除" v-if="item.isDefault == -1" @click="handleDeleteGroup(item.id)">删除</el-button> </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>
<div slot="reference"> <div slot="reference">
<img class="more-icon" src="@/assets/material/more.png" alt="" /> <img class="more-icon" src="@/assets/material/more.png" alt=""/>
</div> </div>
</el-popover> </el-popover>
</div> </div>
...@@ -39,9 +45,10 @@ ...@@ -39,9 +45,10 @@
<script> <script>
import * as dayjs from 'dayjs' import * as dayjs from 'dayjs'
export default { export default {
name: 'materialGroup', name: 'materialGroup',
props: { eventBus: Object, groupHeight: Number }, props: {eventBus: Object, groupHeight: Number},
data() { data() {
return { return {
// 素材组数量 // 素材组数量
...@@ -102,6 +109,7 @@ export default { ...@@ -102,6 +109,7 @@ export default {
params.groupId = item.id params.groupId = item.id
params.pageNum = 1 params.pageNum = 1
params.pageSize = 1000 params.pageSize = 1000
params.createdType = 2
this.$emit('getList', params, item) this.$emit('getList', params, item)
}, },
// 打开1-新增, 2-编辑 素材组弹框 // 打开1-新增, 2-编辑 素材组弹框
...@@ -133,7 +141,7 @@ export default { ...@@ -133,7 +141,7 @@ export default {
cancelButtonText: '否', cancelButtonText: '否',
type: 'warning' type: 'warning'
}).then(() => { }).then(() => {
this.$apis.material.deleteMaterialList({ id: rowId }).then(res => { this.$apis.material.deleteMaterialList({id: rowId}).then(res => {
this.$message({ this.$message({
message: res.code == '0' ? '操作成功' : '操作失败', message: res.code == '0' ? '操作成功' : '操作失败',
type: res.code == '0' ? 'success' : 'error' type: res.code == '0' ? 'success' : 'error'
...@@ -181,13 +189,16 @@ export default { ...@@ -181,13 +189,16 @@ export default {
.status-words { .status-words {
margin-left: 5px; margin-left: 5px;
} }
.material-group { .material-group {
/deep/.el-popover { /deep/ .el-popover {
min-width: 50px; min-width: 50px;
&:hover { &:hover {
cursor: pointer; cursor: pointer;
} }
} }
.all-group { .all-group {
font-size: 16px; font-size: 16px;
height: 44px; height: 44px;
...@@ -196,17 +207,21 @@ export default { ...@@ -196,17 +207,21 @@ export default {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
cursor: pointer; cursor: pointer;
img { img {
width: 24px; width: 24px;
height: 24px; height: 24px;
vertical-align: middle; vertical-align: middle;
} }
i { i {
color: #999999; color: #999999;
} }
} }
ul { ul {
overflow: auto; overflow: auto;
.group-list { .group-list {
cursor: pointer; cursor: pointer;
text-align: left; text-align: left;
...@@ -214,38 +229,46 @@ export default { ...@@ -214,38 +229,46 @@ export default {
margin: 0 10px; margin: 0 10px;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
&.active { &.active {
background-color: #ebeaff; background-color: #ebeaff;
} }
.more-icon { .more-icon {
vertical-align: middle; vertical-align: middle;
padding-top: 3px; padding-top: 3px;
} }
&:hover { &:hover {
background-color: #ebeaff; background-color: #ebeaff;
} }
} }
} }
} }
.add_btn { .add_btn {
color: #5850ff; color: #5850ff;
border-color: #5850ff; border-color: #5850ff;
margin: 20px 0 12px 16px; margin: 20px 0 12px 16px;
} }
.group-name { .group-name {
display: inline-flex; display: inline-flex;
margin-left: 8px; margin-left: 8px;
} }
.group-btn { .group-btn {
color: #333333; color: #333333;
display: block; display: block;
padding: 8px 0px; padding: 8px 0px;
text-align: left; text-align: left;
width: 100%; width: 100%;
&:hover { &:hover {
background-color: #ebeaff; background-color: #ebeaff;
} }
} }
.el-button + .el-button { .el-button + .el-button {
margin-left: 0; margin-left: 0;
} }
......
...@@ -461,7 +461,8 @@ export default { ...@@ -461,7 +461,8 @@ export default {
materialType: '', materialType: '',
businessType: '', businessType: '',
status: '', status: '',
materialName: '' materialName: '',
createdType:'2'
} }
this.getListApi() this.getListApi()
this.$refs.materialGroup.currentIndex = null this.$refs.materialGroup.currentIndex = null
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!