Browse Source

feat: 调整流程组样式 80%

luoyali 1 year ago
parent
commit
d0a88f7ee1

+ 120 - 5
src/views/flow/group/components/listGroup.vue

@@ -5,18 +5,64 @@
 				<div class="group_header_title">{{ item.name }}</div>
 				<div class="group_header_nameOperate">
 					<el-tooltip effect="dark" content="删除" placement="top">
-						<el-icon><Delete /></el-icon>
+						<el-icon :size="16"><Delete /></el-icon>
 					</el-tooltip>
 				</div>
 			</div>
+			<div class="group_body">
+				<ul class="group_list_ul">
+					<div>
+						<li class="group_item flex flex-align-center">
+							<div class="group_itemIcon">
+								<img src="https://lf3-ea.bytetos.com/obj/goofy/ee/approval/approval-admin/image/iconLib/v3/bought.png" />
+							</div>
+							<div class="group_itemLeft">
+								<div class="group_itemNameWrapper flex flex-align-center" style="margin-bottom: 5px">
+									<div class="group_itemName">
+										<span>采购申请</span>
+									</div>
+								</div>
+								<div class="group_itemIntro">各类办公、活动用品采购</div>
+							</div>
+							<div class="group_itemSeeable">全员可见</div>
+							<div class="group_itemOperations">
+								<el-space wrap>
+									<el-tooltip effect="dark" content="编辑" placement="top">
+										<el-icon :size="16"><EditPen /></el-icon>
+									</el-tooltip>
+								</el-space>
+								<el-space wrap>
+									<el-tooltip effect="dark" content="复制" placement="top">
+										<el-icon :size="16"><CopyDocument /></el-icon>
+									</el-tooltip>
+								</el-space>
+								<el-space wrap>
+									<el-tooltip effect="dark" content="禁用" placement="top">
+										<el-icon :size="16"><CircleClose /></el-icon>
+									</el-tooltip>
+								</el-space>
+								<el-space wrap>
+									<el-tooltip effect="dark" content="删除" placement="top">
+										<el-icon :size="16"><Delete /></el-icon>
+									</el-tooltip>
+								</el-space>
+								<el-space wrap>
+									<el-tooltip effect="dark" content="排序" placement="top">
+										<el-icon :size="16"><Operation /></el-icon>
+									</el-tooltip>
+								</el-space>
+							</div>
+						</li>
+					</div>
+				</ul>
+			</div>
 		</div>
 	</div>
 </template>
 
 <script lang="tsx" setup>
-import { Delete } from '@element-plus/icons-vue'
+import { Delete, CircleClose, Operation, EditPen, CopyDocument } from '@element-plus/icons-vue'
 import { ref } from 'vue'
-
 const myArray = ref([
 	{ name: '考勤', id: 1 },
 	{ name: '人事', id: 2 },
@@ -31,7 +77,7 @@ const myArray = ref([
 	.group_list {
 		border-radius: 4px;
 		margin-bottom: 16px;
-		box-shadow: rgb(238, 238, 238) 0px 0px 3px 1px;
+		box-shadow: 0px 0px 3px 1px rgb(238, 238, 238);
 		background-color: rgb(255, 255, 255);
 		font-family: PingFangSC-Regular;
 		.group_header {
@@ -46,12 +92,81 @@ const myArray = ref([
 				font-family: PingFangSC-Medium;
 				display: flex;
 				align-items: center;
-				color: rgba(0, 0, 0, 0.25);
+				color: rgba(3, 3, 3, 1);
+				&.disabled {
+					color: rgba(0, 0, 0, 0.25);
+				}
 			}
 			&_nameOperate {
 				cursor: pointer;
 			}
 		}
+
+		.group_body,
+		.group_list_ul {
+			box-sizing: border-box;
+			padding: 0;
+			width: 1000px;
+		}
+		.group_item {
+			justify-content: flex-start;
+			padding: 16px;
+			.group_itemIcon {
+				flex-shrink: 0;
+				margin-right: 8px;
+				height: 42px;
+				width: 42px;
+				border-radius: 50%;
+				overflow: hidden;
+				img {
+					width: 100%;
+					height: 100%;
+					object-fit: cover;
+				}
+			}
+			.group_itemLeft {
+				width: 426px;
+				flex-shrink: 0;
+				padding-right: 8px;
+			}
+			.group_itemSeeable {
+				min-width: 175px;
+				font-size: 14px;
+				color: #1f2329;
+				overflow: hidden;
+				text-overflow: ellipsis;
+				white-space: nowrap;
+				flex: 1 1;
+			}
+			.group_itemOperations {
+				max-width: 350px;
+				flex-shrink: 0;
+				display: flex;
+			}
+			.group_itemIntro {
+				font-size: 14px;
+				text-overflow: ellipsis;
+				overflow: hidden;
+				white-space: nowrap;
+				line-height: 17px;
+				color: #8f959e;
+				font-family: PingFangSC-Regular;
+			}
+			.group_itemNameWrapper {
+				justify-content: flex-start;
+			}
+			.group_itemName {
+				max-width: 418px;
+				font-size: 14px;
+				text-overflow: ellipsis;
+				overflow: hidden;
+				white-space: nowrap;
+				line-height: 16px;
+				color: #1f2329;
+				font-weight: 500;
+				font-family: PingFangSC-Medium;
+			}
+		}
 	}
 }
 </style>

+ 4 - 2
src/views/flow/group/components/sortGroup.vue

@@ -4,7 +4,7 @@
 			<template #item="{ element }">
 				<div class="group_list">
 					<div class="group_header flex flex-pack-justify flex-align-center">
-						<div class="group_header_title">{{ element.name }}</div>
+						<div class="group_header_title disabled">{{ element.name }}</div>
 						<div class="group_header_nameOperate">
 							<el-tooltip effect="dark" content="删除" placement="top">
 								<el-icon><Delete @click="deleteItem" /></el-icon>
@@ -64,7 +64,9 @@ const deleteItem = () => {
 			font-family: PingFangSC-Medium;
 			display: flex;
 			align-items: center;
-			color: rgba(0, 0, 0, 0.25);
+			&.disabled {
+				color: rgba(0, 0, 0, 0.25);
+			}
 		}
 		&_nameOperate {
 			cursor: pointer;

+ 24 - 33
src/views/flow/group/index.vue

@@ -1,31 +1,29 @@
 <template>
-	<div class="pageWrap">
-		<el-container class="flex flex-v flex-align-center">
-			<div class="ApprovalList">
-				<el-header class="flex flex-align-center" style="width: 100%">
-					<div style="width: 100%">
-						<el-row style="width: 100%" justify="space-between">
-							<el-col span="6"><el-input placeholder="搜索" clearable /></el-col>
-							<el-col span="6">
-								<template v-if="!sortFlag">
-									<el-space wrap><el-button>新建分组</el-button></el-space>
-									<el-space wrap><el-button @click="changeComponent">分组排序</el-button></el-space>
-								</template>
-								<template v-else>
-									<el-space wrap><el-button type="primary" plain :icon="CircleCheck" @click="changeComponent">完 成</el-button></el-space>
-									<el-space wrap><el-button type="info" plain @click="changeComponent">取 消</el-button></el-space>
-								</template>
-								<el-space wrap><el-button :type="sortFlag ? 'info' : 'primary'" :icon="Plus" :disabled="sortFlag">创建审批</el-button></el-space>
-							</el-col>
-						</el-row>
-					</div>
-				</el-header>
-				<el-main>
-					<component :is="typeComponentMap[pageType]"></component>
-				</el-main>
+	<el-container class="flex flex-v flex-align-center" style="background-color: #ffffff; overflow-y: scroll; padding-bottom: 15px">
+		<div class="ApprovalList">
+			<el-header class="flex flex-align-center" style="width: 100%; padding: 0px">
+				<div style="width: 100%">
+					<el-row style="width: 100%" justify="space-between">
+						<el-col span="6"><el-input placeholder="搜索" clearable /></el-col>
+						<el-col span="6">
+							<template v-if="!sortFlag">
+								<el-space wrap><el-button>新建分组</el-button></el-space>
+								<el-space wrap><el-button @click="changeComponent">分组排序</el-button></el-space>
+							</template>
+							<template v-else>
+								<el-space wrap><el-button type="primary" plain :icon="CircleCheck" @click="changeComponent">完 成</el-button></el-space>
+								<el-space wrap><el-button type="info" plain @click="changeComponent">取 消</el-button></el-space>
+							</template>
+							<el-space wrap><el-button :type="sortFlag ? 'info' : 'primary'" :icon="Plus" :disabled="sortFlag">创建审批</el-button></el-space>
+						</el-col>
+					</el-row>
+				</div>
+			</el-header>
+			<div>
+				<component :is="typeComponentMap[pageType]"></component>
 			</div>
-		</el-container>
-	</div>
+		</div>
+	</el-container>
 </template>
 <script lang="tsx" setup>
 import { ref } from 'vue'
@@ -52,15 +50,8 @@ const changeComponent: () => void = () => {
 }
 </script>
 <style scoped lang="scss">
-.pageWrap {
-	flex: 1;
-	display: flex;
-	height: 100%;
-	background: #fff;
-}
 .ApprovalList {
 	width: 100%;
 	max-width: 1000px;
-	height: 100%;
 }
 </style>