|
|
|
@ -4,20 +4,20 @@ |
|
|
|
|
<el-col :span="4"> |
|
|
|
|
<div class="page"> |
|
|
|
|
<div class="m-b-20"> |
|
|
|
|
<h6 class="p-title">学生</h6> |
|
|
|
|
<el-radio-group v-model="studentType" @change="changeStudentType"> |
|
|
|
|
<h6 class="p-title">后台员工账号</h6> |
|
|
|
|
<el-radio-group v-model="studentType" @change="initData"> |
|
|
|
|
<div class="m-b-20"> |
|
|
|
|
<el-radio :label="1">所有学生</el-radio> |
|
|
|
|
<el-radio :label="1">所有员工</el-radio> |
|
|
|
|
</div> |
|
|
|
|
<div> |
|
|
|
|
<el-radio :label="2">未加入班级的学生</el-radio> |
|
|
|
|
<el-radio :label="2">未加入部门的员工</el-radio> |
|
|
|
|
</div> |
|
|
|
|
</el-radio-group> |
|
|
|
|
</div> |
|
|
|
|
<el-divider></el-divider> |
|
|
|
|
<div> |
|
|
|
|
<div class="flex-between"> |
|
|
|
|
<h6 class="p-title" style="margin-bottom: 0">学生组织架构</h6> |
|
|
|
|
<h6 class="p-title" style="margin-bottom: 0">组织架构</h6> |
|
|
|
|
<el-button type="text" @click="addOrg">添加</el-button> |
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
@ -89,42 +89,31 @@ |
|
|
|
|
<div class="tool"> |
|
|
|
|
<ul class="filter"> |
|
|
|
|
<li> |
|
|
|
|
<el-input style="width: 250px;" placeholder="请输入学生姓名/学号/账号" prefix-icon="el-icon-search" v-model="keyWord" clearable></el-input> |
|
|
|
|
<el-input style="width: 250px;" placeholder="请输入员工姓名/手机号" prefix-icon="el-icon-search" v-model="keyWord" clearable></el-input> |
|
|
|
|
</li> |
|
|
|
|
</ul> |
|
|
|
|
<div> |
|
|
|
|
<el-button type="primary" @click="addStudent">新增学生</el-button> |
|
|
|
|
<el-button type="primary" @click="addStaff">新增员工</el-button> |
|
|
|
|
<el-button type="primary" @click="batchImport">批量导入</el-button> |
|
|
|
|
<el-button type="primary" @click="delAllSelection">批量删除</el-button> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
<el-table :data="listData" class="table" ref="table" stripe header-align="center" @selection-change="handleSelectionChange" :row-key="getRowKeys"> |
|
|
|
|
<el-table :data="listData" class="table" ref="table" stripe header-align="center" @selection-change="handleSelectionChange" row-key="accountId"> |
|
|
|
|
<el-table-column type="selection" width="55" align="center" :reserve-selection="true"></el-table-column> |
|
|
|
|
<el-table-column type="index" width="60" label="序号" align="center"></el-table-column> |
|
|
|
|
<el-table-column prop="userName" label="学生姓名" align="center" min-width="100"></el-table-column> |
|
|
|
|
<el-table-column prop="workNumber" label="学生学号" align="center" min-width="100"></el-table-column> |
|
|
|
|
<el-table-column prop="className" label="班级" align="center" min-width="200" show-overflow-tooltip></el-table-column> |
|
|
|
|
<el-table-column prop="userName" label="员工姓名" align="center" min-width="100"></el-table-column> |
|
|
|
|
<el-table-column prop="account" label="账号" align="center" min-width="100"></el-table-column> |
|
|
|
|
<el-table-column prop="countries" label="账号角色" align="center" width="100"> |
|
|
|
|
<template slot-scope="scope">学生</template> |
|
|
|
|
<el-table-column prop="className" label="手机号" align="center" width="120"></el-table-column> |
|
|
|
|
<el-table-column prop="loginNumber" label="所在部门" align="center" min-width="100"></el-table-column> |
|
|
|
|
<el-table-column prop="countries" label="授权角色" align="center" width="100"> |
|
|
|
|
<template slot-scope="scope">员工</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column prop="loginNumber" label="登录次数" align="center" width="100"></el-table-column> |
|
|
|
|
<el-table-column prop="lastLoginTime" label="上次登录时间" align="center" width="120"></el-table-column> |
|
|
|
|
<el-table-column label="操作" align="center" width="300"> |
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
<el-button v-if="isRemove" type="text" @click="removeStudent(scope.row)">移除</el-button> |
|
|
|
|
<el-button type="text" @click="editStudent(scope.row,true)">查看</el-button> |
|
|
|
|
<el-button type="text" @click="editStudent(scope.row,false)">编辑</el-button> |
|
|
|
|
<el-button type="text" @click="editStaff(scope.row,true)">查看</el-button> |
|
|
|
|
<el-button type="text" @click="editStaff(scope.row,false)">编辑</el-button> |
|
|
|
|
<el-button type="text" @click="resetPassword(scope.row)">重置密码</el-button> |
|
|
|
|
<el-button type="text" @click="handleDelete(scope.row)">删除</el-button> |
|
|
|
|
<el-switch |
|
|
|
|
v-model="scope.row.isEnable" |
|
|
|
|
:active-value="1" |
|
|
|
|
:inactive-value="0" |
|
|
|
|
style="margin: 0 5px" |
|
|
|
|
@change="switchOff(scope.row)" |
|
|
|
|
></el-switch> |
|
|
|
|
<el-button type="text" @click="delStaff(scope.row)">删除</el-button> |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
</el-table> |
|
|
|
@ -132,84 +121,48 @@ |
|
|
|
|
<el-pagination background @current-change="currentChange" :current-page="page" layout="total, prev, pager, next" :total="total"></el-pagination> |
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
<el-dialog |
|
|
|
|
class="dialog" |
|
|
|
|
width="60%" |
|
|
|
|
:title="isDetail ? '查看学生' : (isAdd ? '新增学生' : '编辑学生')" |
|
|
|
|
:visible.sync="studentVisible" |
|
|
|
|
:close-on-click-modal="false" |
|
|
|
|
@close="closeStudent" |
|
|
|
|
> |
|
|
|
|
<el-form ref="form" :model="form" :rules="rules" :disabled="isDetail" label-width="100px"> |
|
|
|
|
<el-row :gutter="20"> |
|
|
|
|
<el-col :span="12"> |
|
|
|
|
<el-form-item prop="workNumber" label="学生学号"> |
|
|
|
|
<el-input v-model="form.workNumber" placeholder="学生学号"></el-input> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item prop="userName" label="学生姓名"> |
|
|
|
|
<el-input v-model="form.userName" placeholder="请输入学生姓名"></el-input> |
|
|
|
|
<el-dialog :title="isDetail ? '查看' : (form.accountId ? '编辑' : '新增') + '员工'" :visible.sync="staffVisible" width="580px" class="dialog" :close-on-click-modal="false"> |
|
|
|
|
<el-form ref="form" :model="form" :rules="rules" label-width="150px" :disabled="isDetail" style='margin-right: 80px;'> |
|
|
|
|
<el-form-item prop="workNumber" label="工号"> |
|
|
|
|
<el-input v-model.trim="form.workNumber" placeholder="请输入工号"></el-input> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item prop="roleId" label="账号角色"> |
|
|
|
|
学生 |
|
|
|
|
<el-form-item prop="userName" label="姓名"> |
|
|
|
|
<el-input v-model.trim="form.userName" placeholder="请输入姓名"></el-input> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item prop="account" label="学生账号"> |
|
|
|
|
<el-input v-model="form.account" placeholder="请输入学生账号"></el-input> |
|
|
|
|
<el-form-item prop="account" label="账号"> |
|
|
|
|
<el-input v-model.trim="form.account" placeholder="请输入账号"></el-input> |
|
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
|
|
<el-form-item prop="phone" label="手机号"> |
|
|
|
|
<el-input v-model="form.phone" placeholder="可用于登录平台,以及找回密码" maxlength="11" @blur="phoneChange"></el-input> |
|
|
|
|
<el-input v-model.trim="form.phone" placeholder="请输入手机号" maxlength="11" @blur="phoneChange"></el-input> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item prop="email" label="邮箱"> |
|
|
|
|
<el-input v-model="form.email" placeholder="可用于登录平台,以及找回密码" @blur="emailChange"></el-input> |
|
|
|
|
<el-input v-model.trim="form.email" placeholder="请输入邮箱" @blur="emailChange"></el-input> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item prop="uniqueIdentification" label="唯一标识"> |
|
|
|
|
<el-input disabled v-model="form.uniqueIdentification"></el-input> |
|
|
|
|
<el-form-item prop="roleValue" label="授权角色"> |
|
|
|
|
<el-select v-model="form.roleValue" @change="roleChange" @remove-tag="roleRemove" multiple style="width: 100%;"> |
|
|
|
|
<template v-for="item in roleList"> |
|
|
|
|
<!-- 不显示超管 --> |
|
|
|
|
<el-option |
|
|
|
|
v-if="item.roleName !== '超级管理员'" |
|
|
|
|
:key="item.id" |
|
|
|
|
:label="item.roleName" |
|
|
|
|
:value="item.id"> |
|
|
|
|
</el-option> |
|
|
|
|
</template> |
|
|
|
|
</el-select> |
|
|
|
|
</el-form-item> |
|
|
|
|
</el-col> |
|
|
|
|
<el-col :span="10"> |
|
|
|
|
<el-form-item prop="classId" label="所在班级"> |
|
|
|
|
<el-input |
|
|
|
|
placeholder="输入关键字进行过滤" |
|
|
|
|
v-model="filterText" |
|
|
|
|
style="margin-bottom: 10px" |
|
|
|
|
> |
|
|
|
|
</el-input> |
|
|
|
|
<div style="height: 300px; max-height: 300px; border: 1px solid #DCDFE6; border-radius: 4px; padding: 10px 10px 10px 0px; overflow: auto"> |
|
|
|
|
<org-tree |
|
|
|
|
v-if="showTree && treeVisible" |
|
|
|
|
ref="classTree" |
|
|
|
|
show-checkbox |
|
|
|
|
node-key="id" |
|
|
|
|
highlight-current |
|
|
|
|
default-expand-all |
|
|
|
|
lazy |
|
|
|
|
:load="loadClassTree" |
|
|
|
|
:default-checked-keys="defaultCheckedKeys" |
|
|
|
|
:filter-node-method="filterNode" |
|
|
|
|
:props="{children: 'children', label: 'organizationName', isLeaf: 'leaf'}" |
|
|
|
|
> |
|
|
|
|
<span class="custom-tree-node" slot-scope="{ node, data }"> |
|
|
|
|
<span style="display: inline-block; margin-right: 20px">{{ node.label }}</span> |
|
|
|
|
<span> |
|
|
|
|
<el-button |
|
|
|
|
v-if="node.level < 3" |
|
|
|
|
type="text" |
|
|
|
|
icon="el-icon-circle-plus-outline" |
|
|
|
|
@click="() => addOrg(node, data)"> |
|
|
|
|
</el-button> |
|
|
|
|
</span> |
|
|
|
|
</span> |
|
|
|
|
</org-tree> |
|
|
|
|
</div> |
|
|
|
|
<p style="color: #C0C4CC;">提示:需创建班级后才可以勾选</p> |
|
|
|
|
<el-form-item v-for="(item, i) in form.roleAndDeptList" :key="i" :label="`${item.roleName}所在部门`"> |
|
|
|
|
<el-cascader |
|
|
|
|
v-model="item.cascaderValue" |
|
|
|
|
:options="orgList" |
|
|
|
|
:props="casProps" |
|
|
|
|
style="width: 100%" |
|
|
|
|
></el-cascader> |
|
|
|
|
</el-form-item> |
|
|
|
|
</el-col> |
|
|
|
|
</el-row> |
|
|
|
|
</el-form> |
|
|
|
|
<span slot="footer" class="dialog-footer" v-if="!isDetail"> |
|
|
|
|
<el-button type="primary" :disabled="disableds" @click="saveData(0)">保存</el-button> |
|
|
|
|
<el-button v-if="isAdd" type="primary" :disabled="disableds" @click="saveData(1)">保存并继续添加</el-button> |
|
|
|
|
<el-button size="small" @click="closeStudent">取消</el-button> |
|
|
|
|
<el-button @click="closeStudent">取消</el-button> |
|
|
|
|
<el-button type="primary" @click="submitStaff">确定</el-button> |
|
|
|
|
</span> |
|
|
|
|
</el-dialog> |
|
|
|
|
|
|
|
|
@ -268,14 +221,14 @@ export default { |
|
|
|
|
}; |
|
|
|
|
var workNumberPass = (rule, value, callback) => { |
|
|
|
|
if (value === '') { |
|
|
|
|
callback(new Error('请输入学生学号')); |
|
|
|
|
callback(new Error('请输入员工学号')); |
|
|
|
|
} else { |
|
|
|
|
var pattern = /^[A-Za-z0-9]*$/; |
|
|
|
|
if(pattern.test(value)){ |
|
|
|
|
this.worknumberChange(); |
|
|
|
|
callback(); |
|
|
|
|
}else{ |
|
|
|
|
callback(new Error('请输入正确学生学号格式')); |
|
|
|
|
callback(new Error('请输入正确员工学号格式')); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}; |
|
|
|
@ -283,13 +236,8 @@ export default { |
|
|
|
|
return { |
|
|
|
|
orgList: [], |
|
|
|
|
orgListDia: [], |
|
|
|
|
isRemove: false, // 是否可以移除 |
|
|
|
|
currentClassId: '', // 当前班级id |
|
|
|
|
studentType: 1, //类型:必填一个(1.所有学生 2.未加入班级学生) |
|
|
|
|
architectureId: '', // 架构id |
|
|
|
|
orgLevel: '', // 架构层级 层级(1.专业 2.年级 3.班级) |
|
|
|
|
orgVisible: false, // 学生组织架对话框 |
|
|
|
|
labelName: "部门名称", // |
|
|
|
|
studentType: 1, //类型:必填一个(1.所有员工 2.未加入班级员工) |
|
|
|
|
orgVisible: false, // 员工组织架对话框 |
|
|
|
|
orgForm: { |
|
|
|
|
id: '', |
|
|
|
|
organizationName: '' |
|
|
|
@ -299,20 +247,22 @@ export default { |
|
|
|
|
checkStrictly: true, |
|
|
|
|
label: "organizationName", |
|
|
|
|
value: "id" |
|
|
|
|
}, // 部门级联数据 |
|
|
|
|
}, |
|
|
|
|
treeVisible: true, |
|
|
|
|
treeNode: {}, |
|
|
|
|
treeResolve: [], |
|
|
|
|
isDetail: false, |
|
|
|
|
keyWord: '', |
|
|
|
|
roleList: [], |
|
|
|
|
form: { |
|
|
|
|
accountId: '', |
|
|
|
|
userName: '', |
|
|
|
|
phone: '', |
|
|
|
|
roleList: [], |
|
|
|
|
uniqueIdentification: '', |
|
|
|
|
workNumber: '', |
|
|
|
|
email: '', |
|
|
|
|
account: '', |
|
|
|
|
classId: "" |
|
|
|
|
account: '' |
|
|
|
|
}, |
|
|
|
|
rules: { |
|
|
|
|
organizationName: [ |
|
|
|
@ -320,27 +270,14 @@ export default { |
|
|
|
|
], |
|
|
|
|
account: [ |
|
|
|
|
{ required: true,validator: accountPass, trigger: 'blur' } |
|
|
|
|
// { required: true, message: "请输入账号", trigger: "blur" }, |
|
|
|
|
// { |
|
|
|
|
// pattern: /^[A-Za-z0-9]*$/, |
|
|
|
|
// message: "请输入正确的账号", |
|
|
|
|
// trigger: "blur" |
|
|
|
|
// } |
|
|
|
|
], |
|
|
|
|
userName: [ |
|
|
|
|
{ required: true, message: "请输入学生姓名", trigger: "blur" } |
|
|
|
|
{ required: true, message: "请输入姓名", trigger: "blur" } |
|
|
|
|
], |
|
|
|
|
workNumber: [ |
|
|
|
|
{ required: true,validator: workNumberPass, trigger: 'blur' } |
|
|
|
|
// { required: true, message: "请输入学生学号", trigger: "blur" }, |
|
|
|
|
// { |
|
|
|
|
// pattern: /^[A-Za-z0-9]*$/, |
|
|
|
|
// message: "请输入正确的学号", |
|
|
|
|
// trigger: "blur" |
|
|
|
|
// } |
|
|
|
|
], |
|
|
|
|
phone: [ |
|
|
|
|
// { required: true, message: '请输入职工手机号', trigger: 'blur' }, |
|
|
|
|
{ |
|
|
|
|
pattern: /^1[3456789]\d{9}$/, |
|
|
|
|
message: "请输入正确的手机号", |
|
|
|
@ -348,7 +285,6 @@ export default { |
|
|
|
|
} |
|
|
|
|
], |
|
|
|
|
email: [ |
|
|
|
|
// { required: true, message: '请输入邮箱', trigger: 'blur' }, |
|
|
|
|
{ |
|
|
|
|
pattern: /^([a-zA-Z]|[0-9])(\w|\-)+@[a-zA-Z0-9]+\.([a-zA-Z]{2,4})$/, |
|
|
|
|
message: "请输入正确的邮箱", |
|
|
|
@ -362,15 +298,20 @@ export default { |
|
|
|
|
total: 0, |
|
|
|
|
multipleSelection: [], |
|
|
|
|
|
|
|
|
|
isAdd: true, |
|
|
|
|
studentVisible: false, |
|
|
|
|
staffVisible: false, |
|
|
|
|
accountReapeat: false, |
|
|
|
|
originAccount: '', |
|
|
|
|
workNumberReapeat: false, |
|
|
|
|
originWorkNumber: '', |
|
|
|
|
phoneRepeat: false, |
|
|
|
|
emailRepeat: false, |
|
|
|
|
showTree: true, // 是否显示所在班级树 |
|
|
|
|
defaultCheckedKeys: [], |
|
|
|
|
filterText: '', // 通过关键字过滤树节点 |
|
|
|
|
casProps: { |
|
|
|
|
multiple: true, |
|
|
|
|
checkStrictly: true, |
|
|
|
|
label: 'organizationName', |
|
|
|
|
value: 'id' |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
importVisible: false, |
|
|
|
|
uploadList: [], |
|
|
|
@ -386,21 +327,12 @@ export default { |
|
|
|
|
watch: { |
|
|
|
|
keyWord: function(val) { |
|
|
|
|
clearTimeout(this.searchTimer); |
|
|
|
|
this.searchTimer = setTimeout(() => { |
|
|
|
|
if (this.studentType) { |
|
|
|
|
this.initData(); |
|
|
|
|
} else { |
|
|
|
|
this.getOrgStudentData(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
}, 500); |
|
|
|
|
}, |
|
|
|
|
filterText(val) { |
|
|
|
|
this.$refs.classTree.filter(val); |
|
|
|
|
this.searchTimer = setTimeout(this.getStaff, 500); |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
mounted() { |
|
|
|
|
this.getOrg() |
|
|
|
|
this.getRole() |
|
|
|
|
}, |
|
|
|
|
methods: { |
|
|
|
|
// 获取组织 |
|
|
|
@ -409,6 +341,7 @@ export default { |
|
|
|
|
const list = res.treeList |
|
|
|
|
this.orgList = list |
|
|
|
|
this.handleOrgId(list) |
|
|
|
|
this.getStaff() |
|
|
|
|
}, |
|
|
|
|
// 每个层级加上父级id的集合 |
|
|
|
|
handleOrgId(list, ids) { |
|
|
|
@ -482,7 +415,6 @@ export default { |
|
|
|
|
this.orgForm.parentId = cas[len - 1] |
|
|
|
|
this.orgForm.level = len + 1 |
|
|
|
|
} |
|
|
|
|
debugger |
|
|
|
|
if (!form.id) { |
|
|
|
|
// 添加 |
|
|
|
|
this.$post(this.api.saveArch, form).then(res => { |
|
|
|
@ -490,7 +422,6 @@ export default { |
|
|
|
|
this.closeOrg() |
|
|
|
|
}).catch(err => {}) |
|
|
|
|
} else { |
|
|
|
|
if (cas.length === 1 && this.labelName === '班级名称') return util.errorMsg('请选择年级!') |
|
|
|
|
// 编辑 |
|
|
|
|
this.$post(this.api.updateArch, form).then(res => { |
|
|
|
|
util.successMsg("编辑成功!") |
|
|
|
@ -502,18 +433,9 @@ export default { |
|
|
|
|
}, |
|
|
|
|
// 点击树节点查询列表数据 |
|
|
|
|
handleNodeClick(data) { |
|
|
|
|
if (data.level === 3) { |
|
|
|
|
this.isRemove = true; |
|
|
|
|
this.currentClassId = data.id; |
|
|
|
|
} else { |
|
|
|
|
this.isRemove = false; |
|
|
|
|
this.currentClassId = ""; |
|
|
|
|
} |
|
|
|
|
this.$refs.table.clearSelection(); |
|
|
|
|
this.studentType = null; |
|
|
|
|
this.architectureId = data.id; |
|
|
|
|
this.orgLevel = data.level; |
|
|
|
|
util.debounce(this.getOrgStudentData(), 1000); |
|
|
|
|
this.$refs.table.clearSelection() |
|
|
|
|
this.studentType = null |
|
|
|
|
this.getStaff() |
|
|
|
|
}, |
|
|
|
|
// 关闭组织新增编辑弹框 |
|
|
|
|
closeOrg() { |
|
|
|
@ -521,136 +443,44 @@ export default { |
|
|
|
|
this.cascaderValue = [] |
|
|
|
|
this.getOrg() |
|
|
|
|
}, |
|
|
|
|
getOrgTreeData(resolve, level, parentId, ids) { // 获取组织架构树数据 |
|
|
|
|
this.$post(`${this.api.treeListArch}?level=${level}&parentId=${parentId}`).then(res => { |
|
|
|
|
let { status, treeList } = res; |
|
|
|
|
if (status === 200 && treeList.length) { |
|
|
|
|
let result = []; |
|
|
|
|
treeList.forEach(i => { |
|
|
|
|
if (i.level === 3) { |
|
|
|
|
i.leaf = true; |
|
|
|
|
} else { |
|
|
|
|
i.leaf = false; |
|
|
|
|
} |
|
|
|
|
i.ids = ids ? `${ids},${i.id}` : `${i.id}`; // 给树结构添加唯一标识 |
|
|
|
|
result.push(i); |
|
|
|
|
}); |
|
|
|
|
return resolve(result); |
|
|
|
|
} else { |
|
|
|
|
return resolve([]); |
|
|
|
|
} |
|
|
|
|
}).catch(err => { |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
getOrgStudentData() { // 根据组织架构筛选学生列表 |
|
|
|
|
let params = { |
|
|
|
|
architectureId: this.architectureId, |
|
|
|
|
level: this.orgLevel, |
|
|
|
|
keyWord: this.keyWord, |
|
|
|
|
pageNum: 1, |
|
|
|
|
pageSize: this.pageSize |
|
|
|
|
}; |
|
|
|
|
this.$post(this.api.treeListArch, params).then(res => { |
|
|
|
|
this.listData = res.page; |
|
|
|
|
this.total = res.total; |
|
|
|
|
}).catch(err => { |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
getData() { // 学生列表 |
|
|
|
|
// 员工列表 |
|
|
|
|
getStaff() { |
|
|
|
|
let data = { |
|
|
|
|
type: this.studentType, |
|
|
|
|
type: this.studentType || '', |
|
|
|
|
staffArchitectureId: this.$refs.orgTree.getCurrentKey() || '', |
|
|
|
|
keyWord: this.keyWord, |
|
|
|
|
pageNum: this.page, |
|
|
|
|
pageSize: this.pageSize |
|
|
|
|
}; |
|
|
|
|
this.$post(this.api.studentList, data).then(res => { |
|
|
|
|
this.listData = res.page; |
|
|
|
|
this.total = res.total; |
|
|
|
|
}).catch(err => { |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
currentChange(val) { // 切换页码 |
|
|
|
|
this.page = val; |
|
|
|
|
if (this.studentType) { |
|
|
|
|
this.getData(); |
|
|
|
|
} else { |
|
|
|
|
this.getOrgStudentData(); |
|
|
|
|
} |
|
|
|
|
this.$post(this.api.staffList, data).then(res => { |
|
|
|
|
this.listData = res.records |
|
|
|
|
this.total = res.total |
|
|
|
|
}).catch(err => {}) |
|
|
|
|
}, |
|
|
|
|
getRowKeys(row) { // 表格key |
|
|
|
|
return row.accountId; |
|
|
|
|
// 切换页码 |
|
|
|
|
currentChange(val) { |
|
|
|
|
this.page = val |
|
|
|
|
this.getStaff() |
|
|
|
|
}, |
|
|
|
|
handleSelectionChange(val) { // 多选 |
|
|
|
|
this.multipleSelection = val; |
|
|
|
|
}, |
|
|
|
|
changeStudentType() { |
|
|
|
|
this.isRemove = false; |
|
|
|
|
this.initData(); |
|
|
|
|
this.multipleSelection = val |
|
|
|
|
}, |
|
|
|
|
initData() { |
|
|
|
|
this.$refs.table.clearSelection(); |
|
|
|
|
this.page = 1; |
|
|
|
|
this.getData(); |
|
|
|
|
this.$refs.table.clearSelection() |
|
|
|
|
this.page = 1 |
|
|
|
|
this.getStaff() |
|
|
|
|
}, |
|
|
|
|
delAllSelection() { // 批量删除 |
|
|
|
|
if (this.multipleSelection.length) { |
|
|
|
|
this.$confirm("确定要删除选中用户吗?", "提示", { |
|
|
|
|
type: "warning" |
|
|
|
|
}).then(() => { |
|
|
|
|
let ids = this.multipleSelection.map(item => { |
|
|
|
|
return item.accountId; |
|
|
|
|
}); |
|
|
|
|
this.$post(`${this.api.delStudent}?accountIds=${ids.toString()}`).then(res => { |
|
|
|
|
this.multipleSelection = []; |
|
|
|
|
this.$refs.table.clearSelection(); |
|
|
|
|
util.successMsg("删除成功"); |
|
|
|
|
if (this.studentType) { |
|
|
|
|
this.getData(); |
|
|
|
|
} else { |
|
|
|
|
this.getOrgStudentData(); |
|
|
|
|
} |
|
|
|
|
}).catch(res => { |
|
|
|
|
}); |
|
|
|
|
if(this.multipleSelection.length === this.listData.length && this.page>1) { |
|
|
|
|
this.handleCurrentChange(this.page - 1) |
|
|
|
|
} |
|
|
|
|
}).catch(() => { |
|
|
|
|
}); |
|
|
|
|
} else { |
|
|
|
|
util.errorMsg("请先选择数据 !"); |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
handleDelete(row) { // 删除 |
|
|
|
|
// 删除 |
|
|
|
|
delStaff(row) { |
|
|
|
|
this.$confirm("确定要删除吗?", "提示", { |
|
|
|
|
type: "warning" |
|
|
|
|
}).then(() => { |
|
|
|
|
this.$post(`${this.api.delStudent}?accountIds=${row.accountId}`).then(res => { |
|
|
|
|
util.successMsg("删除成功"); |
|
|
|
|
if (this.studentType) { |
|
|
|
|
this.getData(); |
|
|
|
|
} else { |
|
|
|
|
this.getOrgStudentData(); |
|
|
|
|
} |
|
|
|
|
}).catch(res => { |
|
|
|
|
}); |
|
|
|
|
}).catch(() => { |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
removeStudent(row) { // 移除 |
|
|
|
|
this.$confirm("确定要移除吗?", "提示", { |
|
|
|
|
type: "warning" |
|
|
|
|
}).then(() => { |
|
|
|
|
this.$post(`${this.api.removeStudent}?classId=${this.currentClassId}&stuAccountId=${row.accountId}`).then(res => { |
|
|
|
|
util.successMsg("移除成功"); |
|
|
|
|
if (this.studentType) { |
|
|
|
|
this.getData(); |
|
|
|
|
} else { |
|
|
|
|
this.getOrgStudentData(); |
|
|
|
|
} |
|
|
|
|
this.$post(`${this.api.delStaff}?accountIds=${row.accountId}`).then(res => { |
|
|
|
|
util.successMsg("删除成功") |
|
|
|
|
this.getStaff() |
|
|
|
|
}).catch(res => { |
|
|
|
|
}); |
|
|
|
|
}).catch(() => { |
|
|
|
|
}); |
|
|
|
|
}).catch(() => {}) |
|
|
|
|
}, |
|
|
|
|
resetPassword(row) { // 重置密码 |
|
|
|
|
this.$confirm(`重置后的密码为:${Setting.initialPassword},确定重置?`, "提示", { type: "warning" }).then(() => { |
|
|
|
@ -661,44 +491,71 @@ export default { |
|
|
|
|
}).catch(() => { |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
switchOff(row) { // 更新状态 |
|
|
|
|
let isEnable = row.isEnable === 0 ? 0 : 1; |
|
|
|
|
this.$get(`${this.api.updateAccountEnable}?id=${row.accountId}&isEnable=${isEnable}`).then(res => { |
|
|
|
|
util.successMsg("更新状态成功"); |
|
|
|
|
if (this.studentType) { |
|
|
|
|
this.getData(); |
|
|
|
|
} else { |
|
|
|
|
this.getOrgStudentData(); |
|
|
|
|
// 添加员工 |
|
|
|
|
addStaff() { |
|
|
|
|
this.staffVisible = true |
|
|
|
|
}, |
|
|
|
|
// 编辑/查看 |
|
|
|
|
editStaff(row, isDetail) { |
|
|
|
|
this.isDetail = isDetail |
|
|
|
|
this.staffVisible = true |
|
|
|
|
this.$post(`${this.api.staffDetail}?accountId=${row.accountId}`).then(res => { |
|
|
|
|
const { data } = res |
|
|
|
|
this.form = data |
|
|
|
|
this.originAccount = data.account |
|
|
|
|
this.originWorkNumber = data.workNumber |
|
|
|
|
}).catch(res => {}) |
|
|
|
|
}, |
|
|
|
|
// 获取角色数据 |
|
|
|
|
getRole() { |
|
|
|
|
this.roleList =[] |
|
|
|
|
this.$get(`${this.api.roleList}?page=1&size=1000&name=&platformId=${Setting.platformId}`).then(res => { |
|
|
|
|
this.roleList = res.rolePage.records |
|
|
|
|
}).catch(res => {}) |
|
|
|
|
}, |
|
|
|
|
// 处理切换角色 |
|
|
|
|
roleChange(value) { |
|
|
|
|
if (value.length) { |
|
|
|
|
let ids = this.form.roleAndDeptList.map(e => e.roleId); |
|
|
|
|
this.roleList.forEach(i => { |
|
|
|
|
let obj = { |
|
|
|
|
roleId: "", |
|
|
|
|
roleName: "", |
|
|
|
|
cascaderValue: [] |
|
|
|
|
}; |
|
|
|
|
if (value.includes(i.id) && !ids.includes(i.id)) { |
|
|
|
|
console.log(i) |
|
|
|
|
obj.roleId = i.id; |
|
|
|
|
obj.roleName = i.roleName; |
|
|
|
|
this.form.roleAndDeptList.push(obj); |
|
|
|
|
} |
|
|
|
|
}).catch(res => { |
|
|
|
|
}); |
|
|
|
|
} else { |
|
|
|
|
this.form.roleAndDeptList.splice(0); |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
addStudent() { // 添加学生 |
|
|
|
|
this.isAdd = true; |
|
|
|
|
this.showTree = true; |
|
|
|
|
this.studentVisible = true; |
|
|
|
|
}, |
|
|
|
|
editStudent(row, isDetail) { // 编辑/查看 |
|
|
|
|
this.isAdd = false; |
|
|
|
|
this.isDetail = isDetail; |
|
|
|
|
this.showTree = false; |
|
|
|
|
this.studentVisible = true; |
|
|
|
|
this.$post(`${this.api.getStudentInfoByAccountId}?stuAccountId=${row.accountId}`).then(res => { |
|
|
|
|
this.form = res.data; |
|
|
|
|
this.showTree = true; |
|
|
|
|
}).catch(res => {}); |
|
|
|
|
roleRemove(value) { // 处理移除角色 |
|
|
|
|
let list = []; |
|
|
|
|
for(var i=0;i<this.form.roleAndDeptList.length;i++){ |
|
|
|
|
if (this.form.roleAndDeptList[i].roleId == value){ |
|
|
|
|
|
|
|
|
|
}else{ |
|
|
|
|
list.push(this.form.roleAndDeptList[i]) |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
this.form.roleAndDeptList = list |
|
|
|
|
}, |
|
|
|
|
accountChange() { // 切换账号 |
|
|
|
|
if (this.form.account) { |
|
|
|
|
let url = ""; |
|
|
|
|
if (this.isAdd) { |
|
|
|
|
if (this.form.accountId) { |
|
|
|
|
url = `${this.api.checkWorkNumOrAccount}?platformId=${Setting.platformId}&type=1&account=${this.form.account}&workNumber=`; |
|
|
|
|
} else { |
|
|
|
|
url = `${this.api.checkWorkNumOrAccount}?platformId=${Setting.platformId}&type=1&accountId=${this.form.accountId}&account=${this.form.account}&workNumber=`; |
|
|
|
|
} |
|
|
|
|
this.$post(url).then(res => { |
|
|
|
|
this.disableds = false |
|
|
|
|
if (this.isAdd && this.form.accountId) { |
|
|
|
|
if (this.form.accountId) { |
|
|
|
|
this.$refs.form.clearValidate(); |
|
|
|
|
this.form = { |
|
|
|
|
account: this.form.account, |
|
|
|
@ -716,8 +573,7 @@ export default { |
|
|
|
|
this.accountReapeat = false; |
|
|
|
|
}).catch(err => { |
|
|
|
|
|
|
|
|
|
if (this.isAdd) { |
|
|
|
|
this.showTree = false; |
|
|
|
|
if (this.form.accountId) { |
|
|
|
|
} else { |
|
|
|
|
this.accountReapeat = true; |
|
|
|
|
} |
|
|
|
@ -727,7 +583,7 @@ export default { |
|
|
|
|
worknumberChange() { |
|
|
|
|
if (this.form.workNumber) { |
|
|
|
|
let url = ""; |
|
|
|
|
if (this.isAdd && !this.form.accountId) { |
|
|
|
|
if (!this.form.accountId) { |
|
|
|
|
url = `${this.api.checkWorkNumOrAccount}?platformId=${Setting.platformId}&type=1&workNumber=${this.form.workNumber}&account=`; |
|
|
|
|
} else { |
|
|
|
|
url = `${this.api.checkWorkNumOrAccount}?platformId=${Setting.platformId}&type=1&accountId=${this.form.accountId}&workNumber=${this.form.workNumber}&account=`; |
|
|
|
@ -738,11 +594,9 @@ export default { |
|
|
|
|
} |
|
|
|
|
}).catch(err => { |
|
|
|
|
this.$post(`${this.api.getDetailByAccount}?workNumber=${this.form.workNumber}&platformId=${Setting.platformId}&type=1`).then(res => { |
|
|
|
|
this.showTree = true; |
|
|
|
|
let classId = res.data.classList.map(e => e.id); |
|
|
|
|
this.form.classId = classId.toString(); |
|
|
|
|
delete this.form.classList; |
|
|
|
|
// this.showTree = true; |
|
|
|
|
this.accountReapeat = false; |
|
|
|
|
this.$refs.form.clearValidate(); |
|
|
|
|
}).catch(res => {}); |
|
|
|
@ -754,7 +608,7 @@ export default { |
|
|
|
|
let regex = /^1[3456789]\d{9}$/; |
|
|
|
|
if (regex.test(this.form.phone)) { |
|
|
|
|
let url = ""; |
|
|
|
|
if (this.isAdd && !this.form.accountId) { |
|
|
|
|
if (!this.form.accountId) { |
|
|
|
|
url = `${this.api.checkEmailOrPhone}?phone=${this.form.phone}&email=`; |
|
|
|
|
} else { |
|
|
|
|
url = `${this.api.checkEmailOrPhone}?accountId=${this.form.accountId}&phone=${this.form.phone}&email=`; |
|
|
|
@ -772,7 +626,7 @@ export default { |
|
|
|
|
let regex = /^([a-zA-Z]|[0-9])(\w|\-)+@[a-zA-Z0-9]+\.([a-zA-Z]{2,4})$/; |
|
|
|
|
if (regex.test(this.form.email)) { |
|
|
|
|
let url = ""; |
|
|
|
|
if (this.isAdd && !this.form.accountId) { |
|
|
|
|
if (!this.form.accountId) { |
|
|
|
|
url = `${this.api.checkEmailOrPhone}?email=${this.form.email}&phone=`; |
|
|
|
|
} else { |
|
|
|
|
url = `${this.api.checkEmailOrPhone}?accountId=${this.form.accountId}&email=${this.form.email}&phone=`; |
|
|
|
@ -786,81 +640,35 @@ export default { |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
filterNode(value, data) { |
|
|
|
|
if (!value) return true; |
|
|
|
|
return data.organizationName.indexOf(value) !== -1; |
|
|
|
|
}, |
|
|
|
|
loadClassTree(node, resolve) { // 懒加载所在班级树结构 |
|
|
|
|
let level = 1; |
|
|
|
|
let parentId = ""; |
|
|
|
|
if (node.level === 0) { |
|
|
|
|
this.treeNode = node; |
|
|
|
|
this.treeResolve = resolve; |
|
|
|
|
this.getClassTreeData(resolve, level, parentId); |
|
|
|
|
} else if (node.level > 2) { |
|
|
|
|
return resolve([]); |
|
|
|
|
} else { |
|
|
|
|
if (node.data && node.data.level && node.data.id) { |
|
|
|
|
this.getClassTreeData(resolve, node.data.level + 1, node.data.id); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
getClassTreeData(resolve, level, parentId) { // 获取组织架构树数据 |
|
|
|
|
this.$post(`${this.api.treeListArch}?level=${level}&parentId=${parentId}`).then(res => { |
|
|
|
|
let { status, treeList } = res; |
|
|
|
|
if (status === 200 && treeList.length) { |
|
|
|
|
let result = []; |
|
|
|
|
treeList.forEach(i => { |
|
|
|
|
i.disabled = i.level < 3; |
|
|
|
|
if (i.level === 3) { |
|
|
|
|
i.leaf = true; |
|
|
|
|
// 原本想在数据中添加勾选属性,但并没有效果,文档中props参数没有checked |
|
|
|
|
// i.checked = this.form.classId.includes(i.id.toString()); |
|
|
|
|
if (this.form.classId) { |
|
|
|
|
this.defaultCheckedKeys = this.form.classId.split(",").map(i => Number(i)); |
|
|
|
|
} |
|
|
|
|
i.showCheckbox = true; |
|
|
|
|
} else { |
|
|
|
|
i.leaf = false; |
|
|
|
|
i.showCheckbox = false; |
|
|
|
|
} |
|
|
|
|
result.push(i); |
|
|
|
|
}); |
|
|
|
|
return resolve(result); |
|
|
|
|
} else { |
|
|
|
|
return resolve([]); |
|
|
|
|
} |
|
|
|
|
}).catch(err => { |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
saveData(type) { // 提交新增/编辑学生 |
|
|
|
|
// 提交新增/编辑员工 |
|
|
|
|
submitStaff() { |
|
|
|
|
this.$refs.form.validate((valid) => { |
|
|
|
|
if (valid) { |
|
|
|
|
if (this.submiting) return false |
|
|
|
|
let nodes = this.$refs.classTree.getCheckedNodes(); |
|
|
|
|
if (nodes.length) { |
|
|
|
|
let tempArr = []; |
|
|
|
|
nodes.forEach(i => { |
|
|
|
|
if (i.level === 3) { |
|
|
|
|
tempArr.push(i.id); |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
this.form.classId = tempArr.toString(); |
|
|
|
|
if (this.accountReapeat) return util.warningMsg("该账号已存在") |
|
|
|
|
if (this.workNumberReapeat) return util.warningMsg("该员工学号已存在") |
|
|
|
|
if (this.phoneRepeat) return util.warningMsg("该手机号已存在") |
|
|
|
|
if (this.emailRepeat) return util.warningMsg("该邮箱已存在") |
|
|
|
|
const form = this.form |
|
|
|
|
if (this.teacherForm.roleAndDeptList.length){ |
|
|
|
|
for (let i = 0; i < this.teacherForm.roleAndDeptList.length; i++) { |
|
|
|
|
if (this.teacherForm.roleAndDeptList[i].cascaderValue.length < 2) { |
|
|
|
|
util.warningMsg(`请选择${this.teacherForm.roleAndDeptList[i].roleName}所属部门`) |
|
|
|
|
return; |
|
|
|
|
} else { |
|
|
|
|
data.roleAndDeptList.push({ |
|
|
|
|
roleId: this.teacherForm.roleAndDeptList[i].roleId, |
|
|
|
|
staffArchitectureId: this.teacherForm.roleAndDeptList[i].cascaderValue[0], |
|
|
|
|
gradeId: this.teacherForm.roleAndDeptList[i].cascaderValue[1] |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
if (this.form.accountId) { |
|
|
|
|
this.submiting = true |
|
|
|
|
this.$post(this.api.modifyStudent, this.form).then(res => { |
|
|
|
|
util.successMsg("编辑成功!"); |
|
|
|
|
if (type) { |
|
|
|
|
this.resetStudent(); |
|
|
|
|
} else { |
|
|
|
|
this.closeStudent(); |
|
|
|
|
if (this.studentType) { |
|
|
|
|
this.getData(); |
|
|
|
|
} else { |
|
|
|
|
this.getOrgStudentData(); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
this.submiting = true |
|
|
|
|
if (form.accountId) { |
|
|
|
|
this.$post(this.api.modifyStaff, form).then(res => { |
|
|
|
|
util.successMsg("编辑成功!") |
|
|
|
|
this.closeStudent() |
|
|
|
|
setTimeout(() => { |
|
|
|
|
this.submiting = false |
|
|
|
|
}, 2000) |
|
|
|
@ -870,24 +678,10 @@ export default { |
|
|
|
|
}, 2000) |
|
|
|
|
}) |
|
|
|
|
} else { |
|
|
|
|
if (this.accountReapeat) return util.warningMsg("该账号已存在"); |
|
|
|
|
if (this.workNumberReapeat) return util.warningMsg("该学生学号已存在"); |
|
|
|
|
if (this.phoneRepeat) return util.warningMsg("该手机号已存在"); |
|
|
|
|
if (this.emailRepeat) return util.warningMsg("该邮箱已存在"); |
|
|
|
|
this.submiting = true |
|
|
|
|
this.form.uniqueIdentification = new Date().getTime(); |
|
|
|
|
this.$post(this.api.addStudent, this.form).then(res => { |
|
|
|
|
util.successMsg("新增成功!"); |
|
|
|
|
if (type) { |
|
|
|
|
this.resetStudent(); |
|
|
|
|
} else { |
|
|
|
|
this.closeStudent(); |
|
|
|
|
if (this.studentType) { |
|
|
|
|
this.getData(); |
|
|
|
|
} else { |
|
|
|
|
this.getOrgStudentData(); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
form.uniqueIdentification = new Date().getTime() |
|
|
|
|
this.$post(this.api.saveStaff, form).then(res => { |
|
|
|
|
util.successMsg("新增成功!") |
|
|
|
|
this.closeStudent() |
|
|
|
|
setTimeout(() => { |
|
|
|
|
this.submiting = false |
|
|
|
|
}, 2000) |
|
|
|
@ -897,59 +691,45 @@ export default { |
|
|
|
|
}, 2000) |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
} else { |
|
|
|
|
return false; |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
resetStudent() { // 重置新增学生对话框 |
|
|
|
|
this.$refs.form.clearValidate(); |
|
|
|
|
this.form = { |
|
|
|
|
userName: '', |
|
|
|
|
account: '', |
|
|
|
|
phone: '', |
|
|
|
|
uniqueIdentification: '', |
|
|
|
|
workNumber: '', |
|
|
|
|
email: '', |
|
|
|
|
classId: "" |
|
|
|
|
}; |
|
|
|
|
this.$refs.classTree.setCheckedKeys([]); |
|
|
|
|
if (this.studentType) { |
|
|
|
|
this.getData(); |
|
|
|
|
} else { |
|
|
|
|
this.getOrgStudentData(); |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
}, |
|
|
|
|
closeStudent() { // 关闭新增学生对话框 |
|
|
|
|
this.$refs.form.clearValidate(); |
|
|
|
|
// 关闭新增员工对话框 |
|
|
|
|
closeStudent() { |
|
|
|
|
this.$refs.form.clearValidate() |
|
|
|
|
this.form = { |
|
|
|
|
accountId: '', |
|
|
|
|
userName: '', |
|
|
|
|
account: '', |
|
|
|
|
phone: '', |
|
|
|
|
uniqueIdentification: '', |
|
|
|
|
workNumber: '', |
|
|
|
|
email: '', |
|
|
|
|
classId: "" |
|
|
|
|
classId: '' |
|
|
|
|
}; |
|
|
|
|
this.defaultCheckedKeys = []; |
|
|
|
|
this.isDetail = false; |
|
|
|
|
this.showTree = false; |
|
|
|
|
this.studentVisible = false; |
|
|
|
|
this.defaultCheckedKeys = [] |
|
|
|
|
this.isDetail = false |
|
|
|
|
this.staffVisible = false |
|
|
|
|
this.getStaff() |
|
|
|
|
}, |
|
|
|
|
batchImport() { // 批量导入 |
|
|
|
|
// 批量导入 |
|
|
|
|
batchImport() { |
|
|
|
|
this.importVisible = true; |
|
|
|
|
this.uploadList = []; |
|
|
|
|
this.uploadFaild = false; |
|
|
|
|
}, |
|
|
|
|
downLoad() { // 模板下载 |
|
|
|
|
// 模板下载 |
|
|
|
|
downLoad() { |
|
|
|
|
location.href = this.api.studentTemplate; |
|
|
|
|
}, |
|
|
|
|
handleExceed(files, fileList) { // 上传文件 |
|
|
|
|
// 上传文件 |
|
|
|
|
handleExceed(files, fileList) { |
|
|
|
|
util.warningMsg( |
|
|
|
|
`当前限制选择 1 个文件,如需更换,请删除上一个文件再重新选择!` |
|
|
|
|
); |
|
|
|
|
}, |
|
|
|
|
showFaild() { // 下载失败文件 |
|
|
|
|
// 下载失败文件 |
|
|
|
|
showFaild() { |
|
|
|
|
location.href = `${this.api.exportFailure}?exportCode=${this.exportCode}`; |
|
|
|
|
}, |
|
|
|
|
uploadSuccess(res, file, fileList) { |
|
|
|
@ -961,8 +741,6 @@ export default { |
|
|
|
|
} |
|
|
|
|
util.successMsg(`上传成功${res.data.successNum},上传失败${res.data.failureNum}`); |
|
|
|
|
util.successMsg(`本次上传有${res.data.failureNum}个错误信息录入`); |
|
|
|
|
|
|
|
|
|
this.getClassTreeData('','1','') |
|
|
|
|
} else { |
|
|
|
|
res.message ? util.errorMsg(res.message) : util.errorMsg("上传失败,请检查数据"); |
|
|
|
|
} |
|
|
|
|