默认状态,搜索优化

This commit is contained in:
syruan 2025-07-28 15:54:16 +08:00
parent e8162bdb79
commit 75f491617f
11 changed files with 84 additions and 3 deletions

View File

@ -144,6 +144,10 @@ export default {
}, },
created() { created() {
this.userId = sessionStorage.getItem('userId') this.userId = sessionStorage.getItem('userId')
//
if (this.statusOptions.length > 0) {
this.queryParams.status = this.statusOptions[0].value
}
this.getList() this.getList()
}, },
methods: { methods: {

View File

@ -188,6 +188,13 @@ export default {
} }
} else { } else {
this.userId = sessionStorage.getItem('userId') this.userId = sessionStorage.getItem('userId')
//
if (this.statusOptions.length > 0) {
this.queryParams.taskStatus = this.statusOptions[0].value
}
// if (this.statusOptions.length > 1) {
// this.queryParams.taskStatus = this.statusOptions[1].value
// }
this.getList() this.getList()
} }
}, },

View File

@ -464,6 +464,8 @@ export default {
}, },
created() { created() {
this.userId = sessionStorage.getItem('userId') this.userId = sessionStorage.getItem('userId')
//
this.queryParams.status = '0'
this.getList() this.getList()
}, },
computed: { computed: {

View File

@ -294,6 +294,10 @@
}; };
}, },
created() { created() {
//
if (this.taskStatusList.length > 0) {
this.queryParams.isFinish = this.taskStatusList[0].id
}
this.getList() this.getList()
}, },
methods: { methods: {

View File

@ -477,6 +477,10 @@ export default {
}; };
}, },
created() { created() {
//
if (this.taskStatusList.length > 0) {
this.queryParams.isFinish = this.taskStatusList[0].id
}
this.getList(); this.getList();
// this.getTypeList() // this.getTypeList()
}, },

View File

@ -228,6 +228,10 @@ export default {
} }
}, },
created() { created() {
//
if (this.taskStatusList.length > 0) {
this.queryParams.isFinish = this.taskStatusList[0].id
}
this.getList() this.getList()
}, },
methods: { methods: {

View File

@ -269,6 +269,10 @@ export default {
if (this.$route.query.buyTask) { if (this.$route.query.buyTask) {
this.queryParams.keyWord = this.$route.query.buyTask this.queryParams.keyWord = this.$route.query.buyTask
} }
//
if (this.taskStatusList.length > 0) {
this.queryParams.isFinish = this.taskStatusList[0].id
}
this.getList() this.getList()
}, },
methods: { methods: {

View File

@ -365,12 +365,31 @@ export default {
let start = new Date() let start = new Date()
start.setMonth(start.getMonth() - 1) start.setMonth(start.getMonth() - 1)
this.queryParams.time = [this.format(start), this.format(end)] this.queryParams.time = [this.format(start), this.format(end)]
this.getList(); // getList
// this.initSelectData() // this.initSelectData()
// this.InitIGetInfo() // this.InitIGetInfo()
}, },
components: { vueEasyPrint }, components: { vueEasyPrint },
methods: { methods: {
//
onDictReady(dict) {
// repair_task_status0124
const allOptions = dict.type.repair_task_status || []
const validOptions = allOptions.filter(item =>
item.value == 0 || item.value == 1 || item.value == 2 || item.value == 4
)
//
if (validOptions.length > 0) {
this.queryParams.repairStatus = validOptions[0].value
}
if (validOptions.length > 1) {
this.queryParams.repairStatus = validOptions[1].value
}
//
this.getList()
},
format(date) { format(date) {
const y = date.getFullYear() const y = date.getFullYear()
const m = String(date.getMonth() + 1).padStart(2, '0') const m = String(date.getMonth() + 1).padStart(2, '0')

View File

@ -127,6 +127,10 @@ export default {
}; };
}, },
created() { created() {
//
if (this.statusList.length > 0) {
this.queryParams.taskStatus = this.statusList[0].value
}
this.getList(); this.getList();
}, },
methods: { methods: {

View File

@ -299,9 +299,25 @@ export default {
let start = new Date() let start = new Date()
start.setMonth(start.getMonth() - 1) start.setMonth(start.getMonth() - 1)
this.queryParams.time = [this.format(start), this.format(end)] this.queryParams.time = [this.format(start), this.format(end)]
this.getList(); // getList
}, },
methods: { methods: {
//
onDictReady(dict) {
// repair_task_status101112
const allOptions = dict.type.repair_task_status || []
const validOptions = allOptions.filter(item =>
item.value == 10 || item.value == 11 || item.value == 12
)
//
if (validOptions.length > 0) {
this.queryParams.taskStatus = validOptions[0].value
}
//
this.getList()
},
format(date) { format(date) {
const y = date.getFullYear() const y = date.getFullYear()
const m = String(date.getMonth() + 1).padStart(2, '0') const m = String(date.getMonth() + 1).padStart(2, '0')

View File

@ -208,10 +208,23 @@ export default {
if(this.$route.query.code){ if(this.$route.query.code){
this.queryParams.keyWord=this.$route.query.code this.queryParams.keyWord=this.$route.query.code
} }
this.getList(); // getList
}, },
components: {}, components: {},
methods: { methods: {
//
onDictReady(dict) {
// repair_end_task_status
const validOptions = dict.type.repair_end_task_status || []
//
if (validOptions.length > 0) {
this.queryParams.taskStatus = validOptions[0].value
}
//
this.getList()
},
format(date) { format(date) {
const y = date.getFullYear() const y = date.getFullYear()
const m = String(date.getMonth() + 1).padStart(2, '0') const m = String(date.getMonth() + 1).padStart(2, '0')