Blame view

src/views/basic/setUp/teacher.vue 32.6 KB
4c4f7640   梁保满   路由表,路由前端文件
1
  <template>
23a6dc5f   阿宝   学校管理相关接口简单对接
2
3
4
5
6
    <div>
      <back-box>
        <template slot="title">
          <span>教师管理</span>
        </template>
b21d90ef   梁保满   长水登录
7
        <template slot="btns" v-if="!code">
e371f2dc   梁保满   软件下载,学校,班级老师等报表导入...
8
          <el-tooltip effect="dark" content="导入教师名单" placement="bottom">
29319cfb   梁保满   设备。教师管理
9
            <el-button type="primary" icon="el-icon-upload2" size="mini" plain circle @click="diaUp = true"></el-button>
e371f2dc   梁保满   软件下载,学校,班级老师等报表导入...
10
11
          </el-tooltip>
          <el-tooltip effect="dark" content="导出教师名单" placement="bottom">
29319cfb   梁保满   设备。教师管理
12
13
            <el-button type="primary" icon="el-icon-download" size="mini" plain circle
              @click="exportTeacherExl"></el-button>
e371f2dc   梁保满   软件下载,学校,班级老师等报表导入...
14
          </el-tooltip>
23a6dc5f   阿宝   学校管理相关接口简单对接
15
          <el-tooltip effect="dark" content="添加教师" placement="bottom">
29319cfb   梁保满   设备。教师管理
16
            <el-button type="primary" icon="el-icon-plus" size="mini" plain circle @click="addTeacherDia"></el-button>
23a6dc5f   阿宝   学校管理相关接口简单对接
17
18
19
20
21
22
          </el-tooltip>
        </template>
      </back-box>
  
      <div class="answer-header">
        <div class="sel-box">
8ad80958   梁保满   教师学生管理,设备状态
23
          <el-select class="sel" v-model="query.classType" @change="changeType" placeholder="选择类型">
29319cfb   梁保满   设备。教师管理
24
25
26
27
28
            <el-option label="行政班" :value="0"></el-option>
            <el-option label="教学班" :value="1"></el-option>
          </el-select>
          <el-cascader size="small" class="sel sel2" clearable placeholder="选择范围" @change="_QueryData(1)"
            v-model="query.gradeClassSub" :options="gradeClassSubList" :props="{
53424e83   梁保满   教师管理筛选条件
29
30
              multiple: true,
              checkStrictly: true,
29319cfb   梁保满   设备。教师管理
31
32
            }" collapse-tags :show-all-levels="false"></el-cascader>
          <el-select class="sel" v-model="query.type" @change="_QueryData(4)" placeholder="选择类型">
5cfb0264   梁保满   班级管理交互优化
33
            <el-option disabled label="请选择" :value="9"></el-option>
55eb13fd   梁保满   中天提出的交互优化
34
35
            <el-option label="已分配任课信息" :value="0"></el-option>
            <el-option label="未分配任课信息" :value="1"></el-option>
23a6dc5f   阿宝   学校管理相关接口简单对接
36
          </el-select>
29319cfb   梁保满   设备。教师管理
37
38
39
          <el-input placeholder="请输入老师姓名" v-model="query.teacherName" class="input-with-select" maxlength="30" clearable
            @keyup.enter.native="_QueryData(2)">
            <el-button slot="append" icon="el-icon-search" @click="_QueryData(2)"></el-button>
23a6dc5f   阿宝   学校管理相关接口简单对接
40
          </el-input>
29319cfb   梁保满   设备。教师管理
41
42
43
          <el-input type="number" oninput="if(value.length > 11) value = value.slice(0,11)" placeholder="请输入老师手机号"
            v-model="query.phone" clearable class="input-with-select" @keyup.enter.native="_QueryData(3)">
            <el-button slot="append" icon="el-icon-search" @click="_QueryData(3)"></el-button>
23a6dc5f   阿宝   学校管理相关接口简单对接
44
          </el-input>
a4074db8   梁保满   使用分析,集团管理元交互
45
          <!-- <el-button class="serach-box" round @click="_QueryData(4)"
53424e83   梁保满   教师管理筛选条件
46
            >筛选</el-button
a4074db8   梁保满   使用分析,集团管理元交互
47
          > -->
23a6dc5f   阿宝   学校管理相关接口简单对接
48
49
        </div>
      </div>
99713685   梁保满   学生调班,班级数据重新请求,使用过...
50
51
52
      <p class="total" v-if="teacherList.length">
        共筛选出{{ teacherList.length }}名教师。
      </p>
23a6dc5f   阿宝   学校管理相关接口简单对接
53
      <div class="page-content">
29319cfb   梁保满   设备。教师管理
54
        <el-empty :image-size="100" v-if="!teacherList.length && loading == false" description="没有更多数据"></el-empty>
23a6dc5f   阿宝   学校管理相关接口简单对接
55
56
        <div class="teacher-box" v-loading="loading" v-else>
          <div class="teacher-list">
29319cfb   梁保满   设备。教师管理
57
            <p class="h-title" v-loading="removeLoading">
8ad80958   梁保满   教师学生管理,设备状态
58
59
60
              <el-checkbox v-show="showDel" v-model="AllTeacher" :indeterminate="indeterminate"
                @change="handleCheckAllChange">{{ ""
                }}</el-checkbox>
29319cfb   梁保满   设备。教师管理
61
62
63
64
65
66
67
              <span class="txt">教师列表</span>
              <img v-show="showDel" class="clear" @click="remove" src="../../../assets/images/shuazi.svg" alt="">
            </p>
            <el-checkbox-group v-model="clearTeacher" @change="handleCheckedChange">
              <ul class="teacher-ul">
                <li class="teacher-item" v-for="item in teacherList" :key="item.id"
                  :class="showTId == item.id ? 'active' : ''">
8ad80958   梁保满   教师学生管理,设备状态
68
                  <el-checkbox v-show="showDel" :label="item.id">{{ "" }}</el-checkbox>
29319cfb   梁保满   设备。教师管理
69
70
71
72
73
                  <p @click="showTeacher(item)"> {{ item.realName
                  }}<template v-if="setClass(item)">({{ setClass(item) }})</template></p>
                </li>
              </ul>
            </el-checkbox-group>
23a6dc5f   阿宝   学校管理相关接口简单对接
74
75
          </div>
          <div class="teacher-detail">
b21d90ef   梁保满   长水登录
76
            <div class="icon-box" v-if="!code">
0a4de034   阿宝   教师管理,学生管理班级设置
77
              <i class="icon el-icon-edit-outline" @click="editTeacher(1)"></i>
29319cfb   梁保满   设备。教师管理
78
              <i class="icon el-icon-circle-plus-outline" @click="editTeacher(2)"></i>
23a6dc5f   阿宝   学校管理相关接口简单对接
79
80
81
82
            </div>
            <div class="detail-top">
              <p class="p-item">手机号码:{{ teacherDetail.loginName }}</p>
              <p class="p-item">
560c12f2   阿宝   学校设置,软件下载
83
                状态:{{ teacherDetail.available == 1 ? "不可用" : "正常" }}
23a6dc5f   阿宝   学校管理相关接口简单对接
84
85
86
87
              </p>
              <p class="p-item">
                性别:{{
                  teacherDetail.sex == 1
29319cfb   梁保满   设备。教师管理
88
89
                  ? "男"
                  : teacherDetail.sex == 2
23a6dc5f   阿宝   学校管理相关接口简单对接
90
91
92
93
94
                    ? "女"
                    : "未知"
                }}
              </p>
            </div>
29319cfb   梁保满   设备。教师管理
95
            <div class="grade-box" v-if="teacherDetail.managerList && teacherDetail.managerList.length">
23a6dc5f   阿宝   学校管理相关接口简单对接
96
97
              <p class="h-title">班主任</p>
              <ul class="grade-info">
29319cfb   梁保满   设备。教师管理
98
99
                <li class="grade-li" v-for="item in teacherDetail.managerList" :key="item.classId">
                  <el-popconfirm title="确定删除吗?" @confirm="delTeacherManager(item, 1)" v-if="!code">
bb4c8454   阿宝   添加,修改教师
100
101
                    <i class="el-icon-delete" slot="reference"></i>
                  </el-popconfirm>
23a6dc5f   阿宝   学校管理相关接口简单对接
102
                  <div class="grade-item">
ec6394d1   梁保满   v1.3.1。细节调整
103
                    <p class="grade-name">
0ca11cc2   梁保满   学段参数调整,发卡记录类型增加
104
                      {{ item.gradeName }}-{{ item.className }}
ec6394d1   梁保满   v1.3.1。细节调整
105
                    </p>
23a6dc5f   阿宝   学校管理相关接口简单对接
106
107
108
109
110
111
112
113
114
115
116
                    <div class="grade-class">
                      <p>
                        <i class="fa fa-address-book-o"></i>学生:{{
                          item.studentCount
                        }}个
                      </p>
                    </div>
                  </div>
                </li>
              </ul>
            </div>
29319cfb   梁保满   设备。教师管理
117
118
119
            <div class="grade-box" v-if="teacherDetail.teacherCourseList &&
              teacherDetail.teacherCourseList.length
              ">
23a6dc5f   阿宝   学校管理相关接口简单对接
120
121
              <p class="h-title">任课老师</p>
              <ul class="grade-info">
29319cfb   梁保满   设备。教师管理
122
123
                <li class="grade-li" v-for="item in teacherDetail.teacherCourseList" :key="item.classId + item.subjectName">
                  <el-popconfirm title="确定删除吗?" @confirm="delTeacherManager(item, 2)" v-if="!code">
bb4c8454   阿宝   添加,修改教师
124
125
                    <i class="el-icon-delete" slot="reference"></i>
                  </el-popconfirm>
23a6dc5f   阿宝   学校管理相关接口简单对接
126
127
                  <div class="grade-item">
                    <p class="grade-name">
0ca11cc2   梁保满   学段参数调整,发卡记录类型增加
128
                      {{ item.gradeName }}-{{ item.className }}({{
ec6394d1   梁保满   v1.3.1。细节调整
129
130
                        item.subjectName
                      }})
23a6dc5f   阿宝   学校管理相关接口简单对接
131
132
133
134
135
136
137
138
139
140
141
142
                    </p>
                    <div class="grade-class">
                      <p>
                        <i class="fa fa-address-book-o"></i>学生:{{
                          item.studentCount
                        }}个
                      </p>
                    </div>
                  </div>
                </li>
              </ul>
            </div>
29319cfb   梁保满   设备。教师管理
143
144
145
            <div class="grade-box" v-if="teacherDetail.teacherGradeList &&
              teacherDetail.teacherGradeList.length
              ">
23a6dc5f   阿宝   学校管理相关接口简单对接
146
              <p class="h-title">备课组长</p>
29319cfb   梁保满   设备。教师管理
147
              <ul class="grade-info" v-for="item in teacherDetail.teacherGradeList" :key="item.grade">
23a6dc5f   阿宝   学校管理相关接口简单对接
148
                <li class="grade-li">
29319cfb   梁保满   设备。教师管理
149
                  <el-popconfirm title="确定删除吗?" @confirm="delTeacherManager(item, 3)" v-if="!code">
bb4c8454   阿宝   添加,修改教师
150
151
                    <i class="el-icon-delete" slot="reference"></i>
                  </el-popconfirm>
23a6dc5f   阿宝   学校管理相关接口简单对接
152
153
                  <div class="grade-item">
                    <p class="grade-name">
53424e83   梁保满   教师管理筛选条件
154
                      {{ item.gradeName }}({{ item.subjectName }})
23a6dc5f   阿宝   学校管理相关接口简单对接
155
156
157
158
159
160
161
162
                    </p>
                  </div>
                </li>
              </ul>
            </div>
          </div>
        </div>
      </div>
29319cfb   梁保满   设备。教师管理
163
164
      <el-dialog :close-on-click-modal="false" title="导入教师名单" :visible.sync="diaUp" width="600">
        <upload id="downTeacher" :url="url" @upSuccess="upSuccess" fileName="教师名单">
23a6dc5f   阿宝   学校管理相关接口简单对接
165
166
167
168
          <p class="down-txt" slot="down">
            通过Excel名单导入教师名单,点击
            <el-link type="danger" @click="downExcel">模板下载</el-link> 。
          </p>
6192eba8   梁保满   引用上传文件组件问题,备题组卷顶部
169
        </upload>
23a6dc5f   阿宝   学校管理相关接口简单对接
170
171
172
173
        <div class="dialog-footer" slot="footer">
          <el-button @click="diaUp = false">取 消</el-button>
        </div>
      </el-dialog>
29319cfb   梁保满   设备。教师管理
174
175
      <el-dialog :close-on-click-modal="false" :title="isAdd ? '添加教师' : setTercherType == 1 ? '编辑教师信息' : '管理班级'
        " :visible.sync="diaTeacher" width="400" append-to-body>
8ad80958   梁保满   教师学生管理,设备状态
176
        <el-form class="form-box" ref="formTeacher" :model="formTeacher" :rules="rulesTeacher" label="" width="160px">
e5ff81a1   阿宝   集团管理员接口
177
178
          <el-form-item v-show="!isAdd && setTercherType == 2" label="教师姓名:">
            <span>{{ formTeacher.teacherName }}</span>
0a4de034   阿宝   教师管理,学生管理班级设置
179
          </el-form-item>
29319cfb   梁保满   设备。教师管理
180
          <el-form-item v-show="isAdd || (!isAdd && setTercherType == 1)" label="手机号码:" prop="loginName">
dd5150c5   阿宝   数据同步
181
            <el-col :span="10">
29319cfb   梁保满   设备。教师管理
182
183
              <el-input type="number" oninput="if(value.length > 11) value = value.slice(0,11)"
                v-model.trim="formTeacher.loginName" />
dd5150c5   阿宝   数据同步
184
185
            </el-col>
          </el-form-item>
29319cfb   梁保满   设备。教师管理
186
          <el-form-item v-show="isAdd || (!isAdd && setTercherType == 1)" label="教师姓名:" prop="teacherName">
dd5150c5   阿宝   数据同步
187
188
189
190
            <el-col :span="10">
              <el-input maxlength="30" v-model.trim="formTeacher.teacherName" />
            </el-col>
          </el-form-item>
29319cfb   梁保满   设备。教师管理
191
          <el-form-item v-show="isAdd || (!isAdd && setTercherType == 1)" label="性别:" prop="sex">
dd5150c5   阿宝   数据同步
192
193
194
195
196
            <el-radio-group v-model="formTeacher.sex">
              <el-radio :label="1">男</el-radio>
              <el-radio :label="2">女</el-radio>
            </el-radio-group>
          </el-form-item>
29319cfb   梁保满   设备。教师管理
197
198
199
200
          <el-form-item v-show="isAdd || (!isAdd && setTercherType == 2)" label="教师角色:" prop="roleList">
            <div class="role-list" v-for="(item, index) in formTeacher.roleList" :key="item.id">
              <el-select class="sel-c" v-model="item.roleId" placeholder="选择角色" @change="item.classId = []">
                <el-option v-for="item in teacherRoleList" :key="item.value" :label="item.label" :value="item.value">
bb4c8454   阿宝   添加,修改教师
201
202
                </el-option>
              </el-select>
29319cfb   梁保满   设备。教师管理
203
204
205
206
207
208
209
              <el-cascader size="small" v-if="item.roleId == 6" class="sel-t" collapse clearable placeholder="选择年级-班级"
                v-model="item.classId" :options="gradeClassList" :props="{ expandTrigger: 'hover' }"></el-cascader>
              <el-cascader size="small" v-if="item.roleId == 7" class="sel-t teacher-cascader" collapse clearable
                placeholder="选择年级-科目-班级" v-model="item.classId" :options="gradeSubListClass"
                :props="{ expandTrigger: 'hover', multiple: true }" popperClass="cascader-clazz"></el-cascader>
              <el-cascader size="small" v-if="item.roleId == 8" class="sel-t" collapse clearable placeholder="选择年级-科目"
                v-model="item.classId" :options="gradeList" :props="{ expandTrigger: 'hover' }"></el-cascader>
bb4c8454   阿宝   添加,修改教师
210
211
212
213
214
              <i class="el-icon-close" @click="removeRoleList(index)"></i>
            </div>
            <p class="add-box">
              <el-button icon="el-icon-plus" @click="addRoleList">添加</el-button>
            </p>
dd5150c5   阿宝   数据同步
215
216
217
          </el-form-item>
        </el-form>
        <div class="dialog-footer" slot="footer">
0a4de034   阿宝   教师管理,学生管理班级设置
218
          <el-button type="primary" @click="addTeacher">确 定</el-button>
dd5150c5   阿宝   数据同步
219
220
221
          <el-button @click="diaTeacher = false">取 消</el-button>
        </div>
      </el-dialog>
23a6dc5f   阿宝   学校管理相关接口简单对接
222
    </div>
4c4f7640   梁保满   路由表,路由前端文件
223
224
225
  </template>
  
  <script>
ec6394d1   梁保满   v1.3.1。细节调整
226
227
228
229
230
231
  import {
    downloadFile,
    formatGradeClass,
    randomWord,
    setGradeName,
  } from "@/utils";
4c4f7640   梁保满   路由表,路由前端文件
232
  export default {
23a6dc5f   阿宝   学校管理相关接口简单对接
233
234
    data() {
      return {
b21d90ef   梁保满   长水登录
235
        code: "",
dd5150c5   阿宝   数据同步
236
        loading: false,
e371f2dc   梁保满   软件下载,学校,班级老师等报表导入...
237
        url: "/api_html/school/manager/importTeacher",
23a6dc5f   阿宝   学校管理相关接口简单对接
238
        diaUp: false,
bb4c8454   阿宝   添加,修改教师
239
240
        diaTeacher: false,
        isAdd: false,
0a4de034   阿宝   教师管理,学生管理班级设置
241
        setTercherType: 1,
23a6dc5f   阿宝   学校管理相关接口简单对接
242
        query: {
29319cfb   梁保满   设备。教师管理
243
          classType: 0,
53424e83   梁保满   教师管理筛选条件
244
245
          gradeClassSub: [],
          type: 0,
23a6dc5f   阿宝   学校管理相关接口简单对接
246
247
248
          teacherName: "",
          phone: "",
        },
23a6dc5f   阿宝   学校管理相关接口简单对接
249
        gradeList: [],
bb4c8454   阿宝   添加,修改教师
250
        classList: [],
53424e83   梁保满   教师管理筛选条件
251
        gradeClassSubList: [],
8ad80958   梁保满   教师学生管理,设备状态
252
        gradeClassList: [],
55eb13fd   梁保满   中天提出的交互优化
253
        gradeSubListClass: [],
dd5150c5   阿宝   数据同步
254
        teacherList: [],
0a4de034   阿宝   教师管理,学生管理班级设置
255
256
        teacherRoleList: [
          //角色
bb4c8454   阿宝   添加,修改教师
257
258
259
260
261
262
263
264
265
266
267
268
269
          {
            value: 6,
            label: "班主任",
          },
          {
            value: 7,
            label: "任课老师",
          },
          {
            value: 8,
            label: "备课组长",
          },
        ],
23a6dc5f   阿宝   学校管理相关接口简单对接
270
271
272
273
274
275
276
277
278
279
        teacherDetail: {
          teacherName: "",
          loginName: "",
          sex: "",
          available: "",
          managerList: [],
          teacherCourseList: [],
          teacherGradeList: [],
        },
        showTId: "", //显示详情 教师ID
bb4c8454   阿宝   添加,修改教师
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
        roleList: [],
        formTeacher: {
          teacherName: "",
          loginName: "",
          sex: 1,
          roleList: [],
        },
        rulesTeacher: {
          teacherName: [
            { required: true, message: "请输入联系电话", trigger: "blur" },
          ],
          loginName: [
            { required: true, message: "请输入教师姓名", trigger: "blur" },
          ],
          sex: [{ required: true, message: "请选择性别", trigger: "blur" }],
          roleList: [
            { required: true, message: "请选择角色信息", trigger: "blur" },
          ],
dd5150c5   阿宝   数据同步
298
        },
29319cfb   梁保满   设备。教师管理
299
300
301
302
303
  
        AllTeacher: false,
        indeterminate: false,
        clearTeacher: [],
        removeLoading: false
8ad80958   梁保满   教师学生管理,设备状态
304
305
  
  
23a6dc5f   阿宝   学校管理相关接口简单对接
306
307
      };
    },
29319cfb   梁保满   设备。教师管理
308
309
310
311
312
313
314
    computed: {
      showDel: function () {
        return !this.query.gradeClassSub.some(item => {
          return item.length > 1
        })
      }
    },
23a6dc5f   阿宝   学校管理相关接口简单对接
315
    async created() {
b21d90ef   梁保满   长水登录
316
      this.code = localStorage.getItem("csCode") || "";
b8827a72   梁保满   测试bug
317
      this._QueryData(4);
23a6dc5f   阿宝   学校管理相关接口简单对接
318
      await this._QueryDataGrade();
4623f67f   梁保满   隋唐问以及教师学生设置
319
      // this._RoleList();
23a6dc5f   阿宝   学校管理相关接口简单对接
320
321
    },
    methods: {
8ad80958   梁保满   教师学生管理,设备状态
322
323
324
325
326
327
328
329
      async changeType() {
        this.query.gradeClassSub = []
        this.query.type = 0
        this.query.teacherName = ""
        this.query.phone = ""
        this._QueryData(6);
        await this._QueryDataGrade();
      },
29319cfb   梁保满   设备。教师管理
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
      //选择删除
      handleCheckAllChange(val) {
        this.clearTeacher = val
          ? this.teacherList.map((item) => {
            return item.id;
          })
          : [];
        this.indeterminate = false;
      },
      handleCheckedChange(value) {
        let checkedCount = value.length;
        this.checkAll = checkedCount === this.teacherList.length;
        this.indeterminate =
          checkedCount > 0 && checkedCount < this.teacherList.length;
      },
4623f67f   梁保满   隋唐问以及教师学生设置
345
      //清除教师绑定班级信息
29319cfb   梁保满   设备。教师管理
346
      async remove() {
8ad80958   梁保满   教师学生管理,设备状态
347
        if (!this.clearTeacher.length) {
29319cfb   梁保满   设备。教师管理
348
349
350
351
352
353
354
355
356
357
358
359
          this.$message.warning("请选择要格式化的老师")
          return
        }
        this.removeLoading = true
        let grades = []
        this.query.gradeClassSub.map(item => {
          if (item.length == 1) {
            if (!grades.includes(item[0])) {
              grades.push(item[0]);
            }
          }
        })
8ad80958   梁保满   教师学生管理,设备状态
360
        const { data, status, info } = await this.$request.clearTeacherClasses({
29319cfb   梁保满   设备。教师管理
361
362
363
364
365
366
367
368
369
370
371
372
373
374
          ids: this.clearTeacher,
          type: this.query.classType,
          grades: grades
        });
        this.removeLoading = false
        if (status === 0) {
          this.$message.success(info);
          this._QueryData();
        } else {
          this.$message.error(info);
        }
      },
      //end
  
ec6394d1   梁保满   v1.3.1。细节调整
375
376
377
      gradeName(type) {
        return setGradeName(type);
      },
4623f67f   梁保满   隋唐问以及教师学生设置
378
      //导入成功
757a21e3   梁保满   上传成功提示成功数量
379
      upSuccess(res) {
757a21e3   梁保满   上传成功提示成功数量
380
381
382
383
384
        this.$message.closeAll();
        this.$message({
          showClose: true,
          message: `成功(${res.data.success})`,
          type: "success",
54857fa3   梁保满   下载模板跨域,集团管理员选择角色范...
385
          duration: 5000,
757a21e3   梁保满   上传成功提示成功数量
386
        });
e371f2dc   梁保满   软件下载,学校,班级老师等报表导入...
387
        this.diaUp = false;
3b9f2ddb   梁保满   学生。教师筛选参数
388
        this._QueryData(5);
255e2506   梁保满   飞书bug及优化
389
      },
4623f67f   梁保满   隋唐问以及教师学生设置
390
      //添加教师角色
bb4c8454   阿宝   添加,修改教师
391
      addRoleList() {
bb4c8454   阿宝   添加,修改教师
392
393
394
395
396
397
        this.formTeacher.roleList.push({
          id: randomWord(true, 16, 20),
          roleId: "",
          classId: [],
        });
      },
4623f67f   梁保满   隋唐问以及教师学生设置
398
      //删除教师角色
bb4c8454   阿宝   添加,修改教师
399
      removeRoleList(index) {
bb4c8454   阿宝   添加,修改教师
400
401
        this.formTeacher.roleList.splice(index, 1);
      },
4623f67f   梁保满   隋唐问以及教师学生设置
402
      //添加教师弹窗
bb4c8454   阿宝   添加,修改教师
403
      addTeacherDia() {
bb4c8454   阿宝   添加,修改教师
404
405
406
407
408
        this.isAdd = true;
        this.formTeacher = {
          teacherName: "",
          loginName: "",
          sex: 1,
9309dc5d   梁保满   任课老师接口完成
409
          roleList: [],
bb4c8454   阿宝   添加,修改教师
410
411
412
        };
        this.diaTeacher = true;
      },
4623f67f   梁保满   隋唐问以及教师学生设置
413
      //教师角色数量
23a6dc5f   阿宝   学校管理相关接口简单对接
414
      setClass(obj) {
23a6dc5f   阿宝   学校管理相关接口简单对接
415
416
417
418
419
420
        return (
          obj.managerList?.length +
          obj.teacherCourseList?.length +
          obj.teacherGradeList?.length
        );
      },
dba7b13a   梁保满   添加账号模式,修改教师角色显示问题
421
422
423
424
425
426
427
428
429
      getClassName(id) {
        let name;
        this.classList.map((item) => {
          if (item.value == id) {
            name = item.label;
          }
        });
        return name;
      },
4623f67f   梁保满   隋唐问以及教师学生设置
430
      //教师详细数据
23a6dc5f   阿宝   学校管理相关接口简单对接
431
      showTeacher(obj) {
23a6dc5f   阿宝   学校管理相关接口简单对接
432
433
434
        this.showTId = obj.id;
        this.teacherDetail = { ...obj };
      },
0a4de034   阿宝   教师管理,学生管理班级设置
435
      editTeacher(type) {
a37317f4   阿宝   使用分析,发卡记录
436
        this.diaTeacher = true;
e5ff81a1   阿宝   集团管理员接口
437
        this.setTercherType = type;
bb4c8454   阿宝   添加,修改教师
438
439
440
441
442
443
444
445
446
        this.isAdd = false;
        for (let key in this.teacherDetail) {
          if (key == "realName") {
            this.formTeacher.teacherName = this.teacherDetail.realName;
          } else {
            this.formTeacher[key] = this.teacherDetail[key];
          }
        }
        this.toTeacherForm();
bb4c8454   阿宝   添加,修改教师
447
      },
4623f67f   梁保满   隋唐问以及教师学生设置
448
      //添加教师
bb4c8454   阿宝   添加,修改教师
449
      addTeacher() {
bb4c8454   阿宝   添加,修改教师
450
451
452
453
454
455
456
457
458
459
460
461
462
        this.$refs.formTeacher.validate(async (valid) => {
          if (valid) {
            let obj = this.setTeacharForm();
            if (!obj) {
              this.$message.error("教师角色数据有误请检查!");
              return;
            }
            let res;
            if (this.isAdd) {
              res = await this.$request.addTeacher({
                teacherName: this.formTeacher.teacherName,
                loginName: this.formTeacher.loginName,
                sex: this.formTeacher.sex,
8ad80958   梁保满   教师学生管理,设备状态
463
                type: this.query.classType,
bb4c8454   阿宝   添加,修改教师
464
465
466
                ...obj,
              });
            } else {
bb4c8454   阿宝   添加,修改教师
467
468
469
470
471
              res = await this.$request.updateTeacher({
                teacherId: this.formTeacher.id,
                teacherName: this.formTeacher.teacherName,
                loginName: this.formTeacher.loginName,
                sex: this.formTeacher.sex,
8ad80958   梁保满   教师学生管理,设备状态
472
                type: this.query.classType,
bb4c8454   阿宝   添加,修改教师
473
474
475
476
477
478
                ...obj,
              });
            }
            if (res.status === 0) {
              this.$message.success(res.info);
              this.diaTeacher = false;
8ad80958   梁保满   教师学生管理,设备状态
479
              this._QueryData(6);
bb4c8454   阿宝   添加,修改教师
480
481
482
483
            } else {
              this.$message.error(res.info);
            }
          } else {
e5ff81a1   阿宝   集团管理员接口
484
            this.$message.warning("输入有误请检查!");
bb4c8454   阿宝   添加,修改教师
485
486
487
488
            return false;
          }
        });
      },
4623f67f   梁保满   隋唐问以及教师学生设置
489
      //转换保存教师数据格式
bb4c8454   阿宝   添加,修改教师
490
      setTeacharForm() {
bb4c8454   阿宝   添加,修改教师
491
492
493
494
495
496
497
498
499
500
501
502
        let ERR_OK = true;
        this.formTeacher.roleList.map((item) => {
          if (item.classId.length == 0) {
            ERR_OK = false;
          }
        });
        if (ERR_OK) {
          let [managerList, teacherCourseList, gradeGroupList] = [[], [], []];
          this.formTeacher.roleList.map((item) => {
            if (item.roleId == 6) {
              managerList.push({
                classId: item.classId[1],
e5ff81a1   阿宝   集团管理员接口
503
504
505
                className:
                  this.classList.find((items) => items.value == item.classId[1])
                    ?.label || "",
bb4c8454   阿宝   添加,修改教师
506
507
              });
            } else if (item.roleId == 7) {
55eb13fd   梁保满   中天提出的交互优化
508
509
510
511
512
513
514
515
              item.classId.map((clazz) => {
                teacherCourseList.push({
                  classId: clazz[2],
                  className:
                    this.classList.find((items) => items.value == clazz[2])
                      ?.label || "",
                  subjectName: clazz[1],
                });
bb4c8454   阿宝   添加,修改教师
516
517
518
519
              });
            } else {
              gradeGroupList.push({
                grade: item.classId[0],
e5ff81a1   阿宝   集团管理员接口
520
521
522
                gradeName:
                  this.gradeList.find((items) => items.id == item.classId[0])
                    ?.label || "",
bb4c8454   阿宝   添加,修改教师
523
524
525
526
527
528
529
530
531
532
533
534
535
                subjectName: item.classId[1],
              });
            }
          });
          return {
            managerList,
            teacherCourseList,
            gradeGroupList,
          };
        } else {
          return false;
        }
      },
4623f67f   梁保满   隋唐问以及教师学生设置
536
      //教师角色数据转换为form格式数据
bb4c8454   阿宝   添加,修改教师
537
      toTeacherForm() {
bb4c8454   阿宝   添加,修改教师
538
539
        this.formTeacher.roleList = [];
        this.formTeacher.managerList?.map((item) => {
bb4c8454   阿宝   添加,修改教师
540
541
542
543
544
545
          this.formTeacher.roleList.push({
            id: randomWord(true, 16, 20),
            roleId: 6,
            classId: [
              this.classList.find(
                (items) =>
47a01cb6   梁保满   v1.3测试问题
546
547
                  items.value == item.classId ||
                  items.label.includes(item.className)
8ad80958   梁保满   教师学生管理,设备状态
548
              )?.grade,
bb4c8454   阿宝   添加,修改教师
549
550
551
552
              item.classId,
            ],
          });
        });
55eb13fd   梁保满   中天提出的交互优化
553
        let teacherClassId = [];
bb4c8454   阿宝   添加,修改教师
554
        this.formTeacher.teacherCourseList?.map((item) => {
55eb13fd   梁保满   中天提出的交互优化
555
556
557
558
559
560
561
562
563
564
565
          teacherClassId.push([
            item.grade,
            item.subjectName,
            this.classList.find(
              (items) =>
                items.value == item.classId ||
                items.label.includes(item.className)
            ).value,
          ]);
        });
        if (teacherClassId.length) {
bb4c8454   阿宝   添加,修改教师
566
567
568
          this.formTeacher.roleList.push({
            id: randomWord(true, 16, 20),
            roleId: 7,
55eb13fd   梁保满   中天提出的交互优化
569
            classId: [...teacherClassId],
bb4c8454   阿宝   添加,修改教师
570
          });
55eb13fd   梁保满   中天提出的交互优化
571
        }
bb4c8454   阿宝   添加,修改教师
572
573
574
575
576
577
578
579
580
581
582
        this.formTeacher.gradeGroupList?.map((item) => {
          this.formTeacher.roleList.push({
            id: randomWord(true, 16, 20),
            roleId: 8,
            classId: [
              this.gradeList.find((items) => items.id == item.classId[0]).id,
              item.subjectName,
            ],
          });
        });
      },
4623f67f   梁保满   隋唐问以及教师学生设置
583
      //删除教师角色
b21d90ef   梁保满   长水登录
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
      async delTeacherManager(obj, type) {
        let query;
        switch (type) {
          case 1:
            query = {
              classId: obj.classId,
            };
            break;
          case 2:
            query = {
              classId: obj.classId,
              subjectName: obj.subjectName,
            };
            break;
          case 3:
            query = {
              classId: obj.classId,
              grade: obj.grade,
              subjectName: obj.subjectName,
            };
            break;
        }
        //角色
        const { data, status, info } = await this.$request.delTeacherManager({
          teacherId: obj.teacherId,
4623f67f   梁保满   隋唐问以及教师学生设置
609
          type: this.query.classType,
e371f2dc   梁保满   软件下载,学校,班级老师等报表导入...
610
          ...query,
b21d90ef   梁保满   长水登录
611
612
        });
        if (status === 0) {
4623f67f   梁保满   隋唐问以及教师学生设置
613
          this._QueryData(6);
bb4c8454   阿宝   添加,修改教师
614
615
616
617
        } else {
          this.$message.error(info);
        }
      },
4623f67f   梁保满   隋唐问以及教师学生设置
618
619
620
621
622
623
624
625
626
      //角色列表
      // async _RoleList() {
      //   const { data, status, info } = await this.$request.roleList();
      //   if (status === 0) {
      //     this.roleList = data.list || [];
      //   } else {
      //     this.$message.error(info);
      //   }
      // },
53424e83   梁保满   教师管理筛选条件
627
      setQuery(type) {
23a6dc5f   阿宝   学校管理相关接口简单对接
628
        let query = {};
b8827a72   梁保满   测试bug
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
        if (type == 1) {
          query.grades = [];
          query.classIds = [];
          query.subjectNames = [];
          this.query.gradeClassSub?.map((item) => {
            if (item.length == 1) {
              if (!query.grades.includes(item[0])) {
                query.grades.push(item[0]);
              }
            } else if (item.length == 2) {
              if (!query.classIds.includes(item[1])) {
                query.classIds.push(item[1]);
              }
              query.grades.includes(item[0]) && query.grades.remove(item[0]);
            } else if (item.length == 3) {
              if (!query.subjectNames.includes(item[2])) {
                query.subjectNames.push(item[2]);
              }
              query.grades.includes(item[0]) && query.grades.remove(item[0]);
              query.classIds.includes(item[0]) && query.classIds.remove(item[0]);
            }
          });
  
          delete query.gradeClassSub;
          query.grades.length ? "" : delete query.grades;
          query.classIds.length ? "" : delete query.classIds;
          query.subjectNames.length ? "" : delete query.subjectNames;
          this.query.teacherName = "";
          this.query.phone = "";
3b9f2ddb   梁保满   学生。教师筛选参数
658
          this.query.type = 0;
5cfb0264   梁保满   班级管理交互优化
659
        } else if (type == 2) {
3b9f2ddb   梁保满   学生。教师筛选参数
660
          this.query.type = 9;
23a6dc5f   阿宝   学校管理相关接口简单对接
661
          this.query.phone = "";
53424e83   梁保满   教师管理筛选条件
662
          this.query.gradeClassSub = [];
3b9f2ddb   梁保满   学生。教师筛选参数
663
664
          query.teacherName = this.query.teacherName;
          query.type = this.query.type;
23a6dc5f   阿宝   学校管理相关接口简单对接
665
        } else if (type == 3) {
3b9f2ddb   梁保满   学生。教师筛选参数
666
          this.query.type = 9;
23a6dc5f   阿宝   学校管理相关接口简单对接
667
          this.query.teacherName = "";
53424e83   梁保满   教师管理筛选条件
668
          this.query.gradeClassSub = [];
3b9f2ddb   梁保满   学生。教师筛选参数
669
670
          query.phone = this.query.phone;
          query.type = this.query.type;
b8827a72   梁保满   测试bug
671
672
673
674
675
        } else if (type == 4) {
          this.query.teacherName = "";
          this.query.phone = "";
          this.query.gradeClassSub = [];
          query.type = this.query.type;
ec6394d1   梁保满   v1.3.1。细节调整
676
        } else {
53424e83   梁保满   教师管理筛选条件
677
          query = { ...this.query };
d059a9d1   梁保满   接口调整
678
          query.grades = [];
53424e83   梁保满   教师管理筛选条件
679
680
681
682
          query.classIds = [];
          query.subjectNames = [];
          this.query.gradeClassSub?.map((item) => {
            if (item.length == 1) {
d059a9d1   梁保满   接口调整
683
684
              if (!query.grades.includes(item[0])) {
                query.grades.push(item[0]);
53424e83   梁保满   教师管理筛选条件
685
686
687
688
689
              }
            } else if (item.length == 2) {
              if (!query.classIds.includes(item[1])) {
                query.classIds.push(item[1]);
              }
b8827a72   梁保满   测试bug
690
              query.grades.includes(item[0]) && query.grades.remove(item[0]);
53424e83   梁保满   教师管理筛选条件
691
692
693
694
            } else if (item.length == 3) {
              if (!query.subjectNames.includes(item[2])) {
                query.subjectNames.push(item[2]);
              }
b8827a72   梁保满   测试bug
695
              query.grades.includes(item[0]) && query.grades.remove(item[0]);
53424e83   梁保满   教师管理筛选条件
696
697
698
699
700
              query.classIds.includes(item[0]) && query.classIds.remove(item[0]);
            }
          });
  
          delete query.gradeClassSub;
d059a9d1   梁保满   接口调整
701
          query.grades.length ? "" : delete query.grades;
53424e83   梁保满   教师管理筛选条件
702
703
704
705
          query.classIds.length ? "" : delete query.classIds;
          query.subjectNames.length ? "" : delete query.subjectNames;
          query.teacherName.length ? "" : delete query.teacherName;
          query.phone.length ? "" : delete query.phone;
ec6394d1   梁保满   v1.3.1。细节调整
706
        }
4623f67f   梁保满   隋唐问以及教师学生设置
707
        query.classType = this.query.classType
53424e83   梁保满   教师管理筛选条件
708
709
710
711
        return query;
      },
      async _QueryData(type) {
        if (this.loading) return;
5cfb0264   梁保满   班级管理交互优化
712
713
714
715
716
717
718
719
720
721
722
        if (type == 2) {
          if (this.query.teacherName == "") {
            this.$message.warning("请输入老师姓名");
            return;
          }
        } else if (type == 3) {
          if (this.query.phone == "") {
            this.$message.warning("请输入老师手机");
            return;
          }
        }
23a6dc5f   阿宝   学校管理相关接口简单对接
723
        this.loading = true;
b8827a72   梁保满   测试bug
724
        let query = this.setQuery(type);
0a4de034   阿宝   教师管理,学生管理班级设置
725
        this.teacherList = [];
8ad80958   梁保满   教师学生管理,设备状态
726
        this.clearTeacher = []
23a6dc5f   阿宝   学校管理相关接口简单对接
727
728
729
730
731
732
733
        const { data, status, info } = await this.$request.teacherList({
          ...query,
        });
        this.loading = false;
        console.log(status);
        if (status === 0) {
          this.teacherList = data.list || [];
bb4c8454   阿宝   添加,修改教师
734
735
736
737
738
739
740
741
742
743
          if (type == 10) {
            let detailArr =
              data.list.filter((item) => item.id == this.formTeacher.id) || [];
            this.teacherDetail = (detailArr.length && detailArr[0]) || {
              ...data.list[0],
            };
          } else {
            this.teacherDetail = { ...this.teacherList[0] };
          }
          this.showTId = this.teacherDetail.id;
23a6dc5f   阿宝   学校管理相关接口简单对接
744
745
746
747
        } else {
          this.$message.error(info);
        }
      },
23a6dc5f   阿宝   学校管理相关接口简单对接
748
      async _QueryDataGrade() {
bb4c8454   阿宝   添加,修改教师
749
        //年级数据
8ad80958   梁保满   教师学生管理,设备状态
750
751
752
        const { data, status, info } = await this.$request.gradeList({
          type: this.query.classType,
        });
23a6dc5f   阿宝   学校管理相关接口简单对接
753
        if (status === 0) {
8ad80958   梁保满   教师学生管理,设备状态
754
          this.classList = []
4623f67f   梁保满   隋唐问以及教师学生设置
755
756
757
          this.gradeClassList = []
          this.gradeClassSubList = []
          this.gradeSubListClass = []
23a6dc5f   阿宝   学校管理相关接口简单对接
758
759
          this.gradeList =
            data.list?.map((item) => {
53424e83   梁保满   教师管理筛选条件
760
761
762
763
764
765
              let subList = item.subjectNames?.map((items) => {
                return {
                  value: items,
                  label: items,
                };
              });
8ad80958   梁保满   教师学生管理,设备状态
766
767
768
769
770
771
772
773
774
775
776
777
              this.gradeClassList.push({
                value: item.grade,
                label: item.gradeName,
                id: item.grade,
                children: item.classList.map((clazz) => {
                  return {
                    value: clazz.id,
                    label: clazz.className,
                    id: clazz.id,
                  };
                }),
              });
53424e83   梁保满   教师管理筛选条件
778
              this.gradeClassSubList.push({
d059a9d1   梁保满   接口调整
779
                value: item.grade,
23a6dc5f   阿宝   学校管理相关接口简单对接
780
                label: item.gradeName,
bb4c8454   阿宝   添加,修改教师
781
                id: item.grade,
53424e83   梁保满   教师管理筛选条件
782
                children: item.classList.map((clazz) => {
dba7b13a   梁保满   添加账号模式,修改教师角色显示问题
783
                  return {
53424e83   梁保满   教师管理筛选条件
784
785
786
787
                    value: clazz.id,
                    label: clazz.className,
                    id: clazz.id,
                    children: [...subList],
dba7b13a   梁保满   添加账号模式,修改教师角色显示问题
788
789
                  };
                }),
53424e83   梁保满   教师管理筛选条件
790
              });
55eb13fd   梁保满   中天提出的交互优化
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
              this.gradeSubListClass.push({
                value: item.grade,
                label: item.gradeName,
                id: item.grade,
                children: item.subjectNames.map((items) => {
                  return {
                    value: items,
                    label: items,
                    children: item.classList.map((clazz) => {
                      return {
                        value: clazz.id,
                        label: clazz.className,
                      };
                    }),
                  };
                }),
              });
8ad80958   梁保满   教师学生管理,设备状态
808
809
810
811
812
813
814
815
816
              let classList = item.classList.map((clazz) => {
                return {
                  value: clazz.id,
                  label: `${clazz.className}(${item.gradeName})`,
                  grade: item.grade,
                  gradeName: item.gradeName,
                };
              })
              this.classList = this.classList.concat(classList)
53424e83   梁保满   教师管理筛选条件
817
              return {
d059a9d1   梁保满   接口调整
818
                value: item.grade,
53424e83   梁保满   教师管理筛选条件
819
820
821
                label: item.gradeName,
                id: item.grade,
                children: [...subList],
23a6dc5f   阿宝   学校管理相关接口简单对接
822
823
              };
            }) || [];
23a6dc5f   阿宝   学校管理相关接口简单对接
824
825
826
827
        } else {
          this.$message.error(info);
        }
      },
23a6dc5f   阿宝   学校管理相关接口简单对接
828
      async downExcel() {
a3fcda80   梁保满   教师模版下载调整
829
        let data = await this.$request.teacherTemplate();
f20c48c9   梁保满   集团管理员添加发卡记录,并添加报表导出
830
831
832
833
834
        if (data && !data.code) {
          let blob = new Blob([data], {
            type: "application/vnd.ms-excel;charset=utf-8",
          });
          downloadFile(`教师名单模版.xlsx`, blob);
e371f2dc   梁保满   软件下载,学校,班级老师等报表导入...
835
        } else {
f20c48c9   梁保满   集团管理员添加发卡记录,并添加报表导出
836
          this.$message.error(data.info);
e371f2dc   梁保满   软件下载,学校,班级老师等报表导入...
837
838
839
840
841
842
843
        }
      },
      async exportTeacherExl() {
        this.loadingDown = true;
        let data = await this.$request.exportTeacher();
        this.loadingDown = false;
        if (data) {
23a6dc5f   阿宝   学校管理相关接口简单对接
844
845
846
          let blob = new Blob([data], {
            type: "application/vnd.ms-excel;charset=utf-8",
          });
236b1f0e   梁保满   周末-飞书bug
847
          downloadFile(`教师名单.xlsx`, blob);
23a6dc5f   阿宝   学校管理相关接口简单对接
848
        } else {
e371f2dc   梁保满   软件下载,学校,班级老师等报表导入...
849
          this.$message.error("下载失败");
23a6dc5f   阿宝   学校管理相关接口简单对接
850
851
852
853
854
        }
      },
    },
  };
  </script>
4c4f7640   梁保满   路由表,路由前端文件
855
  
23a6dc5f   阿宝   学校管理相关接口简单对接
856
857
858
  <style lang="scss" scoped>
  .page-content {
    padding: 0 20px 20px;
4c4f7640   梁保满   路由表,路由前端文件
859
  }
29319cfb   梁保满   设备。教师管理
860
  
99713685   梁保满   学生调班,班级数据重新请求,使用过...
861
862
863
864
865
  .total {
    padding: 0 20px 10px;
    font-size: 14px;
    color: #666;
  }
29319cfb   梁保满   设备。教师管理
866
  
23a6dc5f   阿宝   学校管理相关接口简单对接
867
868
869
870
871
872
  .teacher-box {
    display: flex;
    background: #f8f8f8;
    border-radius: 10px;
    overflow: hidden;
    min-height: 400px;
29319cfb   梁保满   设备。教师管理
873
  
23a6dc5f   阿宝   学校管理相关接口简单对接
874
    .teacher-ul {
b21d90ef   梁保满   长水登录
875
      max-height: 60vh;
29319cfb   梁保满   设备。教师管理
876
877
      overflow-y: auto;
  
f20c48c9   梁保满   集团管理员添加发卡记录,并添加报表导出
878
879
880
      &::-webkit-scrollbar {
        width: 6px;
      }
29319cfb   梁保满   设备。教师管理
881
  
f20c48c9   梁保满   集团管理员添加发卡记录,并添加报表导出
882
883
884
885
      &::-webkit-scrollbar-thumb {
        border-radius: 10px;
        background-color: #ccc;
      }
23a6dc5f   阿宝   学校管理相关接口简单对接
886
    }
29319cfb   梁保满   设备。教师管理
887
  
23a6dc5f   阿宝   学校管理相关接口简单对接
888
889
    .teacher-list {
      width: 240px;
4c4f7640   梁保满   路由表,路由前端文件
890
  
23a6dc5f   阿宝   学校管理相关接口简单对接
891
892
893
894
      .h-title {
        height: 40px;
        line-height: 40px;
        background: #eee;
29319cfb   梁保满   设备。教师管理
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
        display: flex;
        justify-content: space-between;
        align-items: center;
  
        .txt {
          flex: 1;
        }
  
        .clear {
          width: 18px;
          margin-right: 10px;
          cursor: pointer;
          transition: all .3s;
  
          &:hover {
            transform: scale(1.1);
          }
        }
23a6dc5f   阿宝   学校管理相关接口简单对接
913
      }
29319cfb   梁保满   设备。教师管理
914
  
23a6dc5f   阿宝   学校管理相关接口简单对接
915
916
917
918
919
920
      .teacher-item {
        font-size: 16px;
        color: #7f7f7f;
        line-height: 36px;
        cursor: pointer;
        padding-left: 12px;
29319cfb   梁保满   设备。教师管理
921
922
        display: flex;
  
23a6dc5f   阿宝   学校管理相关接口简单对接
923
924
925
        &:hover {
          background: #eee;
        }
29319cfb   梁保满   设备。教师管理
926
  
23a6dc5f   阿宝   学校管理相关接口简单对接
927
928
        &.active {
          color: #667ffd;
ca39cc52   阿宝   飞书问题处理
929
          background: #eee;
23a6dc5f   阿宝   学校管理相关接口简单对接
930
931
932
        }
      }
    }
4c4f7640   梁保满   路由表,路由前端文件
933
  
23a6dc5f   阿宝   学校管理相关接口简单对接
934
935
936
    .teacher-detail {
      flex: 1;
      position: relative;
f20c48c9   梁保满   集团管理员添加发卡记录,并添加报表导出
937
      padding-left: 10px;
29319cfb   梁保满   设备。教师管理
938
  
23a6dc5f   阿宝   学校管理相关接口简单对接
939
940
941
942
      .icon-box {
        position: absolute;
        top: 12px;
        right: 20px;
29319cfb   梁保满   设备。教师管理
943
  
23a6dc5f   阿宝   学校管理相关接口简单对接
944
945
946
947
948
        .icon {
          font-size: 24px;
          color: #7f7f7f;
          cursor: pointer;
        }
29319cfb   梁保满   设备。教师管理
949
  
23a6dc5f   阿宝   学校管理相关接口简单对接
950
951
952
953
        .el-icon-circle-plus-outline {
          margin-left: 10px;
        }
      }
29319cfb   梁保满   设备。教师管理
954
  
23a6dc5f   阿宝   学校管理相关接口简单对接
955
956
957
958
959
960
961
      .detail-top {
        padding: 12px 20px;
        box-sizing: border-box;
        display: flex;
        flex-wrap: wrap;
        font-size: 14px;
        color: #7f7f7f;
29319cfb   梁保满   设备。教师管理
962
  
23a6dc5f   阿宝   学校管理相关接口简单对接
963
964
965
966
967
        .p-item {
          width: 40%;
          line-height: 28px;
        }
      }
29319cfb   梁保满   设备。教师管理
968
  
23a6dc5f   阿宝   学校管理相关接口简单对接
969
970
971
972
973
      .grade-box {
        .grade-info {
          display: flex;
          flex-wrap: wrap;
          padding: 20px 20px 0;
29319cfb   梁保满   设备。教师管理
974
975
  
          &>li {
23a6dc5f   阿宝   学校管理相关接口简单对接
976
977
978
            margin-right: 20px;
            margin-bottom: 20px;
            position: relative;
29319cfb   梁保满   设备。教师管理
979
  
23a6dc5f   阿宝   学校管理相关接口简单对接
980
981
982
983
984
985
986
            .el-icon-delete {
              position: absolute;
              top: 8px;
              right: 8px;
              padding: 2px;
              cursor: pointer;
              display: none;
29319cfb   梁保满   设备。教师管理
987
  
23a6dc5f   阿宝   学校管理相关接口简单对接
988
989
990
991
              &:hover {
                color: #667ffd;
              }
            }
29319cfb   梁保满   设备。教师管理
992
  
23a6dc5f   阿宝   学校管理相关接口简单对接
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
            &:hover {
              .el-icon-delete {
                display: block;
              }
            }
          }
  
          .grade-item {
            width: 200px;
            box-sizing: border-box;
            padding: 12px 16px;
            border-radius: 10px;
            box-shadow: 1px 1px 3px #888;
          }
29319cfb   梁保满   设备。教师管理
1007
  
23a6dc5f   阿宝   学校管理相关接口简单对接
1008
1009
1010
1011
1012
1013
          .grade-name {
            font-size: 16px;
            font-weight: bold;
            line-height: 18px;
            padding-bottom: 12px;
          }
29319cfb   梁保满   设备。教师管理
1014
  
23a6dc5f   阿宝   学校管理相关接口简单对接
1015
1016
1017
1018
1019
          .grade-class {
            display: flex;
            justify-content: space-between;
            font-size: 15px;
            padding-right: 20px;
29319cfb   梁保满   设备。教师管理
1020
  
23a6dc5f   阿宝   学校管理相关接口简单对接
1021
1022
1023
1024
1025
            .fa {
              font-size: 18px;
              margin-right: 5px;
              color: #a4a4a4;
            }
29319cfb   梁保满   设备。教师管理
1026
  
23a6dc5f   阿宝   学校管理相关接口简单对接
1027
1028
1029
1030
1031
1032
1033
1034
            .fa-book {
              font-size: 20px;
            }
          }
        }
      }
    }
  }
29319cfb   梁保满   设备。教师管理
1035
  
bb4c8454   阿宝   添加,修改教师
1036
1037
1038
  .add-box {
    margin-top: 10px;
  }
29319cfb   梁保满   设备。教师管理
1039
  
bb4c8454   阿宝   添加,修改教师
1040
1041
1042
1043
  .sel-c {
    width: 120px;
    margin-right: 12px;
  }
29319cfb   梁保满   设备。教师管理
1044
  
bb4c8454   阿宝   添加,修改教师
1045
1046
  .role-list {
    margin-bottom: 10px;
dba7b13a   梁保满   添加账号模式,修改教师角色显示问题
1047
    position: relative;
29319cfb   梁保满   设备。教师管理
1048
  
dba7b13a   梁保满   添加账号模式,修改教师角色显示问题
1049
1050
1051
1052
1053
1054
1055
    .sel-p {
      position: absolute;
      left: 146px;
      top: 0;
      font-size: 13px;
      color: #606266;
    }
29319cfb   梁保满   设备。教师管理
1056
  
dba7b13a   梁保满   添加账号模式,修改教师角色显示问题
1057
1058
1059
1060
1061
    .sel-t {
      :deep(.el-input__inner) {
        background: transparent;
      }
    }
29319cfb   梁保满   设备。教师管理
1062
  
bb4c8454   阿宝   添加,修改教师
1063
1064
1065
1066
1067
1068
1069
1070
    .el-icon-close {
      padding: 5px;
      cursor: pointer;
      margin-left: 16px;
      background: #ccc;
      border-radius: 50%;
    }
  }
4c4f7640   梁保满   路由表,路由前端文件
1071
  </style>