20251128API:selectAllWithTableName/selectAll/selectTaskHasCreated提前缓存
This commit is contained in:
@@ -792,25 +792,12 @@ export default {
|
||||
// },
|
||||
init() {
|
||||
let that = this;
|
||||
// 请求任务列表
|
||||
that.tasksData = [];
|
||||
that.srcTaskOptions = [];
|
||||
that.destTaskOptions = [];
|
||||
request({
|
||||
url: "/task/selectTaskHasCreated",
|
||||
method: "get",
|
||||
}).then(function (response) {
|
||||
if (response.data.success == true) {
|
||||
var jsondata = JSON.parse(response.data.data);
|
||||
that.tasksData = jsondata.data;
|
||||
that.filteredData = [...that.tasksData]; // 初始化过滤数据
|
||||
that.srcTaskOptions = jsondata.data;
|
||||
that.destTaskOptions = jsondata.data;
|
||||
} else if (response.data.status == "401") {
|
||||
that.$alert(response.data.message);
|
||||
that.$router.push({ path: "/login" });
|
||||
}
|
||||
});
|
||||
// 从 store 获取数据
|
||||
const taskData = that.$store.state.taskData.selectTaskHasCreated || [];
|
||||
that.tasksData = taskData;
|
||||
that.filteredData = [...that.tasksData]; // 初始化过滤数据
|
||||
that.srcTaskOptions = taskData;
|
||||
that.destTaskOptions = taskData;
|
||||
},
|
||||
beforeTpkUpload(file) {
|
||||
if (file.type != "tpk") {
|
||||
|
||||
Reference in New Issue
Block a user