add
This commit is contained in:
parent
8b2b99c470
commit
d033c98f64
@ -25,7 +25,7 @@
|
|||||||
<el-table-column label="汇报工作内容" prop="works" show-overflow-tooltip />
|
<el-table-column label="汇报工作内容" prop="works" show-overflow-tooltip />
|
||||||
<el-table-column label="汇报时间" prop="send_time" 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="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">
|
<el-table-column label="操作" width="120" fixed="right">
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
<el-button v-perms="['works.rcbg.oa_work/edit']" type="primary" link @click="handleEdit(row)">
|
<el-button v-perms="['works.rcbg.oa_work/edit']" type="primary" link @click="handleEdit(row)">
|
||||||
|
@ -40,6 +40,11 @@ import Popup from "@/components/popup/index.vue";
|
|||||||
import { apiOaWorkAdd, apiOaWorkEdit, apiOaWorkDetail } from "@/api/oa_work";
|
import { apiOaWorkAdd, apiOaWorkEdit, apiOaWorkDetail } from "@/api/oa_work";
|
||||||
import { timeFormat } from "@/utils/util";
|
import { timeFormat } from "@/utils/util";
|
||||||
import type { PropType } from "vue";
|
import type { PropType } from "vue";
|
||||||
|
import useUserStore from "@/stores/modules/user";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
defineProps({
|
defineProps({
|
||||||
dictData: {
|
dictData: {
|
||||||
type: Object as PropType<Record<string, any[]>>,
|
type: Object as PropType<Record<string, any[]>>,
|
||||||
@ -52,6 +57,7 @@ const popupRef = shallowRef<InstanceType<typeof Popup>>();
|
|||||||
const mode = ref("add");
|
const mode = ref("add");
|
||||||
const showDialog = ref(false)
|
const showDialog = ref(false)
|
||||||
const personnel = ref(null)
|
const personnel = ref(null)
|
||||||
|
const userStore = useUserStore().userInfo;
|
||||||
|
|
||||||
// 弹窗标题
|
// 弹窗标题
|
||||||
const popupTitle = computed(() => {
|
const popupTitle = computed(() => {
|
||||||
@ -92,6 +98,16 @@ const submituser = (e: any) => {
|
|||||||
showDialog.value = false
|
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>({
|
const formRules = reactive<any>({
|
||||||
type: [
|
type: [
|
||||||
@ -106,7 +122,10 @@ const formRules = reactive<any>({
|
|||||||
required: true,
|
required: true,
|
||||||
message: "请选择接受人员",
|
message: "请选择接受人员",
|
||||||
trigger: ["cahnge"],
|
trigger: ["cahnge"],
|
||||||
},
|
}, {
|
||||||
|
validator: checkUser,
|
||||||
|
trigger: ["cahnge"],
|
||||||
|
}
|
||||||
],
|
],
|
||||||
works: [
|
works: [
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user