|
@@ -36,7 +36,6 @@
|
|
|
<HcBorderNeon align="left" />
|
|
|
<div class="header">档案年限占比</div>
|
|
|
<div v-loading="isFixedLoading" class="body">
|
|
|
- <!-- <RoundPieChart ref="fixedChartRef" :datas="fixedChartData" /> -->
|
|
|
<ArrRoundChart ref="fixedChartRef" :config="fixedChartConfig" :datas="fixedChartData" />
|
|
|
</div>
|
|
|
</div>
|
|
@@ -66,7 +65,6 @@ import { onMounted, ref, watch } from 'vue'
|
|
|
import { useAppStore } from '~src/store'
|
|
|
import BarChart from './components/echarts/BarChart.vue'
|
|
|
import ArrRoundChart from './components/echarts/ArrRoundChart.vue'
|
|
|
-import RoundPieChart from './components/echarts/RoundPieChart.vue'
|
|
|
import archivesStatsApi from '~api/using/stats.js'
|
|
|
import { getArrValue, getObjValue } from 'js-fast-way'
|
|
|
|
|
@@ -87,10 +85,9 @@ onMounted(() => {
|
|
|
|
|
|
})
|
|
|
//监听
|
|
|
-watch(() => [
|
|
|
- useAppState.getProjectId,
|
|
|
-], ([ProjectId]) => {
|
|
|
+watch(() => [useAppState.getProjectId, useAppState.getContractId], ([ProjectId, ContractId]) => {
|
|
|
projectId.value = ProjectId
|
|
|
+ contractId.value = ContractId
|
|
|
gethasBeenChartData()
|
|
|
getfixedChartData()
|
|
|
getdestroyChartData()
|
|
@@ -98,14 +95,12 @@ watch(() => [
|
|
|
getallArchiveFileSize()
|
|
|
gettableData()
|
|
|
})
|
|
|
+
|
|
|
//深度监听
|
|
|
-watch(() => [
|
|
|
-useAppState.getProjectInfo,
|
|
|
-], ([ProjectInfo]) => {
|
|
|
+watch(() => [useAppState.getProjectInfo], ([ProjectInfo]) => {
|
|
|
projectInfo.value = ProjectInfo
|
|
|
-}, {
|
|
|
- deep: true,
|
|
|
-})
|
|
|
+}, { deep: true })
|
|
|
+
|
|
|
//原生、数字化文件数量 图表配置
|
|
|
const nativeChartRef = ref(null)
|
|
|
const nativeChartConfig = {
|
|
@@ -126,7 +121,7 @@ const nativeChartData = ref([
|
|
|
const getnativeChartData = async () => {
|
|
|
const { error, code, data } = await archivesStatsApi.getallnativeChartData({
|
|
|
projectId: projectId.value,
|
|
|
-
|
|
|
+ contractId: contractId.value,
|
|
|
})
|
|
|
if (!error && code === 200) {
|
|
|
nativeChartData.value = getArrValue(data)
|
|
@@ -151,6 +146,7 @@ const hasBeenChartData = ref({ key1: 0, key2: 0, key3: 0 })
|
|
|
const gethasBeenChartData = async () => {
|
|
|
const { error, code, data } = await archivesStatsApi.getallArchiveByContractType({
|
|
|
projectId: projectId.value,
|
|
|
+ contractId: contractId.value,
|
|
|
})
|
|
|
if (!error && code === 200) {
|
|
|
hasBeenChartData.value = getObjValue(data)
|
|
@@ -173,6 +169,7 @@ const fixedChartData = ref({ key1: 0, key2: 0, key3: 0 })
|
|
|
const getfixedChartData = async () => {
|
|
|
const { error, code, data } = await archivesStatsApi.getallArchiveAge({
|
|
|
projectId: projectId.value,
|
|
|
+ contractId: contractId.value,
|
|
|
})
|
|
|
if (!error && code === 200) {
|
|
|
let objarr = getArrValue(data)
|
|
@@ -210,6 +207,7 @@ const destroyChartData = ref({
|
|
|
const getdestroyChartData = async () => {
|
|
|
const { error, code, data } = await archivesStatsApi.getallArchiveDestory({
|
|
|
projectId: projectId.value,
|
|
|
+ contractId: contractId.value,
|
|
|
})
|
|
|
if (!error && code === 200) {
|
|
|
destroyChartData.value = getObjValue(data)
|
|
@@ -217,6 +215,7 @@ const getdestroyChartData = async () => {
|
|
|
destroyChartData.value = []
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
//获取总存储数据
|
|
|
const allArchiveFileSizedata = ref('')
|
|
|
const isSizeLoading = ref(false)
|
|
@@ -224,6 +223,7 @@ const getallArchiveFileSize = async () => {
|
|
|
isSizeLoading.value = true
|
|
|
const { error, code, data } = await archivesStatsApi.getallArchiveSize({
|
|
|
projectId: projectId.value,
|
|
|
+ contractId: contractId.value,
|
|
|
})
|
|
|
if (!error && code === 200) {
|
|
|
allArchiveFileSizedata.value = data
|
|
@@ -233,8 +233,8 @@ const getallArchiveFileSize = async () => {
|
|
|
allArchiveFileSizedata.value = ''
|
|
|
isSizeLoading.value = false
|
|
|
}
|
|
|
-
|
|
|
}
|
|
|
+
|
|
|
//初始数据获取
|
|
|
const isLoading = ref(false)
|
|
|
const tableData = ref([])
|
|
@@ -244,7 +244,8 @@ const gettableData = async () => {
|
|
|
isLoading.value = true
|
|
|
const { error, code, data } = await archivesStatsApi.getArchiveTreeAndArchiveCount({
|
|
|
projectId: projectId.value,
|
|
|
- nodeId:nodeId.value,
|
|
|
+ contractId: contractId.value,
|
|
|
+ nodeId: nodeId.value,
|
|
|
})
|
|
|
let resdata = getArrValue(data)
|
|
|
if (!error && code === 200) {
|
|
@@ -255,8 +256,13 @@ const gettableData = async () => {
|
|
|
}
|
|
|
isLoading.value = false
|
|
|
}
|
|
|
+
|
|
|
const loadData = (tree, treeNode, resolve)=>{
|
|
|
- archivesStatsApi.getArchiveTreeAndArchiveCount({ projectId: projectId.value, nodeId:tree.id }).then((response) => {
|
|
|
+ archivesStatsApi.getArchiveTreeAndArchiveCount({
|
|
|
+ projectId: projectId.value,
|
|
|
+ contractId: contractId.value,
|
|
|
+ nodeId: tree.id,
|
|
|
+ }).then((response) => {
|
|
|
let resdata = getArrValue(response.data)
|
|
|
resolve(resdata)
|
|
|
})
|