|
@@ -64,6 +64,8 @@ import {useAppStore} from "~src/store";
|
|
import BarChart from "./components/echarts/BarChart.vue"
|
|
import BarChart from "./components/echarts/BarChart.vue"
|
|
import ArrRoundChart from "./components/echarts/ArrRoundChart.vue"
|
|
import ArrRoundChart from "./components/echarts/ArrRoundChart.vue"
|
|
import RoundPieChart from "./components/echarts/RoundPieChart.vue"
|
|
import RoundPieChart from "./components/echarts/RoundPieChart.vue"
|
|
|
|
+import archivesStatsApi from "~api/using/stats.js";
|
|
|
|
+import {getObjValue,getArrValue} from "js-fast-way"
|
|
|
|
|
|
//变量
|
|
//变量
|
|
const useAppState = useAppStore()
|
|
const useAppState = useAppStore()
|
|
@@ -73,6 +75,9 @@ const projectInfo = ref(useAppState.getProjectInfo);
|
|
|
|
|
|
//渲染完成
|
|
//渲染完成
|
|
onMounted(() => {
|
|
onMounted(() => {
|
|
|
|
+ gethasBeenChartData()
|
|
|
|
+ getfixedChartData()
|
|
|
|
+ getdestroyChartData()
|
|
|
|
|
|
})
|
|
})
|
|
|
|
|
|
@@ -108,7 +113,19 @@ const isHasBeenLoading = ref(false)
|
|
const hasBeenChartData = ref({
|
|
const hasBeenChartData = ref({
|
|
key1: 3210, key2: 850, key3: 1203
|
|
key1: 3210, key2: 850, key3: 1203
|
|
})
|
|
})
|
|
-
|
|
|
|
|
|
+//获取已组案卷
|
|
|
|
+const gethasBeenChartData = async () => {
|
|
|
|
+
|
|
|
|
+ const { error, code, data } = await archivesStatsApi.getallArchiveByContractType({
|
|
|
|
+ projectId: projectId.value,
|
|
|
|
+
|
|
|
|
+ });
|
|
|
|
+ if (!error && code === 200) {
|
|
|
|
+ hasBeenChartData.value = getObjValue(data);
|
|
|
|
+ } else {
|
|
|
|
+ hasBeenChartData.value = {};
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
|
|
//档案年限占比 图表数据
|
|
//档案年限占比 图表数据
|
|
const fixedChartRef = ref(null)
|
|
const fixedChartRef = ref(null)
|
|
@@ -120,7 +137,20 @@ const fixedChartData = ref([
|
|
{ value: 484, name: '10年' },
|
|
{ value: 484, name: '10年' },
|
|
{ value: 300, name: '5年' }
|
|
{ value: 300, name: '5年' }
|
|
])
|
|
])
|
|
-
|
|
|
|
|
|
+//获取档案年限
|
|
|
|
+const getfixedChartData = async () => {
|
|
|
|
+ isLoading.value = true
|
|
|
|
+ const { error, code, data } = await archivesStatsApi.getallArchiveAge({
|
|
|
|
+ projectId: projectId.value,
|
|
|
|
+
|
|
|
|
+ });
|
|
|
|
+ if (!error && code === 200) {
|
|
|
|
+ console.log(data,'data');
|
|
|
|
+ fixedChartData.value = getArrValue(data);
|
|
|
|
+ } else {
|
|
|
|
+ fixedChartData.value = [];
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
|
|
//已销毁案卷 图表配置
|
|
//已销毁案卷 图表配置
|
|
const destroyChartRef = ref(null)
|
|
const destroyChartRef = ref(null)
|
|
@@ -136,39 +166,24 @@ const isDestroyLoading = ref(false)
|
|
const destroyChartData = ref({
|
|
const destroyChartData = ref({
|
|
key1: 202, key2: 150, key3: 100
|
|
key1: 202, key2: 150, key3: 100
|
|
})
|
|
})
|
|
-
|
|
|
|
-//初始数据获取
|
|
|
|
-const isLoading = ref(false)
|
|
|
|
-const tableData = ref([])
|
|
|
|
-const getTableData = async () => {
|
|
|
|
- /*isLoading.value = true
|
|
|
|
- const { error, code, data } = await DataApi.queryContractTreeMaterialProgress({
|
|
|
|
|
|
+//获取已销毁案卷
|
|
|
|
+const getdestroyChartData = async () => {
|
|
|
|
+ const { error, code, data } = await archivesStatsApi.getallArchiveDestory({
|
|
projectId: projectId.value,
|
|
projectId: projectId.value,
|
|
- contractId: contractId.value,
|
|
|
|
- parentId: ''
|
|
|
|
|
|
+
|
|
});
|
|
});
|
|
- isLoading.value = false
|
|
|
|
if (!error && code === 200) {
|
|
if (!error && code === 200) {
|
|
- tableData.value = getArrValue(data['treeMaterialProgressList']);
|
|
|
|
|
|
+ destroyChartData.value = getObjValue(data);
|
|
} else {
|
|
} else {
|
|
- tableData.value = [];
|
|
|
|
- }*/
|
|
|
|
|
|
+ destroyChartData.value = [];
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
+//初始数据获取
|
|
|
|
+const isLoading = ref(false)
|
|
|
|
+const tableData = ref([])
|
|
|
|
+
|
|
|
|
+
|
|
|
|
|
|
-//懒加载数据
|
|
|
|
-const loadData = async (row, treeNode, resolve) => {
|
|
|
|
- /*const { error, code, data } = await DataApi.queryContractTreeMaterialProgress({
|
|
|
|
- projectId: projectId.value,
|
|
|
|
- contractId: row.contractId || contractId.value,
|
|
|
|
- parentId: row.id
|
|
|
|
- });
|
|
|
|
- if (!error && code === 200) {
|
|
|
|
- resolve(getArrValue(data['treeMaterialProgressList']))
|
|
|
|
- } else {
|
|
|
|
- resolve([])
|
|
|
|
- }*/
|
|
|
|
- resolve([])
|
|
|
|
-}
|
|
|
|
|
|
|
|
</script>
|
|
</script>
|
|
|
|
|