forked from integrated_whb/integrated_whb_vue
bug修复
parent
065523c0aa
commit
855daed2ab
|
@ -128,3 +128,4 @@ export const setCustomInsuranceCoverageSave = (params) =>
|
|||
post("/hiddenstandardCustom/saveBaoBaoType", params); // 清单管理设置包保责任类型提交
|
||||
export const getCustomCheckListOtherHiddenList = (params) =>
|
||||
post("/customHidden/getCheckHidden", params); // 隐患清单检查情况检查记录查看其它隐患列表
|
||||
export const getCorpinfo = (params) => post("/corpinfo/goEdit", params); // 获取企业信息
|
||||
|
|
|
@ -534,6 +534,11 @@ const rules = {
|
|||
message: "请输入正确的手机号码",
|
||||
},
|
||||
],
|
||||
WHETHER_HAZARDS: {
|
||||
required: true,
|
||||
message: "请选择有无重大危险源",
|
||||
trigger: "change",
|
||||
},
|
||||
};
|
||||
const data = reactive({
|
||||
form: {
|
||||
|
|
|
@ -13,9 +13,8 @@
|
|||
<el-input v-model="data.form.NAME" placeholder="请输入内容" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-col :span="6" v-if="WHETHER_HAZARDS === '1'">
|
||||
<el-form-item
|
||||
v-if="SPECIAL_ENTERPRISES.includes(CORPINFO_ID)"
|
||||
label="是否包保责任人任务"
|
||||
prop="BAO_BAO_TYPE"
|
||||
label-width="160px"
|
||||
|
@ -234,8 +233,6 @@
|
|||
|
||||
<script setup>
|
||||
import { nextTick, reactive, ref, watchEffect } from "vue";
|
||||
import { SPECIAL_ENTERPRISES } from "@/assets/js/constant.js";
|
||||
import { useUserStore } from "@/pinia/user.js";
|
||||
import {
|
||||
layoutFnGetInventoryType,
|
||||
layoutFnGetTaskType,
|
||||
|
@ -260,9 +257,7 @@ import AddInspectionRoute from "./components/add_inspection_route.vue";
|
|||
|
||||
const route = useRoute();
|
||||
const router = useRouter();
|
||||
const { LISTMANAGER_ID } = route.query;
|
||||
const userStore = useUserStore();
|
||||
const CORPINFO_ID = userStore.getUserInfo.CORPINFO_ID;
|
||||
const { LISTMANAGER_ID, WHETHER_HAZARDS } = route.query;
|
||||
const rules = {
|
||||
NAME: [{ required: true, message: "清单名称不能为空", trigger: "blur" }],
|
||||
BAO_BAO_TYPE: [
|
||||
|
|
|
@ -13,9 +13,8 @@
|
|||
<el-input v-model="data.form.NAME" placeholder="请输入内容" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-col :span="6" v-if="WHETHER_HAZARDS === '1'">
|
||||
<el-form-item
|
||||
v-if="SPECIAL_ENTERPRISES.includes(CORPINFO_ID)"
|
||||
label="是否包保责任人任务"
|
||||
prop="BAO_BAO_TYPE"
|
||||
label-width="160px"
|
||||
|
@ -149,7 +148,7 @@
|
|||
<el-form-item label="关键字" prop="KEYWORDS">
|
||||
<el-input
|
||||
v-model="data.searchForm.KEYWORDS"
|
||||
placeholder="请输入内容"
|
||||
placeholder="请输入关键字"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
@ -184,7 +183,6 @@
|
|||
:data="data.list"
|
||||
:show-pagination="false"
|
||||
max-height="400"
|
||||
row-key="RISKCHECKITEM_ID"
|
||||
>
|
||||
<el-table-column type="selection" width="55" />
|
||||
<el-table-column type="index" label="序号" width="55" />
|
||||
|
@ -203,7 +201,7 @@
|
|||
label="检查不合格项"
|
||||
width="200"
|
||||
/>
|
||||
<el-table-column label="操作类型" width="100">
|
||||
<el-table-column label="操作类型">
|
||||
<template v-slot="{ row }">
|
||||
<span v-if="row.OPERATION_TYPE === 1">选择</span>
|
||||
<span v-if="row.OPERATION_TYPE === 2">填写</span>
|
||||
|
@ -234,8 +232,6 @@
|
|||
|
||||
<script setup>
|
||||
import { nextTick, reactive, ref, watchEffect } from "vue";
|
||||
import { SPECIAL_ENTERPRISES } from "@/assets/js/constant.js";
|
||||
import { useUserStore } from "@/pinia/user.js";
|
||||
import {
|
||||
layoutFnGetInventoryType,
|
||||
layoutFnGetTaskType,
|
||||
|
@ -262,9 +258,7 @@ import SelectCustom from "./components/select_custom.vue";
|
|||
|
||||
const route = useRoute();
|
||||
const router = useRouter();
|
||||
const { ID } = route.query;
|
||||
const userStore = useUserStore();
|
||||
const CORPINFO_ID = userStore.getUserInfo.CORPINFO_ID;
|
||||
const { ID, WHETHER_HAZARDS } = route.query;
|
||||
const rules = {
|
||||
NAME: [{ required: true, message: "清单名称不能为空", trigger: "blur" }],
|
||||
BAO_BAO_TYPE: [
|
||||
|
@ -335,7 +329,9 @@ const taskTypeList = await layoutFnGetTaskType();
|
|||
const troubleshootingTypeList = await layoutFnGetTroubleshootingType();
|
||||
const troubleshootingCycleList = await layoutFnGetTroubleshootingCycle();
|
||||
const inventoryTypeList = await layoutFnGetInventoryType();
|
||||
|
||||
const fnGetData = async () => {
|
||||
console.log(WHETHER_HAZARDS);
|
||||
if (!ID) return;
|
||||
const resData = await getCheckStandardManagementView({ ID });
|
||||
data.form = resData.pd;
|
||||
|
@ -372,6 +368,7 @@ const fnGetDataFilter = () => {
|
|||
if (keyword) {
|
||||
data.list = data.listAll.filter(
|
||||
(item) =>
|
||||
item.CHECK_CATEGORY_NAME?.indexOf(keyword) > -1 ||
|
||||
item.CHECK_ITEM_NAME?.indexOf(keyword) > -1 ||
|
||||
item.CHECK_CONTENT?.indexOf(keyword) > -1 ||
|
||||
item.CHECK_STANDARD?.indexOf(keyword) > -1
|
||||
|
|
|
@ -13,9 +13,8 @@
|
|||
<el-input v-model="form.NAME" placeholder="请输入内容" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-col :span="6" v-if="whetherHazards === 1">
|
||||
<el-form-item
|
||||
v-if="SPECIAL_ENTERPRISES.includes(CORPINFO_ID)"
|
||||
label="是否包保责任人任务"
|
||||
prop="BAO_BAO_TYPE"
|
||||
label-width="160px"
|
||||
|
@ -135,7 +134,7 @@
|
|||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<el-divider content-position="left">导入Excel文件</el-divider>
|
||||
<el-divider content-position="left">导入检查标准文件</el-divider>
|
||||
<el-form-item prop="file">
|
||||
<layout-upload v-model:file-list="form.file" accept=".xls" />
|
||||
</el-form-item>
|
||||
|
@ -152,9 +151,7 @@ import { reactive, ref, watchEffect } from "vue";
|
|||
import { useVModels } from "@vueuse/core";
|
||||
import { debounce } from "throttle-debounce";
|
||||
import useFormValidate from "@/assets/js/useFormValidate.js";
|
||||
import { SPECIAL_ENTERPRISES } from "@/assets/js/constant.js";
|
||||
import LayoutDepartment from "@/components/department/index.vue";
|
||||
import { useUserStore } from "@/pinia/user.js";
|
||||
import {
|
||||
layoutFnGetInventoryType,
|
||||
layoutFnGetTaskType,
|
||||
|
@ -176,13 +173,16 @@ const props = defineProps({
|
|||
required: true,
|
||||
default: () => ({}),
|
||||
},
|
||||
whetherHazards: {
|
||||
type: String,
|
||||
required: true,
|
||||
default: "",
|
||||
},
|
||||
});
|
||||
const VITE_TEMPLATE_URL = import.meta.env.VITE_TEMPLATE_URL;
|
||||
const emits = defineEmits(["update:visible", "update:form", "submit"]);
|
||||
const { visible, form } = useVModels(props, emits);
|
||||
const formRef = ref(null);
|
||||
const userStore = useUserStore();
|
||||
const CORPINFO_ID = userStore.getUserInfo.CORPINFO_ID;
|
||||
const taskTypeList = await layoutFnGetTaskType();
|
||||
const troubleshootingTypeList = await layoutFnGetTroubleshootingType();
|
||||
const troubleshootingCycleList = await layoutFnGetTroubleshootingCycle();
|
||||
|
|
|
@ -129,7 +129,7 @@
|
|||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column
|
||||
v-if="SPECIAL_ENTERPRISES.includes(CORPINFO_ID)"
|
||||
v-if="data.WHETHER_HAZARDS === 1"
|
||||
prop="TASK_TYPE_NAME"
|
||||
label="任务类型"
|
||||
width="100"
|
||||
|
@ -282,6 +282,9 @@
|
|||
name === 'risk'
|
||||
? '/hazard_investigation/inventory_management/add'
|
||||
: '/hazard_investigation/inventory_management/add_custom',
|
||||
query: {
|
||||
WHETHER_HAZARDS: data.WHETHER_HAZARDS,
|
||||
},
|
||||
})
|
||||
"
|
||||
>
|
||||
|
@ -316,6 +319,7 @@
|
|||
<import-custom
|
||||
v-model:visible="data.importCustomDialogVisible.visible"
|
||||
v-model:form="data.importCustomDialogVisible.form"
|
||||
:whether-hazards="data.WHETHER_HAZARDS"
|
||||
@submit="fnSubmitImport"
|
||||
/>
|
||||
</div>
|
||||
|
@ -334,9 +338,9 @@ import {
|
|||
layoutFnGetInventoryType,
|
||||
layoutFnGetTroubleshootingType,
|
||||
} from "@/assets/js/data_dictionary.js";
|
||||
import { SPECIAL_ENTERPRISES } from "@/assets/js/constant.js";
|
||||
import { useUserStore } from "@/pinia/user.js";
|
||||
import {
|
||||
getCorpinfo,
|
||||
getCustomList,
|
||||
getInventoryManagementList,
|
||||
getInventoryManagementRouteView,
|
||||
|
@ -369,7 +373,6 @@ const { list, pagination, searchForm, fnGetData, fnResetPagination, tableRef } =
|
|||
: useListData(getCustomList);
|
||||
const userStore = useUserStore();
|
||||
const USER_ID = userStore.getUserInfo.USER_ID;
|
||||
const CORPINFO_ID = userStore.getUserInfo.CORPINFO_ID;
|
||||
const buttonJurisdiction = await useButtonJurisdiction("listmanager");
|
||||
const inventoryTypeList = await layoutFnGetInventoryType();
|
||||
const troubleshootingTypeList = await layoutFnGetTroubleshootingType();
|
||||
|
@ -404,7 +407,13 @@ const data = reactive({
|
|||
FFILEName: "",
|
||||
},
|
||||
},
|
||||
WHETHER_HAZARDS: "",
|
||||
});
|
||||
const fnGetCorpinfo = async () => {
|
||||
const resData = await getCorpinfo();
|
||||
data.WHETHER_HAZARDS = resData.pd.WHETHER_HAZARDS;
|
||||
};
|
||||
fnGetCorpinfo();
|
||||
const fnGetDataTransfer = () => {
|
||||
fnGetData({
|
||||
DEPTIDS: searchForm.value.DEPTIDS?.join(","),
|
||||
|
@ -447,9 +456,9 @@ const fnEnable = debounce(
|
|||
async (ID) => {
|
||||
await ElMessageBox.confirm("确定要启用吗?", { type: "warning" });
|
||||
if (tabName.name === "risk") {
|
||||
await setInventoryManagementEnable({ ID });
|
||||
await setInventoryManagementEnable({ LISTMANAGER_ID: ID });
|
||||
} else {
|
||||
await setCustomEnable({ ID });
|
||||
await setCustomEnable({ CUSTOM_ID: ID });
|
||||
}
|
||||
ElMessage.success("启用成功");
|
||||
fnResetPaginationTransfer();
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<el-form
|
||||
:model="searchForm"
|
||||
label-width="90px"
|
||||
@submit.prevent="fnResetPaginationTransfer"
|
||||
@submit.prevent="fnGetDataTransfer"
|
||||
>
|
||||
<el-row>
|
||||
<el-col :span="6">
|
||||
|
@ -177,6 +177,7 @@ const fnGetDataTransfer = () => {
|
|||
});
|
||||
};
|
||||
const fnResetPaginationTransfer = () => {
|
||||
searchForm.value = {};
|
||||
fnResetPagination({
|
||||
DEPTIDS: searchForm.value.DEPTIDS?.join(","),
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue