Forráskód Böngészése

乐团主管提交

1
mo 4 éve
szülő
commit
07a948a883

+ 1 - 1
src/api/buildTeam.js

@@ -1539,7 +1539,7 @@ export function updateStudentInstrument(data) {
   })
 }
 
-// 获取对应角色的员工
+// 获取
 
 export function findUserByRole(data) {
   return request2({

+ 322 - 228
src/views/categroyManager/insideSetting/branchManager.vue

@@ -1,98 +1,103 @@
 <template>
-  <div class='m-container'>
+  <div class="m-container">
     <h2>
-      <div class="squrt"></div>合作单位
+      <div class="squrt"></div>
+      合作单位
     </h2>
     <div class="m-core">
       <!-- 搜索类型 -->
-      <save-form :inline="true"
-               class="searchForm"
-               @submit="search"
-               @reset="onReSet"
-               :model="searchForm">
+      <save-form
+        :inline="true"
+        class="searchForm"
+        @submit="search"
+        @reset="onReSet"
+        :model="searchForm"
+      >
         <el-form-item>
-          <el-input v-model="searchForm.search" clearable
-                    placeholder="请输入合作单位名称"></el-input>
+          <el-input
+            v-model="searchForm.search"
+            clearable
+            placeholder="请输入合作单位名称"
+          ></el-input>
         </el-form-item>
         <el-form-item>
-          <el-select v-model.trim="searchForm.organId"
-                     placeholder="请选择分部"
-                     filterable
-                     clearable>
-            <el-option v-for="item in selects.branchs"
-                       :key="item.id"
-                       :label="item.name"
-                       :value="item.id"></el-option>
+          <el-select
+            v-model.trim="searchForm.organId"
+            placeholder="请选择分部"
+            filterable
+            clearable
+          >
+            <el-option
+              v-for="item in selects.branchs"
+              :key="item.id"
+              :label="item.name"
+              :value="item.id"
+            ></el-option>
           </el-select>
         </el-form-item>
         <el-form-item>
-          <el-select v-model.trim="searchForm.isEnable"
-                     placeholder="请选择状态"
-                     filterable
-                     clearable>
-            <el-option label="开启"
-                       :value="true"></el-option>
-            <el-option label="关闭"
-                       :value="false"></el-option>
+          <el-select
+            v-model.trim="searchForm.isEnable"
+            placeholder="请选择状态"
+            filterable
+            clearable
+          >
+            <el-option label="开启" :value="true"></el-option>
+            <el-option label="关闭" :value="false"></el-option>
           </el-select>
         </el-form-item>
         <el-form-item>
           <el-button native-type="submit" type="danger">搜索</el-button>
           <el-button native-type="reset" type="primary">重置</el-button>
           <!-- export/isSettlementCourseSalarys  -->
-          <el-button @click="onExport"
-                     v-permission="'export/cooperationOrgan'"
-                     type="primary">导出</el-button>
+          <el-button
+            @click="onExport"
+            v-permission="'export/cooperationOrgan'"
+            type="primary"
+            >导出</el-button
+          >
         </el-form-item>
       </save-form>
-      <div @click="openTeaching('create')"
-           v-permission="'cooperationOrgan/add'"
-           class='newBand'>新建</div>
+      <div
+        @click="openTeaching('create')"
+        v-permission="'cooperationOrgan/add'"
+        class="newBand"
+      >
+        新建
+      </div>
 
       <!-- 列表 -->
       <div class="tableWrap">
-        <el-table :data='tableList'
-                  :header-cell-style="{background:'#EDEEF0',color:'#444'}">
-          <el-table-column align='center'
-                           prop='id'
-                           label="单位编号">
+        <el-table
+          :data="tableList"
+          :header-cell-style="{ background: '#EDEEF0', color: '#444' }"
+        >
+          <el-table-column align="center" prop="id" label="单位编号">
           </el-table-column>
-          <el-table-column align='center'
-                           prop='name'
-                           label="单位名称">
+          <el-table-column align="center" prop="name" label="单位名称">
           </el-table-column>
-          <el-table-column align='center'
-                           prop='name'
-                           label="所属分部">
+          <el-table-column align="center" prop="name" label="所属分部">
             <template slot-scope="scope">
               <div>
                 {{ scope.row.organization.name }}
               </div>
             </template>
           </el-table-column>
-          <el-table-column align='center'
-                           prop='linkman'
-                           label="联系人">
+          <el-table-column align="center" prop="linkman" label="联系人">
           </el-table-column>
-          <el-table-column align='center'
-                           prop='job'
-                           label="职位">
+          <el-table-column align="center" prop="job" label="职位">
           </el-table-column>
-          <el-table-column align='center'
-                           prop='mobileNo'
-                           label="手机号">
+          <el-table-column align="center" prop="mobileNo" label="手机号">
           </el-table-column>
-          <el-table-column align='center'
-                           label="是否全职资源">
+          <el-table-column align="center" label="是否全职资源">
             <template slot-scope="scope">
-              {{ scope.row.fullJobResource ? '是' : '否' }}
+              {{ scope.row.fullJobResource ? "是" : "否" }}
             </template>
           </el-table-column>
-          <el-table-column align='center'
-                           label="状态">
+          <el-table-column align="center" label="状态">
             <template slot-scope="scope">
               <div>
-                {{scope.row.isEnable?'开启':'关闭'}}
+                {{ scope.row.isEnable ? "开启" : "关闭" }}
               </div>
             </template>
           </el-table-column>
@@ -102,288 +107,377 @@
               {{ scope.row.ownershipType | branchType }}
             </template>
           </el-table-column> -->
-          <el-table-column align='center'
-                           label="操作"
-                           width='100'>
+          <el-table-column align="center" label="操作" width="100">
             <template slot-scope="scope">
-              <el-button @click="openTeaching('update', scope.row)"
-                         v-permission="'cooperationOrgan/update'"
-                         type="text">修改</el-button>
-              <el-button @click="onDelete(scope.row)"
-                         v-permission="'cooperationOrgan/del'"
-                         type="text">删除</el-button>
+              <el-button
+                @click="openTeaching('update', scope.row)"
+                v-permission="'cooperationOrgan/update'"
+                type="text"
+                >修改</el-button
+              >
+              <el-button
+                @click="onDelete(scope.row)"
+                v-permission="'cooperationOrgan/del'"
+                type="text"
+                >删除</el-button
+              >
             </template>
           </el-table-column>
         </el-table>
-        <pagination sync :total.sync="pageInfo.total"
-                    :page.sync="pageInfo.page"
-                    :limit.sync="pageInfo.limit"
-                    :page-sizes="pageInfo.page_size"
-                    @pagination="getList" />
+        <pagination
+          sync
+          :total.sync="pageInfo.total"
+          :page.sync="pageInfo.page"
+          :limit.sync="pageInfo.limit"
+          :page-sizes="pageInfo.page_size"
+          @pagination="getList"
+        />
       </div>
     </div>
 
-    <el-dialog :title="formTitle[formActionTitle]"
-               :visible.sync="teachingStatus"
-               @close="onFormClose('ruleForm')"
-               width="500px">
-      <el-form :model="form"
-               :rules="rules"
-               ref="ruleForm">
-        <el-form-item label="单位名称"
-                      prop="name"
-                      :label-width="formLabelWidth">
-          <el-input v-model.trim="form.name"
-                    autocomplete="off"></el-input>
+    <el-dialog
+      :title="formTitle[formActionTitle]"
+      :visible.sync="teachingStatus"
+      @close="onFormClose('ruleForm')"
+      width="500px"
+    >
+      <el-form :model="form" :rules="rules" ref="ruleForm">
+        <el-form-item
+          label="单位名称"
+          prop="name"
+          :label-width="formLabelWidth"
+        >
+          <el-input v-model.trim="form.name" autocomplete="off"></el-input>
+        </el-form-item>
+        <el-form-item
+          label="所属分部"
+          prop="organId"
+          :label-width="formLabelWidth"
+        >
+          <el-select
+            v-model.trim="form.organId"
+            @change="changeOrgan"
+            filterable
+            clearable
+          >
+            <el-option
+              v-for="item in selects.branchs"
+              :key="item.id"
+              :label="item.name"
+              :value="item.id"
+            ></el-option>
+          </el-select>
         </el-form-item>
-        <el-form-item label="所属分部"
-                      prop="organId"
-                      :label-width="formLabelWidth">
-          <el-select v-model.trim="form.organId"
-                     filterable
-                     clearable>
-            <el-option v-for="item in selects.branchs"
-                       :key="item.id"
-                       :label="item.name"
-                       :value="item.id"></el-option>
+          <el-form-item
+          label="乐团主管"
+          prop="educationUserId"
+          :label-width="formLabelWidth"
+          :rules="[{ required: true, message: '乐团主管不能为空' }]"
+        >
+          <el-select
+          :disabled="!form.organId"
+            v-model.trim="form.educationUserId"
+            filterable
+            clearable
+          >
+            <el-option
+              v-for="(item, index) in educationList"
+              :key="index"
+              :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="isEnable"
-                      :label-width="formLabelWidth">
-          <el-select v-model.trim="form.isEnable"
-                     filterable
-                     clearable>
-            <el-option label="开启"
-                       :value="true"></el-option>
-            <el-option label="关闭"
-                       :value="false"></el-option>
+        <el-form-item
+          label="状态"
+          prop="isEnable"
+          :label-width="formLabelWidth"
+        >
+          <el-select v-model.trim="form.isEnable" filterable clearable>
+            <el-option label="开启" :value="true"></el-option>
+            <el-option label="关闭" :value="false"></el-option>
           </el-select>
         </el-form-item>
-        <el-form-item label="联系人"
-                      prop="linkman"
-                      :label-width="formLabelWidth">
-          <el-input v-model.trim="form.linkman"
-                    autocomplete="off"></el-input>
+        <el-form-item
+          label="联系人"
+          prop="linkman"
+          :label-width="formLabelWidth"
+        >
+          <el-input v-model.trim="form.linkman" autocomplete="off"></el-input>
         </el-form-item>
-        <el-form-item label="职位"
-                      prop="job"
-                      :label-width="formLabelWidth">
-          <el-input v-model.trim="form.job"
-                    autocomplete="off"></el-input>
+        <el-form-item label="职位" prop="job" :label-width="formLabelWidth">
+          <el-input v-model.trim="form.job" autocomplete="off"></el-input>
         </el-form-item>
-        <el-form-item label="手机号"
-                      prop="mobileNo"
-                      :label-width="formLabelWidth">
-          <el-input v-model.trim="form.mobileNo"
-                    autocomplete="off"></el-input>
+        <el-form-item
+          label="手机号"
+          prop="mobileNo"
+          :label-width="formLabelWidth"
+        >
+          <el-input v-model.trim="form.mobileNo" autocomplete="off"></el-input>
         </el-form-item>
-        <el-form-item label="是否全职资源"
-                      prop="fullJobResource"
-                      :label-width="formLabelWidth">
+        <el-form-item
+          label="是否全职资源"
+          prop="fullJobResource"
+          :label-width="formLabelWidth"
+        >
           <el-select v-model.trim="form.fullJobResource">
-            <el-option label="是"
-                       :value="1"></el-option>
-            <el-option label="否"
-                       :value="0"></el-option>
+            <el-option label="是" :value="1"></el-option>
+            <el-option label="否" :value="0"></el-option>
           </el-select>
         </el-form-item>
       </el-form>
-      <span slot="footer"
-            class="dialog-footer">
+      <span slot="footer" class="dialog-footer">
         <el-button @click="teachingStatus = false">取 消</el-button>
-        <el-button type="primary"
-                   @click="onTeachingSubmit('ruleForm')">确 定</el-button>
+        <el-button type="primary" @click="onTeachingSubmit('ruleForm')"
+          >确 定</el-button
+        >
       </span>
     </el-dialog>
   </div>
 </template>
 <script>
-import pagination from '@/components/Pagination/index'
-import { cooperationOrganAdd, cooperationOrganUpdate, cooperationOrganDel, queryPage } from '@/api/systemManage'
-import cleanDeep from 'clean-deep'
-import { isvalidPhone } from '@/utils/validate'
-import { Export } from '@/utils/downLoadFile'
+import pagination from "@/components/Pagination/index";
+import {
+  cooperationOrganAdd,
+  cooperationOrganUpdate,
+  cooperationOrganDel,
+  queryPage,
+} from "@/api/systemManage";
+import cleanDeep from "clean-deep";
+import { isvalidPhone } from "@/utils/validate";
+import { Export } from "@/utils/downLoadFile";
+import { findUserByRole } from "@/api/buildTeam";
+
 import qs from "qs";
 let validPhone = (rule, value, callback) => {
   if (!value) {
-    callback(new Error('请输入电话号码'))
+    callback(new Error("请输入电话号码"));
   } else if (!isvalidPhone(value)) {
-    callback(new Error('请输入正确的11位手机号码'))
+    callback(new Error("请输入正确的11位手机号码"));
   } else {
-    callback()
+    callback();
   }
-}
+};
 export default {
-  name: 'branchManager',
+  name: "branchManager",
   components: { pagination },
-  data () {
+  data() {
     return {
       searchForm: {
         organId: null,
         isEnable: null,
-        search: null
+        search: null,
       },
       searchLsit: [],
       tableList: [],
+      educationList: [],
       pageInfo: {
         // 分页规则
         limit: 10, // 限制显示条数
         page: 1, // 当前页
         total: 0, // 总条数
-        page_size: [10, 20, 40, 50] // 选择限制显示条数
+        page_size: [10, 20, 40, 50], // 选择限制显示条数
       },
       teachingStatus: false, // 添加教学点
-      formActionTitle: 'create',
+      formActionTitle: "create",
       formTitle: {
-        create: '添加合作单位',
-        update: '修改合作单位'
+        create: "添加合作单位",
+        update: "修改合作单位",
       },
-      formLabelWidth: '120px',
+      formLabelWidth: "120px",
       form: {
         id: null,
         name: null, // 教学点名称
         linkman: null, // 来源
-        job: null,  // 费用
+        job: null, // 费用
         mobileNo: null,
         fullJobResource: null,
-        organId: null
+        organId: null,
+        educationUserId: null,
       },
       rules: {
-        name: [{ required: true, message: '请输入教学点名称', trigger: 'blur' }],
-        linkman: [{ required: true, message: '请输入联系人', trigger: 'blur' }],
-        job: [{ required: true, message: '请输入职位', trigger: 'blur' }],
-        mobileNo: [{ required: true, validator: validPhone, trigger: 'blur' }, , { pattern: /^1[3456789]\d{9}$/, message: '请输入正确的手机号', trigger: 'blur' }],
-        organId: [{ required: true, message: '请选择所属分部', trigger: 'change' }],
-        fullJobResource: [{ required: true, message: '请选择是否全职资源', trigger: 'change' }],
-        isEnable: [{ required: true, message: '请选择状态', trigger: 'change' }]
+        name: [
+          { required: true, message: "请输入教学点名称", trigger: "blur" },
+        ],
+        linkman: [{ required: true, message: "请输入联系人", trigger: "blur" }],
+        job: [{ required: true, message: "请输入职位", trigger: "blur" }],
+        mobileNo: [
+          { required: true, validator: validPhone, trigger: "blur" },
+          ,
+          {
+            pattern: /^1[3456789]\d{9}$/,
+            message: "请输入正确的手机号",
+            trigger: "blur",
+          },
+        ],
+        organId: [
+          { required: true, message: "请选择所属分部", trigger: "change" },
+        ],
+        educationUserId: [
+          { required: true, message: "请选择乐团主管", trigger: "change" },
+        ],
+        fullJobResource: [
+          { required: true, message: "请选择是否全职资源", trigger: "change" },
+        ],
+        isEnable: [
+          { required: true, message: "请选择状态", trigger: "change" },
+        ],
       },
-
-    }
+    };
   },
-  mounted () {
-    this.getList() // 获取列表数据
+  mounted() {
+    this.getList(); // 获取列表数据
 
     // 获取当前用户分部
-    this.$store.dispatch('setBranchs')
+    this.$store.dispatch("setBranchs");
   },
   methods: {
-    onDelete (rows) {
-      this.$confirm('您确定删除合作单位?', '提示', {
-        confirmButtonText: '确定',
-        cancelButtonText: '取消',
-        type: 'warning'
-      }).then(() => {
-        cooperationOrganDel(rows.id).then(res => {
-          if (res.code == 200) {
-            this.$message.success('删除成功')
-            this.teachingStatus = false
-            this.getList()
-          } else {
-            this.$message.error(res.msg)
-          }
+    onDelete(rows) {
+      this.$confirm("您确定删除合作单位?", "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+      })
+        .then(() => {
+          cooperationOrganDel(rows.id).then((res) => {
+            if (res.code == 200) {
+              this.$message.success("删除成功");
+              this.teachingStatus = false;
+              this.getList();
+            } else {
+              this.$message.error(res.msg);
+            }
+          });
         })
-      }).catch(() => { });
-
+        .catch(() => {});
     },
-    search () {
+    search() {
       this.pageInfo.page = 1;
-      this.getList()
+      this.getList();
     },
-    onReSet () {
+    onReSet() {
       this.searchForm = {
         organId: null,
-        isEnable: null
-      }
-      this.search()
+        isEnable: null,
+      };
+      this.search();
     },
-    onExport () {
-      Export(this, {
-        url: '/api-web/export/cooperationOrgan',
-        fileName: '合作单位.xls',
-        method: 'post',
-        params: qs.stringify(cleanDeep(this.searchForm))
-      }, '您确定导出合作单位?')
+    onExport() {
+      Export(
+        this,
+        {
+          url: "/api-web/export/cooperationOrgan",
+          fileName: "合作单位.xls",
+          method: "post",
+          params: qs.stringify(cleanDeep(this.searchForm)),
+        },
+        "您确定导出合作单位?"
+      );
     },
-    onTeachingSubmit (formName) { // 添加数据
+    onTeachingSubmit(formName) {
+      // 添加数据
       this.$refs[formName].validate((valid) => {
         if (valid) {
-          if (this.formActionTitle == 'create') {
-            if (this.form.id) { // 判断有没有Id,如果有则删除
-              delete this.form.id
+          if (this.formActionTitle == "create") {
+            if (this.form.id) {
+              // 判断有没有Id,如果有则删除
+              delete this.form.id;
             }
-            cooperationOrganAdd(this.form).then(res => {
+            cooperationOrganAdd(this.form).then((res) => {
               if (res.code == 200) {
-                this.$message.success('创建成功')
-                this.teachingStatus = false
-                this.getList()
+                this.$message.success("创建成功");
+                this.teachingStatus = false;
+                this.getList();
               } else {
-                this.$message.error(res.msg)
+                this.$message.error(res.msg);
               }
-            })
-          } else if (this.formActionTitle == 'update') {
-            cooperationOrganUpdate(this.form).then(res => {
+            });
+          } else if (this.formActionTitle == "update") {
+            cooperationOrganUpdate(this.form).then((res) => {
               if (res.code == 200) {
-                this.$message.success('修改成功')
-                this.teachingStatus = false
-                this.getList()
+                this.$message.success("修改成功");
+                this.teachingStatus = false;
+                this.getList();
               } else {
-                this.$message.error(res.msg)
+                this.$message.error(res.msg);
               }
-            })
+            });
           }
         } else {
           return false;
         }
-      })
+      });
     },
-    getList () {
+    getList() {
       queryPage({
         rows: this.pageInfo.limit,
         page: this.pageInfo.page,
-        ...this.searchForm
-      }).then(res => {
+        ...this.searchForm,
+      }).then((res) => {
         if (res.code == 200 && res.data) {
-          this.tableList = res.data.rows
-          this.pageInfo.total = res.data.total
+          this.tableList = res.data.rows;
+          this.pageInfo.total = res.data.total;
         }
-      })
+      });
     },
-    openTeaching (type, rows) {
+    openTeaching(type, rows) {
       // 重置数据
-      this.teachingStatus = true
-      this.formActionTitle = type
+      this.teachingStatus = true;
+      this.formActionTitle = type;
+      this.changeOrgan(rows.organId)
       // 修改的时候赋值
-      if (type == 'update') {
+      if (type == "update") {
         this.form = {
           id: rows.id,
           name: rows.name, // 教学点名称
           linkman: rows.linkman, // 来源
-          job: rows.job,  // 费用
+          job: rows.job, // 费用
           mobileNo: rows.mobileNo ? rows.mobileNo : null,
           ownershipType: rows.ownershipType,
           organId: rows.organId,
           fullJobResource: rows.fullJobResource,
-          isEnable: rows.isEnable
-        }
+          isEnable: rows.isEnable,
+          educationUserId:rows.educationUserId
+        };
       }
     },
-    onFormClose (formName) { // 关闭弹窗重置验证
+    onFormClose(formName) {
+      // 关闭弹窗重置验证
       // this.$refs[formName].clearValidate()
       this.form = {
         id: null,
         name: null, // 教学点名称
         linkman: null, // 来源
-        job: null,  // 费用
+        job: null, // 费用
         mobileNo: null,
         fullJobResource: null,
         organId: null,
-        isEnable: null
+        isEnable: null,
+        educationUserId:null
+      };
+      this.$refs[formName].resetFields();
+    },
+    async changeOrgan(val) {
+      this.form.educationUserId = null;
+      if (val) {
+        try {
+          const ruselt = await findUserByRole({
+            organId: val,
+            employeeRole: "EDUCATION",
+          });
+          this.educationList = ruselt.data;
+        } catch (e) {
+          console.log(e);
+        }
       }
-      this.$refs[formName].resetFields()
-    }
-  }
-}
+    },
+  },
+};
 </script>
 <style lang="scss" scoped>
 .el-button--primary {
@@ -407,4 +501,4 @@ export default {
   margin-top: 10px;
   z-index: 99999 !important;
 }
-</style>
+</style>

+ 230 - 217
src/views/teamBuild/components/teamBaseInfo.vue

@@ -89,6 +89,30 @@
           </el-select>
         </el-form-item>
         <el-form-item
+          label="乐团主管"
+          prop="teacher"
+          :rules="[{ required: true, message: '乐团主管不能为空' }]"
+        >
+          <el-select
+            v-model.trim="topFrom.teacher"
+            :disabled="true"
+            filterable
+            clearable
+          >
+            <el-option
+              v-for="(item, index) in educationList"
+              :key="index"
+              :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="address"
           :rules="[{ required: true, message: '教学地点不能为空' }]"
@@ -149,37 +173,14 @@
               :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="teacher"
-          :rules="[{ required: true, message: '乐团主管不能为空' }]"
-        >
-          <el-select
-            v-model.trim="topFrom.teacher"
-            :disabled="!topFrom.section || basdisabled"
-            filterable
-            clearable
-          >
-            <el-option
-              v-for="(item, index) in educationList"
-              :key="index"
-              :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>
+              <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
             v-model.trim="topFrom.repairUserId"
@@ -193,10 +194,10 @@
               :label="item.userName"
               :value="item.userId"
             >
-                         <span style="float: left">{{ item.realName }}</span>
-            <span style="float: right; color: #8492a6; font-size: 13px">{{
-              String(item.userId)
-            }}</span>
+              <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>
@@ -322,10 +323,10 @@
               :label="item.realName"
               :value="item.id"
             >
-                         <span style="float: left">{{ item.realName }}</span>
-            <span style="float: right; color: #8492a6; font-size: 13px">{{
-              String(item.id)
-            }}</span>
+              <span style="float: left">{{ item.realName }}</span>
+              <span style="float: right; color: #8492a6; font-size: 13px">{{
+                String(item.id)
+              }}</span>
             </el-option>
           </el-select>
         </el-form-item>
@@ -538,36 +539,36 @@ export default {
             confirmButtonText: "是",
             cancelButtonText: "否",
             type: "warning",
-            closeOnClickModal:false,
-            distinguishCancelAndClose:true
+            closeOnClickModal: false,
+            distinguishCancelAndClose: true,
           })
             .then(async () => {
               // localStorage.setItem(
               //   `${this.teamid}base`,
               //   JSON.stringify(this.topFrom)
               // );
-              let b =  await this.gotoNext(str)
-              console.log(b)
+              let b = await this.gotoNext(str);
+              console.log(b);
               return b;
             })
             .catch((e) => {
-              console.log(e)
-              if(e == 'close'){
-                return false
-              }else{
-                    localStorage.removeItem(`${this.teamid}base`)
-              return true
+              console.log(e);
+              if (e == "close") {
+                return false;
+              } else {
+                localStorage.removeItem(`${this.teamid}base`);
+                return true;
               }
 
               // localStorage.setItem(`${this.teamid}base`,JSON.stringify(this.topFrom));
-            })
+            });
         } else {
-          return true
+          return true;
           // localStorage.setItem(`${this.teamid}base`,JSON.stringify(this.topFrom));
         }
       } else {
         localStorage.setItem(`newTeambase`, JSON.stringify(this.topFrom));
-         return true
+        return true;
       }
     },
     //|| this.teamStatus === 'teamAudit'
@@ -745,184 +746,196 @@ export default {
         }
       });
     },
-    chioseSchool(val) {},
+    chioseSchool(val) {
+      // 清除教学点
+      this.topFrom.teacher = ''
+      if(val){
+        this.cooperationList.forEach(item=>{
+          if(item.id == val){
+              this.topFrom.teacher = item.educationUserId
+          }
+        })
+      }
+      console.log(val)
+    },
     async gotoNext(str) {
-      let tempStatus
-    return new Promise((resolve, reject)=>{
-       this.$refs["topinfo"].validate(async (valid, object) => {
-        if (!valid) {
-          this.$message.error("请填写建团必要参数");
-          // return false
-         resolve(false)
-        } else {
-          // 判断一下是否勾选了课程类型而没有输入金额
-          // 验证通过
-          this.$store.dispatch("topinfo", this.topFrom);
-          if (this.teamStatus == "teamAudit") {
-            // 获取数据提交
-            this.$emit("handleClick", { name: "2" });
+      let tempStatus;
+      return new Promise((resolve, reject) => {
+        this.$refs["topinfo"].validate(async (valid, object) => {
+          if (!valid) {
+            this.$message.error("请填写建团必要参数");
+            // return false
+            resolve(false);
           } else {
-               this.$emit("getName", this.topFrom.name);
-
-               tempStatus = await this.resetSubmit(str);
-               console.log(tempStatus,'tempStatus')
-           resolve(tempStatus)
+            // 判断一下是否勾选了课程类型而没有输入金额
+            // 验证通过
+            this.$store.dispatch("topinfo", this.topFrom);
+            if (this.teamStatus == "teamAudit") {
+              // 获取数据提交
+              this.$emit("handleClick", { name: "2" });
+            } else {
+              this.$emit("getName", this.topFrom.name);
 
+              tempStatus = await this.resetSubmit(str);
+              console.log(tempStatus, "tempStatus");
+              resolve(tempStatus);
+            }
           }
-        }
+        });
       });
-    })
     },
     async resetSubmit(str) {
-      return new Promise((resolve, reject)=>{
-           this.$refs["topinfo"].validate(async (valid, object) => {
-        if (!valid) {
-          this.$message.error("请填写必要参数");
-          reject()
-        } else {
-          let status = null;
-          // 1.resetTeam 乐团修改
-          // 2.newTeam 新建乐团
-          // 3.teamList 跨团修改
-          // 4.teamDraft 乐团草稿
-          switch (this.teamStatus) {
-            case "resetTeam": {
-              status = "PROGRESS";
-              break;
-            }
-            case "newTeam": {
-              status = "DRAFT";
-              break;
-            }
-            case "teamList": {
-              status = null;
-              break;
-            }
-            case "teamDraft": {
-              status = "DRAFT";
-              break;
+      return new Promise((resolve, reject) => {
+        this.$refs["topinfo"].validate(async (valid, object) => {
+          if (!valid) {
+            this.$message.error("请填写必要参数");
+            reject();
+          } else {
+            let status = null;
+            // 1.resetTeam 乐团修改
+            // 2.newTeam 新建乐团
+            // 3.teamList 跨团修改
+            // 4.teamDraft 乐团草稿
+            switch (this.teamStatus) {
+              case "resetTeam": {
+                status = "PROGRESS";
+                break;
+              }
+              case "newTeam": {
+                status = "DRAFT";
+                break;
+              }
+              case "teamList": {
+                status = null;
+                break;
+              }
+              case "teamDraft": {
+                status = "DRAFT";
+                break;
+              }
             }
-          }
-          let obj = {};
-          // topFrom.ownershipType
-          //  修改  合并对象
-          obj.musicGroup = {
-            settlementType: this.topFrom.salary,
-            applyExpireDate: dayjs(this.topFrom.time).format(
-              "YYYY-MM-DD HH:mm:ss"
-            ),
-            chargeTypeId: this.topFrom.type,
-            cooperationOrganId: this.topFrom.school,
-            courseViewType: this.topFrom.courseViewType,
-            teamTeacherId: this.topFrom.boss,
-            educationalTeacherId: this.topFrom.teacher,
-            enrollClasses: this.topFrom.startClass.join(","),
-            name: this.topFrom.name,
-            paymentPattern: this.topFrom.paymentPattern,
-            paymentValidStartDate: this.topFrom.paymentValidStartDate
-              ? dayjs(this.topFrom.paymentValidStartDate).format("YYYY-MM-DD")
-              : this.topFrom.paymentValidStartDate,
-            paymentValidEndDate: this.topFrom.paymentValidEndDate
-              ? dayjs(this.topFrom.paymentValidEndDate).format("YYYY-MM-DD")
-              : this.topFrom.paymentValidEndDate,
-            organId: this.topFrom.section,
-            // paymentMonths:obj.months  有待确认
-            schoolId: this.topFrom.address,
-            id: this.teamid,
-            directorUserId: this.topFrom.head,
-            isClassroomLessons: this.topFrom.isClass,
-            status,
-            expectStartGroupDate: this.topFrom.startTime,
-            ownershipType: this.topFrom.ownershipType,
-            repairUserId: this.topFrom.repairUserId || null,
-            feeType: this.topFrom.feeType,
-          };
-          // obj.musicGroupPaymentEntities = [];
-          // createTeam
-          if (this.teamStatus != "newTeam") {
-           return await resetTeamBaseInfo(obj).then(async(res) => {
-              if (res.code == 200) {
-                localStorage.setItem(
-                  `${this.teamid}base`,
-                  JSON.stringify(this.topFrom)
-                );
-                this.$emit("getBaseInfo");
-                if (this.teamStatus == "teamDraft") {
-                  this.$message.success("保存成功");
-                  if(!str){
-                     this.$emit("handleClick", { name: "2" });
-                  }
-                      resolve(true)
+            let obj = {};
+            // topFrom.ownershipType
+            //  修改  合并对象
+            obj.musicGroup = {
+              settlementType: this.topFrom.salary,
+              applyExpireDate: dayjs(this.topFrom.time).format(
+                "YYYY-MM-DD HH:mm:ss"
+              ),
+              chargeTypeId: this.topFrom.type,
+              cooperationOrganId: this.topFrom.school,
+              courseViewType: this.topFrom.courseViewType,
+              teamTeacherId: this.topFrom.boss,
+              educationalTeacherId: this.topFrom.teacher,
+              enrollClasses: this.topFrom.startClass.join(","),
+              name: this.topFrom.name,
+              paymentPattern: this.topFrom.paymentPattern,
+              paymentValidStartDate: this.topFrom.paymentValidStartDate
+                ? dayjs(this.topFrom.paymentValidStartDate).format("YYYY-MM-DD")
+                : this.topFrom.paymentValidStartDate,
+              paymentValidEndDate: this.topFrom.paymentValidEndDate
+                ? dayjs(this.topFrom.paymentValidEndDate).format("YYYY-MM-DD")
+                : this.topFrom.paymentValidEndDate,
+              organId: this.topFrom.section,
+              // paymentMonths:obj.months  有待确认
+              schoolId: this.topFrom.address,
+              id: this.teamid,
+              directorUserId: this.topFrom.head,
+              isClassroomLessons: this.topFrom.isClass,
+              status,
+              expectStartGroupDate: this.topFrom.startTime,
+              ownershipType: this.topFrom.ownershipType,
+              repairUserId: this.topFrom.repairUserId || null,
+              feeType: this.topFrom.feeType,
+            };
+            // obj.musicGroupPaymentEntities = [];
+            // createTeam
+            if (this.teamStatus != "newTeam") {
+              return await resetTeamBaseInfo(obj).then(async (res) => {
+                if (res.code == 200) {
+                  localStorage.setItem(
+                    `${this.teamid}base`,
+                    JSON.stringify(this.topFrom)
+                  );
+                  this.$emit("getBaseInfo");
+                  if (this.teamStatus == "teamDraft") {
+                    this.$message.success("保存成功");
+                    if (!str) {
+                      this.$emit("handleClick", { name: "2" });
+                    }
+                    resolve(true);
 
-                  // 跳到第二页
-                } else {
-                  this.$message.success("修改乐团成功");
-                  // this.$router.push({ path: '/teamLists', query: { id: this.teamid, name: this.topFrom.name } })
+                    // 跳到第二页
+                  } else {
+                    this.$message.success("修改乐团成功");
+                    // this.$router.push({ path: '/teamLists', query: { id: this.teamid, name: this.topFrom.name } })
+                  }
+                  resolve(true);
                 }
-                 resolve(true)
-              }
-            });
-          } else {
-            // 发送建团申请 成功后跳到第二页
-            createTeam(obj).then((res) => {
-              if (res.code == 200) {
-                // this.$message.success('建团成功,请设置声部信息')
-                // this.$emit("chiosetab", 1);
-                const h = this.$createElement;
-                this.$msgbox({
-                  title: "提示",
-                  message: h("p", null, [
-                    h("p", null, "新建乐团成功 "),
-                    h("p", null, "请设置声部信息"),
-                  ]),
-                  type: "warning",
-                  confirmButtonText: "是",
-                  cancelButtonText: "否",
-                  showCancelButton: true,
-                  customClass: "messageBox-prompt-test",
-                })
-                  .then(() => {
-                    this.$router.push(
-                      {
-                        query: merge(this.$route.query, {
-                          type: "teamDraft",
-                          id: res.data,
-                          team_status: "DRAFT",
-                        }),
-                      },
-                      (router) => {
-                        console.log(router);
-                        router.meta.title = "乐团编辑中";
-                      }
-                    );
-
-                    this.$emit("getName", this.topFrom.name);
-                    this.$emit("handleClick", { name: "2" });
-                    return true
+              });
+            } else {
+              // 发送建团申请 成功后跳到第二页
+              createTeam(obj).then((res) => {
+                if (res.code == 200) {
+                  // this.$message.success('建团成功,请设置声部信息')
+                  // this.$emit("chiosetab", 1);
+                  const h = this.$createElement;
+                  this.$msgbox({
+                    title: "提示",
+                    message: h("p", null, [
+                      h("p", null, "新建乐团成功 "),
+                      h("p", null, "请设置声部信息"),
+                    ]),
+                    type: "warning",
+                    confirmButtonText: "是",
+                    cancelButtonText: "否",
+                    showCancelButton: true,
+                    customClass: "messageBox-prompt-test",
                   })
-                  .catch(() => {
-                    this.$router.push({
-                      query: merge(this.$route.query, {
-                        type: "teamDraft",
-                        id: res.data,
-                        team_status: "DRAFT",
-                      }),
-                    },(router) => {
-                        console.log(router);
-                        router.meta.title = "乐团编辑中";
-                      });
-                    this.$emit("getName", this.topFrom.name);
-                    this.init();
-                     return true
-                  });
-              }
-            });
+                    .then(() => {
+                      this.$router.push(
+                        {
+                          query: merge(this.$route.query, {
+                            type: "teamDraft",
+                            id: res.data,
+                            team_status: "DRAFT",
+                          }),
+                        },
+                        (router) => {
+                          console.log(router);
+                          router.meta.title = "乐团编辑中";
+                        }
+                      );
+
+                      this.$emit("getName", this.topFrom.name);
+                      this.$emit("handleClick", { name: "2" });
+                      return true;
+                    })
+                    .catch(() => {
+                      this.$router.push(
+                        {
+                          query: merge(this.$route.query, {
+                            type: "teamDraft",
+                            id: res.data,
+                            team_status: "DRAFT",
+                          }),
+                        },
+                        (router) => {
+                          console.log(router);
+                          router.meta.title = "乐团编辑中";
+                        }
+                      );
+                      this.$emit("getName", this.topFrom.name);
+                      this.init();
+                      return true;
+                    });
+                }
+              });
+            }
+            // 发请求
           }
-          // 发请求
-        }
+        });
       });
-      })
-
     },
     changeApplyTime(val) {
       this.$set(this.topFrom, "paymentValidStartDate", "");
@@ -1187,11 +1200,11 @@ export default {
       this.applyExpireDate = res.data.musicGroup.applyExpireDate;
       localStorage.setItem(`${this.teamid}base`, JSON.stringify(this.topFrom));
     },
-    changeType(val){
-      if(val){
+    changeType(val) {
+      if (val) {
         localStorage.removeItem(`${this.teamid}sound`);
       }
-    }
+    },
   },
   computed: {
     startClassString() {