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