Commit 6e4b3db0 by 前端

Merge branch 'xuyl_dev_v3.3.0' into 'v3.3.0'

更新3.3.0代码

See merge request !382
2 parents 696659c4 23a396f5
......@@ -2083,17 +2083,6 @@
"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": {
"version": "6.0.0",
"resolved": "https://registry.npmmirror.com/cliui/-/cliui-6.0.0.tgz",
......@@ -2135,13 +2124,6 @@
"integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==",
"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": {
"version": "3.0.0",
"resolved": "https://registry.npmmirror.com/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz",
......@@ -2183,28 +2165,6 @@
"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": {
"version": "6.2.0",
"resolved": "https://registry.npmmirror.com/wrap-ansi/-/wrap-ansi-6.2.0.tgz",
......@@ -2556,6 +2516,11 @@
"@xtuc/long": "4.2.2"
}
},
"@xmldom/xmldom": {
"version": "0.8.6",
"resolved": "https://registry.npmmirror.com/@xmldom/xmldom/-/xmldom-0.8.6.tgz",
"integrity": "sha512-uRjjusqpoqfmRkTaNuLJ2VohVr67Q5YwDATW3VU7PfzTj6IRaihGrYI7zckGZjxQPBIp63nfvJbM+Yu5ICh0Bg=="
},
"@xtuc/ieee754": {
"version": "1.2.0",
"resolved": "https://registry.npmmirror.com/@xtuc/ieee754/-/ieee754-1.2.0.tgz",
......@@ -4417,6 +4382,14 @@
"resolved": "https://registry.npmmirror.com/core-util-is/-/core-util-is-1.0.3.tgz",
"integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ=="
},
"cos-js-sdk-v5": {
"version": "1.4.14",
"resolved": "https://registry.npmmirror.com/cos-js-sdk-v5/-/cos-js-sdk-v5-1.4.14.tgz",
"integrity": "sha512-nw4kQijqyXSzRElL9HAKGWA96SQk6Sfx/SvJrGra2cXo2L4ipL3Y0wNnH+Wga1f7iigun85+nIk9BrL5+iBJOg==",
"requires": {
"@xmldom/xmldom": "^0.8.6"
}
},
"cosmiconfig": {
"version": "5.2.1",
"resolved": "https://registry.npmmirror.com/cosmiconfig/-/cosmiconfig-5.2.1.tgz",
......@@ -5897,8 +5870,7 @@
"eventemitter3": {
"version": "4.0.7",
"resolved": "https://registry.npmmirror.com/eventemitter3/-/eventemitter3-4.0.7.tgz",
"integrity": "sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw==",
"dev": true
"integrity": "sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw=="
},
"events": {
"version": "3.3.0",
......@@ -7935,6 +7907,11 @@
"integrity": "sha512-efJLHhLjIyKRewNS9EGZ4UpI8NguuL6fKkhRxVuMmrGV2xN/0APGdQYwLFky5w9naebSZ0OwAGp0G6/2Cg90rA==",
"dev": true
},
"js-sha1": {
"version": "0.6.0",
"resolved": "https://registry.npmmirror.com/js-sha1/-/js-sha1-0.6.0.tgz",
"integrity": "sha512-01gwBFreYydzmU9BmZxpVk6svJJHrVxEN3IOiGl6VO93bVKYETJ0sIth6DASI6mIFdt7NmfX9UiByRzsYHGU9w=="
},
"js-tokens": {
"version": "4.0.0",
"resolved": "https://registry.npmmirror.com/js-tokens/-/js-tokens-4.0.0.tgz",
......@@ -12701,6 +12678,18 @@
"integrity": "sha512-2ham8XPWTONajOR0ohOKOHXkm3+gaBmGut3SRuu75xLd/RRaY6vqgh8NBYYk7+RW3u5AtzPQZG8F10LHkl0lAQ==",
"dev": true
},
"vod-js-sdk-v6": {
"version": "1.5.0",
"resolved": "https://registry.npmmirror.com/vod-js-sdk-v6/-/vod-js-sdk-v6-1.5.0.tgz",
"integrity": "sha512-WkMtV9MDxO//6SDQgw+QsbO3dskJwE8nmch2Wn3e4Oub5/eav6DMedFAHRjar+tt9WDLveO0YLxa3yVBQ2DHbQ==",
"requires": {
"axios": "^0.21.1",
"cos-js-sdk-v5": "^1.3.7",
"eventemitter3": "^4.0.7",
"js-sha1": "^0.6.0",
"uuid": "^3.3.2"
}
},
"vue": {
"version": "2.6.14",
"resolved": "https://registry.npmmirror.com/vue/-/vue-2.6.14.tgz",
......@@ -12809,6 +12798,75 @@
}
}
},
"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": {
"version": "3.5.4",
"resolved": "https://registry.npmmirror.com/vue-router/-/vue-router-3.5.4.tgz",
......
......@@ -16,6 +16,7 @@
"glsx-components": "^1.5.3",
"lodash": "^4.17.21",
"node-sass": "^4.0.0",
"vod-js-sdk-v6": "^1.5.0",
"vue": "^2.6.10",
"vue-router": "^3.1.3",
"vuedraggable": "^2.24.3",
......
<!--
* @Author: yangming yangming@didihu.com.cn
* @Date: 2022-11-28 10:12:36
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2022-11-28 10:25:09
* @FilePath: \live\src\components\big-view\index.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<template>
<div class="view-panel">
<img :src="dialogSrc" width="100%" v-if="dialogType == 'img'" />
<video width="100%" autoplay controls :src="dialogSrc" v-else></video>
</div>
</template>
<script>
export default {
name: 'view',
data() {
return {
dialogVisibleImg: true
}
},
props: {
dialogType: String,
dialogSrc: String
},
methods: {
test() {
console.log('点击了按钮')
this.$messenger.send({ message: { from: 11, message: '11111' } })
}
}
}
</script>
......@@ -11,9 +11,9 @@ export const fetchConfig = function(isEnv = true) {
// }
//return window.fetch('https://', {}).then(res => res.json())
// request({ url: 'https://oss-config.test.glsx.com.cn/mock/5be17454f31545347559d499/config/oss_commodity_center', method: 'get' })
return new Http().get('https://oss-config.test.glsx.com.cn/mock/619c87331072f92988f05a29/marketing/config')
// return new Http().get('https://oss-config.test.glsx.com.cn/mock/619c87331072f92988f05a29/marketing/config')
// return new Http({ Headers: { refererurl: location.href }, request: { timeout: 30000 } }).get('http://config-center-backend.test.glsx.com/glsxAdmin/config?moduleUrl=marketing').then(res => res.data)
// return new Http().get('https://oss-config.dev.glsx.com.cn/mock/619c87331072f92988f05a29/marketing/config')
return new Http().get('https://oss-config.dev.glsx.com.cn/mock/619c87331072f92988f05a29/marketing/config')
}
export const config = {
install(vue, cfg) {
......
/*
* @Author: yangming yangming@didihu.com.cn
* @Date: 2022-11-24 14:42:00
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2022-11-24 17:18:31
* @FilePath: \live\src\mixins\upload.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
export default {
data() {
return {}
},
methods: {
getImgUrl(url, multiple = 3) {
return new Promise((resolve, reject) => {
var canvas = document.createElement('canvas') // 获取 canvas 对象
const ctx = canvas.getContext('2d') // 绘制2d
let video = document.getElementById('video')
video.src = url
video.crossOrigin = 'anonymous' // 解决跨域问题,也就是提示污染资源无法转换视频
video.currentTime = 1 // 第一帧
video.oncanplay = async () => {
canvas.width = video.clientWidth * multiple // 获取视频宽度
canvas.height = video.clientHeight * multiple // 获取视频高度
// 利用canvas对象方法绘图
ctx.drawImage(video, 0, 0, video.clientWidth * multiple, video.clientHeight * multiple)
console.log(canvas, 'canvas')
// 转换成base64形式
var oGrayImg = canvas.toDataURL('image/png') // 截取后的视频封面
const file = this.dataURLtoFile(oGrayImg)
const imgUrl = await this.uploadImg(file)
resolve(imgUrl)
}
})
},
//将base64转换为文件
dataURLtoFile(dataurl, filename = 'file.png') {
var arr = dataurl.split(','),
mime = arr[0].match(/:(.*?);/)[1],
bstr = atob(arr[1]),
n = bstr.length,
u8arr = new Uint8Array(n)
while (n--) {
u8arr[n] = bstr.charCodeAt(n)
}
return new File([u8arr], filename, { type: mime })
},
// // 图片上传
uploadImg(fileInfo) {
return new Promise((resolve, reject) => {
var reader = new FileReader()
reader.readAsDataURL(fileInfo)
reader.onload = e => {
const imgFile = e.target.result
const base64 = fileInfo.name.split('.')[1] + '@' + imgFile.split(',')[1]
this.$apis.common.pictureUpload({ file: base64 }).then(res => {
resolve(res)
})
}
})
}
}
}
......@@ -27,44 +27,45 @@
<div class="groupTitle">{{ materialGroupName }}(共{{ tableTotal }}条数据)</div>
<GLTable ref="materialRef" :hasPage="false" :noDataImg="url" @refreshTable="getListApi" :layout="layout" :searchForm="searchForm" :tableParams="tableParams" :tableData="materialTableData" :pageConf="pageConf" :tableTotal="tableTotal" @sortChange="sortChange" :isCustomHead="true" :customHeadShowList="customHeadShowList">
<!-- 素材内容 -->
<div slot="materialContentRpcResponse" slot-scope="scope" style="text-align: center">
<div slot="materialContentRpcResponse" slot-scope="scope">
<span class="hide-content">{{ scope.scope.materialContentRpcResponse.materialName }}</span>
<!-- 素材为PDF -->
<span v-if="scope.scope.materialType == 1" class="material-content">
<img src="@/assets/material/pdf.png" style="margin-right:8px" alt="" />
<el-tooltip effect="dark" placement="top" :content="scope.scope.materialContentRpcResponse.materialName" :disabled="scope.scope.materialContentRpcResponse.materialName.length < 12">
<span class="hide-content">{{ scope.scope.materialContentRpcResponse.materialName }}</span>
</el-tooltip>
</span>
<!-- <span v-if="scope.scope.materialType == 1" class="material-content">-->
<!-- <img src="@/assets/material/pdf.png" style="margin-right:8px" alt="" />-->
<!-- <el-tooltip effect="dark" placement="top" :content="scope.scope.materialContentRpcResponse.materialName" :disabled="scope.scope.materialContentRpcResponse.materialName.length < 12">-->
<!-- <span class="hide-content">{{ scope.scope.materialContentRpcResponse.materialName }}</span>-->
<!-- </el-tooltip>-->
<!-- </span>-->
<!-- 素材为自定义链接 -->
<span v-if="scope.scope.materialType == 2"></span>
<!-- <span v-if="scope.scope.materialType == 2"></span>-->
<!-- 素材为图文 -->
<span v-if="scope.scope.materialType == 3 || scope.scope.materialType == 4 || scope.scope.materialType == 5 || scope.scope.materialType == 6" class="material-content">
<!-- <span v-if="scope.scope.materialType == 3 || scope.scope.materialType == 4 || scope.scope.materialType == 5 || scope.scope.materialType == 6" class="material-content">-->
<!-- 图片 -->
<el-popover placement="top" trigger="hover" v-if="scope.scope.urlType == 'img'">
<div>
<img class="img-plus" :src="scope.scope.materialContentRpcResponse.materialUrl" alt="" />
</div>
<div slot="reference" class="urlContent">
<img style="margin-right:8px" :src="scope.scope.materialContentRpcResponse.materialUrl" alt="" />
<div class="videoMask" v-if="scope.scope.imgCount > 1">
<img src="@/assets/material/multi.png" alt="" />
<span>{{ scope.scope.imgCount }}</span>
</div>
</div>
</el-popover>
<!-- <el-popover placement="top" trigger="hover" v-if="scope.scope.urlType == 'img'">-->
<!-- <div>-->
<!-- <img class="img-plus" :src="scope.scope.materialContentRpcResponse.materialUrl" alt="" />-->
<!-- </div>-->
<!-- <div slot="reference" class="urlContent">-->
<!-- <img style="margin-right:8px" :src="scope.scope.materialContentRpcResponse.materialUrl" alt="" />-->
<!-- <div class="videoMask" v-if="scope.scope.imgCount > 1">-->
<!-- <img src="@/assets/material/multi.png" alt="" />-->
<!-- <span>{{ scope.scope.imgCount }}</span>-->
<!-- </div>-->
<!-- </div>-->
<!-- </el-popover>-->
<!-- 视频 -->
<div class="urlContent" v-if="scope.scope.urlType == 'video'" @click="videoOpen(scope.scope)">
<video preload loop muted width="36" height="36">
<source :src="scope.scope.materialContentRpcResponse.materialUrl" type="video/mp4" />
</video>
<div class="videoMask">
<img src="@/assets/material/videoIcon.png" style="width: 22px;height: 22px;" alt="" />
</div>
</div>
<el-tooltip effect="dark" placement="top" :content="scope.scope.materialContentRpcResponse.materialName" :disabled="scope.scope.materialContentRpcResponse.materialName.length < 14">
<span class="hide-content">{{ scope.scope.materialContentRpcResponse.materialName }}</span>
</el-tooltip>
</span>
<!-- <div class="urlContent" v-if="scope.scope.urlType == 'video'" @click="videoOpen(scope.scope)">-->
<!-- <video preload loop muted width="36" height="36">-->
<!-- <source :src="scope.scope.materialContentRpcResponse.materialUrl" type="video/mp4" />-->
<!-- </video>-->
<!-- <div class="videoMask">-->
<!-- <img src="@/assets/material/videoIcon.png" style="width: 22px;height: 22px;" alt="" />-->
<!-- </div>-->
<!-- </div>-->
<!-- <el-tooltip effect="dark" placement="top" :content="scope.scope.materialContentRpcResponse.materialName" :disabled="scope.scope.materialContentRpcResponse.materialName.length < 14">-->
<!-- <span class="hide-content">{{ scope.scope.materialContentRpcResponse.materialName }}</span>-->
<!-- </el-tooltip>-->
<!-- </span>-->
</div>
<!-- 状态 -->
<div slot="status" class="dot" slot-scope="scope">
......@@ -146,6 +147,7 @@ export default {
businessTypes: [],
// 素材组名称
materialGroupName: '',
changeName:'编辑',
materialFormData: [
{
label: '业务类型',
......@@ -250,6 +252,23 @@ export default {
type: 'text',
fn: '编辑'
},
condition: row => {
return row.createdType !== 1;
},
listeners: {
click: row => this.addMaterial(2, row)
}
},
{
type: 'el-button',
name: '查看',
attrs: {
type: 'text',
fn: '查看'
},
condition: row => {
return row.createdType == 1;
},
listeners: {
click: row => this.addMaterial(2, row)
}
......@@ -284,7 +303,7 @@ export default {
tableOption: true,
tableColumns: [
{
label: '素材内容',
label: '素材名称',
prop: 'materialContentRpcResponse',
addHtml: 'materialContentRpcResponse',
width: 270
......
......@@ -105,7 +105,6 @@
<nickname-model v-if="isNicknameVisible" :isNicknameVisible.sync="isNicknameVisible" @handleNicknameConfirm="handleNicknameConfirm" @handleNicknameClose="handleNicknameClose"></nickname-model>
</div>
</template>
<script>
import { limitPrice } from '@/common/constant'
import ActivityModel from './components/activityModel'
......@@ -391,7 +390,6 @@ export default {
}
}
},
props: {
eventObj: {
type: Object,
......@@ -419,13 +417,11 @@ export default {
}
}
},
components: {
ActivityModel,
materialModel,
nicknameModel
},
watch: {
editForm: {
handler(val) {
......@@ -443,14 +439,12 @@ export default {
this.editFormDataChannel[idx].optionList[2].isDisabled = [1, 2, 3].includes(val)
}
},
created() {
this.getDay('weekList', 7)
this.getDay('monthList', 31)
this.predictCountObj = JSON.parse(JSON.stringify(this.parentCustomerObj.parentPredictObj))
// this.limitQwPhone()
},
mounted() {
Object.assign(this.editForm, this.eventObj.info)
this.getStaffTypeList()
......@@ -459,7 +453,6 @@ export default {
})
this.eventObj.addOrEdit != 'add' ? this.getInfo() : ''
},
methods: {
getOptionsList(formName, hasAll = true, refreshSigle) {
if (refreshSigle) {
......@@ -486,18 +479,15 @@ export default {
})
}
},
handleResetMaxSet() {
this.maxReachesTypeSet = ''
},
getStaffTypeList() {
this.$apis.common.getStaffFollowerListApi({}).then(res => {
this.baseData.staffTypeList = res
this.getOptionsList('editFormDataChannel', false, 'followerTypeId')
})
},
getDay(attrName, day) {
let weekNameList = ['一', '二', '三', '四', '五', '六', '日']
for (var i = 0; i < day; i++) {
......@@ -507,7 +497,6 @@ export default {
})
}
},
recoveryRepeat() {
var idx = this.editFormDataRepeat.findIndex(item => item.name == 'repeatMode')
this.editFormDataRepeat[idx].isHide = this.editForm.repeatFlag == 'N'
......@@ -522,7 +511,6 @@ export default {
this.editForm.reachesTypeSet = 1
}
},
recoveryEndTime() {
var idx = this.editFormDataTime.findIndex(item => item.name == 'eventEndDate')
var startTime = new Date(this.editForm.eventStartDate)
......@@ -536,7 +524,6 @@ export default {
}
}
},
getInfo() {
this.editForm.eventStartDate = moment(this.editForm.eventStartDate).format('YYYY-MM-DD')
this.editForm.eventEndDate = this.editForm.eventEndDate ? moment(this.editForm.eventEndDate).format('YYYY-MM-DD') : ''
......@@ -545,11 +532,9 @@ export default {
this.recoveryEndTime()
this.getCustomerNum()
},
handleReachesType(val) {
this.editForm.reachesTypeSet = val == 1 ? 1 : ''
},
// 素材
handleMaterialConfirm(val) {
// additionalType 附加对象类型(1素材,2活动,3优惠券,4朋友券模板)
......@@ -565,11 +550,9 @@ export default {
]
this.handleMaterialClose()
},
handleMaterialClose() {
this.isMaterialVisible = !this.isMaterialVisible
},
// 朋友圈模板
handleNicknameConfirm(val) {
// additionalType 附加对象类型(1素材,2活动,3优惠券,4朋友券模板)
......@@ -588,11 +571,9 @@ export default {
]
this.handleNicknameClose()
},
handleNicknameClose() {
this.isNicknameVisible = !this.isNicknameVisible
},
// 营销内容
handleFun(name) {
if (name == 'material') {
......@@ -605,7 +586,6 @@ export default {
this.handleNicknameClose()
}
},
close(index) {
this.previewList.splice(index, 1)
if (this.editForm.object.additionalType == 4) {
......@@ -614,7 +594,6 @@ export default {
}
this.editForm.object = {}
},
selectActivity(val) {
this.editForm.object = JSON.parse(JSON.stringify(val))
this.editRule.eventContent[0].required = true
......@@ -627,7 +606,6 @@ export default {
]
},
// 营销内容
getCustomerNum() {
switch (this.parentCustomerObj.currentCustomerTypeName) {
case '人群':
......@@ -640,7 +618,6 @@ export default {
break
}
},
getCustomerByCrowdList() {
var params = {
pageSize: 1,
......@@ -653,7 +630,6 @@ export default {
this.predictCountObj[this.editForm.pushChannelType == 2 ? 'phone' : 'qiwei'] = res.count
})
},
getCustomerByTagList() {
var params = {
combineType: 2,
......@@ -662,18 +638,18 @@ export default {
tagLists: []
}
this.parentCustomerObj.list &&
this.parentCustomerObj.list.forEach(item => {
item.labelList.length &&
item.labelList.forEach(subItem => {
params.tagLists.push({
groupId: item.labelGroup.id,
groupName: item.labelGroup.name,
groupType: item.labelType,
labelId: subItem.id,
labelName: subItem.name
})
})
this.parentCustomerObj.list.forEach(item => {
item.labelList.length &&
item.labelList.forEach(subItem => {
params.tagLists.push({
groupId: item.labelGroup.id,
groupName: item.labelGroup.name,
groupType: item.labelType,
labelId: subItem.id,
labelName: subItem.name
})
})
})
// 1-企业微信;2-短信;3-微信朋友圈
this.editForm.pushChannelType == 2 ? (params.customerPhone = '1') : (params.isJoin = 1)
this.$apis.sop.getCustomerByTagListApi(params).then(res => {
......@@ -684,7 +660,6 @@ export default {
whereToGo(id) {
document.getElementById(id).scrollIntoView()
},
handleConfirm() {
var countParams = {
eventStartDate: this.editForm.eventStartDate,
......@@ -746,10 +721,10 @@ export default {
cancelButtonText: '取消',
type: 'warning'
})
.then(() => {
this.cancelJump()
})
.catch(() => { })
.then(() => {
this.cancelJump()
})
.catch(() => { })
} else {
this.cancelJump()
}
......@@ -849,4 +824,4 @@ export default {
}
}
}
</style>
\ No newline at end of file
</style>
......@@ -7,7 +7,6 @@
</div>
<div class="container">
<GLCombiForm ref="showSearch" :rowNumber="1" :formObj="searchForm" :formData="searchFormData" @handleOk="handleSearch" @handleRest="handleReset"></GLCombiForm>
<!-- 表格区域 开始 -->
<GLTable ref="sopListRef" :getListApi="getListApi" :noDataImg="url" :searchForm="searchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn" @setTableFinishFun="setTableFinishFun">
<div class="table-btns" slot="auth-button" slot-scope="scope">
......@@ -18,7 +17,6 @@
</div>
</div>
</template>
<script>
import * as dayjs from 'dayjs'
import url from '@/assets/empty.png'
......@@ -173,11 +171,9 @@ export default {
}
}
},
mounted() {
this.getOptionsList('searchFormData')
},
methods: {
handleJump(path, row = {}) {
this.$router.push({
......@@ -185,7 +181,6 @@ export default {
query: row ? { id: row.id, fromPage: '/marketing/sop/sopList' } : ''
})
},
secondConfirm(title, txt, apiModule, apiName, apiParams, fn) {
this.$confirm(txt, title, {
confirmButtonText: '确定',
......@@ -220,16 +215,13 @@ export default {
query: params
})
},
// 结束
handleEnd(row) {
this.secondConfirm('结束', '结束SOP后,将不再进行营销任务自动推送,且不可恢复。是否确定结束?', 'sop', 'endSopEventApi', { sopId: row.id })
},
handleDelete(row) {
this.secondConfirm('删除', 'SOP删除后,不可恢复。是否确定删除?', 'sop', 'deleteSopEventApi', { sopId: row.id })
},
getOptionsList(formName, hasAll = true, refreshSigle) {
if (refreshSigle) {
var item = this[formName].find(k => k.name == refreshSigle)
......@@ -255,22 +247,18 @@ export default {
})
}
},
setTableFinishFun() {
//接收到的数据为空
this.$refs.sopListRef.data.length ? (this.$refs.sopListRef.tableHeightValues = '') : this.$refs.sopListRef.setTableHeightFun()
},
handleBack() {
this.$router.push({
path: '/sop/index'
})
},
handleSearch() {
this.$refs.sopListRef.refreshTable()
},
handleReset() {
this.searchForm = {
sopName: '',
......@@ -281,7 +269,6 @@ export default {
}
}
</script>
<style scoped>
.sop-list .sop-back-btn {
position: absolute;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!