Commit aaa38028 by wangql

a

1 parent e08b7190
...@@ -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 getBrandList = { const getExpList = {
p: [__brandList], p: [__expressionList],
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 {
getBrandList, getExpList,
grayscaleuser, grayscaleuser,
addExp, addExp,
getExp, getExp,
......
import { import {
getBrandList, getExpList,
grayscaleuser, grayscaleuser,
addExp, addExp,
getExp, getExp,
...@@ -18,7 +18,7 @@ export { ...@@ -18,7 +18,7 @@ export {
voiceList, voiceList,
manufacturers, manufacturers,
merchants, merchants,
getBrandList, getExpList,
grayscaleuser, grayscaleuser,
addExp, addExp,
getExp, getExp,
......
...@@ -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 === "ipbg"'> <template v-if='i.prop === "ipBackgroundList"'>
<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 { getBrandList, manufacturers } from '@/api' import { getExpList, 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: 'changeTime', prop: 'updatedDate',
formatter: cellValue => { formatter: cellValue => {
if (cellValue.changeTime) { if (cellValue.updatedDate) {
return new Date(cellValue.changeTime).format('yyyy-MM-dd') return new Date(cellValue.updatedDate).format('yyyy-MM-dd')
} }
} }
}, },
{ {
label: '操作人', label: '操作人',
prop: 'createdBy' prop: 'updatedBy'
} }
], ],
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.deleteChannel(rows[index].id) this.deleteExp(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.updateLoading = false
// if(!this.updateVisible) {
// this.allModulelist = []
// this.updateParams = this.$deep_clone(channelStructrue)
// }
},
dialog(index) {
this.updateVisible = !this.updateVisible this.updateVisible = !this.updateVisible
// this.idPassvalue.$emit('expressionId', 6) this.idPassvalue.$emit('expressionId', objId)
}, },
updateDialogClose(updateData) { updateDialogClose() {
// this.updateLoading = true console.log('关闭')
// 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))
}
} }
} }
} }
......
...@@ -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) {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!