1.18整合
This commit is contained in:
@@ -5,20 +5,18 @@ const request_request = require("../../request/request.js");
|
||||
if (!Array) {
|
||||
const _easycom_up_textarea2 = common_vendor.resolveComponent("up-textarea");
|
||||
const _easycom_up_input2 = common_vendor.resolveComponent("up-input");
|
||||
const _easycom_up_calendar2 = common_vendor.resolveComponent("up-calendar");
|
||||
const _easycom_up_radio2 = common_vendor.resolveComponent("up-radio");
|
||||
const _easycom_up_radio_group2 = common_vendor.resolveComponent("up-radio-group");
|
||||
const _easycom_up_datetime_picker2 = common_vendor.resolveComponent("up-datetime-picker");
|
||||
const _easycom_up_select2 = common_vendor.resolveComponent("up-select");
|
||||
const _easycom_up_upload2 = common_vendor.resolveComponent("up-upload");
|
||||
(_easycom_up_textarea2 + _easycom_up_input2 + _easycom_up_calendar2 + _easycom_up_radio2 + _easycom_up_radio_group2 + _easycom_up_upload2)();
|
||||
(_easycom_up_textarea2 + _easycom_up_input2 + _easycom_up_datetime_picker2 + _easycom_up_select2 + _easycom_up_upload2)();
|
||||
}
|
||||
const _easycom_up_textarea = () => "../../uni_modules/uview-plus/components/u-textarea/u-textarea.js";
|
||||
const _easycom_up_input = () => "../../uni_modules/uview-plus/components/u-input/u-input.js";
|
||||
const _easycom_up_calendar = () => "../../uni_modules/uview-plus/components/u-calendar/u-calendar.js";
|
||||
const _easycom_up_radio = () => "../../uni_modules/uview-plus/components/u-radio/u-radio.js";
|
||||
const _easycom_up_radio_group = () => "../../uni_modules/uview-plus/components/u-radio-group/u-radio-group.js";
|
||||
const _easycom_up_datetime_picker = () => "../../uni_modules/uview-plus/components/u-datetime-picker/u-datetime-picker.js";
|
||||
const _easycom_up_select = () => "../../uni_modules/uview-plus/components/u-select/u-select.js";
|
||||
const _easycom_up_upload = () => "../../uni_modules/uview-plus/components/u-upload/u-upload.js";
|
||||
if (!Math) {
|
||||
(_easycom_up_textarea + _easycom_up_input + _easycom_up_calendar + _easycom_up_radio + _easycom_up_radio_group + _easycom_up_upload)();
|
||||
(_easycom_up_textarea + _easycom_up_input + _easycom_up_datetime_picker + _easycom_up_select + _easycom_up_upload)();
|
||||
}
|
||||
const _sfc_main = {
|
||||
__name: "rectification",
|
||||
@@ -36,27 +34,34 @@ const _sfc_main = {
|
||||
// 投资资金(实际)
|
||||
});
|
||||
const show = common_vendor.ref(false);
|
||||
const mode = common_vendor.ref("single");
|
||||
const value1 = common_vendor.ref(Date.now());
|
||||
const selectedDate = common_vendor.ref("");
|
||||
const radiovalue1 = common_vendor.ref("");
|
||||
const radiolist1 = common_vendor.reactive([
|
||||
{
|
||||
name: "孙致远",
|
||||
disabled: false
|
||||
},
|
||||
{
|
||||
name: "符友成",
|
||||
disabled: false
|
||||
},
|
||||
{
|
||||
name: "向彪",
|
||||
disabled: false
|
||||
},
|
||||
{
|
||||
name: "向纪荣",
|
||||
disabled: false
|
||||
common_vendor.ref("");
|
||||
const cateId = common_vendor.ref("");
|
||||
const cateList = common_vendor.ref([]);
|
||||
const fetchDeptUsers = async () => {
|
||||
try {
|
||||
const res = await request_api.getDepartmentPersonUsers();
|
||||
if (res.code === 0 && res.data) {
|
||||
const userList = [];
|
||||
res.data.forEach((dept) => {
|
||||
if (dept.users && dept.users.length > 0) {
|
||||
dept.users.forEach((user) => {
|
||||
userList.push({
|
||||
id: String(user.userId),
|
||||
name: `${user.nickName}(${dept.deptName})`
|
||||
});
|
||||
});
|
||||
}
|
||||
});
|
||||
cateList.value = userList;
|
||||
console.log("整改人员列表:", cateList.value);
|
||||
}
|
||||
} catch (error) {
|
||||
console.error("获取部门人员失败:", error);
|
||||
}
|
||||
]);
|
||||
};
|
||||
fetchDeptUsers();
|
||||
const fileList1 = common_vendor.ref([]);
|
||||
const deletePic = (event) => {
|
||||
fileList1.value.splice(event.index, 1);
|
||||
@@ -83,10 +88,6 @@ const _sfc_main = {
|
||||
fileListLen++;
|
||||
}
|
||||
};
|
||||
const confirmDate = (e) => {
|
||||
selectedDate.value = e[0];
|
||||
show.value = false;
|
||||
};
|
||||
const uploadFilePromise = (filePath) => {
|
||||
return new Promise((resolve, reject) => {
|
||||
common_vendor.index.uploadFile({
|
||||
@@ -94,7 +95,7 @@ const _sfc_main = {
|
||||
filePath,
|
||||
name: "file",
|
||||
header: {
|
||||
"Authorization": request_request.AUTH_TOKEN
|
||||
"Authorization": request_request.getToken()
|
||||
},
|
||||
success: (res) => {
|
||||
const data = JSON.parse(res.data);
|
||||
@@ -113,11 +114,17 @@ const _sfc_main = {
|
||||
};
|
||||
const handleSubmit = async () => {
|
||||
if (!formData.rectifyPlan) {
|
||||
common_vendor.index.showToast({ title: "请输入整改方案", icon: "none" });
|
||||
common_vendor.index.showToast({
|
||||
title: "请输入整改方案",
|
||||
icon: "none"
|
||||
});
|
||||
return;
|
||||
}
|
||||
if (!formData.rectifyResult) {
|
||||
common_vendor.index.showToast({ title: "请输入整改完成情况", icon: "none" });
|
||||
common_vendor.index.showToast({
|
||||
title: "请输入整改完成情况",
|
||||
icon: "none"
|
||||
});
|
||||
return;
|
||||
}
|
||||
const attachments = fileList1.value.map((file) => {
|
||||
@@ -147,16 +154,25 @@ const _sfc_main = {
|
||||
try {
|
||||
const res = await request_api.submitRectification(params);
|
||||
if (res.code === 0) {
|
||||
common_vendor.index.showToast({ title: "提交成功", icon: "success" });
|
||||
common_vendor.index.showToast({
|
||||
title: "提交成功",
|
||||
icon: "success"
|
||||
});
|
||||
setTimeout(() => {
|
||||
common_vendor.index.navigateBack();
|
||||
}, 1500);
|
||||
} else {
|
||||
common_vendor.index.showToast({ title: res.msg || "提交失败", icon: "none" });
|
||||
common_vendor.index.showToast({
|
||||
title: res.msg || "提交失败",
|
||||
icon: "none"
|
||||
});
|
||||
}
|
||||
} catch (error) {
|
||||
console.error("提交整改失败:", error);
|
||||
common_vendor.index.showToast({ title: "请求失败", icon: "none" });
|
||||
common_vendor.index.showToast({
|
||||
title: "请求失败",
|
||||
icon: "none"
|
||||
});
|
||||
}
|
||||
};
|
||||
common_vendor.onLoad((options) => {
|
||||
@@ -167,6 +183,10 @@ const _sfc_main = {
|
||||
assignId.value = options.assignId;
|
||||
}
|
||||
});
|
||||
const selectItem = (item) => {
|
||||
console.log("选择的整改人员:", item);
|
||||
cateId.value = item.id;
|
||||
};
|
||||
return (_ctx, _cache) => {
|
||||
return {
|
||||
a: common_vendor.o(($event) => formData.rectifyPlan = $event),
|
||||
@@ -194,42 +214,29 @@ const _sfc_main = {
|
||||
i: common_vendor.t(selectedDate.value || "请选择日期"),
|
||||
j: common_vendor.n(selectedDate.value ? "" : "text-gray"),
|
||||
k: common_vendor.o(($event) => show.value = true),
|
||||
l: common_vendor.o(confirmDate),
|
||||
m: common_vendor.o(($event) => show.value = false),
|
||||
n: common_vendor.p({
|
||||
l: common_vendor.o(($event) => value1.value = $event),
|
||||
m: common_vendor.p({
|
||||
hasInput: true,
|
||||
show: show.value,
|
||||
mode: mode.value
|
||||
mode: "date",
|
||||
modelValue: value1.value
|
||||
}),
|
||||
o: common_vendor.f(radiolist1, (item, index, i0) => {
|
||||
return {
|
||||
a: index,
|
||||
b: common_vendor.o(_ctx.radioChange, index),
|
||||
c: "f18ba0ce-6-" + i0 + ",f18ba0ce-5",
|
||||
d: common_vendor.p({
|
||||
shape: "square",
|
||||
customStyle: {
|
||||
marginBottom: "8px"
|
||||
},
|
||||
label: item.name,
|
||||
name: item.name
|
||||
})
|
||||
};
|
||||
n: common_vendor.o(selectItem),
|
||||
o: common_vendor.o(($event) => cateId.value = $event),
|
||||
p: common_vendor.p({
|
||||
label: "整改人员",
|
||||
options: cateList.value,
|
||||
current: cateId.value
|
||||
}),
|
||||
p: common_vendor.o(_ctx.groupChange),
|
||||
q: common_vendor.o(($event) => radiovalue1.value = $event),
|
||||
r: common_vendor.p({
|
||||
placement: "column",
|
||||
modelValue: radiovalue1.value
|
||||
}),
|
||||
s: common_vendor.o(afterRead),
|
||||
t: common_vendor.o(deletePic),
|
||||
v: common_vendor.p({
|
||||
q: common_vendor.o(afterRead),
|
||||
r: common_vendor.o(deletePic),
|
||||
s: common_vendor.p({
|
||||
fileList: fileList1.value,
|
||||
name: "1",
|
||||
multiple: true,
|
||||
maxCount: 10
|
||||
}),
|
||||
w: common_vendor.o(handleSubmit)
|
||||
t: common_vendor.o(handleSubmit)
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user