update: 系统管理列表撑满高度

This commit is contained in:
JiangQiming 2023-03-30 17:18:43 +08:00
parent 881cc39e9b
commit f08e28560a
11 changed files with 1406 additions and 1343 deletions

View File

@ -6,7 +6,7 @@
target="category"
@search="(params:any)=>queryParams = {...params}"
/>
<FullPage>
<j-pro-table
ref="tableRef"
:columns="columns"
@ -97,7 +97,9 @@
<template #overlay>
<j-menu>
<j-menu-item
v-for="(o, i) in item.children"
v-for="(
o, i
) in item.children"
:key="i"
>
<j-button
@ -105,7 +107,9 @@
@click="o.onClick"
>
<AIcon :type="o.icon" />
<span>{{ o.text }}</span>
<span>{{
o.text
}}</span>
</j-button>
</j-menu-item>
</j-menu>
@ -131,7 +135,9 @@
<AIcon
type="EyeOutlined"
style="font-size: 24px"
@click="() => table.toSave(slotProps.id, true)"
@click="
() => table.toSave(slotProps.id, true)
"
/>
</template>
</CardBox>
@ -153,7 +159,10 @@
<template #action="slotProps">
<j-space :size="16">
<PermissionButton
v-for="i in table.getActions(slotProps, 'table')"
v-for="i in table.getActions(
slotProps,
'table',
)"
:hasPermission="i.permission"
type="link"
:tooltip="i.tooltip"
@ -166,6 +175,7 @@
</j-space>
</template>
</j-pro-table>
</FullPage>
</div>
<div class="dialogs">
<MenuDialog

View File

@ -1,5 +1,6 @@
<template>
<page-container>
<FullPage>
<div class="basis-container">
<j-form
layout="vertical"
@ -33,7 +34,9 @@
>
<img
class="img-style"
:src="getImage('/init-home/mark.png')"
:src="
getImage('/init-home/mark.png')
"
/>
</j-tooltip>
</template>
@ -48,7 +51,9 @@
<j-tooltip title="系统后台访问的url">
<img
class="img-style"
:src="getImage('/init-home/mark.png')"
:src="
getImage('/init-home/mark.png')
"
/>
</j-tooltip>
</template>
@ -61,7 +66,9 @@
<j-col>
<j-form-item label="系统logo">
<div class="upload-image-warp-logo">
<div class="upload-image-border-logo">
<div
class="upload-image-border-logo"
>
<j-upload
name="file"
:action="action"
@ -73,14 +80,18 @@
@change="
uploader.handleChangeLogo
"
:accept="uploader.imageTypes"
:accept="
uploader.imageTypes
"
>
<div
class="upload-image-content-logo"
>
<div
class="loading-logo"
v-if="form.logoLoading"
v-if="
form.logoLoading
"
>
<AIcon
type="LoadingOutlined"
@ -89,7 +100,9 @@
<div
class="upload-image"
style="height: 100%"
v-if="formValue.logo"
v-if="
formValue.logo
"
:style="
formValue.logo
? `background-image: url(${formValue.logo});`
@ -97,7 +110,9 @@
"
></div>
<div
v-if="formValue.logo"
v-if="
formValue.logo
"
class="upload-image-mask"
>
点击修改
@ -151,7 +166,9 @@
</j-tooltip>
</template>
<div class="upload-image-warp-logo">
<div class="upload-image-border-logo">
<div
class="upload-image-border-logo"
>
<j-upload
name="file"
:action="action"
@ -169,7 +186,9 @@
class="upload-image-content-logo"
>
<div
v-if="form.iconLoading"
v-if="
form.iconLoading
"
class="loading-icon"
>
<AIcon
@ -203,8 +222,12 @@
</div>
</div>
<div class="upload-tips">推荐尺寸64*64</div>
<div class="upload-tips">支持ico格式</div>
<div class="upload-tips">
推荐尺寸64*64
</div>
<div class="upload-tips">
支持ico格式
</div>
</j-form-item>
</j-col>
</j-row>
@ -224,12 +247,16 @@
@change="uploader.changeBackUpload"
:accept="uploader.imageTypes"
>
<div class="upload-image-content-back">
<div
class="upload-image-content-back"
>
<div
v-if="form.backLoading"
class="loading-back"
>
<AIcon type="LoadingOutlined" />
<AIcon
type="LoadingOutlined"
/>
</div>
<div
class="upload-image"
@ -280,6 +307,7 @@
保存
</j-button>
</div>
</FullPage>
</page-container>
</template>

View File

@ -6,7 +6,7 @@
target="category"
@search="(params:any)=>queryParams = {...params}"
/>
<FullPage>
<j-pro-table
ref="tableRef"
:columns="columns"
@ -133,6 +133,7 @@
</j-space>
</template>
</j-pro-table>
</FullPage>
<EditDialog
v-if="dialog.visible"
@ -283,13 +284,13 @@ const table = {
//
refresh: () => {
tableRef.value.reload();
dialog.visible = false
dialog.selectItem = {}
dialog.visible = false;
dialog.selectItem = {};
},
cancel: () => {
dialog.visible = false
dialog.selectItem = {}
}
dialog.visible = false;
dialog.selectItem = {};
},
};
table.getTypeOption();

View File

@ -5,6 +5,7 @@
target="category"
@search="(params:any)=>queryParams = {...params}"
/>
<FullPage>
<j-pro-table
ref="tableRef"
:request="table.requestFun"
@ -49,7 +50,9 @@
:hasPermission="`${permission}:assert`"
@click="table.clickEdit()"
>
<AIcon type="EditOutlined" />批量编辑
<AIcon
type="EditOutlined"
/>
</PermissionButton>
</j-menu-item>
</j-menu>
@ -127,7 +130,8 @@
:hasPermission="`${permission}:bind`"
:popConfirm="{
title: `是否解除绑定`,
onConfirm: () => table.clickUnBind(slotProps),
onConfirm: () =>
table.clickUnBind(slotProps),
}"
>
<AIcon type="DisconnectOutlined" />
@ -169,6 +173,7 @@
</j-space>
</template>
</j-pro-table>
</FullPage>
<div class="dialogs">
<AddDeviceOrProductDialog
@ -471,7 +476,7 @@ const table = {
},
clickAdd: (type?: string) => {
// : type = 'handle': , !type,
departmentStore.setType(type)
departmentStore.setType(type);
dialogs.addShow = true;
},
clickEdit: (row?: any) => {

View File

@ -5,6 +5,7 @@
target="category"
@search="(params:any)=>queryParams = {...params}"
/>
<FullPage>
<j-pro-table
ref="tableRef"
:request="table.requestFun"
@ -49,7 +50,9 @@
:hasPermission="`${permission}:assert`"
@click="() => table.clickEdit()"
>
<AIcon type="EditOutlined" />批量编辑
<AIcon
type="EditOutlined"
/>
</PermissionButton>
</j-menu-item>
</j-menu>
@ -63,7 +66,9 @@
:value="slotProps"
:actions="table.getActions(slotProps, 'card')"
v-bind="slotProps"
:active="tableData._selectedRowKeys.includes(slotProps.id)"
:active="
tableData._selectedRowKeys.includes(slotProps.id)
"
@click="table.onSelectChange"
:status="slotProps.state?.value"
:statusText="slotProps.state?.text"
@ -192,6 +197,7 @@
</j-space>
</template>
</j-pro-table>
</FullPage>
<div class="dialogs">
<AddDeviceOrProductDialog

View File

@ -5,6 +5,7 @@
target="category"
@search="handleParams"
/>
<FullPage>
<j-pro-table
ref="tableRef"
:columns="columns"
@ -71,6 +72,7 @@
</j-space>
</template>
</j-pro-table>
</FullPage>
<div class="dialogs">
<AddBindUserDialog
@ -150,8 +152,8 @@ const columns = [
const queryParams = ref({});
const handleParams = (params: any) => {
queryParams.value = params
}
queryParams.value = params;
};
//
const tableRef = ref<Record<string, any>>({}); //
@ -174,7 +176,7 @@ const table = reactive({
value: props.parentId,
},
],
type: 'and'
type: 'and',
},
],
};

View File

@ -6,7 +6,7 @@
target="category"
@search="handleSearch"
/>
<FullPage>
<j-pro-table
ref="tableRef"
:columns="columns"
@ -32,7 +32,9 @@
</template>
<template #createTime="slotProps">
{{
dayjs(slotProps.createTime).format('YYYY-MM-DD HH:mm:ss')
dayjs(slotProps.createTime).format(
'YYYY-MM-DD HH:mm:ss',
)
}}
</template>
<template #action="slotProps">
@ -70,6 +72,7 @@
</j-space>
</template>
</j-pro-table>
</FullPage>
</div>
</page-container>
</template>

View File

@ -6,7 +6,7 @@
target="system-permission"
@search="handleSearch"
/>
<FullPage>
<j-pro-table
ref="tableRef"
:columns="columns"
@ -100,7 +100,8 @@
title: `确定要${
slotProps.status ? '禁用' : '启用'
}`,
onConfirm: () => table.changeStatus(slotProps),
onConfirm: () =>
table.changeStatus(slotProps),
}"
:tooltip="{
title: slotProps.status ? '禁用' : '启用',
@ -134,6 +135,7 @@
</j-space>
</template>
</j-pro-table>
</FullPage>
<EditDialog
v-if="dialog.visible"

View File

@ -6,7 +6,7 @@
target="category"
@search="(params:any)=>queryParams = {...params}"
/>
<FullPage>
<j-pro-table
ref="tableRef"
:columns="columns"
@ -60,6 +60,7 @@
</j-space>
</template>
</j-pro-table>
</FullPage>
<EditDialog
v-if="dialog.visible"

View File

@ -6,7 +6,7 @@
target="category"
@search="(params:any)=>queryParams = {...params}"
/>
<FullPage>
<j-pro-table
ref="tableRef"
:columns="columns"
@ -65,6 +65,7 @@
</j-space>
</template>
</j-pro-table>
</FullPage>
<AddDialog v-if="dialogVisible" v-model:visible="dialogVisible" />
</div>

View File

@ -6,7 +6,7 @@
target="category"
@search="handleParams"
/>
<FullPage>
<j-pro-table
ref="tableRef"
:columns="columns"
@ -60,13 +60,16 @@
:hasPermission="`${permission}:action`"
type="link"
:tooltip="{
title: `${slotProps.status ? '禁用' : '启用'}`,
title: `${
slotProps.status ? '禁用' : '启用'
}`,
}"
:popConfirm="{
title: `确定${
slotProps.status ? '禁用' : '启用'
}`,
onConfirm: () => table.changeStatus(slotProps),
onConfirm: () =>
table.changeStatus(slotProps),
}"
>
<AIcon
@ -97,7 +100,8 @@
}"
:popConfirm="{
title: `确认删除`,
onConfirm: () => table.clickDel(slotProps.id),
onConfirm: () =>
table.clickDel(slotProps.id),
}"
:disabled="slotProps.status"
>
@ -106,6 +110,7 @@
</j-space>
</template>
</j-pro-table>
</FullPage>
<EditUserDialog
v-if="dialog.visible"
@ -264,21 +269,20 @@ type dictType = {
type modalType = '' | 'add' | 'edit' | 'reset';
const handleParams = (params: any) => {
const newParams = (params?.terms as any[])?.map(item1 => {
const newParams = (params?.terms as any[])?.map((item1) => {
item1.terms = item1.terms.map((item2: any) => {
if (['telephone', 'email'].includes(item2.column)) {
return {
column: 'id$user-detail',
value: [item2]
}
}
return item2
})
return item1
})
queryParams.value = { terms: newParams || [] }
value: [item2],
};
}
return item2;
});
return item1;
});
queryParams.value = { terms: newParams || [] };
};
</script>
<style lang="less" scoped>