20251128API:selectAllWithTableName/selectAll/selectTaskHasCreated提前缓存
This commit is contained in:
@@ -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 === '') {
|
||||
|
||||
Reference in New Issue
Block a user