feige
2023-12-06 5703e99b943f17aa13f55a2f90308f66c1c2fe4f
修改标题
2个文件已修改
39 ■■■■■ 已修改文件
ruoyi-ui/src/api/system/user.js 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-ui/src/views/system/user/index.vue 31 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-ui/src/api/system/user.js
@@ -150,3 +150,11 @@
  })
}
//查看家庭信息
export function getAllFamilys(){
  return request({
    url: '/family/all' ,
    method: 'get',
  })
}
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;