courses.vue 33 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904
  1. <template>
  2. <div class="context">
  3. <div class="panel">
  4. <h5>课程管理
  5. </h5>
  6. <div class="likeTab">
  7. <el-button type="primary" @click="goType('courses')">当前课程</el-button>
  8. <el-button type="" @click="goType('coursesHistory')">历史记录</el-button>
  9. </div>
  10. <div class="panel-body">
  11. <div class="panel_control">
  12. <el-row :gutter="20">
  13. <el-col :span="6">
  14. <el-date-picker
  15. v-model="panel.timeScope"
  16. type="daterange"
  17. range-separator="至"
  18. start-placeholder="开始日期"
  19. end-placeholder="结束日期">
  20. </el-date-picker>
  21. </el-col>
  22. <el-col :span="4">
  23. <el-button size="" type="primary" @click="query" :disabled="serachBtnStatus" plain>查询
  24. </el-button>
  25. </el-col>
  26. </el-row>
  27. </div>
  28. </div>
  29. </div>
  30. <div class="table">
  31. <el-table
  32. :data="tableData"
  33. border
  34. is-horizontal-resize
  35. :default-sort="{prop: 'date', order: 'descending'}"
  36. element-loading-background="rgba(0, 0, 0, 0.8)"
  37. class=""
  38. @selection-change="handleSelectionChange"
  39. >
  40. >
  41. <el-table-column
  42. type="index"
  43. label="序号"
  44. align="center"
  45. width="50">
  46. </el-table-column>
  47. <el-table-column
  48. prop="BeginTime"
  49. label="上课时间"
  50. :formatter="filterFmtDate"
  51. >
  52. </el-table-column>
  53. <el-table-column
  54. prop="ClassName"
  55. label="课程"
  56. sortable
  57. >
  58. <template slot-scope="scope">
  59. <span class="lessonSpan"
  60. :style="{background:scope.row.ClassColor}">{{scope.row.ClassName}}</span>
  61. </template>
  62. </el-table-column>
  63. <el-table-column
  64. prop="ConsumeHour"
  65. label="消耗课时"
  66. width="110"
  67. sortable
  68. >
  69. </el-table-column>
  70. <el-table-column
  71. prop="OrderNum"
  72. label="实际预约"
  73. width="110"
  74. sortable
  75. >
  76. </el-table-column>
  77. <el-table-column
  78. prop="SvName"
  79. label="区域"
  80. width="110"
  81. sortable
  82. >
  83. </el-table-column>
  84. <el-table-column
  85. prop="ClassType"
  86. label="课程类型"
  87. sortable
  88. >
  89. <template slot-scope="scope">
  90. <span v-if="scope.row.ClassType == 1">团课</span>
  91. <span v-if="scope.row.ClassType == 3">私教</span>
  92. <span v-if="scope.row.ClassType == 2 && scope.row.PkNum == 2">两队PK</span>
  93. <span v-if="scope.row.ClassType == 2 && scope.row.PkNum == 3">三队PK</span>
  94. </template>
  95. </el-table-column>
  96. <el-table-column
  97. prop="FinishClass"
  98. label="当前状态"
  99. width="110"
  100. sortable
  101. >
  102. <template slot-scope="scope">
  103. <span v-if="scope.row.FinishClass == 0" style="color: red">未上课</span>
  104. <span v-if="scope.row.FinishClass == 1">已下课</span>
  105. <span v-if="scope.row.FinishClass == 2" style="color: yellowgreen">已上课</span>
  106. <span v-if="scope.row.FinishClass == 3">准备上课</span>
  107. <span v-if="scope.row.FinishClass == 4">已完成</span>
  108. </template>
  109. </el-table-column>
  110. <el-table-column
  111. prop="Status"
  112. label="操作"
  113. width="160"
  114. >
  115. <template slot-scope="scope">
  116. <!--<el-button type="primary" round size="mini" @click="checkClassOverPrepare(scope.row)">-->
  117. <!--下课-->
  118. <!--</el-button>-->
  119. <el-button type="primary" round size="mini" v-if="scope.row.FinishClass == 0"
  120. @click="showDialogMemberVisible(scope.row)">
  121. 上课
  122. </el-button>
  123. <!--<el-button type="danger" round size="mini" v-if="scope.row.FinishClass == 0"-->
  124. <!--@click="closeLesson(scope.row)">-->
  125. <!--关课-->
  126. <!--</el-button>-->
  127. <el-button type="primary" round size="mini"
  128. v-if="scope.row.FinishClass == 3 || scope.row.FinishClass == 2"
  129. @click="seeEdit(scope.row)"
  130. >
  131. 管理
  132. </el-button>
  133. <!--修改区域 todo-->
  134. <el-button type="primary" round plain size="mini" v-if="scope.row.FinishClass == 3"
  135. @click="changeShopVenue(scope.row)"
  136. >
  137. 编辑
  138. </el-button>
  139. <!--已完成才能看详情-->
  140. <el-button type="primary" round plain size="mini"
  141. v-if="scope.row.FinishClass == 1 || scope.row.FinishClass == 4"
  142. @click="seeDetail(scope.row)"
  143. >
  144. 详情
  145. </el-button>
  146. </template>
  147. </el-table-column>
  148. </el-table>
  149. <br>
  150. <el-pagination
  151. background
  152. :total="pageination.total"
  153. :page-size="pageination.pageItem"
  154. @current-change="pageChange"
  155. ></el-pagination>
  156. </div>
  157. <el-dialog :title="dialogTitle" :visible.sync="dialogMemberVisible" width="650px">
  158. <div class="dialogContent">
  159. <h5 class="classNames">{{className}}</h5>
  160. <div class="">
  161. <el-form ref="form" :model="form" label-width="160px">
  162. <el-form-item label="区域" :required="true">
  163. <el-select v-model="form.svId" filterable placeholder="请选择" @change="changeLocationValue">
  164. <el-option
  165. v-for="item in form.svList"
  166. :key="item.SvId"
  167. :label="item.Name"
  168. :value="item.SvId">
  169. </el-option>
  170. </el-select>
  171. </el-form-item>
  172. <el-form-item label="类型" :required="true">
  173. <el-select v-model="form.classType" filterable placeholder="请选择">
  174. <el-option
  175. v-for="item in form.ClassTypeOptions"
  176. :key="item.value"
  177. :label="item.label"
  178. :value="item.value">
  179. </el-option>
  180. </el-select>
  181. </el-form-item>
  182. <el-form-item label="组队方式" v-if="form.classType == 2">
  183. <el-select v-model="form.pkNum" filterable placeholder="请选择">
  184. <el-option
  185. v-for="item in form.PKTypeOptions"
  186. :key="item.value"
  187. :label="item.label"
  188. :value="item.value">
  189. </el-option>
  190. </el-select>
  191. </el-form-item>
  192. <!--选教练,非必选-->
  193. <el-form-item label="上课教练">
  194. <!--<el-transfer filterable v-model="dialogCoachValue" :data="form.dialogCoachdata"-->
  195. <!--:titles="['教练列表', '已添加教练']"></el-transfer>-->
  196. <el-select v-model="dialogCoachValue" filterable placeholder="请选择" >
  197. <el-option
  198. v-for="item in form.dialogCoachdata"
  199. :key="item.key"
  200. :label="item.label"
  201. :value="item.value">
  202. </el-option>
  203. </el-select>
  204. </el-form-item>
  205. </el-form>
  206. </div>
  207. </div>
  208. <div class="dialogFooter">
  209. <el-button type="primary" size="small" v-if="form.btnType == 0" :disabled="PrepareBtnStatus" @click="getClassStartPrepare()">确定
  210. </el-button>
  211. <el-button type="primary" size="small" v-if="form.btnType == 1" @click="getClassStartPrepareForEdit()">
  212. 确定
  213. </el-button>
  214. <el-button size="small" @click="dialogMemberVisible = false">取消</el-button>
  215. </div>
  216. </el-dialog>
  217. </div>
  218. </template>
  219. <script>
  220. import Global from '../Global.js'
  221. import {
  222. ClassPreFinishListQuery,
  223. ClassOverPrepare,
  224. ClassDetailQuery,
  225. QueryShopVenue,
  226. ClassStartPrepare,
  227. DispPlanInfoEdit,
  228. ShopManagerListQuery,
  229. } from "../api/getApiRes";
  230. let qs = require('qs');
  231. export default {
  232. data() {
  233. return {
  234. dialogMemberVisible: false,
  235. serachBtnStatus: false,
  236. PrepareBtnStatus: false,
  237. dialogVisible: false,//其他dialog
  238. dialogFinishVisible: false,//确认下课dialog
  239. dialogLesson: false,//课时调整
  240. dialogGift: false,//赠送课时调整
  241. dialogExpTime: false,//有效期调整
  242. dialogLessonTable: false,//会员课程
  243. dialogTitle: '上课准备',
  244. dialogCoachValue: [],
  245. className: '',
  246. current: getNowDate(),
  247. dialogValue: [],
  248. // panel 配置项目
  249. panel: {
  250. usercode: '',
  251. username: '',
  252. compname: '',
  253. keyword: '',
  254. USERCODE: '',
  255. endType: '',
  256. taskstatus: 99,
  257. draw: 1,
  258. start: 0,
  259. recordsTotal: 0,
  260. tableData: [],
  261. allTableData: [],
  262. limit: '10',
  263. multipleSort: false,
  264. loading: false,
  265. fileList: [],
  266. multipleSelection: [],
  267. detectedmac: '',
  268. options: [
  269. {value: 99, label: '全部'},
  270. {value: 1, label: '进行中'},
  271. {value: 2, label: '已完成'},
  272. ],
  273. endTypeOptions: [
  274. {value: 99, label: '全部'},
  275. {value: 30, label: '近一个月'},
  276. {value: 7, label: '近一周'},
  277. {value: 1, label: '当日'},
  278. ],
  279. time1: globalBt(),
  280. timeScope: globalBt2(0),
  281. },
  282. multipleSelection: [],
  283. pageination: {
  284. pageItem: 100,
  285. pageoptions: pageOptions(),
  286. total: 100,
  287. pageIndex: 1,
  288. },
  289. form: {
  290. name: '',
  291. svId: '',
  292. svName: '',
  293. classType: 1,
  294. userCode: '',
  295. coach: '',
  296. coachOptions: [],
  297. shopId: '',
  298. memberType: 1,
  299. lesson: 1,
  300. gift: 1,
  301. pktype: 1,
  302. pkNum: 2,
  303. btnType: 0,//0新建,1编辑
  304. memo: '',
  305. expTime: '',
  306. StdId: '',
  307. svList: [],//区域列表
  308. dialogdata: [],//穿梭待选
  309. dialogValue: [],//穿梭已选
  310. dialogCoachdata: [],//穿梭已选
  311. ClassTypeOptions: [
  312. {value: 1, label: '团课'},
  313. {value: 2, label: '竞技PK'},
  314. {value: 3, label: '私教'},
  315. ],
  316. PKTypeOptions: [
  317. {value: 2, label: '2队PK'},
  318. {value: 3, label: '3队PK'},
  319. ],
  320. },
  321. memberTypes: [
  322. {value: 1, label: '年会员'},
  323. {value: 2, label: '充值会员'},
  324. ],
  325. tableData: []
  326. }
  327. },
  328. mounted() {
  329. this.getTableQuery();
  330. },
  331. methods: {
  332. goType(url) {
  333. this.$router.push({path: '/' + url});
  334. },
  335. // 更改上课区域
  336. changeShopVenue(row) {
  337. this.dialogMemberVisible = true;
  338. this.form.btnType = 1;//0新建,1编辑
  339. // 读取本行信息
  340. this.dialogMemberVisible = true;
  341. this.className = row.ClassName + ' ' + row.BeginStr + ' - ' + row.EndStr;
  342. this.form.StdId = row.StdId;
  343. this.getQueryShopVenue();
  344. this.form.svId = row.SvId;
  345. this.form.classType = row.ClassType;
  346. this.form.pkNum = row.PkNum;
  347. },
  348. // 准备上课
  349. getClassStartPrepare() {
  350. let that = this;
  351. if (!that.form.svId) {
  352. that.$message.error('上课区域不能为空');
  353. return false
  354. }
  355. // 不是竞技pk的时候为0
  356. let uppkNum = that.form.classType == 2 ? that.form.pkNum : 0;
  357. let tid = that.dialogCoachValue.toString();
  358. let param = {
  359. token: localStorage.token,
  360. stdId: that.form.StdId,
  361. svId: that.form.svId,
  362. svName: that.form.svName,
  363. classType: that.form.classType,
  364. pkNum: uppkNum,
  365. tid: tid,//教练id
  366. };
  367. that.serachBtnStatus = true;
  368. let totalTime = 2;
  369. let clock = window.setInterval(() => {
  370. totalTime--;
  371. if (totalTime < 0) {
  372. totalTime = 2;
  373. that.serachBtnStatus = false;
  374. }
  375. }, 1000);
  376. let postdata = qs.stringify(param);
  377. ClassStartPrepare(postdata).then(res => {
  378. let json = res;
  379. if (json.Code == 0) {
  380. this.$router.push({
  381. path: '/courseEdit',
  382. query: {
  383. StdId: that.form.StdId,
  384. ClassName: that.form.ClassName,
  385. BeginStr: that.form.BeginStr,
  386. EndStr: that.form.EndStr,
  387. FinishClass: 3,
  388. ClassType: that.form.classType,
  389. PkNum: uppkNum,
  390. }
  391. });
  392. that.dialogMemberVisible = false;
  393. this.getTableQuery();
  394. } else {
  395. that.$message.error(json.Memo + '错误码:' + json.Code);
  396. }
  397. })
  398. },
  399. // 编辑
  400. getClassStartPrepareForEdit() {
  401. let that = this;
  402. if (!that.form.svId) {
  403. that.$message.error('上课区域不能为空');
  404. return false
  405. }
  406. // 不是竞技pk的时候为0
  407. let uppkNum = that.form.classType == 2 ? that.form.pkNum : 0;
  408. let param = {
  409. token: localStorage.token,
  410. stdId: that.form.StdId,
  411. svId: that.form.svId,
  412. svName: that.form.svName,
  413. classType: that.form.classType,
  414. pkNum: uppkNum,
  415. };
  416. let postdata = qs.stringify(param);
  417. DispPlanInfoEdit(postdata).then(res => {
  418. let json = res;
  419. if (json.Code == 0) {
  420. // NewId: 0
  421. that.dialogMemberVisible = false;
  422. this.getTableQuery();
  423. } else {
  424. that.$message.error(json.Memo + '错误码:' + json.Code);
  425. }
  426. })
  427. },
  428. seeDetail(row) {
  429. this.$router.push({
  430. path: '/classInfoDetail', query: {
  431. StdId: row.StdId,
  432. ClassName: row.ClassName,
  433. BeginStr: row.BeginStr,
  434. EndStr: row.EndStr,
  435. }
  436. });
  437. },
  438. seeEdit(row) {
  439. this.$router.push({
  440. path: '/courseEdit', query: {
  441. StdId: row.StdId,
  442. ClassName: row.ClassName,
  443. BeginStr: row.BeginStr,
  444. EndStr: row.EndStr,
  445. FinishClass: row.FinishClass,
  446. ClassType: row.ClassType,
  447. PkNum: row.PkNum,
  448. }
  449. });
  450. },
  451. // 关课
  452. closeLesson(row){
  453. that.$message.error('功能未上线,请耐心等候');
  454. return false;
  455. let that = this;
  456. let param = {
  457. token: localStorage.token,
  458. hrId: row.HrId,
  459. status: 9,//
  460. };
  461. let postdata = qs.stringify(param);
  462. this.$confirm('此操作将永久关闭当前课程, 是否继续?', '提示', {
  463. confirmButtonText: '确定',
  464. cancelButtonText: '取消',
  465. type: 'warning'
  466. }).then(() => {
  467. HrSensorsStatusEdit(postdata).then(res => {
  468. let json = res;
  469. if (json.Code == 0) {
  470. that.$message({
  471. showClose: true,
  472. message: '选中的课程已关闭!',
  473. type: 'success'
  474. });
  475. // 重载列表
  476. that.getTableQuery();
  477. } else {
  478. that.$message.error(json.Memo + '错误码:' + json.Code);
  479. }
  480. });
  481. }).catch(() => {
  482. this.$message({
  483. type: 'info',
  484. message: '已取消关课'
  485. });
  486. });
  487. },
  488. // 获取select的label
  489. changeLocationValue(val) {
  490. //locations是v-for里面的也是datas里面的值
  491. let obj = {};
  492. obj = this.form.svList.find((item) => {
  493. return item.SvId === val;
  494. });
  495. this.form.svName = obj.Name;
  496. },
  497. // 获取区域列表
  498. getQueryShopVenue() {
  499. let that = this;
  500. let param = {
  501. key: localStorage.ServiceKey,
  502. shopId: localStorage.ServiceId,
  503. };
  504. if (!localStorage.ServiceKey) {
  505. that.$message.error('还未与心率系统对接,请联系管理员');
  506. return false
  507. }
  508. let postdata = qs.stringify(param);
  509. QueryShopVenue(postdata).then(res => {
  510. let json = res;
  511. if (json.Code == 0) {
  512. that.form.svList = json.Rs;
  513. } else {
  514. that.$message.error(json.Memo + '错误码:' + json.Code);
  515. }
  516. })
  517. },
  518. vipSelect(stdId) {
  519. let that = this;
  520. // 筛选相同的stdid的classId
  521. that.form.stdList.map(function (item) {
  522. if (item.value == stdId) {
  523. let param = {
  524. token: localStorage.token,
  525. // classId: item.classId
  526. };
  527. let postdata = qs.stringify(param);
  528. // VipUserListQuery
  529. VipUserSimpleQuery(postdata).then(res => {
  530. let json = res;
  531. if (json.Code == 0) {
  532. that.form.userId = '';
  533. that.form.userList = turnResToOptionBySimViper(json.Rs);
  534. } else {
  535. that.$message.error(json.Memo + '错误码:' + json.Code);
  536. }
  537. })
  538. }
  539. })
  540. },
  541. showDialogMemberVisible(row) {
  542. this.dialogMemberVisible = true;
  543. this.form.btnType = 0;//0新建,1编辑编辑
  544. // clear
  545. this.form.svList = "";
  546. this.form.classType = 1;
  547. this.form.pkNum = 2;
  548. this.form.StdId = row.StdId;
  549. this.form.ClassName = row.ClassName;
  550. this.form.BeginStr = row.BeginStr;
  551. this.form.EndStr = row.EndStr;
  552. this.form.FinishClass = row.FinishClass;
  553. this.form.ClassType = row.ClassType;
  554. this.form.PkNum = row.PkNum;
  555. this.className = row.ClassName + ' ' + row.BeginStr + ' - ' + row.EndStr;
  556. this.form.StdId = row.StdId;
  557. this.getCoachOption();
  558. this.getQueryShopVenue();
  559. },
  560. // 获取教练选项
  561. getCoachOption() {
  562. let that = this;
  563. let param = {
  564. token: localStorage.token,
  565. name: this.panel.name,//
  566. phone: this.panel.phone,//
  567. shopId: localStorage.ShopId,//
  568. adminType: 4,//
  569. start: 1,//
  570. tableMax: 299,//
  571. };
  572. let postdata = qs.stringify(param);
  573. ShopManagerListQuery(postdata).then(res => {
  574. let json = res;
  575. if (json.Code == 0) {
  576. that.form.dialogCoachdata = turnResToOptionByUsers(json.Rs);
  577. } else {
  578. that.$message.error(json.Memo + '错误码:' + json.Code);
  579. }
  580. })
  581. },
  582. // 检测当前课是否处于可改变状态
  583. // 固定下当前已预约人数列表
  584. checkClassOverPrepare(row) {
  585. let that = this;
  586. let param = {
  587. token: localStorage.token,
  588. stdId: row.StdId,
  589. };
  590. let postdata = qs.stringify(param);
  591. ClassOverPrepare(postdata).then(res => {
  592. let json = res;
  593. if (json.Code == 0) {
  594. that.goFinish(row);
  595. } else {
  596. that.$message.error(json.Memo + '错误码:' + json.Code);
  597. }
  598. })
  599. },
  600. goFinish(row) {
  601. this.$router.push({
  602. path: '/finishDetail', query: {
  603. id: row.StdId,
  604. classId: row.ClassId,
  605. ClassName: row.ClassName,
  606. BeginTime: row.BeginTime,
  607. }
  608. });
  609. },
  610. handleSelectionChange(val) {
  611. this.multipleSelection = val;
  612. },
  613. // 查询按钮
  614. query() {
  615. let that = this;
  616. that.serachBtnStatus = true;
  617. let totalTime = 2;
  618. let clock = window.setInterval(() => {
  619. totalTime--;
  620. if (totalTime < 0) {
  621. totalTime = 2;
  622. that.serachBtnStatus = false;
  623. }
  624. }, 1000);
  625. this.getTableQuery();
  626. this.$message.success('查询完毕');
  627. },
  628. // 页面数据查询
  629. getTableQuery() {
  630. let that = this;
  631. that.loading = true;
  632. let param = {
  633. token: localStorage.token,
  634. tagname: that.panel.tagname,//标签名
  635. bt: nonTfmtDatetoLength(that.panel.timeScope[0], 10) + " 00:00:00",
  636. et: nonTfmtDatetoLength(that.panel.timeScope[1], 10) + " 23:59:59",
  637. fcStatus: '0,3,2',//状态字符串,空是全部 或 0,3,2 是待上课 或 1,4 已下课
  638. start: 1,//
  639. tableMax: 9999,//
  640. };
  641. let postdata = qs.stringify(param);
  642. ClassDetailQuery(postdata).then(res => {
  643. let json = res;
  644. if (json.Code == 0) {
  645. that.loading = false;
  646. if (json.Rs) {
  647. that.allTableData = json.Rs;
  648. that.recordsTotal = json.Rs.length;
  649. } else {
  650. that.allTableData = [];
  651. that.recordsTotal = 0;
  652. }
  653. // 设置分页数据
  654. that.setPaginations();
  655. } else {
  656. that.$message.error(json.Memo + '错误码:' + json.Code);
  657. }
  658. })
  659. },
  660. // 设置分页数据
  661. setPaginations() {
  662. // 分页属性
  663. let that = this;
  664. that.pageination.total = that.recordsTotal;
  665. // 默认分页
  666. that.tableData = that.allTableData.filter((item, index) => {
  667. return index < that.pageination.pageItem;
  668. });
  669. },
  670. // 每页显示数量
  671. handleSizeChange() {
  672. let that = this;
  673. that.tableData = that.allTableData.filter((item, index) => {
  674. return index < that.pageination.pageItem;
  675. });
  676. that.draw = that.pageination.pageItem;
  677. // that.getTableQuery();
  678. },
  679. // 翻页
  680. pageChange(pageIndex) {
  681. let that = this;
  682. // 获取当前页
  683. let index = that.pageination.pageItem * (pageIndex - 1);
  684. // 数据总数
  685. let nums = that.pageination.pageItem * pageIndex;
  686. // 容器
  687. let tables = [];
  688. for (var i = index; i < nums; i++) {
  689. if (that.allTableData[i]) {
  690. tables.push(that.allTableData[i])
  691. }
  692. this.tableData = tables;
  693. }
  694. that.start = index * that.draw;
  695. // that.getTableQuery();
  696. },
  697. // 过滤时间
  698. filterFmtDate(value, row, column) {
  699. let that = this;
  700. return nonTfmtDate(column, 11);
  701. },
  702. },
  703. watch: {
  704. $route(to) {
  705. if (to.name == 'courses') {
  706. this.getTableQuery();
  707. }
  708. },
  709. },
  710. }
  711. </script>
  712. <style scoped>
  713. @import "../assets/css/panel.css";
  714. .context {
  715. height: 770px;
  716. overflow-y: scroll;
  717. display: block;
  718. margin: 0 auto;
  719. background-color: #fff !important;
  720. padding: 30px;
  721. }
  722. .panel-body {
  723. padding: 20px;
  724. background: #F0F2F5;
  725. }
  726. .change {
  727. width: 100%;
  728. overflow: hidden;
  729. display: block;
  730. margin: 0 auto;
  731. padding-top: 10px;
  732. padding-bottom: 10px;
  733. }
  734. .change button {
  735. float: left;
  736. }
  737. .change button.pull-right {
  738. float: right;
  739. }
  740. .dialogTitle {
  741. width: 100%;
  742. overflow: hidden;
  743. display: block;
  744. margin: 0 auto;
  745. color: #000000;
  746. font-size: 18px;
  747. text-align: center;
  748. }
  749. .dialogTitle em {
  750. float: none;
  751. font-style: normal;
  752. color: #3799FF;
  753. margin: 0;
  754. }
  755. /deep/ .el-transfer-panel__item .el-checkbox__input {
  756. left: 40px;
  757. }
  758. .dialogFooter {
  759. width: 90%;
  760. overflow: hidden;
  761. display: block;
  762. margin: 0 auto;
  763. margin-top: 10px;
  764. }
  765. .dialogFooter button {
  766. float: right;
  767. margin-left: 10px;
  768. }
  769. .dialogContent {
  770. width: 100%;
  771. overflow: hidden;
  772. display: block;
  773. margin: 0 auto;
  774. }
  775. .dialogContent .pull-left {
  776. width: 30%;
  777. float: left;
  778. }
  779. .dialogContent .pull-right {
  780. width: 70%;
  781. float: right;
  782. }
  783. .blueTitle {
  784. width: 200px;
  785. overflow: hidden;
  786. display: block;
  787. margin: 0 auto;
  788. margin-top: 10px;
  789. margin-bottom: 40px;
  790. background: #F0F2F5;
  791. border-radius: 19px;
  792. text-align: center;
  793. color: #3799FF;
  794. font-size: 16px;
  795. padding: 5px 24px;
  796. }
  797. .current {
  798. width: 158px;
  799. height: 23px;
  800. /*float: left;*/
  801. border-radius: 250px;
  802. text-align: center;
  803. background: #F0F2F5;
  804. color: #545454;
  805. font-size: 14px;
  806. padding: 3px 10px;
  807. margin-left: 20px;
  808. }
  809. .lessonSpan {
  810. width: 78px;
  811. height: 22px;
  812. border-radius: 11px;
  813. margin-right: 5px;
  814. float: left;
  815. margin-bottom: 3px;
  816. text-align: center;
  817. color: #000;
  818. font-size: 12px;
  819. }
  820. .classNames {
  821. width: 211px;
  822. height: 25px;
  823. background: #f0f2f5;
  824. font-family: "Source Han Sans CN";
  825. font-weight: normal;
  826. font-size: 16px;
  827. color: #3799ff;
  828. border-radius: 250px;
  829. text-align: center;
  830. margin: 0 auto;
  831. margin-bottom: 10px;
  832. }
  833. /deep/ .el-date-editor .el-range-separator {
  834. line-height: 25px;
  835. }
  836. .likeTab {
  837. width: 100%;
  838. overflow: hidden;
  839. display: block;
  840. margin: 0 auto;
  841. padding-top: 10px;
  842. padding-bottom: 0;
  843. border-bottom: 1px solid #ccc;
  844. margin-bottom: 10px;
  845. }
  846. .likeTab button {
  847. float: left;
  848. border-radius: 0;
  849. }
  850. .likeTab button.pull-right {
  851. float: right;
  852. }
  853. .el-dialog__body .el-date-editor.el-input__inner {
  854. width: 156px;
  855. }
  856. .el-transfer-panel__item.el-checkbox .el-checkbox__label{
  857. width: 156px;
  858. }
  859. /deep/ .el-dialog__body .el-transfer-panel__item .el-checkbox__input {
  860. left: 10px;
  861. }
  862. /deep/ .el-dialog__body .el-form-item__content .el-select {
  863. float: left;
  864. margin-left: 50px;
  865. }
  866. /deep/ .el-dialog__body .el-transfer {
  867. float: left;
  868. margin-left: 50px;
  869. }
  870. </style>