- fix EIS channel select wrong

This commit is contained in:
peterlu14
2023-04-28 10:26:48 +08:00
parent 556fd0697f
commit a1e1dd0c72
2 changed files with 8 additions and 3 deletions
@@ -31,7 +31,9 @@
watch(
xOption,
() => {
channelStore.xAxisSelected = xOption.value[1]
if (Object.keys(channelStore.xAxisSelected).length === 0) {
channelStore.xAxisSelected = xOption.value[1]
}
},
{
deep: true,
@@ -41,7 +43,9 @@
watch(
yOption,
() => {
channelStore.yAxisSelected = yOption.value[2]
if (Object.keys(channelStore.yAxisSelected).length === 0) {
channelStore.yAxisSelected = yOption.value[2]
}
},
{
deep: true,
@@ -120,9 +120,10 @@
fileViewStore.selectedFiles[0].device.library_name,
fileViewStore.selectedFiles[0].parameter.MODE,
)
const channelKey = Object.keys(config.channels)
const channel = Object.values(config.channels)
const channelOptions = channel.map((v: any, idx) => {
v.id = idx
v.id = channelKey[idx]
if (v.name === 'Time') {
v.id = 'Time'
}