chengkun
2025-08-19 a4917f837e649e8288f37d386159005a6f415b85
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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
<!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>
                        <input type="hidden" id="notice_id" value="{$other.id}">
                        <el-card style="width: 100%">
                            <template #header>
                                <div class="card-header"><span data-i18n="goods_management">{{notice_title}}</span>
                                </div>
                            </template>
                            <el-form :rules="noticeRules" ref="Form" :model="noticeInfo" :before-close="closeForm" label-width="150px">
                                <el-form-item label="公告标题" prop="title">
                                    <el-input v-model="noticeInfo.title"></el-input>
                                </el-form-item>
                                <el-form-item label="发布时间" prop="publish_time">
                                    <el-date-picker value-format="YYYY-MM-DD hh:mm:ss" type="datetime" v-model="noticeInfo.publish_time" clearable
                                                    placeholder="请输入发布时间"></el-date-picker>
                                </el-form-item>
                                <el-form-item label="公告内容" prop="content">
                                    <textarea class="textarea" :id="'tinymce-content'" v-model="noticeInfo.content" style="height: 300px;"></textarea>
                                </el-form-item>
                                <template v-if="noticeInfo.id && noticeInfo.id>0">
                                    <el-form-item label="公告附件">
 
                                        <el-card style="width: 100%">
                                            <template #header>
                                                <div class="card-header">
 
                                                    <el-upload ref="upload" class="upload-demo" :show-file-list="false" :http-request="uploadAttachment" action="" :auto-upload="true">
                                                        <template #trigger>
                                                            <el-link type="primary" class="header_add_btn" icon="upload-filled" :underline="false" href="javascript:void(0)">
                                                                <span>上传</span>
                                                            </el-link>
                                                        </template>
                                                    </el-upload>
                                                </div>
                                            </template>
                                            <el-table :data="attachmentList" v-loading="loading_attachment" border style="width: 100%" :stripe="true">
                                                <el-table-column prop="title" label="文件名称" align="center">
                                                    <template #default="scope">
                                                        <el-link :href="scope.row.filename" target="_blank" type="success">{{ scope.row.title }}</el-link>
                                                    </template>
                                                </el-table-column>
                                                <el-table-column prop="filesize" label="文件大小" align="center"></el-table-column>
                                                <el-table-column label="操作选项" align="center">
                                                    <template #default="scope">
                                                        <el-button icon="delete" type="danger" @click="deleteAttachment(scope.$index)"></el-button>
                                                    </template>
                                                </el-table-column>
                                            </el-table>
                                        </el-card>
                                    </el-form-item>
                                </template>
                                <el-form-item>
                                    <el-button type="primary" :loading="loading.addLoading" @click="submitForm">
                                        <span v-if="!loading.addLoading">保 存</span>
                                        <span v-else>提 交 中...</span>
                                    </el-button><el-button @click="backForm">返回</el-button>
 
                                </el-form-item>
 
                            </el-form>
                        </el-card>
 
                    </el-main>
                </el-container>
            </el-container>
        </div>
    </body>
    <!-- 共用的方法 -->
    <script src="/static/vue/mixin_admin.js"></script>
    <script src="/static/admin/js/notice/create.js?v=<?php echo rand(1000,9999)?>"></script>
 
 
</html>