|
|
|
"use strict";
|
|
|
|
const common_vendor = require("../../../common/vendor.js");
|
|
|
|
if (!Array) {
|
|
|
|
const _easycom_u_navbar2 = common_vendor.resolveComponent("u-navbar");
|
|
|
|
const _component_tips = common_vendor.resolveComponent("tips");
|
|
|
|
const _component_tiplist = common_vendor.resolveComponent("tiplist");
|
|
|
|
(_easycom_u_navbar2 + _component_tips + _component_tiplist)();
|
|
|
|
}
|
|
|
|
const _easycom_u_navbar = () => "../../../uni_modules/uview-plus/components/u-navbar/u-navbar.js";
|
|
|
|
if (!Math) {
|
|
|
|
_easycom_u_navbar();
|
|
|
|
}
|
|
|
|
const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
|
|
|
|
__name: "OfflineUpload",
|
|
|
|
setup(__props) {
|
|
|
|
const tiplists = common_vendor.ref(null);
|
|
|
|
const tip = common_vendor.ref(null);
|
|
|
|
let taslarr = common_vendor.ref(null);
|
|
|
|
common_vendor.onShow(() => {
|
|
|
|
console.log("onshow");
|
|
|
|
taslarr.value = common_vendor.index.getStorageSync("HistoryDate");
|
|
|
|
});
|
|
|
|
function edit(index) {
|
|
|
|
common_vendor.index.navigateTo({
|
|
|
|
url: "/pagesHome/pages/createTask/createTask?name=" + taslarr.value[index].name + "&editindex=" + index
|
|
|
|
});
|
|
|
|
}
|
|
|
|
function createTask() {
|
|
|
|
tiplists.value.setdetails({
|
|
|
|
isshow: true,
|
|
|
|
tipstate: 1,
|
|
|
|
title: "请输入创建任务的别名",
|
|
|
|
placeholder: "请输入别名",
|
|
|
|
inputtext: "",
|
|
|
|
success: (detail) => {
|
|
|
|
common_vendor.index.navigateTo({
|
|
|
|
url: "/pagesHome/pages/createTask/createTask?name=" + detail.inputtext
|
|
|
|
});
|
|
|
|
tiplists.value.setdetails({ isshow: false });
|
|
|
|
},
|
|
|
|
cancel: () => {
|
|
|
|
tiplists.value.setdetails({ isshow: false });
|
|
|
|
},
|
|
|
|
close: () => {
|
|
|
|
tiplists.value.setdetails({ isshow: false });
|
|
|
|
}
|
|
|
|
});
|
|
|
|
}
|
|
|
|
function removetask(index) {
|
|
|
|
tip.value.setdetails({
|
|
|
|
content: "确认删除?",
|
|
|
|
isshow: true,
|
|
|
|
confirmTxt: "删除",
|
|
|
|
success: () => {
|
|
|
|
let taskarr = common_vendor.index.getStorageSync("HistoryDate");
|
|
|
|
taskarr.splice(index, 1);
|
|
|
|
common_vendor.index.setStorageSync("HistoryDate", taskarr);
|
|
|
|
taslarr.value = common_vendor.index.getStorageSync("HistoryDate");
|
|
|
|
common_vendor.index.showToast({
|
|
|
|
title: "删除成功",
|
|
|
|
icon: "none"
|
|
|
|
});
|
|
|
|
tip.value.setdetails({ isshow: false });
|
|
|
|
},
|
|
|
|
cancel: () => {
|
|
|
|
tip.value.setdetails({ isshow: false });
|
|
|
|
},
|
|
|
|
close: () => {
|
|
|
|
tip.value.setdetails({ isshow: false });
|
|
|
|
}
|
|
|
|
});
|
|
|
|
}
|
|
|
|
return (_ctx, _cache) => {
|
|
|
|
return {
|
|
|
|
a: common_vendor.p({
|
|
|
|
title: "离线上传",
|
|
|
|
bgColor: "#D3832A",
|
|
|
|
leftIconColor: "#ffffff",
|
|
|
|
titleStyle: "color:#ffffff",
|
|
|
|
placeholder: true,
|
|
|
|
autoBack: true,
|
|
|
|
leftIconSize: "35"
|
|
|
|
}),
|
|
|
|
b: common_vendor.f(common_vendor.unref(taslarr), (item, index, i0) => {
|
|
|
|
return {
|
|
|
|
a: common_vendor.t(item.name),
|
|
|
|
b: common_vendor.o(($event) => edit(index)),
|
|
|
|
c: common_vendor.o(($event) => removetask(index))
|
|
|
|
};
|
|
|
|
}),
|
|
|
|
c: common_vendor.o(createTask),
|
|
|
|
d: common_vendor.sr(tip, "ba2e268c-1", {
|
|
|
|
"k": "tip"
|
|
|
|
}),
|
|
|
|
e: common_vendor.sr(tiplists, "ba2e268c-2", {
|
|
|
|
"k": "tiplists"
|
|
|
|
})
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|
|
|
|
});
|
|
|
|
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__file", "F:/物流/logPm/pagesHome/pages/OfflineUpload/OfflineUpload.vue"]]);
|
|
|
|
wx.createPage(MiniProgramPage);
|