From 034cb3a4c10c7ff0b50cfc83e210e462d858ce72 Mon Sep 17 00:00:00 2001
From: 马宇豪 <978517621@qq.com>
Date: 星期三, 22 三月 2023 17:21:56 +0800
Subject: [PATCH] 修改页码样式
---
src/views/intellectInspect/inspectTaskManage/inspectTask/index.vue | 82 ++++++++++++++++++++++++++++++++---------
1 files changed, 64 insertions(+), 18 deletions(-)
diff --git a/src/views/intellectInspect/inspectTaskManage/inspectTask/index.vue b/src/views/intellectInspect/inspectTaskManage/inspectTask/index.vue
index d897b89..5feb9f9 100644
--- a/src/views/intellectInspect/inspectTaskManage/inspectTask/index.vue
+++ b/src/views/intellectInspect/inspectTaskManage/inspectTask/index.vue
@@ -1,12 +1,19 @@
<template>
<div class="home-container">
- <div style="height: 100%">
+ <div style="height: 100%;display: flex;flex-direction: column;align-items: stretch;">
<el-row class="homeCard">
<div class="basic-line">
<span>任务类型:</span>
<el-select v-model="tableData.params.workType" clearable filterable class="input-box" placeholder="任务类型">
<el-option v-for="item in workTypeList" :key="item.id" :label="item.name" :value="item.id"></el-option>
</el-select>
+ </div>
+ <div class="basic-line">
+ <span>部门:</span>
+ <el-cascader class="input-box" :options="departmentList" :props="{ emitPath: false, checkStrictly: true, value: 'depId', label: 'depName' }"
+ placeholder="请选择部门" clearable v-model="tableData.params.execDepId"
+ @change="changeGroup"
+ > </el-cascader>
</div>
<div class="basic-line">
<span>执行班组:</span>
@@ -143,6 +150,7 @@
params: {
pageIndex: number | null;
pageSize: number | null;
+ execDepId: number | null;
unitName: string | null;
workType: number | null;
createUserId: number | null;
@@ -182,6 +190,7 @@
pageIndex: 1,
pageSize: 10,
unitName: null,
+ execDepId: null,
workType: null,
createUserId: null,
execClassgroupId: null,
@@ -205,7 +214,7 @@
{ id: 3, name: '日' },
{ id: 4, name: '月' },
{ id: 5, name: '年' }
- ]
+ ],
});
//获取巡检任务数据
@@ -236,17 +245,29 @@
};
//获取部门
- const getQuotaList = async () => {
- let res = await inspectTaskApi().getQuotaList();
- if (res.data.code === '200') {
- state.quotaList = res.data.data;
- } else {
- ElMessage({
- type: 'warning',
- message: res.data.msg
- });
- }
- };
+ // const getQuotaList = async () => {
+ // let res = await inspectTaskApi().getQuotaList();
+ // if (res.data.code === '200') {
+ // state.quotaList = res.data.data;
+ // } else {
+ // ElMessage({
+ // type: 'warning',
+ // message: res.data.msg
+ // });
+ // }
+ // };
+ //获取部门
+ const getQuotaList = async () => {
+ let res = await inspectTaskApi().getAllQuotaList();
+ if (res.data.code === '200') {
+ state.quotaList = res.data.data;
+ } else {
+ ElMessage({
+ type: 'warning',
+ message: res.data.msg
+ });
+ }
+ };
//获取巡检点
const getInspectTaskPoint = async () => {
@@ -297,6 +318,19 @@
type: 'warning',
message: res.data.msg
});
+ }
+ };
+
+ const changeGroup = async () => {
+ if(state.tableData.params.execDepId === null) {
+ state.classGroupList = []
+ }else{
+ let res = await departmentApi().getByDepId({depId:state.tableData.params.execDepId})
+ if(res.data.code === '200'){
+ state.classGroupList = res.data.data
+ }else{
+
+ }
}
};
@@ -407,6 +441,7 @@
pageIndex: 1,
pageSize: 10,
unitName: null,
+ execDepId: null,
workType: null,
createUserId: null,
execClassgroupId: null,
@@ -434,6 +469,7 @@
Plus,
reset,
changeStatus,
+ changeGroup,
parseNumber,
deleteInspectTask,
getInspectionTask,
@@ -453,12 +489,14 @@
height: calc(100vh - 144px);
box-sizing: border-box;
overflow: hidden;
+ position: relative;
.homeCard {
width: 100%;
padding: 20px;
box-sizing: border-box;
background: #fff;
border-radius: 4px;
+ flex: 0 auto;
.main-card {
width: 100%;
@@ -473,10 +511,18 @@
}
}
.pageBtn {
- height: 60px;
- display: flex;
- align-items: center;
- justify-content: right;
+ position: absolute;
+ width: 100%;
+ z-index: 99;
+ bottom: 0;
+ right: 0;
+ height: 60px;
+ border-radius: 0 0 4px 4px;
+ padding-right: 20px;
+ background: #fff;
+ display: flex;
+ align-items: center;
+ justify-content: right;
.demo-pagination-block + .demo-pagination-block {
margin-top: 10px;
@@ -487,7 +533,7 @@
}
}
&:last-of-type {
- height: calc(100% - 100px);
+ flex: 1;
}
}
.el-row {
--
Gitblit v1.9.2