增加报表管理模块

This commit is contained in:
2023-05-30 09:00:50 +08:00
parent 2ae3d3f3e7
commit de0a6c45e0
93 changed files with 950 additions and 1070 deletions

View File

@@ -221,84 +221,3 @@ export function getEqCode(data) {
data
})
}
// 报表管理
export function getReportCategorylist(data) {
return request({
url: '/report/report-sheet-category/list',
method: 'post',
data
})
}
export function getReportlist(data) {
return request({
url: '/report/report-sheet/page',
method: 'post',
data
})
}
export function updateReportlist(data) {
return request({
url: '/report/report-sheet/update',
method: 'post',
data
})
}
export function delReportlist(data) {
return request({
url: '/report/report-sheet/delete',
method: 'post',
data
})
}
// by id
export function getReport(data) {
return request({
url: '/report/report-sheet/get',
method: 'post',
data
})
}
// 报表管理--报表分类
export function getReportCategory(data) {
return request({
url: '/report/report-sheet-category/page',
method: 'post',
data
})
}
export function reportCategoryAdd(data) {
return request({
url: '/report/report-sheet-category/add',
method: 'post',
data
})
}
export function reportCategoryUpdate(data) {
return request({
url: '/report/report-sheet-category/update',
method: 'post',
data
})
}
export function getReportCategoryById(data) {
return request({
url: '/report/report-sheet-category/get',
method: 'post',
data
})
}
export function reportCategoryDelete(data) {
return request({
url: '/report/report-sheet-category/delete',
method: 'post',
data
})
}

View File

@@ -99,24 +99,6 @@ export function workOrderImportTemplate(data) {
export const uploadPath = '/api/order/workOrder/import'
// 生产报表
export function pageThickness(data) {
return request({
url: '/order/proReport/pageThickness',
method: 'post',
data
})
}
export function proReport(data) {
return request({
url: '/order/proReport/genTable',
method: 'post',
formState: true,
data
})
}
// 下架包装
export function unloadPalletPage(data) {
return request({

View File

@@ -164,65 +164,6 @@ export function drawThickness(val) {
})
}
// 终检数据-获取玻璃列表数据
export function listGlass(data) {
return request({
url: '/report/GlassReport/listGlass',
method: 'post',
data
})
}
// 终检数据-基板品质报表查询
export function qualityReport(data) {
return request({
url: '/report/GlassReport/qualityReport',
method: 'post',
data
})
}
// 终检数据-基板品质报表导出
export function qualityReportexport(data) {
return request({
url: '/report/GlassReport/qualityReportexport',
method: 'post',
responseType: 'blob',
data
})
}
// 终检数据-厚度汇总报表查询
export function thickReport(data) {
return request({
url: '/report/GlassReport/thickReport',
method: 'post',
data
})
}
// 终检数据-厚度汇总报表导出
export function thickReportexport(data) {
return request({
url: '/report/GlassReport/thickReportexport',
method: 'post',
responseType: 'blob',
data
})
}
// 终检数据-终检下片包装报表查询
export function queryGlassData(data) {
return request({
url: '/quality/finalpackaging/queryGlassData',
method: 'post',
data
})
}
// 终检数据-终检下片包装报表计算
export function claGlassData(data) {
return request({
url: '/quality/finalpackaging/claGlassData',
method: 'post',
data
})
}
// 产品追溯-获取分页产品追溯
export function productTrace(data) {
return request({

140
src/api/reportManagement.js Normal file
View File

@@ -0,0 +1,140 @@
import request from './request'
// 报表工具
export function getReportCategorylist(data) {
return request({
url: '/report/report-sheet-category/list',
method: 'post',
data
})
}
export function getReportlist(data) {
return request({
url: '/report/report-sheet/page',
method: 'post',
data
})
}
export function updateReportlist(data) {
return request({
url: '/report/report-sheet/update',
method: 'post',
data
})
}
export function delReportlist(data) {
return request({
url: '/report/report-sheet/delete',
method: 'post',
data
})
}
// by id
export function getReport(data) {
return request({
url: '/report/report-sheet/get',
method: 'post',
data
})
}
// 报表管理--报表分类
export function getReportCategory(data) {
return request({
url: '/report/report-sheet-category/page',
method: 'post',
data
})
}
export function reportCategoryAdd(data) {
return request({
url: '/report/report-sheet-category/add',
method: 'post',
data
})
}
export function reportCategoryUpdate(data) {
return request({
url: '/report/report-sheet-category/update',
method: 'post',
data
})
}
export function getReportCategoryById(data) {
return request({
url: '/report/report-sheet-category/get',
method: 'post',
data
})
}
export function reportCategoryDelete(data) {
return request({
url: '/report/report-sheet-category/delete',
method: 'post',
data
})
}
// 终检数据-获取玻璃列表数据
export function listGlass(data) {
return request({
url: '/report/GlassReport/listGlass',
method: 'post',
data
})
}
// 终检数据-基板品质报表查询
export function qualityReport(data) {
return request({
url: '/report/GlassReport/qualityReport',
method: 'post',
data
})
}
// 终检数据-基板品质报表导出
export function qualityReportexport(data) {
return request({
url: '/report/GlassReport/qualityReportexport',
method: 'post',
responseType: 'blob',
data
})
}
// 终检数据-厚度汇总报表查询
export function thickReport(data) {
return request({
url: '/report/GlassReport/thickReport',
method: 'post',
data
})
}
// 终检数据-厚度汇总报表导出
export function thickReportexport(data) {
return request({
url: '/report/GlassReport/thickReportexport',
method: 'post',
responseType: 'blob',
data
})
}
// 终检数据-终检下片包装报表查询
export function queryGlassData(data) {
return request({
url: '/quality/finalpackaging/queryGlassData',
method: 'post',
data
})
}
// 终检数据-终检下片包装报表计算
export function claGlassData(data) {
return request({
url: '/quality/finalpackaging/claGlassData',
method: 'post',
data
})
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

View File

Before

Width:  |  Height:  |  Size: 59 KiB

After

Width:  |  Height:  |  Size: 59 KiB

View File

@@ -112,45 +112,6 @@ export const routes = [
// },
// component: () => import('../views/productionScheduling/taskDcheduling')
// },
{
path: 'generateReports',
name: 'generateReports',
meta: {
title: '生产报表'
},
component: () =>
import('../views/productionScheduling/generateReports'),
redirect: '/productionScheduling/generateReports/productionReport',
children: [
{
path: 'productionReport',
name: 'productionReport',
meta: {
title: '生产报表'
},
component: () =>
import('../views/productionScheduling/productionReport')
},
{
path: 'substrateGlassQuality',
name: 'substrateGlassQuality',
meta: {
title: '基板玻璃品质'
},
component: () =>
import('../views/productionScheduling/substrateGlassQuality')
},
{
path: 'thicknessDetection',
name: 'thicknessDetection',
meta: {
title: '厚度检测'
},
component: () =>
import('../views/productionScheduling/thicknessDetection')
}
]
},
{
path: 'productionData',
name: 'productionData',
@@ -521,15 +482,6 @@ export const routes = [
component: () =>
import('../views/qualityManagement/productTraceability')
},
{
path: 'finalInspectionData',
name: 'finalInspectionData',
meta: {
title: '终检数据'
},
component: () =>
import('../views/qualityManagement/finalInspectionData')
},
{
path: 'finalInspectionDailyReport',
name: 'finalInspectionDailyReport',
@@ -541,6 +493,91 @@ export const routes = [
}
]
},
{
path: '/reportManagement',
component: Layout,
name: 'reportManagement',
meta: {
title: '报表管理'
},
children: [
{
path: 'productionReport',
name: 'productionReport',
meta: {
title: '后工程日报表'
},
component: () => import('../views/reportManagement/productionReport')
},
{
path: 'finalInspectionData',
name: 'finalInspectionData',
meta: {
title: '终检数据'
},
component: () => import('../views/reportManagement/finalInspectionData')
},
{
path: 'reportTools',
name: 'reportTools',
meta: {
title: '报表工具'
},
component: () => import('../views/reportManagement/reportTools'),
redirect: '/reportManagement/reportTools/reportList',
children: [
{
path: 'reportList',
name: 'reportList',
meta: {
title: '报表列表'
},
component: () =>
import('../views/reportManagement/reportTools/reportList')
},
{
path: 'reportListDetail',
name: 'reportListDetail',
hidden: true,
meta: {
title: '报表列表明细'
},
component: () =>
import('../views/reportManagement/reportTools/reportListDetail')
},
{
path: 'reportView',
name: 'reportView',
meta: {
title: '报表预览'
},
component: () =>
import('../views/reportManagement/reportTools/reportView')
},
{
path: 'reportDesign',
name: 'reportDesign',
meta: {
title: '报表设计'
},
component: () =>
import('../views/reportManagement/reportTools/reportDesign')
},
{
path: 'reportClassification',
name: 'reportClassification',
meta: {
title: '报表分类'
},
component: () =>
import(
'../views/reportManagement/reportTools/reportClassification'
)
}
]
}
]
},
{
path: '/basicConfig',
component: Layout,
@@ -588,65 +625,6 @@ export const routes = [
title: '设备配置'
},
component: () => import('../views/basicConfig/deviceConfig')
},
{
path: 'reportManagement',
name: 'reportManagement',
meta: {
title: '报表管理'
},
component: () => import('../views/basicConfig/reportManagement'),
redirect: '/basicConfig/reportManagement/reportList',
children: [
{
path: 'reportList',
name: 'reportList',
meta: {
title: '报表列表'
},
component: () =>
import('../views/basicConfig/reportManagement/reportList')
},
{
path: 'reportListDetail',
name: 'reportListDetail',
hidden: true,
meta: {
title: '报表列表明细'
},
component: () =>
import('../views/basicConfig/reportManagement/reportListDetail')
},
{
path: 'reportView',
name: 'reportView',
meta: {
title: '报表预览'
},
component: () =>
import('../views/basicConfig/reportManagement/reportView')
},
{
path: 'reportDesign',
name: 'reportDesign',
meta: {
title: '报表设计'
},
component: () =>
import('../views/basicConfig/reportManagement/reportDesign')
},
{
path: 'reportClassification',
name: 'reportClassification',
meta: {
title: '报表分类'
},
component: () =>
import(
'../views/basicConfig/reportManagement/reportClassification'
)
}
]
}
]
},

View File

@@ -172,17 +172,12 @@ const tableBtn = [
type: 'edit',
btnName: '编辑',
showParam: {
type: '|',
type: '&',
data: [
{
type: 'unequal',
name: 'status',
value: '未完成'
},
{
type: 'unequal',
name: 'status',
value: '已超时'
}
]
}
@@ -332,7 +327,7 @@ export default {
console.log(val)
switch (val.type) {
case 'edit':
if (val.data.status === '未派工') {
if (val.data.status === '未派工' || val.data.status === '已超时') {
this.addAndEdit = '编辑'
this.centervisibleAdd = true
this.$nextTick(() => {

View File

@@ -1,266 +0,0 @@
<template>
<div class="substrate-glass-quality-box">
<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"
/>
</div>
</template>
<script>
import { tableHeight } from '@/utils/index'
const tableProps = [
{
prop: 'time',
label: '检测时间',
minWidth: 100
},
{
prop: 'glassID',
label: '玻璃ID',
minWidth: 100
},
{
prop: 'lineA',
label: '加工条件',
align: 'center',
children: [
{
prop: 'workTime',
label: '托盘ID'
},
{
prop: 'workTimeRate',
label: '研磨类型'
}
]
},
{
prop: 'lineB',
label: '检测数据',
align: 'center',
children: [
{
prop: 'downTime',
label: '灵敏度'
},
{
prop: 'downTimeRate',
label: '颗粒总数'
},
{
prop: 'downTime1',
label: '锡点'
},
{
prop: 'downTimeRate2',
label: '变形'
},
{
prop: 'downTime3',
label: '拖尾'
},
{
prop: 'downTimeRate4',
label: '气泡'
},
{
prop: 'downTime5',
label: '锡尺寸'
},
{
prop: 'downTimeRate6',
label: '结石'
},
{
prop: 'downTime7',
label: '划伤'
},
{
prop: 'downTimeRate8',
label: '面检总数'
}
]
},
{
prop: 'lineC',
label: '研磨电流A',
align: 'center',
children: [
{
prop: 'faultTime',
label: 'A机台'
},
{
prop: 'faultTimeRate',
label: 'B机台'
},
{
prop: 'faultTime1',
label: 'C机台'
},
{
prop: 'faultTimeRate1',
label: '总电流'
}
]
},
{
prop: 'lineD',
label: '研磨时间S',
align: 'center',
children: [
{
prop: 'faultTime',
label: 'A机台'
},
{
prop: 'faultTimeRate',
label: 'B机台'
},
{
prop: 'faultTime1',
label: 'C机台'
},
{
prop: 'faultTimeRate1',
label: '总研磨时间',
minWidth: 100
}
]
},
{
prop: 'lineE',
label: '工艺符合性',
minWidth: 100
}
]
export default {
name: 'substrateGlassQuality',
data() {
return {
formConfig: [
{
type: 'select',
label: '产线',
selectOptions: JSON.parse(localStorage.getItem('publicList'))
.proLineVoList,
param: 'proLineId',
defaultSelect: '',
width: 120
},
{
type: 'select',
label: '白班',
selectOptions: JSON.parse(localStorage.getItem('publicList'))
.proLineVoList,
labelField: 'dataName',
valueField: 'dataCode',
param: 'type',
defaultSelect: '',
width: 100
},
{
type: 'datePicker',
label: '上架时间',
dateType: 'datetimerange',
format: 'yyyy-MM-dd HH:mm:ss',
valueFormat: 'yyyy-MM-ddTHH:mm:ss',
rangeSeparator: '-',
startPlaceholder: '开始时间',
endPlaceholder: '结束时间',
param: 'timeVal',
width: 350
},
{
type: 'button',
btnName: '查询',
name: 'search',
color: 'primary'
},
{
type: 'separate'
},
{
type: 'button',
btnName: '导出',
name: 'export',
color: 'primary',
plain: true
}
],
listQuery: {
current: 1,
size: 20
},
tableProps,
tableData: [],
tableH: tableHeight(329)
}
},
mounted() {
window.addEventListener('resize', () => {
this.tableH = tableHeight(329)
})
this.tableData = [
{
equipmentName: '设备1',
workTime: 100,
workTimeRate: 0.5,
downTime: 5,
downTimeRate: 0.02,
faultTime: 0,
faultTimeRate: 0,
actualProcessingSpeed: 10,
theoreticalProcessingSpeed: 10,
speedActuationRate: 0.3
},
{
equipmentName: '设备2',
workTime: 100,
workTimeRate: 0.5,
downTime: 5,
downTimeRate: 0.02,
faultTime: 0,
faultTimeRate: 0,
actualProcessingSpeed: 10,
theoreticalProcessingSpeed: 10,
speedActuationRate: 0.3
},
{
equipmentName: '设备3',
workTime: 100,
workTimeRate: 0.5,
downTime: 5,
downTimeRate: 0.02,
faultTime: 0,
faultTimeRate: 0,
actualProcessingSpeed: 10,
theoreticalProcessingSpeed: 10,
speedActuationRate: 0.3
}
]
},
methods: {
buttonClick(val) {
console.log(val)
}
}
}
</script>
<style lang="scss" scoped>
.substrate-glass-quality-box {
height: calc(100vh - 203px);
padding: 12px 16px;
margin: 0px 16px;
border-radius: 8px;
background-color: #fff;
}
</style>

View File

@@ -1,254 +0,0 @@
<template>
<div class="thickness-detection-box">
<div class="search-box">
<search-bar
:formConfigs="formConfig"
ref="searchBarForm"
@headBtnClick="buttonClick"
/>
</div>
<div class="table-box">
<el-row :gutter="8">
<el-col :span="8">
<div class="boxL">
<span class="table-button" @click="createReport">生成表格</span>
<base-table
:selectWidth="40"
:table-props="tablePropsL"
:table-data="tableDataL"
:max-height="tableHL"
@selection-change="selectChange"
/>
</div>
</el-col>
<el-col :span="16">
<div class="boxR">
<span class="tip">在线厚度检查机厚度汇总报表</span>
<base-table
:page="listQuery.current"
:limit="listQuery.size"
:table-props="tablePropsR"
:table-data="tableDataR"
:max-height="tableHR"
/>
</div>
</el-col>
</el-row>
</div>
</div>
</template>
<script>
import { tableHeight, timeFormatter } from '@/utils/index'
import moment from 'moment'
import { pageThickness, proReport } from '@/api/productionScheduling'
const tablePropsL = [
{
prop: 'glassId',
label: 'ID',
minWidth: 100
},
{
prop: 'testTime',
label: '检测时间',
filter: timeFormatter,
minWidth: 150
}
]
const tablePropsR = [
{
prop: 'glassId',
label: '玻璃ID',
minWidth: 120
},
{
prop: 'testTime',
label: '检测时间',
filter: timeFormatter,
minWidth: 150
},
{
prop: 'palletId',
label: '托盘ID',
minWidth: 100
},
{
prop: 'grindType',
label: '研磨类型',
minWidth: 100
},
{
prop: 'minValue',
label: '最小值',
minWidth: 100
},
{
prop: 'avgValue',
label: '平均值',
minWidth: 100
},
{
prop: 'ttvValue',
label: '厚薄差',
minWidth: 100
}
]
export default {
name: 'thicknessDetection',
data() {
return {
formConfig: [
{
type: 'datePicker',
label: '时间范围',
dateType: 'datetimerange',
format: 'yyyy-MM-dd HH:mm:ss',
valueFormat: 'yyyy-MM-ddTHH:mm:ss',
rangeSeparator: '-',
startPlaceholder: '开始时间',
endPlaceholder: '结束时间',
placeholder: '时间范围',
param: 'timeStr',
defaultSelect: [],
width: 350
},
{
type: 'button',
btnName: '查询',
name: 'search',
color: 'primary'
},
{
type: 'separate'
},
{
type: 'button',
btnName: '导出',
name: 'export',
color: 'primary',
plain: true
}
],
listQuery: {
current: 1,
size: 1000,
startTime: '',
endTime: ''
},
tablePropsL,
tableDataL: [],
tablePropsR,
tableDataR: [],
tableHL: tableHeight(350),
tableHR: tableHeight(335),
selectId: []
}
},
mounted() {
window.addEventListener('resize', () => {
this.tableHL = tableHeight(350)
this.tableHR = tableHeight(335)
})
this.formConfig[0].defaultSelect = [
moment().format('yyyy-MM-DD') + 'T00:00:00',
moment().format('yyyy-MM-DD') + 'T23:59:59'
]
this.listQuery.startTime = moment().format('yyyy-MM-DD') + 'T00:00:00'
this.listQuery.endTime = moment().format('yyyy-MM-DD') + 'T23:59:59'
this.getList()
},
methods: {
getList() {
pageThickness({ ...this.listQuery }).then((res) => {
this.tableDataL = res.data
})
},
getReport() {
proReport(this.selectId).then((res) => {
console.log(res)
this.tableDataR = res.data
})
},
selectChange(val) {
console.log(val)
this.selectId = []
if (val.length > 0) {
for (let i = 0; i < val.length; i++) {
this.selectId.push(val[i].glassId)
}
}
},
createReport() {
if (this.selectId.length === 0) {
this.$message({
message: '请先勾选左侧表格的数据',
type: 'warning'
})
return false
}
this.getReport()
},
buttonClick(val) {
console.log(val)
if (val.btnName === 'search') {
this.listQuery.startTime = val.timeStr ? val.timeStr[0] : ''
this.listQuery.endTime = val.timeStr ? val.timeStr[1] : ''
this.getList()
}
}
}
}
</script>
<style lang="scss" scoped>
.thickness-detection-box {
margin: 0 16px;
.search-box {
height: 62px;
padding: 8px 16px;
margin-bottom: 8px;
border-radius: 8px;
background-color: #fff;
}
.table-box {
width: 100%;
.boxL,
.boxR {
padding: 16px;
border-radius: 8px;
height: calc(100vh - 272px);
background-color: #fff;
}
.boxL {
.table-button {
display: inline-block;
height: 30px;
width: 100%;
text-align: center;
padding-top: 4px;
margin-bottom: 16px;
font-size: 14px;
color: #0b58ff;
border-radius: 4px;
border: 1px dotted #0b58ff;
cursor: pointer;
}
}
.boxR {
.tip::before {
content: '';
display: inline-block;
width: 4px;
height: 16px;
background: #0b58ff;
border-radius: 1px;
margin-right: 8px;
vertical-align: middle;
}
.tip {
display: inline-block;
font-size: 14px;
margin-bottom: 12px;
}
}
}
}
</style>

View File

@@ -1,229 +0,0 @@
<template>
<div class="finalInspectionData">
<el-row class="box-top">
<el-col>
<div class="search-box">
<search-bar :formConfigs="formConfig" @headBtnClick="buttonClick" />
</div>
</el-col>
</el-row>
<el-row :gutter="8" class="box">
<el-col :span="9">
<div class="left-box">
<span class="table-button">生成表格</span>
<base-table
:selectWidth="40"
:table-props="tablePropsL"
:table-data="tableDataL"
:max-height="tableHL"
/>
</div>
</el-col>
<el-col :span="15">
<div class="right-box">
<div>
<span class="title">成品玻璃基本缺陷统计</span>
</div>
<ul class="tip">
<li>单位um</li>
<li>玻璃ID26522322323</li>
<li>生产日期2022.12.24 15:56:24</li>
<li>等级G1</li>
</ul>
<div class="table-box">
<final-data-table />
</div>
</div>
</el-col>
</el-row>
</div>
</template>
<script>
import { tableHeight } from '@/utils/index'
import finalDataTable from './components/finalDataTable'
const tablePropsL = [
{
prop: 'id',
label: 'ID',
minWidth: 100
},
{
prop: 'time',
label: '检测时间',
minWidth: 100
},
{
prop: 'type',
label: '研磨类型',
minWidth: 100
}
]
export default {
name: 'FinalInspectionData',
components: { finalDataTable },
data() {
return {
formConfig: [
{
type: 'datePicker',
label: '检验时间',
dateType: 'datetime',
format: 'yyyy-MM-dd HH:mm:ss',
valueFormat: 'yyyy-MM-dd HH:mm:ss',
placeholder: '检验时间',
param: 'testTime',
width: 200
},
{
type: 'select',
label: '玻璃架',
selectOptions: [
{ id: '1', name: '521321545' },
{ id: '2', name: '932234561' },
{ id: '3', name: '542121212' },
{ id: '4', name: '354855321' }
],
param: 'fullInspectionType',
defaultSelect: '',
width: 150
},
{
type: 'select',
label: '报表类型',
selectOptions: [
{ id: '1', name: '单片玻璃基板缺陷统计' },
{ id: '2', name: '终检下片包装' },
{ id: '3', name: '厚度检查机报表' },
{ id: '4', name: '厚度汇总报表' }
],
param: 'fullInspectionType1',
defaultSelect: '',
width: 150
},
{
type: 'button',
btnName: '查询',
name: 'search',
color: 'primary'
},
{
type: 'separate'
},
{
type: 'button',
btnName: '导出',
name: 'export',
color: 'primary',
plain: true
}
],
tablePropsL,
tableDataL: [],
tableHL: tableHeight(300)
}
},
mounted() {
window.addEventListener('resize', () => {
this.tableHL = tableHeight(300)
})
this.getList()
},
methods: {
buttonClick(val) {
switch (val.btnName) {
case 'search':
this.getList()
break
default:
alert('导出')
}
},
getList() {
let arr = []
for (let i = 0; i < 30; i++) {
let obj = {}
obj.type = i
arr.push(obj)
}
this.tableDataL = arr
}
}
}
</script>
<style lang="scss" scoped>
.finalInspectionData {
width: 100%;
.box-top {
width: 100%;
padding: 8px 16px 0;
.search-box {
height: 62px;
padding: 10px 16px;
box-sizing: border-box;
border-radius: 8px;
background-color: #fff;
}
}
.box {
width: 100%;
padding: 8px 8px 0 16px;
.left-box,
.right-box {
height: calc(100vh - 220px);
padding: 16px;
border-radius: 8px;
background-color: #fff;
.table-box {
height: calc(100vh - 352px);
overflow: auto;
}
}
.left-box {
.table-button {
display: inline-block;
height: 30px;
width: 100%;
text-align: center;
padding-top: 4px;
margin-bottom: 16px;
font-size: 14px;
color: #0b58ff;
border-radius: 4px;
border: 1px dotted #0b58ff;
cursor: pointer;
}
}
.right-box {
.title::before {
content: '';
display: inline-block;
width: 4px;
height: 16px;
background: #0b58ff;
border-radius: 1px;
margin-right: 8px;
vertical-align: middle;
}
.tip {
display: flex;
flex-flow: row wrap;
height: 40px;
margin: 16px 0 20px;
li {
width: 25%;
font-size: 14px;
font-weight: 500;
text-align: center;
padding-top: 10px;
border-top: 1px solid #e8e8e8;
border-bottom: 1px solid #e8e8e8;
border-left: 1px solid #e8e8e8;
}
:last-child {
border-right: 1px solid #e8e8e8;
}
}
}
}
}
</style>

View File

@@ -10,7 +10,7 @@ import {
reportCategoryAdd,
reportCategoryUpdate,
getReportCategoryById
} from '@/api/basicConfig'
} from '@/api/reportManagement'
export default {
name: 'ReportClassAdd',
data() {

View File

@@ -6,7 +6,7 @@
</el-form>
</template>
<script>
import { getReport, updateReportlist } from '@/api/basicConfig'
import { getReport, updateReportlist } from '@/api/reportManagement'
export default {
name: 'ReportNameEdit',
data() {

View File

@@ -29,7 +29,7 @@
<div v-if="reportTitle">
<span class="title">{{ reportTitle }}</span>
</div>
<div class="table-box" v-if="reportTitle === '单片玻璃基板缺陷统计'">
<div class="table-box" v-if="reportTitle === '玻璃基板缺陷统计'">
<glass-quality-report :tableData="glassQualityArr" />
</div>
<div class="table-box" v-if="reportTitle === '厚度汇总报表'">
@@ -56,7 +56,7 @@ import {
thickReportexport,
queryGlassData,
claGlassData
} from '@/api/qualityManagement'
} from '@/api/reportManagement'
import glassQualityReport from './finalInspectionDataReport/glassQualityReport.vue'
import glassThickReport from './finalInspectionDataReport/glassThickReport.vue'
import glassPackReport from './finalInspectionDataReport/glassPackReport.vue'
@@ -112,7 +112,7 @@ export default {
type: 'select',
label: '报表类型',
selectOptions: [
{ id: '单片玻璃基板缺陷统计', name: '单片玻璃基板缺陷统计' },
{ id: '玻璃基板缺陷统计', name: '玻璃基板缺陷统计' },
{ id: '终检下片包装', name: '终检下片包装' },
{ id: '厚度汇总报表', name: '厚度汇总报表' }
],
@@ -220,7 +220,7 @@ export default {
for (let i of this.selectArr) {
arr.push(i.glassId)
}
if (this.reportTitle === '单片玻璃基板缺陷统计') {
if (this.reportTitle === '玻璃基板缺陷统计') {
this.exportGlassReport(arr)
} else if (this.reportTitle === '厚度汇总报表') {
this.exportThickReport(arr)
@@ -258,7 +258,7 @@ export default {
arr.push(i.glassId)
}
switch (this.reportTitle) {
case '单片玻璃基板缺陷统计':
case '玻璃基板缺陷统计':
this.getGlassReport(arr)
break
case '厚度汇总报表':

View File

@@ -0,0 +1,188 @@
<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/reportManagement'
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>

View File

@@ -0,0 +1,36 @@
<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>

View File

@@ -0,0 +1,149 @@
<template>
<div class="reoprtManager">
<div class="report">
<div class="imgBox">
<img
src="./../../../assets/reportManagement/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/reportManagement'
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>

View File

@@ -0,0 +1,271 @@
<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/reportManagement'
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>

View File

@@ -0,0 +1,36 @@
<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>