Commit 89de6cb8 authored by zhengke's avatar zhengke

1

parent 4bc56548
......@@ -50,7 +50,51 @@
@click="isShowAdd = false"
/>
<template v-if="isShowAdd">
<div class="row wrap">
<div class="row wrap" v-if="isHaveTeacher">
<q-select
filled
stack-label
option-label="Name"
@input="getRole"
v-model="AssitMsg.AssistType"
option-value="Id"
:options="AssistTeacherDropList"
label="角色"
dense
class="col-6 q-pb-lg q-pr-lg"
emit-value
map-options
/>
<q-select
filled
dense
v-if="AssitMsg.AssistType == 2"
v-model="AssitMsg.AssistId"
:options="RoleListData"
option-label="EmployeeName"
class="col-6 q-pb-lg"
option-value="Id"
emit-value
map-options
/>
<q-select
filled
dense
v-else
v-model="AssitMsg.AssistId"
@filter="filterEmployee"
use-input
:options="myEmployeeList"
option-label="EmployeeName"
class="col-6 q-pb-lg"
option-value="Id"
emit-value
map-options
/>
<i class="iconfont icon-close delAssist"></i>
</div>
<div class="row wrap" v-else>
<q-select
filled
stack-label
......@@ -164,6 +208,7 @@ import {
RemoveStudentAssist
} from "../../../api/sale/sale";
import { queryEmployee } from "../../../api/users/user";
import { mapState } from "vuex";
export default {
meta: {
......@@ -196,6 +241,7 @@ export default {
dataList: [],
page_Count: 0,
AssistDropList: [], //下拉数据
AssistTeacherDropList:[],
RoleListData: [], //课程顾问下拉数据
employeeList: [],
myEmployeeList: [],
......@@ -209,6 +255,26 @@ export default {
this.msg.StuId = this.saveObj.StuId;
}
},
computed: mapState({
isHaveTeacher(state) {
if (
state.user.userInfo &&
state.user.userInfo.ActionMenuList &&
state.user.userInfo.ActionMenuList.length > 0
) {
let action = state.user.userInfo.ActionMenuList.find(x => {
if (x.FunctionCode == "Query_TeacherAssist") {
return x;
}
});
if (action) {
return true;
}
}
return false;
}
}),
mounted() {
this.getList();
this.GetAssistTypeList();
......@@ -225,6 +291,9 @@ export default {
if (x.Id != 1 && x.Id != 4) {
this.AssistDropList.push(x);
}
if (x.Id==4){
this.AssistTeacherDropList.push(x);
}
});
}
});
......
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