修改
This commit is contained in:
parent
676a9411a6
commit
86bb338bd6
67
src/api/data/param.ts
Normal file
67
src/api/data/param.ts
Normal file
@ -0,0 +1,67 @@
|
|||||||
|
import { http } from '@/utils/http/axios';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description: 参数列表
|
||||||
|
*/
|
||||||
|
export function getParamList(params?) {
|
||||||
|
return http.request({
|
||||||
|
url: '/param/page',
|
||||||
|
method: 'GET',
|
||||||
|
params,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
export function getParamAllList(params?) {
|
||||||
|
return http.request({
|
||||||
|
url: '/param/list',
|
||||||
|
method: 'GET',
|
||||||
|
params,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* @description: 根据ID获取详情
|
||||||
|
*/
|
||||||
|
export function getParamDetail(paramId) {
|
||||||
|
return http.request({
|
||||||
|
url: '/param/detail/'+paramId,
|
||||||
|
method: 'get',
|
||||||
|
});
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* @description: 添加参数
|
||||||
|
*/
|
||||||
|
export function paramAdd(data:any) {
|
||||||
|
return http.request({
|
||||||
|
url: '/param/add',
|
||||||
|
method: 'POST',
|
||||||
|
data,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* @description: 更新参数
|
||||||
|
*/
|
||||||
|
export function paramUpdate(data:any) {
|
||||||
|
return http.request({
|
||||||
|
url: '/param/update',
|
||||||
|
method: 'PUT',
|
||||||
|
data
|
||||||
|
});
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* @description: 删除参数
|
||||||
|
*/
|
||||||
|
export function paramDelete(paramId) {
|
||||||
|
return http.request({
|
||||||
|
url: '/param/delete/'+paramId,
|
||||||
|
method: 'DELETE',
|
||||||
|
});
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* @description: 批量删除参数
|
||||||
|
*/
|
||||||
|
export function paramBatchDelete(data:any) {
|
||||||
|
return http.request({
|
||||||
|
url: '/param/batchDelete',
|
||||||
|
method: 'DELETE',
|
||||||
|
data
|
||||||
|
});
|
||||||
|
}
|
@ -118,7 +118,7 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<!--提交 重置 展开 收起 按钮-->
|
<!--提交 重置 展开 收起 按钮-->
|
||||||
<el-col :span="8" v-if="getProps.showActionButtonGroup">
|
<el-col :span="6" v-if="getProps.showActionButtonGroup">
|
||||||
<el-form-item :label-width="isHorizontal ? '20px' : getProps.labelWidth">
|
<el-form-item :label-width="isHorizontal ? '20px' : getProps.labelWidth">
|
||||||
<el-space>
|
<el-space>
|
||||||
<el-button
|
<el-button
|
||||||
|
@ -2,7 +2,6 @@
|
|||||||
<el-dialog
|
<el-dialog
|
||||||
v-model="props.visible"
|
v-model="props.visible"
|
||||||
:title="props.dictId?'编辑':'新增'"
|
:title="props.dictId?'编辑':'新增'"
|
||||||
:append-to-body="true"
|
|
||||||
width="500"
|
width="500"
|
||||||
:close-on-click-modal="false"
|
:close-on-click-modal="false"
|
||||||
:before-close="dialogClose"
|
:before-close="dialogClose"
|
||||||
|
@ -2,7 +2,6 @@
|
|||||||
<el-dialog
|
<el-dialog
|
||||||
v-model="props.visible"
|
v-model="props.visible"
|
||||||
:title="props.dictItemId?'编辑字典项':'新增字典项'"
|
:title="props.dictItemId?'编辑字典项':'新增字典项'"
|
||||||
:append-to-body="true"
|
|
||||||
width="500"
|
width="500"
|
||||||
:close-on-click-modal="false"
|
:close-on-click-modal="false"
|
||||||
:before-close="dialogClose"
|
:before-close="dialogClose"
|
||||||
@ -11,29 +10,29 @@
|
|||||||
class="ls-form"
|
class="ls-form"
|
||||||
ref="formRef"
|
ref="formRef"
|
||||||
:model="formData"
|
:model="formData"
|
||||||
label-width="80px"
|
label-width="100px"
|
||||||
>
|
>
|
||||||
<el-form-item
|
<el-form-item
|
||||||
label="名称"
|
label="字典项名称"
|
||||||
prop="name"
|
prop="name"
|
||||||
:rules="{ required: true, message: '请输入名称', trigger: 'blur' }"
|
:rules="{ required: true, message: '请输入字典项名称', trigger: 'blur' }"
|
||||||
>
|
>
|
||||||
<el-input
|
<el-input
|
||||||
class="ls-input"
|
class="ls-input"
|
||||||
v-model="formData.name"
|
v-model="formData.name"
|
||||||
placeholder="请输入名称"
|
placeholder="请输入字典项名称"
|
||||||
clearable
|
clearable
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item
|
<el-form-item
|
||||||
label="值"
|
label="字典项值"
|
||||||
prop="value"
|
prop="value"
|
||||||
:rules="{ required: true, message: '请输入名称', trigger: 'blur' }"
|
:rules="{ required: true, message: '请输入字典项值', trigger: 'blur' }"
|
||||||
>
|
>
|
||||||
<el-input
|
<el-input
|
||||||
class="ls-input"
|
class="ls-input"
|
||||||
v-model="formData.value"
|
v-model="formData.value"
|
||||||
placeholder="请输入名称"
|
placeholder="请输入字典项值"
|
||||||
clearable
|
clearable
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
39
src/views/data/param/columns.ts
Normal file
39
src/views/data/param/columns.ts
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
import { h } from 'vue';
|
||||||
|
import { ElTag } from 'element-plus';
|
||||||
|
|
||||||
|
export const columns = [
|
||||||
|
{
|
||||||
|
type: 'selection',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '职级名称',
|
||||||
|
prop: 'name',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '职级状态',
|
||||||
|
prop: 'status',
|
||||||
|
render(record) {
|
||||||
|
return h(
|
||||||
|
ElTag,
|
||||||
|
{
|
||||||
|
type: record.row.status ==1 ? 'success' : 'danger',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
default: () => (record.row.status ==1 ? '正常' : '禁用'),
|
||||||
|
},
|
||||||
|
);
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '排序',
|
||||||
|
prop: 'sort',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '创建人',
|
||||||
|
prop: 'createUser',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '创建时间',
|
||||||
|
prop: 'createTime',
|
||||||
|
},
|
||||||
|
];
|
125
src/views/data/param/edit.vue
Normal file
125
src/views/data/param/edit.vue
Normal file
@ -0,0 +1,125 @@
|
|||||||
|
<template>
|
||||||
|
<el-dialog
|
||||||
|
v-model="props.visible"
|
||||||
|
:title="props.paramId?'编辑':'新增'"
|
||||||
|
width="500"
|
||||||
|
:close-on-click-modal="false"
|
||||||
|
:before-close="dialogClose"
|
||||||
|
>
|
||||||
|
<el-form
|
||||||
|
class="ls-form"
|
||||||
|
ref="formRef"
|
||||||
|
:model="formData"
|
||||||
|
label-width="80px"
|
||||||
|
>
|
||||||
|
<el-form-item
|
||||||
|
label="参数名称"
|
||||||
|
prop="name"
|
||||||
|
:rules="{ required: true, message: '请输入参数名称', trigger: 'blur' }"
|
||||||
|
>
|
||||||
|
<el-input
|
||||||
|
class="ls-input"
|
||||||
|
v-model="formData.name"
|
||||||
|
placeholder="请输入名称"
|
||||||
|
clearable
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item
|
||||||
|
label="参数编码"
|
||||||
|
prop="code"
|
||||||
|
:rules="{ required: true, message: '请输入参数编码', trigger: 'blur' }"
|
||||||
|
>
|
||||||
|
<el-input
|
||||||
|
class="ls-input"
|
||||||
|
v-model="formData.code"
|
||||||
|
placeholder="请输入参数编码"
|
||||||
|
clearable
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="参数状态" prop="status">
|
||||||
|
<el-radio-group v-model="formData.status" name="status">
|
||||||
|
<el-radio :value="1">正常</el-radio>
|
||||||
|
<el-radio :value="2">禁用</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="排序" prop="sort">
|
||||||
|
<el-input-number v-model="formData.sort"/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="备注" prop="note">
|
||||||
|
<el-input v-model="formData.note" type="textarea" placeholder="请输入备注" clearable />
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<template #footer>
|
||||||
|
<span class="dialog-footer">
|
||||||
|
<el-button @click="dialogClose">取消</el-button>
|
||||||
|
<el-button :loading="subLoading" type="primary" @click="submit">
|
||||||
|
确定
|
||||||
|
</el-button>
|
||||||
|
</span>
|
||||||
|
</template>
|
||||||
|
</el-dialog>
|
||||||
|
</template>
|
||||||
|
<script lang="ts" setup>
|
||||||
|
import type {FormInstance} from "element-plus";
|
||||||
|
import {getParamDetail,paramAdd,paramUpdate} from "@/api/data/param";
|
||||||
|
import {onMounted, reactive, shallowRef} from "vue";
|
||||||
|
import {message} from "@/utils/auth";
|
||||||
|
import {useLockFn} from "@/utils/useLockFn";
|
||||||
|
|
||||||
|
const emit = defineEmits(["success", "update:visible"]);
|
||||||
|
const formRef = shallowRef<FormInstance>();
|
||||||
|
const formData = reactive({
|
||||||
|
id: "",
|
||||||
|
name: "",
|
||||||
|
code:'',
|
||||||
|
type:'',
|
||||||
|
status: 1,
|
||||||
|
sort: 0,
|
||||||
|
note:'',
|
||||||
|
});
|
||||||
|
|
||||||
|
const props = defineProps({
|
||||||
|
visible: {
|
||||||
|
type: Boolean,
|
||||||
|
required: true,
|
||||||
|
default: false
|
||||||
|
},
|
||||||
|
paramId: {
|
||||||
|
type: Number,
|
||||||
|
required: true,
|
||||||
|
default: 0
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
const handleSubmit = async () => {
|
||||||
|
await formRef.value?.validate();
|
||||||
|
props.paramId ? await paramUpdate(formData) : await paramAdd(formData);
|
||||||
|
message("操作成功");
|
||||||
|
emit("update:visible", false);
|
||||||
|
emit("success");
|
||||||
|
};
|
||||||
|
|
||||||
|
const dialogClose = () => {
|
||||||
|
emit("update:visible", false);
|
||||||
|
};
|
||||||
|
|
||||||
|
const { isLock:subLoading,lockFn: submit } = useLockFn(handleSubmit);
|
||||||
|
|
||||||
|
|
||||||
|
const setFormData = async () => {
|
||||||
|
const data = await getParamDetail(props.paramId);
|
||||||
|
for (const key in formData) {
|
||||||
|
if (data[key] != null && data[key] != undefined) {
|
||||||
|
//@ts-ignore
|
||||||
|
formData[key] = data[key];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
onMounted(() => {
|
||||||
|
if (props.paramId) {
|
||||||
|
setFormData();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
</script>
|
162
src/views/data/param/index.vue
Normal file
162
src/views/data/param/index.vue
Normal file
@ -0,0 +1,162 @@
|
|||||||
|
<template>
|
||||||
|
<PageWrapper>
|
||||||
|
<el-card :bordered="false" class="pt-3 mb-3 proCard">
|
||||||
|
<BasicForm @register="register" @submit="handleSubmit" @reset="handleReset"></BasicForm>
|
||||||
|
</el-card>
|
||||||
|
<el-card :bordered="false" class="proCard">
|
||||||
|
<BasicTable
|
||||||
|
:columns="columns"
|
||||||
|
:request="loadDataTable"
|
||||||
|
:row-key="(row) => row.id"
|
||||||
|
ref="tableRef"
|
||||||
|
:actionColumn="actionColumn"
|
||||||
|
@selection-change="onSelectionChange"
|
||||||
|
>
|
||||||
|
<template #tableTitle>
|
||||||
|
<el-button type="primary" @click="handleAdd">
|
||||||
|
<template #icon>
|
||||||
|
<el-icon class="el-input__icon">
|
||||||
|
<PlusOutlined />
|
||||||
|
</el-icon>
|
||||||
|
</template>
|
||||||
|
添加参数
|
||||||
|
</el-button>
|
||||||
|
<el-button type="danger" @click="handleDelete()" :disabled="!selectionData.length">
|
||||||
|
<template #icon>
|
||||||
|
<el-icon class="el-input__icon">
|
||||||
|
<Delete />
|
||||||
|
</el-icon>
|
||||||
|
</template>
|
||||||
|
删除
|
||||||
|
</el-button>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<template #action>
|
||||||
|
<TableAction />
|
||||||
|
</template>
|
||||||
|
</BasicTable>
|
||||||
|
</el-card>
|
||||||
|
|
||||||
|
<editDialog
|
||||||
|
v-if="editVisible"
|
||||||
|
:paramId="paramId"
|
||||||
|
v-model:visible="editVisible"
|
||||||
|
@success="reloadTable"
|
||||||
|
>
|
||||||
|
</editDialog>
|
||||||
|
</PageWrapper>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script lang="ts" setup>
|
||||||
|
import { reactive, ref, h,nextTick,defineAsyncComponent } from 'vue';
|
||||||
|
import { ColProps } from 'element-plus';
|
||||||
|
import { schemas } from './querySchemas';
|
||||||
|
import { BasicForm, useForm } from '@/components/Form/index';
|
||||||
|
import { BasicTable, TableAction } from '@/components/Table';
|
||||||
|
import { getParamList,paramDelete,paramBatchDelete } from '@/api/data/param';
|
||||||
|
import { columns } from './columns';
|
||||||
|
import { PlusOutlined } from '@vicons/antd';
|
||||||
|
import {message,confirm} from "@/utils/auth";
|
||||||
|
const editDialog = defineAsyncComponent(() =>
|
||||||
|
import('./edit.vue')
|
||||||
|
)
|
||||||
|
const paramId =ref(0)
|
||||||
|
const editVisible=ref(false)
|
||||||
|
const selectionData = ref([])
|
||||||
|
const tableRef = ref();
|
||||||
|
const formParams = reactive({
|
||||||
|
name:'',
|
||||||
|
status:'',
|
||||||
|
type:''
|
||||||
|
});
|
||||||
|
const actionColumn = reactive({
|
||||||
|
width: 250,
|
||||||
|
label: '操作',
|
||||||
|
prop: 'action',
|
||||||
|
fixed: 'right',
|
||||||
|
render(record) {
|
||||||
|
return h(TableAction, {
|
||||||
|
style: 'button',
|
||||||
|
actions: [
|
||||||
|
{
|
||||||
|
label: '编辑',
|
||||||
|
type: 'warning',
|
||||||
|
onClick: handleEdit.bind(null, record),
|
||||||
|
ifShow: () => {
|
||||||
|
return true;
|
||||||
|
},
|
||||||
|
// auth: ['basic_list'],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '删除',
|
||||||
|
type: 'danger',
|
||||||
|
onClick: handleDelete.bind(null, record),
|
||||||
|
// 根据业务控制是否显示 isShow 和 auth 是并且关系
|
||||||
|
ifShow: () => {
|
||||||
|
return true;
|
||||||
|
},
|
||||||
|
// 根据权限控制是否显示: 有权限,会显示,支持多个
|
||||||
|
// auth: ['basic_list'],
|
||||||
|
},
|
||||||
|
],
|
||||||
|
});
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
const loadDataTable = async (res: any) => {
|
||||||
|
const result = await getParamList({ ...formParams, ...res });
|
||||||
|
return result;
|
||||||
|
};
|
||||||
|
|
||||||
|
function reloadTable() {
|
||||||
|
tableRef.value.reload({pageNo:1});
|
||||||
|
}
|
||||||
|
const [register, {}] = useForm({
|
||||||
|
labelWidth: 80,
|
||||||
|
layout: 'horizontal',
|
||||||
|
colProps: { span: 6 } as ColProps,
|
||||||
|
submitOnReset:true,
|
||||||
|
schemas
|
||||||
|
});
|
||||||
|
function handleSubmit(values: Recordable) {
|
||||||
|
for (const key in formParams) {
|
||||||
|
if (values[key] != null && values[key] != undefined) {
|
||||||
|
formParams[key] = values[key];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
reloadTable();
|
||||||
|
}
|
||||||
|
|
||||||
|
function handleReset() {
|
||||||
|
for (const key in formParams) {
|
||||||
|
formParams[key] ='';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
const handleAdd = async () => {
|
||||||
|
paramId.value=0
|
||||||
|
await nextTick();
|
||||||
|
editVisible.value=true
|
||||||
|
};
|
||||||
|
|
||||||
|
const handleEdit = async (record: Recordable) => {
|
||||||
|
paramId.value=record.row.id
|
||||||
|
await nextTick();
|
||||||
|
editVisible.value=true
|
||||||
|
};
|
||||||
|
|
||||||
|
async function handleDelete(record: Recordable) {
|
||||||
|
let ids = []
|
||||||
|
if(!record){
|
||||||
|
ids = selectionData.value.map(({id}) => id);
|
||||||
|
}
|
||||||
|
await confirm('确定要删除?');
|
||||||
|
record? await paramDelete(record.row.id):await paramBatchDelete(ids);
|
||||||
|
message("删除成功");
|
||||||
|
reloadTable()
|
||||||
|
}
|
||||||
|
function onSelectionChange(value){
|
||||||
|
selectionData.value = value
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped></style>
|
47
src/views/data/param/querySchemas.ts
Normal file
47
src/views/data/param/querySchemas.ts
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
import { FormSchema } from '@/components/Form/index';
|
||||||
|
export const schemas: FormSchema[] = [
|
||||||
|
{
|
||||||
|
field: 'name',
|
||||||
|
component: 'Input',
|
||||||
|
label: '参数名称',
|
||||||
|
componentProps: {
|
||||||
|
placeholder: '请输入参数名称',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'type',
|
||||||
|
component: 'Select',
|
||||||
|
label: '参数类型',
|
||||||
|
componentProps: {
|
||||||
|
placeholder: '请选择参数类型',
|
||||||
|
options: [
|
||||||
|
{
|
||||||
|
label: '正常',
|
||||||
|
value: '1',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '禁用',
|
||||||
|
value: '2',
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'status',
|
||||||
|
component: 'Select',
|
||||||
|
label: '参数状态',
|
||||||
|
componentProps: {
|
||||||
|
placeholder: '请选择状态',
|
||||||
|
options: [
|
||||||
|
{
|
||||||
|
label: '正常',
|
||||||
|
value: '1',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '禁用',
|
||||||
|
value: '2',
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
];
|
@ -2,7 +2,6 @@
|
|||||||
<el-dialog
|
<el-dialog
|
||||||
v-model="props.visible"
|
v-model="props.visible"
|
||||||
:title="props.levelId?'编辑':'新增'"
|
:title="props.levelId?'编辑':'新增'"
|
||||||
:append-to-body="true"
|
|
||||||
width="500"
|
width="500"
|
||||||
:close-on-click-modal="false"
|
:close-on-click-modal="false"
|
||||||
:before-close="dialogClose"
|
:before-close="dialogClose"
|
||||||
@ -14,14 +13,14 @@
|
|||||||
label-width="80px"
|
label-width="80px"
|
||||||
>
|
>
|
||||||
<el-form-item
|
<el-form-item
|
||||||
label="名称"
|
label="职级名称"
|
||||||
prop="name"
|
prop="name"
|
||||||
:rules="{ required: true, message: '请输入名称', trigger: 'blur' }"
|
:rules="{ required: true, message: '请输入职级名称', trigger: 'blur' }"
|
||||||
>
|
>
|
||||||
<el-input
|
<el-input
|
||||||
class="ls-input"
|
class="ls-input"
|
||||||
v-model="formData.name"
|
v-model="formData.name"
|
||||||
placeholder="请输入名称"
|
placeholder="请输入职级名称"
|
||||||
clearable
|
clearable
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
<el-dialog
|
<el-dialog
|
||||||
v-model="props.visible"
|
v-model="props.visible"
|
||||||
:title="props.positionId?'编辑':'新增'"
|
:title="props.positionId?'编辑':'新增'"
|
||||||
:append-to-body="true"
|
|
||||||
width="500"
|
width="500"
|
||||||
:close-on-click-modal="false"
|
:close-on-click-modal="false"
|
||||||
:before-close="dialogClose"
|
:before-close="dialogClose"
|
||||||
|
@ -2,7 +2,6 @@
|
|||||||
<el-dialog
|
<el-dialog
|
||||||
v-model="props.visible"
|
v-model="props.visible"
|
||||||
:title="props.positionId?'编辑':'新增'"
|
:title="props.positionId?'编辑':'新增'"
|
||||||
:append-to-body="true"
|
|
||||||
width="500"
|
width="500"
|
||||||
:close-on-click-modal="false"
|
:close-on-click-modal="false"
|
||||||
:before-close="dialogClose"
|
:before-close="dialogClose"
|
||||||
|
@ -2,7 +2,6 @@
|
|||||||
<el-dialog
|
<el-dialog
|
||||||
v-model="props.visible"
|
v-model="props.visible"
|
||||||
:title="props.positionId?'编辑':'新增'"
|
:title="props.positionId?'编辑':'新增'"
|
||||||
:append-to-body="true"
|
|
||||||
width="500"
|
width="500"
|
||||||
:close-on-click-modal="false"
|
:close-on-click-modal="false"
|
||||||
:before-close="dialogClose"
|
:before-close="dialogClose"
|
||||||
@ -14,14 +13,14 @@
|
|||||||
label-width="80px"
|
label-width="80px"
|
||||||
>
|
>
|
||||||
<el-form-item
|
<el-form-item
|
||||||
label="名称"
|
label="岗位名称"
|
||||||
prop="name"
|
prop="name"
|
||||||
:rules="{ required: true, message: '请输入名称', trigger: 'blur' }"
|
:rules="{ required: true, message: '请输入岗位名称', trigger: 'blur' }"
|
||||||
>
|
>
|
||||||
<el-input
|
<el-input
|
||||||
class="ls-input"
|
class="ls-input"
|
||||||
v-model="formData.name"
|
v-model="formData.name"
|
||||||
placeholder="请输入名称"
|
placeholder="请输入岗位名称"
|
||||||
clearable
|
clearable
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
@ -2,7 +2,6 @@
|
|||||||
<el-dialog
|
<el-dialog
|
||||||
v-model="props.visible"
|
v-model="props.visible"
|
||||||
title="权限设置"
|
title="权限设置"
|
||||||
:append-to-body="true"
|
|
||||||
width="500"
|
width="500"
|
||||||
:close-on-click-modal="false"
|
:close-on-click-modal="false"
|
||||||
modal-class="roleMenuDialog"
|
modal-class="roleMenuDialog"
|
||||||
|
@ -2,7 +2,6 @@
|
|||||||
<el-dialog
|
<el-dialog
|
||||||
v-model="props.visible"
|
v-model="props.visible"
|
||||||
:title="props.roleId?'编辑':'新增'"
|
:title="props.roleId?'编辑':'新增'"
|
||||||
:append-to-body="true"
|
|
||||||
width="500"
|
width="500"
|
||||||
:close-on-click-modal="false"
|
:close-on-click-modal="false"
|
||||||
:before-close="dialogClose"
|
:before-close="dialogClose"
|
||||||
@ -11,29 +10,29 @@
|
|||||||
class="ls-form"
|
class="ls-form"
|
||||||
ref="formRef"
|
ref="formRef"
|
||||||
:model="formData"
|
:model="formData"
|
||||||
label-width="60px"
|
label-width="80px"
|
||||||
>
|
>
|
||||||
<el-form-item
|
<el-form-item
|
||||||
label="名称"
|
label="角色名称"
|
||||||
prop="name"
|
prop="name"
|
||||||
:rules="{ required: true, message: '请输入名称', trigger: 'blur' }"
|
:rules="{ required: true, message: '请输入角色名称', trigger: 'blur' }"
|
||||||
>
|
>
|
||||||
<el-input
|
<el-input
|
||||||
class="ls-input"
|
class="ls-input"
|
||||||
v-model="formData.name"
|
v-model="formData.name"
|
||||||
placeholder="请输入名称"
|
placeholder="请输入角色名称"
|
||||||
clearable
|
clearable
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item
|
<el-form-item
|
||||||
label="编码"
|
label="角色编码"
|
||||||
prop="code"
|
prop="code"
|
||||||
:rules="{ required: true, message: '请输入编码', trigger: 'blur' }"
|
:rules="{ required: true, message: '请输入角色编码', trigger: 'blur' }"
|
||||||
>
|
>
|
||||||
<el-input
|
<el-input
|
||||||
class="ls-input"
|
class="ls-input"
|
||||||
v-model="formData.code"
|
v-model="formData.code"
|
||||||
placeholder="请输入编码"
|
placeholder="请输入角色编码"
|
||||||
clearable
|
clearable
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
Loading…
Reference in New Issue
Block a user