From 86d6af58a6ff9525dab795c6f0c9bea92fa1d28d Mon Sep 17 00:00:00 2001
From: shj <1790240199@qq.com>
Date: Wed, 17 Aug 2022 17:27:38 +0800
Subject: [PATCH] 对接
---
src/views/goalManagement/targetDecompositionYear/component/DailogAdd.vue | 80 ++++++++++++++++++++++++++++++++++-----
1 files changed, 69 insertions(+), 11 deletions(-)
diff --git a/src/views/goalManagement/targetDecompositionYear/component/DailogAdd.vue b/src/views/goalManagement/targetDecompositionYear/component/DailogAdd.vue
index 6041772..e6a0496 100644
--- a/src/views/goalManagement/targetDecompositionYear/component/DailogAdd.vue
+++ b/src/views/goalManagement/targetDecompositionYear/component/DailogAdd.vue
@@ -2,14 +2,22 @@
<el-dialog v-model="dialogVisible" :fullscreen="full" :title="titles" width="50%" draggable @close="resetForm(ruleFormRef)">
<el-button @click="toggleFullscreen" size="small" class="pot" :icon="FullScreen"></el-button>
<el-form :model="form" :disabled="disabled" label-width="120px" ref="ruleFormRef" :rules="rules">
- <!-- <el-row>
+ <el-row>
<el-col :span="11">
- <el-form-item label="考核指标" prop="value" size="default"> </el-form-item>
+ <el-form-item label="目标分类" prop="targetTypeId" size="default">
+ <el-select v-model="form.targetTypeId" class="m-2" placeholder="请选择" style="width:100%">
+ <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value" />
+ </el-select>
+ </el-form-item>
</el-col>
<el-col :span="11" :offset="2">
- <el-form-item label="考核指标" prop="value" size="default"> </el-form-item>
+ <el-form-item label="责任人" prop="dutyPersonName" size="default">
+ <el-input v-model="form.dutyPersonName">
+ <template #append> <el-button :icon="Search" @click="openUser(1)" /> </template
+ ></el-input>
+ </el-form-item>
</el-col>
- </el-row> -->
+ </el-row>
<el-row>
<el-col :span="11">
<el-form-item label="责任部门" prop="dutyDepartmentId" size="default">
@@ -61,11 +69,15 @@
<el-col :span="11">
<el-form-item label="上报人" prop="commitPersonName" size="default">
<el-input v-model="form.commitPersonName">
- <template #append> <el-button :icon="Search" @click="openUser" /> </template
+ <template #append> <el-button :icon="Search" @click="openUser(2)" /> </template
></el-input>
</el-form-item>
</el-col>
- <el-col :span="11" :offset="2"> </el-col>
+ <el-col :span="11" :offset="2">
+ <el-form-item label="计划措施" prop="commitPersonName" size="default">
+ <el-input v-model="form.planDesc"></el-input>
+ </el-form-item>
+ </el-col>
</el-row>
</el-form>
<template #footer>
@@ -95,6 +107,10 @@
commitPersonName: '',
value: '', ////考核指标值
makeDate: '', ////制定日期
+ targetTypeId: '', ///目标分类
+ dutyPersonId: '', ///责任人id
+ dutyPersonName: '', ///责任人
+ planDesc: '', ///计划措施
});
//部门
const department = () => {
@@ -135,10 +151,24 @@
};
// 开启用户弹窗
const Show = ref();
- const openUser = () => {
- Show.value.openDailog();
+ const openUser = (type:any) => {
+ Show.value.openDailog(type);
};
const rules = reactive<FormRules>({
+ targetTypeId: [
+ {
+ required: true,
+ message: '目标分类不能为空',
+ trigger: 'blur',
+ },
+ ],
+ dutyPersonName: [
+ {
+ required: true,
+ message: '责任人不能为空',
+ trigger: 'blur',
+ },
+ ],
dutyDepartmentId: [
{
required: true,
@@ -214,10 +244,15 @@
}
};
const data = ref();
- const onUser = (e: any) => {
+ const onUser = (e: any, type: any) => {
console.log(e);
- form.value.commitPersonId = e.uid;
- form.value.commitPersonName = e.realName;
+ if (type == 1) {
+ form.value.dutyPersonId = e.uid;
+ form.value.dutyPersonName = e.realName;
+ } else if (type == 2) {
+ form.value.commitPersonId = e.uid;
+ form.value.commitPersonName = e.realName;
+ }
};
const makerName = (data: any) => {
form.value.makerDepartmentName = data.depName;
@@ -225,7 +260,30 @@
const dutyName = (data: any) => {
form.value.dutyDepartmentName = data.depName;
};
+ const options = [
+ {
+ value: 1,
+ label: 'Option1',
+ },
+ {
+ value: 2,
+ label: 'Option2',
+ },
+ {
+ value: 3,
+ label: 'Option3',
+ },
+ {
+ value: 4,
+ label: 'Option4',
+ },
+ {
+ value: 5,
+ label: 'Option5',
+ },
+ ];
return {
+ options,
disabled,
makerName,
dutyName,
--
Gitblit v1.9.2