Compare commits
38 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 20d94f8c09 | |||
| eb80489c41 | |||
| d337afd7b9 | |||
| ec7edb6bd9 | |||
| 4ac9fe32d1 | |||
| 46def3dab3 | |||
| d08f49548b | |||
| c85c7b0285 | |||
| 3c14cc552f | |||
| fe723ae897 | |||
| fc269f972a | |||
| 05abfd122a | |||
| 567d7595cf | |||
| a312a32ddc | |||
| 4005961b8a | |||
| 8cb9ac007e | |||
| 41907d5151 | |||
| 68e0edfcdd | |||
| 4d5f6afffb | |||
| 07c3f6c9a6 | |||
| 7fb30ffa0a | |||
| d501d2e01d | |||
| 99d903dcbf | |||
| 599838adc5 | |||
| c9593e2a6e | |||
| 16e3e49168 | |||
| fb0d8bd3f2 | |||
| 2f1fe88a60 | |||
| 1eca3c0e72 | |||
| 1f72708e69 | |||
| 8efeb6572d | |||
| 3fce79d6c9 | |||
| 52d93f7fad | |||
| 94eb83ec24 | |||
| 4bd25148de | |||
| f6b66f0114 | |||
| 402dd3a66b | |||
| a256112c6b |
@@ -1,6 +1,5 @@
|
||||
<template>
|
||||
<div>
|
||||
<pre>{{controlPanel}}</pre>
|
||||
<div class="row row-equal">
|
||||
<div class="flex md12 xl3 xs12 sm12">
|
||||
<div class="row">
|
||||
@@ -27,7 +26,7 @@
|
||||
<div class="flex sm12 xl12 md12 xs12">
|
||||
<!-- <chart :style="'width: auto; height: 88vhvh;'" :option="options"></chart> -->
|
||||
<elite-replay-overview-chart v-show="showOverviewChart" :ref="'chart_overview'" class="mb-1" :cardheight="'7vh'" :data="chartOverviewData" @dataZoomEvent="dataZoomEvent($event)"/>
|
||||
<elite-replay-chart :ref="'chart_detail'" :cardheight="'88vh'" :chartheight="detailchartheight" :data="chartDetailData" @updateIntegralBoundary="updateIntegralBoundary" />
|
||||
<elite-replay-chart :ref="'chart_detail'" :cardheight="'90vh'" :chartheight="detailchartheight" :data="chartDetailData" @updateIntegralBoundary="updateIntegralBoundary" />
|
||||
<change-channel-value-min-max :ref="'set_min_max'"/>
|
||||
</div>
|
||||
</div>
|
||||
@@ -225,6 +224,8 @@ export default {
|
||||
channelY: ch,
|
||||
})
|
||||
})
|
||||
// disable overviewData legend
|
||||
this.chartOverviewData.legend.show = false
|
||||
this.chartDetailData.xAxis[_gridNumber].axisLabel.show = true
|
||||
if (this.maxTime < parseInt(meta.time_duration)) {
|
||||
this.maxTime = parseInt(meta.time_duration)
|
||||
@@ -393,7 +394,7 @@ export default {
|
||||
})
|
||||
|
||||
let scale = '1'
|
||||
if (this.axisXDataType.description === 'Time') {
|
||||
if (this.controlPanel.x.type === 'Time') {
|
||||
scale = await this.computeResampleScale(metaInfo, timeDur)
|
||||
}
|
||||
// elite的sample rate不像neulive這麼高,因此試試scale = 100 or 1000時不要再sampling一次了,不然有些形狀(e.g. peak)會不一樣
|
||||
@@ -412,11 +413,11 @@ export default {
|
||||
this.currentScale = scale
|
||||
this.chartDetailData.series[_gridNumber].data.length = 0
|
||||
let dataListX
|
||||
const channelX = parseInt(this.axisXDataType.id)
|
||||
if (this.axisXDataType.description !== 'Time') {
|
||||
const channelX = parseInt(this.controlPanel.x.channel)
|
||||
if (this.controlPanel.x.type !== 'Time') {
|
||||
dataListX = this.dataInfo[meta][channelX][scale]
|
||||
}
|
||||
const channelY = parseInt(this.axisYDataType.id)
|
||||
const channelY = parseInt(this.controlPanel.y.channel)
|
||||
const dataListY = this.dataInfo[meta][channelY][scale]
|
||||
|
||||
const isThisModeHasCycle = this.GLOBAL.hasCycleMode(metaInfo.parameter_set.MODE, metaInfo.device.library_name)
|
||||
@@ -463,7 +464,7 @@ export default {
|
||||
for (let i = startIndex; i <= endIndex; i++) {
|
||||
const data = await this.getData(parseInt(scale), this.sampleMethod, dataListY[i].id, channelY, metaInfo)
|
||||
let dataX
|
||||
if (this.axisXDataType.description !== 'Time') {
|
||||
if (this.controlPanel.x.type !== 'Time') {
|
||||
dataX = await this.getData(parseInt(scale), this.sampleMethod, dataListX[i].id, channelX, metaInfo)
|
||||
}
|
||||
var deltaX = 0
|
||||
@@ -565,7 +566,7 @@ export default {
|
||||
}
|
||||
}
|
||||
|
||||
if (this.axisXDataType.description === 'Time') {
|
||||
if (this.controlPanel.x.type === 'Time') {
|
||||
this.chartDetailData.xAxis[_gridNumber].min = _startTime
|
||||
this.chartDetailData.xAxis[_gridNumber].max = _endTime
|
||||
} else {
|
||||
@@ -575,7 +576,7 @@ export default {
|
||||
_gridNumber += 1
|
||||
}
|
||||
|
||||
if (this.axisXDataType.description !== 'Time') {
|
||||
if (this.controlPanel.x.type !== 'Time') {
|
||||
this.showOverviewChart = false
|
||||
this.detailchartheight = '88vh'
|
||||
// this.$refs.chart_detail.updateChartHeight()
|
||||
@@ -607,33 +608,65 @@ export default {
|
||||
}
|
||||
},
|
||||
changeAxis (gridIndex) {
|
||||
// if (this.initDone) {
|
||||
// const libName = this.metaList[gridIndex].device.library_name
|
||||
// let xType
|
||||
// let xValue
|
||||
// if (this.axisXDataType.description === 'Time') {
|
||||
// xType = 'Time'
|
||||
// } else {
|
||||
// if (libName === 'EliteZM15' || libName.includes('Elite_EDC')) {
|
||||
// xType = 'Elite'
|
||||
// } else if (libName.includes('EIS')) {
|
||||
// xType = 'EliteEIS'
|
||||
// }
|
||||
// xValue = this.axisXDataType.id + 1
|
||||
// }
|
||||
// this.updateRegisteredChart({
|
||||
// chartAllData: this.chartData,
|
||||
// chartID: this.chartDetailData.chartID,
|
||||
// gridIndex: gridIndex,
|
||||
// deviceNameX: xType,
|
||||
// deviceIDX: this.metaList[gridIndex].name,
|
||||
// channelX: xValue,
|
||||
// deviceNameY: libName.includes('EIS') ? 'EliteEIS' : 'Elite',
|
||||
// deviceIDY: '',
|
||||
// channelY: this.axisYDataType.id + 1,
|
||||
// })
|
||||
// console.log({
|
||||
// chartAllData: this.chartData,
|
||||
// chartID: this.chartDetailData.chartID,
|
||||
// gridIndex: gridIndex,
|
||||
// deviceNameX: xType,
|
||||
// deviceIDX: this.metaList[gridIndex].name,
|
||||
// channelX: xValue,
|
||||
// deviceNameY: libName.includes('EIS') ? 'EliteEIS' : 'Elite',
|
||||
// deviceIDY: '',
|
||||
// channelY: this.axisYDataType.id + 1,
|
||||
// })
|
||||
// }
|
||||
// if (this.axisXDataType.description === 'Time') {
|
||||
// this.drawOverviewData()
|
||||
// }
|
||||
// this.drawDetailData() // reDraw
|
||||
// tang
|
||||
if (this.initDone) {
|
||||
const libName = this.metaList[gridIndex].device.library_name
|
||||
let xType
|
||||
let xValue
|
||||
if (this.axisXDataType.description === 'Time') {
|
||||
xType = 'Time'
|
||||
} else {
|
||||
if (libName === 'EliteZM15' || libName.includes('Elite_EDC')) {
|
||||
xType = 'Elite'
|
||||
} else if (libName.includes('EIS')) {
|
||||
xType = 'EliteEIS'
|
||||
}
|
||||
xValue = this.axisXDataType.id + 1
|
||||
}
|
||||
const xType = (this.controlPanel.x.type === 'Time') ? 'Time' : ((libName === 'EliteZM15' || libName.includes('Elite_EDC') ? 'Elite' : 'EliteEIS'))
|
||||
const xChannel = (this.controlPanel.x.channel === -1) ? undefined : this.controlPanel.x.channel + 1
|
||||
this.updateRegisteredChart({
|
||||
chartAllData: this.chartData,
|
||||
chartID: this.chartDetailData.chartID,
|
||||
gridIndex: gridIndex,
|
||||
deviceNameX: xType,
|
||||
deviceIDX: this.metaList[gridIndex].name,
|
||||
channelX: xValue,
|
||||
channelX: xChannel,
|
||||
deviceNameY: libName.includes('EIS') ? 'EliteEIS' : 'Elite',
|
||||
deviceIDY: '',
|
||||
channelY: this.axisYDataType.id + 1,
|
||||
channelY: this.controlPanel.y.channel + 1,
|
||||
})
|
||||
}
|
||||
if (this.axisXDataType.description === 'Time') {
|
||||
if (this.controlPanel.x.type === 'Time') {
|
||||
this.drawOverviewData()
|
||||
}
|
||||
this.drawDetailData() // reDraw
|
||||
@@ -656,7 +689,7 @@ export default {
|
||||
}
|
||||
if (rawData[prevIndex][0] >= boundary.x_start && rawData[prevIndex][0] <= boundary.x_end &&
|
||||
rawData[index][0] >= boundary.x_start && rawData[index][0] <= boundary.x_end) {
|
||||
deltaX = Number(rawData[index][0]) - Number(rawData[prevIndex][0])
|
||||
deltaX = Math.abs(Number(rawData[index][0]) - Number(rawData[prevIndex][0]))
|
||||
if (rawData[index][1] > boundary.y_end) rawData[index][1] = boundary.y_end
|
||||
else if (rawData[index][1] < boundary.y_start) {
|
||||
continue
|
||||
|
||||
@@ -114,7 +114,7 @@ export default {
|
||||
throttleDelay: 5,
|
||||
} */
|
||||
this.$refs.chart_ref.chart.on('brushSelected', (params) => {
|
||||
if (params.batch[0].areas.length !== 0) {
|
||||
if (params.batch[0] && params.batch[0].areas.length !== 0) {
|
||||
var boundary = {
|
||||
x_start: Number(params.batch[0].areas[0].coordRange[0][0].toFixed(4)),
|
||||
x_end: Number(params.batch[0].areas[0].coordRange[0][1].toFixed(4)),
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="flex-container mb-2">
|
||||
<!-- <div class="flex-container mb-2" v-show='false'>
|
||||
<div class="flex sm2 xl2 md2 xs2 px-0 py-0">
|
||||
<p class="display-6"> X-axis </p>
|
||||
</div>
|
||||
@@ -24,7 +24,7 @@
|
||||
<change-unit :ref="'change_unit_x'" axis="x" @refreshChart="refreshChart"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex-container mb-2">
|
||||
<div class="flex-container mb-2" v-show='false'>
|
||||
<div class="flex sm2 xl2 md2 xs2 px-0 py-0" />
|
||||
<div class="flex sm5 xl5 md5 xs5 pl-1 pr-0 py-0">
|
||||
<change-scale :ref="'change_scale_x'" axis="x" @refreshChart="refreshChart" @clearCycle="clearCycle" @changeAxis="changeAxis" @changeFunctional="changeFunctional"/>
|
||||
@@ -32,9 +32,9 @@
|
||||
<div class="flex sm5 xl5 md5 xs5 px-0 py-0">
|
||||
<abs-toggle :ref="'abs_x'" axis="x" @changeAxis="changeAxis"/>
|
||||
</div>
|
||||
</div>
|
||||
</div> -->
|
||||
|
||||
<div class="flex-container mb-2">
|
||||
<!-- <div class="flex-container mb-2" v-show='false'>
|
||||
<div class="flex sm2 xl2 md2 xs2 px-0 py-0">
|
||||
<p class="display-6"> Y-axis </p>
|
||||
</div>
|
||||
@@ -45,7 +45,7 @@
|
||||
<change-unit :ref="'change_unit_y'" axis="y" @refreshChart="refreshChart"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex-container mb-2">
|
||||
<div class="flex-container mb-2" v-show='false'>
|
||||
<div class="flex sm2 xl2 md2 xs2 px-0 py-0" />
|
||||
<div class="flex sm5 xl5 md5 xs5 pl-1 pr-0 py-0">
|
||||
<change-scale :ref="'change_scale_y'" axis="y" @refreshChart="refreshChart" @clearCycle="clearCycle" @changeAxis="changeAxis" @changeFunctional="changeFunctional"/>
|
||||
@@ -53,7 +53,7 @@
|
||||
<div class="flex sm5 xl5 md5 xs5 px-0 py-0">
|
||||
<abs-toggle :ref="'abs_y'" axis="y" @changeAxis="changeAxis"/>
|
||||
</div>
|
||||
</div>
|
||||
</div> -->
|
||||
<!-- <va-button @click="switchCollapse"></va-button>
|
||||
<va-collapse class="mb-2" :isOpenDefault="false" v-model="innerCollapse">
|
||||
<span slot="header">Specific Integral</span>
|
||||
@@ -66,10 +66,10 @@
|
||||
<!-- tang -->
|
||||
<div class="flex-container mb-2">
|
||||
<div class="flex sm2 xl2 md2 xs2 px-0 py-0">
|
||||
<p class="display-6"> X-test </p>
|
||||
<p class="display-6"> X-Axis </p>
|
||||
</div>
|
||||
<div class="flex sm5 xl5 md5 xs5 pl-1 pr-0 py-0">
|
||||
<change-axis-b :ref="'axis_x'" axis="x" @changeType="refresh"/>
|
||||
<change-axis-b :ref="'axis_x'" axis="x" @changeAxis="changeAxis"/>
|
||||
</div>
|
||||
<div class="flex sm5 xl5 md5 xs5 pl-1 pr-0 py-0">
|
||||
<change-unit-b
|
||||
@@ -87,13 +87,13 @@
|
||||
</div>
|
||||
<div class="flex-container mb-2">
|
||||
<div class="flex sm2 xl2 md2 xs2 px-0 py-0">
|
||||
<p class="display-6"> Y-test </p>
|
||||
<p class="display-6"> Y-Axis </p>
|
||||
</div>
|
||||
<div class="flex sm5 xl5 md5 xs5 pl-1 pr-0 py-0">
|
||||
<change-axis-b
|
||||
:ref="'axis_y'"
|
||||
axis="y"
|
||||
@changeType="refresh"
|
||||
@changeAxis="changeAxis"
|
||||
/>
|
||||
</div>
|
||||
<div class="flex sm5 xl5 md5 xs5 pl-1 pr-0 py-0">
|
||||
@@ -127,14 +127,14 @@
|
||||
|
||||
<script>
|
||||
import ShowResampleRate from '@/components/analysis/replay/toolbox/ShowResampleRate.vue'
|
||||
import ChangeAxis from '@/components/analysis/replay/toolbox/ChangeAxis.vue'
|
||||
// import ChangeAxis from '@/components/analysis/replay/toolbox/ChangeAxis.vue'
|
||||
import ChangeAxisB from '@/components/analysis/replay/toolbox/ChangeAxisB.vue'
|
||||
import ChangeUnit from '@/components/analysis/replay/toolbox/ChangeUnit.vue'
|
||||
// import ChangeUnit from '@/components/analysis/replay/toolbox/ChangeUnit.vue'
|
||||
import ChangeUnitB from '@/components/analysis/replay/toolbox/ChangeUnitB.vue'
|
||||
import ChangeScale from '@/components/analysis/replay/toolbox/ChangeScale.vue'
|
||||
// import ChangeScale from '@/components/analysis/replay/toolbox/ChangeScale.vue'
|
||||
import ChangeFunctB from '@/components/analysis/replay/toolbox/ChangeFunctB.vue'
|
||||
import ChangeCycle from '@/components/analysis/replay/toolbox/ChangeCycle.vue'
|
||||
import AbsToggle from '@/components/analysis/replay/toolbox/AbsToggle.vue'
|
||||
// import AbsToggle from '@/components/analysis/replay/toolbox/AbsToggle.vue'
|
||||
import SpecificIntegral from '@/components/analysis/replay/toolbox/SpecificIntegral.vue'
|
||||
import DownloadFile from '@/components/analysis/replay/toolbox/DownloadFile.vue'
|
||||
import DeleteFile from '@/components/analysis/replay/toolbox/DeleteFile.vue'
|
||||
@@ -151,14 +151,10 @@ export default {
|
||||
name: 'top-control-panel',
|
||||
components: {
|
||||
ShowResampleRate,
|
||||
ChangeAxis,
|
||||
ChangeAxisB,
|
||||
ChangeUnit,
|
||||
ChangeUnitB,
|
||||
ChangeScale,
|
||||
ChangeFunctB,
|
||||
ChangeCycle,
|
||||
AbsToggle,
|
||||
SpecificIntegral,
|
||||
DownloadFile,
|
||||
DeleteFile,
|
||||
@@ -194,9 +190,7 @@ export default {
|
||||
chartID: 1,
|
||||
axis: axis,
|
||||
axisIndex: 0,
|
||||
channel: -1,
|
||||
})
|
||||
this.refreshChart(this.chartData[1])
|
||||
},
|
||||
changeFunct (axis) {
|
||||
this.refreshUnit()
|
||||
@@ -234,28 +228,20 @@ export default {
|
||||
this.$refs.axis_y.init()
|
||||
this.$refs.funct_y.init()
|
||||
this.$refs.unit_y.init(this.controlPanel.y.type)
|
||||
//
|
||||
this.$refs.change_unit_x.init(this.deviceName)
|
||||
this.$refs.change_unit_y.init(this.deviceName)
|
||||
this.$refs.change_axis_x.init(this.deviceName)
|
||||
this.$refs.change_axis_y.init(this.deviceName)
|
||||
this.$refs.change_scale_x.init(this.deviceName)
|
||||
this.$refs.change_scale_y.init(this.deviceName)
|
||||
this.$refs.abs_x.init(this.deviceName)
|
||||
this.$refs.abs_y.init(this.deviceName)
|
||||
// prev
|
||||
// this.$refs.change_unit_x.init(this.deviceName)
|
||||
// this.$refs.change_unit_y.init(this.deviceName)
|
||||
// this.$refs.change_axis_x.init(this.deviceName)
|
||||
// this.$refs.change_axis_y.init(this.deviceName)
|
||||
// this.$refs.change_scale_x.init(this.deviceName)
|
||||
// this.$refs.change_scale_y.init(this.deviceName)
|
||||
// this.$refs.abs_x.init(this.deviceName)
|
||||
// this.$refs.abs_y.init(this.deviceName)
|
||||
this.$refs.change_cycle.init()
|
||||
this.$refs.edit_file_name.init()
|
||||
this.$refs.show_param.init(this.deviceName)
|
||||
this.$refs.change_window_start_and_size.init()
|
||||
},
|
||||
refresh () {
|
||||
this.$refs.axis_x.init()
|
||||
this.$refs.funct_x.init()
|
||||
this.$refs.unit_x.init(this.controlPanel.x.type)
|
||||
this.$refs.axis_y.init()
|
||||
this.$refs.funct_y.init()
|
||||
this.$refs.unit_y.init(this.controlPanel.y.type)
|
||||
},
|
||||
changeOverviewDataZoom () {
|
||||
this.$emit('changeOverviewDataZoom')
|
||||
},
|
||||
@@ -266,6 +252,14 @@ export default {
|
||||
this.$emit('changeFunctional', axis, functional)
|
||||
},
|
||||
changeAxis (gridIndex) {
|
||||
this.$refs.funct_x.init()
|
||||
this.$refs.funct_y.init()
|
||||
this.$refs.unit_x.init(this.controlPanel.x.type)
|
||||
this.$refs.unit_y.init(this.controlPanel.y.type)
|
||||
this.refreshFormatter('x')
|
||||
this.refreshFormatter('y')
|
||||
this.$emit('changeFunctional', 'x', 'Linear')
|
||||
this.$emit('changeFunctional', 'y', 'Linear')
|
||||
this.$emit('changeAxis', gridIndex)
|
||||
},
|
||||
changeUnit (axis) {
|
||||
@@ -275,17 +269,6 @@ export default {
|
||||
this.$refs.change_unit_y.changeUnitByAxis()
|
||||
}
|
||||
},
|
||||
getPanelInfo () {
|
||||
var panelInfo = {
|
||||
axis_x: this.$refs.change_axis_x.getChannelByAxis(),
|
||||
axis_y: this.$refs.change_axis_y.getChannelByAxis(),
|
||||
scale_x: this.$refs.change_scale_x.getScaleByAxis(),
|
||||
scale_y: this.$refs.change_scale_y.getScaleByAxis(),
|
||||
unit_x: this.$refs.change_unit_x.getUnitByAxis(),
|
||||
unit_y: this.$refs.change_unit_y.getUnitByAxis(),
|
||||
}
|
||||
return panelInfo
|
||||
},
|
||||
clearCycle () {
|
||||
this.$refs.change_cycle.clear()
|
||||
},
|
||||
@@ -309,15 +292,20 @@ export default {
|
||||
// 1: I, 2: V, 3: R, 4: cycle
|
||||
if (settingValue === 1) {
|
||||
this.controlPanel.x.type = 'Current'
|
||||
this.controlPanel.x.channel = 0
|
||||
} else if (settingValue === 2) {
|
||||
this.controlPanel.x.type = 'Voltage'
|
||||
this.controlPanel.x.channel = 1
|
||||
} else if (settingValue === 3) {
|
||||
this.controlPanel.x.type = 'Resistance'
|
||||
this.controlPanel.x.channel = 2
|
||||
} else if (settingValue === 4) {
|
||||
this.controlPanel.x.type = 'Cycle'
|
||||
this.controlPanel.x.channel = 3
|
||||
}
|
||||
} else if (settingType === 'Time') {
|
||||
this.controlPanel.x.type = 'Time'
|
||||
this.controlPanel.x.channel = undefined
|
||||
}
|
||||
} else if (this.deviceName.includes('EIS')) {
|
||||
if (settingType.includes('EIS')) {
|
||||
@@ -355,15 +343,20 @@ export default {
|
||||
// 1: I, 2: V, 3: R, 4: cycle
|
||||
if (settingValue === 1) {
|
||||
this.controlPanel.y.type = 'Current'
|
||||
this.controlPanel.y.channel = 0
|
||||
} else if (settingValue === 2) {
|
||||
this.controlPanel.y.type = 'Voltage'
|
||||
this.controlPanel.y.channel = 1
|
||||
} else if (settingValue === 3) {
|
||||
this.controlPanel.y.type = 'Resistance'
|
||||
this.controlPanel.y.channel = 2
|
||||
} else if (settingValue === 4) {
|
||||
this.controlPanel.y.type = 'Cycle'
|
||||
this.controlPanel.y.channel = 3
|
||||
}
|
||||
} else if (settingType === 'Time') {
|
||||
this.controlPanel.y.type = 'Time'
|
||||
this.controlPanel.y.channel = undefined
|
||||
}
|
||||
} else if (this.deviceName.includes('EIS')) {
|
||||
if (settingType.includes('EIS')) {
|
||||
|
||||
@@ -2,10 +2,11 @@
|
||||
<div>
|
||||
<va-select
|
||||
v-model="controlPanel[axis].type"
|
||||
testBy="name"
|
||||
class="va-select-without-margin"
|
||||
:options="typeOption"
|
||||
:noClear='true'
|
||||
@input="changeType()"
|
||||
@input="changeAxis()"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
@@ -34,23 +35,38 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
init (type) {
|
||||
this.typeOption = [
|
||||
'Time',
|
||||
'Current',
|
||||
'Voltage',
|
||||
'Resistance',
|
||||
]
|
||||
if (this.axis === 'x') {
|
||||
this.typeOption = [
|
||||
'Time',
|
||||
'Current',
|
||||
'Voltage',
|
||||
'Resistance',
|
||||
]
|
||||
} else {
|
||||
this.typeOption = [
|
||||
'Current',
|
||||
'Voltage',
|
||||
'Resistance',
|
||||
]
|
||||
}
|
||||
// init call change Axis
|
||||
if (this.axis === 'y') {
|
||||
this.$emit('changeAxis', 0) // temporarily use metaIndex for gridIndex
|
||||
}
|
||||
},
|
||||
refreshAxis (xType, xFunct, yType, yFunct) {
|
||||
const [xTable, yTable] = this.tableRouter.getTable(xType, xFunct, yType, yFunct)
|
||||
if (this.axis === 'x') {
|
||||
this.controlPanel[this.axis].type = xTable.name
|
||||
this.controlPanel[this.axis].channel = xTable.channel
|
||||
} else {
|
||||
this.controlPanel[this.axis].type = yTable.name
|
||||
this.controlPanel[this.axis].channel = yTable.channel
|
||||
}
|
||||
},
|
||||
changeType () {
|
||||
this.$emit('changeType')
|
||||
changeAxis () {
|
||||
this.controlPanel[this.axis].channel = tableRouter.getChannel(this.controlPanel[this.axis].type)
|
||||
this.$emit('changeAxis', 0)
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
@@ -49,7 +49,9 @@ export default {
|
||||
'axisYDataType',
|
||||
'axisXLabelScale',
|
||||
'axisYLabelScale',
|
||||
'showCyclePanel',
|
||||
'showWhichCycles',
|
||||
'controlPanel',
|
||||
]),
|
||||
},
|
||||
watch: {
|
||||
@@ -81,8 +83,10 @@ export default {
|
||||
this.metaID = meta.id
|
||||
this.isThisModeHasCycle = this.GLOBAL.hasCycleMode(this.metaList[this.metaIndex].parameter_set.MODE, meta.device.library_name)
|
||||
if (this.isThisModeHasCycle === true) {
|
||||
this.showCyclePanel = true
|
||||
this.showPanel = true
|
||||
} else {
|
||||
this.showCyclePanel = false
|
||||
this.showPanel = false
|
||||
}
|
||||
},
|
||||
@@ -90,7 +94,6 @@ export default {
|
||||
this.showWhichCycles = '1'
|
||||
},
|
||||
async setCycle () {
|
||||
console.log('setCycle')
|
||||
if (this.isThisModeHasCycle === true) {
|
||||
const dataCycleList = this.recInfo[this.metaID][this.cycleDataID][this.currentScale]
|
||||
const cycleDataList = []
|
||||
@@ -105,10 +108,10 @@ export default {
|
||||
const cycleDict = this.getCycleDictRec()(cycleDataList)
|
||||
this.cycleNum = Object.keys(cycleDict).length
|
||||
let dataXList
|
||||
if (this.axisXDataType.description !== 'Time') {
|
||||
dataXList = this.recInfo[this.metaID][this.axisXDataType.id][this.currentScale]
|
||||
if (this.controlPanel.x.type !== 'Time') {
|
||||
dataXList = this.recInfo[this.metaID][this.controlPanel.x.channel][this.currentScale]
|
||||
}
|
||||
const dataYList = this.recInfo[this.metaID][this.axisYDataType.id][this.currentScale]
|
||||
const dataYList = this.recInfo[this.metaID][this.controlPanel.y.channel][this.currentScale]
|
||||
const filteredData = []
|
||||
|
||||
let counter = 0
|
||||
@@ -129,36 +132,18 @@ export default {
|
||||
endIndex = i
|
||||
}
|
||||
}
|
||||
|
||||
for (let i = startIndex; i <= endIndex; i++) {
|
||||
const dataY = await this.getData(parseInt(this.currentScale), this.sampleMethod, dataYList[i].id, this.axisYDataType.id, this.metaList[this.metaIndex])
|
||||
if (this.axisXDataType.description !== 'Time') {
|
||||
const dataX = await this.getData(parseInt(this.currentScale), this.sampleMethod, dataXList[i].id, this.axisXDataType.id, this.metaList[this.metaIndex])
|
||||
const dataY = await this.getData(parseInt(this.currentScale), this.sampleMethod, dataYList[i].id, this.controlPanel.y.channel, this.metaList[this.metaIndex])
|
||||
if (this.controlPanel.x.type !== 'Time') {
|
||||
const dataX = await this.getData(parseInt(this.currentScale), this.sampleMethod, dataXList[i].id, this.controlPanel.x.channel, this.metaList[this.metaIndex])
|
||||
for (let j = 0, len = dataY.length; j < len; j++) {
|
||||
if (parseInt(dataY[j][0]) >= startTime && parseInt(dataY[j][0]) <= endTime) {
|
||||
let x
|
||||
let y
|
||||
if (this.axisXLabelScale.description === 'Log') {
|
||||
x = Math.abs(dataX[j][1])
|
||||
} else if (this.axisXLabelScale.description === 'Linear') {
|
||||
x = dataX[j][1]
|
||||
}
|
||||
if (this.axisYLabelScale.description === 'Log') {
|
||||
y = Math.abs(dataY[j][1])
|
||||
} else if (this.axisYLabelScale.description === 'Linear') {
|
||||
y = dataY[j][1]
|
||||
}
|
||||
filteredData.push([x, y])
|
||||
filteredData.push([dataX[j][1], dataY[j][1]])
|
||||
}
|
||||
}
|
||||
} else {
|
||||
for (let j = 0, len = dataY.length; j < len; j++) {
|
||||
if (parseInt(dataY[j][0]) >= startTime && parseInt(dataY[j][0]) <= endTime) {
|
||||
if (this.axisYLabelScale.description === 'Log') {
|
||||
dataY[j][1] = Math.abs(dataY[j][1])
|
||||
} else if (this.axisYLabelScale.description === 'Linear') {
|
||||
// do nothing
|
||||
}
|
||||
filteredData.push(dataY[j])
|
||||
}
|
||||
}
|
||||
@@ -170,7 +155,7 @@ export default {
|
||||
seriesIndex: this.metaIndex,
|
||||
data: filteredData,
|
||||
})
|
||||
if (this.axisXDataType.description === 'Time') {
|
||||
if (this.controlPanel.x.type === 'Time') {
|
||||
if (counter === 0) {
|
||||
this.chartData[this.chartID].xAxis[this.metaIndex].min = startTime
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@ const chartTable = {
|
||||
// axis type
|
||||
Time: {
|
||||
name: 'Time',
|
||||
channel: -1,
|
||||
option: {
|
||||
auto: 1,
|
||||
},
|
||||
@@ -10,27 +11,30 @@ const chartTable = {
|
||||
},
|
||||
Current: {
|
||||
name: 'Current',
|
||||
channel: 0,
|
||||
option: {
|
||||
nA: 1,
|
||||
uA: 1e3,
|
||||
mA: 1e6,
|
||||
A: 1e9,
|
||||
},
|
||||
defaultUnit: 'A',
|
||||
defaultUnit: 'mA',
|
||||
downloadUnit: 'A',
|
||||
},
|
||||
Voltage: {
|
||||
name: 'Voltage',
|
||||
channel: 1,
|
||||
option: {
|
||||
uV: 1,
|
||||
mV: 1e3,
|
||||
V: 1e6,
|
||||
},
|
||||
defaultUnit: 'V',
|
||||
defaultUnit: 'mV',
|
||||
downloadUnit: 'V',
|
||||
},
|
||||
Resistance: {
|
||||
name: 'Resistance',
|
||||
channel: 2,
|
||||
option: {
|
||||
mΩ: 1,
|
||||
Ω: 1e3,
|
||||
@@ -40,8 +44,18 @@ const chartTable = {
|
||||
defaultUnit: 'Ω',
|
||||
downloadUnit: 'Ω',
|
||||
},
|
||||
Cycle: {
|
||||
name: 'Cycle',
|
||||
channel: 3,
|
||||
option: {
|
||||
cycle: 1,
|
||||
},
|
||||
defaultUnit: 'cycle',
|
||||
downloadUnit: 'cycle',
|
||||
},
|
||||
Charge: {
|
||||
name: 'Charge',
|
||||
channel: -1,
|
||||
option: {
|
||||
nC: 1e6,
|
||||
uC: 1e9,
|
||||
@@ -53,6 +67,7 @@ const chartTable = {
|
||||
},
|
||||
Power: {
|
||||
name: 'Power',
|
||||
channel: -1,
|
||||
option: {
|
||||
mW: 1e12,
|
||||
W: 1e15,
|
||||
@@ -63,6 +78,7 @@ const chartTable = {
|
||||
},
|
||||
Transconductance: {
|
||||
name: 'Transconductance',
|
||||
channel: -1,
|
||||
option: {
|
||||
'mA/V': 1,
|
||||
'A/V': 1e3,
|
||||
@@ -72,15 +88,19 @@ const chartTable = {
|
||||
downloadUnit: 'A/V',
|
||||
},
|
||||
Idiot: {
|
||||
name: 'Idiot',
|
||||
name: 'not support',
|
||||
channel: -1,
|
||||
option: {
|
||||
idiot: 1,
|
||||
'not support': 1,
|
||||
},
|
||||
defaultUnit: 'idiot',
|
||||
downloadUnit: 'idiot',
|
||||
defaultUnit: 'not support',
|
||||
downloadUnit: 'not support',
|
||||
},
|
||||
}
|
||||
export const tableRouter = {
|
||||
getChannel: (axis) => {
|
||||
return chartTable[axis].channel
|
||||
},
|
||||
getDefaultUnit: (axis) => {
|
||||
return chartTable[axis].defaultUnit
|
||||
},
|
||||
|
||||
@@ -68,7 +68,7 @@ export default {
|
||||
this.$refs.file_ref.currentInfo = initCollection.data[0]
|
||||
|
||||
const folders = await api.collection.getByParent('folder', initCollection.data[0].id)
|
||||
const files = await api.meta.getAttrByParent('folder', initCollection.data[0].id, 'id-path-name-parent-description-size-time_duration-uuid-device-channels-created_at')
|
||||
const files = await api.meta.getAttrByParent('folder', initCollection.data[0].id, 'id-path-name-parent-description-size-time_duration-uuid-device-channels-parameter_set-created_at')
|
||||
file.updateFileList(folders)
|
||||
file.updateFileList(files)
|
||||
|
||||
|
||||
@@ -178,6 +178,9 @@
|
||||
/>
|
||||
{{ props.rowData.name }}
|
||||
</template>
|
||||
<template slot="parameter_set" slot-scope="props">
|
||||
{{ (props.rowData.type==='folder') ? '' : getWorkingMode(props.rowData, props.rowData) }}
|
||||
</template>
|
||||
<template slot="created_at" slot-scope="props">
|
||||
{{transDate(props.rowData.created_at)}}
|
||||
</template>
|
||||
@@ -234,6 +237,7 @@ import { file } from '../../../data/file/File'
|
||||
import { FulfillingBouncingCircleSpinner } from 'epic-spinners'
|
||||
import api from '../../../data/api/index'
|
||||
import SdCardButton from '../sdcard/SdCardButton.vue'
|
||||
import configTable from '@/data/config-table/index.js'
|
||||
|
||||
export default {
|
||||
name: 'FileTable',
|
||||
@@ -315,6 +319,13 @@ export default {
|
||||
// titleClass: 'text-center',
|
||||
// dataClass: 'text-center',
|
||||
// },
|
||||
{
|
||||
name: '__slot:parameter_set',
|
||||
title: 'Working Mode',
|
||||
width: '10%',
|
||||
titleClass: 'text-center',
|
||||
dataClass: 'text-center',
|
||||
},
|
||||
{
|
||||
name: '__slot:created_at',
|
||||
title: 'create time',
|
||||
@@ -760,6 +771,13 @@ export default {
|
||||
})
|
||||
}
|
||||
},
|
||||
getWorkingMode: function (library, mode) {
|
||||
try {
|
||||
return configTable.getModeConfig(library, mode).name
|
||||
} catch {
|
||||
return ''
|
||||
}
|
||||
},
|
||||
},
|
||||
async mounted () {
|
||||
const controllerList = await api.controller.getAll()
|
||||
|
||||
@@ -36,7 +36,23 @@
|
||||
<div v-if="settingStep >= 2">
|
||||
<span>Condition</span>
|
||||
<div v-for="(condition, key) in conditionObj" :key="key">
|
||||
<div class="flex d-flex align--center">
|
||||
<!-- <div v-if="key === 'cycle' || key === 'cycle_next'" class="flex d-flex align--center"> -->
|
||||
<div v-if="key === 'cycle_next'" class="flex d-flex align--center">
|
||||
<!-- <va-checkbox v-model="condition.select"></va-checkbox> -->
|
||||
<span class="mr-1">{{ condition.prefix }}</span>
|
||||
<!-- <input class="mr-1" :type="condition.type" v-model="condition.value"/> -->
|
||||
<va-select
|
||||
@click.native="updateTaskOptions()"
|
||||
:label="''"
|
||||
v-model="conditionObj.cycle_next.value"
|
||||
textBy="description"
|
||||
class="va-select-without-margin"
|
||||
:options="taskOptionsKeys"
|
||||
:noClear='false'
|
||||
/>
|
||||
<span>{{ condition.suffix }}</span>
|
||||
</div>
|
||||
<div v-else class="flex d-flex align--center">
|
||||
<va-checkbox v-model="condition.select"></va-checkbox>
|
||||
<span class="mr-1">{{ condition.prefix }}</span>
|
||||
<input class="mr-1" :type="condition.type" v-model="condition.value"/>
|
||||
@@ -98,6 +114,11 @@ export default {
|
||||
|
||||
conditionTemplate: newConditionTemplate(),
|
||||
conditionList: [],
|
||||
taskOptions: {},
|
||||
taskOptionsKeys: [],
|
||||
project: {},
|
||||
device: {},
|
||||
task: {},
|
||||
|
||||
}
|
||||
},
|
||||
@@ -145,32 +166,66 @@ export default {
|
||||
}
|
||||
|
||||
for (const key in this.conditionObj) {
|
||||
if (this.conditionObj[key].select) {
|
||||
const conditionUUID = this.GLOBAL.getUUID()
|
||||
const newCondition = this.createCondition(conditionUUID, key, 'equal', this.conditionObj[key].value)
|
||||
if (key === 'cycle') {
|
||||
// use 'cycle' and 'cycle_next' to set the default to condition: previous_task_done & after_task_run 0
|
||||
if (this.conditionObj[key].select) {
|
||||
const conditionUUID = this.GLOBAL.getUUID()
|
||||
const newCondition = this.createCondition(conditionUUID, 'previous_task_done', 'equal', '')
|
||||
this.setConditionTask({ condition: newCondition })
|
||||
newAction[actionUUID].condition.push(conditionUUID)
|
||||
}
|
||||
} else if (key === 'cycle_next') {
|
||||
if (this.conditionObj.cycle.select) {
|
||||
const conditionUUID = this.GLOBAL.getUUID()
|
||||
const newCondition = this.createCondition(conditionUUID, 'after_task_run', 'equal', '0')
|
||||
this.setConditionTask({ condition: newCondition })
|
||||
newAction[actionUUID].condition.push(conditionUUID)
|
||||
}
|
||||
} else {
|
||||
if (this.conditionObj[key].select) {
|
||||
const conditionUUID = this.GLOBAL.getUUID()
|
||||
const newCondition = this.createCondition(conditionUUID, key, 'equal', this.conditionObj[key].value)
|
||||
|
||||
this.setConditionTask({ condition: newCondition })
|
||||
newAction[actionUUID].condition.push(conditionUUID)
|
||||
this.setConditionTask({ condition: newCondition })
|
||||
newAction[actionUUID].condition.push(conditionUUID)
|
||||
}
|
||||
}
|
||||
}
|
||||
this.setActionTask({ action: newAction })
|
||||
if (this.conditionObj.cycle_next !== undefined) {
|
||||
this.setCycleTask({ cycle: Number(this.conditionObj.cycle.value), cycle_next: this.conditionObj.cycle_next.value, cycle_next_uuid: this.taskOptions[this.conditionObj.cycle_next.value] })
|
||||
}
|
||||
this.reset()
|
||||
},
|
||||
updateTaskOptions: function () {
|
||||
for (var idx = 0; idx < this.project.task.length; idx++) {
|
||||
this.taskOptions[this.project.task[idx].name] = this.project.task[idx].uuid
|
||||
}
|
||||
this.taskOptionsKeys = Object.keys(this.taskOptions)
|
||||
},
|
||||
|
||||
...mapActions('project', [
|
||||
types.task.setCondition,
|
||||
types.task.setAction,
|
||||
types.task.setCycle,
|
||||
]),
|
||||
},
|
||||
mounted () {
|
||||
const project = this.getSelectProject
|
||||
const device = this.getAllDeviceProject
|
||||
const task = this.getSelectTask
|
||||
// const project = this.getSelectProject
|
||||
// const device = this.getAllDeviceProject
|
||||
// const task = this.getSelectTask
|
||||
this.project = this.getSelectProject
|
||||
this.device = this.getAllDeviceProject
|
||||
this.task = this.getSelectTask
|
||||
for (var idx = 0; idx < this.project.task.length; idx++) {
|
||||
this.taskOptions[this.project.task[idx].name] = this.project.task[idx].uuid
|
||||
}
|
||||
this.taskOptionsKeys = Object.keys(this.taskOptions)
|
||||
|
||||
console.log('project', project)
|
||||
console.log('task', task)
|
||||
// console.log('project', this.project)
|
||||
// console.log('task', this.task)
|
||||
|
||||
this.registeredDevice = device
|
||||
this.registeredDevice = this.device
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
<th align="center" @click="openConfig(1)">device</th>
|
||||
<th align="center">action and condition</th>
|
||||
<th align="center">parameter</th>
|
||||
<th v-if="lockMode" align="center">cycle</th>
|
||||
<th align="center"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
@@ -99,10 +100,14 @@
|
||||
<div v-for="(action, actionKey) in task.action" :key="actionKey">
|
||||
<div v-if="action.target === deviceUUID">
|
||||
<div v-for="conditionKey in action.condition" :key="conditionKey">
|
||||
<div small>
|
||||
<div small v-if="action.type !== 'cycle'">
|
||||
{{ action.type }} {{ task.condition[conditionKey].type }} {{ task.condition[conditionKey].value }}
|
||||
<va-icon class="fa fa-close" @click.native="delAction(task, actionKey, conditionKey)"/>
|
||||
</div>
|
||||
<div small v-else-if="task.condition[conditionKey].type === 'previous_task_done'">
|
||||
{{ action.type }} go to {{ task.cycle_next }} run {{ task.cycle }} times
|
||||
<va-icon class="fa fa-close" @click.native="delAction(task, actionKey, conditionKey)"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -137,6 +142,14 @@
|
||||
<va-icon v-if="parseInt(taskIndex) !== getSelectProject.task.length - 1" class="fa fa-toggle-down" @click.native="swapTask(taskIndex, 1)"/>
|
||||
<va-icon class="fa fa-close" @click.native="() => deleteTask({ index: taskIndex})"></va-icon>
|
||||
</td>
|
||||
<td align="center" v-if="lockMode === true">
|
||||
<div v-if="task.cycle > 0 && task.status === 2 && task.cycle_count === 0">
|
||||
{{ task.cycle }}/{{ task.cycle }}
|
||||
</div>
|
||||
<div v-else-if="task.cycle > 0">
|
||||
{{ task.cycle_count }}/{{ task.cycle }}
|
||||
</div>
|
||||
</td>
|
||||
<td align="center" v-if="lockMode === true">
|
||||
<!-- {{ task.status }} -->
|
||||
<fulfilling-bouncing-circle-spinner
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
<template>
|
||||
<div class="device-info">
|
||||
456465
|
||||
<div class="row flex">
|
||||
<div class="flex-wrap-setting sm12 xl12 md12 xs12">
|
||||
<!-- <draggable class="flex d-flex sm12 xl12 md12 xs12" v-model="devicesList" @start="drag=true" @end="drag=false" > -->
|
||||
|
||||
@@ -298,6 +298,13 @@ export default {
|
||||
}))
|
||||
this.pageToast('The device [' + taskInfo.getDeviceIDByRaw(parseInt(mes[1])) + '] mission is done.')
|
||||
break
|
||||
case 'project':
|
||||
// refresh real-time page when going to next task
|
||||
this.mqttPub(taskInfo.getTaskInfo().controllerID + '_user', JSON.stringify({
|
||||
header: 'get_device_info_all/0',
|
||||
}))
|
||||
this.pageToast(mes[1])
|
||||
break
|
||||
default:
|
||||
break
|
||||
}
|
||||
@@ -591,6 +598,7 @@ export default {
|
||||
})
|
||||
},
|
||||
switchMode: function () {
|
||||
console.log('switch mode', this.developerMode)
|
||||
this.developerMode = !this.developerMode
|
||||
},
|
||||
|
||||
@@ -618,7 +626,7 @@ export default {
|
||||
this.pageMqttSub(taskInfo.getTaskInfo().controllerID)
|
||||
await this.pageInit()
|
||||
|
||||
this.dataRefreshTimer = setInterval(this.refreshData, 1000)
|
||||
this.dataRefreshTimer = setInterval(this.refreshData, 100)
|
||||
|
||||
var switchModeHander = function (switchMode, e) {
|
||||
if (e.shiftKey && e.metaKey && e.keyCode === 83) {
|
||||
|
||||
@@ -3,10 +3,13 @@
|
||||
<va-card>
|
||||
<template slot="header">
|
||||
<div class="row flex sm12 xl12 md12 xs12 align--center my-0 py-0">
|
||||
<div class="flex sm5 xl5 md5 xs5 px-0 mx-0">
|
||||
<h5 class="mt-0 mb-0"><va-icon name="fa fa-area-chart mr-3" color="primary"/>{{ nameCard }}</h5>
|
||||
<div class="flex sm1 xl1 md1 xs1 px-0 mx-0">
|
||||
<h5 class="mt-0 mb-0" style="">{{ nameCard }}</h5>
|
||||
</div>
|
||||
<div class="flex sm7 xl7 md7 xs7 pa-0 ma-0" style="text-align: right;">
|
||||
<div class="flex sm9 xl9 md9 xs9 px-0 " style="margin-left: -5px; color: #9aa4af;">
|
||||
<p class="mt-0 mb-0">{{ chartInfo }}</p>
|
||||
</div>
|
||||
<div class="flex sm2 xl2 md2 xs2 pa-0 ma-0" style="text-align: right;">
|
||||
<va-button class="pa-0 ma-0 circle-button" small color="dark" @click="remove()">
|
||||
<va-icon
|
||||
name="fa fa-times"
|
||||
@@ -14,9 +17,6 @@
|
||||
/>
|
||||
</va-button>
|
||||
</div>
|
||||
<div class="flex d-flex xl10">
|
||||
<canvas-chart-real-time-calculation :chartID="chartID" @refreshData="refreshData" @switchModeButton="switchModeButton" @getClicked="getClicked" ref="'cal_ref'" />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<va-tabs v-model="tabValue" class="mb-3" style="width: 100%; min-width: 100px;">
|
||||
@@ -29,9 +29,18 @@
|
||||
</va-tabs>
|
||||
<div v-if="tabValue == 0" >
|
||||
<div v-if="chartData[chartID].legend.data.length != 0">
|
||||
<canvas-chart-real-time-display
|
||||
:chartID="chartID" ref="CanvasChartRealTimeDisplay"
|
||||
/>
|
||||
<div class="row flex xl12 lg12 sm12 xs12 ma-0 pa-0">
|
||||
<div class="flex xl1 lg1 sm0 xs0 ma-0 pa-0">
|
||||
</div>
|
||||
<div class="flex xl7 lg7 sm7 xs7 my-0 py-0">
|
||||
<canvas-chart-real-time-display
|
||||
:chartID="chartID" ref="CanvasChartRealTimeDisplay"
|
||||
/>
|
||||
</div>
|
||||
<div class="flex xl4 lg4 sm5 xs5 my-0 py-0 mt-2">
|
||||
<canvas-chart-real-time-calculation :chartID="chartID" @refreshData="refreshData" @switchModeButton="switchModeButton" @getClicked="getClicked" @captureChart="captureChart" ref="'cal_ref'" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex" v-if="developerMode">
|
||||
<div v-for="(data, device) in dataStreamBuffer.getByChartID(chartID)" :key="device">
|
||||
<div v-for="(i, channel) in data" :key="channel">
|
||||
@@ -39,6 +48,55 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div class="row flex align--left ma-0 pa-0">
|
||||
<va-input
|
||||
v-if="chartData[chartID].chartXMode === 'time'"
|
||||
class="mx-1"
|
||||
@keyup.enter="timeIntervalChange(timeIntervalInput)"
|
||||
@blur="timeIntervalChange(timeIntervalInput)"
|
||||
v-model="timeIntervalInput"
|
||||
:label="'time-grid'"
|
||||
>
|
||||
<p slot="append" style="margin-right: 0;" small>
|
||||
ms
|
||||
</p>
|
||||
</va-input>
|
||||
<va-input
|
||||
v-if="chartData[chartID].chartXMode === 'value'"
|
||||
class="mx-1"
|
||||
@keyup.enter="xIntervalChange(xIntervalInput)"
|
||||
@blur="xIntervalChange(xIntervalInput)"
|
||||
v-model="xIntervalInput"
|
||||
:label="'x-grid'"
|
||||
>
|
||||
<p slot="append" style="margin-right: 0;" small>
|
||||
{{chartData[chartID].chartXUnit}}
|
||||
</p>
|
||||
</va-input>
|
||||
<va-input
|
||||
class="mx-1"
|
||||
@keyup.enter="yIntervalChange(yIntervalInput)"
|
||||
@blur="yIntervalChange(yIntervalInput)"
|
||||
v-model="yIntervalInput"
|
||||
:label="'y-grid'"
|
||||
>
|
||||
<p slot="append" style="margin-right: 0;" small>
|
||||
{{chartData[chartID].chartYUnit}}
|
||||
</p>
|
||||
</va-input>
|
||||
<va-input
|
||||
v-if="chartData[chartID].chartDevice === 'neulive'"
|
||||
class="mx-1"
|
||||
@keyup.enter="threeAxisIntervalChange(threeAxisIntervalInput)"
|
||||
@blur="threeAxisIntervalChange(threeAxisIntervalInput)"
|
||||
v-model="threeAxisIntervalInput"
|
||||
:label="'3axis-grid'"
|
||||
>
|
||||
<p slot="append" style="margin-right: 0;" small>
|
||||
g
|
||||
</p>
|
||||
</va-input>
|
||||
</div> -->
|
||||
<!-- chart -->
|
||||
<chart :key="taskContentChartKey" :ref="'chart_ref'" :style="'width: '+ cardwidth + '; height: ' + cardheight + ';'" :option="data" @dataZoom="updateZoom" :auto-resize="true"></chart>
|
||||
</div>
|
||||
@@ -126,6 +184,7 @@ import { mapActions } from 'vuex'
|
||||
import taskTypes from '@/store/modules/task/content/types'
|
||||
import CanvasChartRealTimeCalculation from './CanvasChartRealTimeCalculation.vue'
|
||||
import { dataStreamBuffer } from '@/data/task/DataStreamBuffer'
|
||||
import configTable from '@/data/config-table/index.js'
|
||||
|
||||
export default {
|
||||
name: 'CanvasChart',
|
||||
@@ -158,6 +217,13 @@ export default {
|
||||
},
|
||||
},
|
||||
computed: {
|
||||
chartInfo () {
|
||||
if (this.data === undefined || this.data === null) return ''
|
||||
if (this.data.mappingID === undefined || this.data.mappingID === '-1') return ''
|
||||
const device = this.deviceListNew.find(ele => String(ele.memory_board) === String(this.data.mappingID))
|
||||
const deviceMode = configTable.getModeConfig(device.library_name, device.configuration.MODE).name
|
||||
return `${device.name}_[${device.memory_board}] | MAC_${device.mac_address.toUpperCase()} | ${this.data.createdBy} chart: ${deviceMode}`
|
||||
},
|
||||
...mapFields('', [
|
||||
'developerMode',
|
||||
]),
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div>
|
||||
<div class="row xs12 sm12 lg10 xl10 pa-2">
|
||||
<div class="xs12 sm12 lg12 xl12 mr-4" style="text-align: end;">
|
||||
<!-- <img v-if="!integralClicked && (mode_name==='Chronoamperometric' || mode_name==='I-T Graph' || mode_name==='I-V Curve')" src='@/assets/img/toolbox/integral.svg' @click="clickIntegral"> -->
|
||||
<va-button :flat="true" class="pa-0 ma-0 mr-2" v-if="xlogClicked && (mode_name==='Linear Sweep Voltammetry' || mode_name==='I-V Curve')" color="danger" @click="clickXLog" small>
|
||||
<!-- To Raw Mode -->
|
||||
@@ -122,13 +122,7 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
captureChart: function () {
|
||||
const newData = Object.assign({}, this.chartData[this.chartID])
|
||||
this.chartData[String(newData.chartID) + '-1'] = newData
|
||||
this.chartData[String(newData.chartID) + '-1'].captured = true
|
||||
this.chartData[String(newData.chartID) + '-1'].cardName = this.chartData[String(newData.chartID) + '-1'].cardName + ' - captured'
|
||||
this.chartData[String(newData.chartID) + '-1'].chartID = String(newData.chartID) + '-1'
|
||||
this.taskContentChartPanelKey++
|
||||
// console.log(this.chartData[String(newData.chartID) + '-1'])
|
||||
this.$emit('captureChart')
|
||||
},
|
||||
getClicked: function (clicked) {
|
||||
this.calClicked = clicked
|
||||
|
||||
@@ -1,37 +1,20 @@
|
||||
<template>
|
||||
<div>
|
||||
<!-- cycle display -->
|
||||
<div v-if="data !== null && data.cycle > 0" class="row flex sm12 xl12 md12 xs12 align--center my-0 py-0">
|
||||
<div style="text-align: right;">
|
||||
<h1 style="color: #707ee7;"> cycle <span style="color: white; background-color: #707ee7; border-radius: 40%;" class="pa-2">{{ data.cycle }}</span></h1>
|
||||
</div>
|
||||
</div>
|
||||
<div v-for="(chart, chartIndex) in realTime" :key="'c'+chartIndex">
|
||||
<div v-for="(grid, gridIndex) in chart" :key="'s'+gridIndex" class="row ma-0 pa-0">
|
||||
<div class="col flex xs0 sm0 lg0 md0 xl0 xxl1"/>
|
||||
<div class="col flex xs2 sm2 lg2 md2 xl2 xxl1" pa-0 ma-0>
|
||||
<p color="primary" style="text-align: right;">{{ grid.name }}</p>
|
||||
</div>
|
||||
<!-- value (y-axis) -->
|
||||
<div class="col flex sm2 xl2 md2 xs2">
|
||||
<!-- cycle -->
|
||||
<div class="ma-1" style="width: 75px;"
|
||||
v-show="data !== null && data.cycle > 0"
|
||||
>
|
||||
<va-input
|
||||
label="y-value"
|
||||
disable="disable"
|
||||
v-model="grid.yValue"
|
||||
/>
|
||||
</div>
|
||||
<!-- unit (y-axis) -->
|
||||
<div class="col flex sm2 xl2 md2 xs2">
|
||||
<va-select
|
||||
label="y-unit"
|
||||
v-model="grid.yUnit"
|
||||
:options="grid.yUnitOption"
|
||||
label="cycle no."
|
||||
v-model="data.cycle"
|
||||
:options="grid.xUnitOption"
|
||||
noClear
|
||||
/>
|
||||
</div>
|
||||
<div class="col flex sm1 xl1 md1 xs1"></div>
|
||||
<!-- value (x-axis) -->
|
||||
<div class="col flex sm2 xl2 md2 xs2">
|
||||
<div class="ma-1" style="width: 100px;">
|
||||
<va-input
|
||||
label="x-value"
|
||||
disable="disable"
|
||||
@@ -39,7 +22,7 @@
|
||||
/>
|
||||
</div>
|
||||
<!-- unit (x-axis) -->
|
||||
<div class="col flex sm2 xl2 md2 xs2">
|
||||
<div class="ma-1" style="width: 75px;">
|
||||
<va-select
|
||||
label="x-unit"
|
||||
v-model="grid.xUnit"
|
||||
@@ -47,6 +30,23 @@
|
||||
noClear
|
||||
/>
|
||||
</div>
|
||||
<!-- value (y-axis) -->
|
||||
<div class="ma-1" style="width: 100px;">
|
||||
<va-input
|
||||
label="y-value"
|
||||
disable="disable"
|
||||
v-model="grid.yValue"
|
||||
/>
|
||||
</div>
|
||||
<!-- unit (y-axis) -->
|
||||
<div class="ma-1" style="width: 75px;">
|
||||
<va-select
|
||||
label="y-unit"
|
||||
v-model="grid.yUnit"
|
||||
:options="grid.yUnitOption"
|
||||
noClear
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -94,15 +94,21 @@ export default {
|
||||
// set name, sourceIndex in data.series
|
||||
_newChannel.name = this.data.gridSource[gridIndex][channelIndex].name
|
||||
_newChannel.seriesSource = this.data.series.findIndex((ele) => ele.name === _newChannel.name)
|
||||
|
||||
// add device mode condition
|
||||
const device = this.deviceListNew.find(ele => String(ele.memory_board) === String(this.chartData[this.chartID].mappingID))
|
||||
let mode = -1
|
||||
if (device !== undefined) mode = device.configuration.MODE
|
||||
|
||||
// set x-axis
|
||||
_newChannel.xValue = 0
|
||||
_newChannel.xUnit = _xAxis.default.defaultUnit
|
||||
_newChannel.xUnit = (typeof _xAxis.default.defaultUnit === 'function') ? _xAxis.default.defaultUnit(mode) : _xAxis.default.defaultUnit
|
||||
_newChannel.xScale = _xAxis.default.unit
|
||||
_newChannel.xUnitOption = Object.keys(_xAxis.default.unit)
|
||||
_newChannel.xName = _xAxis.default.name
|
||||
// set y-axis
|
||||
_newChannel.yValue = 0
|
||||
_newChannel.yUnit = _yAxis.default.defaultUnit
|
||||
_newChannel.yUnit = (typeof _yAxis.default.defaultUnit === 'function') ? _yAxis.default.defaultUnit(mode) : _yAxis.default.defaultUnit
|
||||
_newChannel.yScale = _yAxis.default.unit
|
||||
_newChannel.yUnitOption = Object.keys(_yAxis.default.unit)
|
||||
_newChannel.yName = _yAxis.default.name
|
||||
|
||||
@@ -57,7 +57,7 @@ const chartTable = {
|
||||
mA: 1e6,
|
||||
A: 1e9,
|
||||
},
|
||||
defaultUnit: 'mA',
|
||||
defaultUnit: (Mode) => { return (Mode === 10) ? 'nA' : 'mA' },
|
||||
downloadUnit: 'mA',
|
||||
},
|
||||
// Q = ∫ I dt
|
||||
@@ -152,7 +152,7 @@ const chartTable = {
|
||||
mA: 1e6,
|
||||
A: 1e9,
|
||||
},
|
||||
defaultUnit: 'mA',
|
||||
defaultUnit: (Mode) => { return (Mode === 10) ? 'nA' : 'mA' },
|
||||
downloadUnit: 'mA',
|
||||
},
|
||||
// Gm = dI/dV
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
{{ `[${device.memory_board}]` }} {{ device.name }}
|
||||
</va-item-label>
|
||||
<va-item-label caption>
|
||||
{{ device.mac_address }}
|
||||
{{ device.mac_address.toUpperCase() }}
|
||||
</va-item-label>
|
||||
</va-item-section>
|
||||
</va-item>
|
||||
|
||||
@@ -8,7 +8,7 @@ function newChart (chartID, numOfCharts) {
|
||||
chartYUnit: '',
|
||||
chartXMode: 'value', // value or time
|
||||
chartYMode: 'value', // value or time
|
||||
cardName: 'chart' + String(numOfCharts),
|
||||
cardName: 'Chart' + String(numOfCharts),
|
||||
cardHeight: '500px',
|
||||
cardWidth: 'auto',
|
||||
mappingID: '-1',
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
import { tableRouter } from '@/components/analysis/replay/toolbox/EliteReplayTable'
|
||||
|
||||
function getTime (val) {
|
||||
let label = ''
|
||||
const hour = Math.floor(val / 3.6e9)
|
||||
@@ -23,7 +25,7 @@ function getTime (val) {
|
||||
return label
|
||||
}
|
||||
|
||||
function newTooltip (chartID) {
|
||||
function newTooltip (controlPanel) {
|
||||
return {
|
||||
hideDelay: 5000,
|
||||
trigger: 'axis',
|
||||
@@ -32,92 +34,37 @@ function newTooltip (chartID) {
|
||||
borderWidth: 1,
|
||||
borderRadius: 0,
|
||||
padding: 10,
|
||||
// axisPointer: {
|
||||
// type: 'cross',
|
||||
// animation: false,
|
||||
// label: {
|
||||
// backgroundColor: '#505765',
|
||||
// },
|
||||
// },
|
||||
|
||||
formatter: function (params) {
|
||||
if (params.length) {
|
||||
if (params[0].seriesName.split('_')[0] === 'T' && params[0].seriesName.split('_')[1] !== 'T') {
|
||||
params.unshift({ seriesName: 'Time', value: [null, getTime(parseFloat(params[0].value[0]))], color: '#5193f2' })
|
||||
} else if (params[0].seriesName.split('_')[0] !== 'T' && params[0].seriesName.split('_')[1] === 'T') {
|
||||
params.unshift({ seriesName: 'Time', value: [null, getTime(parseFloat(params[0].value[1]))], color: '#5193f2' })
|
||||
} else {
|
||||
params.unshift({ seriesName: 'Time', value: [null, getTime(parseFloat(params[0].value[2]))], color: '#5193f2' })
|
||||
}
|
||||
let tip = ''
|
||||
for (var i = 0; i < params.length; i++) {
|
||||
const param = params[i]
|
||||
const style = 'color: ' + param.color
|
||||
let value
|
||||
// console.log(param.value)
|
||||
if (param.seriesName === 'Time') {
|
||||
value = param.value[1]
|
||||
} else if (param.seriesName.split('_')[1] === 'T' && param.seriesName.split('_')[0] !== 'T') {
|
||||
const physicalQuantity = param.seriesName.split('_')[0][param.seriesName.split('_')[0].length - 1]
|
||||
if (physicalQuantity === 'V') {
|
||||
value = parseFloat(param.value[0]).toFixed(3) + ' μV'
|
||||
} else if (physicalQuantity === 'I') {
|
||||
value = parseFloat(param.value[0]).toFixed(3) + ' nA'
|
||||
} else if (physicalQuantity === 'R') {
|
||||
value = parseFloat(param.value[0]).toFixed(3) + ' mΩ'
|
||||
} else if (physicalQuantity === 'X' || physicalQuantity === 'Y' || physicalQuantity === 'Z' || physicalQuantity === 'M') {
|
||||
value = (parseFloat(param.value[0]) / 100).toFixed(3) + ' (g)'
|
||||
} else if (!isNaN(physicalQuantity)) {
|
||||
value = (parseFloat(param.value[0]) / 1000).toFixed(3) + ' (mV)'
|
||||
} else {
|
||||
value = parseFloat(param.value[0]).toFixed(3)
|
||||
}
|
||||
} else if (param.seriesName.split('_')[1] !== 'T' && param.seriesName.split('_')[0] === 'T') {
|
||||
const physicalQuantity = param.seriesName.split('_')[1][param.seriesName.split('_')[1].length - 1]
|
||||
if (physicalQuantity === 'V') {
|
||||
value = parseFloat(param.value[1]).toFixed(3) + ' μV'
|
||||
} else if (physicalQuantity === 'I') {
|
||||
value = parseFloat(param.value[1]).toFixed(3) + ' nA'
|
||||
} else if (physicalQuantity === 'R') {
|
||||
value = parseFloat(param.value[1]).toFixed(3) + ' mΩ'
|
||||
} else if (physicalQuantity === 'X' || physicalQuantity === 'Y' || physicalQuantity === 'Z' || physicalQuantity === 'M') {
|
||||
value = (parseFloat(param.value[1]) / 100).toFixed(3) + ' (g)'
|
||||
} else if (!isNaN(physicalQuantity)) {
|
||||
value = (parseFloat(param.value[1]) / 1000).toFixed(3) + ' (mV)'
|
||||
} else {
|
||||
value = parseFloat(param.value[1]).toFixed(3)
|
||||
}
|
||||
} else {
|
||||
let value1
|
||||
let value2
|
||||
if (param.seriesName.split('_')[0][param.seriesName.split('_')[0].length - 1] === 'V') {
|
||||
value1 = parseFloat(param.value[0]).toFixed(3) + ' μV'
|
||||
} else if (param.seriesName.split('_')[0][param.seriesName.split('_')[0].length - 1] === 'I') {
|
||||
value1 = parseFloat(param.value[0]).toFixed(3) + ' nA'
|
||||
} else if (param.seriesName.split('_')[0][param.seriesName.split('_')[0].length - 1] === 'R') {
|
||||
value1 = parseFloat(param.value[0]).toFixed(3) + ' mΩ'
|
||||
} else {
|
||||
value1 = parseFloat(param.value[0]).toFixed(3)
|
||||
}
|
||||
|
||||
if (param.seriesName.split('_')[1][param.seriesName.split('_')[1].length - 1] === 'V') {
|
||||
value2 = parseFloat(param.value[1]).toFixed(3) + ' μV'
|
||||
} else if (param.seriesName.split('_')[1][param.seriesName.split('_')[1].length - 1] === 'I') {
|
||||
value2 = parseFloat(param.value[1]).toFixed(3) + ' nA'
|
||||
} else if (param.seriesName.split('_')[1][param.seriesName.split('_')[1].length - 1] === 'R') {
|
||||
value2 = parseFloat(param.value[1]).toFixed(3) + ' mΩ'
|
||||
} else {
|
||||
value2 = parseFloat(param.value[1]).toFixed(3)
|
||||
}
|
||||
|
||||
value = value1 + ', ' + value2
|
||||
}
|
||||
tip += '<span style="' + style + '">' +
|
||||
param.seriesName +
|
||||
':</span><span style="' +
|
||||
style + '">' + value + '</span><br>'
|
||||
}
|
||||
return tip
|
||||
// params is empty
|
||||
if (!params.length) return params
|
||||
// else return params
|
||||
// params is unempty
|
||||
let tip = ''
|
||||
let value // value on cursor
|
||||
const param = params[0]// find coressonding parameter to the channel
|
||||
const style = 'color: ' + param.color
|
||||
const [xTable, yTable] = tableRouter.getTable(controlPanel.x.type, controlPanel.x.funct, controlPanel.y.type, controlPanel.y.funct) // unit is store in this object
|
||||
// (Default) Time
|
||||
if (controlPanel.x.type === 'Time') {
|
||||
value = getTime(parseFloat(param.value[0]))
|
||||
} else {
|
||||
value = getTime(parseFloat(param.value[2]))
|
||||
}
|
||||
tip += '<span style="color: #000000">' + 'Time: ' + value + '</span><br>'
|
||||
// (Manual) Voltage, Current, Resistance
|
||||
tip += '<span style="' + style + '">' + param.seriesName + ':<ul style = "list-style-type: disc; list-style-position: inside">'
|
||||
if (controlPanel.x.type !== 'Time') {
|
||||
value = parseFloat(param.value[0] / xTable.option[controlPanel.x.unit]).toFixed(3) + ' ' + controlPanel.x.unit
|
||||
tip += '<li>' + xTable.name + ' = ' + value + '</li>'
|
||||
}
|
||||
if (controlPanel.y.type !== 'Time') {
|
||||
value = parseFloat(param.value[1] / yTable.option[controlPanel.y.unit]).toFixed(3) + ' ' + controlPanel.y.unit
|
||||
tip += '<li>' + yTable.name + ' = ' + value + '</li>'
|
||||
}
|
||||
tip += '</ul></span>'
|
||||
|
||||
return tip
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
@@ -50,7 +50,7 @@ function newTooltip (realTime, dataMode) {
|
||||
} else {
|
||||
value = getTime(parseFloat(params[0].value[timeIndex]))
|
||||
}
|
||||
tip += '<span style="color: #5193f2">' + 'Time: ' + value + '</span><br>'
|
||||
tip += '<span style="color: #000000">' + 'Time: ' + value + '</span><br>'
|
||||
// (Manual) Voltage, Current, Impedance
|
||||
for (let gridIndex = 0; gridIndex < realTime.length; gridIndex++) {
|
||||
for (let channelIndex = 0; channelIndex < realTime[gridIndex].length; channelIndex++) {
|
||||
|
||||
@@ -2,6 +2,7 @@ function newActionTemplate () {
|
||||
return [
|
||||
'start',
|
||||
'stop',
|
||||
'cycle',
|
||||
]
|
||||
}
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ function newConditionTemplate (action) {
|
||||
select: false,
|
||||
type: 'hidden',
|
||||
prefix: 'When previous task done',
|
||||
suffix: 'done',
|
||||
suffix: '',
|
||||
value: '',
|
||||
},
|
||||
// device: {
|
||||
@@ -88,6 +88,22 @@ function newConditionTemplate (action) {
|
||||
// value: '',
|
||||
// },
|
||||
},
|
||||
cycle: {
|
||||
cycle_next: {
|
||||
select: false,
|
||||
type: 'text',
|
||||
prefix: 'Cycle next go to:',
|
||||
suffix: '',
|
||||
value: '',
|
||||
},
|
||||
cycle: {
|
||||
select: false,
|
||||
type: 'text',
|
||||
prefix: 'Run',
|
||||
suffix: 'times',
|
||||
value: '0',
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -12,6 +12,9 @@ function newTask (name, uuid) {
|
||||
select: false,
|
||||
status: -1,
|
||||
cycle: -1,
|
||||
cycle_count: 0,
|
||||
cycle_next: '',
|
||||
cycle_next_uuid: '',
|
||||
uuid: uuid,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -210,7 +210,7 @@ const actions = {
|
||||
if (payload.chartAllData[payload.chartID] == null) {
|
||||
payload.chartAllData[payload.chartID] = newChart(payload.chartID)
|
||||
if (payload.type !== 'overview') {
|
||||
payload.chartAllData[payload.chartID].tooltip = newTooltip(state.info)
|
||||
payload.chartAllData[payload.chartID].tooltip = newTooltip(state.controlPanel)
|
||||
}
|
||||
payload.chartAllData[payload.chartID].chartType = payload.type
|
||||
payload.chartAllData[payload.chartID].chartDevice = payload.device
|
||||
@@ -375,7 +375,7 @@ const actions = {
|
||||
|
||||
switch (sourceList[0].name) {
|
||||
case 'Time':
|
||||
xAxisType = 'time'
|
||||
xAxisType = 'value'
|
||||
xAxisSource = [-1, -1]
|
||||
break
|
||||
default:
|
||||
|
||||
@@ -179,14 +179,20 @@ const chartMutations = {
|
||||
axisLabel = state.chartData[payload.chartID].yAxis[payload.axisIndex].axisLabel
|
||||
unitScale = yTable.option[unit]
|
||||
}
|
||||
const _axisLabel = JSON.parse(JSON.stringify(axisLabel))
|
||||
if (unit === 'auto') {
|
||||
axisLabel.formatter = tableRouter.autoTimeFormatter
|
||||
_axisLabel.formatter = tableRouter.autoTimeFormatter
|
||||
} else {
|
||||
axisLabel.formatter = function (val) {
|
||||
_axisLabel.formatter = function (val) {
|
||||
const label = (val / unitScale).toFixed(3) + unit
|
||||
return label
|
||||
}
|
||||
}
|
||||
if (payload.axis === 'x') {
|
||||
state.chartData[payload.chartID].xAxis[payload.axisIndex].axisLabel = _axisLabel
|
||||
} else {
|
||||
state.chartData[payload.chartID].yAxis[payload.axisIndex].axisLabel = _axisLabel
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
|
||||
@@ -38,11 +38,13 @@ function newState () {
|
||||
controlPanel: {
|
||||
x: {
|
||||
type: null,
|
||||
channel: null,
|
||||
unit: null,
|
||||
funct: null,
|
||||
},
|
||||
y: {
|
||||
type: null,
|
||||
channel: null,
|
||||
unit: null,
|
||||
funct: null,
|
||||
},
|
||||
|
||||
@@ -67,7 +67,12 @@ const projectActs = {
|
||||
[typePath.select]: async ({ state, getters, commit }, payload) => {
|
||||
state.projectSelectIndex = payload.index
|
||||
// initial default device library
|
||||
state.projectLibrary = state.projectList[payload.index].device[0]?.library.value
|
||||
if (typeof state.projectList[payload.index].device[0]?.library === 'object') {
|
||||
state.projectLibrary = state.projectList[payload.index].device[0]?.library.value
|
||||
} else {
|
||||
state.projectLibrary = state.projectList[payload.index].device[0]?.library
|
||||
}
|
||||
// state.projectLibrary = state.projectList[payload.index].device[0]?.library.value
|
||||
},
|
||||
|
||||
/**
|
||||
|
||||
@@ -76,6 +76,21 @@ const taskActs = {
|
||||
task.action = Object.assign({}, task.action, payload.action)
|
||||
},
|
||||
|
||||
/**
|
||||
* set task cycle
|
||||
*
|
||||
* @param {}
|
||||
*/
|
||||
[typePath.setCycle]: async ({ state, getters, commit }, payload) => {
|
||||
const task = getters.getSelectTask
|
||||
// task.cycle = Object.assign({}, task.cycle, payload.cycle)
|
||||
// task.cycle_next = Object.assign({}, task.cycle_next, payload.cycle_next)
|
||||
task.cycle = payload.cycle
|
||||
task.cycle_next = payload.cycle_next
|
||||
task.cycle_next_uuid = payload.cycle_next_uuid
|
||||
// console.log(task, task.cycle, task.cycle_next, task.cycle_next_uuid)
|
||||
},
|
||||
|
||||
/**
|
||||
* set task paramter
|
||||
*
|
||||
|
||||
@@ -28,6 +28,7 @@ const types = {
|
||||
|
||||
setCondition: 'setConditionTask',
|
||||
setAction: 'setActionTask',
|
||||
setCycle: 'setCycleTask',
|
||||
setParameterSet: 'setParameterSetTask',
|
||||
|
||||
get: 'getTask',
|
||||
|
||||
@@ -1046,7 +1046,7 @@ const chartActs = {
|
||||
state.chartData[chartID].mappingID = '-1'
|
||||
}
|
||||
if (cardName == null) {
|
||||
state.chartData[chartID].cardName = 'chart' + String(chartID)
|
||||
state.chartData[chartID].cardName = 'Chart' + String(chartID)
|
||||
}
|
||||
state.chartData[chartID].dataZoom = null
|
||||
dispatch(typePath.updateGridList, { chartID: chartID, length: 1 })
|
||||
|
||||
Reference in New Issue
Block a user