首页待办提醒

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> </el-dropdown-item>
</router-link> </router-link>
<router-link to="/changepassword"> <router-link to="/myinfo">
<el-dropdown-item divided> <el-dropdown-item divided>
修改密码 个人中心
</el-dropdown-item> </el-dropdown-item>
</router-link> </router-link>
<!-- <a target="_blank" href="https://github.com/PanJiaChen/vue-admin-template/"> <!-- <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, component: Layout,
redirect: '/changepassword', redirect: '/myinfo',
name: 'ChangePW', name: 'myinfo',
meta: { title: '修改密码', icon: 'tree' }, meta: { title: '个人中心', icon: 'tree' },
hidden:true, hidden: true,
children: [ children: [
{ {
path: '', path: '',

View File

@ -58,6 +58,27 @@
<div slot="header" class="clearfix"> <div slot="header" class="clearfix">
<span>待办任务提醒</span> <span>待办任务提醒</span>
</div> </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-card>
</el-col> </el-col>
</el-row> </el-row>
@ -66,7 +87,7 @@
<script> <script>
import { mapGetters } from 'vuex' import { mapGetters } from 'vuex'
import { getRecordtodos } from "@/api/todos"
export default { export default {
name: 'Dashboard', name: 'Dashboard',
computed: { computed: {
@ -75,15 +96,40 @@ export default {
'perms' 'perms'
]) ])
}, },
data(){
return {
todos:{}
}
},
created(){
this.gettodos()
},
methods:{ methods:{
toPath(val) { toPath(val) {
this.$router.push({path: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> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.litem {
margin-bottom: 4px;
.desc {
color: rgba(0, 0, 0, 0.65);
font-weight: bold;
font-size: 16px;
}
}
.dashboard { .dashboard {
&-container { &-container {
margin: 10px; margin: 10px;

View File

@ -113,7 +113,11 @@
<el-table-column label="上报文件"> <el-table-column label="上报文件">
<template slot-scope="scope" v-if="scope.row.files"> <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> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>