|
|
@@ -120,7 +120,8 @@ Component({
|
|
|
}, {
|
|
|
remarks: '二级类别',
|
|
|
value: "二级类别",
|
|
|
- }]
|
|
|
+ }],
|
|
|
+ total: 0
|
|
|
},
|
|
|
methods: {
|
|
|
async getList(init = false) {
|
|
|
@@ -143,7 +144,9 @@ Component({
|
|
|
content.pageNumber = 1;
|
|
|
content.pageTotal = 1;
|
|
|
}
|
|
|
+ console.log(content)
|
|
|
if (content.pageNumber > content.pageTotal) return;
|
|
|
+ console.log(2)
|
|
|
_Http.basic({
|
|
|
"id": 20240524160004,
|
|
|
content
|
|
|
@@ -163,8 +166,9 @@ Component({
|
|
|
this.setData({
|
|
|
list: res.pageNumber == 1 ? res.data : this.data.list.concat(res.data),
|
|
|
"content.pageNumber": res.pageNumber + 1,
|
|
|
+ "content.pageTotal": res.pageTotal,
|
|
|
"content.pageSize": res.pageSize,
|
|
|
-
|
|
|
+ total: res.total,
|
|
|
})
|
|
|
try {
|
|
|
this.selectComponent("#TimeRange").onCancel()
|
|
|
@@ -177,13 +181,36 @@ Component({
|
|
|
|
|
|
|
|
|
}
|
|
|
- this.initChart(res.data[0].ratio, content.dataType == '金额' ? CNY(res.data[0].ratio[0].total / dividend) : res.data[0].ratio[0].total, getMapText);
|
|
|
+ if (init) this.initChart(res.data[0].ratio, content.dataType == '金额' ? CNY(res.data[0].ratio[0].total / dividend) : res.data[0].ratio[0].total, getMapText);
|
|
|
})
|
|
|
},
|
|
|
initChart(data, total, getMapText) {
|
|
|
+ let countDown = null,
|
|
|
+ that = this;
|
|
|
+
|
|
|
+ function changeUnwriteoffamounttype(params) {
|
|
|
+ if (countDown) return;
|
|
|
+ countDown = setTimeout(() => {
|
|
|
+ clearTimeout(countDown)
|
|
|
+ countDown = null;
|
|
|
+ if (params.itemclassid != that.data.content.where.itemclassid) {
|
|
|
+ that.setData({
|
|
|
+ "content.where.itemclassid": params.itemclassid,
|
|
|
+ "content.pageNumber": 1,
|
|
|
+ itemclassfullname: params.itemclassfullname
|
|
|
+ })
|
|
|
+ }
|
|
|
+ that.getList()
|
|
|
+ }, 200)
|
|
|
+ };
|
|
|
+
|
|
|
let option = {
|
|
|
tooltip: {
|
|
|
- trigger: 'item'
|
|
|
+ trigger: 'item',
|
|
|
+ formatter: function (params) {
|
|
|
+ changeUnwriteoffamounttype(data[params.dataIndex]);
|
|
|
+ return `${params.marker}${params.name}: ${params.value}`;
|
|
|
+ },
|
|
|
},
|
|
|
legend: {
|
|
|
bottom: '5%', // Moved legend to the bottom
|