|
|
|
|
@ -77,6 +77,7 @@
|
|
|
|
|
|
|
|
|
|
<el-table v-loading="loading" :data="student_workerList" @selection-change="handleSelectionChange">
|
|
|
|
|
<el-table-column type="selection" width="55" align="center" />
|
|
|
|
|
<el-table-column label="ID" align="center" prop="id" />
|
|
|
|
|
<el-table-column label="学生用户ID" align="center" prop="studentUserId" />
|
|
|
|
|
<el-table-column label="企业员工用户ID" align="center" prop="workerUserId" />
|
|
|
|
|
<el-table-column label="关系生成时间" align="center" prop="datetime" width="180">
|
|
|
|
|
@ -210,6 +211,7 @@ export default {
|
|
|
|
|
// 表单重置
|
|
|
|
|
reset() {
|
|
|
|
|
this.form = {
|
|
|
|
|
id: null,
|
|
|
|
|
studentUserId: null,
|
|
|
|
|
workerUserId: null,
|
|
|
|
|
datetime: null
|
|
|
|
|
@ -228,7 +230,7 @@ export default {
|
|
|
|
|
},
|
|
|
|
|
// 多选框选中数据
|
|
|
|
|
handleSelectionChange(selection) {
|
|
|
|
|
this.ids = selection.map(item => item.studentUserId)
|
|
|
|
|
this.ids = selection.map(item => item.id)
|
|
|
|
|
this.single = selection.length!==1
|
|
|
|
|
this.multiple = !selection.length
|
|
|
|
|
},
|
|
|
|
|
@ -241,8 +243,8 @@ export default {
|
|
|
|
|
/** 修改按钮操作 */
|
|
|
|
|
handleUpdate(row) {
|
|
|
|
|
this.reset();
|
|
|
|
|
const studentUserId = row.studentUserId || this.ids
|
|
|
|
|
getStudent_worker(studentUserId).then(response => {
|
|
|
|
|
const id = row.id || this.ids
|
|
|
|
|
getStudent_worker(id).then(response => {
|
|
|
|
|
this.form = response.data;
|
|
|
|
|
this.open = true;
|
|
|
|
|
this.title = "修改企业员工与学生关系";
|
|
|
|
|
@ -252,7 +254,7 @@ export default {
|
|
|
|
|
submitForm() {
|
|
|
|
|
this.$refs["form"].validate(valid => {
|
|
|
|
|
if (valid) {
|
|
|
|
|
if (this.form.studentUserId != null) {
|
|
|
|
|
if (this.form.id != null) {
|
|
|
|
|
updateStudent_worker(this.form).then(response => {
|
|
|
|
|
this.msgSuccess("修改成功");
|
|
|
|
|
this.open = false;
|
|
|
|
|
@ -270,13 +272,13 @@ export default {
|
|
|
|
|
},
|
|
|
|
|
/** 删除按钮操作 */
|
|
|
|
|
handleDelete(row) {
|
|
|
|
|
const studentUserIds = row.studentUserId || this.ids;
|
|
|
|
|
this.$confirm('是否确认删除企业员工与学生关系编号为"' + studentUserIds + '"的数据项?', "警告", {
|
|
|
|
|
const ids = row.id || this.ids;
|
|
|
|
|
this.$confirm('是否确认删除企业员工与学生关系编号为"' + ids + '"的数据项?', "警告", {
|
|
|
|
|
confirmButtonText: "确定",
|
|
|
|
|
cancelButtonText: "取消",
|
|
|
|
|
type: "warning"
|
|
|
|
|
}).then(function() {
|
|
|
|
|
return delStudent_worker(studentUserIds);
|
|
|
|
|
return delStudent_worker(ids);
|
|
|
|
|
}).then(() => {
|
|
|
|
|
this.getList();
|
|
|
|
|
this.msgSuccess("删除成功");
|
|
|
|
|
|