chengkun
2025-08-29 a370f8c298c691b18f713d4db19919162fbd3299
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
<!DOCTYPE html>
<html lang="zh-cn">
 
<head>
    <meta charset="utf-8">
    <include file="common:title" />
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <include file="common:element-plus">
</head>
 
<body>
    <div id="vue_item" v-cloak>
        <el-container>
            <el-aside class="el-menu-container" :width="el_aside_width">
                <!-- 侧边菜单 -->
                <include file="common:side_menu" />
            </el-aside>
            <el-container>
                <el-header>
                    <include file="common:guide" one_word="首页" two_word="文章管理" />
                </el-header>
                <el-main>
                    <el-card>
                        <template #header>
                            <div class="card-header">
                                <span>文章列表</span>
                                &emsp;
                                <el-link href="/admin/blog/add.html" type="primary" class="header_add_btn" icon="CirclePlusFilled" :underline="false">添加</el-link>
                            </div>
                        </template>
                        <el-table :data="list" :tree-props="{children: 'children'}" row-key="id" default-expand-all border style="width: 100%" ref="tableRef">
                            <el-table-column label="名称" prop="title"></el-table-column>
                            <!-- <el-table-column label="菜单索引" prop="menu_index"></el-table-column> -->
                            <el-table-column label="添加时间" prop="create_time" width="150">
                                <template #default="scope">
                                   {{formatDate(scope.row['create_time'])}}
                                </template>
                            </el-table-column>
                            <el-table-column label="状态" width="150" align="center">
                                <template #default="scope">
                                    <el-switch v-model="scope.row.show_menu" style="--el-switch-on-color: #13ce66; --el-switch-off-color: #ccc" :active-value="1" :inactive-value="0" inline-prompt active-text="发布" inactive-text="下架" @change="updateShowMenu(scope.row)" />
                                </template>
                            </el-table-column>
                            <el-table-column label="操作选项" fixed="right" width="150" :align="alignValue(200)">
                                <template #default="scope">
                                    <el-button icon="edit" type="primary" @click="Edit(scope.row)"></el-button>
                                </template>
                            </el-table-column>
                        </el-table>
                    </el-card>
                </el-main>
                <el-footer></el-footer>
            </el-container>
        </el-container>
    </div>
</body>
<!-- 共用的方法 -->
<script src="/static/vue/mixin_admin.js"></script>
<script src="/static/admin/js/blog/index.js"></script>
 
</html>