firstExport

This commit is contained in:
shijing 2022-04-06 15:04:34 +08:00
parent e5ee1481de
commit 755c0abb35
9 changed files with 59 additions and 37 deletions

View File

@ -40,7 +40,8 @@
"vue-router": "^3.5.2", "vue-router": "^3.5.2",
"vuex": "^3.6.2", "vuex": "^3.6.2",
"webpack-dev-server": "^4.7.3", "webpack-dev-server": "^4.7.3",
"xlsx": "^0.17.1" "xlsx": "^0.17.1",
"html-docx-js": "^0.3.1"
}, },
"devDependencies": { "devDependencies": {
"@babel/core": "^7.15.0", "@babel/core": "^7.15.0",

View File

@ -44,9 +44,8 @@
fit fit
stripe stripe
highlight-current-row highlight-current-row
max-height="620"
height="100" 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 type="index" width="50"/>
<el-table-column label="物料编号"> <el-table-column label="物料编号">

View File

@ -14,9 +14,9 @@
border border
fit fit
stripe stripe
max-height="620"
height="100" 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 type="index" width="50"/>
<el-table-column label="工序编号"> <el-table-column label="工序编号">

View File

@ -4,7 +4,7 @@
<el-col :span="9"> <el-col :span="9">
<el-card> <el-card>
<div slot="header" class="clearfix"> <div slot="header" class="clearfix">
<span style="font-size: 16px; <span style="font-size: 16px;
font-weight: 700; font-weight: 700;
">产品列表</span> ">产品列表</span>
</div> </div>
@ -14,33 +14,26 @@
border border
fit fit
stripe stripe
height="100"
@current-change="handleCurrentChange"
highlight-current-row highlight-current-row
height="660px" v-el-height-adaptive-table="{bottomOffset: 10}"
@current-change="handleCurrentChange"> >
<el-table-column type="index" width="50"/> <el-table-column type="index" width="50"/>
<el-table-column label="产品编号"> <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>
<el-table-column label="产品名称" width="200px"> <el-table-column label="产品名称" width="200px">
<template slot-scope="scope">{{ scope.row.name }}</template> <template slot-scope="scope">{{ scope.row.name }}</template>
</el-table-column> </el-table-column>
<el-table-column label="规格型号"> <el-table-column label="规格型号">
<template slot-scope="scope">{{ scope.row.specification }}</template> <template slot-scope="scope">{{ scope.row.specification }}</template>
</el-table-column> </el-table-column>
</el-table> </el-table>
</el-card> </el-card>
</el-col> </el-col>
<el-col :span="15"> <el-col :span="15">
<el-card class="box-card"> <el-card class="box-card" id="processCard">
<div slot="header" class="clearfix"> <div slot="header" class="clearfix">
<span style="font-size: 16px; <span style="font-size: 16px;
font-weight: 700; font-weight: 700;
@ -62,11 +55,12 @@
font-weight: 700; font-weight: 700;
">流程分解</span> ">流程分解</span>
</div> </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-button>
<el-table <el-table
height="190px" :height="halfHeight"
:data="subproducationData" :data="subproducationData"
border border
fit fit
@ -168,7 +162,7 @@
border border
fit fit
stripe stripe
height="220px" :height="halfHeight"
style="width: 100%;" style="width: 100%;"
> >
<el-table-column type="index" width="50"/> <el-table-column type="index" width="50"/>
@ -259,6 +253,7 @@
border border
fit fit
stripe stripe
:height="halfHeight"
> >
<el-table-column type="index" width="50"/> <el-table-column type="index" width="50"/>
<el-table-column label="物料编号"> <el-table-column label="物料编号">
@ -359,6 +354,7 @@
fit fit
stripe stripe
style="width: 100%" style="width: 100%"
:height="halfHeight"
> >
<el-table-column type="index" width="50"/> <el-table-column type="index" width="50"/>
<el-table-column label="物料编号" min-width="100"> <el-table-column label="物料编号" min-width="100">
@ -447,6 +443,7 @@
border border
fit fit
stripe stripe
:height="halfHeight"
> >
<el-table-column type="index" width="50"/> <el-table-column type="index" width="50"/>
<el-table-column label="子工序名称"> <el-table-column label="子工序名称">
@ -536,6 +533,7 @@
新增 新增
</el-button> </el-button>
<el-table <el-table
:height="halfHeight"
:data="techdoctableData" :data="techdoctableData"
border border
fit fit
@ -683,6 +681,7 @@
data() { data() {
return { return {
halfHeight: 190,
materialoptions: [], materialoptions: [],
subproducationData: [], subproducationData: [],
inputtableData: [], inputtableData: [],
@ -756,6 +755,16 @@
created() { created() {
this.getList(); 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: { methods: {
checkPermission, checkPermission,
//产品列表 //产品列表

View File

@ -4,14 +4,13 @@
<el-tabs v-model="activeName" type="card" @tab-click="handleClick"> <el-tabs v-model="activeName" type="card" @tab-click="handleClick">
<el-tab-pane label="总览" name="1"> <el-tab-pane label="总览" name="1">
<el-table <el-table
v-loading="listLoading"
:data="fifodetailList1.results" :data="fifodetailList1.results"
border border
fit fit
stripe stripe
highlight-current-row highlight-current-row
height="620" height="100"
v-el-height-adaptive-table="{bottomOffset: 40}" v-el-height-adaptive-table="{bottomOffset: 42}"
> >
<el-table-column type="index" width="50"/> <el-table-column type="index" width="50"/>
<el-table-column label="物料批次"> <el-table-column label="物料批次">
@ -87,8 +86,8 @@
fit fit
stripe stripe
highlight-current-row highlight-current-row
height="620" height="100"
v-el-height-adaptive-table="{bottomOffset: 40}" v-el-height-adaptive-table="{bottomOffset: 42}"
> >
<el-table-column type="index" width="50"/> <el-table-column type="index" width="50"/>
<el-table-column label="物料批次"> <el-table-column label="物料批次">
@ -127,7 +126,7 @@
stripe stripe
highlight-current-row highlight-current-row
height="620" 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 type="index" width="50"/>
<el-table-column label="物料批次"> <el-table-column label="物料批次">
@ -204,7 +203,7 @@
stripe stripe
highlight-current-row highlight-current-row
height="620" 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 type="index" width="50"/>
<el-table-column label="物料批次"> <el-table-column label="物料批次">

View File

@ -8,7 +8,6 @@
fit fit
stripe stripe
highlight-current-row highlight-current-row
max-height="700"
height="100" height="100"
v-el-height-adaptive-table="{bottomOffset: 42}" v-el-height-adaptive-table="{bottomOffset: 42}"
> >

View File

@ -7,7 +7,8 @@
fit fit
stripe stripe
highlight-current-row 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 type="index" label="序号" width="50"/>
<el-table-column label="产品编号"> <el-table-column label="产品编号">

View File

@ -4,12 +4,14 @@
<el-tabs v-model="activeName" type="card"> <el-tabs v-model="activeName" type="card">
<el-tab-pane label="成品不合格" name="1"> <el-tab-pane label="成品不合格" name="1">
<el-table <el-table
v-loading="listLoading"
:data="wproductList.results" :data="wproductList.results"
border border
fit fit
stripe stripe
highlight-current-row 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 type="index" label="序号" width="50"/>
<el-table-column label="产品编号"> <el-table-column label="产品编号">
@ -70,8 +72,8 @@
fit fit
stripe stripe
highlight-current-row highlight-current-row
height="620" height="100"
v-el-height-adaptive-table="{ bottomOffset: 40 }" v-el-height-adaptive-table="{bottomOffset: 42}"
> >
<el-table-column type="index" width="50"/> <el-table-column type="index" width="50"/>
<el-table-column label="玻璃编号"> <el-table-column label="玻璃编号">
@ -129,14 +131,13 @@
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="入厂不合格" name="4"> <el-tab-pane label="入厂不合格" name="4">
<el-table <el-table
v-loading="listLoading"
:data="fifodetailList4.results" :data="fifodetailList4.results"
border border
fit fit
stripe stripe
highlight-current-row highlight-current-row
height="620" height="100"
v-el-height-adaptive-table="{bottomOffset: 40}" v-el-height-adaptive-table="{bottomOffset: 42}"
> >
<el-table-column type="index" width="50"/> <el-table-column type="index" width="50"/>
<el-table-column label="物料批次"> <el-table-column label="物料批次">

View File

@ -716,6 +716,7 @@
:title="formName" :title="formName"
:visible.sync="recordFinishedVisible" :visible.sync="recordFinishedVisible"
:close-on-click-modal="false" :close-on-click-modal="false"
id="showForm"
> >
<el-row> <el-row>
<el-col :span="12"> <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"/> <img style="width: 45%;vertical-align: text-top;" :src="'http://49.232.14.174:2222'+item.field_value"/>
</div> </div>
</el-col> </el-col>
<el-button @click="exportDom">导出</el-button>
</el-row> </el-row>
</el-dialog> </el-dialog>
<!--刷脸验证--> <!--刷脸验证-->
@ -767,6 +769,8 @@
import {getTestRecord, getTestRecordItem, putTestRecordItem, delTestRecordItem, subTestRecordItem} from "@/api/qm"; import {getTestRecord, getTestRecordItem, putTestRecordItem, delTestRecordItem, subTestRecordItem} from "@/api/qm";
// import {genTree} from "@/utils"; // import {genTree} from "@/utils";
import Pagination from "@/components/Pagination"; // secondary package based on el-pagination 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 = {}; const defaultetestitem = {};
export default { export default {
inject: ['reload'], inject: ['reload'],
@ -934,6 +938,15 @@
// this.getLists(); // this.getLists();
}, },
methods: { 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, checkPermission,
handleClick(tab) { handleClick(tab) {
this.listLoading = true; this.listLoading = true;