Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 0fda2141dd |
@@ -189,6 +189,7 @@ export default {
|
||||
battery: device.battery,
|
||||
library_name: device.library_name,
|
||||
library_version: device.library_version,
|
||||
record_in_sd: device.record_in_sd,
|
||||
status: device.status,
|
||||
pic: taskInfo.getDevicePic(device.device_name),
|
||||
loading: false,
|
||||
|
||||
@@ -39,6 +39,15 @@
|
||||
|
||||
</va-item-section>
|
||||
|
||||
<va-item-section class="ml-1" v-if="device.type == 'Neulive'">
|
||||
<va-icon
|
||||
name="material-icons"
|
||||
:color="(device.record_in_sd === true) ? 'primary' : 'grey'"
|
||||
@click.native.stop="recordInSd(device)"
|
||||
> sd_card
|
||||
</va-icon>
|
||||
</va-item-section>
|
||||
|
||||
</va-item>
|
||||
|
||||
<va-item class="pa-0 ma-0 mt-2">
|
||||
@@ -108,6 +117,13 @@ export default {
|
||||
computed: {
|
||||
},
|
||||
methods: {
|
||||
recordInSd: function (device) {
|
||||
device.record_in_sd = !device.record_in_sd
|
||||
this.$emit('record_in_sd', {
|
||||
id: device.id,
|
||||
recordInSd: device.record_in_sd,
|
||||
})
|
||||
},
|
||||
removeCheck: function (device) {
|
||||
this.selectDevice = device
|
||||
this.showDeleteModal = true
|
||||
|
||||
@@ -22,10 +22,12 @@
|
||||
@stop="stopDevice($event)"
|
||||
@record="record($event)"
|
||||
@stopRecord="stopRecord($event)"
|
||||
@sti="sti($event)" @sti_stop="stiStop($event)"
|
||||
@sti="sti($event)"
|
||||
@sti_stop="stiStop($event)"
|
||||
@fast_settle="fastSettle($event)"
|
||||
@generate="generateChart($event)"
|
||||
@detect="detectDevice($event)"
|
||||
@record_in_sd="recordInSd($event)"
|
||||
/>
|
||||
|
||||
<!-- <div class="row flex xs12 md12 xl12 sm12 mt-2" style="text-align: center;">
|
||||
@@ -296,37 +298,13 @@ export default {
|
||||
instruction: 'FAST_SET',
|
||||
}))
|
||||
},
|
||||
// addDevice: async function () {
|
||||
// if (this.deviceSelect.id == null) {
|
||||
// return false
|
||||
// }
|
||||
// await taskInfo.getTaskInfo().deviceAddrList.push(taskInfo.getDeviceInfoByRawID(this.deviceSelect.id).info.device_address)
|
||||
// await taskInfo.getTaskInfo().taskDeviceID.push(this.deviceSelect.id)
|
||||
// const _address = this.GLOBAL.transMac(taskInfo.getDeviceInfoByRawID(this.deviceSelect.id).info.device_address)
|
||||
|
||||
// const pic = taskInfo.getDevicePic(taskInfo.getDeviceInfoByRawID(this.deviceSelect.id).info.library_name)
|
||||
// let type = ''
|
||||
// if (taskInfo.getDeviceInfoByRawID(this.deviceSelect.id).info.library_name.indexOf('Elite') >= 0) {
|
||||
// type = 'Elite'
|
||||
// } else if (taskInfo.getDeviceInfoByRawID(this.deviceSelect.id).info.library_name.indexOf('Neulive') >= 0) {
|
||||
// type = 'Neulive'
|
||||
// }
|
||||
|
||||
// const _device = {
|
||||
// id: taskInfo.getTaskInfo().taskDeviceID.indexOf(this.deviceSelect.id),
|
||||
// name: '[' + taskInfo.getTaskInfo().taskDeviceID.indexOf(this.deviceSelect.id) + '] ' + taskInfo.getDeviceInfoByRawID(this.deviceSelect.id).info.device_name,
|
||||
// addr: taskInfo.getDeviceInfoByRawID(this.deviceSelect.id).info.device_address,
|
||||
// address: _address,
|
||||
// picture: pic,
|
||||
// type: type,
|
||||
// isSync: taskInfo.getDeviceInfoByRawID(this.deviceSelect.id).info.isSync,
|
||||
// stopping: false,
|
||||
// }
|
||||
// this.deviceList.push(_device)
|
||||
// this.deviceSelect = ''
|
||||
// taskInfo.updateAllList()
|
||||
// this.$emit('add', _device.id)
|
||||
// },
|
||||
recordInSd: function (device) {
|
||||
this.mqttPub(taskInfo.getTaskInfo().controllerID + '_user', JSON.stringify({
|
||||
header: 'device_record_in_sd/0',
|
||||
device: taskInfo.getRawDeviceID(device.id),
|
||||
content: device.recordInSd,
|
||||
}))
|
||||
},
|
||||
addDevice: async function (selectID) {
|
||||
if (selectID == null) {
|
||||
return false
|
||||
@@ -357,6 +335,7 @@ export default {
|
||||
address: _address,
|
||||
library_name: taskInfo.getDeviceInfoByRawID(selectID).info.library_name,
|
||||
library_version: taskInfo.getDeviceInfoByRawID(selectID).info.library_version,
|
||||
record_in_sd: taskInfo.getDeviceInfoByRawID(selectID).info.record_in_sd,
|
||||
picture: pic,
|
||||
type: type,
|
||||
isSync: taskInfo.getDeviceInfoByRawID(selectID).info.isSync,
|
||||
|
||||
Reference in New Issue
Block a user