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 aaa38028
authored
Jan 27, 2019
by
wangql
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
a
1 parent
e08b7190
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
58 additions
and
118 deletions
src/api/brand.js
src/api/index.js
src/views/customer/brand/Edit.vue
src/views/customer/brand/index.vue
src/views/customer/components/src/manufacturers.vue
src/api/brand.js
View file @
aaa3802
...
@@ -2,7 +2,7 @@ import {
...
@@ -2,7 +2,7 @@ import {
GlAxios
GlAxios
}
from
'glsx-vue-common'
}
from
'glsx-vue-common'
const
path
=
'admin-ddh-aimanager/ip/expression'
const
path
=
'admin-ddh-aimanager/ip/expression'
const
__
brandList
=
`
${
path
}
/brandList
`
const
__
expressionList
=
`
${
path
}
/search
`
const
__grayscaleuser
=
`
${
path
}
/download/grayscaleuser`
const
__grayscaleuser
=
`
${
path
}
/download/grayscaleuser`
const
__addExp
=
`
${
path
}
/add`
const
__addExp
=
`
${
path
}
/add`
const
__getExp
=
`
${
path
}
/get`
const
__getExp
=
`
${
path
}
/get`
...
@@ -10,9 +10,9 @@ const __mergeExp = `${path}/merge`
...
@@ -10,9 +10,9 @@ const __mergeExp = `${path}/merge`
const
__addBg
=
`
${
path
}
/background/add`
const
__addBg
=
`
${
path
}
/background/add`
const
__mergeBg
=
`
${
path
}
/background/merge`
const
__mergeBg
=
`
${
path
}
/background/merge`
const
get
Brand
List
=
{
const
get
Exp
List
=
{
p
:
[
__
brand
List
],
p
:
[
__
expression
List
],
req
:
params
=>
GlAxios
.
get
(
__brandList
,
{
params
}
)
req
:
params
=>
GlAxios
.
post
(
__expressionList
,
params
)
}
}
const
grayscaleuser
=
{
const
grayscaleuser
=
{
...
@@ -45,7 +45,7 @@ const mergeBg = {
...
@@ -45,7 +45,7 @@ const mergeBg = {
req
:
params
=>
GlAxios
.
post
(
__mergeBg
,
params
,
{
headers
:
{
'Content-Type'
:
'application/json; charset=utf-8'
},
requestType
:
'jsonString'
})
req
:
params
=>
GlAxios
.
post
(
__mergeBg
,
params
,
{
headers
:
{
'Content-Type'
:
'application/json; charset=utf-8'
},
requestType
:
'jsonString'
})
}
}
export
{
export
{
get
Brand
List
,
get
Exp
List
,
grayscaleuser
,
grayscaleuser
,
addExp
,
addExp
,
getExp
,
getExp
,
...
...
src/api/index.js
View file @
aaa3802
import
{
import
{
get
Brand
List
,
get
Exp
List
,
grayscaleuser
,
grayscaleuser
,
addExp
,
addExp
,
getExp
,
getExp
,
...
@@ -18,7 +18,7 @@ export {
...
@@ -18,7 +18,7 @@ export {
voiceList
,
voiceList
,
manufacturers
,
manufacturers
,
merchants
,
merchants
,
get
Brand
List
,
get
Exp
List
,
grayscaleuser
,
grayscaleuser
,
addExp
,
addExp
,
getExp
,
getExp
,
...
...
src/views/customer/brand/Edit.vue
View file @
aaa3802
This diff is collapsed.
Click to expand it.
src/views/customer/brand/index.vue
View file @
aaa3802
...
@@ -13,19 +13,12 @@
...
@@ -13,19 +13,12 @@
clearable
clearable
/>
/>
</gl-form-item>
</gl-form-item>
<gl-form-item>
<Manufacturers
<gl-select
width=
"200px"
v-model=
"searchCondition.manufacturer"
:eventBus=
"idPassvalue"
placeholder=
"请选择品牌厂商"
:value
.
sync=
"manufacturer"
>
:manufactureOnly=
"true"
<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-button
<gl-button
type=
"primary"
type=
"primary"
...
@@ -36,14 +29,13 @@
...
@@ -36,14 +29,13 @@
<gl-button
<gl-button
class=
"newButton"
class=
"newButton"
type=
"primary"
type=
"primary"
@
click=
"dialog"
@
click=
"dialog
(null)
"
>
添加品牌IP
</gl-button>
>
添加品牌IP
</gl-button>
</gl-form-item>
</gl-form-item>
</gl-form>
</gl-form>
</div>
</div>
<edit
<edit
:updateVisible=
"updateVisible"
:updateVisible=
"updateVisible"
:allModulelist=
"allModulelist"
:updateLoading=
"updateLoading"
:updateLoading=
"updateLoading"
:idPassvalue=
"idPassvalue"
:idPassvalue=
"idPassvalue"
@
updateClose=
"updateDialogClose"
@
updateClose=
"updateDialogClose"
...
@@ -54,7 +46,7 @@
...
@@ -54,7 +46,7 @@
>
>
<gl-table-column
align=
"center"
v-for=
"(i, index) in tableData.column"
:key=
"index"
:label=
'i.label'
:prop=
'i.prop'
:width=
'i.width'
>
<gl-table-column
align=
"center"
v-for=
"(i, index) in tableData.column"
:key=
"index"
:label=
'i.label'
:prop=
'i.prop'
:width=
'i.width'
>
<template
slot-scope=
"scope"
>
<template
slot-scope=
"scope"
>
<template
v-if=
'i.prop === "ip
bg
"'
>
<template
v-if=
'i.prop === "ip
BackgroundList
"'
>
<img
class=
"tableImg"
:src=
"tableData.data[scope.scope.$index][i.prop]"
>
<img
class=
"tableImg"
:src=
"tableData.data[scope.scope.$index][i.prop]"
>
</
template
>
</
template
>
<
template
v-else
>
<
template
v-else
>
...
@@ -80,42 +72,31 @@
...
@@ -80,42 +72,31 @@
<
script
>
<
script
>
import
Edit
from
'./Edit'
import
Edit
from
'./Edit'
// import { fn, treeCheckKeys, deleteEmptyAttribute } from '@/common/common'
// import { fn, treeCheckKeys, deleteEmptyAttribute } from '@/common/common'
import
{
get
BrandList
,
manufacturers
}
from
'@/api'
import
{
get
ExpList
,
mergeExp
}
from
'@/api'
import
{
NoticeMixin
}
from
'@/mixins'
import
{
NoticeMixin
}
from
'@/mixins'
import
{
Manufacturers
}
from
'../components'
import
Vue
from
'vue'
import
Vue
from
'vue'
export
default
{
export
default
{
name
:
'channel'
,
name
:
'channel'
,
components
:
{
components
:
{
Edit
Edit
,
Manufacturers
},
},
watch
:
{
watch
:
{
'searchCondition.content'
(
val
)
{
!
val
&&
this
.
loadingGetList
()
}
},
},
mixins
:
[
NoticeMixin
],
mixins
:
[
NoticeMixin
],
data
()
{
data
()
{
return
{
return
{
searchCondition
:
{
searchCondition
:
{},
manufacturer
:
''
,
manufacturer
:
null
,
content
:
''
},
pageNum
:
1
,
pageNum
:
1
,
pageSize
:
10
,
pageSize
:
10
,
total
:
10
,
total
:
10
,
/* 组件params-start */
/* 组件params-start */
updateVisible
:
false
,
updateVisible
:
false
,
// updateParams: this.$deep_clone(channelStructrue),
allModulelist
:
[],
recordVisible
:
false
,
/* 组件params-end */
/* loadingParams-start */
tableLoading
:
false
,
tableLoading
:
false
,
updateLoading
:
false
,
updateLoading
:
false
,
recordLoading
:
false
,
idPassvalue
:
null
,
idPassvalue
:
null
,
// expressionId: 6,
manufacturers
:
[],
/* loadingParams-end */
/* loadingParams-end */
tableData
:
{
tableData
:
{
border
:
true
,
border
:
true
,
...
@@ -125,32 +106,44 @@ export default {
...
@@ -125,32 +106,44 @@ export default {
column
:
[
column
:
[
{
{
label
:
'品牌厂商'
,
label
:
'品牌厂商'
,
prop
:
'
brand
'
prop
:
'
manufacturerName
'
},
},
{
{
label
:
'渠道商'
,
label
:
'渠道商'
,
prop
:
'
channel
'
prop
:
'
merchantName
'
},
},
{
{
label
:
'默认IP表情'
,
label
:
'默认IP表情'
,
prop
:
'
ipbq
'
prop
:
'
packagePath
'
},
},
{
{
label
:
'默认IP背景'
,
label
:
'默认IP背景'
,
prop
:
'ipbg'
prop
:
'ipBackgroundList'
,
formatter
:
(
cellValue
)
=>
{
if
(
cellValue
.
ipBackgroundList
)
{
var
imgUrl
=
''
cellValue
.
ipBackgroundList
.
forEach
((
item
,
index
)
=>
{
if
(
item
.
backgroundType
===
'DEFAULT'
)
{
imgUrl
=
item
.
backgroundPath
return
false
}
})
return
imgUrl
}
}
},
},
{
{
label
:
'变更时间'
,
label
:
'变更时间'
,
prop
:
'
changeTim
e'
,
prop
:
'
updatedDat
e'
,
formatter
:
cellValue
=>
{
formatter
:
cellValue
=>
{
if
(
cellValue
.
changeTim
e
)
{
if
(
cellValue
.
updatedDat
e
)
{
return
new
Date
(
cellValue
.
changeTim
e
).
format
(
'yyyy-MM-dd'
)
return
new
Date
(
cellValue
.
updatedDat
e
).
format
(
'yyyy-MM-dd'
)
}
}
}
}
},
},
{
{
label
:
'操作人'
,
label
:
'操作人'
,
prop
:
'
cre
atedBy'
prop
:
'
upd
atedBy'
}
}
],
],
number
:
{
number
:
{
...
@@ -169,7 +162,7 @@ export default {
...
@@ -169,7 +162,7 @@ export default {
{
{
type
:
'primary'
,
type
:
'primary'
,
icon
:
'el-icon-edit'
,
icon
:
'el-icon-edit'
,
callback
:
(
index
,
rows
)
=>
this
.
dialog
(
index
)
callback
:
(
index
,
rows
)
=>
this
.
dialog
(
rows
[
index
].
id
)
},
},
{
{
type
:
'primary'
,
type
:
'primary'
,
...
@@ -180,7 +173,7 @@ export default {
...
@@ -180,7 +173,7 @@ export default {
})
})
.
then
(()
=>
{
.
then
(()
=>
{
this
.
tableLoading
=
true
this
.
tableLoading
=
true
this
.
delete
Channel
(
rows
[
index
].
id
)
this
.
delete
Exp
(
rows
[
index
].
id
)
})
})
.
catch
(
err
=>
this
.
error
(
err
))
.
catch
(
err
=>
this
.
error
(
err
))
}
}
...
@@ -192,7 +185,6 @@ export default {
...
@@ -192,7 +185,6 @@ export default {
},
},
mounted
()
{
mounted
()
{
this
.
getList
()
this
.
getList
()
this
.
getManufacturer
()
this
.
idPassvalue
=
new
Vue
()
this
.
idPassvalue
=
new
Vue
()
},
},
methods
:
{
methods
:
{
...
@@ -212,8 +204,7 @@ export default {
...
@@ -212,8 +204,7 @@ export default {
},
},
getList
()
{
getList
()
{
const
params
=
this
.
getParams
()
const
params
=
this
.
getParams
()
// params = deleteEmptyAttribute(params)
getExpList
getBrandList
.
req
(
params
)
.
req
(
params
)
.
then
(
res
=>
{
.
then
(
res
=>
{
this
.
total
=
res
.
total
this
.
total
=
res
.
total
...
@@ -225,56 +216,6 @@ export default {
...
@@ -225,56 +216,6 @@ export default {
this
.
error
(
err
)
this
.
error
(
err
)
})
})
},
},
updateChannel
(
params
)
{
// updateChannel
// .req(params)
// .then(res => {
// notice.okTips()
// this.loadingGetList()
// this.updateVisibleChange()
// })
// .catch(err => {
// this.updateLoading = false
// notice.errorTips(err)
// })
},
deleteChannel
(
params
)
{
// deleteChannel
// .req({ id: params })
// .then(res => {
// notice.okTips(res)
// this.loadingGetList()
// })
// .catch(err => {
// notice.errorTips(err)
// })
},
channelLog
(
params
)
{
// this.recordVisibleChange()
// channelLog
// .req({ channelId: params })
// .then(res => {
// // notice.okTips(res)
// this.recordTable.list = res.list
// this.recordTable.total = res.total
// this.recordLoading = false
// // console.log(this.recordTable)
// // this.recordVisibleChange()
// })
// .catch(err => {
// notice.errorTips(err)
// })
},
getManufacturer
()
{
manufacturers
.
req
({})
.
then
(
res
=>
(
this
.
manufacturers
=
res
.
list
))
.
catch
(
err
=>
this
.
error
(
err
))
},
/* 接口请求-end */
handleSearch
()
{
this
.
loadingGetList
()
},
handleSizeChange
(
val
)
{
handleSizeChange
(
val
)
{
this
.
pageSize
=
val
this
.
pageSize
=
val
this
.
loadingGetList
()
this
.
loadingGetList
()
...
@@ -283,25 +224,24 @@ export default {
...
@@ -283,25 +224,24 @@ export default {
this
.
pageNum
=
val
this
.
pageNum
=
val
this
.
loadingGetList
()
this
.
loadingGetList
()
},
},
updateVisibleChange
(
)
{
dialog
(
objId
)
{
this
.
updateVisible
=
!
this
.
updateVisible
this
.
updateVisible
=
!
this
.
updateVisible
this
.
updateLoading
=
false
this
.
idPassvalue
.
$emit
(
'expressionId'
,
objId
)
// if(!this.updateVisible) {
// this.allModulelist = []
// this.updateParams = this.$deep_clone(channelStructrue)
// }
},
},
dialog
(
index
)
{
updateDialogClose
()
{
this
.
updateVisible
=
!
this
.
updateVisible
console
.
log
(
'关闭'
)
// this.idPassvalue.$emit('expressionId', 6)
},
updateDialogClose
(
updateData
)
{
// this.updateLoading = true
// updateData ? this.updateChannel(updateData) : this.updateVisibleChange()
this
.
updateVisible
=
!
this
.
updateVisible
this
.
updateVisible
=
!
this
.
updateVisible
this
.
loadingGetList
()
},
},
recordVisibleChange
()
{
deleteExp
(
objId
)
{
this
.
recordVisible
=
!
this
.
recordVisible
if
(
objId
)
{
mergeExp
.
req
({
id
:
objId
,
deletedFlag
:
'D'
})
.
then
(
res
=>
{
this
.
loadingGetList
()
})
.
catch
(
err
=>
console
.
log
(
err
))
}
}
}
}
}
}
}
...
...
src/views/customer/components/src/manufacturers.vue
View file @
aaa3802
...
@@ -157,7 +157,7 @@ export default {
...
@@ -157,7 +157,7 @@ export default {
})
})
},
},
immediate
:
true
immediate
:
true
//this.eventBus.$emit('manufacturerChanged', val)
//
this.eventBus.$emit('manufacturerChanged', val)
},
},
uploadAction
:
{
uploadAction
:
{
handler
(
__sAction
)
{
handler
(
__sAction
)
{
...
...
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