|
@@ -1,7 +1,310 @@
|
|
|
-<script setup lang="ts"></script>
|
|
|
-
|
|
|
<template>
|
|
|
- <div class="mainContentBox">dfdfas</div>
|
|
|
+ <div class="mainContentBox">
|
|
|
+ <div class="content-head">
|
|
|
+ <div class="head-box-all">
|
|
|
+ <div class="box-all">
|
|
|
+ <el-checkbox
|
|
|
+ v-model="checkAll"
|
|
|
+ :indeterminate="isIndeterminate"
|
|
|
+ @change="handleCheckAllChange"
|
|
|
+ >
|
|
|
+ </el-checkbox>
|
|
|
+ <span>显示全部</span>
|
|
|
+ </div>
|
|
|
+ <div class="box-num">{{ checkedCities.length }}</div>
|
|
|
+ <div class="box-text">工程类型</div>
|
|
|
+ </div>
|
|
|
+ <div class="head-box-group">
|
|
|
+ <el-checkbox-group
|
|
|
+ v-model="checkedCities"
|
|
|
+ @change="handleCheckedCitiesChange"
|
|
|
+ >
|
|
|
+ <div class="head-box-item" v-for="city in cities" :key="city">
|
|
|
+ <el-checkbox label="" :value="city"></el-checkbox>
|
|
|
+ <div class="name">射频类</div>
|
|
|
+ <div class="num">99+</div>
|
|
|
+ </div>
|
|
|
+ </el-checkbox-group>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="content-body">
|
|
|
+ <div class="cotent-btns">
|
|
|
+ <div>工程列表</div>
|
|
|
+ <div>
|
|
|
+ <el-button type="primary">
|
|
|
+ <span class="add">+</span>
|
|
|
+ 新增工程
|
|
|
+ </el-button>
|
|
|
+ <el-button class="active">
|
|
|
+ <i />
|
|
|
+ 按时间倒序
|
|
|
+ </el-button>
|
|
|
+ <el-button class="normal">
|
|
|
+ <i />
|
|
|
+ 按创建人姓名
|
|
|
+ </el-button>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div class="content-list">
|
|
|
+ <div v-for="item in 10" :key="item" class="content-list-item">
|
|
|
+ <div class="list-item-flex">
|
|
|
+ <div class="list-itme-tit">变频模块</div>
|
|
|
+ <div>
|
|
|
+ <span class="item-gray">发布</span><el-switch v-model="value" />
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="list-item-flex">
|
|
|
+ <div><span class="item-gray">工程类型:</span>1</div>
|
|
|
+ <div><span class="item-gray">版本:</span>1</div>
|
|
|
+ </div>
|
|
|
+ <div class="list-item-flex">
|
|
|
+ <div><span class="item-gray">开发人员:</span>受到1</div>
|
|
|
+ <div><span class="item-gray">更新时间:</span>1</div>
|
|
|
+ </div>
|
|
|
+ <div class="list-item-btns">
|
|
|
+ <span>
|
|
|
+ <el-icon>
|
|
|
+ <Edit />
|
|
|
+ </el-icon>
|
|
|
+ </span>
|
|
|
+ <span>
|
|
|
+ <el-icon>
|
|
|
+ <DeleteFilled />
|
|
|
+ </el-icon>
|
|
|
+ </span>
|
|
|
+ <span>
|
|
|
+ <el-icon>
|
|
|
+ <Tools />
|
|
|
+ </el-icon>
|
|
|
+ </span>
|
|
|
+ <span>
|
|
|
+ <el-icon>
|
|
|
+ <CaretRight />
|
|
|
+ </el-icon>
|
|
|
+ </span>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
</template>
|
|
|
|
|
|
-<style scoped lang="scss"></style>
|
|
|
+<script lang="ts" setup>
|
|
|
+import { ref } from "vue";
|
|
|
+
|
|
|
+import type { CheckboxValueType } from "element-plus";
|
|
|
+
|
|
|
+const checkAll = ref(false);
|
|
|
+const isIndeterminate = ref(true);
|
|
|
+const checkedCities = ref(["Shanghai", "Beijing"]);
|
|
|
+const cities = [
|
|
|
+ "Shanghai",
|
|
|
+ "Beijing",
|
|
|
+ "Guangzhou",
|
|
|
+ "Shenzhen",
|
|
|
+ "1",
|
|
|
+ "2",
|
|
|
+ "3",
|
|
|
+ "4",
|
|
|
+];
|
|
|
+
|
|
|
+const handleCheckAllChange = (val: CheckboxValueType) => {
|
|
|
+ checkedCities.value = val ? cities : [];
|
|
|
+ isIndeterminate.value = false;
|
|
|
+};
|
|
|
+const handleCheckedCitiesChange = (value: CheckboxValueType[]) => {
|
|
|
+ const checkedCount = value.length;
|
|
|
+ checkAll.value = checkedCount === cities.length;
|
|
|
+ isIndeterminate.value = checkedCount > 0 && checkedCount < cities.length;
|
|
|
+};
|
|
|
+
|
|
|
+const value = ref(true);
|
|
|
+
|
|
|
+import AddComponent from "@/components/add.vue"; // Adjust the path as necessary
|
|
|
+
|
|
|
+// Existing reactive references and methods...
|
|
|
+
|
|
|
+// Register the child component locally
|
|
|
+const AddComponent = defineAsyncComponent(() => import("@/components/add.vue"));
|
|
|
+</script>
|
|
|
+
|
|
|
+<style scoped lang="scss">
|
|
|
+.mainContentBox {
|
|
|
+ position: absolute;
|
|
|
+ width: 100%;
|
|
|
+
|
|
|
+ .content-head {
|
|
|
+ color: var(--hj-white-1);
|
|
|
+ display: flex;
|
|
|
+ height: 100px;
|
|
|
+ background: var(--gray-bg-1);
|
|
|
+ // width: 100%;
|
|
|
+ // overflow: hidden;
|
|
|
+ min-width: 0;
|
|
|
+
|
|
|
+ .head-box-all {
|
|
|
+ padding: 6px;
|
|
|
+ box-sizing: border-box;
|
|
|
+ border-radius: 4px 0 0 4px;
|
|
|
+ width: 90px;
|
|
|
+ height: 100px;
|
|
|
+ background: linear-gradient(270deg, #3b7cff 0%, #8aa9ec 100%);
|
|
|
+ color: var(--hj-white-1);
|
|
|
+ font-size: var(--hj-fs-12);
|
|
|
+ text-align: center;
|
|
|
+
|
|
|
+ .box-all {
|
|
|
+ color: var(--hj-white-1);
|
|
|
+ font-size: var(--hj-fs-12);
|
|
|
+ }
|
|
|
+
|
|
|
+ .box-num {
|
|
|
+ text-align: center;
|
|
|
+ font-size: var(--hj-fs-24);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ .head-box-group {
|
|
|
+ flex: 1;
|
|
|
+
|
|
|
+ .el-checkbox-group {
|
|
|
+ height: 100%;
|
|
|
+ width: 100%;
|
|
|
+ overflow-x: auto;
|
|
|
+ overflow-y: hidden;
|
|
|
+ white-space: nowrap;
|
|
|
+ display: flex;
|
|
|
+ align-content: center;
|
|
|
+ align-items: center;
|
|
|
+ flex-direction: row;
|
|
|
+
|
|
|
+ .head-box-item {
|
|
|
+ position: relative;
|
|
|
+ flex: 0 0 182px;
|
|
|
+ font-size: var(--hj-fs-14);
|
|
|
+ margin-top: 16px;
|
|
|
+ padding: 6px;
|
|
|
+ margin-left: 12px;
|
|
|
+ height: 67px;
|
|
|
+ background: linear-gradient(90deg, #3cbaff 0%, #3b7cff 100%);
|
|
|
+ border-radius: 4px 4px 4px 4px;
|
|
|
+ color: var(--hj-white-1);
|
|
|
+ text-align: center;
|
|
|
+
|
|
|
+ .el-checkbox {
|
|
|
+ position: absolute;
|
|
|
+ left: 6px;
|
|
|
+ top: 0;
|
|
|
+ }
|
|
|
+
|
|
|
+ .name {
|
|
|
+ line-height: 16px;
|
|
|
+ margin-top: 12px;
|
|
|
+ font-size: var(--hj-fs-14);
|
|
|
+ }
|
|
|
+
|
|
|
+ .num {
|
|
|
+ line-height: 26px;
|
|
|
+ font-size: var(--hj-fs-20);
|
|
|
+ font-weight: bold;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ .content-body {
|
|
|
+ .cotent-btns {
|
|
|
+ display: flex;
|
|
|
+ justify-content: space-between;
|
|
|
+ align-items: center;
|
|
|
+ margin-top: 26px;
|
|
|
+ margin-bottom: 12px;
|
|
|
+
|
|
|
+ .add {
|
|
|
+ width: 12px;
|
|
|
+ height: 12px;
|
|
|
+ line-height: 12px;
|
|
|
+ border-radius: 12px;
|
|
|
+ text-align: center;
|
|
|
+ background-color: #fff;
|
|
|
+ color: #3b7cff;
|
|
|
+ margin-right: 10px;
|
|
|
+ }
|
|
|
+
|
|
|
+ .active,
|
|
|
+ .normal {
|
|
|
+ i {
|
|
|
+ width: 14px;
|
|
|
+ height: 14px;
|
|
|
+ border-radius: 14px;
|
|
|
+ vertical-align: middle;
|
|
|
+ margin-right: 10px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ .active {
|
|
|
+ border: 1px solid #1989fa;
|
|
|
+ color: #1871f8;
|
|
|
+
|
|
|
+ i {
|
|
|
+ border: 4px solid #3b7cff;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ .normal {
|
|
|
+ i {
|
|
|
+ border: 1px solid #d5d8de;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ .content-list {
|
|
|
+ width: 100%;
|
|
|
+ display: grid;
|
|
|
+ grid-template-columns: repeat(3, 1fr);
|
|
|
+ gap: 20px;
|
|
|
+
|
|
|
+ .content-list-item {
|
|
|
+ border: 1px solid #ccc;
|
|
|
+ box-shadow: 0px 2px 4px 0px rgba(0, 0, 0, 0.1);
|
|
|
+ border-radius: 4px 4px 4px 4px;
|
|
|
+ padding-top: 12px;
|
|
|
+ }
|
|
|
+
|
|
|
+ .list-item-flex {
|
|
|
+ margin-bottom: 12px;
|
|
|
+ padding: 0 20px;
|
|
|
+ display: flex;
|
|
|
+ justify-content: space-between;
|
|
|
+ align-items: center;
|
|
|
+ font-size: var(--hj-fs-12);
|
|
|
+ color: var(--fc-color-5);
|
|
|
+
|
|
|
+ .list-itme-tit {
|
|
|
+ font-size: var(--hj-fs-14);
|
|
|
+ font-weight: bold;
|
|
|
+ }
|
|
|
+
|
|
|
+ .item-gray {
|
|
|
+ color: var(--fc-color-3);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ .list-item-btns {
|
|
|
+ height: 37px;
|
|
|
+ line-height: 37px;
|
|
|
+ color: var(--fc-color-6);
|
|
|
+ display: flex;
|
|
|
+ justify-content: space-around;
|
|
|
+ border-top: 1px solid rgba(175, 185, 208, 0.3);
|
|
|
+
|
|
|
+ span {
|
|
|
+ cursor: pointer;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+</style>
|