fix: 修复最少最多选择 (#412)

* fix: 修复最少最多选择

* fix: 优化获取协作下拉框在协作弹窗出现时调用

* fix: 回退最多最少选择

* perl: 代码优化以及fix lint

---------

Co-authored-by: sudoooooo <zjbbabybaby@gmail.com>
This commit is contained in:
dayou 2024-09-23 12:33:30 +08:00 committed by sudoooooo
parent 602f8f4b73
commit 0ea1d81ad3

View File

@ -40,7 +40,7 @@
</template>
<script lang="ts" setup>
import { computed, ref, shallowRef, onMounted, watch } from 'vue'
import { computed, ref, shallowRef, watch } from 'vue'
import { ElMessage } from 'element-plus'
import 'element-plus/theme-chalk/src/message.scss'
@ -66,7 +66,9 @@ const ruleForm = shallowRef<any>(null)
const formTitle = ref('协作管理')
const cooperOptions = ref([])
onMounted(async () => {
const fetchPermissionList = async () => {
const res: any = await getPermissionList()
if (res.code === CODE_MAP.SUCCESS) {
cooperOptions.value = res.data.map((item: any) => {
@ -78,7 +80,7 @@ onMounted(async () => {
} else {
ElMessage.error(res.errmsg || '获取权限信息失败')
}
})
}
const formModel = ref({
members: [] as IMember[]
@ -98,6 +100,7 @@ watch(
role: item.permissions
}
})
fetchPermissionList()
} else {
formModel.value.members = []
ElMessage.error(res.errmsg || '获取协作信息失败')