Commit 4de8ae05 authored by 罗超's avatar 罗超

Merge branch 'master' of http://gitlab.oytour.com/luochao/confucius into master

parents b1f3421c 756938ec
......@@ -186,3 +186,16 @@ export function UpdateEmployeeType(data) {
data
})
}
/**
* 获取用户角色下拉
* @param {查询参数} data
*/
export function GetUserRoleList(data) {
return request({
url: '/User/GetUserRoleList',
method: 'post',
data
})
}
......@@ -8,7 +8,7 @@
<div class="text-caption q-mb-md q-px-xs text-grey-6">基本资料</div>
<div class="row wrap">
<q-select filled v-if="isEditShow" stack-label option-value="SId" option-label="SName"
v-model="objOption.School_Id" ref="School_Id" :options="schoolList" label="所属校区" :dense="false"
v-model="objOption.School_Id" ref="School_Id" :options="schoolList" label="所属校区"
class="col-6 q-pb-lg q-pr-lg" emit-value map-options @input="schoolChagne" />
<selectTree :treeData='DeptList' v-if="isEditShow" :defaultArray="returnString" nodeKey="DeptId"
:multiple="false" labelKey="DeptName" childrenKey="ChildList" tipText="选择部门" @getChild="getChild"
......@@ -59,7 +59,7 @@
:rules="[val => !!val || '密码']" />
<q-select filled stack-label option-value="Id" option-label="Name" v-model="objOption.LeaveStatus" @input='getLeave'
ref="Education" :options="LeaveStatusList" label="在职状态" :dense="false" class="col-6 q-pr-lg q-pb-lg"
emit-value map-options />
emit-value map-options />
<q-input v-show="objOption.AccountId>0 && objOption.LeaveStatus==4" filled v-model="objOption.LeaveTime"
class="col-6 q-pr-lg q-pb-lg" mask="date" label="离职时间">
<template v-slot:append>
......@@ -70,19 +70,21 @@
</q-icon>
</template>
</q-input>
<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"
:style="{'background-image':'url(' + objOption.UserIcon + ')'}" max-files="1" hide-upload-btn
@rejected="onRejected" label="头像" accept=".jpg, image/*" auto-upload :factory="uploadFile" no-thumbnails>
</q-uploader>
</div>
<q-select filled stack-label :disable="objOption.AccountId==0?false:true" option-value="Id"
option-label="Value" ref="ID" v-model="objOption.AccountType" :options="AccountTypeList" label="用户类型"
:dense="false" class="col-6 q-pr-lg q-pb-lg" emit-value map-options />
<q-select filled stack-label option-value="Id" option-label="EmployeeName" ref="ID"
v-model="objOption.DirectSupervisor" :options="EmployeeList" label="直属上级" :dense="false"
class="col-6 q-pr-lg q-pb-lg" emit-value map-options />
<q-select filled stack-label option-value="Id" option-label="Name" ref="UserRole" clearable
v-model="objOption.UserRole" :options="roleList" label="用户角色" :dense="false"
class="col-6 q-pr-lg q-pb-lg" emit-value map-options />
<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"
:style="{'background-image':'url(' + objOption.UserIcon + ')'}" max-files="1" hide-upload-btn
@rejected="onRejected" label="头像" accept=".jpg, image/*" auto-upload :factory="uploadFile" no-thumbnails>
</q-uploader>
</div>
</div>
</q-card-section>
<q-separator />
......@@ -116,7 +118,8 @@
} from '../../../api/common/common'
import selectTree from '../../common/select-tree'
import {
queryEmployee //员工列表
queryEmployee, //员工列表
GetUserRoleList
} from '../../../api/users/user'
export default {
components: {},
......@@ -153,7 +156,8 @@
AccountType: 1, // 是否是老师
AccountId: 0, //账号对应的表主键编号
Email: "", //邮箱
DirectSupervisor: 0 //直属上级
DirectSupervisor: 0, //直属上级
UserRole: '' //用户角色(1-市场人员,2-课程顾问)
},
optionTitle: "",
schoolList: [],
......@@ -168,6 +172,7 @@
Id: 1,
Name: '女'
}],
roleList:[],
EducationList: [], //学历数组
LeaveStatusList: [], //在职状态
isEditShow: false, //是否显示修改应该隐藏
......@@ -196,11 +201,19 @@
this.getEducationList();
this.getLeaveState();
this.Employee();
this.getRoleList();
},
mounted() {
this.initObj();
},
methods: {
getRoleList(){
GetUserRoleList().then(res => {
if (res.Code == 1) {
this.roleList = res.Data;
}
})
},
Employee() {
var qMsg = {
EmployeeName: ''
......@@ -322,6 +335,7 @@
this.objOption.AccountId = res.Data.AccountId;
this.objOption.Email = res.Data.Email;
this.objOption.DirectSupervisor = res.Data.DirectSupervisor;
this.objOption.UserRole = res.Data.UserRole;
if (this.objOption.School_Id) {
this.queryDeptTree();
}
......
......@@ -142,8 +142,8 @@
转介人
</div>
<div class="stage_value">
<q-select filled v-model="customObj.StuSourceId" style="width:185px;" dense :options="customList" option-label="CustomerName"
option-value="CustomerId" emit-value map-options />
<q-select filled v-model="customObj.StuSourceId" style="width:185px;" use-input @filter="filterStudent" dense :options="MyTransListData"
option-label="StuName" option-value="StuId" emit-value map-options />
</div>
</div>
</div>
......@@ -269,7 +269,8 @@
getStudentInfo, //获取学员客户信息
queryStuStageList, //获取客户阶段列表
saveStudent, //保存学员信息
GetStudentTypeList
GetStudentTypeList,
getStudentDorpDownList
} from '../../../api/school/index';
import {
getGuestBasicsEnumList,
......@@ -343,6 +344,8 @@
customFromList: [], //客户来源
customTypeList: [], //客户类型
customList: [],
TransListData:[], //转介人数据
MyTransListData:[],
checkMsg: {
StuId: 0,
StuTel: '',
......@@ -361,6 +364,7 @@
this.getCustomFrom();
this.GetCustomerList();
this.getCustomTypeList();
this.getStudentDorpDown();
if (this.saveObj && this.saveObj.StuId > 0) {
this.customMsg.StuId = this.saveObj.StuId;
this.checkMsg.StuId = this.saveObj.StuId;
......@@ -496,6 +500,24 @@
}
})
},
//获取转介人下拉
getStudentDorpDown(){
getStudentDorpDownList().then(res => {
console.log(res,'res');
if (res.Code == 1) {
this.TransListData = res.Data;
this.MyTransListData = res.Data;
}
})
},
//筛选转介人
filterStudent(val, update, abort){
update(() => {
this.MyTransListData = this.TransListData.filter(
v => v.StuName.indexOf(val) > -1
);
});
},
queryStuInfo() {
getStudentInfo({
StuId: this.customMsg.StuId
......
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