forked from integrated_whb/integrated_whb_vue
commit
62597aa135
2
.env
2
.env
|
@ -1,4 +1,4 @@
|
|||
VITE_BASE_URL=http://192.168.0.62:8093/
|
||||
VITE_BASE_URL=http://192.168.0.42:8099/
|
||||
VITE_PROXY=/api/
|
||||
VITE_PROXY_QAAQ=/qaaq_api/
|
||||
VITE_QAAQ_URL=https://gateway.qhdsafety.com/
|
||||
|
|
|
@ -24,7 +24,7 @@ export default {
|
|||
},
|
||||
bgColor: {
|
||||
type: String,
|
||||
default: '#FFFFFF'
|
||||
default: ''
|
||||
},
|
||||
isCrop: {
|
||||
type: Boolean,
|
||||
|
|
|
@ -18,6 +18,71 @@ export const MENU = [
|
|||
{ title: "综合管理", model: MODEL["5"] },
|
||||
{ title: "定位管理", model: MODEL["6"] },
|
||||
];
|
||||
// 安全生成及电子运单管理
|
||||
export const VEHICLEMENU = [
|
||||
{ title: "鄂A35373", model: MODEL["1"] },
|
||||
{ title: "渝B73752", model: MODEL["2"] },
|
||||
{ title: "川C87376", model: MODEL["3"] },
|
||||
];
|
||||
export const PRACTITIONERMENU = [
|
||||
{ title: "李某某", model: MODEL["1"] },
|
||||
{ title: "张某某", model: MODEL["2"] },
|
||||
{ title: "刘某某", model: MODEL["3"] },
|
||||
];
|
||||
export const TRUCKMENU = [
|
||||
{ title: "货AA35373", model: MODEL["1"] },
|
||||
{ title: "货B73752", model: MODEL["2"] },
|
||||
{ title: "货C87376", model: MODEL["3"] },
|
||||
];
|
||||
export const PERSONTYPEMENU = [
|
||||
{ title: "其他", model: MODEL["1"] },
|
||||
{ title: "驾驶员", model: MODEL["2"] },
|
||||
{ title: "监控员", model: MODEL["3"] },
|
||||
{ title: "押运员", model: MODEL["4"] },
|
||||
{ title: "安全负责人", model: MODEL["5"] },
|
||||
];
|
||||
export const CLIENTMENU = [
|
||||
{ title: "李某某", model: MODEL["1"] },
|
||||
{ title: "程某某", model: MODEL["2"] },
|
||||
{ title: "方某某", model: MODEL["3"] },
|
||||
];
|
||||
export const CONFIRMMENU = [
|
||||
{ title: "薛某某", model: MODEL["1"] },
|
||||
{ title: "马某某", model: MODEL["2"] },
|
||||
{ title: "林某某", model: MODEL["3"] },
|
||||
];
|
||||
export const STARTINGMENU = [
|
||||
{ title: "河北", model: MODEL["1"] },
|
||||
{ title: "河南", model: MODEL["2"] },
|
||||
{ title: "山东", model: MODEL["3"] },
|
||||
{ title: "山西", model: MODEL["4"] },
|
||||
];
|
||||
export const ENDMENU = [
|
||||
{ title: "广东", model: MODEL["1"] },
|
||||
{ title: "广西", model: MODEL["2"] },
|
||||
{ title: "湖南", model: MODEL["3"] },
|
||||
{ title: "湖北", model: MODEL["4"] },
|
||||
];
|
||||
export const CUSTOMERTYPEMENU = [
|
||||
{ title: "委托方", model: MODEL["1"] },
|
||||
{ title: "确认方", model: MODEL["2"] },
|
||||
];
|
||||
export const LOCATIONTYPEMENU = [
|
||||
{ title: "公司", model: MODEL["1"] },
|
||||
{ title: "仓库", model: MODEL["2"] },
|
||||
{ title: "中转站", model: MODEL["3"] },
|
||||
];
|
||||
export const LOCATIONNAMEMENU = [
|
||||
{ title: "中科", model: MODEL["1"] },
|
||||
{ title: "中软", model: MODEL["2"] },
|
||||
{ title: "中天", model: MODEL["3"] },
|
||||
];
|
||||
export const BOROUGHMENU = [
|
||||
{ title: "湖北", model: MODEL["1"] },
|
||||
{ title: "湖南", model: MODEL["2"] },
|
||||
{ title: "四川", model: MODEL["3"] },
|
||||
];
|
||||
|
||||
export const PRINT_STYLE =
|
||||
'<style type="text/css" media="print">\n' +
|
||||
" @page { size: landscape; }\n" +
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
import { post, upload } from "@/request/axios.js";
|
||||
|
||||
export const getSecurityCustomerList = (params) =>
|
||||
post("/securitycustomer/listForSecurityCustomerManagement", params); // 客户管理列表
|
||||
|
||||
export const addSafetyCustomerView = (params) =>
|
||||
upload("/securitycustomer/add", params); // 添加运单登记
|
|
@ -0,0 +1,7 @@
|
|||
import { post } from "@/request/axios.js";
|
||||
|
||||
export const getSecurityLocationList = (params) =>
|
||||
post("/securitylocation/listForSecurityLocationManagement", params); // 客户管理列表
|
||||
|
||||
export const addSafetyLocationView = (params) =>
|
||||
post("/securitylocation/add", params); // 添加运单登记
|
|
@ -8,11 +8,13 @@ export const getSecurityNotice = (params) =>
|
|||
post("/securitynotice/getAllReadDetail", params); // 阅读详情
|
||||
export const dateteSecurityNotice = (params) =>
|
||||
post("/securitynotice/delete", params); // 安全通知删除
|
||||
export const dateteSecurityAllNotice = (params) =>
|
||||
post("/securitynotice/deleteAll", params); // 安全通知批量删除
|
||||
export const getSecurityNoticeInfo = (params) =>
|
||||
post("/securitynotice/goEdit", params); // 安全通知详情
|
||||
export const addSecurityNotice = (params) =>
|
||||
upload("/securitynotice/add", params); // 添加安全通知
|
||||
export const getUserListAll = (params) => post("/user/listUserByCorp", params);
|
||||
export const getUserListAll = (params) => post("/user/listSelect", params);
|
||||
|
||||
export const layoutFnGetNotificationsClassification = async () => {
|
||||
const resData = await getLevelsByParentId({
|
||||
|
|
|
@ -0,0 +1,10 @@
|
|||
import { post, upload } from "@/request/axios.js";
|
||||
|
||||
export const getSecurityWaybillreList = (params) =>
|
||||
post("/waybillregistration/listForSecurityWaybillre", params); // 运单登记列表
|
||||
|
||||
export const getSecurityPerson = (params) =>
|
||||
post("/waybillregistration/forSecurityPerson", params); // 部门人员信息
|
||||
|
||||
export const addSafetyThingsChecView = (params) =>
|
||||
upload("/waybillregistration/add", params); // 添加运单登记
|
|
@ -0,0 +1,156 @@
|
|||
<template>
|
||||
<layout-card>
|
||||
<el-form
|
||||
ref="formRef"
|
||||
:model="data.form"
|
||||
:rules="rules"
|
||||
label-width="175px"
|
||||
>
|
||||
<!-- 承运信息 -->
|
||||
<el-divider content-position="left">添加</el-divider>
|
||||
<el-row :gutter="20">
|
||||
<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.unitsList"
|
||||
:key="item.CORPINFO_ID"
|
||||
:label="item.CORP_NAME"
|
||||
:value="item.CORP_NAME"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="客户类型" prop="CUSTOMERTYPE">
|
||||
<el-select
|
||||
v-model="data.form.CUSTOMERTYPE"
|
||||
placeholder="请选择客户类型"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in CUSTOMERTYPEMENU"
|
||||
:key="item.title"
|
||||
:label="item.title"
|
||||
:value="item.title"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="客户名称" prop="CUSTOMERNAME">
|
||||
<el-input
|
||||
v-model="data.form.CUSTOMERNAME"
|
||||
placeholder="请输入客户名称"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="联系人" prop="CONTACT">
|
||||
<el-input v-model="data.form.CONTACT" placeholder="请输入联系人" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="联系电话" prop="CONTACTPHONE">
|
||||
<el-input
|
||||
v-model="data.form.CONTACTPHONE"
|
||||
placeholder="请输入联系电话"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="客户地址" prop="CUSTOMERADDRESS">
|
||||
<el-input
|
||||
v-model="data.form.CUSTOMERADDRESS"
|
||||
placeholder="请输入客户地址"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<div class="tc mt-10">
|
||||
<el-button type="primary" @click="fnSubmit">确定</el-button>
|
||||
</div>
|
||||
</layout-card>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { layoutFnGetMEETINGTYPEClassification } from "@/request/safety_production_related.js";
|
||||
import { CUSTOMERTYPEMENU } from "@/assets/js/constant";
|
||||
import { getSecurityPerson } from "@/request/waybill_registration.js";
|
||||
import { onMounted, reactive, ref } from "vue";
|
||||
import useFormValidate from "@/assets/js/useFormValidate.js";
|
||||
import { ElMessage } from "element-plus";
|
||||
import { addSafetyCustomerView } from "@/request/customer_management.js";
|
||||
|
||||
const formRef = ref(null);
|
||||
const rules = {
|
||||
TRANSPORTATIONCOMPANY: [
|
||||
{ required: true, message: "请输入运输企业名称", trigger: "blur" },
|
||||
],
|
||||
CUSTOMERTYPE: [
|
||||
{ required: true, message: "请输入客户类型", trigger: "blur" },
|
||||
],
|
||||
CUSTOMERNAME: [
|
||||
{ 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({
|
||||
form: {
|
||||
TRANSPORTATIONCOMPANY: "",
|
||||
CUSTOMERTYPE: "",
|
||||
CUSTOMERNAME: "",
|
||||
CONTACT: "",
|
||||
CONTACTPHONE: "",
|
||||
CUSTOMERADDRESS: "",
|
||||
unitsList: [],
|
||||
},
|
||||
});
|
||||
|
||||
onMounted(async () => {
|
||||
await fnPerson();
|
||||
});
|
||||
const fnPerson = async () => {
|
||||
const resData = await getSecurityPerson({});
|
||||
data.unitsList = [resData.pd];
|
||||
};
|
||||
const fnSubmit = async () => {
|
||||
await useFormValidate(formRef);
|
||||
const formData = new FormData();
|
||||
|
||||
Object.keys(data.form).forEach((key) => {
|
||||
formData.append(key, data.form[key]);
|
||||
});
|
||||
|
||||
await addSafetyCustomerView(formData);
|
||||
ElMessage.success("添加成功");
|
||||
Object.keys(data.form).forEach((key) => {
|
||||
if (Array.isArray(data.form[key])) {
|
||||
data.form[key] = [];
|
||||
} else {
|
||||
data.form[key] = "";
|
||||
}
|
||||
});
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.flexBox {
|
||||
display: flex;
|
||||
align-items: flex-end;
|
||||
|
||||
.addBtn {
|
||||
margin-left: 12px;
|
||||
}
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,120 @@
|
|||
<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="CUSTOMERTYPE">
|
||||
<el-select v-model="searchForm.CUSTOMERTYPE">
|
||||
<el-option
|
||||
v-for="item in CUSTOMERTYPEMENU"
|
||||
:key="item.title"
|
||||
:label="item.title"
|
||||
:value="item.title"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="运输企业" prop="TRANSPORTATIONCOMPANY">
|
||||
<el-select v-model="searchForm.TRANSPORTATIONCOMPANY">
|
||||
<el-option
|
||||
v-for="item in data.unitsList"
|
||||
:key="item.CORPINFO_ID"
|
||||
:label="item.CORP_NAME"
|
||||
:value="item.CORP_NAME"
|
||||
/>
|
||||
</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"
|
||||
@get-data="fnGetData"
|
||||
>
|
||||
<el-table-column type="selection" width="55"> </el-table-column>
|
||||
<el-table-column label="序号" width="60">
|
||||
<template #default="{ $index }">
|
||||
{{ serialNumber(pagination, $index) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="CUSTOMERTYPE" label="客户类型" width="200" />
|
||||
<el-table-column prop="CUSTOMERNAME" label="客户类型" width="200" />
|
||||
<el-table-column prop="CONTACT" label="联系人" width="200" />
|
||||
<el-table-column prop="CONTACTPHONE" label="联系电话" width="150" />
|
||||
<el-table-column prop="CUSTOMERADDRESS" label="客户地址" width="200" />
|
||||
<el-table-column
|
||||
prop="TRANSPORTATIONCOMPANY"
|
||||
label="运输企业"
|
||||
width="150"
|
||||
/>
|
||||
<el-table-column prop="CREATETIME" label="创建时间" width="200" />
|
||||
<el-table-column label="操作" width="200"> </el-table-column>
|
||||
<template #button>
|
||||
<el-button
|
||||
type="primary"
|
||||
@click="
|
||||
router.push({
|
||||
path: '/electronic_waybill_management/customer_management/add',
|
||||
})
|
||||
"
|
||||
>
|
||||
添加
|
||||
</el-button>
|
||||
</template>
|
||||
</layout-table>
|
||||
</layout-card>
|
||||
<edit
|
||||
v-model:visible="data.analysisDialog.visible"
|
||||
:info="data.analysisDialog.info"
|
||||
@get-data="fnResetPagination"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { serialNumber } from "@/assets/js/utils";
|
||||
import useListData from "@/assets/js/useListData.js";
|
||||
import { onMounted, reactive, ref } from "vue";
|
||||
import router from "@/router/index.js";
|
||||
import { getSecurityCustomerList } from "@/request/customer_management.js";
|
||||
import { CUSTOMERTYPEMENU } from "@/assets/js/constant.js";
|
||||
import { getSecurityPerson } from "@/request/waybill_registration.js";
|
||||
|
||||
const tableRef = ref(null);
|
||||
const { list, pagination, searchForm, fnGetData, fnResetPagination } =
|
||||
useListData(getSecurityCustomerList);
|
||||
const data = reactive({
|
||||
analysisDialog: {
|
||||
visible: false,
|
||||
info: {},
|
||||
unitsList: [],
|
||||
},
|
||||
});
|
||||
onMounted(async () => {
|
||||
await fnPerson();
|
||||
});
|
||||
const fnPerson = async () => {
|
||||
const resData = await getSecurityPerson({});
|
||||
data.unitsList = [resData.pd];
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped></style>
|
|
@ -0,0 +1,198 @@
|
|||
<template>
|
||||
<layout-card>
|
||||
<el-form
|
||||
ref="formRef"
|
||||
:model="data.form"
|
||||
:rules="rules"
|
||||
label-width="175px"
|
||||
>
|
||||
<el-divider content-position="left">添加</el-divider>
|
||||
<el-row :gutter="20">
|
||||
<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.unitsList"
|
||||
:key="item.CORPINFO_ID"
|
||||
:label="item.CORP_NAME"
|
||||
:value="item.CORP_NAME"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="地点类型" prop="LOCATIONTYPE">
|
||||
<el-select
|
||||
v-model="data.form.LOCATIONTYPE"
|
||||
placeholder="请选择地点类型"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in LOCATIONTYPEMENU"
|
||||
:key="item.title"
|
||||
:label="item.title"
|
||||
:value="item.title"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="地点名称" prop="LOCATIONNAME">
|
||||
<el-select
|
||||
v-model="data.form.LOCATIONNAME"
|
||||
placeholder="请选择地点名称"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in LOCATIONNAMEMENU"
|
||||
:key="item.title"
|
||||
:label="item.title"
|
||||
:value="item.title"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="行政区域" prop="ADMINISTRATIVEREGIONS">
|
||||
<el-select
|
||||
v-model="data.form.ADMINISTRATIVEREGIONS"
|
||||
placeholder="请选择行政区域"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in BOROUGHMENU"
|
||||
:key="item.title"
|
||||
:label="item.title"
|
||||
:value="item.title"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="地址详情" prop="ADDRESSDETAILS">
|
||||
<el-input
|
||||
v-model="data.form.ADDRESSDETAILS"
|
||||
placeholder="请输入地址详情"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="经度/纬度" prop="LONGITUDE">
|
||||
<div style="flex: 1; display: flex">
|
||||
<el-input
|
||||
:model-value="
|
||||
(data.form.LONGITUDE ?? '') + '-' + (data.form.LATITUDE ?? '')
|
||||
"
|
||||
disabled
|
||||
style="flex: 1"
|
||||
/>
|
||||
<el-button
|
||||
type="primary"
|
||||
class="ml-10"
|
||||
@click="data.mapDialogVisible = true"
|
||||
>
|
||||
地图定位
|
||||
</el-button>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<div class="tc mt-10">
|
||||
<el-button type="primary" @click="fnSubmit">确定</el-button>
|
||||
</div>
|
||||
</layout-card>
|
||||
<map-dialog
|
||||
v-model:visible="data.mapDialogVisible"
|
||||
v-model:latitude="data.form.LATITUDE"
|
||||
v-model:longitude="data.form.LONGITUDE"
|
||||
/>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { layoutFnGetMEETINGTYPEClassification } from "@/request/safety_production_related.js";
|
||||
import {
|
||||
LOCATIONTYPEMENU,
|
||||
LOCATIONNAMEMENU,
|
||||
BOROUGHMENU,
|
||||
} from "@/assets/js/constant";
|
||||
import { getSecurityPerson } from "@/request/waybill_registration.js";
|
||||
import { reactive, ref, onMounted } from "vue";
|
||||
import useFormValidate from "@/assets/js/useFormValidate.js";
|
||||
import { ElMessage } from "element-plus";
|
||||
import { addSafetyLocationView } from "@/request/location_management.js";
|
||||
import MapDialog from "@/views/enterprise_management/information/components/map.vue";
|
||||
|
||||
const formRef = ref(null);
|
||||
const rules = {
|
||||
TRANSPORTATIONCOMPANY: [
|
||||
{ required: true, message: "请输入运输企业名称", trigger: "blur" },
|
||||
],
|
||||
LOCATIONTYPE: [
|
||||
{ required: true, message: "请输入地点类型", trigger: "blur" },
|
||||
],
|
||||
LOCATIONNAME: [
|
||||
{ required: true, message: "请选择地点名称", trigger: "change" },
|
||||
],
|
||||
ADMINISTRATIVEREGIONS: [
|
||||
{ required: true, message: "请选择行政区域", trigger: "change" },
|
||||
],
|
||||
ADDRESSDETAILS: [
|
||||
{ required: true, message: "请输入行政区域", trigger: "change" },
|
||||
],
|
||||
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,
|
||||
form: {
|
||||
TRANSPORTATIONCOMPANY: "",
|
||||
LOCATIONTYPE: "",
|
||||
LOCATIONNAME: "",
|
||||
ADMINISTRATIVEREGIONS: "",
|
||||
ADDRESSDETAILS: "",
|
||||
LONGITUDE: "",
|
||||
LATITUDE: "",
|
||||
unitsList: [],
|
||||
},
|
||||
});
|
||||
|
||||
onMounted(async () => {
|
||||
await fnPerson();
|
||||
});
|
||||
const fnPerson = async () => {
|
||||
const resData = await getSecurityPerson({});
|
||||
data.unitsList = [resData.pd];
|
||||
};
|
||||
const fnSubmit = async () => {
|
||||
await useFormValidate(formRef);
|
||||
await addSafetyLocationView(data.form);
|
||||
ElMessage.success("添加成功");
|
||||
Object.keys(data.form).forEach((key) => {
|
||||
if (Array.isArray(data.form[key])) {
|
||||
data.form[key] = [];
|
||||
} else {
|
||||
data.form[key] = "";
|
||||
}
|
||||
});
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.flexBox {
|
||||
display: flex;
|
||||
align-items: flex-end;
|
||||
|
||||
.addBtn {
|
||||
margin-left: 12px;
|
||||
}
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,118 @@
|
|||
<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="LOCATIONTYPE">
|
||||
<el-select v-model="searchForm.LOCATIONTYPE">
|
||||
<el-option
|
||||
v-for="item in LOCATIONTYPEMENU"
|
||||
:key="item.title"
|
||||
:label="item.title"
|
||||
:value="item.title"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="运输企业" prop="TRANSPORTATIONCOMPANY">
|
||||
<el-select v-model="searchForm.TRANSPORTATIONCOMPANY">
|
||||
<el-option
|
||||
v-for="item in data.unitsList"
|
||||
:key="item.CORPINFO_ID"
|
||||
:label="item.CORP_NAME"
|
||||
:value="item.CORP_NAME"
|
||||
/>
|
||||
</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"
|
||||
@get-data="fnGetData"
|
||||
>
|
||||
<el-table-column type="selection" width="55"> </el-table-column>
|
||||
<el-table-column label="序号" width="60">
|
||||
<template #default="{ $index }">
|
||||
{{ serialNumber(pagination, $index) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="LOCATIONTYPE" label="地点类型" width="250" />
|
||||
<el-table-column prop="LOCATIONNAME" label="地点名称" width="300" />
|
||||
<el-table-column prop="ADDRESSDETAILS" label="地址详情" width="300" />
|
||||
<el-table-column
|
||||
prop="TRANSPORTATIONCOMPANY"
|
||||
label="运输企业"
|
||||
width="250"
|
||||
/>
|
||||
<el-table-column prop="CREATETIME" label="创建时间" width="200" />
|
||||
<el-table-column label="操作" width="200"> </el-table-column>
|
||||
<template #button>
|
||||
<el-button
|
||||
type="primary"
|
||||
@click="
|
||||
router.push({
|
||||
path: '/electronic_waybill_management/location_managemen/add',
|
||||
})
|
||||
"
|
||||
>
|
||||
添加
|
||||
</el-button>
|
||||
</template>
|
||||
</layout-table>
|
||||
</layout-card>
|
||||
<edit
|
||||
v-model:visible="data.analysisDialog.visible"
|
||||
:info="data.analysisDialog.info"
|
||||
@get-data="fnResetPagination"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { serialNumber } from "@/assets/js/utils";
|
||||
import useListData from "@/assets/js/useListData.js";
|
||||
import { onMounted, reactive, ref } from "vue";
|
||||
import router from "@/router/index.js";
|
||||
import { LOCATIONTYPEMENU } from "@/assets/js/constant.js";
|
||||
import { getSecurityPerson } from "@/request/waybill_registration.js";
|
||||
import { getSecurityLocationList } from "@/request/location_management.js";
|
||||
|
||||
const tableRef = ref(null);
|
||||
const { list, pagination, searchForm, fnGetData, fnResetPagination } =
|
||||
useListData(getSecurityLocationList);
|
||||
const data = reactive({
|
||||
analysisDialog: {
|
||||
visible: false,
|
||||
info: {},
|
||||
unitsList: [],
|
||||
},
|
||||
});
|
||||
onMounted(async () => {
|
||||
await fnPerson();
|
||||
});
|
||||
const fnPerson = async () => {
|
||||
const resData = await getSecurityPerson({});
|
||||
data.unitsList = [resData.pd];
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped></style>
|
|
@ -0,0 +1,385 @@
|
|||
<template>
|
||||
<layout-card>
|
||||
<el-form
|
||||
ref="formRef"
|
||||
:model="data.form"
|
||||
:rules="rules"
|
||||
label-width="175px"
|
||||
>
|
||||
<!-- 承运信息 -->
|
||||
<el-divider content-position="left">承运信息</el-divider>
|
||||
<el-row :gutter="20">
|
||||
<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.unitsList"
|
||||
:key="item.CORPINFO_ID"
|
||||
:label="item.CORP_NAME"
|
||||
:value="item.CORP_NAME"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="调度人" prop="DISPATCHER">
|
||||
<el-select
|
||||
v-model="data.form.DISPATCHER"
|
||||
placeholder="请选择调度人"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in data.unitsList"
|
||||
:key="item.CORPINFO_ID"
|
||||
:label="item.PRACTITIONER"
|
||||
:value="item.PRACTITIONER"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="承运日期" prop="SHIPPINGDATE">
|
||||
<el-date-picker
|
||||
v-model="data.form.SHIPPINGDATE"
|
||||
type="date"
|
||||
format="YYYY-MM-DD"
|
||||
value-format="YYYY-MM-DD"
|
||||
placeholder="选择时间"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="运输车辆" prop="TRANSPORTVEHICLE">
|
||||
<el-select
|
||||
v-model="data.form.TRANSPORTVEHICLE"
|
||||
placeholder="请选择运输企业"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in VEHICLEMENU"
|
||||
:key="item.title"
|
||||
:label="item.title"
|
||||
:value="item.title"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="从业人员" prop="PRACTITIONER">
|
||||
<el-select
|
||||
v-model="data.form.PRACTITIONER"
|
||||
placeholder="请选择从业人员"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in PRACTITIONERMENU"
|
||||
:key="item.title"
|
||||
:label="item.title"
|
||||
:value="item.title"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="货运挂车" prop="TRUCKCART">
|
||||
<el-select
|
||||
v-model="data.form.TRUCKCART"
|
||||
placeholder="请选择货运挂车"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in TRUCKMENU"
|
||||
:key="item.title"
|
||||
:label="item.title"
|
||||
:value="item.title"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="人员电话" prop="EMPLOYEEPHONE">
|
||||
<el-input
|
||||
v-model="data.form.EMPLOYEEPHONE"
|
||||
placeholder="请输入人员电话"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="人员类型" prop="PRACTITIONERTYPE">
|
||||
<el-select
|
||||
v-model="data.form.PRACTITIONERTYPE"
|
||||
placeholder="请选择人员类型"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in PERSONTYPEMENU"
|
||||
:key="item.title"
|
||||
:label="item.title"
|
||||
:value="item.title"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="身份证号" prop="IDENTITYID">
|
||||
<el-input
|
||||
v-model="data.form.IDENTITYID"
|
||||
placeholder="请输入身份证号"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<!-- 客户信息 -->
|
||||
<el-divider content-position="left">客户信息</el-divider>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="委托方" prop="CLIENT">
|
||||
<el-select v-model="data.form.CLIENT" placeholder="请选择委托方">
|
||||
<el-option
|
||||
v-for="item in CLIENTMENU"
|
||||
:key="item.title"
|
||||
:label="item.title"
|
||||
:value="item.title"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="联系人" prop="CLIENTCONTACTPERSON">
|
||||
<el-input
|
||||
v-model="data.form.CLIENTCONTACTPERSON"
|
||||
placeholder="请输入联系人"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="联系电话" prop="CLIENTCONTACTPHONE">
|
||||
<el-input
|
||||
v-model="data.form.CLIENTCONTACTPHONE"
|
||||
placeholder="请输入联系电话"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="确认方" prop="CONFIRMER">
|
||||
<el-select v-model="data.form.CONFIRMER" placeholder="请选择确认方">
|
||||
<el-option
|
||||
v-for="item in CONFIRMMENU"
|
||||
:key="item.title"
|
||||
:label="item.title"
|
||||
:value="item.title"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="联系人" prop="CONFIRMINGPERSON">
|
||||
<el-input
|
||||
v-model="data.form.CONFIRMINGPERSON"
|
||||
placeholder="请输入联系人"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="联系电话" prop="CONFIRMINGPHONE">
|
||||
<el-input
|
||||
v-model="data.form.CONFIRMINGPHONE"
|
||||
placeholder="请输入联系电话"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<!-- 地点信息 -->
|
||||
<el-divider content-position="left">地点信息</el-divider>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="起运地点" prop="ORIGIN">
|
||||
<el-select v-model="data.form.ORIGIN" placeholder="请选择起运地点">
|
||||
<el-option
|
||||
v-for="item in STARTINGMENU"
|
||||
:key="item.title"
|
||||
:label="item.title"
|
||||
:value="item.title"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="起运地址" prop="SHIPPINGADDRESS">
|
||||
<el-input
|
||||
v-model="data.form.SHIPPINGADDRESS"
|
||||
placeholder="请输入起运地址"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="行政区域" prop="STARTADMINISTRATIVEAREA">
|
||||
<el-input
|
||||
v-model="data.form.STARTADMINISTRATIVEAREA"
|
||||
placeholder="请输入行政区域"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="目的地点" prop="DESTINATION">
|
||||
<el-select
|
||||
v-model="data.form.DESTINATION"
|
||||
placeholder="请选择目的地点"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in ENDMENU"
|
||||
:key="item.title"
|
||||
:label="item.title"
|
||||
:value="item.title"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="目的地址" prop="DESTINATIONADDRESS">
|
||||
<el-input
|
||||
v-model="data.form.DESTINATIONADDRESS"
|
||||
placeholder="请输入目的地址"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="行政区域" prop="ENDDMINISTRATIVEAREA">
|
||||
<el-input
|
||||
v-model="data.form.ENDDMINISTRATIVEAREA"
|
||||
placeholder="请输入行政区域"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<div class="tc mt-10">
|
||||
<el-button type="primary" @click="fnSubmit">确定</el-button>
|
||||
</div>
|
||||
</layout-card>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { layoutFnGetMEETINGTYPEClassification } from "@/request/safety_production_related.js";
|
||||
import {
|
||||
VEHICLEMENU,
|
||||
PRACTITIONERMENU,
|
||||
TRUCKMENU,
|
||||
PERSONTYPEMENU,
|
||||
CLIENTMENU,
|
||||
CONFIRMMENU,
|
||||
STARTINGMENU,
|
||||
ENDMENU,
|
||||
} from "@/assets/js/constant";
|
||||
import {
|
||||
addSafetyThingsChecView,
|
||||
getSecurityPerson,
|
||||
} from "@/request/waybill_registration.js";
|
||||
import { onMounted, reactive, ref } from "vue";
|
||||
import useFormValidate from "@/assets/js/useFormValidate.js";
|
||||
import { ElMessage } from "element-plus";
|
||||
|
||||
const formRef = ref(null);
|
||||
const rules = {
|
||||
TRANSPORTATIONCOMPANY: [
|
||||
{ required: true, message: "请输入运输企业名称", trigger: "blur" },
|
||||
],
|
||||
DISPATCHER: [
|
||||
{ required: true, message: "请输入调度人姓名", trigger: "blur" },
|
||||
],
|
||||
SHIPPINGDATE: [
|
||||
{ required: true, message: "请选择承运日期", trigger: "change" },
|
||||
],
|
||||
CLIENT: [{ required: true, message: "请选择委托方名称", trigger: "change" }],
|
||||
CLIENTCONTACTPERSON: [
|
||||
{ required: true, message: "请输入联系人姓名", trigger: "blur" },
|
||||
],
|
||||
CLIENTCONTACTPHONE: [
|
||||
{ required: true, message: "请输入联系电话", trigger: "blur" },
|
||||
],
|
||||
CONFIRMER: [
|
||||
{ required: true, message: "请选择确认方名称", trigger: "change" },
|
||||
],
|
||||
ORIGIN: [{ required: true, message: "请选择起运地点", trigger: "change" }],
|
||||
SHIPPINGADDRESS: [
|
||||
{ required: true, message: "请输入起运地址", trigger: "blur" },
|
||||
],
|
||||
DESTINATION: [
|
||||
{ required: true, message: "请选择目的地点", trigger: "change" },
|
||||
],
|
||||
DESTINATIONADDRESS: [
|
||||
{ required: true, message: "请输入目的地址", trigger: "blur" },
|
||||
],
|
||||
};
|
||||
|
||||
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: {
|
||||
TRANSPORTATIONCOMPANY: "",
|
||||
DISPATCHER: "",
|
||||
SHIPPINGDATE: "",
|
||||
IDENTITYID: "",
|
||||
TRUCKCART: "",
|
||||
EMPLOYEEPHONE: "",
|
||||
PRACTITIONER: "",
|
||||
TRANSPORTVEHICLE: "",
|
||||
CLIENT: "",
|
||||
CLIENTCONTACTPERSON: "",
|
||||
CLIENTCONTACTPHONE: "",
|
||||
CONFIRMER: "",
|
||||
CONFIRMINGPERSON: "",
|
||||
CONFIRMINGPHONE: "",
|
||||
ORIGIN: "",
|
||||
SHIPPINGADDRESS: "",
|
||||
STARTADMINISTRATIVEAREA: "",
|
||||
DESTINATION: "",
|
||||
DESTINATIONADDRESS: "",
|
||||
ENDDMINISTRATIVEAREA: "",
|
||||
unitsList: [],
|
||||
},
|
||||
});
|
||||
|
||||
onMounted(async () => {
|
||||
await fnPerson();
|
||||
});
|
||||
const fnPerson = async () => {
|
||||
const resData = await getSecurityPerson({});
|
||||
data.unitsList = [resData.pd];
|
||||
};
|
||||
|
||||
const fnSubmit = async () => {
|
||||
await useFormValidate(formRef);
|
||||
const formData = new FormData();
|
||||
|
||||
Object.keys(data.form).forEach((key) => {
|
||||
formData.append(key, data.form[key]);
|
||||
});
|
||||
|
||||
await addSafetyThingsChecView(formData);
|
||||
ElMessage.success("添加成功");
|
||||
Object.keys(data.form).forEach((key) => {
|
||||
if (Array.isArray(data.form[key])) {
|
||||
data.form[key] = [];
|
||||
} else {
|
||||
data.form[key] = "";
|
||||
}
|
||||
});
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.flexBox {
|
||||
display: flex;
|
||||
align-items: flex-end;
|
||||
|
||||
.addBtn {
|
||||
margin-left: 12px;
|
||||
}
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,155 @@
|
|||
<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="TRANSPORTVEHICLE">
|
||||
<el-input v-model="searchForm.TRANSPORTVEHICLE" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="运单状态" prop="WAYBILLSTATUS">
|
||||
<el-select v-model="searchForm.WAYBILLSTATUS">
|
||||
<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"
|
||||
@get-data="fnGetData"
|
||||
>
|
||||
<el-table-column type="selection" width="55"> </el-table-column>
|
||||
<el-table-column label="序号" width="60">
|
||||
<template #default="{ $index }">
|
||||
{{ serialNumber(pagination, $index) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="WAYBILLNUMBER" label="运单编号" width="150" />
|
||||
<el-table-column prop="WAYBILLSTATUS" label="运单状态" width="150">
|
||||
<template #default="{ row }">
|
||||
<el-tag v-if="row.WAYBILLSTATUS === '0'">未出发</el-tag>
|
||||
<el-tag v-else-if="row.WAYBILLSTATUS === '1'">已出发</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="TRANSPORTVEHICLE" label="运输车辆" width="150" />
|
||||
<el-table-column prop="PRACTITIONER" label="从业人员" width="150" />
|
||||
<el-table-column prop="CLIENT" label="委托方" width="150">
|
||||
</el-table-column>
|
||||
<el-table-column prop="CONFIRMER" label="确认方" width="150">
|
||||
</el-table-column>
|
||||
<el-table-column prop="ORIGIN" label="起运地" width="150">
|
||||
</el-table-column>
|
||||
<el-table-column prop="DESTINATION" label="目的地" width="150">
|
||||
</el-table-column>
|
||||
<el-table-column prop="SHIPPINGDATE" label="起止时间" width="180">
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="120"> </el-table-column>
|
||||
<template #button>
|
||||
<el-button
|
||||
type="primary"
|
||||
@click="
|
||||
router.push({
|
||||
path: '/electronic_waybill_management/waybill_registration/add',
|
||||
})
|
||||
"
|
||||
>
|
||||
添加
|
||||
</el-button>
|
||||
<el-button
|
||||
v-if="buttonJurisdiction.del"
|
||||
type="danger"
|
||||
@click="fnBatchDelete"
|
||||
>
|
||||
批量删除
|
||||
</el-button>
|
||||
</template>
|
||||
</layout-table>
|
||||
</layout-card>
|
||||
<edit
|
||||
v-model:visible="data.analysisDialog.visible"
|
||||
:info="data.analysisDialog.info"
|
||||
@get-data="fnResetPagination"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { serialNumber } from "@/assets/js/utils.js";
|
||||
import useListData from "@/assets/js/useListData.js";
|
||||
import { onMounted, reactive, ref } from "vue";
|
||||
|
||||
import {
|
||||
layoutFnGetNotificationsClassification,
|
||||
dateteSecurityAllNotice,
|
||||
} from "@/request/safety_production_related.js";
|
||||
import { getSecurityWaybillreList } from "@/request/waybill_registration.js";
|
||||
import router from "@/router/index.js";
|
||||
import { ElMessageBox, ElMessage } from "element-plus";
|
||||
import { debounce } from "throttle-debounce";
|
||||
import useButtonJurisdiction from "@/assets/js/useButtonJurisdiction.js";
|
||||
|
||||
const buttonJurisdiction = await useButtonJurisdiction("riskunit");
|
||||
|
||||
const tableRef = ref(null);
|
||||
|
||||
const { list, pagination, searchForm, fnGetData, fnResetPagination } =
|
||||
useListData(getSecurityWaybillreList);
|
||||
const data = reactive({
|
||||
analysisDialog: {
|
||||
visible: false,
|
||||
info: {},
|
||||
},
|
||||
});
|
||||
const fnResetPaginationTransfer = () => {
|
||||
fnResetPagination({
|
||||
DEPTIDS: searchForm.value.DEPTIDS?.join(","),
|
||||
});
|
||||
};
|
||||
const fnBatchDelete = debounce(
|
||||
1000,
|
||||
async () => {
|
||||
// eslint-disable-next-line no-undef
|
||||
const selectionData = tableRef.value.getSelectionRows();
|
||||
if (selectionData.length === 0) {
|
||||
ElMessage.warning("请选中要删除的项");
|
||||
return;
|
||||
}
|
||||
await ElMessageBox.confirm("确定要删除选中的数据吗?", { type: "warning" });
|
||||
const DATA_IDS = selectionData
|
||||
.map((item) => item.NOTIFICATION_ID)
|
||||
.join(",");
|
||||
await dateteSecurityAllNotice({ DATA_IDS });
|
||||
ElMessage.success("删除成功");
|
||||
fnResetPaginationTransfer();
|
||||
},
|
||||
{ atBegin: true }
|
||||
);
|
||||
const relatedClassificationList = ref(null);
|
||||
|
||||
onMounted(async () => {
|
||||
const data = await layoutFnGetNotificationsClassification();
|
||||
relatedClassificationList.value = JSON.parse(data.value.zTreeNodes);
|
||||
});
|
||||
</script>
|
||||
|
||||
<style scoped></style>
|
|
@ -75,9 +75,11 @@ const fnMapInit = async () => {
|
|||
styleId: "6f501abeb2a0cc0d961d110b9407b127",
|
||||
});
|
||||
loading.value = false;
|
||||
const point = new window.BMapGL.Point(props.longitude, props.latitude);
|
||||
const marker = new window.BMapGL.Marker(point);
|
||||
mapInstance.addOverlay(marker);
|
||||
if (props.longitude && props.latitude) {
|
||||
const point = new window.BMapGL.Point(props.longitude, props.latitude);
|
||||
const marker = new window.BMapGL.Marker(point);
|
||||
mapInstance.addOverlay(marker);
|
||||
}
|
||||
mapInstance.addEventListener("click", function (event) {
|
||||
mapInstance.clearOverlays();
|
||||
const point = new window.BMapGL.Point(event.latlng.lng, event.latlng.lat);
|
||||
|
|
|
@ -186,7 +186,7 @@
|
|||
<el-button
|
||||
type="primary"
|
||||
@click="
|
||||
router.push({ path: '/enterprise_management/information/info/edit' })
|
||||
router.push({ path: '/enterprise_management/information/edit' })
|
||||
"
|
||||
>
|
||||
修改
|
||||
|
|
|
@ -37,9 +37,9 @@
|
|||
</el-card>
|
||||
<layout-card>
|
||||
<layout-table
|
||||
v-model:pagination="pagination"
|
||||
:data="list"
|
||||
@get-data="fnGetData"
|
||||
v-model:pagination="pagination"
|
||||
>
|
||||
<el-table-column label="序号" width="60">
|
||||
<template #default="{ $index }">
|
||||
|
@ -64,7 +64,7 @@
|
|||
<el-table-column prop="MEETING_ADDRESS" label="会议地点" />
|
||||
<el-table-column prop="TRANSPORTATIONCOMPANY" label="运输企业" />
|
||||
<el-table-column label="操作" width="180">
|
||||
<template v-slot:default="{ row }">
|
||||
<template #default="{ row }">
|
||||
<el-button
|
||||
type="primary"
|
||||
text
|
||||
|
@ -80,18 +80,6 @@
|
|||
>
|
||||
查看
|
||||
</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
text
|
||||
link
|
||||
@click="
|
||||
router.push({
|
||||
path: '/safety_production_related/safety_meeting/add',
|
||||
})
|
||||
"
|
||||
>
|
||||
添加
|
||||
</el-button>
|
||||
<el-button
|
||||
type="danger"
|
||||
text
|
||||
|
@ -118,6 +106,18 @@
|
|||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<template #button>
|
||||
<el-button
|
||||
type="primary"
|
||||
@click="
|
||||
router.push({
|
||||
path: '/safety_production_related/safety_meeting/add',
|
||||
})
|
||||
"
|
||||
>
|
||||
添加
|
||||
</el-button>
|
||||
</template>
|
||||
</layout-table>
|
||||
</layout-card>
|
||||
<edit
|
||||
|
|
|
@ -13,6 +13,21 @@
|
|||
<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="请选择通知等级">
|
||||
|
@ -29,9 +44,9 @@
|
|||
<el-form-item label="人员选择" prop="PERSON">
|
||||
<div class="flexBox">
|
||||
<el-input
|
||||
v-model="data.form.PERSON"
|
||||
type="textarea"
|
||||
placeholder="请选择人员"
|
||||
v-model="data.form.PERSON"
|
||||
disabled
|
||||
></el-input>
|
||||
<el-button
|
||||
|
@ -42,32 +57,41 @@
|
|||
选择
|
||||
</el-button>
|
||||
</div>
|
||||
|
||||
<!-- <el-select-->
|
||||
<!-- v-model="data.form.UNITS_PIC"-->
|
||||
<!-- clearable-->
|
||||
<!-- placeholder="请选择人员"-->
|
||||
<!-- @change="fnSelectUnitsUser($event)"-->
|
||||
<!-- >-->
|
||||
<!-- <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="24">
|
||||
<el-form-item label="通知附件" prop="fileList">
|
||||
<layout-upload
|
||||
v-model:file-list="data.form.fileList"
|
||||
accept=".pdf,.mp4"
|
||||
delete-to-server
|
||||
:limit="9"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="通知附件" prop="fileList">
|
||||
<layout-upload
|
||||
v-model:file-list="data.form.fileList"
|
||||
accept=".pdf"
|
||||
delete-to-server
|
||||
:limit="9"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="通知视频" prop="videoList">
|
||||
<layout-upload
|
||||
v-model:file-list="data.form.videoList"
|
||||
accept=".mp4"
|
||||
delete-to-server
|
||||
:limit="9"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="回复状态" prop="REPLYSTATUS">
|
||||
<el-switch
|
||||
v-model="data.form.REPLYSTATUS"
|
||||
active-value="1"
|
||||
inactive-value="0"
|
||||
active-color="#13ce66"
|
||||
inactive-color="#ff4949"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-col :span="50">
|
||||
<el-form-item label="通知内容" prop="NOTIFICATIONCONTENT">
|
||||
<layout-editor
|
||||
|
@ -96,11 +120,13 @@ import {
|
|||
getUserListAll,
|
||||
addSecurityNotice,
|
||||
} from "@/request/safety_production_related.js";
|
||||
import { reactive, ref } from "vue";
|
||||
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_risk.vue";
|
||||
import SelectRisk from "./components/select_person.vue";
|
||||
import useFormValidate from "@/assets/js/useFormValidate.js";
|
||||
import { ElMessage } from "element-plus";
|
||||
import { getSecurityPerson } from "@/request/waybill_registration.js";
|
||||
const formRef = ref(null);
|
||||
const rules = {
|
||||
TITLE: [{ required: true, message: "请输入通知标题", trigger: "blur" }],
|
||||
|
@ -110,12 +136,6 @@ const rules = {
|
|||
{ required: true, message: "请输入通知内容", trigger: "blur" },
|
||||
],
|
||||
};
|
||||
|
||||
const fnGetUnitsList = async () => {
|
||||
const resData = await getUserListAll({});
|
||||
data.unitsList = resData.varList;
|
||||
};
|
||||
fnGetUnitsList();
|
||||
const relatedClassificationTempList =
|
||||
await layoutFnGetNotificationsClassification();
|
||||
const relatedClassificationList = [];
|
||||
|
@ -126,40 +146,79 @@ JSON.parse(relatedClassificationTempList.value.zTreeNodes).forEach((e) => {
|
|||
const data = reactive({
|
||||
form: {
|
||||
TITLE: "",
|
||||
TRANSPORTATIONCOMPANY: "",
|
||||
LEVEL: "",
|
||||
PERSON: "",
|
||||
fileList: [],
|
||||
videoList: [],
|
||||
NOTIFICATIONCONTENT: "",
|
||||
allStatus: 0, // 是否全选
|
||||
REPLYSTATUS: "",
|
||||
personList: [],
|
||||
},
|
||||
});
|
||||
|
||||
onMounted(async () => {
|
||||
await fnPerson();
|
||||
});
|
||||
const fnPerson = async () => {
|
||||
const resData = await getSecurityPerson({});
|
||||
data.personList = [resData.pd];
|
||||
};
|
||||
|
||||
const fnGetUnitsList = async () => {
|
||||
const resData = await getUserListAll({});
|
||||
data.unitsList = resData.varList;
|
||||
};
|
||||
fnGetUnitsList();
|
||||
const fnSubmit = async () => {
|
||||
await useFormValidate(formRef);
|
||||
const formData = new FormData();
|
||||
|
||||
Object.keys(data.form).forEach((key) => {
|
||||
formData.append(key, data.form[key]);
|
||||
if (key !== "fileList" && key !== "videoList" && key !== "PERSON") {
|
||||
formData.append(key, data.form[key]);
|
||||
}
|
||||
});
|
||||
formData.append("PERSON_ID", data.form.PERSON_ID);
|
||||
data.form.fileList.forEach((file) => {
|
||||
if (file.raw) {
|
||||
formData.append("fileList", file.raw);
|
||||
}
|
||||
});
|
||||
|
||||
formData.delete("fileList");
|
||||
data.form.videoList.forEach((file) => {
|
||||
if (file.raw) {
|
||||
formData.append("videoList", file.raw);
|
||||
}
|
||||
});
|
||||
|
||||
for (let i = 0; i < data.form.fileList.length; i++) {
|
||||
if (data.form.fileList[i].raw)
|
||||
formData.append("FFILE", data.form.fileList[i].raw);
|
||||
try {
|
||||
await addSecurityNotice(formData);
|
||||
ElMessage({
|
||||
message: "添加成功",
|
||||
type: "success",
|
||||
duration: 3000,
|
||||
});
|
||||
// 清空表单
|
||||
Object.keys(data.form).forEach((key) => {
|
||||
if (Array.isArray(data.form[key])) {
|
||||
data.form[key] = []; // 如果是数组,重置为空数组
|
||||
} else {
|
||||
data.form[key] = ""; // 否则重置为空字符串
|
||||
}
|
||||
});
|
||||
} catch (error) {
|
||||
ElMessage.error("添加失败");
|
||||
console.error(error);
|
||||
}
|
||||
|
||||
await addSecurityNotice(formData);
|
||||
};
|
||||
const fnSelectRiskSubmit = (list) => {
|
||||
console.log(list);
|
||||
const nameList = list.map((val) => {
|
||||
return val.USERNAME;
|
||||
});
|
||||
data.form.PERSON = nameList.join(",");
|
||||
data.form.allStatus = 0;
|
||||
console.log(data.PERSON, 19);
|
||||
console.log("是否全选", data.form.allStatus);
|
||||
|
||||
const fnSelectRiskSubmit = (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 = () => {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<template>
|
||||
<el-dialog title="选择人员" v-model="visible" width="1500">
|
||||
<el-dialog v-model="visible" title="选择人员" width="1500">
|
||||
<el-form
|
||||
:model="searchForm"
|
||||
label-width="60px"
|
||||
|
@ -26,19 +26,20 @@
|
|||
</el-form>
|
||||
<layout-table
|
||||
ref="tableRef"
|
||||
:data="list"
|
||||
v-model:pagination="pagination"
|
||||
@get-data="fnGetData"
|
||||
: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 v-slot="{ $index }">
|
||||
<template #default="{ $index }">
|
||||
{{ serialNumber(pagination, $index) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="USERNAME" label="姓名" />
|
||||
<el-table-column prop="DEPARTNAME" label="部门" />
|
||||
<el-table-column prop="USER_ID" label="用户Id" />
|
||||
<el-table-column prop="NAME" label="姓名" />
|
||||
<el-table-column prop="DEPARTMENT_NAME" label="部门" />
|
||||
</layout-table>
|
||||
<template #footer>
|
||||
<el-button @click="fnClose">取消</el-button>
|
|
@ -47,86 +47,75 @@
|
|||
</el-card>
|
||||
<layout-card>
|
||||
<layout-table
|
||||
ref="tableRef"
|
||||
v-model:pagination="pagination"
|
||||
:data="list"
|
||||
@get-data="fnGetData"
|
||||
v-model:pagination="pagination"
|
||||
>
|
||||
<el-table-column type="selection" width="55"> </el-table-column>
|
||||
<el-table-column label="序号" width="60">
|
||||
<template #default="{ $index }">
|
||||
{{ serialNumber(pagination, $index) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="TITLE" label="通知标题" width="250" />
|
||||
<el-table-column prop="POSTSTATUS" label="发布状态" width="250">
|
||||
<el-table-column label="通知等级" width="150">
|
||||
<template #default="{ row }">
|
||||
{{ row.POSTSTATUS === 0 ? "未发布" : "已发布" }}
|
||||
<el-tag>{{ row.LEVEL }}</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="SIGNING" label="签收情况" width="120">
|
||||
<el-table-column prop="POSTSTATUS" label="发布状态" width="150">
|
||||
<template #default="{ row }">
|
||||
<el-tag v-if="row.POSTSTATUS === 0">未发布</el-tag>
|
||||
<el-tag v-else>已发布</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="REPLY" label="回复情况" />
|
||||
<el-table-column prop="CREATETIME" label="创建时间" width="100" />
|
||||
<el-table-column label="回复情况" width="150">
|
||||
<template #default="{ row }">
|
||||
{{
|
||||
row.REPLYSTATUSNUM
|
||||
? row.REPLYSTATUSNUM + "/" + row.TOTALREADDETAIL + "人"
|
||||
: "0/" + row.TOTALREADDETAIL + "人"
|
||||
}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="签收情况" width="150">
|
||||
<template #default="{ row }">
|
||||
{{
|
||||
row.SIGNEDSTATUSNUM
|
||||
? row.SIGNEDSTATUSNUM + "/" + row.TOTALREADDETAIL + "人"
|
||||
: "0/" + row.TOTALREADDETAIL + "人"
|
||||
}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="CREATETIME" label="创建时间" width="200" />
|
||||
<el-table-column
|
||||
prop="TRANSPORTATIONCOMPANY"
|
||||
label="运输企业"
|
||||
width="90"
|
||||
width="250"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="180">
|
||||
<template v-slot:default="{ row }">
|
||||
<el-button
|
||||
type="primary"
|
||||
text
|
||||
link
|
||||
@click="
|
||||
router.push({
|
||||
path: '/safety_production_related/security_notice/notice_info',
|
||||
query: {
|
||||
NOTIFICATION_ID: row.NOTIFICATION_ID,
|
||||
},
|
||||
})
|
||||
"
|
||||
>
|
||||
查看
|
||||
</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
text
|
||||
link
|
||||
@click="
|
||||
router.push({
|
||||
path: '/safety_production_related/security_notice/add',
|
||||
})
|
||||
"
|
||||
>
|
||||
添加
|
||||
</el-button>
|
||||
<el-button
|
||||
type="danger"
|
||||
text
|
||||
link
|
||||
@click="deleteItem(row.NOTIFICATION_ID)"
|
||||
>
|
||||
删除
|
||||
</el-button>
|
||||
<!-- 阅读详情按钮 -->
|
||||
<el-button
|
||||
type="primary"
|
||||
text
|
||||
link
|
||||
@click="
|
||||
router.push({
|
||||
path: '/safety_production_related/security_notice/details',
|
||||
query: {
|
||||
NOTIFIION_ID: row.NOTIFICATION_ID,
|
||||
},
|
||||
})
|
||||
"
|
||||
>
|
||||
阅读详情
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="200"> </el-table-column>
|
||||
<template #button>
|
||||
<el-button
|
||||
type="primary"
|
||||
@click="
|
||||
router.push({
|
||||
path: '/safety_production_related/security_notice/add',
|
||||
})
|
||||
"
|
||||
>
|
||||
添加
|
||||
</el-button>
|
||||
<el-button
|
||||
v-if="buttonJurisdiction.del"
|
||||
type="danger"
|
||||
@click="fnBatchDelete"
|
||||
>
|
||||
批量删除
|
||||
</el-button>
|
||||
</template>
|
||||
</layout-table>
|
||||
</layout-card>
|
||||
<edit
|
||||
|
@ -144,11 +133,16 @@ import { onMounted, reactive, ref } from "vue";
|
|||
import {
|
||||
getSecurityNoticeList,
|
||||
layoutFnGetNotificationsClassification,
|
||||
dateteSecurityNotice,
|
||||
dateteSecurityAllNotice,
|
||||
} from "@/request/safety_production_related.js";
|
||||
import router from "@/router/index.js";
|
||||
import { ElMessageBox, ElMessage } from "element-plus";
|
||||
import { debounce } from "throttle-debounce";
|
||||
import useButtonJurisdiction from "@/assets/js/useButtonJurisdiction.js";
|
||||
|
||||
const buttonJurisdiction = await useButtonJurisdiction("riskunit");
|
||||
|
||||
const tableRef = ref(null);
|
||||
const { list, pagination, searchForm, fnGetData, fnResetPagination } =
|
||||
useListData(getSecurityNoticeList);
|
||||
const data = reactive({
|
||||
|
@ -157,15 +151,30 @@ const data = reactive({
|
|||
info: {},
|
||||
},
|
||||
});
|
||||
// 删除事件
|
||||
const deleteItem = async (value) => {
|
||||
await ElMessageBox.confirm(`确定要删除吗?`, {
|
||||
type: "warning",
|
||||
const fnResetPaginationTransfer = () => {
|
||||
fnResetPagination({
|
||||
DEPTIDS: searchForm.value.DEPTIDS?.join(","),
|
||||
});
|
||||
await dateteSecurityNotice({ NOTIFICATION_ID: value });
|
||||
ElMessage.success("删除成功");
|
||||
fnGetData();
|
||||
};
|
||||
const fnBatchDelete = debounce(
|
||||
1000,
|
||||
async () => {
|
||||
// eslint-disable-next-line no-undef
|
||||
const selectionData = tableRef.value.getSelectionRows();
|
||||
if (selectionData.length === 0) {
|
||||
ElMessage.warning("请选中要删除的项");
|
||||
return;
|
||||
}
|
||||
await ElMessageBox.confirm("确定要删除选中的数据吗?", { type: "warning" });
|
||||
const DATA_IDS = selectionData
|
||||
.map((item) => item.NOTIFICATION_ID)
|
||||
.join(",");
|
||||
await dateteSecurityAllNotice({ DATA_IDS });
|
||||
ElMessage.success("删除成功");
|
||||
fnResetPaginationTransfer();
|
||||
},
|
||||
{ atBegin: true }
|
||||
);
|
||||
const relatedClassificationList = ref(null);
|
||||
|
||||
onMounted(async () => {
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
</div>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="企业下发人">
|
||||
{{ detailItems.PERSON }}
|
||||
{{ detailItems.CREATORNAME }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="运输企业">
|
||||
{{ detailItems.TRANSPORTATIONCOMPANY }}
|
||||
|
|
|
@ -0,0 +1,229 @@
|
|||
<template>
|
||||
<layout-card>
|
||||
<el-form
|
||||
ref="formRef"
|
||||
:model="data.form"
|
||||
:rules="rules"
|
||||
label-width="175px"
|
||||
>
|
||||
<el-divider content-position="left">添加</el-divider>
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="会议标题" prop="MEETING_TITLE">
|
||||
<el-input
|
||||
v-model="data.form.MEETING_TITLE"
|
||||
placeholder="请输入会议标题"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="5">
|
||||
<el-form-item label="会议类型" prop="MEETING_TYPE">
|
||||
<el-select
|
||||
v-model="data.form.MEETING_TYPE"
|
||||
placeholder="请选择会议类型"
|
||||
@change="handleMeetingTypeChange"
|
||||
>
|
||||
<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="TRANSPORTATIONCOMPANY">
|
||||
<el-input
|
||||
v-model="data.form.TRANSPORTATIONCOMPANY"
|
||||
placeholder="请输入运输企业"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="会议地点" prop="MEETING_ADDRESS">
|
||||
<el-input
|
||||
v-model="data.form.MEETING_ADDRESS"
|
||||
placeholder="请输入会议地点"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="10">
|
||||
<el-form-item prop="MEETING_DATE" label="会议时间">
|
||||
<el-date-picker
|
||||
v-model="data.form.MEETING_DATE"
|
||||
type="daterange"
|
||||
format="YYYY-MM-DD"
|
||||
value-format="YYYY-MM-DD"
|
||||
start-placeholder="开始时间"
|
||||
end-placeholder="结束时间"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="主持人" prop="HOST_PERSON">
|
||||
<el-input
|
||||
v-model="data.form.HOST_PERSON"
|
||||
placeholder="请输入主持人"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="记录人" prop="RECORDER">
|
||||
<el-input v-model="data.form.RECORDER" placeholder="请输入记录人" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="从业身份" prop="PRACTITIONER_TYPE">
|
||||
<el-checkbox-group
|
||||
v-model="data.form.PRACTITIONER_TYPE"
|
||||
@change="handleCheckedCitiesChange"
|
||||
>
|
||||
<el-checkbox v-for="city in cities" :key="city" :label="city">{{
|
||||
city
|
||||
}}</el-checkbox>
|
||||
</el-checkbox-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="24">
|
||||
<el-form-item label="会议附件" prop="fileList">
|
||||
<layout-upload
|
||||
v-model:file-list="data.form.fileList"
|
||||
accept=".pdf,.mp4"
|
||||
delete-to-server
|
||||
:limit="9"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="50">
|
||||
<el-form-item label="会议记要" prop="MEETING_CONTENT">
|
||||
<layout-editor
|
||||
v-model="data.form.MEETING_CONTENT"
|
||||
placeholder="请输入内容"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<div class="tc mt-10">
|
||||
<el-button type="primary" @click="fnSubmit"> 确定 </el-button>
|
||||
</div>
|
||||
</layout-card>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import {
|
||||
layoutFnGetMEETINGTYPEClassification,
|
||||
getUserListAll,
|
||||
} from "@/request/safety_production_related.js";
|
||||
import { addSafetyMeetingView } from "@/request/traffic_safety_meeting.js";
|
||||
import { reactive, ref } from "vue";
|
||||
import LayoutUpload from "@/components/upload/index.vue";
|
||||
import LayoutEditor from "@/components/editor/index.vue";
|
||||
import useFormValidate from "@/assets/js/useFormValidate.js";
|
||||
import { ElMessage } from "element-plus";
|
||||
const formRef = ref(null);
|
||||
const cities = [
|
||||
"驾驶员",
|
||||
"押运员",
|
||||
"安全管理员",
|
||||
"装卸员",
|
||||
"安全负责人",
|
||||
"其他",
|
||||
"监控员",
|
||||
];
|
||||
const handleCheckedCitiesChange = () => {};
|
||||
const rules = {
|
||||
MEETING_TITLE: [
|
||||
{ required: true, message: "请输入会议标题", trigger: "blur" },
|
||||
],
|
||||
MEETING_TYPE: [
|
||||
{ required: true, message: "请选择会议类型", trigger: "change" },
|
||||
],
|
||||
TRANSPORTATIONCOMPANY: [
|
||||
{ required: true, message: "请输入运输企业", trigger: "blur" },
|
||||
],
|
||||
MEETING_ADDRESS: [
|
||||
{ required: true, message: "请输入会议地点", trigger: "blur" },
|
||||
],
|
||||
MEETING_DATE: [
|
||||
{ required: true, message: "请选择会议时间", trigger: "change" },
|
||||
],
|
||||
HOST_PERSON: [{ required: true, message: "请输入主持人", trigger: "blur" }],
|
||||
RECORDER: [{ required: true, message: "请输入记录人", trigger: "blur" }],
|
||||
MEETING_CONTENT: [
|
||||
{ required: true, message: "请输入会议记要", trigger: "blur" },
|
||||
],
|
||||
};
|
||||
|
||||
const fnGetUnitsList = async () => {
|
||||
const resData = await getUserListAll({});
|
||||
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: {
|
||||
MEETING_TITLE: "",
|
||||
MEETING_TYPE: "",
|
||||
TRANSPORTATIONCOMPANY: "",
|
||||
MEETING_ADDRESS: "",
|
||||
MEETING_DATE: "",
|
||||
HOST_PERSON: "",
|
||||
RECORDER: "",
|
||||
fileList: [],
|
||||
PRACTITIONER_TYPE: [],
|
||||
NOTIFICATIONCONTENT: "",
|
||||
},
|
||||
});
|
||||
const handleMeetingTypeChange = (value) => {
|
||||
data.form.MEETING_TYPE = value;
|
||||
};
|
||||
const fnSubmit = async () => {
|
||||
await useFormValidate(formRef);
|
||||
const formData = new FormData();
|
||||
|
||||
Object.keys(data.form).forEach((key) => {
|
||||
formData.append(key, data.form[key]);
|
||||
});
|
||||
|
||||
formData.delete("fileList");
|
||||
|
||||
for (let i = 0; i < data.form.fileList.length; i++) {
|
||||
if (data.form.fileList[i].raw)
|
||||
formData.append("FFILE", data.form.fileList[i].raw);
|
||||
}
|
||||
|
||||
try {
|
||||
await addSafetyMeetingView(formData);
|
||||
ElMessage.success("添加成功");
|
||||
Object.keys(data.form).forEach((key) => {
|
||||
if (Array.isArray(data.form[key])) {
|
||||
data.form[key] = [];
|
||||
} else {
|
||||
data.form[key] = "";
|
||||
}
|
||||
});
|
||||
} catch (error) {
|
||||
ElMessage.error("添加失败");
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.flexBox {
|
||||
display: flex;
|
||||
align-items: flex-end;
|
||||
|
||||
.addBtn {
|
||||
margin-left: 12px;
|
||||
}
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,272 @@
|
|||
<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="TRANSPORTCOMPANY">
|
||||
<el-input v-model="searchForm.TRANSPORTCOMPANY" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="检查项类型" prop="CHECKITEMTYPE">
|
||||
<el-input v-model="searchForm.CHECKITEMTYPE" />
|
||||
</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
|
||||
:data="list"
|
||||
@get-data="fnGetData"
|
||||
v-model:pagination="pagination"
|
||||
>
|
||||
<el-table-column label="序号" width="60">
|
||||
<template #default="{ $index }">
|
||||
{{ serialNumber(pagination, $index) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="CHECKITEMNAME" label="检查项名称" width="130" />
|
||||
<el-table-column prop="CHECKITEMTYPE" label="检查项类型" width="130" />
|
||||
<el-table-column
|
||||
prop="CHECKITEMDESCRIPTION"
|
||||
label="检查项说明"
|
||||
width="130"
|
||||
/>
|
||||
<el-table-column prop="TRANSPORTCOMPANY" label="运输企业" width="130" />
|
||||
<el-table-column
|
||||
prop="TRANSPORTCATEGORY"
|
||||
label="运输类别"
|
||||
width="130"
|
||||
/>
|
||||
<el-table-column prop="CREATETIME" label="创建时间" width="130" />
|
||||
<el-table-column label="操作" width="180">
|
||||
<template v-slot:default="{ row }">
|
||||
<el-button
|
||||
type="primary"
|
||||
text
|
||||
link
|
||||
@click="
|
||||
router.push({
|
||||
path: '/safety_production_related/driving_log/drivingLog_info',
|
||||
query: {
|
||||
DRIVING_LOG_ID: row.DRIVING_LOG_ID,
|
||||
},
|
||||
})
|
||||
"
|
||||
>
|
||||
查看
|
||||
</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
text
|
||||
link
|
||||
@click="
|
||||
router.push({
|
||||
path: '/safety_production_related/safety_meeting/add',
|
||||
})
|
||||
"
|
||||
>
|
||||
添加
|
||||
</el-button>
|
||||
<el-button
|
||||
type="danger"
|
||||
text
|
||||
link
|
||||
@click="deleteItem(row.DRIVING_LOG_ID)"
|
||||
>
|
||||
删除
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</layout-table>
|
||||
</layout-card>
|
||||
<edit
|
||||
v-model:visible="data.analysisDialog.visible"
|
||||
:info="data.analysisDialog.info"
|
||||
@get-data="fnResetPagination"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
<script setup>
|
||||
import { serialNumber } from "@/assets/js/utils";
|
||||
import useListData from "@/assets/js/useListData.js";
|
||||
import { reactive } from "vue";
|
||||
import {
|
||||
getSafetyDrivingLogList,
|
||||
setDrivingLogDelete,
|
||||
} from "@/request/traffic_driving_log.js";
|
||||
import router from "@/router/index.js";
|
||||
import { ElMessage, ElMessageBox } from "element-plus";
|
||||
|
||||
const { list, pagination, searchForm, fnGetData, fnResetPagination } =
|
||||
useListData(getSafetyDrivingLogList);
|
||||
const data = reactive({
|
||||
analysisDialog: {
|
||||
visible: false,
|
||||
info: {},
|
||||
},
|
||||
});
|
||||
// 删除事件
|
||||
const deleteItem = async (value) => {
|
||||
await ElMessageBox.confirm(`确定要删除吗?`, {
|
||||
type: "warning",
|
||||
});
|
||||
console.log("Sent to backend:", { DRIVING_LOG_ID: value });
|
||||
await setDrivingLogDelete({ DRIVING_LOG_ID: value });
|
||||
ElMessage.success("删除成功");
|
||||
fnGetData();
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped></style>
|
||||
<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="TRANSPORTCOMPANY">
|
||||
<el-input v-model="searchForm.TRANSPORTCOMPANY" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="检查项类型" prop="CHECKITEMTYPE">
|
||||
<el-input v-model="searchForm.CHECKITEMTYPE" />
|
||||
</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
|
||||
:data="list"
|
||||
@get-data="fnGetData"
|
||||
v-model:pagination="pagination"
|
||||
>
|
||||
<el-table-column label="序号" width="60">
|
||||
<template #default="{ $index }">
|
||||
{{ serialNumber(pagination, $index) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="CHECKITEMNAME" label="检查项名称" width="130" />
|
||||
<el-table-column prop="CHECKITEMTYPE" label="检查项类型" width="130" />
|
||||
<el-table-column
|
||||
prop="CHECKITEMDESCRIPTION"
|
||||
label="检查项说明"
|
||||
width="130"
|
||||
/>
|
||||
<el-table-column prop="TRANSPORTCOMPANY" label="运输企业" width="130" />
|
||||
<el-table-column
|
||||
prop="TRANSPORTCATEGORY"
|
||||
label="运输类别"
|
||||
width="130"
|
||||
/>
|
||||
<el-table-column prop="CREATETIME" label="创建时间" width="130" />
|
||||
<el-table-column label="操作" width="180">
|
||||
<template v-slot:default="{ row }">
|
||||
<el-button
|
||||
type="primary"
|
||||
text
|
||||
link
|
||||
@click="
|
||||
router.push({
|
||||
path: '/safety_production_related/driving_log/drivingLog_info',
|
||||
query: {
|
||||
DRIVING_LOG_ID: row.DRIVING_LOG_ID,
|
||||
},
|
||||
})
|
||||
"
|
||||
>
|
||||
查看
|
||||
</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
text
|
||||
link
|
||||
@click="
|
||||
router.push({
|
||||
path: '/safety_production_related/safety_meeting/add',
|
||||
})
|
||||
"
|
||||
>
|
||||
添加
|
||||
</el-button>
|
||||
<el-button
|
||||
type="danger"
|
||||
text
|
||||
link
|
||||
@click="deleteItem(row.DRIVING_LOG_ID)"
|
||||
>
|
||||
删除
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</layout-table>
|
||||
</layout-card>
|
||||
<edit
|
||||
v-model:visible="data.analysisDialog.visible"
|
||||
:info="data.analysisDialog.info"
|
||||
@get-data="fnResetPagination"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
<script setup>
|
||||
import { serialNumber } from "@/assets/js/utils";
|
||||
import useListData from "@/assets/js/useListData.js";
|
||||
import { reactive } from "vue";
|
||||
import {
|
||||
getSafetyDrivingLogList,
|
||||
setDrivingLogDelete,
|
||||
} from "@/request/traffic_driving_log.js";
|
||||
import router from "@/router/index.js";
|
||||
import { ElMessage, ElMessageBox } from "element-plus";
|
||||
|
||||
const { list, pagination, searchForm, fnGetData, fnResetPagination } =
|
||||
useListData(getSafetyDrivingLogList);
|
||||
const data = reactive({
|
||||
analysisDialog: {
|
||||
visible: false,
|
||||
info: {},
|
||||
},
|
||||
});
|
||||
// 删除事件
|
||||
const deleteItem = async (value) => {
|
||||
await ElMessageBox.confirm(`确定要删除吗?`, {
|
||||
type: "warning",
|
||||
});
|
||||
console.log("Sent to backend:", { DRIVING_LOG_ID: value });
|
||||
await setDrivingLogDelete({ DRIVING_LOG_ID: value });
|
||||
ElMessage.success("删除成功");
|
||||
fnGetData();
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped></style>
|
Loading…
Reference in New Issue