mirror of
https://github.com/kuaifan/dootask.git
synced 2025-12-13 20:12:48 +00:00
perf: 搜索后支持快速取消筛选
This commit is contained in:
parent
1323bba420
commit
f3fb777924
@ -24,7 +24,8 @@
|
||||
transfer>
|
||||
<Button :loading="loadIng > 0" type="primary" icon="ios-search" @click="onSearch">{{$L('搜索')}}</Button>
|
||||
<div slot="content">
|
||||
<Button :loading="loadIng > 0" type="text" @click="refresh">{{$L('刷新')}}</Button>
|
||||
<Button v-if="keyIs" type="text" @click="keyIs=false">{{$L('取消筛选')}}</Button>
|
||||
<Button v-else :loading="loadIng > 0" type="text" @click="getLists">{{$L('刷新')}}</Button>
|
||||
</div>
|
||||
</Tooltip>
|
||||
</li>
|
||||
@ -63,6 +64,7 @@ export default {
|
||||
loadIng: 0,
|
||||
|
||||
keys: {},
|
||||
keyIs: false,
|
||||
|
||||
columns: [],
|
||||
list: [],
|
||||
@ -79,6 +81,14 @@ export default {
|
||||
computed: {
|
||||
...mapState(['windowMax768'])
|
||||
},
|
||||
watch: {
|
||||
keyIs(v) {
|
||||
if (!v) {
|
||||
this.keys = {}
|
||||
this.setPage(1)
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
initLanguage() {
|
||||
this.columns = [
|
||||
@ -194,11 +204,6 @@ export default {
|
||||
]
|
||||
},
|
||||
|
||||
refresh() {
|
||||
this.keys = [];
|
||||
this.getLists();
|
||||
},
|
||||
|
||||
onSearch() {
|
||||
this.page = 1;
|
||||
this.getLists();
|
||||
@ -206,6 +211,7 @@ export default {
|
||||
|
||||
getLists() {
|
||||
this.loadIng++;
|
||||
this.keyIs = $A.objImplode(this.keys) != "";
|
||||
this.$store.dispatch("call", {
|
||||
url: 'project/lists',
|
||||
data: {
|
||||
|
||||
@ -36,7 +36,8 @@
|
||||
transfer>
|
||||
<Button :loading="loadIng > 0" type="primary" icon="ios-search" @click="onSearch">{{$L('搜索')}}</Button>
|
||||
<div slot="content">
|
||||
<Button :loading="loadIng > 0" type="text" @click="getLists">{{$L('刷新')}}</Button>
|
||||
<Button v-if="keyIs" type="text" @click="keyIs=false">{{$L('取消筛选')}}</Button>
|
||||
<Button v-else :loading="loadIng > 0" type="text" @click="getLists">{{$L('刷新')}}</Button>
|
||||
</div>
|
||||
</Tooltip>
|
||||
</li>
|
||||
@ -75,6 +76,7 @@ export default {
|
||||
loadIng: 0,
|
||||
|
||||
keys: {},
|
||||
keyIs: false,
|
||||
|
||||
columns: [],
|
||||
list: [],
|
||||
@ -91,6 +93,14 @@ export default {
|
||||
computed: {
|
||||
...mapState(['windowMax768'])
|
||||
},
|
||||
watch: {
|
||||
keyIs(v) {
|
||||
if (!v) {
|
||||
this.keys = {}
|
||||
this.setPage(1)
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
initLanguage() {
|
||||
this.columns = [
|
||||
@ -178,10 +188,12 @@ export default {
|
||||
},
|
||||
]
|
||||
},
|
||||
|
||||
onSearch() {
|
||||
this.page = 1;
|
||||
this.getLists();
|
||||
},
|
||||
|
||||
getLists() {
|
||||
let archived = 'all';
|
||||
if (this.keys.status == 'archived') {
|
||||
@ -190,6 +202,7 @@ export default {
|
||||
archived = 'no';
|
||||
}
|
||||
this.loadIng++;
|
||||
this.keyIs = $A.objImplode(this.keys) != "";
|
||||
this.$store.dispatch("call", {
|
||||
url: 'project/lists',
|
||||
data: {
|
||||
|
||||
@ -35,7 +35,8 @@
|
||||
transfer>
|
||||
<Button :loading="loadIng > 0" type="primary" icon="ios-search" @click="onSearch">{{$L('搜索')}}</Button>
|
||||
<div slot="content">
|
||||
<Button :loading="loadIng > 0" type="text" @click="getLists">{{$L('刷新')}}</Button>
|
||||
<Button v-if="keyIs" type="text" @click="keyIs=false">{{$L('取消筛选')}}</Button>
|
||||
<Button v-else :loading="loadIng > 0" type="text" @click="getLists">{{$L('刷新')}}</Button>
|
||||
</div>
|
||||
</Tooltip>
|
||||
</li>
|
||||
@ -85,6 +86,8 @@ export default {
|
||||
noDataText: "数据加载中.....",
|
||||
|
||||
keys: {},
|
||||
keyIs: false,
|
||||
|
||||
reportTypeList: [
|
||||
{value: "", label: this.$L('全部')},
|
||||
{value: "weekly", label: this.$L('周报')},
|
||||
@ -98,6 +101,14 @@ export default {
|
||||
computed: {
|
||||
...mapState(['windowMax768'])
|
||||
},
|
||||
watch: {
|
||||
keyIs(v) {
|
||||
if (!v) {
|
||||
this.keys = {}
|
||||
this.setPage(1)
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
initLanguage() {
|
||||
this.columns = [{
|
||||
@ -161,6 +172,7 @@ export default {
|
||||
|
||||
getLists() {
|
||||
this.loadIng++;
|
||||
this.keyIs = $A.objImplode(this.keys) != "";
|
||||
this.$store.dispatch("call", {
|
||||
url: 'report/my',
|
||||
data: {
|
||||
|
||||
@ -42,7 +42,8 @@
|
||||
transfer>
|
||||
<Button :loading="loadIng > 0" type="primary" icon="ios-search" @click="onSearch">{{$L('搜索')}}</Button>
|
||||
<div slot="content">
|
||||
<Button :loading="loadIng > 0" type="text" @click="getLists">{{$L('刷新')}}</Button>
|
||||
<Button v-if="keyIs" type="text" @click="keyIs=false">{{$L('取消筛选')}}</Button>
|
||||
<Button v-else :loading="loadIng > 0" type="text" @click="getLists">{{$L('刷新')}}</Button>
|
||||
</div>
|
||||
</Tooltip>
|
||||
</li>
|
||||
@ -88,6 +89,8 @@ export default {
|
||||
noDataText: "数据加载中.....",
|
||||
|
||||
keys: {},
|
||||
keyIs: false,
|
||||
|
||||
reportTypeList: [
|
||||
{value: "", label: this.$L('全部')},
|
||||
{value: "weekly", label: this.$L('周报')},
|
||||
@ -101,6 +104,14 @@ export default {
|
||||
computed: {
|
||||
...mapState(['userId', 'windowMax768'])
|
||||
},
|
||||
watch: {
|
||||
keyIs(v) {
|
||||
if (!v) {
|
||||
this.keys = {}
|
||||
this.setPage(1)
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
initLanguage() {
|
||||
this.columns = [{
|
||||
@ -180,6 +191,7 @@ export default {
|
||||
|
||||
getLists() {
|
||||
this.loadIng++;
|
||||
this.keyIs = $A.objImplode(this.keys) != "";
|
||||
this.$store.dispatch("call", {
|
||||
url: 'report/receive',
|
||||
data: {
|
||||
|
||||
@ -24,7 +24,8 @@
|
||||
transfer>
|
||||
<Button :loading="loadIng > 0" type="primary" icon="ios-search" @click="onSearch">{{$L('搜索')}}</Button>
|
||||
<div slot="content">
|
||||
<Button :loading="loadIng > 0" type="text" @click="getLists">{{$L('刷新')}}</Button>
|
||||
<Button v-if="keyIs" type="text" @click="keyIs=false">{{$L('取消筛选')}}</Button>
|
||||
<Button v-else :loading="loadIng > 0" type="text" @click="getLists">{{$L('刷新')}}</Button>
|
||||
</div>
|
||||
</Tooltip>
|
||||
</li>
|
||||
@ -69,6 +70,7 @@ export default {
|
||||
loadIng: 0,
|
||||
|
||||
keys: {},
|
||||
keyIs: false,
|
||||
|
||||
columns: [],
|
||||
list: [],
|
||||
@ -91,6 +93,12 @@ export default {
|
||||
this.getLists();
|
||||
},
|
||||
immediate: true
|
||||
},
|
||||
keyIs(v) {
|
||||
if (!v) {
|
||||
this.keys = {}
|
||||
this.setPage(1)
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
@ -233,11 +241,6 @@ export default {
|
||||
]
|
||||
},
|
||||
|
||||
refresh() {
|
||||
this.keys = {};
|
||||
this.getLists()
|
||||
},
|
||||
|
||||
onSearch() {
|
||||
this.page = 1;
|
||||
this.getLists();
|
||||
@ -248,6 +251,7 @@ export default {
|
||||
return;
|
||||
}
|
||||
this.loadIng++;
|
||||
this.keyIs = $A.objImplode(this.keys) != "";
|
||||
this.$store.dispatch("call", {
|
||||
url: 'project/task/lists',
|
||||
data: {
|
||||
|
||||
@ -24,7 +24,8 @@
|
||||
transfer>
|
||||
<Button :loading="loadIng > 0" type="primary" icon="ios-search" @click="onSearch">{{$L('搜索')}}</Button>
|
||||
<div slot="content">
|
||||
<Button :loading="loadIng > 0" type="text" @click="getLists">{{$L('刷新')}}</Button>
|
||||
<Button v-if="keyIs" type="text" @click="keyIs=false">{{$L('取消筛选')}}</Button>
|
||||
<Button v-else :loading="loadIng > 0" type="text" @click="getLists">{{$L('刷新')}}</Button>
|
||||
</div>
|
||||
</Tooltip>
|
||||
</li>
|
||||
@ -69,6 +70,7 @@ export default {
|
||||
loadIng: 0,
|
||||
|
||||
keys: {},
|
||||
keyIs: false,
|
||||
|
||||
columns: [],
|
||||
list: [],
|
||||
@ -91,6 +93,12 @@ export default {
|
||||
this.getLists();
|
||||
},
|
||||
immediate: true
|
||||
},
|
||||
keyIs(v) {
|
||||
if (!v) {
|
||||
this.keys = {}
|
||||
this.setPage(1)
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
@ -181,11 +189,6 @@ export default {
|
||||
]
|
||||
},
|
||||
|
||||
refresh() {
|
||||
this.keys = {};
|
||||
this.getLists()
|
||||
},
|
||||
|
||||
onSearch() {
|
||||
this.page = 1;
|
||||
this.getLists();
|
||||
@ -196,6 +199,7 @@ export default {
|
||||
return;
|
||||
}
|
||||
this.loadIng++;
|
||||
this.keyIs = $A.objImplode(this.keys) != "";
|
||||
this.$store.dispatch("call", {
|
||||
url: 'project/task/lists',
|
||||
data: {
|
||||
|
||||
@ -50,7 +50,8 @@
|
||||
transfer>
|
||||
<Button :loading="loadIng > 0" type="primary" icon="ios-search" @click="onSearch">{{$L('搜索')}}</Button>
|
||||
<div slot="content">
|
||||
<Button :loading="loadIng > 0" type="text" @click="getLists">{{$L('刷新')}}</Button>
|
||||
<Button v-if="keyIs" type="text" @click="keyIs=false">{{$L('取消筛选')}}</Button>
|
||||
<Button v-else :loading="loadIng > 0" type="text" @click="getLists">{{$L('刷新')}}</Button>
|
||||
</div>
|
||||
</Tooltip>
|
||||
</li>
|
||||
@ -91,6 +92,7 @@ export default {
|
||||
keys: {
|
||||
identity: 'nodisable'
|
||||
},
|
||||
keyIs: false,
|
||||
|
||||
columns: [],
|
||||
list: [],
|
||||
@ -107,6 +109,14 @@ export default {
|
||||
computed: {
|
||||
...mapState(['windowMax768'])
|
||||
},
|
||||
watch: {
|
||||
keyIs(v) {
|
||||
if (!v) {
|
||||
this.keys = {}
|
||||
this.setPage(1)
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
initLanguage() {
|
||||
this.columns = [
|
||||
@ -288,12 +298,15 @@ export default {
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
onSearch() {
|
||||
this.page = 1;
|
||||
this.getLists();
|
||||
},
|
||||
|
||||
getLists() {
|
||||
this.loadIng++;
|
||||
this.keyIs = $A.objImplode(this.keys) != "";
|
||||
this.$store.dispatch("call", {
|
||||
url: 'users/lists',
|
||||
data: {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user