liuxy 2 years ago
commit 08fec93c4b

@ -15,12 +15,12 @@ export function getOutDetail({ tbname,out_caigou_id,out_contract_id,out_pay_id,o
})
}
export function httpCurl(params,noloading = true,s= '/Api/flowDetail',method='GET') {
export function httpCurl(params,noloading = true,s= '/Api/flowDetail',method='GET',url) {
return request({
method: 'post',
url: '/api/admin/other/http-curl',
data: {
url: process.env.VUE_APP_OUT_OLD,
url: url || process.env.VUE_APP_OUT_OLD,
method,
params: {
s,

@ -714,6 +714,7 @@ export default {
},
list: [],
totalMoney: 0,
updateMoney: 0,
total: 0,
pageIndex: 1,
pageSize: 10,
@ -775,6 +776,11 @@ export default {
return parseTime(new Date(value), "{y}-{m}-{d}");
},
},
{
label: '科室',
width: 150,
prop: 'plan_department.name'
},
{
label: "描述",
minWidth: 300,
@ -895,10 +901,16 @@ export default {
sums[index] = moneyFormatter(this.totalMoney);
return;
}
<<<<<<< HEAD
if (column.property === "update_money") {
sums[index] = moneyFormatter(this.update_money);
return;
=======
if (column.property === 'update_money') {
sums[index] = moneyFormatter(this.updateMoney);
return
>>>>>>> df592f31fb2b950dd89844eb8be5521e364db39d
}
// const values = data.map(item => Number(item[column.property]));
// if (!values.every(value => isNaN(value)) && (column.property === 'money' || column.property === 'plan_price'|| column.property === 'fund_log_total')) {
@ -953,6 +965,7 @@ export default {
this.total = res.list.total;
}
this.totalMoney = res.total_money;
this.updateMoney = res.update_money;
});
},
//

@ -0,0 +1,121 @@
<template>
<el-card class="box-card" shadow="hover">
<div slot="header" class="clearfix">
<span style="border-left: 3px solid #338de3ff; padding-left: 6px"
>图书统计</span
>
<DatePicker
transfer
:value="select.date"
placeholder="选择所属年份"
placement="bottom"
style="width: 130px; float: right"
type="month"
format
@on-change="changeMonth"
></DatePicker>
</div>
<div class="progress-card">
<div class="progress-card-item">
<div class="progress-card-item__num">{{totalData.book.total}}</div>
<div class="progress-card-item__label">总计</div>
</div>
<div class="progress-card-item">
<div class="progress-card-item__num">{{totalData.book.no_return}}</div>
<div class="progress-card-item__label">未归还</div>
</div>
<div class="progress-card-item">
<div class="progress-card-item__num">{{totalData.book.rate+'%'}}</div>
<div class="progress-card-item__label">{{(totalData.book.rate>0?'上升':(totalData.book.rate===0?'-':'下降'))}}</div>
</div>
</div>
</el-card>
</template>
<script>
import { httpCurl } from "@/api/out";
export default {
name: "card5",
layout: {
x: 0,
y: 0,
w: 4,
h: 5,
i: "6",
name: "图书统计",
},
data() {
return {
select: {
token: '',
date: this.$moment(new Date()).format('YYYY-MM'),
},
statistic: {
progress: {},
},
totalData: {
book: {
no_return: 0,
total: 0,
rate: 0
}
}
};
},
methods: {
changeMonth (e) {
this.date = e;
this.getStatic();
},
async getToken () {
if(/^\/system/.test(this.$route.path)) return
const token = await httpCurl({
id: this.$store.state.user.userId,
username: this.$store.state.user.username,
},true,"","POST",`${process.env['VUE_APP_OUT_Book']}/api/admin/auth/oss-login`)
this.token = token.access_token
},
async getStatic() {
if(/^\/system/.test(this.$route.path)) return
const res = await httpCurl(
{
token: this.token,
date: this.date
},
true,
"",
"post",
`${process.env['VUE_APP_OUT_Book']}/api/admin/other/chart-total`
);
this.totalData = res;
},
},
computed: {},
async created() {
await this.getToken();
await this.getStatic();
},
};
</script>
<style scoped lang="scss">
.progress-card {
display: flex;
&-item {
text-align: center;
flex: 1;
&__label {
font-size: 14px;
}
&__num {
font-size: 20px;
font-weight: 600;
padding: 6px 0;
}
}
}
</style>

@ -0,0 +1,126 @@
<template>
<el-card class="box-card" shadow="hover">
<div slot="header" class="clearfix">
<span style="border-left: 3px solid #338de3ff; padding-left: 6px"
>图书借阅统计</span
>
<DatePicker
transfer
:value="select.date"
placeholder="选择所属年份"
placement="bottom"
style="width: 130px; float: right"
type="month"
format
@on-change="changeMonth"
></DatePicker>
</div>
<div class="progress-card">
<div class="progress-card-item">
<div class="progress-card-item__num">{{ totalData.borrow.total }}</div>
<div class="progress-card-item__label">借出</div>
</div>
<div class="progress-card-item">
<div class="progress-card-item__num">
{{ totalData.borrow.rate + "%" }}
</div>
<div class="progress-card-item__label">借出量</div>
</div>
</div>
</el-card>
</template>
<script>
import { httpCurl } from "@/api/out";
export default {
name: "card6",
layout: {
x: 0,
y: 0,
w: 4,
h: 5,
i: "7",
name: "图书借阅统计",
},
data() {
return {
select: {
token: "",
date: this.$moment(new Date()).format("YYYY-MM"),
},
statistic: {
progress: {},
},
totalData: {
borrow: {
no_return: 0,
total: 0,
rate: 0,
},
},
};
},
methods: {
changeMonth(e) {
this.date = e;
this.getStatic();
},
async getToken() {
if (/^\/system/.test(this.$route.path)) return;
const token = await httpCurl(
{
id: this.$store.state.user.userId,
username: this.$store.state.user.username,
},
true,
"",
"POST",
`${process.env["VUE_APP_OUT_Book"]}/api/admin/auth/oss-login`
);
this.token = token.access_token;
},
async getStatic() {
if (/^\/system/.test(this.$route.path)) return;
const res = await httpCurl(
{
token: this.token,
date: this.date,
},
true,
"",
"post",
`${process.env["VUE_APP_OUT_Book"]}/api/admin/other/chart-total`
);
console.log(res);
this.totalData = res;
},
},
computed: {},
async created() {
await this.getToken();
await this.getStatic();
},
};
</script>
<style scoped lang="scss">
.progress-card {
display: flex;
&-item {
text-align: center;
flex: 1;
&__label {
font-size: 14px;
}
&__num {
font-size: 20px;
font-weight: 600;
padding: 6px 0;
}
}
}
</style>

@ -1,119 +0,0 @@
<template>
<el-card id="line-chart-card" class="box-card" shadow="hover">
<div slot="header">
<span style="border-left: 3px solid #338DE3FF;padding-left: 6px;">lineChart</span>
<i class="el-icon-more" style="float: right;font-size: 20px;"></i>
</div>
<div id="line-chart" style="width: 100%;">
</div>
</el-card>
</template>
<script>
import echarts from 'echarts'
import ElementResize from "element-resize-detector";
require('echarts/theme/macarons') // echarts theme
const animationDuration = 6000
export default {
name:'card4',
layout:{
x:6,
y:5,
w:6,
h:4,
i:"4",
name: "lineChart"
},
data() {
return {
height:200,
lineChartOption: {
tooltip: {
trigger: 'axis'
},
legend: {},
xAxis: {
type: 'category',
boundaryGap: false,
data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
},
yAxis: {
type: 'value',
axisLabel: {
formatter: '{value} °C'
}
},
series: [
{
name: 'Highest',
type: 'line',
data: [10, 11, 13, 11, 12, 12, 9],
markPoint: {
data: [
{type: 'max', name: 'Max'},
{type: 'min', name: 'Min'}
]
},
markLine: {
data: [{type: 'average', name: 'Avg'}]
}
},
{
name: 'Lowest',
type: 'line',
data: [1, -2, 2, 5, 3, 2, 0],
markPoint: {
data: [{name: '周最低', value: -2, xAxis: 1, yAxis: -1.5}]
},
markLine: {
data: [
{type: 'average', name: 'Avg'},
[
{
symbol: 'none',
x: '90%',
yAxis: 'max'
},
{
symbol: 'circle',
label: {
position: 'start',
formatter: 'Max'
},
type: 'max',
name: '最高点'
}
]
]
}
}
]
}
}
},
methods: {
initChart(id,options){
let cardDom = document.getElementById('line-chart-card');
let cardTitleH = 58;
let dom = document.getElementById(id)
echarts.init(dom,"macarons").setOption(options)
const elementResize = ElementResize({
strategy:'scroll'
})
elementResize.listenTo(cardDom,ele => {
dom.style.height = cardDom.getBoundingClientRect().height - 40 - cardTitleH + 'px'
echarts.init(dom).resize();
})
}
},
computed: {},
mounted() {
this.initChart('line-chart',this.lineChartOption)
}
}
</script>
<style scoped lang="scss">
</style>

@ -2,7 +2,7 @@
<el-card class="box-card" shadow="hover" id="type-card">
<div slot="header">
<span style="border-left: 3px solid #338de3ff; padding-left: 6px"
>预算类型z执行情况</span
>预算类型执行情况</span
>
<i class="el-icon-more" style="float: right; font-size: 20px"></i>
</div>
@ -26,7 +26,7 @@ export default {
w: 6,
h: 4,
i: "5",
name: "预算类型z执行情况",
name: "预算类型执行情况",
},
inject: {
getStatistic: {

Loading…
Cancel
Save