| | |
| | | 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-form-item label="单位名称:" v-if="data.isAdmin" style="margin-left: 20px"> |
| | | <el-select v-model="data.queryParams.companyId" placeholder="请选择" filterable clearable> |
| | | <el-option |
| | | v-for="item in data.companyList" |
| | | :key="item.id" |
| | |
| | | <!-- remote--> |
| | | <!-- @change="selectValue"--> |
| | | <!-- reserve-keyword--> |
| | | <!-- placeholder="请输入企业名称"--> |
| | | <!-- placeholder="请输入单位名称"--> |
| | | <!-- remote-show-suffix--> |
| | | <!-- :remote-method="getCompanyList"--> |
| | | <!-- :loading="loadingCompany"--> |
| | |
| | | <el-table v-loading="loading" :data="dataList" :border="true" @selection-change="handleSelectionChange"> |
| | | <el-table-column type="selection" width="55" /> |
| | | <el-table-column type="index" label="序号" width="80" align="center"></el-table-column> |
| | | <el-table-column label="企业名称" prop="companyName" align="center" /> |
| | | <el-table-column label="单位名称" prop="companyName" align="center" /> |
| | | <el-table-column label="年份" prop="year" align="center" /> |
| | | <el-table-column label="质量目标级别" prop="type" align="center" > |
| | | <template #default="scope"> |
| | |
| | | </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> |
| | |
| | | let name = '' |
| | | data.forEach(item => { |
| | | name = '' |
| | | console.log('item',item) |
| | | if(item.type == 1){ |
| | | templatePath.value = '/tableCompanyExample.docx' |
| | | name = item.companyName |
| | |
| | | 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 { |