20251128API:selectAllWithTableName/selectAll/selectTaskHasCreated提前缓存

This commit is contained in:
wxlong
2025-11-28 14:46:02 +08:00
parent d3e0678ef0
commit 014e6dc299
17 changed files with 415 additions and 229 deletions

View File

@@ -363,24 +363,14 @@ export default {
getTasks () {
this.taskoptions = []
let that = this
request({
url: '/task/selectTaskHasCreated',
method: 'get'
}).then(function (response) {
if (response.data.success === true) {
var jsondata = JSON.parse(response.data.data)
var options = jsondata.data
for (var i = 0; i < options.length; i++) {
that.taskoptions.push({
value: options[i].id,
label: options[i].taskName
})
}
} else if (response.data.status === '401') {
that.$alert(response.data.message)
that.$router.push({path: '/login'})
}
})
// 从 store 获取数据
const taskData = that.$store.state.taskData.selectTaskHasCreated || []
for (var i = 0; i < taskData.length; i++) {
that.taskoptions.push({
value: taskData[i].id,
label: taskData[i].taskName
})
}
},
getTables () {
if (this.task === '') {