|
@@ -34,7 +34,7 @@
|
|
</div>
|
|
</div>
|
|
<el-tabs v-if=" currentDoc && currentDoc.teams.length > 0 " v-model="activeTeam" type="border-card" closable @tab-remove="removeTeam" v-loading="contentLoading">
|
|
<el-tabs v-if=" currentDoc && currentDoc.teams.length > 0 " v-model="activeTeam" type="border-card" closable @tab-remove="removeTeam" v-loading="contentLoading">
|
|
<el-tab-pane v-for="(team,index) in currentDoc.teams" :key="index" :name="index.toString()" :label="team.name" >
|
|
<el-tab-pane v-for="(team,index) in currentDoc.teams" :key="index" :name="index.toString()" :label="team.name" >
|
|
- <el-table :data="team.employees" v-if="activeTeam == index.toString()"> <!--v-if="activeTeam == index.toString()"防止标签切换抖动-->
|
|
|
|
|
|
+ <el-table :data="team.employees" v-if="activeTeam === index.toString()"> <!--v-if="activeTeam == index.toString()"防止标签切换抖动-->
|
|
<el-table-column label="员工" align="left" width="200">
|
|
<el-table-column label="员工" align="left" width="200">
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
<userImage class="fl" :id="scope.row.id" :user_name="scope.row.name" :img_url="scope.row.img_url" width="50px" height="50px"></userImage>
|
|
<userImage class="fl" :id="scope.row.id" :user_name="scope.row.name" :img_url="scope.row.img_url" width="50px" height="50px"></userImage>
|
|
@@ -226,7 +226,7 @@ export default {
|
|
contentLoading: false,
|
|
contentLoading: false,
|
|
currentDoc: null,
|
|
currentDoc: null,
|
|
currentTeam: null,
|
|
currentTeam: null,
|
|
- activeTeam: 0,
|
|
|
|
|
|
+ activeTeam: "0",
|
|
docList: [],
|
|
docList: [],
|
|
isUpdateDoc: false,
|
|
isUpdateDoc: false,
|
|
isUpdateTeam: false,
|
|
isUpdateTeam: false,
|
|
@@ -443,7 +443,7 @@ export default {
|
|
this.$axiosUser('get','/api/pro/pk/doc/info',{doc_id:doc.id})
|
|
this.$axiosUser('get','/api/pro/pk/doc/info',{doc_id:doc.id})
|
|
.then(res => {
|
|
.then(res => {
|
|
this.currentDoc = res.data.data;
|
|
this.currentDoc = res.data.data;
|
|
- this.activeTeam = 0; //只能在这里设置不能在开头初始化
|
|
|
|
|
|
+ this.activeTeam = "0"; //只能在这里设置不能在开头初始化
|
|
if (this.currentDoc.teams.length > 0) this.currentTeam = this.currentDoc.teams[0];
|
|
if (this.currentDoc.teams.length > 0) this.currentTeam = this.currentDoc.teams[0];
|
|
})
|
|
})
|
|
.finally(() => {
|
|
.finally(() => {
|