|
|
|
@ -214,8 +214,8 @@ |
|
|
|
|
</el-row> |
|
|
|
|
</el-form> |
|
|
|
|
<span slot="footer" class="dialog-footer" v-if="!isDetail"> |
|
|
|
|
<el-button type="primary" @click="saveData(0)">保存</el-button> |
|
|
|
|
<el-button v-if="isAdd" type="primary" @click="saveData(1)">保存并继续添加</el-button> |
|
|
|
|
<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> |
|
|
|
|
</span> |
|
|
|
|
</el-dialog> |
|
|
|
@ -346,7 +346,7 @@ export default { |
|
|
|
|
{ required: true, message: "请输入名称", trigger: "blur" } |
|
|
|
|
], |
|
|
|
|
account: [ |
|
|
|
|
{ validator: accountPass, trigger: 'blur' } |
|
|
|
|
{ required: true,validator: accountPass, trigger: 'blur' } |
|
|
|
|
// { required: true, message: "请输入账号", trigger: "blur" }, |
|
|
|
|
// { |
|
|
|
|
// pattern: /^[A-Za-z0-9]*$/, |
|
|
|
@ -358,7 +358,7 @@ export default { |
|
|
|
|
{ required: true, message: "请输入学生姓名", trigger: "blur" } |
|
|
|
|
], |
|
|
|
|
workNumber: [ |
|
|
|
|
{ validator: workNumberPass, trigger: 'blur' } |
|
|
|
|
{ required: true,validator: workNumberPass, trigger: 'blur' } |
|
|
|
|
// { required: true, message: "请输入学生学号", trigger: "blur" }, |
|
|
|
|
// { |
|
|
|
|
// pattern: /^[A-Za-z0-9]*$/, |
|
|
|
@ -405,7 +405,8 @@ export default { |
|
|
|
|
exportCode: "", |
|
|
|
|
headers: { |
|
|
|
|
token: util.local.get(Setting.tokenKey) |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
disableds:false |
|
|
|
|
}; |
|
|
|
|
}, |
|
|
|
|
mounted() { |
|
|
|
@ -741,6 +742,7 @@ export default { |
|
|
|
|
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) { |
|
|
|
|
this.$refs.form.clearValidate(); |
|
|
|
|
this.form = { |
|
|
|
@ -758,6 +760,7 @@ export default { |
|
|
|
|
} |
|
|
|
|
this.accountReapeat = false; |
|
|
|
|
}).catch(err => { |
|
|
|
|
this.disableds = true |
|
|
|
|
if (this.isAdd) { |
|
|
|
|
this.showTree = false; |
|
|
|
|
this.$post(`${this.api.getDetailByAccount}?workNumber=${this.form.workNumber}&platformId=${Setting.platformId}&type=1`).then(res => { |
|
|
|
@ -990,7 +993,7 @@ export default { |
|
|
|
|
this.exportCode = res.data.exportCode; |
|
|
|
|
this.uploadFaild = true; |
|
|
|
|
} |
|
|
|
|
util.successMsg(`上传成功${res.data.successNum},上传失败${res.data.failureNum}`); |
|
|
|
|
util.successMsg(`本次上传有${res.data.failureNum}个失败`); |
|
|
|
|
} else { |
|
|
|
|
res.message ? util.errorMsg(res.message) : util.errorMsg("上传失败,请检查数据"); |
|
|
|
|
} |
|
|
|
|