From 4ee2018f1689d9bda4b57bf56bcc8f2a4c98b291 Mon Sep 17 00:00:00 2001 From: LiuJiaNan Date: Sat, 3 Feb 2024 14:07:23 +0800 Subject: [PATCH 1/7] init --- .env | 2 +- src/components/hazard_type/index.vue | 34 +++ src/components/hidden_view/index.vue | 8 +- src/components/sign/index.vue | 2 +- src/request/api.js | 1 + .../safety_environmental_management.js | 10 +- .../checklist_inspection_status/index.vue | 28 +-- .../safety_environmental/add.vue | 191 ++++++++++++++-- .../components/flow_chart.vue | 25 ++- .../components/hidden_add.vue | 166 ++++++++++++++ .../components/view_hidden.vue | 30 +++ .../safety_environmental/index.vue | 1 + .../safety_environmental/view.vue | 204 +++++++++++++++++- 13 files changed, 660 insertions(+), 42 deletions(-) create mode 100644 src/views/safety_environmental_management/safety_environmental/components/hidden_add.vue create mode 100644 src/views/safety_environmental_management/safety_environmental/components/view_hidden.vue diff --git a/.env b/.env index 31d0565..fa793de 100644 --- a/.env +++ b/.env @@ -1,4 +1,4 @@ -VITE_BASE_URL=http://192.168.0.17:8001/ +VITE_BASE_URL=http://192.168.0.42:8099/ VITE_PROXY=/api/ VITE_FILE_URL=https://file.zcloudchina.com/YTHFile VITE_TEMPLATE_URL=https://qaaq.qhdsafety.com/file/ diff --git a/src/components/hazard_type/index.vue b/src/components/hazard_type/index.vue index 2e2dca5..64e8eb3 100644 --- a/src/components/hazard_type/index.vue +++ b/src/components/hazard_type/index.vue @@ -1,5 +1,6 @@ diff --git a/src/components/hidden_view/index.vue b/src/components/hidden_view/index.vue index 33e34f2..95539ba 100644 --- a/src/components/hidden_view/index.vue +++ b/src/components/hidden_view/index.vue @@ -6,6 +6,8 @@ 隐患快报 隐患排查 隐患排查 + 安全环保检查 + 安全环保检查 diff --git a/src/components/sign/index.vue b/src/components/sign/index.vue index 2f3586c..c7f341b 100644 --- a/src/components/sign/index.vue +++ b/src/components/sign/index.vue @@ -14,7 +14,7 @@ :height="300" :is-crop="false" :line-width="6" - line-color="#fff" + line-color="#000" /> - + @@ -196,8 +243,51 @@ import LayoutDepartment from "@/components/department/index.vue"; import LayoutSign from "@/components/sign/index.vue"; import { getUserListAll } from "@/request/data_dictionary.js"; import LayoutInspectionType from "@/components/inspection_type/index.vue"; +import HiddenAdd from "./components/hidden_add.vue"; +import { useUserStore } from "@/pinia/user.js"; +import { debounce } from "throttle-debounce"; +import useFormValidate from "@/assets/js/useFormValidate.js"; +import { ElMessage } from "element-plus"; +import { useRouter } from "vue-router"; +import { setSafetyEnvironmentalAdd } from "@/request/safety_environmental_management.js"; +import { setUploadImg, setUploadVideo } from "@/request/api.js"; +import dayjs from "dayjs"; -const rules = {}; +const router = useRouter(); +const userStore = useUserStore(); +const rules = { + INSPECTION_SUBJECT: [ + { required: true, message: "请选择检查题目", trigger: "change" }, + ], + INSPECTED_DEPARTMENT_ID: [ + { required: true, message: "请选择被检查单位", trigger: "change" }, + ], + INSPECTED_SITEUSER_ID: [ + { + required: true, + message: "请选择被检查单位现场负责人", + trigger: "change", + }, + ], + INSPECTION_PLACE: [ + { required: true, message: "请输入检查场所", trigger: "blur" }, + ], + CONFIRM_MESSAGE: [ + { required: true, message: "请输入检查人意见", trigger: "blur" }, + ], + CONFIRM_MESSAGE_SIGN: [ + { required: true, message: "请上传检查人签名", trigger: "change" }, + ], + INSPECTION_TYPE: [ + { required: true, message: "请选择检查类型", trigger: "change" }, + ], + INSPECTION_TIME_START: [ + { required: true, message: "请选择检查开始时间", trigger: "change" }, + ], + INSPECTION_TIME_END: [ + { required: true, message: "请选择检查结束时间", trigger: "change" }, + ], +}; const formRef = ref(null); const data = reactive({ form: { @@ -205,8 +295,8 @@ const data = reactive({ INSPECTED_DEPARTMENT_ID: "", INSPECTED_SITEUSER_ID: "", INSPECTION_PLACE: "", - INSPECTION_USER_OPINION: "", - INSPECTION_USER_SIGN_IMG: "", + CONFIRM_MESSAGE: "", + CONFIRM_MESSAGE_SIGN: "", INSPECTION_TYPE: "", INSPECTION_TIME_START: "", INSPECTION_TIME_END: "", @@ -215,6 +305,10 @@ const data = reactive({ hiddenList: [], }, inspectedSiteUserList: [], + addHiddenDialog: { + visible: false, + hazardDiscovererList: [], + }, }); const fnAddInspectorList = () => { data.form.inspectorList.push({ @@ -233,12 +327,12 @@ const fnAddSituationList = () => { }; fnAddSituationList(); const fnInspectedDepartmentChange = () => { - data.inspectedSiteUserList.value = []; + data.inspectedSiteUserList = []; data.form.INSPECTED_SITEUSER_ID = ""; }; const fnGetInspectedSitUserList = async (DEPARTMENT_ID) => { const { userList } = await getUserListAll({ DEPARTMENT_ID }); - data.inspectedSiteUserList.value = userList; + data.inspectedSiteUserList = userList; }; const fnInspectionDepartmentChange = (value, index) => { data.form.inspectorList[index].INSPECTION_USER_ID = ""; @@ -246,13 +340,82 @@ const fnInspectionDepartmentChange = (value, index) => { fnGetInspectionSitUserList(value, index); }; const fnGetInspectionSitUserList = async (DEPARTMENT_ID, index) => { - const { userList } = await getUserListAll({ DEPARTMENT_ID }); + const { userList } = await getUserListAll({ DEPARTMENT_ID, NOMAIN: "1" }); data.form.inspectorList[index].inspectionUserList = userList; }; watchEffect(() => { if (data.form.INSPECTED_DEPARTMENT_ID) fnGetInspectedSitUserList(data.form.INSPECTED_DEPARTMENT_ID); }); +const fnAddHidden = () => { + data.addHiddenDialog.visible = true; + data.addHiddenDialog.hazardDiscovererList = [ + { + NAME: userStore.getUserInfo.NAME, + USER_ID: userStore.getUserInfo.USER_ID, + }, + ]; + const inspectorList = data.form.inspectorList; + for (let i = 0; i < inspectorList.length; i++) { + const inspectionUserList = inspectorList[i].inspectionUserList; + for (let j = 0; j < inspectionUserList.length; j++) { + if ( + inspectorList[i].INSPECTION_USER_ID === inspectionUserList[j].USER_ID + ) { + data.addHiddenDialog.hazardDiscovererList.push(inspectionUserList[j]); + break; + } + } + } +}; +const fnAddHiddenSubmit = (item) => { + data.form.hiddenList.push(item); +}; +const fnSubmit = debounce( + 1000, + async () => { + await useFormValidate(formRef); + const resData = await setSafetyEnvironmentalAdd({ + ...data.form, + INSPECTORJSON: JSON.stringify(data.form.inspectorList), + SITUATIONJSON: JSON.stringify(data.form.situationList), + HIDDENJSON: JSON.stringify(data.form.hiddenList), + CONFIRM_MESSAGE_TIME: dayjs().format("YYYY-MM-DD HH:mm"), + }); + const hiddenList = resData.pd.hiddenList; + for (let i = 0; i < hiddenList.length; i++) { + await fnUploadImage( + hiddenList[i].HIDDEN_ID, + data.form.hiddenList[i].hiddenImgs + ); + await fnUploadVideo( + hiddenList[i].HIDDEN_ID, + data.form.hiddenList[i].videoFiles + ); + } + ElMessage.success("提交成功"); + router.back(); + }, + { atBegin: true } +); +const fnUploadImage = async (HIDDEN_ID, files) => { + const formData = new FormData(); + for (let i = 0; i < files.length; i++) { + formData.append("FFILE", files[i]); + } + formData.append("FOREIGN_KEY", HIDDEN_ID); + formData.append("TYPE", 3); + await setUploadImg(formData); +}; +const fnUploadVideo = async (HIDDEN_ID, files) => { + const formData = new FormData(); + for (let i = 0; i < files.length; i++) { + formData.append("FFILE", files[i]); + } + formData.append("FOREIGN_KEY", HIDDEN_ID); + formData.append("TYPE", 102); + await setUploadVideo(formData); +}; diff --git a/src/views/safety_environmental_management/safety_environmental/components/flow_chart.vue b/src/views/safety_environmental_management/safety_environmental/components/flow_chart.vue index 13cc7ac..6a0cdbf 100644 --- a/src/views/safety_environmental_management/safety_environmental/components/flow_chart.vue +++ b/src/views/safety_environmental_management/safety_environmental/components/flow_chart.vue @@ -10,7 +10,10 @@ import { useVModel } from "@vueuse/core"; import RelationGraph from "relation-graph/vue3"; import { ref, watchEffect } from "vue"; -import { getSafetyEnvironmentalFlowChart } from "@/request/safety_environmental_management.js"; +import { + getSafetyEnvironmentalListFlowChart, + getSafetyEnvironmentalViewFlowChart, +} from "@/request/safety_environmental_management.js"; const props = defineProps({ visible: { @@ -23,6 +26,11 @@ const props = defineProps({ required: true, default: "", }, + type: { + type: String, + required: true, + default: "", + }, }); const emits = defineEmits(["update:visible"]); const visible = useVModel(props, "visible", emits); @@ -63,10 +71,17 @@ const graphOptions = ref({ defaultNodeWidth: 200, }); const fnGetData = async () => { - const { nodes, from } = await getSafetyEnvironmentalFlowChart({ - INSPECTION_ID: props.id, - }); - fnSeeksGraph(nodes, from); + if (props.type === "list") { + const { nodes, from } = await getSafetyEnvironmentalListFlowChart({ + INSPECTION_ID: props.id, + }); + fnSeeksGraph(nodes, from); + } else if (props.type === "view") { + const { nodes, from } = await getSafetyEnvironmentalViewFlowChart({ + HIDDEN_ID: props.id, + }); + fnSeeksGraph(nodes, from); + } }; const fnSeeksGraph = (nodes, links) => { relationGraphRef.value.setJsonData({ nodes, links }, () => {}); diff --git a/src/views/safety_environmental_management/safety_environmental/components/hidden_add.vue b/src/views/safety_environmental_management/safety_environmental/components/hidden_add.vue new file mode 100644 index 0000000..1b34641 --- /dev/null +++ b/src/views/safety_environmental_management/safety_environmental/components/hidden_add.vue @@ -0,0 +1,166 @@ + + + + + diff --git a/src/views/safety_environmental_management/safety_environmental/components/view_hidden.vue b/src/views/safety_environmental_management/safety_environmental/components/view_hidden.vue new file mode 100644 index 0000000..e471b76 --- /dev/null +++ b/src/views/safety_environmental_management/safety_environmental/components/view_hidden.vue @@ -0,0 +1,30 @@ + + + + + diff --git a/src/views/safety_environmental_management/safety_environmental/index.vue b/src/views/safety_environmental_management/safety_environmental/index.vue index bfb101c..bc17423 100644 --- a/src/views/safety_environmental_management/safety_environmental/index.vue +++ b/src/views/safety_environmental_management/safety_environmental/index.vue @@ -213,6 +213,7 @@ - + +
+ + 秦港股份有限公司现场{{ data.info.INSPECTION_SUBJECT }}检查记录 + + + + {{ data.info.INSPECTED_DEPARTMENT_NAMES }} + + + {{ data.info.INSPECTED_SITEUSER_NAME }} + + + {{ data.info.INSPECTION_PLACE }} + + + {{ data.info.INSPECTION_LEADDEPARTMENT_NAME }} + + + {{ data.info.INSPECTION_USER_NAME }} + + + {{ data.info.INSPECTION_TYPE_NAME }} + + + {{ + dayjs(data.info.INSPECTION_TIME_START).format( + "YYYY年MM月DD日HH时mm分" + ) + }} + 至 + {{ + dayjs(data.info.INSPECTION_TIME_END).format( + "YYYY年MM月DD日HH时mm分" + ) + }} + + + {{ data.info.CREATTIME }} + + + 检查情况 + + + {{ item.SITUATION }} + + + 发现问题 + + + + + + + + + + + +
隐患描述隐患部位操作
{{ item.HIDDENDESCR }}{{ item.HIDDENPART_NAME || item.HIDDENPART }}
+ + + + + + + + + +
签名未生成
+
+
+
+
+ 打印 +
+
+ + + - + + + From f0a6339a7d39d773968a4fdde652c6967d8abb82 Mon Sep 17 00:00:00 2001 From: fangjiakai <450850793@qq.com> Date: Sat, 3 Feb 2024 15:55:45 +0800 Subject: [PATCH 2/7] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E9=9A=90=E6=82=A3?= =?UTF-8?q?=E5=8F=91=E7=8E=B0=E9=83=A8=E9=97=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../safety_environmental_management/safety_environmental/add.vue | 1 + 1 file changed, 1 insertion(+) diff --git a/src/views/safety_environmental_management/safety_environmental/add.vue b/src/views/safety_environmental_management/safety_environmental/add.vue index 21446ae..ce6ed4b 100644 --- a/src/views/safety_environmental_management/safety_environmental/add.vue +++ b/src/views/safety_environmental_management/safety_environmental/add.vue @@ -377,6 +377,7 @@ const fnSubmit = debounce( await useFormValidate(formRef); const resData = await setSafetyEnvironmentalAdd({ ...data.form, + HIDDENFINDDEPT: userStore.getUserInfo.DEPARTMENT_ID, INSPECTORJSON: JSON.stringify(data.form.inspectorList), SITUATIONJSON: JSON.stringify(data.form.situationList), HIDDENJSON: JSON.stringify(data.form.hiddenList), From baca47e4cfba8539f43be64f0a194c5330ab625e Mon Sep 17 00:00:00 2001 From: zhangqihang Date: Sat, 3 Feb 2024 17:56:17 +0800 Subject: [PATCH 3/7] =?UTF-8?q?=E9=87=8D=E7=82=B9=E5=B7=A5=E7=A8=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/assets/js/asyncRouter.js | 26 +-- src/request/keyprojects.js | 4 + src/views/keyprojects/aiwarning/index.vue | 106 ------------ src/views/keyprojects/hidden/index.vue | 9 +- src/views/keyprojects/hidden/record_list.vue | 14 +- src/views/keyprojects/hidden/record_view.vue | 40 ++++- .../keyprojects/inspection/hidden_view.vue | 71 ++++++++ src/views/keyprojects/inspection/index.vue | 9 +- .../keyprojects/inspection/record_list.vue | 13 +- .../keyprojects/inspection/record_view.vue | 17 +- src/views/keyprojects/outsourced/add.vue | 161 +++++++++++++----- src/views/keyprojects/outsourced/index.vue | 50 +++++- src/views/keyprojects/outsourced/view.vue | 11 +- .../personnelmanagement/components/edit.vue | 58 +++++-- .../keyprojects/personnelmanagement/index.vue | 13 +- src/views/keyprojects/punish/index.vue | 9 +- src/views/keyprojects/punish/record_list.vue | 4 +- src/views/keyprojects/punish/record_view.vue | 9 +- .../videomanager/components/bobile_camer | 0 src/views/keyprojects/videomanager/index.vue | 106 ------------ 20 files changed, 414 insertions(+), 316 deletions(-) delete mode 100644 src/views/keyprojects/aiwarning/index.vue create mode 100644 src/views/keyprojects/inspection/hidden_view.vue create mode 100644 src/views/keyprojects/videomanager/components/bobile_camer delete mode 100644 src/views/keyprojects/videomanager/index.vue diff --git a/src/assets/js/asyncRouter.js b/src/assets/js/asyncRouter.js index bf3b140..8397bcb 100644 --- a/src/assets/js/asyncRouter.js +++ b/src/assets/js/asyncRouter.js @@ -861,7 +861,21 @@ export default [ title: "查看详情", activeMenu: "/keyprojects/inspection", }, - component: "keyprojects/inspection/record_view", + component: "children", + children: [ + { + path: "", + component: "keyprojects/inspection/record_view", + }, + { + path: "/keyprojects/inspection/hidden_view", + meta: { + title: "隐患信息", + activeMenu: "/keyprojects/inspection", + }, + component: "keyprojects/inspection/hidden_view", + }, + ], }, ], }, @@ -933,16 +947,6 @@ export default [ }, ], }, - { - path: "/keyprojects/aiwarning", - meta: { title: "AI报警", isSubMenu: false }, - component: "keyprojects/aiwarning/index", - }, - { - path: "/keyprojects/videomanager", - meta: { title: "视频监控", isSubMenu: false }, - component: "keyprojects/videomanager/index", - }, ], }, { diff --git a/src/request/keyprojects.js b/src/request/keyprojects.js index 6e22f3a..a26cbf6 100644 --- a/src/request/keyprojects.js +++ b/src/request/keyprojects.js @@ -36,6 +36,8 @@ export const setOutsourcedGoEdit = (params) => post("/outsourced/goEdit", params); // 重点工程修改获取 export const setOutsourcedDelete = (params) => post("/outsourced/delete", params); // 重点工程修改获取 +export const getOutsourcedJie = (params) => post("/outsourced/jie", params); // 结束工程 +export const getOutsourcedStart = (params) => post("/outsourced/start", params); // 结束工程 export const getKeyprojectcheckList = (params) => post("/keyprojectcheck/list", params); // 安全环保检查列表 @@ -49,3 +51,5 @@ export const getKeyprojectpunishList = (params) => post("/keyprojectpunish/list", params); // 处罚列表 export const getKeyprojectpunishGoEdit = (params) => post("/keyprojectpunish/goEdit", params); // 处罚列表详情 + +export const getCorpinfoListAll = (params) => post("/corpinfo/listAll", params); // 监理单位名称 diff --git a/src/views/keyprojects/aiwarning/index.vue b/src/views/keyprojects/aiwarning/index.vue deleted file mode 100644 index 09bae83..0000000 --- a/src/views/keyprojects/aiwarning/index.vue +++ /dev/null @@ -1,106 +0,0 @@ - - - - - diff --git a/src/views/keyprojects/hidden/index.vue b/src/views/keyprojects/hidden/index.vue index 6b586f4..36fdcd2 100644 --- a/src/views/keyprojects/hidden/index.vue +++ b/src/views/keyprojects/hidden/index.vue @@ -38,7 +38,14 @@ - + + +
@@ -50,6 +74,7 @@ diff --git a/src/views/keyprojects/inspection/hidden_view.vue b/src/views/keyprojects/inspection/hidden_view.vue new file mode 100644 index 0000000..d386e55 --- /dev/null +++ b/src/views/keyprojects/inspection/hidden_view.vue @@ -0,0 +1,71 @@ + + + + + diff --git a/src/views/keyprojects/inspection/index.vue b/src/views/keyprojects/inspection/index.vue index 4e4754a..3204217 100644 --- a/src/views/keyprojects/inspection/index.vue +++ b/src/views/keyprojects/inspection/index.vue @@ -38,7 +38,14 @@
- + + + - + + +
- 检查信息 + 隐患信息 {{ data.info.INSPECTION_CATEGORY }} @@ -47,7 +47,19 @@ @@ -62,6 +74,7 @@ import { getKeyprojectcheckGoEdit } from "@/request/keyprojects"; import { reactive } from "vue"; import { useRoute } from "vue-router"; +import router from "@/router"; const route = useRoute(); const data = reactive({ diff --git a/src/views/keyprojects/outsourced/add.vue b/src/views/keyprojects/outsourced/add.vue index 5b2ecea..c04af9f 100644 --- a/src/views/keyprojects/outsourced/add.vue +++ b/src/views/keyprojects/outsourced/add.vue @@ -66,7 +66,7 @@ v-model="data.form.UNITS_ID" clearable placeholder="请选择相关方" - @change="fnGetUnitUser" + @change="fnGetUnitUser('', '')" > - + clearable + placeholder="请选择" + > + + @@ -126,12 +134,24 @@ - + + + - + + @@ -139,59 +159,63 @@ - + + + + - - - + + + - - - 处罚相关   - 添加 - - + +
确定
@@ -240,6 +264,7 @@ import { setOutsourcedEdit, setOutsourcedGoEdit, setPersonnelmanagementListAll, + getCorpinfoListAll, } from "@/request/keyprojects"; import { ElMessage } from "element-plus"; import { debounce } from "throttle-debounce"; @@ -247,6 +272,8 @@ import { reactive, ref } from "vue"; import { useRoute, useRouter } from "vue-router"; import LayoutDepartment from "@/components/department/index.vue"; import { getUserListAll } from "@/request/data_dictionary"; +import { verifyDuplicateSelection } from "@/assets/js/utils.js"; +import LayoutUpload from "@/components/upload/index.vue"; const router = useRouter(); const route = useRoute(); @@ -279,26 +306,26 @@ const data = reactive({ acceptanceList: [ { id: Math.random(), - DEPARTMENT_ID: "", - USER_ID: "", + INSPECTION_DEPARTMENT_ID: "", + INSPECTION_USER_ID: "", userList: [], }, ], }, - inspectorList: [ - { INSPECTION_DEPARTMENT_ID: "", INSPECTION_USER_ID: "", USER_SIDE: "" }, - ], + fileList: [], INSPECTOR_List: [], unitsList: [], + groupCorpList: [], + mangeList: [], }); -const addInspector = () => { - data.inspectorList.push({ +const fnAddInspectedList = () => { + data.form.acceptanceList.push({ + id: Math.random(), INSPECTION_DEPARTMENT_ID: "", INSPECTION_USER_ID: "", - USER_SIDE: "", + userList: [], }); - data.INSPECTOR_List.push([]); }; const fnGetData = async () => { @@ -307,21 +334,52 @@ const fnGetData = async () => { }); data.form = resData.pd; data.form.acceptanceList = resData.punishThePerson; + data.form.STARTTIME_TIMES = [resData.pd.STARTTIME, resData.pd.ENDTIME]; + data.form.DEPARTMENT_ID = data.form.DEPARTMENT_ID.split(","); + data.form.INVOLVING_CORPS_DEPART_ID = + data.form.INVOLVING_CORPS_DEPART_ID.split(","); + + fnGetUnitUser(resData.pd.UNITS_PIC, resData.pd.UNITS_PHONE); + for (let index = 0; index < data.form.acceptanceList.length; index++) { + const item = data.form.acceptanceList[index]; + fnInspectDepartmentChange(item.INSPECTION_DEPARTMENT_ID, index); + } + + for (let index = 0; index < resData.file9.length; index++) { + resData.file9[index].name = resData.file9[index].FILE_NAME; + } + data.fileList = resData.file9; }; if (route.query.type === "edit") fnGetData(); +const fnGetCorpList = async () => { + const resData2 = await getCorpinfoListAll({}); + data.mangeList = resData2.varList; + resData2.varList.forEach((item) => { + if ( + item.CORPINFO_ID === "1e6dbbe16004402f8d2c0e52afd9a676" || + item.CORPINFO_ID === "3a854eefa7894e06aaa1a2611bca80f6" || + item.CORPINFO_ID === "020578a4c1f04bc692ee25145c2efbe5" || + item.CORPINFO_ID === "90966974de3c4b83aca6f8fd6432d5c2" + ) { + data.groupCorpList.push(item); + } + }); +}; +fnGetCorpList(); + const fnGetUnitsList = async () => { const resData = await getUnitsListAll({}); data.unitsList = resData.varList; }; fnGetUnitsList(); -const fnGetUnitUser = async () => { +const fnGetUnitUser = async (UNITS_PIC, UNITS_PHONE) => { const resData = await setPersonnelmanagementListAll({ UNITS_ID: data.form.UNITS_ID, }); - data.form.UNITS_PIC = ""; - data.form.UNITS_PHONE = ""; + data.form.UNITS_PIC = UNITS_PIC; + data.form.UNITS_PHONE = UNITS_PHONE; data.unitsUserList = resData.varList; }; @@ -345,6 +403,7 @@ const fnSubmit = debounce( 1000, async () => { await useFormValidate(formRef); + const formData = new FormData(); Object.keys(data.form).forEach((key) => { formData.append(key, data.form[key]); @@ -353,6 +412,24 @@ const fnSubmit = debounce( formData.append("STARTTIME", data.form.STARTTIME_TIMES[0]); formData.append("ENDTIME", data.form.STARTTIME_TIMES[1]); } + + let PUNISH_THE_PERSON = ""; + data.form.acceptanceList.forEach((item) => { + PUNISH_THE_PERSON = item.INSPECTION_USER_ID + "," + PUNISH_THE_PERSON; + }); + if (PUNISH_THE_PERSON.length > 0) { + PUNISH_THE_PERSON = PUNISH_THE_PERSON.substr( + 0, + PUNISH_THE_PERSON.length - 1 + ); + } + formData.set("PUNISH_THE_PERSON", PUNISH_THE_PERSON); + + for (let index = 0; index < data.fileList.length; index++) { + const item = data.fileList[index]; + formData.append("file9", item.raw); + } + route.query.type === "edit" ? await setOutsourcedEdit(formData) : await setOutsourcedAdd(formData); diff --git a/src/views/keyprojects/outsourced/index.vue b/src/views/keyprojects/outsourced/index.vue index 7b24f0f..1db5ae3 100644 --- a/src/views/keyprojects/outsourced/index.vue +++ b/src/views/keyprojects/outsourced/index.vue @@ -62,7 +62,7 @@ /> - +