Compare commits

..

No commits in common. "ca540f5e67d9cd6b9a60330962d131b53393c09e" and "ccc863c6b5db861739a323d907295f3fc4096306" have entirely different histories.

2 changed files with 27 additions and 49 deletions

View File

@ -1,13 +1,16 @@
<template> <template>
<el-card class="home-div"> <el-card class="home-div">
<el-card class="card-div"> <el-card class="card-div">
<el-button :icon="Plus" circle size="large" @click="open_project" /> <el-button :icon="Plus" circle @click="
add_project_info.name = '';
add_project_info.description = '';
add_project_info.enable = true;
" />
</el-card> </el-card>
<el-card class="card-div" v-for="(item, index) in projects" :key="index"> <el-card class="card-div" v-for="(item, index) in projects" :key="index">
<p class="project-title">{{ item.name }}</p> <p>{{ item.name }}</p>
<p>{{ item.description }}</p> <p>{{ item.description }}</p>
<el-button type="primary" <el-button type="primary" @click="router.push({ name: 'room', query: { project_name: item.name }})">管理</el-button>
@click="router.push({ name: 'room', query: { project_name: item.name } })">管理</el-button>
<el-button type="success" @click="openUpdateDialog(item)"></el-button> <el-button type="success" @click="openUpdateDialog(item)"></el-button>
<el-button type="danger" @click="openRemove(item)"></el-button> <el-button type="danger" @click="openRemove(item)"></el-button>
</el-card> </el-card>
@ -51,7 +54,7 @@
<script setup> <script setup>
import { onMounted, reactive, ref } from "vue"; import { onMounted, reactive, ref } from "vue";
import { Plus } from "@element-plus/icons-vue"; import { Plus } from "@element-plus/icons-vue";
import { ElMessage, ElMessageBox } from "element-plus"; import { ElMessage,ElMessageBox } from "element-plus";
import myApi from "@/api/myApi.js"; import myApi from "@/api/myApi.js";
import { useRouter } from 'vue-router' import { useRouter } from 'vue-router'
@ -59,13 +62,6 @@ const router = useRouter()
const projects = ref([]); const projects = ref([]);
const open_project = () => {
add_project_info.name = '';
add_project_info.description = '';
add_project_info.enable = true;
}
const get_projects = async () => { const get_projects = async () => {
const param = { const param = {
action: 100, action: 100,
@ -214,10 +210,5 @@ onMounted(() => {
justify-content: center; justify-content: center;
} }
.project-title {
font-size: 24px;
font-weight: 500;
}
} }
</style> </style>

View File

@ -6,11 +6,6 @@
<el-button type="primary" @click="goHome"></el-button> <el-button type="primary" @click="goHome"></el-button>
<el-button type="success" @click="save_room"></el-button> <el-button type="success" @click="save_room"></el-button>
</div> </div>
<div class="ptoject-info">
<div class="title">{{ project.name }}</div>
<div>{{ project.description }}</div>
</div>
<el-divider />
<div> <div>
<el-button type="primary" class="add-btn" :icon="Plus" @click="add_room"></el-button> <el-button type="primary" class="add-btn" :icon="Plus" @click="add_room"></el-button>
</div> </div>
@ -394,14 +389,6 @@ const checkList = reactive([{
width: 30%; width: 30%;
} }
} }
.title {
line-height: 48px;
font-size: 24px;
font-weight: 500;
}
.el-divider{
background-color:#409eff;
}
} }
} }