修改样式
							parent
							
								
									ccc863c6b5
								
							
						
					
					
						commit
						c7fab5edc8
					
				| 
						 | 
					@ -39,7 +39,7 @@ button {
 | 
				
			||||||
  border-radius: 8px;
 | 
					  border-radius: 8px;
 | 
				
			||||||
  border: 1px solid transparent;
 | 
					  border: 1px solid transparent;
 | 
				
			||||||
  padding: 0.6em 1.2em;
 | 
					  padding: 0.6em 1.2em;
 | 
				
			||||||
  font-size: 1em;
 | 
					  font-size: 2em;
 | 
				
			||||||
  font-weight: 500;
 | 
					  font-weight: 500;
 | 
				
			||||||
  font-family: inherit;
 | 
					  font-family: inherit;
 | 
				
			||||||
  background-color: #1a1a1a;
 | 
					  background-color: #1a1a1a;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,18 +1,15 @@
 | 
				
			||||||
<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 @click="
 | 
					            <el-button :icon="Plus" circle size="large" @click="open_project" />
 | 
				
			||||||
                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>{{ item.name }}</p>
 | 
					            <p class="project-title">{{ item.name }}</p>
 | 
				
			||||||
            <p>{{ item.description }}</p>
 | 
					            <p>{{ item.description }}</p>
 | 
				
			||||||
            <el-button type="primary" @click="router.push({ name: 'room', query: { project_name: item.name }})">管理</el-button>
 | 
					            <el-button type="primary"
 | 
				
			||||||
 | 
					                @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>
 | 
				
			||||||
    </el-card>
 | 
					    </el-card>
 | 
				
			||||||
    <el-dialog v-model="add_project_info.enable" title="新增项目" width="500" center>
 | 
					    <el-dialog v-model="add_project_info.enable" title="新增项目" width="500" center>
 | 
				
			||||||
| 
						 | 
					@ -54,7 +51,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'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -62,6 +59,13 @@ 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,
 | 
				
			||||||
| 
						 | 
					@ -143,24 +147,24 @@ const update_project = async () => {
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
const openRemove = (item) => {
 | 
					const openRemove = (item) => {
 | 
				
			||||||
  ElMessageBox.confirm(
 | 
					    ElMessageBox.confirm(
 | 
				
			||||||
    '确定删除项目?',
 | 
					        '确定删除项目?',
 | 
				
			||||||
    '删除项目',
 | 
					        '删除项目',
 | 
				
			||||||
    {
 | 
					        {
 | 
				
			||||||
      confirmButtonText: '确定',
 | 
					            confirmButtonText: '确定',
 | 
				
			||||||
      cancelButtonText: '取消',
 | 
					            cancelButtonText: '取消',
 | 
				
			||||||
      type: 'warning',
 | 
					            type: 'warning',
 | 
				
			||||||
    }
 | 
					        }
 | 
				
			||||||
  )
 | 
					    )
 | 
				
			||||||
    .then(() => {
 | 
					        .then(() => {
 | 
				
			||||||
        remove_project(item);
 | 
					            remove_project(item);
 | 
				
			||||||
    })
 | 
					        })
 | 
				
			||||||
    .catch(() => {
 | 
					        .catch(() => {
 | 
				
			||||||
      ElMessage({
 | 
					            ElMessage({
 | 
				
			||||||
        type: 'info',
 | 
					                type: 'info',
 | 
				
			||||||
        message: '取消删除',
 | 
					                message: '取消删除',
 | 
				
			||||||
      })
 | 
					            })
 | 
				
			||||||
    })
 | 
					        })
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
const remove_project = async (project) => {
 | 
					const remove_project = async (project) => {
 | 
				
			||||||
| 
						 | 
					@ -210,5 +214,10 @@ onMounted(() => {
 | 
				
			||||||
        justify-content: center;
 | 
					        justify-content: center;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    .project-title {
 | 
				
			||||||
 | 
					        font-size: 24px;
 | 
				
			||||||
 | 
					        font-weight: 500;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
</style>
 | 
					</style>
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -6,6 +6,11 @@
 | 
				
			||||||
                <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>
 | 
				
			||||||
| 
						 | 
					@ -389,6 +394,14 @@ const checkList = reactive([{
 | 
				
			||||||
                    width: 30%;
 | 
					                    width: 30%;
 | 
				
			||||||
                }
 | 
					                }
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
 | 
					            .title {
 | 
				
			||||||
 | 
					                line-height: 48px;
 | 
				
			||||||
 | 
					                font-size: 24px;
 | 
				
			||||||
 | 
					                font-weight: 500;
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					            .el-divider{ 
 | 
				
			||||||
 | 
					                background-color:#409eff;
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue