😎页面调整

This commit is contained in:
zuohuaijun 2024-07-01 01:53:41 +08:00
parent 62d86d085b
commit 19112b0d4d
9 changed files with 38 additions and 8 deletions

View File

@ -8,7 +8,7 @@
</div>
</template>
<el-form :model="state.ruleForm" ref="ruleFormRef" label-width="auto">
<el-row :gutter="35">
<el-row :gutter="10">
<el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
<el-form-item label="上级机构">
<el-cascader

View File

@ -8,7 +8,7 @@
</div>
</template>
<el-form :model="state.ruleForm" ref="ruleFormRef" label-width="auto">
<el-row :gutter="35">
<el-row :gutter="10">
<el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
<el-form-item label="职位名称" prop="name" :rules="[{ required: true, message: '职位名称不能为空', trigger: 'blur' }]">
<el-input v-model="state.ruleForm.name" placeholder="职位名称" clearable />

View File

@ -56,6 +56,7 @@
import { reactive, onMounted, ref, watch } from 'vue';
import type { ElTree } from 'element-plus';
import { Search, MoreFilled } from '@element-plus/icons-vue';
import { getAPI } from '/@/utils/axios-utils';
import { SysCommonApi, SysRoleApi } from '/@/api-services/api';
@ -72,14 +73,17 @@ const state = reactive({
selectedTabName: 0,
});
//
onMounted(() => {
initTreeData();
});
//
watch(filterText, (val) => {
treeRef.value!.filter(val);
});
//
const initTreeData = async () => {
state.loading = true;
var res = await getAPI(SysCommonApi).apiSysCommonApiListGet();
@ -109,6 +113,7 @@ const openDrawer = async () => {
state.loading = false;
};
//
const filterNode = (value: string, data: any) => {
if (!value) return true;
return data.route.includes(value);

View File

@ -8,7 +8,7 @@
</div>
</template>
<el-form :model="state.ruleForm" ref="ruleFormRef" label-width="auto">
<el-row :gutter="35">
<el-row :gutter="10">
<el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
<el-form-item label="角色名称" prop="name" :rules="[{ required: true, message: '角色名称不能为空', trigger: 'blur' }]">
<el-input v-model="state.ruleForm.name" placeholder="角色名称" clearable />
@ -48,7 +48,7 @@
icon="ele-Menu"
highlight-current
default-expand-all
style="height: 600px; overflow-y: auto; width: 100%"
style="height: 500px; overflow-y: auto; width: 100%"
/>
</el-form-item>
</el-col>
@ -85,6 +85,7 @@ const state = reactive({
menuData: [] as Array<SysMenu>, //
});
//
onMounted(async () => {
state.loading = true;
var res = await getAPI(SysMenuApi).apiSysMenuListGet();

View File

@ -56,6 +56,7 @@
import { reactive, onMounted, ref, watch } from 'vue';
import type { ElTree } from 'element-plus';
import { Search, MoreFilled } from '@element-plus/icons-vue';
import { getAPI } from '/@/utils/axios-utils';
import { SysCommonApi, SysRoleApi } from '/@/api-services/api';
@ -73,14 +74,17 @@ const state = reactive({
selectedTabName: 0,
});
//
onMounted(() => {
initTreeData();
});
//
watch(filterText, (val) => {
treeRef.value!.filter(val);
});
//
const initTreeData = async () => {
state.loading = true;
var res = await getAPI(SysCommonApi).apiSysCommonApiListGet();
@ -111,6 +115,7 @@ const openDrawer = async (row: any) => {
state.loading = false;
};
//
const filterNode = (value: string, data: any) => {
if (!value) return true;
return data.route.includes(value);

View File

@ -8,8 +8,8 @@
</div>
</template>
<el-form :model="state.ruleForm" label-position="top">
<el-row :gutter="35">
<el-col :xs="24" :sm="24" :md="24" :lg="24" :xl1="24" class="mb20">
<el-row :gutter="10">
<el-col :xs="24" :sm="24" :md="24" :lg="24" :xl1="24" class="mb10">
<el-form-item label="数据范围:">
<el-select v-model="state.ruleForm.dataScope" placeholder="数据范围" style="width: 100%">
<el-option v-for="d in state.dataScopeType" :key="d.value" :label="d.label" :value="d.value" />
@ -17,8 +17,10 @@
</el-form-item>
</el-col>
<el-col :xs="24" :sm="24" :md="24" :lg="24" :xl1="24" v-show="state.ruleForm.dataScope === 5">
<el-form-item label="机构列表:">
<OrgTree ref="orgTreeRef" class="w100" />
<el-form-item label="机构列表:" class="tree-box">
<div style="display: flex; height: 100%; width: 100%">
<OrgTree ref="orgTreeRef" :check-strictly="false" class="w100" />
</div>
</el-form-item>
</el-col>
</el-row>
@ -86,3 +88,14 @@ const submit = async () => {
//
defineExpose({ openDialog });
</script>
<!-- <style lang="scss" scoped>
:deep(.el-dialog__body) {
min-height: 615px;
}
.tree-box {
:deep(.el-form-item__content) {
height: 500px;
}
}
</style> -->

View File

@ -263,6 +263,7 @@
import { onMounted, reactive, ref } from 'vue';
import { storeToRefs } from 'pinia';
import { useUserInfo } from '/@/stores/userInfo';
import { getAPI } from '/@/utils/axios-utils';
import { SysPosApi, SysRoleApi, SysUserApi } from '/@/api-services/api';
import { RoleOutput, SysOrg, PagePosOutput, UpdateUserInput } from '/@/api-services/models';
@ -284,6 +285,7 @@ const state = reactive({
roleData: [] as Array<RoleOutput>, //
});
//
onMounted(async () => {
state.loading = true;
const { data } = await getAPI(SysPosApi).apiSysPosPagePost({ page: 1, pageSize: 9999 });

View File

@ -55,6 +55,7 @@ const state = reactive({
},
});
//
onMounted(async () => {
state.loading = true;
var res = await getAPI(SysOrgApi).apiSysOrgListGet(0);

View File

@ -171,6 +171,7 @@ import CropperDialog from '/@/components/cropper/index.vue';
import VueGridLayout from 'vue-grid-layout';
import { sm2 } from 'sm-crypto-v2';
import { clearAccessTokens, getAPI } from '/@/utils/axios-utils';
import { SysFileApi, SysUserApi } from '/@/api-services/api';
import { ChangePwdInput, SysUser, SysFile } from '/@/api-services/models';
@ -200,6 +201,7 @@ const state = reactive({
cropperTitle: '',
});
//
onMounted(async () => {
state.loading = true;
var res = await getAPI(SysUserApi).apiSysUserBaseInfoGet();
@ -207,6 +209,7 @@ onMounted(async () => {
state.loading = false;
});
//
watch(state.signOptions, () => {
signaturePadRef.value.signaturePad.penColor = state.signOptions.penColor;
signaturePadRef.value.signaturePad.minWidth = state.signOptions.minWidth;