master
lion 1 year ago
parent 18b36e7a0c
commit 0ff943145e

@ -52,7 +52,23 @@
</div>
</div>
</div>
<div class="box box4" @click="toUrl">
<div class="box box5" @click="toUrl(2)">
<div class="boxtitle">
<span>预警提醒</span>
<i class="el-icon-warning-outline statIcon"></i>
</div>
<div class="bline"></div>
<div class="boxcontentsubtitle">总数</div>
<div class="boxcontent">
<div class="boxcontentitem">
<div class="boxcontentitem-big">
<count-to separator="" :start-val="0" :end-val="totaldata.dateTotal"
:duration="3000" />
</div>
</div>
</div>
</div>
<div class="box box4" @click="toUrl(1)">
<div class="boxtitle">
<span>到期提醒</span>
<i class="el-icon-warning statIcon"></i>
@ -62,12 +78,13 @@
<div class="boxcontent">
<div class="boxcontentitem">
<div class="boxcontentitem-big">
<count-to separator="" :start-val="0" :end-val="totaldata.dateTotal"
<count-to separator="" :start-val="0" :end-val="totaldata.status1Total"
:duration="3000" />
</div>
</div>
</div>
</div>
</div>
</div>
@ -87,6 +104,7 @@
recordsTotal:0,
organizesTotal:0,
areasTotal:0,
status1Total:0,
dateTotal:0
}
}
@ -98,11 +116,14 @@
handleRoute(type) {
this.$emit('handleRoute', type)
},
toUrl(){
if(this.totaldata.dateTotal>0){
toUrl(type){
if(type==1 && this.totaldata.status1Total>0){
this.$router.push('/record/index?status1Total=1')
}
if(type==2 && this.totaldata.dateTotal>0){
this.$router.push('/record/index?dateTotal=1')
}
},
toCaculateper(f1, f2) {
return ((f1 / (f2 == 0 ? 1 : f2)) * 100).toFixed(2) + "%"
@ -145,7 +166,7 @@
.box {
position: relative;
width: 24%;
width: 19%;
// margin-left: 0.5%;
// margin-right: 0.5%;
margin-bottom: 10px;
@ -267,18 +288,31 @@
}
}
.box4 {
.box5 {
background: linear-gradient(-55deg, #64A48E, #9ECABB);
background: linear-gradient(-55deg, #ee6666, #ae6666);
.boxcline {
width: 100%;
background: #9ECABB;
background: #ae6666;
height: 0.125rem;
margin-top: 1.25rem;
margin-bottom: 1.25rem;
}
}
.box4 {
background: linear-gradient(-55deg, #53241d,#b3241d);
.boxcline {
width: 100%;
background: #b3241d;
height: 0.125rem;
margin-top: 1.25rem;
margin-bottom: 1.25rem;
}
}
.panel-group {
// margin-top: 18px;

@ -39,6 +39,7 @@
recordsTotal: 0,
organizesTotal: 0,
areasTotal: 0,
status1Total:0,
dateTotal:0
},
nowDate:'',
@ -52,26 +53,57 @@
created() {
this.listHome()
this.init()
this.getList()
this.getList()
this.getStatusList()
},
mounted() {
},
methods: {
//
async getList() {
// this.nowDate = this.$moment().format("YYYY-MM-DD")
// this.nowDate = this.$moment().add(1, 'months').format('YYYY-MM-DD')
// this.startDate = this.$moment('1900-01-01').format("YYYY-MM-DD")
this.nowDate = this.$moment().add(1, 'months').format('YYYY-MM-DD')
this.startDate = this.$moment('1900-01-01').format("YYYY-MM-DD")
// console.log("this.nowDate",this.nowDate,this.startDate)
const res = await index({
page_size: 9999,
page: 1,
table_name: 'records',
is_auth: 1,
catalogs_id: '',
records_status:1
// catalogs_id: '',
// records_status:1
filter:[{
key:'status',
op:'eq',
value:0
},{
key:'end_date',
op:'range',
value:[this.startDate,this.nowDate]
}]
})
this.list.dateTotal = res.total
},
async getStatusList() {
// this.nowDate = this.$moment().format("YYYY-MM-DD")
this.nowDate = this.$moment().add(1, 'months').format('YYYY-MM-DD')
this.startDate = this.$moment('1900-01-01').format("YYYY-MM-DD")
// console.log("this.nowDate",this.nowDate,this.startDate)
const res = await index({
page_size: 9999,
page: 1,
table_name: 'records',
is_auth: 1,
// catalogs_id: '',
// records_status:1
filter:[{
key:'status',
op:'eq',
value:1
}]
})
this.list.status1Total = res.total
},
async listHome() {
const res = await home()

@ -40,7 +40,7 @@
<template v-slot:end_date>
<div class="xy-table-item">
<div class="xy-table-item-label" style="font-weight: bold">
<span style="color: red;font-weight: bold;padding-right: 4px;">*</span>结束日期
<span style="color: red;font-weight: bold;padding-right: 4px;"></span>结束日期
</div>
<div class="xy-table-item-content">
<el-date-picker v-model="form.end_date" style="width:100%" format="yyyy-MM-dd" value-format="yyyy-MM-dd"
@ -206,12 +206,12 @@
}],
date: [{
required: true,
message: '请输入标题'
}],
end_date: [{
required: true,
message: '请输入标题'
message: '请输入开始日期'
}],
// end_date: [{
// required: true,
// message: ''
// }],
// tag_ids: [{
// required: true,
// message: ''

@ -40,7 +40,7 @@
<template v-slot:end_date>
<div class="xy-table-item">
<div class="xy-table-item-label" style="font-weight: bold">
<span style="color: red;font-weight: bold;padding-right: 4px;">*</span>结束日期
<span style="color: red;font-weight: bold;padding-right: 4px;"></span>结束日期
</div>
<div class="xy-table-item-content">
<el-date-picker v-model="form.end_date" style="width:100%" format="yyyy-MM-dd" value-format="yyyy-MM-dd"
@ -195,12 +195,12 @@
}],
date: [{
required: true,
message: '请输入标题'
}],
end_date: [{
required: true,
message: '请输入标题'
message: '请输入开始日期'
}],
// end_date: [{
// required: true,
// message: ''
// }],
// tag_ids: [{
// required: true,
// message: ''

@ -398,7 +398,7 @@
},
created() {
//
this.nowDate = this.$moment().format("YYYY-MM-DD")
this.nowDate = this.$moment().add(1, 'months').format('YYYY-MM-DD')
this.startDate = this.$moment('1900-01-01').format("YYYY-MM-DD")
this.stateObj = state.state
this.is_search = false
@ -407,10 +407,13 @@
this.is_search = true
}
if (this.$route.query.dateTotal) {
// this.select.endRange = [this.startDate, this.nowDate]
// this.select.status = 0
this.select.records_status = 1
this.select.endRange = [this.startDate, this.nowDate]
this.select.status = 0
this.is_search = true
}
if(this.$route.query.status1Total){
this.select.status = 1
this.is_search = true
}
// this.getCatalogList()
//

@ -25,7 +25,7 @@ module.exports = {
* Detail: https://cli.vuejs.org/config/#publicpath
*/
publicPath: process.env.ENV === 'staging' ? '/admin_test' : '/admin',
outputDir: '/Users/mac/Documents/朗业/2024/s-四世同堂-档案/sstt_dangan/public/admin',
outputDir: '/Users/mac/Documents/朗业/2024/s-四世同堂-档案/sstt_dangan/public/admin_test',
assetsDir: 'static',
css: {
loaderOptions: { // 向 CSS 相关的 loader 传递选项

Loading…
Cancel
Save