74 lines
2.1 KiB
JavaScript
74 lines
2.1 KiB
JavaScript
"use strict";
|
|
const common_vendor = require("../../../common/vendor.js");
|
|
if (!Array) {
|
|
const _easycom_qiun_data_charts2 = common_vendor.resolveComponent("qiun-data-charts");
|
|
_easycom_qiun_data_charts2();
|
|
}
|
|
const _easycom_qiun_data_charts = () => "../../../uni_modules/qiun-data-charts/components/qiun-data-charts/qiun-data-charts.js";
|
|
if (!Math) {
|
|
_easycom_qiun_data_charts();
|
|
}
|
|
const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
|
|
__name: "charts",
|
|
setup(__props) {
|
|
const chartData = common_vendor.ref({});
|
|
const opts = common_vendor.ref({
|
|
rotate: false,
|
|
rotateLock: false,
|
|
title: false,
|
|
subtitle: false,
|
|
color: ["#507AFC", "#F56C6C", "#FAC858", "#ea7ccc", "#73C0DE", "#3CA272", "#FC8452", "#9A60B4"],
|
|
padding: [5, 5, 5, 5],
|
|
dataLabel: true,
|
|
enableScroll: false,
|
|
legend: {
|
|
show: true,
|
|
position: "right",
|
|
lineHeight: 25
|
|
},
|
|
extra: {
|
|
ring: {
|
|
ringWidth: 30,
|
|
activeOpacity: 0.5,
|
|
activeRadius: 10,
|
|
offsetAngle: 0,
|
|
labelWidth: 15,
|
|
border: false,
|
|
borderWidth: 3,
|
|
borderColor: "#FFFFFF"
|
|
}
|
|
}
|
|
});
|
|
const getServerData = () => {
|
|
setTimeout(() => {
|
|
let res = {
|
|
series: [
|
|
{
|
|
data: [
|
|
{ name: "正常缴费", value: 50 },
|
|
{ name: "预付费用", value: 30 },
|
|
{ name: "托收", value: 20 }
|
|
]
|
|
}
|
|
]
|
|
};
|
|
chartData.value = JSON.parse(JSON.stringify(res));
|
|
}, 500);
|
|
};
|
|
common_vendor.onMounted(() => {
|
|
getServerData();
|
|
});
|
|
return (_ctx, _cache) => {
|
|
return {
|
|
a: common_vendor.p({
|
|
type: "ring",
|
|
opts: opts.value,
|
|
chartData: chartData.value
|
|
})
|
|
};
|
|
};
|
|
}
|
|
});
|
|
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-de76a5a5"], ["__file", "/Users/zsq/Sources/github/2025property-pay/pay-employee/src/pages/data_oard/components/charts.vue"]]);
|
|
wx.createComponent(Component);
|