Compare commits

..

No commits in common. "67612107eae4f6e2b7bda9e4839b27a24a36095e" and "7ec1c5f3fcd23e5cbc545af2be739515a06dbde2" have entirely different histories.

2 changed files with 25 additions and 88 deletions

View File

@ -446,7 +446,6 @@ export default {
// //
getWorksetionList() { getWorksetionList() {
// 线 // 线
// this.wsList = []
for (let i = 0; i < this.lineIds.length; i++) { for (let i = 0; i < this.lineIds.length; i++) {
this.$http({ this.$http({
// url: this.$http.adornUrl('/monitoring/workshopSection/list'), // url: this.$http.adornUrl('/monitoring/workshopSection/list'),
@ -583,8 +582,6 @@ export default {
// this.renderChart() // this.renderChart()
// }) // })
} }
}).catch((err) => {
// console.error(err)
}) })
}, },
setOptions(opts) { setOptions(opts) {
@ -595,29 +592,29 @@ export default {
if (this.chart) this.chart.setOption(this.defaultOpts, true) if (this.chart) this.chart.setOption(this.defaultOpts, true)
}, },
// //
// parseTableProps(nameData) { parseTableProps(nameData) {
// const subProps = [] const subProps = []
// const labelNameMap = new Map() const labelNameMap = new Map()
// // if (nameData.length) { // if (nameData.length) {
// // /** nameData */ // /** nameData */
// // nameData.forEach((item) => { // nameData.forEach((item) => {
// // if (!labelNameMap.get(item.name)) { // if (!labelNameMap.get(item.name)) {
// // labelNameMap.set(item.name, 1) // labelNameMap.set(item.name, 1)
// // subProps.push({ name: item.name, prop: item.name }) // subProps.push({ name: item.name, prop: item.name })
// // } // }
// // }) // })
// // } // }
// this.tableConfigDynamic = [ this.tableConfigDynamic = [
// { type: 'index', width: 100, name: i18n.t('index') }, { type: 'index', width: 100, name: i18n.t('index') },
// { name: i18n.t('pl.name'), prop: '0' }, { name: i18n.t('pl.name'), prop: '0' },
// ...Array.from(new Set(res.data.data[0].records.map((item) => moment(item.recordTime).format('MM-DD')))).map((name) => ({ prop: String(++this.count), name })) ...Array.from(new Set(res.data.data[0].records.map((item) => moment(item.recordTime).format('MM-DD')))).map((name) => ({ prop: String(++this.count), name }))
// ] ]
// /** echarts related */ /** echarts related */
// // this.echartCategories = subProps.map((item) => item.name) // this.echartCategories = subProps.map((item) => item.name)
// this.echartCategories = this.dataListDynamic.map((item) => item.name) this.echartCategories = this.dataListDynamic.map((item) => item.name)
// }, },
// parseDynamicData(data) { // parseDynamicData(data) {
// this.echartCheckTypes.splice(0) // this.echartCheckTypes.splice(0)
@ -743,11 +740,9 @@ export default {
// //
this.keys = [...Object.keys(res.data),...this.keys] this.keys = [...Object.keys(res.data),...this.keys]
// console.log('this.finalVal', this.finalVal) // console.log('this.finalVal', this.finalVal)
console.log('keys', this.keys) // console.log('keys', this.keys)
this.values = Object.values(res.data) this.values = Object.values(res.data)
// console.log('values', this.values) // console.log('values', this.values)
// values2
this.values2 = []
for (let c = 0; c < this.values.length; c++) { for (let c = 0; c < this.values.length; c++) {
this.values2.push( this.values2.push(
this.values[c].map((item) => { this.values[c].map((item) => {
@ -755,9 +750,8 @@ export default {
}) })
) )
} }
console.log('values2', this.values2)
this.finalVal = [...this.values2,...this.finalVal] this.finalVal = [...this.values2,...this.finalVal]
console.log('this.finalVal', this.finalVal) // console.log('this.finalVal', this.finalVal)
this.$message.success(this.$t('pl.success')) this.$message.success(this.$t('pl.success'))
this.$nextTick(() => { this.$nextTick(() => {
this.dialogVisible = false this.dialogVisible = false

View File

@ -165,64 +165,7 @@ const FakeChart = {
}, },
toolbox: { toolbox: {
feature: { feature: {
dataView: { dataView: { show: true, readOnly: false },
show: true,
readOnly: true,
optionToContent: function (opt) {
var axisData = opt.xAxis[0].data
var series = opt.series
//
var pattern = new RegExp('[\u4E00-\u9FA5]+')
if (pattern.test(series[0].name)) {
var table =
'<table class="layui-table" style="width:100%;text-align:center"><tbody><tr>' +
'<td>设备名称</td>' +
'<td>' +
series[0].name +
'</td>' +
'<td>' +
series[1].name +
'</td>' +
'<td>' +
series[2].name +
'</td>' +
'</tr>'
} else {
var table =
'<table class="layui-table" style="width:100%;text-align:center"><tbody><tr>' +
'<td>Equipment Name</td>' +
'<td>' +
series[0].name +
'</td>' +
'<td>' +
series[1].name +
'</td>' +
'<td>' +
series[2].name +
'</td>' +
'</tr>'
}
for (var i = 0, l = axisData.length; i < l; i++) {
table +=
'<tr>' +
'<td>' +
axisData[i] +
'</td>' +
'<td>' +
series[0].data[i] +
'</td>' +
'<td>' +
series[1].data[i] +
'</td>' +
'<td>' +
series[2].data[i] +
'</td>' +
'</tr>'
}
table += '</tbody></table>'
return table
}
},
restore: { show: true }, restore: { show: true },
saveAsImage: { show: true } saveAsImage: { show: true }
} }
@ -588,7 +531,7 @@ export default {
this.echartRealtime = this.echartCategories this.echartRealtime = this.echartCategories
// this.parseTableProps(res.data.nameData) // this.parseTableProps(res.data.nameData)
console.log('this.dataListDynamic', this.dataListDynamic) // console.log('this.dataListDynamic', this.dataListDynamic)
this.buildGraphData() this.buildGraphData()
}) })