From f3cb18c8363ec15d8482ccb70b8b021f67881f47 Mon Sep 17 00:00:00 2001
From: 若依 <yzz_ivy@163.com>
Date: 星期五, 08 一月 2021 10:46:36 +0800
Subject: [PATCH] !161 修复导入数据为负浮点数时,导入结果会丢失精度问题 Merge pull request !161 from 嘿白熊/master
---
ruoyi-ui/src/views/system/role/index.vue | 43 +++++++++++++++++++++----------------------
1 files changed, 21 insertions(+), 22 deletions(-)
diff --git a/ruoyi-ui/src/views/system/role/index.vue b/ruoyi-ui/src/views/system/role/index.vue
index 9c760f6..809d2b0 100644
--- a/ruoyi-ui/src/views/system/role/index.vue
+++ b/ruoyi-ui/src/views/system/role/index.vue
@@ -50,7 +50,7 @@
></el-date-picker>
</el-form-item>
<el-form-item>
- <el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">鎼滅储</el-button>
+ <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">鎼滅储</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">閲嶇疆</el-button>
</el-form-item>
</el-form>
@@ -59,6 +59,7 @@
<el-col :span="1.5">
<el-button
type="primary"
+ plain
icon="el-icon-plus"
size="mini"
@click="handleAdd"
@@ -68,6 +69,7 @@
<el-col :span="1.5">
<el-button
type="success"
+ plain
icon="el-icon-edit"
size="mini"
:disabled="single"
@@ -78,6 +80,7 @@
<el-col :span="1.5">
<el-button
type="danger"
+ plain
icon="el-icon-delete"
size="mini"
:disabled="multiple"
@@ -88,6 +91,7 @@
<el-col :span="1.5">
<el-button
type="warning"
+ plain
icon="el-icon-download"
size="mini"
@click="handleExport"
@@ -368,18 +372,18 @@
// 鎵�鏈夎彍鍗曡妭鐐规暟鎹�
getMenuAllCheckedKeys() {
// 鐩墠琚�変腑鐨勮彍鍗曡妭鐐�
- let checkedKeys = this.$refs.menu.getHalfCheckedKeys();
+ let checkedKeys = this.$refs.menu.getCheckedKeys();
// 鍗婇�変腑鐨勮彍鍗曡妭鐐�
- let halfCheckedKeys = this.$refs.menu.getCheckedKeys();
+ let halfCheckedKeys = this.$refs.menu.getHalfCheckedKeys();
checkedKeys.unshift.apply(checkedKeys, halfCheckedKeys);
return checkedKeys;
},
// 鎵�鏈夐儴闂ㄨ妭鐐规暟鎹�
getDeptAllCheckedKeys() {
// 鐩墠琚�変腑鐨勯儴闂ㄨ妭鐐�
- let checkedKeys = this.$refs.dept.getHalfCheckedKeys();
+ let checkedKeys = this.$refs.dept.getCheckedKeys();
// 鍗婇�変腑鐨勯儴闂ㄨ妭鐐�
- let halfCheckedKeys = this.$refs.dept.getCheckedKeys();
+ let halfCheckedKeys = this.$refs.dept.getHalfCheckedKeys();
checkedKeys.unshift.apply(checkedKeys, halfCheckedKeys);
return checkedKeys;
},
@@ -440,6 +444,7 @@
menuIds: [],
deptIds: [],
menuCheckStrictly: true,
+ deptCheckStrictly: true,
remark: undefined
};
this.resetForm("form");
@@ -536,20 +541,16 @@
if (this.form.roleId != undefined) {
this.form.menuIds = this.getMenuAllCheckedKeys();
updateRole(this.form).then(response => {
- if (response.code === 200) {
- this.msgSuccess("淇敼鎴愬姛");
- this.open = false;
- this.getList();
- }
+ this.msgSuccess("淇敼鎴愬姛");
+ this.open = false;
+ this.getList();
});
} else {
this.form.menuIds = this.getMenuAllCheckedKeys();
addRole(this.form).then(response => {
- if (response.code === 200) {
- this.msgSuccess("鏂板鎴愬姛");
- this.open = false;
- this.getList();
- }
+ this.msgSuccess("鏂板鎴愬姛");
+ this.open = false;
+ this.getList();
});
}
}
@@ -560,11 +561,9 @@
if (this.form.roleId != undefined) {
this.form.deptIds = this.getDeptAllCheckedKeys();
dataScope(this.form).then(response => {
- if (response.code === 200) {
- this.msgSuccess("淇敼鎴愬姛");
- this.openDataScope = false;
- this.getList();
- }
+ this.msgSuccess("淇敼鎴愬姛");
+ this.openDataScope = false;
+ this.getList();
});
}
},
@@ -580,7 +579,7 @@
}).then(() => {
this.getList();
this.msgSuccess("鍒犻櫎鎴愬姛");
- }).catch(function() {});
+ })
},
/** 瀵煎嚭鎸夐挳鎿嶄綔 */
handleExport() {
@@ -593,7 +592,7 @@
return exportRole(queryParams);
}).then(response => {
this.download(response.msg);
- }).catch(function() {});
+ })
}
}
};
--
Gitblit v1.9.3