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 {
GlAxios
}
from
'glsx-vue-common'
const
path
=
'admin-ddh-aimanager/ip/expression'
const
__
brandList
=
`
${
path
}
/brandList
`
const
__
expressionList
=
`
${
path
}
/search
`
const
__grayscaleuser
=
`
${
path
}
/download/grayscaleuser`
const
__addExp
=
`
${
path
}
/add`
const
__getExp
=
`
${
path
}
/get`
...
...
@@ -10,9 +10,9 @@ const __mergeExp = `${path}/merge`
const
__addBg
=
`
${
path
}
/background/add`
const
__mergeBg
=
`
${
path
}
/background/merge`
const
get
Brand
List
=
{
p
:
[
__
brand
List
],
req
:
params
=>
GlAxios
.
get
(
__brandList
,
{
params
}
)
const
get
Exp
List
=
{
p
:
[
__
expression
List
],
req
:
params
=>
GlAxios
.
post
(
__expressionList
,
params
)
}
const
grayscaleuser
=
{
...
...
@@ -45,7 +45,7 @@ const mergeBg = {
req
:
params
=>
GlAxios
.
post
(
__mergeBg
,
params
,
{
headers
:
{
'Content-Type'
:
'application/json; charset=utf-8'
},
requestType
:
'jsonString'
})
}
export
{
get
Brand
List
,
get
Exp
List
,
grayscaleuser
,
addExp
,
getExp
,
...
...
src/api/index.js
View file @
aaa3802
import
{
get
Brand
List
,
get
Exp
List
,
grayscaleuser
,
addExp
,
getExp
,
...
...
@@ -18,7 +18,7 @@ export {
voiceList
,
manufacturers
,
merchants
,
get
Brand
List
,
get
Exp
List
,
grayscaleuser
,
addExp
,
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 @@
clearable
/>
</gl-form-item>
<gl-form-item>
<gl-select
v-model=
"searchCondition.manufacturer"
placeholder=
"请选择品牌厂商"
>
<gl-option
v-for=
"item in manufacturers"
:key=
"item.value"
:label=
"item.label"
:value=
"item.value"
<Manufacturers
width=
"200px"
:eventBus=
"idPassvalue"
:value
.
sync=
"manufacturer"
:manufactureOnly=
"true"
/>
</gl-select>
</gl-form-item>
<gl-form-item>
<gl-button
type=
"primary"
...
...
@@ -36,14 +29,13 @@
<gl-button
class=
"newButton"
type=
"primary"
@
click=
"dialog"
@
click=
"dialog
(null)
"
>
添加品牌IP
</gl-button>
</gl-form-item>
</gl-form>
</div>
<edit
:updateVisible=
"updateVisible"
:allModulelist=
"allModulelist"
:updateLoading=
"updateLoading"
:idPassvalue=
"idPassvalue"
@
updateClose=
"updateDialogClose"
...
...
@@ -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'
>
<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]"
>
</
template
>
<
template
v-else
>
...
...
@@ -80,42 +72,31 @@
<
script
>
import
Edit
from
'./Edit'
// import { fn, treeCheckKeys, deleteEmptyAttribute } from '@/common/common'
import
{
get
BrandList
,
manufacturers
}
from
'@/api'
import
{
get
ExpList
,
mergeExp
}
from
'@/api'
import
{
NoticeMixin
}
from
'@/mixins'
import
{
Manufacturers
}
from
'../components'
import
Vue
from
'vue'
export
default
{
name
:
'channel'
,
components
:
{
Edit
Edit
,
Manufacturers
},
watch
:
{
'searchCondition.content'
(
val
)
{
!
val
&&
this
.
loadingGetList
()
}
},
mixins
:
[
NoticeMixin
],
data
()
{
return
{
searchCondition
:
{
manufacturer
:
''
,
content
:
''
},
searchCondition
:
{},
manufacturer
:
null
,
pageNum
:
1
,
pageSize
:
10
,
total
:
10
,
/* 组件params-start */
updateVisible
:
false
,
// updateParams: this.$deep_clone(channelStructrue),
allModulelist
:
[],
recordVisible
:
false
,
/* 组件params-end */
/* loadingParams-start */
tableLoading
:
false
,
updateLoading
:
false
,
recordLoading
:
false
,
idPassvalue
:
null
,
// expressionId: 6,
manufacturers
:
[],
/* loadingParams-end */
tableData
:
{
border
:
true
,
...
...
@@ -125,32 +106,44 @@ export default {
column
:
[
{
label
:
'品牌厂商'
,
prop
:
'
brand
'
prop
:
'
manufacturerName
'
},
{
label
:
'渠道商'
,
prop
:
'
channel
'
prop
:
'
merchantName
'
},
{
label
:
'默认IP表情'
,
prop
:
'
ipbq
'
prop
:
'
packagePath
'
},
{
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
:
'变更时间'
,
prop
:
'
changeTim
e'
,
prop
:
'
updatedDat
e'
,
formatter
:
cellValue
=>
{
if
(
cellValue
.
changeTim
e
)
{
return
new
Date
(
cellValue
.
changeTim
e
).
format
(
'yyyy-MM-dd'
)
if
(
cellValue
.
updatedDat
e
)
{
return
new
Date
(
cellValue
.
updatedDat
e
).
format
(
'yyyy-MM-dd'
)
}
}
},
{
label
:
'操作人'
,
prop
:
'
cre
atedBy'
prop
:
'
upd
atedBy'
}
],
number
:
{
...
...
@@ -169,7 +162,7 @@ export default {
{
type
:
'primary'
,
icon
:
'el-icon-edit'
,
callback
:
(
index
,
rows
)
=>
this
.
dialog
(
index
)
callback
:
(
index
,
rows
)
=>
this
.
dialog
(
rows
[
index
].
id
)
},
{
type
:
'primary'
,
...
...
@@ -180,7 +173,7 @@ export default {
})
.
then
(()
=>
{
this
.
tableLoading
=
true
this
.
delete
Channel
(
rows
[
index
].
id
)
this
.
delete
Exp
(
rows
[
index
].
id
)
})
.
catch
(
err
=>
this
.
error
(
err
))
}
...
...
@@ -192,7 +185,6 @@ export default {
},
mounted
()
{
this
.
getList
()
this
.
getManufacturer
()
this
.
idPassvalue
=
new
Vue
()
},
methods
:
{
...
...
@@ -212,8 +204,7 @@ export default {
},
getList
()
{
const
params
=
this
.
getParams
()
// params = deleteEmptyAttribute(params)
getBrandList
getExpList
.
req
(
params
)
.
then
(
res
=>
{
this
.
total
=
res
.
total
...
...
@@ -225,56 +216,6 @@ export default {
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
)
{
this
.
pageSize
=
val
this
.
loadingGetList
()
...
...
@@ -283,25 +224,24 @@ export default {
this
.
pageNum
=
val
this
.
loadingGetList
()
},
updateVisibleChange
(
)
{
dialog
(
objId
)
{
this
.
updateVisible
=
!
this
.
updateVisible
this
.
updateLoading
=
false
// if(!this.updateVisible) {
// this.allModulelist = []
// this.updateParams = this.$deep_clone(channelStructrue)
// }
this
.
idPassvalue
.
$emit
(
'expressionId'
,
objId
)
},
dialog
(
index
)
{
this
.
updateVisible
=
!
this
.
updateVisible
// this.idPassvalue.$emit('expressionId', 6)
},
updateDialogClose
(
updateData
)
{
// this.updateLoading = true
// updateData ? this.updateChannel(updateData) : this.updateVisibleChange()
updateDialogClose
()
{
console
.
log
(
'关闭'
)
this
.
updateVisible
=
!
this
.
updateVisible
this
.
loadingGetList
()
},
recordVisibleChange
()
{
this
.
recordVisible
=
!
this
.
recordVisible
deleteExp
(
objId
)
{
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 {
})
},
immediate
:
true
//this.eventBus.$emit('manufacturerChanged', val)
//
this.eventBus.$emit('manufacturerChanged', val)
},
uploadAction
:
{
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