优化调整
This commit is contained in:
@@ -57,9 +57,16 @@ export default {
|
||||
})).then(res => {
|
||||
if (res?.data) {
|
||||
this.summary = res.data.total
|
||||
this.tableData = res.data?.page?.records || []
|
||||
return this.tableData = res.data?.page?.records || []
|
||||
}
|
||||
})
|
||||
},
|
||||
getOptions() {
|
||||
const ops = {}
|
||||
this.tableData.forEach(e => {
|
||||
ops[e.groupCode] = e.supervisorName
|
||||
})
|
||||
return Object.entries(ops).map(([key, value]) => ({label: value, value: key}))
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
@@ -71,9 +78,7 @@ export default {
|
||||
},
|
||||
created() {
|
||||
this.getTableData().then(() => {
|
||||
this.options = this.tableData.map(e => ({
|
||||
label: e.supervisorName, value: e.groupCode
|
||||
}))
|
||||
this.options = this.getOptions()
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user