- 档案类型
+ 档案门类
@@ -173,6 +104,7 @@ import PanelGroup from './dashboard/PanelGroup'
import lendAcross from '@/views/components/echarts/lendAcross.vue'
import catePie from '@/views/components/echarts/catePie.vue'
import typePie from '@/views/components/echarts/typePie.vue'
+import serverProgress from '@/views/components/echarts/serverProgress.vue'
import { FetchMainData } from '@/api/archivesManage/library'
import { mapGetters } from 'vuex'
@@ -182,7 +114,8 @@ export default {
PanelGroup,
lendAcross,
catePie,
- typePie
+ typePie,
+ serverProgress
},
data() {
return {
@@ -195,9 +128,20 @@ export default {
archivesTotalNum: 0,
flowableData: [],
flowableTabIndex: 0,
- lendData: [],
+ lendData: {
+ archivesTotalNum: null,
+ otherData: []
+ },
cateData: [],
- typeData: []
+ typeData: [],
+ addArcivesData: {
+ addArcivesMaxCount: null,
+ addArcivesMonth: [],
+ addArcivesNum: [],
+ addArcivesNumFile: []
+ },
+ echartsTimer: null,
+ refreshtime: 10000
}
},
computed: {
@@ -207,10 +151,31 @@ export default {
},
created() {
this.handleMainData()
+ // this.get()
+ },
+ mounted() {
+ // const _this = this
+ // // 每隔一分钟刷新档案借阅和档案类型的数据
+ // this.echartsTimer = setInterval(() => {
+ // _this.lendData = {
+ // archivesTotalNum: null,
+ // otherData: []
+ // }
+ // _this.cateData = []
+ // _this.typeData = []
+ // _this.addArcivesData = {
+ // addArcivesMaxCount: null,
+ // addArcivesMonth: [],
+ // addArcivesNum: [],
+ // addArcivesNumFile: []
+ // }
+ // _this.handleMainData()
+ // }, this.refreshtime)
},
methods: {
- formatterSame(percentage) {
- return percentage
+
+ toMoreProcess() {
+ this.$router.push({ path: '/user/center?activeIndex=2' })
},
handleMainData() {
const fondsAffiliation = []
@@ -226,20 +191,80 @@ export default {
fileNum: data.fileNum
}
this.flowableData = data.flows
- this.archivesTotalNum = data.archivesTotalNum
// '标签', '装盒', '入库', '借阅', '开放', '实体', '审批'
- // "archivesTotalNum": 3, // 总数
- // "archivesTagNum": 1, // 标签
- // "installNum": 0, // 已装盒
- // "storageNum": 0, //入库
- // "borrowNum": 0, // 借阅
- // "openNum": 0, // 开放
- // "entityNum": 3, // 实体
- // "approveNum": 2 //审批
- this.lendData = [
+ // "archivesTotalNum 总数 archivesTagNum 标签 installNum 已装盒 storageNum 入库 borrowNum 借阅 openNum 开放 entityNum 实体 approveNum 审批
+ // 档案统计
+ this.lendData.archivesTotalNum = data.archivesTotalNum
+ this.lendData.otherData = [
data.archivesTagNum, data.installNum, data.storageNum, data.borrowNum, data.openNum, data.entityNum, data.approveNum
]
+
+ // 档案类别
+ let maxCount = 0
+ data.statisNumJSON.archives.forEach(archive => {
+ if (archive.count > maxCount) {
+ maxCount = archive.count
+ }
+ })
+
+ data.statisNumJSON.singles.forEach(single => {
+ if (single.count > maxCount) {
+ maxCount = single.count
+ }
+ })
+ this.addArcivesData.addArcivesMaxCount = maxCount
+
+ const currentDate = new Date() // 获取当前日期
+ const currentYear = currentDate.getFullYear() // 获取当前年份
+ const currentMonth = currentDate.getMonth() // 获取当前月份(从 0 到 11,所以要加 1)
+
+ let startYear = currentYear - 1 // 去年的年份
+ let startMonth = currentMonth + 1 // 当前月份加上 1
+
+ const result = [] // 存储每个年份和月份的组合
+ const xResult = []
+ while (startYear < currentYear || startMonth <= currentMonth) {
+ xResult.push(startYear + '/' + startMonth)
+ result.push({ year: startYear, month: startMonth, archivesCount: 0, singlesCount: 0 })
+ // 计算下一个月份
+ startMonth += 1
+ if (startMonth > 12) {
+ startYear += 1
+ startMonth = 1
+ }
+ }
+
+ result.forEach(yearMonthObj => {
+ data.statisNumJSON.archives.forEach(archive => {
+ if (parseInt(archive.month) === yearMonthObj.month) {
+ yearMonthObj.archivesCount = archive.count
+ return
+ }
+ })
+
+ data.statisNumJSON.singles.forEach(single => {
+ if (parseInt(single.month) === yearMonthObj.month) {
+ yearMonthObj.singlesCount = single.count
+ return
+ }
+ })
+ })
+
+ this.addArcivesData.addArcivesMonth = xResult
+ this.addArcivesData.addArcivesNum = result.map(function(obj) {
+ return obj.archivesCount
+ })
+ this.addArcivesData.addArcivesNumFile = result.map(function(obj) {
+ return obj.singlesCount
+ })
+
+ // 档案类型
+ for (const type in data.typeGroupBy) {
+ if (data.typeGroupBy.hasOwnProperty(type)) {
+ this.typeData.push({ name: type, value: data.typeGroupBy[type] })
+ }
+ }
})
}
}
@@ -326,128 +351,4 @@ export default {
::v-deep .home-flowable-list .el-table__body-wrapper::-webkit-scrollbar-corner {
background-color: #DDE8FB !important;
}
-.progress-right-item{
- width:100%;
- height: calc(100% / 2);
- display: flex;
- justify-content: flex-start;
- align-items: center;
-}
-
-.progress-right-txt{
- position: relative;
- color: #545B65;
- font-size: 14px;
- padding-left: 12px;
- margin-right: 50px;
- span{
- display: block;
- font-size: 20px;
- color: #0C0E1E;
- padding-top: 4px;
- i{
- display: inline-block;
- font-size: 12px;
- color: #A6ADB6;
- }
- }
- &::before{
- position: absolute;
- left: 0;
- top: 50%;
- content: '';
- width: 4px;
- height: 50px;
- background: linear-gradient(180deg, #FF9B3B 0%, #F7BA1E 100%);
- border-radius: 100px;
- transform: translateY(-50%);
- }
- &.right-txt1{
- &::before{
- background: linear-gradient(180deg, #FF9B3B 0%, #F7BA1E 100%);
- }
- }
- &.right-txt2{
- &::before{
- background: linear-gradient(180deg, #14C9C9 0%, #83DBAD 100%);
- }
- }
-}
-
-.progress-class {
- position: relative;
- width: 200px;
- height: 200px;
- margin: 0 100px;
- ::v-deep svg > path:nth-child(2) {
- stroke: url(#red);
- }
- ::v-deep .el-progress-circle{
- border-radius: 50%;
- // box-shadow: 0 12px 12px #FEF1F3;
- box-shadow: 0 6px 8px #D9F6F6;
- }
-}
-.progress-class2{
- position: relative;
- width: 100px;
- height: 100px;
- ::v-deep svg > path:nth-child(2) {
- stroke: url(#yellow);
- }
- ::v-deep .el-progress-circle{
- border-radius: 50%;
- box-shadow: 0 6px 8px #FFDEC1;
- }
-}
-
-.progress-class3{
- position: relative;
- width: 100px;
- height: 100px;
- ::v-deep svg > path:nth-child(2) {
- stroke: url(#green);
- }
- ::v-deep .el-progress-circle{
- border-radius: 50%;
- box-shadow: 0 6px 8px #D9F6F6;
- }
-}
-
-::v-deep .el-progress__text{
- white-space: pre;
-
-}
-::v-deep .el-progress-circle__track {
- stroke: #F1F2F6;
-}
-
-.differ {
- ::v-deep .el-progress__text {
- top: 55%;
- font-size: 30px !important;
- color: #0C0E1E;
- &::before {
- content: 'CPU占比';
- width: 100%;
- position: absolute;
- top: -85%;
- left: 50%;
- font-weight: normal;
- font-size: 14px;
- color: #545B65;
- transform: translateX(-50%);
- }
- &::after {
- content: '%';
- width: 100%;
- position: absolute;
- bottom: 6px;
- left: 30px;
- font-weight: normal;
- font-size: 12px;
- color: #DEE0E4;
- }
- }
-}
diff --git a/src/views/system/archiveStatistics/mixins/statistics.js b/src/views/system/archiveStatistics/mixins/statistics.js
index aa75403..926c4f2 100644
--- a/src/views/system/archiveStatistics/mixins/statistics.js
+++ b/src/views/system/archiveStatistics/mixins/statistics.js
@@ -15,7 +15,6 @@ export const statisticsCrud = {
}
},
lendData: [],
- serviceData: [],
cateData: [],
typeData: [],
storageData: {