能力统计明细

This commit is contained in:
unknown 2022-09-24 13:20:18 +08:00
parent 479b96ee06
commit 7438e98f19
1 changed files with 340 additions and 84 deletions

View File

@ -22,92 +22,181 @@
</span>
</el-tree>
</div> -->
<el-form :inline="true">
<!--起始日期 @keyup.enter.native="getDataList()"-->
<el-form-item>
<el-date-picker
v-model="value1"
type="datetimerange"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
format='yyyy-MM-dd HH:mm:ss'
value-format='yyyy-MM-dd HH:mm:ss'
>
</el-date-picker>
</el-form-item>
<!--审核状态-->
<el-form-item>
<el-select
v-model="examineStatus"
placeholder="请选审核状态"
clearable
>
<el-option
label="审核完成"
value="1"
></el-option>
<el-option
label="审核中"
value="0"
></el-option>
</el-select>
</el-form-item>
<!--部门-->
<el-form-item>
<el-select
v-model="abilityDepartment"
placeholder="请选择部门"
clearable
>
<el-option label="全部" value=""></el-option>
<el-option v-for="item in departmentSelects" :key="item.label" v-bind="item"></el-option>
</el-select>
</el-form-item>
<!--类型-->
<el-form-item>
<el-select
v-model="abilityType"
placeholder="请选择类型"
clearable
>
<el-option label="全部" value=""></el-option>
<el-option v-for="item in typeOptions" :key="item.value" :label="item.name" v-bind="item"></el-option>
</el-select>
</el-form-item>
<!--操作按钮查询-->
<el-form-item>
<el-button @click="getDataList()">{{ $t('query') }}</el-button>
</el-form-item>
<!--操作按钮重置-->
<el-form-item>
<el-button type="primary" @click="resetDataList()">{{ $t('reset') }}</el-button>
</el-form-item>
</el-form>
<el-card shadow="never" class="aui-card--fill" v-if='homeIsShow'>
<div class="mod-demand__bsdemand">
<div class='top-box'>
<!-- <div class='top-box'>
<span class='title'>能力统计</span>
<div class='title-list-style'>
<div v-for="(item,index) in titleList" :key='index' class='title-single' :class="{'choseStyle':choseId=== index}" @click="choseBtn(index)">
<span class='box-style'>{{item.name}}</span>
</div>
</div>
</div>
</div>
</div> -->
<div class='second-title'>
<span style='margin-right:30px' :class="[departmentId===1?'departmentStyle':'']" @click="handleChose(1)">
部门发布情况
能力上架统计
</span>
<span v-if='this.choseId===0' :class="[departmentId===2?'departmentStyle':'']" @click="handleChose(2)">
部门使用情况
<span :class="[departmentId===2?'departmentStyle':'']" @click="handleChose(2)">
能力使用统计
</span>
<!-- <span v-if='this.choseId===0' :class="[departmentId===3?'departmentStyle':'']" @click="handleChose(3)">
能力上架明细
</span>
<span v-if='this.choseId===0' :class="[departmentId===4?'departmentStyle':'']" @click="handleChose(4)">
能力使用明细
</span> -->
<span v-if="detailFlag" class="detail-button" @click="goToDetail()">
明细
</span>
<span v-else class="detail-button" @click="goToBack()">
返回
</span>
</div>
<div class='line-style'></div>
<!--统计表-->
<el-table
:data="tableData"
:header-cell-style="{textAlign:'center'}"
:cell-style="{textAlign:'center'}"
border
style="width: 100%">
style="width: 100%" v-if='this.departmentId===1 ||this.departmentId===2'>
<el-table-column
prop="deptName"
prop="name"
label="部门名称"
min-width="100%">
</el-table-column>
<el-table-column v-if='this.departmentId===1'
prop="resourceNum"
label="发布总数"
min-width="100%">
</el-table-column>
<el-table-column v-if="this.choseId===0 && this.departmentId===1 "
prop="resourceCarNum"
label="被申请总数"
min-width="100%">
</el-table-column>
<el-table-column v-if="this.departmentId===1"
prop="resourceBrowseNum"
label="浏览总量"
min-width="100%">
</el-table-column>
<el-table-column v-if="this.departmentId===1"
prop="resourceCollectionNum"
label="收藏量"
min-width="100%">
</el-table-column>
<el-table-column v-if="this.choseId===0 && this.departmentId===1 "
prop="resourceVisits"
label="被调用总数"
min-width="100%">
</el-table-column>
<el-table-column v-if="this.choseId===0 && this.departmentId===1 "
prop="resourceRelNum"
label="被应用总数"
min-width="100%">
</el-table-column>
<el-table-column v-if="this.choseId===0 && this.departmentId===1 "
prop="resourceShareNum"
label="需申请数量"
min-width="100%">
</el-table-column>
<el-table-column v-if="this.choseId===0 && this.departmentId===1 "
prop="resourceShareNonNum"
label="免批数量"
min-width="100%">
</el-table-column>
<el-table-column v-if="this.departmentId===2"
prop="resourceUseNum"
label="使用总数"
min-width="100%">
</el-table-column>
<el-table-column v-if="this.departmentId===2"
prop="resourceCallNum"
label="申请总数"
<el-table-column label="组件">
<el-table-column
prop="znsf"
label="智能算法"
min-width="100%">
</el-table-column>
<el-table-column
prop="tcfw"
label="图层服务"
min-width="100%">
</el-table-column>
<el-table-column
prop="kfzj"
label="通用开发组件"
min-width="100%">
</el-table-column>
<el-table-column
prop="ywzj"
label="业务能力组件"
min-width="100%">
</el-table-column>
</el-table-column>
<el-table-column
prop="yyzy"
label="应用资源"
min-width="100%">
</el-table-column>
<el-table-column
prop="zj"
label="总计"
min-width="100%">
</el-table-column>
</el-table>
<!--明细表-->
<el-table
:data="tableData"
:header-cell-style="{textAlign:'center'}"
:cell-style="{textAlign:'center'}"
border
style="width: 100%" v-if='this.departmentId===3 ||this.departmentId===4'>
<el-table-column
prop="deptName"
label="部门"
min-width="100%">
</el-table-column>
<el-table-column
label="操作"
min-width="92%">
<template slot-scope="scope">
<el-button @click="handleClick(scope.row)" type="text" size="small">查看详情</el-button>
</template>
prop="resourceName"
label="资源名称"
min-width="100%">
</el-table-column>
</el-table>
<el-table-column
prop="type"
label="类型"
min-width="100%">
</el-table-column>
<el-table-column
prop="createDate"
label="日期"
min-width="100%">
</el-table-column>
<el-table-column
prop="approveStatus"
label="状态"
min-width="100%">
</el-table-column>
</el-table>
<div class="block">
<el-pagination
@current-change="handleCurrentChange"
@ -130,6 +219,7 @@
import componentServices from './componentServices.vue'
import applicationResources from './applicationResources.vue'
import ComponentUsed from './componentUsed.vue'
import { mapState } from 'vuex'
export default {
components: { componentServices, applicationResources, ComponentUsed },
data () {
@ -187,14 +277,41 @@ export default {
titleList: [
{ name: '组件服务', key: 1 }, { name: '应用资源', key: 2 }, { name: '基础设施', key: 3 }, { name: '数据资源', key: 3 }, { name: '知识库', key: 3 }
],
tableData: [{ deptName: '部门', resourceNum: 222 }]
tableData: [{ deptName: '部门', resourceNum: 222 }],
examineStatus: '0',//
value1:[],//
abilityDepartment:"",//
abilityType:"",//
beginTime: '',//
endTime: '',//
typeOptions:[
{ name: '智能算法', value: 1 },
{ name: '图层服务', value: 2 },
{ name: '通用开发组件', value: 3 },
{ name: '页面开发组件', value: 4 },
{ name: '应用资源', value: 5 }],//
detailFlag:true,//
}
},
created () {
//
let d = new Date
let year1,month1,day1;
[year1,month1,day1] = [d.getFullYear(),d.getMonth(),d.getDate()]
let date1 = new Date(year1, month1, day1,7)
this.value1.push(date1)
//
let year2,month2,day2
d.setTime(d.getTime()-24*60*60*1000);
[year2,month2,day2] = [d.getFullYear(),d.getMonth(),d.getDate()]
let date2 = new Date(year2,month2,day2,7)
this.value1.unshift(date2)
},
mounted () {
this.getFirstTree()
},
computed: {
...mapState(['departmentSelects'])
},
methods: {
//
@ -241,44 +358,139 @@ export default {
// })
// },
//
// --
getFirstTree (page) {
this.$http.get('/census/center/v3/resourceReleaseDetails/', {
this.$http.get('/census/center/selectDeptDetailTypeCountList/', {
params: {
page: page || 1,
limit: 5,
// id:'1067246875800000066',
resourceType: '组件服务'
approveStatus: '',
deptId: '',
params: '',
startDate: ''
}
}).then(res => {
this.tableData = res.data.data.list
let result= res.data.data
for(let i=0;i<result.length;i++){
if(!result[i].hasOwnProperty('yyzy') ){
result[i].yyzy= 0
}
if(!result[i].hasOwnProperty('kfzj') ){
result[i].kfzj= 0
}
if(!result[i].hasOwnProperty('znsf') ){
result[i].znsf= 0
}
if(!result[i].hasOwnProperty('tcfw') ){
result[i].tcfw= 0
}
if(!result[i].hasOwnProperty('ywzj') ){
result[i].ywzj= 0
}
result[i].zj=parseInt(result[i].yyzy)+ parseInt(result[i].kfzj)+parseInt(result[i].znsf)+parseInt(result[i].ywzj)+parseInt(result[i].tcfw)
}
this.tableData = res.data.data
this.total = res.data.data.total
})
},
// 使
// 使-使
getSecondTree () {
this.$http.get('/census/center/v3/resourceUsedDetails/', {
this.$http.get('/census/center/selectApplyDeptDetailTypeCountList/', {
params: {
// page: page || 1,
limit: 5,
page: 1,
// id:'1067246875800000064',
resourceType: '组件服务'
approveStatus: '',
deptId: '',
params: '',
startDate: ''
}
}).then(res => {
this.tableData = res.data.data.list
let result= res.data.data
for(let i=0;i<result.length;i++){
if(!result[i].hasOwnProperty('yyzy') ){
result[i].yyzy= 0
}
if(!result[i].hasOwnProperty('kfzj') ){
result[i].kfzj= 0
}
if(!result[i].hasOwnProperty('znsf') ){
result[i].znsf= 0
}
if(!result[i].hasOwnProperty('tcfw') ){
result[i].tcfw= 0
}
if(!result[i].hasOwnProperty('ywzj') ){
result[i].ywzj= 0
}
result[i].zj=parseInt(result[i].yyzy)+ parseInt(result[i].kfzj)+parseInt(result[i].znsf)+parseInt(result[i].ywzj)+parseInt(result[i].tcfw)
}
this.tableData = res.data.data
this.total = res.data.data.total
})
},
//
getReleaseTree (page) {
this.$http.get('/census/center/v3/resourceReleaseDetails/', {
//
getOneDetail (page) {
this.$http.get('/census/center/selectCensusResourceTable/', {
params: {
limit: 5,
page: page || 1,
// id:'1067246875800000066',
resourceType: '应用资源'
// page: page || 1,
approveStatus: '',
deptId: '',
params: '',
startDate: ''
}
}).then(res => {
this.tableData = res.data.data.list
this.tableData = res.data.data
this.total = res.data.data.total
})
},
// 使
getTwoDetail (page) {
this.$http.get('/census/center/selectCensusApplyTable/', {
params: {
limit: 5,
// page: page || 1,
approveStatus: '',
deptId: '',
params: '',
startDate: ''
}
}).then(res => {
this.tableData = res.data.data
this.total = res.data.data.total
})
},
getReleaseTree (page) {
this.$http.get('/census/center/selectApplyDeptDetailTypeCountList/', {
params: {
limit: 5,
// page: page || 1,
approveStatus: '',
deptId: '',
params: '',
startDate: ''
}
}).then(res => {
let result= res.data.data
for(let i=0;i<result.length;i++){
if(!result[i].hasOwnProperty('yyzy') ){
result[i].yyzy= 0
}
if(!result[i].hasOwnProperty('kfzj') ){
result[i].kfzj= 0
}
if(!result[i].hasOwnProperty('znsf') ){
result[i].znsf= 0
}
if(!result[i].hasOwnProperty('tcfw') ){
result[i].tcfw= 0
}
if(!result[i].hasOwnProperty('ywzj') ){
result[i].ywzj= 0
}
result[i].zj=parseInt(result[i].yyzy)+ parseInt(result[i].kfzj)+parseInt(result[i].znsf)+parseInt(result[i].ywzj)+parseInt(result[i].tcfw)
}
this.tableData = res.data.data
this.total = res.data.data.total
})
},
@ -338,13 +550,26 @@ export default {
if (this.choseId === 0) {
this.getFirstTree()
} else if (this.choseId === 1) {
this.getReleaseTree()
//this.getReleaseTree()
}
} else if (index === 2) {
if (this.choseId === 0) {
this.getSecondTree()
} else {
this.getUsedTree()
//this.getUsedTree()
}
}
else if (index === 3) {
if (this.choseId === 0) {
this.getOneDetail()
} else {
//this.getUsedTree()
}
} else if (index === 4) {
if (this.choseId === 0) {
this.getTwoDetail()
} else {
// this.getUsedTree()
}
}
},
@ -366,6 +591,24 @@ export default {
this.homeIsShow = true
this.resourcesIsShow = false
this.handleCurrentChange(1)
},
////////////
goToDetail(){
this.detailFlag = !this.detailFlag;
if(this.departmentId===1){
this.handleChose(3);
//this.departmentId = 1;
}else if(this.departmentId===2){
this.handleChose(4);
//this.departmentId = 2;
}else{
}
},
//
goToBack(){
//departmentId 13 24
this.detailFlag = !this.detailFlag;
}
}
@ -374,6 +617,7 @@ export default {
<style lang="scss" scoped>
.container {
display: flex;
flex-direction: column;
}
.container-left {
width: 250px;
@ -464,6 +708,18 @@ input::placeholder {
font-size: 14px;
color: #979eb9;
cursor: pointer;
.detail-button{
width: 60px;
height: 30px;
right: 60px;
background-color: #0058e1;
position: absolute;
text-align: center;
line-height: 30px;
margin-top: -20px;
border-radius: 2px;
color: #fff;
}
}
.line-style {
width: 100%;