v1.2.1版本,优化调整了很多,整改验收阶段新加字段
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
const common_vendor = require("../../common/vendor.js");
|
||||
const request_three_one_api_license = require("../../request/three_one_api/license.js");
|
||||
const request_request = require("../../request/request.js");
|
||||
const utils_upload = require("../../utils/upload.js");
|
||||
if (!Array) {
|
||||
const _easycom_u_popup2 = common_vendor.resolveComponent("u-popup");
|
||||
const _easycom_u_datetime_picker2 = common_vendor.resolveComponent("u-datetime-picker");
|
||||
@@ -62,7 +63,7 @@ const _sfc_main = {
|
||||
licenseList.value = res.data.records || [];
|
||||
}
|
||||
} catch (err) {
|
||||
common_vendor.index.__f__("error", "at pages/Idphotomanagement/Idphotomanagement.vue:249", "获取证照列表失败:", err);
|
||||
common_vendor.index.__f__("error", "at pages/Idphotomanagement/Idphotomanagement.vue:250", "获取证照列表失败:", err);
|
||||
}
|
||||
};
|
||||
const loadDeptList = async () => {
|
||||
@@ -72,7 +73,7 @@ const _sfc_main = {
|
||||
deptList.value = res.data || [];
|
||||
}
|
||||
} catch (err) {
|
||||
common_vendor.index.__f__("error", "at pages/Idphotomanagement/Idphotomanagement.vue:261", "获取部门列表失败:", err);
|
||||
common_vendor.index.__f__("error", "at pages/Idphotomanagement/Idphotomanagement.vue:262", "获取部门列表失败:", err);
|
||||
}
|
||||
};
|
||||
const openAddPopup = () => {
|
||||
@@ -102,7 +103,7 @@ const _sfc_main = {
|
||||
showAddPopup.value = true;
|
||||
}
|
||||
} catch (err) {
|
||||
common_vendor.index.__f__("error", "at pages/Idphotomanagement/Idphotomanagement.vue:301", "获取证照详情失败:", err);
|
||||
common_vendor.index.__f__("error", "at pages/Idphotomanagement/Idphotomanagement.vue:302", "获取证照详情失败:", err);
|
||||
common_vendor.index.showToast({ title: "获取详情失败", icon: "none" });
|
||||
}
|
||||
};
|
||||
@@ -120,7 +121,7 @@ const _sfc_main = {
|
||||
loadLicenseList();
|
||||
}
|
||||
} catch (err) {
|
||||
common_vendor.index.__f__("error", "at pages/Idphotomanagement/Idphotomanagement.vue:323", "删除失败:", err);
|
||||
common_vendor.index.__f__("error", "at pages/Idphotomanagement/Idphotomanagement.vue:324", "删除失败:", err);
|
||||
common_vendor.index.showToast({ title: "删除失败", icon: "none" });
|
||||
} finally {
|
||||
showDeleteModal.value = false;
|
||||
@@ -173,13 +174,13 @@ const _sfc_main = {
|
||||
const onDateConfirm = (e) => {
|
||||
const timestamp = datePickerValue.value;
|
||||
if (!timestamp || isNaN(timestamp)) {
|
||||
common_vendor.index.__f__("error", "at pages/Idphotomanagement/Idphotomanagement.vue:396", "无效的日期值:", timestamp);
|
||||
common_vendor.index.__f__("error", "at pages/Idphotomanagement/Idphotomanagement.vue:397", "无效的日期值:", timestamp);
|
||||
showDatePicker.value = false;
|
||||
return;
|
||||
}
|
||||
const date = new Date(timestamp);
|
||||
if (isNaN(date.getTime())) {
|
||||
common_vendor.index.__f__("error", "at pages/Idphotomanagement/Idphotomanagement.vue:405", "无效的日期:", date);
|
||||
common_vendor.index.__f__("error", "at pages/Idphotomanagement/Idphotomanagement.vue:406", "无效的日期:", date);
|
||||
showDatePicker.value = false;
|
||||
return;
|
||||
}
|
||||
@@ -206,39 +207,21 @@ const _sfc_main = {
|
||||
}
|
||||
});
|
||||
};
|
||||
const uploadImage = (filePath) => {
|
||||
common_vendor.index.showLoading({ title: "上传中..." });
|
||||
common_vendor.index.uploadFile({
|
||||
url: request_request.baseUrl + "/frontend/attachment/upload",
|
||||
filePath,
|
||||
name: "file",
|
||||
header: {
|
||||
"Authorization": request_request.getToken()
|
||||
},
|
||||
success: (uploadRes) => {
|
||||
common_vendor.index.hideLoading();
|
||||
try {
|
||||
const data = JSON.parse(uploadRes.data);
|
||||
if (data.code === 0 && data.data) {
|
||||
formData.photo = data.data.url || data.data;
|
||||
common_vendor.index.showToast({ title: "上传成功", icon: "success" });
|
||||
} else {
|
||||
common_vendor.index.showToast({ title: data.msg || "上传失败", icon: "none" });
|
||||
formData.photoPreview = "";
|
||||
}
|
||||
} catch (e) {
|
||||
common_vendor.index.__f__("error", "at pages/Idphotomanagement/Idphotomanagement.vue:461", "解析上传结果失败:", e);
|
||||
common_vendor.index.showToast({ title: "上传失败", icon: "none" });
|
||||
formData.photoPreview = "";
|
||||
}
|
||||
},
|
||||
fail: (err) => {
|
||||
common_vendor.index.hideLoading();
|
||||
common_vendor.index.__f__("error", "at pages/Idphotomanagement/Idphotomanagement.vue:468", "上传失败:", err);
|
||||
common_vendor.index.showToast({ title: "上传失败", icon: "none" });
|
||||
formData.photoPreview = "";
|
||||
}
|
||||
});
|
||||
const uploadImage = async (filePath) => {
|
||||
try {
|
||||
const { url } = await utils_upload.uploadSingleWithLoading(filePath);
|
||||
formData.photo = url;
|
||||
formData.photoPreview = url;
|
||||
common_vendor.index.showToast({ title: "上传成功", icon: "success" });
|
||||
} catch (e) {
|
||||
common_vendor.index.__f__("error", "at pages/Idphotomanagement/Idphotomanagement.vue:447", "上传失败:", e);
|
||||
formData.photo = "";
|
||||
formData.photoPreview = "";
|
||||
common_vendor.index.showToast({
|
||||
title: (e == null ? void 0 : e.msg) || (e == null ? void 0 : e.message) || "上传失败",
|
||||
icon: "none"
|
||||
});
|
||||
}
|
||||
};
|
||||
const removeImage = () => {
|
||||
formData.photo = "";
|
||||
@@ -276,7 +259,7 @@ const _sfc_main = {
|
||||
loadLicenseList();
|
||||
}
|
||||
} catch (err) {
|
||||
common_vendor.index.__f__("error", "at pages/Idphotomanagement/Idphotomanagement.vue:521", "提交失败:", err);
|
||||
common_vendor.index.__f__("error", "at pages/Idphotomanagement/Idphotomanagement.vue:503", "提交失败:", err);
|
||||
common_vendor.index.showToast({ title: "操作失败", icon: "none" });
|
||||
} finally {
|
||||
submitting.value = false;
|
||||
|
||||
Reference in New Issue
Block a user