|
@@ -49,7 +49,7 @@
|
|
</el-row>
|
|
</el-row>
|
|
|
|
|
|
<el-table v-loading="loading" :data="noticeList">
|
|
<el-table v-loading="loading" :data="noticeList">
|
|
- <el-table-column label="序号" align="center" prop="noticeId" width="100" />
|
|
|
|
|
|
+ <el-table-column label="序号" align="center" prop="id" width="100" />
|
|
<el-table-column
|
|
<el-table-column
|
|
label="公告标题"
|
|
label="公告标题"
|
|
align="center"
|
|
align="center"
|
|
@@ -117,11 +117,11 @@
|
|
<el-form-item label="公告类型" prop="type">
|
|
<el-form-item label="公告类型" prop="type">
|
|
<el-select v-model="form.type" placeholder="请选择">
|
|
<el-select v-model="form.type" placeholder="请选择">
|
|
<el-option
|
|
<el-option
|
|
- v-for="dict in typeOptions"
|
|
|
|
- :key="dict.dictValue"
|
|
|
|
- :label="dict.dictLabel"
|
|
|
|
- :value="dict.dictValue"
|
|
|
|
- ></el-option>
|
|
|
|
|
|
+ v-for="dict in noticeTypeDictDatas"
|
|
|
|
+ :key="parseInt(dict.value)"
|
|
|
|
+ :label="dict.label"
|
|
|
|
+ :value="parseInt(dict.value)"
|
|
|
|
+ />
|
|
</el-select>
|
|
</el-select>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-col>
|
|
@@ -131,9 +131,9 @@
|
|
<el-radio
|
|
<el-radio
|
|
v-for="dict in statusDictDatas"
|
|
v-for="dict in statusDictDatas"
|
|
:key="parseInt(dict.value)"
|
|
:key="parseInt(dict.value)"
|
|
- :label="dict.label"
|
|
|
|
- :value="parseInt(dict.value)"
|
|
|
|
|
|
+ :label="parseInt(dict.value)"
|
|
>{{dict.label}}</el-radio>
|
|
>{{dict.label}}</el-radio>
|
|
|
|
+ </el-radio-group>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-col>
|
|
<el-col :span="24">
|
|
<el-col :span="24">
|
|
@@ -177,10 +177,6 @@ export default {
|
|
title: "",
|
|
title: "",
|
|
// 是否显示弹出层
|
|
// 是否显示弹出层
|
|
open: false,
|
|
open: false,
|
|
- // 类型数据字典
|
|
|
|
- statusOptions: [],
|
|
|
|
- // 状态数据字典
|
|
|
|
- typeOptions: [],
|
|
|
|
// 查询参数
|
|
// 查询参数
|
|
queryParams: {
|
|
queryParams: {
|
|
pageNo: 1,
|
|
pageNo: 1,
|
|
@@ -227,7 +223,7 @@ export default {
|
|
},
|
|
},
|
|
// 公告状态字典翻译
|
|
// 公告状态字典翻译
|
|
typeFormat(row, column) {
|
|
typeFormat(row, column) {
|
|
- return getDictDataLabel(DICT_TYPE.SYS_NOTICE_TYPE, row.status)
|
|
|
|
|
|
+ return getDictDataLabel(DICT_TYPE.SYS_NOTICE_TYPE, row.type)
|
|
},
|
|
},
|
|
// 取消按钮
|
|
// 取消按钮
|
|
cancel() {
|
|
cancel() {
|
|
@@ -237,7 +233,7 @@ export default {
|
|
// 表单重置
|
|
// 表单重置
|
|
reset() {
|
|
reset() {
|
|
this.form = {
|
|
this.form = {
|
|
- noticeId: undefined,
|
|
|
|
|
|
+ id: undefined,
|
|
title: undefined,
|
|
title: undefined,
|
|
type: undefined,
|
|
type: undefined,
|
|
content: undefined,
|
|
content: undefined,
|
|
@@ -264,8 +260,8 @@ export default {
|
|
/** 修改按钮操作 */
|
|
/** 修改按钮操作 */
|
|
handleUpdate(row) {
|
|
handleUpdate(row) {
|
|
this.reset();
|
|
this.reset();
|
|
- const noticeId = row.noticeId || this.ids
|
|
|
|
- getNotice(noticeId).then(response => {
|
|
|
|
|
|
+ const id = row.id || this.ids
|
|
|
|
+ getNotice(id).then(response => {
|
|
this.form = response.data;
|
|
this.form = response.data;
|
|
this.open = true;
|
|
this.open = true;
|
|
this.title = "修改公告";
|
|
this.title = "修改公告";
|
|
@@ -275,7 +271,7 @@ export default {
|
|
submitForm: function() {
|
|
submitForm: function() {
|
|
this.$refs["form"].validate(valid => {
|
|
this.$refs["form"].validate(valid => {
|
|
if (valid) {
|
|
if (valid) {
|
|
- if (this.form.noticeId !== undefined) {
|
|
|
|
|
|
+ if (this.form.id !== undefined) {
|
|
updateNotice(this.form).then(response => {
|
|
updateNotice(this.form).then(response => {
|
|
this.msgSuccess("修改成功");
|
|
this.msgSuccess("修改成功");
|
|
this.open = false;
|
|
this.open = false;
|
|
@@ -293,13 +289,13 @@ export default {
|
|
},
|
|
},
|
|
/** 删除按钮操作 */
|
|
/** 删除按钮操作 */
|
|
handleDelete(row) {
|
|
handleDelete(row) {
|
|
- const noticeIds = row.noticeId || this.ids
|
|
|
|
- this.$confirm('是否确认删除公告编号为"' + noticeIds + '"的数据项?', "警告", {
|
|
|
|
|
|
+ const ids = row.id || this.ids
|
|
|
|
+ this.$confirm('是否确认删除公告编号为"' + ids + '"的数据项?', "警告", {
|
|
confirmButtonText: "确定",
|
|
confirmButtonText: "确定",
|
|
cancelButtonText: "取消",
|
|
cancelButtonText: "取消",
|
|
type: "warning"
|
|
type: "warning"
|
|
}).then(function() {
|
|
}).then(function() {
|
|
- return delNotice(noticeIds);
|
|
|
|
|
|
+ return delNotice(ids);
|
|
}).then(() => {
|
|
}).then(() => {
|
|
this.getList();
|
|
this.getList();
|
|
this.msgSuccess("删除成功");
|
|
this.msgSuccess("删除成功");
|