From 34a6f2e1f12786d2da4e2db1edd92163e7e5be62 Mon Sep 17 00:00:00 2001
From: RuoYi <yzz_ivy@163.com>
Date: Wed, 01 Sep 2021 14:03:59 +0800
Subject: [PATCH] 查询列表设置数据字典样式回显
---
ruoyi-ui/src/views/system/notice/index.vue | 38 +++++++++++---------------------------
1 files changed, 11 insertions(+), 27 deletions(-)
diff --git a/ruoyi-ui/src/views/system/notice/index.vue b/ruoyi-ui/src/views/system/notice/index.vue
index f3931a4..971412c 100644
--- a/ruoyi-ui/src/views/system/notice/index.vue
+++ b/ruoyi-ui/src/views/system/notice/index.vue
@@ -80,20 +80,16 @@
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">
@@ -176,14 +172,10 @@
</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 {
// 遮罩层
@@ -247,14 +239,6 @@
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() {
--
Gitblit v1.9.3