Browse Source

档案统计

master
xuhuajiao 3 years ago
parent
commit
86cee5d3c7
  1. 110
      src/views/archivesManage/archivesCheck/data1.json
  2. 100
      src/views/components/data1.json
  3. 100
      src/views/data1.json
  4. 113
      src/views/home.vue
  5. 217
      src/views/system/archiveStatistics/index.vue
  6. 35
      src/views/system/archiveStatistics/module/barEcharts.vue

110
src/views/archivesManage/archivesCheck/data1.json

@ -1,110 +0,0 @@
{
"total":8,
"rows":[
{
"id":"29f16d62bc7242d5ba8dc84de5451f93",
"checkNum":"PD-202205250840",
"containPath":"父区域-子区域,父区域-子区域1",
"checkState":"已执行",
"storeNum":"233",
"CheckedNum":"230",
"noCheckNum":"3",
"haveLendNum":"111",
"misplaceNum":"20",
"CreateTime":"2022-5-25 08:40",
"checkResult":"在库"
},
{
"id":"3d6d548d30db426ea3d95d63f589b294",
"checkNum":"PD-202205250840",
"containPath":"父区域-子区域,父区域-子区域1",
"checkState":"已执行",
"storeNum":"233",
"CheckedNum":"230",
"noCheckNum":"3",
"haveLendNum":"111",
"misplaceNum":"20",
"CreateTime":"2022-5-25 08:41",
"checkResult":"在库"
},
{
"id":"45ff597e7cc64d11803ac422816b1e23",
"checkNum":"PD-202205250840",
"containPath":"父区域-子区域,父区域-子区域1",
"checkState":"待执行",
"storeNum":"233",
"CheckedNum":"230",
"noCheckNum":"3",
"haveLendNum":"111",
"misplaceNum":"20",
"CreateTime":"2022-5-25 08:42",
"checkResult":"已借"
},
{
"id":"49106aa0d1534a7a900843d0c4531840",
"checkNum":"PD-202205250840",
"containPath":"父区域-子区域,父区域-子区域1",
"checkState":"待执行",
"storeNum":"233",
"CheckedNum":"230",
"noCheckNum":"3",
"haveLendNum":"111",
"misplaceNum":"20",
"CreateTime":"2022-5-25 08:50",
"checkResult":"错位"
},
{
"id":"6e604355ff1e47e8b48117dca36420c7",
"checkNum":"PD-202205250841",
"containPath":"父区域-子区域,父区域-子区域1",
"checkState":"执行中",
"storeNum":"233",
"CheckedNum":"230",
"noCheckNum":"3",
"haveLendNum":"111",
"misplaceNum":"20",
"CreateTime":"2022-5-25 08:40",
"checkResult":"错位"
},
{
"id":"6f4a6631d9d3424b960793704f3757b3",
"checkNum":"PD-202205250841",
"containPath":"父区域-子区域,父区域-子区域1",
"checkState":"执行中",
"storeNum":"233",
"CheckedNum":"230",
"noCheckNum":"3",
"haveLendNum":"111",
"misplaceNum":"20",
"CreateTime":"2022-5-25 08:40",
"checkResult":"错位"
},
{
"id":"76e29d5c0a0541bfb1ee9da432183b15",
"checkNum":"PD-202205250842",
"containPath":"父区域-子区域,父区域-子区域1",
"checkState":"已执行",
"storeNum":"233",
"CheckedNum":"230",
"noCheckNum":"3",
"haveLendNum":"111",
"misplaceNum":"20",
"CreateTime":"2022-5-25 08:40"
},
{
"id":"a0ffdd94161146c49161662c3f9a70cd",
"checkNum":"PD-202205250842",
"containPath":"父区域-子区域,父区域-子区域1",
"checkState":"已执行",
"storeNum":"233",
"CheckedNum":"230",
"noCheckNum":"3",
"haveLendNum":"111",
"misplaceNum":"20",
"CreateTime":"2022-5-25 08:40"
}
],
"footer":null,
"postparam":null
}

100
src/views/components/data1.json

@ -1,100 +0,0 @@
{
"rows":[
{
"time":"2022-6-30 13:00",
"warehouse":"文书档案库房",
"warning":"温度温度温度温度温度温度"
},
{
"time":"2022-6-30 13:00",
"warehouse":"文书档案库房",
"warning":"温度温度温度温度温度温度"
},
{
"time":"2022-6-30 13:00",
"warehouse":"文书档案库房",
"warning":"温度温度温度温度温度温度"
},
{
"time":"2022-6-30 13:00",
"warehouse":"文书档案库房",
"warning":"温度温度温度温度温度温度"
},
{
"time":"2022-6-30 13:00",
"warehouse":"文书档案库房",
"warning":"温度温度温度温度温度温度"
},
{
"time":"2022-6-30 13:00",
"warehouse":"文书档案库房",
"warning":"温度温度温度温度温度温度"
},
{
"time":"2022-6-30 13:00",
"warehouse":"文书档案库房",
"warning":"温度温度温度温度温度温度"
},
{
"time":"2022-6-30 13:00",
"warehouse":"文书档案库房",
"warning":"温度温度温度温度温度温度"
},
{
"time":"2022-6-30 13:00",
"warehouse":"文书档案库房",
"warning":"温度温度温度温度温度温度"
},
{
"time":"2022-6-30 13:00",
"warehouse":"文书档案库房",
"warning":"温度温度温度温度温度温度"
},
{
"time":"2022-6-30 13:00",
"warehouse":"文书档案库房",
"warning":"温度温度温度温度温度温度"
},
{
"time":"2022-6-30 13:00",
"warehouse":"文书档案库房",
"warning":"温度温度温度温度温度温度"
},
{
"time":"2022-6-30 13:00",
"warehouse":"文书档案库房",
"warning":"温度温度温度温度温度温度"
},
{
"time":"2022-6-30 13:00",
"warehouse":"文书档案库房",
"warning":"温度温度温度温度温度温度"
},
{
"time":"2022-6-30 13:00",
"warehouse":"文书档案库房",
"warning":"温度温度温度温度温度温度"
},
{
"time":"2022-6-30 13:00",
"warehouse":"文书档案库房",
"warning":"4温度温度温度温度温度温度"
},
{
"time":"2022-6-30 13:00",
"warehouse":"文书档案库房",
"warning":"3温度温度温度温度温度温度"
},
{
"time":"2022-6-30 13:00",
"warehouse":"文书档案库房",
"warning":"2温度温度温度温度温度温度"
},
{
"time":"2022-6-30 13:00",
"warehouse":"文书档案库房",
"warning":"1温度温度温度温度温度温度"
}
]
}

100
src/views/data1.json

@ -1,100 +0,0 @@
{
"rows":[
{
"time":"2022-6-30 13:00",
"warehouse":"文书档案库房",
"warning":"温度温度温度温度温度温度"
},
{
"time":"2022-6-30 13:00",
"warehouse":"文书档案库房",
"warning":"温度温度温度温度温度温度"
},
{
"time":"2022-6-30 13:00",
"warehouse":"文书档案库房",
"warning":"温度温度温度温度温度温度"
},
{
"time":"2022-6-30 13:00",
"warehouse":"文书档案库房",
"warning":"温度温度温度温度温度温度"
},
{
"time":"2022-6-30 13:00",
"warehouse":"文书档案库房",
"warning":"温度温度温度温度温度温度"
},
{
"time":"2022-6-30 13:00",
"warehouse":"文书档案库房",
"warning":"温度温度温度温度温度温度"
},
{
"time":"2022-6-30 13:00",
"warehouse":"文书档案库房",
"warning":"温度温度温度温度温度温度"
},
{
"time":"2022-6-30 13:00",
"warehouse":"文书档案库房",
"warning":"温度温度温度温度温度温度"
},
{
"time":"2022-6-30 13:00",
"warehouse":"文书档案库房",
"warning":"温度温度温度温度温度温度"
},
{
"time":"2022-6-30 13:00",
"warehouse":"文书档案库房",
"warning":"温度温度温度温度温度温度"
},
{
"time":"2022-6-30 13:00",
"warehouse":"文书档案库房",
"warning":"温度温度温度温度温度温度"
},
{
"time":"2022-6-30 13:00",
"warehouse":"文书档案库房",
"warning":"温度温度温度温度温度温度"
},
{
"time":"2022-6-30 13:00",
"warehouse":"文书档案库房",
"warning":"温度温度温度温度温度温度"
},
{
"time":"2022-6-30 13:00",
"warehouse":"文书档案库房",
"warning":"温度温度温度温度温度温度"
},
{
"time":"2022-6-30 13:00",
"warehouse":"文书档案库房",
"warning":"温度温度温度温度温度温度"
},
{
"time":"2022-6-30 13:00",
"warehouse":"文书档案库房",
"warning":"温度温度温度温度温度温度"
},
{
"time":"2022-6-30 13:00",
"warehouse":"文书档案库房",
"warning":"温度温度温度温度温度温度"
},
{
"time":"2022-6-30 13:00",
"warehouse":"文书档案库房",
"warning":"温度温度温度温度温度温度"
},
{
"time":"2022-6-30 13:00",
"warehouse":"文书档案库房",
"warning":"温度温度温度温度温度温度"
}
]
}

113
src/views/home.vue

@ -62,30 +62,11 @@
</h3>
<div style="height: calc(100% - 40px);overflow-y: auto;overflow-x: hidden;">
<ul class="todo-list">
<li>
<!-- CCCCCCC请及时处理 -->
<p>温馨提示XX已提交了待借申请请及时处理请及时处理请及时处理</p>
<span>2022-5-23 13:30</span>
</li>
<li>
<p>温馨提示XX已提交了待借申请请及时处理</p>
<span>2022-5-23 13:30</span>
</li>
<li>
<p>温馨提示XX已提交了待借申请请及时处理</p>
<span>2022-5-23 13:30</span>
</li>
<li>
<p>温馨提示XX已提交了待借申请请及时处理</p>
<span>2022-5-23 13:30</span>
</li>
<li>
<p>温馨提示XX已提交了待借申请请及时处理</p>
<span>2022-5-23 13:30</span>
</li>
<li>
<p>温馨提示XX已提交了待借申请请及时处理</p>
<span>2022-5-23 13:30</span>
<li v-for="(item,index) in waitBorrowerData" :key="index">
<el-tooltip class="item" effect="dark" :content="item.title" :enterable="false" placement="top">
<p>温馨提示{{ item.title }}</p>
</el-tooltip>
<span>{{ item.update_time | parseTime }}</span>
</li>
</ul>
</div>
@ -93,20 +74,6 @@
</el-col>
<el-col :xs="24" :sm="24" :lg="8">
<!-- 门禁记录 -->
<!-- <div class="container-wrap">
<span class="right-top-line" />
<span class="left-bottom-line" />
<h3 class="table-title">
<p class="title-arrow">
<svg-icon icon-class="menjin" class-name="warehouse-svg" />门禁记录
</p>
</h3>
<el-table ref="table2" style="min-width: 100%;" height="100%" :data="tableData" class="warehose-el-table" stripe>
<el-table-column prop="time" label="时间" align="center" min-width="60" />
<el-table-column prop="warehouse" label="库房" align="center" min-width="60" />
<el-table-column prop="warning" label="警情" align="center" :show-overflow-tooltip="true" min-width="85" />
</el-table>
</div> -->
<security-door :height="'calc(100% - 40px)'" />
</el-col>
<el-col :xs="24" :sm="24" :lg="8">
@ -160,69 +127,47 @@
</template>
<script>
// import GithubCorner from '@/components/GithubCorner'
import PanelGroup from './dashboard/PanelGroup'
// import LineChart from './dashboard/LineChart'
// import RadarChart from '@/components/Echarts/RadarChart'
// import PieChart from '@/components/Echarts/PieChart'
// import BarChart from '@/components/Echarts/BarChart'
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 data1 from './data1.json'
import WarehouseWarning from '@/views/components/WarehouseWarning'
import SecurityDoor from '@/views/components/SecurityDoor'
import SearchAcrives from '@/views/archivesManage/archivesSearch/index'
// const lineChartData = {
// newVisitis: {
// expectedData: [100, 120, 161, 134, 105, 160, 165],
// actualData: [120, 82, 91, 154, 162, 140, 145]
// },
// messages: {
// expectedData: [200, 192, 120, 144, 160, 130, 140],
// actualData: [180, 160, 151, 106, 145, 150, 130]
// },
// purchases: {
// expectedData: [80, 100, 121, 104, 105, 90, 100],
// actualData: [120, 90, 100, 138, 142, 130, 130]
// },
// shoppings: {
// expectedData: [130, 140, 141, 142, 145, 150, 160],
// actualData: [120, 82, 91, 154, 162, 140, 130]
// }
// }
import { statisticsCrud } from '@/views/system/archiveStatistics/mixins/statistics'
import { FetchWaitBorrower } from '@/api/archivesManage/lendManage'
export default {
name: 'Dashboard',
components: {
// GithubCorner,
WarehouseWarning,
SecurityDoor,
PanelGroup,
// LineChart,
// RadarChart,
// PieChart,
// BarChart
lendAcross, catePie, typePie,
lendAcross,
catePie,
typePie,
SearchAcrives
},
mixins: [statisticsCrud],
data() {
return {
lendData: [100, 18203, 23489, 29034, 104970],
cateData: [1000, 700],
typeData: [1110, 2000, 800, 600, 900]
waitBorrowerData: []
}
},
created() {
this.getData()
this.getWaitBorrower()
},
methods: {
// handleSetLineChartData(type) {
// this.lineChartData = lineChartData[type]
// },
getData() {
this.tableData = data1.rows
getWaitBorrower() {
FetchWaitBorrower().then(data => {
console.log(data)
if (data) {
this.waitBorrowerData = data
}
})
},
changeActiveTab(id) {
this.$router.push({
@ -321,21 +266,21 @@ export default {
.todo-list {
padding: 0 20px;
& li {
background: #02255f;
box-shadow: inset 0px 0px 6px 1px #339cff;
border-radius: 26px 26px 26px 26px;
opacity: 1;
height: 42px;
line-height: 42px;
margin-bottom: 10px;
font-size: 13px;
color: #ffffff;
line-height: 42px;
height: 42px;
background: #02255f;
box-shadow: inset 0px 0px 6px 1px #339cff;
border-radius: 26px;
opacity: 1;
cursor: pointer;
& p {
font-family: Microsoft YaHei-Regular, Microsoft YaHei;
font-weight: 400;
display: inline-block;
width: calc(100% - 140px);
padding-left: 10px;
width: calc(100% - 112px);
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;

217
src/views/system/archiveStatistics/index.vue

@ -132,230 +132,17 @@ import typePie from '@/views/components/echarts/typePie.vue'
import BarEcharts from './module/barEcharts.vue'
import AcrossBar from './module/acrossBar.vue'
import LineEchart from './module/lineEchart.vue'
import { FetchInitBorrowerNumStatistics, FetchInitArchivesTypeNum, FetchInitArchivesTypeStatistics, FetchStorageStatistics, FetchInitArchivesSearchRanking, FetchInitAddArchivesStatistics } from '@/api/archivesManage/statistics'
import { statisticsCrud } from './mixins/statistics'
export default {
components: { lendAcross, catePie, typePie, BarEcharts, AcrossBar, LineEchart },
mixins: [statisticsCrud],
data() {
return {
cateDate: '',
typeDate: '',
inOutStorageDate: '',
arcSearchDate: '',
arcAddDate: '',
pickerOptions: {
disabledDate(time) {
return time.getTime() > Date.now() - 8.64e6
}
},
lendData: [],
cateData: [],
typeData: [],
storageData: {
storageMonths: [],
inStorageData: [],
outStorageData: []
},
searchAcrivesData: {
searchName: [],
searchValue: []
},
addArcivesData: {
addArcivesMonth: [],
addArcivesNum: []
}
}
},
mounted() {
this.getBorrowerNumSta()
this.getArchivesTypeNum()
this.getArchivesTypeStatistics()
this.getStorageStatistics()
this.getArchivesSearchRanking()
this.getAddArchivesStatistics()
},
methods: {
//
getBorrowerNumSta() {
FetchInitBorrowerNumStatistics().then(res => {
if (res) {
delete res.total
// '', '', '', '', ''
const borrowerArr = []
for (const i in res) {
const obj = {}
obj.name = i
obj.value = res[i]
if (i === 'inStorage') {
obj.sequence = 1
} else if (i === 'borrow') {
obj.sequence = 2
} else if (i === 'waitBorrow') {
obj.sequence = 3
} else if (i === 'overdue') {
obj.sequence = 4
} else if (i === 'abnormal') {
obj.sequence = 5
}
borrowerArr.push(obj)
}
this.arrSortByKey(borrowerArr, 'sequence', false)
borrowerArr.forEach(item => {
this.lendData.push(item.value)
})
}
})
},
// -
handleCateDate() {
console.log(this.cateDate)
this.getArchivesTypeNum()
},
//
getArchivesTypeNum() {
let params
if (this.cateDate) {
params = {
'type': this.cateDate
}
} else {
params = {
'type': 1
}
}
FetchInitArchivesTypeNum(params).then(res => {
if (res) {
for (const i in res) {
this.cateData.push(res[i])
}
}
})
},
// -
handleTypeDate() {
console.log(this.typeDate)
this.getArchivesTypeStatistics()
},
//
getArchivesTypeStatistics() {
let params
if (this.typeDate) {
params = {
'type': this.typeDate
}
} else {
params = {
'type': 1
}
}
FetchInitArchivesTypeStatistics(params).then(res => {
if (res) {
res.map(item => {
const obj = {}
obj.name = item.archivesType
obj.value = item.archivesNum
this.typeData.push(obj)
})
}
})
},
// -
handleStorageDate() {
console.log(this.inOutStorageDate)
this.getStorageStatistics()
},
//
getStorageStatistics() {
let params
let year
if (this.inOutStorageDate) {
params = {
'type': this.inOutStorageDate
}
year = this.arcAddDate
} else {
params = {
'type': 1
}
year = new Date().getFullYear()
}
FetchStorageStatistics(params).then(res => {
if (res) {
this.storageData.storageMonths = []
res.months.forEach(item => {
this.storageData.storageMonths.push(year + '/' + item)
})
this.storageData.inStorageData = res.inStorage
this.storageData.outStorageData = res.outStorage
}
})
},
handleSearchDate() {
console.log(this.arcSearchDate)
this.getArchivesSearchRanking()
},
//
getArchivesSearchRanking() {
let params
if (this.arcSearchDate) {
params = {
'type': this.arcSearchDate
}
} else {
params = {
'type': 1
}
}
FetchInitArchivesSearchRanking(params).then(res => {
if (res) {
this.arrSortByKey(res, 'num', true)
this.searchAcrivesData.searchName = res.map(item => item.cnName)
this.searchAcrivesData.searchValue = res.map(item => item.num)
}
})
},
handleArcAddSta() {
console.log(this.arcAddDate)
this.getAddArchivesStatistics()
},
//
getAddArchivesStatistics() {
let params
let year
if (this.arcAddDate) {
params = {
'type': this.arcAddDate
}
year = this.arcAddDate
} else {
params = {
'type': 1
}
year = new Date().getFullYear()
}
FetchInitAddArchivesStatistics(params).then(res => {
if (res) {
this.addArcivesData.addArcivesMonth = []
res.months.forEach(item => {
this.addArcivesData.addArcivesMonth.push(year + '/' + item)
})
this.addArcivesData.addArcivesNum = res.nums
}
})
},
// array:
// key:
// order: / true false:
arrSortByKey(array, property, order) {
return array.sort(function(a, b) {
const value1 = a[property]
const value2 = b[property]
if (order) { //
return value1 - value2
} else { //
return value2 - value1
}
})
}
}
}
</script>

35
src/views/system/archiveStatistics/module/barEcharts.vue

@ -144,16 +144,30 @@ export default {
axisPointer: {
type: 'shadow'
},
formatter: function(params) {
var res = "<div style='width:100%;height:24px;margin-bottom:5px;padding:0 12px;line-height:24px;'><p>" + echarts.format.formatTime('yyyy年M月', new Date(params[0].name)) + ' </p></div>'
for (var i = 0; i < params.length; i++) {
res += `<div style="color: #fff;font-size: 14px; padding:0 12px;line-height: 24px">
<span style="display:inline-block;margin-right:5px;border-radius:2px;width:10px;height:10px;background:${[params[i].color]};"></span>
${params[i].seriesName}
${params[i].data}
</div>`
}
return res
// formatter: function(params) {
// var res = "<div style='width:100%;height:24px;margin-bottom:5px;padding:0 12px;line-height:24px;'><p>" + echarts.format.formatTime('yyyyM', new Date(params[0].name)) + ' </p></div>'
// for (var i = 0; i < params.length; i++) {
// res += `<div style="color: #fff;font-size: 14px; padding:0 12px;line-height: 24px">
// <span style="display:inline-block;margin-right:5px;border-radius:2px;width:10px;height:10px;background-color:${[params[i].color]};"></span>
// ${params[i].color}
// ${params[i].seriesName}
// ${params[i].data}
// </div>`
// }
// return res
// },
formatter(params) {
const val0 = params[0]['data']
const val1 = params[1]['data']
const date = echarts.format.formatTime('yyyy年M月', new Date(params[0].name))
const circle = `<span style="display:inline-block;margin-right:5px;border-radius:50%;width:10px;height:10px;left:5px;background-color:`
const data0 = `${circle}rgba(58, 166, 250, 1)"></span> ${
params[0]['seriesName']
}: ${val0}`
const data1 = `${circle}rgba(157, 221, 146, 1)"></span> ${
params[1]['seriesName']
}: ${val1}`
return `${date}<br/>${data0}<br/>${data1}`
}
},
legend: { //
@ -243,7 +257,6 @@ export default {
color: '#3AA6FA '
}
])
},
{
name: '入库',

Loading…
Cancel
Save