12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034 |
- <template>
- <div class="m-container">
- <h2>
- <div class="squrt"></div>
- 报表中心
- </h2>
- <div class="m-core">
- <div class="m-wrap">
- <div class="title">课酬导出:</div>
- <el-date-picker
- v-model="mouth"
- type="month"
- placeholder="选择月"
- value-format="yyyy-MM-dd"
- ></el-date-picker>
- <!-- <el-select v-model.trim="courseScheduleType"
- style="marginLeft:10px"
- filterable
- clearable
- multiple
- placeholder="课程类型">
- <el-option v-for="(item, index) in courseArray"
- :key="index"
- :label="item.label"
- :value="item.value"></el-option>
- </el-select> -->
- <el-button
- style="margin-left: 10px"
- type="primary"
- @click="exportSalar"
- v-permission="'export/teacherSalary'"
- >导出</el-button
- >
- <el-tooltip placement="top" popper-class="mTooltip">
- <div slot="content">将只导出当前选择月份已结算的课程课酬。</div>
- <i
- class="el-icon-question micon el-tooltip"
- style="font-size: 18px; color: #f56c6c"
- v-permission="'export/teacherSalary'"
- ></i>
- </el-tooltip>
- </div>
- <el-divider></el-divider>
- <div class="m-core">
- <div class="m-wrap">
- <div class="title">乐团招生汇总:</div>
- <select-all
- v-model.trim="organIdList"
- class="organSelect"
- style="width: 100%"
- filterable
- placeholder="请选择分部"
- multiple
- clearable
- >
- <el-option
- v-for="(item, index) in selects.branchs"
- :key="index"
- :label="item.name"
- :value="item.id"
- ></el-option>
- </select-all>
- <el-button
- style="margin-left: 10px"
- type="primary"
- @click="exportMusicGroup"
- v-permission="'export/musicGroupRegister'"
- >导出</el-button
- >
- <el-tooltip placement="top" popper-class="mTooltip">
- <div slot="content">
- 请选择分部后,导出招生情况汇总表,分部可多选
- </div>
- <i
- class="el-icon-question micon el-tooltip"
- v-permission="'export/musicGroupRegister'"
- style="font-size: 18px; color: #f56c6c"
- ></i>
- </el-tooltip>
- </div>
- </div>
- <el-divider></el-divider>
- <div class="m-core">
- <div class="m-wrap">
- <div class="title">老师默认课酬:</div>
- <select-all
- v-model.trim="teacherDefaultSalaryOrganId"
- class="organSelect"
- style="width: 100%"
- filterable
- placeholder="请选择分部"
- multiple
- clearable
- >
- <el-option
- v-for="(item, index) in selects.branchs"
- :key="index"
- :label="item.name"
- :value="item.id"
- ></el-option>
- </select-all>
- <el-button
- style="margin-left: 10px"
- type="primary"
- @click="exportDefaultSalary"
- v-permission="'export/teacherDefaultSalary'"
- >导出</el-button
- >
- <el-tooltip placement="top" popper-class="mTooltip">
- <div slot="content">请选择分部后,导出老师列表及老师课酬信息</div>
- <i
- class="el-icon-question micon el-tooltip"
- style="font-size: 18px; color: #f56c6c"
- v-permission="'export/teacherDefaultSalary'"
- ></i>
- </el-tooltip>
- </div>
- </div>
- <el-divider></el-divider>
- <div class="m-core">
- <div class="m-wrap">
- <div class="title">乐团在读人数:</div>
- <select-all
- v-model.trim="musicTeamNum"
- class="organSelect"
- style="width: 100%"
- filterable
- multiple
- placeholder="请选择分部"
- clearable
- >
- <el-option
- v-for="(item, index) in selects.branchs"
- :key="index"
- :label="item.name"
- :value="item.id"
- ></el-option>
- </select-all>
- <el-button
- style="margin-left: 10px"
- type="primary"
- @click="exportMusicTeamNum"
- v-permission="'export/musicGroupNormalStudentNum'"
- >导出</el-button
- >
- <el-tooltip placement="top" popper-class="mTooltip">
- <div slot="content">请选择分部后,导出乐团在读人数信息</div>
- <i
- class="el-icon-question micon el-tooltip"
- style="font-size: 18px; color: #f56c6c"
- v-permission="'export/teacherDefaultSalary'"
- ></i>
- </el-tooltip>
- </div>
- </div>
- <el-divider></el-divider>
- <div class="m-core">
- <div class="m-wrap">
- <div class="title">回款统计:</div>
- <select-all
- v-model.trim="studentOrganId"
- class="organSelect"
- style="width: 100%"
- filterable
- placeholder="请选择分部"
- multiple
- clearable
- >
- <el-option
- v-for="(item, index) in selects.branchs"
- :key="index"
- :label="item.name"
- :value="item.id"
- ></el-option>
- </select-all>
- <el-date-picker
- style="margin-left: 15px"
- v-model="studentMonth"
- type="month"
- placeholder="选择月"
- value-format="yyyy-MM-dd"
- ></el-date-picker>
- <el-button
- style="margin-left: 10px"
- type="primary"
- @click="exportStudent"
- v-permission="'export/studentOrder'"
- >导出</el-button
- >
- <el-tooltip placement="top" popper-class="mTooltip">
- <div slot="content">请选择分部和月份,导出回款统计</div>
- <i
- class="el-icon-question micon el-tooltip"
- style="font-size: 18px; color: #f56c6c"
- v-permission="'export/studentOrder'"
- ></i>
- </el-tooltip>
- </div>
- </div>
- <el-divider></el-divider>
- <div class="m-core">
- <div class="m-wrap">
- <div class="title">学生考勤:</div>
- <select-all
- v-model.trim="attendanceOrganId"
- class="organSelect"
- style="width: 100%"
- filterable
- multiple
- placeholder="请选择分部"
- clearable
- >
- <el-option
- v-for="(item, index) in selects.branchs"
- :key="index"
- :label="item.name"
- :value="item.id"
- ></el-option>
- </select-all>
- <el-select
- v-model.trim="attendanceCourseType"
- class="organSelect"
- style="margin-left: 15px; width: 100%"
- filterable
- placeholder="请选择课程类型"
- >
- <el-option
- v-for="(item, index) in courseListType"
- :key="index"
- :label="item.label"
- :value="item.value"
- ></el-option>
- </el-select>
- <el-date-picker
- v-model.trim="timer"
- style="width: 420px; margin-left: 15px"
- type="daterange"
- value-format="yyyy-MM-dd"
- range-separator="至"
- start-placeholder="上课开始日期"
- end-placeholder="上课结束日期"
- :picker-options="{
- firstDayOfWeek: 1,
- }"
- ></el-date-picker>
- <el-button
- style="margin-left: 10px"
- type="primary"
- @click="exportAttendance"
- v-permission="'export/exportStudentAttendances'"
- >导出</el-button
- >
- </div>
- </div>
- <el-divider></el-divider>
- <div class="m-core">
- <div class="m-wrap">
- <div class="title">课程余额明细:</div>
- <select-all
- v-model.trim="AccountOrganId"
- class="organSelect"
- style="width: 100%"
- filterable
- multiple
- placeholder="请选择分部"
- clearable
- >
- <el-option
- v-for="(item, index) in selects.branchs"
- :key="index"
- :label="item.name"
- :value="item.id"
- ></el-option>
- </select-all>
- <el-date-picker
- v-model.trim="AccountTimer"
- style="width: 420px; margin-left: 15px"
- type="daterange"
- value-format="yyyy-MM-dd"
- range-separator="至"
- start-placeholder="开始日期"
- end-placeholder="结束日期"
- :picker-options="{
- firstDayOfWeek: 1,
- }"
- ></el-date-picker>
- <el-button
- style="margin-left: 10px"
- type="primary"
- @click="exportAccount"
- v-permission="'export/userCoursesAccount/4388'"
- >导出</el-button
- >
- </div>
- </div>
- <el-divider></el-divider>
- <div class="m-core">
- <div class="m-wrap">
- <div class="title">账户余额明细:</div>
- <select-all
- v-model.trim="AccountDetailOrganId"
- class="organSelect"
- style="width: 100%"
- filterable
- multiple
- placeholder="请选择分部"
- clearable
- >
- <el-option
- v-for="(item, index) in selects.branchs"
- :key="index"
- :label="item.name"
- :value="item.id"
- ></el-option>
- </select-all>
- <el-date-picker
- v-model.trim="AccountDetailTimer"
- style="width: 420px; margin-left: 15px"
- type="daterange"
- value-format="yyyy-MM-dd"
- range-separator="至"
- start-placeholder="开始日期"
- end-placeholder="结束日期"
- :picker-options="{
- firstDayOfWeek: 1,
- }"
- ></el-date-picker>
- <el-button
- style="margin-left: 10px"
- type="primary"
- @click="exportDetailAccount"
- v-permission="'export/userCashAccountDetail/4389'"
- >导出</el-button
- >
- </div>
- </div>
- <el-divider></el-divider>
- <div class="m-core">
- <div class="m-wrap">
- <div class="title">乐保订单导出:</div>
- <el-date-picker
- v-model="leBaoTimer"
- style="width: 420px; margin-left: 15px"
- type="monthrange"
- value-format="yyyy-MM-dd"
- range-separator="至"
- start-placeholder="开始月份"
- end-placeholder="结束月份"
- >
- </el-date-picker>
- <el-button
- style="margin-left: 10px"
- type="primary"
- @click="exportLeBao"
- v-permission="'studentInstrument/export'"
- >导出</el-button
- >
- <!-- <el-tooltip placement="top"
- popper-class="mTooltip">
- <div slot="content">
- 请选择分部和月份,导出回款统计
- </div>
- <i class="el-icon-question micon el-tooltip"
- style="font-size: 18px; color: #F56C6C"
- v-permission="'export/studentOrder'"></i>
- </el-tooltip> -->
- </div>
- </div>
- <el-divider></el-divider>
- <div class="m-core">
- <div class="m-wrap">
- <div class="title">云教练学员统计:</div>
- <el-select
- v-model.trim="trainOrganId"
- class="organSelect"
- style="width: 100%"
- filterable
- placeholder="请选择分部"
- clearable
- >
- <el-option
- v-for="(item, index) in selects.branchs"
- :key="index"
- :label="item.name"
- :value="item.id"
- ></el-option>
- </el-select>
- <el-button
- style="margin-left: 10px"
- type="primary"
- @click="exportTrain"
- v-permission="'export/cloudStudyStudentTrainData'"
- >导出</el-button
- >
- </div>
- </div>
- <el-divider></el-divider>
- <div class="m-core">
- <div class="m-wrap">
- <div class="title">问卷调查:</div>
- <el-select
- v-model.trim="questionActiveType"
- class="organSelect"
- style="width: 100%"
- filterable
- placeholder="请选择导出类型"
- clearable
- >
- <el-option
- label="云教练用户反馈"
- value="CLOUD_TEACHER_FEEDBACK"
- ></el-option>
- </el-select>
- <el-button
- style="margin-left: 10px"
- type="primary"
- @click="exportQuestion"
- v-if="$helpers.permission('questionnaireUserResult/export/report')"
- >导出</el-button
- >
- </div>
- </div>
- <el-divider></el-divider>
- <div class="m-core">
- <div class="m-wrap">
- <div class="title">VIP网管课耗导出:</div>
- <select-all
- v-model.trim="vipOrganId"
- class="organSelect"
- style="width: 100%"
- filterable
- placeholder="请选择分部"
- clearable
- >
- <el-option
- v-for="(item, index) in selects.branchs"
- :key="index"
- :label="item.name"
- :value="item.id"
- ></el-option>
- </select-all>
- <el-button
- style="margin-left: 10px"
- type="primary"
- @click="exportVip"
- v-permission="'export/studentVipPractice'"
- >导出</el-button
- >
- </div>
- </div>
- </div>
- </div>
- </template>
- <script>
- import { exportTeacherSalary } from "@/api/generalSettings";
- import { courseType, courseListType } from "@/utils/searchArray";
- import { Export } from "@/utils/downLoadFile";
- import cleanDeep from "clean-deep";
- import dayjs from "dayjs";
- import axios from "axios";
- import qs from "qs";
- import { getToken } from "@/utils/auth";
- import load from "@/utils/loading";
- export default {
- name: "reportForm",
- data() {
- return {
- mouth: "",
- organIdList: [],
- teacherDefaultSalaryOrganId: "",
- courseArray: courseType,
- courseListType,
- courseScheduleType: [],
- musicTeamNum: [],
- studentOrganId: "",
- studentMonth: "",
- attendanceOrganId: [],
- attendanceCourseType: "MUSIC",
- timer: [],
- leBaoTimer: [],
- AccountOrganId: [],
- AccountTimer: [],
- AccountDetailOrganId: [],
- AccountDetailTimer: [],
- trainOrganId: null,
- questionActiveType: "CLOUD_TEACHER_FEEDBACK",
- vipOrganId: [],
- };
- },
- mounted() {
- this.$store.dispatch("setBranchs");
- },
- methods: {
- exportSalar() {
- if (!this.mouth) {
- this.$message.error("请选择导出月份");
- return;
- }
- // let courseTypeList = this.courseScheduleType.join(',')
- let url = "/api-web/export/teacherSalary";
- let data = { date: this.mouth };
- const options = {
- method: "POST",
- headers: {
- Authorization: getToken(),
- },
- data: qs.stringify(cleanDeep(data)),
- url,
- responseType: "blob",
- };
- this.$confirm("您确定导出课酬", "提示", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning",
- })
- .then(() => {
- load.startLoading();
- axios(options)
- .then((res) => {
- let blob = new Blob([res.data], {
- // type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8'
- type: "application/vnd.ms-excel;charset=utf-8",
- //word文档为application/msword,pdf文档为application/pdf,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8
- });
- let text = new Response(blob).text();
- text.then((res) => {
- // 判断是否报错
- if (res.indexOf("code") != -1) {
- let json = JSON.parse(res);
- this.$message.error(json.msg);
- } else {
- let objectUrl = URL.createObjectURL(blob);
- let link = document.createElement("a");
- let nowTime = new Date();
- let ymd =
- nowTime.getFullYear() +
- "" +
- (nowTime.getMonth() + 1) +
- "" +
- nowTime.getDate();
- let fname = ymd + "课酬.xls"; //下载文件的名字
- link.href = objectUrl;
- link.setAttribute("download", fname);
- document.body.appendChild(link);
- link.click();
- }
- });
- load.endLoading();
- })
- .catch((error) => {
- this.$message.error("导出数据失败,请联系管理员");
- load.endLoading();
- });
- })
- .catch(() => {});
- },
- exportMusicGroup() {
- if (this.organIdList.length < 1) {
- this.$message.error("请至少选择一个分部");
- return;
- }
- let url = "/api-web/export/musicGroupRegister";
- let data = { organIds: this.organIdList.join(",") };
- const options = {
- method: "POST",
- headers: {
- Authorization: getToken(),
- },
- data: qs.stringify(cleanDeep(data)),
- url,
- responseType: "blob",
- };
- this.$confirm("您确定导出招生情况汇总表", "提示", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning",
- })
- .then(() => {
- load.startLoading();
- axios(options)
- .then((res) => {
- let blob = new Blob([res.data], {
- // type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8'
- type: "application/vnd.ms-excel;charset=utf-8",
- //word文档为application/msword,pdf文档为application/pdf,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8
- });
- let text = new Response(blob).text();
- text.then((res) => {
- // 判断是否报错
- if (res.indexOf("code") != -1) {
- let json = JSON.parse(res);
- this.$message.error(json.msg);
- } else {
- let objectUrl = URL.createObjectURL(blob);
- let link = document.createElement("a");
- let nowTime = new Date();
- let ymd =
- nowTime.getFullYear() +
- "" +
- (nowTime.getMonth() + 1) +
- "" +
- nowTime.getDate();
- let fname = ymd + "招生情况汇总表.xls"; //下载文件的名字
- link.href = objectUrl;
- link.setAttribute("download", fname);
- document.body.appendChild(link);
- link.click();
- }
- });
- load.endLoading();
- })
- .catch((error) => {
- this.$message.error("导出数据失败,请联系管理员");
- load.endLoading();
- });
- })
- .catch(() => {});
- },
- exportDefaultSalary() {
- let organIdList = this.teacherDefaultSalaryOrganId.join(",");
- let url = "/api-web/export/teacherDefaultSalary";
- let data = { organIdList };
- const options = {
- method: "POST",
- headers: {
- Authorization: getToken(),
- },
- data: qs.stringify(cleanDeep(data)),
- url,
- responseType: "blob",
- };
- this.$confirm("您确定导出老师默认课酬表", "提示", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning",
- })
- .then(() => {
- load.startLoading();
- axios(options)
- .then((res) => {
- let blob = new Blob([res.data], {
- // type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8'
- type: "application/vnd.ms-excel;charset=utf-8",
- //word文档为application/msword,pdf文档为application/pdf,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8
- });
- let text = new Response(blob).text();
- text.then((res) => {
- // 判断是否报错
- if (res.indexOf("code") != -1) {
- let json = JSON.parse(res);
- this.$message.error(json.msg);
- } else {
- let objectUrl = URL.createObjectURL(blob);
- let link = document.createElement("a");
- let nowTime = new Date();
- let ymd =
- nowTime.getFullYear() +
- "" +
- (nowTime.getMonth() + 1) +
- "" +
- nowTime.getDate();
- let fname = ymd + "老师默认课酬表.xls"; //下载文件的名字
- link.href = objectUrl;
- link.setAttribute("download", fname);
- document.body.appendChild(link);
- link.click();
- }
- });
- load.endLoading();
- })
- .catch((error) => {
- this.$message.error("导出数据失败,请联系管理员");
- load.endLoading();
- });
- })
- .catch(() => {});
- },
- exportMusicTeamNum() {
- let organIds = this.musicTeamNum.join(",");
- let url = "/api-web/export/musicGroupNormalStudentNum";
- let data = { organIds };
- const options = {
- method: "POST",
- headers: {
- Authorization: getToken(),
- },
- data: qs.stringify(cleanDeep(data)),
- url,
- responseType: "blob",
- };
- this.$confirm("您确定导出乐团在读人数", "提示", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning",
- })
- .then(() => {
- load.startLoading();
- axios(options)
- .then((res) => {
- let blob = new Blob([res.data], {
- // type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8'
- type: "application/vnd.ms-excel;charset=utf-8",
- //word文档为application/msword,pdf文档为application/pdf,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8
- });
- let text = new Response(blob).text();
- text.then((res) => {
- // 判断是否报错
- if (res.indexOf("code") != -1) {
- let json = JSON.parse(res);
- this.$message.error(json.msg);
- } else {
- let objectUrl = URL.createObjectURL(blob);
- let link = document.createElement("a");
- let nowTime = new Date();
- let ymd =
- nowTime.getFullYear() +
- "" +
- (nowTime.getMonth() + 1) +
- "" +
- nowTime.getDate();
- let fname = ymd + "乐团在读人数.xls"; //下载文件的名字
- link.href = objectUrl;
- link.setAttribute("download", fname);
- document.body.appendChild(link);
- link.click();
- }
- });
- load.endLoading();
- })
- .catch((error) => {
- this.$message.error("导出数据失败,请联系管理员");
- load.endLoading();
- });
- })
- .catch(() => {});
- },
- exportStudent() {
- if (!this.studentMonth) {
- this.$message.error("请选择导出月份");
- return;
- }
- let studentOrganId = this.studentOrganId.join(",");
- let url = "/api-web/export/studentOrder";
- let data = { organIds: studentOrganId, date: this.studentMonth };
- const options = {
- method: "POST",
- headers: {
- Authorization: getToken(),
- },
- data: qs.stringify(cleanDeep(data)),
- url,
- responseType: "blob",
- };
- this.$confirm("您确定导出回款统计", "提示", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning",
- })
- .then(() => {
- load.startLoading();
- axios(options)
- .then((res) => {
- let blob = new Blob([res.data], {
- // type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8'
- type: "application/vnd.ms-excel;charset=utf-8",
- //word文档为application/msword,pdf文档为application/pdf,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8
- });
- let text = new Response(blob).text();
- text.then((res) => {
- // 判断是否报错
- if (res.indexOf("code") != -1) {
- let json = JSON.parse(res);
- this.$message.error(json.msg);
- } else {
- let objectUrl = URL.createObjectURL(blob);
- let link = document.createElement("a");
- let nowTime = new Date();
- let ymd =
- nowTime.getFullYear() +
- "" +
- (nowTime.getMonth() + 1) +
- "" +
- nowTime.getDate();
- let fname = ymd + "回款统计.xls"; //下载文件的名字
- link.href = objectUrl;
- link.setAttribute("download", fname);
- document.body.appendChild(link);
- link.click();
- }
- });
- load.endLoading();
- })
- .catch((error) => {
- this.$message.error("导出数据失败,请联系管理员");
- load.endLoading();
- });
- })
- .catch(() => {});
- },
- exportAttendance() {
- let classStartDate, classEndDate;
- if (this.timer && this.timer.length > 0) {
- classStartDate = this.timer[0];
- classEndDate = this.timer[1];
- } else {
- classStartDate = null;
- classEndDate = null;
- }
- Export(
- this,
- {
- url: "/api-web/export/exportStudentAttendances",
- fileName: "学生考勤.xls",
- method: "post",
- params: qs.stringify({
- organId: this.attendanceOrganId.join(","),
- groupType: this.attendanceCourseType,
- classStartDate,
- classEndDate,
- }),
- },
- "您确定导出学生考勤?"
- );
- },
- exportTrain() {
- if (!this.trainOrganId) {
- this.$message.error("请选择分部");
- return;
- }
- Export(
- this,
- {
- url: "/api-web/export/cloudStudyStudentTrainData",
- fileName: "云教练学员统计.xls",
- method: "post",
- params: qs.stringify({
- organId: this.trainOrganId,
- }),
- },
- "您确定导出云教练学员统计?"
- );
- },
- exportQuestion() {
- Export(
- this,
- {
- url: "/api-web/questionnaireUserResult/export",
- fileName: "问卷调查.xls",
- method: "get",
- params: { activeType: this.questionActiveType },
- },
- "您确定导出问卷调查?"
- );
- },
- exportLeBao() {
- let endTime, startTime;
- if (this.leBaoTimer && this.leBaoTimer.length > 1) {
- startTime = this.leBaoTimer[0];
- let end = this.leBaoTimer[1];
- end = new Date(end);
- end = new Date(end.getFullYear(), end.getMonth() + 1, 0);
- endTime = dayjs(end).format("YYYY-MM-DD");
- } else {
- this.$message.error("请选择导出月份");
- return;
- }
- Export(
- this,
- {
- url: "/api-web/studentInstrument/export",
- fileName: "乐保订单.xls",
- method: "get",
- params: { startTime: startTime, endTime: endTime },
- },
- "您确定导出乐保订单?"
- );
- },
- exportAccount() {
- let endTime, startTime;
- if (this.AccountTimer && this.AccountTimer.length > 1) {
- startTime = this.AccountTimer[0];
- endTime = this.AccountTimer[1];
- } else {
- startTime = null;
- endTime = null;
- }
- Export(
- this,
- {
- url: "/api-web/export/userCoursesAccount",
- fileName: "课程余额明细.xls",
- method: "post",
- params: qs.stringify({
- startTime: startTime,
- endTime: endTime,
- organId: this.AccountOrganId.join(","),
- }),
- },
- "您确定导出课程余额明细?"
- );
- },
- exportDetailAccount() {
- let endTime, startTime;
- if (this.AccountDetailTimer && this.AccountDetailTimer.length > 1) {
- startTime = this.AccountDetailTimer[0];
- endTime = this.AccountDetailTimer[1];
- } else {
- startTime = null;
- endTime = null;
- }
- Export(
- this,
- {
- url: "/api-web/export/userCashAccountDetail",
- fileName: "账户余额明细.xls",
- method: "post",
- params: qs.stringify({
- startTime: startTime,
- endTime: endTime,
- organId: this.AccountDetailOrganId.join(","),
- }),
- },
- "您确定导出账户余额明细?"
- );
- },
- exportVip() {
- if (!this.vipOrganId.length < 0) {
- this.$message.error("请选择分部");
- return;
- }
- let data = qs.stringify({
- organId: this.vipOrganId.join(","),
- });
- let url = "/api-web/export/studentVipPractice";
- const options = {
- method: "POST",
- headers: {
- Authorization: getToken(),
- },
- data: qs.stringify(cleanDeep(data)),
- url,
- responseType: "json",
- };
- this.$confirm("您确定导出VIP网管课耗", "提示", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning",
- })
- .then(() => {
- load.startLoading();
- axios(options)
- .then((res) => {
- load.endLoading();
- if (res.data.code == 200) {
- this.$message.info(res.data.msg);
- } else {
- this.$message.error(res.data.msg);
- }
- // this.$confirm(res.data.data, "提示", {
- // confirmButtonText: "确定",
- // cancelButtonText: "取消",
- // type: "warning",
- // }).then(() => {
- // }).catch(err => {
- // })
- })
- .catch((error) => {
- this.$message.error("导出数据失败,请联系管理员");
- load.endLoading();
- });
- })
- .catch(() => {});
- // Export(
- // this,
- // {
- // url: "/api-web/export/studentVipPractice",
- // fileName: "vip网管课.xls",
- // method: "post",
- // params: qs.stringify({
- // organId: this.vipOrganId.join(',')
- // }),
- // },
- // "您确定导出vip网管课?"
- // );
- },
- },
- // AccountDetailTimer
- };
- </script>
- <style lang="scss" scoped>
- .m-container {
- .m-core {
- margin-top: 20px;
- .m-wrap {
- display: flex;
- flex-direction: row;
- justify-content: flex-start;
- width: 100%;
- // align-items: center;
- .newBand {
- margin: 0 5px 0 10px;
- }
- .title {
- width: 150px;
- height: 40px;
- line-height: 40px;
- text-align: right;
- color: #606266;
- }
- .organSelect {
- width: 220px !important;
- }
- .el-tooltip.micon {
- width: 20px;
- height: 20px;
- position: relative;
- top: 12px;
- }
- }
- }
- }
- /deep/.el-input__icon.el-icon-date {
- height: 40px !important;
- }
- </style>
|