功能优化

dev
WenShiJun 2024-03-04 11:57:38 +08:00
parent 37f176bd1a
commit 42e79f21be
11 changed files with 97 additions and 102 deletions

View File

@ -40,6 +40,10 @@ export const CUSTOMERTYPEMENU = [
{ id: "委托方", name: "1" },
{ id: "确认方", name: "2" },
];
export const MEETINGTYPEMENU = [
{ id: "安全生产例会", name: "1" },
{ id: "安全生产委员会会议", name: "2" },
];
export const LOCATIONTYPEMENU = [
{ id: "起运地", name: "1" },
{ id: "目的地", name: "2" },

View File

@ -29,9 +29,3 @@ export const layoutFnGetSIGNEDSTATUSClassification = async () => {
});
return ref(resData);
};
export const layoutFnGetMEETINGTYPEClassification = async () => {
const resData = await getLevelsByParentId({
parentId: "eeeec1cbabe7406083994447d00d0d4a",
});
return ref(resData);
};

View File

@ -97,7 +97,6 @@
</template>
<script setup>
import { layoutFnGetMEETINGTYPEClassification } from "@/request/safety_production_related.js";
import { LOCATIONTYPEMENU } from "@/assets/js/constant";
import LayoutTerritory from "@/components/territory/index.vue";
import { getSecurityPerson } from "@/request/waybill_registration.js";
@ -127,12 +126,6 @@ const rules = {
LONGITUDE: [{ required: true, message: "请选择经度", trigger: "change" }],
LATITUDE: [{ required: true, message: "请选择维度", trigger: "change" }],
};
const relatedClassificationTempList =
await layoutFnGetMEETINGTYPEClassification();
const relatedClassificationList = [];
JSON.parse(relatedClassificationTempList.value.zTreeNodes).forEach((e) => {
relatedClassificationList.push({ name: e.id, BIANMA: e.name });
});
const data = reactive({
mapDialogVisible: false,

View File

@ -59,11 +59,11 @@
</el-table-column>
<el-table-column prop="ORIGIN" label="起运地" width="150">
</el-table-column>
<el-table-column prop="DESTINATION" label="目的地" width="120">
<el-table-column prop="DESTINATION" label="目的地" width="150">
</el-table-column>
<el-table-column prop="SHIPPINGDATE" label="起止时间" width="150">
<el-table-column prop="SHIPPINGDATE" label="起止时间" width="180">
</el-table-column>
<el-table-column label="操作" width="180">
<el-table-column label="操作" width="120">
<template #default="{ row }">
<el-button
type="primary"
@ -86,19 +86,11 @@
link
@click="deleteItem(row.SAFETY_MEETING_ID)"
>
授权
</el-button>
<el-button
type="danger"
text
link
@click="deleteItem(row.SAFETY_MEETING_ID)"
>
解聘
删除
</el-button>
</template>
</el-table-column>
<template #button>
<el-button
type="primary"

View File

@ -178,7 +178,7 @@
<el-form-item class="end">
<el-button
type="primary"
@click="data.selectRiskDialogVisible = true"
@click="data.SelectPersonDialogVisible = true"
>
选择其他存在风险
</el-button>
@ -219,9 +219,9 @@
@get-data="fnAddRiskSubmit"
/>
<select-risk
v-model:visible="data.selectRiskDialogVisible"
v-model:visible="data.SelectPersonDialogVisible"
:list-data="data.listAll"
@submit="fnSelectRiskSubmit"
@submit="fnSelectPersonSubmit"
/>
<add-inspection-route
v-model:visible="data.inspectionRouteDialog.visible"
@ -252,7 +252,7 @@ import { debounce } from "throttle-debounce";
import useFormValidate from "@/assets/js/useFormValidate.js";
import { ElMessage } from "element-plus";
import AddRisk from "@/views/risk_control/ledger/components/add.vue";
import SelectRisk from "./components/select_risk.vue";
import SelectPerson from "./components/select_risk.vue";
const route = useRoute();
const router = useRouter();
@ -303,7 +303,7 @@ const data = reactive({
list: [],
listAll: [],
searchForm: {},
selectRiskDialogVisible: false,
SelectPersonDialogVisible: false,
addOrEditDialog: {
visible: false,
form: {
@ -399,7 +399,7 @@ const fnAddRiskSubmit = (item) => {
data.listAll.push(item);
fnTableSelection();
};
const fnSelectRiskSubmit = (listData) => {
const fnSelectPersonSubmit = (listData) => {
data.list.push(...listData);
data.listAll.push(...listData);
fnTableSelection();

View File

@ -24,10 +24,10 @@
@change="handleMeetingTypeChange"
>
<el-option
v-for="item in relatedClassificationList"
:key="item.BIANMA"
:label="item.NAME"
:value="item.BIANMA"
v-for="item in MEETINGTYPEMENU"
:key="item.id"
:label="item.id"
:value="item.name"
/>
</el-select>
</el-form-item>
@ -78,13 +78,25 @@
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="会议附件" prop="fileList">
<el-col :span="12">
<el-form-item label="会议文本附件" prop="fileList">
<layout-upload
v-model:file-list="data.form.fileList"
accept=".pdf,.mp4"
accept=".pdf"
delete-to-server
:limit="9"
:before-upload="fnUpload"
/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="会议视频附件" prop="videoList">
<layout-upload
v-model:file-list="data.form.videoList"
accept=".mp4"
delete-to-server
:limit="9"
:before-upload="fnUpload"
/>
</el-form-item>
</el-col>
@ -105,12 +117,10 @@
</template>
<script setup>
import {
layoutFnGetMEETINGTYPEClassification,
getUserListAll,
} from "@/request/safety_production_related.js";
import { getUserListAll } from "@/request/safety_production_related.js";
import { addSafetyMeetingView } from "@/request/traffic_safety_meeting.js";
import { reactive, ref } from "vue";
import { MEETINGTYPEMENU } from "@/assets/js/constant.js";
import LayoutUpload from "@/components/upload/index.vue";
import LayoutEditor from "@/components/editor/index.vue";
import useFormValidate from "@/assets/js/useFormValidate.js";
@ -151,12 +161,6 @@ const fnGetUnitsList = async () => {
data.unitsList = resData.varList;
};
fnGetUnitsList();
const relatedClassificationTempList =
await layoutFnGetMEETINGTYPEClassification();
const relatedClassificationList = [];
JSON.parse(relatedClassificationTempList.value.zTreeNodes).forEach((e) => {
relatedClassificationList.push({ name: e.id, BIANMA: e.name });
});
const data = reactive({
form: {
@ -167,6 +171,7 @@ const data = reactive({
HOST_PERSON: "",
RECORDER: "",
fileList: [],
videoList: [],
PRACTITIONER_TYPE: [],
NOTIFICATIONCONTENT: "",
},
@ -174,6 +179,7 @@ const data = reactive({
const handleMeetingTypeChange = (value) => {
data.form.MEETING_TYPE = value;
};
const fnSubmit = async () => {
await useFormValidate(formRef);
const formData = new FormData();
@ -203,6 +209,15 @@ const fnSubmit = async () => {
ElMessage.error("添加失败");
}
};
const fnUpload = (file) => {
const isLt100M = file.size / 1024 / 1024 < 100;
if (!isLt100M) {
ElMessage.error("文件大小不能超过100M");
return false;
}
return true;
};
</script>
<style scoped lang="scss">

View File

@ -24,11 +24,6 @@
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="联系电话" prop="CONTACT_PHONE">
<el-input v-model="searchForm.CONTACT_PHONE" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="参会状态" prop="ATTENDANCE_STATUS">
<el-select v-model="searchForm.ATTENDANCE_STATUS">
@ -39,11 +34,6 @@
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="身份证号" prop="IDENTITY_NUMBER">
<el-input v-model="searchForm.IDENTITY_NUMBER" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item>
<el-button type="primary" native-type="submit">搜索</el-button>
@ -57,12 +47,12 @@
</el-card>
<layout-card>
<layout-table
:data="list"
@get-data="fnGetData"
v-model:pagination="pagination"
:data="list"
stripe
border
show-header
@get-data="fnGetData"
>
<el-table-column label="序号" width="60">
<template #default="{ $index }">

View File

@ -16,9 +16,9 @@
<el-form-item label="会议类型" prop="MEETING_TYPE">
<el-select v-model="searchForm.MEETING_TYPE">
<el-option
v-for="item in relatedClassificationList"
:key="item.BIANMA"
:label="item.name"
v-for="item in MEETINGTYPEMENU"
:key="item.id"
:label="item.id"
:value="item.name"
/>
</el-select>
@ -47,7 +47,12 @@
</template>
</el-table-column>
<el-table-column prop="MEETING_TITLE" label="会议标题" width="250" />
<el-table-column prop="MEETING_TYPE" label="会议类型" width="250" />
<el-table-column prop="MEETING_TYPE" label="会议类型" width="250">
<template #default="{ row }">
<div v-if="row.MEETING_TYPE === '1'"></div>
<div v-else-if="row.MEETING_TYPE === '2'">安全生产委员会会议</div>
</template>
</el-table-column>
<el-table-column label="会议状态" prop="SIGNEDDATE">
<template #default="{ row }">
<el-tag v-if="row.MEETING_STATUS === 1">{{ "" }}</el-tag>
@ -62,7 +67,7 @@
</el-table-column>
<el-table-column prop="HOST_PERSON" label="主持人" />
<el-table-column prop="MEETING_ADDRESS" label="会议地点" />
<el-table-column prop="TRANSPORTATIONCOMPANY" label="运输企业" />
<el-table-column prop="CORP_NAME" label="运输企业" />
<el-table-column label="操作" width="180">
<template #default="{ row }">
<el-button
@ -131,13 +136,13 @@
<script setup>
import { serialNumber } from "@/assets/js/utils";
import useListData from "@/assets/js/useListData.js";
import { onMounted, reactive, ref } from "vue";
import { MEETINGTYPEMENU } from "@/assets/js/constant.js";
import { reactive } from "vue";
import {
getSafetyMeetingList,
setSafetyMeetingDelete,
} from "@/request/traffic_safety_meeting.js";
import router from "@/router/index.js";
import { layoutFnGetMEETINGTYPEClassification } from "@/request/safety_production_related.js";
import { ElMessage, ElMessageBox } from "element-plus";
const { list, pagination, searchForm, fnGetData, fnResetPagination } =
@ -157,12 +162,6 @@ const deleteItem = async (value) => {
ElMessage.success("删除成功");
fnGetData();
};
const relatedClassificationList = ref(null);
onMounted(async () => {
const data = await layoutFnGetMEETINGTYPEClassification();
relatedClassificationList.value = JSON.parse(data.value.zTreeNodes);
});
</script>
<style scoped></style>

View File

@ -6,7 +6,7 @@
{{ detailItems.MEETING_TITLE }}
</el-descriptions-item>
<el-descriptions-item label="运输企业">
{{ detailItems.TRANSPORTATIONCOMPANY }}
{{ detailItems.CORP_NAME }}
</el-descriptions-item>
<el-descriptions-item label="主持人">
{{ detailItems.HOST_PERSON }}
@ -21,14 +21,19 @@
{{ detailItems.MEETING_DATE_END }}
</el-descriptions-item>
<el-descriptions-item label="会议类型">
{{ detailItems.MEETING_TYPE }}
<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.NOTES }}-->
<!-- </el-descriptions-item>-->
<el-descriptions-item label="远程参会人员">
应参会{{ detailItems.totalPersonNum }}/实参人数{{
detailItems.realPersonNum

View File

@ -13,21 +13,6 @@
<el-input v-model="data.form.TITLE" placeholder="请输入内容" />
</el-form-item>
</el-col>
<!-- <el-col :span="8">-->
<!-- <el-form-item label="运输企业" prop="TRANSPORTATIONCOMPANY">-->
<!-- <el-select-->
<!-- v-model="data.form.TRANSPORTATIONCOMPANY"-->
<!-- placeholder="请选择运输企业"-->
<!-- >-->
<!-- <el-option-->
<!-- v-for="item in data.personList"-->
<!-- :key="item.CORPINFO_ID"-->
<!-- :label="item.CORP_NAME"-->
<!-- :value="item.CORP_NAME"-->
<!-- />-->
<!-- </el-select>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<el-col :span="5">
<el-form-item label="通知等级" prop="LEVEL">
<el-select v-model="data.form.LEVEL" placeholder="请选择通知等级">
@ -52,7 +37,7 @@
<el-button
class="addBtn"
type="primary"
@click="data.selectRiskDialogVisible = true"
@click="data.SelectPersonDialogVisible = true"
>
选择
</el-button>
@ -105,10 +90,10 @@
<div class="tc mt-10">
<el-button type="primary" @click="fnSubmit"> </el-button>
</div>
<select-risk
v-model:visible="data.selectRiskDialogVisible"
<select-person
v-model:visible="data.SelectPersonDialogVisible"
:list-data="data.listAll"
@submit="fnSelectRiskSubmit"
@submit="fnSelectPersonSubmit"
@submitall="fnSelectAllRiskSubmit"
/>
</layout-card>
@ -123,7 +108,7 @@ import {
import { onMounted, reactive, ref } from "vue";
import LayoutUpload from "@/components/upload/index.vue";
import LayoutEditor from "@/components/editor/index.vue";
import SelectRisk from "./components/select_person.vue";
import SelectPerson from "./components/select_person.vue";
import useFormValidate from "@/assets/js/useFormValidate.js";
import { ElMessage } from "element-plus";
import { getSecurityPerson } from "@/request/waybill_registration.js";
@ -181,6 +166,7 @@ const fnSubmit = async () => {
}
});
formData.append("PERSON_ID", data.form.PERSON_ID);
data.form.fileList.forEach((file) => {
if (file.raw) {
formData.append("fileList", file.raw);
@ -214,7 +200,7 @@ const fnSubmit = async () => {
}
};
const fnSelectRiskSubmit = (selectionData) => {
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;

View File

@ -2,11 +2,11 @@
<el-dialog v-model="visible" title="选择人员" width="1500">
<el-form
:model="searchForm"
label-width="60px"
label-width="90px"
@submit.prevent="fnResetPagination"
>
<el-row>
<el-col :span="6">
<el-col :span="5">
<el-form-item label="关键字" prop="KEYWORDS">
<el-input
v-model="searchForm.KEYWORDS"
@ -14,6 +14,21 @@
/>
</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>
@ -40,6 +55,7 @@
<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>
@ -57,6 +73,7 @@ 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: {