From e6dc647287ff28d40846ee64334223f53218e51d Mon Sep 17 00:00:00 2001
From: 疯狂的狮子li <15040126243@163.com>
Date: 星期四, 16 七月 2020 20:09:35 +0800
Subject: [PATCH] 修复数据库decimal类型无improt问题
---
ruoyi-ui/src/views/system/dept/index.vue | 24 +++++++++---------------
1 files changed, 9 insertions(+), 15 deletions(-)
diff --git a/ruoyi-ui/src/views/system/dept/index.vue b/ruoyi-ui/src/views/system/dept/index.vue
index e1f9d0b..c1e5d47 100644
--- a/ruoyi-ui/src/views/system/dept/index.vue
+++ b/ruoyi-ui/src/views/system/dept/index.vue
@@ -46,7 +46,7 @@
default-expand-all
:tree-props="{children: 'children', hasChildren: 'hasChildren'}"
>
- <el-table-column prop="deptName" label="閮ㄩ棬鍚嶇О" width="200"></el-table-column>
+ <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 label="鍒涘缓鏃堕棿" align="center" prop="createTime" width="200">
@@ -83,7 +83,7 @@
</el-table>
<!-- 娣诲姞鎴栦慨鏀归儴闂ㄥ璇濇 -->
- <el-dialog :title="title" :visible.sync="open" width="600px">
+ <el-dialog :title="title" :visible.sync="open" width="600px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-row>
<el-col :span="24" v-if="form.parentId !== 0">
@@ -138,7 +138,7 @@
</template>
<script>
-import { listDept, getDept, delDept, addDept, updateDept } from "@/api/system/dept";
+import { listDept, getDept, delDept, addDept, updateDept, listDeptExcludeChild } from "@/api/system/dept";
import Treeselect from "@riophae/vue-treeselect";
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
@@ -220,12 +220,6 @@
children: node.children
};
},
- /** 鏌ヨ閮ㄩ棬涓嬫媺鏍戠粨鏋� */
- getTreeselect() {
- listDept().then(response => {
- this.deptOptions = this.handleTree(response.data, "deptId");
- });
- },
// 瀛楀吀鐘舵�佸瓧鍏哥炕璇�
statusFormat(row, column) {
return this.selectDictLabel(this.statusOptions, row.status);
@@ -256,21 +250,25 @@
/** 鏂板鎸夐挳鎿嶄綔 */
handleAdd(row) {
this.reset();
- this.getTreeselect();
if (row != undefined) {
this.form.parentId = row.deptId;
}
this.open = true;
this.title = "娣诲姞閮ㄩ棬";
+ listDept().then(response => {
+ this.deptOptions = this.handleTree(response.data, "deptId");
+ });
},
/** 淇敼鎸夐挳鎿嶄綔 */
handleUpdate(row) {
this.reset();
- this.getTreeselect();
getDept(row.deptId).then(response => {
this.form = response.data;
this.open = true;
this.title = "淇敼閮ㄩ棬";
+ });
+ listDeptExcludeChild(row.deptId).then(response => {
+ this.deptOptions = this.handleTree(response.data, "deptId");
});
},
/** 鎻愪氦鎸夐挳 */
@@ -283,8 +281,6 @@
this.msgSuccess("淇敼鎴愬姛");
this.open = false;
this.getList();
- } else {
- this.msgError(response.msg);
}
});
} else {
@@ -293,8 +289,6 @@
this.msgSuccess("鏂板鎴愬姛");
this.open = false;
this.getList();
- } else {
- this.msgError(response.msg);
}
});
}
--
Gitblit v1.9.3