diff --git a/src/api/simulation.js b/src/api/simulation.js index 1ec95ce0a..5f334e718 100644 --- a/src/api/simulation.js +++ b/src/api/simulation.js @@ -420,10 +420,11 @@ export function getSimulationInfo(group) { } /** 获取可用的设备指令*/ -export function getAvailableDeviceCommand() { +export function getAvailableDeviceCommand(params) { return request({ url: `/api/simulation/deviceCommand/available`, - method: 'get' + method: 'get', + params }); } diff --git a/src/store/modules/scriptRecord.js b/src/store/modules/scriptRecord.js index 3f27a3f44..f15778b3e 100644 --- a/src/store/modules/scriptRecord.js +++ b/src/store/modules/scriptRecord.js @@ -6,6 +6,8 @@ const scriptRecord = { state: { mapLocation: {}, //地图定位, simulationPause: true , + scriptId:"", + }, getters: { mapLocation: (state)=>{ @@ -14,6 +16,9 @@ const scriptRecord = { simulationPause:(state)=>{ return state.simulationPause; }, + scriptId: (state)=>{ + return state.scriptId; + }, }, mutations: { setMapLocation: (state, mapLocation) => { @@ -22,6 +27,9 @@ const scriptRecord = { setSimulationPause: (state, simulationPause) => { state.simulationPause = simulationPause; }, + setscriptId: (state, scriptId) => { + state.scriptId = scriptId; + }, }, actions: { /** @@ -33,6 +41,9 @@ const scriptRecord = { updateSimulationPause: ({ commit }, simulationPause) => { commit('setSimulationPause', simulationPause); }, + updateScriptId: ({ commit }, scriptId) => { + commit('setscriptId', scriptId); + }, } }; export default scriptRecord; \ No newline at end of file diff --git a/src/views/scriptManage/category/tree.vue b/src/views/scriptManage/category/tree.vue index c61109954..5e1d51463 100644 --- a/src/views/scriptManage/category/tree.vue +++ b/src/views/scriptManage/category/tree.vue @@ -82,6 +82,7 @@ export default { // debugger; // this.$store localStore.set("script_mapId", id); + this.$store.dispatch('scriptRecord/updateScriptId',id); this.getQuestPageList(id); }, async getQuestPageList(id){ diff --git a/src/views/scriptManage/home.vue b/src/views/scriptManage/home.vue index fb8e431d8..c8f86e746 100644 --- a/src/views/scriptManage/home.vue +++ b/src/views/scriptManage/home.vue @@ -18,6 +18,7 @@