hejianhao
2025-04-01 410b467fedd69737e60577f6c401c81098b48fb6
二级页面容器Card
3个文件已修改
2个文件已添加
88 ■■■■■ 已修改文件
src/components/Card/index.vue 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main.js 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/router/index.js 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/projectList/addProject.vue 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/projectList/index.vue 33 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/Card/index.vue
New file
@@ -0,0 +1,23 @@
<template>
    <div class="card">
        <slot></slot>
    </div>
</template>
<script>
export default {
}
</script>
<style lang="less" scoped>
.card {
    height: calc(100% - 110px);
    overflow-y: auto;
    padding: 30px 30px 59px 30px;
    box-shadow: 0px 10px 19px 0px rgba(0, 0, 0, 0.06);
    border-radius: 16px;
    border: 4px solid #FFFFFF;
    background: rgba(255, 255, 255, 0.8);
}
</style>
src/main.js
@@ -5,11 +5,13 @@
import router from "./router";
import store from './store'
import TableCustom from '@/components/TableSlot/index.vue'
import Card from '@/components/Card/index.vue'
import ShowDelConfirm from '@/components/showDelConfirm/index.vue'
Vue.config.productionTip = false;
Vue.use(ElementUI, { size: 'small' })
Vue.component('TableCustom', TableCustom)
Vue.component('Card', Card)
Vue.component('ShowDelConfirm', ShowDelConfirm)
Vue.prototype.msgsuccess = function (msg) {
src/router/index.js
@@ -50,9 +50,18 @@
                        name: "ProjectList",
                        meta: {
                            title: "项目组管理",
                            keepAlive: true,
                        },
                        component: () => import("../views/projectList"),
                    },
                    {
                        path: "addProject",
                        name: "AddProject",
                        meta: {
                            title: "新增项目组",
                            hide: true,
                            keepAlive: true,
                        },
                        component: () => import("../views/projectList/addProject"),
                    }
                ]
            },
src/views/projectList/addProject.vue
New file
@@ -0,0 +1,19 @@
<template>
    <Card>
        <template>
        </template>
    </Card>
</template>
<script>
export default {
    name: 'AddProject',
    data() {
        return {
        }
    }
}
</script>
<style></style>
src/views/projectList/index.vue
@@ -1,6 +1,7 @@
<template>
    <div class="list">
        <TableCustom :queryForm="queryForm" :total="total" @currentChange="handleCurrentChange" @sizeChange="handleSizeChange">
        <TableCustom :queryForm="queryForm" :total="total" @currentChange="handleCurrentChange"
            @sizeChange="handleSizeChange">
            <template #search>
                <el-form :model="form" label-width="140px" inline>
                    <el-form-item label="项目组名称:">
@@ -19,7 +20,8 @@
                </el-form>
            </template>
            <template #setting>
                <el-button class="el-icon-plus" style="margin-bottom: 20px;" type="primary"> 新增项目组</el-button>
                <el-button @click="handleAddProject" class="el-icon-plus" style="margin-bottom: 20px;" type="primary">
                    新增项目组</el-button>
            </template>
            <template #table>
                <el-table-column prop="name" label="项目组名称" />
@@ -44,7 +46,8 @@
            </template>
        </TableCustom>
        <ShowDelConfirm :show="showDelConfirm" @close="showDelConfirm = false" @confirm="handleDelConfirm" />
        <ShowDelConfirm :title="changeStatusTitle" :tip="changeStatusTip" :show="changeStatus" @close="changeStatus = false" @confirm="handleChangeStatus" />
        <ShowDelConfirm :title="changeStatusTitle" :tip="changeStatusTip" :show="changeStatus"
            @close="changeStatus = false" @confirm="handleChangeStatusConfirm" />
    </div>
</template>
@@ -69,25 +72,45 @@
        }
    },
    methods: {
        handleAddProject() {
            this.$router.push({
                path: '/projectList/addProject'
            })
        },
        handleDel(row) {
            this.showDelConfirm = true
            this.rowId = row.id
            this.showDelConfirm = true
        },
        handleDelConfirm() {
            this.showDelConfirm = false
            this.msgsuccess('删除成功')
            this.rowId = ''
            this.getList()
        },
        handleChangeStatus(row, status) {
            this.changeStatus = true
            this.rowId = row.id
            this.changeStatusTitle = status == 1 ? '确认要封存这个项目组吗?' : '确认要解封该项目组吗?'
            this.changeStatusTip = status == 1 ? '封存后项目组内人员看不到数据,审批人仍然可见数据。' : '解封后项目组内人员数据恢复。'
            this.changeStatus = true
        },
        handleChangeStatusConfirm() {
            this.changeStatus = false
            this.msgsuccess('操作成功')
            this.rowId = ''
            this.changeStatusTitle = ''
            this.changeStatusTip = ''
            this.getList()
        },
        handleCurrentChange(page) {
            this.queryForm.pageNum = page
            this.getList()
        },
        handleSizeChange(size) {
            this.queryForm.pageSize = size
            this.getList()
        },
        getList() {
        }
    }
}