zhouwx
6 天以前 1d66f43353524889999bbd9ac0b331c557ff98f7
src/views/build/conpanyFunctionConsult/qualityObjectives/table/index.vue
@@ -2,7 +2,7 @@
  <div class="app-container">
    <div style="margin-bottom: 10px">
      <el-form style="display: flex;flex-wrap: wrap;">
        <el-form-item v-if="!data.isAdmin">
        <el-form-item>
          <el-button
              type="primary"
              plain
@@ -216,6 +216,9 @@
  }
  getList();
  if(data.isAdmin){
    getCompanyList()
  }
});
const getList = async () => {
  loading.value = true;
@@ -253,10 +256,24 @@
}
const getCompanyList = async (val)=>{
  if(val != ""){
  if(val){
    loadingCompany.value = true;
    const queryParams = {
      name: val
    }
    const res = await getCompany(queryParams)
    if (res.code == 200) {
      loadingCompany.value = false;
      data.companyList = res.data.list
    } else {
      ElMessage.warning(res.message)
    }
  }else{
    loadingCompany.value = true;
    const queryParams = {
      pageSize: 10,
      pageNum: 1,
    }
    const res = await getCompany(queryParams)
    if (res.code == 200) {
@@ -303,6 +320,7 @@
    }
  }
  getList();
  getCompanyList()
}
const exportData = () => {
  if(choosedData.value && choosedData.value.length === 0){
@@ -329,8 +347,12 @@
    const year = now.getFullYear()
    const month = (now.getMonth() +1).toString().padStart(2, '0');
    item.nowDate = year + '-' + month
    item.year = year
    item.tableData = item.qualityTargets
    item.tableData = item.qualityTargets.map((i,index) => {
      return {
        ...i,
        nuum: index+1
      }
    })
    try {
      generateWordDocument(templatePath.value, item, name+'_质量目标分解表.docx');
    } catch (error){