按照标准框架修改角色界面
This commit is contained in:
60
frontend/src/views/authority/role/components/roleUnit.vue
Normal file
60
frontend/src/views/authority/role/components/roleUnit.vue
Normal file
@@ -0,0 +1,60 @@
|
||||
<template>
|
||||
<!-- 基础信息弹出框 -->
|
||||
<el-dialog :model-value="dialogVisible" :title="title" @close="handleCancel" width="800" draggable>
|
||||
<div>
|
||||
<el-form :model="data">
|
||||
<el-form-item label="角色类型名称" :label-width="100">
|
||||
<el-input v-model="data.rolename" placeholder="请输入类型名称" autocomplete="off" />
|
||||
</el-form-item>
|
||||
<el-form-item label="角色类型编码" :label-width="100">
|
||||
<el-input v-model="data.id" placeholder="请输入角色类型编码" autocomplete="off" />
|
||||
</el-form-item>
|
||||
<el-form-item label="角色类型状态" :label-width="100">
|
||||
<el-switch
|
||||
v-model=value
|
||||
inline-prompt
|
||||
style="--el-switch-on-color: #13ce66; --el-switch-off-color: #ff4949"
|
||||
active-text="启用"
|
||||
inactive-text="禁用"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="角色类型备注" :label-width="100">
|
||||
<el-input v-model="data.describe" placeholder="请输入备注" autocomplete="off" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
<el-button @click="handleCancel">取消</el-button>
|
||||
<el-button type="primary" @click="handleCancel">
|
||||
保存
|
||||
</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-dialog>
|
||||
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { ref } from 'vue'
|
||||
|
||||
const value = ref(true)
|
||||
const {dialogVisible,title,data} = defineProps<{
|
||||
dialogVisible:boolean;
|
||||
title:string;
|
||||
data:{
|
||||
rolename:string;
|
||||
id:string;
|
||||
status:number;
|
||||
describe:string;
|
||||
}
|
||||
}>();
|
||||
const emit = defineEmits<{
|
||||
(e:'update:visible',value:boolean):void;
|
||||
}>();
|
||||
|
||||
const handleCancel = () => {
|
||||
emit('update:visible',false)
|
||||
}
|
||||
|
||||
</script>
|
||||
Reference in New Issue
Block a user