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