From a11e809c8c35d9292142ffddbeadc04db23d925b Mon Sep 17 00:00:00 2001 From: WenShiJun Date: Wed, 28 Feb 2024 19:30:39 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=89=E5=85=A8=E9=80=9A=E7=9F=A5=E5=8A=9F?= =?UTF-8?q?=E8=83=BD=E4=BC=98=E5=8C=96=20=E6=96=B0=E5=A2=9E=E8=BF=90?= =?UTF-8?q?=E5=8D=95=E7=99=BB=E8=AE=B0=E5=88=97=E8=A1=A8=E9=A1=B5=EF=BC=8C?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E9=A1=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- node_modules/vue-esign/src/index.vue | 2 +- src/request/waybill_registration.js | 0 .../customer_management/add.vue | 0 .../customer_management/index.vue | 177 ++++++++++++++++++ .../waybill_registration/add.vue | 0 .../waybill_registration/index.vue | 177 ++++++++++++++++++ .../security_notice/add.vue | 136 ++++++++++---- .../things_check/add.vue | 0 .../things_check/index.vue | 0 9 files changed, 450 insertions(+), 42 deletions(-) create mode 100644 src/request/waybill_registration.js create mode 100644 src/views/electronic_waybill_management/customer_management/add.vue create mode 100644 src/views/electronic_waybill_management/customer_management/index.vue create mode 100644 src/views/electronic_waybill_management/waybill_registration/add.vue create mode 100644 src/views/electronic_waybill_management/waybill_registration/index.vue create mode 100644 src/views/safety_production_related/things_check/add.vue create mode 100644 src/views/safety_production_related/things_check/index.vue diff --git a/node_modules/vue-esign/src/index.vue b/node_modules/vue-esign/src/index.vue index b44b00c..b6d2596 100644 --- a/node_modules/vue-esign/src/index.vue +++ b/node_modules/vue-esign/src/index.vue @@ -24,7 +24,7 @@ export default { }, bgColor: { type: String, - default: '#FFFFFF' + default: '' }, isCrop: { type: Boolean, diff --git a/src/request/waybill_registration.js b/src/request/waybill_registration.js new file mode 100644 index 0000000..e69de29 diff --git a/src/views/electronic_waybill_management/customer_management/add.vue b/src/views/electronic_waybill_management/customer_management/add.vue new file mode 100644 index 0000000..e69de29 diff --git a/src/views/electronic_waybill_management/customer_management/index.vue b/src/views/electronic_waybill_management/customer_management/index.vue new file mode 100644 index 0000000..03b2890 --- /dev/null +++ b/src/views/electronic_waybill_management/customer_management/index.vue @@ -0,0 +1,177 @@ + + + + + diff --git a/src/views/electronic_waybill_management/waybill_registration/add.vue b/src/views/electronic_waybill_management/waybill_registration/add.vue new file mode 100644 index 0000000..e69de29 diff --git a/src/views/electronic_waybill_management/waybill_registration/index.vue b/src/views/electronic_waybill_management/waybill_registration/index.vue new file mode 100644 index 0000000..03b2890 --- /dev/null +++ b/src/views/electronic_waybill_management/waybill_registration/index.vue @@ -0,0 +1,177 @@ + + + + + diff --git a/src/views/safety_production_related/security_notice/add.vue b/src/views/safety_production_related/security_notice/add.vue index 2b0b69f..03bee51 100644 --- a/src/views/safety_production_related/security_notice/add.vue +++ b/src/views/safety_production_related/security_notice/add.vue @@ -13,6 +13,21 @@ + + + + + + + @@ -42,32 +57,41 @@ 选择 - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + { const resData = await getUserListAll({}); data.unitsList = resData.varList; @@ -126,11 +153,14 @@ JSON.parse(relatedClassificationTempList.value.zTreeNodes).forEach((e) => { const data = reactive({ form: { TITLE: "", + TRANSPORTATIONCOMPANY: "", LEVEL: "", PERSON: "", fileList: [], + videoList: [], NOTIFICATIONCONTENT: "", allStatus: 0, // 是否全选 + REPLYSTATUS: "", }, }); @@ -139,27 +169,51 @@ const fnSubmit = async () => { const formData = new FormData(); Object.keys(data.form).forEach((key) => { - formData.append(key, data.form[key]); + if (key !== "fileList" && key !== "videoList" && key !== "PERSON") { + formData.append(key, data.form[key]); + } + }); + formData.append("PERSON_ID", data.form.PERSON_ID); + data.form.fileList.forEach((file) => { + if (file.raw) { + formData.append("fileList", file.raw); + } }); - formData.delete("fileList"); + data.form.videoList.forEach((file) => { + if (file.raw) { + formData.append("videoList", file.raw); + } + }); - for (let i = 0; i < data.form.fileList.length; i++) { - if (data.form.fileList[i].raw) - formData.append("FFILE", data.form.fileList[i].raw); + try { + await addSecurityNotice(formData); + ElMessage({ + message: "添加成功", + type: "success", + duration: 3000, + }); + // 清空表单 + Object.keys(data.form).forEach((key) => { + if (Array.isArray(data.form[key])) { + data.form[key] = []; // 如果是数组,重置为空数组 + } else { + data.form[key] = ""; // 否则重置为空字符串 + } + }); + } catch (error) { + ElMessage.error("添加失败"); + console.error(error); } - - await addSecurityNotice(formData); }; -const fnSelectRiskSubmit = (list) => { - console.log(list); - const nameList = list.map((val) => { - return val.USERNAME; - }); - data.form.PERSON = nameList.join(","); - data.form.allStatus = 0; - console.log(data.PERSON, 19); - console.log("是否全选", data.form.allStatus); + +const fnSelectRiskSubmit = (selectionData) => { + // const names = list.map((item) => item.NAME).join(", "); + // const userIds = list.map((item) => item.USER_ID).join(", "); + const userIds = selectionData.map((item) => item.USER_ID).join(", "); + const names = selectionData.map((item) => item.NAME).join(", "); + data.form.PERSON_ID = userIds; + data.form.PERSON = names; }; const fnSelectAllRiskSubmit = () => { diff --git a/src/views/safety_production_related/things_check/add.vue b/src/views/safety_production_related/things_check/add.vue new file mode 100644 index 0000000..e69de29 diff --git a/src/views/safety_production_related/things_check/index.vue b/src/views/safety_production_related/things_check/index.vue new file mode 100644 index 0000000..e69de29