Compare commits
No commits in common. "814fe4605acac0451f7e5161f8070cf4b38a7d8e" and "4d7e3c0e04a464101bc90a7f6c97edc0cfffc007" have entirely different histories.
814fe4605a
...
4d7e3c0e04
@ -303,7 +303,7 @@ export default {
|
||||
handleDelete(row) {
|
||||
const id = row.id;
|
||||
this.$modal
|
||||
.confirm('是否确认删除该分组绑定?')
|
||||
.confirm('是否确认删除设备与分组绑定编号为"' + id + '"的数据项?')
|
||||
.then(function () {
|
||||
return deleteEquipmentBindGroup(id);
|
||||
})
|
||||
|
@ -20,7 +20,6 @@
|
||||
<el-select
|
||||
v-model="dataForm.productionLineId"
|
||||
placeholder="请选择产线"
|
||||
filterable
|
||||
@change="handleProductlineChange">
|
||||
<el-option
|
||||
v-for="opt in productionLineList"
|
||||
@ -38,7 +37,6 @@
|
||||
:rules="[{ required: true, message: '不能为空', trigger: 'blur' }]">
|
||||
<el-select
|
||||
v-model="dataForm.workshopSectionId"
|
||||
filterable
|
||||
placeholder="请选择工段"
|
||||
@change="$emit('update', dataForm)">
|
||||
<el-option
|
||||
@ -58,7 +56,6 @@
|
||||
:rules="[{ required: true, message: '不能为空', trigger: 'blur' }]">
|
||||
<el-select
|
||||
v-model="dataForm.equipmentId"
|
||||
filterable
|
||||
placeholder="请选择设备"
|
||||
@change="$emit('update', dataForm)">
|
||||
<el-option
|
||||
@ -74,7 +71,6 @@
|
||||
<el-form-item label="工段排序" prop="sort">
|
||||
<el-input
|
||||
v-model="dataForm.sort"
|
||||
filterable
|
||||
@change="$emit('update', dataForm)"
|
||||
placeholder="请输入工段排序" />
|
||||
</el-form-item>
|
||||
|
@ -1,8 +1,8 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2023-09-13 09:02:25
|
||||
* @LastEditTime: 2023-10-08 15:39:38
|
||||
* @LastEditors: DY
|
||||
* @LastEditTime: 2023-09-13 10:33:20
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
@ -61,12 +61,11 @@ export default {
|
||||
// },
|
||||
methods: {
|
||||
initChart(xData, yData,lineName) {
|
||||
console.log( '打印结果', xData,yData, lineName);
|
||||
console.log(xData,yData);
|
||||
this.chart = echarts.init(this.$el, 'macarons')
|
||||
this.setOptions(xData, yData, lineName)
|
||||
},
|
||||
setOptions(xData, yData, lineName) {
|
||||
console.log('da', lineName)
|
||||
let seriesData = []
|
||||
lineName.forEach((item,index) => {
|
||||
seriesData.push({
|
||||
@ -87,7 +86,7 @@ export default {
|
||||
type: 'value'
|
||||
},
|
||||
series: seriesData
|
||||
}, true)
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -228,14 +228,7 @@ export default {
|
||||
this.listQuery.lineId = val.lineIds
|
||||
this.listQuery.startTime = val.time ? String(new Date(val.time[0]).getTime()) : undefined;
|
||||
this.listQuery.endTime = val.time ? String(new Date(val.time[1]).getTime()) : undefined;
|
||||
if (val.time) {
|
||||
this.getData()
|
||||
} else {
|
||||
this.$message({
|
||||
message: '请选择时间',
|
||||
type: 'warning'
|
||||
});
|
||||
}
|
||||
this.getData()
|
||||
break;
|
||||
case 'reset':
|
||||
this.$refs.searchBarForm.resetForm();
|
||||
|
@ -1,14 +1,14 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2023-09-13 09:02:25
|
||||
* @LastEditTime: 2023-10-08 16:36:37
|
||||
* @LastEditTime: 2023-09-20 09:29:40
|
||||
* @LastEditors: DY
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<div>
|
||||
<div style="margin: 20px">
|
||||
<el-button v-for="(item, index) in buttonList" :key="index" :class="[item.actived ? 'activeButton': 'normalButton']" @click="changeChart(index)">{{ item.name }}</el-button>
|
||||
<el-button v-for="(item, index) in dataArray" :key="index" @click="changeChart(index)">{{ item.name }}</el-button>
|
||||
</div>
|
||||
<div ref="chartDiv" :class="className" :style="{height:height,width:width}" />
|
||||
</div>
|
||||
@ -43,8 +43,7 @@ export default {
|
||||
return {
|
||||
chart: null,
|
||||
dataArray: [],
|
||||
xDatas: [],
|
||||
buttonList: []
|
||||
xDatas: []
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
@ -52,34 +51,12 @@ export default {
|
||||
methods: {
|
||||
changeChart(index) {
|
||||
this.setOptions(this.xDatas, this.dataArray[index])
|
||||
this.buttonList.forEach((item, s) => {
|
||||
if (index === s) {
|
||||
// item.actived = true
|
||||
this.$nextTick(() =>{
|
||||
// item.actived = true
|
||||
this.$set(item, 'actived', true)
|
||||
})
|
||||
} else {
|
||||
// item.actived = false
|
||||
this.$nextTick(() =>{
|
||||
// item.actived = false
|
||||
this.$set(item, 'actived', false)
|
||||
})
|
||||
// this.$set(item, 'actived', false)
|
||||
}
|
||||
})
|
||||
console.log('看一下数22222据', this.dataArray)
|
||||
},
|
||||
initChart(xData, yData, lineName) {
|
||||
this.dataArray = yData
|
||||
this.buttonList = this.dataArray.map((item, index) => {
|
||||
return {
|
||||
'name': item.name,
|
||||
'actived': index === 0 ? true : false
|
||||
}
|
||||
})
|
||||
console.log('看一下数据', this.dataArray)
|
||||
this.xDatas = xData
|
||||
console.log(xData,yData);
|
||||
console.log('zale', yData[0].eqData)
|
||||
this.chart = echarts.init(this.$refs.chartDiv, 'macarons')
|
||||
this.setOptions(xData, yData[0], lineName)
|
||||
},
|
||||
@ -123,12 +100,3 @@ export default {
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.activeButton {
|
||||
background-color: rgb(93,159,255);
|
||||
}
|
||||
.normalButton {
|
||||
background-color: none;
|
||||
}
|
||||
</style>
|
||||
|
@ -57,7 +57,8 @@ export default {
|
||||
lineIds: [],
|
||||
time: ''
|
||||
},
|
||||
dateLabelList: [],
|
||||
xData: [],
|
||||
yData:[],
|
||||
optionArrUrl: [getProductionLinePage ],
|
||||
formConfig: [
|
||||
{
|
||||
@ -112,101 +113,75 @@ export default {
|
||||
let arr = [
|
||||
{
|
||||
prop: 'lineName',
|
||||
label: '产线'
|
||||
label: '产线',
|
||||
align: 'center',
|
||||
},
|
||||
{
|
||||
prop: 'sum',
|
||||
label: '合计'
|
||||
label: '合计',
|
||||
align: 'center',
|
||||
},
|
||||
{
|
||||
prop: res.data ? res.data.nameData[0].name : undefined,
|
||||
label: res.data ? res.data.nameData[0].name : undefined,
|
||||
prop: res.data.nameData[0].name,
|
||||
label: res.data.nameData[0].name,
|
||||
align: 'center',
|
||||
children:[
|
||||
|
||||
]
|
||||
}
|
||||
]
|
||||
// console.log(res.data.nameData.slice(1))
|
||||
console.log(res.data.nameData.slice(1))
|
||||
res.data.nameData.slice(1).forEach(item => {
|
||||
const props = {
|
||||
'prop': item.name,
|
||||
'label': item.name,
|
||||
'align': 'center'
|
||||
}
|
||||
arr[2].children.push(props)
|
||||
})
|
||||
let tableDataArr =[]
|
||||
res.data.data.forEach(item => {
|
||||
let obj = {}
|
||||
obj.lineName= item.lineName,
|
||||
obj.sum= item.sum,
|
||||
item.data.forEach((ele, index) => {
|
||||
// console.log(ele)
|
||||
ele.children.forEach((e) => {
|
||||
console.log(e.dynamicName)
|
||||
obj['' + e.dynamicName + ''] = e.dynamicValue
|
||||
console.log(obj['' + e.dynamicName + '']);
|
||||
})
|
||||
})
|
||||
tableDataArr.push(obj)
|
||||
});
|
||||
this.tableData = tableDataArr
|
||||
console.log(this.tableData)
|
||||
console.log(arr)
|
||||
this.tableProps = arr
|
||||
let xData = []
|
||||
|
||||
res.data.nameData.slice(1).forEach(item => {
|
||||
xData.push(item.name)
|
||||
// arr[2].children.push(props)
|
||||
})
|
||||
let yAllData = []
|
||||
let lineName = []
|
||||
if (res.data) {
|
||||
let tempDateList = []
|
||||
res.data.nameData.forEach(date => {
|
||||
tempDateList.push(date.name)
|
||||
})
|
||||
this.dateLabelList = Array.from(new Set(tempDateList))
|
||||
|
||||
this.dateLabelList.forEach(item => {
|
||||
if (item.indexOf('年') === -1) {
|
||||
// 构造表头
|
||||
const props = {
|
||||
'prop': item,
|
||||
'label': item
|
||||
}
|
||||
arr[2].children.push(props)
|
||||
|
||||
// 构造echarts横坐标
|
||||
xData.push(item)
|
||||
}
|
||||
})
|
||||
// res.data.nameData.slice(1).forEach(item => {
|
||||
// const props = {
|
||||
// 'prop': item.name,
|
||||
// 'label': item.name,
|
||||
// 'align': 'center'
|
||||
// }
|
||||
// arr[2].children.push(props)
|
||||
// })
|
||||
let tableDataArr =[]
|
||||
res.data.data.forEach(item => {
|
||||
let obj = {}
|
||||
obj.lineName= item.lineName,
|
||||
obj.sum= item.sum,
|
||||
item.data.forEach((ele, index) => {
|
||||
res.data.data.forEach(item => {
|
||||
let yData = []
|
||||
lineName.push(item.lineName)
|
||||
// let obj = {}
|
||||
// obj.lineName = item.lineName,
|
||||
// obj.sum = item.sum,
|
||||
item.data.forEach((ele, index) => {
|
||||
// console.log(ele)
|
||||
ele.children.forEach((e) => {
|
||||
console.log(e.dynamicName)
|
||||
obj['' + e.dynamicName + ''] = e.dynamicValue
|
||||
console.log(obj['' + e.dynamicName + '']);
|
||||
ele.children.forEach((e) => {
|
||||
// let yData = []
|
||||
yData.push(e.dynamicValue)
|
||||
})
|
||||
})
|
||||
tableDataArr.push(obj)
|
||||
});
|
||||
this.tableData = tableDataArr
|
||||
this.tableProps = arr
|
||||
|
||||
// let tempList = []
|
||||
// res.data.nameData.slice(1).forEach(item => {
|
||||
// tempList.push(item.name)
|
||||
// // arr[2].children.push(props)
|
||||
// })
|
||||
// xData = Array.from(new Set(tempList))
|
||||
|
||||
res.data.data.forEach(item => {
|
||||
let yData = []
|
||||
lineName.push(item.lineName)
|
||||
// let obj = {}
|
||||
// obj.lineName = item.lineName,
|
||||
// obj.sum = item.sum,
|
||||
item.data.forEach((ele, index) => {
|
||||
// console.log(ele)
|
||||
ele.children.forEach((e) => {
|
||||
// let yData = []
|
||||
yData.push(e.dynamicValue)
|
||||
})
|
||||
})
|
||||
yAllData.push(yData)
|
||||
});
|
||||
console.log(lineName)
|
||||
} else {
|
||||
this.tableProps = arr
|
||||
this.tableData = []
|
||||
xData = []
|
||||
yAllData = []
|
||||
lineName = []
|
||||
}
|
||||
yAllData.push(yData)
|
||||
});
|
||||
console.log(lineName)
|
||||
// res.data.data[0].data[0].children.forEach((item, index) => {
|
||||
// // console.log(item)
|
||||
// yData.push(item.dynamicValue)
|
||||
@ -228,14 +203,7 @@ export default {
|
||||
this.listQuery.time = val.time ? new Date(val.time).getTime() : undefined
|
||||
// this.listQuery.pageNo = 1;
|
||||
// this.listQuery.pageSize = 10;
|
||||
if (val.time) {
|
||||
this.getData()
|
||||
} else {
|
||||
this.$message({
|
||||
message: '请选择时间',
|
||||
type: 'warning'
|
||||
});
|
||||
}
|
||||
this.getData()
|
||||
break;
|
||||
case 'reset':
|
||||
this.$refs.searchBarForm.resetForm();
|
||||
|
@ -50,24 +50,29 @@ import {
|
||||
const tableProps = [
|
||||
{
|
||||
prop: 'code',
|
||||
label: '工厂编码'
|
||||
label: '工厂编码',
|
||||
align: 'center',
|
||||
},
|
||||
{
|
||||
prop: 'name',
|
||||
label: '工厂名称'
|
||||
label: '工厂名称',
|
||||
align: 'center',
|
||||
},
|
||||
{
|
||||
prop: 'address',
|
||||
label: '地址'
|
||||
label: '地址',
|
||||
align: 'center',
|
||||
},
|
||||
{
|
||||
prop: 'remark',
|
||||
label: '备注'
|
||||
label: '备注',
|
||||
align: 'center',
|
||||
},
|
||||
{
|
||||
prop: 'createTime',
|
||||
label: '创建时间',
|
||||
filter: parseTime
|
||||
align: 'center',
|
||||
filter: parseTime,
|
||||
},
|
||||
];
|
||||
|
||||
@ -115,14 +120,14 @@ export default {
|
||||
name: 'search',
|
||||
color: 'primary',
|
||||
},
|
||||
// {
|
||||
// type: 'separate',
|
||||
// },
|
||||
// {
|
||||
// type: 'button',
|
||||
// btnName: '重置',
|
||||
// name: 'reset',
|
||||
// },
|
||||
{
|
||||
type: 'separate',
|
||||
},
|
||||
{
|
||||
type: 'button',
|
||||
btnName: '重置',
|
||||
name: 'reset',
|
||||
},
|
||||
{
|
||||
type: 'separate',
|
||||
},
|
||||
|
@ -1,7 +1,7 @@
|
||||
<!--
|
||||
* @Author: Do not edit
|
||||
* @Date: 2023-08-29 14:59:29
|
||||
* @LastEditTime: 2023-09-27 16:19:56
|
||||
* @LastEditTime: 2023-09-16 17:34:17
|
||||
* @LastEditors: DY
|
||||
* @Description:
|
||||
-->
|
||||
@ -12,15 +12,21 @@
|
||||
ref="searchBarForm"
|
||||
@headBtnClick="buttonClick" />
|
||||
<base-table
|
||||
class="right-aside"
|
||||
v-loading="dataListLoading"
|
||||
:table-props="tableProps"
|
||||
:page="listQuery.pageNo"
|
||||
:limit="listQuery.pageSize"
|
||||
:selectWidth="55"
|
||||
:table-data="showData"
|
||||
:table-data="tableData"
|
||||
@selection-change="selectChange"
|
||||
>
|
||||
<method-btn
|
||||
v-if="tableBtn.length"
|
||||
slot="handleBtn"
|
||||
:width="120"
|
||||
label="操作"
|
||||
:method-list="tableBtn"
|
||||
@clickBtn="handleClick" />
|
||||
</base-table>
|
||||
<pagination
|
||||
:limit.sync="listQuery.pageSize"
|
||||
@ -37,6 +43,19 @@
|
||||
:table-data="selectedList"
|
||||
/>
|
||||
</div> -->
|
||||
<div ref="pdf" v-show="false">
|
||||
<el-table :data="selectedList" stripe border style="width: 100%">
|
||||
<el-table-column prop="reportType" label="报表类型" />
|
||||
<el-table-column prop="reportStartTime" label="统计开始时间" />
|
||||
<el-table-column prop="reportEndTime" label="统计结束时间" />
|
||||
<el-table-column prop="proLineName" label="产线名称" />
|
||||
<el-table-column prop="inputNum" label="投入数量/片" />
|
||||
<el-table-column prop="outputNum" label="产出数量/片" />
|
||||
<el-table-column prop="outputArea" label="产出面积/㎡" />
|
||||
<el-table-column prop="lossArea" label="损耗面积/㎡" />
|
||||
<el-table-column prop="lossRatio" label="损耗比例%" />
|
||||
</el-table>
|
||||
</div>
|
||||
<el-dialog
|
||||
title="提示"
|
||||
:visible.sync="dialogVisible"
|
||||
@ -55,8 +74,8 @@
|
||||
<script>
|
||||
import { parseTime } from '../../mixins/code-filter';
|
||||
import { getPdlAutoReport, getPdList } from '@/api/core/monitoring/auto'
|
||||
import jsPDF from 'jspdf'
|
||||
import html2canvas from 'html2canvas'
|
||||
// import jsPDF from 'jspdf'
|
||||
// import html2canvas from 'html2canvas'
|
||||
// import codeFilter from '../../mixins/code-filter'
|
||||
import * as XLSX from 'xlsx'
|
||||
import FileSaver from 'file-saver'
|
||||
@ -64,45 +83,55 @@ import FileSaver from 'file-saver'
|
||||
const tableProps = [
|
||||
{
|
||||
prop: 'reportType',
|
||||
label: '报表类型'
|
||||
label: '报表类型',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'reportStartTime',
|
||||
label: '统计开始时间',
|
||||
align: 'center',
|
||||
filter: parseTime,
|
||||
},
|
||||
{
|
||||
prop: 'reportEndTime',
|
||||
label: '统计结束时间',
|
||||
align: 'center',
|
||||
filter: parseTime,
|
||||
},
|
||||
{
|
||||
prop: 'proLineName',
|
||||
label: '产线名称'
|
||||
label: '产线名称',
|
||||
align: 'center',
|
||||
},
|
||||
{
|
||||
prop: 'inputNum',
|
||||
label: '投入数量/片'
|
||||
label: '投入数量/片',
|
||||
align: 'center',
|
||||
},
|
||||
{
|
||||
prop: 'outputNum',
|
||||
label: '产出数量/片'
|
||||
label: '产出数量/片',
|
||||
align: 'center',
|
||||
},
|
||||
{
|
||||
prop: 'outputArea',
|
||||
label: '产出面积/㎡'
|
||||
label: '产出面积/㎡',
|
||||
align: 'center',
|
||||
},
|
||||
{
|
||||
prop: 'lossNum',
|
||||
label: '损耗数量/片'
|
||||
label: '损耗数量/片',
|
||||
align: 'center',
|
||||
},
|
||||
{
|
||||
prop: 'lossArea',
|
||||
label: '损耗面积/㎡'
|
||||
label: '损耗面积/㎡',
|
||||
align: 'center',
|
||||
},
|
||||
{
|
||||
prop: 'lossRatio',
|
||||
label: '损耗比例%'
|
||||
label: '损耗比例%',
|
||||
align: 'center',
|
||||
}
|
||||
];
|
||||
|
||||
@ -124,7 +153,6 @@ export default {
|
||||
addOrUpdateVisible: false,
|
||||
tableProps,
|
||||
tableBtn: [],
|
||||
showData: [],
|
||||
selectedList: [],
|
||||
// tableBtn: [
|
||||
// this.$auth.hasPermi(`base:factory:update`)
|
||||
@ -204,60 +232,44 @@ export default {
|
||||
this.getPdLineList()
|
||||
},
|
||||
methods: {
|
||||
test() {
|
||||
var target = document.getElementsByClassName("right-aside")[0]
|
||||
target.style.background = '#FFFFFF'
|
||||
setTimeout(() => {
|
||||
html2canvas(target).then(function(canvas) {
|
||||
var contentWidth = canvas.width
|
||||
var contentHeight = canvas.height
|
||||
|
||||
// 一页pdf显示html页面生成的canvas高度
|
||||
var pageHeight = contentHeight / 592.28 * 841.89
|
||||
// 未生成pdf的html页面高度
|
||||
var leftHeight = contentHeight
|
||||
// 页面偏移
|
||||
var position = 0
|
||||
// a4纸的尺寸[595.28,841.89],html页面生成的canvas在pdf中图片的高度
|
||||
var imgWidth = 595.28
|
||||
var imgHeight = 592.28 / contentWidth * contentHeight
|
||||
|
||||
var pageData = canvas.toDataURL('image/jpeg', 1.0)
|
||||
|
||||
console.log('nihc URL', leftHeight, pageHeight)
|
||||
|
||||
var pdf = new jsPDF('', 'pt', 'a4')
|
||||
|
||||
if (leftHeight < pageHeight) {
|
||||
pdf.addImage(pageData, 'JPEG', 0, 20, imgWidth, imgHeight)
|
||||
} else {
|
||||
while(leftHeight > 0) {
|
||||
pdf.addImage(pageData, 'JPEG', 0, position, imgWidth, imgHeight)
|
||||
leftHeight -= pageHeight
|
||||
position -= 841.89
|
||||
// 避免空白页
|
||||
if (leftHeight > 0) {
|
||||
pdf.addPage()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pdf.save('产线统计自动报表.pdf')
|
||||
})
|
||||
}, 300)
|
||||
},
|
||||
exportPdf() {
|
||||
this.test()
|
||||
setTimeout(() =>{
|
||||
this.dialogVisible = false
|
||||
this.showData = this.tableData
|
||||
}, 600)
|
||||
|
||||
this.pdf()
|
||||
this.dialogVisible = false
|
||||
},
|
||||
exportXlsx() {
|
||||
this.exportECL()
|
||||
this.down()
|
||||
this.dialogVisible = false
|
||||
this.showData = this.tableData
|
||||
},
|
||||
// imgDownload() {
|
||||
// let that = this
|
||||
// let img = this.$refs['pdf']
|
||||
// // 图片高度
|
||||
// var w = parseInt(window.getComputedStyle(img).width)
|
||||
// // 图片宽度
|
||||
// var h = parseInt(window.getComputedStyle(img).height)
|
||||
// // 滚轮置顶,避免留白
|
||||
// window.pageYOffset = 0
|
||||
// html2canvas(img).then(function(canvas) {
|
||||
|
||||
// })
|
||||
// },
|
||||
pdf() {
|
||||
// console.log('打印看看[df]')
|
||||
// const pdf = new jsPDF()
|
||||
// const content = this.$refs.pdf.innerHTML
|
||||
// console.log('打印看看', content)
|
||||
// pdf.text(content, 15, 15)
|
||||
// // pdf.text('Hello world!', 10, 10)
|
||||
// pdf.save('test.pdf')
|
||||
// console.log('打印看看', pdf)
|
||||
const printWindow = window.open('', '_blank')
|
||||
const temp = this.$refs.pdf.innerHTML
|
||||
console.log(temp)
|
||||
printWindow.document.body.innerHTML = temp
|
||||
printWindow.focus()
|
||||
// printWindow.document.writeln(this.$refs.pdf.innerHTML)
|
||||
printWindow.document.close()
|
||||
printWindow.print()
|
||||
},
|
||||
handleClose(done) {
|
||||
this.$confirm('确认关闭?')
|
||||
@ -266,30 +278,23 @@ export default {
|
||||
})
|
||||
.catch(_ => {});
|
||||
},
|
||||
exportECL() {
|
||||
let tables = document.querySelector('.el-table').cloneNode(true)
|
||||
const fix = tables.querySelector('.el-table__fixed')
|
||||
const fixRight = tables.querySelector('.el-table__fixed-right')
|
||||
if (fix) {
|
||||
tables.removeChild(tables.querySelector('.el-table__fixed'))
|
||||
down() {
|
||||
//选中导出时可更改此处数组 选中的数组
|
||||
//构建导出的表格数据
|
||||
const exportData = [
|
||||
{reportType: '报表类型', reportStartTime: '统计开始时间', reportEndTime: '统计结束时间', proLineName: '产线名称', inputNum: '投入数量/片', outputNum: '产出数量/片', outputArea: '产出面积/㎡', lossNum: '损耗数量/片', lossArea: '损耗面积/㎡', lossRatio: '损耗比例%' },
|
||||
...this.selectedList
|
||||
]
|
||||
//注意表格上绑定id, 获取dom元素
|
||||
const worksheet = XLSX.utils.json_to_sheet(exportData, { skipHeader: true })
|
||||
const workbook = XLSX.utils.book_new()
|
||||
XLSX.utils.book_append_sheet(workbook, worksheet, "Sheet1")
|
||||
const workbookOutput = XLSX.write(workbook, { bookType: 'xlsx', type: 'array' })
|
||||
try {
|
||||
FileSaver.saveAs(new Blob([workbookOutput], { type: 'application/octet-stream' }), '产线统计自动报表.xlsx')
|
||||
} catch (e) {
|
||||
console.log(e)
|
||||
}
|
||||
if (fixRight) {
|
||||
tables.removeChild(tables.querySelector('.el-table__fixed-right'))
|
||||
}
|
||||
let exportTable = XLSX.utils.table_to_book(tables)
|
||||
|
||||
var exportTableOut = XLSX.write(exportTable, {
|
||||
bookType: 'xlsx', bookSST: true, type: 'array'
|
||||
})
|
||||
// sheetjs.xlsx为导出表格的标题名称
|
||||
try {
|
||||
FileSaver.saveAs(new Blob([exportTableOut], {
|
||||
type: 'application/octet-stream'
|
||||
}), '产线统计自动报表.xlsx')
|
||||
} catch (e) {
|
||||
if (typeof console !== 'undefined') console.log(e, exportTableOut)
|
||||
}
|
||||
return exportTableOut
|
||||
},
|
||||
selectChange(val) {
|
||||
console.log(val)
|
||||
@ -323,13 +328,12 @@ export default {
|
||||
getDataList() {
|
||||
this.dataListLoading = true;
|
||||
this.urlOptions.getDataListURL(this.listQuery).then(response => {
|
||||
this.tableData = response.data.list.map((item, index) => {
|
||||
this.tableData = response.data.list.map(item => {
|
||||
item.reportType = item.reportType === 1 ? '日' : item.reportType === 2 ? '周' : '月'
|
||||
return item
|
||||
});
|
||||
this.total = response.data.total;
|
||||
this.dataListLoading = false;
|
||||
this.showData = this.tableData
|
||||
});
|
||||
},
|
||||
// 每页数
|
||||
@ -344,10 +348,15 @@ export default {
|
||||
this.getDataList();
|
||||
},
|
||||
handleExport() {
|
||||
if (this.selectedList.length > 0) {
|
||||
this.showData = this.selectedList
|
||||
if (this.selectedList.length === 0) {
|
||||
this.selectedList = this.tableData
|
||||
}
|
||||
this.dialogVisible = true
|
||||
// this.$modal.confirm('是否确认导出所选数据项?').then(() => {
|
||||
// this.exportLoading = true;
|
||||
// // this.down()
|
||||
// this.pdf()
|
||||
// }).catch(() => { });
|
||||
}
|
||||
},
|
||||
};
|
||||
|
@ -1,7 +1,7 @@
|
||||
<!--
|
||||
* @Author: Do not edit
|
||||
* @Date: 2023-08-29 14:59:29
|
||||
* @LastEditTime: 2023-09-27 16:23:44
|
||||
* @LastEditTime: 2023-09-20 10:55:23
|
||||
* @LastEditors: DY
|
||||
* @Description:
|
||||
-->
|
||||
@ -12,13 +12,12 @@
|
||||
ref="searchBarForm"
|
||||
@headBtnClick="buttonClick" />
|
||||
<base-table
|
||||
class="right-aside"
|
||||
v-loading="dataListLoading"
|
||||
:table-props="tableProps"
|
||||
:page="listQuery.pageNo"
|
||||
:limit="listQuery.pageSize"
|
||||
:selectWidth="55"
|
||||
:table-data="showData"
|
||||
:table-data="tableData"
|
||||
@selection-change="selectChange"
|
||||
>
|
||||
<method-btn
|
||||
@ -34,6 +33,17 @@
|
||||
:page.sync="listQuery.pageNo"
|
||||
:total="listQuery.total"
|
||||
@pagination="getDataList" />
|
||||
<div ref="pdf" v-show="false">
|
||||
<el-table :data="selectedList" stripe border style="width: 100%">
|
||||
<el-table-column prop="proLineName" label="产线名称" />
|
||||
<el-table-column prop="inputNum" label="投入数量/片" />
|
||||
<el-table-column prop="outputNum" label="产出数量/片" />
|
||||
<el-table-column prop="outputArea" label="产出面积/㎡" />
|
||||
<el-table-column prop="lossNum" label="损耗数量/片" />
|
||||
<el-table-column prop="lossArea" label="损耗面积/㎡" />
|
||||
<el-table-column prop="lossRatio" label="损耗比例%" />
|
||||
</el-table>
|
||||
</div>
|
||||
<el-dialog
|
||||
title="提示"
|
||||
:visible.sync="dialogVisible"
|
||||
@ -53,8 +63,6 @@
|
||||
import { getPdlDataSearch, getPdList } from '@/api/core/monitoring/data'
|
||||
import * as XLSX from 'xlsx'
|
||||
import FileSaver from 'file-saver'
|
||||
import jsPDF from 'jspdf'
|
||||
import html2canvas from 'html2canvas'
|
||||
|
||||
const tableProps = [
|
||||
{
|
||||
@ -107,7 +115,6 @@ export default {
|
||||
addOrUpdateVisible: false,
|
||||
tableProps,
|
||||
tableBtn: [],
|
||||
showData: [],
|
||||
tableData: [],
|
||||
selectedList: [],
|
||||
formConfig: [
|
||||
@ -159,86 +166,40 @@ export default {
|
||||
this.getPdLineList()
|
||||
},
|
||||
methods: {
|
||||
test() {
|
||||
var target = document.getElementsByClassName("right-aside")[0]
|
||||
target.style.background = '#FFFFFF'
|
||||
setTimeout(() => {
|
||||
html2canvas(target).then(function(canvas) {
|
||||
var contentWidth = canvas.width
|
||||
var contentHeight = canvas.height
|
||||
|
||||
// 一页pdf显示html页面生成的canvas高度
|
||||
var pageHeight = contentHeight / 592.28 * 841.89
|
||||
// 未生成pdf的html页面高度
|
||||
var leftHeight = contentHeight
|
||||
// 页面偏移
|
||||
var position = 0
|
||||
// a4纸的尺寸[595.28,841.89],html页面生成的canvas在pdf中图片的高度
|
||||
var imgWidth = 595.28
|
||||
var imgHeight = 592.28 / contentWidth * contentHeight
|
||||
|
||||
var pageData = canvas.toDataURL('image/jpeg', 1.0)
|
||||
|
||||
console.log('nihc URL', leftHeight, pageHeight)
|
||||
|
||||
var pdf = new jsPDF('', 'pt', 'a4')
|
||||
|
||||
if (leftHeight < pageHeight) {
|
||||
pdf.addImage(pageData, 'JPEG', 0, 20, imgWidth, imgHeight)
|
||||
} else {
|
||||
while(leftHeight > 0) {
|
||||
pdf.addImage(pageData, 'JPEG', 0, position, imgWidth, imgHeight)
|
||||
leftHeight -= pageHeight
|
||||
position -= 841.89
|
||||
// 避免空白页
|
||||
if (leftHeight > 0) {
|
||||
pdf.addPage()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pdf.save('产线统计数据查询报表.pdf')
|
||||
})
|
||||
}, 300)
|
||||
},
|
||||
exportECL() {
|
||||
let tables = document.querySelector('.el-table').cloneNode(true)
|
||||
const fix = tables.querySelector('.el-table__fixed')
|
||||
const fixRight = tables.querySelector('.el-table__fixed-right')
|
||||
if (fix) {
|
||||
tables.removeChild(tables.querySelector('.el-table__fixed'))
|
||||
}
|
||||
if (fixRight) {
|
||||
tables.removeChild(tables.querySelector('.el-table__fixed-right'))
|
||||
}
|
||||
let exportTable = XLSX.utils.table_to_book(tables)
|
||||
|
||||
var exportTableOut = XLSX.write(exportTable, {
|
||||
bookType: 'xlsx', bookSST: true, type: 'array'
|
||||
})
|
||||
// sheetjs.xlsx为导出表格的标题名称
|
||||
try {
|
||||
FileSaver.saveAs(new Blob([exportTableOut], {
|
||||
type: 'application/octet-stream'
|
||||
}), '产线统计数据查询报表.xlsx')
|
||||
} catch (e) {
|
||||
if (typeof console !== 'undefined') console.log(e, exportTableOut)
|
||||
}
|
||||
return exportTableOut
|
||||
},
|
||||
exportPdf() {
|
||||
this.test()
|
||||
setTimeout(() =>{
|
||||
this.dialogVisible = false
|
||||
this.showData = this.tableData
|
||||
}, 600)
|
||||
|
||||
this.pdf()
|
||||
this.dialogVisible = false
|
||||
},
|
||||
exportXlsx() {
|
||||
this.exportECL()
|
||||
this.down()
|
||||
this.dialogVisible = false
|
||||
this.showData = this.tableData
|
||||
},
|
||||
pdf() {
|
||||
const printWindow = window.open('', '_blank')
|
||||
const temp = this.$refs.pdf.innerHTML
|
||||
console.log(temp)
|
||||
printWindow.document.body.innerHTML = temp
|
||||
printWindow.document.close()
|
||||
printWindow.print()
|
||||
},
|
||||
down() {
|
||||
//选中导出时可更改此处数组 选中的数组
|
||||
//构建导出的表格数据
|
||||
const exportData = [
|
||||
{proLineName: '产线名称', inputNum: '投入数量/片', outputNum: '产出数量/片', outputArea: '产出面积/㎡', lossNum: '损耗数量/片', lossArea: '损耗面积/㎡', lossRatio: '损耗比例%' },
|
||||
...this.selectedList
|
||||
]
|
||||
//注意表格上绑定id, 获取dom元素
|
||||
const worksheet = XLSX.utils.json_to_sheet(exportData, { skipHeader: true })
|
||||
const workbook = XLSX.utils.book_new()
|
||||
XLSX.utils.book_append_sheet(workbook, worksheet, "Sheet1")
|
||||
const workbookOutput = XLSX.write(workbook, { bookType: 'xlsx', type: 'array' })
|
||||
try {
|
||||
FileSaver.saveAs(new Blob([workbookOutput], { type: 'application/octet-stream' }), '产线统计数据查询.xlsx')
|
||||
} catch (e) {
|
||||
console.log(e)
|
||||
}
|
||||
},
|
||||
handleClose(done) {
|
||||
this.$confirm('确认关闭?')
|
||||
.then(_ => {
|
||||
@ -279,7 +240,6 @@ export default {
|
||||
this.tableData = response.data;
|
||||
this.total = response.data.total;
|
||||
this.dataListLoading = false;
|
||||
this.showData = this.tableData
|
||||
});
|
||||
},
|
||||
// 每页数
|
||||
@ -294,10 +254,21 @@ export default {
|
||||
this.getDataList();
|
||||
},
|
||||
handleExport() {
|
||||
if (this.selectedList.length > 0) {
|
||||
this.showData = this.selectedList
|
||||
if (this.selectedList.length === 0) {
|
||||
this.selectedList = this.tableData
|
||||
}
|
||||
this.dialogVisible = true
|
||||
// 处理查询参数
|
||||
// let params = { ...this.queryParams };
|
||||
// params.pageNo = undefined;
|
||||
// params.pageSize = undefined;
|
||||
// this.$modal.confirm('是否确认导出所有数据项?').then(() => {
|
||||
// this.exportLoading = true;
|
||||
// return this.urlOptions.exportURL(params);
|
||||
// }).then(response => {
|
||||
// this.$download.excel(response, '工厂.xls');
|
||||
// this.exportLoading = false;
|
||||
// }).catch(() => { });
|
||||
}
|
||||
},
|
||||
};
|
||||
|
@ -1,7 +1,7 @@
|
||||
<!--
|
||||
* @Author: Do not edit
|
||||
* @Date: 2023-08-29 14:59:29
|
||||
* @LastEditTime: 2023-10-08 10:51:49
|
||||
* @LastEditTime: 2023-09-22 15:13:48
|
||||
* @LastEditors: DY
|
||||
* @Description:
|
||||
-->
|
||||
@ -13,13 +13,12 @@
|
||||
ref="searchBarForm"
|
||||
@headBtnClick="buttonClick" />
|
||||
<base-table
|
||||
class="right-aside"
|
||||
v-loading="dataListLoading"
|
||||
:table-props="tableProps"
|
||||
:page="listQuery.pageNo"
|
||||
:limit="listQuery.pageSize"
|
||||
:selectWidth="55"
|
||||
:table-data="showData"
|
||||
:table-data="tableData"
|
||||
@selection-change="selectChange"
|
||||
>
|
||||
<method-btn
|
||||
@ -35,6 +34,21 @@
|
||||
:page.sync="listQuery.pageNo"
|
||||
:total="listQuery.total"
|
||||
@pagination="getDataList" />
|
||||
<div ref="pdf" v-show="false">
|
||||
<el-table :data="selectedList" stripe border style="width: 100%">
|
||||
<el-table-column prop="reportType" label="报表类型" />
|
||||
<el-table-column prop="reportStartTime" label="统计开始时间" />
|
||||
<el-table-column prop="reportEndTime" label="统计结束时间" />
|
||||
<el-table-column prop="proLineName" label="产线名称" />
|
||||
<el-table-column prop="sectionName" label="工段名称" />
|
||||
<el-table-column prop="inputNum" label="投入数量/片" />
|
||||
<el-table-column prop="outputNum" label="产出数量/片" />
|
||||
<el-table-column prop="outputArea" label="产出面积/㎡" />
|
||||
<el-table-column prop="lossNum" label="损耗数量/片" />
|
||||
<el-table-column prop="lossArea" label="损耗面积/㎡" />
|
||||
<el-table-column prop="lossRatio" label="损耗比例%" />
|
||||
</el-table>
|
||||
</div>
|
||||
<el-dialog
|
||||
title="提示"
|
||||
:visible.sync="dialogVisible"
|
||||
@ -55,8 +69,6 @@ import { parseTime } from '../../mixins/code-filter';
|
||||
import { getWorkshopSectionList, getPdList, getSectionAutoReport } from '@/api/core/monitoring/sectionStatistics'
|
||||
import * as XLSX from 'xlsx'
|
||||
import FileSaver from 'file-saver'
|
||||
import jsPDF from 'jspdf'
|
||||
import html2canvas from 'html2canvas'
|
||||
|
||||
const tableProps = [
|
||||
{
|
||||
@ -128,7 +140,6 @@ export default {
|
||||
tableProps,
|
||||
tableBtn: [],
|
||||
tableData: [],
|
||||
showData: [],
|
||||
formConfig: [
|
||||
{
|
||||
type: 'select',
|
||||
@ -197,86 +208,40 @@ export default {
|
||||
this.getPdLineList()
|
||||
},
|
||||
methods: {
|
||||
test() {
|
||||
var target = document.getElementsByClassName("right-aside")[0]
|
||||
target.style.background = '#FFFFFF'
|
||||
setTimeout(() => {
|
||||
html2canvas(target).then(function(canvas) {
|
||||
var contentWidth = canvas.width
|
||||
var contentHeight = canvas.height
|
||||
|
||||
// 一页pdf显示html页面生成的canvas高度
|
||||
var pageHeight = contentHeight / 592.28 * 841.89
|
||||
// 未生成pdf的html页面高度
|
||||
var leftHeight = contentHeight
|
||||
// 页面偏移
|
||||
var position = 0
|
||||
// a4纸的尺寸[595.28,841.89],html页面生成的canvas在pdf中图片的高度
|
||||
var imgWidth = 595.28
|
||||
var imgHeight = 592.28 / contentWidth * contentHeight
|
||||
|
||||
var pageData = canvas.toDataURL('image/jpeg', 1.0)
|
||||
|
||||
console.log('nihc URL', leftHeight, pageHeight)
|
||||
|
||||
var pdf = new jsPDF('', 'pt', 'a4')
|
||||
|
||||
if (leftHeight < pageHeight) {
|
||||
pdf.addImage(pageData, 'JPEG', 0, 20, imgWidth, imgHeight)
|
||||
} else {
|
||||
while(leftHeight > 0) {
|
||||
pdf.addImage(pageData, 'JPEG', 0, position, imgWidth, imgHeight)
|
||||
leftHeight -= pageHeight
|
||||
position -= 841.89
|
||||
// 避免空白页
|
||||
if (leftHeight > 0) {
|
||||
pdf.addPage()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pdf.save('工段统计自动报表.pdf')
|
||||
})
|
||||
}, 300)
|
||||
},
|
||||
exportECL() {
|
||||
let tables = document.querySelector('.el-table').cloneNode(true)
|
||||
const fix = tables.querySelector('.el-table__fixed')
|
||||
const fixRight = tables.querySelector('.el-table__fixed-right')
|
||||
if (fix) {
|
||||
tables.removeChild(tables.querySelector('.el-table__fixed'))
|
||||
}
|
||||
if (fixRight) {
|
||||
tables.removeChild(tables.querySelector('.el-table__fixed-right'))
|
||||
}
|
||||
let exportTable = XLSX.utils.table_to_book(tables)
|
||||
|
||||
var exportTableOut = XLSX.write(exportTable, {
|
||||
bookType: 'xlsx', bookSST: true, type: 'array'
|
||||
})
|
||||
// sheetjs.xlsx为导出表格的标题名称
|
||||
try {
|
||||
FileSaver.saveAs(new Blob([exportTableOut], {
|
||||
type: 'application/octet-stream'
|
||||
}), '工段统计自动报表.xlsx')
|
||||
} catch (e) {
|
||||
if (typeof console !== 'undefined') console.log(e, exportTableOut)
|
||||
}
|
||||
return exportTableOut
|
||||
},
|
||||
exportPdf() {
|
||||
this.test()
|
||||
setTimeout(() =>{
|
||||
this.dialogVisible = false
|
||||
this.showData = this.tableData
|
||||
}, 600)
|
||||
|
||||
this.pdf()
|
||||
this.dialogVisible = false
|
||||
},
|
||||
exportXlsx() {
|
||||
this.exportECL()
|
||||
this.down()
|
||||
this.dialogVisible = false
|
||||
this.showData = this.tableData
|
||||
},
|
||||
pdf() {
|
||||
const printWindow = window.open('', '_blank')
|
||||
const temp = this.$refs.pdf.innerHTML
|
||||
console.log(temp)
|
||||
printWindow.document.body.innerHTML = temp
|
||||
printWindow.document.close()
|
||||
printWindow.print()
|
||||
},
|
||||
down() {
|
||||
//选中导出时可更改此处数组 选中的数组
|
||||
//构建导出的表格数据
|
||||
const exportData = [
|
||||
{reportType: '产线类型', reportStartTime: '统计开始时间', reportEndTime: '统计结束时间', lineName: '产线名称', sectionName: '工段名称', inputNum: '投入数量/片', outputNum: '产出数量/片', outputArea: '产出面积/㎡', lossNum: '损耗数量/片', lossArea: '损耗面积/㎡', lossRatio: '损耗比例%' },
|
||||
...this.selectedList
|
||||
]
|
||||
//注意表格上绑定id, 获取dom元素
|
||||
const worksheet = XLSX.utils.json_to_sheet(exportData, { skipHeader: true })
|
||||
const workbook = XLSX.utils.book_new()
|
||||
XLSX.utils.book_append_sheet(workbook, worksheet, "Sheet1")
|
||||
const workbookOutput = XLSX.write(workbook, { bookType: 'xlsx', type: 'array' })
|
||||
try {
|
||||
FileSaver.saveAs(new Blob([workbookOutput], { type: 'application/octet-stream' }), '工段统计自动报表.xlsx')
|
||||
} catch (e) {
|
||||
console.log(e)
|
||||
}
|
||||
},
|
||||
handleClose(done) {
|
||||
this.$confirm('确认关闭?')
|
||||
.then(_ => {
|
||||
@ -324,7 +289,6 @@ export default {
|
||||
item.reportType = item.reportType === 1 ? '日' : item.reportType === 2 ? '周' : '月'
|
||||
return item
|
||||
});
|
||||
this.showData = this.tableData
|
||||
this.total = response.data.total;
|
||||
this.dataListLoading = false;
|
||||
});
|
||||
@ -341,10 +305,21 @@ export default {
|
||||
this.getDataList();
|
||||
},
|
||||
handleExport() {
|
||||
if (this.selectedList.length > 0) {
|
||||
this.showData = this.selectedList
|
||||
if (this.selectedList.length === 0) {
|
||||
this.selectedList = this.tableData
|
||||
}
|
||||
this.dialogVisible = true
|
||||
// 处理查询参数
|
||||
// let params = { ...this.queryParams };
|
||||
// params.pageNo = undefined;
|
||||
// params.pageSize = undefined;
|
||||
// this.$modal.confirm('是否确认导出所有数据项?').then(() => {
|
||||
// this.exportLoading = true;
|
||||
// return this.urlOptions.exportURL(params);
|
||||
// }).then(response => {
|
||||
// this.$download.excel(response, '工厂.xls');
|
||||
// this.exportLoading = false;
|
||||
// }).catch(() => { });
|
||||
}
|
||||
},
|
||||
};
|
||||
|
@ -5,42 +5,23 @@
|
||||
ref="searchBarForm"
|
||||
@headBtnClick="buttonClick" />
|
||||
<base-table
|
||||
class="right-aside"
|
||||
v-loading="dataListLoading"
|
||||
:table-props="tableProps"
|
||||
:table-data="showData"
|
||||
:selectWidth="55"
|
||||
@selection-change="selectChange"
|
||||
/>
|
||||
<pagination
|
||||
:table-data="tableData" />
|
||||
<!-- <pagination
|
||||
:limit.sync="listQuery.pageSize"
|
||||
:page.sync="listQuery.pageNo"
|
||||
:total="listQuery.total"
|
||||
@pagination="getDataList" />
|
||||
<el-dialog
|
||||
title="提示"
|
||||
:visible.sync="dialogVisible"
|
||||
width="30%"
|
||||
:before-close="handleClose">
|
||||
<el-button type="primary" @click="exportXlsx">xlsx</el-button>
|
||||
<el-button type="success" @click="exportPdf">pdf</el-button>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="dialogVisible = false">取 消</el-button>
|
||||
<el-button type="primary" @click="dialogVisible = false">确 定</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
@pagination="getDataList" /> -->
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
// import basicPage from '../../mixins/basic-page';
|
||||
import { parseTime } from '../../mixins/code-filter';
|
||||
import { getSectionDataSearch } from '@/api/core/monitoring';
|
||||
import { getProductionLinePage } from '@/api/core/base/productionLine';
|
||||
import { getWorkshopSectionPage } from '@/api/core/base/workshopSection';
|
||||
import * as XLSX from 'xlsx'
|
||||
import FileSaver from 'file-saver'
|
||||
import jsPDF from 'jspdf'
|
||||
import html2canvas from 'html2canvas'
|
||||
|
||||
const tableProps = [
|
||||
{
|
||||
@ -89,8 +70,6 @@ export default {
|
||||
},
|
||||
tableProps,
|
||||
tableData: [],
|
||||
showData: [],
|
||||
selectedList: [],
|
||||
listQuery: {
|
||||
proLineId:undefined,
|
||||
sectionId: undefined,
|
||||
@ -98,7 +77,6 @@ export default {
|
||||
endTime: undefined,
|
||||
},
|
||||
dataListLoading: false,
|
||||
dialogVisible: false,
|
||||
optionArrUrl: [getProductionLinePage, getWorkshopSectionPage],
|
||||
formConfig: [
|
||||
{
|
||||
@ -149,93 +127,6 @@ export default {
|
||||
this.getDataList()
|
||||
},
|
||||
methods: {
|
||||
test() {
|
||||
var target = document.getElementsByClassName("right-aside")[0]
|
||||
target.style.background = '#FFFFFF'
|
||||
setTimeout(() => {
|
||||
html2canvas(target).then(function(canvas) {
|
||||
var contentWidth = canvas.width
|
||||
var contentHeight = canvas.height
|
||||
|
||||
// 一页pdf显示html页面生成的canvas高度
|
||||
var pageHeight = contentHeight / 592.28 * 841.89
|
||||
// 未生成pdf的html页面高度
|
||||
var leftHeight = contentHeight
|
||||
// 页面偏移
|
||||
var position = 0
|
||||
// a4纸的尺寸[595.28,841.89],html页面生成的canvas在pdf中图片的高度
|
||||
var imgWidth = 595.28
|
||||
var imgHeight = 592.28 / contentWidth * contentHeight
|
||||
|
||||
var pageData = canvas.toDataURL('image/jpeg', 1.0)
|
||||
|
||||
console.log('nihc URL', leftHeight, pageHeight)
|
||||
|
||||
var pdf = new jsPDF('', 'pt', 'a4')
|
||||
|
||||
if (leftHeight < pageHeight) {
|
||||
pdf.addImage(pageData, 'JPEG', 0, 20, imgWidth, imgHeight)
|
||||
} else {
|
||||
while(leftHeight > 0) {
|
||||
pdf.addImage(pageData, 'JPEG', 0, position, imgWidth, imgHeight)
|
||||
leftHeight -= pageHeight
|
||||
position -= 841.89
|
||||
// 避免空白页
|
||||
if (leftHeight > 0) {
|
||||
pdf.addPage()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pdf.save('工段统计数据查询报表.pdf')
|
||||
})
|
||||
}, 300)
|
||||
},
|
||||
exportECL() {
|
||||
let tables = document.querySelector('.el-table').cloneNode(true)
|
||||
const fix = tables.querySelector('.el-table__fixed')
|
||||
const fixRight = tables.querySelector('.el-table__fixed-right')
|
||||
if (fix) {
|
||||
tables.removeChild(tables.querySelector('.el-table__fixed'))
|
||||
}
|
||||
if (fixRight) {
|
||||
tables.removeChild(tables.querySelector('.el-table__fixed-right'))
|
||||
}
|
||||
let exportTable = XLSX.utils.table_to_book(tables)
|
||||
|
||||
var exportTableOut = XLSX.write(exportTable, {
|
||||
bookType: 'xlsx', bookSST: true, type: 'array'
|
||||
})
|
||||
// sheetjs.xlsx为导出表格的标题名称
|
||||
try {
|
||||
FileSaver.saveAs(new Blob([exportTableOut], {
|
||||
type: 'application/octet-stream'
|
||||
}), '工段统计数据查询报表.xlsx')
|
||||
} catch (e) {
|
||||
if (typeof console !== 'undefined') console.log(e, exportTableOut)
|
||||
}
|
||||
return exportTableOut
|
||||
},
|
||||
exportPdf() {
|
||||
this.test()
|
||||
setTimeout(() =>{
|
||||
this.dialogVisible = false
|
||||
this.showData = this.tableData
|
||||
}, 600)
|
||||
|
||||
},
|
||||
exportXlsx() {
|
||||
this.exportECL()
|
||||
this.dialogVisible = false
|
||||
this.showData = this.tableData
|
||||
},
|
||||
handleClose(done) {
|
||||
this.$confirm('确认关闭?')
|
||||
.then(_ => {
|
||||
done();
|
||||
})
|
||||
.catch(_ => {});
|
||||
},
|
||||
getArr() {
|
||||
const params = {
|
||||
page: 1,
|
||||
@ -253,31 +144,9 @@ export default {
|
||||
// this.listQuery.endTime = '1693564257000'
|
||||
this.urlOptions.getDataListURL(this.listQuery).then(res => {
|
||||
this.tableData = res.data
|
||||
this.listQuery.total = this.tableData.length;
|
||||
// this.total = response.data.total;
|
||||
this.dataListLoading = false;
|
||||
this.showData = this.tableData;
|
||||
});
|
||||
},
|
||||
// 每页数
|
||||
sizeChangeHandle(val) {
|
||||
this.listQuery.pageSize = val;
|
||||
this.listQuery.pageNo = 1;
|
||||
this.getDataList();
|
||||
},
|
||||
// 当前页
|
||||
currentChangeHandle(val) {
|
||||
this.listQuery.pageNo = val;
|
||||
this.getDataList();
|
||||
},
|
||||
handleExport() {
|
||||
if (this.selectedList.length > 0) {
|
||||
this.showData = this.selectedList
|
||||
}
|
||||
this.dialogVisible = true
|
||||
},
|
||||
selectChange(val) {
|
||||
console.log(val)
|
||||
this.selectedList = val
|
||||
},
|
||||
buttonClick(val) {
|
||||
console.log(val)
|
||||
@ -302,9 +171,6 @@ export default {
|
||||
};
|
||||
this.getDataList();
|
||||
break;
|
||||
case 'export':
|
||||
this.handleExport();
|
||||
break;
|
||||
default:
|
||||
console.log(val);
|
||||
}
|
||||
|
@ -97,22 +97,6 @@ export default {
|
||||
trigger: 'axis',
|
||||
axisPointer: {
|
||||
type: 'shadow'
|
||||
},
|
||||
formatter: function(params) {
|
||||
return (
|
||||
params[0].axisValue +
|
||||
`<br>` +
|
||||
params.map((item) => {
|
||||
let str = `<span style="display:inline-block;width:8px;height:8px;margin: 0 8px 0 -3px;border-radius:2px;background-color:${item.color};"></span>`
|
||||
let seriesNameStr = `<span style="display:inline-block;">${item.seriesName}</span>`
|
||||
let value = item.value ? item.value : '-'
|
||||
let valueStr = `<span style="display:inline-block;margin-left:10px;color:rgba(0,0,0,0.45);">${value}</span>`
|
||||
return `<span style="display:flex; justify-content:space-between; margin-bottom: 2px">
|
||||
<span>${str}${seriesNameStr}</span>
|
||||
<span>${valueStr}</span>
|
||||
</span>`
|
||||
}).join(``)
|
||||
)
|
||||
}
|
||||
},
|
||||
grid: {
|
||||
@ -122,11 +106,7 @@ export default {
|
||||
containLabel: true
|
||||
},
|
||||
legend: {
|
||||
data: legendData,
|
||||
right: '1%',
|
||||
icon: 'rect',
|
||||
itemHeight: 8,
|
||||
itemWidth: 8
|
||||
data: legendData
|
||||
},
|
||||
xAxis: {
|
||||
type: 'category',
|
||||
|
@ -103,8 +103,7 @@ export default {
|
||||
containLabel: true
|
||||
},
|
||||
legend: {
|
||||
data: legendData,
|
||||
right: '1%'
|
||||
data: legendData
|
||||
},
|
||||
xAxis: {
|
||||
type: 'category',
|
||||
|
@ -425,7 +425,7 @@ export default {
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang='scss'>
|
||||
<style>
|
||||
/* 时间整点 */
|
||||
.noneMinute .el-time-spinner__wrapper {
|
||||
width: 100%;
|
||||
@ -433,16 +433,6 @@ export default {
|
||||
.noneMinute .el-scrollbar:nth-of-type(2) {
|
||||
display: none;
|
||||
}
|
||||
.demo-form-inline {
|
||||
.el-date-editor .el-range__icon {
|
||||
font-size: 16px;
|
||||
color: #0B58FF;
|
||||
}
|
||||
.el-input__prefix .el-icon-date {
|
||||
font-size: 16px;
|
||||
color: #0B58FF;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
<style lang="scss" scoped>
|
||||
.demo-form-inline {
|
||||
@ -456,6 +446,8 @@ export default {
|
||||
margin-top: 12px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
<style scoped>
|
||||
.searchBarBox .foldClass {
|
||||
position: absolute;
|
||||
top: 14px;
|
||||
|
@ -15,7 +15,7 @@ export default {
|
||||
return {
|
||||
chartDom: '',
|
||||
chart: '',
|
||||
chartHeight: this.tableHeight(370)
|
||||
chartHeight: this.tableHeight(350)
|
||||
}
|
||||
},
|
||||
props: {
|
||||
@ -34,7 +34,7 @@ export default {
|
||||
},
|
||||
mounted() {
|
||||
window.addEventListener('resize', () => {
|
||||
this.chartHeight = this.tableHeight(370)
|
||||
this.chartHeight = this.tableHeight(350)
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
@ -86,35 +86,17 @@ export default {
|
||||
}
|
||||
}
|
||||
var option = {
|
||||
// title: {
|
||||
// text: 'World Population'
|
||||
// },
|
||||
color:['#288AFF','#8EF0AB'],
|
||||
tooltip: {
|
||||
trigger: 'axis',
|
||||
axisPointer: {
|
||||
type: 'shadow'
|
||||
},
|
||||
formatter: function(params) {
|
||||
return (
|
||||
params[0].axisValue +
|
||||
`<br>` +
|
||||
params.map((item) => {
|
||||
let str = `<span style="display:inline-block;width:8px;height:8px;margin: 0 8px 0 -3px;border-radius:2px;background-color:${item.color};"></span>`
|
||||
let seriesNameStr = `<span style="display:inline-block;">${item.seriesName}</span>`
|
||||
let value = item.value ? item.value : '-'
|
||||
let valueStr = `<span style="display:inline-block;margin-left:10px;color:rgba(0,0,0,0.45);">${value}</span>`
|
||||
return `<span style="display:flex; justify-content:space-between; margin-bottom: 2px">
|
||||
<span>${str}${seriesNameStr}</span>
|
||||
<span>${valueStr}</span>
|
||||
</span>`
|
||||
}).join(``)
|
||||
)
|
||||
}
|
||||
},
|
||||
legend: {
|
||||
right: '1%',
|
||||
icon: 'rect',
|
||||
itemHeight: 8,
|
||||
itemWidth: 8
|
||||
},
|
||||
legend: {},
|
||||
grid: {
|
||||
left: '1%',
|
||||
right: '1%',
|
||||
|
@ -194,23 +194,13 @@ export default {
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang='scss'>
|
||||
<style>
|
||||
/* 级联选择器 */
|
||||
.cascaderParent .el-cascader-panel .el-scrollbar:first-child .el-radio {
|
||||
display: none;
|
||||
}
|
||||
.demo-form-inline {
|
||||
.el-date-editor .el-range__icon {
|
||||
font-size: 16px;
|
||||
color: #0B58FF;
|
||||
}
|
||||
.el-input__prefix .el-icon-date {
|
||||
font-size: 16px;
|
||||
color: #0B58FF;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
<style lang="scss" scoped>
|
||||
<style scoped>
|
||||
.separateStyle {
|
||||
display: inline-block;
|
||||
width: 1px;
|
||||
@ -218,6 +208,8 @@ export default {
|
||||
background: #E8E8E8;
|
||||
vertical-align: middle;
|
||||
}
|
||||
</style>
|
||||
<style lang="scss" scoped>
|
||||
.demo-form-inline {
|
||||
.blue-block {
|
||||
display: inline-block;
|
||||
|
@ -9,8 +9,7 @@
|
||||
:table-data="list"
|
||||
class="qoq-out-table"
|
||||
/>
|
||||
<div class="chartTitle">环比分析图</div>
|
||||
<div style='width: 100%'>
|
||||
<div style='width: 100%;height: 300px;padding-top: 30px;'>
|
||||
<line-chart ref="analysisLineChart" :chartData="chartData"/>
|
||||
</div>
|
||||
</div>
|
||||
@ -113,20 +112,3 @@ export default {
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang='scss' scoped>
|
||||
.chartTitle {
|
||||
font-size: 16px;
|
||||
color: #000;
|
||||
margin-top: 20px;
|
||||
}
|
||||
.chartTitle::before {
|
||||
content: '';
|
||||
display: inline-block;
|
||||
width: 4px;
|
||||
height: 18px;
|
||||
background-color: #0B58FF;
|
||||
border-radius: 1px;
|
||||
margin-right: 8px;
|
||||
vertical-align: bottom;
|
||||
}
|
||||
</style>
|
@ -68,6 +68,12 @@ export default {
|
||||
}
|
||||
var option = {
|
||||
color:['#288AFF'],
|
||||
tooltip: {
|
||||
trigger: 'axis',
|
||||
axisPointer: {
|
||||
type: 'shadow'
|
||||
}
|
||||
},
|
||||
grid: {
|
||||
left: '4%',
|
||||
right: '1%',
|
||||
|
@ -70,9 +70,9 @@ export default {
|
||||
|
||||
var option = {
|
||||
color:['#288AFF'],
|
||||
// tooltip: {
|
||||
// trigger: 'axis'
|
||||
// },
|
||||
tooltip: {
|
||||
trigger: 'axis'
|
||||
},
|
||||
grid: {
|
||||
left: '4%',
|
||||
right: '1%',
|
||||
|
@ -385,7 +385,7 @@ export default {
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang='scss'>
|
||||
<style>
|
||||
/* 级联选择器 */
|
||||
.cascaderParent .el-cascader-panel .el-scrollbar:first-child .el-radio {
|
||||
display: none;
|
||||
@ -397,16 +397,6 @@ export default {
|
||||
.noneMinute .el-scrollbar:nth-of-type(2) {
|
||||
display: none;
|
||||
}
|
||||
.demo-form-inline {
|
||||
.el-date-editor .el-range__icon {
|
||||
font-size: 16px;
|
||||
color: #0B58FF;
|
||||
}
|
||||
.el-input__prefix .el-icon-date {
|
||||
font-size: 16px;
|
||||
color: #0B58FF;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
<style lang="scss" scoped>
|
||||
.demo-form-inline {
|
||||
@ -420,6 +410,8 @@ export default {
|
||||
margin-top: 12px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
<style scoped>
|
||||
.searchBarBox .foldClass {
|
||||
position: absolute;
|
||||
top: 14px;
|
||||
|
@ -77,8 +77,7 @@ export default {
|
||||
var option = {
|
||||
color:['#FFDC94','#8EF0AB','#63BDFF','#288AFF','#7164FF','#FF6860','#FF9747','#B0EB42','#D680FF','#0043D2'],
|
||||
legend: {
|
||||
data: keys,
|
||||
right:'1%'
|
||||
data: keys
|
||||
},
|
||||
tooltip: {
|
||||
trigger: 'axis'
|
||||
|
@ -143,20 +143,19 @@ export default {
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang='scss'>
|
||||
<style>
|
||||
/* 级联选择器 */
|
||||
.cascaderParent .el-cascader-panel .el-scrollbar:first-child .el-radio {
|
||||
display: none;
|
||||
}
|
||||
.demo-form-inline {
|
||||
.el-date-editor .el-range__icon {
|
||||
font-size: 16px;
|
||||
color: #0B58FF;
|
||||
}
|
||||
.el-input__prefix .el-icon-date {
|
||||
font-size: 16px;
|
||||
color: #0B58FF;
|
||||
}
|
||||
</style>
|
||||
<style scoped>
|
||||
.separateStyle {
|
||||
display: inline-block;
|
||||
width: 1px;
|
||||
height: 24px;
|
||||
background: #E8E8E8;
|
||||
vertical-align: middle;
|
||||
}
|
||||
</style>
|
||||
<style lang="scss" scoped>
|
||||
@ -171,11 +170,4 @@ export default {
|
||||
margin-top: 10px;
|
||||
}
|
||||
}
|
||||
.separateStyle {
|
||||
display: inline-block;
|
||||
width: 1px;
|
||||
height: 24px;
|
||||
background: #E8E8E8;
|
||||
vertical-align: middle;
|
||||
}
|
||||
</style>
|
@ -3,7 +3,6 @@
|
||||
<!-- 搜索工作栏 -->
|
||||
<search-area @submit="getList" @exportD="exportData"/>
|
||||
<div v-show='chartData.length'>
|
||||
<div class="chartTitle">同比分析图</div>
|
||||
<div style='width: 100%;height: 400px;'>
|
||||
<line-chart ref="analysisLineChart" :chartData="chartData"/>
|
||||
</div>
|
||||
@ -34,12 +33,12 @@ export default {
|
||||
chartData: [],
|
||||
tableProps: [],
|
||||
list: [],
|
||||
tableH: this.tableHeight(640)
|
||||
tableH: this.tableHeight(600)
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
window.addEventListener('resize', () => {
|
||||
this.tableH = this.tableHeight(640)
|
||||
this.tableH = this.tableHeight(600)
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
@ -124,19 +123,3 @@ export default {
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang='scss' scoped>
|
||||
.chartTitle {
|
||||
font-size: 16px;
|
||||
color: #000;
|
||||
}
|
||||
.chartTitle::before {
|
||||
content: '';
|
||||
display: inline-block;
|
||||
width: 4px;
|
||||
height: 18px;
|
||||
background-color: #0B58FF;
|
||||
border-radius: 1px;
|
||||
margin-right: 8px;
|
||||
vertical-align: bottom;
|
||||
}
|
||||
</style>
|
@ -130,7 +130,7 @@ export default {
|
||||
this.plcTableName = data.plcTableName
|
||||
this.objName = data.objName
|
||||
this.getList()
|
||||
if (title === 'detail') {
|
||||
if (title === 'view') {
|
||||
this.showBtn = false
|
||||
this.tableBtn = []
|
||||
} else {
|
||||
|
@ -113,22 +113,22 @@ export default {
|
||||
],
|
||||
tableProps,
|
||||
tableBtn: [
|
||||
this.$auth.hasPermi('base:energy-plc-connect:bind')
|
||||
? {
|
||||
type: 'connect',
|
||||
btnName: '绑定'
|
||||
}
|
||||
: undefined,
|
||||
{
|
||||
type: 'detail',
|
||||
btnName: '详情'
|
||||
},
|
||||
this.$auth.hasPermi('base:energy-plc-connect:update')
|
||||
? {
|
||||
type: 'edit',
|
||||
btnName: '编辑'
|
||||
}
|
||||
: undefined,
|
||||
{
|
||||
type: 'view',
|
||||
btnName: '查看'
|
||||
},
|
||||
this.$auth.hasPermi('base:energy-plc-connect:bind')
|
||||
? {
|
||||
type: 'connect',
|
||||
btnName: '绑定'
|
||||
}
|
||||
: undefined,
|
||||
this.$auth.hasPermi('base:energy-plc-connect:delete')
|
||||
? {
|
||||
type: 'delete',
|
||||
@ -205,10 +205,10 @@ export default {
|
||||
case 'delete':
|
||||
this.handleDelete(val.data)
|
||||
break
|
||||
case 'detail':
|
||||
case 'view':
|
||||
this.paramVisible = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.plcParam.init(val.data, 'detail')
|
||||
this.$refs.plcParam.init(val.data, 'view')
|
||||
})
|
||||
break
|
||||
default:
|
||||
|
@ -1,72 +1,54 @@
|
||||
<template>
|
||||
<el-form ref="form" :rules="rules" label-width="110px" :model="form">
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="监控对象" prop="objectId">
|
||||
<el-cascader
|
||||
style='width: 100%;'
|
||||
v-model="objIds"
|
||||
:options="objList"
|
||||
:props="{ checkStrictly: true, value: 'id', label: 'name' }"
|
||||
popper-class="cascaderParent"
|
||||
@change="selectObj"
|
||||
clearable></el-cascader>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="能源类型" prop="energyTypeId">
|
||||
<el-select v-model="form.energyTypeId" placeholder="请选择" style="width: 100%;" @change="toggleType">
|
||||
<el-option
|
||||
v-for="item in this.energyTypeList"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="监控模式" prop="type">
|
||||
<el-select v-model="form.type" placeholder="请选择" style="width: 100%;" @change="typeChange">
|
||||
<el-option label="合并" :value= "1" ></el-option>
|
||||
<el-option label="详细" :value= "2" ></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="监控详细参数" prop="type" v-if="form.type === 2">
|
||||
<el-select v-model="form.plcParamId" placeholder="请选择" style="width: 100%;" @change="selectDetail">
|
||||
<el-option
|
||||
v-for="item in detailList"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="指标类型" prop="limitType">
|
||||
<el-select v-model="form.limitType" placeholder="请选择" style="width: 100%;">
|
||||
<el-option
|
||||
v-for="item in getDictDatas(DICT_TYPE.MONITOR_INDEX_TYPE)"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="消耗量阈值" prop="limitValue">
|
||||
<el-input-number v-model="form.limitValue" :min="0" :max="10000000000000000" style="width: 100%;"></el-input-number>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-form-item label="监控对象" prop="objectId">
|
||||
<el-cascader
|
||||
style='width: 100%;'
|
||||
v-model="objIds"
|
||||
:options="objList"
|
||||
:props="{ checkStrictly: true, value: 'id', label: 'name' }"
|
||||
popper-class="cascaderParent"
|
||||
@change="selectObj"
|
||||
clearable></el-cascader>
|
||||
</el-form-item>
|
||||
<el-form-item label="能源类型" prop="energyTypeId">
|
||||
<el-select v-model="form.energyTypeId" placeholder="请选择" style="width: 100%;" @change="toggleType">
|
||||
<el-option
|
||||
v-for="item in this.energyTypeList"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="监控模式" prop="type">
|
||||
<el-select v-model="form.type" placeholder="请选择" style="width: 100%;" @change="typeChange">
|
||||
<el-option label="合并" :value= "1" ></el-option>
|
||||
<el-option label="详细" :value= "2" ></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="监控详细参数" prop="type" v-if="form.type === 2">
|
||||
<el-select v-model="form.plcParamId" placeholder="请选择" style="width: 100%;" @change="selectDetail">
|
||||
<el-option
|
||||
v-for="item in detailList"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="指标类型" prop="limitType">
|
||||
<el-select v-model="form.limitType" placeholder="请选择" style="width: 100%;">
|
||||
<el-option
|
||||
v-for="item in getDictDatas(DICT_TYPE.MONITOR_INDEX_TYPE)"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="消耗量阈值" prop="limitValue">
|
||||
<el-input-number v-model="form.limitValue" :min="0" :max="10000000000000000" style="width: 100%;"></el-input-number>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</template>
|
||||
<script>
|
||||
|
@ -124,7 +124,7 @@ export default {
|
||||
this.energyType = data.energyType
|
||||
this.energyTypeId = data.energyTypeId
|
||||
this.getList()
|
||||
if (title === 'detail') {
|
||||
if (title === 'view') {
|
||||
this.showBtn = false
|
||||
this.tableBtn = []
|
||||
} else {
|
||||
|
@ -111,22 +111,22 @@ export default {
|
||||
],
|
||||
tableProps,
|
||||
tableBtn: [
|
||||
this.$auth.hasPermi('monitoring:energy-statistics:bind')
|
||||
? {
|
||||
type: 'connect',
|
||||
btnName: '绑定'
|
||||
}
|
||||
: undefined,
|
||||
{
|
||||
type: 'detail',
|
||||
btnName: '详情'
|
||||
},
|
||||
this.$auth.hasPermi('monitoring:energy-statistics:update')
|
||||
? {
|
||||
type: 'edit',
|
||||
btnName: '编辑'
|
||||
}
|
||||
: undefined,
|
||||
{
|
||||
type: 'view',
|
||||
btnName: '查看'
|
||||
},
|
||||
this.$auth.hasPermi('monitoring:energy-statistics:bind')
|
||||
? {
|
||||
type: 'connect',
|
||||
btnName: '绑定'
|
||||
}
|
||||
: undefined,
|
||||
this.$auth.hasPermi('monitoring:energy-statistics:delete')
|
||||
? {
|
||||
type: 'delete',
|
||||
@ -199,9 +199,9 @@ export default {
|
||||
case 'delete':
|
||||
this.handleDelete(val.data)
|
||||
break
|
||||
case 'detail':
|
||||
case 'view':
|
||||
this.$nextTick(() => {
|
||||
this.$refs.plcParam.init(val.data, 'detail')
|
||||
this.$refs.plcParam.init(val.data, 'view')
|
||||
})
|
||||
break
|
||||
default:
|
||||
|
@ -118,12 +118,12 @@ export default {
|
||||
{
|
||||
width: 128,
|
||||
prop: 'workTime',
|
||||
label: '工作时长[h]',
|
||||
label: '工作时长',
|
||||
},
|
||||
{
|
||||
width: 128,
|
||||
prop: 'workRate',
|
||||
label: '百分比[%]',
|
||||
label: '百分比',
|
||||
filter: (val) => (val != null ? +val.toFixed(3) : '-'),
|
||||
},
|
||||
],
|
||||
@ -134,9 +134,9 @@ export default {
|
||||
{
|
||||
width: 128,
|
||||
prop: 'stopTime',
|
||||
label: '停机时长[h]',
|
||||
label: '停机时长',
|
||||
},
|
||||
{ width: 128, prop: 'stopRate', label: '百分比[%]' },
|
||||
{ width: 128, prop: 'stopRate', label: '百分比' },
|
||||
],
|
||||
},
|
||||
{
|
||||
@ -145,10 +145,10 @@ export default {
|
||||
{
|
||||
width: 128,
|
||||
prop: 'downTime',
|
||||
label: '故障时长[h]',
|
||||
label: '故障时长',
|
||||
filter: (val) => (val != null ? +val.toFixed(3) : '-'),
|
||||
},
|
||||
{ width: 128, prop: 'downRate', label: '百分比[%]' },
|
||||
{ width: 128, prop: 'downRate', label: '百分比' },
|
||||
{
|
||||
width: 128,
|
||||
prop: 'timeEfficiency',
|
||||
|
@ -155,7 +155,7 @@ export default {
|
||||
async getList() {
|
||||
this.loading = true;
|
||||
// 执行查询
|
||||
const { code, data } = await this.$axios({
|
||||
const { data } = await this.$axios({
|
||||
url: '/analysis/equipment-analysis/efficiency',
|
||||
method: 'get',
|
||||
params: {
|
||||
@ -163,11 +163,6 @@ export default {
|
||||
recordTime: this.queryParams.recordTime || null,
|
||||
},
|
||||
});
|
||||
if (code === 0) {
|
||||
this.list = data;
|
||||
} else {
|
||||
this.list.splice(0);
|
||||
}
|
||||
},
|
||||
|
||||
handleSearchBarBtnClick(btn) {
|
||||
|
@ -43,7 +43,7 @@ export default {
|
||||
eq.okQuantity,
|
||||
eq.nokQuantity,
|
||||
eq.totalQuantity,
|
||||
eq.passRate.toFixed(4),
|
||||
eq.passRate.toFixed(2),
|
||||
]);
|
||||
});
|
||||
return {
|
||||
@ -53,30 +53,6 @@ export default {
|
||||
axisPointer: {
|
||||
type: 'shadow',
|
||||
},
|
||||
formatter: (params) => {
|
||||
const name = params[0].name;
|
||||
const goodRate = opt.find((item) => item[0] == name)[4];
|
||||
return `
|
||||
<h1 style="font-size: 18px; letter-spacing: 1px;">${
|
||||
params[0].axisValue
|
||||
} <small>${goodRate}%</small></h1>
|
||||
<ul style="margin: 0; padding: 0; min-width: 128px;">
|
||||
${params
|
||||
.map(
|
||||
(item, index) => `
|
||||
<li style="list-style: none; display: flex; justify-content: space-between; align-items: center;">
|
||||
<div>
|
||||
<span style="display: inline-block; width: 10px; height: 10px; border-radius: 50%; background-color: ${item.color}; margin-right: 5px;"></span>
|
||||
${item.seriesName}
|
||||
</div>
|
||||
${item.value}
|
||||
</li>
|
||||
`
|
||||
)
|
||||
.join('')}
|
||||
</ul>
|
||||
`;
|
||||
},
|
||||
},
|
||||
legend: {
|
||||
itemWidth: 12,
|
||||
@ -134,17 +110,17 @@ export default {
|
||||
stack: 's',
|
||||
data: opt.map((item) => item[2]),
|
||||
},
|
||||
// {
|
||||
// name: '加工数量',
|
||||
// type: 'bar',
|
||||
// barWidth: 20,
|
||||
// data: opt.map((item) => item[3]),
|
||||
// },
|
||||
// {
|
||||
// name: '合格率',
|
||||
// type: 'line',
|
||||
// data: opt.map((item) => item[4]),
|
||||
// },
|
||||
{
|
||||
name: '加工数量',
|
||||
type: 'bar',
|
||||
barWidth: 20,
|
||||
data: opt.map((item) => item[3]),
|
||||
},
|
||||
{
|
||||
name: '合格率',
|
||||
type: 'line',
|
||||
data: opt.map((item) => item[4]),
|
||||
},
|
||||
],
|
||||
};
|
||||
},
|
||||
|
@ -31,8 +31,7 @@
|
||||
<el-tab-pane :label="'\u3000柱状图\u3000'" name="graph">
|
||||
<div v-if="activeName == 'graph'" class="graph" style="height: 40vh; display: flex; flex-direction: column;">
|
||||
<div class="blue-title">各设备加工数量</div>
|
||||
<LineChart v-if="list && list.length" :list="list" />
|
||||
<div v-else class="no-data-bg"></div>
|
||||
<LineChart :list="list" />
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
|
@ -8,7 +8,7 @@
|
||||
<template>
|
||||
<div
|
||||
class="production-timegraph-container"
|
||||
style="background: #f2f4f9; flex: 1; display: flex; flex-direction: column">
|
||||
style="background: #f2f4f9; flex: 1">
|
||||
<el-row
|
||||
class=""
|
||||
style="
|
||||
@ -24,16 +24,12 @@
|
||||
:formConfigs="searchBarFormConfig"
|
||||
ref="search-bar"
|
||||
:remove-blue="true"
|
||||
@select-changed="handleSearchBarChanged"
|
||||
@headBtnClick="handleSearchBarBtnClick" />
|
||||
</el-row>
|
||||
|
||||
<el-row
|
||||
class=""
|
||||
style="
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
margin-bottom: 12px;
|
||||
background: #fff;
|
||||
padding: 16px 16px 24px;
|
||||
@ -41,7 +37,7 @@
|
||||
">
|
||||
<div class="blue-title">设备产量时序图</div>
|
||||
|
||||
<div class="main-area" style="flex: 1">
|
||||
<div class="main-area">
|
||||
<div class="graphs" v-if="graphList.length">
|
||||
<LineChart :config="templateConfig" />
|
||||
</div>
|
||||
@ -74,7 +70,6 @@
|
||||
|
||||
<script>
|
||||
import LineChart from './components/lineChart.vue';
|
||||
import response from './response.json';
|
||||
|
||||
export default {
|
||||
name: 'SGProduction',
|
||||
@ -82,7 +77,6 @@ export default {
|
||||
props: {},
|
||||
data() {
|
||||
return {
|
||||
startTime: null, // new Date(2023, 8, 26, 0, 0, 0, 0).getTime(),
|
||||
accumulators: new Map(),
|
||||
searchBarFormConfig: [
|
||||
{
|
||||
@ -91,7 +85,6 @@ export default {
|
||||
placeholder: '请选择产线',
|
||||
selectOptions: [],
|
||||
param: 'lineId',
|
||||
onchange: true,
|
||||
},
|
||||
{
|
||||
type: 'select',
|
||||
@ -115,7 +108,6 @@ export default {
|
||||
// defaultTime: ['00:00:00', '23:59:59'],
|
||||
placeholder: '选择日期',
|
||||
param: 'recordTime',
|
||||
required: true,
|
||||
},
|
||||
{
|
||||
type: 'button',
|
||||
@ -144,18 +136,7 @@ export default {
|
||||
eqList: [],
|
||||
graphList: [],
|
||||
templateConfig: {
|
||||
color: [
|
||||
'#283D68',
|
||||
'#FFB61F',
|
||||
'#4481FF',
|
||||
'#5AD8A6',
|
||||
'#E97466',
|
||||
'#ccc', //<=== 需按情况更新
|
||||
'#ccc',
|
||||
'#ccc',
|
||||
'#ccc',
|
||||
'#ccc',
|
||||
],
|
||||
color: ['#283D68', '#FFB61F', '#4481FF', '#5AD8A6', '#E97466'],
|
||||
grid: {
|
||||
top: 48,
|
||||
left: 48,
|
||||
@ -178,30 +159,25 @@ export default {
|
||||
tooltip: {
|
||||
show: true,
|
||||
trigger: 'axis',
|
||||
formatter: function (params) {
|
||||
return `
|
||||
<div style="margin-bottom: 8px;">${new Date(
|
||||
+params[0].name
|
||||
).toLocaleTimeString()}</div>
|
||||
${params
|
||||
.map(({ seriesName, color, data }) =>
|
||||
data != null
|
||||
? `
|
||||
<div style="min-width: 160px; display: flex; justify-content: space-between; align-items: center;">
|
||||
<span style="display: flex; align-items: center;">
|
||||
<span style="display: inline-block; margin-right: 8px; width: 12px; height: 12px; background: ${color}"></span>
|
||||
<span style="">${seriesName}</span>
|
||||
</span>
|
||||
<span style="color: #c7c7c7; text-align: right;">${data}</span>
|
||||
</div>
|
||||
`
|
||||
: ''
|
||||
)
|
||||
.join('')}
|
||||
`;
|
||||
},
|
||||
},
|
||||
xAxis: null,
|
||||
xAxis: {
|
||||
type: 'category',
|
||||
boundaryGap: true,
|
||||
axisTick: {
|
||||
// show: false,
|
||||
alignWithLabel: true,
|
||||
lineStyle: {
|
||||
color: '#0003',
|
||||
},
|
||||
},
|
||||
axisLabel: {
|
||||
color: '#0007',
|
||||
},
|
||||
data: [],
|
||||
// data: Array(24)
|
||||
// .fill(1)
|
||||
// .map((item, index) => `${index}:00`),
|
||||
},
|
||||
yAxis: {
|
||||
type: 'value',
|
||||
name: '产量',
|
||||
@ -210,12 +186,9 @@ export default {
|
||||
fontSize: 14,
|
||||
align: 'center',
|
||||
},
|
||||
axisLine: {
|
||||
show: true,
|
||||
},
|
||||
nameGap: 26,
|
||||
max: function (value) {
|
||||
return value.max + Math.ceil(value.max / 4);
|
||||
// return value.max + 50
|
||||
return value.max + Math.floor(value.max / 5);
|
||||
},
|
||||
},
|
||||
series: [
|
||||
@ -250,29 +223,16 @@ export default {
|
||||
},
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
timeArr() {
|
||||
return Array(24)
|
||||
.fill(this.startTime)
|
||||
.map((time, index) => time + index * 3600000);
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.initProductline();
|
||||
this.initWorksection();
|
||||
this.initEquipment();
|
||||
// this.getList();
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
handleSearchBarBtnClick({ btnName, ...payload }) {
|
||||
switch (btnName) {
|
||||
case 'search':
|
||||
if (!payload.recordTime || payload.recordTime.length <= 0) {
|
||||
this.$message.error('请选择时间段');
|
||||
return;
|
||||
}
|
||||
this.startTime = new Date(payload.recordTime).getTime();
|
||||
|
||||
this.queryParams.lineId = payload.lineId || null;
|
||||
this.queryParams.sectionId = payload.sectionId || null;
|
||||
this.queryParams.equipmentId = payload.equipmentId || null;
|
||||
@ -290,18 +250,6 @@ export default {
|
||||
}
|
||||
},
|
||||
|
||||
handleSearchBarChanged({ param, value }) {
|
||||
if (!value) {
|
||||
this.searchBarFormConfig[1].selectOptions = [];
|
||||
return;
|
||||
}
|
||||
switch (param) {
|
||||
case 'lineId':
|
||||
this.getWorksectionById(value);
|
||||
break;
|
||||
}
|
||||
},
|
||||
|
||||
/** 重置查询条件 */
|
||||
initQuery() {
|
||||
this.queryParams.lineId = null;
|
||||
@ -319,74 +267,43 @@ export default {
|
||||
});
|
||||
},
|
||||
|
||||
initState() {
|
||||
this.accumulators = new Map();
|
||||
this.templateConfig.series = [];
|
||||
},
|
||||
|
||||
async getList() {
|
||||
this.initState();
|
||||
|
||||
const { code, data } = await this.$axios({
|
||||
url: '/analysis/equipment-analysis/quantity',
|
||||
method: 'get',
|
||||
params: this.queryParams,
|
||||
});
|
||||
|
||||
// const { code, data } = response;
|
||||
if (code == 0) {
|
||||
this.graphList = this.objectToArray(data);
|
||||
this.setXaxis();
|
||||
// const eq1 = [
|
||||
// { totalQuantity: 20, startTime: 1693964578000 },
|
||||
// { totalQuantity: 43, startTime: 1693964678000 },
|
||||
// { totalQuantity: 12, startTime: 1693964778000 },
|
||||
// { totalQuantity: 11, startTime: 1693964878000 },
|
||||
// { totalQuantity: 98, startTime: 1693965478000 },
|
||||
// { totalQuantity: 87, startTime: 1693965578000 },
|
||||
// ];
|
||||
// eq1.key = 'SS1';
|
||||
// const eq2 = [
|
||||
// { totalQuantity: 23, startTime: 1693961578000 },
|
||||
// { totalQuantity: 42, startTime: 1693964578000 },
|
||||
// { totalQuantity: 51, startTime: 1693965578000 },
|
||||
// { totalQuantity: 18, startTime: 1693966578000 },
|
||||
// { totalQuantity: 77, startTime: 1693966778000 },
|
||||
// { totalQuantity: 38, startTime: 1693967578000 },
|
||||
// { totalQuantity: 57, startTime: 1693969578000 },
|
||||
// ];
|
||||
// eq2.key = 'SS2';
|
||||
// this.graphList = [eq1, eq2];
|
||||
|
||||
this.graphList.forEach(this.setSeries);
|
||||
} else {
|
||||
this.graphList = [];
|
||||
this.graphList.forEach(this.setSeries);
|
||||
}
|
||||
},
|
||||
|
||||
setXaxis() {
|
||||
const xaxis = {
|
||||
type: 'category',
|
||||
// interval: 12,
|
||||
axisTick: {
|
||||
alignWithLabel: true,
|
||||
lineStyle: {
|
||||
color: '#0003',
|
||||
},
|
||||
},
|
||||
axisLabel: {
|
||||
formatter: function (value, index) {
|
||||
return new Date(+value)
|
||||
.toLocaleTimeString()
|
||||
.split(':')
|
||||
.slice(0, 2)
|
||||
.join(':');
|
||||
},
|
||||
},
|
||||
data: this.timeArr,
|
||||
};
|
||||
this.templateConfig.xAxis = xaxis;
|
||||
},
|
||||
|
||||
setYaxis() {},
|
||||
|
||||
setSeries(list) {
|
||||
const data = Array(24).fill(null);
|
||||
list.map((item, index) => {
|
||||
const idx = this.timeArr.indexOf(item.startTime);
|
||||
if (idx != -1) {
|
||||
data[idx] = item.totalQuantity;
|
||||
}
|
||||
});
|
||||
const seriesItem = {
|
||||
name: list.key,
|
||||
type: 'line',
|
||||
symbol: 'circle',
|
||||
data,
|
||||
};
|
||||
this.templateConfig.series.push(seriesItem);
|
||||
},
|
||||
|
||||
setSeriesOld(eqArr) {
|
||||
setSeries(eqArr) {
|
||||
if (eqArr.length == 0) {
|
||||
this.templateConfig.series = [];
|
||||
return;
|
||||
@ -413,6 +330,18 @@ export default {
|
||||
});
|
||||
},
|
||||
|
||||
/** 获得设备产量 */
|
||||
getEquipmentQuantity(equipmentArr) {
|
||||
return equipmentArr.map((item) => item.totalQuantity);
|
||||
},
|
||||
|
||||
/** 获得设备产量的时间 */
|
||||
getTimeinfo(equipmentArr) {
|
||||
return equipmentArr.map((item) =>
|
||||
new Date(item.startTime).toLocaleTimeString()
|
||||
);
|
||||
},
|
||||
|
||||
/** 准备设备数据 */
|
||||
async initEquipment() {
|
||||
const { code, data } = await this.$axios({
|
||||
@ -461,25 +390,6 @@ export default {
|
||||
}
|
||||
},
|
||||
|
||||
/** 根据产线获取工段 */
|
||||
async getWorksectionById(lineId) {
|
||||
const { code, data } = await this.$axios({
|
||||
url: '/base/workshop-section/listByParentId',
|
||||
method: 'get',
|
||||
params: {
|
||||
id: lineId,
|
||||
},
|
||||
});
|
||||
if (code == 0) {
|
||||
this.searchBarFormConfig[1].selectOptions = data.map((item) => {
|
||||
return {
|
||||
name: item.name,
|
||||
id: item.id,
|
||||
};
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
async submitForm() {
|
||||
const { code, data } = await this.$axios({
|
||||
url: '/analysis/equipment-analysis/quantity',
|
||||
|
@ -1,333 +0,0 @@
|
||||
{
|
||||
"code": 0,
|
||||
"data": {
|
||||
"上片机": [
|
||||
{
|
||||
"inQuantity": 200,
|
||||
"totalQuantity": 199,
|
||||
"outQuantity": 200,
|
||||
"okQuantity": 199,
|
||||
"nokQuantity": 1,
|
||||
"recordTime": 1695657600000,
|
||||
"startTime": 1695657600000
|
||||
},
|
||||
{
|
||||
"inQuantity": 200,
|
||||
"totalQuantity": 189,
|
||||
"outQuantity": 200,
|
||||
"okQuantity": 189,
|
||||
"nokQuantity": 11,
|
||||
"recordTime": 1695661200000,
|
||||
"startTime": 1695661200000
|
||||
},
|
||||
{
|
||||
"inQuantity": 200,
|
||||
"totalQuantity": 198,
|
||||
"outQuantity": 200,
|
||||
"okQuantity": 198,
|
||||
"nokQuantity": 2,
|
||||
"recordTime": 1695664800000,
|
||||
"startTime": 1695664800000
|
||||
},
|
||||
{
|
||||
"inQuantity": 200,
|
||||
"totalQuantity": 197,
|
||||
"outQuantity": 200,
|
||||
"okQuantity": 197,
|
||||
"nokQuantity": 3,
|
||||
"recordTime": 1695668400000,
|
||||
"startTime": 1695668400000
|
||||
},
|
||||
{
|
||||
"inQuantity": 200,
|
||||
"totalQuantity": 200,
|
||||
"outQuantity": 200,
|
||||
"okQuantity": 200,
|
||||
"nokQuantity": 0,
|
||||
"recordTime": 1695672000000,
|
||||
"startTime": 1695672000000
|
||||
},
|
||||
{
|
||||
"inQuantity": 200,
|
||||
"totalQuantity": 170,
|
||||
"outQuantity": 200,
|
||||
"okQuantity": 170,
|
||||
"nokQuantity": 30,
|
||||
"recordTime": 1695675600000,
|
||||
"startTime": 1695675600000
|
||||
},
|
||||
{
|
||||
"inQuantity": 200,
|
||||
"totalQuantity": 199,
|
||||
"outQuantity": 200,
|
||||
"okQuantity": 199,
|
||||
"nokQuantity": 1,
|
||||
"recordTime": 1695679200000,
|
||||
"startTime": 1695679200000
|
||||
},
|
||||
{
|
||||
"inQuantity": 200,
|
||||
"totalQuantity": 199,
|
||||
"outQuantity": 200,
|
||||
"okQuantity": 199,
|
||||
"nokQuantity": 1,
|
||||
"recordTime": 1695682800000,
|
||||
"startTime": 1695682800000
|
||||
},
|
||||
{
|
||||
"inQuantity": 200,
|
||||
"totalQuantity": 195,
|
||||
"outQuantity": 200,
|
||||
"okQuantity": 195,
|
||||
"nokQuantity": 5,
|
||||
"recordTime": 1695686400000,
|
||||
"startTime": 1695686400000
|
||||
},
|
||||
{
|
||||
"inQuantity": 200,
|
||||
"totalQuantity": 198,
|
||||
"outQuantity": 200,
|
||||
"okQuantity": 198,
|
||||
"nokQuantity": 2,
|
||||
"recordTime": 1695690000000,
|
||||
"startTime": 1695690000000
|
||||
},
|
||||
{
|
||||
"inQuantity": 200,
|
||||
"totalQuantity": 199,
|
||||
"outQuantity": 200,
|
||||
"okQuantity": 199,
|
||||
"nokQuantity": 1,
|
||||
"recordTime": 1695693600000,
|
||||
"startTime": 1695693600000
|
||||
},
|
||||
{
|
||||
"inQuantity": 200,
|
||||
"totalQuantity": 197,
|
||||
"outQuantity": 200,
|
||||
"okQuantity": 197,
|
||||
"nokQuantity": 3,
|
||||
"recordTime": 1695697200000,
|
||||
"startTime": 1695697200000
|
||||
},
|
||||
{
|
||||
"inQuantity": 200,
|
||||
"totalQuantity": 197,
|
||||
"outQuantity": 200,
|
||||
"okQuantity": 197,
|
||||
"nokQuantity": 3,
|
||||
"recordTime": 1695700800000,
|
||||
"startTime": 1695700800000
|
||||
},
|
||||
{
|
||||
"inQuantity": 200,
|
||||
"totalQuantity": 196,
|
||||
"outQuantity": 200,
|
||||
"okQuantity": 196,
|
||||
"nokQuantity": 4,
|
||||
"recordTime": 1695704400000,
|
||||
"startTime": 1695704400000
|
||||
},
|
||||
{
|
||||
"inQuantity": 200,
|
||||
"totalQuantity": 193,
|
||||
"outQuantity": 200,
|
||||
"okQuantity": 193,
|
||||
"nokQuantity": 7,
|
||||
"recordTime": 1695708000000,
|
||||
"startTime": 1695708000000
|
||||
},
|
||||
{
|
||||
"inQuantity": 200,
|
||||
"totalQuantity": 190,
|
||||
"outQuantity": 200,
|
||||
"okQuantity": 190,
|
||||
"nokQuantity": 10,
|
||||
"recordTime": 1695711600000,
|
||||
"startTime": 1695711600000
|
||||
},
|
||||
{
|
||||
"inQuantity": 200,
|
||||
"totalQuantity": 199,
|
||||
"outQuantity": 200,
|
||||
"okQuantity": 199,
|
||||
"nokQuantity": 1,
|
||||
"recordTime": 1695715200000,
|
||||
"startTime": 1695715200000
|
||||
},
|
||||
{
|
||||
"inQuantity": 200,
|
||||
"totalQuantity": 200,
|
||||
"outQuantity": 200,
|
||||
"okQuantity": 200,
|
||||
"nokQuantity": 0,
|
||||
"recordTime": 1695718800000,
|
||||
"startTime": 1695718800000
|
||||
},
|
||||
{
|
||||
"inQuantity": 200,
|
||||
"totalQuantity": 200,
|
||||
"outQuantity": 200,
|
||||
"okQuantity": 200,
|
||||
"nokQuantity": 0,
|
||||
"recordTime": 1695722400000,
|
||||
"startTime": 1695722400000
|
||||
},
|
||||
{
|
||||
"inQuantity": 200,
|
||||
"totalQuantity": 198,
|
||||
"outQuantity": 200,
|
||||
"okQuantity": 198,
|
||||
"nokQuantity": 2,
|
||||
"recordTime": 1695726000000,
|
||||
"startTime": 1695726000000
|
||||
},
|
||||
{
|
||||
"inQuantity": 200,
|
||||
"totalQuantity": 199,
|
||||
"outQuantity": 200,
|
||||
"okQuantity": 199,
|
||||
"nokQuantity": 1,
|
||||
"recordTime": 1695729600000,
|
||||
"startTime": 1695729600000
|
||||
},
|
||||
{
|
||||
"inQuantity": 200,
|
||||
"totalQuantity": 189,
|
||||
"outQuantity": 200,
|
||||
"okQuantity": 189,
|
||||
"nokQuantity": 11,
|
||||
"recordTime": 1695733200000,
|
||||
"startTime": 1695733200000
|
||||
},
|
||||
{
|
||||
"inQuantity": 200,
|
||||
"totalQuantity": 179,
|
||||
"outQuantity": 200,
|
||||
"okQuantity": 179,
|
||||
"nokQuantity": 21,
|
||||
"recordTime": 1695736800000,
|
||||
"startTime": 1695736800000
|
||||
},
|
||||
{
|
||||
"inQuantity": 200,
|
||||
"totalQuantity": 200,
|
||||
"outQuantity": 200,
|
||||
"okQuantity": 200,
|
||||
"nokQuantity": 0,
|
||||
"recordTime": 1695740400000,
|
||||
"startTime": 1695740400000
|
||||
}
|
||||
],
|
||||
"下片机": [
|
||||
{
|
||||
"inQuantity": 200,
|
||||
"totalQuantity": 190,
|
||||
"outQuantity": 200,
|
||||
"okQuantity": 190,
|
||||
"nokQuantity": 10,
|
||||
"recordTime": 1695672000000,
|
||||
"startTime": 1695672000000
|
||||
},
|
||||
{
|
||||
"inQuantity": 200,
|
||||
"totalQuantity": 177,
|
||||
"outQuantity": 200,
|
||||
"okQuantity": 177,
|
||||
"nokQuantity": 23,
|
||||
"recordTime": 1695675600000,
|
||||
"startTime": 1695675600000
|
||||
},
|
||||
{
|
||||
"inQuantity": 200,
|
||||
"totalQuantity": 198,
|
||||
"outQuantity": 200,
|
||||
"okQuantity": 198,
|
||||
"nokQuantity": 2,
|
||||
"recordTime": 1695679200000,
|
||||
"startTime": 1695679200000
|
||||
},
|
||||
{
|
||||
"inQuantity": 200,
|
||||
"totalQuantity": 200,
|
||||
"outQuantity": 200,
|
||||
"okQuantity": 200,
|
||||
"nokQuantity": 0,
|
||||
"recordTime": 1695682800000,
|
||||
"startTime": 1695682800000
|
||||
},
|
||||
{
|
||||
"inQuantity": 200,
|
||||
"totalQuantity": 185,
|
||||
"outQuantity": 200,
|
||||
"okQuantity": 185,
|
||||
"nokQuantity": 15,
|
||||
"recordTime": 1695686400000,
|
||||
"startTime": 1695686400000
|
||||
},
|
||||
{
|
||||
"inQuantity": 200,
|
||||
"totalQuantity": 198,
|
||||
"outQuantity": 200,
|
||||
"okQuantity": 198,
|
||||
"nokQuantity": 2,
|
||||
"recordTime": 1695690000000,
|
||||
"startTime": 1695690000000
|
||||
},
|
||||
{
|
||||
"inQuantity": 200,
|
||||
"totalQuantity": 200,
|
||||
"outQuantity": 200,
|
||||
"okQuantity": 200,
|
||||
"nokQuantity": 0,
|
||||
"recordTime": 1695693600000,
|
||||
"startTime": 1695693600000
|
||||
},
|
||||
{
|
||||
"inQuantity": 200,
|
||||
"totalQuantity": 193,
|
||||
"outQuantity": 200,
|
||||
"okQuantity": 193,
|
||||
"nokQuantity": 7,
|
||||
"recordTime": 1695697200000,
|
||||
"startTime": 1695697200000
|
||||
},
|
||||
{
|
||||
"inQuantity": 200,
|
||||
"totalQuantity": 200,
|
||||
"outQuantity": 200,
|
||||
"okQuantity": 200,
|
||||
"nokQuantity": 0,
|
||||
"recordTime": 1695700800000,
|
||||
"startTime": 1695700800000
|
||||
},
|
||||
{
|
||||
"inQuantity": 200,
|
||||
"totalQuantity": 200,
|
||||
"outQuantity": 200,
|
||||
"okQuantity": 200,
|
||||
"nokQuantity": 0,
|
||||
"recordTime": 1695704400000,
|
||||
"startTime": 1695704400000
|
||||
},
|
||||
{
|
||||
"inQuantity": 200,
|
||||
"totalQuantity": 192,
|
||||
"outQuantity": 200,
|
||||
"okQuantity": 192,
|
||||
"nokQuantity": 8,
|
||||
"recordTime": 1695708000000,
|
||||
"startTime": 1695708000000
|
||||
},
|
||||
{
|
||||
"inQuantity": 200,
|
||||
"totalQuantity": 199,
|
||||
"outQuantity": 200,
|
||||
"okQuantity": 199,
|
||||
"nokQuantity": 1,
|
||||
"recordTime": 1695711600000,
|
||||
"startTime": 1695711600000
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
@ -1,280 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>Document</title>
|
||||
</head>
|
||||
<body>
|
||||
<div
|
||||
id="app"
|
||||
style="width: 100vw; height: 80vh; background: #ccc3; margin: 24px"></div>
|
||||
|
||||
<script src="./echarts.js"></script>
|
||||
<script>
|
||||
function getStartTime(timestamp) {
|
||||
return new Date(new Date(timestamp).toLocaleDateString()).getTime();
|
||||
}
|
||||
|
||||
function renderItem(params, api) {
|
||||
var categoryIndex = api.value(0);
|
||||
var start = api.coord([api.value(1), categoryIndex]);
|
||||
var end = api.coord([api.value(2), categoryIndex]);
|
||||
console.log(`
|
||||
categoryIndex: ${categoryIndex},
|
||||
start: ${start},
|
||||
end: ${end},
|
||||
api.value0: ${api.value(0)}
|
||||
api.value1: ${api.value(1)}
|
||||
api.value2: ${api.value(2)}
|
||||
params.coordSys: ${JSON.stringify(params.coordSys)}
|
||||
api.size: ${api.size([0, 1])}
|
||||
api.style(): ${JSON.stringify(api.style())}
|
||||
`);
|
||||
|
||||
var height = api.size([0, 1])[1] * 2;
|
||||
// 用一个矩形去截取另一个矩形
|
||||
var rectShape = echarts.graphic.clipRectByRect(
|
||||
// 被截取矩形
|
||||
{
|
||||
x: start[0],
|
||||
y: start[1] - height / 2,
|
||||
width: end[0] - start[0],
|
||||
height: height,
|
||||
},
|
||||
// 截取矩形
|
||||
{
|
||||
// 截取掉grid以外的部分,实质是计算方块的偏移量
|
||||
x: params.coordSys.x, // {number} grid rect 的 x
|
||||
// y: params.coordSys.y, // {number} grid rect 的 y
|
||||
y: params.coordSys.y - 16, // {number} grid rect 的 y,并多减掉 16 个单位
|
||||
width: params.coordSys.width, // {number} grid rect 的 width
|
||||
height: params.coordSys.height, // {number} grid rect 的 height
|
||||
}
|
||||
);
|
||||
console.log(`------------- ${JSON.stringify(rectShape)} -------------- `)
|
||||
return (
|
||||
rectShape && {
|
||||
type: 'rect',
|
||||
transition: ['shape'],
|
||||
shape: rectShape,
|
||||
style: api.style(),
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
function getXaxisRange(startTime) {
|
||||
return Array(24)
|
||||
.fill(startTime)
|
||||
.map((item, index) => {
|
||||
return new Date(item + index * 3600 * 1000)
|
||||
.toLocaleTimeString()
|
||||
.split(':')
|
||||
.slice(0, 2)
|
||||
.join(':');
|
||||
});
|
||||
}
|
||||
|
||||
function getTodayStart(today) {
|
||||
const [y, m, d] = [
|
||||
today.getFullYear(),
|
||||
today.getMonth(),
|
||||
today.getDate(),
|
||||
];
|
||||
return new Date(y, m, d).getTime();
|
||||
}
|
||||
|
||||
/** 颜色配置 */
|
||||
const types = [
|
||||
{ name: '运行', color: '#288AFF' },
|
||||
{ name: '故障', color: '#FC9C91' },
|
||||
{ name: '计划停机', color: '#FFDC94' },
|
||||
{ name: '空白', color: '#F2F4F9' },
|
||||
];
|
||||
|
||||
const option = {
|
||||
tooltip: {
|
||||
trigger: 'axis',
|
||||
axisPointer: {
|
||||
type: 'none',
|
||||
// label: {
|
||||
// backgroundColor: '#6a7985',
|
||||
// },
|
||||
},
|
||||
formatter: (params) => {
|
||||
// console.log('formatter', params)
|
||||
// return `
|
||||
// <div>${new Date(params[0].value[1]).toLocaleString()} ~ ${new Date(params[0].value[2]).toLocaleString()}</div>
|
||||
// <div style="display: flex; justify-content: space-between; min-width: 128px; align-items: center;">
|
||||
// <span>${params[0].seriesName}</span>
|
||||
// <span>${params[0].name}</span>
|
||||
// </div>
|
||||
// `
|
||||
return `
|
||||
<h1 style="font-size: 18px; font-weight: 600; letter-spacing: 1px;">${params[0].name} <span style="display: inline-block; margin-left: 8px; width: 12px; height: 12px; border-radius: 50%; background: ${params[0].color} "></span></h1>
|
||||
<div>${new Date(params[0].value[1]).toLocaleString()} ~ ${new Date(params[0].value[2]).toLocaleString()}</div>
|
||||
`
|
||||
}
|
||||
},
|
||||
grid: [
|
||||
{
|
||||
id: 0,
|
||||
top: 10,
|
||||
left: 128,
|
||||
right: 64,
|
||||
height: 56,
|
||||
},
|
||||
// {
|
||||
// id: 1,
|
||||
// top: 80,
|
||||
// height: 56,
|
||||
// },
|
||||
],
|
||||
xAxis: [
|
||||
{
|
||||
id: 0,
|
||||
gridIndex: 0,
|
||||
axisTick: {
|
||||
alignWithLabel: true,
|
||||
inside: true,
|
||||
},
|
||||
type: 'time',
|
||||
min: getTodayStart(new Date()), // <===
|
||||
max: getStartTime(new Date().getTime() + 3600 * 24 * 1000), // <===
|
||||
splitNumber: 10,
|
||||
axisLabel: {
|
||||
margin: 12,
|
||||
// rotate: -15,
|
||||
formatter: function (val) {
|
||||
return new Date(val)
|
||||
.toLocaleTimeString()
|
||||
.split(':')
|
||||
.slice(0, 2)
|
||||
.join(':');
|
||||
},
|
||||
},
|
||||
boundaryGap: false,
|
||||
// data: getXaxisRange(getTodayStart(new Date())),
|
||||
},
|
||||
{
|
||||
id: 1,
|
||||
gridIndex: 0,
|
||||
axisLabel: { show: false },
|
||||
axisLine: { show: false },
|
||||
},
|
||||
],
|
||||
yAxis: [
|
||||
// 主y轴
|
||||
{
|
||||
id: 0,
|
||||
gridIndex: 0,
|
||||
type: 'value',
|
||||
splitLine: { show: false },
|
||||
name: '设备1',
|
||||
nameLocation: 'center',
|
||||
nameGap: 56,
|
||||
nameRotate: 0,
|
||||
nameTextStyle: {
|
||||
fontSize: 18,
|
||||
},
|
||||
axisLine: {
|
||||
show: true,
|
||||
lineStyle: {},
|
||||
},
|
||||
axisLabel: { show: false },
|
||||
axisTick: { show: false },
|
||||
},
|
||||
// 辅y轴
|
||||
{
|
||||
id: 1,
|
||||
gridIndex: 0,
|
||||
type: 'value',
|
||||
splitLine: { show: false },
|
||||
axisLabel: { show: false },
|
||||
axisTick: { show: false },
|
||||
},
|
||||
],
|
||||
series: [
|
||||
{
|
||||
name: '设备1',
|
||||
xAxisIndex: 0,
|
||||
yAxisIndex: 0,
|
||||
type: 'custom',
|
||||
renderItem: renderItem,
|
||||
itemStyle: {
|
||||
opacity: 0.8,
|
||||
},
|
||||
encode: {
|
||||
x: [1, 2],
|
||||
y: 0,
|
||||
},
|
||||
//function getTimestamp(point) {
|
||||
// const t = new Date();
|
||||
// const [y,m,d] = [t.getFullYear(),t.getMonth(),t.getDate()]
|
||||
// const [h,M] = point.split(':')
|
||||
// return new Date(y,m,d,h,M,0,0).getTime()
|
||||
//}
|
||||
data: [
|
||||
{
|
||||
// 01:00 ~ 05:00
|
||||
name: '运行',
|
||||
value: [0, 1695747600000, 1695762000000, 0],
|
||||
itemStyle: {
|
||||
normal: {
|
||||
color: types[0].color,
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
// 5:00 ~ 8:00
|
||||
name: '故障',
|
||||
value: [0, 1695762000000, 1695772800000, 0],
|
||||
itemStyle: {
|
||||
normal: {
|
||||
color: types[1].color,
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
// 8:00 ~ 8:39
|
||||
name: '计划停机',
|
||||
value: [0, 1695772800000, 1695775140000, 0],
|
||||
itemStyle: {
|
||||
normal: {
|
||||
color: types[2].color,
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
// 08:39 ~ 18:00
|
||||
name: '运行',
|
||||
value: [0, 1695775140000, 1695808800000, 0],
|
||||
itemStyle: {
|
||||
normal: {
|
||||
color: types[0].color,
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
// 18:00 ~ 23:30
|
||||
name: '计划停机',
|
||||
value: [0, 1695808800000, 1695828600000, 0],
|
||||
itemStyle: {
|
||||
normal: {
|
||||
color: types[2].color,
|
||||
},
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
};
|
||||
|
||||
const el = document.getElementById('app');
|
||||
const myChart = echarts.init(el);
|
||||
|
||||
console.log('mychart', myChart);
|
||||
myChart.setOption(option);
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
@ -1,235 +0,0 @@
|
||||
import * as echarts from 'echarts';
|
||||
|
||||
|
||||
function renderItem(params, api) {
|
||||
var categoryIndex = api.value(0);
|
||||
var start = api.coord([api.value(1), categoryIndex]);
|
||||
var end = api.coord([api.value(2), categoryIndex]);
|
||||
var height = api.size([0, 1])[1] * 1;
|
||||
// var height = api.size([0, 1])[1] * 0.8;
|
||||
// var height = 56;
|
||||
var rectShape = echarts.graphic.clipRectByRect(
|
||||
{
|
||||
x: start[0],
|
||||
y: start[1] - height / 2,
|
||||
width: end[0] - start[0],
|
||||
height: height,
|
||||
},
|
||||
{
|
||||
x: params.coordSys.x,
|
||||
y: params.coordSys.y,
|
||||
width: params.coordSys.width,
|
||||
height: params.coordSys.height,
|
||||
}
|
||||
);
|
||||
return (
|
||||
rectShape && {
|
||||
type: 'rect',
|
||||
transition: ['shape'],
|
||||
shape: rectShape,
|
||||
style: api.style(),
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/** 颜色配置 */
|
||||
const types = [
|
||||
{ name: '运行', color: '#5ad8a6' },
|
||||
{ name: '故障', color: '#fc9c91' },
|
||||
{ name: '计划停机', color: '#000' },
|
||||
];
|
||||
|
||||
|
||||
/** 从时间戳获取 startTime */
|
||||
function getStartTime(timestamp) {
|
||||
return new Date(new Date(timestamp).toLocaleDateString()).getTime();
|
||||
}
|
||||
|
||||
|
||||
|
||||
export default class GanttGraph {
|
||||
constructor(el) {
|
||||
this.chart = null;
|
||||
this.el = el;
|
||||
/** 默认配置 */
|
||||
this.grid = {
|
||||
top: 32,
|
||||
left: 128,
|
||||
right: 128,
|
||||
bottom: 64,
|
||||
}
|
||||
this.tooltip = {
|
||||
formatter: function (params) {
|
||||
return (
|
||||
params.marker +
|
||||
params.name +
|
||||
': ' +
|
||||
new Date(params.value[1]).toLocaleTimeString() +
|
||||
' - ' +
|
||||
new Date(params.value[2]).toLocaleTimeString()
|
||||
);
|
||||
},
|
||||
}
|
||||
this.xAxis = {
|
||||
type: 'time',
|
||||
min: getStartTime(1691568181000), // <===
|
||||
max: getStartTime(1691568181000 + 3600 * 24 * 1000), // <===
|
||||
splitNumber: 10,
|
||||
axisLabel: {
|
||||
// rotate: -15,
|
||||
formatter: function (val) {
|
||||
return new Date(val).toLocaleTimeString();
|
||||
},
|
||||
},
|
||||
axisTick: {
|
||||
show: true,
|
||||
},
|
||||
splitLine: {
|
||||
show: false,
|
||||
},
|
||||
}
|
||||
this.yAxis = [
|
||||
{
|
||||
interval: 40,
|
||||
axisLine: {
|
||||
lineStyle: {
|
||||
color: '',
|
||||
},
|
||||
},
|
||||
axisLabel: {
|
||||
fontSize: 18,
|
||||
},
|
||||
axisTick: {
|
||||
show: false,
|
||||
},
|
||||
splitLine: {
|
||||
show: true,
|
||||
},
|
||||
// data: [], // <====
|
||||
data: ['设备1', '设备2', '设备3', '设备4'],
|
||||
},
|
||||
{
|
||||
axisLine: {
|
||||
lineStyle: {
|
||||
color: '',
|
||||
},
|
||||
},
|
||||
data: [],
|
||||
},
|
||||
]
|
||||
this.series = [
|
||||
{
|
||||
type: 'custom',
|
||||
renderItem: renderItem,
|
||||
itemStyle: {
|
||||
opacity: 0.8,
|
||||
},
|
||||
encode: {
|
||||
x: [1, 2],
|
||||
y: 0,
|
||||
},
|
||||
// data: [], // <===
|
||||
data: [
|
||||
{
|
||||
name: '运行',
|
||||
value: [
|
||||
0,
|
||||
1691568181000,
|
||||
1691568181000 + 60 * 60 * 1000,
|
||||
60 * 10 * 1000,
|
||||
],
|
||||
itemStyle: {
|
||||
normal: {
|
||||
color: types[0].color,
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
name: '计划停机',
|
||||
value: [
|
||||
0,
|
||||
1691578581000,
|
||||
1691578581000 + 10 * 60 * 1000,
|
||||
60 * 10 * 1000,
|
||||
],
|
||||
itemStyle: {
|
||||
normal: {
|
||||
color: types[2].color,
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
name: '运行',
|
||||
value: [
|
||||
1,
|
||||
1691568181000,
|
||||
1691568181000 + 60 * 60 * 1000,
|
||||
60 * 10 * 1000,
|
||||
],
|
||||
itemStyle: {
|
||||
normal: {
|
||||
color: types[0].color,
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
name: '故障',
|
||||
value: [
|
||||
2,
|
||||
1691538181000,
|
||||
1691538181000 + 60 * 60 * 1000,
|
||||
60 * 10 * 1000,
|
||||
],
|
||||
itemStyle: {
|
||||
normal: {
|
||||
color: types[1].color,
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
name: '运行',
|
||||
value: [
|
||||
2,
|
||||
1691578181000,
|
||||
1691578181000 + 90 * 60 * 1000,
|
||||
90 * 10 * 1000,
|
||||
],
|
||||
itemStyle: {
|
||||
normal: {
|
||||
color: types[0].color,
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
name: '计划停机',
|
||||
value: [
|
||||
3,
|
||||
1691528181000,
|
||||
1691528181000 + 240 * 60 * 1000,
|
||||
240 * 10 * 1000,
|
||||
],
|
||||
itemStyle: {
|
||||
normal: {
|
||||
color: types[2].color,
|
||||
},
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
]
|
||||
}
|
||||
|
||||
init() {
|
||||
this.chart = echarts.init(this.el);
|
||||
this.chart.setOption(this.getOption())
|
||||
}
|
||||
|
||||
getOption() {
|
||||
const { grid, xAxis, yAxis, series, tooltip } = this;
|
||||
return {
|
||||
grid, xAxis, yAxis, series, tooltip
|
||||
}
|
||||
}
|
||||
}
|
@ -24,7 +24,6 @@
|
||||
:formConfigs="searchBarFormConfig"
|
||||
ref="search-bar"
|
||||
:remove-blue="true"
|
||||
@select-changed="handleSearchBarSelectChange"
|
||||
@headBtnClick="handleSearchBarBtnClick" />
|
||||
</el-row>
|
||||
|
||||
@ -78,7 +77,41 @@
|
||||
class="graphs"
|
||||
v-show="graphList.length"
|
||||
id="status-chart"
|
||||
style="height: 1px; flex: 1"></div>
|
||||
style="height: 1px; flex: 1">
|
||||
<!-- <div class="graph" v-for="eq in graphList" :key="eq.key">
|
||||
<h2 class="graph-title">{{ eq.key }}</h2>
|
||||
|
||||
<div class="graph-content">
|
||||
<el-popover
|
||||
trigger="hover"
|
||||
v-for="blc in eq"
|
||||
:key="blc.startTime"
|
||||
:title="
|
||||
blc.status == 0
|
||||
? '运行'
|
||||
: blc.status == 2
|
||||
? '故障'
|
||||
: '计划停机'
|
||||
"
|
||||
placement="top"
|
||||
:content="new Date(blc.startTime).toLocaleTimeString()">
|
||||
<div
|
||||
slot="reference"
|
||||
:key="blc.startTime + '__div'"
|
||||
class="graph-item-fixed tick"
|
||||
:class="{
|
||||
running: blc.status == 0,
|
||||
fault: blc.status == 2,
|
||||
stop: blc.status == 1,
|
||||
}"
|
||||
:style="{ height: '32px', width: blc.duration * 2 + 'px' }"
|
||||
:data-time="
|
||||
new Date(blc.startTime).toLocaleTimeString()
|
||||
"></div>
|
||||
</el-popover>
|
||||
</div>
|
||||
</div> -->
|
||||
</div>
|
||||
<h2 v-if="!graphList || graphList.length == 0" class="no-data-bg"></h2>
|
||||
</div>
|
||||
</el-row>
|
||||
@ -107,8 +140,46 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
// import * as echarts from 'echarts';
|
||||
import Gantt from './gantt';
|
||||
import * as echarts from 'echarts';
|
||||
|
||||
var types = [
|
||||
{ name: '运行', color: '#5ad8a6' },
|
||||
{ name: '故障', color: '#fc9c91' },
|
||||
{ name: '计划停机', color: '#000' },
|
||||
];
|
||||
function getStartTime(timestamp) {
|
||||
return new Date(new Date(timestamp).toLocaleDateString()).getTime();
|
||||
}
|
||||
function renderItem(params, api) {
|
||||
var categoryIndex = api.value(0);
|
||||
var start = api.coord([api.value(1), categoryIndex]);
|
||||
var end = api.coord([api.value(2), categoryIndex]);
|
||||
var height = api.size([0, 1])[1] * 1;
|
||||
// var height = api.size([0, 1])[1] * 0.8;
|
||||
// var height = 56;
|
||||
var rectShape = echarts.graphic.clipRectByRect(
|
||||
{
|
||||
x: start[0],
|
||||
y: start[1] - height / 2,
|
||||
width: end[0] - start[0],
|
||||
height: height,
|
||||
},
|
||||
{
|
||||
x: params.coordSys.x,
|
||||
y: params.coordSys.y,
|
||||
width: params.coordSys.width,
|
||||
height: params.coordSys.height,
|
||||
}
|
||||
);
|
||||
return (
|
||||
rectShape && {
|
||||
type: 'rect',
|
||||
transition: ['shape'],
|
||||
shape: rectShape,
|
||||
style: api.style(),
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
export default {
|
||||
name: 'SGStatus',
|
||||
@ -124,7 +195,6 @@ export default {
|
||||
placeholder: '请选择产线',
|
||||
selectOptions: [],
|
||||
param: 'lineId',
|
||||
onchange: true,
|
||||
},
|
||||
{
|
||||
type: 'select',
|
||||
@ -137,13 +207,18 @@ export default {
|
||||
{
|
||||
type: 'datePicker',
|
||||
label: '时间段',
|
||||
// dateType: 'daterange', // datetimerange
|
||||
dateType: 'date',
|
||||
// format: 'yyyy-MM-dd HH:mm:ss',
|
||||
format: 'yyyy-MM-dd',
|
||||
valueFormat: 'yyyy-MM-dd HH:mm:ss',
|
||||
// valueFormat: 'timestamp',
|
||||
rangeSeparator: '-',
|
||||
// startPlaceholder: '开始日期',
|
||||
// endPlaceholder: '结束日期',
|
||||
placeholder: '选择日期',
|
||||
// defaultTime: ['00:00:00', '23:59:59'],
|
||||
param: 'recordTime',
|
||||
required: true,
|
||||
},
|
||||
{
|
||||
type: 'button',
|
||||
@ -171,8 +246,6 @@ export default {
|
||||
graphList: [],
|
||||
open: false,
|
||||
eqList: [],
|
||||
startTime: null,
|
||||
gantt: null
|
||||
// demo: [
|
||||
// [
|
||||
// {
|
||||
@ -193,6 +266,176 @@ export default {
|
||||
// },
|
||||
// ],
|
||||
// ],
|
||||
chartOption: {
|
||||
grid: {
|
||||
top: 32,
|
||||
left: 128,
|
||||
right: 128,
|
||||
bottom: 64,
|
||||
},
|
||||
tooltip: {
|
||||
// show: false,
|
||||
formatter: function (params) {
|
||||
return (
|
||||
params.marker +
|
||||
params.name +
|
||||
': ' +
|
||||
new Date(params.value[1]).toLocaleTimeString() +
|
||||
' - ' +
|
||||
new Date(params.value[2]).toLocaleTimeString()
|
||||
);
|
||||
},
|
||||
},
|
||||
xAxis: {
|
||||
type: 'time',
|
||||
min: getStartTime(1691568181000), // <===
|
||||
max: getStartTime(1691568181000 + 3600 * 24 * 1000), // <===
|
||||
splitNumber: 10,
|
||||
axisLabel: {
|
||||
// rotate: -15,
|
||||
formatter: function (val) {
|
||||
return new Date(val).toLocaleTimeString();
|
||||
},
|
||||
},
|
||||
axisTick: {
|
||||
show: true,
|
||||
},
|
||||
splitLine: {
|
||||
show: false,
|
||||
},
|
||||
},
|
||||
yAxis: [
|
||||
{
|
||||
interval: 40,
|
||||
axisLine: {
|
||||
// show: false,
|
||||
lineStyle: {
|
||||
color: '',
|
||||
},
|
||||
},
|
||||
axisLabel: {
|
||||
fontSize: 18,
|
||||
},
|
||||
axisTick: {
|
||||
show: false,
|
||||
},
|
||||
splitLine: {
|
||||
show: true,
|
||||
},
|
||||
// data: [], // <====
|
||||
data: ['设备1', '设备2', '设备3', '设备4'],
|
||||
},
|
||||
{
|
||||
axisLine: {
|
||||
// show: false,
|
||||
lineStyle: {
|
||||
color: '',
|
||||
},
|
||||
},
|
||||
data: [],
|
||||
},
|
||||
],
|
||||
series: [
|
||||
{
|
||||
type: 'custom',
|
||||
renderItem: renderItem,
|
||||
itemStyle: {
|
||||
opacity: 0.8,
|
||||
},
|
||||
encode: {
|
||||
x: [1, 2],
|
||||
y: 0,
|
||||
},
|
||||
// data: [], // <===
|
||||
data: [
|
||||
{
|
||||
name: '运行',
|
||||
value: [
|
||||
0,
|
||||
1691568181000,
|
||||
1691568181000 + 60 * 60 * 1000,
|
||||
60 * 10 * 1000,
|
||||
],
|
||||
itemStyle: {
|
||||
normal: {
|
||||
color: types[0].color,
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
name: '计划停机',
|
||||
value: [
|
||||
0,
|
||||
1691578581000,
|
||||
1691578581000 + 10 * 60 * 1000,
|
||||
60 * 10 * 1000,
|
||||
],
|
||||
itemStyle: {
|
||||
normal: {
|
||||
color: types[2].color,
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
name: '运行',
|
||||
value: [
|
||||
1,
|
||||
1691568181000,
|
||||
1691568181000 + 60 * 60 * 1000,
|
||||
60 * 10 * 1000,
|
||||
],
|
||||
itemStyle: {
|
||||
normal: {
|
||||
color: types[0].color,
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
name: '故障',
|
||||
value: [
|
||||
2,
|
||||
1691538181000,
|
||||
1691538181000 + 60 * 60 * 1000,
|
||||
60 * 10 * 1000,
|
||||
],
|
||||
itemStyle: {
|
||||
normal: {
|
||||
color: types[1].color,
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
name: '运行',
|
||||
value: [
|
||||
2,
|
||||
1691578181000,
|
||||
1691578181000 + 90 * 60 * 1000,
|
||||
90 * 10 * 1000,
|
||||
],
|
||||
itemStyle: {
|
||||
normal: {
|
||||
color: types[0].color,
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
name: '计划停机',
|
||||
value: [
|
||||
3,
|
||||
1691528181000,
|
||||
1691528181000 + 240 * 60 * 1000,
|
||||
240 * 10 * 1000,
|
||||
],
|
||||
itemStyle: {
|
||||
normal: {
|
||||
color: types[2].color,
|
||||
},
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
};
|
||||
},
|
||||
computed: {},
|
||||
@ -200,7 +443,7 @@ export default {
|
||||
this.initProductline();
|
||||
this.initWorksection();
|
||||
this.initEquipment();
|
||||
// this.getList();
|
||||
this.getList();
|
||||
},
|
||||
mounted() {},
|
||||
watch: {
|
||||
@ -269,8 +512,7 @@ export default {
|
||||
|
||||
initChart() {
|
||||
const el = document.getElementById('status-chart');
|
||||
this.gantt = new Gantt(el);
|
||||
this.gantt.init();
|
||||
this.chart = echarts.init(el);
|
||||
},
|
||||
|
||||
/** 重置查询条件 */
|
||||
@ -350,42 +592,9 @@ export default {
|
||||
}
|
||||
},
|
||||
|
||||
handleSearchBarSelectChange({ param, value }) {
|
||||
if (!value) {
|
||||
this.searchBarFormConfig[1].selectOptions = [];
|
||||
return;
|
||||
}
|
||||
switch (param) {
|
||||
case 'lineId':
|
||||
this.$axios({
|
||||
url: '/base/workshop-section/listByParentId',
|
||||
method: 'get',
|
||||
params: {
|
||||
id: value,
|
||||
},
|
||||
}).then(({ code, data }) => {
|
||||
if (code == 0) {
|
||||
this.searchBarFormConfig[1].selectOptions = data.map((item) => {
|
||||
return {
|
||||
name: item.name,
|
||||
id: item.id,
|
||||
};
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
handleSearchBarBtnClick({ btnName, ...payload }) {
|
||||
switch (btnName) {
|
||||
case 'search':
|
||||
if (!payload.recordTime || payload.recordTime.length <= 0) {
|
||||
this.$message.error('请选择时间段');
|
||||
return;
|
||||
}
|
||||
|
||||
this.startTime = new Date(payload.recordTime).getTime();
|
||||
|
||||
this.queryParams.lineId = payload.lineId || null;
|
||||
this.queryParams.sectionId = payload.sectionId || null;
|
||||
this.queryParams.equipmentId = payload.equipmentId || null;
|
||||
|
@ -37,7 +37,7 @@
|
||||
@cancel="handleCancel"
|
||||
@confirm="handleConfirm"
|
||||
:before-close="handleCancel"
|
||||
width='50%'
|
||||
width='70%'
|
||||
>
|
||||
<group-class-add ref="classList" @successSubmit="successSubmit" />
|
||||
</base-dialog>
|
||||
@ -108,6 +108,12 @@ export default {
|
||||
],
|
||||
tableProps,
|
||||
tableBtn: [
|
||||
this.$auth.hasPermi('base:group-classes:update')
|
||||
? {
|
||||
type: 'edit',
|
||||
btnName: '编辑'
|
||||
}
|
||||
: undefined,
|
||||
{
|
||||
type: 'cancel',
|
||||
btnName: '作废',
|
||||
@ -122,12 +128,6 @@ export default {
|
||||
]
|
||||
}
|
||||
},
|
||||
this.$auth.hasPermi('base:group-classes:update')
|
||||
? {
|
||||
type: 'edit',
|
||||
btnName: '编辑'
|
||||
}
|
||||
: undefined,
|
||||
this.$auth.hasPermi('base:group-classes:delete')
|
||||
? {
|
||||
type: 'delete',
|
||||
|
@ -1,29 +1,17 @@
|
||||
<template>
|
||||
<el-form ref="form" :rules="rules" label-width="80px" :model="form">
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="班组名称" prop="name">
|
||||
<el-input v-model="form.name"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="班组编码" prop="code">
|
||||
<el-input v-model="form.code" disabled></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="班组人数" prop="num">
|
||||
<el-input-number v-model="form.num" :min="1" :max="99999999" style="width: 100%;"></el-input-number>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="班组组长" prop="leaderName">
|
||||
<el-input v-model="form.leaderName"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-form-item label="班组名称" prop="name">
|
||||
<el-input v-model="form.name"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="班组编码" prop="code">
|
||||
<el-input v-model="form.code" disabled></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="班组人数" prop="num">
|
||||
<el-input-number v-model="form.num" :min="1" :max="99999999" style="width: 100%;"></el-input-number>
|
||||
</el-form-item>
|
||||
<el-form-item label="班组组长" prop="leaderName">
|
||||
<el-input v-model="form.leaderName"></el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</template>
|
||||
<script>
|
||||
|
@ -308,16 +308,6 @@ export default {
|
||||
}
|
||||
</script>
|
||||
<style lang='scss'>
|
||||
.demo-form-inline {
|
||||
.el-date-editor .el-range__icon {
|
||||
font-size: 16px;
|
||||
color: #0B58FF;
|
||||
}
|
||||
.el-input__prefix .el-icon-date {
|
||||
font-size: 16px;
|
||||
color: #0B58FF;
|
||||
}
|
||||
}
|
||||
.groupTeamScheduling {
|
||||
background-color: #F2F4F9;
|
||||
.operationArea {
|
||||
|
@ -1,270 +0,0 @@
|
||||
<!--
|
||||
filename: dialogForm.vue
|
||||
author: liubin
|
||||
date: 2023-09-11 15:55:13
|
||||
description: DialogForm for qualityInspectionRecord only
|
||||
-->
|
||||
|
||||
<template>
|
||||
<el-form
|
||||
ref="form"
|
||||
:model="innerDataForm"
|
||||
label-width="100px"
|
||||
v-loading="formLoading">
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item
|
||||
label="检测内容"
|
||||
prop="inspectionDetId"
|
||||
:rules="[{ required: true, message: '不能为空', trigger: 'blur' }]">
|
||||
<el-select
|
||||
v-model="innerDataForm.inspectionDetId"
|
||||
placeholder="请选择检测内容"
|
||||
filterable
|
||||
clearable
|
||||
@change="handleInspectionDetChange">
|
||||
<el-option
|
||||
v-for="opt in inspectionDetList"
|
||||
:key="opt.value"
|
||||
:label="opt.label"
|
||||
:value="opt.value" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="12">
|
||||
<el-form-item
|
||||
label="来源"
|
||||
prop="source"
|
||||
:rules="[{ required: true, message: '不能为空', trigger: 'blur' }]">
|
||||
<el-select
|
||||
v-model="innerDataForm.source"
|
||||
placeholder="请选择来源"
|
||||
filterable
|
||||
clearable
|
||||
@change="$emit('update', innerDataForm)">
|
||||
<el-option
|
||||
v-for="opt in [
|
||||
{ label: '手动', value: 1 },
|
||||
{ label: '自动', value: 2 },
|
||||
]"
|
||||
:key="opt.value"
|
||||
:label="opt.label"
|
||||
:value="opt.value" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item
|
||||
label="产线"
|
||||
prop="productionLineId"
|
||||
:rules="[{ required: true, message: '不能为空', trigger: 'blur' }]">
|
||||
<el-select
|
||||
v-model="innerDataForm.productionLineId"
|
||||
placeholder="请选择产线"
|
||||
filterable
|
||||
clearable
|
||||
@change="handleProductlineChange">
|
||||
<el-option
|
||||
v-for="opt in productionLineList"
|
||||
:key="opt.value"
|
||||
:label="opt.label"
|
||||
:value="opt.value" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item
|
||||
label="工段"
|
||||
prop="sectionId"
|
||||
:rules="[{ required: true, message: '不能为空', trigger: 'blur' }]">
|
||||
<el-select
|
||||
v-model="innerDataForm.sectionId"
|
||||
placeholder="请选择工段"
|
||||
clearable
|
||||
filterable
|
||||
@change="$emit('update', innerDataForm)">
|
||||
<el-option
|
||||
v-for="opt in sectionList"
|
||||
:key="opt.value"
|
||||
:label="opt.label"
|
||||
:value="opt.value" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="检测人员" prop="checkPerson">
|
||||
<el-input
|
||||
v-model="innerDataForm.checkPerson"
|
||||
clearable
|
||||
@change="$emit('update', innerDataForm)"
|
||||
placeholder="请输入检测人员" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="12">
|
||||
<el-form-item
|
||||
label="检测时间"
|
||||
prop="checkTime"
|
||||
:rules="[{ required: true, message: '不能为空', trigger: 'blur' }]">
|
||||
<el-date-picker
|
||||
v-model="innerDataForm.checkTime"
|
||||
type="datetime"
|
||||
placeholder="请选择检测时间"
|
||||
value-format="timestamp"
|
||||
@change="$emit('update', innerDataForm)"></el-date-picker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row :gutter="20">
|
||||
<el-col>
|
||||
<el-form-item label="描述" prop="explainText">
|
||||
<el-input
|
||||
v-model="innerDataForm.explainText"
|
||||
placeholder="请输入描述信息"
|
||||
@change="$emit('update', innerDataForm)"
|
||||
type="textarea"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col>
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input
|
||||
v-model="innerDataForm.remark"
|
||||
@change="$emit('update', innerDataForm)"
|
||||
placeholder="请输入备注"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'DialogForm',
|
||||
model: {
|
||||
prop: 'dataForm',
|
||||
event: 'update',
|
||||
},
|
||||
emits: ['update'],
|
||||
components: {},
|
||||
props: {
|
||||
dataForm: {
|
||||
type: Object,
|
||||
default: () => ({}),
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
formLoading: true,
|
||||
inspectionDetList: [],
|
||||
productionLineList: [],
|
||||
sectionList: [],
|
||||
innerDataForm: {},
|
||||
cacheInspectionDetList: null,
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
Promise.all([this.getProductLineList(), this.getInspectionDetList()]).then(
|
||||
() => {
|
||||
this.formLoading = false;
|
||||
}
|
||||
);
|
||||
},
|
||||
watch: {
|
||||
// 'innerDataForm.productionLineId': {
|
||||
// handler: async function (plId) {
|
||||
// if (plId) await this.getWorksectionList(plId);
|
||||
// },
|
||||
// immediate: true,
|
||||
// },
|
||||
dataForm: {
|
||||
handler: function (dataForm) {
|
||||
this.innerDataForm = Object.assign({}, dataForm);
|
||||
|
||||
if (dataForm.productionLineId)
|
||||
this.getWorksectionList(dataForm.productionLineId);
|
||||
},
|
||||
immediate: true,
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
/** 模拟透传 ref */
|
||||
validate(cb) {
|
||||
return this.$refs.form.validate(cb);
|
||||
},
|
||||
resetFields(args) {
|
||||
return this.$refs.form.resetFields(args);
|
||||
},
|
||||
|
||||
handleInspectionDetChange(value) {
|
||||
const { id, content } = this.cacheInspectionDetList.find(
|
||||
(item) => item.id == value
|
||||
);
|
||||
this.innerDataForm.inspectionDetId = id;
|
||||
this.innerDataForm.inspectionDetContent = content;
|
||||
this.$emit('update', this.innerDataForm);
|
||||
},
|
||||
|
||||
async handleProductlineChange(id) {
|
||||
// await this.getWorksectionList(id);
|
||||
this.innerDataForm.sectionId = null;
|
||||
this.$emit('update', this.innerDataForm);
|
||||
},
|
||||
|
||||
// getCode
|
||||
async getCode(url) {
|
||||
const response = await this.$axios(url);
|
||||
return response.data;
|
||||
},
|
||||
|
||||
// 获取产线列表
|
||||
async getProductLineList() {
|
||||
const response = await this.$axios('/base/production-line/listAll');
|
||||
this.productionLineList = response.data.map((item) => ({
|
||||
label: item.name,
|
||||
value: item.id,
|
||||
}));
|
||||
},
|
||||
|
||||
// 获取检测内容列表
|
||||
async getInspectionDetList() {
|
||||
const response = await this.$axios(
|
||||
'/base/quality-inspection-det/listAll'
|
||||
);
|
||||
this.cacheInspectionDetList = response.data;
|
||||
this.inspectionDetList = response.data.map((item) => ({
|
||||
label: item.content,
|
||||
value: item.id,
|
||||
}));
|
||||
},
|
||||
|
||||
// 获取工段列表
|
||||
async getWorksectionList(plId) {
|
||||
const response = await this.$axios(
|
||||
'/base/workshop-section/listByParentId',
|
||||
{
|
||||
params: {
|
||||
id: plId,
|
||||
},
|
||||
}
|
||||
);
|
||||
this.sectionList = response.data.map((item) => ({
|
||||
label: item.name,
|
||||
value: item.id,
|
||||
}));
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.el-date-editor,
|
||||
.el-select {
|
||||
width: 100%;
|
||||
}
|
||||
</style>
|
@ -39,7 +39,7 @@
|
||||
@close="cancel"
|
||||
@cancel="cancel"
|
||||
@confirm="submitForm">
|
||||
<DialogForm v-if="open" ref="form" v-model="form" />
|
||||
<DialogForm v-if="open" ref="form" :dataForm="form" :rows="rows" />
|
||||
</base-dialog>
|
||||
</div>
|
||||
</template>
|
||||
@ -53,15 +53,14 @@ import {
|
||||
getQualityInspectionRecordPage,
|
||||
exportQualityInspectionRecordExcel,
|
||||
} from '@/api/monitoring/qualityInspectionRecord';
|
||||
// import Editor from '@/components/Editor';
|
||||
import Editor from '@/components/Editor';
|
||||
import moment from 'moment';
|
||||
import DialogForm from './dialogForm.vue';
|
||||
|
||||
import basicPageMixin from '@/mixins/lb/basicPageMixin';
|
||||
export default {
|
||||
name: 'QualityInspectionRecord',
|
||||
components: {
|
||||
DialogForm,
|
||||
Editor,
|
||||
},
|
||||
mixins: [basicPageMixin],
|
||||
data() {
|
||||
@ -273,38 +272,32 @@ export default {
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
// this.getProductLineList();
|
||||
this.getProductLineList();
|
||||
},
|
||||
watch: {
|
||||
form: {
|
||||
handler: function (val) {
|
||||
console.log('form change:', val);
|
||||
},
|
||||
deep: true
|
||||
}
|
||||
// 注册弹窗里产线改变时的监听事件
|
||||
// 'form.productionLineId': {
|
||||
// handler: function (val) {
|
||||
// if (val == null) return;
|
||||
// this.$axios('/base/workshop-section/listByParentId', {
|
||||
// params: {
|
||||
// id: val,
|
||||
// },
|
||||
// }).then((response) => {
|
||||
// this.$set(
|
||||
// this.rows[1][1], // 这里索引是硬编码,所以当 this.rows 里数据顺序改变时,此处也要改
|
||||
// 'options',
|
||||
// response.data.map((item) => {
|
||||
// return {
|
||||
// label: item.name,
|
||||
// value: item.id,
|
||||
// };
|
||||
// })
|
||||
// );
|
||||
// });
|
||||
// },
|
||||
// immediate: true,
|
||||
// },
|
||||
'form.productionLineId': {
|
||||
handler: function (val) {
|
||||
if (val == null) return;
|
||||
this.$axios('/base/workshop-section/listByParentId', {
|
||||
params: {
|
||||
id: val,
|
||||
},
|
||||
}).then((response) => {
|
||||
this.$set(
|
||||
this.rows[1][1], // 这里索引是硬编码,所以当 this.rows 里数据顺序改变时,此处也要改
|
||||
'options',
|
||||
response.data.map((item) => {
|
||||
return {
|
||||
label: item.name,
|
||||
value: item.id,
|
||||
};
|
||||
})
|
||||
);
|
||||
});
|
||||
},
|
||||
immediate: true,
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
/** 获取搜索栏的产线列表 */
|
||||
@ -373,11 +366,7 @@ export default {
|
||||
const id = row.id;
|
||||
getQualityInspectionRecord(id).then((response) => {
|
||||
/** 因为后端返回的时间是时间戳格式,需转换 */
|
||||
const info = {}
|
||||
Object.keys(this.form).forEach(key => {
|
||||
info[key] = response.data[key]
|
||||
});
|
||||
this.form = info;
|
||||
this.form = this.filterData(response.data, Object.keys(this.form));
|
||||
this.open = true;
|
||||
this.title = '修改质量检查信息记录表';
|
||||
});
|
||||
|
@ -147,7 +147,7 @@ export default {
|
||||
},
|
||||
yAxis: {
|
||||
type: 'value',
|
||||
name: '检测数量',
|
||||
name: '单位/片',
|
||||
nameTextStyle: {
|
||||
color: '#999',
|
||||
fontSize: 14,
|
||||
|
235
yarn.lock
235
yarn.lock
@ -981,7 +981,7 @@
|
||||
"resolved" "https://registry.npmmirror.com/@babel/regjsgen/-/regjsgen-0.8.0.tgz"
|
||||
"version" "0.8.0"
|
||||
|
||||
"@babel/runtime@^7.11.0", "@babel/runtime@^7.12.5", "@babel/runtime@^7.14.0", "@babel/runtime@^7.3.1", "@babel/runtime@^7.8.4":
|
||||
"@babel/runtime@^7.11.0", "@babel/runtime@^7.3.1", "@babel/runtime@^7.8.4":
|
||||
"integrity" "sha512-wDb5pWm4WDdF6LFUde3Jl8WzPA+3ZbxYqkC6xAXuD3irdEHN1k0NfTRrJD8ZD378SJ61miMLCqIOXYhd8x+AJQ=="
|
||||
"resolved" "https://registry.npmmirror.com/@babel/runtime/-/runtime-7.22.6.tgz"
|
||||
"version" "7.22.6"
|
||||
@ -1323,11 +1323,6 @@
|
||||
"resolved" "https://registry.npmmirror.com/@types/qs/-/qs-6.9.7.tgz"
|
||||
"version" "6.9.7"
|
||||
|
||||
"@types/raf@^3.4.0":
|
||||
"integrity" "sha512-1jJ3OO8FXHCcuVXCuO1EMC/MjDuT6/cxgsMw/UebkO9afnL99Y5QTpUjk7+flK4G5FzBVJEgDKL5eFtoxJs9MQ=="
|
||||
"resolved" "https://registry.npmmirror.com/@types/raf/-/raf-3.4.1.tgz"
|
||||
"version" "3.4.1"
|
||||
|
||||
"@types/range-parser@*":
|
||||
"integrity" "sha512-EEhsLsD6UsDM1yFhAvy0Cjr6VwmpMWqFBCb9w07wVugF7w9nfajxLuVmngTIpgS6svCnm6Vaw+MZhoDCKnOfsw=="
|
||||
"resolved" "https://registry.npmmirror.com/@types/range-parser/-/range-parser-1.2.4.tgz"
|
||||
@ -1942,6 +1937,7 @@
|
||||
"resolved" "https://registry.npmmirror.com/acorn/-/acorn-8.10.0.tgz"
|
||||
"version" "8.10.0"
|
||||
|
||||
<<<<<<< HEAD
|
||||
"acorn@^8.9.0":
|
||||
"integrity" "sha512-F0SAmZ8iUtS//m8DmCTA0jlh6TDKkHQyK6xc6V4KDTyZKA9dnvX9/3sRTVQrWm79glUAZbnmmNcdYwUIHWVybw=="
|
||||
"resolved" "https://registry.npmmirror.com/acorn/-/acorn-8.10.0.tgz"
|
||||
@ -1961,6 +1957,17 @@
|
||||
"integrity" "sha512-rsx8pfx7wJsn+ziYbpJ8XA5c93hKAtBCrfydxJqJCMT+qfjipd/B5wC2xHtBcoxyvlqJcpeAo3K55t0lXOn9yQ=="
|
||||
"resolved" "https://registry.npmmirror.com/aes-decrypter/-/aes-decrypter-1.0.3.tgz"
|
||||
"version" "1.0.3"
|
||||
=======
|
||||
adler-32@~1.3.0:
|
||||
version "1.3.1"
|
||||
resolved "https://registry.npmmirror.com/adler-32/-/adler-32-1.3.1.tgz#1dbf0b36dda0012189a32b3679061932df1821e2"
|
||||
integrity sha512-ynZ4w/nUUv5rrsR8UUGoe1VC9hZj6V5hU9Qw1HlMDJGEJw5S7TfTErWTjMys6M7vr0YWcPqs3qAr4ss0nDfP+A==
|
||||
|
||||
aes-decrypter@1.0.3:
|
||||
version "1.0.3"
|
||||
resolved "https://registry.npmmirror.com/aes-decrypter/-/aes-decrypter-1.0.3.tgz"
|
||||
integrity sha512-rsx8pfx7wJsn+ziYbpJ8XA5c93hKAtBCrfydxJqJCMT+qfjipd/B5wC2xHtBcoxyvlqJcpeAo3K55t0lXOn9yQ==
|
||||
>>>>>>> test
|
||||
dependencies:
|
||||
"pkcs7" "^0.2.3"
|
||||
|
||||
@ -2411,11 +2418,6 @@
|
||||
"mixin-deep" "^1.2.0"
|
||||
"pascalcase" "^0.1.1"
|
||||
|
||||
"base64-arraybuffer@^1.0.2":
|
||||
"integrity" "sha512-I3yl4r9QB5ZRY3XuJVEPfc2XhZO6YweFPI+UovAzn+8/hb3oJ6lnysaFcjVpkCPfVWFUDvoZ8kmVDP7WyRtYtQ=="
|
||||
"resolved" "https://registry.npmmirror.com/base64-arraybuffer/-/base64-arraybuffer-1.0.2.tgz"
|
||||
"version" "1.0.2"
|
||||
|
||||
"base64-js@^1.0.2":
|
||||
"integrity" "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA=="
|
||||
"resolved" "https://registry.npmmirror.com/base64-js/-/base64-js-1.5.1.tgz"
|
||||
@ -2698,11 +2700,6 @@
|
||||
"node-releases" "^2.0.12"
|
||||
"update-browserslist-db" "^1.0.11"
|
||||
|
||||
"btoa@^1.2.1":
|
||||
"integrity" "sha512-SB4/MIGlsiVkMcHmT+pSmIPoNDoHg+7cMzmt3Uxt628MTz2487DKSqK/fuhFBrkuqrYv5UCEnACpF4dTFNKc/g=="
|
||||
"resolved" "https://registry.npmmirror.com/btoa/-/btoa-1.2.1.tgz"
|
||||
"version" "1.2.1"
|
||||
|
||||
"buffer-from@^1.0.0":
|
||||
"integrity" "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ=="
|
||||
"resolved" "https://registry.npmmirror.com/buffer-from/-/buffer-from-1.1.2.tgz"
|
||||
@ -2894,20 +2891,6 @@
|
||||
"resolved" "https://registry.npmmirror.com/caniuse-lite/-/caniuse-lite-1.0.30001517.tgz"
|
||||
"version" "1.0.30001517"
|
||||
|
||||
"canvg@^3.0.6":
|
||||
"integrity" "sha512-qwR2FRNO9NlzTeKIPIKpnTY6fqwuYSequ8Ru8c0YkYU7U0oW+hLUvWadLvAu1Rl72OMNiFhoLu4f8eUjQ7l/+Q=="
|
||||
"resolved" "https://registry.npmmirror.com/canvg/-/canvg-3.0.10.tgz"
|
||||
"version" "3.0.10"
|
||||
dependencies:
|
||||
"@babel/runtime" "^7.12.5"
|
||||
"@types/raf" "^3.4.0"
|
||||
"core-js" "^3.8.3"
|
||||
"raf" "^3.4.1"
|
||||
"regenerator-runtime" "^0.13.7"
|
||||
"rgbcolor" "^1.0.1"
|
||||
"stackblur-canvas" "^2.0.0"
|
||||
"svg-pathdata" "^6.0.3"
|
||||
|
||||
"case-sensitive-paths-webpack-plugin@^2.3.0":
|
||||
"integrity" "sha512-roIFONhcxog0JSSWbvVAh3OocukmSgpqOH6YpMkCvav/ySIV3JKg4Dc8vYtQjYi/UxpNE36r/9v+VqTQqgkYmw=="
|
||||
"resolved" "https://registry.npmmirror.com/case-sensitive-paths-webpack-plugin/-/case-sensitive-paths-webpack-plugin-2.4.0.tgz"
|
||||
@ -2918,10 +2901,25 @@
|
||||
"resolved" "https://registry.npmmirror.com/caseless/-/caseless-0.12.0.tgz"
|
||||
"version" "0.12.0"
|
||||
|
||||
<<<<<<< HEAD
|
||||
"cfb@~1.2.1":
|
||||
"integrity" "sha512-KfdUZsSOw19/ObEWasvBP/Ac4reZvAGauZhs6S/gqNhXhI7cKwvlH7ulj+dOEYnca4bm4SGo8C1bTAQvnTjgQA=="
|
||||
"resolved" "https://registry.npmmirror.com/cfb/-/cfb-1.2.2.tgz"
|
||||
"version" "1.2.2"
|
||||
=======
|
||||
cfb@~1.2.1:
|
||||
version "1.2.2"
|
||||
resolved "https://registry.npmmirror.com/cfb/-/cfb-1.2.2.tgz#94e687628c700e5155436dac05f74e08df23bc44"
|
||||
integrity sha512-KfdUZsSOw19/ObEWasvBP/Ac4reZvAGauZhs6S/gqNhXhI7cKwvlH7ulj+dOEYnca4bm4SGo8C1bTAQvnTjgQA==
|
||||
dependencies:
|
||||
adler-32 "~1.3.0"
|
||||
crc-32 "~1.2.0"
|
||||
|
||||
chalk@2.3.0:
|
||||
version "2.3.0"
|
||||
resolved "https://registry.npmmirror.com/chalk/-/chalk-2.3.0.tgz"
|
||||
integrity sha512-Az5zJR2CBujap2rqXGaJKaPHyJ0IrUimvYNX+ncCy8PJP4ltOGTrHUIo097ZaL2zMeKYpiCdqDvS6zdrTFok3Q==
|
||||
>>>>>>> test
|
||||
dependencies:
|
||||
"adler-32" "~1.3.0"
|
||||
"crc-32" "~1.2.0"
|
||||
@ -3213,6 +3211,7 @@
|
||||
"resolved" "https://registry.npmmirror.com/code-brick-zj/-/code-brick-zj-1.0.2.tgz"
|
||||
"version" "1.0.2"
|
||||
|
||||
<<<<<<< HEAD
|
||||
"codepage@~1.15.0":
|
||||
"integrity" "sha512-3g6NUTPd/YtuuGrhMnOMRjFc+LJw/bnMp3+0r/Wcz3IXUuCosKRJvMphm5+Q+bvTVGcJJuRvVLuYba+WojaFaA=="
|
||||
"resolved" "https://registry.npmmirror.com/codepage/-/codepage-1.15.0.tgz"
|
||||
@ -3222,6 +3221,17 @@
|
||||
"integrity" "sha512-lNkKvzEeMBBjUGHZ+q6z9pSJla0KWAQPvtzhEV9+iGyQYG+pBpl7xKDhxoNSOZH2hhv0v5k0y2yAM4o4SjoSkw=="
|
||||
"resolved" "https://registry.npmmirror.com/collection-visit/-/collection-visit-1.0.0.tgz"
|
||||
"version" "1.0.0"
|
||||
=======
|
||||
codepage@~1.15.0:
|
||||
version "1.15.0"
|
||||
resolved "https://registry.npmmirror.com/codepage/-/codepage-1.15.0.tgz#2e00519024b39424ec66eeb3ec07227e692618ab"
|
||||
integrity sha512-3g6NUTPd/YtuuGrhMnOMRjFc+LJw/bnMp3+0r/Wcz3IXUuCosKRJvMphm5+Q+bvTVGcJJuRvVLuYba+WojaFaA==
|
||||
|
||||
collection-visit@^1.0.0:
|
||||
version "1.0.0"
|
||||
resolved "https://registry.npmmirror.com/collection-visit/-/collection-visit-1.0.0.tgz"
|
||||
integrity sha512-lNkKvzEeMBBjUGHZ+q6z9pSJla0KWAQPvtzhEV9+iGyQYG+pBpl7xKDhxoNSOZH2hhv0v5k0y2yAM4o4SjoSkw==
|
||||
>>>>>>> test
|
||||
dependencies:
|
||||
"map-visit" "^1.0.0"
|
||||
"object-visit" "^1.0.0"
|
||||
@ -3518,7 +3528,7 @@
|
||||
"resolved" "https://registry.npmmirror.com/core-js/-/core-js-2.6.12.tgz"
|
||||
"version" "2.6.12"
|
||||
|
||||
"core-js@^3.26.0", "core-js@^3.6.0", "core-js@^3.6.5", "core-js@^3.8.3":
|
||||
"core-js@^3.26.0", "core-js@^3.6.5":
|
||||
"integrity" "sha512-2sKLtfq1eFST7l7v62zaqXacPc7uG8ZAya8ogijLhTtaKNcpzpB4TMoTw2Si+8GYKRwFPMMtUT0263QFWFfqyQ=="
|
||||
"resolved" "https://registry.npmmirror.com/core-js/-/core-js-3.31.1.tgz"
|
||||
"version" "3.31.1"
|
||||
@ -3538,6 +3548,7 @@
|
||||
"js-yaml" "^3.13.1"
|
||||
"parse-json" "^4.0.0"
|
||||
|
||||
<<<<<<< HEAD
|
||||
"crc-32@~1.2.0", "crc-32@~1.2.1":
|
||||
"integrity" "sha512-ROmzCKrTnOwybPcJApAA6WBWij23HVfGVNKqqrZpuyZOHqK2CwHSvpGuyt/UNNvaIjEd8X5IFGp4Mh+Ie1IHJQ=="
|
||||
"resolved" "https://registry.npmmirror.com/crc-32/-/crc-32-1.2.2.tgz"
|
||||
@ -3547,6 +3558,17 @@
|
||||
"integrity" "sha512-mf+TCx8wWc9VpuxfP2ht0iSISLZnt0JgWlrOKZiNqyUZWnjIaCIVNQArMHnCZKfEYRg6IM7A+NeJoN8gf/Ws0A=="
|
||||
"resolved" "https://registry.npmmirror.com/create-ecdh/-/create-ecdh-4.0.4.tgz"
|
||||
"version" "4.0.4"
|
||||
=======
|
||||
crc-32@~1.2.0, crc-32@~1.2.1:
|
||||
version "1.2.2"
|
||||
resolved "https://registry.npmmirror.com/crc-32/-/crc-32-1.2.2.tgz#3cad35a934b8bf71f25ca524b6da51fb7eace2ff"
|
||||
integrity sha512-ROmzCKrTnOwybPcJApAA6WBWij23HVfGVNKqqrZpuyZOHqK2CwHSvpGuyt/UNNvaIjEd8X5IFGp4Mh+Ie1IHJQ==
|
||||
|
||||
create-ecdh@^4.0.0:
|
||||
version "4.0.4"
|
||||
resolved "https://registry.npmmirror.com/create-ecdh/-/create-ecdh-4.0.4.tgz"
|
||||
integrity sha512-mf+TCx8wWc9VpuxfP2ht0iSISLZnt0JgWlrOKZiNqyUZWnjIaCIVNQArMHnCZKfEYRg6IM7A+NeJoN8gf/Ws0A==
|
||||
>>>>>>> test
|
||||
dependencies:
|
||||
"bn.js" "^4.1.0"
|
||||
"elliptic" "^6.5.3"
|
||||
@ -3656,13 +3678,6 @@
|
||||
"postcss" "^7.0.1"
|
||||
"timsort" "^0.3.0"
|
||||
|
||||
"css-line-break@^2.1.0":
|
||||
"integrity" "sha512-FHcKFCZcAha3LwfVBhCQbW2nCNbkZXn7KVUJcsT5/P8YmfsVja0FMPJr0B903j/E69HUphKiV9iQArX8SDYA4w=="
|
||||
"resolved" "https://registry.npmmirror.com/css-line-break/-/css-line-break-2.1.0.tgz"
|
||||
"version" "2.1.0"
|
||||
dependencies:
|
||||
"utrie" "^1.0.2"
|
||||
|
||||
"css-loader@*", "css-loader@^3.5.3":
|
||||
"integrity" "sha512-M5lSukoWi1If8dhQAUCvj4H8vUt3vOnwbQBH9DdTm/s4Ym2B/3dPMtYZeJmq7Q3S3Pa+I94DcZ7pc9bP14cWIQ=="
|
||||
"resolved" "https://registry.npmmirror.com/css-loader/-/css-loader-3.6.0.tgz"
|
||||
@ -4157,11 +4172,6 @@
|
||||
"resolved" "https://registry.npmmirror.com/domify/-/domify-1.4.1.tgz"
|
||||
"version" "1.4.1"
|
||||
|
||||
"dompurify@^2.2.0":
|
||||
"integrity" "sha512-kxxKlPEDa6Nc5WJi+qRgPbOAbgTpSULL+vI3NUXsZMlkJxTqYI9wg5ZTay2sFrdZRWHPWNi+EdAhcJf81WtoMQ=="
|
||||
"resolved" "https://registry.npmmirror.com/dompurify/-/dompurify-2.4.7.tgz"
|
||||
"version" "2.4.7"
|
||||
|
||||
"domready@1.0.8":
|
||||
"integrity" "sha512-uIzsOJUNk+AdGE9a6VDeessoMCzF8RrZvJCX/W8QtyfgdR6Uofn/MvRonih3OtCO79b2VDzDOymuiABrQ4z3XA=="
|
||||
"resolved" "https://registry.npmmirror.com/domready/-/domready-1.0.8.tgz"
|
||||
@ -4960,11 +4970,6 @@
|
||||
dependencies:
|
||||
"websocket-driver" ">=0.5.1"
|
||||
|
||||
"fflate@^0.4.8":
|
||||
"integrity" "sha512-FJqqoDBR00Mdj9ppamLa/Y7vxm+PRmNWA67N846RvsoYVMKB4q3y/de5PA7gUmRMYK/8CMz2GDZQmCRN1wBcWA=="
|
||||
"resolved" "https://registry.npmmirror.com/fflate/-/fflate-0.4.8.tgz"
|
||||
"version" "0.4.8"
|
||||
|
||||
"figgy-pudding@^3.5.1":
|
||||
"integrity" "sha512-0btnI/H8f2pavGMN8w40mlSKOfTK2SVJmBfBeVIj3kNw0swwgzyRq0d5TJVOwodFmtvpPeWPN/MCcfuWF0Ezbw=="
|
||||
"resolved" "https://registry.npmmirror.com/figgy-pudding/-/figgy-pudding-3.5.2.tgz"
|
||||
@ -5147,10 +5152,27 @@
|
||||
"combined-stream" "^1.0.8"
|
||||
"mime-types" "^2.1.12"
|
||||
|
||||
<<<<<<< HEAD
|
||||
"form-data@~2.3.2":
|
||||
"integrity" "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ=="
|
||||
"resolved" "https://registry.npmmirror.com/form-data/-/form-data-2.3.3.tgz"
|
||||
"version" "2.3.3"
|
||||
=======
|
||||
forwarded@0.2.0:
|
||||
version "0.2.0"
|
||||
resolved "https://registry.npmmirror.com/forwarded/-/forwarded-0.2.0.tgz"
|
||||
integrity sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==
|
||||
|
||||
frac@~1.1.2:
|
||||
version "1.1.2"
|
||||
resolved "https://registry.npmmirror.com/frac/-/frac-1.1.2.tgz#3d74f7f6478c88a1b5020306d747dc6313c74d0b"
|
||||
integrity sha512-w/XBfkibaTl3YDqASwfDUqkna4Z2p9cFSr1aHDt0WoMTECnRfBOv2WArlZILlqgWlmdIlALXGpM2AOhEk5W3IA==
|
||||
|
||||
fragment-cache@^0.2.1:
|
||||
version "0.2.1"
|
||||
resolved "https://registry.npmmirror.com/fragment-cache/-/fragment-cache-0.2.1.tgz"
|
||||
integrity sha512-GMBAbW9antB8iZRHLoGw0b3HANt57diZYFO/HL1JGIC1MjKrdmhxvrJbupnVvpys0zsz7yBApXdQyfepKly2kA==
|
||||
>>>>>>> test
|
||||
dependencies:
|
||||
"asynckit" "^0.4.0"
|
||||
"combined-stream" "^1.0.6"
|
||||
@ -5710,14 +5732,6 @@
|
||||
"toposort" "^1.0.0"
|
||||
"util.promisify" "1.0.0"
|
||||
|
||||
"html2canvas@^1.0.0-rc.5", "html2canvas@^1.4.1":
|
||||
"integrity" "sha512-fPU6BHNpsyIhr8yyMpTLLxAbkaK8ArIBcmZIRiBLiDhjeqvXolaEmDGmELFuX9I4xDcaKKcJl+TKZLqruBbmWA=="
|
||||
"resolved" "https://registry.npmmirror.com/html2canvas/-/html2canvas-1.4.1.tgz"
|
||||
"version" "1.4.1"
|
||||
dependencies:
|
||||
"css-line-break" "^2.1.0"
|
||||
"text-segmentation" "^1.0.3"
|
||||
|
||||
"htmlparser2@^3.8.3":
|
||||
"integrity" "sha512-IgieNijUMbkDovyoKObU1DUhm1iwNYE/fuifEoEHfd1oZKZDaONBSkal7Y01shxsM49R4XaMdGez3WnF9UfiCQ=="
|
||||
"resolved" "https://registry.npmmirror.com/htmlparser2/-/htmlparser2-3.10.1.tgz"
|
||||
@ -6577,21 +6591,6 @@
|
||||
optionalDependencies:
|
||||
"graceful-fs" "^4.1.6"
|
||||
|
||||
"jspdf@^2.5.1":
|
||||
"integrity" "sha512-hXObxz7ZqoyhxET78+XR34Xu2qFGrJJ2I2bE5w4SM8eFaFEkW2xcGRVUss360fYelwRSid/jT078kbNvmoW0QA=="
|
||||
"resolved" "https://registry.npmmirror.com/jspdf/-/jspdf-2.5.1.tgz"
|
||||
"version" "2.5.1"
|
||||
dependencies:
|
||||
"@babel/runtime" "^7.14.0"
|
||||
"atob" "^2.1.2"
|
||||
"btoa" "^1.2.1"
|
||||
"fflate" "^0.4.8"
|
||||
optionalDependencies:
|
||||
"canvg" "^3.0.6"
|
||||
"core-js" "^3.6.0"
|
||||
"dompurify" "^2.2.0"
|
||||
"html2canvas" "^1.0.0-rc.5"
|
||||
|
||||
"jsprim@^1.2.2":
|
||||
"integrity" "sha512-P2bSOMAc/ciLz6DzgjVlGJP9+BrJWu5UDGK70C2iweC5QBIeFf0ZXRvGjEj2uYgrY2MkAAhsSWHDWlFtEroZWw=="
|
||||
"resolved" "https://registry.npmmirror.com/jsprim/-/jsprim-1.4.2.tgz"
|
||||
@ -8799,13 +8798,6 @@
|
||||
"parchment" "^1.1.4"
|
||||
"quill-delta" "^3.6.2"
|
||||
|
||||
"raf@^3.4.1":
|
||||
"integrity" "sha512-Sq4CW4QhwOHE8ucn6J34MqtZCeWFP2aQSmrlroYgqAV1PjStIhJXxYuTgUIfkEk7zTLjmIjLmU5q+fbD1NnOJA=="
|
||||
"resolved" "https://registry.npmmirror.com/raf/-/raf-3.4.1.tgz"
|
||||
"version" "3.4.1"
|
||||
dependencies:
|
||||
"performance-now" "^2.1.0"
|
||||
|
||||
"randombytes@^2.0.0", "randombytes@^2.0.1", "randombytes@^2.0.5", "randombytes@^2.1.0":
|
||||
"integrity" "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ=="
|
||||
"resolved" "https://registry.npmmirror.com/randombytes/-/randombytes-2.1.0.tgz"
|
||||
@ -8919,7 +8911,7 @@
|
||||
"resolved" "https://registry.npmmirror.com/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz"
|
||||
"version" "0.11.1"
|
||||
|
||||
"regenerator-runtime@^0.13.11", "regenerator-runtime@^0.13.7":
|
||||
"regenerator-runtime@^0.13.11":
|
||||
"integrity" "sha512-kY1AZVr2Ra+t+piVaJ4gxaFaReZVH40AKNo7UCX6W+dEwBo/2oZJzqfuN1qLq1oL45o56cPaTXELwrTh8Fpggg=="
|
||||
"resolved" "https://registry.npmmirror.com/regenerator-runtime/-/regenerator-runtime-0.13.11.tgz"
|
||||
"version" "0.13.11"
|
||||
@ -9121,11 +9113,6 @@
|
||||
"resolved" "https://registry.npmmirror.com/rgba-regex/-/rgba-regex-1.0.0.tgz"
|
||||
"version" "1.0.0"
|
||||
|
||||
"rgbcolor@^1.0.1":
|
||||
"integrity" "sha512-9aZLIrhRaD97sgVhtJOW6ckOEh6/GnvQtdVNfdZ6s67+3/XwLS9lBcQYzEEhYVeUowN7pRzMLsyGhK2i/xvWbw=="
|
||||
"resolved" "https://registry.npmmirror.com/rgbcolor/-/rgbcolor-1.0.1.tgz"
|
||||
"version" "1.0.1"
|
||||
|
||||
"rimraf@^2.5.4", "rimraf@^2.6.1", "rimraf@^2.6.3":
|
||||
"integrity" "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w=="
|
||||
"resolved" "https://registry.npmmirror.com/rimraf/-/rimraf-2.7.1.tgz"
|
||||
@ -9731,10 +9718,24 @@
|
||||
"resolved" "https://registry.npmmirror.com/spdx-license-ids/-/spdx-license-ids-3.0.13.tgz"
|
||||
"version" "3.0.13"
|
||||
|
||||
<<<<<<< HEAD
|
||||
"spdy-transport@^3.0.0":
|
||||
"integrity" "sha512-hsLVFE5SjA6TCisWeJXFKniGGOpBgMLmerfO2aCyCU5s7nJ/rpAepqmFifv/GCbSbueEeAJJnmSQ2rKC/g8Fcw=="
|
||||
"resolved" "https://registry.npmmirror.com/spdy-transport/-/spdy-transport-3.0.0.tgz"
|
||||
"version" "3.0.0"
|
||||
=======
|
||||
ssf@~0.11.2:
|
||||
version "0.11.2"
|
||||
resolved "https://registry.npmmirror.com/ssf/-/ssf-0.11.2.tgz#0b99698b237548d088fc43cdf2b70c1a7512c06c"
|
||||
integrity sha512-+idbmIXoYET47hH+d7dfm2epdOMUDjqcB4648sTZ+t2JwoyBFL/insLfB/racrDmsKB3diwsDA696pZMieAC5g==
|
||||
dependencies:
|
||||
frac "~1.1.2"
|
||||
|
||||
sshpk@^1.7.0:
|
||||
version "1.17.0"
|
||||
resolved "https://registry.npmmirror.com/sshpk/-/sshpk-1.17.0.tgz"
|
||||
integrity sha512-/9HIEs1ZXGhSPE8X6Ccm7Nam1z8KcoCqPdI7ecm1N33EzAetWahvQWVqLZtaZQ+IDKX4IyA2o0gBzqIMkAagHQ==
|
||||
>>>>>>> test
|
||||
dependencies:
|
||||
"debug" "^4.1.0"
|
||||
"detect-node" "^2.0.4"
|
||||
@ -9807,11 +9808,6 @@
|
||||
"resolved" "https://registry.npmmirror.com/stable/-/stable-0.1.8.tgz"
|
||||
"version" "0.1.8"
|
||||
|
||||
"stackblur-canvas@^2.0.0":
|
||||
"integrity" "sha512-8S1aIA+UoF6erJYnglGPug6MaHYGo1Ot7h5fuXx4fUPvcvQfcdw2o/ppCse63+eZf8PPidSu4v1JnmEVtEDnpg=="
|
||||
"resolved" "https://registry.npmmirror.com/stackblur-canvas/-/stackblur-canvas-2.6.0.tgz"
|
||||
"version" "2.6.0"
|
||||
|
||||
"stackframe@^1.3.4":
|
||||
"integrity" "sha512-oeVtt7eWQS+Na6F//S4kJ2K2VbRlS9D43mAlMyVpVWovy9o+jfgH8O9agzANzaiLjclA0oYzUXEM4PurhSUChw=="
|
||||
"resolved" "https://registry.npmmirror.com/stackframe/-/stackframe-1.3.4.tgz"
|
||||
@ -10111,11 +10107,6 @@
|
||||
"query-string" "^4.3.2"
|
||||
"traverse" "^0.6.6"
|
||||
|
||||
"svg-pathdata@^6.0.3":
|
||||
"integrity" "sha512-qsjeeq5YjBZ5eMdFuUa4ZosMLxgr5RZ+F+Y1OrDhuOCEInRMA3x74XdBtggJcj9kOeInz0WE+LgCPDkZFlBYJw=="
|
||||
"resolved" "https://registry.npmmirror.com/svg-pathdata/-/svg-pathdata-6.0.3.tgz"
|
||||
"version" "6.0.3"
|
||||
|
||||
"svg-sprite-loader@5.1.1":
|
||||
"integrity" "sha512-oRjDBw3AtZOb+XTx7XE3HcVju9RdnfdXttT3ZJB/vmWGJ+SM+xfXzh3yuVPIpySO8FjGhH5BtU63lGMI9WgYzA=="
|
||||
"resolved" "https://registry.npmmirror.com/svg-sprite-loader/-/svg-sprite-loader-5.1.1.tgz"
|
||||
@ -10251,13 +10242,6 @@
|
||||
"commander" "^2.20.0"
|
||||
"source-map-support" "~0.5.20"
|
||||
|
||||
"text-segmentation@^1.0.3":
|
||||
"integrity" "sha512-iOiPUo/BGnZ6+54OsWxZidGCsdU8YbE4PSpdPinp7DeMtUJNJBoJ/ouUSTJjHkh1KntHaltHl/gDs2FC4i5+Nw=="
|
||||
"resolved" "https://registry.npmmirror.com/text-segmentation/-/text-segmentation-1.0.3.tgz"
|
||||
"version" "1.0.3"
|
||||
dependencies:
|
||||
"utrie" "^1.0.2"
|
||||
|
||||
"text-table@^0.2.0":
|
||||
"integrity" "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw=="
|
||||
"resolved" "https://registry.npmmirror.com/text-table/-/text-table-0.2.0.tgz"
|
||||
@ -10756,13 +10740,6 @@
|
||||
"resolved" "https://registry.npmmirror.com/utils-merge/-/utils-merge-1.0.1.tgz"
|
||||
"version" "1.0.1"
|
||||
|
||||
"utrie@^1.0.2":
|
||||
"integrity" "sha512-1MLa5ouZiOmQzUbjbu9VmjLzn1QLXBhwpUa7kdLUQK+KQ5KA9I1vk5U4YHe/X2Ch7PYnJfWuWT+VbuxbGwljhw=="
|
||||
"resolved" "https://registry.npmmirror.com/utrie/-/utrie-1.0.2.tgz"
|
||||
"version" "1.0.2"
|
||||
dependencies:
|
||||
"base64-arraybuffer" "^1.0.2"
|
||||
|
||||
"uuid@^3.3.2":
|
||||
"integrity" "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A=="
|
||||
"resolved" "https://registry.npmmirror.com/uuid/-/uuid-3.4.0.tgz"
|
||||
@ -11217,10 +11194,32 @@
|
||||
dependencies:
|
||||
"isexe" "^2.0.0"
|
||||
|
||||
<<<<<<< HEAD
|
||||
"which@^2.0.1":
|
||||
"integrity" "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA=="
|
||||
"resolved" "https://registry.npmmirror.com/which/-/which-2.0.2.tgz"
|
||||
"version" "2.0.2"
|
||||
=======
|
||||
wmf@~1.0.1:
|
||||
version "1.0.2"
|
||||
resolved "https://registry.npmmirror.com/wmf/-/wmf-1.0.2.tgz#7d19d621071a08c2bdc6b7e688a9c435298cc2da"
|
||||
integrity sha512-/p9K7bEh0Dj6WbXg4JG0xvLQmIadrner1bi45VMJTfnbVHsc7yIajZyoSoK60/dtVBs12Fm6WkUI5/3WAVsNMw==
|
||||
|
||||
word-wrap@^1.2.3:
|
||||
version "1.2.3"
|
||||
resolved "https://registry.npmmirror.com/word-wrap/-/word-wrap-1.2.3.tgz"
|
||||
integrity sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==
|
||||
|
||||
word@~0.3.0:
|
||||
version "0.3.0"
|
||||
resolved "https://registry.npmmirror.com/word/-/word-0.3.0.tgz#8542157e4f8e849f4a363a288992d47612db9961"
|
||||
integrity sha512-OELeY0Q61OXpdUfTp+oweA/vtLVg5VDOXh+3he3PNzLGG/y0oylSOC1xRVj0+l4vQ3tj/bB1HVHv1ocXkQceFA==
|
||||
|
||||
worker-farm@^1.7.0:
|
||||
version "1.7.0"
|
||||
resolved "https://registry.npmmirror.com/worker-farm/-/worker-farm-1.7.0.tgz"
|
||||
integrity sha512-rvw3QTZc8lAxyVrqcSGVm5yP/IJ2UcB3U0graE3LCFoZ0Yn2x4EoVSqJKdB/T5M+FLcRPjz4TDacRf3OCfNUzw==
|
||||
>>>>>>> test
|
||||
dependencies:
|
||||
"isexe" "^2.0.0"
|
||||
|
||||
@ -11280,10 +11279,30 @@
|
||||
dependencies:
|
||||
"async-limiter" "~1.0.0"
|
||||
|
||||
<<<<<<< HEAD
|
||||
"xhr@2.4.0":
|
||||
"integrity" "sha512-TUbBsdAuJbX8olk9hsDwGK8P1ri1XlV+PdEWkYw+HQQbpkiBR8PLgD1F3kQDPBs9l4Px34hP9rCYAZOCCAENbw=="
|
||||
"resolved" "https://registry.npmmirror.com/xhr/-/xhr-2.4.0.tgz"
|
||||
"version" "2.4.0"
|
||||
=======
|
||||
xlsx@^0.18.5:
|
||||
version "0.18.5"
|
||||
resolved "https://registry.npmmirror.com/xlsx/-/xlsx-0.18.5.tgz#16711b9113c848076b8a177022799ad356eba7d0"
|
||||
integrity sha512-dmg3LCjBPHZnQp5/F/+nnTa+miPJxUXB6vtk42YjBBKayDNagxGEeIdWApkYPOf3Z3pm3k62Knjzp7lMeTEtFQ==
|
||||
dependencies:
|
||||
adler-32 "~1.3.0"
|
||||
cfb "~1.2.1"
|
||||
codepage "~1.15.0"
|
||||
crc-32 "~1.2.1"
|
||||
ssf "~0.11.2"
|
||||
wmf "~1.0.1"
|
||||
word "~0.3.0"
|
||||
|
||||
xml-js@1.6.11:
|
||||
version "1.6.11"
|
||||
resolved "https://registry.npmmirror.com/xml-js/-/xml-js-1.6.11.tgz"
|
||||
integrity sha512-7rVi2KMfwfWFl+GpPg6m80IVMWXLRjO+PxTq7V2CDhoGak0wzYzFgUY2m4XJ47OGdXd8eLE8EmwfAmdjw7lC1g==
|
||||
>>>>>>> test
|
||||
dependencies:
|
||||
"global" "~4.3.0"
|
||||
"is-function" "^1.0.1"
|
||||
|
Loading…
Reference in New Issue
Block a user