大屏页面初始化

This commit is contained in:
2026-03-05 19:04:12 +08:00
parent cf65afb47f
commit 856b54e83b
17 changed files with 264 additions and 5 deletions

View File

@@ -72,7 +72,7 @@ const handleLogin = async () => {
ElMessage.success('登录成功!');
setTimeout(() => {
router.push('/dashboard');
}, 3000);
}, 300);
} catch (error) {
console.log(error);
}finally{

View File

@@ -72,9 +72,12 @@
placeholder="请选择用户角色"
clearable
>
<el-option label="管理员" value="0" />
<el-option label="普通用户" value="1" />
<el-option label="访客" value="2" />
<el-option
v-for="item in roleData"
:key="item.roleId"
:label="item.roleName"
:value="item.roleId"
/>
</el-select>
</el-form-item>
</div>
@@ -112,7 +115,19 @@
</template>
<script setup>
import { ref } from 'vue'
import { ref, onMounted } from 'vue'
import { getHomeRoleList } from '@/api/bizRole'
const roleData = ref([]);
const getListRole = async () => {
try {
const res = await getHomeRoleList();
roleData.value = res || []
} catch (error) {
console.log(error);
}
}
const props = defineProps({
formData: {
@@ -162,6 +177,10 @@ const resetForm = () => {
}
defineExpose({ validate, resetForm })
onMounted(() => {
getListRole();
})
</script>
<style scoped>