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 @@ ...@@ -2083,17 +2083,6 @@
"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",
...@@ -2135,13 +2124,6 @@ ...@@ -2135,13 +2124,6 @@
"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",
...@@ -2183,28 +2165,6 @@ ...@@ -2183,28 +2165,6 @@
"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",
...@@ -2556,6 +2516,11 @@ ...@@ -2556,6 +2516,11 @@
"@xtuc/long": "4.2.2" "@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": { "@xtuc/ieee754": {
"version": "1.2.0", "version": "1.2.0",
"resolved": "https://registry.npmmirror.com/@xtuc/ieee754/-/ieee754-1.2.0.tgz", "resolved": "https://registry.npmmirror.com/@xtuc/ieee754/-/ieee754-1.2.0.tgz",
...@@ -4417,6 +4382,14 @@ ...@@ -4417,6 +4382,14 @@
"resolved": "https://registry.npmmirror.com/core-util-is/-/core-util-is-1.0.3.tgz", "resolved": "https://registry.npmmirror.com/core-util-is/-/core-util-is-1.0.3.tgz",
"integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==" "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": { "cosmiconfig": {
"version": "5.2.1", "version": "5.2.1",
"resolved": "https://registry.npmmirror.com/cosmiconfig/-/cosmiconfig-5.2.1.tgz", "resolved": "https://registry.npmmirror.com/cosmiconfig/-/cosmiconfig-5.2.1.tgz",
...@@ -5897,8 +5870,7 @@ ...@@ -5897,8 +5870,7 @@
"eventemitter3": { "eventemitter3": {
"version": "4.0.7", "version": "4.0.7",
"resolved": "https://registry.npmmirror.com/eventemitter3/-/eventemitter3-4.0.7.tgz", "resolved": "https://registry.npmmirror.com/eventemitter3/-/eventemitter3-4.0.7.tgz",
"integrity": "sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw==", "integrity": "sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw=="
"dev": true
}, },
"events": { "events": {
"version": "3.3.0", "version": "3.3.0",
...@@ -7935,6 +7907,11 @@ ...@@ -7935,6 +7907,11 @@
"integrity": "sha512-efJLHhLjIyKRewNS9EGZ4UpI8NguuL6fKkhRxVuMmrGV2xN/0APGdQYwLFky5w9naebSZ0OwAGp0G6/2Cg90rA==", "integrity": "sha512-efJLHhLjIyKRewNS9EGZ4UpI8NguuL6fKkhRxVuMmrGV2xN/0APGdQYwLFky5w9naebSZ0OwAGp0G6/2Cg90rA==",
"dev": true "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": { "js-tokens": {
"version": "4.0.0", "version": "4.0.0",
"resolved": "https://registry.npmmirror.com/js-tokens/-/js-tokens-4.0.0.tgz", "resolved": "https://registry.npmmirror.com/js-tokens/-/js-tokens-4.0.0.tgz",
...@@ -12701,6 +12678,18 @@ ...@@ -12701,6 +12678,18 @@
"integrity": "sha512-2ham8XPWTONajOR0ohOKOHXkm3+gaBmGut3SRuu75xLd/RRaY6vqgh8NBYYk7+RW3u5AtzPQZG8F10LHkl0lAQ==", "integrity": "sha512-2ham8XPWTONajOR0ohOKOHXkm3+gaBmGut3SRuu75xLd/RRaY6vqgh8NBYYk7+RW3u5AtzPQZG8F10LHkl0lAQ==",
"dev": true "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": { "vue": {
"version": "2.6.14", "version": "2.6.14",
"resolved": "https://registry.npmmirror.com/vue/-/vue-2.6.14.tgz", "resolved": "https://registry.npmmirror.com/vue/-/vue-2.6.14.tgz",
...@@ -12809,6 +12798,75 @@ ...@@ -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": { "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",
......
...@@ -16,6 +16,7 @@ ...@@ -16,6 +16,7 @@
"glsx-components": "^1.5.3", "glsx-components": "^1.5.3",
"lodash": "^4.17.21", "lodash": "^4.17.21",
"node-sass": "^4.0.0", "node-sass": "^4.0.0",
"vod-js-sdk-v6": "^1.5.0",
"vue": "^2.6.10", "vue": "^2.6.10",
"vue-router": "^3.1.3", "vue-router": "^3.1.3",
"vuedraggable": "^2.24.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) { ...@@ -11,9 +11,9 @@ export const fetchConfig = function(isEnv = true) {
// } // }
//return window.fetch('https://', {}).then(res => res.json()) //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' }) // 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({ 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 = { export const config = {
install(vue, cfg) { 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 @@ ...@@ -27,44 +27,45 @@
<div class="groupTitle">{{ materialGroupName }}(共{{ tableTotal }}条数据)</div> <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"> <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">
<!-- 素材为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> <span class="hide-content">{{ scope.scope.materialContentRpcResponse.materialName }}</span>
</el-tooltip> <!-- 素材为PDF -->
</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'"> <!-- <el-popover placement="top" trigger="hover" v-if="scope.scope.urlType == 'img'">-->
<div> <!-- <div>-->
<img class="img-plus" :src="scope.scope.materialContentRpcResponse.materialUrl" alt="" /> <!-- <img class="img-plus" :src="scope.scope.materialContentRpcResponse.materialUrl" alt="" />-->
</div> <!-- </div>-->
<div slot="reference" class="urlContent"> <!-- <div slot="reference" class="urlContent">-->
<img style="margin-right:8px" :src="scope.scope.materialContentRpcResponse.materialUrl" alt="" /> <!-- <img style="margin-right:8px" :src="scope.scope.materialContentRpcResponse.materialUrl" alt="" />-->
<div class="videoMask" v-if="scope.scope.imgCount > 1"> <!-- <div class="videoMask" v-if="scope.scope.imgCount > 1">-->
<img src="@/assets/material/multi.png" alt="" /> <!-- <img src="@/assets/material/multi.png" alt="" />-->
<span>{{ scope.scope.imgCount }}</span> <!-- <span>{{ scope.scope.imgCount }}</span>-->
</div> <!-- </div>-->
</div> <!-- </div>-->
</el-popover> <!-- </el-popover>-->
<!-- 视频 --> <!-- 视频 -->
<div class="urlContent" v-if="scope.scope.urlType == 'video'" @click="videoOpen(scope.scope)"> <!-- <div class="urlContent" v-if="scope.scope.urlType == 'video'" @click="videoOpen(scope.scope)">-->
<video preload loop muted width="36" height="36"> <!-- <video preload loop muted width="36" height="36">-->
<source :src="scope.scope.materialContentRpcResponse.materialUrl" type="video/mp4" /> <!-- <source :src="scope.scope.materialContentRpcResponse.materialUrl" type="video/mp4" />-->
</video> <!-- </video>-->
<div class="videoMask"> <!-- <div class="videoMask">-->
<img src="@/assets/material/videoIcon.png" style="width: 22px;height: 22px;" alt="" /> <!-- <img src="@/assets/material/videoIcon.png" style="width: 22px;height: 22px;" alt="" />-->
</div> <!-- </div>-->
</div> <!-- </div>-->
<el-tooltip effect="dark" placement="top" :content="scope.scope.materialContentRpcResponse.materialName" :disabled="scope.scope.materialContentRpcResponse.materialName.length < 14"> <!-- <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> <!-- <span class="hide-content">{{ scope.scope.materialContentRpcResponse.materialName }}</span>-->
</el-tooltip> <!-- </el-tooltip>-->
</span> <!-- </span>-->
</div> </div>
<!-- 状态 --> <!-- 状态 -->
<div slot="status" class="dot" slot-scope="scope"> <div slot="status" class="dot" slot-scope="scope">
...@@ -146,6 +147,7 @@ export default { ...@@ -146,6 +147,7 @@ export default {
businessTypes: [], businessTypes: [],
// 素材组名称 // 素材组名称
materialGroupName: '', materialGroupName: '',
changeName:'编辑',
materialFormData: [ materialFormData: [
{ {
label: '业务类型', label: '业务类型',
...@@ -250,6 +252,23 @@ export default { ...@@ -250,6 +252,23 @@ export default {
type: 'text', type: 'text',
fn: '编辑' 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: { listeners: {
click: row => this.addMaterial(2, row) click: row => this.addMaterial(2, row)
} }
...@@ -284,7 +303,7 @@ export default { ...@@ -284,7 +303,7 @@ export default {
tableOption: true, tableOption: true,
tableColumns: [ tableColumns: [
{ {
label: '素材内容', label: '素材名称',
prop: 'materialContentRpcResponse', prop: 'materialContentRpcResponse',
addHtml: 'materialContentRpcResponse', addHtml: 'materialContentRpcResponse',
width: 270 width: 270
......
...@@ -105,7 +105,6 @@ ...@@ -105,7 +105,6 @@
<nickname-model v-if="isNicknameVisible" :isNicknameVisible.sync="isNicknameVisible" @handleNicknameConfirm="handleNicknameConfirm" @handleNicknameClose="handleNicknameClose"></nickname-model> <nickname-model v-if="isNicknameVisible" :isNicknameVisible.sync="isNicknameVisible" @handleNicknameConfirm="handleNicknameConfirm" @handleNicknameClose="handleNicknameClose"></nickname-model>
</div> </div>
</template> </template>
<script> <script>
import { limitPrice } from '@/common/constant' import { limitPrice } from '@/common/constant'
import ActivityModel from './components/activityModel' import ActivityModel from './components/activityModel'
...@@ -391,7 +390,6 @@ export default { ...@@ -391,7 +390,6 @@ export default {
} }
} }
}, },
props: { props: {
eventObj: { eventObj: {
type: Object, type: Object,
...@@ -419,13 +417,11 @@ export default { ...@@ -419,13 +417,11 @@ export default {
} }
} }
}, },
components: { components: {
ActivityModel, ActivityModel,
materialModel, materialModel,
nicknameModel nicknameModel
}, },
watch: { watch: {
editForm: { editForm: {
handler(val) { handler(val) {
...@@ -443,14 +439,12 @@ export default { ...@@ -443,14 +439,12 @@ export default {
this.editFormDataChannel[idx].optionList[2].isDisabled = [1, 2, 3].includes(val) this.editFormDataChannel[idx].optionList[2].isDisabled = [1, 2, 3].includes(val)
} }
}, },
created() { created() {
this.getDay('weekList', 7) this.getDay('weekList', 7)
this.getDay('monthList', 31) this.getDay('monthList', 31)
this.predictCountObj = JSON.parse(JSON.stringify(this.parentCustomerObj.parentPredictObj)) this.predictCountObj = JSON.parse(JSON.stringify(this.parentCustomerObj.parentPredictObj))
// this.limitQwPhone() // this.limitQwPhone()
}, },
mounted() { mounted() {
Object.assign(this.editForm, this.eventObj.info) Object.assign(this.editForm, this.eventObj.info)
this.getStaffTypeList() this.getStaffTypeList()
...@@ -459,7 +453,6 @@ export default { ...@@ -459,7 +453,6 @@ export default {
}) })
this.eventObj.addOrEdit != 'add' ? this.getInfo() : '' this.eventObj.addOrEdit != 'add' ? this.getInfo() : ''
}, },
methods: { methods: {
getOptionsList(formName, hasAll = true, refreshSigle) { getOptionsList(formName, hasAll = true, refreshSigle) {
if (refreshSigle) { if (refreshSigle) {
...@@ -486,18 +479,15 @@ export default { ...@@ -486,18 +479,15 @@ export default {
}) })
} }
}, },
handleResetMaxSet() { handleResetMaxSet() {
this.maxReachesTypeSet = '' this.maxReachesTypeSet = ''
}, },
getStaffTypeList() { getStaffTypeList() {
this.$apis.common.getStaffFollowerListApi({}).then(res => { this.$apis.common.getStaffFollowerListApi({}).then(res => {
this.baseData.staffTypeList = res this.baseData.staffTypeList = res
this.getOptionsList('editFormDataChannel', false, 'followerTypeId') this.getOptionsList('editFormDataChannel', false, 'followerTypeId')
}) })
}, },
getDay(attrName, day) { getDay(attrName, day) {
let weekNameList = ['一', '二', '三', '四', '五', '六', '日'] let weekNameList = ['一', '二', '三', '四', '五', '六', '日']
for (var i = 0; i < day; i++) { for (var i = 0; i < day; i++) {
...@@ -507,7 +497,6 @@ export default { ...@@ -507,7 +497,6 @@ export default {
}) })
} }
}, },
recoveryRepeat() { recoveryRepeat() {
var idx = this.editFormDataRepeat.findIndex(item => item.name == 'repeatMode') var idx = this.editFormDataRepeat.findIndex(item => item.name == 'repeatMode')
this.editFormDataRepeat[idx].isHide = this.editForm.repeatFlag == 'N' this.editFormDataRepeat[idx].isHide = this.editForm.repeatFlag == 'N'
...@@ -522,7 +511,6 @@ export default { ...@@ -522,7 +511,6 @@ export default {
this.editForm.reachesTypeSet = 1 this.editForm.reachesTypeSet = 1
} }
}, },
recoveryEndTime() { recoveryEndTime() {
var idx = this.editFormDataTime.findIndex(item => item.name == 'eventEndDate') var idx = this.editFormDataTime.findIndex(item => item.name == 'eventEndDate')
var startTime = new Date(this.editForm.eventStartDate) var startTime = new Date(this.editForm.eventStartDate)
...@@ -536,7 +524,6 @@ export default { ...@@ -536,7 +524,6 @@ export default {
} }
} }
}, },
getInfo() { getInfo() {
this.editForm.eventStartDate = moment(this.editForm.eventStartDate).format('YYYY-MM-DD') 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') : '' this.editForm.eventEndDate = this.editForm.eventEndDate ? moment(this.editForm.eventEndDate).format('YYYY-MM-DD') : ''
...@@ -545,11 +532,9 @@ export default { ...@@ -545,11 +532,9 @@ export default {
this.recoveryEndTime() this.recoveryEndTime()
this.getCustomerNum() this.getCustomerNum()
}, },
handleReachesType(val) { handleReachesType(val) {
this.editForm.reachesTypeSet = val == 1 ? 1 : '' this.editForm.reachesTypeSet = val == 1 ? 1 : ''
}, },
// 素材 // 素材
handleMaterialConfirm(val) { handleMaterialConfirm(val) {
// additionalType 附加对象类型(1素材,2活动,3优惠券,4朋友券模板) // additionalType 附加对象类型(1素材,2活动,3优惠券,4朋友券模板)
...@@ -565,11 +550,9 @@ export default { ...@@ -565,11 +550,9 @@ export default {
] ]
this.handleMaterialClose() this.handleMaterialClose()
}, },
handleMaterialClose() { handleMaterialClose() {
this.isMaterialVisible = !this.isMaterialVisible this.isMaterialVisible = !this.isMaterialVisible
}, },
// 朋友圈模板 // 朋友圈模板
handleNicknameConfirm(val) { handleNicknameConfirm(val) {
// additionalType 附加对象类型(1素材,2活动,3优惠券,4朋友券模板) // additionalType 附加对象类型(1素材,2活动,3优惠券,4朋友券模板)
...@@ -588,11 +571,9 @@ export default { ...@@ -588,11 +571,9 @@ export default {
] ]
this.handleNicknameClose() this.handleNicknameClose()
}, },
handleNicknameClose() { handleNicknameClose() {
this.isNicknameVisible = !this.isNicknameVisible this.isNicknameVisible = !this.isNicknameVisible
}, },
// 营销内容 // 营销内容
handleFun(name) { handleFun(name) {
if (name == 'material') { if (name == 'material') {
...@@ -605,7 +586,6 @@ export default { ...@@ -605,7 +586,6 @@ export default {
this.handleNicknameClose() this.handleNicknameClose()
} }
}, },
close(index) { close(index) {
this.previewList.splice(index, 1) this.previewList.splice(index, 1)
if (this.editForm.object.additionalType == 4) { if (this.editForm.object.additionalType == 4) {
...@@ -614,7 +594,6 @@ export default { ...@@ -614,7 +594,6 @@ export default {
} }
this.editForm.object = {} this.editForm.object = {}
}, },
selectActivity(val) { selectActivity(val) {
this.editForm.object = JSON.parse(JSON.stringify(val)) this.editForm.object = JSON.parse(JSON.stringify(val))
this.editRule.eventContent[0].required = true this.editRule.eventContent[0].required = true
...@@ -627,7 +606,6 @@ export default { ...@@ -627,7 +606,6 @@ export default {
] ]
}, },
// 营销内容 // 营销内容
getCustomerNum() { getCustomerNum() {
switch (this.parentCustomerObj.currentCustomerTypeName) { switch (this.parentCustomerObj.currentCustomerTypeName) {
case '人群': case '人群':
...@@ -640,7 +618,6 @@ export default { ...@@ -640,7 +618,6 @@ export default {
break break
} }
}, },
getCustomerByCrowdList() { getCustomerByCrowdList() {
var params = { var params = {
pageSize: 1, pageSize: 1,
...@@ -653,7 +630,6 @@ export default { ...@@ -653,7 +630,6 @@ export default {
this.predictCountObj[this.editForm.pushChannelType == 2 ? 'phone' : 'qiwei'] = res.count this.predictCountObj[this.editForm.pushChannelType == 2 ? 'phone' : 'qiwei'] = res.count
}) })
}, },
getCustomerByTagList() { getCustomerByTagList() {
var params = { var params = {
combineType: 2, combineType: 2,
...@@ -684,7 +660,6 @@ export default { ...@@ -684,7 +660,6 @@ export default {
whereToGo(id) { whereToGo(id) {
document.getElementById(id).scrollIntoView() document.getElementById(id).scrollIntoView()
}, },
handleConfirm() { handleConfirm() {
var countParams = { var countParams = {
eventStartDate: this.editForm.eventStartDate, eventStartDate: this.editForm.eventStartDate,
......
...@@ -7,7 +7,6 @@ ...@@ -7,7 +7,6 @@
</div> </div>
<div class="container"> <div class="container">
<GLCombiForm ref="showSearch" :rowNumber="1" :formObj="searchForm" :formData="searchFormData" @handleOk="handleSearch" @handleRest="handleReset"></GLCombiForm> <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"> <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"> <div class="table-btns" slot="auth-button" slot-scope="scope">
...@@ -18,7 +17,6 @@ ...@@ -18,7 +17,6 @@
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import * as dayjs from 'dayjs' import * as dayjs from 'dayjs'
import url from '@/assets/empty.png' import url from '@/assets/empty.png'
...@@ -173,11 +171,9 @@ export default { ...@@ -173,11 +171,9 @@ export default {
} }
} }
}, },
mounted() { mounted() {
this.getOptionsList('searchFormData') this.getOptionsList('searchFormData')
}, },
methods: { methods: {
handleJump(path, row = {}) { handleJump(path, row = {}) {
this.$router.push({ this.$router.push({
...@@ -185,7 +181,6 @@ export default { ...@@ -185,7 +181,6 @@ export default {
query: row ? { id: row.id, fromPage: '/marketing/sop/sopList' } : '' query: row ? { id: row.id, fromPage: '/marketing/sop/sopList' } : ''
}) })
}, },
secondConfirm(title, txt, apiModule, apiName, apiParams, fn) { secondConfirm(title, txt, apiModule, apiName, apiParams, fn) {
this.$confirm(txt, title, { this.$confirm(txt, title, {
confirmButtonText: '确定', confirmButtonText: '确定',
...@@ -220,16 +215,13 @@ export default { ...@@ -220,16 +215,13 @@ export default {
query: params query: params
}) })
}, },
// 结束 // 结束
handleEnd(row) { handleEnd(row) {
this.secondConfirm('结束', '结束SOP后,将不再进行营销任务自动推送,且不可恢复。是否确定结束?', 'sop', 'endSopEventApi', { sopId: row.id }) this.secondConfirm('结束', '结束SOP后,将不再进行营销任务自动推送,且不可恢复。是否确定结束?', 'sop', 'endSopEventApi', { sopId: row.id })
}, },
handleDelete(row) { handleDelete(row) {
this.secondConfirm('删除', 'SOP删除后,不可恢复。是否确定删除?', 'sop', 'deleteSopEventApi', { sopId: row.id }) this.secondConfirm('删除', 'SOP删除后,不可恢复。是否确定删除?', 'sop', 'deleteSopEventApi', { sopId: row.id })
}, },
getOptionsList(formName, hasAll = true, refreshSigle) { getOptionsList(formName, hasAll = true, refreshSigle) {
if (refreshSigle) { if (refreshSigle) {
var item = this[formName].find(k => k.name == refreshSigle) var item = this[formName].find(k => k.name == refreshSigle)
...@@ -255,22 +247,18 @@ export default { ...@@ -255,22 +247,18 @@ export default {
}) })
} }
}, },
setTableFinishFun() { setTableFinishFun() {
//接收到的数据为空 //接收到的数据为空
this.$refs.sopListRef.data.length ? (this.$refs.sopListRef.tableHeightValues = '') : this.$refs.sopListRef.setTableHeightFun() this.$refs.sopListRef.data.length ? (this.$refs.sopListRef.tableHeightValues = '') : this.$refs.sopListRef.setTableHeightFun()
}, },
handleBack() { handleBack() {
this.$router.push({ this.$router.push({
path: '/sop/index' path: '/sop/index'
}) })
}, },
handleSearch() { handleSearch() {
this.$refs.sopListRef.refreshTable() this.$refs.sopListRef.refreshTable()
}, },
handleReset() { handleReset() {
this.searchForm = { this.searchForm = {
sopName: '', sopName: '',
...@@ -281,7 +269,6 @@ export default { ...@@ -281,7 +269,6 @@ export default {
} }
} }
</script> </script>
<style scoped> <style scoped>
.sop-list .sop-back-btn { .sop-list .sop-back-btn {
position: absolute; position: absolute;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!