| | |
| | | |
| | | <script setup> |
| | | import { createRoleSearchState, getRoleStatusOptions } from '../rolePage.helpers' |
| | | import { useI18n } from 'vue-i18n' |
| | | |
| | | const props = defineProps({ |
| | | modelValue: { required: true } |
| | |
| | | |
| | | const emit = defineEmits(['update:modelValue', 'search', 'reset']) |
| | | const searchBarRef = ref() |
| | | const { t } = useI18n() |
| | | |
| | | const formData = computed({ |
| | | get: () => props.modelValue, |
| | |
| | | } |
| | | |
| | | const formItems = computed(() => [ |
| | | createInputSearchItem('角色名称', 'name', '请输入角色名称'), |
| | | createInputSearchItem('角色编码', 'code', '请输入角色编码'), |
| | | createInputSearchItem('备注', 'memo', '请输入备注'), |
| | | createInputSearchItem('关键字', 'condition', '输入关键字搜索'), |
| | | createSelectSearchItem('状态', 'status', '请选择状态', getRoleStatusOptions()) |
| | | createInputSearchItem( |
| | | t('pages.system.role.search.name'), |
| | | 'name', |
| | | t('pages.system.role.search.namePlaceholder') |
| | | ), |
| | | createInputSearchItem( |
| | | t('pages.system.role.search.code'), |
| | | 'code', |
| | | t('pages.system.role.search.codePlaceholder') |
| | | ), |
| | | createInputSearchItem( |
| | | t('pages.system.role.search.memo'), |
| | | 'memo', |
| | | t('pages.system.role.search.memoPlaceholder') |
| | | ), |
| | | createInputSearchItem( |
| | | t('pages.system.role.search.condition'), |
| | | 'condition', |
| | | t('pages.system.role.search.conditionPlaceholder') |
| | | ), |
| | | createSelectSearchItem( |
| | | t('pages.system.role.search.status'), |
| | | 'status', |
| | | t('pages.system.role.search.statusPlaceholder'), |
| | | getRoleStatusOptions() |
| | | ) |
| | | ]) |
| | | |
| | | function handleReset() { |