|
|
|
|
@ -155,7 +155,7 @@
|
|
|
|
|
/> |
|
|
|
|
|
|
|
|
|
<datav-card title="信访趋势"> |
|
|
|
|
<datav-tabs v-model="activeMailTrend"> |
|
|
|
|
<datav-tabs v-model="activeMailTrend" @change="handleTabChange"> |
|
|
|
|
<datav-tab-item label="国家信访" name="1"> |
|
|
|
|
<v-charts |
|
|
|
|
style="height: 300px" |
|
|
|
|
@ -190,8 +190,8 @@
|
|
|
|
|
<span class="el-dropdown-link">{{ selectedOption }}</span> |
|
|
|
|
<template #dropdown> |
|
|
|
|
<el-dropdown-menu> |
|
|
|
|
<el-dropdown-item command="15">近15天</el-dropdown-item> |
|
|
|
|
<el-dropdown-item command="30">近30天</el-dropdown-item> |
|
|
|
|
<el-dropdown-item command="2024">2024年</el-dropdown-item> |
|
|
|
|
<el-dropdown-item command="2023">2023年</el-dropdown-item> |
|
|
|
|
</el-dropdown-menu> |
|
|
|
|
</template> |
|
|
|
|
</el-dropdown> |
|
|
|
|
@ -379,6 +379,15 @@ const option1 = ref({
|
|
|
|
|
}, |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
tooltip: { |
|
|
|
|
trigger: 'axis', |
|
|
|
|
axisPointer: { |
|
|
|
|
type: 'line', |
|
|
|
|
label: { |
|
|
|
|
backgroundColor: '#6a7985' |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
series: [ |
|
|
|
|
{ |
|
|
|
|
type: "line", |
|
|
|
|
@ -407,6 +416,7 @@ const option1 = ref({
|
|
|
|
|
], |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const option2 = { |
|
|
|
|
series: [ |
|
|
|
|
{ |
|
|
|
|
@ -445,6 +455,10 @@ const option3 = {
|
|
|
|
|
}, |
|
|
|
|
], |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const activeTab = ref("1"); |
|
|
|
|
const bwzdActiveTab = ref("1"); // 部委支队初重信tab |
|
|
|
|
const activeMailTrend = ref("1"); // 信访趋势tab |
|
|
|
|
@ -483,56 +497,52 @@ const time = ref([
|
|
|
|
|
moment().startOf("year").format("YYYY-MM-DD"), |
|
|
|
|
moment().format("YYYY-MM-DD"), |
|
|
|
|
]); |
|
|
|
|
const selectedOption = ref('近15天'); // 下拉框选择 |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 信访趋势 |
|
|
|
|
* @type {Ref<UnwrapRef<string>, UnwrapRef<string> | string>} |
|
|
|
|
*/ |
|
|
|
|
const selectedOption = ref('2024年'); |
|
|
|
|
const shihao= ref(1); |
|
|
|
|
const handleCommand = async (command) => { |
|
|
|
|
selectedOption.value = `近${command}天`; |
|
|
|
|
selectedOption.value = `${command}年`; |
|
|
|
|
const recentlyMailTrend = await getRecentlyMailTrend({ |
|
|
|
|
sourcesCode: activeMailTab.value, |
|
|
|
|
days: command, |
|
|
|
|
year: command, |
|
|
|
|
startTime: time.value[0], |
|
|
|
|
endTime: time.value[1] |
|
|
|
|
}); // 获取最近信访趋势 |
|
|
|
|
// 更新图表的 xAxis 和 series 数据 |
|
|
|
|
option1.value.xAxis.data = recentlyMailTrend.dayList; |
|
|
|
|
option1.value.xAxis.data = recentlyMailTrend.monthList; |
|
|
|
|
option1.value.series[0].data = recentlyMailTrend.totalList; |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
let timer; |
|
|
|
|
|
|
|
|
|
function getData() { |
|
|
|
|
getMailVisitsData(time.value).then((data) => { |
|
|
|
|
overview.value = data.overview; |
|
|
|
|
fxsjFirstMailList.value = data.fxsjFirstMailList; |
|
|
|
|
fxsjRepeatMailList.value = data.fxsjRepeatMailList; |
|
|
|
|
fxsjLeaderViewMailList.value = data.fxsjLeaderViewMailList; |
|
|
|
|
bwzdFirstMailList.value = data.bwzdFirstMailList; |
|
|
|
|
bwzdRepeatMailList.value = data.bwzdRepeatMailList; |
|
|
|
|
bwzdLeaderViewMailList.value = data.bwzdLeaderViewMailList; |
|
|
|
|
fxsjEntanglementMailList.value = data.fxsjEntanglementMailList |
|
|
|
|
fxsjMassMailList.value = data.fxsjMassMailList |
|
|
|
|
bwzdEntanglementMailList.value = data.bwzdEntanglementMailList |
|
|
|
|
bwzdMassMailList.value = data.bwzdMassMailList |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
function initRecentlyMailTrend() { |
|
|
|
|
getRecentlyMailTrend({ |
|
|
|
|
sourcesCode: "1", |
|
|
|
|
days: "15", |
|
|
|
|
year: "2024", |
|
|
|
|
startTime: time.value[0], |
|
|
|
|
endTime: time.value[1] |
|
|
|
|
}).then((data) => { |
|
|
|
|
// 更新图表的 xAxis 和 series 数据 |
|
|
|
|
option1.value.xAxis.data = data.dayList; |
|
|
|
|
option1.value.xAxis.data = data.monthList; |
|
|
|
|
option1.value.series[0].data = data.totalList; |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
watch(activeMailTrend, () => { |
|
|
|
|
alert(activeMailTrend.value) |
|
|
|
|
alert(shihao.value) |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 初始化 |
|
|
|
|
*/ |
|
|
|
|
let timer; |
|
|
|
|
watch(time, () => { |
|
|
|
|
getData(); |
|
|
|
|
initRecentlyMailTrend() |
|
|
|
|
// initRecentlyMailTrend() |
|
|
|
|
}) |
|
|
|
|
onMounted(() => { |
|
|
|
|
getData(); |
|
|
|
|
@ -542,6 +552,22 @@ onMounted(() => {
|
|
|
|
|
// console.log("Active Tab: ", activeMailTab.value); |
|
|
|
|
// }, 3000); // 每3秒切换一次 |
|
|
|
|
}); |
|
|
|
|
function getData() { |
|
|
|
|
getMailVisitsData(time.value).then((data) => { |
|
|
|
|
overview.value = data.overview; |
|
|
|
|
fxsjFirstMailList.value = data.fxsjFirstMailList; |
|
|
|
|
fxsjRepeatMailList.value = data.fxsjRepeatMailList; |
|
|
|
|
fxsjLeaderViewMailList.value = data.fxsjLeaderViewMailList; |
|
|
|
|
bwzdFirstMailList.value = data.bwzdFirstMailList; |
|
|
|
|
bwzdRepeatMailList.value = data.bwzdRepeatMailList; |
|
|
|
|
bwzdLeaderViewMailList.value = data.bwzdLeaderViewMailList; |
|
|
|
|
fxsjEntanglementMailList.value = data.fxsjEntanglementMailList |
|
|
|
|
fxsjMassMailList.value = data.fxsjMassMailList |
|
|
|
|
bwzdEntanglementMailList.value = data.bwzdEntanglementMailList |
|
|
|
|
bwzdMassMailList.value = data.bwzdMassMailList |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|