Merge remote-tracking branch 'origin/dev' into dev

pull/1/head
dearlin 2024-02-04 17:11:56 +08:00
commit 375b8ed5cb
9 changed files with 67 additions and 62 deletions

View File

@ -69,7 +69,7 @@ export const getChecklistInspectionStatusRecordMap = (params) =>
export const getInspectionRecordList = (params) =>
post("/checkrecord/allList", params); // 检查记录管理列表
export const getTroubleshootingPlanList = (params) =>
post("/listmanager/checkPlan", params); // 排查计划列表
post("/listmanager/mergeCheckPlan", params); // 排查计划列表
export const getCustomList = (params) =>
post("/hiddenstandardCustom/list", params); // 隐患排查清单管理列表

View File

@ -235,9 +235,9 @@ const fnRecovery = debounce(
async (ID) => {
await ElMessageBox.confirm("确定要恢复吗?", { type: "warning" });
if (tabName.name === "risk") {
await setDeleteInventoryManagementRecovery({ ID });
await setDeleteInventoryManagementRecovery({ LISTMANAGER_ID: ID });
} else {
await setDeleteCustomRecovery({ ID });
await setDeleteCustomRecovery({ CUSTOM_ID: ID });
}
ElMessage.success("恢复成功");

View File

@ -66,17 +66,7 @@
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item v-if="!ID" label="负责人" prop="USER_IDS">
<el-select v-model="data.form.USER_IDS" multiple>
<el-option
v-for="item in data.userList"
:key="item.USER_ID"
:label="item.NAME"
:value="item.USER_ID"
/>
</el-select>
</el-form-item>
<el-form-item v-else-if="ID" label="负责人" prop="USER_ID">
<el-form-item label="负责人" prop="USER_ID">
<el-select v-model="data.form.USER_ID">
<el-option
v-for="item in data.userList"

View File

@ -38,27 +38,42 @@
</el-col>
<el-col :span="24">
<el-form-item label="检查内容" prop="CHECK_CONTENT">
<el-input v-model="form.CHECK_CONTENT" />
<el-input
v-model="form.CHECK_CONTENT"
placeholder="请输入检查内容"
/>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="检查标准" prop="CHECK_STANDARD">
<el-input v-model="form.CHECK_STANDARD" />
<el-input
v-model="form.CHECK_STANDARD"
placeholder="请输入检查标准"
/>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="参考依据" prop="REFERENCE_BASIS">
<el-input v-model="form.REFERENCE_BASIS" />
<el-input
v-model="form.REFERENCE_BASIS"
placeholder="请输入参考依据"
/>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="检查合格项" prop="CHECK_QUALIFIED">
<el-input v-model="form.CHECK_QUALIFIED" />
<el-input
v-model="form.CHECK_QUALIFIED"
placeholder="请输入检查合格项"
/>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="检查不合格项" prop="CHECK_UNQUALIFIED">
<el-input v-model="form.CHECK_UNQUALIFIED" />
<el-input
v-model="form.CHECK_UNQUALIFIED"
placeholder="请输入检查不合格项"
/>
</el-form-item>
</el-col>
<el-col :span="24">

View File

@ -66,17 +66,7 @@
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item v-if="!ID" label="负责人" prop="USER_IDS">
<el-select v-model="form.USER_IDS" multiple>
<el-option
v-for="item in data.userList"
:key="item.USER_ID"
:label="item.NAME"
:value="item.USER_ID"
/>
</el-select>
</el-form-item>
<el-form-item v-else-if="ID" label="负责人" prop="USER_ID">
<el-form-item label="负责人" prop="USER_ID">
<el-select v-model="form.USER_ID">
<el-option
v-for="item in data.userList"
@ -254,7 +244,7 @@ const fnGetUser = async (POST_ID) => {
data.userList = resData.userList;
};
const fnClose = () => {
// form.resetFields();
form.value.resetFields();
visible.value = false;
};
const fnSubmit = debounce(
@ -264,15 +254,9 @@ const fnSubmit = debounce(
if (!form.value.file[0]) {
ElMessage.warning("请上传文件!");
}
const formData = new FormData();
Object.keys(form.value).forEach((key) => {
formData.append(key, form.value[key]);
});
formData.append("FFILE", form.value.file[0].raw);
formData.append("FFILEName", form.value.file[0].name);
console.log(form.value);
console.log(formData);
emits("submit", formData);
form.value.FFILE = form.value.file[0].raw;
form.value.FFILEName = form.value.file[0].name;
emits("submit", form.value);
fnClose();
},
{ atBegin: true }

View File

@ -344,7 +344,7 @@ import {
setCustomBatchDeleteTemporary,
setCustomDisable,
setCustomEnable,
// setCustomImport,
setCustomImport,
setInventoryManagementBatchDelete,
setInventoryManagementBatchDeleteTemporary,
setInventoryManagementDisable,
@ -400,6 +400,8 @@ const data = reactive({
TYPE: "",
dates: [],
file: [],
FFILE: [],
FFILEName: "",
},
},
});
@ -528,9 +530,8 @@ const fnInheritanceList = () => {
});
};
const fnSubmitImport = async (formData) => {
console.log(formData.PERIOD);
// const resData = await setCustomImport(formData);
// ElMessage.success(resData.msg);
const resData = await setCustomImport(formData);
ElMessage.success(resData.msg);
fnResetPagination();
};
</script>

View File

@ -1,13 +1,14 @@
<template>
<el-dialog title="选择其他检查标准" v-model="visible" width="1500">
<el-form
ref="formRef"
:model="searchForm"
label-width="60px"
@submit.prevent="fnResetPagination"
>
<el-row>
<el-col :span="6">
<el-form-item label="检查类型" prop="KEYWORDS">
<el-form-item label="检查类型" prop="KEYWORDS" label-width="100px">
<el-select
v-model="searchForm.CHECK_CATEGORY"
@change="getLevelData"
@ -22,7 +23,11 @@
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="检查项目" prop="DEPARTMENT_ID">
<el-form-item
label="检查项目"
prop="DEPARTMENT_ID"
label-width="100px"
>
<el-select v-model="searchForm.CHECK_ITEM">
<el-option
v-for="item in data.itemData"
@ -34,7 +39,7 @@
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="检查内容">
<el-form-item label="检查内容" label-width="100px">
<el-input
v-model="searchForm.OTHERKEYWORDS"
placeholder="请输入关键字"
@ -44,7 +49,7 @@
<el-col :span="6">
<el-form-item label-width="10px">
<el-button type="primary" native-type="submit">搜索</el-button>
<el-button native-type="reset" @click="fnResetPagination">
<el-button native-type="reset" @click="fnResetPaginationTransfer">
重置
</el-button>
</el-form-item>
@ -111,12 +116,12 @@ import {
getCheckstandardCommonList,
setCommonItemEdit,
} from "@/request/hazard_investigation.js";
import { reactive, watch } from "vue";
import { reactive, ref, watch } from "vue";
import { serialNumber } from "@/assets/js/utils.js";
import { differenceWith } from "lodash-es";
// import useFormValidate from "@/assets/js/useFormValidate.js";
import { ElMessage } from "element-plus";
import AddCheckstandard from "@/views/hazard_investigation/inventory_management/components/checkstandard_add.vue";
import useFormValidate from "@/assets/js/useFormValidate.js";
const props = defineProps({
visible: {
@ -140,7 +145,7 @@ const props = defineProps({
default: () => [],
},
});
// const formRef = ref(null);
const formRef = ref(null);
const data = reactive({
itemData: [],
editOrEditDialog: {
@ -156,10 +161,12 @@ const { list, searchForm, pagination, fnGetData, fnResetPagination, tableRef } =
clearSelection: false,
});
const getLevelData = () => {
searchForm.value.CHECK_ITEM = "";
data.itemData = [];
props.standardData.forEach((item) => {
if (
item.PARENT_ID !== "0" &&
item.PARENT_IDS.includes(searchForm.CHECK_CATEGORY)
item.PARENT_IDS.includes(searchForm.value.CHECK_CATEGORY)
) {
data.itemData.push(item);
}
@ -189,14 +196,12 @@ const fnSubmit = debounce(
);
const goEdit = (row) => {
data.editOrEditDialog.form = row;
// data.editOrEditDialog.form.CHECK_CATEGORY = row.CHECK_CATEGORY_NAME;
// data.editOrEditDialog.form.CHECK_ITEM = row.CHECK_ITEM_NAME;
data.editOrEditDialog.visible = true;
};
const fnEditStandardSubmit = debounce(
1000,
async () => {
// await useFormValidate(formRef);
await useFormValidate(formRef);
const params = {
...data.editOrEditDialog.form,
};
@ -205,6 +210,11 @@ const fnEditStandardSubmit = debounce(
},
{ atBegin: true }
);
const fnResetPaginationTransfer = () => {
searchForm.value = [];
data.itemData = [];
fnResetPagination();
};
</script>
<style scoped lang="scss"></style>

View File

@ -37,12 +37,17 @@
<el-divider content-position="left">检查内容</el-divider>
<layout-table :data="inspectionList" :show-pagination="false">
<el-table-column label="序号" width="70" type="index" />
<el-table-column prop="CHECK_CATEGORY_NAME" label="检查类别" />
<el-table-column prop="CHECK_ITEM_NAME" label="检查项目" />
<el-table-column prop="CHECK_CONTENT" label="检查内容" />
<el-table-column prop="CHECK_STANDARD" label="检查标准" />
<el-table-column prop="CHECK_RESULT" label="检查结果" />
<el-table-column label="操作" width="280">
<el-table-column
prop="CHECK_CATEGORY_NAME"
label="检查类别"
width="150"
/>
<el-table-column prop="CHECK_ITEM_NAME" label="检查项目" width="150" />
<el-table-column prop="CHECK_CONTENT" label="检查内容" width="200" />
<el-table-column prop="CHECK_STANDARD" label="检查标准" width="250" />
<el-table-column prop="REFERENCE_BASIS" label="参考依据" width="250" />
<el-table-column prop="CHECK_RESULT" label="检查结果" width="200" />
<el-table-column label="操作">
<template v-slot="{ row, $index }">
<el-radio-group :disabled="row.HASHIDDEN > 0" v-model="row.ISNORMAL">
<el-radio :label="0" @click.prevent="fnQualified($index, row)">

View File

@ -133,7 +133,7 @@
</layout-card>
<flow-chart
v-model:visible="data.flowChartDialog.visible"
:flowList="data.flowChartDialog.flowList"
:flow-list="data.flowChartDialog.flowList"
/>
</div>
</template>