From 772b66749dc918a75efbf5b6a5ab58efc3c14280 Mon Sep 17 00:00:00 2001 From: lilinyuan <1084668738@qq.com> Date: Wed, 20 Mar 2024 11:06:55 +0800 Subject: [PATCH 1/2] =?UTF-8?q?fix:=20=E8=B0=83=E6=95=B4=E6=90=9C=E7=B4=A2?= =?UTF-8?q?=E7=BB=84=E4=BB=B6=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/fvcomponents/fvSearchForm/index.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/fvcomponents/fvSearchForm/index.vue b/src/fvcomponents/fvSearchForm/index.vue index 2b4f2fc..8afc13b 100644 --- a/src/fvcomponents/fvSearchForm/index.vue +++ b/src/fvcomponents/fvSearchForm/index.vue @@ -107,7 +107,7 @@ onMounted(()=>{ } .btn-col { display: flex; - justify-content: flex-end; + justify-content: space-evenly; align-items: center; } \ No newline at end of file From 21d5969cebc841f61bd36fdec7cee78286bce60a Mon Sep 17 00:00:00 2001 From: lilinyuan <1084668738@qq.com> Date: Wed, 20 Mar 2024 14:10:07 +0800 Subject: [PATCH 2/2] =?UTF-8?q?fix:=20=E4=BF=AE=E6=94=B9user=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=E6=90=9C=E7=B4=A2=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/user/user.js | 5 ++-- src/views/system/user/index.vue | 50 ++++++++++++++++++++------------- 2 files changed, 34 insertions(+), 21 deletions(-) diff --git a/src/api/user/user.js b/src/api/user/user.js index e1eefb0..30d10b5 100644 --- a/src/api/user/user.js +++ b/src/api/user/user.js @@ -1,10 +1,11 @@ import request from '@/utils/request.js' // 根据角色或者部门id获取对应数据 -export const getDeptOpt = () => { +export const getDeptOpt = (params = {}) => { return request({ url: `/admin/mosr/department/option`, - method: 'get' + method: 'get', + params }) } diff --git a/src/views/system/user/index.vue b/src/views/system/user/index.vue index 0222510..81b688c 100644 --- a/src/views/system/user/index.vue +++ b/src/views/system/user/index.vue @@ -11,35 +11,35 @@ import { getDeptOpt, getSubCompOpt } from '../../../api/user/user'; const authStore = useAuthStore() -const localData = reactive({ - deptOption:[], - subCompanyOpt:[], -}) - -const deptOption = ref([]) -const subCompanyOpt = ref([]) - const searchConfig = ref([ { label: '子公司ID', prop: 'subCompanyId', - component: shallowRef(fvSelect), + component: 'el-tree-select', props: { placeholder: '请输入', clearable: true, - options: [], - filterable: true + data: [], + filterable: true, + checkStrictly: true + }, + on: { + change: async (val) =>{ + const { data } = await getDeptOpt({subCompanyId: val.value}) + searchConfig.value.find(item=>item.prop == 'departmentId').props.data = data + } } }, { label: '部门ID', prop: 'departmentId', - component: 'el-cascader', + component: 'el-tree-select', props: { placeholder: '请选择', clearable: true, - options: [], - filterable: true + data: [], + filterable: true, + checkStrictly: true } }, { @@ -108,24 +108,36 @@ const tableConfig = reactive({ label: '创建时间', align: 'center', }, + { + prop: 'oper', + label: '操作', + fixed: 'right', + width: '150', + align: 'center', + currentRender: ({row, index}) => { + return ( +