Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas
/
scrm-micro-marketing
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit e019a82a
authored
Aug 21, 2023
by
杨明
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
素材
1 parent
d20dad0e
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
239 additions
and
109 deletions
package-lock.json
src/api/glsxUpload.js
src/api/uploadApi.js
src/config/index.js
src/views/material/addMaterial.vue
src/views/material/index.vue
package-lock.json
View file @
e019a82
...
@@ -2083,6 +2083,17 @@
...
@@ -2083,6 +2083,17 @@
"color-convert"
:
"^2.0.1"
"color-convert"
:
"^2.0.1"
}
}
},
},
"chalk"
:
{
"version"
:
"4.1.2"
,
"resolved"
:
"https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz"
,
"integrity"
:
"sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA=="
,
"dev"
:
true
,
"optional"
:
true
,
"requires"
:
{
"ansi-styles"
:
"^4.1.0"
,
"supports-color"
:
"^7.1.0"
}
},
"cliui"
:
{
"cliui"
:
{
"version"
:
"6.0.0"
,
"version"
:
"6.0.0"
,
"resolved"
:
"https://registry.npmmirror.com/cliui/-/cliui-6.0.0.tgz"
,
"resolved"
:
"https://registry.npmmirror.com/cliui/-/cliui-6.0.0.tgz"
,
...
@@ -2124,6 +2135,13 @@
...
@@ -2124,6 +2135,13 @@
"integrity"
:
"sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A=="
,
"integrity"
:
"sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A=="
,
"dev"
:
true
"dev"
:
true
},
},
"has-flag"
:
{
"version"
:
"4.0.0"
,
"resolved"
:
"https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz"
,
"integrity"
:
"sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ=="
,
"dev"
:
true
,
"optional"
:
true
},
"is-fullwidth-code-point"
:
{
"is-fullwidth-code-point"
:
{
"version"
:
"3.0.0"
,
"version"
:
"3.0.0"
,
"resolved"
:
"https://registry.npmmirror.com/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz"
,
"resolved"
:
"https://registry.npmmirror.com/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz"
,
...
@@ -2165,6 +2183,28 @@
...
@@ -2165,6 +2183,28 @@
"ansi-regex"
:
"^5.0.1"
"ansi-regex"
:
"^5.0.1"
}
}
},
},
"supports-color"
:
{
"version"
:
"7.2.0"
,
"resolved"
:
"https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz"
,
"integrity"
:
"sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw=="
,
"dev"
:
true
,
"optional"
:
true
,
"requires"
:
{
"has-flag"
:
"^4.0.0"
}
},
"vue-loader-v16"
:
{
"version"
:
"npm:vue-loader@16.8.3"
,
"resolved"
:
"https://registry.npmjs.org/vue-loader/-/vue-loader-16.8.3.tgz"
,
"integrity"
:
"sha512-7vKN45IxsKxe5GcVCbc2qFU5aWzyiLrYJyUuMz4BQLKctCj/fmCa0w6fGiiQ2cLFetNcek1ppGJQDCup0c1hpA=="
,
"dev"
:
true
,
"optional"
:
true
,
"requires"
:
{
"chalk"
:
"^4.1.0"
,
"hash-sum"
:
"^2.0.0"
,
"loader-utils"
:
"^2.0.0"
}
},
"wrap-ansi"
:
{
"wrap-ansi"
:
{
"version"
:
"6.2.0"
,
"version"
:
"6.2.0"
,
"resolved"
:
"https://registry.npmmirror.com/wrap-ansi/-/wrap-ansi-6.2.0.tgz"
,
"resolved"
:
"https://registry.npmmirror.com/wrap-ansi/-/wrap-ansi-6.2.0.tgz"
,
...
@@ -13657,75 +13697,6 @@
...
@@ -13657,75 +13697,6 @@
}
}
}
}
},
},
"vue-loader-v16"
:
{
"version"
:
"npm:vue-loader@16.8.3"
,
"resolved"
:
"https://registry.npmmirror.com/vue-loader/-/vue-loader-16.8.3.tgz"
,
"integrity"
:
"sha512-7vKN45IxsKxe5GcVCbc2qFU5aWzyiLrYJyUuMz4BQLKctCj/fmCa0w6fGiiQ2cLFetNcek1ppGJQDCup0c1hpA=="
,
"dev"
:
true
,
"optional"
:
true
,
"requires"
:
{
"chalk"
:
"^4.1.0"
,
"hash-sum"
:
"^2.0.0"
,
"loader-utils"
:
"^2.0.0"
},
"dependencies"
:
{
"ansi-styles"
:
{
"version"
:
"4.3.0"
,
"resolved"
:
"https://registry.npmmirror.com/ansi-styles/-/ansi-styles-4.3.0.tgz"
,
"integrity"
:
"sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg=="
,
"dev"
:
true
,
"optional"
:
true
,
"requires"
:
{
"color-convert"
:
"^2.0.1"
}
},
"chalk"
:
{
"version"
:
"4.1.2"
,
"resolved"
:
"https://registry.npmmirror.com/chalk/-/chalk-4.1.2.tgz"
,
"integrity"
:
"sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA=="
,
"dev"
:
true
,
"optional"
:
true
,
"requires"
:
{
"ansi-styles"
:
"^4.1.0"
,
"supports-color"
:
"^7.1.0"
}
},
"color-convert"
:
{
"version"
:
"2.0.1"
,
"resolved"
:
"https://registry.npmmirror.com/color-convert/-/color-convert-2.0.1.tgz"
,
"integrity"
:
"sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ=="
,
"dev"
:
true
,
"optional"
:
true
,
"requires"
:
{
"color-name"
:
"~1.1.4"
}
},
"color-name"
:
{
"version"
:
"1.1.4"
,
"resolved"
:
"https://registry.npmmirror.com/color-name/-/color-name-1.1.4.tgz"
,
"integrity"
:
"sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA=="
,
"dev"
:
true
,
"optional"
:
true
},
"has-flag"
:
{
"version"
:
"4.0.0"
,
"resolved"
:
"https://registry.npmmirror.com/has-flag/-/has-flag-4.0.0.tgz"
,
"integrity"
:
"sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ=="
,
"dev"
:
true
,
"optional"
:
true
},
"supports-color"
:
{
"version"
:
"7.2.0"
,
"resolved"
:
"https://registry.npmmirror.com/supports-color/-/supports-color-7.2.0.tgz"
,
"integrity"
:
"sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw=="
,
"dev"
:
true
,
"optional"
:
true
,
"requires"
:
{
"has-flag"
:
"^4.0.0"
}
}
}
},
"vue-router"
:
{
"vue-router"
:
{
"version"
:
"3.5.4"
,
"version"
:
"3.5.4"
,
"resolved"
:
"https://registry.npmmirror.com/vue-router/-/vue-router-3.5.4.tgz"
,
"resolved"
:
"https://registry.npmmirror.com/vue-router/-/vue-router-3.5.4.tgz"
,
...
...
src/api/glsxUpload.js
0 → 100644
View file @
e019a82
/*
* @Author: yangming yangming@didihu.com.cn
* @Date: 2023-08-21 11:35:26
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2023-08-21 16:25:51
* @FilePath: \scrm-micro-marketing\src\api\glsxUpload.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
/** 上传
* @param {*} baseURL method url 获取签名接口参数
* @param {*} uploadEvent(eventType, callback)
* eventType : media_upload 媒体上传完成, media_progress 媒体上传进度,cover_upload 图片上传完成, cover_progress 图片上传进度
* @returns params.url = 'rop-scrm-shopmall/router' params.data.method = 'scrm.api.shopmall.livebroadcast.uploadsignature'
*/
//npm install vod-js-sdk-v6
import
TcVod
from
'vod-js-sdk-v6'
import
{
http
}
from
'@/main'
// 请求配置
const
SIGN
=
{
v
:
'1.0.0'
,
source
:
'scm-home'
,
format
:
'json'
,
appKey
:
'48e5e13229b82c1b4e6e8c96151f0637'
}
const
SECRET
=
'c24619ed7fef02a0ae16328146bca5f97cc6493957a2137b'
const
REQUEST
=
{
timeout
:
180000
,
responseType
:
'json'
,
baseURL
:
'http://scrm.dev.glsx.com.cn'
,
withCredentials
:
true
}
// const RESPONSE = {
// code_key: ['code', 'returnCode'],
// code_message_map: {},
// code_success_value: '0',
// data_key: 'data',
// errId_logout_value: '21',
// message_key: 'message'
// }
class
GlsxUpload
{
constructor
(
params
)
{
this
.
initParam
=
params
}
init
()
{
return
new
Promise
((
resolve
,
reject
)
=>
{
if
(
this
.
tcVod
)
return
resolve
({
status
:
0
,
msg
:
'init successful'
})
const
{
params
:
{
data
,
url
}
=
{}
}
=
this
.
initParam
||
{}
console
.
log
(
data
)
return
http
({
data
,
url
:
url
,
returnAll
:
true
})
.
then
(
res
=>
{
if
(
res
.
code
==
'0'
)
{
this
.
tcVod
=
new
TcVod
({
getSignature
:
()
=>
{
return
res
.
data
}
})
}
if
(
this
.
tcVod
)
return
resolve
({
status
:
0
,
msg
:
'init successful'
})
reject
({
status
:
-
1
,
msg
:
'init failed'
})
})
.
catch
(
err
=>
{
reject
({
status
:
-
1
,
msg
:
'init failed'
})
})
})
}
uploaded
(
file
,
img
)
{
return
new
Promise
((
resolve
,
reject
)
=>
{
if
(
!
file
)
return
reject
({
status
:
-
1
,
msg
:
'file is required'
})
let
params
=
{
mediaFile
:
file
}
if
(
img
)
params
.
coverFile
=
img
this
.
uploader
=
this
.
tcVod
.
upload
(
params
)
this
.
uploader
.
done
()
.
then
(
doneResult
=>
{
resolve
(
doneResult
)
})
.
catch
(
err
=>
{
reject
(
err
)
})
})
}
uploadEvent
(
eventType
,
callback
)
{
if
(
!
eventType
)
callback
({
status
:
-
1
,
msg
:
'eventType is required'
})
try
{
this
.
uploader
.
on
(
eventType
,
info
=>
{
callback
(
info
)
})
}
catch
(
err
)
{
callback
(
err
)
}
}
uploadCancel
()
{
this
.
uploader
.
cancel
()
}
}
export
default
GlsxUpload
src/api/uploadApi.js
0 → 100644
View file @
e019a82
/*
* @Author: yangming yangming@didihu.com.cn
* @Date: 2023-08-21 11:35:02
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2023-08-21 11:37:50
* @FilePath: \scrm-micro-marketing\src\api\modules\uploadApi.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
import
GlsxUpload
from
'./glsxUpload'
const
upload
=
new
GlsxUpload
({
params
:
{
data
:
{
method
:
'scrm.api.shopmall.tencentcloudmedia.uploadsignature'
},
url
:
'rop-scrm-shopmall/router'
}
})
export
default
upload
src/config/index.js
View file @
e019a82
/*
* @Author: yangming yangming@didihu.com.cn
* @Date: 2022-10-19 18:34:08
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2023-08-21 11:24:44
* @FilePath: \scrm-micro-marketing\src\config\index.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
// 根据环境引入不同配置 process.env.VUE_APP_ENV
// 根据环境引入不同配置 process.env.VUE_APP_ENV
// let request = require('@/http/request.js')
// let request = require('@/http/request.js')
let
cfg
=
require
(
'./conf.js'
)
let
cfg
=
require
(
'./conf.js'
)
...
@@ -11,9 +19,9 @@ export const fetchConfig = function(isEnv = true) {
...
@@ -11,9 +19,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
)
{
...
...
src/views/material/addMaterial.vue
View file @
e019a82
...
@@ -246,7 +246,7 @@
...
@@ -246,7 +246,7 @@
import
textBox
from
'@/views/material/components/textBox'
import
textBox
from
'@/views/material/components/textBox'
import
SelectLabel
from
'@/views/material/components/selectLable'
import
SelectLabel
from
'@/views/material/components/selectLable'
import
bigView
from
'@/components/big-view'
import
bigView
from
'@/components/big-view'
//
import upload from '@/api/uploadApi'
import
upload
from
'@/api/uploadApi'
import
uploadMixin
from
'@/mixins/upload'
import
uploadMixin
from
'@/mixins/upload'
// import pdfReviewDia from './components/pdfReviewDia.vue'
// import pdfReviewDia from './components/pdfReviewDia.vue'
export
default
{
export
default
{
...
@@ -260,6 +260,7 @@ export default {
...
@@ -260,6 +260,7 @@ export default {
},
},
data
()
{
data
()
{
return
{
return
{
limitSize
:
50
,
title
:
'创建营销素材'
,
title
:
'创建营销素材'
,
titleObj
:
{
titleObj
:
{
1
:
'创建营销素材'
,
1
:
'创建营销素材'
,
...
@@ -336,26 +337,61 @@ export default {
...
@@ -336,26 +337,61 @@ export default {
this
.
dialogVisibleImg
=
true
this
.
dialogVisibleImg
=
true
this
.
dialogSrc
=
this
.
materialAddForm
.
videoUrl
this
.
dialogSrc
=
this
.
materialAddForm
.
videoUrl
},
},
// handleVideoChange(e) {
// let file = e.srcElement.files[0]
// let reader = new FileReader()
// // // 默认1MB
// const limitSize = 50
// const isLt = file.size / 1024 / 1024 < limitSize
// if (!isLt) {
// this.$message.error('上传视频大小不能超过' + limitSize + 'MB!')
// return true
// }
// reader.readAsDataURL(file)
// reader.onload = e => {
// const imgFile = e.target.result
// const base64 = file.name.split('.')[file.name.split('.').length - 1] + '@' + imgFile.split(',')[1]
// this.$apis.common.uploadVideoApi({ file: base64 }).then(res => {
// if (res) {
// this.materialAddForm.videoUrl = res
// }
// })
// }
// },
handleVideoChange
(
e
)
{
handleVideoChange
(
e
)
{
let
file
=
e
.
srcElement
.
files
[
0
]
const
self
=
this
let
reader
=
new
FileReader
()
let
file
=
e
.
target
.
files
[
0
]
// // 默认1MB
const
isLt
=
file
.
size
/
1024
/
1024
<
this
.
limitSize
const
limitSize
=
50
const
isLt
=
file
.
size
/
1024
/
1024
<
limitSize
if
(
!
isLt
)
{
if
(
!
isLt
)
{
this
.
$message
.
error
(
'上传视频大小不能超过'
+
limitSize
+
'MB!'
)
this
.
$message
.
error
(
'上传视频大小不能超过'
+
this
.
limitSize
+
'MB!'
)
return
true
return
true
}
}
reader
.
readAsDataURL
(
file
)
self
.
loading
=
true
reader
.
onload
=
e
=>
{
// upload.init().then(res => {
const
imgFile
=
e
.
target
.
result
// if (res.status == 0) {
const
base64
=
file
.
name
.
split
(
'.'
)[
file
.
name
.
split
(
'.'
).
length
-
1
]
+
'@'
+
imgFile
.
split
(
','
)[
1
]
// upload
this
.
$apis
.
common
.
uploadVideoApi
({
file
:
base64
}).
then
(
res
=>
{
// .uploaded(file)
if
(
res
)
{
// .then(res => {
this
.
materialAddForm
.
videoUrl
=
res
// const videoUrl = res.video.url
}
// self.$set(self.materialAddForm, 'mediaUrl', videoUrl)
})
// self.$nextTick(() => {
}
// self.getImgUrl(videoUrl).then(res => {
// self.$set(self.materialAddForm, 'coverUrl', res)
// })
// })
// self.loading = false
// })
// .finally(end => {
// console.log(end)
// })
// upload.uploadEvent('', res => {
// console.log(res, '视频上传完成')
// })
// upload.uploadEvent('media_progress', res => {
// console.log(res)
// })
// }
// })
},
},
getParams
()
{
getParams
()
{
let
params
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
materialAddForm
))
let
params
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
materialAddForm
))
...
...
src/views/material/index.vue
View file @
e019a82
...
@@ -15,24 +15,19 @@
...
@@ -15,24 +15,19 @@
</span>
</span>
<div
class=
"container"
>
<div
class=
"container"
>
<div
class=
"search-form"
>
<div
class=
"search-form"
>
<GLCombiForm
ref=
"showSearch"
:rowNumber=
"1"
:formObj=
"searchForm"
:formData=
"materialFormData"
<GLCombiForm
ref=
"showSearch"
:rowNumber=
"1"
:formObj=
"searchForm"
:formData=
"materialFormData"
@
handleOk=
"getListApi"
@
handleRest=
"handleReset"
></GLCombiForm>
@
handleOk=
"getListApi"
@
handleRest=
"handleReset"
></GLCombiForm>
</div>
</div>
<div
class=
"tabelList"
>
<div
class=
"tabelList"
>
<el-row>
<el-row>
<el-col
:span=
"5"
>
<el-col
:span=
"5"
>
<div
class=
"left"
>
<div
class=
"left"
>
<MaterialGroup
ref=
"materialGroup"
@
openAddDialog=
"addDialogShow"
:groupHeight=
"boxHeight"
<MaterialGroup
ref=
"materialGroup"
@
openAddDialog=
"addDialogShow"
:groupHeight=
"boxHeight"
:eventBus=
"eventBus"
@
getList=
"getList"
@
getListApi=
"getListApi"
></MaterialGroup>
:eventBus=
"eventBus"
@
getList=
"getList"
@
getListApi=
"getListApi"
></MaterialGroup>
</div>
</div>
</el-col>
</el-col>
<el-col
:span=
"19"
>
<el-col
:span=
"19"
>
<div
class=
"right"
:style=
"
{ height: boxHeight + 'px' }">
<div
class=
"right"
:style=
"
{ height: boxHeight + 'px' }">
<div
class=
"groupTitle"
>
{{
materialGroupName
}}
(共
{{
tableTotal
}}
条数据)
</div>
<div
class=
"groupTitle"
>
{{
materialGroupName
}}
(共
{{
tableTotal
}}
条数据)
</div>
<GLTable
ref=
"materialRef"
:hasPage=
"false"
:noDataImg=
"url"
@
refreshTable=
"getListApi"
:layout=
"layout"
<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"
>
:searchForm=
"searchForm"
:tableParams=
"tableParams"
:tableData=
"materialTableData"
:pageConf=
"pageConf"
:tableTotal=
"tableTotal"
@
sortChange=
"sortChange"
:isCustomHead=
"true"
:customHeadShowList=
"customHeadShowList"
>
<!-- 素材内容 -->
<!-- 素材内容 -->
<div
slot=
"materialContentRpcResponse"
slot-scope=
"scope"
>
<div
slot=
"materialContentRpcResponse"
slot-scope=
"scope"
>
<span
class=
"hide-content"
>
{{
scope
.
scope
.
materialContentRpcResponse
.
materialName
}}
</span>
<span
class=
"hide-content"
>
{{
scope
.
scope
.
materialContentRpcResponse
.
materialName
}}
</span>
...
@@ -99,10 +94,8 @@
...
@@ -99,10 +94,8 @@
</el-row>
</el-row>
</div>
</div>
</div>
</div>
<AddMaterialGroupDia
:businessTypes=
"businessTypes"
ref=
"addMaterialGroup"
:dialogVisible=
"materialGroupDialog"
<AddMaterialGroupDia
:businessTypes=
"businessTypes"
ref=
"addMaterialGroup"
:dialogVisible=
"materialGroupDialog"
:eventBus=
"eventBus"
></AddMaterialGroupDia>
:eventBus=
"eventBus"
></AddMaterialGroupDia>
<FunctionIntroduc
:introductionDialog=
"introductionDialog"
@
closeIntroductDia=
"closeIntroductDia"
></FunctionIntroduc>
<FunctionIntroduc
:introductionDialog=
"introductionDialog"
@
closeIntroductDia=
"closeIntroductDia"
></FunctionIntroduc>
<VideoShowDia
ref=
"VideoShowDia"
:dialogVisible=
"dialogVisibleImg"
></VideoShowDia>
<VideoShowDia
ref=
"VideoShowDia"
:dialogVisible=
"dialogVisibleImg"
></VideoShowDia>
</div>
</div>
</
template
>
</
template
>
...
@@ -140,9 +133,9 @@ export default {
...
@@ -140,9 +133,9 @@ export default {
businessType
:
''
,
// 业务类型
businessType
:
''
,
// 业务类型
status
:
''
,
// 状态
status
:
''
,
// 状态
materialName
:
''
,
// 素材名称
materialName
:
''
,
// 素材名称
createdType
:
'2'
createdType
:
'2'
},
},
pageConf
:
{
pageSize
:
'pageSize'
,
pageNum
:
'pageNum'
,
totalCount
:
'total'
},
pageConf
:
{
pageSize
:
'pageSize'
,
pageNum
:
'pageNum'
,
totalCount
:
'total'
},
layout
:
'sizes, prev, pager, next, jumper, ->, total'
,
layout
:
'sizes, prev, pager, next, jumper, ->, total'
,
// 表格数据
// 表格数据
materialTableData
:
[],
materialTableData
:
[],
...
@@ -265,7 +258,7 @@ export default {
...
@@ -265,7 +258,7 @@ export default {
fn
:
'编辑'
fn
:
'编辑'
},
},
listeners
:
{
listeners
:
{
click
:
row
=>
row
.
createdType
==
1
?
this
.
addMaterial
(
3
,
row
)
:
this
.
addMaterial
(
2
,
row
)
click
:
row
=>
(
row
.
createdType
==
1
?
this
.
addMaterial
(
3
,
row
)
:
this
.
addMaterial
(
2
,
row
)
)
}
}
},
},
{
{
...
@@ -323,7 +316,7 @@ export default {
...
@@ -323,7 +316,7 @@ export default {
formatter
:
cellVal
=>
{
formatter
:
cellVal
=>
{
return
cellVal
.
sendNum
return
cellVal
.
sendNum
},
},
renderHeader
:
(
h
,
{
column
,
$index
})
=>
{
renderHeader
:
(
h
,
{
column
,
$index
})
=>
{
return
h
(
return
h
(
'div'
,
'div'
,
{
{
...
@@ -371,7 +364,7 @@ export default {
...
@@ -371,7 +364,7 @@ export default {
formatter
:
cellVal
=>
{
formatter
:
cellVal
=>
{
return
cellVal
.
readNum
return
cellVal
.
readNum
},
},
renderHeader
:
(
h
,
{
column
,
$index
})
=>
{
renderHeader
:
(
h
,
{
column
,
$index
})
=>
{
return
h
(
return
h
(
'div'
,
'div'
,
{
{
...
@@ -459,7 +452,7 @@ export default {
...
@@ -459,7 +452,7 @@ export default {
businessType
:
''
,
businessType
:
''
,
status
:
''
,
status
:
''
,
materialName
:
''
,
materialName
:
''
,
createdType
:
'2'
createdType
:
'2'
}
}
this
.
getListApi
()
this
.
getListApi
()
this
.
$refs
.
materialGroup
.
currentIndex
=
null
this
.
$refs
.
materialGroup
.
currentIndex
=
null
...
@@ -525,7 +518,7 @@ export default {
...
@@ -525,7 +518,7 @@ export default {
},
},
// 素材删除
// 素材删除
handleDelete
(
scope
)
{
handleDelete
(
scope
)
{
this
.
secondConfirm
(
'提示'
,
'删除素材,该素材将不再可以使用,是否继续删除?'
,
'material'
,
'materialDelete'
,
{
id
:
scope
.
id
})
this
.
secondConfirm
(
'提示'
,
'删除素材,该素材将不再可以使用,是否继续删除?'
,
'material'
,
'materialDelete'
,
{
id
:
scope
.
id
})
},
},
// 1-新增素材,2-编辑素材
// 1-新增素材,2-编辑素材
addMaterial
(
addOrEdit
,
scope
)
{
addMaterial
(
addOrEdit
,
scope
)
{
...
@@ -557,13 +550,13 @@ export default {
...
@@ -557,13 +550,13 @@ export default {
let
videoHtml
=
html
.
match
(
/<video.*
?(?:
>|
\/
>
)
/g
)
let
videoHtml
=
html
.
match
(
/<video.*
?(?:
>|
\/
>
)
/g
)
if
(
imgHtml
)
{
if
(
imgHtml
)
{
let
imgSrc
=
imgHtml
[
0
].
match
(
'<img[^<>]*? src="([^<>]*?)"'
)
let
imgSrc
=
imgHtml
[
0
].
match
(
'<img[^<>]*? src="([^<>]*?)"'
)
item
.
materialContentRpcResponse
.
materialUrl
=
imgSrc
?
imgSrc
[
1
]
:
''
item
.
materialContentRpcResponse
.
materialUrl
=
imgSrc
?
imgSrc
[
1
]
:
''
item
.
urlType
=
'img'
item
.
urlType
=
'img'
item
.
imgCount
=
imgHtml
.
length
item
.
imgCount
=
imgHtml
.
length
}
}
if
(
videoHtml
)
{
if
(
videoHtml
)
{
let
videoSrc
=
videoHtml
[
0
].
match
(
'<video[^<>]*? src="([^<>]*?)"'
)
let
videoSrc
=
videoHtml
[
0
].
match
(
'<video[^<>]*? src="([^<>]*?)"'
)
item
.
materialContentRpcResponse
.
materialUrl
=
videoSrc
?
videoSrc
[
1
]
:
''
item
.
materialContentRpcResponse
.
materialUrl
=
videoSrc
?
videoSrc
[
1
]
:
''
item
.
urlType
=
'video'
item
.
urlType
=
'video'
}
}
}
}
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment