Browse Source

Merge branch '02/24resetMain' into test

mo 4 years ago
parent
commit
ea1e5bb798

+ 1 - 1
src/views/categroyManager/insideSetting/branchManager.vue

@@ -467,7 +467,7 @@ export default {
             organId: val,
             employeeRole: "EDUCATION",
           });
-          this.educationList = ruselt.data;
+          this.educationList = ruselt?.data?.EDUCATION;
         } catch (e) {
           console.log(e);
         }

+ 93 - 61
src/views/main/baseinfo/operate.vue

@@ -1,27 +1,56 @@
 <template>
-  <el-card >
-          <div slot="header" class="clearfix">
-        <div class="box">
-          <span class='shape'></span>
-          <span>运营数据</span>
-        </div>
-
+  <el-card>
+    <div slot="header" class="clearfix">
+      <div class="box">
+        <span class="shape"></span>
+        <span>运营数据</span>
       </div>
-             <div class="wall" style="height:68px;" v-if="JSON.stringify(items) == '{}'">
-         暂无数据
-       </div>
+    </div>
+    <div class="wall" style="height: 68px" v-if="JSON.stringify(items) == '{}'">
+      暂无数据
+    </div>
     <statistic class="statistic" :cols="0">
-      <statistic-item v-for="(item, key) in items" :key="key" :class="{active: active === key}" @click="active = key">
+      <statistic-item
+        v-for="(item, key) in items"
+        :key="key"
+        :class="{ active: active === key }"
+        @click="active = key"
+      >
         <span>
-          {{item.title+"(个)"}}
-          <el-tooltip v-if="item.desc" :content="item.desc" :open-delay=".3" placement="top">
-            <i style="margin-left: 5px;cursor: pointer;" class="el-icon-warning-outline"/>
+          {{ item.title + "(个)" }}
+          <el-tooltip
+            v-if="item.desc"
+            :content="item.desc"
+            :open-delay="0.3"
+            placement="top"
+          >
+            <i
+              style="margin-left: 5px; cursor: pointer"
+              class="el-icon-warning-outline"
+            />
           </el-tooltip>
         </span>
         <span>
-          <count-to :endVal="item.percent"/>
+          <count-to :endVal="item.percent" />
         </span>
       </statistic-item>
+      <statistic-item v-if="data['TRANSACTION_TEACHER_NUM']">
+        <span>
+          {{ data["TRANSACTION_TEACHER_NUM"].title + "(人)" }}
+          <el-tooltip
+            v-if="data['TRANSACTION_TEACHER_NUM'].desc"
+            :content="data['TRANSACTION_TEACHER_NUM'].desc"
+            :open-delay="0.3"
+            placement="top"
+          >
+            <i
+              style="margin-left: 5px; cursor: pointer"
+              class="el-icon-warning-outline"
+            />
+          </el-tooltip>
+        </span>
+        <span> <count-to :endVal="data['TRANSACTION_TEACHER_NUM'].percent" /></span>
+      </statistic-item>
     </statistic>
     <!-- <ve-histogram
       style="width: 100%;"
@@ -34,90 +63,93 @@
   </el-card>
 </template>
 <script>
-import 'echarts/lib/component/dataZoom'
-import countTo from 'vue-count-to'
-import veHistogram from 'v-charts/lib/histogram.common'
+import "echarts/lib/component/dataZoom";
+import countTo from "vue-count-to";
+import veHistogram from "v-charts/lib/histogram.common";
 export default {
-  props: ['data'],
+  props: ["data"],
   components: {
-    've-histogram': veHistogram,
-    'count-to': countTo
+    "ve-histogram": veHistogram,
+    "count-to": countTo,
   },
   computed: {
     items() {
-      let obj = {}
-      let arr = ["SCHOOL","PROGRESS_MUSIC_GROUP_NUM"]
-      arr.forEach(str=>{
-        if(this.data[str]){
-          obj[str]=this.data[str]
+      let obj = {};
+      let arr = [
+        "SCHOOL",
+        "PROGRESS_MUSIC_GROUP_NUM",
+      ];
+      arr.forEach((str) => {
+        if (this.data[str]) {
+          obj[str] = this.data[str];
         }
-      })
+      });
       /**
        * {
         SCHOOL: this.data['SCHOOL'] || {},
         PROGRESS_MUSIC_GROUP_NUM: this.data['PROGRESS_MUSIC_GROUP_NUM'] || {},
       }
        */
-      return obj
+      return obj;
     },
     chartExtend() {
       return {
         tooltip: {
           axisPointer: {
-            type: 'shadow',
+            type: "shadow",
             shadowStyle: {
-              color: 'rgba(150,150,150,0.2)'
-            }
-          }
-        }
-      }
+              color: "rgba(150,150,150,0.2)",
+            },
+          },
+        },
+      };
     },
     dataZoom() {
       return [
         {
-          type: 'slider',
+          type: "slider",
           start: 60,
-          end: 100
-        }
-      ]
+          end: 100,
+        },
+      ];
     },
     chartData() {
-      const values = Object.values(this.items)
-      const months = {}
+      const values = Object.values(this.items);
+      const months = {};
       for (const item of values) {
-        for (const row of (item.indexMonthData || [])) {
-          const key = this.$helpers.dayjs(row.month).format('YYYY-MM-DD')
+        for (const row of item.indexMonthData || []) {
+          const key = this.$helpers.dayjs(row.month).format("YYYY-MM-DD");
           if (!months[key]) {
             months[key] = {
-              '日期': key,
-            }
+              日期: key,
+            };
           }
-          months[key][item.title] = row.percent
+          months[key][item.title] = row.percent;
         }
       }
       return {
-        columns: ['日期', ...values.map(item => item.title)],
-        rows: Object.values(months)
-      }
+        columns: ["日期", ...values.map((item) => item.title)],
+        rows: Object.values(months),
+      };
     },
     dataEmpty() {
-      return !this.chartData.rows.length
+      return !this.chartData.rows.length;
     },
   },
-  data () {
+  data() {
     return {
-      active: 'SCHOOL',
-    }
+      active: "SCHOOL",
+    };
   },
-}
+};
 </script>
 <style lang="less" scoped>
-  // .statistic{
-  //   /deep/ .statistic-content{
-  //     cursor: pointer;
-  //     &.active > span{
-  //       color: #14928a !important;
-  //     }
-  //   }
-  // }
+// .statistic{
+//   /deep/ .statistic-content{
+//     cursor: pointer;
+//     &.active > span{
+//       color: #14928a !important;
+//     }
+//   }
+// }
 </style>

+ 43 - 57
src/views/teamBuild/components/teamBaseInfo.vue

@@ -181,6 +181,26 @@
             </el-option>
           </el-select>
         </el-form-item>
+        <el-form-item label="衔接老师" prop="transactionTeacherId">
+          <el-select
+            v-model.trim="topFrom.transactionTeacherId"
+            :disabled="!topFrom.section || basdisabled"
+            filterable
+            clearable
+          >
+            <el-option
+              v-for="item in transactionList"
+              :key="item.userId"
+              :label="item.realName"
+              :value="item.userId"
+            >
+              <span style="float: left">{{ item.realName }}</span>
+              <span style="float: right; color: #8492a6; font-size: 13px">{{
+                String(item.userId)
+              }}</span>
+            </el-option>
+          </el-select>
+        </el-form-item>
 
         <el-form-item label="维修技师" prop="repairUserId">
           <el-select
@@ -244,45 +264,6 @@
             placeholder="选择日期"
           ></el-date-picker>
         </el-form-item>
-        <!-- <el-form-item label="招生年级" v-if="basdisabled">
-          <el-input
-            placeholder="请输入招生年级"
-            v-model.trim="startClassString"
-            :disabled="basdisabled"
-          ></el-input> -->
-        <!-- <el-tooltip
-            class="item"
-            effect="dark"
-            :content="startClassString"
-            placement="top-start"
-          >
-            <div style="width: 180px; overflow: hidden">
-              {{ startClassString }}
-            </div>
-          </el-tooltip> -->
-        <!-- </el-form-item> -->
-        <!-- <el-form-item
-          label="招生年级"
-          v-else
-          prop="startClass"
-          :rules="[{ required: true, message: '请选择招生年纪' }]"
-        >
-          <el-select
-            placeholder="起始年级"
-            clearable
-            multiple
-            collapse-tags
-            filterable
-            v-model.trim="topFrom.startClass"
-          >
-            <el-option
-              v-for="item in classStatus"
-              :value="item.value"
-              :label="item.label"
-              :key="item.value"
-            ></el-option>
-          </el-select>
-        </el-form-item> -->
         <el-form-item
           label="课酬结算标准"
           :rules="[{ required: true, message: '请选择课酬结算标准' }]"
@@ -425,6 +406,7 @@ export default {
         paymentValidEndDate: null, // 缴费有效期结束
         ownershipType: "OWN", // 合作机构类型
         repairUserId: null, // 维修技师
+        transactionTeacherId:null, // 衔接老师
       },
       baseInfo: {},
       money: 580,
@@ -438,6 +420,7 @@ export default {
       teacherList: [], // 获取老师列表
       educationList: [], // 乐团主管
       bossList: [],
+      transactionList: [],
       addList: [], // 教学地点列表
       activeTeam: [],
       teamid: "",
@@ -724,22 +707,23 @@ export default {
       try {
         const ruselt = await findUserByRole({
           organId: val,
-          employeeRole: "EDUCATION",
         });
-        this.educationList = ruselt.data;
+        this.educationList = ruselt?.data?.EDUCATION;
+        this.bossList = ruselt?.data?.TEAM_TEACHER;
+        this.transactionList = ruselt?.data?.TRANSACTION;
       } catch (e) {
         console.log(e);
       }
       // 获取运营主管
-      try {
-        const ruselt = await findUserByRole({
-          organId: val,
-          employeeRole: "TEAM_TEACHER",
-        });
-        this.bossList = ruselt.data;
-      } catch (e) {
-        console.log(e);
-      }
+      // try {
+      //   const ruselt = await findUserByRole({
+      //     organId: val,
+      //     employeeRole: "TEAM_TEACHER",
+      //   });
+      //   this.bossList = ruselt.data;
+      // } catch (e) {
+      //   console.log(e);
+      // }
       // 获取指导老师
       getTeacher({ organId: val }).then((res) => {
         if (res.code == 200) {
@@ -749,15 +733,15 @@ export default {
     },
     chioseSchool(val) {
       // 清除教学点
-      this.topFrom.teacher = ''
-      if(val){
-        this.cooperationList.forEach(item=>{
-          if(item.id == val){
-              this.topFrom.teacher = item.educationUserId
+      this.topFrom.teacher = "";
+      if (val) {
+        this.cooperationList.forEach((item) => {
+          if (item.id == val) {
+            this.topFrom.teacher = item.educationUserId;
           }
-        })
+        });
       }
-      console.log(val)
+      console.log(val);
     },
     async gotoNext(str) {
       let tempStatus;
@@ -848,6 +832,7 @@ export default {
               ownershipType: this.topFrom.ownershipType,
               repairUserId: this.topFrom.repairUserId || null,
               feeType: this.topFrom.feeType,
+              transactionTeacherId:this.topFrom.transactionTeacherId
             };
             // obj.musicGroupPaymentEntities = [];
             // createTeam
@@ -1199,6 +1184,7 @@ export default {
         : null;
       this.paymentExpireDate = res.data.musicGroup.paymentExpireDate;
       this.applyExpireDate = res.data.musicGroup.applyExpireDate;
+      this.topFrom.transactionTeacherId = res.data.musicGroup.transactionTeacherId
       localStorage.setItem(`${this.teamid}base`, JSON.stringify(this.topFrom));
     },
     changeType(val) {