Просмотр исходного кода

查询列表设置数据字典样式回显

RuoYi лет назад: 4
Родитель
Сommit
34a6f2e1f1

+ 5 - 15
ruoyi-modules/ruoyi-gen/src/main/resources/vm/vue/index-tree.vue.vm

@@ -106,7 +106,11 @@
106
         </template>
106
         </template>
107
       </el-table-column>
107
       </el-table-column>
108
 #elseif($column.list && "" != $column.dictType)
108
 #elseif($column.list && "" != $column.dictType)
109
-      <el-table-column label="${comment}" align="center" prop="${javaField}" :formatter="${javaField}Format" />
109
+      <el-table-column label="${comment}" align="center" prop="${javaField}">
110
+        <template slot-scope="scope">
111
+          <dict-tag :options="${javaField}Options" :value="scope.row.${javaField}"/>
112
+        </template>
113
+      </el-table-column>
110
 #elseif($column.list && "" != $javaField)
114
 #elseif($column.list && "" != $javaField)
111
 #if(${foreach.index} == 1)
115
 #if(${foreach.index} == 1)
112
       <el-table-column label="${comment}" prop="${javaField}" />
116
       <el-table-column label="${comment}" prop="${javaField}" />
@@ -378,20 +382,6 @@ export default {
378
         this.${businessName}Options.push(data);
382
         this.${businessName}Options.push(data);
379
       });
383
       });
380
     },
384
     },
381
-#foreach ($column in $columns)
382
-#if(${column.dictType} != '')
383
-#set($parentheseIndex=$column.columnComment.indexOf("("))
384
-#if($parentheseIndex != -1)
385
-#set($comment=$column.columnComment.substring(0, $parentheseIndex))
386
-#else
387
-#set($comment=$column.columnComment)
388
-#end
389
-    // $comment字典翻译
390
-    ${column.javaField}Format(row, column) {
391
-      return this.selectDictLabel#if($column.htmlType == "checkbox")s#end(this.${column.javaField}Options, row.${column.javaField});
392
-    },
393
-#end
394
-#end
395
     // 取消按钮
385
     // 取消按钮
396
     cancel() {
386
     cancel() {
397
       this.open = false;
387
       this.open = false;

+ 5 - 15
ruoyi-modules/ruoyi-gen/src/main/resources/vm/vue/index.vue.vm

@@ -134,7 +134,11 @@
134
         </template>
134
         </template>
135
       </el-table-column>
135
       </el-table-column>
136
 #elseif($column.list && "" != $column.dictType)
136
 #elseif($column.list && "" != $column.dictType)
137
-      <el-table-column label="${comment}" align="center" prop="${javaField}" :formatter="${javaField}Format" />
137
+      <el-table-column label="${comment}" align="center" prop="${javaField}">
138
+        <template slot-scope="scope">
139
+          <dict-tag :options="${javaField}Options" :value="scope.row.${javaField}"/>
140
+        </template>
141
+      </el-table-column>
138
 #elseif($column.list && "" != $javaField)
142
 #elseif($column.list && "" != $javaField)
139
       <el-table-column label="${comment}" align="center" prop="${javaField}" />
143
       <el-table-column label="${comment}" align="center" prop="${javaField}" />
140
 #end
144
 #end
@@ -423,20 +427,6 @@ export default {
423
         this.loading = false;
427
         this.loading = false;
424
       });
428
       });
425
     },
429
     },
426
-#foreach ($column in $columns)
427
-#if(${column.dictType} != '')
428
-#set($parentheseIndex=$column.columnComment.indexOf("("))
429
-#if($parentheseIndex != -1)
430
-#set($comment=$column.columnComment.substring(0, $parentheseIndex))
431
-#else
432
-#set($comment=$column.columnComment)
433
-#end
434
-    // $comment字典翻译
435
-    ${column.javaField}Format(row, column) {
436
-      return this.selectDictLabel#if($column.htmlType == "checkbox")s#end(this.${column.javaField}Options, row.${column.javaField});
437
-    },
438
-#end
439
-#end
440
     // 取消按钮
430
     // 取消按钮
441
     cancel() {
431
     cancel() {
442
       this.open = false;
432
       this.open = false;

+ 5 - 5
ruoyi-ui/src/views/monitor/job/index.vue

@@ -96,7 +96,11 @@
96
       <el-table-column type="selection" width="55" align="center" />
96
       <el-table-column type="selection" width="55" align="center" />
97
       <el-table-column label="任务编号" align="center" prop="jobId" />
97
       <el-table-column label="任务编号" align="center" prop="jobId" />
98
       <el-table-column label="任务名称" align="center" prop="jobName" :show-overflow-tooltip="true" />
98
       <el-table-column label="任务名称" align="center" prop="jobName" :show-overflow-tooltip="true" />
99
-      <el-table-column label="任务组名" align="center" prop="jobGroup" :formatter="jobGroupFormat" />
99
+      <el-table-column label="任务组名" align="center" prop="jobGroup">
100
+        <template slot-scope="scope">
101
+          <dict-tag :options="jobGroupOptions" :value="scope.row.jobGroup"/>
102
+        </template>
103
+      </el-table-column>
100
       <el-table-column label="调用目标字符串" align="center" prop="invokeTarget" :show-overflow-tooltip="true" />
104
       <el-table-column label="调用目标字符串" align="center" prop="invokeTarget" :show-overflow-tooltip="true" />
101
       <el-table-column label="cron执行表达式" align="center" prop="cronExpression" :show-overflow-tooltip="true" />
105
       <el-table-column label="cron执行表达式" align="center" prop="cronExpression" :show-overflow-tooltip="true" />
102
       <el-table-column label="状态" align="center">
106
       <el-table-column label="状态" align="center">
@@ -356,10 +360,6 @@ export default {
356
     jobGroupFormat(row, column) {
360
     jobGroupFormat(row, column) {
357
       return this.selectDictLabel(this.jobGroupOptions, row.jobGroup);
361
       return this.selectDictLabel(this.jobGroupOptions, row.jobGroup);
358
     },
362
     },
359
-    // 状态字典翻译
360
-    statusFormat(row, column) {
361
-      return this.selectDictLabel(this.statusOptions, row.status);
362
-    },
363
     // 取消按钮
363
     // 取消按钮
364
     cancel() {
364
     cancel() {
365
       this.open = false;
365
       this.open = false;

+ 12 - 12
ruoyi-ui/src/views/monitor/job/log.vue

@@ -109,10 +109,18 @@
109
       <el-table-column type="selection" width="55" align="center" />
109
       <el-table-column type="selection" width="55" align="center" />
110
       <el-table-column label="日志编号" width="80" align="center" prop="jobLogId" />
110
       <el-table-column label="日志编号" width="80" align="center" prop="jobLogId" />
111
       <el-table-column label="任务名称" align="center" prop="jobName" :show-overflow-tooltip="true" />
111
       <el-table-column label="任务名称" align="center" prop="jobName" :show-overflow-tooltip="true" />
112
-      <el-table-column label="任务组名" align="center" prop="jobGroup" :formatter="jobGroupFormat" :show-overflow-tooltip="true" />
112
+      <el-table-column label="任务组名" align="center" prop="jobGroup" :show-overflow-tooltip="true">
113
+        <template slot-scope="scope">
114
+          <dict-tag :options="jobGroupOptions" :value="scope.row.jobGroup"/>
115
+        </template>
116
+      </el-table-column>
113
       <el-table-column label="调用目标字符串" align="center" prop="invokeTarget" :show-overflow-tooltip="true" />
117
       <el-table-column label="调用目标字符串" align="center" prop="invokeTarget" :show-overflow-tooltip="true" />
114
       <el-table-column label="日志信息" align="center" prop="jobMessage" :show-overflow-tooltip="true" />
118
       <el-table-column label="日志信息" align="center" prop="jobMessage" :show-overflow-tooltip="true" />
115
-      <el-table-column label="执行状态" align="center" prop="status" :formatter="statusFormat" />
119
+      <el-table-column label="执行状态" align="center" prop="status">
120
+        <template slot-scope="scope">
121
+          <dict-tag :options="statusOptions" :value="scope.row.status"/>
122
+        </template>
123
+      </el-table-column>
116
       <el-table-column label="执行时间" align="center" prop="createTime" width="180">
124
       <el-table-column label="执行时间" align="center" prop="createTime" width="180">
117
         <template slot-scope="scope">
125
         <template slot-scope="scope">
118
           <span>{{ parseTime(scope.row.createTime) }}</span>
126
           <span>{{ parseTime(scope.row.createTime) }}</span>
@@ -244,14 +252,6 @@ export default {
244
         }
252
         }
245
       );
253
       );
246
     },
254
     },
247
-    // 执行状态字典翻译
248
-    statusFormat(row, column) {
249
-      return this.selectDictLabel(this.statusOptions, row.status);
250
-    },
251
-    // 任务组名字典翻译
252
-    jobGroupFormat(row, column) {
253
-      return this.selectDictLabel(this.jobGroupOptions, row.jobGroup);
254
-    },
255
     // 返回按钮
255
     // 返回按钮
256
     handleClose() {
256
     handleClose() {
257
       this.$store.dispatch("tagsView/delView", this.$route);
257
       this.$store.dispatch("tagsView/delView", this.$route);
@@ -290,7 +290,7 @@ export default {
290
         }).then(() => {
290
         }).then(() => {
291
           this.getList();
291
           this.getList();
292
           this.msgSuccess("删除成功");
292
           this.msgSuccess("删除成功");
293
-        })
293
+        }).catch(() => {});
294
     },
294
     },
295
     /** 清空按钮操作 */
295
     /** 清空按钮操作 */
296
     handleClean() {
296
     handleClean() {
@@ -303,7 +303,7 @@ export default {
303
         }).then(() => {
303
         }).then(() => {
304
           this.getList();
304
           this.getList();
305
           this.msgSuccess("清空成功");
305
           this.msgSuccess("清空成功");
306
-        })
306
+        }).catch(() => {});
307
     },
307
     },
308
     /** 导出按钮操作 */
308
     /** 导出按钮操作 */
309
     handleExport() {
309
     handleExport() {

+ 5 - 5
ruoyi-ui/src/views/system/config/index.vue

@@ -111,7 +111,11 @@
111
       <el-table-column label="参数名称" align="center" prop="configName" :show-overflow-tooltip="true" />
111
       <el-table-column label="参数名称" align="center" prop="configName" :show-overflow-tooltip="true" />
112
       <el-table-column label="参数键名" align="center" prop="configKey" :show-overflow-tooltip="true" />
112
       <el-table-column label="参数键名" align="center" prop="configKey" :show-overflow-tooltip="true" />
113
       <el-table-column label="参数键值" align="center" prop="configValue" />
113
       <el-table-column label="参数键值" align="center" prop="configValue" />
114
-      <el-table-column label="系统内置" align="center" prop="configType" :formatter="typeFormat" />
114
+      <el-table-column label="系统内置" align="center" prop="configType">
115
+        <template slot-scope="scope">
116
+          <dict-tag :options="typeOptions" :value="scope.row.configType"/>
117
+        </template>
118
+      </el-table-column>
115
       <el-table-column label="备注" align="center" prop="remark" :show-overflow-tooltip="true" />
119
       <el-table-column label="备注" align="center" prop="remark" :show-overflow-tooltip="true" />
116
       <el-table-column label="创建时间" align="center" prop="createTime" width="180">
120
       <el-table-column label="创建时间" align="center" prop="createTime" width="180">
117
         <template slot-scope="scope">
121
         <template slot-scope="scope">
@@ -249,10 +253,6 @@ export default {
249
         }
253
         }
250
       );
254
       );
251
     },
255
     },
252
-    // 参数系统内置字典翻译
253
-    typeFormat(row, column) {
254
-      return this.selectDictLabel(this.typeOptions, row.configType);
255
-    },
256
     // 取消按钮
256
     // 取消按钮
257
     cancel() {
257
     cancel() {
258
       this.open = false;
258
       this.open = false;

+ 13 - 13
ruoyi-ui/src/views/system/dept/index.vue

@@ -49,7 +49,11 @@
49
     >
49
     >
50
       <el-table-column prop="deptName" label="部门名称" width="260"></el-table-column>
50
       <el-table-column prop="deptName" label="部门名称" width="260"></el-table-column>
51
       <el-table-column prop="orderNum" label="排序" width="200"></el-table-column>
51
       <el-table-column prop="orderNum" label="排序" width="200"></el-table-column>
52
-      <el-table-column prop="status" label="状态" :formatter="statusFormat" width="100"></el-table-column>
52
+      <el-table-column prop="status" label="状态" width="100">
53
+        <template slot-scope="scope">
54
+          <dict-tag :options="statusOptions" :value="scope.row.status"/>
55
+        </template>
56
+      </el-table-column>
53
       <el-table-column label="创建时间" align="center" prop="createTime" width="200">
57
       <el-table-column label="创建时间" align="center" prop="createTime" width="200">
54
         <template slot-scope="scope">
58
         <template slot-scope="scope">
55
           <span>{{ parseTime(scope.row.createTime) }}</span>
59
           <span>{{ parseTime(scope.row.createTime) }}</span>
@@ -57,17 +61,17 @@
57
       </el-table-column>
61
       </el-table-column>
58
       <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
62
       <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
59
         <template slot-scope="scope">
63
         <template slot-scope="scope">
60
-          <el-button 
61
-            size="mini" 
62
-            type="text" 
63
-            icon="el-icon-edit" 
64
+          <el-button
65
+            size="mini"
66
+            type="text"
67
+            icon="el-icon-edit"
64
             @click="handleUpdate(scope.row)"
68
             @click="handleUpdate(scope.row)"
65
             v-hasPermi="['system:dept:edit']"
69
             v-hasPermi="['system:dept:edit']"
66
           >修改</el-button>
70
           >修改</el-button>
67
-          <el-button 
68
-            size="mini" 
69
-            type="text" 
70
-            icon="el-icon-plus" 
71
+          <el-button
72
+            size="mini"
73
+            type="text"
74
+            icon="el-icon-plus"
71
             @click="handleAdd(scope.row)"
75
             @click="handleAdd(scope.row)"
72
             v-hasPermi="['system:dept:add']"
76
             v-hasPermi="['system:dept:add']"
73
           >新增</el-button>
77
           >新增</el-button>
@@ -223,10 +227,6 @@ export default {
223
         children: node.children
227
         children: node.children
224
       };
228
       };
225
     },
229
     },
226
-    // 字典状态字典翻译
227
-    statusFormat(row, column) {
228
-      return this.selectDictLabel(this.statusOptions, row.status);
229
-    },
230
     // 取消按钮
230
     // 取消按钮
231
     cancel() {
231
     cancel() {
232
       this.open = false;
232
       this.open = false;

+ 5 - 5
ruoyi-ui/src/views/system/logininfor/index.vue

@@ -95,7 +95,11 @@
95
       <el-table-column label="访问编号" align="center" prop="infoId" />
95
       <el-table-column label="访问编号" align="center" prop="infoId" />
96
       <el-table-column label="用户名称" align="center" prop="userName" :show-overflow-tooltip="true" sortable="custom" :sort-orders="['descending', 'ascending']" />
96
       <el-table-column label="用户名称" align="center" prop="userName" :show-overflow-tooltip="true" sortable="custom" :sort-orders="['descending', 'ascending']" />
97
       <el-table-column label="地址" align="center" prop="ipaddr" width="130" :show-overflow-tooltip="true" />
97
       <el-table-column label="地址" align="center" prop="ipaddr" width="130" :show-overflow-tooltip="true" />
98
-      <el-table-column label="状态" align="center" prop="status" :formatter="statusFormat" />
98
+      <el-table-column label="登录状态" align="center" prop="status">
99
+        <template slot-scope="scope">
100
+          <dict-tag :options="statusOptions" :value="scope.row.status"/>
101
+        </template>
102
+      </el-table-column>
99
       <el-table-column label="描述" align="center" prop="msg" />
103
       <el-table-column label="描述" align="center" prop="msg" />
100
       <el-table-column label="访问时间" align="center" prop="accessTime" sortable="custom" :sort-orders="['descending', 'ascending']" width="180">
104
       <el-table-column label="访问时间" align="center" prop="accessTime" sortable="custom" :sort-orders="['descending', 'ascending']" width="180">
101
         <template slot-scope="scope">
105
         <template slot-scope="scope">
@@ -166,10 +170,6 @@ export default {
166
         }
170
         }
167
       );
171
       );
168
     },
172
     },
169
-    // 登录状态字典翻译
170
-    statusFormat(row, column) {
171
-      return this.selectDictLabel(this.statusOptions, row.status);
172
-    },
173
     /** 搜索按钮操作 */
173
     /** 搜索按钮操作 */
174
     handleQuery() {
174
     handleQuery() {
175
       this.queryParams.pageNum = 1;
175
       this.queryParams.pageNum = 1;

+ 13 - 23
ruoyi-ui/src/views/system/menu/index.vue

@@ -55,7 +55,11 @@
55
       <el-table-column prop="orderNum" label="排序" width="60"></el-table-column>
55
       <el-table-column prop="orderNum" label="排序" width="60"></el-table-column>
56
       <el-table-column prop="perms" label="权限标识" :show-overflow-tooltip="true"></el-table-column>
56
       <el-table-column prop="perms" label="权限标识" :show-overflow-tooltip="true"></el-table-column>
57
       <el-table-column prop="component" label="组件路径" :show-overflow-tooltip="true"></el-table-column>
57
       <el-table-column prop="component" label="组件路径" :show-overflow-tooltip="true"></el-table-column>
58
-      <el-table-column prop="status" label="状态" :formatter="statusFormat" width="80"></el-table-column>
58
+      <el-table-column prop="status" label="状态" width="80">
59
+        <template slot-scope="scope">
60
+          <dict-tag :options="statusOptions" :value="scope.row.status"/>
61
+        </template>
62
+      </el-table-column>
59
       <el-table-column label="创建时间" align="center" prop="createTime">
63
       <el-table-column label="创建时间" align="center" prop="createTime">
60
         <template slot-scope="scope">
64
         <template slot-scope="scope">
61
           <span>{{ parseTime(scope.row.createTime) }}</span>
65
           <span>{{ parseTime(scope.row.createTime) }}</span>
@@ -63,16 +67,16 @@
63
       </el-table-column>
67
       </el-table-column>
64
       <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
68
       <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
65
         <template slot-scope="scope">
69
         <template slot-scope="scope">
66
-          <el-button size="mini" 
67
-            type="text" 
68
-            icon="el-icon-edit" 
70
+          <el-button size="mini"
71
+            type="text"
72
+            icon="el-icon-edit"
69
             @click="handleUpdate(scope.row)"
73
             @click="handleUpdate(scope.row)"
70
             v-hasPermi="['system:menu:edit']"
74
             v-hasPermi="['system:menu:edit']"
71
           >修改</el-button>
75
           >修改</el-button>
72
-          <el-button 
73
-            size="mini" 
74
-            type="text" 
75
-            icon="el-icon-plus" 
76
+          <el-button
77
+            size="mini"
78
+            type="text"
79
+            icon="el-icon-plus"
76
             @click="handleAdd(scope.row)"
80
             @click="handleAdd(scope.row)"
77
             v-hasPermi="['system:menu:add']"
81
             v-hasPermi="['system:menu:add']"
78
           >新增</el-button>
82
           >新增</el-button>
@@ -338,20 +342,6 @@ export default {
338
         this.menuOptions.push(menu);
342
         this.menuOptions.push(menu);
339
       });
343
       });
340
     },
344
     },
341
-    // 显示状态字典翻译
342
-    visibleFormat(row, column) {
343
-      if (row.menuType == "F") {
344
-        return "";
345
-      }
346
-      return this.selectDictLabel(this.visibleOptions, row.visible);
347
-    },
348
-    // 菜单状态字典翻译
349
-    statusFormat(row, column) {
350
-      if (row.menuType == "F") {
351
-        return "";
352
-      }
353
-      return this.selectDictLabel(this.statusOptions, row.status);
354
-    },
355
     // 取消按钮
345
     // 取消按钮
356
     cancel() {
346
     cancel() {
357
       this.open = false;
347
       this.open = false;
@@ -439,4 +429,4 @@ export default {
439
     }
429
     }
440
   }
430
   }
441
 };
431
 };
442
-</script>
432
+</script>

+ 10 - 22
ruoyi-ui/src/views/system/notice/index.vue

@@ -80,20 +80,16 @@
80
         prop="noticeTitle"
80
         prop="noticeTitle"
81
         :show-overflow-tooltip="true"
81
         :show-overflow-tooltip="true"
82
       />
82
       />
83
-      <el-table-column
84
-        label="公告类型"
85
-        align="center"
86
-        prop="noticeType"
87
-        :formatter="typeFormat"
88
-        width="100"
89
-      />
90
-      <el-table-column
91
-        label="状态"
92
-        align="center"
93
-        prop="status"
94
-        :formatter="statusFormat"
95
-        width="100"
96
-      />
83
+      <el-table-column label="公告类型" align="center" prop="noticeType" width="100">
84
+        <template slot-scope="scope">
85
+          <dict-tag :options="typeOptions" :value="scope.row.noticeType"/>
86
+        </template>
87
+      </el-table-column>
88
+      <el-table-column label="状态" align="center" prop="status" width="100">
89
+        <template slot-scope="scope">
90
+          <dict-tag :options="statusOptions" :value="scope.row.status"/>
91
+        </template>
92
+      </el-table-column>
97
       <el-table-column label="创建者" align="center" prop="createBy" width="100" />
93
       <el-table-column label="创建者" align="center" prop="createBy" width="100" />
98
       <el-table-column label="创建时间" align="center" prop="createTime" width="100">
94
       <el-table-column label="创建时间" align="center" prop="createTime" width="100">
99
         <template slot-scope="scope">
95
         <template slot-scope="scope">
@@ -244,14 +240,6 @@ export default {
244
         this.loading = false;
240
         this.loading = false;
245
       });
241
       });
246
     },
242
     },
247
-    // 公告状态字典翻译
248
-    statusFormat(row, column) {
249
-      return this.selectDictLabel(this.statusOptions, row.status);
250
-    },
251
-    // 公告状态字典翻译
252
-    typeFormat(row, column) {
253
-      return this.selectDictLabel(this.typeOptions, row.noticeType);
254
-    },
255
     // 取消按钮
243
     // 取消按钮
256
     cancel() {
244
     cancel() {
257
       this.open = false;
245
       this.open = false;

+ 10 - 6
ruoyi-ui/src/views/system/operlog/index.vue

@@ -110,11 +110,19 @@
110
       <el-table-column type="selection" width="55" align="center" />
110
       <el-table-column type="selection" width="55" align="center" />
111
       <el-table-column label="日志编号" align="center" prop="operId" />
111
       <el-table-column label="日志编号" align="center" prop="operId" />
112
       <el-table-column label="系统模块" align="center" prop="title" />
112
       <el-table-column label="系统模块" align="center" prop="title" />
113
-      <el-table-column label="操作类型" align="center" prop="businessType" :formatter="typeFormat" />
113
+      <el-table-column label="操作类型" align="center" prop="businessType">
114
+        <template slot-scope="scope">
115
+          <dict-tag :options="typeOptions" :value="scope.row.businessType"/>
116
+        </template>
117
+      </el-table-column>
114
       <el-table-column label="请求方式" align="center" prop="requestMethod" />
118
       <el-table-column label="请求方式" align="center" prop="requestMethod" />
115
       <el-table-column label="操作人员" align="center" prop="operName" :show-overflow-tooltip="true" sortable="custom" :sort-orders="['descending', 'ascending']" width="100"/>
119
       <el-table-column label="操作人员" align="center" prop="operName" :show-overflow-tooltip="true" sortable="custom" :sort-orders="['descending', 'ascending']" width="100"/>
116
       <el-table-column label="主机" align="center" prop="operIp" width="130" :show-overflow-tooltip="true" />
120
       <el-table-column label="主机" align="center" prop="operIp" width="130" :show-overflow-tooltip="true" />
117
-      <el-table-column label="操作状态" align="center" prop="status" :formatter="statusFormat" />
121
+      <el-table-column label="操作状态" align="center" prop="status">
122
+        <template slot-scope="scope">
123
+          <dict-tag :options="statusOptions" :value="scope.row.status"/>
124
+        </template>
125
+      </el-table-column>
118
       <el-table-column label="操作日期" align="center" prop="operTime" sortable="custom" :sort-orders="['descending', 'ascending']" width="180">
126
       <el-table-column label="操作日期" align="center" prop="operTime" sortable="custom" :sort-orders="['descending', 'ascending']" width="180">
119
         <template slot-scope="scope">
127
         <template slot-scope="scope">
120
           <span>{{ parseTime(scope.row.operTime) }}</span>
128
           <span>{{ parseTime(scope.row.operTime) }}</span>
@@ -247,10 +255,6 @@ export default {
247
         }
255
         }
248
       );
256
       );
249
     },
257
     },
250
-    // 操作日志状态字典翻译
251
-    statusFormat(row, column) {
252
-      return this.selectDictLabel(this.statusOptions, row.status);
253
-    },
254
     // 操作日志类型字典翻译
258
     // 操作日志类型字典翻译
255
     typeFormat(row, column) {
259
     typeFormat(row, column) {
256
       return this.selectDictLabel(this.typeOptions, row.businessType);
260
       return this.selectDictLabel(this.typeOptions, row.businessType);

+ 6 - 6
ruoyi-ui/src/views/system/post/index.vue

@@ -87,7 +87,11 @@
87
       <el-table-column label="岗位编码" align="center" prop="postCode" />
87
       <el-table-column label="岗位编码" align="center" prop="postCode" />
88
       <el-table-column label="岗位名称" align="center" prop="postName" />
88
       <el-table-column label="岗位名称" align="center" prop="postName" />
89
       <el-table-column label="岗位排序" align="center" prop="postSort" />
89
       <el-table-column label="岗位排序" align="center" prop="postSort" />
90
-      <el-table-column label="状态" align="center" prop="status" :formatter="statusFormat" />
90
+      <el-table-column label="状态" align="center" prop="status">
91
+        <template slot-scope="scope">
92
+          <dict-tag :options="statusOptions" :value="scope.row.status"/>
93
+        </template>
94
+      </el-table-column>
91
       <el-table-column label="创建时间" align="center" prop="createTime" width="180">
95
       <el-table-column label="创建时间" align="center" prop="createTime" width="180">
92
         <template slot-scope="scope">
96
         <template slot-scope="scope">
93
           <span>{{ parseTime(scope.row.createTime) }}</span>
97
           <span>{{ parseTime(scope.row.createTime) }}</span>
@@ -112,7 +116,7 @@
112
         </template>
116
         </template>
113
       </el-table-column>
117
       </el-table-column>
114
     </el-table>
118
     </el-table>
115
-    
119
+
116
     <pagination
120
     <pagination
117
       v-show="total>0"
121
       v-show="total>0"
118
       :total="total"
122
       :total="total"
@@ -221,10 +225,6 @@ export default {
221
         this.loading = false;
225
         this.loading = false;
222
       });
226
       });
223
     },
227
     },
224
-    // 岗位状态字典翻译
225
-    statusFormat(row, column) {
226
-      return this.selectDictLabel(this.statusOptions, row.status);
227
-    },
228
     // 取消按钮
228
     // 取消按钮
229
     cancel() {
229
     cancel() {
230
       this.open = false;
230
       this.open = false;