firstExport
This commit is contained in:
parent
e5ee1481de
commit
755c0abb35
|
@ -40,7 +40,8 @@
|
|||
"vue-router": "^3.5.2",
|
||||
"vuex": "^3.6.2",
|
||||
"webpack-dev-server": "^4.7.3",
|
||||
"xlsx": "^0.17.1"
|
||||
"xlsx": "^0.17.1",
|
||||
"html-docx-js": "^0.3.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.15.0",
|
||||
|
|
|
@ -44,9 +44,8 @@
|
|||
fit
|
||||
stripe
|
||||
highlight-current-row
|
||||
max-height="620"
|
||||
height="100"
|
||||
v-el-height-adaptive-table="{bottomOffset: 40}"
|
||||
v-el-height-adaptive-table="{bottomOffset: 50}"
|
||||
>
|
||||
<el-table-column type="index" width="50"/>
|
||||
<el-table-column label="物料编号">
|
||||
|
|
|
@ -14,9 +14,9 @@
|
|||
border
|
||||
fit
|
||||
stripe
|
||||
max-height="620"
|
||||
height="100"
|
||||
v-el-height-adaptive-table="{bottomOffset: 10}"
|
||||
highlight-current-row
|
||||
v-el-height-adaptive-table="{bottomOffset: 50}"
|
||||
>
|
||||
<el-table-column type="index" width="50"/>
|
||||
<el-table-column label="工序编号">
|
||||
|
|
|
@ -14,33 +14,26 @@
|
|||
border
|
||||
fit
|
||||
stripe
|
||||
height="100"
|
||||
@current-change="handleCurrentChange"
|
||||
highlight-current-row
|
||||
height="660px"
|
||||
@current-change="handleCurrentChange">
|
||||
|
||||
v-el-height-adaptive-table="{bottomOffset: 10}"
|
||||
>
|
||||
<el-table-column type="index" width="50"/>
|
||||
|
||||
<el-table-column label="产品编号">
|
||||
<template slot-scope="scope"> {{ scope.row.number }}</template>
|
||||
<template slot-scope="scope">{{ scope.row.number }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="产品名称" width="200px">
|
||||
<template slot-scope="scope">{{ scope.row.name }}</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="规格型号">
|
||||
<template slot-scope="scope">{{ scope.row.specification }}</template>
|
||||
|
||||
|
||||
</el-table-column>
|
||||
|
||||
|
||||
</el-table>
|
||||
|
||||
</el-card>
|
||||
|
||||
</el-col>
|
||||
<el-col :span="15">
|
||||
<el-card class="box-card">
|
||||
<el-card class="box-card" id="processCard">
|
||||
<div slot="header" class="clearfix">
|
||||
<span style="font-size: 16px;
|
||||
font-weight: 700;
|
||||
|
@ -62,11 +55,12 @@
|
|||
font-weight: 700;
|
||||
">流程分解</span>
|
||||
</div>
|
||||
<el-button v-if="checkPermission(['subproduction_create'])" type="primary" icon="el-icon-plus" @click="handlesubproducationCreate">
|
||||
<el-button v-if="checkPermission(['subproduction_create'])" type="primary" icon="el-icon-plus"
|
||||
@click="handlesubproducationCreate">
|
||||
新增
|
||||
</el-button>
|
||||
<el-table
|
||||
height="190px"
|
||||
:height="halfHeight"
|
||||
:data="subproducationData"
|
||||
border
|
||||
fit
|
||||
|
@ -168,7 +162,7 @@
|
|||
border
|
||||
fit
|
||||
stripe
|
||||
height="220px"
|
||||
:height="halfHeight"
|
||||
style="width: 100%;"
|
||||
>
|
||||
<el-table-column type="index" width="50"/>
|
||||
|
@ -259,6 +253,7 @@
|
|||
border
|
||||
fit
|
||||
stripe
|
||||
:height="halfHeight"
|
||||
>
|
||||
<el-table-column type="index" width="50"/>
|
||||
<el-table-column label="物料编号">
|
||||
|
@ -359,6 +354,7 @@
|
|||
fit
|
||||
stripe
|
||||
style="width: 100%"
|
||||
:height="halfHeight"
|
||||
>
|
||||
<el-table-column type="index" width="50"/>
|
||||
<el-table-column label="物料编号" min-width="100">
|
||||
|
@ -447,6 +443,7 @@
|
|||
border
|
||||
fit
|
||||
stripe
|
||||
:height="halfHeight"
|
||||
>
|
||||
<el-table-column type="index" width="50"/>
|
||||
<el-table-column label="子工序名称">
|
||||
|
@ -536,6 +533,7 @@
|
|||
新增
|
||||
</el-button>
|
||||
<el-table
|
||||
:height="halfHeight"
|
||||
:data="techdoctableData"
|
||||
border
|
||||
fit
|
||||
|
@ -683,6 +681,7 @@
|
|||
|
||||
data() {
|
||||
return {
|
||||
halfHeight: 190,
|
||||
materialoptions: [],
|
||||
subproducationData: [],
|
||||
inputtableData: [],
|
||||
|
@ -756,6 +755,16 @@
|
|||
created() {
|
||||
this.getList();
|
||||
},
|
||||
mounted() {
|
||||
let that = this;
|
||||
let hei = document.getElementsByClassName('app-main')[0].clientHeight;
|
||||
let h = document.getElementById('processCard').clientHeight;
|
||||
that.halfHeight = (hei - h - 160) / 2;
|
||||
/* debugger;
|
||||
console.log(hei);
|
||||
console.log(h);
|
||||
console.log(this.halfHeight)*/
|
||||
},
|
||||
methods: {
|
||||
checkPermission,
|
||||
//产品列表
|
||||
|
|
|
@ -4,14 +4,13 @@
|
|||
<el-tabs v-model="activeName" type="card" @tab-click="handleClick">
|
||||
<el-tab-pane label="总览" name="1">
|
||||
<el-table
|
||||
v-loading="listLoading"
|
||||
:data="fifodetailList1.results"
|
||||
border
|
||||
fit
|
||||
stripe
|
||||
highlight-current-row
|
||||
height="620"
|
||||
v-el-height-adaptive-table="{bottomOffset: 40}"
|
||||
height="100"
|
||||
v-el-height-adaptive-table="{bottomOffset: 42}"
|
||||
>
|
||||
<el-table-column type="index" width="50"/>
|
||||
<el-table-column label="物料批次">
|
||||
|
@ -87,8 +86,8 @@
|
|||
fit
|
||||
stripe
|
||||
highlight-current-row
|
||||
height="620"
|
||||
v-el-height-adaptive-table="{bottomOffset: 40}"
|
||||
height="100"
|
||||
v-el-height-adaptive-table="{bottomOffset: 42}"
|
||||
>
|
||||
<el-table-column type="index" width="50"/>
|
||||
<el-table-column label="物料批次">
|
||||
|
@ -127,7 +126,7 @@
|
|||
stripe
|
||||
highlight-current-row
|
||||
height="620"
|
||||
v-el-height-adaptive-table="{bottomOffset: 40}"
|
||||
v-el-height-adaptive-table="{bottomOffset: 42}"
|
||||
>
|
||||
<el-table-column type="index" width="50"/>
|
||||
<el-table-column label="物料批次">
|
||||
|
@ -204,7 +203,7 @@
|
|||
stripe
|
||||
highlight-current-row
|
||||
height="620"
|
||||
v-el-height-adaptive-table="{bottomOffset: 40}"
|
||||
v-el-height-adaptive-table="{bottomOffset: 42}"
|
||||
>
|
||||
<el-table-column type="index" width="50"/>
|
||||
<el-table-column label="物料批次">
|
||||
|
|
|
@ -8,7 +8,6 @@
|
|||
fit
|
||||
stripe
|
||||
highlight-current-row
|
||||
max-height="700"
|
||||
height="100"
|
||||
v-el-height-adaptive-table="{bottomOffset: 42}"
|
||||
>
|
||||
|
|
|
@ -7,7 +7,8 @@
|
|||
fit
|
||||
stripe
|
||||
highlight-current-row
|
||||
max-height="600"
|
||||
height="100"
|
||||
v-el-height-adaptive-table="{bottomOffset: 42}"
|
||||
>
|
||||
<el-table-column type="index" label="序号" width="50"/>
|
||||
<el-table-column label="产品编号">
|
||||
|
|
|
@ -4,12 +4,14 @@
|
|||
<el-tabs v-model="activeName" type="card">
|
||||
<el-tab-pane label="成品不合格" name="1">
|
||||
<el-table
|
||||
v-loading="listLoading"
|
||||
:data="wproductList.results"
|
||||
border
|
||||
fit
|
||||
stripe
|
||||
highlight-current-row
|
||||
max-height="600"
|
||||
height="100"
|
||||
v-el-height-adaptive-table="{bottomOffset: 42}"
|
||||
>
|
||||
<el-table-column type="index" label="序号" width="50"/>
|
||||
<el-table-column label="产品编号">
|
||||
|
@ -70,8 +72,8 @@
|
|||
fit
|
||||
stripe
|
||||
highlight-current-row
|
||||
height="620"
|
||||
v-el-height-adaptive-table="{ bottomOffset: 40 }"
|
||||
height="100"
|
||||
v-el-height-adaptive-table="{bottomOffset: 42}"
|
||||
>
|
||||
<el-table-column type="index" width="50"/>
|
||||
<el-table-column label="玻璃编号">
|
||||
|
@ -129,14 +131,13 @@
|
|||
</el-tab-pane>
|
||||
<el-tab-pane label="入厂不合格" name="4">
|
||||
<el-table
|
||||
v-loading="listLoading"
|
||||
:data="fifodetailList4.results"
|
||||
border
|
||||
fit
|
||||
stripe
|
||||
highlight-current-row
|
||||
height="620"
|
||||
v-el-height-adaptive-table="{bottomOffset: 40}"
|
||||
height="100"
|
||||
v-el-height-adaptive-table="{bottomOffset: 42}"
|
||||
>
|
||||
<el-table-column type="index" width="50"/>
|
||||
<el-table-column label="物料批次">
|
||||
|
|
|
@ -716,6 +716,7 @@
|
|||
:title="formName"
|
||||
:visible.sync="recordFinishedVisible"
|
||||
:close-on-click-modal="false"
|
||||
id="showForm"
|
||||
>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
|
@ -742,6 +743,7 @@
|
|||
<img style="width: 45%;vertical-align: text-top;" :src="'http://49.232.14.174:2222'+item.field_value"/>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-button @click="exportDom">导出</el-button>
|
||||
</el-row>
|
||||
</el-dialog>
|
||||
<!--刷脸验证-->
|
||||
|
@ -767,6 +769,8 @@
|
|||
import {getTestRecord, getTestRecordItem, putTestRecordItem, delTestRecordItem, subTestRecordItem} from "@/api/qm";
|
||||
// import {genTree} from "@/utils";
|
||||
import Pagination from "@/components/Pagination"; // secondary package based on el-pagination
|
||||
import {saveAs} from "file-saver";
|
||||
import htmlDocx from "html-docx-js/dist/html-docx";
|
||||
const defaultetestitem = {};
|
||||
export default {
|
||||
inject: ['reload'],
|
||||
|
@ -934,6 +938,15 @@
|
|||
// this.getLists();
|
||||
},
|
||||
methods: {
|
||||
exportDom() {
|
||||
let dom = document.querySelector("#showForm .el-dialog");
|
||||
let str = dom.innerHTML;
|
||||
debugger;
|
||||
console.log(str);
|
||||
let htmlStr = `<!DOCTYPE html><html lang="en"><body> ${str}</body></html>`;
|
||||
saveAs(htmlDocx.asBlob(htmlStr, {orientation: "landscape"}), "报告.doc");
|
||||
},
|
||||
|
||||
checkPermission,
|
||||
handleClick(tab) {
|
||||
this.listLoading = true;
|
||||
|
|
Loading…
Reference in New Issue