exportrPoint

This commit is contained in:
shijing 2022-04-29 09:56:41 +08:00
parent da2b2950b5
commit a75ea367b8
4 changed files with 74 additions and 14 deletions

View File

@ -112,6 +112,10 @@
@click="handleRecordDetail(scope)" @click="handleRecordDetail(scope)"
>查看 >查看
</el-link> </el-link>
<el-link
@click="handleRecordExport(scope)"
>导出
</el-link>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -155,11 +159,11 @@
</div> </div>
</template> </template>
<script> <script>
import {getfifodetailList} from "@/api/inm"; // import {getfifodetailList} from "@/api/inm";
import checkPermission from "@/utils/permission"; import checkPermission from "@/utils/permission";
import {mtest, getwproductList} from "@/api/wpm"; import {mtest, getwproductList} from "@/api/wpm";
import {getrecordformList, getrffieldList} from "@/api/mtm"; // import {getrecordformList, getrffieldList} from "@/api/mtm";
import {getTestRecord, getTestRecordItem} from "@/api/qm"; import {getTestRecord, getTestRecordItem,getTestRecordExport} from "@/api/qm";
import Pagination from "@/components/Pagination"; // secondary package based on el-pagination import Pagination from "@/components/Pagination"; // secondary package based on el-pagination
export default { export default {
@ -279,6 +283,18 @@
} }
}) })
}, },
handleRecordExport(scope){
let exportFormId = scope.row.id;
getTestRecordExport(exportFormId).then(res=>{
if(res.code===200){
let link = document.createElement('a');
link.href = res.data.path;
document.body.appendChild(link);
link.click();
}
})
},
}, },
}; };
</script> </script>

View File

@ -48,6 +48,7 @@
<el-table-column align="center" label="操作"> <el-table-column align="center" label="操作">
<template slot-scope="scope"> <template slot-scope="scope">
<el-link @click="handleRecordDetail(scope)">查看</el-link> <el-link @click="handleRecordDetail(scope)">查看</el-link>
<el-link @click="handleRecordExport(scope)">导出</el-link>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -90,8 +91,7 @@
<script> <script>
import checkPermission from "@/utils/permission"; import checkPermission from "@/utils/permission";
import {getProductionplan} from "@/api/pm"; import {getProductionplan} from "@/api/pm";
import {getTestRecord, getTestRecordItem} from "@/api/qm"; import {getTestRecord, getTestRecordItem,getTestRecordExport} from "@/api/qm";
export default { export default {
data() { data() {
return { return {
@ -175,6 +175,18 @@
} }
}) })
}, },
handleRecordExport(scope){
let exportFormId = scope.row.id;
// debugger;
getTestRecordExport(exportFormId).then(res=>{
if(res.code===200){
let link = document.createElement('a');
link.href = res.data.path;
document.body.appendChild(link);
link.click();
}
})
},
}, },
}; };
</script> </script>

View File

@ -91,6 +91,13 @@
> >
查看 查看
</el-link> </el-link>
<el-link
v-if="scope.row.leader_1!==null&&scope.row.leader_2!==null&&scope.row.leader_3!==null"
type="primary"
@click="handleExportClick(scope)"
>
导出
</el-link>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -239,6 +246,7 @@
import faceLogin from '@/components/faceLogin/review.vue'; import faceLogin from '@/components/faceLogin/review.vue';
import {getProcessList,getrecordformList} from "@/api/mtm"; import {getProcessList,getrecordformList} from "@/api/mtm";
import {getsubplanList} from "@/api/wpm"; import {getsubplanList} from "@/api/wpm";
import {getTestRecordExport} from "@/api/qm";
import {firstTestInit,firstAudit} from "@/api/pm"; import {firstTestInit,firstAudit} from "@/api/pm";
import {getTestRecordItem,putTestRecordItem,subTestRecordItem} from "@/api/qm"; import {getTestRecordItem,putTestRecordItem,subTestRecordItem} from "@/api/qm";
@ -584,6 +592,17 @@
}) })
} }
}, },
handleExportClick(scope){
let exportFormId = scope.row.id;
getTestRecordExport(exportFormId).then(res=>{
if(res.code===200){
let link = document.createElement('a');
link.href = res.data.path;
document.body.appendChild(link);
link.click();
}
})
},
}, },
mounted() { mounted() {
this.getProcessList(); this.getProcessList();

View File

@ -253,6 +253,12 @@
@click="handlerecord(scope)" @click="handlerecord(scope)"
>填写表单 >填写表单
</el-link> </el-link>
<el-link
v-if="scope.row.is_filled"
type="primary"
@click="handlerecordExport(scope)"
>导出
</el-link>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -646,7 +652,6 @@
.word-wrap { .word-wrap {
padding: 25px; padding: 25px;
} }
.box-card { .box-card {
height: 300px; height: 300px;
} }
@ -668,22 +673,20 @@
deleteOperationequip, deleteOperationequip,
deleteOperationwproduct, deleteOperationwproduct,
gettoolList, gettoolList,
createTool,
createInputs, createInputs,
recordInit, recordInit,
createOutputs, createOutputs,
deleteOperationeinput, deleteOperationeinput,
wproductPlace, wproductPlace,
} from "@/api/wpm"; } from "@/api/wpm";
import mammoth from "mammoth"; import { gettechdocList} from "@/api/mtm";
import {getrffieldList, gettechdocList} from "@/api/mtm";
import checkPermission from "@/utils/permission"; import checkPermission from "@/utils/permission";
import {getprogressList} from "@/api/pm"; import {getprogressList} from "@/api/pm";
import Pagination from "@/components/Pagination"; // secondary package based on el-pagination import {getTestRecordExport} from "@/api/qm";
import faceLogin from '@/components/faceLogin/review.vue'; import faceLogin from '@/components/faceLogin/review.vue';
export default { export default {
components: {Pagination, faceLogin}, components: {faceLogin},
inject: ["reload"], inject: ["reload"],
data() { data() {
return { return {
@ -810,8 +813,7 @@
pdf: "", pdf: "",
}; };
}, },
computed: {},
watch: {},
created() { created() {
this.id = this.$route.params.id; //操作ID this.id = this.$route.params.id; //操作ID
this.readbook(); this.readbook();
@ -825,6 +827,7 @@
this.getprogressList(); //产出物料调出 this.getprogressList(); //产出物料调出
this.gettoolList(); //工序工装 this.gettoolList(); //工序工装
}, },
methods: { methods: {
checkPermission, checkPermission,
@ -990,13 +993,23 @@
this.formID = scope.row.id; this.formID = scope.row.id;
recordInit(this.formID).then((response) => { recordInit(this.formID).then((response) => {
if (response.data) { if (response.data) {
debugger;
this.fieldList = response.data; this.fieldList = response.data;
this.fieldList.name = response.data.form_.name; this.fieldList.name = response.data.form_.name;
} }
}); });
this.dialogVisibleForm = true; this.dialogVisibleForm = true;
}, },
handlerecordExport(scope){
let exportFormId = scope.row.id;
getTestRecordExport(exportFormId).then(res=>{
if(res.code===200){
let link = document.createElement('a');
link.href = res.data.path;
document.body.appendChild(link);
link.click();
}
})
},
//工序工装列表 //工序工装列表
gettoolList() { gettoolList() {