zhouwx
6 天以前 79f2fd7d49d3316278c2a33aa5d0fc14a1fddf7f
src/views/build/conpanyFunctionConsult/qualityObjectives/table/components/tableDeptDialog.vue
@@ -298,6 +298,10 @@
  if(type === 'edit' || type === 'review') {
    state.form = JSON.parse(JSON.stringify(value));
  }
  if(state.isAdmin){
    await   getCompanyList()
  }
  await   getPeopleList()
  dialogVisible.value = true;
}
@@ -388,9 +392,9 @@
  state.companyList = []
}
const getPeopleList = async (val)=>{
  if(val != ""){
  if(val){
    const queryParams = {
      companyId: state.form.companyId,
      companyId: state.form.companyId == 0 ? null : state.form.companyId,
      name: val
    }
    const res = await getUser(queryParams)
@@ -400,6 +404,20 @@
    } else {
      ElMessage.warning(res.message)
    }
  }else {
    const queryParams = {
      pageNum: 1,
      pageSize: 10,
      companyId: state.form.companyId == 0 ? null : state.form.companyId
    }
    const res = await getUser(queryParams)
    if (res.code == 200) {
      state.peopleList = res.data.list
    } else {
      ElMessage.warning(res.message)
    }
  }
}
const selectValue = (val) => {
@@ -444,15 +462,22 @@
  state.form.qualityId = null
  state.qualityList = []
  state.form.qualityTargets = []
  state.form.fictionId = null
  state.form.fictionName = ''
  state.form.checkId = null
  state.form.checkName = ''
  state.form.ratifyId = null
  state.form.ratifyName = ''
  state.companyList.forEach(item => {
    if(item.name === val){
      state.form.companyId = item.id
    }
  })
  getQualityList()
  getPeopleList()
}
const getCompanyList = async (val)=>{
  if(val != ""){
  if(val){
    const queryParams = {
      name: val
    }
@@ -463,6 +488,17 @@
    } else {
      ElMessage.warning(res.message)
    }
  }else {
    const queryParams = {
      pageSize: 10,
      pageNum: 1,
    }
    const res = await getCompany(queryParams)
    if (res.code == 200) {
      state.companyList = res.data.list
    } else {
      ElMessage.warning(res.message)
    }
  }
}
defineExpose({