安全例会模块优化->参会人员页,详情页

dev
WenShiJun 2024-03-06 16:11:13 +08:00
parent 043e071b64
commit a3b0cded3f
11 changed files with 119 additions and 155 deletions

View File

@ -12,3 +12,6 @@ export const addSafetyMeetingView = (params) =>
upload("/safetymeeting/add", params); // 添加安全通知 upload("/safetymeeting/add", params); // 添加安全通知
export const getSafetyMeetingRecipient = (params) => export const getSafetyMeetingRecipient = (params) =>
post("/safetymeeting/getAllRecipient", params); // 参会人员 post("/safetymeeting/getAllRecipient", params); // 参会人员
export const editSafetyMeetingRecipient = (params) =>
post("/safetymeeting/edit", params); // 修改参会人员

View File

@ -4,4 +4,5 @@ export const getSafetyStaffingList = (params) =>
export const addStaffingView = (params) => upload("/staffing/add", params); // 添加 管理人员配备 export const addStaffingView = (params) => upload("/staffing/add", params); // 添加 管理人员配备
export const editStaffingView = (params) => upload("/staffing/edit", params); // 添加 管理人员配备 export const editStaffingView = (params) => upload("/staffing/edit", params); // 修改 管理人员配备
export const infoStaffingView = (params) => upload("/staffing/goEdit", params); // 详情 管理人员配备

View File

@ -68,6 +68,7 @@ import { onMounted, reactive, ref } from "vue";
import useFormValidate from "@/assets/js/useFormValidate.js"; import useFormValidate from "@/assets/js/useFormValidate.js";
import { ElMessage } from "element-plus"; import { ElMessage } from "element-plus";
import { addSafetyCustomerView } from "@/request/customer_management.js"; import { addSafetyCustomerView } from "@/request/customer_management.js";
import { useRouter } from "vue-router";
const formRef = ref(null); const formRef = ref(null);
const rules = { const rules = {
@ -93,7 +94,7 @@ const data = reactive({
unitsList: [], unitsList: [],
}, },
}); });
const router = useRouter();
onMounted(async () => { onMounted(async () => {
await fnPerson(); await fnPerson();
}); });
@ -111,6 +112,7 @@ const fnSubmit = async () => {
await addSafetyCustomerView(formData); await addSafetyCustomerView(formData);
ElMessage.success("添加成功"); ElMessage.success("添加成功");
router.push("/electronic_waybill_management/customer_management");
Object.keys(data.form).forEach((key) => { Object.keys(data.form).forEach((key) => {
if (Array.isArray(data.form[key])) { if (Array.isArray(data.form[key])) {
data.form[key] = []; data.form[key] = [];

View File

@ -105,6 +105,7 @@ import useFormValidate from "@/assets/js/useFormValidate.js";
import { ElMessage } from "element-plus"; import { ElMessage } from "element-plus";
import { addSafetyLocationView } from "@/request/location_management.js"; import { addSafetyLocationView } from "@/request/location_management.js";
import MapDialog from "@/views/enterprise_management/information/components/map.vue"; import MapDialog from "@/views/enterprise_management/information/components/map.vue";
import { useRouter } from "vue-router";
const formRef = ref(null); const formRef = ref(null);
const rules = { const rules = {
@ -141,7 +142,7 @@ const data = reactive({
territoryCascaderRef: "", territoryCascaderRef: "",
}, },
}); });
const router = useRouter();
onMounted(async () => { onMounted(async () => {
await fnPerson(); await fnPerson();
}); });
@ -153,6 +154,7 @@ const fnSubmit = async () => {
await useFormValidate(formRef); await useFormValidate(formRef);
await addSafetyLocationView(data.form); await addSafetyLocationView(data.form);
ElMessage.success("添加成功"); ElMessage.success("添加成功");
router.push("/electronic_waybill_management/location_managemen");
Object.keys(data.form).forEach((key) => { Object.keys(data.form).forEach((key) => {
if (Array.isArray(data.form[key])) { if (Array.isArray(data.form[key])) {
data.form[key] = []; data.form[key] = [];

View File

@ -267,6 +267,7 @@ import { getPostListAll, getUserListAll } from "@/request/data_dictionary.js";
import { getSecurityCustomerList } from "@/request/customer_management.js"; import { getSecurityCustomerList } from "@/request/customer_management.js";
import { getSecurityLocationList } from "@/request/location_management.js"; import { getSecurityLocationList } from "@/request/location_management.js";
import { getOperationVehicleList } from "@/request/operation_vehicle.js"; import { getOperationVehicleList } from "@/request/operation_vehicle.js";
import { useRouter } from "vue-router";
const formRef = ref(null); const formRef = ref(null);
const rules = { const rules = {
@ -334,6 +335,7 @@ const data = reactive({
EndOptions: [], // EndOptions: [], //
OperationVehicle: [], // OperationVehicle: [], //
}); });
const router = useRouter();
const fnVehicle = async () => { const fnVehicle = async () => {
const res = await getOperationVehicleList(); const res = await getOperationVehicleList();
const varList = res.varList || []; const varList = res.varList || [];
@ -392,6 +394,7 @@ const fnSubmit = async () => {
await addSafetyThingsChecView(formData); await addSafetyThingsChecView(formData);
ElMessage.success("添加成功"); ElMessage.success("添加成功");
router.push("/electronic_waybill_management/waybill_registration");
Object.keys(data.form).forEach((key) => { Object.keys(data.form).forEach((key) => {
if (Array.isArray(data.form[key])) { if (Array.isArray(data.form[key])) {
data.form[key] = []; data.form[key] = [];

View File

@ -61,7 +61,7 @@
</template> </template>
<script setup> <script setup>
import { onMounted, ref } from "vue"; import { onMounted, ref, toRaw } from "vue";
import { useVModels } from "@vueuse/core"; import { useVModels } from "@vueuse/core";
import { ElMessage } from "element-plus"; import { ElMessage } from "element-plus";
import LayoutUpload from "@/components/upload/index.vue"; import LayoutUpload from "@/components/upload/index.vue";
@ -120,34 +120,42 @@ const fnClose = () => {
formRef.value.resetFields(); formRef.value.resetFields();
visible.value = false; visible.value = false;
}; };
const fnSubmit = async () => {
const params = {
...form.value,
};
const fnSubmit = async () => {
await formRef.value.validate(); await formRef.value.validate();
const rawFormValue = toRaw(form.value);
const formData = new FormData(); const formData = new FormData();
if (Array.isArray(form.file)) {
form.file.forEach((fileItem) => { //
if (Array.isArray(rawFormValue.file)) {
rawFormValue.file.forEach((fileItem) => {
if (fileItem.raw) { if (fileItem.raw) {
formData.append("FFILE", fileItem.raw); formData.append("FFILE", fileItem.raw);
} }
}); });
} }
Object.keys(form).forEach((key) => { Object.keys(rawFormValue).forEach((key) => {
if (key !== "file" && form[key] !== null && form[key] !== undefined) { if (key !== "file") {
formData.append(key, form[key]); formData.append(key, rawFormValue[key]);
} }
}); });
//
if (props.type === "add") { if (props.type === "add") {
await addStaffingView(formData); await addStaffingView(formData);
} else { } else {
formData.append("STAFFING_ID", params.STAFFING_ID); formData.append("STAFFING_ID", rawFormValue.STAFFING_ID);
await editStaffingView(formData); await editStaffingView(formData);
} }
//
ElMessage.success("操作成功"); ElMessage.success("操作成功");
//
fnClose(); fnClose();
//
emits("get-data"); emits("get-data");
}; };

View File

@ -1,129 +1,27 @@
<template> <template>
<div> <div>
<el-card>
<el-form
:model="searchForm"
label-width="100px"
@submit.prevent="searchNotifications"
>
<el-row>
<el-col :span="8">
<el-form-item label="从业人员" prop="PRACTITIONER">
<el-input v-model="searchForm.PRACTITIONER" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="从业类型" prop="PRACTITIONER_TYPE">
<el-select v-model="searchForm.PRACTITIONER_TYPE">
<el-option
v-for="item in relatedClassificationList"
:key="item.BIANMA"
:label="item.name"
:value="item.BIANMA"
/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="参会状态" prop="ATTENDANCE_STATUS">
<el-select v-model="searchForm.ATTENDANCE_STATUS">
<el-option label="已参会" :value="1" />
<!-- 1代表已签收 -->
<el-option label="未参会" :value="0" />
<!-- 0代表未签收 -->
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item>
<el-button type="primary" native-type="submit">搜索</el-button>
<el-button native-type="reset" @click="resetSearchForm"
>重置</el-button
>
</el-form-item>
</el-col>
</el-row>
</el-form>
</el-card>
<layout-card> <layout-card>
<layout-table <!-- 内容可能是一个加载中的提示或其他内容 -->
v-model:pagination="pagination" <div v-if="loading">...</div>
:data="list" <div v-else></div>
stripe
border
show-header
@get-data="fnGetData"
>
<el-table-column label="序号" width="60">
<template #default="{ $index }">
{{ serialNumber(pagination, $index) }}
</template>
</el-table-column>
<el-table-column label="从业人员" prop="PRACTITIONER" />
<el-table-column label="从业类型" prop="PRACTITIONER_TYPE" />
<el-table-column label="身份证号" prop="IDENTITY_NUMBER" />
<el-table-column label="联系电话" prop="CONTACT_PHONE" />
<el-table-column label="参会状态" prop="ATTENDANCE_STATUS">
<template #default="{ row }">
<el-tag v-if="row.ATTENDANCE_STATUS === '1'">{{ "" }}</el-tag>
<el-tag v-else></el-tag>
</template>
</el-table-column>
</layout-table>
</layout-card> </layout-card>
</div> </div>
</template> </template>
<script setup> <script setup>
import { reactive, onMounted, ref } from "vue"; import { ref, onMounted } from "vue";
import { useRoute } from "vue-router"; import { useRoute } from "vue-router";
import { layoutFnGetSIGNEDSTATUSClassification } from "@/request/safety_production_related.js"; import { infoStaffingView } from "@/request/traffic_safety_staffing.js";
import { getSafetyMeetingRecipient } from "@/request/traffic_safety_meeting.js";
import { serialNumber } from "@/assets/js/utils";
import useListData from "@/assets/js/useListData";
const route = useRoute(); const route = useRoute();
const SAFETY_MEETING_ID = route.query.SAFETY_MEETING_ID; const STAFFING_ID = route.query.STAFFING_ID;
const loading = ref(true); //
const searchForm = reactive({
PERSON: "",
PRACTITIONERTYPE: "",
SIGNEDSTATUS: null,
REPLYSTATUS: null,
});
const { list, pagination, fnGetData, fnResetPagination } = useListData(
getSafetyMeetingRecipient,
{
searchForm,
otherParams: { SAFETY_MEETING_ID },
usePagination: true,
}
);
async function searchNotifications() {
const params = Object.keys(searchForm).reduce((acc, key) => {
acc[key] = searchForm[key];
return acc;
}, {});
params.SAFETY_MEETING_ID = SAFETY_MEETING_ID;
await fnGetData(params);
}
//
function resetSearchForm() {
Object.keys(searchForm).forEach((key) => {
searchForm[key] = "";
});
fnResetPagination({ SAFETY_MEETING_ID });
}
const relatedClassificationList = ref(null);
onMounted(async () => { onMounted(async () => {
const data = await layoutFnGetSIGNEDSTATUSClassification(); const response = await infoStaffingView({ STAFFING_ID });
relatedClassificationList.value = JSON.parse(data.value.zTreeNodes); loading.value = false; //
console.log(response.pd.ATTACHMENT_ROUTE, "111111111111111111111111111");
window.open(response.pd.ATTACHMENT_ROUTE, "_blank");
}); });
</script> </script>

View File

@ -8,21 +8,21 @@
> >
<el-row> <el-row>
<el-col :span="6"> <el-col :span="6">
<el-form-item label="制度名称" prop="MEETING_TITLE"> <el-form-item label="制度名称" prop="SYSTEMNAME">
<el-input v-model="searchForm.MEETING_TITLE" /> <el-input v-model="searchForm.SYSTEMNAME" />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<el-form-item label="完成状态" prop="MEETING_TYPE"> <el-form-item label="完成状态" prop="COMPLETIONSTATUS">
<el-select v-model="searchForm.MEETING_TYPE"> <el-select v-model="searchForm.COMPLETIONSTATUS">
<el-option label="已上传" :value="1" /> <el-option label="已上传" :value="1" />
<el-option label="未上传" :value="0" /> <el-option label="未上传" :value="0" />
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<el-form-item label="有效状态" prop="MEETING_TYPE"> <el-form-item label="有效状态" prop="VALIDSTATUS">
<el-select v-model="searchForm.MEETING_TYPE"> <el-select v-model="searchForm.VALIDSTATUS">
<el-option label="正常" :value="1" /> <el-option label="正常" :value="1" />
<el-option label="未生效" :value="0" /> <el-option label="未生效" :value="0" />
</el-select> </el-select>
@ -78,9 +78,9 @@
link link
@click=" @click="
router.push({ router.push({
path: '/safety_production_related/safety_meeting/meeting_info', path: '/management_staffing/details',
query: { query: {
SAFETY_MEETING_ID: row.SAFETY_MEETING_ID, STAFFING_ID: row.STAFFING_ID,
}, },
}) })
" "

View File

@ -188,7 +188,6 @@ const fnSubmit = async () => {
await useFormValidate(formRef); await useFormValidate(formRef);
const formData = new FormData(); const formData = new FormData();
//
Object.keys(data.form).forEach((key) => { Object.keys(data.form).forEach((key) => {
if (key === "MEETING_DATE") { if (key === "MEETING_DATE") {
const dateRangeString = data.form.MEETING_DATE.join(" , "); const dateRangeString = data.form.MEETING_DATE.join(" , ");
@ -198,12 +197,10 @@ const fnSubmit = async () => {
} }
}); });
// fileList -
data.form.fileList.forEach((file) => { data.form.fileList.forEach((file) => {
if (file.raw) formData.append("FFILE", file.raw); if (file.raw) formData.append("FFILE", file.raw);
}); });
// videoList -
data.form.videoList.forEach((video) => { data.form.videoList.forEach((video) => {
if (video.raw) formData.append("VVIDEO", video.raw); // : if (video.raw) formData.append("VVIDEO", video.raw); // :
}); });

View File

@ -59,16 +59,28 @@
{{ serialNumber(pagination, $index) }} {{ serialNumber(pagination, $index) }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="从业人员" prop="userName" /> <el-table-column label="从业人员" prop="NAME" />
<el-table-column label="从业类型" prop="PRACTITIONER_TYPE" /> <el-table-column label="从业类型" prop="PRACTITIONER_TYPE" />
<el-table-column label="身份证号" prop="IDENTITY_NUMBER" /> <el-table-column label="联系电话" prop="USERNAME" />
<el-table-column label="联系电话" prop="CONTACT_PHONE" />
<el-table-column label="参会状态" prop="ATTENDANCE_STATUS"> <el-table-column label="参会状态" prop="ATTENDANCE_STATUS">
<template #default="{ row }"> <template #default="{ row }">
<el-tag v-if="row.ATTENDANCE_STATUS === '1'">{{ "" }}</el-tag> <el-tag v-if="row.ATTENDANCE_STATUS === '1'">{{ "" }}</el-tag>
<el-tag v-else></el-tag> <el-tag v-else></el-tag>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作" width="180">
<template #default="{ row }">
<el-button
v-if="row.ATTENDANCE_STATUS === '1'"
type="danger"
text
link
@click="editItem(row.SAFETY_MEETING_ID, row.PRACTITIONER, 0)"
>
移除
</el-button>
</template>
</el-table-column>
</layout-table> </layout-table>
</layout-card> </layout-card>
</div> </div>
@ -78,9 +90,13 @@
import { reactive, onMounted, ref } from "vue"; import { reactive, onMounted, ref } from "vue";
import { useRoute } from "vue-router"; import { useRoute } from "vue-router";
import { layoutFnGetSIGNEDSTATUSClassification } from "@/request/safety_production_related.js"; import { layoutFnGetSIGNEDSTATUSClassification } from "@/request/safety_production_related.js";
import { getSafetyMeetingRecipient } from "@/request/traffic_safety_meeting.js"; import {
editSafetyMeetingRecipient,
getSafetyMeetingRecipient,
} from "@/request/traffic_safety_meeting.js";
import { serialNumber } from "@/assets/js/utils"; import { serialNumber } from "@/assets/js/utils";
import useListData from "@/assets/js/useListData"; import useListData from "@/assets/js/useListData";
import { ElMessage, ElMessageBox } from "element-plus";
const route = useRoute(); const route = useRoute();
const SAFETY_MEETING_ID = route.query.SAFETY_MEETING_ID; const SAFETY_MEETING_ID = route.query.SAFETY_MEETING_ID;
@ -118,6 +134,22 @@ function resetSearchForm() {
}); });
fnResetPagination({ SAFETY_MEETING_ID }); fnResetPagination({ SAFETY_MEETING_ID });
} }
const editItem = async (
safetyMeetingId,
practitioner,
attendanceStatus = 0
) => {
await ElMessageBox.confirm(`确定要移除吗?`, {
type: "warning",
});
await editSafetyMeetingRecipient({
SAFETY_MEETING_ID: safetyMeetingId,
PRACTITIONER: practitioner,
ATTENDANCE_STATUS: attendanceStatus, // 0
});
ElMessage.success("移除成功");
fnGetData();
};
const relatedClassificationList = ref(null); const relatedClassificationList = ref(null);

View File

@ -29,7 +29,7 @@
</template> </template>
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item label="会议内容"> <el-descriptions-item label="会议内容">
{{ detailItems.MEETING_CONTENT }} <div v-html="detailItems.MEETING_CONTENT"></div>
</el-descriptions-item> </el-descriptions-item>
<!-- <el-descriptions-item label="备注">--> <!-- <el-descriptions-item label="备注">-->
<!-- {{ detailItems.NOTES }}--> <!-- {{ detailItems.NOTES }}-->
@ -43,23 +43,41 @@
<el-table <el-table
:border="true" :border="true"
:data="detailItems.recipientsList" :data="detailItems.recipientsList"
:show-header="false" :show-header="true"
> >
<el-table-column label="NAME1" align="center"> <el-table-column label="头像" align="center">
<template #default="{ row }"> <template #default="{ row }">
<img :src="row.AVATAR" alt="Avatar" /> <img :src="row.USERAVATARURL" alt="Avatar" />
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="NAME2" align="center"> <el-table-column label="姓名" align="center">
<template #default="{ row }"> <template #default="{ row }"> {{ row.NAME }}<br /> </template>
{{ row.PRACTITIONER }}<br />
{{ row.CONTACT_PHONE }}<br />
{{ row.HOME_ADDRESS }}
</template>
</el-table-column> </el-table-column>
<el-table-column label="NAME3" align="center"> <el-table-column label="手机号" align="center">
<template #default="{ row }"> {{ row.USERNAME }}<br /> </template>
</el-table-column>
<el-table-column label="参会证明" align="center">
<template #default="{ row }"> <template #default="{ row }">
<img :src="row.SIGNATUREPICTURE" alt="Signature" /> <img
:src="row.SIGNATUREPICTURE"
alt="Signature"
style="
max-width: 100px;
max-height: 100px;
display: block;
margin: auto;
"
/>
<img
:src="row.LIVEPHOTOS"
alt="Live Photo"
style="
max-width: 100px;
max-height: 100px;
display: block;
margin: auto;
"
/>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>