From b7cdd10f9f97bf01de65f9ba46a6daffec2b93e4 Mon Sep 17 00:00:00 2001 From: X.B-H <xbh_323@yeah.net> Date: 星期三, 06 一月 2021 11:11:11 +0800 Subject: [PATCH] 修复导入数据为负浮点数时丢失精度问题 --- ruoyi-ui/src/views/system/post/index.vue | 29 ++++++++++++++++------------- 1 files changed, 16 insertions(+), 13 deletions(-) diff --git a/ruoyi-ui/src/views/system/post/index.vue b/ruoyi-ui/src/views/system/post/index.vue index 046ef22..5fa17a7 100644 --- a/ruoyi-ui/src/views/system/post/index.vue +++ b/ruoyi-ui/src/views/system/post/index.vue @@ -1,6 +1,6 @@ <template> <div class="app-container"> - <el-form :model="queryParams" ref="queryForm" :inline="true" label-width="68px"> + <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px"> <el-form-item label="岗位编码" prop="postCode"> <el-input v-model="queryParams.postCode" @@ -39,6 +39,7 @@ <el-col :span="1.5"> <el-button type="primary" + plain icon="el-icon-plus" size="mini" @click="handleAdd" @@ -48,6 +49,7 @@ <el-col :span="1.5"> <el-button type="success" + plain icon="el-icon-edit" size="mini" :disabled="single" @@ -58,6 +60,7 @@ <el-col :span="1.5"> <el-button type="danger" + plain icon="el-icon-delete" size="mini" :disabled="multiple" @@ -68,12 +71,14 @@ <el-col :span="1.5"> <el-button type="warning" + plain icon="el-icon-download" size="mini" @click="handleExport" v-hasPermi="['system:post:export']" >导出</el-button> </el-col> + <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> </el-row> <el-table v-loading="loading" :data="postList" @selection-change="handleSelectionChange"> @@ -164,6 +169,8 @@ single: true, // 非多个禁用 multiple: true, + // 显示搜索条件 + showSearch: true, // 总条数 total: 0, // 岗位表格数据 @@ -273,19 +280,15 @@ if (valid) { if (this.form.postId != undefined) { updatePost(this.form).then(response => { - if (response.code === 200) { - this.msgSuccess("修改成功"); - this.open = false; - this.getList(); - } + this.msgSuccess("修改成功"); + this.open = false; + this.getList(); }); } else { addPost(this.form).then(response => { - if (response.code === 200) { - this.msgSuccess("新增成功"); - this.open = false; - this.getList(); - } + this.msgSuccess("新增成功"); + this.open = false; + this.getList(); }); } } @@ -303,7 +306,7 @@ }).then(() => { this.getList(); this.msgSuccess("删除成功"); - }).catch(function() {}); + }) }, /** 导出按钮操作 */ handleExport() { @@ -316,7 +319,7 @@ return exportPost(queryParams); }).then(response => { this.download(response.msg); - }).catch(function() {}); + }) } } }; -- Gitblit v1.9.2