|
@@ -405,6 +405,26 @@
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
|
|
+
|
|
|
|
|
+ <el-table-column fixed="right" label="操作" width="80">
|
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
|
+ <el-popconfirm
|
|
|
|
|
+ class="ele-action"
|
|
|
|
|
+ title="确定要删除当前方案吗?"
|
|
|
|
|
+ @confirm="handDel(scope.$index)"
|
|
|
|
|
+ >
|
|
|
|
|
+ <template v-slot:reference>
|
|
|
|
|
+ <el-link
|
|
|
|
|
+ type="danger"
|
|
|
|
|
+ :underline="false"
|
|
|
|
|
+ icon="el-icon-delete"
|
|
|
|
|
+ >
|
|
|
|
|
+ 删除
|
|
|
|
|
+ </el-link>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </el-popconfirm>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </el-table-column>
|
|
|
</el-table>
|
|
</el-table>
|
|
|
<el-pagination
|
|
<el-pagination
|
|
|
@size-change="handleSchemeSizeChange"
|
|
@size-change="handleSchemeSizeChange"
|
|
@@ -431,6 +451,7 @@
|
|
|
queryQualityTempleContent,
|
|
queryQualityTempleContent,
|
|
|
queryQualityInventory
|
|
queryQualityInventory
|
|
|
} from '@/api/inspectionWork';
|
|
} from '@/api/inspectionWork';
|
|
|
|
|
+ import { getQualityTemplateByIds } from '@/api/inspectionTemplate';
|
|
|
export default {
|
|
export default {
|
|
|
components: {
|
|
components: {
|
|
|
inspectionTemplateDialog
|
|
inspectionTemplateDialog
|
|
@@ -941,11 +962,23 @@
|
|
|
addInspectionTemplate() {
|
|
addInspectionTemplate() {
|
|
|
this.$refs.inspectionTemplateRef.open(2);
|
|
this.$refs.inspectionTemplateRef.open(2);
|
|
|
},
|
|
},
|
|
|
- inspectionTemplateSuccess(select) {
|
|
|
|
|
|
|
+ async inspectionTemplateSuccess(select) {
|
|
|
|
|
+ let data = await getQualityTemplateByIds({
|
|
|
|
|
+ templateIds: select.map((item) => item.id)
|
|
|
|
|
+ });
|
|
|
// planTemplateList
|
|
// planTemplateList
|
|
|
- console.log(select);
|
|
|
|
|
- this.templateList.push(...select);
|
|
|
|
|
- // this.schemePagination.total = this.templateList.length;
|
|
|
|
|
|
|
+ console.log(data);
|
|
|
|
|
+ this.templateList.push(...data);
|
|
|
|
|
+ const strings = this.templateList.map((item) => JSON.stringify(item));
|
|
|
|
|
+ const removeDupList = [...new Set(strings)];
|
|
|
|
|
+ const result = removeDupList.map((item) => JSON.parse(item));
|
|
|
|
|
+ this.templateList = result;
|
|
|
|
|
+ console.log(this.templateList);
|
|
|
|
|
+ this.schemePagination.total = this.templateList.length;
|
|
|
|
|
+ },
|
|
|
|
|
+ handDel(index) {
|
|
|
|
|
+ console.log(index);
|
|
|
|
|
+ this.templateList.splice(index, 1);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
};
|
|
};
|