2026-07-28 16:26:07 +08:00
|
|
|
import { defineStore } from 'pinia'
|
|
|
|
|
|
|
|
|
|
export const useFlowStore = defineStore('flow', {
|
|
|
|
|
state: () => ({
|
|
|
|
|
disableForm: false,
|
|
|
|
|
deviceList: []
|
|
|
|
|
}),
|
|
|
|
|
actions: {
|
|
|
|
|
updateDisableForm(value) {
|
|
|
|
|
this.disableForm = value
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
async getDeviceList() {
|
|
|
|
|
const data = await new Promise((resolve, reject) => {
|
|
|
|
|
resolve( ['cam1', 'cam2', 'cam3', 'cam4'])
|
|
|
|
|
})
|
|
|
|
|
this.deviceList = data
|
|
|
|
|
return data
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
)
|