zhouwx
2025-11-07 a6a7a4e83171181477a99d429b01c3b73cb0be2d
src/views/build/conpanyFunctionConsult/qualityObjectives/table/index.vue
@@ -8,10 +8,11 @@
              plain
              icon="Plus"
              @click="openAddDialog"
              v-hasPermi="['qualityGoalTable:list:add']"
          >新增</el-button>
        </el-form-item>
        <el-form-item label="企业名称:" v-if="data.isAdmin" style="margin-left: 20px">
          <el-select v-model="data.queryParams.companyId" placeholder="请选择" clearable>
          <el-select v-model="data.queryParams.companyId" placeholder="请选择" filterable clearable>
            <el-option
                v-for="item in data.companyList"
                :key="item.id"
@@ -110,9 +111,9 @@
      </el-table-column>
      <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="160">
        <template #default="scope">
          <el-button link type="primary"  @click="scope.row.type == 1?openDialog('review',scope.row):openDeptDialog('review',scope.row) " >查看</el-button>
          <el-button link type="primary"  @click="scope.row.type == 1?openDialog('edit',scope.row):openDeptDialog('edit',scope.row)  " >编辑</el-button>
          <el-button link type="danger"  @click="handleDelete(scope.row)" >删除</el-button>
          <el-button link type="primary"  @click="scope.row.type == 1?openDialog('review',scope.row):openDeptDialog('review',scope.row)">查看</el-button>
          <el-button link type="primary"  @click="scope.row.type == 1?openDialog('edit',scope.row):openDeptDialog('edit',scope.row)" v-hasPermi="['qualityGoalTable:list:edit']">编辑</el-button>
          <el-button link type="danger"  @click="handleDelete(scope.row)" v-hasPermi="['qualityGoalTable:list:del']">删除</el-button>
        </template>
      </el-table-column>
    </el-table>
@@ -328,7 +329,6 @@
  let name = ''
  data.forEach(item => {
    name = ''
    console.log('item',item)
    if(item.type == 1){
      templatePath.value = '/tableCompanyExample.docx'
      name = item.companyName
@@ -341,9 +341,15 @@
    const month = (now.getMonth() +1).toString().padStart(2, '0');
    item.nowDate = year + '-' + month
    item.tableData = item.qualityTargets.map((i,index) => {
      return {
      return{
        ...i,
        nuum: index+1
        qualityTargetMesses: i.qualityTargetMesses.map((q,qindex) => {
          return{
            ...q,
            first: qindex == 0,
            nuum: index+1
          }
        })
      }
    })
    try {