Merge branch 'test' into lb
This commit is contained in:
commit
ca0f62b2eb
@ -144,11 +144,6 @@ export default {
|
|||||||
// this.listQuery.lineId = '1672847052717821953'
|
// this.listQuery.lineId = '1672847052717821953'
|
||||||
// this.listQuery.startTime = '1693497600000';
|
// this.listQuery.startTime = '1693497600000';
|
||||||
// this.listQuery.endTime = '1693843200000';
|
// this.listQuery.endTime = '1693843200000';
|
||||||
this.tableData.splice(0)
|
|
||||||
this.xData.splice(0)
|
|
||||||
this.yData.splice(0)
|
|
||||||
this.tableProps.splice(0)
|
|
||||||
this.spanArr.splice(0)
|
|
||||||
this.urlOptions.getDataListURL(this.listQuery).then(res => {
|
this.urlOptions.getDataListURL(this.listQuery).then(res => {
|
||||||
console.log(res)
|
console.log(res)
|
||||||
let arr = [
|
let arr = [
|
||||||
@ -228,11 +223,17 @@ export default {
|
|||||||
this.listQuery.lineId = val.lineIds
|
this.listQuery.lineId = val.lineIds
|
||||||
this.listQuery.startTime = val.time ? String(new Date(val.time[0]).getTime()) : undefined;
|
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.listQuery.endTime = val.time ? String(new Date(val.time[1]).getTime()) : undefined;
|
||||||
if (val.time) {
|
if (val.time && val.lineIds) {
|
||||||
|
this.tableData = []
|
||||||
|
this.xData = []
|
||||||
|
this.yData = []
|
||||||
|
this.tableProps = []
|
||||||
|
this.spanArr = []
|
||||||
|
this.timeList = []
|
||||||
this.getData()
|
this.getData()
|
||||||
} else {
|
} else {
|
||||||
this.$message({
|
this.$message({
|
||||||
message: '请选择时间',
|
message: '请选择产线和时间',
|
||||||
type: 'warning'
|
type: 'warning'
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -72,7 +72,7 @@ export default {
|
|||||||
{
|
{
|
||||||
type: 'datePicker',
|
type: 'datePicker',
|
||||||
label: '时间',
|
label: '时间',
|
||||||
dateType: 'datetime',
|
dateType: 'month',
|
||||||
format: 'yyyy-MM-dd',
|
format: 'yyyy-MM-dd',
|
||||||
valueFormat: 'yyyy-MM-dd HH:mm:ss',
|
valueFormat: 'yyyy-MM-dd HH:mm:ss',
|
||||||
rangeSeparator: '-',
|
rangeSeparator: '-',
|
||||||
@ -220,7 +220,6 @@ export default {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
buttonClick(val) {
|
buttonClick(val) {
|
||||||
// console.log(val)
|
|
||||||
switch (val.btnName) {
|
switch (val.btnName) {
|
||||||
case 'search':
|
case 'search':
|
||||||
this.listQuery.lineIds = val.lineIds ? val.lineIds :undefined
|
this.listQuery.lineIds = val.lineIds ? val.lineIds :undefined
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
* @Author: zwq
|
* @Author: zwq
|
||||||
* @Date: 2023-08-03 14:09:18
|
* @Date: 2023-08-03 14:09:18
|
||||||
* @LastEditors: DY
|
* @LastEditors: DY
|
||||||
* @LastEditTime: 2023-10-10 16:54:09
|
* @LastEditTime: 2023-10-11 11:20:51
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
<template>
|
<template>
|
||||||
@ -61,6 +61,7 @@ export default {
|
|||||||
switchLineBindProduct(data).then((response) => {
|
switchLineBindProduct(data).then((response) => {
|
||||||
this.$modal.msgSuccess('修改成功');
|
this.$modal.msgSuccess('修改成功');
|
||||||
this.visible = false;
|
this.visible = false;
|
||||||
|
this.list.productName = this.list.string.split('+')[1]
|
||||||
this.$emit('emitData');
|
this.$emit('emitData');
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<!--
|
<!--
|
||||||
* @Author: Do not edit
|
* @Author: Do not edit
|
||||||
* @Date: 2023-08-29 14:59:29
|
* @Date: 2023-08-29 14:59:29
|
||||||
* @LastEditTime: 2023-10-09 09:08:08
|
* @LastEditTime: 2023-10-12 16:54:15
|
||||||
* @LastEditors: DY
|
* @LastEditors: DY
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
@ -117,6 +117,7 @@ export default {
|
|||||||
pageNo: 1,
|
pageNo: 1,
|
||||||
total: 1,
|
total: 1,
|
||||||
},
|
},
|
||||||
|
fileName: '',
|
||||||
exportLoading: false,
|
exportLoading: false,
|
||||||
dataListLoading: false,
|
dataListLoading: false,
|
||||||
dialogVisible: false,
|
dialogVisible: false,
|
||||||
@ -207,6 +208,7 @@ export default {
|
|||||||
test() {
|
test() {
|
||||||
var target = document.getElementsByClassName("right-aside")[0]
|
var target = document.getElementsByClassName("right-aside")[0]
|
||||||
target.style.background = '#FFFFFF'
|
target.style.background = '#FFFFFF'
|
||||||
|
var that = this
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
html2canvas(target).then(function(canvas) {
|
html2canvas(target).then(function(canvas) {
|
||||||
var contentWidth = canvas.width
|
var contentWidth = canvas.width
|
||||||
@ -242,7 +244,7 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pdf.save('产线统计自动报表.pdf')
|
pdf.save(that.fileName + '产线产量.pdf')
|
||||||
})
|
})
|
||||||
}, 300)
|
}, 300)
|
||||||
},
|
},
|
||||||
@ -285,7 +287,7 @@ export default {
|
|||||||
try {
|
try {
|
||||||
FileSaver.saveAs(new Blob([exportTableOut], {
|
FileSaver.saveAs(new Blob([exportTableOut], {
|
||||||
type: 'application/octet-stream'
|
type: 'application/octet-stream'
|
||||||
}), '产线统计自动报表.xlsx')
|
}), this.fileName + '产线产量.xlsx')
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
if (typeof console !== 'undefined') console.log(e, exportTableOut)
|
if (typeof console !== 'undefined') console.log(e, exportTableOut)
|
||||||
}
|
}
|
||||||
@ -310,6 +312,9 @@ export default {
|
|||||||
this.listQuery.reportType = val.reportType ? val.reportType : undefined;
|
this.listQuery.reportType = val.reportType ? val.reportType : undefined;
|
||||||
this.listQuery.reportStartTime = val.timeVal ? [new Date(val.timeVal[0]).getTime()] : undefined;
|
this.listQuery.reportStartTime = val.timeVal ? [new Date(val.timeVal[0]).getTime()] : undefined;
|
||||||
this.listQuery.reportEndTime = val.timeVal ? [new Date(val.timeVal[1]).getTime()] : undefined;
|
this.listQuery.reportEndTime = val.timeVal ? [new Date(val.timeVal[1]).getTime()] : undefined;
|
||||||
|
if (val.timeVal && val.timeVal.length > 0) {
|
||||||
|
this.fileName = val.timeVal[0].slice(0, 10) + '-' + val.timeVal[1].slice(0, 10) + '_'
|
||||||
|
}
|
||||||
this.getDataList();
|
this.getDataList();
|
||||||
break;
|
break;
|
||||||
case 'export':
|
case 'export':
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<!--
|
<!--
|
||||||
* @Author: Do not edit
|
* @Author: Do not edit
|
||||||
* @Date: 2023-08-29 14:59:29
|
* @Date: 2023-08-29 14:59:29
|
||||||
* @LastEditTime: 2023-10-09 15:14:42
|
* @LastEditTime: 2023-10-12 16:51:54
|
||||||
* @LastEditors: DY
|
* @LastEditors: DY
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
@ -110,7 +110,7 @@ export default {
|
|||||||
showData: [],
|
showData: [],
|
||||||
tableData: [],
|
tableData: [],
|
||||||
selectedList: [],
|
selectedList: [],
|
||||||
fileName: [],
|
fileName: '',
|
||||||
formConfig: [
|
formConfig: [
|
||||||
{
|
{
|
||||||
type: 'select',
|
type: 'select',
|
||||||
@ -156,7 +156,7 @@ export default {
|
|||||||
}
|
}
|
||||||
// const time = new Date()
|
// const time = new Date()
|
||||||
// this.formConfig[1].defaultSelect = [time, time]
|
// this.formConfig[1].defaultSelect = [time, time]
|
||||||
// this.getDataList()
|
this.getDataList()
|
||||||
this.getPdLineList()
|
this.getPdLineList()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
@ -199,7 +199,7 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pdf.save(that.fileName[0] + '-' + that.fileName[1] + '_产线产量.pdf')
|
pdf.save(that.fileName + '产线产量.pdf')
|
||||||
})
|
})
|
||||||
}, 300)
|
}, 300)
|
||||||
},
|
},
|
||||||
@ -222,7 +222,7 @@ export default {
|
|||||||
try {
|
try {
|
||||||
FileSaver.saveAs(new Blob([exportTableOut], {
|
FileSaver.saveAs(new Blob([exportTableOut], {
|
||||||
type: 'application/octet-stream'
|
type: 'application/octet-stream'
|
||||||
}), this.fileName[0] + '-' + this.fileName[1] + '_产线产量.xlsx')
|
}), this.fileName + '产线产量.xlsx')
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
if (typeof console !== 'undefined') console.log(e, exportTableOut)
|
if (typeof console !== 'undefined') console.log(e, exportTableOut)
|
||||||
}
|
}
|
||||||
@ -265,17 +265,10 @@ export default {
|
|||||||
this.listQuery.proLineId = val.line ? val.line : undefined;
|
this.listQuery.proLineId = val.line ? val.line : undefined;
|
||||||
this.listQuery.startTime = val.timeVal ? new Date(val.timeVal[0]).getTime() : undefined;
|
this.listQuery.startTime = val.timeVal ? new Date(val.timeVal[0]).getTime() : undefined;
|
||||||
this.listQuery.endTime = val.timeVal ? new Date(val.timeVal[1]).getTime() : undefined;
|
this.listQuery.endTime = val.timeVal ? new Date(val.timeVal[1]).getTime() : undefined;
|
||||||
console.log('nihc 你好', val.timeVal)
|
|
||||||
if (val.timeVal && val.timeVal.length > 0) {
|
if (val.timeVal && val.timeVal.length > 0) {
|
||||||
this.fileName[0] = val.timeVal[0].slice(0, 10)
|
this.fileName = val.timeVal[0].slice(0, 10) + '-' + val.timeVal[1].slice(0, 10) + '_'
|
||||||
this.fileName[1] = val.timeVal[1].slice(0, 10)
|
|
||||||
this.getDataList();
|
|
||||||
} else {
|
|
||||||
this.$message({
|
|
||||||
message: '请选择时间',
|
|
||||||
type: 'warning'
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
this.getDataList();
|
||||||
break;
|
break;
|
||||||
case 'export':
|
case 'export':
|
||||||
this.handleExport();
|
this.handleExport();
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<!--
|
<!--
|
||||||
* @Author: Do not edit
|
* @Author: Do not edit
|
||||||
* @Date: 2023-08-29 14:59:29
|
* @Date: 2023-08-29 14:59:29
|
||||||
* @LastEditTime: 2023-10-08 10:51:49
|
* @LastEditTime: 2023-10-12 16:35:49
|
||||||
* @LastEditors: DY
|
* @LastEditors: DY
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
@ -129,6 +129,7 @@ export default {
|
|||||||
tableBtn: [],
|
tableBtn: [],
|
||||||
tableData: [],
|
tableData: [],
|
||||||
showData: [],
|
showData: [],
|
||||||
|
fileName: '',
|
||||||
formConfig: [
|
formConfig: [
|
||||||
{
|
{
|
||||||
type: 'select',
|
type: 'select',
|
||||||
@ -200,6 +201,7 @@ export default {
|
|||||||
test() {
|
test() {
|
||||||
var target = document.getElementsByClassName("right-aside")[0]
|
var target = document.getElementsByClassName("right-aside")[0]
|
||||||
target.style.background = '#FFFFFF'
|
target.style.background = '#FFFFFF'
|
||||||
|
var that = this
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
html2canvas(target).then(function(canvas) {
|
html2canvas(target).then(function(canvas) {
|
||||||
var contentWidth = canvas.width
|
var contentWidth = canvas.width
|
||||||
@ -235,7 +237,7 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pdf.save('工段统计自动报表.pdf')
|
pdf.save(that.fileName + '工段统计.pdf')
|
||||||
})
|
})
|
||||||
}, 300)
|
}, 300)
|
||||||
},
|
},
|
||||||
@ -258,7 +260,7 @@ export default {
|
|||||||
try {
|
try {
|
||||||
FileSaver.saveAs(new Blob([exportTableOut], {
|
FileSaver.saveAs(new Blob([exportTableOut], {
|
||||||
type: 'application/octet-stream'
|
type: 'application/octet-stream'
|
||||||
}), '工段统计自动报表.xlsx')
|
}), this.fileName + '工段统计.xlsx')
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
if (typeof console !== 'undefined') console.log(e, exportTableOut)
|
if (typeof console !== 'undefined') console.log(e, exportTableOut)
|
||||||
}
|
}
|
||||||
@ -307,6 +309,9 @@ export default {
|
|||||||
this.listQuery.reportType = val.reportType ? val.reportType : undefined;
|
this.listQuery.reportType = val.reportType ? val.reportType : undefined;
|
||||||
this.listQuery.reportStartTime = val.timeVal ? [new Date(val.timeVal[0]).getTime()] : undefined;
|
this.listQuery.reportStartTime = val.timeVal ? [new Date(val.timeVal[0]).getTime()] : undefined;
|
||||||
this.listQuery.reportEndTime = val.timeVal ? [new Date(val.timeVal[1]).getTime()] : undefined;
|
this.listQuery.reportEndTime = val.timeVal ? [new Date(val.timeVal[1]).getTime()] : undefined;
|
||||||
|
if (val.timeVal && val.timeVal.length > 0) {
|
||||||
|
this.fileName = val.timeVal[0].slice(0, 10) + '-' + val.timeVal[1].slice(0, 10) + '_'
|
||||||
|
}
|
||||||
this.getDataList();
|
this.getDataList();
|
||||||
break;
|
break;
|
||||||
case 'export':
|
case 'export':
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
<search-bar
|
<search-bar
|
||||||
:formConfigs="formConfig"
|
:formConfigs="formConfig"
|
||||||
ref="searchBarForm"
|
ref="searchBarForm"
|
||||||
|
@select-changed="handleSearchBarChanged"
|
||||||
@headBtnClick="buttonClick" />
|
@headBtnClick="buttonClick" />
|
||||||
<base-table
|
<base-table
|
||||||
class="right-aside"
|
class="right-aside"
|
||||||
@ -110,6 +111,7 @@ export default {
|
|||||||
param: 'proLineId',
|
param: 'proLineId',
|
||||||
defaultSelect: '',
|
defaultSelect: '',
|
||||||
filterable: true,
|
filterable: true,
|
||||||
|
onchange: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: 'select',
|
type: 'select',
|
||||||
@ -151,9 +153,39 @@ export default {
|
|||||||
// this.getDataList()
|
// this.getDataList()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
/** 根据产线获取工段 */
|
||||||
|
async getWorksectionById(lineId) {
|
||||||
|
const { code, data } = await this.$axios({
|
||||||
|
url: '/base/workshop-section/listByParentId',
|
||||||
|
method: 'get',
|
||||||
|
params: {
|
||||||
|
id: lineId,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
if (code == 0) {
|
||||||
|
this.formConfig[1].selectOptions = data.map((item) => {
|
||||||
|
return {
|
||||||
|
name: item.name,
|
||||||
|
id: item.id,
|
||||||
|
};
|
||||||
|
});
|
||||||
|
}
|
||||||
|
},
|
||||||
|
handleSearchBarChanged({ param, value }) {
|
||||||
|
if (!value) {
|
||||||
|
this.formConfig[1].selectOptions = [];
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
switch (param) {
|
||||||
|
case 'proLineId':
|
||||||
|
this.getWorksectionById(value);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
},
|
||||||
test() {
|
test() {
|
||||||
var target = document.getElementsByClassName("right-aside")[0]
|
var target = document.getElementsByClassName("right-aside")[0]
|
||||||
target.style.background = '#FFFFFF'
|
target.style.background = '#FFFFFF'
|
||||||
|
var that = this
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
html2canvas(target).then(function(canvas) {
|
html2canvas(target).then(function(canvas) {
|
||||||
var contentWidth = canvas.width
|
var contentWidth = canvas.width
|
||||||
@ -189,7 +221,7 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pdf.save('工段统计数据查询报表.pdf')
|
pdf.save(that.fileName[0] + '-' + that.fileName[1] + '_工段统计.pdf')
|
||||||
})
|
})
|
||||||
}, 300)
|
}, 300)
|
||||||
},
|
},
|
||||||
@ -212,7 +244,7 @@ export default {
|
|||||||
try {
|
try {
|
||||||
FileSaver.saveAs(new Blob([exportTableOut], {
|
FileSaver.saveAs(new Blob([exportTableOut], {
|
||||||
type: 'application/octet-stream'
|
type: 'application/octet-stream'
|
||||||
}), '工段统计数据查询报表.xlsx')
|
}), this.fileName[0] + '-' + this.fileName[1] + '_工段统计.xlsx')
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
if (typeof console !== 'undefined') console.log(e, exportTableOut)
|
if (typeof console !== 'undefined') console.log(e, exportTableOut)
|
||||||
}
|
}
|
||||||
@ -293,10 +325,9 @@ export default {
|
|||||||
this.listQuery.sectionId = val.sectionId ? val.sectionId : undefined
|
this.listQuery.sectionId = val.sectionId ? val.sectionId : undefined
|
||||||
this.listQuery.startTime = val.timeSlot ? new Date(val.timeSlot[0]).getTime() : undefined
|
this.listQuery.startTime = val.timeSlot ? new Date(val.timeSlot[0]).getTime() : undefined
|
||||||
this.listQuery.endTime = val.timeSlot ? new Date(val.timeSlot[1]).getTime() : undefined
|
this.listQuery.endTime = val.timeSlot ? new Date(val.timeSlot[1]).getTime() : undefined
|
||||||
this.fileName[0] = val.timeSlot[0]
|
if (val.timeSlot && val.timeSlot.length > 0) {
|
||||||
this.fileName[1] = val.timeSlot[1]
|
this.fileName[0] = val.timeSlot[0].slice(0, 10)
|
||||||
console.log('wfjmmki文件名称', this.fileName)
|
this.fileName[1] = val.timeSlot[1].slice(0, 10)
|
||||||
if (val.timeSlot) {
|
|
||||||
this.getDataList()
|
this.getDataList()
|
||||||
} else {
|
} else {
|
||||||
this.$message({
|
this.$message({
|
||||||
@ -315,7 +346,14 @@ export default {
|
|||||||
this.getDataList();
|
this.getDataList();
|
||||||
break;
|
break;
|
||||||
case 'export':
|
case 'export':
|
||||||
this.handleExport();
|
if (val.timeSlot && val.timeSlot.length > 0) {
|
||||||
|
this.handleExport();
|
||||||
|
} else {
|
||||||
|
this.$message({
|
||||||
|
message: '请选择时间',
|
||||||
|
type: 'warning'
|
||||||
|
});
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
console.log(val);
|
console.log(val);
|
||||||
|
@ -97,6 +97,22 @@ export default {
|
|||||||
trigger: 'axis',
|
trigger: 'axis',
|
||||||
axisPointer: {
|
axisPointer: {
|
||||||
type: 'shadow'
|
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: {
|
grid: {
|
||||||
@ -106,7 +122,11 @@ export default {
|
|||||||
containLabel: true
|
containLabel: true
|
||||||
},
|
},
|
||||||
legend: {
|
legend: {
|
||||||
data: legendData
|
data: legendData,
|
||||||
|
right: '1%',
|
||||||
|
icon: 'rect',
|
||||||
|
itemHeight: 8,
|
||||||
|
itemWidth: 8
|
||||||
},
|
},
|
||||||
xAxis: {
|
xAxis: {
|
||||||
type: 'category',
|
type: 'category',
|
||||||
|
@ -103,7 +103,8 @@ export default {
|
|||||||
containLabel: true
|
containLabel: true
|
||||||
},
|
},
|
||||||
legend: {
|
legend: {
|
||||||
data: legendData
|
data: legendData,
|
||||||
|
right: '1%'
|
||||||
},
|
},
|
||||||
xAxis: {
|
xAxis: {
|
||||||
type: 'category',
|
type: 'category',
|
||||||
|
@ -425,7 +425,7 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<style>
|
<style lang='scss'>
|
||||||
/* 时间整点 */
|
/* 时间整点 */
|
||||||
.noneMinute .el-time-spinner__wrapper {
|
.noneMinute .el-time-spinner__wrapper {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
@ -433,6 +433,16 @@ export default {
|
|||||||
.noneMinute .el-scrollbar:nth-of-type(2) {
|
.noneMinute .el-scrollbar:nth-of-type(2) {
|
||||||
display: none;
|
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>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.demo-form-inline {
|
.demo-form-inline {
|
||||||
@ -446,8 +456,6 @@ export default {
|
|||||||
margin-top: 12px;
|
margin-top: 12px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
|
||||||
<style scoped>
|
|
||||||
.searchBarBox .foldClass {
|
.searchBarBox .foldClass {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 14px;
|
top: 14px;
|
||||||
|
@ -15,7 +15,7 @@ export default {
|
|||||||
return {
|
return {
|
||||||
chartDom: '',
|
chartDom: '',
|
||||||
chart: '',
|
chart: '',
|
||||||
chartHeight: this.tableHeight(350)
|
chartHeight: this.tableHeight(370)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
@ -34,7 +34,7 @@ export default {
|
|||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
window.addEventListener('resize', () => {
|
window.addEventListener('resize', () => {
|
||||||
this.chartHeight = this.tableHeight(350)
|
this.chartHeight = this.tableHeight(370)
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
@ -86,17 +86,35 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
var option = {
|
var option = {
|
||||||
// title: {
|
|
||||||
// text: 'World Population'
|
|
||||||
// },
|
|
||||||
color:['#288AFF','#8EF0AB'],
|
color:['#288AFF','#8EF0AB'],
|
||||||
tooltip: {
|
tooltip: {
|
||||||
trigger: 'axis',
|
trigger: 'axis',
|
||||||
axisPointer: {
|
axisPointer: {
|
||||||
type: 'shadow'
|
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: {
|
grid: {
|
||||||
left: '1%',
|
left: '1%',
|
||||||
right: '1%',
|
right: '1%',
|
||||||
|
@ -194,13 +194,23 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<style>
|
<style lang='scss'>
|
||||||
/* 级联选择器 */
|
/* 级联选择器 */
|
||||||
.cascaderParent .el-cascader-panel .el-scrollbar:first-child .el-radio {
|
.cascaderParent .el-cascader-panel .el-scrollbar:first-child .el-radio {
|
||||||
display: none;
|
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>
|
||||||
<style scoped>
|
<style lang="scss" scoped>
|
||||||
.separateStyle {
|
.separateStyle {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
width: 1px;
|
width: 1px;
|
||||||
@ -208,8 +218,6 @@ export default {
|
|||||||
background: #E8E8E8;
|
background: #E8E8E8;
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
}
|
}
|
||||||
</style>
|
|
||||||
<style lang="scss" scoped>
|
|
||||||
.demo-form-inline {
|
.demo-form-inline {
|
||||||
.blue-block {
|
.blue-block {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
|
@ -9,7 +9,8 @@
|
|||||||
:table-data="list"
|
:table-data="list"
|
||||||
class="qoq-out-table"
|
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"/>
|
<line-chart ref="analysisLineChart" :chartData="chartData"/>
|
||||||
</div>
|
</div>
|
||||||
</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>
|
@ -68,12 +68,6 @@ export default {
|
|||||||
}
|
}
|
||||||
var option = {
|
var option = {
|
||||||
color:['#288AFF'],
|
color:['#288AFF'],
|
||||||
tooltip: {
|
|
||||||
trigger: 'axis',
|
|
||||||
axisPointer: {
|
|
||||||
type: 'shadow'
|
|
||||||
}
|
|
||||||
},
|
|
||||||
grid: {
|
grid: {
|
||||||
left: '4%',
|
left: '4%',
|
||||||
right: '1%',
|
right: '1%',
|
||||||
|
@ -70,9 +70,9 @@ export default {
|
|||||||
|
|
||||||
var option = {
|
var option = {
|
||||||
color:['#288AFF'],
|
color:['#288AFF'],
|
||||||
tooltip: {
|
// tooltip: {
|
||||||
trigger: 'axis'
|
// trigger: 'axis'
|
||||||
},
|
// },
|
||||||
grid: {
|
grid: {
|
||||||
left: '4%',
|
left: '4%',
|
||||||
right: '1%',
|
right: '1%',
|
||||||
|
@ -385,7 +385,7 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<style>
|
<style lang='scss'>
|
||||||
/* 级联选择器 */
|
/* 级联选择器 */
|
||||||
.cascaderParent .el-cascader-panel .el-scrollbar:first-child .el-radio {
|
.cascaderParent .el-cascader-panel .el-scrollbar:first-child .el-radio {
|
||||||
display: none;
|
display: none;
|
||||||
@ -397,6 +397,16 @@ export default {
|
|||||||
.noneMinute .el-scrollbar:nth-of-type(2) {
|
.noneMinute .el-scrollbar:nth-of-type(2) {
|
||||||
display: none;
|
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>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.demo-form-inline {
|
.demo-form-inline {
|
||||||
@ -410,8 +420,6 @@ export default {
|
|||||||
margin-top: 12px;
|
margin-top: 12px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
|
||||||
<style scoped>
|
|
||||||
.searchBarBox .foldClass {
|
.searchBarBox .foldClass {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 14px;
|
top: 14px;
|
||||||
|
@ -77,7 +77,8 @@ export default {
|
|||||||
var option = {
|
var option = {
|
||||||
color:['#FFDC94','#8EF0AB','#63BDFF','#288AFF','#7164FF','#FF6860','#FF9747','#B0EB42','#D680FF','#0043D2'],
|
color:['#FFDC94','#8EF0AB','#63BDFF','#288AFF','#7164FF','#FF6860','#FF9747','#B0EB42','#D680FF','#0043D2'],
|
||||||
legend: {
|
legend: {
|
||||||
data: keys
|
data: keys,
|
||||||
|
right:'1%'
|
||||||
},
|
},
|
||||||
tooltip: {
|
tooltip: {
|
||||||
trigger: 'axis'
|
trigger: 'axis'
|
||||||
|
@ -125,7 +125,31 @@ export default {
|
|||||||
this.$emit('submit', this.queryParams)
|
this.$emit('submit', this.queryParams)
|
||||||
},
|
},
|
||||||
exportData() {
|
exportData() {
|
||||||
this.$emit('exportD')
|
let name
|
||||||
|
if (this.queryParams.objId) {
|
||||||
|
name = this.getObjName(this.objList, this.queryParams.objId)
|
||||||
|
} else {
|
||||||
|
this.$modal.msgWarning("对象不能为空")
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
this.$emit('exportD', {name: name})
|
||||||
|
},
|
||||||
|
// 递归取对象name
|
||||||
|
getObjName(list, id) {
|
||||||
|
let _this = this
|
||||||
|
for (let i = 0; i < list.length; i++) {
|
||||||
|
let a = list[i]
|
||||||
|
if (a.id === id) {
|
||||||
|
return a.name
|
||||||
|
} else {
|
||||||
|
if (a.children && a.children.length > 0) {
|
||||||
|
let res = _this.getObjName(a.children, id)
|
||||||
|
if (res) {
|
||||||
|
return res
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
transformTime(timeStamp) {// 本月最后一天
|
transformTime(timeStamp) {// 本月最后一天
|
||||||
let year = moment(timeStamp).format('YYYY')
|
let year = moment(timeStamp).format('YYYY')
|
||||||
@ -143,19 +167,20 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<style>
|
<style lang='scss'>
|
||||||
/* 级联选择器 */
|
/* 级联选择器 */
|
||||||
.cascaderParent .el-cascader-panel .el-scrollbar:first-child .el-radio {
|
.cascaderParent .el-cascader-panel .el-scrollbar:first-child .el-radio {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
</style>
|
.demo-form-inline {
|
||||||
<style scoped>
|
.el-date-editor .el-range__icon {
|
||||||
.separateStyle {
|
font-size: 16px;
|
||||||
display: inline-block;
|
color: #0B58FF;
|
||||||
width: 1px;
|
}
|
||||||
height: 24px;
|
.el-input__prefix .el-icon-date {
|
||||||
background: #E8E8E8;
|
font-size: 16px;
|
||||||
vertical-align: middle;
|
color: #0B58FF;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
@ -170,4 +195,11 @@ export default {
|
|||||||
margin-top: 10px;
|
margin-top: 10px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.separateStyle {
|
||||||
|
display: inline-block;
|
||||||
|
width: 1px;
|
||||||
|
height: 24px;
|
||||||
|
background: #E8E8E8;
|
||||||
|
vertical-align: middle;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
@ -3,6 +3,7 @@
|
|||||||
<!-- 搜索工作栏 -->
|
<!-- 搜索工作栏 -->
|
||||||
<search-area @submit="getList" @exportD="exportData"/>
|
<search-area @submit="getList" @exportD="exportData"/>
|
||||||
<div v-show='chartData.length'>
|
<div v-show='chartData.length'>
|
||||||
|
<div class="chartTitle">同比分析图</div>
|
||||||
<div style='width: 100%;height: 400px;'>
|
<div style='width: 100%;height: 400px;'>
|
||||||
<line-chart ref="analysisLineChart" :chartData="chartData"/>
|
<line-chart ref="analysisLineChart" :chartData="chartData"/>
|
||||||
</div>
|
</div>
|
||||||
@ -33,12 +34,12 @@ export default {
|
|||||||
chartData: [],
|
chartData: [],
|
||||||
tableProps: [],
|
tableProps: [],
|
||||||
list: [],
|
list: [],
|
||||||
tableH: this.tableHeight(600)
|
tableH: this.tableHeight(640)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
window.addEventListener('resize', () => {
|
window.addEventListener('resize', () => {
|
||||||
this.tableH = this.tableHeight(600)
|
this.tableH = this.tableHeight(640)
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
@ -99,9 +100,10 @@ export default {
|
|||||||
}
|
}
|
||||||
this.chartData = this.list
|
this.chartData = this.list
|
||||||
},
|
},
|
||||||
exportData() {
|
exportData(val) {
|
||||||
if (this.list.length > 0) {
|
if (this.list.length > 0) {
|
||||||
var wb = XLSX.utils.table_to_book(document.querySelector(".yoy-out-table"))
|
var wb = XLSX.utils.table_to_book(document.querySelector(".yoy-out-table"))
|
||||||
|
let fileName = val.name + "同比分析.xlsx"
|
||||||
var wbout = XLSX.write(wb, {
|
var wbout = XLSX.write(wb, {
|
||||||
bookType: "xlsx",
|
bookType: "xlsx",
|
||||||
bookSST: true,
|
bookSST: true,
|
||||||
@ -110,7 +112,7 @@ export default {
|
|||||||
try {
|
try {
|
||||||
FileSaver.saveAs(
|
FileSaver.saveAs(
|
||||||
new Blob([wbout], { type: "application/octet-stream" }),
|
new Blob([wbout], { type: "application/octet-stream" }),
|
||||||
"同比分析.xlsx"
|
fileName
|
||||||
)
|
)
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
if (typeof console !== "undefined") console.log(e, wbout);
|
if (typeof console !== "undefined") console.log(e, wbout);
|
||||||
@ -122,4 +124,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>
|
@ -130,7 +130,7 @@ export default {
|
|||||||
this.plcTableName = data.plcTableName
|
this.plcTableName = data.plcTableName
|
||||||
this.objName = data.objName
|
this.objName = data.objName
|
||||||
this.getList()
|
this.getList()
|
||||||
if (title === 'view') {
|
if (title === 'detail') {
|
||||||
this.showBtn = false
|
this.showBtn = false
|
||||||
this.tableBtn = []
|
this.tableBtn = []
|
||||||
} else {
|
} else {
|
||||||
|
@ -113,22 +113,22 @@ export default {
|
|||||||
],
|
],
|
||||||
tableProps,
|
tableProps,
|
||||||
tableBtn: [
|
tableBtn: [
|
||||||
|
this.$auth.hasPermi('base:energy-plc-connect:bind')
|
||||||
|
? {
|
||||||
|
type: 'connect',
|
||||||
|
btnName: '绑定'
|
||||||
|
}
|
||||||
|
: undefined,
|
||||||
|
{
|
||||||
|
type: 'detail',
|
||||||
|
btnName: '详情'
|
||||||
|
},
|
||||||
this.$auth.hasPermi('base:energy-plc-connect:update')
|
this.$auth.hasPermi('base:energy-plc-connect:update')
|
||||||
? {
|
? {
|
||||||
type: 'edit',
|
type: 'edit',
|
||||||
btnName: '编辑'
|
btnName: '编辑'
|
||||||
}
|
}
|
||||||
: undefined,
|
: undefined,
|
||||||
{
|
|
||||||
type: 'view',
|
|
||||||
btnName: '查看'
|
|
||||||
},
|
|
||||||
this.$auth.hasPermi('base:energy-plc-connect:bind')
|
|
||||||
? {
|
|
||||||
type: 'connect',
|
|
||||||
btnName: '绑定'
|
|
||||||
}
|
|
||||||
: undefined,
|
|
||||||
this.$auth.hasPermi('base:energy-plc-connect:delete')
|
this.$auth.hasPermi('base:energy-plc-connect:delete')
|
||||||
? {
|
? {
|
||||||
type: 'delete',
|
type: 'delete',
|
||||||
@ -205,10 +205,10 @@ export default {
|
|||||||
case 'delete':
|
case 'delete':
|
||||||
this.handleDelete(val.data)
|
this.handleDelete(val.data)
|
||||||
break
|
break
|
||||||
case 'view':
|
case 'detail':
|
||||||
this.paramVisible = true
|
this.paramVisible = true
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$refs.plcParam.init(val.data, 'view')
|
this.$refs.plcParam.init(val.data, 'detail')
|
||||||
})
|
})
|
||||||
break
|
break
|
||||||
default:
|
default:
|
||||||
|
@ -1,54 +1,72 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-form ref="form" :rules="rules" label-width="110px" :model="form">
|
<el-form ref="form" :rules="rules" label-width="110px" :model="form">
|
||||||
<el-form-item label="监控对象" prop="objectId">
|
<el-row>
|
||||||
<el-cascader
|
<el-col :span="12">
|
||||||
style='width: 100%;'
|
<el-form-item label="监控对象" prop="objectId">
|
||||||
v-model="objIds"
|
<el-cascader
|
||||||
:options="objList"
|
style='width: 100%;'
|
||||||
:props="{ checkStrictly: true, value: 'id', label: 'name' }"
|
v-model="objIds"
|
||||||
popper-class="cascaderParent"
|
:options="objList"
|
||||||
@change="selectObj"
|
:props="{ checkStrictly: true, value: 'id', label: 'name' }"
|
||||||
clearable></el-cascader>
|
popper-class="cascaderParent"
|
||||||
</el-form-item>
|
@change="selectObj"
|
||||||
<el-form-item label="能源类型" prop="energyTypeId">
|
clearable></el-cascader>
|
||||||
<el-select v-model="form.energyTypeId" placeholder="请选择" style="width: 100%;" @change="toggleType">
|
</el-form-item>
|
||||||
<el-option
|
</el-col>
|
||||||
v-for="item in this.energyTypeList"
|
<el-col :span="12">
|
||||||
:key="item.id"
|
<el-form-item label="能源类型" prop="energyTypeId">
|
||||||
:label="item.name"
|
<el-select v-model="form.energyTypeId" placeholder="请选择" style="width: 100%;" @change="toggleType">
|
||||||
:value="item.id">
|
<el-option
|
||||||
</el-option>
|
v-for="item in this.energyTypeList"
|
||||||
</el-select>
|
:key="item.id"
|
||||||
</el-form-item>
|
:label="item.name"
|
||||||
<el-form-item label="监控模式" prop="type">
|
:value="item.id">
|
||||||
<el-select v-model="form.type" placeholder="请选择" style="width: 100%;" @change="typeChange">
|
</el-option>
|
||||||
<el-option label="合并" :value= "1" ></el-option>
|
</el-select>
|
||||||
<el-option label="详细" :value= "2" ></el-option>
|
</el-form-item>
|
||||||
</el-select>
|
</el-col>
|
||||||
</el-form-item>
|
</el-row>
|
||||||
<el-form-item label="监控详细参数" prop="type" v-if="form.type === 2">
|
<el-row>
|
||||||
<el-select v-model="form.plcParamId" placeholder="请选择" style="width: 100%;" @change="selectDetail">
|
<el-col :span="12">
|
||||||
<el-option
|
<el-form-item label="监控模式" prop="type">
|
||||||
v-for="item in detailList"
|
<el-select v-model="form.type" placeholder="请选择" style="width: 100%;" @change="typeChange">
|
||||||
:key="item.id"
|
<el-option label="合并" :value= "1" ></el-option>
|
||||||
:label="item.name"
|
<el-option label="详细" :value= "2" ></el-option>
|
||||||
:value="item.id">
|
</el-select>
|
||||||
</el-option>
|
</el-form-item>
|
||||||
</el-select>
|
</el-col>
|
||||||
</el-form-item>
|
<el-col :span="12">
|
||||||
<el-form-item label="指标类型" prop="limitType">
|
<el-form-item label="监控详细参数" prop="type" v-if="form.type === 2">
|
||||||
<el-select v-model="form.limitType" placeholder="请选择" style="width: 100%;">
|
<el-select v-model="form.plcParamId" placeholder="请选择" style="width: 100%;" @change="selectDetail">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in getDictDatas(DICT_TYPE.MONITOR_INDEX_TYPE)"
|
v-for="item in detailList"
|
||||||
:key="item.value"
|
:key="item.id"
|
||||||
:label="item.label"
|
:label="item.name"
|
||||||
:value="item.value">
|
:value="item.id">
|
||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="消耗量阈值" prop="limitValue">
|
</el-col>
|
||||||
<el-input-number v-model="form.limitValue" :min="0" :max="10000000000000000" style="width: 100%;"></el-input-number>
|
</el-row>
|
||||||
</el-form-item>
|
<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>
|
</el-form>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
|
@ -124,7 +124,7 @@ export default {
|
|||||||
this.energyType = data.energyType
|
this.energyType = data.energyType
|
||||||
this.energyTypeId = data.energyTypeId
|
this.energyTypeId = data.energyTypeId
|
||||||
this.getList()
|
this.getList()
|
||||||
if (title === 'view') {
|
if (title === 'detail') {
|
||||||
this.showBtn = false
|
this.showBtn = false
|
||||||
this.tableBtn = []
|
this.tableBtn = []
|
||||||
} else {
|
} else {
|
||||||
|
@ -111,22 +111,22 @@ export default {
|
|||||||
],
|
],
|
||||||
tableProps,
|
tableProps,
|
||||||
tableBtn: [
|
tableBtn: [
|
||||||
this.$auth.hasPermi('monitoring:energy-statistics:update')
|
|
||||||
? {
|
|
||||||
type: 'edit',
|
|
||||||
btnName: '编辑'
|
|
||||||
}
|
|
||||||
: undefined,
|
|
||||||
{
|
|
||||||
type: 'view',
|
|
||||||
btnName: '查看'
|
|
||||||
},
|
|
||||||
this.$auth.hasPermi('monitoring:energy-statistics:bind')
|
this.$auth.hasPermi('monitoring:energy-statistics:bind')
|
||||||
? {
|
? {
|
||||||
type: 'connect',
|
type: 'connect',
|
||||||
btnName: '绑定'
|
btnName: '绑定'
|
||||||
}
|
}
|
||||||
: undefined,
|
: undefined,
|
||||||
|
{
|
||||||
|
type: 'detail',
|
||||||
|
btnName: '详情'
|
||||||
|
},
|
||||||
|
this.$auth.hasPermi('monitoring:energy-statistics:update')
|
||||||
|
? {
|
||||||
|
type: 'edit',
|
||||||
|
btnName: '编辑'
|
||||||
|
}
|
||||||
|
: undefined,
|
||||||
this.$auth.hasPermi('monitoring:energy-statistics:delete')
|
this.$auth.hasPermi('monitoring:energy-statistics:delete')
|
||||||
? {
|
? {
|
||||||
type: 'delete',
|
type: 'delete',
|
||||||
@ -199,9 +199,9 @@ export default {
|
|||||||
case 'delete':
|
case 'delete':
|
||||||
this.handleDelete(val.data)
|
this.handleDelete(val.data)
|
||||||
break
|
break
|
||||||
case 'view':
|
case 'detail':
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$refs.plcParam.init(val.data, 'view')
|
this.$refs.plcParam.init(val.data, 'detail')
|
||||||
})
|
})
|
||||||
break
|
break
|
||||||
default:
|
default:
|
||||||
|
@ -37,7 +37,7 @@
|
|||||||
@cancel="handleCancel"
|
@cancel="handleCancel"
|
||||||
@confirm="handleConfirm"
|
@confirm="handleConfirm"
|
||||||
:before-close="handleCancel"
|
:before-close="handleCancel"
|
||||||
width='70%'
|
width='50%'
|
||||||
>
|
>
|
||||||
<group-class-add ref="classList" @successSubmit="successSubmit" />
|
<group-class-add ref="classList" @successSubmit="successSubmit" />
|
||||||
</base-dialog>
|
</base-dialog>
|
||||||
@ -108,12 +108,6 @@ export default {
|
|||||||
],
|
],
|
||||||
tableProps,
|
tableProps,
|
||||||
tableBtn: [
|
tableBtn: [
|
||||||
this.$auth.hasPermi('base:group-classes:update')
|
|
||||||
? {
|
|
||||||
type: 'edit',
|
|
||||||
btnName: '编辑'
|
|
||||||
}
|
|
||||||
: undefined,
|
|
||||||
{
|
{
|
||||||
type: 'cancel',
|
type: 'cancel',
|
||||||
btnName: '作废',
|
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')
|
this.$auth.hasPermi('base:group-classes:delete')
|
||||||
? {
|
? {
|
||||||
type: 'delete',
|
type: 'delete',
|
||||||
|
@ -1,17 +1,29 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-form ref="form" :rules="rules" label-width="80px" :model="form">
|
<el-form ref="form" :rules="rules" label-width="80px" :model="form">
|
||||||
<el-form-item label="班组名称" prop="name">
|
<el-row>
|
||||||
<el-input v-model="form.name"></el-input>
|
<el-col :span="12">
|
||||||
</el-form-item>
|
<el-form-item label="班组名称" prop="name">
|
||||||
<el-form-item label="班组编码" prop="code">
|
<el-input v-model="form.name"></el-input>
|
||||||
<el-input v-model="form.code" disabled></el-input>
|
</el-form-item>
|
||||||
</el-form-item>
|
</el-col>
|
||||||
<el-form-item label="班组人数" prop="num">
|
<el-col :span="12">
|
||||||
<el-input-number v-model="form.num" :min="1" :max="99999999" style="width: 100%;"></el-input-number>
|
<el-form-item label="班组编码" prop="code">
|
||||||
</el-form-item>
|
<el-input v-model="form.code" disabled></el-input>
|
||||||
<el-form-item label="班组组长" prop="leaderName">
|
</el-form-item>
|
||||||
<el-input v-model="form.leaderName"></el-input>
|
</el-col>
|
||||||
</el-form-item>
|
</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>
|
</el-form>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
|
@ -308,6 +308,16 @@ export default {
|
|||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<style lang='scss'>
|
<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 {
|
.groupTeamScheduling {
|
||||||
background-color: #F2F4F9;
|
background-color: #F2F4F9;
|
||||||
.operationArea {
|
.operationArea {
|
||||||
|
Loading…
Reference in New Issue
Block a user