默认状态,搜索优化
This commit is contained in:
parent
e8162bdb79
commit
75f491617f
|
|
@ -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: {
|
||||||
|
|
|
||||||
|
|
@ -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()
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -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: {
|
||||||
|
|
|
||||||
|
|
@ -294,6 +294,10 @@
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
|
// 设置默认状态为第一个选项(未完成)
|
||||||
|
if (this.taskStatusList.length > 0) {
|
||||||
|
this.queryParams.isFinish = this.taskStatusList[0].id
|
||||||
|
}
|
||||||
this.getList()
|
this.getList()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|
|
||||||
|
|
@ -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()
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -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: {
|
||||||
|
|
|
||||||
|
|
@ -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: {
|
||||||
|
|
|
||||||
|
|
@ -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_status的所有选项,并过滤出有效的选项(值为0、1、2、4)
|
||||||
|
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')
|
||||||
|
|
|
||||||
|
|
@ -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: {
|
||||||
|
|
|
||||||
|
|
@ -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_status的所有选项,并过滤出有效的选项(值为10、11、12)
|
||||||
|
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')
|
||||||
|
|
|
||||||
|
|
@ -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')
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue