forked from integrated_whb/integrated_whb_vue
安全例会模块优化
parent
fa170fe4d0
commit
043e071b64
|
@ -0,0 +1,7 @@
|
||||||
|
import { post, upload } from "@/request/axios.js";
|
||||||
|
export const getSafetyStaffingList = (params) =>
|
||||||
|
post("/staffing/listForSecurityStaffing", params); // 管理人员配备列表
|
||||||
|
|
||||||
|
export const addStaffingView = (params) => upload("/staffing/add", params); // 添加 管理人员配备
|
||||||
|
|
||||||
|
export const editStaffingView = (params) => upload("/staffing/edit", params); // 添加 管理人员配备
|
|
@ -62,7 +62,6 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { layoutFnGetMEETINGTYPEClassification } from "@/request/safety_production_related.js";
|
|
||||||
import { CUSTOMERTYPEMENU } from "@/assets/js/constant";
|
import { CUSTOMERTYPEMENU } from "@/assets/js/constant";
|
||||||
import { getSecurityPerson } from "@/request/waybill_registration.js";
|
import { getSecurityPerson } from "@/request/waybill_registration.js";
|
||||||
import { onMounted, reactive, ref } from "vue";
|
import { onMounted, reactive, ref } from "vue";
|
||||||
|
@ -83,13 +82,6 @@ const rules = {
|
||||||
],
|
],
|
||||||
};
|
};
|
||||||
|
|
||||||
const relatedClassificationTempList =
|
|
||||||
await layoutFnGetMEETINGTYPEClassification();
|
|
||||||
const relatedClassificationList = [];
|
|
||||||
JSON.parse(relatedClassificationTempList.value.zTreeNodes).forEach((e) => {
|
|
||||||
relatedClassificationList.push({ name: e.id, BIANMA: e.name });
|
|
||||||
});
|
|
||||||
|
|
||||||
const data = reactive({
|
const data = reactive({
|
||||||
form: {
|
form: {
|
||||||
TRANSPORTATIONCOMPANY: "",
|
TRANSPORTATIONCOMPANY: "",
|
||||||
|
|
|
@ -250,7 +250,6 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { layoutFnGetMEETINGTYPEClassification } from "@/request/safety_production_related.js";
|
|
||||||
import {
|
import {
|
||||||
PRACTITIONERMENU,
|
PRACTITIONERMENU,
|
||||||
TRUCKMENU,
|
TRUCKMENU,
|
||||||
|
@ -302,13 +301,6 @@ const rules = {
|
||||||
],
|
],
|
||||||
};
|
};
|
||||||
|
|
||||||
const relatedClassificationTempList =
|
|
||||||
await layoutFnGetMEETINGTYPEClassification();
|
|
||||||
const relatedClassificationList = [];
|
|
||||||
JSON.parse(relatedClassificationTempList.value.zTreeNodes).forEach((e) => {
|
|
||||||
relatedClassificationList.push({ name: e.id, BIANMA: e.name });
|
|
||||||
});
|
|
||||||
|
|
||||||
const data = reactive({
|
const data = reactive({
|
||||||
form: {
|
form: {
|
||||||
TRANSPORTATIONCOMPANY: "",
|
TRANSPORTATIONCOMPANY: "",
|
||||||
|
|
|
@ -252,7 +252,6 @@ import { debounce } from "throttle-debounce";
|
||||||
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 AddRisk from "@/views/risk_control/ledger/components/add.vue";
|
import AddRisk from "@/views/risk_control/ledger/components/add.vue";
|
||||||
import SelectPerson from "./components/select_risk.vue";
|
|
||||||
|
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
|
|
|
@ -0,0 +1,164 @@
|
||||||
|
<template>
|
||||||
|
<el-dialog
|
||||||
|
v-model="visible"
|
||||||
|
:title="type === 'edit' ? '修改' : '新增'"
|
||||||
|
:before-close="fnClose"
|
||||||
|
>
|
||||||
|
<el-form ref="formRef" :rules="rules" :model="form" label-width="150px">
|
||||||
|
<el-form-item v-if="type === 'add'" label="制度名称" prop="SYSTEMNAME">
|
||||||
|
<el-input
|
||||||
|
v-model="form.SYSTEMNAME"
|
||||||
|
placeholder="请输入制度名称"
|
||||||
|
></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item
|
||||||
|
v-if="type === 'edit'"
|
||||||
|
label="经营企业"
|
||||||
|
prop="OPERATINGCOMPANY"
|
||||||
|
>
|
||||||
|
<span>{{ operatingCompany }}</span>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item
|
||||||
|
v-if="type === 'edit'"
|
||||||
|
label="经营类型"
|
||||||
|
prop="OPERATIONTYPE"
|
||||||
|
>
|
||||||
|
<span>{{ operationType }}</span>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="会议文本附件" prop="file">
|
||||||
|
<layout-upload
|
||||||
|
v-model:file-list="form.file"
|
||||||
|
accept=".pdf"
|
||||||
|
:limit="9"
|
||||||
|
:before-upload="fnUpload"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item v-if="type === 'add'" label="到期时间" prop="EXPIRYDATE">
|
||||||
|
<el-date-picker
|
||||||
|
v-model="form.EXPIRYDATE"
|
||||||
|
type="date"
|
||||||
|
format="YYYY-MM-DD"
|
||||||
|
value-format="YYYY-MM-DD"
|
||||||
|
placeholder="选择时间"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item
|
||||||
|
v-if="type === 'add'"
|
||||||
|
label="制度备注"
|
||||||
|
prop="MEETING_CONTENT"
|
||||||
|
>
|
||||||
|
<layout-editor
|
||||||
|
v-model="form.MEETING_CONTENT"
|
||||||
|
placeholder="请输入内容"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<template #footer>
|
||||||
|
<el-button @click="fnClose">取消</el-button>
|
||||||
|
<el-button type="primary" @click="fnSubmit">确定</el-button>
|
||||||
|
</template>
|
||||||
|
</el-dialog>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import { onMounted, ref } from "vue";
|
||||||
|
import { useVModels } from "@vueuse/core";
|
||||||
|
import { ElMessage } from "element-plus";
|
||||||
|
import LayoutUpload from "@/components/upload/index.vue";
|
||||||
|
import {
|
||||||
|
addStaffingView,
|
||||||
|
editStaffingView,
|
||||||
|
getSafetyStaffingList,
|
||||||
|
} from "@/request/traffic_safety_staffing.js";
|
||||||
|
import LayoutEditor from "@/components/editor/index.vue";
|
||||||
|
|
||||||
|
const props = defineProps({
|
||||||
|
visible: {
|
||||||
|
type: Boolean,
|
||||||
|
required: true,
|
||||||
|
default: false,
|
||||||
|
},
|
||||||
|
form: {
|
||||||
|
type: {},
|
||||||
|
required: false,
|
||||||
|
default: false,
|
||||||
|
},
|
||||||
|
loading: {
|
||||||
|
type: Boolean,
|
||||||
|
required: true,
|
||||||
|
default: false,
|
||||||
|
},
|
||||||
|
options: {
|
||||||
|
type: Array,
|
||||||
|
required: true,
|
||||||
|
default: () => [],
|
||||||
|
},
|
||||||
|
type: {
|
||||||
|
type: String,
|
||||||
|
required: true,
|
||||||
|
default: "",
|
||||||
|
},
|
||||||
|
});
|
||||||
|
const emits = defineEmits(["update:visible", "update:form", "get-data"]);
|
||||||
|
const { visible, form } = useVModels(props, emits);
|
||||||
|
const rules = {
|
||||||
|
file: [{ required: true, message: "请上传会议文本附件", trigger: "change" }],
|
||||||
|
SYSTEMNAME: [{ required: true, message: "请输入制度名称", trigger: "blur" }],
|
||||||
|
};
|
||||||
|
|
||||||
|
const operatingCompany = ref("");
|
||||||
|
const operationType = ref("");
|
||||||
|
onMounted(async () => {
|
||||||
|
const resData = await getSafetyStaffingList();
|
||||||
|
if (resData && resData.varList && resData.varList.length > 0) {
|
||||||
|
operatingCompany.value = resData.varList[0].CORP_NAME;
|
||||||
|
operationType.value = resData.varList[0].OPERATIONTYPE;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
const formRef = ref(null);
|
||||||
|
const fnClose = () => {
|
||||||
|
formRef.value.resetFields();
|
||||||
|
visible.value = false;
|
||||||
|
};
|
||||||
|
const fnSubmit = async () => {
|
||||||
|
const params = {
|
||||||
|
...form.value,
|
||||||
|
};
|
||||||
|
|
||||||
|
await formRef.value.validate();
|
||||||
|
const formData = new FormData();
|
||||||
|
if (Array.isArray(form.file)) {
|
||||||
|
form.file.forEach((fileItem) => {
|
||||||
|
if (fileItem.raw) {
|
||||||
|
formData.append("FFILE", fileItem.raw);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
Object.keys(form).forEach((key) => {
|
||||||
|
if (key !== "file" && form[key] !== null && form[key] !== undefined) {
|
||||||
|
formData.append(key, form[key]);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
if (props.type === "add") {
|
||||||
|
await addStaffingView(formData);
|
||||||
|
} else {
|
||||||
|
formData.append("STAFFING_ID", params.STAFFING_ID);
|
||||||
|
await editStaffingView(formData);
|
||||||
|
}
|
||||||
|
ElMessage.success("操作成功");
|
||||||
|
fnClose();
|
||||||
|
emits("get-data");
|
||||||
|
};
|
||||||
|
|
||||||
|
const fnUpload = (file) => {
|
||||||
|
const isLt100M = file.size / 1024 / 1024 < 100;
|
||||||
|
if (!isLt100M) {
|
||||||
|
ElMessage.error("文件大小不能超过100M");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="scss"></style>
|
|
@ -0,0 +1,130 @@
|
||||||
|
<template>
|
||||||
|
<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-table
|
||||||
|
v-model:pagination="pagination"
|
||||||
|
:data="list"
|
||||||
|
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>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import { reactive, onMounted, ref } from "vue";
|
||||||
|
import { useRoute } from "vue-router";
|
||||||
|
import { layoutFnGetSIGNEDSTATUSClassification } from "@/request/safety_production_related.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 SAFETY_MEETING_ID = route.query.SAFETY_MEETING_ID;
|
||||||
|
|
||||||
|
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 () => {
|
||||||
|
const data = await layoutFnGetSIGNEDSTATUSClassification();
|
||||||
|
relatedClassificationList.value = JSON.parse(data.value.zTreeNodes);
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped></style>
|
|
@ -0,0 +1,146 @@
|
||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<el-card>
|
||||||
|
<el-form
|
||||||
|
:model="searchForm"
|
||||||
|
label-width="100px"
|
||||||
|
@submit.prevent="fnResetPagination"
|
||||||
|
>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="6">
|
||||||
|
<el-form-item label="制度名称" prop="MEETING_TITLE">
|
||||||
|
<el-input v-model="searchForm.MEETING_TITLE" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="6">
|
||||||
|
<el-form-item label="完成状态" prop="MEETING_TYPE">
|
||||||
|
<el-select v-model="searchForm.MEETING_TYPE">
|
||||||
|
<el-option label="已上传" :value="1" />
|
||||||
|
<el-option label="未上传" :value="0" />
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="6">
|
||||||
|
<el-form-item label="有效状态" prop="MEETING_TYPE">
|
||||||
|
<el-select v-model="searchForm.MEETING_TYPE">
|
||||||
|
<el-option label="正常" :value="1" />
|
||||||
|
<el-option label="未生效" :value="0" />
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<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>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-form>
|
||||||
|
</el-card>
|
||||||
|
<layout-card>
|
||||||
|
<layout-table
|
||||||
|
ref="tableRef"
|
||||||
|
v-model:pagination="pagination"
|
||||||
|
:data="list"
|
||||||
|
row-key="STAFFING_ID"
|
||||||
|
@get-data="fnGetData"
|
||||||
|
>
|
||||||
|
<el-table-column label="序号" width="60">
|
||||||
|
<template #default="{ $index }">
|
||||||
|
{{ serialNumber(pagination, $index) }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="SYSTEMNAME" label="制度名称" width="250" />
|
||||||
|
<el-table-column prop="COMPLETIONSTATUS" label="完成状态" width="250">
|
||||||
|
<template #default="{ row }">
|
||||||
|
<el-tag v-if="row.COMPLETIONSTATUS === '1'">已上传</el-tag>
|
||||||
|
<el-tag v-else-if="row.COMPLETIONSTATUS === '0'">未上传</el-tag>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="有效状态" prop="VALIDSTATUS">
|
||||||
|
<template #default="{ row }">
|
||||||
|
<el-tag v-if="row.VALIDSTATUS === '1'">正常</el-tag>
|
||||||
|
<el-tag v-else-if="row.VALIDSTATUS === '0'">未生效</el-tag>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="CORP_NAME" label="经营企业" width="150" />
|
||||||
|
<el-table-column prop="OPERATIONTYPE" label="经营类型" width="150" />
|
||||||
|
<el-table-column prop="EXPIRYDATE" label="到期时间" width="150" />
|
||||||
|
<el-table-column prop="CREATETIME" label="创建时间" width="150" />
|
||||||
|
<el-table-column prop="OPERATTIME" label="修改时间" width="150" />
|
||||||
|
<el-table-column label="操作" width="180">
|
||||||
|
<template #default="{ row }">
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
text
|
||||||
|
link
|
||||||
|
@click="
|
||||||
|
router.push({
|
||||||
|
path: '/safety_production_related/safety_meeting/meeting_info',
|
||||||
|
query: {
|
||||||
|
SAFETY_MEETING_ID: row.SAFETY_MEETING_ID,
|
||||||
|
},
|
||||||
|
})
|
||||||
|
"
|
||||||
|
>
|
||||||
|
查看
|
||||||
|
</el-button>
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
text
|
||||||
|
link
|
||||||
|
@click="fnAddOrEdit(row.STAFFING_ID, 'edit')"
|
||||||
|
>
|
||||||
|
编辑
|
||||||
|
</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<template #button>
|
||||||
|
<el-button type="primary" @click="fnAddOrEdit('', 'add')">
|
||||||
|
新增
|
||||||
|
</el-button>
|
||||||
|
</template>
|
||||||
|
</layout-table>
|
||||||
|
</layout-card>
|
||||||
|
<add
|
||||||
|
v-model:visible="data.addOrEditDialog.visible"
|
||||||
|
v-model:form="data.addOrEditDialog.form"
|
||||||
|
:type="data.addOrEditDialog.type"
|
||||||
|
@get-data="fnResetPagination"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import { serialNumber } from "@/assets/js/utils";
|
||||||
|
import useListData from "@/assets/js/useListData.js";
|
||||||
|
import Add from "./components/add.vue";
|
||||||
|
import { nextTick, reactive } from "vue";
|
||||||
|
import router from "@/router/index.js";
|
||||||
|
import { getSafetyStaffingList } from "@/request/traffic_safety_staffing.js";
|
||||||
|
|
||||||
|
const { list, pagination, searchForm, fnGetData, fnResetPagination } =
|
||||||
|
useListData(getSafetyStaffingList);
|
||||||
|
const data = reactive({
|
||||||
|
addOrEditDialog: {
|
||||||
|
visible: false,
|
||||||
|
type: "",
|
||||||
|
form: {},
|
||||||
|
},
|
||||||
|
});
|
||||||
|
const fnAddOrEdit = async (STAFFING_ID = "", type = "add") => {
|
||||||
|
data.addOrEditDialog.visible = true;
|
||||||
|
data.addOrEditDialog.type = type;
|
||||||
|
if (type === "edit" && STAFFING_ID) {
|
||||||
|
data.addOrEditDialog.form.STAFFING_ID = STAFFING_ID;
|
||||||
|
} else {
|
||||||
|
data.addOrEditDialog.form = {};
|
||||||
|
}
|
||||||
|
|
||||||
|
await nextTick();
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped></style>
|
|
@ -0,0 +1,96 @@
|
||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<layout-card>
|
||||||
|
<el-descriptions :column="1" border>
|
||||||
|
<el-descriptions-item label="会议标题">
|
||||||
|
{{ detailItems.MEETING_TITLE }}
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="运输企业">
|
||||||
|
{{ detailItems.CORP_NAME }}
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="主持人">
|
||||||
|
{{ detailItems.HOST_PERSON }}
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="记录人">
|
||||||
|
{{ detailItems.RECORDER }}
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="会议时间">
|
||||||
|
{{ detailItems.MEETING_DATE_START }}
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="截止时间">
|
||||||
|
{{ detailItems.MEETING_DATE_END }}
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="会议类型">
|
||||||
|
<template v-if="detailItems.MEETING_TYPE === '1'">
|
||||||
|
安全生产例会
|
||||||
|
</template>
|
||||||
|
<template v-else-if="detailItems.MEETING_TYPE === '2'">
|
||||||
|
安全生产委员会会议
|
||||||
|
</template>
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="会议内容">
|
||||||
|
{{ detailItems.MEETING_CONTENT }}
|
||||||
|
</el-descriptions-item>
|
||||||
|
<!-- <el-descriptions-item label="备注">-->
|
||||||
|
<!-- {{ detailItems.NOTES }}-->
|
||||||
|
<!-- </el-descriptions-item>-->
|
||||||
|
<el-descriptions-item label="远程参会人员">
|
||||||
|
应参会{{ detailItems.totalPersonNum }}/人,实参人数{{
|
||||||
|
detailItems.realPersonNum
|
||||||
|
}}/人
|
||||||
|
</el-descriptions-item>
|
||||||
|
</el-descriptions>
|
||||||
|
<el-table
|
||||||
|
:border="true"
|
||||||
|
:data="detailItems.recipientsList"
|
||||||
|
:show-header="false"
|
||||||
|
>
|
||||||
|
<el-table-column label="NAME1" align="center">
|
||||||
|
<template #default="{ row }">
|
||||||
|
<img :src="row.AVATAR" alt="Avatar" />
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="NAME2" align="center">
|
||||||
|
<template #default="{ row }">
|
||||||
|
{{ row.PRACTITIONER }}<br />
|
||||||
|
{{ row.CONTACT_PHONE }}<br />
|
||||||
|
{{ row.HOME_ADDRESS }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="NAME3" align="center">
|
||||||
|
<template #default="{ row }">
|
||||||
|
<img :src="row.SIGNATUREPICTURE" alt="Signature" />
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
</layout-card>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import { onMounted, reactive } from "vue";
|
||||||
|
import { getSafetyMeetingView } from "@/request/traffic_safety_meeting.js";
|
||||||
|
import { useRoute } from "vue-router";
|
||||||
|
const route = useRoute();
|
||||||
|
const { SAFETY_MEETING_ID } = route.query;
|
||||||
|
const detailItems = reactive({
|
||||||
|
MEETING_TITLE: "",
|
||||||
|
TRANSPORTATIONCOMPANY: "",
|
||||||
|
HOST_PERSON: "",
|
||||||
|
RECORDER: "",
|
||||||
|
MEETING_DATE_START: "",
|
||||||
|
MEETING_DATE_END: "",
|
||||||
|
MEETING_TYPE: "",
|
||||||
|
MEETING_CONTENT: "",
|
||||||
|
recipientsInfo: "",
|
||||||
|
totalPersonNum: "",
|
||||||
|
realPersonNum: "",
|
||||||
|
});
|
||||||
|
|
||||||
|
onMounted(async () => {
|
||||||
|
const response = await getSafetyMeetingView({ SAFETY_MEETING_ID });
|
||||||
|
Object.assign(detailItems, response.pd);
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped></style>
|
|
@ -66,15 +66,22 @@
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item label="从业身份" prop="PRACTITIONER_TYPE">
|
<el-form-item label="人员选择" prop="PERSON">
|
||||||
<el-checkbox-group
|
<div class="flexBox">
|
||||||
v-model="data.form.PRACTITIONER_TYPE"
|
<el-input
|
||||||
@change="handleCheckedCitiesChange"
|
v-model="data.form.PERSON"
|
||||||
>
|
type="textarea"
|
||||||
<el-checkbox v-for="city in cities" :key="city" :label="city">{{
|
placeholder="请选择人员"
|
||||||
city
|
disabled
|
||||||
}}</el-checkbox>
|
></el-input>
|
||||||
</el-checkbox-group>
|
<el-button
|
||||||
|
class="addBtn"
|
||||||
|
type="primary"
|
||||||
|
@click="data.SelectPersonDialogVisible = true"
|
||||||
|
>
|
||||||
|
选择
|
||||||
|
</el-button>
|
||||||
|
</div>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
||||||
|
@ -113,6 +120,12 @@
|
||||||
<div class="tc mt-10">
|
<div class="tc mt-10">
|
||||||
<el-button type="primary" @click="fnSubmit"> 确定 </el-button>
|
<el-button type="primary" @click="fnSubmit"> 确定 </el-button>
|
||||||
</div>
|
</div>
|
||||||
|
<select-person
|
||||||
|
v-model:visible="data.SelectPersonDialogVisible"
|
||||||
|
:list-data="data.listAll"
|
||||||
|
@submit="fnSelectPersonSubmit"
|
||||||
|
@submitall="fnSelectAllRiskSubmit"
|
||||||
|
/>
|
||||||
</layout-card>
|
</layout-card>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -125,17 +138,8 @@ import LayoutUpload from "@/components/upload/index.vue";
|
||||||
import LayoutEditor from "@/components/editor/index.vue";
|
import LayoutEditor from "@/components/editor/index.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 SelectPerson from "@/views/safety_production_related/security_notice/components/select_person.vue";
|
||||||
const formRef = ref(null);
|
const formRef = ref(null);
|
||||||
const cities = [
|
|
||||||
"驾驶员",
|
|
||||||
"押运员",
|
|
||||||
"安全管理员",
|
|
||||||
"装卸员",
|
|
||||||
"安全负责人",
|
|
||||||
"其他",
|
|
||||||
"监控员",
|
|
||||||
];
|
|
||||||
const handleCheckedCitiesChange = () => {};
|
|
||||||
const rules = {
|
const rules = {
|
||||||
MEETING_TITLE: [
|
MEETING_TITLE: [
|
||||||
{ required: true, message: "请输入会议标题", trigger: "blur" },
|
{ required: true, message: "请输入会议标题", trigger: "blur" },
|
||||||
|
@ -168,6 +172,7 @@ const data = reactive({
|
||||||
MEETING_TYPE: "",
|
MEETING_TYPE: "",
|
||||||
MEETING_ADDRESS: "",
|
MEETING_ADDRESS: "",
|
||||||
MEETING_DATE: "",
|
MEETING_DATE: "",
|
||||||
|
PERSON: "",
|
||||||
HOST_PERSON: "",
|
HOST_PERSON: "",
|
||||||
RECORDER: "",
|
RECORDER: "",
|
||||||
fileList: [],
|
fileList: [],
|
||||||
|
@ -179,25 +184,34 @@ const data = reactive({
|
||||||
const handleMeetingTypeChange = (value) => {
|
const handleMeetingTypeChange = (value) => {
|
||||||
data.form.MEETING_TYPE = value;
|
data.form.MEETING_TYPE = value;
|
||||||
};
|
};
|
||||||
|
|
||||||
const fnSubmit = async () => {
|
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) => {
|
||||||
formData.append(key, data.form[key]);
|
if (key === "MEETING_DATE") {
|
||||||
|
const dateRangeString = data.form.MEETING_DATE.join(" , ");
|
||||||
|
formData.append(key, dateRangeString);
|
||||||
|
} else if (!Array.isArray(data.form[key])) {
|
||||||
|
formData.append(key, data.form[key]);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
formData.delete("fileList");
|
// 处理 fileList - 添加文件
|
||||||
|
data.form.fileList.forEach((file) => {
|
||||||
|
if (file.raw) formData.append("FFILE", file.raw);
|
||||||
|
});
|
||||||
|
|
||||||
for (let i = 0; i < data.form.fileList.length; i++) {
|
// 处理 videoList - 添加视频文件
|
||||||
if (data.form.fileList[i].raw)
|
data.form.videoList.forEach((video) => {
|
||||||
formData.append("FFILE", data.form.fileList[i].raw);
|
if (video.raw) formData.append("VVIDEO", video.raw); // 注意: 用不同的字段名区分文件和视频
|
||||||
}
|
});
|
||||||
|
|
||||||
try {
|
try {
|
||||||
await addSafetyMeetingView(formData);
|
await addSafetyMeetingView(formData);
|
||||||
ElMessage.success("添加成功");
|
ElMessage.success("添加成功");
|
||||||
|
// 清空表单
|
||||||
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] = [];
|
||||||
|
@ -218,6 +232,29 @@ const fnUpload = (file) => {
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const fnSelectPersonSubmit = (selectionData) => {
|
||||||
|
const userIds = selectionData.map((item) => item.USER_ID).join(", ");
|
||||||
|
const names = selectionData.map((item) => item.NAME).join(", ");
|
||||||
|
data.form.PERSON_ID = userIds;
|
||||||
|
data.form.PERSON = names;
|
||||||
|
};
|
||||||
|
const fnSelectAllRiskSubmit = (allData) => {
|
||||||
|
const dataList = allData.value;
|
||||||
|
|
||||||
|
const userIds = dataList.map((item) => item.USER_ID).join(", ");
|
||||||
|
const names = dataList.map((item) => item.NAME).join(", ");
|
||||||
|
|
||||||
|
data.form.PERSON_ID = userIds;
|
||||||
|
data.form.PERSON = names;
|
||||||
|
|
||||||
|
data.form.allStatus = 1;
|
||||||
|
data.form.PERSON = "已全部选择";
|
||||||
|
|
||||||
|
console.log("选中的用户ID:", userIds);
|
||||||
|
console.log("选中的用户姓名:", names);
|
||||||
|
console.log("是否全选:", data.form.allStatus);
|
||||||
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
|
|
|
@ -0,0 +1,133 @@
|
||||||
|
<template>
|
||||||
|
<el-dialog v-model="visible" title="选择人员" width="1500">
|
||||||
|
<el-form
|
||||||
|
:model="searchForm"
|
||||||
|
label-width="90px"
|
||||||
|
@submit.prevent="fnResetPagination"
|
||||||
|
>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="5">
|
||||||
|
<el-form-item label="关键字" prop="KEYWORDS">
|
||||||
|
<el-input
|
||||||
|
v-model="searchForm.KEYWORDS"
|
||||||
|
placeholder="请输入关键字"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="5">
|
||||||
|
<el-form-item label="从业类型" prop="PRACTITIONERTYPE">
|
||||||
|
<el-select
|
||||||
|
v-model="searchForm.PRACTITIONERTYPE"
|
||||||
|
placeholder="请选择从业类型"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in PERSONTYPEMENU"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.id"
|
||||||
|
:value="item.name"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label-width="10px">
|
||||||
|
<el-button type="primary" native-type="submit">搜索</el-button>
|
||||||
|
<el-button native-type="reset" @click="fnResetPagination">
|
||||||
|
重置
|
||||||
|
</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-form>
|
||||||
|
<layout-table
|
||||||
|
ref="tableRef"
|
||||||
|
v-model:pagination="pagination"
|
||||||
|
:data="list"
|
||||||
|
row-key="RISKCHECKITEM_ID"
|
||||||
|
@get-data="fnGetData"
|
||||||
|
>
|
||||||
|
<el-table-column reserve-selection type="selection" width="55" />
|
||||||
|
<el-table-column label="序号" width="70">
|
||||||
|
<template #default="{ $index }">
|
||||||
|
{{ serialNumber(pagination, $index) }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="USER_ID" label="用户Id" />
|
||||||
|
<el-table-column prop="NAME" label="姓名" />
|
||||||
|
<el-table-column prop="DEPARTMENT_NAME" label="部门" />
|
||||||
|
<el-table-column prop="PRACTITIONERTYPE" label="从业类型" />
|
||||||
|
</layout-table>
|
||||||
|
<template #footer>
|
||||||
|
<el-button @click="fnClose">取消</el-button>
|
||||||
|
<el-button type="primary" @click="fnAllSubmit"> 全选 </el-button>
|
||||||
|
<el-button type="primary" @click="fnSubmit"> 确定 </el-button>
|
||||||
|
</template>
|
||||||
|
</el-dialog>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import { useVModel } from "@vueuse/core";
|
||||||
|
import { debounce } from "throttle-debounce";
|
||||||
|
import useListData from "@/assets/js/useListData.js";
|
||||||
|
import { watch } from "vue";
|
||||||
|
import { serialNumber } from "@/assets/js/utils.js";
|
||||||
|
import { differenceWith } from "lodash-es";
|
||||||
|
import { getUserListAll } from "@/request/safety_production_related.js";
|
||||||
|
import { PERSONTYPEMENU } from "@/assets/js/constant.js";
|
||||||
|
|
||||||
|
const props = defineProps({
|
||||||
|
visible: {
|
||||||
|
type: Boolean,
|
||||||
|
required: true,
|
||||||
|
default: false,
|
||||||
|
},
|
||||||
|
listData: {
|
||||||
|
type: Array,
|
||||||
|
required: true,
|
||||||
|
default: () => [],
|
||||||
|
},
|
||||||
|
});
|
||||||
|
const emits = defineEmits(["update:visible", "submit", "submitall"]);
|
||||||
|
const visible = useVModel(props, "visible", emits);
|
||||||
|
|
||||||
|
const { list, searchForm, pagination, fnGetData, fnResetPagination, tableRef } =
|
||||||
|
useListData(getUserListAll, {
|
||||||
|
key: "userList",
|
||||||
|
immediate: false,
|
||||||
|
clearSelection: false,
|
||||||
|
});
|
||||||
|
|
||||||
|
const stop = watch(
|
||||||
|
() => props.visible,
|
||||||
|
(value) => {
|
||||||
|
if (value) {
|
||||||
|
fnGetData();
|
||||||
|
stop && stop();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
);
|
||||||
|
const fnClose = () => {
|
||||||
|
visible.value = false;
|
||||||
|
};
|
||||||
|
const fnSubmit = debounce(
|
||||||
|
1000,
|
||||||
|
() => {
|
||||||
|
const selectionData = tableRef.value.getSelectionRows();
|
||||||
|
const listData = differenceWith(
|
||||||
|
selectionData,
|
||||||
|
props.listData,
|
||||||
|
(a, b) => a.RISKCHECKITEM_ID === b.RISKCHECKITEM_ID
|
||||||
|
);
|
||||||
|
fnClose();
|
||||||
|
emits("submit", listData);
|
||||||
|
},
|
||||||
|
{ atBegin: true }
|
||||||
|
);
|
||||||
|
|
||||||
|
const fnAllSubmit = () => {
|
||||||
|
fnClose();
|
||||||
|
emits("submitall", list);
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="scss"></style>
|
|
@ -59,7 +59,7 @@
|
||||||
{{ serialNumber(pagination, $index) }}
|
{{ serialNumber(pagination, $index) }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="从业人员" prop="PRACTITIONER" />
|
<el-table-column label="从业人员" prop="userName" />
|
||||||
<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="IDENTITY_NUMBER" />
|
||||||
<el-table-column label="联系电话" prop="CONTACT_PHONE" />
|
<el-table-column label="联系电话" prop="CONTACT_PHONE" />
|
||||||
|
|
|
@ -207,10 +207,21 @@ const fnSelectPersonSubmit = (selectionData) => {
|
||||||
data.form.PERSON = names;
|
data.form.PERSON = names;
|
||||||
};
|
};
|
||||||
|
|
||||||
const fnSelectAllRiskSubmit = () => {
|
const fnSelectAllRiskSubmit = (allData) => {
|
||||||
|
const dataList = allData.value;
|
||||||
|
|
||||||
|
const userIds = dataList.map((item) => item.USER_ID).join(", ");
|
||||||
|
const names = dataList.map((item) => item.NAME).join(", ");
|
||||||
|
|
||||||
|
data.form.PERSON_ID = userIds;
|
||||||
|
data.form.PERSON = names;
|
||||||
|
|
||||||
data.form.allStatus = 1;
|
data.form.allStatus = 1;
|
||||||
data.PERSON = "已全部选择";
|
data.form.PERSON = "已全部选择";
|
||||||
console.log("是否全选", data.form.allStatus);
|
|
||||||
|
console.log("选中的用户ID:", userIds);
|
||||||
|
console.log("选中的用户姓名:", names);
|
||||||
|
console.log("是否全选:", data.form.allStatus);
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
|
@ -97,7 +97,6 @@ const { list, searchForm, pagination, fnGetData, fnResetPagination, tableRef } =
|
||||||
clearSelection: false,
|
clearSelection: false,
|
||||||
});
|
});
|
||||||
|
|
||||||
// const riskClassificationList = await layoutFnGetRiskClassification();
|
|
||||||
const stop = watch(
|
const stop = watch(
|
||||||
() => props.visible,
|
() => props.visible,
|
||||||
(value) => {
|
(value) => {
|
||||||
|
@ -127,7 +126,7 @@ const fnSubmit = debounce(
|
||||||
|
|
||||||
const fnAllSubmit = () => {
|
const fnAllSubmit = () => {
|
||||||
fnClose();
|
fnClose();
|
||||||
emits("submitall");
|
emits("submitall", list);
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
|
@ -90,11 +90,7 @@
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="CREATETIME" label="创建时间" width="200" />
|
<el-table-column prop="CREATETIME" label="创建时间" width="200" />
|
||||||
<el-table-column
|
<el-table-column prop="CORP_NAME" label="运输企业" width="250">
|
||||||
prop="TRANSPORTATIONCOMPANY"
|
|
||||||
label="运输企业"
|
|
||||||
width="250"
|
|
||||||
>
|
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="操作" width="200"> </el-table-column>
|
<el-table-column label="操作" width="200"> </el-table-column>
|
||||||
<template #button>
|
<template #button>
|
||||||
|
|
Loading…
Reference in New Issue