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 48eb0bc8
authored
Jan 27, 2019
by
liimin
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
a
1 parent
4a9d971c
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
130 additions
and
53 deletions
src/api/index.js
src/api/voice.js
src/views/customer/components/src/manufacturers.vue
src/views/customer/voice/Edit.vue
src/api/index.js
View file @
48eb0bc
...
@@ -5,12 +5,14 @@ import {
...
@@ -5,12 +5,14 @@ import {
import
{
import
{
voiceList
,
voiceList
,
manufacturers
manufacturers
,
merchants
}
from
'./voice'
}
from
'./voice'
export
{
export
{
voiceList
,
voiceList
,
manufacturers
,
manufacturers
,
merchants
,
getBrandList
,
getBrandList
,
grayscaleuser
grayscaleuser
}
}
src/api/voice.js
View file @
48eb0bc
...
@@ -3,14 +3,16 @@ import {
...
@@ -3,14 +3,16 @@ import {
}
from
'glsx-vue-common'
}
from
'glsx-vue-common'
const
path
=
'/admin-ddh-aimanager/voice/activity'
const
path
=
'/admin-ddh-aimanager/voice/activity'
const
__sVoiceList
=
`
${
path
}
/get`
const
__sVoiceList
=
`
${
path
}
/get`
const
__sGetManufacturer
=
`/
manufacturers
`
const
__sGetManufacturer
=
`/
admin-ddh-aimanager/manufacturer/search
`
const
__sGetMerchant
=
`/admin-ddh-aimanager/merchant/search`
/**
/**
* 获取语音活动列表
* 获取语音活动列表
*/
*/
const
voiceList
=
{
const
voiceList
=
{
p
:
[
__sVoiceList
],
p
:
[
__sVoiceList
],
req
:
params
=>
GlAxios
.
post
(
__sVoiceList
,
{
params
})
req
:
params
=>
GlAxios
.
post
(
__sVoiceList
,
{
params
})
}
}
/**
/**
* 获取品牌厂商
* 获取品牌厂商
...
@@ -20,7 +22,16 @@ const manufacturers = {
...
@@ -20,7 +22,16 @@ const manufacturers = {
req
:
params
=>
GlAxios
.
get
(
__sGetManufacturer
,
params
)
req
:
params
=>
GlAxios
.
get
(
__sGetManufacturer
,
params
)
}
}
/**
* 获取渠道商户
*/
const
merchants
=
{
p
:
[
__sGetMerchant
],
req
:
params
=>
GlAxios
.
get
(
__sGetMerchant
,
params
)
}
export
{
export
{
voiceList
,
voiceList
,
manufacturers
manufacturers
,
merchants
}
}
src/views/customer/components/src/manufacturers.vue
View file @
48eb0bc
<
template
>
<
template
>
<gl-row>
<gl-row
class=
"manufacturer"
>
<gl-col
:span=
"(manufactureOnly||!in_row)?24:
8
"
>
<gl-col
:span=
"(manufactureOnly||!in_row)?24:
12
"
>
<gl-form-item
label=
'品牌厂商:'
>
<gl-form-item
label=
'品牌厂商:'
>
<gl-select
<gl-select
v-model=
"model.
value
"
v-model=
"model.
manufacturerId
"
placeholder=
"请选择品牌厂商"
placeholder=
"请选择品牌厂商"
name=
"
value
"
name=
"
manufacturerId
"
data-vv-as=
"品牌厂商"
data-vv-as=
"品牌厂商"
v-validate=
"'required'"
v-validate=
"'required'"
:style=
"
{'width':(in_row?width:'100%')}"
:style=
"
{'width':(in_row?width:'100%')}"
>
>
<gl-option
<gl-option
v-for=
"item in list"
v-for=
"item in
manufacturer_
list"
:key=
"item.
value
"
:key=
"item.
manufacturer
"
:label=
"item.
label
"
:label=
"item.
manufacturerName
"
:value=
"item.
value
"
:value=
"item.
manufacturer
"
/>
/>
</gl-select>
</gl-select>
<span
<span
v-show=
"errorBags && errorBags.has('
value
')"
v-show=
"errorBags && errorBags.has('
manufacturerId
')"
class=
"error"
class=
"error"
>
>
{{
errorBags
&&
errorBags
.
first
(
'
value
'
)
}}
{{
errorBags
&&
errorBags
.
first
(
'
manufacturerId
'
)
}}
</span>
</span>
</gl-form-item>
</gl-form-item>
</gl-col>
</gl-col>
<gl-col
<gl-col
:span=
"in_row?
8
:24 "
:span=
"in_row?
12
:24 "
v-show=
"!manufactureOnly"
v-show=
"!manufactureOnly"
>
>
<gl-form-item
label=
'渠道商:'
>
<gl-form-item
label=
'渠道商:'
>
<gl-select
<gl-select
v-model=
"model.
user
"
v-model=
"model.
merchantId
"
placeholder=
"请选择渠道商"
placeholder=
"请选择渠道商"
style=
"width:100%"
style=
"width:100%"
name=
"
user
"
name=
"
merchantId
"
data-vv-as=
"
用户
"
data-vv-as=
"
渠道商
"
v-validate=
"'required'"
v-validate=
"'required'"
>
>
<gl-option
<gl-option
v-for=
"item in
users
"
v-for=
"item in
merchant_list
"
:key=
"item.
value
"
:key=
"item.
merchantId
"
:label=
"item.
label
"
:label=
"item.
merchantName
"
:value=
"item.
value
"
:value=
"item.
merchantId
"
/>
/>
</gl-select>
</gl-select>
<span
<span
v-show=
"errorBags && errorBags.has('
user
')"
v-show=
"errorBags && errorBags.has('
merchantId
')"
class=
"error"
class=
"error"
>
>
{{
errorBags
&&
errorBags
.
first
(
'
user
'
)
}}
{{
errorBags
&&
errorBags
.
first
(
'
merchantId
'
)
}}
</span>
</span>
</gl-form-item>
</gl-form-item>
</gl-col>
</gl-col>
<gl-col
<gl-col
:span=
"
in_row?8:
24"
:span=
"24"
v-show=
"!manufactureOnly"
v-show=
"!manufactureOnly"
>
>
<gl-form-item
label=
'选择用户:'
>
<gl-form-item
label=
'选择用户:'
>
...
@@ -67,7 +67,7 @@
...
@@ -67,7 +67,7 @@
v-validate=
"'required'"
v-validate=
"'required'"
>
>
<gl-option
<gl-option
v-for=
"item in
users
"
v-for=
"item in
grayscaleUserList
"
:key=
"item.value"
:key=
"item.value"
:label=
"item.label"
:label=
"item.label"
:value=
"item.value"
:value=
"item.value"
...
@@ -81,18 +81,51 @@
...
@@ -81,18 +81,51 @@
</span>
</span>
</gl-form-item>
</gl-form-item>
</gl-col>
</gl-col>
<gl-col
:span=
"24"
v-if=
"!manufactureOnly && model.user===0"
>
<gl-form-item
label=
'灰度用户:'
>
<gl-upload
class=
"upload-demo"
:action=
"action"
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"
>
支持格式: .Excel表格,批量上传设备号
</div>
</gl-upload>
<span
v-show=
"errorBags && errorBags.has('user')"
class=
"error"
>
{{
errorBags
&&
errorBags
.
first
(
'user'
)
}}
</span>
</gl-form-item>
</gl-col>
</gl-row>
</gl-row>
</
template
>
</
template
>
<
script
>
<
script
>
import
{
manufacturers
}
from
'@/api'
import
{
manufacturers
,
merchants
}
from
'@/api'
import
{
NoticeMixin
}
from
'@/mixins'
let
manufacturer_list_back_up
=
[]
let
merchant_list_back_up
=
[]
export
default
{
export
default
{
name
:
'Manufacturers'
,
name
:
'Manufacturers'
,
mixins
:
[
NoticeMixin
],
props
:
{
props
:
{
eventBus
:
Object
,
eventBus
:
Object
,
width
:
String
,
width
:
String
,
manufactureOnly
:
Boolean
,
manufactureOnly
:
Boolean
,
in_row
:
Boolean
in_row
:
Boolean
,
uploadAction
:
String
// errorBags: Object
// errorBags: Object
},
},
watch
:
{
watch
:
{
...
@@ -108,37 +141,67 @@ export default {
...
@@ -108,37 +141,67 @@ export default {
},
},
immediate
:
true
immediate
:
true
//this.eventBus.$emit('manufacturerChanged', val)
//this.eventBus.$emit('manufacturerChanged', val)
},
uploadAction
:
{
handler
(
__sAction
)
{
__sAction
&&
(
this
.
action
=
__sAction
)
},
immediate
:
true
}
}
},
},
data
()
{
data
()
{
return
{
return
{
list
:
[],
value
:
''
,
value
:
''
,
users
:
[
action
:
''
,
{
label
:
'已关联嘀嘀虎帐号用户'
,
value
:
0
}
,
manufacturer_list
:
[]
,
{
label
:
'未关联嘀嘀虎帐号用户'
,
value
:
1
}
,
merchant_list
:
[]
,
{
label
:
'广东用户'
,
value
:
2
},
grayscaleUserList
:
[
{
label
:
'
深圳用户'
,
value
:
3
},
{
label
:
'
灰度用户'
,
value
:
0
},
{
label
:
'
广西用户'
,
value
:
4
}
{
label
:
'
全部用户'
,
value
:
1
}
],
],
model
:
{
model
:
{
user
:
''
user
:
''
,
merchantId
:
''
,
manufacturerId
:
''
}
}
}
}
},
},
methods
:
{
methods
:
{
getList
()
{
get_manufacturer_list
()
{
if
(
manufacturer_list_back_up
.
length
)
{
this
.
manufacturer_list
=
manufacturer_list_back_up
return
}
manufacturers
manufacturers
.
req
({})
.
req
({})
.
then
(
res
=>
(
this
.
list
=
res
.
list
))
.
then
(
res
=>
(
manufacturer_list_back_up
=
this
.
manufacturer_list
=
res
))
.
catch
(
err
=>
this
.
error
(
err
))
},
get_merchant_list
()
{
if
(
merchant_list_back_up
.
length
)
{
this
.
merchant_list
=
merchant_list_back_up
return
}
merchants
.
req
({
merchantType
:
401
,
merchantStatus
:
0
})
.
then
(
res
=>
(
merchant_list_back_up
=
this
.
merchant_list
=
res
))
.
catch
(
err
=>
this
.
error
(
err
))
.
catch
(
err
=>
this
.
error
(
err
))
}
}
},
},
mounted
()
{
mounted
()
{
this
.
getList
()
this
.
get_manufacturer_list
()
this
.
get_merchant_list
()
}
}
}
}
</
script
>
</
script
>
<
style
rel=
"stylesheet/scss"
lang=
"scss"
scoped
>
<
style
rel=
"stylesheet/scss"
lang=
"scss"
>
.manufacturer
{
.upload-demo
{
padding
:
0
!important
;
margin-top
:
0
!important
;
width
:
100%
!important
;
height
:
60px
!important
;
}
}
</
style
>
</
style
>
src/views/customer/voice/Edit.vue
View file @
48eb0bc
...
@@ -38,8 +38,9 @@
...
@@ -38,8 +38,9 @@
name=
"manufacturer"
name=
"manufacturer"
v-validate=
"'required'"
v-validate=
"'required'"
v-model=
"editForm.manufacturer"
v-model=
"editForm.manufacturer"
:in_row=
'
fals
e'
:in_row=
'
tru
e'
:value
.
sync=
"editForm.manufacturer"
:value
.
sync=
"editForm.manufacturer"
:uploadAction=
"uploadAction"
/>
/>
<!--
</gl-form-item>
-->
<!--
</gl-form-item>
-->
</gl-col>
</gl-col>
...
@@ -426,6 +427,17 @@ export default {
...
@@ -426,6 +427,17 @@ export default {
.is-plain
{
.is-plain
{
padding
:
4px
20px
;
padding
:
4px
20px
;
}
}
//
.el-upload-list--text
{
//
margin-top
:
-30px
;
//
font-size
:
12px
;
//
background
:
#fff
;
//
margin-left
:
380px
;
//
width
:
300px
;
//
}
}
.el-date-editor--datetimerange
{
width
:
312px
!important
;
}
.el-upload__tip
{
.el-upload__tip
{
margin-top
:
-24px
;
margin-top
:
-24px
;
margin-left
:
140px
;
margin-left
:
140px
;
...
@@ -438,16 +450,5 @@ export default {
...
@@ -438,16 +450,5 @@ export default {
width
:
92%
;
width
:
92%
;
height
:
70px
;
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
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