提交 04c41f5c authored 作者: 龙菲's avatar 龙菲

修复首页统计图颜色无法正常显示、分页问题

上级 2b9326cd
export const title = [{ export const title = [{
prop: "name", prop: "name",
label: "名称", label: "名称",
columnAlign: 'center', columnAlign: 'center',
}, },
{ {
prop: "deptName", prop: "deptName",
label: "馆藏单位/展览单位", label: "馆藏单位/展览单位",
columnAlign: 'center', columnAlign: 'center',
}, },
{ {
prop: "regionName", prop: "regionName",
label: "所在地区", label: "所在地区",
columnAlign: 'center', columnAlign: 'center',
}, },
{ {
prop: "browseCount", prop: "browseCount",
label: "点击量", label: "点击量",
columnAlign: 'center', columnAlign: 'center',
sortable:true sortable: true
}, },
{ {
prop: "collectCount", prop: "collectCount",
label: "点赞量", label: "收藏量",
columnAlign: 'center', columnAlign: 'center',
sortable:true sortable: true
}, },
{ {
prop: "loveCount", prop: "loveCount",
label: "收藏量", label: "点赞量",
columnAlign: 'center', columnAlign: 'center',
sortable:true sortable: true
}, },
] ]
...@@ -205,6 +205,7 @@ export default { ...@@ -205,6 +205,7 @@ export default {
watch: { watch: {
currentSortPage(value) { currentSortPage(value) {
this.currentSortPage = value; this.currentSortPage = value;
this.list.current = 1;
this.loadListByPageSort(); this.loadListByPageSort();
}, },
activeName(value) { activeName(value) {
...@@ -340,26 +341,6 @@ export default { ...@@ -340,26 +341,6 @@ export default {
containLabel: true, containLabel: true,
}, },
], ],
// legend: {
// bottom: '4%',
// right: '10%',
// orient: 'vertical',
// width: 540,
// height: 240,
// padding: [14, 20],
// backgroundColor: 'rgba(236,246,255,0.30)',
// borderWidth: 1,
// borderColor: '#E7F2FB',
// borderRadius: 4,
// icon: 'circle',
// itemWidth: 8,
// itemHeight: 8,
// textStyle: {
// color: '#333333',
// fontSize: 12,
// },
// data: legendList,
// },
xAxis: [ xAxis: [
{ {
type: "value", type: "value",
...@@ -442,16 +423,26 @@ export default { ...@@ -442,16 +423,26 @@ export default {
color: function (params) { color: function (params) {
// 定义一个颜色集合 // 定义一个颜色集合
let colorList = [ let colorList = [
"#52A8FF", "#c065e7",
"#00B389", "#765deb",
"#FFA940", "#3862d8",
"#FF5A57", "#6a89E2",
"#29EFC4", "#219CF9",
"#F8AEA4", "#6efbbf",
"#FFC53D", "#40c057",
"#009982", "#ffd351",
"#C099FC", "#ff8e43",
"#F5855F", "#f56b6d",
"#c065e7",
"#765deb",
"#3862d8",
"#6a89E2",
"#219CF9",
"#6efbbf",
"#40c057",
"#ffd351",
"#ff8e43",
"#f56b6d",
]; ];
// 对每个bar显示一种颜色 // 对每个bar显示一种颜色
return colorList[params.dataIndex]; return colorList[params.dataIndex];
...@@ -662,6 +653,8 @@ export default { ...@@ -662,6 +653,8 @@ export default {
async loadListByPageSort() { async loadListByPageSort() {
const params = { const params = {
type: this.currentSortPage, type: this.currentSortPage,
page: this.list.current,
limit: this.list.size,
}; };
let res = await getListByPageSort(params); let res = await getListByPageSort(params);
let data = res.data; let data = res.data;
...@@ -737,6 +730,7 @@ export default { ...@@ -737,6 +730,7 @@ export default {
// 改变当前显示页 // 改变当前显示页
handleCurrentChange(value) { handleCurrentChange(value) {
// debugger;
this.list.current = value; this.list.current = value;
this.loadListByPageSort(); this.loadListByPageSort();
}, },
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论