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()