Compare commits

...

19 Commits

Author SHA1 Message Date
814fe4605a UI样式修改能源&班组 2023-10-11 14:30:18 +08:00
180fcf5ad8 Merge pull request 'dy' (#37) from dy into test
Reviewed-on: #37
2023-10-08 17:03:04 +08:00
helloDy
b1c0d21888 Merge branch 'test' into dy 2023-10-08 16:59:31 +08:00
helloDy
96d52fafee pdf 2023-10-08 16:59:09 +08:00
7dfaae02a8 Merge pull request 'lb' (#36) from lb into test
Reviewed-on: #36
2023-09-27 17:00:53 +08:00
lb
cf2d7af94b delete echarts 2023-09-27 17:00:33 +08:00
lb
a48b31dcbe Merge branch 'test' into lb 2023-09-27 16:58:28 +08:00
lb
96b0a9e503 update 产品质量分析 2023-09-27 16:57:57 +08:00
lb
9c257aa24a update demo 2023-09-27 16:19:55 +08:00
lb
7ab5f1b812 update demo 2023-09-27 14:42:38 +08:00
lb
5c796cd44f add custom echarts demo 2023-09-27 14:01:57 +08:00
lb
fe0b5538a8 update 设备产量时序图 2023-09-27 13:22:09 +08:00
lb
90695acefd update 检测信息记录 2023-09-27 10:14:24 +08:00
a90c5cca0c Merge pull request 'zjl' (#35) from zjl into test
Reviewed-on: #35
2023-09-27 09:38:02 +08:00
lb
20808c0975 update 产量时序图 2023-09-26 17:00:46 +08:00
lb
87f56dd9ac update responsejson 2023-09-26 15:12:41 +08:00
lb
24ffea330d update 设备产量分析 2023-09-26 14:56:00 +08:00
lb
a4594426c3 bugfix 2023-09-26 14:38:30 +08:00
lb
c899bb37e3 update quality inspection record 2023-09-26 11:03:34 +08:00
45 changed files with 2336 additions and 924 deletions

View File

@ -303,7 +303,7 @@ export default {
handleDelete(row) {
const id = row.id;
this.$modal
.confirm('是否确认删除设备与分组绑定编号为"' + id + '"的数据项?')
.confirm('是否确认删除该分组绑定?')
.then(function () {
return deleteEquipmentBindGroup(id);
})

View File

@ -20,6 +20,7 @@
<el-select
v-model="dataForm.productionLineId"
placeholder="请选择产线"
filterable
@change="handleProductlineChange">
<el-option
v-for="opt in productionLineList"
@ -37,6 +38,7 @@
:rules="[{ required: true, message: '不能为空', trigger: 'blur' }]">
<el-select
v-model="dataForm.workshopSectionId"
filterable
placeholder="请选择工段"
@change="$emit('update', dataForm)">
<el-option
@ -56,6 +58,7 @@
:rules="[{ required: true, message: '不能为空', trigger: 'blur' }]">
<el-select
v-model="dataForm.equipmentId"
filterable
placeholder="请选择设备"
@change="$emit('update', dataForm)">
<el-option
@ -71,6 +74,7 @@
<el-form-item label="工段排序" prop="sort">
<el-input
v-model="dataForm.sort"
filterable
@change="$emit('update', dataForm)"
placeholder="请输入工段排序" />
</el-form-item>

View File

@ -1,8 +1,8 @@
<!--
* @Author: zhp
* @Date: 2023-09-13 09:02:25
* @LastEditTime: 2023-09-13 10:33:20
* @LastEditors: zhp
* @LastEditTime: 2023-10-08 15:39:38
* @LastEditors: DY
* @Description:
-->
<template>
@ -61,11 +61,12 @@ export default {
// },
methods: {
initChart(xData, yData,lineName) {
console.log(xData,yData);
console.log( '打印结果', xData,yData, lineName);
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({
@ -86,7 +87,7 @@ export default {
type: 'value'
},
series: seriesData
})
}, true)
}
}
}

View File

@ -228,7 +228,14 @@ 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;
this.getData()
if (val.time) {
this.getData()
} else {
this.$message({
message: '请选择时间',
type: 'warning'
});
}
break;
case 'reset':
this.$refs.searchBarForm.resetForm();

View File

@ -1,14 +1,14 @@
<!--
* @Author: zhp
* @Date: 2023-09-13 09:02:25
* @LastEditTime: 2023-09-20 09:29:40
* @LastEditTime: 2023-10-08 16:36:37
* @LastEditors: DY
* @Description:
-->
<template>
<div>
<div style="margin: 20px">
<el-button v-for="(item, index) in dataArray" :key="index" @click="changeChart(index)">{{ item.name }}</el-button>
<el-button v-for="(item, index) in buttonList" :key="index" :class="[item.actived ? 'activeButton': 'normalButton']" @click="changeChart(index)">{{ item.name }}</el-button>
</div>
<div ref="chartDiv" :class="className" :style="{height:height,width:width}" />
</div>
@ -43,7 +43,8 @@ export default {
return {
chart: null,
dataArray: [],
xDatas: []
xDatas: [],
buttonList: []
}
},
mounted() {
@ -51,12 +52,34 @@ 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)
},
@ -100,3 +123,12 @@ export default {
}
}
</script>
<style scoped>
.activeButton {
background-color: rgb(93,159,255);
}
.normalButton {
background-color: none;
}
</style>

View File

@ -57,8 +57,7 @@ export default {
lineIds: [],
time: ''
},
xData: [],
yData:[],
dateLabelList: [],
optionArrUrl: [getProductionLinePage ],
formConfig: [
{
@ -113,75 +112,101 @@ export default {
let arr = [
{
prop: 'lineName',
label: '产线',
align: 'center',
label: '产线'
},
{
prop: 'sum',
label: '合计',
align: 'center',
label: '合计'
},
{
prop: res.data.nameData[0].name,
label: res.data.nameData[0].name,
prop: res.data ? res.data.nameData[0].name : undefined,
label: res.data ? res.data.nameData[0].name : undefined,
align: 'center',
children:[
]
}
]
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
// console.log(res.data.nameData.slice(1))
let xData = []
res.data.nameData.slice(1).forEach(item => {
xData.push(item.name)
// arr[2].children.push(props)
})
let yAllData = []
let lineName = []
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) => {
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) => {
// console.log(ele)
ele.children.forEach((e) => {
// let yData = []
yData.push(e.dynamicValue)
ele.children.forEach((e) => {
console.log(e.dynamicName)
obj['' + e.dynamicName + ''] = e.dynamicValue
console.log(obj['' + e.dynamicName + '']);
})
})
yAllData.push(yData)
});
console.log(lineName)
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 = []
}
// res.data.data[0].data[0].children.forEach((item, index) => {
// // console.log(item)
// yData.push(item.dynamicValue)
@ -203,7 +228,14 @@ export default {
this.listQuery.time = val.time ? new Date(val.time).getTime() : undefined
// this.listQuery.pageNo = 1;
// this.listQuery.pageSize = 10;
this.getData()
if (val.time) {
this.getData()
} else {
this.$message({
message: '请选择时间',
type: 'warning'
});
}
break;
case 'reset':
this.$refs.searchBarForm.resetForm();

View File

@ -50,29 +50,24 @@ import {
const tableProps = [
{
prop: 'code',
label: '工厂编码',
align: 'center',
label: '工厂编码'
},
{
prop: 'name',
label: '工厂名称',
align: 'center',
label: '工厂名称'
},
{
prop: 'address',
label: '地址',
align: 'center',
label: '地址'
},
{
prop: 'remark',
label: '备注',
align: 'center',
label: '备注'
},
{
prop: 'createTime',
label: '创建时间',
align: 'center',
filter: parseTime,
filter: parseTime
},
];
@ -120,14 +115,14 @@ export default {
name: 'search',
color: 'primary',
},
{
type: 'separate',
},
{
type: 'button',
btnName: '重置',
name: 'reset',
},
// {
// type: 'separate',
// },
// {
// type: 'button',
// btnName: '',
// name: 'reset',
// },
{
type: 'separate',
},

View File

@ -1,7 +1,7 @@
<!--
* @Author: Do not edit
* @Date: 2023-08-29 14:59:29
* @LastEditTime: 2023-09-16 17:34:17
* @LastEditTime: 2023-09-27 16:19:56
* @LastEditors: DY
* @Description:
-->
@ -12,21 +12,15 @@
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="tableData"
:table-data="showData"
@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"
@ -43,19 +37,6 @@
: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"
@ -74,8 +55,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'
@ -83,55 +64,45 @@ import FileSaver from 'file-saver'
const tableProps = [
{
prop: 'reportType',
label: '报表类型',
align: 'center'
label: '报表类型'
},
{
prop: 'reportStartTime',
label: '统计开始时间',
align: 'center',
filter: parseTime,
},
{
prop: 'reportEndTime',
label: '统计结束时间',
align: 'center',
filter: parseTime,
},
{
prop: 'proLineName',
label: '产线名称',
align: 'center',
label: '产线名称'
},
{
prop: 'inputNum',
label: '投入数量/片',
align: 'center',
label: '投入数量/片'
},
{
prop: 'outputNum',
label: '产出数量/片',
align: 'center',
label: '产出数量/片'
},
{
prop: 'outputArea',
label: '产出面积/㎡',
align: 'center',
label: '产出面积/㎡'
},
{
prop: 'lossNum',
label: '损耗数量/片',
align: 'center',
label: '损耗数量/片'
},
{
prop: 'lossArea',
label: '损耗面积/㎡',
align: 'center',
label: '损耗面积/㎡'
},
{
prop: 'lossRatio',
label: '损耗比例%',
align: 'center',
label: '损耗比例%'
}
];
@ -153,6 +124,7 @@ export default {
addOrUpdateVisible: false,
tableProps,
tableBtn: [],
showData: [],
selectedList: [],
// tableBtn: [
// this.$auth.hasPermi(`base:factory:update`)
@ -232,44 +204,60 @@ 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
// pdfhtmlcanvas
var pageHeight = contentHeight / 592.28 * 841.89
// pdfhtml
var leftHeight = contentHeight
//
var position = 0
// a4[595.28,841.89]htmlcanvaspdf
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.pdf()
this.dialogVisible = false
this.test()
setTimeout(() =>{
this.dialogVisible = false
this.showData = this.tableData
}, 600)
},
exportXlsx() {
this.down()
this.exportECL()
this.dialogVisible = false
},
// 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()
this.showData = this.tableData
},
handleClose(done) {
this.$confirm('确认关闭?')
@ -278,23 +266,30 @@ export default {
})
.catch(_ => {});
},
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)
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
},
selectChange(val) {
console.log(val)
@ -328,12 +323,13 @@ export default {
getDataList() {
this.dataListLoading = true;
this.urlOptions.getDataListURL(this.listQuery).then(response => {
this.tableData = response.data.list.map(item => {
this.tableData = response.data.list.map((item, index) => {
item.reportType = item.reportType === 1 ? '日' : item.reportType === 2 ? '周' : '月'
return item
});
this.total = response.data.total;
this.dataListLoading = false;
this.showData = this.tableData
});
},
//
@ -348,15 +344,10 @@ export default {
this.getDataList();
},
handleExport() {
if (this.selectedList.length === 0) {
this.selectedList = this.tableData
if (this.selectedList.length > 0) {
this.showData = this.selectedList
}
this.dialogVisible = true
// this.$modal.confirm('?').then(() => {
// this.exportLoading = true;
// // this.down()
// this.pdf()
// }).catch(() => { });
}
},
};

View File

@ -1,7 +1,7 @@
<!--
* @Author: Do not edit
* @Date: 2023-08-29 14:59:29
* @LastEditTime: 2023-09-20 10:55:23
* @LastEditTime: 2023-09-27 16:23:44
* @LastEditors: DY
* @Description:
-->
@ -12,12 +12,13 @@
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="tableData"
:table-data="showData"
@selection-change="selectChange"
>
<method-btn
@ -33,17 +34,6 @@
: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"
@ -63,6 +53,8 @@
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 = [
{
@ -115,6 +107,7 @@ export default {
addOrUpdateVisible: false,
tableProps,
tableBtn: [],
showData: [],
tableData: [],
selectedList: [],
formConfig: [
@ -166,40 +159,86 @@ 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
// pdfhtmlcanvas
var pageHeight = contentHeight / 592.28 * 841.89
// pdfhtml
var leftHeight = contentHeight
//
var position = 0
// a4[595.28,841.89]htmlcanvaspdf
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.pdf()
this.dialogVisible = false
this.test()
setTimeout(() =>{
this.dialogVisible = false
this.showData = this.tableData
}, 600)
},
exportXlsx() {
this.down()
this.exportECL()
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(_ => {
@ -240,6 +279,7 @@ export default {
this.tableData = response.data;
this.total = response.data.total;
this.dataListLoading = false;
this.showData = this.tableData
});
},
//
@ -254,21 +294,10 @@ export default {
this.getDataList();
},
handleExport() {
if (this.selectedList.length === 0) {
this.selectedList = this.tableData
if (this.selectedList.length > 0) {
this.showData = this.selectedList
}
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(() => { });
}
},
};

View File

@ -1,7 +1,7 @@
<!--
* @Author: Do not edit
* @Date: 2023-08-29 14:59:29
* @LastEditTime: 2023-09-22 15:13:48
* @LastEditTime: 2023-10-08 10:51:49
* @LastEditors: DY
* @Description:
-->
@ -13,12 +13,13 @@
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="tableData"
:table-data="showData"
@selection-change="selectChange"
>
<method-btn
@ -34,21 +35,6 @@
: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"
@ -69,6 +55,8 @@ 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 = [
{
@ -140,6 +128,7 @@ export default {
tableProps,
tableBtn: [],
tableData: [],
showData: [],
formConfig: [
{
type: 'select',
@ -208,40 +197,86 @@ 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
// pdfhtmlcanvas
var pageHeight = contentHeight / 592.28 * 841.89
// pdfhtml
var leftHeight = contentHeight
//
var position = 0
// a4[595.28,841.89]htmlcanvaspdf
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.pdf()
this.dialogVisible = false
this.test()
setTimeout(() =>{
this.dialogVisible = false
this.showData = this.tableData
}, 600)
},
exportXlsx() {
this.down()
this.exportECL()
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(_ => {
@ -289,6 +324,7 @@ export default {
item.reportType = item.reportType === 1 ? '日' : item.reportType === 2 ? '周' : '月'
return item
});
this.showData = this.tableData
this.total = response.data.total;
this.dataListLoading = false;
});
@ -305,21 +341,10 @@ export default {
this.getDataList();
},
handleExport() {
if (this.selectedList.length === 0) {
this.selectedList = this.tableData
if (this.selectedList.length > 0) {
this.showData = this.selectedList
}
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(() => { });
}
},
};

View File

@ -5,23 +5,42 @@
ref="searchBarForm"
@headBtnClick="buttonClick" />
<base-table
class="right-aside"
v-loading="dataListLoading"
:table-props="tableProps"
:table-data="tableData" />
<!-- <pagination
:table-data="showData"
:selectWidth="55"
@selection-change="selectChange"
/>
<pagination
:limit.sync="listQuery.pageSize"
:page.sync="listQuery.pageNo"
:total="listQuery.total"
@pagination="getDataList" /> -->
@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>
</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 = [
{
@ -70,6 +89,8 @@ export default {
},
tableProps,
tableData: [],
showData: [],
selectedList: [],
listQuery: {
proLineId:undefined,
sectionId: undefined,
@ -77,6 +98,7 @@ export default {
endTime: undefined,
},
dataListLoading: false,
dialogVisible: false,
optionArrUrl: [getProductionLinePage, getWorkshopSectionPage],
formConfig: [
{
@ -127,6 +149,93 @@ 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
// pdfhtmlcanvas
var pageHeight = contentHeight / 592.28 * 841.89
// pdfhtml
var leftHeight = contentHeight
//
var position = 0
// a4[595.28,841.89]htmlcanvaspdf
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,
@ -144,9 +253,31 @@ export default {
// this.listQuery.endTime = '1693564257000'
this.urlOptions.getDataListURL(this.listQuery).then(res => {
this.tableData = res.data
// this.total = response.data.total;
this.listQuery.total = this.tableData.length;
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)
@ -171,6 +302,9 @@ export default {
};
this.getDataList();
break;
case 'export':
this.handleExport();
break;
default:
console.log(val);
}

View File

@ -97,6 +97,22 @@ 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: {
@ -106,7 +122,11 @@ export default {
containLabel: true
},
legend: {
data: legendData
data: legendData,
right: '1%',
icon: 'rect',
itemHeight: 8,
itemWidth: 8
},
xAxis: {
type: 'category',

View File

@ -103,7 +103,8 @@ export default {
containLabel: true
},
legend: {
data: legendData
data: legendData,
right: '1%'
},
xAxis: {
type: 'category',

View File

@ -425,7 +425,7 @@ export default {
}
}
</script>
<style>
<style lang='scss'>
/* 时间整点 */
.noneMinute .el-time-spinner__wrapper {
width: 100%;
@ -433,6 +433,16 @@ 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 {
@ -446,8 +456,6 @@ export default {
margin-top: 12px;
}
}
</style>
<style scoped>
.searchBarBox .foldClass {
position: absolute;
top: 14px;

View File

@ -15,7 +15,7 @@ export default {
return {
chartDom: '',
chart: '',
chartHeight: this.tableHeight(350)
chartHeight: this.tableHeight(370)
}
},
props: {
@ -34,7 +34,7 @@ export default {
},
mounted() {
window.addEventListener('resize', () => {
this.chartHeight = this.tableHeight(350)
this.chartHeight = this.tableHeight(370)
})
},
methods: {
@ -86,17 +86,35 @@ 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: {},
legend: {
right: '1%',
icon: 'rect',
itemHeight: 8,
itemWidth: 8
},
grid: {
left: '1%',
right: '1%',

View File

@ -194,13 +194,23 @@ export default {
}
}
</script>
<style>
<style lang='scss'>
/* 级联选择器 */
.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>
<style lang="scss" scoped>
.separateStyle {
display: inline-block;
width: 1px;
@ -208,8 +218,6 @@ export default {
background: #E8E8E8;
vertical-align: middle;
}
</style>
<style lang="scss" scoped>
.demo-form-inline {
.blue-block {
display: inline-block;

View File

@ -9,7 +9,8 @@
:table-data="list"
class="qoq-out-table"
/>
<div style='width: 100%;height: 300px;padding-top: 30px;'>
<div class="chartTitle">环比分析图</div>
<div style='width: 100%'>
<line-chart ref="analysisLineChart" :chartData="chartData"/>
</div>
</div>
@ -111,4 +112,21 @@ export default {
}
}
}
</script>
</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>

View File

@ -68,12 +68,6 @@ export default {
}
var option = {
color:['#288AFF'],
tooltip: {
trigger: 'axis',
axisPointer: {
type: 'shadow'
}
},
grid: {
left: '4%',
right: '1%',

View File

@ -70,9 +70,9 @@ export default {
var option = {
color:['#288AFF'],
tooltip: {
trigger: 'axis'
},
// tooltip: {
// trigger: 'axis'
// },
grid: {
left: '4%',
right: '1%',

View File

@ -385,7 +385,7 @@ export default {
}
}
</script>
<style>
<style lang='scss'>
/* 级联选择器 */
.cascaderParent .el-cascader-panel .el-scrollbar:first-child .el-radio {
display: none;
@ -397,6 +397,16 @@ 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 {
@ -410,8 +420,6 @@ export default {
margin-top: 12px;
}
}
</style>
<style scoped>
.searchBarBox .foldClass {
position: absolute;
top: 14px;

View File

@ -77,7 +77,8 @@ export default {
var option = {
color:['#FFDC94','#8EF0AB','#63BDFF','#288AFF','#7164FF','#FF6860','#FF9747','#B0EB42','#D680FF','#0043D2'],
legend: {
data: keys
data: keys,
right:'1%'
},
tooltip: {
trigger: 'axis'

View File

@ -143,19 +143,20 @@ export default {
}
}
</script>
<style>
<style lang='scss'>
/* 级联选择器 */
.cascaderParent .el-cascader-panel .el-scrollbar:first-child .el-radio {
display: none;
}
</style>
<style scoped>
.separateStyle {
display: inline-block;
width: 1px;
height: 24px;
background: #E8E8E8;
vertical-align: middle;
.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>
@ -170,4 +171,11 @@ export default {
margin-top: 10px;
}
}
.separateStyle {
display: inline-block;
width: 1px;
height: 24px;
background: #E8E8E8;
vertical-align: middle;
}
</style>

View File

@ -3,6 +3,7 @@
<!-- 搜索工作栏 -->
<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>
@ -33,12 +34,12 @@ export default {
chartData: [],
tableProps: [],
list: [],
tableH: this.tableHeight(600)
tableH: this.tableHeight(640)
}
},
mounted() {
window.addEventListener('resize', () => {
this.tableH = this.tableHeight(600)
this.tableH = this.tableHeight(640)
})
},
methods: {
@ -122,4 +123,20 @@ export default {
}
}
}
</script>
</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>

View File

@ -130,7 +130,7 @@ export default {
this.plcTableName = data.plcTableName
this.objName = data.objName
this.getList()
if (title === 'view') {
if (title === 'detail') {
this.showBtn = false
this.tableBtn = []
} else {

View File

@ -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 'view':
case 'detail':
this.paramVisible = true
this.$nextTick(() => {
this.$refs.plcParam.init(val.data, 'view')
this.$refs.plcParam.init(val.data, 'detail')
})
break
default:

View File

@ -1,54 +1,72 @@
<template>
<el-form ref="form" :rules="rules" label-width="110px" :model="form">
<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-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>
</template>
<script>

View File

@ -124,7 +124,7 @@ export default {
this.energyType = data.energyType
this.energyTypeId = data.energyTypeId
this.getList()
if (title === 'view') {
if (title === 'detail') {
this.showBtn = false
this.tableBtn = []
} else {

View File

@ -111,22 +111,22 @@ export default {
],
tableProps,
tableBtn: [
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,
{
type: 'detail',
btnName: '详情'
},
this.$auth.hasPermi('monitoring:energy-statistics:update')
? {
type: 'edit',
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 'view':
case 'detail':
this.$nextTick(() => {
this.$refs.plcParam.init(val.data, 'view')
this.$refs.plcParam.init(val.data, 'detail')
})
break
default:

View File

@ -118,12 +118,12 @@ export default {
{
width: 128,
prop: 'workTime',
label: '工作时长',
label: '工作时长[h]',
},
{
width: 128,
prop: 'workRate',
label: '百分比',
label: '百分比[%]',
filter: (val) => (val != null ? +val.toFixed(3) : '-'),
},
],
@ -134,9 +134,9 @@ export default {
{
width: 128,
prop: 'stopTime',
label: '停机时长',
label: '停机时长[h]',
},
{ width: 128, prop: 'stopRate', label: '百分比' },
{ width: 128, prop: 'stopRate', label: '百分比[%]' },
],
},
{
@ -145,10 +145,10 @@ export default {
{
width: 128,
prop: 'downTime',
label: '故障时长',
label: '故障时长[h]',
filter: (val) => (val != null ? +val.toFixed(3) : '-'),
},
{ width: 128, prop: 'downRate', label: '百分比' },
{ width: 128, prop: 'downRate', label: '百分比[%]' },
{
width: 128,
prop: 'timeEfficiency',

View File

@ -155,7 +155,7 @@ export default {
async getList() {
this.loading = true;
//
const { data } = await this.$axios({
const { code, data } = await this.$axios({
url: '/analysis/equipment-analysis/efficiency',
method: 'get',
params: {
@ -163,6 +163,11 @@ export default {
recordTime: this.queryParams.recordTime || null,
},
});
if (code === 0) {
this.list = data;
} else {
this.list.splice(0);
}
},
handleSearchBarBtnClick(btn) {

View File

@ -43,7 +43,7 @@ export default {
eq.okQuantity,
eq.nokQuantity,
eq.totalQuantity,
eq.passRate.toFixed(2),
eq.passRate.toFixed(4),
]);
});
return {
@ -53,6 +53,30 @@ 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,
@ -110,17 +134,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]),
// },
],
};
},

View File

@ -31,7 +31,8 @@
<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 :list="list" />
<LineChart v-if="list && list.length" :list="list" />
<div v-else class="no-data-bg"></div>
</div>
</el-tab-pane>
</el-tabs>

View File

@ -8,7 +8,7 @@
<template>
<div
class="production-timegraph-container"
style="background: #f2f4f9; flex: 1">
style="background: #f2f4f9; flex: 1; display: flex; flex-direction: column">
<el-row
class=""
style="
@ -24,12 +24,16 @@
: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;
@ -37,7 +41,7 @@
">
<div class="blue-title">设备产量时序图</div>
<div class="main-area">
<div class="main-area" style="flex: 1">
<div class="graphs" v-if="graphList.length">
<LineChart :config="templateConfig" />
</div>
@ -70,6 +74,7 @@
<script>
import LineChart from './components/lineChart.vue';
import response from './response.json';
export default {
name: 'SGProduction',
@ -77,6 +82,7 @@ export default {
props: {},
data() {
return {
startTime: null, // new Date(2023, 8, 26, 0, 0, 0, 0).getTime(),
accumulators: new Map(),
searchBarFormConfig: [
{
@ -85,6 +91,7 @@ export default {
placeholder: '请选择产线',
selectOptions: [],
param: 'lineId',
onchange: true,
},
{
type: 'select',
@ -108,6 +115,7 @@ export default {
// defaultTime: ['00:00:00', '23:59:59'],
placeholder: '选择日期',
param: 'recordTime',
required: true,
},
{
type: 'button',
@ -136,7 +144,18 @@ export default {
eqList: [],
graphList: [],
templateConfig: {
color: ['#283D68', '#FFB61F', '#4481FF', '#5AD8A6', '#E97466'],
color: [
'#283D68',
'#FFB61F',
'#4481FF',
'#5AD8A6',
'#E97466',
'#ccc', //<===
'#ccc',
'#ccc',
'#ccc',
'#ccc',
],
grid: {
top: 48,
left: 48,
@ -159,25 +178,30 @@ export default {
tooltip: {
show: true,
trigger: 'axis',
},
xAxis: {
type: 'category',
boundaryGap: true,
axisTick: {
// show: false,
alignWithLabel: true,
lineStyle: {
color: '#0003',
},
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('')}
`;
},
axisLabel: {
color: '#0007',
},
data: [],
// data: Array(24)
// .fill(1)
// .map((item, index) => `${index}:00`),
},
xAxis: null,
yAxis: {
type: 'value',
name: '产量',
@ -186,9 +210,12 @@ export default {
fontSize: 14,
align: 'center',
},
nameGap: 26,
axisLine: {
show: true,
},
max: function (value) {
return value.max + Math.floor(value.max / 5);
return value.max + Math.ceil(value.max / 4);
// return value.max + 50
},
},
series: [
@ -223,16 +250,29 @@ 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;
@ -250,6 +290,18 @@ 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;
@ -267,43 +319,74 @@ 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);
// 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.setXaxis();
this.graphList.forEach(this.setSeries);
} else {
this.graphList = [];
this.graphList.forEach(this.setSeries);
}
},
setSeries(eqArr) {
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) {
if (eqArr.length == 0) {
this.templateConfig.series = [];
return;
@ -330,18 +413,6 @@ 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({
@ -390,6 +461,25 @@ 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',

View File

@ -0,0 +1,333 @@
{
"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
}
]
}
}

View File

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

View File

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

View File

@ -24,6 +24,7 @@
:formConfigs="searchBarFormConfig"
ref="search-bar"
:remove-blue="true"
@select-changed="handleSearchBarSelectChange"
@headBtnClick="handleSearchBarBtnClick" />
</el-row>
@ -77,41 +78,7 @@
class="graphs"
v-show="graphList.length"
id="status-chart"
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>
style="height: 1px; flex: 1"></div>
<h2 v-if="!graphList || graphList.length == 0" class="no-data-bg"></h2>
</div>
</el-row>
@ -140,46 +107,8 @@
</template>
<script>
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(),
}
);
}
// import * as echarts from 'echarts';
import Gantt from './gantt';
export default {
name: 'SGStatus',
@ -195,6 +124,7 @@ export default {
placeholder: '请选择产线',
selectOptions: [],
param: 'lineId',
onchange: true,
},
{
type: 'select',
@ -207,18 +137,13 @@ 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',
@ -246,6 +171,8 @@ export default {
graphList: [],
open: false,
eqList: [],
startTime: null,
gantt: null
// demo: [
// [
// {
@ -266,176 +193,6 @@ 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: {},
@ -443,7 +200,7 @@ export default {
this.initProductline();
this.initWorksection();
this.initEquipment();
this.getList();
// this.getList();
},
mounted() {},
watch: {
@ -512,7 +269,8 @@ export default {
initChart() {
const el = document.getElementById('status-chart');
this.chart = echarts.init(el);
this.gantt = new Gantt(el);
this.gantt.init();
},
/** 重置查询条件 */
@ -592,9 +350,42 @@ 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;

View File

@ -37,7 +37,7 @@
@cancel="handleCancel"
@confirm="handleConfirm"
:before-close="handleCancel"
width='70%'
width='50%'
>
<group-class-add ref="classList" @successSubmit="successSubmit" />
</base-dialog>
@ -108,12 +108,6 @@ export default {
],
tableProps,
tableBtn: [
this.$auth.hasPermi('base:group-classes:update')
? {
type: 'edit',
btnName: '编辑'
}
: undefined,
{
type: 'cancel',
btnName: '作废',
@ -128,6 +122,12 @@ export default {
]
}
},
this.$auth.hasPermi('base:group-classes:update')
? {
type: 'edit',
btnName: '编辑'
}
: undefined,
this.$auth.hasPermi('base:group-classes:delete')
? {
type: 'delete',

View File

@ -1,17 +1,29 @@
<template>
<el-form ref="form" :rules="rules" label-width="80px" :model="form">
<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-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>
</template>
<script>

View File

@ -308,6 +308,16 @@ 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 {

View File

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

View File

@ -39,7 +39,7 @@
@close="cancel"
@cancel="cancel"
@confirm="submitForm">
<DialogForm v-if="open" ref="form" :dataForm="form" :rows="rows" />
<DialogForm v-if="open" ref="form" v-model="form" />
</base-dialog>
</div>
</template>
@ -53,14 +53,15 @@ 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: {
Editor,
DialogForm,
},
mixins: [basicPageMixin],
data() {
@ -272,32 +273,38 @@ export default {
},
created() {
this.getList();
this.getProductLineList();
// this.getProductLineList();
},
watch: {
// 线
'form.productionLineId': {
form: {
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,
};
})
);
});
console.log('form change:', val);
},
immediate: true,
},
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,
// },
},
methods: {
/** 获取搜索栏的产线列表 */
@ -366,7 +373,11 @@ export default {
const id = row.id;
getQualityInspectionRecord(id).then((response) => {
/** 因为后端返回的时间是时间戳格式,需转换 */
this.form = this.filterData(response.data, Object.keys(this.form));
const info = {}
Object.keys(this.form).forEach(key => {
info[key] = response.data[key]
});
this.form = info;
this.open = true;
this.title = '修改质量检查信息记录表';
});

View File

@ -147,7 +147,7 @@ export default {
},
yAxis: {
type: 'value',
name: '单位/片',
name: '检测数量',
nameTextStyle: {
color: '#999',
fontSize: 14,

235
yarn.lock
View File

@ -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.3.1", "@babel/runtime@^7.8.4":
"@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":
"integrity" "sha512-wDb5pWm4WDdF6LFUde3Jl8WzPA+3ZbxYqkC6xAXuD3irdEHN1k0NfTRrJD8ZD378SJ61miMLCqIOXYhd8x+AJQ=="
"resolved" "https://registry.npmmirror.com/@babel/runtime/-/runtime-7.22.6.tgz"
"version" "7.22.6"
@ -1323,6 +1323,11 @@
"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"
@ -1937,7 +1942,6 @@
"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"
@ -1957,17 +1961,6 @@
"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"
@ -2418,6 +2411,11 @@ aes-decrypter@1.0.3:
"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"
@ -2700,6 +2698,11 @@ aes-decrypter@1.0.3:
"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"
@ -2891,6 +2894,20 @@ aes-decrypter@1.0.3:
"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"
@ -2901,25 +2918,10 @@ aes-decrypter@1.0.3:
"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"
@ -3211,7 +3213,6 @@ chalk@2.3.0:
"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"
@ -3221,17 +3222,6 @@ chalk@2.3.0:
"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"
@ -3528,7 +3518,7 @@ collection-visit@^1.0.0:
"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.5":
"core-js@^3.26.0", "core-js@^3.6.0", "core-js@^3.6.5", "core-js@^3.8.3":
"integrity" "sha512-2sKLtfq1eFST7l7v62zaqXacPc7uG8ZAya8ogijLhTtaKNcpzpB4TMoTw2Si+8GYKRwFPMMtUT0263QFWFfqyQ=="
"resolved" "https://registry.npmmirror.com/core-js/-/core-js-3.31.1.tgz"
"version" "3.31.1"
@ -3548,7 +3538,6 @@ collection-visit@^1.0.0:
"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"
@ -3558,17 +3547,6 @@ collection-visit@^1.0.0:
"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"
@ -3678,6 +3656,13 @@ create-ecdh@^4.0.0:
"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"
@ -4172,6 +4157,11 @@ create-ecdh@^4.0.0:
"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"
@ -4970,6 +4960,11 @@ create-ecdh@^4.0.0:
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"
@ -5152,27 +5147,10 @@ create-ecdh@^4.0.0:
"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"
@ -5732,6 +5710,14 @@ fragment-cache@^0.2.1:
"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"
@ -6591,6 +6577,21 @@ fragment-cache@^0.2.1:
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"
@ -8798,6 +8799,13 @@ fragment-cache@^0.2.1:
"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"
@ -8911,7 +8919,7 @@ fragment-cache@^0.2.1:
"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.11", "regenerator-runtime@^0.13.7":
"integrity" "sha512-kY1AZVr2Ra+t+piVaJ4gxaFaReZVH40AKNo7UCX6W+dEwBo/2oZJzqfuN1qLq1oL45o56cPaTXELwrTh8Fpggg=="
"resolved" "https://registry.npmmirror.com/regenerator-runtime/-/regenerator-runtime-0.13.11.tgz"
"version" "0.13.11"
@ -9113,6 +9121,11 @@ fragment-cache@^0.2.1:
"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"
@ -9718,24 +9731,10 @@ fragment-cache@^0.2.1:
"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"
@ -9808,6 +9807,11 @@ sshpk@^1.7.0:
"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"
@ -10107,6 +10111,11 @@ sshpk@^1.7.0:
"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"
@ -10242,6 +10251,13 @@ sshpk@^1.7.0:
"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"
@ -10740,6 +10756,13 @@ sshpk@^1.7.0:
"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"
@ -11194,32 +11217,10 @@ sshpk@^1.7.0:
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"
@ -11279,30 +11280,10 @@ worker-farm@^1.7.0:
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"