首页修改

This commit is contained in:
xbx 2023-11-26 16:37:29 +08:00
parent 07791509f0
commit 5de4da51ff
2 changed files with 50 additions and 43 deletions

View File

@ -1,36 +1,25 @@
<template>
<div>
<!-- <a-row :gutter="24">
<a-col :span="12" :style="{ marginBottom: '24px' }" class="container gutter-row">
<chart-card >
<span>资产总数</span>
</chart-card>
</a-col>
<a-col :span="12" :style="{ marginBottom: '24px' }" class="container">
<chart-card>
<span>系统介绍</span>
</chart-card>
</a-col>
</a-row> -->
<a-row :gutter="24">
<a-col :sm="24" :md="12" :xl="6" :style="{ marginBottom: '24px' }">
<chart-card title="仪器总数" :total="this.InstrumentCount">
<template slot="footer">资产总数<span>{{ this.InstrumentCount+ this.FurnitureCount}}</span></template>
</chart-card>
</a-col>
<a-col :sm="24" :md="12" :xl="6" :style="{ marginBottom: '24px' }">
<chart-card title="仪器总价" :total="this.InstrumentAmount">
<template slot="footer">总资产价值量<span>{{ this.InstrumentAmount+this.FurnitureAmount }}</span></template>
<template slot="footer">仪器总价<span>{{ this.InstrumentAmount }}</span></template>
</chart-card>
</a-col>
<a-col :sm="24" :md="12" :xl="6" :style="{ marginBottom: '24px' }">
<chart-card title="家具总数" :total="this.FurnitureCount">
<template slot="footer">资产总数<span>{{ this.InstrumentCount+ this.FurnitureCount }}</span></template>
<template slot="footer">家具总价<span>{{ this.FurnitureAmount }}</span></template>
</chart-card>
</a-col>
<a-col :sm="24" :md="12" :xl="6" :style="{ marginBottom: '24px' }">
<chart-card title="家具总价" :total="this.FurnitureAmount">
<template slot="footer">总资产价值量<span>{{ this.InstrumentAmount+this.FurnitureAmount }}</span></template>
<chart-card title="无形资产总数" :total="this.IntangibleCount">
<template slot="footer">无形资产总价<span>{{ this.IntangibleAmount }}</span></template>
</chart-card>
</a-col>
<a-col :sm="24" :md="12" :xl="6" :style="{ marginBottom: '24px' }">
<chart-card title="资产总数" :total="this.InstrumentCount + this.FurnitureCount + this.IntangibleCount">
<template slot="footer">总资产价值量<span>{{ this.InstrumentAmount + this.FurnitureAmount
+ this.IntangibleAmount }}</span></template>
</chart-card>
</a-col>
</a-row>
@ -57,11 +46,14 @@ export default {
loading: true,
PieChartData: [],
ChartData: [],
LocationName: [],
ChartDataSum: 0,
InstrumentCount: 0,
FurnitureCount: 0,
IntangibleCount: 0,
InstrumentAmount: 0,
FurnitureAmount: 0,
IntangibleAmount: 0,
}
},
methods: {
@ -77,14 +69,29 @@ export default {
this.drawPie();
})
},
getLocationName() {
getAction("/rms/rmsDepart/getLocationName").then(res => {
this.LocationName = res;
console.log("位置:" + this.LocationName)
})
},
getInstrumentCount() {
getAction('/rms/rmsDepart/getInstrumentCount').then(res => {
this.InstrumentCount = res;
console.log("仪器总数" + this.InstrumentCount)
})
},
getFurnitureCount() {
getAction('/rms/rmsDepart/getFurnitureCount').then(res => {
this.FurnitureCount = res;
console.log("家具总数:" + this.FurnitureCount)
})
},
getIntangibleCount(){
getAction('/rms/rmsDepart/getIntangibleCount').then(res => {
this.IntangibleCount = res;
console.log("无形资产总数:" + this.IntangibleCount)
})
},
getInstrumentAmount() {
@ -97,8 +104,13 @@ export default {
this.FurnitureAmount = res;
})
},
getIntangibleAmount(){
getAction('/rms/rmsDepart/getIntangibleAmount').then(res => {
this.IntangibleAmount = res;
})
},
drawChart() {
// domecharts main
let myChart = this.$echarts.init(document.getElementById("main"));
@ -112,7 +124,11 @@ export default {
data: ["资产数量"],
},
xAxis: {
data: ["理工一号楼", "行知楼", "体育楼", "崇师楼", "新实验楼", "社科楼"],
data: this.LocationName,
axisLabel: {
interval: 0,
rotate: 30
}
},
yAxis: {},
series: [
@ -184,11 +200,13 @@ export default {
created() {
this.getPieChart();
this.getChart();
this.getLocationName();
this.getInstrumentCount();
this.getFurnitureCount();
this.getIntangibleCount();
this.getInstrumentAmount();
this.getFurnitureAmount();
// this.getSum();
this.getIntangibleAmount();
},
}
@ -196,10 +214,7 @@ export default {
<style lang="less" scoped>
.container {
// width: 100%;
// height: 100%;
display: flex;
background-color: #fff;
padding: 24px;
border-radius: 4px;

View File

@ -77,19 +77,11 @@
<a @click="handleEdit(record)">编辑</a>
<a-divider type="vertical" />
<a-dropdown>
<a class="ant-dropdown-link">更多 <a-icon type="down" /></a>
<a-menu slot="overlay">
<a-menu-item>
<a @click="handleDetail(record)">详情</a>
</a-menu-item>
<a-menu-item>
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
<a>删除</a>
</a-popconfirm>
</a-menu-item>
</a-menu>
</a-dropdown>
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
<a>删除</a>
</a-popconfirm>
<a-divider type="vertical" />
<a @click="handleDetail(record)">详情</a>
</span>
</a-table>
@ -275,7 +267,6 @@ export default {
exportXlsUrl: "/rms/rmsIntangible/exportXls",
importExcelUrl: "rms/rmsIntangible/importExcel",
userUrl: "/sys/user/queryUserComponentData?column=createTime&order=desc&field=id,,username,realname,sex,phone,orgCodeTxt&pageNo=1&pageSize=100",
},
UserList: {},
@ -308,6 +299,7 @@ export default {
value: user.username,
text: user.realname
}));
console.log(this.UserdataSource)
},
onSelectTree(selectedRowKeys) {
//
@ -318,7 +310,7 @@ export default {
},
initDictConfig() {
},
}
}
</script>