From 5703e99b943f17aa13f55a2f90308f66c1c2fe4f Mon Sep 17 00:00:00 2001
From: feige <feige@qq.com>
Date: 星期三, 06 十二月 2023 21:04:30 +0800
Subject: [PATCH] 修改标题
---
ruoyi-ui/src/views/system/user/index.vue | 31 +++++++++++++++++++++++++++++--
ruoyi-ui/src/api/system/user.js | 8 ++++++++
2 files changed, 37 insertions(+), 2 deletions(-)
diff --git a/ruoyi-ui/src/api/system/user.js b/ruoyi-ui/src/api/system/user.js
index b28e58c..e7a29de 100644
--- a/ruoyi-ui/src/api/system/user.js
+++ b/ruoyi-ui/src/api/system/user.js
@@ -150,3 +150,11 @@
})
}
+//鏌ョ湅瀹跺涵淇℃伅
+export function getAllFamilys(){
+ return request({
+ url: '/family/all' ,
+ method: 'get',
+
+ })
+}
\ No newline at end of file
diff --git a/ruoyi-ui/src/views/system/user/index.vue b/ruoyi-ui/src/views/system/user/index.vue
index a00c67d..3d7dfc5 100644
--- a/ruoyi-ui/src/views/system/user/index.vue
+++ b/ruoyi-ui/src/views/system/user/index.vue
@@ -206,7 +206,16 @@
<el-col :span="12">
<el-form-item label="瀹跺涵鍙�">
- <treeselect v-model="form.deptId" :options="deptOptions" :show-count="true" placeholder="璇烽�夋嫨瀹跺涵鍙�" />
+ <el-select v-model="fid" placeholder="璇烽�夋嫨瀹跺涵鍙�">
+ <el-option
+ v-for="item in famiInfo"
+ :key="item.id"
+ :label="item.name"
+ :value="item.id"
+
+ ></el-option>
+ </el-select>
+
</el-form-item>
</el-col>
@@ -307,7 +316,7 @@
</template>
<script>
-import { listUser, getUser, delUser, addUser, updateUser, resetUserPwd, changeUserStatus, deptTreeSelect } from "@/api/system/user";
+import { listUser, getUser, delUser, addUser, updateUser, getAllFamilys,resetUserPwd, changeUserStatus, deptTreeSelect } from "@/api/system/user";
import { getToken } from "@/utils/auth";
import Treeselect from "@riophae/vue-treeselect";
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
@@ -344,11 +353,15 @@
initPassword: undefined,
// 鏃ユ湡鑼冨洿
dateRange: [],
+ //瀹跺涵鍙�
+ famiInfo:[],
+ fid: undefined,
// 宀椾綅閫夐」
postOptions: [],
// 瑙掕壊閫夐」
roleOptions: [],
// 琛ㄥ崟鍙傛暟
+
form: {},
defaultProps: {
children: "children",
@@ -433,12 +446,20 @@
},
created() {
this.getList();
+ this.getFamlilyInfo();
this.getDeptTree();
this.getConfigKey("sys.user.initPassword").then(response => {
this.initPassword = response.msg;
});
},
methods: {
+ getFamlilyInfo(){
+ let _this = this
+ getAllFamilys().then(response => {
+ console.log(response.data)
+ _this.famiInfo = response.data
+ })
+ },
/** 鏌ヨ鐢ㄦ埛鍒楄〃 */
getList() {
this.loading = true;
@@ -580,6 +601,7 @@
submitForm: function() {
this.$refs["form"].validate(valid => {
alert(valid)
+ alert(this.fid)
if (valid) {
if (this.form.userId != undefined) {
updateUser(this.form).then(response => {
@@ -763,6 +785,11 @@
});
},
methods: {
+ /** 鏌ョ湅瀹跺涵鍙� */
+ getFamilyInfo()
+ {
+
+ },
/** 鏌ヨ鐢ㄦ埛鍒楄〃 */
getList() {
this.loading = true;
--
Gitblit v1.9.1