当前位置:网站首页>Project training 13 - Interface supplement
Project training 13 - Interface supplement
2022-06-10 23:14:00 【ScarlettWX】
The welcome interface on the front end of the administrator has only one published dynamic rotation box, which is too monotonous , I added three more widgets .
- element UI The progress bar
element UI The progress bar can visually display the scale . Add a progress bar on the home page to display the number of applications processed by the administrator , The progress bar is in a el-card In component , Specific figures are shown below . The front-end code is as follows :
<el-card class="box-card" style=" margin-top: 15px">
<div slot="header" class="clearfix">
<span style="float: left"> Processed application </span>
<el-button style="float: right; padding: 3px 0" type="text" @click="jumpToHA"> Processing applications </el-button>
</div>
<div class="text item">
<el-row>
<el-progress :percentage=percentage ></el-progress>
</el-row>
<el-row><span> </span></el-row>
<el-row><span> </span></el-row>
<el-row>
<span style="float: left"> Number of outstanding applications :{
{
this.noHandle}}</span>
</el-row>
<el-row><span> </span></el-row>
<el-row>
<span style="float: left"> Number of applications processed :{
{
this.alHandle}}</span>
</el-row>
<el-row><span> </span></el-row>
<el-row>
<span style="float: left"> Total number of applications :{
{
this.twHandle}}</span>
</el-row>
</div>
</el-card>
<script>
countApp(){
let _this = this;
axios.get(`api/getAllApplicationList`).then(function (response) {
let result = response.data;
let totalNA=0;
let totalCount=0;
for (let i = 0;i < result.length;i++) {
if(result[i].apg === 2){
totalNA=totalNA+1;
}
totalCount=totalCount+1;
}
_this.noHandle=totalNA;
console.log(" Number of outstanding applications :"+_this.noHandle)
_this.twHandle=totalCount;
console.log(" Total number of applications :"+_this.twHandle)
_this.alHandle=totalCount-totalNA;
console.log(" Number of applications processed :"+_this.alHandle)
_this.percentage=(_this.alHandle/_this.twHandle*100).toFixed(1)
console.log(" percentage :"+_this.percentage)
});
</script>
stay created Partial call this.countApp(), The progress bar is also loaded when the page is loaded .
2. Add a calendar to the page
element UI Provides a calendar component , But the size of the calendar has been fixed . In order to adapt to the size of the home page , Can be in style Use in /deep/ Depth selector to change element UI Style of component . The code is as follows :
/deep/ .el-calendar-table .el-calendar-day{
width: 50px;
height: 50px;
}
Introduction of calendar components :
<el-card class="box-card" style=" margin-top: 15px">
<el-calendar v-model="value">
</el-calendar>
</el-card>
stay data() Of return In a statement value: new Date().
- Quick module
Click the icon in the shortcut module to call the corresponding interface , This is from<router-link :to="'/0-0'">Component implemented . take icon And text type buttons are placed in this component , Click anywhere in the component to jump . The code is as follows :
<router-link :to="'/0-0'">
<div class="quick_menu_item">
<div class="icon">
<i class="el-icon-circle-plus-outline"></i>
</div>
<div class="text"><el-button type="text" > Processing applications </el-button></div>
</div>
</router-link>
- Arrangement
These components are not the same length , The calendar component is longer , If you follow the normal arrangement , Just put these components together , There will be a large area of blank . have access to el-row and el-col To arrange . In a el-row In the component , That is, in one line , Definition<el-col :span="12">Get the effect of two columns . Then put the calendar on the right , The progress bar and shortcut functions are on the left , Sinister col Divided into two el-row Arrange the two components up and down . Finally, adjust the height of individual components . The renderings are as follows :
边栏推荐
- Laravel8 enables alicloud file upload
- 数据与信息资源共享平台(八)
- Static routing configuration of serial interface in router experiment (Supplement)
- MySQL MVCC 多版本并发控制
- 数据与信息资源共享平台(七)
- Auto.js pro 开发环境配置
- 汇编:汇编与C派系语言混用以及对应LLDB常用指令
- Which securities company does qiniu's securities belong to? Is it safe?
- leetcode 130. Surrounded regions (medium)
- 优化代码去除if-else
猜你喜欢

Design language testing for functional testing: what tests are included in functional testing? What is the role of each

Reptiles learn knowledge
![[006] initial string](/img/0f/4f81013c6c308abf8be453ac26f3d4.png)
[006] initial string

AI智能视频分析EasyCVR平台设备通道批量删除功能的开发实现

Question bank and simulation test of 2022 tea artist (intermediate) operation certificate examination

Array, list, set, map, properties dependency injection format

Redis数据结构

Thread pool: a magic weapon for managing threads

LeetCode+ 21 - 25

HALCON联合C#检测表面缺陷——仿射变换(二)
随机推荐
Sentinel
功能测试之设计语言测试:功能测试包含哪些测试?分别有什么作用
MySQL related -0416
电子协会 C语言 1级 7 、画矩形
Unity code registers events for animation
06151020 mysterious code, waiting for you to decipher
Creation of thread pool
Development and implementation of AI intelligent video analysis easycvr platform device channel batch deletion function
Electronic Society C language level 1 7. Draw rectangle
Vulnhub's DC3
Assembly: assembly mixed with c-faction language and corresponding lldb common instructions
【接口教程】EasyCVR如何通过接口设置平台级联?
Auto. JS Pro development environment configuration
IP反查域名
leetcode 130. Surrounded Regions 被围绕的区域(中等)
聚簇索引和非聚簇索引
Software project management 6.10 Cost budget
Flowable BPMN相关知识
分布式基础
2022最新软件测试面试题常问的30道【持续更新~】