Commit eb61266f authored by 黄奎's avatar 黄奎

页面修改

parent 0ae3ba70
...@@ -32,28 +32,17 @@ ...@@ -32,28 +32,17 @@
</style> </style>
<template> <template>
<div> <div>
<template v-if="userInfo.IsCourseConsultant == 1"> <!--课程顾问 或有教师权限-->
<q-btn label="新增" color="accent q-mb-lg" size="sm" v-if="userInfo.IsCourseConsultant == 1" <template v-if="userInfo.IsCourseConsultant == 1||isHaveTeacherEdit">
@click="isShowAdd = true" /> <q-btn label="新增" color="accent q-mb-lg" size="sm" @click="isShowAdd = true" />
<span class="text-grey-4" v-else>抱歉,你没有权限邀请其他服务人员</span> </template>
<template v-else>
<span class="text-grey-4">抱歉,你没有权限邀请其他服务人员</span>
</template> </template>
<q-btn label="新增" color="accent q-mb-lg" size="sm" v-if="isHaveTeacherEdit"
@click="isShowAdd = true" />
<q-btn label="取消" style="margin-left:20px;" v-if="isShowAdd" flat color="grey-10 q-mb-lg" size="sm" <q-btn label="取消" style="margin-left:20px;" v-if="isShowAdd" flat color="grey-10 q-mb-lg" size="sm"
@click="isShowAdd = false" /> @click="isShowAdd = false" />
<template v-if="isShowAdd"> <template v-if="isShowAdd">
<div class="row wrap" v-if="isHaveTeacherEdit"> <div class="row wrap">
<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 />
</div>
<div class="row wrap" v-else>
<q-select filled stack-label option-label="Name" @input="getRole" v-model="AssitMsg.AssistType" <q-select filled stack-label option-label="Name" @input="getRole" v-model="AssitMsg.AssistType"
option-value="Id" :options="AssistDropList" label="角色" dense class="col-6 q-pb-lg q-pr-lg" emit-value option-value="Id" :options="AssistDropList" label="角色" dense class="col-6 q-pb-lg q-pr-lg" emit-value
map-options /> map-options />
...@@ -62,43 +51,44 @@ ...@@ -62,43 +51,44 @@
<q-select filled dense v-else v-model="AssitMsg.AssistId" @filter="filterEmployee" use-input <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 :options="myEmployeeList" option-label="EmployeeName" class="col-6 q-pb-lg" option-value="Id" emit-value
map-options /> map-options />
<i class="iconfont icon-close delAssist"></i> <i class="iconfont icon-close delAssist"></i>
</div> </div>
<div class="row wrap" style="margin-bottom:10px;float:right;"> <div class="row wrap" style="margin-bottom:10px;float:right;">
<q-btn label="保存" color="accent q-mb-lg" size="md" @click="saveAssit()" /> <q-btn label="保存" color="accent q-mb-lg" size="md" @click="saveAssit()" />
</div> </div>
</template> </template>
<div v-if="dataList.length > 0"> <div v-if="dataList.length > 0">
<table class="studentAssitTable" style="border:1px solid #f2f2f2;border-collapse:collapse;" cellspacing="0" <table class="studentAssitTable" style="border:1px solid #f2f2f2;border-collapse:collapse;" cellspacing="0"
cellpadding="0"> cellpadding="0">
<tr> <tr>
<th style="width:180px;">角色</th> <th style="width:180px;">角色</th>
<th style="width:180px;">人员</th> <th style="width:180px;">人员</th>
<th v-if="userInfo.IsCourseConsultant == 1||isHaveTeacherEdit">操作</th> <th>操作</th>
</tr> </tr>
<tr v-for="(item, index) in dataList" :key="index"> <tr v-for="(item, index) in dataList" :key="index">
<td>{{ item.AssistTypeName }}</td> <td>{{ item.AssistTypeName }}</td>
<td>{{ item.AssistName }}</td> <td>{{ item.AssistName }}</td>
<td v-if="isHaveTeacherEdit"> <td>
<div> <template v-if="userInfo.IsCourseConsultant == 1||isHaveTeacherEdit">
<q-btn flat size="xs" icon="edit" color="accent" style="font-weight:400" label="修改" <div v-if="userInfo.IsCourseConsultant == 1&&item.AssistType != 2 && item.AssistType != 4">
@click="getEditInfo(item)"></q-btn> <q-btn flat size="xs" icon="edit" color="accent" style="font-weight:400" label="修改"
<q-btn flat size="xs" icon="delete" color="negative" style="font-weight:400" label="删除" @click="getEditInfo(item)"></q-btn>
@click="deleteAssits(item.Id)" /> <q-btn flat size="xs" icon="delete" color="negative" style="font-weight:400" label="删除"
</div> @click="deleteAssits(item.Id)" />
</td> </div>
<td v-if="userInfo.IsCourseConsultant == 1"> <div v-if="isHaveTeacherEdit &&item.AssistType ==4">
<div v-if="item.AssistType != 2 && item.AssistType != 4"> <q-btn flat size="xs" icon="edit" color="accent" style="font-weight:400" label="修改"
<q-btn flat size="xs" icon="edit" color="accent" style="font-weight:400" label="修改" @click="getEditInfo(item)"></q-btn>
@click="getEditInfo(item)"></q-btn> <q-btn flat size="xs" icon="delete" color="negative" style="font-weight:400" label="删除"
<q-btn flat size="xs" icon="delete" color="negative" style="font-weight:400" label="删除" @click="deleteAssits(item.Id)" />
@click="deleteAssits(item.Id)" /> </div>
</div> <div v-if="isShowBian(item)">
<div v-if="isShowBian(item)"> <q-btn flat size="xs" icon="edit" color="accent" style="font-weight:400" label="修改"
<q-btn flat size="xs" icon="edit" color="accent" style="font-weight:400" label="修改" @click="getGuwenEditInfo(item)"></q-btn>
@click="getGuwenEditInfo(item)"></q-btn> </div>
</div> </template>
</td> </td>
</tr> </tr>
</table> </table>
...@@ -115,7 +105,9 @@ ...@@ -115,7 +105,9 @@
import { import {
queryEmployee queryEmployee
} from "../../../api/users/user"; } from "../../../api/users/user";
import { mapState } from "vuex"; import {
mapState
} from "vuex";
export default { export default {
meta: { meta: {
...@@ -148,7 +140,6 @@ ...@@ -148,7 +140,6 @@
dataList: [], dataList: [],
page_Count: 0, page_Count: 0,
AssistDropList: [], //下拉数据 AssistDropList: [], //下拉数据
AssistTeacherDropList:[],
RoleListData: [], //课程顾问下拉数据 RoleListData: [], //课程顾问下拉数据
employeeList: [], employeeList: [],
myEmployeeList: [], myEmployeeList: [],
...@@ -194,11 +185,18 @@ ...@@ -194,11 +185,18 @@
if (res.Code == 1) { if (res.Code == 1) {
let template = res.Data; let template = res.Data;
template.forEach(x => { template.forEach(x => {
if (x.Id != 1) { if (this.userInfo.IsCourseConsultant == 1 && this.isHaveTeacherEdit) {
this.AssistDropList.push(x); if (x.Id != 1) {
} this.AssistDropList.push(x);
if (x.Id ==4 ){ }
this.AssistTeacherDropList.push(x); } else if (this.userInfo.IsCourseConsultant == 1 && !this.isHaveTeacherEdit) {
if (x.Id != 1 && x.Id != 4) {
this.AssistDropList.push(x);
}
} else if (this.userInfo.IsCourseConsultant == 0 && this.isHaveTeacherEdit) {
if (x.Id == 4) {
this.AssistDropList.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