chengkun
2025-09-09 774d962b76d63366ed26c395e0a33cdbec309242
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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
<!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:header" />
        <include file="common:element-plus" />
        <script src="/static/tinymce/js/tinymce/tinymce.min.js"></script>
        <style>
            .el-table th.el-table__cell,
            .el-table td.el-table__cell,
            .el-select,
            .el-select__wrapper {
                position: unset;
            }
 
            .el-image-viewer__img {
                width: 50%;
            }
        </style>
    </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 style="width: 100%">
                            <template #header>
                                <div class="card-header"><span data-i18n="goods_management">商城公告</span>
                                    &emsp;
                                    <el-link type="primary" class="header_add_btn" icon="CirclePlusFilled" :underline="false" @click="create()" href="javascript:void(0)"><span
                                              data-i18n="add">添加</span></el-link>
                                </div>
                            </template>
                            <el-form :model="searchdata" label-width="auto">
                                <el-input v-model="searchdata.kw" placeholder="请输入标题" style="width: 200px; margin-right: 10px;" clearable></el-input>
                                &ensp;<el-button type="success" icon="Search" @click="getNoticeList()">搜索</el-button>
                            </el-form>
                            <br />
                            <el-table :data="noticeList" v-loading="loading.loading" border style="width: 100%;position: relative;z-index: 0 !important;" ref="tableRef">
                                <el-table-column prop="title" label="公告标题" show-overflow-tooltip align="left"></el-table-column>
                                <el-table-column prop="publish_time" label="发布时间" width="180" align="center"></el-table-column>
                                <el-table-column prop="views" label="浏览次数" width="180" align="center"></el-table-column>
                                <el-table-column label="发布状态" width="150" align="center">
                                    <template #default="scope">
                                        <el-switch @change="updateExt(scope.row,'status')" v-model="scope.row.status" style="--el-switch-on-color: #13ce66; --el-switch-off-color: #ccc"
                                                   :active-value="1" :inactive-value="0" inline-prompt active-text="发布" inactive-text="草稿" />
                                    </template>
                                </el-table-column>
                                <el-table-column label="操作选项" fixed="right" min-width="200" :align="alignValue(300)">
                                    <template #default="scope">
                                        <el-button icon="edit" type="primary" @click="editNotice(scope.row.id)"></el-button>
                                        <el-button icon="delete" type="danger" @click="deleteNotice(scope.$index)"></el-button>
                                    </template>
                                </el-table-column>
                            </el-table>
                            <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="searchdata.p" :page-sizes="[20, 30, 40, 50]"
                                           :page-size="searchdata.page_size" layout="total, sizes, prev, pager, next" :total="other.count">
                            </el-pagination>
                        </el-card>
 
                    </el-main>
                </el-container>
            </el-container>
        </div>
    </body>
    <!-- 共用的方法 -->
    <script src="/static/vue/mixin_admin.js"></script>
    <script src="/static/admin/js/notice/index.js?v=<?php echo rand(1000,9999)?>"></script>
 
 
</html>