From adb31b71f8c3490b923c8cb6f12b74be6ca3a02d Mon Sep 17 00:00:00 2001 From: 疯狂的狮子li <15040126243@163.com> Date: 星期三, 01 九月 2021 09:40:36 +0800 Subject: [PATCH] Merge branch 'master' of https://gitee.com/y_project/RuoYi-Vue into dev --- ruoyi-generator/src/main/resources/vm/vue/index-tree.vue.vm | 20 +----- ruoyi-ui/src/views/monitor/job/log.vue | 20 +++--- ruoyi-ui/src/views/system/notice/index.vue | 34 +++------- ruoyi-generator/src/main/resources/vm/vue/index.vue.vm | 20 +----- ruoyi-ui/src/views/system/menu/index.vue | 20 +----- ruoyi-ui/src/views/system/dept/index.vue | 10 +- ruoyi-ui/src/views/monitor/job/index.vue | 10 +- ruoyi-ui/src/views/monitor/logininfor/index.vue | 10 +- ruoyi-ui/src/views/monitor/operlog/index.vue | 16 +++-- ruoyi-ui/src/views/system/config/index.vue | 10 +- ruoyi-ui/src/views/system/post/index.vue | 10 +- 11 files changed, 71 insertions(+), 109 deletions(-) diff --git a/ruoyi-generator/src/main/resources/vm/vue/index-tree.vue.vm b/ruoyi-generator/src/main/resources/vm/vue/index-tree.vue.vm index ec2f96d..8985250 100644 --- a/ruoyi-generator/src/main/resources/vm/vue/index-tree.vue.vm +++ b/ruoyi-generator/src/main/resources/vm/vue/index-tree.vue.vm @@ -106,7 +106,11 @@ </template> </el-table-column> #elseif($column.list && $column.dictType && "" != $column.dictType) - <el-table-column label="${comment}" align="center" prop="${javaField}" :formatter="${javaField}Format" /> + <el-table-column label="${comment}" align="center" prop="${javaField}"> + <template slot-scope="scope"> + <dict-tag :options="${javaField}Options" :value="scope.row.${javaField}"/> + </template> + </el-table-column> #elseif($column.list && "" != $javaField) #if(${foreach.index} == 1) <el-table-column label="${comment}" prop="${javaField}" /> @@ -378,20 +382,6 @@ this.${businessName}Options.push(data); }); }, -#foreach ($column in $columns) -#if(${column.dictType} && ${column.dictType} != '') -#set($parentheseIndex=$column.columnComment.indexOf("锛�")) -#if($parentheseIndex != -1) -#set($comment=$column.columnComment.substring(0, $parentheseIndex)) -#else -#set($comment=$column.columnComment) -#end - // $comment瀛楀吀缈昏瘧 - ${column.javaField}Format(row, column) { - return this.selectDictLabel#if($column.htmlType == "checkbox")s#end(this.${column.javaField}Options, row.${column.javaField}); - }, -#end -#end // 鍙栨秷鎸夐挳 cancel() { this.open = false; diff --git a/ruoyi-generator/src/main/resources/vm/vue/index.vue.vm b/ruoyi-generator/src/main/resources/vm/vue/index.vue.vm index bf0fe5f..4b055fa 100644 --- a/ruoyi-generator/src/main/resources/vm/vue/index.vue.vm +++ b/ruoyi-generator/src/main/resources/vm/vue/index.vue.vm @@ -135,7 +135,11 @@ </template> </el-table-column> #elseif($column.list && $column.dictType && "" != $column.dictType) - <el-table-column label="${comment}" align="center" prop="${javaField}" :formatter="${javaField}Format" /> + <el-table-column label="${comment}" align="center" prop="${javaField}"> + <template slot-scope="scope"> + <dict-tag :options="${javaField}Options" :value="scope.row.${javaField}"/> + </template> + </el-table-column> #elseif($column.list && "" != $javaField) <el-table-column label="${comment}" align="center" prop="${javaField}" /> #end @@ -426,20 +430,6 @@ this.loading = false; }); }, -#foreach ($column in $columns) -#if(${column.dictType} && ${column.dictType} != '') -#set($parentheseIndex=$column.columnComment.indexOf("锛�")) -#if($parentheseIndex != -1) -#set($comment=$column.columnComment.substring(0, $parentheseIndex)) -#else -#set($comment=$column.columnComment) -#end - // $comment瀛楀吀缈昏瘧 - ${column.javaField}Format(row, column) { - return this.selectDictLabel#if($column.htmlType == "checkbox")s#end(this.${column.javaField}Options, row.${column.javaField}); - }, -#end -#end // 鍙栨秷鎸夐挳 cancel() { this.open = false; diff --git a/ruoyi-ui/src/views/monitor/job/index.vue b/ruoyi-ui/src/views/monitor/job/index.vue index 7cbcd82..6256804 100644 --- a/ruoyi-ui/src/views/monitor/job/index.vue +++ b/ruoyi-ui/src/views/monitor/job/index.vue @@ -97,7 +97,11 @@ <el-table-column type="selection" width="55" align="center" /> <el-table-column label="浠诲姟缂栧彿" align="center" prop="jobId" /> <el-table-column label="浠诲姟鍚嶇О" align="center" prop="jobName" :show-overflow-tooltip="true" /> - <el-table-column label="浠诲姟缁勫悕" align="center" prop="jobGroup" :formatter="jobGroupFormat" /> + <el-table-column label="浠诲姟缁勫悕" align="center" prop="jobGroup"> + <template slot-scope="scope"> + <dict-tag :options="jobGroupOptions" :value="scope.row.jobGroup"/> + </template> + </el-table-column> <el-table-column label="璋冪敤鐩爣瀛楃涓�" align="center" prop="invokeTarget" :show-overflow-tooltip="true" /> <el-table-column label="cron鎵ц琛ㄨ揪寮�" align="center" prop="cronExpression" :show-overflow-tooltip="true" /> <el-table-column label="鐘舵��" align="center"> @@ -358,10 +362,6 @@ // 浠诲姟缁勫悕瀛楀吀缈昏瘧 jobGroupFormat(row, column) { return this.selectDictLabel(this.jobGroupOptions, row.jobGroup); - }, - // 鐘舵�佸瓧鍏哥炕璇� - statusFormat(row, column) { - return this.selectDictLabel(this.statusOptions, row.status); }, // 鍙栨秷鎸夐挳 cancel() { diff --git a/ruoyi-ui/src/views/monitor/job/log.vue b/ruoyi-ui/src/views/monitor/job/log.vue index 5a1984c..7e4dffe 100644 --- a/ruoyi-ui/src/views/monitor/job/log.vue +++ b/ruoyi-ui/src/views/monitor/job/log.vue @@ -110,10 +110,18 @@ <el-table-column type="selection" width="55" align="center" /> <el-table-column label="鏃ュ織缂栧彿" width="80" align="center" prop="jobLogId" /> <el-table-column label="浠诲姟鍚嶇О" align="center" prop="jobName" :show-overflow-tooltip="true" /> - <el-table-column label="浠诲姟缁勫悕" align="center" prop="jobGroup" :formatter="jobGroupFormat" :show-overflow-tooltip="true" /> + <el-table-column label="浠诲姟缁勫悕" align="center" prop="jobGroup" :show-overflow-tooltip="true"> + <template slot-scope="scope"> + <dict-tag :options="jobGroupOptions" :value="scope.row.jobGroup"/> + </template> + </el-table-column> <el-table-column label="璋冪敤鐩爣瀛楃涓�" align="center" prop="invokeTarget" :show-overflow-tooltip="true" /> <el-table-column label="鏃ュ織淇℃伅" align="center" prop="jobMessage" :show-overflow-tooltip="true" /> - <el-table-column label="鎵ц鐘舵��" align="center" prop="status" :formatter="statusFormat" /> + <el-table-column label="鎵ц鐘舵��" align="center" prop="status"> + <template slot-scope="scope"> + <dict-tag :options="statusOptions" :value="scope.row.status"/> + </template> + </el-table-column> <el-table-column label="鎵ц鏃堕棿" align="center" prop="createTime" width="180"> <template slot-scope="scope"> <span>{{ parseTime(scope.row.createTime) }}</span> @@ -246,14 +254,6 @@ this.loading = false; } ); - }, - // 鎵ц鐘舵�佸瓧鍏哥炕璇� - statusFormat(row, column) { - return this.selectDictLabel(this.statusOptions, row.status); - }, - // 浠诲姟缁勫悕瀛楀吀缈昏瘧 - jobGroupFormat(row, column) { - return this.selectDictLabel(this.jobGroupOptions, row.jobGroup); }, // 杩斿洖鎸夐挳 handleClose() { diff --git a/ruoyi-ui/src/views/monitor/logininfor/index.vue b/ruoyi-ui/src/views/monitor/logininfor/index.vue index 79ccb61..778492b 100644 --- a/ruoyi-ui/src/views/monitor/logininfor/index.vue +++ b/ruoyi-ui/src/views/monitor/logininfor/index.vue @@ -99,7 +99,11 @@ <el-table-column label="鐧诲綍鍦扮偣" align="center" prop="loginLocation" :show-overflow-tooltip="true" /> <el-table-column label="娴忚鍣�" align="center" prop="browser" :show-overflow-tooltip="true" /> <el-table-column label="鎿嶄綔绯荤粺" align="center" prop="os" /> - <el-table-column label="鐧诲綍鐘舵��" align="center" prop="status" :formatter="statusFormat" /> + <el-table-column label="鐧诲綍鐘舵��" align="center" prop="status"> + <template slot-scope="scope"> + <dict-tag :options="statusOptions" :value="scope.row.status"/> + </template> + </el-table-column> <el-table-column label="鎿嶄綔淇℃伅" align="center" prop="msg" /> <el-table-column label="鐧诲綍鏃ユ湡" align="center" prop="loginTime" sortable="custom" :sort-orders="['descending', 'ascending']" width="180"> <template slot-scope="scope"> @@ -171,10 +175,6 @@ this.loading = false; } ); - }, - // 鐧诲綍鐘舵�佸瓧鍏哥炕璇� - statusFormat(row, column) { - return this.selectDictLabel(this.statusOptions, row.status); }, /** 鎼滅储鎸夐挳鎿嶄綔 */ handleQuery() { diff --git a/ruoyi-ui/src/views/monitor/operlog/index.vue b/ruoyi-ui/src/views/monitor/operlog/index.vue index c6fe486..fbce6dd 100644 --- a/ruoyi-ui/src/views/monitor/operlog/index.vue +++ b/ruoyi-ui/src/views/monitor/operlog/index.vue @@ -111,12 +111,20 @@ <el-table-column type="selection" width="55" align="center" /> <el-table-column label="鏃ュ織缂栧彿" align="center" prop="operId" /> <el-table-column label="绯荤粺妯″潡" align="center" prop="title" /> - <el-table-column label="鎿嶄綔绫诲瀷" align="center" prop="businessType" :formatter="typeFormat" /> + <el-table-column label="鎿嶄綔绫诲瀷" align="center" prop="businessType"> + <template slot-scope="scope"> + <dict-tag :options="typeOptions" :value="scope.row.businessType"/> + </template> + </el-table-column> <el-table-column label="璇锋眰鏂瑰紡" align="center" prop="requestMethod" /> <el-table-column label="鎿嶄綔浜哄憳" align="center" prop="operName" width="100" :show-overflow-tooltip="true" sortable="custom" :sort-orders="['descending', 'ascending']" /> <el-table-column label="鎿嶄綔鍦板潃" align="center" prop="operIp" width="130" :show-overflow-tooltip="true" /> <el-table-column label="鎿嶄綔鍦扮偣" align="center" prop="operLocation" :show-overflow-tooltip="true" /> - <el-table-column label="鎿嶄綔鐘舵��" align="center" prop="status" :formatter="statusFormat" /> + <el-table-column label="鎿嶄綔鐘舵��" align="center" prop="status"> + <template slot-scope="scope"> + <dict-tag :options="statusOptions" :value="scope.row.status"/> + </template> + </el-table-column> <el-table-column label="鎿嶄綔鏃ユ湡" align="center" prop="operTime" sortable="custom" :sort-orders="['descending', 'ascending']" width="180"> <template slot-scope="scope"> <span>{{ parseTime(scope.row.operTime) }}</span> @@ -250,10 +258,6 @@ this.loading = false; } ); - }, - // 鎿嶄綔鏃ュ織鐘舵�佸瓧鍏哥炕璇� - statusFormat(row, column) { - return this.selectDictLabel(this.statusOptions, row.status); }, // 鎿嶄綔鏃ュ織绫诲瀷瀛楀吀缈昏瘧 typeFormat(row, column) { diff --git a/ruoyi-ui/src/views/system/config/index.vue b/ruoyi-ui/src/views/system/config/index.vue index 56654c8..04384bb 100644 --- a/ruoyi-ui/src/views/system/config/index.vue +++ b/ruoyi-ui/src/views/system/config/index.vue @@ -112,7 +112,11 @@ <el-table-column label="鍙傛暟鍚嶇О" align="center" prop="configName" :show-overflow-tooltip="true" /> <el-table-column label="鍙傛暟閿悕" align="center" prop="configKey" :show-overflow-tooltip="true" /> <el-table-column label="鍙傛暟閿��" align="center" prop="configValue" /> - <el-table-column label="绯荤粺鍐呯疆" align="center" prop="configType" :formatter="typeFormat" /> + <el-table-column label="绯荤粺鍐呯疆" align="center" prop="configType"> + <template slot-scope="scope"> + <dict-tag :options="typeOptions" :value="scope.row.configType"/> + </template> + </el-table-column> <el-table-column label="澶囨敞" align="center" prop="remark" :show-overflow-tooltip="true" /> <el-table-column label="鍒涘缓鏃堕棿" align="center" prop="createTime" width="180"> <template slot-scope="scope"> @@ -251,10 +255,6 @@ this.loading = false; } ); - }, - // 鍙傛暟绯荤粺鍐呯疆瀛楀吀缈昏瘧 - typeFormat(row, column) { - return this.selectDictLabel(this.typeOptions, row.configType); }, // 鍙栨秷鎸夐挳 cancel() { diff --git a/ruoyi-ui/src/views/system/dept/index.vue b/ruoyi-ui/src/views/system/dept/index.vue index b10653e..edb8d7c 100644 --- a/ruoyi-ui/src/views/system/dept/index.vue +++ b/ruoyi-ui/src/views/system/dept/index.vue @@ -49,7 +49,11 @@ > <el-table-column prop="deptName" label="閮ㄩ棬鍚嶇О" width="260"></el-table-column> <el-table-column prop="orderNum" label="鎺掑簭" width="200"></el-table-column> - <el-table-column prop="status" label="鐘舵��" :formatter="statusFormat" width="100"></el-table-column> + <el-table-column prop="status" label="鐘舵��" 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="createTime" width="200"> <template slot-scope="scope"> <span>{{ parseTime(scope.row.createTime) }}</span> @@ -222,10 +226,6 @@ label: node.deptName, children: node.children }; - }, - // 瀛楀吀鐘舵�佸瓧鍏哥炕璇� - statusFormat(row, column) { - return this.selectDictLabel(this.statusOptions, row.status); }, // 鍙栨秷鎸夐挳 cancel() { diff --git a/ruoyi-ui/src/views/system/menu/index.vue b/ruoyi-ui/src/views/system/menu/index.vue index 5e8187a..e59d1a6 100644 --- a/ruoyi-ui/src/views/system/menu/index.vue +++ b/ruoyi-ui/src/views/system/menu/index.vue @@ -55,7 +55,11 @@ <el-table-column prop="orderNum" label="鎺掑簭" width="60"></el-table-column> <el-table-column prop="perms" label="鏉冮檺鏍囪瘑" :show-overflow-tooltip="true"></el-table-column> <el-table-column prop="component" label="缁勪欢璺緞" :show-overflow-tooltip="true"></el-table-column> - <el-table-column prop="status" label="鐘舵��" :formatter="statusFormat" width="80"></el-table-column> + <el-table-column prop="status" label="鐘舵��" width="80"> + <template slot-scope="scope"> + <dict-tag :options="statusOptions" :value="scope.row.status"/> + </template> + </el-table-column> <el-table-column label="鍒涘缓鏃堕棿" align="center" prop="createTime"> <template slot-scope="scope"> <span>{{ parseTime(scope.row.createTime) }}</span> @@ -337,20 +341,6 @@ menu.children = this.handleTree(response.data, "menuId"); this.menuOptions.push(menu); }); - }, - // 鏄剧ず鐘舵�佸瓧鍏哥炕璇� - visibleFormat(row, column) { - if (row.menuType == "F") { - return ""; - } - return this.selectDictLabel(this.visibleOptions, row.visible); - }, - // 鑿滃崟鐘舵�佸瓧鍏哥炕璇� - statusFormat(row, column) { - if (row.menuType == "F") { - return ""; - } - return this.selectDictLabel(this.statusOptions, row.status); }, // 鍙栨秷鎸夐挳 cancel() { diff --git a/ruoyi-ui/src/views/system/notice/index.vue b/ruoyi-ui/src/views/system/notice/index.vue index 0ffd9d6..b90168c 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"> @@ -244,14 +240,6 @@ this.loading = false; }); }, - // 鍏憡鐘舵�佸瓧鍏哥炕璇� - statusFormat(row, column) { - return this.selectDictLabel(this.statusOptions, row.status); - }, - // 鍏憡鐘舵�佸瓧鍏哥炕璇� - typeFormat(row, column) { - return this.selectDictLabel(this.typeOptions, row.noticeType); - }, // 鍙栨秷鎸夐挳 cancel() { this.open = false; @@ -336,4 +324,4 @@ } } }; -</script> +</script> \ No newline at end of file diff --git a/ruoyi-ui/src/views/system/post/index.vue b/ruoyi-ui/src/views/system/post/index.vue index a68e460..735d616 100644 --- a/ruoyi-ui/src/views/system/post/index.vue +++ b/ruoyi-ui/src/views/system/post/index.vue @@ -88,7 +88,11 @@ <el-table-column label="宀椾綅缂栫爜" align="center" prop="postCode" /> <el-table-column label="宀椾綅鍚嶇О" align="center" prop="postName" /> <el-table-column label="宀椾綅鎺掑簭" align="center" prop="postSort" /> - <el-table-column label="鐘舵��" align="center" prop="status" :formatter="statusFormat" /> + <el-table-column label="鐘舵��" align="center" prop="status"> + <template slot-scope="scope"> + <dict-tag :options="statusOptions" :value="scope.row.status"/> + </template> + </el-table-column> <el-table-column label="鍒涘缓鏃堕棿" align="center" prop="createTime" width="180"> <template slot-scope="scope"> <span>{{ parseTime(scope.row.createTime) }}</span> @@ -223,10 +227,6 @@ this.total = response.total; this.loading = false; }); - }, - // 宀椾綅鐘舵�佸瓧鍏哥炕璇� - statusFormat(row, column) { - return this.selectDictLabel(this.statusOptions, row.status); }, // 鍙栨秷鎸夐挳 cancel() { -- Gitblit v1.9.3