From e2d6722ec662654851b1e39bdb08eeb6ebffaf53 Mon Sep 17 00:00:00 2001 From: lilinyuan <1084668738@qq.com> Date: Sat, 1 Jun 2024 23:15:37 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8Dbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/fvcomponents/fvSearchForm/index.vue | 14 +++++++------- src/views/system/user/index.vue | 11 +++++++++-- 2 files changed, 16 insertions(+), 9 deletions(-) diff --git a/src/fvcomponents/fvSearchForm/index.vue b/src/fvcomponents/fvSearchForm/index.vue index f082ac7..3bfba16 100644 --- a/src/fvcomponents/fvSearchForm/index.vue +++ b/src/fvcomponents/fvSearchForm/index.vue @@ -66,15 +66,15 @@ const filterConfig = computed(() => { }) // 搜索功能表单元素默认值 -const setDefaultFormValues = () => { - filterConfig.value.forEach(item => { - form.value[item.prop] = item.props?.defaultValue || null - }) -} +// const setDefaultFormValues = () => { +// filterConfig.value.forEach(item => { +// form.value[item.prop] = item.props?.defaultValue || null +// }) +// } watchEffect(() => { if (filterConfig.value.length) { - setDefaultFormValues() + // setDefaultFormValues() } }) @@ -86,7 +86,7 @@ const getValues = () => { //重置 const handleReset = () => { form.value = {} - setDefaultFormValues() + // setDefaultFormValues() emits('search', form.value) } diff --git a/src/views/system/user/index.vue b/src/views/system/user/index.vue index 45b2763..9c40ebc 100644 --- a/src/views/system/user/index.vue +++ b/src/views/system/user/index.vue @@ -67,6 +67,12 @@ const searchConfig = ref([ const tableIns = ref() +const auths = { + edit: ['admin:user:edit'], + del: ['admin:user:del'], + add: ['admin:user:add'], +} + const tableConfig = reactive({ columns: [ { @@ -119,10 +125,10 @@ const tableConfig = reactive({ currentRender: ({row, index}) => { return (
- handleEdit(row)} v-perm={['admin:user:edit']}>编辑 + handleEdit(row)}>编辑 { row.userType != 0 ? - handleDel(row)} v-perm={['admin:user:del']}>删除 : + handleDel(row)}>删除 : null } @@ -148,6 +154,7 @@ const init = async () => { searchConfig.value.find(item=>item.prop == 'departmentId').props.data = data const res = await getSubCompOpt() searchConfig.value.find(item=>item.prop == 'subCompanyId').props.data = res.data + console.log("🚀 ~ init ~ searchConfig.value:", searchConfig.value) } init()