对齐需求管理页面表单,修改登录后默认页面
1、需求管理页面的表单重新对齐,增加了title搜索,增加了表格内容筛选; 2、修改了路由守卫,当路由走向"Home"时,跳转到工作台"Desktop"。
This commit is contained in:
		@@ -2,7 +2,7 @@
 | 
			
		||||
 * @Author: Kane
 | 
			
		||||
 * @Date: 2023-01-04 11:30:33
 | 
			
		||||
 * @LastEditors: Kane
 | 
			
		||||
 * @LastEditTime: 2023-01-26 08:10:40
 | 
			
		||||
 * @LastEditTime: 2023-01-28 16:01:49
 | 
			
		||||
 * @FilePath: \admin_system\src\layout\components\Aside.vue
 | 
			
		||||
 * @Description: 
 | 
			
		||||
 * 
 | 
			
		||||
@@ -85,7 +85,9 @@ export default {
 | 
			
		||||
        //获取当前的路由
 | 
			
		||||
        currentPath()
 | 
			
		||||
        {
 | 
			
		||||
            return useRoute().path;
 | 
			
		||||
            let path = useRoute().path;
 | 
			
		||||
 | 
			
		||||
            return path;
 | 
			
		||||
        },
 | 
			
		||||
        //获取导航栏是否折叠的标志
 | 
			
		||||
        asideCollapse()
 | 
			
		||||
@@ -96,8 +98,6 @@ export default {
 | 
			
		||||
    created()
 | 
			
		||||
    {
 | 
			
		||||
        this.routers = useRouter().options.routes;
 | 
			
		||||
 | 
			
		||||
        console.log(this.routers);
 | 
			
		||||
    }
 | 
			
		||||
};
 | 
			
		||||
</script>
 | 
			
		||||
 
 | 
			
		||||
@@ -2,7 +2,7 @@
 | 
			
		||||
 * @Author: Kane
 | 
			
		||||
 * @Date: 2022-12-14 15:12:46
 | 
			
		||||
 * @LastEditors: Kane
 | 
			
		||||
 * @LastEditTime: 2023-01-25 23:33:05
 | 
			
		||||
 * @LastEditTime: 2023-01-28 16:00:58
 | 
			
		||||
 * @FilePath: \admin_system\src\router\index.js
 | 
			
		||||
 * @Description: 定义应用路由配置
 | 
			
		||||
 * 
 | 
			
		||||
@@ -179,6 +179,7 @@ router.beforeEach((to) =>
 | 
			
		||||
{
 | 
			
		||||
  const token = window.localStorage.getItem("token");
 | 
			
		||||
 | 
			
		||||
  //先检查token
 | 
			
		||||
  if (!token)
 | 
			
		||||
  {
 | 
			
		||||
    //如果token不存在,判断路由是否走向login,如果不是则指向login
 | 
			
		||||
@@ -190,6 +191,16 @@ router.beforeEach((to) =>
 | 
			
		||||
      };
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  //修改默认打开的页面,跳向工作台
 | 
			
		||||
  if (to.name === "Home")
 | 
			
		||||
  {
 | 
			
		||||
    console.log("跳向工作台");
 | 
			
		||||
 | 
			
		||||
    return {
 | 
			
		||||
      name: "DeskTop",
 | 
			
		||||
    };
 | 
			
		||||
  }
 | 
			
		||||
});
 | 
			
		||||
 | 
			
		||||
export default router;
 | 
			
		||||
 
 | 
			
		||||
@@ -2,14 +2,56 @@
 | 
			
		||||
 * @Author: Kane
 | 
			
		||||
 * @Date: 2023-01-06 15:30:12
 | 
			
		||||
 * @LastEditors: Kane
 | 
			
		||||
 * @LastEditTime: 2023-01-07 20:37:55
 | 
			
		||||
 * @LastEditTime: 2023-01-28 09:44:31
 | 
			
		||||
 * @FilePath: \admin_system\src\views\overview\OverView.vue
 | 
			
		||||
 * @Description: 
 | 
			
		||||
 * 
 | 
			
		||||
 * Copyright (c) ${2022} by Kane, All Rights Reserved. 
 | 
			
		||||
-->
 | 
			
		||||
<template>
 | 
			
		||||
    <div class="fill"></div>
 | 
			
		||||
    <el-form :inline="true" label-width="5em" class="query_form">
 | 
			
		||||
        <el-row :gutter="10">
 | 
			
		||||
            <el-col :span="7">
 | 
			
		||||
                <el-form-item label="需求编号">
 | 
			
		||||
                    <el-input style="width:100%;"></el-input>
 | 
			
		||||
                </el-form-item>
 | 
			
		||||
            </el-col>
 | 
			
		||||
            <el-col :span="7">
 | 
			
		||||
                <el-form-item label="标题">
 | 
			
		||||
                    <el-input style="width:100%;"></el-input>
 | 
			
		||||
                </el-form-item>
 | 
			
		||||
            </el-col>
 | 
			
		||||
            <el-col :span="7">
 | 
			
		||||
                <el-form-item label="提交人">
 | 
			
		||||
                    <el-input style="width:100%;"></el-input>
 | 
			
		||||
                </el-form-item>
 | 
			
		||||
            </el-col>
 | 
			
		||||
            <el-col :span="3"></el-col>
 | 
			
		||||
        </el-row>
 | 
			
		||||
        <el-row :gutter="10">
 | 
			
		||||
            <el-col :span="7">
 | 
			
		||||
                <el-form-item label="状态">
 | 
			
		||||
                    <el-select style="width:100%;">
 | 
			
		||||
                        <el-option key="部门审批" value="部门审批"></el-option>
 | 
			
		||||
                        <el-option key="需求分析" value="需求分析">需求分析</el-option>
 | 
			
		||||
                        <el-option key="技术开发" value="技术开发">技术开发</el-option>
 | 
			
		||||
                        <el-option key="被退回" value="被退回"></el-option>
 | 
			
		||||
                    </el-select>
 | 
			
		||||
                </el-form-item>
 | 
			
		||||
            </el-col>
 | 
			
		||||
            <el-col :span="7">
 | 
			
		||||
                <el-form-item label="提交日期">
 | 
			
		||||
                    <el-date-picker style="width:100%;"></el-date-picker>
 | 
			
		||||
                </el-form-item>
 | 
			
		||||
            </el-col>
 | 
			
		||||
            <el-col :span="7">
 | 
			
		||||
                <el-form-item label="至">
 | 
			
		||||
                    <el-date-picker style="width:100%;"></el-date-picker>
 | 
			
		||||
                </el-form-item>
 | 
			
		||||
            </el-col>
 | 
			
		||||
            <el-col :span="3"></el-col>
 | 
			
		||||
        </el-row>
 | 
			
		||||
    </el-form>
 | 
			
		||||
</template>
 | 
			
		||||
 | 
			
		||||
<script>
 | 
			
		||||
@@ -19,9 +61,7 @@ export default {
 | 
			
		||||
</script>
 | 
			
		||||
 | 
			
		||||
<style scoped>
 | 
			
		||||
.fill {
 | 
			
		||||
    border: 1px solid salmon;
 | 
			
		||||
    height: 2000px;
 | 
			
		||||
    width: 100%;
 | 
			
		||||
.query_form {
 | 
			
		||||
    max-width: 63em;
 | 
			
		||||
}
 | 
			
		||||
</style>
 | 
			
		||||
@@ -2,7 +2,7 @@
 | 
			
		||||
 * @Author: Kane
 | 
			
		||||
 * @Date: 2023-01-25 23:13:47
 | 
			
		||||
 * @LastEditors: Kane
 | 
			
		||||
 * @LastEditTime: 2023-01-27 00:26:34
 | 
			
		||||
 * @LastEditTime: 2023-01-28 15:08:25
 | 
			
		||||
 * @FilePath: \admin_system\src\views\requirement\RequirementManager.vue
 | 
			
		||||
 * @Description: 
 | 
			
		||||
 * 
 | 
			
		||||
@@ -11,6 +11,14 @@
 | 
			
		||||
<template>
 | 
			
		||||
    <div class="requirement_wrapper">
 | 
			
		||||
        <div class="search-box">
 | 
			
		||||
            <el-row :gutter="10">
 | 
			
		||||
                <el-col :span="2">
 | 
			
		||||
                    <span>标题:</span>
 | 
			
		||||
                </el-col>
 | 
			
		||||
                <el-col :span="16">
 | 
			
		||||
                    <el-input></el-input>
 | 
			
		||||
                </el-col>
 | 
			
		||||
            </el-row>
 | 
			
		||||
            <el-row :gutter="10">
 | 
			
		||||
                <el-col :span="2">
 | 
			
		||||
                    <span>需求编号:</span>
 | 
			
		||||
@@ -28,7 +36,10 @@
 | 
			
		||||
                    <span>状态:</span>
 | 
			
		||||
                </el-col>
 | 
			
		||||
                <el-col :span="4">
 | 
			
		||||
                    <el-input v-model="query_param.status"></el-input>
 | 
			
		||||
                    <!-- <el-input v-model="query_param.status"></el-input> -->
 | 
			
		||||
                    <el-select multiple collapse-tags collapse-tags-tooltip v-model="query_param.status">
 | 
			
		||||
                        <el-option v-for="option in requirement_status" :value="option" :key="option"></el-option>
 | 
			
		||||
                    </el-select>
 | 
			
		||||
                </el-col>
 | 
			
		||||
                <el-col :span="6"></el-col>
 | 
			
		||||
            </el-row>
 | 
			
		||||
@@ -54,15 +65,23 @@
 | 
			
		||||
                <el-col :span="6"></el-col>
 | 
			
		||||
            </el-row>
 | 
			
		||||
        </div>
 | 
			
		||||
 | 
			
		||||
        <div class="tool-button-wrapper">
 | 
			
		||||
            <el-row>
 | 
			
		||||
            <el-row :gutter="10">
 | 
			
		||||
                <el-col :span="4">
 | 
			
		||||
                    <el-button type="success" icon="DocumentAdd" plain>新增</el-button>
 | 
			
		||||
                    <el-button type="warning" icon="document" plain>导出</el-button>
 | 
			
		||||
                    <div class="button-wrapper-left">
 | 
			
		||||
                        <el-button type="success" icon="DocumentAdd" plain>新增</el-button>
 | 
			
		||||
                        <el-button type="warning" icon="document" plain>导出</el-button>
 | 
			
		||||
                    </div>
 | 
			
		||||
                </el-col>
 | 
			
		||||
                <el-col :span="20">
 | 
			
		||||
                    <span>是否显示已完成需求:</span>
 | 
			
		||||
                    <div class="table-display-wrapper">
 | 
			
		||||
                        <span>结果筛选:</span>
 | 
			
		||||
                        <div class="result-filter-wrapper">
 | 
			
		||||
                            <el-checkbox-button label="已完成" checked></el-checkbox-button>
 | 
			
		||||
                            <el-checkbox-button label="已取消" checked></el-checkbox-button>
 | 
			
		||||
                            <el-checkbox-button label="被退回" checked></el-checkbox-button>
 | 
			
		||||
                        </div>
 | 
			
		||||
                    </div>
 | 
			
		||||
                </el-col>
 | 
			
		||||
            </el-row>
 | 
			
		||||
        </div>
 | 
			
		||||
@@ -115,7 +134,9 @@ export default {
 | 
			
		||||
                submit_end_date: "",
 | 
			
		||||
                status: "",
 | 
			
		||||
            },
 | 
			
		||||
 | 
			
		||||
            requirement_status: [
 | 
			
		||||
                "未提交", "部门审核", "需求分析", "技术开发", "待发布", "已发布", "被退回",
 | 
			
		||||
            ]
 | 
			
		||||
        };
 | 
			
		||||
    },
 | 
			
		||||
    computed: {
 | 
			
		||||
@@ -149,7 +170,7 @@ export default {
 | 
			
		||||
 | 
			
		||||
<style scoped>
 | 
			
		||||
.search-box {
 | 
			
		||||
    /* padding: 15px 10px; */
 | 
			
		||||
    padding: 0 10px;
 | 
			
		||||
    /* background-color: #fff; */
 | 
			
		||||
    /* border-radius: 5px; */
 | 
			
		||||
    /* box-shadow: 0px 0px 20px -10px rgb(14 18 22 / 25%); */
 | 
			
		||||
@@ -158,7 +179,7 @@ export default {
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
.search-box span {
 | 
			
		||||
    font-weight: bold;
 | 
			
		||||
    font-weight: normal;
 | 
			
		||||
    display: block;
 | 
			
		||||
    text-align: right;
 | 
			
		||||
    font-size: 15px;
 | 
			
		||||
@@ -178,14 +199,20 @@ export default {
 | 
			
		||||
/* .el-date-picker {
 | 
			
		||||
    width: 100%;
 | 
			
		||||
} */
 | 
			
		||||
 | 
			
		||||
.button-wrapper-right {
 | 
			
		||||
    display: flex;
 | 
			
		||||
    justify-content: right;
 | 
			
		||||
    align-items: center;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
.button-wrapper-left {
 | 
			
		||||
    display: flex;
 | 
			
		||||
    justify-content: left;
 | 
			
		||||
    align-items: center;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
.requirement_wrapper {
 | 
			
		||||
    padding: 15px 15px;
 | 
			
		||||
    padding: 15px 10px;
 | 
			
		||||
    background-color: #fff;
 | 
			
		||||
    border-radius: 5px;
 | 
			
		||||
    box-shadow: 0px 0px 20px -10px rgb(14 18 22 / 25%);
 | 
			
		||||
@@ -200,9 +227,36 @@ export default {
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
.tool-button-wrapper {
 | 
			
		||||
    padding-left: 15px;
 | 
			
		||||
    padding: 0px 15px;
 | 
			
		||||
    width: 100%;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
.tool-button-wrapper>.el-row {
 | 
			
		||||
    display: flex;
 | 
			
		||||
    align-items: center;
 | 
			
		||||
    justify-content: left;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
.tool-button-wrapper span {
 | 
			
		||||
    font-weight: small;
 | 
			
		||||
    display: block;
 | 
			
		||||
    text-align: right;
 | 
			
		||||
    font-size: 15px;
 | 
			
		||||
    color: #5f5f5f;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
.tool-button-wrapper .el-checkbox {
 | 
			
		||||
    font-size: 15px;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
.table-display-wrapper {
 | 
			
		||||
    display: flex;
 | 
			
		||||
    align-items: center;
 | 
			
		||||
    justify-content: right;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
.result-filter-wrapper {
 | 
			
		||||
    padding: 0 5px;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/* 需求列表 */
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user