zhouwx
2025-11-11 be57c60a2b1ce03ebdd264176149c52870c0b760
src/views/build/conpanyFunctionConsult/orgStructure/departManage/components/departDialog.vue
@@ -9,7 +9,7 @@
        :close-on-click-modal="false"
    >
      <el-form :model="state.form" size="default" ref="superRef" :rules="state.formRules" label-width="150px">
        <el-form-item label="企业:" prop="companyId" v-if="state.isAdmin">
        <el-form-item label="单位:" prop="companyId" v-if="state.isAdmin">
          <el-select v-model="state.form.companyId" placeholder="请选择" clearable @change="getDeptList()">
            <el-option
                v-for="item in state.companyList"
@@ -175,7 +175,7 @@
  if(isAdmin){
    state.companyList = companyList
  }
  await getUserList()
  await getUserList(companyId)
  await getDepartList(companyId)
  await getSysClauseList()
  state.title = type === 'add' ? '新增' : type ==='edit' ? '编辑' : '查看';
@@ -201,8 +201,8 @@
  dialogVisible.value = true
}
const getUserList = async ()=> {
  const res = await listUser({pageIndex: 1,pageSize: 999})
const getUserList = async (companyId)=> {
  const res = await listUser({pageIndex: 1,pageSize: 999, companyId: companyId})
  if(res.code == 200){
    state.userList = res.data.list?res.data.list:[]
  }else{
@@ -212,6 +212,7 @@
const getDeptList = async ()=>{
  await getDepartList(state.form.companyId)
  await getUserList(state.form.companyId)
}
const getDepartList = async (companyId)=> {