祖安之光
2 天以前 3f7307ba3855622d62fa3bde6e49e59b52e732f1
修改新增
已修改1个文件
20 ■■■■■ 文件已修改
src/views/work/selfProblems/internalAudit/innerReviewSheet/components/editDialog.vue 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/work/selfProblems/internalAudit/innerReviewSheet/components/editDialog.vue
@@ -50,7 +50,7 @@
        <el-form-item label="内审员:" prop="auditId">
          <el-select clearable v-model="state.form.auditId" :disabled="state.title =='查看'" filterable placeholder="内审员" style="width: 100%">
            <el-option
                v-for="item in state.userList"
                v-for="item in state.interUserList"
                :key="item.userId"
                :label="item.name"
                :value="item.userId"
@@ -143,6 +143,7 @@
  companyList: [],
  deptList: [],
  userList: [],
  interUserList: [],
  uploadUrl: import.meta.env.VITE_APP_BASE_API + '/system/common/uploadFile',
  header: {
    Authorization: getToken()
@@ -159,7 +160,7 @@
  if(isAdmin){
    state.companyList = companyList
  }
  await getUserList(companyId)
  await getUserList()
  await getDepartList(companyId)
  state.title = type === 'add' ? '新增' : type ==='edit' ? '编辑' : '查看'
  state.form.companyId = companyId
@@ -243,7 +244,7 @@
  state.form.caluseNum = ''
  state.form.caluseContent = ''
  await getDepartList(state.form.companyId)
  await getUserList(state.form.companyId)
  await getUserList()
}
const getDepartList = async (companyId)=> {
@@ -258,8 +259,8 @@
  }
}
const getUserList = async (companyId,deptId)=> {
  const res = await listUser({pageIndex: 1,pageSize: 999, companyId: companyId,deptId: deptId})
const getUserList = async ()=> {
  const res = await listUser({pageIndex: 1,pageSize: 999})
  if(res.code == 200){
    state.userList = res.data.list?res.data.list.map(item=>{
      const user = item.id
@@ -269,13 +270,18 @@
        userId: user
      }
    }):[]
    if(state.form.deptId){
      state.interUserList = state.userList.filter(i=>i.deptId !== state.form.deptId)
    }else{
      state.interUserList = state.userList
    }
  }else{
    ElMessage.warning(res.message)
  }
}
const getCaluses = async (value)=>{
  await getUserList(state.form.companyId,value)
const getCaluses = async ()=>{
  await getUserList()
  const deptCaluses = state.deptList.find(i=>i.deptId == state.form.deptId)?.caluseVO1List
  if(deptCaluses && Array.isArray(deptCaluses)){
    state.form.caluseNum = deptCaluses.map(i=>i.clauseNum).join('、')