From 2f89d580bafe86bd0abdd5c81a8b24f98f78b03a Mon Sep 17 00:00:00 2001 From: weipengfei <2187978347@qq.com> Date: Mon, 28 Aug 2023 13:42:27 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../task_template/dialog_index_personnel.vue | 102 ++++++++++++++++++ src/views/task_template/edit.vue | 43 ++++++++ 2 files changed, 145 insertions(+) create mode 100644 src/views/task_template/dialog_index_personnel.vue diff --git a/src/views/task_template/dialog_index_personnel.vue b/src/views/task_template/dialog_index_personnel.vue new file mode 100644 index 0000000..70b7b10 --- /dev/null +++ b/src/views/task_template/dialog_index_personnel.vue @@ -0,0 +1,102 @@ + + + diff --git a/src/views/task_template/edit.vue b/src/views/task_template/edit.vue index 6514909..09e4ed3 100644 --- a/src/views/task_template/edit.vue +++ b/src/views/task_template/edit.vue @@ -65,6 +65,18 @@ :value="formData.extend?.terminus?.address" /> + + + + + + @@ -171,6 +191,7 @@ import { timeFormat } from "@/utils/util"; import type { PropType } from "vue"; import { dictDataLists } from "@/api/setting/dict"; import taskMap from "./map.vue"; +import personnelPopup from "./dialog_index_personnel.vue"; defineProps({ dictData: { type: Object as PropType>, @@ -204,6 +225,8 @@ const formData = reactive({ money_two: 0, // 二阶段金额 money_three: 0, // 长期金额 types: "", //阶段类型 + task_admin: "", //任务负责人 + task_admin_name: "", //任务负责人 extend: { // origin: { // address: "", @@ -264,6 +287,13 @@ const formRules = reactive({ trigger: ["blur"], }, ], + task_admin: [ + { + required: true, + message: "请选择负责人", + trigger: ["blur"], + }, + ], "extend.origin.address": [ { required: true, @@ -349,6 +379,19 @@ const setMap = (e: any) => { formData.extend[mapType.value] = e[0]; }; +// 选择负责人 +const personnelShow = ref(false); +const personnelRef = shallowRef>(); +const changePersonner = (e: any) => { + formData.task_admin = e.id; + formData.task_admin_name = e.name; + personnelShow.value = false; +}; + +const clickTaskAdmin = async () => { + personnelShow.value = true; +}; + // 提交按钮 const handleSubmit = async () => { await formRef.value?.validate();