plg преди 1 месец
родител
ревизия
8e3349edc9
променени са 2 файла, в които са добавени 35 реда и са изтрити 118 реда
  1. 20 106
      src/components/TreeData.vue
  2. 15 12
      src/views/manage/channelInfo/orderSettlement.vue

+ 20 - 106
src/components/TreeData.vue

@@ -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) {

+ 15 - 12
src/views/manage/channelInfo/orderSettlement.vue

@@ -200,21 +200,24 @@ export default {
               //
               //先筛选出学院级别的数据
               let listYuan = [];
+              //去除教师组的结果------开始
               //取出来院的数据的方法
-              listYuan = this.filterYuan(res.data);
+              // listYuan = this.filterYuan(res.data);
      
-              //查看取出来院的
-              let allTotol = [];
-              //查询院下边的所属组织中包含届数的集合并去重
-              if (listYuan.length > 0) {
-                //
-                allTotol = this.filterGrade(listYuan, res.data);
-              } else {
-                //
-                allTotol = res.data;
-              }
+              // //查看取出来院的
+              // let allTotol = [];
+              // //查询院下边的所属组织中包含届数的集合并去重
+              // if (listYuan.length > 0) {
+              //   //
+              //   allTotol = this.filterGrade(listYuan, res.data);
+              // } else {
+              //   //
+              //   allTotol = res.data;
+              // }
 
-              let resAdd = this.addPro(allTotol);
+              // let resAdd = this.addPro(allTotol);
+                //去除教师组的结果------结束
+              let resAdd = this.addPro(res.data);
               this.ppData = JSON.parse(JSON.stringify(resAdd));
               let forRes = this.arrToTree(resAdd);