diff --git a/src/assets/js/asyncRouter.js b/src/assets/js/asyncRouter.js
index aeb6f03..a83bfbf 100644
--- a/src/assets/js/asyncRouter.js
+++ b/src/assets/js/asyncRouter.js
@@ -378,6 +378,38 @@ export default [
path: "",
component: "hazard_investigation/inspection_record/index",
},
+ {
+ path: "/hazard_investigation/inspection_record/supplementary_recording",
+ meta: {
+ title: "补录",
+ activeMenu: "/hazard_investigation/inspection_record",
+ },
+ component:
+ "hazard_investigation/inspection_record/supplementary_recording",
+ },
+ {
+ path: "/hazard_investigation/inspection_record/view",
+ meta: {
+ title: "检查记录",
+ activeMenu: "/hazard_investigation/inspection_record",
+ },
+ component: "children",
+ children: [
+ {
+ path: "",
+ component: "hazard_investigation/inspection_record/view",
+ },
+ {
+ path: "/hazard_investigation/inspection_record/view/hidden_danger",
+ meta: {
+ title: "隐患信息",
+ activeMenu: "/hazard_investigation/inspection_record",
+ },
+ component:
+ "hazard_investigation/inspection_record/hidden_danger",
+ },
+ ],
+ },
],
},
],
diff --git a/src/assets/js/useListData.js b/src/assets/js/useListData.js
index 504d865..4e71d13 100644
--- a/src/assets/js/useListData.js
+++ b/src/assets/js/useListData.js
@@ -3,9 +3,10 @@ import { getDataType } from "@/assets/js/utils.js";
/**
* @param api {Function} 接口函数
- * @param options {Object?: {callbackFn, otherParams, immediate, usePagination, key}} 配置项
+ * @param options {Object?: {callbackFn, otherParams, defaultSearchForm, immediate, usePagination, key}} 配置项
* @param options.callbackFn {Function?} 回调函数(返回值【第一个参数表格数据,第二个参数后台返回的所有数据】)
* @param options.otherParams {Object?} 其它接口参数
+ * @param options.defaultSearchForm {Object?} searchForm默认值
* @param options.immediate {Boolean?} 是否立即执行接口函数(默认是)
* @param options.usePagination {Boolean?} 是否使用分页(默认是)
* @param options.key {String?} 返回的存放数组的key(默认varList)
@@ -22,26 +23,30 @@ export default function useListData(api, options = {}) {
throw new Error("options.usePagination必须是一个布尔值");
if (options.key && getDataType(options.key) !== "String")
throw new Error("options.key必须是一个字符串");
+ if (options.callbackFn && getDataType(options.callbackFn) !== "Function")
+ throw new Error("options.callbackFn必须是一个函数");
+ if (
+ options.defaultSearchForm &&
+ getDataType(options.defaultSearchForm) !== "Object"
+ )
+ throw new Error("options.defaultSearchForm必须是一个对象");
const immediate = options.immediate ?? true;
const usePagination = options.usePagination ?? true;
const key = options.key ?? "varList";
- if (!immediate && options.otherParams)
- throw new Error("options.otherParams只有在immediate为true时才有效");
+ const defaultSearchForm = options.defaultSearchForm ?? {};
if (
immediate &&
options.otherParams &&
getDataType(options.otherParams) !== "Object"
)
throw new Error("options.otherParams必须是一个对象");
- if (options.callbackFn && getDataType(options.callbackFn) !== "Function")
- throw new Error("options.callbackFn必须是一个函数");
const list = ref([]);
const pagination = ref({
currentPage: 1,
pageSize: 10,
total: 0,
});
- const searchForm = ref({});
+ const searchForm = ref(defaultSearchForm);
const tableRef = ref(null);
const fnGetData = async (otherParams = {}) => {
const resData = await api({
diff --git a/src/views/hazard_investigation/checklist_inspection_status/hidden_view.vue b/src/views/hazard_investigation/checklist_inspection_status/components/hidden_view.vue
similarity index 93%
rename from src/views/hazard_investigation/checklist_inspection_status/hidden_view.vue
rename to src/views/hazard_investigation/checklist_inspection_status/components/hidden_view.vue
index b0a9b0a..d165b97 100644
--- a/src/views/hazard_investigation/checklist_inspection_status/hidden_view.vue
+++ b/src/views/hazard_investigation/checklist_inspection_status/components/hidden_view.vue
@@ -66,7 +66,7 @@
v-viewer
v-for="item in data.hImgs"
:key="item.IMGFILES_ID"
- :src="FILE_URL + item.FILEPATH"
+ :src="VITE_FILE_URL + item.FILEPATH"
alt=""
width="100"
height="100"
@@ -107,7 +107,7 @@
v-viewer
v-for="item in data.rImgs"
:key="item.IMGFILES_ID"
- :src="FILE_URL + item.FILEPATH"
+ :src="VITE_FILE_URL + item.FILEPATH"
alt=""
width="100"
height="100"
@@ -126,7 +126,7 @@
v-viewer
v-for="item in data.pImgs"
:key="item.IMGFILES_ID"
- :src="FILE_URL + item.FILEPATH"
+ :src="VITE_FILE_URL + item.FILEPATH"
alt=""
width="100"
height="100"
@@ -176,7 +176,7 @@
v-viewer
v-for="item in data.sImgs"
:key="item.IMGFILES_ID"
- :src="FILE_URL + item.FILEPATH"
+ :src="VITE_FILE_URL + item.FILEPATH"
alt=""
width="100"
height="100"
@@ -211,7 +211,7 @@
v-viewer
v-for="item1 in item.cImgs"
:key="item1.IMGFILES_ID"
- :src="FILE_URL + item1.FILEPATH"
+ :src="VITE_FILE_URL + item1.FILEPATH"
alt=""
width="100"
height="100"
@@ -226,15 +226,19 @@
diff --git a/src/views/hazard_investigation/checklist_inspection_status/inspection_record.vue b/src/views/hazard_investigation/checklist_inspection_status/inspection_record.vue
index 644c8dd..b337385 100644
--- a/src/views/hazard_investigation/checklist_inspection_status/inspection_record.vue
+++ b/src/views/hazard_investigation/checklist_inspection_status/inspection_record.vue
@@ -115,7 +115,6 @@
DATESTART: row.DATESTART,
DATEEND: row.DATEEND,
LISTMANAGER_ID,
- type: 'supplementaryRecording',
},
})
"
@@ -156,14 +155,14 @@ const { list, pagination, searchForm, fnGetData, fnResetPagination } =
});
const fnGetDataTransfer = () => {
fnGetData({
- STARTINSPECTTIME: searchForm.value.dates?.[0],
- ENDINSPECTTIME: searchForm.value.dates?.[1],
+ STARTTIME: searchForm.value.dates?.[0],
+ ENDTIME: searchForm.value.dates?.[1],
});
};
const fnResetPaginationTransfer = () => {
fnResetPagination({
- STARTINSPECTTIME: searchForm.value.dates?.[0],
- ENDINSPECTTIME: searchForm.value.dates?.[1],
+ STARTTIME: searchForm.value.dates?.[0],
+ ENDTIME: searchForm.value.dates?.[1],
});
};
const buttonJurisdiction = await useButtonJurisdiction("checkrecord");
diff --git a/src/views/hazard_investigation/checklist_inspection_status/inspection_record_view.vue b/src/views/hazard_investigation/checklist_inspection_status/inspection_record_view.vue
index 82061e0..93c2855 100644
--- a/src/views/hazard_investigation/checklist_inspection_status/inspection_record_view.vue
+++ b/src/views/hazard_investigation/checklist_inspection_status/inspection_record_view.vue
@@ -95,7 +95,7 @@
link
@click="
router.push({
- path: '/hazard_investigation/checklist_inspection_status/inspection_record/view/hidden_danger',
+ path: hiddenPath[entrance],
query: { HIDDEN_ID: row.HIDDEN_ID },
})
"
@@ -161,7 +161,7 @@
link
@click="
router.push({
- path: '/hazard_investigation/checklist_inspection_status/inspection_record/view/hidden_danger',
+ path: hiddenPath[entrance],
query: { HIDDEN_ID: row.HIDDEN_ID },
})
"
@@ -213,6 +213,18 @@ import { addingPrefixToFile } from "@/assets/js/utils.js";
import Qualified from "./components/qualified.vue";
import MapDialog from "./components/map.vue";
+defineProps({
+ entrance: {
+ type: String,
+ default: "checklist_inspection_status",
+ },
+});
+const hiddenPath = {
+ checklist_inspection_status:
+ "/hazard_investigation/checklist_inspection_status/inspection_record/view/hidden_danger", // 清单检查情况
+ inspection_record:
+ "/hazard_investigation/inspection_record/view/hidden_danger", // 检查记录管理
+};
const route = useRoute();
const router = useRouter();
const { CHECKRECORD_ID } = route.query;
diff --git a/src/views/hazard_investigation/checklist_inspection_status/supplementary_recording.vue b/src/views/hazard_investigation/checklist_inspection_status/supplementary_recording.vue
index 8fec285..90c3e97 100644
--- a/src/views/hazard_investigation/checklist_inspection_status/supplementary_recording.vue
+++ b/src/views/hazard_investigation/checklist_inspection_status/supplementary_recording.vue
@@ -1,5 +1,5 @@
-
+
+
+
diff --git a/src/views/hazard_investigation/inspection_record/index.vue b/src/views/hazard_investigation/inspection_record/index.vue
index d633546..b9e4f96 100644
--- a/src/views/hazard_investigation/inspection_record/index.vue
+++ b/src/views/hazard_investigation/inspection_record/index.vue
@@ -8,19 +8,28 @@
>
-
+
+
+
+
+
+
-
+
@@ -83,7 +92,7 @@
link
@click="
router.push({
- path: '/hazard_investigation/checklist_inspection_status/inspection_record/view',
+ path: '/hazard_investigation/inspection_record/view',
query: {
CHECKRECORD_ID: row.CHECKRECORD_ID,
},
@@ -109,13 +118,12 @@
link
@click="
router.push({
- path: '/hazard_investigation/checklist_inspection_status/inspection_record/supplementary_recording',
+ path: '/hazard_investigation/inspection_record/supplementary_recording',
query: {
CHECKRECORD_ID: row.CHECKRECORD_ID,
DATESTART: row.DATESTART,
DATEEND: row.DATEEND,
- LISTMANAGER_ID,
- type: 'supplementaryRecording',
+ LISTMANAGER_ID: row.LISTMANAGER_ID,
},
})
"
@@ -151,6 +159,8 @@ const { list, pagination, searchForm, fnGetData, fnResetPagination } =
useListData(getInspectionRecordList, {
otherParams: {
USER_ID: userStore.getUserInfo.USER_ID,
+ },
+ defaultSearchForm: {
TYPE: "1",
},
callbackFn: (list, resData) => {
@@ -159,14 +169,14 @@ const { list, pagination, searchForm, fnGetData, fnResetPagination } =
});
const fnGetDataTransfer = () => {
fnGetData({
- STARTINSPECTTIME: searchForm.value.dates?.[0],
- ENDINSPECTTIME: searchForm.value.dates?.[1],
+ STARTTIME: searchForm.value.dates?.[0],
+ ENDTIME: searchForm.value.dates?.[1],
});
};
const fnResetPaginationTransfer = () => {
fnResetPagination({
- STARTINSPECTTIME: searchForm.value.dates?.[0],
- ENDINSPECTTIME: searchForm.value.dates?.[1],
+ STARTTIME: searchForm.value.dates?.[0],
+ ENDTIME: searchForm.value.dates?.[1],
});
};
const buttonJurisdiction = await useButtonJurisdiction("checkrecord");
diff --git a/src/views/hazard_investigation/inspection_record/supplementary_recording.vue b/src/views/hazard_investigation/inspection_record/supplementary_recording.vue
new file mode 100644
index 0000000..90c3e97
--- /dev/null
+++ b/src/views/hazard_investigation/inspection_record/supplementary_recording.vue
@@ -0,0 +1,9 @@
+
+
+
+
+
+
+
diff --git a/src/views/hazard_investigation/inspection_record/view.vue b/src/views/hazard_investigation/inspection_record/view.vue
new file mode 100644
index 0000000..0ec62f0
--- /dev/null
+++ b/src/views/hazard_investigation/inspection_record/view.vue
@@ -0,0 +1,9 @@
+
+
+
+
+
+
+
diff --git a/src/views/hazard_investigation/inventory_troubleshooting/inspect.vue b/src/views/hazard_investigation/inventory_troubleshooting/inspect.vue
index 021bb53..14255d7 100644
--- a/src/views/hazard_investigation/inventory_troubleshooting/inspect.vue
+++ b/src/views/hazard_investigation/inventory_troubleshooting/inspect.vue
@@ -50,21 +50,21 @@
不合格
不涉及
@@ -78,7 +78,7 @@
添加
@@ -195,7 +195,7 @@
-
+
@@ -265,9 +265,14 @@ import { WarningFilled } from "@element-plus/icons-vue";
const route = useRoute();
const router = useRouter();
-const { LISTMANAGER_ID, type, CHECKRECORD_ID, DATEEND, DATESTART } =
- route.query;
-console.log(CHECKRECORD_ID);
+const { LISTMANAGER_ID, CHECKRECORD_ID, DATEEND, DATESTART } = route.query;
+// entrance: supplementaryRecording是补录,空值是正常录入
+const props = defineProps({
+ entrance: {
+ type: String,
+ default: "",
+ },
+});
const rules = {
CHECK_TIME: [
{ required: true, message: "请选择检查时间", trigger: "change" },
@@ -367,7 +372,7 @@ const fnQualified = async (index, row) => {
inspectionList.value[index].ISNORMAL = 0;
};
const fnNotInvolved = (index, row) => {
- if (row.HASHIDDEN > 0 || type === "supplementaryRecording") return;
+ if (row.HASHIDDEN > 0 || props.entrance === "supplementaryRecording") return;
fnRemoveUnqualified(index);
inspectionList.value[index].ISNORMAL = 2;
};
@@ -375,7 +380,7 @@ const fnRemoveUnqualified = (index) => {
inspectionList.value[index].HIDDEN_ID = "";
};
const fnUnqualified = async (index, row) => {
- if (row.HASHIDDEN > 0 || type === "supplementaryRecording") return;
+ if (row.HASHIDDEN > 0 || props.entrance === "supplementaryRecording") return;
data.unQualifiedDialog.visible = true;
await nextTick();
if (
@@ -484,7 +489,7 @@ const fnSubmit = debounce(
LONGITUDE: data.longitude,
LATITUDE: data.latitude,
};
- if (type === "supplementaryRecording") {
+ if (props.entrance === "supplementaryRecording") {
params.REASON = data.form.REASON;
params.CHECKRECORD_ID = CHECKRECORD_ID;
await setChecklistInspectionStatusRecordSupplementaryRecordingSubmit(