Преглед на файлове

feat:概览,整体趋势

luoy преди 1 седмица
родител
ревизия
5af1882fcd
променени са 5 файла, в които са добавени 69 реда и са изтрити 5 реда
  1. 4 0
      src/assets/icons/wenhao.svg
  2. 41 0
      src/components/LYcom/Lcard/index.vue
  3. 3 1
      src/layout/routerView/parent.vue
  4. 1 1
      src/router/backEnd.ts
  5. 20 3
      src/views/count/main/trend/index.vue

+ 4 - 0
src/assets/icons/wenhao.svg

@@ -0,0 +1,4 @@
+<svg width="14" height="14" viewBox="0 0 14 14" fill="none" xmlns="http://www.w3.org/2000/svg">
+<path d="M7 14C8.93298 14 10.683 13.2165 11.9497 11.9497C13.2165 10.683 14 8.93298 14 7C14 5.06702 13.2165 3.31702 11.9497 2.05025C10.683 0.783503 8.93298 0 7 0C5.06702 0 3.31702 0.783503 2.05025 2.05025C0.783503 3.31702 0 5.06702 0 7C0 8.93298 0.783503 10.683 2.05025 11.9497C3.31702 13.2165 5.06702 14 7 14Z" fill="#1B4D88" fill-opacity="0.4"/>
+<path d="M4 4.702C4 4.40333 4.02333 4.09533 4.07 3.778C4.126 3.46067 4.21933 3.17133 4.35 2.91C4.49 2.64867 4.67667 2.434 4.91 2.266C5.14333 2.08867 5.45133 2 5.834 2H7.794C8.102 2 8.37267 2.06533 8.606 2.196C8.84867 2.31733 9.04467 2.476 9.194 2.672C9.35267 2.868 9.474 3.092 9.558 3.344C9.65133 3.596 9.70733 3.848 9.726 4.1C9.754 4.352 9.74467 4.59467 9.698 4.828C9.66067 5.06133 9.59533 5.26667 9.502 5.444L7.934 8.314V9.574H6.324V8.146L7.808 5.556C7.892 5.416 7.948 5.234 7.976 5.01C8.01333 4.786 8.01333 4.57133 7.976 4.366C7.948 4.15133 7.878 3.96933 7.766 3.82C7.66333 3.67067 7.514 3.596 7.318 3.596H6.408C6.24933 3.596 6.11867 3.624 6.016 3.68C5.91333 3.72667 5.82933 3.80133 5.764 3.904C5.708 3.99733 5.67067 4.114 5.652 4.254C5.63333 4.38467 5.624 4.534 5.624 4.702H4ZM7.976 12.15H6.324V10.512H7.976V12.15Z" fill="white"/>
+</svg>

+ 41 - 0
src/components/LYcom/Lcard/index.vue

@@ -0,0 +1,41 @@
+<!-- src/components/LYcom/Lcard/index.vue -->
+<template>
+  <div class="l-card" :style="{ height: cardHeight }">
+    <slot></slot>
+  </div>
+</template>
+
+<script lang="ts" setup>
+import { computed } from 'vue'
+
+// 定义组件props
+interface Props {
+  height?: string | number
+}
+
+const props = withDefaults(defineProps<Props>(), {
+  height: 'auto'
+})
+
+// 计算卡片高度
+const cardHeight = computed(() => {
+  if (typeof props.height === 'number') {
+    return props.height + 'px'
+  }
+  return props.height
+})
+</script>
+
+<style scoped>
+.l-card {
+  width: 100%;
+  min-height: 100px;
+  border-radius: 8px;
+  border: 1px solid #DDE4ED;
+  background-color: #fff;
+  /* box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1); */
+  padding: 30px;
+  box-sizing: border-box;
+  margin-bottom: 10px;
+}
+</style>

+ 3 - 1
src/layout/routerView/parent.vue

@@ -1,5 +1,5 @@
 <template>
-	<div class="layout-parent" style="display: flex;flex-direction: row">
+	<div class="layout-parent">
 		<Vertical v-if="isShowLeftMenu" :menuList="menuLeftList" />
 		<router-view v-slot="{ Component }">
 			<transition :name="setTransitionName" mode="out-in">
@@ -119,6 +119,7 @@ watch(
 	.w100vh-210 {
 		width: calc(100vw - 210px);
 		left: 210px !important;
+		overflow-y: scroll;
 	}
 	.el-menu--vertical {
 		width: 210px !important;
@@ -126,6 +127,7 @@ watch(
 		border: 1px solid #DDE4ED !important;
 		// margin-top: -30px;
 		margin: 5px 0;
+		position: fixed;
 		background-color: #fff;
 		:deep(.el-menu-item), :deep(.el-sub-menu__title) {
 			color: #646464 !important;

+ 1 - 1
src/router/backEnd.ts

@@ -136,7 +136,7 @@ export function backEndComponent(routes: any) {
 			item.component = dynamicImport(dynamicViewsModules, item.path.split('/:')[0]);
 		}
 		item.children && backEndComponent(item.children);
-		if (item.children && !['/count/index'].includes(item.path)) {
+		if (item.children) {
 			item.redirect = item.children[0].path;
 		}
 		return item;

+ 20 - 3
src/views/count/main/trend/index.vue

@@ -1,7 +1,24 @@
 <template>
-   <div>trend</div>
+	<div class="layout-padding">
+      <div class="!overflow-auto px-1">
+         <Lcard :height="440">
+            <div class="tit1">整体趋势</div>
+            
+         </Lcard>
+         <Lcard :height="440"/>
+         <Lcard :height="440"/>
+         <Lcard :height="440"/>
+         <Lcard :height="440"/>
+      </div>
+	</div>
 </template>
 
-<script lang="ts" setup>
+<script lang="ts" name="countMainTrend" setup>
+import { useI18n } from 'vue-i18n';
+// 引入组件
+const Lcard = defineAsyncComponent(() => import('/@/components/LYcom/Lcard/index.vue'));
+const { t } = useI18n();
+</script>
+<style lang="scss" scoped>
 
-</script>
+</style>