数据大屏折线图数据重复问题、默认上一月
parent
1215b05ad3
commit
48fd0260a0
|
|
@ -220,7 +220,7 @@ function handlerCheckedFilter(type,item,state=false) {
|
|||
|
||||
switch(type){
|
||||
case "issued":
|
||||
handlerGetIssuedStatitical(monthSelect.value[type]>0?currentFilterName.value[type]:null)
|
||||
handlerGetIssuedStatitical(monthSelect.value[type] > 0 ? currentFilterName.value[type] : null)
|
||||
break;
|
||||
case "verify":
|
||||
handlerGetVerifyStatitical(monthSelect.value[type]>0?currentFilterName.value[type]:null)
|
||||
|
|
@ -235,19 +235,19 @@ const issued = ref([
|
|||
{
|
||||
mark:"xiafacount",
|
||||
lable:"下发线索数(宗)",
|
||||
value:7098
|
||||
value:0
|
||||
},{
|
||||
mark:"tubanarea",
|
||||
lable:"线索面积(亩)",
|
||||
value:"2,4044.55"
|
||||
value:"0"
|
||||
},{
|
||||
mark:"gengdiarea",
|
||||
lable:"耕地面积(亩)",
|
||||
value:780.38
|
||||
value:0
|
||||
},{
|
||||
mark:"jibenarea",
|
||||
lable:"永农面积(亩)",
|
||||
value:110.47
|
||||
value:0
|
||||
},
|
||||
])
|
||||
|
||||
|
|
@ -289,19 +289,19 @@ const chartOneData = ref(
|
|||
{
|
||||
mark:"jianshecount",
|
||||
name: "建设用地",
|
||||
value: 70,
|
||||
value: 0,
|
||||
unit: "宗"
|
||||
},
|
||||
{
|
||||
mark:"nongyongdicount",
|
||||
name: "农用地",
|
||||
value: 20,
|
||||
value: 0,
|
||||
unit: "宗"
|
||||
},
|
||||
{
|
||||
mark:"tuiduitucount",
|
||||
name: "推堆土",
|
||||
value: 30,
|
||||
value: 0,
|
||||
unit: "宗"
|
||||
}
|
||||
]
|
||||
|
|
@ -345,8 +345,9 @@ const chartThreeData = ref( [
|
|||
}
|
||||
])
|
||||
|
||||
async function handlerGetIssuedStatitical(month=null){
|
||||
async function handlerGetIssuedStatitical(month=""){
|
||||
let data = await getIssuedStatitical({month:month});
|
||||
|
||||
for(let key in data){
|
||||
issued.value?.forEach((item,index)=>{
|
||||
if(item.mark == key){
|
||||
|
|
@ -363,7 +364,7 @@ async function handlerGetIssuedStatitical(month=null){
|
|||
handlerLoadChartsOne(chartOneData.value);
|
||||
}
|
||||
|
||||
async function handlerGetVerifyStatitical(month=null){
|
||||
async function handlerGetVerifyStatitical(month=""){
|
||||
let data = await getVerifyStatitical({month:month});
|
||||
for(let key in data){
|
||||
verify.value?.forEach((item,index)=>{
|
||||
|
|
@ -382,7 +383,7 @@ async function handlerGetVerifyStatitical(month=null){
|
|||
|
||||
}
|
||||
|
||||
async function handlerGetRectificationStatitical(month=null){
|
||||
async function handlerGetRectificationStatitical(month=""){
|
||||
let data = await getRectificationStatitical({month:month});
|
||||
for(let key in data){
|
||||
rectification.value?.forEach((item,index)=>{
|
||||
|
|
@ -972,13 +973,14 @@ function createData() {
|
|||
|
||||
|
||||
onMounted(()=>{
|
||||
|
||||
|
||||
setTimeout(function(){
|
||||
handlerGetIssuedStatitical();
|
||||
handlerGetVerifyStatitical();
|
||||
handlerGetRectificationStatitical();
|
||||
// handlerLoadChartsOne();
|
||||
// handlerLoadChartsTow();
|
||||
// handlerLoadChartsThree();
|
||||
let default_date = yearSelect.value['issued']+"-"+monthSelect.value['issued']
|
||||
handlerGetIssuedStatitical(default_date);
|
||||
handlerGetVerifyStatitical(default_date);
|
||||
handlerGetRectificationStatitical(default_date);
|
||||
|
||||
},500)
|
||||
})
|
||||
|
||||
|
|
|
|||
|
|
@ -105,11 +105,7 @@
|
|||
const ntAreaList: any = ref([]);
|
||||
const xfAreaList: any = ref([]);
|
||||
function getData() {
|
||||
timeList.value = [];
|
||||
tbAreaList.value = [];
|
||||
gdAreaList.value = [];
|
||||
ntAreaList.value = [];
|
||||
xfAreaList.value = [];
|
||||
|
||||
const querys = {
|
||||
type: props.type,
|
||||
countyid: currentFilter.value,
|
||||
|
|
@ -119,6 +115,12 @@
|
|||
// 对返回的结果根据时间进行排序
|
||||
let chatData = [...res];
|
||||
chatData.sort((a,b)=>new Date(a.time) - new Date(b.time));
|
||||
|
||||
timeList.value = [];
|
||||
tbAreaList.value = [];
|
||||
gdAreaList.value = [];
|
||||
ntAreaList.value = [];
|
||||
xfAreaList.value = [];
|
||||
|
||||
chatData.forEach((element) => {
|
||||
timeList.value.push(element.time);
|
||||
|
|
@ -127,6 +129,7 @@
|
|||
ntAreaList.value.push(element.yjjbntmj);
|
||||
xfAreaList.value.push(element.tbzs);
|
||||
});
|
||||
|
||||
chartData();
|
||||
});
|
||||
}
|
||||
|
|
@ -288,7 +291,7 @@
|
|||
option && myChart.setOption(option);
|
||||
}
|
||||
onMounted(() => {
|
||||
chartData();
|
||||
// chartData();
|
||||
});
|
||||
</script>
|
||||
<style lang="less" scoped>
|
||||
|
|
|
|||
|
|
@ -163,11 +163,7 @@ function handlerGetAllDate(type){
|
|||
const ntAreaList: any = ref([]);
|
||||
const xfAreaList: any = ref([]);
|
||||
function getData() {
|
||||
countyList.value = [];
|
||||
tbAreaList.value = [];
|
||||
gdAreaList.value = [];
|
||||
ntAreaList.value = [];
|
||||
xfAreaList.value = [];
|
||||
|
||||
const querys = {
|
||||
type: props.type,
|
||||
month:monthSelect.value["issued"]>0?yearSelect.value["issued"]+"-"+monthSelect.value["issued"] : null,
|
||||
|
|
@ -176,7 +172,12 @@ function handlerGetAllDate(type){
|
|||
caseOffenceEcharts(querys).then((res) => {
|
||||
|
||||
// res.sort((a, b) => a.countyid - b.countyid);
|
||||
|
||||
countyList.value = [];
|
||||
tbAreaList.value = [];
|
||||
gdAreaList.value = [];
|
||||
ntAreaList.value = [];
|
||||
xfAreaList.value = [];
|
||||
|
||||
res.forEach((element) => {
|
||||
countyList.value.push(element.countyname);
|
||||
tbAreaList.value.push(element.tbmj);
|
||||
|
|
|
|||
Loading…
Reference in New Issue