后工程日报表

This commit is contained in:
朱菊兰 2023-07-19 15:45:49 +08:00
parent 37518be002
commit 8afbef1297
29 ha cambiato i file con 618 aggiunte e 1461 eliminazioni

Vedi File

@ -1 +0,0 @@
@media screen and (max-width:2104px){.searchStyle[data-v-018c1e50]{width:1000px}}@media screen and (min-width:2105px){.searchStyle[data-v-018c1e50]{width:100%}}

Vedi File

@ -1 +1 @@
.production-report-box[data-v-15fc97e4]{height:calc(100vh - 145px);padding:12px 16px;margin:8px 16px;border-radius:8px;background-color:#fff}
.production-report-box[data-v-00b3ea05]{height:calc(100vh - 145px);padding:12px 16px;margin:8px 16px;border-radius:8px;background-color:#fff}

File diff soppresso perché una o più righe sono troppo lunghe

1
dist/css/chunk-vendors.330963ff.css esterno Normal file

File diff soppresso perché una o più righe sono troppo lunghe

Vedi File

@ -14,6 +14,10 @@
/>
<missing-glyph />
<glyph glyph-name="downward" unicode="&#58884;" d="M556.942222 144.099556l363.064889 401.806222c24.860444 21.617778 24.860444 56.263111 0 77.880889a68.437333 68.437333 0 0 1-44.942222 16.156444c-16.896 0-33.052444-5.859556-44.885333-16.156444L512 260.949333l-318.236444 362.951111a68.437333 68.437333 0 0 1-44.942223 16.099556c-16.896 0-33.109333-5.802667-44.942222-16.156444-24.746667-21.617778-24.746667-56.206222 0-77.824l363.121778-401.749334c5.973333-5.290667 13.141333-9.443556 21.048889-12.231111 23.722667-8.305778 51.029333-3.527111 68.892444 12.060445z" horiz-adv-x="1024" />
<glyph glyph-name="upward" unicode="&#58885;" d="M556.942222 623.900444l363.064889-401.806222c24.860444-21.617778 24.860444-56.263111 0-77.880889a68.437333 68.437333 0 0 0-44.942222-16.156444c-16.896 0-33.052444 5.859556-44.885333 16.156444L512 507.050667l-318.236444-362.951111a68.437333 68.437333 0 0 0-44.942223-16.099556c-16.896 0-33.109333 5.802667-44.942222 16.156444-24.746667 21.617778-24.746667 56.206222 0 77.824L467.057778 623.729778c5.973333 5.290667 13.141333 9.443556 21.048889 12.231111 23.722667 8.305778 51.029333 3.527111 68.892444-12.060445z" horiz-adv-x="1024" />
<glyph glyph-name="detail" unicode="&#58881;" d="M902.428444 705.251556H332.401778a7.964444 7.964444 0 0 1-7.793778-8.021334v-56.206222a7.964444 7.964444 0 0 1 7.793778-8.078222h570.026666A7.964444 7.964444 0 0 1 910.222222 641.024v56.206222a7.964444 7.964444 0 0 1-7.793778 8.021334z m0-285.127112H332.401778a7.964444 7.964444 0 0 1-7.793778-7.964444v-56.32a7.964444 7.964444 0 0 1 7.793778-7.964444h570.026666a7.964444 7.964444 0 0 1 7.793778 7.964444v56.32a7.964444 7.964444 0 0 1-7.793778 7.964444z m0-285.070222H332.401778a7.964444 7.964444 0 0 1-7.793778-8.078222v-56.206222a7.964444 7.964444 0 0 1 7.793778-8.021334h570.026666a7.964444 7.964444 0 0 1 7.793778 8.021334v56.206222a7.964444 7.964444 0 0 1-7.793778 8.078222zM113.777778 669.127111c0-20.081778 10.410667-38.684444 27.306666-48.696889a53.361778 53.361778 0 0 1 54.670223 0 56.547556 56.547556 0 0 1 27.306666 48.696889 56.547556 56.547556 0 0 1-27.306666 48.696889 53.361778 53.361778 0 0 1-54.613334 0A56.547556 56.547556 0 0 1 113.777778 669.127111zM113.777778 384c0-20.081778 10.410667-38.684444 27.306666-48.696889a53.361778 53.361778 0 0 1 54.670223 0A56.547556 56.547556 0 0 1 223.061333 384a56.547556 56.547556 0 0 1-27.306666 48.696889 53.361778 53.361778 0 0 1-54.613334 0A56.547556 56.547556 0 0 1 113.777778 384z m0-285.127111c0-20.081778 10.410667-38.684444 27.306666-48.696889a53.361778 53.361778 0 0 1 54.670223 0 56.547556 56.547556 0 0 1 27.306666 48.696889 56.547556 56.547556 0 0 1-27.306666 48.696889 53.361778 53.361778 0 0 1-54.613334 0 56.547556 56.547556 0 0 1-27.363555-48.696889z" horiz-adv-x="1024" />
<glyph glyph-name="edit" unicode="&#58882;" d="M873.016889 395.264a32.824889 32.824889 0 0 0 65.649778 0v-273.806222a164.124444 164.124444 0 0 0-164.124445-164.124445h-525.084444A164.124444 164.124444 0 0 0 85.333333 121.457778v525.084444A164.124444 164.124444 0 0 0 249.457778 810.666667h312.32a32.824889 32.824889 0 1 0 0-65.649778h-312.32a98.417778 98.417778 0 0 1-98.474667-98.417778v-525.141333c0-54.385778 44.088889-98.474667 98.417778-98.474667h525.141333a98.417778 98.417778 0 0 1 98.474667 98.417778V395.320889z m-14.222222 362.097778a32.824889 32.824889 0 0 0 48.014222-44.771556L548.750222 328.533333a32.824889 32.824889 0 1 0-48.014222 44.771556l358.115556 384.056889z" horiz-adv-x="1024" />

Prima

Larghezza:  |  Altezza:  |  Dimensione: 3.6 KiB

Dopo

Larghezza:  |  Altezza:  |  Dimensione: 4.8 KiB

2
dist/index.html esterno
Vedi File

@ -1 +1 @@
<!doctype html><html lang=""><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><link rel="icon" href="/favicon.ico"><title>tft-mes</title><script defer="defer" src="/js/chunk-vendors.a42f8636.js"></script><script defer="defer" src="/js/app.e89b87d1.js"></script><link href="/css/app.68cbc19b.css" rel="stylesheet"></head><body><noscript><strong>We're sorry but tft-mes doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id="app"></div></body></html>
<!doctype html><html lang=""><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><link rel="icon" href="/favicon.ico"><title>tft-mes</title><script defer="defer" src="/js/chunk-vendors.60a1a666.js"></script><script defer="defer" src="/js/app.11e7f529.js"></script><link href="/css/chunk-vendors.330963ff.css" rel="stylesheet"><link href="/css/app.eea12e50.css" rel="stylesheet"></head><body><noscript><strong>We're sorry but tft-mes doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id="app"></div></body></html>

File diff soppresso perché una o più righe sono troppo lunghe

File diff soppresso perché una o più righe sono troppo lunghe

1
dist/js/2873.59a351a5.js esterno Normal file

File diff soppresso perché una o più righe sono troppo lunghe

File diff soppresso perché una o più righe sono troppo lunghe

File diff soppresso perché una o più righe sono troppo lunghe

1
dist/js/6015.c6917d38.js esterno Normal file
Vedi File

@ -0,0 +1 @@
"use strict";(self["webpackChunktft_mes"]=self["webpackChunktft_mes"]||[]).push([[6015],{6015:function(t,r,e){e.r(r),e.d(r,{default:function(){return c}});var o=function(){var t=this,r=t._self._c;return r("div",{staticClass:"reoprtManager"},[r("div",{staticClass:"report"},[t._m(0),r("div",{staticClass:"numBox"},[r("div",[r("div",{staticClass:"reportNum"},[r("div",{staticClass:"num"},[t._v(t._s(t.totalReports))]),t._m(1)]),r("div",{staticClass:"detail",on:{click:function(r){return t.toDetail()}}},[t._v("了解详情")])])])]),t._l(t.reportList,(function(e,o){return r("div",{key:o,staticClass:"reportDesc"},[r("div",[r("div",{staticClass:"reportNum"},[r("div",{staticClass:"num"},[t._v(t._s(e.quantity))]),r("div",{staticClass:"text"},[r("p",{staticClass:"font"},[t._v(t._s(e.name))]),r("p",{staticClass:"letter"},[t._v("Reports")])])]),r("div",{staticClass:"detail",on:{click:function(r){return t.toDetail(e.id)}}},[t._v("了解详情")])])])}))],2)},n=[function(){var t=this,r=t._self._c;return r("div",{staticClass:"imgBox"},[r("img",{attrs:{src:e(5002),alt:"",width:"355px",height:"314px"}})])},function(){var t=this,r=t._self._c;return r("div",{staticClass:"text"},[r("p",{staticClass:"font"},[t._v("全部报表")]),r("p",{staticClass:"letter"},[t._v("Reports")])])}],u=e(6527),s={name:"ReportList",data(){return{totalReports:0,reportList:[]}},mounted(){this.getList()},methods:{getList(){(0,u.J_)({}).then((t=>{0===t.code&&t.data.length>0?this.reportList=t.data:this.reportList=[]})),(0,u.up)({}).then((t=>{0===t.code&&t.data.length>0?this.totalReports=t.data[0].reportNum:this.totalReports=0}))},toDetail(t){this.$router.push({name:"reportListDetail",params:{categoryId:t||""}})}}},a=s,i=e(1001),p=(0,i.Z)(a,o,n,!1,null,null,null),c=p.exports},6527:function(t,r,e){e.d(r,{AT:function(){return C},Hg:function(){return f},J_:function(){return n},Kx:function(){return x},QL:function(){return i},V0:function(){return g},W0:function(){return h},a:function(){return d},an:function(){return y},bu:function(){return Z},fL:function(){return k},gc:function(){return G},kB:function(){return u},m3:function(){return l},oR:function(){return _},sy:function(){return s},uW:function(){return v},uj:function(){return R},up:function(){return c},wF:function(){return m},wy:function(){return a},yk:function(){return p}});var o=e(8859);function n(t){return(0,o.Z)({url:"/report/report-sheet-category/list",method:"post",data:t})}function u(t){return(0,o.Z)({url:"/report/report-sheet/page",method:"post",data:t})}function s(t){return(0,o.Z)({url:"/report/report-sheet/update",method:"post",data:t})}function a(t){return(0,o.Z)({url:"/report/report-sheet/delete",method:"post",data:t})}function i(t){return(0,o.Z)({url:"/report/report-sheet/get",method:"post",data:t})}function p(t){return(0,o.Z)({url:"/report/report-sheet-category/page",method:"post",data:t})}function c(t){return(0,o.Z)({url:"/report/GlassReport/getReportNum",method:"post",data:t})}function l(t){return(0,o.Z)({url:"/report/report-sheet-category/add",method:"post",data:t})}function d(t){return(0,o.Z)({url:"/report/report-sheet-category/update",method:"post",data:t})}function f(t){return(0,o.Z)({url:"/report/report-sheet-category/get",method:"post",data:t})}function h(t){return(0,o.Z)({url:"/report/report-sheet-category/delete",method:"post",data:t})}function m(t){return(0,o.Z)({url:"/order/proReport/getProductReportData",method:"post",data:t})}function g(t){return(0,o.Z)({url:"/order/proReport/exportProductReport",method:"post",responseType:"blob",data:t,timeout:6e4})}function v(t){return(0,o.Z)({url:"/report/GlassReport/listGlass",method:"post",data:t})}function R(t){return(0,o.Z)({url:"/report/GlassReport/qualityReport",method:"post",data:t})}function _(t){return(0,o.Z)({url:"/report/GlassReport/qualityReportexport",method:"post",responseType:"blob",data:t})}function Z(t){return(0,o.Z)({url:"/report/GlassReport/thickReport",method:"post",data:t})}function y(t){return(0,o.Z)({url:"/report/GlassReport/thickReportexport",method:"post",responseType:"blob",data:t})}function C(t){return(0,o.Z)({url:"/quality/finalpackaging/queryGlassData",method:"post",data:t})}function k(t){return(0,o.Z)({url:"/quality/finalpackaging/claGlassData",method:"post",data:t})}function x(t){return(0,o.Z)({url:"/report/GlassReport/getGlassVoid",method:"post",data:t})}function G(t){return(0,o.Z)({url:"/report/GlassReport/getUnitVoid",method:"post",data:t})}},5002:function(t,r,e){t.exports=e.p+"img/report.b2b3c253.png"}}]);

Vedi File

@ -1 +0,0 @@
"use strict";(self["webpackChunktft_mes"]=self["webpackChunktft_mes"]||[]).push([[6015],{6015:function(t,r,e){e.r(r),e.d(r,{default:function(){return c}});var o=function(){var t=this,r=t._self._c;return r("div",{staticClass:"reoprtManager"},[r("div",{staticClass:"report"},[t._m(0),r("div",{staticClass:"numBox"},[r("div",[r("div",{staticClass:"reportNum"},[r("div",{staticClass:"num"},[t._v(t._s(t.totalReports))]),t._m(1)]),r("div",{staticClass:"detail",on:{click:function(r){return t.toDetail()}}},[t._v("了解详情")])])])]),t._l(t.reportList,(function(e,o){return r("div",{key:o,staticClass:"reportDesc"},[r("div",[r("div",{staticClass:"reportNum"},[r("div",{staticClass:"num"},[t._v(t._s(e.quantity))]),r("div",{staticClass:"text"},[r("p",{staticClass:"font"},[t._v(t._s(e.name))]),r("p",{staticClass:"letter"},[t._v("Reports")])])]),r("div",{staticClass:"detail",on:{click:function(r){return t.toDetail(e.id)}}},[t._v("了解详情")])])])}))],2)},n=[function(){var t=this,r=t._self._c;return r("div",{staticClass:"imgBox"},[r("img",{attrs:{src:e(5002),alt:"",width:"355px",height:"314px"}})])},function(){var t=this,r=t._self._c;return r("div",{staticClass:"text"},[r("p",{staticClass:"font"},[t._v("全部报表")]),r("p",{staticClass:"letter"},[t._v("Reports")])])}],s=e(6527),u={name:"ReportList",data(){return{totalReports:0,reportList:[]}},mounted(){this.getList()},methods:{getList(){(0,s.J_)({}).then((t=>{0===t.code&&t.data.length>0?this.reportList=t.data:this.reportList=[]})),(0,s.up)({}).then((t=>{0===t.code&&t.data.length>0?this.totalReports=t.data[0].reportNum:this.totalReports=0}))},toDetail(t){this.$router.push({name:"reportListDetail",params:{categoryId:t||""}})}}},a=u,i=e(1001),p=(0,i.Z)(a,o,n,!1,null,null,null),c=p.exports},6527:function(t,r,e){e.d(r,{AT:function(){return y},Hg:function(){return f},J_:function(){return n},Kx:function(){return k},QL:function(){return i},V0:function(){return m},W0:function(){return h},a:function(){return d},an:function(){return Z},bu:function(){return R},fL:function(){return C},gc:function(){return x},kB:function(){return s},m3:function(){return l},oR:function(){return _},sy:function(){return u},uW:function(){return g},uj:function(){return v},up:function(){return c},wy:function(){return a},yk:function(){return p}});var o=e(8859);function n(t){return(0,o.Z)({url:"/report/report-sheet-category/list",method:"post",data:t})}function s(t){return(0,o.Z)({url:"/report/report-sheet/page",method:"post",data:t})}function u(t){return(0,o.Z)({url:"/report/report-sheet/update",method:"post",data:t})}function a(t){return(0,o.Z)({url:"/report/report-sheet/delete",method:"post",data:t})}function i(t){return(0,o.Z)({url:"/report/report-sheet/get",method:"post",data:t})}function p(t){return(0,o.Z)({url:"/report/report-sheet-category/page",method:"post",data:t})}function c(t){return(0,o.Z)({url:"/report/GlassReport/getReportNum",method:"post",data:t})}function l(t){return(0,o.Z)({url:"/report/report-sheet-category/add",method:"post",data:t})}function d(t){return(0,o.Z)({url:"/report/report-sheet-category/update",method:"post",data:t})}function f(t){return(0,o.Z)({url:"/report/report-sheet-category/get",method:"post",data:t})}function h(t){return(0,o.Z)({url:"/report/report-sheet-category/delete",method:"post",data:t})}function m(t){return(0,o.Z)({url:"/order/proReport/exportProductReport",method:"post",responseType:"blob",data:t,timeout:6e4})}function g(t){return(0,o.Z)({url:"/report/GlassReport/listGlass",method:"post",data:t})}function v(t){return(0,o.Z)({url:"/report/GlassReport/qualityReport",method:"post",data:t})}function _(t){return(0,o.Z)({url:"/report/GlassReport/qualityReportexport",method:"post",responseType:"blob",data:t})}function R(t){return(0,o.Z)({url:"/report/GlassReport/thickReport",method:"post",data:t})}function Z(t){return(0,o.Z)({url:"/report/GlassReport/thickReportexport",method:"post",responseType:"blob",data:t})}function y(t){return(0,o.Z)({url:"/quality/finalpackaging/queryGlassData",method:"post",data:t})}function C(t){return(0,o.Z)({url:"/quality/finalpackaging/claGlassData",method:"post",data:t})}function k(t){return(0,o.Z)({url:"/report/GlassReport/getGlassVoid",method:"post",data:t})}function x(t){return(0,o.Z)({url:"/report/GlassReport/getUnitVoid",method:"post",data:t})}},5002:function(t,r,e){t.exports=e.p+"img/report.b2b3c253.png"}}]);

1
dist/js/7789.e0aebf36.js esterno Normal file

File diff soppresso perché una o più righe sono troppo lunghe

File diff soppresso perché una o più righe sono troppo lunghe

File diff soppresso perché una o più righe sono troppo lunghe

312
dist/js/chunk-vendors.60a1a666.js esterno Normal file

File diff soppresso perché una o più righe sono troppo lunghe

File diff soppresso perché una o più righe sono troppo lunghe

14
package-lock.json generato
Vedi File

@ -9,7 +9,7 @@
"version": "0.1.0",
"dependencies": {
"axios": "^0.27.2",
"code-brick-zj": "^0.1.0",
"code-brick-zj": "^1.0.2",
"core-js": "^3.8.3",
"echarts": "^5.4.0",
"element-ui": "^2.15.8",
@ -4103,9 +4103,9 @@
}
},
"node_modules/code-brick-zj": {
"version": "0.1.0",
"resolved": "https://registry.npmjs.org/code-brick-zj/-/code-brick-zj-0.1.0.tgz",
"integrity": "sha512-vEymEN/28lEJP3045DCE/7143SXjdNyNmWZuy3/NcIUP/e9YOjhm46itzjNWCjJZCI6vWvQkCD1EfmA4hPknuw=="
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/code-brick-zj/-/code-brick-zj-1.0.2.tgz",
"integrity": "sha512-V8XwYqXjIPMfPCaZMja4I2MJPT45EEnzRmTL1Ps6aMsmUQ/PhZ48OwUvddBFNqNZeVV13aPm1b5K1c3ogfad8Q=="
},
"node_modules/codepage": {
"version": "1.15.0",
@ -16157,9 +16157,9 @@
}
},
"code-brick-zj": {
"version": "0.1.0",
"resolved": "https://registry.npmjs.org/code-brick-zj/-/code-brick-zj-0.1.0.tgz",
"integrity": "sha512-vEymEN/28lEJP3045DCE/7143SXjdNyNmWZuy3/NcIUP/e9YOjhm46itzjNWCjJZCI6vWvQkCD1EfmA4hPknuw=="
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/code-brick-zj/-/code-brick-zj-1.0.2.tgz",
"integrity": "sha512-V8XwYqXjIPMfPCaZMja4I2MJPT45EEnzRmTL1Ps6aMsmUQ/PhZ48OwUvddBFNqNZeVV13aPm1b5K1c3ogfad8Q=="
},
"codepage": {
"version": "1.15.0",

Vedi File

@ -9,7 +9,7 @@
},
"dependencies": {
"axios": "^0.27.2",
"code-brick-zj": "^0.1.0",
"code-brick-zj": "^1.0.2",
"core-js": "^3.8.3",
"echarts": "^5.4.0",
"element-ui": "^2.15.8",

Vedi File

@ -88,6 +88,13 @@ export function reportCategoryDelete(data) {
})
}
// 后工程段日报表
export function getProductReportData(data) {
return request({
url: '/order/proReport/getProductReportData',
method: 'post',
data
})
}
export function exportProductReport(data) {
return request({
url: '/order/proReport/exportProductReport',

Vedi File

@ -1,188 +0,0 @@
<template>
<div class="report-classification">
<search-bar
:formConfigs="formConfig"
ref="searchBarForm"
@headBtnClick="buttonClick"
/>
<base-table
:page="listQuery.current"
:limit="listQuery.size"
:table-props="tableProps"
:table-data="tableData"
:max-height="tableH"
>
<method-btn
v-if="tableBtn.length"
slot="handleBtn"
:width="80"
label="操作"
:method-list="tableBtn"
@clickBtn="handleClick"
/>
</base-table>
<pagination
:page.sync="listQuery.current"
:limit.sync="listQuery.size"
:total="total"
@pagination="getList()"
/>
<!-- 新增 -->
<base-dialog
:dialogTitle="addOrEditTitle"
:dialogVisible="centervisible"
@cancel="handleCancel"
@confirm="handleConfirm"
:before-close="handleCancel"
>
<report-class-add ref="reportClass" @successSubmit="successSubmit" />
</base-dialog>
</div>
</template>
<script>
import { tableHeight } from '@/utils/index'
import ReportClassAdd from './../components/reportClassAdd.vue'
import { getReportCategory, reportCategoryDelete } from '@/api/basicConfig'
const tableProps = [
{
prop: 'name',
label: '报表分类名'
}
]
const tableBtn = [
{
type: 'edit',
btnName: '编辑'
},
{
type: 'delete',
btnName: '删除'
}
]
export default {
name: 'ReportClassification',
components: { ReportClassAdd },
data() {
return {
formConfig: [
{
type: 'input',
label: '关键字',
placeholder: '报表分类名',
param: 'name',
width: 300
},
{
type: 'button',
btnName: '查询',
name: 'search',
color: 'primary'
},
{
type: 'separate'
},
{
type: 'button',
btnName: '新增',
name: 'add',
color: 'success',
plain: true
}
],
tableProps,
tableData: [],
tableBtn,
tableH: tableHeight(330),
total: 0,
listQuery: {
current: 1,
size: 20,
name: ''
},
centervisible: false,
addOrEditTitle: '' //title
}
},
mounted() {
window.addEventListener('resize', () => {
this.tableH = tableHeight(265)
})
this.getList()
},
methods: {
getList() {
getReportCategory({ ...this.listQuery }).then((res) => {
if (res.code === 0 && res.data) {
this.tableData = res.data.records
this.total = res.data.total
} else {
this.tableData = []
this.total = 0
}
})
},
handleClick(val) {
if (val.type === 'edit') {
this.addOrEditTitle = '编辑'
this.$nextTick(() => {
this.$refs.reportClass.init(val.data.id)
})
this.centervisible = true
} else {
this.$confirm('确认删除报表分类名"' + val.data.name + '"吗?', {
type: 'warning'
})
.then(() => {
reportCategoryDelete({ id: val.data.id }).then(() => {
this.$message({
message: '工单删除成功',
type: 'success',
duration: 1500,
onClose: () => {}
})
this.listQuery.current = 1
this.getList()
})
})
.catch(() => {})
}
},
buttonClick(val) {
switch (val.btnName) {
case 'search':
this.listQuery.name = val.name
this.listQuery.current = 1
this.getList()
break
default:
this.addOrEditTitle = '新增'
this.centervisible = true
this.$nextTick(() => {
this.$refs.reportClass.init()
})
}
},
handleCancel() {
this.$refs.reportClass.formClear()
this.centervisible = false
this.addOrEditTitle = ''
},
handleConfirm() {
this.$refs.reportClass.submitForm()
},
successSubmit() {
this.handleCancel()
this.getList()
}
}
}
</script>
<style lang="scss">
.report-classification {
height: calc(100vh - 203px);
padding: 12px 16px;
margin: 0px 16px;
border-radius: 8px;
background-color: #fff;
}
</style>

Vedi File

@ -1,36 +0,0 @@
<template>
<div id="reportDesign" class="reportDesign">
<iframe :src="url" width="100%" height="100%"></iframe>
</div>
</template>
<script>
export default {
name: 'ReportDesign',
data() {
return {
url: process.env.VUE_APP_REPORT_DESIGN_URL
}
},
mounted() {
const vm = this
const { name } = this.$route.params
this.url += name ? '?_u=db:' + this.$route.params.name : ''
const ifream = document.getElementById('reportDesign')
ifream.onload = function () {
console.log('加载完成')
vm.loading = false
}
}
}
</script>
<style lang="scss" scoped>
.reportDesign {
margin: 0px 16px 0 16px;
width: 98.5%;
height: calc(100vh - 205px);
.mainIframe {
width: 100%;
height: 100%;
}
}
</style>

Vedi File

@ -1,149 +0,0 @@
<template>
<div class="reoprtManager">
<div class="report">
<div class="imgBox">
<img
src="./../../../assets/basic/report.png"
alt=""
width="355px"
height="314px"
/>
</div>
<div class="numBox">
<div>
<div class="reportNum">
<div class="num">{{ totalReports }}</div>
<div class="text">
<p class="font">全部报表</p>
<p class="letter">Reports</p>
</div>
</div>
<div class="detail" @click="toDetail()">了解详情</div>
</div>
</div>
</div>
<div class="reportDesc" v-for="(item, i) in reportList" :key="i">
<div>
<div class="reportNum">
<div class="num">{{ item.quantity }}</div>
<div class="text">
<p class="font">{{ item.name }}</p>
<p class="letter">Reports</p>
</div>
</div>
<div class="detail" @click="toDetail(item.id)">了解详情</div>
</div>
</div>
</div>
</template>
<script>
import { getReportCategorylist } from '@/api/basicConfig'
export default {
name: 'ReportList',
data() {
return {
totalReports: 0,
reportList: []
}
},
mounted() {
this.getList()
},
methods: {
getList() {
getReportCategorylist({}).then((res) => {
if (res.code === 0 && res.data.length > 0) {
this.totalReports = 0
for (let i = 0; i < res.data.length; i++) {
this.totalReports += res.data[i].quantity
}
this.reportList = res.data
} else {
this.totalReports = 0
this.reportList = []
}
})
},
toDetail(id) {
this.$router.push({
// path: '/basicConfig/reportManagement/reportListDetail',
name: 'reportListDetail',
params: { categoryId: id ? id : '' }
})
}
}
}
</script>
<style lang="scss">
.reoprtManager {
padding-left: 16px;
padding-top: 8px;
display: flex;
flex-flow: row wrap;
height: calc(100vh - 210px);
align-content: flex-start;
overflow: auto;
.report {
width: 768px;
height: 456px;
background: #fff;
border-radius: 4px;
margin: 0 16px 16px 0;
position: relative;
.imgBox {
display: inline-block;
width: 480px;
height: 100%;
padding: 80px 0 0 80px;
}
.numBox {
position: absolute;
display: inline-block;
height: 100%;
top: 120px;
}
}
.reportDesc {
width: 376px;
height: 456px;
background: #fff;
border-radius: 4px;
text-align: center;
padding-top: 120px;
margin: 0 16px 16px 0;
}
.reportNum {
.num {
display: inline-block;
font-size: 80px;
font-weight: 600;
color: #161616;
margin-right: 36px;
}
.text {
display: inline-block;
.font {
font-size: 18px;
letter-spacing: 2px;
margin-bottom: 5px;
}
.letter {
font-size: 32px;
font-weight: 300;
}
}
}
.detail {
width: 200px;
height: 30px;
font-size: 14px;
line-height: 30px;
text-align: center;
color: #fff;
background: #0b58ff;
border-radius: 4px;
margin: 139px auto 0;
cursor: pointer;
}
}
</style>

Vedi File

@ -1,271 +0,0 @@
<template>
<div class="report-classification">
<search-bar
:formConfigs="formConfig"
ref="searchBarForm"
@headBtnClick="buttonClick"
/>
<base-table
:page="listQuery.current"
:limit="listQuery.size"
:table-props="tableProps"
:table-data="tableData"
:max-height="tableH"
@emitFun="categoryChange"
>
<method-btn
v-if="tableBtn.length"
slot="handleBtn"
:width="180"
label="操作"
:method-list="tableBtn"
@clickBtn="handleClick"
/>
</base-table>
<pagination
:page.sync="listQuery.current"
:limit.sync="listQuery.size"
:total="total"
@pagination="getList()"
/>
<!-- 编辑 -->
<base-dialog
:dialogTitle="addOrEditTitle"
:dialogVisible="centervisible"
@cancel="handleCancel"
@confirm="handleConfirm"
:before-close="handleCancel"
>
<report-name-edit ref="reportNameEdit" @successSubmit="successSubmit" />
</base-dialog>
</div>
</template>
<script>
import ReportNameEdit from './../components/reportNameEdit.vue'
import {
getReportlist,
delReportlist,
getReportCategorylist,
updateReportlist
} from '@/api/basicConfig'
import { tableHeight, timeFormatter } from '@/utils'
import categorySelect from './../components/categorySelect.vue'
const tableProps = [
{
prop: 'fileName',
label: '报表名称'
},
{
prop: 'category',
label: '报表分类',
subcomponent: categorySelect
},
{
prop: 'createTime',
label: '添加时间',
filter: timeFormatter
}
]
const tableBtn = [
{
type: 'view',
btnName: '预览'
},
{
type: 'design',
btnName: '设计'
},
{
type: 'edit',
btnName: '编辑'
},
{
type: 'delete',
btnName: '删除'
}
]
export default {
name: 'ReportListDetail',
components: { ReportNameEdit },
data() {
return {
formConfig: [
{
type: 'input',
label: '关键字',
placeholder: '报表名称',
param: 'name',
width: 200
},
{
type: 'select',
label: '报表分类',
selectOptions: [],
param: 'category',
labelField: 'name',
valueField: 'id',
defaultSelect: '',
width: 200
},
{
type: 'button',
btnName: '查询',
name: 'search',
color: 'primary'
},
{
type: 'separate'
},
{
type: 'button',
btnName: '新增',
name: 'add',
color: 'success',
plain: true
}
],
tableProps,
tableData: [],
tableBtn,
tableH: tableHeight(330),
total: 0,
listQuery: {
current: 1,
size: 20,
name: '',
category: ''
},
typeList: [],
centervisible: false,
addOrEditTitle: '' //title
}
},
created() {
this.getCategorylist()
},
mounted() {
window.addEventListener('resize', () => {
this.tableH = tableHeight(265)
})
this.formConfig[1].defaultSelect = this.$route.params.categoryId || ''
this.listQuery.category = this.$route.params.categoryId || ''
},
methods: {
getList() {
getReportlist({ ...this.listQuery }).then((res) => {
if (res.code === 0 && res.data) {
this.tableData = res.data.records
this.total = res.data.total
} else {
this.tableData = []
this.total = 0
}
})
},
getCategorylist() {
getReportCategorylist({}).then((res) => {
if (res.code === 0 && res.data.length > 0) {
localStorage.setItem('reportCategory', JSON.stringify(res.data))
this.formConfig[1].selectOptions = res.data
} else {
localStorage.setItem('reportCategory', '')
}
this.getList()
})
},
handleClick(val) {
switch (val.type) {
case 'view':
this.$router.push({
// path: '/basicConfig/reportManagement/reportView',
name: 'reportView',
params: { name: val.data.name }
})
break
case 'design':
this.$router.push({
// path: '/basicConfig/reportManagement/reportDesign',
name: 'reportDesign',
params: { name: val.data.name }
})
break
case 'edit':
this.addOrEditTitle = '编辑'
this.centervisible = true
this.$nextTick(() => {
this.$refs.reportNameEdit.init(val.data.id)
})
break
default:
this.$confirm('确认删除报表"' + val.data.name + '"吗?', {
type: 'warning'
})
.then(() => {
delReportlist({ id: val.data.id }).then(() => {
this.$message({
message: '报表删除成功',
type: 'success',
duration: 1500,
onClose: () => {}
})
this.listQuery.current = 1
this.getList()
})
})
.catch(() => {})
}
},
buttonClick(val) {
switch (val.btnName) {
case 'search':
this.listQuery.name = val.name
this.listQuery.category = val.category
this.listQuery.current = 1
this.getList()
break
default:
this.$router.push({
path: '/basicConfig/reportManagement/reportDesign'
})
}
},
handleCancel() {
this.$refs.reportNameEdit.formClear()
this.centervisible = false
this.addOrEditTitle = ''
},
handleConfirm() {
this.$refs.reportNameEdit.submitForm()
},
successSubmit() {
this.handleCancel()
this.getList()
},
categoryChange(val) {
updateReportlist({
fileName: val.injectData.fileName,
id: val.injectData.id,
category: val.categoryId
}).then((res) => {
if (res.code === 0) {
this.$message({
message: '操作成功',
type: 'success',
duration: 1500
})
this.getList()
}
})
}
}
}
</script>
<style lang="scss">
.report-classification {
height: calc(100vh - 203px);
padding: 12px 16px;
margin: 0px 16px;
border-radius: 8px;
background-color: #fff;
}
</style>

Vedi File

@ -1,36 +0,0 @@
<template>
<div id="reportView" class="reportView">
<iframe :src="url" width="100%" height="100%"></iframe>
</div>
</template>
<script>
export default {
name: 'ReportView',
data() {
return {
url: process.env.VUE_APP_REPORT_VIEW_URL
}
},
mounted() {
const vm = this
const { name } = this.$route.params
this.url += name ? '?_u=db:' + this.$route.params.name : ''
const ifream = document.getElementById('reportView')
ifream.onload = function () {
console.log('加载完成')
vm.loading = false
}
}
}
</script>
<style lang="scss" scoped>
.reportView {
margin: 0px 16px 0 16px;
width: 98.5%;
height: calc(100vh - 205px);
.mainIframe {
width: 100%;
height: 100%;
}
}
</style>

Vedi File

@ -5,6 +5,7 @@
ref="searchBarForm"
@headBtnClick="buttonClick"
class="searchStyle"
:isFold="true"
>
<div style="display: inline-block">
<el-upload
@ -531,15 +532,3 @@ export default {
}
}
</script>
<style lang="scss" scoped>
@media screen and (max-width: 2104px) {
.searchStyle {
width: 1000px;
}
}
@media screen and (min-width: 2105px) {
.searchStyle {
width: 100%;
}
}
</style>

Vedi File

@ -18,12 +18,14 @@ export default {
}
},
mounted() {
console.log(this.injectData)
console.log(this.injectData.prop)
if (this.injectData.prop === 'ct1') {
this.showTotal = this.injectData.ct1
} else if (this.injectData.prop === 'ct2') {
this.showTotal = this.injectData.ct2
// console.log(this.injectData)
// console.log(this.injectData.prop)
if (this.injectData.prop === 'daySum') {
this.showTotal = this.injectData.daySum
} else if (this.injectData.prop === 'nightSum') {
this.showTotal = this.injectData.nightSum
} else if (this.injectData.prop === 'sum') {
this.showTotal = this.injectData.sum
}
}
}

Vedi File

@ -18,15 +18,24 @@
<script>
import { tableHeight } from '@/utils/index'
import TableTags from './components/TableTags.vue'
import { exportProductReport } from '@/api/reportManagement'
import moment from 'moment'
import {
exportProductReport,
getProductReportData
} from '@/api/reportManagement'
const tableProp = [
{
prop: 'process',
prop: 'row1',
label: '区域',
fixed: true
},
{
prop: 'equipmentName',
prop: 'row2',
label: '',
fixed: true
},
{
prop: 'row3',
label: '项目指标',
minWidth: 150,
fixed: true
@ -35,39 +44,44 @@ const tableProp = [
label: '白班(8:00-20:00)',
align: 'center',
children: [
{ prop: 'b1', label: '7-8', width: 60 },
{ prop: 'b2', label: '8-9', width: 60 },
{ prop: 'b3', label: '9-10', width: 60 },
{ prop: 'b4', label: '10-11', width: 60 },
{ prop: 'b5', label: '11-12', width: 60 },
{ prop: 'b6', label: '12-13', width: 60 },
{ prop: 'b7', label: '13-14', width: 60 },
{ prop: 'b8', label: '14-15', width: 60 },
{ prop: 'b9', label: '15-16', width: 60 },
{ prop: 'b10', label: '16-17', width: 60 },
{ prop: 'b11', label: '17-18', width: 60 },
{ prop: 'b12', label: '18-19', width: 60 },
{ prop: 'ct1', label: '合计', subcomponent: TableTags }
{ prop: 'seven', label: '7-8', width: 60 },
{ prop: 'eight', label: '8-9', width: 60 },
{ prop: 'nine', label: '9-10', width: 60 },
{ prop: 'ten', label: '10-11', width: 60 },
{ prop: 'eleven', label: '11-12', width: 60 },
{ prop: 'twelve', label: '12-13', width: 60 },
{ prop: 'thirteen', label: '13-14', width: 60 },
{ prop: 'fourteen', label: '14-15', width: 60 },
{ prop: 'fifteen', label: '15-16', width: 60 },
{ prop: 'sixteen', label: '16-17', width: 60 },
{ prop: 'seventeen', label: '17-18', width: 60 },
{ prop: 'eighteen', label: '18-19', width: 60 },
{ prop: 'daySum', label: '合计', subcomponent: TableTags }
]
},
{
label: '夜班(20:00-8:00)',
align: 'center',
children: [
{ prop: 'y1', label: '19-20', width: 60 },
{ prop: 'y2', label: '20-21', width: 60 },
{ prop: 'y3', label: '21-22', width: 60 },
{ prop: 'y4', label: '22-23', width: 60 },
{ prop: 'y5', label: '23-24', width: 60 },
{ prop: 'y6', label: '0-1', width: 60 },
{ prop: 'y7', label: '1-2', width: 60 },
{ prop: 'y8', label: '2-3', width: 60 },
{ prop: 'y9', label: '3-4', width: 60 },
{ prop: 'y10', label: '4-5', width: 60 },
{ prop: 'y11', label: '5-6', width: 60 },
{ prop: 'y12', label: '6-7', width: 60 },
{ prop: 'ct2', label: '合计', subcomponent: TableTags }
{ prop: 'nineteen', label: '19-20', width: 60 },
{ prop: 'twenty', label: '20-21', width: 60 },
{ prop: 'twentyOne', label: '21-22', width: 60 },
{ prop: 'twentyTwo', label: '22-23', width: 60 },
{ prop: 'twentyThree', label: '23-24', width: 60 },
{ prop: 'zero', label: '0-1', width: 60 },
{ prop: 'one', label: '1-2', width: 60 },
{ prop: 'two', label: '2-3', width: 60 },
{ prop: 'three', label: '3-4', width: 60 },
{ prop: 'four', label: '4-5', width: 60 },
{ prop: 'five', label: '5-6', width: 60 },
{ prop: 'six', label: '6-7', width: 60 },
{ prop: 'nightSum', label: '合计', subcomponent: TableTags }
]
},
{
prop: 'sum',
label: '总计',
subcomponent: TableTags
}
]
export default {
@ -81,7 +95,8 @@ export default {
selectOptions: JSON.parse(localStorage.getItem('publicList'))
.proLineVoList,
param: 'proLineId',
defaultSelect: '',
defaultSelect: '1',
clearable: false,
width: 120
},
{
@ -91,6 +106,8 @@ export default {
format: 'yyyy-MM-dd',
valueFormat: 'yyyy-MM-dd',
param: 'hour',
defaultSelect: '',
clearable: false,
width: 200
},
{
@ -114,23 +131,112 @@ export default {
proLineId: '',
hour: ''
},
tableH: tableHeight(300),
tableH: tableHeight(225),
tableProp,
tableData: [],
span: []
span: [],
span2: [],
tableHead: [
{ row1: '综合', row2: '', row3: '上片投入' },
{ row1: '综合', row2: '', row3: '机器人复投' },
{ row1: '综合', row2: '', row3: '再清洗品' },
{ row1: '综合', row2: '', row3: '良品总投入数' },
{ row1: '综合', row2: '', row3: '工序总损耗' },
{ row1: '综合', row2: '', row3: '后清洗输出' },
{ row1: '上片', row2: '', row3: '损失' },
{ row1: '精切', row2: '', row3: '损失' },
{ row1: '精切', row2: '', row3: '抽检' },
{ row1: '磨边', row2: '', row3: '损失' },
{ row1: '磨边', row2: '', row3: '抽检' },
{ row1: '前清洗', row2: '', row3: '损失' },
{ row1: '边检', row2: '', row3: '损失' },
{ row1: '复投', row2: '', row3: '损失' },
{ row1: '贴合压合', row2: '', row3: '贴合损失' },
{ row1: '贴合压合', row2: '', row3: '压合损失' },
{ row1: '面研磨机', row2: '', row3: '输入' },
{ row1: '面研磨机', row2: '', row3: '1#输入' },
{ row1: '面研磨机', row2: '', row3: '2#输入' },
{ row1: '面研磨机', row2: '', row3: '3#输入' },
{ row1: '面研磨机', row2: '', row3: '4#输入' },
{ row1: '面研磨机', row2: '', row3: '5#输入' },
{ row1: '面研磨机', row2: '', row3: '6#输入' },
{ row1: '面研磨机', row2: '', row3: '输出' },
{ row1: '面研磨机', row2: '', row3: '1#输出' },
{ row1: '面研磨机', row2: '', row3: '2#输出' },
{ row1: '面研磨机', row2: '', row3: '3#输出' },
{ row1: '面研磨机', row2: '', row3: '4#输出' },
{ row1: '面研磨机', row2: '', row3: '5#输出' },
{ row1: '面研磨机', row2: '', row3: '6#输出' },
{ row1: '面研磨机', row2: '', row3: '损失' },
{ row1: '剥片', row2: '', row3: '损失' },
{ row1: '预清洗', row2: '', row3: '损失' },
{ row1: '后清洗', row2: '', row3: '损失' },
{ row1: '后清洗', row2: '', row3: '输出' },
{ row1: '检查包装段', row2: '', row3: '检查数' },
{ row1: '检查包装段', row2: '', row3: '抽检数' },
{ row1: '检查包装段', row2: '', row3: 'B1品' },
{ row1: '检查包装段', row2: '', row3: 'B2品' },
{ row1: '检查包装段', row2: '', row3: 'A1品' },
{ row1: '检查包装段', row2: '', row3: 'A2品' },
{ row1: '检查包装段', row2: '', row3: '工耗损失' },
{ row1: '缺陷统计', row2: '前边检不良', row3: '掉片' },
{ row1: '缺陷统计', row2: '前边检不良', row3: '烧边' },
{ row1: '缺陷统计', row2: '前边检不良', row3: '过磨' },
{ row1: '缺陷统计', row2: '前边检不良', row3: '欠磨' },
{ row1: '缺陷统计', row2: '前边检不良', row3: '未磨' },
{ row1: '缺陷统计', row2: '前边检不良', row3: '边裂/裂纹' },
{ row1: '缺陷统计', row2: '前工程不良', row3: 'BL数' },
{ row1: '缺陷统计', row2: '前工程不良', row3: 'BL尺寸' },
{ row1: '缺陷统计', row2: '前工程不良', row3: 'Tin上数' },
{ row1: '缺陷统计', row2: '前工程不良', row3: 'Tin上尺寸' },
{ row1: '缺陷统计', row2: '前工程不良', row3: '结瘤' },
{ row1: '缺陷统计', row2: '前工程不良', row3: '结石' },
{ row1: '缺陷统计', row2: '前工程不良', row3: 'Tin下数' },
{ row1: '缺陷统计', row2: '前工程不良', row3: 'Tin下尺寸' },
{ row1: '缺陷统计', row2: '前工程不良', row3: 'PT' },
{ row1: '缺陷统计', row2: '前工程不良', row3: '欠点合计' },
{ row1: '缺陷统计', row2: '前工程不良', row3: 'Q聚' },
{ row1: '缺陷统计', row2: '前工程不良', row3: 'ADG' },
{ row1: '缺陷统计', row2: '前工程不良', row3: '其他' },
{ row1: '缺陷统计', row2: '后工程不良', row3: '掉片' },
{ row1: '缺陷统计', row2: '后工程不良', row3: '烧边' },
{ row1: '缺陷统计', row2: '后工程不良', row3: '过磨' },
{ row1: '缺陷统计', row2: '后工程不良', row3: '欠磨' },
{ row1: '缺陷统计', row2: '后工程不良', row3: '未磨' },
{ row1: '缺陷统计', row2: '后工程不良', row3: '边裂/裂纹' },
{ row1: '缺陷统计', row2: '后工程不良', row3: '角尺寸不良' },
{ row1: '缺陷统计', row2: '后工程不良', row3: 'K/Q数' },
{ row1: '缺陷统计', row2: '后工程不良', row3: 'K/Q聚集' },
{ row1: '缺陷统计', row2: '后工程不良', row3: '划伤' },
{ row1: '缺陷统计', row2: '后工程不良', row3: '轮印' },
{ row1: '缺陷统计', row2: '后工程不良', row3: '磨痕' },
{ row1: '缺陷统计', row2: '后工程不良', row3: '气浮擦伤' },
{ row1: '缺陷统计', row2: '后工程不良', row3: '残留' },
{ row1: '缺陷统计', row2: '后工程不良', row3: '污渍' },
{ row1: '缺陷统计', row2: '后工程不良', row3: '纤维' },
{ row1: '缺陷统计', row2: '后工程不良', row3: '水渍' },
{ row1: '缺陷统计', row2: '后工程不良', row3: '异物' },
{ row1: '缺陷统计', row2: '后工程不良', row3: '面磨印记' },
{ row1: '缺陷统计', row2: '后工程不良', row3: '雾面残留' },
{ row1: '缺陷统计', row2: '后工程不良', row3: '其他' }
]
}
},
mounted() {
window.addEventListener('resize', () => {
this.tableH = tableHeight(300)
this.tableH = tableHeight(225)
})
this.formConfig[1].defaultSelect = moment().format('yyyy-MM-DD')
this.listQuery.hour = moment().format('yyyy-MM-DD')
this.getData()
},
methods: {
buttonClick(val) {
this.listQuery.proLineId = val.proLineId
this.listQuery.hour = val.hour
if (val.btnName === 'export') {
if (val.btnName === 'search') {
this.getData()
} else if (val.btnName === 'export') {
exportProductReport({ ...this.listQuery }).then((res) => {
let fileName = ''
const contentDisposition = res.headers['content-disposition']
@ -156,407 +262,30 @@ export default {
}
},
getData() {
;(this.tableData = [
{
b1: 1,
b2: 2,
b3: 3,
b4: 4,
b5: 5,
b6: 6,
b7: 7,
b8: 8,
b9: 9,
b10: 10,
b11: 11,
b12: 12,
ct1: 108,
y1: 1,
y2: 2,
y3: 3,
y4: 4,
y5: 5,
y6: 6,
y7: 7,
y8: 8,
y9: 9,
y10: 10,
y11: 11,
y12: 12,
ct2: 103,
equipmentName: '上片投入数',
process: '综合'
},
{
b1: 1,
b2: 2,
b3: 3,
b4: 4,
b5: 5,
b6: 6,
b7: 7,
b8: 8,
b9: 9,
b10: 10,
b11: 11,
b12: 12,
ct1: 102,
y1: 1,
y2: 2,
y3: 3,
y4: 4,
y5: 5,
y6: 6,
y7: 7,
y8: 8,
y9: 9,
y10: 10,
y11: 11,
y12: 12,
ct2: 99,
equipmentName: '机器人投入数',
process: '综合'
},
{
b1: 1,
b2: 2,
b3: 3,
b4: 4,
b5: 5,
b6: 6,
b7: 7,
b8: 8,
b9: 9,
b10: 10,
b11: 11,
b12: 12,
ct1: 100,
y1: 1,
y2: 2,
y3: 3,
y4: 4,
y5: 5,
y6: 6,
y7: 7,
y8: 8,
y9: 9,
y10: 10,
y11: 11,
y12: 12,
ct2: 100,
equipmentName: '良品总投入数',
process: '综合'
},
{
b1: 1,
b2: 2,
b3: 3,
b4: 4,
b5: 5,
b6: 6,
b7: 7,
b8: 8,
b9: 9,
b10: 10,
b11: 11,
b12: 12,
ct1: 100,
y1: 1,
y2: 2,
y3: 3,
y4: 4,
y5: 5,
y6: 6,
y7: 7,
y8: 8,
y9: 9,
y10: 10,
y11: 11,
y12: 12,
ct2: 100,
equipmentName: '工序损耗',
process: '综合'
},
{
b1: 1,
b2: 2,
b3: 3,
b4: 4,
b5: 5,
b6: 6,
b7: 7,
b8: 8,
b9: 9,
b10: 10,
b11: 11,
b12: 12,
ct1: 100,
y1: 1,
y2: 2,
y3: 3,
y4: 4,
y5: 5,
y6: 6,
y7: 7,
y8: 8,
y9: 9,
y10: 10,
y11: 11,
y12: 12,
ct2: 100,
equipmentName: '后清洗输出',
process: '综合'
},
{
b1: 1,
b2: 2,
b3: 3,
b4: 4,
b5: 5,
b6: 6,
b7: 7,
b8: 8,
b9: 9,
b10: 10,
b11: 11,
b12: 12,
ct1: 100,
y1: 1,
y2: 2,
y3: 3,
y4: 4,
y5: 5,
y6: 6,
y7: 7,
y8: 8,
y9: 9,
y10: 10,
y11: 11,
y12: 12,
ct2: 100,
equipmentName: '上片损失',
process: '上片'
},
{
b1: 1,
b2: 2,
b3: 3,
b4: 4,
b5: 5,
b6: 6,
b7: 7,
b8: 8,
b9: 9,
b10: 10,
b11: 11,
b12: 12,
ct1: 100,
y1: 1,
y2: 2,
y3: 3,
y4: 4,
y5: 5,
y6: 6,
y7: 7,
y8: 8,
y9: 9,
y10: 10,
y11: 11,
y12: 12,
ct2: 100,
equipmentName: '精切损失',
process: '精切'
},
{
b1: 1,
b2: 2,
b3: 3,
b4: 4,
b5: 5,
b6: 6,
b7: 7,
b8: 8,
b9: 9,
b10: 10,
b11: 11,
b12: 12,
ct1: 100,
y1: 1,
y2: 2,
y3: 3,
y4: 4,
y5: 5,
y6: 6,
y7: 7,
y8: 8,
y9: 9,
y10: 10,
y11: 11,
y12: 12,
ct2: 100,
equipmentName: '精切抽检',
process: '精切'
},
{
b1: 1,
b2: 2,
b3: 3,
b4: 4,
b5: 5,
b6: 6,
b7: 7,
b8: 8,
b9: 9,
b10: 10,
b11: 11,
b12: 12,
ct1: 100,
y1: 1,
y2: 2,
y3: 3,
y4: 4,
y5: 5,
y6: 6,
y7: 7,
y8: 8,
y9: 9,
y10: 10,
y11: 11,
y12: 12,
ct2: 100,
equipmentName: '磨边损失',
process: '磨边'
},
{
b1: 1,
b2: 2,
b3: 3,
b4: 4,
b5: 5,
b6: 6,
b7: 7,
b8: 8,
b9: 9,
b10: 10,
b11: 11,
b12: 12,
ct1: 100,
y1: 1,
y2: 2,
y3: 3,
y4: 4,
y5: 5,
y6: 6,
y7: 7,
y8: 8,
y9: 9,
y10: 10,
y11: 11,
y12: 12,
ct2: 100,
equipmentName: '磨边抽检',
process: '磨边'
},
{
b1: 1,
b2: 2,
b3: 3,
b4: 4,
b5: 5,
b6: 6,
b7: 7,
b8: 8,
b9: 9,
b10: 10,
b11: 11,
b12: 12,
ct1: 100,
y1: 1,
y2: 2,
y3: 3,
y4: 4,
y5: 5,
y6: 6,
y7: 7,
y8: 8,
y9: 9,
y10: 10,
y11: 11,
y12: 12,
ct2: 100,
equipmentName: '前清洗损失',
process: '前清洗'
},
{
b1: 1,
b2: 2,
b3: 3,
b4: 4,
b5: 5,
b6: 6,
b7: 7,
b8: 8,
b9: 9,
b10: 10,
b11: 11,
b12: 12,
ct1: 100,
y1: 1,
y2: 2,
y3: 3,
y4: 4,
y5: 5,
y6: 6,
y7: 7,
y8: 8,
y9: 9,
y10: 10,
y11: 11,
y12: 12,
ct2: 100,
equipmentName: '边检损失',
process: '边检'
},
{
b1: 1,
b2: 2,
b3: 3,
b4: 4,
b5: 5,
b6: 6,
b7: 7,
b8: 8,
b9: 9,
b10: 10,
b11: 11,
b12: 12,
ct1: 100,
y1: 1,
y2: 2,
y3: 3,
y4: 4,
y5: 5,
y6: 6,
y7: 7,
y8: 8,
y9: 9,
y10: 10,
y11: 11,
y12: 12,
ct2: 100,
equipmentName: '复投损失',
process: '复投'
getProductReportData({ ...this.listQuery }).then((res) => {
let arr = res.data
this.tableData = []
if (arr && arr.length > 0) {
for (let i = 0; i < arr.length; i++) {
arr[i].row1 = this.tableHead[i].row1
arr[i].row2 = this.tableHead[i].row2
arr[i].row3 = this.tableHead[i].row3
}
this.tableData = arr
}
]),
console.log(this.tableData)
this.getSpanArr(this.tableData)
this.getSpanArr2(this.tableData)
})
},
getSpanArr(data) {
this.span = []
for (var i = 0; i < data.length; i++) {
if (i === 0) {
this.span.push(1)
this.index = 0
} else {
if (data[i].process === data[i - 1].process) {
if (data[i].row1 === data[i - 1].row1) {
this.span[this.index] += 1
this.span.push(0)
} else {
@ -566,14 +295,120 @@ export default {
}
}
},
spanMethod({ rowIndex, columnIndex }) {
if (columnIndex === 1) {
const _row = this.span[rowIndex]
return {
rowspan: _row,
colspan: 1
getSpanArr2(data) {
this.span2 = []
for (var i = 0; i < data.length; i++) {
if (i === 0) {
this.span2.push(1)
this.index = 0
} else {
if (data[i].row2 === data[i - 1].row2) {
this.span2[this.index] += 1
this.span2.push(0)
} else {
this.span2.push(1)
this.index = i
}
}
}
},
spanMethod({ rowIndex, columnIndex }) {
if (rowIndex < 42) {
// 1
if (columnIndex === 0) {
const _row = this.span[rowIndex]
return {
rowspan: _row,
colspan: 2
}
} else if (columnIndex === 1) {
return [0, 0]
}
} else if (rowIndex >= 42 && rowIndex < 82) {
// 2
if (columnIndex === 0) {
const _row = this.span[rowIndex]
return {
rowspan: _row,
colspan: 1
}
}
if (columnIndex === 1) {
const _row = this.span2[rowIndex]
return {
rowspan: _row,
colspan: 1
}
}
}
// } else if (rowIndex >= 19 && rowIndex < 22) {
// // 3
// if (columnIndex === 0) {
// return {
// rowspan: 1,
// colspan: 3
// }
// } else if (columnIndex === 1 || columnIndex === 2) {
// return [0, 0]
// } else if (columnIndex === 3) {
// return {
// rowspan: 1,
// colspan: 13
// }
// } else if (columnIndex >= 4 && columnIndex < 16) {
// return [0, 0]
// } else if (columnIndex === 16) {
// return {
// rowspan: 1,
// colspan: 13
// }
// }
// } else if (rowIndex >= 22 && rowIndex < 24) {
// // 4
// if (columnIndex === 0) {
// const _row = this.span[rowIndex]
// return {
// rowspan: _row,
// colspan: 2
// }
// } else if (columnIndex === 1) {
// return [0, 0]
// } else if (columnIndex === 3) {
// return {
// rowspan: 1,
// colspan: 13
// }
// } else if (columnIndex >= 4 && columnIndex < 16) {
// return [0, 0]
// } else if (columnIndex === 16) {
// return {
// rowspan: 1,
// colspan: 13
// }
// }
// } else if (rowIndex >= 24) {
// // 5
// if (columnIndex === 0) {
// return {
// rowspan: 1,
// colspan: 3
// }
// } else if (columnIndex === 1 || columnIndex === 2) {
// return [0, 0]
// } else if (columnIndex === 3) {
// return {
// rowspan: 1,
// colspan: 13
// }
// } else if (columnIndex >= 4 && columnIndex < 16) {
// return [0, 0]
// } else if (columnIndex === 16) {
// return {
// rowspan: 1,
// colspan: 13
// }
// }
// }
}
}
}