forked from integrated_whb/integrated_whb_vue
调试安全通知选择人员回调问题
parent
ae3cba5fb8
commit
edb4fc5c1a
|
@ -139,7 +139,6 @@ export const REMIND_DAYS = [
|
|||
{ ID: "2", NAME: "90天", NUM: "90" },
|
||||
];
|
||||
|
||||
|
||||
// export const MAINTENANCE_LEVEL_LIST = [
|
||||
// //维保等级
|
||||
// {ID:'1',NAME:'一级维保'},
|
||||
|
|
|
@ -10,4 +10,4 @@ export const deleteSafetyCustomerView = (params) =>
|
|||
upload("/securitycustomer/delete", params); // 删除
|
||||
|
||||
export const getTrafficCustomerSelectList = (params) =>
|
||||
post("/securitycustomer/getTrafficCustomerSelectList", params); // 客户管理列表(list)
|
||||
post("/securitycustomer/getTrafficCustomerSelectList", params); // 客户管理列表(list)
|
||||
|
|
|
@ -10,4 +10,4 @@ export const deleteSafetyLocationView = (params) =>
|
|||
post("/securitylocation/delete", params); // 添加地段管理
|
||||
|
||||
export const getTrafficLocationSelectList = (params) =>
|
||||
post("/securitylocation/getTrafficLocationSelectList", params); // 地点管理列表
|
||||
post("/securitylocation/getTrafficLocationSelectList", params); // 地点管理列表
|
||||
|
|
|
@ -234,7 +234,7 @@ const reviewItem = async (row) => {
|
|||
|
||||
/* const fnWindow = async () => {
|
||||
window.open(
|
||||
"http://60.10.47.50:9001/#/middlePage?token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJwYXNzd2QiOiJMZmtmcUAxMjM0NTYiLCJleHAiOjE3MTE2MjQ3NDQsInVzZXIiOiJsZnlqemhkcCIsInRhcmdldCI6Imh0dHA6Ly8xOTIuMTY4LjAuNjk6ODA4Mi8jL21pZGRsZVBhZ2UifQ.nkVxqT3lcNkNIW1jiJY71gyXazJWyfHgfClWnbaFz8I"
|
||||
"http://192.168.0.69:8081/#/middlePage?token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJwYXNzd2QiOiJMZmtmcUAxMjM0NTYiLCJleHAiOjE3MTI3MTUxNDYsInVzZXIiOiJsZnlqemhkcCIsInRhcmdldCI6Imh0dHA6Ly8xOTIuMTY4LjAuNjk6ODA4Mi8jL21pZGRsZVBhZ2UifQ.xb0HD3sqJOCi4y3Ogtg27rTkKPrmdKd-DK660LpM_X8"
|
||||
);
|
||||
}; */
|
||||
// 页面下拉选项字典获取
|
||||
|
|
|
@ -314,15 +314,25 @@ const rules = {
|
|||
},
|
||||
],
|
||||
REGISTRANT: [{ required: true, message: "请输入登记人", trigger: "blur" }],
|
||||
PROCESSING_DATE: [{ required: true, message: "请选择办理日期", trigger: "blur" }],
|
||||
MAINTENANCE_LEVEL: [{ required: true, message: "请选择维保等级", trigger: "blur" }],
|
||||
MAINTENANCE_CYCLE: [{ required: true, message: "请输入维保周期天数", trigger: "blur" }],
|
||||
PROCESSING_DATE: [
|
||||
{ required: true, message: "请选择办理日期", trigger: "blur" },
|
||||
],
|
||||
MAINTENANCE_LEVEL: [
|
||||
{ required: true, message: "请选择维保等级", trigger: "blur" },
|
||||
],
|
||||
MAINTENANCE_CYCLE: [
|
||||
{ required: true, message: "请输入维保周期天数", trigger: "blur" },
|
||||
],
|
||||
KILOMETERS: [
|
||||
{ required: true, message: "请输入维保公里数", trigger: "blur" },
|
||||
],
|
||||
DUE_DATE: [{ required: true, message: "请选择到期日期", trigger: "blur" }],
|
||||
REMINDER_DAYS: [{ required: true, message: "请选择提醒天数", trigger: "blur" }],
|
||||
REMINDER_DATE: [{ required: true, message: "请选择提醒日期", trigger: "blur" }],
|
||||
REMINDER_DAYS: [
|
||||
{ required: true, message: "请选择提醒天数", trigger: "blur" },
|
||||
],
|
||||
REMINDER_DATE: [
|
||||
{ required: true, message: "请选择提醒日期", trigger: "blur" },
|
||||
],
|
||||
};
|
||||
const getDueDate = () => {
|
||||
if (form.value.PROCESSING_DATE && form.value.MAINTENANCE_CYCLE) {
|
||||
|
|
|
@ -185,8 +185,8 @@ const fnSubmit = async () => {
|
|||
};
|
||||
|
||||
const fnSelectPersonSubmit = (selectionData) => {
|
||||
const userIds = selectionData.map((item) => item.USER_ID).join(", ");
|
||||
const names = selectionData.map((item) => item.NAME).join(", ");
|
||||
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;
|
||||
};
|
||||
|
@ -194,8 +194,8 @@ const fnSelectPersonSubmit = (selectionData) => {
|
|||
const fnSelectAllRiskSubmit = (allData) => {
|
||||
const dataList = allData.value;
|
||||
|
||||
const userIds = dataList.map((item) => item.USER_ID).join(", ");
|
||||
const names = dataList.map((item) => item.NAME).join(", ");
|
||||
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;
|
||||
|
||||
|
|
|
@ -71,6 +71,7 @@ import { reactive, watch } from "vue";
|
|||
import { serialNumber } from "@/assets/js/utils.js";
|
||||
import { getUserSelectListAll } from "@/request/user_practitioner.js";
|
||||
import { layoutFnGetPersonnelTypeTraffic } from "@/assets/js/data_dictionary.js";
|
||||
import { differenceWith } from "lodash-es";
|
||||
|
||||
const props = defineProps({
|
||||
visible: {
|
||||
|
@ -78,7 +79,7 @@ const props = defineProps({
|
|||
required: true,
|
||||
default: false,
|
||||
},
|
||||
selectionData: {
|
||||
listData: {
|
||||
type: Array,
|
||||
required: true,
|
||||
default: () => [],
|
||||
|
@ -105,10 +106,7 @@ const stop = watch(
|
|||
() => props.visible,
|
||||
(value) => {
|
||||
if (value) {
|
||||
props.selectionData.forEach((row) => {
|
||||
tableRef.value.toggleRowSelection(row, undefined);
|
||||
});
|
||||
fnResetPagination();
|
||||
fnGetData();
|
||||
stop && stop();
|
||||
}
|
||||
}
|
||||
|
@ -121,7 +119,12 @@ const fnSubmit = debounce(
|
|||
1000,
|
||||
() => {
|
||||
const selectionData = tableRef.value.getSelectionRows();
|
||||
emits("submit", selectionData);
|
||||
const listData = differenceWith(
|
||||
selectionData,
|
||||
props.listData,
|
||||
(a, b) => a.USER_ID === b.USER_ID
|
||||
);
|
||||
emits("submit", listData);
|
||||
fnClose();
|
||||
},
|
||||
{ atBegin: true }
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
clearable
|
||||
>
|
||||
<el-option
|
||||
v-for="item in relatedClassificationList"
|
||||
v-for="item in data.relatedClassificationList"
|
||||
:key="item.BIANMA"
|
||||
:label="item.NAME"
|
||||
:value="item.NAME"
|
||||
|
@ -45,7 +45,7 @@
|
|||
<el-button
|
||||
class="ml-10"
|
||||
type="primary"
|
||||
@click="data.dialog.SelectPersonDialogVisible = true"
|
||||
@click="data.dialog.selectPersonDialogVisible = true"
|
||||
>
|
||||
选择
|
||||
</el-button>
|
||||
|
@ -97,8 +97,8 @@
|
|||
<el-button type="primary" @click="fnSubmit"> 确定 </el-button>
|
||||
</div>
|
||||
<select-person
|
||||
v-model:visible="data.dialog.SelectPersonDialogVisible"
|
||||
:selection-data="data.dialog.selectionData"
|
||||
v-model:visible="data.dialog.selectPersonDialogVisible"
|
||||
:list-data="data.form.PERSON_ID"
|
||||
@submit="fnSelectPersonSubmit"
|
||||
@submitall="fnSelectAllRiskSubmit"
|
||||
/>
|
||||
|
@ -139,14 +139,14 @@ const rules = {
|
|||
},
|
||||
],
|
||||
};
|
||||
const relatedClassificationTempList =
|
||||
await layoutFnGetNotificationsClassification();
|
||||
const router = useRouter();
|
||||
const data = reactive({
|
||||
relatedClassificationList: [],
|
||||
form: {
|
||||
TITLE: "",
|
||||
CORPINFO_ID: "",
|
||||
LEVEL: "",
|
||||
PERSON_ID: [],
|
||||
PERSON: [],
|
||||
fileList: [],
|
||||
videoList: [],
|
||||
|
@ -155,11 +155,34 @@ const data = reactive({
|
|||
REPLYSTATUS: "",
|
||||
},
|
||||
dialog: {
|
||||
SelectPersonDialogVisible: false,
|
||||
selectionData: [],
|
||||
selectPersonDialogVisible: false,
|
||||
},
|
||||
});
|
||||
|
||||
const relatedClassificationTempList =
|
||||
await layoutFnGetNotificationsClassification();
|
||||
data.relatedClassificationList = relatedClassificationTempList.value.list;
|
||||
|
||||
const fnGetData = async () => {
|
||||
if (!NOTIFICATION_ID) return;
|
||||
const resData = await getSecurityNoticeInfo({ NOTIFICATION_ID });
|
||||
data.form = resData.pd;
|
||||
data.form.PERSON_ID = data.form.PERSON_ID.split(",");
|
||||
data.form.fileList = addingPrefixToFile([
|
||||
{
|
||||
FILEPATH: data.form.ATTACHMENT_ROUTE,
|
||||
},
|
||||
]);
|
||||
data.form.videoList = addingPrefixToFile([
|
||||
{
|
||||
FILEPATH: data.form.VIDEO_ROUTE,
|
||||
},
|
||||
]);
|
||||
const names = resData.pd.names;
|
||||
data.form.PERSON = names.map((item) => item.NAME).join(",");
|
||||
};
|
||||
fnGetData();
|
||||
|
||||
const fnSubmit = async () => {
|
||||
await useFormValidate(formRef);
|
||||
const formData = new FormData();
|
||||
|
@ -191,42 +214,22 @@ const fnSubmit = async () => {
|
|||
};
|
||||
|
||||
const fnSelectPersonSubmit = (selectionData) => {
|
||||
const userIds = selectionData.map((item) => item.USER_ID).join(", ");
|
||||
const names = selectionData.map((item) => item.NAME).join(", ");
|
||||
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(", ");
|
||||
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 = "已全部选择";
|
||||
};
|
||||
const fnGetData = async () => {
|
||||
if (!NOTIFICATION_ID) return;
|
||||
const resData = await getSecurityNoticeInfo({ NOTIFICATION_ID });
|
||||
data.form = resData.pd;
|
||||
data.dialog.selectionData = resData.pd.PERSON_ID?.split(",");
|
||||
data.form.fileList = addingPrefixToFile([
|
||||
{
|
||||
FILEPATH: data.form.ATTACHMENT_ROUTE,
|
||||
},
|
||||
]);
|
||||
data.form.videoList = addingPrefixToFile([
|
||||
{
|
||||
FILEPATH: data.form.VIDEO_ROUTE,
|
||||
},
|
||||
]);
|
||||
const names = resData.pd.names;
|
||||
data.form.PERSON = names.map((item) => item.NAME).join(",");
|
||||
};
|
||||
fnGetData();
|
||||
const relatedClassificationList = relatedClassificationTempList.value.list;
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss"></style>
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
<el-descriptions-item label="需要回复">
|
||||
{{ detailItems.REPLYSTATUS === "1" ? "是" : "否" }}
|
||||
</el-descriptions-item>
|
||||
<!-- <el-descriptions-item label="企业下发人">
|
||||
<!-- <el-descriptions-item label="企业下发人">
|
||||
{{ detailItems.CREATORNAME }}
|
||||
</el-descriptions-item>-->
|
||||
<el-descriptions-item label="运输企业">
|
||||
|
@ -25,7 +25,7 @@
|
|||
:href="VITE_FILE_URL + detailItems.ATTACHMENT_ROUTE"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
>查看通知附件</a
|
||||
>查看通知附件</a
|
||||
>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="通知视频">
|
||||
|
@ -36,10 +36,10 @@
|
|||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
<el-table
|
||||
v-if="detailItems.POSTSTATUS === '1'"
|
||||
:border="true"
|
||||
:data="detailItems.readDetail"
|
||||
:show-header="true"
|
||||
v-if="detailItems.POSTSTATUS === '1'"
|
||||
>
|
||||
<el-table-column label="姓名" align="center">
|
||||
<template #default="{ row }"> {{ row.NAME }}<br /> </template>
|
||||
|
@ -48,16 +48,20 @@
|
|||
<template #default="{ row }"> {{ row.SIGNEDDATE }}<br /> </template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="回复内容" align="center" v-if="detailItems.REPLYSTATUS === '1'" >
|
||||
<template #default="{ row }">
|
||||
{{ row.REPLYCONTENT }}<br />
|
||||
</template>
|
||||
<el-table-column
|
||||
v-if="detailItems.REPLYSTATUS === '1'"
|
||||
label="回复内容"
|
||||
align="center"
|
||||
>
|
||||
<template #default="{ row }"> {{ row.REPLYCONTENT }}<br /> </template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="回复时间" align="center" v-if="detailItems.REPLYSTATUS === '1'">
|
||||
<template #default="{ row }">
|
||||
{{ row.REPLYDATE }}<br />
|
||||
</template>
|
||||
<el-table-column
|
||||
v-if="detailItems.REPLYSTATUS === '1'"
|
||||
label="回复时间"
|
||||
align="center"
|
||||
>
|
||||
<template #default="{ row }"> {{ row.REPLYDATE }}<br /> </template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</layout-card>
|
||||
|
@ -83,7 +87,6 @@ const detailItems = ref({
|
|||
const fnGetData = async () => {
|
||||
const response = await getSecurityNoticeInfo({ NOTIFICATION_ID });
|
||||
detailItems.value = response.pd;
|
||||
console.log("detail",response);
|
||||
};
|
||||
fnGetData();
|
||||
</script>
|
||||
|
|
Loading…
Reference in New Issue