dialog.vue 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789
  1. <template>
  2. <div class="pb_content" style="background: unset">
  3. <div class="pb_content_body" style="
  4. background: #fff;
  5. padding: 0px 25px;
  6. box-sizing: border-box;
  7. border-radius: 5px;
  8. font-size: 16px;
  9. ">
  10. <div class="reBox">
  11. <div class="reTop">
  12. <div>分类筛选</div>
  13. <div>
  14. <!-- @click="getCourse" -->
  15. <div class="search" @click="getSource">
  16. <img src="../../../assets/icon/search.png" alt="" />
  17. </div>
  18. <input class="sInput" type="text" placeholder="请输入关键字" v-model="sourceName"
  19. @keyup.enter="getSource" />
  20. </div>
  21. </div>
  22. <div class="choose">
  23. <div class="all_choose" v-for="(item, index) in CourseType[0]" :key="index"
  24. :style="{ margin: !CourseTypeJson[item.id].length && 0 }" v-if="(item.name != '类型') || typea != '' || typeE.indexOf('e4cb3395-5602-4441-801c-f380e8935a74') != -1">
  25. <span v-if="CourseTypeJson[item.id].length">{{ item.name }}:</span>
  26. <div class="typeCss" v-if="CourseTypeJson[item.id].length">
  27. <div class="cName" @click="getCourse2(item.name, '', item.id, 1)"
  28. :class="typeE.indexOf(item.id) != -1 ? 'isCType' : ''">
  29. 全部
  30. </div>
  31. <div v-for="(item1, index1) in ctype(item.id)" :key="index + '-' + index1"
  32. :label="item1.id" @click="getCourse2(item.name, item.id, item1.id, 2)">
  33. <div class="cName" :class="typea == item1.id || typeb == item1.id
  34. ? 'isCType'
  35. : ''
  36. ">
  37. {{ item1.name }}
  38. </div>
  39. </div>
  40. </div>
  41. </div>
  42. </div>
  43. </div>
  44. </div>
  45. <div class="pb_content_body">
  46. <div class="student_table" v-loading="loading">
  47. <div class="source-box" v-for="(item, index) in res" :key="index">
  48. <img class="checkImg" src="../../../assets/icon/source/checka.png" @click="checka(item)" v-if="sourceData[item.id]"/>
  49. <img class="checkImg" src="../../../assets/icon/source/check.png" @click="checka(item)" v-else/>
  50. <!-- <div class="iamge"><img src="../../../assets/icon/source/image.png" alt=""></div>
  51. <div class="title"><span>{{ item.name }}</span></div> -->
  52. <div class="fengmian">
  53. <img src="../../../assets/icon/source/fengmian.jpg" alt="">
  54. <div class="ftitle"><span>{{ item.name }}</span></div>
  55. </div>
  56. <div class="detail">{{ item.detail }}</div>
  57. <div class="label"><span v-for="(k, ki) in item.label.split(',')" :key="index + '-' + ki">{{ k ? k : "无" }}</span>
  58. </div>
  59. <div class="button"><span @click="check(item.url)">查看</span></div>
  60. </div>
  61. <div v-if="!res.length" style="text-align: center; width: 100%;">暂无数据</div>
  62. </div>
  63. <div class="student_page">
  64. <el-pagination background layout="prev, pager, next" :page-size="pageSize" :total="total" v-if="page && total"
  65. @current-change="handleCurrentChange">
  66. </el-pagination>
  67. </div>
  68. </div>
  69. <el-dialog title="添加资源" :visible.sync="dialogVisible" :append-to-body="true" width="800px"
  70. :before-close="handleClose" class="dialog_diy">
  71. <div class="add-box">
  72. <div class="span-box">
  73. <span><span style="color: red">*</span>工具名称</span><el-input class="input" v-model="s_title"
  74. placeholder="请输入工具名称"></el-input>
  75. </div>
  76. <div class="type-box">
  77. <div class="both">
  78. <div class="choose2">
  79. <div class="all_choose2" v-for="(item, index) in CourseType[0]" :key="index">
  80. <span v-if="CourseTypeJson[item.id].length > 0
  81. ">{{ item.name }}</span>
  82. <el-checkbox-group v-model="courseTypeId2" v-if="CourseTypeJson[item.id].length > 0
  83. ">
  84. <el-checkbox v-for="item1 in CourseTypeJson[item.id]" :key="item1.id"
  85. :label="item1.id">{{ item1.name }}</el-checkbox>
  86. </el-checkbox-group>
  87. </div>
  88. </div>
  89. </div>
  90. </div>
  91. <div class="span-box">
  92. <span><span style="color: red">*</span>网址来源</span><el-input class="input" v-model="s_url"
  93. placeholder="请输入网址来源"></el-input>
  94. </div>
  95. <div class="span-box">
  96. <span><span style="color: red">*</span>工具描述</span><el-input class="input" type="textarea" resize="none"
  97. rows="5" v-model="s_detail" placeholder="请输入工具描述"></el-input>
  98. </div>
  99. <div class="span-box">
  100. <span>标签</span><el-select class="input" v-model="s_label" multiple placeholder="请选择标签">
  101. <el-option label="无需登录" value="无需登录"></el-option>
  102. <el-option label="扫码登录" value="扫码登录"></el-option>
  103. <el-option label="注册登录" value="注册登录"></el-option>
  104. <el-option label="免费" value="免费"></el-option>
  105. <el-option label="付费" value="付费"></el-option>
  106. <el-option label="中文" value="中文"></el-option>
  107. <el-option label="英文" value="英文"></el-option>
  108. </el-select>
  109. </div>
  110. </div>
  111. <span slot="footer" class="dialog-footer">
  112. <el-button @click="dialogVisible = false">取 消</el-button>
  113. <el-button type="primary" @click="add()">确定</el-button>
  114. </span>
  115. </el-dialog>
  116. </div>
  117. </template>
  118. <script>
  119. export default {
  120. props: {
  121. sourceData: {
  122. type: Object,
  123. },
  124. updateSourcePan:{
  125. type: Boolean,
  126. default: false
  127. }
  128. },
  129. data() {
  130. return {
  131. page: 1,
  132. pageSize: 20,
  133. total: 0,
  134. isLoading: false,
  135. dialogVisible: false,
  136. title: "",
  137. tableData: [],
  138. res: [],
  139. userid: this.$route.query.userid,
  140. org: this.$route.query.org,
  141. oid: this.$route.query.oid,
  142. CourseType: [],
  143. CourseTypeJson: {},
  144. courseTypeId: {},
  145. courseTypeSon: [],
  146. isChoose: 0,
  147. sourceName: "",
  148. typea: "",
  149. typeb: "",
  150. typeE: [],
  151. courseTypeId2: [],
  152. s_title: "",
  153. s_url: "",
  154. s_detail: "",
  155. s_label: [],
  156. };
  157. },
  158. mounted() {
  159. this.selectAllType();
  160. },
  161. computed: {
  162. ctype() {
  163. return function (tid) {
  164. if(tid == 'e4cb3395-5602-4441-801c-f380e8935a74'){
  165. return this.CourseTypeJson[tid]
  166. }else{
  167. if(this.typea == 'b107f98f-1dc4-4ede-80b4-178ba22b6a59'){
  168. return this.CourseTypeJson[tid].filter(e => {
  169. return ['fd7fc4a9-e934-47d5-9edf-f478a59010f0','5143a350-b20f-4a07-9d19-5ad305fefaac'].indexOf(e.id) != -1
  170. })
  171. }else if(this.typea == '3b12e8d9-866f-46bb-aa22-76cb3b7788b3'){
  172. return this.CourseTypeJson[tid].filter(e => {
  173. return ['fd7fc4a9-e934-47d5-9edf-f478a578789x','fd7fc4a9-e934-47d5-9edf-f478a5789631','1ab97776-71fa-40b1-84c3-5b311d9f6fd9','7c222102-cc32-4613-8f0f-e117ab3f49c0','d8c176a9-9c94-46a0-a824-d2b740323e62','7e79947e-5445-4ed2-935b-e078661a6256','df502b3d-8836-4449-b8c0-09d9d5f9b86d','fd7fc4a9-e934-47d5-9edf-f478a5789631','9fc98487-8e9c-47fa-ae5e-05122f0bf742','1de1bf4d-d4c9-4874-8993-4d3037a10fa1'].indexOf(e.id) != -1
  174. })
  175. }else if(this.typea == 'd760341a-5ab7-417f-bfc8-0fd3f183408a'){
  176. return this.CourseTypeJson[tid].filter(e => {
  177. return ['d8c176a9-9c94-46a0-a824-d2b740323abc','5f9afbf8-9c7b-403a-8629-162c1d6adea4'].indexOf(e.id) != -1
  178. })
  179. }else if(this.typea == '926efcf3-da23-4123-aa57-50341bf7d85f'){
  180. return this.CourseTypeJson[tid].filter(e => {
  181. return ['c3eaac53-3599-43c6-a224-a9e8b1e6eb7a','65196690-f7bc-4fc2-9175-b9ddc7dcba07','1874291f-96e5-4d9f-8747-170f87edb171','3777ef66-96ff-4f08-8e6d-a7b6acc6cb89','56ef86e8-c379-4b35-b752-f9a12e0dd2e7'].indexOf(e.id) != -1
  182. })
  183. }else if(this.typea == '8b21473c-eac2-4a40-8fb5-ac38985e8952'){
  184. return this.CourseTypeJson[tid].filter(e => {
  185. return ['e3365b81-49bb-4de9-a1c2-060e9dc593f3','5670c02b-7cbc-4788-8241-cf6e53dd61fd','25b66132-a125-4c51-8bbe-2653f8be4f0a','da94e547-ba90-4fd5-b95e-d13efca1e248','ba1db98a-0613-4568-92d2-59d53b600675','3777ef66-96ff-4f08-8e6d-a7b6acc6c789'].indexOf(e.id) != -1
  186. })
  187. }else if(this.typeE.indexOf('e4cb3395-5602-4441-801c-f380e8935a74') != -1){
  188. return this.CourseTypeJson[tid]
  189. }else{
  190. return []
  191. }
  192. }
  193. };
  194. }
  195. },
  196. methods: {
  197. checka(item){
  198. let _sourceData = this.sourceData
  199. if(this.updateSourcePan){
  200. if(_sourceData[item.id]){
  201. delete _sourceData[item.id]
  202. }else{
  203. _sourceData = {}
  204. _sourceData[item.id] = item
  205. }
  206. }else{
  207. if(_sourceData[item.id]){
  208. delete _sourceData[item.id]
  209. }else{
  210. _sourceData[item.id] = item
  211. }
  212. }
  213. this.$forceUpdate()
  214. this.$emit("update:sourceData",_sourceData)
  215. },
  216. check(url){
  217. window.open(url)
  218. },
  219. handleCurrentChange(val) {
  220. this.page = val;
  221. this.getSource();
  222. },
  223. handleClose(done) {
  224. done();
  225. },
  226. selectAllType() {
  227. let params = {
  228. org: this.org && this.org != "" ? this.org : "",
  229. oid: this.oid && this.oid != "" ? this.oid : "",
  230. };
  231. this.ajax
  232. .get(this.$store.state.api + "selectAllSourceType", params)
  233. .then((res) => {
  234. this.CourseType = res.data;
  235. for (var i = 0; i < res.data[0].length; i++) {
  236. if(res.data[0][i].id == "37076c23-7053-46eb-b25b-756824806608"){
  237. res.data[0][i].name = "类型";
  238. }else if(res.data[0][i].id == "e4cb3395-5602-4441-801c-f380e8935a74"){
  239. res.data[0][i].name = "场景";
  240. }
  241. if (!this.cid) {
  242. this.courseTypeId[res.data[0][i].id] = [];
  243. }
  244. if (!this.CourseTypeJson[res.data[0][i].id]) {
  245. this.CourseTypeJson[res.data[0][i].id] = [];
  246. }
  247. if (res.data[2].length == 0 && res.data[3].length == 0) {
  248. for (var j = 0; j < res.data[1].length; j++) {
  249. if (res.data[0][i].id == res.data[1][j].pid) {
  250. this.CourseTypeJson[res.data[0][i].id].push(res.data[1][j]); // 去除公共分类
  251. }
  252. }
  253. } else {
  254. if (res.data[2].length > 0) {
  255. for (var j = 0; j < res.data[2].length; j++) {
  256. if (res.data[0][i].id == res.data[2][j].pid) {
  257. this.CourseTypeJson[res.data[0][i].id].push(res.data[2][j]); // 去除公共分类
  258. }
  259. }
  260. }
  261. if (res.data[3].length > 0) {
  262. for (var j = 0; j < res.data[3].length; j++) {
  263. if (res.data[0][i].id == res.data[3][j].pid) {
  264. this.CourseTypeJson[res.data[0][i].id].push(res.data[3][j]); // 去除公共分类
  265. }
  266. }
  267. }
  268. }
  269. }
  270. })
  271. .catch((err) => {
  272. console.error(err);
  273. });
  274. },
  275. getCourse2(typeName, ftypeId, typeid, type) {
  276. this.page = 1;
  277. if (typeid == "e4cb3395-5602-4441-801c-f380e8935a74" || ftypeId == 'e4cb3395-5602-4441-801c-f380e8935a74') {
  278. this.typeb = "";
  279. if (type == 1) {
  280. if (this.typeE.indexOf(typeid) != -1) {
  281. this.typeE.splice(this.typeE.indexOf(typeid), 1);
  282. } else {
  283. this.typeE.push(typeid);
  284. if (this.typea != "") {
  285. this.typea = "";
  286. }
  287. }
  288. } else {
  289. if (this.typea == typeid) {
  290. this.typea = "";
  291. } else {
  292. this.typea = typeid;
  293. if (this.typeE.indexOf(ftypeId) != -1) {
  294. this.typeE.splice(this.typeE.indexOf(ftypeId), 1);
  295. }
  296. }
  297. }
  298. } else if (typeid == "37076c23-7053-46eb-b25b-756824806608" || ftypeId == '37076c23-7053-46eb-b25b-756824806608') {
  299. if (type == 1) {
  300. if (this.typeE.indexOf(typeid) != -1) {
  301. this.typeE.splice(this.typeE.indexOf(typeid), 1);
  302. } else {
  303. this.typeE.push(typeid);
  304. if (this.typeb != "") {
  305. this.typeb = "";
  306. }
  307. }
  308. } else {
  309. if (this.typeb == typeid) {
  310. this.typeb = "";
  311. } else {
  312. this.typeb = typeid;
  313. if (this.typeE.indexOf(ftypeId) != -1) {
  314. this.typeE.splice(this.typeE.indexOf(ftypeId), 1);
  315. }
  316. }
  317. }
  318. }
  319. if(this.typea == "" && this.typeE.indexOf('e4cb3395-5602-4441-801c-f380e8935a74') == -1){
  320. this.typeE = []
  321. }
  322. this.getSource();
  323. },
  324. getSource() {
  325. this.loading = true
  326. let params = {
  327. uid: this.userid,
  328. oid: this.oid,
  329. org: this.org,
  330. typea: this.typea != undefined ? this.typea : "",
  331. typeb: this.typeb != undefined ? this.typeb : "",
  332. typeE: this.typeE.join(","),
  333. cn: this.sourceName,
  334. page: this.page,
  335. pageSize: this.pageSize,
  336. };
  337. this.ajax
  338. .get(this.$store.state.api + "selectSource", params)
  339. .then((res) => {
  340. this.loading = false
  341. this.res = res.data[0];
  342. this.total = res.data[0].length ? res.data[0][0].num : 0;
  343. })
  344. .catch((err) => {
  345. console.error(err);
  346. });
  347. },
  348. addSource() {
  349. this.courseTypeId2 = []
  350. this.s_title = ""
  351. this.s_url = ""
  352. this.s_detail = ""
  353. this.s_label = []
  354. this.dialogVisible = true
  355. },
  356. add() {
  357. if (this.s_title == '') {
  358. this.$message.error('请填写工具名称')
  359. return
  360. }
  361. if (this.s_url == '') {
  362. this.$message.error('请填写网址来源')
  363. return
  364. }
  365. if (this.s_detail == '') {
  366. this.$message.error('请填写工具描述')
  367. return
  368. }
  369. let params = [{
  370. name: this.s_title,
  371. url: this.s_url,
  372. detail: this.s_detail,
  373. label: this.s_label.join(","),
  374. userid: this.userid,
  375. courseType: JSON.stringify(this.courseTypeId2)
  376. }]
  377. this.ajax
  378. .post(this.$store.state.api + "addSource", params)
  379. .then((res) => {
  380. this.$message({
  381. message: "添加成功",
  382. type: "success",
  383. });
  384. this.dialogVisible = false
  385. this.getSource();
  386. })
  387. .catch((err) => {
  388. this.$message.error("网络不佳");
  389. console.error(err);
  390. });
  391. }
  392. },
  393. created() {
  394. this.getSource();
  395. },
  396. };
  397. </script>
  398. <style scoped>
  399. .pb_head {
  400. display: flex;
  401. justify-content: space-between;
  402. }
  403. .student_head {
  404. margin-bottom: 20px;
  405. }
  406. .student_page {
  407. margin-top: 10px;
  408. }
  409. .pb_head {
  410. margin: 0 !important;
  411. width: 100% !important;
  412. }
  413. .bgColor {
  414. background: #466b99;
  415. }
  416. .reBox {
  417. background: #fff;
  418. margin: 0 auto;
  419. padding: 10px 5px;
  420. box-sizing: border-box;
  421. }
  422. .reTop {
  423. padding: 0 0 5px;
  424. /* padding: 20px 0 0 0; */
  425. /* border-bottom: 1px solid #eee; */
  426. display: flex;
  427. flex-direction: row;
  428. flex-wrap: nowrap;
  429. align-items: center;
  430. justify-content: space-between;
  431. }
  432. .reTop>div:nth-child(1) {
  433. font-weight: bold;
  434. /* width: 40px; */
  435. /* border-bottom: 1px solid #205cc6; */
  436. /* padding-bottom: 20px; */
  437. color: #205cc6;
  438. /* font-size: 20px; */
  439. }
  440. .reTop>div:nth-child(2) {
  441. display: flex;
  442. flex-direction: row;
  443. align-items: center;
  444. border: 1px solid #ccced3;
  445. width: 300px;
  446. border-radius: 8px;
  447. padding: 5px 0;
  448. /* margin-bottom: 10px; */
  449. background: #fafafa;
  450. }
  451. .search {
  452. width: 20px;
  453. padding: 0 5px;
  454. }
  455. .search>img {
  456. width: 100%;
  457. height: 100%;
  458. }
  459. .sInput {
  460. border: none;
  461. width: 85%;
  462. background: #fafafa;
  463. }
  464. .sInput:focus-visible {
  465. outline: none;
  466. }
  467. .typeCss {
  468. display: flex;
  469. flex-direction: row;
  470. flex-wrap: wrap;
  471. justify-content: flex-start;
  472. align-items: center;
  473. }
  474. .choose {
  475. display: flex;
  476. flex-direction: column;
  477. flex-wrap: nowrap;
  478. height: 100%;
  479. justify-content: space-evenly;
  480. align-items: flex-start;
  481. padding: 10px 0;
  482. }
  483. .all_choose {
  484. display: flex;
  485. flex-direction: row;
  486. align-items: baseline;
  487. margin: 2px 0;
  488. width: 100%;
  489. }
  490. .all_choose>span {
  491. min-width: 80px;
  492. display: block;
  493. letter-spacing: 14px;
  494. }
  495. .all_choose>span:nth-child(1) {
  496. font-weight: bold;
  497. }
  498. .cName {
  499. cursor: pointer;
  500. margin: 0 10px 5px 0;
  501. color: #b9b6b9;
  502. min-width: 80px;
  503. width: 80px;
  504. white-space: nowrap;
  505. overflow: hidden;
  506. text-overflow: ellipsis;
  507. }
  508. .isCType {
  509. color: #6282c2;
  510. }
  511. .dialog_diy>>>.el-dialog {
  512. height: 100% !important;
  513. margin: 0 auto !important;
  514. }
  515. .dialog_diy>>>.el-dialog__header {
  516. background: #3c3c3c !important;
  517. padding: 15px 20px;
  518. }
  519. .dialog_diy>>>.el-dialog__title {
  520. color: #fff;
  521. }
  522. .dialog_diy>>>.el-dialog__headerbtn {
  523. top: 19px;
  524. }
  525. .dialog_diy>>>.el-dialog__headerbtn .el-dialog__close {
  526. color: #fff;
  527. }
  528. .dialog_diy>>>.el-dialog__headerbtn .el-dialog__close:hover {
  529. color: #fff;
  530. }
  531. .dialog_diy>>>.el-dialog__body,
  532. .dialog_diy>>>.el-dialog__footer {
  533. background: #fafafa;
  534. }
  535. .dialog_diy>>>.el-dialog__body {
  536. height: calc(100% - 125px);
  537. box-sizing: border-box;
  538. }
  539. .both {
  540. display: flex;
  541. flex-direction: row;
  542. flex-wrap: wrap;
  543. width: 100%;
  544. align-items: center;
  545. justify-content: flex-start;
  546. margin: 15px 0;
  547. }
  548. .all_choose2 {
  549. display: flex;
  550. flex-direction: row;
  551. align-items: flex-start;
  552. width: 100%;
  553. }
  554. .all_choose2>span {
  555. min-width: 100px;
  556. display: block;
  557. letter-spacing: 14px;
  558. white-space: nowrap;
  559. overflow: hidden;
  560. text-overflow: ellipsis;
  561. }
  562. .all_choose2>span:nth-child(1) {
  563. font-weight: bold;
  564. }
  565. .all_choose2>>>.el-checkbox-group {
  566. display: flex;
  567. flex-direction: row;
  568. width: 100%;
  569. flex-wrap: wrap;
  570. align-content: center;
  571. justify-content: flex-start;
  572. align-items: center;
  573. margin-top: 3px;
  574. }
  575. .all_choose2>.el-checkbox-group>>>.el-checkbox {
  576. margin-bottom: 10px;
  577. display: flex;
  578. flex-direction: row;
  579. align-items: center;
  580. }
  581. .all_choose2>.el-checkbox-group>.el-checkbox>>>.el-checkbox__label {
  582. min-width: 80px;
  583. overflow: hidden;
  584. width: 80px;
  585. text-overflow: ellipsis;
  586. white-space: nowrap;
  587. }
  588. .all_choose2>.el-checkbox-group>.el-checkbox>>>.el-checkbox__label:hover {
  589. width: auto;
  590. }
  591. .choose2 {
  592. display: flex;
  593. flex-direction: column;
  594. flex-wrap: nowrap;
  595. height: 100%;
  596. justify-content: space-evenly;
  597. align-items: flex-start;
  598. }
  599. .add-box {
  600. height: 100%;
  601. overflow: auto;
  602. width: 100%;
  603. background: #fff;
  604. border-radius: 10px;
  605. box-sizing: border-box;
  606. padding: 20px;
  607. }
  608. .span-box {
  609. display: flex;
  610. margin-bottom: 20px;
  611. }
  612. .span-box>span {
  613. font-weight: bold;
  614. min-width: 100px;
  615. }
  616. .span-box>.input {
  617. width: 100%;
  618. }
  619. .type-box {
  620. width: 100%;
  621. }
  622. .student_table {
  623. display: flex;
  624. flex-wrap: wrap;
  625. }
  626. .source-box {
  627. width: calc(100% / 4 - 15px);
  628. background: #fff;
  629. overflow: hidden;
  630. margin: 0 20px 20px 0;
  631. position: relative;
  632. display:flex;
  633. flex-direction: column;
  634. }
  635. .source-box:nth-child(4n){
  636. margin-right: 0;
  637. }
  638. .checkImg{
  639. position: absolute;
  640. top: 10px;
  641. z-index: 10;
  642. right: 10px;
  643. cursor: pointer;
  644. width: 30px;
  645. border-radius:5px;
  646. }
  647. .fengmian{
  648. width: 100%;
  649. position: relative;
  650. }
  651. .fengmian>img{
  652. width: 100%;
  653. }
  654. .fengmian>.ftitle{
  655. position: absolute;
  656. bottom: 10%;
  657. color: rgb(88, 121, 198);
  658. width: 90%;
  659. text-align: center;
  660. font-weight: 700;
  661. overflow: hidden;
  662. white-space: nowrap;
  663. text-overflow: ellipsis;
  664. font-size: 24px;
  665. left: 50%;
  666. transform: translateX(-50%);
  667. }
  668. .source-box .iamge {
  669. width: 150px;
  670. height: 125px;
  671. margin: 0 auto;
  672. }
  673. .source-box .iamge>img {
  674. width: 100%;
  675. height: 100%;
  676. }
  677. .source-box .title {
  678. width: 90%;
  679. font-size: 18px;
  680. text-align: center;
  681. margin: 5px auto;
  682. font-weight: 700;
  683. overflow: hidden;
  684. white-space: nowrap;
  685. text-overflow: ellipsis;
  686. height:24px;
  687. }
  688. .source-box .detail {
  689. text-align: center;
  690. width: 90%;
  691. margin: 5px auto;
  692. color: #acacac;
  693. display: block;
  694. overflow: hidden;
  695. text-overflow: ellipsis;
  696. -o-text-overflow: ellipsis;
  697. display: -webkit-box;
  698. -webkit-line-clamp: 2;
  699. -webkit-box-orient: vertical;
  700. height: 42px;
  701. font-size: 15px;
  702. }
  703. .source-box .label {
  704. width: 90%;
  705. margin: 10px auto 5px;
  706. display: flex;
  707. flex-wrap: wrap;
  708. }
  709. .source-box .label>span {
  710. padding: 5px 10px;
  711. background: rgb(244, 244, 244);
  712. border-radius: 5px;
  713. margin: 0 0 5px 5px;
  714. }
  715. .source-box .button {
  716. width: 100%;
  717. text-align: center;
  718. display: flex;
  719. height: 40px;
  720. background: rgb(88, 121, 198);
  721. color: #fff;
  722. margin-top: auto;
  723. }
  724. .source-box .button>span {
  725. width: 100%;
  726. cursor: pointer;
  727. height: 100%;
  728. line-height: 40px;
  729. }</style>