accompanyList.vue 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792
  1. <template>
  2. <div class>
  3. <!-- <h2>
  4. <div class="squrt"></div>网管课列表
  5. </h2>-->
  6. <div class="topWrap">
  7. <!-- <div
  8. class="newBand"
  9. v-permission="'/newPractice'"
  10. @click="newPractice"
  11. style="width: 120px"
  12. >
  13. 新建网管课
  14. </div>
  15. <div
  16. class="newBand"
  17. v-permission="'export/practiceGroup'"
  18. @click="onStudentExport"
  19. style="width: 150px; max-width: 150px"
  20. >
  21. 续费提醒导出
  22. </div>
  23. <div
  24. class="newBand"
  25. v-permission="'export/practiceGroupList'"
  26. @click="onPracticeExport"
  27. style="width: 120px"
  28. >
  29. 网管课导出
  30. </div> -->
  31. <el-button
  32. v-permission="'/newPractice'"
  33. @click="newPractice"
  34. type="primary"
  35. style="margin-bottom:20px"
  36. >
  37. 新建网管课
  38. </el-button>
  39. <el-button
  40. v-permission="'export/practiceGroup'"
  41. @click="onStudentExport"
  42. type="primary"
  43. style="margin-bottom:20px"
  44. >
  45. 续费提醒导出
  46. </el-button>
  47. <el-button
  48. v-permission="'export/practiceGroupList'"
  49. @click="onPracticeExport"
  50. type="primary"
  51. style="margin-bottom:20px"
  52. >
  53. 网管课导出
  54. </el-button>
  55. </div>
  56. <div class="m-core">
  57. <save-form
  58. :inline="true"
  59. class="searchForm"
  60. save-key="accompanyList"
  61. @submit="search"
  62. @reset="onReSet"
  63. :model.sync="searchForm"
  64. >
  65. <!-- 状态 指导老师 活动方案-->
  66. <el-form-item>
  67. <el-input
  68. v-model.trim="searchForm.search"
  69. clearable
  70. placeholder="课程组名称"
  71. ></el-input>
  72. </el-form-item>
  73. <el-form-item>
  74. <el-select
  75. class="multiple"
  76. v-model.trim="searchForm.organIdList"
  77. filterable
  78. clearable
  79. placeholder="请选择分部"
  80. >
  81. <el-option
  82. v-for="(item, index) in selects.branchs"
  83. :key="index"
  84. :label="item.name"
  85. :value="item.id"
  86. ></el-option>
  87. </el-select>
  88. </el-form-item>
  89. <el-form-item>
  90. <el-select
  91. v-model.trim="searchForm.practiceGroupType"
  92. clearable
  93. filterable
  94. placeholder="课程组类型"
  95. >
  96. <el-option
  97. v-for="(item, index) in practiceGroupType"
  98. :key="index"
  99. :value="item.value"
  100. :label="item.label"
  101. ></el-option>
  102. </el-select>
  103. </el-form-item>
  104. <el-form-item prop="status">
  105. <el-select
  106. class="multiple"
  107. v-model.trim="searchForm.hasEducationalTeacherId"
  108. filterable
  109. clearable
  110. placeholder="是否有乐团主管"
  111. >
  112. <el-option label="是" value="true"></el-option>
  113. <el-option label="否" value="false"></el-option>
  114. </el-select>
  115. </el-form-item>
  116. <el-form-item>
  117. <remote-search
  118. :commit="'setTeachers'"
  119. v-model="searchForm.teacherId"
  120. />
  121. </el-form-item>
  122. <el-form-item>
  123. <el-select
  124. v-model.trim="searchForm.groupStatus"
  125. clearable
  126. filterable
  127. placeholder="课程组状态"
  128. >
  129. <el-option
  130. v-for="(item, index) in commGroupStatus"
  131. :key="index"
  132. :value="item.value"
  133. :label="item.label"
  134. ></el-option>
  135. </el-select>
  136. </el-form-item>
  137. <el-form-item>
  138. <el-select
  139. v-model.trim="searchForm.firstOrRenew"
  140. clearable
  141. filterable
  142. placeholder="是否续费"
  143. >
  144. <el-option label="首充" value="1"></el-option>
  145. <el-option label="续费" value="0"></el-option>
  146. <el-option label="免费" value="2"></el-option>
  147. </el-select>
  148. </el-form-item>
  149. <el-form-item>
  150. <el-button native-type="submit" type="danger">搜索</el-button>
  151. <el-button native-type="reset" type="primary">重置</el-button>
  152. </el-form-item>
  153. </save-form>
  154. <!-- tab -->
  155. <div class="tableWrap">
  156. <el-table
  157. style="width: 100%"
  158. :header-cell-style="{ background: '#EDEEF0', color: '#444' }"
  159. :data="tableData"
  160. >
  161. <el-table-column
  162. align="center"
  163. prop="id"
  164. label="课程组编号"
  165. width="100"
  166. >
  167. <template slot-scope="scope">
  168. <copy-text>{{ scope.row.id }}</copy-text>
  169. </template>
  170. </el-table-column>
  171. <el-table-column
  172. align="center"
  173. prop="name"
  174. label="课程组名称"
  175. width="170px"
  176. >
  177. <template slot-scope="scope">
  178. <copy-text>{{ scope.row.name }}</copy-text>
  179. </template>
  180. </el-table-column>
  181. <el-table-column
  182. align="center"
  183. prop="type"
  184. label="课程组类型"
  185. >
  186. <template slot-scope="scope">
  187. <div>
  188. <p>{{ scope.row.type | comType }}</p>
  189. </div>
  190. </template>
  191. </el-table-column>
  192. <el-table-column align="center" prop="organName" label="所属分部" width="100px">
  193. <template slot-scope="scope">
  194. <copy-text>{{ scope.row.organName }}</copy-text>
  195. </template>
  196. </el-table-column>
  197. <!-- educationalTeacherId -->
  198. <el-table-column
  199. align="center"
  200. prop="educationalTeacherName"
  201. label="乐团主管"
  202. ></el-table-column>
  203. <el-table-column align="center" prop="teacherName" label="指导老师" width="120px">
  204. <template slot-scope="scope">
  205. <copy-text>{{ scope.row.teacherName }}</copy-text>
  206. </template>
  207. </el-table-column>
  208. <el-table-column
  209. align="center"
  210. prop="studentNum"
  211. label="班级人数"
  212. ></el-table-column>
  213. <!-- <el-table-column align="center" label="课程单价">
  214. <template slot-scope="scope">
  215. <div>
  216. <p>线上:{{scope.row.onlineClassesUnitPrice}}</p>
  217. <p>线下:{{scope.row.offlineClassesUnitPrice}}</p>
  218. </div>
  219. </template>
  220. </el-table-column>-->
  221. <el-table-column align="center" label="当前课次">
  222. <template slot-scope="scope">
  223. <div>
  224. <p>
  225. {{
  226. scope.row.currentClassTimes +
  227. "/" +
  228. scope.row.totalClassTimes
  229. }}
  230. </p>
  231. </div>
  232. </template>
  233. </el-table-column>
  234. <el-table-column
  235. align="center"
  236. prop="coursesStartDate"
  237. label="开课时间"
  238. width="120"
  239. >
  240. <template slot-scope="scope">
  241. <div>
  242. <p>{{ scope.row.coursesStartDate | formatTimer }}</p>
  243. </div>
  244. </template>
  245. </el-table-column>
  246. <el-table-column
  247. align="center"
  248. prop="coursesExpireDate"
  249. label="结束时间"
  250. width="120"
  251. >
  252. <template slot-scope="scope">
  253. <div>
  254. <p>{{ scope.row.coursesExpireDate | formatTimer }}</p>
  255. </div>
  256. </template>
  257. </el-table-column>
  258. <el-table-column
  259. align="center"
  260. prop="groupStatus"
  261. label="课程组状态"
  262. width="100"
  263. >
  264. <template slot-scope="scope">
  265. <div>
  266. <p>{{ scope.row.groupStatus | comCourseGroup }}</p>
  267. </div>
  268. </template>
  269. </el-table-column>
  270. <el-table-column align="center" label="是否续费" fixed="right">
  271. <template slot-scope="scope">
  272. <div>
  273. <p
  274. v-if="
  275. scope.row.type == 'FREE' ||
  276. scope.row.type == 'CARE_PACKAGE' ||
  277. scope.row.type == 'TRIAL'
  278. "
  279. >
  280. 免费
  281. </p>
  282. <p
  283. v-if="
  284. scope.row.type == 'CHARGE' ||
  285. scope.row.type == 'COME_ON_PACKAGE'
  286. "
  287. >
  288. {{ scope.row.beRenewGroupId > 0 ? "续费" : "首充" }}
  289. </p>
  290. </div>
  291. </template>
  292. </el-table-column>
  293. <el-table-column width="150" prop="memo" label="备注" fixed="right">
  294. <template slot-scope="scope">
  295. <overflow-text
  296. :text="scope.row.memo"
  297. width="150px"
  298. ></overflow-text>
  299. </template>
  300. </el-table-column>
  301. <el-table-column
  302. align="center"
  303. width="200"
  304. fixed="right"
  305. label="操作"
  306. >
  307. <template slot-scope="scope">
  308. <div>
  309. <!-- v-permission="'courseSchedule/classStartDateAdjust'" v-if="!scope.row.isSettlement" -->
  310. <el-button
  311. type="text"
  312. @click="lookCrouse(scope.row)"
  313. v-if="permission('/accompanys')"
  314. >查看</el-button
  315. >
  316. <el-button
  317. type="text"
  318. v-if="
  319. scope.row.groupStatus == 'NORMAL' &&
  320. permission('practiceGroupManage/cancelGroup')
  321. "
  322. @click="closeCrouse(scope.row)"
  323. >关闭</el-button
  324. >
  325. <el-button
  326. type="text"
  327. v-if="permission('practiceGroupManage/updateMemo')"
  328. @click="resetMemo(scope.row)"
  329. >修改备注</el-button
  330. >
  331. </div>
  332. </template>
  333. </el-table-column>
  334. </el-table>
  335. <pagination
  336. save-key="accompanyList"
  337. sync
  338. :total.sync="rules.total"
  339. :page.sync="rules.page"
  340. :limit.sync="rules.limit"
  341. :page-sizes="rules.page_size"
  342. @pagination="getList"
  343. />
  344. </div>
  345. </div>
  346. <el-dialog title="关闭课程组" width="400px" :visible.sync="closeVisible">
  347. <el-form
  348. :model="closeForm"
  349. ref="closeForm"
  350. label-position="right"
  351. label-width="80px;"
  352. :inline="true"
  353. >
  354. <el-form-item label="是否退费" prop="isBasck">
  355. <el-radio v-model="closeForm.isBack" :label="true">是</el-radio>
  356. <el-radio v-model="closeForm.isBack" :label="false">否</el-radio>
  357. </el-form-item>
  358. <el-form-item label="退费金额" v-if="closeForm.isBack" prop="money">
  359. <el-input
  360. type="number"
  361. @mousewheel.native.prevent
  362. v-model.trim="closeForm.money"
  363. ></el-input>
  364. </el-form-item>
  365. <p style="color:red" v-if="closeForm.isBack">退费金额暂不进入账户余额</p>
  366. </el-form>
  367. <div slot="footer" class="dialog-footer">
  368. <el-button @click="closeVisible = false">取 消</el-button>
  369. <el-button type="primary" @click="submieCloseCrouse">确 定</el-button>
  370. </div>
  371. </el-dialog>
  372. <el-dialog title="备注" width="400px" :visible.sync="memoVisible">
  373. <el-input
  374. type="textarea"
  375. v-model.trim="memoForm.memo"
  376. :rows="7"
  377. :maxlength="255"
  378. show-word-limit
  379. ></el-input>
  380. <div slot="footer" class="dialog-footer">
  381. <el-button @click="memoVisible = false">取 消</el-button>
  382. <el-button type="primary" @click="subMemo">确 定</el-button>
  383. </div>
  384. </el-dialog>
  385. </div>
  386. </template>
  387. <script>
  388. import pagination from "@/components/Pagination/index";
  389. import { Searchs } from "@/helpers";
  390. import { permission } from "@/utils/directivePage";
  391. import cleanDeep from "clean-deep";
  392. import { commGroupStatus, practiceGroupType } from "@/utils/searchArray";
  393. import {
  394. getEmployeeOrgan,
  395. practiceGroupManage,
  396. cancelGroup,
  397. practiceUpdateMemo,
  398. } from "@/api/buildTeam";
  399. import axios from "axios";
  400. import { getToken, getTenantId } from "@/utils/auth";
  401. import load from "@/utils/loading";
  402. export default {
  403. components: { pagination },
  404. data() {
  405. return {
  406. searchForm: {
  407. search: null,
  408. status: null,
  409. teacherId: null,
  410. organIdList: null,
  411. firstOrRenew: null,
  412. practiceGroupType: null,
  413. groupStatus: null,
  414. },
  415. closeForm: {
  416. isBack: false,
  417. money: null,
  418. },
  419. memoForm: {
  420. memo: "",
  421. groupId: "",
  422. },
  423. memoVisible: false,
  424. closeVisible: false,
  425. activeRow: null,
  426. organList: [],
  427. statusList: [],
  428. teacherList: [],
  429. tableData: [],
  430. practiceGroupType: practiceGroupType,
  431. commGroupStatus: commGroupStatus,
  432. rules: {
  433. // 分页规则
  434. limit: 10, // 限制显示条数
  435. page: 1, // 当前页
  436. total: 0, // 总条数
  437. page_size: [10, 20, 40, 50], // 选择限制显示条数
  438. },
  439. };
  440. },
  441. mounted() {
  442. const { query } = this.$route;
  443. if (query.search) {
  444. this.searchForm.search = query.search;
  445. }
  446. this.init();
  447. },
  448. activated() {
  449. this.init();
  450. },
  451. methods: {
  452. init() {
  453. this.$store.dispatch("setBranchs");
  454. this.getList();
  455. },
  456. permission(str, parent) {
  457. return permission(str, parent);
  458. },
  459. search() {
  460. this.rules.page = 1;
  461. this.getList();
  462. },
  463. onReSet() {
  464. this.searchForm = {
  465. search: null,
  466. status: null,
  467. teacherId: null,
  468. organIdList: null,
  469. firstOrRenew: null,
  470. practiceGroupType: null,
  471. groupStatus: null,
  472. };
  473. new Searchs().removeByKey("accompanyList");
  474. this.search();
  475. },
  476. onStudentExport() {
  477. // 导出VIP课
  478. // let searchForm = this.searchForm;
  479. let data = {
  480. // teacherId: searchForm.teacherId || null,
  481. // activityId: searchForm.activityId || null,
  482. // organId: searchForm.orgin || null,
  483. // status: searchForm.status || null,
  484. // search: searchForm.search || null
  485. };
  486. let url = "/api-web/export/practiceGroup";
  487. const options = {
  488. method: "get",
  489. headers: {
  490. Authorization: getToken(),
  491. tenantId: getTenantId()
  492. },
  493. params: data,
  494. url,
  495. responseType: "blob",
  496. };
  497. this.$confirm("网管课续费提醒导出?", "提示", {
  498. confirmButtonText: "确定",
  499. cancelButtonText: "取消",
  500. type: "warning",
  501. })
  502. .then(() => {
  503. load.startLoading();
  504. axios(options)
  505. .then((res) => {
  506. let blob = new Blob([res.data], {
  507. // type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8'
  508. type: "application/vnd.ms-excel;charset=utf-8",
  509. //word文档为application/msword,pdf文档为application/pdf,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8
  510. });
  511. let text = new Response(blob).text();
  512. text.then((res) => {
  513. // 判断是否报错
  514. if (res.indexOf("code") != -1) {
  515. let json = JSON.parse(res);
  516. if(json.code == 403) {
  517. this.$message.error(`登录过期,请重新登录!`)
  518. setTimeout(() => {
  519. this.$store.dispatch('user/resetToken').then(() => {
  520. location.reload()
  521. })
  522. }, 1000);
  523. return
  524. }
  525. this.$message.error(json.msg);
  526. } else {
  527. let objectUrl = URL.createObjectURL(blob);
  528. let link = document.createElement("a");
  529. let fname = "网管课续费提醒" + new Date().getTime() + ".xls"; //下载文件的名字
  530. link.href = objectUrl;
  531. link.setAttribute("download", fname);
  532. document.body.appendChild(link);
  533. link.click();
  534. }
  535. });
  536. load.endLoading();
  537. })
  538. .catch((error) => {
  539. this.$message.error("导出数据失败,请联系管理员");
  540. load.endLoading();
  541. });
  542. })
  543. .catch(() => {});
  544. },
  545. onPracticeExport() {
  546. // 导出VIP课
  547. let searchForm = this.searchForm;
  548. let obj = {
  549. search: searchForm.search || null,
  550. teacherId: searchForm.teacherId || null,
  551. organId: searchForm.organIdList || null,
  552. hasEducationalTeacherId: searchForm.hasEducationalTeacherId || null,
  553. type: searchForm.firstOrRenew || null,
  554. practiceGroupType: searchForm.practiceGroupType || null,
  555. groupStatus: searchForm.groupStatus || null,
  556. };
  557. let url = "/api-web/export/practiceGroupList";
  558. const options = {
  559. method: "get",
  560. headers: {
  561. Authorization: getToken(),
  562. tenantId: getTenantId()
  563. },
  564. params: cleanDeep(obj),
  565. url,
  566. responseType: "blob",
  567. };
  568. this.$confirm("网管课导出?", "提示", {
  569. confirmButtonText: "确定",
  570. cancelButtonText: "取消",
  571. type: "warning",
  572. })
  573. .then(() => {
  574. load.startLoading();
  575. axios(options)
  576. .then((res) => {
  577. let blob = new Blob([res.data], {
  578. // type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8'
  579. type: "application/vnd.ms-excel;charset=utf-8",
  580. //word文档为application/msword,pdf文档为application/pdf,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8
  581. });
  582. let text = new Response(blob).text();
  583. text.then((res) => {
  584. // 判断是否报错
  585. if(res.indexOf("code") != -1) {
  586. let json = JSON.parse(res);
  587. if(json.code == 403) {
  588. this.$message.error(`登录过期,请重新登录!`)
  589. setTimeout(() => {
  590. this.$store.dispatch('user/resetToken').then(() => {
  591. location.reload()
  592. })
  593. }, 1000);
  594. return
  595. }
  596. this.$message.error(json.msg);
  597. } else {
  598. let objectUrl = URL.createObjectURL(blob);
  599. let link = document.createElement("a");
  600. let fname = "网管课" + new Date().getTime() + ".xls"; //下载文件的名字
  601. link.href = objectUrl;
  602. link.setAttribute("download", fname);
  603. document.body.appendChild(link);
  604. link.click();
  605. }
  606. });
  607. load.endLoading();
  608. })
  609. .catch((error) => {
  610. this.$message.error("导出数据失败,请联系管理员");
  611. load.endLoading();
  612. });
  613. })
  614. .catch(() => {});
  615. },
  616. getList() {
  617. let obj = {
  618. search: this.searchForm.search || null,
  619. teacherId: this.searchForm.teacherId || null,
  620. organId: this.searchForm.organIdList || null,
  621. page: this.rules.page,
  622. rows: this.rules.limit,
  623. hasEducationalTeacherId:
  624. this.searchForm.hasEducationalTeacherId || null,
  625. type: this.searchForm.firstOrRenew || null,
  626. practiceGroupType: this.searchForm.practiceGroupType || null,
  627. groupStatus: this.searchForm.groupStatus || null,
  628. };
  629. practiceGroupManage(obj).then((res) => {
  630. if (res.code == 200) {
  631. this.tableData = res.data.rows;
  632. this.rules.total = res.data.total;
  633. }
  634. });
  635. },
  636. lookCrouse(row) {
  637. let coursesStartDate = this.$helpers
  638. .dayjs(row.coursesStartDate)
  639. .format("YYYY-MM-DD");
  640. let coursesExpireDate = this.$helpers
  641. .dayjs(row.coursesExpireDate)
  642. .format("YYYY-MM-DD");
  643. this.$router.push({
  644. path: "/business/accompanys",
  645. query: {
  646. id: row.id,
  647. type: row.type,
  648. coursesStartDate,
  649. coursesExpireDate,
  650. },
  651. });
  652. },
  653. closeCrouse(row) {
  654. this.activeRow = row;
  655. this.closeVisible = true;
  656. // this.$confirm("请确认是否关闭课程组,关闭后不予退费", "提示", {
  657. // confirmButtonText: "确定",
  658. // cancelButtonText: "取消",
  659. // type: "warning",
  660. // })
  661. // .then((res) => {
  662. // cancelGroup({
  663. // groupId: row.id,
  664. // groupType: "PRACTICE",
  665. // refundAmount: 0,
  666. // }).then((res) => {
  667. // if (res.code == 200) {
  668. // this.$message.success("关闭成功");
  669. // this.getList();
  670. // // this.closeVisible = false;
  671. // }
  672. // if (res.code == 206) {
  673. // this.$confirm(res.msg, "提示", {
  674. // confirmButtonText: "确定",
  675. // cancelButtonText: "取消",
  676. // }).then(() => {
  677. // cancelGroup({
  678. // groupId: row.id,
  679. // groupType: "PRACTICE",
  680. // refundAmount: 0,
  681. // confirmReturnActivityGive: true,
  682. // }).then((res) => {
  683. // if (res.code == 200) {
  684. // this.$message.success("关闭成功");
  685. // this.getList();
  686. // }
  687. // });
  688. // });
  689. // }
  690. // });
  691. // })
  692. // .catch(() => {});
  693. // this.closeVisible = true;
  694. },
  695. courseVisibleClose() {
  696. // 关闭弹窗前
  697. },
  698. submieCloseCrouse() {
  699. // 提交关闭课程组
  700. if (this.closeForm.isBack) {
  701. if (!this.closeForm.money) {
  702. this.$message.error("请输入退费金额");
  703. return;
  704. }
  705. } else {
  706. this.closeForm.money = null;
  707. }
  708. // 请求数据
  709. cancelGroup({
  710. groupId: this.activeRow.id,
  711. groupType: "PRACTICE",
  712. amount: this.closeForm.money,
  713. }).then((res) => {
  714. if (res.code == 200) {
  715. this.$message.success("关闭成功");
  716. this.getList();
  717. this.closeVisible = false;
  718. }
  719. if (res.code == 206) {
  720. this.$confirm(res.msg, "提示", {
  721. confirmButtonText: "确定",
  722. cancelButtonText: "取消",
  723. }).then(() => {
  724. cancelGroup({
  725. groupId: this.activeRow.id,
  726. groupType: "PRACTICE",
  727. refundAmount: this.closeForm.money,
  728. confirmReturnActivityGive: true,
  729. }).then((res) => {
  730. if (res.code == 200) {
  731. this.$message.success("关闭成功");
  732. this.getList();
  733. this.closeVisible = false;
  734. }
  735. });
  736. });
  737. }
  738. });
  739. },
  740. resetMemo(row) {
  741. this.$set(this.memoForm, "memo", row.memo);
  742. this.$set(this.memoForm, "groupId", row.id);
  743. this.memoVisible = true;
  744. },
  745. subMemo() {
  746. practiceUpdateMemo(this.memoForm).then((res) => {
  747. if (res.code == 200) {
  748. this.$message.success("修改成功");
  749. this.memoVisible = false;
  750. this.getList();
  751. }
  752. });
  753. },
  754. newPractice() {
  755. this.$router.push({
  756. path: "/business/newPractice",
  757. query: { courseType: "PRACTICE" },
  758. });
  759. },
  760. },
  761. watch: {
  762. closeVisible(val) {
  763. if (!val) {
  764. this.activeRow = null;
  765. (this.closeForm = {
  766. isBack: false,
  767. money: null,
  768. }),
  769. this.$refs.closeForm.resetFields();
  770. this.closeVisible = false;
  771. }
  772. },
  773. },
  774. };
  775. </script>
  776. <style lang='scss' scoped>
  777. .topWrap {
  778. display: flex;
  779. flex-direction: row;
  780. justify-content: flex-start;
  781. div {
  782. margin-right: 10px;
  783. }
  784. }
  785. </style>