index.vue 54 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609
  1. <template>
  2. <div class="m-container">
  3. <h2>
  4. <div class="squrt"></div>
  5. 报表中心
  6. </h2>
  7. <div class="m-core">
  8. <el-collapse v-model="activeName" class="formCollapse">
  9. <el-collapse-item
  10. name="1"
  11. v-if="
  12. $helpers.permission('export/musicGroupRegister') ||
  13. $helpers.permission('export/musicGroupNormalStudentNum') ||
  14. $helpers.permission('export/exportStudentAttendances') ||
  15. $helpers.permission('export/cloudStudyStudentTrainData')
  16. "
  17. >
  18. <template slot="title">
  19. <p class="wrapTitle">教务信息</p>
  20. </template>
  21. <div class="m-wrap" v-permission="'export/musicGroupRegister'">
  22. <div class="title">乐团招生汇总:</div>
  23. <select-all
  24. v-model.trim="organIdList"
  25. class="organSelect"
  26. style="width: 100%"
  27. filterable
  28. placeholder="请选择分部"
  29. multiple
  30. clearable
  31. >
  32. <el-option
  33. v-for="(item, index) in selects.branchs"
  34. :key="index"
  35. :label="item.name"
  36. :value="item.id"
  37. ></el-option>
  38. </select-all>
  39. <!-- <el-button
  40. style="margin-left: 10px"
  41. type="primary"
  42. @click="exportMusicGroup"
  43. >导出</el-button
  44. > -->
  45. <ExportChiose
  46. style="margin-left: 10px"
  47. ExportEnum="MUSIC_GROUP_REGISTER"
  48. :exportData="{ organIds: this.organIdList.join(',') }"
  49. fileName="招生情况汇总表"
  50. errorMsg="请至少选择一个分部"
  51. :flag="this.organIdList.length < 1"
  52. />
  53. <el-tooltip placement="top" popper-class="mTooltip">
  54. <div slot="content">
  55. 请选择分部后,导出招生情况汇总表,分部可多选
  56. </div>
  57. <i
  58. class="el-icon-question micon el-tooltip"
  59. v-permission="'export/musicGroupRegister'"
  60. style="font-size: 18px; color: #f56c6c"
  61. ></i>
  62. </el-tooltip>
  63. </div>
  64. <div
  65. class="m-wrap"
  66. v-permission="'export/musicGroupNormalStudentNum'"
  67. >
  68. <div class="title">乐团在读人数:</div>
  69. <select-all
  70. v-model.trim="musicTeamNum"
  71. class="organSelect"
  72. style="width: 100%"
  73. filterable
  74. multiple
  75. placeholder="请选择分部"
  76. clearable
  77. >
  78. <el-option
  79. v-for="(item, index) in selects.branchs"
  80. :key="index"
  81. :label="item.name"
  82. :value="item.id"
  83. ></el-option>
  84. </select-all>
  85. <!-- <el-button
  86. style="margin-left: 10px"
  87. type="primary"
  88. @click="exportMusicTeamNum"
  89. >导出</el-button
  90. > -->
  91. <ExportChiose
  92. style="margin-left: 10px"
  93. ExportEnum="MUSIC_GROUP_NORMAL_STUDENT_NUM"
  94. :exportData="{ organIds: this.musicTeamNum.join(',') }"
  95. fileName="乐团在读人数"
  96. errorMsg="请至少选择一个分部"
  97. />
  98. <el-tooltip placement="top" popper-class="mTooltip">
  99. <div slot="content">请选择分部后,导出乐团在读人数信息</div>
  100. <i
  101. class="el-icon-question micon el-tooltip"
  102. style="font-size: 18px; color: #f56c6c"
  103. ></i>
  104. </el-tooltip>
  105. </div>
  106. <div class="m-wrap" v-permission="'export/exportStudentAttendances'">
  107. <div class="title">学生考勤:</div>
  108. <select-all
  109. v-model.trim="attendanceOrganId"
  110. class="organSelect"
  111. style="width: 100%"
  112. filterable
  113. multiple
  114. placeholder="请选择分部"
  115. clearable
  116. >
  117. <el-option
  118. v-for="(item, index) in selects.branchs"
  119. :key="index"
  120. :label="item.name"
  121. :value="item.id"
  122. ></el-option>
  123. </select-all>
  124. <el-select
  125. v-model.trim="attendanceCourseType"
  126. class="organSelect"
  127. style="margin-left: 15px; width: 100%"
  128. filterable
  129. placeholder="请选择课程类型"
  130. >
  131. <el-option
  132. v-for="(item, index) in courseListType"
  133. :key="index"
  134. :label="item.label"
  135. :value="item.value"
  136. ></el-option>
  137. </el-select>
  138. <el-date-picker
  139. v-model.trim="timer"
  140. style="width: 360px; margin-left: 15px"
  141. type="daterange"
  142. value-format="yyyy-MM-dd"
  143. range-separator="至"
  144. start-placeholder="上课开始日期"
  145. end-placeholder="上课结束日期"
  146. :picker-options="{
  147. firstDayOfWeek: 1,
  148. }"
  149. ></el-date-picker>
  150. <!-- <el-button
  151. style="margin-left: 10px"
  152. type="primary"
  153. @click="exportAttendance"
  154. >导出</el-button
  155. > -->
  156. <ExportChiose
  157. style="margin-left: 10px"
  158. ExportEnum="EXPORT_STUDENT_ATTENDANCES"
  159. :exportData="exportAttendance"
  160. fileName="学生考勤"
  161. errorMsg="请至少选择一个分部"
  162. />
  163. </div>
  164. <div
  165. class="m-wrap"
  166. v-permission="'export/cloudStudyStudentTrainData'"
  167. >
  168. <div class="title">团练宝学员统计:</div>
  169. <el-select
  170. v-model.trim="trainOrganId"
  171. class="organSelect"
  172. style="width: 100%"
  173. filterable
  174. placeholder="请选择分部"
  175. clearable
  176. >
  177. <el-option
  178. v-for="(item, index) in selects.branchs"
  179. :key="index"
  180. :label="item.name"
  181. :value="item.id"
  182. ></el-option>
  183. </el-select>
  184. <!-- <el-button
  185. style="margin-left: 10px"
  186. type="primary"
  187. @click="exportTrain"
  188. >导出</el-button
  189. > -->
  190. <ExportChiose
  191. style="margin-left: 10px"
  192. ExportEnum="CLOUD_STUDY_STUDENT_TRAIN_DATA"
  193. :exportData="exportTrain"
  194. fileName="团练宝学员统计"
  195. errorMsg="请选择分部"
  196. :flag="!this.trainOrganId"
  197. />
  198. </div>
  199. </el-collapse-item>
  200. <el-collapse-item
  201. name="2"
  202. v-if="
  203. $helpers.permission('export/teacherDefaultSalary') ||
  204. $helpers.permission('export/studentOrder') ||
  205. $helpers.permission('studentInstrument/export') ||
  206. $helpers.permission('export/studentVipPractice') ||
  207. $helpers.permission('export/exercisesSituation') ||
  208. $helpers.permission('export/exportIndexErrData')
  209. "
  210. >
  211. <template slot="title">
  212. <p class="wrapTitle">运营数据</p>
  213. </template>
  214. <div class="m-wrap" v-permission="'export/teacherDefaultSalary'">
  215. <div class="title">老师默认课酬:</div>
  216. <select-all
  217. v-model.trim="teacherDefaultSalaryOrganId"
  218. class="organSelect"
  219. style="width: 100%"
  220. filterable
  221. placeholder="请选择分部"
  222. multiple
  223. clearable
  224. >
  225. <el-option
  226. v-for="(item, index) in selects.branchs"
  227. :key="index"
  228. :label="item.name"
  229. :value="item.id"
  230. ></el-option>
  231. </select-all>
  232. <!-- <el-button
  233. style="margin-left: 10px"
  234. type="primary"
  235. @click="exportDefaultSalary"
  236. >导出</el-button
  237. > -->
  238. <ExportChiose
  239. style="margin-left: 10px"
  240. ExportEnum="TEACHER_DEFAULT_SALARY"
  241. :exportData="exportDefaultSalary"
  242. fileName="老师默认课酬"
  243. errorMsg="请至少选择一个分部"
  244. />
  245. <el-tooltip placement="top" popper-class="mTooltip">
  246. <div slot="content">请选择分部后,导出老师列表及老师课酬信息</div>
  247. <i
  248. class="el-icon-question micon el-tooltip"
  249. style="font-size: 18px; color: #f56c6c"
  250. v-permission="'export/teacherDefaultSalary'"
  251. ></i>
  252. </el-tooltip>
  253. </div>
  254. <div class="m-wrap" v-permission="'export/studentOrder'">
  255. <div class="title">回款统计:</div>
  256. <select-all
  257. v-model.trim="studentOrganId"
  258. class="organSelect"
  259. style="width: 100%"
  260. filterable
  261. placeholder="请选择分部"
  262. multiple
  263. clearable
  264. >
  265. <el-option
  266. v-for="(item, index) in selects.branchs"
  267. :key="index"
  268. :label="item.name"
  269. :value="item.id"
  270. ></el-option>
  271. </select-all>
  272. <el-date-picker
  273. style="margin-left: 15px"
  274. v-model="studentMonth"
  275. type="month"
  276. placeholder="选择月"
  277. value-format="yyyy-MM-dd"
  278. ></el-date-picker>
  279. <!-- <el-button
  280. style="margin-left: 10px"
  281. type="primary"
  282. @click="exportStudent"
  283. >导出</el-button
  284. > -->
  285. <ExportChiose
  286. style="margin-left: 10px"
  287. ExportEnum="STUDENT_ORDER"
  288. :exportData="exportStudent"
  289. fileName="回款统计"
  290. errorMsg="请选择导出月份"
  291. :flag="!this.studentMonth"
  292. />
  293. <el-tooltip placement="top" popper-class="mTooltip">
  294. <div slot="content">请选择分部和月份,导出回款统计</div>
  295. <i
  296. class="el-icon-question micon el-tooltip"
  297. style="font-size: 18px; color: #f56c6c"
  298. v-permission="'export/studentOrder'"
  299. ></i>
  300. </el-tooltip>
  301. </div>
  302. <div class="m-wrap" v-permission="'studentInstrument/export'">
  303. <div class="title">乐保订单导出:</div>
  304. <el-date-picker
  305. v-model="leBaoTimer"
  306. style="width: 360px"
  307. type="monthrange"
  308. value-format="yyyy-MM-dd"
  309. range-separator="至"
  310. start-placeholder="开始月份"
  311. end-placeholder="结束月份"
  312. >
  313. </el-date-picker>
  314. <!-- <el-button
  315. style="margin-left: 10px"
  316. type="primary"
  317. @click="exportLeBao"
  318. >导出</el-button
  319. > -->
  320. <ExportChiose
  321. style="margin-left: 10px"
  322. ExportEnum="STUDENT_INSTRUMENT"
  323. :exportData="exportLeBao"
  324. fileName="乐保订单"
  325. errorMsg="请选择导出月份"
  326. :flag="!(leBaoTimer && leBaoTimer.length > 1)"
  327. />
  328. <!-- <el-tooltip placement="top"
  329. popper-class="mTooltip">
  330. <div slot="content">
  331. 请选择分部和月份,导出回款统计
  332. </div>
  333. <i class="el-icon-question micon el-tooltip"
  334. style="font-size: 18px; color: #F56C6C"
  335. v-permission="'export/studentOrder'"></i>
  336. </el-tooltip> -->
  337. </div>
  338. <div class="m-wrap" v-permission="'export/studentVipPractice'">
  339. <div class="title">VIP网管课耗导出:</div>
  340. <select-all
  341. v-model.trim="vipOrganId"
  342. class="organSelect"
  343. style="width: 100%"
  344. filterable
  345. placeholder="请选择分部"
  346. clearable
  347. >
  348. <el-option
  349. v-for="(item, index) in selects.branchs"
  350. :key="index"
  351. :label="item.name"
  352. :value="item.id"
  353. ></el-option>
  354. </select-all>
  355. <!-- <el-button
  356. style="margin-left: 10px"
  357. type="primary"
  358. @click="exportVip"
  359. >导出</el-button
  360. > -->
  361. <ExportChiose
  362. style="margin-left: 10px"
  363. ExportEnum="STUDENT_VIP_PRACTICE"
  364. :exportData="exportVip"
  365. fileName="VIP网管课耗"
  366. errorMsg="请选择分部"
  367. :flag="vipOrganId.length <= 0"
  368. :isDownList="true"
  369. />
  370. </div>
  371. <div class="m-wrap" v-permission="'export/exercisesSituation'">
  372. <div class="title">服务指标明细导出:</div>
  373. <select-all
  374. v-model.trim="serviceOrganId"
  375. class="organSelect"
  376. style="width: 100%"
  377. filterable
  378. multiple
  379. placeholder="请选择分部"
  380. clearable
  381. >
  382. <el-option
  383. v-for="(item, index) in selects.branchs"
  384. :key="index"
  385. :label="item.name"
  386. :value="item.id"
  387. ></el-option>
  388. </select-all>
  389. <el-date-picker
  390. v-model.trim="serviceTimer"
  391. style="width: 360px; margin-left: 15px"
  392. type="daterange"
  393. value-format="yyyy-MM-dd"
  394. range-separator="至"
  395. start-placeholder="开始日期"
  396. end-placeholder="结束日期"
  397. @change="getWeekTime"
  398. :picker-options="{
  399. firstDayOfWeek: 1,
  400. }"
  401. ></el-date-picker>
  402. <!-- <el-button
  403. style="margin-left: 10px"
  404. type="primary"
  405. @click="exportDetailService"
  406. >导出</el-button
  407. > -->
  408. <ExportChiose
  409. style="margin-left: 10px"
  410. ExportEnum="EXERCISES_SITUATION"
  411. :exportData="exportDetailService"
  412. fileName="服务指标明细"
  413. errorMsg="请选择导出月份"
  414. />
  415. </div>
  416. <div class="m-wrap" v-permission="'export/exportIndexErrData'">
  417. <div class="title">异常处理数据导出:</div>
  418. <el-select
  419. clearable
  420. filterable
  421. class="organSelect"
  422. v-model="Abnormal.organId"
  423. placeholder="请选择分部"
  424. >
  425. <el-option
  426. v-for="(item, index) in selects.branchs"
  427. :key="index"
  428. :label="item.name"
  429. :value="item.id+''"
  430. ></el-option>
  431. </el-select>
  432. <!-- <el-button
  433. type="primary"
  434. style="margin-left: 10px"
  435. @click="exportAbnormal"
  436. >导出</el-button
  437. > -->
  438. <ExportChiose
  439. style="margin-left: 10px"
  440. ExportEnum="EXPORT_INDEX_ERR_DATA"
  441. :exportData="exportAbnormal"
  442. fileName="异常处理数据导出"
  443. errorMsg="请选择分部"
  444. />
  445. </div>
  446. <div class="m-wrap" v-permission="'export/STUDENT_VIP_COURSE_INFO'">
  447. <div class="title">VIP课学员课程导出:</div>
  448. <select-all
  449. v-model.trim="vipStudentCourseOrganId"
  450. class="organSelect"
  451. style="width: 100%"
  452. filterable
  453. multiple
  454. placeholder="请选择分部"
  455. clearable
  456. >
  457. <el-option
  458. v-for="(item, index) in selects.branchs"
  459. :key="index"
  460. :label="item.name"
  461. :value="item.id"
  462. ></el-option>
  463. </select-all>
  464. <ExportChiose
  465. style="margin-left: 10px"
  466. ExportEnum="STUDENT_VIP_COURSE_INFO"
  467. :exportData="exportAbnormal"
  468. fileName="VIP课学员课程信息导出"
  469. errorMsg="请选择分部"
  470. :flag="this.vipStudentCourseOrganId.length < 1"
  471. :isDownList="true"
  472. />
  473. </div>
  474. <div class="m-wrap" v-permission="'export/STUDENT_MUSIC_THEORY_COURSE_INFO'">
  475. <div class="title">乐理课学员课程导出:</div>
  476. <select-all
  477. v-model.trim="musicStudentCourseOrganId"
  478. class="organSelect"
  479. style="width: 100%"
  480. filterable
  481. multiple
  482. placeholder="请选择分部"
  483. clearable
  484. >
  485. <el-option
  486. v-for="(item, index) in selects.branchs"
  487. :key="index"
  488. :label="item.name"
  489. :value="item.id"
  490. ></el-option>
  491. </select-all>
  492. <ExportChiose
  493. style="margin-left: 10px"
  494. ExportEnum="STUDENT_MUSIC_THEORY_COURSE_INFO"
  495. :exportData="exportAbnormal"
  496. fileName="乐理课学员课程信息导出"
  497. errorMsg="请选择分部"
  498. :flag="this.musicStudentCourseOrganId.length < 1"
  499. :isDownList="true"
  500. />
  501. </div>
  502. </el-collapse-item>
  503. <el-collapse-item
  504. name="3"
  505. v-if="
  506. $helpers.permission('export/teacherSalary') ||
  507. $helpers.permission('export/userCoursesAccount/4388') ||
  508. $helpers.permission('export/userCashAccountDetail/4389')
  509. "
  510. >
  511. <template slot="title">
  512. <p class="wrapTitle">财务数据</p>
  513. </template>
  514. <div class="m-wrap" v-permission="'export/teacherSalary'">
  515. <div class="title">课酬导出:</div>
  516. <el-date-picker
  517. v-model="mouth"
  518. type="month"
  519. placeholder="选择月"
  520. value-format="yyyy-MM-dd"
  521. class="organSelect"
  522. ></el-date-picker>
  523. <!-- <el-select v-model.trim="courseScheduleType"
  524. style="marginLeft:10px"
  525. filterable
  526. clearable
  527. multiple
  528. placeholder="课程类型">
  529. <el-option v-for="(item, index) in courseArray"
  530. :key="index"
  531. :label="item.label"
  532. :value="item.value"></el-option>
  533. </el-select> -->
  534. <!-- <el-button
  535. style="margin-left: 10px"
  536. type="primary"
  537. @click="exportSalar"
  538. >导出</el-button
  539. > -->
  540. <ExportChiose
  541. style="margin-left: 10px"
  542. ExportEnum="TEACHER_SALARY"
  543. :exportData="exportSalar"
  544. fileName="课酬导出"
  545. errorMsg="请选择月份"
  546. :flag="!this.mouth"
  547. />
  548. <el-tooltip placement="top" popper-class="mTooltip">
  549. <div slot="content">将只导出当前选择月份已结算的课程课酬。</div>
  550. <i
  551. class="el-icon-question micon el-tooltip"
  552. style="font-size: 18px; color: #f56c6c"
  553. v-permission="'export/teacherSalary'"
  554. ></i>
  555. </el-tooltip>
  556. </div>
  557. <div class="m-wrap" v-permission="'export/userCoursesAccount/4388'">
  558. <div class="title">课程余额明细:</div>
  559. <select-all
  560. v-model.trim="AccountOrganId"
  561. class="organSelect"
  562. style="width: 100%"
  563. filterable
  564. multiple
  565. placeholder="请选择分部"
  566. clearable
  567. >
  568. <el-option
  569. v-for="(item, index) in selects.branchs"
  570. :key="index"
  571. :label="item.name"
  572. :value="item.id"
  573. ></el-option>
  574. </select-all>
  575. <el-date-picker
  576. v-model.trim="AccountTimer"
  577. style="width: 360px; margin-left: 15px"
  578. type="daterange"
  579. value-format="yyyy-MM-dd"
  580. range-separator="至"
  581. start-placeholder="开始日期"
  582. end-placeholder="结束日期"
  583. :picker-options="{
  584. firstDayOfWeek: 1,
  585. }"
  586. ></el-date-picker>
  587. <!-- <el-button
  588. style="margin-left: 10px"
  589. type="primary"
  590. @click="exportAccount"
  591. >导出</el-button
  592. > -->
  593. <ExportChiose
  594. style="margin-left: 10px"
  595. ExportEnum="USER_COURSES_ACCOUNT"
  596. :exportData="exportAccount"
  597. fileName="课程余额明细"
  598. errorMsg="请选择月份"
  599. />
  600. </div>
  601. <div
  602. class="m-wrap"
  603. v-permission="'export/userCashAccountDetail/4389'"
  604. >
  605. <div class="title">账户余额明细:</div>
  606. <select-all
  607. v-model.trim="AccountDetailOrganId"
  608. class="organSelect"
  609. style="width: 100%"
  610. filterable
  611. multiple
  612. placeholder="请选择分部"
  613. clearable
  614. >
  615. <el-option
  616. v-for="(item, index) in selects.branchs"
  617. :key="index"
  618. :label="item.name"
  619. :value="item.id"
  620. ></el-option>
  621. </select-all>
  622. <el-date-picker
  623. v-model.trim="AccountDetailTimer"
  624. style="width: 360px; margin-left: 15px"
  625. type="daterange"
  626. value-format="yyyy-MM-dd"
  627. range-separator="至"
  628. start-placeholder="开始日期"
  629. end-placeholder="结束日期"
  630. :picker-options="{
  631. firstDayOfWeek: 1,
  632. }"
  633. ></el-date-picker>
  634. <!-- <el-button
  635. style="margin-left: 10px"
  636. type="primary"
  637. @click="exportDetailAccount"
  638. >导出</el-button
  639. > -->
  640. <ExportChiose
  641. style="margin-left: 10px"
  642. ExportEnum="USER_CASH_ACCOUNT_DETAIL"
  643. :exportData="exportAccount"
  644. fileName="课程余额明细"
  645. errorMsg="请选择月份"
  646. />
  647. </div>
  648. </el-collapse-item>
  649. <el-collapse-item
  650. name="4"
  651. v-if="$helpers.permission('questionnaireUserResult/export/report')"
  652. >
  653. <template slot="title">
  654. <p class="wrapTitle">其他数据</p>
  655. </template>
  656. <div
  657. class="m-wrap"
  658. v-if="$helpers.permission('questionnaireUserResult/export/report')"
  659. >
  660. <div class="title">问卷调查:</div>
  661. <el-select
  662. v-model.trim="questionActiveType"
  663. class="organSelect"
  664. style="width: 100%"
  665. filterable
  666. placeholder="请选择导出类型"
  667. clearable
  668. >
  669. <el-option
  670. label="团练宝用户反馈"
  671. value="CLOUD_TEACHER_FEEDBACK"
  672. ></el-option>
  673. </el-select>
  674. <el-button
  675. style="margin-left: 10px"
  676. type="primary"
  677. @click="exportQuestion"
  678. >导出</el-button
  679. >
  680. <!-- <ExportChiose
  681. style="margin-left: 10px"
  682. ExportEnum="USER_CASH_ACCOUNT_DETAIL"
  683. :exportData="{ activeType: this.questionActiveType }"
  684. fileName="问卷调查"
  685. errorMsg="请选择月份"
  686. /> -->
  687. </div>
  688. </el-collapse-item>
  689. </el-collapse>
  690. </div>
  691. </div>
  692. </template>
  693. <script>
  694. import { exportTeacherSalary } from "@/api/generalSettings";
  695. import { courseType, courseListType } from "@/utils/searchArray";
  696. import ExportChiose from "@/components/Export-chiose";
  697. import { Export } from "@/utils/downLoadFile";
  698. import cleanDeep from "clean-deep";
  699. import qs from "qs";
  700. import dayjs from "dayjs";
  701. import axios from "axios";
  702. import { getToken, getTenantId } from "@/utils/auth";
  703. import load from "@/utils/loading";
  704. export default {
  705. name: "reportForm",
  706. components: {
  707. ExportChiose,
  708. },
  709. data() {
  710. return {
  711. mouth: "",
  712. organIdList: [],
  713. teacherDefaultSalaryOrganId: [],
  714. courseArray: courseType,
  715. courseListType,
  716. courseScheduleType: [],
  717. musicTeamNum: [],
  718. studentOrganId: [],
  719. studentMonth: "",
  720. attendanceOrganId: [],
  721. attendanceCourseType: "MUSIC",
  722. timer: [],
  723. leBaoTimer: [],
  724. AccountOrganId: [],
  725. AccountTimer: [],
  726. AccountDetailOrganId: [],
  727. AccountDetailTimer: [],
  728. trainOrganId: null,
  729. questionActiveType: "CLOUD_TEACHER_FEEDBACK",
  730. vipOrganId: [],
  731. serviceOrganId: [], // 服务报表
  732. serviceTimer: [],
  733. Abnormal: {
  734. organId: null,
  735. },
  736. activeName: ["1", "2", "3", "4"],
  737. vipStudentCourseOrganId: [],
  738. musicStudentCourseOrganId: [],
  739. };
  740. },
  741. mounted() {
  742. this.$store.dispatch("setBranchs");
  743. },
  744. methods: {
  745. // exportSalar() {
  746. // if (!this.mouth) {
  747. // this.$message.error("请选择导出月份");
  748. // return;
  749. // }
  750. // // let courseTypeList = this.courseScheduleType.join(',')
  751. // let url = "/api-web/export/teacherSalary";
  752. // let data = { date: this.mouth };
  753. // const options = {
  754. // method: "POST",
  755. // headers: {
  756. // Authorization: getToken(),
  757. // tenantId: getTenantId(),
  758. // },
  759. // data: qs.stringify(cleanDeep(data)),
  760. // url,
  761. // responseType: "blob",
  762. // };
  763. // this.$confirm("您确定导出课酬", "提示", {
  764. // confirmButtonText: "确定",
  765. // cancelButtonText: "取消",
  766. // type: "warning",
  767. // })
  768. // .then(() => {
  769. // load.startLoading();
  770. // axios(options)
  771. // .then((res) => {
  772. // let blob = new Blob([res.data], {
  773. // // type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8'
  774. // type: "application/vnd.ms-excel;charset=utf-8",
  775. // //word文档为application/msword,pdf文档为application/pdf,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8
  776. // });
  777. // let text = new Response(blob).text();
  778. // text.then((res) => {
  779. // // 判断是否报错
  780. // if (res.indexOf("code") != -1) {
  781. // let json = JSON.parse(res);
  782. // if (json.code == 403) {
  783. // this.$message.error(`登录过期,请重新登录!`);
  784. // setTimeout(() => {
  785. // this.$store.dispatch("user/resetToken").then(() => {
  786. // location.reload();
  787. // });
  788. // }, 1000);
  789. // return;
  790. // }
  791. // this.$message.error(json.msg);
  792. // } else {
  793. // let objectUrl = URL.createObjectURL(blob);
  794. // let link = document.createElement("a");
  795. // let nowTime = new Date();
  796. // let ymd =
  797. // nowTime.getFullYear() +
  798. // "" +
  799. // (nowTime.getMonth() + 1) +
  800. // "" +
  801. // nowTime.getDate();
  802. // let fname = ymd + "课酬.xls"; //下载文件的名字
  803. // link.href = objectUrl;
  804. // link.setAttribute("download", fname);
  805. // document.body.appendChild(link);
  806. // link.click();
  807. // }
  808. // });
  809. // load.endLoading();
  810. // })
  811. // .catch((error) => {
  812. // this.$message.error("导出数据失败,请联系管理员");
  813. // load.endLoading();
  814. // });
  815. // })
  816. // .catch(() => {});
  817. // },
  818. exportMusicGroup() {
  819. if (this.organIdList.length < 1) {
  820. this.$message.error("请至少选择一个分部");
  821. return;
  822. }
  823. let url = "/api-web/export/musicGroupRegister";
  824. let data = { organIds: this.organIdList.join(",") };
  825. const options = {
  826. method: "POST",
  827. headers: {
  828. Authorization: getToken(),
  829. tenantId: getTenantId(),
  830. },
  831. data: qs.stringify(cleanDeep(data)),
  832. url,
  833. responseType: "blob",
  834. };
  835. this.$confirm("您确定导出招生情况汇总表", "提示", {
  836. confirmButtonText: "确定",
  837. cancelButtonText: "取消",
  838. type: "warning",
  839. })
  840. .then(() => {
  841. load.startLoading();
  842. axios(options)
  843. .then((res) => {
  844. let blob = new Blob([res.data], {
  845. // type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8'
  846. type: "application/vnd.ms-excel;charset=utf-8",
  847. //word文档为application/msword,pdf文档为application/pdf,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8
  848. });
  849. let text = new Response(blob).text();
  850. text.then((res) => {
  851. // 判断是否报错
  852. if (res.indexOf("code") != -1) {
  853. let json = JSON.parse(res);
  854. if (json.code == 403) {
  855. this.$message.error(`登录过期,请重新登录!`);
  856. setTimeout(() => {
  857. this.$store.dispatch("user/resetToken").then(() => {
  858. location.reload();
  859. });
  860. }, 1000);
  861. return;
  862. }
  863. this.$message.error(json.msg);
  864. } else {
  865. let objectUrl = URL.createObjectURL(blob);
  866. let link = document.createElement("a");
  867. let nowTime = new Date();
  868. let ymd =
  869. nowTime.getFullYear() +
  870. "" +
  871. (nowTime.getMonth() + 1) +
  872. "" +
  873. nowTime.getDate();
  874. let fname = ymd + "招生情况汇总表.xls"; //下载文件的名字
  875. link.href = objectUrl;
  876. link.setAttribute("download", fname);
  877. document.body.appendChild(link);
  878. link.click();
  879. }
  880. });
  881. load.endLoading();
  882. })
  883. .catch((error) => {
  884. this.$message.error("导出数据失败,请联系管理员");
  885. load.endLoading();
  886. });
  887. })
  888. .catch(() => {});
  889. },
  890. // exportDefaultSalary() {
  891. // let organIdList = this.teacherDefaultSalaryOrganId.join(",");
  892. // let url = "/api-web/export/teacherDefaultSalary";
  893. // let data = { organIdList };
  894. // return data;
  895. // const options = {
  896. // method: "POST",
  897. // headers: {
  898. // Authorization: getToken(),
  899. // tenantId: getTenantId(),
  900. // },
  901. // data: qs.stringify(cleanDeep(data)),
  902. // url,
  903. // responseType: "blob",
  904. // };
  905. // this.$confirm("您确定导出老师默认课酬表", "提示", {
  906. // confirmButtonText: "确定",
  907. // cancelButtonText: "取消",
  908. // type: "warning",
  909. // })
  910. // .then(() => {
  911. // load.startLoading();
  912. // axios(options)
  913. // .then((res) => {
  914. // let blob = new Blob([res.data], {
  915. // // type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8'
  916. // type: "application/vnd.ms-excel;charset=utf-8",
  917. // //word文档为application/msword,pdf文档为application/pdf,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8
  918. // });
  919. // let text = new Response(blob).text();
  920. // text.then((res) => {
  921. // // 判断是否报错
  922. // if (res.indexOf("code") != -1) {
  923. // let json = JSON.parse(res);
  924. // if (json.code == 403) {
  925. // this.$message.error(`登录过期,请重新登录!`);
  926. // setTimeout(() => {
  927. // this.$store.dispatch("user/resetToken").then(() => {
  928. // location.reload();
  929. // });
  930. // }, 1000);
  931. // return;
  932. // }
  933. // this.$message.error(json.msg);
  934. // } else {
  935. // let objectUrl = URL.createObjectURL(blob);
  936. // let link = document.createElement("a");
  937. // let nowTime = new Date();
  938. // let ymd =
  939. // nowTime.getFullYear() +
  940. // "" +
  941. // (nowTime.getMonth() + 1) +
  942. // "" +
  943. // nowTime.getDate();
  944. // let fname = ymd + "老师默认课酬表.xls"; //下载文件的名字
  945. // link.href = objectUrl;
  946. // link.setAttribute("download", fname);
  947. // document.body.appendChild(link);
  948. // link.click();
  949. // }
  950. // });
  951. // load.endLoading();
  952. // })
  953. // .catch((error) => {
  954. // this.$message.error("导出数据失败,请联系管理员");
  955. // load.endLoading();
  956. // });
  957. // })
  958. // .catch(() => {});
  959. // },
  960. exportMusicTeamNum() {
  961. let organIds = this.musicTeamNum.join(",");
  962. let url = "/api-web/export/musicGroupNormalStudentNum";
  963. let data = { organIds };
  964. const options = {
  965. method: "POST",
  966. headers: {
  967. Authorization: getToken(),
  968. tenantId: getTenantId(),
  969. },
  970. data: qs.stringify(cleanDeep(data)),
  971. url,
  972. responseType: "blob",
  973. };
  974. this.$confirm("您确定导出乐团在读人数", "提示", {
  975. confirmButtonText: "确定",
  976. cancelButtonText: "取消",
  977. type: "warning",
  978. })
  979. .then(() => {
  980. load.startLoading();
  981. axios(options)
  982. .then((res) => {
  983. let blob = new Blob([res.data], {
  984. // type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8'
  985. type: "application/vnd.ms-excel;charset=utf-8",
  986. //word文档为application/msword,pdf文档为application/pdf,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8
  987. });
  988. let text = new Response(blob).text();
  989. text.then((res) => {
  990. // 判断是否报错
  991. if (res.indexOf("code") != -1) {
  992. let json = JSON.parse(res);
  993. if (json.code == 403) {
  994. this.$message.error(`登录过期,请重新登录!`);
  995. setTimeout(() => {
  996. this.$store.dispatch("user/resetToken").then(() => {
  997. location.reload();
  998. });
  999. }, 1000);
  1000. return;
  1001. }
  1002. this.$message.error(json.msg);
  1003. } else {
  1004. let objectUrl = URL.createObjectURL(blob);
  1005. let link = document.createElement("a");
  1006. let nowTime = new Date();
  1007. let ymd =
  1008. nowTime.getFullYear() +
  1009. "" +
  1010. (nowTime.getMonth() + 1) +
  1011. "" +
  1012. nowTime.getDate();
  1013. let fname = ymd + "乐团在读人数.xls"; //下载文件的名字
  1014. link.href = objectUrl;
  1015. link.setAttribute("download", fname);
  1016. document.body.appendChild(link);
  1017. link.click();
  1018. }
  1019. });
  1020. load.endLoading();
  1021. })
  1022. .catch((error) => {
  1023. this.$message.error("导出数据失败,请联系管理员");
  1024. load.endLoading();
  1025. });
  1026. })
  1027. .catch(() => {});
  1028. },
  1029. // exportStudent() {
  1030. // if (!this.studentMonth) {
  1031. // this.$message.error("请选择导出月份");
  1032. // return;
  1033. // }
  1034. // let studentOrganId = this.studentOrganId.join(",");
  1035. // let url = "/api-web/export/studentOrder";
  1036. // let data = { organIds: studentOrganId, date: this.studentMonth };
  1037. // const options = {
  1038. // method: "POST",
  1039. // headers: {
  1040. // Authorization: getToken(),
  1041. // tenantId: getTenantId(),
  1042. // },
  1043. // data: qs.stringify(cleanDeep(data)),
  1044. // url,
  1045. // responseType: "blob",
  1046. // };
  1047. // this.$confirm("您确定导出回款统计", "提示", {
  1048. // confirmButtonText: "确定",
  1049. // cancelButtonText: "取消",
  1050. // type: "warning",
  1051. // })
  1052. // .then(() => {
  1053. // load.startLoading();
  1054. // axios(options)
  1055. // .then((res) => {
  1056. // let blob = new Blob([res.data], {
  1057. // // type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8'
  1058. // type: "application/vnd.ms-excel;charset=utf-8",
  1059. // //word文档为application/msword,pdf文档为application/pdf,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8
  1060. // });
  1061. // let text = new Response(blob).text();
  1062. // text.then((res) => {
  1063. // // 判断是否报错
  1064. // if (res.indexOf("code") != -1) {
  1065. // let json = JSON.parse(res);
  1066. // if (json.code == 403) {
  1067. // this.$message.error(`登录过期,请重新登录!`);
  1068. // setTimeout(() => {
  1069. // this.$store.dispatch("user/resetToken").then(() => {
  1070. // location.reload();
  1071. // });
  1072. // }, 1000);
  1073. // return;
  1074. // }
  1075. // this.$message.error(json.msg);
  1076. // } else {
  1077. // let objectUrl = URL.createObjectURL(blob);
  1078. // let link = document.createElement("a");
  1079. // let nowTime = new Date();
  1080. // let ymd =
  1081. // nowTime.getFullYear() +
  1082. // "" +
  1083. // (nowTime.getMonth() + 1) +
  1084. // "" +
  1085. // nowTime.getDate();
  1086. // let fname = ymd + "回款统计.xls"; //下载文件的名字
  1087. // link.href = objectUrl;
  1088. // link.setAttribute("download", fname);
  1089. // document.body.appendChild(link);
  1090. // link.click();
  1091. // }
  1092. // });
  1093. // load.endLoading();
  1094. // })
  1095. // .catch((error) => {
  1096. // this.$message.error("导出数据失败,请联系管理员");
  1097. // load.endLoading();
  1098. // });
  1099. // })
  1100. // .catch(() => {});
  1101. // },
  1102. // exportAttendance() {
  1103. // let classStartDate, classEndDate;
  1104. // if (this.timer && this.timer.length > 0) {
  1105. // classStartDate = this.timer[0];
  1106. // classEndDate = this.timer[1];
  1107. // } else {
  1108. // classStartDate = null;
  1109. // classEndDate = null;
  1110. // }
  1111. // return {
  1112. // organId: this.attendanceOrganId.join(","),
  1113. // groupType: this.attendanceCourseType,
  1114. // classStartDate,
  1115. // classEndDate,
  1116. // };
  1117. // Export(
  1118. // this,
  1119. // {
  1120. // url: "/api-web/export/exportStudentAttendances",
  1121. // fileName: "学生考勤.xls",
  1122. // method: "post",
  1123. // params: qs.stringify({
  1124. // organId: this.attendanceOrganId.join(","),
  1125. // groupType: this.attendanceCourseType,
  1126. // classStartDate,
  1127. // classEndDate,
  1128. // }),
  1129. // },
  1130. // "您确定导出学生考勤?"
  1131. // );
  1132. // },
  1133. // exportTrain() {
  1134. // if (!this.trainOrganId) {
  1135. // this.$message.error("请选择分部");
  1136. // return;
  1137. // }
  1138. // return {
  1139. // organId: this.trainOrganId,
  1140. // };
  1141. // Export(
  1142. // this,
  1143. // {
  1144. // url: "/api-web/export/cloudStudyStudentTrainData",
  1145. // fileName: "团练宝学员统计.xls",
  1146. // method: "post",
  1147. // params: qs.stringify({
  1148. // organId: this.trainOrganId,
  1149. // }),
  1150. // },
  1151. // "您确定导出团练宝学员统计?"
  1152. // );
  1153. // },
  1154. exportQuestion() {
  1155. Export(
  1156. this,
  1157. {
  1158. url: "/api-web/questionnaireUserResult/export",
  1159. fileName: "问卷调查.xls",
  1160. method: "get",
  1161. params: { activeType: this.questionActiveType },
  1162. },
  1163. "您确定导出问卷调查?"
  1164. );
  1165. },
  1166. // exportLeBao() {
  1167. // let endTime, startTime;
  1168. // if (this.leBaoTimer && this.leBaoTimer.length > 1) {
  1169. // startTime = this.leBaoTimer[0];
  1170. // let end = this.leBaoTimer[1];
  1171. // end = new Date(end);
  1172. // end = new Date(end.getFullYear(), end.getMonth() + 1, 0);
  1173. // endTime = dayjs(end).format("YYYY-MM-DD");
  1174. // } else {
  1175. // this.$message.error("请选择导出月份");
  1176. // return;
  1177. // }
  1178. // Export(
  1179. // this,
  1180. // {
  1181. // url: "/api-web/studentInstrument/export",
  1182. // fileName: "乐保订单.xls",
  1183. // method: "get",
  1184. // params: { startTime: startTime, endTime: endTime },
  1185. // },
  1186. // "您确定导出乐保订单?"
  1187. // );
  1188. // },
  1189. // exportAccount() {
  1190. // let endTime, startTime;
  1191. // if (this.AccountTimer && this.AccountTimer.length > 1) {
  1192. // startTime = this.AccountTimer[0];
  1193. // endTime = this.AccountTimer[1];
  1194. // } else {
  1195. // startTime = null;
  1196. // endTime = null;
  1197. // }
  1198. // Export(
  1199. // this,
  1200. // {
  1201. // url: "/api-web/export/userCoursesAccount",
  1202. // fileName: "课程余额明细.xls",
  1203. // method: "post",
  1204. // params: qs.stringify({
  1205. // startTime: startTime,
  1206. // endTime: endTime,
  1207. // organId: this.AccountOrganId.join(","),
  1208. // }),
  1209. // },
  1210. // "您确定导出课程余额明细?"
  1211. // );
  1212. // },
  1213. // exportDetailAccount() {
  1214. // let endTime, startTime;
  1215. // if (this.AccountDetailTimer && this.AccountDetailTimer.length > 1) {
  1216. // startTime = this.AccountDetailTimer[0];
  1217. // endTime = this.AccountDetailTimer[1];
  1218. // } else {
  1219. // startTime = null;
  1220. // endTime = null;
  1221. // }
  1222. // Export(
  1223. // this,
  1224. // {
  1225. // url: "/api-web/export/userCashAccountDetail",
  1226. // fileName: "账户余额明细.xls",
  1227. // method: "post",
  1228. // params: qs.stringify({
  1229. // startTime: startTime,
  1230. // endTime: endTime,
  1231. // organId: this.AccountDetailOrganId.join(","),
  1232. // }),
  1233. // },
  1234. // "您确定导出账户余额明细?"
  1235. // );
  1236. // },
  1237. // exportVip() {
  1238. // if (!this.vipOrganId.length < 0) {
  1239. // this.$message.error("请选择分部");
  1240. // return;
  1241. // }
  1242. // let data = {
  1243. // organId: this.vipOrganId.join(","),
  1244. // };
  1245. // let url = "/api-web/export/studentVipPractice";
  1246. // const options = {
  1247. // method: "get",
  1248. // headers: {
  1249. // Authorization: getToken(),
  1250. // tenantId: getTenantId(),
  1251. // },
  1252. // params: cleanDeep(data),
  1253. // url,
  1254. // responseType: "form",
  1255. // };
  1256. // this.$confirm("您确定导出VIP网管课耗", "提示", {
  1257. // confirmButtonText: "确定",
  1258. // cancelButtonText: "取消",
  1259. // type: "warning",
  1260. // })
  1261. // .then(() => {
  1262. // load.startLoading();
  1263. // axios(options)
  1264. // .then((res) => {
  1265. // load.endLoading();
  1266. // if (res.data.code == 200) {
  1267. // this.$message.info(res.data.msg);
  1268. // } else if (res.data.code == 403) {
  1269. // this.$message.error(`登录过期,请重新登录!`);
  1270. // setTimeout(() => {
  1271. // this.$store.dispatch("user/resetToken").then(() => {
  1272. // location.reload();
  1273. // });
  1274. // }, 1000);
  1275. // } else {
  1276. // this.$message.error(res.data.msg);
  1277. // }
  1278. // // this.$confirm(res.data.data, "提示", {
  1279. // // confirmButtonText: "确定",
  1280. // // cancelButtonText: "取消",
  1281. // // type: "warning",
  1282. // // }).then(() => {
  1283. // // }).catch(err => {
  1284. // // })
  1285. // })
  1286. // .catch((error) => {
  1287. // this.$message.error("导出数据失败,请联系管理员");
  1288. // load.endLoading();
  1289. // });
  1290. // })
  1291. // .catch(() => {});
  1292. // // Export(
  1293. // // this,
  1294. // // {
  1295. // // url: "/api-web/export/studentVipPractice",
  1296. // // fileName: "vip网管课.xls",
  1297. // // method: "post",
  1298. // // params: qs.stringify({
  1299. // // organId: this.vipOrganId.join(',')
  1300. // // }),
  1301. // // },
  1302. // // "您确定导出vip网管课?"
  1303. // // );
  1304. // },
  1305. // exportDetailService() {
  1306. // let sunday, monday;
  1307. // if (this.serviceTimer && this.serviceTimer.length > 1) {
  1308. // monday = this.serviceTimer[0];
  1309. // sunday = this.serviceTimer[1];
  1310. // } else {
  1311. // monday = null;
  1312. // sunday = null;
  1313. // }
  1314. // Export(
  1315. // this,
  1316. // {
  1317. // url: "/api-web/export/exercisesSituation",
  1318. // fileName: "服务指标明细.xls",
  1319. // method: "post",
  1320. // params: qs.stringify({
  1321. // monday: monday,
  1322. // sunday: sunday,
  1323. // organId: this.serviceOrganId.join(","),
  1324. // }),
  1325. // },
  1326. // "您确定导出服务指标明细?"
  1327. // );
  1328. // },
  1329. getNowDateAndMonday(time) {
  1330. let timestamp = new Date(time.replace(/-/g, "/")).getTime();
  1331. let serverDate = new Date(time);
  1332. if (serverDate.getDay() == 0) {
  1333. timestamp -= 7 * 24 * 60 * 60 * 1000;
  1334. }
  1335. let mondayTime =
  1336. timestamp - (serverDate.getDay() - 1) * 24 * 60 * 60 * 1000;
  1337. let mondayData = new Date(mondayTime);
  1338. //年
  1339. let mondayY = mondayData.getFullYear();
  1340. //月
  1341. let mondayM =
  1342. mondayData.getMonth() + 1 < 10
  1343. ? "0" + (mondayData.getMonth() + 1)
  1344. : mondayData.getMonth() + 1;
  1345. //日
  1346. let mondayD =
  1347. mondayData.getDate() < 10
  1348. ? "0" + mondayData.getDate()
  1349. : mondayData.getDate();
  1350. let str = mondayY + "-" + mondayM + "-" + mondayD;
  1351. return str;
  1352. },
  1353. getNowDateAndSunday(time) {
  1354. let timestamp = new Date(time.replace(/-/g, "/")).getTime();
  1355. let serverDate = new Date(time);
  1356. let num = 7 - serverDate.getDay();
  1357. if (num == 7) {
  1358. num = 0;
  1359. }
  1360. let sundayTiem = timestamp + num * 24 * 60 * 60 * 1000;
  1361. let SundayData = new Date(sundayTiem);
  1362. //年
  1363. let tomorrowY = SundayData.getFullYear(); //月
  1364. let tomorrowM =
  1365. SundayData.getMonth() + 1 < 10
  1366. ? "0" + (SundayData.getMonth() + 1)
  1367. : SundayData.getMonth() + 1;
  1368. //日
  1369. let tomorrowD =
  1370. SundayData.getDate() < 10
  1371. ? "0" + SundayData.getDate()
  1372. : SundayData.getDate();
  1373. let str = tomorrowY + "-" + tomorrowM + "-" + tomorrowD;
  1374. return str;
  1375. },
  1376. getWeekTime(val) {
  1377. if (val && val.length > 0) {
  1378. let start = this.getNowDateAndMonday(val[0]);
  1379. let end = this.getNowDateAndSunday(val[1]);
  1380. this.serviceTimer.splice(0, 1, start);
  1381. this.serviceTimer.splice(1, 1, end);
  1382. }
  1383. },
  1384. // exportAbnormal() {
  1385. // let params = this.Abnormal;
  1386. // Export(
  1387. // this,
  1388. // {
  1389. // method: "post",
  1390. // url: "/api-web/export/exportIndexErrData",
  1391. // params: this.$helpers.qs.stringify({
  1392. // ...params,
  1393. // }),
  1394. // },
  1395. // "是否确认导出报表?"
  1396. // );
  1397. // },
  1398. },
  1399. computed: {
  1400. exportAttendance() {
  1401. let classStartDate, classEndDate;
  1402. if (this.timer && this.timer.length > 0) {
  1403. classStartDate = this.timer[0];
  1404. classEndDate = this.timer[1];
  1405. } else {
  1406. classStartDate = null;
  1407. classEndDate = null;
  1408. }
  1409. return {
  1410. organId: this.attendanceOrganId.join(","),
  1411. groupType: this.attendanceCourseType,
  1412. classStartDate,
  1413. classEndDate,
  1414. };
  1415. },
  1416. exportTrain() {
  1417. return {
  1418. organId: this.trainOrganId,
  1419. };
  1420. },
  1421. exportDefaultSalary() {
  1422. let organIdList = this.teacherDefaultSalaryOrganId.join(",");
  1423. let url = "/api-web/export/teacherDefaultSalary";
  1424. let data = { organIdList };
  1425. return data;
  1426. },
  1427. exportStudent() {
  1428. let studentOrganId = this.studentOrganId.join(",");
  1429. return { organIds: studentOrganId, date: this.studentMonth };
  1430. },
  1431. exportLeBao() {
  1432. let endTime, startTime;
  1433. if (this.leBaoTimer && this.leBaoTimer.length > 1) {
  1434. startTime = this.leBaoTimer[0];
  1435. let end = this.leBaoTimer[1];
  1436. end = new Date(end);
  1437. end = new Date(end.getFullYear(), end.getMonth() + 1, 0);
  1438. endTime = dayjs(end).format("YYYY-MM-DD");
  1439. }
  1440. return { startTime: startTime, endTime: endTime };
  1441. },
  1442. exportVip() {
  1443. // if (!this.vipOrganId.length < 0) {
  1444. // this.$message.error("请选择分部");
  1445. // return;
  1446. // }
  1447. let data = {
  1448. organId: this.vipOrganId.join(","),
  1449. };
  1450. return data;
  1451. },
  1452. exportDetailService() {
  1453. let sunday, monday;
  1454. if (this.serviceTimer && this.serviceTimer.length > 1) {
  1455. monday = this.serviceTimer[0];
  1456. sunday = this.serviceTimer[1];
  1457. } else {
  1458. monday = null;
  1459. sunday = null;
  1460. }
  1461. return {
  1462. monday: monday,
  1463. sunday: sunday,
  1464. organId: this.serviceOrganId.join(","),
  1465. };
  1466. },
  1467. exportAbnormal() {
  1468. console.log(this.Abnormal)
  1469. return this.Abnormal;
  1470. },
  1471. exportSalar() {
  1472. // if (!this.mouth) {
  1473. // this.$message.error("请选择导出月份");
  1474. // return;
  1475. // }
  1476. // let courseTypeList = this.courseScheduleType.join(',')
  1477. // let url = "/api-web/export/teacherSalary";
  1478. let data = { date: this.mouth };
  1479. return data;
  1480. },
  1481. exportAccount() {
  1482. let endTime, startTime;
  1483. if (this.AccountTimer && this.AccountTimer.length > 1) {
  1484. startTime = this.AccountTimer[0];
  1485. endTime = this.AccountTimer[1];
  1486. } else {
  1487. startTime = null;
  1488. endTime = null;
  1489. }
  1490. return {
  1491. startTime: startTime,
  1492. endTime: endTime,
  1493. organId: this.AccountOrganId.join(","),
  1494. };
  1495. },
  1496. exportDetailAccount() {
  1497. let endTime, startTime;
  1498. if (this.AccountDetailTimer && this.AccountDetailTimer.length > 1) {
  1499. startTime = this.AccountDetailTimer[0];
  1500. endTime = this.AccountDetailTimer[1];
  1501. } else {
  1502. startTime = null;
  1503. endTime = null;
  1504. }
  1505. return {
  1506. startTime: startTime,
  1507. endTime: endTime,
  1508. organId: this.AccountDetailOrganId.join(","),
  1509. };
  1510. },
  1511. },
  1512. // AccountDetailTimer
  1513. };
  1514. </script>
  1515. <style lang="scss" scoped>
  1516. .m-container {
  1517. // margin-top: 20px;
  1518. .m-wrap {
  1519. display: flex;
  1520. flex-direction: row;
  1521. justify-content: flex-start;
  1522. width: 100%;
  1523. align-items: center;
  1524. margin-bottom: 16px;
  1525. .newBand {
  1526. margin: 0 5px 0 10px;
  1527. }
  1528. .title {
  1529. width: 150px;
  1530. // height: 40px;
  1531. // line-height: 40px;
  1532. text-align: right;
  1533. color: #212121;
  1534. font-weight: 600;
  1535. }
  1536. .organSelect {
  1537. width: 260px !important;
  1538. }
  1539. .el-tooltip.micon {
  1540. width: 20px;
  1541. height: 20px;
  1542. position: relative;
  1543. margin-left: 8px;
  1544. // top: 12px;
  1545. }
  1546. }
  1547. .formCollapse {
  1548. border: none;
  1549. /deep/.el-collapse-item__header {
  1550. padding: 0 15px;
  1551. border-bottom: none;
  1552. background-color: #f8f8f8;
  1553. }
  1554. /deep/.el-collapse-item__wrap {
  1555. padding: 15px;
  1556. border-bottom: none;
  1557. }
  1558. /deep/ .el-collapse-item__arrow.is-active {
  1559. transform: rotate(-90deg);
  1560. }
  1561. // 默认方向
  1562. /deep/ .el-collapse-item__arrow,
  1563. .el-tabs__nav {
  1564. transform: rotate(90deg);
  1565. }
  1566. /deep/.el-collapse-item__content {
  1567. padding-bottom: 0px !important;
  1568. }
  1569. .wrapTitle {
  1570. font-size: 18px;
  1571. position: relative;
  1572. font-weight: 600;
  1573. margin-left: 12px;
  1574. &::after {
  1575. position: absolute;
  1576. width: 4px;
  1577. height: 18px;
  1578. background: var(--color-primary);
  1579. border-radius: 2px;
  1580. left: -13px;
  1581. top: 14px;
  1582. content: "";
  1583. }
  1584. }
  1585. }
  1586. }
  1587. /deep/.el-input__icon.el-icon-date {
  1588. height: 40px !important;
  1589. }
  1590. </style>