Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
glsx-web
/
glsx-oss-ai-manager
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 78149b59
authored
Jan 27, 2019
by
liimin
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
优化
1 parent
de522b61
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
826 additions
and
122 deletions
package.json
src/api/voice.js
src/base.js
src/styles/index.scss
src/views/customer/components/index.js
src/views/customer/components/src/manufacturers.vue
src/views/customer/voice/Edit.vue
src/views/customer/voice/gift.vue
src/views/customer/voice/index.vue
package.json
View file @
78149b5
...
@@ -11,10 +11,11 @@
...
@@ -11,10 +11,11 @@
"axios"
:
"^0.18.0"
,
"axios"
:
"^0.18.0"
,
"glsx-vue-common"
:
"^1.1.14"
,
"glsx-vue-common"
:
"^1.1.14"
,
"glsx-vue-components"
:
"^1.0.13"
,
"glsx-vue-components"
:
"^1.0.13"
,
"lodash"
:
"^4.17.10"
,
"node-sass"
:
"^4.9.3"
,
"node-sass"
:
"^4.9.3"
,
"sass-loader"
:
"^7.1.0"
,
"sass-loader"
:
"^7.1.0"
,
"vue"
:
"^2.5.17"
"vee-validate"
:
"^2.1.5"
,
"vue"
:
"^2.5.17"
,
"vue-i18n"
:
"^8.7.0"
},
},
"devDependencies"
:
{
"devDependencies"
:
{
"@vue/cli-plugin-babel"
:
"^3.0.1"
,
"@vue/cli-plugin-babel"
:
"^3.0.1"
,
...
...
src/api/voice.js
View file @
78149b5
import
{
import
{
GlAxios
GlAxios
}
from
'glsx-vue-common'
}
from
'glsx-vue-common'
const
path
=
''
const
path
=
'
/admin-ddh-aimanager/voice/activity
'
const
__sVoiceList
=
`
${
path
}
/
voiceLis
t`
const
__sVoiceList
=
`
${
path
}
/
ge
t`
const
__sGetManufacturer
=
`
${
path
}
/manufacturers`
const
__sGetManufacturer
=
`/manufacturers`
/**
/**
* 获取语音活动列表
* 获取语音活动列表
*/
*/
const
voiceList
=
{
const
voiceList
=
{
p
:
[
__sVoiceList
],
p
:
[
__sVoiceList
],
req
:
params
=>
GlAxios
.
get
(
__sVoiceList
,
params
)
req
:
params
=>
GlAxios
.
post
(
__sVoiceList
,
{
params
}
)
}
}
/**
/**
* 获取品牌厂商
* 获取品牌厂商
...
...
src/base.js
View file @
78149b5
...
@@ -3,8 +3,24 @@
...
@@ -3,8 +3,24 @@
import
Vue
from
'vue'
import
Vue
from
'vue'
import
GlsxVueComponents
from
'glsx-vue-components'
import
GlsxVueComponents
from
'glsx-vue-components'
import
'glsx-vue-components/dist/glsx-vue-components.css'
import
'glsx-vue-components/dist/glsx-vue-components.css'
// import _ from 'lodash'
import
'./styles/index.scss'
// import axios from 'axios'
import
zh_CN
from
'vee-validate/dist/locale/zh_CN'
import
VeeValidate
from
'vee-validate'
import
VueI18n
from
'vue-i18n'
Vue
.
use
(
VueI18n
)
const
i18n
=
new
VueI18n
({
locale
:
'zh_CN'
})
Vue
.
use
(
VeeValidate
,
{
i18n
,
i18nRootKey
:
'validation'
,
dictionary
:
{
zh_CN
},
errorBagName
:
'errorBags'
,
fieldsBagName
:
'fieldBags'
,
events
:
'blur|input'
})
Vue
.
use
(
GlsxVueComponents
)
Vue
.
use
(
GlsxVueComponents
)
import
'./date.js'
import
'./date.js'
...
...
src/styles/index.scss
View file @
78149b5
body
{
body
{
overflow
:
hidden
;
overflow
:
hidden
;
height
:
100%
;
height
:
100%
;
-moz-osx-font-smoothing
:
grayscale
;
-moz-osx-font-smoothing
:
grayscale
;
-webkit-font-smoothing
:
antialiased
;
-webkit-font-smoothing
:
antialiased
;
text-rendering
:
optimizeLegibility
;
text-rendering
:
optimizeLegibility
;
font-family
:
Helvetica
Neue
,
Helvetica
,
PingFang
SC
,
Hiragino
Sans
GB
,
Microsoft
YaHei
,
Arial
,
sans-serif
;
font-family
:
Helvetica
Neue
,
Helvetica
,
PingFang
SC
,
Hiragino
Sans
GB
,
Microsoft
YaHei
,
Arial
,
sans-serif
;
}
}
html
{
html
{
height
:
100%
;
height
:
100%
;
box-sizing
:
border-box
;
box-sizing
:
border-box
;
}
}
#app
{
#app
{
height
:
100%
;
height
:
100%
;
}
}
*,
*,
*
:before
,
*
:before
,
*
:after
{
*
:after
{
box-sizing
:
inherit
;
box-sizing
:
inherit
;
}
}
hr
{
hr
{
height
:
1px
;
height
:
1px
;
border
:
0px
;
border
:
0px
;
background-color
:
#e7eaec
background-color
:
#e7eaec
}
}
a
,
a
,
a
:focus
,
a
:focus
,
a
:hover
{
a
:hover
{
cursor
:
pointer
;
cursor
:
pointer
;
color
:
inherit
;
color
:
inherit
;
outline
:
none
;
outline
:
none
;
text-decoration
:
none
;
text-decoration
:
none
;
}
}
div
:focus
{
div
:focus
{
outline
:
none
;
outline
:
none
;
}
}
a
:focus
,
a
:focus
,
a
:active
{
a
:active
{
outline
:
none
;
outline
:
none
;
}
}
a
,
a
,
a
:focus
,
a
:focus
,
a
:hover
{
a
:hover
{
cursor
:
pointer
;
cursor
:
pointer
;
color
:
inherit
;
color
:
inherit
;
text-decoration
:
none
;
text-decoration
:
none
;
}
}
.clearfix
{
.clearfix
{
&
:after
{
&
:after
{
visibility
:
hidden
;
visibility
:
hidden
;
display
:
block
;
display
:
block
;
font-size
:
0
;
font-size
:
0
;
content
:
" "
;
content
:
" "
;
clear
:
both
;
clear
:
both
;
height
:
0
;
height
:
0
;
}
}
}
}
//main-container全局样式
//main-container全局样式
.app-main
{
.app-main
{
overflow
:
auto
;
overflow
:
auto
;
}
}
.app-container
{
.app-container
{
padding
:
20px
;
padding
:
20px
;
}
.error
{
color
:
#f56c6c
;
font-size
:
12px
;
line-height
:
1
;
padding-top
:
4px
;
// position: absolute;
// top: 100%;
// left: 0;
float
:
left
;
}
}
src/views/customer/components/index.js
0 → 100644
View file @
78149b5
import
Manufacturers
from
'./src/manufacturers'
export
{
Manufacturers
}
src/views/customer/components/src/manufacturers.vue
0 → 100644
View file @
78149b5
<
template
>
<gl-row>
<gl-col
:span=
"(manufactureOnly||!in_row)?24:8"
>
<gl-form-item
label=
'品牌厂商:'
>
<gl-select
v-model=
"model.value"
placeholder=
"请选择品牌厂商"
name=
"value"
data-vv-as=
"品牌厂商"
v-validate=
"'required'"
:style=
"
{'width':(in_row?width:'100%')}"
>
<gl-option
v-for=
"item in list"
:key=
"item.value"
:label=
"item.label"
:value=
"item.value"
/>
</gl-select>
<span
v-show=
"errorBags && errorBags.has('value')"
class=
"error"
>
{{
errorBags
&&
errorBags
.
first
(
'value'
)
}}
</span>
</gl-form-item>
</gl-col>
<gl-col
:span=
"in_row?8:24 "
v-show=
"!manufactureOnly"
>
<gl-form-item
label=
'渠道商:'
>
<gl-select
v-model=
"model.user"
placeholder=
"请选择渠道商"
style=
"width:100%"
name=
"user"
data-vv-as=
"用户"
v-validate=
"'required'"
>
<gl-option
v-for=
"item in users"
:key=
"item.value"
:label=
"item.label"
:value=
"item.value"
/>
</gl-select>
<span
v-show=
"errorBags && errorBags.has('user')"
class=
"error"
>
{{
errorBags
&&
errorBags
.
first
(
'user'
)
}}
</span>
</gl-form-item>
</gl-col>
<gl-col
:span=
"in_row?8:24"
v-show=
"!manufactureOnly"
>
<gl-form-item
label=
'选择用户:'
>
<gl-select
v-model=
"model.user"
placeholder=
"请选择用户"
style=
"width:100%"
name=
"user"
data-vv-as=
"用户"
v-validate=
"'required'"
>
<gl-option
v-for=
"item in users"
:key=
"item.value"
:label=
"item.label"
:value=
"item.value"
/>
</gl-select>
<span
v-show=
"errorBags && errorBags.has('user')"
class=
"error"
>
{{
errorBags
&&
errorBags
.
first
(
'user'
)
}}
</span>
</gl-form-item>
</gl-col>
</gl-row>
</
template
>
<
script
>
import
{
manufacturers
}
from
'@/api'
export
default
{
name
:
'Manufacturers'
,
props
:
{
eventBus
:
Object
,
width
:
String
,
manufactureOnly
:
Boolean
,
in_row
:
Boolean
// errorBags: Object
},
watch
:
{
eventBus
:
{
handler
(
__eventBus
)
{
__eventBus
&&
__eventBus
.
$on
(
'submit'
,
()
=>
{
this
.
$validator
.
validateAll
().
then
(
result
=>
{
// __eventBus.$emit('manufacturers', this.model)
this
.
$emit
(
'update:value'
,
this
.
model
)
})
})
},
immediate
:
true
//this.eventBus.$emit('manufacturerChanged', val)
}
},
data
()
{
return
{
list
:
[],
value
:
''
,
users
:
[
{
label
:
'已关联嘀嘀虎帐号用户'
,
value
:
0
},
{
label
:
'未关联嘀嘀虎帐号用户'
,
value
:
1
},
{
label
:
'广东用户'
,
value
:
2
},
{
label
:
'深圳用户'
,
value
:
3
},
{
label
:
'广西用户'
,
value
:
4
}
],
model
:
{
user
:
''
}
}
},
methods
:
{
getList
()
{
manufacturers
.
req
({})
.
then
(
res
=>
(
this
.
list
=
res
.
list
))
.
catch
(
err
=>
this
.
error
(
err
))
}
},
mounted
()
{
this
.
getList
()
}
}
</
script
>
<
style
rel=
"stylesheet/scss"
lang=
"scss"
scoped
>
</
style
>
src/views/customer/voice/Edit.vue
View file @
78149b5
<!-- -->
<!-- -->
<
template
>
<
template
>
<div
class=
"
channelUpdate
Dialog"
>
<div
class=
"
voiceEdit
Dialog"
>
<gl-dialog
<gl-dialog
:title=
"title"
:title=
"title"
:visible
.
sync=
"updateVisible"
:visible
.
sync=
"updateVisible"
:before-close=
"handleClose"
:before-close=
"handleClose"
width=
"900px"
>
>
<gl-form
<gl-form
:model=
"
update
Form"
:model=
"
edit
Form"
label-width=
"120px"
label-width=
"120px"
:rules=
"updateRules"
:rules=
"updateRules"
>
>
<gl-form-item
<gl-form-item
label=
"
渠道名称
:"
label=
"
活动标题
:"
prop=
"
channelNam
e"
prop=
"
titl
e"
>
>
<gl-input
<gl-input
name=
"
channelNam
e"
name=
"
titl
e"
v-validate=
"'required'"
v-validate=
"'required'"
data-vv-as=
"
渠道名称
"
data-vv-as=
"
活动标题
"
v-model=
"
updateForm.channelNam
e"
v-model=
"
editForm.titl
e"
></gl-input>
></gl-input>
<!--
<span
v-show=
"errorBags.has('channelName')"
class=
"error"
>
<span
{{
errorBags
.
first
(
'channelName'
)
}}
v-show=
"errorBags.has('title')"
</span>
-->
class=
"error"
>
{{
errorBags
.
first
(
'title'
)
}}
</span>
</gl-form-item>
</gl-form-item>
<gl-row>
<gl-col
:span=
"24"
>
<!--
<gl-form-item
label=
'品牌厂商:'
>
-->
<Manufacturers
width=
"100%"
:eventBus=
"eventBus"
name=
"manufacturer"
v-validate=
"'required'"
v-model=
"editForm.manufacturer"
:in_row=
'false'
:value
.
sync=
"editForm.manufacturer"
/>
<!--
</gl-form-item>
-->
</gl-col>
<!--
<gl-col
:span=
"12"
>
<gl-form-item
label=
'选择用户:'
>
<gl-select
v-model=
"editForm.user"
placeholder=
"请选择用户"
style=
"width:100%"
name=
"user"
data-vv-as=
"用户"
v-validate=
"'required'"
>
<gl-option
v-for=
"item in users"
:key=
"item.value"
:label=
"item.label"
:value=
"item.value"
/>
</gl-select>
<span
v-show=
"errorBags.has('user')"
class=
"error"
>
{{
errorBags
.
first
(
'user'
)
}}
</span>
</gl-form-item>
</gl-col>
-->
</gl-row>
<gl-form-item
<gl-form-item
label=
"
渠道编号
:"
label=
"
活动提示语
:"
prop=
"merchantId"
prop=
"merchantId"
>
>
<gl-input
<gl-input
name=
"
merchantId
"
name=
"
tips
"
v-validate=
"'required'"
v-validate=
"'required'"
data-vv-as=
"
渠道编号
"
data-vv-as=
"
活动提示语
"
v-model=
"
updateForm.merchantId
"
v-model=
"
editForm.tips
"
></gl-input>
></gl-input>
<!--
<span
v-show=
"errorBags.has('merchantId')"
class=
"error"
>
<span
{{
errorBags
.
first
(
'merchantId'
)
}}
v-show=
"errorBags.has('tips')"
</span>
-->
class=
"error"
>
{{
errorBags
.
first
(
'tips'
)
}}
</span>
</gl-form-item>
</gl-form-item>
<gl-form-item
<gl-form-item
label=
"
渠道地址
:"
label=
"
声控命令词
:"
prop=
"c
hannelUrl
"
prop=
"c
mdWords
"
>
>
<gl-input
<gl-input
name=
"c
hannelUrl
"
name=
"c
mdWords
"
v-validate=
"'required'"
v-validate=
"'required'"
data-vv-as=
"
渠道地址
"
data-vv-as=
"
声控命令词
"
v-model=
"
updateForm.channelUrl
"
v-model=
"
editForm.cmdWords
"
></gl-input>
></gl-input>
<!--
<gl-input-tree
v-model=
"updateForm.channelUrl"
></gl-input-tree>
-->
<span
<!--
<span
v-show=
"errorBags.has('channelUrl')"
class=
"error"
>
v-show=
"errorBags.has('cmdWords')"
{{
errorBags
.
first
(
'channelUrl'
)
}}
class=
"error"
</span>
-->
>
{{
errorBags
.
first
(
'cmdWords'
)
}}
</span>
</gl-form-item>
</gl-form-item>
<gl-form-item
<gl-form-item
label=
"
模板选择
:"
label=
"
活动回复语
:"
prop=
"
moduleList
"
prop=
"
feedback
"
>
>
<gl-tree
<gl-input
node-key=
"id"
name=
"feedback"
v-model=
"updateForm.moduleList"
:data=
"allModulelist"
:default-checked-keys=
"updateForm.moduleList"
:props=
"props"
show-checkbox
@
check=
"handleModuleChange"
style=
"height:180px; overflow-y:auto;"
name=
"moduleList"
v-validate=
"'required'"
v-validate=
"'required'"
data-vv-as=
"模板"
data-vv-as=
"活动回复语"
v-model=
"editForm.feedback"
></gl-input>
<span
v-show=
"errorBags.has('feedback')"
class=
"error"
>
>
</gl-tree>
{{
errorBags
.
first
(
'feedback'
)
}}
<!--
<span
v-show=
"errorBags.has('moduleList')"
class=
"error"
>
</span>
{{
errorBags
.
first
(
'moduleList'
)
}}
</gl-form-item>
</span>
-->
<gl-row>
<gl-col
:span=
"12"
>
<gl-form-item
label=
'触发方式:'
>
<gl-checkbox
v-model=
"triModel.pop"
>
IP冒泡提示
</gl-checkbox>
<gl-checkbox
v-model=
"triModel.dialog"
>
对话中提示
</gl-checkbox>
</gl-form-item>
</gl-col>
<gl-col
:span=
"12"
>
<gl-form-item
label=
'触发次数:'
>
<gl-input-number
v-model=
"editForm.count"
:min=
"1"
label=
"触发次数"
></gl-input-number>
</gl-form-item>
</gl-col>
</gl-row>
<gl-row>
<gl-col
:span=
"12"
>
<gl-form-item
label=
'活动内容:'
>
<gl-select
v-model=
"editForm.content"
placeholder=
"请选择活动"
style=
"width:100%"
>
<gl-option
v-for=
"item in contents"
:key=
"item.value"
:label=
"item.label"
:value=
"item.value"
/>
</gl-select>
</gl-form-item>
</gl-col>
<gl-col
:span=
"12"
>
<gl-form-item
label=
'活动有效期:'
>
<gl-date-picker
v-model=
"time"
type=
"datetimerange"
:picker-options=
"pickerOptions"
start-placeholder=
"开始日期"
end-placeholder=
"结束日期"
format=
"yyyy-MM-dd hh:mm"
>
</gl-date-picker>
</gl-form-item>
</gl-col>
</gl-row>
<gl-form-item
label=
""
prop=
"moduleList"
>
<div
class=
"content-wrap"
>
<gl-row
v-if=
"editForm.content===0||editForm.content===2"
>
<gl-col
:span=
"24"
>
<gl-button
type=
"primary"
plain
@
click=
"addGift"
>
添加优惠券
<i
class=
"el-icon-circle-plus el-icon--right"
></i></gl-button>
</gl-col>
<gl-col
:span=
"24"
>
<gl-table
:table=
"coupons"
ref=
"multipleTable"
></gl-table>
</gl-col>
</gl-row>
<gl-row
v-if=
"editForm.content===1||editForm.content===2"
>
<gl-col
:span=
"12"
>
<gl-upload
class=
"upload-demo"
:action=
"uploadAction"
multiple
>
<gl-button
size=
"small"
type=
"primary"
plain
>
添加动效图标
<i
class=
"el-icon-upload el-icon--right"
></i></gl-button>
<div
slot=
"tip"
class=
"el-upload__tip"
>
只能上传jpg/png文件,且不超过500kb
</div>
</gl-upload>
</gl-col>
<gl-col
:span=
"12"
>
<gl-upload
class=
"upload-demo"
:action=
"uploadAction"
multiple
>
<gl-button
size=
"small"
type=
"primary"
plain
>
添加动效音频
<i
class=
"el-icon-upload el-icon--right"
></i></gl-button>
<div
slot=
"tip"
class=
"el-upload__tip"
>
音频可以选填
</div>
</gl-upload>
</gl-col>
</gl-row>
</div>
</gl-form-item>
</gl-form-item>
</gl-form>
</gl-form>
<div
<div
slot=
"footer"
slot=
"footer"
class=
"dialog-footer"
class=
"dialog-footer"
>
>
<gl-button
@
click=
"handleClose"
>
取消
</gl-button>
<gl-button
<gl-button
type=
"primary"
type=
"primary"
:loading=
"updateLoading"
:loading=
"updateLoading"
@
click=
"handleSubmit"
@
click=
"handleSubmit"
>
提交
</gl-button>
>
上架
</gl-button>
<gl-button
@
click=
"handleClose"
>
取消
</gl-button>
</div>
</div>
</gl-dialog>
</gl-dialog>
<Gift
:giftVisible=
"giftVisible"
:eventBus=
"eventBus"
/>
</div>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
import
{
Manufacturers
}
from
'../components'
import
Vue
from
'vue'
import
Gift
from
'./gift'
export
default
{
export
default
{
name
:
'Edit'
,
name
:
'Edit'
,
components
:
{
[
Manufacturers
.
name
]:
Manufacturers
,
[
Gift
.
name
]:
Gift
},
props
:
{
props
:
{
updateVisible
:
Boolean
,
updateVisible
:
Boolean
,
updateLoading
:
Boolean
,
updateLoading
:
Boolean
,
updateForm
:
Object
,
allModulelist
:
Array
,
allModulelist
:
Array
eventBus
:
Object
},
},
watch
:
{
watch
:
{
updateVisible
(
val
)
{
updateVisible
(
val
)
{
this
.
$validator
.
errors
.
clear
()
this
.
$validator
.
errors
.
clear
()
},
},
updateForm
(
val
)
{
eventBus
(
val
)
{
this
.
title
=
!
val
.
merchantId
?
'新增活动'
:
'编辑活动'
if
(
val
)
{
this
.
eventBus
.
$on
(
'giftDialogClose'
,
()
=>
(
this
.
giftVisible
=
false
))
this
.
eventBus
.
$on
(
'manufacturerChanged'
,
value
=>
(
this
.
editForm
.
manufacturer
=
value
)
)
this
.
eventBus
.
$on
(
'submitGift'
,
value
=>
{
this
.
coupons
.
data
=
value
this
.
giftVisible
=
false
})
this
.
eventBus
.
$on
(
'edit_event_data'
,
data
=>
{
this
.
title
=
data
?
'编辑活动'
:
'新增活动'
})
// this.eventBus.$on(
// 'manufacturers',
// result => (this.editForm.manufacturer = result)
// )
}
}
}
},
},
data
()
{
data
()
{
...
@@ -116,6 +294,79 @@ export default {
...
@@ -116,6 +294,79 @@ export default {
children
:
'children'
,
children
:
'children'
,
label
:
'label'
label
:
'label'
},
},
triModel
:
{
pop
:
false
,
dialog
:
true
},
pickerOptions
:
{},
// 日期设置对象
// 提交参数
editForm
:
{
title
:
''
,
// 活动标题
manufacturer
:
''
,
// 品牌厂商
user
:
''
,
// 用户
tips
:
''
,
// 活动提示语
cmdWords
:
''
,
// 声控命令词
feedback
:
''
,
// 活动回复语
trigger
:
''
,
// 触发方式
count
:
''
,
// 触发次数
content
:
0
,
// 活动内容
coupons
:
[],
// 优惠券
pic
:
''
,
// 动效图标
voice
:
''
,
// 动效音频
time
:
''
// 活动结束时间
},
aaa
:
{},
triCount
:
1
,
time
:
''
,
uploadAction
:
''
,
giftVisible
:
false
,
contents
:
[
{
label
:
'关联礼品'
,
value
:
0
},
{
label
:
'关联瀑布特效'
,
value
:
1
},
{
label
:
'关联礼品+瀑布特效'
,
value
:
2
}
],
users
:
[
{
label
:
'已关联嘀嘀虎帐号用户'
,
value
:
0
},
{
label
:
'未关联嘀嘀虎帐号用户'
,
value
:
1
},
{
label
:
'广东用户'
,
value
:
2
},
{
label
:
'深圳用户'
,
value
:
3
},
{
label
:
'广西用户'
,
value
:
4
}
],
coupons
:
{
height
:
122
,
border
:
true
,
data
:
[
{
name
:
'嘀嘀虎1'
,
id
:
'001'
},
{
name
:
'嘀嘀虎2'
,
id
:
'002'
},
{
name
:
'嘀嘀虎3'
,
id
:
'003'
},
{
name
:
'嘀嘀虎4'
,
id
:
'004'
}
],
column
:
[
{
label
:
'优惠券编号'
,
prop
:
'id'
,
width
:
'180'
},
{
label
:
'优惠券名称'
,
prop
:
'name'
}
],
selection
:
{},
multipleSelection
:
[]
},
updateRules
:
{
updateRules
:
{
channelName
:
[{
required
:
true
}],
channelName
:
[{
required
:
true
}],
merchantId
:
[{
required
:
true
}],
merchantId
:
[{
required
:
true
}],
...
@@ -124,24 +375,79 @@ export default {
...
@@ -124,24 +375,79 @@ export default {
}
}
}
}
},
},
mounted
()
{
this
.
uploadAction
=
`
${
this
.
$get_session_common_config
().
axios
.
baseURL
}
/admin-ddh-aimanager/
file
/
upload
?
preFileName
=
AI
`
// this.eventBus = new Vue()
},
methods: {
methods: {
handleModuleChange(params, checked) {
handleModuleChange(params, checked) {
// console.log(checked.checkedKeys)
// console.log(checked.checkedKeys)
this
.
update
Form
.
moduleList
=
checked
.
checkedKeys
this.
edit
Form.moduleList = checked.checkedKeys
},
},
handleSubmit() {
handleSubmit() {
this.eventBus.$emit('submit')
this.$validator.validateAll().then(result => {
this.$validator.validateAll().then(result => {
result
&&
this
.
$emit
(
'updateClose'
,
this
.
updateForm
)
console.log(this.editForm.manufacturer
)
})
})
},
},
handleClose() {
handleClose() {
this.$emit('updateClose')
this.$emit('updateClose')
},
addGift() {
this.giftVisible = true
}
}
}
}
}
}
</
script
>
</
script
>
<
style
>
<
style
rel=
"stylesheet/scss"
lang=
"scss"
>
.channelUpdateDialog
.dialog-footer
{
.voiceEditDialog
{
margin-top
:
-40px
;
.dialog-footer
{
margin-top
:
-40px
;
.el-button
{
padding
:
12px
100px
;
}
}
.el-form-item
{
margin-bottom
:
8px
;
}
.content-wrap
{
background
:
#f5f7fa
;
//
height
:
240px
;
border
:
1px
solid
#dcdfe6
;
border-radius
:
4px
;
padding
:
0
6px
6px
;
.el-table
td,
.el-table
th
{
padding
:
0
;
line-height
:
20px
;
}
.is-plain
{
padding
:
4px
20px
;
}
.el-upload__tip
{
margin-top
:
-24px
;
margin-left
:
140px
;
line-height
:
8px
;
}
.upload-demo
{
//
border
:
1px
solid
#ccc
;
padding
:
4px
;
margin-top
:
8px
;
width
:
92%
;
height
:
70px
;
}
//
.el-upload-list--text
{
//
margin-top
:
-30px
;
//
font-size
:
12px
;
//
background
:
#fff
;
//
margin-left
:
380px
;
//
width
:
300px
;
//
}
}
.el-date-editor--datetimerange
{
width
:
312px
!important
;
}
}
}
</
style
>
</
style
>
\ No newline at end of file
\ No newline at end of file
src/views/customer/voice/gift.vue
0 → 100644
View file @
78149b5
<!-- -->
<
template
>
<div
class=
"giftDialog"
>
<gl-dialog
title=
"选择活动礼品"
:visible
.
sync=
"giftVisible"
:before-close=
"handleClose"
width=
'800px '
>
<gl-row>
<gl-col
:span=
"11"
>
<gl-card
shadow=
"always"
>
可选择活动礼品
<gl-table
:table=
"giftTable"
ref=
"giftTable"
></gl-table>
</gl-card>
</gl-col>
<gl-col
:span=
"2"
class=
"transfer__col"
>
<div
class=
"el-transfer__buttons"
>
<gl-button
type=
"primary"
icon=
"el-icon-arrow-right"
circle
class=
"el-transfer__button"
:disabled=
"!giftTable.selection.length"
@
click=
"handleSelectGift"
></gl-button>
<gl-button
type=
"primary"
icon=
"el-icon-arrow-left"
class=
"el-transfer__button"
circle
:disabled=
"!checkedTable.selection.length"
@
click=
"handleDisSelectGift"
></gl-button>
</div>
</gl-col>
<gl-col
:span=
"11"
>
<gl-card
shadow=
"always"
>
已选择活动礼品
<gl-table
:table=
"checkedTable"
ref=
"checkedTable"
></gl-table>
</gl-card>
</gl-col>
</gl-row>
<div
slot=
"footer"
class=
"dialog-footer"
>
<gl-button
@
click=
"handleClose"
>
取消
</gl-button>
<gl-button
type=
"primary"
:loading=
"submiting"
@
click=
"handleSubmit"
>
确定
</gl-button>
</div>
</gl-dialog>
</div>
</
template
>
<
script
>
export
default
{
name
:
'Gift'
,
props
:
{
giftVisible
:
Boolean
,
eventBus
:
Object
},
data
()
{
return
{
submiting
:
false
,
giftTable
:
{
selectionChange
:
this
.
handleGiftTableSelectionChange
,
height
:
400
,
border
:
true
,
data
:
[
{
name
:
'嘀嘀虎1'
,
id
:
'001'
},
{
name
:
'嘀嘀虎2'
,
id
:
'002'
},
{
name
:
'嘀嘀虎3'
,
id
:
'003'
},
{
name
:
'嘀嘀虎4'
,
id
:
'004'
}
],
column
:
[
{
label
:
'优惠券编号'
,
prop
:
'id'
,
width
:
'100'
},
{
label
:
'优惠券名称'
,
prop
:
'name'
}
],
selection
:
[]
},
checkedTable
:
{
height
:
400
,
border
:
true
,
selectionChange
:
this
.
handleCheckedTableSelectionChange
,
data
:
[
{
name
:
'嘀嘀虎1'
,
id
:
'001'
}
],
column
:
[
{
label
:
'优惠券编号'
,
prop
:
'id'
,
width
:
'100'
},
{
label
:
'优惠券名称'
,
prop
:
'name'
}
],
selection
:
[]
}
}
},
mounted
()
{},
methods
:
{
handleClose
()
{
this
.
eventBus
.
$emit
(
'giftDialogClose'
)
},
handleGiftTableSelectionChange
(
val
)
{
this
.
giftTable
.
selection
=
val
},
handleCheckedTableSelectionChange
(
val
)
{
this
.
checkedTable
.
selection
=
val
},
handleSelectGift
()
{
const
giftSelection
=
this
.
giftTable
.
selection
const
checkedData
=
this
.
checkedTable
.
data
giftSelection
.
forEach
(
element
=>
{
if
(
!
checkedData
.
some
(
obj
=>
obj
.
id
===
element
.
id
))
{
checkedData
.
push
(
element
)
}
})
},
handleDisSelectGift
()
{
const
checkedSelection
=
this
.
checkedTable
.
selection
const
checkedData
=
this
.
checkedTable
.
data
checkedSelection
.
map
(
element
=>
checkedData
.
splice
(
checkedData
.
findIndex
(
item
=>
item
.
id
===
element
.
id
),
1
)
)
},
handleSubmit
()
{
this
.
eventBus
.
$emit
(
'submitGift'
,
this
.
checkedTable
.
data
)
}
}
}
</
script
>
<
style
rel=
"stylesheet/scss"
lang=
"scss"
>
.giftDialog
{
.el-card__body
{
padding
:
10px
!important
;
color
:
#909399
;
.tableBox
{
margin-top
:
10px
;
}
}
.el-dialog__body
{
padding
:
0
20px
;
}
.dialog-footer
{
margin-top
:
0
!important
;
padding
:
0
!important
;
.el-button
{
padding
:
12px
50px
!important
;
}
}
.transfer__col
{
text-align
:
center
;
line-height
:
450px
;
}
.el-transfer__buttons
{
padding
:
0
;
}
}
</
style
>
\ No newline at end of file
\ No newline at end of file
src/views/customer/voice/index.vue
View file @
78149b5
...
@@ -14,17 +14,7 @@
...
@@ -14,17 +14,7 @@
/>
/>
</gl-form-item>
</gl-form-item>
<gl-form-item>
<gl-form-item>
<gl-select
<Manufacturers
:manufactureOnly=
"true"
/>
v-model=
"searchCondition.manufacturer"
placeholder=
"请选择品牌厂商"
>
<gl-option
v-for=
"item in manufacturers"
:key=
"item.value"
:label=
"item.label"
:value=
"item.value"
/>
</gl-select>
</gl-form-item>
</gl-form-item>
<gl-form-item>
<gl-form-item>
<gl-button
<gl-button
...
@@ -47,6 +37,7 @@
...
@@ -47,6 +37,7 @@
:updateLoading=
"updateLoading"
:updateLoading=
"updateLoading"
:updateForm=
"updateForm"
:updateForm=
"updateForm"
@
updateClose=
"updateDialogClose"
@
updateClose=
"updateDialogClose"
:eventBus=
"eventBus"
/>
/>
<gl-table
<gl-table
:table=
"tableData"
:table=
"tableData"
...
@@ -68,13 +59,16 @@
...
@@ -68,13 +59,16 @@
<
script
>
<
script
>
import
Edit
from
'./Edit'
import
Edit
from
'./Edit'
import
{
Manufacturers
}
from
'../components'
// import { fn, treeCheckKeys, deleteEmptyAttribute } from '@/common/common'
// import { fn, treeCheckKeys, deleteEmptyAttribute } from '@/common/common'
import
{
voiceList
,
manufacturers
}
from
'@/api'
import
{
voiceList
,
manufacturers
}
from
'@/api'
import
{
NoticeMixin
}
from
'@/mixins'
import
{
NoticeMixin
}
from
'@/mixins'
import
Vue
from
'vue'
export
default
{
export
default
{
name
:
'channel'
,
name
:
'channel'
,
components
:
{
components
:
{
Edit
[
Edit
.
name
]:
Edit
,
[
Manufacturers
.
name
]:
Manufacturers
},
},
watch
:
{
watch
:
{
'searchCondition.content'
(
val
)
{
'searchCondition.content'
(
val
)
{
...
@@ -88,6 +82,7 @@ export default {
...
@@ -88,6 +82,7 @@ export default {
manufacturer
:
''
,
manufacturer
:
''
,
content
:
''
content
:
''
},
},
eventBus
:
null
,
pageNum
:
1
,
pageNum
:
1
,
pageSize
:
10
,
pageSize
:
10
,
total
:
10
,
total
:
10
,
...
@@ -112,23 +107,32 @@ export default {
...
@@ -112,23 +107,32 @@ export default {
column
:
[
column
:
[
{
{
label
:
'品牌厂商'
,
label
:
'品牌厂商'
,
prop
:
'manufacturer'
prop
:
'manufacturer
Name
'
},
},
{
{
label
:
'渠道商'
,
label
:
'渠道商'
,
prop
:
'
channel
'
prop
:
'
merchantName
'
},
},
{
{
label
:
'活动标题'
,
label
:
'活动标题'
,
prop
:
'
t
itle'
prop
:
'
activityT
itle'
},
},
{
{
label
:
'关键词'
,
label
:
'关键词'
,
prop
:
'
keywor
d'
prop
:
'
voiceComman
d'
},
},
{
{
label
:
'提示方式'
,
label
:
'提示方式'
,
prop
:
'notice'
prop
:
'tipType'
,
formatter
:
cellValue
=>
{
if
(
cellValue
.
tipType
)
{
return
{
BUBBLING
:
'冒泡'
,
DIALOGUE
:
'对话'
,
BOTH
:
'冒泡和对话'
}[
cellValue
.
tipType
]
}
}
},
},
{
{
label
:
'活动截止时间'
,
label
:
'活动截止时间'
,
...
@@ -145,7 +149,7 @@ export default {
...
@@ -145,7 +149,7 @@ export default {
},
},
{
{
label
:
'操作人'
,
label
:
'操作人'
,
prop
:
'
cre
atedBy'
prop
:
'
upd
atedBy'
}
}
],
],
number
:
{
number
:
{
...
@@ -162,19 +166,35 @@ export default {
...
@@ -162,19 +166,35 @@ export default {
prop
:
'options'
,
prop
:
'options'
,
button
:
[
button
:
[
{
{
label
:
'
编辑
'
,
label
:
'
上架
'
,
type
:
'text'
,
type
:
'text'
,
callback
:
(
index
,
rows
)
=>
{
formatter
:
row
=>
{
this
.
dialog
(
index
)
return
row
.
status
===
{
ON
:
'上架'
,
OF
:
'下架'
}[
+
row
.
status
]
},
callback
:
(
index
,
row
)
=>
{
this
.
$confirm
(
`确定
${
{
ON
:
'上架'
,
OF
:
'下架'
}
[+row[index].status]
}该活动?`
,
''
,
{
type
:
'warning'
}
)
.
then
(()
=>
{
this
.
tableLoading
=
true
// this.carServerUpdate(this.$deep_clone(row), 'moduleStatus')
})
.
catch
(
err
=>
console
.
log
(
err
))
}
}
},
},
{
{
type
:
'
primary
'
,
type
:
''
,
icon
:
'el-icon-edit'
,
icon
:
'el-icon-edit'
,
callback
:
(
index
,
rows
)
=>
this
.
dialog
(
index
)
callback
:
(
index
,
rows
)
=>
this
.
dialog
(
index
,
rows
)
},
},
{
{
type
:
'
primary
'
,
type
:
''
,
icon
:
'el-icon-delete'
,
icon
:
'el-icon-delete'
,
callback
:
(
index
,
rows
)
=>
{
callback
:
(
index
,
rows
)
=>
{
this
.
$confirm
(
'确定要删除该语音活动吗?'
,
''
,
{
this
.
$confirm
(
'确定要删除该语音活动吗?'
,
''
,
{
...
@@ -194,7 +214,7 @@ export default {
...
@@ -194,7 +214,7 @@ export default {
},
},
mounted
()
{
mounted
()
{
this
.
getList
()
this
.
getList
()
this
.
getManufacturer
()
this
.
eventBus
=
new
Vue
()
},
},
methods
:
{
methods
:
{
loadingGetList
()
{
loadingGetList
()
{
...
@@ -292,8 +312,9 @@ export default {
...
@@ -292,8 +312,9 @@ export default {
// this.updateParams = this.$deep_clone(channelStructrue)
// this.updateParams = this.$deep_clone(channelStructrue)
// }
// }
},
},
dialog
(
index
)
{
dialog
(
index
,
rows
)
{
this
.
updateVisible
=
!
this
.
updateVisible
this
.
updateVisible
=
true
this
.
eventBus
.
$emit
(
'edit_event_data'
,
rows
?
rows
[
index
]
:
null
)
},
},
updateDialogClose
(
updateData
)
{
updateDialogClose
(
updateData
)
{
this
.
updateLoading
=
true
this
.
updateLoading
=
true
...
@@ -310,7 +331,7 @@ export default {
...
@@ -310,7 +331,7 @@ export default {
.voice
{
.voice
{
.cell
{
.cell
{
.el-button
{
.el-button
{
padding
:
2
px
10px
;
padding
:
5
px
10px
;
}
}
}
}
}
}
...
...
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