diff --git a/src/store/modules/permission/dept/dept.js b/src/store/modules/permission/dept/dept.js index d1dcc33..1f9604f 100644 --- a/src/store/modules/permission/dept/dept.js +++ b/src/store/modules/permission/dept/dept.js @@ -32,8 +32,8 @@ const mutations = { setOpts: (state, data) => (state.opts = data), }; const actions = { - search: async ({ state, commit }) => { - let res = await api.search(state.condition); + search: async ({ state, commit }, condition) => { + let res = await api.search(condition || state.condition); commit('setList', res || []); if (!res) { ElMessage.error('查询失败'); diff --git a/src/views/permission/dept/index.vue b/src/views/permission/dept/index.vue index 88e82f3..709d0fe 100644 --- a/src/views/permission/dept/index.vue +++ b/src/views/permission/dept/index.vue @@ -111,52 +111,7 @@ - - - - - - - - - - - - - - +