exportrPoint
This commit is contained in:
parent
da2b2950b5
commit
a75ea367b8
|
@ -112,6 +112,10 @@
|
|||
@click="handleRecordDetail(scope)"
|
||||
>查看
|
||||
</el-link>
|
||||
<el-link
|
||||
@click="handleRecordExport(scope)"
|
||||
>导出
|
||||
</el-link>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
@ -155,11 +159,11 @@
|
|||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import {getfifodetailList} from "@/api/inm";
|
||||
// import {getfifodetailList} from "@/api/inm";
|
||||
import checkPermission from "@/utils/permission";
|
||||
import {mtest, getwproductList} from "@/api/wpm";
|
||||
import {getrecordformList, getrffieldList} from "@/api/mtm";
|
||||
import {getTestRecord, getTestRecordItem} from "@/api/qm";
|
||||
// import {getrecordformList, getrffieldList} from "@/api/mtm";
|
||||
import {getTestRecord, getTestRecordItem,getTestRecordExport} from "@/api/qm";
|
||||
import Pagination from "@/components/Pagination"; // secondary package based on el-pagination
|
||||
|
||||
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>
|
||||
|
|
|
@ -48,6 +48,7 @@
|
|||
<el-table-column align="center" label="操作">
|
||||
<template slot-scope="scope">
|
||||
<el-link @click="handleRecordDetail(scope)">查看</el-link>
|
||||
<el-link @click="handleRecordExport(scope)">导出</el-link>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
@ -90,8 +91,7 @@
|
|||
<script>
|
||||
import checkPermission from "@/utils/permission";
|
||||
import {getProductionplan} from "@/api/pm";
|
||||
import {getTestRecord, getTestRecordItem} from "@/api/qm";
|
||||
|
||||
import {getTestRecord, getTestRecordItem,getTestRecordExport} from "@/api/qm";
|
||||
export default {
|
||||
data() {
|
||||
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>
|
||||
|
|
|
@ -91,6 +91,13 @@
|
|||
>
|
||||
查看
|
||||
</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>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
@ -239,6 +246,7 @@
|
|||
import faceLogin from '@/components/faceLogin/review.vue';
|
||||
import {getProcessList,getrecordformList} from "@/api/mtm";
|
||||
import {getsubplanList} from "@/api/wpm";
|
||||
import {getTestRecordExport} from "@/api/qm";
|
||||
import {firstTestInit,firstAudit} from "@/api/pm";
|
||||
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() {
|
||||
this.getProcessList();
|
||||
|
|
|
@ -253,6 +253,12 @@
|
|||
@click="handlerecord(scope)"
|
||||
>填写表单
|
||||
</el-link>
|
||||
<el-link
|
||||
v-if="scope.row.is_filled"
|
||||
type="primary"
|
||||
@click="handlerecordExport(scope)"
|
||||
>导出
|
||||
</el-link>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
@ -646,7 +652,6 @@
|
|||
.word-wrap {
|
||||
padding: 25px;
|
||||
}
|
||||
|
||||
.box-card {
|
||||
height: 300px;
|
||||
}
|
||||
|
@ -668,22 +673,20 @@
|
|||
deleteOperationequip,
|
||||
deleteOperationwproduct,
|
||||
gettoolList,
|
||||
createTool,
|
||||
createInputs,
|
||||
recordInit,
|
||||
createOutputs,
|
||||
deleteOperationeinput,
|
||||
wproductPlace,
|
||||
} from "@/api/wpm";
|
||||
import mammoth from "mammoth";
|
||||
import {getrffieldList, gettechdocList} from "@/api/mtm";
|
||||
import { gettechdocList} from "@/api/mtm";
|
||||
import checkPermission from "@/utils/permission";
|
||||
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';
|
||||
|
||||
export default {
|
||||
components: {Pagination, faceLogin},
|
||||
components: {faceLogin},
|
||||
inject: ["reload"],
|
||||
data() {
|
||||
return {
|
||||
|
@ -810,8 +813,7 @@
|
|||
pdf: "",
|
||||
};
|
||||
},
|
||||
computed: {},
|
||||
watch: {},
|
||||
|
||||
created() {
|
||||
this.id = this.$route.params.id; //操作ID
|
||||
this.readbook();
|
||||
|
@ -825,6 +827,7 @@
|
|||
this.getprogressList(); //产出物料调出
|
||||
this.gettoolList(); //工序工装
|
||||
},
|
||||
|
||||
methods: {
|
||||
checkPermission,
|
||||
|
||||
|
@ -990,13 +993,23 @@
|
|||
this.formID = scope.row.id;
|
||||
recordInit(this.formID).then((response) => {
|
||||
if (response.data) {
|
||||
debugger;
|
||||
this.fieldList = response.data;
|
||||
this.fieldList.name = response.data.form_.name;
|
||||
}
|
||||
});
|
||||
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() {
|
||||
|
|
Loading…
Reference in New Issue