|
@@ -36,6 +36,7 @@
|
|
|
<el-table-column type="index" :index="index" label="编号" width="60" align="center" fixed="left"
|
|
<el-table-column type="index" :index="index" label="编号" width="60" align="center" fixed="left"
|
|
|
show-overflow-tooltip />
|
|
show-overflow-tooltip />
|
|
|
<el-table-column prop="title" label="通知标题" sortable="custom" show-overflow-tooltip min-width="250" />
|
|
<el-table-column prop="title" label="通知标题" sortable="custom" show-overflow-tooltip min-width="250" />
|
|
|
|
|
+ <el-table-column prop="author" label="发布者" sortable="custom" show-overflow-tooltip min-width="120" />
|
|
|
<el-table-column prop="status" label="通知状态" sortable="custom" :resizable="false" min-width="120">
|
|
<el-table-column prop="status" label="通知状态" sortable="custom" :resizable="false" min-width="120">
|
|
|
<template slot-scope="{row}">
|
|
<template slot-scope="{row}">
|
|
|
<el-switch v-model="row.status" @change="editStatus(row)" :active-value="1" :inactive-value="2" />
|
|
<el-switch v-model="row.status" @change="editStatus(row)" :active-value="1" :inactive-value="2" />
|
|
@@ -62,8 +63,8 @@
|
|
|
</ele-data-table>
|
|
</ele-data-table>
|
|
|
</el-card>
|
|
</el-card>
|
|
|
<!-- 编辑弹窗 -->
|
|
<!-- 编辑弹窗 -->
|
|
|
- <el-dialog :title="editForm.id ? '修改通知' : '修改通知'" :visible.sync="showEdit" width="600px"
|
|
|
|
|
- @closed="editForm = { source: 1, status: 1 }" :destroy-on-close="true" custom-class="ele-dialog-form"
|
|
|
|
|
|
|
+ <el-dialog :title="editForm.id ? '修改通知' : '新增通知'" :visible.sync="showEdit" width="600px"
|
|
|
|
|
+ @closed="editForm = { source: 1, status: 1, author: '' }" :destroy-on-close="true" custom-class="ele-dialog-form"
|
|
|
:lock-scroll="false">
|
|
:lock-scroll="false">
|
|
|
<el-form :model="editForm" ref="editForm" :rules="editRules" label-width="82px">
|
|
<el-form :model="editForm" ref="editForm" :rules="editRules" label-width="82px">
|
|
|
<el-row :gutter="15">
|
|
<el-row :gutter="15">
|
|
@@ -71,6 +72,9 @@
|
|
|
<el-form-item label="通知标题:" prop="title">
|
|
<el-form-item label="通知标题:" prop="title">
|
|
|
<el-input v-model="editForm.title" placeholder="请输入通知标题" clearable />
|
|
<el-input v-model="editForm.title" placeholder="请输入通知标题" clearable />
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
|
|
+ <el-form-item label="发布者:" prop="author">
|
|
|
|
|
+ <el-input v-model="editForm.author" placeholder="请输入发布者" clearable />
|
|
|
|
|
+ </el-form-item>
|
|
|
<el-form-item label="通知状态:">
|
|
<el-form-item label="通知状态:">
|
|
|
<el-radio-group v-model="editForm.status">
|
|
<el-radio-group v-model="editForm.status">
|
|
|
<el-radio :label="1">正常</el-radio>
|
|
<el-radio :label="1">正常</el-radio>
|
|
@@ -101,7 +105,7 @@ export default {
|
|
|
table: { url: '/notice/index', where: {} }, // 表格配置
|
|
table: { url: '/notice/index', where: {} }, // 表格配置
|
|
|
choose: [], // 表格选中数据
|
|
choose: [], // 表格选中数据
|
|
|
showEdit: false, // 是否显示表单弹窗
|
|
showEdit: false, // 是否显示表单弹窗
|
|
|
- editForm: { source: 1, status: 1 }, // 表单数据
|
|
|
|
|
|
|
+ editForm: { source: 1, status: 1, author: '' }, // 表单数据
|
|
|
editRules: { // 表单验证规则
|
|
editRules: { // 表单验证规则
|
|
|
title: [
|
|
title: [
|
|
|
{ required: true, message: '请输入通知标题', trigger: 'blur' }
|
|
{ required: true, message: '请输入通知标题', trigger: 'blur' }
|