From 6f221dcf9554642585222f52e6ae122d45f4eb9e Mon Sep 17 00:00:00 2001
From: xiangpei <xiangpei@timesnew.cn>
Date: 星期一, 14 十月 2024 15:52:40 +0800
Subject: [PATCH] 学生编辑使用弹窗形式
---
src/views/education/department/edit.vue | 30 ++++++++++++++++++++++--------
1 files changed, 22 insertions(+), 8 deletions(-)
diff --git a/src/views/education/department/edit.vue b/src/views/education/department/edit.vue
index 2ef4c75..269437a 100644
--- a/src/views/education/department/edit.vue
+++ b/src/views/education/department/edit.vue
@@ -1,9 +1,9 @@
<template>
<div class="app-container">
- <el-form :model="form" ref="form" label-width="100px" v-loading="formLoading">
- <el-form-item label="閮ㄩ棬锛�" required>
- <el-input v-model="form.name"></el-input>
+ <el-form :model="form" ref="form" label-width="120px" label-position="top" v-loading="formLoading">
+ <el-form-item label="閮ㄩ棬鍚嶇О锛�" required>
+ <el-input v-model="form.name" style="width: 450px"></el-input>
</el-form-item>
<el-form-item label="涓婄骇閮ㄩ棬锛�">
<el-cascader
@@ -19,7 +19,7 @@
<!-- </el-select>-->
<!-- </el-form-item>-->
<el-form-item v-if="fig === 0" label="绠$悊鍛橈細">
- <el-select v-model="form.adminId" filterable placeholder="閫夋嫨绠$悊鍛�">
+ <el-select v-model="form.adminId" filterable placeholder="閫夋嫨绠$悊鍛�" multiple collapse-tags>
<el-option
v-for="item in deptUserList"
:key="item.id"
@@ -28,8 +28,18 @@
</el-option>
</el-select>
</el-form-item>
+ <el-form-item label="鍙鐞嗕笁绾у崟浣嶏細">
+ <el-switch
+ style="display: block"
+ v-model="form.special"
+ active-color="#13ce66"
+ inactive-color="#ff4949"
+ active-text="鍏佽"
+ inactive-text="绂佹">
+ </el-switch>
+ </el-form-item>
<el-form-item>
- <el-button type="primary" @click="submitForm">鎻愪氦</el-button>
+ <el-button type="primary" @click="submitForm">淇濆瓨</el-button>
<el-button @click="resetForm">閲嶇疆</el-button>
</el-form-item>
</el-form>
@@ -51,7 +61,8 @@
id: null,
name: '',
parentId: null,
- adminId: null
+ adminId: null,
+ special: false,
// level: 1,
// levelName: ''
},
@@ -65,6 +76,7 @@
if (id && parseInt(id) !== 0) {
_this.formLoading = true
departmentApi.select(id).then(re => {
+ re.response.parentId = re.response.parentIds
_this.form = re.response
_this.formLoading = false
})
@@ -99,7 +111,7 @@
// name: this.form.name
// }
if (_this.form.parentId) {
- _this.form.parentId = _this.form.parentId[0];
+ _this.form.parentId = _this.form.parentId[_this.form.parentId.length - 1];
}
if (_this.fig === 1) {
departmentApi.addData(this.form).then(res => {
@@ -147,7 +159,9 @@
id: null,
name: '',
level: 1,
- levelName: ''
+ parentId: null,
+ levelName: '',
+ special: false
}
this.form.id = lastId
},
--
Gitblit v1.8.0