|  | @@ -4,7 +4,17 @@
 | 
	
		
			
				|  |  |        <div class="squrt"></div>
 | 
	
		
			
				|  |  |        教学点管理
 | 
	
		
			
				|  |  |      </h2>
 | 
	
		
			
				|  |  | -    <div class="m-core" v-if="(tableList.length>0 || pageInfo.page>1)&&contextFlag">
 | 
	
		
			
				|  |  | +    <div
 | 
	
		
			
				|  |  | +      class="m-core"
 | 
	
		
			
				|  |  | +      v-if="
 | 
	
		
			
				|  |  | +        (tableList.length > 0 ||
 | 
	
		
			
				|  |  | +          pageInfo.page > 1 ||
 | 
	
		
			
				|  |  | +          searchForm.search ||
 | 
	
		
			
				|  |  | +          searchForm.organId ||
 | 
	
		
			
				|  |  | +          searchForm.publicFlag) &&
 | 
	
		
			
				|  |  | +        contextFlag
 | 
	
		
			
				|  |  | +      "
 | 
	
		
			
				|  |  | +    >
 | 
	
		
			
				|  |  |        <save-form
 | 
	
		
			
				|  |  |          :inline="true"
 | 
	
		
			
				|  |  |          class="searchForm"
 | 
	
	
		
			
				|  | @@ -49,6 +59,12 @@
 | 
	
		
			
				|  |  |          <el-form-item>
 | 
	
		
			
				|  |  |            <el-button native-type="submit" type="danger">搜索</el-button>
 | 
	
		
			
				|  |  |            <el-button native-type="reset" type="primary">重置</el-button>
 | 
	
		
			
				|  |  | +          <el-button
 | 
	
		
			
				|  |  | +            @click="onExport"
 | 
	
		
			
				|  |  | +            type="primary"
 | 
	
		
			
				|  |  | +            v-permission="'export/exportSchoolList'"
 | 
	
		
			
				|  |  | +            >导出</el-button
 | 
	
		
			
				|  |  | +          >
 | 
	
		
			
				|  |  |          </el-form-item>
 | 
	
		
			
				|  |  |        </save-form>
 | 
	
		
			
				|  |  |        <el-button
 | 
	
	
		
			
				|  | @@ -116,19 +132,13 @@
 | 
	
		
			
				|  |  |                  >修改</el-button
 | 
	
		
			
				|  |  |                >
 | 
	
		
			
				|  |  |                <el-button
 | 
	
		
			
				|  |  | -                v-if="
 | 
	
		
			
				|  |  | -                  scope.row.delFlag == 0 &&
 | 
	
		
			
				|  |  | -                  $helpers.permission('school/update/stop')
 | 
	
		
			
				|  |  | -                "
 | 
	
		
			
				|  |  | +                v-if="scope.row.delFlag == 0 && $helpers.permission('school/update/stop')"
 | 
	
		
			
				|  |  |                  @click="onUpdateSubmit(scope.row, 2)"
 | 
	
		
			
				|  |  |                  type="text"
 | 
	
		
			
				|  |  |                  >停用</el-button
 | 
	
		
			
				|  |  |                >
 | 
	
		
			
				|  |  |                <el-button
 | 
	
		
			
				|  |  | -                v-if="
 | 
	
		
			
				|  |  | -                  scope.row.delFlag == 2 &&
 | 
	
		
			
				|  |  | -                  $helpers.permission('school/update/open')
 | 
	
		
			
				|  |  | -                "
 | 
	
		
			
				|  |  | +                v-if="scope.row.delFlag == 2 && $helpers.permission('school/update/open')"
 | 
	
		
			
				|  |  |                  @click="onUpdateSubmit(scope.row, 0)"
 | 
	
		
			
				|  |  |                  type="text"
 | 
	
		
			
				|  |  |                  >启用</el-button
 | 
	
	
		
			
				|  | @@ -152,7 +162,21 @@
 | 
	
		
			
				|  |  |          />
 | 
	
		
			
				|  |  |        </div>
 | 
	
		
			
				|  |  |      </div>
 | 
	
		
			
				|  |  | -       <emptyPage @submit="openTeaching('create')" title='教学点管理' btnTitle='新建教学点' :context='context' v-if="!(tableList.length>0 || pageInfo.page>1)&&contextFlag" />
 | 
	
		
			
				|  |  | +    <emptyPage
 | 
	
		
			
				|  |  | +      @submit="openTeaching('create')"
 | 
	
		
			
				|  |  | +      title="教学点管理"
 | 
	
		
			
				|  |  | +      btnTitle="新建教学点"
 | 
	
		
			
				|  |  | +      :context="context"
 | 
	
		
			
				|  |  | +      v-if="
 | 
	
		
			
				|  |  | +        !(
 | 
	
		
			
				|  |  | +          tableList.length > 0 ||
 | 
	
		
			
				|  |  | +          pageInfo.page > 1 ||
 | 
	
		
			
				|  |  | +          searchForm.search ||
 | 
	
		
			
				|  |  | +          searchForm.organId ||
 | 
	
		
			
				|  |  | +          searchForm.publicFlag
 | 
	
		
			
				|  |  | +        ) && contextFlag
 | 
	
		
			
				|  |  | +      "
 | 
	
		
			
				|  |  | +    />
 | 
	
		
			
				|  |  |      <el-dialog
 | 
	
		
			
				|  |  |        :title="formTitle[formActionTitle]"
 | 
	
		
			
				|  |  |        :visible.sync="teachingStatus"
 | 
	
	
		
			
				|  | @@ -160,18 +184,10 @@
 | 
	
		
			
				|  |  |        width="500px"
 | 
	
		
			
				|  |  |      >
 | 
	
		
			
				|  |  |        <el-form :model="form" :rules="rules" ref="ruleForm">
 | 
	
		
			
				|  |  | -        <el-form-item
 | 
	
		
			
				|  |  | -          label="教学点名称"
 | 
	
		
			
				|  |  | -          prop="name"
 | 
	
		
			
				|  |  | -          :label-width="formLabelWidth"
 | 
	
		
			
				|  |  | -        >
 | 
	
		
			
				|  |  | +        <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="source"
 | 
	
		
			
				|  |  | -          :label-width="formLabelWidth"
 | 
	
		
			
				|  |  | -        >
 | 
	
		
			
				|  |  | +        <el-form-item label="教学点来源" prop="source" :label-width="formLabelWidth">
 | 
	
		
			
				|  |  |            <template v-if="formActionTitle == 'update'">
 | 
	
		
			
				|  |  |              <el-select
 | 
	
		
			
				|  |  |                v-model.trim="form.source"
 | 
	
	
		
			
				|  | @@ -238,11 +254,7 @@
 | 
	
		
			
				|  |  |            ></el-input>
 | 
	
		
			
				|  |  |          </el-form-item>
 | 
	
		
			
				|  |  |          <!--    v-if="form.source == 2" -->
 | 
	
		
			
				|  |  | -        <el-form-item
 | 
	
		
			
				|  |  | -          prop="organId"
 | 
	
		
			
				|  |  | -          label="所属分部"
 | 
	
		
			
				|  |  | -          :label-width="formLabelWidth"
 | 
	
		
			
				|  |  | -        >
 | 
	
		
			
				|  |  | +        <el-form-item prop="organId" label="所属分部" :label-width="formLabelWidth">
 | 
	
		
			
				|  |  |            <el-select
 | 
	
		
			
				|  |  |              :disabled="form.source != 2"
 | 
	
		
			
				|  |  |              v-model.trim="form.organId"
 | 
	
	
		
			
				|  | @@ -259,26 +271,17 @@
 | 
	
		
			
				|  |  |            </el-select>
 | 
	
		
			
				|  |  |          </el-form-item>
 | 
	
		
			
				|  |  |          <!-- :show-message="addressMessage" -->
 | 
	
		
			
				|  |  | -        <el-form-item
 | 
	
		
			
				|  |  | -          prop="address"
 | 
	
		
			
				|  |  | -          label="上课地点"
 | 
	
		
			
				|  |  | -          :label-width="formLabelWidth"
 | 
	
		
			
				|  |  | -        >
 | 
	
		
			
				|  |  | -          <el-input
 | 
	
		
			
				|  |  | -            class="text-address"
 | 
	
		
			
				|  |  | -            v-model.trim="form.address"
 | 
	
		
			
				|  |  | -            :disabled="true"
 | 
	
		
			
				|  |  | -          >
 | 
	
		
			
				|  |  | -          <template   slot="append">
 | 
	
		
			
				|  |  | -             <el-button
 | 
	
		
			
				|  |  | -              class="addMapBtn"
 | 
	
		
			
				|  |  | -              @click="addMap"
 | 
	
		
			
				|  |  | -              type="primary"
 | 
	
		
			
				|  |  | -              icon="el-icon-plus"
 | 
	
		
			
				|  |  | -              >选择</el-button
 | 
	
		
			
				|  |  | -            >
 | 
	
		
			
				|  |  | -          </template>
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | +        <el-form-item prop="address" label="上课地点" :label-width="formLabelWidth">
 | 
	
		
			
				|  |  | +          <el-input class="text-address" v-model.trim="form.address" :disabled="true">
 | 
	
		
			
				|  |  | +            <template slot="append">
 | 
	
		
			
				|  |  | +              <el-button
 | 
	
		
			
				|  |  | +                class="addMapBtn"
 | 
	
		
			
				|  |  | +                @click="addMap"
 | 
	
		
			
				|  |  | +                type="primary"
 | 
	
		
			
				|  |  | +                icon="el-icon-plus"
 | 
	
		
			
				|  |  | +                >选择</el-button
 | 
	
		
			
				|  |  | +              >
 | 
	
		
			
				|  |  | +            </template>
 | 
	
		
			
				|  |  |            </el-input>
 | 
	
		
			
				|  |  |          </el-form-item>
 | 
	
		
			
				|  |  |          <!-- <el-form-item
 | 
	
	
		
			
				|  | @@ -295,9 +298,7 @@
 | 
	
		
			
				|  |  |        </el-form>
 | 
	
		
			
				|  |  |        <span slot="footer" class="dialog-footer">
 | 
	
		
			
				|  |  |          <el-button @click="onTeachingCancel('ruleForm')">取 消</el-button>
 | 
	
		
			
				|  |  | -        <el-button type="primary" @click="onTeachingSubmit('ruleForm')"
 | 
	
		
			
				|  |  | -          >确 定</el-button
 | 
	
		
			
				|  |  | -        >
 | 
	
		
			
				|  |  | +        <el-button type="primary" @click="onTeachingSubmit('ruleForm')">确 定</el-button>
 | 
	
		
			
				|  |  |        </span>
 | 
	
		
			
				|  |  |      </el-dialog>
 | 
	
		
			
				|  |  |      <el-dialog
 | 
	
	
		
			
				|  | @@ -322,12 +323,7 @@
 | 
	
		
			
				|  |  |            :search-option="searchOption"
 | 
	
		
			
				|  |  |            :on-search-result="onSearchResult"
 | 
	
		
			
				|  |  |          ></el-amap-search-box>
 | 
	
		
			
				|  |  | -        <el-amap
 | 
	
		
			
				|  |  | -          :zoom="zoom"
 | 
	
		
			
				|  |  | -          :plugin="plugin"
 | 
	
		
			
				|  |  | -          :center="center"
 | 
	
		
			
				|  |  | -          :events="events"
 | 
	
		
			
				|  |  | -        >
 | 
	
		
			
				|  |  | +        <el-amap :zoom="zoom" :plugin="plugin" :center="center" :events="events">
 | 
	
		
			
				|  |  |            <el-amap-marker
 | 
	
		
			
				|  |  |              :events="markerEvents()"
 | 
	
		
			
				|  |  |              v-for="(marker, index) in markers"
 | 
	
	
		
			
				|  | @@ -346,6 +342,8 @@
 | 
	
		
			
				|  |  |  </template>
 | 
	
		
			
				|  |  |  <script>
 | 
	
		
			
				|  |  |  import pagination from "@/components/Pagination/index";
 | 
	
		
			
				|  |  | +import { Export } from "@/utils/downLoadFile";
 | 
	
		
			
				|  |  | +import qs from "qs";
 | 
	
		
			
				|  |  |  // 地图
 | 
	
		
			
				|  |  |  (function () {
 | 
	
		
			
				|  |  |    let func = EventTarget.prototype.addEventListener;
 | 
	
	
		
			
				|  | @@ -383,10 +381,10 @@ VueAMap.initAMapApiLoader({
 | 
	
		
			
				|  |  |    plugin: ["AMap.Geolocation", "AMap.PlaceSearch", "AMap.Geocoder", "Geocoder"],
 | 
	
		
			
				|  |  |    v: "1.4.4",
 | 
	
		
			
				|  |  |  });
 | 
	
		
			
				|  |  | -import emptyPage from '@/components/emptyPage'
 | 
	
		
			
				|  |  | +import emptyPage from "@/components/emptyPage";
 | 
	
		
			
				|  |  |  export default {
 | 
	
		
			
				|  |  |    name: "addressManager",
 | 
	
		
			
				|  |  | -  components: { pagination,emptyPage },
 | 
	
		
			
				|  |  | +  components: { pagination, emptyPage },
 | 
	
		
			
				|  |  |    data() {
 | 
	
		
			
				|  |  |      let self = this;
 | 
	
		
			
				|  |  |      return {
 | 
	
	
		
			
				|  | @@ -423,27 +421,15 @@ export default {
 | 
	
		
			
				|  |  |        },
 | 
	
		
			
				|  |  |        selectOrganId: null, // 选中的分部编号
 | 
	
		
			
				|  |  |        rules: {
 | 
	
		
			
				|  |  | -        name: [
 | 
	
		
			
				|  |  | -          { required: true, message: "请输入教学点名称", trigger: "blur" },
 | 
	
		
			
				|  |  | -        ],
 | 
	
		
			
				|  |  | -        source: [
 | 
	
		
			
				|  |  | -          { required: true, message: "请选择教学点来源", trigger: "change" },
 | 
	
		
			
				|  |  | -        ],
 | 
	
		
			
				|  |  | -        remark: [
 | 
	
		
			
				|  |  | -          { required: true, message: "请输入租赁费用", trigger: "blur" },
 | 
	
		
			
				|  |  | -        ],
 | 
	
		
			
				|  |  | -        address: [
 | 
	
		
			
				|  |  | -          { required: true, message: "请选择上课地点", trigger: "blur" },
 | 
	
		
			
				|  |  | -        ],
 | 
	
		
			
				|  |  | +        name: [{ required: true, message: "请输入教学点名称", trigger: "blur" }],
 | 
	
		
			
				|  |  | +        source: [{ required: true, message: "请选择教学点来源", trigger: "change" }],
 | 
	
		
			
				|  |  | +        remark: [{ required: true, message: "请输入租赁费用", trigger: "blur" }],
 | 
	
		
			
				|  |  | +        address: [{ required: true, message: "请选择上课地点", trigger: "blur" }],
 | 
	
		
			
				|  |  |          cooperationOrganId: [
 | 
	
		
			
				|  |  |            { required: true, message: "请选择合作单位", trigger: "change" },
 | 
	
		
			
				|  |  |          ],
 | 
	
		
			
				|  |  | -        organId: [
 | 
	
		
			
				|  |  | -          { required: true, message: "请选择所属分部", trigger: "change" },
 | 
	
		
			
				|  |  | -        ],
 | 
	
		
			
				|  |  | -        subsidy: [
 | 
	
		
			
				|  |  | -          { type: "number", message: "课酬补贴只能为数字", trigger: "blur" },
 | 
	
		
			
				|  |  | -        ],
 | 
	
		
			
				|  |  | +        organId: [{ required: true, message: "请选择所属分部", trigger: "change" }],
 | 
	
		
			
				|  |  | +        subsidy: [{ type: "number", message: "课酬补贴只能为数字", trigger: "blur" }],
 | 
	
		
			
				|  |  |        },
 | 
	
		
			
				|  |  |        events: {
 | 
	
		
			
				|  |  |          init(o) {},
 | 
	
	
		
			
				|  | @@ -475,8 +461,9 @@ export default {
 | 
	
		
			
				|  |  |        cooperationList: [], // 合作单位列表
 | 
	
		
			
				|  |  |        searchValue: "测试",
 | 
	
		
			
				|  |  |        activeAddress: {},
 | 
	
		
			
				|  |  | -      context:'教学点是乐团、VIP课线下课的教学位置,不同分部可创建不同的教学点,线下课排课时需选择教学点,老师需在课程教学点的定位范围内完成考勤。教学点可设置合作单位提供、租赁两种方式。',
 | 
	
		
			
				|  |  | -      contextFlag:false
 | 
	
		
			
				|  |  | +      context:
 | 
	
		
			
				|  |  | +        "教学点是乐团、VIP课线下课的教学位置,不同分部可创建不同的教学点,线下课排课时需选择教学点,老师需在课程教学点的定位范围内完成考勤。教学点可设置合作单位提供、租赁两种方式。",
 | 
	
		
			
				|  |  | +      contextFlag: false,
 | 
	
		
			
				|  |  |      };
 | 
	
		
			
				|  |  |    },
 | 
	
		
			
				|  |  |    mounted() {
 | 
	
	
		
			
				|  | @@ -585,7 +572,7 @@ export default {
 | 
	
		
			
				|  |  |        AMap.plugin(["AMap.Geocoder"], function () {
 | 
	
		
			
				|  |  |          geocoder = new AMap.Geocoder();
 | 
	
		
			
				|  |  |        });
 | 
	
		
			
				|  |  | -           let that = this;
 | 
	
		
			
				|  |  | +      let that = this;
 | 
	
		
			
				|  |  |        geocoder.getAddress(pois[0].location, function (status, result) {
 | 
	
		
			
				|  |  |          if (status === "complete" && result.regeocode) {
 | 
	
		
			
				|  |  |            result.regeocode.lnglat = pois[0].location;
 | 
	
	
		
			
				|  | @@ -615,8 +602,7 @@ export default {
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  |      getpoient(e) {
 | 
	
		
			
				|  |  |        // let geocoder = new AMap.Geocoder()
 | 
	
		
			
				|  |  | -      this.onSearchResult([{ location:e.lnglat}]);
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | +      this.onSearchResult([{ location: e.lnglat }]);
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  |      markerEvents() {
 | 
	
		
			
				|  |  |        // marker 事件添加
 | 
	
	
		
			
				|  | @@ -644,7 +630,7 @@ export default {
 | 
	
		
			
				|  |  |        };
 | 
	
		
			
				|  |  |        schoolQueryPage(params).then((res) => {
 | 
	
		
			
				|  |  |          if (res.code == 200 && res.data) {
 | 
	
		
			
				|  |  | -          this.contextFlag = true
 | 
	
		
			
				|  |  | +          this.contextFlag = true;
 | 
	
		
			
				|  |  |            this.tableList = res.data.rows;
 | 
	
		
			
				|  |  |            this.pageInfo.total = res.data.total;
 | 
	
		
			
				|  |  |          }
 | 
	
	
		
			
				|  | @@ -777,6 +763,22 @@ export default {
 | 
	
		
			
				|  |  |        };
 | 
	
		
			
				|  |  |        this.search();
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  | +    onExport() {
 | 
	
		
			
				|  |  | +      const { ...rest } = this.searchForm;
 | 
	
		
			
				|  |  | +      Export(
 | 
	
		
			
				|  |  | +        this,
 | 
	
		
			
				|  |  | +        {
 | 
	
		
			
				|  |  | +          url: "/api-web/export/exportSchoolList",
 | 
	
		
			
				|  |  | +          fileName: "教学点.xls",
 | 
	
		
			
				|  |  | +          method: "post",
 | 
	
		
			
				|  |  | +          params: qs.stringify({
 | 
	
		
			
				|  |  | +            visitFlag: this.$route.query.visitFlag,
 | 
	
		
			
				|  |  | +            ...rest,
 | 
	
		
			
				|  |  | +          }),
 | 
	
		
			
				|  |  | +        },
 | 
	
		
			
				|  |  | +        "您确定导出教学点?"
 | 
	
		
			
				|  |  | +      );
 | 
	
		
			
				|  |  | +    },
 | 
	
		
			
				|  |  |    },
 | 
	
		
			
				|  |  |  };
 | 
	
		
			
				|  |  |  </script>
 | 
	
	
		
			
				|  | @@ -798,8 +800,8 @@ export default {
 | 
	
		
			
				|  |  |    }
 | 
	
		
			
				|  |  |  }
 | 
	
		
			
				|  |  |  .addMapBtn {
 | 
	
		
			
				|  |  | -    background-color: var(--color-primary)!important;
 | 
	
		
			
				|  |  | -    color: #fff!important;
 | 
	
		
			
				|  |  | +  background-color: var(--color-primary) !important;
 | 
	
		
			
				|  |  | +  color: #fff !important;
 | 
	
		
			
				|  |  |  }
 | 
	
		
			
				|  |  |  .el-input-group__append {
 | 
	
		
			
				|  |  |    background: #f5f7fa;
 |