Commit f01c9bb8 authored by 黄奎's avatar 黄奎

页面修改

parent e051eff3
...@@ -328,7 +328,7 @@ export function queryManagerPage(data) { ...@@ -328,7 +328,7 @@ export function queryManagerPage(data) {
*/ */
export function saveManager(data) { export function saveManager(data) {
return request({ return request({
url: '/User/SetManager', url: '/User/SetEmployee',
method: 'post', method: 'post',
data data
}) })
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
<q-select filled stack-label option-value="PostId" option-label="PostName" v-model="objOption.Post_Id" <q-select filled stack-label option-value="PostId" option-label="PostName" v-model="objOption.Post_Id"
ref="Post_Id" :options="PostList" label="岗位" :dense="false" class="col-6 q-pr-lg q-pb-lg" emit-value ref="Post_Id" :options="PostList" label="岗位" :dense="false" class="col-6 q-pr-lg q-pb-lg" emit-value
map-options /> map-options />
<q-input filled stack-label maxlength="20" :dense="false" v-model="objOption.MName" ref="MName" <q-input filled stack-label maxlength="20" :dense="false" v-model="objOption.EmployeeName" ref="EmployeeName"
class="col-6 q-pr-lg q-pb-lg" label="管理者名称" :rules="[val => !!val || '请填写管理者姓名']" /> class="col-6 q-pr-lg q-pb-lg" label="管理者名称" :rules="[val => !!val || '请填写管理者姓名']" />
<q-input filled stack-label maxlength="20" :dense="false" v-model="objOption.IDCard" ref="IDCard" <q-input filled stack-label maxlength="20" :dense="false" v-model="objOption.IDCard" ref="IDCard"
...@@ -28,8 +28,8 @@ ...@@ -28,8 +28,8 @@
<q-select filled stack-label option-value="Id" option-label="Name" v-model="objOption.Education" <q-select filled stack-label option-value="Id" option-label="Name" v-model="objOption.Education"
ref="Education" :options="EducationList" label="学历" :dense="false" class="col-6 q-pr-lg q-pb-lg" emit-value ref="Education" :options="EducationList" label="学历" :dense="false" class="col-6 q-pr-lg q-pb-lg" emit-value
map-options /> map-options />
<q-input type="tel" filled stack-label maxlength="100" :dense="false" v-model="objOption.MTel" ref="MTel" <q-input type="tel" filled stack-label maxlength="100" :dense="false" v-model="objOption.EmployeeTel"
class="col-6 q-pr-lg q-pb-lg" label="联系电话" :rules="[val => !!val || '请填写管理者联系电话']" /> ref="EmployeeTel" class="col-6 q-pr-lg q-pb-lg" label="联系电话" :rules="[val => !!val || '请填写管理者联系电话']" />
<q-input filled v-model="objOption.EntryTime" class="col-6 q-pr-lg q-pb-lg" mask="date" label="入职时间"> <q-input filled v-model="objOption.EntryTime" class="col-6 q-pr-lg q-pb-lg" mask="date" label="入职时间">
<template v-slot:append> <template v-slot:append>
<q-icon name="event" class="cursor-pointer"> <q-icon name="event" class="cursor-pointer">
...@@ -72,13 +72,13 @@ ...@@ -72,13 +72,13 @@
<div class="col-6 q-pb-lg" style="margin-top:20px;"> <div class="col-6 q-pb-lg" style="margin-top:20px;">
<q-uploader style="display: inline-block;max-height: 320px;max-width: 100%; background-repeat:no-repeat" <q-uploader style="display: inline-block;max-height: 320px;max-width: 100%; background-repeat:no-repeat"
:style="{'background-image':'url(' + objOption.MHead + ')'}" max-files="1" hide-upload-btn :style="{'background-image':'url(' + objOption.UserIcon + ')'}" max-files="1" hide-upload-btn
@rejected="onRejected" label="管理者头像" :max-file-size="512*1024" accept=".jpg, image/*" auto-upload @rejected="onRejected" label="管理者头像" :max-file-size="512*1024" accept=".jpg, image/*" auto-upload
:factory="uploadFile" no-thumbnails> :factory="uploadFile" no-thumbnails>
</q-uploader> </q-uploader>
</div> </div>
<q-toggle size="md" label="是否是老师" color="primary" :false-value="1" :true-value="0" <q-toggle size="md" label="是否是老师" color="primary" :false-value="1" :true-value="0"
v-model="objOption.Isteacher" /> v-model="objOption.AccountType" />
</div> </div>
</q-card-section> </q-card-section>
...@@ -126,15 +126,13 @@ ...@@ -126,15 +126,13 @@
return { return {
persistent: true, persistent: true,
objOption: { objOption: {
MId: 0, //管理者编号 Id: 0, //管理者编号
School_Id: 0, //学校编号 School_Id: 0, //学校编号
MName: "", //管理者姓名 EmployeeName: "", //管理者姓名
MTel: '', //管理者电话 EmployeeTel: '', //管理者电话
MHead: '', //头像 UserIcon: '', //头像
RoleAuth: "", //角色
Dept_Id: 0, //部门编号 Dept_Id: 0, //部门编号
Post_Id: 0, //岗位编号 Post_Id: 0, //岗位编号
IDCard: '', //身份证 IDCard: '', //身份证
Sex: 0, //性别(0-男,1-女) Sex: 0, //性别(0-男,1-女)
Education: 0, //学历 Education: 0, //学历
...@@ -145,7 +143,8 @@ ...@@ -145,7 +143,8 @@
LeaveStatus: 0, //在职状态 LeaveStatus: 0, //在职状态
Account: '', //账号 Account: '', //账号
Password: '', //密码 Password: '', //密码
Isteacher: 1, // 是否是老师 AccountType: 1, // 是否是老师
AccountId:0,//账号对应的表主键编号
}, },
optionTitle: "", optionTitle: "",
schoolList: [], schoolList: [],
...@@ -216,18 +215,30 @@ ...@@ -216,18 +215,30 @@
if (this.saveObj) { if (this.saveObj) {
this.optionTitle = "修改员工信息" this.optionTitle = "修改员工信息"
queryEmployeeInfo({ queryEmployeeInfo({
Id: this.saveObj.TabKeyId Id: this.saveObj.Id,
AccountId: this.saveObj.AccountId,
AccountType: this.saveObj.AccountType
}).then(res => { }).then(res => {
console.log("res", res); console.log("res", res);
this.objOption.Id = res.Data.Id; this.objOption.Id = res.Data.Id;
this.objOption.School_Id = res.Data.School_Id; this.objOption.School_Id = res.Data.School_Id;
this.objOption.MName = res.Data.MName; this.objOption.EmployeeName = res.Data.EmployeeName;
this.objOption.MTel = res.Data.MTel; this.objOption.EmployeeTel = res.Data.EmployeeTel;
this.objOption.MHead = res.Data.MHead; this.objOption.UserIcon = res.Data.UserIcon;
this.objOption.Post_Id = res.Data.Post_Id; this.objOption.Post_Id = res.Data.Post_Id;
this.objOption.Dept_Id = res.Data.Dept_Id; this.objOption.Dept_Id = res.Data.Dept_Id;
this.objOption.IDCard = res.Data.IDCard;
this.objOption.Sex = res.Data.Sex;
this.objOption.Education = res.Data.Education;
this.objOption.EntryTime = res.Data.EntryTime;
this.objOption.LeaveTime = res.Data.LeaveTime;
this.objOption.BirthDate = res.Data.BirthDate;
this.objOption.Address = res.Data.Address;
this.objOption.LeaveStatus = res.Data.LeaveStatus;
this.objOption.Account = res.Data.Account;
this.objOption.AccountType = res.Data.AccountType;
this.objOption.AccountId=res.Data.AccountId;
this.returnString.push(res.Data.Dept_Id.toString()); this.returnString.push(res.Data.Dept_Id.toString());
this.tempRole = res.Data.RoleList;
if (this.objOption.Dept_Id && this.objOption.Dept_Id > 0) { if (this.objOption.Dept_Id && this.objOption.Dept_Id > 0) {
this.queryPostList(); this.queryPostList();
} }
...@@ -258,7 +269,7 @@ ...@@ -258,7 +269,7 @@
uploadFile(files) { uploadFile(files) {
UploadSelfFile('studentIcon', files[0], res => { UploadSelfFile('studentIcon', files[0], res => {
if (res.resultCode == 1) { if (res.resultCode == 1) {
this.objOption.MHead = res.FileUrl; this.objOption.UserIcon = res.FileUrl;
} }
}) })
}, },
...@@ -267,16 +278,6 @@ ...@@ -267,16 +278,6 @@
this.persistent = false this.persistent = false
}, },
setStudent() { setStudent() {
var authStr = "";
if (this.tempRole && this.tempRole.length > 0) {
this.tempRole.forEach(item => {
authStr += "," + item;
})
}
if (authStr != '') {
authStr = authStr.substring(1, authStr.length);
}
this.objOption.RoleAuth = authStr;
this.saveLoading = true this.saveLoading = true
saveManager(this.objOption).then(res => { saveManager(this.objOption).then(res => {
this.saveLoading = false this.saveLoading = false
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment