This commit is contained in:
zmj 2024-05-24 18:00:17 +08:00
parent 8b2b99c470
commit d033c98f64
2 changed files with 21 additions and 2 deletions

View File

@ -25,7 +25,7 @@
<el-table-column label="汇报工作内容" prop="works" show-overflow-tooltip />
<el-table-column label="汇报时间" prop="send_time" show-overflow-tooltip />
<el-table-column label="状态" prop="is_read" show-overflow-tooltip />
<el-table-column label="附件(个)" prop="remark" show-overflow-tooltip />
<!-- <el-table-column label="附件(个)" prop="remark" show-overflow-tooltip /> -->
<el-table-column label="操作" width="120" fixed="right">
<template #default="{ row }">
<el-button v-perms="['works.rcbg.oa_work/edit']" type="primary" link @click="handleEdit(row)">

View File

@ -40,6 +40,11 @@ import Popup from "@/components/popup/index.vue";
import { apiOaWorkAdd, apiOaWorkEdit, apiOaWorkDetail } from "@/api/oa_work";
import { timeFormat } from "@/utils/util";
import type { PropType } from "vue";
import useUserStore from "@/stores/modules/user";
defineProps({
dictData: {
type: Object as PropType<Record<string, any[]>>,
@ -52,6 +57,7 @@ const popupRef = shallowRef<InstanceType<typeof Popup>>();
const mode = ref("add");
const showDialog = ref(false)
const personnel = ref(null)
const userStore = useUserStore().userInfo;
//
const popupTitle = computed(() => {
@ -92,6 +98,16 @@ const submituser = (e: any) => {
showDialog.value = false
}
const checkUser = (rule: any, value: any, callback: any) => {
if (formData.type_user.split(',').map(Number).includes(userStore.id)) {
callback(new Error("接收人员不能包含自己"))
}
else {
callback()
}
}
//
const formRules = reactive<any>({
type: [
@ -106,7 +122,10 @@ const formRules = reactive<any>({
required: true,
message: "请选择接受人员",
trigger: ["cahnge"],
},
}, {
validator: checkUser,
trigger: ["cahnge"],
}
],
works: [
{