From ec004e9ba376c902c63d1450af3f85dd093205bf Mon Sep 17 00:00:00 2001
From: 疯狂的狮子li <15040126243@163.com>
Date: 星期一, 16 一月 2023 14:11:45 +0800
Subject: [PATCH] add 增加 (开发、测试、打包)期间必备的jvm参数
---
ruoyi-ui/src/views/system/dict/data.vue | 83 ++++++++++++++++++++++-------------------
1 files changed, 45 insertions(+), 38 deletions(-)
diff --git a/ruoyi-ui/src/views/system/dict/data.vue b/ruoyi-ui/src/views/system/dict/data.vue
index 3b8ec4b..c36cffc 100644
--- a/ruoyi-ui/src/views/system/dict/data.vue
+++ b/ruoyi-ui/src/views/system/dict/data.vue
@@ -1,8 +1,8 @@
<template>
<div class="app-container">
- <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
+ <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="瀛楀吀鍚嶇О" prop="dictType">
- <el-select v-model="queryParams.dictType" size="small">
+ <el-select v-model="queryParams.dictType">
<el-option
v-for="item in typeOptions"
:key="item.dictId"
@@ -16,17 +16,16 @@
v-model="queryParams.dictLabel"
placeholder="璇疯緭鍏ュ瓧鍏告爣绛�"
clearable
- size="small"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="鐘舵��" prop="status">
- <el-select v-model="queryParams.status" placeholder="鏁版嵁鐘舵��" clearable size="small">
+ <el-select v-model="queryParams.status" placeholder="鏁版嵁鐘舵��" clearable>
<el-option
- v-for="dict in statusOptions"
- :key="dict.dictValue"
- :label="dict.dictLabel"
- :value="dict.dictValue"
+ v-for="dict in dict.type.sys_normal_disable"
+ :key="dict.value"
+ :label="dict.label"
+ :value="dict.value"
/>
</el-select>
</el-form-item>
@@ -75,10 +74,18 @@
plain
icon="el-icon-download"
size="mini"
- :loading="exportLoading"
@click="handleExport"
v-hasPermi="['system:dict:export']"
>瀵煎嚭</el-button>
+ </el-col>
+ <el-col :span="1.5">
+ <el-button
+ type="warning"
+ plain
+ icon="el-icon-close"
+ size="mini"
+ @click="handleClose"
+ >鍏抽棴</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
@@ -96,7 +103,7 @@
<el-table-column label="瀛楀吀鎺掑簭" align="center" prop="dictSort" />
<el-table-column label="鐘舵��" align="center" prop="status">
<template slot-scope="scope">
- <dict-tag :options="statusOptions" :value="scope.row.status"/>
+ <dict-tag :options="dict.type.sys_normal_disable" :value="scope.row.status"/>
</template>
</el-table-column>
<el-table-column label="澶囨敞" align="center" prop="remark" :show-overflow-tooltip="true" />
@@ -156,7 +163,7 @@
<el-option
v-for="item in listClassOptions"
:key="item.value"
- :label="item.label"
+ :label="item.label + '(' + item.value + ')'"
:value="item.value"
></el-option>
</el-select>
@@ -164,10 +171,10 @@
<el-form-item label="鐘舵��" prop="status">
<el-radio-group v-model="form.status">
<el-radio
- v-for="dict in statusOptions"
- :key="dict.dictValue"
- :label="dict.dictValue"
- >{{dict.dictLabel}}</el-radio>
+ v-for="dict in dict.type.sys_normal_disable"
+ :key="dict.value"
+ :label="dict.value"
+ >{{dict.label}}</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="澶囨敞" prop="remark">
@@ -184,16 +191,15 @@
<script>
import { listData, getData, delData, addData, updateData } from "@/api/system/dict/data";
-import { listType, getType } from "@/api/system/dict/type";
+import { optionselect as getDictOptionselect, getType } from "@/api/system/dict/type";
export default {
name: "Data",
+ dicts: ['sys_normal_disable'],
data() {
return {
// 閬僵灞�
loading: true,
- // 瀵煎嚭閬僵灞�
- exportLoading: false,
// 閫変腑鏁扮粍
ids: [],
// 闈炲崟涓鐢�
@@ -239,8 +245,6 @@
label: "鍗遍櫓"
}
],
- // 鐘舵�佹暟鎹瓧鍏�
- statusOptions: [],
// 绫诲瀷鏁版嵁瀛楀吀
typeOptions: [],
// 鏌ヨ鍙傛暟
@@ -271,9 +275,6 @@
const dictId = this.$route.params && this.$route.params.dictId;
this.getType(dictId);
this.getTypeList();
- this.getDicts("sys_normal_disable").then(response => {
- this.statusOptions = response.data;
- });
},
methods: {
/** 鏌ヨ瀛楀吀绫诲瀷璇︾粏 */
@@ -286,8 +287,8 @@
},
/** 鏌ヨ瀛楀吀绫诲瀷鍒楄〃 */
getTypeList() {
- listType().then(response => {
- this.typeOptions = response.rows;
+ getDictOptionselect().then(response => {
+ this.typeOptions = response.data;
});
},
/** 鏌ヨ瀛楀吀鏁版嵁鍒楄〃 */
@@ -322,6 +323,11 @@
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
+ },
+ /** 杩斿洖鎸夐挳鎿嶄綔 */
+ handleClose() {
+ const obj = { path: "/system/dict" };
+ this.$tab.closeOpenPage(obj);
},
/** 閲嶇疆鎸夐挳鎿嶄綔 */
resetQuery() {
@@ -358,13 +364,15 @@
if (valid) {
if (this.form.dictCode != undefined) {
updateData(this.form).then(response => {
- this.msgSuccess("淇敼鎴愬姛");
+ this.$store.dispatch('dict/removeDict', this.queryParams.dictType);
+ this.$modal.msgSuccess("淇敼鎴愬姛");
this.open = false;
this.getList();
});
} else {
addData(this.form).then(response => {
- this.msgSuccess("鏂板鎴愬姛");
+ this.$store.dispatch('dict/removeDict', this.queryParams.dictType);
+ this.$modal.msgSuccess("鏂板鎴愬姛");
this.open = false;
this.getList();
});
@@ -375,20 +383,19 @@
/** 鍒犻櫎鎸夐挳鎿嶄綔 */
handleDelete(row) {
const dictCodes = row.dictCode || this.ids;
- this.$confirm('鏄惁纭鍒犻櫎瀛楀吀缂栫爜涓�"' + dictCodes + '"鐨勬暟鎹」?', "璀﹀憡", {
- confirmButtonText: "纭畾",
- cancelButtonText: "鍙栨秷",
- type: "warning"
- }).then(function() {
- return delData(dictCodes);
- }).then(() => {
- this.getList();
- this.msgSuccess("鍒犻櫎鎴愬姛");
- }).catch(() => {});
+ this.$modal.confirm('鏄惁纭鍒犻櫎瀛楀吀缂栫爜涓�"' + dictCodes + '"鐨勬暟鎹」锛�').then(function() {
+ return delData(dictCodes);
+ }).then(() => {
+ this.getList();
+ this.$modal.msgSuccess("鍒犻櫎鎴愬姛");
+ this.$store.dispatch('dict/removeDict', this.queryParams.dictType);
+ }).catch(() => {});
},
/** 瀵煎嚭鎸夐挳鎿嶄綔 */
handleExport() {
- this.downLoadExcel('/system/dict/data/export', this.queryParams);
+ this.download('system/dict/data/export', {
+ ...this.queryParams
+ }, `data_${new Date().getTime()}.xlsx`)
}
}
};
--
Gitblit v1.9.3