租户管理界面调整
This commit is contained in:
@@ -1767,10 +1767,10 @@ export default {
|
||||
classId:'Number',
|
||||
classSort:'Sorting',
|
||||
status:'Status',
|
||||
type:'Type',
|
||||
type:'Tenancy Type',
|
||||
createTime:'Creation Time',
|
||||
highClass:'Root Level',
|
||||
key:'Key',
|
||||
key:'Tenancy Key',
|
||||
emailTip:'Please input the correct email address',
|
||||
phoneTip:'Please enter the correct phone number',
|
||||
node:'Root Node',
|
||||
|
||||
@@ -1767,10 +1767,10 @@ export default {
|
||||
classId:'编号',
|
||||
classSort:'排序',
|
||||
status:'状态',
|
||||
type:'类型',
|
||||
type:'租赁类型',
|
||||
createTime:'创建时间',
|
||||
highClass:'根级',
|
||||
key:'标识',
|
||||
key:'租赁标识',
|
||||
emailTip:'请输入正确的邮箱地址',
|
||||
phoneTip:'请输入正确的手机号码',
|
||||
node:'根节点',
|
||||
|
||||
@@ -85,28 +85,15 @@ let tableColumns: ColumnsType = [
|
||||
width: 300,
|
||||
},
|
||||
{
|
||||
title: t('views.system.dept.classId'),
|
||||
dataIndex: 'tenantId',
|
||||
align: 'left',
|
||||
width: 150,
|
||||
},
|
||||
{
|
||||
title: t('views.system.dept.classSort'),
|
||||
dataIndex: 'orderNum',
|
||||
title: t('views.system.dept.key'),
|
||||
dataIndex: 'tenancyKey',
|
||||
align: 'left',
|
||||
width: 200,
|
||||
},
|
||||
{
|
||||
title: t('views.system.dept.status'),
|
||||
dataIndex: 'status',
|
||||
key: 'status',
|
||||
align: 'center',
|
||||
width: 150,
|
||||
},
|
||||
{
|
||||
title: t('views.system.dept.type'),
|
||||
dataIndex: 'type',
|
||||
key: 'type',
|
||||
dataIndex: 'tenancyType',
|
||||
key: 'tenancyType',
|
||||
align: 'center',
|
||||
width: 150,
|
||||
customRender(opt) {
|
||||
@@ -122,6 +109,14 @@ let tableColumns: ColumnsType = [
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
title: t('views.system.dept.status'),
|
||||
dataIndex: 'status',
|
||||
key: 'status',
|
||||
align: 'center',
|
||||
width: 150,
|
||||
},
|
||||
|
||||
{
|
||||
title: t('views.system.dept.createTime'),
|
||||
dataIndex: 'createTime',
|
||||
@@ -192,12 +187,12 @@ let modalState: ModalStateType = reactive({
|
||||
email: '',
|
||||
leader: '',
|
||||
orderNum: 0,
|
||||
parentId: '100',
|
||||
parentId: '',
|
||||
ancestors: '',
|
||||
parentName: null,
|
||||
phone: '',
|
||||
key: '',
|
||||
type: '',
|
||||
tenancyKey: '',
|
||||
tenancyType: '',
|
||||
status: '0',
|
||||
},
|
||||
confirmLoading: false,
|
||||
@@ -286,6 +281,7 @@ function fnModalVisibleByEdit(
|
||||
Promise.all([getDept(tenantId), listDeptExcludeChild(tenantId)])
|
||||
.then(resArr => {
|
||||
if (resArr[0].code === RESULT_CODE_SUCCESS && resArr[0].data) {
|
||||
console.log(resArr[0].data)
|
||||
modalState.from = Object.assign(modalState.from, resArr[0].data);
|
||||
if (
|
||||
resArr[1].code === RESULT_CODE_SUCCESS &&
|
||||
@@ -300,11 +296,7 @@ function fnModalVisibleByEdit(
|
||||
},
|
||||
];
|
||||
} else {
|
||||
const a = resArr[1].data.map(s=>{
|
||||
delete s.key
|
||||
return s
|
||||
})
|
||||
modalState.treeData = parseDataToTree(a, 'tenantId');
|
||||
modalState.treeData = parseDataToTree(resArr[1].data, 'tenantId');
|
||||
}
|
||||
}
|
||||
modalState.title =
|
||||
@@ -410,20 +402,16 @@ function fnGetList() {
|
||||
tableState.loading = true;
|
||||
listDept(toRaw(queryParams)).then(res => {
|
||||
if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.data)) {
|
||||
var a: any = res.data.map(item => {
|
||||
delete item.key;
|
||||
return item;
|
||||
});
|
||||
|
||||
// 转换树状数据
|
||||
const treeData = parseDataToTree(a, 'tenantId');
|
||||
console.log(treeData);
|
||||
const treeData = parseDataToTree(res.data, 'tenantId');
|
||||
// 初始上级部门和展开编号key
|
||||
if (treeDataAll.length <= 0) {
|
||||
// 转换树状数据
|
||||
treeDataAll = treeData;
|
||||
// 展开编号key
|
||||
expandedRowKeys = [...new Set(a.map((item:any) => item.parentId))];
|
||||
expandedRowKeys = [
|
||||
...new Set(res.data.map((item: any) => item.parentId)),
|
||||
];
|
||||
fnTableExpandedRowsAll(tableState.expandedRowAll);
|
||||
}
|
||||
tableState.data = treeData;
|
||||
@@ -705,7 +693,7 @@ onMounted(() => {
|
||||
:label-col="{ span: 3 }"
|
||||
:labelWrap="true"
|
||||
>
|
||||
{{ modalState.from.type }}
|
||||
{{ modalState.from.tenancyType }}
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
@@ -807,7 +795,7 @@ onMounted(() => {
|
||||
:labelWrap="true"
|
||||
>
|
||||
<a-select
|
||||
v-model:value="modalState.from.type"
|
||||
v-model:value="modalState.from.tenancyType"
|
||||
allow-clear
|
||||
:options="modalStateFromOption.tenantType"
|
||||
>
|
||||
@@ -821,7 +809,7 @@ onMounted(() => {
|
||||
:label-col="{ span: 3 }"
|
||||
>
|
||||
<a-input
|
||||
v-model:value="modalState.from.key"
|
||||
v-model:value="modalState.from.tenancyKey"
|
||||
allow-clear
|
||||
></a-input>
|
||||
</a-form-item>
|
||||
|
||||
Reference in New Issue
Block a user