Commit ed5d49d7 by 前端

Merge branch 'xuyl_dev_v3.3.0' into 'master'

合并3.3.0代码到主干

See merge request !396
2 parents aec657b2 38cf76c6
...@@ -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>
/*
* @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)
})
}
})
}
}
}
...@@ -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;
} }
......
...@@ -18,7 +18,7 @@ export default { ...@@ -18,7 +18,7 @@ export default {
props: { props: {
excludeMenus: { excludeMenus: {
type: Array, type: Array,
default: () => ['code'] default: () => ['code','video']
}, },
boxHeight:{ boxHeight:{
type: Number, type: Number,
......
<template>
<div class="sub-el-table-column">
<el-table-column v-for="(item, index) in reverseData" :key="index + 'child'" :label="item.label" :prop="item.prop" :width="item.width" :min-width="item.minWidth" :fixed="item.fixed" :align="item.align || 'left'" :sortable="item.sortable" :render-header="item.renderHeader" v-bind="item.columnattrs ? item.columnattrs : {}" v-on="item.columnlisteners ? item.columnlisteners : {}">
<template slot-scope="scope">
<slot v-if="item.addHtml" :name="item.addHtml" :scope="scope.row" :prop="item.prop" :width="item.width"></slot>
<template v-else-if="item.formatter">
<el-popover v-if="scope.row[item.prop] && scope.row[item.prop].length >= Math.ceil((item.width - 36) / 14) * item.line" placement="top" popper-class="base-popper" trigger="hover" :content="item.formatter(scope.row)">
<span slot="reference" class="line-ellipsis" :style="{ '-webkit-line-clamp': item.line ? item.line : '' }">
{{ item.formatter(scope.row) | lineEllipsis(item.width, item.line) }}
</span>
</el-popover>
<span v-else class="line-ellipsis" :style="{ '-webkit-line-clamp': item.line ? item.line : '' }">
<!-- {{ item.formatter(scope.row) || '--' }} -->
{{ item.formatter(scope.row) | tableCellFormat }}
</span>
</template>
<template v-else-if="getListApi">
<el-popover v-if="scope.row[item.prop] && scope.row[item.prop].length >= Math.ceil((item.width - 36) / 14) * item.line" placement="top" popper-class="base-popper" trigger="hover" :content="scope.row[item.prop]">
<span slot="reference" class="line-ellipsis" :style="{ '-webkit-line-clamp': item.line ? item.line : '' }">
{{ scope.row[item.prop] | lineEllipsis(item.width, item.line) }}
</span>
</el-popover>
<span v-else class="line-ellipsis" :style="{ '-webkit-line-clamp': item.line ? item.line : '' }">
<!-- {{ scope.row[item.prop] || '--' }} -->
{{ scope.row[item.prop] | tableCellFormat }}
</span>
</template>
<template v-else>
<!-- 大于10或 20个字节长度 -->
<el-popover v-if="tableData[scope.$index][item.prop] && tableData[scope.$index][item.prop].length >= Math.ceil((item.width - 36) / 14) * item.line" placement="top" width="200" trigger="hover" :content="tableData[scope.$index][item.prop]">
<span slot="reference" class="line-ellipsis" :style="{ '-webkit-line-clamp': item.line ? item.line : '' }">
{{ tableData[scope.$index][item.prop] | lineEllipsis(item.width, item.line) }}
</span>
</el-popover>
<!-- <span v-else class="line-ellipsis" :style="{ '-webkit-line-clamp': item.line ? item.line : '' }" v-text="tableData[scope.$index][item.prop]"></span> -->
<span v-else class="line-ellipsis" :style="{ '-webkit-line-clamp': item.line ? item.line : '' }">
<!-- {{ tableData[scope.$index][item.prop] || '--' }} -->
{{ tableData[scope.$index][item.prop] | tableCellFormat }}
</span>
</template>
<template v-if="item.addSymbol">
<span v-text="item.addSymbol"></span>
</template>
</template>
<!-- 递归 -->
<sub-el-table-column v-if="item.children" :data="item.children" :tableData="tableData" :getListApi="getListApi"></sub-el-table-column>
</el-table-column>
</div>
</template>
<script>
// import GlSubTableColumn from '../../GlSubTableColumn'
export default {
name: 'sub-el-table-column',
props: {
data: {
type: Array,
default: () => []
},
// 表格数据-外部传入
tableData: {
type: Array,
default: () => []
},
// 获取列表接口
getListApi: {
type: Function,
default: null
}
},
computed: {
reverseData() {
let arr = [...this.data]
let temp = arr.pop()
arr.unshift(temp)
return arr
}
},
// components: {
// GlSubTableColumn
// }
// created(){
// // console.log('data',this.data)
// }
}
</script>
<style lang="scss">
// .sub-el-table-column {
// }
</style>
...@@ -10,102 +10,81 @@ ...@@ -10,102 +10,81 @@
fn="新增众筹" fn="新增众筹"
mode="el-button" mode="el-button"
>新建众筹</GLButton> --> >新建众筹</GLButton> -->
<el-button <el-button :size="size"
:size="size" type="default"
type="default" class="default-blue-btn"
class="default-blue-btn" @click="handleJump">订单管理</el-button>
@click="handleJump"
>订单管理</el-button>
</div> </div>
<div class="container"> <div class="container">
<GLCombiForm <GLCombiForm ref="showSearch"
ref="showSearch" :rowNumber="1"
:rowNumber="1" :formObj="searchForm"
:formObj="searchForm" :formData="searchFormData"
:formData="searchFormData" @handleOk="handleSearch"
@handleOk="handleSearch" @handleRest="handleReset"></GLCombiForm>
@handleRest="handleReset"
></GLCombiForm>
<div class="flex m-b-10 w-100-percent"> <div class="flex m-b-10 w-100-percent">
<span class="table-title"></span> <span class="table-title"></span>
<el-button <el-button :size="size"
:size="size" class="default-blue-btn"
class="default-blue-btn" type="default"
type="default" @click="handleExport">导出</el-button>
@click="handleExport"
>导出</el-button>
</div> </div>
<!-- 表格区域 开始 --> <!-- 表格区域 开始 -->
<GLTable <single-gltable ref="activity"
ref="activity" :getListApi="getListApi"
:getListApi="getListApi" :noDataImg="url"
:noDataImg="url" :searchForm="tableSearchForm"
:searchForm="tableSearchForm" :tableParams="tableParams"
:tableParams="tableParams" :pageConf="pageConf"
:pageConf="pageConf" :beforeSearchFn="beforeSearchFn"
:beforeSearchFn="beforeSearchFn" @setTableFinishFun="setTableFinishFun">
@setTableFinishFun="setTableFinishFun" <div slot="activityImg"
> class="table-image"
<div slot-scope="scope">
slot="activityImg" <el-popover placement="top"
class="table-image" width="160"
slot-scope="scope" trigger="hover"
> popper-class="table-popover-block">
<el-popover <img class="table-popover-img"
placement="top" :src="scope.scope.activityImg" />
width="160" <img class="img-60 pointer"
trigger="hover" slot="reference"
popper-class="table-popover-block" :src="scope.scope.activityImg" />
>
<img
class="table-popover-img"
:src="scope.scope.activityImg"
/>
<img
class="img-60 pointer"
slot="reference"
:src="scope.scope.activityImg"
/>
</el-popover> </el-popover>
</div> </div>
<div <div slot="linkText"
slot="linkText" slot-scope="scope">
slot-scope="scope" <p class="cursor-pointer"
> @click="handleDetail(scope)">{{ scope.scope[scope.prop] || 0 }}</p>
<p
class="cursor-pointer"
@click="handleDetail(scope)"
>{{scope.scope[scope.prop] || 0}}</p>
</div> </div>
<div <div class="table-btns"
class="table-btns" slot="auth-button"
slot="auth-button" slot-scope="scope">
slot-scope="scope" <GLTableButton :buttonList="tableButtonList"
> :buttonItem="scope.scope"
<GLTableButton :buttonNum="3"></GLTableButton>
:buttonList="tableButtonList"
:buttonItem="scope.scope"
:buttonNum="3"
></GLTableButton>
</div> </div>
</GLTable> </single-gltable>
<!-- 表格区域 end --> <!-- 表格区域 end -->
</div> </div>
<!-- 众筹分享 --> <!-- 众筹分享 -->
<crowdFundingShare :isShareVisible="isShareVisible" :shareForm="shareForm" @handleShareClose="handleShareClose"></crowdFundingShare> <crowdFundingShare :isShareVisible="isShareVisible"
:shareForm="shareForm"
@handleShareClose="handleShareClose"></crowdFundingShare>
</div> </div>
</template> </template>
<script> <script>
import crowdFundingShare from '../productGroup/components/crowdFundingShareDialog.vue' import crowdFundingShare from '../productGroup/components/crowdFundingShareDialog.vue'
import GLTable from './components/table/index'
import * as dayjs from 'dayjs' import * as dayjs from 'dayjs'
import url from '@/assets/empty.png' import url from '@/assets/empty.png'
import { exportFn } from '@/common/constant' import { exportFn } from '@/common/constant'
export default { export default {
name: 'crowdFundList', name: 'crowdFundList',
data () { data() {
return { return {
size: 'small', size: 'small',
url: url, url: url,
...@@ -273,7 +252,14 @@ export default { ...@@ -273,7 +252,14 @@ export default {
{ {
label: '活动名称', label: '活动名称',
prop: 'activityName', prop: 'activityName',
width: 220 width: 220,
fixed: 'left'
},
{
label: '门店',
prop: 'merchantName',
width: 220,
fixed: 'left'
}, },
{ {
label: '缩略图', label: '缩略图',
...@@ -281,6 +267,20 @@ export default { ...@@ -281,6 +267,20 @@ export default {
addHtml: 'activityImg' addHtml: 'activityImg'
}, },
{ {
label: '收款模式',
prop: 'payMentModel',
width: 220,
formatter: cellValue => {
const model = {
1: '广联收定金和尾款',
2: '广联收定金门店收尾款',
3: '广联收定金门店收全款退定金',
4: '门店收定金和尾款'
}
return model[cellValue.paymentModel] || '--'
}
},
{
label: '浏览量(次)', label: '浏览量(次)',
prop: 'viewAmount', prop: 'viewAmount',
addHtml: 'linkText', addHtml: 'linkText',
...@@ -373,19 +373,20 @@ export default { ...@@ -373,19 +373,20 @@ export default {
}, },
components: { components: {
crowdFundingShare crowdFundingShare,
singleGltable: GLTable
}, },
mounted () { mounted() {
this.getOptionsList('searchFormData') this.getOptionsList('searchFormData')
}, },
methods: { methods: {
getParams () { getParams() {
var params = JSON.parse(JSON.stringify(this.searchForm)) var params = JSON.parse(JSON.stringify(this.searchForm))
return params return params
}, },
beforeSearchFn () { beforeSearchFn() {
return new Promise(resolve => { return new Promise(resolve => {
this.tableSearchForm = this.getParams() this.tableSearchForm = this.getParams()
// delete this.tableSearchForm.createDate // delete this.tableSearchForm.createDate
...@@ -393,13 +394,13 @@ export default { ...@@ -393,13 +394,13 @@ export default {
}) })
}, },
handleJump (path, row = {}) { handleJump(path, row = {}) {
this.$router.push({ this.$router.push({
path: '/orderManage/index' path: '/orderManage/index'
}) })
}, },
secondConfirm (title, txt, apiModule, apiName, apiParams, fn) { secondConfirm(title, txt, apiModule, apiName, apiParams, fn) {
this.$confirm(txt, title, { this.$confirm(txt, title, {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
...@@ -425,16 +426,16 @@ export default { ...@@ -425,16 +426,16 @@ export default {
}, },
//开始 //开始
start (item) { start(item) {
this.startOrEndConfirm('开始', item) this.startOrEndConfirm('开始', item)
}, },
//结束 //结束
end (item) { end(item) {
this.startOrEndConfirm('结束', item) this.startOrEndConfirm('结束', item)
}, },
startOrEndConfirm (txt, row) { startOrEndConfirm(txt, row) {
var title = txt var title = txt
var params = {} var params = {}
params.id = row.id params.id = row.id
...@@ -447,25 +448,26 @@ export default { ...@@ -447,25 +448,26 @@ export default {
}, },
//置顶 //置顶
topping (row) { topping(row) {
var params = {} var params = {}
params.id = row.id params.id = row.id
this.secondConfirm('删除', '确定置顶此活动?', 'seckillActivity', 'topActivityApi', params) this.secondConfirm('删除', '确定置顶此活动?', 'seckillActivity', 'topActivityApi', params)
}, },
//删除 //删除
del (row) { del(row) {
var params = {} var params = {}
params.id = row.id params.id = row.id
this.secondConfirm('删除', '确定删除此活动?', 'seckillActivity', 'deleteActivityApi', params) this.secondConfirm('删除', '确定删除此活动?', 'seckillActivity', 'deleteActivityApi', params)
}, },
// 1-新增;2-编辑 // 1-新增;2-编辑
handleEdit (addOrEdit, row) { handleEdit(addOrEdit, row) {
var txtObj = { var txtObj = {
add: '新建', add: '新建',
edit: '编辑', edit: '编辑',
copy: '复制' copy: '复制',
detail: '编辑'
}[addOrEdit] }[addOrEdit]
var params = { var params = {
addOrEdit: addOrEdit, addOrEdit: addOrEdit,
...@@ -484,7 +486,7 @@ export default { ...@@ -484,7 +486,7 @@ export default {
// console.log(JSON.parse(JSON.stringify(option))) // console.log(JSON.parse(JSON.stringify(option)))
// }, // },
// 明细 // 明细
handleDetail ({ prop, scope }) { handleDetail({ prop, scope }) {
let data = { let data = {
viewAmount: { viewAmount: {
type: 1, type: 1,
...@@ -505,30 +507,30 @@ export default { ...@@ -505,30 +507,30 @@ export default {
id: scope.id, id: scope.id,
activityName: scope.activityName, activityName: scope.activityName,
type: data.type, type: data.type,
count: data.count, count: data.count
} }
}) })
}, },
handleExport () { handleExport() {
var params = this.getParams() var params = this.getParams()
this.$apis.seckillActivity.exportCrowdfundApi(params).then(res => { this.$apis.seckillActivity.exportCrowdfundApi(params).then(res => {
exportFn(res) exportFn(res)
}) })
}, },
handleShare (row) { handleShare(row) {
this.$apis.seckillActivity.getCrowdSharedApi({ id: row.id }).then(res => { this.$apis.seckillActivity.getCrowdSharedApi({ id: row.id }).then(res => {
this.shareForm = res this.shareForm = res
this.handleShareClose() this.handleShareClose()
}) })
}, },
handleShareClose () { handleShareClose() {
this.isShareVisible = !this.isShareVisible this.isShareVisible = !this.isShareVisible
}, },
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)
var index = this[formName].findIndex(k => k.name == refreshSigle) var index = this[formName].findIndex(k => k.name == refreshSigle)
...@@ -554,11 +556,11 @@ export default { ...@@ -554,11 +556,11 @@ export default {
} }
}, },
handleSearch () { handleSearch() {
this.$refs.activity.refreshTable() this.$refs.activity.refreshTable()
}, },
handleReset () { handleReset() {
this.searchForm = { this.searchForm = {
activityName: '', activityName: '',
activityStatus: '' activityStatus: ''
...@@ -566,7 +568,7 @@ export default { ...@@ -566,7 +568,7 @@ export default {
this.handleSearch() this.handleSearch()
}, },
setTableFinishFun () { setTableFinishFun() {
//接收到的数据为空 //接收到的数据为空
this.$refs.activity.data.length ? (this.$refs.activity.tableHeightValues = '') : this.$refs.activity.setTableHeightFun() this.$refs.activity.data.length ? (this.$refs.activity.tableHeightValues = '') : this.$refs.activity.setTableHeightFun()
} }
......
...@@ -46,7 +46,8 @@ ...@@ -46,7 +46,8 @@
:rowNumber="1" :rowNumber="1"
:formObj="searchRankForm" :formObj="searchRankForm"
:formData="searchFormRankData" :formData="searchFormRankData"
@handleOk="handleSearchRank"></GLCombiForm> @handleOk="handleSearchRank"
@handleRest="handleReset"></GLCombiForm>
<div class="flex m-b-10 w-100-percent"> <div class="flex m-b-10 w-100-percent">
<span class="table-title"></span> <span class="table-title"></span>
<el-button :size="size" <el-button :size="size"
...@@ -358,10 +359,10 @@ export default { ...@@ -358,10 +359,10 @@ export default {
this.getLiveData() this.getLiveData()
}, },
mounted() { mounted() {
let [dataResetBtn] = this.$refs.dataRef.$el.getElementsByClassName('el-button--default'), let [dataResetBtn] = this.$refs.dataRef.$el.getElementsByClassName('el-button--default')
[rankResetBtn] = this.$refs.rankRef.$el.getElementsByClassName('el-button--default') // [rankResetBtn] = this.$refs.rankRef.$el.getElementsByClassName('el-button--default')
if (dataResetBtn) dataResetBtn.style.display = 'none' if (dataResetBtn) dataResetBtn.style.display = 'none'
if (rankResetBtn) rankResetBtn.style.display = 'none' // if (rankResetBtn) rankResetBtn.style.display = 'none'
}, },
methods: { methods: {
...@@ -386,6 +387,11 @@ export default { ...@@ -386,6 +387,11 @@ export default {
// 直播间数据统计 // 直播间数据统计
// this.getLiveBroadcastRoomDataStatistics() // this.getLiveBroadcastRoomDataStatistics()
}, },
handleReset() {
this.searchRankForm = this.$options.data.call(this).searchRankForm
// this.$refs.rankRef.refreshTable()
// this.handleSearch()
},
getDailyOrderQuantityStatistics() { getDailyOrderQuantityStatistics() {
this.$apis.seckillActivity this.$apis.seckillActivity
.getDailyOrderQuantityStatistics({ id: this.activityId }) .getDailyOrderQuantityStatistics({ id: this.activityId })
......
...@@ -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,
...@@ -662,18 +638,18 @@ export default { ...@@ -662,18 +638,18 @@ export default {
tagLists: [] tagLists: []
} }
this.parentCustomerObj.list && this.parentCustomerObj.list &&
this.parentCustomerObj.list.forEach(item => { this.parentCustomerObj.list.forEach(item => {
item.labelList.length && item.labelList.length &&
item.labelList.forEach(subItem => { item.labelList.forEach(subItem => {
params.tagLists.push({ params.tagLists.push({
groupId: item.labelGroup.id, groupId: item.labelGroup.id,
groupName: item.labelGroup.name, groupName: item.labelGroup.name,
groupType: item.labelType, groupType: item.labelType,
labelId: subItem.id, labelId: subItem.id,
labelName: subItem.name labelName: subItem.name
}) })
})
}) })
})
// 1-企业微信;2-短信;3-微信朋友圈 // 1-企业微信;2-短信;3-微信朋友圈
this.editForm.pushChannelType == 2 ? (params.customerPhone = '1') : (params.isJoin = 1) this.editForm.pushChannelType == 2 ? (params.customerPhone = '1') : (params.isJoin = 1)
this.$apis.sop.getCustomerByTagListApi(params).then(res => { this.$apis.sop.getCustomerByTagListApi(params).then(res => {
...@@ -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,
...@@ -746,10 +721,10 @@ export default { ...@@ -746,10 +721,10 @@ export default {
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning' type: 'warning'
}) })
.then(() => { .then(() => {
this.cancelJump() this.cancelJump()
}) })
.catch(() => { }) .catch(() => { })
} else { } else {
this.cancelJump() this.cancelJump()
} }
...@@ -849,4 +824,4 @@ export default { ...@@ -849,4 +824,4 @@ export default {
} }
} }
} }
</style>
\ No newline at end of file \ No newline at end of file
</style>
...@@ -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!