diff --git a/src/components/pdf/index.vue b/src/components/pdf/index.vue
index 73ecff2..4fed0fe 100644
--- a/src/components/pdf/index.vue
+++ b/src/components/pdf/index.vue
@@ -4,9 +4,8 @@
:model-value="visible && model === 'dialog'"
@update:model-value="visible = false"
>
-
+
-
+
{
- if (props.visible) {
- console.log(1111);
+ if (props.visible || props.src) {
const loadingTask = createLoadingTask(VITE_FILE_URL + props.src);
loadingTask.promise
.then((pdf) => {
diff --git a/src/request/hazard_investigation.js b/src/request/hazard_investigation.js
index 12cd4dc..28ec153 100644
--- a/src/request/hazard_investigation.js
+++ b/src/request/hazard_investigation.js
@@ -40,5 +40,13 @@ export const getHiddenDangerDatabaseList = (params) =>
post("/hiddenLibrary/list", params); // 隐患数据库列表
export const setInventoryTroubleshootingOtherHiddenDangerAdd = (params) =>
post("/hidden/add", params); // 清单排查其它隐患添加
-export const setInventoryTroubleshootingOtherHiddenDangerView = (params) =>
+export const getInventoryTroubleshootingOtherHiddenDangerView = (params) =>
post("/hidden/goEdit", params); // 清单排查其它隐患查看
+export const setInventoryTroubleshootingOtherHiddenDangerDelete = (params) =>
+ post("/hidden/delete", params); // 清单排查其它隐患删除
+export const setInventoryTroubleshootingOtherHiddenDangerEdit = (params) =>
+ post("/hidden/edit", params); // 清单排查其它隐患修改
+export const setInventoryTroubleshootingOtherHiddenDangerListAdd = (params) =>
+ post("/hidden/listAdd", params); // 清单排查其它隐患添加
+export const setInventoryTroubleshootingSubmit = (params) =>
+ post("/checkrecord/add", params); // 清单排查提交
diff --git a/src/views/archives/corp/components/archives_pdf.vue b/src/views/archives/corp/components/archives_pdf.vue
index d086842..371295d 100644
--- a/src/views/archives/corp/components/archives_pdf.vue
+++ b/src/views/archives/corp/components/archives_pdf.vue
@@ -10,12 +10,12 @@
>
只能上传pdf文件
diff --git a/src/views/hazard_investigation/delete_inventory_management/view.vue b/src/views/hazard_investigation/delete_inventory_management/view.vue
index 51607c5..14a89f8 100644
--- a/src/views/hazard_investigation/delete_inventory_management/view.vue
+++ b/src/views/hazard_investigation/delete_inventory_management/view.vue
@@ -62,8 +62,8 @@ const info = ref({});
const { list } = useListData(getInventoryManagementView, {
otherParams: { LISTMANAGER_ID },
usePagination: false,
- callbackFn: (list, responseData) => {
- info.value = responseData.pd;
+ callbackFn: (list, resData) => {
+ info.value = resData.pd;
},
});
console.log(list);
diff --git a/src/views/hazard_investigation/inventory_management/insurance_coverage.vue b/src/views/hazard_investigation/inventory_management/insurance_coverage.vue
index d977e40..78bd8b0 100644
--- a/src/views/hazard_investigation/inventory_management/insurance_coverage.vue
+++ b/src/views/hazard_investigation/inventory_management/insurance_coverage.vue
@@ -84,8 +84,8 @@ const { list } = useListData(getInventoryManagementView, {
LISTMANAGER_ID,
},
usePagination: false,
- callbackFn: (list, responseData) => {
- info.value = responseData.pd;
+ callbackFn: (list, resData) => {
+ info.value = resData.pd;
},
});
const fnSelect = (row, index) => {
diff --git a/src/views/hazard_investigation/inventory_management/part_qr_code.vue b/src/views/hazard_investigation/inventory_management/part_qr_code.vue
index 318182d..b51afbd 100644
--- a/src/views/hazard_investigation/inventory_management/part_qr_code.vue
+++ b/src/views/hazard_investigation/inventory_management/part_qr_code.vue
@@ -75,8 +75,8 @@ const { list } = useListData(getInventoryManagementView, {
LISTMANAGER_ID,
},
usePagination: false,
- callbackFn: (list, responseData) => {
- info.value = responseData.pd;
+ callbackFn: (list, resData) => {
+ info.value = resData.pd;
},
});
const fnPartQrCode = (row) => {
diff --git a/src/views/hazard_investigation/inventory_management/print.vue b/src/views/hazard_investigation/inventory_management/print.vue
index be623a3..10e8d15 100644
--- a/src/views/hazard_investigation/inventory_management/print.vue
+++ b/src/views/hazard_investigation/inventory_management/print.vue
@@ -107,8 +107,8 @@ const { list } = useListData(getInventoryManagementView, {
LISTMANAGER_ID,
},
usePagination: false,
- callbackFn: (list, responseData) => {
- info.value = responseData.pd;
+ callbackFn: (list, resData) => {
+ info.value = resData.pd;
},
});
diff --git a/src/views/hazard_investigation/inventory_troubleshooting/components/un_qualified.vue b/src/views/hazard_investigation/inventory_troubleshooting/components/un_qualified.vue
index 67926da..1e39bff 100644
--- a/src/views/hazard_investigation/inventory_troubleshooting/components/un_qualified.vue
+++ b/src/views/hazard_investigation/inventory_troubleshooting/components/un_qualified.vue
@@ -1,7 +1,7 @@
@@ -201,10 +201,12 @@ import { reactive, ref, watchEffect } from "vue";
import LayoutUpload from "@/components/upload/index.vue";
import { useVModels } from "@vueuse/core";
import { debounce } from "throttle-debounce";
-import { ElLoading, ElMessage } from "element-plus";
+import { ElMessage } from "element-plus";
import {
getHiddenDangerDatabaseList,
setInventoryTroubleshootingOtherHiddenDangerAdd,
+ setInventoryTroubleshootingOtherHiddenDangerEdit,
+ setInventoryTroubleshootingOtherHiddenDangerListAdd,
} from "@/request/hazard_investigation.js";
import {
layoutFnGetHazardCategories,
@@ -248,6 +250,16 @@ const props = defineProps({
required: true,
default: "",
},
+ longitude: {
+ type: Number,
+ required: true,
+ default: 0,
+ },
+ latitude: {
+ type: Number,
+ required: true,
+ default: 0,
+ },
});
const emits = defineEmits(["update:visible", "update:form", "submit"]);
const { visible, form } = useVModels(props, emits);
@@ -333,72 +345,82 @@ watchEffect(() => {
});
const fnClose = () => {
formRef.value.resetFields();
+ data.list = [];
+ data.rectifyUserList = [];
visible.value = false;
};
const fnSubmit = debounce(
1000,
async () => {
await useFormValidate(formRef);
- const loading = ElLoading.service({
- lock: true,
- text: "加载中...",
- background: "rgba(0, 0, 0, 0.5)",
- });
- const geolocation = new window.BMapGL.Geolocation();
- geolocation.getCurrentPosition(async (r) => {
- loading.close();
- if (!r) {
- ElMessage.error("获取位置信息失败,请重新提交");
+ let currentHiddenId = "";
+ let params = {
+ ...form.value,
+ STATE: "0",
+ HIDDENTYPE1: form.value.HIDDENTYPE[0],
+ HIDDENTYPE2: form.value.HIDDENTYPE[1],
+ HIDDENTYPE3: form.value.HIDDENTYPE[2],
+ HIDDENTYPE_NAME: hiddenDangerTypeRef.value.getCheckedNodes(),
+ LISTMANAGER_ID: props.listManagerId,
+ };
+ if (props.hiddenType === "unqualified") {
+ if (!props.longitude && !props.latitude) {
+ ElMessage.error("正在获取当前位置中,请等待");
return;
}
- let currentHiddenId = "";
- let params = {};
- if (props.hiddenType === "unqualified") {
- params = {
- ...form.value,
- SOURCE: "2",
- STATE: "0",
- RISK_UNIT: props.info.RISKUNITNAME,
- IDENTIFICATION: props.info.PARTSNAME,
- RISK_DESCR: props.info.RISK_DESCR,
- RISK_POSITION: props.info.POSITIONNAME,
- LEVEL: props.info.DNAME5,
- CHECK_CONTENT: props.info.CHECK_CONTENT,
- RECORDITEM_ID: props.info.RECORDITEM_ID,
- RISKITEM_ID: props.info.LISTCHECKITEM_ID,
- LISTMANAGER_ID: props.listManagerId,
- LONGITUDE: r.longitude,
- LATITUDE: r.latitude,
- HIDDENTYPE1: form.value.HIDDENTYPE[0],
- HIDDENTYPE2: form.value.HIDDENTYPE[1],
- HIDDENTYPE3: form.value.HIDDENTYPE[2],
- HIDDENTYPE_NAME: hiddenDangerTypeRef.value.getCheckedNodes(),
- };
- const resData = await setInventoryTroubleshootingOtherHiddenDangerAdd(
+ params = {
+ ...params,
+ SOURCE: "2",
+ RISK_UNIT: props.info.RISKUNITNAME,
+ IDENTIFICATION: props.info.PARTSNAME,
+ RISK_DESCR: props.info.RISK_DESCR,
+ RISK_POSITION: props.info.POSITIONNAME,
+ LEVEL: props.info.DNAME5,
+ CHECK_CONTENT: props.info.CHECK_CONTENT,
+ RECORDITEM_ID: props.info.RECORDITEM_ID,
+ RISKITEM_ID: props.info.LISTCHECKITEM_ID,
+ LONGITUDE: props.longitude,
+ LATITUDE: props.latitude,
+ };
+ const resData = await setInventoryTroubleshootingOtherHiddenDangerAdd(
+ params
+ );
+ currentHiddenId = resData.pd.HIDDEN_ID;
+ }
+ if (props.hiddenType === "otherHidden") {
+ params = {
+ ...params,
+ HIDDEN_ID: props.info.HIDDEN_ID,
+ SOURCE: "3",
+ HAVESCHEME: 0,
+ };
+ if (props.type === "add") {
+ const resData =
+ await setInventoryTroubleshootingOtherHiddenDangerListAdd(params);
+ currentHiddenId = resData.pd.HIDDEN_ID;
+ }
+ if (props.type === "edit") {
+ const resData = await setInventoryTroubleshootingOtherHiddenDangerEdit(
params
);
currentHiddenId = resData.pd.HIDDEN_ID;
}
- for (let i = 0; i < form.value.hiddenImgs.length; i++) {
- if (form.value.hiddenImgs[i].raw)
- await fnUploadImage(currentHiddenId, form.value.hiddenImgs[i].raw, 3);
- }
- for (let i = 0; i < form.value.videoFiles.length; i++) {
- if (form.value.videoFiles[i].raw)
- await fnUploadImage(currentHiddenId, form.value.videoFiles[i].raw, 3);
- }
- for (let i = 0; i < form.value.rectifyImgs.length; i++) {
- if (form.value.rectifyImgs[i].raw)
- await fnUploadImage(
- currentHiddenId,
- form.value.rectifyImgs[i].raw,
- 4
- );
- }
- fnClose();
- ElMessage.success("保存成功");
- emits("submit", currentHiddenId);
- });
+ }
+ for (let i = 0; i < form.value.hiddenImgs.length; i++) {
+ if (form.value.hiddenImgs[i].raw)
+ await fnUploadImage(currentHiddenId, form.value.hiddenImgs[i].raw, 3);
+ }
+ for (let i = 0; i < form.value.videoFiles.length; i++) {
+ if (form.value.videoFiles[i].raw)
+ await fnUploadImage(currentHiddenId, form.value.videoFiles[i].raw, 3);
+ }
+ for (let i = 0; i < form.value.rectifyImgs.length; i++) {
+ if (form.value.rectifyImgs[i].raw)
+ await fnUploadImage(currentHiddenId, form.value.rectifyImgs[i].raw, 4);
+ }
+ fnClose();
+ ElMessage.success("保存成功");
+ emits("submit", currentHiddenId);
},
{ atBegin: true }
);
diff --git a/src/views/hazard_investigation/inventory_troubleshooting/index.vue b/src/views/hazard_investigation/inventory_troubleshooting/index.vue
index f14a30e..d34b8bd 100644
--- a/src/views/hazard_investigation/inventory_troubleshooting/index.vue
+++ b/src/views/hazard_investigation/inventory_troubleshooting/index.vue
@@ -158,8 +158,8 @@ const router = useRouter();
let ISREST = "";
const { list, pagination, searchForm, fnGetData, fnResetPagination } =
useListData(getInventoryTroubleshootingList, {
- callbackFn: (list, responseData) => {
- ISREST = responseData.ISREST;
+ callbackFn: (list, resData) => {
+ ISREST = resData.ISREST;
},
});
const troubleshootingCycleList = await layoutFnGetTroubleshootingCycle();
diff --git a/src/views/hazard_investigation/inventory_troubleshooting/inspect.vue b/src/views/hazard_investigation/inventory_troubleshooting/inspect.vue
index 09f0b1e..de945f5 100644
--- a/src/views/hazard_investigation/inventory_troubleshooting/inspect.vue
+++ b/src/views/hazard_investigation/inventory_troubleshooting/inspect.vue
@@ -51,7 +51,7 @@
不合格
-
+
不涉及
@@ -60,7 +60,9 @@
其他隐患
- 添加
+
+ 添加
+
@@ -71,7 +73,7 @@
type="primary"
text
link
- @click="editOtherHidden(row.HIDDEN_ID)"
+ @click="fnAddOrEditOtherHidden(row, 'edit')"
>
修改
@@ -79,7 +81,7 @@
type="primary"
text
link
- @click="removeOtherHidden(row.HIDDEN_ID)"
+ @click="fnDeleteOtherHidden(row.HIDDEN_ID)"
>
删除
@@ -97,8 +99,8 @@
@@ -201,17 +203,21 @@
:hidden-type="data.unQualifiedDialog.hiddenType"
:list-manager-id="LISTMANAGER_ID"
:info="{ ...data.unQualifiedDialog.info, ...info.value }"
+ :longitude="data.longitude"
+ :latitude="data.latitude"
@submit="fnHiddenSubmit"
/>