فهرست منبع

项目组成员新增

sangwenwei 1 سال پیش
والد
کامیت
922d9805d6
1فایلهای تغییر یافته به همراه19 افزوده شده و 33 حذف شده
  1. 19 33
      src/views/program/registered/RegisItemForm.vue

+ 19 - 33
src/views/program/registered/RegisItemForm.vue

@@ -637,20 +637,9 @@
 					:edit-config="{trigger: 'click', mode: 'row', showStatus: false, autoClear:  status === 'audit' || status === 'taskFormDetail' ? true : false, icon: '#'}"
 				>
 					<vxe-table-column field="name" title="姓名" :edit-render="{name: '$input'}" align="center">
-<!--						<template v-slot:edit="scope">-->
-<!--							<vxe-input v-model="scope.row.name" :disabled="commonJS.isNotEmpty(scope.row.userId) || status === 'audit' || status === 'taskFormDetail'"  style="width: 100%">-->
-<!--								<template #suffix>-->
-<!--									<vxe-button :disabled="status === 'audit' || status === 'taskFormDetail'" @click="openUserSearch(scope.$rowIndex)" type="text" content="" icon="el-icon-search" ></vxe-button>-->
-<!--								</template>-->
-<!--							</vxe-input>-->
-<!--						</template>-->
 						<template v-slot:edit="scope">
 							<vxe-input v-model="scope.row.name" :disabled="commonJS.isNotEmpty(scope.row.userId) || status === 'audit' || status === 'taskFormDetail'"  style="width: 100%">
-<!--								<template #suffix>-->
-<!--									<vxe-button :disabled="status === 'audit' || status === 'taskFormDetail'" @click="openUserSearch(scope.$rowIndex)" type="text" content="" icon="el-icon-search" ></vxe-button>-->
-<!--								</template>-->
 								<template #suffix>
-<!--									<i class="el-icon-search" @click="openUserSearch(scope.$rowIndex)"></i>-->
 									<el-button :disabled="status === 'audit' || status === 'taskFormDetail'"  @click="openUserSearch(scope.$rowIndex)" type="text" content="" icon="el-icon-search" ></el-button>
 								</template>
 							</vxe-input>
@@ -1485,28 +1474,25 @@
       // eslint-disable-next-line no-dupe-keys
       insertEvent (type) {
         if (type === 'member') {
-          if (this.commonJS.isEmpty(this.inputForm.members)) {
-			this.$refs.memberTable.insertAt({})
-            this.inputForm.members.push({})
-            // this.inputForm.members = []
-          }
-          // this.$refs.memberTable.insert().then((data) => {
-          //   data.name = ''
-          //   data.workHours = ''
-          //   data.type = ''
-          //   data.job = ''
-          //   // if (this.commonJS.isEmpty(this.inputForm.members)) {
-          //   //   this.inputForm.members = []
-          //   //   this.inputForm.members.push(data)
-          //   // } else {
-          //   //   this.inputForm.members.push(data)
-          //   // }
-          //   this.inputForm.members.push(data)
-          //   console.log(this.inputForm.members)
-          //   console.log(this.inputForm.members)
-          // })
-			this.memberKey = Math.random()
-        }
+			if (this.commonJS.isEmpty(this.inputForm.members)) {
+				this.inputForm.members = []
+			}
+			this.$refs.memberTable.insert().then((data) => {
+				data.name = ''
+				data.workHours = ''
+				data.type = ''
+				data.job = ''
+				// if (this.commonJS.isEmpty(this.inputForm.members)) {
+				//   this.inputForm.members = []
+				//   this.inputForm.members.push(data)
+				// } else {
+				//   this.inputForm.members.push(data)
+				// }
+				this.inputForm.members.push(data)
+				console.log(this.inputForm.members)
+				console.log(this.inputForm.members)
+			})
+		}
         if (type === 'contact') {
           this.$refs.contactTable.insert().then((data) => {
             this.inputForm.contactList.push(data)