tableList.vue 56 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804
  1. <template>
  2. <div id="tableList">
  3. <div class="headerNavTool">
  4. <div class="leftIndexText">
  5. {{ navText.title }} <strong>{{ navText.index }}</strong>
  6. {{ navText.ch }}
  7. </div>
  8. <div class="rightBtnBox">
  9. <slot name="customize"></slot>
  10. <el-button
  11. size="medium"
  12. type="primary"
  13. @click="addClick"
  14. v-if="!navText.addHide"
  15. >添加</el-button
  16. >
  17. <el-button
  18. v-if="navText.backFatherBtn.status"
  19. size="medium"
  20. type="warning"
  21. @click="backFather"
  22. >{{ navText.backFatherBtn.title }}</el-button
  23. >
  24. <el-popover
  25. popper-class="slotPopper"
  26. placement="bottom-end"
  27. trigger="click"
  28. >
  29. <div class="popoverDis">
  30. <div class="checkboxHeader">
  31. <el-checkbox
  32. :indeterminate="isIndeterminate"
  33. v-model="checkAll"
  34. @change="handleCheckAllChange"
  35. >列展示</el-checkbox
  36. >
  37. <div class="initbtns" @click="initVue">重置</div>
  38. </div>
  39. <div
  40. style="height: 1px; width: 100%; background-color: #eaeefb"
  41. ></div>
  42. <el-checkbox-group
  43. class="checkboxGroup"
  44. v-model="checkedCities"
  45. @change="handleCheckedCitiesChange"
  46. >
  47. <div
  48. class="checkboxchild"
  49. v-for="(item, index) in cities"
  50. :key="index"
  51. >
  52. <el-checkbox
  53. :label="item"
  54. @change="checkboxChange(item, $event)"
  55. >{{ item }}</el-checkbox
  56. >
  57. <div class="icon-right">
  58. <i class="el-icon-upload2" @click="upMove(item, index)"></i>
  59. <i
  60. class="el-icon-download"
  61. @click="downMove(item, index)"
  62. ></i>
  63. </div>
  64. </div>
  65. </el-checkbox-group>
  66. </div>
  67. <el-button style="margin-left: 10px" size="medium" slot="reference"
  68. >自定义列</el-button
  69. >
  70. </el-popover>
  71. </div>
  72. </div>
  73. <el-table
  74. :data="tableData"
  75. stripe
  76. style="width: 100%"
  77. @select-all="selectAll"
  78. @select="select"
  79. :row-key="rowKey"
  80. :load="load"
  81. :cell-style="timeStyle"
  82. lazy
  83. :border="navText.border"
  84. ref="pagerset"
  85. v-loading="loading"
  86. :header-cell-style="{
  87. 'background-color': '#eee',
  88. color: '#333',
  89. fontSize: '14px',
  90. }"
  91. :tree-props="{ children: 'children', hasChildren: 'hasChildren' }"
  92. >
  93. <el-table-column
  94. v-if="navText.choice"
  95. align="center"
  96. type="selection"
  97. width="55"
  98. header-align="center"
  99. fixed="left"
  100. >
  101. </el-table-column>
  102. <!-- v-if="navText.num" ↓ -->
  103. <el-table-column
  104. type="index"
  105. label="序号"
  106. width="70"
  107. align="center"
  108. header-align="center"
  109. >
  110. </el-table-column>
  111. <template v-for="(item, index) in tableSet">
  112. <el-table-column
  113. v-if="item.hidden"
  114. :width="item.width"
  115. :key="index"
  116. :label="item.label"
  117. align="center"
  118. :sortable="item.prop === 'sort' || item.sort"
  119. :sort-method="sortMethods"
  120. :show-overflow-tooltip="item.showTooltip ? false : true"
  121. header-align="center"
  122. :prop="item.prop"
  123. sort-by="sort"
  124. >
  125. <template slot-scope="scope">
  126. <div class="imgboxsq" v-if="item.scope === 'img'">
  127. <el-image
  128. class="el_images"
  129. lazy
  130. :src="$methodsTools.splitImgHost(scope.row[item.prop])"
  131. style="height: 100%"
  132. :preview-src-list="[
  133. $methodsTools.splitImgHost(scope.row[item.prop]),
  134. ]"
  135. alt="加载失败..."
  136. >
  137. </el-image>
  138. </div>
  139. <span v-else-if="item.scope === 'status'">{{
  140. Number(scope.row[item.prop]) === 1
  141. ? "启用"
  142. : Number(scope.row[item.prop]) === 0
  143. ? "关闭"
  144. : Number(scope.row[item.prop]) === -1
  145. ? "已删除"
  146. : "未知"
  147. }}</span>
  148. <span v-else-if="item.scope === 'hasTime'">{{
  149. Number(scope.row[item.prop]) === 1
  150. ? "有效"
  151. : Number(scope.row[item.prop]) === 0
  152. ? "无效"
  153. : "未知"
  154. }}</span>
  155. <span v-else-if="item.scope === 'statusZpFB'">{{
  156. Number(scope.row[item.prop]) === 1
  157. ? "未发布"
  158. : Number(scope.row[item.prop]) === 2
  159. ? "已发布"
  160. : Number(scope.row[item.prop]) === 0
  161. ? "停用"
  162. : Number(scope.row[item.prop]) === -1
  163. ? "已删除"
  164. : "未知"
  165. }}</span>
  166. <span v-else-if="item.scope === 'reStatus'">{{
  167. Number(scope.row[item.prop]) === 1
  168. ? "定时发布"
  169. : Number(scope.row[item.prop]) === 0
  170. ? "手动发布"
  171. : "未知"
  172. }}</span>
  173. <span v-else-if="item.scope === 'fabStatus'">{{
  174. Number(scope.row[item.prop]) === 1
  175. ? "发布"
  176. : Number(scope.row[item.prop]) === 0
  177. ? "未发布"
  178. : "未知"
  179. }}</span>
  180. <span v-else-if="item.scope === 'sectionTypes'">{{
  181. Number(scope.row[item.prop]) === 2
  182. ? "录播"
  183. : Number(scope.row[item.prop]) === 1
  184. ? "直播"
  185. : Number(scope.row[item.prop]) === 3
  186. ? "回放"
  187. : "未知"
  188. }}</span>
  189. <span v-else-if="item.scope === 'leftCh'">
  190. {{ item.ch }}{{ scope.row[item.prop] }}
  191. </span>
  192. <span
  193. v-else-if="item.scope === 'goodsIds'"
  194. class="editInfoSty"
  195. @click="editInfo(scope.row, 3)"
  196. >
  197. {{
  198. !scope.row[item.prop]
  199. ? 0
  200. : scope.row[item.prop].split(",").map(Number).length
  201. }}
  202. </span>
  203. <span v-else-if="item.scope === 'sectionTypesTTT'">{{
  204. Number(scope.row[item.prop]) === 1
  205. ? "录播"
  206. : Number(scope.row[item.prop]) === 2
  207. ? "直播"
  208. : Number(scope.row[item.prop]) === 3
  209. ? "回放"
  210. : ""
  211. }}</span>
  212. <span v-else-if="item.scope === 'ggType'">{{
  213. Number(scope.row[item.prop]) === 1
  214. ? "学习中心"
  215. : Number(scope.row[item.prop]) === 2
  216. ? "求职中心"
  217. : "未知"
  218. }}</span>
  219. <ul v-else-if="item.scope === 'mapTypesTeacher'" class="ulAuto">
  220. <template v-for="(itm, inds) in scope.row[item.prop]">
  221. <li :key="inds" v-if="inds < 2">
  222. {{ itm.educationName + "-" + itm.projectName
  223. }}{{ inds === 0 ? ", " : "" }}
  224. </li>
  225. </template>
  226. <el-popover
  227. :key="Math.random()"
  228. placement="right"
  229. trigger="click"
  230. >
  231. <ul>
  232. <li v-for="(itm, inds) in scope.row[item.prop]" :key="inds">
  233. {{ inds + 1 }}、
  234. {{ itm.educationName + "-" + itm.projectName }}
  235. </li>
  236. </ul>
  237. <el-button
  238. slot="reference"
  239. style="margin-left: 6px"
  240. type="text"
  241. v-if="scope.row[item.prop].length > 2"
  242. size="mini"
  243. >更多</el-button
  244. >
  245. </el-popover>
  246. </ul>
  247. <span v-else-if="item.scope === 'goodsInfos'">
  248. {{ scope.row[item.prop1] + "-" + scope.row[item.prop2] + "-"
  249. }}<span style="color: red">¥{{ scope.row[item.prop3] }}</span>
  250. </span>
  251. <div v-else-if="item.scope === 'applyInfos'">
  252. <div
  253. v-for="(items, indexs) in scope.row[item.prop]"
  254. :key="indexs"
  255. >
  256. <div>{{ items.siteAddress }}</div>
  257. <div
  258. v-for="(itemsxs, indexsxs) in items.examApplySiteTime"
  259. :key="indexsxs"
  260. >
  261. <div v-for="(ks, ds) in itemsxs.siteTime" :key="ds">
  262. {{ $methodsTools.onlyForma(itemsxs.examTime, false) }}
  263. {{ ks.startTime.replace("-", ":") }}-{{
  264. ks.endTime.replace("-", ":")
  265. }}
  266. </div>
  267. </div>
  268. </div>
  269. </div>
  270. <ul v-else-if="item.scope === 'moreGoodsList'" class="ulAuto">
  271. <template v-for="(itm, inds) in scope.row[item.prop]">
  272. <li :key="inds" v-if="inds < 1">
  273. {{ itm[item.prop1] + "-" + itm[item.prop2] + "-" }}
  274. <span style="color: red">¥{{ itm[item.prop3] }}</span>
  275. </li>
  276. </template>
  277. <el-popover
  278. :key="Math.random()"
  279. placement="right"
  280. trigger="click"
  281. >
  282. <ul>
  283. <li v-for="(itm, inds) in scope.row[item.prop]" :key="inds">
  284. {{ inds + 1 }}、
  285. {{ itm[item.prop1] + "-" + itm[item.prop2] + "-" }}
  286. <span style="color: red">¥{{ itm[item.prop3] }}</span>
  287. </li>
  288. </ul>
  289. <el-button
  290. slot="reference"
  291. style="margin-left: 6px"
  292. type="text"
  293. v-if="scope.row[item.prop].length >= 2"
  294. size="mini"
  295. >更多</el-button
  296. >
  297. </el-popover>
  298. </ul>
  299. <ul v-else-if="item.scope === 'mapTypes'" class="ulAuto">
  300. <template v-for="(itm, inds) in scope.row[item.prop]">
  301. <li :key="inds" v-if="inds === 0">
  302. {{ itm.educationName + "-" + itm.projectName }}
  303. </li>
  304. </template>
  305. <el-popover
  306. :key="Math.random()"
  307. placement="right"
  308. trigger="click"
  309. >
  310. <ul>
  311. <li v-for="(itm, inds) in scope.row[item.prop]" :key="inds">
  312. {{ inds + 1 }}、
  313. {{ itm.educationName + "-" + itm.projectName }}
  314. </li>
  315. </ul>
  316. <el-button
  317. slot="reference"
  318. style="margin-left: 6px"
  319. type="text"
  320. v-if="scope.row[item.prop].length > 1"
  321. size="mini"
  322. >更多</el-button
  323. >
  324. </el-popover>
  325. </ul>
  326. <ul v-else-if="item.scope === 'mapTypesBUS'" class="ulAuto">
  327. <template v-for="(itm, inds) in scope.row[item.prop]">
  328. <li :key="inds" v-if="inds === 0">
  329. {{
  330. itm.educationName +
  331. "-" +
  332. itm.projectName +
  333. "-" +
  334. itm.businessName
  335. }}
  336. </li>
  337. </template>
  338. <el-popover
  339. :key="Math.random()"
  340. placement="right"
  341. trigger="click"
  342. >
  343. <ul>
  344. <li v-for="(itm, inds) in scope.row[item.prop]" :key="inds">
  345. {{ inds + 1 }}、
  346. {{
  347. itm.educationName +
  348. "-" +
  349. itm.projectName +
  350. "-" +
  351. itm.businessName
  352. }}
  353. </li>
  354. </ul>
  355. <el-button
  356. slot="reference"
  357. style="margin-left: 6px"
  358. type="text"
  359. v-if="scope.row[item.prop].length > 1"
  360. size="mini"
  361. >更多</el-button
  362. >
  363. </el-popover>
  364. </ul>
  365. <div v-else-if="item.scope === 'splits'" class="dis_sdt">
  366. <ul>
  367. <template v-for="(itm, inds) in scope.row[item.prop]">
  368. <li :key="inds" v-if="inds < 2">
  369. {{ itm }}
  370. </li>
  371. </template>
  372. </ul>
  373. <el-popover
  374. :key="Math.random()"
  375. placement="right"
  376. trigger="click"
  377. >
  378. <ul>
  379. <li v-for="(itm, inds) in scope.row[item.prop]" :key="inds">
  380. {{ inds + 1 }}、
  381. {{ itm }}
  382. </li>
  383. </ul>
  384. <el-button
  385. slot="reference"
  386. style="margin-left: 6px"
  387. type="text"
  388. v-if="scope.row[item.prop].length > 2"
  389. size="mini"
  390. >更多</el-button
  391. >
  392. </el-popover>
  393. </div>
  394. <ul v-else-if="item.scope === 'classNums'" class="ulAutos">
  395. <li
  396. style="font-size: 12px; cursor: pointer; color: #1890ff"
  397. v-if="!scope.row[item.prop].length"
  398. >
  399. 班级({{ scope.row[item.prop].length }})
  400. </li>
  401. <el-popover
  402. :key="Math.random()"
  403. placement="right"
  404. trigger="click"
  405. >
  406. <ul>
  407. <li
  408. v-for="(itm, inds) in scope.row[item.prop]"
  409. :key="inds"
  410. class="jumpClass"
  411. @click="jumpClass(itm)"
  412. >
  413. {{ inds + 1 }}、
  414. {{ itm.gradeName }}
  415. </li>
  416. </ul>
  417. <el-button
  418. v-if="scope.row[item.prop].length"
  419. slot="reference"
  420. type="text"
  421. size="mini"
  422. >班级({{ scope.row[item.prop].length }})</el-button
  423. >
  424. </el-popover>
  425. </ul>
  426. <div v-else-if="item.scope === 'goodsList'" class="ulAuto">
  427. <ul>
  428. <template v-for="(itm, inds) in scope.row[item.prop]">
  429. <li :key="inds" v-if="inds === 0">
  430. {{ itm.goodsName }}
  431. </li>
  432. </template>
  433. </ul>
  434. <el-popover
  435. :key="Math.random()"
  436. placement="right"
  437. trigger="click"
  438. >
  439. <ul>
  440. <li v-for="(itm, inds) in scope.row[item.prop]" :key="inds">
  441. {{ inds + 1 }}、
  442. {{ itm.goodsName }}
  443. </li>
  444. </ul>
  445. <el-button
  446. slot="reference"
  447. style="margin-left: 6px"
  448. type="text"
  449. v-if="scope.row[item.prop].length > 1"
  450. size="mini"
  451. >更多</el-button
  452. >
  453. </el-popover>
  454. </div>
  455. <div v-else-if="item.scope === 'aboutChapter'" class="ulAuto">
  456. <ul>
  457. <template v-for="(itm, inds) in scope.row[item.prop]">
  458. <li
  459. class="jumpStys"
  460. :key="inds"
  461. v-if="inds === 0"
  462. @click="jumpPages(itm, item.int)"
  463. >
  464. {{ itm[item.prop1] }}
  465. </li>
  466. </template>
  467. </ul>
  468. <el-popover
  469. :key="Math.random()"
  470. placement="right"
  471. trigger="click"
  472. >
  473. <ul>
  474. <li
  475. v-for="(itm, inds) in scope.row[item.prop]"
  476. :key="inds"
  477. class="jumpStys"
  478. @click="jumpPages(itm, item.int)"
  479. >
  480. {{ inds + 1 }}、
  481. {{ itm[item.prop1] }}
  482. </li>
  483. </ul>
  484. <el-button
  485. slot="reference"
  486. style="margin-left: 6px"
  487. type="text"
  488. v-if="scope.row[item.prop].length > 1"
  489. size="mini"
  490. >更多</el-button
  491. >
  492. </el-popover>
  493. </div>
  494. <ul v-else-if="item.scope === 'mapTypesMores'" class="ulAuto">
  495. <template v-for="(itm, inds) in scope.row[item.prop]">
  496. <li :key="inds" v-if="inds === 0">
  497. {{
  498. itm.educationName +
  499. "-" +
  500. itm.projectName +
  501. "-" +
  502. itm.businessName +
  503. "-" +
  504. itm.subjectName
  505. }}
  506. </li>
  507. </template>
  508. <el-popover
  509. :key="Math.random()"
  510. placement="right"
  511. trigger="click"
  512. >
  513. <ul>
  514. <li v-for="(itm, inds) in scope.row[item.prop]" :key="inds">
  515. {{ inds + 1 }}、
  516. {{
  517. itm.educationName +
  518. "-" +
  519. itm.projectName +
  520. "-" +
  521. itm.businessName +
  522. "-" +
  523. itm.subjectName
  524. }}
  525. </li>
  526. </ul>
  527. <el-button
  528. slot="reference"
  529. style="margin-left: 6px"
  530. type="text"
  531. v-if="scope.row[item.prop].length > 1"
  532. size="mini"
  533. >更多</el-button
  534. >
  535. </el-popover>
  536. </ul>
  537. <span v-else-if="item.scope === 'statusRe'">{{
  538. Number(scope.row[item.prop]) === 0
  539. ? "已删除"
  540. : Number(scope.row[item.prop]) === 1 &&
  541. Number(scope.row["reStatus"]) === 1
  542. ? "待发布"
  543. : Number(scope.row[item.prop]) === 1 &&
  544. Number(scope.row["reStatus"]) === 0
  545. ? "未发布"
  546. : Number(scope.row[item.prop]) === 2
  547. ? "已撤回"
  548. : Number(scope.row[item.prop]) === 3
  549. ? "已发布"
  550. : Number(scope.row[item.prop]) === 4
  551. ? "已到期"
  552. : "未知"
  553. }}</span>
  554. <span v-else-if="item.scope === 'TimeVoBtn'">
  555. <el-popover :key="Math.random()" placement="left" trigger="click">
  556. <div
  557. v-for="(items, indexs) in scope.row[item.prop]"
  558. :key="indexs"
  559. style="margin-bottom: 6px"
  560. >
  561. {{ $methodsTools.onlyForma(items.startTime) }} ~
  562. {{ $methodsTools.onlyForma(items.endTime) }}
  563. </div>
  564. <el-button slot="reference" size="mini">查看</el-button>
  565. </el-popover>
  566. </span>
  567. <div v-else-if="item.scope === 'video'">
  568. <i
  569. v-if="scope.row[item.prop][item.prop1] !== null"
  570. class="el-icon-video-play cvideo"
  571. @click="
  572. openVideo(
  573. $methodsTools.splitImgHost(scope.row[item.prop][item.prop1])
  574. )
  575. "
  576. ></i>
  577. </div>
  578. <div
  579. v-else-if="item.scope === 'PDF'"
  580. style="display: flex; align-items: center"
  581. >
  582. <a
  583. v-if="scope.row[item.prop][item.prop1] !== null"
  584. :href="
  585. $methodsTools.splitImgHost(scope.row[item.prop][item.prop1])
  586. "
  587. target="_blank"
  588. style="
  589. display: block;
  590. width: 35px;
  591. height: 45px;
  592. margin-right: 10px;
  593. "
  594. >
  595. <img class="imgHover" src="@/assets/images/pdf@3x.png" alt="" />
  596. </a>
  597. <div>{{ scope.row[item.prop][item.prop2] }}</div>
  598. </div>
  599. <span v-else-if="item.scope === 'Salary'">
  600. {{ scope.row[item.prop1] === 1 ? "月薪" : "年薪" }}
  601. {{
  602. scope.row[item.prop2] === scope.row[item.prop3]
  603. ? scope.row[item.prop2]
  604. : scope.row[item.prop2] + "~" + scope.row[item.prop3]
  605. }}
  606. </span>
  607. <div v-else-if="item.scope === 'changAdress'">
  608. <div>{{ scope.row[item.prop1] }}</div>
  609. <div>
  610. {{ $methodsTools.onlyForma(scope.row[item.prop2], false) }}
  611. <span
  612. >{{
  613. scope.row[item.prop3].indexOf("-") !== -1
  614. ? scope.row[item.prop3].replace("-", ":")
  615. : scope.row[item.prop3]
  616. }}-{{
  617. scope.row[item.prop4].indexOf("-") !== -1
  618. ? scope.row[item.prop4].replace("-", ":")
  619. : scope.row[item.prop4]
  620. }}</span
  621. >
  622. </div>
  623. </div>
  624. <span v-else-if="item.scope === 'activityType'">{{
  625. Number(scope.row[item.prop]) === 0
  626. ? "优惠券"
  627. : Number(scope.row[item.prop]) === 1
  628. ? "折扣券"
  629. : Number(scope.row[item.prop]) === 2
  630. ? "线上直播"
  631. : Number(scope.row[item.prop]) === 3
  632. ? "定价"
  633. : Number(scope.row[item.prop]) === 4
  634. ? "优惠"
  635. : Number(scope.row[item.prop]) === 5
  636. ? "折扣"
  637. : Number(scope.row[item.prop]) === 6
  638. ? "线下活动"
  639. : "未知"
  640. }}</span>
  641. <span v-else-if="item.scope === 'activityRemarks'">{{
  642. Number(scope.row[item.prop]) === 0
  643. ? "金额:¥" + scope.row["price"]
  644. : Number(scope.row[item.prop]) === 1
  645. ? "折扣:" + scope.row["price"] + "折"
  646. : Number(scope.row[item.prop]) === 2
  647. ? "直播内容:" + scope.row["liveContent"]
  648. : Number(scope.row[item.prop]) === 3
  649. ? "商品金额:¥" + scope.row["price"]
  650. : Number(scope.row[item.prop]) === 4
  651. ? "优惠金额:¥" + scope.row["price"]
  652. : Number(scope.row[item.prop]) === 5
  653. ? "商品折扣:" + scope.row["price"] + "折"
  654. : Number(scope.row[item.prop]) === 6
  655. ? "活动地点:" + scope.row["liveAdress"]
  656. : "未知"
  657. }}</span>
  658. <span v-else-if="item.scope === 'isUrgent'">{{
  659. scope.row[item.prop] === 0
  660. ? "不是"
  661. : scope.row[item.prop] === 1
  662. ? "是"
  663. : "未知"
  664. }}</span>
  665. <span v-else-if="item.scope === 'gfStatus'">{{
  666. scope.row[item.prop] === 0
  667. ? "否"
  668. : scope.row[item.prop] === 1
  669. ? "是"
  670. : "未知"
  671. }}</span>
  672. <span v-else-if="item.scope === 'refundPrice'">
  673. {{
  674. scope.row["goodsRealPrice"] && scope.row["goodsReceived"]
  675. ? Number(scope.row["goodsRealPrice"]) -
  676. Number(scope.row["goodsReceived"]) +
  677. "元"
  678. : ""
  679. }}
  680. </span>
  681. <span v-else-if="item.scope === 'peopleNum'">{{
  682. scope.row[item.prop] === 0 ? "不限制" : scope.row[item.prop]
  683. }}</span>
  684. <span v-else-if="item.scope === 'address'"
  685. >{{
  686. scope.row[item.prop1] +
  687. scope.row[item.prop2] +
  688. scope.row[item.prop3]
  689. }}{{ scope.row[item.prop4] ? scope.row[item.prop4] : "" }}</span
  690. >
  691. <span v-else-if="item.scope === 'statusActivity'">{{
  692. Number(scope.row[item.prop]) === 0
  693. ? "已删除"
  694. : Number(scope.row[item.prop]) === 1
  695. ? "已结束"
  696. : Number(scope.row[item.prop]) === 2
  697. ? "已撤回"
  698. : Number(scope.row[item.prop]) === 3
  699. ? "已开始"
  700. : Number(scope.row[item.prop]) === 4
  701. ? "未开始"
  702. : "未知"
  703. }}</span>
  704. <span v-else-if="item.scope === 'sex'">
  705. {{
  706. scope.row[item.prop] == 1
  707. ? "男"
  708. : scope.row[item.prop] == 2
  709. ? "女"
  710. : "未知"
  711. }}
  712. </span>
  713. <span v-else-if="item.scope === 'statusFB'">{{
  714. scope.row[item.prop] === 0
  715. ? "删除"
  716. : scope.row[item.prop] === 1
  717. ? "发布"
  718. : scope.row[item.prop] === 2
  719. ? "撤回"
  720. : scope.row[item.prop] === 3
  721. ? "未发布"
  722. : "未知"
  723. }}</span>
  724. <span v-else-if="item.scope === 'typeStatus'">{{
  725. scope.row[item.prop] === 0
  726. ? "报名指引"
  727. : scope.row[item.prop] === 1
  728. ? "打印准考证"
  729. : scope.row[item.prop] === 2
  730. ? "成绩查询指引"
  731. : "未知"
  732. }}</span>
  733. <span v-else-if="item.scope === 'typeId'">{{
  734. scope.row[item.prop] === 1
  735. ? "普通练习"
  736. : scope.row[item.prop] === 2
  737. ? "押题试卷"
  738. : scope.row[item.prop] === 3
  739. ? "真题试卷"
  740. : "未知"
  741. }}</span>
  742. <span v-else-if="item.scope === 'taskType'">{{
  743. scope.row[item.prop] === 0
  744. ? "每日签到"
  745. : scope.row[item.prop] === 1
  746. ? "完善信息"
  747. : scope.row[item.prop] === 2
  748. ? "邀请好友"
  749. : scope.row[item.prop] === 3
  750. ? "每日分享"
  751. : scope.row[item.prop] === 4
  752. ? "视频学习"
  753. : scope.row[item.prop] === 5
  754. ? "模拟考试"
  755. : "未知"
  756. }}</span>
  757. <span v-else-if="item.scope === 'releaseType'">{{
  758. scope.row[item.prop] === 0
  759. ? "手动发布"
  760. : scope.row[item.prop] === 1
  761. ? "定时发布"
  762. : "未知"
  763. }}</span>
  764. <span v-else-if="item.scope === 'releaseStatus'">{{
  765. scope.row[item.prop] === 0
  766. ? "删除"
  767. : scope.row[item.prop] === 1
  768. ? "待发布"
  769. : scope.row[item.prop] === 2
  770. ? "撤回"
  771. : scope.row[item.prop] === 3
  772. ? "发布成功"
  773. : scope.row[item.prop] === 4
  774. ? "未发布"
  775. : scope.row[item.prop] === 5
  776. ? "已结束"
  777. : "未知"
  778. }}</span>
  779. <div v-else-if="item.scope === 'knowledge'" class="overSty">
  780. <el-button
  781. type="success"
  782. size="small"
  783. v-for="(items, ks) in scope.row[item.prop]"
  784. :key="ks"
  785. >
  786. {{ items.knowledgeName }}
  787. </el-button>
  788. </div>
  789. <span v-else-if="item.scope === 'numberAll'">{{
  790. scope.row[item.prop1] + scope.row[item.prop2]
  791. }}</span>
  792. <span v-else-if="item.scope === 'moreLists'">{{
  793. scope.row[item.prop1] + " ~ " + scope.row[item.prop2]
  794. }}</span>
  795. <span v-else-if="item.scope === 'resultType'">
  796. {{ scope.row[item.prop1] }}
  797. <span
  798. :style="
  799. scope.row[item.prop2] === 1
  800. ? 'color:purple'
  801. : scope.row[item.prop2] === 0
  802. ? 'color:red;'
  803. : ''
  804. "
  805. >
  806. {{
  807. scope.row[item.prop2] === 1
  808. ? "通过"
  809. : scope.row[item.prop2] === 0
  810. ? "不通过"
  811. : ""
  812. }}
  813. </span>
  814. </span>
  815. <span v-else-if="item.scope === 'TimeLists'"
  816. >{{
  817. $methodsTools.onlyForma(scope.row[item.prop1], item.Diszing)
  818. }}
  819. {{
  820. $methodsTools.onlyForma(scope.row[item.prop2], item.Diszing)
  821. }}</span
  822. >
  823. <span v-else-if="item.scope === 'aTimeList'">{{
  824. scope.row[item.prop] === null
  825. ? "--"
  826. : $methodsTools.onlyForma(scope.row[item.prop])
  827. }}</span>
  828. <div v-else-if="item.scope === 'inputs'">
  829. <el-input-number
  830. style="width: 50px"
  831. size="small"
  832. :controls="false"
  833. v-model="scope.row[item.prop]"
  834. controls-position="right"
  835. :min="0"
  836. ></el-input-number>
  837. </div>
  838. <span v-else-if="item.scope === 'topic'">{{
  839. scope.row[item.prop] === 1
  840. ? "单选题"
  841. : scope.row[item.prop] === 2
  842. ? "多选题"
  843. : scope.row[item.prop] === 3
  844. ? "判断题"
  845. : scope.row[item.prop] === 4
  846. ? "案例题"
  847. : scope.row[item.prop] === 5
  848. ? "简答题"
  849. : "未知"
  850. }}</span>
  851. <span v-else-if="item.scope === 'typeStatusName'">{{
  852. scope.row[item.prop] === 1
  853. ? "扫码支付"
  854. : scope.row[item.prop] === 2
  855. ? "刷卡支付"
  856. : scope.row[item.prop] === 3
  857. ? "现金支付"
  858. : scope.row[item.prop] === 4
  859. ? "转账"
  860. : "未知"
  861. }}</span>
  862. <span v-else-if="item.scope === 'teachers'">
  863. <span v-for="(itm, indm) in scope.row[item.prop]" :key="indm"
  864. >{{ itm.nickName
  865. }}{{
  866. indm !== scope.row[item.prop].length - 1 ? "," : ""
  867. }}</span
  868. >
  869. </span>
  870. <span v-else-if="item.scope === 'streamType'">{{
  871. scope.row[item.prop] === 1
  872. ? "正式"
  873. : scope.row[item.prop] === 2
  874. ? "测试"
  875. : "未知"
  876. }}</span>
  877. <span
  878. v-else-if="item.scope === 'statusPeriod'"
  879. :style="scope.row[item.prop] === 0 ? 'color:red' : ''"
  880. >
  881. {{
  882. scope.row[item.prop] === 0
  883. ? "未通过"
  884. : scope.row[item.prop] === 1
  885. ? "已通过"
  886. : scope.row[item.prop] === 2
  887. ? "待审核"
  888. : ""
  889. }}
  890. </span>
  891. <span
  892. v-else-if="item.scope === 'changeCLS'"
  893. :style="scope.row[item.prop] === 1 ? 'color:red' : ''"
  894. >
  895. {{
  896. scope.row[item.prop] === 0
  897. ? "正常"
  898. : scope.row[item.prop] === 1
  899. ? "有变更"
  900. : ""
  901. }}
  902. </span>
  903. <span
  904. v-else-if="item.scope === 'finishStatus'"
  905. :style="scope.row[item.prop] === 0 ? 'color:red' : ''"
  906. >
  907. {{
  908. scope.row[item.prop] === 0
  909. ? "未结业"
  910. : scope.row[item.prop] === 1
  911. ? "结业"
  912. : ""
  913. }}
  914. </span>
  915. <span v-else-if="item.scope === 'computer'">
  916. {{ scope.row[item.prop1] + "/" + scope.row[item.prop2] }}
  917. {{
  918. scope.row[item.prop1] == 0 && scope.row[item.prop2] == 0
  919. ? "0%"
  920. : (scope.row[item.prop1] / scope.row[item.prop2]) * 100 + "%"
  921. }}
  922. </span>
  923. <span v-else-if="item.scope === 'statusOrder'">{{
  924. scope.row[item.prop] === -2
  925. ? "超时关闭"
  926. : scope.row[item.prop] === -1
  927. ? "手动关闭"
  928. : scope.row[item.prop] === 0
  929. ? "待付款"
  930. : scope.row[item.prop] === 1
  931. ? "已付款"
  932. : scope.row[item.prop] === 3
  933. ? "成功"
  934. : "未知"
  935. }}</span>
  936. <span v-else-if="item.scope === 'cType'">
  937. <el-tag
  938. type="success"
  939. v-if="
  940. compType(scope.row[item.prop], scope.row['requestMethod']) ===
  941. '新增'
  942. "
  943. >
  944. {{
  945. compType(scope.row[item.prop], scope.row["requestMethod"])
  946. }}</el-tag
  947. >
  948. <el-tag
  949. v-if="
  950. compType(scope.row[item.prop], scope.row['requestMethod']) ===
  951. '修改'
  952. "
  953. >
  954. {{
  955. compType(scope.row[item.prop], scope.row["requestMethod"])
  956. }}</el-tag
  957. >
  958. <el-tag
  959. type="warning"
  960. v-if="
  961. compType(scope.row[item.prop], scope.row['requestMethod']) ===
  962. '查询'
  963. "
  964. >
  965. {{
  966. compType(scope.row[item.prop], scope.row["requestMethod"])
  967. }}</el-tag
  968. >
  969. </span>
  970. <span v-else-if="item.scope === 'time'">{{
  971. numTime(scope.row[item.prop])
  972. }}</span>
  973. <span v-else-if="item.scope === 'timeBtn'"
  974. >{{ numTime(scope.row[item.prop]) }}
  975. <el-button type="text" @click="getxq(scope.row)">详情</el-button>
  976. </span>
  977. <span
  978. class="editInfoSty"
  979. v-else-if="item.scope === 'editInfo'"
  980. @click="editInfo(scope.row)"
  981. >{{ scope.row[item.prop] }}
  982. </span>
  983. <span
  984. class="editInfoSty"
  985. v-else-if="item.scope === 'editInfoMore'"
  986. @click="editInfo(scope.row)"
  987. >{{ scope.row[item.prop1] }} - {{ scope.row[item.prop2] }}
  988. </span>
  989. <span v-else-if="item.scope === 'InfoMore'"
  990. >{{ scope.row[item.prop1] }} - {{ scope.row[item.prop2] }}
  991. </span>
  992. <el-button
  993. v-else-if="item.scope === 'aboutTrees'"
  994. slot="reference"
  995. @click="activesBoxszing(scope.row[item.prop])"
  996. >查看</el-button
  997. >
  998. <div
  999. class="editInfoSty"
  1000. v-else-if="item.scope === 'editInfoHTML'"
  1001. @click="editInfo(scope.row)"
  1002. >
  1003. {{ getSimpleText(scope.row[item.prop]) }}
  1004. </div>
  1005. <span v-else-if="item.scope === 'minute'">{{
  1006. numTimeminute(scope.row[item.prop])
  1007. }}</span>
  1008. <span
  1009. v-else-if="item.scope === 'jumpPage'"
  1010. @click="jumpPage(scope.row)"
  1011. style="color: #409eff; cursor: pointer"
  1012. >{{ scope.row[item.prop] }}</span
  1013. >
  1014. <span v-else-if="item.scope === 'objType'">
  1015. {{
  1016. scope.row[item.objProp].length
  1017. ? scope.row[item.objProp][0][item.prop]
  1018. : ""
  1019. }}
  1020. </span>
  1021. <span v-else-if="item.scope === 'classTypes'">
  1022. {{
  1023. scope.row[item.prop] === 1
  1024. ? "已开班:" + scope.row[item.prop1]
  1025. : scope.row[item.prop] === 0
  1026. ? "未开班"
  1027. : ""
  1028. }}
  1029. </span>
  1030. <span v-else-if="item.scope === 'classTimeTypes'">
  1031. {{
  1032. scope.row[item.prop] === 1
  1033. ? "即刻"
  1034. : scope.row[item.prop] === 2
  1035. ? "待定"
  1036. : scope.row[item.prop] === 3
  1037. ? $methodsTools.onlyForma(scope.row[item.prop1])
  1038. : "未知"
  1039. }}
  1040. </span>
  1041. <div v-else-if="item.scope === 'objTypeYW'">
  1042. <span v-if="scope.row[item.objProp].length">
  1043. {{ scope.row[item.objProp][0][item.prop1] }}-{{
  1044. scope.row[item.objProp][0][item.prop2]
  1045. }}-{{ scope.row[item.objProp][0][item.prop3] }}
  1046. </span>
  1047. </div>
  1048. <div v-else-if="item.scope === 'againStudent'">
  1049. <span :style="scope.row[item.prop] ? 'color:blue' : ''">{{
  1050. scope.row[item.prop]
  1051. }}</span>
  1052. <span style="color: red" v-if="scope.row[item.prop]"
  1053. >已重修{{ scope.row[item.prop1] }}节</span
  1054. >
  1055. </div>
  1056. <span v-else-if="item.scope === 'eduTypes'">
  1057. {{
  1058. scope.row[item.prop1] +
  1059. "-" +
  1060. scope.row[item.prop2] +
  1061. "-" +
  1062. scope.row[item.prop3]
  1063. }}{{ scope.row[item.prop4] ? "-" + scope.row[item.prop4] : "" }}
  1064. </span>
  1065. <span
  1066. v-else-if="item.scope === 'sendStatus'"
  1067. :style="scope.row[item.prop] === 0 ? 'color:red;' : ''"
  1068. >
  1069. {{
  1070. scope.row[item.prop] === 1
  1071. ? "发送成功"
  1072. : scope.row[item.prop] === 0
  1073. ? "发送失败"
  1074. : "--"
  1075. }}
  1076. </span>
  1077. <span v-else-if="item.scope === 'peopleNums'">
  1078. {{ scope.row[item.prop1] }} / {{ scope.row[item.prop2] }}
  1079. </span>
  1080. <span
  1081. v-else-if="item.scope === 'jumpPageLabel'"
  1082. @click="jumpPageLabel(scope.row)"
  1083. style="color: #409eff; cursor: pointer"
  1084. >{{ scope.row[item.prop] }}</span
  1085. >
  1086. <span v-else-if="item.scope === 'urlStatus'">
  1087. {{
  1088. scope.row[item.prop] === 1
  1089. ? scope.row[item.prop1]
  1090. : scope.row[item.prop] === 2
  1091. ? scope.row[item.prop2]
  1092. : scope.row[item.prop] === 3
  1093. ? scope.row[item.prop3]
  1094. : ""
  1095. }}
  1096. </span>
  1097. <div v-else-if="item.scope === 'morePeople'">
  1098. <span
  1099. v-for="(itm, idm) in scope.row[item.prop]
  1100. .split(',')
  1101. .map(Number)"
  1102. :key="idm"
  1103. >
  1104. {{ itm === 1 ? "非补考学员" : itm === 2 ? "补考学员" : "" }}
  1105. </span>
  1106. </div>
  1107. <span
  1108. v-else-if="item.scope === 'jumpPageLabelProfess'"
  1109. @click="jumpPageLabelProfess(scope.row)"
  1110. style="color: #409eff; cursor: pointer"
  1111. >{{ scope.row[item.prop] }}</span
  1112. >
  1113. <span
  1114. v-else-if="item.scope === 'infoJump'"
  1115. @click="jumpinfoJump(scope.row)"
  1116. style="color: #409eff; cursor: pointer"
  1117. >详情</span
  1118. >
  1119. <span v-else-if="item.scope === 'ptai'">{{
  1120. scope.row[item.prop] == 1 ? "微信小程序" : "未知"
  1121. }}</span>
  1122. <span v-else-if="item.scope === 'diffTime'"
  1123. >{{
  1124. scope.row["sectionType"] === 2
  1125. ? scope.row[item.prop1]
  1126. : scope.row[item.prop2]
  1127. }}分钟</span
  1128. >
  1129. <div v-else-if="item.scope === 'isOptions'">
  1130. <template v-for="(itemt, indext) in item.options">
  1131. <span
  1132. :key="indext"
  1133. v-if="itemt.value === scope.row[item.prop]"
  1134. >{{ itemt.label }}</span
  1135. >
  1136. </template>
  1137. </div>
  1138. <span v-else
  1139. >{{ scope.row[item.prop] }}
  1140. {{
  1141. (scope.row[item.prop] || scope.row[item.prop] === 0) && item.ch
  1142. ? item.ch
  1143. : ""
  1144. }}</span
  1145. >
  1146. </template>
  1147. </el-table-column>
  1148. </template>
  1149. <el-table-column
  1150. label="官方信息推送状态"
  1151. align="center"
  1152. width="180px"
  1153. v-if="navText.gftsStatus"
  1154. >
  1155. <template slot-scope="scope">
  1156. {{
  1157. scope.row.officialStatus === 1
  1158. ? `是(${scope.row.officialNum})`
  1159. : scope.row.officialStatus === 0
  1160. ? "否"
  1161. : ""
  1162. }}
  1163. </template>
  1164. </el-table-column>
  1165. <el-table-column
  1166. label="官方学时推送状态"
  1167. align="center"
  1168. width="180px"
  1169. v-if="navText.gfxsStatus"
  1170. >
  1171. <template slot-scope="scope">
  1172. {{
  1173. scope.row.periodPlush === 1
  1174. ? `是(${scope.row.plushNum})`
  1175. : scope.row.periodPlush === 0
  1176. ? "否"
  1177. : ""
  1178. }}
  1179. </template>
  1180. </el-table-column>
  1181. <el-table-column
  1182. label="官方学习账号开通状态"
  1183. align="center"
  1184. width="180px"
  1185. v-if="navText.gfUserStatus"
  1186. >
  1187. <template slot-scope="scope">
  1188. {{
  1189. scope.row.learnStatus === 1
  1190. ? "是"
  1191. : scope.row.learnStatus === 0
  1192. ? "否"
  1193. : ""
  1194. }}
  1195. </template>
  1196. </el-table-column>
  1197. <el-table-column
  1198. label="操作"
  1199. align="center"
  1200. fixed="right"
  1201. :width="navText.changeWidth ? navText.changeWidth : '180px'"
  1202. v-if="!navText.tableHide"
  1203. >
  1204. <template slot-scope="scope">
  1205. <slot name="btn" :scope="scope"></slot>
  1206. </template>
  1207. </el-table-column>
  1208. </el-table>
  1209. <el-dialog
  1210. :visible.sync="diaBox"
  1211. width="500px"
  1212. :show-close="false"
  1213. :destroy-on-close="true"
  1214. >
  1215. <div slot="title" class="hearders">
  1216. <div class="leftTitle">详情</div>
  1217. <div class="rightBoxs">
  1218. <img
  1219. src="@/assets/images/Close@2x.png"
  1220. alt=""
  1221. @click="closeBeforefs"
  1222. />
  1223. </div>
  1224. </div>
  1225. <el-row class="contentBox" :gutter="30">
  1226. <div style="width: 100%; height: 100%">
  1227. <video
  1228. controls
  1229. preload
  1230. style="width: 100%; height: 100%"
  1231. :src="$methodsTools.splitImgHost(videoUrls)"
  1232. ></video>
  1233. </div>
  1234. </el-row>
  1235. <div slot="footer" class="dialog-footer">
  1236. <el-button @click="closeBeforefs">关闭</el-button>
  1237. </div>
  1238. </el-dialog>
  1239. <el-dialog
  1240. :visible.sync="dialogVisible"
  1241. width="560px"
  1242. :show-close="false"
  1243. :close-on-click-modal="false"
  1244. >
  1245. <div slot="title" class="hearders">
  1246. <div class="leftTitle">课程树形图</div>
  1247. <div class="rightBoxs">
  1248. <img src="@/assets/images/Close@2x.png" alt="" @click="closes" />
  1249. </div>
  1250. </div>
  1251. <div>
  1252. <el-tree
  1253. :key="Math.random()"
  1254. :props="props"
  1255. :load="loadNode"
  1256. lazy
  1257. ></el-tree>
  1258. </div>
  1259. <span slot="footer" class="dialog-footer">
  1260. <el-button @click="closes">取 消</el-button>
  1261. </span>
  1262. </el-dialog>
  1263. </div>
  1264. </template>
  1265. <script>
  1266. export default {
  1267. props: ["tableSets", "tableData", "navText", "rowKey", "loading"],
  1268. data: function () {
  1269. return {
  1270. dialogVisible: false,
  1271. tableSet: this.tableSets,
  1272. allCheckData: [], //表格多选
  1273. checkAll: true,
  1274. checkedCities: [], //自定义列 选中数组
  1275. cities: [], //自定义列 总数组
  1276. isIndeterminate: false,
  1277. videoUrls: "",
  1278. diaBox: false,
  1279. props: {
  1280. label(data, node) {
  1281. return data.menuName || data.name;
  1282. },
  1283. isLeaf(data, node) {
  1284. return data.hasChildren ? false : true;
  1285. },
  1286. },
  1287. treeDatas: [],
  1288. };
  1289. },
  1290. computed: {
  1291. numTime: function () {
  1292. return function (res) {
  1293. return Number(res / 3600).toFixed(2);
  1294. };
  1295. },
  1296. numTimeminute: function () {
  1297. return function (res) {
  1298. return Number(res / 60).toFixed(2);
  1299. };
  1300. },
  1301. compType: function () {
  1302. return function (res, data) {
  1303. if (data === "POST") {
  1304. if (res.indexOf("edit") !== -1 || res.indexOf("update") !== -1) {
  1305. return "修改";
  1306. } else {
  1307. return "新增";
  1308. }
  1309. } else if (data === "GET") {
  1310. return "查询";
  1311. }
  1312. };
  1313. },
  1314. },
  1315. created() {
  1316. this.inittableSet = JSON.stringify(this.tableSet);
  1317. this.initTR();
  1318. },
  1319. mounted() {},
  1320. methods: {
  1321. sortMethods(a, b) {
  1322. return a.classGradeUserGoodsVoList.length >
  1323. b.classGradeUserGoodsVoList.length
  1324. ? -1
  1325. : 1;
  1326. },
  1327. // int: 1 节列表-关联章 2 章列表-关联模块 3 模块列表-关联课程 4 课程列表-关联商品 5 题目列表-关联试卷 6 试卷列表-关联商品 7 章卷列表-关联商品 8 模块列表-关联商品
  1328. jumpPages(v, int) {
  1329. if (int === 1) {
  1330. this.$router.push({
  1331. path: "/resource/videoManagement/chapterEdit",
  1332. query: {
  1333. id: v.chapterId,
  1334. },
  1335. });
  1336. }
  1337. if (int === 2) {
  1338. this.$router.push({
  1339. path: "/resource/videoManagement/moduleManagementEdit",
  1340. query: {
  1341. id: v.moduleId,
  1342. },
  1343. });
  1344. }
  1345. if (int === 3) {
  1346. this.$router.push({
  1347. path: "/resource/videoManagement/editCourse",
  1348. query: {
  1349. id: v.courseId,
  1350. },
  1351. });
  1352. }
  1353. if (int === 4) {
  1354. this.$router.push({
  1355. path: "/Marketing/commodityManageMentEdit",
  1356. query: {
  1357. id: v.goodsId,
  1358. },
  1359. });
  1360. }
  1361. if (int === 5) {
  1362. this.$router.push({
  1363. path: "/resource/bankManagement/editPaper",
  1364. query: {
  1365. id: v.examId,
  1366. },
  1367. });
  1368. }
  1369. if (int === 6) {
  1370. this.$router.push({
  1371. path: "/Marketing/commodityManageMentEdit",
  1372. query: {
  1373. id: v.goodsId,
  1374. },
  1375. });
  1376. }
  1377. if (int === 7) {
  1378. this.$router.push({
  1379. path: "/Marketing/commodityManageMentEdit",
  1380. query: {
  1381. id: v.goodsId,
  1382. },
  1383. });
  1384. }
  1385. if (int === 8) {
  1386. this.$router.push({
  1387. path: "/Marketing/commodityManageMentEdit",
  1388. query: {
  1389. id: v.goodsId,
  1390. },
  1391. });
  1392. }
  1393. },
  1394. jumpClass(v) {
  1395. this.$router.push({
  1396. path: "/education/classManageMent/studentMenu",
  1397. query: {
  1398. id: v.gradeId,
  1399. goodsId: v.id,
  1400. },
  1401. });
  1402. },
  1403. getSimpleText(html) {
  1404. var re1 = new RegExp("<.+?>", "g"); //匹配html标签的正则表达式,"g"是搜索匹配多个符合的内容
  1405. var msg = html.replace(re1, ""); //执行替换成空字符
  1406. return msg;
  1407. },
  1408. //树形图关闭
  1409. closes() {
  1410. this.dialogVisible = false;
  1411. },
  1412. activesBoxszing(ids) {
  1413. this.$api.inquireCoursemenuListS({ courseId: ids }).then((res) => {
  1414. res.rows.forEach((item) => {
  1415. item.TypeId = item.type + "-" + item.menuId;
  1416. });
  1417. this.treeDatas = res.rows;
  1418. this.dialogVisible = true;
  1419. });
  1420. },
  1421. loadNode(node, resolve) {
  1422. if (node.level === 0) {
  1423. this.treeDatas.forEach((item) => {
  1424. if (item.type === 1) {
  1425. item.hasChildren = true;
  1426. }
  1427. if (item.type === 2) {
  1428. item.hasChildren = true;
  1429. }
  1430. if (item.type === 3) {
  1431. item.hasChildren = false;
  1432. }
  1433. });
  1434. return resolve(this.treeDatas);
  1435. } else {
  1436. if (node.data.type === 1) {
  1437. this.$api
  1438. .inquireCourseListmodulechapter(node.data.courseId)
  1439. .then((res) => {
  1440. res.data.forEach((item) => {
  1441. item.TypeId = 2 + "-" + item.chapterId;
  1442. item.hasChildren = true;
  1443. item.menuId = item.chapterId;
  1444. item.type = 2;
  1445. });
  1446. return resolve(res.data);
  1447. });
  1448. }
  1449. if (node.data.type === 2) {
  1450. this.$api
  1451. .inquireCoursechaptersectionlist(node.data.menuId)
  1452. .then((res) => {
  1453. res.data.forEach((item) => {
  1454. item.TypeId = 3 + "-" + item.sectionId;
  1455. item.type = 3;
  1456. });
  1457. return resolve(res.data);
  1458. });
  1459. }
  1460. if (node.data.type === 3) {
  1461. return resolve([]);
  1462. }
  1463. }
  1464. },
  1465. timeStyle(column) {
  1466. if (column.columnIndex === 0 && this.navText.firstColLeft) {
  1467. return "text-align:left!important; padding-left: 40px;";
  1468. }
  1469. },
  1470. //初始化
  1471. initTR() {
  1472. this.cities = [];
  1473. this.checkedCities = [];
  1474. this.checkAll = true;
  1475. this.isIndeterminate = false;
  1476. this.tableSet.forEach((item, index) => {
  1477. this.cities.push(item.label);
  1478. if (item.hidden) {
  1479. this.checkedCities.push(item.label);
  1480. }
  1481. });
  1482. if (this.checkedCities.length === 0) {
  1483. this.isIndeterminate = false;
  1484. } else if (this.checkedCities.length === this.cities.length) {
  1485. this.isIndeterminate = false;
  1486. this.checkAll = true;
  1487. } else {
  1488. this.isIndeterminate = true;
  1489. this.checkAll = false;
  1490. }
  1491. },
  1492. //自定义列全选按钮触发
  1493. handleCheckAllChange(val) {
  1494. this.checkedCities = val ? this.cities : [];
  1495. this.isIndeterminate = false;
  1496. if (val) {
  1497. this.tableSet.forEach((item, index) => {
  1498. item.hidden = true;
  1499. });
  1500. } else {
  1501. this.tableSet.forEach((item, index) => {
  1502. item.hidden = false;
  1503. });
  1504. }
  1505. },
  1506. // 勾选自定义列子选项
  1507. handleCheckedCitiesChange(value) {
  1508. let checkedCount = value.length;
  1509. this.checkAll = checkedCount === this.cities.length;
  1510. this.isIndeterminate =
  1511. checkedCount > 0 && checkedCount < this.cities.length;
  1512. },
  1513. checkboxChange(v, e) {
  1514. this.tableSet.forEach((item) => {
  1515. if (item.label === v) {
  1516. item.hidden = e;
  1517. }
  1518. });
  1519. },
  1520. // 下移
  1521. downMove(option, index) {
  1522. if (index !== this.tableSet.length - 1) {
  1523. this.tableSet[index] = this.tableSet.splice(
  1524. index + 1,
  1525. 1,
  1526. this.tableSet[index]
  1527. )[0];
  1528. this.cities[index] = this.cities.splice(
  1529. index + 1,
  1530. 1,
  1531. this.cities[index]
  1532. )[0];
  1533. } else {
  1534. this.tableSet.unshift(this.tableSet.splice(index, 1)[0]);
  1535. this.cities.unshift(this.cities.splice(index, 1)[0]);
  1536. }
  1537. },
  1538. // 上移
  1539. upMove(option, index) {
  1540. if (index != 0) {
  1541. this.tableSet[index] = this.tableSet.splice(
  1542. index - 1,
  1543. 1,
  1544. this.tableSet[index]
  1545. )[0];
  1546. this.cities[index] = this.cities.splice(
  1547. index - 1,
  1548. 1,
  1549. this.cities[index]
  1550. )[0];
  1551. } else {
  1552. this.tableSet.push(this.tableSet.shift());
  1553. this.cities.push(this.cities.shift());
  1554. }
  1555. },
  1556. //跳转页面
  1557. jumpPage(options) {
  1558. this.$router.push({
  1559. path: "dictData",
  1560. query: {
  1561. dictId: options.dictId,
  1562. dictType: options.dictType,
  1563. },
  1564. });
  1565. },
  1566. //跳转页面
  1567. jumpPageLabel(options) {
  1568. this.$router.push({
  1569. path: "labelInfos",
  1570. query: {
  1571. id: options.id,
  1572. },
  1573. });
  1574. }, //跳转页面
  1575. jumpPageLabelProfess(options) {
  1576. this.$router.push({
  1577. path: "labelInfos",
  1578. query: {
  1579. id: options.labelId,
  1580. },
  1581. });
  1582. },
  1583. jumpinfoJump(options) {
  1584. this.$router.push({
  1585. path: "beneficiaryInfos",
  1586. query: {
  1587. id: options.payeeId,
  1588. },
  1589. });
  1590. },
  1591. //新增按钮
  1592. addClick() {
  1593. this.$emit("addClick");
  1594. },
  1595. //将选中值传回调用组件
  1596. backFather() {
  1597. this.$emit("emitData", this.allCheckData);
  1598. },
  1599. edit() {},
  1600. selectAll(value) {
  1601. this.allCheckData = value;
  1602. },
  1603. select(value) {
  1604. this.allCheckData = value;
  1605. },
  1606. //自定义列重置
  1607. initVue() {
  1608. // this.$emit("initTableset");
  1609. this.tableSet = JSON.parse(this.inittableSet);
  1610. this.initTR();
  1611. },
  1612. load(tree, treeNode, resolve) {
  1613. this.$emit("load", tree, treeNode, resolve);
  1614. },
  1615. editInfo(option, int) {
  1616. if (int === 3) {
  1617. this.$emit("aboutGoods", option);
  1618. } else {
  1619. this.$emit("editInfo", option);
  1620. }
  1621. },
  1622. getxq(option) {
  1623. this.$emit("getxq", option.userId);
  1624. },
  1625. openVideo(url) {
  1626. this.videoUrls = url;
  1627. this.diaBox = true;
  1628. },
  1629. closeBeforefs() {
  1630. this.diaBox = false;
  1631. },
  1632. },
  1633. };
  1634. </script>
  1635. <style lang="less">
  1636. .overSty {
  1637. white-space: nowrap;
  1638. overflow-x: auto;
  1639. &::-webkit-scrollbar {
  1640. width: 14px;
  1641. height: 14px;
  1642. }
  1643. &::-webkit-scrollbar-track,
  1644. &::-webkit-scrollbar-thumb {
  1645. border-radius: 999px;
  1646. border: 5px solid transparent;
  1647. }
  1648. &::-webkit-scrollbar-track {
  1649. box-shadow: 1px 1px 5px rgba(0, 0, 0, 0.2) inset;
  1650. }
  1651. &::-webkit-scrollbar-thumb {
  1652. min-height: 20px;
  1653. background-clip: content-box;
  1654. box-shadow: 0 0 0 5px rgba(0, 0, 0, 0.2) inset;
  1655. }
  1656. &::-webkit-scrollbar-corner {
  1657. background: transparent;
  1658. }
  1659. }
  1660. .slotPopper {
  1661. padding: 0px !important;
  1662. }
  1663. </style>
  1664. <style lang="less" scoped>
  1665. #tableList {
  1666. padding: 0px 16px 16px;
  1667. border-radius: 8px;
  1668. box-shadow: 0px 0px 9px 1px rgba(28, 41, 90, 0.1);
  1669. background: #ffffff;
  1670. .headerNavTool {
  1671. height: 72px;
  1672. display: flex;
  1673. justify-content: space-between;
  1674. align-items: center;
  1675. .rightBtnBox {
  1676. display: flex;
  1677. align-items: center;
  1678. }
  1679. }
  1680. }
  1681. .popoverDis {
  1682. display: flex;
  1683. flex-direction: column;
  1684. align-items: flex-start;
  1685. font-size: 14px;
  1686. .checkboxHeader {
  1687. height: 40px;
  1688. display: flex;
  1689. align-items: center;
  1690. justify-content: space-between;
  1691. padding-left: 13px;
  1692. padding-right: 15px;
  1693. width: 100%;
  1694. .initbtns {
  1695. color: #47a6ff;
  1696. cursor: pointer;
  1697. }
  1698. }
  1699. .checkboxGroup {
  1700. display: flex;
  1701. flex-direction: column;
  1702. width: 100%;
  1703. .checkboxchild {
  1704. width: 100%;
  1705. justify-content: space-between;
  1706. height: 40px;
  1707. display: flex;
  1708. align-items: center;
  1709. padding: 0px 15px 0px 13px;
  1710. transition: all 0.4s;
  1711. &:hover {
  1712. background-color: #ecf5ff;
  1713. }
  1714. &:hover .icon-right {
  1715. display: flex;
  1716. }
  1717. .icon-right {
  1718. display: flex;
  1719. align-items: center;
  1720. width: 30px;
  1721. height: 30px;
  1722. color: #666;
  1723. font-size: 14px;
  1724. display: none;
  1725. i {
  1726. cursor: pointer;
  1727. margin: 0px 3px;
  1728. &:hover {
  1729. color: #47a6ff;
  1730. }
  1731. }
  1732. }
  1733. }
  1734. }
  1735. }
  1736. /deep/.el-checkbox__input.is-checked + .el-checkbox__label {
  1737. color: #666;
  1738. }
  1739. .imgboxsq {
  1740. margin: 0 auto;
  1741. height: 60px;
  1742. max-height: 60px;
  1743. .el_images {
  1744. /deep/.el-image__inner {
  1745. width: auto;
  1746. }
  1747. }
  1748. }
  1749. .imgHover {
  1750. width: 100%;
  1751. height: 100%;
  1752. cursor: pointer;
  1753. }
  1754. .cvideo {
  1755. transition: all 0.2s;
  1756. color: #333;
  1757. cursor: pointer;
  1758. font-size: 30px;
  1759. }
  1760. .cvideo:hover {
  1761. color: #47a6ff;
  1762. }
  1763. .editInfoSty {
  1764. cursor: pointer;
  1765. color: blue;
  1766. }
  1767. .ulAuto {
  1768. display: flex;
  1769. justify-content: center;
  1770. align-items: center;
  1771. }
  1772. .ulAutos {
  1773. display: flex;
  1774. align-items: center;
  1775. justify-content: center;
  1776. }
  1777. .dis_sdt {
  1778. display: flex;
  1779. align-items: flex-end;
  1780. ul {
  1781. margin: 0px;
  1782. li {
  1783. text-align: left;
  1784. }
  1785. }
  1786. }
  1787. .jumpClass {
  1788. color: #333;
  1789. cursor: pointer;
  1790. }
  1791. .jumpStys {
  1792. color: blue;
  1793. cursor: pointer;
  1794. }
  1795. </style>