|
@@ -19,20 +19,13 @@
|
|
</a-form-item>
|
|
</a-form-item>
|
|
</a-col>
|
|
</a-col>
|
|
<a-col :span="12">
|
|
<a-col :span="12">
|
|
- <a-form-item label="用户类型" :label-col="{span:6}" name="userType" v-bind="validateInfos.userTypeID">
|
|
|
|
- <a-select
|
|
|
|
- ref="select"
|
|
|
|
- v-model:value="dataModel.userTypeID"
|
|
|
|
- :options="userTypeList"
|
|
|
|
- :field-names="{label:'name',value:'value'}"
|
|
|
|
- @change="loadFunctionCodeList"
|
|
|
|
- >
|
|
|
|
- </a-select>
|
|
|
|
|
|
+ <a-form-item label="角色说明" :label-col="{span:6}" name="description">
|
|
|
|
+ <a-input v-model:value="dataModel.description" placeholder=""/>
|
|
</a-form-item>
|
|
</a-form-item>
|
|
</a-col>
|
|
</a-col>
|
|
</a-row>
|
|
</a-row>
|
|
<a-row :gutter="24">
|
|
<a-row :gutter="24">
|
|
- <a-col :span="12">
|
|
|
|
|
|
+ <!-- <a-col :span="12">
|
|
<a-form-item label="数据范围" :label-col="{span:6}" name="dataRangeID">
|
|
<a-form-item label="数据范围" :label-col="{span:6}" name="dataRangeID">
|
|
<a-select
|
|
<a-select
|
|
ref="select"
|
|
ref="select"
|
|
@@ -43,11 +36,18 @@
|
|
</a-select>
|
|
</a-select>
|
|
</a-form-item>
|
|
</a-form-item>
|
|
</a-col>
|
|
</a-col>
|
|
- <a-col :span="12">
|
|
|
|
- <a-form-item label="角色说明" :label-col="{span:6}" name="description">
|
|
|
|
- <a-input v-model:value="dataModel.description" placeholder=""/>
|
|
|
|
- </a-form-item>
|
|
|
|
- </a-col>
|
|
|
|
|
|
+ <a-col :span="12">
|
|
|
|
+ <a-form-item label="用户类型" :label-col="{span:6}" name="userType" v-bind="validateInfos.userTypeID">
|
|
|
|
+ <a-select
|
|
|
|
+ ref="select"
|
|
|
|
+ v-model:value="dataModel.userTypeID"
|
|
|
|
+ :options="userTypeList"
|
|
|
|
+ :field-names="{label:'name',value:'value'}"
|
|
|
|
+ @change="loadFunctionCodeList"
|
|
|
|
+ >
|
|
|
|
+ </a-select>
|
|
|
|
+ </a-form-item>
|
|
|
|
+ </a-col>-->
|
|
</a-row>
|
|
</a-row>
|
|
<a-divider orientation="left">角色权限</a-divider>
|
|
<a-divider orientation="left">角色权限</a-divider>
|
|
<a-table :columns="columns" :data-source="treeList" :row-selection="rowSelection"
|
|
<a-table :columns="columns" :data-source="treeList" :row-selection="rowSelection"
|
|
@@ -129,13 +129,7 @@ export default defineComponent({
|
|
title: '名称',
|
|
title: '名称',
|
|
dataIndex: 'functionName',
|
|
dataIndex: 'functionName',
|
|
key: 'functionName',
|
|
key: 'functionName',
|
|
- },
|
|
|
|
- {
|
|
|
|
- title: '数据范围',
|
|
|
|
- dataIndex: 'dataRangeID',
|
|
|
|
- key: 'dataRangeID',
|
|
|
|
- width: '25%',
|
|
|
|
- },
|
|
|
|
|
|
+ }
|
|
];
|
|
];
|
|
|
|
|
|
const rulesRef = reactive({
|
|
const rulesRef = reactive({
|
|
@@ -144,12 +138,6 @@ export default defineComponent({
|
|
required: true,
|
|
required: true,
|
|
message: '请填写角色名称!',
|
|
message: '请填写角色名称!',
|
|
}
|
|
}
|
|
- ],
|
|
|
|
- userTypeID: [
|
|
|
|
- {
|
|
|
|
- required: true,
|
|
|
|
- message: '请选择用户类型!',
|
|
|
|
- }
|
|
|
|
]
|
|
]
|
|
});
|
|
});
|
|
|
|
|
|
@@ -162,7 +150,7 @@ export default defineComponent({
|
|
loadData(id);
|
|
loadData(id);
|
|
loadUserTypeList();
|
|
loadUserTypeList();
|
|
loadDataRangeList();
|
|
loadDataRangeList();
|
|
-
|
|
|
|
|
|
+ loadFunctionCodeList();
|
|
visible.value = true;
|
|
visible.value = true;
|
|
|
|
|
|
};
|
|
};
|
|
@@ -194,8 +182,6 @@ export default defineComponent({
|
|
const loadData = (id: any) => {
|
|
const loadData = (id: any) => {
|
|
get(id).then((result: any) => {
|
|
get(id).then((result: any) => {
|
|
dataModel.value = result;
|
|
dataModel.value = result;
|
|
- if (dataModel.value.userTypeID)
|
|
|
|
- loadFunctionCodeList();
|
|
|
|
});
|
|
});
|
|
}
|
|
}
|
|
|
|
|
|
@@ -212,7 +198,7 @@ export default defineComponent({
|
|
}
|
|
}
|
|
|
|
|
|
const loadFunctionCodeList = () => {
|
|
const loadFunctionCodeList = () => {
|
|
- getFunctionCodeTreeList(dataModel.value.roleID, dataModel.value.userTypeID).then(data => {
|
|
|
|
|
|
+ getFunctionCodeTreeList(dataModel.value.roleID, "1").then(data => {
|
|
treeList.value = data;
|
|
treeList.value = data;
|
|
|
|
|
|
let rowDataList = treeToList(deepCopy(data));
|
|
let rowDataList = treeToList(deepCopy(data));
|