|
@@ -8,71 +8,36 @@
|
|
|
extend: treeData.children && treeData.children.length && treeData.isExtend,
|
|
|
}"
|
|
|
>
|
|
|
- <div :class="{ node: true, hasMate: treeData.mate }">
|
|
|
+ <div :class="{ node: true, hasMate: treeData.mate }" >
|
|
|
<div class="person" @click="$emit('click-node', treeData)">
|
|
|
- <!-- <el-popover v-if="false" placement="top" width="180" trigger="hover" > -->
|
|
|
- <el-popover
|
|
|
- v-if="
|
|
|
- !isDetail &&
|
|
|
- !(
|
|
|
- userInfo.roleType == '3' ||
|
|
|
- (userInfo.roleType == '4' && Number(treeData.level) === 2) ||
|
|
|
- (userInfo.roleType == '5' && Number(treeData.level) === 3)
|
|
|
- )
|
|
|
- "
|
|
|
- placement="top"
|
|
|
- width="180"
|
|
|
- trigger="hover"
|
|
|
- >
|
|
|
- <!-- v-if="treeData.isAdd && userInfo.roleType != '3'" -->
|
|
|
+ <el-popover v-if="!isDetail" placement="top" width="180" trigger="hover" >
|
|
|
+ <!-- v-if="treeData.level!==3" -->
|
|
|
+ <!-- v-if="treeData.isAdd" -->
|
|
|
<div style="margin: 0">
|
|
|
<el-button
|
|
|
size="mini"
|
|
|
type="primary"
|
|
|
@click="addStock(0)"
|
|
|
-
|
|
|
- v-if="
|
|
|
- !(
|
|
|
- userInfo.roleType == '3' ||
|
|
|
- (userInfo.roleType == '4' && Number(treeData.level) === 2) ||
|
|
|
- (userInfo.roleType == '4' && Number(treeData.level) === 3) ||
|
|
|
- (userInfo.roleType == '5' && Number(treeData.level) === 4)
|
|
|
- )
|
|
|
- "
|
|
|
+ v-if="!((userInfo.roleType == '4' && Number(treeData.level) === 2)||(userInfo.roleType == '5' && Number(treeData.level) === 3))"
|
|
|
>添加</el-button
|
|
|
>
|
|
|
<el-button
|
|
|
type="primary"
|
|
|
size="mini"
|
|
|
@click="addStock(1)"
|
|
|
- v-if="
|
|
|
- !(
|
|
|
- userInfo.roleType == '3' ||
|
|
|
- (userInfo.roleType == '4' && Number(treeData.level) === 2) ||
|
|
|
- (userInfo.roleType == '4' && Number(treeData.level) === 3) ||
|
|
|
- (userInfo.roleType == '5' && Number(treeData.level) === 4)
|
|
|
- )
|
|
|
- "
|
|
|
+ v-if="userInfo.roleType!='3'"
|
|
|
+
|
|
|
>编辑</el-button
|
|
|
>
|
|
|
<el-button
|
|
|
type="primary"
|
|
|
size="mini"
|
|
|
@click="deleteStock"
|
|
|
- v-if="
|
|
|
- !(
|
|
|
- userInfo.roleType == '3' ||
|
|
|
- (userInfo.roleType == '4' && Number(treeData.level) === 2)
|
|
|
- )
|
|
|
- "
|
|
|
+ v-if="userInfo.roleType!='3'"
|
|
|
+
|
|
|
>删除</el-button
|
|
|
>
|
|
|
- <span
|
|
|
- v-if="
|
|
|
- userInfo.roleType == '3' ||
|
|
|
- (userInfo.roleType == '4' && Number(treeData.level) === 2)
|
|
|
- "
|
|
|
- >
|
|
|
+ <span v-if="userInfo.roleType=='3'">
|
|
|
暂无权限
|
|
|
</span>
|
|
|
</div>
|
|
@@ -81,70 +46,19 @@
|
|
|
:class="{
|
|
|
parent: !treeData.level,
|
|
|
company: Number(treeData.level) === 1,
|
|
|
+
|
|
|
}"
|
|
|
slot="reference"
|
|
|
>
|
|
|
- <img
|
|
|
- v-show="Number(treeData.level) === 1"
|
|
|
- style="margin-bottom: 10px"
|
|
|
- src="../assets/img/group/gen.png"
|
|
|
- />
|
|
|
- <img
|
|
|
- v-show="Number(treeData.level) === 2"
|
|
|
- style="margin-bottom: 10px"
|
|
|
- src="../assets/img/group/er.png"
|
|
|
- />
|
|
|
- <span
|
|
|
- style="
|
|
|
- background-color: #edf7f2;
|
|
|
- padding: 10px;
|
|
|
- border-radius: 10px;
|
|
|
- display: flex;
|
|
|
- line-height: 30px;
|
|
|
- justify-content: center;
|
|
|
- "
|
|
|
- >
|
|
|
- {{ treeData.orgName }}
|
|
|
+ <!-- other: Number(treeData.level) === 3, -->
|
|
|
+ <img v-show="Number(treeData.level) === 1" style="margin-bottom: 10px;" src="../assets/img/group/gen.png" />
|
|
|
+ <img v-show="Number(treeData.level) === 2" style="margin-bottom: 10px;" src="../assets/img/group/er.png" />
|
|
|
+ <span style="background-color: #EDF7F2;padding:10px;border-radius: 10px;display:flex;line-height:30px;justify-content: center;">
|
|
|
+ {{ treeData.orgName }}
|
|
|
</span>
|
|
|
+
|
|
|
</div>
|
|
|
</el-popover>
|
|
|
- <div
|
|
|
- v-if="
|
|
|
- !isDetail &&
|
|
|
- (userInfo.roleType == '3' ||
|
|
|
- (userInfo.roleType == '4' && Number(treeData.level) === 2) ||
|
|
|
- (userInfo.roleType == '5' && Number(treeData.level) === 3))
|
|
|
- "
|
|
|
- class="avat"
|
|
|
- :class="{
|
|
|
- parent: !treeData.level,
|
|
|
- company: Number(treeData.level) === 1,
|
|
|
- }"
|
|
|
- slot="reference"
|
|
|
- >
|
|
|
- <img
|
|
|
- v-show="Number(treeData.level) === 1"
|
|
|
- style="margin-bottom: 10px"
|
|
|
- src="../assets/img/group/gen.png"
|
|
|
- />
|
|
|
- <img
|
|
|
- v-show="Number(treeData.level) === 2"
|
|
|
- style="margin-bottom: 10px"
|
|
|
- src="../assets/img/group/er.png"
|
|
|
- />
|
|
|
- <span
|
|
|
- style="
|
|
|
- background-color: #edf7f2;
|
|
|
- padding: 10px;
|
|
|
- border-radius: 10px;
|
|
|
- display: flex;
|
|
|
- line-height: 30px;
|
|
|
- justify-content: center;
|
|
|
- "
|
|
|
- >
|
|
|
- {{ treeData.orgName }}
|
|
|
- </span>
|
|
|
- </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div
|
|
@@ -188,7 +102,7 @@ export default {
|
|
|
data() {
|
|
|
return {
|
|
|
treeData: {},
|
|
|
- userInfo: {},
|
|
|
+ userInfo:{}
|
|
|
};
|
|
|
},
|
|
|
|
|
@@ -221,8 +135,8 @@ export default {
|
|
|
deep: true,
|
|
|
},
|
|
|
},
|
|
|
- mounted() {
|
|
|
- this.userInfo = JSON.parse(oSessionStorage.getItem("userInfo"));
|
|
|
+ mounted(){
|
|
|
+ this.userInfo=JSON.parse(oSessionStorage.getItem("userInfo"));
|
|
|
},
|
|
|
methods: {
|
|
|
toggleExtend(treeData) {
|