fix: 修复最少最多选择 (#412)
* fix: 修复最少最多选择 * fix: 优化获取协作下拉框在协作弹窗出现时调用 * fix: 回退最多最少选择 * perl: 代码优化以及fix lint --------- Co-authored-by: sudoooooo <zjbbabybaby@gmail.com>
This commit is contained in:
parent
602f8f4b73
commit
0ea1d81ad3
@ -40,7 +40,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<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 { ElMessage } from 'element-plus'
|
||||||
import 'element-plus/theme-chalk/src/message.scss'
|
import 'element-plus/theme-chalk/src/message.scss'
|
||||||
|
|
||||||
@ -66,7 +66,9 @@ const ruleForm = shallowRef<any>(null)
|
|||||||
const formTitle = ref('协作管理')
|
const formTitle = ref('协作管理')
|
||||||
|
|
||||||
const cooperOptions = ref([])
|
const cooperOptions = ref([])
|
||||||
onMounted(async () => {
|
|
||||||
|
|
||||||
|
const fetchPermissionList = async () => {
|
||||||
const res: any = await getPermissionList()
|
const res: any = await getPermissionList()
|
||||||
if (res.code === CODE_MAP.SUCCESS) {
|
if (res.code === CODE_MAP.SUCCESS) {
|
||||||
cooperOptions.value = res.data.map((item: any) => {
|
cooperOptions.value = res.data.map((item: any) => {
|
||||||
@ -78,7 +80,7 @@ onMounted(async () => {
|
|||||||
} else {
|
} else {
|
||||||
ElMessage.error(res.errmsg || '获取权限信息失败')
|
ElMessage.error(res.errmsg || '获取权限信息失败')
|
||||||
}
|
}
|
||||||
})
|
}
|
||||||
|
|
||||||
const formModel = ref({
|
const formModel = ref({
|
||||||
members: [] as IMember[]
|
members: [] as IMember[]
|
||||||
@ -98,6 +100,7 @@ watch(
|
|||||||
role: item.permissions
|
role: item.permissions
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
fetchPermissionList()
|
||||||
} else {
|
} else {
|
||||||
formModel.value.members = []
|
formModel.value.members = []
|
||||||
ElMessage.error(res.errmsg || '获取协作信息失败')
|
ElMessage.error(res.errmsg || '获取协作信息失败')
|
||||||
|
Loading…
Reference in New Issue
Block a user