diff --git a/client/src/views/employee/train.vue b/client/src/views/employee/train.vue index cb46a31..b9da723 100644 --- a/client/src/views/employee/train.vue +++ b/client/src/views/employee/train.vue @@ -135,12 +135,24 @@ export default { handleUpdate(scope) { this.$router.push({path:"/employee/train/update",query:{id:scope.row.id}}) }, - handleDelete(scope) { - deleteImplementRule(scope.row.id).then(res=>{ - this.$message.success('成功') - this.getList() - }) - } + handleDelete(scope) { + this.$confirm('确定删除本条数据吗?', '提示', { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning' + }).then(() => { + deleteTrain(scope.row.id).then(res=>{ + this.$message.success('删除成功') + this.getList() + }) + }).catch(() => { + this.$message({ + type: 'info', + message: '已取消删除' + }); + }); + +}, } }; diff --git a/client/src/views/employee/traincreate.vue b/client/src/views/employee/traincreate.vue index 1780ffb..489a41c 100644 --- a/client/src/views/employee/traincreate.vue +++ b/client/src/views/employee/traincreate.vue @@ -54,14 +54,15 @@ - - - 选择 - - - - + + + 选择 + + + + + @@ -121,14 +122,10 @@ + + }); + + }, + + 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 @@ - -