|
@@ -19,7 +19,12 @@
|
|
|
v-model="checkedCities"
|
|
|
@change="handleCheckedCitiesChange"
|
|
|
>
|
|
|
- <div class="head-box-item" v-for="city in cities" :key="city">
|
|
|
+ <div
|
|
|
+ class="head-box-item"
|
|
|
+ :class="[checkedCities.includes(city) ? 'active' : '']"
|
|
|
+ v-for="city in cities"
|
|
|
+ :key="city"
|
|
|
+ >
|
|
|
<el-checkbox label="" :value="city"></el-checkbox>
|
|
|
<div class="name">射频类</div>
|
|
|
<div class="num">99+</div>
|
|
@@ -31,7 +36,7 @@
|
|
|
<div class="cotent-btns">
|
|
|
<div>工程列表</div>
|
|
|
<div>
|
|
|
- <el-button type="primary">
|
|
|
+ <el-button type="primary" @click="showAddFun">
|
|
|
<span class="add">+</span>
|
|
|
新增工程
|
|
|
</el-button>
|
|
@@ -47,10 +52,10 @@
|
|
|
</div>
|
|
|
|
|
|
<div class="content-list">
|
|
|
- <div v-for="item in 10" :key="item" class="content-list-item">
|
|
|
+ <div v-for="item in 9" :key="item" class="content-list-item">
|
|
|
<div class="list-item-flex">
|
|
|
<div class="list-itme-tit">变频模块</div>
|
|
|
- <div>
|
|
|
+ <div class="list-item-switch">
|
|
|
<span class="item-gray">发布</span><el-switch v-model="value" />
|
|
|
</div>
|
|
|
</div>
|
|
@@ -63,7 +68,7 @@
|
|
|
<div><span class="item-gray">更新时间:</span>1</div>
|
|
|
</div>
|
|
|
<div class="list-item-btns">
|
|
|
- <span>
|
|
|
+ <span @click="showDetailsFun(item)">
|
|
|
<el-icon>
|
|
|
<Edit />
|
|
|
</el-icon>
|
|
@@ -86,11 +91,30 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
+ <el-pagination
|
|
|
+ class="content-pag"
|
|
|
+ background
|
|
|
+ layout="prev, pager, next"
|
|
|
+ :page-size="9"
|
|
|
+ :total="1000"
|
|
|
+ @change="handleChange"
|
|
|
+ />
|
|
|
</div>
|
|
|
</div>
|
|
|
+
|
|
|
+ <AddComponent
|
|
|
+ :show="showAdd"
|
|
|
+ @handleCancel="showAdd = false"
|
|
|
+ @save="saveFun"
|
|
|
+ />
|
|
|
+
|
|
|
+ <DetailsComponent :show="showDetails" @handleCancel="showDetails = false" />
|
|
|
</template>
|
|
|
|
|
|
<script lang="ts" setup>
|
|
|
+import AddComponent from "./components/add.vue";
|
|
|
+import DetailsComponent from "./components/details.vue";
|
|
|
+
|
|
|
import { ref } from "vue";
|
|
|
|
|
|
import type { CheckboxValueType } from "element-plus";
|
|
@@ -121,12 +145,48 @@ const handleCheckedCitiesChange = (value: CheckboxValueType[]) => {
|
|
|
|
|
|
const value = ref(true);
|
|
|
|
|
|
-// import AddComponent from "@/components/add.vue"; // Adjust the path as necessary
|
|
|
+// interface VersionItem {
|
|
|
+// name: string;
|
|
|
+// type: string;
|
|
|
+// region: string;
|
|
|
+// }
|
|
|
+// const formLabelAlign = ref<VersionItem>({
|
|
|
+// name: "name1",
|
|
|
+// type: "实现基础框架搭建,包含权限管理、路由系统等核心功能。",
|
|
|
+// region: "v2.4.0",
|
|
|
+// });
|
|
|
+
|
|
|
+/**
|
|
|
+ * 分页事件,每页9条
|
|
|
+ */
|
|
|
+const handleChange = (currentPage: number, pageSize: number) => {
|
|
|
+ // console.log(currentPage);
|
|
|
+ // console.log(pageSize);
|
|
|
+};
|
|
|
+
|
|
|
+/**
|
|
|
+ * 显示新增弹框
|
|
|
+ */
|
|
|
+let showAdd = ref(false);
|
|
|
+const showAddFun = () => {
|
|
|
+ showAdd.value = true;
|
|
|
+};
|
|
|
|
|
|
-// Existing reactive references and methods...
|
|
|
+/**
|
|
|
+ * 新增弹框返回的数据 请求完成后关闭弹框 showAdd.value = false;
|
|
|
+ */
|
|
|
+const saveFun = (data: any) => {
|
|
|
+ // console.log(data.name);
|
|
|
+};
|
|
|
|
|
|
-// Register the child component locally
|
|
|
-// const AddComponent = defineAsyncComponent(() => import("@/components/add.vue"));
|
|
|
+/**
|
|
|
+ * 显示新增弹框
|
|
|
+ */
|
|
|
+let showDetails = ref(false);
|
|
|
+const showDetailsFun = (item: any) => {
|
|
|
+ console.log(item);
|
|
|
+ showDetails.value = true;
|
|
|
+};
|
|
|
</script>
|
|
|
|
|
|
<style scoped lang="scss">
|
|
@@ -187,11 +247,10 @@ const value = ref(true);
|
|
|
padding: 6px;
|
|
|
margin-left: 12px;
|
|
|
height: 67px;
|
|
|
- background: linear-gradient(90deg, #3cbaff 0%, #3b7cff 100%);
|
|
|
+ border: 1px solid #afb9d0;
|
|
|
border-radius: 4px 4px 4px 4px;
|
|
|
- color: var(--hj-white-1);
|
|
|
- text-align: center;
|
|
|
|
|
|
+ text-align: center;
|
|
|
.el-checkbox {
|
|
|
position: absolute;
|
|
|
left: 6px;
|
|
@@ -202,12 +261,23 @@ const value = ref(true);
|
|
|
line-height: 16px;
|
|
|
margin-top: 12px;
|
|
|
font-size: var(--hj-fs-14);
|
|
|
+ color: var(--fc-color-5);
|
|
|
}
|
|
|
|
|
|
.num {
|
|
|
line-height: 26px;
|
|
|
font-size: var(--hj-fs-20);
|
|
|
font-weight: bold;
|
|
|
+ color: var(--fc-color-7);
|
|
|
+ }
|
|
|
+ &.active {
|
|
|
+ background: linear-gradient(90deg, #3cbaff 0%, #3b7cff 100%);
|
|
|
+ .name {
|
|
|
+ color: var(--hj-white-1);
|
|
|
+ }
|
|
|
+ .num {
|
|
|
+ color: var(--hj-white-1);
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -287,6 +357,12 @@ const value = ref(true);
|
|
|
font-size: var(--hj-fs-14);
|
|
|
font-weight: bold;
|
|
|
}
|
|
|
+ .list-item-switch {
|
|
|
+ .item-gray {
|
|
|
+ line-height: 32px;
|
|
|
+ margin-right: 4px;
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
.item-gray {
|
|
|
color: var(--fc-color-3);
|
|
@@ -306,5 +382,11 @@ const value = ref(true);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+ .content-pag {
|
|
|
+ float: right;
|
|
|
+ margin-right: 20px;
|
|
|
+ margin-top: 20px;
|
|
|
+ padding-bottom: 30px;
|
|
|
+ }
|
|
|
}
|
|
|
</style>
|