首页修改

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

View File

@ -77,19 +77,11 @@
<a @click="handleEdit(record)">编辑</a> <a @click="handleEdit(record)">编辑</a>
<a-divider type="vertical" /> <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-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
<a>删除</a> <a>删除</a>
</a-popconfirm> </a-popconfirm>
</a-menu-item> <a-divider type="vertical" />
</a-menu> <a @click="handleDetail(record)">详情</a>
</a-dropdown>
</span> </span>
</a-table> </a-table>
@ -276,7 +268,6 @@ export default {
importExcelUrl: "rms/rmsIntangible/importExcel", importExcelUrl: "rms/rmsIntangible/importExcel",
userUrl: "/sys/user/queryUserComponentData?column=createTime&order=desc&field=id,,username,realname,sex,phone,orgCodeTxt&pageNo=1&pageSize=100", userUrl: "/sys/user/queryUserComponentData?column=createTime&order=desc&field=id,,username,realname,sex,phone,orgCodeTxt&pageNo=1&pageSize=100",
}, },
UserList: {}, UserList: {},
} }
@ -308,6 +299,7 @@ export default {
value: user.username, value: user.username,
text: user.realname text: user.realname
})); }));
console.log(this.UserdataSource)
}, },
onSelectTree(selectedRowKeys) { onSelectTree(selectedRowKeys) {
// //