index.vue 63 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913
  1. <template>
  2. <div class="app-container">
  3. <el-container>
  4. <!-- 左侧区域 -->
  5. <el-aside width="360px" class="left-aside">
  6. <!-- 顶部区域 -->
  7. <div class="left-header">
  8. <div class="left-header-top">
  9. <el-button type="primary" class="search-btn" @click="handleLeftQuery" v-hasPermi="['course:trainingCamp:list']">搜索</el-button>
  10. <el-button type="primary" style="width: 50%" icon="el-icon-plus" @click="handleAddTrainingCamp" v-hasPermi="['course:trainingCamp:add']">新建训练营</el-button>
  11. </div>
  12. <div class="search-input-wrapper">
  13. <el-input
  14. v-model="leftQueryParams.trainingCampName"
  15. placeholder="请输入训练营名称"
  16. prefix-icon="el-icon-search"
  17. clearable
  18. size="small"
  19. @keyup.enter.native="handleLeftQuery"
  20. />
  21. </div>
  22. <div class="sort-wrapper">
  23. <span class="sort-label">排序方式</span>
  24. <el-select v-model="leftQueryParams.scs"
  25. placeholder="按序号倒序"
  26. size="small"
  27. class="sort-select"
  28. @change="handleSortChange"
  29. >
  30. <el-option label="按序号倒序" value="order_number(desc),training_camp_id(desc)" />
  31. <el-option label="按序号顺序" value="order_number(asc),training_camp_id(desc)" />
  32. </el-select>
  33. </div>
  34. </div>
  35. <!-- 训练营列表 -->
  36. <div class="camp-list" ref="campList" @scroll="handleScroll" v-loading="leftLoading">
  37. <div
  38. v-for="(item, index) in campList"
  39. :key="index"
  40. class="camp-item"
  41. :class="{ 'active': activeCampIndex === index }"
  42. @click="selectCamp(index)"
  43. >
  44. <div class="camp-content">
  45. <div class="camp-title">
  46. <i class="el-icon-s-flag camp-icon"></i>
  47. {{ item.trainingCampName }}
  48. </div>
  49. <div class="camp-info">
  50. <span>序号:{{ item.orderNumber }}</span>
  51. <span>最新营期开课:{{ item.recentDate || '-' }}</span>
  52. </div>
  53. <div class="camp-stats">
  54. <span class="stat-item">
  55. <i class="el-icon-s-data"></i>
  56. 营期数:{{ item.periodCount || 0 }}
  57. </span>
  58. <span class="stat-item">
  59. <i class="el-icon-user"></i>
  60. 会员总数:{{ item.vipCount || 0 }}
  61. </span>
  62. </div>
  63. </div>
  64. <div class="camp-actions">
  65. <el-button type="text" class="action-btn delete-btn" @click.stop="handleDeleteCamp(item)" v-hasPermi="['course:trainingCamp:remove']">删除</el-button>
  66. <!-- <el-button type="text" class="action-btn copy-btn" @click.stop="handleCopyCamp(item)" v-hasPermi="['course:trainingCamp:copy']">复制</el-button>-->
  67. <el-button type="text" class="action-btn copy-btn" @click.stop="handleEditCamp(item)" v-hasPermi="['course:trainingCamp:edit']">编辑</el-button>
  68. </div>
  69. </div>
  70. <!-- 底部加载更多提示 -->
  71. <div v-if="loadingMore" class="loading-more">
  72. <i class="el-icon-loading"></i>
  73. <span>加载中...</span>
  74. </div>
  75. <!-- 所有数据加载完毕提示 -->
  76. <div v-if="campList.length > 0 && !leftQueryParams.hasNextPage && !loadingMore" class="no-more-data">
  77. <span>—— 已加载全部训练营 ——</span>
  78. </div>
  79. </div>
  80. </el-aside>
  81. <!-- 右侧区域 -->
  82. <el-main>
  83. <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
  84. <el-form-item label="营期名称" prop="periodName">
  85. <el-input
  86. v-model="queryParams.periodName"
  87. placeholder="请输入营期名称"
  88. clearable
  89. size="small"
  90. @keyup.enter.native="handleQuery"
  91. />
  92. </el-form-item>
  93. <el-form-item label="公司" prop="companyIdList">
  94. <el-select v-model="queryParams.companyIdList" placeholder="请选择公司" clearable size="small" multiple>
  95. <el-option
  96. v-for="item in companyOptions"
  97. :key="item.companyId"
  98. :label="item.companyName"
  99. :value="item.companyId"
  100. />
  101. </el-select>
  102. </el-form-item>
  103. <el-form-item label="开营日期开始" prop="periodStartingTime" label-width="120px">
  104. <el-date-picker clearable size="small" style="width: 200px"
  105. v-model="queryParams.periodStartingTime"
  106. type="date"
  107. value-format="yyyy-MM-dd"
  108. placeholder="请选择开营日期开始时间">
  109. </el-date-picker>
  110. </el-form-item>
  111. <el-form-item label="开营日期结束" prop="periodEndTime" label-width="120px">
  112. <el-date-picker clearable size="small" style="width: 300px"
  113. v-model="queryParams.periodEndTime"
  114. type="date"
  115. value-format="yyyy-MM-dd"
  116. placeholder="请选择开营日期结束时间">
  117. </el-date-picker>
  118. </el-form-item>
  119. <el-form-item>
  120. <el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery" v-hasPermi="['course:period:list']">搜索</el-button>
  121. <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
  122. </el-form-item>
  123. </el-form>
  124. <el-row :gutter="10" class="mb8">
  125. <el-col :span="1.5">
  126. <el-button
  127. type="primary"
  128. plain
  129. icon="el-icon-plus"
  130. size="mini"
  131. @click="handleAdd"
  132. v-hasPermi="['course:period:add']"
  133. >新增</el-button>
  134. </el-col>
  135. <el-col :span="1.5">
  136. <el-button
  137. type="warning"
  138. plain
  139. icon="el-icon-download"
  140. size="mini"
  141. @click="handleExport"
  142. v-hasPermi="['course:period:export']"
  143. >导出</el-button>
  144. </el-col>
  145. <el-col :span="1.5">
  146. <el-button
  147. type="primary"
  148. plain
  149. icon="el-icon-edit"
  150. size="mini"
  151. @click="handleBatchSetRedPacket"
  152. v-hasPermi="['course:period:setRedPacket']"
  153. :disabled="batchSetRedPacketDisabled"
  154. >批量设置红包</el-button>
  155. </el-col>
  156. <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
  157. </el-row>
  158. <el-table v-loading="loading" :data="periodList" @selection-change="handleSelectionChange" border>
  159. <el-table-column type="selection" width="55" align="center" />
  160. <el-table-column label="营期名称" align="center" prop="periodName" />
  161. <el-table-column label="公司名称" align="center" prop="companyName" />
  162. <el-table-column label="营期状态" align="center" prop="periodStatus" width="100" :formatter="periodStatusFormatter" />
  163. <el-table-column label="开营开始时间" align="center" prop="periodStartingTime" width="180" />
  164. <el-table-column label="开营结束时间" align="center" prop="periodEndTime" width="180" />
  165. <el-table-column label="创建时间" align="center" prop="createTime" width="180" />
  166. <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
  167. <template slot-scope="scope">
  168. <el-button
  169. size="mini"
  170. type="text"
  171. icon="el-icon-edit"
  172. @click="handleUpdate(scope.row)"
  173. v-hasPermi="['course:period:query']"
  174. >修改</el-button>
  175. <!-- <el-button-->
  176. <!-- size="mini"-->
  177. <!-- type="text"-->
  178. <!-- icon="el-icon-edit"-->
  179. <!-- @click="handleCourse(scope.row)"-->
  180. <!-- v-hasPermi="['course:period:edit']"-->
  181. <!-- >课程管理</el-button>-->
  182. <!-- <el-button-->
  183. <!-- size="mini"-->
  184. <!-- type="text"-->
  185. <!-- icon="el-icon-money"-->
  186. <!-- @click="setRedPacket(scope.row)"-->
  187. <!-- >设置红包</el-button>-->
  188. <el-button
  189. size="mini"
  190. type="text"
  191. icon="el-icon-setting"
  192. @click="handlePeriodSettings(scope.row)"
  193. >营期相关设置</el-button>
  194. <el-button
  195. size="mini"
  196. type="text"
  197. icon="el-icon-circle-close"
  198. @click="handleClosePeriod(scope.row)"
  199. v-hasPermi="['course:period:close']"
  200. >结束营期</el-button>
  201. <el-button
  202. size="mini"
  203. type="text"
  204. icon="el-icon-delete"
  205. @click="handleDelete(scope.row)"
  206. v-hasPermi="['course:period:remove']"
  207. >删除</el-button>
  208. </template>
  209. </el-table-column>
  210. </el-table>
  211. <pagination
  212. v-show="total>0"
  213. :total="total"
  214. :page.sync="queryParams.pageNum"
  215. :limit.sync="queryParams.pageSize"
  216. @pagination="getList"
  217. />
  218. </el-main>
  219. </el-container>
  220. <!-- 添加或修改会员营期对话框-->
  221. <el-drawer :title="title" :visible.sync="open" size="700px" append-to-body>
  222. <el-form ref="form" :model="form" :rules="rules" label-width="120px">
  223. <el-form-item label="营期名称" prop="periodName">
  224. <el-input v-model="form.periodName" placeholder="请输入营期名称" />
  225. </el-form-item>
  226. <el-form-item label="公司" prop="companyId">
  227. <el-select v-model="form.companyId" placeholder="请选择公司" multiple>
  228. <el-option
  229. v-for="item in companyOptions"
  230. :key="item.companyId"
  231. :label="item.companyName"
  232. :value="item.companyId"
  233. />
  234. </el-select>
  235. </el-form-item>
  236. <el-form-item label="课程风格" prop="courseStyle">
  237. <image-upload v-model="form.courseStyle" :limit="1" />
  238. </el-form-item>
  239. <el-form-item label="直播间风格" prop="liveRoomStyle">
  240. <image-upload v-model="form.liveRoomStyle" :limit="1" />
  241. </el-form-item>
  242. <el-form-item label="课程LOGO" prop="courseLogo">
  243. <image-upload v-model="form.courseLogo" :limit="1" />
  244. </el-form-item>
  245. <el-form-item label="红包发放方式" prop="redPacketGrantMethod">
  246. <el-radio-group v-model="form.redPacketGrantMethod">
  247. <el-radio :label="1" >按课程</el-radio>
  248. <el-radio :label="2" >按营期</el-radio>
  249. </el-radio-group>
  250. </el-form-item>
  251. <el-form-item label="营期类型" prop="periodType">
  252. <el-radio-group v-model="form.periodType">
  253. <el-radio :label="1" >多课程</el-radio>
  254. <el-radio :label="2" >单课程</el-radio>
  255. </el-radio-group>
  256. </el-form-item>
  257. <el-form-item label="销售提前查看天数" prop="maxViewNum">
  258. <el-input-number :min="0" v-model="form.maxViewNum" style="width: 200px" />
  259. </el-form-item>
  260. <el-form-item label="开营日期" prop="periodStartingTime">
  261. <el-date-picker
  262. :disabled = "isDisabledDateRange"
  263. :style="{display: form.periodType == 1 ? '' : 'none !important'}"
  264. v-model="form.dateRange"
  265. @change="timeChange(1)"
  266. type="daterange"
  267. range-separator="至"
  268. start-placeholder="开始日期"
  269. end-placeholder="结束日期"
  270. value-format="yyyy-MM-dd"
  271. :picker-options="{disabledDate}"
  272. :clearable="false"
  273. >
  274. </el-date-picker>
  275. <el-date-picker
  276. :disabled = "isDisabledDateRange"
  277. :style="{display: form.periodType == 2 ? '' : 'none !important'}"
  278. @change="timeChange(2)"
  279. v-model="form.date"
  280. type="date"
  281. value-format="yyyy-MM-dd"
  282. placeholder="选择日期"
  283. :picker-options="{disabledDate}"
  284. :clearable="false"
  285. >
  286. </el-date-picker>
  287. </el-form-item>
  288. </el-form>
  289. <div class="drawer-footer">
  290. <el-button type="primary" @click="submitForm">确 定</el-button>
  291. <el-button @click="cancel">取 消</el-button>
  292. </div>
  293. </el-drawer>
  294. <!-- 添加训练营对话框 -->
  295. <el-dialog :title="campForm.trainingCampId ? '修改训练营' : '新建训练营'" :visible.sync="campDialogVisible" width="500px" append-to-body>
  296. <el-form ref="campForm" :model="campForm" :rules="campRules" label-width="100px">
  297. <el-form-item label="训练营名称" prop="trainingCampName">
  298. <el-input v-model="campForm.trainingCampName" placeholder="请输入训练营名称" />
  299. </el-form-item>
  300. </el-form>
  301. <div slot="footer" class="dialog-footer">
  302. <el-button type="primary" @click="submitCampForm">确 定</el-button>
  303. <el-button @click="cancelCampForm">取 消</el-button>
  304. </div>
  305. </el-dialog>
  306. <!-- &lt;!&ndash; 添加或修改会员营期对话框&ndash;&gt;-->
  307. <!-- <el-dialog title="课程管理" :visible.sync="course.open" width="75%" top="10px" append-to-body style="padding-bottom: 10px">-->
  308. <!-- <el-row :gutter="10" class="mb8">-->
  309. <!-- <el-col :span="1.5">-->
  310. <!-- <el-button-->
  311. <!-- v-if="(getDiff(course.row.periodStartingTime, course.row.periodEndTime) - course.total) > 0"-->
  312. <!-- type="primary"-->
  313. <!-- icon="el-icon-plus"-->
  314. <!-- size="mini"-->
  315. <!-- @click="handleAddCourse"-->
  316. <!-- v-hasPermi="['course:period:add']"-->
  317. <!-- >添加课程</el-button>-->
  318. <!-- </el-col>-->
  319. <!-- </el-row>-->
  320. <!-- <el-table v-loading="course.loading" :data="course.list">-->
  321. <!-- <el-table-column label="课程" align="center" prop="courseName" width="180" />-->
  322. <!-- <el-table-column label="小节" align="center" prop="videoName" />-->
  323. <!-- <el-table-column label="营期时间" align="center" prop="dayDate" width="150" />-->
  324. <!-- <el-table-column label="创建时间" align="center" prop="createTime" width="150" />-->
  325. <!-- </el-table>-->
  326. <!-- <div slot="footer" class="dialog-footer">-->
  327. <!--&lt;!&ndash; <el-button type="primary" @click="saveCourseData">保存</el-button>&ndash;&gt;-->
  328. <!-- </div>-->
  329. <!-- </el-dialog>-->
  330. <!-- 添加课程对话框-->
  331. <el-dialog title="添加课程" :visible.sync="course.addOpen" width="500px" append-to-body>
  332. <el-form ref="courseAddForm" :model="course.form" :rules="courseAddRules" label-width="100px">
  333. <el-form-item label="课程" prop="courseId">
  334. <el-select filterable v-model="course.form.courseId" placeholder="请选择课程" clearable size="small" @change="courseChange(course.form.courseId)" style="width: 100%" :value-key="'dictValue'">
  335. <el-option
  336. v-for="dict in courseList"
  337. :key="dict.dictValue"
  338. :label="dict.dictLabel"
  339. :value="parseInt(dict.dictValue)"
  340. />
  341. </el-select>
  342. </el-form-item>
  343. <el-form-item label="小节" prop="videoIds">
  344. <el-select filterable v-model="course.form.videoIds" placeholder="请选择小节" :multiple-limit="getDiff(course.row.periodStartingTime, course.row.periodEndTime) - course.total" multiple clearable size="small" style="width: 100%" :value-key="'dictValue'">
  345. <el-option
  346. v-for="dict in videoList"
  347. :key="dict.dictValue"
  348. :label="dict.dictLabel"
  349. :value="parseInt(dict.dictValue)"
  350. />
  351. </el-select>
  352. </el-form-item>
  353. <el-form-item label="看课时间" prop="timeRange">
  354. <el-time-picker
  355. is-range
  356. v-model="course.form.timeRange"
  357. :picker-options="{
  358. selectableRange: '00:00:00 - 23:59:59'
  359. }"
  360. range-separator="至"
  361. start-placeholder="开始时间"
  362. value-format="HH:mm:ss"
  363. end-placeholder="结束时间">
  364. </el-time-picker>
  365. </el-form-item>
  366. <el-form-item label="领取红包时间" prop="lastJoinTime">
  367. <el-time-picker
  368. v-model="course.form.joinTime"
  369. value-format="HH:mm:ss"
  370. placeholder="选择时间范围">
  371. </el-time-picker>
  372. <p style="color: red;margin: 0;font-size: 12px">超过领取红包时间,只允许看课,不允许领取红包</p>
  373. </el-form-item>
  374. </el-form>
  375. <div slot="footer" class="dialog-footer">
  376. <el-button type="primary" @click="submitCourseForm">确 定</el-button>
  377. <el-button @click="closeAddCourse">取 消</el-button>
  378. </div>
  379. </el-dialog>
  380. <el-dialog title="修改看课时间" :visible.sync="updateCourse.open" width="600px" append-to-body>
  381. <el-form ref="courseUpdateForm" :model="updateCourse.form" :rules="courseUpdateRules" label-width="100px">
  382. <el-form-item label="看课时间" prop="timeRange" label-width="110px">
  383. <el-date-picker
  384. v-model="updateCourse.form.timeRange"
  385. type="datetimerange"
  386. range-separator="至"
  387. start-placeholder="开始时间"
  388. end-placeholder="结束时间"
  389. value-format="yyyy-MM-dd HH:mm:ss"
  390. :default-time="['00:00:00', '23:59:59']"
  391. :picker-options="{
  392. shortcuts: [{
  393. text: '今天',
  394. onClick(picker) {
  395. const end = new Date();
  396. const start = new Date();
  397. picker.$emit('pick', [start, end]);
  398. }
  399. }]
  400. }"
  401. >
  402. </el-date-picker>
  403. </el-form-item>
  404. <el-form-item label="领取红包时间" prop="joinTime" label-width="110px">
  405. <el-date-picker
  406. v-model="updateCourse.form.joinTime"
  407. type="datetime"
  408. placeholder="选择时间"
  409. value-format="yyyy-MM-dd HH:mm:ss"
  410. :default-time="'23:59:59'"
  411. >
  412. </el-date-picker>
  413. <p style="color: red;margin: 0;font-size: 12px">超过领取红包时间,只允许看课,不允许领取红包</p>
  414. </el-form-item>
  415. </el-form>
  416. <div slot="footer" class="dialog-footer">
  417. <el-button type="primary" @click="submitUpdateCourseForm">确 定</el-button>
  418. <el-button @click="closeUpdateCourse">取 消</el-button>
  419. </div>
  420. </el-dialog>
  421. <el-dialog title="修改营期时间" :visible.sync="updatePeriodDate.open" width="500px" append-to-body>
  422. <el-form ref="courseUpdateForm" :model="updatePeriodDate.form" label-width="100px">
  423. <el-form-item label="营期时间" prop="dayDate">
  424. <el-date-picker
  425. v-model="updatePeriodDate.form.dayDate"
  426. :selectableRange="updatePeriodDate.form.dayDate"
  427. value-format="yyyy-MM-dd"
  428. type="date"
  429. placeholder="选择日期">
  430. </el-date-picker>
  431. </el-form-item>
  432. </el-form>
  433. <div slot="footer" class="dialog-footer">
  434. <el-button type="primary" @click="updatePeriodDateSubmit">确 定</el-button>
  435. <el-button @click="updatePeriodDate.open = false">取 消</el-button>
  436. </div>
  437. </el-dialog>
  438. <!-- <red-packet-->
  439. <!-- :visible.sync="redPacketVisible"-->
  440. <!-- :periodId="currentRedPacketData.periodId"-->
  441. <!-- :videoId="currentRedPacketData.videoId"-->
  442. <!-- @success="handleRedPacketSuccess"-->
  443. <!-- />-->
  444. <!-- 营期相关设置抽屉 -->
  445. <el-drawer
  446. title="营期相关设置"
  447. :visible.sync="periodSettingsVisible"
  448. direction="rtl"
  449. size="74%"
  450. :destroy-on-close="true"
  451. append-to-body
  452. custom-class="period-settings-drawer"
  453. >
  454. <div class="drawer-content" style="margin-left: 25px">
  455. <el-tabs v-model="activeTab" @tab-click="handleTabClick">
  456. <el-tab-pane label="课程管理" name="course">
  457. <el-row :gutter="10" class="mb8">
  458. <el-col :span="1.5">
  459. <el-button
  460. v-if="(getDiff(periodSettingsData.periodStartingTime, periodSettingsData.periodEndTime) - course.total) > 0"
  461. type="primary"
  462. icon="el-icon-plus"
  463. size="mini"
  464. @click="handleAddCourse"
  465. v-hasPermi="['course:period:addCourse']"
  466. >添加课程</el-button>
  467. </el-col>
  468. <!-- <el-col :span="1.5">-->
  469. <!-- <el-button-->
  470. <!-- type="primary"-->
  471. <!-- size="mini"-->
  472. <!-- :disabled="updateCourse.ids.length <= 0"-->
  473. <!-- @click="handleUpdatePeriodDate"-->
  474. <!-- >修改营期时间</el-button>-->
  475. <!-- </el-col>-->
  476. <el-col :span="1.5">
  477. <el-button
  478. type="primary"
  479. size="mini"
  480. :disabled="updateCourse.ids.length <= 0"
  481. @click="handleUpdateCourse"
  482. v-hasPermi="['course:period:updateCourseTime']"
  483. >修改看课时间</el-button>
  484. </el-col>
  485. </el-row>
  486. <el-table ref="courseTable" v-loading="course.loading" :data="course.list" @selection-change="handleSelectionCourseChange" border>
  487. <el-table-column type="selection" width="55" align="center" />
  488. <el-table-column label="课程" align="center" prop="courseName" width="180" />
  489. <el-table-column label="小节" align="center" prop="videoName" />
  490. <el-table-column label="开课状态" align="center" prop="status" width="100" :formatter="courseStatusFormatter" />
  491. <el-table-column label="营期时间" align="center" prop="dayDate" width="100"/>
  492. <el-table-column label="开始时间" align="center" prop="startDateTime" width="100">
  493. <!-- <template slot-scope="scope">-->
  494. <!-- <el-tag>{{scope.row.startDateTime}}</el-tag>-->
  495. <!-- </template>-->
  496. </el-table-column>
  497. <el-table-column label="结束时间" align="center" prop="endDateTime" width="100">
  498. <!-- <template slot-scope="scope">-->
  499. <!-- <el-tag type="success">{{parseTime(scope.row.endDateTime, '{h}:{i}:{s}')}}</el-tag>-->
  500. <!-- </template>-->
  501. </el-table-column>
  502. <el-table-column label="领取红包时间" align="center" prop="lastJoinTime" width="160">
  503. <template slot-scope="scope">
  504. <el-tag type="danger">{{scope.row.lastJoinTime}}</el-tag>
  505. </template>
  506. </el-table-column>
  507. <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
  508. <template slot-scope="scope">
  509. <el-button
  510. size="mini"
  511. type="text"
  512. icon="el-icon-top"
  513. @click="handleTop(scope.row)"
  514. v-hasPermi="['course:period:courseMove']"
  515. >上移</el-button>
  516. <el-button
  517. size="mini"
  518. type="text"
  519. icon="el-icon-bottom"
  520. @click="handleBottom(scope.row)"
  521. v-hasPermi="['course:period:courseMove']"
  522. >下移</el-button>
  523. <el-button
  524. size="mini"
  525. type="text"
  526. icon="el-icon-edit"
  527. @click="handleUpdateDate(scope.row)"
  528. >修改营期时间</el-button>
  529. </template>
  530. </el-table-column>
  531. </el-table>
  532. <pagination
  533. v-show="course.total > 0"
  534. :total="course.total"
  535. :page.sync="course.queryParams.pageNum"
  536. :limit.sync="course.queryParams.pageSize"
  537. @pagination="getCourseList"
  538. style="height: 40px"
  539. />
  540. </el-tab-pane>
  541. <el-tab-pane label="公司列表" name="company">
  542. <red-packet
  543. :visible.sync="redPacketVisible"
  544. :activeTab="activeTab"
  545. :periodId="periodSettingsData.periodId"
  546. @success="handleRedPacketSuccess"
  547. />
  548. </el-tab-pane>
  549. <el-tab-pane label="课程统计" name="statistics">
  550. <course-statistics
  551. :periodId="periodSettingsData.periodId"
  552. :active="activeTab === 'statistics'"
  553. />
  554. </el-tab-pane>
  555. </el-tabs>
  556. </div>
  557. </el-drawer>
  558. <batch-red-packet
  559. :visible.sync="batchRedPacketVisible"
  560. :selected-data="selectedPeriods"
  561. @success="handleBatchRedPacketSuccess"
  562. />
  563. </div>
  564. </template>
  565. <script>
  566. import {addPeriod, delPeriod, exportPeriod, getPeriod, pagePeriod, updatePeriod, getDays, addCourse, updateCourseTime, updateCourseDate, updateListCourseData, periodCourseMove, closePeriod} from "@/api/course/userCoursePeriod";
  567. import {getCompanyList} from "@/api/company/company";
  568. import { listCamp, addCamp, editCamp, delCamp, copyCamp } from "@/api/course/userCourseCamp";
  569. import { courseList,videoList } from '@/api/course/courseRedPacketLog'
  570. import RedPacket from './redPacket.vue'
  571. import BatchRedPacket from './batchRedPacket.vue'
  572. import CourseStatistics from './statistics.vue'
  573. import Da from "element-ui/src/locale/lang/da";
  574. export default {
  575. name: "Period",
  576. components: {
  577. RedPacket,
  578. BatchRedPacket,
  579. CourseStatistics
  580. },
  581. data() {
  582. return {
  583. // 遮罩层
  584. loading: true,
  585. updateDateOpen: false,
  586. // 左侧遮罩层
  587. leftLoading: true,
  588. // 选中数组
  589. ids: [],
  590. // 非单个禁用
  591. single: true,
  592. // 非多个禁用
  593. multiple: true,
  594. // 显示搜索条件
  595. showSearch: true,
  596. // 总条数
  597. total: 0,
  598. // 左侧总条数
  599. leftTotal: 0,
  600. // 会员营期表格数据
  601. periodList: [],
  602. // 左侧列表数据
  603. leftList: [],
  604. videoList: [],
  605. // 弹出层标题
  606. title: "",
  607. isDisabledDateRange: false, //是否禁用开营日期
  608. // 是否显示弹出层
  609. open: false,
  610. // 查询参数
  611. queryParams: {
  612. pageNum: 1,
  613. pageSize: 10,
  614. periodName: null,
  615. periodStartingTime: null,
  616. periodEndTime: null,
  617. companyIdList: []
  618. },
  619. // 左侧查询参数
  620. leftQueryParams: {
  621. pageNum: 1,
  622. pageSize: 10,
  623. hasNextPage: false,
  624. scs: 'order_number(desc),training_camp_id(desc)',
  625. trainingCampName: null
  626. },
  627. // 表单参数
  628. form: {},
  629. // 课程相关数据
  630. course: {
  631. open: false,
  632. row:{},
  633. list:[],
  634. queryParams: {
  635. pageNum: 1,
  636. pageSize: 10,
  637. },
  638. loading: true,
  639. total: 0,
  640. addOpen: false,
  641. form: {},
  642. },
  643. //修改营期时间参数
  644. updatePeriodDate: {
  645. open: false,
  646. loading: true,
  647. ids: [],
  648. form: {},
  649. },
  650. updateCourse: {
  651. open: false,
  652. loading: true,
  653. ids: [],
  654. form: {
  655. timeRange: null,
  656. joinTime: null
  657. },
  658. },
  659. // 表单校验
  660. rules: {
  661. periodName: [
  662. { required: true, message: '营期名称不能为空', trigger: 'blur' }
  663. ],
  664. companyId: [
  665. { required: true, message: '公司不能为空', trigger: 'change' }
  666. ],
  667. courseStyle: [
  668. { required: true, message: '课程风格不能为空', trigger: 'change' }
  669. ],
  670. redPacketGrantMethod: [
  671. { required: true, message: '红包发放方式不能为空', trigger: 'change' }
  672. ],
  673. periodType: [
  674. { required: true, message: '营期类型不能为空', trigger: 'change' }
  675. ],
  676. maxViewNum: [
  677. { required: true, message: '销售可查看天数不能为空', trigger: 'blur' }
  678. ],
  679. periodStartingTime: [
  680. { required: true, message: '开营日期不能为空', trigger: 'change' }
  681. ]
  682. },
  683. // 公司选项
  684. companyOptions: [],
  685. // 训练营列表
  686. campList: [],
  687. // 激活的训练营索引
  688. activeCampIndex: null,
  689. // 训练营对话框是否显示
  690. campDialogVisible: false,
  691. courseList: false,
  692. // 训练营表单
  693. campForm: {
  694. trainingCampId: null,
  695. trainingCampName: ''
  696. },
  697. // 训练营表单校验
  698. campRules: {
  699. trainingCampName: [
  700. { required: true, message: '训练营名称不能为空', trigger: 'blur' },
  701. { min: 2, max: 50, message: '长度在 2 到 50 个字符', trigger: 'blur' }
  702. ]
  703. },
  704. // 添加课程表单校验
  705. courseAddRules: {
  706. courseId: [
  707. { required: true, message: '请选择课程', trigger: 'change' }
  708. ],
  709. videoIds: [
  710. { required: true, message: '请选择小节', trigger: 'change' },
  711. { type: 'array', min: 1, message: '请至少选择一个小节', trigger: 'change' }
  712. ]
  713. },
  714. // 修改看课时间表单校验
  715. courseUpdateRules: {
  716. timeRange: [
  717. {
  718. required: true,
  719. validator: (rule, value, callback) => {
  720. if (!value || !Array.isArray(value) || value.length !== 2) {
  721. callback(new Error('请选择完整的看课时间范围'));
  722. } else {
  723. // 检查时间格式是否正确(yyyy-MM-dd HH:mm:ss)
  724. const timeRegex = /^\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}$/;
  725. if (!timeRegex.test(value[0]) || !timeRegex.test(value[1])) {
  726. callback(new Error('时间格式不正确'));
  727. } else if (value[0] >= value[1]) {
  728. callback(new Error('结束时间必须大于开始时间'));
  729. } else {
  730. callback();
  731. }
  732. }
  733. },
  734. trigger: 'change'
  735. }
  736. ],
  737. joinTime: [
  738. {
  739. required: true,
  740. validator: (rule, value, callback) => {
  741. if (!value) {
  742. callback(new Error('请选择领取红包时间'));
  743. } else {
  744. // 检查时间格式是否正确(yyyy-MM-dd HH:mm:ss)
  745. const timeRegex = /^\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}$/;
  746. if (!timeRegex.test(value)) {
  747. callback(new Error('时间格式不正确'));
  748. } else {
  749. // 检查领取红包时间是否在看课时间范围内
  750. const timeRange = this.updateCourse.form.timeRange;
  751. if (timeRange && Array.isArray(timeRange) && timeRange.length === 2) {
  752. if (value < timeRange[0] || value > timeRange[1]) {
  753. callback(new Error('领取红包时间必须在看课时间范围内'));
  754. } else {
  755. callback();
  756. }
  757. } else {
  758. callback();
  759. }
  760. }
  761. }
  762. },
  763. trigger: 'change'
  764. }
  765. ]
  766. },
  767. // 滚动节流标志
  768. scrollThrottle: false,
  769. // 加载更多状态
  770. loadingMore: false,
  771. // 设置红包对话框
  772. redPacketVisible: false,
  773. periodCompanyList: [],
  774. currentRedPacketData: {
  775. periodId: '',
  776. videoId: ''
  777. },
  778. // 营期相关设置抽屉
  779. periodSettingsVisible: false,
  780. activeTab: 'course',
  781. periodSettingsData: {},
  782. companyList: [],
  783. courseDialogVisible: false,
  784. redPacketList: [],
  785. currentCompany: null,
  786. // 选中的营期数据
  787. selectedPeriods: [],
  788. // 批量设置红包按钮是否禁用
  789. batchSetRedPacketDisabled: true,
  790. // 批量设置红包弹出框
  791. batchRedPacketVisible: false,
  792. };
  793. },
  794. created() {
  795. courseList().then(response => {
  796. this.courseList = response.list;
  797. });
  798. // this.getList();
  799. this.getLeftList();
  800. this.getCompanyList();
  801. },
  802. methods: {
  803. /** 查询会员营期列表 */
  804. getList() {
  805. this.loading = true;
  806. const params = { ...this.queryParams };
  807. pagePeriod(params).then(response => {
  808. this.periodList = response.rows;
  809. this.total = response.total;
  810. this.loading = false;
  811. });
  812. },
  813. /** 查询左侧列表 */
  814. getLeftList() {
  815. this.leftLoading = true;
  816. // 重置页码和加载更多状态
  817. this.leftQueryParams.pageNum = 1;
  818. this.loadingMore = false;
  819. // 训练营数据
  820. listCamp(this.leftQueryParams).then(response => {
  821. if (response && response.code === 200) {
  822. this.campList = response.data.list || [];
  823. this.leftQueryParams.hasNextPage = response.data.hasNextPage;
  824. this.activeCampIndex = this.campList.length > 0 ? 0 : null;
  825. this.selectCamp(this.activeCampIndex);
  826. // 如果当前显示的列表高度不足以触发滚动,但还有更多数据,自动加载下一页
  827. this.$nextTick(() => {
  828. const scrollEl = this.$refs.campList;
  829. if (scrollEl && this.leftQueryParams.hasNextPage && scrollEl.scrollHeight <= scrollEl.clientHeight) {
  830. this.loadMoreCamps();
  831. }
  832. });
  833. } else {
  834. this.$message.error(response.msg || '获取训练营列表失败');
  835. this.campList = [];
  836. this.leftQueryParams.hasNextPage = false;
  837. }
  838. this.leftLoading = false;
  839. }).catch(error => {
  840. console.error('获取训练营列表失败:', error);
  841. this.$message.error('获取训练营列表失败');
  842. this.campList = [];
  843. this.leftQueryParams.hasNextPage = false;
  844. this.leftLoading = false;
  845. });
  846. },
  847. /** 搜索按钮操作 */
  848. handleQuery() {
  849. this.queryParams.pageNum = 1;
  850. this.getList();
  851. },
  852. /** 左侧搜索按钮操作 */
  853. handleLeftQuery() {
  854. // 重置页码和列表
  855. this.leftQueryParams.pageNum = 1;
  856. this.campList = [];
  857. this.getLeftList();
  858. },
  859. /** 重置按钮操作 */
  860. resetQuery() {
  861. this.resetForm("queryForm");
  862. this.queryParams.companyIdList = [];
  863. this.handleQuery();
  864. },
  865. /** 多选框选中数据 */
  866. handleSelectionChange(selection) {
  867. this.ids = selection.map(item => item.periodId)
  868. this.single = selection.length!==1
  869. this.multiple = !selection.length
  870. // 更新批量设置红包相关数据
  871. this.selectedPeriods = selection;
  872. this.batchSetRedPacketDisabled = selection.length === 0;
  873. },
  874. handleSelectionCourseChange(selection) {
  875. this.updateCourse.ids = selection.map(item => item.id)
  876. },
  877. /** 新增按钮操作 */
  878. handleAdd() {
  879. this.reset();
  880. this.open = true;
  881. this.title = "添加会员营期";
  882. this.isDisabledDateRange = false;
  883. },
  884. /** 修改按钮操作 */
  885. handleUpdate(row) {
  886. this.reset();
  887. const periodId = row.periodId || this.ids
  888. getPeriod(periodId).then(response => {
  889. this.form = response.data;
  890. if (this.form.companyId) {
  891. this.form.companyId = this.form.companyId.split(',').map(id => Number(id));
  892. }
  893. // 设置看课时间范围(回显)
  894. if (this.form.viewStartTime && this.form.viewEndTime) {
  895. this.form.timeRange = [this.form.viewStartTime, this.form.viewEndTime];
  896. }
  897. if(this.form.periodType == 1){
  898. this.form.dateRange = [this.form.periodStartingTime, this.form.periodEndTime];
  899. }
  900. if(this.form.periodType == 2){
  901. this.form.date = this.form.periodStartingTime;
  902. }
  903. this.open = true;
  904. this.title = "修改会员营期";
  905. this.isDisabledDateRange = true;
  906. });
  907. },
  908. /** 提交按钮 */
  909. submitForm() {
  910. this.$refs["form"].validate(valid => {
  911. if (valid) {
  912. let data = JSON.parse(JSON.stringify(this.form));
  913. // 处理看课时间范围
  914. if (data.timeRange && data.timeRange.length === 2) {
  915. data.viewStartTime = data.timeRange[0];
  916. data.viewEndTime = data.timeRange[1];
  917. }
  918. data.companyId = data.companyId.join()
  919. data.trainingCampId = this.queryParams.trainingCampId
  920. if (data.periodId != null) {
  921. updatePeriod(data).then(response => {
  922. if (response.code === 200) {
  923. this.msgSuccess("修改成功");
  924. this.open = false;
  925. this.getList();
  926. }
  927. });
  928. } else {
  929. addPeriod(data).then(response => {
  930. if (response.code === 200) {
  931. this.msgSuccess("新增成功");
  932. this.open = false;
  933. this.getList();
  934. }
  935. });
  936. }
  937. }
  938. });
  939. },
  940. /** 删除按钮操作 */
  941. handleDelete(row) {
  942. //添加删除判断,只能删除未开始的营期
  943. console.log(row.periodStatus)
  944. if(row.periodStatus !== 1){
  945. this.$message.error('营期处于进行中或者结束,不能删除');
  946. return;
  947. }
  948. const periodIds = row.periodId || this.ids;
  949. this.$confirm('是否确认删除该营期?', "提示", {
  950. confirmButtonText: "确定",
  951. cancelButtonText: "取消",
  952. type: "warning"
  953. }).then(function() {
  954. return delPeriod(periodIds);
  955. }).then(() => {
  956. this.getList();
  957. this.msgSuccess("删除成功");
  958. }).catch(function() {});
  959. },
  960. /** 导出按钮操作 */
  961. handleExport() {
  962. const queryParams = this.queryParams;
  963. this.$confirm('是否确认导出所有会员营期数据项?', "警告", {
  964. confirmButtonText: "确定",
  965. cancelButtonText: "取消",
  966. type: "warning"
  967. }).then(function() {
  968. return exportPeriod(queryParams);
  969. }).then(response => {
  970. this.download(response.msg);
  971. }).catch(function() {});
  972. },
  973. /** 批量设置红包 */
  974. handleBatchSetRedPacket() {
  975. if (this.selectedPeriods.length === 0) {
  976. this.$message.warning('请至少选择一个营期');
  977. return;
  978. }
  979. this.batchRedPacketVisible = true;
  980. },
  981. /** 处理批量设置红包保存 */
  982. // handleBatchRedPacketSave(data) {
  983. // // 这里等待接口提供后补充具体实现
  984. // // 示例代码:
  985. // // batchSetRedPacket(data).then(response => {
  986. // // if (response.code === 200) {
  987. // // this.$message.success('批量设置成功');
  988. // // this.getList();
  989. // // }
  990. // // });
  991. // this.batchRedPacketVisible = false;
  992. // },
  993. /** 获取公司下拉列表*/
  994. getCompanyList() {
  995. this.loading = true;
  996. getCompanyList().then(response => {
  997. this.companyOptions = response.data;
  998. this.loading = false;
  999. });
  1000. },
  1001. // 取消按钮
  1002. cancel() {
  1003. this.open = false;
  1004. this.reset();
  1005. },
  1006. // 表单重置
  1007. reset() {
  1008. this.form = {
  1009. periodId: null,
  1010. periodName: null,
  1011. companyId: null,
  1012. courseId: null,
  1013. videoId: null,
  1014. trainingCampId: null,
  1015. createTime: null,
  1016. updateTime: null,
  1017. courseStyle: null,
  1018. liveRoomStyle: null,
  1019. redPacketGrantMethod: 1,
  1020. periodType: 1,
  1021. periodStartingTime: null,
  1022. dateRange: [],
  1023. date: null,
  1024. days: [],
  1025. maxViewNum: 0,
  1026. periodEndTime: null,
  1027. timeRange: [], // 看课时间范围
  1028. viewStartTime: null, // 看课开始时间
  1029. viewEndTime: null, // 看课结束时间
  1030. lastJoinTime: null // 领取红包时间
  1031. };
  1032. this.resetForm("form");
  1033. },
  1034. // 处理训练营列表的逻辑
  1035. handleDeleteCamp(item) {
  1036. this.$confirm(`确定要删除训练营"${item.trainingCampName}"吗?`, '提示', {
  1037. confirmButtonText: '删除',
  1038. cancelButtonText: '取消',
  1039. type: 'warning'
  1040. }).then(() => {
  1041. // 调用删除训练营API
  1042. const trainingCampId = item.trainingCampId;
  1043. this.leftLoading = true;
  1044. delCamp(trainingCampId).then(response => {
  1045. if (response.code === 200) {
  1046. this.$message.success('删除成功');
  1047. // 从列表中移除
  1048. const index = this.campList.findIndex(camp => camp.trainingCampId === trainingCampId);
  1049. if (index !== -1) {
  1050. this.campList.splice(index, 1);
  1051. }
  1052. // 如果删除的是当前选中的训练营,则重置选中状态
  1053. if (this.activeCampIndex === index) {
  1054. this.activeCampIndex = this.campList.length > 0 ? 0 : null;
  1055. if (this.activeCampIndex !== null) {
  1056. // 更新右侧列表
  1057. this.selectCamp(this.activeCampIndex);
  1058. } else {
  1059. // 没有训练营了,清空右侧列表
  1060. this.periodList = [];
  1061. }
  1062. }
  1063. } else {
  1064. this.$message.error(response.msg || '删除失败');
  1065. }
  1066. this.leftLoading = false;
  1067. }).catch(error => {
  1068. this.$message.error('删除失败: ' + error.message);
  1069. this.leftLoading = false;
  1070. });
  1071. }).catch(() => {
  1072. this.$message.info('已取消删除');
  1073. });
  1074. },
  1075. /** 复制训练营 */
  1076. handleCopyCamp(item) {
  1077. // 调用添加训练营API
  1078. copyCamp(item.trainingCampId).then(response => {
  1079. if (response.code === 200) {
  1080. this.$message.success('复制成功');
  1081. // 重新加载训练营列表
  1082. this.getLeftList();
  1083. } else {
  1084. this.$message.error(response.msg || '复制训练营失败');
  1085. }
  1086. }).catch(error => {
  1087. this.$message.error('复制训练营失败: ' + error.message);
  1088. });
  1089. },
  1090. /** 修改训练营按钮操作 */
  1091. handleEditCamp(item) {
  1092. this.resetCampForm();
  1093. this.leftLoading = true;
  1094. // 获取最新的训练营数据
  1095. const trainingCampId = item.trainingCampId;
  1096. // 应该调用获取训练营详情的API
  1097. setTimeout(() => {
  1098. // 填充表单数据
  1099. this.campForm = {
  1100. trainingCampId: item.trainingCampId,
  1101. trainingCampName: item.trainingCampName,
  1102. orderNumber: item.orderNumber || 1,
  1103. status: item.status !== undefined ? item.status : 1
  1104. };
  1105. this.campDialogVisible = true;
  1106. this.leftLoading = false;
  1107. }, 300);
  1108. },
  1109. /** 新建训练营按钮操作 */
  1110. handleAddTrainingCamp() {
  1111. this.resetCampForm();
  1112. this.campDialogVisible = true;
  1113. },
  1114. /** 重置训练营表单 */
  1115. resetCampForm() {
  1116. this.campForm = {
  1117. trainingCampId: null,
  1118. trainingCampName: ''
  1119. };
  1120. // 如果表单已经创建,则重置校验结果
  1121. if (this.$refs.campForm) {
  1122. this.$refs.campForm.resetFields();
  1123. }
  1124. },
  1125. /** 取消训练营表单 */
  1126. cancelCampForm() {
  1127. this.campDialogVisible = false;
  1128. this.resetCampForm();
  1129. },
  1130. /** 提交训练营表单 */
  1131. submitCampForm() {
  1132. this.$refs.campForm.validate(valid => {
  1133. if (valid) {
  1134. // 显示加载中
  1135. this.leftLoading = true;
  1136. // 准备提交的数据
  1137. const submitData = JSON.parse(JSON.stringify(this.campForm));
  1138. // 判断是新增还是修改
  1139. if (submitData.trainingCampId) {
  1140. // 修改训练营
  1141. editCamp(submitData).then(response => {
  1142. if (response.code === 200) {
  1143. this.$message.success('修改训练营成功');
  1144. this.campDialogVisible = false;
  1145. // 更新列表中的数据
  1146. const index = this.campList.findIndex(camp => camp.trainingCampId === submitData.trainingCampId);
  1147. if (index !== -1) {
  1148. this.campList[index] = { ...this.campList[index], ...submitData };
  1149. // 如果修改的是当前选中的训练营,更新右侧列表
  1150. if (this.activeCampIndex === index) {
  1151. this.selectCamp(index);
  1152. }
  1153. }
  1154. // 重新加载训练营列表
  1155. this.getLeftList();
  1156. } else {
  1157. this.$message.error(response.msg || '修改训练营失败');
  1158. this.leftLoading = false;
  1159. }
  1160. }).catch(error => {
  1161. this.$message.error('修改训练营失败: ' + (error.message || '未知错误'));
  1162. this.leftLoading = false;
  1163. });
  1164. } else {
  1165. // 新增训练营
  1166. addCamp(submitData).then(response => {
  1167. if (response.code === 200) {
  1168. this.$message.success('新建训练营成功');
  1169. this.campDialogVisible = false;
  1170. // 重新加载训练营列表
  1171. this.getLeftList();
  1172. } else {
  1173. this.$message.error(response.msg || '新建训练营失败');
  1174. this.leftLoading = false;
  1175. }
  1176. }).catch(error => {
  1177. this.$message.error('新建训练营失败: ' + (error.message || '未知错误'));
  1178. this.leftLoading = false;
  1179. });
  1180. }
  1181. }
  1182. });
  1183. },
  1184. /** 排序方式改变 */
  1185. handleSortChange(value) {
  1186. this.leftQueryParams.scs = value;
  1187. // 重置页码和列表
  1188. this.leftQueryParams.pageNum = 1;
  1189. this.campList = [];
  1190. this.getLeftList();
  1191. },
  1192. /** 选中训练营 */
  1193. selectCamp(index) {
  1194. if(index == null || index == undefined) return;
  1195. this.activeCampIndex = index;
  1196. // 加载对应的训练营营期数据
  1197. const selectedCamp = this.campList[index];
  1198. this.queryParams.trainingCampId = selectedCamp.trainingCampId;
  1199. this.getList();
  1200. },
  1201. /** 处理滚动事件,实现滚动到底部加载更多 */
  1202. handleScroll() {
  1203. // 如果正在节流中或者正在加载中,则不处理
  1204. if (this.scrollThrottle || this.loadingMore) return;
  1205. // 设置节流,200ms内不再处理滚动事件
  1206. this.scrollThrottle = true;
  1207. setTimeout(() => {
  1208. this.scrollThrottle = false;
  1209. }, 200);
  1210. const scrollEl = this.$refs.campList;
  1211. if (!scrollEl) return;
  1212. // 判断是否滚动到底部:滚动高度 + 可视高度 >= 总高度 - 30(添加30px的容差,提前触发加载)
  1213. const isBottom = scrollEl.scrollTop + scrollEl.clientHeight >= scrollEl.scrollHeight - 30;
  1214. // 如果滚动到底部,且有下一页数据,且当前不在加载中,则加载更多
  1215. if (isBottom && this.leftQueryParams.hasNextPage && !this.leftLoading && !this.loadingMore) {
  1216. this.loadMoreCamps();
  1217. }
  1218. },
  1219. /** 加载更多训练营数据 */
  1220. loadMoreCamps() {
  1221. // 已在加载中,防止重复加载
  1222. if (this.leftLoading || this.loadingMore) return;
  1223. // 设置加载状态
  1224. this.loadingMore = true;
  1225. // 页码加1
  1226. this.leftQueryParams.pageNum += 1;
  1227. // 加载下一页数据
  1228. listCamp(this.leftQueryParams).then(response => {
  1229. if (response && response.code === 200) {
  1230. // 将新数据追加到列表中
  1231. const newList = response.data.list || [];
  1232. if (newList.length > 0) {
  1233. this.campList = [...this.campList, ...newList];
  1234. }
  1235. // 更新是否有下一页的标志
  1236. this.leftQueryParams.hasNextPage = response.data.hasNextPage;
  1237. // 如果当前显示的列表高度不足以触发滚动,但还有更多数据,自动加载下一页
  1238. this.$nextTick(() => {
  1239. const scrollEl = this.$refs.campList;
  1240. if (scrollEl && this.leftQueryParams.hasNextPage && scrollEl.scrollHeight <= scrollEl.clientHeight) {
  1241. // 延迟一点再加载下一页,避免过快加载
  1242. setTimeout(() => {
  1243. this.loadMoreCamps();
  1244. }, 300);
  1245. }
  1246. });
  1247. } else {
  1248. this.$message.error(response.msg || '加载更多训练营失败');
  1249. }
  1250. this.loadingMore = false;
  1251. }).catch(error => {
  1252. console.error('加载更多训练营失败:', error);
  1253. this.$message.error('加载更多训练营失败');
  1254. this.loadingMore = false;
  1255. });
  1256. },
  1257. timeChange(type){
  1258. if(type == 1){
  1259. this.form.periodStartingTime = this.form.dateRange[0];
  1260. this.form.periodEndTime = this.form.dateRange[1];
  1261. // 转换为天数
  1262. let days = this.getDiff(this.form.periodStartingTime, this.form.periodEndTime);
  1263. for (let i = 0; i < days; i++) {
  1264. this.form.days.push({lesson: i + 1});
  1265. }
  1266. }
  1267. if(type == 2){
  1268. this.form.periodStartingTime = this.form.date;
  1269. this.form.periodEndTime = this.form.date;
  1270. }
  1271. },
  1272. getDiff(start, end) {
  1273. if(start == null || start == undefined || start == '') return 0;
  1274. if(end == null || end == undefined || end == '') return 0;
  1275. if(start == end) 1;
  1276. const startDate = this.getUTCDate(start);
  1277. const endDate = this.getUTCDate(end);
  1278. const timeDiff = endDate - startDate;
  1279. return (Math.floor(timeDiff / (1000 * 3600 * 24))) + 1; // 直接取整
  1280. },
  1281. getUTCDate(dateStr) {
  1282. const [year, month, day] = dateStr.split('-').map(Number);
  1283. return new Date(Date.UTC(year, month - 1, day)); // 月份从0开始
  1284. },
  1285. // handleCourse(row){
  1286. // this.course = {
  1287. // open: false,
  1288. // row:{},
  1289. // list:[],
  1290. // queryParams: {
  1291. // pageNum: 1,
  1292. // pageSize: 3, // 修改为每页显示3条
  1293. // },
  1294. // loading: true,
  1295. // total: 0,
  1296. // addOpen: false,
  1297. // form: {},
  1298. // };
  1299. // this.course.open = true;
  1300. // this.course.row = row;
  1301. // this.course.queryParams.periodId = row.periodId;
  1302. // this.getCourseList();
  1303. // },
  1304. getCourseList(){
  1305. this.course.loading = true;
  1306. getDays(this.course.queryParams).then(e => {
  1307. this.course.list = e.rows;
  1308. this.course.total = e.total;
  1309. this.course.loading = false;
  1310. });
  1311. },
  1312. handleAddCourse() {
  1313. this.course.addOpen = true;
  1314. this.course.form = {
  1315. periodId: this.course.queryParams.periodId,
  1316. courseId: null,
  1317. timeRange: null,
  1318. joinTime: null,
  1319. videoIds: []
  1320. };
  1321. // 重置表单
  1322. this.$nextTick(() => {
  1323. if (this.$refs.courseAddForm) {
  1324. this.$refs.courseAddForm.resetFields();
  1325. }
  1326. });
  1327. },
  1328. handleUpdateCourse() {
  1329. this.updateCourse.open = true;
  1330. this.updateCourse.form = {
  1331. ids: this.updateCourse.ids,
  1332. timeRange: null,
  1333. joinTime: null
  1334. };
  1335. // 重置表单校验状态(但不清空选中状态)
  1336. this.$nextTick(() => {
  1337. if (this.$refs.courseUpdateForm) {
  1338. this.$refs.courseUpdateForm.resetFields();
  1339. }
  1340. });
  1341. },
  1342. closeAddCourse() {
  1343. this.course.addOpen = false;
  1344. this.course.form = {
  1345. periodId: null,
  1346. courseId: null,
  1347. timeRange: null,
  1348. joinTime: null,
  1349. videoIds: []
  1350. };
  1351. // 重置表单
  1352. if (this.$refs.courseAddForm) {
  1353. this.$refs.courseAddForm.resetFields();
  1354. }
  1355. },
  1356. closeUpdateCourse() {
  1357. this.updateCourse.open = false;
  1358. // 清空选中的课程id,使【修改看课时间】按钮变为禁用状态
  1359. this.updateCourse.ids = [];
  1360. // 清空课程列表的选中状态
  1361. this.$nextTick(() => {
  1362. if (this.$refs.courseTable) {
  1363. this.$refs.courseTable.clearSelection();
  1364. }
  1365. });
  1366. // 重置表单数据
  1367. this.updateCourse.form = {
  1368. ids: [],
  1369. timeRange: null,
  1370. joinTime: null
  1371. };
  1372. // 重置表单校验
  1373. this.$nextTick(() => {
  1374. if (this.$refs.courseUpdateForm) {
  1375. this.$refs.courseUpdateForm.resetFields();
  1376. }
  1377. });
  1378. },
  1379. courseChange(row){
  1380. this.course.form.videoIds = [];
  1381. videoList(row).then(response => {
  1382. this.videoList=response.list
  1383. });
  1384. },
  1385. submitCourseForm(){
  1386. this.$refs.courseAddForm.validate(valid => {
  1387. if (valid) {
  1388. if(this.course.form.timeRange != null && this.course.form.timeRange.length === 2){
  1389. this.course.form.startTime = this.course.form.timeRange[0];
  1390. this.course.form.endTime1 = this.course.form.timeRange[1];
  1391. }
  1392. // 提交数据
  1393. addCourse(this.course.form).then(response => {
  1394. this.$message.success('添加成功');
  1395. this.course.addOpen = false;
  1396. // 重新加载训练营列表
  1397. this.getCourseList();
  1398. });
  1399. }
  1400. });
  1401. },
  1402. submitUpdateCourseForm(){
  1403. this.$refs.courseUpdateForm.validate(valid => {
  1404. if (valid) {
  1405. // 检查时间范围是否正确
  1406. if (this.updateCourse.form.timeRange &&
  1407. Array.isArray(this.updateCourse.form.timeRange) &&
  1408. this.updateCourse.form.timeRange.length === 2) {
  1409. this.updateCourse.form.startTime = this.updateCourse.form.timeRange[0];
  1410. this.updateCourse.form.endTime1 = this.updateCourse.form.timeRange[1];
  1411. } else {
  1412. this.$message.error('请先选择正确的看课时间范围');
  1413. return;
  1414. }
  1415. // 检查领取红包时间是否正确
  1416. if (!this.updateCourse.form.joinTime) {
  1417. this.$message.error('请选择领取红包时间');
  1418. return;
  1419. }
  1420. // 提交数据
  1421. updateCourseTime(this.updateCourse.form).then(response => {
  1422. this.$message.success('修改成功');
  1423. this.updateCourse.open = false;
  1424. // 清空选中的课程ID,使【修改看课时间】按钮变为禁用状态
  1425. this.updateCourse.ids = [];
  1426. // 清空课程列表的选中状态
  1427. this.$nextTick(() => {
  1428. if (this.$refs.courseTable) {
  1429. this.$refs.courseTable.clearSelection();
  1430. }
  1431. });
  1432. // 重新加载训练营列表
  1433. this.getCourseList();
  1434. }).catch(error => {
  1435. this.$message.error('修改失败:' + (error.message || '未知错误'));
  1436. });
  1437. }
  1438. });
  1439. },
  1440. updatePeriodDateSubmit(){
  1441. updateCourseDate(this.updatePeriodDate.form).then(response => {
  1442. this.$message.success('修改成功');
  1443. this.updatePeriodDate.open = false;
  1444. // 重新加载课程列表
  1445. this.getCourseList();
  1446. });
  1447. },
  1448. // saveCourseData(){
  1449. // updateListCourseData(this.course.list).then(response => {
  1450. // this.$message.success('保存成功');
  1451. // this.getCourseList();
  1452. // });
  1453. // },
  1454. // setRedPacket(row) {
  1455. // this.currentRedPacketData = {
  1456. // periodId: row.periodId
  1457. // // videoId: row.videoId
  1458. // };
  1459. // this.redPacketVisible = true;
  1460. // },
  1461. handleRedPacketSuccess() {
  1462. this.getCourseList();
  1463. },
  1464. handlePeriodSettings(row) {
  1465. this.periodSettingsData = row;
  1466. this.periodSettingsVisible = true;
  1467. // 初始化课程列表
  1468. this.course.queryParams.periodId = row.periodId;
  1469. // 根据当前激活的tab加载对应数据
  1470. this.handleTabClick({ name: this.activeTab });
  1471. },
  1472. // 结束营期
  1473. handleClosePeriod(row) {
  1474. const msg = `注: 1.确认结束营期,该营期的开营结束时间改为当天24点。2.当天正在播放中的课程不变。3.第二天如有未开始的课程,统一改为已结束。是否确认结束 ${row.periodName} 营期吗?`
  1475. this.$confirm(msg, "警告", {
  1476. confirmButtonText: "确定",
  1477. cancelButtonText: "取消",
  1478. type: "warning"
  1479. }).then(() => {
  1480. closePeriod({id: row.periodId}).then(response => {
  1481. if (response.code === 200) {
  1482. this.getList()
  1483. } else {
  1484. this.$message.error(response.msg)
  1485. }
  1486. })
  1487. }).catch(() => {})
  1488. },
  1489. handleBatchRedPacketSuccess() {
  1490. this.batchRedPacketVisible = false;
  1491. this.getCourseList();
  1492. },
  1493. /** 处理tab切换 */
  1494. handleTabClick(tab) {
  1495. if (tab.name === 'course') {
  1496. this.getCourseList();
  1497. } else if (tab.name === 'company') {
  1498. this.redPacketVisible = true;
  1499. }
  1500. },
  1501. /** 上移课程 */
  1502. handleTop(row) {
  1503. const currentIndex = this.course.list.findIndex(item => item.id === row.id);
  1504. if (currentIndex <= 0) {
  1505. this.$message.warning('已经是第一条数据');
  1506. return;
  1507. }
  1508. // 获取上一条数据
  1509. const prevRow = this.course.list[currentIndex - 1];
  1510. console.log({
  1511. id: row.id,
  1512. targetId: prevRow.id,
  1513. type: 1 //上移
  1514. })
  1515. periodCourseMove({
  1516. id: row.id,
  1517. targetId: prevRow.id,
  1518. type: 1 //上移
  1519. }).then(response => {
  1520. if (response.code === 200) {
  1521. this.$message.success('上移成功');
  1522. this.getCourseList();
  1523. } else {
  1524. this.$message.error(response.msg || '上移失败');
  1525. }
  1526. }).catch(() => {
  1527. this.$message.error('上移失败');
  1528. });
  1529. },
  1530. /** 下移课程 */
  1531. handleBottom(row) {
  1532. const currentIndex = this.course.list.findIndex(item => item.id === row.id);
  1533. if (currentIndex === -1 || currentIndex >= this.course.list.length - 1) {
  1534. this.$message.warning('已经是最后一条数据');
  1535. return;
  1536. }
  1537. // 获取下一条数据
  1538. const nextRow = this.course.list[currentIndex + 1];
  1539. periodCourseMove({
  1540. id: row.id,
  1541. targetId: nextRow.id,
  1542. type: 2 //下移
  1543. }).then(response => {
  1544. if (response.code === 200) {
  1545. this.$message.success('下移成功');
  1546. this.getCourseList(); // 重新加载列表
  1547. } else {
  1548. this.$message.error(response.msg || '下移失败');
  1549. }
  1550. }).catch(() => {
  1551. this.$message.error('下移失败');
  1552. });
  1553. },
  1554. /** 营期状态格式化 */
  1555. periodStatusFormatter(row) {
  1556. const statusMap = {
  1557. 1: '未开始',
  1558. 2: '进行中',
  1559. 3: '已结束'
  1560. };
  1561. return statusMap[row.periodStatus] || '未知状态';
  1562. },
  1563. /** 开课状态格式化 */
  1564. courseStatusFormatter(row) {
  1565. const statusMap = {
  1566. 0: '未开始',
  1567. 1: '进行中',
  1568. 2: '已结束'
  1569. };
  1570. return statusMap[row.status] || '未知状态';
  1571. },
  1572. /** 营期状态格式化 */
  1573. handleUpdateDate(row) {
  1574. this.updatePeriodDate.form = {id: row.id, dayDate: row.dayDate};
  1575. this.updatePeriodDate.open = true;
  1576. },
  1577. disabledDate(time) {
  1578. return time.getTime() < new Date(new Date().setHours(0,0,0,0));
  1579. },
  1580. getPickerOptions() {
  1581. // 如果已选择看课时间范围,则领取红包时间应在看课时间范围内
  1582. if (this.updateCourse.form.timeRange &&
  1583. Array.isArray(this.updateCourse.form.timeRange) &&
  1584. this.updateCourse.form.timeRange.length === 2) {
  1585. return {
  1586. selectableRange: `${this.updateCourse.form.timeRange[0]} - ${this.updateCourse.form.timeRange[1]}`
  1587. };
  1588. }
  1589. // 默认全天可选
  1590. return {
  1591. selectableRange: '00:00:00 - 23:59:59'
  1592. };
  1593. },
  1594. onTimeRangeChange() {
  1595. // 当看课时间范围改变时,清空领取红包时间
  1596. this.updateCourse.form.joinTime = null;
  1597. // 强制更新组件以刷新领取红包时间的可选范围
  1598. this.$forceUpdate();
  1599. },
  1600. },
  1601. };
  1602. </script>
  1603. <style scoped>
  1604. .left-aside {
  1605. background-color: #fff;
  1606. border-right: 1px solid #EBEEF5;
  1607. padding: 0;
  1608. display: flex;
  1609. flex-direction: column;
  1610. height: 800px;
  1611. }
  1612. .left-header {
  1613. padding: 10px;
  1614. border-bottom: 1px solid #EBEEF5;
  1615. }
  1616. .left-header-top {
  1617. display: flex;
  1618. justify-content: space-between;
  1619. align-items: center;
  1620. margin-bottom: 10px;
  1621. }
  1622. .search-btn {
  1623. width: 50%;
  1624. height: 36px;
  1625. background-color: #409EFF;
  1626. color: white;
  1627. border: none;
  1628. }
  1629. .search-input-wrapper {
  1630. margin-bottom: 10px;
  1631. }
  1632. .sort-wrapper {
  1633. display: flex;
  1634. align-items: center;
  1635. margin-bottom: 10px;
  1636. }
  1637. .sort-label {
  1638. width: 70px;
  1639. font-size: 14px;
  1640. font-weight: 600;
  1641. color: #909399;
  1642. }
  1643. .sort-select {
  1644. margin-left: 10px;
  1645. width: 280px;
  1646. }
  1647. .color-wrapper {
  1648. display: flex;
  1649. align-items: center;
  1650. margin-bottom: 10px;
  1651. }
  1652. .color-label {
  1653. width: 70px;
  1654. color: #606266;
  1655. }
  1656. .color-hint {
  1657. margin-left: 10px;
  1658. color: #606266;
  1659. font-size: 12px;
  1660. }
  1661. .color-help {
  1662. margin-left: 5px;
  1663. color: #909399;
  1664. cursor: pointer;
  1665. }
  1666. .hint-text {
  1667. color: #606266;
  1668. font-size: 12px;
  1669. margin-top: 5px;
  1670. }
  1671. .camp-list {
  1672. flex: 1;
  1673. overflow-y: auto;
  1674. padding: 3px;
  1675. }
  1676. .camp-item {
  1677. margin-bottom: 5px;
  1678. padding: 15px;
  1679. background-color: #ffffff;
  1680. position: relative;
  1681. cursor: pointer;
  1682. display: flex;
  1683. justify-content: space-between;
  1684. border: 1px solid #eaedf2;
  1685. }
  1686. .camp-item:last-child {
  1687. margin-bottom: 0;
  1688. }
  1689. .camp-item:hover {
  1690. background-color: #f5f9ff;
  1691. }
  1692. .camp-item.active {
  1693. background-color: #eaf4ff;
  1694. border-left: 1px solid #75b8fc;
  1695. }
  1696. .camp-content {
  1697. flex: 1;
  1698. padding-right: 10px;
  1699. }
  1700. .camp-title {
  1701. font-weight: bold;
  1702. font-size: 16px;
  1703. margin-bottom: 8px;
  1704. color: #333;
  1705. display: flex;
  1706. align-items: center;
  1707. }
  1708. .camp-icon {
  1709. font-size: 16px;
  1710. margin-right: 6px;
  1711. color: #409EFF;
  1712. }
  1713. .camp-info {
  1714. display: flex;
  1715. justify-content: space-between;
  1716. margin-bottom: 8px;
  1717. font-size: 12px;
  1718. color: #c4c1c1;
  1719. line-height: 1.5;
  1720. }
  1721. .camp-stats {
  1722. display: flex;
  1723. justify-content: space-between;
  1724. font-size: 12px;
  1725. color: #666;
  1726. background-color: #f5f9ff;
  1727. padding: 6px 10px;
  1728. border-radius: 4px;
  1729. line-height: 1.5;
  1730. }
  1731. .stat-item {
  1732. display: flex;
  1733. align-items: center;
  1734. }
  1735. .stat-item i {
  1736. margin-right: 4px;
  1737. font-size: 14px;
  1738. color: #409EFF;
  1739. }
  1740. .camp-actions {
  1741. display: flex;
  1742. flex-direction: column;
  1743. justify-content: center;
  1744. align-items: flex-end;
  1745. gap: 8px;
  1746. border-left: 1px dashed #eaedf2;
  1747. padding-left: 12px;
  1748. min-width: 50px;
  1749. }
  1750. .action-btn {
  1751. padding: 2px 5px;
  1752. font-size: 12px;
  1753. border-radius: 4px;
  1754. transition: all 0.2s;
  1755. }
  1756. .action-btn:hover {
  1757. background-color: rgba(255, 255, 255, 0.8);
  1758. }
  1759. .delete-btn {
  1760. color: #f56c6c;
  1761. }
  1762. .delete-btn:hover {
  1763. background-color: rgba(245, 108, 108, 0.1);
  1764. }
  1765. .copy-btn {
  1766. color: #409EFF;
  1767. }
  1768. .copy-btn:hover {
  1769. background-color: rgba(64, 158, 255, 0.1);
  1770. }
  1771. .warning-icon {
  1772. color: #E6A23C;
  1773. font-size: 16px;
  1774. margin-left: 5px;
  1775. }
  1776. .el-main {
  1777. padding: 10px;
  1778. }
  1779. /* 添加训练营表单样式 */
  1780. .drawer-footer {
  1781. /* position: absolute; */
  1782. bottom: 0;
  1783. left: 0;
  1784. right: 0;
  1785. padding: 20px;
  1786. background: #fff;
  1787. text-align: right;
  1788. border-top: 1px solid #e8e8e8;
  1789. }
  1790. .el-input-number {
  1791. width: 100%;
  1792. }
  1793. /* 加载更多样式 */
  1794. .loading-more {
  1795. display: flex;
  1796. align-items: center;
  1797. justify-content: center;
  1798. padding: 12px 0;
  1799. color: #909399;
  1800. font-size: 14px;
  1801. }
  1802. .loading-more i {
  1803. margin-right: 5px;
  1804. font-size: 16px;
  1805. }
  1806. /* 无更多数据提示 */
  1807. .no-more-data {
  1808. display: flex;
  1809. align-items: center;
  1810. justify-content: center;
  1811. padding: 12px 0;
  1812. color: #c0c4cc;
  1813. font-size: 13px;
  1814. }
  1815. .no-more-data span {
  1816. position: relative;
  1817. display: flex;
  1818. align-items: center;
  1819. }
  1820. </style>