Compare commits
11 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| dff8f1b5f6 | |||
| 33b0235455 | |||
| 838d9ff12b | |||
| 964901829a | |||
| fbcc287078 | |||
| 2f33df5fe6 | |||
| 67511566c5 | |||
| 2779c9f61e | |||
| d7c4be3e44 | |||
| 2681b6c619 | |||
| 7c0b04c4c1 |
+2
-2
@@ -53,9 +53,9 @@ Vue.use(VueWorker)
|
||||
Vue.use(VueAxios, axios)
|
||||
|
||||
// Vue.use(VueMqtt, 'ws://52.194.17.114:8083')
|
||||
// Vue.use(VueMqtt, 'ws://' + location.href.split('/')[2] + ':8083')
|
||||
Vue.use(VueMqtt, 'ws://' + location.href.split('/')[2] + ':8083')
|
||||
// Vue.use(VueMqtt, 'ws://' + '192.168.151.125' + ':8083')
|
||||
// Vue.use(VueMqtt, 'ws://' + '192.168.151.125' + ':8083')
|
||||
Vue.use(VueMqtt, 'ws://' + '192.168.151.125' + ':8083')
|
||||
|
||||
Vue.prototype.GLOBAL = global_
|
||||
|
||||
|
||||
@@ -348,7 +348,7 @@ export default {
|
||||
getControllerList: async function () {
|
||||
const update = async () => {
|
||||
this.controllerList.push({
|
||||
id: 'tommy_test',
|
||||
id: 'BPS-HUB-SN066',
|
||||
mac: '',
|
||||
status: 'loading',
|
||||
isScan: true,
|
||||
|
||||
@@ -43,7 +43,7 @@ export default {
|
||||
getControllerList: async function () {
|
||||
const update = async () => {
|
||||
this.controllerList.push({
|
||||
id: 'tommy_test',
|
||||
id: 'BPS-HUB-SN066',
|
||||
mac: '',
|
||||
status: 'loading',
|
||||
isScan: true,
|
||||
|
||||
@@ -530,7 +530,7 @@ export default {
|
||||
getControllerList: async function () {
|
||||
const update = async () => {
|
||||
this.controllerList.push({
|
||||
id: 'tommy_test',
|
||||
id: 'BPS-HUB-SN066',
|
||||
mac: '',
|
||||
status: 'loading',
|
||||
isScan: true,
|
||||
|
||||
@@ -23,7 +23,7 @@ export default {
|
||||
getControllerList: async function () {
|
||||
const update = async () => {
|
||||
this.controllerList.push({
|
||||
id: 'tommy_test',
|
||||
id: 'BPS-HUB-SN066',
|
||||
mac: '',
|
||||
status: 'loading',
|
||||
isScan: true,
|
||||
|
||||
@@ -173,9 +173,9 @@
|
||||
{{transDeviceInfo(props.rowData.configuration)}}
|
||||
</template>
|
||||
<template slot="actions" slot-scope="props" >
|
||||
<va-popover :message="`download ${props.rowData.name} in csv format`" placement="top">
|
||||
<!-- <va-popover :message="`download ${props.rowData.name} in csv format`" placement="top">
|
||||
<va-button flat small color="gray" icon="fa fa-download" v-if="props.rowData.type !== 'folder' && props.rowData.device.library_name.indexOf('Neulive') >= 0" @click.stop="downloadCsv(props.rowData)"/>
|
||||
</va-popover>
|
||||
</va-popover> -->
|
||||
<va-popover :message="`download ${props.rowData.name} in excel format`" placement="top">
|
||||
<va-button flat small color="gray" icon="fa fa-download" v-if="props.rowData.type !== 'folder' && props.rowData.device.library_name.indexOf('Elite') >= 0" @click.stop="downloadExcel(props.rowData)"/>
|
||||
</va-popover>
|
||||
@@ -185,9 +185,9 @@
|
||||
<va-popover :message="`replay ${props.rowData.name}`" placement="top">
|
||||
<va-button flat small color="gray" icon="fa fa-eye" v-if="props.rowData.type !== 'folder'" @click.stop="replay(props.rowData)"/>
|
||||
</va-popover>
|
||||
<va-popover :message="`spike ${props.rowData.name}`" placement="top">
|
||||
<!-- <va-popover :message="`spike ${props.rowData.name}`" placement="top">
|
||||
<va-button flat small color="gray" icon="fa fa-filter" v-if="props.rowData.type !== 'folder'" @click.stop="spike(props.rowData)"/>
|
||||
</va-popover>
|
||||
</va-popover> -->
|
||||
<va-popover :message="`edit ${props.rowData.name}`" placement="top">
|
||||
<va-button flat small color="gray" icon="fa fa-pencil" @click.stop="editFileConfirm(props.rowData)"/>
|
||||
</va-popover>
|
||||
|
||||
@@ -12,13 +12,13 @@
|
||||
<va-item :key="controller.device_mac" class="pa-0 ma-0"
|
||||
>
|
||||
<va-item-section avatar class="ml-4 mr-4">
|
||||
<img
|
||||
<!-- <img
|
||||
:src="getImageUrl()"
|
||||
:alt="'BPS-CONTROLLER'"
|
||||
width="200px"
|
||||
height="200px"
|
||||
contain
|
||||
/>
|
||||
/> -->
|
||||
</va-item-section>
|
||||
<va-item-section class="ml-5 mr-4" >
|
||||
<va-item-label style="font-size: 2rem;">
|
||||
|
||||
@@ -176,7 +176,12 @@ export default {
|
||||
})
|
||||
this.channelSelectDisableX = false
|
||||
} else if (taskInfo.getDeviceInfo(this.deviceSelectX.id).info.library_name.indexOf('Elite') >= 0) {
|
||||
const channelSet = taskInfo.getDeviceInfo(this.deviceSelectX.id).parameterSet.CHANNEL_LABEL
|
||||
let channelSet
|
||||
if (taskInfo.getDeviceInfo(this.deviceSelectX.id).info.library_name === 'EliteEIS' && taskInfo.getDeviceInfo(this.deviceSelectX.id).parameterSet.MODE === 0) {
|
||||
channelSet = ['Zimag_Raw', 'Zreal_Raw', 'Frequency', 'Cycle', 'Zimag', 'Zreal', 'Impedance', 'Phase', 'Current', 'Level gain']
|
||||
} else {
|
||||
channelSet = taskInfo.getDeviceInfo(this.deviceSelectX.id).parameterSet.CHANNEL_LABEL
|
||||
}
|
||||
// console.log(channelSet)
|
||||
channelSet.forEach((element, index) => {
|
||||
channelOptions.push({
|
||||
@@ -238,7 +243,12 @@ export default {
|
||||
})
|
||||
this.channelSelectDisableY = false
|
||||
} else if (taskInfo.getDeviceInfo(this.deviceSelectY.id).info.library_name.indexOf('Elite') >= 0) {
|
||||
const channelSet = taskInfo.getDeviceInfo(this.deviceSelectY.id).parameterSet.CHANNEL_LABEL
|
||||
let channelSet
|
||||
if (taskInfo.getDeviceInfo(this.deviceSelectY.id).info.library_name === 'EliteEIS' && taskInfo.getDeviceInfo(this.deviceSelectY.id).parameterSet.MODE === 0) {
|
||||
channelSet = ['Zimag_Raw', 'Zreal_Raw', 'Frequency', 'Cycle', 'Zimag', 'Zreal', 'Impedance', 'Phase', 'Current', 'Level gain']
|
||||
} else {
|
||||
channelSet = taskInfo.getDeviceInfo(this.deviceSelectY.id).parameterSet.CHANNEL_LABEL
|
||||
}
|
||||
console.log(channelSet)
|
||||
channelSet.forEach((element, index) => {
|
||||
channelOptions.push({
|
||||
@@ -291,14 +301,22 @@ export default {
|
||||
if (this.deviceSelectX.name.indexOf('Neulive') >= 0) {
|
||||
deviceNameX = 'Neulive'
|
||||
} else if (this.deviceSelectX.name.indexOf('Elite') >= 0) {
|
||||
deviceNameX = 'Elite'
|
||||
if (taskInfo.getDeviceInfo(this.deviceSelectX.id).info.library_name === 'EliteEIS') {
|
||||
deviceNameX = 'EliteEIS'
|
||||
} else {
|
||||
deviceNameX = 'Elite'
|
||||
}
|
||||
} else if (this.deviceSelectX.name.indexOf('Time') >= 0) {
|
||||
deviceNameX = 'Time'
|
||||
}
|
||||
if (this.deviceSelectY.name.indexOf('Neulive') >= 0) {
|
||||
deviceNameY = 'Neulive'
|
||||
} else if (this.deviceSelectY.name.indexOf('Elite') >= 0) {
|
||||
deviceNameY = 'Elite'
|
||||
if (taskInfo.getDeviceInfo(this.deviceSelectY.id).info.library_name === 'EliteEIS') {
|
||||
deviceNameY = 'EliteEIS'
|
||||
} else {
|
||||
deviceNameY = 'Elite'
|
||||
}
|
||||
} else if (this.deviceSelectY.name.indexOf('Time') >= 0) {
|
||||
deviceNameY = 'Time'
|
||||
}
|
||||
|
||||
@@ -116,46 +116,42 @@ export default {
|
||||
this.$emit('remove', this.selectDevice)
|
||||
},
|
||||
start: async function (device) {
|
||||
const checkParam = await this.checkIfDeviceSetDoneParam({ device: device })
|
||||
const status = checkParam.status
|
||||
const message = checkParam.message
|
||||
if (status === true) {
|
||||
this.setArchiveSettings()
|
||||
// this.$emit('start', device)
|
||||
setTimeout(() => {
|
||||
this.$emit('start', device)
|
||||
}, 500)
|
||||
this.pageToast('The device ' + device.name + ' has been started.')
|
||||
} else {
|
||||
this.pageToast('The device cannot be started because:' + message)
|
||||
}
|
||||
// const checkParam = await this.checkIfDeviceSetDoneParam({ device: device })
|
||||
// const status = checkParam.status
|
||||
// const message = checkParam.message
|
||||
// if (status === true) {
|
||||
this.setArchiveSettings()
|
||||
// this.$emit('start', device)
|
||||
setTimeout(() => {
|
||||
this.$emit('start', device)
|
||||
}, 500)
|
||||
this.pageToast('The device ' + device.name + ' has been started.')
|
||||
// } else {
|
||||
// this.pageToast('The device cannot be started because:' + message)
|
||||
// }
|
||||
},
|
||||
stop: function (device) {
|
||||
if (!device.stopping) {
|
||||
this.$emit('stop', device)
|
||||
this.pageToast('The device ' + device.name + ' has been stopped.')
|
||||
}
|
||||
this.$emit('stop', device)
|
||||
this.pageToast('The device ' + device.name + ' has been stopped.')
|
||||
},
|
||||
record: async function (device) {
|
||||
const checkParam = await this.checkIfRecordingSetDoneParam({ device: device })
|
||||
const status = checkParam.status
|
||||
const message = checkParam.message
|
||||
if (status === true) {
|
||||
device.stopping = false
|
||||
this.setArchiveSettings()
|
||||
setTimeout(() => {
|
||||
this.$emit('record', device)
|
||||
}, 500)
|
||||
this.pageToast('The device ' + device.name + ' has been started.')
|
||||
} else {
|
||||
this.pageToast('Recording cannot be started because:' + message)
|
||||
}
|
||||
// const checkParam = await this.checkIfRecordingSetDoneParam({ device: device })
|
||||
// const status = checkParam.status
|
||||
// const message = checkParam.message
|
||||
// if (status === true) {
|
||||
// device.stopping = false
|
||||
this.setArchiveSettings()
|
||||
setTimeout(() => {
|
||||
this.$emit('record', device)
|
||||
}, 500)
|
||||
this.pageToast('The device ' + device.name + ' has been started.')
|
||||
// } else {
|
||||
// this.pageToast('Recording cannot be started because:' + message)
|
||||
// }
|
||||
},
|
||||
stopRecord: function (device) {
|
||||
if (!device.stopping) {
|
||||
this.$emit('stopRecord', device)
|
||||
this.pageToast('The device ' + device.name + ' has been stopped.')
|
||||
}
|
||||
this.$emit('stopRecord', device)
|
||||
this.pageToast('The device ' + device.name + ' has been stopped.')
|
||||
},
|
||||
generateChart: function (device) {
|
||||
this.$emit('generate', device)
|
||||
|
||||
@@ -167,7 +167,7 @@ export default {
|
||||
instruction: 'start',
|
||||
}))
|
||||
}
|
||||
device.stopping = false
|
||||
// device.stopping = false
|
||||
device.isSync = true
|
||||
this.$emit('refreshSetting')
|
||||
// ### show device info
|
||||
@@ -205,7 +205,7 @@ export default {
|
||||
instruction: 'interrupt',
|
||||
}))
|
||||
}
|
||||
device.stopping = true
|
||||
// device.stopping = true
|
||||
}
|
||||
},
|
||||
detectDevice: function (device) {
|
||||
@@ -232,7 +232,7 @@ export default {
|
||||
instruction: 'record',
|
||||
}))
|
||||
device.isSync = true
|
||||
device.stopping = false
|
||||
// device.stopping = false
|
||||
this.$emit('refreshSetting')
|
||||
api.task.update({
|
||||
device_config: taskInfo.getTaskInfo().deviceList,
|
||||
@@ -243,18 +243,16 @@ export default {
|
||||
}
|
||||
},
|
||||
stopRecord: function (device) {
|
||||
if (!device.stopping) {
|
||||
dataStreamBuffer.removeByDevice(taskInfo.getRawDeviceID(device.id))
|
||||
if (taskInfo.getDeviceInfo(device.id).info.isSync) {
|
||||
this.mqttPub(taskInfo.getTaskInfo().controllerID + '_user', JSON.stringify({
|
||||
header: 'device_instruction/0',
|
||||
device: taskInfo.getRawDeviceID(device.id),
|
||||
instruction: 'stop_record',
|
||||
}))
|
||||
}
|
||||
device.isSync = false
|
||||
device.stopping = true
|
||||
dataStreamBuffer.removeByDevice(taskInfo.getRawDeviceID(device.id))
|
||||
if (taskInfo.getDeviceInfo(device.id).info.isSync) {
|
||||
this.mqttPub(taskInfo.getTaskInfo().controllerID + '_user', JSON.stringify({
|
||||
header: 'device_instruction/0',
|
||||
device: taskInfo.getRawDeviceID(device.id),
|
||||
instruction: 'stop_record',
|
||||
}))
|
||||
}
|
||||
device.isSync = false
|
||||
// device.stopping = true
|
||||
},
|
||||
sti: function (device) {
|
||||
this.mqttPub(taskInfo.getTaskInfo().controllerID + '_user', JSON.stringify({
|
||||
@@ -361,7 +359,7 @@ export default {
|
||||
type: type,
|
||||
isSync: taskInfo.getDeviceInfoByRawID(selectID).info.isSync,
|
||||
isStimulate: taskInfo.getDeviceInfoByRawID(selectID).info.isStimulate,
|
||||
stopping: false,
|
||||
// stopping: false,
|
||||
}
|
||||
this.deviceList.push(_device)
|
||||
this.deviceSelect = ''
|
||||
|
||||
@@ -395,6 +395,7 @@ export default {
|
||||
this.measureEocButton.status = false
|
||||
},
|
||||
refresh () {
|
||||
// taskInfo.getDeviceInfo(this.deviceID).parameterSet.CHANNEL_LABEL = ['Z_image_Raw', 'Z_Real_Raw', 'Frequency', 'Cycle', 'Z_imag', 'Z_real', 'Impedance', 'Phase', 'Current', 'Level gain']
|
||||
this.workingModeSelect = this.workingModeOptions[taskInfo.getDeviceInfo(this.deviceID).parameterSet.MODE]
|
||||
if (this.workingModeSelect != null) {
|
||||
this.workingModeSelectChange(this.workingModeSelect)
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
<template>
|
||||
<div>
|
||||
|
||||
<elite-parameter-recording v-if="eliteVer=='1'" :ref="'rec_ref'" :deviceID="deviceID"/>
|
||||
<elite-parameter-recording v-if="eliteVer=='1'" :ref="'rec_ref_1'" :deviceID="deviceID"/>
|
||||
<!-- <elite-parameter-recording-elitezm15 :ref="'rec_ref'" :deviceID="deviceID"/> -->
|
||||
<!--<elite-parameter-recording :ref="'rec_ref'" :deviceID="deviceID"/>-->
|
||||
<elite-parameter-recording-elitezm15 v-else-if="eliteVer=='2'" :ref="'rec_ref'" :deviceID="deviceID"/>
|
||||
<elite-parameter-recording-elite-e-i-s v-else :ref="'rec_ref'" :deviceID="deviceID"/>
|
||||
<elite-parameter-recording-elitezm15 v-else-if="eliteVer=='2'" :ref="'rec_ref_2'" :deviceID="deviceID"/>
|
||||
<elite-parameter-recording-elite-e-i-s v-else :ref="'rec_ref_4'" :deviceID="deviceID"/>
|
||||
<!--<elite-parameter-recording :ref="'rec_ref'" :deviceID="deviceID"/>-->
|
||||
|
||||
</div>
|
||||
@@ -53,6 +53,8 @@ export default {
|
||||
} else if (JSON.stringify(ver.slice(0, 4)) === JSON.stringify([0, 2, 1, 7])) {
|
||||
this.eliteVer = '3' // megafly
|
||||
// console.log('3:', JSON.stringify(ver.slice(0, 4)), ',', JSON.stringify([0, 2, 1, 7]))
|
||||
} else {
|
||||
this.eliteVer = '4'
|
||||
}
|
||||
},
|
||||
mqttPub: function (topic, mes) {
|
||||
@@ -70,11 +72,35 @@ export default {
|
||||
this.compareEliteVer(taskInfo.getDeviceInfo(this.deviceID).info.serial_number)
|
||||
},
|
||||
refresh: function () {
|
||||
this.$nextTick(() => {
|
||||
if (this.$refs.rec_ref != null) {
|
||||
this.$refs.rec_ref.refresh()
|
||||
}
|
||||
})
|
||||
// console.log(this.eliteVer)
|
||||
switch (this.eliteVer) {
|
||||
case '1':
|
||||
this.$nextTick(() => {
|
||||
if (this.$refs.rec_ref_1 != null) {
|
||||
this.$refs.rec_ref_1.refresh()
|
||||
}
|
||||
})
|
||||
break
|
||||
case '2':
|
||||
this.$nextTick(() => {
|
||||
if (this.$refs.rec_ref_2 != null) {
|
||||
this.$refs.rec_ref_2.refresh()
|
||||
}
|
||||
})
|
||||
break
|
||||
case '4':
|
||||
this.$nextTick(() => {
|
||||
if (this.$refs.rec_ref_4 != null) {
|
||||
this.$refs.rec_ref_4.refresh()
|
||||
}
|
||||
})
|
||||
break
|
||||
}
|
||||
// this.$nextTick(() => {
|
||||
// if (this.$refs.rec_ref != null) {
|
||||
// this.$refs.rec_ref.refresh()
|
||||
// }
|
||||
// })
|
||||
// console.log('window:3,refresh(this.$nextTick:', this.$nextTick, ',this.$refs:', this.$refs, ')')
|
||||
},
|
||||
|
||||
|
||||
+26
-19
@@ -16,25 +16,32 @@ const hasCycleMode = (mode) => {
|
||||
return false
|
||||
}
|
||||
|
||||
const getDefaultChartTypeByMode = (mode) => {
|
||||
// 1: I, 2: V, 3: R
|
||||
const settings = {}
|
||||
settings[0] = ['Elite', 2, 'Elite', 1]
|
||||
settings[1] = ['Elite', 2, 'Elite', 1]
|
||||
settings[2] = ['Time', 2, 'Elite', 2]
|
||||
settings[3] = ['Time', 2, 'Elite', 3]
|
||||
settings[4] = ['Time', 2, 'Elite', 2]
|
||||
settings[5] = ['Time', 2, 'Elite', 1]
|
||||
settings[6] = ['Time', 2, 'Elite', 2]
|
||||
settings[7] = ['Elite', 2, 'Elite', 1]
|
||||
settings[8] = ['Elite', 2, 'Elite', 1]
|
||||
settings[9] = ['Time', 2, 'Elite', 1]
|
||||
settings[10] = ['Elite', 2, 'Elite', 1]
|
||||
settings[11] = ['Time', 2, 'Elite', 1]
|
||||
settings[13] = ['Time', 2, 'Elite', 2]
|
||||
settings[14] = ['Time', 2, 'Elite', 2]
|
||||
settings[15] = ['Elite', 2, 'Elite', 1]
|
||||
return settings[mode]
|
||||
const getDefaultChartTypeByMode = (mode, lab) => {
|
||||
if (lab !== 'EliteEIS') {
|
||||
const settings = {}
|
||||
settings[0] = ['Elite', 2, 'Elite', 1]
|
||||
settings[1] = ['Elite', 2, 'Elite', 1]
|
||||
settings[2] = ['Time', 2, 'Elite', 2]
|
||||
settings[3] = ['Time', 2, 'Elite', 3]
|
||||
settings[4] = ['Time', 2, 'Elite', 2]
|
||||
settings[5] = ['Time', 2, 'Elite', 1]
|
||||
settings[6] = ['Time', 2, 'Elite', 2]
|
||||
settings[7] = ['Elite', 2, 'Elite', 1]
|
||||
settings[8] = ['Elite', 2, 'Elite', 1]
|
||||
settings[9] = ['Time', 2, 'Elite', 1]
|
||||
settings[10] = ['Elite', 2, 'Elite', 1]
|
||||
settings[11] = ['Time', 2, 'Elite', 1]
|
||||
settings[13] = ['Time', 2, 'Elite', 2]
|
||||
settings[14] = ['Time', 2, 'Elite', 2]
|
||||
settings[15] = ['Elite', 2, 'Elite', 1]
|
||||
return settings[mode]
|
||||
} else {
|
||||
const settings = {}
|
||||
settings[0] = ['EliteEIS', 6, 'EliteEIS', 5]
|
||||
settings[1] = ['Elite', 2, 'Elite', 1]
|
||||
settings[2] = ['Time', 2, 'Elite', 2]
|
||||
return settings[mode]
|
||||
}
|
||||
}
|
||||
|
||||
const transMac = (rawAddr) => {
|
||||
|
||||
@@ -150,6 +150,43 @@ function getLegendName (sourceList, formulaID) {
|
||||
break
|
||||
}
|
||||
break
|
||||
case 'EliteEIS':
|
||||
switch (source.channel) {
|
||||
case 1:
|
||||
legendName += 'E' + source.id + '-Zimag_raw'
|
||||
break
|
||||
case 2:
|
||||
legendName += 'E' + source.id + '-Zreal_raw'
|
||||
break
|
||||
case 3:
|
||||
legendName += 'E' + source.id + '-Freq'
|
||||
break
|
||||
case 4:
|
||||
legendName += 'E' + source.id + '-Cycle'
|
||||
break
|
||||
case 5:
|
||||
legendName += 'E' + source.id + '-Zimag'
|
||||
break
|
||||
case 6:
|
||||
legendName += 'E' + source.id + '-Zreal'
|
||||
break
|
||||
case 7:
|
||||
legendName += 'E' + source.id + '-Imped'
|
||||
break
|
||||
case 8:
|
||||
legendName += 'E' + source.id + '-Phase'
|
||||
break
|
||||
case 9:
|
||||
legendName += 'E' + source.id + '-Current'
|
||||
break
|
||||
case 10:
|
||||
legendName += 'E' + source.id + '-Level_gain'
|
||||
break
|
||||
default:
|
||||
legendName += 'E' + source.id + 'CH' + source.channel
|
||||
break
|
||||
}
|
||||
break
|
||||
default:
|
||||
legendName += 'D' + source.id + 'CH' + source.channel
|
||||
break
|
||||
@@ -684,7 +721,7 @@ export const chartData = {
|
||||
|
||||
const _chartRegisterDevice = (chartID, device) => {
|
||||
if (taskInfo.getDeviceInfo(device.id).info.library_name.indexOf('Elite') >= 0) {
|
||||
const setting = global_.getDefaultChartTypeByMode(taskInfo.getDeviceInfo(device.id).parameterSet.MODE)
|
||||
const setting = global_.getDefaultChartTypeByMode(taskInfo.getDeviceInfo(device.id).parameterSet.MODE, taskInfo.getDeviceInfo(device.id).info.library_name)
|
||||
console.log(setting)
|
||||
const xType = setting[0]
|
||||
const xValue = setting[1]
|
||||
@@ -693,31 +730,68 @@ export const chartData = {
|
||||
chartRegister(chartID, 0, xType, device.id, xValue, yType, device.id, yValue, null)
|
||||
_chartData[chartID].chartDevice = 'elite'
|
||||
_chartData[chartID].chartMode = taskInfo.getDeviceInfo(device.id).parameterSet.MODE
|
||||
switch (xValue) {
|
||||
case 1:
|
||||
_chartData[chartID].chartXUnit = 'uA' // nA * 1000
|
||||
break
|
||||
case 2:
|
||||
_chartData[chartID].chartXUnit = 'mV' // uV * 1000
|
||||
break
|
||||
case 3:
|
||||
_chartData[chartID].chartXUnit = 'Ω' // mOhm * 1000
|
||||
break
|
||||
default:
|
||||
break
|
||||
}
|
||||
switch (yValue) {
|
||||
case 1:
|
||||
_chartData[chartID].chartYUnit = 'uA'
|
||||
break
|
||||
case 2:
|
||||
_chartData[chartID].chartYUnit = 'mV'
|
||||
break
|
||||
case 3:
|
||||
_chartData[chartID].chartYUnit = 'Ω'
|
||||
break
|
||||
default:
|
||||
break
|
||||
if (taskInfo.getDeviceInfo(device.id).info.library_name === 'EliteEIS') {
|
||||
switch (xValue) {
|
||||
case 3:
|
||||
_chartData[chartID].chartXUnit = 'mHz'
|
||||
break
|
||||
case 4:
|
||||
_chartData[chartID].chartXUnit = 'cycle'
|
||||
break
|
||||
case 8:
|
||||
_chartData[chartID].chartXUnit = '˚'
|
||||
break
|
||||
case 9:
|
||||
_chartData[chartID].chartXUnit = 'nA'
|
||||
break
|
||||
default:
|
||||
_chartData[chartID].chartXUnit = 'ohm'
|
||||
break
|
||||
}
|
||||
switch (yValue) {
|
||||
case 3:
|
||||
_chartData[chartID].chartYUnit = 'mHz'
|
||||
break
|
||||
case 4:
|
||||
_chartData[chartID].chartYUnit = 'cycle'
|
||||
break
|
||||
case 8:
|
||||
_chartData[chartID].chartYUnit = '˚'
|
||||
break
|
||||
case 9:
|
||||
_chartData[chartID].chartYUnit = 'nA'
|
||||
break
|
||||
default:
|
||||
_chartData[chartID].chartYUnit = 'ohm'
|
||||
break
|
||||
}
|
||||
} else {
|
||||
switch (xValue) {
|
||||
case 1:
|
||||
_chartData[chartID].chartXUnit = 'uA' // nA * 1000
|
||||
break
|
||||
case 2:
|
||||
_chartData[chartID].chartXUnit = 'mV' // uV * 1000
|
||||
break
|
||||
case 3:
|
||||
_chartData[chartID].chartXUnit = 'Ω' // mOhm * 1000
|
||||
break
|
||||
default:
|
||||
break
|
||||
}
|
||||
switch (yValue) {
|
||||
case 1:
|
||||
_chartData[chartID].chartYUnit = 'uA'
|
||||
break
|
||||
case 2:
|
||||
_chartData[chartID].chartYUnit = 'mV'
|
||||
break
|
||||
case 3:
|
||||
_chartData[chartID].chartYUnit = 'Ω'
|
||||
break
|
||||
default:
|
||||
break
|
||||
}
|
||||
}
|
||||
} else if (taskInfo.getDeviceInfo(device.id).info.library_name.indexOf('Neulive') >= 0) {
|
||||
const channelSet = taskInfo.getDeviceInfo(device.id).parameterSet.RECORDING_CH.toString(2).split('').reverse()
|
||||
@@ -993,6 +1067,39 @@ const chartRegister = (chartID, gridIndex, deviceNameX, deviceIDX, channelX, dev
|
||||
default:
|
||||
break
|
||||
}
|
||||
} else if (sourceList[0].name === 'EliteEIS') {
|
||||
switch (sourceList[0].channel) {
|
||||
case 3:
|
||||
_chartData[chartID].xAxis[_xAxisIndex].axisLabel.formatter = function (val) {
|
||||
return val + 'mHz'
|
||||
}
|
||||
_chartData[chartID].chartXUnit = 'mHz' // nA * 1000
|
||||
break
|
||||
case 4:
|
||||
_chartData[chartID].xAxis[_xAxisIndex].axisLabel.formatter = function (val) {
|
||||
return val + 'cycle'
|
||||
}
|
||||
_chartData[chartID].chartXUnit = 'cycle' // nA * 1000
|
||||
break
|
||||
case 8:
|
||||
_chartData[chartID].xAxis[_xAxisIndex].axisLabel.formatter = function (val) {
|
||||
return val + '˚'
|
||||
}
|
||||
_chartData[chartID].chartXUnit = '˚' // nA * 1000
|
||||
break
|
||||
case 9:
|
||||
_chartData[chartID].xAxis[_xAxisIndex].axisLabel.formatter = function (val) {
|
||||
return val + 'nA'
|
||||
}
|
||||
_chartData[chartID].chartXUnit = 'nA'
|
||||
break
|
||||
default:
|
||||
_chartData[chartID].xAxis[_xAxisIndex].axisLabel.formatter = function (val) {
|
||||
return val + 'ohm'
|
||||
}
|
||||
_chartData[chartID].chartXUnit = 'ohm'
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
// set yAxis format
|
||||
@@ -1057,6 +1164,39 @@ const chartRegister = (chartID, gridIndex, deviceNameX, deviceIDX, channelX, dev
|
||||
default:
|
||||
break
|
||||
}
|
||||
} else if (sourceList[1].name === 'EliteEIS') {
|
||||
switch (sourceList[1].channel) {
|
||||
case 3:
|
||||
_chartData[chartID].yAxis[_yAxisIndex].axisLabel.formatter = function (val) {
|
||||
return val + 'mHz'
|
||||
}
|
||||
_chartData[chartID].chartYUnit = 'mHz' // nA * 1000
|
||||
break
|
||||
case 4:
|
||||
_chartData[chartID].yAxis[_yAxisIndex].axisLabel.formatter = function (val) {
|
||||
return val + 'cycle'
|
||||
}
|
||||
_chartData[chartID].chartYUnit = 'cycle' // nA * 1000
|
||||
break
|
||||
case 8:
|
||||
_chartData[chartID].yAxis[_yAxisIndex].axisLabel.formatter = function (val) {
|
||||
return val + '˚'
|
||||
}
|
||||
_chartData[chartID].chartYUnit = '˚' // nA * 1000
|
||||
break
|
||||
case 9:
|
||||
_chartData[chartID].yAxis[_yAxisIndex].axisLabel.formatter = function (val) {
|
||||
return val + 'nA'
|
||||
}
|
||||
_chartData[chartID].chartYUnit = 'nA'
|
||||
break
|
||||
default:
|
||||
_chartData[chartID].yAxis[_yAxisIndex].axisLabel.formatter = function (val) {
|
||||
return val + 'ohm'
|
||||
}
|
||||
_chartData[chartID].chartYUnit = 'ohm'
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
// register series into grid
|
||||
@@ -1093,6 +1233,46 @@ const chartRegister = (chartID, gridIndex, deviceNameX, deviceIDX, channelX, dev
|
||||
break
|
||||
}
|
||||
break
|
||||
case 'EliteEIS':
|
||||
_chartData[chartID].series[_chartData[chartID].series.length - 1].showSymbol = true
|
||||
_chartData[chartID].series[_chartData[chartID].series.length - 1].showAllSymbol = true
|
||||
dataStreamBuffer.register(chartID, taskInfo.getRawDeviceID(source.id), source.channel)
|
||||
switch (source.channel) {
|
||||
case 1:
|
||||
_axisList.push(_axis + ' AXIS = ELITE ' + source.id + ' ZIMAG_RAW')
|
||||
break
|
||||
case 2:
|
||||
_axisList.push(_axis + ' AXIS = ELITE ' + source.id + ' ZREAL_RAW')
|
||||
break
|
||||
case 3:
|
||||
_axisList.push(_axis + ' AXIS = ELITE ' + source.id + ' FREQ')
|
||||
break
|
||||
case 4:
|
||||
_axisList.push(_axis + ' AXIS = ELITE ' + source.id + ' CYCLE')
|
||||
break
|
||||
case 5:
|
||||
_axisList.push(_axis + ' AXIS = ELITE ' + source.id + ' ZIMAG')
|
||||
break
|
||||
case 6:
|
||||
_axisList.push(_axis + ' AXIS = ELITE ' + source.id + ' ZREAL')
|
||||
break
|
||||
case 7:
|
||||
_axisList.push(_axis + ' AXIS = ELITE ' + source.id + ' IMPEDANCE')
|
||||
break
|
||||
case 8:
|
||||
_axisList.push(_axis + ' AXIS = ELITE ' + source.id + ' PHASE')
|
||||
break
|
||||
case 9:
|
||||
_axisList.push(_axis + ' AXIS = ELITE ' + source.id + ' CURRENT')
|
||||
break
|
||||
case 10:
|
||||
_axisList.push(_axis + ' AXIS = ELITE ' + source.id + ' LEVEL_GAIN')
|
||||
break
|
||||
default:
|
||||
_axisList.push(_axis + ' AXIS = ELITE ' + source.id + ' CHANNEL ' + source.channel)
|
||||
break
|
||||
}
|
||||
break
|
||||
default:
|
||||
dataStreamBuffer.register(chartID, taskInfo.getRawDeviceID(source.id), source.channel)
|
||||
_axisList.push(_axis + ' AXIS = DEVICE ' + source.id + ' CHANNEL ' + source.channel)
|
||||
@@ -1115,7 +1295,15 @@ const chartRegister = (chartID, gridIndex, deviceNameX, deviceIDX, channelX, dev
|
||||
if (_chartData[chartID].gridSource[gridIndex] == null) {
|
||||
_chartData[chartID].gridSource[gridIndex] = []
|
||||
}
|
||||
_chartData[chartID].gridSource[gridIndex].push(_gridSeries)
|
||||
let repeat = false
|
||||
_chartData[chartID].gridSource[gridIndex].forEach(s => {
|
||||
if (s.name === _gridSeries.name) {
|
||||
repeat = true
|
||||
}
|
||||
})
|
||||
if (!repeat) {
|
||||
_chartData[chartID].gridSource[gridIndex].push(_gridSeries)
|
||||
}
|
||||
|
||||
// console.log(_chartData[chartID])
|
||||
return _chartData[chartID]
|
||||
|
||||
@@ -5,7 +5,7 @@ function newSeries (type, legendName, xAxisIndex, yAxisIndex, xAxisSource, yAxis
|
||||
// symbol: 'circle',
|
||||
showSymbol: false,
|
||||
showAllSymbol: false,
|
||||
symbolSize: 2,
|
||||
symbolSize: 4,
|
||||
// [modified 2021/08/10] sampling method managed by vuex
|
||||
// sampling: 'average',
|
||||
// sampling: function (frame) {
|
||||
|
||||
Reference in New Issue
Block a user