Merge pull request 'bug' (#48) from shen into test

Reviewed-on: #48
pull/51/head
shenhailong 1 year ago
commit 64b1d37190

@ -21,7 +21,7 @@ const taskStore = useTaskStore()
const taskListRef: any = ref(null) const taskListRef: any = ref(null)
// //
const showFieldList = ref<any[]>([]) const showFieldList = ref<any[]>([])
const search = ref('')
function collapseHandler() { function collapseHandler() {
collapse.value = !collapse.value collapse.value = !collapse.value
} }
@ -62,6 +62,12 @@ function showFilter() {
const showSearch = ref(false) const showSearch = ref(false)
function setShowSearch(value: boolean) { function setShowSearch(value: boolean) {
if (!value) {
console.log('setShowSearch', value)
search.value = ''
taskListRef.value.search('')
return
}
showSearch.value = value showSearch.value = value
} }
@ -201,6 +207,7 @@ defineExpose({
<div v-show="showSearch" class="warpper"> <div v-show="showSearch" class="warpper">
<n-input <n-input
v-model:value="search"
style="flex: 1; height: 32px" style="flex: 1; height: 32px"
placeholder="请输入你需要搜索的内容" placeholder="请输入你需要搜索的内容"
@input="inputHandler" @input="inputHandler"
@ -231,9 +238,9 @@ defineExpose({
<!-- 过滤列表 --> <!-- 过滤列表 -->
<FilterModalVue <FilterModalVue
ref="filterModalRef" ref="filterModalRef"
:type="2"
@edit-filter="editFilter" @edit-filter="editFilter"
@show-new-filter="showModal(newFilterModalRef)" @show-new-filter="showModal(newFilterModalRef)"
:type="2"
/> />
<!-- 新增过滤 --> <!-- 新增过滤 -->
<NewFilterModalVue ref="newFilterModalRef" /> <NewFilterModalVue ref="newFilterModalRef" />

@ -334,6 +334,10 @@ async function refreshHandler() {
watch(() => taskStore.activeId, async (newValue, oldValue) => { watch(() => taskStore.activeId, async (newValue, oldValue) => {
refreshHandler() refreshHandler()
}) })
function switchBatch() {
setBatch(!batch.value)
}
</script> </script>
<template> <template>
@ -408,7 +412,7 @@ watch(() => taskStore.activeId, async (newValue, oldValue) => {
</n-popselect> </n-popselect>
</div> </div>
<div> <div>
<div v-show="!showActions" class="wrapper-content-form-button" @click="setBatch(true)"> <div v-show="!showActions" class="wrapper-content-form-button" @click="switchBatch()">
<SvgIcon style="margin-right: 6px;" size="22" name="batch" /> <SvgIcon style="margin-right: 6px;" size="22" name="batch" />
批量审批 批量审批
</div> </div>

Loading…
Cancel
Save