首页待办提醒

This commit is contained in:
caoqianming 2021-03-18 13:14:10 +08:00
parent a9a60c2c00
commit 7dec4ca553
5 changed files with 67 additions and 9 deletions

8
client/src/api/todos.js Normal file
View File

@ -0,0 +1,8 @@
import request from '@/utils/request'
export function getRecordtodos() {
return request({
url: '/supervision/record/todos/',
method: 'get'
})
}

View File

@ -19,9 +19,9 @@
首页
</el-dropdown-item>
</router-link>
<router-link to="/changepassword">
<router-link to="/myinfo">
<el-dropdown-item divided>
修改密码
个人中心
</el-dropdown-item>
</router-link>
<!-- <a target="_blank" href="https://github.com/PanJiaChen/vue-admin-template/">

View File

@ -247,12 +247,12 @@ export const asyncRoutes = [
]
},
{
path: '/changepassword',
path: '/myinfo',
component: Layout,
redirect: '/changepassword',
name: 'ChangePW',
meta: { title: '修改密码', icon: 'tree' },
hidden:true,
redirect: '/myinfo',
name: 'myinfo',
meta: { title: '个人中心', icon: 'tree' },
hidden: true,
children: [
{
path: '',

View File

@ -58,6 +58,27 @@
<div slot="header" class="clearfix">
<span>待办任务提醒</span>
</div>
<div class="litem" @click="goto('toup')">
<el-link class="desc">
您有
<span style="color:red">{{todos.toup}}</span>
条记录待上报
</el-link>
</div>
<div class="litem">
<el-link class="desc" @click="goto('tozg')">
您有
<span style="color:red">{{todos.tozg}}</span>
条记录待整改
</el-link>
</div>
<div class="litem" @click="goto('toconfirm')">
<el-link class="desc" v-if="todos.toconfirm">
您有
<span style="color:red">{{todos.toconfirm}}</span>
条记录待确认
</el-link>
</div>
</el-card>
</el-col>
</el-row>
@ -66,7 +87,7 @@
<script>
import { mapGetters } from 'vuex'
import { getRecordtodos } from "@/api/todos"
export default {
name: 'Dashboard',
computed: {
@ -75,15 +96,40 @@ export default {
'perms'
])
},
data(){
return {
todos:{}
}
},
created(){
this.gettodos()
},
methods:{
toPath(val) {
this.$router.push({path:val})
},
gettodos() {
getRecordtodos().then(res=>{
this.todos = res.data
})
},
goto(tab){
this.$router.push({name: "Report", params: { tab: tab }, })
}
}
}
</script>
<style lang="scss" scoped>
.litem {
margin-bottom: 4px;
.desc {
color: rgba(0, 0, 0, 0.65);
font-weight: bold;
font-size: 16px;
}
}
.dashboard {
&-container {
margin: 10px;

View File

@ -113,7 +113,11 @@
<el-table-column label="上报文件">
<template slot-scope="scope" v-if="scope.row.files">
<el-link v-if="scope.row.files.length>1">{{scope.row.files.length}}个文件</el-link>
<el-link v-if="scope.row.files.length>1">{{scope.row.files.length}}个文件</el-link>
<div v-else v-for="item in scope.row.files_" v-bind:key="item.id">
<el-link :href="item.path" type="primary">{{ item.name }}</el-link>
</div>
</template>
</el-table-column>
</el-table>