龚焕茏
2024-07-16 eeebb8d40266d614c14133b96bf40c57e30424ea
feat:默认选中当前部门
3个文件已修改
12 ■■■■■ 已修改文件
src/api/department.js 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/exam/paper/edit.vue 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/exam/personalRandomTemplate/edit.vue 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/department.js
@@ -15,6 +15,8 @@
  getDeptUserList: id => get('/api/admin/department/' + id + '/user-list'),
  // 获取当前用户管理的部门
  getDeptAdmins: id => get('/api/admin/department/getDeptAdmins'),
  // 获取当前用户管理的部门(不分层级关系)
  getCurrentDeptId: id => get('/api/admin/department/getCurrentDeptId'),
  // 修改部门管理员
  updateDeptAdmin: data => post('/api/admin/department/update-admin', data),
  cascaderList: () => get('/api/admin/department/cascader')
src/views/exam/paper/edit.vue
@@ -282,6 +282,11 @@
    };
  },
  created() {
    departmentApi.getCurrentDeptId().then(res => {
      if (res.response && res.response[0]) {
        this.form.deptId = res.response[0];
      }
    });
    let id = this.$route.query.id;
    let _this = this;
    this.initSubject(function () {
src/views/exam/personalRandomTemplate/edit.vue
@@ -309,6 +309,11 @@
    });
  },
  async mounted() {
    departmentApi.getCurrentDeptId().then(res => {
      if (res.response && res.response[0]) {
        this.form.deptId = res.response[0];
      }
    });
    let id = this.$route.query.id;
    let _this = this;