From cb88dd39535f78d8565c7ca3766a57c5b2901cce Mon Sep 17 00:00:00 2001 From: shilixia <2309368887@qq.com> Date: Fri, 24 Jul 2020 10:38:51 +0800 Subject: [PATCH 1/2] pullxinneirong --- client/src/views/employee/traincreate.vue | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/client/src/views/employee/traincreate.vue b/client/src/views/employee/traincreate.vue index 1780ffb..1004679 100644 --- a/client/src/views/employee/traincreate.vue +++ b/client/src/views/employee/traincreate.vue @@ -121,14 +121,10 @@ diff --git a/client/src/views/employee/traincreate.vue b/client/src/views/employee/traincreate.vue index 1004679..489a41c 100644 --- a/client/src/views/employee/traincreate.vue +++ b/client/src/views/employee/traincreate.vue @@ -54,14 +54,15 @@ - - - 选择 - - - - + + + 选择 + + + + + @@ -161,10 +162,19 @@ export default { closeMoule(e) { - this.formData.employees = e, - this.dialogVisible = false - - + + + this.type_employees = e; + this.dialogVisible = false; + var arrTemp = []; + var arrName = []; + for(let i=0;i -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 选择 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 提交 - 重置 - - -
- - + + }); + + }, + + closeMoule(e) { + + + + this.type_employees = e; + this.dialogVisible = false; + var arrTemp = []; + var arrName = []; + for (let i = 0; i < e.length; i++) { + + arrTemp.push(e[i].id); + arrName.push(e[i].name); + } + this.formData.employees = arrTemp; + this.formData.employeeList = arrName + } + , + submitForm() { + this.$refs["elForm"].validate(valid => { + if (!valid) return; + // TODO 提交表单 + updateTrain(this.formData.id,this.formData).then(response => { + + this.$message({ + type: 'success', + message: '成功!' + + }) + this.$router.go(-1); + }); + + }); + }, + + + resetForm() { + this.$refs['elForm'].resetFields() + }, + } + } + diff --git a/client/src/views/employee/userselet.vue b/client/src/views/employee/userselet.vue index f423327..68d910d 100644 --- a/client/src/views/employee/userselet.vue +++ b/client/src/views/employee/userselet.vue @@ -1,6 +1,4 @@ - -