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:'一级维保'},
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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();
|
||||
|
@ -207,26 +230,6 @@ const fnSelectAllRiskSubmit = (allData) => {
|
|||
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>
|
||||
|
|
|
@ -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