|
|
@@ -31,15 +31,13 @@
|
|
|
</template>
|
|
|
<!-- 操作列 -->
|
|
|
<template v-slot:action="{ row }">
|
|
|
- <!-- <el-link
|
|
|
+ <el-link
|
|
|
+ v-if="row.qualityWorkOrderId"
|
|
|
type="primary"
|
|
|
:underline="false"
|
|
|
- icon="el-icon-edit"
|
|
|
- @click="sampleCollection(row)"
|
|
|
- v-if="row.status == 0"
|
|
|
+ @click="craftFiles(row.qualityWorkOrderId)"
|
|
|
+ >工艺文件</el-link
|
|
|
>
|
|
|
- 收样
|
|
|
- </el-link> -->
|
|
|
<el-link
|
|
|
type="primary"
|
|
|
:underline="false"
|
|
|
@@ -57,12 +55,14 @@
|
|
|
ref="inspectionProjectReportRef"
|
|
|
@reload="reload"
|
|
|
/>
|
|
|
+ <fileList ref="fileListRef"></fileList>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
import search from './components/search.vue';
|
|
|
import inspectionProjectReport from '@/views/inspectionWork/components/inspectionProjectReport.vue';
|
|
|
+ import fileList from '@/components/addDoc/main.vue';
|
|
|
import tabMixins from '@/mixins/tableColumnsMixin';
|
|
|
import {
|
|
|
getList,
|
|
|
@@ -72,11 +72,13 @@
|
|
|
} from '@/api/inspectionProjectTask';
|
|
|
import dictMixins from '@/mixins/dictMixins';
|
|
|
import { recordingMethodList } from '@/utils/util.js';
|
|
|
+ import { craftFiles } from '@/api/inspectionWork';
|
|
|
|
|
|
export default {
|
|
|
components: {
|
|
|
search,
|
|
|
- inspectionProjectReport
|
|
|
+ inspectionProjectReport,
|
|
|
+ fileList
|
|
|
},
|
|
|
mixins: [dictMixins, tabMixins],
|
|
|
data() {
|
|
|
@@ -300,7 +302,16 @@
|
|
|
reload(where) {
|
|
|
this.$refs.table.reload({ page: 1, where: where });
|
|
|
},
|
|
|
-
|
|
|
+ async craftFiles(id) {
|
|
|
+ if (id) {
|
|
|
+ const data = await craftFiles(id);
|
|
|
+ if (data.length) {
|
|
|
+ this.$nextTick(() => {
|
|
|
+ this.$refs.fileListRef.open(data.map((item) => item.id), 'view');
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
async sampleCollection(row) {
|
|
|
const code = await verificationQualityInspector(row.id);
|
|
|
if (code == '-1') {
|