master
lion 1 year ago
parent 18b36e7a0c
commit 0ff943145e

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

@ -39,6 +39,7 @@
recordsTotal: 0, recordsTotal: 0,
organizesTotal: 0, organizesTotal: 0,
areasTotal: 0, areasTotal: 0,
status1Total:0,
dateTotal:0 dateTotal:0
}, },
nowDate:'', nowDate:'',
@ -53,26 +54,57 @@
this.listHome() this.listHome()
this.init() this.init()
this.getList() this.getList()
this.getStatusList()
}, },
mounted() { mounted() {
}, },
methods: { methods: {
//
async getList() { async getList() {
// this.nowDate = this.$moment().format("YYYY-MM-DD") // this.nowDate = this.$moment().format("YYYY-MM-DD")
// this.nowDate = this.$moment().add(1, 'months').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.startDate = this.$moment('1900-01-01').format("YYYY-MM-DD")
// console.log("this.nowDate",this.nowDate,this.startDate) // console.log("this.nowDate",this.nowDate,this.startDate)
const res = await index({ const res = await index({
page_size: 9999, page_size: 9999,
page: 1, page: 1,
table_name: 'records', table_name: 'records',
is_auth: 1, is_auth: 1,
catalogs_id: '', // catalogs_id: '',
records_status:1 // 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 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() { async listHome() {
const res = await home() const res = await home()
this.list.recordsTotal = res?.recordsTotal this.list.recordsTotal = res?.recordsTotal

@ -40,7 +40,7 @@
<template v-slot:end_date> <template v-slot:end_date>
<div class="xy-table-item"> <div class="xy-table-item">
<div class="xy-table-item-label" style="font-weight: bold"> <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>
<div class="xy-table-item-content"> <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" <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: [{ date: [{
required: true, required: true,
message: '请输入标题' message: '请输入开始日期'
}],
end_date: [{
required: true,
message: '请输入标题'
}], }],
// end_date: [{
// required: true,
// message: ''
// }],
// tag_ids: [{ // tag_ids: [{
// required: true, // required: true,
// message: '' // message: ''

@ -40,7 +40,7 @@
<template v-slot:end_date> <template v-slot:end_date>
<div class="xy-table-item"> <div class="xy-table-item">
<div class="xy-table-item-label" style="font-weight: bold"> <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>
<div class="xy-table-item-content"> <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" <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: [{ date: [{
required: true, required: true,
message: '请输入标题' message: '请输入开始日期'
}],
end_date: [{
required: true,
message: '请输入标题'
}], }],
// end_date: [{
// required: true,
// message: ''
// }],
// tag_ids: [{ // tag_ids: [{
// required: true, // required: true,
// message: '' // message: ''

@ -398,7 +398,7 @@
}, },
created() { 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.startDate = this.$moment('1900-01-01').format("YYYY-MM-DD")
this.stateObj = state.state this.stateObj = state.state
this.is_search = false this.is_search = false
@ -407,9 +407,12 @@
this.is_search = true this.is_search = true
} }
if (this.$route.query.dateTotal) { if (this.$route.query.dateTotal) {
// this.select.endRange = [this.startDate, this.nowDate] this.select.endRange = [this.startDate, this.nowDate]
// this.select.status = 0 this.select.status = 0
this.select.records_status = 1 this.is_search = true
}
if(this.$route.query.status1Total){
this.select.status = 1
this.is_search = true this.is_search = true
} }
// this.getCatalogList() // this.getCatalogList()

@ -25,7 +25,7 @@ module.exports = {
* Detail: https://cli.vuejs.org/config/#publicpath * Detail: https://cli.vuejs.org/config/#publicpath
*/ */
publicPath: process.env.ENV === 'staging' ? '/admin_test' : '/admin', 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', assetsDir: 'static',
css: { css: {
loaderOptions: { // 向 CSS 相关的 loader 传递选项 loaderOptions: { // 向 CSS 相关的 loader 传递选项

Loading…
Cancel
Save