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