|
|
@ -7,7 +7,7 @@ |
|
|
</div> |
|
|
</div> |
|
|
<div class="body"> |
|
|
<div class="body"> |
|
|
<div class="query"> |
|
|
<div class="query"> |
|
|
<div class="layout_item" v-for="(item,index) in layoutList"> |
|
|
<div class="layout_item" v-for="(item,index) in layoutList" :key="index" @click="changeRank(index+1)"> |
|
|
<img src="../../../assets/icons/svg/layout.svg" > |
|
|
<img src="../../../assets/icons/svg/layout.svg" > |
|
|
<div :class="active==index?'active':''">{{item.text}}</div> |
|
|
<div :class="active==index?'active':''">{{item.text}}</div> |
|
|
</div> |
|
|
</div> |
|
|
@ -16,111 +16,260 @@ |
|
|
<div class="table_title"> |
|
|
<div class="table_title"> |
|
|
<span>平台推荐展示</span> |
|
|
<span>平台推荐展示</span> |
|
|
<div class="table_title_right"> |
|
|
<div class="table_title_right"> |
|
|
<a-button type="primary" class="query_button">添 加</a-button> |
|
|
<a-button type="primary" class="query_button" @click="showAdd">添 加</a-button> |
|
|
<a-button class="query_button table_title_right_del">删 除</a-button> |
|
|
<a-button class="query_button table_title_right_del" @click="delRank">删 除</a-button> |
|
|
</div> |
|
|
</div> |
|
|
|
|
|
|
|
|
</div> |
|
|
</div> |
|
|
<a-table :columns="columns" :data-source="data" bordered :pagination="false"> |
|
|
<a-table :columns="columns" :data-source="data" bordered :pagination="false" :row-selection="{ selectedRowKeys: selectedRowKeys1,onChange: onSelectChange1 }"> |
|
|
<template slot="operation"> |
|
|
<template slot="goods_status" slot-scope="goods_status"> |
|
|
|
|
|
<span>{{goods_status==1?'上架中':goods_status==2?'下架中':goods_status==3?'已转让':'已失效'}}</span> |
|
|
|
|
|
</template> |
|
|
|
|
|
<template slot="goods_type" slot-scope="goods_type"> |
|
|
|
|
|
<span>{{goods_type==1?'文化资源数据':'文化数字内容'}}</span> |
|
|
|
|
|
</template> |
|
|
|
|
|
<template slot="operation" slot-scope="item"> |
|
|
<a-space :size="24"> |
|
|
<a-space :size="24"> |
|
|
<span class="table_operation">上移</span> |
|
|
<span class="table_operation" @click="rankingSort(item.goods_islicode,1)">上移</span> |
|
|
<span class="table_operation">下移</span> |
|
|
<span class="table_operation" @click="rankingSort(item.goods_islicode,2)">下移</span> |
|
|
</a-space> |
|
|
</a-space> |
|
|
</template> |
|
|
</template> |
|
|
</a-table> |
|
|
</a-table> |
|
|
|
|
|
</div> |
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
|
|
<!-- 添加排行榜 --> |
|
|
|
|
|
<a-modal v-model="visible2" title="添加" width="1400px" :bodyStyle="modeStyle"> |
|
|
|
|
|
<div > |
|
|
|
|
|
<a-row justify="space-between" class="modal_select"> |
|
|
|
|
|
<a-col :span="5" class="query_item"> |
|
|
|
|
|
<span>ISLI标识码:</span> |
|
|
|
|
|
<a-input v-model="query1.islicode"/> |
|
|
|
|
|
</a-col> |
|
|
|
|
|
<a-col :span="5" class="query_item"> |
|
|
|
|
|
<span>标的名称:</span> |
|
|
|
|
|
<a-input v-model="query1.goods_name"/> |
|
|
|
|
|
</a-col> |
|
|
|
|
|
<a-col :span="5" class="query_item"> |
|
|
|
|
|
<span>委托方:</span> |
|
|
|
|
|
<a-input v-model="query1.entrust_name"/> |
|
|
|
|
|
</a-col> |
|
|
|
|
|
<a-col :span="5" class="query_item"> |
|
|
|
|
|
<span>标的类型:</span> |
|
|
|
|
|
<a-select default-value="" v-model="query1.goods_type"> |
|
|
|
|
|
<a-select-option value="">全部</a-select-option> |
|
|
|
|
|
<a-select-option value="1">文化资源数据</a-select-option> |
|
|
|
|
|
<a-select-option value="2">文化数字内容</a-select-option> |
|
|
|
|
|
</a-select> |
|
|
|
|
|
</a-col> |
|
|
|
|
|
<a-col :span="5" class="query_item"> |
|
|
|
|
|
<span>数据状态:</span> |
|
|
|
|
|
<a-select default-value="" v-model="query1.data_type"> |
|
|
|
|
|
<a-select-option value="">全部文化数据</a-select-option> |
|
|
|
|
|
<a-select-option value="1">已上架文化数据</a-select-option> |
|
|
|
|
|
<a-select-option value="2">已下架文化数据</a-select-option> |
|
|
|
|
|
<a-select-option value="3">已转让文化数据</a-select-option> |
|
|
|
|
|
<a-select-option value="4">已失效文化数据</a-select-option> |
|
|
|
|
|
</a-select> |
|
|
|
|
|
</a-col> |
|
|
|
|
|
<a-col :span="5" class="query_item"> |
|
|
|
|
|
<span>交易方式:</span> |
|
|
|
|
|
<a-select default-value="" v-model="query1.transaction"> |
|
|
|
|
|
<a-select-option value="">全部</a-select-option> |
|
|
|
|
|
<a-select-option value="1">协议</a-select-option> |
|
|
|
|
|
<a-select-option value="2">竞价</a-select-option> |
|
|
|
|
|
</a-select> |
|
|
|
|
|
</a-col> |
|
|
|
|
|
<a-col :span="5" class="query_item" > |
|
|
|
|
|
<span>是否展示:</span> |
|
|
|
|
|
<a-select default-value="" v-model="query1.show"> |
|
|
|
|
|
<a-select-option value="">全部</a-select-option> |
|
|
|
|
|
<a-select-option value="1">是</a-select-option> |
|
|
|
|
|
<a-select-option value="2">否</a-select-option> |
|
|
|
|
|
</a-select> |
|
|
|
|
|
</a-col> |
|
|
|
|
|
<a-col :span="5" class="query_item" > |
|
|
|
|
|
<span>排序方式:</span> |
|
|
|
|
|
<a-select default-value="1" v-model="query1.order_status"> |
|
|
|
|
|
<a-select-option value="1">销售数量从高到低</a-select-option> |
|
|
|
|
|
<a-select-option value="2">销售单价从高到低</a-select-option> |
|
|
|
|
|
<a-select-option value="3">点击次数从高到低</a-select-option> |
|
|
|
|
|
<a-select-option value="4">浏览次数从高到低</a-select-option> |
|
|
|
|
|
</a-select> |
|
|
|
|
|
</a-col> |
|
|
|
|
|
<a-col :span="4" class="query_item query_item1"> |
|
|
|
|
|
<a-space :size="21"> |
|
|
|
|
|
<a-button type="primary" class="query_button" @click="showAdd">查 询</a-button> |
|
|
|
|
|
<a-button class="query_button" @click="resetQurey">重 置</a-button> |
|
|
|
|
|
</a-space> |
|
|
|
|
|
</a-col> |
|
|
|
|
|
</a-row> |
|
|
|
|
|
<a-table :columns="columns1" :data-source="data1" bordered :pagination="false" :row-selection="{ selectedRowKeys: selectedRowKeys,onChange: onSelectChange }"> |
|
|
|
|
|
<template slot="goods_status" slot-scope="goods_status"> |
|
|
|
|
|
<span>{{goods_status==1?'上架中':goods_status==2?'下架中':goods_status==3?'已转让':'已失效'}}</span> |
|
|
|
|
|
</template> |
|
|
|
|
|
<template slot="goods_type" slot-scope="goods_type"> |
|
|
|
|
|
<span>{{goods_type==1?'文化资源数据':'文化数字内容'}}</span> |
|
|
|
|
|
</template> |
|
|
|
|
|
<template slot="is_recommend" slot-scope="is_recommend"> |
|
|
|
|
|
<span>{{is_recommend==0?'否':'是'}}</span> |
|
|
|
|
|
</template> |
|
|
|
|
|
</a-table> |
|
|
|
|
|
|
|
|
<a-pagination |
|
|
<a-pagination |
|
|
class="pagination" |
|
|
class="pagination" |
|
|
size="small" |
|
|
size="small" |
|
|
:total="total" |
|
|
:total="total" |
|
|
v-model="current" |
|
|
v-model="page" |
|
|
:page-size="pageSize" |
|
|
:page-size="limit" |
|
|
:show-total="total => `第 ${current} / ${pageSize} 条 / 总共 ${total} 条`" |
|
|
:show-total="total => `第 ${startTotal} - ${endTotal} 条 / 总共 ${total} 条`" |
|
|
:page-size-options="pageSizeOptions" |
|
|
:page-size-options="pageSizeOptions" |
|
|
@showSizeChange="onShowSizeChange" |
|
|
@showSizeChange="onShowSizeChange" |
|
|
|
|
|
@change="changePage" |
|
|
show-size-changer > |
|
|
show-size-changer > |
|
|
<template slot="buildOptionText" slot-scope="props"> |
|
|
<template slot="buildOptionText" slot-scope="props"> |
|
|
<span >{{ props.value }}条/页</span> |
|
|
<span >{{ props.value }}条/页</span> |
|
|
</template> |
|
|
</template> |
|
|
</a-pagination> |
|
|
</a-pagination> |
|
|
|
|
|
|
|
|
</div> |
|
|
</div> |
|
|
|
|
|
<template slot="footer"> |
|
|
|
|
|
<div> |
|
|
|
|
|
<a-button type="white" @click="visible2=false">返 回</a-button> |
|
|
|
|
|
<a-button type="primary" @click="addRank">确定</a-button> |
|
|
</div> |
|
|
</div> |
|
|
|
|
|
</template> |
|
|
|
|
|
</a-modal> |
|
|
|
|
|
|
|
|
</div> |
|
|
</div> |
|
|
</template> |
|
|
</template> |
|
|
<script> |
|
|
<script> |
|
|
import Operation from '../../Operation.vue' |
|
|
import Operation from '../../Operation.vue' |
|
|
|
|
|
import {rankingList,getAllDate,addRanking,delRanking,rankingSort} from '../../../api/index' |
|
|
export default { |
|
|
export default { |
|
|
data() { |
|
|
data() { |
|
|
return{ |
|
|
return{ |
|
|
|
|
|
selectedRowKeys:[], |
|
|
|
|
|
selectedRowKeys1:[], |
|
|
|
|
|
visible2:false, |
|
|
pageSizeOptions: ['10', '20', '30', '40', '50'], |
|
|
pageSizeOptions: ['10', '20', '30', '40', '50'], |
|
|
//一页多少条 |
|
|
//一页多少条 |
|
|
pageSize:10, |
|
|
pageSize:10, |
|
|
total:500, |
|
|
total:500, |
|
|
|
|
|
startTotal:1, |
|
|
|
|
|
endTotal:10, |
|
|
|
|
|
limit:10, |
|
|
// 当前页数 |
|
|
// 当前页数 |
|
|
current: 1, |
|
|
page:1, |
|
|
|
|
|
modeStyle:{ |
|
|
|
|
|
'min-height':'800px' |
|
|
|
|
|
}, |
|
|
active:0, |
|
|
active:0, |
|
|
layoutList:[ |
|
|
layoutList:[ |
|
|
{text:'平台推荐展示'}, |
|
|
{text:'点击量排行榜'}, |
|
|
{text:'热门推荐展示'}, |
|
|
{text:'销售量排行榜'}, |
|
|
{text:'热卖推荐展示'}, |
|
|
{text:'推荐排行榜'}, |
|
|
], |
|
|
], |
|
|
data:[ |
|
|
query:{ |
|
|
|
|
|
type:'1' |
|
|
|
|
|
}, |
|
|
|
|
|
query1:{ |
|
|
|
|
|
islicode:'', |
|
|
|
|
|
goods_name:'', |
|
|
|
|
|
entrust_name:'', |
|
|
|
|
|
goods_entrust:'', |
|
|
|
|
|
goods_type:'', |
|
|
|
|
|
data_type:'', |
|
|
|
|
|
createtime:[], |
|
|
|
|
|
transaction:'', |
|
|
|
|
|
show:'', |
|
|
|
|
|
order_status:'1' |
|
|
|
|
|
}, |
|
|
|
|
|
data:[], |
|
|
|
|
|
data1:[], |
|
|
|
|
|
columns1:[ |
|
|
{ |
|
|
{ |
|
|
key: '1', |
|
|
title: '序号', |
|
|
name: 'John Brown', |
|
|
dataIndex: 'id', |
|
|
money: '¥300,000.00', |
|
|
width:'65px', |
|
|
address: 'New York No. 1 Lake Park', |
|
|
align:'center' |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
|
key: '2', |
|
|
title: '创建时间', |
|
|
name: 'Jim Green', |
|
|
dataIndex: 'createtime', |
|
|
money: '¥1,256,000.00', |
|
|
align:'center' |
|
|
address: 'London No. 1 Lake Park', |
|
|
|
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
|
key: '3', |
|
|
title: 'ISLI标识码', |
|
|
name: 'Joe Black', |
|
|
dataIndex: 'goods_islicode', |
|
|
money: '¥120,000.00', |
|
|
align:'center' |
|
|
address: 'Sidney No. 1 Lake Park', |
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
title: '标的名称', |
|
|
|
|
|
dataIndex: 'goods_name', |
|
|
|
|
|
align:'center' |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
title: '委托方', |
|
|
|
|
|
dataIndex: 'username', |
|
|
|
|
|
align:'center' |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
title: '标的类型', |
|
|
|
|
|
dataIndex: 'goods_type', |
|
|
|
|
|
scopedSlots:{customRender:'goods_type'}, |
|
|
|
|
|
align:'center' |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
title: '数据状态', |
|
|
|
|
|
dataIndex: 'goods_status', |
|
|
|
|
|
scopedSlots:{customRender:'goods_status'}, |
|
|
|
|
|
align:'center' |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
title: '是否展示', |
|
|
|
|
|
dataIndex: 'is_recommend', |
|
|
|
|
|
scopedSlots: { customRender: 'is_recommend' }, |
|
|
|
|
|
align:'center' |
|
|
}, |
|
|
}, |
|
|
], |
|
|
], |
|
|
columns:[ |
|
|
columns:[ |
|
|
{ |
|
|
{ |
|
|
title: '序号', |
|
|
title: '序号', |
|
|
className: 'table_column', |
|
|
|
|
|
dataIndex: 'id', |
|
|
dataIndex: 'id', |
|
|
width:'65px', |
|
|
width:'65px', |
|
|
align:'center' |
|
|
align:'center' |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
|
title: '创建时间', |
|
|
title: '创建时间', |
|
|
dataIndex: 'money', |
|
|
dataIndex: 'createtime', |
|
|
align:'center' |
|
|
align:'center' |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
|
title: 'ISLI标识码', |
|
|
title: 'ISLI标识码', |
|
|
dataIndex: 'name', |
|
|
dataIndex: 'goods_islicode', |
|
|
align:'center' |
|
|
align:'center' |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
|
title: '标的名称', |
|
|
title: '标的名称', |
|
|
dataIndex: '', |
|
|
dataIndex: 'goods_name', |
|
|
align:'center' |
|
|
align:'center' |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
|
title: '委托方', |
|
|
title: '委托方', |
|
|
dataIndex: '', |
|
|
dataIndex: 'username', |
|
|
align:'center' |
|
|
align:'center' |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
{ |
|
|
{ |
|
|
title: '标的类型', |
|
|
title: '标的类型', |
|
|
dataIndex: '', |
|
|
dataIndex: 'goods_type', |
|
|
|
|
|
scopedSlots:{customRender:'goods_type'}, |
|
|
align:'center' |
|
|
align:'center' |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
|
title: '数据状态', |
|
|
title: '数据状态', |
|
|
dataIndex: '', |
|
|
dataIndex: 'goods_status', |
|
|
|
|
|
scopedSlots:{customRender:'goods_status'}, |
|
|
align:'center' |
|
|
align:'center' |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
|
@ -135,19 +284,99 @@ export default { |
|
|
Operation |
|
|
Operation |
|
|
}, |
|
|
}, |
|
|
created(){ |
|
|
created(){ |
|
|
console.info(this.$route) |
|
|
this.getList() |
|
|
}, |
|
|
}, |
|
|
methods:{ |
|
|
methods:{ |
|
|
|
|
|
rankingSort(goods_isli,type){ |
|
|
|
|
|
let data={goods_isli:goods_isli,type:type} |
|
|
|
|
|
console.info(data) |
|
|
|
|
|
rankingSort(data).then(res=>{ |
|
|
|
|
|
if(res.code==200){ |
|
|
|
|
|
this.$message.success(type==1?'上移':'下移'+'成功!'); |
|
|
|
|
|
this.getList() |
|
|
|
|
|
this.selectedRowKeys1=[] |
|
|
|
|
|
}else{ |
|
|
|
|
|
this.$message.error(res.msg); |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
}, |
|
|
|
|
|
delRank(){ |
|
|
|
|
|
let data={goods_isli:this.selectedRowKeys1} |
|
|
|
|
|
delRanking(data).then(res=>{ |
|
|
|
|
|
if(res.code==200){ |
|
|
|
|
|
this.$message.success('删除成功!'); |
|
|
|
|
|
this.selectedRowKeys1=[] |
|
|
|
|
|
this.getList() |
|
|
|
|
|
}else{ |
|
|
|
|
|
this.$message.error(res.msg); |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
}, |
|
|
|
|
|
addRank(){ |
|
|
|
|
|
let data={goods_isli:this.selectedRowKeys} |
|
|
|
|
|
addRanking(data).then(res=>{ |
|
|
|
|
|
if(res.code==200){ |
|
|
|
|
|
this.$message.success('添加成功!'); |
|
|
|
|
|
this.selectedRowKeys=[] |
|
|
|
|
|
this.resetQurey() |
|
|
|
|
|
this.visible2=false |
|
|
|
|
|
this.getList() |
|
|
|
|
|
}else{ |
|
|
|
|
|
this.$message.error(res.msg); |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
}, |
|
|
|
|
|
// 重置query |
|
|
|
|
|
resetQurey(){ |
|
|
|
|
|
Object.assign(this.query1, this.$options.data().query1) |
|
|
|
|
|
}, |
|
|
|
|
|
onSelectChange(keys){ |
|
|
|
|
|
this.selectedRowKeys = keys; |
|
|
|
|
|
}, |
|
|
|
|
|
onSelectChange1(keys){ |
|
|
|
|
|
this.selectedRowKeys1 = keys; |
|
|
|
|
|
}, |
|
|
|
|
|
showAdd(){ |
|
|
|
|
|
let data=this.query1 |
|
|
|
|
|
data.limit=this.limit |
|
|
|
|
|
data.page=this.page |
|
|
|
|
|
getAllDate(data).then(res=>{ |
|
|
|
|
|
if(res.code==200){ |
|
|
|
|
|
this.data1=res.data.data |
|
|
|
|
|
this.startTotal=res.data.start |
|
|
|
|
|
this.endTotal=res.data.end |
|
|
|
|
|
this.total=res.data.total |
|
|
|
|
|
if(!this.visible2)this.visible2=true |
|
|
|
|
|
}else{ |
|
|
|
|
|
this.$message.error(res.msg); |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
}, |
|
|
|
|
|
changeRank(val){ |
|
|
|
|
|
this.query.type=val |
|
|
|
|
|
this.active=val-1 |
|
|
|
|
|
this.selectedRowKeys1=[] |
|
|
|
|
|
this.getList() |
|
|
|
|
|
}, |
|
|
|
|
|
getList(){ |
|
|
|
|
|
rankingList(this.query).then(res=>{ |
|
|
|
|
|
if(res.code==200){ |
|
|
|
|
|
this.data=res.data |
|
|
|
|
|
}else{ |
|
|
|
|
|
this.$message.error(res.msg); |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
}, |
|
|
// 切换一页显示多少条 |
|
|
// 切换一页显示多少条 |
|
|
onShowSizeChange(current, pageSize){ |
|
|
onShowSizeChange(current, pageSize){ |
|
|
this.pageSize = pageSize; |
|
|
this.limit = pageSize; |
|
|
|
|
|
this.showAdd() |
|
|
}, |
|
|
}, |
|
|
handleChange(){ |
|
|
// 切换页数 |
|
|
|
|
|
changePage(page, pageSize){ |
|
|
|
|
|
this.page=page |
|
|
|
|
|
this.showAdd() |
|
|
}, |
|
|
}, |
|
|
onChange(){ |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
</script> |
|
|
</script> |
|
|
@ -176,4 +405,14 @@ export default { |
|
|
color: white !important; |
|
|
color: white !important; |
|
|
background-color: #4E5969; |
|
|
background-color: #4E5969; |
|
|
} |
|
|
} |
|
|
|
|
|
/deep/ .ant-modal-header{ |
|
|
|
|
|
border-bottom: none; |
|
|
|
|
|
} |
|
|
|
|
|
/deep/ .ant-modal-footer{ |
|
|
|
|
|
border-top: none; |
|
|
|
|
|
padding: 20px 16px; |
|
|
|
|
|
} |
|
|
|
|
|
.modal_select{ |
|
|
|
|
|
margin-bottom: 23px; |
|
|
|
|
|
} |
|
|
</style> |
|
|
</style> |
|
|
|