| | |
| | | </el-select>
|
| | | </el-form-item>
|
| | | <el-form-item>
|
| | | <el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
| | | <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
| | | <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
| | | </el-form-item>
|
| | | </el-form>
|
| | |
| | | <el-col :span="1.5">
|
| | | <el-button
|
| | | type="primary"
|
| | | plain
|
| | | icon="el-icon-plus"
|
| | | size="mini"
|
| | | @click="handleAdd"
|
| | |
| | | <el-col :span="1.5">
|
| | | <el-button
|
| | | type="success"
|
| | | plain
|
| | | icon="el-icon-edit"
|
| | | size="mini"
|
| | | :disabled="single"
|
| | |
| | | <el-col :span="1.5">
|
| | | <el-button
|
| | | type="danger"
|
| | | plain
|
| | | icon="el-icon-delete"
|
| | | size="mini"
|
| | | :disabled="multiple"
|
| | |
| | | prop="noticeTitle"
|
| | | :show-overflow-tooltip="true"
|
| | | />
|
| | | <el-table-column
|
| | | label="公告类型"
|
| | | align="center"
|
| | | prop="noticeType"
|
| | | :formatter="typeFormat"
|
| | | width="100"
|
| | | />
|
| | | <el-table-column
|
| | | label="状态"
|
| | | align="center"
|
| | | prop="status"
|
| | | :formatter="statusFormat"
|
| | | width="100"
|
| | | />
|
| | | <el-table-column label="公告类型" align="center" prop="noticeType" width="100">
|
| | | <template slot-scope="scope">
|
| | | <dict-tag :options="typeOptions" :value="scope.row.noticeType"/>
|
| | | </template>
|
| | | </el-table-column>
|
| | | <el-table-column label="状态" align="center" prop="status" width="100">
|
| | | <template slot-scope="scope">
|
| | | <dict-tag :options="statusOptions" :value="scope.row.status"/>
|
| | | </template>
|
| | | </el-table-column>
|
| | | <el-table-column label="创建者" align="center" prop="createBy" width="100" />
|
| | | <el-table-column label="创建时间" align="center" prop="createTime" width="100">
|
| | | <template slot-scope="scope">
|
| | |
| | | </template>
|
| | |
|
| | | <script>
|
| | | import { listNotice, getNotice, delNotice, addNotice, updateNotice, exportNotice } from "@/api/system/notice";
|
| | | import Editor from '@/components/Editor';
|
| | | import { listNotice, getNotice, delNotice, addNotice, updateNotice } from "@/api/system/notice";
|
| | |
|
| | | export default {
|
| | | name: "Notice",
|
| | | components: {
|
| | | Editor
|
| | | },
|
| | | data() {
|
| | | return {
|
| | | // 遮罩层
|
| | |
| | | { required: true, message: "公告标题不能为空", trigger: "blur" }
|
| | | ],
|
| | | noticeType: [
|
| | | { required: true, message: "公告类型不能为空", trigger: "blur" }
|
| | | { required: true, message: "公告类型不能为空", trigger: "change" }
|
| | | ]
|
| | | }
|
| | | };
|
| | |
| | | this.total = response.total;
|
| | | this.loading = false;
|
| | | });
|
| | | },
|
| | | // 公告状态字典翻译
|
| | | statusFormat(row, column) {
|
| | | return this.selectDictLabel(this.statusOptions, row.status);
|
| | | },
|
| | | // 公告状态字典翻译
|
| | | typeFormat(row, column) {
|
| | | return this.selectDictLabel(this.typeOptions, row.noticeType);
|
| | | },
|
| | | // 取消按钮
|
| | | cancel() {
|
| | |
| | | }).then(() => {
|
| | | this.getList();
|
| | | this.msgSuccess("删除成功");
|
| | | })
|
| | | }).catch(() => {});
|
| | | }
|
| | | }
|
| | | };
|